@pdf-viewer/react 1.9.0-beta.2 → 1.9.0-beta.3
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/{RPLayout-81cd4970.js → RPLayout-897cb09d.js} +802 -802
- package/dist/assets/RPLayout.css +1 -1
- package/dist/components/RPController.js +1 -1
- package/dist/components/RPPages.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/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/ZoomTool.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/ThumbnailTool.js +1 -1
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +1 -1
- package/dist/components/layout/toolbar/tools/defaults/TopbarDefaultTools.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/ElementPageContext.js +54 -43
- package/dist/contexts/PaginationContext.js +1 -1
- package/dist/contexts/PrintContext.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/types.d.ts +3 -1
- package/dist/utils/hooks/useFileDownload.js +1 -1
- package/dist/utils/hooks/useLicense.js +26 -24
- package/dist/utils/hooks/usePageRotateContext.js +19 -20
- 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/types.js +6 -6
- package/package.json +1 -1
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
import { jsx as i, Fragment as
|
|
1
|
+
import { jsx as i, Fragment as ie, jsxs as A } from "react/jsx-runtime";
|
|
2
2
|
import * as j from "react";
|
|
3
|
-
import { useRef as $, useEffect as W, useCallback as N, useState as G, useMemo as k, createContext as
|
|
4
|
-
import { useLayoutContainer as
|
|
3
|
+
import { useRef as $, useEffect as W, useCallback as N, useState as G, useMemo as k, createContext as tt, useContext as nt, forwardRef as ke, useImperativeHandle as hn, createElement as Ke, PureComponent as uo, Component as po, memo as mn } from "react";
|
|
4
|
+
import { useLayoutContainer as se } from "./contexts/LayoutContainerContext.js";
|
|
5
5
|
import { Container as fn } from "./components/layout/Container.js";
|
|
6
|
-
import { useViewportContext as
|
|
7
|
-
import { c as
|
|
6
|
+
import { useViewportContext as Pe, ViewportProvider as gn } from "./contexts/ViewportContext.js";
|
|
7
|
+
import { c as ne } from "./clsx-0c6e471a.js";
|
|
8
8
|
import { useThemeContext as ho } from "./contexts/ThemeContext.js";
|
|
9
9
|
import { useDocumentContext as X } from "./contexts/RPDocumentContext.js";
|
|
10
10
|
import { useDocumentPasswordContext as mo } from "./contexts/DocumentPasswordContext.js";
|
|
11
|
-
import { ViewMode as
|
|
12
|
-
import { useScrollModeContext as
|
|
11
|
+
import { ViewMode as Ne, ScrollMode as ee, AnnotationSubType as Ht, SelectionMode as fo, ZoomLevel as lt } from "./utils/types.js";
|
|
12
|
+
import { useScrollModeContext as Oe } from "./contexts/ScrollModeContext.js";
|
|
13
13
|
import { useDarkModeContext as go } from "./contexts/DarkModeContext.js";
|
|
14
14
|
import "./contexts/RotationContext.js";
|
|
15
15
|
import { useLayerContext as vo } from "./contexts/LayerContext.js";
|
|
16
|
-
import { useZoomContext as
|
|
17
|
-
import { useViewModeContext as
|
|
18
|
-
import { useVirtualScrollContext as
|
|
16
|
+
import { useZoomContext as ot } from "./contexts/ZoomContext.js";
|
|
17
|
+
import { useViewModeContext as ze } from "./contexts/ViewModeContext.js";
|
|
18
|
+
import { useVirtualScrollContext as rt } from "./contexts/VirtualScrollContext.js";
|
|
19
19
|
import { useVirtualGridContext as vn } from "./contexts/VirtualGridContext.js";
|
|
20
20
|
import { useSelectionModeContext as wo } from "./contexts/SelectionModeContext.js";
|
|
21
21
|
import { useInitialStateContext as _o } from "./contexts/InitialStateContext.js";
|
|
22
22
|
import { useFullScreenContext as bo } from "./contexts/FullScreenContext.js";
|
|
23
23
|
import "./contexts/FileInputContext.js";
|
|
24
24
|
import "./contexts/DropFileZoneContext.js";
|
|
25
|
-
import { renderPage as
|
|
25
|
+
import { renderPage as bt } from "./utils/renderPage.js";
|
|
26
26
|
import { findMatches as To, resetDivs as Co, highlightMatches as Po, isMatchEntireWord as yo } from "./utils/highlight.js";
|
|
27
|
-
import { useDimensionPagesContext as
|
|
28
|
-
import { useLocalizationContext as
|
|
27
|
+
import { useDimensionPagesContext as Ve } from "./contexts/DimensionPagesContext.js";
|
|
28
|
+
import { useLocalizationContext as ce } from "./contexts/LocalizationContext.js";
|
|
29
29
|
import { useHighlightContext as So } from "./contexts/HighlightContext.js";
|
|
30
30
|
import "./contexts/LicenseContext.js";
|
|
31
31
|
import { useDownloadContext as Io } from "./contexts/DownloadContext.js";
|
|
32
32
|
import { useSmoothScrollContext as wn } from "./contexts/SmoothScrollContext.js";
|
|
33
33
|
import "./contexts/ElementPageContext.js";
|
|
34
|
-
import { usePagesRotateContext as
|
|
35
|
-
import { useLoaderContext as
|
|
34
|
+
import { usePagesRotateContext as Be } from "./contexts/PagesRotateContext.js";
|
|
35
|
+
import { useLoaderContext as yt } from "./contexts/LoaderContext.js";
|
|
36
36
|
import "./components/RPConfig.js";
|
|
37
|
-
import { ChevronUpIcon as
|
|
38
|
-
import { UIButton as
|
|
37
|
+
import { ChevronUpIcon as Ue } from "./components/icons/ChevronUpIcon.js";
|
|
38
|
+
import { UIButton as oe } from "./components/ui/Button.js";
|
|
39
39
|
import { UIInput as _n } from "./components/ui/Input.js";
|
|
40
|
-
import { useIconContext as
|
|
41
|
-
import { useToolbarComponentContext as
|
|
40
|
+
import { useIconContext as he, IconProvider as xo } from "./contexts/IconContext.js";
|
|
41
|
+
import { useToolbarComponentContext as me, ToolbarComponentProvider as Ro } from "./contexts/ToolbarComponentContext.js";
|
|
42
42
|
import Z from "./components/ui/RPTooltip.js";
|
|
43
|
-
import { useIconToolContext as
|
|
44
|
-
import { useToolComponentContext as
|
|
43
|
+
import { useIconToolContext as fe, IconToolProvider as Lo } from "./contexts/IconToolContext.js";
|
|
44
|
+
import { useToolComponentContext as ye, ToolComponentProvider as No } from "./contexts/ToolComponentContext.js";
|
|
45
45
|
import { FileUploadTool as bn } from "./components/layout/toolbar/FileUploadTool.js";
|
|
46
46
|
import { DarkModeTool as Eo } from "./components/layout/toolbar/DarkModeTool.js";
|
|
47
47
|
import { ThreeDotIcon as Oo } from "./components/icons/ThreeDotIcon.js";
|
|
48
48
|
import { UIDropDown as Tn } from "./components/ui/DropDown.js";
|
|
49
|
-
import { e as zo, a as
|
|
50
|
-
import { D as Mo, u as
|
|
51
|
-
import { a as Wo, u as ko, F as Ho, b as $o, G as
|
|
49
|
+
import { e as zo, a as St, P as Ze, c as qe, g as It, i as Do, k as Ao, f as Fo } from "./index-1cb41342.js";
|
|
50
|
+
import { D as Mo, u as dt } from "./index-aa2d3884.js";
|
|
51
|
+
import { a as Wo, u as ko, F as Ho, b as $o, G as Qe } from "./index-7279fb4e.js";
|
|
52
52
|
import { h as Go } from "./component-1da194e8.js";
|
|
53
|
-
import { CloseIcon as
|
|
54
|
-
import { dateFormatter as $
|
|
55
|
-
import { LoaderIcon as
|
|
56
|
-
import { useInfiniteScroll as
|
|
53
|
+
import { CloseIcon as qo } from "./components/icons/CloseIcon.js";
|
|
54
|
+
import { dateFormatter as $t } from "./utils/dateFormatter.js";
|
|
55
|
+
import { LoaderIcon as xt } from "./components/icons/LoaderIcon.js";
|
|
56
|
+
import { useInfiniteScroll as Uo } from "./utils/hooks/useInfiniteScroll.js";
|
|
57
57
|
import { RPDropFileZone as Cn } from "./components/RPDropFileZone.js";
|
|
58
|
-
import { c as Q, S as
|
|
59
|
-
import { UICheckbox as
|
|
60
|
-
import { _ as
|
|
61
|
-
import { MenuItem as
|
|
62
|
-
import { MenuSeparator as
|
|
58
|
+
import { c as Q, S as Gt } from "./SearchCloseButton-ddb9877e.js";
|
|
59
|
+
import { UICheckbox as qt } from "./components/ui/Checkbox.js";
|
|
60
|
+
import { _ as Vo, U as Bo } from "./Popover-1faa77f6.js";
|
|
61
|
+
import { MenuItem as Ce } from "./components/layout/toolbar/MenuItem.js";
|
|
62
|
+
import { MenuSeparator as Rt } from "./components/layout/toolbar/MenuSeparator.js";
|
|
63
63
|
import { PropertyItem as Zo } from "./components/layout/toolbar/PropertyItem.js";
|
|
64
64
|
import { useOtherToolContext as jo, OtherToolProvider as Pn } from "./contexts/OtherToolContext.js";
|
|
65
65
|
import { RotateTool as Ko } from "./components/layout/toolbar/RotateTool.js";
|
|
@@ -68,43 +68,43 @@ import { DocumentProperties as Xo } from "./components/layout/toolbar/DocumentPr
|
|
|
68
68
|
import { ViewModeTool as Yo } from "./components/layout/toolbar/ViewModeTool.js";
|
|
69
69
|
import { ScrollModeTool as Jo } from "./components/layout/toolbar/ScrollModeTool.js";
|
|
70
70
|
import { FileDownloadDefaultIcon as Qo } from "./components/icons/FileDownloadDefaultIcon.js";
|
|
71
|
-
import { PrintDefaultTool as
|
|
71
|
+
import { PrintDefaultTool as er } from "./components/icons/PrintDefaultIcon.js";
|
|
72
72
|
import { FullScreenTool as Sn } from "./components/layout/toolbar/FullScreenTool.js";
|
|
73
73
|
import { GoToDownIcon as In } from "./components/icons/GoToDownIcon.js";
|
|
74
|
-
import { SelectionModeTool as
|
|
74
|
+
import { SelectionModeTool as tr } from "./components/layout/toolbar/SelectionModeTool.js";
|
|
75
75
|
import { ZoomInIcon as nr } from "./components/icons/ZoomInIcon.js";
|
|
76
76
|
import { ZoomOutIcon as or } from "./components/icons/ZoomOutIcon.js";
|
|
77
|
-
import { PAGE_PADDING as
|
|
77
|
+
import { PAGE_PADDING as Ut } from "./utils/constants.js";
|
|
78
78
|
import { getZoomLevel as rr } from "./utils/getZoomLevel.js";
|
|
79
79
|
import { SearchIcon as xn } from "./components/icons/SearchIcon.js";
|
|
80
80
|
import { ClearIcon as ir } from "./components/icons/ClearIcon.js";
|
|
81
|
-
import { InfoIcon as
|
|
81
|
+
import { InfoIcon as Vt } from "./components/icons/InfoIcon.js";
|
|
82
82
|
import { ThumbnailIcon as ar } from "./components/icons/Thumbnail.js";
|
|
83
83
|
import { RPSplitter as sr } from "./components/layout/sidebar/RPSplitter.js";
|
|
84
84
|
import * as cr from "pdfjs-dist";
|
|
85
85
|
import { PixelsPerInch as lr, AnnotationMode as dr, RenderingCancelledException as ur, AnnotationLayer as pr } from "pdfjs-dist";
|
|
86
86
|
import { SimpleLinkService as hr } from "./utils/link_service.js";
|
|
87
|
-
import { annotationsEvents as mr, annotationEventsHandler as fr, handleClick as
|
|
87
|
+
import { annotationsEvents as mr, annotationEventsHandler as fr, handleClick as Bt, handleAnnotationWidget as gr, handleAnnotationLink as vr, bindLayerEvents as wr, unbindLayerEvents as Zt } from "./utils/annotations.js";
|
|
88
88
|
import { normalizeSingleKeyword as _r, sortHighlightPosition as br, unwrap as Tr } from "./components/page/searchHighlight.js";
|
|
89
89
|
import { CustomElement as Cr } from "./components/page/CustomElement.js";
|
|
90
90
|
import { useMousePressed as Pr } from "./utils/hooks/useMousePressed.js";
|
|
91
91
|
import { useGrabScroll as yr } from "./utils/hooks/useGrabScroll.js";
|
|
92
92
|
import { usePinch as Sr } from "./utils/hooks/usePinch.js";
|
|
93
|
-
import { useDebounce as
|
|
93
|
+
import { useDebounce as Lt } from "./utils/hooks/useDebounce.js";
|
|
94
94
|
import Ir from "./components/ui/PasswordModal.js";
|
|
95
95
|
import { getPositionFromPage as xr, getPageFromPosition as Rr } from "./utils/calculatePage.js";
|
|
96
|
-
import { getScrollDistance as
|
|
96
|
+
import { getScrollDistance as We } from "./utils/getScrollDistance.js";
|
|
97
97
|
import { getWordPositionInPage as Lr } from "./utils/getWordPositionInPage.js";
|
|
98
|
-
import { getThumbnailViewport as
|
|
99
|
-
import { smoothScrollTo as
|
|
98
|
+
import { getThumbnailViewport as jt } from "./utils/getThumbnailViewport.js";
|
|
99
|
+
import { smoothScrollTo as ut } from "./utils/smoothScrollTo.js";
|
|
100
100
|
import { appConsole as Nr } from "./utils/appConsole.js";
|
|
101
101
|
import './assets/RPLayout.css';const Rn = () => {
|
|
102
|
-
const { viewMode:
|
|
102
|
+
const { viewMode: t } = ze(), { scrollMode: e } = Oe(), { virtualScrollRef: n, virtualScrollableElementRef: r, pageScrollElementRef: o } = rt(), { setFocusedPage: a } = ae(), l = $(), { columnCount: s } = vn(), { widths: d, heights: f } = Ve(), u = $(e), b = $(t), h = $(s), { targetScrollPage: g } = wn();
|
|
103
103
|
W(() => {
|
|
104
104
|
n != null && n.scrollToItem && (l.current = n);
|
|
105
105
|
}, [n]), W(() => {
|
|
106
|
-
u.current =
|
|
107
|
-
}, [
|
|
106
|
+
u.current = e, b.current = t;
|
|
107
|
+
}, [e, t]);
|
|
108
108
|
const T = N(
|
|
109
109
|
(C, S) => {
|
|
110
110
|
if (!o)
|
|
@@ -116,7 +116,7 @@ import './assets/RPLayout.css';const Rn = () => {
|
|
|
116
116
|
top: 0
|
|
117
117
|
};
|
|
118
118
|
return new Promise(
|
|
119
|
-
(c) =>
|
|
119
|
+
(c) => ut(o, m, c)
|
|
120
120
|
);
|
|
121
121
|
}
|
|
122
122
|
const p = {
|
|
@@ -128,32 +128,32 @@ import './assets/RPLayout.css';const Rn = () => {
|
|
|
128
128
|
behavior: S
|
|
129
129
|
});
|
|
130
130
|
},
|
|
131
|
-
[o, d,
|
|
131
|
+
[o, d, ut]
|
|
132
132
|
);
|
|
133
133
|
return W(() => {
|
|
134
|
-
u.current =
|
|
135
|
-
}, [
|
|
134
|
+
u.current = e, b.current = t;
|
|
135
|
+
}, [e, t]), W(() => {
|
|
136
136
|
h.current = s;
|
|
137
137
|
}, [s]), { scrollToPage: N(
|
|
138
138
|
(C, S = "smooth") => {
|
|
139
139
|
a(C);
|
|
140
140
|
const w = C - 1;
|
|
141
141
|
let p = w, m = 0;
|
|
142
|
-
if (b.current ===
|
|
142
|
+
if (b.current === Ne.DUAL_PAGE && u.current === ee.PAGE_SCROLLING) {
|
|
143
143
|
T(C, S);
|
|
144
144
|
return;
|
|
145
145
|
}
|
|
146
|
-
if (u.current ===
|
|
146
|
+
if (u.current === ee.PAGE_SCROLLING) {
|
|
147
147
|
a(C);
|
|
148
148
|
return;
|
|
149
149
|
}
|
|
150
150
|
if (!l.current || !r)
|
|
151
151
|
return;
|
|
152
152
|
const c = r;
|
|
153
|
-
if (g.current = C, u.current ===
|
|
153
|
+
if (g.current = C, u.current === ee.HORIZONTAL_SCROLLING) {
|
|
154
154
|
m = w;
|
|
155
155
|
const P = {
|
|
156
|
-
left:
|
|
156
|
+
left: We(d, m),
|
|
157
157
|
top: 0
|
|
158
158
|
};
|
|
159
159
|
return c.scrollTo({
|
|
@@ -161,11 +161,11 @@ import './assets/RPLayout.css';const Rn = () => {
|
|
|
161
161
|
behavior: S
|
|
162
162
|
});
|
|
163
163
|
}
|
|
164
|
-
if (b.current ===
|
|
164
|
+
if (b.current === Ne.DUAL_PAGE) {
|
|
165
165
|
m = w % 2, p = Math.floor(w / 2);
|
|
166
166
|
const P = {
|
|
167
|
-
left:
|
|
168
|
-
top:
|
|
167
|
+
left: We(d, m),
|
|
168
|
+
top: We(f, p)
|
|
169
169
|
};
|
|
170
170
|
return c.scrollTo({
|
|
171
171
|
...P,
|
|
@@ -174,7 +174,7 @@ import './assets/RPLayout.css';const Rn = () => {
|
|
|
174
174
|
}
|
|
175
175
|
const _ = {
|
|
176
176
|
left: 0,
|
|
177
|
-
top:
|
|
177
|
+
top: We(f, p)
|
|
178
178
|
};
|
|
179
179
|
return c.scrollTo({
|
|
180
180
|
..._,
|
|
@@ -186,13 +186,13 @@ import './assets/RPLayout.css';const Rn = () => {
|
|
|
186
186
|
s,
|
|
187
187
|
T,
|
|
188
188
|
a,
|
|
189
|
-
|
|
189
|
+
ut,
|
|
190
190
|
f,
|
|
191
191
|
d
|
|
192
192
|
]
|
|
193
193
|
) };
|
|
194
|
-
}, Er = (
|
|
195
|
-
const [
|
|
194
|
+
}, Er = (t = 1) => {
|
|
195
|
+
const [e, n] = G(t), [r, o] = G(0), { scrollToPage: a } = Rn(), l = $(1), { viewMode: s } = ze(), { scrollMode: d } = Oe(), { widths: f } = Ve(), { pagesRef: u } = se(), b = Lt(e, 100), h = N(
|
|
196
196
|
(p) => {
|
|
197
197
|
if (!/^[0-9]*$/g.test(p.toString()) || !p)
|
|
198
198
|
return { success: !1, currentPage: l.current };
|
|
@@ -211,16 +211,16 @@ import './assets/RPLayout.css';const Rn = () => {
|
|
|
211
211
|
if (!u || m)
|
|
212
212
|
return !1;
|
|
213
213
|
const c = m ? f[p] : f[p - 1], _ = m ? f[p + 1] : f[p];
|
|
214
|
-
return s ===
|
|
214
|
+
return s === Ne.DUAL_PAGE && c + _ < u.clientWidth;
|
|
215
215
|
}, [s, f, u, r]), C = N(() => {
|
|
216
|
-
let p =
|
|
217
|
-
y(p) && (p =
|
|
218
|
-
}, [T,
|
|
216
|
+
let p = e - 1;
|
|
217
|
+
y(p) && (p = e - 2), T(p);
|
|
218
|
+
}, [T, e, s, d, y]), S = k(() => s === Ne.DUAL_PAGE && d === ee.PAGE_SCROLLING ? e === r - 1 : e === r, [e, r, s, d]), w = N(() => {
|
|
219
219
|
if (S)
|
|
220
220
|
return;
|
|
221
|
-
let p =
|
|
222
|
-
y(p) && (p =
|
|
223
|
-
}, [T,
|
|
221
|
+
let p = e + 1;
|
|
222
|
+
y(p) && (p = e + 2), T(p);
|
|
223
|
+
}, [T, e, y, s, d, S]);
|
|
224
224
|
return {
|
|
225
225
|
focusedPage: b,
|
|
226
226
|
totalPages: r,
|
|
@@ -230,26 +230,26 @@ import './assets/RPLayout.css';const Rn = () => {
|
|
|
230
230
|
prevPage: C,
|
|
231
231
|
goToPage: T
|
|
232
232
|
};
|
|
233
|
-
}, Ln =
|
|
233
|
+
}, Ln = tt({
|
|
234
234
|
focusedPage: 0,
|
|
235
|
-
setFocusedPage: (
|
|
235
|
+
setFocusedPage: (t) => {
|
|
236
236
|
},
|
|
237
|
-
goToPage: (
|
|
237
|
+
goToPage: (t) => ({ success: !!t, currentPage: +t }),
|
|
238
238
|
totalPages: 0,
|
|
239
|
-
setTotalPages: (
|
|
239
|
+
setTotalPages: (t) => {
|
|
240
240
|
},
|
|
241
241
|
prevPage: () => {
|
|
242
242
|
},
|
|
243
243
|
nextPage: () => {
|
|
244
244
|
}
|
|
245
|
-
}),
|
|
246
|
-
const
|
|
247
|
-
return typeof (
|
|
248
|
-
}, Xs = ({ children:
|
|
249
|
-
const { pdf:
|
|
245
|
+
}), ae = () => {
|
|
246
|
+
const t = nt(Ln);
|
|
247
|
+
return typeof (t == null ? void 0 : t.focusedPage) > "u" && Nr.error("Please use this hooks inside children component of RPProvider"), t;
|
|
248
|
+
}, Xs = ({ children: t }) => {
|
|
249
|
+
const { pdf: e } = X(), { focusedPage: n, totalPages: r, setFocusedPage: o, setTotalPages: a, goToPage: l, nextPage: s, prevPage: d } = Er();
|
|
250
250
|
return W(() => {
|
|
251
|
-
|
|
252
|
-
}, [
|
|
251
|
+
e != null && e.numPages && (a(e.numPages), o(1));
|
|
252
|
+
}, [e, a, o]), /* @__PURE__ */ i(
|
|
253
253
|
Ln.Provider,
|
|
254
254
|
{
|
|
255
255
|
value: {
|
|
@@ -261,12 +261,12 @@ import './assets/RPLayout.css';const Rn = () => {
|
|
|
261
261
|
prevPage: d,
|
|
262
262
|
goToPage: l
|
|
263
263
|
},
|
|
264
|
-
children:
|
|
264
|
+
children: t
|
|
265
265
|
}
|
|
266
266
|
);
|
|
267
267
|
};
|
|
268
268
|
const Or = () => {
|
|
269
|
-
const { pdf:
|
|
269
|
+
const { pdf: t, pages: e } = X(), [n, r] = G({
|
|
270
270
|
loadedPages: 0,
|
|
271
271
|
totalPages: 0,
|
|
272
272
|
percentage: 0
|
|
@@ -362,16 +362,16 @@ const Or = () => {
|
|
|
362
362
|
}
|
|
363
363
|
return c.appendChild(_), c.append(...p), c;
|
|
364
364
|
}, w = N(async () => {
|
|
365
|
-
if (!
|
|
365
|
+
if (!t)
|
|
366
366
|
return;
|
|
367
367
|
h();
|
|
368
368
|
const p = document.createElement("canvas"), m = [];
|
|
369
369
|
try {
|
|
370
|
-
|
|
371
|
-
const _ =
|
|
372
|
-
|
|
373
|
-
), P =
|
|
374
|
-
for (const [I, x] of
|
|
370
|
+
t.isPureXfa && console.warn("[rp] XFA Form is not supported at the moment.");
|
|
371
|
+
const _ = t.getOptionalContentConfig({ intent: "print" }), v = Promise.resolve(
|
|
372
|
+
t.annotationStorage.print ?? void 0
|
|
373
|
+
), P = e.size;
|
|
374
|
+
for (const [I, x] of e) {
|
|
375
375
|
if (u.current) {
|
|
376
376
|
h();
|
|
377
377
|
return;
|
|
@@ -379,7 +379,7 @@ const Or = () => {
|
|
|
379
379
|
const O = x.page.getViewport({ scale: 1 });
|
|
380
380
|
if (await T({
|
|
381
381
|
scratchCanvas: p,
|
|
382
|
-
pdfDocument:
|
|
382
|
+
pdfDocument: t,
|
|
383
383
|
pageNumber: I,
|
|
384
384
|
viewerPdfPage: O,
|
|
385
385
|
printResolution: 150,
|
|
@@ -402,14 +402,14 @@ const Or = () => {
|
|
|
402
402
|
h();
|
|
403
403
|
return;
|
|
404
404
|
}
|
|
405
|
-
const R = S(m,
|
|
405
|
+
const R = S(m, e);
|
|
406
406
|
document.body.appendChild(R), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), a(!0), await y();
|
|
407
407
|
} catch (c) {
|
|
408
408
|
s(!0), c instanceof Error && f(c);
|
|
409
409
|
} finally {
|
|
410
410
|
p.height = 0, p.width = 0;
|
|
411
411
|
}
|
|
412
|
-
}, [
|
|
412
|
+
}, [t, e, u]);
|
|
413
413
|
return W(() => {
|
|
414
414
|
const p = () => {
|
|
415
415
|
h(), b();
|
|
@@ -425,25 +425,25 @@ const Or = () => {
|
|
|
425
425
|
isError: l,
|
|
426
426
|
error: d
|
|
427
427
|
};
|
|
428
|
-
}, Nn =
|
|
428
|
+
}, Nn = tt({
|
|
429
429
|
print: () => {
|
|
430
430
|
},
|
|
431
431
|
cancel: () => {
|
|
432
432
|
},
|
|
433
|
-
setOnProgress: (
|
|
433
|
+
setOnProgress: (t) => {
|
|
434
434
|
},
|
|
435
435
|
progress: {},
|
|
436
|
-
setOnComplete: (
|
|
437
|
-
setOnError: (
|
|
436
|
+
setOnComplete: (t) => t(),
|
|
437
|
+
setOnError: (t) => {
|
|
438
438
|
try {
|
|
439
|
-
const
|
|
440
|
-
e
|
|
441
|
-
} catch (
|
|
442
|
-
console.error("Error in setOnError callback:",
|
|
439
|
+
const e = new Error("Print error occurred");
|
|
440
|
+
t(e);
|
|
441
|
+
} catch (e) {
|
|
442
|
+
console.error("Error in setOnError callback:", e);
|
|
443
443
|
}
|
|
444
444
|
}
|
|
445
|
-
}), Ys = ({ children:
|
|
446
|
-
const [
|
|
445
|
+
}), Ys = ({ children: t }) => {
|
|
446
|
+
const [e, n] = G(null), [r, o] = G(null), { print: a, cancel: l, progress: s, isComplete: d, isError: f, error: u } = Or(), b = N((C) => {
|
|
447
447
|
C && typeof C == "function" && o(() => C);
|
|
448
448
|
}, []), h = (C) => {
|
|
449
449
|
u && C(u);
|
|
@@ -451,7 +451,7 @@ const Or = () => {
|
|
|
451
451
|
(C) => {
|
|
452
452
|
n(() => C);
|
|
453
453
|
},
|
|
454
|
-
[s,
|
|
454
|
+
[s, e]
|
|
455
455
|
);
|
|
456
456
|
W(() => {
|
|
457
457
|
d && r && T();
|
|
@@ -460,8 +460,8 @@ const Or = () => {
|
|
|
460
460
|
console.error(C);
|
|
461
461
|
});
|
|
462
462
|
}, [f]), W(() => {
|
|
463
|
-
s &&
|
|
464
|
-
}, [s,
|
|
463
|
+
s && e && e(s);
|
|
464
|
+
}, [s, e]);
|
|
465
465
|
const T = () => {
|
|
466
466
|
r && (r(), o(null));
|
|
467
467
|
}, y = {
|
|
@@ -472,19 +472,19 @@ const Or = () => {
|
|
|
472
472
|
setOnError: h,
|
|
473
473
|
progress: s
|
|
474
474
|
};
|
|
475
|
-
return /* @__PURE__ */ i(Nn.Provider, { value: y, children:
|
|
476
|
-
},
|
|
477
|
-
const
|
|
478
|
-
if (!
|
|
475
|
+
return /* @__PURE__ */ i(Nn.Provider, { value: y, children: t });
|
|
476
|
+
}, je = () => {
|
|
477
|
+
const t = nt(Nn);
|
|
478
|
+
if (!t)
|
|
479
479
|
throw new Error("usePrintContext must be used within a PrintProvider");
|
|
480
|
-
return
|
|
480
|
+
return t;
|
|
481
481
|
}, zr = () => {
|
|
482
|
-
const [
|
|
482
|
+
const [t, e] = G({}), { pages: n } = X(), r = k(() => Object.keys(t).length, [t]), o = N(
|
|
483
483
|
(l) => {
|
|
484
484
|
if (!n.size)
|
|
485
485
|
return;
|
|
486
486
|
const s = l > n.size ? n.size : l, d = Array.from(n.values()).slice(0, s).map((b) => {
|
|
487
|
-
const { thumbnailViewport: h, scale: g } =
|
|
487
|
+
const { thumbnailViewport: h, scale: g } = jt(b.page, b.defaultRotation);
|
|
488
488
|
return {
|
|
489
489
|
scale: g,
|
|
490
490
|
page: b.page,
|
|
@@ -493,10 +493,10 @@ const Or = () => {
|
|
|
493
493
|
defaultRotation: b.defaultRotation
|
|
494
494
|
};
|
|
495
495
|
}), f = d.reduce((b, h) => (b[h.page.pageNumber] = h, b), {});
|
|
496
|
-
|
|
496
|
+
e(f);
|
|
497
497
|
const u = [];
|
|
498
498
|
for (const b of d) {
|
|
499
|
-
const h = document.createElement("canvas"), g =
|
|
499
|
+
const h = document.createElement("canvas"), g = bt(b.page, h, {
|
|
500
500
|
scale: b.scale,
|
|
501
501
|
rotate: b.defaultRotation
|
|
502
502
|
}).promise.then(() => {
|
|
@@ -515,7 +515,7 @@ const Or = () => {
|
|
|
515
515
|
(g, T) => (g[T.page.pageNumber] = T, g),
|
|
516
516
|
{}
|
|
517
517
|
);
|
|
518
|
-
|
|
518
|
+
e((g) => ({ ...g, ...h }));
|
|
519
519
|
}).catch(() => {
|
|
520
520
|
});
|
|
521
521
|
},
|
|
@@ -531,7 +531,7 @@ const Or = () => {
|
|
|
531
531
|
const s = n.get(l);
|
|
532
532
|
if (!s)
|
|
533
533
|
return;
|
|
534
|
-
|
|
534
|
+
e((f) => ({
|
|
535
535
|
...f,
|
|
536
536
|
[l]: {
|
|
537
537
|
loading: !0,
|
|
@@ -542,11 +542,11 @@ const Or = () => {
|
|
|
542
542
|
}
|
|
543
543
|
}));
|
|
544
544
|
const d = document.createElement("canvas");
|
|
545
|
-
|
|
545
|
+
bt(s.page, d, {
|
|
546
546
|
scale: s.thumbnailScale,
|
|
547
547
|
rotate: s.defaultRotation
|
|
548
548
|
}).promise.then(() => {
|
|
549
|
-
const f = d.toDataURL(), { thumbnailViewport: u, scale: b } =
|
|
549
|
+
const f = d.toDataURL(), { thumbnailViewport: u, scale: b } = jt(s.page);
|
|
550
550
|
return {
|
|
551
551
|
scale: b,
|
|
552
552
|
thumbnailSrc: f,
|
|
@@ -556,36 +556,36 @@ const Or = () => {
|
|
|
556
556
|
defaultRotation: s.defaultRotation
|
|
557
557
|
};
|
|
558
558
|
}).then((f) => {
|
|
559
|
-
|
|
559
|
+
e((u) => ({ ...u, [l]: f }));
|
|
560
560
|
});
|
|
561
561
|
},
|
|
562
562
|
[n]
|
|
563
563
|
);
|
|
564
|
-
return { thumbnailPages:
|
|
565
|
-
}, En =
|
|
564
|
+
return { thumbnailPages: t, addPage: a, addToPage: o, thumbnailLength: r };
|
|
565
|
+
}, En = tt({
|
|
566
566
|
thumbnailPages: {},
|
|
567
|
-
addPage: (
|
|
567
|
+
addPage: (t) => {
|
|
568
568
|
},
|
|
569
|
-
addToPage: (
|
|
569
|
+
addToPage: (t) => {
|
|
570
570
|
},
|
|
571
571
|
thumbnailLength: 0,
|
|
572
|
-
setActive: (
|
|
572
|
+
setActive: (t) => {
|
|
573
573
|
},
|
|
574
574
|
active: !1
|
|
575
|
-
}),
|
|
576
|
-
children:
|
|
577
|
-
initialThumbnailsVisible:
|
|
575
|
+
}), Nt = () => nt(En), Js = ({
|
|
576
|
+
children: t,
|
|
577
|
+
initialThumbnailsVisible: e
|
|
578
578
|
}) => {
|
|
579
|
-
const { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: a } = zr(), [l, s] = G(
|
|
579
|
+
const { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: a } = zr(), [l, s] = G(e);
|
|
580
580
|
return /* @__PURE__ */ i(
|
|
581
581
|
En.Provider,
|
|
582
582
|
{
|
|
583
583
|
value: { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: a, active: l, setActive: s },
|
|
584
|
-
children:
|
|
584
|
+
children: t
|
|
585
585
|
}
|
|
586
586
|
);
|
|
587
|
-
}, Dr = (
|
|
588
|
-
const [n, r] = G(
|
|
587
|
+
}, Dr = (t = {}, e = "") => {
|
|
588
|
+
const [n, r] = G(e), [o, a] = G(!1), { pdf: l, pages: s } = X(), { widths: d, heights: f } = Ve(), u = $(!n), { currentZoom: b } = ot(), [h, g] = G([]), { setFocusedPage: T } = ae(), { columnCount: y } = ze(), { pageRotate: C } = Be(), [S, w] = G(0), { pageScrollElementRef: p, virtualScrollableElementRef: m } = rt(), { scrollMode: c } = Oe(), { pagesRef: _ } = se(), [v, P] = G(null), R = $({}), I = k(() => S === 0 ? null : h[S - 1], [S, h]), x = k(() => h.length, [h]);
|
|
589
589
|
W(() => {
|
|
590
590
|
if (!I || !s)
|
|
591
591
|
return;
|
|
@@ -593,32 +593,32 @@ const Or = () => {
|
|
|
593
593
|
if (!L || !_)
|
|
594
594
|
return;
|
|
595
595
|
const E = s.get(I.page);
|
|
596
|
-
if (c ===
|
|
596
|
+
if (c === ee.PAGE_SCROLLING && T(I.page), !E)
|
|
597
597
|
return;
|
|
598
598
|
let F = 0, z = 0;
|
|
599
|
-
if (c ===
|
|
600
|
-
const
|
|
601
|
-
F =
|
|
599
|
+
if (c === ee.VERTICAL_SCROLLING) {
|
|
600
|
+
const ue = I.page - 1, J = y, He = ue % J, be = Math.floor(ue / J);
|
|
601
|
+
F = We(f, be), z = We(d, He);
|
|
602
602
|
}
|
|
603
|
-
c ===
|
|
603
|
+
c === ee.HORIZONTAL_SCROLLING && (z = d.slice(0, I.page - 1).reduce((ue, J) => ue + J, 0));
|
|
604
604
|
const H = {
|
|
605
605
|
height: f[I.page - 1],
|
|
606
606
|
width: d[I.page - 1]
|
|
607
|
-
},
|
|
607
|
+
}, V = {
|
|
608
608
|
top: H.height / 2,
|
|
609
609
|
left: H.width / 2
|
|
610
|
-
}, K = C[I.page], { leftInPage: B, topInPage:
|
|
610
|
+
}, K = C[I.page], { leftInPage: B, topInPage: te } = Lr(
|
|
611
611
|
H,
|
|
612
|
-
|
|
612
|
+
V,
|
|
613
613
|
I.rect,
|
|
614
614
|
b,
|
|
615
615
|
K
|
|
616
|
-
), Y = z + B,
|
|
616
|
+
), Y = z + B, de = F + te, _e = {
|
|
617
617
|
left: Math.max(Y, 0),
|
|
618
|
-
top: Math.max(
|
|
618
|
+
top: Math.max(de, 0)
|
|
619
619
|
};
|
|
620
620
|
L.scrollTo({
|
|
621
|
-
...
|
|
621
|
+
..._e,
|
|
622
622
|
behavior: "smooth"
|
|
623
623
|
});
|
|
624
624
|
}, [
|
|
@@ -656,19 +656,19 @@ const Or = () => {
|
|
|
656
656
|
u.current = !1, a(!0), g([]), w(0), M(l).then((L) => {
|
|
657
657
|
R.current = L;
|
|
658
658
|
const F = Object.keys(L).reduce((z, H) => {
|
|
659
|
-
const
|
|
659
|
+
const V = To(
|
|
660
660
|
[n],
|
|
661
661
|
L[H],
|
|
662
662
|
Number(H) - 1,
|
|
663
|
-
|
|
663
|
+
t
|
|
664
664
|
).map((K, B) => ({ ...K, page: Number(H), pageMatchIdx: B }));
|
|
665
|
-
return [...z, ...
|
|
665
|
+
return [...z, ...V];
|
|
666
666
|
}, []);
|
|
667
667
|
g(F), w(F.length ? 1 : 0);
|
|
668
668
|
}).catch(() => {
|
|
669
669
|
g([]), w(0);
|
|
670
670
|
}).finally(() => a(!1));
|
|
671
|
-
}, [n, M, l,
|
|
671
|
+
}, [n, M, l, t]), {
|
|
672
672
|
search: n,
|
|
673
673
|
setSearch: r,
|
|
674
674
|
loading: o,
|
|
@@ -681,9 +681,9 @@ const Or = () => {
|
|
|
681
681
|
currentMatchElement: v,
|
|
682
682
|
setCurrentMatchElement: P
|
|
683
683
|
};
|
|
684
|
-
}, On =
|
|
684
|
+
}, On = tt({
|
|
685
685
|
search: "",
|
|
686
|
-
setSearch: (
|
|
686
|
+
setSearch: (t) => {
|
|
687
687
|
},
|
|
688
688
|
loading: !1,
|
|
689
689
|
matches: [],
|
|
@@ -695,13 +695,13 @@ const Or = () => {
|
|
|
695
695
|
prevMatch: () => {
|
|
696
696
|
},
|
|
697
697
|
searchOptions: {},
|
|
698
|
-
setSearchOptions: (
|
|
698
|
+
setSearchOptions: (t) => t,
|
|
699
699
|
currentMatchElement: null,
|
|
700
|
-
setCurrentMatchElement: (
|
|
700
|
+
setCurrentMatchElement: (t) => {
|
|
701
701
|
}
|
|
702
702
|
}), Qs = ({
|
|
703
|
-
children:
|
|
704
|
-
initialSearch:
|
|
703
|
+
children: t,
|
|
704
|
+
initialSearch: e
|
|
705
705
|
}) => {
|
|
706
706
|
const [n, r] = G({}), {
|
|
707
707
|
loading: o,
|
|
@@ -715,7 +715,7 @@ const Or = () => {
|
|
|
715
715
|
prevMatch: h,
|
|
716
716
|
currentMatchElement: g,
|
|
717
717
|
setCurrentMatchElement: T
|
|
718
|
-
} = Dr(n,
|
|
718
|
+
} = Dr(n, e);
|
|
719
719
|
return /* @__PURE__ */ i(
|
|
720
720
|
On.Provider,
|
|
721
721
|
{
|
|
@@ -734,35 +734,35 @@ const Or = () => {
|
|
|
734
734
|
currentMatchElement: g,
|
|
735
735
|
setCurrentMatchElement: T
|
|
736
736
|
},
|
|
737
|
-
children:
|
|
737
|
+
children: t
|
|
738
738
|
}
|
|
739
739
|
);
|
|
740
|
-
},
|
|
741
|
-
"rp-pages": "_rp-
|
|
742
|
-
"rp-pages-horizontal-scroll": "_rp-pages-horizontal-
|
|
743
|
-
"rp-pages-container": "_rp-pages-
|
|
744
|
-
"rp-page-scrolling-wrapper": "_rp-page-scrolling-
|
|
745
|
-
"rp-viewer": "_rp-
|
|
746
|
-
"rp-cursor-grab": "_rp-cursor-
|
|
747
|
-
"rp-cursor-grabbing": "_rp-cursor-
|
|
748
|
-
"rp-loader": "_rp-
|
|
749
|
-
},
|
|
740
|
+
}, Et = () => nt(On), pe = {
|
|
741
|
+
"rp-pages": "_rp-pages_6vux6_1",
|
|
742
|
+
"rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_6vux6_6",
|
|
743
|
+
"rp-pages-container": "_rp-pages-container_6vux6_10",
|
|
744
|
+
"rp-page-scrolling-wrapper": "_rp-page-scrolling-wrapper_6vux6_47",
|
|
745
|
+
"rp-viewer": "_rp-viewer_6vux6_52",
|
|
746
|
+
"rp-cursor-grab": "_rp-cursor-grab_6vux6_57",
|
|
747
|
+
"rp-cursor-grabbing": "_rp-cursor-grabbing_6vux6_65",
|
|
748
|
+
"rp-loader": "_rp-loader_6vux6_73"
|
|
749
|
+
}, pt = {
|
|
750
750
|
"rp-page-wrapper": "_rp-page-wrapper_14ohm_1",
|
|
751
751
|
"rp-page": "_rp-page_14ohm_1",
|
|
752
752
|
"rp-loader-wrapper": "_rp-loader-wrapper_14ohm_15"
|
|
753
|
-
}, Ar = (
|
|
754
|
-
const { pageNumber:
|
|
753
|
+
}, Ar = (t) => {
|
|
754
|
+
const { pageNumber: e, onLoaded: n, onLoading: r } = t, o = $(null), { pages: a } = X(), { pageRotate: l } = Be(), s = $(), { currentZoom: d } = ot();
|
|
755
755
|
return W(() => {
|
|
756
756
|
if (!a || d === 0)
|
|
757
757
|
return;
|
|
758
|
-
const f = a.get(
|
|
758
|
+
const f = a.get(e);
|
|
759
759
|
if (o.current && f) {
|
|
760
760
|
const u = o.current;
|
|
761
761
|
u.hidden = !0;
|
|
762
762
|
const b = s.current;
|
|
763
|
-
b && b.cancel(), r && r(), s.current =
|
|
763
|
+
b && b.cancel(), r && r(), s.current = bt(f.page, u, {
|
|
764
764
|
scale: d,
|
|
765
|
-
rotate: l[
|
|
765
|
+
rotate: l[e],
|
|
766
766
|
renderForms: !0
|
|
767
767
|
}), s.current.promise.then(() => {
|
|
768
768
|
u.hidden = !1;
|
|
@@ -775,15 +775,15 @@ const Or = () => {
|
|
|
775
775
|
var u;
|
|
776
776
|
(u = s.current) == null || u.cancel();
|
|
777
777
|
};
|
|
778
|
-
}, [a,
|
|
779
|
-
}, Fr = "_selecting_usdup_9",
|
|
778
|
+
}, [a, e, l, d, r, n]), /* @__PURE__ */ i("canvas", { "data-rp": `page-${e}-canvas`, ref: o });
|
|
779
|
+
}, Fr = "_selecting_usdup_9", ge = {
|
|
780
780
|
"rp-text-layer": "_rp-text-layer_usdup_1",
|
|
781
781
|
selecting: Fr,
|
|
782
782
|
"rp-text-layer-text": "_rp-text-layer-text_usdup_39"
|
|
783
|
-
}, Mr = (
|
|
784
|
-
const { pageNumber:
|
|
783
|
+
}, Mr = (t) => {
|
|
784
|
+
const { pageNumber: e } = t, { pages: n } = X(), r = $(null), { matches: o, currentMatch: a, setCurrentMatchElement: l } = Et(), [s, d] = G(
|
|
785
785
|
[]
|
|
786
|
-
), f = $(), u = $(), b = $([]), h = k(() => o.filter((p) => p.pageIndex ===
|
|
786
|
+
), f = $(), u = $(), b = $([]), h = k(() => o.filter((p) => p.pageIndex === e - 1), [o, e]), g = N(
|
|
787
787
|
(p, m, c = !1) => {
|
|
788
788
|
if (c && Co(p, m), !h.length) {
|
|
789
789
|
b.current = [], d([]);
|
|
@@ -801,7 +801,7 @@ const Or = () => {
|
|
|
801
801
|
const { signal: m } = T.current, c = () => {
|
|
802
802
|
C().forEach((v) => {
|
|
803
803
|
const P = v.querySelector(".endOfContent");
|
|
804
|
-
P && (v.appendChild(P), P.style.width = "", P.style.height = "", v.classList.remove(
|
|
804
|
+
P && (v.appendChild(P), P.style.width = "", P.style.height = "", v.classList.remove(ge.selecting));
|
|
805
805
|
});
|
|
806
806
|
};
|
|
807
807
|
document.addEventListener(
|
|
@@ -850,17 +850,17 @@ const Or = () => {
|
|
|
850
850
|
}
|
|
851
851
|
C().forEach((E) => {
|
|
852
852
|
if (P.has(E))
|
|
853
|
-
E.classList.add(
|
|
853
|
+
E.classList.add(ge.selecting);
|
|
854
854
|
else {
|
|
855
855
|
const F = E.querySelector(".endOfContent");
|
|
856
|
-
F && (E.appendChild(F), F.style.width = "", F.style.height = "", E.classList.remove(
|
|
856
|
+
F && (E.appendChild(F), F.style.width = "", F.style.height = "", E.classList.remove(ge.selecting));
|
|
857
857
|
}
|
|
858
858
|
});
|
|
859
859
|
const R = v.getRangeAt(0);
|
|
860
860
|
let x = _ && (R.compareBoundaryPoints(Range.END_TO_END, _) === 0 || R.compareBoundaryPoints(Range.START_TO_END, _) === 0) ? R.startContainer : R.endContainer;
|
|
861
861
|
x.nodeType === Node.TEXT_NODE && (x = x.parentNode);
|
|
862
862
|
const O = (M = x.parentElement) == null ? void 0 : M.closest(
|
|
863
|
-
|
|
863
|
+
ge["rp-text-layer"]
|
|
864
864
|
), D = O == null ? void 0 : O.querySelector(".endOfContent");
|
|
865
865
|
D && O && (D.style.width = O.style.width, D.style.height = O.style.height, (L = x.parentElement) == null || L.insertBefore(D, x.nextSibling)), _ = R.cloneRange();
|
|
866
866
|
},
|
|
@@ -871,14 +871,14 @@ const Or = () => {
|
|
|
871
871
|
(m = T.current) == null || m.abort(), T.current = void 0;
|
|
872
872
|
}), [C]);
|
|
873
873
|
const S = N(() => {
|
|
874
|
-
r.current && r.current.classList.add(
|
|
874
|
+
r.current && r.current.classList.add(ge.selecting);
|
|
875
875
|
}, []), w = N(() => {
|
|
876
|
-
r.current && r.current.classList.remove(
|
|
876
|
+
r.current && r.current.classList.remove(ge.selecting);
|
|
877
877
|
}, []);
|
|
878
878
|
return W(() => {
|
|
879
879
|
if (b.current.forEach((c) => {
|
|
880
880
|
c.classList.remove("selected");
|
|
881
|
-
}), !s.length || !a || a.pageIndex !==
|
|
881
|
+
}), !s.length || !a || a.pageIndex !== e - 1)
|
|
882
882
|
return;
|
|
883
883
|
const p = h.findIndex(
|
|
884
884
|
(c) => JSON.stringify(c) === JSON.stringify(a)
|
|
@@ -890,7 +890,7 @@ const Or = () => {
|
|
|
890
890
|
c.element.classList.add("selected");
|
|
891
891
|
}));
|
|
892
892
|
}, [a, s, h]), W(() => {
|
|
893
|
-
const p = n.get(
|
|
893
|
+
const p = n.get(e);
|
|
894
894
|
if (!p || !r.current)
|
|
895
895
|
return;
|
|
896
896
|
const m = r.current;
|
|
@@ -904,7 +904,7 @@ const Or = () => {
|
|
|
904
904
|
}).then(() => {
|
|
905
905
|
var P, R;
|
|
906
906
|
[].slice.call(m.children).forEach((I) => {
|
|
907
|
-
I.classList.add(
|
|
907
|
+
I.classList.add(ge["rp-text-layer-text"]), I.setAttribute("data-rp", "rp-text-layer-text");
|
|
908
908
|
});
|
|
909
909
|
const _ = (P = f.current) == null ? void 0 : P.textDivs;
|
|
910
910
|
_ && u.current && g(u.current, _);
|
|
@@ -915,18 +915,18 @@ const Or = () => {
|
|
|
915
915
|
var c;
|
|
916
916
|
(c = f.current) == null || c.cancel();
|
|
917
917
|
};
|
|
918
|
-
}, [n,
|
|
918
|
+
}, [n, e]), W(() => {
|
|
919
919
|
var c;
|
|
920
920
|
[].slice.call(r.current.children).forEach((_) => {
|
|
921
|
-
_.classList.add(
|
|
921
|
+
_.classList.add(ge["rp-text-layer-text"]);
|
|
922
922
|
});
|
|
923
923
|
const m = (c = f.current) == null ? void 0 : c.textDivs;
|
|
924
924
|
m && u.current && g(u.current, m, !0);
|
|
925
925
|
}, [g]), /* @__PURE__ */ i(
|
|
926
926
|
"div",
|
|
927
927
|
{
|
|
928
|
-
"data-rp": `page-${
|
|
929
|
-
className:
|
|
928
|
+
"data-rp": `page-${e}-textLayer`,
|
|
929
|
+
className: ge["rp-text-layer"],
|
|
930
930
|
ref: r,
|
|
931
931
|
onMouseDown: S,
|
|
932
932
|
onMouseUp: w
|
|
@@ -936,8 +936,8 @@ const Or = () => {
|
|
|
936
936
|
"rp-annotation-layer": "_rp-annotation-layer_1udza_1"
|
|
937
937
|
};
|
|
938
938
|
let kr = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
|
|
939
|
-
const Hr = (
|
|
940
|
-
const { pageNumber:
|
|
939
|
+
const Hr = (t) => {
|
|
940
|
+
const { pageNumber: e } = t, n = $(null), { pages: r, pdf: o } = X(), a = $(), [l, s] = G(), { setFocusedPage: d, goToPage: f } = ae(), { scrollMode: u } = Oe(), { print: b } = je(), { download: h } = Xn(), g = k(() => r.get(e), [r, e]), T = k(() => g == null ? void 0 : g.page.getViewport(), [g]);
|
|
941
941
|
W(() => {
|
|
942
942
|
a.current && (a.current.div.replaceChildren(), a.current = void 0);
|
|
943
943
|
}, [o]), W(() => {
|
|
@@ -950,7 +950,7 @@ const Hr = (e) => {
|
|
|
950
950
|
!l || !o || (mr(C), fr(C, o, l).then((S) => {
|
|
951
951
|
var w, p;
|
|
952
952
|
((w = S == null ? void 0 : S.data) == null ? void 0 : w.action) === "Print" ? b() : ((p = S == null ? void 0 : S.data) == null ? void 0 : p.action) === "SaveAs" && h();
|
|
953
|
-
}), u ===
|
|
953
|
+
}), u === ee.PAGE_SCROLLING ? Bt(C, l, o, (S) => d(S.pageIndex + 1)) : Bt(C, l, o, (S) => f(S.pageIndex + 1)));
|
|
954
954
|
},
|
|
955
955
|
[o, l, f, d, u, b, h]
|
|
956
956
|
);
|
|
@@ -968,10 +968,10 @@ const Hr = (e) => {
|
|
|
968
968
|
for (const m of l) {
|
|
969
969
|
const { annotationType: c } = m;
|
|
970
970
|
switch (c) {
|
|
971
|
-
case
|
|
971
|
+
case Ht.Link:
|
|
972
972
|
vr(m);
|
|
973
973
|
break;
|
|
974
|
-
case
|
|
974
|
+
case Ht.Widget:
|
|
975
975
|
gr(m, C, S);
|
|
976
976
|
break;
|
|
977
977
|
}
|
|
@@ -987,7 +987,7 @@ const Hr = (e) => {
|
|
|
987
987
|
structTreeLayer: null,
|
|
988
988
|
page: g.page,
|
|
989
989
|
viewport: C.clone({ dontFlip: !0 })
|
|
990
|
-
}), n.current &&
|
|
990
|
+
}), n.current && Zt(n.current, y);
|
|
991
991
|
const m = await (o == null ? void 0 : o.hasJSActions()), c = await (o == null ? void 0 : o.getFieldObjects());
|
|
992
992
|
if (w.signal.aborted)
|
|
993
993
|
throw "abort";
|
|
@@ -1011,12 +1011,12 @@ const Hr = (e) => {
|
|
|
1011
1011
|
if (m !== "abort")
|
|
1012
1012
|
throw m;
|
|
1013
1013
|
}), () => {
|
|
1014
|
-
w.abort("clear"), n.current &&
|
|
1014
|
+
w.abort("clear"), n.current && Zt(n.current, y);
|
|
1015
1015
|
};
|
|
1016
1016
|
}, [o, l, y]), /* @__PURE__ */ i(
|
|
1017
1017
|
"div",
|
|
1018
1018
|
{
|
|
1019
|
-
"data-rp": `page-${
|
|
1019
|
+
"data-rp": `page-${e}-annotationLayer`,
|
|
1020
1020
|
style: { width: `${T == null ? void 0 : T.width}px`, height: `${T == null ? void 0 : T.height}px` },
|
|
1021
1021
|
className: Wr["rp-annotation-layer"],
|
|
1022
1022
|
ref: n
|
|
@@ -1024,19 +1024,19 @@ const Hr = (e) => {
|
|
|
1024
1024
|
);
|
|
1025
1025
|
}, $r = {
|
|
1026
1026
|
"rp-text-highlight": "_rp-text-highlight_jdkf8_1"
|
|
1027
|
-
}, Gr = ({ pageNumber:
|
|
1027
|
+
}, Gr = ({ pageNumber: t, viewport: e }) => {
|
|
1028
1028
|
const [n, r] = G(), { pages: o } = X(), { highlightKeywords: a } = So(), l = !0, s = $(null), [d, f] = G(null), [u, b] = G([]);
|
|
1029
1029
|
W(() => {
|
|
1030
1030
|
s.current && f(s.current.parentElement);
|
|
1031
1031
|
}, [s]), W(() => {
|
|
1032
1032
|
(async () => {
|
|
1033
|
-
const p = o.get(
|
|
1033
|
+
const p = o.get(t);
|
|
1034
1034
|
if (!p || !s.current)
|
|
1035
1035
|
return;
|
|
1036
1036
|
const m = await p.page.getTextContent();
|
|
1037
1037
|
r(m);
|
|
1038
1038
|
})();
|
|
1039
|
-
}, [o,
|
|
1039
|
+
}, [o, t]);
|
|
1040
1040
|
const h = k(() => a ? a.map((w) => {
|
|
1041
1041
|
var p, m;
|
|
1042
1042
|
return {
|
|
@@ -1078,11 +1078,11 @@ const Hr = (e) => {
|
|
|
1078
1078
|
});
|
|
1079
1079
|
}
|
|
1080
1080
|
const y = (w, p, m, c) => {
|
|
1081
|
-
var
|
|
1081
|
+
var V;
|
|
1082
1082
|
const _ = document.createRange(), v = m.firstChild;
|
|
1083
1083
|
if (!v || v.nodeType !== Node.TEXT_NODE)
|
|
1084
1084
|
return null;
|
|
1085
|
-
const P = ((
|
|
1085
|
+
const P = ((V = v.textContent) == null ? void 0 : V.length) ?? 0, R = c[0].charIdxInSpan, I = c.length === 1 ? R : c[c.length - 1].charIdxInSpan;
|
|
1086
1086
|
if (R > P || I + 1 > P)
|
|
1087
1087
|
return null;
|
|
1088
1088
|
_.setStart(v, R), _.setEnd(v, I + 1);
|
|
@@ -1148,21 +1148,21 @@ const Hr = (e) => {
|
|
|
1148
1148
|
color: D
|
|
1149
1149
|
}));
|
|
1150
1150
|
for (const H of z) {
|
|
1151
|
-
const
|
|
1151
|
+
const V = H.indexes.reduce(
|
|
1152
1152
|
(K, B) => (K[B.spanIdx] = (K[B.spanIdx] || []).concat([B]), K),
|
|
1153
1153
|
{}
|
|
1154
1154
|
);
|
|
1155
|
-
for (const K of Object.values(
|
|
1155
|
+
for (const K of Object.values(V))
|
|
1156
1156
|
if (K.length !== 1 || K[0].char.trim() !== "") {
|
|
1157
|
-
const B = K,
|
|
1157
|
+
const B = K, te = m[B[0].spanIdx], Y = y(
|
|
1158
1158
|
w,
|
|
1159
1159
|
M,
|
|
1160
|
-
|
|
1160
|
+
te,
|
|
1161
1161
|
B
|
|
1162
1162
|
);
|
|
1163
1163
|
if (Y) {
|
|
1164
|
-
const { left:
|
|
1165
|
-
if (v.find((J) => J.left ===
|
|
1164
|
+
const { left: de, top: _e } = Y;
|
|
1165
|
+
if (v.find((J) => J.left === de && J.top === _e))
|
|
1166
1166
|
continue;
|
|
1167
1167
|
v.push({ ...Y, highlightColor: H.color });
|
|
1168
1168
|
}
|
|
@@ -1174,12 +1174,12 @@ const Hr = (e) => {
|
|
|
1174
1174
|
(async () => {
|
|
1175
1175
|
if (!(!a || a.length === 0))
|
|
1176
1176
|
try {
|
|
1177
|
-
await C(
|
|
1177
|
+
await C(t, a);
|
|
1178
1178
|
} catch (p) {
|
|
1179
1179
|
console.error(p);
|
|
1180
1180
|
}
|
|
1181
1181
|
})();
|
|
1182
|
-
}, [l, a,
|
|
1182
|
+
}, [l, a, t, n, e]), /* @__PURE__ */ i(ie, { children: /* @__PURE__ */ i("div", { ref: s, "data-rp": `page-${t}-textHighlightLayer`, children: u.map((w, p) => /* @__PURE__ */ i(
|
|
1183
1183
|
"div",
|
|
1184
1184
|
{
|
|
1185
1185
|
className: $r["rp-text-highlight"],
|
|
@@ -1193,12 +1193,12 @@ const Hr = (e) => {
|
|
|
1193
1193
|
},
|
|
1194
1194
|
p
|
|
1195
1195
|
)) }) });
|
|
1196
|
-
},
|
|
1197
|
-
const { pageNumber: n, style: r, ...o } =
|
|
1196
|
+
}, Ot = ke((t, e) => {
|
|
1197
|
+
const { pageNumber: n, style: r, ...o } = t, { pages: a } = X(), { pageRotate: l } = Be(), { textLayer: s } = vo(), { currentZoom: d } = ot(), f = $(a.get(n)), [u, b] = G(!1), h = $(null), [g, T] = G({
|
|
1198
1198
|
width: 0,
|
|
1199
1199
|
height: 0
|
|
1200
1200
|
});
|
|
1201
|
-
hn(
|
|
1201
|
+
hn(e, () => h.current);
|
|
1202
1202
|
const y = k(() => f.current ? l[n] : 0, [n, l]);
|
|
1203
1203
|
W(() => {
|
|
1204
1204
|
if (a && (f.current = a.get(n), f.current)) {
|
|
@@ -1237,7 +1237,7 @@ const Hr = (e) => {
|
|
|
1237
1237
|
"--rp-page-rotate-translate": `${C}`,
|
|
1238
1238
|
"--scale-factor": d
|
|
1239
1239
|
},
|
|
1240
|
-
className:
|
|
1240
|
+
className: pt["rp-page-wrapper"],
|
|
1241
1241
|
children: /* @__PURE__ */ A(
|
|
1242
1242
|
"div",
|
|
1243
1243
|
{
|
|
@@ -1245,10 +1245,10 @@ const Hr = (e) => {
|
|
|
1245
1245
|
width: `${g.width}px`,
|
|
1246
1246
|
height: `${g.height}px`
|
|
1247
1247
|
},
|
|
1248
|
-
className:
|
|
1248
|
+
className: pt["rp-page"],
|
|
1249
1249
|
children: [
|
|
1250
1250
|
/* @__PURE__ */ i(Ar, { onLoading: S, onLoaded: w, pageNumber: n }),
|
|
1251
|
-
u && /* @__PURE__ */ i("div", { className:
|
|
1251
|
+
u && /* @__PURE__ */ i("div", { className: pt["rp-loader-wrapper"], children: /* @__PURE__ */ i(xt, {}) }),
|
|
1252
1252
|
/* @__PURE__ */ i(Cr, { pageNumber: n }),
|
|
1253
1253
|
s && /* @__PURE__ */ i(Mr, { pageNumber: n }),
|
|
1254
1254
|
/* @__PURE__ */ i(Gr, { pageNumber: n, viewport: g }),
|
|
@@ -1259,113 +1259,113 @@ const Hr = (e) => {
|
|
|
1259
1259
|
}
|
|
1260
1260
|
);
|
|
1261
1261
|
});
|
|
1262
|
-
function
|
|
1263
|
-
if (
|
|
1262
|
+
function Kt(t) {
|
|
1263
|
+
if (t === void 0)
|
|
1264
1264
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1265
|
-
return
|
|
1265
|
+
return t;
|
|
1266
1266
|
}
|
|
1267
|
-
function
|
|
1268
|
-
return
|
|
1267
|
+
function Tt(t, e) {
|
|
1268
|
+
return Tt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) {
|
|
1269
1269
|
return n.__proto__ = r, n;
|
|
1270
|
-
},
|
|
1270
|
+
}, Tt(t, e);
|
|
1271
1271
|
}
|
|
1272
|
-
function
|
|
1273
|
-
|
|
1272
|
+
function qr(t, e) {
|
|
1273
|
+
t.prototype = Object.create(e.prototype), t.prototype.constructor = t, Tt(t, e);
|
|
1274
1274
|
}
|
|
1275
|
-
var
|
|
1276
|
-
return typeof
|
|
1275
|
+
var Xt = Number.isNaN || function(e) {
|
|
1276
|
+
return typeof e == "number" && e !== e;
|
|
1277
1277
|
};
|
|
1278
|
-
function
|
|
1279
|
-
return !!(
|
|
1278
|
+
function Ur(t, e) {
|
|
1279
|
+
return !!(t === e || Xt(t) && Xt(e));
|
|
1280
1280
|
}
|
|
1281
|
-
function
|
|
1282
|
-
if (
|
|
1281
|
+
function Vr(t, e) {
|
|
1282
|
+
if (t.length !== e.length)
|
|
1283
1283
|
return !1;
|
|
1284
|
-
for (var n = 0; n <
|
|
1285
|
-
if (!
|
|
1284
|
+
for (var n = 0; n < t.length; n++)
|
|
1285
|
+
if (!Ur(t[n], e[n]))
|
|
1286
1286
|
return !1;
|
|
1287
1287
|
return !0;
|
|
1288
1288
|
}
|
|
1289
|
-
function
|
|
1290
|
-
|
|
1289
|
+
function ht(t, e) {
|
|
1290
|
+
e === void 0 && (e = Vr);
|
|
1291
1291
|
var n, r = [], o, a = !1;
|
|
1292
1292
|
function l() {
|
|
1293
1293
|
for (var s = [], d = 0; d < arguments.length; d++)
|
|
1294
1294
|
s[d] = arguments[d];
|
|
1295
|
-
return a && n === this &&
|
|
1295
|
+
return a && n === this && e(s, r) || (o = t.apply(this, s), a = !0, n = this, r = s), o;
|
|
1296
1296
|
}
|
|
1297
1297
|
return l;
|
|
1298
1298
|
}
|
|
1299
|
-
function
|
|
1300
|
-
if (
|
|
1299
|
+
function Yt(t, e) {
|
|
1300
|
+
if (t == null)
|
|
1301
1301
|
return {};
|
|
1302
1302
|
var n = {};
|
|
1303
|
-
for (var r in
|
|
1304
|
-
if ({}.hasOwnProperty.call(
|
|
1305
|
-
if (
|
|
1303
|
+
for (var r in t)
|
|
1304
|
+
if ({}.hasOwnProperty.call(t, r)) {
|
|
1305
|
+
if (e.indexOf(r) !== -1)
|
|
1306
1306
|
continue;
|
|
1307
|
-
n[r] =
|
|
1307
|
+
n[r] = t[r];
|
|
1308
1308
|
}
|
|
1309
1309
|
return n;
|
|
1310
1310
|
}
|
|
1311
|
-
var Br = typeof performance == "object" && typeof performance.now == "function",
|
|
1311
|
+
var Br = typeof performance == "object" && typeof performance.now == "function", Jt = Br ? function() {
|
|
1312
1312
|
return performance.now();
|
|
1313
1313
|
} : function() {
|
|
1314
1314
|
return Date.now();
|
|
1315
1315
|
};
|
|
1316
|
-
function
|
|
1317
|
-
cancelAnimationFrame(
|
|
1316
|
+
function Qt(t) {
|
|
1317
|
+
cancelAnimationFrame(t.id);
|
|
1318
1318
|
}
|
|
1319
|
-
function Zr(
|
|
1320
|
-
var n =
|
|
1319
|
+
function Zr(t, e) {
|
|
1320
|
+
var n = Jt();
|
|
1321
1321
|
function r() {
|
|
1322
|
-
|
|
1322
|
+
Jt() - n >= e ? t.call(null) : o.id = requestAnimationFrame(r);
|
|
1323
1323
|
}
|
|
1324
1324
|
var o = {
|
|
1325
1325
|
id: requestAnimationFrame(r)
|
|
1326
1326
|
};
|
|
1327
1327
|
return o;
|
|
1328
1328
|
}
|
|
1329
|
-
var
|
|
1330
|
-
function jr(
|
|
1331
|
-
if (
|
|
1332
|
-
var
|
|
1333
|
-
n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(
|
|
1329
|
+
var mt = -1;
|
|
1330
|
+
function jr(t) {
|
|
1331
|
+
if (t === void 0 && (t = !1), mt === -1 || t) {
|
|
1332
|
+
var e = document.createElement("div"), n = e.style;
|
|
1333
|
+
n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(e), mt = e.offsetWidth - e.clientWidth, document.body.removeChild(e);
|
|
1334
1334
|
}
|
|
1335
|
-
return
|
|
1335
|
+
return mt;
|
|
1336
1336
|
}
|
|
1337
|
-
var
|
|
1338
|
-
function
|
|
1339
|
-
if (
|
|
1340
|
-
var
|
|
1337
|
+
var De = null;
|
|
1338
|
+
function en(t) {
|
|
1339
|
+
if (t === void 0 && (t = !1), De === null || t) {
|
|
1340
|
+
var e = document.createElement("div"), n = e.style;
|
|
1341
1341
|
n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
|
|
1342
1342
|
var r = document.createElement("div"), o = r.style;
|
|
1343
|
-
return o.width = "100px", o.height = "100px",
|
|
1343
|
+
return o.width = "100px", o.height = "100px", e.appendChild(r), document.body.appendChild(e), e.scrollLeft > 0 ? De = "positive-descending" : (e.scrollLeft = 1, e.scrollLeft === 0 ? De = "negative" : De = "positive-ascending"), document.body.removeChild(e), De;
|
|
1344
1344
|
}
|
|
1345
|
-
return
|
|
1345
|
+
return De;
|
|
1346
1346
|
}
|
|
1347
|
-
var Kr = 150, Xr = function(
|
|
1348
|
-
var n =
|
|
1349
|
-
|
|
1350
|
-
var r =
|
|
1347
|
+
var Kr = 150, Xr = function(e) {
|
|
1348
|
+
var n = e.columnIndex;
|
|
1349
|
+
e.data;
|
|
1350
|
+
var r = e.rowIndex;
|
|
1351
1351
|
return r + ":" + n;
|
|
1352
|
-
},
|
|
1353
|
-
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (
|
|
1354
|
-
function Yr(
|
|
1355
|
-
var
|
|
1356
|
-
return
|
|
1357
|
-
|
|
1352
|
+
}, Xe = null, Ye = null, Je = null;
|
|
1353
|
+
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (Xe = /* @__PURE__ */ new WeakSet(), Ye = /* @__PURE__ */ new WeakSet(), Je = /* @__PURE__ */ new WeakSet());
|
|
1354
|
+
function Yr(t) {
|
|
1355
|
+
var e, n = t.getColumnOffset, r = t.getColumnStartIndexForOffset, o = t.getColumnStopIndexForStartIndex, a = t.getColumnWidth, l = t.getEstimatedTotalHeight, s = t.getEstimatedTotalWidth, d = t.getOffsetForColumnAndAlignment, f = t.getOffsetForRowAndAlignment, u = t.getRowHeight, b = t.getRowOffset, h = t.getRowStartIndexForOffset, g = t.getRowStopIndexForStartIndex, T = t.initInstanceProps, y = t.shouldResetStyleCacheOnItemSizeChange, C = t.validateProps;
|
|
1356
|
+
return e = /* @__PURE__ */ function(S) {
|
|
1357
|
+
qr(w, S);
|
|
1358
1358
|
function w(m) {
|
|
1359
1359
|
var c;
|
|
1360
|
-
return c = S.call(this, m) || this, c._instanceProps = T(c.props,
|
|
1361
|
-
instance:
|
|
1360
|
+
return c = S.call(this, m) || this, c._instanceProps = T(c.props, Kt(c)), c._resetIsScrollingTimeoutId = null, c._outerRef = void 0, c.state = {
|
|
1361
|
+
instance: Kt(c),
|
|
1362
1362
|
isScrolling: !1,
|
|
1363
1363
|
horizontalScrollDirection: "forward",
|
|
1364
1364
|
scrollLeft: typeof c.props.initialScrollLeft == "number" ? c.props.initialScrollLeft : 0,
|
|
1365
1365
|
scrollTop: typeof c.props.initialScrollTop == "number" ? c.props.initialScrollTop : 0,
|
|
1366
1366
|
scrollUpdateWasRequested: !1,
|
|
1367
1367
|
verticalScrollDirection: "forward"
|
|
1368
|
-
}, c._callOnItemsRendered = void 0, c._callOnItemsRendered =
|
|
1368
|
+
}, c._callOnItemsRendered = void 0, c._callOnItemsRendered = ht(function(_, v, P, R, I, x, O, D) {
|
|
1369
1369
|
return c.props.onItemsRendered({
|
|
1370
1370
|
overscanColumnStartIndex: _,
|
|
1371
1371
|
overscanColumnStopIndex: v,
|
|
@@ -1376,7 +1376,7 @@ function Yr(e) {
|
|
|
1376
1376
|
visibleRowStartIndex: O,
|
|
1377
1377
|
visibleRowStopIndex: D
|
|
1378
1378
|
});
|
|
1379
|
-
}), c._callOnScroll = void 0, c._callOnScroll =
|
|
1379
|
+
}), c._callOnScroll = void 0, c._callOnScroll = ht(function(_, v, P, R, I) {
|
|
1380
1380
|
return c.props.onScroll({
|
|
1381
1381
|
horizontalScrollDirection: P,
|
|
1382
1382
|
scrollLeft: _,
|
|
@@ -1400,7 +1400,7 @@ function Yr(e) {
|
|
|
1400
1400
|
};
|
|
1401
1401
|
}
|
|
1402
1402
|
return M;
|
|
1403
|
-
}, c._getItemStyleCache = void 0, c._getItemStyleCache =
|
|
1403
|
+
}, c._getItemStyleCache = void 0, c._getItemStyleCache = ht(function(_, v, P) {
|
|
1404
1404
|
return {};
|
|
1405
1405
|
}), c._onScroll = function(_) {
|
|
1406
1406
|
var v = _.currentTarget, P = v.clientHeight, R = v.clientWidth, I = v.scrollLeft, x = v.scrollTop, O = v.scrollHeight, D = v.scrollWidth;
|
|
@@ -1409,7 +1409,7 @@ function Yr(e) {
|
|
|
1409
1409
|
return null;
|
|
1410
1410
|
var L = c.props.direction, E = I;
|
|
1411
1411
|
if (L === "rtl")
|
|
1412
|
-
switch (
|
|
1412
|
+
switch (en()) {
|
|
1413
1413
|
case "negative":
|
|
1414
1414
|
E = -I;
|
|
1415
1415
|
break;
|
|
@@ -1432,7 +1432,7 @@ function Yr(e) {
|
|
|
1432
1432
|
var v = c.props.outerRef;
|
|
1433
1433
|
c._outerRef = _, typeof v == "function" ? v(_) : v != null && typeof v == "object" && v.hasOwnProperty("current") && (v.current = _);
|
|
1434
1434
|
}, c._resetIsScrollingDebounced = function() {
|
|
1435
|
-
c._resetIsScrollingTimeoutId !== null &&
|
|
1435
|
+
c._resetIsScrollingTimeoutId !== null && Qt(c._resetIsScrollingTimeoutId), c._resetIsScrollingTimeoutId = Zr(c._resetIsScrolling, Kr);
|
|
1436
1436
|
}, c._resetIsScrolling = function() {
|
|
1437
1437
|
c._resetIsScrollingTimeoutId = null, c.setState({
|
|
1438
1438
|
isScrolling: !1
|
|
@@ -1459,7 +1459,7 @@ function Yr(e) {
|
|
|
1459
1459
|
}, p.scrollToItem = function(c) {
|
|
1460
1460
|
var _ = c.align, v = _ === void 0 ? "auto" : _, P = c.columnIndex, R = c.rowIndex, I = this.props, x = I.columnCount, O = I.height, D = I.rowCount, M = I.width, L = this.state, E = L.scrollLeft, F = L.scrollTop, z = jr();
|
|
1461
1461
|
P !== void 0 && (P = Math.max(0, Math.min(P, x - 1))), R !== void 0 && (R = Math.max(0, Math.min(R, D - 1)));
|
|
1462
|
-
var H = l(this.props, this._instanceProps),
|
|
1462
|
+
var H = l(this.props, this._instanceProps), V = s(this.props, this._instanceProps), K = V > M ? z : 0, B = H > O ? z : 0;
|
|
1463
1463
|
this.scrollTo({
|
|
1464
1464
|
scrollLeft: P !== void 0 ? d(this.props, P, v, E, this._instanceProps, B) : E,
|
|
1465
1465
|
scrollTop: R !== void 0 ? f(this.props, R, v, F, this._instanceProps, K) : F
|
|
@@ -1476,7 +1476,7 @@ function Yr(e) {
|
|
|
1476
1476
|
if (R && this._outerRef != null) {
|
|
1477
1477
|
var I = this._outerRef;
|
|
1478
1478
|
if (c === "rtl")
|
|
1479
|
-
switch (
|
|
1479
|
+
switch (en()) {
|
|
1480
1480
|
case "negative":
|
|
1481
1481
|
I.scrollLeft = -v;
|
|
1482
1482
|
break;
|
|
@@ -1494,30 +1494,30 @@ function Yr(e) {
|
|
|
1494
1494
|
}
|
|
1495
1495
|
this._callPropsCallbacks();
|
|
1496
1496
|
}, p.componentWillUnmount = function() {
|
|
1497
|
-
this._resetIsScrollingTimeoutId !== null &&
|
|
1497
|
+
this._resetIsScrollingTimeoutId !== null && Qt(this._resetIsScrollingTimeoutId);
|
|
1498
1498
|
}, p.render = function() {
|
|
1499
|
-
var c = this.props, _ = c.children, v = c.className, P = c.columnCount, R = c.direction, I = c.height, x = c.innerRef, O = c.innerElementType, D = c.innerTagName, M = c.itemData, L = c.itemKey, E = L === void 0 ? Xr : L, F = c.outerElementType, z = c.outerTagName, H = c.rowCount,
|
|
1499
|
+
var c = this.props, _ = c.children, v = c.className, P = c.columnCount, R = c.direction, I = c.height, x = c.innerRef, O = c.innerElementType, D = c.innerTagName, M = c.itemData, L = c.itemKey, E = L === void 0 ? Xr : L, F = c.outerElementType, z = c.outerTagName, H = c.rowCount, V = c.style, K = c.useIsScrolling, B = c.width, te = this.state.isScrolling, Y = this._getHorizontalRangeToRender(), de = Y[0], _e = Y[1], ue = this._getVerticalRangeToRender(), J = ue[0], He = ue[1], be = [];
|
|
1500
1500
|
if (P > 0 && H)
|
|
1501
|
-
for (var
|
|
1502
|
-
for (var
|
|
1503
|
-
|
|
1504
|
-
columnIndex:
|
|
1501
|
+
for (var Se = J; Se <= He; Se++)
|
|
1502
|
+
for (var Te = de; Te <= _e; Te++)
|
|
1503
|
+
be.push(Ke(_, {
|
|
1504
|
+
columnIndex: Te,
|
|
1505
1505
|
data: M,
|
|
1506
|
-
isScrolling: K ?
|
|
1506
|
+
isScrolling: K ? te : void 0,
|
|
1507
1507
|
key: E({
|
|
1508
|
-
columnIndex:
|
|
1508
|
+
columnIndex: Te,
|
|
1509
1509
|
data: M,
|
|
1510
|
-
rowIndex:
|
|
1510
|
+
rowIndex: Se
|
|
1511
1511
|
}),
|
|
1512
|
-
rowIndex:
|
|
1513
|
-
style: this._getItemStyle(
|
|
1512
|
+
rowIndex: Se,
|
|
1513
|
+
style: this._getItemStyle(Se, Te)
|
|
1514
1514
|
}));
|
|
1515
|
-
var
|
|
1516
|
-
return
|
|
1515
|
+
var it = l(this.props, this._instanceProps), at = s(this.props, this._instanceProps);
|
|
1516
|
+
return Ke(F || z || "div", {
|
|
1517
1517
|
className: v,
|
|
1518
1518
|
onScroll: this._onScroll,
|
|
1519
1519
|
ref: this._outerRefSetter,
|
|
1520
|
-
style:
|
|
1520
|
+
style: Vo({
|
|
1521
1521
|
position: "relative",
|
|
1522
1522
|
height: I,
|
|
1523
1523
|
width: B,
|
|
@@ -1525,14 +1525,14 @@ function Yr(e) {
|
|
|
1525
1525
|
WebkitOverflowScrolling: "touch",
|
|
1526
1526
|
willChange: "transform",
|
|
1527
1527
|
direction: R
|
|
1528
|
-
},
|
|
1529
|
-
},
|
|
1530
|
-
children:
|
|
1528
|
+
}, V)
|
|
1529
|
+
}, Ke(O || D || "div", {
|
|
1530
|
+
children: be,
|
|
1531
1531
|
ref: x,
|
|
1532
1532
|
style: {
|
|
1533
|
-
height:
|
|
1534
|
-
pointerEvents:
|
|
1535
|
-
width:
|
|
1533
|
+
height: it,
|
|
1534
|
+
pointerEvents: te ? "none" : void 0,
|
|
1535
|
+
width: at
|
|
1536
1536
|
}
|
|
1537
1537
|
}));
|
|
1538
1538
|
}, p._callPropsCallbacks = function() {
|
|
@@ -1542,8 +1542,8 @@ function Yr(e) {
|
|
|
1542
1542
|
this._callOnItemsRendered(x, O, E, F, D, M, z, H);
|
|
1543
1543
|
}
|
|
1544
1544
|
if (typeof P == "function") {
|
|
1545
|
-
var
|
|
1546
|
-
this._callOnScroll(B,
|
|
1545
|
+
var V = this.state, K = V.horizontalScrollDirection, B = V.scrollLeft, te = V.scrollTop, Y = V.scrollUpdateWasRequested, de = V.verticalScrollDirection;
|
|
1546
|
+
this._callOnScroll(B, te, K, de, Y);
|
|
1547
1547
|
}
|
|
1548
1548
|
}, p._getHorizontalRangeToRender = function() {
|
|
1549
1549
|
var c = this.props, _ = c.columnCount, v = c.overscanColumnCount, P = c.overscanColumnsCount, R = c.overscanCount, I = c.rowCount, x = this.state, O = x.horizontalScrollDirection, D = x.isScrolling, M = x.scrollLeft, L = v || P || R || 1;
|
|
@@ -1558,16 +1558,16 @@ function Yr(e) {
|
|
|
1558
1558
|
var E = h(this.props, M, this._instanceProps), F = g(this.props, E, M, this._instanceProps), z = !O || D === "backward" ? Math.max(1, L) : 1, H = !O || D === "forward" ? Math.max(1, L) : 1;
|
|
1559
1559
|
return [Math.max(0, E - z), Math.max(0, Math.min(I - 1, F + H)), E, F];
|
|
1560
1560
|
}, w;
|
|
1561
|
-
}(uo),
|
|
1561
|
+
}(uo), e.defaultProps = {
|
|
1562
1562
|
direction: "ltr",
|
|
1563
1563
|
itemData: void 0,
|
|
1564
1564
|
useIsScrolling: !1
|
|
1565
|
-
},
|
|
1565
|
+
}, e;
|
|
1566
1566
|
}
|
|
1567
|
-
var Jr = function(
|
|
1568
|
-
var r =
|
|
1567
|
+
var Jr = function(e, n) {
|
|
1568
|
+
var r = e.children, o = e.direction, a = e.height, l = e.innerTagName, s = e.outerTagName, d = e.overscanColumnsCount, f = e.overscanCount, u = e.overscanRowsCount, b = e.width, h = n.instance;
|
|
1569
1569
|
if (process.env.NODE_ENV !== "production") {
|
|
1570
|
-
if (typeof f == "number" &&
|
|
1570
|
+
if (typeof f == "number" && Xe && !Xe.has(h) && (Xe.add(h), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof d == "number" || typeof u == "number") && Ye && !Ye.has(h) && (Ye.add(h), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (l != null || s != null) && Je && !Je.has(h) && (Je.add(h), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), r == null)
|
|
1571
1571
|
throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (r === null ? "null" : typeof r) + '" was specified.'));
|
|
1572
1572
|
switch (o) {
|
|
1573
1573
|
case "ltr":
|
|
@@ -1581,25 +1581,25 @@ var Jr = function(t, n) {
|
|
|
1581
1581
|
if (typeof a != "number")
|
|
1582
1582
|
throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (a === null ? "null" : typeof a) + '" was specified.'));
|
|
1583
1583
|
}
|
|
1584
|
-
},
|
|
1585
|
-
var r =
|
|
1584
|
+
}, tn = 50, zn = function(e, n) {
|
|
1585
|
+
var r = e.rowCount, o = n.rowMetadataMap, a = n.estimatedRowHeight, l = n.lastMeasuredRowIndex, s = 0;
|
|
1586
1586
|
if (l >= r && (l = r - 1), l >= 0) {
|
|
1587
1587
|
var d = o[l];
|
|
1588
1588
|
s = d.offset + d.size;
|
|
1589
1589
|
}
|
|
1590
1590
|
var f = r - l - 1, u = f * a;
|
|
1591
1591
|
return s + u;
|
|
1592
|
-
}, Dn = function(
|
|
1593
|
-
var r =
|
|
1592
|
+
}, Dn = function(e, n) {
|
|
1593
|
+
var r = e.columnCount, o = n.columnMetadataMap, a = n.estimatedColumnWidth, l = n.lastMeasuredColumnIndex, s = 0;
|
|
1594
1594
|
if (l >= r && (l = r - 1), l >= 0) {
|
|
1595
1595
|
var d = o[l];
|
|
1596
1596
|
s = d.offset + d.size;
|
|
1597
1597
|
}
|
|
1598
1598
|
var f = r - l - 1, u = f * a;
|
|
1599
1599
|
return s + u;
|
|
1600
|
-
},
|
|
1600
|
+
}, ve = function(e, n, r, o) {
|
|
1601
1601
|
var a, l, s;
|
|
1602
|
-
if (
|
|
1602
|
+
if (e === "column" ? (a = o.columnMetadataMap, l = n.columnWidth, s = o.lastMeasuredColumnIndex) : (a = o.rowMetadataMap, l = n.rowHeight, s = o.lastMeasuredRowIndex), r > s) {
|
|
1603
1603
|
var d = 0;
|
|
1604
1604
|
if (s >= 0) {
|
|
1605
1605
|
var f = a[s];
|
|
@@ -1612,28 +1612,28 @@ var Jr = function(t, n) {
|
|
|
1612
1612
|
size: b
|
|
1613
1613
|
}, d += b;
|
|
1614
1614
|
}
|
|
1615
|
-
|
|
1615
|
+
e === "column" ? o.lastMeasuredColumnIndex = r : o.lastMeasuredRowIndex = r;
|
|
1616
1616
|
}
|
|
1617
1617
|
return a[r];
|
|
1618
|
-
}, nn = function(
|
|
1618
|
+
}, nn = function(e, n, r, o) {
|
|
1619
1619
|
var a, l;
|
|
1620
|
-
|
|
1620
|
+
e === "column" ? (a = r.columnMetadataMap, l = r.lastMeasuredColumnIndex) : (a = r.rowMetadataMap, l = r.lastMeasuredRowIndex);
|
|
1621
1621
|
var s = l > 0 ? a[l].offset : 0;
|
|
1622
|
-
return s >= o ? An(
|
|
1623
|
-
}, An = function(
|
|
1622
|
+
return s >= o ? An(e, n, r, l, 0, o) : Qr(e, n, r, Math.max(0, l), o);
|
|
1623
|
+
}, An = function(e, n, r, o, a, l) {
|
|
1624
1624
|
for (; a <= o; ) {
|
|
1625
|
-
var s = a + Math.floor((o - a) / 2), d =
|
|
1625
|
+
var s = a + Math.floor((o - a) / 2), d = ve(e, n, s, r).offset;
|
|
1626
1626
|
if (d === l)
|
|
1627
1627
|
return s;
|
|
1628
1628
|
d < l ? a = s + 1 : d > l && (o = s - 1);
|
|
1629
1629
|
}
|
|
1630
1630
|
return a > 0 ? a - 1 : 0;
|
|
1631
|
-
}, Qr = function(
|
|
1632
|
-
for (var l =
|
|
1631
|
+
}, Qr = function(e, n, r, o, a) {
|
|
1632
|
+
for (var l = e === "column" ? n.columnCount : n.rowCount, s = 1; o < l && ve(e, n, o, r).offset < a; )
|
|
1633
1633
|
o += s, s *= 2;
|
|
1634
|
-
return An(
|
|
1635
|
-
}, on = function(
|
|
1636
|
-
var d =
|
|
1634
|
+
return An(e, n, r, Math.min(o, l - 1), Math.floor(o / 2), a);
|
|
1635
|
+
}, on = function(e, n, r, o, a, l, s) {
|
|
1636
|
+
var d = e === "column" ? n.width : n.height, f = ve(e, n, r, l), u = e === "column" ? Dn(n, l) : zn(n, l), b = Math.max(0, Math.min(u - d, f.offset)), h = Math.max(0, f.offset - d + s + f.size);
|
|
1637
1637
|
switch (o === "smart" && (a >= h - d && a <= b + d ? o = "auto" : o = "center"), o) {
|
|
1638
1638
|
case "start":
|
|
1639
1639
|
return b;
|
|
@@ -1645,48 +1645,48 @@ var Jr = function(t, n) {
|
|
|
1645
1645
|
default:
|
|
1646
1646
|
return a >= h && a <= b ? a : h > b || a < h ? h : b;
|
|
1647
1647
|
}
|
|
1648
|
-
},
|
|
1649
|
-
getColumnOffset: function(
|
|
1650
|
-
return
|
|
1648
|
+
}, ei = /* @__PURE__ */ Yr({
|
|
1649
|
+
getColumnOffset: function(e, n, r) {
|
|
1650
|
+
return ve("column", e, n, r).offset;
|
|
1651
1651
|
},
|
|
1652
|
-
getColumnStartIndexForOffset: function(
|
|
1653
|
-
return nn("column",
|
|
1652
|
+
getColumnStartIndexForOffset: function(e, n, r) {
|
|
1653
|
+
return nn("column", e, r, n);
|
|
1654
1654
|
},
|
|
1655
|
-
getColumnStopIndexForStartIndex: function(
|
|
1656
|
-
for (var a =
|
|
1657
|
-
u++, f +=
|
|
1655
|
+
getColumnStopIndexForStartIndex: function(e, n, r, o) {
|
|
1656
|
+
for (var a = e.columnCount, l = e.width, s = ve("column", e, n, o), d = r + l, f = s.offset + s.size, u = n; u < a - 1 && f < d; )
|
|
1657
|
+
u++, f += ve("column", e, u, o).size;
|
|
1658
1658
|
return u;
|
|
1659
1659
|
},
|
|
1660
|
-
getColumnWidth: function(
|
|
1660
|
+
getColumnWidth: function(e, n, r) {
|
|
1661
1661
|
return r.columnMetadataMap[n].size;
|
|
1662
1662
|
},
|
|
1663
1663
|
getEstimatedTotalHeight: zn,
|
|
1664
1664
|
getEstimatedTotalWidth: Dn,
|
|
1665
|
-
getOffsetForColumnAndAlignment: function(
|
|
1666
|
-
return on("column",
|
|
1665
|
+
getOffsetForColumnAndAlignment: function(e, n, r, o, a, l) {
|
|
1666
|
+
return on("column", e, n, r, o, a, l);
|
|
1667
1667
|
},
|
|
1668
|
-
getOffsetForRowAndAlignment: function(
|
|
1669
|
-
return on("row",
|
|
1668
|
+
getOffsetForRowAndAlignment: function(e, n, r, o, a, l) {
|
|
1669
|
+
return on("row", e, n, r, o, a, l);
|
|
1670
1670
|
},
|
|
1671
|
-
getRowOffset: function(
|
|
1672
|
-
return
|
|
1671
|
+
getRowOffset: function(e, n, r) {
|
|
1672
|
+
return ve("row", e, n, r).offset;
|
|
1673
1673
|
},
|
|
1674
|
-
getRowHeight: function(
|
|
1674
|
+
getRowHeight: function(e, n, r) {
|
|
1675
1675
|
return r.rowMetadataMap[n].size;
|
|
1676
1676
|
},
|
|
1677
|
-
getRowStartIndexForOffset: function(
|
|
1678
|
-
return nn("row",
|
|
1677
|
+
getRowStartIndexForOffset: function(e, n, r) {
|
|
1678
|
+
return nn("row", e, r, n);
|
|
1679
1679
|
},
|
|
1680
|
-
getRowStopIndexForStartIndex: function(
|
|
1681
|
-
for (var a =
|
|
1682
|
-
u++, f +=
|
|
1680
|
+
getRowStopIndexForStartIndex: function(e, n, r, o) {
|
|
1681
|
+
for (var a = e.rowCount, l = e.height, s = ve("row", e, n, o), d = r + l, f = s.offset + s.size, u = n; u < a - 1 && f < d; )
|
|
1682
|
+
u++, f += ve("row", e, u, o).size;
|
|
1683
1683
|
return u;
|
|
1684
1684
|
},
|
|
1685
|
-
initInstanceProps: function(
|
|
1686
|
-
var r =
|
|
1685
|
+
initInstanceProps: function(e, n) {
|
|
1686
|
+
var r = e, o = r.estimatedColumnWidth, a = r.estimatedRowHeight, l = {
|
|
1687
1687
|
columnMetadataMap: {},
|
|
1688
|
-
estimatedColumnWidth: o ||
|
|
1689
|
-
estimatedRowHeight: a ||
|
|
1688
|
+
estimatedColumnWidth: o || tn,
|
|
1689
|
+
estimatedRowHeight: a || tn,
|
|
1690
1690
|
lastMeasuredColumnIndex: -1,
|
|
1691
1691
|
lastMeasuredRowIndex: -1,
|
|
1692
1692
|
rowMetadataMap: {}
|
|
@@ -1707,8 +1707,8 @@ var Jr = function(t, n) {
|
|
|
1707
1707
|
}, l;
|
|
1708
1708
|
},
|
|
1709
1709
|
shouldResetStyleCacheOnItemSizeChange: !1,
|
|
1710
|
-
validateProps: function(
|
|
1711
|
-
var n =
|
|
1710
|
+
validateProps: function(e) {
|
|
1711
|
+
var n = e.columnWidth, r = e.rowHeight;
|
|
1712
1712
|
if (process.env.NODE_ENV !== "production") {
|
|
1713
1713
|
if (typeof n != "function")
|
|
1714
1714
|
throw Error('An invalid "columnWidth" prop has been specified. Value should be a function. ' + ('"' + (n === null ? "null" : typeof n) + '" was specified.'));
|
|
@@ -1718,22 +1718,22 @@ var Jr = function(t, n) {
|
|
|
1718
1718
|
}
|
|
1719
1719
|
});
|
|
1720
1720
|
process.env.NODE_ENV;
|
|
1721
|
-
function rn(
|
|
1722
|
-
for (var n in
|
|
1723
|
-
if (!(n in
|
|
1721
|
+
function rn(t, e) {
|
|
1722
|
+
for (var n in t)
|
|
1723
|
+
if (!(n in e))
|
|
1724
1724
|
return !0;
|
|
1725
|
-
for (var r in
|
|
1726
|
-
if (
|
|
1725
|
+
for (var r in e)
|
|
1726
|
+
if (t[r] !== e[r])
|
|
1727
1727
|
return !0;
|
|
1728
1728
|
return !1;
|
|
1729
1729
|
}
|
|
1730
|
-
var
|
|
1731
|
-
function oi(
|
|
1732
|
-
var n =
|
|
1730
|
+
var ti = ["style"], ni = ["style"];
|
|
1731
|
+
function oi(t, e) {
|
|
1732
|
+
var n = t.style, r = Yt(t, ti), o = e.style, a = Yt(e, ni);
|
|
1733
1733
|
return !rn(n, o) && !rn(r, a);
|
|
1734
1734
|
}
|
|
1735
1735
|
const ri = () => {
|
|
1736
|
-
const { viewMode:
|
|
1736
|
+
const { viewMode: t } = ze(), { scrollMode: e } = Oe(), { setColumnCount: n } = vn(), { virtualScrollableElementRef: r } = rt(), o = Ve(), a = k(() => o.heights.length, [o.heights]), l = k(() => e === ee.HORIZONTAL_SCROLLING ? a : t === Ne.DUAL_PAGE ? 2 : 1, [t, e, e, a, r]), s = k(() => o.widths.reduce((T, y, C) => {
|
|
1737
1737
|
const S = C % l;
|
|
1738
1738
|
return (!T[S] || y > T[S]) && (T[S] = y), T;
|
|
1739
1739
|
}, []), [o.widths, l]), d = N(
|
|
@@ -1755,7 +1755,7 @@ const ri = () => {
|
|
|
1755
1755
|
W(() => {
|
|
1756
1756
|
n(l);
|
|
1757
1757
|
}, [l, n]);
|
|
1758
|
-
const u = k(() =>
|
|
1758
|
+
const u = k(() => e === ee.HORIZONTAL_SCROLLING || e === ee.PAGE_SCROLLING ? 1 : Math.round(a / l), [l, a, e]), b = k(() => o.heights.reduce((g, T) => g + T, 0) / o.heights.length || 0, [o]), h = k(() => o.widths.reduce((g, T) => g + T, 0) / o.heights.length || 0, [o]);
|
|
1759
1759
|
return {
|
|
1760
1760
|
rowCount: u,
|
|
1761
1761
|
rowHeight: f,
|
|
@@ -1766,24 +1766,24 @@ const ri = () => {
|
|
|
1766
1766
|
estimatedColumnWidth: h
|
|
1767
1767
|
};
|
|
1768
1768
|
};
|
|
1769
|
-
let
|
|
1770
|
-
typeof window < "u" ?
|
|
1771
|
-
let
|
|
1772
|
-
const an = 20,
|
|
1773
|
-
|
|
1774
|
-
return sn(
|
|
1775
|
-
}) : (
|
|
1776
|
-
|
|
1777
|
-
},
|
|
1769
|
+
let re;
|
|
1770
|
+
typeof window < "u" ? re = window : typeof self < "u" ? re = self : re = global;
|
|
1771
|
+
let Ct = null, Pt = null;
|
|
1772
|
+
const an = 20, ft = re.clearTimeout, sn = re.setTimeout, gt = re.cancelAnimationFrame || re.mozCancelAnimationFrame || re.webkitCancelAnimationFrame, cn = re.requestAnimationFrame || re.mozRequestAnimationFrame || re.webkitRequestAnimationFrame;
|
|
1773
|
+
gt == null || cn == null ? (Ct = ft, Pt = function(e) {
|
|
1774
|
+
return sn(e, an);
|
|
1775
|
+
}) : (Ct = function([e, n]) {
|
|
1776
|
+
gt(e), ft(n);
|
|
1777
|
+
}, Pt = function(e) {
|
|
1778
1778
|
const n = cn(function() {
|
|
1779
|
-
|
|
1779
|
+
ft(r), e();
|
|
1780
1780
|
}), r = sn(function() {
|
|
1781
|
-
|
|
1781
|
+
gt(n), e();
|
|
1782
1782
|
}, an);
|
|
1783
1783
|
return [n, r];
|
|
1784
1784
|
});
|
|
1785
|
-
function ii(
|
|
1786
|
-
let
|
|
1785
|
+
function ii(t) {
|
|
1786
|
+
let e, n, r, o, a, l, s;
|
|
1787
1787
|
const d = typeof document < "u" && document.attachEvent;
|
|
1788
1788
|
if (!d) {
|
|
1789
1789
|
l = function(S) {
|
|
@@ -1795,7 +1795,7 @@ function ii(e) {
|
|
|
1795
1795
|
if (S.target.className && typeof S.target.className.indexOf == "function" && S.target.className.indexOf("contract-trigger") < 0 && S.target.className.indexOf("expand-trigger") < 0)
|
|
1796
1796
|
return;
|
|
1797
1797
|
const w = this;
|
|
1798
|
-
l(this), this.__resizeRAF__ &&
|
|
1798
|
+
l(this), this.__resizeRAF__ && Ct(this.__resizeRAF__), this.__resizeRAF__ = Pt(function() {
|
|
1799
1799
|
a(w) && (w.__resizeLast__.width = w.offsetWidth, w.__resizeLast__.height = w.offsetHeight, w.__resizeListeners__.forEach(function(c) {
|
|
1800
1800
|
c.call(w, S);
|
|
1801
1801
|
}));
|
|
@@ -1815,12 +1815,12 @@ function ii(e) {
|
|
|
1815
1815
|
}
|
|
1816
1816
|
}
|
|
1817
1817
|
}
|
|
1818
|
-
n = "resizeanim",
|
|
1818
|
+
n = "resizeanim", e = "@" + g + "keyframes " + n + " { from { opacity: 0; } to { opacity: 0; } } ", o = g + "animation: 1ms " + n + "; ";
|
|
1819
1819
|
}
|
|
1820
1820
|
const f = function(h) {
|
|
1821
1821
|
if (!h.getElementById("detectElementResize")) {
|
|
1822
|
-
const g = (
|
|
1823
|
-
y.id = "detectElementResize", y.type = "text/css",
|
|
1822
|
+
const g = (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%; }', T = h.head || h.getElementsByTagName("head")[0], y = h.createElement("style");
|
|
1823
|
+
y.id = "detectElementResize", y.type = "text/css", t != null && y.setAttribute("nonce", t), y.styleSheet ? y.styleSheet.cssText = g : y.appendChild(h.createTextNode(g)), T.appendChild(y);
|
|
1824
1824
|
}
|
|
1825
1825
|
};
|
|
1826
1826
|
return {
|
|
@@ -1829,7 +1829,7 @@ function ii(e) {
|
|
|
1829
1829
|
h.attachEvent("onresize", g);
|
|
1830
1830
|
else {
|
|
1831
1831
|
if (!h.__resizeTriggers__) {
|
|
1832
|
-
const T = h.ownerDocument, y =
|
|
1832
|
+
const T = h.ownerDocument, y = re.getComputedStyle(h);
|
|
1833
1833
|
y && y.position === "static" && (h.style.position = "relative"), f(T), h.__resizeLast__ = {}, h.__resizeListeners__ = [], (h.__resizeTriggers__ = T.createElement("div")).className = "resize-triggers";
|
|
1834
1834
|
const C = T.createElement("div");
|
|
1835
1835
|
C.className = "expand-trigger", C.appendChild(T.createElement("div"));
|
|
@@ -1855,8 +1855,8 @@ function ii(e) {
|
|
|
1855
1855
|
};
|
|
1856
1856
|
}
|
|
1857
1857
|
class ai extends po {
|
|
1858
|
-
constructor(...
|
|
1859
|
-
super(...
|
|
1858
|
+
constructor(...e) {
|
|
1859
|
+
super(...e), this.state = {
|
|
1860
1860
|
height: this.props.defaultHeight || 0,
|
|
1861
1861
|
scaledHeight: this.props.defaultHeight || 0,
|
|
1862
1862
|
scaledWidth: this.props.defaultWidth || 0,
|
|
@@ -1888,14 +1888,14 @@ class ai extends po {
|
|
|
1888
1888
|
}
|
|
1889
1889
|
componentDidMount() {
|
|
1890
1890
|
const {
|
|
1891
|
-
nonce:
|
|
1891
|
+
nonce: e
|
|
1892
1892
|
} = this.props, n = this._autoSizer ? this._autoSizer.parentNode : null;
|
|
1893
1893
|
if (n != null && n.ownerDocument && n.ownerDocument.defaultView && n instanceof n.ownerDocument.defaultView.HTMLElement) {
|
|
1894
1894
|
this._parentNode = n;
|
|
1895
1895
|
const r = n.ownerDocument.defaultView.ResizeObserver;
|
|
1896
1896
|
r != null ? (this._resizeObserver = new r(() => {
|
|
1897
1897
|
this._timeoutId = setTimeout(this._onResize, 0);
|
|
1898
|
-
}), this._resizeObserver.observe(n)) : (this._detectElementResize = ii(
|
|
1898
|
+
}), this._resizeObserver.observe(n)) : (this._detectElementResize = ii(e), this._detectElementResize.addResizeListener(n, this._onResize)), this._onResize();
|
|
1899
1899
|
}
|
|
1900
1900
|
}
|
|
1901
1901
|
componentWillUnmount() {
|
|
@@ -1903,7 +1903,7 @@ class ai extends po {
|
|
|
1903
1903
|
}
|
|
1904
1904
|
render() {
|
|
1905
1905
|
const {
|
|
1906
|
-
children:
|
|
1906
|
+
children: e,
|
|
1907
1907
|
defaultHeight: n,
|
|
1908
1908
|
defaultWidth: r,
|
|
1909
1909
|
disableHeight: o = !1,
|
|
@@ -1923,18 +1923,18 @@ class ai extends po {
|
|
|
1923
1923
|
overflow: "visible"
|
|
1924
1924
|
}, S = {};
|
|
1925
1925
|
let w = !1;
|
|
1926
|
-
return o || (h === 0 && (w = !0), C.height = 0, S.height = h, S.scaledHeight = g), a || (y === 0 && (w = !0), C.width = 0, S.width = y, S.scaledWidth = T), l && (w = !1),
|
|
1926
|
+
return o || (h === 0 && (w = !0), C.height = 0, S.height = h, S.scaledHeight = g), a || (y === 0 && (w = !0), C.width = 0, S.width = y, S.scaledWidth = T), l && (w = !1), Ke(u, {
|
|
1927
1927
|
ref: this._setRef,
|
|
1928
1928
|
style: {
|
|
1929
1929
|
...C,
|
|
1930
1930
|
...f
|
|
1931
1931
|
},
|
|
1932
1932
|
...b
|
|
1933
|
-
}, !w &&
|
|
1933
|
+
}, !w && e(S));
|
|
1934
1934
|
}
|
|
1935
1935
|
}
|
|
1936
|
-
const si = mn(({ widths:
|
|
1937
|
-
const { focusedPage: n, totalPages: r } =
|
|
1936
|
+
const si = mn(({ widths: t, heights: e }) => {
|
|
1937
|
+
const { focusedPage: n, totalPages: r } = ae(), o = k(() => {
|
|
1938
1938
|
const s = [], d = Math.ceil(n / 2) * 2 - 1;
|
|
1939
1939
|
if (s.push(d), d + 1 <= r) {
|
|
1940
1940
|
const f = d + 1;
|
|
@@ -1942,7 +1942,7 @@ const si = mn(({ widths: e, heights: t }) => {
|
|
|
1942
1942
|
}
|
|
1943
1943
|
return s;
|
|
1944
1944
|
}, [n, r]), a = k(() => {
|
|
1945
|
-
const s = n % 2 === 1 ? n - 1 : n - 2, d =
|
|
1945
|
+
const s = n % 2 === 1 ? n - 1 : n - 2, d = t(s), f = e(s), u = t(s + 1), b = e(s + 1), h = f > b ? f : b, g = f < b ? f : b, T = h / 2 - g / 2;
|
|
1946
1946
|
return [
|
|
1947
1947
|
{
|
|
1948
1948
|
position: "absolute",
|
|
@@ -1959,14 +1959,14 @@ const si = mn(({ widths: e, heights: t }) => {
|
|
|
1959
1959
|
height: b
|
|
1960
1960
|
}
|
|
1961
1961
|
];
|
|
1962
|
-
}, [
|
|
1963
|
-
return /* @__PURE__ */ i("div", { style: { width: l, position: "relative" }, children: o.map((s, d) => /* @__PURE__ */ i(
|
|
1964
|
-
}), ci = ({ widths:
|
|
1965
|
-
const { focusedPage: n } =
|
|
1962
|
+
}, [t, e, o]), l = k(() => a.reduce((s, d) => s + Number(d.width || 0), 0), [a]);
|
|
1963
|
+
return /* @__PURE__ */ i("div", { style: { width: l, position: "relative" }, children: o.map((s, d) => /* @__PURE__ */ i(Ot, { style: a[d], pageNumber: s }, s)) });
|
|
1964
|
+
}), ci = ({ widths: t, heights: e }) => {
|
|
1965
|
+
const { focusedPage: n } = ae(), r = k(() => ({
|
|
1966
1966
|
position: "absolute",
|
|
1967
|
-
width:
|
|
1968
|
-
height:
|
|
1969
|
-
}), [
|
|
1967
|
+
width: t(n - 1),
|
|
1968
|
+
height: e(n - 1)
|
|
1969
|
+
}), [t, e, n]), o = k(() => t(n - 1), [t]);
|
|
1970
1970
|
return /* @__PURE__ */ i(
|
|
1971
1971
|
"div",
|
|
1972
1972
|
{
|
|
@@ -1974,12 +1974,12 @@ const si = mn(({ widths: e, heights: t }) => {
|
|
|
1974
1974
|
width: o,
|
|
1975
1975
|
position: "relative"
|
|
1976
1976
|
},
|
|
1977
|
-
children: /* @__PURE__ */ i(
|
|
1977
|
+
children: /* @__PURE__ */ i(Ot, { style: r, pageNumber: n }, n)
|
|
1978
1978
|
}
|
|
1979
1979
|
);
|
|
1980
|
-
}, li = (
|
|
1981
|
-
const r = $(), { contentRef: o } =
|
|
1982
|
-
const C = l[y], S = xr(y + 1,
|
|
1980
|
+
}, li = (t, e, n) => {
|
|
1981
|
+
const r = $(), { contentRef: o } = se(), { heights: a, widths: l } = Ve(), { setFocusedPage: s } = ae(), [d, f] = G([]), { targetScrollPage: u } = wn(), b = Lt(d, 0, 500), h = k(() => a.map((T, y) => {
|
|
1982
|
+
const C = l[y], S = xr(y + 1, t), w = C * S.columnIndex, p = T * S.rowIndex, m = w + C, c = p + T;
|
|
1983
1983
|
return {
|
|
1984
1984
|
pageNumber: y + 1,
|
|
1985
1985
|
...S,
|
|
@@ -1990,7 +1990,7 @@ const si = mn(({ widths: e, heights: t }) => {
|
|
|
1990
1990
|
endX: m,
|
|
1991
1991
|
endY: c
|
|
1992
1992
|
};
|
|
1993
|
-
}), [a, l,
|
|
1993
|
+
}), [a, l, t, e]);
|
|
1994
1994
|
W(() => {
|
|
1995
1995
|
var y;
|
|
1996
1996
|
b.length > 0 && !u.current && s(b[0].pageNumber);
|
|
@@ -2028,26 +2028,26 @@ const si = mn(({ widths: e, heights: t }) => {
|
|
|
2028
2028
|
n == null || n.removeEventListener("scroll", g);
|
|
2029
2029
|
};
|
|
2030
2030
|
}, [n, g]);
|
|
2031
|
-
},
|
|
2032
|
-
"rp-layout": "_rp-
|
|
2033
|
-
"rp-content": "_rp-
|
|
2034
|
-
"rp-pages": "_rp-
|
|
2035
|
-
"rp-container": "_rp-
|
|
2036
|
-
"rp-loader": "_rp-
|
|
2037
|
-
"rp-theme-variables": "_rp-theme-
|
|
2038
|
-
"rp-dark-mode": "_rp-dark-
|
|
2039
|
-
},
|
|
2040
|
-
(
|
|
2041
|
-
const { children: n, toolbarRef: r, style: o, className: a, ...l } =
|
|
2031
|
+
}, we = {
|
|
2032
|
+
"rp-layout": "_rp-layout_1q08v_1",
|
|
2033
|
+
"rp-content": "_rp-content_1q08v_5",
|
|
2034
|
+
"rp-pages": "_rp-pages_1q08v_11",
|
|
2035
|
+
"rp-container": "_rp-container_1q08v_16",
|
|
2036
|
+
"rp-loader": "_rp-loader_1q08v_20",
|
|
2037
|
+
"rp-theme-variables": "_rp-theme-variables_1q08v_24",
|
|
2038
|
+
"rp-dark-mode": "_rp-dark-mode_1q08v_135"
|
|
2039
|
+
}, zt = ke(
|
|
2040
|
+
(t, e) => {
|
|
2041
|
+
const { children: n, toolbarRef: r, style: o, className: a, ...l } = t, { customVariables: s, customDarkVariables: d } = ho(), { darkMode: f } = go();
|
|
2042
2042
|
return /* @__PURE__ */ i(
|
|
2043
2043
|
"div",
|
|
2044
2044
|
{
|
|
2045
|
-
ref:
|
|
2045
|
+
ref: e,
|
|
2046
2046
|
...l,
|
|
2047
|
-
className:
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
f ?
|
|
2047
|
+
className: ne(
|
|
2048
|
+
we["rp-theme-variables"],
|
|
2049
|
+
we["rp-container"],
|
|
2050
|
+
f ? we["rp-dark-mode"] : "",
|
|
2051
2051
|
a
|
|
2052
2052
|
),
|
|
2053
2053
|
style: {
|
|
@@ -2060,11 +2060,11 @@ const si = mn(({ widths: e, heights: t }) => {
|
|
|
2060
2060
|
}
|
|
2061
2061
|
);
|
|
2062
2062
|
}
|
|
2063
|
-
), di = mn(({ columnIndex:
|
|
2064
|
-
const o = Rr(
|
|
2065
|
-
return /* @__PURE__ */ i(
|
|
2066
|
-
}, oi),
|
|
2067
|
-
const { initialPage:
|
|
2063
|
+
), di = mn(({ columnIndex: t, rowIndex: e, data: n, style: r }) => {
|
|
2064
|
+
const o = Rr(e, t, n.columnCount);
|
|
2065
|
+
return /* @__PURE__ */ i(Ot, { style: r, pageNumber: o }, o);
|
|
2066
|
+
}, oi), ec = () => {
|
|
2067
|
+
const { initialPage: t = 1, initialScrollMode: e, instanceId: n } = _o(), { pagesRef: r, setPagesRef: o } = se(), { scrollToPage: a } = Rn(), {
|
|
2068
2068
|
virtualScrollRef: l,
|
|
2069
2069
|
getVirtualScrollRef: s,
|
|
2070
2070
|
getPageScrollElementRef: d,
|
|
@@ -2073,7 +2073,7 @@ const si = mn(({ widths: e, heights: t }) => {
|
|
|
2073
2073
|
virtualScrollableElementRef: b,
|
|
2074
2074
|
totalInnerDimensions: h,
|
|
2075
2075
|
pageScrollElementRef: g
|
|
2076
|
-
} =
|
|
2076
|
+
} = rt(), T = $(!0), { nextPage: y, prevPage: C, setFocusedPage: S, focusedPage: w } = ae(), { scrollMode: p } = Oe(), { viewMode: m } = ze(), c = $(null), { loading: _ } = X(), { passwordRequired: v } = mo(), { LoaderImageComponent: P } = yt(), R = $(
|
|
2077
2077
|
h
|
|
2078
2078
|
), I = $({
|
|
2079
2079
|
viewMode: m,
|
|
@@ -2085,50 +2085,50 @@ const si = mn(({ widths: e, heights: t }) => {
|
|
|
2085
2085
|
columnCount: F,
|
|
2086
2086
|
columnWidth: z,
|
|
2087
2087
|
estimatedColumnWidth: H,
|
|
2088
|
-
estimatedRowHeight:
|
|
2089
|
-
} = ri(), K =
|
|
2088
|
+
estimatedRowHeight: V
|
|
2089
|
+
} = ri(), K = Lt(h, 100), B = $();
|
|
2090
2090
|
li(F, L, b);
|
|
2091
|
-
const
|
|
2091
|
+
const te = $({
|
|
2092
2092
|
scrollTop: 0,
|
|
2093
2093
|
scrollLeft: 0
|
|
2094
2094
|
});
|
|
2095
2095
|
Sr(r);
|
|
2096
|
-
const { isPressed: Y } = Pr(), { selectionMode:
|
|
2096
|
+
const { isPressed: Y } = Pr(), { selectionMode: de } = wo(), { initializeGrabScroll: _e, resetGrabState: ue } = yr({
|
|
2097
2097
|
isPressed: Y
|
|
2098
|
-
}), J = k(() =>
|
|
2098
|
+
}), J = k(() => de === fo.HAND, [de]), He = k(() => ({
|
|
2099
2099
|
columnCount: F
|
|
2100
|
-
}), [F]),
|
|
2101
|
-
(
|
|
2102
|
-
const
|
|
2103
|
-
!D &&
|
|
2100
|
+
}), [F]), be = N(
|
|
2101
|
+
(q) => {
|
|
2102
|
+
const U = document.activeElement !== r;
|
|
2103
|
+
!D && U || (["ArrowUp", "ArrowLeft"].includes(q.key) ? (q.preventDefault(), C()) : ["ArrowDown", "ArrowRight"].includes(q.key) && (q.preventDefault(), y()));
|
|
2104
2104
|
},
|
|
2105
2105
|
[y, C, D, p]
|
|
2106
2106
|
);
|
|
2107
|
-
W(() => (window.addEventListener("keydown",
|
|
2108
|
-
window.removeEventListener("keydown",
|
|
2109
|
-
}), [
|
|
2107
|
+
W(() => (window.addEventListener("keydown", be), () => {
|
|
2108
|
+
window.removeEventListener("keydown", be);
|
|
2109
|
+
}), [be]), W(() => {
|
|
2110
2110
|
if (c.current && (c.current.style.position = "relative"), !!l)
|
|
2111
|
-
for (let
|
|
2112
|
-
for (let
|
|
2111
|
+
for (let q = 0; q < L; q++)
|
|
2112
|
+
for (let U = 0; U < F; U++)
|
|
2113
2113
|
l.resetAfterIndices({
|
|
2114
|
-
columnIndex:
|
|
2115
|
-
rowIndex:
|
|
2114
|
+
columnIndex: U,
|
|
2115
|
+
rowIndex: q,
|
|
2116
2116
|
shouldForceUpdate: !0
|
|
2117
2117
|
});
|
|
2118
2118
|
}, [L, F, M, l]);
|
|
2119
|
-
const
|
|
2120
|
-
(
|
|
2119
|
+
const Se = N(
|
|
2120
|
+
(q, U) => {
|
|
2121
2121
|
if (!b)
|
|
2122
2122
|
return { scrollTop: 0, scrollLeft: 0 };
|
|
2123
|
-
const
|
|
2124
|
-
return
|
|
2123
|
+
const Ie = te.current.scrollTop > U, xe = te.current.scrollLeft > q;
|
|
2124
|
+
return Ie || xe ? te.current : {
|
|
2125
2125
|
scrollTop: b.scrollTop,
|
|
2126
2126
|
scrollLeft: b.scrollLeft
|
|
2127
2127
|
};
|
|
2128
2128
|
},
|
|
2129
2129
|
[b]
|
|
2130
|
-
),
|
|
2131
|
-
(
|
|
2130
|
+
), Te = N(
|
|
2131
|
+
(q, U) => {
|
|
2132
2132
|
if (I.current.viewMode !== m || I.current.scrollMode !== p) {
|
|
2133
2133
|
B.current && clearTimeout(B.current), x.current = !0, a(w, "auto"), B.current = setTimeout(() => {
|
|
2134
2134
|
requestAnimationFrame(() => {
|
|
@@ -2137,14 +2137,14 @@ const si = mn(({ widths: e, heights: t }) => {
|
|
|
2137
2137
|
}, 100);
|
|
2138
2138
|
return;
|
|
2139
2139
|
}
|
|
2140
|
-
const
|
|
2141
|
-
if (!
|
|
2140
|
+
const xe = q.scrollTop, st = q.scrollLeft;
|
|
2141
|
+
if (!U.height || !U.width)
|
|
2142
2142
|
return;
|
|
2143
2143
|
x.current = !0;
|
|
2144
|
-
const { height:
|
|
2145
|
-
if (
|
|
2144
|
+
const { height: Re, width: ct } = U, { height: Wt, width: kt } = R.current;
|
|
2145
|
+
if (Wt === Re && kt === ct)
|
|
2146
2146
|
return;
|
|
2147
|
-
const ao =
|
|
2147
|
+
const ao = xe / Wt * Re, so = st / kt * ct, co = Math.round(Math.min(ao, Re)) || 0, lo = Math.round(Math.min(so, ct)) || 0;
|
|
2148
2148
|
O.current = setTimeout(() => {
|
|
2149
2149
|
requestAnimationFrame(() => {
|
|
2150
2150
|
l == null || l.scrollTo({
|
|
@@ -2153,31 +2153,31 @@ const si = mn(({ widths: e, heights: t }) => {
|
|
|
2153
2153
|
});
|
|
2154
2154
|
});
|
|
2155
2155
|
}, 0), R.current = {
|
|
2156
|
-
height:
|
|
2157
|
-
width:
|
|
2156
|
+
height: U.height,
|
|
2157
|
+
width: U.width
|
|
2158
2158
|
};
|
|
2159
2159
|
},
|
|
2160
2160
|
[l, m, p, a]
|
|
2161
2161
|
);
|
|
2162
2162
|
W(() => {
|
|
2163
2163
|
clearTimeout(O.current);
|
|
2164
|
-
const
|
|
2165
|
-
(
|
|
2164
|
+
const q = Array.from({ length: L }).reduce(
|
|
2165
|
+
(xe, st, Re) => xe + E(Re),
|
|
2166
2166
|
0
|
|
2167
|
-
),
|
|
2168
|
-
(
|
|
2167
|
+
), U = Array.from({ length: F }).reduce(
|
|
2168
|
+
(xe, st, Re) => xe + z(Re),
|
|
2169
2169
|
0
|
|
2170
|
-
),
|
|
2171
|
-
|
|
2172
|
-
height:
|
|
2173
|
-
width:
|
|
2170
|
+
), Ie = Se(U, q);
|
|
2171
|
+
te.current = Ie, Te(Ie, { height: q, width: U }), u({
|
|
2172
|
+
height: q,
|
|
2173
|
+
width: U
|
|
2174
2174
|
});
|
|
2175
|
-
}, [M, L, F,
|
|
2176
|
-
const
|
|
2177
|
-
(
|
|
2178
|
-
|
|
2179
|
-
scrollTop:
|
|
2180
|
-
scrollLeft:
|
|
2175
|
+
}, [M, L, F, Te]);
|
|
2176
|
+
const it = N(
|
|
2177
|
+
(q) => {
|
|
2178
|
+
te.current = {
|
|
2179
|
+
scrollTop: q.scrollTop,
|
|
2180
|
+
scrollLeft: q.scrollLeft
|
|
2181
2181
|
};
|
|
2182
2182
|
},
|
|
2183
2183
|
[b]
|
|
@@ -2185,69 +2185,69 @@ const si = mn(({ widths: e, heights: t }) => {
|
|
|
2185
2185
|
W(() => () => {
|
|
2186
2186
|
B.current && clearTimeout(B.current);
|
|
2187
2187
|
}, []);
|
|
2188
|
-
const
|
|
2189
|
-
[
|
|
2190
|
-
[
|
|
2188
|
+
const at = k(() => ne(pe["rp-pages-container"], {
|
|
2189
|
+
[pe["rp-cursor-grab"]]: J && !Y,
|
|
2190
|
+
[pe["rp-cursor-grabbing"]]: J && Y
|
|
2191
2191
|
}), [J, Y]), io = N(
|
|
2192
|
-
(
|
|
2193
|
-
if (J &&
|
|
2194
|
-
const
|
|
2195
|
-
|
|
2192
|
+
(q) => {
|
|
2193
|
+
if (J && q) {
|
|
2194
|
+
const U = ne(pe["rp-pages"]), Ie = document.querySelector(`.${U}`);
|
|
2195
|
+
_e(Ie);
|
|
2196
2196
|
}
|
|
2197
2197
|
},
|
|
2198
|
-
[J,
|
|
2198
|
+
[J, _e, pe]
|
|
2199
2199
|
);
|
|
2200
2200
|
return W(() => {
|
|
2201
|
-
_ &&
|
|
2201
|
+
_ && ue();
|
|
2202
2202
|
}, [_]), W(() => {
|
|
2203
2203
|
if (!(K.height === 0 || !T.current)) {
|
|
2204
|
-
if (
|
|
2205
|
-
|
|
2204
|
+
if (e === ee.PAGE_SCROLLING) {
|
|
2205
|
+
t !== w && g && S(t), T.current = !1;
|
|
2206
2206
|
return;
|
|
2207
2207
|
}
|
|
2208
|
-
a(
|
|
2208
|
+
a(t, "auto"), S(t), T.current = !1;
|
|
2209
2209
|
}
|
|
2210
2210
|
}, [
|
|
2211
2211
|
a,
|
|
2212
|
-
|
|
2212
|
+
e,
|
|
2213
2213
|
g,
|
|
2214
2214
|
S,
|
|
2215
2215
|
K
|
|
2216
|
-
]), /* @__PURE__ */ A(
|
|
2217
|
-
/* @__PURE__ */ i(
|
|
2216
|
+
]), /* @__PURE__ */ A(ie, { children: [
|
|
2217
|
+
/* @__PURE__ */ i(zt, { id: n, ref: o, tabIndex: -1, className: at, children: /* @__PURE__ */ i(ai, { style: { minHeight: "50px" }, children: ({ width: q, height: U }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: io, style: { width: q, height: U }, children: p === ee.PAGE_SCROLLING ? /* @__PURE__ */ i(
|
|
2218
2218
|
"div",
|
|
2219
2219
|
{
|
|
2220
2220
|
ref: d,
|
|
2221
|
-
style: { width:
|
|
2222
|
-
className:
|
|
2223
|
-
children: m ===
|
|
2221
|
+
style: { width: q, height: U },
|
|
2222
|
+
className: ne(pe["rp-pages"], pe["rp-page-scrolling-wrapper"]),
|
|
2223
|
+
children: m === Ne.DUAL_PAGE ? /* @__PURE__ */ i(si, { widths: z, heights: E }) : /* @__PURE__ */ i(ci, { widths: z, heights: E })
|
|
2224
2224
|
}
|
|
2225
2225
|
) : H ? /* @__PURE__ */ i(
|
|
2226
|
-
|
|
2226
|
+
ei,
|
|
2227
2227
|
{
|
|
2228
2228
|
ref: s,
|
|
2229
|
-
itemData:
|
|
2229
|
+
itemData: He,
|
|
2230
2230
|
outerRef: f,
|
|
2231
2231
|
innerRef: c,
|
|
2232
|
-
onScroll:
|
|
2232
|
+
onScroll: it,
|
|
2233
2233
|
columnCount: F,
|
|
2234
2234
|
columnWidth: z,
|
|
2235
2235
|
rowHeight: E,
|
|
2236
|
-
height:
|
|
2237
|
-
width:
|
|
2236
|
+
height: U,
|
|
2237
|
+
width: q,
|
|
2238
2238
|
estimatedColumnWidth: H,
|
|
2239
|
-
estimatedRowHeight:
|
|
2239
|
+
estimatedRowHeight: V,
|
|
2240
2240
|
rowCount: L,
|
|
2241
|
-
className:
|
|
2242
|
-
|
|
2243
|
-
p ===
|
|
2241
|
+
className: ne(
|
|
2242
|
+
pe["rp-pages"],
|
|
2243
|
+
p === ee.HORIZONTAL_SCROLLING ? pe["rp-pages-horizontal-scroll"] : ""
|
|
2244
2244
|
),
|
|
2245
2245
|
children: di
|
|
2246
2246
|
}
|
|
2247
2247
|
) : _ ? null : /* @__PURE__ */ i(
|
|
2248
2248
|
"div",
|
|
2249
2249
|
{
|
|
2250
|
-
className:
|
|
2250
|
+
className: pe["rp-loader"],
|
|
2251
2251
|
style: {
|
|
2252
2252
|
display: "flex",
|
|
2253
2253
|
justifyContent: "center",
|
|
@@ -2260,46 +2260,46 @@ const si = mn(({ widths: e, heights: t }) => {
|
|
|
2260
2260
|
) }) }) }),
|
|
2261
2261
|
v && /* @__PURE__ */ i(Ir, {})
|
|
2262
2262
|
] });
|
|
2263
|
-
}, $
|
|
2263
|
+
}, $e = {
|
|
2264
2264
|
"rp-toolbar-content": "_rp-toolbar-content_sz31z_1",
|
|
2265
2265
|
"rp-toolbar-wrapper": "_rp-toolbar-wrapper_sz31z_10",
|
|
2266
2266
|
"rp-toolbar-start": "_rp-toolbar-start_sz31z_33",
|
|
2267
2267
|
"rp-toolbar-middle": "_rp-toolbar-middle_sz31z_39",
|
|
2268
2268
|
"rp-toolbar-end": "_rp-toolbar-end_sz31z_46"
|
|
2269
|
-
},
|
|
2269
|
+
}, vt = {
|
|
2270
2270
|
"rp-paginate": "_rp-paginate_1y9vo_1",
|
|
2271
2271
|
"rp-page-input": "_rp-page-input_1y9vo_6",
|
|
2272
2272
|
"rp-total-page": "_rp-total-page_1y9vo_11"
|
|
2273
2273
|
}, ui = () => {
|
|
2274
|
-
const { prevIcon:
|
|
2275
|
-
return
|
|
2274
|
+
const { prevIcon: t } = he(), { prevIcon: e } = fe();
|
|
2275
|
+
return t || e || /* @__PURE__ */ i(Ue, {});
|
|
2276
2276
|
}, pi = () => {
|
|
2277
|
-
const { nextIcon:
|
|
2278
|
-
return
|
|
2277
|
+
const { nextIcon: t } = he(), { nextIcon: e } = fe();
|
|
2278
|
+
return t || e || /* @__PURE__ */ i(Ue, { style: { transform: "rotate(180deg" } });
|
|
2279
2279
|
}, hi = () => {
|
|
2280
|
-
const { focusedPage:
|
|
2280
|
+
const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: r, prevPage: o, goToPage: a } = ae(), [l, s] = G(t.toString()), { pageNavigationTool: d = !0 } = me(), { pageNavigationTool: f = !0 } = ye(), { isSmallScreen: u } = Pe(), { viewMode: b } = ze(), { scrollMode: h } = Oe(), { localeMessages: g } = ce();
|
|
2281
2281
|
W(() => {
|
|
2282
|
-
s(
|
|
2283
|
-
}, [
|
|
2282
|
+
s(t.toString());
|
|
2283
|
+
}, [t]);
|
|
2284
2284
|
const T = N((p) => {
|
|
2285
2285
|
const m = p.target.value;
|
|
2286
2286
|
s(m);
|
|
2287
2287
|
}, []), y = N(async () => {
|
|
2288
2288
|
const p = a(l);
|
|
2289
2289
|
p.success || s(p.currentPage.toString());
|
|
2290
|
-
}, [a, l,
|
|
2291
|
-
s(
|
|
2292
|
-
}, [
|
|
2290
|
+
}, [a, l, e]), C = N(() => {
|
|
2291
|
+
s(t.toString());
|
|
2292
|
+
}, [t]), S = N(
|
|
2293
2293
|
(p) => {
|
|
2294
2294
|
p.key === "Enter" && y();
|
|
2295
2295
|
},
|
|
2296
2296
|
[y]
|
|
2297
|
-
), w = k(() => b ===
|
|
2297
|
+
), w = k(() => b === Ne.DUAL_PAGE && h === ee.PAGE_SCROLLING && t === e - 1 || t === e, [t, e, b, h]);
|
|
2298
2298
|
return !d || !f ? null : typeof d != "boolean" ? /* @__PURE__ */ i(
|
|
2299
2299
|
d,
|
|
2300
2300
|
{
|
|
2301
|
-
total:
|
|
2302
|
-
current:
|
|
2301
|
+
total: e,
|
|
2302
|
+
current: t,
|
|
2303
2303
|
nextPage: r,
|
|
2304
2304
|
prevPage: o,
|
|
2305
2305
|
goToPage: a,
|
|
@@ -2308,20 +2308,20 @@ const si = mn(({ widths: e, heights: t }) => {
|
|
|
2308
2308
|
) : typeof f != "boolean" ? /* @__PURE__ */ i(
|
|
2309
2309
|
f,
|
|
2310
2310
|
{
|
|
2311
|
-
total:
|
|
2312
|
-
current:
|
|
2311
|
+
total: e,
|
|
2312
|
+
current: t,
|
|
2313
2313
|
nextPage: r,
|
|
2314
2314
|
prevPage: o,
|
|
2315
2315
|
goToPage: a,
|
|
2316
2316
|
changePage: n
|
|
2317
2317
|
}
|
|
2318
|
-
) : /* @__PURE__ */ A("div", { className:
|
|
2318
|
+
) : /* @__PURE__ */ A("div", { className: vt["rp-paginate"], children: [
|
|
2319
2319
|
!u && /* @__PURE__ */ i(Z, { content: g == null ? void 0 : g.previousPageTooltip, children: /* @__PURE__ */ i(
|
|
2320
|
-
|
|
2320
|
+
oe,
|
|
2321
2321
|
{
|
|
2322
2322
|
onClick: o,
|
|
2323
2323
|
"aria-label": g == null ? void 0 : g.previousPageTooltip,
|
|
2324
|
-
"aria-disabled":
|
|
2324
|
+
"aria-disabled": t === 1,
|
|
2325
2325
|
children: /* @__PURE__ */ i(ui, {})
|
|
2326
2326
|
}
|
|
2327
2327
|
) }),
|
|
@@ -2332,15 +2332,15 @@ const si = mn(({ widths: e, heights: t }) => {
|
|
|
2332
2332
|
onBlur: C,
|
|
2333
2333
|
onChange: T,
|
|
2334
2334
|
value: l,
|
|
2335
|
-
className:
|
|
2335
|
+
className: vt["rp-page-input"]
|
|
2336
2336
|
}
|
|
2337
2337
|
) }),
|
|
2338
|
-
/* @__PURE__ */ A("span", { className:
|
|
2338
|
+
/* @__PURE__ */ A("span", { className: vt["rp-total-page"], children: [
|
|
2339
2339
|
"/",
|
|
2340
|
-
|
|
2340
|
+
e
|
|
2341
2341
|
] }),
|
|
2342
2342
|
!u && /* @__PURE__ */ i(Z, { content: g == null ? void 0 : g.nextPageTooltip, children: /* @__PURE__ */ i(
|
|
2343
|
-
|
|
2343
|
+
oe,
|
|
2344
2344
|
{
|
|
2345
2345
|
onClick: r,
|
|
2346
2346
|
"aria-label": g == null ? void 0 : g.nextPageTooltip,
|
|
@@ -2350,15 +2350,15 @@ const si = mn(({ widths: e, heights: t }) => {
|
|
|
2350
2350
|
) })
|
|
2351
2351
|
] });
|
|
2352
2352
|
};
|
|
2353
|
-
var
|
|
2353
|
+
var Dt = "Dialog", [Fn, tc] = zo(Dt), [mi, le] = Fn(Dt), Mn = (t) => {
|
|
2354
2354
|
const {
|
|
2355
|
-
__scopeDialog:
|
|
2355
|
+
__scopeDialog: e,
|
|
2356
2356
|
children: n,
|
|
2357
2357
|
open: r,
|
|
2358
2358
|
defaultOpen: o,
|
|
2359
2359
|
onOpenChange: a,
|
|
2360
2360
|
modal: l = !0
|
|
2361
|
-
} =
|
|
2361
|
+
} = t, s = j.useRef(null), d = j.useRef(null), [f = !1, u] = Fo({
|
|
2362
2362
|
prop: r,
|
|
2363
2363
|
defaultProp: o,
|
|
2364
2364
|
onChange: a
|
|
@@ -2366,12 +2366,12 @@ var De = "Dialog", [Fn, ec] = zo(De), [mi, lt] = Fn(De), Mn = (e) => {
|
|
|
2366
2366
|
return /* @__PURE__ */ i(
|
|
2367
2367
|
mi,
|
|
2368
2368
|
{
|
|
2369
|
-
scope:
|
|
2369
|
+
scope: e,
|
|
2370
2370
|
triggerRef: s,
|
|
2371
2371
|
contentRef: d,
|
|
2372
|
-
contentId:
|
|
2373
|
-
titleId:
|
|
2374
|
-
descriptionId:
|
|
2372
|
+
contentId: dt(),
|
|
2373
|
+
titleId: dt(),
|
|
2374
|
+
descriptionId: dt(),
|
|
2375
2375
|
open: f,
|
|
2376
2376
|
onOpenChange: u,
|
|
2377
2377
|
onOpenToggle: j.useCallback(() => u((b) => !b), [u]),
|
|
@@ -2380,120 +2380,120 @@ var De = "Dialog", [Fn, ec] = zo(De), [mi, lt] = Fn(De), Mn = (e) => {
|
|
|
2380
2380
|
}
|
|
2381
2381
|
);
|
|
2382
2382
|
};
|
|
2383
|
-
Mn.displayName =
|
|
2383
|
+
Mn.displayName = Dt;
|
|
2384
2384
|
var Wn = "DialogTrigger", fi = j.forwardRef(
|
|
2385
|
-
(
|
|
2386
|
-
const { __scopeDialog: n, ...r } =
|
|
2385
|
+
(t, e) => {
|
|
2386
|
+
const { __scopeDialog: n, ...r } = t, o = le(Wn, n), a = St(e, o.triggerRef);
|
|
2387
2387
|
return /* @__PURE__ */ i(
|
|
2388
|
-
|
|
2388
|
+
Ze.button,
|
|
2389
2389
|
{
|
|
2390
2390
|
type: "button",
|
|
2391
2391
|
"aria-haspopup": "dialog",
|
|
2392
2392
|
"aria-expanded": o.open,
|
|
2393
2393
|
"aria-controls": o.contentId,
|
|
2394
|
-
"data-state":
|
|
2394
|
+
"data-state": Mt(o.open),
|
|
2395
2395
|
...r,
|
|
2396
2396
|
ref: a,
|
|
2397
|
-
onClick:
|
|
2397
|
+
onClick: qe(t.onClick, o.onOpenToggle)
|
|
2398
2398
|
}
|
|
2399
2399
|
);
|
|
2400
2400
|
}
|
|
2401
2401
|
);
|
|
2402
2402
|
fi.displayName = Wn;
|
|
2403
|
-
var
|
|
2403
|
+
var At = "DialogPortal", [gi, kn] = Fn(At, {
|
|
2404
2404
|
forceMount: void 0
|
|
2405
|
-
}), Hn = (
|
|
2406
|
-
const { __scopeDialog:
|
|
2407
|
-
return /* @__PURE__ */ i(gi, { scope:
|
|
2405
|
+
}), Hn = (t) => {
|
|
2406
|
+
const { __scopeDialog: e, forceMount: n, children: r, container: o } = t, a = le(At, e);
|
|
2407
|
+
return /* @__PURE__ */ i(gi, { scope: e, forceMount: n, children: j.Children.map(r, (l) => /* @__PURE__ */ i(It, { present: n || a.open, children: /* @__PURE__ */ i($o, { asChild: !0, container: o, children: l }) })) });
|
|
2408
2408
|
};
|
|
2409
|
-
Hn.displayName =
|
|
2410
|
-
var
|
|
2411
|
-
(
|
|
2412
|
-
const n = kn(
|
|
2413
|
-
return a.modal ? /* @__PURE__ */ i(
|
|
2409
|
+
Hn.displayName = At;
|
|
2410
|
+
var et = "DialogOverlay", $n = j.forwardRef(
|
|
2411
|
+
(t, e) => {
|
|
2412
|
+
const n = kn(et, t.__scopeDialog), { forceMount: r = n.forceMount, ...o } = t, a = le(et, t.__scopeDialog);
|
|
2413
|
+
return a.modal ? /* @__PURE__ */ i(It, { present: r || a.open, children: /* @__PURE__ */ i(vi, { ...o, ref: e }) }) : null;
|
|
2414
2414
|
}
|
|
2415
2415
|
);
|
|
2416
|
-
$n.displayName =
|
|
2416
|
+
$n.displayName = et;
|
|
2417
2417
|
var vi = j.forwardRef(
|
|
2418
|
-
(
|
|
2419
|
-
const { __scopeDialog: n, ...r } =
|
|
2418
|
+
(t, e) => {
|
|
2419
|
+
const { __scopeDialog: n, ...r } = t, o = le(et, n);
|
|
2420
2420
|
return (
|
|
2421
2421
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
2422
2422
|
// ie. when `Overlay` and `Content` are siblings
|
|
2423
2423
|
/* @__PURE__ */ i(Wo, { as: Do, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ i(
|
|
2424
|
-
|
|
2424
|
+
Ze.div,
|
|
2425
2425
|
{
|
|
2426
|
-
"data-state":
|
|
2426
|
+
"data-state": Mt(o.open),
|
|
2427
2427
|
...r,
|
|
2428
|
-
ref:
|
|
2428
|
+
ref: e,
|
|
2429
2429
|
style: { pointerEvents: "auto", ...r.style }
|
|
2430
2430
|
}
|
|
2431
2431
|
) })
|
|
2432
2432
|
);
|
|
2433
2433
|
}
|
|
2434
|
-
),
|
|
2435
|
-
(
|
|
2436
|
-
const n = kn(
|
|
2437
|
-
return /* @__PURE__ */ i(
|
|
2434
|
+
), Ee = "DialogContent", Gn = j.forwardRef(
|
|
2435
|
+
(t, e) => {
|
|
2436
|
+
const n = kn(Ee, t.__scopeDialog), { forceMount: r = n.forceMount, ...o } = t, a = le(Ee, t.__scopeDialog);
|
|
2437
|
+
return /* @__PURE__ */ i(It, { present: r || a.open, children: a.modal ? /* @__PURE__ */ i(wi, { ...o, ref: e }) : /* @__PURE__ */ i(_i, { ...o, ref: e }) });
|
|
2438
2438
|
}
|
|
2439
2439
|
);
|
|
2440
|
-
Gn.displayName =
|
|
2440
|
+
Gn.displayName = Ee;
|
|
2441
2441
|
var wi = j.forwardRef(
|
|
2442
|
-
(
|
|
2443
|
-
const n =
|
|
2442
|
+
(t, e) => {
|
|
2443
|
+
const n = le(Ee, t.__scopeDialog), r = j.useRef(null), o = St(e, n.contentRef, r);
|
|
2444
2444
|
return j.useEffect(() => {
|
|
2445
2445
|
const a = r.current;
|
|
2446
2446
|
if (a)
|
|
2447
2447
|
return Go(a);
|
|
2448
2448
|
}, []), /* @__PURE__ */ i(
|
|
2449
|
-
|
|
2449
|
+
qn,
|
|
2450
2450
|
{
|
|
2451
|
-
...
|
|
2451
|
+
...t,
|
|
2452
2452
|
ref: o,
|
|
2453
2453
|
trapFocus: n.open,
|
|
2454
2454
|
disableOutsidePointerEvents: !0,
|
|
2455
|
-
onCloseAutoFocus:
|
|
2455
|
+
onCloseAutoFocus: qe(t.onCloseAutoFocus, (a) => {
|
|
2456
2456
|
var l;
|
|
2457
2457
|
a.preventDefault(), (l = n.triggerRef.current) == null || l.focus();
|
|
2458
2458
|
}),
|
|
2459
|
-
onPointerDownOutside:
|
|
2459
|
+
onPointerDownOutside: qe(t.onPointerDownOutside, (a) => {
|
|
2460
2460
|
const l = a.detail.originalEvent, s = l.button === 0 && l.ctrlKey === !0;
|
|
2461
2461
|
(l.button === 2 || s) && a.preventDefault();
|
|
2462
2462
|
}),
|
|
2463
|
-
onFocusOutside:
|
|
2464
|
-
|
|
2463
|
+
onFocusOutside: qe(
|
|
2464
|
+
t.onFocusOutside,
|
|
2465
2465
|
(a) => a.preventDefault()
|
|
2466
2466
|
)
|
|
2467
2467
|
}
|
|
2468
2468
|
);
|
|
2469
2469
|
}
|
|
2470
2470
|
), _i = j.forwardRef(
|
|
2471
|
-
(
|
|
2472
|
-
const n =
|
|
2471
|
+
(t, e) => {
|
|
2472
|
+
const n = le(Ee, t.__scopeDialog), r = j.useRef(!1), o = j.useRef(!1);
|
|
2473
2473
|
return /* @__PURE__ */ i(
|
|
2474
|
-
|
|
2474
|
+
qn,
|
|
2475
2475
|
{
|
|
2476
|
-
...
|
|
2477
|
-
ref:
|
|
2476
|
+
...t,
|
|
2477
|
+
ref: e,
|
|
2478
2478
|
trapFocus: !1,
|
|
2479
2479
|
disableOutsidePointerEvents: !1,
|
|
2480
2480
|
onCloseAutoFocus: (a) => {
|
|
2481
2481
|
var l, s;
|
|
2482
|
-
(l =
|
|
2482
|
+
(l = t.onCloseAutoFocus) == null || l.call(t, a), a.defaultPrevented || (r.current || (s = n.triggerRef.current) == null || s.focus(), a.preventDefault()), r.current = !1, o.current = !1;
|
|
2483
2483
|
},
|
|
2484
2484
|
onInteractOutside: (a) => {
|
|
2485
2485
|
var d, f;
|
|
2486
|
-
(d =
|
|
2486
|
+
(d = t.onInteractOutside) == null || d.call(t, a), a.defaultPrevented || (r.current = !0, a.detail.originalEvent.type === "pointerdown" && (o.current = !0));
|
|
2487
2487
|
const l = a.target;
|
|
2488
2488
|
((f = n.triggerRef.current) == null ? void 0 : f.contains(l)) && a.preventDefault(), a.detail.originalEvent.type === "focusin" && o.current && a.preventDefault();
|
|
2489
2489
|
}
|
|
2490
2490
|
}
|
|
2491
2491
|
);
|
|
2492
2492
|
}
|
|
2493
|
-
),
|
|
2494
|
-
(
|
|
2495
|
-
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: a, ...l } =
|
|
2496
|
-
return ko(), /* @__PURE__ */ A(
|
|
2493
|
+
), qn = j.forwardRef(
|
|
2494
|
+
(t, e) => {
|
|
2495
|
+
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: a, ...l } = t, s = le(Ee, n), d = j.useRef(null), f = St(e, d);
|
|
2496
|
+
return ko(), /* @__PURE__ */ A(ie, { children: [
|
|
2497
2497
|
/* @__PURE__ */ i(
|
|
2498
2498
|
Ho,
|
|
2499
2499
|
{
|
|
@@ -2509,7 +2509,7 @@ var wi = j.forwardRef(
|
|
|
2509
2509
|
id: s.contentId,
|
|
2510
2510
|
"aria-describedby": s.descriptionId,
|
|
2511
2511
|
"aria-labelledby": s.titleId,
|
|
2512
|
-
"data-state":
|
|
2512
|
+
"data-state": Mt(s.open),
|
|
2513
2513
|
...l,
|
|
2514
2514
|
ref: f,
|
|
2515
2515
|
onDismiss: () => s.onOpenChange(!1)
|
|
@@ -2517,66 +2517,66 @@ var wi = j.forwardRef(
|
|
|
2517
2517
|
)
|
|
2518
2518
|
}
|
|
2519
2519
|
),
|
|
2520
|
-
/* @__PURE__ */ A(
|
|
2520
|
+
/* @__PURE__ */ A(ie, { children: [
|
|
2521
2521
|
/* @__PURE__ */ i(Ti, { titleId: s.titleId }),
|
|
2522
2522
|
/* @__PURE__ */ i(Pi, { contentRef: d, descriptionId: s.descriptionId })
|
|
2523
2523
|
] })
|
|
2524
2524
|
] });
|
|
2525
2525
|
}
|
|
2526
|
-
),
|
|
2527
|
-
(
|
|
2528
|
-
const { __scopeDialog: n, ...r } =
|
|
2529
|
-
return /* @__PURE__ */ i(
|
|
2526
|
+
), Ft = "DialogTitle", Un = j.forwardRef(
|
|
2527
|
+
(t, e) => {
|
|
2528
|
+
const { __scopeDialog: n, ...r } = t, o = le(Ft, n);
|
|
2529
|
+
return /* @__PURE__ */ i(Ze.h2, { id: o.titleId, ...r, ref: e });
|
|
2530
2530
|
}
|
|
2531
2531
|
);
|
|
2532
|
-
|
|
2533
|
-
var
|
|
2534
|
-
(
|
|
2535
|
-
const { __scopeDialog: n, ...r } =
|
|
2536
|
-
return /* @__PURE__ */ i(
|
|
2532
|
+
Un.displayName = Ft;
|
|
2533
|
+
var Vn = "DialogDescription", bi = j.forwardRef(
|
|
2534
|
+
(t, e) => {
|
|
2535
|
+
const { __scopeDialog: n, ...r } = t, o = le(Vn, n);
|
|
2536
|
+
return /* @__PURE__ */ i(Ze.p, { id: o.descriptionId, ...r, ref: e });
|
|
2537
2537
|
}
|
|
2538
2538
|
);
|
|
2539
|
-
bi.displayName =
|
|
2539
|
+
bi.displayName = Vn;
|
|
2540
2540
|
var Bn = "DialogClose", Zn = j.forwardRef(
|
|
2541
|
-
(
|
|
2542
|
-
const { __scopeDialog: n, ...r } =
|
|
2541
|
+
(t, e) => {
|
|
2542
|
+
const { __scopeDialog: n, ...r } = t, o = le(Bn, n);
|
|
2543
2543
|
return /* @__PURE__ */ i(
|
|
2544
|
-
|
|
2544
|
+
Ze.button,
|
|
2545
2545
|
{
|
|
2546
2546
|
type: "button",
|
|
2547
2547
|
...r,
|
|
2548
|
-
ref:
|
|
2549
|
-
onClick:
|
|
2548
|
+
ref: e,
|
|
2549
|
+
onClick: qe(t.onClick, () => o.onOpenChange(!1))
|
|
2550
2550
|
}
|
|
2551
2551
|
);
|
|
2552
2552
|
}
|
|
2553
2553
|
);
|
|
2554
2554
|
Zn.displayName = Bn;
|
|
2555
|
-
function
|
|
2556
|
-
return
|
|
2555
|
+
function Mt(t) {
|
|
2556
|
+
return t ? "open" : "closed";
|
|
2557
2557
|
}
|
|
2558
2558
|
var jn = "DialogTitleWarning", [nc, Kn] = Ao(jn, {
|
|
2559
|
-
contentName:
|
|
2560
|
-
titleName:
|
|
2559
|
+
contentName: Ee,
|
|
2560
|
+
titleName: Ft,
|
|
2561
2561
|
docsSlug: "dialog"
|
|
2562
|
-
}), Ti = ({ titleId:
|
|
2563
|
-
const
|
|
2562
|
+
}), Ti = ({ titleId: t }) => {
|
|
2563
|
+
const e = Kn(jn), n = `\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
2564
2564
|
|
|
2565
|
-
If you want to hide the \`${
|
|
2565
|
+
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
2566
2566
|
|
|
2567
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${
|
|
2567
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;
|
|
2568
2568
|
return j.useEffect(() => {
|
|
2569
|
-
|
|
2570
|
-
}, [n,
|
|
2571
|
-
}, Ci = "DialogDescriptionWarning", Pi = ({ contentRef:
|
|
2569
|
+
t && (document.getElementById(t) || console.error(n));
|
|
2570
|
+
}, [n, t]), null;
|
|
2571
|
+
}, Ci = "DialogDescriptionWarning", Pi = ({ contentRef: t, descriptionId: e }) => {
|
|
2572
2572
|
const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Kn(Ci).contentName}}.`;
|
|
2573
2573
|
return j.useEffect(() => {
|
|
2574
2574
|
var a;
|
|
2575
|
-
const o = (a =
|
|
2576
|
-
|
|
2577
|
-
}, [r,
|
|
2578
|
-
}, yi = Mn, Si = Hn, Ii = $n, xi = Gn, Ri =
|
|
2579
|
-
const
|
|
2575
|
+
const o = (a = t.current) == null ? void 0 : a.getAttribute("aria-describedby");
|
|
2576
|
+
e && o && (document.getElementById(e) || console.warn(r));
|
|
2577
|
+
}, [r, t, e]), null;
|
|
2578
|
+
}, yi = Mn, Si = Hn, Ii = $n, xi = Gn, Ri = Un, Li = Zn;
|
|
2579
|
+
const Le = {
|
|
2580
2580
|
"rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
|
|
2581
2581
|
"rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
|
|
2582
2582
|
"rp-document-dialog": "_rp-document-dialog_slqo7_13",
|
|
@@ -2585,8 +2585,8 @@ const Lt = {
|
|
|
2585
2585
|
"rp-dialog-close": "_rp-dialog-close_slqo7_47",
|
|
2586
2586
|
"rp-properties-divider": "_rp-properties-divider_slqo7_55"
|
|
2587
2587
|
}, Ni = () => {
|
|
2588
|
-
const { pdfProperties:
|
|
2589
|
-
if (!
|
|
2588
|
+
const { pdfProperties: t } = X(), { container: e } = se(), { activeDocumentProperties: n, setActiveDocumentProperties: r } = jo(), { localeMessages: o } = ce(), a = k(() => {
|
|
2589
|
+
if (!t)
|
|
2590
2590
|
return [];
|
|
2591
2591
|
const {
|
|
2592
2592
|
fileSize: l,
|
|
@@ -2601,7 +2601,7 @@ const Lt = {
|
|
|
2601
2601
|
pdfProducer: y,
|
|
2602
2602
|
pdfVersion: C,
|
|
2603
2603
|
pageCount: S
|
|
2604
|
-
} =
|
|
2604
|
+
} = t;
|
|
2605
2605
|
return [
|
|
2606
2606
|
{ label: o == null ? void 0 : o.propertiesFilenameLabel, value: s },
|
|
2607
2607
|
{ label: o == null ? void 0 : o.propertiesFileSizeLabel, value: l },
|
|
@@ -2613,64 +2613,64 @@ const Lt = {
|
|
|
2613
2613
|
{ label: o == null ? void 0 : o.propertiesCreatorLabel, value: h },
|
|
2614
2614
|
{
|
|
2615
2615
|
label: o == null ? void 0 : o.propertiesCreateOnLabel,
|
|
2616
|
-
value: b ? $
|
|
2616
|
+
value: b ? $t(b) : ""
|
|
2617
2617
|
},
|
|
2618
2618
|
{
|
|
2619
2619
|
label: o == null ? void 0 : o.propertiesModifiedOnLabel,
|
|
2620
|
-
value: T ? $
|
|
2620
|
+
value: T ? $t(T) : ""
|
|
2621
2621
|
},
|
|
2622
2622
|
{ separate: !0 },
|
|
2623
2623
|
{ label: o == null ? void 0 : o.propertiesPDFProducerLabel, value: y },
|
|
2624
2624
|
{ label: o == null ? void 0 : o.propertiesPDFVersionLabel, value: C },
|
|
2625
2625
|
{ label: o == null ? void 0 : o.propertiesPageCountLabel, value: S }
|
|
2626
2626
|
];
|
|
2627
|
-
}, [
|
|
2628
|
-
return /* @__PURE__ */ i(yi, { open: n, onOpenChange: r, children: /* @__PURE__ */ i(Si, { container:
|
|
2629
|
-
/* @__PURE__ */ i(Ii, { className:
|
|
2630
|
-
/* @__PURE__ */ A(xi, { className:
|
|
2631
|
-
/* @__PURE__ */ i(Ri, { className:
|
|
2632
|
-
/* @__PURE__ */ i("div", { className:
|
|
2633
|
-
/* @__PURE__ */ i(Li, { asChild: !0, className:
|
|
2627
|
+
}, [t, o]);
|
|
2628
|
+
return /* @__PURE__ */ i(yi, { open: n, onOpenChange: r, children: /* @__PURE__ */ i(Si, { container: e, children: /* @__PURE__ */ A("div", { className: Le["rp-dialog-wrapper"], children: [
|
|
2629
|
+
/* @__PURE__ */ i(Ii, { className: Le["rp-dialog-overlay"] }),
|
|
2630
|
+
/* @__PURE__ */ A(xi, { className: Le["rp-document-dialog"], children: [
|
|
2631
|
+
/* @__PURE__ */ i(Ri, { className: Le["rp-dialog-title"], children: o == null ? void 0 : o.documentPropertiesLabel }),
|
|
2632
|
+
/* @__PURE__ */ i("div", { className: Le["rp-document-properties"], children: a.map((l, s) => /* @__PURE__ */ i("div", { children: l.separate ? /* @__PURE__ */ i("div", { className: Le["rp-properties-divider"] }) : /* @__PURE__ */ i(Zo, { label: l.label, value: l.value }) }, s)) }),
|
|
2633
|
+
/* @__PURE__ */ i(Li, { asChild: !0, className: Le["rp-dialog-close"], children: /* @__PURE__ */ i(qo, {}) })
|
|
2634
2634
|
] })
|
|
2635
2635
|
] }) }) });
|
|
2636
2636
|
}, Ei = {
|
|
2637
2637
|
"rp-other-tool-content": "_rp-other-tool-content_su718_1"
|
|
2638
|
-
}, ln = ".pdf", Oi = (
|
|
2639
|
-
const n = await (await fetch(
|
|
2638
|
+
}, ln = ".pdf", Oi = (t) => URL.createObjectURL(t), zi = async (t) => {
|
|
2639
|
+
const n = await (await fetch(t)).blob();
|
|
2640
2640
|
return Oi(n);
|
|
2641
2641
|
}, Xn = () => {
|
|
2642
|
-
const { filename:
|
|
2642
|
+
const { filename: t, pdfSrc: e } = X(), { downloadFilename: n } = Io(), r = (a) => {
|
|
2643
2643
|
const l = n || a;
|
|
2644
2644
|
return l.endsWith(ln) ? l : `${l}${ln}`;
|
|
2645
2645
|
};
|
|
2646
2646
|
return { download: N(async () => {
|
|
2647
|
-
if (!
|
|
2647
|
+
if (!t || !e)
|
|
2648
2648
|
throw new Error("There is no PDF source to download");
|
|
2649
2649
|
const a = document.createElement("a");
|
|
2650
|
-
a.href = await zi(
|
|
2651
|
-
}, [
|
|
2650
|
+
a.href = await zi(e), a.download = r(t), document.body.appendChild(a), a.click(), document.body.removeChild(a);
|
|
2651
|
+
}, [t, e]) };
|
|
2652
2652
|
}, Yn = () => {
|
|
2653
|
-
const { downloadIcon:
|
|
2654
|
-
return
|
|
2655
|
-
}, Jn = ({ children:
|
|
2653
|
+
const { downloadIcon: t } = he(), { downloadIcon: e } = fe();
|
|
2654
|
+
return t || e || /* @__PURE__ */ i(Qo, {});
|
|
2655
|
+
}, Jn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(Z, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }), Di = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(Jn, { localeMessages: e, children: /* @__PURE__ */ i(oe, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ i(Yn, {}) }) }), Ai = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(Ce, { onClick: t, children: /* @__PURE__ */ A(Jn, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2656
2656
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Yn, {}) }),
|
|
2657
|
-
|
|
2657
|
+
e == null ? void 0 : e.downloadFileLabel
|
|
2658
2658
|
] }) }), Qn = () => {
|
|
2659
|
-
const { download:
|
|
2660
|
-
return !
|
|
2661
|
-
},
|
|
2662
|
-
const { printIcon:
|
|
2663
|
-
return
|
|
2664
|
-
},
|
|
2665
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2666
|
-
|
|
2659
|
+
const { download: t } = Xn(), { downloadTool: e = !0 } = me(), { downloadTool: n = !0 } = ye(), { isSmallScreen: r } = Pe(), { localeMessages: o } = ce(), a = o == null ? void 0 : o.downloadFileTooltip;
|
|
2660
|
+
return !e || !n ? null : r ? /* @__PURE__ */ i(Ai, { download: t, localeMessages: o }) : typeof e == "function" ? /* @__PURE__ */ i(Z, { content: a, children: /* @__PURE__ */ i(e, { download: t }) }) : typeof n == "function" ? /* @__PURE__ */ i(Z, { content: a, children: /* @__PURE__ */ i(n, { download: t }) }) : /* @__PURE__ */ i(Di, { download: t, localeMessages: o });
|
|
2661
|
+
}, eo = () => {
|
|
2662
|
+
const { printIcon: t } = he(), { printIcon: e } = fe();
|
|
2663
|
+
return t || e || /* @__PURE__ */ i(er, {});
|
|
2664
|
+
}, to = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(Z, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }), Fi = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(to, { localeMessages: e, children: /* @__PURE__ */ i(oe, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ i(eo, {}) }) }), Mi = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(Ce, { onClick: t, children: /* @__PURE__ */ A(to, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2665
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(eo, {}) }),
|
|
2666
|
+
e == null ? void 0 : e.printLabel
|
|
2667
2667
|
] }) }), no = () => {
|
|
2668
|
-
const { print:
|
|
2669
|
-
return !l || !s ? null : d ? /* @__PURE__ */ i(Mi, { print:
|
|
2668
|
+
const { print: t, cancel: e, setOnProgress: n, setOnComplete: r, setOnError: o, progress: a } = je(), { printTool: l = !0 } = me(), { printTool: s = !0 } = ye(), { isSmallScreen: d } = Pe(), { localeMessages: f } = ce(), u = f == null ? void 0 : f.printTooltip;
|
|
2669
|
+
return !l || !s ? null : d ? /* @__PURE__ */ i(Mi, { print: t, localeMessages: f }) : typeof l == "function" ? /* @__PURE__ */ i(Z, { content: u, children: /* @__PURE__ */ i(
|
|
2670
2670
|
l,
|
|
2671
2671
|
{
|
|
2672
|
-
print:
|
|
2673
|
-
cancel:
|
|
2672
|
+
print: t,
|
|
2673
|
+
cancel: e,
|
|
2674
2674
|
setOnProgress: n,
|
|
2675
2675
|
setOnError: o,
|
|
2676
2676
|
setOnComplete: r,
|
|
@@ -2679,41 +2679,41 @@ const Lt = {
|
|
|
2679
2679
|
) }) : typeof s == "function" ? /* @__PURE__ */ i(Z, { content: u, children: /* @__PURE__ */ i(
|
|
2680
2680
|
s,
|
|
2681
2681
|
{
|
|
2682
|
-
print:
|
|
2683
|
-
cancel:
|
|
2682
|
+
print: t,
|
|
2683
|
+
cancel: e,
|
|
2684
2684
|
setOnProgress: n,
|
|
2685
2685
|
setOnError: o,
|
|
2686
2686
|
setOnComplete: r,
|
|
2687
2687
|
progress: a
|
|
2688
2688
|
}
|
|
2689
|
-
) }) : /* @__PURE__ */ i(Fi, { print:
|
|
2689
|
+
) }) : /* @__PURE__ */ i(Fi, { print: t, localeMessages: f });
|
|
2690
2690
|
}, Wi = {
|
|
2691
2691
|
"rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
|
|
2692
2692
|
}, ki = () => {
|
|
2693
|
-
const { goToFirstPageIcon:
|
|
2694
|
-
return
|
|
2693
|
+
const { goToFirstPageIcon: t } = he(), { goToFirstPageIcon: e } = fe();
|
|
2694
|
+
return t || e || /* @__PURE__ */ i(In, { className: Wi["rp-go-to-Top"] });
|
|
2695
2695
|
}, Hi = () => {
|
|
2696
|
-
const { goToLastPageIcon:
|
|
2697
|
-
return
|
|
2696
|
+
const { goToLastPageIcon: t } = he(), { goToLastPageIcon: e } = fe();
|
|
2697
|
+
return t || e || /* @__PURE__ */ i(In, {});
|
|
2698
2698
|
}, dn = { width: "100%" }, $i = () => {
|
|
2699
|
-
const { goToPage:
|
|
2700
|
-
|
|
2701
|
-
}, [
|
|
2702
|
-
e
|
|
2703
|
-
}, [
|
|
2704
|
-
return !r || !o ? null : /* @__PURE__ */ A(
|
|
2705
|
-
/* @__PURE__ */ i(
|
|
2699
|
+
const { goToPage: t, totalPages: e, focusedPage: n } = ae(), { jumpNavigationTool: r = !0 } = me(), { jumpNavigationTool: o = !0 } = ye(), { localeMessages: a } = ce(), l = k(() => n === 1, [n]), s = k(() => n === e, [n, e]), d = N(() => {
|
|
2700
|
+
t(1);
|
|
2701
|
+
}, [t]), f = N(() => {
|
|
2702
|
+
t(e);
|
|
2703
|
+
}, [t, e]);
|
|
2704
|
+
return !r || !o ? null : /* @__PURE__ */ A(Qe, { children: [
|
|
2705
|
+
/* @__PURE__ */ i(Ce, { onClick: d, children: /* @__PURE__ */ i(Z, { content: a == null ? void 0 : a.firstPageTooltip, style: dn, children: /* @__PURE__ */ A("div", { className: "rp-menu-item", "aria-disabled": l, children: [
|
|
2706
2706
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(ki, {}) }),
|
|
2707
2707
|
/* @__PURE__ */ i("span", { children: a == null ? void 0 : a.firstPageLabel })
|
|
2708
2708
|
] }) }) }),
|
|
2709
|
-
/* @__PURE__ */ i(
|
|
2709
|
+
/* @__PURE__ */ i(Ce, { onClick: f, children: /* @__PURE__ */ i(Z, { content: a == null ? void 0 : a.lastPageTooltip, style: dn, children: /* @__PURE__ */ A("div", { className: "rp-menu-item", "aria-disabled": s, children: [
|
|
2710
2710
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Hi, {}) }),
|
|
2711
2711
|
/* @__PURE__ */ i("span", { children: a == null ? void 0 : a.lastPageLabel })
|
|
2712
2712
|
] }) }) }),
|
|
2713
|
-
/* @__PURE__ */ i(
|
|
2713
|
+
/* @__PURE__ */ i(Rt, {})
|
|
2714
2714
|
] });
|
|
2715
2715
|
}, Gi = () => {
|
|
2716
|
-
const { container:
|
|
2716
|
+
const { container: t, pagesRef: e } = se(), { isSmallScreen: n } = Pe(), {
|
|
2717
2717
|
openFileTool: r,
|
|
2718
2718
|
downloadTool: o,
|
|
2719
2719
|
documentProperties: a,
|
|
@@ -2724,7 +2724,7 @@ const Lt = {
|
|
|
2724
2724
|
printTool: u,
|
|
2725
2725
|
fullscreenTool: b,
|
|
2726
2726
|
viewModeTool: h
|
|
2727
|
-
} =
|
|
2727
|
+
} = me(), {
|
|
2728
2728
|
openFileTool: g,
|
|
2729
2729
|
downloadTool: T,
|
|
2730
2730
|
documentProperties: y,
|
|
@@ -2735,7 +2735,7 @@ const Lt = {
|
|
|
2735
2735
|
printTool: m,
|
|
2736
2736
|
fullscreenTool: c,
|
|
2737
2737
|
viewModeTool: _
|
|
2738
|
-
} =
|
|
2738
|
+
} = ye(), { localeMessages: v } = ce(), [P, R] = G(0), I = $(
|
|
2739
2739
|
new ResizeObserver((D) => {
|
|
2740
2740
|
R(D[0].contentRect.height);
|
|
2741
2741
|
})
|
|
@@ -2762,14 +2762,14 @@ const Lt = {
|
|
|
2762
2762
|
p,
|
|
2763
2763
|
n
|
|
2764
2764
|
]);
|
|
2765
|
-
return W(() => (
|
|
2765
|
+
return W(() => (e && I.current.observe(e), () => {
|
|
2766
2766
|
I.current.disconnect();
|
|
2767
|
-
}), [
|
|
2767
|
+
}), [e]), !x || !O ? null : /* @__PURE__ */ A(ie, { children: [
|
|
2768
2768
|
/* @__PURE__ */ i(
|
|
2769
2769
|
Tn,
|
|
2770
2770
|
{
|
|
2771
|
-
container:
|
|
2772
|
-
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(Z, { content: v == null ? void 0 : v.moreOptionTooltip, children: /* @__PURE__ */ i(
|
|
2771
|
+
container: t,
|
|
2772
|
+
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(Z, { content: v == null ? void 0 : v.moreOptionTooltip, children: /* @__PURE__ */ i(oe, { "aria-label": v == null ? void 0 : v.moreOptionTooltip, children: /* @__PURE__ */ i(Oo, {}) }) }) }),
|
|
2773
2773
|
side: "bottom",
|
|
2774
2774
|
avoidCollisions: !1,
|
|
2775
2775
|
children: /* @__PURE__ */ A(
|
|
@@ -2779,16 +2779,16 @@ const Lt = {
|
|
|
2779
2779
|
className: Ei["rp-other-tool-content"],
|
|
2780
2780
|
"data-rp": "moreOptionsDropdown",
|
|
2781
2781
|
children: [
|
|
2782
|
-
n && /* @__PURE__ */ A(
|
|
2782
|
+
n && /* @__PURE__ */ A(Qe, { children: [
|
|
2783
2783
|
/* @__PURE__ */ i(bn, {}),
|
|
2784
2784
|
/* @__PURE__ */ i(Qn, {}),
|
|
2785
2785
|
/* @__PURE__ */ i(no, {}),
|
|
2786
2786
|
/* @__PURE__ */ i(Sn, {}),
|
|
2787
|
-
/* @__PURE__ */ i(
|
|
2787
|
+
/* @__PURE__ */ i(Rt, {})
|
|
2788
2788
|
] }),
|
|
2789
2789
|
/* @__PURE__ */ i($i, {}),
|
|
2790
2790
|
/* @__PURE__ */ i(Ko, {}),
|
|
2791
|
-
/* @__PURE__ */ i(
|
|
2791
|
+
/* @__PURE__ */ i(tr, {}),
|
|
2792
2792
|
/* @__PURE__ */ i(Yo, {}),
|
|
2793
2793
|
/* @__PURE__ */ i(Jo, {}),
|
|
2794
2794
|
/* @__PURE__ */ i(Xo, {})
|
|
@@ -2799,11 +2799,11 @@ const Lt = {
|
|
|
2799
2799
|
),
|
|
2800
2800
|
/* @__PURE__ */ i(Ni, {})
|
|
2801
2801
|
] });
|
|
2802
|
-
},
|
|
2803
|
-
const { isSmallScreen:
|
|
2804
|
-
return /* @__PURE__ */ A(
|
|
2802
|
+
}, qi = () => {
|
|
2803
|
+
const { isSmallScreen: t } = Pe();
|
|
2804
|
+
return /* @__PURE__ */ A(ie, { children: [
|
|
2805
2805
|
/* @__PURE__ */ i(Eo, {}),
|
|
2806
|
-
!
|
|
2806
|
+
!t && /* @__PURE__ */ A(ie, { children: [
|
|
2807
2807
|
/* @__PURE__ */ i(bn, {}),
|
|
2808
2808
|
/* @__PURE__ */ i(Qn, {}),
|
|
2809
2809
|
/* @__PURE__ */ i(no, {}),
|
|
@@ -2811,40 +2811,40 @@ const Lt = {
|
|
|
2811
2811
|
] }),
|
|
2812
2812
|
/* @__PURE__ */ i(Gi, {})
|
|
2813
2813
|
] });
|
|
2814
|
-
},
|
|
2814
|
+
}, Ae = {
|
|
2815
2815
|
"rp-zoom-wrapper": "_rp-zoom-wrapper_1113m_1",
|
|
2816
2816
|
"rp-current-zoom-wrapper": "_rp-current-zoom-wrapper_1113m_6",
|
|
2817
2817
|
"rp-current-zoom-icon": "_rp-current-zoom-icon_1113m_11",
|
|
2818
2818
|
"rp-zoom-level-icon": "_rp-zoom-level-icon_1113m_16",
|
|
2819
2819
|
"rp-current-zoom-text": "_rp-current-zoom-text_1113m_20",
|
|
2820
2820
|
"rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_1113m_24"
|
|
2821
|
-
},
|
|
2822
|
-
const { zoomInIcon:
|
|
2823
|
-
return
|
|
2821
|
+
}, Ui = 25, wt = 1e3, Vi = [50, 75, 100, 125, 150, 200, 300, 400], Bi = () => {
|
|
2822
|
+
const { zoomInIcon: t } = he(), { zoomInIcon: e } = fe();
|
|
2823
|
+
return t || e || /* @__PURE__ */ i(nr, {});
|
|
2824
2824
|
}, Zi = () => {
|
|
2825
|
-
const { zoomOutIcon:
|
|
2826
|
-
return
|
|
2825
|
+
const { zoomOutIcon: t } = he(), { zoomOutIcon: e } = fe();
|
|
2826
|
+
return t || e || /* @__PURE__ */ i(or, {});
|
|
2827
2827
|
}, ji = () => {
|
|
2828
|
-
const { zoomLevel:
|
|
2828
|
+
const { zoomLevel: t, setZoomLevel: e } = ot(), { container: n, pagesRef: r } = se(), { zoomTool: o = !0 } = me(), { zoomTool: a = !0 } = ye(), { focusedPage: l } = ae(), { pageRotate: s } = Be(), { pages: d } = X(), { isSmallScreen: f } = Pe(), { localeMessages: u } = ce(), { viewMode: b } = ze(), [h, g] = G(0), T = $(
|
|
2829
2829
|
new ResizeObserver((_) => {
|
|
2830
2830
|
g(_[0].contentRect.height);
|
|
2831
2831
|
})
|
|
2832
2832
|
), y = N(() => {
|
|
2833
|
-
|
|
2833
|
+
e((_) => {
|
|
2834
2834
|
const v = Math.floor(_ / 25) * 25;
|
|
2835
|
-
return Math.min(v + 25,
|
|
2835
|
+
return Math.min(v + 25, wt);
|
|
2836
2836
|
});
|
|
2837
|
-
}, [
|
|
2838
|
-
|
|
2837
|
+
}, [e]), C = N(() => {
|
|
2838
|
+
e((_) => {
|
|
2839
2839
|
const v = Math.ceil(_ / 25) * 25;
|
|
2840
|
-
return Math.min(v - 25,
|
|
2840
|
+
return Math.min(v - 25, wt);
|
|
2841
2841
|
});
|
|
2842
|
-
}, [
|
|
2842
|
+
}, [e]), S = k(() => t <= Ui, [t]), w = k(() => t >= wt, [t]), p = k(() => {
|
|
2843
2843
|
const _ = d.get(l);
|
|
2844
2844
|
return _ ? _.page.getViewport({ scale: 1, rotation: s[l] }) : null;
|
|
2845
2845
|
}, [d, l, s]), m = N(
|
|
2846
2846
|
(_) => {
|
|
2847
|
-
const v = ((p == null ? void 0 : p.width) || 0) + 2 *
|
|
2847
|
+
const v = ((p == null ? void 0 : p.width) || 0) + 2 * Ut, P = ((p == null ? void 0 : p.height) || 0) + 2 * Ut, R = (r == null ? void 0 : r.clientWidth) || 0, I = (r == null ? void 0 : r.clientHeight) || 0, x = rr(
|
|
2848
2848
|
_,
|
|
2849
2849
|
R,
|
|
2850
2850
|
I,
|
|
@@ -2852,20 +2852,20 @@ const Lt = {
|
|
|
2852
2852
|
P,
|
|
2853
2853
|
b
|
|
2854
2854
|
);
|
|
2855
|
-
|
|
2855
|
+
e(x);
|
|
2856
2856
|
},
|
|
2857
|
-
[
|
|
2857
|
+
[e, p, r]
|
|
2858
2858
|
), c = N(
|
|
2859
2859
|
(_) => {
|
|
2860
|
-
typeof _ == "number" ?
|
|
2860
|
+
typeof _ == "number" ? e(_) : m(_);
|
|
2861
2861
|
},
|
|
2862
|
-
[
|
|
2862
|
+
[e, m]
|
|
2863
2863
|
);
|
|
2864
2864
|
return W(() => (r && T.current.observe(r), () => {
|
|
2865
2865
|
T.current.disconnect();
|
|
2866
|
-
}), [r]), !o || !a ? null : typeof o == "function" ? /* @__PURE__ */ i(o, { zoomLevel:
|
|
2866
|
+
}), [r]), !o || !a ? null : typeof o == "function" ? /* @__PURE__ */ i(o, { zoomLevel: t, setZoomLevel: e }) : typeof a == "function" ? /* @__PURE__ */ i(a, { zoomLevel: t, setZoomLevel: e }) : /* @__PURE__ */ A("div", { className: Ae["rp-zoom-wrapper"], children: [
|
|
2867
2867
|
/* @__PURE__ */ i(Z, { content: u == null ? void 0 : u.zoomOutTooltip, children: /* @__PURE__ */ i(
|
|
2868
|
-
|
|
2868
|
+
oe,
|
|
2869
2869
|
{
|
|
2870
2870
|
disabled: S,
|
|
2871
2871
|
onClick: C,
|
|
@@ -2878,14 +2878,14 @@ const Lt = {
|
|
|
2878
2878
|
{
|
|
2879
2879
|
container: n,
|
|
2880
2880
|
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(Z, { content: u == null ? void 0 : u.zoomSelectTooltip, children: /* @__PURE__ */ A(
|
|
2881
|
-
|
|
2881
|
+
oe,
|
|
2882
2882
|
{
|
|
2883
|
-
className:
|
|
2883
|
+
className: Ae["rp-current-zoom-wrapper"],
|
|
2884
2884
|
"aria-label": u == null ? void 0 : u.zoomSelectTooltip,
|
|
2885
2885
|
children: [
|
|
2886
|
-
/* @__PURE__ */ i("span", { className:
|
|
2887
|
-
/* @__PURE__ */ i("span", { className:
|
|
2888
|
-
/* @__PURE__ */ i(
|
|
2886
|
+
/* @__PURE__ */ i("span", { className: Ae["rp-current-zoom-text"], children: t }),
|
|
2887
|
+
/* @__PURE__ */ i("span", { className: Ae["rp-current-zoom-text"], children: "%" }),
|
|
2888
|
+
/* @__PURE__ */ i(Ue, { className: Ae["rp-current-zoom-icon"] })
|
|
2889
2889
|
]
|
|
2890
2890
|
}
|
|
2891
2891
|
) }) }),
|
|
@@ -2897,15 +2897,15 @@ const Lt = {
|
|
|
2897
2897
|
"div",
|
|
2898
2898
|
{
|
|
2899
2899
|
style: { maxHeight: `${h}px`, overflow: "auto" },
|
|
2900
|
-
className:
|
|
2900
|
+
className: Ae["rp-zoom-dropdown-content"],
|
|
2901
2901
|
children: [
|
|
2902
|
-
/* @__PURE__ */ A(
|
|
2903
|
-
/* @__PURE__ */ i(
|
|
2904
|
-
/* @__PURE__ */ i(
|
|
2905
|
-
/* @__PURE__ */ i(
|
|
2902
|
+
/* @__PURE__ */ A(Qe, { children: [
|
|
2903
|
+
/* @__PURE__ */ i(Ce, { onClick: () => c(lt.ACTUAL), children: u == null ? void 0 : u.zoomActualSize }),
|
|
2904
|
+
/* @__PURE__ */ i(Ce, { onClick: () => c(lt.PAGE_FIT), children: u == null ? void 0 : u.zoomPageFit }),
|
|
2905
|
+
/* @__PURE__ */ i(Ce, { onClick: () => c(lt.PAGE_WIDTH), children: u == null ? void 0 : u.zoomPageWidth })
|
|
2906
2906
|
] }),
|
|
2907
|
-
/* @__PURE__ */ i(
|
|
2908
|
-
/* @__PURE__ */ i(
|
|
2907
|
+
/* @__PURE__ */ i(Rt, {}),
|
|
2908
|
+
/* @__PURE__ */ i(Qe, { children: Vi.map((_) => /* @__PURE__ */ A(Ce, { onClick: () => c(_), children: [
|
|
2909
2909
|
_,
|
|
2910
2910
|
" %"
|
|
2911
2911
|
] }, _)) })
|
|
@@ -2915,7 +2915,7 @@ const Lt = {
|
|
|
2915
2915
|
}
|
|
2916
2916
|
),
|
|
2917
2917
|
/* @__PURE__ */ i(Z, { content: u == null ? void 0 : u.zoomInTooltip, children: /* @__PURE__ */ i(
|
|
2918
|
-
|
|
2918
|
+
oe,
|
|
2919
2919
|
{
|
|
2920
2920
|
disabled: w,
|
|
2921
2921
|
onClick: y,
|
|
@@ -2926,32 +2926,32 @@ const Lt = {
|
|
|
2926
2926
|
] });
|
|
2927
2927
|
}, un = () => {
|
|
2928
2928
|
const {
|
|
2929
|
-
totalMatches:
|
|
2930
|
-
nextMatch:
|
|
2929
|
+
totalMatches: t,
|
|
2930
|
+
nextMatch: e,
|
|
2931
2931
|
prevMatch: n
|
|
2932
|
-
} =
|
|
2933
|
-
return /* @__PURE__ */ A(
|
|
2934
|
-
/* @__PURE__ */ i(Z, { content: r == null ? void 0 : r.searchPrevTooltip, className: Q["rp-search-tool-result-navigator"], children: /* @__PURE__ */ i(
|
|
2935
|
-
|
|
2932
|
+
} = Et(), { localeMessages: r } = ce();
|
|
2933
|
+
return /* @__PURE__ */ A(ie, { children: [
|
|
2934
|
+
/* @__PURE__ */ i(Z, { content: r == null ? void 0 : r.searchPrevTooltip, className: Q["rp-search-tool-result-navigator"], children: /* @__PURE__ */ i(oe, { onClick: n, "aria-label": r == null ? void 0 : r.searchPrevTooltip, children: /* @__PURE__ */ i(
|
|
2935
|
+
Ue,
|
|
2936
2936
|
{
|
|
2937
2937
|
className: Q["rp-search-tool-input-icon"],
|
|
2938
|
-
"aria-disabled": !
|
|
2938
|
+
"aria-disabled": !t
|
|
2939
2939
|
}
|
|
2940
2940
|
) }) }),
|
|
2941
|
-
/* @__PURE__ */ i(Z, { content: r == null ? void 0 : r.searchNextTooltip, className: Q["rp-search-tool-result-navigator"], children: /* @__PURE__ */ i(
|
|
2942
|
-
|
|
2941
|
+
/* @__PURE__ */ i(Z, { content: r == null ? void 0 : r.searchNextTooltip, className: Q["rp-search-tool-result-navigator"], children: /* @__PURE__ */ i(oe, { onClick: e, "aria-label": r == null ? void 0 : r.searchNextTooltip, children: /* @__PURE__ */ i(
|
|
2942
|
+
Ue,
|
|
2943
2943
|
{
|
|
2944
2944
|
style: { transform: "rotate(180deg" },
|
|
2945
2945
|
className: Q["rp-search-tool-input-icon"],
|
|
2946
|
-
"aria-disabled": !
|
|
2946
|
+
"aria-disabled": !t
|
|
2947
2947
|
}
|
|
2948
2948
|
) }) })
|
|
2949
2949
|
] });
|
|
2950
2950
|
}, Ki = () => {
|
|
2951
|
-
const { searchIcon:
|
|
2952
|
-
return
|
|
2953
|
-
}, Xi = ({ icon:
|
|
2954
|
-
const { container:
|
|
2951
|
+
const { searchIcon: t } = he(), { searchIcon: e } = fe();
|
|
2952
|
+
return t || e || /* @__PURE__ */ i(xn, {});
|
|
2953
|
+
}, Xi = ({ icon: t }) => {
|
|
2954
|
+
const { container: e } = se(), [n, r] = G(!1), { pdf: o } = X(), [a, l] = G(null), {
|
|
2955
2955
|
searchOptions: s,
|
|
2956
2956
|
setSearchOptions: d,
|
|
2957
2957
|
loading: f,
|
|
@@ -2961,13 +2961,13 @@ const Lt = {
|
|
|
2961
2961
|
nextMatch: g,
|
|
2962
2962
|
prevMatch: T,
|
|
2963
2963
|
search: y
|
|
2964
|
-
} =
|
|
2964
|
+
} = Et(), { searchTool: C = !0 } = me(), { searchTool: S = !0 } = ye(), [w, p] = G(y), { localeMessages: m } = ce(), { isSmallScreen: c } = Pe(), _ = N(() => {
|
|
2965
2965
|
r(!0);
|
|
2966
2966
|
}, []), v = N(() => {
|
|
2967
2967
|
u(""), p(""), r(!1);
|
|
2968
2968
|
}, [u]), P = (z) => {
|
|
2969
|
-
const H = z.key === "Enter",
|
|
2970
|
-
(H ||
|
|
2969
|
+
const H = z.key === "Enter", V = z.key === " ";
|
|
2970
|
+
(H || V) && v();
|
|
2971
2971
|
}, R = N(
|
|
2972
2972
|
(z) => {
|
|
2973
2973
|
z.key === "Escape" && n && v();
|
|
@@ -3001,12 +3001,12 @@ const Lt = {
|
|
|
3001
3001
|
);
|
|
3002
3002
|
return W(() => {
|
|
3003
3003
|
v();
|
|
3004
|
-
}, [o, v]), !C || !S ? null : /* @__PURE__ */ i(
|
|
3004
|
+
}, [o, v]), !C || !S ? null : /* @__PURE__ */ i(ie, { children: /* @__PURE__ */ i(
|
|
3005
3005
|
Bo,
|
|
3006
3006
|
{
|
|
3007
3007
|
open: n,
|
|
3008
|
-
container:
|
|
3009
|
-
triggerComponent: /* @__PURE__ */ i(Z, { content: m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ i(
|
|
3008
|
+
container: e,
|
|
3009
|
+
triggerComponent: /* @__PURE__ */ i(Z, { content: m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ i(oe, { onClick: _, "aria-label": m == null ? void 0 : m.searchButtonTooltip, children: t || /* @__PURE__ */ i(Ki, {}) }) }),
|
|
3010
3010
|
children: /* @__PURE__ */ A("div", { className: Q["rp-search-tool-content"], children: [
|
|
3011
3011
|
/* @__PURE__ */ A("div", { className: Q["rp-search-tool-input-wrapper"], children: [
|
|
3012
3012
|
/* @__PURE__ */ A("div", { className: Q["rp-search-tool-input"], children: [
|
|
@@ -3023,25 +3023,25 @@ const Lt = {
|
|
|
3023
3023
|
children: !!w && /* @__PURE__ */ i("span", { className: Q["rp-search-tool-input-clear"], onClick: O, children: /* @__PURE__ */ i(ir, {}) })
|
|
3024
3024
|
}
|
|
3025
3025
|
) }),
|
|
3026
|
-
f ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(
|
|
3027
|
-
c && /* @__PURE__ */ i("div", { className: Q["rp-search-tool-controls"], children: /* @__PURE__ */ i(
|
|
3026
|
+
f ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(xt, { className: Q["rp-search-loader-icon"] }) }) : /* @__PURE__ */ i("span", { children: D }),
|
|
3027
|
+
c && /* @__PURE__ */ i("div", { className: Q["rp-search-tool-controls"], children: /* @__PURE__ */ i(Gt, { onKeyPress: P, handleClose: v }) })
|
|
3028
3028
|
] }),
|
|
3029
3029
|
/* @__PURE__ */ A("div", { className: Q["rp-search-tool-input-checkboxes"], children: [
|
|
3030
3030
|
c && /* @__PURE__ */ i(un, {}),
|
|
3031
|
-
/* @__PURE__ */ i(
|
|
3032
|
-
!c && /* @__PURE__ */ i(Z, { content: m == null ? void 0 : m.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: Q["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(
|
|
3033
|
-
/* @__PURE__ */ i(
|
|
3034
|
-
!c && /* @__PURE__ */ i(Z, { content: m == null ? void 0 : m.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { className: Q["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(
|
|
3031
|
+
/* @__PURE__ */ i(qt, { name: "matchCase", value: L, onChange: E, children: m == null ? void 0 : m.searchMatchCaseLabel }),
|
|
3032
|
+
!c && /* @__PURE__ */ i(Z, { content: m == null ? void 0 : m.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: Q["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Vt, {}) }) }),
|
|
3033
|
+
/* @__PURE__ */ i(qt, { name: "wholeWord", value: M, onChange: F, children: m == null ? void 0 : m.searchWholeWordsLabel }),
|
|
3034
|
+
!c && /* @__PURE__ */ i(Z, { content: m == null ? void 0 : m.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { className: Q["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Vt, {}) }) })
|
|
3035
3035
|
] })
|
|
3036
3036
|
] }),
|
|
3037
3037
|
!c && /* @__PURE__ */ A("div", { className: Q["rp-search-tool-controls"], children: [
|
|
3038
3038
|
/* @__PURE__ */ i(un, {}),
|
|
3039
|
-
/* @__PURE__ */ i(
|
|
3039
|
+
/* @__PURE__ */ i(Gt, { onKeyPress: P, handleClose: v })
|
|
3040
3040
|
] })
|
|
3041
3041
|
] })
|
|
3042
3042
|
}
|
|
3043
3043
|
) });
|
|
3044
|
-
}, Yi = "_loading_wazy2_1",
|
|
3044
|
+
}, Yi = "_loading_wazy2_1", Fe = {
|
|
3045
3045
|
"rp-loading-overlay": "_rp-loading-overlay_wazy2_1",
|
|
3046
3046
|
"rp-loading-modal": "_rp-loading-modal_wazy2_14",
|
|
3047
3047
|
"rp-loading-title": "_rp-loading-title_wazy2_27",
|
|
@@ -3049,51 +3049,51 @@ const Lt = {
|
|
|
3049
3049
|
"rp-loading-progress": "_rp-loading-progress_wazy2_35",
|
|
3050
3050
|
"rp-loading-cancel-button": "_rp-loading-cancel-button_wazy2_55",
|
|
3051
3051
|
loading: Yi
|
|
3052
|
-
}, oo = ({ percentage:
|
|
3053
|
-
const { cancel:
|
|
3054
|
-
return
|
|
3055
|
-
/* @__PURE__ */ A("div", { className:
|
|
3052
|
+
}, oo = ({ percentage: t }) => {
|
|
3053
|
+
const { cancel: e } = je(), { localeMessages: n } = ce();
|
|
3054
|
+
return t < 1 ? null : /* @__PURE__ */ i("div", { className: ne(Fe["rp-loading-overlay"]), children: /* @__PURE__ */ A("div", { className: ne(Fe["rp-loading-modal"]), children: [
|
|
3055
|
+
/* @__PURE__ */ A("div", { className: ne(Fe["rp-loading-title"]), children: [
|
|
3056
3056
|
n == null ? void 0 : n.printLoadingMessage,
|
|
3057
3057
|
"..."
|
|
3058
3058
|
] }),
|
|
3059
|
-
/* @__PURE__ */ i("div", { className:
|
|
3059
|
+
/* @__PURE__ */ i("div", { className: ne(Fe["rp-loading-progress-bar"]), children: /* @__PURE__ */ i(
|
|
3060
3060
|
"div",
|
|
3061
3061
|
{
|
|
3062
|
-
className:
|
|
3063
|
-
style: { width: `${
|
|
3062
|
+
className: ne(Fe["rp-loading-progress"]),
|
|
3063
|
+
style: { width: `${t}%` }
|
|
3064
3064
|
}
|
|
3065
3065
|
) }),
|
|
3066
|
-
/* @__PURE__ */ i("button", { className:
|
|
3066
|
+
/* @__PURE__ */ i("button", { className: ne(Fe["rp-loading-cancel-button"]), onClick: e, children: n == null ? void 0 : n.printCancelLabel })
|
|
3067
3067
|
] }) });
|
|
3068
|
-
}, Ji =
|
|
3069
|
-
const { showPrintProgress: n = !0 } =
|
|
3068
|
+
}, Ji = ke((t, e) => {
|
|
3069
|
+
const { showPrintProgress: n = !0 } = me(), { showPrintProgress: r = !0 } = ye(), { progress: o } = je(), { isSmallScreen: a } = Pe(), { percentage: l } = o || {}, s = () => a ? { gridTemplateColumns: "25% 60% 15%" } : void 0, d = () => {
|
|
3070
3070
|
if (!(!n || !r || !l))
|
|
3071
3071
|
return /* @__PURE__ */ i(oo, { percentage: l });
|
|
3072
3072
|
};
|
|
3073
3073
|
return /* @__PURE__ */ A("div", { children: [
|
|
3074
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBar", ref:
|
|
3075
|
-
/* @__PURE__ */ A("div", { "data-rp": "topBarLeft", className: $
|
|
3074
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBar", ref: e, className: $e["rp-toolbar-content"], children: /* @__PURE__ */ A("div", { className: $e["rp-toolbar-wrapper"], style: s(), children: [
|
|
3075
|
+
/* @__PURE__ */ A("div", { "data-rp": "topBarLeft", className: $e["rp-toolbar-start"], children: [
|
|
3076
3076
|
/* @__PURE__ */ i(Xi, {}),
|
|
3077
3077
|
/* @__PURE__ */ i(hi, {})
|
|
3078
3078
|
] }),
|
|
3079
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: $
|
|
3080
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: $
|
|
3079
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: $e["rp-toolbar-middle"], children: /* @__PURE__ */ i(ji, {}) }),
|
|
3080
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: $e["rp-toolbar-end"], children: /* @__PURE__ */ i(qi, {}) })
|
|
3081
3081
|
] }) }),
|
|
3082
3082
|
/* @__PURE__ */ i(d, {})
|
|
3083
3083
|
] });
|
|
3084
|
-
}),
|
|
3084
|
+
}), _t = {
|
|
3085
3085
|
"rp-sidebar-content-wrapper": "_rp-sidebar-content-wrapper_1sdl6_1",
|
|
3086
3086
|
"rp-sidebar-content": "_rp-sidebar-content_1sdl6_1",
|
|
3087
3087
|
"rp-thumbnails-wrapper": "_rp-thumbnails-wrapper_1sdl6_16",
|
|
3088
3088
|
"rp-thumbnail-dragging": "_rp-thumbnail-dragging_1sdl6_21"
|
|
3089
|
-
},
|
|
3089
|
+
}, Ge = {
|
|
3090
3090
|
"rp-thumbnail-wrapper": "_rp-thumbnail-wrapper_3fenb_1",
|
|
3091
3091
|
"rp-thumbnail-text": "_rp-thumbnail-text_3fenb_10",
|
|
3092
3092
|
"rp-thumbnail": "_rp-thumbnail_3fenb_1",
|
|
3093
3093
|
"rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
|
|
3094
3094
|
"rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
|
|
3095
|
-
}, Qi = (
|
|
3096
|
-
const { thumbnailSrc:
|
|
3095
|
+
}, Qi = (t) => {
|
|
3096
|
+
const { thumbnailSrc: e, pageNumber: n, isFocused: r, viewport: o } = t, { goToPage: a } = ae(), { pageRotate: l } = Be(), s = k(() => r ? Ge["rp-thumbnail-active"] : "", [r]), d = k(() => ({
|
|
3097
3097
|
width: Math.round(o.width),
|
|
3098
3098
|
height: Math.round(o.height)
|
|
3099
3099
|
}), [o]), f = N(() => {
|
|
@@ -3104,7 +3104,7 @@ const Lt = {
|
|
|
3104
3104
|
{
|
|
3105
3105
|
onClick: f,
|
|
3106
3106
|
id: `page-${n}`,
|
|
3107
|
-
className:
|
|
3107
|
+
className: Ge["rp-thumbnail-wrapper"],
|
|
3108
3108
|
children: [
|
|
3109
3109
|
/* @__PURE__ */ i(
|
|
3110
3110
|
"div",
|
|
@@ -3112,11 +3112,11 @@ const Lt = {
|
|
|
3112
3112
|
style: {
|
|
3113
3113
|
transform: `rotate(${l[n || 0]}deg)`
|
|
3114
3114
|
},
|
|
3115
|
-
className:
|
|
3116
|
-
children:
|
|
3115
|
+
className: ne(s, Ge["rp-thumbnail"]),
|
|
3116
|
+
children: e ? /* @__PURE__ */ i(
|
|
3117
3117
|
"img",
|
|
3118
3118
|
{
|
|
3119
|
-
src:
|
|
3119
|
+
src: e,
|
|
3120
3120
|
width: d.width,
|
|
3121
3121
|
height: d.height,
|
|
3122
3122
|
alt: "thumbnail"
|
|
@@ -3124,36 +3124,36 @@ const Lt = {
|
|
|
3124
3124
|
) : /* @__PURE__ */ i(
|
|
3125
3125
|
"div",
|
|
3126
3126
|
{
|
|
3127
|
-
className:
|
|
3127
|
+
className: Ge["rp-thumbnail-loader"],
|
|
3128
3128
|
style: {
|
|
3129
3129
|
width: `${d.width}px`,
|
|
3130
3130
|
height: `${d.height}px`
|
|
3131
3131
|
},
|
|
3132
|
-
children: /* @__PURE__ */ i(
|
|
3132
|
+
children: /* @__PURE__ */ i(xt, {})
|
|
3133
3133
|
}
|
|
3134
3134
|
)
|
|
3135
3135
|
}
|
|
3136
3136
|
),
|
|
3137
|
-
/* @__PURE__ */ i("div", { className:
|
|
3137
|
+
/* @__PURE__ */ i("div", { className: Ge["rp-thumbnail-text"], children: n })
|
|
3138
3138
|
]
|
|
3139
3139
|
}
|
|
3140
3140
|
);
|
|
3141
3141
|
}, pn = {
|
|
3142
3142
|
"rp-thumbnails-container": "_rp-thumbnails-container_16vqr_1",
|
|
3143
3143
|
"rp-thumbnails": "_rp-thumbnails_16vqr_1"
|
|
3144
|
-
},
|
|
3145
|
-
const n =
|
|
3146
|
-
|
|
3147
|
-
}, ro =
|
|
3148
|
-
const { show: n } =
|
|
3149
|
-
hn(
|
|
3144
|
+
}, ea = 16, ta = (t, e) => {
|
|
3145
|
+
const n = t == null ? void 0 : t.querySelector(`#page-${e}`);
|
|
3146
|
+
t && (n != null && n.offsetTop) && (t.scrollTop = (n == null ? void 0 : n.offsetTop) - ea);
|
|
3147
|
+
}, ro = ke((t, e) => {
|
|
3148
|
+
const { show: n } = t, { focusedPage: r, totalPages: o } = ae(), { thumbnailPages: a, addPage: l, thumbnailLength: s, addToPage: d } = Nt(), f = $(null), u = $(1);
|
|
3149
|
+
hn(e, () => f.current);
|
|
3150
3150
|
const b = k(() => Object.values(a), [a]), h = N(() => {
|
|
3151
3151
|
const g = s + 1;
|
|
3152
3152
|
g <= o && l(g);
|
|
3153
3153
|
}, [l, o, s]);
|
|
3154
3154
|
return W(() => {
|
|
3155
|
-
r > s ? d(r) : n && u.current !== r && (
|
|
3156
|
-
}, [r, s, d, n, b]),
|
|
3155
|
+
r > s ? d(r) : n && u.current !== r && (ta(f.current, r), u.current = r);
|
|
3156
|
+
}, [r, s, d, n, b]), Uo(f.current, h), /* @__PURE__ */ i("div", { ref: f, className: pn["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: pn["rp-thumbnails"], children: n ? b.map((g, T) => {
|
|
3157
3157
|
var y, C;
|
|
3158
3158
|
return /* @__PURE__ */ i(
|
|
3159
3159
|
Qi,
|
|
@@ -3169,36 +3169,36 @@ const Lt = {
|
|
|
3169
3169
|
);
|
|
3170
3170
|
}) : null }) });
|
|
3171
3171
|
}), na = () => {
|
|
3172
|
-
const { thumbnailIcon:
|
|
3173
|
-
return
|
|
3172
|
+
const { thumbnailIcon: t } = he(), { thumbnailIcon: e } = fe();
|
|
3173
|
+
return t || e || /* @__PURE__ */ i(ar, {});
|
|
3174
3174
|
}, oa = () => {
|
|
3175
|
-
const { active:
|
|
3176
|
-
|
|
3177
|
-
}, []), f = k(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: d, active:
|
|
3178
|
-
|
|
3175
|
+
const { active: t, setActive: e } = Nt(), [n, r] = G(200), o = $(null), { thumbnailTool: a, sidebarEnable: l } = me(), { localeMessages: s } = ce(), d = N(() => {
|
|
3176
|
+
e((u) => !u);
|
|
3177
|
+
}, []), f = k(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: d, active: t }) : a ? /* @__PURE__ */ i(Z, { content: s == null ? void 0 : s.thumbnailTooltip, children: /* @__PURE__ */ i(
|
|
3178
|
+
oe,
|
|
3179
3179
|
{
|
|
3180
3180
|
onClick: d,
|
|
3181
|
-
active:
|
|
3181
|
+
active: t,
|
|
3182
3182
|
"aria-label": s == null ? void 0 : s.thumbnailTooltip,
|
|
3183
3183
|
children: /* @__PURE__ */ i(na, {})
|
|
3184
3184
|
}
|
|
3185
|
-
) }) : null, [a,
|
|
3186
|
-
return /* @__PURE__ */ i(
|
|
3185
|
+
) }) : null, [a, t, d, s]);
|
|
3186
|
+
return /* @__PURE__ */ i(ie, { children: l && /* @__PURE__ */ A(
|
|
3187
3187
|
"div",
|
|
3188
3188
|
{
|
|
3189
3189
|
style: { "--rp-thumbnail-width": `${n}px` },
|
|
3190
|
-
className:
|
|
3190
|
+
className: _t["rp-sidebar-content-wrapper"],
|
|
3191
3191
|
"data-rp": "sidebar",
|
|
3192
3192
|
children: [
|
|
3193
|
-
/* @__PURE__ */ i("div", { className:
|
|
3193
|
+
/* @__PURE__ */ i("div", { className: _t["rp-sidebar-content"], children: f }),
|
|
3194
3194
|
/* @__PURE__ */ A(
|
|
3195
3195
|
"div",
|
|
3196
3196
|
{
|
|
3197
3197
|
"data-rp": "thumbnailSidebar",
|
|
3198
|
-
hidden: !
|
|
3199
|
-
className:
|
|
3198
|
+
hidden: !t,
|
|
3199
|
+
className: _t["rp-thumbnails-wrapper"],
|
|
3200
3200
|
children: [
|
|
3201
|
-
/* @__PURE__ */ i(ro, { show:
|
|
3201
|
+
/* @__PURE__ */ i(ro, { show: t, ref: o }),
|
|
3202
3202
|
/* @__PURE__ */ i(sr, { onWidthChange: r, thumbnailRef: o })
|
|
3203
3203
|
]
|
|
3204
3204
|
}
|
|
@@ -3206,7 +3206,7 @@ const Lt = {
|
|
|
3206
3206
|
]
|
|
3207
3207
|
}
|
|
3208
3208
|
) });
|
|
3209
|
-
}, oc =
|
|
3209
|
+
}, oc = ke((t, e) => {
|
|
3210
3210
|
const {
|
|
3211
3211
|
children: n,
|
|
3212
3212
|
slots: r,
|
|
@@ -3217,16 +3217,16 @@ const Lt = {
|
|
|
3217
3217
|
onLoaded: d,
|
|
3218
3218
|
cleanupOnLoaded: f,
|
|
3219
3219
|
onLayoutWidthChange: u
|
|
3220
|
-
} =
|
|
3220
|
+
} = t, [b, h] = G(null), { setContainer: g, setContentRef: T } = se(), { loading: y } = X(), { LoaderImageComponent: C } = yt();
|
|
3221
3221
|
return W(() => (d && d(), () => {
|
|
3222
3222
|
f && f();
|
|
3223
|
-
}), [d, f]), /* @__PURE__ */ i(
|
|
3223
|
+
}), [d, f]), /* @__PURE__ */ i(zt, { toolbarRef: b, ref: e, children: /* @__PURE__ */ i(gn, { mobileWidth: s, onLayoutWidthChange: u, children: /* @__PURE__ */ i(Ro, { slots: r, children: /* @__PURE__ */ i(xo, { icons: o, children: /* @__PURE__ */ i(Pn, { children: /* @__PURE__ */ A(fn, { getContainerRef: g, style: a, className: l, children: [
|
|
3224
3224
|
/* @__PURE__ */ A(yn, { children: [
|
|
3225
|
-
/* @__PURE__ */ A("div", { className:
|
|
3225
|
+
/* @__PURE__ */ A("div", { className: we["rp-layout"], children: [
|
|
3226
3226
|
/* @__PURE__ */ i(Ji, { ref: h }),
|
|
3227
|
-
/* @__PURE__ */ A("div", { className:
|
|
3228
|
-
/* @__PURE__ */ i("div", { className:
|
|
3229
|
-
/* @__PURE__ */ i("div", { ref: T, className:
|
|
3227
|
+
/* @__PURE__ */ A("div", { className: we["rp-content"], children: [
|
|
3228
|
+
/* @__PURE__ */ i("div", { className: we["rp-sidebar"], children: /* @__PURE__ */ i(oa, {}) }),
|
|
3229
|
+
/* @__PURE__ */ i("div", { ref: T, className: we["rp-pages"], children: n })
|
|
3230
3230
|
] })
|
|
3231
3231
|
] }),
|
|
3232
3232
|
/* @__PURE__ */ i(Cn, {})
|
|
@@ -3234,7 +3234,7 @@ const Lt = {
|
|
|
3234
3234
|
y ? /* @__PURE__ */ i(
|
|
3235
3235
|
"div",
|
|
3236
3236
|
{
|
|
3237
|
-
className:
|
|
3237
|
+
className: we["rp-loader"],
|
|
3238
3238
|
style: {
|
|
3239
3239
|
position: "absolute",
|
|
3240
3240
|
top: 0,
|
|
@@ -3260,38 +3260,38 @@ const Lt = {
|
|
|
3260
3260
|
}
|
|
3261
3261
|
) : null
|
|
3262
3262
|
] }) }) }) }) }) });
|
|
3263
|
-
}),
|
|
3263
|
+
}), Me = {
|
|
3264
3264
|
"rp-toolbar-layout": "_rp-toolbar-layout_vwobs_1",
|
|
3265
3265
|
"rp-content": "_rp-content_vwobs_7",
|
|
3266
3266
|
"rp-topbar-content": "_rp-topbar-content_vwobs_13",
|
|
3267
3267
|
"rp-sidebar-content": "_rp-sidebar-content_vwobs_22",
|
|
3268
3268
|
"rp-pages": "_rp-pages_vwobs_32",
|
|
3269
3269
|
"rp-thumbnails-wrapper": "_rp-thumbnails-wrapper_vwobs_37"
|
|
3270
|
-
}, ra = (
|
|
3270
|
+
}, ra = (t) => {
|
|
3271
3271
|
var b, h;
|
|
3272
|
-
const { children:
|
|
3273
|
-
return /* @__PURE__ */ A(
|
|
3274
|
-
/* @__PURE__ */ A("div", { className:
|
|
3275
|
-
f && /* @__PURE__ */ i("div", { "data-rp": "topbar", className:
|
|
3276
|
-
/* @__PURE__ */ A("div", { className:
|
|
3277
|
-
/* @__PURE__ */ A(
|
|
3278
|
-
u && /* @__PURE__ */ i("div", { "data-rp": "sidebar", className:
|
|
3272
|
+
const { children: e, toolbar: n } = t, r = $(null), { setContentRef: o } = se(), { active: a } = Nt(), { showPrintProgress: l } = me(), { progress: s } = je(), { percentage: d } = s || {}, f = (b = n == null ? void 0 : n.topbar) == null ? void 0 : b.component, u = (h = n == null ? void 0 : n.leftSidebar) == null ? void 0 : h.component;
|
|
3273
|
+
return /* @__PURE__ */ A(ie, { children: [
|
|
3274
|
+
/* @__PURE__ */ A("div", { className: Me["rp-toolbar-layout"], children: [
|
|
3275
|
+
f && /* @__PURE__ */ i("div", { "data-rp": "topbar", className: Me["rp-topbar-content"], children: f }),
|
|
3276
|
+
/* @__PURE__ */ A("div", { className: Me["rp-content"], children: [
|
|
3277
|
+
/* @__PURE__ */ A(ie, { children: [
|
|
3278
|
+
u && /* @__PURE__ */ i("div", { "data-rp": "sidebar", className: Me["rp-sidebar-content"], children: u }),
|
|
3279
3279
|
/* @__PURE__ */ i(
|
|
3280
3280
|
"div",
|
|
3281
3281
|
{
|
|
3282
3282
|
"data-rp": "thumbnailSidebar",
|
|
3283
3283
|
hidden: !a,
|
|
3284
|
-
className:
|
|
3284
|
+
className: Me["rp-thumbnails-wrapper"],
|
|
3285
3285
|
children: /* @__PURE__ */ i(ro, { show: a, ref: r })
|
|
3286
3286
|
}
|
|
3287
3287
|
)
|
|
3288
3288
|
] }),
|
|
3289
|
-
/* @__PURE__ */ i("div", { ref: o, className:
|
|
3289
|
+
/* @__PURE__ */ i("div", { ref: o, className: Me["rp-pages"], children: e })
|
|
3290
3290
|
] })
|
|
3291
3291
|
] }),
|
|
3292
3292
|
l && d ? /* @__PURE__ */ i(oo, { percentage: d }) : null
|
|
3293
3293
|
] });
|
|
3294
|
-
}, rc =
|
|
3294
|
+
}, rc = ke((t, e) => {
|
|
3295
3295
|
const {
|
|
3296
3296
|
children: n,
|
|
3297
3297
|
style: r,
|
|
@@ -3301,10 +3301,10 @@ const Lt = {
|
|
|
3301
3301
|
cleanupOnLoaded: s,
|
|
3302
3302
|
onLayoutWidthChange: d,
|
|
3303
3303
|
toolbar: f
|
|
3304
|
-
} =
|
|
3304
|
+
} = t, { setContainer: u } = se(), [b] = G(null), { loading: h } = X(), { LoaderImageComponent: g } = yt();
|
|
3305
3305
|
return W(() => (l && l(), () => {
|
|
3306
3306
|
s && s();
|
|
3307
|
-
}), [l, s]), /* @__PURE__ */ i(
|
|
3307
|
+
}), [l, s]), /* @__PURE__ */ i(zt, { toolbarRef: b, ref: e, children: /* @__PURE__ */ i(gn, { mobileWidth: a, onLayoutWidthChange: d, children: /* @__PURE__ */ i(No, { children: /* @__PURE__ */ i(Lo, { children: /* @__PURE__ */ i(Pn, { children: /* @__PURE__ */ A(fn, { getContainerRef: u, style: r, className: o, children: [
|
|
3308
3308
|
/* @__PURE__ */ A(yn, { children: [
|
|
3309
3309
|
/* @__PURE__ */ i(ra, { toolbar: f, children: n }),
|
|
3310
3310
|
/* @__PURE__ */ i(Cn, {})
|
|
@@ -3312,7 +3312,7 @@ const Lt = {
|
|
|
3312
3312
|
h ? /* @__PURE__ */ i(
|
|
3313
3313
|
"div",
|
|
3314
3314
|
{
|
|
3315
|
-
className:
|
|
3315
|
+
className: we["rp-loader"],
|
|
3316
3316
|
style: {
|
|
3317
3317
|
position: "absolute",
|
|
3318
3318
|
top: 0,
|
|
@@ -3351,13 +3351,13 @@ export {
|
|
|
3351
3351
|
no as I,
|
|
3352
3352
|
un as J,
|
|
3353
3353
|
oo as K,
|
|
3354
|
-
|
|
3354
|
+
zt as L,
|
|
3355
3355
|
$i as M,
|
|
3356
3356
|
Ji as N,
|
|
3357
3357
|
Gi as O,
|
|
3358
3358
|
Xs as P,
|
|
3359
3359
|
Qi as Q,
|
|
3360
|
-
|
|
3360
|
+
ec as R,
|
|
3361
3361
|
Xi as S,
|
|
3362
3362
|
Js as T,
|
|
3363
3363
|
ro as U,
|
|
@@ -3367,16 +3367,16 @@ export {
|
|
|
3367
3367
|
oc as a,
|
|
3368
3368
|
rc as b,
|
|
3369
3369
|
Xn as c,
|
|
3370
|
-
|
|
3371
|
-
|
|
3370
|
+
je as d,
|
|
3371
|
+
Et as e,
|
|
3372
3372
|
Qs as f,
|
|
3373
3373
|
Ys as g,
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
$
|
|
3374
|
+
Nt as h,
|
|
3375
|
+
vt as i,
|
|
3376
|
+
Ae as j,
|
|
3377
|
+
$e as k,
|
|
3378
3378
|
hi as l,
|
|
3379
|
-
|
|
3379
|
+
qi as m,
|
|
3380
3380
|
Rn as n,
|
|
3381
3381
|
Er as o,
|
|
3382
3382
|
Ln as p,
|
|
@@ -3384,10 +3384,10 @@ export {
|
|
|
3384
3384
|
Nn as r,
|
|
3385
3385
|
zr as s,
|
|
3386
3386
|
En as t,
|
|
3387
|
-
|
|
3387
|
+
ae as u,
|
|
3388
3388
|
Dr as v,
|
|
3389
3389
|
On as w,
|
|
3390
3390
|
Mr as x,
|
|
3391
3391
|
Gr as y,
|
|
3392
|
-
|
|
3392
|
+
Ot as z
|
|
3393
3393
|
};
|