@pdf-viewer/react 1.9.2-rc.0 → 1.9.2-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ToolbarLayout.module-8210c0a6.js → ToolbarLayout.module-95e678ab.js} +385 -373
- package/dist/assets/ToolbarLayout.css +1 -1
- package/dist/components/RPController.js +1 -1
- package/dist/components/RPPages.js +1 -1
- package/dist/components/RPProvider.js +12 -11
- package/dist/components/layout/LayoutContainer.js +1 -1
- package/dist/components/layout/RPDefaultLayout.js +1 -1
- package/dist/components/layout/RPLayout.js +1 -1
- package/dist/components/layout/sidebar/RPSidebar.js +1 -1
- package/dist/components/layout/sidebar/Thumbnail.js +1 -1
- package/dist/components/layout/sidebar/Thumbnails.js +1 -1
- package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
- package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/MostPageTool.js +1 -1
- package/dist/components/layout/toolbar/OtherTool.js +1 -1
- package/dist/components/layout/toolbar/Paginate.js +1 -1
- package/dist/components/layout/toolbar/PrintTool.js +1 -1
- package/dist/components/layout/toolbar/RPToolbar.js +1 -1
- package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
- package/dist/components/layout/toolbar/SearchResultNavigator.js +1 -1
- package/dist/components/layout/toolbar/SearchTool.js +1 -1
- package/dist/components/layout/toolbar/ThumbnailTool.js +1 -1
- package/dist/components/layout/toolbar/ToolbarCustom.js +1 -1
- package/dist/components/layout/toolbar/ToolbarDefault.js +1 -1
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/tools/InputPageTool.js +1 -1
- package/dist/components/layout/toolbar/tools/NextPageTool.js +1 -1
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +1 -1
- package/dist/components/layout/toolbar/tools/PrintTool.js +1 -1
- package/dist/components/layout/toolbar/tools/ThumbnailTool.js +1 -1
- package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +1 -1
- package/dist/components/page/AnnotationLayer.js +1 -1
- package/dist/components/page/CanvasLayer.js +1 -1
- package/dist/components/page/DualPage.js +1 -1
- package/dist/components/page/RPPage.js +1 -1
- package/dist/components/page/SinglePage.js +1 -1
- package/dist/components/page/TextHighlightLayer.js +1 -1
- package/dist/components/page/TextLayer.js +1 -1
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/contexts/PaginationContext.js +1 -1
- package/dist/contexts/PrintContext.js +1 -1
- package/dist/contexts/RenderQueueProvider.js +1 -1
- package/dist/contexts/SearchContext.js +1 -1
- package/dist/contexts/ThumbnailsContext.js +1 -1
- package/dist/main.js +1 -1
- package/dist/types/utils/hooks/useFlickerSelectText.d.ts +1 -0
- package/dist/utils/hooks/useFileDownload.js +1 -1
- package/dist/utils/hooks/useFlickerSelectText.js +25 -0
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/usePaginate.js +1 -1
- package/dist/utils/hooks/usePresentPage.js +1 -1
- package/dist/utils/hooks/usePrint.js +1 -1
- package/dist/utils/hooks/useScrollToPage.js +1 -1
- package/dist/utils/hooks/useSearch.js +1 -1
- package/dist/utils/hooks/useThumbnail.js +1 -1
- package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
- package/package.json +1 -1
|
@@ -1,103 +1,103 @@
|
|
|
1
|
-
import { jsx as a, Fragment as pe, jsxs as
|
|
1
|
+
import { jsx as a, Fragment as pe, jsxs as H } from "react/jsx-runtime";
|
|
2
2
|
import * as X from "react";
|
|
3
3
|
import { useRef as k, useEffect as D, useCallback as E, useState as q, useMemo as W, createContext as He, useContext as $e, useImperativeHandle as tn, createElement as Ve, PureComponent as to, Component as no, memo as nn, forwardRef as oo } from "react";
|
|
4
4
|
import { ChevronUpIcon as Ze } from "./components/icons/ChevronUpIcon.js";
|
|
5
5
|
import { UIButton as ve } from "./components/ui/Button.js";
|
|
6
6
|
import { UIInput as on } from "./components/ui/Input.js";
|
|
7
|
-
import { ViewMode as Re, ScrollMode as ne, AnnotationSubType as Nt, SelectionMode as ro } from "./utils/types.js";
|
|
7
|
+
import { ViewMode as Re, ScrollMode as ne, AnnotationSubType as Nt, SelectionMode as ro, ErrorType as io } from "./utils/types.js";
|
|
8
8
|
import { useScrollModeContext as Ee } from "./contexts/ScrollModeContext.js";
|
|
9
9
|
import { useDocumentContext as oe } from "./contexts/RPDocumentContext.js";
|
|
10
|
-
import { useDocumentPasswordContext as
|
|
11
|
-
import { useDarkModeContext as
|
|
10
|
+
import { useDocumentPasswordContext as ao } from "./contexts/DocumentPasswordContext.js";
|
|
11
|
+
import { useDarkModeContext as so } from "./contexts/DarkModeContext.js";
|
|
12
12
|
import "./contexts/RotationContext.js";
|
|
13
|
-
import { useLayerContext as
|
|
13
|
+
import { useLayerContext as co } from "./contexts/LayerContext.js";
|
|
14
14
|
import { useZoomContext as wt } from "./contexts/ZoomContext.js";
|
|
15
15
|
import { useViewModeContext as Fe } from "./contexts/ViewModeContext.js";
|
|
16
16
|
import { useVirtualScrollContext as Ye } from "./contexts/VirtualScrollContext.js";
|
|
17
17
|
import { useVirtualGridContext as rn } from "./contexts/VirtualGridContext.js";
|
|
18
|
-
import { useSelectionModeContext as
|
|
19
|
-
import { useInitialStateContext as
|
|
20
|
-
import { useFullScreenContext as
|
|
18
|
+
import { useSelectionModeContext as lo } from "./contexts/SelectionModeContext.js";
|
|
19
|
+
import { useInitialStateContext as uo } from "./contexts/InitialStateContext.js";
|
|
20
|
+
import { useFullScreenContext as po } from "./contexts/FullScreenContext.js";
|
|
21
21
|
import "./contexts/FileInputContext.js";
|
|
22
22
|
import "./contexts/DropFileZoneContext.js";
|
|
23
|
-
import { findMatches as
|
|
23
|
+
import { findMatches as ho, resetDivs as fo, highlightMatches as mo, isMatchEntireWord as go } from "./utils/highlight.js";
|
|
24
24
|
import { useLayoutContainer as _e } from "./contexts/LayoutContainerContext.js";
|
|
25
25
|
import { useDimensionPagesContext as qe } from "./contexts/DimensionPagesContext.js";
|
|
26
26
|
import { useLocalizationContext as he } from "./contexts/LocalizationContext.js";
|
|
27
|
-
import { useHighlightContext as
|
|
27
|
+
import { useHighlightContext as vo } from "./contexts/HighlightContext.js";
|
|
28
28
|
import "./contexts/LicenseContext.js";
|
|
29
|
-
import { useDownloadContext as
|
|
29
|
+
import { useDownloadContext as wo } from "./contexts/DownloadContext.js";
|
|
30
30
|
import { useSmoothScrollContext as an } from "./contexts/SmoothScrollContext.js";
|
|
31
31
|
import "./contexts/ElementPageContext.js";
|
|
32
32
|
import { usePagesRotateContext as Je } from "./contexts/PagesRotateContext.js";
|
|
33
|
-
import { Queue as
|
|
34
|
-
import { renderPage as
|
|
35
|
-
import { useGlobalCurrentPage as
|
|
33
|
+
import { Queue as _o } from "./utils/Queue.js";
|
|
34
|
+
import { renderPage as bo } from "./utils/renderPage.js";
|
|
35
|
+
import { useGlobalCurrentPage as To } from "./contexts/GlobalCurrentPage.js";
|
|
36
36
|
import { useLoaderContext as sn } from "./contexts/LoaderContext.js";
|
|
37
37
|
import { useToolComponentContext as Ne } from "./contexts/ToolComponentContext.js";
|
|
38
38
|
import { useIconToolContext as be } from "./contexts/IconToolContext.js";
|
|
39
|
-
import { useOtherToolContext as
|
|
39
|
+
import { useOtherToolContext as Co, OtherToolProvider as Po } from "./contexts/OtherToolContext.js";
|
|
40
40
|
import "./components/RPConfig.js";
|
|
41
|
-
import { ThumbnailIcon as
|
|
41
|
+
import { ThumbnailIcon as yo } from "./components/icons/Thumbnail.js";
|
|
42
42
|
import { c as se } from "./clsx-0c6e471a.js";
|
|
43
43
|
import { LoaderIcon as _t } from "./components/icons/LoaderIcon.js";
|
|
44
|
-
import { Container as
|
|
45
|
-
import { useViewportContext as Oe, ViewportProvider as
|
|
46
|
-
import { useToolbarComponentContext as Te, ToolbarComponentProvider as
|
|
47
|
-
import { RPSplitter as
|
|
48
|
-
import { WrapperLayout as
|
|
49
|
-
import { c as we, L as
|
|
50
|
-
import { useThemeContext as
|
|
51
|
-
import { RPDropFileZone as
|
|
44
|
+
import { Container as So } from "./components/layout/Container.js";
|
|
45
|
+
import { useViewportContext as Oe, ViewportProvider as Io } from "./contexts/ViewportContext.js";
|
|
46
|
+
import { useToolbarComponentContext as Te, ToolbarComponentProvider as xo } from "./contexts/ToolbarComponentContext.js";
|
|
47
|
+
import { RPSplitter as Ro } from "./components/layout/sidebar/RPSplitter.js";
|
|
48
|
+
import { WrapperLayout as Lo } from "./components/layout/WrapperLayout.js";
|
|
49
|
+
import { c as we, L as Eo } from "./LayoutWrapper-e99afee2.js";
|
|
50
|
+
import { useThemeContext as No } from "./contexts/ThemeContext.js";
|
|
51
|
+
import { RPDropFileZone as Oo } from "./components/RPDropFileZone.js";
|
|
52
52
|
import { c as te, S as Ot } from "./SearchCloseButton-cbf182aa.js";
|
|
53
53
|
import { UICheckbox as Dt } from "./components/ui/Checkbox.js";
|
|
54
|
-
import { useIconContext as Ce, IconProvider as
|
|
54
|
+
import { useIconContext as Ce, IconProvider as Do } from "./contexts/IconContext.js";
|
|
55
55
|
import Q from "./components/ui/RPTooltip.js";
|
|
56
56
|
import { UIDropDown as cn } from "./components/ui/DropDown.js";
|
|
57
57
|
import "./ZoomTool.module-6c5eabbb.js";
|
|
58
58
|
import { MenuItem as Xe } from "./components/layout/toolbar/MenuItem.js";
|
|
59
59
|
import { MenuSeparator as ln } from "./components/layout/toolbar/MenuSeparator.js";
|
|
60
60
|
import { dateFormatter as At } from "./utils/dateFormatter.js";
|
|
61
|
-
import { PropertyItem as
|
|
62
|
-
import { RotateTool as
|
|
61
|
+
import { PropertyItem as Ao } from "./components/layout/toolbar/PropertyItem.js";
|
|
62
|
+
import { RotateTool as zo } from "./components/layout/toolbar/RotateTool.js";
|
|
63
63
|
import { withRef as et } from "./utils/withRef.js";
|
|
64
|
-
import { useInfiniteScroll as
|
|
65
|
-
import { THUMBNAIL_MIN_WIDTH as
|
|
66
|
-
import * as
|
|
67
|
-
import { PixelsPerInch as
|
|
68
|
-
import { SimpleLinkService as
|
|
69
|
-
import { annotationsEvents as
|
|
70
|
-
import { normalizeSingleKeyword as
|
|
71
|
-
import { CustomElement as
|
|
72
|
-
import { useMousePressed as
|
|
73
|
-
import { useGrabScroll as
|
|
74
|
-
import { usePinch as
|
|
64
|
+
import { useInfiniteScroll as Fo } from "./utils/hooks/useInfiniteScroll.js";
|
|
65
|
+
import { THUMBNAIL_MIN_WIDTH as Mo } from "./utils/constants.js";
|
|
66
|
+
import * as ko from "pdfjs-dist";
|
|
67
|
+
import { PixelsPerInch as Wo, AnnotationMode as Ho, RenderingCancelledException as $o, AnnotationLayer as qo } from "pdfjs-dist";
|
|
68
|
+
import { SimpleLinkService as Go } from "./utils/link_service.js";
|
|
69
|
+
import { annotationsEvents as Uo, annotationEventsHandler as Vo, handleClick as zt, handleAnnotationWidget as jo, handleAnnotationLink as Bo, bindLayerEvents as Ko, unbindLayerEvents as Ft } from "./utils/annotations.js";
|
|
70
|
+
import { normalizeSingleKeyword as Zo, sortHighlightPosition as Xo, unwrap as Qo } from "./components/page/searchHighlight.js";
|
|
71
|
+
import { CustomElement as Yo } from "./components/page/CustomElement.js";
|
|
72
|
+
import { useMousePressed as Jo } from "./utils/hooks/useMousePressed.js";
|
|
73
|
+
import { useGrabScroll as er } from "./utils/hooks/useGrabScroll.js";
|
|
74
|
+
import { usePinch as tr } from "./utils/hooks/usePinch.js";
|
|
75
75
|
import { useDebounce as bt } from "./utils/hooks/useDebounce.js";
|
|
76
|
-
import
|
|
77
|
-
import { getPositionFromPage as
|
|
76
|
+
import nr from "./components/ui/PasswordModal.js";
|
|
77
|
+
import { getPositionFromPage as or, getPageFromPosition as rr } from "./utils/calculatePage.js";
|
|
78
78
|
import { getScrollDistance as ze } from "./utils/getScrollDistance.js";
|
|
79
|
-
import { getWordPositionInPage as
|
|
80
|
-
import { getThumbnailViewport as
|
|
79
|
+
import { getWordPositionInPage as ir } from "./utils/getWordPositionInPage.js";
|
|
80
|
+
import { getThumbnailViewport as ar } from "./utils/getThumbnailViewport.js";
|
|
81
81
|
import { smoothScrollTo as it } from "./utils/smoothScrollTo.js";
|
|
82
|
-
import { appConsole as
|
|
82
|
+
import { appConsole as sr } from "./utils/appConsole.js";
|
|
83
83
|
import { FileUploadTool as dn } from "./components/layout/toolbar/FileUploadTool.js";
|
|
84
|
-
import { DarkModeTool as
|
|
85
|
-
import { ThreeDotIcon as
|
|
86
|
-
import { c as
|
|
87
|
-
import { D as
|
|
88
|
-
import { a as
|
|
89
|
-
import { CloseIcon as
|
|
90
|
-
import { DocumentProperties as
|
|
91
|
-
import { ViewModeTool as
|
|
92
|
-
import { ScrollModeTool as
|
|
93
|
-
import { FileDownloadDefaultIcon as
|
|
94
|
-
import { PrintDefaultTool as
|
|
84
|
+
import { DarkModeTool as cr } from "./components/layout/toolbar/DarkModeTool.js";
|
|
85
|
+
import { ThreeDotIcon as lr } from "./components/icons/ThreeDotIcon.js";
|
|
86
|
+
import { c as dr, u as Tt, P as Ge, b as We, d as Ct, i as ur, k as pr, a as hr } from "./index-5908484b.js";
|
|
87
|
+
import { D as fr, u as at } from "./index-18b0454c.js";
|
|
88
|
+
import { a as mr, h as gr, u as vr, F as wr, b as _r, G as un } from "./index-f4a9ae4d.js";
|
|
89
|
+
import { CloseIcon as br } from "./components/icons/CloseIcon.js";
|
|
90
|
+
import { DocumentProperties as Tr } from "./components/layout/toolbar/DocumentProperties.js";
|
|
91
|
+
import { ViewModeTool as Cr } from "./components/layout/toolbar/ViewModeTool.js";
|
|
92
|
+
import { ScrollModeTool as Pr } from "./components/layout/toolbar/ScrollModeTool.js";
|
|
93
|
+
import { FileDownloadDefaultIcon as yr } from "./components/icons/FileDownloadDefaultIcon.js";
|
|
94
|
+
import { PrintDefaultTool as Sr } from "./components/icons/PrintDefaultIcon.js";
|
|
95
95
|
import { FullScreenTool as pn } from "./components/layout/toolbar/FullScreenTool.js";
|
|
96
96
|
import { GoToDownIcon as hn } from "./components/icons/GoToDownIcon.js";
|
|
97
|
-
import { SelectionModeTool as
|
|
98
|
-
import { ZoomTool as
|
|
97
|
+
import { SelectionModeTool as Ir } from "./components/layout/toolbar/SelectionModeTool.js";
|
|
98
|
+
import { ZoomTool as xr } from "./components/layout/toolbar/ZoomTool.js";
|
|
99
99
|
import { SearchIcon as fn } from "./components/icons/SearchIcon.js";
|
|
100
|
-
import { ClearIcon as
|
|
100
|
+
import { ClearIcon as Rr } from "./components/icons/ClearIcon.js";
|
|
101
101
|
import { InfoIcon as Mt } from "./components/icons/InfoIcon.js";
|
|
102
102
|
import './assets/ToolbarLayout.css';const mn = () => {
|
|
103
103
|
const { viewMode: t } = Fe(), { scrollMode: e } = Ee(), { virtualScrollRef: n, virtualScrollableElementRef: r, pageScrollElementRef: o } = Ye(), { setFocusedPage: i } = le(), c = k(), { columnCount: l } = rn(), { widths: d, heights: f } = qe(), m = k(e), P = k(t), p = k(l), { targetScrollPage: v } = an();
|
|
@@ -192,7 +192,7 @@ import './assets/ToolbarLayout.css';const mn = () => {
|
|
|
192
192
|
d
|
|
193
193
|
]
|
|
194
194
|
) };
|
|
195
|
-
},
|
|
195
|
+
}, Lr = (t = 1) => {
|
|
196
196
|
const [e, n] = q(t), [r, o] = q(0), { scrollToPage: i } = mn(), c = k(1), { viewMode: l } = Fe(), { scrollMode: d } = Ee(), { widths: f } = qe(), { pagesRef: m } = _e(), P = bt(e, 100), p = E(
|
|
197
197
|
(h) => {
|
|
198
198
|
if (!/^[0-9]*$/g.test(h.toString()) || !h)
|
|
@@ -245,9 +245,9 @@ import './assets/ToolbarLayout.css';const mn = () => {
|
|
|
245
245
|
}
|
|
246
246
|
}), le = () => {
|
|
247
247
|
const t = $e(gn);
|
|
248
|
-
return typeof (t == null ? void 0 : t.focusedPage) > "u" &&
|
|
249
|
-
},
|
|
250
|
-
const { pdf: e } = oe(), { setCurrentPage: n } =
|
|
248
|
+
return typeof (t == null ? void 0 : t.focusedPage) > "u" && sr.error("Please use this hooks inside children component of RPProvider"), t;
|
|
249
|
+
}, js = ({ children: t }) => {
|
|
250
|
+
const { pdf: e } = oe(), { setCurrentPage: n } = To(), { focusedPage: r, totalPages: o, setFocusedPage: i, setTotalPages: c, goToPage: l, nextPage: d, prevPage: f } = Lr();
|
|
251
251
|
return D(() => {
|
|
252
252
|
e != null && e.numPages && (c(e.numPages), i(1));
|
|
253
253
|
}, [e, c, i]), D(() => {
|
|
@@ -268,7 +268,7 @@ import './assets/ToolbarLayout.css';const mn = () => {
|
|
|
268
268
|
}
|
|
269
269
|
);
|
|
270
270
|
};
|
|
271
|
-
const
|
|
271
|
+
const Er = () => {
|
|
272
272
|
const { pdf: t, pages: e } = oe(), [n, r] = q({
|
|
273
273
|
loadedPages: 0,
|
|
274
274
|
totalPages: 0,
|
|
@@ -302,7 +302,7 @@ const Lr = () => {
|
|
|
302
302
|
p();
|
|
303
303
|
return;
|
|
304
304
|
}
|
|
305
|
-
const I = w /
|
|
305
|
+
const I = w / Wo.PDF;
|
|
306
306
|
h.width = Math.floor(_.width * I), h.height = Math.floor(_.height * I);
|
|
307
307
|
const x = h.getContext("2d");
|
|
308
308
|
x.save(), x.fillStyle = "rgb(255, 255, 255)", x.fillRect(0, 0, h.width, h.height), x.restore();
|
|
@@ -319,14 +319,14 @@ const Lr = () => {
|
|
|
319
319
|
transform: [I, 0, 0, I, 0, 0],
|
|
320
320
|
viewport: N.getViewport({ scale: 1, rotation: _.rotation }),
|
|
321
321
|
intent: "print",
|
|
322
|
-
annotationMode:
|
|
322
|
+
annotationMode: Ho.ENABLE_STORAGE,
|
|
323
323
|
optionalContentConfigPromise: S,
|
|
324
324
|
printAnnotationStorage: A
|
|
325
325
|
};
|
|
326
326
|
try {
|
|
327
327
|
return N.render(z).promise;
|
|
328
328
|
} catch (L) {
|
|
329
|
-
throw L instanceof
|
|
329
|
+
throw L instanceof $o || console.error(L), L;
|
|
330
330
|
}
|
|
331
331
|
}, C = E(() => {
|
|
332
332
|
const h = window.print;
|
|
@@ -445,8 +445,8 @@ const Lr = () => {
|
|
|
445
445
|
console.error("Error in setOnError callback:", e);
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
|
-
}),
|
|
449
|
-
const [e, n] = q(null), [r, o] = q(null), { print: i, cancel: c, progress: l, isComplete: d, isError: f, error: m } =
|
|
448
|
+
}), Bs = ({ children: t }) => {
|
|
449
|
+
const [e, n] = q(null), [r, o] = q(null), { print: i, cancel: c, progress: l, isComplete: d, isError: f, error: m } = Er(), P = E((T) => {
|
|
450
450
|
T && typeof T == "function" && o(() => T);
|
|
451
451
|
}, []), p = (T) => {
|
|
452
452
|
m && T(m);
|
|
@@ -481,13 +481,13 @@ const Lr = () => {
|
|
|
481
481
|
if (!t)
|
|
482
482
|
throw new Error("usePrintContext must be used within a PrintProvider");
|
|
483
483
|
return t;
|
|
484
|
-
},
|
|
484
|
+
}, Nr = () => {
|
|
485
485
|
const [t, e] = q({}), { pages: n } = oe(), r = W(() => Object.keys(t).length, [t]), o = E(
|
|
486
486
|
(c) => {
|
|
487
487
|
if (!n.size)
|
|
488
488
|
return;
|
|
489
489
|
const l = c > n.size ? n.size : c, f = Array.from(n.values()).slice(0, l).map((m) => {
|
|
490
|
-
const { thumbnailViewport: P, scale: p } =
|
|
490
|
+
const { thumbnailViewport: P, scale: p } = ar(m.page, m.defaultRotation);
|
|
491
491
|
return {
|
|
492
492
|
scale: p,
|
|
493
493
|
page: m.page,
|
|
@@ -532,11 +532,11 @@ const Lr = () => {
|
|
|
532
532
|
setActive: (t) => {
|
|
533
533
|
},
|
|
534
534
|
active: !1
|
|
535
|
-
}), _n = () => $e(wn),
|
|
535
|
+
}), _n = () => $e(wn), Ks = ({
|
|
536
536
|
children: t,
|
|
537
537
|
initialThumbnailsVisible: e
|
|
538
538
|
}) => {
|
|
539
|
-
const { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: i } =
|
|
539
|
+
const { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: i } = Nr(), [c, l] = q(e);
|
|
540
540
|
return /* @__PURE__ */ a(
|
|
541
541
|
wn.Provider,
|
|
542
542
|
{
|
|
@@ -544,7 +544,7 @@ const Lr = () => {
|
|
|
544
544
|
children: t
|
|
545
545
|
}
|
|
546
546
|
);
|
|
547
|
-
},
|
|
547
|
+
}, Or = (t = {}, e = "") => {
|
|
548
548
|
const [n, r] = q(e), [o, i] = q(!1), { pdf: c, pages: l } = oe(), { widths: d, heights: f } = qe(), m = k(!n), { currentZoom: P } = wt(), [p, v] = q([]), { setFocusedPage: b } = le(), { columnCount: C } = Fe(), { pageRotate: T } = Je(), [y, g] = q(0), { pageScrollElementRef: h, virtualScrollableElementRef: u } = Ye(), { scrollMode: s } = Ee(), { pagesRef: _ } = _e(), [w, S] = q(null), R = k({}), I = W(() => y === 0 ? null : p[y - 1], [y, p]), x = W(() => p.length, [p]);
|
|
549
549
|
D(() => {
|
|
550
550
|
if (!I || !l)
|
|
@@ -555,25 +555,25 @@ const Lr = () => {
|
|
|
555
555
|
const O = l.get(I.page);
|
|
556
556
|
if (s === ne.PAGE_SCROLLING && b(I.page), !O)
|
|
557
557
|
return;
|
|
558
|
-
let F = 0,
|
|
558
|
+
let F = 0, $ = 0;
|
|
559
559
|
if (s === ne.VERTICAL_SCROLLING) {
|
|
560
560
|
const J = I.page - 1, ee = C, ie = J % ee, ae = Math.floor(J / ee);
|
|
561
|
-
F = ze(f, ae),
|
|
561
|
+
F = ze(f, ae), $ = ze(d, ie);
|
|
562
562
|
}
|
|
563
|
-
s === ne.HORIZONTAL_SCROLLING && (
|
|
563
|
+
s === ne.HORIZONTAL_SCROLLING && ($ = d.slice(0, I.page - 1).reduce((J, ee) => J + ee, 0));
|
|
564
564
|
const M = {
|
|
565
565
|
height: f[I.page - 1],
|
|
566
566
|
width: d[I.page - 1]
|
|
567
567
|
}, j = {
|
|
568
568
|
top: M.height / 2,
|
|
569
569
|
left: M.width / 2
|
|
570
|
-
}, K = T[I.page], { leftInPage: U, topInPage: re } =
|
|
570
|
+
}, K = T[I.page], { leftInPage: U, topInPage: re } = ir(
|
|
571
571
|
M,
|
|
572
572
|
j,
|
|
573
573
|
I.rect,
|
|
574
574
|
P,
|
|
575
575
|
K
|
|
576
|
-
), G =
|
|
576
|
+
), G = $ + U, Z = F + re, Y = {
|
|
577
577
|
left: Math.max(G, 0),
|
|
578
578
|
top: Math.max(Z, 0)
|
|
579
579
|
};
|
|
@@ -600,11 +600,11 @@ const Lr = () => {
|
|
|
600
600
|
if (!L)
|
|
601
601
|
return {};
|
|
602
602
|
const O = L.numPages, F = {};
|
|
603
|
-
for (let
|
|
603
|
+
for (let $ = 1; $ <= O; $++) {
|
|
604
604
|
if (m.current)
|
|
605
605
|
throw "close pop over";
|
|
606
|
-
const M = await L.getPage(
|
|
607
|
-
F[
|
|
606
|
+
const M = await L.getPage($);
|
|
607
|
+
F[$.toString()] = await M.getTextContent();
|
|
608
608
|
}
|
|
609
609
|
return F;
|
|
610
610
|
}, []);
|
|
@@ -615,14 +615,14 @@ const Lr = () => {
|
|
|
615
615
|
}
|
|
616
616
|
m.current = !1, i(!0), v([]), g(0), z(c).then((L) => {
|
|
617
617
|
R.current = L;
|
|
618
|
-
const F = Object.keys(L).reduce((
|
|
619
|
-
const j =
|
|
618
|
+
const F = Object.keys(L).reduce(($, M) => {
|
|
619
|
+
const j = ho(
|
|
620
620
|
[n],
|
|
621
621
|
L[M],
|
|
622
622
|
Number(M) - 1,
|
|
623
623
|
t
|
|
624
624
|
).map((K, U) => ({ ...K, page: Number(M), pageMatchIdx: U }));
|
|
625
|
-
return [
|
|
625
|
+
return [...$, ...j];
|
|
626
626
|
}, []);
|
|
627
627
|
v(F), g(F.length ? 1 : 0);
|
|
628
628
|
}).catch(() => {
|
|
@@ -659,7 +659,7 @@ const Lr = () => {
|
|
|
659
659
|
currentMatchElement: null,
|
|
660
660
|
setCurrentMatchElement: (t) => {
|
|
661
661
|
}
|
|
662
|
-
}),
|
|
662
|
+
}), Zs = ({
|
|
663
663
|
children: t,
|
|
664
664
|
initialSearch: e
|
|
665
665
|
}) => {
|
|
@@ -675,7 +675,7 @@ const Lr = () => {
|
|
|
675
675
|
prevMatch: p,
|
|
676
676
|
currentMatchElement: v,
|
|
677
677
|
setCurrentMatchElement: b
|
|
678
|
-
} =
|
|
678
|
+
} = Or(n, e);
|
|
679
679
|
return /* @__PURE__ */ a(
|
|
680
680
|
bn.Provider,
|
|
681
681
|
{
|
|
@@ -697,10 +697,10 @@ const Lr = () => {
|
|
|
697
697
|
children: t
|
|
698
698
|
}
|
|
699
699
|
);
|
|
700
|
-
}, Pt = () => $e(bn), Tn = He(null),
|
|
700
|
+
}, Pt = () => $e(bn), Tn = He(null), Xs = ({ children: t }) => {
|
|
701
701
|
const e = k(!1), [n, r] = q([]), o = E((d) => {
|
|
702
702
|
r((f) => [...f, { id: d.page.pageNumber.toString(), data: d, priority: 0 }]);
|
|
703
|
-
}, []), i = W(() => new
|
|
703
|
+
}, []), i = W(() => new _o(o), [o]), { focusedPage: c } = le(), l = E((d) => (e.current = !0, bo(
|
|
704
704
|
d.data.page,
|
|
705
705
|
d.data.canvasElem,
|
|
706
706
|
d.data.options
|
|
@@ -727,7 +727,7 @@ const Lr = () => {
|
|
|
727
727
|
if (!t)
|
|
728
728
|
throw new Error("RenderQueue not found");
|
|
729
729
|
return t;
|
|
730
|
-
},
|
|
730
|
+
}, de = {
|
|
731
731
|
"rp-pages": "_rp-pages_1i1lj_1",
|
|
732
732
|
"rp-page-scrolling-wrapper": "_rp-page-scrolling-wrapper_1i1lj_6",
|
|
733
733
|
"rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_1i1lj_11",
|
|
@@ -741,7 +741,7 @@ const Lr = () => {
|
|
|
741
741
|
"rp-page-wrapper": "_rp-page-wrapper_14ohm_1",
|
|
742
742
|
"rp-page": "_rp-page_14ohm_1",
|
|
743
743
|
"rp-loader-wrapper": "_rp-loader-wrapper_14ohm_15"
|
|
744
|
-
},
|
|
744
|
+
}, Dr = (t) => {
|
|
745
745
|
const { pageNumber: e, onLoaded: n, onLoading: r } = t, o = k(null), { pages: i } = oe(), { pageRotate: c } = Je(), l = k(), { currentZoom: d } = wt(), f = Cn(), m = k(`page-${e}`);
|
|
746
746
|
return D(() => {
|
|
747
747
|
if (!i || d === 0)
|
|
@@ -770,20 +770,21 @@ const Lr = () => {
|
|
|
770
770
|
f.removeQueue(m.current);
|
|
771
771
|
};
|
|
772
772
|
}, [i, e, c, d, r, n, f]), /* @__PURE__ */ a("canvas", { "data-rp": `page-${e}-canvas`, ref: o });
|
|
773
|
-
},
|
|
774
|
-
"rp-text-layer": "_rp-text-
|
|
775
|
-
selecting:
|
|
776
|
-
|
|
777
|
-
|
|
773
|
+
}, Ar = "_selecting_1uik2_10", zr = "_markedContent_1uik2_33", me = {
|
|
774
|
+
"rp-text-layer": "_rp-text-layer_1uik2_1",
|
|
775
|
+
selecting: Ar,
|
|
776
|
+
markedContent: zr,
|
|
777
|
+
"rp-text-layer-text": "_rp-text-layer-text_1uik2_52"
|
|
778
|
+
}, Fr = (t) => {
|
|
778
779
|
const { pageNumber: e } = t, { pages: n } = oe(), r = k(null), { matches: o, currentMatch: i, setCurrentMatchElement: c } = Pt(), [l, d] = q(
|
|
779
780
|
[]
|
|
780
781
|
), f = k(), m = k(), P = k([]), p = W(() => o.filter((h) => h.pageIndex === e - 1), [o, e]), v = E(
|
|
781
782
|
(h, u, s = !1) => {
|
|
782
|
-
if (s &&
|
|
783
|
+
if (s && fo(h, u), !p.length) {
|
|
783
784
|
P.current = [], d([]);
|
|
784
785
|
return;
|
|
785
786
|
}
|
|
786
|
-
const _ =
|
|
787
|
+
const _ = mo(p, h, u);
|
|
787
788
|
d(_);
|
|
788
789
|
},
|
|
789
790
|
[p]
|
|
@@ -838,8 +839,8 @@ const Lr = () => {
|
|
|
838
839
|
const S = /* @__PURE__ */ new Set();
|
|
839
840
|
for (let O = 0; O < w.rangeCount; O++) {
|
|
840
841
|
const F = w.getRangeAt(O);
|
|
841
|
-
T().forEach((
|
|
842
|
-
F.intersectsNode(
|
|
842
|
+
T().forEach(($) => {
|
|
843
|
+
F.intersectsNode($) && !S.has($) && S.add($);
|
|
843
844
|
});
|
|
844
845
|
}
|
|
845
846
|
T().forEach((O) => {
|
|
@@ -890,7 +891,7 @@ const Lr = () => {
|
|
|
890
891
|
const u = r.current;
|
|
891
892
|
return f.current && f.current.cancel(), h.page.getTextContent().then((s) => {
|
|
892
893
|
const _ = h.page.getViewport({ scale: 1 });
|
|
893
|
-
return f.current = new
|
|
894
|
+
return f.current = new ko.TextLayer({
|
|
894
895
|
viewport: _,
|
|
895
896
|
textContentSource: s,
|
|
896
897
|
container: u
|
|
@@ -919,6 +920,7 @@ const Lr = () => {
|
|
|
919
920
|
}, [v]), /* @__PURE__ */ a(
|
|
920
921
|
"div",
|
|
921
922
|
{
|
|
923
|
+
"data-rp-text-layer": !0,
|
|
922
924
|
"data-rp": `page-${e}-textLayer`,
|
|
923
925
|
className: me["rp-text-layer"],
|
|
924
926
|
ref: r,
|
|
@@ -926,11 +928,11 @@ const Lr = () => {
|
|
|
926
928
|
onMouseUp: g
|
|
927
929
|
}
|
|
928
930
|
);
|
|
929
|
-
},
|
|
931
|
+
}, Mr = {
|
|
930
932
|
"rp-annotation-layer": "_rp-annotation-layer_1udza_1"
|
|
931
933
|
};
|
|
932
|
-
let
|
|
933
|
-
const
|
|
934
|
+
let kr = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
|
|
935
|
+
const Wr = (t) => {
|
|
934
936
|
const { pageNumber: e } = t, n = k(null), { pages: r, pdf: o } = oe(), i = k(), [c, l] = q(), { setFocusedPage: d, goToPage: f } = le(), { scrollMode: m } = Ee(), { print: P } = tt(), { download: p } = $n(), v = W(() => r.get(e), [r, e]), b = W(() => v == null ? void 0 : v.page.getViewport(), [v]);
|
|
935
937
|
D(() => {
|
|
936
938
|
i.current && (i.current.div.replaceChildren(), i.current = void 0);
|
|
@@ -941,7 +943,7 @@ const Mr = (t) => {
|
|
|
941
943
|
}, [v]);
|
|
942
944
|
const C = E(
|
|
943
945
|
(T) => {
|
|
944
|
-
!c || !o || (
|
|
946
|
+
!c || !o || (Uo(T), Vo(T, o, c).then((y) => {
|
|
945
947
|
var g, h;
|
|
946
948
|
((g = y == null ? void 0 : y.data) == null ? void 0 : g.action) === "Print" ? P() : ((h = y == null ? void 0 : y.data) == null ? void 0 : h.action) === "SaveAs" && p();
|
|
947
949
|
}), m === ne.PAGE_SCROLLING ? zt(T, c, o, (y) => d(y.pageIndex + 1)) : zt(T, c, o, (y) => f(y.pageIndex + 1)));
|
|
@@ -963,17 +965,17 @@ const Mr = (t) => {
|
|
|
963
965
|
const { annotationType: s } = u;
|
|
964
966
|
switch (s) {
|
|
965
967
|
case Nt.Link:
|
|
966
|
-
|
|
968
|
+
Bo(u);
|
|
967
969
|
break;
|
|
968
970
|
case Nt.Widget:
|
|
969
|
-
|
|
971
|
+
jo(u, T, y);
|
|
970
972
|
break;
|
|
971
973
|
}
|
|
972
974
|
}
|
|
973
975
|
const g = new AbortController();
|
|
974
976
|
return (async () => {
|
|
975
977
|
var _;
|
|
976
|
-
i.current && (i.current.div.replaceChildren(), i.current = void 0), n.current && (n.current.innerText = ""), i.current = new
|
|
978
|
+
i.current && (i.current.div.replaceChildren(), i.current = void 0), n.current && (n.current.innerText = ""), i.current = new qo({
|
|
977
979
|
div: n.current,
|
|
978
980
|
accessibilityManager: void 0,
|
|
979
981
|
annotationCanvasMap: void 0,
|
|
@@ -993,14 +995,14 @@ const Mr = (t) => {
|
|
|
993
995
|
div: n.current,
|
|
994
996
|
viewport: T.clone({ dontFlip: !0 }),
|
|
995
997
|
page: v.page,
|
|
996
|
-
imageResourcesPath:
|
|
998
|
+
imageResourcesPath: kr,
|
|
997
999
|
renderForms: !0,
|
|
998
|
-
linkService: new
|
|
1000
|
+
linkService: new Go(),
|
|
999
1001
|
downloadManager: null,
|
|
1000
1002
|
enableScripting: !1
|
|
1001
1003
|
});
|
|
1002
1004
|
})().then(() => {
|
|
1003
|
-
n.current &&
|
|
1005
|
+
n.current && Ko(n.current, C);
|
|
1004
1006
|
}).catch((u) => {
|
|
1005
1007
|
if (u !== "abort")
|
|
1006
1008
|
throw u;
|
|
@@ -1012,14 +1014,14 @@ const Mr = (t) => {
|
|
|
1012
1014
|
{
|
|
1013
1015
|
"data-rp": `page-${e}-annotationLayer`,
|
|
1014
1016
|
style: { width: `${b == null ? void 0 : b.width}px`, height: `${b == null ? void 0 : b.height}px` },
|
|
1015
|
-
className:
|
|
1017
|
+
className: Mr["rp-annotation-layer"],
|
|
1016
1018
|
ref: n
|
|
1017
1019
|
}
|
|
1018
1020
|
);
|
|
1019
|
-
},
|
|
1021
|
+
}, Hr = {
|
|
1020
1022
|
"rp-text-highlight": "_rp-text-highlight_jdkf8_1"
|
|
1021
|
-
},
|
|
1022
|
-
const [n, r] = q(), { pages: o } = oe(), { highlightKeywords: i } =
|
|
1023
|
+
}, $r = ({ pageNumber: t, viewport: e }) => {
|
|
1024
|
+
const [n, r] = q(), { pages: o } = oe(), { highlightKeywords: i } = vo(), c = !0, l = k(null), [d, f] = q(null), [m, P] = q([]);
|
|
1023
1025
|
D(() => {
|
|
1024
1026
|
l.current && f(l.current.parentElement);
|
|
1025
1027
|
}, [l]), D(() => {
|
|
@@ -1034,7 +1036,7 @@ const Mr = (t) => {
|
|
|
1034
1036
|
const p = W(() => i ? i.map((g) => {
|
|
1035
1037
|
var h, u;
|
|
1036
1038
|
return {
|
|
1037
|
-
...
|
|
1039
|
+
...Zo(g.keyword, (h = g.options) == null ? void 0 : h.matchCase, (u = g.options) == null ? void 0 : u.wholeWords),
|
|
1038
1040
|
color: g.highlightColor
|
|
1039
1041
|
};
|
|
1040
1042
|
}) : [], [i]);
|
|
@@ -1082,12 +1084,12 @@ const Mr = (t) => {
|
|
|
1082
1084
|
_.setStart(w, R), _.setEnd(w, I + 1);
|
|
1083
1085
|
const x = document.createElement("span");
|
|
1084
1086
|
x.style.width = "auto", _.surroundContents(x);
|
|
1085
|
-
const N = x.getBoundingClientRect(), A = g.getBoundingClientRect(), z = A.height, L = A.width, O = 100 * (N.left - A.left) / L, F = 100 * (N.top - A.top) / z,
|
|
1086
|
-
return
|
|
1087
|
+
const N = x.getBoundingClientRect(), A = g.getBoundingClientRect(), z = A.height, L = A.width, O = 100 * (N.left - A.left) / L, F = 100 * (N.top - A.top) / z, $ = 100 * N.height / z, M = 100 * N.width / L;
|
|
1088
|
+
return Qo(x), {
|
|
1087
1089
|
keywordStr: h,
|
|
1088
1090
|
left: O,
|
|
1089
1091
|
top: F,
|
|
1090
|
-
height:
|
|
1092
|
+
height: $,
|
|
1091
1093
|
width: M,
|
|
1092
1094
|
pageHeight: z,
|
|
1093
1095
|
pageWidth: L
|
|
@@ -1131,17 +1133,17 @@ const Mr = (t) => {
|
|
|
1131
1133
|
let O;
|
|
1132
1134
|
const F = [];
|
|
1133
1135
|
for (; (O = L.exec(S)) !== null; )
|
|
1134
|
-
N && !
|
|
1136
|
+
N && !go(S, O.index, O[0].length) || F.push({
|
|
1135
1137
|
keyword: L,
|
|
1136
1138
|
startIndex: O.index,
|
|
1137
1139
|
endIndex: L.lastIndex
|
|
1138
1140
|
});
|
|
1139
|
-
const
|
|
1141
|
+
const $ = F.map((M) => ({
|
|
1140
1142
|
keyword: M.keyword,
|
|
1141
1143
|
indexes: s.slice(M.startIndex, M.endIndex),
|
|
1142
1144
|
color: A
|
|
1143
1145
|
}));
|
|
1144
|
-
for (const M of
|
|
1146
|
+
for (const M of $) {
|
|
1145
1147
|
const j = M.indexes.reduce(
|
|
1146
1148
|
(K, U) => (K[U.spanIdx] = (K[U.spanIdx] || []).concat([U]), K),
|
|
1147
1149
|
{}
|
|
@@ -1162,7 +1164,7 @@ const Mr = (t) => {
|
|
|
1162
1164
|
}
|
|
1163
1165
|
}
|
|
1164
1166
|
}
|
|
1165
|
-
}), w.sort(
|
|
1167
|
+
}), w.sort(Xo), w;
|
|
1166
1168
|
};
|
|
1167
1169
|
return D(() => {
|
|
1168
1170
|
(async () => {
|
|
@@ -1176,7 +1178,7 @@ const Mr = (t) => {
|
|
|
1176
1178
|
}, [c, i, t, n, e]), /* @__PURE__ */ a(pe, { children: /* @__PURE__ */ a("div", { ref: l, "data-rp": `page-${t}-textHighlightLayer`, children: m.map((g, h) => /* @__PURE__ */ a(
|
|
1177
1179
|
"div",
|
|
1178
1180
|
{
|
|
1179
|
-
className:
|
|
1181
|
+
className: Hr["rp-text-highlight"],
|
|
1180
1182
|
style: {
|
|
1181
1183
|
top: `${g.top}%`,
|
|
1182
1184
|
left: `${g.left}%`,
|
|
@@ -1188,7 +1190,7 @@ const Mr = (t) => {
|
|
|
1188
1190
|
h
|
|
1189
1191
|
)) }) });
|
|
1190
1192
|
}, yt = et((t, e) => {
|
|
1191
|
-
const { pageNumber: n, style: r, ...o } = t, { pages: i } = oe(), { pageRotate: c } = Je(), { textLayer: l } =
|
|
1193
|
+
const { pageNumber: n, style: r, ...o } = t, { pages: i } = oe(), { pageRotate: c } = Je(), { textLayer: l } = co(), { currentZoom: d } = wt(), f = k(i.get(n)), [m, P] = q(!1), p = k(null), [v, b] = q({
|
|
1192
1194
|
width: 0,
|
|
1193
1195
|
height: 0
|
|
1194
1196
|
});
|
|
@@ -1232,7 +1234,7 @@ const Mr = (t) => {
|
|
|
1232
1234
|
"--scale-factor": d
|
|
1233
1235
|
},
|
|
1234
1236
|
className: st["rp-page-wrapper"],
|
|
1235
|
-
children: /* @__PURE__ */
|
|
1237
|
+
children: /* @__PURE__ */ H(
|
|
1236
1238
|
"div",
|
|
1237
1239
|
{
|
|
1238
1240
|
style: {
|
|
@@ -1241,12 +1243,12 @@ const Mr = (t) => {
|
|
|
1241
1243
|
},
|
|
1242
1244
|
className: st["rp-page"],
|
|
1243
1245
|
children: [
|
|
1244
|
-
/* @__PURE__ */ a(
|
|
1246
|
+
/* @__PURE__ */ a(Dr, { onLoading: y, onLoaded: g, pageNumber: n }),
|
|
1245
1247
|
m && /* @__PURE__ */ a("div", { className: st["rp-loader-wrapper"], children: /* @__PURE__ */ a(_t, {}) }),
|
|
1246
|
-
/* @__PURE__ */ a(
|
|
1247
|
-
l && /* @__PURE__ */ a(
|
|
1248
|
-
/* @__PURE__ */ a(
|
|
1249
|
-
/* @__PURE__ */ a(
|
|
1248
|
+
/* @__PURE__ */ a(Yo, { pageNumber: n }),
|
|
1249
|
+
l && /* @__PURE__ */ a(Fr, { pageNumber: n }),
|
|
1250
|
+
/* @__PURE__ */ a($r, { pageNumber: n, viewport: v }),
|
|
1251
|
+
/* @__PURE__ */ a(Wr, { pageNumber: n })
|
|
1250
1252
|
]
|
|
1251
1253
|
}
|
|
1252
1254
|
)
|
|
@@ -1273,25 +1275,25 @@ function mt(t, e) {
|
|
|
1273
1275
|
return n.__proto__ = r, n;
|
|
1274
1276
|
}, mt(t, e);
|
|
1275
1277
|
}
|
|
1276
|
-
function
|
|
1278
|
+
function qr(t, e) {
|
|
1277
1279
|
t.prototype = Object.create(e.prototype), t.prototype.constructor = t, mt(t, e);
|
|
1278
1280
|
}
|
|
1279
1281
|
var Wt = Number.isNaN || function(e) {
|
|
1280
1282
|
return typeof e == "number" && e !== e;
|
|
1281
1283
|
};
|
|
1282
|
-
function
|
|
1284
|
+
function Gr(t, e) {
|
|
1283
1285
|
return !!(t === e || Wt(t) && Wt(e));
|
|
1284
1286
|
}
|
|
1285
|
-
function
|
|
1287
|
+
function Ur(t, e) {
|
|
1286
1288
|
if (t.length !== e.length)
|
|
1287
1289
|
return !1;
|
|
1288
1290
|
for (var n = 0; n < t.length; n++)
|
|
1289
|
-
if (
|
|
1291
|
+
if (!Gr(t[n], e[n]))
|
|
1290
1292
|
return !1;
|
|
1291
1293
|
return !0;
|
|
1292
1294
|
}
|
|
1293
1295
|
function ct(t, e) {
|
|
1294
|
-
e === void 0 && (e =
|
|
1296
|
+
e === void 0 && (e = Ur);
|
|
1295
1297
|
var n, r = [], o, i = !1;
|
|
1296
1298
|
function c() {
|
|
1297
1299
|
for (var l = [], d = 0; d < arguments.length; d++)
|
|
@@ -1312,7 +1314,7 @@ function Ht(t, e) {
|
|
|
1312
1314
|
}
|
|
1313
1315
|
return n;
|
|
1314
1316
|
}
|
|
1315
|
-
var
|
|
1317
|
+
var Vr = typeof performance == "object" && typeof performance.now == "function", $t = Vr ? function() {
|
|
1316
1318
|
return performance.now();
|
|
1317
1319
|
} : function() {
|
|
1318
1320
|
return Date.now();
|
|
@@ -1320,7 +1322,7 @@ var Gr = typeof performance == "object" && typeof performance.now == "function",
|
|
|
1320
1322
|
function qt(t) {
|
|
1321
1323
|
cancelAnimationFrame(t.id);
|
|
1322
1324
|
}
|
|
1323
|
-
function
|
|
1325
|
+
function jr(t, e) {
|
|
1324
1326
|
var n = $t();
|
|
1325
1327
|
function r() {
|
|
1326
1328
|
$t() - n >= e ? t.call(null) : o.id = requestAnimationFrame(r);
|
|
@@ -1331,7 +1333,7 @@ function Ur(t, e) {
|
|
|
1331
1333
|
return o;
|
|
1332
1334
|
}
|
|
1333
1335
|
var lt = -1;
|
|
1334
|
-
function
|
|
1336
|
+
function Br(t) {
|
|
1335
1337
|
if (t === void 0 && (t = !1), lt === -1 || t) {
|
|
1336
1338
|
var e = document.createElement("div"), n = e.style;
|
|
1337
1339
|
n.width = "50px", n.height = "50px", n.overflow = "scroll", document.body.appendChild(e), lt = e.offsetWidth - e.clientWidth, document.body.removeChild(e);
|
|
@@ -1348,17 +1350,17 @@ function Gt(t) {
|
|
|
1348
1350
|
}
|
|
1349
1351
|
return De;
|
|
1350
1352
|
}
|
|
1351
|
-
var
|
|
1353
|
+
var Kr = 150, Zr = function(e) {
|
|
1352
1354
|
var n = e.columnIndex;
|
|
1353
1355
|
e.data;
|
|
1354
1356
|
var r = e.rowIndex;
|
|
1355
1357
|
return r + ":" + n;
|
|
1356
1358
|
}, je = null, Be = null, Ke = null;
|
|
1357
1359
|
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (je = /* @__PURE__ */ new WeakSet(), Be = /* @__PURE__ */ new WeakSet(), Ke = /* @__PURE__ */ new WeakSet());
|
|
1358
|
-
function
|
|
1360
|
+
function Xr(t) {
|
|
1359
1361
|
var e, n = t.getColumnOffset, r = t.getColumnStartIndexForOffset, o = t.getColumnStopIndexForStartIndex, i = t.getColumnWidth, c = t.getEstimatedTotalHeight, l = t.getEstimatedTotalWidth, d = t.getOffsetForColumnAndAlignment, f = t.getOffsetForRowAndAlignment, m = t.getRowHeight, P = t.getRowOffset, p = t.getRowStartIndexForOffset, v = t.getRowStopIndexForStartIndex, b = t.initInstanceProps, C = t.shouldResetStyleCacheOnItemSizeChange, T = t.validateProps;
|
|
1360
1362
|
return e = /* @__PURE__ */ function(y) {
|
|
1361
|
-
|
|
1363
|
+
qr(g, y);
|
|
1362
1364
|
function g(u) {
|
|
1363
1365
|
var s;
|
|
1364
1366
|
return s = y.call(this, u) || this, s._instanceProps = b(s.props, kt(s)), s._resetIsScrollingTimeoutId = null, s._outerRef = void 0, s.state = {
|
|
@@ -1436,7 +1438,7 @@ function Kr(t) {
|
|
|
1436
1438
|
var w = s.props.outerRef;
|
|
1437
1439
|
s._outerRef = _, typeof w == "function" ? w(_) : w != null && typeof w == "object" && w.hasOwnProperty("current") && (w.current = _);
|
|
1438
1440
|
}, s._resetIsScrollingDebounced = function() {
|
|
1439
|
-
s._resetIsScrollingTimeoutId !== null && qt(s._resetIsScrollingTimeoutId), s._resetIsScrollingTimeoutId =
|
|
1441
|
+
s._resetIsScrollingTimeoutId !== null && qt(s._resetIsScrollingTimeoutId), s._resetIsScrollingTimeoutId = jr(s._resetIsScrolling, Kr);
|
|
1440
1442
|
}, s._resetIsScrolling = function() {
|
|
1441
1443
|
s._resetIsScrollingTimeoutId = null, s.setState({
|
|
1442
1444
|
isScrolling: !1
|
|
@@ -1446,7 +1448,7 @@ function Kr(t) {
|
|
|
1446
1448
|
}, s;
|
|
1447
1449
|
}
|
|
1448
1450
|
g.getDerivedStateFromProps = function(s, _) {
|
|
1449
|
-
return
|
|
1451
|
+
return Qr(s, _), T(s), null;
|
|
1450
1452
|
};
|
|
1451
1453
|
var h = g.prototype;
|
|
1452
1454
|
return h.scrollTo = function(s) {
|
|
@@ -1461,9 +1463,9 @@ function Kr(t) {
|
|
|
1461
1463
|
};
|
|
1462
1464
|
}, this._resetIsScrollingDebounced);
|
|
1463
1465
|
}, h.scrollToItem = function(s) {
|
|
1464
|
-
var _ = s.align, w = _ === void 0 ? "auto" : _, S = s.columnIndex, R = s.rowIndex, I = this.props, x = I.columnCount, N = I.height, A = I.rowCount, z = I.width, L = this.state, O = L.scrollLeft, F = L.scrollTop,
|
|
1466
|
+
var _ = s.align, w = _ === void 0 ? "auto" : _, S = s.columnIndex, R = s.rowIndex, I = this.props, x = I.columnCount, N = I.height, A = I.rowCount, z = I.width, L = this.state, O = L.scrollLeft, F = L.scrollTop, $ = Br();
|
|
1465
1467
|
S !== void 0 && (S = Math.max(0, Math.min(S, x - 1))), R !== void 0 && (R = Math.max(0, Math.min(R, A - 1)));
|
|
1466
|
-
var M = c(this.props, this._instanceProps), j = l(this.props, this._instanceProps), K = j > z ?
|
|
1468
|
+
var M = c(this.props, this._instanceProps), j = l(this.props, this._instanceProps), K = j > z ? $ : 0, U = M > N ? $ : 0;
|
|
1467
1469
|
this.scrollTo({
|
|
1468
1470
|
scrollLeft: S !== void 0 ? d(this.props, S, w, O, this._instanceProps, U) : O,
|
|
1469
1471
|
scrollTop: R !== void 0 ? f(this.props, R, w, F, this._instanceProps, K) : F
|
|
@@ -1500,7 +1502,7 @@ function Kr(t) {
|
|
|
1500
1502
|
}, h.componentWillUnmount = function() {
|
|
1501
1503
|
this._resetIsScrollingTimeoutId !== null && qt(this._resetIsScrollingTimeoutId);
|
|
1502
1504
|
}, h.render = function() {
|
|
1503
|
-
var s = this.props, _ = s.children, w = s.className, S = s.columnCount, R = s.direction, I = s.height, x = s.innerRef, N = s.innerElementType, A = s.innerTagName, z = s.itemData, L = s.itemKey, O = L === void 0 ?
|
|
1505
|
+
var s = this.props, _ = s.children, w = s.className, S = s.columnCount, R = s.direction, I = s.height, x = s.innerRef, N = s.innerElementType, A = s.innerTagName, z = s.itemData, L = s.itemKey, O = L === void 0 ? Zr : L, F = s.outerElementType, $ = s.outerTagName, M = s.rowCount, j = s.style, K = s.useIsScrolling, U = s.width, re = this.state.isScrolling, G = this._getHorizontalRangeToRender(), Z = G[0], Y = G[1], J = this._getVerticalRangeToRender(), ee = J[0], ie = J[1], ae = [];
|
|
1504
1506
|
if (S > 0 && M)
|
|
1505
1507
|
for (var Pe = ee; Pe <= ie; Pe++)
|
|
1506
1508
|
for (var fe = Z; fe <= Y; fe++)
|
|
@@ -1517,7 +1519,7 @@ function Kr(t) {
|
|
|
1517
1519
|
style: this._getItemStyle(Pe, fe)
|
|
1518
1520
|
}));
|
|
1519
1521
|
var nt = c(this.props, this._instanceProps), Ue = l(this.props, this._instanceProps);
|
|
1520
|
-
return Ve(F ||
|
|
1522
|
+
return Ve(F || $ || "div", {
|
|
1521
1523
|
className: w,
|
|
1522
1524
|
onScroll: this._onScroll,
|
|
1523
1525
|
ref: this._outerRefSetter,
|
|
@@ -1542,8 +1544,8 @@ function Kr(t) {
|
|
|
1542
1544
|
}, h._callPropsCallbacks = function() {
|
|
1543
1545
|
var s = this.props, _ = s.columnCount, w = s.onItemsRendered, S = s.onScroll, R = s.rowCount;
|
|
1544
1546
|
if (typeof w == "function" && _ > 0 && R > 0) {
|
|
1545
|
-
var I = this._getHorizontalRangeToRender(), x = I[0], N = I[1], A = I[2], z = I[3], L = this._getVerticalRangeToRender(), O = L[0], F = L[1],
|
|
1546
|
-
this._callOnItemsRendered(x, N, O, F, A, z,
|
|
1547
|
+
var I = this._getHorizontalRangeToRender(), x = I[0], N = I[1], A = I[2], z = I[3], L = this._getVerticalRangeToRender(), O = L[0], F = L[1], $ = L[2], M = L[3];
|
|
1548
|
+
this._callOnItemsRendered(x, N, O, F, A, z, $, M);
|
|
1547
1549
|
}
|
|
1548
1550
|
if (typeof S == "function") {
|
|
1549
1551
|
var j = this.state, K = j.horizontalScrollDirection, U = j.scrollLeft, re = j.scrollTop, G = j.scrollUpdateWasRequested, Z = j.verticalScrollDirection;
|
|
@@ -1553,14 +1555,14 @@ function Kr(t) {
|
|
|
1553
1555
|
var s = this.props, _ = s.columnCount, w = s.overscanColumnCount, S = s.overscanColumnsCount, R = s.overscanCount, I = s.rowCount, x = this.state, N = x.horizontalScrollDirection, A = x.isScrolling, z = x.scrollLeft, L = w || S || R || 1;
|
|
1554
1556
|
if (_ === 0 || I === 0)
|
|
1555
1557
|
return [0, 0, 0, 0];
|
|
1556
|
-
var O = r(this.props, z, this._instanceProps), F = o(this.props, O, z, this._instanceProps),
|
|
1557
|
-
return [Math.max(0, O -
|
|
1558
|
+
var O = r(this.props, z, this._instanceProps), F = o(this.props, O, z, this._instanceProps), $ = !A || N === "backward" ? Math.max(1, L) : 1, M = !A || N === "forward" ? Math.max(1, L) : 1;
|
|
1559
|
+
return [Math.max(0, O - $), Math.max(0, Math.min(_ - 1, F + M)), O, F];
|
|
1558
1560
|
}, h._getVerticalRangeToRender = function() {
|
|
1559
1561
|
var s = this.props, _ = s.columnCount, w = s.overscanCount, S = s.overscanRowCount, R = s.overscanRowsCount, I = s.rowCount, x = this.state, N = x.isScrolling, A = x.verticalScrollDirection, z = x.scrollTop, L = S || R || w || 1;
|
|
1560
1562
|
if (_ === 0 || I === 0)
|
|
1561
1563
|
return [0, 0, 0, 0];
|
|
1562
|
-
var O = p(this.props, z, this._instanceProps), F = v(this.props, O, z, this._instanceProps),
|
|
1563
|
-
return [Math.max(0, O -
|
|
1564
|
+
var O = p(this.props, z, this._instanceProps), F = v(this.props, O, z, this._instanceProps), $ = !N || A === "backward" ? Math.max(1, L) : 1, M = !N || A === "forward" ? Math.max(1, L) : 1;
|
|
1565
|
+
return [Math.max(0, O - $), Math.max(0, Math.min(I - 1, F + M)), O, F];
|
|
1564
1566
|
}, g;
|
|
1565
1567
|
}(to), e.defaultProps = {
|
|
1566
1568
|
direction: "ltr",
|
|
@@ -1568,7 +1570,7 @@ function Kr(t) {
|
|
|
1568
1570
|
useIsScrolling: !1
|
|
1569
1571
|
}, e;
|
|
1570
1572
|
}
|
|
1571
|
-
var
|
|
1573
|
+
var Qr = function(e, n) {
|
|
1572
1574
|
var r = e.children, o = e.direction, i = e.height, c = e.innerTagName, l = e.outerTagName, d = e.overscanColumnsCount, f = e.overscanCount, m = e.overscanRowsCount, P = e.width, p = n.instance;
|
|
1573
1575
|
if (process.env.NODE_ENV !== "production") {
|
|
1574
1576
|
if (typeof f == "number" && je && !je.has(p) && (je.add(p), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof d == "number" || typeof m == "number") && Be && !Be.has(p) && (Be.add(p), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (c != null || l != null) && Ke && !Ke.has(p) && (Ke.add(p), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), r == null)
|
|
@@ -1623,7 +1625,7 @@ var Zr = function(e, n) {
|
|
|
1623
1625
|
var i, c;
|
|
1624
1626
|
e === "column" ? (i = r.columnMetadataMap, c = r.lastMeasuredColumnIndex) : (i = r.rowMetadataMap, c = r.lastMeasuredRowIndex);
|
|
1625
1627
|
var l = c > 0 ? i[c].offset : 0;
|
|
1626
|
-
return l >= o ? Sn(e, n, r, c, 0, o) :
|
|
1628
|
+
return l >= o ? Sn(e, n, r, c, 0, o) : Yr(e, n, r, Math.max(0, c), o);
|
|
1627
1629
|
}, Sn = function(e, n, r, o, i, c) {
|
|
1628
1630
|
for (; i <= o; ) {
|
|
1629
1631
|
var l = i + Math.floor((o - i) / 2), d = ge(e, n, l, r).offset;
|
|
@@ -1632,7 +1634,7 @@ var Zr = function(e, n) {
|
|
|
1632
1634
|
d < c ? i = l + 1 : d > c && (o = l - 1);
|
|
1633
1635
|
}
|
|
1634
1636
|
return i > 0 ? i - 1 : 0;
|
|
1635
|
-
},
|
|
1637
|
+
}, Yr = function(e, n, r, o, i) {
|
|
1636
1638
|
for (var c = e === "column" ? n.columnCount : n.rowCount, l = 1; o < c && ge(e, n, o, r).offset < i; )
|
|
1637
1639
|
o += l, l *= 2;
|
|
1638
1640
|
return Sn(e, n, r, Math.min(o, c - 1), Math.floor(o / 2), i);
|
|
@@ -1649,7 +1651,7 @@ var Zr = function(e, n) {
|
|
|
1649
1651
|
default:
|
|
1650
1652
|
return i >= p && i <= P ? i : p > P || i < p ? p : P;
|
|
1651
1653
|
}
|
|
1652
|
-
},
|
|
1654
|
+
}, Jr = /* @__PURE__ */ Xr({
|
|
1653
1655
|
getColumnOffset: function(e, n, r) {
|
|
1654
1656
|
return ge("column", e, n, r).offset;
|
|
1655
1657
|
},
|
|
@@ -1731,12 +1733,12 @@ function Bt(t, e) {
|
|
|
1731
1733
|
return !0;
|
|
1732
1734
|
return !1;
|
|
1733
1735
|
}
|
|
1734
|
-
var
|
|
1735
|
-
function
|
|
1736
|
-
var n = t.style, r = Ht(t,
|
|
1736
|
+
var ei = ["style"], ti = ["style"];
|
|
1737
|
+
function ni(t, e) {
|
|
1738
|
+
var n = t.style, r = Ht(t, ei), o = e.style, i = Ht(e, ti);
|
|
1737
1739
|
return !Bt(n, o) && !Bt(r, i);
|
|
1738
1740
|
}
|
|
1739
|
-
const
|
|
1741
|
+
const oi = () => {
|
|
1740
1742
|
const { viewMode: t } = Fe(), { scrollMode: e } = Ee(), { setColumnCount: n } = rn(), { virtualScrollableElementRef: r } = Ye(), o = qe(), i = W(() => o.heights.length, [o.heights]), c = W(() => e === ne.HORIZONTAL_SCROLLING ? i : t === Re.DUAL_PAGE ? 2 : 1, [t, e, e, i, r]), l = W(() => o.widths.reduce((b, C, T) => {
|
|
1741
1743
|
const y = T % c;
|
|
1742
1744
|
return (!b[y] || C > b[y]) && (b[y] = C), b;
|
|
@@ -1786,7 +1788,7 @@ ut == null || Xt == null ? (gt = dt, vt = function(e) {
|
|
|
1786
1788
|
}, Kt);
|
|
1787
1789
|
return [n, r];
|
|
1788
1790
|
});
|
|
1789
|
-
function
|
|
1791
|
+
function ri(t) {
|
|
1790
1792
|
let e, n, r, o, i, c, l;
|
|
1791
1793
|
const d = typeof document < "u" && document.attachEvent;
|
|
1792
1794
|
if (!d) {
|
|
@@ -1858,7 +1860,7 @@ function ni(t) {
|
|
|
1858
1860
|
}
|
|
1859
1861
|
};
|
|
1860
1862
|
}
|
|
1861
|
-
class
|
|
1863
|
+
class ii extends no {
|
|
1862
1864
|
constructor(...e) {
|
|
1863
1865
|
super(...e), this.state = {
|
|
1864
1866
|
height: this.props.defaultHeight || 0,
|
|
@@ -1899,7 +1901,7 @@ class oi extends no {
|
|
|
1899
1901
|
const r = n.ownerDocument.defaultView.ResizeObserver;
|
|
1900
1902
|
r != null ? (this._resizeObserver = new r(() => {
|
|
1901
1903
|
this._timeoutId = setTimeout(this._onResize, 0);
|
|
1902
|
-
}), this._resizeObserver.observe(n)) : (this._detectElementResize =
|
|
1904
|
+
}), this._resizeObserver.observe(n)) : (this._detectElementResize = ri(e), this._detectElementResize.addResizeListener(n, this._onResize)), this._onResize();
|
|
1903
1905
|
}
|
|
1904
1906
|
}
|
|
1905
1907
|
componentWillUnmount() {
|
|
@@ -1937,7 +1939,7 @@ class oi extends no {
|
|
|
1937
1939
|
}, !g && e(y));
|
|
1938
1940
|
}
|
|
1939
1941
|
}
|
|
1940
|
-
const
|
|
1942
|
+
const ai = nn(({ widths: t, heights: e }) => {
|
|
1941
1943
|
const { focusedPage: n, totalPages: r } = le(), o = W(() => {
|
|
1942
1944
|
const l = [], d = Math.ceil(n / 2) * 2 - 1;
|
|
1943
1945
|
if (l.push(d), d + 1 <= r) {
|
|
@@ -1963,7 +1965,7 @@ const ri = nn(({ widths: t, heights: e }) => {
|
|
|
1963
1965
|
];
|
|
1964
1966
|
}, [t, e, o]), c = W(() => i.reduce((l, d) => l + Number(d.width || 0), 0), [i]);
|
|
1965
1967
|
return /* @__PURE__ */ a("div", { style: { width: c, position: "relative" }, children: o.map((l, d) => /* @__PURE__ */ a(yt, { style: i[d], pageNumber: l }, l)) });
|
|
1966
|
-
}),
|
|
1968
|
+
}), si = ({ widths: t, heights: e }) => {
|
|
1967
1969
|
const { focusedPage: n } = le(), r = W(() => ({
|
|
1968
1970
|
position: "absolute",
|
|
1969
1971
|
width: t(n - 1),
|
|
@@ -1979,9 +1981,9 @@ const ri = nn(({ widths: t, heights: e }) => {
|
|
|
1979
1981
|
children: /* @__PURE__ */ a(yt, { style: r, pageNumber: n }, n)
|
|
1980
1982
|
}
|
|
1981
1983
|
);
|
|
1982
|
-
},
|
|
1984
|
+
}, ci = (t, e, n) => {
|
|
1983
1985
|
const r = k(), { contentRef: o } = _e(), { heights: i, widths: c } = qe(), { setFocusedPage: l } = le(), [d, f] = q([]), { targetScrollPage: m } = an(), P = bt(d, 0, 500), p = W(() => i.map((b, C) => {
|
|
1984
|
-
const T = c[C], y =
|
|
1986
|
+
const T = c[C], y = or(C + 1, t), g = T * y.columnIndex, h = b * y.rowIndex, u = g + T, s = h + b;
|
|
1985
1987
|
return {
|
|
1986
1988
|
pageNumber: C + 1,
|
|
1987
1989
|
...y,
|
|
@@ -2029,7 +2031,7 @@ const ri = nn(({ widths: t, heights: e }) => {
|
|
|
2029
2031
|
};
|
|
2030
2032
|
}, [n, v]);
|
|
2031
2033
|
}, In = et((t, e) => {
|
|
2032
|
-
const { children: n, toolbarRef: r, style: o, className: i, ...c } = t, { customVariables: l, customDarkVariables: d } =
|
|
2034
|
+
const { children: n, toolbarRef: r, style: o, className: i, ...c } = t, { customVariables: l, customDarkVariables: d } = No(), { darkMode: f } = so();
|
|
2033
2035
|
return /* @__PURE__ */ a(
|
|
2034
2036
|
"div",
|
|
2035
2037
|
{
|
|
@@ -2050,11 +2052,11 @@ const ri = nn(({ widths: t, heights: e }) => {
|
|
|
2050
2052
|
children: n
|
|
2051
2053
|
}
|
|
2052
2054
|
);
|
|
2053
|
-
}),
|
|
2054
|
-
const o =
|
|
2055
|
+
}), li = nn(({ columnIndex: t, rowIndex: e, data: n, style: r }) => {
|
|
2056
|
+
const o = rr(e, t, n.columnCount);
|
|
2055
2057
|
return /* @__PURE__ */ a(yt, { style: r, pageNumber: o }, o);
|
|
2056
|
-
},
|
|
2057
|
-
const { initialPage: t = 1, initialScrollMode: e, instanceId: n } =
|
|
2058
|
+
}, ni), Qs = () => {
|
|
2059
|
+
const { initialPage: t = 1, initialScrollMode: e, instanceId: n } = uo(), { pagesRef: r, setPagesRef: o, setContentRef: i } = _e(), { scrollToPage: c } = mn(), {
|
|
2058
2060
|
virtualScrollRef: l,
|
|
2059
2061
|
getVirtualScrollRef: d,
|
|
2060
2062
|
getPageScrollElementRef: f,
|
|
@@ -2063,27 +2065,27 @@ const ri = nn(({ widths: t, heights: e }) => {
|
|
|
2063
2065
|
virtualScrollableElementRef: p,
|
|
2064
2066
|
totalInnerDimensions: v,
|
|
2065
2067
|
pageScrollElementRef: b
|
|
2066
|
-
} = Ye(), C = k(!0), { nextPage: T, prevPage: y, setFocusedPage: g, focusedPage: h } = le(), { scrollMode: u } = Ee(), { viewMode: s } = Fe(), _ = k(null), { loading: w, error: S } = oe(), { passwordRequired: R } =
|
|
2068
|
+
} = Ye(), C = k(!0), { nextPage: T, prevPage: y, setFocusedPage: g, focusedPage: h } = le(), { scrollMode: u } = Ee(), { viewMode: s } = Fe(), _ = k(null), { loading: w, error: S } = oe(), { passwordRequired: R } = ao(), { LoaderImageComponent: I } = sn(), x = k(
|
|
2067
2069
|
v
|
|
2068
2070
|
), N = k({
|
|
2069
2071
|
viewMode: s,
|
|
2070
2072
|
scrollMode: u
|
|
2071
|
-
}), A = k(!1), z = k(), { isFullScreen: L } =
|
|
2073
|
+
}), A = k(!1), z = k(), { isFullScreen: L } = po(), {
|
|
2072
2074
|
pageDimension: O,
|
|
2073
2075
|
rowCount: F,
|
|
2074
|
-
rowHeight:
|
|
2076
|
+
rowHeight: $,
|
|
2075
2077
|
columnCount: M,
|
|
2076
2078
|
columnWidth: j,
|
|
2077
2079
|
estimatedColumnWidth: K,
|
|
2078
2080
|
estimatedRowHeight: U
|
|
2079
|
-
} =
|
|
2080
|
-
|
|
2081
|
+
} = oi(), re = bt(v, 100), G = k();
|
|
2082
|
+
ci(M, F, p);
|
|
2081
2083
|
const Z = k({
|
|
2082
2084
|
scrollTop: 0,
|
|
2083
2085
|
scrollLeft: 0
|
|
2084
2086
|
});
|
|
2085
|
-
|
|
2086
|
-
const { isPressed: Y } =
|
|
2087
|
+
tr(r);
|
|
2088
|
+
const { isPressed: Y } = Jo(), { selectionMode: J } = lo(), { initializeGrabScroll: ee, resetGrabState: ie } = er({
|
|
2087
2089
|
isPressed: Y
|
|
2088
2090
|
}), ae = W(() => J === ro.HAND, [J]), Pe = W(() => ({
|
|
2089
2091
|
columnCount: M
|
|
@@ -2152,7 +2154,7 @@ const ri = nn(({ widths: t, heights: e }) => {
|
|
|
2152
2154
|
D(() => {
|
|
2153
2155
|
clearTimeout(z.current);
|
|
2154
2156
|
const V = Array.from({ length: F }).reduce(
|
|
2155
|
-
(Se, ot, Ie) => Se +
|
|
2157
|
+
(Se, ot, Ie) => Se + $(Ie),
|
|
2156
2158
|
0
|
|
2157
2159
|
), B = Array.from({ length: M }).reduce(
|
|
2158
2160
|
(Se, ot, Ie) => Se + j(Ie),
|
|
@@ -2175,17 +2177,17 @@ const ri = nn(({ widths: t, heights: e }) => {
|
|
|
2175
2177
|
D(() => () => {
|
|
2176
2178
|
G.current && clearTimeout(G.current);
|
|
2177
2179
|
}, []);
|
|
2178
|
-
const Zn = W(() => se(
|
|
2179
|
-
[
|
|
2180
|
-
[
|
|
2180
|
+
const Zn = W(() => se(de["rp-pages-container"], {
|
|
2181
|
+
[de["rp-cursor-grab"]]: ae && !Y,
|
|
2182
|
+
[de["rp-cursor-grabbing"]]: ae && Y
|
|
2181
2183
|
}), [ae, Y]), Xn = E(
|
|
2182
2184
|
(V) => {
|
|
2183
2185
|
if (ae && V) {
|
|
2184
|
-
const B = se(
|
|
2186
|
+
const B = se(de["rp-pages"]), ye = document.querySelector(`.${B}`);
|
|
2185
2187
|
ee(ye);
|
|
2186
2188
|
}
|
|
2187
2189
|
},
|
|
2188
|
-
[ae, ee,
|
|
2190
|
+
[ae, ee, de]
|
|
2189
2191
|
);
|
|
2190
2192
|
return D(() => {
|
|
2191
2193
|
w && ie();
|
|
@@ -2203,24 +2205,24 @@ const ri = nn(({ widths: t, heights: e }) => {
|
|
|
2203
2205
|
b,
|
|
2204
2206
|
g,
|
|
2205
2207
|
re
|
|
2206
|
-
]), /* @__PURE__ */
|
|
2207
|
-
/* @__PURE__ */ a(
|
|
2208
|
+
]), /* @__PURE__ */ H(pe, { children: [
|
|
2209
|
+
/* @__PURE__ */ a(Eo, { ref: i, children: /* @__PURE__ */ a(
|
|
2208
2210
|
In,
|
|
2209
2211
|
{
|
|
2210
2212
|
id: n,
|
|
2211
2213
|
ref: o,
|
|
2212
2214
|
tabIndex: -1,
|
|
2213
2215
|
className: Zn,
|
|
2214
|
-
children: /* @__PURE__ */ a(
|
|
2216
|
+
children: /* @__PURE__ */ a(ii, { style: { minHeight: "50px" }, children: ({ width: V, height: B }) => /* @__PURE__ */ a("div", { "data-rp": "pages", ref: Xn, style: { width: V, height: B }, children: u === ne.PAGE_SCROLLING ? /* @__PURE__ */ a(
|
|
2215
2217
|
"div",
|
|
2216
2218
|
{
|
|
2217
2219
|
ref: f,
|
|
2218
2220
|
style: { width: V, height: B },
|
|
2219
|
-
className: se(
|
|
2220
|
-
children: s === Re.DUAL_PAGE ? /* @__PURE__ */ a(
|
|
2221
|
+
className: se(de["rp-pages"], de["rp-page-scrolling-wrapper"]),
|
|
2222
|
+
children: s === Re.DUAL_PAGE ? /* @__PURE__ */ a(ai, { widths: j, heights: $ }) : /* @__PURE__ */ a(si, { widths: j, heights: $ })
|
|
2221
2223
|
}
|
|
2222
2224
|
) : U ? /* @__PURE__ */ a(
|
|
2223
|
-
|
|
2225
|
+
Jr,
|
|
2224
2226
|
{
|
|
2225
2227
|
ref: d,
|
|
2226
2228
|
itemData: Pe,
|
|
@@ -2229,15 +2231,15 @@ const ri = nn(({ widths: t, heights: e }) => {
|
|
|
2229
2231
|
onScroll: Kn,
|
|
2230
2232
|
columnCount: M,
|
|
2231
2233
|
columnWidth: j,
|
|
2232
|
-
rowHeight:
|
|
2234
|
+
rowHeight: $,
|
|
2233
2235
|
height: B,
|
|
2234
2236
|
width: V,
|
|
2235
2237
|
estimatedColumnWidth: K,
|
|
2236
2238
|
estimatedRowHeight: U,
|
|
2237
2239
|
rowCount: F,
|
|
2238
2240
|
className: se(
|
|
2239
|
-
|
|
2240
|
-
u === ne.HORIZONTAL_SCROLLING ?
|
|
2241
|
+
de["rp-pages"],
|
|
2242
|
+
u === ne.HORIZONTAL_SCROLLING ? de["rp-pages-horizontal-scroll"] : ""
|
|
2241
2243
|
),
|
|
2242
2244
|
style: {
|
|
2243
2245
|
"--rp-page-height": `${U}px`,
|
|
@@ -2245,12 +2247,12 @@ const ri = nn(({ widths: t, heights: e }) => {
|
|
|
2245
2247
|
"--rp-row-count": `${F}`,
|
|
2246
2248
|
"--rp-column-count": `${M}`
|
|
2247
2249
|
},
|
|
2248
|
-
children:
|
|
2250
|
+
children: li
|
|
2249
2251
|
}
|
|
2250
2252
|
) : !w && !S ? /* @__PURE__ */ a(
|
|
2251
2253
|
"div",
|
|
2252
2254
|
{
|
|
2253
|
-
className:
|
|
2255
|
+
className: de["rp-loader"],
|
|
2254
2256
|
style: {
|
|
2255
2257
|
display: "flex",
|
|
2256
2258
|
justifyContent: "center",
|
|
@@ -2260,10 +2262,20 @@ const ri = nn(({ widths: t, heights: e }) => {
|
|
|
2260
2262
|
},
|
|
2261
2263
|
children: I && /* @__PURE__ */ a(I, {})
|
|
2262
2264
|
}
|
|
2263
|
-
) :
|
|
2265
|
+
) : S === io.NOT_SUPPORTED ? /* @__PURE__ */ a("div", { className: de["rp-not-supported"], children: /* @__PURE__ */ H("div", { children: [
|
|
2266
|
+
"React PDF is unable to render on this browser. Please use the supported browsers from the list below:",
|
|
2267
|
+
/* @__PURE__ */ H("ul", { children: [
|
|
2268
|
+
/* @__PURE__ */ a("li", { children: "Chrome 110+" }),
|
|
2269
|
+
/* @__PURE__ */ a("li", { children: "Edge 115+" }),
|
|
2270
|
+
/* @__PURE__ */ a("li", { children: "Firefox 115+" }),
|
|
2271
|
+
/* @__PURE__ */ a("li", { children: "Safari 16.5+" }),
|
|
2272
|
+
/* @__PURE__ */ a("li", { children: "Safari iOS 16.5+" }),
|
|
2273
|
+
/* @__PURE__ */ a("li", { children: "Chrome Android 126+" })
|
|
2274
|
+
] })
|
|
2275
|
+
] }) }) : null }) })
|
|
2264
2276
|
}
|
|
2265
2277
|
) }),
|
|
2266
|
-
R && /* @__PURE__ */ a(
|
|
2278
|
+
R && /* @__PURE__ */ a(nr, {})
|
|
2267
2279
|
] });
|
|
2268
2280
|
}, Me = {
|
|
2269
2281
|
"rp-toolbar-content": "_rp-toolbar-content_sz31z_1",
|
|
@@ -2275,13 +2287,13 @@ const ri = nn(({ widths: t, heights: e }) => {
|
|
|
2275
2287
|
"rp-paginate": "_rp-paginate_1gck0_1",
|
|
2276
2288
|
"rp-page-input": "_rp-page-input_1gck0_6",
|
|
2277
2289
|
"rp-total-page": "_rp-total-page_1gck0_18"
|
|
2278
|
-
},
|
|
2290
|
+
}, di = () => {
|
|
2279
2291
|
const { prevIcon: t } = Ce(), { prevIcon: e } = be();
|
|
2280
2292
|
return t || e || /* @__PURE__ */ a(Ze, {});
|
|
2281
|
-
},
|
|
2293
|
+
}, ui = () => {
|
|
2282
2294
|
const { nextIcon: t } = Ce(), { nextIcon: e } = be();
|
|
2283
2295
|
return t || e || /* @__PURE__ */ a(Ze, { style: { transform: "rotate(180deg" } });
|
|
2284
|
-
},
|
|
2296
|
+
}, pi = () => {
|
|
2285
2297
|
const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: r, prevPage: o, goToPage: i } = le(), [c, l] = q(t.toString()), { pageNavigationTool: d = !0 } = Te(), { pageNavigationTool: f = !0 } = Ne(), { isSmallScreen: m } = Oe(), { viewMode: P } = Fe(), { scrollMode: p } = Ee(), { localeMessages: v } = he();
|
|
2286
2298
|
D(() => {
|
|
2287
2299
|
l(t.toString());
|
|
@@ -2320,14 +2332,14 @@ const ri = nn(({ widths: t, heights: e }) => {
|
|
|
2320
2332
|
goToPage: i,
|
|
2321
2333
|
changePage: n
|
|
2322
2334
|
}
|
|
2323
|
-
) : /* @__PURE__ */
|
|
2335
|
+
) : /* @__PURE__ */ H("div", { className: pt["rp-paginate"], children: [
|
|
2324
2336
|
!m && /* @__PURE__ */ a(Q, { content: v == null ? void 0 : v.previousPageTooltip, children: /* @__PURE__ */ a(
|
|
2325
2337
|
ve,
|
|
2326
2338
|
{
|
|
2327
2339
|
onClick: o,
|
|
2328
2340
|
"aria-label": v == null ? void 0 : v.previousPageTooltip,
|
|
2329
2341
|
"aria-disabled": t === 1,
|
|
2330
|
-
children: /* @__PURE__ */ a(
|
|
2342
|
+
children: /* @__PURE__ */ a(di, {})
|
|
2331
2343
|
}
|
|
2332
2344
|
) }),
|
|
2333
2345
|
/* @__PURE__ */ a(Q, { content: v == null ? void 0 : v.currentPageTooltip, children: /* @__PURE__ */ a(
|
|
@@ -2342,7 +2354,7 @@ const ri = nn(({ widths: t, heights: e }) => {
|
|
|
2342
2354
|
name: "page-input"
|
|
2343
2355
|
}
|
|
2344
2356
|
) }),
|
|
2345
|
-
/* @__PURE__ */
|
|
2357
|
+
/* @__PURE__ */ H("span", { className: pt["rp-total-page"], children: [
|
|
2346
2358
|
"/",
|
|
2347
2359
|
e
|
|
2348
2360
|
] }),
|
|
@@ -2352,12 +2364,12 @@ const ri = nn(({ widths: t, heights: e }) => {
|
|
|
2352
2364
|
onClick: r,
|
|
2353
2365
|
"aria-label": v == null ? void 0 : v.nextPageTooltip,
|
|
2354
2366
|
"aria-disabled": g,
|
|
2355
|
-
children: /* @__PURE__ */ a(
|
|
2367
|
+
children: /* @__PURE__ */ a(ui, {})
|
|
2356
2368
|
}
|
|
2357
2369
|
) })
|
|
2358
2370
|
] });
|
|
2359
2371
|
};
|
|
2360
|
-
var St = "Dialog", [xn,
|
|
2372
|
+
var St = "Dialog", [xn, Ys] = dr(St), [hi, ue] = xn(St), Rn = (t) => {
|
|
2361
2373
|
const {
|
|
2362
2374
|
__scopeDialog: e,
|
|
2363
2375
|
children: n,
|
|
@@ -2365,13 +2377,13 @@ var St = "Dialog", [xn, Xs] = lr(St), [ui, de] = xn(St), Rn = (t) => {
|
|
|
2365
2377
|
defaultOpen: o,
|
|
2366
2378
|
onOpenChange: i,
|
|
2367
2379
|
modal: c = !0
|
|
2368
|
-
} = t, l = X.useRef(null), d = X.useRef(null), [f = !1, m] =
|
|
2380
|
+
} = t, l = X.useRef(null), d = X.useRef(null), [f = !1, m] = hr({
|
|
2369
2381
|
prop: r,
|
|
2370
2382
|
defaultProp: o,
|
|
2371
2383
|
onChange: i
|
|
2372
2384
|
});
|
|
2373
2385
|
return /* @__PURE__ */ a(
|
|
2374
|
-
|
|
2386
|
+
hi,
|
|
2375
2387
|
{
|
|
2376
2388
|
scope: e,
|
|
2377
2389
|
triggerRef: l,
|
|
@@ -2388,9 +2400,9 @@ var St = "Dialog", [xn, Xs] = lr(St), [ui, de] = xn(St), Rn = (t) => {
|
|
|
2388
2400
|
);
|
|
2389
2401
|
};
|
|
2390
2402
|
Rn.displayName = St;
|
|
2391
|
-
var Ln = "DialogTrigger",
|
|
2403
|
+
var Ln = "DialogTrigger", fi = X.forwardRef(
|
|
2392
2404
|
(t, e) => {
|
|
2393
|
-
const { __scopeDialog: n, ...r } = t, o =
|
|
2405
|
+
const { __scopeDialog: n, ...r } = t, o = ue(Ln, n), i = Tt(e, o.triggerRef);
|
|
2394
2406
|
return /* @__PURE__ */ a(
|
|
2395
2407
|
Ge.button,
|
|
2396
2408
|
{
|
|
@@ -2406,28 +2418,28 @@ var Ln = "DialogTrigger", pi = X.forwardRef(
|
|
|
2406
2418
|
);
|
|
2407
2419
|
}
|
|
2408
2420
|
);
|
|
2409
|
-
|
|
2410
|
-
var It = "DialogPortal", [
|
|
2421
|
+
fi.displayName = Ln;
|
|
2422
|
+
var It = "DialogPortal", [mi, En] = xn(It, {
|
|
2411
2423
|
forceMount: void 0
|
|
2412
2424
|
}), Nn = (t) => {
|
|
2413
|
-
const { __scopeDialog: e, forceMount: n, children: r, container: o } = t, i =
|
|
2414
|
-
return /* @__PURE__ */ a(
|
|
2425
|
+
const { __scopeDialog: e, forceMount: n, children: r, container: o } = t, i = ue(It, e);
|
|
2426
|
+
return /* @__PURE__ */ a(mi, { scope: e, forceMount: n, children: X.Children.map(r, (c) => /* @__PURE__ */ a(Ct, { present: n || i.open, children: /* @__PURE__ */ a(_r, { asChild: !0, container: o, children: c }) })) });
|
|
2415
2427
|
};
|
|
2416
2428
|
Nn.displayName = It;
|
|
2417
2429
|
var Qe = "DialogOverlay", On = X.forwardRef(
|
|
2418
2430
|
(t, e) => {
|
|
2419
|
-
const n = En(Qe, t.__scopeDialog), { forceMount: r = n.forceMount, ...o } = t, i =
|
|
2420
|
-
return i.modal ? /* @__PURE__ */ a(Ct, { present: r || i.open, children: /* @__PURE__ */ a(
|
|
2431
|
+
const n = En(Qe, t.__scopeDialog), { forceMount: r = n.forceMount, ...o } = t, i = ue(Qe, t.__scopeDialog);
|
|
2432
|
+
return i.modal ? /* @__PURE__ */ a(Ct, { present: r || i.open, children: /* @__PURE__ */ a(gi, { ...o, ref: e }) }) : null;
|
|
2421
2433
|
}
|
|
2422
2434
|
);
|
|
2423
2435
|
On.displayName = Qe;
|
|
2424
|
-
var
|
|
2436
|
+
var gi = X.forwardRef(
|
|
2425
2437
|
(t, e) => {
|
|
2426
|
-
const { __scopeDialog: n, ...r } = t, o =
|
|
2438
|
+
const { __scopeDialog: n, ...r } = t, o = ue(Qe, n);
|
|
2427
2439
|
return (
|
|
2428
2440
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
2429
2441
|
// ie. when `Overlay` and `Content` are siblings
|
|
2430
|
-
/* @__PURE__ */ a(
|
|
2442
|
+
/* @__PURE__ */ a(mr, { as: ur, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ a(
|
|
2431
2443
|
Ge.div,
|
|
2432
2444
|
{
|
|
2433
2445
|
"data-state": Rt(o.open),
|
|
@@ -2440,18 +2452,18 @@ var fi = X.forwardRef(
|
|
|
2440
2452
|
}
|
|
2441
2453
|
), Le = "DialogContent", Dn = X.forwardRef(
|
|
2442
2454
|
(t, e) => {
|
|
2443
|
-
const n = En(Le, t.__scopeDialog), { forceMount: r = n.forceMount, ...o } = t, i =
|
|
2444
|
-
return /* @__PURE__ */ a(Ct, { present: r || i.open, children: i.modal ? /* @__PURE__ */ a(
|
|
2455
|
+
const n = En(Le, t.__scopeDialog), { forceMount: r = n.forceMount, ...o } = t, i = ue(Le, t.__scopeDialog);
|
|
2456
|
+
return /* @__PURE__ */ a(Ct, { present: r || i.open, children: i.modal ? /* @__PURE__ */ a(vi, { ...o, ref: e }) : /* @__PURE__ */ a(wi, { ...o, ref: e }) });
|
|
2445
2457
|
}
|
|
2446
2458
|
);
|
|
2447
2459
|
Dn.displayName = Le;
|
|
2448
|
-
var
|
|
2460
|
+
var vi = X.forwardRef(
|
|
2449
2461
|
(t, e) => {
|
|
2450
|
-
const n =
|
|
2462
|
+
const n = ue(Le, t.__scopeDialog), r = X.useRef(null), o = Tt(e, n.contentRef, r);
|
|
2451
2463
|
return X.useEffect(() => {
|
|
2452
2464
|
const i = r.current;
|
|
2453
2465
|
if (i)
|
|
2454
|
-
return
|
|
2466
|
+
return gr(i);
|
|
2455
2467
|
}, []), /* @__PURE__ */ a(
|
|
2456
2468
|
An,
|
|
2457
2469
|
{
|
|
@@ -2474,9 +2486,9 @@ var mi = X.forwardRef(
|
|
|
2474
2486
|
}
|
|
2475
2487
|
);
|
|
2476
2488
|
}
|
|
2477
|
-
),
|
|
2489
|
+
), wi = X.forwardRef(
|
|
2478
2490
|
(t, e) => {
|
|
2479
|
-
const n =
|
|
2491
|
+
const n = ue(Le, t.__scopeDialog), r = X.useRef(!1), o = X.useRef(!1);
|
|
2480
2492
|
return /* @__PURE__ */ a(
|
|
2481
2493
|
An,
|
|
2482
2494
|
{
|
|
@@ -2499,10 +2511,10 @@ var mi = X.forwardRef(
|
|
|
2499
2511
|
}
|
|
2500
2512
|
), An = X.forwardRef(
|
|
2501
2513
|
(t, e) => {
|
|
2502
|
-
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: i, ...c } = t, l =
|
|
2503
|
-
return
|
|
2514
|
+
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: i, ...c } = t, l = ue(Le, n), d = X.useRef(null), f = Tt(e, d);
|
|
2515
|
+
return vr(), /* @__PURE__ */ H(pe, { children: [
|
|
2504
2516
|
/* @__PURE__ */ a(
|
|
2505
|
-
|
|
2517
|
+
wr,
|
|
2506
2518
|
{
|
|
2507
2519
|
asChild: !0,
|
|
2508
2520
|
loop: !0,
|
|
@@ -2510,7 +2522,7 @@ var mi = X.forwardRef(
|
|
|
2510
2522
|
onMountAutoFocus: o,
|
|
2511
2523
|
onUnmountAutoFocus: i,
|
|
2512
2524
|
children: /* @__PURE__ */ a(
|
|
2513
|
-
|
|
2525
|
+
fr,
|
|
2514
2526
|
{
|
|
2515
2527
|
role: "dialog",
|
|
2516
2528
|
id: l.contentId,
|
|
@@ -2524,29 +2536,29 @@ var mi = X.forwardRef(
|
|
|
2524
2536
|
)
|
|
2525
2537
|
}
|
|
2526
2538
|
),
|
|
2527
|
-
/* @__PURE__ */
|
|
2528
|
-
/* @__PURE__ */ a(
|
|
2529
|
-
/* @__PURE__ */ a(
|
|
2539
|
+
/* @__PURE__ */ H(pe, { children: [
|
|
2540
|
+
/* @__PURE__ */ a(bi, { titleId: l.titleId }),
|
|
2541
|
+
/* @__PURE__ */ a(Ci, { contentRef: d, descriptionId: l.descriptionId })
|
|
2530
2542
|
] })
|
|
2531
2543
|
] });
|
|
2532
2544
|
}
|
|
2533
2545
|
), xt = "DialogTitle", zn = X.forwardRef(
|
|
2534
2546
|
(t, e) => {
|
|
2535
|
-
const { __scopeDialog: n, ...r } = t, o =
|
|
2547
|
+
const { __scopeDialog: n, ...r } = t, o = ue(xt, n);
|
|
2536
2548
|
return /* @__PURE__ */ a(Ge.h2, { id: o.titleId, ...r, ref: e });
|
|
2537
2549
|
}
|
|
2538
2550
|
);
|
|
2539
2551
|
zn.displayName = xt;
|
|
2540
|
-
var Fn = "DialogDescription",
|
|
2552
|
+
var Fn = "DialogDescription", _i = X.forwardRef(
|
|
2541
2553
|
(t, e) => {
|
|
2542
|
-
const { __scopeDialog: n, ...r } = t, o =
|
|
2554
|
+
const { __scopeDialog: n, ...r } = t, o = ue(Fn, n);
|
|
2543
2555
|
return /* @__PURE__ */ a(Ge.p, { id: o.descriptionId, ...r, ref: e });
|
|
2544
2556
|
}
|
|
2545
2557
|
);
|
|
2546
|
-
|
|
2558
|
+
_i.displayName = Fn;
|
|
2547
2559
|
var Mn = "DialogClose", kn = X.forwardRef(
|
|
2548
2560
|
(t, e) => {
|
|
2549
|
-
const { __scopeDialog: n, ...r } = t, o =
|
|
2561
|
+
const { __scopeDialog: n, ...r } = t, o = ue(Mn, n);
|
|
2550
2562
|
return /* @__PURE__ */ a(
|
|
2551
2563
|
Ge.button,
|
|
2552
2564
|
{
|
|
@@ -2562,11 +2574,11 @@ kn.displayName = Mn;
|
|
|
2562
2574
|
function Rt(t) {
|
|
2563
2575
|
return t ? "open" : "closed";
|
|
2564
2576
|
}
|
|
2565
|
-
var Wn = "DialogTitleWarning", [
|
|
2577
|
+
var Wn = "DialogTitleWarning", [Js, Hn] = pr(Wn, {
|
|
2566
2578
|
contentName: Le,
|
|
2567
2579
|
titleName: xt,
|
|
2568
2580
|
docsSlug: "dialog"
|
|
2569
|
-
}),
|
|
2581
|
+
}), bi = ({ titleId: t }) => {
|
|
2570
2582
|
const e = Hn(Wn), n = `\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
2571
2583
|
|
|
2572
2584
|
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
@@ -2575,14 +2587,14 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do
|
|
|
2575
2587
|
return X.useEffect(() => {
|
|
2576
2588
|
t && (document.getElementById(t) || console.error(n));
|
|
2577
2589
|
}, [n, t]), null;
|
|
2578
|
-
},
|
|
2579
|
-
const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Hn(
|
|
2590
|
+
}, Ti = "DialogDescriptionWarning", Ci = ({ contentRef: t, descriptionId: e }) => {
|
|
2591
|
+
const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Hn(Ti).contentName}}.`;
|
|
2580
2592
|
return X.useEffect(() => {
|
|
2581
2593
|
var i;
|
|
2582
2594
|
const o = (i = t.current) == null ? void 0 : i.getAttribute("aria-describedby");
|
|
2583
2595
|
e && o && (document.getElementById(e) || console.warn(r));
|
|
2584
2596
|
}, [r, t, e]), null;
|
|
2585
|
-
},
|
|
2597
|
+
}, Pi = Rn, yi = Nn, Si = On, Ii = Dn, xi = zn, Ri = kn;
|
|
2586
2598
|
const xe = {
|
|
2587
2599
|
"rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
|
|
2588
2600
|
"rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
|
|
@@ -2591,8 +2603,8 @@ const xe = {
|
|
|
2591
2603
|
"rp-dialog-title": "_rp-dialog-title_slqo7_39",
|
|
2592
2604
|
"rp-dialog-close": "_rp-dialog-close_slqo7_47",
|
|
2593
2605
|
"rp-properties-divider": "_rp-properties-divider_slqo7_55"
|
|
2594
|
-
},
|
|
2595
|
-
const { pdfProperties: t } = oe(), { container: e } = _e(), { activeDocumentProperties: n, setActiveDocumentProperties: r } =
|
|
2606
|
+
}, Li = () => {
|
|
2607
|
+
const { pdfProperties: t } = oe(), { container: e } = _e(), { activeDocumentProperties: n, setActiveDocumentProperties: r } = Co(), { localeMessages: o } = he(), i = W(() => {
|
|
2596
2608
|
if (!t)
|
|
2597
2609
|
return [];
|
|
2598
2610
|
const {
|
|
@@ -2632,21 +2644,21 @@ const xe = {
|
|
|
2632
2644
|
{ label: o == null ? void 0 : o.propertiesPageCountLabel, value: y }
|
|
2633
2645
|
];
|
|
2634
2646
|
}, [t, o]);
|
|
2635
|
-
return /* @__PURE__ */ a(
|
|
2636
|
-
/* @__PURE__ */ a(
|
|
2637
|
-
/* @__PURE__ */
|
|
2638
|
-
/* @__PURE__ */ a(
|
|
2639
|
-
/* @__PURE__ */ a("div", { className: xe["rp-document-properties"], children: i.map((c, l) => /* @__PURE__ */ a("div", { children: c.separate ? /* @__PURE__ */ a("div", { className: xe["rp-properties-divider"] }) : /* @__PURE__ */ a(
|
|
2640
|
-
/* @__PURE__ */ a(
|
|
2647
|
+
return /* @__PURE__ */ a(Pi, { open: n, onOpenChange: r, children: /* @__PURE__ */ a(yi, { container: e, children: /* @__PURE__ */ H("div", { className: xe["rp-dialog-wrapper"], children: [
|
|
2648
|
+
/* @__PURE__ */ a(Si, { className: xe["rp-dialog-overlay"] }),
|
|
2649
|
+
/* @__PURE__ */ H(Ii, { className: xe["rp-document-dialog"], children: [
|
|
2650
|
+
/* @__PURE__ */ a(xi, { className: xe["rp-dialog-title"], children: o == null ? void 0 : o.documentPropertiesLabel }),
|
|
2651
|
+
/* @__PURE__ */ a("div", { className: xe["rp-document-properties"], children: i.map((c, l) => /* @__PURE__ */ a("div", { children: c.separate ? /* @__PURE__ */ a("div", { className: xe["rp-properties-divider"] }) : /* @__PURE__ */ a(Ao, { label: c.label, value: c.value }) }, l)) }),
|
|
2652
|
+
/* @__PURE__ */ a(Ri, { asChild: !0, className: xe["rp-dialog-close"], children: /* @__PURE__ */ a(br, {}) })
|
|
2641
2653
|
] })
|
|
2642
2654
|
] }) }) });
|
|
2643
|
-
},
|
|
2655
|
+
}, Ei = {
|
|
2644
2656
|
"rp-other-tool-content": "_rp-other-tool-content_su718_1"
|
|
2645
|
-
}, Qt = ".pdf",
|
|
2657
|
+
}, Qt = ".pdf", Ni = (t) => URL.createObjectURL(t), Oi = async (t) => {
|
|
2646
2658
|
const n = await (await fetch(t)).blob();
|
|
2647
|
-
return
|
|
2659
|
+
return Ni(n);
|
|
2648
2660
|
}, $n = () => {
|
|
2649
|
-
const { filename: t, pdfSrc: e } = oe(), { downloadFilename: n } =
|
|
2661
|
+
const { filename: t, pdfSrc: e } = oe(), { downloadFilename: n } = wo(), r = (i) => {
|
|
2650
2662
|
const c = n || i;
|
|
2651
2663
|
return c.endsWith(Qt) ? c : `${c}${Qt}`;
|
|
2652
2664
|
};
|
|
@@ -2654,26 +2666,26 @@ const xe = {
|
|
|
2654
2666
|
if (!t || !e)
|
|
2655
2667
|
throw new Error("There is no PDF source to download");
|
|
2656
2668
|
const i = document.createElement("a");
|
|
2657
|
-
i.href = await
|
|
2669
|
+
i.href = await Oi(e), i.download = r(t), document.body.appendChild(i), i.click(), document.body.removeChild(i);
|
|
2658
2670
|
}, [t, e]) };
|
|
2659
2671
|
}, qn = () => {
|
|
2660
2672
|
const { downloadIcon: t } = Ce(), { downloadIcon: e } = be();
|
|
2661
|
-
return t || e || /* @__PURE__ */ a(
|
|
2662
|
-
}, Gn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ a(Q, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }),
|
|
2673
|
+
return t || e || /* @__PURE__ */ a(yr, {});
|
|
2674
|
+
}, Gn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ a(Q, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }), Di = ({ download: t, localeMessages: e }) => /* @__PURE__ */ a(Gn, { localeMessages: e, children: /* @__PURE__ */ a(ve, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ a(qn, {}) }) }), Ai = ({ download: t, localeMessages: e }) => /* @__PURE__ */ a(Xe, { onClick: t, children: /* @__PURE__ */ H(Gn, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2663
2675
|
/* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(qn, {}) }),
|
|
2664
2676
|
e == null ? void 0 : e.downloadFileLabel
|
|
2665
2677
|
] }) }), Un = () => {
|
|
2666
2678
|
const { download: t } = $n(), { downloadTool: e = !0 } = Te(), { downloadTool: n = !0 } = Ne(), { isSmallScreen: r } = Oe(), { localeMessages: o } = he(), i = o == null ? void 0 : o.downloadFileTooltip;
|
|
2667
|
-
return !e || !n ? null : r ? /* @__PURE__ */ a(
|
|
2679
|
+
return !e || !n ? null : r ? /* @__PURE__ */ a(Ai, { download: t, localeMessages: o }) : typeof e == "function" ? /* @__PURE__ */ a(Q, { content: i, children: /* @__PURE__ */ a(e, { download: t }) }) : typeof n == "function" ? /* @__PURE__ */ a(Q, { content: i, children: /* @__PURE__ */ a(n, { download: t }) }) : /* @__PURE__ */ a(Di, { download: t, localeMessages: o });
|
|
2668
2680
|
}, Vn = () => {
|
|
2669
2681
|
const { printIcon: t } = Ce(), { printIcon: e } = be();
|
|
2670
|
-
return t || e || /* @__PURE__ */ a(
|
|
2671
|
-
}, jn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ a(Q, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }),
|
|
2682
|
+
return t || e || /* @__PURE__ */ a(Sr, {});
|
|
2683
|
+
}, jn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ a(Q, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }), zi = ({ print: t, localeMessages: e }) => /* @__PURE__ */ a(jn, { localeMessages: e, children: /* @__PURE__ */ a(ve, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ a(Vn, {}) }) }), Fi = ({ print: t, localeMessages: e }) => /* @__PURE__ */ a(Xe, { onClick: t, children: /* @__PURE__ */ H(jn, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2672
2684
|
/* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(Vn, {}) }),
|
|
2673
2685
|
e == null ? void 0 : e.printLabel
|
|
2674
2686
|
] }) }), Bn = () => {
|
|
2675
2687
|
const { print: t, cancel: e, setOnProgress: n, setOnComplete: r, setOnError: o, progress: i } = tt(), { printTool: c = !0 } = Te(), { printTool: l = !0 } = Ne(), { isSmallScreen: d } = Oe(), { localeMessages: f } = he(), m = f == null ? void 0 : f.printTooltip;
|
|
2676
|
-
return !c || !l ? null : d ? /* @__PURE__ */ a(
|
|
2688
|
+
return !c || !l ? null : d ? /* @__PURE__ */ a(Fi, { print: t, localeMessages: f }) : typeof c == "function" ? /* @__PURE__ */ a(Q, { content: m, children: /* @__PURE__ */ a(
|
|
2677
2689
|
c,
|
|
2678
2690
|
{
|
|
2679
2691
|
print: t,
|
|
@@ -2693,33 +2705,33 @@ const xe = {
|
|
|
2693
2705
|
setOnComplete: r,
|
|
2694
2706
|
progress: i
|
|
2695
2707
|
}
|
|
2696
|
-
) }) : /* @__PURE__ */ a(
|
|
2697
|
-
},
|
|
2708
|
+
) }) : /* @__PURE__ */ a(zi, { print: t, localeMessages: f });
|
|
2709
|
+
}, Mi = {
|
|
2698
2710
|
"rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
|
|
2699
|
-
},
|
|
2711
|
+
}, ki = () => {
|
|
2700
2712
|
const { goToFirstPageIcon: t } = Ce(), { goToFirstPageIcon: e } = be();
|
|
2701
|
-
return t || e || /* @__PURE__ */ a(hn, { className:
|
|
2702
|
-
},
|
|
2713
|
+
return t || e || /* @__PURE__ */ a(hn, { className: Mi["rp-go-to-Top"] });
|
|
2714
|
+
}, Wi = () => {
|
|
2703
2715
|
const { goToLastPageIcon: t } = Ce(), { goToLastPageIcon: e } = be();
|
|
2704
2716
|
return t || e || /* @__PURE__ */ a(hn, {});
|
|
2705
|
-
}, Yt = { width: "100%" },
|
|
2717
|
+
}, Yt = { width: "100%" }, Hi = () => {
|
|
2706
2718
|
const { goToPage: t, totalPages: e, focusedPage: n } = le(), { jumpNavigationTool: r = !0 } = Te(), { jumpNavigationTool: o = !0 } = Ne(), { localeMessages: i } = he(), c = W(() => n === 1, [n]), l = W(() => n === e, [n, e]), d = E(() => {
|
|
2707
2719
|
t(1);
|
|
2708
2720
|
}, [t]), f = E(() => {
|
|
2709
2721
|
t(e);
|
|
2710
2722
|
}, [t, e]);
|
|
2711
|
-
return !r || !o ? null : /* @__PURE__ */
|
|
2712
|
-
/* @__PURE__ */ a(Xe, { onClick: d, children: /* @__PURE__ */ a(Q, { content: i == null ? void 0 : i.firstPageTooltip, style: Yt, children: /* @__PURE__ */
|
|
2713
|
-
/* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(
|
|
2723
|
+
return !r || !o ? null : /* @__PURE__ */ H(un, { children: [
|
|
2724
|
+
/* @__PURE__ */ a(Xe, { onClick: d, children: /* @__PURE__ */ a(Q, { content: i == null ? void 0 : i.firstPageTooltip, style: Yt, children: /* @__PURE__ */ H("div", { className: "rp-menu-item", "aria-disabled": c, children: [
|
|
2725
|
+
/* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(ki, {}) }),
|
|
2714
2726
|
/* @__PURE__ */ a("span", { children: i == null ? void 0 : i.firstPageLabel })
|
|
2715
2727
|
] }) }) }),
|
|
2716
|
-
/* @__PURE__ */ a(Xe, { onClick: f, children: /* @__PURE__ */ a(Q, { content: i == null ? void 0 : i.lastPageTooltip, style: Yt, children: /* @__PURE__ */
|
|
2717
|
-
/* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(
|
|
2728
|
+
/* @__PURE__ */ a(Xe, { onClick: f, children: /* @__PURE__ */ a(Q, { content: i == null ? void 0 : i.lastPageTooltip, style: Yt, children: /* @__PURE__ */ H("div", { className: "rp-menu-item", "aria-disabled": l, children: [
|
|
2729
|
+
/* @__PURE__ */ a("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ a(Wi, {}) }),
|
|
2718
2730
|
/* @__PURE__ */ a("span", { children: i == null ? void 0 : i.lastPageLabel })
|
|
2719
2731
|
] }) }) }),
|
|
2720
2732
|
/* @__PURE__ */ a(ln, {})
|
|
2721
2733
|
] });
|
|
2722
|
-
},
|
|
2734
|
+
}, $i = () => {
|
|
2723
2735
|
const [t, e] = q(!1), { container: n, pagesRef: r } = _e(), { isSmallScreen: o } = Oe(), {
|
|
2724
2736
|
openFileTool: i,
|
|
2725
2737
|
downloadTool: c,
|
|
@@ -2771,57 +2783,57 @@ const xe = {
|
|
|
2771
2783
|
]);
|
|
2772
2784
|
return D(() => (r && N.current.observe(r), () => {
|
|
2773
2785
|
N.current.disconnect();
|
|
2774
|
-
}), [r]), !A || !z ? null : /* @__PURE__ */
|
|
2786
|
+
}), [r]), !A || !z ? null : /* @__PURE__ */ H(pe, { children: [
|
|
2775
2787
|
/* @__PURE__ */ a(
|
|
2776
2788
|
cn,
|
|
2777
2789
|
{
|
|
2778
2790
|
container: n,
|
|
2779
2791
|
onOpenChange: e,
|
|
2780
|
-
triggerComponent: /* @__PURE__ */ a("div", { role: "button", children: /* @__PURE__ */ a(Q, { content: R == null ? void 0 : R.moreOptionTooltip, children: /* @__PURE__ */ a(ve, { active: t, "aria-label": R == null ? void 0 : R.moreOptionTooltip, children: /* @__PURE__ */ a(
|
|
2792
|
+
triggerComponent: /* @__PURE__ */ a("div", { role: "button", children: /* @__PURE__ */ a(Q, { content: R == null ? void 0 : R.moreOptionTooltip, children: /* @__PURE__ */ a(ve, { active: t, "aria-label": R == null ? void 0 : R.moreOptionTooltip, children: /* @__PURE__ */ a(lr, {}) }) }) }),
|
|
2781
2793
|
side: "bottom",
|
|
2782
2794
|
avoidCollisions: !1,
|
|
2783
|
-
children: /* @__PURE__ */
|
|
2795
|
+
children: /* @__PURE__ */ H(
|
|
2784
2796
|
"div",
|
|
2785
2797
|
{
|
|
2786
2798
|
style: { maxHeight: `${I}px`, overflow: "auto" },
|
|
2787
|
-
className:
|
|
2799
|
+
className: Ei["rp-other-tool-content"],
|
|
2788
2800
|
"data-rp": "moreOptionsDropdown",
|
|
2789
2801
|
children: [
|
|
2790
|
-
o && /* @__PURE__ */
|
|
2802
|
+
o && /* @__PURE__ */ H(un, { children: [
|
|
2791
2803
|
/* @__PURE__ */ a(dn, {}),
|
|
2792
2804
|
/* @__PURE__ */ a(Un, {}),
|
|
2793
2805
|
/* @__PURE__ */ a(Bn, {}),
|
|
2794
2806
|
/* @__PURE__ */ a(pn, {}),
|
|
2795
2807
|
/* @__PURE__ */ a(ln, {})
|
|
2796
2808
|
] }),
|
|
2797
|
-
/* @__PURE__ */ a(
|
|
2798
|
-
/* @__PURE__ */ a(
|
|
2799
|
-
/* @__PURE__ */ a(
|
|
2800
|
-
/* @__PURE__ */ a(Tr, {}),
|
|
2809
|
+
/* @__PURE__ */ a(Hi, {}),
|
|
2810
|
+
/* @__PURE__ */ a(zo, {}),
|
|
2811
|
+
/* @__PURE__ */ a(Ir, {}),
|
|
2801
2812
|
/* @__PURE__ */ a(Cr, {}),
|
|
2802
|
-
/* @__PURE__ */ a(
|
|
2813
|
+
/* @__PURE__ */ a(Pr, {}),
|
|
2814
|
+
/* @__PURE__ */ a(Tr, {})
|
|
2803
2815
|
]
|
|
2804
2816
|
}
|
|
2805
2817
|
)
|
|
2806
2818
|
}
|
|
2807
2819
|
),
|
|
2808
|
-
/* @__PURE__ */ a(
|
|
2820
|
+
/* @__PURE__ */ a(Li, {})
|
|
2809
2821
|
] });
|
|
2810
|
-
},
|
|
2822
|
+
}, qi = () => {
|
|
2811
2823
|
const { isSmallScreen: t } = Oe();
|
|
2812
|
-
return /* @__PURE__ */
|
|
2813
|
-
/* @__PURE__ */ a(
|
|
2814
|
-
!t && /* @__PURE__ */
|
|
2824
|
+
return /* @__PURE__ */ H(pe, { children: [
|
|
2825
|
+
/* @__PURE__ */ a(cr, {}),
|
|
2826
|
+
!t && /* @__PURE__ */ H(pe, { children: [
|
|
2815
2827
|
/* @__PURE__ */ a(dn, {}),
|
|
2816
2828
|
/* @__PURE__ */ a(Un, {}),
|
|
2817
2829
|
/* @__PURE__ */ a(Bn, {}),
|
|
2818
2830
|
/* @__PURE__ */ a(pn, {})
|
|
2819
2831
|
] }),
|
|
2820
|
-
/* @__PURE__ */ a(
|
|
2832
|
+
/* @__PURE__ */ a($i, {})
|
|
2821
2833
|
] });
|
|
2822
2834
|
}, Jt = () => {
|
|
2823
2835
|
const { totalMatches: t, nextMatch: e, prevMatch: n } = Pt(), { localeMessages: r } = he();
|
|
2824
|
-
return /* @__PURE__ */
|
|
2836
|
+
return /* @__PURE__ */ H(pe, { children: [
|
|
2825
2837
|
/* @__PURE__ */ a(
|
|
2826
2838
|
Q,
|
|
2827
2839
|
{
|
|
@@ -2852,10 +2864,10 @@ const xe = {
|
|
|
2852
2864
|
}
|
|
2853
2865
|
)
|
|
2854
2866
|
] });
|
|
2855
|
-
},
|
|
2867
|
+
}, Gi = () => {
|
|
2856
2868
|
const { searchIcon: t } = Ce(), { searchIcon: e } = be();
|
|
2857
2869
|
return t || e || /* @__PURE__ */ a(fn, {});
|
|
2858
|
-
},
|
|
2870
|
+
}, Ui = ({ icon: t }) => {
|
|
2859
2871
|
const { container: e } = _e(), [n, r] = q(!1), { pdf: o } = oe(), [i, c] = q(null), {
|
|
2860
2872
|
searchOptions: l,
|
|
2861
2873
|
setSearchOptions: d,
|
|
@@ -2901,7 +2913,7 @@ const xe = {
|
|
|
2901
2913
|
h(G.target.value);
|
|
2902
2914
|
}, []), O = E(() => {
|
|
2903
2915
|
h(""), m("");
|
|
2904
|
-
}, [m]), F = W(() => `${p} / ${P}`, [p, P]), { wholeWords:
|
|
2916
|
+
}, [m]), F = W(() => `${p} / ${P}`, [p, P]), { wholeWords: $, matchCase: M } = W(() => l, [l]), j = E(
|
|
2905
2917
|
(G) => {
|
|
2906
2918
|
d((Z) => ({ ...Z, matchCase: G }));
|
|
2907
2919
|
},
|
|
@@ -2954,10 +2966,10 @@ const xe = {
|
|
|
2954
2966
|
active: n,
|
|
2955
2967
|
onClick: I,
|
|
2956
2968
|
"aria-label": u == null ? void 0 : u.searchButtonTooltip,
|
|
2957
|
-
children: t || /* @__PURE__ */ a(
|
|
2969
|
+
children: t || /* @__PURE__ */ a(Gi, {})
|
|
2958
2970
|
}
|
|
2959
2971
|
) }),
|
|
2960
|
-
children: /* @__PURE__ */
|
|
2972
|
+
children: /* @__PURE__ */ H(
|
|
2961
2973
|
"div",
|
|
2962
2974
|
{
|
|
2963
2975
|
ref: w,
|
|
@@ -2965,8 +2977,8 @@ const xe = {
|
|
|
2965
2977
|
tabIndex: 0,
|
|
2966
2978
|
onKeyDown: re,
|
|
2967
2979
|
children: [
|
|
2968
|
-
/* @__PURE__ */
|
|
2969
|
-
/* @__PURE__ */
|
|
2980
|
+
/* @__PURE__ */ H("div", { className: te["rp-search-tool-input-wrapper"], children: [
|
|
2981
|
+
/* @__PURE__ */ H("div", { className: te["rp-search-tool-input"], children: [
|
|
2970
2982
|
/* @__PURE__ */ a(Q, { content: u == null ? void 0 : u.searchInputTooltip, children: /* @__PURE__ */ a(
|
|
2971
2983
|
on,
|
|
2972
2984
|
{
|
|
@@ -2980,13 +2992,13 @@ const xe = {
|
|
|
2980
2992
|
id: "search-input",
|
|
2981
2993
|
name: "search-input",
|
|
2982
2994
|
tabIndex: 0,
|
|
2983
|
-
children: !!g && /* @__PURE__ */ a("span", { className: te["rp-search-tool-input-clear"], onClick: O, children: /* @__PURE__ */ a(
|
|
2995
|
+
children: !!g && /* @__PURE__ */ a("span", { className: te["rp-search-tool-input-clear"], onClick: O, children: /* @__PURE__ */ a(Rr, {}) })
|
|
2984
2996
|
}
|
|
2985
2997
|
) }),
|
|
2986
2998
|
f ? /* @__PURE__ */ a("span", { children: /* @__PURE__ */ a(_t, { className: te["rp-search-loader-icon"] }) }) : /* @__PURE__ */ a("span", { children: F }),
|
|
2987
2999
|
s && /* @__PURE__ */ a("div", { className: te["rp-search-tool-controls"], children: /* @__PURE__ */ a(Ot, { onKeyPress: N, handleClose: x }) })
|
|
2988
3000
|
] }),
|
|
2989
|
-
/* @__PURE__ */
|
|
3001
|
+
/* @__PURE__ */ H("div", { className: te["rp-search-tool-input-checkboxes"], children: [
|
|
2990
3002
|
s && /* @__PURE__ */ a(Jt, {}),
|
|
2991
3003
|
/* @__PURE__ */ a(
|
|
2992
3004
|
Dt,
|
|
@@ -3004,7 +3016,7 @@ const xe = {
|
|
|
3004
3016
|
{
|
|
3005
3017
|
tabIndex: 0,
|
|
3006
3018
|
name: "wholeWord",
|
|
3007
|
-
value:
|
|
3019
|
+
value: $,
|
|
3008
3020
|
onChange: K,
|
|
3009
3021
|
children: u == null ? void 0 : u.searchWholeWordsLabel
|
|
3010
3022
|
}
|
|
@@ -3012,7 +3024,7 @@ const xe = {
|
|
|
3012
3024
|
!s && /* @__PURE__ */ a(Q, { content: u == null ? void 0 : u.searchWholeWordsTooltip, children: /* @__PURE__ */ a("div", { tabIndex: 0, className: te["rp-search-icon-info"], children: /* @__PURE__ */ a(Mt, {}) }) })
|
|
3013
3025
|
] })
|
|
3014
3026
|
] }),
|
|
3015
|
-
!s && /* @__PURE__ */
|
|
3027
|
+
!s && /* @__PURE__ */ H("div", { className: te["rp-search-tool-controls"], children: [
|
|
3016
3028
|
/* @__PURE__ */ a(Jt, {}),
|
|
3017
3029
|
/* @__PURE__ */ a(Ot, { onKeyPress: N, handleClose: x })
|
|
3018
3030
|
] })
|
|
@@ -3021,18 +3033,18 @@ const xe = {
|
|
|
3021
3033
|
)
|
|
3022
3034
|
}
|
|
3023
3035
|
) });
|
|
3024
|
-
},
|
|
3036
|
+
}, Vi = "_loading_wazy2_1", Ae = {
|
|
3025
3037
|
"rp-loading-overlay": "_rp-loading-overlay_wazy2_1",
|
|
3026
3038
|
"rp-loading-modal": "_rp-loading-modal_wazy2_14",
|
|
3027
3039
|
"rp-loading-title": "_rp-loading-title_wazy2_27",
|
|
3028
3040
|
"rp-loading-progress-bar": "_rp-loading-progress-bar_wazy2_35",
|
|
3029
3041
|
"rp-loading-progress": "_rp-loading-progress_wazy2_35",
|
|
3030
3042
|
"rp-loading-cancel-button": "_rp-loading-cancel-button_wazy2_55",
|
|
3031
|
-
loading:
|
|
3032
|
-
},
|
|
3043
|
+
loading: Vi
|
|
3044
|
+
}, ji = ({ percentage: t }) => {
|
|
3033
3045
|
const { cancel: e } = tt(), { localeMessages: n } = he();
|
|
3034
|
-
return t < 1 ? null : /* @__PURE__ */ a("div", { className: se(Ae["rp-loading-overlay"]), children: /* @__PURE__ */
|
|
3035
|
-
/* @__PURE__ */
|
|
3046
|
+
return t < 1 ? null : /* @__PURE__ */ a("div", { className: se(Ae["rp-loading-overlay"]), children: /* @__PURE__ */ H("div", { className: se(Ae["rp-loading-modal"]), children: [
|
|
3047
|
+
/* @__PURE__ */ H("div", { className: se(Ae["rp-loading-title"]), children: [
|
|
3036
3048
|
n == null ? void 0 : n.printLoadingMessage,
|
|
3037
3049
|
"..."
|
|
3038
3050
|
] }),
|
|
@@ -3045,19 +3057,19 @@ const xe = {
|
|
|
3045
3057
|
) }),
|
|
3046
3058
|
/* @__PURE__ */ a("button", { className: se(Ae["rp-loading-cancel-button"]), onClick: e, children: n == null ? void 0 : n.printCancelLabel })
|
|
3047
3059
|
] }) });
|
|
3048
|
-
},
|
|
3060
|
+
}, Bi = et((t, e) => {
|
|
3049
3061
|
const { showPrintProgress: n = !0 } = Te(), { showPrintProgress: r = !0 } = Ne(), { progress: o } = tt(), { isSmallScreen: i } = Oe(), { percentage: c } = o || {}, l = () => i ? { gridTemplateColumns: "25% 60% 15%" } : void 0, d = () => {
|
|
3050
3062
|
if (!(!n || !r || !c))
|
|
3051
|
-
return /* @__PURE__ */ a(
|
|
3063
|
+
return /* @__PURE__ */ a(ji, { percentage: c });
|
|
3052
3064
|
};
|
|
3053
|
-
return /* @__PURE__ */
|
|
3054
|
-
/* @__PURE__ */ a("div", { "data-rp": "topBar", ref: e, className: Me["rp-toolbar-content"], children: /* @__PURE__ */
|
|
3055
|
-
/* @__PURE__ */
|
|
3056
|
-
/* @__PURE__ */ a(
|
|
3057
|
-
/* @__PURE__ */ a(
|
|
3065
|
+
return /* @__PURE__ */ H("div", { children: [
|
|
3066
|
+
/* @__PURE__ */ a("div", { "data-rp": "topBar", ref: e, className: Me["rp-toolbar-content"], children: /* @__PURE__ */ H("div", { className: Me["rp-toolbar-wrapper"], style: l(), children: [
|
|
3067
|
+
/* @__PURE__ */ H("div", { "data-rp": "topBarLeft", className: Me["rp-toolbar-start"], children: [
|
|
3068
|
+
/* @__PURE__ */ a(Ui, {}),
|
|
3069
|
+
/* @__PURE__ */ a(pi, {})
|
|
3058
3070
|
] }),
|
|
3059
|
-
/* @__PURE__ */ a("div", { "data-rp": "topBarCenter", className: Me["rp-toolbar-middle"], children: /* @__PURE__ */ a(
|
|
3060
|
-
/* @__PURE__ */ a("div", { "data-rp": "topBarRight", className: Me["rp-toolbar-end"], children: /* @__PURE__ */ a(
|
|
3071
|
+
/* @__PURE__ */ a("div", { "data-rp": "topBarCenter", className: Me["rp-toolbar-middle"], children: /* @__PURE__ */ a(xr, {}) }),
|
|
3072
|
+
/* @__PURE__ */ a("div", { "data-rp": "topBarRight", className: Me["rp-toolbar-end"], children: /* @__PURE__ */ a(qi, {}) })
|
|
3061
3073
|
] }) }),
|
|
3062
3074
|
/* @__PURE__ */ a(d, {})
|
|
3063
3075
|
] });
|
|
@@ -3071,7 +3083,7 @@ const xe = {
|
|
|
3071
3083
|
"rp-thumbnail": "_rp-thumbnail_3fenb_1",
|
|
3072
3084
|
"rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
|
|
3073
3085
|
"rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
|
|
3074
|
-
},
|
|
3086
|
+
}, Ki = (t) => {
|
|
3075
3087
|
const { pageNumber: e, isFocused: n, viewport: r } = t, { goToPage: o } = le(), { pageRotate: i } = Je(), c = k(null), l = Cn(), { pages: d } = oe(), [f, m] = q(null), P = k(!1), p = k(), v = W(() => n ? ke["rp-thumbnail-active"] : "", [n]), b = W(() => ({
|
|
3076
3088
|
width: Math.round(r.width),
|
|
3077
3089
|
height: Math.round(r.height)
|
|
@@ -3118,7 +3130,7 @@ const xe = {
|
|
|
3118
3130
|
return c.current && y.observe(c.current), () => {
|
|
3119
3131
|
y.disconnect(), l.removeQueue(`thumbnail-${e}`);
|
|
3120
3132
|
};
|
|
3121
|
-
}, [l, e, d, f]), /* @__PURE__ */
|
|
3133
|
+
}, [l, e, d, f]), /* @__PURE__ */ H(
|
|
3122
3134
|
"div",
|
|
3123
3135
|
{
|
|
3124
3136
|
onClick: C,
|
|
@@ -3161,10 +3173,10 @@ const xe = {
|
|
|
3161
3173
|
}, en = {
|
|
3162
3174
|
"rp-thumbnails-container": "_rp-thumbnails-container_16vqr_1",
|
|
3163
3175
|
"rp-thumbnails": "_rp-thumbnails_16vqr_1"
|
|
3164
|
-
},
|
|
3176
|
+
}, Zi = 16, Xi = (t, e) => {
|
|
3165
3177
|
const n = t == null ? void 0 : t.querySelector(`#page-${e}`);
|
|
3166
|
-
t && (n != null && n.offsetTop) && (t.scrollTop = (n == null ? void 0 : n.offsetTop) -
|
|
3167
|
-
},
|
|
3178
|
+
t && (n != null && n.offsetTop) && (t.scrollTop = (n == null ? void 0 : n.offsetTop) - Zi);
|
|
3179
|
+
}, Qi = et((t, e) => {
|
|
3168
3180
|
const { show: n, width: r } = t, { focusedPage: o, totalPages: i } = le(), { thumbnailPages: c, addPage: l, thumbnailLength: d, addToPage: f } = _n(), m = k(null), P = k(1);
|
|
3169
3181
|
tn(e, () => m.current);
|
|
3170
3182
|
const p = W(() => Object.values(c), [c]), v = E(() => {
|
|
@@ -3172,11 +3184,11 @@ const xe = {
|
|
|
3172
3184
|
b <= i && l(b);
|
|
3173
3185
|
}, [l, i, d]);
|
|
3174
3186
|
return D(() => {
|
|
3175
|
-
o > d && i > d ? f(o) : n && P.current !== o && (
|
|
3176
|
-
}, [o, d, f, n, p]),
|
|
3187
|
+
o > d && i > d ? f(o) : n && P.current !== o && (Xi(m.current, o), P.current = o);
|
|
3188
|
+
}, [o, d, f, n, p]), Fo(m.current, v), /* @__PURE__ */ a("div", { ref: m, className: en["rp-thumbnails-container"], style: { width: r }, children: /* @__PURE__ */ a("div", { className: en["rp-thumbnails"], children: n ? p.map((b, C) => {
|
|
3177
3189
|
var T, y;
|
|
3178
3190
|
return /* @__PURE__ */ a(
|
|
3179
|
-
|
|
3191
|
+
Ki,
|
|
3180
3192
|
{
|
|
3181
3193
|
isFocused: o === ((T = b.page) == null ? void 0 : T.pageNumber),
|
|
3182
3194
|
pageNumber: (y = b.page) == null ? void 0 : y.pageNumber,
|
|
@@ -3187,11 +3199,11 @@ const xe = {
|
|
|
3187
3199
|
C
|
|
3188
3200
|
);
|
|
3189
3201
|
}) : null }) });
|
|
3190
|
-
}),
|
|
3202
|
+
}), Yi = () => {
|
|
3191
3203
|
const { thumbnailIcon: t } = Ce(), { thumbnailIcon: e } = be();
|
|
3192
|
-
return t || e || /* @__PURE__ */ a(
|
|
3193
|
-
},
|
|
3194
|
-
const { active: t, setActive: e } = _n(), [n, r] = q(
|
|
3204
|
+
return t || e || /* @__PURE__ */ a(yo, {});
|
|
3205
|
+
}, Ji = () => {
|
|
3206
|
+
const { active: t, setActive: e } = _n(), [n, r] = q(Mo), o = k(null), i = k(null), { thumbnailTool: c, sidebarEnable: l } = Te(), { localeMessages: d } = he(), f = E(() => {
|
|
3195
3207
|
e((P) => !P);
|
|
3196
3208
|
}, []), m = W(() => typeof c != "boolean" && c ? /* @__PURE__ */ a(c, { onClick: f, active: t }) : c ? /* @__PURE__ */ a(Q, { content: d == null ? void 0 : d.thumbnailTooltip, children: /* @__PURE__ */ a(
|
|
3197
3209
|
ve,
|
|
@@ -3199,10 +3211,10 @@ const xe = {
|
|
|
3199
3211
|
onClick: f,
|
|
3200
3212
|
active: t,
|
|
3201
3213
|
"aria-label": d == null ? void 0 : d.thumbnailTooltip,
|
|
3202
|
-
children: /* @__PURE__ */ a(
|
|
3214
|
+
children: /* @__PURE__ */ a(Yi, {})
|
|
3203
3215
|
}
|
|
3204
3216
|
) }) : null, [c, t, f, d]);
|
|
3205
|
-
return /* @__PURE__ */ a(pe, { children: l && /* @__PURE__ */
|
|
3217
|
+
return /* @__PURE__ */ a(pe, { children: l && /* @__PURE__ */ H(
|
|
3206
3218
|
"div",
|
|
3207
3219
|
{
|
|
3208
3220
|
style: { "--rp-thumbnail-width": `${n}px` },
|
|
@@ -3210,16 +3222,16 @@ const xe = {
|
|
|
3210
3222
|
"data-rp": "sidebar",
|
|
3211
3223
|
children: [
|
|
3212
3224
|
/* @__PURE__ */ a("div", { ref: i, className: ht["rp-sidebar-content"], children: m }),
|
|
3213
|
-
/* @__PURE__ */
|
|
3225
|
+
/* @__PURE__ */ H(
|
|
3214
3226
|
"div",
|
|
3215
3227
|
{
|
|
3216
3228
|
"data-rp": "thumbnailSidebar",
|
|
3217
3229
|
hidden: !t,
|
|
3218
3230
|
className: ht["rp-thumbnails-wrapper"],
|
|
3219
3231
|
children: [
|
|
3220
|
-
/* @__PURE__ */ a(
|
|
3232
|
+
/* @__PURE__ */ a(Qi, { show: t, ref: o }),
|
|
3221
3233
|
/* @__PURE__ */ a(
|
|
3222
|
-
|
|
3234
|
+
Ro,
|
|
3223
3235
|
{
|
|
3224
3236
|
onWidthChange: r,
|
|
3225
3237
|
thumbnailRef: o,
|
|
@@ -3232,7 +3244,7 @@ const xe = {
|
|
|
3232
3244
|
]
|
|
3233
3245
|
}
|
|
3234
3246
|
) });
|
|
3235
|
-
},
|
|
3247
|
+
}, ec = oo((t, e) => {
|
|
3236
3248
|
const {
|
|
3237
3249
|
children: n,
|
|
3238
3250
|
slots: r,
|
|
@@ -3247,21 +3259,21 @@ const xe = {
|
|
|
3247
3259
|
return D(() => (d && d(), () => {
|
|
3248
3260
|
f && f();
|
|
3249
3261
|
}), [d, f]), // TODO: deprecated in v2.0.0, remove later ~
|
|
3250
|
-
/* @__PURE__ */ a(In, { toolbarRef: P, ref: e, children: /* @__PURE__ */ a(
|
|
3251
|
-
/* @__PURE__ */
|
|
3252
|
-
/* @__PURE__ */
|
|
3262
|
+
/* @__PURE__ */ a(In, { toolbarRef: P, ref: e, children: /* @__PURE__ */ a(Io, { mobileWidth: l, onLayoutWidthChange: m, children: /* @__PURE__ */ a(xo, { slots: r, children: /* @__PURE__ */ a(Do, { icons: o, children: /* @__PURE__ */ a(Po, { children: /* @__PURE__ */ H(So, { getContainerRef: v, style: i, className: c, children: [
|
|
3263
|
+
/* @__PURE__ */ H(Lo, { children: [
|
|
3264
|
+
/* @__PURE__ */ H("div", { className: we["rp-layout"], children: [
|
|
3253
3265
|
/* @__PURE__ */ a(
|
|
3254
|
-
|
|
3266
|
+
Bi,
|
|
3255
3267
|
{
|
|
3256
3268
|
ref: p
|
|
3257
3269
|
}
|
|
3258
3270
|
),
|
|
3259
|
-
/* @__PURE__ */
|
|
3260
|
-
/* @__PURE__ */ a("div", { className: we["rp-sidebar"], children: /* @__PURE__ */ a(
|
|
3271
|
+
/* @__PURE__ */ H("div", { className: we["rp-content"], children: [
|
|
3272
|
+
/* @__PURE__ */ a("div", { className: we["rp-sidebar"], children: /* @__PURE__ */ a(Ji, {}) }),
|
|
3261
3273
|
/* @__PURE__ */ a("div", { className: we["rp-pages"], children: n })
|
|
3262
3274
|
] })
|
|
3263
3275
|
] }),
|
|
3264
|
-
/* @__PURE__ */ a(
|
|
3276
|
+
/* @__PURE__ */ a(Oo, {})
|
|
3265
3277
|
] }),
|
|
3266
3278
|
b ? /* @__PURE__ */ a(
|
|
3267
3279
|
"div",
|
|
@@ -3292,7 +3304,7 @@ const xe = {
|
|
|
3292
3304
|
}
|
|
3293
3305
|
) : null
|
|
3294
3306
|
] }) }) }) }) }) });
|
|
3295
|
-
}),
|
|
3307
|
+
}), tc = {
|
|
3296
3308
|
"rp-toolbar-layout": "_rp-toolbar-layout_vwobs_1",
|
|
3297
3309
|
"rp-content": "_rp-content_vwobs_7",
|
|
3298
3310
|
"rp-topbar-content": "_rp-topbar-content_vwobs_13",
|
|
@@ -3302,53 +3314,53 @@ const xe = {
|
|
|
3302
3314
|
};
|
|
3303
3315
|
export {
|
|
3304
3316
|
Cn as A,
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3317
|
+
Fr as B,
|
|
3318
|
+
Dr as C,
|
|
3319
|
+
Wr as D,
|
|
3320
|
+
$r as E,
|
|
3309
3321
|
yt as F,
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3322
|
+
oi as G,
|
|
3323
|
+
ai as H,
|
|
3324
|
+
si as I,
|
|
3325
|
+
ci as J,
|
|
3326
|
+
Li as K,
|
|
3315
3327
|
In as L,
|
|
3316
3328
|
Un as M,
|
|
3317
3329
|
Bn as N,
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3330
|
+
Hi as O,
|
|
3331
|
+
js as P,
|
|
3332
|
+
$i as Q,
|
|
3333
|
+
Qs as R,
|
|
3334
|
+
Ui as S,
|
|
3335
|
+
Ks as T,
|
|
3324
3336
|
Jt as U,
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3337
|
+
Bi as V,
|
|
3338
|
+
Ki as W,
|
|
3339
|
+
Ji as X,
|
|
3340
|
+
ec as a,
|
|
3329
3341
|
$n as b,
|
|
3330
3342
|
tt as c,
|
|
3331
3343
|
Pt as d,
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3344
|
+
Zs as e,
|
|
3345
|
+
Xs as f,
|
|
3346
|
+
Bs as g,
|
|
3335
3347
|
_n as h,
|
|
3336
3348
|
pt as i,
|
|
3337
3349
|
Me as j,
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3350
|
+
pi as k,
|
|
3351
|
+
qi as l,
|
|
3352
|
+
tc as m,
|
|
3353
|
+
Qi as n,
|
|
3354
|
+
ji as o,
|
|
3343
3355
|
mn as p,
|
|
3344
|
-
|
|
3356
|
+
Lr as q,
|
|
3345
3357
|
gn as r,
|
|
3346
|
-
|
|
3358
|
+
Er as s,
|
|
3347
3359
|
vn as t,
|
|
3348
3360
|
le as u,
|
|
3349
|
-
|
|
3361
|
+
Nr as v,
|
|
3350
3362
|
wn as w,
|
|
3351
|
-
|
|
3363
|
+
Or as x,
|
|
3352
3364
|
bn as y,
|
|
3353
3365
|
Tn as z
|
|
3354
3366
|
};
|