@pdf-viewer/react 1.16.0-rc.0 → 1.16.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ToolbarLayout.module-d91e2284.js → ToolbarLayout.module-d84f99c6.js} +976 -974
- package/dist/components/RPController.js +1 -1
- package/dist/components/RPPages.js +1 -1
- package/dist/components/RPProvider.js +1 -1
- package/dist/components/layout/LayoutContainer.js +1 -1
- package/dist/components/layout/RPDefaultLayout.js +1 -1
- package/dist/components/layout/RPLayout.js +1 -1
- package/dist/components/layout/sidebar/RPSidebar.js +1 -1
- package/dist/components/layout/sidebar/Thumbnail.js +1 -1
- package/dist/components/layout/sidebar/Thumbnails.js +1 -1
- package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
- package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/MostPageTool.js +1 -1
- package/dist/components/layout/toolbar/OtherTool.js +1 -1
- package/dist/components/layout/toolbar/Paginate.js +1 -1
- package/dist/components/layout/toolbar/PrintTool.js +1 -1
- package/dist/components/layout/toolbar/RPMoreOptions.js +1 -1
- package/dist/components/layout/toolbar/RPToolbar.js +1 -1
- package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
- package/dist/components/layout/toolbar/SearchResultNavigator.js +1 -1
- package/dist/components/layout/toolbar/SearchTool.js +1 -1
- package/dist/components/layout/toolbar/ThumbnailTool.js +1 -1
- package/dist/components/layout/toolbar/ToolbarCustom.js +1 -1
- package/dist/components/layout/toolbar/ToolbarDefault.js +1 -1
- package/dist/components/layout/toolbar/ToolbarLayout.js +1 -1
- package/dist/components/layout/toolbar/ZoomTool.js +1 -1
- package/dist/components/layout/toolbar/tools/DocumentPropertiesTool.js +1 -1
- package/dist/components/layout/toolbar/tools/DualPageTool.js +1 -1
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/tools/InputPageTool.js +1 -1
- package/dist/components/layout/toolbar/tools/NextPageTool.js +1 -1
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +1 -1
- package/dist/components/layout/toolbar/tools/PrintTool.js +1 -1
- package/dist/components/layout/toolbar/tools/SinglePageTool.js +1 -1
- package/dist/components/layout/toolbar/tools/ThumbnailTool.js +1 -1
- package/dist/components/layout/toolbar/tools/ZoomLevelDisplay.js +1 -1
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +1 -1
- package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +1 -1
- package/dist/components/layout/toolbar/tools/defaults/RPVerticalBar.js +1 -1
- package/dist/components/layout/toolbar/tools/more-options/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/tools/more-options/FileUploadTool.js +1 -1
- package/dist/components/layout/toolbar/tools/more-options/MostPageTool.js +1 -1
- package/dist/components/layout/toolbar/tools/more-options/PrintTool.js +1 -1
- package/dist/components/page/AnnotationLayer.js +1 -1
- package/dist/components/page/CanvasLayer.js +1 -1
- package/dist/components/page/DualPage.js +1 -1
- package/dist/components/page/RPPage.js +1 -1
- package/dist/components/page/SinglePage.js +1 -1
- package/dist/components/page/TextHighlightLayer.js +1 -1
- package/dist/components/page/TextLayer.js +1 -1
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/contexts/PaginationContext.js +1 -1
- package/dist/contexts/PrintContext.js +1 -1
- package/dist/contexts/RenderQueueProvider.js +1 -1
- package/dist/contexts/SearchContext.js +1 -1
- package/dist/contexts/ThumbnailsContext.js +1 -1
- package/dist/main.js +1 -1
- package/dist/types/utils/annotations.d.ts +1 -2
- package/dist/types/utils/link_service.d.ts +3 -1
- package/dist/utils/annotations.js +45 -56
- package/dist/utils/hooks/useFileDownload.js +1 -1
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/usePaginate.js +1 -1
- package/dist/utils/hooks/usePresentPage.js +1 -1
- package/dist/utils/hooks/usePrint.js +1 -1
- package/dist/utils/hooks/useScrollToPage.js +1 -1
- package/dist/utils/hooks/useSearch.js +1 -1
- package/dist/utils/hooks/useThumbnail.js +1 -1
- package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
- package/dist/utils/link_service.js +40 -10
- package/package.json +1 -1
|
@@ -1,136 +1,136 @@
|
|
|
1
1
|
import { jsx as i, Fragment as he, jsxs as W } from "react/jsx-runtime";
|
|
2
2
|
import * as Q from "react";
|
|
3
|
-
import { useRef as M, useEffect as z, useCallback as N, useState as $, useMemo as k, createContext as Ve, useContext as Be, useImperativeHandle as
|
|
3
|
+
import { useRef as M, useEffect as z, useCallback as N, useState as $, useMemo as k, createContext as Ve, useContext as Be, useImperativeHandle as dn, createElement as Ke, PureComponent as ao, Component as co, memo as un, Fragment as lo, forwardRef as uo } from "react";
|
|
4
4
|
import { ChevronUpIcon as Ue } from "./components/icons/ChevronUpIcon.js";
|
|
5
5
|
import { UIButton as ce } from "./components/ui/Button.js";
|
|
6
|
-
import { UIInput as
|
|
7
|
-
import { ViewMode as Ne, ScrollMode as
|
|
6
|
+
import { UIInput as pn } from "./components/ui/Input.js";
|
|
7
|
+
import { ViewMode as Ne, ScrollMode as re, AnnotationSubType as Mt, SelectionMode as po, ErrorType as ho, ZoomLevel as We } from "./utils/types.js";
|
|
8
8
|
import { useScrollModeContext as De } from "./contexts/ScrollModeContext.js";
|
|
9
|
-
import { useDocumentContext as
|
|
10
|
-
import { useDocumentPasswordContext as
|
|
11
|
-
import { useDarkModeContext as
|
|
9
|
+
import { useDocumentContext as oe } from "./contexts/RPDocumentContext.js";
|
|
10
|
+
import { useDocumentPasswordContext as fo } from "./contexts/DocumentPasswordContext.js";
|
|
11
|
+
import { useDarkModeContext as mo } from "./contexts/DarkModeContext.js";
|
|
12
12
|
import "./contexts/RotationContext.js";
|
|
13
|
-
import { useLayerContext as
|
|
13
|
+
import { useLayerContext as go } from "./contexts/LayerContext.js";
|
|
14
14
|
import { useZoomContext as tt } from "./contexts/ZoomContext.js";
|
|
15
15
|
import { useViewModeContext as Me } from "./contexts/ViewModeContext.js";
|
|
16
16
|
import { useVirtualScrollContext as nt } from "./contexts/VirtualScrollContext.js";
|
|
17
|
-
import { useVirtualGridContext as
|
|
18
|
-
import { useSelectionModeContext as
|
|
17
|
+
import { useVirtualGridContext as hn } from "./contexts/VirtualGridContext.js";
|
|
18
|
+
import { useSelectionModeContext as vo } from "./contexts/SelectionModeContext.js";
|
|
19
19
|
import { useInitialStateContext as Pt } from "./contexts/InitialStateContext.js";
|
|
20
|
-
import { useFullScreenContext as
|
|
20
|
+
import { useFullScreenContext as wo } from "./contexts/FullScreenContext.js";
|
|
21
21
|
import "./contexts/FileInputContext.js";
|
|
22
22
|
import "./contexts/DropFileZoneContext.js";
|
|
23
|
-
import { findMatches as
|
|
23
|
+
import { findMatches as _o, resetDivs as bo, highlightMatches as To, isMatchEntireWord as Co } from "./utils/highlight.js";
|
|
24
24
|
import { useLayoutContainer as Te } from "./contexts/LayoutContainerContext.js";
|
|
25
25
|
import { useDimensionPagesContext as Ze } from "./contexts/DimensionPagesContext.js";
|
|
26
26
|
import { useLocalizationContext as de } from "./contexts/LocalizationContext.js";
|
|
27
|
-
import { useHighlightContext as
|
|
27
|
+
import { useHighlightContext as Po } from "./contexts/HighlightContext.js";
|
|
28
28
|
import "./contexts/LicenseContext.js";
|
|
29
|
-
import { useDownloadContext as
|
|
30
|
-
import { useSmoothScrollContext as
|
|
29
|
+
import { useDownloadContext as yo } from "./contexts/DownloadContext.js";
|
|
30
|
+
import { useSmoothScrollContext as fn } from "./contexts/SmoothScrollContext.js";
|
|
31
31
|
import "./contexts/ElementPageContext.js";
|
|
32
32
|
import { usePagesRotateContext as ot } from "./contexts/PagesRotateContext.js";
|
|
33
|
-
import { Queue as
|
|
34
|
-
import { renderPage as
|
|
35
|
-
import { useGlobalCurrentPage as
|
|
33
|
+
import { Queue as Io } from "./utils/Queue.js";
|
|
34
|
+
import { renderPage as So } from "./utils/renderPage.js";
|
|
35
|
+
import { useGlobalCurrentPage as xo } from "./contexts/GlobalCurrentPage.js";
|
|
36
36
|
import { useLoaderContext as yt } from "./contexts/LoaderContext.js";
|
|
37
37
|
import { useToolComponentContext as Ie } from "./contexts/ToolComponentContext.js";
|
|
38
38
|
import { useIconToolContext as me } from "./contexts/IconToolContext.js";
|
|
39
|
-
import { useOtherToolContext as
|
|
40
|
-
import { useEventCallbackContext as
|
|
41
|
-
import { useThemeContext as
|
|
39
|
+
import { useOtherToolContext as Ro } from "./contexts/OtherToolContext.js";
|
|
40
|
+
import { useEventCallbackContext as Lo } from "./contexts/EventCallbackContext.js";
|
|
41
|
+
import { useThemeContext as Eo } from "./contexts/ThemeContext.js";
|
|
42
42
|
import "./contexts/ConfigContext.js";
|
|
43
|
-
import * as
|
|
44
|
-
import { PixelsPerInch as
|
|
45
|
-
import { ThumbnailIcon as
|
|
43
|
+
import * as No from "pdfjs-dist";
|
|
44
|
+
import { PixelsPerInch as Oo, AnnotationMode as Do, RenderingCancelledException as zo, AnnotationLayer as Ao } from "pdfjs-dist";
|
|
45
|
+
import { ThumbnailIcon as Fo } from "./components/icons/Thumbnail.js";
|
|
46
46
|
import { c as se } from "./clsx-0c6e471a.js";
|
|
47
|
-
import { LoaderIcon as
|
|
48
|
-
import { Container as
|
|
49
|
-
import { useViewportContext as Se, ViewportProvider as
|
|
50
|
-
import { useToolbarComponentContext as Ce, ToolbarComponentProvider as
|
|
51
|
-
import { RPSplitter as
|
|
52
|
-
import { WrapperLayout as
|
|
47
|
+
import { LoaderIcon as mn } from "./components/icons/LoaderIcon.js";
|
|
48
|
+
import { Container as ko } from "./components/layout/Container.js";
|
|
49
|
+
import { useViewportContext as Se, ViewportProvider as Wo } from "./contexts/ViewportContext.js";
|
|
50
|
+
import { useToolbarComponentContext as Ce, ToolbarComponentProvider as Mo } from "./contexts/ToolbarComponentContext.js";
|
|
51
|
+
import { RPSplitter as Ho } from "./components/layout/sidebar/RPSplitter.js";
|
|
52
|
+
import { WrapperLayout as $o } from "./components/layout/WrapperLayout.js";
|
|
53
53
|
import { RPDropFileZone as qo } from "./components/RPDropFileZone.js";
|
|
54
|
-
import { c as Pe, L as
|
|
54
|
+
import { c as Pe, L as Go } from "./LayoutWrapper-6224491f.js";
|
|
55
55
|
import { c as ne, S as Ht } from "./SearchCloseButton-08d57275.js";
|
|
56
56
|
import { UICheckbox as $t } from "./components/ui/Checkbox.js";
|
|
57
|
-
import { useIconContext as ge, IconProvider as
|
|
57
|
+
import { useIconContext as ge, IconProvider as Uo } from "./contexts/IconContext.js";
|
|
58
58
|
import K from "./components/ui/RPTooltip.js";
|
|
59
59
|
import { UIDropDown as It } from "./components/ui/DropDown.js";
|
|
60
60
|
import { MenuItem as ye } from "./components/layout/toolbar/MenuItem.js";
|
|
61
61
|
import { MenuSeparator as St } from "./components/layout/toolbar/MenuSeparator.js";
|
|
62
|
-
import { dateFormatter as
|
|
63
|
-
import { PropertyItem as
|
|
62
|
+
import { dateFormatter as qt } from "./utils/dateFormatter.js";
|
|
63
|
+
import { PropertyItem as Vo } from "./components/layout/toolbar/PropertyItem.js";
|
|
64
64
|
import "./RotateTool.module-67946714.js";
|
|
65
65
|
import { withRef as rt } from "./utils/withRef.js";
|
|
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 xt, getPositionFromPage as
|
|
73
|
-
import { useMousePressed as
|
|
74
|
-
import { useGrabScroll as
|
|
75
|
-
import { usePinch as
|
|
66
|
+
import { useInfiniteScroll as Bo } from "./utils/hooks/useInfiniteScroll.js";
|
|
67
|
+
import { MAX_ZOOM_SCALE as Gt, THUMBNAIL_MIN_WIDTH as Zo } from "./utils/constants.js";
|
|
68
|
+
import { SimpleLinkService as jo } from "./utils/link_service.js";
|
|
69
|
+
import { annotationsEvents as Ko, annotationEventsHandler as Xo, handleAnnotationWidget as Qo, handleAnnotationLink as Yo, bindLayerEvents as Jo, unbindLayerEvents as Ut } from "./utils/annotations.js";
|
|
70
|
+
import { normalizeSingleKeyword as er, sortHighlightPosition as tr, unwrap as nr } from "./components/page/searchHighlight.js";
|
|
71
|
+
import { CustomElement as or } from "./components/page/CustomElement.js";
|
|
72
|
+
import { getGridDimension as xt, getPositionFromPage as rr, getPageFromPosition as ir } from "./utils/calculatePage.js";
|
|
73
|
+
import { useMousePressed as sr } from "./utils/hooks/useMousePressed.js";
|
|
74
|
+
import { useGrabScroll as ar } from "./utils/hooks/useGrabScroll.js";
|
|
75
|
+
import { usePinch as cr } from "./utils/hooks/usePinch.js";
|
|
76
76
|
import { useDebounce as Rt } from "./utils/hooks/useDebounce.js";
|
|
77
|
-
import
|
|
78
|
-
import { useCopyText as
|
|
77
|
+
import lr from "./components/ui/PasswordModal.js";
|
|
78
|
+
import { useCopyText as dr } from "./utils/hooks/useCopyText.js";
|
|
79
79
|
import { getScrollDistance as ke } from "./utils/getScrollDistance.js";
|
|
80
|
-
import { getWordPositionInPage as
|
|
81
|
-
import { getThumbnailViewport as
|
|
80
|
+
import { getWordPositionInPage as ur } from "./utils/getWordPositionInPage.js";
|
|
81
|
+
import { getThumbnailViewport as pr } from "./utils/getThumbnailViewport.js";
|
|
82
82
|
import { smoothScrollTo as dt } from "./utils/smoothScrollTo.js";
|
|
83
|
-
import { appConsole as
|
|
84
|
-
import { FileUploadTool as
|
|
85
|
-
import { DarkModeTool as
|
|
86
|
-
import { ThreeDotIcon as
|
|
87
|
-
import { c as
|
|
88
|
-
import { D as
|
|
89
|
-
import { a as
|
|
90
|
-
import { CloseIcon as
|
|
91
|
-
import { DocumentProperties as
|
|
92
|
-
import { RotateTool as
|
|
93
|
-
import { ViewModeTool as
|
|
94
|
-
import { ScrollModeTool as
|
|
95
|
-
import { FileDownloadDefaultIcon as
|
|
96
|
-
import { PrintDefaultTool as
|
|
97
|
-
import { FullScreenTool as
|
|
98
|
-
import { GoToDownIcon as
|
|
99
|
-
import { SelectionModeTool as
|
|
100
|
-
import { ZoomInIcon as
|
|
101
|
-
import { ZoomOutIcon as
|
|
102
|
-
import { isZoomOutDisabled as
|
|
103
|
-
import { SearchIcon as
|
|
104
|
-
import { ClearIcon as
|
|
105
|
-
import { InfoIcon as
|
|
106
|
-
const
|
|
107
|
-
const { viewMode: t } = Me(), { scrollMode: e } = De(), { virtualScrollRef: n, virtualScrollableElementRef: r, pageScrollElementRef: o } = nt(), { setFocusedPage: s } = ue(), a = M(), { columnCount: d } =
|
|
83
|
+
import { appConsole as hr } from "./utils/appConsole.js";
|
|
84
|
+
import { FileUploadTool as gn } from "./components/layout/toolbar/FileUploadTool.js";
|
|
85
|
+
import { DarkModeTool as fr } from "./components/layout/toolbar/DarkModeTool.js";
|
|
86
|
+
import { ThreeDotIcon as mr } from "./components/icons/ThreeDotIcon.js";
|
|
87
|
+
import { c as gr, u as Lt, P as je, a as Ge, b as Et, k as vr, e as wr, i as _r } from "./index-c9a2990a.js";
|
|
88
|
+
import { D as br, u as ut } from "./index-808ea7bf.js";
|
|
89
|
+
import { a as Tr, h as Cr, u as Pr, F as yr, b as Ir, G as Je } from "./index-a48ec088.js";
|
|
90
|
+
import { CloseIcon as Sr } from "./components/icons/CloseIcon.js";
|
|
91
|
+
import { DocumentProperties as xr } from "./components/layout/toolbar/DocumentProperties.js";
|
|
92
|
+
import { RotateTool as Rr } from "./components/layout/toolbar/RotateTool.js";
|
|
93
|
+
import { ViewModeTool as Lr } from "./components/layout/toolbar/ViewModeTool.js";
|
|
94
|
+
import { ScrollModeTool as Er } from "./components/layout/toolbar/ScrollModeTool.js";
|
|
95
|
+
import { FileDownloadDefaultIcon as Nr } from "./components/icons/FileDownloadDefaultIcon.js";
|
|
96
|
+
import { PrintDefaultTool as Or } from "./components/icons/PrintDefaultIcon.js";
|
|
97
|
+
import { FullScreenTool as vn } from "./components/layout/toolbar/FullScreenTool.js";
|
|
98
|
+
import { GoToDownIcon as wn } from "./components/icons/GoToDownIcon.js";
|
|
99
|
+
import { SelectionModeTool as Dr } from "./components/layout/toolbar/SelectionModeTool.js";
|
|
100
|
+
import { ZoomInIcon as zr } from "./components/icons/ZoomInIcon.js";
|
|
101
|
+
import { ZoomOutIcon as Ar } from "./components/icons/ZoomOutIcon.js";
|
|
102
|
+
import { isZoomOutDisabled as Fr, isZoomInDisabled as kr } from "./utils/zoom.js";
|
|
103
|
+
import { SearchIcon as _n } from "./components/icons/SearchIcon.js";
|
|
104
|
+
import { ClearIcon as Wr } from "./components/icons/ClearIcon.js";
|
|
105
|
+
import { InfoIcon as Vt } from "./components/icons/InfoIcon.js";
|
|
106
|
+
const bn = () => {
|
|
107
|
+
const { viewMode: t } = Me(), { scrollMode: e } = De(), { virtualScrollRef: n, virtualScrollableElementRef: r, pageScrollElementRef: o } = nt(), { setFocusedPage: s } = ue(), a = M(), { columnCount: d } = hn(), { widths: c, heights: m } = Ze(), g = M(e), C = M(t), u = M(d), { targetScrollPage: T } = fn();
|
|
108
108
|
z(() => {
|
|
109
109
|
n != null && n.scrollToItem && (a.current = n);
|
|
110
110
|
}, [n]), z(() => {
|
|
111
111
|
g.current = e, C.current = t;
|
|
112
112
|
}, [e, t]);
|
|
113
|
-
const
|
|
114
|
-
(
|
|
113
|
+
const b = N(
|
|
114
|
+
(_, y) => {
|
|
115
115
|
if (!o)
|
|
116
116
|
return;
|
|
117
|
-
const p = Math.ceil(
|
|
118
|
-
if (
|
|
119
|
-
const
|
|
117
|
+
const p = Math.ceil(_ / 2) * 2 - 1;
|
|
118
|
+
if (_ === p + 1) {
|
|
119
|
+
const h = {
|
|
120
120
|
left: c[p],
|
|
121
121
|
top: 0
|
|
122
122
|
};
|
|
123
123
|
return new Promise(
|
|
124
|
-
(l) => dt(o,
|
|
124
|
+
(l) => dt(o, h, l)
|
|
125
125
|
);
|
|
126
126
|
}
|
|
127
|
-
const
|
|
127
|
+
const f = {
|
|
128
128
|
left: 0,
|
|
129
129
|
top: 0
|
|
130
130
|
};
|
|
131
131
|
return o == null ? void 0 : o.scrollTo({
|
|
132
|
-
...
|
|
133
|
-
behavior:
|
|
132
|
+
...f,
|
|
133
|
+
behavior: y
|
|
134
134
|
});
|
|
135
135
|
},
|
|
136
136
|
[o, c, dt]
|
|
@@ -140,107 +140,107 @@ const Tn = () => {
|
|
|
140
140
|
}, [e, t]), z(() => {
|
|
141
141
|
u.current = d;
|
|
142
142
|
}, [d]), { scrollToPage: N(
|
|
143
|
-
(
|
|
144
|
-
s(
|
|
145
|
-
const p =
|
|
146
|
-
let
|
|
147
|
-
if (C.current === Ne.DUAL_PAGE && g.current ===
|
|
148
|
-
_
|
|
143
|
+
(_, y = "smooth") => {
|
|
144
|
+
s(_);
|
|
145
|
+
const p = _ - 1;
|
|
146
|
+
let f = p, h = 0;
|
|
147
|
+
if (C.current === Ne.DUAL_PAGE && g.current === re.PAGE_SCROLLING) {
|
|
148
|
+
b(_, y);
|
|
149
149
|
return;
|
|
150
150
|
}
|
|
151
|
-
if (g.current ===
|
|
152
|
-
s(
|
|
151
|
+
if (g.current === re.PAGE_SCROLLING) {
|
|
152
|
+
s(_);
|
|
153
153
|
return;
|
|
154
154
|
}
|
|
155
155
|
if (!a.current || !r)
|
|
156
156
|
return;
|
|
157
157
|
const l = r;
|
|
158
|
-
|
|
158
|
+
y === "smooth" && (T.current = _);
|
|
159
159
|
const { columnsWidth: v, rowsHeight: w } = xt(
|
|
160
160
|
{ widths: c, heights: m },
|
|
161
161
|
d
|
|
162
162
|
);
|
|
163
|
-
if (g.current ===
|
|
164
|
-
|
|
165
|
-
const S = ke(v,
|
|
163
|
+
if (g.current === re.HORIZONTAL_SCROLLING) {
|
|
164
|
+
h = p;
|
|
165
|
+
const S = ke(v, h), L = {
|
|
166
166
|
left: Math.floor(S),
|
|
167
167
|
top: 0
|
|
168
168
|
};
|
|
169
169
|
return l.scrollTo({
|
|
170
170
|
...L,
|
|
171
|
-
behavior:
|
|
171
|
+
behavior: y
|
|
172
172
|
});
|
|
173
173
|
}
|
|
174
174
|
if (C.current === Ne.DUAL_PAGE) {
|
|
175
|
-
|
|
176
|
-
const L = ke(v,
|
|
175
|
+
h = p % 2, f = Math.floor(p / 2);
|
|
176
|
+
const L = ke(v, h), O = ke(w, f), D = {
|
|
177
177
|
left: Math.floor(L),
|
|
178
178
|
top: Math.floor(O)
|
|
179
179
|
};
|
|
180
180
|
return l.scrollTo({
|
|
181
181
|
...D,
|
|
182
|
-
behavior:
|
|
182
|
+
behavior: y
|
|
183
183
|
});
|
|
184
184
|
}
|
|
185
|
-
const I = ke(w,
|
|
185
|
+
const I = ke(w, f), x = {
|
|
186
186
|
left: 0,
|
|
187
187
|
top: Math.floor(I)
|
|
188
188
|
};
|
|
189
189
|
return l.scrollTo({
|
|
190
190
|
...x,
|
|
191
|
-
behavior:
|
|
191
|
+
behavior: y
|
|
192
192
|
});
|
|
193
193
|
},
|
|
194
194
|
[
|
|
195
195
|
r,
|
|
196
196
|
d,
|
|
197
|
-
|
|
197
|
+
b,
|
|
198
198
|
s,
|
|
199
199
|
dt,
|
|
200
200
|
m,
|
|
201
201
|
c
|
|
202
202
|
]
|
|
203
203
|
) };
|
|
204
|
-
},
|
|
205
|
-
const [e, n] = $(t), [r, o] = $(0), { scrollToPage: s } =
|
|
206
|
-
(
|
|
207
|
-
if (!/^[0-9]*$/g.test(
|
|
204
|
+
}, Mr = (t = 1) => {
|
|
205
|
+
const [e, n] = $(t), [r, o] = $(0), { scrollToPage: s } = bn(), a = M(1), { viewMode: d } = Me(), { scrollMode: c } = De(), { widths: m } = Ze(), { pagesRef: g } = Te(), C = Rt(e, 100), u = N(
|
|
206
|
+
(f) => {
|
|
207
|
+
if (!/^[0-9]*$/g.test(f.toString()) || !f)
|
|
208
208
|
return { success: !1, currentPage: a.current };
|
|
209
|
-
const l = +
|
|
210
|
-
return l < 0 || l > r ? { success: !1, currentPage: a.current } : (n(l), a.current = l, { success: !0, currentPage: +
|
|
209
|
+
const l = +f;
|
|
210
|
+
return l < 0 || l > r ? { success: !1, currentPage: a.current } : (n(l), a.current = l, { success: !0, currentPage: +f });
|
|
211
211
|
},
|
|
212
212
|
[r]
|
|
213
|
-
),
|
|
214
|
-
(
|
|
215
|
-
const
|
|
216
|
-
return
|
|
213
|
+
), T = N(u, [u]), b = N(
|
|
214
|
+
(f) => {
|
|
215
|
+
const h = u(f);
|
|
216
|
+
return h.success && s(h.currentPage), h;
|
|
217
217
|
},
|
|
218
218
|
[u, s]
|
|
219
|
-
),
|
|
220
|
-
const
|
|
221
|
-
if (!g ||
|
|
219
|
+
), P = N((f) => {
|
|
220
|
+
const h = f % 2 === 1;
|
|
221
|
+
if (!g || h)
|
|
222
222
|
return !1;
|
|
223
|
-
const l =
|
|
223
|
+
const l = h ? m[f] : m[f - 1], v = h ? m[f + 1] : m[f];
|
|
224
224
|
return d === Ne.DUAL_PAGE && l + v < g.clientWidth;
|
|
225
|
-
}, [d, m, g, r]),
|
|
226
|
-
let
|
|
227
|
-
|
|
228
|
-
}, [
|
|
229
|
-
if (
|
|
225
|
+
}, [d, m, g, r]), _ = N(() => {
|
|
226
|
+
let f = e - 1;
|
|
227
|
+
P(f) && (f = e - 2), b(f);
|
|
228
|
+
}, [b, e, d, c, P]), y = k(() => d === Ne.DUAL_PAGE && c === re.PAGE_SCROLLING ? e === r - 1 : e === r, [e, r, d, c]), p = N(() => {
|
|
229
|
+
if (y)
|
|
230
230
|
return;
|
|
231
|
-
let
|
|
232
|
-
|
|
233
|
-
}, [
|
|
231
|
+
let f = e + 1;
|
|
232
|
+
P(f) && (f = e + 2), b(f);
|
|
233
|
+
}, [b, e, P, d, c, y]);
|
|
234
234
|
return {
|
|
235
235
|
focusedPage: C,
|
|
236
236
|
totalPages: r,
|
|
237
|
-
setFocusedPage:
|
|
237
|
+
setFocusedPage: T,
|
|
238
238
|
setTotalPages: o,
|
|
239
239
|
nextPage: p,
|
|
240
|
-
prevPage:
|
|
241
|
-
goToPage:
|
|
240
|
+
prevPage: _,
|
|
241
|
+
goToPage: b
|
|
242
242
|
};
|
|
243
|
-
},
|
|
243
|
+
}, Tn = Ve({
|
|
244
244
|
focusedPage: 0,
|
|
245
245
|
setFocusedPage: (t) => {
|
|
246
246
|
},
|
|
@@ -253,16 +253,16 @@ const Tn = () => {
|
|
|
253
253
|
nextPage: () => {
|
|
254
254
|
}
|
|
255
255
|
}), ue = () => {
|
|
256
|
-
const t = Be(
|
|
257
|
-
return typeof (t == null ? void 0 : t.focusedPage) > "u" &&
|
|
258
|
-
},
|
|
259
|
-
const { pdf: e } =
|
|
256
|
+
const t = Be(Tn);
|
|
257
|
+
return typeof (t == null ? void 0 : t.focusedPage) > "u" && hr.error("Please use this hooks inside children component of RPProvider"), t;
|
|
258
|
+
}, hc = ({ children: t }) => {
|
|
259
|
+
const { pdf: e } = oe(), { setCurrentPage: n } = xo(), { focusedPage: r, totalPages: o, setFocusedPage: s, setTotalPages: a, goToPage: d, nextPage: c, prevPage: m } = Mr();
|
|
260
260
|
return z(() => {
|
|
261
261
|
e != null && e.numPages && (a(e.numPages), s(1));
|
|
262
262
|
}, [e, a, s]), z(() => {
|
|
263
263
|
n(r);
|
|
264
264
|
}, [r, n]), /* @__PURE__ */ i(
|
|
265
|
-
|
|
265
|
+
Tn.Provider,
|
|
266
266
|
{
|
|
267
267
|
value: {
|
|
268
268
|
focusedPage: r,
|
|
@@ -276,8 +276,8 @@ const Tn = () => {
|
|
|
276
276
|
children: t
|
|
277
277
|
}
|
|
278
278
|
);
|
|
279
|
-
},
|
|
280
|
-
const { pdf: t, pages: e } =
|
|
279
|
+
}, Hr = () => {
|
|
280
|
+
const { pdf: t, pages: e } = oe(), [n, r] = $({
|
|
281
281
|
loadedPages: 0,
|
|
282
282
|
totalPages: 0,
|
|
283
283
|
percentage: 0
|
|
@@ -285,19 +285,19 @@ const Tn = () => {
|
|
|
285
285
|
z(() => {
|
|
286
286
|
u.current;
|
|
287
287
|
}, [u]);
|
|
288
|
-
const
|
|
288
|
+
const T = N(() => {
|
|
289
289
|
document.documentElement.classList.remove("rp-print-html-printing"), document.body.classList.remove("rp-print-body-printing");
|
|
290
290
|
const l = document.querySelector(".rp-print-zone");
|
|
291
291
|
l && l.remove();
|
|
292
|
-
}, []),
|
|
292
|
+
}, []), b = N(() => {
|
|
293
293
|
u.current = !1, s(!1), d(!1), m(null), C(void 0), r({
|
|
294
294
|
loadedPages: 0,
|
|
295
295
|
totalPages: 0,
|
|
296
296
|
percentage: 0
|
|
297
297
|
});
|
|
298
|
-
}, []),
|
|
298
|
+
}, []), P = () => {
|
|
299
299
|
u.current = !0;
|
|
300
|
-
},
|
|
300
|
+
}, _ = async ({
|
|
301
301
|
scratchCanvas: l,
|
|
302
302
|
pdfDocument: v,
|
|
303
303
|
pageNumber: w,
|
|
@@ -307,10 +307,10 @@ const Tn = () => {
|
|
|
307
307
|
printAnnotationStoragePromise: L
|
|
308
308
|
}) => {
|
|
309
309
|
if (u.current) {
|
|
310
|
-
|
|
310
|
+
b();
|
|
311
311
|
return;
|
|
312
312
|
}
|
|
313
|
-
const O = x /
|
|
313
|
+
const O = x / Oo.PDF;
|
|
314
314
|
l.width = Math.floor(I.width * O), l.height = Math.floor(I.height * O);
|
|
315
315
|
const D = l.getContext("2d");
|
|
316
316
|
D.save(), D.fillStyle = "rgb(255, 255, 255)", D.fillRect(0, 0, l.width, l.height), D.restore();
|
|
@@ -319,7 +319,7 @@ const Tn = () => {
|
|
|
319
319
|
L
|
|
320
320
|
]);
|
|
321
321
|
if (u.current) {
|
|
322
|
-
|
|
322
|
+
b();
|
|
323
323
|
return;
|
|
324
324
|
}
|
|
325
325
|
const R = {
|
|
@@ -327,16 +327,16 @@ const Tn = () => {
|
|
|
327
327
|
transform: [O, 0, 0, O, 0, 0],
|
|
328
328
|
viewport: F.getViewport({ scale: 1, rotation: I.rotation }),
|
|
329
329
|
intent: "print",
|
|
330
|
-
annotationMode:
|
|
330
|
+
annotationMode: Do.ENABLE_STORAGE,
|
|
331
331
|
optionalContentConfigPromise: S,
|
|
332
332
|
printAnnotationStorage: E
|
|
333
333
|
};
|
|
334
334
|
try {
|
|
335
335
|
return F.render(R).promise;
|
|
336
336
|
} catch (A) {
|
|
337
|
-
throw A instanceof
|
|
337
|
+
throw A instanceof zo || console.error(A), A;
|
|
338
338
|
}
|
|
339
|
-
},
|
|
339
|
+
}, y = N(() => {
|
|
340
340
|
const l = window.print;
|
|
341
341
|
return new Promise((v) => {
|
|
342
342
|
const w = (S) => {
|
|
@@ -363,7 +363,7 @@ const Tn = () => {
|
|
|
363
363
|
});
|
|
364
364
|
}).catch(() => {
|
|
365
365
|
}), w.appendChild(v), w;
|
|
366
|
-
},
|
|
366
|
+
}, f = (l, v) => {
|
|
367
367
|
const w = document.createElement("div");
|
|
368
368
|
w.classList.add("rp-print-zone");
|
|
369
369
|
const I = document.createElement("style"), x = v.get(1);
|
|
@@ -372,11 +372,11 @@ const Tn = () => {
|
|
|
372
372
|
I.innerHTML = `@page { size: ${S}px ${L}px }`;
|
|
373
373
|
}
|
|
374
374
|
return w.appendChild(I), w.append(...l), w;
|
|
375
|
-
},
|
|
375
|
+
}, h = N(
|
|
376
376
|
async (l) => {
|
|
377
377
|
if (!t)
|
|
378
378
|
return;
|
|
379
|
-
|
|
379
|
+
b();
|
|
380
380
|
const v = l && "visibleDefaultProgress" in l ? l : void 0;
|
|
381
381
|
(v == null ? void 0 : v.visibleDefaultProgress) !== void 0 ? C(v.visibleDefaultProgress) : C(!0);
|
|
382
382
|
const w = document.createElement("canvas"), I = [];
|
|
@@ -387,11 +387,11 @@ const Tn = () => {
|
|
|
387
387
|
), O = e.size;
|
|
388
388
|
for (const [F, E] of e) {
|
|
389
389
|
if (u.current) {
|
|
390
|
-
|
|
390
|
+
b();
|
|
391
391
|
return;
|
|
392
392
|
}
|
|
393
393
|
const R = E.page.getViewport({ scale: 1 });
|
|
394
|
-
if (await
|
|
394
|
+
if (await _({
|
|
395
395
|
scratchCanvas: w,
|
|
396
396
|
pdfDocument: t,
|
|
397
397
|
pageNumber: F,
|
|
@@ -400,49 +400,49 @@ const Tn = () => {
|
|
|
400
400
|
optionalContentConfigPromise: S,
|
|
401
401
|
printAnnotationStoragePromise: L
|
|
402
402
|
}), u.current) {
|
|
403
|
-
|
|
403
|
+
b();
|
|
404
404
|
return;
|
|
405
405
|
}
|
|
406
406
|
const A = await p(w);
|
|
407
407
|
I.push(A);
|
|
408
|
-
const
|
|
408
|
+
const q = parseFloat((I.length / O * 100).toFixed(2));
|
|
409
409
|
r({
|
|
410
410
|
loadedPages: F,
|
|
411
411
|
totalPages: O,
|
|
412
|
-
percentage:
|
|
412
|
+
percentage: q
|
|
413
413
|
});
|
|
414
414
|
}
|
|
415
415
|
if (u.current) {
|
|
416
|
-
|
|
416
|
+
b();
|
|
417
417
|
return;
|
|
418
418
|
}
|
|
419
|
-
const D =
|
|
420
|
-
document.body.appendChild(D), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), s(!0), await
|
|
419
|
+
const D = f(I, e);
|
|
420
|
+
document.body.appendChild(D), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), s(!0), await y();
|
|
421
421
|
} catch (x) {
|
|
422
422
|
d(!0), x instanceof Error && m(x);
|
|
423
423
|
} finally {
|
|
424
424
|
w.height = 0, w.width = 0;
|
|
425
425
|
}
|
|
426
426
|
},
|
|
427
|
-
[t, e, u,
|
|
427
|
+
[t, e, u, b, f, y]
|
|
428
428
|
);
|
|
429
429
|
return z(() => {
|
|
430
430
|
const l = () => {
|
|
431
|
-
|
|
431
|
+
b(), T();
|
|
432
432
|
};
|
|
433
433
|
return window.addEventListener("afterprint", l, !0), () => {
|
|
434
434
|
window.removeEventListener("afterprint", l, !0);
|
|
435
435
|
};
|
|
436
|
-
}, [
|
|
437
|
-
print:
|
|
438
|
-
cancel:
|
|
436
|
+
}, [T, b]), {
|
|
437
|
+
print: h,
|
|
438
|
+
cancel: P,
|
|
439
439
|
progress: n,
|
|
440
440
|
isComplete: o,
|
|
441
441
|
isError: a,
|
|
442
442
|
error: c,
|
|
443
443
|
showDefaultProgress: g
|
|
444
444
|
};
|
|
445
|
-
},
|
|
445
|
+
}, Cn = Ve({
|
|
446
446
|
print: async () => {
|
|
447
447
|
},
|
|
448
448
|
cancel: () => {
|
|
@@ -459,50 +459,50 @@ const Tn = () => {
|
|
|
459
459
|
console.error("Error in setOnError callback:", e);
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
|
-
}),
|
|
463
|
-
const [e, n] = $(null), [r, o] = $(null), { print: s, cancel: a, progress: d, isComplete: c, isError: m, error: g, showDefaultProgress: C } =
|
|
464
|
-
|
|
465
|
-
}, []),
|
|
466
|
-
g &&
|
|
467
|
-
},
|
|
468
|
-
(
|
|
469
|
-
n(() =>
|
|
462
|
+
}), fc = ({ children: t }) => {
|
|
463
|
+
const [e, n] = $(null), [r, o] = $(null), { print: s, cancel: a, progress: d, isComplete: c, isError: m, error: g, showDefaultProgress: C } = Hr(), u = N((y) => {
|
|
464
|
+
y && typeof y == "function" && o(() => y);
|
|
465
|
+
}, []), T = (y) => {
|
|
466
|
+
g && y(g);
|
|
467
|
+
}, b = N(
|
|
468
|
+
(y) => {
|
|
469
|
+
n(() => y);
|
|
470
470
|
},
|
|
471
471
|
[d, e]
|
|
472
472
|
);
|
|
473
473
|
z(() => {
|
|
474
|
-
c && r &&
|
|
474
|
+
c && r && P();
|
|
475
475
|
}, [c, r]), z(() => {
|
|
476
|
-
m &&
|
|
477
|
-
console.error(
|
|
476
|
+
m && T((y) => {
|
|
477
|
+
console.error(y);
|
|
478
478
|
});
|
|
479
479
|
}, [m]), z(() => {
|
|
480
480
|
d && e && e(d);
|
|
481
481
|
}, [d, e]);
|
|
482
|
-
const
|
|
482
|
+
const P = () => {
|
|
483
483
|
r && (r(), o(null));
|
|
484
|
-
},
|
|
484
|
+
}, _ = {
|
|
485
485
|
print: s,
|
|
486
486
|
cancel: a,
|
|
487
|
-
setOnProgress:
|
|
487
|
+
setOnProgress: b,
|
|
488
488
|
setOnComplete: u,
|
|
489
|
-
setOnError:
|
|
489
|
+
setOnError: T,
|
|
490
490
|
progress: d,
|
|
491
491
|
showDefaultProgress: C
|
|
492
492
|
};
|
|
493
|
-
return /* @__PURE__ */ i(
|
|
493
|
+
return /* @__PURE__ */ i(Cn.Provider, { value: _, children: t });
|
|
494
494
|
}, it = () => {
|
|
495
|
-
const t = Be(
|
|
495
|
+
const t = Be(Cn);
|
|
496
496
|
if (!t)
|
|
497
497
|
throw new Error("usePrintContext must be used within a PrintProvider");
|
|
498
498
|
return t;
|
|
499
|
-
},
|
|
500
|
-
const [t, e] = $({}), { pages: n } =
|
|
499
|
+
}, $r = () => {
|
|
500
|
+
const [t, e] = $({}), { pages: n } = oe(), r = k(() => Object.keys(t).length, [t]), o = N(
|
|
501
501
|
(a) => {
|
|
502
502
|
if (!n.size)
|
|
503
503
|
return;
|
|
504
504
|
const d = a > n.size ? n.size : a, m = Array.from(n.values()).slice(0, d).map((g) => {
|
|
505
|
-
const { thumbnailViewport: C, scale: u } =
|
|
505
|
+
const { thumbnailViewport: C, scale: u } = pr(g.page, g.defaultRotation);
|
|
506
506
|
return {
|
|
507
507
|
scale: u,
|
|
508
508
|
page: g.page,
|
|
@@ -537,7 +537,7 @@ const Tn = () => {
|
|
|
537
537
|
[n]
|
|
538
538
|
);
|
|
539
539
|
return { thumbnailPages: t, addPage: s, addToPage: o, thumbnailLength: r };
|
|
540
|
-
},
|
|
540
|
+
}, Pn = Ve({
|
|
541
541
|
thumbnailPages: {},
|
|
542
542
|
addPage: (t) => {
|
|
543
543
|
},
|
|
@@ -547,48 +547,48 @@ const Tn = () => {
|
|
|
547
547
|
setActive: (t) => {
|
|
548
548
|
},
|
|
549
549
|
active: !1
|
|
550
|
-
}),
|
|
550
|
+
}), yn = () => Be(Pn), mc = ({
|
|
551
551
|
children: t,
|
|
552
552
|
initialThumbnailsVisible: e
|
|
553
553
|
}) => {
|
|
554
|
-
const { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: s } =
|
|
554
|
+
const { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: s } = $r(), [a, d] = $(e);
|
|
555
555
|
return /* @__PURE__ */ i(
|
|
556
|
-
|
|
556
|
+
Pn.Provider,
|
|
557
557
|
{
|
|
558
558
|
value: { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: s, active: a, setActive: d },
|
|
559
559
|
children: t
|
|
560
560
|
}
|
|
561
561
|
);
|
|
562
562
|
}, qr = (t = {}, e = "") => {
|
|
563
|
-
const [n, r] = $(e), [o, s] = $(!1), { pdf: a, pages: d } =
|
|
563
|
+
const [n, r] = $(e), [o, s] = $(!1), { pdf: a, pages: d } = oe(), { widths: c, heights: m } = Ze(), g = M(!n), { currentZoom: C } = tt(), [u, T] = $([]), { setFocusedPage: b } = ue(), { columnCount: P } = Me(), { pageRotate: _ } = ot(), [y, p] = $(0), { pageScrollElementRef: f, virtualScrollableElementRef: h } = nt(), { scrollMode: l } = De(), { pagesRef: v } = Te(), w = M({}), I = M(0), x = k(() => y === 0 ? null : u[y - 1], [y, u]), S = k(() => u.length, [u]), L = N(
|
|
564
564
|
(E) => {
|
|
565
565
|
if (E === 0)
|
|
566
566
|
return;
|
|
567
567
|
const R = u[E - 1];
|
|
568
568
|
if (!R || !d)
|
|
569
569
|
return;
|
|
570
|
-
const A =
|
|
570
|
+
const A = h || f;
|
|
571
571
|
if (!A || !v)
|
|
572
572
|
return;
|
|
573
|
-
const
|
|
574
|
-
if (l ===
|
|
573
|
+
const q = d.get(R.page);
|
|
574
|
+
if (l === re.PAGE_SCROLLING && b(R.page), !q)
|
|
575
575
|
return;
|
|
576
576
|
let H = 0, U = 0;
|
|
577
|
-
if (l ===
|
|
578
|
-
const J = R.page - 1, ee =
|
|
577
|
+
if (l === re.VERTICAL_SCROLLING) {
|
|
578
|
+
const J = R.page - 1, ee = P, ve = J % ee, we = Math.floor(J / ee);
|
|
579
579
|
H = ke(m, we), U = ke(c, ve);
|
|
580
580
|
}
|
|
581
|
-
l ===
|
|
581
|
+
l === re.HORIZONTAL_SCROLLING && (U = c.slice(0, R.page - 1).reduce((J, ee) => J + ee, 0));
|
|
582
582
|
const X = {
|
|
583
583
|
height: m[R.page - 1],
|
|
584
584
|
width: c[R.page - 1]
|
|
585
|
-
}, V =
|
|
585
|
+
}, V = _[R.page], { leftInPage: ie, topInPage: G } = ur(
|
|
586
586
|
X,
|
|
587
587
|
v,
|
|
588
588
|
R.rect,
|
|
589
589
|
C,
|
|
590
590
|
V
|
|
591
|
-
), Z = U + ie, Y = H +
|
|
591
|
+
), Z = U + ie, Y = H + G, te = {
|
|
592
592
|
left: Math.max(Z, 0),
|
|
593
593
|
top: Math.max(Y, 0)
|
|
594
594
|
};
|
|
@@ -599,19 +599,19 @@ const Tn = () => {
|
|
|
599
599
|
},
|
|
600
600
|
[
|
|
601
601
|
d,
|
|
602
|
-
|
|
602
|
+
b,
|
|
603
603
|
c,
|
|
604
604
|
m,
|
|
605
605
|
l,
|
|
606
|
-
f,
|
|
607
606
|
h,
|
|
607
|
+
f,
|
|
608
608
|
v,
|
|
609
609
|
u
|
|
610
610
|
]
|
|
611
611
|
);
|
|
612
612
|
z(() => {
|
|
613
|
-
|
|
614
|
-
}, [
|
|
613
|
+
y && L(y);
|
|
614
|
+
}, [y]);
|
|
615
615
|
const O = N(() => {
|
|
616
616
|
p((E) => {
|
|
617
617
|
let R;
|
|
@@ -626,33 +626,33 @@ const Tn = () => {
|
|
|
626
626
|
if (!E)
|
|
627
627
|
return {};
|
|
628
628
|
const R = E.numPages, A = {};
|
|
629
|
-
for (let
|
|
629
|
+
for (let q = 1; q <= R; q++) {
|
|
630
630
|
if (g.current)
|
|
631
631
|
throw "close pop over";
|
|
632
|
-
const H = await E.getPage(
|
|
633
|
-
A[
|
|
632
|
+
const H = await E.getPage(q);
|
|
633
|
+
A[q.toString()] = await H.getTextContent();
|
|
634
634
|
}
|
|
635
635
|
return A;
|
|
636
636
|
}, []);
|
|
637
637
|
return z(() => {
|
|
638
638
|
if (!n) {
|
|
639
|
-
g.current = !0,
|
|
639
|
+
g.current = !0, T([]), p(0);
|
|
640
640
|
return;
|
|
641
641
|
}
|
|
642
|
-
g.current = !1, s(!0),
|
|
642
|
+
g.current = !1, s(!0), T([]), p(0), F(a).then((E) => {
|
|
643
643
|
w.current = E;
|
|
644
|
-
const A = Object.keys(E).reduce((
|
|
645
|
-
const U =
|
|
644
|
+
const A = Object.keys(E).reduce((q, H) => {
|
|
645
|
+
const U = _o(
|
|
646
646
|
[n],
|
|
647
647
|
E[H],
|
|
648
648
|
Number(H) - 1,
|
|
649
649
|
t
|
|
650
650
|
).map((X, V) => ({ ...X, page: Number(H), pageMatchIdx: V }));
|
|
651
|
-
return [...
|
|
651
|
+
return [...q, ...U];
|
|
652
652
|
}, []);
|
|
653
|
-
|
|
653
|
+
T(A), p(A.length ? 1 : 0);
|
|
654
654
|
}).catch(() => {
|
|
655
|
-
|
|
655
|
+
T([]), p(0);
|
|
656
656
|
}).finally(() => s(!1));
|
|
657
657
|
}, [n, F, a, t]), {
|
|
658
658
|
search: n,
|
|
@@ -660,13 +660,13 @@ const Tn = () => {
|
|
|
660
660
|
loading: o,
|
|
661
661
|
matches: u,
|
|
662
662
|
totalMatches: S,
|
|
663
|
-
currentMatchPosition:
|
|
663
|
+
currentMatchPosition: y,
|
|
664
664
|
currentMatch: x,
|
|
665
665
|
nextMatch: O,
|
|
666
666
|
prevMatch: D,
|
|
667
667
|
setCurrentMatchPosition: p
|
|
668
668
|
};
|
|
669
|
-
},
|
|
669
|
+
}, In = Ve({
|
|
670
670
|
search: "",
|
|
671
671
|
setSearch: (t) => {
|
|
672
672
|
},
|
|
@@ -682,7 +682,7 @@ const Tn = () => {
|
|
|
682
682
|
searchOptions: {},
|
|
683
683
|
setSearchOptions: (t) => t,
|
|
684
684
|
setCurrentMatchPosition: (t) => t
|
|
685
|
-
}),
|
|
685
|
+
}), gc = ({
|
|
686
686
|
children: t,
|
|
687
687
|
initialSearch: e
|
|
688
688
|
}) => {
|
|
@@ -696,10 +696,10 @@ const Tn = () => {
|
|
|
696
696
|
matches: g,
|
|
697
697
|
nextMatch: C,
|
|
698
698
|
prevMatch: u,
|
|
699
|
-
setCurrentMatchPosition:
|
|
699
|
+
setCurrentMatchPosition: T
|
|
700
700
|
} = qr(n, e);
|
|
701
701
|
return /* @__PURE__ */ i(
|
|
702
|
-
|
|
702
|
+
In.Provider,
|
|
703
703
|
{
|
|
704
704
|
value: {
|
|
705
705
|
searchOptions: n,
|
|
@@ -713,15 +713,15 @@ const Tn = () => {
|
|
|
713
713
|
prevMatch: u,
|
|
714
714
|
search: m,
|
|
715
715
|
matches: g,
|
|
716
|
-
setCurrentMatchPosition:
|
|
716
|
+
setCurrentMatchPosition: T
|
|
717
717
|
},
|
|
718
718
|
children: t
|
|
719
719
|
}
|
|
720
720
|
);
|
|
721
|
-
}, Nt = () => Be(
|
|
721
|
+
}, Nt = () => Be(In), Sn = Ve(null), vc = ({ children: t }) => {
|
|
722
722
|
const e = M(!1), [n, r] = $([]), o = N((c) => {
|
|
723
723
|
r((m) => [...m, { id: c.page.pageNumber.toString(), data: c, priority: 0 }]);
|
|
724
|
-
}, []), s = k(() => new
|
|
724
|
+
}, []), s = k(() => new Io(o), [o]), { focusedPage: a } = ue(), d = N((c) => (e.current = !0, So(
|
|
725
725
|
c.data.page,
|
|
726
726
|
c.data.canvasElem,
|
|
727
727
|
c.data.options
|
|
@@ -742,9 +742,9 @@ const Tn = () => {
|
|
|
742
742
|
}) : (e.current = !1, r(s.peekAll()));
|
|
743
743
|
};
|
|
744
744
|
c();
|
|
745
|
-
}, [s, d, n]), /* @__PURE__ */ i(
|
|
746
|
-
},
|
|
747
|
-
const t = Be(
|
|
745
|
+
}, [s, d, n]), /* @__PURE__ */ i(Sn.Provider, { value: s, children: t });
|
|
746
|
+
}, xn = () => {
|
|
747
|
+
const t = Be(Sn);
|
|
748
748
|
if (!t)
|
|
749
749
|
throw new Error("RenderQueue not found");
|
|
750
750
|
return t;
|
|
@@ -763,21 +763,21 @@ const Tn = () => {
|
|
|
763
763
|
"rp-page-wrapper": "_rp-page-wrapper_ii91u_1",
|
|
764
764
|
"rp-page": "_rp-page_ii91u_1",
|
|
765
765
|
"rp-loader-wrapper": "_rp-loader-wrapper_ii91u_15"
|
|
766
|
-
},
|
|
767
|
-
const { pageNumber: e, onLoaded: n, onLoading: r } = t, o = M(null), { pages: s } =
|
|
766
|
+
}, Gr = (t) => {
|
|
767
|
+
const { pageNumber: e, onLoaded: n, onLoading: r } = t, o = M(null), { pages: s } = oe(), { pageRotate: a } = ot(), d = M(), { currentZoom: c } = tt(), { interactiveForm: m } = Pt(), g = xn(), C = M(`page-${e}`);
|
|
768
768
|
return z(() => {
|
|
769
769
|
if (!s || c === 0)
|
|
770
770
|
return;
|
|
771
771
|
const u = s.get(e);
|
|
772
772
|
if (o.current && u) {
|
|
773
|
-
const
|
|
774
|
-
|
|
775
|
-
const
|
|
776
|
-
|
|
773
|
+
const T = o.current;
|
|
774
|
+
T.hidden = !0;
|
|
775
|
+
const b = d.current;
|
|
776
|
+
b && b.cancel(), r && r(), g.enqueue(
|
|
777
777
|
C.current,
|
|
778
778
|
{
|
|
779
779
|
page: u.page,
|
|
780
|
-
canvasElem:
|
|
780
|
+
canvasElem: T,
|
|
781
781
|
options: {
|
|
782
782
|
scale: c,
|
|
783
783
|
rotate: a[e],
|
|
@@ -793,31 +793,31 @@ const Tn = () => {
|
|
|
793
793
|
g.removeQueue(C.current);
|
|
794
794
|
};
|
|
795
795
|
}, [s, e, a, c, r, n, g, m]), /* @__PURE__ */ i("canvas", { "data-rp": `page-${e}-canvas`, ref: o });
|
|
796
|
-
},
|
|
796
|
+
}, Ur = "_selecting_pu04o_10", Vr = "_markedContent_pu04o_27", _e = {
|
|
797
797
|
"rp-text-layer": "_rp-text-layer_pu04o_1",
|
|
798
|
-
selecting:
|
|
799
|
-
markedContent:
|
|
798
|
+
selecting: Ur,
|
|
799
|
+
markedContent: Vr,
|
|
800
800
|
"rp-text-layer-text": "_rp-text-layer-text_pu04o_46"
|
|
801
|
-
},
|
|
802
|
-
const { pageNumber: e } = t, { pages: n } =
|
|
801
|
+
}, Br = (t) => {
|
|
802
|
+
const { pageNumber: e } = t, { pages: n } = oe(), r = M(null), { matches: o, currentMatch: s } = Nt(), [a, d] = $(
|
|
803
803
|
[]
|
|
804
804
|
), c = M(), m = M(), g = M([]), C = k(() => o.filter((p) => p.pageIndex === e - 1), [o, e]), u = N(
|
|
805
|
-
(p,
|
|
806
|
-
if (
|
|
805
|
+
(p, f, h = !1) => {
|
|
806
|
+
if (h && bo(p, f), !C.length) {
|
|
807
807
|
g.current = [], d([]);
|
|
808
808
|
return;
|
|
809
809
|
}
|
|
810
|
-
const l =
|
|
810
|
+
const l = To(C, p, f);
|
|
811
811
|
d(l);
|
|
812
812
|
},
|
|
813
813
|
[C]
|
|
814
|
-
),
|
|
814
|
+
), T = M(), b = M(!1), P = N(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
|
|
815
815
|
z(() => ((() => {
|
|
816
|
-
if (
|
|
816
|
+
if (T.current)
|
|
817
817
|
return;
|
|
818
|
-
|
|
819
|
-
const { signal:
|
|
820
|
-
|
|
818
|
+
T.current = new AbortController();
|
|
819
|
+
const { signal: f } = T.current, h = () => {
|
|
820
|
+
P().forEach((v) => {
|
|
821
821
|
const w = v.querySelector(".endOfContent");
|
|
822
822
|
w && (v.appendChild(w), w.style.width = "", w.style.height = "", v.classList.remove(_e.selecting));
|
|
823
823
|
});
|
|
@@ -825,27 +825,27 @@ const Tn = () => {
|
|
|
825
825
|
document.addEventListener(
|
|
826
826
|
"pointerdown",
|
|
827
827
|
() => {
|
|
828
|
-
|
|
828
|
+
b.current = !0;
|
|
829
829
|
},
|
|
830
|
-
{ signal:
|
|
830
|
+
{ signal: f }
|
|
831
831
|
), document.addEventListener(
|
|
832
832
|
"pointerup",
|
|
833
833
|
() => {
|
|
834
|
-
|
|
834
|
+
b.current = !1, h();
|
|
835
835
|
},
|
|
836
|
-
{ signal:
|
|
836
|
+
{ signal: f }
|
|
837
837
|
), window.addEventListener(
|
|
838
838
|
"blur",
|
|
839
839
|
() => {
|
|
840
|
-
|
|
840
|
+
b.current = !1, h();
|
|
841
841
|
},
|
|
842
|
-
{ signal:
|
|
842
|
+
{ signal: f }
|
|
843
843
|
), document.addEventListener(
|
|
844
844
|
"keyup",
|
|
845
845
|
() => {
|
|
846
|
-
|
|
846
|
+
b.current || h();
|
|
847
847
|
},
|
|
848
|
-
{ signal:
|
|
848
|
+
{ signal: f }
|
|
849
849
|
);
|
|
850
850
|
let l = null;
|
|
851
851
|
document.addEventListener(
|
|
@@ -856,17 +856,17 @@ const Tn = () => {
|
|
|
856
856
|
if (!v)
|
|
857
857
|
return;
|
|
858
858
|
if (v.rangeCount === 0) {
|
|
859
|
-
|
|
859
|
+
h();
|
|
860
860
|
return;
|
|
861
861
|
}
|
|
862
862
|
const w = /* @__PURE__ */ new Set();
|
|
863
863
|
for (let E = 0; E < v.rangeCount; E++) {
|
|
864
864
|
const R = v.getRangeAt(E);
|
|
865
|
-
|
|
865
|
+
P().forEach((A) => {
|
|
866
866
|
R.intersectsNode(A) && !w.has(A) && w.add(A);
|
|
867
867
|
});
|
|
868
868
|
}
|
|
869
|
-
|
|
869
|
+
P().forEach((E) => {
|
|
870
870
|
if (w.has(E))
|
|
871
871
|
E.classList.add(_e.selecting);
|
|
872
872
|
else {
|
|
@@ -882,46 +882,46 @@ const Tn = () => {
|
|
|
882
882
|
), O = L == null ? void 0 : L.querySelector(".endOfContent");
|
|
883
883
|
O && L && (O.style.width = L.style.width, O.style.height = L.style.height, (F = S.parentElement) == null || F.insertBefore(O, S.nextSibling)), l = I.cloneRange();
|
|
884
884
|
},
|
|
885
|
-
{ signal:
|
|
885
|
+
{ signal: f }
|
|
886
886
|
);
|
|
887
887
|
})(), () => {
|
|
888
|
-
var
|
|
889
|
-
(
|
|
890
|
-
}), [
|
|
891
|
-
const
|
|
888
|
+
var f;
|
|
889
|
+
(f = T.current) == null || f.abort(), T.current = void 0;
|
|
890
|
+
}), [P]);
|
|
891
|
+
const _ = N(() => {
|
|
892
892
|
r.current && r.current.classList.add(_e.selecting);
|
|
893
|
-
}, []),
|
|
893
|
+
}, []), y = N(() => {
|
|
894
894
|
r.current && r.current.classList.remove(_e.selecting);
|
|
895
895
|
}, []);
|
|
896
896
|
return z(() => {
|
|
897
|
-
if (g.current.forEach((
|
|
898
|
-
|
|
897
|
+
if (g.current.forEach((h) => {
|
|
898
|
+
h.classList.remove("selected");
|
|
899
899
|
}), !a.length || !s || s.pageIndex !== e - 1)
|
|
900
900
|
return;
|
|
901
901
|
const p = C.findIndex(
|
|
902
|
-
(
|
|
902
|
+
(h) => JSON.stringify(h) === JSON.stringify(s)
|
|
903
903
|
);
|
|
904
904
|
if (p === -1)
|
|
905
905
|
return;
|
|
906
|
-
const
|
|
907
|
-
|
|
908
|
-
|
|
906
|
+
const f = a.filter((h) => h.index === p);
|
|
907
|
+
f.length && (g.current = f.map((h) => h.element), f.forEach((h) => {
|
|
908
|
+
h.element.classList.add("selected");
|
|
909
909
|
}));
|
|
910
910
|
}, [s, a, C]), z(() => {
|
|
911
911
|
const p = n.get(e);
|
|
912
912
|
if (!p || !r.current)
|
|
913
913
|
return;
|
|
914
|
-
const
|
|
915
|
-
return c.current && c.current.cancel(), p.page.getTextContent().then((
|
|
914
|
+
const f = r.current;
|
|
915
|
+
return c.current && c.current.cancel(), p.page.getTextContent().then((h) => {
|
|
916
916
|
const l = p.page.getViewport({ scale: 1 });
|
|
917
|
-
return c.current = new
|
|
917
|
+
return c.current = new No.TextLayer({
|
|
918
918
|
viewport: l,
|
|
919
|
-
textContentSource:
|
|
920
|
-
container:
|
|
921
|
-
}), m.current =
|
|
919
|
+
textContentSource: h,
|
|
920
|
+
container: f
|
|
921
|
+
}), m.current = h, f && (f.innerText = ""), c.current.render();
|
|
922
922
|
}).then(() => {
|
|
923
923
|
var w, I;
|
|
924
|
-
[].slice.call(
|
|
924
|
+
[].slice.call(f.children).forEach((x) => {
|
|
925
925
|
x.classList.add(_e["rp-text-layer-text"]), x.setAttribute("data-rp", "rp-text-layer-text");
|
|
926
926
|
});
|
|
927
927
|
const l = (w = c.current) == null ? void 0 : w.textDivs;
|
|
@@ -930,16 +930,16 @@ const Tn = () => {
|
|
|
930
930
|
v.className = "endOfContent", (I = r.current) == null || I.appendChild(v);
|
|
931
931
|
}).catch(() => {
|
|
932
932
|
}), () => {
|
|
933
|
-
var
|
|
934
|
-
(
|
|
933
|
+
var h;
|
|
934
|
+
(h = c.current) == null || h.cancel();
|
|
935
935
|
};
|
|
936
936
|
}, [n, e]), z(() => {
|
|
937
|
-
var
|
|
937
|
+
var h;
|
|
938
938
|
[].slice.call(r.current.children).forEach((l) => {
|
|
939
939
|
l.classList.add(_e["rp-text-layer-text"]);
|
|
940
940
|
});
|
|
941
|
-
const
|
|
942
|
-
|
|
941
|
+
const f = (h = c.current) == null ? void 0 : h.textDivs;
|
|
942
|
+
f && m.current && u(m.current, f, !0);
|
|
943
943
|
}, [u]), /* @__PURE__ */ i(
|
|
944
944
|
"div",
|
|
945
945
|
{
|
|
@@ -947,158 +947,160 @@ const Tn = () => {
|
|
|
947
947
|
"data-rp": `page-${e}-textLayer`,
|
|
948
948
|
className: _e["rp-text-layer"],
|
|
949
949
|
ref: r,
|
|
950
|
-
onMouseDown:
|
|
951
|
-
onMouseUp:
|
|
950
|
+
onMouseDown: _,
|
|
951
|
+
onMouseUp: y
|
|
952
952
|
}
|
|
953
953
|
);
|
|
954
|
-
},
|
|
954
|
+
}, Zr = {
|
|
955
955
|
"rp-annotation-layer": "_rp-annotation-layer_1udza_1"
|
|
956
956
|
};
|
|
957
|
-
let
|
|
958
|
-
const
|
|
959
|
-
const { pageNumber: e } = t, n = M(null), { pages: r, pdf: o } =
|
|
957
|
+
let jr = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
|
|
958
|
+
const Kr = (t) => {
|
|
959
|
+
const { pageNumber: e } = t, n = M(null), { pages: r, pdf: o } = oe(), { interactiveForm: s } = Pt(), a = M(), [d, c] = $(), { goToPage: m } = ue(), { scrollMode: g } = De(), { print: C } = it(), { download: u } = Bn(), T = k(() => r.get(e), [r, e]), b = k(() => T == null ? void 0 : T.page.getViewport(), [T]);
|
|
960
960
|
z(() => {
|
|
961
961
|
a.current && (a.current.div.replaceChildren(), a.current = void 0);
|
|
962
962
|
}, [o]), z(() => {
|
|
963
|
-
|
|
964
|
-
a.current = void 0, c(
|
|
963
|
+
T && T.page.getAnnotations().then((_) => {
|
|
964
|
+
a.current = void 0, c(_), n.current && (n.current.innerText = "");
|
|
965
965
|
});
|
|
966
|
-
}, [
|
|
967
|
-
const
|
|
968
|
-
(
|
|
969
|
-
!d || !o || (
|
|
970
|
-
var
|
|
971
|
-
((
|
|
972
|
-
})
|
|
966
|
+
}, [T]);
|
|
967
|
+
const P = N(
|
|
968
|
+
(_) => {
|
|
969
|
+
!d || !o || (Ko(_), Xo(_, o, d).then((y) => {
|
|
970
|
+
var p, f;
|
|
971
|
+
((p = y == null ? void 0 : y.data) == null ? void 0 : p.action) === "Print" ? C() : ((f = y == null ? void 0 : y.data) == null ? void 0 : f.action) === "SaveAs" && u();
|
|
972
|
+
}));
|
|
973
973
|
},
|
|
974
|
-
[o, d, g,
|
|
974
|
+
[o, d, g, C, u]
|
|
975
975
|
);
|
|
976
976
|
return z(() => {
|
|
977
|
-
if (!
|
|
977
|
+
if (!T || !d)
|
|
978
978
|
return;
|
|
979
|
-
const
|
|
979
|
+
const _ = T.page.getViewport();
|
|
980
980
|
if (a.current) {
|
|
981
981
|
a.current.update({
|
|
982
|
-
viewport:
|
|
982
|
+
viewport: _.clone({ dontFlip: !0 })
|
|
983
983
|
});
|
|
984
984
|
return;
|
|
985
985
|
}
|
|
986
|
-
const
|
|
987
|
-
for (const
|
|
988
|
-
const { annotationType:
|
|
989
|
-
switch (
|
|
986
|
+
const y = /* @__PURE__ */ new Map([]);
|
|
987
|
+
for (const h of d) {
|
|
988
|
+
const { annotationType: l } = h;
|
|
989
|
+
switch (l) {
|
|
990
990
|
case Mt.Link:
|
|
991
|
-
|
|
991
|
+
Yo(h);
|
|
992
992
|
break;
|
|
993
993
|
case Mt.Widget:
|
|
994
|
-
|
|
994
|
+
Qo(h, _, y);
|
|
995
995
|
break;
|
|
996
996
|
}
|
|
997
997
|
}
|
|
998
|
-
const
|
|
998
|
+
const p = new AbortController();
|
|
999
999
|
return (async () => {
|
|
1000
|
-
var
|
|
1001
|
-
a.current && (a.current.div.replaceChildren(), a.current = void 0), n.current && (n.current.innerText = ""), a.current = new
|
|
1000
|
+
var v;
|
|
1001
|
+
a.current && (a.current.div.replaceChildren(), a.current = void 0), n.current && (n.current.innerText = ""), a.current = new Ao({
|
|
1002
1002
|
div: n.current,
|
|
1003
1003
|
accessibilityManager: void 0,
|
|
1004
1004
|
annotationCanvasMap: void 0,
|
|
1005
1005
|
annotationEditorUIManager: void 0,
|
|
1006
1006
|
structTreeLayer: null,
|
|
1007
|
-
page:
|
|
1008
|
-
viewport:
|
|
1009
|
-
}), n.current &&
|
|
1010
|
-
const
|
|
1011
|
-
if (
|
|
1007
|
+
page: T.page,
|
|
1008
|
+
viewport: _.clone({ dontFlip: !0 })
|
|
1009
|
+
}), n.current && Ut(n.current, P);
|
|
1010
|
+
const h = await (o == null ? void 0 : o.hasJSActions()), l = await (o == null ? void 0 : o.getFieldObjects());
|
|
1011
|
+
if (p.signal.aborted)
|
|
1012
1012
|
throw "abort";
|
|
1013
|
-
return (
|
|
1013
|
+
return (v = a.current) == null ? void 0 : v.render({
|
|
1014
1014
|
annotations: d,
|
|
1015
1015
|
annotationStorage: o == null ? void 0 : o.annotationStorage,
|
|
1016
|
-
hasJSActions:
|
|
1017
|
-
fieldObjects:
|
|
1016
|
+
hasJSActions: h,
|
|
1017
|
+
fieldObjects: l,
|
|
1018
1018
|
div: n.current,
|
|
1019
|
-
viewport:
|
|
1020
|
-
page:
|
|
1021
|
-
imageResourcesPath:
|
|
1019
|
+
viewport: _.clone({ dontFlip: !0 }),
|
|
1020
|
+
page: T.page,
|
|
1021
|
+
imageResourcesPath: jr,
|
|
1022
1022
|
renderForms: s ?? !0,
|
|
1023
|
-
linkService: new
|
|
1023
|
+
linkService: new jo(o, m),
|
|
1024
1024
|
downloadManager: null,
|
|
1025
1025
|
enableScripting: !1
|
|
1026
1026
|
});
|
|
1027
1027
|
})().then(() => {
|
|
1028
|
-
n.current &&
|
|
1029
|
-
}).catch((
|
|
1030
|
-
if (
|
|
1031
|
-
throw
|
|
1028
|
+
n.current && Jo(n.current, P);
|
|
1029
|
+
}).catch((h) => {
|
|
1030
|
+
if (h !== "abort")
|
|
1031
|
+
throw h;
|
|
1032
|
+
}).finally(() => {
|
|
1033
|
+
a.current = void 0;
|
|
1032
1034
|
}), () => {
|
|
1033
|
-
|
|
1035
|
+
p.abort("clear"), n.current && Ut(n.current, P);
|
|
1034
1036
|
};
|
|
1035
|
-
}, [o, d,
|
|
1037
|
+
}, [o, d, P, m]), /* @__PURE__ */ i(
|
|
1036
1038
|
"div",
|
|
1037
1039
|
{
|
|
1038
1040
|
"data-rp": `page-${e}-annotationLayer`,
|
|
1039
1041
|
style: { width: `${b == null ? void 0 : b.width}px`, height: `${b == null ? void 0 : b.height}px` },
|
|
1040
|
-
className:
|
|
1042
|
+
className: Zr["rp-annotation-layer"],
|
|
1041
1043
|
ref: n
|
|
1042
1044
|
}
|
|
1043
1045
|
);
|
|
1044
|
-
},
|
|
1046
|
+
}, Xr = {
|
|
1045
1047
|
"rp-text-highlight": "_rp-text-highlight_jdkf8_1"
|
|
1046
|
-
},
|
|
1047
|
-
const [n, r] = $(), { pages: o } =
|
|
1048
|
+
}, Qr = ({ pageNumber: t, viewport: e }) => {
|
|
1049
|
+
const [n, r] = $(), { pages: o } = oe(), { highlightKeywords: s } = Po(), a = !0, d = M(null), [c, m] = $(null), [g, C] = $([]);
|
|
1048
1050
|
z(() => {
|
|
1049
1051
|
d.current && m(d.current.parentElement);
|
|
1050
1052
|
}, [d]), z(() => {
|
|
1051
1053
|
(async () => {
|
|
1052
|
-
const
|
|
1053
|
-
if (!
|
|
1054
|
+
const f = o.get(t);
|
|
1055
|
+
if (!f || !d.current)
|
|
1054
1056
|
return;
|
|
1055
|
-
const
|
|
1056
|
-
r(
|
|
1057
|
+
const h = await f.page.getTextContent();
|
|
1058
|
+
r(h);
|
|
1057
1059
|
})();
|
|
1058
1060
|
}, [o, t]);
|
|
1059
1061
|
const u = k(() => s ? s.map((p) => {
|
|
1060
|
-
var
|
|
1062
|
+
var f, h;
|
|
1061
1063
|
return {
|
|
1062
|
-
...
|
|
1064
|
+
...er(p.keyword, (f = p.options) == null ? void 0 : f.matchCase, (h = p.options) == null ? void 0 : h.wholeWords),
|
|
1063
1065
|
color: p.highlightColor
|
|
1064
1066
|
};
|
|
1065
1067
|
}) : [], [s]);
|
|
1066
|
-
function
|
|
1068
|
+
function T(p, f) {
|
|
1067
1069
|
if (!p)
|
|
1068
1070
|
return;
|
|
1069
|
-
const
|
|
1071
|
+
const h = `[data-rp="page-${f}-textLayer"]`;
|
|
1070
1072
|
return new Promise((l) => {
|
|
1071
|
-
const v = p.querySelector(
|
|
1073
|
+
const v = p.querySelector(h);
|
|
1072
1074
|
if (v) {
|
|
1073
1075
|
l(v);
|
|
1074
1076
|
return;
|
|
1075
1077
|
}
|
|
1076
1078
|
new MutationObserver((I, x) => {
|
|
1077
|
-
const S = p.querySelector(
|
|
1079
|
+
const S = p.querySelector(h);
|
|
1078
1080
|
S && (l(S), x.disconnect());
|
|
1079
1081
|
}).observe(p, { childList: !0, subtree: !0 });
|
|
1080
1082
|
});
|
|
1081
1083
|
}
|
|
1082
|
-
function
|
|
1083
|
-
return new Promise((
|
|
1084
|
-
const
|
|
1084
|
+
function b(p) {
|
|
1085
|
+
return new Promise((f) => {
|
|
1086
|
+
const h = p.querySelectorAll(
|
|
1085
1087
|
'[data-rp="rp-text-layer-text"]'
|
|
1086
1088
|
);
|
|
1087
|
-
if (
|
|
1088
|
-
|
|
1089
|
+
if (h.length) {
|
|
1090
|
+
f(Array.from(h));
|
|
1089
1091
|
return;
|
|
1090
1092
|
}
|
|
1091
1093
|
new MutationObserver((v, w) => {
|
|
1092
1094
|
const I = p.querySelectorAll(
|
|
1093
1095
|
".rp-text-layer-text"
|
|
1094
1096
|
);
|
|
1095
|
-
I.length && (
|
|
1097
|
+
I.length && (f(Array.from(I)), w.disconnect());
|
|
1096
1098
|
}).observe(p, { childList: !0, subtree: !0 });
|
|
1097
1099
|
});
|
|
1098
1100
|
}
|
|
1099
|
-
const
|
|
1101
|
+
const P = (p, f, h, l) => {
|
|
1100
1102
|
var U;
|
|
1101
|
-
const v = document.createRange(), w =
|
|
1103
|
+
const v = document.createRange(), w = h.firstChild;
|
|
1102
1104
|
if (!w || w.nodeType !== Node.TEXT_NODE)
|
|
1103
1105
|
return null;
|
|
1104
1106
|
const I = ((U = w.textContent) == null ? void 0 : U.length) ?? 0, x = l[0].charIdxInSpan, S = l.length === 1 ? x : l[l.length - 1].charIdxInSpan;
|
|
@@ -1107,22 +1109,22 @@ const Xr = (t) => {
|
|
|
1107
1109
|
v.setStart(w, x), v.setEnd(w, S + 1);
|
|
1108
1110
|
const L = document.createElement("span");
|
|
1109
1111
|
L.style.width = "auto", v.surroundContents(L);
|
|
1110
|
-
const O = L.getBoundingClientRect(), D = p.getBoundingClientRect(), F = D.height, E = D.width, R = 100 * (O.left - D.left) / E, A = 100 * (O.top - D.top) / F,
|
|
1111
|
-
return
|
|
1112
|
-
keywordStr:
|
|
1112
|
+
const O = L.getBoundingClientRect(), D = p.getBoundingClientRect(), F = D.height, E = D.width, R = 100 * (O.left - D.left) / E, A = 100 * (O.top - D.top) / F, q = 100 * O.height / F, H = 100 * O.width / E;
|
|
1113
|
+
return nr(L), {
|
|
1114
|
+
keywordStr: f,
|
|
1113
1115
|
left: R,
|
|
1114
1116
|
top: A,
|
|
1115
|
-
height:
|
|
1117
|
+
height: q,
|
|
1116
1118
|
width: H,
|
|
1117
1119
|
pageHeight: F,
|
|
1118
1120
|
pageWidth: E
|
|
1119
1121
|
};
|
|
1120
1122
|
};
|
|
1121
|
-
async function
|
|
1122
|
-
const
|
|
1123
|
-
if (!
|
|
1123
|
+
async function _(p, f) {
|
|
1124
|
+
const h = await T(c, p);
|
|
1125
|
+
if (!h)
|
|
1124
1126
|
return;
|
|
1125
|
-
const l = await
|
|
1127
|
+
const l = await b(h);
|
|
1126
1128
|
if (l.length) {
|
|
1127
1129
|
const v = l.map((I) => I.tagName === "BR" ? " " : I.textContent).reduce(
|
|
1128
1130
|
(I, x, S) => I.concat(
|
|
@@ -1139,12 +1141,12 @@ const Xr = (t) => {
|
|
|
1139
1141
|
spanIdx: 0
|
|
1140
1142
|
}
|
|
1141
1143
|
]
|
|
1142
|
-
).slice(1), w =
|
|
1144
|
+
).slice(1), w = y(h, f, l, v);
|
|
1143
1145
|
C(w);
|
|
1144
1146
|
}
|
|
1145
1147
|
}
|
|
1146
|
-
const
|
|
1147
|
-
const v =
|
|
1148
|
+
const y = (p, f, h, l) => {
|
|
1149
|
+
const v = f.length;
|
|
1148
1150
|
if (!l.length || !v)
|
|
1149
1151
|
return [];
|
|
1150
1152
|
const w = [], I = l.map((x) => x.char).join("");
|
|
@@ -1156,38 +1158,38 @@ const Xr = (t) => {
|
|
|
1156
1158
|
let R;
|
|
1157
1159
|
const A = [];
|
|
1158
1160
|
for (; (R = E.exec(I)) !== null; )
|
|
1159
|
-
O && !
|
|
1161
|
+
O && !Co(I, R.index, R[0].length) || A.push({
|
|
1160
1162
|
keyword: E,
|
|
1161
1163
|
startIndex: R.index,
|
|
1162
1164
|
endIndex: E.lastIndex
|
|
1163
1165
|
});
|
|
1164
|
-
const
|
|
1166
|
+
const q = A.map((H) => ({
|
|
1165
1167
|
keyword: H.keyword,
|
|
1166
1168
|
indexes: l.slice(H.startIndex, H.endIndex),
|
|
1167
1169
|
color: D
|
|
1168
1170
|
}));
|
|
1169
|
-
for (const H of
|
|
1171
|
+
for (const H of q) {
|
|
1170
1172
|
const U = H.indexes.reduce(
|
|
1171
1173
|
(X, V) => (X[V.spanIdx] = (X[V.spanIdx] || []).concat([V]), X),
|
|
1172
1174
|
{}
|
|
1173
1175
|
);
|
|
1174
1176
|
for (const X of Object.values(U))
|
|
1175
1177
|
if (X.length !== 1 || X[0].char.trim() !== "") {
|
|
1176
|
-
const V = X, ie =
|
|
1178
|
+
const V = X, ie = h[V[0].spanIdx], G = P(
|
|
1177
1179
|
p,
|
|
1178
1180
|
F,
|
|
1179
1181
|
ie,
|
|
1180
1182
|
V
|
|
1181
1183
|
);
|
|
1182
|
-
if (
|
|
1183
|
-
const { left: Z, top: Y } =
|
|
1184
|
+
if (G) {
|
|
1185
|
+
const { left: Z, top: Y } = G;
|
|
1184
1186
|
if (w.find((J) => J.left === Z && J.top === Y))
|
|
1185
1187
|
continue;
|
|
1186
|
-
w.push({ ...
|
|
1188
|
+
w.push({ ...G, highlightColor: H.color });
|
|
1187
1189
|
}
|
|
1188
1190
|
}
|
|
1189
1191
|
}
|
|
1190
|
-
}), w.sort(
|
|
1192
|
+
}), w.sort(tr), w;
|
|
1191
1193
|
};
|
|
1192
1194
|
return z(() => {
|
|
1193
1195
|
(async () => {
|
|
@@ -1196,15 +1198,15 @@ const Xr = (t) => {
|
|
|
1196
1198
|
return;
|
|
1197
1199
|
}
|
|
1198
1200
|
try {
|
|
1199
|
-
await
|
|
1200
|
-
} catch (
|
|
1201
|
-
console.error(
|
|
1201
|
+
await _(t, s);
|
|
1202
|
+
} catch (f) {
|
|
1203
|
+
console.error(f);
|
|
1202
1204
|
}
|
|
1203
1205
|
})();
|
|
1204
|
-
}, [a, s, t, n, e]), /* @__PURE__ */ i(he, { children: /* @__PURE__ */ i("div", { ref: d, "data-rp": `page-${t}-textHighlightLayer`, children: g.map((p,
|
|
1206
|
+
}, [a, s, t, n, e]), /* @__PURE__ */ i(he, { children: /* @__PURE__ */ i("div", { ref: d, "data-rp": `page-${t}-textHighlightLayer`, children: g.map((p, f) => /* @__PURE__ */ i(
|
|
1205
1207
|
"div",
|
|
1206
1208
|
{
|
|
1207
|
-
className:
|
|
1209
|
+
className: Xr["rp-text-highlight"],
|
|
1208
1210
|
style: {
|
|
1209
1211
|
top: `${p.top}%`,
|
|
1210
1212
|
left: `${p.left}%`,
|
|
@@ -1213,50 +1215,50 @@ const Xr = (t) => {
|
|
|
1213
1215
|
backgroundColor: p.highlightColor
|
|
1214
1216
|
}
|
|
1215
1217
|
},
|
|
1216
|
-
|
|
1218
|
+
f
|
|
1217
1219
|
)) }) });
|
|
1218
1220
|
}, Ot = rt((t, e) => {
|
|
1219
|
-
const { pageNumber: n, style: r, ...o } = t, { pages: s } =
|
|
1221
|
+
const { pageNumber: n, style: r, ...o } = t, { pages: s } = oe(), { pageRotate: a } = ot(), { textLayer: d } = go(), { currentZoom: c } = tt(), { LoaderImageComponent: m } = yt(), g = M(s.get(n)), [C, u] = $(!1), T = M(null), [b, P] = $({
|
|
1220
1222
|
width: 0,
|
|
1221
1223
|
height: 0
|
|
1222
1224
|
});
|
|
1223
|
-
|
|
1224
|
-
const
|
|
1225
|
+
dn(e, () => T.current);
|
|
1226
|
+
const _ = k(() => g.current ? a[n] : 0, [n, a]);
|
|
1225
1227
|
z(() => {
|
|
1226
1228
|
if (s && (g.current = s.get(n), g.current)) {
|
|
1227
|
-
const
|
|
1229
|
+
const h = g.current.page.getViewport({
|
|
1228
1230
|
scale: c,
|
|
1229
|
-
rotation:
|
|
1231
|
+
rotation: _
|
|
1230
1232
|
});
|
|
1231
|
-
|
|
1233
|
+
P(h);
|
|
1232
1234
|
}
|
|
1233
|
-
}, [s, n,
|
|
1234
|
-
const
|
|
1235
|
-
switch (
|
|
1235
|
+
}, [s, n, _, c]);
|
|
1236
|
+
const y = k(() => {
|
|
1237
|
+
switch (_) {
|
|
1236
1238
|
case 90:
|
|
1237
|
-
return `${
|
|
1239
|
+
return `${b.width / 2}px ${b.width / 2}px`;
|
|
1238
1240
|
case -90:
|
|
1239
1241
|
case 270:
|
|
1240
|
-
return `${
|
|
1242
|
+
return `${b.height / 2}px ${b.height / 2}px`;
|
|
1241
1243
|
default:
|
|
1242
1244
|
return "center";
|
|
1243
1245
|
}
|
|
1244
|
-
}, [
|
|
1246
|
+
}, [_, b]), p = N(() => {
|
|
1245
1247
|
u(!0);
|
|
1246
|
-
}, []),
|
|
1248
|
+
}, []), f = N(() => {
|
|
1247
1249
|
u(!1);
|
|
1248
1250
|
}, []);
|
|
1249
1251
|
return /* @__PURE__ */ i(
|
|
1250
1252
|
"div",
|
|
1251
1253
|
{
|
|
1252
|
-
ref:
|
|
1254
|
+
ref: T,
|
|
1253
1255
|
id: `page-${n}`,
|
|
1254
1256
|
"data-rp": `page-${n}`,
|
|
1255
1257
|
...o,
|
|
1256
1258
|
style: {
|
|
1257
1259
|
...r,
|
|
1258
|
-
"--rp-rotate": `${
|
|
1259
|
-
"--rp-page-rotate-translate": `${
|
|
1260
|
+
"--rp-rotate": `${_}deg`,
|
|
1261
|
+
"--rp-page-rotate-translate": `${y}`,
|
|
1260
1262
|
"--scale-factor": c
|
|
1261
1263
|
},
|
|
1262
1264
|
className: pt["rp-page-wrapper"],
|
|
@@ -1264,17 +1266,17 @@ const Xr = (t) => {
|
|
|
1264
1266
|
"div",
|
|
1265
1267
|
{
|
|
1266
1268
|
style: {
|
|
1267
|
-
width: `${
|
|
1268
|
-
height: `${
|
|
1269
|
+
width: `${b.width}px`,
|
|
1270
|
+
height: `${b.height}px`
|
|
1269
1271
|
},
|
|
1270
1272
|
className: pt["rp-page"],
|
|
1271
1273
|
children: [
|
|
1272
|
-
/* @__PURE__ */ i(
|
|
1274
|
+
/* @__PURE__ */ i(Gr, { onLoading: p, onLoaded: f, pageNumber: n }),
|
|
1273
1275
|
C && m && /* @__PURE__ */ i("div", { className: pt["rp-loader-wrapper"], children: /* @__PURE__ */ i(m, {}) }),
|
|
1274
|
-
/* @__PURE__ */ i(
|
|
1275
|
-
d && /* @__PURE__ */ i(
|
|
1276
|
-
/* @__PURE__ */ i(
|
|
1277
|
-
/* @__PURE__ */ i(
|
|
1276
|
+
/* @__PURE__ */ i(or, { pageNumber: n }),
|
|
1277
|
+
d && /* @__PURE__ */ i(Br, { pageNumber: n }),
|
|
1278
|
+
/* @__PURE__ */ i(Qr, { pageNumber: n, viewport: b }),
|
|
1279
|
+
/* @__PURE__ */ i(Kr, { pageNumber: n })
|
|
1278
1280
|
]
|
|
1279
1281
|
}
|
|
1280
1282
|
)
|
|
@@ -1291,7 +1293,7 @@ function _t() {
|
|
|
1291
1293
|
return t;
|
|
1292
1294
|
}, _t.apply(null, arguments);
|
|
1293
1295
|
}
|
|
1294
|
-
function
|
|
1296
|
+
function Bt(t) {
|
|
1295
1297
|
if (t === void 0)
|
|
1296
1298
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1297
1299
|
return t;
|
|
@@ -1301,25 +1303,25 @@ function bt(t, e) {
|
|
|
1301
1303
|
return n.__proto__ = r, n;
|
|
1302
1304
|
}, bt(t, e);
|
|
1303
1305
|
}
|
|
1304
|
-
function
|
|
1306
|
+
function Yr(t, e) {
|
|
1305
1307
|
t.prototype = Object.create(e.prototype), t.prototype.constructor = t, bt(t, e);
|
|
1306
1308
|
}
|
|
1307
|
-
var
|
|
1309
|
+
var Zt = Number.isNaN || function(e) {
|
|
1308
1310
|
return typeof e == "number" && e !== e;
|
|
1309
1311
|
};
|
|
1310
|
-
function
|
|
1311
|
-
return !!(t === e ||
|
|
1312
|
+
function Jr(t, e) {
|
|
1313
|
+
return !!(t === e || Zt(t) && Zt(e));
|
|
1312
1314
|
}
|
|
1313
|
-
function
|
|
1315
|
+
function ei(t, e) {
|
|
1314
1316
|
if (t.length !== e.length)
|
|
1315
1317
|
return !1;
|
|
1316
1318
|
for (var n = 0; n < t.length; n++)
|
|
1317
|
-
if (!
|
|
1319
|
+
if (!Jr(t[n], e[n]))
|
|
1318
1320
|
return !1;
|
|
1319
1321
|
return !0;
|
|
1320
1322
|
}
|
|
1321
1323
|
function ht(t, e) {
|
|
1322
|
-
e === void 0 && (e =
|
|
1324
|
+
e === void 0 && (e = ei);
|
|
1323
1325
|
var n, r = [], o, s = !1;
|
|
1324
1326
|
function a() {
|
|
1325
1327
|
for (var d = [], c = 0; c < arguments.length; c++)
|
|
@@ -1328,7 +1330,7 @@ function ht(t, e) {
|
|
|
1328
1330
|
}
|
|
1329
1331
|
return a;
|
|
1330
1332
|
}
|
|
1331
|
-
function
|
|
1333
|
+
function jt(t, e) {
|
|
1332
1334
|
if (t == null)
|
|
1333
1335
|
return {};
|
|
1334
1336
|
var n = {};
|
|
@@ -1340,18 +1342,18 @@ function Kt(t, e) {
|
|
|
1340
1342
|
}
|
|
1341
1343
|
return n;
|
|
1342
1344
|
}
|
|
1343
|
-
var
|
|
1345
|
+
var ti = typeof performance == "object" && typeof performance.now == "function", Kt = ti ? function() {
|
|
1344
1346
|
return performance.now();
|
|
1345
1347
|
} : function() {
|
|
1346
1348
|
return Date.now();
|
|
1347
1349
|
};
|
|
1348
|
-
function
|
|
1350
|
+
function Xt(t) {
|
|
1349
1351
|
cancelAnimationFrame(t.id);
|
|
1350
1352
|
}
|
|
1351
|
-
function
|
|
1352
|
-
var n =
|
|
1353
|
+
function ni(t, e) {
|
|
1354
|
+
var n = Kt();
|
|
1353
1355
|
function r() {
|
|
1354
|
-
|
|
1356
|
+
Kt() - n >= e ? t.call(null) : o.id = requestAnimationFrame(r);
|
|
1355
1357
|
}
|
|
1356
1358
|
var o = {
|
|
1357
1359
|
id: requestAnimationFrame(r)
|
|
@@ -1359,7 +1361,7 @@ function oi(t, e) {
|
|
|
1359
1361
|
return o;
|
|
1360
1362
|
}
|
|
1361
1363
|
var ft = -1;
|
|
1362
|
-
function
|
|
1364
|
+
function oi(t) {
|
|
1363
1365
|
if (t === void 0 && (t = !1), ft === -1 || t) {
|
|
1364
1366
|
var e = document.createElement("div"), n = e.style;
|
|
1365
1367
|
n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(e), ft = e.offsetWidth - e.clientWidth, document.body.removeChild(e);
|
|
@@ -1367,7 +1369,7 @@ function ri(t) {
|
|
|
1367
1369
|
return ft;
|
|
1368
1370
|
}
|
|
1369
1371
|
var ze = null;
|
|
1370
|
-
function
|
|
1372
|
+
function Qt(t) {
|
|
1371
1373
|
if (t === void 0 && (t = !1), ze === null || t) {
|
|
1372
1374
|
var e = document.createElement("div"), n = e.style;
|
|
1373
1375
|
n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
|
|
@@ -1376,21 +1378,21 @@ function Yt(t) {
|
|
|
1376
1378
|
}
|
|
1377
1379
|
return ze;
|
|
1378
1380
|
}
|
|
1379
|
-
var
|
|
1381
|
+
var ri = 150, ii = function(e) {
|
|
1380
1382
|
var n = e.columnIndex;
|
|
1381
1383
|
e.data;
|
|
1382
1384
|
var r = e.rowIndex;
|
|
1383
1385
|
return r + ":" + n;
|
|
1384
1386
|
}, Xe = null, Qe = null, Ye = null;
|
|
1385
1387
|
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (Xe = /* @__PURE__ */ new WeakSet(), Qe = /* @__PURE__ */ new WeakSet(), Ye = /* @__PURE__ */ new WeakSet());
|
|
1386
|
-
function
|
|
1387
|
-
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,
|
|
1388
|
-
return e = /* @__PURE__ */ function(
|
|
1389
|
-
|
|
1390
|
-
function p(
|
|
1388
|
+
function si(t) {
|
|
1389
|
+
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, T = t.getRowStopIndexForStartIndex, b = t.initInstanceProps, P = t.shouldResetStyleCacheOnItemSizeChange, _ = t.validateProps;
|
|
1390
|
+
return e = /* @__PURE__ */ function(y) {
|
|
1391
|
+
Yr(p, y);
|
|
1392
|
+
function p(h) {
|
|
1391
1393
|
var l;
|
|
1392
|
-
return l =
|
|
1393
|
-
instance:
|
|
1394
|
+
return l = y.call(this, h) || this, l._instanceProps = b(l.props, Bt(l)), l._resetIsScrollingTimeoutId = null, l._outerRef = void 0, l.state = {
|
|
1395
|
+
instance: Bt(l),
|
|
1394
1396
|
isScrolling: !1,
|
|
1395
1397
|
horizontalScrollDirection: "forward",
|
|
1396
1398
|
scrollLeft: typeof l.props.initialScrollLeft == "number" ? l.props.initialScrollLeft : 0,
|
|
@@ -1417,7 +1419,7 @@ function ai(t) {
|
|
|
1417
1419
|
scrollUpdateWasRequested: S
|
|
1418
1420
|
});
|
|
1419
1421
|
}), l._getItemStyle = void 0, l._getItemStyle = function(v, w) {
|
|
1420
|
-
var I = l.props, x = I.columnWidth, S = I.direction, L = I.rowHeight, O = l._getItemStyleCache(
|
|
1422
|
+
var I = l.props, x = I.columnWidth, S = I.direction, L = I.rowHeight, O = l._getItemStyleCache(P && x, P && S, P && L), D = v + ":" + w, F;
|
|
1421
1423
|
if (O.hasOwnProperty(D))
|
|
1422
1424
|
F = O[D];
|
|
1423
1425
|
else {
|
|
@@ -1441,7 +1443,7 @@ function ai(t) {
|
|
|
1441
1443
|
return null;
|
|
1442
1444
|
var E = l.props.direction, R = S;
|
|
1443
1445
|
if (E === "rtl")
|
|
1444
|
-
switch (
|
|
1446
|
+
switch (Qt()) {
|
|
1445
1447
|
case "negative":
|
|
1446
1448
|
R = -S;
|
|
1447
1449
|
break;
|
|
@@ -1464,7 +1466,7 @@ function ai(t) {
|
|
|
1464
1466
|
var w = l.props.outerRef;
|
|
1465
1467
|
l._outerRef = v, typeof w == "function" ? w(v) : w != null && typeof w == "object" && w.hasOwnProperty("current") && (w.current = v);
|
|
1466
1468
|
}, l._resetIsScrollingDebounced = function() {
|
|
1467
|
-
l._resetIsScrollingTimeoutId !== null &&
|
|
1469
|
+
l._resetIsScrollingTimeoutId !== null && Xt(l._resetIsScrollingTimeoutId), l._resetIsScrollingTimeoutId = ni(l._resetIsScrolling, ri);
|
|
1468
1470
|
}, l._resetIsScrolling = function() {
|
|
1469
1471
|
l._resetIsScrollingTimeoutId = null, l.setState({
|
|
1470
1472
|
isScrolling: !1
|
|
@@ -1474,10 +1476,10 @@ function ai(t) {
|
|
|
1474
1476
|
}, l;
|
|
1475
1477
|
}
|
|
1476
1478
|
p.getDerivedStateFromProps = function(l, v) {
|
|
1477
|
-
return
|
|
1479
|
+
return ai(l, v), _(l), null;
|
|
1478
1480
|
};
|
|
1479
|
-
var
|
|
1480
|
-
return
|
|
1481
|
+
var f = p.prototype;
|
|
1482
|
+
return f.scrollTo = function(l) {
|
|
1481
1483
|
var v = l.scrollLeft, w = l.scrollTop;
|
|
1482
1484
|
v !== void 0 && (v = Math.max(0, v)), w !== void 0 && (w = Math.max(0, w)), this.setState(function(I) {
|
|
1483
1485
|
return v === void 0 && (v = I.scrollLeft), w === void 0 && (w = I.scrollTop), I.scrollLeft === v && I.scrollTop === w ? null : {
|
|
@@ -1488,27 +1490,27 @@ function ai(t) {
|
|
|
1488
1490
|
verticalScrollDirection: I.scrollTop < w ? "forward" : "backward"
|
|
1489
1491
|
};
|
|
1490
1492
|
}, this._resetIsScrollingDebounced);
|
|
1491
|
-
},
|
|
1492
|
-
var v = l.align, w = v === void 0 ? "auto" : v, I = l.columnIndex, x = l.rowIndex, S = this.props, L = S.columnCount, O = S.height, D = S.rowCount, F = S.width, E = this.state, R = E.scrollLeft, A = E.scrollTop,
|
|
1493
|
+
}, f.scrollToItem = function(l) {
|
|
1494
|
+
var v = l.align, w = v === void 0 ? "auto" : v, I = l.columnIndex, x = l.rowIndex, S = this.props, L = S.columnCount, O = S.height, D = S.rowCount, F = S.width, E = this.state, R = E.scrollLeft, A = E.scrollTop, q = oi();
|
|
1493
1495
|
I !== void 0 && (I = Math.max(0, Math.min(I, L - 1))), x !== void 0 && (x = Math.max(0, Math.min(x, D - 1)));
|
|
1494
|
-
var H = a(this.props, this._instanceProps), U = d(this.props, this._instanceProps), X = U > F ?
|
|
1496
|
+
var H = a(this.props, this._instanceProps), U = d(this.props, this._instanceProps), X = U > F ? q : 0, V = H > O ? q : 0;
|
|
1495
1497
|
this.scrollTo({
|
|
1496
1498
|
scrollLeft: I !== void 0 ? c(this.props, I, w, R, this._instanceProps, V) : R,
|
|
1497
1499
|
scrollTop: x !== void 0 ? m(this.props, x, w, A, this._instanceProps, X) : A
|
|
1498
1500
|
});
|
|
1499
|
-
},
|
|
1501
|
+
}, f.componentDidMount = function() {
|
|
1500
1502
|
var l = this.props, v = l.initialScrollLeft, w = l.initialScrollTop;
|
|
1501
1503
|
if (this._outerRef != null) {
|
|
1502
1504
|
var I = this._outerRef;
|
|
1503
1505
|
typeof v == "number" && (I.scrollLeft = v), typeof w == "number" && (I.scrollTop = w);
|
|
1504
1506
|
}
|
|
1505
1507
|
this._callPropsCallbacks();
|
|
1506
|
-
},
|
|
1508
|
+
}, f.componentDidUpdate = function() {
|
|
1507
1509
|
var l = this.props.direction, v = this.state, w = v.scrollLeft, I = v.scrollTop, x = v.scrollUpdateWasRequested;
|
|
1508
1510
|
if (x && this._outerRef != null) {
|
|
1509
1511
|
var S = this._outerRef;
|
|
1510
1512
|
if (l === "rtl")
|
|
1511
|
-
switch (
|
|
1513
|
+
switch (Qt()) {
|
|
1512
1514
|
case "negative":
|
|
1513
1515
|
S.scrollLeft = -w;
|
|
1514
1516
|
break;
|
|
@@ -1525,10 +1527,10 @@ function ai(t) {
|
|
|
1525
1527
|
S.scrollTop = Math.max(0, I);
|
|
1526
1528
|
}
|
|
1527
1529
|
this._callPropsCallbacks();
|
|
1528
|
-
},
|
|
1529
|
-
this._resetIsScrollingTimeoutId !== null &&
|
|
1530
|
-
},
|
|
1531
|
-
var l = this.props, v = l.children, w = l.className, I = l.columnCount, x = l.direction, S = l.height, L = l.innerRef, O = l.innerElementType, D = l.innerTagName, F = l.itemData, E = l.itemKey, R = E === void 0 ?
|
|
1530
|
+
}, f.componentWillUnmount = function() {
|
|
1531
|
+
this._resetIsScrollingTimeoutId !== null && Xt(this._resetIsScrollingTimeoutId);
|
|
1532
|
+
}, f.render = function() {
|
|
1533
|
+
var l = this.props, v = l.children, w = l.className, I = l.columnCount, x = l.direction, S = l.height, L = l.innerRef, O = l.innerElementType, D = l.innerTagName, F = l.itemData, E = l.itemKey, R = E === void 0 ? ii : E, A = l.outerElementType, q = l.outerTagName, H = l.rowCount, U = l.style, X = l.useIsScrolling, V = l.width, ie = this.state.isScrolling, G = this._getHorizontalRangeToRender(), Z = G[0], Y = G[1], te = this._getVerticalRangeToRender(), J = te[0], ee = te[1], ve = [];
|
|
1532
1534
|
if (I > 0 && H)
|
|
1533
1535
|
for (var we = J; we <= ee; we++)
|
|
1534
1536
|
for (var pe = Z; pe <= Y; pe++)
|
|
@@ -1545,7 +1547,7 @@ function ai(t) {
|
|
|
1545
1547
|
style: this._getItemStyle(we, pe)
|
|
1546
1548
|
}));
|
|
1547
1549
|
var at = a(this.props, this._instanceProps), He = d(this.props, this._instanceProps);
|
|
1548
|
-
return Ke(A ||
|
|
1550
|
+
return Ke(A || q || "div", {
|
|
1549
1551
|
className: w,
|
|
1550
1552
|
onScroll: this._onScroll,
|
|
1551
1553
|
ref: this._outerRefSetter,
|
|
@@ -1567,36 +1569,36 @@ function ai(t) {
|
|
|
1567
1569
|
width: He
|
|
1568
1570
|
}
|
|
1569
1571
|
}));
|
|
1570
|
-
},
|
|
1572
|
+
}, f._callPropsCallbacks = function() {
|
|
1571
1573
|
var l = this.props, v = l.columnCount, w = l.onItemsRendered, I = l.onScroll, x = l.rowCount;
|
|
1572
1574
|
if (typeof w == "function" && v > 0 && x > 0) {
|
|
1573
|
-
var S = this._getHorizontalRangeToRender(), L = S[0], O = S[1], D = S[2], F = S[3], E = this._getVerticalRangeToRender(), R = E[0], A = E[1],
|
|
1574
|
-
this._callOnItemsRendered(L, O, R, A, D, F,
|
|
1575
|
+
var S = this._getHorizontalRangeToRender(), L = S[0], O = S[1], D = S[2], F = S[3], E = this._getVerticalRangeToRender(), R = E[0], A = E[1], q = E[2], H = E[3];
|
|
1576
|
+
this._callOnItemsRendered(L, O, R, A, D, F, q, H);
|
|
1575
1577
|
}
|
|
1576
1578
|
if (typeof I == "function") {
|
|
1577
|
-
var U = this.state, X = U.horizontalScrollDirection, V = U.scrollLeft, ie = U.scrollTop,
|
|
1578
|
-
this._callOnScroll(V, ie, X, Z,
|
|
1579
|
+
var U = this.state, X = U.horizontalScrollDirection, V = U.scrollLeft, ie = U.scrollTop, G = U.scrollUpdateWasRequested, Z = U.verticalScrollDirection;
|
|
1580
|
+
this._callOnScroll(V, ie, X, Z, G);
|
|
1579
1581
|
}
|
|
1580
|
-
},
|
|
1582
|
+
}, f._getHorizontalRangeToRender = function() {
|
|
1581
1583
|
var l = this.props, v = l.columnCount, w = l.overscanColumnCount, I = l.overscanColumnsCount, x = l.overscanCount, S = l.rowCount, L = this.state, O = L.horizontalScrollDirection, D = L.isScrolling, F = L.scrollLeft, E = w || I || x || 1;
|
|
1582
1584
|
if (v === 0 || S === 0)
|
|
1583
1585
|
return [0, 0, 0, 0];
|
|
1584
|
-
var R = r(this.props, F, this._instanceProps), A = o(this.props, R, F, this._instanceProps),
|
|
1585
|
-
return [Math.max(0, R -
|
|
1586
|
-
},
|
|
1586
|
+
var R = r(this.props, F, this._instanceProps), A = o(this.props, R, F, this._instanceProps), q = !D || O === "backward" ? Math.max(1, E) : 1, H = !D || O === "forward" ? Math.max(1, E) : 1;
|
|
1587
|
+
return [Math.max(0, R - q), Math.max(0, Math.min(v - 1, A + H)), R, A];
|
|
1588
|
+
}, f._getVerticalRangeToRender = function() {
|
|
1587
1589
|
var l = this.props, v = l.columnCount, w = l.overscanCount, I = l.overscanRowCount, x = l.overscanRowsCount, S = l.rowCount, L = this.state, O = L.isScrolling, D = L.verticalScrollDirection, F = L.scrollTop, E = I || x || w || 1;
|
|
1588
1590
|
if (v === 0 || S === 0)
|
|
1589
1591
|
return [0, 0, 0, 0];
|
|
1590
|
-
var R = u(this.props, F, this._instanceProps), A =
|
|
1591
|
-
return [Math.max(0, R -
|
|
1592
|
+
var R = u(this.props, F, this._instanceProps), A = T(this.props, R, F, this._instanceProps), q = !O || D === "backward" ? Math.max(1, E) : 1, H = !O || D === "forward" ? Math.max(1, E) : 1;
|
|
1593
|
+
return [Math.max(0, R - q), Math.max(0, Math.min(S - 1, A + H)), R, A];
|
|
1592
1594
|
}, p;
|
|
1593
|
-
}(
|
|
1595
|
+
}(ao), e.defaultProps = {
|
|
1594
1596
|
direction: "ltr",
|
|
1595
1597
|
itemData: void 0,
|
|
1596
1598
|
useIsScrolling: !1
|
|
1597
1599
|
}, e;
|
|
1598
1600
|
}
|
|
1599
|
-
var
|
|
1601
|
+
var ai = function(e, n) {
|
|
1600
1602
|
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;
|
|
1601
1603
|
if (process.env.NODE_ENV !== "production") {
|
|
1602
1604
|
if (typeof m == "number" && Xe && !Xe.has(u) && (Xe.add(u), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof c == "number" || typeof g == "number") && Qe && !Qe.has(u) && (Qe.add(u), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (a != null || d != null) && Ye && !Ye.has(u) && (Ye.add(u), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), r == null)
|
|
@@ -1613,7 +1615,7 @@ var ci = function(e, n) {
|
|
|
1613
1615
|
if (typeof s != "number")
|
|
1614
1616
|
throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (s === null ? "null" : typeof s) + '" was specified.'));
|
|
1615
1617
|
}
|
|
1616
|
-
},
|
|
1618
|
+
}, Yt = 50, Rn = function(e, n) {
|
|
1617
1619
|
var r = e.rowCount, o = n.rowMetadataMap, s = n.estimatedRowHeight, a = n.lastMeasuredRowIndex, d = 0;
|
|
1618
1620
|
if (a >= r && (a = r - 1), a >= 0) {
|
|
1619
1621
|
var c = o[a];
|
|
@@ -1621,7 +1623,7 @@ var ci = function(e, n) {
|
|
|
1621
1623
|
}
|
|
1622
1624
|
var m = r - a - 1, g = m * s;
|
|
1623
1625
|
return d + g;
|
|
1624
|
-
},
|
|
1626
|
+
}, Ln = function(e, n) {
|
|
1625
1627
|
var r = e.columnCount, o = n.columnMetadataMap, s = n.estimatedColumnWidth, a = n.lastMeasuredColumnIndex, d = 0;
|
|
1626
1628
|
if (a >= r && (a = r - 1), a >= 0) {
|
|
1627
1629
|
var c = o[a];
|
|
@@ -1647,12 +1649,12 @@ var ci = function(e, n) {
|
|
|
1647
1649
|
e === "column" ? o.lastMeasuredColumnIndex = r : o.lastMeasuredRowIndex = r;
|
|
1648
1650
|
}
|
|
1649
1651
|
return s[r];
|
|
1650
|
-
},
|
|
1652
|
+
}, Jt = function(e, n, r, o) {
|
|
1651
1653
|
var s, a;
|
|
1652
1654
|
e === "column" ? (s = r.columnMetadataMap, a = r.lastMeasuredColumnIndex) : (s = r.rowMetadataMap, a = r.lastMeasuredRowIndex);
|
|
1653
1655
|
var d = a > 0 ? s[a].offset : 0;
|
|
1654
|
-
return d >= o ?
|
|
1655
|
-
},
|
|
1656
|
+
return d >= o ? En(e, n, r, a, 0, o) : ci(e, n, r, Math.max(0, a), o);
|
|
1657
|
+
}, En = function(e, n, r, o, s, a) {
|
|
1656
1658
|
for (; s <= o; ) {
|
|
1657
1659
|
var d = s + Math.floor((o - s) / 2), c = be(e, n, d, r).offset;
|
|
1658
1660
|
if (c === a)
|
|
@@ -1660,12 +1662,12 @@ var ci = function(e, n) {
|
|
|
1660
1662
|
c < a ? s = d + 1 : c > a && (o = d - 1);
|
|
1661
1663
|
}
|
|
1662
1664
|
return s > 0 ? s - 1 : 0;
|
|
1663
|
-
},
|
|
1665
|
+
}, ci = function(e, n, r, o, s) {
|
|
1664
1666
|
for (var a = e === "column" ? n.columnCount : n.rowCount, d = 1; o < a && be(e, n, o, r).offset < s; )
|
|
1665
1667
|
o += d, d *= 2;
|
|
1666
|
-
return
|
|
1667
|
-
},
|
|
1668
|
-
var c = e === "column" ? n.width : n.height, m = be(e, n, r, a), g = e === "column" ?
|
|
1668
|
+
return En(e, n, r, Math.min(o, a - 1), Math.floor(o / 2), s);
|
|
1669
|
+
}, en = function(e, n, r, o, s, a, d) {
|
|
1670
|
+
var c = e === "column" ? n.width : n.height, m = be(e, n, r, a), g = e === "column" ? Ln(n, a) : Rn(n, a), C = Math.max(0, Math.min(g - c, m.offset)), u = Math.max(0, m.offset - c + d + m.size);
|
|
1669
1671
|
switch (o === "smart" && (s >= u - c && s <= C + c ? o = "auto" : o = "center"), o) {
|
|
1670
1672
|
case "start":
|
|
1671
1673
|
return C;
|
|
@@ -1677,12 +1679,12 @@ var ci = function(e, n) {
|
|
|
1677
1679
|
default:
|
|
1678
1680
|
return s >= u && s <= C ? s : u > C || s < u ? u : C;
|
|
1679
1681
|
}
|
|
1680
|
-
},
|
|
1682
|
+
}, li = /* @__PURE__ */ si({
|
|
1681
1683
|
getColumnOffset: function(e, n, r) {
|
|
1682
1684
|
return be("column", e, n, r).offset;
|
|
1683
1685
|
},
|
|
1684
1686
|
getColumnStartIndexForOffset: function(e, n, r) {
|
|
1685
|
-
return
|
|
1687
|
+
return Jt("column", e, r, n);
|
|
1686
1688
|
},
|
|
1687
1689
|
getColumnStopIndexForStartIndex: function(e, n, r, o) {
|
|
1688
1690
|
for (var s = e.columnCount, a = e.width, d = be("column", e, n, o), c = r + a, m = d.offset + d.size, g = n; g < s - 1 && m < c; )
|
|
@@ -1692,13 +1694,13 @@ var ci = function(e, n) {
|
|
|
1692
1694
|
getColumnWidth: function(e, n, r) {
|
|
1693
1695
|
return r.columnMetadataMap[n].size;
|
|
1694
1696
|
},
|
|
1695
|
-
getEstimatedTotalHeight:
|
|
1696
|
-
getEstimatedTotalWidth:
|
|
1697
|
+
getEstimatedTotalHeight: Rn,
|
|
1698
|
+
getEstimatedTotalWidth: Ln,
|
|
1697
1699
|
getOffsetForColumnAndAlignment: function(e, n, r, o, s, a) {
|
|
1698
|
-
return
|
|
1700
|
+
return en("column", e, n, r, o, s, a);
|
|
1699
1701
|
},
|
|
1700
1702
|
getOffsetForRowAndAlignment: function(e, n, r, o, s, a) {
|
|
1701
|
-
return
|
|
1703
|
+
return en("row", e, n, r, o, s, a);
|
|
1702
1704
|
},
|
|
1703
1705
|
getRowOffset: function(e, n, r) {
|
|
1704
1706
|
return be("row", e, n, r).offset;
|
|
@@ -1707,7 +1709,7 @@ var ci = function(e, n) {
|
|
|
1707
1709
|
return r.rowMetadataMap[n].size;
|
|
1708
1710
|
},
|
|
1709
1711
|
getRowStartIndexForOffset: function(e, n, r) {
|
|
1710
|
-
return
|
|
1712
|
+
return Jt("row", e, r, n);
|
|
1711
1713
|
},
|
|
1712
1714
|
getRowStopIndexForStartIndex: function(e, n, r, o) {
|
|
1713
1715
|
for (var s = e.rowCount, a = e.height, d = be("row", e, n, o), c = r + a, m = d.offset + d.size, g = n; g < s - 1 && m < c; )
|
|
@@ -1717,8 +1719,8 @@ var ci = function(e, n) {
|
|
|
1717
1719
|
initInstanceProps: function(e, n) {
|
|
1718
1720
|
var r = e, o = r.estimatedColumnWidth, s = r.estimatedRowHeight, a = {
|
|
1719
1721
|
columnMetadataMap: {},
|
|
1720
|
-
estimatedColumnWidth: o ||
|
|
1721
|
-
estimatedRowHeight: s ||
|
|
1722
|
+
estimatedColumnWidth: o || Yt,
|
|
1723
|
+
estimatedRowHeight: s || Yt,
|
|
1722
1724
|
lastMeasuredColumnIndex: -1,
|
|
1723
1725
|
lastMeasuredRowIndex: -1,
|
|
1724
1726
|
rowMetadataMap: {}
|
|
@@ -1750,7 +1752,7 @@ var ci = function(e, n) {
|
|
|
1750
1752
|
}
|
|
1751
1753
|
});
|
|
1752
1754
|
process.env.NODE_ENV;
|
|
1753
|
-
function
|
|
1755
|
+
function tn(t, e) {
|
|
1754
1756
|
for (var n in t)
|
|
1755
1757
|
if (!(n in e))
|
|
1756
1758
|
return !0;
|
|
@@ -1759,44 +1761,44 @@ function nn(t, e) {
|
|
|
1759
1761
|
return !0;
|
|
1760
1762
|
return !1;
|
|
1761
1763
|
}
|
|
1762
|
-
var
|
|
1763
|
-
function
|
|
1764
|
-
var n = t.style, r =
|
|
1765
|
-
return !
|
|
1764
|
+
var di = ["style"], ui = ["style"];
|
|
1765
|
+
function pi(t, e) {
|
|
1766
|
+
var n = t.style, r = jt(t, di), o = e.style, s = jt(e, ui);
|
|
1767
|
+
return !tn(n, o) && !tn(r, s);
|
|
1766
1768
|
}
|
|
1767
|
-
const
|
|
1768
|
-
const { viewMode: t } = Me(), { scrollMode: e } = De(), { setColumnCount: n } =
|
|
1769
|
-
const
|
|
1770
|
-
return (!
|
|
1769
|
+
const hi = () => {
|
|
1770
|
+
const { viewMode: t } = Me(), { scrollMode: e } = De(), { setColumnCount: n } = hn(), { virtualScrollableElementRef: r } = nt(), o = Ze(), s = k(() => o.heights.length, [o.heights]), a = k(() => e === re.HORIZONTAL_SCROLLING ? s : t === Ne.DUAL_PAGE ? 2 : 1, [t, e, e, s, r]), d = k(() => o.widths.reduce((_, y, p) => {
|
|
1771
|
+
const f = p % a;
|
|
1772
|
+
return (!_[f] || y > _[f]) && (_[f] = y), _;
|
|
1771
1773
|
}, []), [o.widths, a]), c = N(
|
|
1772
|
-
(
|
|
1773
|
-
const
|
|
1774
|
-
return d[
|
|
1774
|
+
(P) => {
|
|
1775
|
+
const _ = P % d.length;
|
|
1776
|
+
return d[_] || 0;
|
|
1775
1777
|
},
|
|
1776
1778
|
[d]
|
|
1777
1779
|
), m = N(
|
|
1778
|
-
(
|
|
1779
|
-
const
|
|
1780
|
-
const
|
|
1781
|
-
return o.heights[
|
|
1780
|
+
(P) => {
|
|
1781
|
+
const _ = Array.from({ length: a }, (y, p) => {
|
|
1782
|
+
const f = P * a + p;
|
|
1783
|
+
return o.heights[f] || 0;
|
|
1782
1784
|
});
|
|
1783
|
-
return Math.max(...
|
|
1785
|
+
return Math.max(..._);
|
|
1784
1786
|
},
|
|
1785
1787
|
[o.heights, a]
|
|
1786
1788
|
);
|
|
1787
1789
|
z(() => {
|
|
1788
1790
|
n(a);
|
|
1789
1791
|
}, [a, n]);
|
|
1790
|
-
const g = k(() => e ===
|
|
1791
|
-
const { rowsHeight:
|
|
1792
|
+
const g = k(() => e === re.HORIZONTAL_SCROLLING || e === re.PAGE_SCROLLING ? 1 : Math.round(s / a), [a, s, e]), C = k(() => o.heights.reduce((P, _) => P + _, 0) / o.heights.length || 0, [o]), u = k(() => o.widths.reduce((P, _) => P + _, 0) / o.widths.length || 0, [o]), T = k(() => {
|
|
1793
|
+
const { rowsHeight: P, columnsWidth: _ } = xt(o, a);
|
|
1792
1794
|
return {
|
|
1793
|
-
rowsHeight:
|
|
1794
|
-
columnsWidth:
|
|
1795
|
+
rowsHeight: P,
|
|
1796
|
+
columnsWidth: _
|
|
1795
1797
|
};
|
|
1796
|
-
}, [o, a]),
|
|
1797
|
-
width:
|
|
1798
|
-
height:
|
|
1799
|
-
}), [
|
|
1798
|
+
}, [o, a]), b = k(() => ({
|
|
1799
|
+
width: T.columnsWidth.reduce((P, _) => P + _, 0),
|
|
1800
|
+
height: T.rowsHeight.reduce((P, _) => P + _, 0)
|
|
1801
|
+
}), [T]);
|
|
1800
1802
|
return {
|
|
1801
1803
|
rowCount: g,
|
|
1802
1804
|
rowHeight: m,
|
|
@@ -1805,89 +1807,89 @@ const fi = () => {
|
|
|
1805
1807
|
pageDimension: o,
|
|
1806
1808
|
estimatedRowHeight: C,
|
|
1807
1809
|
estimatedColumnWidth: u,
|
|
1808
|
-
gridDimension:
|
|
1809
|
-
totalDimension:
|
|
1810
|
+
gridDimension: T,
|
|
1811
|
+
totalDimension: b
|
|
1810
1812
|
};
|
|
1811
1813
|
};
|
|
1812
1814
|
let le;
|
|
1813
1815
|
typeof window < "u" ? le = window : typeof self < "u" ? le = self : le = global;
|
|
1814
1816
|
let Tt = null, Ct = null;
|
|
1815
|
-
const
|
|
1816
|
-
gt == null ||
|
|
1817
|
-
return
|
|
1817
|
+
const nn = 20, mt = le.clearTimeout, on = le.setTimeout, gt = le.cancelAnimationFrame || le.mozCancelAnimationFrame || le.webkitCancelAnimationFrame, rn = le.requestAnimationFrame || le.mozRequestAnimationFrame || le.webkitRequestAnimationFrame;
|
|
1818
|
+
gt == null || rn == null ? (Tt = mt, Ct = function(e) {
|
|
1819
|
+
return on(e, nn);
|
|
1818
1820
|
}) : (Tt = function([e, n]) {
|
|
1819
1821
|
gt(e), mt(n);
|
|
1820
1822
|
}, Ct = function(e) {
|
|
1821
|
-
const n =
|
|
1823
|
+
const n = rn(function() {
|
|
1822
1824
|
mt(r), e();
|
|
1823
|
-
}), r =
|
|
1825
|
+
}), r = on(function() {
|
|
1824
1826
|
gt(n), e();
|
|
1825
|
-
},
|
|
1827
|
+
}, nn);
|
|
1826
1828
|
return [n, r];
|
|
1827
1829
|
});
|
|
1828
|
-
function
|
|
1830
|
+
function fi(t) {
|
|
1829
1831
|
let e, n, r, o, s, a, d;
|
|
1830
1832
|
const c = typeof document < "u" && document.attachEvent;
|
|
1831
1833
|
if (!c) {
|
|
1832
|
-
a = function(
|
|
1833
|
-
const p =
|
|
1834
|
-
|
|
1835
|
-
}, s = function(
|
|
1836
|
-
return
|
|
1837
|
-
}, d = function(
|
|
1838
|
-
if (
|
|
1834
|
+
a = function(y) {
|
|
1835
|
+
const p = y.__resizeTriggers__, f = p.firstElementChild, h = p.lastElementChild, l = f.firstElementChild;
|
|
1836
|
+
h.scrollLeft = h.scrollWidth, h.scrollTop = h.scrollHeight, l.style.width = f.offsetWidth + 1 + "px", l.style.height = f.offsetHeight + 1 + "px", f.scrollLeft = f.scrollWidth, f.scrollTop = f.scrollHeight;
|
|
1837
|
+
}, s = function(y) {
|
|
1838
|
+
return y.offsetWidth !== y.__resizeLast__.width || y.offsetHeight !== y.__resizeLast__.height;
|
|
1839
|
+
}, d = function(y) {
|
|
1840
|
+
if (y.target.className && typeof y.target.className.indexOf == "function" && y.target.className.indexOf("contract-trigger") < 0 && y.target.className.indexOf("expand-trigger") < 0)
|
|
1839
1841
|
return;
|
|
1840
1842
|
const p = this;
|
|
1841
1843
|
a(this), this.__resizeRAF__ && Tt(this.__resizeRAF__), this.__resizeRAF__ = Ct(function() {
|
|
1842
1844
|
s(p) && (p.__resizeLast__.width = p.offsetWidth, p.__resizeLast__.height = p.offsetHeight, p.__resizeListeners__.forEach(function(l) {
|
|
1843
|
-
l.call(p,
|
|
1845
|
+
l.call(p, y);
|
|
1844
1846
|
}));
|
|
1845
1847
|
});
|
|
1846
1848
|
};
|
|
1847
|
-
let u = !1,
|
|
1849
|
+
let u = !1, T = "";
|
|
1848
1850
|
r = "animationstart";
|
|
1849
|
-
const
|
|
1850
|
-
let
|
|
1851
|
+
const b = "Webkit Moz O ms".split(" ");
|
|
1852
|
+
let P = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), _ = "";
|
|
1851
1853
|
{
|
|
1852
|
-
const
|
|
1853
|
-
if (
|
|
1854
|
-
for (let p = 0; p <
|
|
1855
|
-
if (
|
|
1856
|
-
|
|
1854
|
+
const y = document.createElement("fakeelement");
|
|
1855
|
+
if (y.style.animationName !== void 0 && (u = !0), u === !1) {
|
|
1856
|
+
for (let p = 0; p < b.length; p++)
|
|
1857
|
+
if (y.style[b[p] + "AnimationName"] !== void 0) {
|
|
1858
|
+
_ = b[p], T = "-" + _.toLowerCase() + "-", r = P[p], u = !0;
|
|
1857
1859
|
break;
|
|
1858
1860
|
}
|
|
1859
1861
|
}
|
|
1860
1862
|
}
|
|
1861
|
-
n = "resizeanim", e = "@" +
|
|
1863
|
+
n = "resizeanim", e = "@" + T + "keyframes " + n + " { from { opacity: 0; } to { opacity: 0; } } ", o = T + "animation: 1ms " + n + "; ";
|
|
1862
1864
|
}
|
|
1863
1865
|
const m = function(u) {
|
|
1864
1866
|
if (!u.getElementById("detectElementResize")) {
|
|
1865
|
-
const
|
|
1866
|
-
|
|
1867
|
+
const T = (e || "") + ".resize-triggers { " + (o || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', b = u.head || u.getElementsByTagName("head")[0], P = u.createElement("style");
|
|
1868
|
+
P.id = "detectElementResize", P.type = "text/css", t != null && P.setAttribute("nonce", t), P.styleSheet ? P.styleSheet.cssText = T : P.appendChild(u.createTextNode(T)), b.appendChild(P);
|
|
1867
1869
|
}
|
|
1868
1870
|
};
|
|
1869
1871
|
return {
|
|
1870
|
-
addResizeListener: function(u,
|
|
1872
|
+
addResizeListener: function(u, T) {
|
|
1871
1873
|
if (c)
|
|
1872
|
-
u.attachEvent("onresize",
|
|
1874
|
+
u.attachEvent("onresize", T);
|
|
1873
1875
|
else {
|
|
1874
1876
|
if (!u.__resizeTriggers__) {
|
|
1875
|
-
const
|
|
1876
|
-
|
|
1877
|
-
const
|
|
1878
|
-
|
|
1879
|
-
const
|
|
1880
|
-
|
|
1881
|
-
|
|
1877
|
+
const b = u.ownerDocument, P = le.getComputedStyle(u);
|
|
1878
|
+
P && P.position === "static" && (u.style.position = "relative"), m(b), u.__resizeLast__ = {}, u.__resizeListeners__ = [], (u.__resizeTriggers__ = b.createElement("div")).className = "resize-triggers";
|
|
1879
|
+
const _ = b.createElement("div");
|
|
1880
|
+
_.className = "expand-trigger", _.appendChild(b.createElement("div"));
|
|
1881
|
+
const y = b.createElement("div");
|
|
1882
|
+
y.className = "contract-trigger", u.__resizeTriggers__.appendChild(_), u.__resizeTriggers__.appendChild(y), u.appendChild(u.__resizeTriggers__), a(u), u.addEventListener("scroll", d, !0), r && (u.__resizeTriggers__.__animationListener__ = function(f) {
|
|
1883
|
+
f.animationName === n && a(u);
|
|
1882
1884
|
}, u.__resizeTriggers__.addEventListener(r, u.__resizeTriggers__.__animationListener__));
|
|
1883
1885
|
}
|
|
1884
|
-
u.__resizeListeners__.push(
|
|
1886
|
+
u.__resizeListeners__.push(T);
|
|
1885
1887
|
}
|
|
1886
1888
|
},
|
|
1887
|
-
removeResizeListener: function(u,
|
|
1889
|
+
removeResizeListener: function(u, T) {
|
|
1888
1890
|
if (c)
|
|
1889
|
-
u.detachEvent("onresize",
|
|
1890
|
-
else if (u.__resizeListeners__.splice(u.__resizeListeners__.indexOf(
|
|
1891
|
+
u.detachEvent("onresize", T);
|
|
1892
|
+
else if (u.__resizeListeners__.splice(u.__resizeListeners__.indexOf(T), 1), !u.__resizeListeners__.length) {
|
|
1891
1893
|
u.removeEventListener("scroll", d, !0), u.__resizeTriggers__.__animationListener__ && (u.__resizeTriggers__.removeEventListener(r, u.__resizeTriggers__.__animationListener__), u.__resizeTriggers__.__animationListener__ = null);
|
|
1892
1894
|
try {
|
|
1893
1895
|
u.__resizeTriggers__ = !u.removeChild(u.__resizeTriggers__);
|
|
@@ -1897,7 +1899,7 @@ function mi(t) {
|
|
|
1897
1899
|
}
|
|
1898
1900
|
};
|
|
1899
1901
|
}
|
|
1900
|
-
class
|
|
1902
|
+
class mi extends co {
|
|
1901
1903
|
constructor(...e) {
|
|
1902
1904
|
super(...e), this.state = {
|
|
1903
1905
|
height: this.props.defaultHeight || 0,
|
|
@@ -1916,7 +1918,7 @@ class gi extends lo {
|
|
|
1916
1918
|
height: C,
|
|
1917
1919
|
width: u
|
|
1918
1920
|
});
|
|
1919
|
-
const
|
|
1921
|
+
const T = () => {
|
|
1920
1922
|
this._didLogDeprecationWarning || (this._didLogDeprecationWarning = !0, console.warn("scaledWidth and scaledHeight parameters have been deprecated; use width and height instead"));
|
|
1921
1923
|
};
|
|
1922
1924
|
typeof o == "function" && o({
|
|
@@ -1924,10 +1926,10 @@ class gi extends lo {
|
|
|
1924
1926
|
width: u,
|
|
1925
1927
|
// TODO Remove these params in the next major release
|
|
1926
1928
|
get scaledHeight() {
|
|
1927
|
-
return
|
|
1929
|
+
return T(), C;
|
|
1928
1930
|
},
|
|
1929
1931
|
get scaledWidth() {
|
|
1930
|
-
return
|
|
1932
|
+
return T(), u;
|
|
1931
1933
|
}
|
|
1932
1934
|
});
|
|
1933
1935
|
}
|
|
@@ -1945,7 +1947,7 @@ class gi extends lo {
|
|
|
1945
1947
|
const r = n.ownerDocument.defaultView.ResizeObserver;
|
|
1946
1948
|
r != null ? (this._resizeObserver = new r(() => {
|
|
1947
1949
|
this._timeoutId = setTimeout(this._onResize, 0);
|
|
1948
|
-
}), this._resizeObserver.observe(n)) : (this._detectElementResize =
|
|
1950
|
+
}), this._resizeObserver.observe(n)) : (this._detectElementResize = fi(e), this._detectElementResize.addResizeListener(n, this._onResize)), this._onResize();
|
|
1949
1951
|
}
|
|
1950
1952
|
}
|
|
1951
1953
|
componentWillUnmount() {
|
|
@@ -1966,22 +1968,22 @@ class gi extends lo {
|
|
|
1966
1968
|
...C
|
|
1967
1969
|
} = this.props, {
|
|
1968
1970
|
height: u,
|
|
1969
|
-
width:
|
|
1970
|
-
} = this.state,
|
|
1971
|
+
width: T
|
|
1972
|
+
} = this.state, b = {
|
|
1971
1973
|
overflow: "visible"
|
|
1972
|
-
},
|
|
1973
|
-
let
|
|
1974
|
-
return o || (u === 0 && (
|
|
1974
|
+
}, P = {};
|
|
1975
|
+
let _ = !1;
|
|
1976
|
+
return o || (u === 0 && (_ = !0), b.height = 0, P.height = u, P.scaledHeight = u), s || (T === 0 && (_ = !0), b.width = 0, P.width = T, P.scaledWidth = T), a && (_ = !1), Ke(g, {
|
|
1975
1977
|
ref: this._setRef,
|
|
1976
1978
|
style: {
|
|
1977
|
-
...
|
|
1979
|
+
...b,
|
|
1978
1980
|
...m
|
|
1979
1981
|
},
|
|
1980
1982
|
...C
|
|
1981
|
-
}, !
|
|
1983
|
+
}, !_ && e(P));
|
|
1982
1984
|
}
|
|
1983
1985
|
}
|
|
1984
|
-
const
|
|
1986
|
+
const gi = un(({ widths: t, heights: e }) => {
|
|
1985
1987
|
const { focusedPage: n, totalPages: r } = ue(), o = k(() => {
|
|
1986
1988
|
const d = [], c = Math.ceil(n / 2) * 2 - 1;
|
|
1987
1989
|
if (d.push(c), c + 1 <= r) {
|
|
@@ -2007,7 +2009,7 @@ const vi = pn(({ widths: t, heights: e }) => {
|
|
|
2007
2009
|
];
|
|
2008
2010
|
}, [t, e, o]), a = k(() => s.reduce((d, c) => d + Number(c.width || 0), 0), [s]);
|
|
2009
2011
|
return /* @__PURE__ */ i("div", { style: { width: a, position: "relative" }, children: o.map((d, c) => /* @__PURE__ */ i(Ot, { style: s[c], pageNumber: d }, d)) });
|
|
2010
|
-
}),
|
|
2012
|
+
}), vi = ({ widths: t, heights: e }) => {
|
|
2011
2013
|
const { focusedPage: n } = ue(), r = k(() => ({
|
|
2012
2014
|
position: "absolute",
|
|
2013
2015
|
width: t(n - 1),
|
|
@@ -2023,17 +2025,17 @@ const vi = pn(({ widths: t, heights: e }) => {
|
|
|
2023
2025
|
children: /* @__PURE__ */ i(Ot, { style: r, pageNumber: n }, n)
|
|
2024
2026
|
}
|
|
2025
2027
|
);
|
|
2026
|
-
},
|
|
2027
|
-
const r = M(), { contentRef: o } = Te(), { heights: s, widths: a } = Ze(), { setFocusedPage: d } = ue(), [c, m] = $([]), { targetScrollPage: g } =
|
|
2028
|
-
const { rowsHeight:
|
|
2029
|
-
return s.map((
|
|
2030
|
-
const p = a[
|
|
2028
|
+
}, wi = (t, e, n) => {
|
|
2029
|
+
const r = M(), { contentRef: o } = Te(), { heights: s, widths: a } = Ze(), { setFocusedPage: d } = ue(), [c, m] = $([]), { targetScrollPage: g } = fn(), C = Rt(c, 0, 500), u = k(() => {
|
|
2030
|
+
const { rowsHeight: b, columnsWidth: P } = xt({ heights: s, widths: a }, t);
|
|
2031
|
+
return s.map((_, y) => {
|
|
2032
|
+
const p = a[y], f = rr(y + 1, t), h = P.slice(0, f.columnIndex).reduce((I, x) => I + x, 0), l = b.slice(0, f.rowIndex).reduce((I, x) => I + x, 0), v = h + p, w = l + _;
|
|
2031
2033
|
return {
|
|
2032
|
-
pageNumber:
|
|
2033
|
-
...
|
|
2034
|
+
pageNumber: y + 1,
|
|
2035
|
+
...f,
|
|
2034
2036
|
width: p,
|
|
2035
|
-
height:
|
|
2036
|
-
startX:
|
|
2037
|
+
height: _,
|
|
2038
|
+
startX: h,
|
|
2037
2039
|
startY: l,
|
|
2038
2040
|
endX: v,
|
|
2039
2041
|
endY: w
|
|
@@ -2041,42 +2043,42 @@ const vi = pn(({ widths: t, heights: e }) => {
|
|
|
2041
2043
|
});
|
|
2042
2044
|
}, [s, a, t, e]);
|
|
2043
2045
|
z(() => {
|
|
2044
|
-
var
|
|
2045
|
-
C.length > 0 && !g.current && d(C[0].pageNumber), ((
|
|
2046
|
+
var P;
|
|
2047
|
+
C.length > 0 && !g.current && d(C[0].pageNumber), ((P = C[0]) == null ? void 0 : P.ratio) && C.some((_) => _.pageNumber === g.current) && setTimeout(() => {
|
|
2046
2048
|
g.current = void 0;
|
|
2047
2049
|
}, 500);
|
|
2048
2050
|
}, [C, d]);
|
|
2049
|
-
const
|
|
2050
|
-
(
|
|
2051
|
+
const T = N(
|
|
2052
|
+
(b) => {
|
|
2051
2053
|
r.current && cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
|
2052
|
-
const
|
|
2053
|
-
startTop:
|
|
2054
|
-
startLeft:
|
|
2055
|
-
endTop:
|
|
2056
|
-
endLeft:
|
|
2057
|
-
},
|
|
2058
|
-
const
|
|
2059
|
-
return
|
|
2054
|
+
const P = b.target, _ = {
|
|
2055
|
+
startTop: P.scrollTop,
|
|
2056
|
+
startLeft: P.scrollLeft,
|
|
2057
|
+
endTop: P.scrollTop + P.clientHeight,
|
|
2058
|
+
endLeft: P.scrollLeft + P.clientWidth
|
|
2059
|
+
}, y = u.filter((p) => {
|
|
2060
|
+
const f = p.endX >= _.startLeft && p.endY >= _.startTop, h = p.startX <= _.endLeft && p.startY <= _.endTop;
|
|
2061
|
+
return f && h;
|
|
2060
2062
|
}).map((p) => {
|
|
2061
|
-
const
|
|
2063
|
+
const f = _.startLeft > p.startX ? _.startLeft : p.startX, h = _.startTop > p.startY ? _.startTop : p.startY, l = _.endLeft < p.endX ? _.endLeft : p.endX, v = _.endTop < p.endY ? _.endTop : p.endY, w = l - f, I = v - h, S = +(w * I / (p.width * p.height) * 100).toFixed(2);
|
|
2062
2064
|
return {
|
|
2063
2065
|
pageNumber: p.pageNumber,
|
|
2064
2066
|
ratio: S
|
|
2065
2067
|
};
|
|
2066
|
-
}).sort((p,
|
|
2067
|
-
m(
|
|
2068
|
+
}).sort((p, f) => f.ratio - p.ratio);
|
|
2069
|
+
m(y);
|
|
2068
2070
|
});
|
|
2069
2071
|
},
|
|
2070
2072
|
[o, u]
|
|
2071
2073
|
);
|
|
2072
2074
|
z(() => {
|
|
2073
2075
|
if (n)
|
|
2074
|
-
return n == null || n.addEventListener("scroll",
|
|
2075
|
-
n == null || n.removeEventListener("scroll",
|
|
2076
|
+
return n == null || n.addEventListener("scroll", T), () => {
|
|
2077
|
+
n == null || n.removeEventListener("scroll", T);
|
|
2076
2078
|
};
|
|
2077
|
-
}, [n,
|
|
2078
|
-
},
|
|
2079
|
-
const { children: n, toolbarRef: r, style: o, className: s, ...a } = t, { customVariables: d, customDarkVariables: c } =
|
|
2079
|
+
}, [n, T]);
|
|
2080
|
+
}, Nn = rt((t, e) => {
|
|
2081
|
+
const { children: n, toolbarRef: r, style: o, className: s, ...a } = t, { customVariables: d, customDarkVariables: c } = Eo(), { darkMode: m } = mo();
|
|
2080
2082
|
return /* @__PURE__ */ i(
|
|
2081
2083
|
"div",
|
|
2082
2084
|
{
|
|
@@ -2097,12 +2099,12 @@ const vi = pn(({ widths: t, heights: e }) => {
|
|
|
2097
2099
|
children: n
|
|
2098
2100
|
}
|
|
2099
2101
|
);
|
|
2100
|
-
}),
|
|
2101
|
-
const o =
|
|
2102
|
+
}), _i = un(({ columnIndex: t, rowIndex: e, data: n, style: r }) => {
|
|
2103
|
+
const o = ir(e, t, n.columnCount);
|
|
2102
2104
|
return /* @__PURE__ */ i(Ot, { style: r, pageNumber: o }, o);
|
|
2103
|
-
},
|
|
2104
|
-
const { initialPage: t = 1, initialScrollMode: e, instanceId: n } = Pt(), { pagesRef: r, setPagesRef: o, setContentRef: s } = Te(), { scrollToPage: a } =
|
|
2105
|
-
|
|
2105
|
+
}, pi), wc = () => {
|
|
2106
|
+
const { initialPage: t = 1, initialScrollMode: e, instanceId: n } = Pt(), { pagesRef: r, setPagesRef: o, setContentRef: s } = Te(), { scrollToPage: a } = bn();
|
|
2107
|
+
dr(r);
|
|
2106
2108
|
const {
|
|
2107
2109
|
virtualScrollRef: d,
|
|
2108
2110
|
getVirtualScrollRef: c,
|
|
@@ -2110,39 +2112,39 @@ const vi = pn(({ widths: t, heights: e }) => {
|
|
|
2110
2112
|
getVirtualScrollableElementRef: g,
|
|
2111
2113
|
setTotalInnerDimensions: C,
|
|
2112
2114
|
virtualScrollableElementRef: u,
|
|
2113
|
-
totalInnerDimensions:
|
|
2114
|
-
pageScrollElementRef:
|
|
2115
|
-
} = nt(),
|
|
2116
|
-
|
|
2115
|
+
totalInnerDimensions: T,
|
|
2116
|
+
pageScrollElementRef: b
|
|
2117
|
+
} = nt(), P = M(!0), { nextPage: _, prevPage: y, setFocusedPage: p, focusedPage: f } = ue(), { scrollMode: h } = De(), { viewMode: l } = Me(), v = M(null), { loading: w, error: I } = oe(), { passwordRequired: x } = fo(), { LoaderImageComponent: S } = yt(), L = M(
|
|
2118
|
+
T
|
|
2117
2119
|
), O = M({
|
|
2118
2120
|
viewMode: l,
|
|
2119
|
-
scrollMode:
|
|
2120
|
-
}), D = M(!1), F = M(), { isFullScreen: E } =
|
|
2121
|
+
scrollMode: h
|
|
2122
|
+
}), D = M(!1), F = M(), { isFullScreen: E } = wo(), {
|
|
2121
2123
|
pageDimension: R,
|
|
2122
2124
|
rowCount: A,
|
|
2123
|
-
rowHeight:
|
|
2125
|
+
rowHeight: q,
|
|
2124
2126
|
columnCount: H,
|
|
2125
2127
|
columnWidth: U,
|
|
2126
2128
|
estimatedColumnWidth: X,
|
|
2127
2129
|
estimatedRowHeight: V,
|
|
2128
2130
|
totalDimension: ie
|
|
2129
|
-
} =
|
|
2130
|
-
|
|
2131
|
+
} = hi(), G = Rt(T, 100), { onScroll: Z } = Lo(), Y = M();
|
|
2132
|
+
wi(H, A, u);
|
|
2131
2133
|
const te = M({
|
|
2132
2134
|
scrollTop: 0,
|
|
2133
2135
|
scrollLeft: 0
|
|
2134
2136
|
});
|
|
2135
|
-
|
|
2136
|
-
const { isPressed: J } =
|
|
2137
|
+
cr(r);
|
|
2138
|
+
const { isPressed: J } = sr(), { selectionMode: ee } = vo(), { initializeGrabScroll: ve, resetGrabState: we } = ar({
|
|
2137
2139
|
isPressed: J
|
|
2138
|
-
}), pe = k(() => ee ===
|
|
2140
|
+
}), pe = k(() => ee === po.HAND, [ee]), at = k(() => ({
|
|
2139
2141
|
columnCount: H
|
|
2140
2142
|
}), [H]), He = N(
|
|
2141
2143
|
(B) => {
|
|
2142
2144
|
const j = document.activeElement !== r;
|
|
2143
|
-
!E && j || (["ArrowUp", "ArrowLeft"].includes(B.key) ? (B.preventDefault(),
|
|
2145
|
+
!E && j || (["ArrowUp", "ArrowLeft"].includes(B.key) ? (B.preventDefault(), y()) : ["ArrowDown", "ArrowRight"].includes(B.key) && (B.preventDefault(), _()));
|
|
2144
2146
|
},
|
|
2145
|
-
[
|
|
2147
|
+
[_, y, E, h]
|
|
2146
2148
|
);
|
|
2147
2149
|
z(() => (window.addEventListener("keydown", He), () => {
|
|
2148
2150
|
window.removeEventListener("keydown", He);
|
|
@@ -2156,7 +2158,7 @@ const vi = pn(({ widths: t, heights: e }) => {
|
|
|
2156
2158
|
shouldForceUpdate: !0
|
|
2157
2159
|
});
|
|
2158
2160
|
}, [A, H, R, d]);
|
|
2159
|
-
const
|
|
2161
|
+
const Jn = N(
|
|
2160
2162
|
(B, j) => {
|
|
2161
2163
|
if (!u)
|
|
2162
2164
|
return { scrollTop: 0, scrollLeft: 0 };
|
|
@@ -2169,10 +2171,10 @@ const vi = pn(({ widths: t, heights: e }) => {
|
|
|
2169
2171
|
[u]
|
|
2170
2172
|
), Ft = N(
|
|
2171
2173
|
(B, j) => {
|
|
2172
|
-
if (O.current.viewMode !== l || O.current.scrollMode !==
|
|
2173
|
-
Y.current && clearTimeout(Y.current), D.current = !0, a(
|
|
2174
|
+
if (O.current.viewMode !== l || O.current.scrollMode !== h) {
|
|
2175
|
+
Y.current && clearTimeout(Y.current), D.current = !0, a(f, "auto"), Y.current = setTimeout(() => {
|
|
2174
2176
|
requestAnimationFrame(() => {
|
|
2175
|
-
O.current = { viewMode: l, scrollMode:
|
|
2177
|
+
O.current = { viewMode: l, scrollMode: h };
|
|
2176
2178
|
});
|
|
2177
2179
|
}, 100);
|
|
2178
2180
|
return;
|
|
@@ -2184,12 +2186,12 @@ const vi = pn(({ widths: t, heights: e }) => {
|
|
|
2184
2186
|
const { height: Le, width: lt } = j, { height: kt, width: Wt } = L.current;
|
|
2185
2187
|
if (kt === Le && Wt === lt)
|
|
2186
2188
|
return;
|
|
2187
|
-
const
|
|
2189
|
+
const oo = Re / kt * Le, ro = ct / Wt * lt, io = Math.round(Math.min(oo, Le)) || 0, so = Math.round(Math.min(ro, lt)) || 0;
|
|
2188
2190
|
F.current = setTimeout(() => {
|
|
2189
2191
|
requestAnimationFrame(() => {
|
|
2190
2192
|
u == null || u.scrollTo({
|
|
2191
|
-
top:
|
|
2192
|
-
left:
|
|
2193
|
+
top: io,
|
|
2194
|
+
left: so,
|
|
2193
2195
|
behavior: "auto"
|
|
2194
2196
|
});
|
|
2195
2197
|
});
|
|
@@ -2198,23 +2200,23 @@ const vi = pn(({ widths: t, heights: e }) => {
|
|
|
2198
2200
|
width: j.width
|
|
2199
2201
|
};
|
|
2200
2202
|
},
|
|
2201
|
-
[u, l,
|
|
2203
|
+
[u, l, h, a]
|
|
2202
2204
|
);
|
|
2203
2205
|
z(() => {
|
|
2204
2206
|
clearTimeout(F.current);
|
|
2205
2207
|
const B = Array.from({ length: A }).reduce(
|
|
2206
|
-
(Re, ct, Le) => Re +
|
|
2208
|
+
(Re, ct, Le) => Re + q(Le),
|
|
2207
2209
|
0
|
|
2208
2210
|
), j = Array.from({ length: H }).reduce(
|
|
2209
2211
|
(Re, ct, Le) => Re + U(Le),
|
|
2210
2212
|
0
|
|
2211
|
-
), xe =
|
|
2213
|
+
), xe = Jn(j, B);
|
|
2212
2214
|
te.current = xe, Ft(xe, { height: B, width: j }), C({
|
|
2213
2215
|
height: B,
|
|
2214
2216
|
width: j
|
|
2215
2217
|
});
|
|
2216
2218
|
}, [R, A, H, Ft]);
|
|
2217
|
-
const
|
|
2219
|
+
const eo = N(
|
|
2218
2220
|
(B) => {
|
|
2219
2221
|
te.current = {
|
|
2220
2222
|
scrollTop: B.scrollTop,
|
|
@@ -2225,16 +2227,16 @@ const vi = pn(({ widths: t, heights: e }) => {
|
|
|
2225
2227
|
);
|
|
2226
2228
|
z(() => {
|
|
2227
2229
|
if (Z)
|
|
2228
|
-
return
|
|
2229
|
-
|
|
2230
|
+
return b && b.addEventListener("scroll", Z), u && u.addEventListener("scroll", Z), () => {
|
|
2231
|
+
b == null || b.removeEventListener("scroll", Z), u == null || u.removeEventListener("scroll", Z);
|
|
2230
2232
|
};
|
|
2231
|
-
}, [u,
|
|
2233
|
+
}, [u, b, Z]), z(() => () => {
|
|
2232
2234
|
Y.current && clearTimeout(Y.current);
|
|
2233
2235
|
}, []);
|
|
2234
|
-
const
|
|
2236
|
+
const to = k(() => se(ae["rp-pages-container"], {
|
|
2235
2237
|
[ae["rp-cursor-grab"]]: pe && !J,
|
|
2236
2238
|
[ae["rp-cursor-grabbing"]]: pe && J
|
|
2237
|
-
}), [pe, J]),
|
|
2239
|
+
}), [pe, J]), no = N(
|
|
2238
2240
|
(B) => {
|
|
2239
2241
|
if (pe && B) {
|
|
2240
2242
|
const j = se(ae["rp-pages"]), xe = document.querySelector(`.${j}`);
|
|
@@ -2246,46 +2248,46 @@ const vi = pn(({ widths: t, heights: e }) => {
|
|
|
2246
2248
|
return z(() => {
|
|
2247
2249
|
w && we();
|
|
2248
2250
|
}, [w]), z(() => {
|
|
2249
|
-
if (!(
|
|
2250
|
-
if (e ===
|
|
2251
|
-
t !==
|
|
2251
|
+
if (!(G.height === 0 || !P.current)) {
|
|
2252
|
+
if (e === re.PAGE_SCROLLING) {
|
|
2253
|
+
t !== f && b && p(t), P.current = !1;
|
|
2252
2254
|
return;
|
|
2253
2255
|
}
|
|
2254
|
-
a(t, "auto"), p(t),
|
|
2256
|
+
a(t, "auto"), p(t), P.current = !1;
|
|
2255
2257
|
}
|
|
2256
2258
|
}, [
|
|
2257
2259
|
a,
|
|
2258
2260
|
e,
|
|
2259
|
-
|
|
2261
|
+
b,
|
|
2260
2262
|
p,
|
|
2261
|
-
|
|
2263
|
+
G
|
|
2262
2264
|
]), /* @__PURE__ */ W(he, { children: [
|
|
2263
|
-
/* @__PURE__ */ i(
|
|
2264
|
-
|
|
2265
|
+
/* @__PURE__ */ i(Go, { ref: s, children: /* @__PURE__ */ i(
|
|
2266
|
+
Nn,
|
|
2265
2267
|
{
|
|
2266
2268
|
id: n,
|
|
2267
2269
|
ref: o,
|
|
2268
2270
|
tabIndex: -1,
|
|
2269
|
-
className:
|
|
2270
|
-
children: /* @__PURE__ */ i(
|
|
2271
|
+
className: to,
|
|
2272
|
+
children: /* @__PURE__ */ i(mi, { style: { minHeight: "50px" }, children: ({ width: B, height: j }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: no, style: { width: B, height: j }, children: h === re.PAGE_SCROLLING ? /* @__PURE__ */ i(
|
|
2271
2273
|
"div",
|
|
2272
2274
|
{
|
|
2273
2275
|
ref: m,
|
|
2274
2276
|
style: { width: B, height: j },
|
|
2275
2277
|
className: se(ae["rp-pages"], ae["rp-page-scrolling-wrapper"]),
|
|
2276
|
-
children: l === Ne.DUAL_PAGE ? /* @__PURE__ */ i(
|
|
2278
|
+
children: l === Ne.DUAL_PAGE ? /* @__PURE__ */ i(gi, { widths: U, heights: q }) : /* @__PURE__ */ i(vi, { widths: U, heights: q })
|
|
2277
2279
|
}
|
|
2278
2280
|
) : V ? /* @__PURE__ */ i(
|
|
2279
|
-
|
|
2281
|
+
li,
|
|
2280
2282
|
{
|
|
2281
2283
|
ref: c,
|
|
2282
2284
|
itemData: at,
|
|
2283
2285
|
outerRef: g,
|
|
2284
2286
|
innerRef: v,
|
|
2285
|
-
onScroll:
|
|
2287
|
+
onScroll: eo,
|
|
2286
2288
|
columnCount: H,
|
|
2287
2289
|
columnWidth: U,
|
|
2288
|
-
rowHeight:
|
|
2290
|
+
rowHeight: q,
|
|
2289
2291
|
height: j,
|
|
2290
2292
|
width: B,
|
|
2291
2293
|
estimatedColumnWidth: X,
|
|
@@ -2293,7 +2295,7 @@ const vi = pn(({ widths: t, heights: e }) => {
|
|
|
2293
2295
|
rowCount: A,
|
|
2294
2296
|
className: se(
|
|
2295
2297
|
ae["rp-pages"],
|
|
2296
|
-
|
|
2298
|
+
h === re.HORIZONTAL_SCROLLING ? ae["rp-pages-horizontal-scroll"] : ""
|
|
2297
2299
|
),
|
|
2298
2300
|
style: {
|
|
2299
2301
|
"--rp-pages-height": `${ie.height}px`,
|
|
@@ -2301,7 +2303,7 @@ const vi = pn(({ widths: t, heights: e }) => {
|
|
|
2301
2303
|
"--rp-row-count": `${A}`,
|
|
2302
2304
|
"--rp-column-count": `${H}`
|
|
2303
2305
|
},
|
|
2304
|
-
children:
|
|
2306
|
+
children: _i
|
|
2305
2307
|
}
|
|
2306
2308
|
) : !w && !I ? /* @__PURE__ */ i(
|
|
2307
2309
|
"div",
|
|
@@ -2316,7 +2318,7 @@ const vi = pn(({ widths: t, heights: e }) => {
|
|
|
2316
2318
|
},
|
|
2317
2319
|
children: S && /* @__PURE__ */ i(S, {})
|
|
2318
2320
|
}
|
|
2319
|
-
) : I ===
|
|
2321
|
+
) : I === ho.NOT_SUPPORTED ? /* @__PURE__ */ i("div", { className: ae["rp-not-supported"], children: /* @__PURE__ */ W("div", { className: ae["rp-not-supported-content"], children: [
|
|
2320
2322
|
"React PDF is unable to render on this browser. Please use the supported browsers from the list below:",
|
|
2321
2323
|
/* @__PURE__ */ i("div", { children: /* @__PURE__ */ W("ul", { children: [
|
|
2322
2324
|
/* @__PURE__ */ i("li", { children: "Chrome 119+" }),
|
|
@@ -2329,7 +2331,7 @@ const vi = pn(({ widths: t, heights: e }) => {
|
|
|
2329
2331
|
] }) }) : null }) })
|
|
2330
2332
|
}
|
|
2331
2333
|
) }),
|
|
2332
|
-
x && /* @__PURE__ */ i(
|
|
2334
|
+
x && /* @__PURE__ */ i(lr, {})
|
|
2333
2335
|
] });
|
|
2334
2336
|
}, $e = {
|
|
2335
2337
|
"rp-toolbar-content": "_rp-toolbar-content_sz31z_1",
|
|
@@ -2341,31 +2343,31 @@ const vi = pn(({ widths: t, heights: e }) => {
|
|
|
2341
2343
|
"rp-paginate": "_rp-paginate_1gck0_1",
|
|
2342
2344
|
"rp-page-input": "_rp-page-input_1gck0_6",
|
|
2343
2345
|
"rp-total-page": "_rp-total-page_1gck0_18"
|
|
2344
|
-
},
|
|
2346
|
+
}, bi = () => {
|
|
2345
2347
|
const { prevIcon: t } = ge(), { prevIcon: e } = me();
|
|
2346
2348
|
return t || e || /* @__PURE__ */ i(Ue, {});
|
|
2347
|
-
},
|
|
2349
|
+
}, Ti = () => {
|
|
2348
2350
|
const { nextIcon: t } = ge(), { nextIcon: e } = me();
|
|
2349
2351
|
return t || e || /* @__PURE__ */ i(Ue, { style: { transform: "rotate(180deg" } });
|
|
2350
|
-
},
|
|
2351
|
-
const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: r, prevPage: o, goToPage: s } = ue(), [a, d] = $(t.toString()), { pageNavigationTool: c = !0 } = Ce(), { pageNavigationTool: m = !0 } = Ie(), { isSmallScreen: g } = Se(), { viewMode: C } = Me(), { scrollMode: u } = De(), { localeMessages:
|
|
2352
|
+
}, Ci = () => {
|
|
2353
|
+
const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: r, prevPage: o, goToPage: s } = ue(), [a, d] = $(t.toString()), { pageNavigationTool: c = !0 } = Ce(), { pageNavigationTool: m = !0 } = Ie(), { isSmallScreen: g } = Se(), { viewMode: C } = Me(), { scrollMode: u } = De(), { localeMessages: T } = de();
|
|
2352
2354
|
z(() => {
|
|
2353
2355
|
d(t.toString());
|
|
2354
2356
|
}, [t]);
|
|
2355
|
-
const
|
|
2356
|
-
const
|
|
2357
|
-
d(
|
|
2358
|
-
}, []),
|
|
2359
|
-
const
|
|
2360
|
-
|
|
2361
|
-
}, [s, a, e]),
|
|
2357
|
+
const b = N((f) => {
|
|
2358
|
+
const h = f.target.value;
|
|
2359
|
+
d(h);
|
|
2360
|
+
}, []), P = N(async () => {
|
|
2361
|
+
const f = s(a);
|
|
2362
|
+
f.success || d(f.currentPage.toString());
|
|
2363
|
+
}, [s, a, e]), _ = N(() => {
|
|
2362
2364
|
d(t.toString());
|
|
2363
|
-
}, [t]),
|
|
2364
|
-
(
|
|
2365
|
-
|
|
2365
|
+
}, [t]), y = N(
|
|
2366
|
+
(f) => {
|
|
2367
|
+
f.key === "Enter" && P();
|
|
2366
2368
|
},
|
|
2367
|
-
[
|
|
2368
|
-
), p = k(() => C === Ne.DUAL_PAGE && u ===
|
|
2369
|
+
[P]
|
|
2370
|
+
), p = k(() => C === Ne.DUAL_PAGE && u === re.PAGE_SCROLLING && t === e - 1 || t === e, [t, e, C, u]);
|
|
2369
2371
|
return !c || !m ? null : typeof c != "boolean" ? /* @__PURE__ */ i(
|
|
2370
2372
|
c,
|
|
2371
2373
|
{
|
|
@@ -2387,21 +2389,21 @@ const vi = pn(({ widths: t, heights: e }) => {
|
|
|
2387
2389
|
changePage: n
|
|
2388
2390
|
}
|
|
2389
2391
|
) : /* @__PURE__ */ W("div", { className: vt["rp-paginate"], children: [
|
|
2390
|
-
!g && /* @__PURE__ */ i(K, { content:
|
|
2392
|
+
!g && /* @__PURE__ */ i(K, { content: T == null ? void 0 : T.previousPageTooltip, children: /* @__PURE__ */ i(
|
|
2391
2393
|
ce,
|
|
2392
2394
|
{
|
|
2393
2395
|
onClick: o,
|
|
2394
|
-
"aria-label":
|
|
2396
|
+
"aria-label": T == null ? void 0 : T.previousPageTooltip,
|
|
2395
2397
|
"aria-disabled": t === 1,
|
|
2396
|
-
children: /* @__PURE__ */ i(
|
|
2398
|
+
children: /* @__PURE__ */ i(bi, {})
|
|
2397
2399
|
}
|
|
2398
2400
|
) }),
|
|
2399
|
-
/* @__PURE__ */ i(K, { content:
|
|
2400
|
-
|
|
2401
|
+
/* @__PURE__ */ i(K, { content: T == null ? void 0 : T.currentPageTooltip, children: /* @__PURE__ */ i(
|
|
2402
|
+
pn,
|
|
2401
2403
|
{
|
|
2402
|
-
onKeyDown:
|
|
2403
|
-
onBlur:
|
|
2404
|
-
onChange:
|
|
2404
|
+
onKeyDown: y,
|
|
2405
|
+
onBlur: _,
|
|
2406
|
+
onChange: b,
|
|
2405
2407
|
value: a,
|
|
2406
2408
|
className: vt["rp-page-input"],
|
|
2407
2409
|
id: "page-input",
|
|
@@ -2412,18 +2414,18 @@ const vi = pn(({ widths: t, heights: e }) => {
|
|
|
2412
2414
|
"/",
|
|
2413
2415
|
e
|
|
2414
2416
|
] }),
|
|
2415
|
-
!g && /* @__PURE__ */ i(K, { content:
|
|
2417
|
+
!g && /* @__PURE__ */ i(K, { content: T == null ? void 0 : T.nextPageTooltip, children: /* @__PURE__ */ i(
|
|
2416
2418
|
ce,
|
|
2417
2419
|
{
|
|
2418
2420
|
onClick: r,
|
|
2419
|
-
"aria-label":
|
|
2421
|
+
"aria-label": T == null ? void 0 : T.nextPageTooltip,
|
|
2420
2422
|
"aria-disabled": p,
|
|
2421
|
-
children: /* @__PURE__ */ i(
|
|
2423
|
+
children: /* @__PURE__ */ i(Ti, {})
|
|
2422
2424
|
}
|
|
2423
2425
|
) })
|
|
2424
2426
|
] });
|
|
2425
2427
|
};
|
|
2426
|
-
var st = "Dialog", [
|
|
2428
|
+
var st = "Dialog", [On, _c] = gr(st), [Pi, fe] = On(st), Dn = (t) => {
|
|
2427
2429
|
const {
|
|
2428
2430
|
__scopeDialog: e,
|
|
2429
2431
|
children: n,
|
|
@@ -2431,14 +2433,14 @@ var st = "Dialog", [Dn, bc] = vr(st), [yi, fe] = Dn(st), zn = (t) => {
|
|
|
2431
2433
|
defaultOpen: o,
|
|
2432
2434
|
onOpenChange: s,
|
|
2433
2435
|
modal: a = !0
|
|
2434
|
-
} = t, d = Q.useRef(null), c = Q.useRef(null), [m, g] =
|
|
2436
|
+
} = t, d = Q.useRef(null), c = Q.useRef(null), [m, g] = wr({
|
|
2435
2437
|
prop: r,
|
|
2436
2438
|
defaultProp: o ?? !1,
|
|
2437
2439
|
onChange: s,
|
|
2438
2440
|
caller: st
|
|
2439
2441
|
});
|
|
2440
2442
|
return /* @__PURE__ */ i(
|
|
2441
|
-
|
|
2443
|
+
Pi,
|
|
2442
2444
|
{
|
|
2443
2445
|
scope: e,
|
|
2444
2446
|
triggerRef: d,
|
|
@@ -2454,10 +2456,10 @@ var st = "Dialog", [Dn, bc] = vr(st), [yi, fe] = Dn(st), zn = (t) => {
|
|
|
2454
2456
|
}
|
|
2455
2457
|
);
|
|
2456
2458
|
};
|
|
2457
|
-
|
|
2458
|
-
var
|
|
2459
|
+
Dn.displayName = st;
|
|
2460
|
+
var zn = "DialogTrigger", yi = Q.forwardRef(
|
|
2459
2461
|
(t, e) => {
|
|
2460
|
-
const { __scopeDialog: n, ...r } = t, o = fe(
|
|
2462
|
+
const { __scopeDialog: n, ...r } = t, o = fe(zn, n), s = Lt(e, o.triggerRef);
|
|
2461
2463
|
return /* @__PURE__ */ i(
|
|
2462
2464
|
je.button,
|
|
2463
2465
|
{
|
|
@@ -2468,33 +2470,33 @@ var An = "DialogTrigger", Ii = Q.forwardRef(
|
|
|
2468
2470
|
"data-state": At(o.open),
|
|
2469
2471
|
...r,
|
|
2470
2472
|
ref: s,
|
|
2471
|
-
onClick:
|
|
2473
|
+
onClick: Ge(t.onClick, o.onOpenToggle)
|
|
2472
2474
|
}
|
|
2473
2475
|
);
|
|
2474
2476
|
}
|
|
2475
2477
|
);
|
|
2476
|
-
|
|
2477
|
-
var Dt = "DialogPortal", [
|
|
2478
|
+
yi.displayName = zn;
|
|
2479
|
+
var Dt = "DialogPortal", [Ii, An] = On(Dt, {
|
|
2478
2480
|
forceMount: void 0
|
|
2479
|
-
}),
|
|
2481
|
+
}), Fn = (t) => {
|
|
2480
2482
|
const { __scopeDialog: e, forceMount: n, children: r, container: o } = t, s = fe(Dt, e);
|
|
2481
|
-
return /* @__PURE__ */ i(
|
|
2483
|
+
return /* @__PURE__ */ i(Ii, { scope: e, forceMount: n, children: Q.Children.map(r, (a) => /* @__PURE__ */ i(Et, { present: n || s.open, children: /* @__PURE__ */ i(Ir, { asChild: !0, container: o, children: a }) })) });
|
|
2482
2484
|
};
|
|
2483
|
-
|
|
2484
|
-
var et = "DialogOverlay",
|
|
2485
|
+
Fn.displayName = Dt;
|
|
2486
|
+
var et = "DialogOverlay", kn = Q.forwardRef(
|
|
2485
2487
|
(t, e) => {
|
|
2486
|
-
const n =
|
|
2487
|
-
return s.modal ? /* @__PURE__ */ i(Et, { present: r || s.open, children: /* @__PURE__ */ i(
|
|
2488
|
+
const n = An(et, t.__scopeDialog), { forceMount: r = n.forceMount, ...o } = t, s = fe(et, t.__scopeDialog);
|
|
2489
|
+
return s.modal ? /* @__PURE__ */ i(Et, { present: r || s.open, children: /* @__PURE__ */ i(xi, { ...o, ref: e }) }) : null;
|
|
2488
2490
|
}
|
|
2489
2491
|
);
|
|
2490
|
-
|
|
2491
|
-
var
|
|
2492
|
+
kn.displayName = et;
|
|
2493
|
+
var Si = _r("DialogOverlay.RemoveScroll"), xi = Q.forwardRef(
|
|
2492
2494
|
(t, e) => {
|
|
2493
2495
|
const { __scopeDialog: n, ...r } = t, o = fe(et, n);
|
|
2494
2496
|
return (
|
|
2495
2497
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
2496
2498
|
// ie. when `Overlay` and `Content` are siblings
|
|
2497
|
-
/* @__PURE__ */ i(
|
|
2499
|
+
/* @__PURE__ */ i(Tr, { as: Si, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ i(
|
|
2498
2500
|
je.div,
|
|
2499
2501
|
{
|
|
2500
2502
|
"data-state": At(o.open),
|
|
@@ -2505,47 +2507,47 @@ var xi = br("DialogOverlay.RemoveScroll"), Ri = Q.forwardRef(
|
|
|
2505
2507
|
) })
|
|
2506
2508
|
);
|
|
2507
2509
|
}
|
|
2508
|
-
), Oe = "DialogContent",
|
|
2510
|
+
), Oe = "DialogContent", Wn = Q.forwardRef(
|
|
2509
2511
|
(t, e) => {
|
|
2510
|
-
const n =
|
|
2511
|
-
return /* @__PURE__ */ i(Et, { present: r || s.open, children: s.modal ? /* @__PURE__ */ i(
|
|
2512
|
+
const n = An(Oe, t.__scopeDialog), { forceMount: r = n.forceMount, ...o } = t, s = fe(Oe, t.__scopeDialog);
|
|
2513
|
+
return /* @__PURE__ */ i(Et, { present: r || s.open, children: s.modal ? /* @__PURE__ */ i(Ri, { ...o, ref: e }) : /* @__PURE__ */ i(Li, { ...o, ref: e }) });
|
|
2512
2514
|
}
|
|
2513
2515
|
);
|
|
2514
|
-
|
|
2515
|
-
var
|
|
2516
|
+
Wn.displayName = Oe;
|
|
2517
|
+
var Ri = Q.forwardRef(
|
|
2516
2518
|
(t, e) => {
|
|
2517
2519
|
const n = fe(Oe, t.__scopeDialog), r = Q.useRef(null), o = Lt(e, n.contentRef, r);
|
|
2518
2520
|
return Q.useEffect(() => {
|
|
2519
2521
|
const s = r.current;
|
|
2520
2522
|
if (s)
|
|
2521
|
-
return
|
|
2523
|
+
return Cr(s);
|
|
2522
2524
|
}, []), /* @__PURE__ */ i(
|
|
2523
|
-
|
|
2525
|
+
Mn,
|
|
2524
2526
|
{
|
|
2525
2527
|
...t,
|
|
2526
2528
|
ref: o,
|
|
2527
2529
|
trapFocus: n.open,
|
|
2528
2530
|
disableOutsidePointerEvents: !0,
|
|
2529
|
-
onCloseAutoFocus:
|
|
2531
|
+
onCloseAutoFocus: Ge(t.onCloseAutoFocus, (s) => {
|
|
2530
2532
|
var a;
|
|
2531
2533
|
s.preventDefault(), (a = n.triggerRef.current) == null || a.focus();
|
|
2532
2534
|
}),
|
|
2533
|
-
onPointerDownOutside:
|
|
2535
|
+
onPointerDownOutside: Ge(t.onPointerDownOutside, (s) => {
|
|
2534
2536
|
const a = s.detail.originalEvent, d = a.button === 0 && a.ctrlKey === !0;
|
|
2535
2537
|
(a.button === 2 || d) && s.preventDefault();
|
|
2536
2538
|
}),
|
|
2537
|
-
onFocusOutside:
|
|
2539
|
+
onFocusOutside: Ge(
|
|
2538
2540
|
t.onFocusOutside,
|
|
2539
2541
|
(s) => s.preventDefault()
|
|
2540
2542
|
)
|
|
2541
2543
|
}
|
|
2542
2544
|
);
|
|
2543
2545
|
}
|
|
2544
|
-
),
|
|
2546
|
+
), Li = Q.forwardRef(
|
|
2545
2547
|
(t, e) => {
|
|
2546
2548
|
const n = fe(Oe, t.__scopeDialog), r = Q.useRef(!1), o = Q.useRef(!1);
|
|
2547
2549
|
return /* @__PURE__ */ i(
|
|
2548
|
-
|
|
2550
|
+
Mn,
|
|
2549
2551
|
{
|
|
2550
2552
|
...t,
|
|
2551
2553
|
ref: e,
|
|
@@ -2564,12 +2566,12 @@ var Li = Q.forwardRef(
|
|
|
2564
2566
|
}
|
|
2565
2567
|
);
|
|
2566
2568
|
}
|
|
2567
|
-
),
|
|
2569
|
+
), Mn = Q.forwardRef(
|
|
2568
2570
|
(t, e) => {
|
|
2569
2571
|
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: s, ...a } = t, d = fe(Oe, n), c = Q.useRef(null), m = Lt(e, c);
|
|
2570
|
-
return
|
|
2572
|
+
return Pr(), /* @__PURE__ */ W(he, { children: [
|
|
2571
2573
|
/* @__PURE__ */ i(
|
|
2572
|
-
|
|
2574
|
+
yr,
|
|
2573
2575
|
{
|
|
2574
2576
|
asChild: !0,
|
|
2575
2577
|
loop: !0,
|
|
@@ -2577,7 +2579,7 @@ var Li = Q.forwardRef(
|
|
|
2577
2579
|
onMountAutoFocus: o,
|
|
2578
2580
|
onUnmountAutoFocus: s,
|
|
2579
2581
|
children: /* @__PURE__ */ i(
|
|
2580
|
-
|
|
2582
|
+
br,
|
|
2581
2583
|
{
|
|
2582
2584
|
role: "dialog",
|
|
2583
2585
|
id: d.contentId,
|
|
@@ -2592,26 +2594,26 @@ var Li = Q.forwardRef(
|
|
|
2592
2594
|
}
|
|
2593
2595
|
),
|
|
2594
2596
|
/* @__PURE__ */ W(he, { children: [
|
|
2595
|
-
/* @__PURE__ */ i(
|
|
2596
|
-
/* @__PURE__ */ i(
|
|
2597
|
+
/* @__PURE__ */ i(Ni, { titleId: d.titleId }),
|
|
2598
|
+
/* @__PURE__ */ i(Di, { contentRef: c, descriptionId: d.descriptionId })
|
|
2597
2599
|
] })
|
|
2598
2600
|
] });
|
|
2599
2601
|
}
|
|
2600
|
-
), zt = "DialogTitle",
|
|
2602
|
+
), zt = "DialogTitle", Hn = Q.forwardRef(
|
|
2601
2603
|
(t, e) => {
|
|
2602
2604
|
const { __scopeDialog: n, ...r } = t, o = fe(zt, n);
|
|
2603
2605
|
return /* @__PURE__ */ i(je.h2, { id: o.titleId, ...r, ref: e });
|
|
2604
2606
|
}
|
|
2605
2607
|
);
|
|
2606
|
-
|
|
2607
|
-
var
|
|
2608
|
+
Hn.displayName = zt;
|
|
2609
|
+
var $n = "DialogDescription", Ei = Q.forwardRef(
|
|
2608
2610
|
(t, e) => {
|
|
2609
|
-
const { __scopeDialog: n, ...r } = t, o = fe(
|
|
2611
|
+
const { __scopeDialog: n, ...r } = t, o = fe($n, n);
|
|
2610
2612
|
return /* @__PURE__ */ i(je.p, { id: o.descriptionId, ...r, ref: e });
|
|
2611
2613
|
}
|
|
2612
2614
|
);
|
|
2613
|
-
|
|
2614
|
-
var qn = "DialogClose",
|
|
2615
|
+
Ei.displayName = $n;
|
|
2616
|
+
var qn = "DialogClose", Gn = Q.forwardRef(
|
|
2615
2617
|
(t, e) => {
|
|
2616
2618
|
const { __scopeDialog: n, ...r } = t, o = fe(qn, n);
|
|
2617
2619
|
return /* @__PURE__ */ i(
|
|
@@ -2620,21 +2622,21 @@ var qn = "DialogClose", Un = Q.forwardRef(
|
|
|
2620
2622
|
type: "button",
|
|
2621
2623
|
...r,
|
|
2622
2624
|
ref: e,
|
|
2623
|
-
onClick:
|
|
2625
|
+
onClick: Ge(t.onClick, () => o.onOpenChange(!1))
|
|
2624
2626
|
}
|
|
2625
2627
|
);
|
|
2626
2628
|
}
|
|
2627
2629
|
);
|
|
2628
|
-
|
|
2630
|
+
Gn.displayName = qn;
|
|
2629
2631
|
function At(t) {
|
|
2630
2632
|
return t ? "open" : "closed";
|
|
2631
2633
|
}
|
|
2632
|
-
var
|
|
2634
|
+
var Un = "DialogTitleWarning", [bc, Vn] = vr(Un, {
|
|
2633
2635
|
contentName: Oe,
|
|
2634
2636
|
titleName: zt,
|
|
2635
2637
|
docsSlug: "dialog"
|
|
2636
|
-
}),
|
|
2637
|
-
const e =
|
|
2638
|
+
}), Ni = ({ titleId: t }) => {
|
|
2639
|
+
const e = Vn(Un), n = `\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
2638
2640
|
|
|
2639
2641
|
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
2640
2642
|
|
|
@@ -2642,14 +2644,14 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do
|
|
|
2642
2644
|
return Q.useEffect(() => {
|
|
2643
2645
|
t && (document.getElementById(t) || console.error(n));
|
|
2644
2646
|
}, [n, t]), null;
|
|
2645
|
-
},
|
|
2646
|
-
const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${
|
|
2647
|
+
}, Oi = "DialogDescriptionWarning", Di = ({ contentRef: t, descriptionId: e }) => {
|
|
2648
|
+
const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Vn(Oi).contentName}}.`;
|
|
2647
2649
|
return Q.useEffect(() => {
|
|
2648
2650
|
var s;
|
|
2649
2651
|
const o = (s = t.current) == null ? void 0 : s.getAttribute("aria-describedby");
|
|
2650
2652
|
e && o && (document.getElementById(e) || console.warn(r));
|
|
2651
2653
|
}, [r, t, e]), null;
|
|
2652
|
-
}, Ai =
|
|
2654
|
+
}, zi = Dn, Ai = Fn, Fi = kn, ki = Wn, Wi = Hn, Mi = Gn;
|
|
2653
2655
|
const Ee = {
|
|
2654
2656
|
"rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
|
|
2655
2657
|
"rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
|
|
@@ -2658,8 +2660,8 @@ const Ee = {
|
|
|
2658
2660
|
"rp-dialog-title": "_rp-dialog-title_slqo7_39",
|
|
2659
2661
|
"rp-dialog-close": "_rp-dialog-close_slqo7_47",
|
|
2660
2662
|
"rp-properties-divider": "_rp-properties-divider_slqo7_55"
|
|
2661
|
-
},
|
|
2662
|
-
const { pdfProperties: t } =
|
|
2663
|
+
}, Hi = () => {
|
|
2664
|
+
const { pdfProperties: t } = oe(), { container: e } = Te(), { activeDocumentProperties: n, setActiveDocumentProperties: r } = Ro(), { localeMessages: o } = de(), s = k(() => {
|
|
2663
2665
|
if (!t)
|
|
2664
2666
|
return [];
|
|
2665
2667
|
const {
|
|
@@ -2670,11 +2672,11 @@ const Ee = {
|
|
|
2670
2672
|
subject: g,
|
|
2671
2673
|
createdOn: C,
|
|
2672
2674
|
creator: u,
|
|
2673
|
-
keywords:
|
|
2674
|
-
modifiedOn:
|
|
2675
|
-
pdfProducer:
|
|
2676
|
-
pdfVersion:
|
|
2677
|
-
pageCount:
|
|
2675
|
+
keywords: T,
|
|
2676
|
+
modifiedOn: b,
|
|
2677
|
+
pdfProducer: P,
|
|
2678
|
+
pdfVersion: _,
|
|
2679
|
+
pageCount: y
|
|
2678
2680
|
} = t;
|
|
2679
2681
|
return [
|
|
2680
2682
|
{ label: o == null ? void 0 : o.propertiesFilenameLabel, value: d },
|
|
@@ -2683,64 +2685,64 @@ const Ee = {
|
|
|
2683
2685
|
{ label: o == null ? void 0 : o.propertiesTitleLabel, value: c },
|
|
2684
2686
|
{ label: o == null ? void 0 : o.propertiesAuthorLabel, value: m },
|
|
2685
2687
|
{ label: o == null ? void 0 : o.propertiesSubjectLabel, value: g },
|
|
2686
|
-
{ label: o == null ? void 0 : o.propertiesKeywordLabel, value:
|
|
2688
|
+
{ label: o == null ? void 0 : o.propertiesKeywordLabel, value: T },
|
|
2687
2689
|
{ label: o == null ? void 0 : o.propertiesCreatorLabel, value: u },
|
|
2688
2690
|
{
|
|
2689
2691
|
label: o == null ? void 0 : o.propertiesCreateOnLabel,
|
|
2690
|
-
value: C ?
|
|
2692
|
+
value: C ? qt(C) : ""
|
|
2691
2693
|
},
|
|
2692
2694
|
{
|
|
2693
2695
|
label: o == null ? void 0 : o.propertiesModifiedOnLabel,
|
|
2694
|
-
value:
|
|
2696
|
+
value: b ? qt(b) : ""
|
|
2695
2697
|
},
|
|
2696
2698
|
{ separate: !0 },
|
|
2697
|
-
{ label: o == null ? void 0 : o.propertiesPDFProducerLabel, value:
|
|
2698
|
-
{ label: o == null ? void 0 : o.propertiesPDFVersionLabel, value:
|
|
2699
|
-
{ label: o == null ? void 0 : o.propertiesPageCountLabel, value:
|
|
2699
|
+
{ label: o == null ? void 0 : o.propertiesPDFProducerLabel, value: P },
|
|
2700
|
+
{ label: o == null ? void 0 : o.propertiesPDFVersionLabel, value: _ },
|
|
2701
|
+
{ label: o == null ? void 0 : o.propertiesPageCountLabel, value: y }
|
|
2700
2702
|
];
|
|
2701
2703
|
}, [t, o]);
|
|
2702
|
-
return /* @__PURE__ */ i(
|
|
2703
|
-
/* @__PURE__ */ i(
|
|
2704
|
-
/* @__PURE__ */ W(
|
|
2705
|
-
/* @__PURE__ */ i(
|
|
2706
|
-
/* @__PURE__ */ i("div", { className: Ee["rp-document-properties"], children: s.map((a, d) => /* @__PURE__ */ i("div", { children: a.separate ? /* @__PURE__ */ i("div", { className: Ee["rp-properties-divider"] }) : /* @__PURE__ */ i(
|
|
2707
|
-
/* @__PURE__ */ i(
|
|
2704
|
+
return /* @__PURE__ */ i(zi, { open: n, onOpenChange: r, children: /* @__PURE__ */ i(Ai, { container: e, children: /* @__PURE__ */ W("div", { className: Ee["rp-dialog-wrapper"], children: [
|
|
2705
|
+
/* @__PURE__ */ i(Fi, { className: Ee["rp-dialog-overlay"] }),
|
|
2706
|
+
/* @__PURE__ */ W(ki, { className: Ee["rp-document-dialog"], children: [
|
|
2707
|
+
/* @__PURE__ */ i(Wi, { className: Ee["rp-dialog-title"], children: o == null ? void 0 : o.documentPropertiesLabel }),
|
|
2708
|
+
/* @__PURE__ */ i("div", { className: Ee["rp-document-properties"], children: s.map((a, d) => /* @__PURE__ */ i("div", { children: a.separate ? /* @__PURE__ */ i("div", { className: Ee["rp-properties-divider"] }) : /* @__PURE__ */ i(Vo, { label: a.label, value: a.value }) }, d)) }),
|
|
2709
|
+
/* @__PURE__ */ i(Mi, { asChild: !0, className: Ee["rp-dialog-close"], children: /* @__PURE__ */ i(Sr, {}) })
|
|
2708
2710
|
] })
|
|
2709
2711
|
] }) }) });
|
|
2710
|
-
},
|
|
2712
|
+
}, $i = {
|
|
2711
2713
|
"rp-other-tool-content": "_rp-other-tool-content_su718_1"
|
|
2712
|
-
},
|
|
2714
|
+
}, sn = ".pdf", qi = (t) => URL.createObjectURL(t), Gi = async (t) => {
|
|
2713
2715
|
const n = await (await fetch(t)).blob();
|
|
2714
2716
|
return qi(n);
|
|
2715
|
-
},
|
|
2716
|
-
const { filename: t, pdfSrc: e } =
|
|
2717
|
+
}, Bn = () => {
|
|
2718
|
+
const { filename: t, pdfSrc: e } = oe(), { downloadFilename: n } = yo(), r = (s) => {
|
|
2717
2719
|
const a = n || s;
|
|
2718
|
-
return a.endsWith(
|
|
2720
|
+
return a.endsWith(sn) ? a : `${a}${sn}`;
|
|
2719
2721
|
};
|
|
2720
2722
|
return { download: N(async () => {
|
|
2721
2723
|
if (!t || !e)
|
|
2722
2724
|
throw new Error("There is no PDF source to download");
|
|
2723
2725
|
const s = document.createElement("a");
|
|
2724
|
-
s.href = await
|
|
2726
|
+
s.href = await Gi(e), s.download = r(t), document.body.appendChild(s), s.click(), document.body.removeChild(s);
|
|
2725
2727
|
}, [t, e]) };
|
|
2726
|
-
},
|
|
2728
|
+
}, Zn = () => {
|
|
2727
2729
|
const { downloadIcon: t } = ge(), { downloadIcon: e } = me();
|
|
2728
|
-
return t || e || /* @__PURE__ */ i(
|
|
2729
|
-
},
|
|
2730
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2730
|
+
return t || e || /* @__PURE__ */ i(Nr, {});
|
|
2731
|
+
}, jn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }), Ui = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(jn, { localeMessages: e, children: /* @__PURE__ */ i(ce, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ i(Zn, {}) }) }), Vi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(ye, { onClick: t, children: /* @__PURE__ */ W(jn, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2732
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Zn, {}) }),
|
|
2731
2733
|
e == null ? void 0 : e.downloadFileLabel
|
|
2732
|
-
] }) }),
|
|
2733
|
-
const { download: t } =
|
|
2734
|
-
return !e || !n ? null : r ? /* @__PURE__ */ i(
|
|
2735
|
-
},
|
|
2734
|
+
] }) }), Kn = () => {
|
|
2735
|
+
const { download: t } = Bn(), { downloadTool: e = !0 } = Ce(), { downloadTool: n = !0 } = Ie(), { isSmallScreen: r } = Se(), { localeMessages: o } = de(), s = o == null ? void 0 : o.downloadFileTooltip;
|
|
2736
|
+
return !e || !n ? null : r ? /* @__PURE__ */ i(Vi, { 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(Ui, { download: t, localeMessages: o });
|
|
2737
|
+
}, Xn = () => {
|
|
2736
2738
|
const { printIcon: t } = ge(), { printIcon: e } = me();
|
|
2737
|
-
return t || e || /* @__PURE__ */ i(
|
|
2738
|
-
},
|
|
2739
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2739
|
+
return t || e || /* @__PURE__ */ i(Or, {});
|
|
2740
|
+
}, Qn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }), Bi = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(Qn, { localeMessages: e, children: /* @__PURE__ */ i(ce, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ i(Xn, {}) }) }), Zi = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(ye, { onClick: t, children: /* @__PURE__ */ W(Qn, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2741
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Xn, {}) }),
|
|
2740
2742
|
e == null ? void 0 : e.printLabel
|
|
2741
|
-
] }) }),
|
|
2743
|
+
] }) }), Yn = () => {
|
|
2742
2744
|
const { print: t, cancel: e, setOnProgress: n, setOnComplete: r, setOnError: o, progress: s, showDefaultProgress: a } = it(), { printTool: d = !0 } = Ce(), { printTool: c = !0 } = Ie(), { isSmallScreen: m } = Se(), { localeMessages: g } = de(), C = g == null ? void 0 : g.printTooltip;
|
|
2743
|
-
return !d || !c ? null : m ? /* @__PURE__ */ i(
|
|
2745
|
+
return !d || !c ? null : m ? /* @__PURE__ */ i(Zi, { print: t, localeMessages: g }) : typeof d == "function" ? /* @__PURE__ */ i(K, { content: C, children: /* @__PURE__ */ i(
|
|
2744
2746
|
d,
|
|
2745
2747
|
{
|
|
2746
2748
|
print: t,
|
|
@@ -2762,33 +2764,33 @@ const Ee = {
|
|
|
2762
2764
|
progress: s,
|
|
2763
2765
|
showDefaultProgress: a
|
|
2764
2766
|
}
|
|
2765
|
-
) }) : /* @__PURE__ */ i(
|
|
2766
|
-
},
|
|
2767
|
+
) }) : /* @__PURE__ */ i(Bi, { print: t, localeMessages: g });
|
|
2768
|
+
}, ji = {
|
|
2767
2769
|
"rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
|
|
2768
|
-
},
|
|
2770
|
+
}, Ki = () => {
|
|
2769
2771
|
const { goToFirstPageIcon: t } = ge(), { goToFirstPageIcon: e } = me();
|
|
2770
|
-
return t || e || /* @__PURE__ */ i(
|
|
2771
|
-
},
|
|
2772
|
+
return t || e || /* @__PURE__ */ i(wn, { className: ji["rp-go-to-Top"] });
|
|
2773
|
+
}, Xi = () => {
|
|
2772
2774
|
const { goToLastPageIcon: t } = ge(), { goToLastPageIcon: e } = me();
|
|
2773
|
-
return t || e || /* @__PURE__ */ i(
|
|
2774
|
-
},
|
|
2775
|
+
return t || e || /* @__PURE__ */ i(wn, {});
|
|
2776
|
+
}, an = { width: "100%" }, Qi = () => {
|
|
2775
2777
|
const { goToPage: t, totalPages: e, focusedPage: n } = ue(), { jumpNavigationTool: r = !0 } = Ce(), { jumpNavigationTool: o = !0 } = Ie(), { localeMessages: s } = de(), a = k(() => n === 1, [n]), d = k(() => n === e, [n, e]), c = N(() => {
|
|
2776
2778
|
t(1);
|
|
2777
2779
|
}, [t]), m = N(() => {
|
|
2778
2780
|
t(e);
|
|
2779
2781
|
}, [t, e]);
|
|
2780
2782
|
return !r || !o ? null : /* @__PURE__ */ W(Je, { children: [
|
|
2781
|
-
/* @__PURE__ */ i(ye, { onClick: c, children: /* @__PURE__ */ i(K, { content: s == null ? void 0 : s.firstPageTooltip, style:
|
|
2782
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2783
|
+
/* @__PURE__ */ i(ye, { onClick: c, children: /* @__PURE__ */ i(K, { content: s == null ? void 0 : s.firstPageTooltip, style: an, children: /* @__PURE__ */ W("div", { className: "rp-menu-item", "aria-disabled": a, children: [
|
|
2784
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Ki, {}) }),
|
|
2783
2785
|
/* @__PURE__ */ i("span", { children: s == null ? void 0 : s.firstPageLabel })
|
|
2784
2786
|
] }) }) }),
|
|
2785
|
-
/* @__PURE__ */ i(ye, { onClick: m, children: /* @__PURE__ */ i(K, { content: s == null ? void 0 : s.lastPageTooltip, style:
|
|
2786
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2787
|
+
/* @__PURE__ */ i(ye, { onClick: m, children: /* @__PURE__ */ i(K, { content: s == null ? void 0 : s.lastPageTooltip, style: an, children: /* @__PURE__ */ W("div", { className: "rp-menu-item", "aria-disabled": d, children: [
|
|
2788
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Xi, {}) }),
|
|
2787
2789
|
/* @__PURE__ */ i("span", { children: s == null ? void 0 : s.lastPageLabel })
|
|
2788
2790
|
] }) }) }),
|
|
2789
2791
|
/* @__PURE__ */ i(St, {})
|
|
2790
2792
|
] });
|
|
2791
|
-
},
|
|
2793
|
+
}, Yi = () => {
|
|
2792
2794
|
const [t, e] = $(!1), { container: n, pagesRef: r } = Te(), { isSmallScreen: o } = Se(), {
|
|
2793
2795
|
openFileTool: s,
|
|
2794
2796
|
downloadTool: a,
|
|
@@ -2798,15 +2800,15 @@ const Ee = {
|
|
|
2798
2800
|
selectionModeTool: g,
|
|
2799
2801
|
jumpNavigationTool: C,
|
|
2800
2802
|
printTool: u,
|
|
2801
|
-
fullscreenTool:
|
|
2802
|
-
viewModeTool:
|
|
2803
|
+
fullscreenTool: T,
|
|
2804
|
+
viewModeTool: b
|
|
2803
2805
|
} = Ce(), {
|
|
2804
|
-
openFileTool:
|
|
2805
|
-
downloadTool:
|
|
2806
|
-
documentProperties:
|
|
2806
|
+
openFileTool: P,
|
|
2807
|
+
downloadTool: _,
|
|
2808
|
+
documentProperties: y,
|
|
2807
2809
|
scrollModeTool: p,
|
|
2808
|
-
rotateTool:
|
|
2809
|
-
selectionModeTool:
|
|
2810
|
+
rotateTool: f,
|
|
2811
|
+
selectionModeTool: h,
|
|
2810
2812
|
jumpNavigationTool: l,
|
|
2811
2813
|
printTool: v,
|
|
2812
2814
|
fullscreenTool: w,
|
|
@@ -2815,26 +2817,26 @@ const Ee = {
|
|
|
2815
2817
|
new ResizeObserver((E) => {
|
|
2816
2818
|
L(E[0].contentRect.height);
|
|
2817
2819
|
})
|
|
2818
|
-
), D = k(() => C || m || g || c || d ||
|
|
2820
|
+
), D = k(() => C || m || g || c || d || b || o && (s || a || u || T), [
|
|
2819
2821
|
s,
|
|
2820
2822
|
a,
|
|
2821
2823
|
u,
|
|
2822
|
-
|
|
2824
|
+
T,
|
|
2823
2825
|
d,
|
|
2824
2826
|
c,
|
|
2825
2827
|
m,
|
|
2826
2828
|
g,
|
|
2827
2829
|
C,
|
|
2828
2830
|
o
|
|
2829
|
-
]), F = k(() => l ||
|
|
2830
|
-
|
|
2831
|
-
|
|
2831
|
+
]), F = k(() => l || f || h || p || y || I || o && (P || _ || v || w), [
|
|
2832
|
+
P,
|
|
2833
|
+
_,
|
|
2832
2834
|
v,
|
|
2833
2835
|
w,
|
|
2834
|
-
|
|
2836
|
+
y,
|
|
2835
2837
|
p,
|
|
2836
|
-
h,
|
|
2837
2838
|
f,
|
|
2839
|
+
h,
|
|
2838
2840
|
l,
|
|
2839
2841
|
o
|
|
2840
2842
|
]);
|
|
@@ -2846,57 +2848,57 @@ const Ee = {
|
|
|
2846
2848
|
{
|
|
2847
2849
|
container: n,
|
|
2848
2850
|
onOpenChange: e,
|
|
2849
|
-
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content: x == null ? void 0 : x.moreOptionTooltip, children: /* @__PURE__ */ i(ce, { active: t, "aria-label": x == null ? void 0 : x.moreOptionTooltip, children: /* @__PURE__ */ i(
|
|
2851
|
+
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content: x == null ? void 0 : x.moreOptionTooltip, children: /* @__PURE__ */ i(ce, { active: t, "aria-label": x == null ? void 0 : x.moreOptionTooltip, children: /* @__PURE__ */ i(mr, {}) }) }) }),
|
|
2850
2852
|
side: "bottom",
|
|
2851
2853
|
avoidCollisions: !1,
|
|
2852
2854
|
children: /* @__PURE__ */ W(
|
|
2853
2855
|
"div",
|
|
2854
2856
|
{
|
|
2855
2857
|
style: { maxHeight: `${S}px`, overflow: "auto" },
|
|
2856
|
-
className:
|
|
2858
|
+
className: $i["rp-other-tool-content"],
|
|
2857
2859
|
"data-rp": "moreOptionsDropdown",
|
|
2858
2860
|
children: [
|
|
2859
2861
|
o && /* @__PURE__ */ W(Je, { children: [
|
|
2862
|
+
/* @__PURE__ */ i(gn, {}),
|
|
2863
|
+
/* @__PURE__ */ i(Kn, {}),
|
|
2864
|
+
/* @__PURE__ */ i(Yn, {}),
|
|
2860
2865
|
/* @__PURE__ */ i(vn, {}),
|
|
2861
|
-
/* @__PURE__ */ i(Xn, {}),
|
|
2862
|
-
/* @__PURE__ */ i(Jn, {}),
|
|
2863
|
-
/* @__PURE__ */ i(wn, {}),
|
|
2864
2866
|
/* @__PURE__ */ i(St, {})
|
|
2865
2867
|
] }),
|
|
2866
|
-
/* @__PURE__ */ i(
|
|
2868
|
+
/* @__PURE__ */ i(Qi, {}),
|
|
2869
|
+
/* @__PURE__ */ i(Rr, {}),
|
|
2870
|
+
/* @__PURE__ */ i(Dr, {}),
|
|
2867
2871
|
/* @__PURE__ */ i(Lr, {}),
|
|
2868
|
-
/* @__PURE__ */ i(zr, {}),
|
|
2869
2872
|
/* @__PURE__ */ i(Er, {}),
|
|
2870
|
-
/* @__PURE__ */ i(
|
|
2871
|
-
/* @__PURE__ */ i(Rr, {})
|
|
2873
|
+
/* @__PURE__ */ i(xr, {})
|
|
2872
2874
|
]
|
|
2873
2875
|
}
|
|
2874
2876
|
)
|
|
2875
2877
|
}
|
|
2876
2878
|
),
|
|
2877
|
-
/* @__PURE__ */ i(
|
|
2879
|
+
/* @__PURE__ */ i(Hi, {})
|
|
2878
2880
|
] });
|
|
2879
|
-
},
|
|
2881
|
+
}, Ji = () => {
|
|
2880
2882
|
const { isSmallScreen: t } = Se();
|
|
2881
2883
|
return /* @__PURE__ */ W(he, { children: [
|
|
2882
|
-
/* @__PURE__ */ i(
|
|
2884
|
+
/* @__PURE__ */ i(fr, {}),
|
|
2883
2885
|
!t && /* @__PURE__ */ W(he, { children: [
|
|
2884
|
-
/* @__PURE__ */ i(
|
|
2885
|
-
/* @__PURE__ */ i(
|
|
2886
|
-
/* @__PURE__ */ i(
|
|
2887
|
-
/* @__PURE__ */ i(
|
|
2886
|
+
/* @__PURE__ */ i(gn, {}),
|
|
2887
|
+
/* @__PURE__ */ i(Kn, {}),
|
|
2888
|
+
/* @__PURE__ */ i(Yn, {}),
|
|
2889
|
+
/* @__PURE__ */ i(vn, {})
|
|
2888
2890
|
] }),
|
|
2889
|
-
/* @__PURE__ */ i(
|
|
2891
|
+
/* @__PURE__ */ i(Yi, {})
|
|
2890
2892
|
] });
|
|
2891
|
-
},
|
|
2893
|
+
}, es = "_active_1yldl_11", Ae = {
|
|
2892
2894
|
"rp-zoom-wrapper": "_rp-zoom-wrapper_1yldl_1",
|
|
2893
2895
|
"rp-current-zoom-wrapper": "_rp-current-zoom-wrapper_1yldl_6",
|
|
2894
|
-
active:
|
|
2896
|
+
active: es,
|
|
2895
2897
|
"rp-current-zoom-icon": "_rp-current-zoom-icon_1yldl_15",
|
|
2896
2898
|
"rp-zoom-level-icon": "_rp-zoom-level-icon_1yldl_20",
|
|
2897
2899
|
"rp-current-zoom-text": "_rp-current-zoom-text_1yldl_24",
|
|
2898
2900
|
"rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_1yldl_28"
|
|
2899
|
-
},
|
|
2901
|
+
}, ts = ({ zoomLevel: t, className: e }) => {
|
|
2900
2902
|
const { localeMessages: n } = de(), r = k(() => {
|
|
2901
2903
|
switch (t) {
|
|
2902
2904
|
case We.ACTUAL:
|
|
@@ -2908,42 +2910,42 @@ const Ee = {
|
|
|
2908
2910
|
}
|
|
2909
2911
|
return t.toString();
|
|
2910
2912
|
}, [t, n]);
|
|
2911
|
-
return /* @__PURE__ */ i(he, { children: typeof t == "number" ? /* @__PURE__ */ W(
|
|
2913
|
+
return /* @__PURE__ */ i(he, { children: typeof t == "number" ? /* @__PURE__ */ W(lo, { children: [
|
|
2912
2914
|
/* @__PURE__ */ i("span", { className: e, children: t }),
|
|
2913
2915
|
/* @__PURE__ */ i("span", { className: e, children: "%" })
|
|
2914
2916
|
] }) : /* @__PURE__ */ i("span", { className: e, children: r }) });
|
|
2915
|
-
},
|
|
2917
|
+
}, ns = [50, 75, 100, 125, 150, 200, 300, 400], os = () => {
|
|
2916
2918
|
const { zoomInIcon: t } = ge(), { zoomInIcon: e } = me();
|
|
2919
|
+
return t || e || /* @__PURE__ */ i(zr, {});
|
|
2920
|
+
}, rs = () => {
|
|
2921
|
+
const { zoomOutIcon: t } = ge(), { zoomOutIcon: e } = me();
|
|
2917
2922
|
return t || e || /* @__PURE__ */ i(Ar, {});
|
|
2918
2923
|
}, is = () => {
|
|
2919
|
-
const {
|
|
2920
|
-
return t || e || /* @__PURE__ */ i(Fr, {});
|
|
2921
|
-
}, ss = () => {
|
|
2922
|
-
const { zoomLevel: t, setZoomLevel: e, currentZoom: n } = tt(), { container: r, pagesRef: o } = Te(), { zoomTool: s = !0 } = Ce(), { zoomTool: a = !0 } = Ie(), { isSmallScreen: d } = Se(), { localeMessages: c } = de(), [m, g] = $(0), [C, u] = $(!1), y = M(
|
|
2924
|
+
const { zoomLevel: t, setZoomLevel: e, currentZoom: n } = tt(), { container: r, pagesRef: o } = Te(), { zoomTool: s = !0 } = Ce(), { zoomTool: a = !0 } = Ie(), { isSmallScreen: d } = Se(), { localeMessages: c } = de(), [m, g] = $(0), [C, u] = $(!1), T = M(
|
|
2923
2925
|
new ResizeObserver((p) => {
|
|
2924
2926
|
g(p[0].contentRect.height);
|
|
2925
2927
|
})
|
|
2926
|
-
),
|
|
2928
|
+
), b = N(() => {
|
|
2927
2929
|
e(() => {
|
|
2928
2930
|
const p = Math.floor(n * 100 / 25) * 25;
|
|
2929
|
-
return Math.min(p + 25,
|
|
2931
|
+
return Math.min(p + 25, Gt);
|
|
2930
2932
|
});
|
|
2931
|
-
}, [e, n]),
|
|
2933
|
+
}, [e, n]), P = N(() => {
|
|
2932
2934
|
e(() => {
|
|
2933
2935
|
const p = Math.ceil(n * 100 / 25) * 25;
|
|
2934
|
-
return Math.min(p - 25,
|
|
2936
|
+
return Math.min(p - 25, Gt);
|
|
2935
2937
|
});
|
|
2936
|
-
}, [e, n]),
|
|
2937
|
-
return z(() => (o &&
|
|
2938
|
-
|
|
2938
|
+
}, [e, n]), _ = k(() => Fr(n), [n]), y = k(() => kr(n), [n]);
|
|
2939
|
+
return z(() => (o && T.current.observe(o), () => {
|
|
2940
|
+
T.current.disconnect();
|
|
2939
2941
|
}), [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: Ae["rp-zoom-wrapper"], children: [
|
|
2940
2942
|
/* @__PURE__ */ i(K, { content: c == null ? void 0 : c.zoomOutTooltip, children: /* @__PURE__ */ i(
|
|
2941
2943
|
ce,
|
|
2942
2944
|
{
|
|
2943
|
-
disabled:
|
|
2944
|
-
onClick:
|
|
2945
|
+
disabled: _,
|
|
2946
|
+
onClick: P,
|
|
2945
2947
|
"aria-label": c == null ? void 0 : c.zoomOutTooltip,
|
|
2946
|
-
children: /* @__PURE__ */ i(
|
|
2948
|
+
children: /* @__PURE__ */ i(rs, {})
|
|
2947
2949
|
}
|
|
2948
2950
|
) }),
|
|
2949
2951
|
!d && /* @__PURE__ */ i(
|
|
@@ -2962,7 +2964,7 @@ const Ee = {
|
|
|
2962
2964
|
"aria-label": c == null ? void 0 : c.zoomSelectTooltip,
|
|
2963
2965
|
children: [
|
|
2964
2966
|
/* @__PURE__ */ i(
|
|
2965
|
-
|
|
2967
|
+
ts,
|
|
2966
2968
|
{
|
|
2967
2969
|
zoomLevel: t,
|
|
2968
2970
|
className: Ae["rp-current-zoom-text"]
|
|
@@ -2988,7 +2990,7 @@ const Ee = {
|
|
|
2988
2990
|
/* @__PURE__ */ i(ye, { onClick: () => e(We.PAGE_WIDTH), children: c == null ? void 0 : c.zoomPageWidth })
|
|
2989
2991
|
] }),
|
|
2990
2992
|
/* @__PURE__ */ i(St, {}),
|
|
2991
|
-
/* @__PURE__ */ i(Je, { children:
|
|
2993
|
+
/* @__PURE__ */ i(Je, { children: ns.map((p) => /* @__PURE__ */ W(ye, { onClick: () => e(p), children: [
|
|
2992
2994
|
p,
|
|
2993
2995
|
" %"
|
|
2994
2996
|
] }, p)) })
|
|
@@ -3000,14 +3002,14 @@ const Ee = {
|
|
|
3000
3002
|
/* @__PURE__ */ i(K, { content: c == null ? void 0 : c.zoomInTooltip, children: /* @__PURE__ */ i(
|
|
3001
3003
|
ce,
|
|
3002
3004
|
{
|
|
3003
|
-
disabled:
|
|
3004
|
-
onClick:
|
|
3005
|
+
disabled: y,
|
|
3006
|
+
onClick: b,
|
|
3005
3007
|
"aria-label": c == null ? void 0 : c.zoomInTooltip,
|
|
3006
|
-
children: /* @__PURE__ */ i(
|
|
3008
|
+
children: /* @__PURE__ */ i(os, {})
|
|
3007
3009
|
}
|
|
3008
3010
|
) })
|
|
3009
3011
|
] });
|
|
3010
|
-
},
|
|
3012
|
+
}, cn = () => {
|
|
3011
3013
|
const { totalMatches: t, nextMatch: e, prevMatch: n } = Nt(), { localeMessages: r } = de();
|
|
3012
3014
|
return /* @__PURE__ */ W(he, { children: [
|
|
3013
3015
|
/* @__PURE__ */ i(
|
|
@@ -3040,44 +3042,44 @@ const Ee = {
|
|
|
3040
3042
|
}
|
|
3041
3043
|
)
|
|
3042
3044
|
] });
|
|
3043
|
-
},
|
|
3045
|
+
}, ss = () => {
|
|
3044
3046
|
const { searchIcon: t } = ge(), { searchIcon: e } = me();
|
|
3045
|
-
return t || e || /* @__PURE__ */ i(
|
|
3046
|
-
},
|
|
3047
|
-
const { container: e } = Te(), [n, r] = $(!1), { pdf: o } =
|
|
3047
|
+
return t || e || /* @__PURE__ */ i(_n, {});
|
|
3048
|
+
}, as = ({ icon: t }) => {
|
|
3049
|
+
const { container: e } = Te(), [n, r] = $(!1), { pdf: o } = oe(), [s, a] = $(null), {
|
|
3048
3050
|
searchOptions: d,
|
|
3049
3051
|
setSearchOptions: c,
|
|
3050
3052
|
loading: m,
|
|
3051
3053
|
setSearch: g,
|
|
3052
3054
|
totalMatches: C,
|
|
3053
3055
|
currentMatchPosition: u,
|
|
3054
|
-
nextMatch:
|
|
3055
|
-
prevMatch:
|
|
3056
|
-
search:
|
|
3057
|
-
} = Nt(), { searchTool:
|
|
3056
|
+
nextMatch: T,
|
|
3057
|
+
prevMatch: b,
|
|
3058
|
+
search: P
|
|
3059
|
+
} = Nt(), { searchTool: _ = !0 } = Ce(), { searchTool: y = !0 } = Ie(), [p, f] = $(P), { localeMessages: h } = de(), { isSmallScreen: l } = Se(), [v, w] = $(null), [I, x] = $(!1), S = N(() => {
|
|
3058
3060
|
r(!0);
|
|
3059
3061
|
}, []), L = N(() => {
|
|
3060
|
-
g(""),
|
|
3061
|
-
}, [g]), O = (
|
|
3062
|
-
const Z =
|
|
3062
|
+
g(""), f(""), r(!1);
|
|
3063
|
+
}, [g]), O = (G) => {
|
|
3064
|
+
const Z = G.key === "Enter", Y = G.key === " ";
|
|
3063
3065
|
(Z || Y) && L();
|
|
3064
3066
|
}, D = N(
|
|
3065
|
-
(
|
|
3066
|
-
|
|
3067
|
+
(G) => {
|
|
3068
|
+
G.key === "Escape" && n && L();
|
|
3067
3069
|
},
|
|
3068
3070
|
[n]
|
|
3069
3071
|
), F = N(
|
|
3070
|
-
(
|
|
3071
|
-
|
|
3072
|
+
(G) => {
|
|
3073
|
+
G.shiftKey && G.key === "Enter" ? b() : G.key === "Enter" && P !== p ? g(p) : G.key === "Enter" && T();
|
|
3072
3074
|
},
|
|
3073
|
-
[p,
|
|
3075
|
+
[p, b, T, g, P]
|
|
3074
3076
|
);
|
|
3075
3077
|
z(() => {
|
|
3076
|
-
|
|
3077
|
-
}, [
|
|
3078
|
-
|
|
3079
|
-
}, [
|
|
3080
|
-
|
|
3078
|
+
f(P);
|
|
3079
|
+
}, [P]), z(() => {
|
|
3080
|
+
P && o && x(!0);
|
|
3081
|
+
}, [P, o]), z(() => {
|
|
3082
|
+
P && P.trim() !== "" && (f(P), g(P));
|
|
3081
3083
|
}, []), z(() => (window.addEventListener("keydown", D), () => {
|
|
3082
3084
|
window.removeEventListener("keydown", D);
|
|
3083
3085
|
}), [D]), z(() => {
|
|
@@ -3085,18 +3087,18 @@ const Ee = {
|
|
|
3085
3087
|
s.focus();
|
|
3086
3088
|
}, 0);
|
|
3087
3089
|
}, [s]);
|
|
3088
|
-
const E = N((
|
|
3089
|
-
|
|
3090
|
+
const E = N((G) => {
|
|
3091
|
+
f(G.target.value);
|
|
3090
3092
|
}, []), R = N(() => {
|
|
3091
|
-
|
|
3092
|
-
}, [g]), A = k(() => `${u} / ${C}`, [u, C]), { wholeWords:
|
|
3093
|
-
(
|
|
3094
|
-
c((Z) => ({ ...Z, matchCase:
|
|
3093
|
+
f(""), g("");
|
|
3094
|
+
}, [g]), A = k(() => `${u} / ${C}`, [u, C]), { wholeWords: q, matchCase: H } = k(() => d, [d]), U = N(
|
|
3095
|
+
(G) => {
|
|
3096
|
+
c((Z) => ({ ...Z, matchCase: G }));
|
|
3095
3097
|
},
|
|
3096
3098
|
[c]
|
|
3097
3099
|
), X = N(
|
|
3098
|
-
(
|
|
3099
|
-
c((Z) => ({ ...Z, wholeWords:
|
|
3100
|
+
(G) => {
|
|
3101
|
+
c((Z) => ({ ...Z, wholeWords: G }));
|
|
3100
3102
|
},
|
|
3101
3103
|
[c]
|
|
3102
3104
|
);
|
|
@@ -3104,15 +3106,15 @@ const Ee = {
|
|
|
3104
3106
|
o && I && L();
|
|
3105
3107
|
}, [o, L]);
|
|
3106
3108
|
const V = k(() => (v == null ? void 0 : v.querySelectorAll('[tabindex]:not([tabindex="-1"])')) || [], [v]), ie = N(
|
|
3107
|
-
(
|
|
3108
|
-
if (
|
|
3109
|
+
(G) => {
|
|
3110
|
+
if (G.key === "Tab") {
|
|
3109
3111
|
const Z = document.activeElement;
|
|
3110
3112
|
let Y = 0;
|
|
3111
3113
|
V.forEach((ee, ve) => {
|
|
3112
3114
|
ee === Z && (Y = ve);
|
|
3113
3115
|
});
|
|
3114
3116
|
let te = Y + 1;
|
|
3115
|
-
|
|
3117
|
+
G.shiftKey && (te = Y - 1);
|
|
3116
3118
|
const J = V[te];
|
|
3117
3119
|
if (J)
|
|
3118
3120
|
J.focus();
|
|
@@ -3127,7 +3129,7 @@ const Ee = {
|
|
|
3127
3129
|
},
|
|
3128
3130
|
[V]
|
|
3129
3131
|
);
|
|
3130
|
-
return !
|
|
3132
|
+
return !_ || !y ? null : /* @__PURE__ */ i(he, { children: /* @__PURE__ */ i(
|
|
3131
3133
|
It,
|
|
3132
3134
|
{
|
|
3133
3135
|
open: n,
|
|
@@ -3136,13 +3138,13 @@ const Ee = {
|
|
|
3136
3138
|
align: "start",
|
|
3137
3139
|
tabIndex: 0,
|
|
3138
3140
|
avoidCollisions: !1,
|
|
3139
|
-
triggerComponent: /* @__PURE__ */ i(K, { content:
|
|
3141
|
+
triggerComponent: /* @__PURE__ */ i(K, { content: h == null ? void 0 : h.searchButtonTooltip, children: /* @__PURE__ */ i(
|
|
3140
3142
|
ce,
|
|
3141
3143
|
{
|
|
3142
3144
|
active: n,
|
|
3143
3145
|
onClick: S,
|
|
3144
|
-
"aria-label":
|
|
3145
|
-
children: t || /* @__PURE__ */ i(
|
|
3146
|
+
"aria-label": h == null ? void 0 : h.searchButtonTooltip,
|
|
3147
|
+
children: t || /* @__PURE__ */ i(ss, {})
|
|
3146
3148
|
}
|
|
3147
3149
|
) }),
|
|
3148
3150
|
children: /* @__PURE__ */ W(
|
|
@@ -3155,27 +3157,27 @@ const Ee = {
|
|
|
3155
3157
|
children: [
|
|
3156
3158
|
/* @__PURE__ */ W("div", { className: ne["rp-search-tool-input-wrapper"], children: [
|
|
3157
3159
|
/* @__PURE__ */ W("div", { className: ne["rp-search-tool-input"], children: [
|
|
3158
|
-
/* @__PURE__ */ i(K, { content:
|
|
3159
|
-
|
|
3160
|
+
/* @__PURE__ */ i(K, { content: h == null ? void 0 : h.searchInputTooltip, children: /* @__PURE__ */ i(
|
|
3161
|
+
pn,
|
|
3160
3162
|
{
|
|
3161
3163
|
value: p,
|
|
3162
3164
|
onKeyDown: F,
|
|
3163
3165
|
onChange: E,
|
|
3164
|
-
icon: /* @__PURE__ */ i(
|
|
3165
|
-
placeholder:
|
|
3166
|
+
icon: /* @__PURE__ */ i(_n, {}),
|
|
3167
|
+
placeholder: h == null ? void 0 : h.searchInputPlaceholder,
|
|
3166
3168
|
className: ne["rp-search-input"],
|
|
3167
3169
|
ref: a,
|
|
3168
3170
|
id: "search-input",
|
|
3169
3171
|
name: "search-input",
|
|
3170
3172
|
tabIndex: 0,
|
|
3171
|
-
children: !!p && /* @__PURE__ */ i("span", { className: ne["rp-search-tool-input-clear"], onClick: R, children: /* @__PURE__ */ i(
|
|
3173
|
+
children: !!p && /* @__PURE__ */ i("span", { className: ne["rp-search-tool-input-clear"], onClick: R, children: /* @__PURE__ */ i(Wr, {}) })
|
|
3172
3174
|
}
|
|
3173
3175
|
) }),
|
|
3174
|
-
m ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(
|
|
3176
|
+
m ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(mn, { className: ne["rp-search-loader-icon"] }) }) : /* @__PURE__ */ i("span", { children: A }),
|
|
3175
3177
|
l && /* @__PURE__ */ i("div", { className: ne["rp-search-tool-controls"], children: /* @__PURE__ */ i(Ht, { onKeyPress: O, handleClose: L }) })
|
|
3176
3178
|
] }),
|
|
3177
3179
|
/* @__PURE__ */ W("div", { className: ne["rp-search-tool-input-checkboxes"], children: [
|
|
3178
|
-
l && /* @__PURE__ */ i(
|
|
3180
|
+
l && /* @__PURE__ */ i(cn, {}),
|
|
3179
3181
|
/* @__PURE__ */ i(
|
|
3180
3182
|
$t,
|
|
3181
3183
|
{
|
|
@@ -3183,25 +3185,25 @@ const Ee = {
|
|
|
3183
3185
|
name: "matchCase",
|
|
3184
3186
|
value: H,
|
|
3185
3187
|
onChange: U,
|
|
3186
|
-
children:
|
|
3188
|
+
children: h == null ? void 0 : h.searchMatchCaseLabel
|
|
3187
3189
|
}
|
|
3188
3190
|
),
|
|
3189
|
-
!l && /* @__PURE__ */ i(K, { content:
|
|
3191
|
+
!l && /* @__PURE__ */ i(K, { content: h == null ? void 0 : h.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: ne["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Vt, {}) }) }),
|
|
3190
3192
|
/* @__PURE__ */ i(
|
|
3191
3193
|
$t,
|
|
3192
3194
|
{
|
|
3193
3195
|
tabIndex: 0,
|
|
3194
3196
|
name: "wholeWord",
|
|
3195
|
-
value:
|
|
3197
|
+
value: q,
|
|
3196
3198
|
onChange: X,
|
|
3197
|
-
children:
|
|
3199
|
+
children: h == null ? void 0 : h.searchWholeWordsLabel
|
|
3198
3200
|
}
|
|
3199
3201
|
),
|
|
3200
|
-
!l && /* @__PURE__ */ i(K, { content:
|
|
3202
|
+
!l && /* @__PURE__ */ i(K, { content: h == null ? void 0 : h.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { tabIndex: 0, className: ne["rp-search-icon-info"], children: /* @__PURE__ */ i(Vt, {}) }) })
|
|
3201
3203
|
] })
|
|
3202
3204
|
] }),
|
|
3203
3205
|
!l && /* @__PURE__ */ W("div", { className: ne["rp-search-tool-controls"], children: [
|
|
3204
|
-
/* @__PURE__ */ i(
|
|
3206
|
+
/* @__PURE__ */ i(cn, {}),
|
|
3205
3207
|
/* @__PURE__ */ i(Ht, { onKeyPress: O, handleClose: L })
|
|
3206
3208
|
] })
|
|
3207
3209
|
]
|
|
@@ -3209,15 +3211,15 @@ const Ee = {
|
|
|
3209
3211
|
)
|
|
3210
3212
|
}
|
|
3211
3213
|
) });
|
|
3212
|
-
},
|
|
3214
|
+
}, cs = "_loading_wazy2_1", Fe = {
|
|
3213
3215
|
"rp-loading-overlay": "_rp-loading-overlay_wazy2_1",
|
|
3214
3216
|
"rp-loading-modal": "_rp-loading-modal_wazy2_14",
|
|
3215
3217
|
"rp-loading-title": "_rp-loading-title_wazy2_27",
|
|
3216
3218
|
"rp-loading-progress-bar": "_rp-loading-progress-bar_wazy2_35",
|
|
3217
3219
|
"rp-loading-progress": "_rp-loading-progress_wazy2_35",
|
|
3218
3220
|
"rp-loading-cancel-button": "_rp-loading-cancel-button_wazy2_55",
|
|
3219
|
-
loading:
|
|
3220
|
-
},
|
|
3221
|
+
loading: cs
|
|
3222
|
+
}, ls = ({ percentage: t }) => {
|
|
3221
3223
|
const { cancel: e } = it(), { localeMessages: n } = de();
|
|
3222
3224
|
return t < 1 ? null : /* @__PURE__ */ i("div", { className: se(Fe["rp-loading-overlay"]), children: /* @__PURE__ */ W("div", { className: se(Fe["rp-loading-modal"]), children: [
|
|
3223
3225
|
/* @__PURE__ */ W("div", { className: se(Fe["rp-loading-title"]), children: [
|
|
@@ -3233,19 +3235,19 @@ const Ee = {
|
|
|
3233
3235
|
) }),
|
|
3234
3236
|
/* @__PURE__ */ i("button", { className: se(Fe["rp-loading-cancel-button"]), onClick: e, children: n == null ? void 0 : n.printCancelLabel })
|
|
3235
3237
|
] }) });
|
|
3236
|
-
},
|
|
3238
|
+
}, ds = rt((t, e) => {
|
|
3237
3239
|
const { showPrintProgress: n = !0 } = Ce(), { showPrintProgress: r = !0 } = Ie(), { progress: o, showDefaultProgress: s } = it(), { isSmallScreen: a } = Se(), { percentage: d } = o || {}, c = () => a ? { gridTemplateColumns: "25% 60% 15%" } : void 0, m = () => {
|
|
3238
3240
|
if (!(!(s ?? (n && r)) || !d))
|
|
3239
|
-
return /* @__PURE__ */ i(
|
|
3241
|
+
return /* @__PURE__ */ i(ls, { percentage: d });
|
|
3240
3242
|
};
|
|
3241
3243
|
return /* @__PURE__ */ W("div", { children: [
|
|
3242
3244
|
/* @__PURE__ */ i("div", { "data-rp": "topBar", ref: e, className: $e["rp-toolbar-content"], children: /* @__PURE__ */ W("div", { className: $e["rp-toolbar-wrapper"], style: c(), children: [
|
|
3243
3245
|
/* @__PURE__ */ W("div", { "data-rp": "topBarLeft", className: $e["rp-toolbar-start"], children: [
|
|
3244
|
-
/* @__PURE__ */ i(
|
|
3245
|
-
/* @__PURE__ */ i(
|
|
3246
|
+
/* @__PURE__ */ i(as, {}),
|
|
3247
|
+
/* @__PURE__ */ i(Ci, {})
|
|
3246
3248
|
] }),
|
|
3247
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: $e["rp-toolbar-middle"], children: /* @__PURE__ */ i(
|
|
3248
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: $e["rp-toolbar-end"], children: /* @__PURE__ */ i(
|
|
3249
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: $e["rp-toolbar-middle"], children: /* @__PURE__ */ i(is, {}) }),
|
|
3250
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: $e["rp-toolbar-end"], children: /* @__PURE__ */ i(Ji, {}) })
|
|
3249
3251
|
] }) }),
|
|
3250
3252
|
/* @__PURE__ */ i(m, {})
|
|
3251
3253
|
] });
|
|
@@ -3253,44 +3255,44 @@ const Ee = {
|
|
|
3253
3255
|
"rp-sidebar-content-wrapper": "_rp-sidebar-content-wrapper_1bqgz_1",
|
|
3254
3256
|
"rp-sidebar-content": "_rp-sidebar-content_1bqgz_1",
|
|
3255
3257
|
"rp-thumbnails-wrapper": "_rp-thumbnails-wrapper_1bqgz_16"
|
|
3256
|
-
},
|
|
3258
|
+
}, qe = {
|
|
3257
3259
|
"rp-thumbnail-wrapper": "_rp-thumbnail-wrapper_3fenb_1",
|
|
3258
3260
|
"rp-thumbnail-text": "_rp-thumbnail-text_3fenb_10",
|
|
3259
3261
|
"rp-thumbnail": "_rp-thumbnail_3fenb_1",
|
|
3260
3262
|
"rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
|
|
3261
3263
|
"rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
|
|
3262
|
-
},
|
|
3263
|
-
const { pageNumber: e, isFocused: n, viewport: r } = t, { goToPage: o } = ue(), { pageRotate: s } = ot(), a = M(null), d =
|
|
3264
|
+
}, us = (t) => {
|
|
3265
|
+
const { pageNumber: e, isFocused: n, viewport: r } = t, { goToPage: o } = ue(), { pageRotate: s } = ot(), a = M(null), d = xn(), { pages: c } = oe(), [m, g] = $(null), C = M(!1), u = M(), T = k(() => n ? qe["rp-thumbnail-active"] : "", [n]), b = k(() => ({
|
|
3264
3266
|
width: Math.round(r.width),
|
|
3265
3267
|
height: Math.round(r.height)
|
|
3266
|
-
}), [r]),
|
|
3268
|
+
}), [r]), P = N(() => {
|
|
3267
3269
|
e && o(e);
|
|
3268
3270
|
}, [o, e]);
|
|
3269
3271
|
return z(() => {
|
|
3270
|
-
const
|
|
3271
|
-
u.current ===
|
|
3272
|
+
const _ = c.get(e);
|
|
3273
|
+
u.current === _ || (g(null), u.current = _);
|
|
3272
3274
|
}, [c, e]), z(() => {
|
|
3273
|
-
const
|
|
3274
|
-
if (!a.current || !e || !
|
|
3275
|
+
const _ = c.get(e);
|
|
3276
|
+
if (!a.current || !e || !_ || m)
|
|
3275
3277
|
return;
|
|
3276
|
-
const
|
|
3277
|
-
p.forEach((
|
|
3278
|
+
const y = new IntersectionObserver((p) => {
|
|
3279
|
+
p.forEach((f) => {
|
|
3278
3280
|
if (C.current) {
|
|
3279
3281
|
C.current = !1, d.removeQueue(`thumbnail-${e}`);
|
|
3280
3282
|
return;
|
|
3281
3283
|
}
|
|
3282
|
-
if (
|
|
3283
|
-
const
|
|
3284
|
+
if (f.isIntersecting) {
|
|
3285
|
+
const h = document.createElement("canvas");
|
|
3284
3286
|
C.current = !0, d.enqueue(
|
|
3285
3287
|
`thumbnail-${e}`,
|
|
3286
3288
|
{
|
|
3287
|
-
page:
|
|
3288
|
-
canvasElem:
|
|
3289
|
+
page: _.page,
|
|
3290
|
+
canvasElem: h,
|
|
3289
3291
|
options: {
|
|
3290
3292
|
scale: 1
|
|
3291
3293
|
},
|
|
3292
3294
|
onLoaded: () => {
|
|
3293
|
-
|
|
3295
|
+
h.toBlob((l) => {
|
|
3294
3296
|
if (!l)
|
|
3295
3297
|
return;
|
|
3296
3298
|
const v = URL.createObjectURL(l);
|
|
@@ -3303,15 +3305,15 @@ const Ee = {
|
|
|
3303
3305
|
}
|
|
3304
3306
|
});
|
|
3305
3307
|
});
|
|
3306
|
-
return a.current &&
|
|
3307
|
-
|
|
3308
|
+
return a.current && y.observe(a.current), () => {
|
|
3309
|
+
y.disconnect(), d.removeQueue(`thumbnail-${e}`);
|
|
3308
3310
|
};
|
|
3309
3311
|
}, [d, e, c, m]), /* @__PURE__ */ W(
|
|
3310
3312
|
"div",
|
|
3311
3313
|
{
|
|
3312
|
-
onClick:
|
|
3314
|
+
onClick: P,
|
|
3313
3315
|
id: `page-${e}`,
|
|
3314
|
-
className:
|
|
3316
|
+
className: qe["rp-thumbnail-wrapper"],
|
|
3315
3317
|
ref: a,
|
|
3316
3318
|
children: [
|
|
3317
3319
|
/* @__PURE__ */ i(
|
|
@@ -3320,66 +3322,66 @@ const Ee = {
|
|
|
3320
3322
|
style: {
|
|
3321
3323
|
transform: `rotate(${s[e || 0]}deg)`
|
|
3322
3324
|
},
|
|
3323
|
-
className: se(
|
|
3325
|
+
className: se(T, qe["rp-thumbnail"]),
|
|
3324
3326
|
children: m ? /* @__PURE__ */ i(
|
|
3325
3327
|
"img",
|
|
3326
3328
|
{
|
|
3327
3329
|
src: m,
|
|
3328
|
-
width:
|
|
3329
|
-
height:
|
|
3330
|
+
width: b.width,
|
|
3331
|
+
height: b.height,
|
|
3330
3332
|
alt: "thumbnail"
|
|
3331
3333
|
}
|
|
3332
3334
|
) : /* @__PURE__ */ i(
|
|
3333
3335
|
"div",
|
|
3334
3336
|
{
|
|
3335
|
-
className:
|
|
3337
|
+
className: qe["rp-thumbnail-loader"],
|
|
3336
3338
|
style: {
|
|
3337
|
-
width: `${
|
|
3338
|
-
height: `${
|
|
3339
|
+
width: `${b.width}px`,
|
|
3340
|
+
height: `${b.height}px`
|
|
3339
3341
|
},
|
|
3340
|
-
children: /* @__PURE__ */ i(
|
|
3342
|
+
children: /* @__PURE__ */ i(mn, {})
|
|
3341
3343
|
}
|
|
3342
3344
|
)
|
|
3343
3345
|
}
|
|
3344
3346
|
),
|
|
3345
|
-
/* @__PURE__ */ i("div", { className:
|
|
3347
|
+
/* @__PURE__ */ i("div", { className: qe["rp-thumbnail-text"], children: e })
|
|
3346
3348
|
]
|
|
3347
3349
|
}
|
|
3348
3350
|
);
|
|
3349
|
-
},
|
|
3351
|
+
}, ln = {
|
|
3350
3352
|
"rp-thumbnails-container": "_rp-thumbnails-container_16vqr_1",
|
|
3351
3353
|
"rp-thumbnails": "_rp-thumbnails_16vqr_1"
|
|
3352
|
-
},
|
|
3354
|
+
}, ps = 16, hs = (t, e) => {
|
|
3353
3355
|
const n = t == null ? void 0 : t.querySelector(`#page-${e}`);
|
|
3354
|
-
t && (n != null && n.offsetTop) && (t.scrollTop = (n == null ? void 0 : n.offsetTop) -
|
|
3355
|
-
},
|
|
3356
|
-
const { show: n, width: r } = t, { focusedPage: o, totalPages: s } = ue(), { thumbnailPages: a, addPage: d, thumbnailLength: c, addToPage: m } =
|
|
3357
|
-
|
|
3358
|
-
const u = k(() => Object.values(a), [a]),
|
|
3359
|
-
const
|
|
3360
|
-
|
|
3356
|
+
t && (n != null && n.offsetTop) && (t.scrollTop = (n == null ? void 0 : n.offsetTop) - ps);
|
|
3357
|
+
}, fs = rt((t, e) => {
|
|
3358
|
+
const { show: n, width: r } = t, { focusedPage: o, totalPages: s } = ue(), { thumbnailPages: a, addPage: d, thumbnailLength: c, addToPage: m } = yn(), g = M(null), C = M(1);
|
|
3359
|
+
dn(e, () => g.current);
|
|
3360
|
+
const u = k(() => Object.values(a), [a]), T = N(() => {
|
|
3361
|
+
const b = c + 1;
|
|
3362
|
+
b <= s && d(b);
|
|
3361
3363
|
}, [d, s, c]);
|
|
3362
3364
|
return z(() => {
|
|
3363
|
-
o > c && s > c ? m(o) : n && C.current !== o && (
|
|
3364
|
-
}, [o, c, m, n, u]),
|
|
3365
|
-
var
|
|
3365
|
+
o > c && s > c ? m(o) : n && C.current !== o && (hs(g.current, o), C.current = o);
|
|
3366
|
+
}, [o, c, m, n, u]), Bo(g.current, T), /* @__PURE__ */ i("div", { ref: g, className: ln["rp-thumbnails-container"], style: { width: r }, children: /* @__PURE__ */ i("div", { className: ln["rp-thumbnails"], children: n ? u.map((b, P) => {
|
|
3367
|
+
var _, y;
|
|
3366
3368
|
return /* @__PURE__ */ i(
|
|
3367
|
-
|
|
3369
|
+
us,
|
|
3368
3370
|
{
|
|
3369
|
-
isFocused: o === ((
|
|
3370
|
-
pageNumber: (
|
|
3371
|
-
loading:
|
|
3372
|
-
viewport:
|
|
3373
|
-
defaultRotation:
|
|
3371
|
+
isFocused: o === ((_ = b.page) == null ? void 0 : _.pageNumber),
|
|
3372
|
+
pageNumber: (y = b.page) == null ? void 0 : y.pageNumber,
|
|
3373
|
+
loading: b.loading,
|
|
3374
|
+
viewport: b.viewport,
|
|
3375
|
+
defaultRotation: b.defaultRotation
|
|
3374
3376
|
},
|
|
3375
|
-
|
|
3377
|
+
P
|
|
3376
3378
|
);
|
|
3377
3379
|
}) : null }) });
|
|
3378
|
-
}),
|
|
3380
|
+
}), ms = () => {
|
|
3379
3381
|
const { thumbnailIcon: t } = ge(), { thumbnailIcon: e } = me();
|
|
3380
|
-
return t || e || /* @__PURE__ */ i(
|
|
3381
|
-
},
|
|
3382
|
-
const { active: t, setActive: e } =
|
|
3382
|
+
return t || e || /* @__PURE__ */ i(Fo, {});
|
|
3383
|
+
}, gs = () => {
|
|
3384
|
+
const { active: t, setActive: e } = yn(), [n, r] = $(Zo), o = M(null), s = M(null), { thumbnailTool: a, sidebarEnable: d } = Ce(), { localeMessages: c } = de(), m = N(() => {
|
|
3383
3385
|
e((C) => !C);
|
|
3384
3386
|
}, []), 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(
|
|
3385
3387
|
ce,
|
|
@@ -3387,7 +3389,7 @@ const Ee = {
|
|
|
3387
3389
|
onClick: m,
|
|
3388
3390
|
active: t,
|
|
3389
3391
|
"aria-label": c == null ? void 0 : c.thumbnailTooltip,
|
|
3390
|
-
children: /* @__PURE__ */ i(
|
|
3392
|
+
children: /* @__PURE__ */ i(ms, {})
|
|
3391
3393
|
}
|
|
3392
3394
|
) }) : null, [a, t, m, c]);
|
|
3393
3395
|
return /* @__PURE__ */ i(he, { children: d && /* @__PURE__ */ W(
|
|
@@ -3405,9 +3407,9 @@ const Ee = {
|
|
|
3405
3407
|
hidden: !t,
|
|
3406
3408
|
className: wt["rp-thumbnails-wrapper"],
|
|
3407
3409
|
children: [
|
|
3408
|
-
/* @__PURE__ */ i(
|
|
3410
|
+
/* @__PURE__ */ i(fs, { show: t, ref: o }),
|
|
3409
3411
|
/* @__PURE__ */ i(
|
|
3410
|
-
|
|
3412
|
+
Ho,
|
|
3411
3413
|
{
|
|
3412
3414
|
onWidthChange: r,
|
|
3413
3415
|
thumbnailRef: o,
|
|
@@ -3420,7 +3422,7 @@ const Ee = {
|
|
|
3420
3422
|
]
|
|
3421
3423
|
}
|
|
3422
3424
|
) });
|
|
3423
|
-
},
|
|
3425
|
+
}, Tc = uo((t, e) => {
|
|
3424
3426
|
const {
|
|
3425
3427
|
children: n,
|
|
3426
3428
|
slots: r,
|
|
@@ -3431,27 +3433,27 @@ const Ee = {
|
|
|
3431
3433
|
onLoaded: c,
|
|
3432
3434
|
cleanupOnLoaded: m,
|
|
3433
3435
|
onLayoutWidthChange: g
|
|
3434
|
-
} = t, [C, u] = $(null), { setContainer:
|
|
3436
|
+
} = t, [C, u] = $(null), { setContainer: T, setContentRef: b } = Te(), { loading: P } = oe(), { LoaderImageComponent: _ } = yt();
|
|
3435
3437
|
return z(() => (c && c(), () => {
|
|
3436
3438
|
m && m();
|
|
3437
3439
|
}), [c, m]), // TODO: deprecated in v2.0.0, remove later ~
|
|
3438
|
-
/* @__PURE__ */ i(
|
|
3439
|
-
/* @__PURE__ */ W(
|
|
3440
|
+
/* @__PURE__ */ i(Nn, { toolbarRef: C, ref: e, children: /* @__PURE__ */ i(Wo, { mobileWidth: d, onLayoutWidthChange: g, children: /* @__PURE__ */ i(Mo, { slots: r, children: /* @__PURE__ */ i(Uo, { icons: o, children: /* @__PURE__ */ W(ko, { getContainerRef: T, style: s, className: a, children: [
|
|
3441
|
+
/* @__PURE__ */ W($o, { children: [
|
|
3440
3442
|
/* @__PURE__ */ W("div", { className: Pe["rp-layout"], children: [
|
|
3441
3443
|
/* @__PURE__ */ i(
|
|
3442
|
-
|
|
3444
|
+
ds,
|
|
3443
3445
|
{
|
|
3444
3446
|
ref: u
|
|
3445
3447
|
}
|
|
3446
3448
|
),
|
|
3447
3449
|
/* @__PURE__ */ W("div", { className: Pe["rp-content"], children: [
|
|
3448
|
-
/* @__PURE__ */ i("div", { className: Pe["rp-sidebar"], children: /* @__PURE__ */ i(
|
|
3449
|
-
/* @__PURE__ */ i("div", { ref:
|
|
3450
|
+
/* @__PURE__ */ i("div", { className: Pe["rp-sidebar"], children: /* @__PURE__ */ i(gs, {}) }),
|
|
3451
|
+
/* @__PURE__ */ i("div", { ref: b, className: Pe["rp-pages"], children: n })
|
|
3450
3452
|
] })
|
|
3451
3453
|
] }),
|
|
3452
3454
|
/* @__PURE__ */ i(qo, {})
|
|
3453
3455
|
] }),
|
|
3454
|
-
|
|
3456
|
+
P ? /* @__PURE__ */ i(
|
|
3455
3457
|
"div",
|
|
3456
3458
|
{
|
|
3457
3459
|
className: Pe["rp-loader"],
|
|
@@ -3474,13 +3476,13 @@ const Ee = {
|
|
|
3474
3476
|
height: "100%",
|
|
3475
3477
|
width: "100%"
|
|
3476
3478
|
},
|
|
3477
|
-
children:
|
|
3479
|
+
children: _ && /* @__PURE__ */ i(_, {})
|
|
3478
3480
|
}
|
|
3479
3481
|
)
|
|
3480
3482
|
}
|
|
3481
3483
|
) : null
|
|
3482
3484
|
] }) }) }) }) });
|
|
3483
|
-
}),
|
|
3485
|
+
}), Cc = {
|
|
3484
3486
|
"rp-toolbar-layout": "_rp-toolbar-layout_vwobs_1",
|
|
3485
3487
|
"rp-content": "_rp-content_vwobs_7",
|
|
3486
3488
|
"rp-topbar-content": "_rp-topbar-content_vwobs_13",
|
|
@@ -3489,59 +3491,59 @@ const Ee = {
|
|
|
3489
3491
|
"rp-thumbnails-wrapper": "_rp-thumbnails-wrapper_vwobs_37"
|
|
3490
3492
|
};
|
|
3491
3493
|
export {
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
+
us as $,
|
|
3495
|
+
Pn as A,
|
|
3494
3496
|
qr as B,
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3497
|
+
In as C,
|
|
3498
|
+
Hi as D,
|
|
3499
|
+
Sn as E,
|
|
3500
|
+
xn as F,
|
|
3501
|
+
Gr as G,
|
|
3502
|
+
Br as H,
|
|
3503
|
+
Kr as I,
|
|
3504
|
+
Qr as J,
|
|
3503
3505
|
Ot as K,
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3506
|
+
Nn as L,
|
|
3507
|
+
hi as M,
|
|
3508
|
+
gi as N,
|
|
3509
|
+
vi as O,
|
|
3510
|
+
Ci as P,
|
|
3511
|
+
wi as Q,
|
|
3512
|
+
wc as R,
|
|
3513
|
+
as as S,
|
|
3514
|
+
mc as T,
|
|
3515
|
+
Kn as U,
|
|
3516
|
+
Yn as V,
|
|
3517
|
+
Qi as W,
|
|
3518
|
+
Yi as X,
|
|
3519
|
+
cn as Y,
|
|
3520
|
+
ts as Z,
|
|
3521
|
+
ds as _,
|
|
3522
|
+
Tc as a,
|
|
3523
|
+
gs as a0,
|
|
3524
|
+
Bn as b,
|
|
3523
3525
|
it as c,
|
|
3524
3526
|
Nt as d,
|
|
3525
|
-
|
|
3527
|
+
yn as e,
|
|
3526
3528
|
vt as f,
|
|
3527
3529
|
Ae as g,
|
|
3528
3530
|
$e as h,
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3531
|
+
is as i,
|
|
3532
|
+
Ji as j,
|
|
3533
|
+
hc as k,
|
|
3534
|
+
gc as l,
|
|
3535
|
+
vc as m,
|
|
3536
|
+
fc as n,
|
|
3537
|
+
Cc as o,
|
|
3538
|
+
fs as p,
|
|
3539
|
+
ls as q,
|
|
3540
|
+
$i as r,
|
|
3541
|
+
ji as s,
|
|
3542
|
+
bn as t,
|
|
3541
3543
|
ue as u,
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3544
|
+
Mr as v,
|
|
3545
|
+
Tn as w,
|
|
3546
|
+
Hr as x,
|
|
3547
|
+
Cn as y,
|
|
3548
|
+
$r as z
|
|
3547
3549
|
};
|