@pdf-viewer/react 1.7.3-rc.3 → 1.7.4-rc.0
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/{RPDefaultLayout-1ff68a43.js → RPDefaultLayout-a64aa90e.js} +672 -671
- package/dist/assets/RPDefaultLayout.css +1 -1
- package/dist/components/RPController.js +1 -1
- package/dist/components/RPPages.js +1 -1
- package/dist/components/RPProvider.js +1 -1
- package/dist/components/layout/LayoutContainer.js +2 -2
- package/dist/components/layout/RPDefaultLayout.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/ZoomTool.js +1 -1
- package/dist/components/page/AnnotationLayer.js +1 -1
- package/dist/components/page/CanvasLayer.js +1 -1
- package/dist/components/page/DualPage.js +1 -1
- package/dist/components/page/RPPage.js +1 -1
- package/dist/components/page/SinglePage.js +1 -1
- package/dist/components/page/TextHighlightLayer.js +1 -1
- package/dist/components/page/TextLayer.js +1 -1
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/contexts/PaginationContext.js +1 -1
- package/dist/contexts/PrintContext.js +1 -1
- package/dist/contexts/SearchContext.js +1 -1
- package/dist/contexts/ThumbnailsContext.js +1 -1
- package/dist/main.js +1 -1
- package/dist/types/components/layout/LayoutContainer.d.ts +3 -2
- package/dist/utils/hooks/useFileDownload.js +1 -1
- package/dist/utils/hooks/useHighlight.js +25 -23
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/usePaginate.js +1 -1
- package/dist/utils/hooks/usePresentPage.js +1 -1
- package/dist/utils/hooks/usePrint.js +1 -1
- package/dist/utils/hooks/useScrollToPage.js +1 -1
- package/dist/utils/hooks/useSearch.js +1 -1
- package/dist/utils/hooks/useThumbnail.js +1 -1
- package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
- package/package.json +1 -1
|
@@ -1,100 +1,100 @@
|
|
|
1
1
|
import { jsx as i, Fragment as me, jsxs as W } from "react/jsx-runtime";
|
|
2
2
|
import * as B from "react";
|
|
3
|
-
import { useRef as H, useEffect as F, useCallback as N, useState as $, useMemo as k, createContext as Ye, useContext as Je, forwardRef as $e, useImperativeHandle as cn, createElement as qe, PureComponent as
|
|
3
|
+
import { useRef as H, useEffect as F, useCallback as N, useState as $, useMemo as k, createContext as Ye, useContext as Je, forwardRef as $e, useImperativeHandle as cn, createElement as qe, PureComponent as er, Component as tr, memo as ln } from "react";
|
|
4
4
|
import { ChevronUpIcon as He } from "./components/icons/ChevronUpIcon.js";
|
|
5
5
|
import { UIButton as re } from "./components/ui/Button.js";
|
|
6
6
|
import { UIInput as dn } from "./components/ui/Input.js";
|
|
7
|
-
import { ViewMode as Ie, ScrollMode as J, AnnotationSubType as Dt, SelectionMode as
|
|
7
|
+
import { ViewMode as Ie, ScrollMode as J, AnnotationSubType as Dt, SelectionMode as nr, ZoomLevel as at } from "./utils/types.js";
|
|
8
8
|
import { useScrollModeContext as Le } from "./contexts/ScrollModeContext.js";
|
|
9
9
|
import { useDocumentContext as Q } from "./contexts/RPDocumentContext.js";
|
|
10
|
-
import { useDocumentPasswordContext as
|
|
11
|
-
import { useDarkModeContext as
|
|
10
|
+
import { useDocumentPasswordContext as rr } from "./contexts/DocumentPasswordContext.js";
|
|
11
|
+
import { useDarkModeContext as or } from "./contexts/DarkModeContext.js";
|
|
12
12
|
import { useRotationContext as Ge } from "./contexts/RotationContext.js";
|
|
13
|
-
import { useLayerContext as
|
|
13
|
+
import { useLayerContext as ir } from "./contexts/LayerContext.js";
|
|
14
14
|
import { useZoomContext as Qe } from "./contexts/ZoomContext.js";
|
|
15
15
|
import { useViewModeContext as Ee } from "./contexts/ViewModeContext.js";
|
|
16
16
|
import { useVirtualScrollContext as et } from "./contexts/VirtualScrollContext.js";
|
|
17
17
|
import { useVirtualGridContext as un } from "./contexts/VirtualGridContext.js";
|
|
18
|
-
import { useSelectionModeContext as
|
|
19
|
-
import { useInitialStateContext as
|
|
20
|
-
import { useFullScreenContext as
|
|
18
|
+
import { useSelectionModeContext as ar } from "./contexts/SelectionModeContext.js";
|
|
19
|
+
import { useInitialStateContext as sr } from "./contexts/InitialStateContext.js";
|
|
20
|
+
import { useFullScreenContext as cr } from "./contexts/FullScreenContext.js";
|
|
21
21
|
import "./contexts/FileInputContext.js";
|
|
22
22
|
import "./contexts/DropFileZoneContext.js";
|
|
23
23
|
import { renderPage as vt } from "./utils/renderPage.js";
|
|
24
|
-
import { findMatches as
|
|
24
|
+
import { findMatches as lr, resetDivs as dr, highlightMatches as ur, isMatchEntireWord as pr } from "./utils/highlight.js";
|
|
25
25
|
import { useLayoutContainer as ge } from "./contexts/LayoutContainerContext.js";
|
|
26
26
|
import { useDimensionPagesContext as Ue } from "./contexts/DimensionPagesContext.js";
|
|
27
27
|
import { useLocalizationContext as se } from "./contexts/LocalizationContext.js";
|
|
28
|
-
import { useHighlightContext as
|
|
28
|
+
import { useHighlightContext as hr } from "./contexts/HighlightContext.js";
|
|
29
29
|
import "./contexts/LicenseContext.js";
|
|
30
|
-
import { useDownloadContext as
|
|
30
|
+
import { useDownloadContext as fr } from "./contexts/DownloadContext.js";
|
|
31
31
|
import { useSmoothScrollContext as pn } from "./contexts/SmoothScrollContext.js";
|
|
32
32
|
import { useLoaderContext as hn } from "./contexts/LoaderContext.js";
|
|
33
33
|
import "./components/RPConfig.js";
|
|
34
|
-
import { ThumbnailIcon as
|
|
34
|
+
import { ThumbnailIcon as mr } from "./components/icons/Thumbnail.js";
|
|
35
35
|
import { c as ne } from "./clsx-0c6e471a.js";
|
|
36
36
|
import { LoaderIcon as Ct } from "./components/icons/LoaderIcon.js";
|
|
37
|
-
import { useInfiniteScroll as
|
|
38
|
-
import { RPSplitter as
|
|
39
|
-
import { useToolbarComponentContext as ve, ToolbarComponentProvider as
|
|
40
|
-
import { useIconContext as pe, IconProvider as
|
|
37
|
+
import { useInfiniteScroll as gr } from "./utils/hooks/useInfiniteScroll.js";
|
|
38
|
+
import { RPSplitter as vr } from "./components/layout/sidebar/RPSplitter.js";
|
|
39
|
+
import { useToolbarComponentContext as ve, ToolbarComponentProvider as wr } from "./contexts/ToolbarComponentContext.js";
|
|
40
|
+
import { useIconContext as pe, IconProvider as _r } from "./contexts/IconContext.js";
|
|
41
41
|
import K from "./components/ui/RPTooltip.js";
|
|
42
|
-
import { Container as
|
|
43
|
-
import { WrapperLayout as
|
|
44
|
-
import { RPDropFileZone as
|
|
45
|
-
import { useViewportContext as Ce, ViewportProvider as
|
|
46
|
-
import { useThemeContext as
|
|
42
|
+
import { Container as br } from "./components/layout/Container.js";
|
|
43
|
+
import { WrapperLayout as Cr } from "./components/layout/WrapperLayout.js";
|
|
44
|
+
import { RPDropFileZone as Pr } from "./components/RPDropFileZone.js";
|
|
45
|
+
import { useViewportContext as Ce, ViewportProvider as Tr } from "./contexts/ViewportContext.js";
|
|
46
|
+
import { useThemeContext as yr } from "./contexts/ThemeContext.js";
|
|
47
47
|
import * as Sr from "pdfjs-dist";
|
|
48
|
-
import { PixelsPerInch as
|
|
49
|
-
import { SimpleLinkService as
|
|
50
|
-
import { annotationsEvents as
|
|
51
|
-
import { normalizeSingleKeyword as
|
|
52
|
-
import { _ as
|
|
53
|
-
import { useMousePressed as
|
|
54
|
-
import { useGrabScroll as
|
|
55
|
-
import { usePinch as
|
|
48
|
+
import { PixelsPerInch as xr, AnnotationMode as Ir, RenderingCancelledException as Rr, AnnotationLayer as Lr } from "pdfjs-dist";
|
|
49
|
+
import { SimpleLinkService as Er } from "./utils/link_service.js";
|
|
50
|
+
import { annotationsEvents as Nr, annotationEventsHandler as Or, handleClick as At, handleAnnotationWidget as zr, handleAnnotationLink as Dr, bindLayerEvents as Ar, unbindLayerEvents as Ft } from "./utils/annotations.js";
|
|
51
|
+
import { normalizeSingleKeyword as Fr, sortHighlightPosition as Wr, unwrap as kr } from "./components/page/searchHighlight.js";
|
|
52
|
+
import { _ as Mr, U as Hr } from "./Popover-1faa77f6.js";
|
|
53
|
+
import { useMousePressed as $r } from "./utils/hooks/useMousePressed.js";
|
|
54
|
+
import { useGrabScroll as Gr } from "./utils/hooks/useGrabScroll.js";
|
|
55
|
+
import { usePinch as Ur } from "./utils/hooks/usePinch.js";
|
|
56
56
|
import { useDebounce as Pt } from "./utils/hooks/useDebounce.js";
|
|
57
|
-
import
|
|
58
|
-
import { getPositionFromPage as
|
|
57
|
+
import Vr from "./components/ui/PasswordModal.js";
|
|
58
|
+
import { getPositionFromPage as qr, getPageFromPosition as Br } from "./utils/calculatePage.js";
|
|
59
59
|
import { getScrollDistance as Ae } from "./utils/getScrollDistance.js";
|
|
60
|
-
import { getWordPositionInPage as
|
|
60
|
+
import { getWordPositionInPage as Zr } from "./utils/getWordPositionInPage.js";
|
|
61
61
|
import { getThumbnailViewport as Wt } from "./utils/getThumbnailViewport.js";
|
|
62
62
|
import { smoothScrollTo as st } from "./utils/smoothScrollTo.js";
|
|
63
|
-
import { appConsole as
|
|
63
|
+
import { appConsole as jr } from "./utils/appConsole.js";
|
|
64
64
|
import { FileUploadTool as fn } from "./components/layout/toolbar/FileUploadTool.js";
|
|
65
|
-
import { DarkModeTool as
|
|
66
|
-
import { ThreeDotIcon as
|
|
65
|
+
import { DarkModeTool as Kr } from "./components/layout/toolbar/DarkModeTool.js";
|
|
66
|
+
import { ThreeDotIcon as Xr } from "./components/icons/ThreeDotIcon.js";
|
|
67
67
|
import { UIDropDown as mn } from "./components/ui/DropDown.js";
|
|
68
|
-
import { e as
|
|
69
|
-
import { D as
|
|
70
|
-
import { a as
|
|
71
|
-
import { h as
|
|
72
|
-
import { CloseIcon as
|
|
68
|
+
import { e as Yr, a as Tt, P as Ve, c as Me, g as yt, i as Jr, k as Qr, f as eo } from "./index-1cb41342.js";
|
|
69
|
+
import { D as to, u as ct } from "./index-aa2d3884.js";
|
|
70
|
+
import { a as no, u as ro, F as oo, b as io, G as Ke } from "./index-7279fb4e.js";
|
|
71
|
+
import { h as ao } from "./component-1da194e8.js";
|
|
72
|
+
import { CloseIcon as so } from "./components/icons/CloseIcon.js";
|
|
73
73
|
import { dateFormatter as kt } from "./utils/dateFormatter.js";
|
|
74
|
-
import { PropertyItem as
|
|
75
|
-
import { useOtherToolContext as
|
|
76
|
-
import { DocumentProperties as
|
|
77
|
-
import { RotateTool as
|
|
78
|
-
import { ViewModeTool as
|
|
79
|
-
import { ScrollModeTool as
|
|
80
|
-
import { MenuSeparator as
|
|
81
|
-
import { FileDownloadDefaultIcon as
|
|
74
|
+
import { PropertyItem as co } from "./components/layout/toolbar/PropertyItem.js";
|
|
75
|
+
import { useOtherToolContext as lo, OtherToolProvider as uo } from "./contexts/OtherToolContext.js";
|
|
76
|
+
import { DocumentProperties as po } from "./components/layout/toolbar/DocumentProperties.js";
|
|
77
|
+
import { RotateTool as ho } from "./components/layout/toolbar/RotateTool.js";
|
|
78
|
+
import { ViewModeTool as fo } from "./components/layout/toolbar/ViewModeTool.js";
|
|
79
|
+
import { ScrollModeTool as mo } from "./components/layout/toolbar/ScrollModeTool.js";
|
|
80
|
+
import { MenuSeparator as St } from "./components/layout/toolbar/MenuSeparator.js";
|
|
81
|
+
import { FileDownloadDefaultIcon as go } from "./components/icons/FileDownloadDefaultIcon.js";
|
|
82
82
|
import { MenuItem as be } from "./components/layout/toolbar/MenuItem.js";
|
|
83
|
-
import { PrintDefaultTool as
|
|
83
|
+
import { PrintDefaultTool as vo } from "./components/icons/PrintDefaultIcon.js";
|
|
84
84
|
import { FullScreenTool as gn } from "./components/layout/toolbar/FullScreenTool.js";
|
|
85
85
|
import { GoToDownIcon as vn } from "./components/icons/GoToDownIcon.js";
|
|
86
|
-
import { SelectionModeTool as
|
|
87
|
-
import { ZoomInIcon as
|
|
88
|
-
import { ZoomOutIcon as
|
|
86
|
+
import { SelectionModeTool as wo } from "./components/layout/toolbar/SelectionModeTool.js";
|
|
87
|
+
import { ZoomInIcon as _o } from "./components/icons/ZoomInIcon.js";
|
|
88
|
+
import { ZoomOutIcon as bo } from "./components/icons/ZoomOutIcon.js";
|
|
89
89
|
import { PAGE_PADDING as Mt } from "./utils/constants.js";
|
|
90
|
-
import { getZoomLevel as
|
|
91
|
-
import { SearchIcon as
|
|
90
|
+
import { getZoomLevel as Co } from "./utils/getZoomLevel.js";
|
|
91
|
+
import { SearchIcon as Po } from "./components/icons/SearchIcon.js";
|
|
92
92
|
import { c as Y, S as Ht } from "./SearchCloseButton-ddb9877e.js";
|
|
93
93
|
import { UICheckbox as $t } from "./components/ui/Checkbox.js";
|
|
94
|
-
import { ClearIcon as
|
|
94
|
+
import { ClearIcon as To } from "./components/icons/ClearIcon.js";
|
|
95
95
|
import { InfoIcon as Gt } from "./components/icons/InfoIcon.js";
|
|
96
96
|
import './assets/RPDefaultLayout.css';const wn = () => {
|
|
97
|
-
const { viewMode: t } = Ee(), { scrollMode: e } = Le(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = et(), { setFocusedPage: a } = ie(), l = H(), { columnCount: c } = un(), { widths: d, heights:
|
|
97
|
+
const { viewMode: t } = Ee(), { scrollMode: e } = Le(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = et(), { setFocusedPage: a } = ie(), l = H(), { columnCount: c } = un(), { widths: d, heights: u } = Ue(), m = H(e), P = H(t), p = H(c), { targetScrollPage: v } = pn();
|
|
98
98
|
F(() => {
|
|
99
99
|
n != null && n.scrollToItem && (l.current = n);
|
|
100
100
|
}, [n]), F(() => {
|
|
@@ -128,7 +128,7 @@ import './assets/RPDefaultLayout.css';const wn = () => {
|
|
|
128
128
|
return F(() => {
|
|
129
129
|
m.current = e, P.current = t;
|
|
130
130
|
}, [e, t]), F(() => {
|
|
131
|
-
|
|
131
|
+
p.current = c;
|
|
132
132
|
}, [c]), { scrollToPage: N(
|
|
133
133
|
(C, T = "smooth") => {
|
|
134
134
|
a(C);
|
|
@@ -147,29 +147,29 @@ import './assets/RPDefaultLayout.css';const wn = () => {
|
|
|
147
147
|
const s = o;
|
|
148
148
|
if (v.current = C, m.current === J.HORIZONTAL_SCROLLING) {
|
|
149
149
|
g = h;
|
|
150
|
-
const
|
|
150
|
+
const y = {
|
|
151
151
|
left: Ae(d, g),
|
|
152
152
|
top: 0
|
|
153
153
|
};
|
|
154
154
|
return s.scrollTo({
|
|
155
|
-
...
|
|
155
|
+
...y,
|
|
156
156
|
behavior: T
|
|
157
157
|
});
|
|
158
158
|
}
|
|
159
159
|
if (P.current === Ie.DUAL_PAGE) {
|
|
160
160
|
g = h % 2, f = Math.floor(h / 2);
|
|
161
|
-
const
|
|
161
|
+
const y = {
|
|
162
162
|
left: Ae(d, g),
|
|
163
|
-
top: Ae(
|
|
163
|
+
top: Ae(u, f)
|
|
164
164
|
};
|
|
165
165
|
return s.scrollTo({
|
|
166
|
-
...
|
|
166
|
+
...y,
|
|
167
167
|
behavior: T
|
|
168
168
|
});
|
|
169
169
|
}
|
|
170
170
|
const w = {
|
|
171
171
|
left: 0,
|
|
172
|
-
top: Ae(
|
|
172
|
+
top: Ae(u, f)
|
|
173
173
|
};
|
|
174
174
|
return s.scrollTo({
|
|
175
175
|
...w,
|
|
@@ -182,12 +182,12 @@ import './assets/RPDefaultLayout.css';const wn = () => {
|
|
|
182
182
|
_,
|
|
183
183
|
a,
|
|
184
184
|
st,
|
|
185
|
-
|
|
185
|
+
u,
|
|
186
186
|
d
|
|
187
187
|
]
|
|
188
188
|
) };
|
|
189
|
-
},
|
|
190
|
-
const [e, n] = $(t), [o, r] = $(0), { scrollToPage: a } = wn(), l = H(1), { viewMode: c } = Ee(), { scrollMode: d } = Le(), { widths:
|
|
189
|
+
}, yo = (t = 1) => {
|
|
190
|
+
const [e, n] = $(t), [o, r] = $(0), { scrollToPage: a } = wn(), l = H(1), { viewMode: c } = Ee(), { scrollMode: d } = Le(), { widths: u } = Ue(), { pagesRef: m } = ge(), P = Pt(e, 100), p = N(
|
|
191
191
|
(f) => {
|
|
192
192
|
if (!/^[0-9]*$/g.test(f.toString()) || !f)
|
|
193
193
|
return { success: !1, currentPage: l.current };
|
|
@@ -195,27 +195,27 @@ import './assets/RPDefaultLayout.css';const wn = () => {
|
|
|
195
195
|
return s < 0 || s > o ? { success: !1, currentPage: l.current } : (n(s), l.current = s, { success: !0, currentPage: +f });
|
|
196
196
|
},
|
|
197
197
|
[o]
|
|
198
|
-
), v = N(
|
|
198
|
+
), v = N(p, [p]), _ = N(
|
|
199
199
|
(f) => {
|
|
200
|
-
const g =
|
|
200
|
+
const g = p(f);
|
|
201
201
|
return g.success && a(g.currentPage), g;
|
|
202
202
|
},
|
|
203
|
-
[
|
|
204
|
-
),
|
|
203
|
+
[p, a]
|
|
204
|
+
), S = N((f) => {
|
|
205
205
|
const g = f % 2 === 1;
|
|
206
206
|
if (!m || g)
|
|
207
207
|
return !1;
|
|
208
|
-
const s = g ?
|
|
208
|
+
const s = g ? u[f] : u[f - 1], w = g ? u[f + 1] : u[f];
|
|
209
209
|
return c === Ie.DUAL_PAGE && s + w < m.clientWidth;
|
|
210
|
-
}, [c,
|
|
210
|
+
}, [c, u, m, o]), C = N(() => {
|
|
211
211
|
let f = e - 1;
|
|
212
|
-
|
|
213
|
-
}, [_, e, c, d,
|
|
212
|
+
S(f) && (f = e - 2), _(f);
|
|
213
|
+
}, [_, e, c, d, S]), T = k(() => c === Ie.DUAL_PAGE && d === J.PAGE_SCROLLING ? e === o - 1 : e === o, [e, o, c, d]), h = N(() => {
|
|
214
214
|
if (T)
|
|
215
215
|
return;
|
|
216
216
|
let f = e + 1;
|
|
217
|
-
|
|
218
|
-
}, [_, e,
|
|
217
|
+
S(f) && (f = e + 2), _(f);
|
|
218
|
+
}, [_, e, S, c, d, T]);
|
|
219
219
|
return {
|
|
220
220
|
focusedPage: P,
|
|
221
221
|
totalPages: o,
|
|
@@ -239,9 +239,9 @@ import './assets/RPDefaultLayout.css';const wn = () => {
|
|
|
239
239
|
}
|
|
240
240
|
}), ie = () => {
|
|
241
241
|
const t = Je(_n);
|
|
242
|
-
return typeof (t == null ? void 0 : t.focusedPage) > "u" &&
|
|
242
|
+
return typeof (t == null ? void 0 : t.focusedPage) > "u" && jr.error("Please use this hooks inside children component of RPProvider"), t;
|
|
243
243
|
}, ks = ({ children: t }) => {
|
|
244
|
-
const { pdf: e } = Q(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: a, goToPage: l, nextPage: c, prevPage: d } =
|
|
244
|
+
const { pdf: e } = Q(), { focusedPage: n, totalPages: o, setFocusedPage: r, setTotalPages: a, goToPage: l, nextPage: c, prevPage: d } = yo();
|
|
245
245
|
return F(() => {
|
|
246
246
|
e != null && e.numPages && (a(e.numPages), r(1));
|
|
247
247
|
}, [e, a, r]), /* @__PURE__ */ i(
|
|
@@ -265,7 +265,7 @@ const So = () => {
|
|
|
265
265
|
loadedPages: 0,
|
|
266
266
|
totalPages: 0,
|
|
267
267
|
percentage: 0
|
|
268
|
-
}), [r, a] = $(!1), [l, c] = $(!1), [d,
|
|
268
|
+
}), [r, a] = $(!1), [l, c] = $(!1), [d, u] = $(null), m = H(!1);
|
|
269
269
|
F(() => {
|
|
270
270
|
m.current;
|
|
271
271
|
}, [m]);
|
|
@@ -273,8 +273,8 @@ const So = () => {
|
|
|
273
273
|
document.documentElement.classList.remove("rp-print-html-printing"), document.body.classList.remove("rp-print-body-printing");
|
|
274
274
|
const f = document.querySelector(".rp-print-zone");
|
|
275
275
|
f && f.remove();
|
|
276
|
-
}, []),
|
|
277
|
-
m.current = !1, a(!1), c(!1),
|
|
276
|
+
}, []), p = N(() => {
|
|
277
|
+
m.current = !1, a(!1), c(!1), u(null), o({
|
|
278
278
|
loadedPages: 0,
|
|
279
279
|
totalPages: 0,
|
|
280
280
|
percentage: 0
|
|
@@ -287,14 +287,14 @@ const So = () => {
|
|
|
287
287
|
pageNumber: s,
|
|
288
288
|
viewerPdfPage: w,
|
|
289
289
|
printResolution: b,
|
|
290
|
-
optionalContentConfigPromise:
|
|
290
|
+
optionalContentConfigPromise: y,
|
|
291
291
|
printAnnotationStoragePromise: E
|
|
292
292
|
}) => {
|
|
293
293
|
if (m.current) {
|
|
294
|
-
|
|
294
|
+
p();
|
|
295
295
|
return;
|
|
296
296
|
}
|
|
297
|
-
const x = b /
|
|
297
|
+
const x = b / xr.PDF;
|
|
298
298
|
f.width = Math.floor(w.width * x), f.height = Math.floor(w.height * x);
|
|
299
299
|
const R = f.getContext("2d");
|
|
300
300
|
R.save(), R.fillStyle = "rgb(255, 255, 255)", R.fillRect(0, 0, f.width, f.height), R.restore();
|
|
@@ -303,7 +303,7 @@ const So = () => {
|
|
|
303
303
|
E
|
|
304
304
|
]);
|
|
305
305
|
if (m.current) {
|
|
306
|
-
|
|
306
|
+
p();
|
|
307
307
|
return;
|
|
308
308
|
}
|
|
309
309
|
const A = {
|
|
@@ -311,21 +311,21 @@ const So = () => {
|
|
|
311
311
|
transform: [x, 0, 0, x, 0, 0],
|
|
312
312
|
viewport: z.getViewport({ scale: 1, rotation: w.rotation }),
|
|
313
313
|
intent: "print",
|
|
314
|
-
annotationMode:
|
|
315
|
-
optionalContentConfigPromise:
|
|
314
|
+
annotationMode: Ir.ENABLE_STORAGE,
|
|
315
|
+
optionalContentConfigPromise: y,
|
|
316
316
|
printAnnotationStorage: D
|
|
317
317
|
};
|
|
318
318
|
try {
|
|
319
319
|
return z.render(A).promise;
|
|
320
320
|
} catch (L) {
|
|
321
|
-
throw L instanceof
|
|
321
|
+
throw L instanceof Rr || console.error(L), L;
|
|
322
322
|
}
|
|
323
|
-
},
|
|
323
|
+
}, S = N(() => {
|
|
324
324
|
const f = window.print;
|
|
325
325
|
return new Promise((g) => {
|
|
326
|
-
const s = (
|
|
326
|
+
const s = (y) => {
|
|
327
327
|
setTimeout(() => {
|
|
328
|
-
f.call(window), setTimeout(() =>
|
|
328
|
+
f.call(window), setTimeout(() => y(), 20);
|
|
329
329
|
}, 0);
|
|
330
330
|
};
|
|
331
331
|
if (document.querySelector(".rp-print-zone")) {
|
|
@@ -340,8 +340,8 @@ const So = () => {
|
|
|
340
340
|
}, []), C = async (f) => {
|
|
341
341
|
const g = document.createElement("img"), s = document.createElement("div");
|
|
342
342
|
return s.classList.add("rp-print-page"), await new Promise((w, b) => {
|
|
343
|
-
f.toBlob((
|
|
344
|
-
|
|
343
|
+
f.toBlob((y) => {
|
|
344
|
+
y ? (g.src = URL.createObjectURL(y), g.onload = () => {
|
|
345
345
|
URL.revokeObjectURL(g.src), w();
|
|
346
346
|
}, g.onerror = b) : b(new Error("Failed to create blob"));
|
|
347
347
|
});
|
|
@@ -352,23 +352,23 @@ const So = () => {
|
|
|
352
352
|
s.classList.add("rp-print-zone");
|
|
353
353
|
const w = document.createElement("style"), b = g.get(1);
|
|
354
354
|
if (b) {
|
|
355
|
-
const { width:
|
|
356
|
-
w.innerHTML = `@page { size: ${
|
|
355
|
+
const { width: y, height: E } = b == null ? void 0 : b.page.getViewport({ scale: 1 });
|
|
356
|
+
w.innerHTML = `@page { size: ${y}px ${E}px }`;
|
|
357
357
|
}
|
|
358
358
|
return s.appendChild(w), s.append(...f), s;
|
|
359
359
|
}, h = N(async () => {
|
|
360
360
|
if (!t)
|
|
361
361
|
return;
|
|
362
|
-
|
|
362
|
+
p();
|
|
363
363
|
const f = document.createElement("canvas"), g = [];
|
|
364
364
|
try {
|
|
365
365
|
t.isPureXfa && console.warn("[rp] XFA Form is not supported at the moment.");
|
|
366
366
|
const w = t.getOptionalContentConfig({ intent: "print" }), b = Promise.resolve(
|
|
367
367
|
t.annotationStorage.print ?? void 0
|
|
368
|
-
),
|
|
368
|
+
), y = e.size;
|
|
369
369
|
for (const [x, R] of e) {
|
|
370
370
|
if (m.current) {
|
|
371
|
-
|
|
371
|
+
p();
|
|
372
372
|
return;
|
|
373
373
|
}
|
|
374
374
|
const z = R.page.getViewport({ scale: 1 });
|
|
@@ -381,38 +381,38 @@ const So = () => {
|
|
|
381
381
|
optionalContentConfigPromise: w,
|
|
382
382
|
printAnnotationStoragePromise: b
|
|
383
383
|
}), m.current) {
|
|
384
|
-
|
|
384
|
+
p();
|
|
385
385
|
return;
|
|
386
386
|
}
|
|
387
387
|
const D = await C(f);
|
|
388
388
|
g.push(D);
|
|
389
|
-
const A = parseFloat((g.length /
|
|
389
|
+
const A = parseFloat((g.length / y * 100).toFixed(2));
|
|
390
390
|
o({
|
|
391
391
|
loadedPages: x,
|
|
392
|
-
totalPages:
|
|
392
|
+
totalPages: y,
|
|
393
393
|
percentage: A
|
|
394
394
|
});
|
|
395
395
|
}
|
|
396
396
|
if (m.current) {
|
|
397
|
-
|
|
397
|
+
p();
|
|
398
398
|
return;
|
|
399
399
|
}
|
|
400
400
|
const E = T(g, e);
|
|
401
|
-
document.body.appendChild(E), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), a(!0), await
|
|
401
|
+
document.body.appendChild(E), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), a(!0), await S();
|
|
402
402
|
} catch (s) {
|
|
403
|
-
c(!0), s instanceof Error &&
|
|
403
|
+
c(!0), s instanceof Error && u(s);
|
|
404
404
|
} finally {
|
|
405
405
|
f.height = 0, f.width = 0;
|
|
406
406
|
}
|
|
407
407
|
}, [t, e, m]);
|
|
408
408
|
return F(() => {
|
|
409
409
|
const f = () => {
|
|
410
|
-
|
|
410
|
+
p(), P();
|
|
411
411
|
};
|
|
412
412
|
return window.addEventListener("afterprint", f, !0), () => {
|
|
413
413
|
window.removeEventListener("afterprint", f, !0);
|
|
414
414
|
};
|
|
415
|
-
}, [P,
|
|
415
|
+
}, [P, p]), {
|
|
416
416
|
print: h,
|
|
417
417
|
cancel: v,
|
|
418
418
|
progress: n,
|
|
@@ -438,9 +438,9 @@ const So = () => {
|
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
440
|
}), Ms = ({ children: t }) => {
|
|
441
|
-
const [e, n] = $(null), [o, r] = $(null), { print: a, cancel: l, progress: c, isComplete: d, isError:
|
|
441
|
+
const [e, n] = $(null), [o, r] = $(null), { print: a, cancel: l, progress: c, isComplete: d, isError: u, error: m } = So(), P = N((C) => {
|
|
442
442
|
C && typeof C == "function" && r(() => C);
|
|
443
|
-
}, []),
|
|
443
|
+
}, []), p = (C) => {
|
|
444
444
|
m && C(m);
|
|
445
445
|
}, v = N(
|
|
446
446
|
(C) => {
|
|
@@ -451,65 +451,65 @@ const So = () => {
|
|
|
451
451
|
F(() => {
|
|
452
452
|
d && o && _();
|
|
453
453
|
}, [d, o]), F(() => {
|
|
454
|
-
|
|
454
|
+
u && p((C) => {
|
|
455
455
|
console.error(C);
|
|
456
456
|
});
|
|
457
|
-
}, [
|
|
457
|
+
}, [u]), F(() => {
|
|
458
458
|
c && e && e(c);
|
|
459
459
|
}, [c, e]);
|
|
460
460
|
const _ = () => {
|
|
461
461
|
o && (o(), r(null));
|
|
462
|
-
},
|
|
462
|
+
}, S = {
|
|
463
463
|
print: a,
|
|
464
464
|
cancel: l,
|
|
465
465
|
setOnProgress: v,
|
|
466
466
|
setOnComplete: P,
|
|
467
|
-
setOnError:
|
|
467
|
+
setOnError: p,
|
|
468
468
|
progress: c
|
|
469
469
|
};
|
|
470
|
-
return /* @__PURE__ */ i(bn.Provider, { value:
|
|
470
|
+
return /* @__PURE__ */ i(bn.Provider, { value: S, children: t });
|
|
471
471
|
}, tt = () => {
|
|
472
472
|
const t = Je(bn);
|
|
473
473
|
if (!t)
|
|
474
474
|
throw new Error("usePrintContext must be used within a PrintProvider");
|
|
475
475
|
return t;
|
|
476
|
-
},
|
|
476
|
+
}, xo = () => {
|
|
477
477
|
const [t, e] = $({}), { pages: n } = Q(), { rotate: o } = Ge(), r = k(() => Object.keys(t).length, [t]), a = N(
|
|
478
478
|
(c) => {
|
|
479
479
|
if (!n.size)
|
|
480
480
|
return;
|
|
481
|
-
const d = c > n.size ? n.size : c,
|
|
481
|
+
const d = c > n.size ? n.size : c, u = Array.from(n.values()).slice(0, d).map((p) => {
|
|
482
482
|
const { thumbnailViewport: v, scale: _ } = Wt(
|
|
483
|
-
|
|
484
|
-
o +
|
|
483
|
+
p.page,
|
|
484
|
+
o + p.defaultRotation
|
|
485
485
|
);
|
|
486
486
|
return {
|
|
487
487
|
scale: _,
|
|
488
|
-
page:
|
|
488
|
+
page: p.page,
|
|
489
489
|
loading: !0,
|
|
490
490
|
viewport: v,
|
|
491
|
-
defaultRotation:
|
|
491
|
+
defaultRotation: p.defaultRotation
|
|
492
492
|
};
|
|
493
|
-
}), m =
|
|
493
|
+
}), m = u.reduce((p, v) => (p[v.page.pageNumber] = v, p), {});
|
|
494
494
|
e(m);
|
|
495
495
|
const P = [];
|
|
496
|
-
for (const
|
|
497
|
-
const v = document.createElement("canvas"), _ = vt(
|
|
498
|
-
scale:
|
|
499
|
-
rotate: o +
|
|
496
|
+
for (const p of u) {
|
|
497
|
+
const v = document.createElement("canvas"), _ = vt(p.page, v, {
|
|
498
|
+
scale: p.scale,
|
|
499
|
+
rotate: o + p.defaultRotation
|
|
500
500
|
}).promise.then(() => {
|
|
501
|
-
const
|
|
501
|
+
const S = v.toDataURL();
|
|
502
502
|
return {
|
|
503
|
-
...
|
|
504
|
-
thumbnailSrc:
|
|
503
|
+
...p,
|
|
504
|
+
thumbnailSrc: S,
|
|
505
505
|
loading: !1
|
|
506
506
|
};
|
|
507
507
|
});
|
|
508
508
|
P.push(_);
|
|
509
509
|
}
|
|
510
|
-
Promise.all(P).then((
|
|
511
|
-
const v =
|
|
512
|
-
(_,
|
|
510
|
+
Promise.all(P).then((p) => {
|
|
511
|
+
const v = p.reduce(
|
|
512
|
+
(_, S) => (_[S.page.pageNumber] = S, _),
|
|
513
513
|
{}
|
|
514
514
|
);
|
|
515
515
|
e((_) => ({ ..._, ...v }));
|
|
@@ -537,11 +537,11 @@ const So = () => {
|
|
|
537
537
|
scale: d.thumbnailScale
|
|
538
538
|
}
|
|
539
539
|
}));
|
|
540
|
-
const
|
|
541
|
-
vt(d.page,
|
|
542
|
-
const m =
|
|
540
|
+
const u = document.createElement("canvas");
|
|
541
|
+
vt(d.page, u, { scale: d.thumbnailScale, rotate: o }).promise.then(() => {
|
|
542
|
+
const m = u.toDataURL(), { thumbnailViewport: P, scale: p } = Wt(d.page, o);
|
|
543
543
|
return {
|
|
544
|
-
scale:
|
|
544
|
+
scale: p,
|
|
545
545
|
thumbnailSrc: m,
|
|
546
546
|
page: d.page,
|
|
547
547
|
loading: !1,
|
|
@@ -568,7 +568,7 @@ const So = () => {
|
|
|
568
568
|
children: t,
|
|
569
569
|
initialThumbnailsVisible: e
|
|
570
570
|
}) => {
|
|
571
|
-
const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a } =
|
|
571
|
+
const { thumbnailPages: n, addPage: o, addToPage: r, thumbnailLength: a } = xo(), [l, c] = $(e);
|
|
572
572
|
return /* @__PURE__ */ i(
|
|
573
573
|
Cn.Provider,
|
|
574
574
|
{
|
|
@@ -576,8 +576,8 @@ const So = () => {
|
|
|
576
576
|
children: t
|
|
577
577
|
}
|
|
578
578
|
);
|
|
579
|
-
},
|
|
580
|
-
const [n, o] = $(e), [r, a] = $(!1), { pdf: l, pages: c } = Q(), { widths: d, heights:
|
|
579
|
+
}, Io = (t = {}, e = "") => {
|
|
580
|
+
const [n, o] = $(e), [r, a] = $(!1), { pdf: l, pages: c } = Q(), { widths: d, heights: u } = Ue(), m = H(!n), { currentZoom: P } = Qe(), [p, v] = $([]), { setFocusedPage: _ } = ie(), { columnCount: S } = Ee(), { rotate: C } = Ge(), [T, h] = $(0), { pageScrollElementRef: f, virtualScrollableElementRef: g } = et(), { scrollMode: s } = Le(), { pagesRef: w } = ge(), [b, y] = $(null), E = H({}), x = k(() => T === 0 ? null : p[T - 1], [T, p]), R = k(() => p.length, [p]);
|
|
581
581
|
F(() => {
|
|
582
582
|
if (!x || !c)
|
|
583
583
|
return;
|
|
@@ -589,17 +589,17 @@ const So = () => {
|
|
|
589
589
|
return;
|
|
590
590
|
let O = 0, M = 0;
|
|
591
591
|
if (s === J.VERTICAL_SCROLLING) {
|
|
592
|
-
const ae = x.page - 1, de =
|
|
593
|
-
O = Ae(
|
|
592
|
+
const ae = x.page - 1, de = S, te = ae % de, Fe = Math.floor(ae / de);
|
|
593
|
+
O = Ae(u, Fe), M = Ae(d, te);
|
|
594
594
|
}
|
|
595
595
|
s === J.HORIZONTAL_SCROLLING && (M = d.slice(0, x.page - 1).reduce((ae, de) => ae + de, 0));
|
|
596
596
|
const G = {
|
|
597
597
|
top: w.clientHeight / 2,
|
|
598
598
|
left: w.clientWidth / 2
|
|
599
599
|
}, Z = {
|
|
600
|
-
height:
|
|
600
|
+
height: u[x.page - 1],
|
|
601
601
|
width: d[x.page - 1]
|
|
602
|
-
}, { leftInPage: j, topInPage: q } =
|
|
602
|
+
}, { leftInPage: j, topInPage: q } = Zr(
|
|
603
603
|
Z,
|
|
604
604
|
G,
|
|
605
605
|
x.rect,
|
|
@@ -616,7 +616,7 @@ const So = () => {
|
|
|
616
616
|
c,
|
|
617
617
|
_,
|
|
618
618
|
d,
|
|
619
|
-
|
|
619
|
+
u,
|
|
620
620
|
x,
|
|
621
621
|
s,
|
|
622
622
|
g,
|
|
@@ -647,7 +647,7 @@ const So = () => {
|
|
|
647
647
|
m.current = !1, a(!0), v([]), h(0), A(l).then((L) => {
|
|
648
648
|
E.current = L;
|
|
649
649
|
const O = Object.keys(L).reduce((M, G) => {
|
|
650
|
-
const Z =
|
|
650
|
+
const Z = lr(
|
|
651
651
|
[n],
|
|
652
652
|
L[G],
|
|
653
653
|
Number(G) - 1,
|
|
@@ -663,14 +663,14 @@ const So = () => {
|
|
|
663
663
|
search: n,
|
|
664
664
|
setSearch: o,
|
|
665
665
|
loading: r,
|
|
666
|
-
matches:
|
|
666
|
+
matches: p,
|
|
667
667
|
totalMatches: R,
|
|
668
668
|
currentMatchPosition: T,
|
|
669
669
|
currentMatch: x,
|
|
670
670
|
nextMatch: z,
|
|
671
671
|
prevMatch: D,
|
|
672
672
|
currentMatchElement: b,
|
|
673
|
-
setCurrentMatchElement:
|
|
673
|
+
setCurrentMatchElement: y
|
|
674
674
|
};
|
|
675
675
|
}, Tn = Ye({
|
|
676
676
|
search: "",
|
|
@@ -700,13 +700,13 @@ const So = () => {
|
|
|
700
700
|
totalMatches: l,
|
|
701
701
|
currentMatchPosition: c,
|
|
702
702
|
currentMatch: d,
|
|
703
|
-
search:
|
|
703
|
+
search: u,
|
|
704
704
|
matches: m,
|
|
705
705
|
nextMatch: P,
|
|
706
|
-
prevMatch:
|
|
706
|
+
prevMatch: p,
|
|
707
707
|
currentMatchElement: v,
|
|
708
708
|
setCurrentMatchElement: _
|
|
709
|
-
} =
|
|
709
|
+
} = Io(n, e);
|
|
710
710
|
return /* @__PURE__ */ i(
|
|
711
711
|
Tn.Provider,
|
|
712
712
|
{
|
|
@@ -719,8 +719,8 @@ const So = () => {
|
|
|
719
719
|
currentMatchPosition: c,
|
|
720
720
|
currentMatch: d,
|
|
721
721
|
nextMatch: P,
|
|
722
|
-
prevMatch:
|
|
723
|
-
search:
|
|
722
|
+
prevMatch: p,
|
|
723
|
+
search: u,
|
|
724
724
|
matches: m,
|
|
725
725
|
currentMatchElement: v,
|
|
726
726
|
setCurrentMatchElement: _
|
|
@@ -729,31 +729,31 @@ const So = () => {
|
|
|
729
729
|
}
|
|
730
730
|
);
|
|
731
731
|
}, xt = () => Je(Tn), ue = {
|
|
732
|
-
"rp-pages": "_rp-
|
|
733
|
-
"rp-pages-horizontal-scroll": "_rp-pages-horizontal-
|
|
734
|
-
"rp-pages-container": "_rp-pages-
|
|
735
|
-
"rp-page-scrolling-wrapper": "_rp-page-scrolling-
|
|
736
|
-
"rp-viewer": "_rp-
|
|
737
|
-
"rp-cursor-grab": "_rp-cursor-
|
|
738
|
-
"rp-cursor-grabbing": "_rp-cursor-
|
|
739
|
-
"rp-loader": "_rp-
|
|
732
|
+
"rp-pages": "_rp-pages_17t6t_1",
|
|
733
|
+
"rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_17t6t_7",
|
|
734
|
+
"rp-pages-container": "_rp-pages-container_17t6t_11",
|
|
735
|
+
"rp-page-scrolling-wrapper": "_rp-page-scrolling-wrapper_17t6t_48",
|
|
736
|
+
"rp-viewer": "_rp-viewer_17t6t_53",
|
|
737
|
+
"rp-cursor-grab": "_rp-cursor-grab_17t6t_58",
|
|
738
|
+
"rp-cursor-grabbing": "_rp-cursor-grabbing_17t6t_66",
|
|
739
|
+
"rp-loader": "_rp-loader_17t6t_74"
|
|
740
740
|
}, lt = {
|
|
741
741
|
"rp-page-wrapper": "_rp-page-wrapper_14ohm_1",
|
|
742
742
|
"rp-page": "_rp-page_14ohm_1",
|
|
743
743
|
"rp-loader-wrapper": "_rp-loader-wrapper_14ohm_15"
|
|
744
|
-
},
|
|
744
|
+
}, Ro = (t) => {
|
|
745
745
|
const { pageNumber: e, onLoaded: n, onLoading: o } = t, r = H(null), { pages: a } = Q(), { rotate: l } = Ge(), c = H(), { currentZoom: d } = Qe();
|
|
746
746
|
return F(() => {
|
|
747
747
|
if (!a || d === 0)
|
|
748
748
|
return;
|
|
749
|
-
const
|
|
750
|
-
if (r.current &&
|
|
749
|
+
const u = a.get(e);
|
|
750
|
+
if (r.current && u) {
|
|
751
751
|
const m = r.current;
|
|
752
752
|
m.hidden = !0;
|
|
753
753
|
const P = c.current;
|
|
754
|
-
P && P.cancel(), o && o(), c.current = vt(
|
|
754
|
+
P && P.cancel(), o && o(), c.current = vt(u.page, m, {
|
|
755
755
|
scale: d,
|
|
756
|
-
rotate: l +
|
|
756
|
+
rotate: l + u.defaultRotation,
|
|
757
757
|
renderForms: !0
|
|
758
758
|
}), c.current.promise.then(() => {
|
|
759
759
|
m.hidden = !1;
|
|
@@ -767,56 +767,56 @@ const So = () => {
|
|
|
767
767
|
(m = c.current) == null || m.cancel();
|
|
768
768
|
};
|
|
769
769
|
}, [a, e, l, d, o, n]), /* @__PURE__ */ i("canvas", { "data-rp": `page-${e}-canvas`, ref: r });
|
|
770
|
-
},
|
|
770
|
+
}, Lo = "_selecting_usdup_9", he = {
|
|
771
771
|
"rp-text-layer": "_rp-text-layer_usdup_1",
|
|
772
|
-
selecting:
|
|
772
|
+
selecting: Lo,
|
|
773
773
|
"rp-text-layer-text": "_rp-text-layer-text_usdup_39"
|
|
774
|
-
},
|
|
774
|
+
}, Eo = (t) => {
|
|
775
775
|
const { pageNumber: e } = t, { pages: n } = Q(), o = H(null), { matches: r, currentMatch: a, setCurrentMatchElement: l } = xt(), [c, d] = $(
|
|
776
776
|
[]
|
|
777
|
-
),
|
|
777
|
+
), u = H(), m = H(), P = H([]), p = k(() => r.filter((f) => f.pageIndex === e - 1), [r, e]), v = N(
|
|
778
778
|
(f, g, s = !1) => {
|
|
779
|
-
if (s &&
|
|
779
|
+
if (s && dr(f, g), !p.length) {
|
|
780
780
|
P.current = [], d([]);
|
|
781
781
|
return;
|
|
782
782
|
}
|
|
783
|
-
const w =
|
|
783
|
+
const w = ur(p, f, g);
|
|
784
784
|
d(w);
|
|
785
785
|
},
|
|
786
|
-
[
|
|
787
|
-
), _ = H(),
|
|
786
|
+
[p]
|
|
787
|
+
), _ = H(), S = H(!1), C = N(() => Array.from(document.querySelectorAll('[data-rp$="-textLayer"]')), []);
|
|
788
788
|
F(() => ((() => {
|
|
789
789
|
if (_.current)
|
|
790
790
|
return;
|
|
791
791
|
_.current = new AbortController();
|
|
792
792
|
const { signal: g } = _.current, s = () => {
|
|
793
793
|
C().forEach((b) => {
|
|
794
|
-
const
|
|
795
|
-
|
|
794
|
+
const y = b.querySelector(".endOfContent");
|
|
795
|
+
y && (b.appendChild(y), y.style.width = "", y.style.height = "", b.classList.remove(he.selecting));
|
|
796
796
|
});
|
|
797
797
|
};
|
|
798
798
|
document.addEventListener(
|
|
799
799
|
"pointerdown",
|
|
800
800
|
() => {
|
|
801
|
-
|
|
801
|
+
S.current = !0;
|
|
802
802
|
},
|
|
803
803
|
{ signal: g }
|
|
804
804
|
), document.addEventListener(
|
|
805
805
|
"pointerup",
|
|
806
806
|
() => {
|
|
807
|
-
|
|
807
|
+
S.current = !1, s();
|
|
808
808
|
},
|
|
809
809
|
{ signal: g }
|
|
810
810
|
), window.addEventListener(
|
|
811
811
|
"blur",
|
|
812
812
|
() => {
|
|
813
|
-
|
|
813
|
+
S.current = !1, s();
|
|
814
814
|
},
|
|
815
815
|
{ signal: g }
|
|
816
816
|
), document.addEventListener(
|
|
817
817
|
"keyup",
|
|
818
818
|
() => {
|
|
819
|
-
|
|
819
|
+
S.current || s();
|
|
820
820
|
},
|
|
821
821
|
{ signal: g }
|
|
822
822
|
);
|
|
@@ -832,15 +832,15 @@ const So = () => {
|
|
|
832
832
|
s();
|
|
833
833
|
return;
|
|
834
834
|
}
|
|
835
|
-
const
|
|
835
|
+
const y = /* @__PURE__ */ new Set();
|
|
836
836
|
for (let I = 0; I < b.rangeCount; I++) {
|
|
837
837
|
const O = b.getRangeAt(I);
|
|
838
838
|
C().forEach((M) => {
|
|
839
|
-
O.intersectsNode(M) && !
|
|
839
|
+
O.intersectsNode(M) && !y.has(M) && y.add(M);
|
|
840
840
|
});
|
|
841
841
|
}
|
|
842
842
|
C().forEach((I) => {
|
|
843
|
-
if (
|
|
843
|
+
if (y.has(I))
|
|
844
844
|
I.classList.add(he.selecting);
|
|
845
845
|
else {
|
|
846
846
|
const O = I.querySelector(".endOfContent");
|
|
@@ -871,7 +871,7 @@ const So = () => {
|
|
|
871
871
|
s.classList.remove("selected");
|
|
872
872
|
}), !c.length || !a || a.pageIndex !== e - 1)
|
|
873
873
|
return;
|
|
874
|
-
const f =
|
|
874
|
+
const f = p.findIndex(
|
|
875
875
|
(s) => JSON.stringify(s) === JSON.stringify(a)
|
|
876
876
|
);
|
|
877
877
|
if (f === -1)
|
|
@@ -880,38 +880,38 @@ const So = () => {
|
|
|
880
880
|
g.length && (P.current = g.map((s) => s.element), l(g[0].element), g.forEach((s) => {
|
|
881
881
|
s.element.classList.add("selected");
|
|
882
882
|
}));
|
|
883
|
-
}, [a, c,
|
|
883
|
+
}, [a, c, p]), F(() => {
|
|
884
884
|
const f = n.get(e);
|
|
885
885
|
if (!f || !o.current)
|
|
886
886
|
return;
|
|
887
887
|
const g = o.current;
|
|
888
|
-
return
|
|
888
|
+
return u.current && u.current.cancel(), f.page.getTextContent().then((s) => {
|
|
889
889
|
const w = f.page.getViewport({ scale: 1 });
|
|
890
|
-
return
|
|
890
|
+
return u.current = new Sr.TextLayer({
|
|
891
891
|
viewport: w,
|
|
892
892
|
textContentSource: s,
|
|
893
893
|
container: g
|
|
894
|
-
}), m.current = s, g && (g.innerText = ""),
|
|
894
|
+
}), m.current = s, g && (g.innerText = ""), u.current.render();
|
|
895
895
|
}).then(() => {
|
|
896
|
-
var
|
|
896
|
+
var y, E;
|
|
897
897
|
[].slice.call(g.children).forEach((x) => {
|
|
898
898
|
x.classList.add(he["rp-text-layer-text"]), x.setAttribute("data-rp", "rp-text-layer-text");
|
|
899
899
|
});
|
|
900
|
-
const w = (
|
|
900
|
+
const w = (y = u.current) == null ? void 0 : y.textDivs;
|
|
901
901
|
w && m.current && v(m.current, w);
|
|
902
902
|
const b = document.createElement("div");
|
|
903
903
|
b.className = "endOfContent", (E = o.current) == null || E.appendChild(b);
|
|
904
904
|
}).catch(() => {
|
|
905
905
|
}), () => {
|
|
906
906
|
var s;
|
|
907
|
-
(s =
|
|
907
|
+
(s = u.current) == null || s.cancel();
|
|
908
908
|
};
|
|
909
909
|
}, [n, e]), F(() => {
|
|
910
910
|
var s;
|
|
911
911
|
[].slice.call(o.current.children).forEach((w) => {
|
|
912
912
|
w.classList.add(he["rp-text-layer-text"]);
|
|
913
913
|
});
|
|
914
|
-
const g = (s =
|
|
914
|
+
const g = (s = u.current) == null ? void 0 : s.textDivs;
|
|
915
915
|
g && m.current && v(m.current, g, !0);
|
|
916
916
|
}, [v]), /* @__PURE__ */ i(
|
|
917
917
|
"div",
|
|
@@ -923,12 +923,12 @@ const So = () => {
|
|
|
923
923
|
onMouseUp: h
|
|
924
924
|
}
|
|
925
925
|
);
|
|
926
|
-
},
|
|
926
|
+
}, No = {
|
|
927
927
|
"rp-annotation-layer": "_rp-annotation-layer_1udza_1"
|
|
928
928
|
};
|
|
929
|
-
let
|
|
930
|
-
const
|
|
931
|
-
const { pageNumber: e } = t, n = H(null), { pages: o, pdf: r } = Q(), a = H(), [l, c] = $(), { setFocusedPage: d, goToPage:
|
|
929
|
+
let Oo = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
|
|
930
|
+
const zo = (t) => {
|
|
931
|
+
const { pageNumber: e } = t, n = H(null), { pages: o, pdf: r } = Q(), a = H(), [l, c] = $(), { setFocusedPage: d, goToPage: u } = ie(), { scrollMode: m } = Le(), { print: P } = tt(), { download: p } = Gn(), v = k(() => o.get(e), [o, e]), _ = k(() => v == null ? void 0 : v.page.getViewport(), [v]);
|
|
932
932
|
F(() => {
|
|
933
933
|
a.current && (a.current.div.replaceChildren(), a.current = void 0);
|
|
934
934
|
}, [r]), F(() => {
|
|
@@ -936,14 +936,14 @@ const Oo = (t) => {
|
|
|
936
936
|
a.current = void 0, c(C), n.current && (n.current.innerText = "");
|
|
937
937
|
});
|
|
938
938
|
}, [v]);
|
|
939
|
-
const
|
|
939
|
+
const S = N(
|
|
940
940
|
(C) => {
|
|
941
|
-
!l || !r || (
|
|
941
|
+
!l || !r || (Nr(C), Or(C, r, l).then((T) => {
|
|
942
942
|
var h, f;
|
|
943
|
-
((h = T == null ? void 0 : T.data) == null ? void 0 : h.action) === "Print" ? P() : ((f = T == null ? void 0 : T.data) == null ? void 0 : f.action) === "SaveAs" &&
|
|
944
|
-
}), m === J.PAGE_SCROLLING ? At(C, l, r, (T) => d(T.pageIndex + 1)) : At(C, l, r, (T) =>
|
|
943
|
+
((h = T == null ? void 0 : T.data) == null ? void 0 : h.action) === "Print" ? P() : ((f = T == null ? void 0 : T.data) == null ? void 0 : f.action) === "SaveAs" && p();
|
|
944
|
+
}), m === J.PAGE_SCROLLING ? At(C, l, r, (T) => d(T.pageIndex + 1)) : At(C, l, r, (T) => u(T.pageIndex + 1)));
|
|
945
945
|
},
|
|
946
|
-
[r, l,
|
|
946
|
+
[r, l, u, d, m, P, p]
|
|
947
947
|
);
|
|
948
948
|
return F(() => {
|
|
949
949
|
if (!v || !l)
|
|
@@ -960,17 +960,17 @@ const Oo = (t) => {
|
|
|
960
960
|
const { annotationType: s } = g;
|
|
961
961
|
switch (s) {
|
|
962
962
|
case Dt.Link:
|
|
963
|
-
|
|
963
|
+
Dr(g);
|
|
964
964
|
break;
|
|
965
965
|
case Dt.Widget:
|
|
966
|
-
|
|
966
|
+
zr(g, C, T);
|
|
967
967
|
break;
|
|
968
968
|
}
|
|
969
969
|
}
|
|
970
970
|
const h = new AbortController();
|
|
971
971
|
return (async () => {
|
|
972
972
|
var w;
|
|
973
|
-
a.current && (a.current.div.replaceChildren(), a.current = void 0), n.current && (n.current.innerText = ""), a.current = new
|
|
973
|
+
a.current && (a.current.div.replaceChildren(), a.current = void 0), n.current && (n.current.innerText = ""), a.current = new Lr({
|
|
974
974
|
div: n.current,
|
|
975
975
|
accessibilityManager: void 0,
|
|
976
976
|
annotationCanvasMap: void 0,
|
|
@@ -978,7 +978,7 @@ const Oo = (t) => {
|
|
|
978
978
|
structTreeLayer: null,
|
|
979
979
|
page: v.page,
|
|
980
980
|
viewport: C.clone({ dontFlip: !0 })
|
|
981
|
-
}), n.current && Ft(n.current,
|
|
981
|
+
}), n.current && Ft(n.current, S);
|
|
982
982
|
const g = await (r == null ? void 0 : r.hasJSActions()), s = await (r == null ? void 0 : r.getFieldObjects());
|
|
983
983
|
if (h.signal.aborted)
|
|
984
984
|
throw "abort";
|
|
@@ -990,35 +990,35 @@ const Oo = (t) => {
|
|
|
990
990
|
div: n.current,
|
|
991
991
|
viewport: C.clone({ dontFlip: !0 }),
|
|
992
992
|
page: v.page,
|
|
993
|
-
imageResourcesPath:
|
|
993
|
+
imageResourcesPath: Oo,
|
|
994
994
|
renderForms: !0,
|
|
995
|
-
linkService: new
|
|
995
|
+
linkService: new Er(),
|
|
996
996
|
downloadManager: null,
|
|
997
997
|
enableScripting: !1
|
|
998
998
|
});
|
|
999
999
|
})().then(() => {
|
|
1000
|
-
n.current &&
|
|
1000
|
+
n.current && Ar(n.current, S);
|
|
1001
1001
|
}).catch((g) => {
|
|
1002
1002
|
if (g !== "abort")
|
|
1003
1003
|
throw g;
|
|
1004
1004
|
}), () => {
|
|
1005
|
-
h.abort("clear"), n.current && Ft(n.current,
|
|
1005
|
+
h.abort("clear"), n.current && Ft(n.current, S);
|
|
1006
1006
|
};
|
|
1007
|
-
}, [r, l,
|
|
1007
|
+
}, [r, l, S]), /* @__PURE__ */ i(
|
|
1008
1008
|
"div",
|
|
1009
1009
|
{
|
|
1010
1010
|
"data-rp": `page-${e}-annotationLayer`,
|
|
1011
1011
|
style: { width: `${_ == null ? void 0 : _.width}px`, height: `${_ == null ? void 0 : _.height}px` },
|
|
1012
|
-
className:
|
|
1012
|
+
className: No["rp-annotation-layer"],
|
|
1013
1013
|
ref: n
|
|
1014
1014
|
}
|
|
1015
1015
|
);
|
|
1016
|
-
},
|
|
1016
|
+
}, Do = {
|
|
1017
1017
|
"rp-text-highlight": "_rp-text-highlight_jdkf8_1"
|
|
1018
|
-
},
|
|
1019
|
-
const [n, o] = $(), { pages: r } = Q(), { highlightKeywords: a } =
|
|
1018
|
+
}, Ao = ({ pageNumber: t, viewport: e }) => {
|
|
1019
|
+
const [n, o] = $(), { pages: r } = Q(), { highlightKeywords: a } = hr(), l = !0, c = H(null), [d, u] = $(null), [m, P] = $([]);
|
|
1020
1020
|
F(() => {
|
|
1021
|
-
c.current &&
|
|
1021
|
+
c.current && u(c.current.parentElement);
|
|
1022
1022
|
}, [c]), F(() => {
|
|
1023
1023
|
(async () => {
|
|
1024
1024
|
const f = r.get(t);
|
|
@@ -1028,10 +1028,10 @@ const Oo = (t) => {
|
|
|
1028
1028
|
o(g);
|
|
1029
1029
|
})();
|
|
1030
1030
|
}, [r, t]);
|
|
1031
|
-
const
|
|
1031
|
+
const p = k(() => a ? a.map((h) => {
|
|
1032
1032
|
var f, g;
|
|
1033
1033
|
return {
|
|
1034
|
-
...
|
|
1034
|
+
...Fr(h.keyword, (f = h.options) == null ? void 0 : f.matchCase, (g = h.options) == null ? void 0 : g.wholeWords),
|
|
1035
1035
|
color: h.highlightColor
|
|
1036
1036
|
};
|
|
1037
1037
|
}) : [], [a]);
|
|
@@ -1045,7 +1045,7 @@ const Oo = (t) => {
|
|
|
1045
1045
|
s(w);
|
|
1046
1046
|
return;
|
|
1047
1047
|
}
|
|
1048
|
-
new MutationObserver((
|
|
1048
|
+
new MutationObserver((y, E) => {
|
|
1049
1049
|
const x = h.querySelector(g);
|
|
1050
1050
|
x && (s(x), E.disconnect());
|
|
1051
1051
|
}).observe(h, { childList: !0, subtree: !0 });
|
|
@@ -1061,26 +1061,26 @@ const Oo = (t) => {
|
|
|
1061
1061
|
return;
|
|
1062
1062
|
}
|
|
1063
1063
|
new MutationObserver((w, b) => {
|
|
1064
|
-
const
|
|
1064
|
+
const y = h.querySelectorAll(
|
|
1065
1065
|
".rp-text-layer-text"
|
|
1066
1066
|
);
|
|
1067
|
-
|
|
1067
|
+
y.length && (f(Array.from(y)), b.disconnect());
|
|
1068
1068
|
}).observe(h, { childList: !0, subtree: !0 });
|
|
1069
1069
|
});
|
|
1070
1070
|
}
|
|
1071
|
-
const
|
|
1071
|
+
const S = (h, f, g, s) => {
|
|
1072
1072
|
var Z;
|
|
1073
1073
|
const w = document.createRange(), b = g.firstChild;
|
|
1074
1074
|
if (!b || b.nodeType !== Node.TEXT_NODE)
|
|
1075
1075
|
return null;
|
|
1076
|
-
const
|
|
1077
|
-
if (E >
|
|
1076
|
+
const y = ((Z = b.textContent) == null ? void 0 : Z.length) ?? 0, E = s[0].charIdxInSpan, x = s.length === 1 ? E : s[s.length - 1].charIdxInSpan;
|
|
1077
|
+
if (E > y || x + 1 > y)
|
|
1078
1078
|
return null;
|
|
1079
1079
|
w.setStart(b, E), w.setEnd(b, x + 1);
|
|
1080
1080
|
const R = document.createElement("span");
|
|
1081
1081
|
R.style.width = "auto", w.surroundContents(R);
|
|
1082
1082
|
const z = R.getBoundingClientRect(), D = h.getBoundingClientRect(), A = D.height, L = D.width, I = 100 * (z.left - D.left) / L, O = 100 * (z.top - D.top) / A, M = 100 * z.height / A, G = 100 * z.width / L;
|
|
1083
|
-
return
|
|
1083
|
+
return kr(R), {
|
|
1084
1084
|
keywordStr: f,
|
|
1085
1085
|
left: I,
|
|
1086
1086
|
top: O,
|
|
@@ -1096,8 +1096,8 @@ const Oo = (t) => {
|
|
|
1096
1096
|
return;
|
|
1097
1097
|
const s = await _(g);
|
|
1098
1098
|
if (s.length) {
|
|
1099
|
-
const w = s.map((
|
|
1100
|
-
(
|
|
1099
|
+
const w = s.map((y) => y.tagName === "BR" ? " " : y.textContent).reduce(
|
|
1100
|
+
(y, E, x) => y.concat(
|
|
1101
1101
|
E.split("").map((R, z) => ({
|
|
1102
1102
|
char: R,
|
|
1103
1103
|
charIdxInSpan: z,
|
|
@@ -1119,16 +1119,16 @@ const Oo = (t) => {
|
|
|
1119
1119
|
const w = f.length;
|
|
1120
1120
|
if (!s.length || !w)
|
|
1121
1121
|
return [];
|
|
1122
|
-
const b = [],
|
|
1123
|
-
return
|
|
1122
|
+
const b = [], y = s.map((E) => E.char).join("");
|
|
1123
|
+
return p.forEach((E) => {
|
|
1124
1124
|
const { keyword: x, regExp: R, wholeWords: z, color: D } = E, A = x;
|
|
1125
1125
|
if (!A.trim())
|
|
1126
1126
|
return;
|
|
1127
1127
|
const L = R.flags.indexOf("g") === -1 ? new RegExp(R, `${R.flags}g`) : R;
|
|
1128
1128
|
let I;
|
|
1129
1129
|
const O = [];
|
|
1130
|
-
for (; (I = L.exec(
|
|
1131
|
-
z && !
|
|
1130
|
+
for (; (I = L.exec(y)) !== null; )
|
|
1131
|
+
z && !pr(y, I.index, I[0].length) || O.push({
|
|
1132
1132
|
keyword: L,
|
|
1133
1133
|
startIndex: I.index,
|
|
1134
1134
|
endIndex: L.lastIndex
|
|
@@ -1145,7 +1145,7 @@ const Oo = (t) => {
|
|
|
1145
1145
|
);
|
|
1146
1146
|
for (const j of Object.values(Z))
|
|
1147
1147
|
if (j.length !== 1 || j[0].char.trim() !== "") {
|
|
1148
|
-
const q = j, ee = g[q[0].spanIdx], X =
|
|
1148
|
+
const q = j, ee = g[q[0].spanIdx], X = S(
|
|
1149
1149
|
h,
|
|
1150
1150
|
A,
|
|
1151
1151
|
ee,
|
|
@@ -1159,7 +1159,7 @@ const Oo = (t) => {
|
|
|
1159
1159
|
}
|
|
1160
1160
|
}
|
|
1161
1161
|
}
|
|
1162
|
-
}), b.sort(
|
|
1162
|
+
}), b.sort(Wr), b;
|
|
1163
1163
|
};
|
|
1164
1164
|
return F(() => {
|
|
1165
1165
|
(async () => {
|
|
@@ -1173,7 +1173,7 @@ const Oo = (t) => {
|
|
|
1173
1173
|
}, [l, a, t, n, e]), /* @__PURE__ */ i(me, { children: /* @__PURE__ */ i("div", { ref: c, "data-rp": `page-${t}-textHighlightLayer`, children: m.map((h, f) => /* @__PURE__ */ i(
|
|
1174
1174
|
"div",
|
|
1175
1175
|
{
|
|
1176
|
-
className:
|
|
1176
|
+
className: Do["rp-text-highlight"],
|
|
1177
1177
|
style: {
|
|
1178
1178
|
top: `${h.top}%`,
|
|
1179
1179
|
left: `${h.left}%`,
|
|
@@ -1185,20 +1185,20 @@ const Oo = (t) => {
|
|
|
1185
1185
|
f
|
|
1186
1186
|
)) }) });
|
|
1187
1187
|
}, It = $e((t, e) => {
|
|
1188
|
-
const { pageNumber: n, style: o, ...r } = t, { pages: a } = Q(), { rotate: l } = Ge(), { textLayer: c } =
|
|
1188
|
+
const { pageNumber: n, style: o, ...r } = t, { pages: a } = Q(), { rotate: l } = Ge(), { textLayer: c } = ir(), { currentZoom: d } = Qe(), u = H(a.get(n)), [m, P] = $(!1), p = H(null), [v, _] = $({
|
|
1189
1189
|
width: 0,
|
|
1190
1190
|
height: 0
|
|
1191
1191
|
});
|
|
1192
|
-
cn(e, () =>
|
|
1193
|
-
if (a && (
|
|
1194
|
-
const h =
|
|
1192
|
+
cn(e, () => p.current), F(() => {
|
|
1193
|
+
if (a && (u.current = a.get(n), u.current)) {
|
|
1194
|
+
const h = u.current.page.getViewport({
|
|
1195
1195
|
scale: d,
|
|
1196
|
-
rotation: l +
|
|
1196
|
+
rotation: l + u.current.defaultRotation
|
|
1197
1197
|
});
|
|
1198
1198
|
_(h);
|
|
1199
1199
|
}
|
|
1200
1200
|
}, [a, n, l, d]);
|
|
1201
|
-
const
|
|
1201
|
+
const S = k(() => {
|
|
1202
1202
|
switch (l) {
|
|
1203
1203
|
case 90:
|
|
1204
1204
|
return `${v.width / 2}px ${v.width / 2}px`;
|
|
@@ -1216,14 +1216,14 @@ const Oo = (t) => {
|
|
|
1216
1216
|
return /* @__PURE__ */ i(
|
|
1217
1217
|
"div",
|
|
1218
1218
|
{
|
|
1219
|
-
ref:
|
|
1219
|
+
ref: p,
|
|
1220
1220
|
id: `page-${n}`,
|
|
1221
1221
|
"data-rp": `page-${n}`,
|
|
1222
1222
|
...r,
|
|
1223
1223
|
style: {
|
|
1224
1224
|
...o,
|
|
1225
1225
|
"--rp-rotate": `${l}deg`,
|
|
1226
|
-
"--rp-page-rotate-translate": `${
|
|
1226
|
+
"--rp-page-rotate-translate": `${S}`,
|
|
1227
1227
|
"--scale-factor": d
|
|
1228
1228
|
},
|
|
1229
1229
|
className: lt["rp-page-wrapper"],
|
|
@@ -1236,11 +1236,11 @@ const Oo = (t) => {
|
|
|
1236
1236
|
},
|
|
1237
1237
|
className: lt["rp-page"],
|
|
1238
1238
|
children: [
|
|
1239
|
-
/* @__PURE__ */ i(
|
|
1239
|
+
/* @__PURE__ */ i(Ro, { onLoading: C, onLoaded: T, pageNumber: n }),
|
|
1240
1240
|
m && /* @__PURE__ */ i("div", { className: lt["rp-loader-wrapper"], children: /* @__PURE__ */ i(Ct, {}) }),
|
|
1241
|
-
c && /* @__PURE__ */ i(
|
|
1242
|
-
/* @__PURE__ */ i(
|
|
1243
|
-
/* @__PURE__ */ i(
|
|
1241
|
+
c && /* @__PURE__ */ i(Eo, { pageNumber: n }),
|
|
1242
|
+
/* @__PURE__ */ i(Ao, { pageNumber: n, viewport: v }),
|
|
1243
|
+
/* @__PURE__ */ i(zo, { pageNumber: n })
|
|
1244
1244
|
]
|
|
1245
1245
|
}
|
|
1246
1246
|
)
|
|
@@ -1257,25 +1257,25 @@ function wt(t, e) {
|
|
|
1257
1257
|
return n.__proto__ = o, n;
|
|
1258
1258
|
}, wt(t, e);
|
|
1259
1259
|
}
|
|
1260
|
-
function
|
|
1260
|
+
function Fo(t, e) {
|
|
1261
1261
|
t.prototype = Object.create(e.prototype), t.prototype.constructor = t, wt(t, e);
|
|
1262
1262
|
}
|
|
1263
1263
|
var Vt = Number.isNaN || function(e) {
|
|
1264
1264
|
return typeof e == "number" && e !== e;
|
|
1265
1265
|
};
|
|
1266
|
-
function
|
|
1266
|
+
function Wo(t, e) {
|
|
1267
1267
|
return !!(t === e || Vt(t) && Vt(e));
|
|
1268
1268
|
}
|
|
1269
|
-
function
|
|
1269
|
+
function ko(t, e) {
|
|
1270
1270
|
if (t.length !== e.length)
|
|
1271
1271
|
return !1;
|
|
1272
1272
|
for (var n = 0; n < t.length; n++)
|
|
1273
|
-
if (!
|
|
1273
|
+
if (!Wo(t[n], e[n]))
|
|
1274
1274
|
return !1;
|
|
1275
1275
|
return !0;
|
|
1276
1276
|
}
|
|
1277
1277
|
function dt(t, e) {
|
|
1278
|
-
e === void 0 && (e =
|
|
1278
|
+
e === void 0 && (e = ko);
|
|
1279
1279
|
var n, o = [], r, a = !1;
|
|
1280
1280
|
function l() {
|
|
1281
1281
|
for (var c = [], d = 0; d < arguments.length; d++)
|
|
@@ -1296,7 +1296,7 @@ function qt(t, e) {
|
|
|
1296
1296
|
}
|
|
1297
1297
|
return n;
|
|
1298
1298
|
}
|
|
1299
|
-
var
|
|
1299
|
+
var Mo = typeof performance == "object" && typeof performance.now == "function", Bt = Mo ? function() {
|
|
1300
1300
|
return performance.now();
|
|
1301
1301
|
} : function() {
|
|
1302
1302
|
return Date.now();
|
|
@@ -1304,7 +1304,7 @@ var ko = typeof performance == "object" && typeof performance.now == "function",
|
|
|
1304
1304
|
function Zt(t) {
|
|
1305
1305
|
cancelAnimationFrame(t.id);
|
|
1306
1306
|
}
|
|
1307
|
-
function
|
|
1307
|
+
function Ho(t, e) {
|
|
1308
1308
|
var n = Bt();
|
|
1309
1309
|
function o() {
|
|
1310
1310
|
Bt() - n >= e ? t.call(null) : r.id = requestAnimationFrame(o);
|
|
@@ -1315,7 +1315,7 @@ function Mo(t, e) {
|
|
|
1315
1315
|
return r;
|
|
1316
1316
|
}
|
|
1317
1317
|
var ut = -1;
|
|
1318
|
-
function
|
|
1318
|
+
function $o(t) {
|
|
1319
1319
|
if (t === void 0 && (t = !1), ut === -1 || t) {
|
|
1320
1320
|
var e = document.createElement("div"), n = e.style;
|
|
1321
1321
|
n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(e), ut = e.offsetWidth - e.clientWidth, document.body.removeChild(e);
|
|
@@ -1332,17 +1332,17 @@ function jt(t) {
|
|
|
1332
1332
|
}
|
|
1333
1333
|
return Oe;
|
|
1334
1334
|
}
|
|
1335
|
-
var
|
|
1335
|
+
var Go = 150, Uo = function(e) {
|
|
1336
1336
|
var n = e.columnIndex;
|
|
1337
1337
|
e.data;
|
|
1338
1338
|
var o = e.rowIndex;
|
|
1339
1339
|
return o + ":" + n;
|
|
1340
1340
|
}, Be = null, Ze = null, je = null;
|
|
1341
1341
|
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (Be = /* @__PURE__ */ new WeakSet(), Ze = /* @__PURE__ */ new WeakSet(), je = /* @__PURE__ */ new WeakSet());
|
|
1342
|
-
function
|
|
1343
|
-
var e, n = t.getColumnOffset, o = t.getColumnStartIndexForOffset, r = t.getColumnStopIndexForStartIndex, a = t.getColumnWidth, l = t.getEstimatedTotalHeight, c = t.getEstimatedTotalWidth, d = t.getOffsetForColumnAndAlignment,
|
|
1342
|
+
function Vo(t) {
|
|
1343
|
+
var e, n = t.getColumnOffset, o = t.getColumnStartIndexForOffset, r = t.getColumnStopIndexForStartIndex, a = t.getColumnWidth, l = t.getEstimatedTotalHeight, c = t.getEstimatedTotalWidth, d = t.getOffsetForColumnAndAlignment, u = t.getOffsetForRowAndAlignment, m = t.getRowHeight, P = t.getRowOffset, p = t.getRowStartIndexForOffset, v = t.getRowStopIndexForStartIndex, _ = t.initInstanceProps, S = t.shouldResetStyleCacheOnItemSizeChange, C = t.validateProps;
|
|
1344
1344
|
return e = /* @__PURE__ */ function(T) {
|
|
1345
|
-
|
|
1345
|
+
Fo(h, T);
|
|
1346
1346
|
function h(g) {
|
|
1347
1347
|
var s;
|
|
1348
1348
|
return s = T.call(this, g) || this, s._instanceProps = _(s.props, Ut(s)), s._resetIsScrollingTimeoutId = null, s._outerRef = void 0, s.state = {
|
|
@@ -1353,27 +1353,27 @@ function Uo(t) {
|
|
|
1353
1353
|
scrollTop: typeof s.props.initialScrollTop == "number" ? s.props.initialScrollTop : 0,
|
|
1354
1354
|
scrollUpdateWasRequested: !1,
|
|
1355
1355
|
verticalScrollDirection: "forward"
|
|
1356
|
-
}, s._callOnItemsRendered = void 0, s._callOnItemsRendered = dt(function(w, b,
|
|
1356
|
+
}, s._callOnItemsRendered = void 0, s._callOnItemsRendered = dt(function(w, b, y, E, x, R, z, D) {
|
|
1357
1357
|
return s.props.onItemsRendered({
|
|
1358
1358
|
overscanColumnStartIndex: w,
|
|
1359
1359
|
overscanColumnStopIndex: b,
|
|
1360
|
-
overscanRowStartIndex:
|
|
1360
|
+
overscanRowStartIndex: y,
|
|
1361
1361
|
overscanRowStopIndex: E,
|
|
1362
1362
|
visibleColumnStartIndex: x,
|
|
1363
1363
|
visibleColumnStopIndex: R,
|
|
1364
1364
|
visibleRowStartIndex: z,
|
|
1365
1365
|
visibleRowStopIndex: D
|
|
1366
1366
|
});
|
|
1367
|
-
}), s._callOnScroll = void 0, s._callOnScroll = dt(function(w, b,
|
|
1367
|
+
}), s._callOnScroll = void 0, s._callOnScroll = dt(function(w, b, y, E, x) {
|
|
1368
1368
|
return s.props.onScroll({
|
|
1369
|
-
horizontalScrollDirection:
|
|
1369
|
+
horizontalScrollDirection: y,
|
|
1370
1370
|
scrollLeft: w,
|
|
1371
1371
|
scrollTop: b,
|
|
1372
1372
|
verticalScrollDirection: E,
|
|
1373
1373
|
scrollUpdateWasRequested: x
|
|
1374
1374
|
});
|
|
1375
1375
|
}), s._getItemStyle = void 0, s._getItemStyle = function(w, b) {
|
|
1376
|
-
var
|
|
1376
|
+
var y = s.props, E = y.columnWidth, x = y.direction, R = y.rowHeight, z = s._getItemStyleCache(S && E, S && x, S && R), D = w + ":" + b, A;
|
|
1377
1377
|
if (z.hasOwnProperty(D))
|
|
1378
1378
|
A = z[D];
|
|
1379
1379
|
else {
|
|
@@ -1388,10 +1388,10 @@ function Uo(t) {
|
|
|
1388
1388
|
};
|
|
1389
1389
|
}
|
|
1390
1390
|
return A;
|
|
1391
|
-
}, s._getItemStyleCache = void 0, s._getItemStyleCache = dt(function(w, b,
|
|
1391
|
+
}, s._getItemStyleCache = void 0, s._getItemStyleCache = dt(function(w, b, y) {
|
|
1392
1392
|
return {};
|
|
1393
1393
|
}), s._onScroll = function(w) {
|
|
1394
|
-
var b = w.currentTarget,
|
|
1394
|
+
var b = w.currentTarget, y = b.clientHeight, E = b.clientWidth, x = b.scrollLeft, R = b.scrollTop, z = b.scrollHeight, D = b.scrollWidth;
|
|
1395
1395
|
s.setState(function(A) {
|
|
1396
1396
|
if (A.scrollLeft === x && A.scrollTop === R)
|
|
1397
1397
|
return null;
|
|
@@ -1406,7 +1406,7 @@ function Uo(t) {
|
|
|
1406
1406
|
break;
|
|
1407
1407
|
}
|
|
1408
1408
|
I = Math.max(0, Math.min(I, D - E));
|
|
1409
|
-
var O = Math.max(0, Math.min(R, z -
|
|
1409
|
+
var O = Math.max(0, Math.min(R, z - y));
|
|
1410
1410
|
return {
|
|
1411
1411
|
isScrolling: !0,
|
|
1412
1412
|
horizontalScrollDirection: A.scrollLeft < x ? "forward" : "backward",
|
|
@@ -1420,7 +1420,7 @@ function Uo(t) {
|
|
|
1420
1420
|
var b = s.props.outerRef;
|
|
1421
1421
|
s._outerRef = w, typeof b == "function" ? b(w) : b != null && typeof b == "object" && b.hasOwnProperty("current") && (b.current = w);
|
|
1422
1422
|
}, s._resetIsScrollingDebounced = function() {
|
|
1423
|
-
s._resetIsScrollingTimeoutId !== null && Zt(s._resetIsScrollingTimeoutId), s._resetIsScrollingTimeoutId =
|
|
1423
|
+
s._resetIsScrollingTimeoutId !== null && Zt(s._resetIsScrollingTimeoutId), s._resetIsScrollingTimeoutId = Ho(s._resetIsScrolling, Go);
|
|
1424
1424
|
}, s._resetIsScrolling = function() {
|
|
1425
1425
|
s._resetIsScrollingTimeoutId = null, s.setState({
|
|
1426
1426
|
isScrolling: !1
|
|
@@ -1430,37 +1430,37 @@ function Uo(t) {
|
|
|
1430
1430
|
}, s;
|
|
1431
1431
|
}
|
|
1432
1432
|
h.getDerivedStateFromProps = function(s, w) {
|
|
1433
|
-
return
|
|
1433
|
+
return qo(s, w), C(s), null;
|
|
1434
1434
|
};
|
|
1435
1435
|
var f = h.prototype;
|
|
1436
1436
|
return f.scrollTo = function(s) {
|
|
1437
1437
|
var w = s.scrollLeft, b = s.scrollTop;
|
|
1438
|
-
w !== void 0 && (w = Math.max(0, w)), b !== void 0 && (b = Math.max(0, b)), this.setState(function(
|
|
1439
|
-
return w === void 0 && (w =
|
|
1440
|
-
horizontalScrollDirection:
|
|
1438
|
+
w !== void 0 && (w = Math.max(0, w)), b !== void 0 && (b = Math.max(0, b)), this.setState(function(y) {
|
|
1439
|
+
return w === void 0 && (w = y.scrollLeft), b === void 0 && (b = y.scrollTop), y.scrollLeft === w && y.scrollTop === b ? null : {
|
|
1440
|
+
horizontalScrollDirection: y.scrollLeft < w ? "forward" : "backward",
|
|
1441
1441
|
scrollLeft: w,
|
|
1442
1442
|
scrollTop: b,
|
|
1443
1443
|
scrollUpdateWasRequested: !0,
|
|
1444
|
-
verticalScrollDirection:
|
|
1444
|
+
verticalScrollDirection: y.scrollTop < b ? "forward" : "backward"
|
|
1445
1445
|
};
|
|
1446
1446
|
}, this._resetIsScrollingDebounced);
|
|
1447
1447
|
}, f.scrollToItem = function(s) {
|
|
1448
|
-
var w = s.align, b = w === void 0 ? "auto" : w,
|
|
1449
|
-
|
|
1448
|
+
var w = s.align, b = w === void 0 ? "auto" : w, y = s.columnIndex, E = s.rowIndex, x = this.props, R = x.columnCount, z = x.height, D = x.rowCount, A = x.width, L = this.state, I = L.scrollLeft, O = L.scrollTop, M = $o();
|
|
1449
|
+
y !== void 0 && (y = Math.max(0, Math.min(y, R - 1))), E !== void 0 && (E = Math.max(0, Math.min(E, D - 1)));
|
|
1450
1450
|
var G = l(this.props, this._instanceProps), Z = c(this.props, this._instanceProps), j = Z > A ? M : 0, q = G > z ? M : 0;
|
|
1451
1451
|
this.scrollTo({
|
|
1452
|
-
scrollLeft:
|
|
1453
|
-
scrollTop: E !== void 0 ?
|
|
1452
|
+
scrollLeft: y !== void 0 ? d(this.props, y, b, I, this._instanceProps, q) : I,
|
|
1453
|
+
scrollTop: E !== void 0 ? u(this.props, E, b, O, this._instanceProps, j) : O
|
|
1454
1454
|
});
|
|
1455
1455
|
}, f.componentDidMount = function() {
|
|
1456
1456
|
var s = this.props, w = s.initialScrollLeft, b = s.initialScrollTop;
|
|
1457
1457
|
if (this._outerRef != null) {
|
|
1458
|
-
var
|
|
1459
|
-
typeof w == "number" && (
|
|
1458
|
+
var y = this._outerRef;
|
|
1459
|
+
typeof w == "number" && (y.scrollLeft = w), typeof b == "number" && (y.scrollTop = b);
|
|
1460
1460
|
}
|
|
1461
1461
|
this._callPropsCallbacks();
|
|
1462
1462
|
}, f.componentDidUpdate = function() {
|
|
1463
|
-
var s = this.props.direction, w = this.state, b = w.scrollLeft,
|
|
1463
|
+
var s = this.props.direction, w = this.state, b = w.scrollLeft, y = w.scrollTop, E = w.scrollUpdateWasRequested;
|
|
1464
1464
|
if (E && this._outerRef != null) {
|
|
1465
1465
|
var x = this._outerRef;
|
|
1466
1466
|
if (s === "rtl")
|
|
@@ -1478,14 +1478,14 @@ function Uo(t) {
|
|
|
1478
1478
|
}
|
|
1479
1479
|
else
|
|
1480
1480
|
x.scrollLeft = Math.max(0, b);
|
|
1481
|
-
x.scrollTop = Math.max(0,
|
|
1481
|
+
x.scrollTop = Math.max(0, y);
|
|
1482
1482
|
}
|
|
1483
1483
|
this._callPropsCallbacks();
|
|
1484
1484
|
}, f.componentWillUnmount = function() {
|
|
1485
1485
|
this._resetIsScrollingTimeoutId !== null && Zt(this._resetIsScrollingTimeoutId);
|
|
1486
1486
|
}, f.render = function() {
|
|
1487
|
-
var s = this.props, w = s.children, b = s.className,
|
|
1488
|
-
if (
|
|
1487
|
+
var s = this.props, w = s.children, b = s.className, y = s.columnCount, E = s.direction, x = s.height, R = s.innerRef, z = s.innerElementType, D = s.innerTagName, A = s.itemData, L = s.itemKey, I = L === void 0 ? Uo : L, O = s.outerElementType, M = s.outerTagName, G = s.rowCount, Z = s.style, j = s.useIsScrolling, q = s.width, ee = this.state.isScrolling, X = this._getHorizontalRangeToRender(), le = X[0], ae = X[1], de = this._getVerticalRangeToRender(), te = de[0], Fe = de[1], Ne = [];
|
|
1488
|
+
if (y > 0 && G)
|
|
1489
1489
|
for (var Pe = te; Pe <= Fe; Pe++)
|
|
1490
1490
|
for (var we = le; we <= ae; we++)
|
|
1491
1491
|
Ne.push(qe(w, {
|
|
@@ -1505,7 +1505,7 @@ function Uo(t) {
|
|
|
1505
1505
|
className: b,
|
|
1506
1506
|
onScroll: this._onScroll,
|
|
1507
1507
|
ref: this._outerRefSetter,
|
|
1508
|
-
style:
|
|
1508
|
+
style: Mr({
|
|
1509
1509
|
position: "relative",
|
|
1510
1510
|
height: x,
|
|
1511
1511
|
width: q,
|
|
@@ -1524,38 +1524,38 @@ function Uo(t) {
|
|
|
1524
1524
|
}
|
|
1525
1525
|
}));
|
|
1526
1526
|
}, f._callPropsCallbacks = function() {
|
|
1527
|
-
var s = this.props, w = s.columnCount, b = s.onItemsRendered,
|
|
1527
|
+
var s = this.props, w = s.columnCount, b = s.onItemsRendered, y = s.onScroll, E = s.rowCount;
|
|
1528
1528
|
if (typeof b == "function" && w > 0 && E > 0) {
|
|
1529
1529
|
var x = this._getHorizontalRangeToRender(), R = x[0], z = x[1], D = x[2], A = x[3], L = this._getVerticalRangeToRender(), I = L[0], O = L[1], M = L[2], G = L[3];
|
|
1530
1530
|
this._callOnItemsRendered(R, z, I, O, D, A, M, G);
|
|
1531
1531
|
}
|
|
1532
|
-
if (typeof
|
|
1532
|
+
if (typeof y == "function") {
|
|
1533
1533
|
var Z = this.state, j = Z.horizontalScrollDirection, q = Z.scrollLeft, ee = Z.scrollTop, X = Z.scrollUpdateWasRequested, le = Z.verticalScrollDirection;
|
|
1534
1534
|
this._callOnScroll(q, ee, j, le, X);
|
|
1535
1535
|
}
|
|
1536
1536
|
}, f._getHorizontalRangeToRender = function() {
|
|
1537
|
-
var s = this.props, w = s.columnCount, b = s.overscanColumnCount,
|
|
1537
|
+
var s = this.props, w = s.columnCount, b = s.overscanColumnCount, y = s.overscanColumnsCount, E = s.overscanCount, x = s.rowCount, R = this.state, z = R.horizontalScrollDirection, D = R.isScrolling, A = R.scrollLeft, L = b || y || E || 1;
|
|
1538
1538
|
if (w === 0 || x === 0)
|
|
1539
1539
|
return [0, 0, 0, 0];
|
|
1540
1540
|
var I = o(this.props, A, this._instanceProps), O = r(this.props, I, A, this._instanceProps), M = !D || z === "backward" ? Math.max(1, L) : 1, G = !D || z === "forward" ? Math.max(1, L) : 1;
|
|
1541
1541
|
return [Math.max(0, I - M), Math.max(0, Math.min(w - 1, O + G)), I, O];
|
|
1542
1542
|
}, f._getVerticalRangeToRender = function() {
|
|
1543
|
-
var s = this.props, w = s.columnCount, b = s.overscanCount,
|
|
1543
|
+
var s = this.props, w = s.columnCount, b = s.overscanCount, y = s.overscanRowCount, E = s.overscanRowsCount, x = s.rowCount, R = this.state, z = R.isScrolling, D = R.verticalScrollDirection, A = R.scrollTop, L = y || E || b || 1;
|
|
1544
1544
|
if (w === 0 || x === 0)
|
|
1545
1545
|
return [0, 0, 0, 0];
|
|
1546
|
-
var I =
|
|
1546
|
+
var I = p(this.props, A, this._instanceProps), O = v(this.props, I, A, this._instanceProps), M = !z || D === "backward" ? Math.max(1, L) : 1, G = !z || D === "forward" ? Math.max(1, L) : 1;
|
|
1547
1547
|
return [Math.max(0, I - M), Math.max(0, Math.min(x - 1, O + G)), I, O];
|
|
1548
1548
|
}, h;
|
|
1549
|
-
}(
|
|
1549
|
+
}(er), e.defaultProps = {
|
|
1550
1550
|
direction: "ltr",
|
|
1551
1551
|
itemData: void 0,
|
|
1552
1552
|
useIsScrolling: !1
|
|
1553
1553
|
}, e;
|
|
1554
1554
|
}
|
|
1555
|
-
var
|
|
1556
|
-
var o = e.children, r = e.direction, a = e.height, l = e.innerTagName, c = e.outerTagName, d = e.overscanColumnsCount,
|
|
1555
|
+
var qo = function(e, n) {
|
|
1556
|
+
var o = e.children, r = e.direction, a = e.height, l = e.innerTagName, c = e.outerTagName, d = e.overscanColumnsCount, u = e.overscanCount, m = e.overscanRowsCount, P = e.width, p = n.instance;
|
|
1557
1557
|
if (process.env.NODE_ENV !== "production") {
|
|
1558
|
-
if (typeof
|
|
1558
|
+
if (typeof u == "number" && Be && !Be.has(p) && (Be.add(p), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof d == "number" || typeof m == "number") && Ze && !Ze.has(p) && (Ze.add(p), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (l != null || c != null) && je && !je.has(p) && (je.add(p), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), o == null)
|
|
1559
1559
|
throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (o === null ? "null" : typeof o) + '" was specified.'));
|
|
1560
1560
|
switch (r) {
|
|
1561
1561
|
case "ltr":
|
|
@@ -1569,29 +1569,29 @@ var Vo = function(e, n) {
|
|
|
1569
1569
|
if (typeof a != "number")
|
|
1570
1570
|
throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (a === null ? "null" : typeof a) + '" was specified.'));
|
|
1571
1571
|
}
|
|
1572
|
-
}, Kt = 50,
|
|
1572
|
+
}, Kt = 50, yn = function(e, n) {
|
|
1573
1573
|
var o = e.rowCount, r = n.rowMetadataMap, a = n.estimatedRowHeight, l = n.lastMeasuredRowIndex, c = 0;
|
|
1574
1574
|
if (l >= o && (l = o - 1), l >= 0) {
|
|
1575
1575
|
var d = r[l];
|
|
1576
1576
|
c = d.offset + d.size;
|
|
1577
1577
|
}
|
|
1578
|
-
var
|
|
1578
|
+
var u = o - l - 1, m = u * a;
|
|
1579
1579
|
return c + m;
|
|
1580
|
-
},
|
|
1580
|
+
}, Sn = function(e, n) {
|
|
1581
1581
|
var o = e.columnCount, r = n.columnMetadataMap, a = n.estimatedColumnWidth, l = n.lastMeasuredColumnIndex, c = 0;
|
|
1582
1582
|
if (l >= o && (l = o - 1), l >= 0) {
|
|
1583
1583
|
var d = r[l];
|
|
1584
1584
|
c = d.offset + d.size;
|
|
1585
1585
|
}
|
|
1586
|
-
var
|
|
1586
|
+
var u = o - l - 1, m = u * a;
|
|
1587
1587
|
return c + m;
|
|
1588
1588
|
}, fe = function(e, n, o, r) {
|
|
1589
1589
|
var a, l, c;
|
|
1590
1590
|
if (e === "column" ? (a = r.columnMetadataMap, l = n.columnWidth, c = r.lastMeasuredColumnIndex) : (a = r.rowMetadataMap, l = n.rowHeight, c = r.lastMeasuredRowIndex), o > c) {
|
|
1591
1591
|
var d = 0;
|
|
1592
1592
|
if (c >= 0) {
|
|
1593
|
-
var
|
|
1594
|
-
d =
|
|
1593
|
+
var u = a[c];
|
|
1594
|
+
d = u.offset + u.size;
|
|
1595
1595
|
}
|
|
1596
1596
|
for (var m = c + 1; m <= o; m++) {
|
|
1597
1597
|
var P = l(m);
|
|
@@ -1607,7 +1607,7 @@ var Vo = function(e, n) {
|
|
|
1607
1607
|
var a, l;
|
|
1608
1608
|
e === "column" ? (a = o.columnMetadataMap, l = o.lastMeasuredColumnIndex) : (a = o.rowMetadataMap, l = o.lastMeasuredRowIndex);
|
|
1609
1609
|
var c = l > 0 ? a[l].offset : 0;
|
|
1610
|
-
return c >= r ? xn(e, n, o, l, 0, r) :
|
|
1610
|
+
return c >= r ? xn(e, n, o, l, 0, r) : Bo(e, n, o, Math.max(0, l), r);
|
|
1611
1611
|
}, xn = function(e, n, o, r, a, l) {
|
|
1612
1612
|
for (; a <= r; ) {
|
|
1613
1613
|
var c = a + Math.floor((r - a) / 2), d = fe(e, n, c, o).offset;
|
|
@@ -1616,24 +1616,24 @@ var Vo = function(e, n) {
|
|
|
1616
1616
|
d < l ? a = c + 1 : d > l && (r = c - 1);
|
|
1617
1617
|
}
|
|
1618
1618
|
return a > 0 ? a - 1 : 0;
|
|
1619
|
-
},
|
|
1619
|
+
}, Bo = function(e, n, o, r, a) {
|
|
1620
1620
|
for (var l = e === "column" ? n.columnCount : n.rowCount, c = 1; r < l && fe(e, n, r, o).offset < a; )
|
|
1621
1621
|
r += c, c *= 2;
|
|
1622
1622
|
return xn(e, n, o, Math.min(r, l - 1), Math.floor(r / 2), a);
|
|
1623
1623
|
}, Yt = function(e, n, o, r, a, l, c) {
|
|
1624
|
-
var d = e === "column" ? n.width : n.height,
|
|
1625
|
-
switch (r === "smart" && (a >=
|
|
1624
|
+
var d = e === "column" ? n.width : n.height, u = fe(e, n, o, l), m = e === "column" ? Sn(n, l) : yn(n, l), P = Math.max(0, Math.min(m - d, u.offset)), p = Math.max(0, u.offset - d + c + u.size);
|
|
1625
|
+
switch (r === "smart" && (a >= p - d && a <= P + d ? r = "auto" : r = "center"), r) {
|
|
1626
1626
|
case "start":
|
|
1627
1627
|
return P;
|
|
1628
1628
|
case "end":
|
|
1629
|
-
return
|
|
1629
|
+
return p;
|
|
1630
1630
|
case "center":
|
|
1631
|
-
return Math.round(
|
|
1631
|
+
return Math.round(p + (P - p) / 2);
|
|
1632
1632
|
case "auto":
|
|
1633
1633
|
default:
|
|
1634
|
-
return a >=
|
|
1634
|
+
return a >= p && a <= P ? a : p > P || a < p ? p : P;
|
|
1635
1635
|
}
|
|
1636
|
-
},
|
|
1636
|
+
}, Zo = /* @__PURE__ */ Vo({
|
|
1637
1637
|
getColumnOffset: function(e, n, o) {
|
|
1638
1638
|
return fe("column", e, n, o).offset;
|
|
1639
1639
|
},
|
|
@@ -1641,15 +1641,15 @@ var Vo = function(e, n) {
|
|
|
1641
1641
|
return Xt("column", e, o, n);
|
|
1642
1642
|
},
|
|
1643
1643
|
getColumnStopIndexForStartIndex: function(e, n, o, r) {
|
|
1644
|
-
for (var a = e.columnCount, l = e.width, c = fe("column", e, n, r), d = o + l,
|
|
1645
|
-
m++,
|
|
1644
|
+
for (var a = e.columnCount, l = e.width, c = fe("column", e, n, r), d = o + l, u = c.offset + c.size, m = n; m < a - 1 && u < d; )
|
|
1645
|
+
m++, u += fe("column", e, m, r).size;
|
|
1646
1646
|
return m;
|
|
1647
1647
|
},
|
|
1648
1648
|
getColumnWidth: function(e, n, o) {
|
|
1649
1649
|
return o.columnMetadataMap[n].size;
|
|
1650
1650
|
},
|
|
1651
|
-
getEstimatedTotalHeight:
|
|
1652
|
-
getEstimatedTotalWidth:
|
|
1651
|
+
getEstimatedTotalHeight: yn,
|
|
1652
|
+
getEstimatedTotalWidth: Sn,
|
|
1653
1653
|
getOffsetForColumnAndAlignment: function(e, n, o, r, a, l) {
|
|
1654
1654
|
return Yt("column", e, n, o, r, a, l);
|
|
1655
1655
|
},
|
|
@@ -1666,8 +1666,8 @@ var Vo = function(e, n) {
|
|
|
1666
1666
|
return Xt("row", e, o, n);
|
|
1667
1667
|
},
|
|
1668
1668
|
getRowStopIndexForStartIndex: function(e, n, o, r) {
|
|
1669
|
-
for (var a = e.rowCount, l = e.height, c = fe("row", e, n, r), d = o + l,
|
|
1670
|
-
m++,
|
|
1669
|
+
for (var a = e.rowCount, l = e.height, c = fe("row", e, n, r), d = o + l, u = c.offset + c.size, m = n; m < a - 1 && u < d; )
|
|
1670
|
+
m++, u += fe("row", e, m, r).size;
|
|
1671
1671
|
return m;
|
|
1672
1672
|
},
|
|
1673
1673
|
initInstanceProps: function(e, n) {
|
|
@@ -1690,8 +1690,8 @@ var Vo = function(e, n) {
|
|
|
1690
1690
|
shouldForceUpdate: d
|
|
1691
1691
|
});
|
|
1692
1692
|
}, n.resetAfterIndices = function(c) {
|
|
1693
|
-
var d = c.columnIndex,
|
|
1694
|
-
typeof d == "number" && (l.lastMeasuredColumnIndex = Math.min(l.lastMeasuredColumnIndex, d - 1)), typeof
|
|
1693
|
+
var d = c.columnIndex, u = c.rowIndex, m = c.shouldForceUpdate, P = m === void 0 ? !0 : m;
|
|
1694
|
+
typeof d == "number" && (l.lastMeasuredColumnIndex = Math.min(l.lastMeasuredColumnIndex, d - 1)), typeof u == "number" && (l.lastMeasuredRowIndex = Math.min(l.lastMeasuredRowIndex, u - 1)), n._getItemStyleCache(-1), P && n.forceUpdate();
|
|
1695
1695
|
}, l;
|
|
1696
1696
|
},
|
|
1697
1697
|
shouldResetStyleCacheOnItemSizeChange: !1,
|
|
@@ -1715,37 +1715,37 @@ function Jt(t, e) {
|
|
|
1715
1715
|
return !0;
|
|
1716
1716
|
return !1;
|
|
1717
1717
|
}
|
|
1718
|
-
var
|
|
1719
|
-
function
|
|
1720
|
-
var n = t.style, o = qt(t,
|
|
1718
|
+
var jo = ["style"], Ko = ["style"];
|
|
1719
|
+
function Xo(t, e) {
|
|
1720
|
+
var n = t.style, o = qt(t, jo), r = e.style, a = qt(e, Ko);
|
|
1721
1721
|
return !Jt(n, r) && !Jt(o, a);
|
|
1722
1722
|
}
|
|
1723
|
-
const
|
|
1724
|
-
const { viewMode: t } = Ee(), { scrollMode: e } = Le(), { setColumnCount: n } = un(), { virtualScrollableElementRef: o } = et(), r = Ue(), a = k(() => r.heights.length, [r.heights]), l = k(() => e === J.HORIZONTAL_SCROLLING ? a : t === Ie.DUAL_PAGE ? 2 : 1, [t, e, e, a, o]), c = k(() => r.widths.reduce((_,
|
|
1723
|
+
const Yo = () => {
|
|
1724
|
+
const { viewMode: t } = Ee(), { scrollMode: e } = Le(), { setColumnCount: n } = un(), { virtualScrollableElementRef: o } = et(), r = Ue(), a = k(() => r.heights.length, [r.heights]), l = k(() => e === J.HORIZONTAL_SCROLLING ? a : t === Ie.DUAL_PAGE ? 2 : 1, [t, e, e, a, o]), c = k(() => r.widths.reduce((_, S, C) => {
|
|
1725
1725
|
const T = C % l;
|
|
1726
|
-
return (!_[T] ||
|
|
1726
|
+
return (!_[T] || S > _[T]) && (_[T] = S), _;
|
|
1727
1727
|
}, []), [r.widths, l]), d = N(
|
|
1728
1728
|
(v) => {
|
|
1729
1729
|
const _ = v % c.length;
|
|
1730
1730
|
return c[_] || 0;
|
|
1731
1731
|
},
|
|
1732
1732
|
[c]
|
|
1733
|
-
),
|
|
1733
|
+
), u = N(
|
|
1734
1734
|
(v) => r.heights[v] || 0,
|
|
1735
1735
|
[r.heights]
|
|
1736
1736
|
);
|
|
1737
1737
|
F(() => {
|
|
1738
1738
|
n(l);
|
|
1739
1739
|
}, [l, n]);
|
|
1740
|
-
const m = k(() => e === J.HORIZONTAL_SCROLLING || e === J.PAGE_SCROLLING ? 1 : Math.round(a / l), [l, a, e]), P = k(() => r.heights.reduce((v, _) => v + _, 0) / r.heights.length || 0, [r]),
|
|
1740
|
+
const m = k(() => e === J.HORIZONTAL_SCROLLING || e === J.PAGE_SCROLLING ? 1 : Math.round(a / l), [l, a, e]), P = k(() => r.heights.reduce((v, _) => v + _, 0) / r.heights.length || 0, [r]), p = k(() => r.widths.reduce((v, _) => v + _, 0) / r.heights.length || 0, [r]);
|
|
1741
1741
|
return {
|
|
1742
1742
|
rowCount: m,
|
|
1743
|
-
rowHeight:
|
|
1743
|
+
rowHeight: u,
|
|
1744
1744
|
columnCount: l,
|
|
1745
1745
|
columnWidth: d,
|
|
1746
1746
|
pageDimension: r,
|
|
1747
1747
|
estimatedRowHeight: P,
|
|
1748
|
-
estimatedColumnWidth:
|
|
1748
|
+
estimatedColumnWidth: p
|
|
1749
1749
|
};
|
|
1750
1750
|
};
|
|
1751
1751
|
let oe;
|
|
@@ -1764,7 +1764,7 @@ ht == null || tn == null ? (_t = pt, bt = function(e) {
|
|
|
1764
1764
|
}, Qt);
|
|
1765
1765
|
return [n, o];
|
|
1766
1766
|
});
|
|
1767
|
-
function
|
|
1767
|
+
function Jo(t) {
|
|
1768
1768
|
let e, n, o, r, a, l, c;
|
|
1769
1769
|
const d = typeof document < "u" && document.attachEvent;
|
|
1770
1770
|
if (!d) {
|
|
@@ -1783,60 +1783,60 @@ function Yo(t) {
|
|
|
1783
1783
|
}));
|
|
1784
1784
|
});
|
|
1785
1785
|
};
|
|
1786
|
-
let
|
|
1786
|
+
let p = !1, v = "";
|
|
1787
1787
|
o = "animationstart";
|
|
1788
1788
|
const _ = "Webkit Moz O ms".split(" ");
|
|
1789
|
-
let
|
|
1789
|
+
let S = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), C = "";
|
|
1790
1790
|
{
|
|
1791
1791
|
const T = document.createElement("fakeelement");
|
|
1792
|
-
if (T.style.animationName !== void 0 && (
|
|
1792
|
+
if (T.style.animationName !== void 0 && (p = !0), p === !1) {
|
|
1793
1793
|
for (let h = 0; h < _.length; h++)
|
|
1794
1794
|
if (T.style[_[h] + "AnimationName"] !== void 0) {
|
|
1795
|
-
C = _[h], v = "-" + C.toLowerCase() + "-", o =
|
|
1795
|
+
C = _[h], v = "-" + C.toLowerCase() + "-", o = S[h], p = !0;
|
|
1796
1796
|
break;
|
|
1797
1797
|
}
|
|
1798
1798
|
}
|
|
1799
1799
|
}
|
|
1800
1800
|
n = "resizeanim", e = "@" + v + "keyframes " + n + " { from { opacity: 0; } to { opacity: 0; } } ", r = v + "animation: 1ms " + n + "; ";
|
|
1801
1801
|
}
|
|
1802
|
-
const
|
|
1803
|
-
if (!
|
|
1804
|
-
const v = (e || "") + ".resize-triggers { " + (r || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', _ =
|
|
1805
|
-
|
|
1802
|
+
const u = function(p) {
|
|
1803
|
+
if (!p.getElementById("detectElementResize")) {
|
|
1804
|
+
const v = (e || "") + ".resize-triggers { " + (r || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', _ = p.head || p.getElementsByTagName("head")[0], S = p.createElement("style");
|
|
1805
|
+
S.id = "detectElementResize", S.type = "text/css", t != null && S.setAttribute("nonce", t), S.styleSheet ? S.styleSheet.cssText = v : S.appendChild(p.createTextNode(v)), _.appendChild(S);
|
|
1806
1806
|
}
|
|
1807
1807
|
};
|
|
1808
1808
|
return {
|
|
1809
|
-
addResizeListener: function(
|
|
1809
|
+
addResizeListener: function(p, v) {
|
|
1810
1810
|
if (d)
|
|
1811
|
-
|
|
1811
|
+
p.attachEvent("onresize", v);
|
|
1812
1812
|
else {
|
|
1813
|
-
if (!
|
|
1814
|
-
const _ =
|
|
1815
|
-
|
|
1813
|
+
if (!p.__resizeTriggers__) {
|
|
1814
|
+
const _ = p.ownerDocument, S = oe.getComputedStyle(p);
|
|
1815
|
+
S && S.position === "static" && (p.style.position = "relative"), u(_), p.__resizeLast__ = {}, p.__resizeListeners__ = [], (p.__resizeTriggers__ = _.createElement("div")).className = "resize-triggers";
|
|
1816
1816
|
const C = _.createElement("div");
|
|
1817
1817
|
C.className = "expand-trigger", C.appendChild(_.createElement("div"));
|
|
1818
1818
|
const T = _.createElement("div");
|
|
1819
|
-
T.className = "contract-trigger",
|
|
1820
|
-
f.animationName === n && l(
|
|
1821
|
-
},
|
|
1819
|
+
T.className = "contract-trigger", p.__resizeTriggers__.appendChild(C), p.__resizeTriggers__.appendChild(T), p.appendChild(p.__resizeTriggers__), l(p), p.addEventListener("scroll", c, !0), o && (p.__resizeTriggers__.__animationListener__ = function(f) {
|
|
1820
|
+
f.animationName === n && l(p);
|
|
1821
|
+
}, p.__resizeTriggers__.addEventListener(o, p.__resizeTriggers__.__animationListener__));
|
|
1822
1822
|
}
|
|
1823
|
-
|
|
1823
|
+
p.__resizeListeners__.push(v);
|
|
1824
1824
|
}
|
|
1825
1825
|
},
|
|
1826
|
-
removeResizeListener: function(
|
|
1826
|
+
removeResizeListener: function(p, v) {
|
|
1827
1827
|
if (d)
|
|
1828
|
-
|
|
1829
|
-
else if (
|
|
1830
|
-
|
|
1828
|
+
p.detachEvent("onresize", v);
|
|
1829
|
+
else if (p.__resizeListeners__.splice(p.__resizeListeners__.indexOf(v), 1), !p.__resizeListeners__.length) {
|
|
1830
|
+
p.removeEventListener("scroll", c, !0), p.__resizeTriggers__.__animationListener__ && (p.__resizeTriggers__.removeEventListener(o, p.__resizeTriggers__.__animationListener__), p.__resizeTriggers__.__animationListener__ = null);
|
|
1831
1831
|
try {
|
|
1832
|
-
|
|
1832
|
+
p.__resizeTriggers__ = !p.removeChild(p.__resizeTriggers__);
|
|
1833
1833
|
} catch {
|
|
1834
1834
|
}
|
|
1835
1835
|
}
|
|
1836
1836
|
}
|
|
1837
1837
|
};
|
|
1838
1838
|
}
|
|
1839
|
-
class
|
|
1839
|
+
class Qo extends tr {
|
|
1840
1840
|
constructor(...e) {
|
|
1841
1841
|
super(...e), this.state = {
|
|
1842
1842
|
height: this.props.defaultHeight || 0,
|
|
@@ -1851,16 +1851,16 @@ class Jo extends er {
|
|
|
1851
1851
|
onResize: r
|
|
1852
1852
|
} = this.props;
|
|
1853
1853
|
if (this._parentNode) {
|
|
1854
|
-
const a = window.getComputedStyle(this._parentNode) || {}, l = parseFloat(a.paddingLeft || "0"), c = parseFloat(a.paddingRight || "0"), d = parseFloat(a.paddingTop || "0"),
|
|
1855
|
-
(!n && (this.state.height !== v || this.state.scaledHeight !== P) || !o && (this.state.width !== _ || this.state.scaledWidth !==
|
|
1854
|
+
const a = window.getComputedStyle(this._parentNode) || {}, l = parseFloat(a.paddingLeft || "0"), c = parseFloat(a.paddingRight || "0"), d = parseFloat(a.paddingTop || "0"), u = parseFloat(a.paddingBottom || "0"), m = this._parentNode.getBoundingClientRect(), P = m.height - d - u, p = m.width - l - c, v = this._parentNode.offsetHeight - d - u, _ = this._parentNode.offsetWidth - l - c;
|
|
1855
|
+
(!n && (this.state.height !== v || this.state.scaledHeight !== P) || !o && (this.state.width !== _ || this.state.scaledWidth !== p)) && (this.setState({
|
|
1856
1856
|
height: v,
|
|
1857
1857
|
width: _,
|
|
1858
1858
|
scaledHeight: P,
|
|
1859
|
-
scaledWidth:
|
|
1859
|
+
scaledWidth: p
|
|
1860
1860
|
}), typeof r == "function" && r({
|
|
1861
1861
|
height: v,
|
|
1862
1862
|
scaledHeight: P,
|
|
1863
|
-
scaledWidth:
|
|
1863
|
+
scaledWidth: p,
|
|
1864
1864
|
width: _
|
|
1865
1865
|
}));
|
|
1866
1866
|
}
|
|
@@ -1877,7 +1877,7 @@ class Jo extends er {
|
|
|
1877
1877
|
const o = n.ownerDocument.defaultView.ResizeObserver;
|
|
1878
1878
|
o != null ? (this._resizeObserver = new o(() => {
|
|
1879
1879
|
this._timeoutId = setTimeout(this._onResize, 0);
|
|
1880
|
-
}), this._resizeObserver.observe(n)) : (this._detectElementResize =
|
|
1880
|
+
}), this._resizeObserver.observe(n)) : (this._detectElementResize = Jo(e), this._detectElementResize.addResizeListener(n, this._onResize)), this._onResize();
|
|
1881
1881
|
}
|
|
1882
1882
|
}
|
|
1883
1883
|
componentWillUnmount() {
|
|
@@ -1893,57 +1893,57 @@ class Jo extends er {
|
|
|
1893
1893
|
doNotBailOutOnEmptyChildren: l = !1,
|
|
1894
1894
|
nonce: c,
|
|
1895
1895
|
onResize: d,
|
|
1896
|
-
style:
|
|
1896
|
+
style: u = {},
|
|
1897
1897
|
tagName: m = "div",
|
|
1898
1898
|
...P
|
|
1899
1899
|
} = this.props, {
|
|
1900
|
-
height:
|
|
1900
|
+
height: p,
|
|
1901
1901
|
scaledHeight: v,
|
|
1902
1902
|
scaledWidth: _,
|
|
1903
|
-
width:
|
|
1903
|
+
width: S
|
|
1904
1904
|
} = this.state, C = {
|
|
1905
1905
|
overflow: "visible"
|
|
1906
1906
|
}, T = {};
|
|
1907
1907
|
let h = !1;
|
|
1908
|
-
return r || (
|
|
1908
|
+
return r || (p === 0 && (h = !0), C.height = 0, T.height = p, T.scaledHeight = v), a || (S === 0 && (h = !0), C.width = 0, T.width = S, T.scaledWidth = _), l && (h = !1), qe(m, {
|
|
1909
1909
|
ref: this._setRef,
|
|
1910
1910
|
style: {
|
|
1911
1911
|
...C,
|
|
1912
|
-
...
|
|
1912
|
+
...u
|
|
1913
1913
|
},
|
|
1914
1914
|
...P
|
|
1915
1915
|
}, !h && e(T));
|
|
1916
1916
|
}
|
|
1917
1917
|
}
|
|
1918
|
-
const
|
|
1918
|
+
const ei = ln(({ widths: t, heights: e }) => {
|
|
1919
1919
|
const { focusedPage: n, totalPages: o } = ie(), r = k(() => {
|
|
1920
1920
|
const c = [], d = Math.ceil(n / 2) * 2 - 1;
|
|
1921
1921
|
if (c.push(d), d + 1 <= o) {
|
|
1922
|
-
const
|
|
1923
|
-
c.push(
|
|
1922
|
+
const u = d + 1;
|
|
1923
|
+
c.push(u);
|
|
1924
1924
|
}
|
|
1925
1925
|
return c;
|
|
1926
1926
|
}, [n, o]), a = k(() => {
|
|
1927
|
-
const c = n % 2 === 1 ? n - 1 : n - 2, d = t(c),
|
|
1927
|
+
const c = n % 2 === 1 ? n - 1 : n - 2, d = t(c), u = e(c), m = t(c + 1), P = e(c + 1), p = u > P ? u : P, v = u < P ? u : P, _ = p / 2 - v / 2;
|
|
1928
1928
|
return [
|
|
1929
1929
|
{
|
|
1930
1930
|
position: "absolute",
|
|
1931
1931
|
left: 0,
|
|
1932
|
-
top:
|
|
1932
|
+
top: p === u ? 0 : _,
|
|
1933
1933
|
width: d,
|
|
1934
|
-
height:
|
|
1934
|
+
height: u
|
|
1935
1935
|
},
|
|
1936
1936
|
{
|
|
1937
1937
|
position: "absolute",
|
|
1938
1938
|
left: d,
|
|
1939
|
-
top:
|
|
1939
|
+
top: p === P ? 0 : _,
|
|
1940
1940
|
width: m,
|
|
1941
1941
|
height: P
|
|
1942
1942
|
}
|
|
1943
1943
|
];
|
|
1944
1944
|
}, [t, e, r]), l = k(() => a.reduce((c, d) => c + Number(d.width || 0), 0), [a]);
|
|
1945
1945
|
return /* @__PURE__ */ i("div", { style: { width: l, position: "relative" }, children: r.map((c, d) => /* @__PURE__ */ i(It, { style: a[d], pageNumber: c }, c)) });
|
|
1946
|
-
}),
|
|
1946
|
+
}), ti = ({ widths: t, heights: e }) => {
|
|
1947
1947
|
const { focusedPage: n } = ie(), o = k(() => ({
|
|
1948
1948
|
position: "absolute",
|
|
1949
1949
|
width: t(n - 1),
|
|
@@ -1959,11 +1959,11 @@ const Qo = ln(({ widths: t, heights: e }) => {
|
|
|
1959
1959
|
children: /* @__PURE__ */ i(It, { style: o, pageNumber: n }, n)
|
|
1960
1960
|
}
|
|
1961
1961
|
);
|
|
1962
|
-
},
|
|
1963
|
-
const o = H(), { contentRef: r } = ge(), { heights: a, widths: l } = Ue(), { setFocusedPage: c } = ie(), [d,
|
|
1964
|
-
const C = l[
|
|
1962
|
+
}, ni = (t, e, n) => {
|
|
1963
|
+
const o = H(), { contentRef: r } = ge(), { heights: a, widths: l } = Ue(), { setFocusedPage: c } = ie(), [d, u] = $([]), { targetScrollPage: m } = pn(), P = Pt(d, 0, 500), p = k(() => a.map((_, S) => {
|
|
1964
|
+
const C = l[S], T = qr(S + 1, t), h = C * T.columnIndex, f = _ * T.rowIndex, g = h + C, s = f + _;
|
|
1965
1965
|
return {
|
|
1966
|
-
pageNumber:
|
|
1966
|
+
pageNumber: S + 1,
|
|
1967
1967
|
...T,
|
|
1968
1968
|
width: C,
|
|
1969
1969
|
height: _,
|
|
@@ -1974,9 +1974,9 @@ const Qo = ln(({ widths: t, heights: e }) => {
|
|
|
1974
1974
|
};
|
|
1975
1975
|
}), [a, l, t, e]);
|
|
1976
1976
|
F(() => {
|
|
1977
|
-
var
|
|
1977
|
+
var S;
|
|
1978
1978
|
P.length > 0 && !m.current && c(P[0].pageNumber);
|
|
1979
|
-
let _ = (
|
|
1979
|
+
let _ = (S = P[0]) == null ? void 0 : S.ratio;
|
|
1980
1980
|
_ && P.filter((C) => Math.round(C.ratio) === Math.round(_)).some((C) => C.pageNumber === m.current) && setTimeout(() => {
|
|
1981
1981
|
m.current = void 0;
|
|
1982
1982
|
}, 500);
|
|
@@ -1984,25 +1984,25 @@ const Qo = ln(({ widths: t, heights: e }) => {
|
|
|
1984
1984
|
const v = N(
|
|
1985
1985
|
(_) => {
|
|
1986
1986
|
o.current && cancelAnimationFrame(o.current), o.current = requestAnimationFrame(() => {
|
|
1987
|
-
const
|
|
1988
|
-
startTop:
|
|
1989
|
-
startLeft:
|
|
1990
|
-
endTop:
|
|
1991
|
-
endLeft:
|
|
1992
|
-
}, T =
|
|
1987
|
+
const S = _.target, C = {
|
|
1988
|
+
startTop: S.scrollTop,
|
|
1989
|
+
startLeft: S.scrollLeft,
|
|
1990
|
+
endTop: S.scrollTop + S.clientHeight,
|
|
1991
|
+
endLeft: S.scrollLeft + S.clientWidth
|
|
1992
|
+
}, T = p.filter((h) => {
|
|
1993
1993
|
const f = h.endX >= C.startLeft && h.endY >= C.startTop, g = h.startX <= C.endLeft && h.startY <= C.endTop;
|
|
1994
1994
|
return f && g;
|
|
1995
1995
|
}).map((h) => {
|
|
1996
|
-
const f = C.startLeft > h.startX ? C.startLeft : h.startX, g = C.startTop > h.startY ? C.startTop : h.startY, s = C.endLeft < h.endX ? C.endLeft : h.endX, w = C.endTop < h.endY ? C.endTop : h.endY, b = s - f,
|
|
1996
|
+
const f = C.startLeft > h.startX ? C.startLeft : h.startX, g = C.startTop > h.startY ? C.startTop : h.startY, s = C.endLeft < h.endX ? C.endLeft : h.endX, w = C.endTop < h.endY ? C.endTop : h.endY, b = s - f, y = w - g, x = +(b * y / (h.width * h.height) * 100).toFixed(2);
|
|
1997
1997
|
return {
|
|
1998
1998
|
pageNumber: h.pageNumber,
|
|
1999
1999
|
ratio: x
|
|
2000
2000
|
};
|
|
2001
2001
|
}).sort((h, f) => f.ratio - h.ratio);
|
|
2002
|
-
|
|
2002
|
+
u(T);
|
|
2003
2003
|
});
|
|
2004
2004
|
},
|
|
2005
|
-
[r,
|
|
2005
|
+
[r, p]
|
|
2006
2006
|
);
|
|
2007
2007
|
F(() => {
|
|
2008
2008
|
if (n)
|
|
@@ -2010,25 +2010,57 @@ const Qo = ln(({ widths: t, heights: e }) => {
|
|
|
2010
2010
|
n == null || n.removeEventListener("scroll", v);
|
|
2011
2011
|
};
|
|
2012
2012
|
}, [n, v]);
|
|
2013
|
-
},
|
|
2014
|
-
|
|
2013
|
+
}, _e = {
|
|
2014
|
+
"rp-layout": "_rp-layout_zudyr_1",
|
|
2015
|
+
"rp-content": "_rp-content_zudyr_5",
|
|
2016
|
+
"rp-pages": "_rp-pages_zudyr_11",
|
|
2017
|
+
"rp-container": "_rp-container_zudyr_16",
|
|
2018
|
+
"rp-loader": "_rp-loader_zudyr_20",
|
|
2019
|
+
"rp-theme-variables": "_rp-theme-variables_zudyr_24",
|
|
2020
|
+
"rp-dark-mode": "_rp-dark-mode_zudyr_135"
|
|
2021
|
+
}, In = $e(
|
|
2022
|
+
(t, e) => {
|
|
2023
|
+
const { children: n, toolbarRef: o, style: r, className: a, ...l } = t, { customVariables: c, customDarkVariables: d } = yr(), { darkMode: u } = or();
|
|
2024
|
+
return /* @__PURE__ */ i(
|
|
2025
|
+
"div",
|
|
2026
|
+
{
|
|
2027
|
+
ref: e,
|
|
2028
|
+
...l,
|
|
2029
|
+
className: ne(
|
|
2030
|
+
_e["rp-theme-variables"],
|
|
2031
|
+
_e["rp-container"],
|
|
2032
|
+
u ? _e["rp-dark-mode"] : "",
|
|
2033
|
+
a
|
|
2034
|
+
),
|
|
2035
|
+
style: {
|
|
2036
|
+
"--rp-toolbar-height": `${(o == null ? void 0 : o.clientHeight) || 48}px`,
|
|
2037
|
+
...c,
|
|
2038
|
+
...u ? d : {},
|
|
2039
|
+
...r
|
|
2040
|
+
},
|
|
2041
|
+
children: n
|
|
2042
|
+
}
|
|
2043
|
+
);
|
|
2044
|
+
}
|
|
2045
|
+
), ri = ln(({ columnIndex: t, rowIndex: e, data: n, style: o }) => {
|
|
2046
|
+
const r = Br(e, t, n.columnCount);
|
|
2015
2047
|
return /* @__PURE__ */ i(It, { style: o, pageNumber: r }, r);
|
|
2016
|
-
},
|
|
2017
|
-
const { initialPage: t = 1, initialScrollMode: e, instanceId: n } =
|
|
2048
|
+
}, Xo), Gs = () => {
|
|
2049
|
+
const { initialPage: t = 1, initialScrollMode: e, instanceId: n } = sr(), { pagesRef: o, setPagesRef: r } = ge(), { scrollToPage: a } = wn(), {
|
|
2018
2050
|
virtualScrollRef: l,
|
|
2019
2051
|
getVirtualScrollRef: c,
|
|
2020
2052
|
getPageScrollElementRef: d,
|
|
2021
|
-
getVirtualScrollableElementRef:
|
|
2053
|
+
getVirtualScrollableElementRef: u,
|
|
2022
2054
|
setTotalInnerDimensions: m,
|
|
2023
2055
|
virtualScrollableElementRef: P,
|
|
2024
|
-
totalInnerDimensions:
|
|
2056
|
+
totalInnerDimensions: p,
|
|
2025
2057
|
pageScrollElementRef: v
|
|
2026
|
-
} = et(), _ = H(!0), { nextPage:
|
|
2027
|
-
|
|
2058
|
+
} = et(), _ = H(!0), { nextPage: S, prevPage: C, setFocusedPage: T, focusedPage: h } = ie(), { scrollMode: f } = Le(), { viewMode: g } = Ee(), s = H(null), { loading: w } = Q(), { passwordRequired: b } = rr(), { LoaderImageComponent: y } = hn(), E = H(
|
|
2059
|
+
p
|
|
2028
2060
|
), x = H({
|
|
2029
2061
|
viewMode: g,
|
|
2030
2062
|
scrollMode: f
|
|
2031
|
-
}), R = H(!1), z = H(), { isFullScreen: D } =
|
|
2063
|
+
}), R = H(!1), z = H(), { isFullScreen: D } = cr(), {
|
|
2032
2064
|
pageDimension: A,
|
|
2033
2065
|
rowCount: L,
|
|
2034
2066
|
rowHeight: I,
|
|
@@ -2036,23 +2068,23 @@ const Qo = ln(({ widths: t, heights: e }) => {
|
|
|
2036
2068
|
columnWidth: M,
|
|
2037
2069
|
estimatedColumnWidth: G,
|
|
2038
2070
|
estimatedRowHeight: Z
|
|
2039
|
-
} =
|
|
2040
|
-
|
|
2071
|
+
} = Yo(), j = Pt(p, 100), q = H();
|
|
2072
|
+
ni(O, L, P);
|
|
2041
2073
|
const ee = H({
|
|
2042
2074
|
scrollTop: 0,
|
|
2043
2075
|
scrollLeft: 0
|
|
2044
2076
|
});
|
|
2045
|
-
|
|
2046
|
-
const { isPressed: X } =
|
|
2077
|
+
Ur(o);
|
|
2078
|
+
const { isPressed: X } = $r(), { selectionMode: le } = ar(), { initializeGrabScroll: ae, resetGrabState: de } = Gr({
|
|
2047
2079
|
isPressed: X
|
|
2048
|
-
}), te = k(() => le ===
|
|
2080
|
+
}), te = k(() => le === nr.HAND, [le]), Fe = k(() => ({
|
|
2049
2081
|
columnCount: O
|
|
2050
2082
|
}), [O]), Ne = N(
|
|
2051
2083
|
(U) => {
|
|
2052
2084
|
const V = document.activeElement !== o;
|
|
2053
|
-
!D && V || (["ArrowUp", "ArrowLeft"].includes(U.key) ? (U.preventDefault(), C()) : ["ArrowDown", "ArrowRight"].includes(U.key) && (U.preventDefault(),
|
|
2085
|
+
!D && V || (["ArrowUp", "ArrowLeft"].includes(U.key) ? (U.preventDefault(), C()) : ["ArrowDown", "ArrowRight"].includes(U.key) && (U.preventDefault(), S()));
|
|
2054
2086
|
},
|
|
2055
|
-
[
|
|
2087
|
+
[S, C, D, f]
|
|
2056
2088
|
);
|
|
2057
2089
|
F(() => (window.addEventListener("keydown", Ne), () => {
|
|
2058
2090
|
window.removeEventListener("keydown", Ne);
|
|
@@ -2070,8 +2102,8 @@ const Qo = ln(({ widths: t, heights: e }) => {
|
|
|
2070
2102
|
(U, V) => {
|
|
2071
2103
|
if (!P)
|
|
2072
2104
|
return { scrollTop: 0, scrollLeft: 0 };
|
|
2073
|
-
const Te = ee.current.scrollTop > V,
|
|
2074
|
-
return Te ||
|
|
2105
|
+
const Te = ee.current.scrollTop > V, ye = ee.current.scrollLeft > U;
|
|
2106
|
+
return Te || ye ? ee.current : {
|
|
2075
2107
|
scrollTop: P.scrollTop,
|
|
2076
2108
|
scrollLeft: P.scrollLeft
|
|
2077
2109
|
};
|
|
@@ -2087,19 +2119,19 @@ const Qo = ln(({ widths: t, heights: e }) => {
|
|
|
2087
2119
|
}, 100);
|
|
2088
2120
|
return;
|
|
2089
2121
|
}
|
|
2090
|
-
const
|
|
2122
|
+
const ye = U.scrollTop, ot = U.scrollLeft;
|
|
2091
2123
|
if (!V.height || !V.width)
|
|
2092
2124
|
return;
|
|
2093
2125
|
R.current = !0;
|
|
2094
|
-
const { height:
|
|
2095
|
-
if (Ot ===
|
|
2126
|
+
const { height: Se, width: it } = V, { height: Ot, width: zt } = E.current;
|
|
2127
|
+
if (Ot === Se && zt === it)
|
|
2096
2128
|
return;
|
|
2097
|
-
const
|
|
2129
|
+
const Xn = ye / Ot * Se, Yn = ot / zt * it, Jn = Math.round(Math.min(Xn, Se)) || 0, Qn = Math.round(Math.min(Yn, it)) || 0;
|
|
2098
2130
|
z.current = setTimeout(() => {
|
|
2099
2131
|
requestAnimationFrame(() => {
|
|
2100
2132
|
l == null || l.scrollTo({
|
|
2101
|
-
scrollTop:
|
|
2102
|
-
scrollLeft:
|
|
2133
|
+
scrollTop: Jn,
|
|
2134
|
+
scrollLeft: Qn
|
|
2103
2135
|
});
|
|
2104
2136
|
});
|
|
2105
2137
|
}, 0), E.current = {
|
|
@@ -2112,10 +2144,10 @@ const Qo = ln(({ widths: t, heights: e }) => {
|
|
|
2112
2144
|
F(() => {
|
|
2113
2145
|
clearTimeout(z.current);
|
|
2114
2146
|
const U = Array.from({ length: L }).reduce(
|
|
2115
|
-
(
|
|
2147
|
+
(ye, ot, Se) => ye + I(Se),
|
|
2116
2148
|
0
|
|
2117
2149
|
), V = Array.from({ length: O }).reduce(
|
|
2118
|
-
(
|
|
2150
|
+
(ye, ot, Se) => ye + M(Se),
|
|
2119
2151
|
0
|
|
2120
2152
|
), Te = Pe(V, U);
|
|
2121
2153
|
ee.current = Te, we(Te, { height: U, width: V }), m({
|
|
@@ -2138,7 +2170,7 @@ const Qo = ln(({ widths: t, heights: e }) => {
|
|
|
2138
2170
|
const rt = k(() => ne(ue["rp-pages-container"], {
|
|
2139
2171
|
[ue["rp-cursor-grab"]]: te && !X,
|
|
2140
2172
|
[ue["rp-cursor-grabbing"]]: te && X
|
|
2141
|
-
}), [te, X]),
|
|
2173
|
+
}), [te, X]), Kn = N(
|
|
2142
2174
|
(U) => {
|
|
2143
2175
|
if (te && U) {
|
|
2144
2176
|
const V = ne(ue["rp-pages"]), Te = document.querySelector(`.${V}`);
|
|
@@ -2164,20 +2196,20 @@ const Qo = ln(({ widths: t, heights: e }) => {
|
|
|
2164
2196
|
T,
|
|
2165
2197
|
j
|
|
2166
2198
|
]), /* @__PURE__ */ W(me, { children: [
|
|
2167
|
-
/* @__PURE__ */ i(
|
|
2199
|
+
/* @__PURE__ */ i(In, { id: n, ref: r, tabIndex: -1, className: rt, children: /* @__PURE__ */ i(Qo, { style: { minHeight: "50px" }, children: ({ width: U, height: V }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: Kn, style: { width: U, height: V }, children: f === J.PAGE_SCROLLING ? /* @__PURE__ */ i(
|
|
2168
2200
|
"div",
|
|
2169
2201
|
{
|
|
2170
2202
|
ref: d,
|
|
2171
2203
|
style: { width: U, height: V },
|
|
2172
2204
|
className: ne(ue["rp-pages"], ue["rp-page-scrolling-wrapper"]),
|
|
2173
|
-
children: g === Ie.DUAL_PAGE ? /* @__PURE__ */ i(
|
|
2205
|
+
children: g === Ie.DUAL_PAGE ? /* @__PURE__ */ i(ei, { widths: M, heights: I }) : /* @__PURE__ */ i(ti, { widths: M, heights: I })
|
|
2174
2206
|
}
|
|
2175
2207
|
) : G ? /* @__PURE__ */ i(
|
|
2176
|
-
|
|
2208
|
+
Zo,
|
|
2177
2209
|
{
|
|
2178
2210
|
ref: c,
|
|
2179
2211
|
itemData: Fe,
|
|
2180
|
-
outerRef:
|
|
2212
|
+
outerRef: u,
|
|
2181
2213
|
innerRef: s,
|
|
2182
2214
|
onScroll: nt,
|
|
2183
2215
|
columnCount: O,
|
|
@@ -2192,7 +2224,7 @@ const Qo = ln(({ widths: t, heights: e }) => {
|
|
|
2192
2224
|
ue["rp-pages"],
|
|
2193
2225
|
f === J.HORIZONTAL_SCROLLING ? ue["rp-pages-horizontal-scroll"] : ""
|
|
2194
2226
|
),
|
|
2195
|
-
children:
|
|
2227
|
+
children: ri
|
|
2196
2228
|
}
|
|
2197
2229
|
) : w ? null : /* @__PURE__ */ i(
|
|
2198
2230
|
"div",
|
|
@@ -2205,10 +2237,10 @@ const Qo = ln(({ widths: t, heights: e }) => {
|
|
|
2205
2237
|
height: "100%",
|
|
2206
2238
|
width: "100%"
|
|
2207
2239
|
},
|
|
2208
|
-
children:
|
|
2240
|
+
children: y && /* @__PURE__ */ i(y, {})
|
|
2209
2241
|
}
|
|
2210
2242
|
) }) }) }),
|
|
2211
|
-
b && /* @__PURE__ */ i(
|
|
2243
|
+
b && /* @__PURE__ */ i(Vr, {})
|
|
2212
2244
|
] });
|
|
2213
2245
|
}, We = {
|
|
2214
2246
|
"rp-toolbar-content": "_rp-toolbar-content_sz31z_1",
|
|
@@ -2220,14 +2252,14 @@ const Qo = ln(({ widths: t, heights: e }) => {
|
|
|
2220
2252
|
"rp-paginate": "_rp-paginate_1y9vo_1",
|
|
2221
2253
|
"rp-page-input": "_rp-page-input_1y9vo_6",
|
|
2222
2254
|
"rp-total-page": "_rp-total-page_1y9vo_11"
|
|
2223
|
-
},
|
|
2255
|
+
}, oi = () => {
|
|
2224
2256
|
const { prevIcon: t } = pe();
|
|
2225
2257
|
return t || /* @__PURE__ */ i(He, {});
|
|
2226
|
-
},
|
|
2258
|
+
}, ii = () => {
|
|
2227
2259
|
const { nextIcon: t } = pe();
|
|
2228
2260
|
return t || /* @__PURE__ */ i(He, { style: { transform: "rotate(180deg" } });
|
|
2229
|
-
},
|
|
2230
|
-
const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } = ie(), [l, c] = $(t.toString()), { pageNavigationTool: d = !0 } = ve(), { isSmallScreen:
|
|
2261
|
+
}, ai = () => {
|
|
2262
|
+
const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } = ie(), [l, c] = $(t.toString()), { pageNavigationTool: d = !0 } = ve(), { isSmallScreen: u } = Ce(), { localeMessages: m } = se(), { viewMode: P } = Ee(), { scrollMode: p } = Le();
|
|
2231
2263
|
F(() => {
|
|
2232
2264
|
c(t.toString());
|
|
2233
2265
|
}, [t]);
|
|
@@ -2237,14 +2269,14 @@ const Qo = ln(({ widths: t, heights: e }) => {
|
|
|
2237
2269
|
}, []), _ = N(async () => {
|
|
2238
2270
|
const h = a(l);
|
|
2239
2271
|
h.success || c(h.currentPage.toString());
|
|
2240
|
-
}, [a, l, e]),
|
|
2272
|
+
}, [a, l, e]), S = N(() => {
|
|
2241
2273
|
c(t.toString());
|
|
2242
2274
|
}, [t]), C = N(
|
|
2243
2275
|
(h) => {
|
|
2244
2276
|
h.key === "Enter" && _();
|
|
2245
2277
|
},
|
|
2246
2278
|
[_]
|
|
2247
|
-
), T = k(() => P === Ie.DUAL_PAGE &&
|
|
2279
|
+
), T = k(() => P === Ie.DUAL_PAGE && p === J.PAGE_SCROLLING && t === e - 1 || t === e, [t, e, P, p]);
|
|
2248
2280
|
return typeof d != "boolean" ? /* @__PURE__ */ i(
|
|
2249
2281
|
d,
|
|
2250
2282
|
{
|
|
@@ -2256,20 +2288,20 @@ const Qo = ln(({ widths: t, heights: e }) => {
|
|
|
2256
2288
|
changePage: n
|
|
2257
2289
|
}
|
|
2258
2290
|
) : d ? /* @__PURE__ */ W("div", { className: ft["rp-paginate"], children: [
|
|
2259
|
-
!
|
|
2291
|
+
!u && /* @__PURE__ */ i(K, { content: m == null ? void 0 : m.previousPageTooltip, children: /* @__PURE__ */ i(
|
|
2260
2292
|
re,
|
|
2261
2293
|
{
|
|
2262
2294
|
onClick: r,
|
|
2263
2295
|
"aria-label": m == null ? void 0 : m.previousPageTooltip,
|
|
2264
2296
|
"aria-disabled": t === 1,
|
|
2265
|
-
children: /* @__PURE__ */ i(
|
|
2297
|
+
children: /* @__PURE__ */ i(oi, {})
|
|
2266
2298
|
}
|
|
2267
2299
|
) }),
|
|
2268
2300
|
/* @__PURE__ */ i(K, { content: m == null ? void 0 : m.currentPageTooltip, children: /* @__PURE__ */ i(
|
|
2269
2301
|
dn,
|
|
2270
2302
|
{
|
|
2271
2303
|
onKeyDown: C,
|
|
2272
|
-
onBlur:
|
|
2304
|
+
onBlur: S,
|
|
2273
2305
|
onChange: v,
|
|
2274
2306
|
value: l,
|
|
2275
2307
|
className: ft["rp-page-input"]
|
|
@@ -2279,18 +2311,18 @@ const Qo = ln(({ widths: t, heights: e }) => {
|
|
|
2279
2311
|
"/",
|
|
2280
2312
|
e
|
|
2281
2313
|
] }),
|
|
2282
|
-
!
|
|
2314
|
+
!u && /* @__PURE__ */ i(K, { content: m == null ? void 0 : m.nextPageTooltip, children: /* @__PURE__ */ i(
|
|
2283
2315
|
re,
|
|
2284
2316
|
{
|
|
2285
2317
|
onClick: o,
|
|
2286
2318
|
"aria-label": m == null ? void 0 : m.nextPageTooltip,
|
|
2287
2319
|
"aria-disabled": T,
|
|
2288
|
-
children: /* @__PURE__ */ i(
|
|
2320
|
+
children: /* @__PURE__ */ i(ii, {})
|
|
2289
2321
|
}
|
|
2290
2322
|
) })
|
|
2291
2323
|
] }) : null;
|
|
2292
2324
|
};
|
|
2293
|
-
var Rt = "Dialog", [
|
|
2325
|
+
var Rt = "Dialog", [Rn, Us] = Yr(Rt), [si, ce] = Rn(Rt), Ln = (t) => {
|
|
2294
2326
|
const {
|
|
2295
2327
|
__scopeDialog: e,
|
|
2296
2328
|
children: n,
|
|
@@ -2298,13 +2330,13 @@ var Rt = "Dialog", [In, Us] = Xr(Rt), [ai, ce] = In(Rt), Rn = (t) => {
|
|
|
2298
2330
|
defaultOpen: r,
|
|
2299
2331
|
onOpenChange: a,
|
|
2300
2332
|
modal: l = !0
|
|
2301
|
-
} = t, c = B.useRef(null), d = B.useRef(null), [
|
|
2333
|
+
} = t, c = B.useRef(null), d = B.useRef(null), [u = !1, m] = eo({
|
|
2302
2334
|
prop: o,
|
|
2303
2335
|
defaultProp: r,
|
|
2304
2336
|
onChange: a
|
|
2305
2337
|
});
|
|
2306
2338
|
return /* @__PURE__ */ i(
|
|
2307
|
-
|
|
2339
|
+
si,
|
|
2308
2340
|
{
|
|
2309
2341
|
scope: e,
|
|
2310
2342
|
triggerRef: c,
|
|
@@ -2312,7 +2344,7 @@ var Rt = "Dialog", [In, Us] = Xr(Rt), [ai, ce] = In(Rt), Rn = (t) => {
|
|
|
2312
2344
|
contentId: ct(),
|
|
2313
2345
|
titleId: ct(),
|
|
2314
2346
|
descriptionId: ct(),
|
|
2315
|
-
open:
|
|
2347
|
+
open: u,
|
|
2316
2348
|
onOpenChange: m,
|
|
2317
2349
|
onOpenToggle: B.useCallback(() => m((P) => !P), [m]),
|
|
2318
2350
|
modal: l,
|
|
@@ -2320,10 +2352,10 @@ var Rt = "Dialog", [In, Us] = Xr(Rt), [ai, ce] = In(Rt), Rn = (t) => {
|
|
|
2320
2352
|
}
|
|
2321
2353
|
);
|
|
2322
2354
|
};
|
|
2323
|
-
|
|
2324
|
-
var
|
|
2355
|
+
Ln.displayName = Rt;
|
|
2356
|
+
var En = "DialogTrigger", ci = B.forwardRef(
|
|
2325
2357
|
(t, e) => {
|
|
2326
|
-
const { __scopeDialog: n, ...o } = t, r = ce(
|
|
2358
|
+
const { __scopeDialog: n, ...o } = t, r = ce(En, n), a = Tt(e, r.triggerRef);
|
|
2327
2359
|
return /* @__PURE__ */ i(
|
|
2328
2360
|
Ve.button,
|
|
2329
2361
|
{
|
|
@@ -2339,28 +2371,28 @@ var Ln = "DialogTrigger", si = B.forwardRef(
|
|
|
2339
2371
|
);
|
|
2340
2372
|
}
|
|
2341
2373
|
);
|
|
2342
|
-
|
|
2343
|
-
var Lt = "DialogPortal", [
|
|
2374
|
+
ci.displayName = En;
|
|
2375
|
+
var Lt = "DialogPortal", [li, Nn] = Rn(Lt, {
|
|
2344
2376
|
forceMount: void 0
|
|
2345
|
-
}),
|
|
2377
|
+
}), On = (t) => {
|
|
2346
2378
|
const { __scopeDialog: e, forceMount: n, children: o, container: r } = t, a = ce(Lt, e);
|
|
2347
|
-
return /* @__PURE__ */ i(
|
|
2379
|
+
return /* @__PURE__ */ i(li, { scope: e, forceMount: n, children: B.Children.map(o, (l) => /* @__PURE__ */ i(yt, { present: n || a.open, children: /* @__PURE__ */ i(io, { asChild: !0, container: r, children: l }) })) });
|
|
2348
2380
|
};
|
|
2349
|
-
|
|
2350
|
-
var Xe = "DialogOverlay",
|
|
2381
|
+
On.displayName = Lt;
|
|
2382
|
+
var Xe = "DialogOverlay", zn = B.forwardRef(
|
|
2351
2383
|
(t, e) => {
|
|
2352
|
-
const n =
|
|
2353
|
-
return a.modal ? /* @__PURE__ */ i(
|
|
2384
|
+
const n = Nn(Xe, t.__scopeDialog), { forceMount: o = n.forceMount, ...r } = t, a = ce(Xe, t.__scopeDialog);
|
|
2385
|
+
return a.modal ? /* @__PURE__ */ i(yt, { present: o || a.open, children: /* @__PURE__ */ i(di, { ...r, ref: e }) }) : null;
|
|
2354
2386
|
}
|
|
2355
2387
|
);
|
|
2356
|
-
|
|
2357
|
-
var
|
|
2388
|
+
zn.displayName = Xe;
|
|
2389
|
+
var di = B.forwardRef(
|
|
2358
2390
|
(t, e) => {
|
|
2359
2391
|
const { __scopeDialog: n, ...o } = t, r = ce(Xe, n);
|
|
2360
2392
|
return (
|
|
2361
2393
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
2362
2394
|
// ie. when `Overlay` and `Content` are siblings
|
|
2363
|
-
/* @__PURE__ */ i(
|
|
2395
|
+
/* @__PURE__ */ i(no, { as: Jr, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ i(
|
|
2364
2396
|
Ve.div,
|
|
2365
2397
|
{
|
|
2366
2398
|
"data-state": Nt(r.open),
|
|
@@ -2371,22 +2403,22 @@ var li = B.forwardRef(
|
|
|
2371
2403
|
) })
|
|
2372
2404
|
);
|
|
2373
2405
|
}
|
|
2374
|
-
), Re = "DialogContent",
|
|
2406
|
+
), Re = "DialogContent", Dn = B.forwardRef(
|
|
2375
2407
|
(t, e) => {
|
|
2376
|
-
const n =
|
|
2377
|
-
return /* @__PURE__ */ i(
|
|
2408
|
+
const n = Nn(Re, t.__scopeDialog), { forceMount: o = n.forceMount, ...r } = t, a = ce(Re, t.__scopeDialog);
|
|
2409
|
+
return /* @__PURE__ */ i(yt, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(ui, { ...r, ref: e }) : /* @__PURE__ */ i(pi, { ...r, ref: e }) });
|
|
2378
2410
|
}
|
|
2379
2411
|
);
|
|
2380
|
-
|
|
2381
|
-
var
|
|
2412
|
+
Dn.displayName = Re;
|
|
2413
|
+
var ui = B.forwardRef(
|
|
2382
2414
|
(t, e) => {
|
|
2383
2415
|
const n = ce(Re, t.__scopeDialog), o = B.useRef(null), r = Tt(e, n.contentRef, o);
|
|
2384
2416
|
return B.useEffect(() => {
|
|
2385
2417
|
const a = o.current;
|
|
2386
2418
|
if (a)
|
|
2387
|
-
return
|
|
2419
|
+
return ao(a);
|
|
2388
2420
|
}, []), /* @__PURE__ */ i(
|
|
2389
|
-
|
|
2421
|
+
An,
|
|
2390
2422
|
{
|
|
2391
2423
|
...t,
|
|
2392
2424
|
ref: r,
|
|
@@ -2407,11 +2439,11 @@ var di = B.forwardRef(
|
|
|
2407
2439
|
}
|
|
2408
2440
|
);
|
|
2409
2441
|
}
|
|
2410
|
-
),
|
|
2442
|
+
), pi = B.forwardRef(
|
|
2411
2443
|
(t, e) => {
|
|
2412
2444
|
const n = ce(Re, t.__scopeDialog), o = B.useRef(!1), r = B.useRef(!1);
|
|
2413
2445
|
return /* @__PURE__ */ i(
|
|
2414
|
-
|
|
2446
|
+
An,
|
|
2415
2447
|
{
|
|
2416
2448
|
...t,
|
|
2417
2449
|
ref: e,
|
|
@@ -2422,20 +2454,20 @@ var di = B.forwardRef(
|
|
|
2422
2454
|
(l = t.onCloseAutoFocus) == null || l.call(t, a), a.defaultPrevented || (o.current || (c = n.triggerRef.current) == null || c.focus(), a.preventDefault()), o.current = !1, r.current = !1;
|
|
2423
2455
|
},
|
|
2424
2456
|
onInteractOutside: (a) => {
|
|
2425
|
-
var d,
|
|
2457
|
+
var d, u;
|
|
2426
2458
|
(d = t.onInteractOutside) == null || d.call(t, a), a.defaultPrevented || (o.current = !0, a.detail.originalEvent.type === "pointerdown" && (r.current = !0));
|
|
2427
2459
|
const l = a.target;
|
|
2428
|
-
((
|
|
2460
|
+
((u = n.triggerRef.current) == null ? void 0 : u.contains(l)) && a.preventDefault(), a.detail.originalEvent.type === "focusin" && r.current && a.preventDefault();
|
|
2429
2461
|
}
|
|
2430
2462
|
}
|
|
2431
2463
|
);
|
|
2432
2464
|
}
|
|
2433
|
-
),
|
|
2465
|
+
), An = B.forwardRef(
|
|
2434
2466
|
(t, e) => {
|
|
2435
|
-
const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...l } = t, c = ce(Re, n), d = B.useRef(null),
|
|
2436
|
-
return
|
|
2467
|
+
const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...l } = t, c = ce(Re, n), d = B.useRef(null), u = Tt(e, d);
|
|
2468
|
+
return ro(), /* @__PURE__ */ W(me, { children: [
|
|
2437
2469
|
/* @__PURE__ */ i(
|
|
2438
|
-
|
|
2470
|
+
oo,
|
|
2439
2471
|
{
|
|
2440
2472
|
asChild: !0,
|
|
2441
2473
|
loop: !0,
|
|
@@ -2443,7 +2475,7 @@ var di = B.forwardRef(
|
|
|
2443
2475
|
onMountAutoFocus: r,
|
|
2444
2476
|
onUnmountAutoFocus: a,
|
|
2445
2477
|
children: /* @__PURE__ */ i(
|
|
2446
|
-
|
|
2478
|
+
to,
|
|
2447
2479
|
{
|
|
2448
2480
|
role: "dialog",
|
|
2449
2481
|
id: c.contentId,
|
|
@@ -2451,35 +2483,35 @@ var di = B.forwardRef(
|
|
|
2451
2483
|
"aria-labelledby": c.titleId,
|
|
2452
2484
|
"data-state": Nt(c.open),
|
|
2453
2485
|
...l,
|
|
2454
|
-
ref:
|
|
2486
|
+
ref: u,
|
|
2455
2487
|
onDismiss: () => c.onOpenChange(!1)
|
|
2456
2488
|
}
|
|
2457
2489
|
)
|
|
2458
2490
|
}
|
|
2459
2491
|
),
|
|
2460
2492
|
/* @__PURE__ */ W(me, { children: [
|
|
2461
|
-
/* @__PURE__ */ i(
|
|
2462
|
-
/* @__PURE__ */ i(
|
|
2493
|
+
/* @__PURE__ */ i(fi, { titleId: c.titleId }),
|
|
2494
|
+
/* @__PURE__ */ i(gi, { contentRef: d, descriptionId: c.descriptionId })
|
|
2463
2495
|
] })
|
|
2464
2496
|
] });
|
|
2465
2497
|
}
|
|
2466
|
-
), Et = "DialogTitle",
|
|
2498
|
+
), Et = "DialogTitle", Fn = B.forwardRef(
|
|
2467
2499
|
(t, e) => {
|
|
2468
2500
|
const { __scopeDialog: n, ...o } = t, r = ce(Et, n);
|
|
2469
2501
|
return /* @__PURE__ */ i(Ve.h2, { id: r.titleId, ...o, ref: e });
|
|
2470
2502
|
}
|
|
2471
2503
|
);
|
|
2472
|
-
|
|
2473
|
-
var
|
|
2504
|
+
Fn.displayName = Et;
|
|
2505
|
+
var Wn = "DialogDescription", hi = B.forwardRef(
|
|
2474
2506
|
(t, e) => {
|
|
2475
|
-
const { __scopeDialog: n, ...o } = t, r = ce(
|
|
2507
|
+
const { __scopeDialog: n, ...o } = t, r = ce(Wn, n);
|
|
2476
2508
|
return /* @__PURE__ */ i(Ve.p, { id: r.descriptionId, ...o, ref: e });
|
|
2477
2509
|
}
|
|
2478
2510
|
);
|
|
2479
|
-
|
|
2480
|
-
var
|
|
2511
|
+
hi.displayName = Wn;
|
|
2512
|
+
var kn = "DialogClose", Mn = B.forwardRef(
|
|
2481
2513
|
(t, e) => {
|
|
2482
|
-
const { __scopeDialog: n, ...o } = t, r = ce(
|
|
2514
|
+
const { __scopeDialog: n, ...o } = t, r = ce(kn, n);
|
|
2483
2515
|
return /* @__PURE__ */ i(
|
|
2484
2516
|
Ve.button,
|
|
2485
2517
|
{
|
|
@@ -2491,16 +2523,16 @@ var Wn = "DialogClose", kn = B.forwardRef(
|
|
|
2491
2523
|
);
|
|
2492
2524
|
}
|
|
2493
2525
|
);
|
|
2494
|
-
|
|
2526
|
+
Mn.displayName = kn;
|
|
2495
2527
|
function Nt(t) {
|
|
2496
2528
|
return t ? "open" : "closed";
|
|
2497
2529
|
}
|
|
2498
|
-
var
|
|
2530
|
+
var Hn = "DialogTitleWarning", [Vs, $n] = Qr(Hn, {
|
|
2499
2531
|
contentName: Re,
|
|
2500
2532
|
titleName: Et,
|
|
2501
2533
|
docsSlug: "dialog"
|
|
2502
|
-
}),
|
|
2503
|
-
const e = Hn
|
|
2534
|
+
}), fi = ({ titleId: t }) => {
|
|
2535
|
+
const e = $n(Hn), n = `\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
2504
2536
|
|
|
2505
2537
|
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
2506
2538
|
|
|
@@ -2508,14 +2540,14 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do
|
|
|
2508
2540
|
return B.useEffect(() => {
|
|
2509
2541
|
t && (document.getElementById(t) || console.error(n));
|
|
2510
2542
|
}, [n, t]), null;
|
|
2511
|
-
},
|
|
2512
|
-
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${
|
|
2543
|
+
}, mi = "DialogDescriptionWarning", gi = ({ contentRef: t, descriptionId: e }) => {
|
|
2544
|
+
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${$n(mi).contentName}}.`;
|
|
2513
2545
|
return B.useEffect(() => {
|
|
2514
2546
|
var a;
|
|
2515
2547
|
const r = (a = t.current) == null ? void 0 : a.getAttribute("aria-describedby");
|
|
2516
2548
|
e && r && (document.getElementById(e) || console.warn(o));
|
|
2517
2549
|
}, [o, t, e]), null;
|
|
2518
|
-
},
|
|
2550
|
+
}, vi = Ln, wi = On, _i = zn, bi = Dn, Ci = Fn, Pi = Mn;
|
|
2519
2551
|
const xe = {
|
|
2520
2552
|
"rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
|
|
2521
2553
|
"rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
|
|
@@ -2524,21 +2556,21 @@ const xe = {
|
|
|
2524
2556
|
"rp-dialog-title": "_rp-dialog-title_slqo7_39",
|
|
2525
2557
|
"rp-dialog-close": "_rp-dialog-close_slqo7_47",
|
|
2526
2558
|
"rp-properties-divider": "_rp-properties-divider_slqo7_55"
|
|
2527
|
-
},
|
|
2528
|
-
const { pdfProperties: t } = Q(), { container: e } = ge(), { activeDocumentProperties: n, setActiveDocumentProperties: o } =
|
|
2559
|
+
}, Ti = () => {
|
|
2560
|
+
const { pdfProperties: t } = Q(), { container: e } = ge(), { activeDocumentProperties: n, setActiveDocumentProperties: o } = lo(), { localeMessages: r } = se(), a = k(() => {
|
|
2529
2561
|
if (!t)
|
|
2530
2562
|
return [];
|
|
2531
2563
|
const {
|
|
2532
2564
|
fileSize: l,
|
|
2533
2565
|
filename: c,
|
|
2534
2566
|
title: d,
|
|
2535
|
-
author:
|
|
2567
|
+
author: u,
|
|
2536
2568
|
subject: m,
|
|
2537
2569
|
createdOn: P,
|
|
2538
|
-
creator:
|
|
2570
|
+
creator: p,
|
|
2539
2571
|
keywords: v,
|
|
2540
2572
|
modifiedOn: _,
|
|
2541
|
-
pdfProducer:
|
|
2573
|
+
pdfProducer: S,
|
|
2542
2574
|
pdfVersion: C,
|
|
2543
2575
|
pageCount: T
|
|
2544
2576
|
} = t;
|
|
@@ -2547,10 +2579,10 @@ const xe = {
|
|
|
2547
2579
|
{ label: r == null ? void 0 : r.propertiesFileSizeLabel, value: l },
|
|
2548
2580
|
{ separate: !0 },
|
|
2549
2581
|
{ label: r == null ? void 0 : r.propertiesTitleLabel, value: d },
|
|
2550
|
-
{ label: r == null ? void 0 : r.propertiesAuthorLabel, value:
|
|
2582
|
+
{ label: r == null ? void 0 : r.propertiesAuthorLabel, value: u },
|
|
2551
2583
|
{ label: r == null ? void 0 : r.propertiesSubjectLabel, value: m },
|
|
2552
2584
|
{ label: r == null ? void 0 : r.propertiesKeywordLabel, value: v },
|
|
2553
|
-
{ label: r == null ? void 0 : r.propertiesCreatorLabel, value:
|
|
2585
|
+
{ label: r == null ? void 0 : r.propertiesCreatorLabel, value: p },
|
|
2554
2586
|
{
|
|
2555
2587
|
label: r == null ? void 0 : r.propertiesCreateOnLabel,
|
|
2556
2588
|
value: P ? kt(P) : ""
|
|
@@ -2560,26 +2592,26 @@ const xe = {
|
|
|
2560
2592
|
value: _ ? kt(_) : ""
|
|
2561
2593
|
},
|
|
2562
2594
|
{ separate: !0 },
|
|
2563
|
-
{ label: r == null ? void 0 : r.propertiesPDFProducerLabel, value:
|
|
2595
|
+
{ label: r == null ? void 0 : r.propertiesPDFProducerLabel, value: S },
|
|
2564
2596
|
{ label: r == null ? void 0 : r.propertiesPDFVersionLabel, value: C },
|
|
2565
2597
|
{ label: r == null ? void 0 : r.propertiesPageCountLabel, value: T }
|
|
2566
2598
|
];
|
|
2567
2599
|
}, [t, r]);
|
|
2568
|
-
return /* @__PURE__ */ i(
|
|
2569
|
-
/* @__PURE__ */ i(
|
|
2570
|
-
/* @__PURE__ */ W(
|
|
2571
|
-
/* @__PURE__ */ i(
|
|
2572
|
-
/* @__PURE__ */ i("div", { className: xe["rp-document-properties"], children: a.map((l, c) => /* @__PURE__ */ i("div", { children: l.separate ? /* @__PURE__ */ i("div", { className: xe["rp-properties-divider"] }) : /* @__PURE__ */ i(
|
|
2573
|
-
/* @__PURE__ */ i(
|
|
2600
|
+
return /* @__PURE__ */ i(vi, { open: n, onOpenChange: o, children: /* @__PURE__ */ i(wi, { container: e, children: /* @__PURE__ */ W("div", { className: xe["rp-dialog-wrapper"], children: [
|
|
2601
|
+
/* @__PURE__ */ i(_i, { className: xe["rp-dialog-overlay"] }),
|
|
2602
|
+
/* @__PURE__ */ W(bi, { className: xe["rp-document-dialog"], children: [
|
|
2603
|
+
/* @__PURE__ */ i(Ci, { className: xe["rp-dialog-title"], children: r == null ? void 0 : r.documentPropertiesLabel }),
|
|
2604
|
+
/* @__PURE__ */ i("div", { className: xe["rp-document-properties"], children: a.map((l, c) => /* @__PURE__ */ i("div", { children: l.separate ? /* @__PURE__ */ i("div", { className: xe["rp-properties-divider"] }) : /* @__PURE__ */ i(co, { label: l.label, value: l.value }) }, c)) }),
|
|
2605
|
+
/* @__PURE__ */ i(Pi, { asChild: !0, className: xe["rp-dialog-close"], children: /* @__PURE__ */ i(so, {}) })
|
|
2574
2606
|
] })
|
|
2575
2607
|
] }) }) });
|
|
2576
|
-
},
|
|
2608
|
+
}, yi = {
|
|
2577
2609
|
"rp-other-tool-content": "_rp-other-tool-content_su718_1"
|
|
2578
|
-
}, nn = ".pdf", Si = (t) => URL.createObjectURL(t),
|
|
2610
|
+
}, nn = ".pdf", Si = (t) => URL.createObjectURL(t), xi = async (t) => {
|
|
2579
2611
|
const n = await (await fetch(t)).blob();
|
|
2580
2612
|
return Si(n);
|
|
2581
|
-
},
|
|
2582
|
-
const { filename: t, pdfSrc: e } = Q(), { downloadFilename: n } =
|
|
2613
|
+
}, Gn = () => {
|
|
2614
|
+
const { filename: t, pdfSrc: e } = Q(), { downloadFilename: n } = fr(), o = (a) => {
|
|
2583
2615
|
const l = n || a;
|
|
2584
2616
|
return l.endsWith(nn) ? l : `${l}${nn}`;
|
|
2585
2617
|
};
|
|
@@ -2587,26 +2619,26 @@ const xe = {
|
|
|
2587
2619
|
if (!t || !e)
|
|
2588
2620
|
throw new Error("There is no PDF source to download");
|
|
2589
2621
|
const a = document.createElement("a");
|
|
2590
|
-
a.href = await
|
|
2622
|
+
a.href = await xi(e), a.download = o(t), document.body.appendChild(a), a.click(), document.body.removeChild(a);
|
|
2591
2623
|
}, [t, e]) };
|
|
2592
|
-
},
|
|
2624
|
+
}, Un = () => {
|
|
2593
2625
|
const { downloadIcon: t } = pe();
|
|
2594
|
-
return t || /* @__PURE__ */ i(
|
|
2595
|
-
},
|
|
2596
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2626
|
+
return t || /* @__PURE__ */ i(go, {});
|
|
2627
|
+
}, Vn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }), Ii = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(Vn, { localeMessages: e, children: /* @__PURE__ */ i(re, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ i(Un, {}) }) }), Ri = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(be, { onClick: t, children: /* @__PURE__ */ W(Vn, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2628
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Un, {}) }),
|
|
2597
2629
|
e == null ? void 0 : e.downloadFileLabel
|
|
2598
|
-
] }) }),
|
|
2599
|
-
const { download: t } =
|
|
2600
|
-
return e ? n ? /* @__PURE__ */ i(
|
|
2601
|
-
},
|
|
2630
|
+
] }) }), qn = () => {
|
|
2631
|
+
const { download: t } = Gn(), { downloadTool: e = !0 } = ve(), { isSmallScreen: n } = Ce(), { localeMessages: o } = se();
|
|
2632
|
+
return e ? n ? /* @__PURE__ */ i(Ri, { download: t, localeMessages: o }) : typeof e == "function" ? /* @__PURE__ */ i(e, { download: t }) : e ? /* @__PURE__ */ i(Ii, { download: t, localeMessages: o }) : null : null;
|
|
2633
|
+
}, Bn = () => {
|
|
2602
2634
|
const { printIcon: t } = pe();
|
|
2603
|
-
return t || /* @__PURE__ */ i(
|
|
2604
|
-
},
|
|
2605
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2635
|
+
return t || /* @__PURE__ */ i(vo, {});
|
|
2636
|
+
}, Zn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(K, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }), Li = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(Zn, { localeMessages: e, children: /* @__PURE__ */ i(re, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ i(Bn, {}) }) }), Ei = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(be, { onClick: t, children: /* @__PURE__ */ W(Zn, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2637
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Bn, {}) }),
|
|
2606
2638
|
e == null ? void 0 : e.printLabel
|
|
2607
|
-
] }) }),
|
|
2639
|
+
] }) }), jn = () => {
|
|
2608
2640
|
const { print: t, cancel: e, setOnProgress: n, setOnComplete: o, setOnError: r, progress: a } = tt(), { printTool: l = !0 } = ve(), { isSmallScreen: c } = Ce(), { localeMessages: d } = se();
|
|
2609
|
-
return l ? c ? /* @__PURE__ */ i(
|
|
2641
|
+
return l ? c ? /* @__PURE__ */ i(Ei, { print: t, localeMessages: d }) : typeof l == "function" ? /* @__PURE__ */ i(
|
|
2610
2642
|
l,
|
|
2611
2643
|
{
|
|
2612
2644
|
print: t,
|
|
@@ -2616,16 +2648,16 @@ const xe = {
|
|
|
2616
2648
|
setOnComplete: o,
|
|
2617
2649
|
progress: a
|
|
2618
2650
|
}
|
|
2619
|
-
) : l ? /* @__PURE__ */ i(
|
|
2620
|
-
},
|
|
2651
|
+
) : l ? /* @__PURE__ */ i(Li, { print: t, localeMessages: d }) : null : null;
|
|
2652
|
+
}, Ni = {
|
|
2621
2653
|
"rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
|
|
2622
|
-
}, Ni = () => {
|
|
2623
|
-
const { goToFirstPageIcon: t } = pe();
|
|
2624
|
-
return t || /* @__PURE__ */ i(vn, { className: Ei["rp-go-to-Top"] });
|
|
2625
2654
|
}, Oi = () => {
|
|
2655
|
+
const { goToFirstPageIcon: t } = pe();
|
|
2656
|
+
return t || /* @__PURE__ */ i(vn, { className: Ni["rp-go-to-Top"] });
|
|
2657
|
+
}, zi = () => {
|
|
2626
2658
|
const { goToLastPageIcon: t } = pe();
|
|
2627
2659
|
return t || /* @__PURE__ */ i(vn, {});
|
|
2628
|
-
}, rn = { width: "100%" },
|
|
2660
|
+
}, rn = { width: "100%" }, Di = () => {
|
|
2629
2661
|
const { goToPage: t, totalPages: e, focusedPage: n } = ie(), { jumpNavigationTool: o = !0 } = ve(), { localeMessages: r } = se(), a = k(() => n === 1, [n]), l = k(() => n === e, [n, e]), c = N(() => {
|
|
2630
2662
|
t(1);
|
|
2631
2663
|
}, [t]), d = N(() => {
|
|
@@ -2633,16 +2665,16 @@ const xe = {
|
|
|
2633
2665
|
}, [t, e]);
|
|
2634
2666
|
return o ? /* @__PURE__ */ W(Ke, { children: [
|
|
2635
2667
|
/* @__PURE__ */ i(be, { onClick: c, children: /* @__PURE__ */ i(K, { content: r == null ? void 0 : r.firstPageTooltip, style: rn, children: /* @__PURE__ */ W("div", { className: "rp-menu-item", "aria-disabled": a, children: [
|
|
2636
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2668
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Oi, {}) }),
|
|
2637
2669
|
/* @__PURE__ */ i("span", { children: r == null ? void 0 : r.firstPageLabel })
|
|
2638
2670
|
] }) }) }),
|
|
2639
2671
|
/* @__PURE__ */ i(be, { onClick: d, children: /* @__PURE__ */ i(K, { content: r == null ? void 0 : r.lastPageTooltip, style: rn, children: /* @__PURE__ */ W("div", { className: "rp-menu-item", "aria-disabled": l, children: [
|
|
2640
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2672
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(zi, {}) }),
|
|
2641
2673
|
/* @__PURE__ */ i("span", { children: r == null ? void 0 : r.lastPageLabel })
|
|
2642
2674
|
] }) }) }),
|
|
2643
|
-
/* @__PURE__ */ i(
|
|
2675
|
+
/* @__PURE__ */ i(St, {})
|
|
2644
2676
|
] }) : null;
|
|
2645
|
-
},
|
|
2677
|
+
}, Ai = () => {
|
|
2646
2678
|
const { container: t, pagesRef: e } = ge(), { isSmallScreen: n } = Ce(), {
|
|
2647
2679
|
openFileTool: o,
|
|
2648
2680
|
downloadTool: r,
|
|
@@ -2650,15 +2682,15 @@ const xe = {
|
|
|
2650
2682
|
scrollModeTool: l,
|
|
2651
2683
|
rotateTool: c,
|
|
2652
2684
|
selectionModeTool: d,
|
|
2653
|
-
jumpNavigationTool:
|
|
2685
|
+
jumpNavigationTool: u,
|
|
2654
2686
|
printTool: m,
|
|
2655
2687
|
fullscreenTool: P
|
|
2656
|
-
} = ve(), { localeMessages:
|
|
2688
|
+
} = ve(), { localeMessages: p } = se(), [v, _] = $(0), S = H(
|
|
2657
2689
|
new ResizeObserver((T) => {
|
|
2658
2690
|
_(T[0].contentRect.height);
|
|
2659
2691
|
})
|
|
2660
2692
|
), C = k(() => {
|
|
2661
|
-
const T =
|
|
2693
|
+
const T = u || c || d || l || a;
|
|
2662
2694
|
let h = !1;
|
|
2663
2695
|
return n && (h = !(!o && !r && !m && !P)), T || h;
|
|
2664
2696
|
}, [
|
|
@@ -2668,55 +2700,55 @@ const xe = {
|
|
|
2668
2700
|
l,
|
|
2669
2701
|
c,
|
|
2670
2702
|
d,
|
|
2671
|
-
|
|
2703
|
+
u,
|
|
2672
2704
|
n
|
|
2673
2705
|
]);
|
|
2674
|
-
return F(() => (e &&
|
|
2675
|
-
|
|
2676
|
-
}), [e]), C ? /* @__PURE__ */ W(
|
|
2706
|
+
return F(() => (e && S.current.observe(e), () => {
|
|
2707
|
+
S.current.disconnect();
|
|
2708
|
+
}), [e]), C ? /* @__PURE__ */ W(uo, { children: [
|
|
2677
2709
|
/* @__PURE__ */ i(
|
|
2678
2710
|
mn,
|
|
2679
2711
|
{
|
|
2680
2712
|
container: t,
|
|
2681
|
-
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content:
|
|
2713
|
+
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content: p == null ? void 0 : p.moreOptionTooltip, children: /* @__PURE__ */ i(re, { "aria-label": p == null ? void 0 : p.moreOptionTooltip, children: /* @__PURE__ */ i(Xr, {}) }) }) }),
|
|
2682
2714
|
children: /* @__PURE__ */ W(
|
|
2683
2715
|
"div",
|
|
2684
2716
|
{
|
|
2685
2717
|
style: { maxHeight: `${v}px`, overflow: "auto" },
|
|
2686
|
-
className:
|
|
2718
|
+
className: yi["rp-other-tool-content"],
|
|
2687
2719
|
"data-rp": "moreOptionsDropdown",
|
|
2688
2720
|
children: [
|
|
2689
2721
|
n && /* @__PURE__ */ W(Ke, { children: [
|
|
2690
2722
|
/* @__PURE__ */ i(fn, {}),
|
|
2691
|
-
/* @__PURE__ */ i(
|
|
2692
|
-
/* @__PURE__ */ i(
|
|
2723
|
+
/* @__PURE__ */ i(qn, {}),
|
|
2724
|
+
/* @__PURE__ */ i(jn, {}),
|
|
2693
2725
|
/* @__PURE__ */ i(gn, {}),
|
|
2694
|
-
/* @__PURE__ */ i(
|
|
2726
|
+
/* @__PURE__ */ i(St, {})
|
|
2695
2727
|
] }),
|
|
2696
|
-
/* @__PURE__ */ i(
|
|
2697
|
-
/* @__PURE__ */ i(po, {}),
|
|
2698
|
-
/* @__PURE__ */ i(vo, {}),
|
|
2728
|
+
/* @__PURE__ */ i(Di, {}),
|
|
2699
2729
|
/* @__PURE__ */ i(ho, {}),
|
|
2730
|
+
/* @__PURE__ */ i(wo, {}),
|
|
2700
2731
|
/* @__PURE__ */ i(fo, {}),
|
|
2701
|
-
/* @__PURE__ */ i(
|
|
2732
|
+
/* @__PURE__ */ i(mo, {}),
|
|
2733
|
+
/* @__PURE__ */ i(po, {})
|
|
2702
2734
|
]
|
|
2703
2735
|
}
|
|
2704
2736
|
)
|
|
2705
2737
|
}
|
|
2706
2738
|
),
|
|
2707
|
-
/* @__PURE__ */ i(
|
|
2739
|
+
/* @__PURE__ */ i(Ti, {})
|
|
2708
2740
|
] }) : null;
|
|
2709
|
-
},
|
|
2741
|
+
}, Fi = () => {
|
|
2710
2742
|
const { isSmallScreen: t } = Ce();
|
|
2711
2743
|
return /* @__PURE__ */ W(me, { children: [
|
|
2712
|
-
/* @__PURE__ */ i(
|
|
2744
|
+
/* @__PURE__ */ i(Kr, {}),
|
|
2713
2745
|
!t && /* @__PURE__ */ W(me, { children: [
|
|
2714
2746
|
/* @__PURE__ */ i(fn, {}),
|
|
2715
|
-
/* @__PURE__ */ i(
|
|
2716
|
-
/* @__PURE__ */ i(
|
|
2747
|
+
/* @__PURE__ */ i(qn, {}),
|
|
2748
|
+
/* @__PURE__ */ i(jn, {}),
|
|
2717
2749
|
/* @__PURE__ */ i(gn, {})
|
|
2718
2750
|
] }),
|
|
2719
|
-
/* @__PURE__ */ i(
|
|
2751
|
+
/* @__PURE__ */ i(Ai, {})
|
|
2720
2752
|
] });
|
|
2721
2753
|
}, ze = {
|
|
2722
2754
|
"rp-zoom-wrapper": "_rp-zoom-wrapper_cocqs_1",
|
|
@@ -2724,35 +2756,35 @@ const xe = {
|
|
|
2724
2756
|
"rp-current-zoom-icon": "_rp-current-zoom-icon_cocqs_11",
|
|
2725
2757
|
"rp-current-zoom-text": "_rp-current-zoom-text_cocqs_16",
|
|
2726
2758
|
"rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_cocqs_20"
|
|
2727
|
-
},
|
|
2759
|
+
}, Wi = 25, mt = 1e3, ki = [50, 75, 100, 125, 150, 200, 300, 400], Mi = () => {
|
|
2728
2760
|
const { zoomInIcon: t } = pe();
|
|
2729
|
-
return t || /* @__PURE__ */ i(wo, {});
|
|
2730
|
-
}, Mi = () => {
|
|
2731
|
-
const { zoomOutIcon: t } = pe();
|
|
2732
2761
|
return t || /* @__PURE__ */ i(_o, {});
|
|
2733
2762
|
}, Hi = () => {
|
|
2734
|
-
const {
|
|
2763
|
+
const { zoomOutIcon: t } = pe();
|
|
2764
|
+
return t || /* @__PURE__ */ i(bo, {});
|
|
2765
|
+
}, $i = () => {
|
|
2766
|
+
const { zoomLevel: t, setZoomLevel: e } = Qe(), { container: n, pagesRef: o } = ge(), { zoomTool: r = !0 } = ve(), { focusedPage: a } = ie(), { rotate: l } = Ge(), { pages: c } = Q(), { isSmallScreen: d } = Ce(), { localeMessages: u } = se(), { viewMode: m } = Ee(), [P, p] = $(0), v = H(
|
|
2735
2767
|
new ResizeObserver((s) => {
|
|
2736
|
-
|
|
2768
|
+
p(s[0].contentRect.height);
|
|
2737
2769
|
})
|
|
2738
2770
|
), _ = N(() => {
|
|
2739
2771
|
e((s) => {
|
|
2740
2772
|
const w = Math.floor(s / 25) * 25;
|
|
2741
2773
|
return Math.min(w + 25, mt);
|
|
2742
2774
|
});
|
|
2743
|
-
}, [e]),
|
|
2775
|
+
}, [e]), S = N(() => {
|
|
2744
2776
|
e((s) => {
|
|
2745
2777
|
const w = Math.ceil(s / 25) * 25;
|
|
2746
2778
|
return Math.min(w - 25, mt);
|
|
2747
2779
|
});
|
|
2748
|
-
}, [e]), C = k(() => t ===
|
|
2780
|
+
}, [e]), C = k(() => t === Wi, [t]), T = k(() => t === mt, [t]), h = k(() => {
|
|
2749
2781
|
const s = c.get(a);
|
|
2750
2782
|
return s ? s.page.getViewport({ scale: 1, rotation: l + s.defaultRotation }) : null;
|
|
2751
2783
|
}, [c, a, l]), f = N(
|
|
2752
2784
|
(s) => {
|
|
2753
|
-
const w = ((h == null ? void 0 : h.width) || 0) + 2 * Mt, b = ((h == null ? void 0 : h.height) || 0) + 2 * Mt,
|
|
2785
|
+
const w = ((h == null ? void 0 : h.width) || 0) + 2 * Mt, b = ((h == null ? void 0 : h.height) || 0) + 2 * Mt, y = (o == null ? void 0 : o.clientWidth) || 0, E = (o == null ? void 0 : o.clientHeight) || 0, x = Co(
|
|
2754
2786
|
s,
|
|
2755
|
-
|
|
2787
|
+
y,
|
|
2756
2788
|
E,
|
|
2757
2789
|
w,
|
|
2758
2790
|
b,
|
|
@@ -2770,24 +2802,24 @@ const xe = {
|
|
|
2770
2802
|
return F(() => (o && v.current.observe(o), () => {
|
|
2771
2803
|
v.current.disconnect();
|
|
2772
2804
|
}), [o]), typeof r != "boolean" ? /* @__PURE__ */ i(r, { zoomLevel: t, setZoomLevel: e }) : r ? /* @__PURE__ */ W("div", { className: ze["rp-zoom-wrapper"], children: [
|
|
2773
|
-
/* @__PURE__ */ i(K, { content:
|
|
2805
|
+
/* @__PURE__ */ i(K, { content: u == null ? void 0 : u.zoomOutTooltip, children: /* @__PURE__ */ i(
|
|
2774
2806
|
re,
|
|
2775
2807
|
{
|
|
2776
2808
|
disabled: C,
|
|
2777
|
-
onClick:
|
|
2778
|
-
"aria-label":
|
|
2779
|
-
children: /* @__PURE__ */ i(
|
|
2809
|
+
onClick: S,
|
|
2810
|
+
"aria-label": u == null ? void 0 : u.zoomOutTooltip,
|
|
2811
|
+
children: /* @__PURE__ */ i(Hi, {})
|
|
2780
2812
|
}
|
|
2781
2813
|
) }),
|
|
2782
2814
|
!d && /* @__PURE__ */ i(
|
|
2783
2815
|
mn,
|
|
2784
2816
|
{
|
|
2785
2817
|
container: n,
|
|
2786
|
-
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content:
|
|
2818
|
+
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(K, { content: u == null ? void 0 : u.zoomSelectTooltip, children: /* @__PURE__ */ W(
|
|
2787
2819
|
re,
|
|
2788
2820
|
{
|
|
2789
2821
|
className: ze["rp-current-zoom-wrapper"],
|
|
2790
|
-
"aria-label":
|
|
2822
|
+
"aria-label": u == null ? void 0 : u.zoomSelectTooltip,
|
|
2791
2823
|
children: [
|
|
2792
2824
|
/* @__PURE__ */ i("span", { className: ze["rp-current-zoom-text"], children: t }),
|
|
2793
2825
|
/* @__PURE__ */ i("span", { className: ze["rp-current-zoom-text"], children: "%" }),
|
|
@@ -2804,12 +2836,12 @@ const xe = {
|
|
|
2804
2836
|
className: ze["rp-zoom-dropdown-content"],
|
|
2805
2837
|
children: [
|
|
2806
2838
|
/* @__PURE__ */ W(Ke, { children: [
|
|
2807
|
-
/* @__PURE__ */ i(be, { onClick: () => g(at.ACTUAL), children:
|
|
2808
|
-
/* @__PURE__ */ i(be, { onClick: () => g(at.PAGE_FIT), children:
|
|
2809
|
-
/* @__PURE__ */ i(be, { onClick: () => g(at.PAGE_WIDTH), children:
|
|
2839
|
+
/* @__PURE__ */ i(be, { onClick: () => g(at.ACTUAL), children: u == null ? void 0 : u.zoomActualSize }),
|
|
2840
|
+
/* @__PURE__ */ i(be, { onClick: () => g(at.PAGE_FIT), children: u == null ? void 0 : u.zoomPageFit }),
|
|
2841
|
+
/* @__PURE__ */ i(be, { onClick: () => g(at.PAGE_WIDTH), children: u == null ? void 0 : u.zoomPageWidth })
|
|
2810
2842
|
] }),
|
|
2811
|
-
/* @__PURE__ */ i(
|
|
2812
|
-
/* @__PURE__ */ i(Ke, { children:
|
|
2843
|
+
/* @__PURE__ */ i(St, {}),
|
|
2844
|
+
/* @__PURE__ */ i(Ke, { children: ki.map((s) => /* @__PURE__ */ W(be, { onClick: () => g(s), children: [
|
|
2813
2845
|
s,
|
|
2814
2846
|
" %"
|
|
2815
2847
|
] }, s)) })
|
|
@@ -2818,13 +2850,13 @@ const xe = {
|
|
|
2818
2850
|
)
|
|
2819
2851
|
}
|
|
2820
2852
|
),
|
|
2821
|
-
/* @__PURE__ */ i(K, { content:
|
|
2853
|
+
/* @__PURE__ */ i(K, { content: u == null ? void 0 : u.zoomInTooltip, children: /* @__PURE__ */ i(
|
|
2822
2854
|
re,
|
|
2823
2855
|
{
|
|
2824
2856
|
disabled: T,
|
|
2825
2857
|
onClick: _,
|
|
2826
|
-
"aria-label":
|
|
2827
|
-
children: /* @__PURE__ */ i(
|
|
2858
|
+
"aria-label": u == null ? void 0 : u.zoomInTooltip,
|
|
2859
|
+
children: /* @__PURE__ */ i(Mi, {})
|
|
2828
2860
|
}
|
|
2829
2861
|
) })
|
|
2830
2862
|
] }) : null;
|
|
@@ -2853,23 +2885,23 @@ const xe = {
|
|
|
2853
2885
|
] });
|
|
2854
2886
|
}, an = () => {
|
|
2855
2887
|
const { searchIcon: t } = pe();
|
|
2856
|
-
return t || /* @__PURE__ */ i(
|
|
2857
|
-
},
|
|
2888
|
+
return t || /* @__PURE__ */ i(Po, {});
|
|
2889
|
+
}, Gi = () => {
|
|
2858
2890
|
const { container: t } = ge(), [e, n] = $(!1), { pdf: o } = Q(), [r, a] = $(null), {
|
|
2859
2891
|
searchOptions: l,
|
|
2860
2892
|
setSearchOptions: c,
|
|
2861
2893
|
loading: d,
|
|
2862
|
-
setSearch:
|
|
2894
|
+
setSearch: u,
|
|
2863
2895
|
totalMatches: m,
|
|
2864
2896
|
currentMatchPosition: P,
|
|
2865
|
-
nextMatch:
|
|
2897
|
+
nextMatch: p,
|
|
2866
2898
|
prevMatch: v,
|
|
2867
2899
|
search: _
|
|
2868
|
-
} = xt(), { searchTool:
|
|
2900
|
+
} = xt(), { searchTool: S = !0 } = ve(), [C, T] = $(_), { localeMessages: h } = se(), { isSmallScreen: f } = Ce(), g = N(() => {
|
|
2869
2901
|
n(!0);
|
|
2870
2902
|
}, []), s = N(() => {
|
|
2871
|
-
|
|
2872
|
-
}, [
|
|
2903
|
+
u(""), T(""), n(!1);
|
|
2904
|
+
}, [u]), w = (I) => {
|
|
2873
2905
|
const O = I.key === "Enter", M = I.key === " ";
|
|
2874
2906
|
(O || M) && s();
|
|
2875
2907
|
}, b = N(
|
|
@@ -2877,11 +2909,11 @@ const xe = {
|
|
|
2877
2909
|
I.key === "Escape" && e && s();
|
|
2878
2910
|
},
|
|
2879
2911
|
[e]
|
|
2880
|
-
),
|
|
2912
|
+
), y = N(
|
|
2881
2913
|
(I) => {
|
|
2882
|
-
I.shiftKey && I.key === "Enter" ? v() : I.key === "Enter" && _ !== C ?
|
|
2914
|
+
I.shiftKey && I.key === "Enter" ? v() : I.key === "Enter" && _ !== C ? u(C) : I.key === "Enter" && p();
|
|
2883
2915
|
},
|
|
2884
|
-
[C, v,
|
|
2916
|
+
[C, v, p, u, _]
|
|
2885
2917
|
);
|
|
2886
2918
|
F(() => (window.addEventListener("keydown", b), () => {
|
|
2887
2919
|
window.removeEventListener("keydown", b);
|
|
@@ -2891,8 +2923,8 @@ const xe = {
|
|
|
2891
2923
|
const E = N((I) => {
|
|
2892
2924
|
T(I.target.value);
|
|
2893
2925
|
}, []), x = N(() => {
|
|
2894
|
-
T(""),
|
|
2895
|
-
}, [
|
|
2926
|
+
T(""), u("");
|
|
2927
|
+
}, [u]), R = k(() => `${P} / ${m}`, [P, m]), { wholeWords: z, matchCase: D } = k(() => l, [l]), A = N(
|
|
2896
2928
|
(I) => {
|
|
2897
2929
|
c((O) => ({ ...O, matchCase: I }));
|
|
2898
2930
|
},
|
|
@@ -2905,8 +2937,8 @@ const xe = {
|
|
|
2905
2937
|
);
|
|
2906
2938
|
return F(() => {
|
|
2907
2939
|
s();
|
|
2908
|
-
}, [o, s]),
|
|
2909
|
-
|
|
2940
|
+
}, [o, s]), S ? /* @__PURE__ */ i(me, { children: /* @__PURE__ */ i(
|
|
2941
|
+
Hr,
|
|
2910
2942
|
{
|
|
2911
2943
|
open: e,
|
|
2912
2944
|
container: t,
|
|
@@ -2918,13 +2950,13 @@ const xe = {
|
|
|
2918
2950
|
dn,
|
|
2919
2951
|
{
|
|
2920
2952
|
value: C,
|
|
2921
|
-
onKeyDown:
|
|
2953
|
+
onKeyDown: y,
|
|
2922
2954
|
onChange: E,
|
|
2923
2955
|
icon: /* @__PURE__ */ i(an, {}),
|
|
2924
2956
|
placeholder: h == null ? void 0 : h.searchInputPlaceholder,
|
|
2925
2957
|
className: Y["rp-search-input"],
|
|
2926
2958
|
ref: a,
|
|
2927
|
-
children: !!C && /* @__PURE__ */ i("span", { className: Y["rp-search-tool-input-clear"], onClick: x, children: /* @__PURE__ */ i(
|
|
2959
|
+
children: !!C && /* @__PURE__ */ i("span", { className: Y["rp-search-tool-input-clear"], onClick: x, children: /* @__PURE__ */ i(To, {}) })
|
|
2928
2960
|
}
|
|
2929
2961
|
) }),
|
|
2930
2962
|
d ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(Ct, { className: Y["rp-search-loader-icon"] }) }) : /* @__PURE__ */ i("span", { children: R }),
|
|
@@ -2945,15 +2977,15 @@ const xe = {
|
|
|
2945
2977
|
] })
|
|
2946
2978
|
}
|
|
2947
2979
|
) }) : null;
|
|
2948
|
-
},
|
|
2980
|
+
}, Ui = "_loading_wazy2_1", De = {
|
|
2949
2981
|
"rp-loading-overlay": "_rp-loading-overlay_wazy2_1",
|
|
2950
2982
|
"rp-loading-modal": "_rp-loading-modal_wazy2_14",
|
|
2951
2983
|
"rp-loading-title": "_rp-loading-title_wazy2_27",
|
|
2952
2984
|
"rp-loading-progress-bar": "_rp-loading-progress-bar_wazy2_35",
|
|
2953
2985
|
"rp-loading-progress": "_rp-loading-progress_wazy2_35",
|
|
2954
2986
|
"rp-loading-cancel-button": "_rp-loading-cancel-button_wazy2_55",
|
|
2955
|
-
loading:
|
|
2956
|
-
},
|
|
2987
|
+
loading: Ui
|
|
2988
|
+
}, Vi = ({ percentage: t }) => {
|
|
2957
2989
|
const { cancel: e } = tt(), { localeMessages: n } = se();
|
|
2958
2990
|
return t < 1 ? null : /* @__PURE__ */ i("div", { className: ne(De["rp-loading-overlay"]), children: /* @__PURE__ */ W("div", { className: ne(De["rp-loading-modal"]), children: [
|
|
2959
2991
|
/* @__PURE__ */ W("div", { className: ne(De["rp-loading-title"]), children: [
|
|
@@ -2969,18 +3001,18 @@ const xe = {
|
|
|
2969
3001
|
) }),
|
|
2970
3002
|
/* @__PURE__ */ i("button", { className: ne(De["rp-loading-cancel-button"]), onClick: e, children: n == null ? void 0 : n.printCancelLabel })
|
|
2971
3003
|
] }) });
|
|
2972
|
-
},
|
|
3004
|
+
}, qi = $e((t, e) => {
|
|
2973
3005
|
const { showPrintProgress: n } = ve(), { progress: o } = tt(), { isSmallScreen: r } = Ce(), { percentage: a } = o || {}, l = () => r ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
|
|
2974
3006
|
return /* @__PURE__ */ W("div", { children: [
|
|
2975
3007
|
/* @__PURE__ */ i("div", { "data-rp": "topBar", ref: e, className: We["rp-toolbar-content"], children: /* @__PURE__ */ W("div", { className: We["rp-toolbar-wrapper"], style: l(), children: [
|
|
2976
3008
|
/* @__PURE__ */ W("div", { "data-rp": "topBarLeft", className: We["rp-toolbar-start"], children: [
|
|
2977
|
-
/* @__PURE__ */ i(
|
|
2978
|
-
/* @__PURE__ */ i(
|
|
3009
|
+
/* @__PURE__ */ i(Gi, {}),
|
|
3010
|
+
/* @__PURE__ */ i(ai, {})
|
|
2979
3011
|
] }),
|
|
2980
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: We["rp-toolbar-middle"], children: /* @__PURE__ */ i(
|
|
2981
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: We["rp-toolbar-end"], children: /* @__PURE__ */ i(
|
|
3012
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: We["rp-toolbar-middle"], children: /* @__PURE__ */ i($i, {}) }),
|
|
3013
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: We["rp-toolbar-end"], children: /* @__PURE__ */ i(Fi, {}) })
|
|
2982
3014
|
] }) }),
|
|
2983
|
-
n && a ? /* @__PURE__ */ i(
|
|
3015
|
+
n && a ? /* @__PURE__ */ i(Vi, { percentage: a }) : null
|
|
2984
3016
|
] });
|
|
2985
3017
|
}), gt = {
|
|
2986
3018
|
"rp-sidebar-content-wrapper": "_rp-sidebar-content-wrapper_1sdl6_1",
|
|
@@ -2993,7 +3025,7 @@ const xe = {
|
|
|
2993
3025
|
"rp-thumbnail": "_rp-thumbnail_3fenb_1",
|
|
2994
3026
|
"rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
|
|
2995
3027
|
"rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
|
|
2996
|
-
},
|
|
3028
|
+
}, Bi = (t) => {
|
|
2997
3029
|
const { thumbnailSrc: e, pageNumber: n, isFocused: o, viewport: r } = t, { goToPage: a } = ie(), l = k(() => o ? ke["rp-thumbnail-active"] : "", [o]), c = k(() => ({
|
|
2998
3030
|
width: Math.round(r.width),
|
|
2999
3031
|
height: Math.round(r.height)
|
|
@@ -3033,24 +3065,24 @@ const xe = {
|
|
|
3033
3065
|
}, sn = {
|
|
3034
3066
|
"rp-thumbnails-container": "_rp-thumbnails-container_16vqr_1",
|
|
3035
3067
|
"rp-thumbnails": "_rp-thumbnails_16vqr_1"
|
|
3036
|
-
},
|
|
3068
|
+
}, Zi = 16, ji = (t, e) => {
|
|
3037
3069
|
const n = t == null ? void 0 : t.querySelector(`#page-${e}`);
|
|
3038
|
-
t && (n != null && n.offsetTop) && (t.scrollTop = (n == null ? void 0 : n.offsetTop) -
|
|
3039
|
-
},
|
|
3040
|
-
const { show: n } = t, { focusedPage: o, totalPages: r } = ie(), { thumbnailPages: a, addPage: l, thumbnailLength: c, addToPage: d } = Pn(),
|
|
3041
|
-
cn(e, () =>
|
|
3042
|
-
const P = k(() => Object.values(a), [a]),
|
|
3070
|
+
t && (n != null && n.offsetTop) && (t.scrollTop = (n == null ? void 0 : n.offsetTop) - Zi);
|
|
3071
|
+
}, Ki = $e((t, e) => {
|
|
3072
|
+
const { show: n } = t, { focusedPage: o, totalPages: r } = ie(), { thumbnailPages: a, addPage: l, thumbnailLength: c, addToPage: d } = Pn(), u = H(null), m = H(1);
|
|
3073
|
+
cn(e, () => u.current);
|
|
3074
|
+
const P = k(() => Object.values(a), [a]), p = N(() => {
|
|
3043
3075
|
const v = c + 1;
|
|
3044
3076
|
v <= r && l(v);
|
|
3045
3077
|
}, [l, r, c]);
|
|
3046
3078
|
return F(() => {
|
|
3047
|
-
o > c ? d(o) : n && m.current !== o && (
|
|
3048
|
-
}, [o, c, d, n, P]),
|
|
3049
|
-
var
|
|
3079
|
+
o > c ? d(o) : n && m.current !== o && (ji(u.current, o), m.current = o);
|
|
3080
|
+
}, [o, c, d, n, P]), gr(u.current, p), /* @__PURE__ */ i("div", { ref: u, className: sn["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: sn["rp-thumbnails"], children: n ? P.map((v, _) => {
|
|
3081
|
+
var S, C;
|
|
3050
3082
|
return /* @__PURE__ */ i(
|
|
3051
|
-
|
|
3083
|
+
Bi,
|
|
3052
3084
|
{
|
|
3053
|
-
isFocused: o === ((
|
|
3085
|
+
isFocused: o === ((S = v.page) == null ? void 0 : S.pageNumber),
|
|
3054
3086
|
pageNumber: (C = v.page) == null ? void 0 : C.pageNumber,
|
|
3055
3087
|
thumbnailSrc: v.thumbnailSrc,
|
|
3056
3088
|
loading: v.loading,
|
|
@@ -3059,19 +3091,19 @@ const xe = {
|
|
|
3059
3091
|
_
|
|
3060
3092
|
);
|
|
3061
3093
|
}) : null }) });
|
|
3062
|
-
}),
|
|
3094
|
+
}), Xi = () => {
|
|
3063
3095
|
const { thumbnailIcon: t } = pe();
|
|
3064
|
-
return t || /* @__PURE__ */ i(
|
|
3065
|
-
},
|
|
3096
|
+
return t || /* @__PURE__ */ i(mr, {});
|
|
3097
|
+
}, Yi = () => {
|
|
3066
3098
|
const { active: t, setActive: e } = Pn(), [n, o] = $(200), r = H(null), { thumbnailTool: a, sidebarEnable: l } = ve(), { localeMessages: c } = se(), d = N(() => {
|
|
3067
3099
|
e((m) => !m);
|
|
3068
|
-
}, []),
|
|
3100
|
+
}, []), u = k(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: d, active: t }) : a ? /* @__PURE__ */ i(K, { content: c == null ? void 0 : c.thumbnailTooltip, children: /* @__PURE__ */ i(
|
|
3069
3101
|
re,
|
|
3070
3102
|
{
|
|
3071
3103
|
onClick: d,
|
|
3072
3104
|
active: t,
|
|
3073
3105
|
"aria-label": c == null ? void 0 : c.thumbnailTooltip,
|
|
3074
|
-
children: /* @__PURE__ */ i(
|
|
3106
|
+
children: /* @__PURE__ */ i(Xi, {})
|
|
3075
3107
|
}
|
|
3076
3108
|
) }) : null, [a, t, d, c]);
|
|
3077
3109
|
return /* @__PURE__ */ i(me, { children: l && /* @__PURE__ */ W(
|
|
@@ -3081,7 +3113,7 @@ const xe = {
|
|
|
3081
3113
|
className: gt["rp-sidebar-content-wrapper"],
|
|
3082
3114
|
"data-rp": "sidebar",
|
|
3083
3115
|
children: [
|
|
3084
|
-
/* @__PURE__ */ i("div", { className: gt["rp-sidebar-content"], children:
|
|
3116
|
+
/* @__PURE__ */ i("div", { className: gt["rp-sidebar-content"], children: u }),
|
|
3085
3117
|
/* @__PURE__ */ W(
|
|
3086
3118
|
"div",
|
|
3087
3119
|
{
|
|
@@ -3089,46 +3121,15 @@ const xe = {
|
|
|
3089
3121
|
hidden: !t,
|
|
3090
3122
|
className: gt["rp-thumbnails-wrapper"],
|
|
3091
3123
|
children: [
|
|
3092
|
-
/* @__PURE__ */ i(
|
|
3093
|
-
/* @__PURE__ */ i(
|
|
3124
|
+
/* @__PURE__ */ i(Ki, { show: t, ref: r }),
|
|
3125
|
+
/* @__PURE__ */ i(vr, { onWidthChange: o, thumbnailRef: r })
|
|
3094
3126
|
]
|
|
3095
3127
|
}
|
|
3096
3128
|
)
|
|
3097
3129
|
]
|
|
3098
3130
|
}
|
|
3099
3131
|
) });
|
|
3100
|
-
},
|
|
3101
|
-
"rp-layout": "_rp-layout_1ixt5_1",
|
|
3102
|
-
"rp-content": "_rp-content_1ixt5_5",
|
|
3103
|
-
"rp-pages": "_rp-pages_1ixt5_11",
|
|
3104
|
-
"rp-container": "_rp-container_1ixt5_16",
|
|
3105
|
-
"rp-loader": "_rp-loader_1ixt5_52",
|
|
3106
|
-
"rp-theme-variables": "_rp-theme-variables_1ixt5_56",
|
|
3107
|
-
"rp-dark-mode": "_rp-dark-mode_1ixt5_167"
|
|
3108
|
-
}, Yi = $e(
|
|
3109
|
-
(t, e) => {
|
|
3110
|
-
const { children: n, toolbarRef: o, style: r, className: a } = t, { customVariables: l, customDarkVariables: c } = Tr(), { darkMode: d } = rr();
|
|
3111
|
-
return /* @__PURE__ */ i(
|
|
3112
|
-
"div",
|
|
3113
|
-
{
|
|
3114
|
-
ref: e,
|
|
3115
|
-
className: ne(
|
|
3116
|
-
_e["rp-theme-variables"],
|
|
3117
|
-
_e["rp-container"],
|
|
3118
|
-
d ? _e["rp-dark-mode"] : "",
|
|
3119
|
-
a
|
|
3120
|
-
),
|
|
3121
|
-
style: {
|
|
3122
|
-
"--rp-toolbar-height": `${(o == null ? void 0 : o.clientHeight) || 48}px`,
|
|
3123
|
-
...l,
|
|
3124
|
-
...d ? c : {},
|
|
3125
|
-
...r
|
|
3126
|
-
},
|
|
3127
|
-
children: n
|
|
3128
|
-
}
|
|
3129
|
-
);
|
|
3130
|
-
}
|
|
3131
|
-
), qs = $e((t, e) => {
|
|
3132
|
+
}, qs = $e((t, e) => {
|
|
3132
3133
|
const {
|
|
3133
3134
|
children: n,
|
|
3134
3135
|
slots: o,
|
|
@@ -3137,23 +3138,23 @@ const xe = {
|
|
|
3137
3138
|
className: l,
|
|
3138
3139
|
mobileWidth: c,
|
|
3139
3140
|
onLoaded: d,
|
|
3140
|
-
cleanupOnLoaded:
|
|
3141
|
+
cleanupOnLoaded: u,
|
|
3141
3142
|
onLayoutWidthChange: m
|
|
3142
|
-
} = t, [P,
|
|
3143
|
+
} = t, [P, p] = $(null), { setContainer: v, setContentRef: _ } = ge(), { loading: S } = Q(), { LoaderImageComponent: C } = hn();
|
|
3143
3144
|
return F(() => (d && d(), () => {
|
|
3144
|
-
|
|
3145
|
-
}), [d,
|
|
3146
|
-
/* @__PURE__ */ W(
|
|
3145
|
+
u && u();
|
|
3146
|
+
}), [d, u]), /* @__PURE__ */ i(In, { toolbarRef: P, ref: e, children: /* @__PURE__ */ i(Tr, { mobileWidth: c, onLayoutWidthChange: m, children: /* @__PURE__ */ i(wr, { slots: o, children: /* @__PURE__ */ i(_r, { icons: r, children: /* @__PURE__ */ W(br, { getContainerRef: v, style: a, className: l, children: [
|
|
3147
|
+
/* @__PURE__ */ W(Cr, { children: [
|
|
3147
3148
|
/* @__PURE__ */ W("div", { className: _e["rp-layout"], children: [
|
|
3148
|
-
/* @__PURE__ */ i(
|
|
3149
|
+
/* @__PURE__ */ i(qi, { ref: p }),
|
|
3149
3150
|
/* @__PURE__ */ W("div", { className: _e["rp-content"], children: [
|
|
3150
|
-
/* @__PURE__ */ i("div", { className: _e["rp-sidebar"], children: /* @__PURE__ */ i(
|
|
3151
|
+
/* @__PURE__ */ i("div", { className: _e["rp-sidebar"], children: /* @__PURE__ */ i(Yi, {}) }),
|
|
3151
3152
|
/* @__PURE__ */ i("div", { ref: _, className: _e["rp-pages"], children: n })
|
|
3152
3153
|
] })
|
|
3153
3154
|
] }),
|
|
3154
|
-
/* @__PURE__ */ i(
|
|
3155
|
+
/* @__PURE__ */ i(Pr, {})
|
|
3155
3156
|
] }),
|
|
3156
|
-
|
|
3157
|
+
S ? /* @__PURE__ */ i(
|
|
3157
3158
|
"div",
|
|
3158
3159
|
{
|
|
3159
3160
|
className: _e["rp-loader"],
|
|
@@ -3184,49 +3185,49 @@ const xe = {
|
|
|
3184
3185
|
] }) }) }) }) });
|
|
3185
3186
|
});
|
|
3186
3187
|
export {
|
|
3187
|
-
|
|
3188
|
+
zo as A,
|
|
3188
3189
|
on as B,
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3190
|
+
Ro as C,
|
|
3191
|
+
ei as D,
|
|
3192
|
+
Gi as E,
|
|
3193
|
+
qn as F,
|
|
3193
3194
|
Vi as G,
|
|
3194
3195
|
qi as H,
|
|
3195
|
-
|
|
3196
|
-
|
|
3196
|
+
Bi as I,
|
|
3197
|
+
Ki as J,
|
|
3197
3198
|
Yi as K,
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3199
|
+
In as L,
|
|
3200
|
+
Di as M,
|
|
3201
|
+
Ai as O,
|
|
3201
3202
|
ks as P,
|
|
3202
3203
|
Gs as R,
|
|
3203
3204
|
$s as S,
|
|
3204
3205
|
Hs as T,
|
|
3205
|
-
|
|
3206
|
+
$i as Z,
|
|
3206
3207
|
Ms as a,
|
|
3207
3208
|
qs as b,
|
|
3208
|
-
|
|
3209
|
+
Gn as c,
|
|
3209
3210
|
tt as d,
|
|
3210
3211
|
xt as e,
|
|
3211
3212
|
wn as f,
|
|
3212
|
-
|
|
3213
|
+
yo as g,
|
|
3213
3214
|
_n as h,
|
|
3214
3215
|
So as i,
|
|
3215
3216
|
bn as j,
|
|
3216
|
-
|
|
3217
|
+
xo as k,
|
|
3217
3218
|
Cn as l,
|
|
3218
3219
|
Pn as m,
|
|
3219
|
-
|
|
3220
|
+
Io as n,
|
|
3220
3221
|
Tn as o,
|
|
3221
|
-
|
|
3222
|
-
|
|
3222
|
+
Eo as p,
|
|
3223
|
+
Ao as q,
|
|
3223
3224
|
It as r,
|
|
3224
|
-
|
|
3225
|
-
|
|
3225
|
+
Yo as s,
|
|
3226
|
+
ti as t,
|
|
3226
3227
|
ie as u,
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3228
|
+
ni as v,
|
|
3229
|
+
ai as w,
|
|
3230
|
+
Ti as x,
|
|
3231
|
+
jn as y,
|
|
3232
|
+
Fi as z
|
|
3232
3233
|
};
|