@pdf-viewer/react 0.6.0-beta.3 → 0.6.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{RPLayout-753dcb2b.js → RPLayout-fab06e11.js} +424 -422
- package/dist/components/RPController.js +1 -1
- package/dist/components/RPViewer.js +1 -1
- package/dist/components/layout/RPLayout.js +1 -1
- package/dist/components/layout/sidebar/RPSidebar.js +1 -1
- package/dist/components/layout/sidebar/Thumbnail.js +1 -1
- package/dist/components/layout/sidebar/Thumbnails.js +1 -1
- package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
- package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/MenuItem.js +1 -1
- package/dist/components/layout/toolbar/MenuSeparator.js +1 -1
- package/dist/components/layout/toolbar/MostPageTool.js +2 -2
- package/dist/components/layout/toolbar/OtherTool.js +2 -2
- 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/RotateTool.js +1 -1
- package/dist/components/layout/toolbar/ScrollModeTool.js +1 -1
- package/dist/components/layout/toolbar/SearchTool.js +1 -1
- package/dist/components/layout/toolbar/SelectionModeTool.js +1 -1
- package/dist/components/layout/toolbar/ViewModeTool.js +1 -1
- package/dist/components/layout/toolbar/ZoomTool.js +2 -2
- 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/TextLayer.js +1 -1
- package/dist/components/ui/Checkbox.js +1 -1
- package/dist/components/ui/DropDown.js +1 -1
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/components/ui/RPTooltip.js +1793 -532
- package/dist/contexts/PaginateContext.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/index-3459164c.js +3609 -0
- package/dist/{index-71898eb9.js → index-743c36f0.js} +30 -30
- package/dist/main.js +1 -1
- package/dist/utils/hooks/useFileDownload.js +1 -1
- package/dist/utils/hooks/useLicense.js +15 -23
- package/dist/utils/hooks/usePaginate.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
- package/dist/floating-ui.react-dom-e6d5fe8f.js +0 -1327
- package/dist/index-316854c1.js +0 -2299
|
@@ -1,80 +1,79 @@
|
|
|
1
1
|
import { jsx as a, jsxs as O, Fragment as Ae } from "react/jsx-runtime";
|
|
2
2
|
import * as V from "react";
|
|
3
|
-
import { useRef as $, useEffect as A, useCallback as M, useState as F, useMemo as D, createContext as We, useContext as He, forwardRef as $e, useImperativeHandle as
|
|
3
|
+
import { useRef as $, useEffect as A, useCallback as M, useState as F, useMemo as D, createContext as We, useContext as He, forwardRef as $e, useImperativeHandle as Zt, createElement as Le, PureComponent as Fn, Component as kn, memo as Wn } from "react";
|
|
4
4
|
import { ChevronUpIcon as Me } from "./components/icons/ChevronUpIcon.js";
|
|
5
5
|
import { UIButton as B } from "./components/ui/Button.js";
|
|
6
|
-
import { UIInput as
|
|
7
|
-
import { useScrollModeContext as Pe, ScrollModeProvider as
|
|
6
|
+
import { UIInput as jt } from "./components/ui/Input.js";
|
|
7
|
+
import { useScrollModeContext as Pe, ScrollModeProvider as Hn } from "./contexts/ScrollModeContext.js";
|
|
8
8
|
import { useDocumentContext as Y } from "./contexts/RPDocumentContext.js";
|
|
9
9
|
import "./components/RPConfig.js";
|
|
10
|
-
import { ThumbnailIcon as
|
|
10
|
+
import { ThumbnailIcon as $n } from "./components/icons/Thumbnail.js";
|
|
11
11
|
import { c as j } from "./clsx-0c6e471a.js";
|
|
12
12
|
import { LoaderIcon as pt } from "./components/icons/LoaderIcon.js";
|
|
13
13
|
import { renderPage as ot } from "./utils/renderPage.js";
|
|
14
14
|
import "./contexts/ThemeContext.js";
|
|
15
|
-
import { RPDropFileZone as
|
|
16
|
-
import { DropFileZoneProvider as
|
|
17
|
-
import { DarkModeProvider as
|
|
18
|
-
import { useToolbarComponentContext as se, ToolbarComponentProvider as
|
|
19
|
-
import { useRotateContext as Ve, RotateProvider as
|
|
20
|
-
import { useViewModeContext as Ge, ViewModeProvider as
|
|
21
|
-
import { FileInputProvider as
|
|
22
|
-
import { useZoomContext as ht, ZoomProvider as
|
|
23
|
-
import { findMatches as
|
|
24
|
-
import { useVirtualScrollContext as Ue, VirtualScrollProvider as
|
|
25
|
-
import * as
|
|
26
|
-
import { AnnotationLayer as
|
|
15
|
+
import { RPDropFileZone as Vn } from "./components/RPDropFileZone.js";
|
|
16
|
+
import { DropFileZoneProvider as Gn } from "./contexts/DropFileZoneContext.js";
|
|
17
|
+
import { DarkModeProvider as Un } from "./contexts/DarkModeContext.js";
|
|
18
|
+
import { useToolbarComponentContext as se, ToolbarComponentProvider as qn } from "./contexts/ToolbarComponentContext.js";
|
|
19
|
+
import { useRotateContext as Ve, RotateProvider as Zn } from "./contexts/RotateContext.js";
|
|
20
|
+
import { useViewModeContext as Ge, ViewModeProvider as jn } from "./contexts/ViewModeContext.js";
|
|
21
|
+
import { FileInputProvider as Bn } from "./contexts/FileInputContext.js";
|
|
22
|
+
import { useZoomContext as ht, ZoomProvider as Kn } from "./contexts/ZoomContext.js";
|
|
23
|
+
import { findMatches as Xn, resetDivs as Jn, highlightMatches as Yn } from "./utils/highlight.js";
|
|
24
|
+
import { useVirtualScrollContext as Ue, VirtualScrollProvider as Qn } from "./contexts/VirtualScrollContext.js";
|
|
25
|
+
import * as er from "pdfjs-dist";
|
|
26
|
+
import { AnnotationLayer as tr, PixelsPerInch as nr, AnnotationMode as rr, RenderingCancelledException as or } from "pdfjs-dist";
|
|
27
27
|
import { getThumbnailViewport as It } from "./utils/getThumbnailViewport.js";
|
|
28
|
-
import { useInfiniteScroll as
|
|
29
|
-
import { RPSplitter as
|
|
30
|
-
import { useIconContext as re, IconProvider as
|
|
28
|
+
import { useInfiniteScroll as ar } from "./utils/hooks/useInfiniteScroll.js";
|
|
29
|
+
import { RPSplitter as ir } from "./components/layout/sidebar/RPSplitter.js";
|
|
30
|
+
import { useIconContext as re, IconProvider as sr } from "./contexts/IconContext.js";
|
|
31
31
|
import X from "./components/ui/RPTooltip.js";
|
|
32
|
-
import { c as he, C as
|
|
33
|
-
import { useLayoutContainer as qe, LayoutContainerProvider as
|
|
34
|
-
import { ViewMode as ze, ScrollMode as Q, AnnotationSubType as at, SelectionMode as
|
|
35
|
-
import { useLayerContext as
|
|
36
|
-
import { useVirtualGridContext as
|
|
37
|
-
import { useScrollStateContext as
|
|
38
|
-
import { useViewportContext as ge, ViewportProvider as
|
|
39
|
-
import { useSelectionModeContext as
|
|
40
|
-
import { useInitialStateContext as
|
|
41
|
-
import { useFullScreenContext as
|
|
42
|
-
import { WrapperLayout as
|
|
43
|
-
import { SimpleLinkService as
|
|
32
|
+
import { c as he, C as lr } from "./Container-83627c27.js";
|
|
33
|
+
import { useLayoutContainer as qe, LayoutContainerProvider as cr } from "./contexts/LayoutContainerContext.js";
|
|
34
|
+
import { ViewMode as ze, ScrollMode as Q, AnnotationSubType as at, SelectionMode as Bt, ZoomLevel as we } from "./utils/types.js";
|
|
35
|
+
import { useLayerContext as ur, LayerProvider as dr } from "./contexts/LayerContext.js";
|
|
36
|
+
import { useVirtualGridContext as Kt, VirtualGridProvider as pr } from "./contexts/VirtualGridContext.js";
|
|
37
|
+
import { useScrollStateContext as Xt, ScrollStateProvider as hr } from "./contexts/ScrollStateContext.js";
|
|
38
|
+
import { useViewportContext as ge, ViewportProvider as fr } from "./contexts/ViewportContext.js";
|
|
39
|
+
import { useSelectionModeContext as mr, SelectionModeProvider as gr } from "./contexts/SelectionModeContext.js";
|
|
40
|
+
import { useInitialStateContext as vr, InitialStateProvider as _r } from "./contexts/InitialStateContext.js";
|
|
41
|
+
import { useFullScreenContext as wr, FullScreenProvider as br } from "./contexts/FullScreenContext.js";
|
|
42
|
+
import { WrapperLayout as Cr } from "./components/layout/WrapperLayout.js";
|
|
43
|
+
import { SimpleLinkService as Pr } from "./utils/link_service.js";
|
|
44
44
|
import { dateFormatter as it } from "./utils/dateFormatter.js";
|
|
45
|
-
import { sanitizeExternalUrl as
|
|
46
|
-
import { useWatermark as
|
|
47
|
-
import { usePageDimension as
|
|
48
|
-
import { useMousePressed as
|
|
49
|
-
import { useGrabScroll as
|
|
50
|
-
import { useDebounce as
|
|
51
|
-
import { appConsole as
|
|
52
|
-
import { FileUploadTool as
|
|
53
|
-
import { DarkModeTool as
|
|
54
|
-
import { ThreeDotIcon as
|
|
45
|
+
import { sanitizeExternalUrl as Sr } from "./utils/sanitizeExternalUrl.js";
|
|
46
|
+
import { useWatermark as Tr } from "./utils/hooks/useWatermark.js";
|
|
47
|
+
import { usePageDimension as Jt } from "./utils/hooks/usePageDimension.js";
|
|
48
|
+
import { useMousePressed as Ir } from "./utils/hooks/useMousePressed.js";
|
|
49
|
+
import { useGrabScroll as yr } from "./utils/hooks/useGrabScroll.js";
|
|
50
|
+
import { useDebounce as Rr } from "./utils/hooks/useDebounce.js";
|
|
51
|
+
import { appConsole as xr } from "./utils/appConsole.js";
|
|
52
|
+
import { FileUploadTool as Yt } from "./components/layout/toolbar/FileUploadTool.js";
|
|
53
|
+
import { DarkModeTool as Mr } from "./components/layout/toolbar/DarkModeTool.js";
|
|
54
|
+
import { ThreeDotIcon as Nr } from "./components/icons/ThreeDotIcon.js";
|
|
55
55
|
import { UIDropDown as ft } from "./components/ui/DropDown.js";
|
|
56
|
-
import { u as mt, a as Ne, c as xe, b as gt, d as
|
|
57
|
-
import { c as
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import { ScrollModeTool as qr } from "./components/layout/toolbar/ScrollModeTool.js";
|
|
56
|
+
import { u as mt, a as Ne, c as xe, b as gt, d as Lr, e as Er, h as Or, f as Dr, F as Ar, D as zr, g as Be, i as Fr, G as Fe } from "./index-3459164c.js";
|
|
57
|
+
import { c as kr, e as Wr, a as Hr } from "./index-743c36f0.js";
|
|
58
|
+
import { CloseIcon as Qt } from "./components/icons/CloseIcon.js";
|
|
59
|
+
import { PropertyItem as $r } from "./components/layout/toolbar/PropertyItem.js";
|
|
60
|
+
import { useOtherToolContext as Vr, OtherToolProvider as Gr } from "./contexts/OtherToolContext.js";
|
|
61
|
+
import { DocumentProperties as Ur } from "./components/layout/toolbar/DocumentProperties.js";
|
|
62
|
+
import { RotateTool as qr } from "./components/layout/toolbar/RotateTool.js";
|
|
63
|
+
import { ScrollModeTool as Zr } from "./components/layout/toolbar/ScrollModeTool.js";
|
|
65
64
|
import { MenuSeparator as vt } from "./components/layout/toolbar/MenuSeparator.js";
|
|
66
|
-
import { FileDownloadDefaultIcon as
|
|
65
|
+
import { FileDownloadDefaultIcon as jr } from "./components/icons/FileDownloadDefaultIcon.js";
|
|
67
66
|
import { MenuItem as ce } from "./components/layout/toolbar/MenuItem.js";
|
|
68
|
-
import { PrintDefaultTool as
|
|
69
|
-
import { FullScreenTool as
|
|
70
|
-
import { GoToDownIcon as
|
|
71
|
-
import { SelectionModeTool as
|
|
72
|
-
import { ZoomInIcon as
|
|
73
|
-
import { ZoomOutIcon as
|
|
67
|
+
import { PrintDefaultTool as Br } from "./components/icons/PrintDefaultIcon.js";
|
|
68
|
+
import { FullScreenTool as en } from "./components/layout/toolbar/FullScreenTool.js";
|
|
69
|
+
import { GoToDownIcon as tn } from "./components/icons/GoToDownIcon.js";
|
|
70
|
+
import { SelectionModeTool as Kr } from "./components/layout/toolbar/SelectionModeTool.js";
|
|
71
|
+
import { ZoomInIcon as Xr } from "./components/icons/ZoomInIcon.js";
|
|
72
|
+
import { ZoomOutIcon as Jr } from "./components/icons/ZoomOutIcon.js";
|
|
74
73
|
import { PAGE_PADDING as yt } from "./utils/constants.js";
|
|
75
|
-
import { SearchIcon as
|
|
74
|
+
import { SearchIcon as Yr } from "./components/icons/SearchIcon.js";
|
|
76
75
|
import { UICheckbox as Rt } from "./components/ui/Checkbox.js";
|
|
77
|
-
import { ClearIcon as
|
|
76
|
+
import { ClearIcon as Qr } from "./components/icons/ClearIcon.js";
|
|
78
77
|
import './assets/RPLayout.css';const ae = {
|
|
79
78
|
"rp-pages": "_rp-pages_34orh_1",
|
|
80
79
|
"rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_34orh_7",
|
|
@@ -87,7 +86,7 @@ import './assets/RPLayout.css';const ae = {
|
|
|
87
86
|
"rp-page-wrapper": "_rp-page-wrapper_h7a2q_1",
|
|
88
87
|
"rp-page": "_rp-page_h7a2q_1",
|
|
89
88
|
"rp-loader-wrapper": "_rp-loader-wrapper_h7a2q_14"
|
|
90
|
-
},
|
|
89
|
+
}, eo = (e) => {
|
|
91
90
|
const { pageNumber: t, onLoaded: n, onLoading: r } = e, o = $(null), { pages: i } = Y(), { rotate: l } = Ve(), s = $(), { currentZoom: c } = ht();
|
|
92
91
|
return A(() => {
|
|
93
92
|
if (!i || c === 0)
|
|
@@ -109,7 +108,7 @@ import './assets/RPLayout.css';const ae = {
|
|
|
109
108
|
"rp-text-layer": "_rp-text-layer_1mgyz_1",
|
|
110
109
|
"rp-text-layer-text": "_rp-text-layer-text_1mgyz_9"
|
|
111
110
|
}, _t = () => {
|
|
112
|
-
const { viewMode: e } = Ge(), { scrollMode: t } = Pe(), { virtualScrollRef: n, pageScrollElementRef: r } = Ue(), { setFocusedPage: o } = ee(), i = $(), { columnCount: l } =
|
|
111
|
+
const { viewMode: e } = Ge(), { scrollMode: t } = Pe(), { virtualScrollRef: n, pageScrollElementRef: r } = Ue(), { setFocusedPage: o } = ee(), i = $(), { columnCount: l } = Kt(), s = Jt(), c = $(t), p = $(e);
|
|
113
112
|
A(() => {
|
|
114
113
|
n != null && n.scrollToItem && (i.current = n);
|
|
115
114
|
}, [n]);
|
|
@@ -126,8 +125,8 @@ import './assets/RPLayout.css';const ae = {
|
|
|
126
125
|
c.current = t, p.current = e;
|
|
127
126
|
}, [t, e]), { scrollToPage: M(
|
|
128
127
|
(u, f = "start") => {
|
|
129
|
-
const
|
|
130
|
-
let _ =
|
|
128
|
+
const g = u - 1;
|
|
129
|
+
let _ = g, v = 0;
|
|
131
130
|
if (p.current === ze.DUAL_PAGE && c.current === Q.PAGE_SCROLLING) {
|
|
132
131
|
h(u);
|
|
133
132
|
return;
|
|
@@ -136,12 +135,12 @@ import './assets/RPLayout.css';const ae = {
|
|
|
136
135
|
o(u);
|
|
137
136
|
return;
|
|
138
137
|
}
|
|
139
|
-
i.current && (c.current === Q.HORIZONTAL_SCROLLING ?
|
|
138
|
+
i.current && (c.current === Q.HORIZONTAL_SCROLLING ? v = g : p.current === ze.DUAL_PAGE && (v = g % 2, _ = Math.floor(g / 2)), i.current.scrollToItem({ rowIndex: _, columnIndex: v, align: f }));
|
|
140
139
|
},
|
|
141
140
|
[l, h, o]
|
|
142
141
|
) };
|
|
143
|
-
},
|
|
144
|
-
const [n, r] = F(t), [o, i] = F(!1), { pdf: l } = Y(), s = $(!n), [c, p] = F([]), [h, m] = F(0), { focusedPage: u } = ee(), { scrollToPage: f } = _t(), { virtualScrollRef:
|
|
142
|
+
}, to = (e = {}, t = "") => {
|
|
143
|
+
const [n, r] = F(t), [o, i] = F(!1), { pdf: l } = Y(), s = $(!n), [c, p] = F([]), [h, m] = F(0), { focusedPage: u } = ee(), { scrollToPage: f } = _t(), { virtualScrollRef: g, pageScrollElementRef: _, virtualScrollableElementRef: v } = Ue(), { scrollMode: b } = Pe(), [S, P] = F(null), T = D(() => h === 0 ? null : c[h - 1], [h, c]), d = D(() => c.length, [c]);
|
|
145
144
|
A(() => {
|
|
146
145
|
if (T && u !== T.page) {
|
|
147
146
|
const y = u < T.page ? "start" : "end";
|
|
@@ -150,7 +149,7 @@ import './assets/RPLayout.css';const ae = {
|
|
|
150
149
|
}, [T, f]), A(() => {
|
|
151
150
|
if (!T || u !== T.page || !S || !S.classList.contains("selected"))
|
|
152
151
|
return;
|
|
153
|
-
const y =
|
|
152
|
+
const y = v || _;
|
|
154
153
|
if (!y)
|
|
155
154
|
return;
|
|
156
155
|
const R = S.getBoundingClientRect(), N = y.clientHeight / 2, L = y.clientWidth / 2, x = y.scrollTop + R.top - N, E = y.scrollLeft + R.left - L;
|
|
@@ -161,10 +160,10 @@ import './assets/RPLayout.css';const ae = {
|
|
|
161
160
|
});
|
|
162
161
|
}, [
|
|
163
162
|
u,
|
|
164
|
-
|
|
163
|
+
g,
|
|
165
164
|
S,
|
|
166
165
|
b,
|
|
167
|
-
|
|
166
|
+
v,
|
|
168
167
|
_
|
|
169
168
|
]);
|
|
170
169
|
const C = M(() => {
|
|
@@ -190,7 +189,7 @@ import './assets/RPLayout.css';const ae = {
|
|
|
190
189
|
}
|
|
191
190
|
s.current = !1, i(!0), p([]), m(0), I(l).then((y) => {
|
|
192
191
|
const N = Object.keys(y).reduce((L, x) => {
|
|
193
|
-
const E =
|
|
192
|
+
const E = Xn(
|
|
194
193
|
[n],
|
|
195
194
|
y[x],
|
|
196
195
|
Number(x) - 1,
|
|
@@ -215,7 +214,7 @@ import './assets/RPLayout.css';const ae = {
|
|
|
215
214
|
currentMatchElement: S,
|
|
216
215
|
setCurrentMatchElement: P
|
|
217
216
|
};
|
|
218
|
-
},
|
|
217
|
+
}, nn = We({
|
|
219
218
|
search: "",
|
|
220
219
|
setSearch: (e) => {
|
|
221
220
|
},
|
|
@@ -233,7 +232,7 @@ import './assets/RPLayout.css';const ae = {
|
|
|
233
232
|
currentMatchElement: null,
|
|
234
233
|
setCurrentMatchElement: (e) => {
|
|
235
234
|
}
|
|
236
|
-
}),
|
|
235
|
+
}), no = ({
|
|
237
236
|
children: e,
|
|
238
237
|
initialSearch: t
|
|
239
238
|
}) => {
|
|
@@ -248,10 +247,10 @@ import './assets/RPLayout.css';const ae = {
|
|
|
248
247
|
nextMatch: m,
|
|
249
248
|
prevMatch: u,
|
|
250
249
|
currentMatchElement: f,
|
|
251
|
-
setCurrentMatchElement:
|
|
252
|
-
} =
|
|
250
|
+
setCurrentMatchElement: g
|
|
251
|
+
} = to(n, t);
|
|
253
252
|
return /* @__PURE__ */ a(
|
|
254
|
-
|
|
253
|
+
nn.Provider,
|
|
255
254
|
{
|
|
256
255
|
value: {
|
|
257
256
|
searchOptions: n,
|
|
@@ -266,43 +265,43 @@ import './assets/RPLayout.css';const ae = {
|
|
|
266
265
|
search: p,
|
|
267
266
|
matches: h,
|
|
268
267
|
currentMatchElement: f,
|
|
269
|
-
setCurrentMatchElement:
|
|
268
|
+
setCurrentMatchElement: g
|
|
270
269
|
},
|
|
271
270
|
children: e
|
|
272
271
|
}
|
|
273
272
|
);
|
|
274
|
-
},
|
|
275
|
-
const { pageNumber: t } = e, { pages: n } = Y(), r = $(null), { matches: o, currentMatch: i, setCurrentMatchElement: l } =
|
|
273
|
+
}, rn = () => He(nn), ro = (e) => {
|
|
274
|
+
const { pageNumber: t } = e, { pages: n } = Y(), r = $(null), { matches: o, currentMatch: i, setCurrentMatchElement: l } = rn(), [s, c] = F(
|
|
276
275
|
[]
|
|
277
|
-
), p = $(), h = $(), m = $(), u = D(() => o.filter((
|
|
278
|
-
(
|
|
279
|
-
if (
|
|
276
|
+
), p = $(), h = $(), m = $(), u = D(() => o.filter((g) => g.pageIndex === t - 1), [o, t]), f = M(
|
|
277
|
+
(g, _, v = !1) => {
|
|
278
|
+
if (v && Jn(g, _), !u.length) {
|
|
280
279
|
m.current = void 0, c([]);
|
|
281
280
|
return;
|
|
282
281
|
}
|
|
283
|
-
const b =
|
|
282
|
+
const b = Yn(u, g, _);
|
|
284
283
|
c(b);
|
|
285
284
|
},
|
|
286
285
|
[u]
|
|
287
286
|
);
|
|
288
287
|
return A(() => {
|
|
289
|
-
var
|
|
290
|
-
if ((
|
|
288
|
+
var v;
|
|
289
|
+
if ((v = m.current) == null || v.classList.remove("selected"), !s.length || !i || i.pageIndex !== t - 1)
|
|
291
290
|
return;
|
|
292
|
-
const
|
|
291
|
+
const g = u.findIndex(
|
|
293
292
|
(b) => JSON.stringify(b) === JSON.stringify(i)
|
|
294
293
|
);
|
|
295
|
-
if (
|
|
294
|
+
if (g === -1)
|
|
296
295
|
return;
|
|
297
|
-
const _ = s.find((b) => b.index ===
|
|
296
|
+
const _ = s.find((b) => b.index === g);
|
|
298
297
|
_ && (m.current = _.element, l(_.element), _.element.classList.add("selected"));
|
|
299
298
|
}, [i, s, u]), A(() => {
|
|
300
|
-
const
|
|
301
|
-
if (!(!
|
|
302
|
-
return p.current && p.current.cancel(),
|
|
303
|
-
const
|
|
304
|
-
return p.current = new
|
|
305
|
-
viewport:
|
|
299
|
+
const g = n.get(t);
|
|
300
|
+
if (!(!g || !r.current))
|
|
301
|
+
return p.current && p.current.cancel(), g.page.getTextContent().then((_) => {
|
|
302
|
+
const v = g.page.getViewport({ scale: 1 });
|
|
303
|
+
return p.current = new er.TextLayer({
|
|
304
|
+
viewport: v,
|
|
306
305
|
textContentSource: _,
|
|
307
306
|
container: r.current
|
|
308
307
|
}), h.current = _, r.current && (r.current.innerText = ""), p.current.render();
|
|
@@ -311,19 +310,19 @@ import './assets/RPLayout.css';const ae = {
|
|
|
311
310
|
[].slice.call(r.current.children).forEach((S) => {
|
|
312
311
|
S.classList.add(Xe["rp-text-layer-text"]);
|
|
313
312
|
});
|
|
314
|
-
const
|
|
315
|
-
|
|
313
|
+
const v = (b = p.current) == null ? void 0 : b.textDivs;
|
|
314
|
+
v && h.current && f(h.current, v);
|
|
316
315
|
}).catch(() => {
|
|
317
316
|
}), () => {
|
|
318
317
|
var _;
|
|
319
318
|
(_ = p.current) == null || _.cancel();
|
|
320
319
|
};
|
|
321
320
|
}, [n, t]), A(() => {
|
|
322
|
-
var
|
|
321
|
+
var v;
|
|
323
322
|
[].slice.call(r.current.children).forEach((b) => {
|
|
324
323
|
b.classList.add(Xe["rp-text-layer-text"]);
|
|
325
324
|
});
|
|
326
|
-
const _ = (
|
|
325
|
+
const _ = (v = p.current) == null ? void 0 : v.textDivs;
|
|
327
326
|
_ && h.current && f(h.current, _, !0);
|
|
328
327
|
}, [f]), /* @__PURE__ */ a(
|
|
329
328
|
"div",
|
|
@@ -333,17 +332,17 @@ import './assets/RPLayout.css';const ae = {
|
|
|
333
332
|
ref: r
|
|
334
333
|
}
|
|
335
334
|
);
|
|
336
|
-
},
|
|
335
|
+
}, oo = {
|
|
337
336
|
"rp-annotation-layer": "_rp-annotation-layer_o0ksd_1"
|
|
338
|
-
},
|
|
339
|
-
let
|
|
340
|
-
const st = /* @__PURE__ */ new Map(),
|
|
341
|
-
function
|
|
342
|
-
const n =
|
|
337
|
+
}, on = ["click", "dblclick", "mouseover", "input", "change"];
|
|
338
|
+
let ao = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
|
|
339
|
+
const st = /* @__PURE__ */ new Map(), an = (e, t) => `${e.loadingTask.docId}___${t.num}R${t.gen === 0 ? "" : t.gen}`;
|
|
340
|
+
function io(e, t) {
|
|
341
|
+
const n = an(e, t);
|
|
343
342
|
return st.has(n) ? st.get(n) ?? null : null;
|
|
344
343
|
}
|
|
345
|
-
const
|
|
346
|
-
st.set(
|
|
344
|
+
const so = (e, t, n) => {
|
|
345
|
+
st.set(an(e, t), n);
|
|
347
346
|
}, xt = (e, t) => {
|
|
348
347
|
switch (t[1].name) {
|
|
349
348
|
case "XYZ":
|
|
@@ -378,29 +377,29 @@ const io = (e, t, n) => {
|
|
|
378
377
|
};
|
|
379
378
|
}
|
|
380
379
|
};
|
|
381
|
-
async function
|
|
380
|
+
async function sn(e, t) {
|
|
382
381
|
let n;
|
|
383
382
|
if (typeof t == "string" ? n = await e.getDestination(t) : n = t, n && typeof n[0] == "object" && n[0] !== null) {
|
|
384
|
-
const r = n[0], o =
|
|
383
|
+
const r = n[0], o = io(e, r);
|
|
385
384
|
if (o === null) {
|
|
386
385
|
const i = await e.getPageIndex(r);
|
|
387
|
-
return
|
|
386
|
+
return so(e, r, i), await sn(e, n);
|
|
388
387
|
} else
|
|
389
388
|
return xt(o, n);
|
|
390
389
|
} else
|
|
391
390
|
return xt(n[0], n);
|
|
392
391
|
}
|
|
393
|
-
function
|
|
394
|
-
const { id: t, url: n, unsafeUrl: r } = e
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
392
|
+
function lo(e) {
|
|
393
|
+
const { id: t, url: n, unsafeUrl: r } = e;
|
|
394
|
+
new MutationObserver((i, l) => {
|
|
395
|
+
const s = document.querySelector(`[data-annotation-id="${t}"]`);
|
|
396
|
+
if (s) {
|
|
397
|
+
const c = s.querySelector("a"), p = Sr((n || r) ?? "", "");
|
|
398
|
+
c && (c.setAttribute("target", "_blank"), c.setAttribute("href", p), c.setAttribute("rel", "noopener noreferrer")), l.disconnect();
|
|
399
399
|
}
|
|
400
|
-
});
|
|
401
|
-
o.observe(document.body, { childList: !0, subtree: !0 });
|
|
400
|
+
}).observe(document.body, { childList: !0, subtree: !0 });
|
|
402
401
|
}
|
|
403
|
-
const
|
|
402
|
+
const co = (e) => {
|
|
404
403
|
const n = e.target.parentNode;
|
|
405
404
|
if (!n)
|
|
406
405
|
return;
|
|
@@ -430,20 +429,20 @@ const lo = (e) => {
|
|
|
430
429
|
}, Mt = (e, t, n, r) => {
|
|
431
430
|
if (e.type !== "click")
|
|
432
431
|
return;
|
|
433
|
-
const o = e.target, i = o.getAttribute("data-element-id");
|
|
434
|
-
if (
|
|
432
|
+
const o = e.target, i = o.getAttribute("data-element-id"), l = o.getAttribute("href");
|
|
433
|
+
if (l && l !== "#")
|
|
435
434
|
return;
|
|
436
435
|
const s = t.find((c) => c.id === i);
|
|
437
|
-
!s || s.annotationType !== at.Link || s.dest &&
|
|
436
|
+
!s || s.annotationType !== at.Link || s.dest && sn(n, s.dest).then((c) => {
|
|
438
437
|
r(c);
|
|
439
438
|
});
|
|
440
439
|
};
|
|
441
|
-
function
|
|
442
|
-
for (const n of
|
|
440
|
+
function uo(e, t) {
|
|
441
|
+
for (const n of on)
|
|
443
442
|
e.addEventListener(n, t);
|
|
444
443
|
}
|
|
445
|
-
function
|
|
446
|
-
for (const n of
|
|
444
|
+
function Nt(e, t) {
|
|
445
|
+
for (const n of on)
|
|
447
446
|
e.removeEventListener(n, t);
|
|
448
447
|
}
|
|
449
448
|
const po = (e) => {
|
|
@@ -457,9 +456,9 @@ const po = (e) => {
|
|
|
457
456
|
i.current = void 0, s(_), n.current && (n.current.innerText = "");
|
|
458
457
|
});
|
|
459
458
|
}, [m]);
|
|
460
|
-
const
|
|
459
|
+
const g = M(
|
|
461
460
|
(_) => {
|
|
462
|
-
|
|
461
|
+
co(_), !(!l || !o) && (h === Q.PAGE_SCROLLING ? Mt(_, l, o, (v) => c(v.pageIndex + 1)) : Mt(_, l, o, (v) => p(v.pageIndex + 1)));
|
|
463
462
|
},
|
|
464
463
|
[o, l, p, c, h]
|
|
465
464
|
);
|
|
@@ -477,14 +476,14 @@ const po = (e) => {
|
|
|
477
476
|
const { annotationType: S } = b;
|
|
478
477
|
switch (S) {
|
|
479
478
|
case at.Link:
|
|
480
|
-
|
|
479
|
+
lo(b);
|
|
481
480
|
break;
|
|
482
481
|
case at.Widget:
|
|
483
482
|
break;
|
|
484
483
|
}
|
|
485
484
|
}
|
|
486
|
-
(async () => {
|
|
487
|
-
i.current = new
|
|
485
|
+
return (async () => {
|
|
486
|
+
i.current = new tr({
|
|
488
487
|
div: n.current,
|
|
489
488
|
accessibilityManager: void 0,
|
|
490
489
|
annotationCanvasMap: void 0,
|
|
@@ -492,7 +491,7 @@ const po = (e) => {
|
|
|
492
491
|
structTreeLayer: void 0,
|
|
493
492
|
page: m.page,
|
|
494
493
|
viewport: _.clone({ dontFlip: !0 })
|
|
495
|
-
}), n.current &&
|
|
494
|
+
}), n.current && Nt(n.current, g);
|
|
496
495
|
const b = await (o == null ? void 0 : o.hasJSActions()), S = await (o == null ? void 0 : o.getFieldObjects());
|
|
497
496
|
return i.current.render({
|
|
498
497
|
annotations: l,
|
|
@@ -502,46 +501,48 @@ const po = (e) => {
|
|
|
502
501
|
div: n.current,
|
|
503
502
|
viewport: _.clone({ dontFlip: !0 }),
|
|
504
503
|
page: m.page,
|
|
505
|
-
imageResourcesPath:
|
|
504
|
+
imageResourcesPath: ao,
|
|
506
505
|
renderForms: !1,
|
|
507
|
-
linkService: new
|
|
506
|
+
linkService: new Pr(),
|
|
508
507
|
downloadManager: null,
|
|
509
508
|
enableScripting: !1
|
|
510
509
|
});
|
|
511
510
|
})().then(() => {
|
|
512
|
-
n.current &&
|
|
513
|
-
})
|
|
514
|
-
|
|
511
|
+
n.current && uo(n.current, g);
|
|
512
|
+
}), () => {
|
|
513
|
+
n.current && Nt(n.current, g);
|
|
514
|
+
};
|
|
515
|
+
}, [o, l, g]), /* @__PURE__ */ a(
|
|
515
516
|
"div",
|
|
516
517
|
{
|
|
517
518
|
"data-rp": `page-${t}-annotationLayer`,
|
|
518
519
|
style: { width: `${u == null ? void 0 : u.width}px`, height: `${u == null ? void 0 : u.height}px` },
|
|
519
|
-
className:
|
|
520
|
+
className: oo["rp-annotation-layer"],
|
|
520
521
|
ref: n
|
|
521
522
|
}
|
|
522
523
|
);
|
|
523
524
|
}, ho = Array.from({ length: 21 }, (e, t) => Number((t * 0.05).toFixed(2))), wt = $e((e, t) => {
|
|
524
|
-
const { pageNumber: n, style: r, onIntersectRatioChange: o, ...i } = e, { pages: l } = Y(), { rotate: s } = Ve(), { textLayer: c } =
|
|
525
|
+
const { pageNumber: n, style: r, onIntersectRatioChange: o, ...i } = e, { pages: l } = Y(), { rotate: s } = Ve(), { textLayer: c } = ur(), { currentZoom: p } = ht(), h = $(l.get(n)), [m, u] = F(!1), f = $(null), [g, _] = F({
|
|
525
526
|
width: 0,
|
|
526
527
|
height: 0
|
|
527
528
|
});
|
|
528
|
-
|
|
529
|
+
Zt(t, () => f.current), A(() => {
|
|
529
530
|
if (l && (h.current = l.get(n), h.current)) {
|
|
530
531
|
const P = h.current.page.getViewport({ scale: p, rotation: s });
|
|
531
532
|
_(P);
|
|
532
533
|
}
|
|
533
534
|
}, [l, n, s, p]);
|
|
534
|
-
const
|
|
535
|
+
const v = D(() => {
|
|
535
536
|
switch (s) {
|
|
536
537
|
case 90:
|
|
537
|
-
return `${
|
|
538
|
+
return `${g.width / 2}px ${g.width / 2}px`;
|
|
538
539
|
case -90:
|
|
539
540
|
case 270:
|
|
540
|
-
return `${
|
|
541
|
+
return `${g.height / 2}px ${g.height / 2}px`;
|
|
541
542
|
default:
|
|
542
543
|
return "center";
|
|
543
544
|
}
|
|
544
|
-
}, [s,
|
|
545
|
+
}, [s, g]), b = M(() => {
|
|
545
546
|
u(!0);
|
|
546
547
|
}, []), S = M(() => {
|
|
547
548
|
u(!1);
|
|
@@ -566,7 +567,7 @@ const po = (e) => {
|
|
|
566
567
|
style: {
|
|
567
568
|
...r,
|
|
568
569
|
"--rp-rotate": `${s}deg`,
|
|
569
|
-
"--rp-page-rotate-translate": `${
|
|
570
|
+
"--rp-page-rotate-translate": `${v}`,
|
|
570
571
|
"--scale-factor": p
|
|
571
572
|
},
|
|
572
573
|
className: Ke["rp-page-wrapper"],
|
|
@@ -574,14 +575,14 @@ const po = (e) => {
|
|
|
574
575
|
"div",
|
|
575
576
|
{
|
|
576
577
|
style: {
|
|
577
|
-
width: `${
|
|
578
|
-
height: `${
|
|
578
|
+
width: `${g.width}px`,
|
|
579
|
+
height: `${g.height}px`
|
|
579
580
|
},
|
|
580
581
|
className: Ke["rp-page"],
|
|
581
582
|
children: [
|
|
582
|
-
/* @__PURE__ */ a(
|
|
583
|
+
/* @__PURE__ */ a(eo, { onLoading: b, onLoaded: S, pageNumber: n }),
|
|
583
584
|
m && /* @__PURE__ */ a("div", { className: Ke["rp-loader-wrapper"], children: /* @__PURE__ */ a(pt, {}) }),
|
|
584
|
-
c && /* @__PURE__ */ a(
|
|
585
|
+
c && /* @__PURE__ */ a(ro, { pageNumber: n }),
|
|
585
586
|
/* @__PURE__ */ a(po, { pageNumber: n })
|
|
586
587
|
]
|
|
587
588
|
}
|
|
@@ -599,7 +600,7 @@ function lt() {
|
|
|
599
600
|
return e;
|
|
600
601
|
}, lt.apply(null, arguments);
|
|
601
602
|
}
|
|
602
|
-
function
|
|
603
|
+
function Lt(e) {
|
|
603
604
|
if (e === void 0)
|
|
604
605
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
605
606
|
return e;
|
|
@@ -612,11 +613,11 @@ function ct(e, t) {
|
|
|
612
613
|
function fo(e, t) {
|
|
613
614
|
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, ct(e, t);
|
|
614
615
|
}
|
|
615
|
-
var
|
|
616
|
+
var Et = Number.isNaN || function(t) {
|
|
616
617
|
return typeof t == "number" && t !== t;
|
|
617
618
|
};
|
|
618
619
|
function mo(e, t) {
|
|
619
|
-
return !!(e === t ||
|
|
620
|
+
return !!(e === t || Et(e) && Et(t));
|
|
620
621
|
}
|
|
621
622
|
function go(e, t) {
|
|
622
623
|
if (e.length !== t.length)
|
|
@@ -636,7 +637,7 @@ function Je(e, t) {
|
|
|
636
637
|
}
|
|
637
638
|
return l;
|
|
638
639
|
}
|
|
639
|
-
function
|
|
640
|
+
function Ot(e, t) {
|
|
640
641
|
if (e == null)
|
|
641
642
|
return {};
|
|
642
643
|
var n = {};
|
|
@@ -648,18 +649,18 @@ function Et(e, t) {
|
|
|
648
649
|
}
|
|
649
650
|
return n;
|
|
650
651
|
}
|
|
651
|
-
var vo = typeof performance == "object" && typeof performance.now == "function",
|
|
652
|
+
var vo = typeof performance == "object" && typeof performance.now == "function", Dt = vo ? function() {
|
|
652
653
|
return performance.now();
|
|
653
654
|
} : function() {
|
|
654
655
|
return Date.now();
|
|
655
656
|
};
|
|
656
|
-
function
|
|
657
|
+
function At(e) {
|
|
657
658
|
cancelAnimationFrame(e.id);
|
|
658
659
|
}
|
|
659
660
|
function _o(e, t) {
|
|
660
|
-
var n =
|
|
661
|
+
var n = Dt();
|
|
661
662
|
function r() {
|
|
662
|
-
|
|
663
|
+
Dt() - n >= t ? e.call(null) : o.id = requestAnimationFrame(r);
|
|
663
664
|
}
|
|
664
665
|
var o = {
|
|
665
666
|
id: requestAnimationFrame(r)
|
|
@@ -675,7 +676,7 @@ function wo(e) {
|
|
|
675
676
|
return Ye;
|
|
676
677
|
}
|
|
677
678
|
var be = null;
|
|
678
|
-
function
|
|
679
|
+
function zt(e) {
|
|
679
680
|
if (e === void 0 && (e = !1), be === null || e) {
|
|
680
681
|
var t = document.createElement("div"), n = t.style;
|
|
681
682
|
n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
|
|
@@ -692,13 +693,13 @@ var bo = 150, Co = function(t) {
|
|
|
692
693
|
}, Ee = null, Oe = null, De = null;
|
|
693
694
|
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (Ee = /* @__PURE__ */ new WeakSet(), Oe = /* @__PURE__ */ new WeakSet(), De = /* @__PURE__ */ new WeakSet());
|
|
694
695
|
function Po(e) {
|
|
695
|
-
var t, n = e.getColumnOffset, r = e.getColumnStartIndexForOffset, o = e.getColumnStopIndexForStartIndex, i = e.getColumnWidth, l = e.getEstimatedTotalHeight, s = e.getEstimatedTotalWidth, c = e.getOffsetForColumnAndAlignment, p = e.getOffsetForRowAndAlignment, h = e.getRowHeight, m = e.getRowOffset, u = e.getRowStartIndexForOffset, f = e.getRowStopIndexForStartIndex,
|
|
696
|
+
var t, n = e.getColumnOffset, r = e.getColumnStartIndexForOffset, o = e.getColumnStopIndexForStartIndex, i = e.getColumnWidth, l = e.getEstimatedTotalHeight, s = e.getEstimatedTotalWidth, c = e.getOffsetForColumnAndAlignment, p = e.getOffsetForRowAndAlignment, h = e.getRowHeight, m = e.getRowOffset, u = e.getRowStartIndexForOffset, f = e.getRowStopIndexForStartIndex, g = e.initInstanceProps, _ = e.shouldResetStyleCacheOnItemSizeChange, v = e.validateProps;
|
|
696
697
|
return t = /* @__PURE__ */ function(b) {
|
|
697
698
|
fo(S, b);
|
|
698
699
|
function S(T) {
|
|
699
700
|
var d;
|
|
700
|
-
return d = b.call(this, T) || this, d._instanceProps =
|
|
701
|
-
instance:
|
|
701
|
+
return d = b.call(this, T) || this, d._instanceProps = g(d.props, Lt(d)), d._resetIsScrollingTimeoutId = null, d._outerRef = void 0, d.state = {
|
|
702
|
+
instance: Lt(d),
|
|
702
703
|
isScrolling: !1,
|
|
703
704
|
horizontalScrollDirection: "forward",
|
|
704
705
|
scrollLeft: typeof d.props.initialScrollLeft == "number" ? d.props.initialScrollLeft : 0,
|
|
@@ -749,7 +750,7 @@ function Po(e) {
|
|
|
749
750
|
return null;
|
|
750
751
|
var z = d.props.direction, k = R;
|
|
751
752
|
if (z === "rtl")
|
|
752
|
-
switch (
|
|
753
|
+
switch (zt()) {
|
|
753
754
|
case "negative":
|
|
754
755
|
k = -R;
|
|
755
756
|
break;
|
|
@@ -772,7 +773,7 @@ function Po(e) {
|
|
|
772
773
|
var w = d.props.outerRef;
|
|
773
774
|
d._outerRef = C, typeof w == "function" ? w(C) : w != null && typeof w == "object" && w.hasOwnProperty("current") && (w.current = C);
|
|
774
775
|
}, d._resetIsScrollingDebounced = function() {
|
|
775
|
-
d._resetIsScrollingTimeoutId !== null &&
|
|
776
|
+
d._resetIsScrollingTimeoutId !== null && At(d._resetIsScrollingTimeoutId), d._resetIsScrollingTimeoutId = _o(d._resetIsScrolling, bo);
|
|
776
777
|
}, d._resetIsScrolling = function() {
|
|
777
778
|
d._resetIsScrollingTimeoutId = null, d.setState({
|
|
778
779
|
isScrolling: !1
|
|
@@ -782,7 +783,7 @@ function Po(e) {
|
|
|
782
783
|
}, d;
|
|
783
784
|
}
|
|
784
785
|
S.getDerivedStateFromProps = function(d, C) {
|
|
785
|
-
return So(d, C),
|
|
786
|
+
return So(d, C), v(d), null;
|
|
786
787
|
};
|
|
787
788
|
var P = S.prototype;
|
|
788
789
|
return P.scrollTo = function(d) {
|
|
@@ -816,7 +817,7 @@ function Po(e) {
|
|
|
816
817
|
if (y && this._outerRef != null) {
|
|
817
818
|
var R = this._outerRef;
|
|
818
819
|
if (d === "rtl")
|
|
819
|
-
switch (
|
|
820
|
+
switch (zt()) {
|
|
820
821
|
case "negative":
|
|
821
822
|
R.scrollLeft = -w;
|
|
822
823
|
break;
|
|
@@ -834,7 +835,7 @@ function Po(e) {
|
|
|
834
835
|
}
|
|
835
836
|
this._callPropsCallbacks();
|
|
836
837
|
}, P.componentWillUnmount = function() {
|
|
837
|
-
this._resetIsScrollingTimeoutId !== null &&
|
|
838
|
+
this._resetIsScrollingTimeoutId !== null && At(this._resetIsScrollingTimeoutId);
|
|
838
839
|
}, P.render = function() {
|
|
839
840
|
var d = this.props, C = d.children, w = d.className, I = d.columnCount, y = d.direction, R = d.height, N = d.innerRef, L = d.innerElementType, x = d.innerTagName, E = d.itemData, z = d.itemKey, k = z === void 0 ? Co : z, G = d.outerElementType, Z = d.outerTagName, U = d.rowCount, K = d.style, ue = d.useIsScrolling, oe = d.width, ve = this.state.isScrolling, _e = this._getHorizontalRangeToRender(), Se = _e[0], W = _e[1], H = this._getVerticalRangeToRender(), q = H[0], le = H[1], Te = [];
|
|
840
841
|
if (I > 0 && U)
|
|
@@ -898,7 +899,7 @@ function Po(e) {
|
|
|
898
899
|
var k = u(this.props, E, this._instanceProps), G = f(this.props, k, E, this._instanceProps), Z = !L || x === "backward" ? Math.max(1, z) : 1, U = !L || x === "forward" ? Math.max(1, z) : 1;
|
|
899
900
|
return [Math.max(0, k - Z), Math.max(0, Math.min(R - 1, G + U)), k, G];
|
|
900
901
|
}, S;
|
|
901
|
-
}(
|
|
902
|
+
}(Fn), t.defaultProps = {
|
|
902
903
|
direction: "ltr",
|
|
903
904
|
itemData: void 0,
|
|
904
905
|
useIsScrolling: !1
|
|
@@ -921,7 +922,7 @@ var So = function(t, n) {
|
|
|
921
922
|
if (typeof i != "number")
|
|
922
923
|
throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (i === null ? "null" : typeof i) + '" was specified.'));
|
|
923
924
|
}
|
|
924
|
-
},
|
|
925
|
+
}, Ft = 50, ln = function(t, n) {
|
|
925
926
|
var r = t.rowCount, o = n.rowMetadataMap, i = n.estimatedRowHeight, l = n.lastMeasuredRowIndex, s = 0;
|
|
926
927
|
if (l >= r && (l = r - 1), l >= 0) {
|
|
927
928
|
var c = o[l];
|
|
@@ -929,7 +930,7 @@ var So = function(t, n) {
|
|
|
929
930
|
}
|
|
930
931
|
var p = r - l - 1, h = p * i;
|
|
931
932
|
return s + h;
|
|
932
|
-
},
|
|
933
|
+
}, cn = function(t, n) {
|
|
933
934
|
var r = t.columnCount, o = n.columnMetadataMap, i = n.estimatedColumnWidth, l = n.lastMeasuredColumnIndex, s = 0;
|
|
934
935
|
if (l >= r && (l = r - 1), l >= 0) {
|
|
935
936
|
var c = o[l];
|
|
@@ -955,12 +956,12 @@ var So = function(t, n) {
|
|
|
955
956
|
t === "column" ? o.lastMeasuredColumnIndex = r : o.lastMeasuredRowIndex = r;
|
|
956
957
|
}
|
|
957
958
|
return i[r];
|
|
958
|
-
},
|
|
959
|
+
}, kt = function(t, n, r, o) {
|
|
959
960
|
var i, l;
|
|
960
961
|
t === "column" ? (i = r.columnMetadataMap, l = r.lastMeasuredColumnIndex) : (i = r.rowMetadataMap, l = r.lastMeasuredRowIndex);
|
|
961
962
|
var s = l > 0 ? i[l].offset : 0;
|
|
962
|
-
return s >= o ?
|
|
963
|
-
},
|
|
963
|
+
return s >= o ? un(t, n, r, l, 0, o) : To(t, n, r, Math.max(0, l), o);
|
|
964
|
+
}, un = function(t, n, r, o, i, l) {
|
|
964
965
|
for (; i <= o; ) {
|
|
965
966
|
var s = i + Math.floor((o - i) / 2), c = ie(t, n, s, r).offset;
|
|
966
967
|
if (c === l)
|
|
@@ -971,9 +972,9 @@ var So = function(t, n) {
|
|
|
971
972
|
}, To = function(t, n, r, o, i) {
|
|
972
973
|
for (var l = t === "column" ? n.columnCount : n.rowCount, s = 1; o < l && ie(t, n, o, r).offset < i; )
|
|
973
974
|
o += s, s *= 2;
|
|
974
|
-
return
|
|
975
|
-
},
|
|
976
|
-
var c = t === "column" ? n.width : n.height, p = ie(t, n, r, l), h = t === "column" ?
|
|
975
|
+
return un(t, n, r, Math.min(o, l - 1), Math.floor(o / 2), i);
|
|
976
|
+
}, Wt = function(t, n, r, o, i, l, s) {
|
|
977
|
+
var c = t === "column" ? n.width : n.height, p = ie(t, n, r, l), h = t === "column" ? cn(n, l) : ln(n, l), m = Math.max(0, Math.min(h - c, p.offset)), u = Math.max(0, p.offset - c + s + p.size);
|
|
977
978
|
switch (o === "smart" && (i >= u - c && i <= m + c ? o = "auto" : o = "center"), o) {
|
|
978
979
|
case "start":
|
|
979
980
|
return m;
|
|
@@ -990,7 +991,7 @@ var So = function(t, n) {
|
|
|
990
991
|
return ie("column", t, n, r).offset;
|
|
991
992
|
},
|
|
992
993
|
getColumnStartIndexForOffset: function(t, n, r) {
|
|
993
|
-
return
|
|
994
|
+
return kt("column", t, r, n);
|
|
994
995
|
},
|
|
995
996
|
getColumnStopIndexForStartIndex: function(t, n, r, o) {
|
|
996
997
|
for (var i = t.columnCount, l = t.width, s = ie("column", t, n, o), c = r + l, p = s.offset + s.size, h = n; h < i - 1 && p < c; )
|
|
@@ -1000,13 +1001,13 @@ var So = function(t, n) {
|
|
|
1000
1001
|
getColumnWidth: function(t, n, r) {
|
|
1001
1002
|
return r.columnMetadataMap[n].size;
|
|
1002
1003
|
},
|
|
1003
|
-
getEstimatedTotalHeight:
|
|
1004
|
-
getEstimatedTotalWidth:
|
|
1004
|
+
getEstimatedTotalHeight: ln,
|
|
1005
|
+
getEstimatedTotalWidth: cn,
|
|
1005
1006
|
getOffsetForColumnAndAlignment: function(t, n, r, o, i, l) {
|
|
1006
|
-
return
|
|
1007
|
+
return Wt("column", t, n, r, o, i, l);
|
|
1007
1008
|
},
|
|
1008
1009
|
getOffsetForRowAndAlignment: function(t, n, r, o, i, l) {
|
|
1009
|
-
return
|
|
1010
|
+
return Wt("row", t, n, r, o, i, l);
|
|
1010
1011
|
},
|
|
1011
1012
|
getRowOffset: function(t, n, r) {
|
|
1012
1013
|
return ie("row", t, n, r).offset;
|
|
@@ -1015,7 +1016,7 @@ var So = function(t, n) {
|
|
|
1015
1016
|
return r.rowMetadataMap[n].size;
|
|
1016
1017
|
},
|
|
1017
1018
|
getRowStartIndexForOffset: function(t, n, r) {
|
|
1018
|
-
return
|
|
1019
|
+
return kt("row", t, r, n);
|
|
1019
1020
|
},
|
|
1020
1021
|
getRowStopIndexForStartIndex: function(t, n, r, o) {
|
|
1021
1022
|
for (var i = t.rowCount, l = t.height, s = ie("row", t, n, o), c = r + l, p = s.offset + s.size, h = n; h < i - 1 && p < c; )
|
|
@@ -1025,8 +1026,8 @@ var So = function(t, n) {
|
|
|
1025
1026
|
initInstanceProps: function(t, n) {
|
|
1026
1027
|
var r = t, o = r.estimatedColumnWidth, i = r.estimatedRowHeight, l = {
|
|
1027
1028
|
columnMetadataMap: {},
|
|
1028
|
-
estimatedColumnWidth: o ||
|
|
1029
|
-
estimatedRowHeight: i ||
|
|
1029
|
+
estimatedColumnWidth: o || Ft,
|
|
1030
|
+
estimatedRowHeight: i || Ft,
|
|
1030
1031
|
lastMeasuredColumnIndex: -1,
|
|
1031
1032
|
lastMeasuredRowIndex: -1,
|
|
1032
1033
|
rowMetadataMap: {}
|
|
@@ -1058,7 +1059,7 @@ var So = function(t, n) {
|
|
|
1058
1059
|
}
|
|
1059
1060
|
});
|
|
1060
1061
|
process.env.NODE_ENV;
|
|
1061
|
-
function
|
|
1062
|
+
function Ht(e, t) {
|
|
1062
1063
|
for (var n in e)
|
|
1063
1064
|
if (!(n in t))
|
|
1064
1065
|
return !0;
|
|
@@ -1069,11 +1070,11 @@ function Wt(e, t) {
|
|
|
1069
1070
|
}
|
|
1070
1071
|
var yo = ["style"], Ro = ["style"];
|
|
1071
1072
|
function xo(e, t) {
|
|
1072
|
-
var n = e.style, r =
|
|
1073
|
-
return !
|
|
1073
|
+
var n = e.style, r = Ot(e, yo), o = t.style, i = Ot(t, Ro);
|
|
1074
|
+
return !Ht(n, o) && !Ht(r, i);
|
|
1074
1075
|
}
|
|
1075
1076
|
const Mo = () => {
|
|
1076
|
-
const { viewMode: e } = Ge(), { scrollMode: t } = Pe(), { setColumnCount: n } =
|
|
1077
|
+
const { viewMode: e } = Ge(), { scrollMode: t } = Pe(), { setColumnCount: n } = Kt(), { virtualScrollableElementRef: r } = Ue(), o = Jt(), i = M(
|
|
1077
1078
|
(f) => o.widths[f] || 0,
|
|
1078
1079
|
[o]
|
|
1079
1080
|
), l = M(
|
|
@@ -1083,7 +1084,7 @@ const Mo = () => {
|
|
|
1083
1084
|
A(() => {
|
|
1084
1085
|
n(p);
|
|
1085
1086
|
}, [p, n]);
|
|
1086
|
-
const h = D(() => t === Q.HORIZONTAL_SCROLLING || t === Q.PAGE_SCROLLING ? 1 : Math.round(s / p), [p, s, t]), m = D(() => o.heights.reduce((f,
|
|
1087
|
+
const h = D(() => t === Q.HORIZONTAL_SCROLLING || t === Q.PAGE_SCROLLING ? 1 : Math.round(s / p), [p, s, t]), m = D(() => o.heights.reduce((f, g) => f + g, 0) / o.heights.length || 0, [o]), u = D(() => o.widths.reduce((f, g) => f + g, 0) / o.heights.length || 0, [o]);
|
|
1087
1088
|
return {
|
|
1088
1089
|
rowCount: h,
|
|
1089
1090
|
rowHeight: l,
|
|
@@ -1097,17 +1098,17 @@ const Mo = () => {
|
|
|
1097
1098
|
let J;
|
|
1098
1099
|
typeof window < "u" ? J = window : typeof self < "u" ? J = self : J = global;
|
|
1099
1100
|
let ut = null, dt = null;
|
|
1100
|
-
const
|
|
1101
|
-
et == null ||
|
|
1102
|
-
return
|
|
1101
|
+
const $t = 20, Qe = J.clearTimeout, Vt = J.setTimeout, et = J.cancelAnimationFrame || J.mozCancelAnimationFrame || J.webkitCancelAnimationFrame, Gt = J.requestAnimationFrame || J.mozRequestAnimationFrame || J.webkitRequestAnimationFrame;
|
|
1102
|
+
et == null || Gt == null ? (ut = Qe, dt = function(t) {
|
|
1103
|
+
return Vt(t, $t);
|
|
1103
1104
|
}) : (ut = function([t, n]) {
|
|
1104
1105
|
et(t), Qe(n);
|
|
1105
1106
|
}, dt = function(t) {
|
|
1106
|
-
const n =
|
|
1107
|
+
const n = Gt(function() {
|
|
1107
1108
|
Qe(r), t();
|
|
1108
|
-
}), r =
|
|
1109
|
+
}), r = Vt(function() {
|
|
1109
1110
|
et(n), t();
|
|
1110
|
-
},
|
|
1111
|
+
}, $t);
|
|
1111
1112
|
return [n, r];
|
|
1112
1113
|
});
|
|
1113
1114
|
function No(e) {
|
|
@@ -1131,14 +1132,14 @@ function No(e) {
|
|
|
1131
1132
|
};
|
|
1132
1133
|
let u = !1, f = "";
|
|
1133
1134
|
r = "animationstart";
|
|
1134
|
-
const
|
|
1135
|
-
let _ = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),
|
|
1135
|
+
const g = "Webkit Moz O ms".split(" ");
|
|
1136
|
+
let _ = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), v = "";
|
|
1136
1137
|
{
|
|
1137
1138
|
const b = document.createElement("fakeelement");
|
|
1138
1139
|
if (b.style.animationName !== void 0 && (u = !0), u === !1) {
|
|
1139
|
-
for (let S = 0; S <
|
|
1140
|
-
if (b.style[
|
|
1141
|
-
|
|
1140
|
+
for (let S = 0; S < g.length; S++)
|
|
1141
|
+
if (b.style[g[S] + "AnimationName"] !== void 0) {
|
|
1142
|
+
v = g[S], f = "-" + v.toLowerCase() + "-", r = _[S], u = !0;
|
|
1142
1143
|
break;
|
|
1143
1144
|
}
|
|
1144
1145
|
}
|
|
@@ -1147,8 +1148,8 @@ function No(e) {
|
|
|
1147
1148
|
}
|
|
1148
1149
|
const p = function(u) {
|
|
1149
1150
|
if (!u.getElementById("detectElementResize")) {
|
|
1150
|
-
const f = (t || "") + ".resize-triggers { " + (o || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',
|
|
1151
|
-
_.id = "detectElementResize", _.type = "text/css", e != null && _.setAttribute("nonce", e), _.styleSheet ? _.styleSheet.cssText = f : _.appendChild(u.createTextNode(f)),
|
|
1151
|
+
const f = (t || "") + ".resize-triggers { " + (o || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', g = u.head || u.getElementsByTagName("head")[0], _ = u.createElement("style");
|
|
1152
|
+
_.id = "detectElementResize", _.type = "text/css", e != null && _.setAttribute("nonce", e), _.styleSheet ? _.styleSheet.cssText = f : _.appendChild(u.createTextNode(f)), g.appendChild(_);
|
|
1152
1153
|
}
|
|
1153
1154
|
};
|
|
1154
1155
|
return {
|
|
@@ -1157,12 +1158,12 @@ function No(e) {
|
|
|
1157
1158
|
u.attachEvent("onresize", f);
|
|
1158
1159
|
else {
|
|
1159
1160
|
if (!u.__resizeTriggers__) {
|
|
1160
|
-
const
|
|
1161
|
-
_ && _.position === "static" && (u.style.position = "relative"), p(
|
|
1162
|
-
const
|
|
1163
|
-
|
|
1164
|
-
const b =
|
|
1165
|
-
b.className = "contract-trigger", u.__resizeTriggers__.appendChild(
|
|
1161
|
+
const g = u.ownerDocument, _ = J.getComputedStyle(u);
|
|
1162
|
+
_ && _.position === "static" && (u.style.position = "relative"), p(g), u.__resizeLast__ = {}, u.__resizeListeners__ = [], (u.__resizeTriggers__ = g.createElement("div")).className = "resize-triggers";
|
|
1163
|
+
const v = g.createElement("div");
|
|
1164
|
+
v.className = "expand-trigger", v.appendChild(g.createElement("div"));
|
|
1165
|
+
const b = g.createElement("div");
|
|
1166
|
+
b.className = "contract-trigger", u.__resizeTriggers__.appendChild(v), u.__resizeTriggers__.appendChild(b), u.appendChild(u.__resizeTriggers__), l(u), u.addEventListener("scroll", s, !0), r && (u.__resizeTriggers__.__animationListener__ = function(P) {
|
|
1166
1167
|
P.animationName === n && l(u);
|
|
1167
1168
|
}, u.__resizeTriggers__.addEventListener(r, u.__resizeTriggers__.__animationListener__));
|
|
1168
1169
|
}
|
|
@@ -1182,7 +1183,7 @@ function No(e) {
|
|
|
1182
1183
|
}
|
|
1183
1184
|
};
|
|
1184
1185
|
}
|
|
1185
|
-
class Lo extends
|
|
1186
|
+
class Lo extends kn {
|
|
1186
1187
|
constructor(...t) {
|
|
1187
1188
|
super(...t), this.state = {
|
|
1188
1189
|
height: this.props.defaultHeight || 0,
|
|
@@ -1197,17 +1198,17 @@ class Lo extends Fn {
|
|
|
1197
1198
|
onResize: o
|
|
1198
1199
|
} = this.props;
|
|
1199
1200
|
if (this._parentNode) {
|
|
1200
|
-
const i = window.getComputedStyle(this._parentNode) || {}, l = parseFloat(i.paddingLeft || "0"), s = parseFloat(i.paddingRight || "0"), c = parseFloat(i.paddingTop || "0"), p = parseFloat(i.paddingBottom || "0"), h = this._parentNode.getBoundingClientRect(), m = h.height - c - p, u = h.width - l - s, f = this._parentNode.offsetHeight - c - p,
|
|
1201
|
-
(!n && (this.state.height !== f || this.state.scaledHeight !== m) || !r && (this.state.width !==
|
|
1201
|
+
const i = window.getComputedStyle(this._parentNode) || {}, l = parseFloat(i.paddingLeft || "0"), s = parseFloat(i.paddingRight || "0"), c = parseFloat(i.paddingTop || "0"), p = parseFloat(i.paddingBottom || "0"), h = this._parentNode.getBoundingClientRect(), m = h.height - c - p, u = h.width - l - s, f = this._parentNode.offsetHeight - c - p, g = this._parentNode.offsetWidth - l - s;
|
|
1202
|
+
(!n && (this.state.height !== f || this.state.scaledHeight !== m) || !r && (this.state.width !== g || this.state.scaledWidth !== u)) && (this.setState({
|
|
1202
1203
|
height: f,
|
|
1203
|
-
width:
|
|
1204
|
+
width: g,
|
|
1204
1205
|
scaledHeight: m,
|
|
1205
1206
|
scaledWidth: u
|
|
1206
1207
|
}), typeof o == "function" && o({
|
|
1207
1208
|
height: f,
|
|
1208
1209
|
scaledHeight: m,
|
|
1209
1210
|
scaledWidth: u,
|
|
1210
|
-
width:
|
|
1211
|
+
width: g
|
|
1211
1212
|
}));
|
|
1212
1213
|
}
|
|
1213
1214
|
}, this._setRef = (n) => {
|
|
@@ -1245,16 +1246,16 @@ class Lo extends Fn {
|
|
|
1245
1246
|
} = this.props, {
|
|
1246
1247
|
height: u,
|
|
1247
1248
|
scaledHeight: f,
|
|
1248
|
-
scaledWidth:
|
|
1249
|
+
scaledWidth: g,
|
|
1249
1250
|
width: _
|
|
1250
|
-
} = this.state,
|
|
1251
|
+
} = this.state, v = {
|
|
1251
1252
|
overflow: "visible"
|
|
1252
1253
|
}, b = {};
|
|
1253
1254
|
let S = !1;
|
|
1254
|
-
return o || (u === 0 && (S = !0),
|
|
1255
|
+
return o || (u === 0 && (S = !0), v.height = 0, b.height = u, b.scaledHeight = f), i || (_ === 0 && (S = !0), v.width = 0, b.width = _, b.scaledWidth = g), l && (S = !1), Le(h, {
|
|
1255
1256
|
ref: this._setRef,
|
|
1256
1257
|
style: {
|
|
1257
|
-
...
|
|
1258
|
+
...v,
|
|
1258
1259
|
...p
|
|
1259
1260
|
},
|
|
1260
1261
|
...m
|
|
@@ -1262,26 +1263,26 @@ class Lo extends Fn {
|
|
|
1262
1263
|
}
|
|
1263
1264
|
}
|
|
1264
1265
|
const Eo = (e = 1) => {
|
|
1265
|
-
const [t, n] = F(e), [r, o] = F(0), { scrollToPage: i } = _t(), l = $(1), { isScrolling: s } =
|
|
1266
|
-
(
|
|
1267
|
-
if (!/^[0-9]*$/g.test(
|
|
1266
|
+
const [t, n] = F(e), [r, o] = F(0), { scrollToPage: i } = _t(), l = $(1), { isScrolling: s } = Xt(), { viewMode: c } = Ge(), { scrollMode: p } = Pe(), h = Rr(t, 100), m = M(
|
|
1267
|
+
(v) => {
|
|
1268
|
+
if (!/^[0-9]*$/g.test(v.toString()) || !v)
|
|
1268
1269
|
return { success: !1, currentPage: l.current };
|
|
1269
|
-
const S = +
|
|
1270
|
-
return S < 0 || S > r ? { success: !1, currentPage: l.current } : (n(S), l.current = S, { success: !0, currentPage: +
|
|
1270
|
+
const S = +v;
|
|
1271
|
+
return S < 0 || S > r ? { success: !1, currentPage: l.current } : (n(S), l.current = S, { success: !0, currentPage: +v });
|
|
1271
1272
|
},
|
|
1272
1273
|
[r]
|
|
1273
1274
|
), u = M(m, [m]), f = M(
|
|
1274
|
-
(
|
|
1275
|
-
const b = m(
|
|
1275
|
+
(v) => {
|
|
1276
|
+
const b = m(v);
|
|
1276
1277
|
return b.success && (s.current = !0, i(b.currentPage)), b;
|
|
1277
1278
|
},
|
|
1278
1279
|
[m, i]
|
|
1279
|
-
),
|
|
1280
|
-
let
|
|
1281
|
-
f(
|
|
1280
|
+
), g = M(() => {
|
|
1281
|
+
let v = t - 1;
|
|
1282
|
+
f(v);
|
|
1282
1283
|
}, [f, t, c, p]), _ = M(() => {
|
|
1283
|
-
let
|
|
1284
|
-
f(
|
|
1284
|
+
let v = t + 1;
|
|
1285
|
+
f(v);
|
|
1285
1286
|
}, [f, t, c, p]);
|
|
1286
1287
|
return {
|
|
1287
1288
|
focusedPage: h,
|
|
@@ -1289,10 +1290,10 @@ const Eo = (e = 1) => {
|
|
|
1289
1290
|
setFocusedPage: u,
|
|
1290
1291
|
setTotalPages: o,
|
|
1291
1292
|
nextPage: _,
|
|
1292
|
-
prevPage:
|
|
1293
|
+
prevPage: g,
|
|
1293
1294
|
goToPage: f
|
|
1294
1295
|
};
|
|
1295
|
-
},
|
|
1296
|
+
}, dn = We({
|
|
1296
1297
|
focusedPage: 0,
|
|
1297
1298
|
setFocusedPage: (e) => {
|
|
1298
1299
|
},
|
|
@@ -1305,10 +1306,10 @@ const Eo = (e = 1) => {
|
|
|
1305
1306
|
nextPage: () => {
|
|
1306
1307
|
}
|
|
1307
1308
|
}), ee = () => {
|
|
1308
|
-
const e = He(
|
|
1309
|
-
return typeof (e == null ? void 0 : e.focusedPage) > "u" &&
|
|
1309
|
+
const e = He(dn);
|
|
1310
|
+
return typeof (e == null ? void 0 : e.focusedPage) > "u" && xr.error("Please use this hooks inside children component of RPController or RPLayout"), e;
|
|
1310
1311
|
}, Oo = ({ children: e }) => {
|
|
1311
|
-
const { initialPage: t = 1 } =
|
|
1312
|
+
const { initialPage: t = 1 } = vr(), { pdf: n } = Y(), { focusedPage: r, totalPages: o, setFocusedPage: i, setTotalPages: l, goToPage: s, nextPage: c, prevPage: p } = Eo(t);
|
|
1312
1313
|
return A(() => {
|
|
1313
1314
|
n != null && n.numPages && l(n.numPages);
|
|
1314
1315
|
}, [n, l, o, t]), A(() => {
|
|
@@ -1316,7 +1317,7 @@ const Eo = (e = 1) => {
|
|
|
1316
1317
|
s(t);
|
|
1317
1318
|
});
|
|
1318
1319
|
}, [s, t]), /* @__PURE__ */ a(
|
|
1319
|
-
|
|
1320
|
+
dn.Provider,
|
|
1320
1321
|
{
|
|
1321
1322
|
value: {
|
|
1322
1323
|
focusedPage: r,
|
|
@@ -1370,7 +1371,7 @@ const Eo = (e = 1) => {
|
|
|
1370
1371
|
children: /* @__PURE__ */ a(wt, { style: r, pageNumber: n }, n)
|
|
1371
1372
|
}
|
|
1372
1373
|
);
|
|
1373
|
-
}, zo =
|
|
1374
|
+
}, zo = Wn(({ columnIndex: e, rowIndex: t, data: n, style: r }) => {
|
|
1374
1375
|
const o = D(() => e + 1 + t * n.columnCount, [e, t, n]);
|
|
1375
1376
|
return /* @__PURE__ */ a(
|
|
1376
1377
|
wt,
|
|
@@ -1381,21 +1382,21 @@ const Eo = (e = 1) => {
|
|
|
1381
1382
|
},
|
|
1382
1383
|
o
|
|
1383
1384
|
);
|
|
1384
|
-
}, xo),
|
|
1385
|
-
const { getContainer: e, container: t } =
|
|
1385
|
+
}, xo), ts = () => {
|
|
1386
|
+
const { getContainer: e, container: t } = Tr(), { scrollToPage: n } = _t(), {
|
|
1386
1387
|
virtualScrollRef: r,
|
|
1387
1388
|
getVirtualScrollRef: o,
|
|
1388
1389
|
getPageScrollElementRef: i,
|
|
1389
1390
|
getVirtualScrollableElementRef: l,
|
|
1390
1391
|
setTotalInnerDimensions: s,
|
|
1391
1392
|
totalInnerDimensions: c
|
|
1392
|
-
} = Ue(), { nextPage: p, prevPage: h, setFocusedPage: m, focusedPage: u } = ee(), { scrollMode: f } = Pe(), { viewMode:
|
|
1393
|
+
} = Ue(), { nextPage: p, prevPage: h, setFocusedPage: m, focusedPage: u } = ee(), { scrollMode: f } = Pe(), { viewMode: g } = Ge(), _ = $(null), v = $({
|
|
1393
1394
|
height: 0,
|
|
1394
1395
|
width: 0
|
|
1395
1396
|
}), b = $({
|
|
1396
|
-
viewMode:
|
|
1397
|
+
viewMode: g,
|
|
1397
1398
|
scrollMode: f
|
|
1398
|
-
}), { isFullScreen: S } =
|
|
1399
|
+
}), { isFullScreen: S } = wr(), {
|
|
1399
1400
|
pageDimension: P,
|
|
1400
1401
|
rowCount: T,
|
|
1401
1402
|
rowHeight: d,
|
|
@@ -1403,12 +1404,12 @@ const Eo = (e = 1) => {
|
|
|
1403
1404
|
columnWidth: w,
|
|
1404
1405
|
estimatedColumnWidth: I,
|
|
1405
1406
|
estimatedRowHeight: y
|
|
1406
|
-
} = Mo(), [R, N] = F({}), { isScrolling: L } =
|
|
1407
|
+
} = Mo(), [R, N] = F({}), { isScrolling: L } = Xt(), x = $(), E = $({
|
|
1407
1408
|
scrollTop: 0,
|
|
1408
1409
|
scrollLeft: 0
|
|
1409
|
-
}), { isPressed: z } =
|
|
1410
|
+
}), { isPressed: z } = Ir(), { selectionMode: k } = mr(), { initializeGrabScroll: G, scrollBehavior: Z } = yr({
|
|
1410
1411
|
isPressed: z
|
|
1411
|
-
}), U = D(() => k ===
|
|
1412
|
+
}), U = D(() => k === Bt.HAND, [k]), K = M((W, H) => {
|
|
1412
1413
|
N((q) => ({ ...q, [W]: Math.round(H * 100) }));
|
|
1413
1414
|
}, []), ue = D(() => ({
|
|
1414
1415
|
columnCount: C,
|
|
@@ -1429,7 +1430,7 @@ const Eo = (e = 1) => {
|
|
|
1429
1430
|
window.removeEventListener("keydown", oe);
|
|
1430
1431
|
}), [oe]), A(() => {
|
|
1431
1432
|
if (_.current && (_.current.style.position = "relative"), !!r) {
|
|
1432
|
-
|
|
1433
|
+
v.current = c, s({
|
|
1433
1434
|
height: Array.from({ length: T }).reduce(
|
|
1434
1435
|
(W, H, q) => W + d(q),
|
|
1435
1436
|
0
|
|
@@ -1450,25 +1451,25 @@ const Eo = (e = 1) => {
|
|
|
1450
1451
|
}, [T, C, P, r, n]), A(() => {
|
|
1451
1452
|
if (L.current)
|
|
1452
1453
|
return;
|
|
1453
|
-
if (b.current.viewMode !==
|
|
1454
|
+
if (b.current.viewMode !== g || b.current.scrollMode !== f) {
|
|
1454
1455
|
x.current && clearTimeout(x.current), N({}), n(u), f === Q.HORIZONTAL_SCROLLING && (r == null || r.scrollTo({
|
|
1455
1456
|
scrollTop: 0
|
|
1456
1457
|
})), x.current = setTimeout(() => {
|
|
1457
1458
|
requestAnimationFrame(() => {
|
|
1458
|
-
b.current = { viewMode:
|
|
1459
|
+
b.current = { viewMode: g, scrollMode: f };
|
|
1459
1460
|
});
|
|
1460
1461
|
}, 100);
|
|
1461
1462
|
return;
|
|
1462
1463
|
}
|
|
1463
1464
|
const H = E.current.scrollTop, q = E.current.scrollLeft;
|
|
1464
1465
|
if (c.height !== 0 && c.width !== 0) {
|
|
1465
|
-
const { height: le, width: Te } = c, { height: de, width: pe } =
|
|
1466
|
+
const { height: le, width: Te } = c, { height: de, width: pe } = v.current, Ze = H / de * le, je = q / pe * Te, An = Math.min(Ze, le) || 0, zn = Math.min(je, Te) || 0;
|
|
1466
1467
|
r == null || r.scrollTo({
|
|
1467
|
-
scrollTop:
|
|
1468
|
-
scrollLeft:
|
|
1468
|
+
scrollTop: An,
|
|
1469
|
+
scrollLeft: zn
|
|
1469
1470
|
});
|
|
1470
1471
|
}
|
|
1471
|
-
}, [c,
|
|
1472
|
+
}, [c, g, f]), A(() => {
|
|
1472
1473
|
const W = Object.entries(R);
|
|
1473
1474
|
if (L.current) {
|
|
1474
1475
|
L.current && (L.current = !1);
|
|
@@ -1496,7 +1497,7 @@ const Eo = (e = 1) => {
|
|
|
1496
1497
|
return /* @__PURE__ */ a("div", { ref: e, tabIndex: -1, className: _e, children: /* @__PURE__ */ a(Lo, { children: ({ width: W, height: H }) => /* @__PURE__ */ a(
|
|
1497
1498
|
"div",
|
|
1498
1499
|
{
|
|
1499
|
-
"data-rp": "
|
|
1500
|
+
"data-rp": "pages",
|
|
1500
1501
|
ref: Se,
|
|
1501
1502
|
style: { width: W, height: H, scrollBehavior: Z },
|
|
1502
1503
|
children: f === Q.PAGE_SCROLLING ? /* @__PURE__ */ a(
|
|
@@ -1505,7 +1506,7 @@ const Eo = (e = 1) => {
|
|
|
1505
1506
|
ref: i,
|
|
1506
1507
|
style: { width: W, height: H },
|
|
1507
1508
|
className: j(ae["rp-pages"], ae["rp-page-scrolling-wrapper"]),
|
|
1508
|
-
children:
|
|
1509
|
+
children: g === ze.DUAL_PAGE ? /* @__PURE__ */ a(Do, { widths: w, heights: d }) : /* @__PURE__ */ a(Ao, { widths: w, heights: d })
|
|
1509
1510
|
}
|
|
1510
1511
|
) : I ? /* @__PURE__ */ a(
|
|
1511
1512
|
Io,
|
|
@@ -1554,17 +1555,17 @@ const Eo = (e = 1) => {
|
|
|
1554
1555
|
A(() => {
|
|
1555
1556
|
s(e.toString());
|
|
1556
1557
|
}, [e]);
|
|
1557
|
-
const h = M((
|
|
1558
|
-
const _ =
|
|
1558
|
+
const h = M((g) => {
|
|
1559
|
+
const _ = g.target.value;
|
|
1559
1560
|
s(_);
|
|
1560
1561
|
}, []), m = M(() => {
|
|
1561
|
-
const
|
|
1562
|
-
|
|
1562
|
+
const g = i(l);
|
|
1563
|
+
g.success || s(g.currentPage.toString());
|
|
1563
1564
|
}, [i, l, t]), u = M(() => {
|
|
1564
1565
|
s(e.toString());
|
|
1565
1566
|
}, [e]), f = M(
|
|
1566
|
-
(
|
|
1567
|
-
|
|
1567
|
+
(g) => {
|
|
1568
|
+
g.key === "Enter" && m();
|
|
1568
1569
|
},
|
|
1569
1570
|
[m]
|
|
1570
1571
|
);
|
|
@@ -1581,7 +1582,7 @@ const Eo = (e = 1) => {
|
|
|
1581
1582
|
) : c ? /* @__PURE__ */ O("div", { className: tt["rp-paginate"], children: [
|
|
1582
1583
|
!p && /* @__PURE__ */ a(X, { content: "Previous page", children: /* @__PURE__ */ a(B, { onClick: o, disabled: e === 1, children: /* @__PURE__ */ a(Fo, {}) }) }),
|
|
1583
1584
|
/* @__PURE__ */ a(
|
|
1584
|
-
|
|
1585
|
+
jt,
|
|
1585
1586
|
{
|
|
1586
1587
|
onKeyDown: f,
|
|
1587
1588
|
onBlur: u,
|
|
@@ -1597,7 +1598,7 @@ const Eo = (e = 1) => {
|
|
|
1597
1598
|
!p && /* @__PURE__ */ a(X, { content: "Next page", children: /* @__PURE__ */ a(B, { onClick: r, disabled: e === t, children: /* @__PURE__ */ a(ko, {}) }) })
|
|
1598
1599
|
] }) : null;
|
|
1599
1600
|
};
|
|
1600
|
-
var bt = "Dialog", [
|
|
1601
|
+
var bt = "Dialog", [pn, ns] = kr(bt), [Ho, te] = pn(bt), hn = (e) => {
|
|
1601
1602
|
const {
|
|
1602
1603
|
__scopeDialog: t,
|
|
1603
1604
|
children: n,
|
|
@@ -1605,7 +1606,7 @@ var bt = "Dialog", [dn, rs] = Fr(bt), [Ho, te] = dn(bt), pn = (e) => {
|
|
|
1605
1606
|
defaultOpen: o,
|
|
1606
1607
|
onOpenChange: i,
|
|
1607
1608
|
modal: l = !0
|
|
1608
|
-
} = e, s = V.useRef(null), c = V.useRef(null), [p = !1, h] =
|
|
1609
|
+
} = e, s = V.useRef(null), c = V.useRef(null), [p = !1, h] = Hr({
|
|
1609
1610
|
prop: r,
|
|
1610
1611
|
defaultProp: o,
|
|
1611
1612
|
onChange: i
|
|
@@ -1627,10 +1628,10 @@ var bt = "Dialog", [dn, rs] = Fr(bt), [Ho, te] = dn(bt), pn = (e) => {
|
|
|
1627
1628
|
}
|
|
1628
1629
|
);
|
|
1629
1630
|
};
|
|
1630
|
-
|
|
1631
|
-
var
|
|
1631
|
+
hn.displayName = bt;
|
|
1632
|
+
var fn = "DialogTrigger", $o = V.forwardRef(
|
|
1632
1633
|
(e, t) => {
|
|
1633
|
-
const { __scopeDialog: n, ...r } = e, o = te(
|
|
1634
|
+
const { __scopeDialog: n, ...r } = e, o = te(fn, n), i = mt(t, o.triggerRef);
|
|
1634
1635
|
return /* @__PURE__ */ a(
|
|
1635
1636
|
Ne.button,
|
|
1636
1637
|
{
|
|
@@ -1646,28 +1647,28 @@ var hn = "DialogTrigger", $o = V.forwardRef(
|
|
|
1646
1647
|
);
|
|
1647
1648
|
}
|
|
1648
1649
|
);
|
|
1649
|
-
$o.displayName =
|
|
1650
|
-
var Ct = "DialogPortal", [Vo,
|
|
1650
|
+
$o.displayName = fn;
|
|
1651
|
+
var Ct = "DialogPortal", [Vo, mn] = pn(Ct, {
|
|
1651
1652
|
forceMount: void 0
|
|
1652
|
-
}),
|
|
1653
|
+
}), gn = (e) => {
|
|
1653
1654
|
const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, i = te(Ct, t);
|
|
1654
|
-
return /* @__PURE__ */ a(Vo, { scope: t, forceMount: n, children: V.Children.map(r, (l) => /* @__PURE__ */ a(gt, { present: n || i.open, children: /* @__PURE__ */ a(
|
|
1655
|
+
return /* @__PURE__ */ a(Vo, { scope: t, forceMount: n, children: V.Children.map(r, (l) => /* @__PURE__ */ a(gt, { present: n || i.open, children: /* @__PURE__ */ a(Fr, { asChild: !0, container: o, children: l }) })) });
|
|
1655
1656
|
};
|
|
1656
|
-
|
|
1657
|
-
var ke = "DialogOverlay",
|
|
1657
|
+
gn.displayName = Ct;
|
|
1658
|
+
var ke = "DialogOverlay", vn = V.forwardRef(
|
|
1658
1659
|
(e, t) => {
|
|
1659
|
-
const n =
|
|
1660
|
+
const n = mn(ke, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, i = te(ke, e.__scopeDialog);
|
|
1660
1661
|
return i.modal ? /* @__PURE__ */ a(gt, { present: r || i.open, children: /* @__PURE__ */ a(Go, { ...o, ref: t }) }) : null;
|
|
1661
1662
|
}
|
|
1662
1663
|
);
|
|
1663
|
-
|
|
1664
|
+
vn.displayName = ke;
|
|
1664
1665
|
var Go = V.forwardRef(
|
|
1665
1666
|
(e, t) => {
|
|
1666
1667
|
const { __scopeDialog: n, ...r } = e, o = te(ke, n);
|
|
1667
1668
|
return (
|
|
1668
1669
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
1669
1670
|
// ie. when `Overlay` and `Content` are siblings
|
|
1670
|
-
/* @__PURE__ */ a(
|
|
1671
|
+
/* @__PURE__ */ a(Lr, { as: Er, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ a(
|
|
1671
1672
|
Ne.div,
|
|
1672
1673
|
{
|
|
1673
1674
|
"data-state": St(o.open),
|
|
@@ -1678,22 +1679,22 @@ var Go = V.forwardRef(
|
|
|
1678
1679
|
) })
|
|
1679
1680
|
);
|
|
1680
1681
|
}
|
|
1681
|
-
), me = "DialogContent",
|
|
1682
|
+
), me = "DialogContent", _n = V.forwardRef(
|
|
1682
1683
|
(e, t) => {
|
|
1683
|
-
const n =
|
|
1684
|
+
const n = mn(me, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, i = te(me, e.__scopeDialog);
|
|
1684
1685
|
return /* @__PURE__ */ a(gt, { present: r || i.open, children: i.modal ? /* @__PURE__ */ a(Uo, { ...o, ref: t }) : /* @__PURE__ */ a(qo, { ...o, ref: t }) });
|
|
1685
1686
|
}
|
|
1686
1687
|
);
|
|
1687
|
-
|
|
1688
|
+
_n.displayName = me;
|
|
1688
1689
|
var Uo = V.forwardRef(
|
|
1689
1690
|
(e, t) => {
|
|
1690
1691
|
const n = te(me, e.__scopeDialog), r = V.useRef(null), o = mt(t, n.contentRef, r);
|
|
1691
1692
|
return V.useEffect(() => {
|
|
1692
1693
|
const i = r.current;
|
|
1693
1694
|
if (i)
|
|
1694
|
-
return
|
|
1695
|
+
return Or(i);
|
|
1695
1696
|
}, []), /* @__PURE__ */ a(
|
|
1696
|
-
|
|
1697
|
+
wn,
|
|
1697
1698
|
{
|
|
1698
1699
|
...e,
|
|
1699
1700
|
ref: o,
|
|
@@ -1718,7 +1719,7 @@ var Uo = V.forwardRef(
|
|
|
1718
1719
|
(e, t) => {
|
|
1719
1720
|
const n = te(me, e.__scopeDialog), r = V.useRef(!1), o = V.useRef(!1);
|
|
1720
1721
|
return /* @__PURE__ */ a(
|
|
1721
|
-
|
|
1722
|
+
wn,
|
|
1722
1723
|
{
|
|
1723
1724
|
...e,
|
|
1724
1725
|
ref: t,
|
|
@@ -1737,12 +1738,12 @@ var Uo = V.forwardRef(
|
|
|
1737
1738
|
}
|
|
1738
1739
|
);
|
|
1739
1740
|
}
|
|
1740
|
-
),
|
|
1741
|
+
), wn = V.forwardRef(
|
|
1741
1742
|
(e, t) => {
|
|
1742
1743
|
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: i, ...l } = e, s = te(me, n), c = V.useRef(null), p = mt(t, c);
|
|
1743
|
-
return
|
|
1744
|
+
return Dr(), /* @__PURE__ */ O(Ae, { children: [
|
|
1744
1745
|
/* @__PURE__ */ a(
|
|
1745
|
-
|
|
1746
|
+
Ar,
|
|
1746
1747
|
{
|
|
1747
1748
|
asChild: !0,
|
|
1748
1749
|
loop: !0,
|
|
@@ -1750,7 +1751,7 @@ var Uo = V.forwardRef(
|
|
|
1750
1751
|
onMountAutoFocus: o,
|
|
1751
1752
|
onUnmountAutoFocus: i,
|
|
1752
1753
|
children: /* @__PURE__ */ a(
|
|
1753
|
-
|
|
1754
|
+
zr,
|
|
1754
1755
|
{
|
|
1755
1756
|
role: "dialog",
|
|
1756
1757
|
id: s.contentId,
|
|
@@ -1770,23 +1771,23 @@ var Uo = V.forwardRef(
|
|
|
1770
1771
|
] })
|
|
1771
1772
|
] });
|
|
1772
1773
|
}
|
|
1773
|
-
), Pt = "DialogTitle",
|
|
1774
|
+
), Pt = "DialogTitle", bn = V.forwardRef(
|
|
1774
1775
|
(e, t) => {
|
|
1775
1776
|
const { __scopeDialog: n, ...r } = e, o = te(Pt, n);
|
|
1776
1777
|
return /* @__PURE__ */ a(Ne.h2, { id: o.titleId, ...r, ref: t });
|
|
1777
1778
|
}
|
|
1778
1779
|
);
|
|
1779
|
-
|
|
1780
|
-
var
|
|
1780
|
+
bn.displayName = Pt;
|
|
1781
|
+
var Cn = "DialogDescription", Zo = V.forwardRef(
|
|
1781
1782
|
(e, t) => {
|
|
1782
|
-
const { __scopeDialog: n, ...r } = e, o = te(
|
|
1783
|
+
const { __scopeDialog: n, ...r } = e, o = te(Cn, n);
|
|
1783
1784
|
return /* @__PURE__ */ a(Ne.p, { id: o.descriptionId, ...r, ref: t });
|
|
1784
1785
|
}
|
|
1785
1786
|
);
|
|
1786
|
-
Zo.displayName =
|
|
1787
|
-
var
|
|
1787
|
+
Zo.displayName = Cn;
|
|
1788
|
+
var Pn = "DialogClose", Sn = V.forwardRef(
|
|
1788
1789
|
(e, t) => {
|
|
1789
|
-
const { __scopeDialog: n, ...r } = e, o = te(
|
|
1790
|
+
const { __scopeDialog: n, ...r } = e, o = te(Pn, n);
|
|
1790
1791
|
return /* @__PURE__ */ a(
|
|
1791
1792
|
Ne.button,
|
|
1792
1793
|
{
|
|
@@ -1798,16 +1799,16 @@ var Cn = "DialogClose", Pn = V.forwardRef(
|
|
|
1798
1799
|
);
|
|
1799
1800
|
}
|
|
1800
1801
|
);
|
|
1801
|
-
|
|
1802
|
+
Sn.displayName = Pn;
|
|
1802
1803
|
function St(e) {
|
|
1803
1804
|
return e ? "open" : "closed";
|
|
1804
1805
|
}
|
|
1805
|
-
var
|
|
1806
|
+
var Tn = "DialogTitleWarning", [rs, In] = Wr(Tn, {
|
|
1806
1807
|
contentName: me,
|
|
1807
1808
|
titleName: Pt,
|
|
1808
1809
|
docsSlug: "dialog"
|
|
1809
1810
|
}), jo = ({ titleId: e }) => {
|
|
1810
|
-
const t = Tn
|
|
1811
|
+
const t = In(Tn), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
1811
1812
|
|
|
1812
1813
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
1813
1814
|
|
|
@@ -1816,13 +1817,13 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
1816
1817
|
e && (document.getElementById(e) || console.error(n));
|
|
1817
1818
|
}, [n, e]), null;
|
|
1818
1819
|
}, Bo = "DialogDescriptionWarning", Ko = ({ contentRef: e, descriptionId: t }) => {
|
|
1819
|
-
const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${
|
|
1820
|
+
const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${In(Bo).contentName}}.`;
|
|
1820
1821
|
return V.useEffect(() => {
|
|
1821
1822
|
var i;
|
|
1822
1823
|
const o = (i = e.current) == null ? void 0 : i.getAttribute("aria-describedby");
|
|
1823
1824
|
t && o && (document.getElementById(t) || console.warn(r));
|
|
1824
1825
|
}, [r, e, t]), null;
|
|
1825
|
-
}, Xo =
|
|
1826
|
+
}, Xo = hn, Jo = gn, Yo = vn, Qo = _n, ea = bn, ta = Sn;
|
|
1826
1827
|
const fe = {
|
|
1827
1828
|
"rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
|
|
1828
1829
|
"rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
|
|
@@ -1832,7 +1833,7 @@ const fe = {
|
|
|
1832
1833
|
"rp-dialog-close": "_rp-dialog-close_slqo7_47",
|
|
1833
1834
|
"rp-properties-divider": "_rp-properties-divider_slqo7_55"
|
|
1834
1835
|
}, na = () => {
|
|
1835
|
-
const { pdfProperties: e } = Y(), { container: t } = qe(), { activeDocumentProperties: n, setActiveDocumentProperties: r } =
|
|
1836
|
+
const { pdfProperties: e } = Y(), { container: t } = qe(), { activeDocumentProperties: n, setActiveDocumentProperties: r } = Vr(), o = D(() => {
|
|
1836
1837
|
if (!e)
|
|
1837
1838
|
return [];
|
|
1838
1839
|
const {
|
|
@@ -1845,9 +1846,9 @@ const fe = {
|
|
|
1845
1846
|
creator: m,
|
|
1846
1847
|
keywords: u,
|
|
1847
1848
|
modifierOn: f,
|
|
1848
|
-
pdfProducer:
|
|
1849
|
+
pdfProducer: g,
|
|
1849
1850
|
pdfVersion: _,
|
|
1850
|
-
pageCount:
|
|
1851
|
+
pageCount: v
|
|
1851
1852
|
} = e;
|
|
1852
1853
|
return [
|
|
1853
1854
|
{ label: "File name", value: l },
|
|
@@ -1867,17 +1868,17 @@ const fe = {
|
|
|
1867
1868
|
value: f ? it(f) : ""
|
|
1868
1869
|
},
|
|
1869
1870
|
{ separate: !0 },
|
|
1870
|
-
{ label: "PDF producer", value:
|
|
1871
|
+
{ label: "PDF producer", value: g },
|
|
1871
1872
|
{ label: "PDF version", value: _ },
|
|
1872
|
-
{ label: "Page count", value:
|
|
1873
|
+
{ label: "Page count", value: v }
|
|
1873
1874
|
];
|
|
1874
1875
|
}, [e]);
|
|
1875
1876
|
return /* @__PURE__ */ a(Xo, { open: n, onOpenChange: r, children: /* @__PURE__ */ a(Jo, { container: t, children: /* @__PURE__ */ O("div", { className: fe["rp-dialog-wrapper"], children: [
|
|
1876
1877
|
/* @__PURE__ */ a(Yo, { className: fe["rp-dialog-overlay"] }),
|
|
1877
1878
|
/* @__PURE__ */ O(Qo, { className: fe["rp-document-dialog"], children: [
|
|
1878
1879
|
/* @__PURE__ */ a(ea, { className: fe["rp-dialog-title"], children: "Document Properties" }),
|
|
1879
|
-
/* @__PURE__ */ a("div", { className: fe["rp-document-properties"], children: o.map((i, l) => /* @__PURE__ */ a("div", { children: i.separate ? /* @__PURE__ */ a("div", { className: fe["rp-properties-divider"] }) : /* @__PURE__ */ a(
|
|
1880
|
-
/* @__PURE__ */ a(ta, { asChild: !0, className: fe["rp-dialog-close"], children: /* @__PURE__ */ a(
|
|
1880
|
+
/* @__PURE__ */ a("div", { className: fe["rp-document-properties"], children: o.map((i, l) => /* @__PURE__ */ a("div", { children: i.separate ? /* @__PURE__ */ a("div", { className: fe["rp-properties-divider"] }) : /* @__PURE__ */ a($r, { label: i.label, value: i.value }) }, l)) }),
|
|
1881
|
+
/* @__PURE__ */ a(ta, { asChild: !0, className: fe["rp-dialog-close"], children: /* @__PURE__ */ a(Qt, {}) })
|
|
1881
1882
|
] })
|
|
1882
1883
|
] }) }) });
|
|
1883
1884
|
}, ra = {
|
|
@@ -1890,13 +1891,13 @@ const fe = {
|
|
|
1890
1891
|
const r = document.createElement("a");
|
|
1891
1892
|
r.href = t, r.download = e, document.body.appendChild(r), r.click(), document.body.removeChild(r);
|
|
1892
1893
|
} };
|
|
1893
|
-
},
|
|
1894
|
+
}, yn = () => {
|
|
1894
1895
|
const { downloadIcon: e } = re();
|
|
1895
|
-
return e || /* @__PURE__ */ a(
|
|
1896
|
-
},
|
|
1897
|
-
/* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(
|
|
1896
|
+
return e || /* @__PURE__ */ a(jr, {});
|
|
1897
|
+
}, Rn = ({ children: e, className: t }) => /* @__PURE__ */ a(X, { className: t, content: "Download file", children: e }), aa = ({ downloadFile: e }) => /* @__PURE__ */ a(Rn, { children: /* @__PURE__ */ a(B, { onClick: e, children: /* @__PURE__ */ a(yn, {}) }) }), ia = ({ downloadFile: e }) => /* @__PURE__ */ a(ce, { onClick: e, children: /* @__PURE__ */ O(Rn, { className: "rp-menu-item", children: [
|
|
1898
|
+
/* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(yn, {}) }),
|
|
1898
1899
|
"Download file"
|
|
1899
|
-
] }) }),
|
|
1900
|
+
] }) }), xn = () => {
|
|
1900
1901
|
const { downloadFile: e } = oa(), { downloadTool: t = !0 } = se(), { isSmallScreen: n } = ge();
|
|
1901
1902
|
return t ? n ? /* @__PURE__ */ a(ia, { downloadFile: e }) : typeof t == "function" ? /* @__PURE__ */ a(t, { downloadFile: e }) : t ? /* @__PURE__ */ a(aa, { downloadFile: e }) : null : null;
|
|
1902
1903
|
};
|
|
@@ -1921,7 +1922,7 @@ const sa = () => {
|
|
|
1921
1922
|
});
|
|
1922
1923
|
}, []), f = () => {
|
|
1923
1924
|
h.current = !0;
|
|
1924
|
-
},
|
|
1925
|
+
}, g = async ({
|
|
1925
1926
|
scratchCanvas: P,
|
|
1926
1927
|
pdfDocument: T,
|
|
1927
1928
|
pageNumber: d,
|
|
@@ -1934,7 +1935,7 @@ const sa = () => {
|
|
|
1934
1935
|
u();
|
|
1935
1936
|
return;
|
|
1936
1937
|
}
|
|
1937
|
-
const R = w /
|
|
1938
|
+
const R = w / nr.PDF;
|
|
1938
1939
|
P.width = Math.floor(C.width * R), P.height = Math.floor(C.height * R);
|
|
1939
1940
|
const N = P.getContext("2d");
|
|
1940
1941
|
N.save(), N.fillStyle = "rgb(255, 255, 255)", N.fillRect(0, 0, P.width, P.height), N.restore();
|
|
@@ -1951,14 +1952,14 @@ const sa = () => {
|
|
|
1951
1952
|
transform: [R, 0, 0, R, 0, 0],
|
|
1952
1953
|
viewport: L.getViewport({ scale: 1, rotation: C.rotation }),
|
|
1953
1954
|
intent: "print",
|
|
1954
|
-
annotationMode:
|
|
1955
|
+
annotationMode: rr.ENABLE_STORAGE,
|
|
1955
1956
|
optionalContentConfigPromise: I,
|
|
1956
1957
|
printAnnotationStorage: x
|
|
1957
1958
|
};
|
|
1958
1959
|
try {
|
|
1959
1960
|
return L.render(E).promise;
|
|
1960
1961
|
} catch (z) {
|
|
1961
|
-
throw z instanceof
|
|
1962
|
+
throw z instanceof or || console.error(z), z;
|
|
1962
1963
|
}
|
|
1963
1964
|
}, _ = M(() => {
|
|
1964
1965
|
const P = window.print;
|
|
@@ -1977,7 +1978,7 @@ const sa = () => {
|
|
|
1977
1978
|
});
|
|
1978
1979
|
w.observe(document.body, { childList: !0, subtree: !0 });
|
|
1979
1980
|
});
|
|
1980
|
-
}, []),
|
|
1981
|
+
}, []), v = async (P) => {
|
|
1981
1982
|
const T = document.createElement("img"), d = document.createElement("div");
|
|
1982
1983
|
return d.classList.add("rp-print-page"), await new Promise((C, w) => {
|
|
1983
1984
|
P.toBlob((I) => {
|
|
@@ -2012,7 +2013,7 @@ const sa = () => {
|
|
|
2012
2013
|
return;
|
|
2013
2014
|
}
|
|
2014
2015
|
const L = N.page.getViewport({ scale: 1 });
|
|
2015
|
-
if (await
|
|
2016
|
+
if (await g({
|
|
2016
2017
|
scratchCanvas: P,
|
|
2017
2018
|
pdfDocument: e,
|
|
2018
2019
|
pageNumber: R,
|
|
@@ -2024,7 +2025,7 @@ const sa = () => {
|
|
|
2024
2025
|
u();
|
|
2025
2026
|
return;
|
|
2026
2027
|
}
|
|
2027
|
-
const x = await
|
|
2028
|
+
const x = await v(P);
|
|
2028
2029
|
T.push(x);
|
|
2029
2030
|
const E = parseFloat((T.length / I * 100).toFixed(2));
|
|
2030
2031
|
r({
|
|
@@ -2060,7 +2061,7 @@ const sa = () => {
|
|
|
2060
2061
|
isError: l,
|
|
2061
2062
|
error: c
|
|
2062
2063
|
};
|
|
2063
|
-
},
|
|
2064
|
+
}, Mn = We({
|
|
2064
2065
|
print: () => {
|
|
2065
2066
|
},
|
|
2066
2067
|
cancel: () => {
|
|
@@ -2078,26 +2079,26 @@ const sa = () => {
|
|
|
2078
2079
|
}
|
|
2079
2080
|
}
|
|
2080
2081
|
}), la = ({ children: e }) => {
|
|
2081
|
-
const [t, n] = F(null), [r, o] = F(null), { print: i, cancel: l, progress: s, isComplete: c, isError: p, error: h } = sa(), m = M((
|
|
2082
|
-
|
|
2083
|
-
}, []), u = (
|
|
2084
|
-
h &&
|
|
2082
|
+
const [t, n] = F(null), [r, o] = F(null), { print: i, cancel: l, progress: s, isComplete: c, isError: p, error: h } = sa(), m = M((v) => {
|
|
2083
|
+
v && typeof v == "function" && o(() => v);
|
|
2084
|
+
}, []), u = (v) => {
|
|
2085
|
+
h && v(h);
|
|
2085
2086
|
}, f = M(
|
|
2086
|
-
(
|
|
2087
|
-
n(() =>
|
|
2087
|
+
(v) => {
|
|
2088
|
+
n(() => v);
|
|
2088
2089
|
},
|
|
2089
2090
|
[s, t]
|
|
2090
2091
|
);
|
|
2091
2092
|
A(() => {
|
|
2092
|
-
c && r &&
|
|
2093
|
+
c && r && g();
|
|
2093
2094
|
}, [c, r]), A(() => {
|
|
2094
|
-
p && u((
|
|
2095
|
-
console.error(
|
|
2095
|
+
p && u((v) => {
|
|
2096
|
+
console.error(v);
|
|
2096
2097
|
});
|
|
2097
2098
|
}, [p]), A(() => {
|
|
2098
2099
|
s && t && t(s);
|
|
2099
2100
|
}, [s, t]);
|
|
2100
|
-
const
|
|
2101
|
+
const g = () => {
|
|
2101
2102
|
r && (r(), o(null));
|
|
2102
2103
|
}, _ = {
|
|
2103
2104
|
print: i,
|
|
@@ -2107,19 +2108,19 @@ const sa = () => {
|
|
|
2107
2108
|
setOnError: u,
|
|
2108
2109
|
progress: s
|
|
2109
2110
|
};
|
|
2110
|
-
return /* @__PURE__ */ a(
|
|
2111
|
+
return /* @__PURE__ */ a(Mn.Provider, { value: _, children: e });
|
|
2111
2112
|
}, Tt = () => {
|
|
2112
|
-
const e = He(
|
|
2113
|
+
const e = He(Mn);
|
|
2113
2114
|
if (!e)
|
|
2114
2115
|
throw new Error("usePrintContext must be used within a PrintProvider");
|
|
2115
2116
|
return e;
|
|
2116
|
-
},
|
|
2117
|
+
}, Nn = () => {
|
|
2117
2118
|
const { printIcon: e } = re();
|
|
2118
|
-
return e || /* @__PURE__ */ a(
|
|
2119
|
-
},
|
|
2120
|
-
/* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(
|
|
2119
|
+
return e || /* @__PURE__ */ a(Br, {});
|
|
2120
|
+
}, Ln = ({ children: e, className: t }) => /* @__PURE__ */ a(X, { className: t, content: "Print", children: e }), ca = ({ print: e }) => /* @__PURE__ */ a(Ln, { children: /* @__PURE__ */ a(B, { onClick: e, children: /* @__PURE__ */ a(Nn, {}) }) }), ua = ({ print: e }) => /* @__PURE__ */ a(ce, { onClick: e, children: /* @__PURE__ */ O(Ln, { className: "rp-menu-item", children: [
|
|
2121
|
+
/* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(Nn, {}) }),
|
|
2121
2122
|
"Print"
|
|
2122
|
-
] }) }),
|
|
2123
|
+
] }) }), En = () => {
|
|
2123
2124
|
const { print: e, cancel: t, setOnProgress: n, setOnComplete: r, setOnError: o, progress: i } = Tt(), { printTool: l = !0 } = se(), { isSmallScreen: s } = ge();
|
|
2124
2125
|
return l ? s ? /* @__PURE__ */ a(ua, { print: e }) : typeof l == "function" ? /* @__PURE__ */ a(
|
|
2125
2126
|
l,
|
|
@@ -2136,10 +2137,10 @@ const sa = () => {
|
|
|
2136
2137
|
"rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
|
|
2137
2138
|
}, pa = () => {
|
|
2138
2139
|
const { goToFirstPageIcon: e } = re();
|
|
2139
|
-
return e || /* @__PURE__ */ a(
|
|
2140
|
+
return e || /* @__PURE__ */ a(tn, { className: da["rp-go-to-Top"] });
|
|
2140
2141
|
}, ha = () => {
|
|
2141
2142
|
const { goToLastPageIcon: e } = re();
|
|
2142
|
-
return e || /* @__PURE__ */ a(
|
|
2143
|
+
return e || /* @__PURE__ */ a(tn, {});
|
|
2143
2144
|
}, fa = () => {
|
|
2144
2145
|
const { goToPage: e, totalPages: t, focusedPage: n } = ee(), { jumpNavigationTool: r = !0 } = se(), o = D(() => n === 1, [n]), i = D(() => n === t, [n, t]), l = M(() => {
|
|
2145
2146
|
e(1);
|
|
@@ -2182,25 +2183,26 @@ const sa = () => {
|
|
|
2182
2183
|
s,
|
|
2183
2184
|
c,
|
|
2184
2185
|
t
|
|
2185
|
-
]) ? /* @__PURE__ */ O(
|
|
2186
|
+
]) ? /* @__PURE__ */ O(Gr, { children: [
|
|
2186
2187
|
/* @__PURE__ */ a(
|
|
2187
2188
|
ft,
|
|
2188
2189
|
{
|
|
2190
|
+
"data-rp": "moreOptionsDropdown",
|
|
2189
2191
|
container: e,
|
|
2190
|
-
triggerComponent: /* @__PURE__ */ a("div", { role: "button", children: /* @__PURE__ */ a(X, { content: "More options", children: /* @__PURE__ */ a(B, { children: /* @__PURE__ */ a(
|
|
2192
|
+
triggerComponent: /* @__PURE__ */ a("div", { role: "button", children: /* @__PURE__ */ a(X, { content: "More options", children: /* @__PURE__ */ a(B, { children: /* @__PURE__ */ a(Nr, {}) }) }) }),
|
|
2191
2193
|
children: /* @__PURE__ */ O("div", { className: ra["rp-other-tool-content"], children: [
|
|
2192
2194
|
t && /* @__PURE__ */ O(Fe, { children: [
|
|
2193
|
-
/* @__PURE__ */ a(
|
|
2194
|
-
/* @__PURE__ */ a(
|
|
2195
|
-
/* @__PURE__ */ a(
|
|
2196
|
-
/* @__PURE__ */ a(
|
|
2195
|
+
/* @__PURE__ */ a(Yt, {}),
|
|
2196
|
+
/* @__PURE__ */ a(xn, {}),
|
|
2197
|
+
/* @__PURE__ */ a(En, {}),
|
|
2198
|
+
/* @__PURE__ */ a(en, {}),
|
|
2197
2199
|
/* @__PURE__ */ a(vt, {})
|
|
2198
2200
|
] }),
|
|
2199
2201
|
/* @__PURE__ */ a(fa, {}),
|
|
2200
|
-
/* @__PURE__ */ a(Ur, {}),
|
|
2201
|
-
/* @__PURE__ */ a(Br, {}),
|
|
2202
2202
|
/* @__PURE__ */ a(qr, {}),
|
|
2203
|
-
/* @__PURE__ */ a(
|
|
2203
|
+
/* @__PURE__ */ a(Kr, {}),
|
|
2204
|
+
/* @__PURE__ */ a(Zr, {}),
|
|
2205
|
+
/* @__PURE__ */ a(Ur, {})
|
|
2204
2206
|
] })
|
|
2205
2207
|
}
|
|
2206
2208
|
),
|
|
@@ -2209,12 +2211,12 @@ const sa = () => {
|
|
|
2209
2211
|
}, ga = () => {
|
|
2210
2212
|
const { isSmallScreen: e } = ge();
|
|
2211
2213
|
return /* @__PURE__ */ O(Ae, { children: [
|
|
2212
|
-
/* @__PURE__ */ a(
|
|
2214
|
+
/* @__PURE__ */ a(Mr, {}),
|
|
2213
2215
|
!e && /* @__PURE__ */ O(Ae, { children: [
|
|
2214
|
-
/* @__PURE__ */ a(
|
|
2215
|
-
/* @__PURE__ */ a(
|
|
2216
|
-
/* @__PURE__ */ a(
|
|
2217
|
-
/* @__PURE__ */ a(
|
|
2216
|
+
/* @__PURE__ */ a(Yt, {}),
|
|
2217
|
+
/* @__PURE__ */ a(xn, {}),
|
|
2218
|
+
/* @__PURE__ */ a(En, {}),
|
|
2219
|
+
/* @__PURE__ */ a(en, {})
|
|
2218
2220
|
] }),
|
|
2219
2221
|
/* @__PURE__ */ a(ma, {})
|
|
2220
2222
|
] });
|
|
@@ -2226,28 +2228,28 @@ const sa = () => {
|
|
|
2226
2228
|
"rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_163s9_20"
|
|
2227
2229
|
}, va = 25, nt = 1e3, _a = [50, 75, 100, 125, 150, 200, 300, 400], wa = () => {
|
|
2228
2230
|
const { zoomInIcon: e } = re();
|
|
2229
|
-
return e || /* @__PURE__ */ a(
|
|
2231
|
+
return e || /* @__PURE__ */ a(Xr, {});
|
|
2230
2232
|
}, ba = () => {
|
|
2231
2233
|
const { zoomOutIcon: e } = re();
|
|
2232
|
-
return e || /* @__PURE__ */ a(
|
|
2234
|
+
return e || /* @__PURE__ */ a(Jr, {});
|
|
2233
2235
|
}, Ca = () => {
|
|
2234
2236
|
const { zoomLevel: e, setZoomLevel: t } = ht(), { container: n, contentRef: r } = qe(), { zoomTool: o = !0 } = se(), { focusedPage: i } = ee(), { rotate: l } = Ve(), { pages: s } = Y(), { isSmallScreen: c } = ge(), p = M(() => {
|
|
2235
|
-
t((
|
|
2236
|
-
const b = Math.floor(
|
|
2237
|
+
t((v) => {
|
|
2238
|
+
const b = Math.floor(v / 25) * 25;
|
|
2237
2239
|
return Math.min(b + 25, nt);
|
|
2238
2240
|
});
|
|
2239
2241
|
}, [t]), h = M(() => {
|
|
2240
|
-
t((
|
|
2241
|
-
const b = Math.ceil(
|
|
2242
|
+
t((v) => {
|
|
2243
|
+
const b = Math.ceil(v / 25) * 25;
|
|
2242
2244
|
return Math.min(b - 25, nt);
|
|
2243
2245
|
});
|
|
2244
2246
|
}, [t]), m = D(() => e === va, [e]), u = D(() => e === nt, [e]), f = D(() => {
|
|
2245
|
-
var
|
|
2246
|
-
return (
|
|
2247
|
-
}, [s, i, l]),
|
|
2248
|
-
(
|
|
2247
|
+
var v;
|
|
2248
|
+
return (v = s.get(i)) == null ? void 0 : v.page.getViewport({ scale: 1, rotation: l });
|
|
2249
|
+
}, [s, i, l]), g = M(
|
|
2250
|
+
(v) => {
|
|
2249
2251
|
const b = ((f == null ? void 0 : f.width) || 0) + 2 * yt, S = ((f == null ? void 0 : f.height) || 0) + 2 * yt, P = (r == null ? void 0 : r.clientWidth) || 0, T = (r == null ? void 0 : r.clientHeight) || 0;
|
|
2250
|
-
switch (
|
|
2252
|
+
switch (v) {
|
|
2251
2253
|
case we.ACTUAL:
|
|
2252
2254
|
t(100);
|
|
2253
2255
|
break;
|
|
@@ -2265,10 +2267,10 @@ const sa = () => {
|
|
|
2265
2267
|
},
|
|
2266
2268
|
[t, f]
|
|
2267
2269
|
), _ = M(
|
|
2268
|
-
(
|
|
2269
|
-
typeof
|
|
2270
|
+
(v) => {
|
|
2271
|
+
typeof v == "number" ? t(v) : g(v);
|
|
2270
2272
|
},
|
|
2271
|
-
[t,
|
|
2273
|
+
[t, g]
|
|
2272
2274
|
);
|
|
2273
2275
|
return typeof o != "boolean" ? /* @__PURE__ */ a(o, { zoomLevel: e, setZoomLevel: t }) : o ? /* @__PURE__ */ O("div", { className: ye["rp-zoom-wrapper"], children: [
|
|
2274
2276
|
/* @__PURE__ */ a(X, { content: "Zoom out", children: /* @__PURE__ */ a(B, { disabled: m, onClick: h, children: /* @__PURE__ */ a(ba, {}) }) }),
|
|
@@ -2292,10 +2294,10 @@ const sa = () => {
|
|
|
2292
2294
|
/* @__PURE__ */ a(ce, { onClick: () => _(we.PAGE_WIDTH), children: "Page width" })
|
|
2293
2295
|
] }),
|
|
2294
2296
|
/* @__PURE__ */ a(vt, {}),
|
|
2295
|
-
/* @__PURE__ */ a(Fe, { children: _a.map((
|
|
2296
|
-
|
|
2297
|
+
/* @__PURE__ */ a(Fe, { children: _a.map((v) => /* @__PURE__ */ O(ce, { onClick: () => _(v), children: [
|
|
2298
|
+
v,
|
|
2297
2299
|
" %"
|
|
2298
|
-
] },
|
|
2300
|
+
] }, v)) })
|
|
2299
2301
|
] })
|
|
2300
2302
|
}
|
|
2301
2303
|
),
|
|
@@ -2310,9 +2312,9 @@ const sa = () => {
|
|
|
2310
2312
|
"rp-search-tool-input-checkboxes": "_rp-search-tool-input-checkboxes_1vxow_30",
|
|
2311
2313
|
"rp-search-tool-input-clear": "_rp-search-tool-input-clear_1vxow_35",
|
|
2312
2314
|
"rp-search-input": "_rp-search-input_1vxow_49"
|
|
2313
|
-
},
|
|
2315
|
+
}, Ut = () => {
|
|
2314
2316
|
const { searchIcon: e } = re();
|
|
2315
|
-
return e || /* @__PURE__ */ a(
|
|
2317
|
+
return e || /* @__PURE__ */ a(Yr, {});
|
|
2316
2318
|
}, Pa = () => {
|
|
2317
2319
|
const { container: e } = qe(), [t, n] = F(!1), { pdf: r } = Y(), [o, i] = F(null), {
|
|
2318
2320
|
searchOptions: l,
|
|
@@ -2323,8 +2325,8 @@ const sa = () => {
|
|
|
2323
2325
|
currentMatchPosition: m,
|
|
2324
2326
|
nextMatch: u,
|
|
2325
2327
|
prevMatch: f,
|
|
2326
|
-
search:
|
|
2327
|
-
} =
|
|
2328
|
+
search: g
|
|
2329
|
+
} = rn(), { searchTool: _ = !0 } = se(), [v, b] = F(g), S = M(() => {
|
|
2328
2330
|
n(!0);
|
|
2329
2331
|
}, []), P = M(() => {
|
|
2330
2332
|
p(""), b(""), n(!1);
|
|
@@ -2335,9 +2337,9 @@ const sa = () => {
|
|
|
2335
2337
|
[t]
|
|
2336
2338
|
), d = M(
|
|
2337
2339
|
(x) => {
|
|
2338
|
-
x.shiftKey && x.key === "Enter" ? f() : x.key === "Enter" && p(
|
|
2340
|
+
x.shiftKey && x.key === "Enter" ? f() : x.key === "Enter" && g !== v ? p(v) : x.key === "Enter" && u();
|
|
2339
2341
|
},
|
|
2340
|
-
[
|
|
2342
|
+
[v, f, u, p, g]
|
|
2341
2343
|
);
|
|
2342
2344
|
A(() => (window.addEventListener("keydown", T), () => {
|
|
2343
2345
|
window.removeEventListener("keydown", T);
|
|
@@ -2367,21 +2369,21 @@ const sa = () => {
|
|
|
2367
2369
|
open: t,
|
|
2368
2370
|
container: e,
|
|
2369
2371
|
align: "start",
|
|
2370
|
-
triggerComponent: /* @__PURE__ */ a(X, { content: "Search in document", children: /* @__PURE__ */ a(B, { onClick: S, children: /* @__PURE__ */ a(
|
|
2372
|
+
triggerComponent: /* @__PURE__ */ a(X, { content: "Search in document", children: /* @__PURE__ */ a(B, { onClick: S, children: /* @__PURE__ */ a(Ut, {}) }) }),
|
|
2371
2373
|
children: /* @__PURE__ */ O("div", { className: ne["rp-search-tool-content"], children: [
|
|
2372
2374
|
/* @__PURE__ */ O("div", { className: ne["rp-search-tool-input-wrapper"], children: [
|
|
2373
2375
|
/* @__PURE__ */ O("div", { className: ne["rp-search-tool-input"], children: [
|
|
2374
2376
|
/* @__PURE__ */ a(
|
|
2375
|
-
|
|
2377
|
+
jt,
|
|
2376
2378
|
{
|
|
2377
|
-
value:
|
|
2379
|
+
value: v,
|
|
2378
2380
|
onKeyDown: d,
|
|
2379
2381
|
onChange: C,
|
|
2380
|
-
icon: /* @__PURE__ */ a(
|
|
2382
|
+
icon: /* @__PURE__ */ a(Ut, {}),
|
|
2381
2383
|
placeholder: "Enter to Search",
|
|
2382
2384
|
className: ne["rp-search-input"],
|
|
2383
2385
|
ref: i,
|
|
2384
|
-
children: !!
|
|
2386
|
+
children: !!v && /* @__PURE__ */ a("span", { className: ne["rp-search-tool-input-clear"], onClick: w, children: /* @__PURE__ */ a(Qr, {}) })
|
|
2385
2387
|
}
|
|
2386
2388
|
),
|
|
2387
2389
|
c ? /* @__PURE__ */ a("span", { children: /* @__PURE__ */ a(pt, {}) }) : /* @__PURE__ */ a("span", { children: I })
|
|
@@ -2400,7 +2402,7 @@ const sa = () => {
|
|
|
2400
2402
|
className: ne["rp-search-tool-input-icon"]
|
|
2401
2403
|
}
|
|
2402
2404
|
) }),
|
|
2403
|
-
/* @__PURE__ */ a(B, { children: /* @__PURE__ */ a(
|
|
2405
|
+
/* @__PURE__ */ a(B, { children: /* @__PURE__ */ a(Qt, { onClick: P, className: ne["rp-search-tool-input-icon"] }) })
|
|
2404
2406
|
] })
|
|
2405
2407
|
] })
|
|
2406
2408
|
}
|
|
@@ -2429,13 +2431,13 @@ const sa = () => {
|
|
|
2429
2431
|
}, Ia = $e((e, t) => {
|
|
2430
2432
|
const { showPrintProgress: n } = se(), { progress: r } = Tt(), { isSmallScreen: o } = ge(), { percentage: i } = r || {}, l = () => o ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
|
|
2431
2433
|
return /* @__PURE__ */ O("div", { children: [
|
|
2432
|
-
/* @__PURE__ */ a("div", { "data-rp": "
|
|
2433
|
-
/* @__PURE__ */ O("div", { "data-rp": "
|
|
2434
|
+
/* @__PURE__ */ a("div", { "data-rp": "topBar", ref: t, className: Ie["rp-toolbar-content"], children: /* @__PURE__ */ O("div", { className: Ie["rp-toolbar-wrapper"], style: l(), children: [
|
|
2435
|
+
/* @__PURE__ */ O("div", { "data-rp": "topBarLeft", className: Ie["rp-toolbar-start"], children: [
|
|
2434
2436
|
/* @__PURE__ */ a(Pa, {}),
|
|
2435
2437
|
/* @__PURE__ */ a(Wo, {})
|
|
2436
2438
|
] }),
|
|
2437
|
-
/* @__PURE__ */ a("div", { "data-rp": "
|
|
2438
|
-
/* @__PURE__ */ a("div", { "data-rp": "
|
|
2439
|
+
/* @__PURE__ */ a("div", { "data-rp": "topBarCenter", className: Ie["rp-toolbar-middle"], children: /* @__PURE__ */ a(Ca, {}) }),
|
|
2440
|
+
/* @__PURE__ */ a("div", { "data-rp": "topBarRight", className: Ie["rp-toolbar-end"], children: /* @__PURE__ */ a(ga, {}) })
|
|
2439
2441
|
] }) }),
|
|
2440
2442
|
n && i ? /* @__PURE__ */ a(Ta, { percentage: i }) : null
|
|
2441
2443
|
] });
|
|
@@ -2487,7 +2489,7 @@ const sa = () => {
|
|
|
2487
2489
|
]
|
|
2488
2490
|
}
|
|
2489
2491
|
);
|
|
2490
|
-
},
|
|
2492
|
+
}, qt = {
|
|
2491
2493
|
"rp-thumbnails-container": "_rp-thumbnails-container_16vqr_1",
|
|
2492
2494
|
"rp-thumbnails": "_rp-thumbnails_16vqr_1"
|
|
2493
2495
|
}, Ra = () => {
|
|
@@ -2513,10 +2515,10 @@ const sa = () => {
|
|
|
2513
2515
|
m.scale,
|
|
2514
2516
|
r
|
|
2515
2517
|
).promise.then(() => {
|
|
2516
|
-
const
|
|
2518
|
+
const g = u.toDataURL();
|
|
2517
2519
|
return {
|
|
2518
2520
|
...m,
|
|
2519
|
-
thumbnailSrc:
|
|
2521
|
+
thumbnailSrc: g,
|
|
2520
2522
|
loading: !1
|
|
2521
2523
|
};
|
|
2522
2524
|
});
|
|
@@ -2524,7 +2526,7 @@ const sa = () => {
|
|
|
2524
2526
|
}
|
|
2525
2527
|
Promise.all(h).then((m) => {
|
|
2526
2528
|
const u = m.reduce(
|
|
2527
|
-
(f,
|
|
2529
|
+
(f, g) => (f[g.page.pageNumber] = g, f),
|
|
2528
2530
|
{}
|
|
2529
2531
|
);
|
|
2530
2532
|
t((f) => ({ ...f, ...u }));
|
|
@@ -2568,7 +2570,7 @@ const sa = () => {
|
|
|
2568
2570
|
[n, r]
|
|
2569
2571
|
);
|
|
2570
2572
|
return { thumbnailPages: e, addPage: l, addToPage: i, thumbnailLength: o };
|
|
2571
|
-
},
|
|
2573
|
+
}, On = We({
|
|
2572
2574
|
thumbnailPages: {},
|
|
2573
2575
|
addPage: (e) => {
|
|
2574
2576
|
},
|
|
@@ -2578,13 +2580,13 @@ const sa = () => {
|
|
|
2578
2580
|
setActive: (e) => {
|
|
2579
2581
|
},
|
|
2580
2582
|
active: !1
|
|
2581
|
-
}),
|
|
2583
|
+
}), Dn = () => He(On), xa = ({
|
|
2582
2584
|
children: e,
|
|
2583
2585
|
initialThumbnailsVisible: t
|
|
2584
2586
|
}) => {
|
|
2585
2587
|
const { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: i } = Ra(), [l, s] = F(t);
|
|
2586
2588
|
return /* @__PURE__ */ a(
|
|
2587
|
-
|
|
2589
|
+
On.Provider,
|
|
2588
2590
|
{
|
|
2589
2591
|
value: { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: i, active: l, setActive: s },
|
|
2590
2592
|
children: e
|
|
@@ -2594,33 +2596,33 @@ const sa = () => {
|
|
|
2594
2596
|
const n = e == null ? void 0 : e.querySelector(`#page-${t}`);
|
|
2595
2597
|
e && (n != null && n.offsetTop) && (e.scrollTop = (n == null ? void 0 : n.offsetTop) - Ma);
|
|
2596
2598
|
}, La = $e((e, t) => {
|
|
2597
|
-
const { show: n } = e, { focusedPage: r, totalPages: o } = ee(), { thumbnailPages: i, addPage: l, thumbnailLength: s, addToPage: c } =
|
|
2598
|
-
|
|
2599
|
+
const { show: n } = e, { focusedPage: r, totalPages: o } = ee(), { thumbnailPages: i, addPage: l, thumbnailLength: s, addToPage: c } = Dn(), p = $(null), h = $(1);
|
|
2600
|
+
Zt(t, () => p.current);
|
|
2599
2601
|
const m = D(() => Object.values(i), [i]), u = M(() => {
|
|
2600
2602
|
const f = s + 1;
|
|
2601
2603
|
f <= o && l(f);
|
|
2602
2604
|
}, [l, o, s]);
|
|
2603
2605
|
return A(() => {
|
|
2604
2606
|
r > s ? c(r) : n && h.current !== r && (Na(p.current, r), h.current = r);
|
|
2605
|
-
}, [r, s, c, n, m]),
|
|
2606
|
-
var _,
|
|
2607
|
+
}, [r, s, c, n, m]), ar(p.current, u), /* @__PURE__ */ a("div", { ref: p, className: qt["rp-thumbnails-container"], children: /* @__PURE__ */ a("div", { className: qt["rp-thumbnails"], children: n ? m.map((f, g) => {
|
|
2608
|
+
var _, v;
|
|
2607
2609
|
return /* @__PURE__ */ a(
|
|
2608
2610
|
ya,
|
|
2609
2611
|
{
|
|
2610
2612
|
isFocused: r === ((_ = f.page) == null ? void 0 : _.pageNumber),
|
|
2611
|
-
pageNumber: (
|
|
2613
|
+
pageNumber: (v = f.page) == null ? void 0 : v.pageNumber,
|
|
2612
2614
|
thumbnailSrc: f.thumbnailSrc,
|
|
2613
2615
|
loading: f.loading,
|
|
2614
2616
|
viewport: f.viewport
|
|
2615
2617
|
},
|
|
2616
|
-
|
|
2618
|
+
g
|
|
2617
2619
|
);
|
|
2618
2620
|
}) : null }) });
|
|
2619
2621
|
}), Ea = () => {
|
|
2620
2622
|
const { thumbnailIcon: e } = re();
|
|
2621
|
-
return e || /* @__PURE__ */ a(
|
|
2623
|
+
return e || /* @__PURE__ */ a($n, {});
|
|
2622
2624
|
}, Oa = () => {
|
|
2623
|
-
const { active: e, setActive: t } =
|
|
2625
|
+
const { active: e, setActive: t } = Dn(), [n, r] = F(200), o = $(null), { thumbnailTool: i } = se(), l = M(() => {
|
|
2624
2626
|
t((c) => !c);
|
|
2625
2627
|
}, []), s = D(() => typeof i != "boolean" && i ? /* @__PURE__ */ a(i, { onClick: l, active: e }) : i ? /* @__PURE__ */ a(X, { content: "Thumbnail", children: /* @__PURE__ */ a(B, { onClick: l, active: e, children: /* @__PURE__ */ a(Ea, {}) }) }) : null, [i, e, l]);
|
|
2626
2628
|
return /* @__PURE__ */ O(
|
|
@@ -2630,10 +2632,10 @@ const sa = () => {
|
|
|
2630
2632
|
className: rt["rp-sidebar-content-wrapper"],
|
|
2631
2633
|
"data-rp": "sidebar",
|
|
2632
2634
|
children: [
|
|
2633
|
-
/* @__PURE__ */ a("div", {
|
|
2634
|
-
/* @__PURE__ */ O("div", { "data-rp": "
|
|
2635
|
+
/* @__PURE__ */ a("div", { className: rt["rp-sidebar-content"], children: s }),
|
|
2636
|
+
/* @__PURE__ */ O("div", { "data-rp": "thumbnailSidebar", hidden: !e, className: rt["rp-thumbnails-wrapper"], children: [
|
|
2635
2637
|
/* @__PURE__ */ a(La, { show: e, ref: o }),
|
|
2636
|
-
/* @__PURE__ */ a(
|
|
2638
|
+
/* @__PURE__ */ a(ir, { onWidthChange: r, thumbnailRef: o })
|
|
2637
2639
|
] })
|
|
2638
2640
|
]
|
|
2639
2641
|
}
|
|
@@ -2652,14 +2654,14 @@ const sa = () => {
|
|
|
2652
2654
|
mobileWidth: p
|
|
2653
2655
|
} = e;
|
|
2654
2656
|
return /* @__PURE__ */ a(
|
|
2655
|
-
|
|
2657
|
+
_r,
|
|
2656
2658
|
{
|
|
2657
2659
|
initialScale: s,
|
|
2658
2660
|
initialPage: l,
|
|
2659
2661
|
initialScrollMode: c,
|
|
2660
2662
|
initialRotate: o,
|
|
2661
|
-
children: /* @__PURE__ */ a(
|
|
2662
|
-
|
|
2663
|
+
children: /* @__PURE__ */ a(fr, { mobileWidth: p, children: /* @__PURE__ */ a(pr, { children: /* @__PURE__ */ a(Qn, { children: /* @__PURE__ */ a(jn, { children: /* @__PURE__ */ a(Hn, { children: /* @__PURE__ */ a(gr, { initialSelectionMode: Bt.TEXT, children: /* @__PURE__ */ a(hr, { children: /* @__PURE__ */ a(Oo, { children: /* @__PURE__ */ a(Zn, { children: /* @__PURE__ */ a(dr, { textLayer: i, children: /* @__PURE__ */ a(Kn, { children: /* @__PURE__ */ a(
|
|
2664
|
+
Un,
|
|
2663
2665
|
{
|
|
2664
2666
|
darkMode: n,
|
|
2665
2667
|
onDarkModeChange: r,
|
|
@@ -2668,7 +2670,7 @@ const sa = () => {
|
|
|
2668
2670
|
) }) }) }) }) }) }) }) }) }) }) })
|
|
2669
2671
|
}
|
|
2670
2672
|
);
|
|
2671
|
-
},
|
|
2673
|
+
}, os = $e((e, t) => {
|
|
2672
2674
|
const {
|
|
2673
2675
|
children: n,
|
|
2674
2676
|
slots: r,
|
|
@@ -2681,25 +2683,25 @@ const sa = () => {
|
|
|
2681
2683
|
onLoaded: h,
|
|
2682
2684
|
cleanupOnLoaded: m,
|
|
2683
2685
|
...u
|
|
2684
|
-
} = e, [f,
|
|
2686
|
+
} = e, [f, g] = F(null), [_, v] = F(null), [b, S] = F(null);
|
|
2685
2687
|
return A(() => (h && h(), () => {
|
|
2686
2688
|
m && m();
|
|
2687
|
-
}), [h, m]), /* @__PURE__ */ a("div", { ref: t, className: j(he["rp-theme-variables"], he["rp-container"]), children: /* @__PURE__ */ a(
|
|
2688
|
-
|
|
2689
|
+
}), [h, m]), /* @__PURE__ */ a("div", { ref: t, className: j(he["rp-theme-variables"], he["rp-container"]), children: /* @__PURE__ */ a(cr, { container: _, contentRef: b, children: /* @__PURE__ */ a(Da, { ...u, children: /* @__PURE__ */ a(no, { initialSearch: l, children: /* @__PURE__ */ a(xa, { initialThumbnailsVisible: i, children: /* @__PURE__ */ a(qn, { slots: r, children: /* @__PURE__ */ a(Gn, { children: /* @__PURE__ */ a(sr, { icons: o, children: /* @__PURE__ */ a(br, { elementRef: b, children: /* @__PURE__ */ a(la, { children: /* @__PURE__ */ a(Bn, { children: s ? /* @__PURE__ */ a(
|
|
2690
|
+
lr,
|
|
2689
2691
|
{
|
|
2690
|
-
getContainerRef:
|
|
2692
|
+
getContainerRef: v,
|
|
2691
2693
|
toolbarRef: f,
|
|
2692
2694
|
style: c,
|
|
2693
2695
|
className: p,
|
|
2694
|
-
children: /* @__PURE__ */ O(
|
|
2696
|
+
children: /* @__PURE__ */ O(Cr, { children: [
|
|
2695
2697
|
/* @__PURE__ */ O("div", { className: he["rp-layout"], children: [
|
|
2696
|
-
/* @__PURE__ */ a(Ia, { ref:
|
|
2698
|
+
/* @__PURE__ */ a(Ia, { ref: g }),
|
|
2697
2699
|
/* @__PURE__ */ O("div", { className: he["rp-content"], children: [
|
|
2698
2700
|
/* @__PURE__ */ a("div", { className: he["rp-sidebar"], children: /* @__PURE__ */ a(Oa, {}) }),
|
|
2699
2701
|
/* @__PURE__ */ a("div", { ref: S, className: he["rp-pages"], children: n })
|
|
2700
2702
|
] })
|
|
2701
2703
|
] }),
|
|
2702
|
-
/* @__PURE__ */ a(
|
|
2704
|
+
/* @__PURE__ */ a(Vn, {})
|
|
2703
2705
|
] })
|
|
2704
2706
|
}
|
|
2705
2707
|
) : /* @__PURE__ */ a(
|
|
@@ -2715,27 +2717,27 @@ const sa = () => {
|
|
|
2715
2717
|
export {
|
|
2716
2718
|
po as A,
|
|
2717
2719
|
xa as B,
|
|
2718
|
-
|
|
2720
|
+
eo as C,
|
|
2719
2721
|
Do as D,
|
|
2720
2722
|
La as E,
|
|
2721
|
-
|
|
2723
|
+
xn as F,
|
|
2722
2724
|
Oa as G,
|
|
2723
2725
|
Da as H,
|
|
2724
2726
|
Ta as L,
|
|
2725
2727
|
fa as M,
|
|
2726
2728
|
ma as O,
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2729
|
+
dn as P,
|
|
2730
|
+
ts as R,
|
|
2731
|
+
nn as S,
|
|
2732
|
+
ro as T,
|
|
2731
2733
|
Ca as Z,
|
|
2732
|
-
|
|
2734
|
+
os as a,
|
|
2733
2735
|
oa as b,
|
|
2734
2736
|
Tt as c,
|
|
2735
|
-
|
|
2737
|
+
rn as d,
|
|
2736
2738
|
_t as e,
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
+
to as f,
|
|
2740
|
+
no as g,
|
|
2739
2741
|
wt as h,
|
|
2740
2742
|
Mo as i,
|
|
2741
2743
|
Eo as j,
|
|
@@ -2744,15 +2746,15 @@ export {
|
|
|
2744
2746
|
Wo as m,
|
|
2745
2747
|
na as n,
|
|
2746
2748
|
sa as o,
|
|
2747
|
-
|
|
2749
|
+
Mn as p,
|
|
2748
2750
|
la as q,
|
|
2749
|
-
|
|
2751
|
+
En as r,
|
|
2750
2752
|
ga as s,
|
|
2751
2753
|
Pa as t,
|
|
2752
2754
|
ee as u,
|
|
2753
2755
|
Ia as v,
|
|
2754
2756
|
ya as w,
|
|
2755
2757
|
Ra as x,
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
+
On as y,
|
|
2759
|
+
Dn as z
|
|
2758
2760
|
};
|