@pdf-viewer/react 1.4.0 → 1.4.1-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Popover-b7402893.js +1445 -0
- package/dist/{RPDefaultLayout-70dc4200.js → RPDefaultLayout-a5d7b0b8.js} +1115 -1090
- package/dist/assets/Checkbox.css +1 -1
- package/dist/assets/Container.css +1 -1
- package/dist/assets/DropDown.css +1 -1
- package/dist/assets/Input.css +1 -1
- package/dist/assets/Popover.css +1 -1
- package/dist/assets/RPDefaultLayout.css +1 -1
- package/dist/assets/RPTooltip.css +1 -1
- package/dist/component-1da194e8.js +337 -0
- package/dist/components/RPController.js +1 -1
- package/dist/components/RPPages.js +1 -1
- package/dist/components/RPProvider.js +1 -1
- package/dist/components/layout/Container.js +18 -6
- package/dist/components/layout/LayoutContainer.js +31 -0
- package/dist/components/layout/RPDefaultLayout.js +3 -4
- package/dist/components/layout/sidebar/RPSidebar.js +1 -1
- package/dist/components/layout/sidebar/Thumbnail.js +1 -1
- package/dist/components/layout/sidebar/Thumbnails.js +1 -1
- package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
- package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/MenuItem.js +1 -1
- package/dist/components/layout/toolbar/MenuSeparator.js +1 -1
- package/dist/components/layout/toolbar/MostPageTool.js +2 -2
- package/dist/components/layout/toolbar/OtherTool.js +2 -2
- package/dist/components/layout/toolbar/Paginate.js +1 -1
- package/dist/components/layout/toolbar/PrintTool.js +1 -1
- package/dist/components/layout/toolbar/RPToolbar.js +1 -1
- package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
- package/dist/components/layout/toolbar/RotateTool.js +1 -1
- package/dist/components/layout/toolbar/ScrollModeTool.js +1 -1
- package/dist/components/layout/toolbar/SearchTool.js +2 -2
- package/dist/components/layout/toolbar/SelectionModeTool.js +1 -1
- package/dist/components/layout/toolbar/ViewModeTool.js +1 -1
- package/dist/components/layout/toolbar/ZoomTool.js +2 -2
- package/dist/components/page/AnnotationLayer.js +1 -1
- package/dist/components/page/CanvasLayer.js +1 -1
- package/dist/components/page/DualPage.js +1 -1
- package/dist/components/page/RPPage.js +1 -1
- package/dist/components/page/SinglePage.js +1 -1
- package/dist/components/page/TextHighlightLayer.js +1 -1
- package/dist/components/page/TextLayer.js +1 -1
- package/dist/components/ui/Checkbox.js +22 -21
- package/dist/components/ui/DropDown.js +12 -12
- package/dist/components/ui/Input.js +12 -12
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/components/ui/Popover.js +1 -1
- package/dist/components/ui/RPTooltip.js +687 -328
- package/dist/contexts/PaginationContext.js +1 -1
- package/dist/contexts/PrintContext.js +1 -1
- package/dist/contexts/SearchContext.js +1 -1
- package/dist/contexts/ThumbnailsContext.js +1 -1
- package/dist/floating-ui.react-dom-15b9b819.js +1310 -0
- package/dist/index-2e540713.js +23 -0
- package/dist/index-353ec0a6.js +172 -0
- package/dist/index-5ff5dbd0.js +1675 -0
- package/dist/index-71898eb9.js +139 -0
- package/dist/main.js +1 -1
- package/dist/types/components/layout/Container.d.ts +0 -1
- package/dist/types/components/layout/LayoutContainer.d.ts +9 -0
- package/dist/types/utils/types.d.ts +24 -3
- package/dist/utils/hooks/useFileDownload.js +1 -1
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/usePaginate.js +1 -1
- package/dist/utils/hooks/usePrint.js +1 -1
- package/dist/utils/hooks/useScrollToPage.js +1 -1
- package/dist/utils/hooks/useSearch.js +1 -1
- package/dist/utils/hooks/useThumbnail.js +1 -1
- package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
- package/dist/utils/types.js +12 -12
- package/package.json +2 -2
- package/dist/Container-8fea0875.js +0 -39
- package/dist/Popover-5281103c.js +0 -3061
- package/dist/floating-ui.react-dom-88a86594.js +0 -1447
- package/dist/index-48ca3f30.js +0 -307
- package/dist/index-4ba3ab9a.js +0 -1877
|
@@ -1,113 +1,115 @@
|
|
|
1
|
-
import { jsx as i, Fragment as
|
|
2
|
-
import * as
|
|
3
|
-
import { useRef as
|
|
4
|
-
import { ChevronUpIcon as
|
|
1
|
+
import { jsx as i, Fragment as ye, jsxs as z } from "react/jsx-runtime";
|
|
2
|
+
import * as G from "react";
|
|
3
|
+
import { useRef as M, useEffect as O, useCallback as x, useState as $, createContext as Be, useContext as je, useMemo as F, forwardRef as Me, useImperativeHandle as ir, createElement as He, PureComponent as tn, Component as rn, memo as nn } from "react";
|
|
4
|
+
import { ChevronUpIcon as Fe } from "./components/icons/ChevronUpIcon.js";
|
|
5
5
|
import { UIButton as te } from "./components/ui/Button.js";
|
|
6
|
-
import { UIInput as
|
|
6
|
+
import { UIInput as ar } from "./components/ui/Input.js";
|
|
7
7
|
import { useScrollModeContext as Oe } from "./contexts/ScrollModeContext.js";
|
|
8
8
|
import { useDocumentContext as X } from "./contexts/RPDocumentContext.js";
|
|
9
|
-
import "./contexts/DarkModeContext.js";
|
|
10
|
-
import { ViewMode as
|
|
9
|
+
import { useDarkModeContext as on } from "./contexts/DarkModeContext.js";
|
|
10
|
+
import { ViewMode as qe, ScrollMode as K, AnnotationSubType as zt, SelectionMode as an, ZoomLevel as ot } from "./utils/types.js";
|
|
11
11
|
import { useRotationContext as Ke } from "./contexts/RotationContext.js";
|
|
12
|
-
import { useLayerContext as
|
|
12
|
+
import { useLayerContext as sn } from "./contexts/LayerContext.js";
|
|
13
13
|
import { useZoomContext as Xe } from "./contexts/ZoomContext.js";
|
|
14
14
|
import { useViewModeContext as Je } from "./contexts/ViewModeContext.js";
|
|
15
15
|
import { useVirtualScrollContext as Ye } from "./contexts/VirtualScrollContext.js";
|
|
16
|
-
import { useVirtualGridContext as
|
|
16
|
+
import { useVirtualGridContext as sr } from "./contexts/VirtualGridContext.js";
|
|
17
17
|
import { useScrollStateContext as Qe } from "./contexts/ScrollStateContext.js";
|
|
18
|
-
import { useSelectionModeContext as
|
|
19
|
-
import { useInitialStateContext as
|
|
20
|
-
import { useFullScreenContext as
|
|
18
|
+
import { useSelectionModeContext as cn } from "./contexts/SelectionModeContext.js";
|
|
19
|
+
import { useInitialStateContext as ln } from "./contexts/InitialStateContext.js";
|
|
20
|
+
import { useFullScreenContext as dn } from "./contexts/FullScreenContext.js";
|
|
21
21
|
import "./contexts/FileInputContext.js";
|
|
22
22
|
import "./contexts/DropFileZoneContext.js";
|
|
23
23
|
import { renderPage as gt } from "./utils/renderPage.js";
|
|
24
|
-
import { highlightMatches as
|
|
24
|
+
import { highlightMatches as cr, findMatches as un, resetDivs as lr, highlightMultipleColorMatches as pn } from "./utils/highlight.js";
|
|
25
25
|
import * as Ct from "pdfjs-dist";
|
|
26
|
-
import { PixelsPerInch as
|
|
26
|
+
import { PixelsPerInch as hn, AnnotationMode as mn, RenderingCancelledException as fn, AnnotationLayer as gn } from "pdfjs-dist";
|
|
27
27
|
import { useLayoutContainer as xe } from "./contexts/LayoutContainerContext.js";
|
|
28
28
|
import { useDimensionPagesContext as Tt } from "./contexts/DimensionPagesContext.js";
|
|
29
29
|
import { useLocalizationContext as me } from "./contexts/LocalizationContext.js";
|
|
30
|
-
import { useHighlightContext as
|
|
31
|
-
import { useLoaderContext as
|
|
30
|
+
import { useHighlightContext as vn } from "./contexts/HighlightContext.js";
|
|
31
|
+
import { useLoaderContext as dr } from "./contexts/LoaderContext.js";
|
|
32
32
|
import "./components/RPConfig.js";
|
|
33
|
-
import { ThumbnailIcon as
|
|
33
|
+
import { ThumbnailIcon as _n } from "./components/icons/Thumbnail.js";
|
|
34
34
|
import { c as oe } from "./clsx-0c6e471a.js";
|
|
35
35
|
import { LoaderIcon as Pt } from "./components/icons/LoaderIcon.js";
|
|
36
|
-
import { useInfiniteScroll as
|
|
37
|
-
import { RPSplitter as
|
|
38
|
-
import { useToolbarComponentContext as _e, ToolbarComponentProvider as
|
|
39
|
-
import { useIconContext as fe, IconProvider as
|
|
40
|
-
import
|
|
41
|
-
import {
|
|
42
|
-
import { WrapperLayout as
|
|
43
|
-
import { RPDropFileZone as
|
|
44
|
-
import { useViewportContext as Re, ViewportProvider as
|
|
45
|
-
import "./contexts/ThemeContext.js";
|
|
46
|
-
import { SimpleLinkService as
|
|
47
|
-
import { annotationsEvents as
|
|
48
|
-
import { useWatermark as
|
|
49
|
-
import { _ as
|
|
50
|
-
import { useMousePressed as
|
|
51
|
-
import { useGrabScroll as
|
|
52
|
-
import { usePinch as
|
|
36
|
+
import { useInfiniteScroll as wn } from "./utils/hooks/useInfiniteScroll.js";
|
|
37
|
+
import { RPSplitter as bn } from "./components/layout/sidebar/RPSplitter.js";
|
|
38
|
+
import { useToolbarComponentContext as _e, ToolbarComponentProvider as Cn } from "./contexts/ToolbarComponentContext.js";
|
|
39
|
+
import { useIconContext as fe, IconProvider as Tn } from "./contexts/IconContext.js";
|
|
40
|
+
import U from "./components/ui/RPTooltip.js";
|
|
41
|
+
import { Container as Pn } from "./components/layout/Container.js";
|
|
42
|
+
import { WrapperLayout as Sn } from "./components/layout/WrapperLayout.js";
|
|
43
|
+
import { RPDropFileZone as yn } from "./components/RPDropFileZone.js";
|
|
44
|
+
import { useViewportContext as Re, ViewportProvider as In } from "./contexts/ViewportContext.js";
|
|
45
|
+
import { useThemeContext as xn } from "./contexts/ThemeContext.js";
|
|
46
|
+
import { SimpleLinkService as Rn } from "./utils/link_service.js";
|
|
47
|
+
import { annotationsEvents as Ln, annotationEventsHandler as Nn, handleClick as At, handleAnnotationWidget as En, handleAnnotationLink as On, bindLayerEvents as Dn, unbindLayerEvents as kt } from "./utils/annotations.js";
|
|
48
|
+
import { useWatermark as zn } from "./utils/hooks/useWatermark.js";
|
|
49
|
+
import { _ as An, U as kn } from "./Popover-b7402893.js";
|
|
50
|
+
import { useMousePressed as Fn } from "./utils/hooks/useMousePressed.js";
|
|
51
|
+
import { useGrabScroll as Mn } from "./utils/hooks/useGrabScroll.js";
|
|
52
|
+
import { usePinch as Wn } from "./utils/hooks/usePinch.js";
|
|
53
53
|
import { useDebounce as vt } from "./utils/hooks/useDebounce.js";
|
|
54
|
-
import { getThumbnailViewport as
|
|
55
|
-
import { smoothScrollTo as
|
|
56
|
-
import { appConsole as
|
|
57
|
-
import { FileUploadTool as
|
|
58
|
-
import { DarkModeTool as
|
|
59
|
-
import { ThreeDotIcon as
|
|
60
|
-
import { UIDropDown as
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import { a as
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
54
|
+
import { getThumbnailViewport as Ft } from "./utils/getThumbnailViewport.js";
|
|
55
|
+
import { smoothScrollTo as Mt } from "./utils/smoothScrollTo.js";
|
|
56
|
+
import { appConsole as Hn } from "./utils/appConsole.js";
|
|
57
|
+
import { FileUploadTool as ur } from "./components/layout/toolbar/FileUploadTool.js";
|
|
58
|
+
import { DarkModeTool as $n } from "./components/layout/toolbar/DarkModeTool.js";
|
|
59
|
+
import { ThreeDotIcon as Vn } from "./components/icons/ThreeDotIcon.js";
|
|
60
|
+
import { UIDropDown as pr } from "./components/ui/DropDown.js";
|
|
61
|
+
import { u as St, P as We, c as ke, a as yt, S as Gn } from "./index-353ec0a6.js";
|
|
62
|
+
import { c as qn, e as Un, b as Zn } from "./index-71898eb9.js";
|
|
63
|
+
import { a as it } from "./index-2e540713.js";
|
|
64
|
+
import { a as Bn, u as jn, F as Kn, D as Xn, b as Jn, G as Ue } from "./index-5ff5dbd0.js";
|
|
65
|
+
import { h as Yn } from "./component-1da194e8.js";
|
|
66
|
+
import { CloseIcon as hr } from "./components/icons/CloseIcon.js";
|
|
67
|
+
import { dateFormatter as Wt } from "./utils/dateFormatter.js";
|
|
68
|
+
import { PropertyItem as Qn } from "./components/layout/toolbar/PropertyItem.js";
|
|
69
|
+
import { useOtherToolContext as eo, OtherToolProvider as to } from "./contexts/OtherToolContext.js";
|
|
70
|
+
import { DocumentProperties as ro } from "./components/layout/toolbar/DocumentProperties.js";
|
|
71
|
+
import { RotateTool as no } from "./components/layout/toolbar/RotateTool.js";
|
|
72
|
+
import { ScrollModeTool as oo } from "./components/layout/toolbar/ScrollModeTool.js";
|
|
73
|
+
import { MenuSeparator as It } from "./components/layout/toolbar/MenuSeparator.js";
|
|
74
|
+
import { FileDownloadDefaultIcon as io } from "./components/icons/FileDownloadDefaultIcon.js";
|
|
75
|
+
import { MenuItem as be } from "./components/layout/toolbar/MenuItem.js";
|
|
76
|
+
import { PrintDefaultTool as ao } from "./components/icons/PrintDefaultIcon.js";
|
|
77
|
+
import { FullScreenTool as mr } from "./components/layout/toolbar/FullScreenTool.js";
|
|
78
|
+
import { GoToDownIcon as fr } from "./components/icons/GoToDownIcon.js";
|
|
79
|
+
import { SelectionModeTool as so } from "./components/layout/toolbar/SelectionModeTool.js";
|
|
80
|
+
import { ZoomInIcon as co } from "./components/icons/ZoomInIcon.js";
|
|
81
|
+
import { ZoomOutIcon as lo } from "./components/icons/ZoomOutIcon.js";
|
|
80
82
|
import { PAGE_PADDING as Ht } from "./utils/constants.js";
|
|
81
|
-
import { getZoomLevel as
|
|
82
|
-
import { SearchIcon as
|
|
83
|
+
import { getZoomLevel as uo } from "./utils/getZoomLevel.js";
|
|
84
|
+
import { SearchIcon as po } from "./components/icons/SearchIcon.js";
|
|
83
85
|
import { UICheckbox as $t } from "./components/ui/Checkbox.js";
|
|
84
|
-
import { ClearIcon as
|
|
85
|
-
import { InfoIcon as
|
|
86
|
-
import './assets/RPDefaultLayout.css';const
|
|
87
|
-
const { viewMode: t } = Je(), { scrollMode: e } = Oe(), { virtualScrollRef:
|
|
86
|
+
import { ClearIcon as ho } from "./components/icons/ClearIcon.js";
|
|
87
|
+
import { InfoIcon as Vt } from "./components/icons/InfoIcon.js";
|
|
88
|
+
import './assets/RPDefaultLayout.css';const gr = () => {
|
|
89
|
+
const { viewMode: t } = Je(), { scrollMode: e } = Oe(), { virtualScrollRef: r, virtualScrollableElementRef: o, pageScrollElementRef: n } = Ye(), { setFocusedPage: a } = ce(), c = M(), { columnCount: s } = sr(), { widths: l, heights: d } = Tt(), u = M(e), f = M(t), h = M(s);
|
|
88
90
|
O(() => {
|
|
89
|
-
|
|
90
|
-
}, [
|
|
91
|
+
r != null && r.scrollToItem && (c.current = r);
|
|
92
|
+
}, [r]), O(() => {
|
|
91
93
|
u.current = e, f.current = t;
|
|
92
94
|
}, [e, t]);
|
|
93
95
|
const g = x(
|
|
94
96
|
(b) => {
|
|
95
|
-
if (!
|
|
97
|
+
if (!n)
|
|
96
98
|
return;
|
|
97
99
|
const v = Math.ceil(b / 2) * 2 - 1;
|
|
98
100
|
return b === v + 1 ? new Promise((_) => {
|
|
99
|
-
|
|
100
|
-
left:
|
|
101
|
+
n.scrollTo({
|
|
102
|
+
left: l[v],
|
|
101
103
|
top: 0
|
|
102
104
|
}), _();
|
|
103
105
|
}) : new Promise((_) => {
|
|
104
|
-
|
|
106
|
+
n.scrollTo({
|
|
105
107
|
left: 0,
|
|
106
108
|
top: 0
|
|
107
109
|
}), _();
|
|
108
110
|
});
|
|
109
111
|
},
|
|
110
|
-
[
|
|
112
|
+
[n, l, Mt]
|
|
111
113
|
);
|
|
112
114
|
return O(() => {
|
|
113
115
|
u.current = e, f.current = t;
|
|
@@ -117,7 +119,7 @@ import './assets/RPDefaultLayout.css';const vn = () => {
|
|
|
117
119
|
(b) => {
|
|
118
120
|
const v = b - 1;
|
|
119
121
|
let _ = v, m = 0;
|
|
120
|
-
if (f.current ===
|
|
122
|
+
if (f.current === qe.DUAL_PAGE && u.current === K.PAGE_SCROLLING)
|
|
121
123
|
return g(b), Promise.resolve();
|
|
122
124
|
if (u.current === K.PAGE_SCROLLING)
|
|
123
125
|
return a(b), Promise.resolve();
|
|
@@ -126,7 +128,7 @@ import './assets/RPDefaultLayout.css';const vn = () => {
|
|
|
126
128
|
const T = o;
|
|
127
129
|
if (u.current === K.HORIZONTAL_SCROLLING) {
|
|
128
130
|
m = v;
|
|
129
|
-
const p = v * (
|
|
131
|
+
const p = v * (l[v] ?? 0);
|
|
130
132
|
return new Promise((P) => {
|
|
131
133
|
T.scrollTo({
|
|
132
134
|
left: p,
|
|
@@ -134,9 +136,9 @@ import './assets/RPDefaultLayout.css';const vn = () => {
|
|
|
134
136
|
}), P();
|
|
135
137
|
});
|
|
136
138
|
}
|
|
137
|
-
if (f.current ===
|
|
139
|
+
if (f.current === qe.DUAL_PAGE) {
|
|
138
140
|
m = v % 2, _ = Math.floor(v / 2);
|
|
139
|
-
const P = _ * (
|
|
141
|
+
const P = _ * (d[_] ?? 0), C = m * (l[m] ?? 0);
|
|
140
142
|
return new Promise((S) => {
|
|
141
143
|
T.scrollTo({
|
|
142
144
|
left: C,
|
|
@@ -144,11 +146,11 @@ import './assets/RPDefaultLayout.css';const vn = () => {
|
|
|
144
146
|
}), S();
|
|
145
147
|
});
|
|
146
148
|
}
|
|
147
|
-
const
|
|
149
|
+
const y = _ * (d[_] ?? 0);
|
|
148
150
|
return new Promise(
|
|
149
151
|
(p) => {
|
|
150
152
|
T.scrollTo({
|
|
151
|
-
top:
|
|
153
|
+
top: y,
|
|
152
154
|
left: 0
|
|
153
155
|
}), p();
|
|
154
156
|
}
|
|
@@ -160,18 +162,18 @@ import './assets/RPDefaultLayout.css';const vn = () => {
|
|
|
160
162
|
s,
|
|
161
163
|
g,
|
|
162
164
|
a,
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
165
|
+
Mt,
|
|
166
|
+
d,
|
|
167
|
+
l
|
|
166
168
|
]
|
|
167
169
|
) };
|
|
168
|
-
},
|
|
169
|
-
const [e,
|
|
170
|
+
}, mo = (t = 1) => {
|
|
171
|
+
const [e, r] = $(t), [o, n] = $(0), { scrollToPage: a } = gr(), c = M(1), { isScrolling: s } = Qe(), { viewMode: l } = Je(), { scrollMode: d } = Oe(), u = vt(e, 100), f = x(
|
|
170
172
|
(v) => {
|
|
171
173
|
if (!/^[0-9]*$/g.test(v.toString()) || !v)
|
|
172
174
|
return { success: !1, currentPage: c.current };
|
|
173
175
|
const m = +v;
|
|
174
|
-
return m < 0 || m > o ? { success: !1, currentPage: c.current } : (
|
|
176
|
+
return m < 0 || m > o ? { success: !1, currentPage: c.current } : (r(m), c.current = m, { success: !0, currentPage: +v });
|
|
175
177
|
},
|
|
176
178
|
[o]
|
|
177
179
|
), h = x(f, [f]), g = x(
|
|
@@ -185,20 +187,20 @@ import './assets/RPDefaultLayout.css';const vn = () => {
|
|
|
185
187
|
), w = x(() => {
|
|
186
188
|
let v = e - 1;
|
|
187
189
|
g(v);
|
|
188
|
-
}, [g, e,
|
|
190
|
+
}, [g, e, l, d]), b = x(() => {
|
|
189
191
|
let v = e + 1;
|
|
190
192
|
g(v);
|
|
191
|
-
}, [g, e,
|
|
193
|
+
}, [g, e, l, d]);
|
|
192
194
|
return {
|
|
193
195
|
focusedPage: u,
|
|
194
196
|
totalPages: o,
|
|
195
197
|
setFocusedPage: h,
|
|
196
|
-
setTotalPages:
|
|
198
|
+
setTotalPages: n,
|
|
197
199
|
nextPage: b,
|
|
198
200
|
prevPage: w,
|
|
199
201
|
goToPage: g
|
|
200
202
|
};
|
|
201
|
-
},
|
|
203
|
+
}, vr = Be({
|
|
202
204
|
focusedPage: 0,
|
|
203
205
|
setFocusedPage: (t) => {
|
|
204
206
|
},
|
|
@@ -211,34 +213,34 @@ import './assets/RPDefaultLayout.css';const vn = () => {
|
|
|
211
213
|
nextPage: () => {
|
|
212
214
|
}
|
|
213
215
|
}), ce = () => {
|
|
214
|
-
const t = je(
|
|
215
|
-
return typeof (t == null ? void 0 : t.focusedPage) > "u" &&
|
|
216
|
-
},
|
|
217
|
-
const { pdf: e } = X(), { focusedPage:
|
|
216
|
+
const t = je(vr);
|
|
217
|
+
return typeof (t == null ? void 0 : t.focusedPage) > "u" && Hn.error("Please use this hooks inside children component of RPProvider"), t;
|
|
218
|
+
}, ws = ({ children: t }) => {
|
|
219
|
+
const { pdf: e } = X(), { focusedPage: r, totalPages: o, setFocusedPage: n, setTotalPages: a, goToPage: c, nextPage: s, prevPage: l } = mo();
|
|
218
220
|
return O(() => {
|
|
219
|
-
e != null && e.numPages && (a(e.numPages),
|
|
220
|
-
}, [e, a,
|
|
221
|
-
|
|
221
|
+
e != null && e.numPages && (a(e.numPages), n(1));
|
|
222
|
+
}, [e, a, n]), /* @__PURE__ */ i(
|
|
223
|
+
vr.Provider,
|
|
222
224
|
{
|
|
223
225
|
value: {
|
|
224
|
-
focusedPage:
|
|
226
|
+
focusedPage: r,
|
|
225
227
|
totalPages: o,
|
|
226
|
-
setFocusedPage:
|
|
228
|
+
setFocusedPage: n,
|
|
227
229
|
setTotalPages: a,
|
|
228
230
|
nextPage: s,
|
|
229
|
-
prevPage:
|
|
231
|
+
prevPage: l,
|
|
230
232
|
goToPage: c
|
|
231
233
|
},
|
|
232
234
|
children: t
|
|
233
235
|
}
|
|
234
236
|
);
|
|
235
237
|
};
|
|
236
|
-
const
|
|
237
|
-
const { pdf: t, pages: e } = X(), [
|
|
238
|
+
const fo = () => {
|
|
239
|
+
const { pdf: t, pages: e } = X(), [r, o] = $({
|
|
238
240
|
loadedPages: 0,
|
|
239
241
|
totalPages: 0,
|
|
240
242
|
percentage: 0
|
|
241
|
-
}), [
|
|
243
|
+
}), [n, a] = $(!1), [c, s] = $(!1), [l, d] = $(null), u = M(!1);
|
|
242
244
|
O(() => {
|
|
243
245
|
u.current;
|
|
244
246
|
}, [u]);
|
|
@@ -247,7 +249,7 @@ const ho = () => {
|
|
|
247
249
|
const T = document.querySelector(".rp-print-zone");
|
|
248
250
|
T && T.remove();
|
|
249
251
|
}, []), h = x(() => {
|
|
250
|
-
u.current = !1, a(!1), s(!1),
|
|
252
|
+
u.current = !1, a(!1), s(!1), d(null), o({
|
|
251
253
|
loadedPages: 0,
|
|
252
254
|
totalPages: 0,
|
|
253
255
|
percentage: 0
|
|
@@ -256,7 +258,7 @@ const ho = () => {
|
|
|
256
258
|
u.current = !0;
|
|
257
259
|
}, w = async ({
|
|
258
260
|
scratchCanvas: T,
|
|
259
|
-
pdfDocument:
|
|
261
|
+
pdfDocument: y,
|
|
260
262
|
pageNumber: p,
|
|
261
263
|
viewerPdfPage: P,
|
|
262
264
|
printResolution: C,
|
|
@@ -267,12 +269,12 @@ const ho = () => {
|
|
|
267
269
|
h();
|
|
268
270
|
return;
|
|
269
271
|
}
|
|
270
|
-
const R = C /
|
|
272
|
+
const R = C / hn.PDF;
|
|
271
273
|
T.width = Math.floor(P.width * R), T.height = Math.floor(P.height * R);
|
|
272
274
|
const D = T.getContext("2d");
|
|
273
275
|
D.save(), D.fillStyle = "rgb(255, 255, 255)", D.fillRect(0, 0, T.width, T.height), D.restore();
|
|
274
|
-
const [L,
|
|
275
|
-
|
|
276
|
+
const [L, k] = await Promise.all([
|
|
277
|
+
y.getPage(p),
|
|
276
278
|
A
|
|
277
279
|
]);
|
|
278
280
|
if (u.current) {
|
|
@@ -284,46 +286,46 @@ const ho = () => {
|
|
|
284
286
|
transform: [R, 0, 0, R, 0, 0],
|
|
285
287
|
viewport: L.getViewport({ scale: 1, rotation: P.rotation }),
|
|
286
288
|
intent: "print",
|
|
287
|
-
annotationMode:
|
|
289
|
+
annotationMode: mn.ENABLE_STORAGE,
|
|
288
290
|
optionalContentConfigPromise: S,
|
|
289
|
-
printAnnotationStorage:
|
|
291
|
+
printAnnotationStorage: k
|
|
290
292
|
};
|
|
291
293
|
try {
|
|
292
294
|
return L.render(E).promise;
|
|
293
|
-
} catch (
|
|
294
|
-
throw
|
|
295
|
+
} catch (I) {
|
|
296
|
+
throw I instanceof fn || console.error(I), I;
|
|
295
297
|
}
|
|
296
298
|
}, b = x(() => {
|
|
297
299
|
const T = window.print;
|
|
298
|
-
return new Promise((
|
|
300
|
+
return new Promise((y) => {
|
|
299
301
|
const p = (S) => {
|
|
300
302
|
setTimeout(() => {
|
|
301
303
|
T.call(window), setTimeout(() => S(), 20);
|
|
302
304
|
}, 0);
|
|
303
305
|
};
|
|
304
306
|
if (document.querySelector(".rp-print-zone")) {
|
|
305
|
-
p(
|
|
307
|
+
p(y);
|
|
306
308
|
return;
|
|
307
309
|
}
|
|
308
310
|
const C = new MutationObserver(() => {
|
|
309
|
-
document.querySelector(".rp-print-zone") && (p(
|
|
311
|
+
document.querySelector(".rp-print-zone") && (p(y), C.disconnect());
|
|
310
312
|
});
|
|
311
313
|
C.observe(document.body, { childList: !0, subtree: !0 });
|
|
312
314
|
});
|
|
313
315
|
}, []), v = async (T) => {
|
|
314
|
-
const
|
|
316
|
+
const y = document.createElement("img"), p = document.createElement("div");
|
|
315
317
|
return p.classList.add("rp-print-page"), await new Promise((P, C) => {
|
|
316
318
|
T.toBlob((S) => {
|
|
317
|
-
S ? (
|
|
318
|
-
URL.revokeObjectURL(
|
|
319
|
-
},
|
|
319
|
+
S ? (y.src = URL.createObjectURL(S), y.onload = () => {
|
|
320
|
+
URL.revokeObjectURL(y.src), P();
|
|
321
|
+
}, y.onerror = C) : C(new Error("Failed to create blob"));
|
|
320
322
|
});
|
|
321
323
|
}).catch(() => {
|
|
322
|
-
}), p.appendChild(
|
|
323
|
-
}, _ = (T,
|
|
324
|
+
}), p.appendChild(y), p;
|
|
325
|
+
}, _ = (T, y) => {
|
|
324
326
|
const p = document.createElement("div");
|
|
325
327
|
p.classList.add("rp-print-zone");
|
|
326
|
-
const P = document.createElement("style"), C =
|
|
328
|
+
const P = document.createElement("style"), C = y.get(1);
|
|
327
329
|
if (C) {
|
|
328
330
|
const { width: S, height: A } = C == null ? void 0 : C.page.getViewport({ scale: 1 });
|
|
329
331
|
P.innerHTML = `@page { size: ${S}px ${A}px }`;
|
|
@@ -333,7 +335,7 @@ const ho = () => {
|
|
|
333
335
|
if (!t)
|
|
334
336
|
return;
|
|
335
337
|
h();
|
|
336
|
-
const T = document.createElement("canvas"),
|
|
338
|
+
const T = document.createElement("canvas"), y = [];
|
|
337
339
|
try {
|
|
338
340
|
t.isPureXfa && console.warn("[rp] XFA Form is not supported at the moment.");
|
|
339
341
|
const P = t.getOptionalContentConfig({ intent: "print" }), C = Promise.resolve(
|
|
@@ -357,9 +359,9 @@ const ho = () => {
|
|
|
357
359
|
h();
|
|
358
360
|
return;
|
|
359
361
|
}
|
|
360
|
-
const
|
|
361
|
-
|
|
362
|
-
const E = parseFloat((
|
|
362
|
+
const k = await v(T);
|
|
363
|
+
y.push(k);
|
|
364
|
+
const E = parseFloat((y.length / S * 100).toFixed(2));
|
|
363
365
|
o({
|
|
364
366
|
loadedPages: R,
|
|
365
367
|
totalPages: S,
|
|
@@ -370,10 +372,10 @@ const ho = () => {
|
|
|
370
372
|
h();
|
|
371
373
|
return;
|
|
372
374
|
}
|
|
373
|
-
const A = _(
|
|
375
|
+
const A = _(y, e);
|
|
374
376
|
document.body.appendChild(A), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), a(!0), await b();
|
|
375
377
|
} catch (p) {
|
|
376
|
-
s(!0), p instanceof Error &&
|
|
378
|
+
s(!0), p instanceof Error && d(p);
|
|
377
379
|
} finally {
|
|
378
380
|
T.height = 0, T.width = 0;
|
|
379
381
|
}
|
|
@@ -388,12 +390,12 @@ const ho = () => {
|
|
|
388
390
|
}, [f, h]), {
|
|
389
391
|
print: m,
|
|
390
392
|
cancel: g,
|
|
391
|
-
progress:
|
|
392
|
-
isComplete:
|
|
393
|
+
progress: r,
|
|
394
|
+
isComplete: n,
|
|
393
395
|
isError: c,
|
|
394
|
-
error:
|
|
396
|
+
error: l
|
|
395
397
|
};
|
|
396
|
-
},
|
|
398
|
+
}, _r = Be({
|
|
397
399
|
print: () => {
|
|
398
400
|
},
|
|
399
401
|
cancel: () => {
|
|
@@ -410,28 +412,28 @@ const ho = () => {
|
|
|
410
412
|
console.error("Error in setOnError callback:", e);
|
|
411
413
|
}
|
|
412
414
|
}
|
|
413
|
-
}),
|
|
414
|
-
const [e,
|
|
415
|
-
v && typeof v == "function" &&
|
|
415
|
+
}), bs = ({ children: t }) => {
|
|
416
|
+
const [e, r] = $(null), [o, n] = $(null), { print: a, cancel: c, progress: s, isComplete: l, isError: d, error: u } = fo(), f = x((v) => {
|
|
417
|
+
v && typeof v == "function" && n(() => v);
|
|
416
418
|
}, []), h = (v) => {
|
|
417
419
|
u && v(u);
|
|
418
420
|
}, g = x(
|
|
419
421
|
(v) => {
|
|
420
|
-
|
|
422
|
+
r(() => v);
|
|
421
423
|
},
|
|
422
424
|
[s, e]
|
|
423
425
|
);
|
|
424
426
|
O(() => {
|
|
425
|
-
|
|
426
|
-
}, [
|
|
427
|
-
|
|
427
|
+
l && o && w();
|
|
428
|
+
}, [l, o]), O(() => {
|
|
429
|
+
d && h((v) => {
|
|
428
430
|
console.error(v);
|
|
429
431
|
});
|
|
430
|
-
}, [
|
|
432
|
+
}, [d]), O(() => {
|
|
431
433
|
s && e && e(s);
|
|
432
434
|
}, [s, e]);
|
|
433
435
|
const w = () => {
|
|
434
|
-
o && (o(),
|
|
436
|
+
o && (o(), n(null));
|
|
435
437
|
}, b = {
|
|
436
438
|
print: a,
|
|
437
439
|
cancel: c,
|
|
@@ -440,29 +442,29 @@ const ho = () => {
|
|
|
440
442
|
setOnError: h,
|
|
441
443
|
progress: s
|
|
442
444
|
};
|
|
443
|
-
return /* @__PURE__ */ i(
|
|
445
|
+
return /* @__PURE__ */ i(_r.Provider, { value: b, children: t });
|
|
444
446
|
}, et = () => {
|
|
445
|
-
const t = je(
|
|
447
|
+
const t = je(_r);
|
|
446
448
|
if (!t)
|
|
447
449
|
throw new Error("usePrintContext must be used within a PrintProvider");
|
|
448
450
|
return t;
|
|
449
|
-
},
|
|
450
|
-
const [t, e] = $({}), { pages:
|
|
451
|
+
}, go = () => {
|
|
452
|
+
const [t, e] = $({}), { pages: r } = X(), { rotate: o } = Ke(), n = F(() => Object.keys(t).length, [t]), a = x(
|
|
451
453
|
(s) => {
|
|
452
|
-
if (!
|
|
454
|
+
if (!r.size)
|
|
453
455
|
return;
|
|
454
|
-
const
|
|
455
|
-
const { thumbnailViewport: h, scale: g } =
|
|
456
|
+
const l = Array.from(r.values()).slice(0, s).map((f) => {
|
|
457
|
+
const { thumbnailViewport: h, scale: g } = Ft(f.page, o);
|
|
456
458
|
return {
|
|
457
459
|
scale: g,
|
|
458
460
|
page: f.page,
|
|
459
461
|
loading: !0,
|
|
460
462
|
viewport: h
|
|
461
463
|
};
|
|
462
|
-
}),
|
|
463
|
-
e(
|
|
464
|
+
}), d = l.reduce((f, h) => (f[h.page.pageNumber] = h, f), {});
|
|
465
|
+
e(d);
|
|
464
466
|
const u = [];
|
|
465
|
-
for (const f of
|
|
467
|
+
for (const f of l) {
|
|
466
468
|
const h = document.createElement("canvas"), g = gt(f.page, h, {
|
|
467
469
|
scale: f.scale,
|
|
468
470
|
rotate: o
|
|
@@ -485,34 +487,34 @@ const ho = () => {
|
|
|
485
487
|
}).catch(() => {
|
|
486
488
|
});
|
|
487
489
|
},
|
|
488
|
-
[
|
|
490
|
+
[r, o]
|
|
489
491
|
);
|
|
490
492
|
O(() => {
|
|
491
493
|
a(10);
|
|
492
494
|
}, [a]);
|
|
493
495
|
const c = x(
|
|
494
496
|
(s) => {
|
|
495
|
-
if (!
|
|
497
|
+
if (!r)
|
|
496
498
|
return;
|
|
497
|
-
const
|
|
498
|
-
if (!
|
|
499
|
+
const l = r.get(s);
|
|
500
|
+
if (!l)
|
|
499
501
|
return;
|
|
500
502
|
e((u) => ({
|
|
501
503
|
...u,
|
|
502
504
|
[s]: {
|
|
503
505
|
loading: !0,
|
|
504
|
-
page:
|
|
505
|
-
viewport:
|
|
506
|
-
scale:
|
|
506
|
+
page: l.page,
|
|
507
|
+
viewport: l.thumbnailViewport,
|
|
508
|
+
scale: l.thumbnailScale
|
|
507
509
|
}
|
|
508
510
|
}));
|
|
509
|
-
const
|
|
510
|
-
gt(
|
|
511
|
-
const u =
|
|
511
|
+
const d = document.createElement("canvas");
|
|
512
|
+
gt(l.page, d, { scale: l.thumbnailScale, rotate: o }).promise.then(() => {
|
|
513
|
+
const u = d.toDataURL(), { thumbnailViewport: f, scale: h } = Ft(l.page, o);
|
|
512
514
|
return {
|
|
513
515
|
scale: h,
|
|
514
516
|
thumbnailSrc: u,
|
|
515
|
-
page:
|
|
517
|
+
page: l.page,
|
|
516
518
|
loading: !1,
|
|
517
519
|
viewport: f
|
|
518
520
|
};
|
|
@@ -520,10 +522,10 @@ const ho = () => {
|
|
|
520
522
|
e((f) => ({ ...f, [s]: u }));
|
|
521
523
|
});
|
|
522
524
|
},
|
|
523
|
-
[
|
|
525
|
+
[r, o]
|
|
524
526
|
);
|
|
525
|
-
return { thumbnailPages: t, addPage: c, addToPage: a, thumbnailLength:
|
|
526
|
-
},
|
|
527
|
+
return { thumbnailPages: t, addPage: c, addToPage: a, thumbnailLength: n };
|
|
528
|
+
}, wr = Be({
|
|
527
529
|
thumbnailPages: {},
|
|
528
530
|
addPage: (t) => {
|
|
529
531
|
},
|
|
@@ -533,52 +535,52 @@ const ho = () => {
|
|
|
533
535
|
setActive: (t) => {
|
|
534
536
|
},
|
|
535
537
|
active: !1
|
|
536
|
-
}),
|
|
538
|
+
}), br = () => je(wr), Cs = ({
|
|
537
539
|
children: t,
|
|
538
540
|
initialThumbnailsVisible: e
|
|
539
541
|
}) => {
|
|
540
|
-
const { thumbnailPages:
|
|
542
|
+
const { thumbnailPages: r, addPage: o, addToPage: n, thumbnailLength: a } = go(), [c, s] = $(e);
|
|
541
543
|
return /* @__PURE__ */ i(
|
|
542
|
-
|
|
544
|
+
wr.Provider,
|
|
543
545
|
{
|
|
544
|
-
value: { thumbnailPages:
|
|
546
|
+
value: { thumbnailPages: r, addPage: o, addToPage: n, thumbnailLength: a, active: c, setActive: s },
|
|
545
547
|
children: t
|
|
546
548
|
}
|
|
547
549
|
);
|
|
548
|
-
},
|
|
549
|
-
const [
|
|
550
|
+
}, vo = (t = {}, e = "") => {
|
|
551
|
+
const [r, o] = $(e), [n, a] = $(!1), { pdf: c, pages: s } = X(), l = Tt(), d = M(!r), { currentZoom: u } = Xe(), [f, h] = $([]), { setFocusedPage: g } = ce(), [w, b] = $(0), { pageScrollElementRef: v, virtualScrollableElementRef: _ } = Ye(), { scrollMode: m } = Oe(), { pagesRef: T } = xe(), [y, p] = $(null), P = M({}), C = F(() => w === 0 ? null : f[w - 1], [w, f]), S = F(() => f.length, [f]);
|
|
550
552
|
O(() => {
|
|
551
553
|
if (!C || !s)
|
|
552
554
|
return;
|
|
553
555
|
const L = _ || v;
|
|
554
556
|
if (!L || !T)
|
|
555
557
|
return;
|
|
556
|
-
const
|
|
557
|
-
let N = 0,
|
|
558
|
-
m === K.PAGE_SCROLLING && g(C.page), m === K.VERTICAL_SCROLLING && (N =
|
|
559
|
-
let
|
|
560
|
-
if (!
|
|
558
|
+
const k = s.get(C.page), E = T.clientHeight / 2, I = T.clientWidth / 2;
|
|
559
|
+
let N = 0, V = 0;
|
|
560
|
+
m === K.PAGE_SCROLLING && g(C.page), m === K.VERTICAL_SCROLLING && (N = l.heights.slice(0, C.page - 1).reduce((B, J) => B + J, 0)), m === K.HORIZONTAL_SCROLLING && (V = l.widths.slice(0, C.page - 1).reduce((B, J) => B + J, 0));
|
|
561
|
+
let q;
|
|
562
|
+
if (!k)
|
|
561
563
|
return;
|
|
562
|
-
const Z = P.current[C.page], ee =
|
|
563
|
-
|
|
564
|
+
const Z = P.current[C.page], ee = k.page.getViewport({ scale: 1 });
|
|
565
|
+
q = new Ct.TextLayer({
|
|
564
566
|
viewport: ee,
|
|
565
567
|
textContentSource: Z,
|
|
566
568
|
container: document.createElement("div")
|
|
567
|
-
}),
|
|
568
|
-
const
|
|
569
|
-
|
|
570
|
-
const de = J.element.getBoundingClientRect(),
|
|
569
|
+
}), q.render().then(() => {
|
|
570
|
+
const B = q.textDivs[C.start.idx], [J] = cr([C], Z, q.textDivs), ae = l.widths[C.page - 1], re = l.heights[C.page - 1], j = document.createElement("div"), Y = document.createElement("div");
|
|
571
|
+
B.style.position = "absolute", B.style.color = "transparent", Y.style.position = "absolute", Y.style.top = "0", Y.style.setProperty("--scale-factor", `${u}`), j.style.position = "relative", j.style.width = `${ae}px`, j.style.height = `${re}px`, j.style.zIndex = "-1", j.appendChild(B), Y.appendChild(j), T.prepend(Y);
|
|
572
|
+
const de = J.element.getBoundingClientRect(), Ce = Y.getBoundingClientRect(), De = de.top - Ce.top, ue = de.left - Ce.left, pe = N + De - E + de.height / 2, ge = V + ue - I + de.width / 2, Te = {
|
|
571
573
|
left: Math.max(ge, 0),
|
|
572
574
|
top: Math.max(pe, 0)
|
|
573
575
|
};
|
|
574
576
|
T.removeChild(Y), L.scrollTo({
|
|
575
|
-
...
|
|
577
|
+
...Te
|
|
576
578
|
});
|
|
577
579
|
});
|
|
578
580
|
}, [
|
|
579
581
|
s,
|
|
580
582
|
g,
|
|
581
|
-
|
|
583
|
+
l,
|
|
582
584
|
C,
|
|
583
585
|
m,
|
|
584
586
|
_,
|
|
@@ -592,49 +594,49 @@ const ho = () => {
|
|
|
592
594
|
}, [S]), D = x(async (L) => {
|
|
593
595
|
if (!L)
|
|
594
596
|
return {};
|
|
595
|
-
const
|
|
596
|
-
for (let
|
|
597
|
-
if (
|
|
597
|
+
const k = L.numPages, E = {};
|
|
598
|
+
for (let I = 1; I <= k; I++) {
|
|
599
|
+
if (d.current)
|
|
598
600
|
throw "close pop over";
|
|
599
|
-
const N = await L.getPage(
|
|
600
|
-
E[
|
|
601
|
+
const N = await L.getPage(I);
|
|
602
|
+
E[I.toString()] = await N.getTextContent();
|
|
601
603
|
}
|
|
602
604
|
return E;
|
|
603
605
|
}, []);
|
|
604
606
|
return O(() => {
|
|
605
|
-
if (!
|
|
606
|
-
|
|
607
|
+
if (!r) {
|
|
608
|
+
d.current = !0, h([]), b(0);
|
|
607
609
|
return;
|
|
608
610
|
}
|
|
609
|
-
|
|
611
|
+
d.current = !1, a(!0), h([]), b(0), D(c).then((L) => {
|
|
610
612
|
P.current = L;
|
|
611
|
-
const E = Object.keys(L).reduce((
|
|
612
|
-
const
|
|
613
|
-
[
|
|
613
|
+
const E = Object.keys(L).reduce((I, N) => {
|
|
614
|
+
const V = un(
|
|
615
|
+
[r],
|
|
614
616
|
L[N],
|
|
615
617
|
Number(N) - 1,
|
|
616
618
|
t
|
|
617
|
-
).map((
|
|
618
|
-
return [...
|
|
619
|
+
).map((q, Z) => ({ ...q, page: Number(N), pageMatchIdx: Z }));
|
|
620
|
+
return [...I, ...V];
|
|
619
621
|
}, []);
|
|
620
622
|
h(E), b(E.length ? 1 : 0);
|
|
621
623
|
}).catch(() => {
|
|
622
624
|
h([]), b(0);
|
|
623
625
|
}).finally(() => a(!1));
|
|
624
|
-
}, [
|
|
625
|
-
search:
|
|
626
|
+
}, [r, D, c, t]), {
|
|
627
|
+
search: r,
|
|
626
628
|
setSearch: o,
|
|
627
|
-
loading:
|
|
629
|
+
loading: n,
|
|
628
630
|
matches: f,
|
|
629
631
|
totalMatches: S,
|
|
630
632
|
currentMatchPosition: w,
|
|
631
633
|
currentMatch: C,
|
|
632
634
|
nextMatch: A,
|
|
633
635
|
prevMatch: R,
|
|
634
|
-
currentMatchElement:
|
|
636
|
+
currentMatchElement: y,
|
|
635
637
|
setCurrentMatchElement: p
|
|
636
638
|
};
|
|
637
|
-
},
|
|
639
|
+
}, Cr = Be({
|
|
638
640
|
search: "",
|
|
639
641
|
setSearch: (t) => {
|
|
640
642
|
},
|
|
@@ -652,37 +654,37 @@ const ho = () => {
|
|
|
652
654
|
currentMatchElement: null,
|
|
653
655
|
setCurrentMatchElement: (t) => {
|
|
654
656
|
}
|
|
655
|
-
}),
|
|
657
|
+
}), Ts = ({
|
|
656
658
|
children: t,
|
|
657
659
|
initialSearch: e
|
|
658
660
|
}) => {
|
|
659
|
-
const [
|
|
660
|
-
loading:
|
|
661
|
+
const [r, o] = $({}), {
|
|
662
|
+
loading: n,
|
|
661
663
|
setSearch: a,
|
|
662
664
|
totalMatches: c,
|
|
663
665
|
currentMatchPosition: s,
|
|
664
|
-
currentMatch:
|
|
665
|
-
search:
|
|
666
|
+
currentMatch: l,
|
|
667
|
+
search: d,
|
|
666
668
|
matches: u,
|
|
667
669
|
nextMatch: f,
|
|
668
670
|
prevMatch: h,
|
|
669
671
|
currentMatchElement: g,
|
|
670
672
|
setCurrentMatchElement: w
|
|
671
|
-
} =
|
|
673
|
+
} = vo(r, e);
|
|
672
674
|
return /* @__PURE__ */ i(
|
|
673
|
-
|
|
675
|
+
Cr.Provider,
|
|
674
676
|
{
|
|
675
677
|
value: {
|
|
676
|
-
searchOptions:
|
|
678
|
+
searchOptions: r,
|
|
677
679
|
setSearchOptions: o,
|
|
678
|
-
loading:
|
|
680
|
+
loading: n,
|
|
679
681
|
setSearch: a,
|
|
680
682
|
totalMatches: c,
|
|
681
683
|
currentMatchPosition: s,
|
|
682
|
-
currentMatch:
|
|
684
|
+
currentMatch: l,
|
|
683
685
|
nextMatch: f,
|
|
684
686
|
prevMatch: h,
|
|
685
|
-
search:
|
|
687
|
+
search: d,
|
|
686
688
|
matches: u,
|
|
687
689
|
currentMatchElement: g,
|
|
688
690
|
setCurrentMatchElement: w
|
|
@@ -690,7 +692,7 @@ const ho = () => {
|
|
|
690
692
|
children: t
|
|
691
693
|
}
|
|
692
694
|
);
|
|
693
|
-
},
|
|
695
|
+
}, Tr = () => je(Cr), he = {
|
|
694
696
|
"rp-pages": "_rp-pages_1776r_1",
|
|
695
697
|
"rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_1776r_7",
|
|
696
698
|
"rp-pages-container": "_rp-pages-container_1776r_11",
|
|
@@ -703,46 +705,46 @@ const ho = () => {
|
|
|
703
705
|
"rp-page-wrapper": "_rp-page-wrapper_h7a2q_1",
|
|
704
706
|
"rp-page": "_rp-page_h7a2q_1",
|
|
705
707
|
"rp-loader-wrapper": "_rp-loader-wrapper_h7a2q_14"
|
|
706
|
-
},
|
|
707
|
-
const { pageNumber: e, onLoaded:
|
|
708
|
+
}, _o = (t) => {
|
|
709
|
+
const { pageNumber: e, onLoaded: r, onLoading: o } = t, n = M(null), { pages: a } = X(), { rotate: c } = Ke(), s = M(), { currentZoom: l } = Xe();
|
|
708
710
|
return O(() => {
|
|
709
|
-
if (!a ||
|
|
711
|
+
if (!a || l === 0)
|
|
710
712
|
return;
|
|
711
|
-
const
|
|
712
|
-
if (
|
|
713
|
-
const u =
|
|
713
|
+
const d = a.get(e);
|
|
714
|
+
if (n.current && d) {
|
|
715
|
+
const u = n.current;
|
|
714
716
|
u.hidden = !0;
|
|
715
717
|
const f = s.current;
|
|
716
|
-
f && f.cancel(), o && o(), s.current = gt(
|
|
717
|
-
scale:
|
|
718
|
+
f && f.cancel(), o && o(), s.current = gt(d.page, u, {
|
|
719
|
+
scale: l,
|
|
718
720
|
rotate: c,
|
|
719
721
|
renderForms: !0
|
|
720
722
|
}), s.current.promise.then(() => {
|
|
721
723
|
u.hidden = !1;
|
|
722
724
|
}).catch(() => {
|
|
723
725
|
}).finally(() => {
|
|
724
|
-
|
|
726
|
+
r && r();
|
|
725
727
|
});
|
|
726
728
|
}
|
|
727
729
|
return () => {
|
|
728
730
|
var u;
|
|
729
731
|
(u = s.current) == null || u.cancel();
|
|
730
732
|
};
|
|
731
|
-
}, [a, e, c,
|
|
733
|
+
}, [a, e, c, l, o, r]), /* @__PURE__ */ i("canvas", { "data-rp": `page-${e}-canvas`, ref: n });
|
|
732
734
|
}, st = {
|
|
733
735
|
"rp-text-layer": "_rp-text-layer_kwwfn_1",
|
|
734
736
|
"rp-text-layer-text": "_rp-text-layer-text_kwwfn_9"
|
|
735
|
-
},
|
|
736
|
-
const { pageNumber: e } = t, { pages:
|
|
737
|
+
}, wo = (t) => {
|
|
738
|
+
const { pageNumber: e } = t, { pages: r } = X(), o = M(null), { matches: n, currentMatch: a, setCurrentMatchElement: c } = Tr(), [s, l] = $(
|
|
737
739
|
[]
|
|
738
|
-
),
|
|
740
|
+
), d = M(), u = M(), f = M(), h = F(() => n.filter((w) => w.pageIndex === e - 1), [n, e]), g = x(
|
|
739
741
|
(w, b, v = !1) => {
|
|
740
|
-
if (v &&
|
|
741
|
-
f.current = void 0,
|
|
742
|
+
if (v && lr(w, b), !h.length) {
|
|
743
|
+
f.current = void 0, l([]);
|
|
742
744
|
return;
|
|
743
745
|
}
|
|
744
|
-
const _ =
|
|
745
|
-
|
|
746
|
+
const _ = cr(h, w, b);
|
|
747
|
+
l(_);
|
|
746
748
|
},
|
|
747
749
|
[h]
|
|
748
750
|
);
|
|
@@ -758,35 +760,35 @@ const ho = () => {
|
|
|
758
760
|
const b = s.find((_) => _.index === w);
|
|
759
761
|
b && (f.current = b.element, c(b.element), b.element.classList.add("selected"));
|
|
760
762
|
}, [a, s, h]), O(() => {
|
|
761
|
-
const w =
|
|
763
|
+
const w = r.get(e);
|
|
762
764
|
if (!w || !o.current)
|
|
763
765
|
return;
|
|
764
766
|
const b = o.current;
|
|
765
|
-
return
|
|
767
|
+
return d.current && d.current.cancel(), w.page.getTextContent().then((v) => {
|
|
766
768
|
const _ = w.page.getViewport({ scale: 1 });
|
|
767
|
-
return
|
|
769
|
+
return d.current = new Ct.TextLayer({
|
|
768
770
|
viewport: _,
|
|
769
771
|
textContentSource: v,
|
|
770
772
|
container: b
|
|
771
|
-
}), u.current = v, b && (b.innerText = ""),
|
|
773
|
+
}), u.current = v, b && (b.innerText = ""), d.current.render();
|
|
772
774
|
}).then(() => {
|
|
773
775
|
var m;
|
|
774
776
|
[].slice.call(b.children).forEach((T) => {
|
|
775
777
|
T.classList.add(st["rp-text-layer-text"]);
|
|
776
778
|
});
|
|
777
|
-
const _ = (m =
|
|
779
|
+
const _ = (m = d.current) == null ? void 0 : m.textDivs;
|
|
778
780
|
_ && u.current && g(u.current, _);
|
|
779
781
|
}).catch(() => {
|
|
780
782
|
}), () => {
|
|
781
783
|
var v;
|
|
782
|
-
(v =
|
|
784
|
+
(v = d.current) == null || v.cancel();
|
|
783
785
|
};
|
|
784
|
-
}, [
|
|
786
|
+
}, [r, e]), O(() => {
|
|
785
787
|
var v;
|
|
786
788
|
[].slice.call(o.current.children).forEach((_) => {
|
|
787
789
|
_.classList.add(st["rp-text-layer-text"]);
|
|
788
790
|
});
|
|
789
|
-
const b = (v =
|
|
791
|
+
const b = (v = d.current) == null ? void 0 : v.textDivs;
|
|
790
792
|
b && u.current && g(u.current, b, !0);
|
|
791
793
|
}, [g]), /* @__PURE__ */ i(
|
|
792
794
|
"div",
|
|
@@ -796,27 +798,27 @@ const ho = () => {
|
|
|
796
798
|
ref: o
|
|
797
799
|
}
|
|
798
800
|
);
|
|
799
|
-
},
|
|
801
|
+
}, bo = {
|
|
800
802
|
"rp-annotation-layer": "_rp-annotation-layer_o0ksd_1"
|
|
801
803
|
};
|
|
802
|
-
let
|
|
803
|
-
const
|
|
804
|
-
const { pageNumber: e } = t,
|
|
804
|
+
let Co = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
|
|
805
|
+
const To = (t) => {
|
|
806
|
+
const { pageNumber: e } = t, r = M(null), { pages: o, pdf: n } = X(), a = M(), [c, s] = $(), { setFocusedPage: l, goToPage: d } = ce(), { scrollMode: u } = Oe(), { print: f } = et(), { download: h } = Hr(), g = F(() => o.get(e), [o, e]), w = F(() => g == null ? void 0 : g.page.getViewport(), [g]);
|
|
805
807
|
O(() => {
|
|
806
808
|
a.current && (a.current.div.replaceChildren(), a.current = void 0);
|
|
807
|
-
}, [
|
|
809
|
+
}, [n]), O(() => {
|
|
808
810
|
g && g.page.getAnnotations().then((v) => {
|
|
809
|
-
a.current = void 0, s(v),
|
|
811
|
+
a.current = void 0, s(v), r.current && (r.current.innerText = "");
|
|
810
812
|
});
|
|
811
813
|
}, [g]);
|
|
812
814
|
const b = x(
|
|
813
815
|
(v) => {
|
|
814
|
-
!c || !
|
|
816
|
+
!c || !n || (Ln(v), Nn(v, n, c).then((_) => {
|
|
815
817
|
var m, T;
|
|
816
818
|
((m = _ == null ? void 0 : _.data) == null ? void 0 : m.action) === "Print" ? f() : ((T = _ == null ? void 0 : _.data) == null ? void 0 : T.action) === "SaveAs" && h();
|
|
817
|
-
}), u === K.PAGE_SCROLLING ? At(v, c,
|
|
819
|
+
}), u === K.PAGE_SCROLLING ? At(v, c, n, (_) => l(_.pageIndex + 1)) : At(v, c, n, (_) => d(_.pageIndex + 1)));
|
|
818
820
|
},
|
|
819
|
-
[
|
|
821
|
+
[n, c, d, l, u, f, h]
|
|
820
822
|
);
|
|
821
823
|
return O(() => {
|
|
822
824
|
if (!g || !c)
|
|
@@ -829,104 +831,104 @@ const bo = (t) => {
|
|
|
829
831
|
return;
|
|
830
832
|
}
|
|
831
833
|
const _ = /* @__PURE__ */ new Map([]);
|
|
832
|
-
for (const
|
|
833
|
-
const { annotationType: p } =
|
|
834
|
+
for (const y of c) {
|
|
835
|
+
const { annotationType: p } = y;
|
|
834
836
|
switch (p) {
|
|
835
837
|
case zt.Link:
|
|
836
|
-
|
|
838
|
+
On(y);
|
|
837
839
|
break;
|
|
838
840
|
case zt.Widget:
|
|
839
|
-
|
|
841
|
+
En(y, v, _);
|
|
840
842
|
break;
|
|
841
843
|
}
|
|
842
844
|
}
|
|
843
845
|
const m = new AbortController();
|
|
844
846
|
return (async () => {
|
|
845
|
-
a.current && (a.current.div.replaceChildren(), a.current = void 0),
|
|
846
|
-
div:
|
|
847
|
+
a.current && (a.current.div.replaceChildren(), a.current = void 0), r.current && (r.current.innerText = ""), a.current = new gn({
|
|
848
|
+
div: r.current,
|
|
847
849
|
accessibilityManager: void 0,
|
|
848
850
|
annotationCanvasMap: void 0,
|
|
849
851
|
annotationEditorUIManager: void 0,
|
|
850
852
|
structTreeLayer: null,
|
|
851
853
|
page: g.page,
|
|
852
854
|
viewport: v.clone({ dontFlip: !0 })
|
|
853
|
-
}),
|
|
854
|
-
const
|
|
855
|
+
}), r.current && kt(r.current, b);
|
|
856
|
+
const y = await (n == null ? void 0 : n.hasJSActions()), p = await (n == null ? void 0 : n.getFieldObjects());
|
|
855
857
|
if (m.signal.aborted)
|
|
856
858
|
throw "abort";
|
|
857
859
|
return a.current.render({
|
|
858
860
|
annotations: c,
|
|
859
|
-
annotationStorage:
|
|
860
|
-
hasJSActions:
|
|
861
|
+
annotationStorage: n == null ? void 0 : n.annotationStorage,
|
|
862
|
+
hasJSActions: y,
|
|
861
863
|
fieldObjects: p,
|
|
862
|
-
div:
|
|
864
|
+
div: r.current,
|
|
863
865
|
viewport: v.clone({ dontFlip: !0 }),
|
|
864
866
|
page: g.page,
|
|
865
|
-
imageResourcesPath:
|
|
867
|
+
imageResourcesPath: Co,
|
|
866
868
|
renderForms: !0,
|
|
867
|
-
linkService: new
|
|
869
|
+
linkService: new Rn(),
|
|
868
870
|
downloadManager: null,
|
|
869
871
|
enableScripting: !1
|
|
870
872
|
});
|
|
871
873
|
})().then(() => {
|
|
872
|
-
|
|
873
|
-
}).catch((
|
|
874
|
-
if (
|
|
875
|
-
throw
|
|
874
|
+
r.current && Dn(r.current, b);
|
|
875
|
+
}).catch((y) => {
|
|
876
|
+
if (y !== "abort")
|
|
877
|
+
throw y;
|
|
876
878
|
}), () => {
|
|
877
|
-
m.abort("clear"),
|
|
879
|
+
m.abort("clear"), r.current && kt(r.current, b);
|
|
878
880
|
};
|
|
879
|
-
}, [
|
|
881
|
+
}, [n, c, b]), /* @__PURE__ */ i(
|
|
880
882
|
"div",
|
|
881
883
|
{
|
|
882
884
|
"data-rp": `page-${e}-annotationLayer`,
|
|
883
885
|
style: { width: `${w == null ? void 0 : w.width}px`, height: `${w == null ? void 0 : w.height}px` },
|
|
884
|
-
className:
|
|
885
|
-
ref:
|
|
886
|
+
className: bo["rp-annotation-layer"],
|
|
887
|
+
ref: r
|
|
886
888
|
}
|
|
887
889
|
);
|
|
888
890
|
}, ct = {
|
|
889
891
|
"rp-text-highlight-layer": "_rp-text-highlight-layer_1470i_1",
|
|
890
892
|
"rp-text-highlight-layer-text": "_rp-text-highlight-layer-text_1470i_9"
|
|
891
|
-
},
|
|
892
|
-
const e =
|
|
893
|
-
(
|
|
894
|
-
u &&
|
|
893
|
+
}, Po = ({ pageNumber: t }) => {
|
|
894
|
+
const e = M(null), r = M(), o = M(), { pages: n } = X(), { highlightMatches: a } = vn(), c = F(() => a.filter((d) => d.pageIndex === t - 1), [a]), s = x(
|
|
895
|
+
(l, d, u = !1) => {
|
|
896
|
+
u && lr(l, d), pn(c, l, d);
|
|
895
897
|
},
|
|
896
|
-
[c,
|
|
898
|
+
[c, n, t]
|
|
897
899
|
);
|
|
898
900
|
return O(() => {
|
|
899
|
-
const
|
|
900
|
-
if (!
|
|
901
|
+
const l = n.get(t);
|
|
902
|
+
if (!l || !e.current)
|
|
901
903
|
return;
|
|
902
|
-
const
|
|
903
|
-
return
|
|
904
|
-
const f =
|
|
905
|
-
return
|
|
904
|
+
const d = e.current;
|
|
905
|
+
return r.current && r.current.cancel(), l.page.getTextContent().then((u) => {
|
|
906
|
+
const f = l.page.getViewport({ scale: 1 });
|
|
907
|
+
return r.current = new Ct.TextLayer({
|
|
906
908
|
viewport: f,
|
|
907
909
|
textContentSource: u,
|
|
908
|
-
container:
|
|
909
|
-
}), o.current = u,
|
|
910
|
+
container: d
|
|
911
|
+
}), o.current = u, d && (d.innerText = ""), r.current.render();
|
|
910
912
|
}).then(() => {
|
|
911
913
|
var h;
|
|
912
|
-
[].slice.call(
|
|
914
|
+
[].slice.call(d.children).forEach((g) => {
|
|
913
915
|
g.classList.add(ct["rp-text-highlight-layer-text"]);
|
|
914
916
|
});
|
|
915
|
-
const f = (h =
|
|
917
|
+
const f = (h = r.current) == null ? void 0 : h.textDivs;
|
|
916
918
|
f && o.current && s(o.current, f);
|
|
917
919
|
}).catch(() => {
|
|
918
920
|
}), () => {
|
|
919
921
|
var u;
|
|
920
|
-
(u =
|
|
922
|
+
(u = r.current) == null || u.cancel();
|
|
921
923
|
};
|
|
922
|
-
}, [
|
|
924
|
+
}, [n, t]), O(() => {
|
|
923
925
|
var u;
|
|
924
926
|
[].slice.call(e.current.children).forEach((f) => {
|
|
925
927
|
f.classList.add(ct["rp-text-highlight-layer-text"]);
|
|
926
928
|
});
|
|
927
|
-
const
|
|
928
|
-
|
|
929
|
-
}, [s]), /* @__PURE__ */ i(
|
|
929
|
+
const d = (u = r.current) == null ? void 0 : u.textDivs;
|
|
930
|
+
d && o.current && s(o.current, d, !0);
|
|
931
|
+
}, [s]), /* @__PURE__ */ i(ye, { children: /* @__PURE__ */ i(
|
|
930
932
|
"div",
|
|
931
933
|
{
|
|
932
934
|
"data-rp": `page-${t}-textHighlightLayer`,
|
|
@@ -934,18 +936,18 @@ const bo = (t) => {
|
|
|
934
936
|
ref: e
|
|
935
937
|
}
|
|
936
938
|
) });
|
|
937
|
-
},
|
|
938
|
-
const { pageNumber:
|
|
939
|
+
}, So = Array.from({ length: 21 }, (t, e) => Number((e * 0.05).toFixed(2))), xt = Me((t, e) => {
|
|
940
|
+
const { pageNumber: r, style: o, onIntersectRatioChange: n, ...a } = t, { pages: c } = X(), { rotate: s } = Ke(), { textLayer: l } = sn(), { currentZoom: d } = Xe(), u = M(c.get(r)), [f, h] = $(!1), g = M(null), [w, b] = $({
|
|
939
941
|
width: 0,
|
|
940
942
|
height: 0
|
|
941
943
|
});
|
|
942
|
-
|
|
943
|
-
if (c && (u.current = c.get(
|
|
944
|
-
const T = u.current.page.getViewport({ scale:
|
|
944
|
+
ir(e, () => g.current), O(() => {
|
|
945
|
+
if (c && (u.current = c.get(r), u.current)) {
|
|
946
|
+
const T = u.current.page.getViewport({ scale: d, rotation: s });
|
|
945
947
|
b(T);
|
|
946
948
|
}
|
|
947
|
-
}, [c,
|
|
948
|
-
const v =
|
|
949
|
+
}, [c, r, s, d]);
|
|
950
|
+
const v = F(() => {
|
|
949
951
|
switch (s) {
|
|
950
952
|
case 90:
|
|
951
953
|
return `${w.width / 2}px ${w.width / 2}px`;
|
|
@@ -962,26 +964,26 @@ const bo = (t) => {
|
|
|
962
964
|
}, []);
|
|
963
965
|
return O(() => {
|
|
964
966
|
const T = new IntersectionObserver(
|
|
965
|
-
(
|
|
966
|
-
r
|
|
967
|
+
(y) => {
|
|
968
|
+
n(r, y[0].intersectionRatio);
|
|
967
969
|
},
|
|
968
|
-
{ threshold:
|
|
970
|
+
{ threshold: So }
|
|
969
971
|
);
|
|
970
972
|
return g.current && T.observe(g.current), () => {
|
|
971
|
-
T.disconnect(), r
|
|
973
|
+
T.disconnect(), n(r, -1);
|
|
972
974
|
};
|
|
973
|
-
}, [
|
|
975
|
+
}, [n, r, s, w]), /* @__PURE__ */ i(
|
|
974
976
|
"div",
|
|
975
977
|
{
|
|
976
978
|
ref: g,
|
|
977
|
-
id: `page-${
|
|
978
|
-
"data-rp": `page-${
|
|
979
|
+
id: `page-${r}`,
|
|
980
|
+
"data-rp": `page-${r}`,
|
|
979
981
|
...a,
|
|
980
982
|
style: {
|
|
981
983
|
...o,
|
|
982
984
|
"--rp-rotate": `${s}deg`,
|
|
983
985
|
"--rp-page-rotate-translate": `${v}`,
|
|
984
|
-
"--scale-factor":
|
|
986
|
+
"--scale-factor": d
|
|
985
987
|
},
|
|
986
988
|
className: at["rp-page-wrapper"],
|
|
987
989
|
children: /* @__PURE__ */ z(
|
|
@@ -993,124 +995,124 @@ const bo = (t) => {
|
|
|
993
995
|
},
|
|
994
996
|
className: at["rp-page"],
|
|
995
997
|
children: [
|
|
996
|
-
/* @__PURE__ */ i(
|
|
998
|
+
/* @__PURE__ */ i(_o, { onLoading: _, onLoaded: m, pageNumber: r }),
|
|
997
999
|
f && /* @__PURE__ */ i("div", { className: at["rp-loader-wrapper"], children: /* @__PURE__ */ i(Pt, {}) }),
|
|
998
|
-
|
|
999
|
-
/* @__PURE__ */ i(
|
|
1000
|
-
/* @__PURE__ */ i(
|
|
1000
|
+
l && /* @__PURE__ */ i(wo, { pageNumber: r }),
|
|
1001
|
+
/* @__PURE__ */ i(Po, { pageNumber: r }),
|
|
1002
|
+
/* @__PURE__ */ i(To, { pageNumber: r })
|
|
1001
1003
|
]
|
|
1002
1004
|
}
|
|
1003
1005
|
)
|
|
1004
1006
|
}
|
|
1005
1007
|
);
|
|
1006
1008
|
});
|
|
1007
|
-
function
|
|
1009
|
+
function Gt(t) {
|
|
1008
1010
|
if (t === void 0)
|
|
1009
1011
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1010
1012
|
return t;
|
|
1011
1013
|
}
|
|
1012
1014
|
function _t(t, e) {
|
|
1013
|
-
return _t = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(
|
|
1014
|
-
return
|
|
1015
|
+
return _t = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
|
|
1016
|
+
return r.__proto__ = o, r;
|
|
1015
1017
|
}, _t(t, e);
|
|
1016
1018
|
}
|
|
1017
|
-
function
|
|
1019
|
+
function yo(t, e) {
|
|
1018
1020
|
t.prototype = Object.create(e.prototype), t.prototype.constructor = t, _t(t, e);
|
|
1019
1021
|
}
|
|
1020
|
-
var
|
|
1022
|
+
var qt = Number.isNaN || function(e) {
|
|
1021
1023
|
return typeof e == "number" && e !== e;
|
|
1022
1024
|
};
|
|
1023
|
-
function So(t, e) {
|
|
1024
|
-
return !!(t === e || Ut(t) && Ut(e));
|
|
1025
|
-
}
|
|
1026
1025
|
function Io(t, e) {
|
|
1026
|
+
return !!(t === e || qt(t) && qt(e));
|
|
1027
|
+
}
|
|
1028
|
+
function xo(t, e) {
|
|
1027
1029
|
if (t.length !== e.length)
|
|
1028
1030
|
return !1;
|
|
1029
|
-
for (var
|
|
1030
|
-
if (!
|
|
1031
|
+
for (var r = 0; r < t.length; r++)
|
|
1032
|
+
if (!Io(t[r], e[r]))
|
|
1031
1033
|
return !1;
|
|
1032
1034
|
return !0;
|
|
1033
1035
|
}
|
|
1034
1036
|
function lt(t, e) {
|
|
1035
|
-
e === void 0 && (e =
|
|
1036
|
-
var
|
|
1037
|
+
e === void 0 && (e = xo);
|
|
1038
|
+
var r, o = [], n, a = !1;
|
|
1037
1039
|
function c() {
|
|
1038
|
-
for (var s = [],
|
|
1039
|
-
s[
|
|
1040
|
-
return a &&
|
|
1040
|
+
for (var s = [], l = 0; l < arguments.length; l++)
|
|
1041
|
+
s[l] = arguments[l];
|
|
1042
|
+
return a && r === this && e(s, o) || (n = t.apply(this, s), a = !0, r = this, o = s), n;
|
|
1041
1043
|
}
|
|
1042
1044
|
return c;
|
|
1043
1045
|
}
|
|
1044
|
-
function
|
|
1046
|
+
function Ut(t, e) {
|
|
1045
1047
|
if (t == null)
|
|
1046
1048
|
return {};
|
|
1047
|
-
var
|
|
1049
|
+
var r = {};
|
|
1048
1050
|
for (var o in t)
|
|
1049
1051
|
if ({}.hasOwnProperty.call(t, o)) {
|
|
1050
1052
|
if (e.indexOf(o) !== -1)
|
|
1051
1053
|
continue;
|
|
1052
|
-
|
|
1054
|
+
r[o] = t[o];
|
|
1053
1055
|
}
|
|
1054
|
-
return
|
|
1056
|
+
return r;
|
|
1055
1057
|
}
|
|
1056
|
-
var
|
|
1058
|
+
var Ro = typeof performance == "object" && typeof performance.now == "function", Zt = Ro ? function() {
|
|
1057
1059
|
return performance.now();
|
|
1058
1060
|
} : function() {
|
|
1059
1061
|
return Date.now();
|
|
1060
1062
|
};
|
|
1061
|
-
function
|
|
1063
|
+
function Bt(t) {
|
|
1062
1064
|
cancelAnimationFrame(t.id);
|
|
1063
1065
|
}
|
|
1064
|
-
function
|
|
1065
|
-
var
|
|
1066
|
+
function Lo(t, e) {
|
|
1067
|
+
var r = Zt();
|
|
1066
1068
|
function o() {
|
|
1067
|
-
Zt() -
|
|
1069
|
+
Zt() - r >= e ? t.call(null) : n.id = requestAnimationFrame(o);
|
|
1068
1070
|
}
|
|
1069
|
-
var
|
|
1071
|
+
var n = {
|
|
1070
1072
|
id: requestAnimationFrame(o)
|
|
1071
1073
|
};
|
|
1072
|
-
return
|
|
1074
|
+
return n;
|
|
1073
1075
|
}
|
|
1074
1076
|
var dt = -1;
|
|
1075
|
-
function
|
|
1077
|
+
function No(t) {
|
|
1076
1078
|
if (t === void 0 && (t = !1), dt === -1 || t) {
|
|
1077
|
-
var e = document.createElement("div"),
|
|
1078
|
-
|
|
1079
|
+
var e = document.createElement("div"), r = e.style;
|
|
1080
|
+
r.width = "50px", r.height = "50px", r.overflow = "scroll", document.body.appendChild(e), dt = e.offsetWidth - e.clientWidth, document.body.removeChild(e);
|
|
1079
1081
|
}
|
|
1080
1082
|
return dt;
|
|
1081
1083
|
}
|
|
1082
1084
|
var Le = null;
|
|
1083
|
-
function
|
|
1085
|
+
function jt(t) {
|
|
1084
1086
|
if (t === void 0 && (t = !1), Le === null || t) {
|
|
1085
|
-
var e = document.createElement("div"),
|
|
1086
|
-
|
|
1087
|
-
var o = document.createElement("div"),
|
|
1088
|
-
return
|
|
1087
|
+
var e = document.createElement("div"), r = e.style;
|
|
1088
|
+
r.width = "50px", r.height = "50px", r.overflow = "scroll", r.direction = "rtl";
|
|
1089
|
+
var o = document.createElement("div"), n = o.style;
|
|
1090
|
+
return n.width = "100px", n.height = "100px", e.appendChild(o), document.body.appendChild(e), e.scrollLeft > 0 ? Le = "positive-descending" : (e.scrollLeft = 1, e.scrollLeft === 0 ? Le = "negative" : Le = "positive-ascending"), document.body.removeChild(e), Le;
|
|
1089
1091
|
}
|
|
1090
1092
|
return Le;
|
|
1091
1093
|
}
|
|
1092
|
-
var
|
|
1093
|
-
var
|
|
1094
|
+
var Eo = 150, Oo = function(e) {
|
|
1095
|
+
var r = e.columnIndex;
|
|
1094
1096
|
e.data;
|
|
1095
1097
|
var o = e.rowIndex;
|
|
1096
|
-
return o + ":" +
|
|
1097
|
-
},
|
|
1098
|
-
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && (
|
|
1099
|
-
function
|
|
1100
|
-
var e,
|
|
1098
|
+
return o + ":" + r;
|
|
1099
|
+
}, $e = null, Ve = null, Ge = null;
|
|
1100
|
+
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && ($e = /* @__PURE__ */ new WeakSet(), Ve = /* @__PURE__ */ new WeakSet(), Ge = /* @__PURE__ */ new WeakSet());
|
|
1101
|
+
function Do(t) {
|
|
1102
|
+
var e, r = t.getColumnOffset, o = t.getColumnStartIndexForOffset, n = t.getColumnStopIndexForStartIndex, a = t.getColumnWidth, c = t.getEstimatedTotalHeight, s = t.getEstimatedTotalWidth, l = t.getOffsetForColumnAndAlignment, d = t.getOffsetForRowAndAlignment, u = t.getRowHeight, f = t.getRowOffset, h = t.getRowStartIndexForOffset, g = t.getRowStopIndexForStartIndex, w = t.initInstanceProps, b = t.shouldResetStyleCacheOnItemSizeChange, v = t.validateProps;
|
|
1101
1103
|
return e = /* @__PURE__ */ function(_) {
|
|
1102
|
-
|
|
1103
|
-
function m(
|
|
1104
|
+
yo(m, _);
|
|
1105
|
+
function m(y) {
|
|
1104
1106
|
var p;
|
|
1105
|
-
return p = _.call(this,
|
|
1106
|
-
instance:
|
|
1107
|
+
return p = _.call(this, y) || this, p._instanceProps = w(p.props, Gt(p)), p._resetIsScrollingTimeoutId = null, p._outerRef = void 0, p.state = {
|
|
1108
|
+
instance: Gt(p),
|
|
1107
1109
|
isScrolling: !1,
|
|
1108
1110
|
horizontalScrollDirection: "forward",
|
|
1109
1111
|
scrollLeft: typeof p.props.initialScrollLeft == "number" ? p.props.initialScrollLeft : 0,
|
|
1110
1112
|
scrollTop: typeof p.props.initialScrollTop == "number" ? p.props.initialScrollTop : 0,
|
|
1111
1113
|
scrollUpdateWasRequested: !1,
|
|
1112
1114
|
verticalScrollDirection: "forward"
|
|
1113
|
-
}, p._callOnItemsRendered = void 0, p._callOnItemsRendered = lt(function(P, C, S, A, R, D, L,
|
|
1115
|
+
}, p._callOnItemsRendered = void 0, p._callOnItemsRendered = lt(function(P, C, S, A, R, D, L, k) {
|
|
1114
1116
|
return p.props.onItemsRendered({
|
|
1115
1117
|
overscanColumnStartIndex: P,
|
|
1116
1118
|
overscanColumnStopIndex: C,
|
|
@@ -1119,7 +1121,7 @@ function Eo(t) {
|
|
|
1119
1121
|
visibleColumnStartIndex: R,
|
|
1120
1122
|
visibleColumnStopIndex: D,
|
|
1121
1123
|
visibleRowStartIndex: L,
|
|
1122
|
-
visibleRowStopIndex:
|
|
1124
|
+
visibleRowStopIndex: k
|
|
1123
1125
|
});
|
|
1124
1126
|
}), p._callOnScroll = void 0, p._callOnScroll = lt(function(P, C, S, A, R) {
|
|
1125
1127
|
return p.props.onScroll({
|
|
@@ -1130,15 +1132,15 @@ function Eo(t) {
|
|
|
1130
1132
|
scrollUpdateWasRequested: R
|
|
1131
1133
|
});
|
|
1132
1134
|
}), p._getItemStyle = void 0, p._getItemStyle = function(P, C) {
|
|
1133
|
-
var S = p.props, A = S.columnWidth, R = S.direction, D = S.rowHeight, L = p._getItemStyleCache(b && A, b && R, b && D),
|
|
1134
|
-
if (L.hasOwnProperty(
|
|
1135
|
-
E = L[
|
|
1135
|
+
var S = p.props, A = S.columnWidth, R = S.direction, D = S.rowHeight, L = p._getItemStyleCache(b && A, b && R, b && D), k = P + ":" + C, E;
|
|
1136
|
+
if (L.hasOwnProperty(k))
|
|
1137
|
+
E = L[k];
|
|
1136
1138
|
else {
|
|
1137
|
-
var
|
|
1138
|
-
L[
|
|
1139
|
+
var I = r(p.props, C, p._instanceProps), N = R === "rtl";
|
|
1140
|
+
L[k] = E = {
|
|
1139
1141
|
position: "absolute",
|
|
1140
|
-
left: N ? void 0 :
|
|
1141
|
-
right: N ?
|
|
1142
|
+
left: N ? void 0 : I,
|
|
1143
|
+
right: N ? I : void 0,
|
|
1142
1144
|
top: f(p.props, P, p._instanceProps),
|
|
1143
1145
|
height: u(p.props, P, p._instanceProps),
|
|
1144
1146
|
width: a(p.props, C, p._instanceProps)
|
|
@@ -1148,27 +1150,27 @@ function Eo(t) {
|
|
|
1148
1150
|
}, p._getItemStyleCache = void 0, p._getItemStyleCache = lt(function(P, C, S) {
|
|
1149
1151
|
return {};
|
|
1150
1152
|
}), p._onScroll = function(P) {
|
|
1151
|
-
var C = P.currentTarget, S = C.clientHeight, A = C.clientWidth, R = C.scrollLeft, D = C.scrollTop, L = C.scrollHeight,
|
|
1153
|
+
var C = P.currentTarget, S = C.clientHeight, A = C.clientWidth, R = C.scrollLeft, D = C.scrollTop, L = C.scrollHeight, k = C.scrollWidth;
|
|
1152
1154
|
p.setState(function(E) {
|
|
1153
1155
|
if (E.scrollLeft === R && E.scrollTop === D)
|
|
1154
1156
|
return null;
|
|
1155
|
-
var
|
|
1156
|
-
if (
|
|
1157
|
-
switch (
|
|
1157
|
+
var I = p.props.direction, N = R;
|
|
1158
|
+
if (I === "rtl")
|
|
1159
|
+
switch (jt()) {
|
|
1158
1160
|
case "negative":
|
|
1159
1161
|
N = -R;
|
|
1160
1162
|
break;
|
|
1161
1163
|
case "positive-descending":
|
|
1162
|
-
N =
|
|
1164
|
+
N = k - A - R;
|
|
1163
1165
|
break;
|
|
1164
1166
|
}
|
|
1165
|
-
N = Math.max(0, Math.min(N,
|
|
1166
|
-
var
|
|
1167
|
+
N = Math.max(0, Math.min(N, k - A));
|
|
1168
|
+
var V = Math.max(0, Math.min(D, L - S));
|
|
1167
1169
|
return {
|
|
1168
1170
|
isScrolling: !0,
|
|
1169
1171
|
horizontalScrollDirection: E.scrollLeft < R ? "forward" : "backward",
|
|
1170
1172
|
scrollLeft: N,
|
|
1171
|
-
scrollTop:
|
|
1173
|
+
scrollTop: V,
|
|
1172
1174
|
verticalScrollDirection: E.scrollTop < D ? "forward" : "backward",
|
|
1173
1175
|
scrollUpdateWasRequested: !1
|
|
1174
1176
|
};
|
|
@@ -1177,7 +1179,7 @@ function Eo(t) {
|
|
|
1177
1179
|
var C = p.props.outerRef;
|
|
1178
1180
|
p._outerRef = P, typeof C == "function" ? C(P) : C != null && typeof C == "object" && C.hasOwnProperty("current") && (C.current = P);
|
|
1179
1181
|
}, p._resetIsScrollingDebounced = function() {
|
|
1180
|
-
p._resetIsScrollingTimeoutId !== null &&
|
|
1182
|
+
p._resetIsScrollingTimeoutId !== null && Bt(p._resetIsScrollingTimeoutId), p._resetIsScrollingTimeoutId = Lo(p._resetIsScrolling, Eo);
|
|
1181
1183
|
}, p._resetIsScrolling = function() {
|
|
1182
1184
|
p._resetIsScrollingTimeoutId = null, p.setState({
|
|
1183
1185
|
isScrolling: !1
|
|
@@ -1187,7 +1189,7 @@ function Eo(t) {
|
|
|
1187
1189
|
}, p;
|
|
1188
1190
|
}
|
|
1189
1191
|
m.getDerivedStateFromProps = function(p, P) {
|
|
1190
|
-
return
|
|
1192
|
+
return zo(p, P), v(p), null;
|
|
1191
1193
|
};
|
|
1192
1194
|
var T = m.prototype;
|
|
1193
1195
|
return T.scrollTo = function(p) {
|
|
@@ -1202,12 +1204,12 @@ function Eo(t) {
|
|
|
1202
1204
|
};
|
|
1203
1205
|
}, this._resetIsScrollingDebounced);
|
|
1204
1206
|
}, T.scrollToItem = function(p) {
|
|
1205
|
-
var P = p.align, C = P === void 0 ? "auto" : P, S = p.columnIndex, A = p.rowIndex, R = this.props, D = R.columnCount, L = R.height,
|
|
1206
|
-
S !== void 0 && (S = Math.max(0, Math.min(S, D - 1))), A !== void 0 && (A = Math.max(0, Math.min(A,
|
|
1207
|
-
var Z = c(this.props, this._instanceProps), ee = s(this.props, this._instanceProps),
|
|
1207
|
+
var P = p.align, C = P === void 0 ? "auto" : P, S = p.columnIndex, A = p.rowIndex, R = this.props, D = R.columnCount, L = R.height, k = R.rowCount, E = R.width, I = this.state, N = I.scrollLeft, V = I.scrollTop, q = No();
|
|
1208
|
+
S !== void 0 && (S = Math.max(0, Math.min(S, D - 1))), A !== void 0 && (A = Math.max(0, Math.min(A, k - 1)));
|
|
1209
|
+
var Z = c(this.props, this._instanceProps), ee = s(this.props, this._instanceProps), B = ee > E ? q : 0, J = Z > L ? q : 0;
|
|
1208
1210
|
this.scrollTo({
|
|
1209
|
-
scrollLeft: S !== void 0 ?
|
|
1210
|
-
scrollTop: A !== void 0 ?
|
|
1211
|
+
scrollLeft: S !== void 0 ? l(this.props, S, C, N, this._instanceProps, J) : N,
|
|
1212
|
+
scrollTop: A !== void 0 ? d(this.props, A, C, V, this._instanceProps, B) : V
|
|
1211
1213
|
});
|
|
1212
1214
|
}, T.componentDidMount = function() {
|
|
1213
1215
|
var p = this.props, P = p.initialScrollLeft, C = p.initialScrollTop;
|
|
@@ -1221,7 +1223,7 @@ function Eo(t) {
|
|
|
1221
1223
|
if (A && this._outerRef != null) {
|
|
1222
1224
|
var R = this._outerRef;
|
|
1223
1225
|
if (p === "rtl")
|
|
1224
|
-
switch (
|
|
1226
|
+
switch (jt()) {
|
|
1225
1227
|
case "negative":
|
|
1226
1228
|
R.scrollLeft = -C;
|
|
1227
1229
|
break;
|
|
@@ -1239,16 +1241,16 @@ function Eo(t) {
|
|
|
1239
1241
|
}
|
|
1240
1242
|
this._callPropsCallbacks();
|
|
1241
1243
|
}, T.componentWillUnmount = function() {
|
|
1242
|
-
this._resetIsScrollingTimeoutId !== null &&
|
|
1244
|
+
this._resetIsScrollingTimeoutId !== null && Bt(this._resetIsScrollingTimeoutId);
|
|
1243
1245
|
}, T.render = function() {
|
|
1244
|
-
var p = this.props, P = p.children, C = p.className, S = p.columnCount, A = p.direction, R = p.height, D = p.innerRef, L = p.innerElementType,
|
|
1246
|
+
var p = this.props, P = p.children, C = p.className, S = p.columnCount, A = p.direction, R = p.height, D = p.innerRef, L = p.innerElementType, k = p.innerTagName, E = p.itemData, I = p.itemKey, N = I === void 0 ? Oo : I, V = p.outerElementType, q = p.outerTagName, Z = p.rowCount, ee = p.style, B = p.useIsScrolling, J = p.width, ae = this.state.isScrolling, re = this._getHorizontalRangeToRender(), j = re[0], Y = re[1], de = this._getVerticalRangeToRender(), Ce = de[0], De = de[1], ue = [];
|
|
1245
1247
|
if (S > 0 && Z)
|
|
1246
|
-
for (var pe =
|
|
1247
|
-
for (var ge =
|
|
1248
|
-
ue.push(
|
|
1248
|
+
for (var pe = Ce; pe <= De; pe++)
|
|
1249
|
+
for (var ge = j; ge <= Y; ge++)
|
|
1250
|
+
ue.push(He(P, {
|
|
1249
1251
|
columnIndex: ge,
|
|
1250
1252
|
data: E,
|
|
1251
|
-
isScrolling:
|
|
1253
|
+
isScrolling: B ? ae : void 0,
|
|
1252
1254
|
key: N({
|
|
1253
1255
|
columnIndex: ge,
|
|
1254
1256
|
data: E,
|
|
@@ -1257,12 +1259,12 @@ function Eo(t) {
|
|
|
1257
1259
|
rowIndex: pe,
|
|
1258
1260
|
style: this._getItemStyle(pe, ge)
|
|
1259
1261
|
}));
|
|
1260
|
-
var
|
|
1261
|
-
return
|
|
1262
|
+
var Te = c(this.props, this._instanceProps), tt = s(this.props, this._instanceProps);
|
|
1263
|
+
return He(V || q || "div", {
|
|
1262
1264
|
className: C,
|
|
1263
1265
|
onScroll: this._onScroll,
|
|
1264
1266
|
ref: this._outerRefSetter,
|
|
1265
|
-
style:
|
|
1267
|
+
style: An({
|
|
1266
1268
|
position: "relative",
|
|
1267
1269
|
height: R,
|
|
1268
1270
|
width: J,
|
|
@@ -1271,11 +1273,11 @@ function Eo(t) {
|
|
|
1271
1273
|
willChange: "transform",
|
|
1272
1274
|
direction: A
|
|
1273
1275
|
}, ee)
|
|
1274
|
-
},
|
|
1276
|
+
}, He(L || k || "div", {
|
|
1275
1277
|
children: ue,
|
|
1276
1278
|
ref: D,
|
|
1277
1279
|
style: {
|
|
1278
|
-
height:
|
|
1280
|
+
height: Te,
|
|
1279
1281
|
pointerEvents: ae ? "none" : void 0,
|
|
1280
1282
|
width: tt
|
|
1281
1283
|
}
|
|
@@ -1283,103 +1285,103 @@ function Eo(t) {
|
|
|
1283
1285
|
}, T._callPropsCallbacks = function() {
|
|
1284
1286
|
var p = this.props, P = p.columnCount, C = p.onItemsRendered, S = p.onScroll, A = p.rowCount;
|
|
1285
1287
|
if (typeof C == "function" && P > 0 && A > 0) {
|
|
1286
|
-
var R = this._getHorizontalRangeToRender(), D = R[0], L = R[1],
|
|
1287
|
-
this._callOnItemsRendered(D, L, N,
|
|
1288
|
+
var R = this._getHorizontalRangeToRender(), D = R[0], L = R[1], k = R[2], E = R[3], I = this._getVerticalRangeToRender(), N = I[0], V = I[1], q = I[2], Z = I[3];
|
|
1289
|
+
this._callOnItemsRendered(D, L, N, V, k, E, q, Z);
|
|
1288
1290
|
}
|
|
1289
1291
|
if (typeof S == "function") {
|
|
1290
|
-
var ee = this.state,
|
|
1291
|
-
this._callOnScroll(J, ae,
|
|
1292
|
+
var ee = this.state, B = ee.horizontalScrollDirection, J = ee.scrollLeft, ae = ee.scrollTop, re = ee.scrollUpdateWasRequested, j = ee.verticalScrollDirection;
|
|
1293
|
+
this._callOnScroll(J, ae, B, j, re);
|
|
1292
1294
|
}
|
|
1293
1295
|
}, T._getHorizontalRangeToRender = function() {
|
|
1294
|
-
var p = this.props, P = p.columnCount, C = p.overscanColumnCount, S = p.overscanColumnsCount, A = p.overscanCount, R = p.rowCount, D = this.state, L = D.horizontalScrollDirection,
|
|
1296
|
+
var p = this.props, P = p.columnCount, C = p.overscanColumnCount, S = p.overscanColumnsCount, A = p.overscanCount, R = p.rowCount, D = this.state, L = D.horizontalScrollDirection, k = D.isScrolling, E = D.scrollLeft, I = C || S || A || 1;
|
|
1295
1297
|
if (P === 0 || R === 0)
|
|
1296
1298
|
return [0, 0, 0, 0];
|
|
1297
|
-
var N = o(this.props, E, this._instanceProps),
|
|
1298
|
-
return [Math.max(0, N -
|
|
1299
|
+
var N = o(this.props, E, this._instanceProps), V = n(this.props, N, E, this._instanceProps), q = !k || L === "backward" ? Math.max(1, I) : 1, Z = !k || L === "forward" ? Math.max(1, I) : 1;
|
|
1300
|
+
return [Math.max(0, N - q), Math.max(0, Math.min(P - 1, V + Z)), N, V];
|
|
1299
1301
|
}, T._getVerticalRangeToRender = function() {
|
|
1300
|
-
var p = this.props, P = p.columnCount, C = p.overscanCount, S = p.overscanRowCount, A = p.overscanRowsCount, R = p.rowCount, D = this.state, L = D.isScrolling,
|
|
1302
|
+
var p = this.props, P = p.columnCount, C = p.overscanCount, S = p.overscanRowCount, A = p.overscanRowsCount, R = p.rowCount, D = this.state, L = D.isScrolling, k = D.verticalScrollDirection, E = D.scrollTop, I = S || A || C || 1;
|
|
1301
1303
|
if (P === 0 || R === 0)
|
|
1302
1304
|
return [0, 0, 0, 0];
|
|
1303
|
-
var N = h(this.props, E, this._instanceProps),
|
|
1304
|
-
return [Math.max(0, N -
|
|
1305
|
+
var N = h(this.props, E, this._instanceProps), V = g(this.props, N, E, this._instanceProps), q = !L || k === "backward" ? Math.max(1, I) : 1, Z = !L || k === "forward" ? Math.max(1, I) : 1;
|
|
1306
|
+
return [Math.max(0, N - q), Math.max(0, Math.min(R - 1, V + Z)), N, V];
|
|
1305
1307
|
}, m;
|
|
1306
|
-
}(
|
|
1308
|
+
}(tn), e.defaultProps = {
|
|
1307
1309
|
direction: "ltr",
|
|
1308
1310
|
itemData: void 0,
|
|
1309
1311
|
useIsScrolling: !1
|
|
1310
1312
|
}, e;
|
|
1311
1313
|
}
|
|
1312
|
-
var
|
|
1313
|
-
var o = e.children,
|
|
1314
|
+
var zo = function(e, r) {
|
|
1315
|
+
var o = e.children, n = e.direction, a = e.height, c = e.innerTagName, s = e.outerTagName, l = e.overscanColumnsCount, d = e.overscanCount, u = e.overscanRowsCount, f = e.width, h = r.instance;
|
|
1314
1316
|
if (process.env.NODE_ENV !== "production") {
|
|
1315
|
-
if (typeof
|
|
1317
|
+
if (typeof d == "number" && $e && !$e.has(h) && ($e.add(h), console.warn("The overscanCount prop has been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (typeof l == "number" || typeof u == "number") && Ve && !Ve.has(h) && (Ve.add(h), console.warn("The overscanColumnsCount and overscanRowsCount props have been deprecated. Please use the overscanColumnCount and overscanRowCount props instead.")), (c != null || s != null) && Ge && !Ge.has(h) && (Ge.add(h), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), o == null)
|
|
1316
1318
|
throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (o === null ? "null" : typeof o) + '" was specified.'));
|
|
1317
|
-
switch (
|
|
1319
|
+
switch (n) {
|
|
1318
1320
|
case "ltr":
|
|
1319
1321
|
case "rtl":
|
|
1320
1322
|
break;
|
|
1321
1323
|
default:
|
|
1322
|
-
throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' +
|
|
1324
|
+
throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' + n + '" was specified.'));
|
|
1323
1325
|
}
|
|
1324
1326
|
if (typeof f != "number")
|
|
1325
1327
|
throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. ' + ('"' + (f === null ? "null" : typeof f) + '" was specified.'));
|
|
1326
1328
|
if (typeof a != "number")
|
|
1327
1329
|
throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (a === null ? "null" : typeof a) + '" was specified.'));
|
|
1328
1330
|
}
|
|
1329
|
-
}, Kt = 50,
|
|
1330
|
-
var o = e.rowCount,
|
|
1331
|
+
}, Kt = 50, Pr = function(e, r) {
|
|
1332
|
+
var o = e.rowCount, n = r.rowMetadataMap, a = r.estimatedRowHeight, c = r.lastMeasuredRowIndex, s = 0;
|
|
1331
1333
|
if (c >= o && (c = o - 1), c >= 0) {
|
|
1332
|
-
var
|
|
1333
|
-
s =
|
|
1334
|
+
var l = n[c];
|
|
1335
|
+
s = l.offset + l.size;
|
|
1334
1336
|
}
|
|
1335
|
-
var
|
|
1337
|
+
var d = o - c - 1, u = d * a;
|
|
1336
1338
|
return s + u;
|
|
1337
|
-
},
|
|
1338
|
-
var o = e.columnCount,
|
|
1339
|
+
}, Sr = function(e, r) {
|
|
1340
|
+
var o = e.columnCount, n = r.columnMetadataMap, a = r.estimatedColumnWidth, c = r.lastMeasuredColumnIndex, s = 0;
|
|
1339
1341
|
if (c >= o && (c = o - 1), c >= 0) {
|
|
1340
|
-
var
|
|
1341
|
-
s =
|
|
1342
|
+
var l = n[c];
|
|
1343
|
+
s = l.offset + l.size;
|
|
1342
1344
|
}
|
|
1343
|
-
var
|
|
1345
|
+
var d = o - c - 1, u = d * a;
|
|
1344
1346
|
return s + u;
|
|
1345
|
-
}, ve = function(e,
|
|
1347
|
+
}, ve = function(e, r, o, n) {
|
|
1346
1348
|
var a, c, s;
|
|
1347
|
-
if (e === "column" ? (a =
|
|
1348
|
-
var
|
|
1349
|
+
if (e === "column" ? (a = n.columnMetadataMap, c = r.columnWidth, s = n.lastMeasuredColumnIndex) : (a = n.rowMetadataMap, c = r.rowHeight, s = n.lastMeasuredRowIndex), o > s) {
|
|
1350
|
+
var l = 0;
|
|
1349
1351
|
if (s >= 0) {
|
|
1350
|
-
var
|
|
1351
|
-
|
|
1352
|
+
var d = a[s];
|
|
1353
|
+
l = d.offset + d.size;
|
|
1352
1354
|
}
|
|
1353
1355
|
for (var u = s + 1; u <= o; u++) {
|
|
1354
1356
|
var f = c(u);
|
|
1355
1357
|
a[u] = {
|
|
1356
|
-
offset:
|
|
1358
|
+
offset: l,
|
|
1357
1359
|
size: f
|
|
1358
|
-
},
|
|
1360
|
+
}, l += f;
|
|
1359
1361
|
}
|
|
1360
|
-
e === "column" ?
|
|
1362
|
+
e === "column" ? n.lastMeasuredColumnIndex = o : n.lastMeasuredRowIndex = o;
|
|
1361
1363
|
}
|
|
1362
1364
|
return a[o];
|
|
1363
|
-
}, Xt = function(e,
|
|
1365
|
+
}, Xt = function(e, r, o, n) {
|
|
1364
1366
|
var a, c;
|
|
1365
1367
|
e === "column" ? (a = o.columnMetadataMap, c = o.lastMeasuredColumnIndex) : (a = o.rowMetadataMap, c = o.lastMeasuredRowIndex);
|
|
1366
1368
|
var s = c > 0 ? a[c].offset : 0;
|
|
1367
|
-
return s >=
|
|
1368
|
-
},
|
|
1369
|
-
for (; a <=
|
|
1370
|
-
var s = a + Math.floor((
|
|
1371
|
-
if (
|
|
1369
|
+
return s >= n ? yr(e, r, o, c, 0, n) : Ao(e, r, o, Math.max(0, c), n);
|
|
1370
|
+
}, yr = function(e, r, o, n, a, c) {
|
|
1371
|
+
for (; a <= n; ) {
|
|
1372
|
+
var s = a + Math.floor((n - a) / 2), l = ve(e, r, s, o).offset;
|
|
1373
|
+
if (l === c)
|
|
1372
1374
|
return s;
|
|
1373
|
-
|
|
1375
|
+
l < c ? a = s + 1 : l > c && (n = s - 1);
|
|
1374
1376
|
}
|
|
1375
1377
|
return a > 0 ? a - 1 : 0;
|
|
1376
|
-
},
|
|
1377
|
-
for (var c = e === "column" ?
|
|
1378
|
-
|
|
1379
|
-
return
|
|
1380
|
-
}, Jt = function(e,
|
|
1381
|
-
var
|
|
1382
|
-
switch (
|
|
1378
|
+
}, Ao = function(e, r, o, n, a) {
|
|
1379
|
+
for (var c = e === "column" ? r.columnCount : r.rowCount, s = 1; n < c && ve(e, r, n, o).offset < a; )
|
|
1380
|
+
n += s, s *= 2;
|
|
1381
|
+
return yr(e, r, o, Math.min(n, c - 1), Math.floor(n / 2), a);
|
|
1382
|
+
}, Jt = function(e, r, o, n, a, c, s) {
|
|
1383
|
+
var l = e === "column" ? r.width : r.height, d = ve(e, r, o, c), u = e === "column" ? Sr(r, c) : Pr(r, c), f = Math.max(0, Math.min(u - l, d.offset)), h = Math.max(0, d.offset - l + s + d.size);
|
|
1384
|
+
switch (n === "smart" && (a >= h - l && a <= f + l ? n = "auto" : n = "center"), n) {
|
|
1383
1385
|
case "start":
|
|
1384
1386
|
return f;
|
|
1385
1387
|
case "end":
|
|
@@ -1390,73 +1392,73 @@ var Oo = function(e, n) {
|
|
|
1390
1392
|
default:
|
|
1391
1393
|
return a >= h && a <= f ? a : h > f || a < h ? h : f;
|
|
1392
1394
|
}
|
|
1393
|
-
},
|
|
1394
|
-
getColumnOffset: function(e,
|
|
1395
|
-
return ve("column", e,
|
|
1395
|
+
}, ko = /* @__PURE__ */ Do({
|
|
1396
|
+
getColumnOffset: function(e, r, o) {
|
|
1397
|
+
return ve("column", e, r, o).offset;
|
|
1396
1398
|
},
|
|
1397
|
-
getColumnStartIndexForOffset: function(e,
|
|
1398
|
-
return Xt("column", e, o,
|
|
1399
|
+
getColumnStartIndexForOffset: function(e, r, o) {
|
|
1400
|
+
return Xt("column", e, o, r);
|
|
1399
1401
|
},
|
|
1400
|
-
getColumnStopIndexForStartIndex: function(e,
|
|
1401
|
-
for (var a = e.columnCount, c = e.width, s = ve("column", e,
|
|
1402
|
-
u++,
|
|
1402
|
+
getColumnStopIndexForStartIndex: function(e, r, o, n) {
|
|
1403
|
+
for (var a = e.columnCount, c = e.width, s = ve("column", e, r, n), l = o + c, d = s.offset + s.size, u = r; u < a - 1 && d < l; )
|
|
1404
|
+
u++, d += ve("column", e, u, n).size;
|
|
1403
1405
|
return u;
|
|
1404
1406
|
},
|
|
1405
|
-
getColumnWidth: function(e,
|
|
1406
|
-
return o.columnMetadataMap[
|
|
1407
|
+
getColumnWidth: function(e, r, o) {
|
|
1408
|
+
return o.columnMetadataMap[r].size;
|
|
1407
1409
|
},
|
|
1408
|
-
getEstimatedTotalHeight:
|
|
1409
|
-
getEstimatedTotalWidth:
|
|
1410
|
-
getOffsetForColumnAndAlignment: function(e,
|
|
1411
|
-
return Jt("column", e,
|
|
1410
|
+
getEstimatedTotalHeight: Pr,
|
|
1411
|
+
getEstimatedTotalWidth: Sr,
|
|
1412
|
+
getOffsetForColumnAndAlignment: function(e, r, o, n, a, c) {
|
|
1413
|
+
return Jt("column", e, r, o, n, a, c);
|
|
1412
1414
|
},
|
|
1413
|
-
getOffsetForRowAndAlignment: function(e,
|
|
1414
|
-
return Jt("row", e,
|
|
1415
|
+
getOffsetForRowAndAlignment: function(e, r, o, n, a, c) {
|
|
1416
|
+
return Jt("row", e, r, o, n, a, c);
|
|
1415
1417
|
},
|
|
1416
|
-
getRowOffset: function(e,
|
|
1417
|
-
return ve("row", e,
|
|
1418
|
+
getRowOffset: function(e, r, o) {
|
|
1419
|
+
return ve("row", e, r, o).offset;
|
|
1418
1420
|
},
|
|
1419
|
-
getRowHeight: function(e,
|
|
1420
|
-
return o.rowMetadataMap[
|
|
1421
|
+
getRowHeight: function(e, r, o) {
|
|
1422
|
+
return o.rowMetadataMap[r].size;
|
|
1421
1423
|
},
|
|
1422
|
-
getRowStartIndexForOffset: function(e,
|
|
1423
|
-
return Xt("row", e, o,
|
|
1424
|
+
getRowStartIndexForOffset: function(e, r, o) {
|
|
1425
|
+
return Xt("row", e, o, r);
|
|
1424
1426
|
},
|
|
1425
|
-
getRowStopIndexForStartIndex: function(e,
|
|
1426
|
-
for (var a = e.rowCount, c = e.height, s = ve("row", e,
|
|
1427
|
-
u++,
|
|
1427
|
+
getRowStopIndexForStartIndex: function(e, r, o, n) {
|
|
1428
|
+
for (var a = e.rowCount, c = e.height, s = ve("row", e, r, n), l = o + c, d = s.offset + s.size, u = r; u < a - 1 && d < l; )
|
|
1429
|
+
u++, d += ve("row", e, u, n).size;
|
|
1428
1430
|
return u;
|
|
1429
1431
|
},
|
|
1430
|
-
initInstanceProps: function(e,
|
|
1431
|
-
var o = e,
|
|
1432
|
+
initInstanceProps: function(e, r) {
|
|
1433
|
+
var o = e, n = o.estimatedColumnWidth, a = o.estimatedRowHeight, c = {
|
|
1432
1434
|
columnMetadataMap: {},
|
|
1433
|
-
estimatedColumnWidth:
|
|
1435
|
+
estimatedColumnWidth: n || Kt,
|
|
1434
1436
|
estimatedRowHeight: a || Kt,
|
|
1435
1437
|
lastMeasuredColumnIndex: -1,
|
|
1436
1438
|
lastMeasuredRowIndex: -1,
|
|
1437
1439
|
rowMetadataMap: {}
|
|
1438
1440
|
};
|
|
1439
|
-
return
|
|
1440
|
-
|
|
1441
|
+
return r.resetAfterColumnIndex = function(s, l) {
|
|
1442
|
+
l === void 0 && (l = !0), r.resetAfterIndices({
|
|
1441
1443
|
columnIndex: s,
|
|
1442
|
-
shouldForceUpdate:
|
|
1444
|
+
shouldForceUpdate: l
|
|
1443
1445
|
});
|
|
1444
|
-
},
|
|
1445
|
-
|
|
1446
|
+
}, r.resetAfterRowIndex = function(s, l) {
|
|
1447
|
+
l === void 0 && (l = !0), r.resetAfterIndices({
|
|
1446
1448
|
rowIndex: s,
|
|
1447
|
-
shouldForceUpdate:
|
|
1449
|
+
shouldForceUpdate: l
|
|
1448
1450
|
});
|
|
1449
|
-
},
|
|
1450
|
-
var
|
|
1451
|
-
typeof
|
|
1451
|
+
}, r.resetAfterIndices = function(s) {
|
|
1452
|
+
var l = s.columnIndex, d = s.rowIndex, u = s.shouldForceUpdate, f = u === void 0 ? !0 : u;
|
|
1453
|
+
typeof l == "number" && (c.lastMeasuredColumnIndex = Math.min(c.lastMeasuredColumnIndex, l - 1)), typeof d == "number" && (c.lastMeasuredRowIndex = Math.min(c.lastMeasuredRowIndex, d - 1)), r._getItemStyleCache(-1), f && r.forceUpdate();
|
|
1452
1454
|
}, c;
|
|
1453
1455
|
},
|
|
1454
1456
|
shouldResetStyleCacheOnItemSizeChange: !1,
|
|
1455
1457
|
validateProps: function(e) {
|
|
1456
|
-
var
|
|
1458
|
+
var r = e.columnWidth, o = e.rowHeight;
|
|
1457
1459
|
if (process.env.NODE_ENV !== "production") {
|
|
1458
|
-
if (typeof
|
|
1459
|
-
throw Error('An invalid "columnWidth" prop has been specified. Value should be a function. ' + ('"' + (
|
|
1460
|
+
if (typeof r != "function")
|
|
1461
|
+
throw Error('An invalid "columnWidth" prop has been specified. Value should be a function. ' + ('"' + (r === null ? "null" : typeof r) + '" was specified.'));
|
|
1460
1462
|
if (typeof o != "function")
|
|
1461
1463
|
throw Error('An invalid "rowHeight" prop has been specified. Value should be a function. ' + ('"' + (o === null ? "null" : typeof o) + '" was specified.'));
|
|
1462
1464
|
}
|
|
@@ -1464,37 +1466,37 @@ var Oo = function(e, n) {
|
|
|
1464
1466
|
});
|
|
1465
1467
|
process.env.NODE_ENV;
|
|
1466
1468
|
function Yt(t, e) {
|
|
1467
|
-
for (var
|
|
1468
|
-
if (!(
|
|
1469
|
+
for (var r in t)
|
|
1470
|
+
if (!(r in e))
|
|
1469
1471
|
return !0;
|
|
1470
1472
|
for (var o in e)
|
|
1471
1473
|
if (t[o] !== e[o])
|
|
1472
1474
|
return !0;
|
|
1473
1475
|
return !1;
|
|
1474
1476
|
}
|
|
1475
|
-
var
|
|
1476
|
-
function
|
|
1477
|
-
var
|
|
1478
|
-
return !Yt(
|
|
1477
|
+
var Fo = ["style"], Mo = ["style"];
|
|
1478
|
+
function Wo(t, e) {
|
|
1479
|
+
var r = t.style, o = Ut(t, Fo), n = e.style, a = Ut(e, Mo);
|
|
1480
|
+
return !Yt(r, n) && !Yt(o, a);
|
|
1479
1481
|
}
|
|
1480
|
-
const
|
|
1481
|
-
const { viewMode: t } = Je(), { scrollMode: e } = Oe(), { setColumnCount:
|
|
1482
|
-
(g) =>
|
|
1483
|
-
[
|
|
1482
|
+
const Ho = () => {
|
|
1483
|
+
const { viewMode: t } = Je(), { scrollMode: e } = Oe(), { setColumnCount: r } = sr(), { virtualScrollableElementRef: o } = Ye(), n = Tt(), a = x(
|
|
1484
|
+
(g) => n.widths[g] || 0,
|
|
1485
|
+
[n.widths]
|
|
1484
1486
|
), c = x(
|
|
1485
|
-
(g) =>
|
|
1486
|
-
[
|
|
1487
|
-
), s =
|
|
1487
|
+
(g) => n.heights[g] || 0,
|
|
1488
|
+
[n.heights]
|
|
1489
|
+
), s = F(() => n.heights.length, [n.heights]), l = F(() => Math.max(...n.widths), [n.widths]), d = F(() => e === K.HORIZONTAL_SCROLLING ? s : t === qe.DUAL_PAGE ? 2 : 1, [t, e, e, s, o, l]);
|
|
1488
1490
|
O(() => {
|
|
1489
|
-
|
|
1490
|
-
}, [
|
|
1491
|
-
const u =
|
|
1491
|
+
r(d);
|
|
1492
|
+
}, [d, r]);
|
|
1493
|
+
const u = F(() => e === K.HORIZONTAL_SCROLLING || e === K.PAGE_SCROLLING ? 1 : Math.round(s / d), [d, s, e]), f = F(() => n.heights.reduce((g, w) => g + w, 0) / n.heights.length || 0, [n]), h = F(() => n.widths.reduce((g, w) => g + w, 0) / n.heights.length || 0, [n]);
|
|
1492
1494
|
return {
|
|
1493
1495
|
rowCount: u,
|
|
1494
1496
|
rowHeight: c,
|
|
1495
|
-
columnCount:
|
|
1497
|
+
columnCount: d,
|
|
1496
1498
|
columnWidth: a,
|
|
1497
|
-
pageDimension:
|
|
1499
|
+
pageDimension: n,
|
|
1498
1500
|
estimatedRowHeight: f,
|
|
1499
1501
|
estimatedColumnWidth: h
|
|
1500
1502
|
};
|
|
@@ -1502,26 +1504,26 @@ const Wo = () => {
|
|
|
1502
1504
|
let ie;
|
|
1503
1505
|
typeof window < "u" ? ie = window : typeof self < "u" ? ie = self : ie = global;
|
|
1504
1506
|
let wt = null, bt = null;
|
|
1505
|
-
const Qt = 20, ut = ie.clearTimeout,
|
|
1506
|
-
pt == null ||
|
|
1507
|
-
return
|
|
1508
|
-
}) : (wt = function([e,
|
|
1509
|
-
pt(e), ut(
|
|
1507
|
+
const Qt = 20, ut = ie.clearTimeout, er = ie.setTimeout, pt = ie.cancelAnimationFrame || ie.mozCancelAnimationFrame || ie.webkitCancelAnimationFrame, tr = ie.requestAnimationFrame || ie.mozRequestAnimationFrame || ie.webkitRequestAnimationFrame;
|
|
1508
|
+
pt == null || tr == null ? (wt = ut, bt = function(e) {
|
|
1509
|
+
return er(e, Qt);
|
|
1510
|
+
}) : (wt = function([e, r]) {
|
|
1511
|
+
pt(e), ut(r);
|
|
1510
1512
|
}, bt = function(e) {
|
|
1511
|
-
const
|
|
1513
|
+
const r = tr(function() {
|
|
1512
1514
|
ut(o), e();
|
|
1513
|
-
}), o =
|
|
1514
|
-
pt(
|
|
1515
|
+
}), o = er(function() {
|
|
1516
|
+
pt(r), e();
|
|
1515
1517
|
}, Qt);
|
|
1516
|
-
return [
|
|
1518
|
+
return [r, o];
|
|
1517
1519
|
});
|
|
1518
|
-
function
|
|
1519
|
-
let e,
|
|
1520
|
-
const
|
|
1521
|
-
if (!
|
|
1520
|
+
function $o(t) {
|
|
1521
|
+
let e, r, o, n, a, c, s;
|
|
1522
|
+
const l = typeof document < "u" && document.attachEvent;
|
|
1523
|
+
if (!l) {
|
|
1522
1524
|
c = function(_) {
|
|
1523
|
-
const m = _.__resizeTriggers__, T = m.firstElementChild,
|
|
1524
|
-
|
|
1525
|
+
const m = _.__resizeTriggers__, T = m.firstElementChild, y = m.lastElementChild, p = T.firstElementChild;
|
|
1526
|
+
y.scrollLeft = y.scrollWidth, y.scrollTop = y.scrollHeight, p.style.width = T.offsetWidth + 1 + "px", p.style.height = T.offsetHeight + 1 + "px", T.scrollLeft = T.scrollWidth, T.scrollTop = T.scrollHeight;
|
|
1525
1527
|
}, a = function(_) {
|
|
1526
1528
|
return _.offsetWidth !== _.__resizeLast__.width || _.offsetHeight !== _.__resizeLast__.height;
|
|
1527
1529
|
}, s = function(_) {
|
|
@@ -1548,34 +1550,34 @@ function Mo(t) {
|
|
|
1548
1550
|
}
|
|
1549
1551
|
}
|
|
1550
1552
|
}
|
|
1551
|
-
|
|
1553
|
+
r = "resizeanim", e = "@" + g + "keyframes " + r + " { from { opacity: 0; } to { opacity: 0; } } ", n = g + "animation: 1ms " + r + "; ";
|
|
1552
1554
|
}
|
|
1553
|
-
const
|
|
1555
|
+
const d = function(h) {
|
|
1554
1556
|
if (!h.getElementById("detectElementResize")) {
|
|
1555
|
-
const g = (e || "") + ".resize-triggers { " + (
|
|
1557
|
+
const g = (e || "") + ".resize-triggers { " + (n || "") + 'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }', w = h.head || h.getElementsByTagName("head")[0], b = h.createElement("style");
|
|
1556
1558
|
b.id = "detectElementResize", b.type = "text/css", t != null && b.setAttribute("nonce", t), b.styleSheet ? b.styleSheet.cssText = g : b.appendChild(h.createTextNode(g)), w.appendChild(b);
|
|
1557
1559
|
}
|
|
1558
1560
|
};
|
|
1559
1561
|
return {
|
|
1560
1562
|
addResizeListener: function(h, g) {
|
|
1561
|
-
if (
|
|
1563
|
+
if (l)
|
|
1562
1564
|
h.attachEvent("onresize", g);
|
|
1563
1565
|
else {
|
|
1564
1566
|
if (!h.__resizeTriggers__) {
|
|
1565
1567
|
const w = h.ownerDocument, b = ie.getComputedStyle(h);
|
|
1566
|
-
b && b.position === "static" && (h.style.position = "relative"),
|
|
1568
|
+
b && b.position === "static" && (h.style.position = "relative"), d(w), h.__resizeLast__ = {}, h.__resizeListeners__ = [], (h.__resizeTriggers__ = w.createElement("div")).className = "resize-triggers";
|
|
1567
1569
|
const v = w.createElement("div");
|
|
1568
1570
|
v.className = "expand-trigger", v.appendChild(w.createElement("div"));
|
|
1569
1571
|
const _ = w.createElement("div");
|
|
1570
1572
|
_.className = "contract-trigger", h.__resizeTriggers__.appendChild(v), h.__resizeTriggers__.appendChild(_), h.appendChild(h.__resizeTriggers__), c(h), h.addEventListener("scroll", s, !0), o && (h.__resizeTriggers__.__animationListener__ = function(T) {
|
|
1571
|
-
T.animationName ===
|
|
1573
|
+
T.animationName === r && c(h);
|
|
1572
1574
|
}, h.__resizeTriggers__.addEventListener(o, h.__resizeTriggers__.__animationListener__));
|
|
1573
1575
|
}
|
|
1574
1576
|
h.__resizeListeners__.push(g);
|
|
1575
1577
|
}
|
|
1576
1578
|
},
|
|
1577
1579
|
removeResizeListener: function(h, g) {
|
|
1578
|
-
if (
|
|
1580
|
+
if (l)
|
|
1579
1581
|
h.detachEvent("onresize", g);
|
|
1580
1582
|
else if (h.__resizeListeners__.splice(h.__resizeListeners__.indexOf(g), 1), !h.__resizeListeners__.length) {
|
|
1581
1583
|
h.removeEventListener("scroll", s, !0), h.__resizeTriggers__.__animationListener__ && (h.__resizeTriggers__.removeEventListener(o, h.__resizeTriggers__.__animationListener__), h.__resizeTriggers__.__animationListener__ = null);
|
|
@@ -1587,7 +1589,7 @@ function Mo(t) {
|
|
|
1587
1589
|
}
|
|
1588
1590
|
};
|
|
1589
1591
|
}
|
|
1590
|
-
class
|
|
1592
|
+
class Vo extends rn {
|
|
1591
1593
|
constructor(...e) {
|
|
1592
1594
|
super(...e), this.state = {
|
|
1593
1595
|
height: this.props.defaultHeight || 0,
|
|
@@ -1597,38 +1599,38 @@ class Ho extends rr {
|
|
|
1597
1599
|
}, this._autoSizer = null, this._detectElementResize = null, this._parentNode = null, this._resizeObserver = null, this._timeoutId = null, this._onResize = () => {
|
|
1598
1600
|
this._timeoutId = null;
|
|
1599
1601
|
const {
|
|
1600
|
-
disableHeight:
|
|
1602
|
+
disableHeight: r,
|
|
1601
1603
|
disableWidth: o,
|
|
1602
|
-
onResize:
|
|
1604
|
+
onResize: n
|
|
1603
1605
|
} = this.props;
|
|
1604
1606
|
if (this._parentNode) {
|
|
1605
|
-
const a = window.getComputedStyle(this._parentNode) || {}, c = parseFloat(a.paddingLeft || "0"), s = parseFloat(a.paddingRight || "0"),
|
|
1606
|
-
(!
|
|
1607
|
+
const a = window.getComputedStyle(this._parentNode) || {}, c = parseFloat(a.paddingLeft || "0"), s = parseFloat(a.paddingRight || "0"), l = parseFloat(a.paddingTop || "0"), d = parseFloat(a.paddingBottom || "0"), u = this._parentNode.getBoundingClientRect(), f = u.height - l - d, h = u.width - c - s, g = this._parentNode.offsetHeight - l - d, w = this._parentNode.offsetWidth - c - s;
|
|
1608
|
+
(!r && (this.state.height !== g || this.state.scaledHeight !== f) || !o && (this.state.width !== w || this.state.scaledWidth !== h)) && (this.setState({
|
|
1607
1609
|
height: g,
|
|
1608
1610
|
width: w,
|
|
1609
1611
|
scaledHeight: f,
|
|
1610
1612
|
scaledWidth: h
|
|
1611
|
-
}), typeof
|
|
1613
|
+
}), typeof n == "function" && n({
|
|
1612
1614
|
height: g,
|
|
1613
1615
|
scaledHeight: f,
|
|
1614
1616
|
scaledWidth: h,
|
|
1615
1617
|
width: w
|
|
1616
1618
|
}));
|
|
1617
1619
|
}
|
|
1618
|
-
}, this._setRef = (
|
|
1619
|
-
this._autoSizer =
|
|
1620
|
+
}, this._setRef = (r) => {
|
|
1621
|
+
this._autoSizer = r;
|
|
1620
1622
|
};
|
|
1621
1623
|
}
|
|
1622
1624
|
componentDidMount() {
|
|
1623
1625
|
const {
|
|
1624
1626
|
nonce: e
|
|
1625
|
-
} = this.props,
|
|
1626
|
-
if (
|
|
1627
|
-
this._parentNode =
|
|
1628
|
-
const o =
|
|
1627
|
+
} = this.props, r = this._autoSizer ? this._autoSizer.parentNode : null;
|
|
1628
|
+
if (r != null && r.ownerDocument && r.ownerDocument.defaultView && r instanceof r.ownerDocument.defaultView.HTMLElement) {
|
|
1629
|
+
this._parentNode = r;
|
|
1630
|
+
const o = r.ownerDocument.defaultView.ResizeObserver;
|
|
1629
1631
|
o != null ? (this._resizeObserver = new o(() => {
|
|
1630
1632
|
this._timeoutId = setTimeout(this._onResize, 0);
|
|
1631
|
-
}), this._resizeObserver.observe(
|
|
1633
|
+
}), this._resizeObserver.observe(r)) : (this._detectElementResize = $o(e), this._detectElementResize.addResizeListener(r, this._onResize)), this._onResize();
|
|
1632
1634
|
}
|
|
1633
1635
|
}
|
|
1634
1636
|
componentWillUnmount() {
|
|
@@ -1637,14 +1639,14 @@ class Ho extends rr {
|
|
|
1637
1639
|
render() {
|
|
1638
1640
|
const {
|
|
1639
1641
|
children: e,
|
|
1640
|
-
defaultHeight:
|
|
1642
|
+
defaultHeight: r,
|
|
1641
1643
|
defaultWidth: o,
|
|
1642
|
-
disableHeight:
|
|
1644
|
+
disableHeight: n = !1,
|
|
1643
1645
|
disableWidth: a = !1,
|
|
1644
1646
|
doNotBailOutOnEmptyChildren: c = !1,
|
|
1645
1647
|
nonce: s,
|
|
1646
|
-
onResize:
|
|
1647
|
-
style:
|
|
1648
|
+
onResize: l,
|
|
1649
|
+
style: d = {},
|
|
1648
1650
|
tagName: u = "div",
|
|
1649
1651
|
...f
|
|
1650
1652
|
} = this.props, {
|
|
@@ -1656,55 +1658,55 @@ class Ho extends rr {
|
|
|
1656
1658
|
overflow: "visible"
|
|
1657
1659
|
}, _ = {};
|
|
1658
1660
|
let m = !1;
|
|
1659
|
-
return
|
|
1661
|
+
return n || (h === 0 && (m = !0), v.height = 0, _.height = h, _.scaledHeight = g), a || (b === 0 && (m = !0), v.width = 0, _.width = b, _.scaledWidth = w), c && (m = !1), He(u, {
|
|
1660
1662
|
ref: this._setRef,
|
|
1661
1663
|
style: {
|
|
1662
1664
|
...v,
|
|
1663
|
-
...
|
|
1665
|
+
...d
|
|
1664
1666
|
},
|
|
1665
1667
|
...f
|
|
1666
1668
|
}, !m && e(_));
|
|
1667
1669
|
}
|
|
1668
1670
|
}
|
|
1669
|
-
const
|
|
1670
|
-
const { focusedPage:
|
|
1671
|
-
const
|
|
1672
|
-
if (
|
|
1673
|
-
const u =
|
|
1674
|
-
|
|
1671
|
+
const Go = ({ widths: t, heights: e }) => {
|
|
1672
|
+
const { focusedPage: r, totalPages: o } = ce(), { isScrolling: n } = Qe(), a = F(() => {
|
|
1673
|
+
const l = [], d = Math.ceil(r / 2) * 2 - 1;
|
|
1674
|
+
if (l.push(d), d + 1 < o) {
|
|
1675
|
+
const u = d + 1;
|
|
1676
|
+
l.push(u);
|
|
1675
1677
|
}
|
|
1676
|
-
return
|
|
1677
|
-
}, [
|
|
1678
|
+
return l;
|
|
1679
|
+
}, [r, o]), c = F(() => [
|
|
1678
1680
|
{
|
|
1679
1681
|
position: "absolute",
|
|
1680
1682
|
left: 0,
|
|
1681
|
-
width: t(
|
|
1682
|
-
height: e(
|
|
1683
|
+
width: t(r - 1),
|
|
1684
|
+
height: e(r - 1)
|
|
1683
1685
|
},
|
|
1684
1686
|
{
|
|
1685
1687
|
position: "absolute",
|
|
1686
|
-
left: t(
|
|
1688
|
+
left: t(r),
|
|
1687
1689
|
top: 0,
|
|
1688
|
-
width: t(
|
|
1689
|
-
height: e(
|
|
1690
|
+
width: t(r),
|
|
1691
|
+
height: e(r)
|
|
1690
1692
|
}
|
|
1691
1693
|
], [t, e, a]);
|
|
1692
1694
|
O(() => {
|
|
1693
|
-
|
|
1694
|
-
}, [
|
|
1695
|
-
const s =
|
|
1696
|
-
return /* @__PURE__ */ i("div", { style: { width: s, position: "relative" }, children: a.map((
|
|
1697
|
-
}, style: c[
|
|
1698
|
-
},
|
|
1699
|
-
const { focusedPage:
|
|
1695
|
+
n.current = !1;
|
|
1696
|
+
}, [r]);
|
|
1697
|
+
const s = F(() => c.reduce((l, d) => l + Number(d.width || 0), 0), [c]);
|
|
1698
|
+
return /* @__PURE__ */ i("div", { style: { width: s, position: "relative" }, children: a.map((l, d) => /* @__PURE__ */ i(xt, { onIntersectRatioChange: () => {
|
|
1699
|
+
}, style: c[d], pageNumber: l }, l)) });
|
|
1700
|
+
}, qo = ({ widths: t, heights: e }) => {
|
|
1701
|
+
const { focusedPage: r } = ce(), { isScrolling: o } = Qe(), n = F(() => ({
|
|
1700
1702
|
position: "absolute",
|
|
1701
|
-
width: t(
|
|
1702
|
-
height: e(
|
|
1703
|
-
}), [t, e,
|
|
1703
|
+
width: t(r - 1),
|
|
1704
|
+
height: e(r - 1)
|
|
1705
|
+
}), [t, e, r]);
|
|
1704
1706
|
O(() => {
|
|
1705
1707
|
o.current = !1;
|
|
1706
|
-
}, [
|
|
1707
|
-
const a =
|
|
1708
|
+
}, [r]);
|
|
1709
|
+
const a = F(() => t(r - 1), [t]);
|
|
1708
1710
|
return /* @__PURE__ */ i(
|
|
1709
1711
|
"div",
|
|
1710
1712
|
{
|
|
@@ -1715,120 +1717,120 @@ const $o = ({ widths: t, heights: e }) => {
|
|
|
1715
1717
|
children: /* @__PURE__ */ i(
|
|
1716
1718
|
xt,
|
|
1717
1719
|
{
|
|
1718
|
-
style:
|
|
1720
|
+
style: n,
|
|
1719
1721
|
onIntersectRatioChange: () => {
|
|
1720
1722
|
},
|
|
1721
|
-
pageNumber:
|
|
1723
|
+
pageNumber: r
|
|
1722
1724
|
},
|
|
1723
|
-
|
|
1725
|
+
r
|
|
1724
1726
|
)
|
|
1725
1727
|
}
|
|
1726
1728
|
);
|
|
1727
|
-
},
|
|
1728
|
-
const
|
|
1729
|
+
}, Uo = nn(({ columnIndex: t, rowIndex: e, data: r, style: o }) => {
|
|
1730
|
+
const n = t + 1 + e * r.columnCount;
|
|
1729
1731
|
return /* @__PURE__ */ i(
|
|
1730
1732
|
xt,
|
|
1731
1733
|
{
|
|
1732
1734
|
style: o,
|
|
1733
|
-
onIntersectRatioChange:
|
|
1734
|
-
pageNumber:
|
|
1735
|
+
onIntersectRatioChange: r.handleIntersectRatioChange,
|
|
1736
|
+
pageNumber: n
|
|
1735
1737
|
},
|
|
1736
|
-
|
|
1738
|
+
n
|
|
1737
1739
|
);
|
|
1738
|
-
},
|
|
1739
|
-
const { initialPage: t = 1, initialScrollMode: e } =
|
|
1740
|
-
|
|
1741
|
-
const { scrollToPage:
|
|
1740
|
+
}, Wo), Ps = () => {
|
|
1741
|
+
const { initialPage: t = 1, initialScrollMode: e } = ln(), { pagesRef: r, setPagesRef: o } = xe();
|
|
1742
|
+
zn(r);
|
|
1743
|
+
const { scrollToPage: n } = gr(), {
|
|
1742
1744
|
virtualScrollRef: a,
|
|
1743
1745
|
getVirtualScrollRef: c,
|
|
1744
1746
|
getPageScrollElementRef: s,
|
|
1745
|
-
getVirtualScrollableElementRef:
|
|
1746
|
-
setTotalInnerDimensions:
|
|
1747
|
+
getVirtualScrollableElementRef: l,
|
|
1748
|
+
setTotalInnerDimensions: d,
|
|
1747
1749
|
virtualScrollableElementRef: u,
|
|
1748
1750
|
totalInnerDimensions: f,
|
|
1749
1751
|
pageScrollElementRef: h
|
|
1750
|
-
} = Ye(), g =
|
|
1752
|
+
} = Ye(), g = M(!0), { nextPage: w, prevPage: b, setFocusedPage: v, focusedPage: _ } = ce(), { scrollMode: m } = Oe(), { viewMode: T } = Je(), y = M(null), { loading: p } = X(), { LoaderImageComponent: P } = dr(), C = M(
|
|
1751
1753
|
f
|
|
1752
|
-
), S =
|
|
1754
|
+
), S = M({
|
|
1753
1755
|
viewMode: T,
|
|
1754
1756
|
scrollMode: m
|
|
1755
|
-
}), A =
|
|
1757
|
+
}), A = M(!1), R = M(), { isFullScreen: D } = dn(), {
|
|
1756
1758
|
pageDimension: L,
|
|
1757
|
-
rowCount:
|
|
1759
|
+
rowCount: k,
|
|
1758
1760
|
rowHeight: E,
|
|
1759
|
-
columnCount:
|
|
1761
|
+
columnCount: I,
|
|
1760
1762
|
columnWidth: N,
|
|
1761
|
-
estimatedColumnWidth:
|
|
1762
|
-
estimatedRowHeight:
|
|
1763
|
-
} =
|
|
1763
|
+
estimatedColumnWidth: V,
|
|
1764
|
+
estimatedRowHeight: q
|
|
1765
|
+
} = Ho(), Z = vt(f, 100), [ee, B] = $({}), J = vt(ee, 100), { isScrolling: ae } = Qe(), re = M(), j = M({
|
|
1764
1766
|
scrollTop: 0,
|
|
1765
1767
|
scrollLeft: 0
|
|
1766
1768
|
});
|
|
1767
|
-
|
|
1768
|
-
const { isPressed: Y } =
|
|
1769
|
+
Wn(r);
|
|
1770
|
+
const { isPressed: Y } = Fn(), { selectionMode: de } = cn(), { initializeGrabScroll: Ce, resetGrabState: De } = Mn({
|
|
1769
1771
|
isPressed: Y
|
|
1770
|
-
}), ue =
|
|
1771
|
-
|
|
1772
|
-
}, []), ge =
|
|
1773
|
-
columnCount:
|
|
1772
|
+
}), ue = F(() => de === an.HAND, [de]), pe = x((W, H) => {
|
|
1773
|
+
B((Q) => H > -1 ? { ...Q, [W]: Math.round(H * 100) } : (delete Q[W], Q));
|
|
1774
|
+
}, []), ge = F(() => ({
|
|
1775
|
+
columnCount: I,
|
|
1774
1776
|
handleIntersectRatioChange: pe
|
|
1775
|
-
}), [
|
|
1776
|
-
(
|
|
1777
|
-
const H = document.activeElement !==
|
|
1778
|
-
!D && H || (["ArrowUp", "ArrowLeft"].includes(
|
|
1777
|
+
}), [I, pe]), Te = x(
|
|
1778
|
+
(W) => {
|
|
1779
|
+
const H = document.activeElement !== r;
|
|
1780
|
+
!D && H || (["ArrowUp", "ArrowLeft"].includes(W.key) ? (W.preventDefault(), b()) : ["ArrowDown", "ArrowRight"].includes(W.key) && (W.preventDefault(), w()));
|
|
1779
1781
|
},
|
|
1780
1782
|
[w, b, D, m]
|
|
1781
1783
|
);
|
|
1782
|
-
O(() => (window.addEventListener("keydown",
|
|
1783
|
-
window.removeEventListener("keydown",
|
|
1784
|
-
}), [
|
|
1785
|
-
if (
|
|
1786
|
-
for (let
|
|
1787
|
-
for (let H = 0; H <
|
|
1784
|
+
O(() => (window.addEventListener("keydown", Te), () => {
|
|
1785
|
+
window.removeEventListener("keydown", Te);
|
|
1786
|
+
}), [Te]), O(() => {
|
|
1787
|
+
if (y.current && (y.current.style.position = "relative"), !!a)
|
|
1788
|
+
for (let W = 0; W < k; W++)
|
|
1789
|
+
for (let H = 0; H < I; H++)
|
|
1788
1790
|
a.resetAfterIndices({
|
|
1789
1791
|
columnIndex: H,
|
|
1790
|
-
rowIndex:
|
|
1792
|
+
rowIndex: W,
|
|
1791
1793
|
shouldForceUpdate: !0
|
|
1792
1794
|
});
|
|
1793
|
-
}, [
|
|
1795
|
+
}, [k, I, L, a]);
|
|
1794
1796
|
const tt = x(
|
|
1795
|
-
(
|
|
1797
|
+
(W, H) => {
|
|
1796
1798
|
if (!u)
|
|
1797
1799
|
return { scrollTop: 0, scrollLeft: 0 };
|
|
1798
|
-
const Q =
|
|
1799
|
-
return Q || se ?
|
|
1800
|
+
const Q = j.current.scrollTop > H, se = j.current.scrollLeft > W;
|
|
1801
|
+
return Q || se ? j.current : {
|
|
1800
1802
|
scrollTop: u.scrollTop,
|
|
1801
1803
|
scrollLeft: u.scrollLeft
|
|
1802
1804
|
};
|
|
1803
1805
|
},
|
|
1804
1806
|
[u]
|
|
1805
|
-
),
|
|
1806
|
-
(
|
|
1807
|
+
), Br = x(
|
|
1808
|
+
(W, H) => {
|
|
1807
1809
|
if (ae.current)
|
|
1808
1810
|
return;
|
|
1809
1811
|
if (S.current.viewMode !== T || S.current.scrollMode !== m) {
|
|
1810
|
-
|
|
1812
|
+
re.current && clearTimeout(re.current), B({}), A.current = !0, n(_), m === K.HORIZONTAL_SCROLLING && (a == null || a.scrollTo({
|
|
1811
1813
|
scrollTop: 0
|
|
1812
|
-
})),
|
|
1814
|
+
})), re.current = setTimeout(() => {
|
|
1813
1815
|
requestAnimationFrame(() => {
|
|
1814
1816
|
S.current = { viewMode: T, scrollMode: m };
|
|
1815
1817
|
});
|
|
1816
1818
|
}, 100);
|
|
1817
1819
|
return;
|
|
1818
1820
|
}
|
|
1819
|
-
const se =
|
|
1821
|
+
const se = W.scrollTop, rt = W.scrollLeft;
|
|
1820
1822
|
if (!H.height || !H.width)
|
|
1821
1823
|
return;
|
|
1822
1824
|
A.current = !0;
|
|
1823
|
-
const { height:
|
|
1824
|
-
if (Ot ===
|
|
1825
|
+
const { height: Pe, width: nt } = H, { height: Ot, width: Dt } = C.current;
|
|
1826
|
+
if (Ot === Pe && Dt === nt)
|
|
1825
1827
|
return;
|
|
1826
|
-
const
|
|
1828
|
+
const Jr = se / Ot * Pe, Yr = rt / Dt * nt, Qr = Math.round(Math.min(Jr, Pe)) || 0, en = Math.round(Math.min(Yr, nt)) || 0;
|
|
1827
1829
|
R.current = setTimeout(() => {
|
|
1828
1830
|
requestAnimationFrame(() => {
|
|
1829
1831
|
a == null || a.scrollTo({
|
|
1830
|
-
scrollTop:
|
|
1831
|
-
scrollLeft:
|
|
1832
|
+
scrollTop: Qr,
|
|
1833
|
+
scrollLeft: en
|
|
1832
1834
|
});
|
|
1833
1835
|
});
|
|
1834
1836
|
}, 0), C.current = {
|
|
@@ -1840,46 +1842,46 @@ const $o = ({ widths: t, heights: e }) => {
|
|
|
1840
1842
|
);
|
|
1841
1843
|
O(() => {
|
|
1842
1844
|
clearTimeout(R.current);
|
|
1843
|
-
const
|
|
1844
|
-
(se,
|
|
1845
|
+
const W = Array.from({ length: k }).reduce(
|
|
1846
|
+
(se, rt, Pe) => se + E(Pe),
|
|
1845
1847
|
0
|
|
1846
|
-
), H = Array.from({ length:
|
|
1847
|
-
(se,
|
|
1848
|
+
), H = Array.from({ length: I }).reduce(
|
|
1849
|
+
(se, rt, Pe) => se + N(Pe),
|
|
1848
1850
|
0
|
|
1849
|
-
), Q = tt(H,
|
|
1850
|
-
|
|
1851
|
-
height:
|
|
1851
|
+
), Q = tt(H, W);
|
|
1852
|
+
j.current = Q, Br(Q, { height: W, width: H }), d({
|
|
1853
|
+
height: W,
|
|
1852
1854
|
width: H
|
|
1853
1855
|
});
|
|
1854
|
-
}, [L,
|
|
1855
|
-
const
|
|
1856
|
-
|
|
1857
|
-
scrollTop:
|
|
1858
|
-
scrollLeft:
|
|
1856
|
+
}, [L, k, I]);
|
|
1857
|
+
const jr = x((W) => {
|
|
1858
|
+
j.current = {
|
|
1859
|
+
scrollTop: W.scrollTop,
|
|
1860
|
+
scrollLeft: W.scrollLeft
|
|
1859
1861
|
};
|
|
1860
1862
|
}, []);
|
|
1861
1863
|
O(() => {
|
|
1862
1864
|
if ((ae.current || A.current) && (ae.current = !1), ae.current)
|
|
1863
1865
|
return;
|
|
1864
|
-
const
|
|
1866
|
+
const W = Object.entries(J);
|
|
1865
1867
|
let H = 0, Q = -1;
|
|
1866
|
-
|
|
1868
|
+
W.forEach((se) => {
|
|
1867
1869
|
Q < se[1] && (H = Number(se[0]), Q = se[1]);
|
|
1868
1870
|
}), H && v(H);
|
|
1869
1871
|
}, [J, v]), O(() => () => {
|
|
1870
|
-
|
|
1872
|
+
re.current && clearTimeout(re.current);
|
|
1871
1873
|
}, []);
|
|
1872
|
-
const
|
|
1874
|
+
const Kr = F(() => oe(he["rp-pages-container"], {
|
|
1873
1875
|
[he["rp-cursor-grab"]]: ue && !Y,
|
|
1874
1876
|
[he["rp-cursor-grabbing"]]: ue && Y
|
|
1875
|
-
}), [ue, Y]),
|
|
1876
|
-
(
|
|
1877
|
-
if (ue &&
|
|
1877
|
+
}), [ue, Y]), Xr = x(
|
|
1878
|
+
(W) => {
|
|
1879
|
+
if (ue && W) {
|
|
1878
1880
|
const H = oe(he["rp-pages"]), Q = document.querySelector(`.${H}`);
|
|
1879
|
-
|
|
1881
|
+
Ce(Q);
|
|
1880
1882
|
}
|
|
1881
1883
|
},
|
|
1882
|
-
[ue,
|
|
1884
|
+
[ue, Ce, he]
|
|
1883
1885
|
);
|
|
1884
1886
|
return O(() => {
|
|
1885
1887
|
p && De();
|
|
@@ -1915,35 +1917,35 @@ const $o = ({ widths: t, heights: e }) => {
|
|
|
1915
1917
|
h,
|
|
1916
1918
|
v,
|
|
1917
1919
|
Z
|
|
1918
|
-
]), /* @__PURE__ */ i("div", { ref: o, tabIndex: -1, className:
|
|
1920
|
+
]), /* @__PURE__ */ i("div", { ref: o, tabIndex: -1, className: Kr, children: /* @__PURE__ */ i(Vo, { style: { minHeight: "50px" }, children: ({ width: W, height: H }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: Xr, style: { width: W, height: H }, children: m === K.PAGE_SCROLLING ? /* @__PURE__ */ i(
|
|
1919
1921
|
"div",
|
|
1920
1922
|
{
|
|
1921
1923
|
ref: s,
|
|
1922
|
-
style: { width:
|
|
1924
|
+
style: { width: W, height: H },
|
|
1923
1925
|
className: oe(he["rp-pages"], he["rp-page-scrolling-wrapper"]),
|
|
1924
|
-
children: T ===
|
|
1926
|
+
children: T === qe.DUAL_PAGE ? /* @__PURE__ */ i(Go, { widths: N, heights: E }) : /* @__PURE__ */ i(qo, { widths: N, heights: E })
|
|
1925
1927
|
}
|
|
1926
|
-
) :
|
|
1927
|
-
|
|
1928
|
+
) : V ? /* @__PURE__ */ i(
|
|
1929
|
+
ko,
|
|
1928
1930
|
{
|
|
1929
1931
|
ref: c,
|
|
1930
1932
|
itemData: ge,
|
|
1931
|
-
outerRef:
|
|
1932
|
-
innerRef:
|
|
1933
|
-
onScroll:
|
|
1934
|
-
columnCount:
|
|
1933
|
+
outerRef: l,
|
|
1934
|
+
innerRef: y,
|
|
1935
|
+
onScroll: jr,
|
|
1936
|
+
columnCount: I,
|
|
1935
1937
|
columnWidth: N,
|
|
1936
1938
|
rowHeight: E,
|
|
1937
1939
|
height: H,
|
|
1938
|
-
width:
|
|
1939
|
-
estimatedColumnWidth:
|
|
1940
|
-
estimatedRowHeight:
|
|
1941
|
-
rowCount:
|
|
1940
|
+
width: W,
|
|
1941
|
+
estimatedColumnWidth: V,
|
|
1942
|
+
estimatedRowHeight: q,
|
|
1943
|
+
rowCount: k,
|
|
1942
1944
|
className: oe(
|
|
1943
1945
|
he["rp-pages"],
|
|
1944
1946
|
m === K.HORIZONTAL_SCROLLING ? he["rp-pages-horizontal-scroll"] : ""
|
|
1945
1947
|
),
|
|
1946
|
-
children:
|
|
1948
|
+
children: Uo
|
|
1947
1949
|
}
|
|
1948
1950
|
) : p ? null : /* @__PURE__ */ i(
|
|
1949
1951
|
"div",
|
|
@@ -1966,17 +1968,17 @@ const $o = ({ widths: t, heights: e }) => {
|
|
|
1966
1968
|
"rp-toolbar-middle": "_rp-toolbar-middle_sz31z_39",
|
|
1967
1969
|
"rp-toolbar-end": "_rp-toolbar-end_sz31z_46"
|
|
1968
1970
|
}, ht = {
|
|
1969
|
-
"rp-paginate": "_rp-
|
|
1970
|
-
"rp-page-input": "_rp-page-
|
|
1971
|
-
"rp-total-page": "_rp-total-
|
|
1972
|
-
},
|
|
1971
|
+
"rp-paginate": "_rp-paginate_1y9vo_1",
|
|
1972
|
+
"rp-page-input": "_rp-page-input_1y9vo_6",
|
|
1973
|
+
"rp-total-page": "_rp-total-page_1y9vo_11"
|
|
1974
|
+
}, Zo = () => {
|
|
1973
1975
|
const { prevIcon: t } = fe();
|
|
1974
|
-
return t || /* @__PURE__ */ i(
|
|
1975
|
-
},
|
|
1976
|
+
return t || /* @__PURE__ */ i(Fe, {});
|
|
1977
|
+
}, Bo = () => {
|
|
1976
1978
|
const { nextIcon: t } = fe();
|
|
1977
|
-
return t || /* @__PURE__ */ i(
|
|
1978
|
-
},
|
|
1979
|
-
const { focusedPage: t, totalPages: e, setFocusedPage:
|
|
1979
|
+
return t || /* @__PURE__ */ i(Fe, { style: { transform: "rotate(180deg" } });
|
|
1980
|
+
}, jo = () => {
|
|
1981
|
+
const { focusedPage: t, totalPages: e, setFocusedPage: r, nextPage: o, prevPage: n, goToPage: a } = ce(), [c, s] = $(t.toString()), { pageNavigationTool: l = !0 } = _e(), { isSmallScreen: d } = Re(), { localeMessages: u } = me();
|
|
1980
1982
|
O(() => {
|
|
1981
1983
|
s(t.toString());
|
|
1982
1984
|
}, [t]);
|
|
@@ -1994,28 +1996,28 @@ const $o = ({ widths: t, heights: e }) => {
|
|
|
1994
1996
|
},
|
|
1995
1997
|
[h]
|
|
1996
1998
|
);
|
|
1997
|
-
return typeof
|
|
1998
|
-
|
|
1999
|
+
return typeof l != "boolean" ? /* @__PURE__ */ i(
|
|
2000
|
+
l,
|
|
1999
2001
|
{
|
|
2000
2002
|
total: e,
|
|
2001
2003
|
current: t,
|
|
2002
2004
|
nextPage: o,
|
|
2003
|
-
prevPage:
|
|
2005
|
+
prevPage: n,
|
|
2004
2006
|
goToPage: a,
|
|
2005
|
-
changePage:
|
|
2007
|
+
changePage: r
|
|
2006
2008
|
}
|
|
2007
|
-
) :
|
|
2008
|
-
!
|
|
2009
|
+
) : l ? /* @__PURE__ */ z("div", { className: ht["rp-paginate"], children: [
|
|
2010
|
+
!d && /* @__PURE__ */ i(U, { content: u == null ? void 0 : u.previousPageTooltip, children: /* @__PURE__ */ i(
|
|
2009
2011
|
te,
|
|
2010
2012
|
{
|
|
2011
|
-
onClick:
|
|
2013
|
+
onClick: n,
|
|
2012
2014
|
"aria-label": u == null ? void 0 : u.previousPageTooltip,
|
|
2013
2015
|
"aria-disabled": t === 1,
|
|
2014
|
-
children: /* @__PURE__ */ i(
|
|
2016
|
+
children: /* @__PURE__ */ i(Zo, {})
|
|
2015
2017
|
}
|
|
2016
2018
|
) }),
|
|
2017
|
-
/* @__PURE__ */ i(
|
|
2018
|
-
|
|
2019
|
+
/* @__PURE__ */ i(U, { content: u == null ? void 0 : u.currentPageTooltip, children: /* @__PURE__ */ i(
|
|
2020
|
+
ar,
|
|
2019
2021
|
{
|
|
2020
2022
|
onKeyDown: w,
|
|
2021
2023
|
onBlur: g,
|
|
@@ -2028,91 +2030,91 @@ const $o = ({ widths: t, heights: e }) => {
|
|
|
2028
2030
|
"/",
|
|
2029
2031
|
e
|
|
2030
2032
|
] }),
|
|
2031
|
-
!
|
|
2033
|
+
!d && /* @__PURE__ */ i(U, { content: u == null ? void 0 : u.nextPageTooltip, children: /* @__PURE__ */ i(
|
|
2032
2034
|
te,
|
|
2033
2035
|
{
|
|
2034
2036
|
onClick: o,
|
|
2035
2037
|
"aria-label": u == null ? void 0 : u.nextPageTooltip,
|
|
2036
2038
|
"aria-disabled": t === e,
|
|
2037
|
-
children: /* @__PURE__ */ i(
|
|
2039
|
+
children: /* @__PURE__ */ i(Bo, {})
|
|
2038
2040
|
}
|
|
2039
2041
|
) })
|
|
2040
2042
|
] }) : null;
|
|
2041
2043
|
};
|
|
2042
|
-
var Rt = "Dialog", [
|
|
2044
|
+
var Rt = "Dialog", [Ir, Ss] = qn(Rt), [Ko, le] = Ir(Rt), xr = (t) => {
|
|
2043
2045
|
const {
|
|
2044
2046
|
__scopeDialog: e,
|
|
2045
|
-
children:
|
|
2047
|
+
children: r,
|
|
2046
2048
|
open: o,
|
|
2047
|
-
defaultOpen:
|
|
2049
|
+
defaultOpen: n,
|
|
2048
2050
|
onOpenChange: a,
|
|
2049
2051
|
modal: c = !0
|
|
2050
|
-
} = t, s =
|
|
2052
|
+
} = t, s = G.useRef(null), l = G.useRef(null), [d = !1, u] = Zn({
|
|
2051
2053
|
prop: o,
|
|
2052
|
-
defaultProp:
|
|
2054
|
+
defaultProp: n,
|
|
2053
2055
|
onChange: a
|
|
2054
2056
|
});
|
|
2055
2057
|
return /* @__PURE__ */ i(
|
|
2056
|
-
|
|
2058
|
+
Ko,
|
|
2057
2059
|
{
|
|
2058
2060
|
scope: e,
|
|
2059
2061
|
triggerRef: s,
|
|
2060
|
-
contentRef:
|
|
2062
|
+
contentRef: l,
|
|
2061
2063
|
contentId: it(),
|
|
2062
2064
|
titleId: it(),
|
|
2063
2065
|
descriptionId: it(),
|
|
2064
|
-
open:
|
|
2066
|
+
open: d,
|
|
2065
2067
|
onOpenChange: u,
|
|
2066
|
-
onOpenToggle:
|
|
2068
|
+
onOpenToggle: G.useCallback(() => u((f) => !f), [u]),
|
|
2067
2069
|
modal: c,
|
|
2068
|
-
children:
|
|
2070
|
+
children: r
|
|
2069
2071
|
}
|
|
2070
2072
|
);
|
|
2071
2073
|
};
|
|
2072
|
-
|
|
2073
|
-
var
|
|
2074
|
+
xr.displayName = Rt;
|
|
2075
|
+
var Rr = "DialogTrigger", Xo = G.forwardRef(
|
|
2074
2076
|
(t, e) => {
|
|
2075
|
-
const { __scopeDialog:
|
|
2077
|
+
const { __scopeDialog: r, ...o } = t, n = le(Rr, r), a = St(e, n.triggerRef);
|
|
2076
2078
|
return /* @__PURE__ */ i(
|
|
2077
2079
|
We.button,
|
|
2078
2080
|
{
|
|
2079
2081
|
type: "button",
|
|
2080
2082
|
"aria-haspopup": "dialog",
|
|
2081
|
-
"aria-expanded":
|
|
2082
|
-
"aria-controls":
|
|
2083
|
-
"data-state": Et(
|
|
2083
|
+
"aria-expanded": n.open,
|
|
2084
|
+
"aria-controls": n.contentId,
|
|
2085
|
+
"data-state": Et(n.open),
|
|
2084
2086
|
...o,
|
|
2085
2087
|
ref: a,
|
|
2086
|
-
onClick:
|
|
2088
|
+
onClick: ke(t.onClick, n.onOpenToggle)
|
|
2087
2089
|
}
|
|
2088
2090
|
);
|
|
2089
2091
|
}
|
|
2090
2092
|
);
|
|
2091
|
-
|
|
2092
|
-
var Lt = "DialogPortal", [
|
|
2093
|
+
Xo.displayName = Rr;
|
|
2094
|
+
var Lt = "DialogPortal", [Jo, Lr] = Ir(Lt, {
|
|
2093
2095
|
forceMount: void 0
|
|
2094
|
-
}),
|
|
2095
|
-
const { __scopeDialog: e, forceMount:
|
|
2096
|
-
return /* @__PURE__ */ i(
|
|
2096
|
+
}), Nr = (t) => {
|
|
2097
|
+
const { __scopeDialog: e, forceMount: r, children: o, container: n } = t, a = le(Lt, e);
|
|
2098
|
+
return /* @__PURE__ */ i(Jo, { scope: e, forceMount: r, children: G.Children.map(o, (c) => /* @__PURE__ */ i(yt, { present: r || a.open, children: /* @__PURE__ */ i(Jn, { asChild: !0, container: n, children: c }) })) });
|
|
2097
2099
|
};
|
|
2098
|
-
|
|
2099
|
-
var
|
|
2100
|
+
Nr.displayName = Lt;
|
|
2101
|
+
var Ze = "DialogOverlay", Er = G.forwardRef(
|
|
2100
2102
|
(t, e) => {
|
|
2101
|
-
const
|
|
2102
|
-
return a.modal ? /* @__PURE__ */ i(
|
|
2103
|
+
const r = Lr(Ze, t.__scopeDialog), { forceMount: o = r.forceMount, ...n } = t, a = le(Ze, t.__scopeDialog);
|
|
2104
|
+
return a.modal ? /* @__PURE__ */ i(yt, { present: o || a.open, children: /* @__PURE__ */ i(Yo, { ...n, ref: e }) }) : null;
|
|
2103
2105
|
}
|
|
2104
2106
|
);
|
|
2105
|
-
|
|
2106
|
-
var
|
|
2107
|
+
Er.displayName = Ze;
|
|
2108
|
+
var Yo = G.forwardRef(
|
|
2107
2109
|
(t, e) => {
|
|
2108
|
-
const { __scopeDialog:
|
|
2110
|
+
const { __scopeDialog: r, ...o } = t, n = le(Ze, r);
|
|
2109
2111
|
return (
|
|
2110
2112
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
2111
2113
|
// ie. when `Overlay` and `Content` are siblings
|
|
2112
|
-
/* @__PURE__ */ i(
|
|
2114
|
+
/* @__PURE__ */ i(Bn, { as: Gn, allowPinchZoom: !0, shards: [n.contentRef], children: /* @__PURE__ */ i(
|
|
2113
2115
|
We.div,
|
|
2114
2116
|
{
|
|
2115
|
-
"data-state": Et(
|
|
2117
|
+
"data-state": Et(n.open),
|
|
2116
2118
|
...o,
|
|
2117
2119
|
ref: e,
|
|
2118
2120
|
style: { pointerEvents: "auto", ...o.style }
|
|
@@ -2120,47 +2122,47 @@ var Xo = V.forwardRef(
|
|
|
2120
2122
|
) })
|
|
2121
2123
|
);
|
|
2122
2124
|
}
|
|
2123
|
-
),
|
|
2125
|
+
), Ie = "DialogContent", Or = G.forwardRef(
|
|
2124
2126
|
(t, e) => {
|
|
2125
|
-
const
|
|
2126
|
-
return /* @__PURE__ */ i(
|
|
2127
|
+
const r = Lr(Ie, t.__scopeDialog), { forceMount: o = r.forceMount, ...n } = t, a = le(Ie, t.__scopeDialog);
|
|
2128
|
+
return /* @__PURE__ */ i(yt, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(Qo, { ...n, ref: e }) : /* @__PURE__ */ i(ei, { ...n, ref: e }) });
|
|
2127
2129
|
}
|
|
2128
2130
|
);
|
|
2129
|
-
|
|
2130
|
-
var
|
|
2131
|
+
Or.displayName = Ie;
|
|
2132
|
+
var Qo = G.forwardRef(
|
|
2131
2133
|
(t, e) => {
|
|
2132
|
-
const
|
|
2133
|
-
return
|
|
2134
|
+
const r = le(Ie, t.__scopeDialog), o = G.useRef(null), n = St(e, r.contentRef, o);
|
|
2135
|
+
return G.useEffect(() => {
|
|
2134
2136
|
const a = o.current;
|
|
2135
2137
|
if (a)
|
|
2136
|
-
return
|
|
2138
|
+
return Yn(a);
|
|
2137
2139
|
}, []), /* @__PURE__ */ i(
|
|
2138
|
-
|
|
2140
|
+
Dr,
|
|
2139
2141
|
{
|
|
2140
2142
|
...t,
|
|
2141
|
-
ref:
|
|
2142
|
-
trapFocus:
|
|
2143
|
+
ref: n,
|
|
2144
|
+
trapFocus: r.open,
|
|
2143
2145
|
disableOutsidePointerEvents: !0,
|
|
2144
|
-
onCloseAutoFocus:
|
|
2146
|
+
onCloseAutoFocus: ke(t.onCloseAutoFocus, (a) => {
|
|
2145
2147
|
var c;
|
|
2146
|
-
a.preventDefault(), (c =
|
|
2148
|
+
a.preventDefault(), (c = r.triggerRef.current) == null || c.focus();
|
|
2147
2149
|
}),
|
|
2148
|
-
onPointerDownOutside:
|
|
2150
|
+
onPointerDownOutside: ke(t.onPointerDownOutside, (a) => {
|
|
2149
2151
|
const c = a.detail.originalEvent, s = c.button === 0 && c.ctrlKey === !0;
|
|
2150
2152
|
(c.button === 2 || s) && a.preventDefault();
|
|
2151
2153
|
}),
|
|
2152
|
-
onFocusOutside:
|
|
2154
|
+
onFocusOutside: ke(
|
|
2153
2155
|
t.onFocusOutside,
|
|
2154
2156
|
(a) => a.preventDefault()
|
|
2155
2157
|
)
|
|
2156
2158
|
}
|
|
2157
2159
|
);
|
|
2158
2160
|
}
|
|
2159
|
-
),
|
|
2161
|
+
), ei = G.forwardRef(
|
|
2160
2162
|
(t, e) => {
|
|
2161
|
-
const
|
|
2163
|
+
const r = le(Ie, t.__scopeDialog), o = G.useRef(!1), n = G.useRef(!1);
|
|
2162
2164
|
return /* @__PURE__ */ i(
|
|
2163
|
-
|
|
2165
|
+
Dr,
|
|
2164
2166
|
{
|
|
2165
2167
|
...t,
|
|
2166
2168
|
ref: e,
|
|
@@ -2168,31 +2170,31 @@ var Jo = V.forwardRef(
|
|
|
2168
2170
|
disableOutsidePointerEvents: !1,
|
|
2169
2171
|
onCloseAutoFocus: (a) => {
|
|
2170
2172
|
var c, s;
|
|
2171
|
-
(c = t.onCloseAutoFocus) == null || c.call(t, a), a.defaultPrevented || (o.current || (s =
|
|
2173
|
+
(c = t.onCloseAutoFocus) == null || c.call(t, a), a.defaultPrevented || (o.current || (s = r.triggerRef.current) == null || s.focus(), a.preventDefault()), o.current = !1, n.current = !1;
|
|
2172
2174
|
},
|
|
2173
2175
|
onInteractOutside: (a) => {
|
|
2174
|
-
var
|
|
2175
|
-
(
|
|
2176
|
+
var l, d;
|
|
2177
|
+
(l = t.onInteractOutside) == null || l.call(t, a), a.defaultPrevented || (o.current = !0, a.detail.originalEvent.type === "pointerdown" && (n.current = !0));
|
|
2176
2178
|
const c = a.target;
|
|
2177
|
-
((
|
|
2179
|
+
((d = r.triggerRef.current) == null ? void 0 : d.contains(c)) && a.preventDefault(), a.detail.originalEvent.type === "focusin" && n.current && a.preventDefault();
|
|
2178
2180
|
}
|
|
2179
2181
|
}
|
|
2180
2182
|
);
|
|
2181
2183
|
}
|
|
2182
|
-
),
|
|
2184
|
+
), Dr = G.forwardRef(
|
|
2183
2185
|
(t, e) => {
|
|
2184
|
-
const { __scopeDialog:
|
|
2185
|
-
return
|
|
2186
|
+
const { __scopeDialog: r, trapFocus: o, onOpenAutoFocus: n, onCloseAutoFocus: a, ...c } = t, s = le(Ie, r), l = G.useRef(null), d = St(e, l);
|
|
2187
|
+
return jn(), /* @__PURE__ */ z(ye, { children: [
|
|
2186
2188
|
/* @__PURE__ */ i(
|
|
2187
|
-
|
|
2189
|
+
Kn,
|
|
2188
2190
|
{
|
|
2189
2191
|
asChild: !0,
|
|
2190
2192
|
loop: !0,
|
|
2191
2193
|
trapped: o,
|
|
2192
|
-
onMountAutoFocus:
|
|
2194
|
+
onMountAutoFocus: n,
|
|
2193
2195
|
onUnmountAutoFocus: a,
|
|
2194
2196
|
children: /* @__PURE__ */ i(
|
|
2195
|
-
|
|
2197
|
+
Xn,
|
|
2196
2198
|
{
|
|
2197
2199
|
role: "dialog",
|
|
2198
2200
|
id: s.contentId,
|
|
@@ -2200,71 +2202,71 @@ var Jo = V.forwardRef(
|
|
|
2200
2202
|
"aria-labelledby": s.titleId,
|
|
2201
2203
|
"data-state": Et(s.open),
|
|
2202
2204
|
...c,
|
|
2203
|
-
ref:
|
|
2205
|
+
ref: d,
|
|
2204
2206
|
onDismiss: () => s.onOpenChange(!1)
|
|
2205
2207
|
}
|
|
2206
2208
|
)
|
|
2207
2209
|
}
|
|
2208
2210
|
),
|
|
2209
|
-
/* @__PURE__ */ z(
|
|
2210
|
-
/* @__PURE__ */ i(
|
|
2211
|
-
/* @__PURE__ */ i(
|
|
2211
|
+
/* @__PURE__ */ z(ye, { children: [
|
|
2212
|
+
/* @__PURE__ */ i(ri, { titleId: s.titleId }),
|
|
2213
|
+
/* @__PURE__ */ i(oi, { contentRef: l, descriptionId: s.descriptionId })
|
|
2212
2214
|
] })
|
|
2213
2215
|
] });
|
|
2214
2216
|
}
|
|
2215
|
-
), Nt = "DialogTitle",
|
|
2217
|
+
), Nt = "DialogTitle", zr = G.forwardRef(
|
|
2216
2218
|
(t, e) => {
|
|
2217
|
-
const { __scopeDialog:
|
|
2218
|
-
return /* @__PURE__ */ i(We.h2, { id:
|
|
2219
|
+
const { __scopeDialog: r, ...o } = t, n = le(Nt, r);
|
|
2220
|
+
return /* @__PURE__ */ i(We.h2, { id: n.titleId, ...o, ref: e });
|
|
2219
2221
|
}
|
|
2220
2222
|
);
|
|
2221
|
-
|
|
2222
|
-
var
|
|
2223
|
+
zr.displayName = Nt;
|
|
2224
|
+
var Ar = "DialogDescription", ti = G.forwardRef(
|
|
2223
2225
|
(t, e) => {
|
|
2224
|
-
const { __scopeDialog:
|
|
2225
|
-
return /* @__PURE__ */ i(We.p, { id:
|
|
2226
|
+
const { __scopeDialog: r, ...o } = t, n = le(Ar, r);
|
|
2227
|
+
return /* @__PURE__ */ i(We.p, { id: n.descriptionId, ...o, ref: e });
|
|
2226
2228
|
}
|
|
2227
2229
|
);
|
|
2228
|
-
|
|
2229
|
-
var
|
|
2230
|
+
ti.displayName = Ar;
|
|
2231
|
+
var kr = "DialogClose", Fr = G.forwardRef(
|
|
2230
2232
|
(t, e) => {
|
|
2231
|
-
const { __scopeDialog:
|
|
2233
|
+
const { __scopeDialog: r, ...o } = t, n = le(kr, r);
|
|
2232
2234
|
return /* @__PURE__ */ i(
|
|
2233
2235
|
We.button,
|
|
2234
2236
|
{
|
|
2235
2237
|
type: "button",
|
|
2236
2238
|
...o,
|
|
2237
2239
|
ref: e,
|
|
2238
|
-
onClick:
|
|
2240
|
+
onClick: ke(t.onClick, () => n.onOpenChange(!1))
|
|
2239
2241
|
}
|
|
2240
2242
|
);
|
|
2241
2243
|
}
|
|
2242
2244
|
);
|
|
2243
|
-
|
|
2245
|
+
Fr.displayName = kr;
|
|
2244
2246
|
function Et(t) {
|
|
2245
2247
|
return t ? "open" : "closed";
|
|
2246
2248
|
}
|
|
2247
|
-
var
|
|
2248
|
-
contentName:
|
|
2249
|
+
var Mr = "DialogTitleWarning", [ys, Wr] = Un(Mr, {
|
|
2250
|
+
contentName: Ie,
|
|
2249
2251
|
titleName: Nt,
|
|
2250
2252
|
docsSlug: "dialog"
|
|
2251
|
-
}),
|
|
2252
|
-
const e =
|
|
2253
|
+
}), ri = ({ titleId: t }) => {
|
|
2254
|
+
const e = Wr(Mr), r = `\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
2253
2255
|
|
|
2254
2256
|
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
2255
2257
|
|
|
2256
2258
|
For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;
|
|
2257
|
-
return
|
|
2258
|
-
t && (document.getElementById(t) || console.error(
|
|
2259
|
-
}, [
|
|
2260
|
-
},
|
|
2261
|
-
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${
|
|
2262
|
-
return
|
|
2259
|
+
return G.useEffect(() => {
|
|
2260
|
+
t && (document.getElementById(t) || console.error(r));
|
|
2261
|
+
}, [r, t]), null;
|
|
2262
|
+
}, ni = "DialogDescriptionWarning", oi = ({ contentRef: t, descriptionId: e }) => {
|
|
2263
|
+
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Wr(ni).contentName}}.`;
|
|
2264
|
+
return G.useEffect(() => {
|
|
2263
2265
|
var a;
|
|
2264
|
-
const
|
|
2265
|
-
e &&
|
|
2266
|
+
const n = (a = t.current) == null ? void 0 : a.getAttribute("aria-describedby");
|
|
2267
|
+
e && n && (document.getElementById(e) || console.warn(o));
|
|
2266
2268
|
}, [o, t, e]), null;
|
|
2267
|
-
},
|
|
2269
|
+
}, ii = xr, ai = Nr, si = Er, ci = Or, li = zr, di = Fr;
|
|
2268
2270
|
const Se = {
|
|
2269
2271
|
"rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
|
|
2270
2272
|
"rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
|
|
@@ -2273,15 +2275,15 @@ const Se = {
|
|
|
2273
2275
|
"rp-dialog-title": "_rp-dialog-title_slqo7_39",
|
|
2274
2276
|
"rp-dialog-close": "_rp-dialog-close_slqo7_47",
|
|
2275
2277
|
"rp-properties-divider": "_rp-properties-divider_slqo7_55"
|
|
2276
|
-
},
|
|
2277
|
-
const { pdfProperties: t } = X(), { container: e } = xe(), { activeDocumentProperties:
|
|
2278
|
+
}, ui = () => {
|
|
2279
|
+
const { pdfProperties: t } = X(), { container: e } = xe(), { activeDocumentProperties: r, setActiveDocumentProperties: o } = eo(), { localeMessages: n } = me(), a = F(() => {
|
|
2278
2280
|
if (!t)
|
|
2279
2281
|
return [];
|
|
2280
2282
|
const {
|
|
2281
2283
|
fileSize: c,
|
|
2282
2284
|
filename: s,
|
|
2283
|
-
title:
|
|
2284
|
-
author:
|
|
2285
|
+
title: l,
|
|
2286
|
+
author: d,
|
|
2285
2287
|
subject: u,
|
|
2286
2288
|
createdOn: f,
|
|
2287
2289
|
creator: h,
|
|
@@ -2292,162 +2294,162 @@ const Se = {
|
|
|
2292
2294
|
pageCount: _
|
|
2293
2295
|
} = t;
|
|
2294
2296
|
return [
|
|
2295
|
-
{ label:
|
|
2296
|
-
{ label:
|
|
2297
|
+
{ label: n == null ? void 0 : n.propertiesFilenameLabel, value: s },
|
|
2298
|
+
{ label: n == null ? void 0 : n.propertiesFileSizeLabel, value: c },
|
|
2297
2299
|
{ separate: !0 },
|
|
2298
|
-
{ label:
|
|
2299
|
-
{ label:
|
|
2300
|
-
{ label:
|
|
2301
|
-
{ label:
|
|
2302
|
-
{ label:
|
|
2300
|
+
{ label: n == null ? void 0 : n.propertiesTitleLabel, value: l },
|
|
2301
|
+
{ label: n == null ? void 0 : n.propertiesAuthorLabel, value: d },
|
|
2302
|
+
{ label: n == null ? void 0 : n.propertiesSubjectLabel, value: u },
|
|
2303
|
+
{ label: n == null ? void 0 : n.propertiesKeywordLabel, value: g },
|
|
2304
|
+
{ label: n == null ? void 0 : n.propertiesCreatorLabel, value: h },
|
|
2303
2305
|
{
|
|
2304
|
-
label:
|
|
2305
|
-
value: f ?
|
|
2306
|
+
label: n == null ? void 0 : n.propertiesCreateOnLabel,
|
|
2307
|
+
value: f ? Wt(f) : ""
|
|
2306
2308
|
},
|
|
2307
2309
|
{
|
|
2308
|
-
label:
|
|
2309
|
-
value: w ?
|
|
2310
|
+
label: n == null ? void 0 : n.propertiesModifiedOnLabel,
|
|
2311
|
+
value: w ? Wt(w) : ""
|
|
2310
2312
|
},
|
|
2311
2313
|
{ separate: !0 },
|
|
2312
|
-
{ label:
|
|
2313
|
-
{ label:
|
|
2314
|
-
{ label:
|
|
2314
|
+
{ label: n == null ? void 0 : n.propertiesPDFProducerLabel, value: b },
|
|
2315
|
+
{ label: n == null ? void 0 : n.propertiesPDFVersionLabel, value: v },
|
|
2316
|
+
{ label: n == null ? void 0 : n.propertiesPageCountLabel, value: _ }
|
|
2315
2317
|
];
|
|
2316
|
-
}, [t,
|
|
2317
|
-
return /* @__PURE__ */ i(
|
|
2318
|
-
/* @__PURE__ */ i(
|
|
2319
|
-
/* @__PURE__ */ z(
|
|
2320
|
-
/* @__PURE__ */ i(
|
|
2321
|
-
/* @__PURE__ */ i("div", { className: Se["rp-document-properties"], children: a.map((c, s) => /* @__PURE__ */ i("div", { children: c.separate ? /* @__PURE__ */ i("div", { className: Se["rp-properties-divider"] }) : /* @__PURE__ */ i(
|
|
2322
|
-
/* @__PURE__ */ i(
|
|
2318
|
+
}, [t, n]);
|
|
2319
|
+
return /* @__PURE__ */ i(ii, { open: r, onOpenChange: o, children: /* @__PURE__ */ i(ai, { container: e, children: /* @__PURE__ */ z("div", { className: Se["rp-dialog-wrapper"], children: [
|
|
2320
|
+
/* @__PURE__ */ i(si, { className: Se["rp-dialog-overlay"] }),
|
|
2321
|
+
/* @__PURE__ */ z(ci, { className: Se["rp-document-dialog"], children: [
|
|
2322
|
+
/* @__PURE__ */ i(li, { className: Se["rp-dialog-title"], children: n == null ? void 0 : n.documentPropertiesLabel }),
|
|
2323
|
+
/* @__PURE__ */ i("div", { className: Se["rp-document-properties"], children: a.map((c, s) => /* @__PURE__ */ i("div", { children: c.separate ? /* @__PURE__ */ i("div", { className: Se["rp-properties-divider"] }) : /* @__PURE__ */ i(Qn, { label: c.label, value: c.value }) }, s)) }),
|
|
2324
|
+
/* @__PURE__ */ i(di, { asChild: !0, className: Se["rp-dialog-close"], children: /* @__PURE__ */ i(hr, {}) })
|
|
2323
2325
|
] })
|
|
2324
2326
|
] }) }) });
|
|
2325
|
-
},
|
|
2327
|
+
}, pi = {
|
|
2326
2328
|
"rp-other-tool-content": "_rp-other-tool-content_su718_1"
|
|
2327
|
-
},
|
|
2328
|
-
const
|
|
2329
|
-
return
|
|
2330
|
-
},
|
|
2329
|
+
}, hi = (t) => URL.createObjectURL(t), mi = async (t) => {
|
|
2330
|
+
const r = await (await fetch(t)).blob();
|
|
2331
|
+
return hi(r);
|
|
2332
|
+
}, Hr = () => {
|
|
2331
2333
|
const { filename: t, pdfSrc: e } = X();
|
|
2332
2334
|
return { download: x(async () => {
|
|
2333
2335
|
if (!t || !e)
|
|
2334
2336
|
throw new Error("There is no PDF source to download");
|
|
2335
2337
|
const o = document.createElement("a");
|
|
2336
|
-
o.href = await
|
|
2338
|
+
o.href = await mi(e), o.download = t, document.body.appendChild(o), o.click(), document.body.removeChild(o);
|
|
2337
2339
|
}, [t, e]) };
|
|
2338
|
-
},
|
|
2340
|
+
}, $r = () => {
|
|
2339
2341
|
const { downloadIcon: t } = fe();
|
|
2340
|
-
return t || /* @__PURE__ */ i(
|
|
2341
|
-
},
|
|
2342
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2342
|
+
return t || /* @__PURE__ */ i(io, {});
|
|
2343
|
+
}, Vr = ({ children: t, className: e, localeMessages: r }) => /* @__PURE__ */ i(U, { className: e, content: r == null ? void 0 : r.downloadFileTooltip, children: t }), fi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(Vr, { localeMessages: e, children: /* @__PURE__ */ i(te, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ i($r, {}) }) }), gi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(be, { onClick: t, children: /* @__PURE__ */ z(Vr, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2344
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i($r, {}) }),
|
|
2343
2345
|
e == null ? void 0 : e.downloadFileLabel
|
|
2344
|
-
] }) }),
|
|
2345
|
-
const { download: t } =
|
|
2346
|
-
return e ?
|
|
2347
|
-
},
|
|
2346
|
+
] }) }), Gr = () => {
|
|
2347
|
+
const { download: t } = Hr(), { downloadTool: e = !0 } = _e(), { isSmallScreen: r } = Re(), { localeMessages: o } = me();
|
|
2348
|
+
return e ? r ? /* @__PURE__ */ i(gi, { download: t, localeMessages: o }) : typeof e == "function" ? /* @__PURE__ */ i(e, { download: t }) : e ? /* @__PURE__ */ i(fi, { download: t, localeMessages: o }) : null : null;
|
|
2349
|
+
}, qr = () => {
|
|
2348
2350
|
const { printIcon: t } = fe();
|
|
2349
|
-
return t || /* @__PURE__ */ i(
|
|
2350
|
-
},
|
|
2351
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2351
|
+
return t || /* @__PURE__ */ i(ao, {});
|
|
2352
|
+
}, Ur = ({ children: t, className: e, localeMessages: r }) => /* @__PURE__ */ i(U, { className: e, content: r == null ? void 0 : r.printTooltip, children: t }), vi = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(Ur, { localeMessages: e, children: /* @__PURE__ */ i(te, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ i(qr, {}) }) }), _i = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(be, { onClick: t, children: /* @__PURE__ */ z(Ur, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2353
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(qr, {}) }),
|
|
2352
2354
|
e == null ? void 0 : e.printLabel
|
|
2353
|
-
] }) }),
|
|
2354
|
-
const { print: t, cancel: e, setOnProgress:
|
|
2355
|
-
return c ? s ? /* @__PURE__ */ i(
|
|
2355
|
+
] }) }), Zr = () => {
|
|
2356
|
+
const { print: t, cancel: e, setOnProgress: r, setOnComplete: o, setOnError: n, progress: a } = et(), { printTool: c = !0 } = _e(), { isSmallScreen: s } = Re(), { localeMessages: l } = me();
|
|
2357
|
+
return c ? s ? /* @__PURE__ */ i(_i, { print: t, localeMessages: l }) : typeof c == "function" ? /* @__PURE__ */ i(
|
|
2356
2358
|
c,
|
|
2357
2359
|
{
|
|
2358
2360
|
print: t,
|
|
2359
2361
|
cancel: e,
|
|
2360
|
-
setOnProgress:
|
|
2361
|
-
setOnError:
|
|
2362
|
+
setOnProgress: r,
|
|
2363
|
+
setOnError: n,
|
|
2362
2364
|
setOnComplete: o,
|
|
2363
2365
|
progress: a
|
|
2364
2366
|
}
|
|
2365
|
-
) : c ? /* @__PURE__ */ i(
|
|
2366
|
-
},
|
|
2367
|
+
) : c ? /* @__PURE__ */ i(vi, { print: t, localeMessages: l }) : null : null;
|
|
2368
|
+
}, wi = {
|
|
2367
2369
|
"rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
|
|
2368
|
-
},
|
|
2370
|
+
}, bi = () => {
|
|
2369
2371
|
const { goToFirstPageIcon: t } = fe();
|
|
2370
|
-
return t || /* @__PURE__ */ i(
|
|
2371
|
-
},
|
|
2372
|
+
return t || /* @__PURE__ */ i(fr, { className: wi["rp-go-to-Top"] });
|
|
2373
|
+
}, Ci = () => {
|
|
2372
2374
|
const { goToLastPageIcon: t } = fe();
|
|
2373
|
-
return t || /* @__PURE__ */ i(
|
|
2374
|
-
},
|
|
2375
|
-
const { goToPage: t, totalPages: e, focusedPage:
|
|
2375
|
+
return t || /* @__PURE__ */ i(fr, {});
|
|
2376
|
+
}, rr = { width: "100%" }, Ti = () => {
|
|
2377
|
+
const { goToPage: t, totalPages: e, focusedPage: r } = ce(), { jumpNavigationTool: o = !0 } = _e(), { localeMessages: n } = me(), a = F(() => r === 1, [r]), c = F(() => r === e, [r, e]), s = x(() => {
|
|
2376
2378
|
t(1);
|
|
2377
|
-
}, [t]),
|
|
2379
|
+
}, [t]), l = x(() => {
|
|
2378
2380
|
t(e);
|
|
2379
2381
|
}, [t, e]);
|
|
2380
2382
|
return o ? /* @__PURE__ */ z(Ue, { children: [
|
|
2381
|
-
/* @__PURE__ */ i(
|
|
2382
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2383
|
-
/* @__PURE__ */ i("span", { children:
|
|
2383
|
+
/* @__PURE__ */ i(be, { onClick: s, children: /* @__PURE__ */ i(U, { content: n == null ? void 0 : n.firstPageTooltip, style: rr, children: /* @__PURE__ */ z("div", { className: "rp-menu-item", "aria-disabled": a, children: [
|
|
2384
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(bi, {}) }),
|
|
2385
|
+
/* @__PURE__ */ i("span", { children: n == null ? void 0 : n.firstPageLabel })
|
|
2384
2386
|
] }) }) }),
|
|
2385
|
-
/* @__PURE__ */ i(
|
|
2386
|
-
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(
|
|
2387
|
-
/* @__PURE__ */ i("span", { children:
|
|
2387
|
+
/* @__PURE__ */ i(be, { onClick: l, children: /* @__PURE__ */ i(U, { content: n == null ? void 0 : n.lastPageTooltip, style: rr, children: /* @__PURE__ */ z("div", { className: "rp-menu-item", "aria-disabled": c, children: [
|
|
2388
|
+
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Ci, {}) }),
|
|
2389
|
+
/* @__PURE__ */ i("span", { children: n == null ? void 0 : n.lastPageLabel })
|
|
2388
2390
|
] }) }) }),
|
|
2389
|
-
/* @__PURE__ */ i(
|
|
2391
|
+
/* @__PURE__ */ i(It, {})
|
|
2390
2392
|
] }) : null;
|
|
2391
|
-
},
|
|
2393
|
+
}, Pi = () => {
|
|
2392
2394
|
const { container: t } = xe(), { isSmallScreen: e } = Re(), {
|
|
2393
|
-
openFileTool:
|
|
2395
|
+
openFileTool: r,
|
|
2394
2396
|
downloadTool: o,
|
|
2395
|
-
documentProperties:
|
|
2397
|
+
documentProperties: n,
|
|
2396
2398
|
scrollModeTool: a,
|
|
2397
2399
|
rotateTool: c,
|
|
2398
2400
|
selectionModeTool: s,
|
|
2399
|
-
jumpNavigationTool:
|
|
2400
|
-
printTool:
|
|
2401
|
+
jumpNavigationTool: l,
|
|
2402
|
+
printTool: d,
|
|
2401
2403
|
fullscreenTool: u
|
|
2402
2404
|
} = _e(), { localeMessages: f } = me();
|
|
2403
|
-
return
|
|
2404
|
-
const g =
|
|
2405
|
+
return F(() => {
|
|
2406
|
+
const g = l || c || s || a || n;
|
|
2405
2407
|
let w = !1;
|
|
2406
|
-
return e && (w = !(!
|
|
2408
|
+
return e && (w = !(!r && !o && !d && !u)), g || w;
|
|
2407
2409
|
}, [
|
|
2408
|
-
n,
|
|
2409
|
-
o,
|
|
2410
2410
|
r,
|
|
2411
|
+
o,
|
|
2412
|
+
n,
|
|
2411
2413
|
a,
|
|
2412
2414
|
c,
|
|
2413
2415
|
s,
|
|
2414
|
-
|
|
2416
|
+
l,
|
|
2415
2417
|
e
|
|
2416
|
-
]) ? /* @__PURE__ */ z(
|
|
2418
|
+
]) ? /* @__PURE__ */ z(to, { children: [
|
|
2417
2419
|
/* @__PURE__ */ i(
|
|
2418
|
-
|
|
2420
|
+
pr,
|
|
2419
2421
|
{
|
|
2420
2422
|
container: t,
|
|
2421
|
-
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(
|
|
2422
|
-
children: /* @__PURE__ */ z("div", { className:
|
|
2423
|
+
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(U, { content: f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ i(te, { "aria-label": f == null ? void 0 : f.moreOptionTooltip, children: /* @__PURE__ */ i(Vn, {}) }) }) }),
|
|
2424
|
+
children: /* @__PURE__ */ z("div", { className: pi["rp-other-tool-content"], "data-rp": "moreOptionsDropdown", children: [
|
|
2423
2425
|
e && /* @__PURE__ */ z(Ue, { children: [
|
|
2424
|
-
/* @__PURE__ */ i(
|
|
2425
|
-
/* @__PURE__ */ i(
|
|
2426
|
-
/* @__PURE__ */ i(
|
|
2427
|
-
/* @__PURE__ */ i(
|
|
2428
|
-
/* @__PURE__ */ i(
|
|
2426
|
+
/* @__PURE__ */ i(ur, {}),
|
|
2427
|
+
/* @__PURE__ */ i(Gr, {}),
|
|
2428
|
+
/* @__PURE__ */ i(Zr, {}),
|
|
2429
|
+
/* @__PURE__ */ i(mr, {}),
|
|
2430
|
+
/* @__PURE__ */ i(It, {})
|
|
2429
2431
|
] }),
|
|
2430
|
-
/* @__PURE__ */ i(
|
|
2431
|
-
/* @__PURE__ */ i(to, {}),
|
|
2432
|
-
/* @__PURE__ */ i(io, {}),
|
|
2432
|
+
/* @__PURE__ */ i(Ti, {}),
|
|
2433
2433
|
/* @__PURE__ */ i(no, {}),
|
|
2434
|
-
/* @__PURE__ */ i(
|
|
2434
|
+
/* @__PURE__ */ i(so, {}),
|
|
2435
|
+
/* @__PURE__ */ i(oo, {}),
|
|
2436
|
+
/* @__PURE__ */ i(ro, {})
|
|
2435
2437
|
] })
|
|
2436
2438
|
}
|
|
2437
2439
|
),
|
|
2438
|
-
/* @__PURE__ */ i(
|
|
2440
|
+
/* @__PURE__ */ i(ui, {})
|
|
2439
2441
|
] }) : null;
|
|
2440
|
-
},
|
|
2442
|
+
}, Si = () => {
|
|
2441
2443
|
const { isSmallScreen: t } = Re();
|
|
2442
|
-
return /* @__PURE__ */ z(
|
|
2443
|
-
/* @__PURE__ */ i(
|
|
2444
|
-
!t && /* @__PURE__ */ z(
|
|
2445
|
-
/* @__PURE__ */ i(
|
|
2446
|
-
/* @__PURE__ */ i(
|
|
2447
|
-
/* @__PURE__ */ i(
|
|
2448
|
-
/* @__PURE__ */ i(
|
|
2444
|
+
return /* @__PURE__ */ z(ye, { children: [
|
|
2445
|
+
/* @__PURE__ */ i($n, {}),
|
|
2446
|
+
!t && /* @__PURE__ */ z(ye, { children: [
|
|
2447
|
+
/* @__PURE__ */ i(ur, {}),
|
|
2448
|
+
/* @__PURE__ */ i(Gr, {}),
|
|
2449
|
+
/* @__PURE__ */ i(Zr, {}),
|
|
2450
|
+
/* @__PURE__ */ i(mr, {})
|
|
2449
2451
|
] }),
|
|
2450
|
-
/* @__PURE__ */ i(
|
|
2452
|
+
/* @__PURE__ */ i(Pi, {})
|
|
2451
2453
|
] });
|
|
2452
2454
|
}, Ne = {
|
|
2453
2455
|
"rp-zoom-wrapper": "_rp-zoom-wrapper_cocqs_1",
|
|
@@ -2455,14 +2457,14 @@ const Se = {
|
|
|
2455
2457
|
"rp-current-zoom-icon": "_rp-current-zoom-icon_cocqs_11",
|
|
2456
2458
|
"rp-current-zoom-text": "_rp-current-zoom-text_cocqs_16",
|
|
2457
2459
|
"rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_cocqs_20"
|
|
2458
|
-
},
|
|
2460
|
+
}, yi = 25, mt = 1e3, Ii = [50, 75, 100, 125, 150, 200, 300, 400], xi = () => {
|
|
2459
2461
|
const { zoomInIcon: t } = fe();
|
|
2460
|
-
return t || /* @__PURE__ */ i(
|
|
2461
|
-
},
|
|
2462
|
+
return t || /* @__PURE__ */ i(co, {});
|
|
2463
|
+
}, Ri = () => {
|
|
2462
2464
|
const { zoomOutIcon: t } = fe();
|
|
2463
|
-
return t || /* @__PURE__ */ i(
|
|
2464
|
-
},
|
|
2465
|
-
const { zoomLevel: t, setZoomLevel: e } = Xe(), { container:
|
|
2465
|
+
return t || /* @__PURE__ */ i(lo, {});
|
|
2466
|
+
}, Li = () => {
|
|
2467
|
+
const { zoomLevel: t, setZoomLevel: e } = Xe(), { container: r, contentRef: o } = xe(), { zoomTool: n = !0 } = _e(), { focusedPage: a } = ce(), { rotate: c } = Ke(), { pages: s } = X(), { isSmallScreen: l } = Re(), { localeMessages: d } = me(), u = x(() => {
|
|
2466
2468
|
e((_) => {
|
|
2467
2469
|
const m = Math.floor(_ / 25) * 25;
|
|
2468
2470
|
return Math.min(m + 25, mt);
|
|
@@ -2472,12 +2474,12 @@ const Se = {
|
|
|
2472
2474
|
const m = Math.ceil(_ / 25) * 25;
|
|
2473
2475
|
return Math.min(m - 25, mt);
|
|
2474
2476
|
});
|
|
2475
|
-
}, [e]), h =
|
|
2477
|
+
}, [e]), h = F(() => t === yi, [t]), g = F(() => t === mt, [t]), w = F(() => {
|
|
2476
2478
|
var _;
|
|
2477
2479
|
return (_ = s.get(a)) == null ? void 0 : _.page.getViewport({ scale: 1, rotation: c });
|
|
2478
2480
|
}, [s, a, c]), b = x(
|
|
2479
2481
|
(_) => {
|
|
2480
|
-
const m = ((w == null ? void 0 : w.width) || 0) + 2 * Ht, T = ((w == null ? void 0 : w.height) || 0) + 2 * Ht,
|
|
2482
|
+
const m = ((w == null ? void 0 : w.width) || 0) + 2 * Ht, T = ((w == null ? void 0 : w.height) || 0) + 2 * Ht, y = (o == null ? void 0 : o.clientWidth) || 0, p = (o == null ? void 0 : o.clientHeight) || 0, P = uo(_, y, p, m, T);
|
|
2481
2483
|
e(P);
|
|
2482
2484
|
},
|
|
2483
2485
|
[e, w]
|
|
@@ -2487,29 +2489,29 @@ const Se = {
|
|
|
2487
2489
|
},
|
|
2488
2490
|
[e, b]
|
|
2489
2491
|
);
|
|
2490
|
-
return typeof
|
|
2491
|
-
/* @__PURE__ */ i(
|
|
2492
|
+
return typeof n != "boolean" ? /* @__PURE__ */ i(n, { zoomLevel: t, setZoomLevel: e }) : n ? /* @__PURE__ */ z("div", { className: Ne["rp-zoom-wrapper"], children: [
|
|
2493
|
+
/* @__PURE__ */ i(U, { content: d == null ? void 0 : d.zoomOutTooltip, children: /* @__PURE__ */ i(
|
|
2492
2494
|
te,
|
|
2493
2495
|
{
|
|
2494
2496
|
disabled: h,
|
|
2495
2497
|
onClick: f,
|
|
2496
|
-
"aria-label":
|
|
2497
|
-
children: /* @__PURE__ */ i(
|
|
2498
|
+
"aria-label": d == null ? void 0 : d.zoomOutTooltip,
|
|
2499
|
+
children: /* @__PURE__ */ i(Ri, {})
|
|
2498
2500
|
}
|
|
2499
2501
|
) }),
|
|
2500
|
-
!
|
|
2501
|
-
|
|
2502
|
+
!l && /* @__PURE__ */ i(
|
|
2503
|
+
pr,
|
|
2502
2504
|
{
|
|
2503
|
-
container:
|
|
2504
|
-
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(
|
|
2505
|
+
container: r,
|
|
2506
|
+
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(U, { content: d == null ? void 0 : d.zoomSelectTooltip, children: /* @__PURE__ */ z(
|
|
2505
2507
|
te,
|
|
2506
2508
|
{
|
|
2507
2509
|
className: Ne["rp-current-zoom-wrapper"],
|
|
2508
|
-
"aria-label":
|
|
2510
|
+
"aria-label": d == null ? void 0 : d.zoomSelectTooltip,
|
|
2509
2511
|
children: [
|
|
2510
2512
|
/* @__PURE__ */ i("span", { className: Ne["rp-current-zoom-text"], children: t }),
|
|
2511
2513
|
/* @__PURE__ */ i("span", { className: Ne["rp-current-zoom-text"], children: "%" }),
|
|
2512
|
-
/* @__PURE__ */ i(
|
|
2514
|
+
/* @__PURE__ */ i(Fe, { className: Ne["rp-current-zoom-icon"] })
|
|
2513
2515
|
]
|
|
2514
2516
|
}
|
|
2515
2517
|
) }) }),
|
|
@@ -2517,164 +2519,164 @@ const Se = {
|
|
|
2517
2519
|
align: "center",
|
|
2518
2520
|
children: /* @__PURE__ */ z("div", { className: Ne["rp-zoom-dropdown-content"], children: [
|
|
2519
2521
|
/* @__PURE__ */ z(Ue, { children: [
|
|
2520
|
-
/* @__PURE__ */ i(
|
|
2521
|
-
/* @__PURE__ */ i(
|
|
2522
|
-
/* @__PURE__ */ i(
|
|
2522
|
+
/* @__PURE__ */ i(be, { onClick: () => v(ot.ACTUAL), children: d == null ? void 0 : d.zoomActualSize }),
|
|
2523
|
+
/* @__PURE__ */ i(be, { onClick: () => v(ot.PAGE_FIT), children: d == null ? void 0 : d.zoomPageFit }),
|
|
2524
|
+
/* @__PURE__ */ i(be, { onClick: () => v(ot.PAGE_WIDTH), children: d == null ? void 0 : d.zoomPageWidth })
|
|
2523
2525
|
] }),
|
|
2524
|
-
/* @__PURE__ */ i(
|
|
2525
|
-
/* @__PURE__ */ i(Ue, { children:
|
|
2526
|
+
/* @__PURE__ */ i(It, {}),
|
|
2527
|
+
/* @__PURE__ */ i(Ue, { children: Ii.map((_) => /* @__PURE__ */ z(be, { onClick: () => v(_), children: [
|
|
2526
2528
|
_,
|
|
2527
2529
|
" %"
|
|
2528
2530
|
] }, _)) })
|
|
2529
2531
|
] })
|
|
2530
2532
|
}
|
|
2531
2533
|
),
|
|
2532
|
-
/* @__PURE__ */ i(
|
|
2534
|
+
/* @__PURE__ */ i(U, { content: d == null ? void 0 : d.zoomInTooltip, children: /* @__PURE__ */ i(
|
|
2533
2535
|
te,
|
|
2534
2536
|
{
|
|
2535
2537
|
disabled: g,
|
|
2536
2538
|
onClick: u,
|
|
2537
|
-
"aria-label":
|
|
2538
|
-
children: /* @__PURE__ */ i(
|
|
2539
|
+
"aria-label": d == null ? void 0 : d.zoomInTooltip,
|
|
2540
|
+
children: /* @__PURE__ */ i(xi, {})
|
|
2539
2541
|
}
|
|
2540
2542
|
) })
|
|
2541
2543
|
] }) : null;
|
|
2542
|
-
},
|
|
2543
|
-
"rp-search-tool-content": "_rp-search-tool-
|
|
2544
|
-
"rp-search-tool-input": "_rp-search-tool-
|
|
2545
|
-
"rp-search-tool-input-icon": "_rp-search-tool-input-
|
|
2546
|
-
"rp-search-tool-controls": "_rp-search-tool-
|
|
2547
|
-
"rp-search-tool-input-wrapper": "_rp-search-tool-input-
|
|
2548
|
-
"rp-search-tool-input-checkboxes": "_rp-search-tool-input-
|
|
2549
|
-
"rp-search-tool-input-clear": "_rp-search-tool-input-
|
|
2550
|
-
"rp-search-input": "_rp-search-
|
|
2551
|
-
"rp-search-icon-info": "_rp-search-icon-
|
|
2552
|
-
},
|
|
2544
|
+
}, ne = {
|
|
2545
|
+
"rp-search-tool-content": "_rp-search-tool-content_17okh_1",
|
|
2546
|
+
"rp-search-tool-input": "_rp-search-tool-input_17okh_8",
|
|
2547
|
+
"rp-search-tool-input-icon": "_rp-search-tool-input-icon_17okh_14",
|
|
2548
|
+
"rp-search-tool-controls": "_rp-search-tool-controls_17okh_24",
|
|
2549
|
+
"rp-search-tool-input-wrapper": "_rp-search-tool-input-wrapper_17okh_32",
|
|
2550
|
+
"rp-search-tool-input-checkboxes": "_rp-search-tool-input-checkboxes_17okh_38",
|
|
2551
|
+
"rp-search-tool-input-clear": "_rp-search-tool-input-clear_17okh_43",
|
|
2552
|
+
"rp-search-input": "_rp-search-input_17okh_57",
|
|
2553
|
+
"rp-search-icon-info": "_rp-search-icon-info_17okh_62"
|
|
2554
|
+
}, nr = () => {
|
|
2553
2555
|
const { searchIcon: t } = fe();
|
|
2554
|
-
return t || /* @__PURE__ */ i(
|
|
2555
|
-
},
|
|
2556
|
-
const { container: t } = xe(), [e,
|
|
2556
|
+
return t || /* @__PURE__ */ i(po, {});
|
|
2557
|
+
}, Ni = () => {
|
|
2558
|
+
const { container: t } = xe(), [e, r] = $(!1), { pdf: o } = X(), [n, a] = $(null), {
|
|
2557
2559
|
searchOptions: c,
|
|
2558
2560
|
setSearchOptions: s,
|
|
2559
|
-
loading:
|
|
2560
|
-
setSearch:
|
|
2561
|
+
loading: l,
|
|
2562
|
+
setSearch: d,
|
|
2561
2563
|
totalMatches: u,
|
|
2562
2564
|
currentMatchPosition: f,
|
|
2563
2565
|
nextMatch: h,
|
|
2564
2566
|
prevMatch: g,
|
|
2565
2567
|
search: w
|
|
2566
|
-
} =
|
|
2567
|
-
|
|
2568
|
-
}, []),
|
|
2569
|
-
|
|
2570
|
-
}, [
|
|
2571
|
-
const N =
|
|
2572
|
-
(N ||
|
|
2568
|
+
} = Tr(), { searchTool: b = !0 } = _e(), [v, _] = $(w), { localeMessages: m } = me(), T = x(() => {
|
|
2569
|
+
r(!0);
|
|
2570
|
+
}, []), y = x(() => {
|
|
2571
|
+
d(""), _(""), r(!1);
|
|
2572
|
+
}, [d]), p = (I) => {
|
|
2573
|
+
const N = I.key === "Enter", V = I.key === " ";
|
|
2574
|
+
(N || V) && y();
|
|
2573
2575
|
}, P = x(
|
|
2574
|
-
(
|
|
2575
|
-
|
|
2576
|
+
(I) => {
|
|
2577
|
+
I.key === "Escape" && e && y();
|
|
2576
2578
|
},
|
|
2577
2579
|
[e]
|
|
2578
2580
|
), C = x(
|
|
2579
|
-
(
|
|
2580
|
-
|
|
2581
|
+
(I) => {
|
|
2582
|
+
I.shiftKey && I.key === "Enter" ? g() : I.key === "Enter" && w !== v ? d(v) : I.key === "Enter" && h();
|
|
2581
2583
|
},
|
|
2582
|
-
[v, g, h,
|
|
2584
|
+
[v, g, h, d, w]
|
|
2583
2585
|
);
|
|
2584
2586
|
O(() => (window.addEventListener("keydown", P), () => {
|
|
2585
2587
|
window.removeEventListener("keydown", P);
|
|
2586
2588
|
}), [P]), O(() => {
|
|
2587
|
-
|
|
2588
|
-
}, [
|
|
2589
|
-
const S = x((
|
|
2590
|
-
_(
|
|
2589
|
+
n && n.focus();
|
|
2590
|
+
}, [n]);
|
|
2591
|
+
const S = x((I) => {
|
|
2592
|
+
_(I.target.value);
|
|
2591
2593
|
}, []), A = x(() => {
|
|
2592
|
-
_(""),
|
|
2593
|
-
}, [
|
|
2594
|
-
(
|
|
2595
|
-
s((N) => ({ ...N, matchCase:
|
|
2594
|
+
_(""), d("");
|
|
2595
|
+
}, [d]), R = F(() => `${f} / ${u}`, [f, u]), { wholeWords: D, matchCase: L } = F(() => c, [c]), k = x(
|
|
2596
|
+
(I) => {
|
|
2597
|
+
s((N) => ({ ...N, matchCase: I }));
|
|
2596
2598
|
},
|
|
2597
2599
|
[s]
|
|
2598
2600
|
), E = x(
|
|
2599
|
-
(
|
|
2600
|
-
s((N) => ({ ...N, wholeWords:
|
|
2601
|
+
(I) => {
|
|
2602
|
+
s((N) => ({ ...N, wholeWords: I }));
|
|
2601
2603
|
},
|
|
2602
2604
|
[s]
|
|
2603
2605
|
);
|
|
2604
2606
|
return O(() => {
|
|
2605
|
-
|
|
2606
|
-
}, [o,
|
|
2607
|
-
|
|
2607
|
+
y();
|
|
2608
|
+
}, [o, y]), b ? /* @__PURE__ */ i(ye, { children: /* @__PURE__ */ i(
|
|
2609
|
+
kn,
|
|
2608
2610
|
{
|
|
2609
2611
|
open: e,
|
|
2610
2612
|
container: t,
|
|
2611
|
-
triggerComponent: /* @__PURE__ */ i(
|
|
2612
|
-
children: /* @__PURE__ */ z("div", { className:
|
|
2613
|
-
/* @__PURE__ */ z("div", { className:
|
|
2614
|
-
/* @__PURE__ */ z("div", { className:
|
|
2615
|
-
/* @__PURE__ */ i(
|
|
2616
|
-
|
|
2613
|
+
triggerComponent: /* @__PURE__ */ i(U, { content: m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ i(te, { onClick: T, "aria-label": m == null ? void 0 : m.searchButtonTooltip, children: /* @__PURE__ */ i(nr, {}) }) }),
|
|
2614
|
+
children: /* @__PURE__ */ z("div", { className: ne["rp-search-tool-content"], children: [
|
|
2615
|
+
/* @__PURE__ */ z("div", { className: ne["rp-search-tool-input-wrapper"], children: [
|
|
2616
|
+
/* @__PURE__ */ z("div", { className: ne["rp-search-tool-input"], children: [
|
|
2617
|
+
/* @__PURE__ */ i(U, { content: m == null ? void 0 : m.searchInputTooltip, children: /* @__PURE__ */ i(
|
|
2618
|
+
ar,
|
|
2617
2619
|
{
|
|
2618
2620
|
value: v,
|
|
2619
2621
|
onKeyDown: C,
|
|
2620
2622
|
onChange: S,
|
|
2621
|
-
icon: /* @__PURE__ */ i(
|
|
2623
|
+
icon: /* @__PURE__ */ i(nr, {}),
|
|
2622
2624
|
placeholder: m == null ? void 0 : m.searchInputPlaceholder,
|
|
2623
|
-
className:
|
|
2625
|
+
className: ne["rp-search-input"],
|
|
2624
2626
|
ref: a,
|
|
2625
|
-
children: !!v && /* @__PURE__ */ i("span", { className:
|
|
2627
|
+
children: !!v && /* @__PURE__ */ i("span", { className: ne["rp-search-tool-input-clear"], onClick: A, children: /* @__PURE__ */ i(ho, {}) })
|
|
2626
2628
|
}
|
|
2627
2629
|
) }),
|
|
2628
|
-
|
|
2630
|
+
l ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(Pt, {}) }) : /* @__PURE__ */ i("span", { children: R })
|
|
2629
2631
|
] }),
|
|
2630
|
-
/* @__PURE__ */ z("div", { className:
|
|
2631
|
-
/* @__PURE__ */ i($t, { name: "matchCase", value: L, onChange:
|
|
2632
|
-
/* @__PURE__ */ i(
|
|
2632
|
+
/* @__PURE__ */ z("div", { className: ne["rp-search-tool-input-checkboxes"], children: [
|
|
2633
|
+
/* @__PURE__ */ i($t, { name: "matchCase", value: L, onChange: k, children: m == null ? void 0 : m.searchMatchCaseLabel }),
|
|
2634
|
+
/* @__PURE__ */ i(U, { content: m == null ? void 0 : m.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: ne["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Vt, {}) }) }),
|
|
2633
2635
|
/* @__PURE__ */ i($t, { name: "wholeWord", value: D, onChange: E, children: m == null ? void 0 : m.searchWholeWordsLabel }),
|
|
2634
|
-
/* @__PURE__ */ i(
|
|
2636
|
+
/* @__PURE__ */ i(U, { content: m == null ? void 0 : m.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { className: ne["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Vt, {}) }) })
|
|
2635
2637
|
] })
|
|
2636
2638
|
] }),
|
|
2637
|
-
/* @__PURE__ */ z("div", { className:
|
|
2638
|
-
/* @__PURE__ */ i(
|
|
2639
|
-
|
|
2639
|
+
/* @__PURE__ */ z("div", { className: ne["rp-search-tool-controls"], children: [
|
|
2640
|
+
/* @__PURE__ */ i(U, { content: m == null ? void 0 : m.searchPrevTooltip, children: /* @__PURE__ */ i(te, { onClick: g, "aria-label": m == null ? void 0 : m.searchPrevTooltip, children: /* @__PURE__ */ i(
|
|
2641
|
+
Fe,
|
|
2640
2642
|
{
|
|
2641
|
-
className:
|
|
2643
|
+
className: ne["rp-search-tool-input-icon"],
|
|
2642
2644
|
"aria-disabled": !u
|
|
2643
2645
|
}
|
|
2644
2646
|
) }) }),
|
|
2645
|
-
/* @__PURE__ */ i(
|
|
2646
|
-
|
|
2647
|
+
/* @__PURE__ */ i(U, { content: m == null ? void 0 : m.searchNextTooltip, children: /* @__PURE__ */ i(te, { onClick: h, "aria-label": m == null ? void 0 : m.searchNextTooltip, children: /* @__PURE__ */ i(
|
|
2648
|
+
Fe,
|
|
2647
2649
|
{
|
|
2648
2650
|
style: { transform: "rotate(180deg" },
|
|
2649
|
-
className:
|
|
2651
|
+
className: ne["rp-search-tool-input-icon"],
|
|
2650
2652
|
"aria-disabled": !u
|
|
2651
2653
|
}
|
|
2652
2654
|
) }) }),
|
|
2653
|
-
/* @__PURE__ */ i(
|
|
2655
|
+
/* @__PURE__ */ i(U, { content: m == null ? void 0 : m.searchCloseButtonTooltip, children: /* @__PURE__ */ i(
|
|
2654
2656
|
te,
|
|
2655
2657
|
{
|
|
2656
2658
|
onKeyDown: p,
|
|
2657
2659
|
"aria-label": m == null ? void 0 : m.searchCloseButtonTooltip,
|
|
2658
|
-
children: /* @__PURE__ */ i(
|
|
2660
|
+
children: /* @__PURE__ */ i(hr, { onClick: y, className: ne["rp-search-tool-input-icon"] })
|
|
2659
2661
|
}
|
|
2660
2662
|
) })
|
|
2661
2663
|
] })
|
|
2662
2664
|
] })
|
|
2663
2665
|
}
|
|
2664
2666
|
) }) : null;
|
|
2665
|
-
},
|
|
2666
|
-
"rp-loading-overlay": "_rp-loading-
|
|
2667
|
-
"rp-loading-modal": "_rp-loading-
|
|
2668
|
-
"rp-loading-title": "_rp-loading-
|
|
2669
|
-
"rp-loading-progress-bar": "_rp-loading-progress-
|
|
2670
|
-
"rp-loading-progress": "_rp-loading-
|
|
2671
|
-
"rp-loading-cancel-button": "_rp-loading-cancel-
|
|
2672
|
-
loading:
|
|
2673
|
-
},
|
|
2674
|
-
const { cancel: e } = et(), { localeMessages:
|
|
2667
|
+
}, Ei = "_loading_1iq0a_1", Ee = {
|
|
2668
|
+
"rp-loading-overlay": "_rp-loading-overlay_1iq0a_1",
|
|
2669
|
+
"rp-loading-modal": "_rp-loading-modal_1iq0a_14",
|
|
2670
|
+
"rp-loading-title": "_rp-loading-title_1iq0a_27",
|
|
2671
|
+
"rp-loading-progress-bar": "_rp-loading-progress-bar_1iq0a_35",
|
|
2672
|
+
"rp-loading-progress": "_rp-loading-progress_1iq0a_35",
|
|
2673
|
+
"rp-loading-cancel-button": "_rp-loading-cancel-button_1iq0a_57",
|
|
2674
|
+
loading: Ei
|
|
2675
|
+
}, Oi = ({ percentage: t }) => {
|
|
2676
|
+
const { cancel: e } = et(), { localeMessages: r } = me();
|
|
2675
2677
|
return t < 1 ? null : /* @__PURE__ */ i("div", { className: oe(Ee["rp-loading-overlay"]), children: /* @__PURE__ */ z("div", { className: oe(Ee["rp-loading-modal"]), children: [
|
|
2676
2678
|
/* @__PURE__ */ z("div", { className: oe(Ee["rp-loading-title"]), children: [
|
|
2677
|
-
|
|
2679
|
+
r == null ? void 0 : r.printLoadingMessage,
|
|
2678
2680
|
"..."
|
|
2679
2681
|
] }),
|
|
2680
2682
|
/* @__PURE__ */ i("div", { className: oe(Ee["rp-loading-progress-bar"]), children: /* @__PURE__ */ i(
|
|
@@ -2684,44 +2686,44 @@ const Se = {
|
|
|
2684
2686
|
style: { width: `${t}%` }
|
|
2685
2687
|
}
|
|
2686
2688
|
) }),
|
|
2687
|
-
/* @__PURE__ */ i("button", { className: oe(Ee["rp-loading-cancel-button"]), onClick: e, children:
|
|
2689
|
+
/* @__PURE__ */ i("button", { className: oe(Ee["rp-loading-cancel-button"]), onClick: e, children: r == null ? void 0 : r.printCancelLabel })
|
|
2688
2690
|
] }) });
|
|
2689
|
-
},
|
|
2690
|
-
const { showPrintProgress:
|
|
2691
|
+
}, Di = Me((t, e) => {
|
|
2692
|
+
const { showPrintProgress: r } = _e(), { progress: o } = et(), { isSmallScreen: n } = Re(), { percentage: a } = o || {}, c = () => n ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
|
|
2691
2693
|
return /* @__PURE__ */ z("div", { children: [
|
|
2692
2694
|
/* @__PURE__ */ i("div", { "data-rp": "topBar", ref: e, className: ze["rp-toolbar-content"], children: /* @__PURE__ */ z("div", { className: ze["rp-toolbar-wrapper"], style: c(), children: [
|
|
2693
2695
|
/* @__PURE__ */ z("div", { "data-rp": "topBarLeft", className: ze["rp-toolbar-start"], children: [
|
|
2694
|
-
/* @__PURE__ */ i(
|
|
2695
|
-
/* @__PURE__ */ i(
|
|
2696
|
+
/* @__PURE__ */ i(Ni, {}),
|
|
2697
|
+
/* @__PURE__ */ i(jo, {})
|
|
2696
2698
|
] }),
|
|
2697
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: ze["rp-toolbar-middle"], children: /* @__PURE__ */ i(
|
|
2698
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: ze["rp-toolbar-end"], children: /* @__PURE__ */ i(
|
|
2699
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: ze["rp-toolbar-middle"], children: /* @__PURE__ */ i(Li, {}) }),
|
|
2700
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: ze["rp-toolbar-end"], children: /* @__PURE__ */ i(Si, {}) })
|
|
2699
2701
|
] }) }),
|
|
2700
|
-
|
|
2702
|
+
r && a ? /* @__PURE__ */ i(Oi, { percentage: a }) : null
|
|
2701
2703
|
] });
|
|
2702
2704
|
}), ft = {
|
|
2703
|
-
"rp-sidebar-content-wrapper": "_rp-sidebar-content-
|
|
2704
|
-
"rp-sidebar-content": "_rp-sidebar-
|
|
2705
|
-
"rp-thumbnails-wrapper": "_rp-thumbnails-
|
|
2706
|
-
"rp-thumbnail-dragging": "_rp-thumbnail-
|
|
2705
|
+
"rp-sidebar-content-wrapper": "_rp-sidebar-content-wrapper_1sdl6_1",
|
|
2706
|
+
"rp-sidebar-content": "_rp-sidebar-content_1sdl6_1",
|
|
2707
|
+
"rp-thumbnails-wrapper": "_rp-thumbnails-wrapper_1sdl6_16",
|
|
2708
|
+
"rp-thumbnail-dragging": "_rp-thumbnail-dragging_1sdl6_21"
|
|
2707
2709
|
}, Ae = {
|
|
2708
2710
|
"rp-thumbnail-wrapper": "_rp-thumbnail-wrapper_3fenb_1",
|
|
2709
2711
|
"rp-thumbnail-text": "_rp-thumbnail-text_3fenb_10",
|
|
2710
2712
|
"rp-thumbnail": "_rp-thumbnail_3fenb_1",
|
|
2711
2713
|
"rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
|
|
2712
2714
|
"rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
|
|
2713
|
-
},
|
|
2714
|
-
const { thumbnailSrc: e, pageNumber:
|
|
2715
|
-
width: Math.round(
|
|
2716
|
-
height: Math.round(
|
|
2717
|
-
}), [
|
|
2718
|
-
|
|
2719
|
-
}, [a,
|
|
2715
|
+
}, zi = (t) => {
|
|
2716
|
+
const { thumbnailSrc: e, pageNumber: r, isFocused: o, viewport: n } = t, { goToPage: a } = ce(), c = F(() => o ? Ae["rp-thumbnail-active"] : "", [o]), s = F(() => ({
|
|
2717
|
+
width: Math.round(n.width),
|
|
2718
|
+
height: Math.round(n.height)
|
|
2719
|
+
}), [n]), l = x(() => {
|
|
2720
|
+
r && a(r);
|
|
2721
|
+
}, [a, r]);
|
|
2720
2722
|
return /* @__PURE__ */ z(
|
|
2721
2723
|
"div",
|
|
2722
2724
|
{
|
|
2723
|
-
onClick:
|
|
2724
|
-
id: `page-${
|
|
2725
|
+
onClick: l,
|
|
2726
|
+
id: `page-${r}`,
|
|
2725
2727
|
className: Ae["rp-thumbnail-wrapper"],
|
|
2726
2728
|
children: [
|
|
2727
2729
|
/* @__PURE__ */ i("div", { className: oe(c, Ae["rp-thumbnail"]), children: e ? /* @__PURE__ */ i(
|
|
@@ -2743,29 +2745,29 @@ const Se = {
|
|
|
2743
2745
|
children: /* @__PURE__ */ i(Pt, {})
|
|
2744
2746
|
}
|
|
2745
2747
|
) }),
|
|
2746
|
-
/* @__PURE__ */ i("div", { className: Ae["rp-thumbnail-text"], children:
|
|
2748
|
+
/* @__PURE__ */ i("div", { className: Ae["rp-thumbnail-text"], children: r })
|
|
2747
2749
|
]
|
|
2748
2750
|
}
|
|
2749
2751
|
);
|
|
2750
|
-
},
|
|
2752
|
+
}, or = {
|
|
2751
2753
|
"rp-thumbnails-container": "_rp-thumbnails-container_16vqr_1",
|
|
2752
2754
|
"rp-thumbnails": "_rp-thumbnails_16vqr_1"
|
|
2753
|
-
},
|
|
2754
|
-
const
|
|
2755
|
-
t && (
|
|
2756
|
-
},
|
|
2757
|
-
const { show:
|
|
2758
|
-
|
|
2759
|
-
const f =
|
|
2755
|
+
}, Ai = 16, ki = (t, e) => {
|
|
2756
|
+
const r = t == null ? void 0 : t.querySelector(`#page-${e}`);
|
|
2757
|
+
t && (r != null && r.offsetTop) && (t.scrollTop = (r == null ? void 0 : r.offsetTop) - Ai);
|
|
2758
|
+
}, Fi = Me((t, e) => {
|
|
2759
|
+
const { show: r } = t, { focusedPage: o, totalPages: n } = ce(), { thumbnailPages: a, addPage: c, thumbnailLength: s, addToPage: l } = br(), d = M(null), u = M(1);
|
|
2760
|
+
ir(e, () => d.current);
|
|
2761
|
+
const f = F(() => Object.values(a), [a]), h = x(() => {
|
|
2760
2762
|
const g = s + 1;
|
|
2761
|
-
g <=
|
|
2762
|
-
}, [c,
|
|
2763
|
+
g <= n && c(g);
|
|
2764
|
+
}, [c, n, s]);
|
|
2763
2765
|
return O(() => {
|
|
2764
|
-
o > s ?
|
|
2765
|
-
}, [o, s,
|
|
2766
|
+
o > s ? l(o) : r && u.current !== o && (ki(d.current, o), u.current = o);
|
|
2767
|
+
}, [o, s, l, r, f]), wn(d.current, h), /* @__PURE__ */ i("div", { ref: d, className: or["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: or["rp-thumbnails"], children: r ? f.map((g, w) => {
|
|
2766
2768
|
var b, v;
|
|
2767
2769
|
return /* @__PURE__ */ i(
|
|
2768
|
-
|
|
2770
|
+
zi,
|
|
2769
2771
|
{
|
|
2770
2772
|
isFocused: o === ((b = g.page) == null ? void 0 : b.pageNumber),
|
|
2771
2773
|
pageNumber: (v = g.page) == null ? void 0 : v.pageNumber,
|
|
@@ -2776,29 +2778,29 @@ const Se = {
|
|
|
2776
2778
|
w
|
|
2777
2779
|
);
|
|
2778
2780
|
}) : null }) });
|
|
2779
|
-
}),
|
|
2781
|
+
}), Mi = () => {
|
|
2780
2782
|
const { thumbnailIcon: t } = fe();
|
|
2781
|
-
return t || /* @__PURE__ */ i(
|
|
2782
|
-
},
|
|
2783
|
-
const { active: t, setActive: e } =
|
|
2783
|
+
return t || /* @__PURE__ */ i(_n, {});
|
|
2784
|
+
}, Wi = () => {
|
|
2785
|
+
const { active: t, setActive: e } = br(), [r, o] = $(200), n = M(null), { thumbnailTool: a, sidebarEnable: c } = _e(), { localeMessages: s } = me(), l = x(() => {
|
|
2784
2786
|
e((u) => !u);
|
|
2785
|
-
}, []),
|
|
2787
|
+
}, []), d = F(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: l, active: t }) : a ? /* @__PURE__ */ i(U, { content: s == null ? void 0 : s.thumbnailTooltip, children: /* @__PURE__ */ i(
|
|
2786
2788
|
te,
|
|
2787
2789
|
{
|
|
2788
|
-
onClick:
|
|
2790
|
+
onClick: l,
|
|
2789
2791
|
active: t,
|
|
2790
2792
|
"aria-label": s == null ? void 0 : s.thumbnailTooltip,
|
|
2791
|
-
children: /* @__PURE__ */ i(
|
|
2793
|
+
children: /* @__PURE__ */ i(Mi, {})
|
|
2792
2794
|
}
|
|
2793
|
-
) }) : null, [a, t,
|
|
2794
|
-
return /* @__PURE__ */ i(
|
|
2795
|
+
) }) : null, [a, t, l, s]);
|
|
2796
|
+
return /* @__PURE__ */ i(ye, { children: c && /* @__PURE__ */ z(
|
|
2795
2797
|
"div",
|
|
2796
2798
|
{
|
|
2797
|
-
style: { "--rp-thumbnail-width": `${
|
|
2799
|
+
style: { "--rp-thumbnail-width": `${r}px` },
|
|
2798
2800
|
className: ft["rp-sidebar-content-wrapper"],
|
|
2799
2801
|
"data-rp": "sidebar",
|
|
2800
2802
|
children: [
|
|
2801
|
-
/* @__PURE__ */ i("div", { className: ft["rp-sidebar-content"], children:
|
|
2803
|
+
/* @__PURE__ */ i("div", { className: ft["rp-sidebar-content"], children: d }),
|
|
2802
2804
|
/* @__PURE__ */ z(
|
|
2803
2805
|
"div",
|
|
2804
2806
|
{
|
|
@@ -2806,109 +2808,132 @@ const Se = {
|
|
|
2806
2808
|
hidden: !t,
|
|
2807
2809
|
className: ft["rp-thumbnails-wrapper"],
|
|
2808
2810
|
children: [
|
|
2809
|
-
/* @__PURE__ */ i(
|
|
2810
|
-
/* @__PURE__ */ i(
|
|
2811
|
+
/* @__PURE__ */ i(Fi, { show: t, ref: n }),
|
|
2812
|
+
/* @__PURE__ */ i(bn, { onWidthChange: o, thumbnailRef: n })
|
|
2811
2813
|
]
|
|
2812
2814
|
}
|
|
2813
2815
|
)
|
|
2814
2816
|
]
|
|
2815
2817
|
}
|
|
2816
2818
|
) });
|
|
2817
|
-
},
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2819
|
+
}, we = {
|
|
2820
|
+
"rp-layout": "_rp-layout_3uw64_1",
|
|
2821
|
+
"rp-content": "_rp-content_3uw64_5",
|
|
2822
|
+
"rp-pages": "_rp-pages_3uw64_11",
|
|
2823
|
+
"rp-container": "_rp-container_3uw64_16",
|
|
2824
|
+
"rp-loader": "_rp-loader_3uw64_54",
|
|
2825
|
+
"rp-theme-variables": "_rp-theme-variables_3uw64_58",
|
|
2826
|
+
"rp-dark-mode": "_rp-dark-mode_3uw64_151"
|
|
2827
|
+
}, Hi = Me(
|
|
2828
|
+
(t, e) => {
|
|
2829
|
+
const { children: r, toolbarRef: o, style: n, className: a } = t, { customVariables: c, customDarkVariables: s } = xn(), { darkMode: l } = on();
|
|
2830
|
+
return /* @__PURE__ */ i(
|
|
2831
|
+
"div",
|
|
2832
|
+
{
|
|
2833
|
+
ref: e,
|
|
2834
|
+
className: oe(
|
|
2835
|
+
we["rp-theme-variables"],
|
|
2836
|
+
we["rp-container"],
|
|
2837
|
+
l ? we["rp-dark-mode"] : "",
|
|
2838
|
+
a
|
|
2839
|
+
),
|
|
2840
|
+
style: {
|
|
2841
|
+
"--rp-toolbar-height": `${(o == null ? void 0 : o.clientHeight) || 48}px`,
|
|
2842
|
+
...c,
|
|
2843
|
+
...l ? s : {},
|
|
2844
|
+
...n
|
|
2845
|
+
},
|
|
2846
|
+
children: r
|
|
2847
|
+
}
|
|
2848
|
+
);
|
|
2849
|
+
}
|
|
2850
|
+
), Is = Me((t, e) => {
|
|
2851
|
+
const { children: r, slots: o, icons: n, style: a, className: c, mobileWidth: s, onLoaded: l, cleanupOnLoaded: d } = t, [u, f] = $(null), { setContainer: h, setContentRef: g } = xe(), { loading: w } = X(), { LoaderImageComponent: b } = dr();
|
|
2852
|
+
return O(() => (l && l(), () => {
|
|
2853
|
+
d && d();
|
|
2854
|
+
}), [l, d]), /* @__PURE__ */ i(Hi, { toolbarRef: u, ref: e, children: /* @__PURE__ */ i(In, { mobileWidth: s, children: /* @__PURE__ */ i(Cn, { slots: o, children: /* @__PURE__ */ i(Tn, { icons: n, children: /* @__PURE__ */ z(Pn, { getContainerRef: h, style: a, className: c, children: [
|
|
2855
|
+
/* @__PURE__ */ z(Sn, { children: [
|
|
2856
|
+
/* @__PURE__ */ z("div", { className: we["rp-layout"], children: [
|
|
2857
|
+
/* @__PURE__ */ i(Di, { ref: f }),
|
|
2858
|
+
/* @__PURE__ */ z("div", { className: we["rp-content"], children: [
|
|
2859
|
+
/* @__PURE__ */ i("div", { className: we["rp-sidebar"], children: /* @__PURE__ */ i(Wi, {}) }),
|
|
2860
|
+
/* @__PURE__ */ i("div", { ref: g, className: we["rp-pages"], children: r })
|
|
2861
|
+
] })
|
|
2862
|
+
] }),
|
|
2863
|
+
/* @__PURE__ */ i(yn, {})
|
|
2864
|
+
] }),
|
|
2865
|
+
w ? /* @__PURE__ */ i(
|
|
2866
|
+
"div",
|
|
2867
|
+
{
|
|
2868
|
+
className: we["rp-loader"],
|
|
2869
|
+
style: {
|
|
2870
|
+
position: "absolute",
|
|
2871
|
+
top: 0,
|
|
2872
|
+
left: 0,
|
|
2873
|
+
right: 0,
|
|
2874
|
+
bottom: 0,
|
|
2875
|
+
width: "100%",
|
|
2876
|
+
height: "100%"
|
|
2877
|
+
},
|
|
2878
|
+
children: /* @__PURE__ */ i(
|
|
2840
2879
|
"div",
|
|
2841
2880
|
{
|
|
2842
|
-
className: Pe["rp-loader"],
|
|
2843
2881
|
style: {
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
width: "100%",
|
|
2850
|
-
height: "100%"
|
|
2882
|
+
display: "flex",
|
|
2883
|
+
justifyContent: "center",
|
|
2884
|
+
alignItems: "center",
|
|
2885
|
+
height: "100%",
|
|
2886
|
+
width: "100%"
|
|
2851
2887
|
},
|
|
2852
|
-
children: /* @__PURE__ */ i(
|
|
2853
|
-
"div",
|
|
2854
|
-
{
|
|
2855
|
-
style: {
|
|
2856
|
-
display: "flex",
|
|
2857
|
-
justifyContent: "center",
|
|
2858
|
-
alignItems: "center",
|
|
2859
|
-
height: "100%",
|
|
2860
|
-
width: "100%"
|
|
2861
|
-
},
|
|
2862
|
-
children: b && /* @__PURE__ */ i(b, {})
|
|
2863
|
-
}
|
|
2864
|
-
)
|
|
2888
|
+
children: b && /* @__PURE__ */ i(b, {})
|
|
2865
2889
|
}
|
|
2866
|
-
)
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
) }) }) }) });
|
|
2890
|
+
)
|
|
2891
|
+
}
|
|
2892
|
+
) : null
|
|
2893
|
+
] }) }) }) }) });
|
|
2870
2894
|
});
|
|
2871
2895
|
export {
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2896
|
+
To as A,
|
|
2897
|
+
Di as B,
|
|
2898
|
+
_o as C,
|
|
2899
|
+
Go as D,
|
|
2900
|
+
zi as E,
|
|
2901
|
+
Gr as F,
|
|
2902
|
+
Fi as G,
|
|
2903
|
+
Wi as H,
|
|
2904
|
+
Hi as I,
|
|
2905
|
+
Oi as L,
|
|
2906
|
+
Ti as M,
|
|
2907
|
+
Pi as O,
|
|
2908
|
+
ws as P,
|
|
2909
|
+
Ps as R,
|
|
2910
|
+
Ts as S,
|
|
2911
|
+
Cs as T,
|
|
2912
|
+
Li as Z,
|
|
2913
|
+
bs as a,
|
|
2914
|
+
Is as b,
|
|
2915
|
+
Hr as c,
|
|
2891
2916
|
et as d,
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2917
|
+
Tr as e,
|
|
2918
|
+
gr as f,
|
|
2919
|
+
mo as g,
|
|
2920
|
+
vr as h,
|
|
2921
|
+
fo as i,
|
|
2922
|
+
_r as j,
|
|
2923
|
+
go as k,
|
|
2924
|
+
wr as l,
|
|
2925
|
+
br as m,
|
|
2926
|
+
vo as n,
|
|
2927
|
+
Cr as o,
|
|
2928
|
+
wo as p,
|
|
2929
|
+
Po as q,
|
|
2905
2930
|
xt as r,
|
|
2906
|
-
|
|
2907
|
-
|
|
2931
|
+
Ho as s,
|
|
2932
|
+
qo as t,
|
|
2908
2933
|
ce as u,
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2934
|
+
jo as v,
|
|
2935
|
+
ui as w,
|
|
2936
|
+
Zr as x,
|
|
2937
|
+
Si as y,
|
|
2938
|
+
Ni as z
|
|
2914
2939
|
};
|