@pdf-viewer/react 1.4.2 → 1.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Popover-b7402893.js +1445 -0
- package/dist/{RPDefaultLayout-e27ef121.js → RPDefaultLayout-f9017f0e.js} +606 -601
- package/dist/component-1da194e8.js +337 -0
- package/dist/components/RPConfig.js +270 -259
- package/dist/components/RPController.js +1 -1
- package/dist/components/RPPages.js +2 -2
- package/dist/components/RPProvider.js +12 -11
- package/dist/components/layout/LayoutContainer.js +3 -2
- package/dist/components/layout/RPDefaultLayout.js +1 -1
- package/dist/components/layout/sidebar/RPSidebar.js +1 -1
- package/dist/components/layout/sidebar/Thumbnail.js +1 -1
- package/dist/components/layout/sidebar/Thumbnails.js +1 -1
- package/dist/components/layout/toolbar/DocumentDialog.js +3 -2
- 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 +4 -3
- 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 +4 -3
- 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 +4 -3
- package/dist/components/page/AnnotationLayer.js +3 -2
- package/dist/components/page/CanvasLayer.js +3 -2
- package/dist/components/page/DualPage.js +1 -1
- package/dist/components/page/RPPage.js +3 -2
- package/dist/components/page/SinglePage.js +1 -1
- package/dist/components/page/TextHighlightLayer.js +3 -2
- package/dist/components/page/TextLayer.js +3 -2
- package/dist/components/ui/Checkbox.js +111 -94
- package/dist/components/ui/DropDown.js +1 -1
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/components/ui/Popover.js +1 -1
- package/dist/components/ui/RPTooltip.js +206 -205
- 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-0f08882b.js +1561 -0
- package/dist/index-10ac1200.js +150 -0
- package/dist/index-271658fe.js +331 -0
- package/dist/main.js +1 -1
- package/dist/types/utils/hooks/useWatermark.d.ts +1 -1
- package/dist/utils/hooks/useFileDownload.js +3 -2
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/usePaginate.js +3 -2
- package/dist/utils/hooks/usePrint.js +3 -2
- package/dist/utils/hooks/useScrollToPage.js +3 -2
- package/dist/utils/hooks/useSearch.js +3 -2
- package/dist/utils/hooks/useThumbnail.js +3 -2
- package/dist/utils/hooks/useVirtualReactWindow.js +3 -2
- package/dist/utils/hooks/useWatermark.js +59 -28
- package/package.json +2 -2
- package/dist/Popover-d11ec15c.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
|
@@ -7,7 +7,7 @@ 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
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
|
|
10
|
+
import { ViewMode as qe, ScrollMode as K, AnnotationSubType as zt, SelectionMode as an, ZoomLevel as it } from "./utils/types.js";
|
|
11
11
|
import { useRotationContext as Ke } from "./contexts/RotationContext.js";
|
|
12
12
|
import { useLayerContext as sn } from "./contexts/LayerContext.js";
|
|
13
13
|
import { useZoomContext as Xe } from "./contexts/ZoomContext.js";
|
|
@@ -20,19 +20,20 @@ import { useInitialStateContext as ln } from "./contexts/InitialStateContext.js"
|
|
|
20
20
|
import { useFullScreenContext as dn } from "./contexts/FullScreenContext.js";
|
|
21
21
|
import "./contexts/FileInputContext.js";
|
|
22
22
|
import "./contexts/DropFileZoneContext.js";
|
|
23
|
-
import { renderPage as
|
|
23
|
+
import { renderPage as vt } from "./utils/renderPage.js";
|
|
24
24
|
import { highlightMatches as cr, findMatches as un, resetDivs as lr, highlightMultipleColorMatches as pn } from "./utils/highlight.js";
|
|
25
|
-
import * as
|
|
25
|
+
import * as Tt from "pdfjs-dist";
|
|
26
26
|
import { PixelsPerInch as hn, AnnotationMode as mn, RenderingCancelledException as fn, AnnotationLayer as gn } from "pdfjs-dist";
|
|
27
27
|
import { useLayoutContainer as Ie } from "./contexts/LayoutContainerContext.js";
|
|
28
|
-
import { useDimensionPagesContext as
|
|
28
|
+
import { useDimensionPagesContext as Pt } from "./contexts/DimensionPagesContext.js";
|
|
29
29
|
import { useLocalizationContext as me } from "./contexts/LocalizationContext.js";
|
|
30
30
|
import { useHighlightContext as vn } from "./contexts/HighlightContext.js";
|
|
31
31
|
import { useLoaderContext as dr } from "./contexts/LoaderContext.js";
|
|
32
|
+
import "./contexts/LicenseContext.js";
|
|
32
33
|
import "./components/RPConfig.js";
|
|
33
34
|
import { ThumbnailIcon as _n } from "./components/icons/Thumbnail.js";
|
|
34
35
|
import { c as oe } from "./clsx-0c6e471a.js";
|
|
35
|
-
import { LoaderIcon as
|
|
36
|
+
import { LoaderIcon as St } from "./components/icons/LoaderIcon.js";
|
|
36
37
|
import { useInfiniteScroll as wn } from "./utils/hooks/useInfiniteScroll.js";
|
|
37
38
|
import { RPSplitter as bn } from "./components/layout/sidebar/RPSplitter.js";
|
|
38
39
|
import { useToolbarComponentContext as _e, ToolbarComponentProvider as Cn } from "./contexts/ToolbarComponentContext.js";
|
|
@@ -45,79 +46,79 @@ import { useViewportContext as Re, ViewportProvider as yn } from "./contexts/Vie
|
|
|
45
46
|
import { useThemeContext as In } from "./contexts/ThemeContext.js";
|
|
46
47
|
import { SimpleLinkService as Rn } from "./utils/link_service.js";
|
|
47
48
|
import { annotationsEvents as Ln, annotationEventsHandler as Nn, handleClick as At, handleAnnotationWidget as En, handleAnnotationLink as On, bindLayerEvents as Dn, unbindLayerEvents as Ft } from "./utils/annotations.js";
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import { useDebounce as vt } from "./utils/hooks/useDebounce.js";
|
|
49
|
+
import { _ as zn, U as An } from "./Popover-b7402893.js";
|
|
50
|
+
import { useMousePressed as Fn } from "./utils/hooks/useMousePressed.js";
|
|
51
|
+
import { useGrabScroll as kn } from "./utils/hooks/useGrabScroll.js";
|
|
52
|
+
import { usePinch as Mn } from "./utils/hooks/usePinch.js";
|
|
53
|
+
import { useDebounce as _t } from "./utils/hooks/useDebounce.js";
|
|
54
54
|
import { getThumbnailViewport as kt } from "./utils/getThumbnailViewport.js";
|
|
55
55
|
import { smoothScrollTo as Mt } from "./utils/smoothScrollTo.js";
|
|
56
|
-
import { appConsole as
|
|
56
|
+
import { appConsole as Wn } from "./utils/appConsole.js";
|
|
57
57
|
import { FileUploadTool as ur } from "./components/layout/toolbar/FileUploadTool.js";
|
|
58
|
-
import { DarkModeTool as
|
|
59
|
-
import { ThreeDotIcon as
|
|
58
|
+
import { DarkModeTool as Hn } from "./components/layout/toolbar/DarkModeTool.js";
|
|
59
|
+
import { ThreeDotIcon as $n } from "./components/icons/ThreeDotIcon.js";
|
|
60
60
|
import { UIDropDown as pr } from "./components/ui/DropDown.js";
|
|
61
|
-
import { c as
|
|
62
|
-
import { D as
|
|
63
|
-
import { a as
|
|
61
|
+
import { c as Vn, u as xt, P as We, b as Fe, d as yt, k as Gn, a as qn, i as Un } from "./index-271658fe.js";
|
|
62
|
+
import { D as Zn, a as at } from "./index-10ac1200.js";
|
|
63
|
+
import { a as Bn, u as jn, F as Kn, b as Xn, G as Ue } from "./index-0f08882b.js";
|
|
64
|
+
import { h as Jn } from "./component-1da194e8.js";
|
|
64
65
|
import { CloseIcon as hr } from "./components/icons/CloseIcon.js";
|
|
65
66
|
import { dateFormatter as Wt } from "./utils/dateFormatter.js";
|
|
66
|
-
import { PropertyItem as
|
|
67
|
-
import { useOtherToolContext as
|
|
68
|
-
import { DocumentProperties as
|
|
69
|
-
import { RotateTool as
|
|
70
|
-
import { ScrollModeTool as
|
|
71
|
-
import { MenuSeparator as
|
|
72
|
-
import { FileDownloadDefaultIcon as
|
|
67
|
+
import { PropertyItem as Yn } from "./components/layout/toolbar/PropertyItem.js";
|
|
68
|
+
import { useOtherToolContext as Qn, OtherToolProvider as eo } from "./contexts/OtherToolContext.js";
|
|
69
|
+
import { DocumentProperties as to } from "./components/layout/toolbar/DocumentProperties.js";
|
|
70
|
+
import { RotateTool as ro } from "./components/layout/toolbar/RotateTool.js";
|
|
71
|
+
import { ScrollModeTool as no } from "./components/layout/toolbar/ScrollModeTool.js";
|
|
72
|
+
import { MenuSeparator as It } from "./components/layout/toolbar/MenuSeparator.js";
|
|
73
|
+
import { FileDownloadDefaultIcon as oo } from "./components/icons/FileDownloadDefaultIcon.js";
|
|
73
74
|
import { MenuItem as be } from "./components/layout/toolbar/MenuItem.js";
|
|
74
|
-
import { PrintDefaultTool as
|
|
75
|
+
import { PrintDefaultTool as io } from "./components/icons/PrintDefaultIcon.js";
|
|
75
76
|
import { FullScreenTool as mr } from "./components/layout/toolbar/FullScreenTool.js";
|
|
76
77
|
import { GoToDownIcon as fr } from "./components/icons/GoToDownIcon.js";
|
|
77
|
-
import { SelectionModeTool as
|
|
78
|
-
import { ZoomInIcon as
|
|
79
|
-
import { ZoomOutIcon as
|
|
78
|
+
import { SelectionModeTool as ao } from "./components/layout/toolbar/SelectionModeTool.js";
|
|
79
|
+
import { ZoomInIcon as so } from "./components/icons/ZoomInIcon.js";
|
|
80
|
+
import { ZoomOutIcon as co } from "./components/icons/ZoomOutIcon.js";
|
|
80
81
|
import { PAGE_PADDING as Ht } from "./utils/constants.js";
|
|
81
|
-
import { getZoomLevel as
|
|
82
|
-
import { SearchIcon as
|
|
82
|
+
import { getZoomLevel as lo } from "./utils/getZoomLevel.js";
|
|
83
|
+
import { SearchIcon as uo } from "./components/icons/SearchIcon.js";
|
|
83
84
|
import { UICheckbox as $t } from "./components/ui/Checkbox.js";
|
|
84
|
-
import { ClearIcon as
|
|
85
|
+
import { ClearIcon as po } from "./components/icons/ClearIcon.js";
|
|
85
86
|
import { InfoIcon as Vt } from "./components/icons/InfoIcon.js";
|
|
86
87
|
import './assets/RPDefaultLayout.css';const gr = () => {
|
|
87
|
-
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 } =
|
|
88
|
+
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 } = Pt(), u = M(e), m = M(t), p = M(s);
|
|
88
89
|
O(() => {
|
|
89
90
|
r != null && r.scrollToItem && (c.current = r);
|
|
90
91
|
}, [r]), O(() => {
|
|
91
|
-
u.current = e,
|
|
92
|
+
u.current = e, m.current = t;
|
|
92
93
|
}, [e, t]);
|
|
93
94
|
const g = I(
|
|
94
95
|
(b) => {
|
|
95
96
|
if (!n)
|
|
96
97
|
return;
|
|
97
98
|
const v = Math.ceil(b / 2) * 2 - 1;
|
|
98
|
-
return b === v + 1 ? new Promise((
|
|
99
|
+
return b === v + 1 ? new Promise((w) => {
|
|
99
100
|
n.scrollTo({
|
|
100
101
|
left: l[v],
|
|
101
102
|
top: 0
|
|
102
|
-
}),
|
|
103
|
-
}) : new Promise((
|
|
103
|
+
}), w();
|
|
104
|
+
}) : new Promise((w) => {
|
|
104
105
|
n.scrollTo({
|
|
105
106
|
left: 0,
|
|
106
107
|
top: 0
|
|
107
|
-
}),
|
|
108
|
+
}), w();
|
|
108
109
|
});
|
|
109
110
|
},
|
|
110
111
|
[n, l, Mt]
|
|
111
112
|
);
|
|
112
113
|
return O(() => {
|
|
113
|
-
u.current = e,
|
|
114
|
+
u.current = e, m.current = t;
|
|
114
115
|
}, [e, t]), O(() => {
|
|
115
|
-
|
|
116
|
+
p.current = s;
|
|
116
117
|
}, [s]), { scrollToPage: I(
|
|
117
118
|
(b) => {
|
|
118
119
|
const v = b - 1;
|
|
119
|
-
let
|
|
120
|
-
if (
|
|
120
|
+
let w = v, f = 0;
|
|
121
|
+
if (m.current === qe.DUAL_PAGE && u.current === K.PAGE_SCROLLING)
|
|
121
122
|
return g(b), Promise.resolve();
|
|
122
123
|
if (u.current === K.PAGE_SCROLLING)
|
|
123
124
|
return a(b), Promise.resolve();
|
|
@@ -125,18 +126,18 @@ import './assets/RPDefaultLayout.css';const gr = () => {
|
|
|
125
126
|
return Promise.resolve();
|
|
126
127
|
const T = o;
|
|
127
128
|
if (u.current === K.HORIZONTAL_SCROLLING) {
|
|
128
|
-
|
|
129
|
-
const
|
|
129
|
+
f = v;
|
|
130
|
+
const h = v * (l[v] ?? 0);
|
|
130
131
|
return new Promise((P) => {
|
|
131
132
|
T.scrollTo({
|
|
132
|
-
left:
|
|
133
|
+
left: h,
|
|
133
134
|
top: 0
|
|
134
135
|
}), P();
|
|
135
136
|
});
|
|
136
137
|
}
|
|
137
|
-
if (
|
|
138
|
-
|
|
139
|
-
const P =
|
|
138
|
+
if (m.current === qe.DUAL_PAGE) {
|
|
139
|
+
f = v % 2, w = Math.floor(v / 2);
|
|
140
|
+
const P = w * (d[w] ?? 0), C = f * (l[f] ?? 0);
|
|
140
141
|
return new Promise((S) => {
|
|
141
142
|
T.scrollTo({
|
|
142
143
|
left: C,
|
|
@@ -144,13 +145,13 @@ import './assets/RPDefaultLayout.css';const gr = () => {
|
|
|
144
145
|
}), S();
|
|
145
146
|
});
|
|
146
147
|
}
|
|
147
|
-
const x =
|
|
148
|
+
const x = w * (d[w] ?? 0);
|
|
148
149
|
return new Promise(
|
|
149
|
-
(
|
|
150
|
+
(h) => {
|
|
150
151
|
T.scrollTo({
|
|
151
152
|
top: x,
|
|
152
153
|
left: 0
|
|
153
|
-
}),
|
|
154
|
+
}), h();
|
|
154
155
|
}
|
|
155
156
|
// smoothScrollTo(scrollElement, { left: 0, top: targetTop }, resolve)
|
|
156
157
|
);
|
|
@@ -165,24 +166,24 @@ import './assets/RPDefaultLayout.css';const gr = () => {
|
|
|
165
166
|
l
|
|
166
167
|
]
|
|
167
168
|
) };
|
|
168
|
-
},
|
|
169
|
-
const [e, r] = $(t), [o, n] = $(0), { scrollToPage: a } = gr(), c = M(1), { isScrolling: s } = Qe(), { viewMode: l } = Je(), { scrollMode: d } = Oe(), u =
|
|
169
|
+
}, ho = (t = 1) => {
|
|
170
|
+
const [e, r] = $(t), [o, n] = $(0), { scrollToPage: a } = gr(), c = M(1), { isScrolling: s } = Qe(), { viewMode: l } = Je(), { scrollMode: d } = Oe(), u = _t(e, 100), m = I(
|
|
170
171
|
(v) => {
|
|
171
172
|
if (!/^[0-9]*$/g.test(v.toString()) || !v)
|
|
172
173
|
return { success: !1, currentPage: c.current };
|
|
173
|
-
const
|
|
174
|
-
return
|
|
174
|
+
const f = +v;
|
|
175
|
+
return f < 0 || f > o ? { success: !1, currentPage: c.current } : (r(f), c.current = f, { success: !0, currentPage: +v });
|
|
175
176
|
},
|
|
176
177
|
[o]
|
|
177
|
-
),
|
|
178
|
+
), p = I(m, [m]), g = I(
|
|
178
179
|
async (v) => {
|
|
179
180
|
if (s.current)
|
|
180
181
|
return { success: !1, currentPage: c.current };
|
|
181
|
-
const
|
|
182
|
-
return
|
|
182
|
+
const w = m(v);
|
|
183
|
+
return w.success && (s.current = !0, await a(w.currentPage), s.current = !1), w;
|
|
183
184
|
},
|
|
184
|
-
[
|
|
185
|
-
),
|
|
185
|
+
[m, a]
|
|
186
|
+
), _ = I(() => {
|
|
186
187
|
let v = e - 1;
|
|
187
188
|
g(v);
|
|
188
189
|
}, [g, e, l, d]), b = I(() => {
|
|
@@ -192,10 +193,10 @@ import './assets/RPDefaultLayout.css';const gr = () => {
|
|
|
192
193
|
return {
|
|
193
194
|
focusedPage: u,
|
|
194
195
|
totalPages: o,
|
|
195
|
-
setFocusedPage:
|
|
196
|
+
setFocusedPage: p,
|
|
196
197
|
setTotalPages: n,
|
|
197
198
|
nextPage: b,
|
|
198
|
-
prevPage:
|
|
199
|
+
prevPage: _,
|
|
199
200
|
goToPage: g
|
|
200
201
|
};
|
|
201
202
|
}, vr = Be({
|
|
@@ -212,9 +213,9 @@ import './assets/RPDefaultLayout.css';const gr = () => {
|
|
|
212
213
|
}
|
|
213
214
|
}), ce = () => {
|
|
214
215
|
const t = je(vr);
|
|
215
|
-
return typeof (t == null ? void 0 : t.focusedPage) > "u" &&
|
|
216
|
-
},
|
|
217
|
-
const { pdf: e } = X(), { focusedPage: r, totalPages: o, setFocusedPage: n, setTotalPages: a, goToPage: c, nextPage: s, prevPage: l } =
|
|
216
|
+
return typeof (t == null ? void 0 : t.focusedPage) > "u" && Wn.error("Please use this hooks inside children component of RPProvider"), t;
|
|
217
|
+
}, _s = ({ children: t }) => {
|
|
218
|
+
const { pdf: e } = X(), { focusedPage: r, totalPages: o, setFocusedPage: n, setTotalPages: a, goToPage: c, nextPage: s, prevPage: l } = ho();
|
|
218
219
|
return O(() => {
|
|
219
220
|
e != null && e.numPages && (a(e.numPages), n(1));
|
|
220
221
|
}, [e, a, n]), /* @__PURE__ */ i(
|
|
@@ -233,7 +234,7 @@ import './assets/RPDefaultLayout.css';const gr = () => {
|
|
|
233
234
|
}
|
|
234
235
|
);
|
|
235
236
|
};
|
|
236
|
-
const
|
|
237
|
+
const mo = () => {
|
|
237
238
|
const { pdf: t, pages: e } = X(), [r, o] = $({
|
|
238
239
|
loadedPages: 0,
|
|
239
240
|
totalPages: 0,
|
|
@@ -242,11 +243,11 @@ const fo = () => {
|
|
|
242
243
|
O(() => {
|
|
243
244
|
u.current;
|
|
244
245
|
}, [u]);
|
|
245
|
-
const
|
|
246
|
+
const m = I(() => {
|
|
246
247
|
document.documentElement.classList.remove("rp-print-html-printing"), document.body.classList.remove("rp-print-body-printing");
|
|
247
248
|
const T = document.querySelector(".rp-print-zone");
|
|
248
249
|
T && T.remove();
|
|
249
|
-
}, []),
|
|
250
|
+
}, []), p = I(() => {
|
|
250
251
|
u.current = !1, a(!1), s(!1), d(null), o({
|
|
251
252
|
loadedPages: 0,
|
|
252
253
|
totalPages: 0,
|
|
@@ -254,17 +255,17 @@ const fo = () => {
|
|
|
254
255
|
});
|
|
255
256
|
}, []), g = () => {
|
|
256
257
|
u.current = !0;
|
|
257
|
-
},
|
|
258
|
+
}, _ = async ({
|
|
258
259
|
scratchCanvas: T,
|
|
259
260
|
pdfDocument: x,
|
|
260
|
-
pageNumber:
|
|
261
|
+
pageNumber: h,
|
|
261
262
|
viewerPdfPage: P,
|
|
262
263
|
printResolution: C,
|
|
263
264
|
optionalContentConfigPromise: S,
|
|
264
265
|
printAnnotationStoragePromise: A
|
|
265
266
|
}) => {
|
|
266
267
|
if (u.current) {
|
|
267
|
-
|
|
268
|
+
p();
|
|
268
269
|
return;
|
|
269
270
|
}
|
|
270
271
|
const R = C / hn.PDF;
|
|
@@ -272,11 +273,11 @@ const fo = () => {
|
|
|
272
273
|
const D = T.getContext("2d");
|
|
273
274
|
D.save(), D.fillStyle = "rgb(255, 255, 255)", D.fillRect(0, 0, T.width, T.height), D.restore();
|
|
274
275
|
const [L, F] = await Promise.all([
|
|
275
|
-
x.getPage(
|
|
276
|
+
x.getPage(h),
|
|
276
277
|
A
|
|
277
278
|
]);
|
|
278
279
|
if (u.current) {
|
|
279
|
-
|
|
280
|
+
p();
|
|
280
281
|
return;
|
|
281
282
|
}
|
|
282
283
|
const E = {
|
|
@@ -296,43 +297,43 @@ const fo = () => {
|
|
|
296
297
|
}, b = I(() => {
|
|
297
298
|
const T = window.print;
|
|
298
299
|
return new Promise((x) => {
|
|
299
|
-
const
|
|
300
|
+
const h = (S) => {
|
|
300
301
|
setTimeout(() => {
|
|
301
302
|
T.call(window), setTimeout(() => S(), 20);
|
|
302
303
|
}, 0);
|
|
303
304
|
};
|
|
304
305
|
if (document.querySelector(".rp-print-zone")) {
|
|
305
|
-
|
|
306
|
+
h(x);
|
|
306
307
|
return;
|
|
307
308
|
}
|
|
308
309
|
const C = new MutationObserver(() => {
|
|
309
|
-
document.querySelector(".rp-print-zone") && (
|
|
310
|
+
document.querySelector(".rp-print-zone") && (h(x), C.disconnect());
|
|
310
311
|
});
|
|
311
312
|
C.observe(document.body, { childList: !0, subtree: !0 });
|
|
312
313
|
});
|
|
313
314
|
}, []), v = async (T) => {
|
|
314
|
-
const x = document.createElement("img"),
|
|
315
|
-
return
|
|
315
|
+
const x = document.createElement("img"), h = document.createElement("div");
|
|
316
|
+
return h.classList.add("rp-print-page"), await new Promise((P, C) => {
|
|
316
317
|
T.toBlob((S) => {
|
|
317
318
|
S ? (x.src = URL.createObjectURL(S), x.onload = () => {
|
|
318
319
|
URL.revokeObjectURL(x.src), P();
|
|
319
320
|
}, x.onerror = C) : C(new Error("Failed to create blob"));
|
|
320
321
|
});
|
|
321
322
|
}).catch(() => {
|
|
322
|
-
}),
|
|
323
|
-
},
|
|
324
|
-
const
|
|
325
|
-
|
|
323
|
+
}), h.appendChild(x), h;
|
|
324
|
+
}, w = (T, x) => {
|
|
325
|
+
const h = document.createElement("div");
|
|
326
|
+
h.classList.add("rp-print-zone");
|
|
326
327
|
const P = document.createElement("style"), C = x.get(1);
|
|
327
328
|
if (C) {
|
|
328
329
|
const { width: S, height: A } = C == null ? void 0 : C.page.getViewport({ scale: 1 });
|
|
329
330
|
P.innerHTML = `@page { size: ${S}px ${A}px }`;
|
|
330
331
|
}
|
|
331
|
-
return
|
|
332
|
-
},
|
|
332
|
+
return h.appendChild(P), h.append(...T), h;
|
|
333
|
+
}, f = I(async () => {
|
|
333
334
|
if (!t)
|
|
334
335
|
return;
|
|
335
|
-
|
|
336
|
+
p();
|
|
336
337
|
const T = document.createElement("canvas"), x = [];
|
|
337
338
|
try {
|
|
338
339
|
t.isPureXfa && console.warn("[rp] XFA Form is not supported at the moment.");
|
|
@@ -341,11 +342,11 @@ const fo = () => {
|
|
|
341
342
|
), S = e.size;
|
|
342
343
|
for (const [R, D] of e) {
|
|
343
344
|
if (u.current) {
|
|
344
|
-
|
|
345
|
+
p();
|
|
345
346
|
return;
|
|
346
347
|
}
|
|
347
348
|
const L = D.page.getViewport({ scale: 1 });
|
|
348
|
-
if (await
|
|
349
|
+
if (await _({
|
|
349
350
|
scratchCanvas: T,
|
|
350
351
|
pdfDocument: t,
|
|
351
352
|
pageNumber: R,
|
|
@@ -354,7 +355,7 @@ const fo = () => {
|
|
|
354
355
|
optionalContentConfigPromise: P,
|
|
355
356
|
printAnnotationStoragePromise: C
|
|
356
357
|
}), u.current) {
|
|
357
|
-
|
|
358
|
+
p();
|
|
358
359
|
return;
|
|
359
360
|
}
|
|
360
361
|
const F = await v(T);
|
|
@@ -367,26 +368,26 @@ const fo = () => {
|
|
|
367
368
|
});
|
|
368
369
|
}
|
|
369
370
|
if (u.current) {
|
|
370
|
-
|
|
371
|
+
p();
|
|
371
372
|
return;
|
|
372
373
|
}
|
|
373
|
-
const A =
|
|
374
|
+
const A = w(x, e);
|
|
374
375
|
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
|
-
} catch (
|
|
376
|
-
s(!0),
|
|
376
|
+
} catch (h) {
|
|
377
|
+
s(!0), h instanceof Error && d(h);
|
|
377
378
|
} finally {
|
|
378
379
|
T.height = 0, T.width = 0;
|
|
379
380
|
}
|
|
380
381
|
}, [t, e, u]);
|
|
381
382
|
return O(() => {
|
|
382
383
|
const T = () => {
|
|
383
|
-
|
|
384
|
+
p(), m();
|
|
384
385
|
};
|
|
385
386
|
return window.addEventListener("afterprint", T, !0), () => {
|
|
386
387
|
window.removeEventListener("afterprint", T, !0);
|
|
387
388
|
};
|
|
388
|
-
}, [
|
|
389
|
-
print:
|
|
389
|
+
}, [m, p]), {
|
|
390
|
+
print: f,
|
|
390
391
|
cancel: g,
|
|
391
392
|
progress: r,
|
|
392
393
|
isComplete: n,
|
|
@@ -410,10 +411,10 @@ const fo = () => {
|
|
|
410
411
|
console.error("Error in setOnError callback:", e);
|
|
411
412
|
}
|
|
412
413
|
}
|
|
413
|
-
}),
|
|
414
|
-
const [e, r] = $(null), [o, n] = $(null), { print: a, cancel: c, progress: s, isComplete: l, isError: d, error: u } =
|
|
414
|
+
}), ws = ({ children: t }) => {
|
|
415
|
+
const [e, r] = $(null), [o, n] = $(null), { print: a, cancel: c, progress: s, isComplete: l, isError: d, error: u } = mo(), m = I((v) => {
|
|
415
416
|
v && typeof v == "function" && n(() => v);
|
|
416
|
-
}, []),
|
|
417
|
+
}, []), p = (v) => {
|
|
417
418
|
u && v(u);
|
|
418
419
|
}, g = I(
|
|
419
420
|
(v) => {
|
|
@@ -422,22 +423,22 @@ const fo = () => {
|
|
|
422
423
|
[s, e]
|
|
423
424
|
);
|
|
424
425
|
O(() => {
|
|
425
|
-
l && o &&
|
|
426
|
+
l && o && _();
|
|
426
427
|
}, [l, o]), O(() => {
|
|
427
|
-
d &&
|
|
428
|
+
d && p((v) => {
|
|
428
429
|
console.error(v);
|
|
429
430
|
});
|
|
430
431
|
}, [d]), O(() => {
|
|
431
432
|
s && e && e(s);
|
|
432
433
|
}, [s, e]);
|
|
433
|
-
const
|
|
434
|
+
const _ = () => {
|
|
434
435
|
o && (o(), n(null));
|
|
435
436
|
}, b = {
|
|
436
437
|
print: a,
|
|
437
438
|
cancel: c,
|
|
438
439
|
setOnProgress: g,
|
|
439
|
-
setOnComplete:
|
|
440
|
-
setOnError:
|
|
440
|
+
setOnComplete: m,
|
|
441
|
+
setOnError: p,
|
|
441
442
|
progress: s
|
|
442
443
|
};
|
|
443
444
|
return /* @__PURE__ */ i(_r.Provider, { value: b, children: t });
|
|
@@ -446,42 +447,42 @@ const fo = () => {
|
|
|
446
447
|
if (!t)
|
|
447
448
|
throw new Error("usePrintContext must be used within a PrintProvider");
|
|
448
449
|
return t;
|
|
449
|
-
},
|
|
450
|
+
}, fo = () => {
|
|
450
451
|
const [t, e] = $({}), { pages: r } = X(), { rotate: o } = Ke(), n = k(() => Object.keys(t).length, [t]), a = I(
|
|
451
452
|
(s) => {
|
|
452
453
|
if (!r.size)
|
|
453
454
|
return;
|
|
454
|
-
const l = Array.from(r.values()).slice(0, s).map((
|
|
455
|
-
const { thumbnailViewport:
|
|
455
|
+
const l = Array.from(r.values()).slice(0, s).map((m) => {
|
|
456
|
+
const { thumbnailViewport: p, scale: g } = kt(m.page, o);
|
|
456
457
|
return {
|
|
457
458
|
scale: g,
|
|
458
|
-
page:
|
|
459
|
+
page: m.page,
|
|
459
460
|
loading: !0,
|
|
460
|
-
viewport:
|
|
461
|
+
viewport: p
|
|
461
462
|
};
|
|
462
|
-
}), d = l.reduce((
|
|
463
|
+
}), d = l.reduce((m, p) => (m[p.page.pageNumber] = p, m), {});
|
|
463
464
|
e(d);
|
|
464
465
|
const u = [];
|
|
465
|
-
for (const
|
|
466
|
-
const
|
|
467
|
-
scale:
|
|
466
|
+
for (const m of l) {
|
|
467
|
+
const p = document.createElement("canvas"), g = vt(m.page, p, {
|
|
468
|
+
scale: m.scale,
|
|
468
469
|
rotate: o
|
|
469
470
|
}).promise.then(() => {
|
|
470
|
-
const
|
|
471
|
+
const _ = p.toDataURL();
|
|
471
472
|
return {
|
|
472
|
-
...
|
|
473
|
-
thumbnailSrc:
|
|
473
|
+
...m,
|
|
474
|
+
thumbnailSrc: _,
|
|
474
475
|
loading: !1
|
|
475
476
|
};
|
|
476
477
|
});
|
|
477
478
|
u.push(g);
|
|
478
479
|
}
|
|
479
|
-
Promise.all(u).then((
|
|
480
|
-
const
|
|
481
|
-
(g,
|
|
480
|
+
Promise.all(u).then((m) => {
|
|
481
|
+
const p = m.reduce(
|
|
482
|
+
(g, _) => (g[_.page.pageNumber] = _, g),
|
|
482
483
|
{}
|
|
483
484
|
);
|
|
484
|
-
e((g) => ({ ...g, ...
|
|
485
|
+
e((g) => ({ ...g, ...p }));
|
|
485
486
|
}).catch(() => {
|
|
486
487
|
});
|
|
487
488
|
},
|
|
@@ -507,17 +508,17 @@ const fo = () => {
|
|
|
507
508
|
}
|
|
508
509
|
}));
|
|
509
510
|
const d = document.createElement("canvas");
|
|
510
|
-
|
|
511
|
-
const u = d.toDataURL(), { thumbnailViewport:
|
|
511
|
+
vt(l.page, d, { scale: l.thumbnailScale, rotate: o }).promise.then(() => {
|
|
512
|
+
const u = d.toDataURL(), { thumbnailViewport: m, scale: p } = kt(l.page, o);
|
|
512
513
|
return {
|
|
513
|
-
scale:
|
|
514
|
+
scale: p,
|
|
514
515
|
thumbnailSrc: u,
|
|
515
516
|
page: l.page,
|
|
516
517
|
loading: !1,
|
|
517
|
-
viewport:
|
|
518
|
+
viewport: m
|
|
518
519
|
};
|
|
519
520
|
}).then((u) => {
|
|
520
|
-
e((
|
|
521
|
+
e((m) => ({ ...m, [s]: u }));
|
|
521
522
|
});
|
|
522
523
|
},
|
|
523
524
|
[r, o]
|
|
@@ -533,11 +534,11 @@ const fo = () => {
|
|
|
533
534
|
setActive: (t) => {
|
|
534
535
|
},
|
|
535
536
|
active: !1
|
|
536
|
-
}), br = () => je(wr),
|
|
537
|
+
}), br = () => je(wr), bs = ({
|
|
537
538
|
children: t,
|
|
538
539
|
initialThumbnailsVisible: e
|
|
539
540
|
}) => {
|
|
540
|
-
const { thumbnailPages: r, addPage: o, addToPage: n, thumbnailLength: a } =
|
|
541
|
+
const { thumbnailPages: r, addPage: o, addToPage: n, thumbnailLength: a } = fo(), [c, s] = $(e);
|
|
541
542
|
return /* @__PURE__ */ i(
|
|
542
543
|
wr.Provider,
|
|
543
544
|
{
|
|
@@ -545,22 +546,22 @@ const fo = () => {
|
|
|
545
546
|
children: t
|
|
546
547
|
}
|
|
547
548
|
);
|
|
548
|
-
},
|
|
549
|
-
const [r, o] = $(e), [n, a] = $(!1), { pdf: c, pages: s } = X(), l =
|
|
549
|
+
}, go = (t = {}, e = "") => {
|
|
550
|
+
const [r, o] = $(e), [n, a] = $(!1), { pdf: c, pages: s } = X(), l = Pt(), d = M(!r), { currentZoom: u } = Xe(), [m, p] = $([]), { setFocusedPage: g } = ce(), [_, b] = $(0), { pageScrollElementRef: v, virtualScrollableElementRef: w } = Ye(), { scrollMode: f } = Oe(), { pagesRef: T } = Ie(), [x, h] = $(null), P = M({}), C = k(() => _ === 0 ? null : m[_ - 1], [_, m]), S = k(() => m.length, [m]);
|
|
550
551
|
O(() => {
|
|
551
552
|
if (!C || !s)
|
|
552
553
|
return;
|
|
553
|
-
const L =
|
|
554
|
+
const L = w || v;
|
|
554
555
|
if (!L || !T)
|
|
555
556
|
return;
|
|
556
557
|
const F = s.get(C.page), E = T.clientHeight / 2, y = T.clientWidth / 2;
|
|
557
558
|
let N = 0, V = 0;
|
|
558
|
-
|
|
559
|
+
f === K.PAGE_SCROLLING && g(C.page), f === K.VERTICAL_SCROLLING && (N = l.heights.slice(0, C.page - 1).reduce((B, J) => B + J, 0)), f === K.HORIZONTAL_SCROLLING && (V = l.widths.slice(0, C.page - 1).reduce((B, J) => B + J, 0));
|
|
559
560
|
let q;
|
|
560
561
|
if (!F)
|
|
561
562
|
return;
|
|
562
563
|
const Z = P.current[C.page], ee = F.page.getViewport({ scale: 1 });
|
|
563
|
-
q = new
|
|
564
|
+
q = new Tt.TextLayer({
|
|
564
565
|
viewport: ee,
|
|
565
566
|
textContentSource: Z,
|
|
566
567
|
container: document.createElement("div")
|
|
@@ -580,8 +581,8 @@ const fo = () => {
|
|
|
580
581
|
g,
|
|
581
582
|
l,
|
|
582
583
|
C,
|
|
583
|
-
|
|
584
|
-
|
|
584
|
+
f,
|
|
585
|
+
w,
|
|
585
586
|
v,
|
|
586
587
|
T
|
|
587
588
|
]);
|
|
@@ -603,10 +604,10 @@ const fo = () => {
|
|
|
603
604
|
}, []);
|
|
604
605
|
return O(() => {
|
|
605
606
|
if (!r) {
|
|
606
|
-
d.current = !0,
|
|
607
|
+
d.current = !0, p([]), b(0);
|
|
607
608
|
return;
|
|
608
609
|
}
|
|
609
|
-
d.current = !1, a(!0),
|
|
610
|
+
d.current = !1, a(!0), p([]), b(0), D(c).then((L) => {
|
|
610
611
|
P.current = L;
|
|
611
612
|
const E = Object.keys(L).reduce((y, N) => {
|
|
612
613
|
const V = un(
|
|
@@ -617,22 +618,22 @@ const fo = () => {
|
|
|
617
618
|
).map((q, Z) => ({ ...q, page: Number(N), pageMatchIdx: Z }));
|
|
618
619
|
return [...y, ...V];
|
|
619
620
|
}, []);
|
|
620
|
-
|
|
621
|
+
p(E), b(E.length ? 1 : 0);
|
|
621
622
|
}).catch(() => {
|
|
622
|
-
|
|
623
|
+
p([]), b(0);
|
|
623
624
|
}).finally(() => a(!1));
|
|
624
625
|
}, [r, D, c, t]), {
|
|
625
626
|
search: r,
|
|
626
627
|
setSearch: o,
|
|
627
628
|
loading: n,
|
|
628
|
-
matches:
|
|
629
|
+
matches: m,
|
|
629
630
|
totalMatches: S,
|
|
630
|
-
currentMatchPosition:
|
|
631
|
+
currentMatchPosition: _,
|
|
631
632
|
currentMatch: C,
|
|
632
633
|
nextMatch: A,
|
|
633
634
|
prevMatch: R,
|
|
634
635
|
currentMatchElement: x,
|
|
635
|
-
setCurrentMatchElement:
|
|
636
|
+
setCurrentMatchElement: h
|
|
636
637
|
};
|
|
637
638
|
}, Cr = Be({
|
|
638
639
|
search: "",
|
|
@@ -652,7 +653,7 @@ const fo = () => {
|
|
|
652
653
|
currentMatchElement: null,
|
|
653
654
|
setCurrentMatchElement: (t) => {
|
|
654
655
|
}
|
|
655
|
-
}),
|
|
656
|
+
}), Cs = ({
|
|
656
657
|
children: t,
|
|
657
658
|
initialSearch: e
|
|
658
659
|
}) => {
|
|
@@ -664,11 +665,11 @@ const fo = () => {
|
|
|
664
665
|
currentMatch: l,
|
|
665
666
|
search: d,
|
|
666
667
|
matches: u,
|
|
667
|
-
nextMatch:
|
|
668
|
-
prevMatch:
|
|
668
|
+
nextMatch: m,
|
|
669
|
+
prevMatch: p,
|
|
669
670
|
currentMatchElement: g,
|
|
670
|
-
setCurrentMatchElement:
|
|
671
|
-
} =
|
|
671
|
+
setCurrentMatchElement: _
|
|
672
|
+
} = go(r, e);
|
|
672
673
|
return /* @__PURE__ */ i(
|
|
673
674
|
Cr.Provider,
|
|
674
675
|
{
|
|
@@ -680,12 +681,12 @@ const fo = () => {
|
|
|
680
681
|
totalMatches: c,
|
|
681
682
|
currentMatchPosition: s,
|
|
682
683
|
currentMatch: l,
|
|
683
|
-
nextMatch:
|
|
684
|
-
prevMatch:
|
|
684
|
+
nextMatch: m,
|
|
685
|
+
prevMatch: p,
|
|
685
686
|
search: d,
|
|
686
687
|
matches: u,
|
|
687
688
|
currentMatchElement: g,
|
|
688
|
-
setCurrentMatchElement:
|
|
689
|
+
setCurrentMatchElement: _
|
|
689
690
|
},
|
|
690
691
|
children: t
|
|
691
692
|
}
|
|
@@ -699,11 +700,11 @@ const fo = () => {
|
|
|
699
700
|
"rp-cursor-grab": "_rp-cursor-grab_1776r_27",
|
|
700
701
|
"rp-cursor-grabbing": "_rp-cursor-grabbing_1776r_35",
|
|
701
702
|
"rp-loader": "_rp-loader_1776r_43"
|
|
702
|
-
},
|
|
703
|
+
}, st = {
|
|
703
704
|
"rp-page-wrapper": "_rp-page-wrapper_h7a2q_1",
|
|
704
705
|
"rp-page": "_rp-page_h7a2q_1",
|
|
705
706
|
"rp-loader-wrapper": "_rp-loader-wrapper_h7a2q_14"
|
|
706
|
-
},
|
|
707
|
+
}, vo = (t) => {
|
|
707
708
|
const { pageNumber: e, onLoaded: r, onLoading: o } = t, n = M(null), { pages: a } = X(), { rotate: c } = Ke(), s = M(), { currentZoom: l } = Xe();
|
|
708
709
|
return O(() => {
|
|
709
710
|
if (!a || l === 0)
|
|
@@ -712,8 +713,8 @@ const fo = () => {
|
|
|
712
713
|
if (n.current && d) {
|
|
713
714
|
const u = n.current;
|
|
714
715
|
u.hidden = !0;
|
|
715
|
-
const
|
|
716
|
-
|
|
716
|
+
const m = s.current;
|
|
717
|
+
m && m.cancel(), o && o(), s.current = vt(d.page, u, {
|
|
717
718
|
scale: l,
|
|
718
719
|
rotate: c,
|
|
719
720
|
renderForms: !0
|
|
@@ -729,53 +730,53 @@ const fo = () => {
|
|
|
729
730
|
(u = s.current) == null || u.cancel();
|
|
730
731
|
};
|
|
731
732
|
}, [a, e, c, l, o, r]), /* @__PURE__ */ i("canvas", { "data-rp": `page-${e}-canvas`, ref: n });
|
|
732
|
-
},
|
|
733
|
+
}, ct = {
|
|
733
734
|
"rp-text-layer": "_rp-text-layer_kwwfn_1",
|
|
734
735
|
"rp-text-layer-text": "_rp-text-layer-text_kwwfn_9"
|
|
735
|
-
},
|
|
736
|
+
}, _o = (t) => {
|
|
736
737
|
const { pageNumber: e } = t, { pages: r } = X(), o = M(null), { matches: n, currentMatch: a, setCurrentMatchElement: c } = Tr(), [s, l] = $(
|
|
737
738
|
[]
|
|
738
|
-
), d = M(), u = M(),
|
|
739
|
-
(
|
|
740
|
-
if (v && lr(
|
|
741
|
-
|
|
739
|
+
), d = M(), u = M(), m = M(), p = k(() => n.filter((_) => _.pageIndex === e - 1), [n, e]), g = I(
|
|
740
|
+
(_, b, v = !1) => {
|
|
741
|
+
if (v && lr(_, b), !p.length) {
|
|
742
|
+
m.current = void 0, l([]);
|
|
742
743
|
return;
|
|
743
744
|
}
|
|
744
|
-
const
|
|
745
|
-
l(
|
|
745
|
+
const w = cr(p, _, b);
|
|
746
|
+
l(w);
|
|
746
747
|
},
|
|
747
|
-
[
|
|
748
|
+
[p]
|
|
748
749
|
);
|
|
749
750
|
return O(() => {
|
|
750
751
|
var v;
|
|
751
|
-
if ((v =
|
|
752
|
+
if ((v = m.current) == null || v.classList.remove("selected"), !s.length || !a || a.pageIndex !== e - 1)
|
|
752
753
|
return;
|
|
753
|
-
const
|
|
754
|
-
(
|
|
754
|
+
const _ = p.findIndex(
|
|
755
|
+
(w) => JSON.stringify(w) === JSON.stringify(a)
|
|
755
756
|
);
|
|
756
|
-
if (
|
|
757
|
+
if (_ === -1)
|
|
757
758
|
return;
|
|
758
|
-
const b = s.find((
|
|
759
|
-
b && (
|
|
760
|
-
}, [a, s,
|
|
761
|
-
const
|
|
762
|
-
if (!
|
|
759
|
+
const b = s.find((w) => w.index === _);
|
|
760
|
+
b && (m.current = b.element, c(b.element), b.element.classList.add("selected"));
|
|
761
|
+
}, [a, s, p]), O(() => {
|
|
762
|
+
const _ = r.get(e);
|
|
763
|
+
if (!_ || !o.current)
|
|
763
764
|
return;
|
|
764
765
|
const b = o.current;
|
|
765
|
-
return d.current && d.current.cancel(),
|
|
766
|
-
const
|
|
767
|
-
return d.current = new
|
|
768
|
-
viewport:
|
|
766
|
+
return d.current && d.current.cancel(), _.page.getTextContent().then((v) => {
|
|
767
|
+
const w = _.page.getViewport({ scale: 1 });
|
|
768
|
+
return d.current = new Tt.TextLayer({
|
|
769
|
+
viewport: w,
|
|
769
770
|
textContentSource: v,
|
|
770
771
|
container: b
|
|
771
772
|
}), u.current = v, b && (b.innerText = ""), d.current.render();
|
|
772
773
|
}).then(() => {
|
|
773
|
-
var
|
|
774
|
+
var f;
|
|
774
775
|
[].slice.call(b.children).forEach((T) => {
|
|
775
|
-
T.classList.add(
|
|
776
|
+
T.classList.add(ct["rp-text-layer-text"]);
|
|
776
777
|
});
|
|
777
|
-
const
|
|
778
|
-
|
|
778
|
+
const w = (f = d.current) == null ? void 0 : f.textDivs;
|
|
779
|
+
w && u.current && g(u.current, w);
|
|
779
780
|
}).catch(() => {
|
|
780
781
|
}), () => {
|
|
781
782
|
var v;
|
|
@@ -783,8 +784,8 @@ const fo = () => {
|
|
|
783
784
|
};
|
|
784
785
|
}, [r, e]), O(() => {
|
|
785
786
|
var v;
|
|
786
|
-
[].slice.call(o.current.children).forEach((
|
|
787
|
-
|
|
787
|
+
[].slice.call(o.current.children).forEach((w) => {
|
|
788
|
+
w.classList.add(ct["rp-text-layer-text"]);
|
|
788
789
|
});
|
|
789
790
|
const b = (v = d.current) == null ? void 0 : v.textDivs;
|
|
790
791
|
b && u.current && g(u.current, b, !0);
|
|
@@ -792,16 +793,16 @@ const fo = () => {
|
|
|
792
793
|
"div",
|
|
793
794
|
{
|
|
794
795
|
"data-rp": `page-${e}-textLayer`,
|
|
795
|
-
className:
|
|
796
|
+
className: ct["rp-text-layer"],
|
|
796
797
|
ref: o
|
|
797
798
|
}
|
|
798
799
|
);
|
|
799
|
-
},
|
|
800
|
+
}, wo = {
|
|
800
801
|
"rp-annotation-layer": "_rp-annotation-layer_o0ksd_1"
|
|
801
802
|
};
|
|
802
|
-
let
|
|
803
|
-
const
|
|
804
|
-
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:
|
|
803
|
+
let bo = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
|
|
804
|
+
const Co = (t) => {
|
|
805
|
+
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: m } = et(), { download: p } = Hr(), g = k(() => o.get(e), [o, e]), _ = k(() => g == null ? void 0 : g.page.getViewport(), [g]);
|
|
805
806
|
O(() => {
|
|
806
807
|
a.current && (a.current.div.replaceChildren(), a.current = void 0);
|
|
807
808
|
}, [n]), O(() => {
|
|
@@ -811,12 +812,12 @@ const To = (t) => {
|
|
|
811
812
|
}, [g]);
|
|
812
813
|
const b = I(
|
|
813
814
|
(v) => {
|
|
814
|
-
!c || !n || (Ln(v), Nn(v, n, c).then((
|
|
815
|
-
var
|
|
816
|
-
((
|
|
817
|
-
}), u === K.PAGE_SCROLLING ? At(v, c, n, (
|
|
815
|
+
!c || !n || (Ln(v), Nn(v, n, c).then((w) => {
|
|
816
|
+
var f, T;
|
|
817
|
+
((f = w == null ? void 0 : w.data) == null ? void 0 : f.action) === "Print" ? m() : ((T = w == null ? void 0 : w.data) == null ? void 0 : T.action) === "SaveAs" && p();
|
|
818
|
+
}), u === K.PAGE_SCROLLING ? At(v, c, n, (w) => l(w.pageIndex + 1)) : At(v, c, n, (w) => d(w.pageIndex + 1)));
|
|
818
819
|
},
|
|
819
|
-
[n, c, d, l, u,
|
|
820
|
+
[n, c, d, l, u, m, p]
|
|
820
821
|
);
|
|
821
822
|
return O(() => {
|
|
822
823
|
if (!g || !c)
|
|
@@ -828,19 +829,19 @@ const To = (t) => {
|
|
|
828
829
|
});
|
|
829
830
|
return;
|
|
830
831
|
}
|
|
831
|
-
const
|
|
832
|
+
const w = /* @__PURE__ */ new Map([]);
|
|
832
833
|
for (const x of c) {
|
|
833
|
-
const { annotationType:
|
|
834
|
-
switch (
|
|
834
|
+
const { annotationType: h } = x;
|
|
835
|
+
switch (h) {
|
|
835
836
|
case zt.Link:
|
|
836
837
|
On(x);
|
|
837
838
|
break;
|
|
838
839
|
case zt.Widget:
|
|
839
|
-
En(x, v,
|
|
840
|
+
En(x, v, w);
|
|
840
841
|
break;
|
|
841
842
|
}
|
|
842
843
|
}
|
|
843
|
-
const
|
|
844
|
+
const f = new AbortController();
|
|
844
845
|
return (async () => {
|
|
845
846
|
a.current && (a.current.div.replaceChildren(), a.current = void 0), r.current && (r.current.innerText = ""), a.current = new gn({
|
|
846
847
|
div: r.current,
|
|
@@ -851,18 +852,18 @@ const To = (t) => {
|
|
|
851
852
|
page: g.page,
|
|
852
853
|
viewport: v.clone({ dontFlip: !0 })
|
|
853
854
|
}), r.current && Ft(r.current, b);
|
|
854
|
-
const x = await (n == null ? void 0 : n.hasJSActions()),
|
|
855
|
-
if (
|
|
855
|
+
const x = await (n == null ? void 0 : n.hasJSActions()), h = await (n == null ? void 0 : n.getFieldObjects());
|
|
856
|
+
if (f.signal.aborted)
|
|
856
857
|
throw "abort";
|
|
857
858
|
return a.current.render({
|
|
858
859
|
annotations: c,
|
|
859
860
|
annotationStorage: n == null ? void 0 : n.annotationStorage,
|
|
860
861
|
hasJSActions: x,
|
|
861
|
-
fieldObjects:
|
|
862
|
+
fieldObjects: h,
|
|
862
863
|
div: r.current,
|
|
863
864
|
viewport: v.clone({ dontFlip: !0 }),
|
|
864
865
|
page: g.page,
|
|
865
|
-
imageResourcesPath:
|
|
866
|
+
imageResourcesPath: bo,
|
|
866
867
|
renderForms: !0,
|
|
867
868
|
linkService: new Rn(),
|
|
868
869
|
downloadManager: null,
|
|
@@ -874,21 +875,21 @@ const To = (t) => {
|
|
|
874
875
|
if (x !== "abort")
|
|
875
876
|
throw x;
|
|
876
877
|
}), () => {
|
|
877
|
-
|
|
878
|
+
f.abort("clear"), r.current && Ft(r.current, b);
|
|
878
879
|
};
|
|
879
880
|
}, [n, c, b]), /* @__PURE__ */ i(
|
|
880
881
|
"div",
|
|
881
882
|
{
|
|
882
883
|
"data-rp": `page-${e}-annotationLayer`,
|
|
883
|
-
style: { width: `${
|
|
884
|
-
className:
|
|
884
|
+
style: { width: `${_ == null ? void 0 : _.width}px`, height: `${_ == null ? void 0 : _.height}px` },
|
|
885
|
+
className: wo["rp-annotation-layer"],
|
|
885
886
|
ref: r
|
|
886
887
|
}
|
|
887
888
|
);
|
|
888
|
-
},
|
|
889
|
+
}, lt = {
|
|
889
890
|
"rp-text-highlight-layer": "_rp-text-highlight-layer_1470i_1",
|
|
890
891
|
"rp-text-highlight-layer-text": "_rp-text-highlight-layer-text_1470i_9"
|
|
891
|
-
},
|
|
892
|
+
}, To = ({ pageNumber: t }) => {
|
|
892
893
|
const e = M(null), r = M(), o = M(), { pages: n } = X(), { highlightMatches: a } = vn(), c = k(() => a.filter((d) => d.pageIndex === t - 1), [a]), s = I(
|
|
893
894
|
(l, d, u = !1) => {
|
|
894
895
|
u && lr(l, d), pn(c, l, d);
|
|
@@ -901,19 +902,19 @@ const To = (t) => {
|
|
|
901
902
|
return;
|
|
902
903
|
const d = e.current;
|
|
903
904
|
return r.current && r.current.cancel(), l.page.getTextContent().then((u) => {
|
|
904
|
-
const
|
|
905
|
-
return r.current = new
|
|
906
|
-
viewport:
|
|
905
|
+
const m = l.page.getViewport({ scale: 1 });
|
|
906
|
+
return r.current = new Tt.TextLayer({
|
|
907
|
+
viewport: m,
|
|
907
908
|
textContentSource: u,
|
|
908
909
|
container: d
|
|
909
910
|
}), o.current = u, d && (d.innerText = ""), r.current.render();
|
|
910
911
|
}).then(() => {
|
|
911
|
-
var
|
|
912
|
+
var p;
|
|
912
913
|
[].slice.call(d.children).forEach((g) => {
|
|
913
|
-
g.classList.add(
|
|
914
|
+
g.classList.add(lt["rp-text-highlight-layer-text"]);
|
|
914
915
|
});
|
|
915
|
-
const
|
|
916
|
-
|
|
916
|
+
const m = (p = r.current) == null ? void 0 : p.textDivs;
|
|
917
|
+
m && o.current && s(o.current, m);
|
|
917
918
|
}).catch(() => {
|
|
918
919
|
}), () => {
|
|
919
920
|
var u;
|
|
@@ -921,8 +922,8 @@ const To = (t) => {
|
|
|
921
922
|
};
|
|
922
923
|
}, [n, t]), O(() => {
|
|
923
924
|
var u;
|
|
924
|
-
[].slice.call(e.current.children).forEach((
|
|
925
|
-
|
|
925
|
+
[].slice.call(e.current.children).forEach((m) => {
|
|
926
|
+
m.classList.add(lt["rp-text-highlight-layer-text"]);
|
|
926
927
|
});
|
|
927
928
|
const d = (u = r.current) == null ? void 0 : u.textDivs;
|
|
928
929
|
d && o.current && s(o.current, d, !0);
|
|
@@ -930,12 +931,12 @@ const To = (t) => {
|
|
|
930
931
|
"div",
|
|
931
932
|
{
|
|
932
933
|
"data-rp": `page-${t}-textHighlightLayer`,
|
|
933
|
-
className:
|
|
934
|
+
className: lt["rp-text-highlight-layer"],
|
|
934
935
|
ref: e
|
|
935
936
|
}
|
|
936
937
|
) });
|
|
937
|
-
},
|
|
938
|
-
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)), [
|
|
938
|
+
}, Po = Array.from({ length: 21 }, (t, e) => Number((e * 0.05).toFixed(2))), Rt = Me((t, e) => {
|
|
939
|
+
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)), [m, p] = $(!1), g = M(null), [_, b] = $({
|
|
939
940
|
width: 0,
|
|
940
941
|
height: 0
|
|
941
942
|
});
|
|
@@ -948,29 +949,29 @@ const To = (t) => {
|
|
|
948
949
|
const v = k(() => {
|
|
949
950
|
switch (s) {
|
|
950
951
|
case 90:
|
|
951
|
-
return `${
|
|
952
|
+
return `${_.width / 2}px ${_.width / 2}px`;
|
|
952
953
|
case -90:
|
|
953
954
|
case 270:
|
|
954
|
-
return `${
|
|
955
|
+
return `${_.height / 2}px ${_.height / 2}px`;
|
|
955
956
|
default:
|
|
956
957
|
return "center";
|
|
957
958
|
}
|
|
958
|
-
}, [s,
|
|
959
|
-
|
|
960
|
-
}, []),
|
|
961
|
-
|
|
959
|
+
}, [s, _]), w = I(() => {
|
|
960
|
+
p(!0);
|
|
961
|
+
}, []), f = I(() => {
|
|
962
|
+
p(!1);
|
|
962
963
|
}, []);
|
|
963
964
|
return O(() => {
|
|
964
965
|
const T = new IntersectionObserver(
|
|
965
966
|
(x) => {
|
|
966
967
|
n(r, x[0].intersectionRatio);
|
|
967
968
|
},
|
|
968
|
-
{ threshold:
|
|
969
|
+
{ threshold: Po }
|
|
969
970
|
);
|
|
970
971
|
return g.current && T.observe(g.current), () => {
|
|
971
972
|
T.disconnect(), n(r, -1);
|
|
972
973
|
};
|
|
973
|
-
}, [n, r, s,
|
|
974
|
+
}, [n, r, s, _]), /* @__PURE__ */ i(
|
|
974
975
|
"div",
|
|
975
976
|
{
|
|
976
977
|
ref: g,
|
|
@@ -983,21 +984,21 @@ const To = (t) => {
|
|
|
983
984
|
"--rp-page-rotate-translate": `${v}`,
|
|
984
985
|
"--scale-factor": d
|
|
985
986
|
},
|
|
986
|
-
className:
|
|
987
|
+
className: st["rp-page-wrapper"],
|
|
987
988
|
children: /* @__PURE__ */ z(
|
|
988
989
|
"div",
|
|
989
990
|
{
|
|
990
991
|
style: {
|
|
991
|
-
width: `${
|
|
992
|
-
height: `${
|
|
992
|
+
width: `${_.width}px`,
|
|
993
|
+
height: `${_.height}px`
|
|
993
994
|
},
|
|
994
|
-
className:
|
|
995
|
+
className: st["rp-page"],
|
|
995
996
|
children: [
|
|
996
|
-
/* @__PURE__ */ i(
|
|
997
|
-
|
|
998
|
-
l && /* @__PURE__ */ i(
|
|
999
|
-
/* @__PURE__ */ i(
|
|
1000
|
-
/* @__PURE__ */ i(
|
|
997
|
+
/* @__PURE__ */ i(vo, { onLoading: w, onLoaded: f, pageNumber: r }),
|
|
998
|
+
m && /* @__PURE__ */ i("div", { className: st["rp-loader-wrapper"], children: /* @__PURE__ */ i(St, {}) }),
|
|
999
|
+
l && /* @__PURE__ */ i(_o, { pageNumber: r }),
|
|
1000
|
+
/* @__PURE__ */ i(To, { pageNumber: r }),
|
|
1001
|
+
/* @__PURE__ */ i(Co, { pageNumber: r })
|
|
1001
1002
|
]
|
|
1002
1003
|
}
|
|
1003
1004
|
)
|
|
@@ -1009,30 +1010,30 @@ function Gt(t) {
|
|
|
1009
1010
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1010
1011
|
return t;
|
|
1011
1012
|
}
|
|
1012
|
-
function
|
|
1013
|
-
return
|
|
1013
|
+
function wt(t, e) {
|
|
1014
|
+
return wt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, o) {
|
|
1014
1015
|
return r.__proto__ = o, r;
|
|
1015
|
-
},
|
|
1016
|
+
}, wt(t, e);
|
|
1016
1017
|
}
|
|
1017
|
-
function
|
|
1018
|
-
t.prototype = Object.create(e.prototype), t.prototype.constructor = t,
|
|
1018
|
+
function So(t, e) {
|
|
1019
|
+
t.prototype = Object.create(e.prototype), t.prototype.constructor = t, wt(t, e);
|
|
1019
1020
|
}
|
|
1020
1021
|
var qt = Number.isNaN || function(e) {
|
|
1021
1022
|
return typeof e == "number" && e !== e;
|
|
1022
1023
|
};
|
|
1023
|
-
function
|
|
1024
|
+
function xo(t, e) {
|
|
1024
1025
|
return !!(t === e || qt(t) && qt(e));
|
|
1025
1026
|
}
|
|
1026
|
-
function
|
|
1027
|
+
function yo(t, e) {
|
|
1027
1028
|
if (t.length !== e.length)
|
|
1028
1029
|
return !1;
|
|
1029
1030
|
for (var r = 0; r < t.length; r++)
|
|
1030
|
-
if (!
|
|
1031
|
+
if (!xo(t[r], e[r]))
|
|
1031
1032
|
return !1;
|
|
1032
1033
|
return !0;
|
|
1033
1034
|
}
|
|
1034
|
-
function
|
|
1035
|
-
e === void 0 && (e =
|
|
1035
|
+
function dt(t, e) {
|
|
1036
|
+
e === void 0 && (e = yo);
|
|
1036
1037
|
var r, o = [], n, a = !1;
|
|
1037
1038
|
function c() {
|
|
1038
1039
|
for (var s = [], l = 0; l < arguments.length; l++)
|
|
@@ -1053,7 +1054,7 @@ function Ut(t, e) {
|
|
|
1053
1054
|
}
|
|
1054
1055
|
return r;
|
|
1055
1056
|
}
|
|
1056
|
-
var
|
|
1057
|
+
var Io = typeof performance == "object" && typeof performance.now == "function", Zt = Io ? function() {
|
|
1057
1058
|
return performance.now();
|
|
1058
1059
|
} : function() {
|
|
1059
1060
|
return Date.now();
|
|
@@ -1061,7 +1062,7 @@ var Ro = typeof performance == "object" && typeof performance.now == "function",
|
|
|
1061
1062
|
function Bt(t) {
|
|
1062
1063
|
cancelAnimationFrame(t.id);
|
|
1063
1064
|
}
|
|
1064
|
-
function
|
|
1065
|
+
function Ro(t, e) {
|
|
1065
1066
|
var r = Zt();
|
|
1066
1067
|
function o() {
|
|
1067
1068
|
Zt() - r >= e ? t.call(null) : n.id = requestAnimationFrame(o);
|
|
@@ -1071,13 +1072,13 @@ function Lo(t, e) {
|
|
|
1071
1072
|
};
|
|
1072
1073
|
return n;
|
|
1073
1074
|
}
|
|
1074
|
-
var
|
|
1075
|
-
function
|
|
1076
|
-
if (t === void 0 && (t = !1),
|
|
1075
|
+
var ut = -1;
|
|
1076
|
+
function Lo(t) {
|
|
1077
|
+
if (t === void 0 && (t = !1), ut === -1 || t) {
|
|
1077
1078
|
var e = document.createElement("div"), r = e.style;
|
|
1078
|
-
r.width = "50px", r.height = "50px", r.overflow = "scroll", document.body.appendChild(e),
|
|
1079
|
+
r.width = "50px", r.height = "50px", r.overflow = "scroll", document.body.appendChild(e), ut = e.offsetWidth - e.clientWidth, document.body.removeChild(e);
|
|
1079
1080
|
}
|
|
1080
|
-
return
|
|
1081
|
+
return ut;
|
|
1081
1082
|
}
|
|
1082
1083
|
var Le = null;
|
|
1083
1084
|
function jt(t) {
|
|
@@ -1089,29 +1090,29 @@ function jt(t) {
|
|
|
1089
1090
|
}
|
|
1090
1091
|
return Le;
|
|
1091
1092
|
}
|
|
1092
|
-
var
|
|
1093
|
+
var No = 150, Eo = function(e) {
|
|
1093
1094
|
var r = e.columnIndex;
|
|
1094
1095
|
e.data;
|
|
1095
1096
|
var o = e.rowIndex;
|
|
1096
1097
|
return o + ":" + r;
|
|
1097
1098
|
}, $e = null, Ve = null, Ge = null;
|
|
1098
1099
|
process.env.NODE_ENV !== "production" && typeof window < "u" && typeof window.WeakSet < "u" && ($e = /* @__PURE__ */ new WeakSet(), Ve = /* @__PURE__ */ new WeakSet(), Ge = /* @__PURE__ */ new WeakSet());
|
|
1099
|
-
function
|
|
1100
|
-
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,
|
|
1101
|
-
return e = /* @__PURE__ */ function(
|
|
1102
|
-
|
|
1103
|
-
function
|
|
1104
|
-
var
|
|
1105
|
-
return
|
|
1106
|
-
instance: Gt(
|
|
1100
|
+
function Oo(t) {
|
|
1101
|
+
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, m = t.getRowOffset, p = t.getRowStartIndexForOffset, g = t.getRowStopIndexForStartIndex, _ = t.initInstanceProps, b = t.shouldResetStyleCacheOnItemSizeChange, v = t.validateProps;
|
|
1102
|
+
return e = /* @__PURE__ */ function(w) {
|
|
1103
|
+
So(f, w);
|
|
1104
|
+
function f(x) {
|
|
1105
|
+
var h;
|
|
1106
|
+
return h = w.call(this, x) || this, h._instanceProps = _(h.props, Gt(h)), h._resetIsScrollingTimeoutId = null, h._outerRef = void 0, h.state = {
|
|
1107
|
+
instance: Gt(h),
|
|
1107
1108
|
isScrolling: !1,
|
|
1108
1109
|
horizontalScrollDirection: "forward",
|
|
1109
|
-
scrollLeft: typeof
|
|
1110
|
-
scrollTop: typeof
|
|
1110
|
+
scrollLeft: typeof h.props.initialScrollLeft == "number" ? h.props.initialScrollLeft : 0,
|
|
1111
|
+
scrollTop: typeof h.props.initialScrollTop == "number" ? h.props.initialScrollTop : 0,
|
|
1111
1112
|
scrollUpdateWasRequested: !1,
|
|
1112
1113
|
verticalScrollDirection: "forward"
|
|
1113
|
-
},
|
|
1114
|
-
return
|
|
1114
|
+
}, h._callOnItemsRendered = void 0, h._callOnItemsRendered = dt(function(P, C, S, A, R, D, L, F) {
|
|
1115
|
+
return h.props.onItemsRendered({
|
|
1115
1116
|
overscanColumnStartIndex: P,
|
|
1116
1117
|
overscanColumnStopIndex: C,
|
|
1117
1118
|
overscanRowStartIndex: S,
|
|
@@ -1121,38 +1122,38 @@ function Do(t) {
|
|
|
1121
1122
|
visibleRowStartIndex: L,
|
|
1122
1123
|
visibleRowStopIndex: F
|
|
1123
1124
|
});
|
|
1124
|
-
}),
|
|
1125
|
-
return
|
|
1125
|
+
}), h._callOnScroll = void 0, h._callOnScroll = dt(function(P, C, S, A, R) {
|
|
1126
|
+
return h.props.onScroll({
|
|
1126
1127
|
horizontalScrollDirection: S,
|
|
1127
1128
|
scrollLeft: P,
|
|
1128
1129
|
scrollTop: C,
|
|
1129
1130
|
verticalScrollDirection: A,
|
|
1130
1131
|
scrollUpdateWasRequested: R
|
|
1131
1132
|
});
|
|
1132
|
-
}),
|
|
1133
|
-
var S =
|
|
1133
|
+
}), h._getItemStyle = void 0, h._getItemStyle = function(P, C) {
|
|
1134
|
+
var S = h.props, A = S.columnWidth, R = S.direction, D = S.rowHeight, L = h._getItemStyleCache(b && A, b && R, b && D), F = P + ":" + C, E;
|
|
1134
1135
|
if (L.hasOwnProperty(F))
|
|
1135
1136
|
E = L[F];
|
|
1136
1137
|
else {
|
|
1137
|
-
var y = r(
|
|
1138
|
+
var y = r(h.props, C, h._instanceProps), N = R === "rtl";
|
|
1138
1139
|
L[F] = E = {
|
|
1139
1140
|
position: "absolute",
|
|
1140
1141
|
left: N ? void 0 : y,
|
|
1141
1142
|
right: N ? y : void 0,
|
|
1142
|
-
top:
|
|
1143
|
-
height: u(
|
|
1144
|
-
width: a(
|
|
1143
|
+
top: m(h.props, P, h._instanceProps),
|
|
1144
|
+
height: u(h.props, P, h._instanceProps),
|
|
1145
|
+
width: a(h.props, C, h._instanceProps)
|
|
1145
1146
|
};
|
|
1146
1147
|
}
|
|
1147
1148
|
return E;
|
|
1148
|
-
},
|
|
1149
|
+
}, h._getItemStyleCache = void 0, h._getItemStyleCache = dt(function(P, C, S) {
|
|
1149
1150
|
return {};
|
|
1150
|
-
}),
|
|
1151
|
+
}), h._onScroll = function(P) {
|
|
1151
1152
|
var C = P.currentTarget, S = C.clientHeight, A = C.clientWidth, R = C.scrollLeft, D = C.scrollTop, L = C.scrollHeight, F = C.scrollWidth;
|
|
1152
|
-
|
|
1153
|
+
h.setState(function(E) {
|
|
1153
1154
|
if (E.scrollLeft === R && E.scrollTop === D)
|
|
1154
1155
|
return null;
|
|
1155
|
-
var y =
|
|
1156
|
+
var y = h.props.direction, N = R;
|
|
1156
1157
|
if (y === "rtl")
|
|
1157
1158
|
switch (jt()) {
|
|
1158
1159
|
case "negative":
|
|
@@ -1172,26 +1173,26 @@ function Do(t) {
|
|
|
1172
1173
|
verticalScrollDirection: E.scrollTop < D ? "forward" : "backward",
|
|
1173
1174
|
scrollUpdateWasRequested: !1
|
|
1174
1175
|
};
|
|
1175
|
-
},
|
|
1176
|
-
},
|
|
1177
|
-
var C =
|
|
1178
|
-
|
|
1179
|
-
},
|
|
1180
|
-
|
|
1181
|
-
},
|
|
1182
|
-
|
|
1176
|
+
}, h._resetIsScrollingDebounced);
|
|
1177
|
+
}, h._outerRefSetter = function(P) {
|
|
1178
|
+
var C = h.props.outerRef;
|
|
1179
|
+
h._outerRef = P, typeof C == "function" ? C(P) : C != null && typeof C == "object" && C.hasOwnProperty("current") && (C.current = P);
|
|
1180
|
+
}, h._resetIsScrollingDebounced = function() {
|
|
1181
|
+
h._resetIsScrollingTimeoutId !== null && Bt(h._resetIsScrollingTimeoutId), h._resetIsScrollingTimeoutId = Ro(h._resetIsScrolling, No);
|
|
1182
|
+
}, h._resetIsScrolling = function() {
|
|
1183
|
+
h._resetIsScrollingTimeoutId = null, h.setState({
|
|
1183
1184
|
isScrolling: !1
|
|
1184
1185
|
}, function() {
|
|
1185
|
-
|
|
1186
|
+
h._getItemStyleCache(-1);
|
|
1186
1187
|
});
|
|
1187
|
-
},
|
|
1188
|
+
}, h;
|
|
1188
1189
|
}
|
|
1189
|
-
|
|
1190
|
-
return
|
|
1190
|
+
f.getDerivedStateFromProps = function(h, P) {
|
|
1191
|
+
return Do(h, P), v(h), null;
|
|
1191
1192
|
};
|
|
1192
|
-
var T =
|
|
1193
|
-
return T.scrollTo = function(
|
|
1194
|
-
var P =
|
|
1193
|
+
var T = f.prototype;
|
|
1194
|
+
return T.scrollTo = function(h) {
|
|
1195
|
+
var P = h.scrollLeft, C = h.scrollTop;
|
|
1195
1196
|
P !== void 0 && (P = Math.max(0, P)), C !== void 0 && (C = Math.max(0, C)), this.setState(function(S) {
|
|
1196
1197
|
return P === void 0 && (P = S.scrollLeft), C === void 0 && (C = S.scrollTop), S.scrollLeft === P && S.scrollTop === C ? null : {
|
|
1197
1198
|
horizontalScrollDirection: S.scrollLeft < P ? "forward" : "backward",
|
|
@@ -1201,8 +1202,8 @@ function Do(t) {
|
|
|
1201
1202
|
verticalScrollDirection: S.scrollTop < C ? "forward" : "backward"
|
|
1202
1203
|
};
|
|
1203
1204
|
}, this._resetIsScrollingDebounced);
|
|
1204
|
-
}, T.scrollToItem = function(
|
|
1205
|
-
var P =
|
|
1205
|
+
}, T.scrollToItem = function(h) {
|
|
1206
|
+
var P = h.align, C = P === void 0 ? "auto" : P, S = h.columnIndex, A = h.rowIndex, R = this.props, D = R.columnCount, L = R.height, F = R.rowCount, E = R.width, y = this.state, N = y.scrollLeft, V = y.scrollTop, q = Lo();
|
|
1206
1207
|
S !== void 0 && (S = Math.max(0, Math.min(S, D - 1))), A !== void 0 && (A = Math.max(0, Math.min(A, F - 1)));
|
|
1207
1208
|
var Z = c(this.props, this._instanceProps), ee = s(this.props, this._instanceProps), B = ee > E ? q : 0, J = Z > L ? q : 0;
|
|
1208
1209
|
this.scrollTo({
|
|
@@ -1210,17 +1211,17 @@ function Do(t) {
|
|
|
1210
1211
|
scrollTop: A !== void 0 ? d(this.props, A, C, V, this._instanceProps, B) : V
|
|
1211
1212
|
});
|
|
1212
1213
|
}, T.componentDidMount = function() {
|
|
1213
|
-
var
|
|
1214
|
+
var h = this.props, P = h.initialScrollLeft, C = h.initialScrollTop;
|
|
1214
1215
|
if (this._outerRef != null) {
|
|
1215
1216
|
var S = this._outerRef;
|
|
1216
1217
|
typeof P == "number" && (S.scrollLeft = P), typeof C == "number" && (S.scrollTop = C);
|
|
1217
1218
|
}
|
|
1218
1219
|
this._callPropsCallbacks();
|
|
1219
1220
|
}, T.componentDidUpdate = function() {
|
|
1220
|
-
var
|
|
1221
|
+
var h = this.props.direction, P = this.state, C = P.scrollLeft, S = P.scrollTop, A = P.scrollUpdateWasRequested;
|
|
1221
1222
|
if (A && this._outerRef != null) {
|
|
1222
1223
|
var R = this._outerRef;
|
|
1223
|
-
if (
|
|
1224
|
+
if (h === "rtl")
|
|
1224
1225
|
switch (jt()) {
|
|
1225
1226
|
case "negative":
|
|
1226
1227
|
R.scrollLeft = -C;
|
|
@@ -1241,7 +1242,7 @@ function Do(t) {
|
|
|
1241
1242
|
}, T.componentWillUnmount = function() {
|
|
1242
1243
|
this._resetIsScrollingTimeoutId !== null && Bt(this._resetIsScrollingTimeoutId);
|
|
1243
1244
|
}, T.render = function() {
|
|
1244
|
-
var
|
|
1245
|
+
var h = this.props, P = h.children, C = h.className, S = h.columnCount, A = h.direction, R = h.height, D = h.innerRef, L = h.innerElementType, F = h.innerTagName, E = h.itemData, y = h.itemKey, N = y === void 0 ? Eo : y, V = h.outerElementType, q = h.outerTagName, Z = h.rowCount, ee = h.style, B = h.useIsScrolling, J = h.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
1246
|
if (S > 0 && Z)
|
|
1246
1247
|
for (var pe = Ce; pe <= De; pe++)
|
|
1247
1248
|
for (var ge = j; ge <= Y; ge++)
|
|
@@ -1257,12 +1258,12 @@ function Do(t) {
|
|
|
1257
1258
|
rowIndex: pe,
|
|
1258
1259
|
style: this._getItemStyle(pe, ge)
|
|
1259
1260
|
}));
|
|
1260
|
-
var Te = c(this.props, this._instanceProps),
|
|
1261
|
+
var Te = c(this.props, this._instanceProps), rt = s(this.props, this._instanceProps);
|
|
1261
1262
|
return He(V || q || "div", {
|
|
1262
1263
|
className: C,
|
|
1263
1264
|
onScroll: this._onScroll,
|
|
1264
1265
|
ref: this._outerRefSetter,
|
|
1265
|
-
style:
|
|
1266
|
+
style: zn({
|
|
1266
1267
|
position: "relative",
|
|
1267
1268
|
height: R,
|
|
1268
1269
|
width: J,
|
|
@@ -1277,11 +1278,11 @@ function Do(t) {
|
|
|
1277
1278
|
style: {
|
|
1278
1279
|
height: Te,
|
|
1279
1280
|
pointerEvents: ae ? "none" : void 0,
|
|
1280
|
-
width:
|
|
1281
|
+
width: rt
|
|
1281
1282
|
}
|
|
1282
1283
|
}));
|
|
1283
1284
|
}, T._callPropsCallbacks = function() {
|
|
1284
|
-
var
|
|
1285
|
+
var h = this.props, P = h.columnCount, C = h.onItemsRendered, S = h.onScroll, A = h.rowCount;
|
|
1285
1286
|
if (typeof C == "function" && P > 0 && A > 0) {
|
|
1286
1287
|
var R = this._getHorizontalRangeToRender(), D = R[0], L = R[1], F = R[2], E = R[3], y = this._getVerticalRangeToRender(), N = y[0], V = y[1], q = y[2], Z = y[3];
|
|
1287
1288
|
this._callOnItemsRendered(D, L, N, V, F, E, q, Z);
|
|
@@ -1291,28 +1292,28 @@ function Do(t) {
|
|
|
1291
1292
|
this._callOnScroll(J, ae, B, j, re);
|
|
1292
1293
|
}
|
|
1293
1294
|
}, T._getHorizontalRangeToRender = function() {
|
|
1294
|
-
var
|
|
1295
|
+
var h = this.props, P = h.columnCount, C = h.overscanColumnCount, S = h.overscanColumnsCount, A = h.overscanCount, R = h.rowCount, D = this.state, L = D.horizontalScrollDirection, F = D.isScrolling, E = D.scrollLeft, y = C || S || A || 1;
|
|
1295
1296
|
if (P === 0 || R === 0)
|
|
1296
1297
|
return [0, 0, 0, 0];
|
|
1297
1298
|
var N = o(this.props, E, this._instanceProps), V = n(this.props, N, E, this._instanceProps), q = !F || L === "backward" ? Math.max(1, y) : 1, Z = !F || L === "forward" ? Math.max(1, y) : 1;
|
|
1298
1299
|
return [Math.max(0, N - q), Math.max(0, Math.min(P - 1, V + Z)), N, V];
|
|
1299
1300
|
}, T._getVerticalRangeToRender = function() {
|
|
1300
|
-
var
|
|
1301
|
+
var h = this.props, P = h.columnCount, C = h.overscanCount, S = h.overscanRowCount, A = h.overscanRowsCount, R = h.rowCount, D = this.state, L = D.isScrolling, F = D.verticalScrollDirection, E = D.scrollTop, y = S || A || C || 1;
|
|
1301
1302
|
if (P === 0 || R === 0)
|
|
1302
1303
|
return [0, 0, 0, 0];
|
|
1303
|
-
var N =
|
|
1304
|
+
var N = p(this.props, E, this._instanceProps), V = g(this.props, N, E, this._instanceProps), q = !L || F === "backward" ? Math.max(1, y) : 1, Z = !L || F === "forward" ? Math.max(1, y) : 1;
|
|
1304
1305
|
return [Math.max(0, N - q), Math.max(0, Math.min(R - 1, V + Z)), N, V];
|
|
1305
|
-
},
|
|
1306
|
+
}, f;
|
|
1306
1307
|
}(tn), e.defaultProps = {
|
|
1307
1308
|
direction: "ltr",
|
|
1308
1309
|
itemData: void 0,
|
|
1309
1310
|
useIsScrolling: !1
|
|
1310
1311
|
}, e;
|
|
1311
1312
|
}
|
|
1312
|
-
var
|
|
1313
|
-
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,
|
|
1313
|
+
var Do = function(e, r) {
|
|
1314
|
+
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, m = e.width, p = r.instance;
|
|
1314
1315
|
if (process.env.NODE_ENV !== "production") {
|
|
1315
|
-
if (typeof d == "number" && $e && !$e.has(
|
|
1316
|
+
if (typeof d == "number" && $e && !$e.has(p) && ($e.add(p), 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(p) && (Ve.add(p), 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(p) && (Ge.add(p), console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.")), o == null)
|
|
1316
1317
|
throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (o === null ? "null" : typeof o) + '" was specified.'));
|
|
1317
1318
|
switch (n) {
|
|
1318
1319
|
case "ltr":
|
|
@@ -1321,8 +1322,8 @@ var zo = function(e, r) {
|
|
|
1321
1322
|
default:
|
|
1322
1323
|
throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' + n + '" was specified.'));
|
|
1323
1324
|
}
|
|
1324
|
-
if (typeof
|
|
1325
|
-
throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. ' + ('"' + (
|
|
1325
|
+
if (typeof m != "number")
|
|
1326
|
+
throw Error('An invalid "width" prop has been specified. Grids must specify a number for width. ' + ('"' + (m === null ? "null" : typeof m) + '" was specified.'));
|
|
1326
1327
|
if (typeof a != "number")
|
|
1327
1328
|
throw Error('An invalid "height" prop has been specified. Grids must specify a number for height. ' + ('"' + (a === null ? "null" : typeof a) + '" was specified.'));
|
|
1328
1329
|
}
|
|
@@ -1351,11 +1352,11 @@ var zo = function(e, r) {
|
|
|
1351
1352
|
l = d.offset + d.size;
|
|
1352
1353
|
}
|
|
1353
1354
|
for (var u = s + 1; u <= o; u++) {
|
|
1354
|
-
var
|
|
1355
|
+
var m = c(u);
|
|
1355
1356
|
a[u] = {
|
|
1356
1357
|
offset: l,
|
|
1357
|
-
size:
|
|
1358
|
-
}, l +=
|
|
1358
|
+
size: m
|
|
1359
|
+
}, l += m;
|
|
1359
1360
|
}
|
|
1360
1361
|
e === "column" ? n.lastMeasuredColumnIndex = o : n.lastMeasuredRowIndex = o;
|
|
1361
1362
|
}
|
|
@@ -1364,7 +1365,7 @@ var zo = function(e, r) {
|
|
|
1364
1365
|
var a, c;
|
|
1365
1366
|
e === "column" ? (a = o.columnMetadataMap, c = o.lastMeasuredColumnIndex) : (a = o.rowMetadataMap, c = o.lastMeasuredRowIndex);
|
|
1366
1367
|
var s = c > 0 ? a[c].offset : 0;
|
|
1367
|
-
return s >= n ? xr(e, r, o, c, 0, n) :
|
|
1368
|
+
return s >= n ? xr(e, r, o, c, 0, n) : zo(e, r, o, Math.max(0, c), n);
|
|
1368
1369
|
}, xr = function(e, r, o, n, a, c) {
|
|
1369
1370
|
for (; a <= n; ) {
|
|
1370
1371
|
var s = a + Math.floor((n - a) / 2), l = ve(e, r, s, o).offset;
|
|
@@ -1373,24 +1374,24 @@ var zo = function(e, r) {
|
|
|
1373
1374
|
l < c ? a = s + 1 : l > c && (n = s - 1);
|
|
1374
1375
|
}
|
|
1375
1376
|
return a > 0 ? a - 1 : 0;
|
|
1376
|
-
},
|
|
1377
|
+
}, zo = function(e, r, o, n, a) {
|
|
1377
1378
|
for (var c = e === "column" ? r.columnCount : r.rowCount, s = 1; n < c && ve(e, r, n, o).offset < a; )
|
|
1378
1379
|
n += s, s *= 2;
|
|
1379
1380
|
return xr(e, r, o, Math.min(n, c - 1), Math.floor(n / 2), a);
|
|
1380
1381
|
}, Jt = function(e, r, o, n, a, c, s) {
|
|
1381
|
-
var l = e === "column" ? r.width : r.height, d = ve(e, r, o, c), u = e === "column" ? Sr(r, c) : Pr(r, c),
|
|
1382
|
-
switch (n === "smart" && (a >=
|
|
1382
|
+
var l = e === "column" ? r.width : r.height, d = ve(e, r, o, c), u = e === "column" ? Sr(r, c) : Pr(r, c), m = Math.max(0, Math.min(u - l, d.offset)), p = Math.max(0, d.offset - l + s + d.size);
|
|
1383
|
+
switch (n === "smart" && (a >= p - l && a <= m + l ? n = "auto" : n = "center"), n) {
|
|
1383
1384
|
case "start":
|
|
1384
|
-
return
|
|
1385
|
+
return m;
|
|
1385
1386
|
case "end":
|
|
1386
|
-
return
|
|
1387
|
+
return p;
|
|
1387
1388
|
case "center":
|
|
1388
|
-
return Math.round(
|
|
1389
|
+
return Math.round(p + (m - p) / 2);
|
|
1389
1390
|
case "auto":
|
|
1390
1391
|
default:
|
|
1391
|
-
return a >=
|
|
1392
|
+
return a >= p && a <= m ? a : p > m || a < p ? p : m;
|
|
1392
1393
|
}
|
|
1393
|
-
},
|
|
1394
|
+
}, Ao = /* @__PURE__ */ Oo({
|
|
1394
1395
|
getColumnOffset: function(e, r, o) {
|
|
1395
1396
|
return ve("column", e, r, o).offset;
|
|
1396
1397
|
},
|
|
@@ -1447,8 +1448,8 @@ var zo = function(e, r) {
|
|
|
1447
1448
|
shouldForceUpdate: l
|
|
1448
1449
|
});
|
|
1449
1450
|
}, r.resetAfterIndices = function(s) {
|
|
1450
|
-
var l = s.columnIndex, d = s.rowIndex, u = s.shouldForceUpdate,
|
|
1451
|
-
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),
|
|
1451
|
+
var l = s.columnIndex, d = s.rowIndex, u = s.shouldForceUpdate, m = u === void 0 ? !0 : u;
|
|
1452
|
+
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), m && r.forceUpdate();
|
|
1452
1453
|
}, c;
|
|
1453
1454
|
},
|
|
1454
1455
|
shouldResetStyleCacheOnItemSizeChange: !1,
|
|
@@ -1472,13 +1473,13 @@ function Yt(t, e) {
|
|
|
1472
1473
|
return !0;
|
|
1473
1474
|
return !1;
|
|
1474
1475
|
}
|
|
1475
|
-
var
|
|
1476
|
-
function
|
|
1477
|
-
var r = t.style, o = Ut(t,
|
|
1476
|
+
var Fo = ["style"], ko = ["style"];
|
|
1477
|
+
function Mo(t, e) {
|
|
1478
|
+
var r = t.style, o = Ut(t, Fo), n = e.style, a = Ut(e, ko);
|
|
1478
1479
|
return !Yt(r, n) && !Yt(o, a);
|
|
1479
1480
|
}
|
|
1480
|
-
const
|
|
1481
|
-
const { viewMode: t } = Je(), { scrollMode: e } = Oe(), { setColumnCount: r } = sr(), { virtualScrollableElementRef: o } = Ye(), n =
|
|
1481
|
+
const Wo = () => {
|
|
1482
|
+
const { viewMode: t } = Je(), { scrollMode: e } = Oe(), { setColumnCount: r } = sr(), { virtualScrollableElementRef: o } = Ye(), n = Pt(), a = I(
|
|
1482
1483
|
(g) => n.widths[g] || 0,
|
|
1483
1484
|
[n.widths]
|
|
1484
1485
|
), c = I(
|
|
@@ -1488,113 +1489,111 @@ const Ho = () => {
|
|
|
1488
1489
|
O(() => {
|
|
1489
1490
|
r(d);
|
|
1490
1491
|
}, [d, r]);
|
|
1491
|
-
const u = k(() => e === K.HORIZONTAL_SCROLLING || e === K.PAGE_SCROLLING ? 1 : Math.round(s / d), [d, s, e]),
|
|
1492
|
+
const u = k(() => e === K.HORIZONTAL_SCROLLING || e === K.PAGE_SCROLLING ? 1 : Math.round(s / d), [d, s, e]), m = k(() => n.heights.reduce((g, _) => g + _, 0) / n.heights.length || 0, [n]), p = k(() => n.widths.reduce((g, _) => g + _, 0) / n.heights.length || 0, [n]);
|
|
1492
1493
|
return {
|
|
1493
1494
|
rowCount: u,
|
|
1494
1495
|
rowHeight: c,
|
|
1495
1496
|
columnCount: d,
|
|
1496
1497
|
columnWidth: a,
|
|
1497
1498
|
pageDimension: n,
|
|
1498
|
-
estimatedRowHeight:
|
|
1499
|
-
estimatedColumnWidth:
|
|
1499
|
+
estimatedRowHeight: m,
|
|
1500
|
+
estimatedColumnWidth: p
|
|
1500
1501
|
};
|
|
1501
1502
|
};
|
|
1502
1503
|
let ie;
|
|
1503
1504
|
typeof window < "u" ? ie = window : typeof self < "u" ? ie = self : ie = global;
|
|
1504
|
-
let
|
|
1505
|
-
const Qt = 20,
|
|
1506
|
-
|
|
1505
|
+
let bt = null, Ct = null;
|
|
1506
|
+
const Qt = 20, pt = ie.clearTimeout, er = ie.setTimeout, ht = ie.cancelAnimationFrame || ie.mozCancelAnimationFrame || ie.webkitCancelAnimationFrame, tr = ie.requestAnimationFrame || ie.mozRequestAnimationFrame || ie.webkitRequestAnimationFrame;
|
|
1507
|
+
ht == null || tr == null ? (bt = pt, Ct = function(e) {
|
|
1507
1508
|
return er(e, Qt);
|
|
1508
|
-
}) : (
|
|
1509
|
-
|
|
1510
|
-
},
|
|
1509
|
+
}) : (bt = function([e, r]) {
|
|
1510
|
+
ht(e), pt(r);
|
|
1511
|
+
}, Ct = function(e) {
|
|
1511
1512
|
const r = tr(function() {
|
|
1512
|
-
|
|
1513
|
+
pt(o), e();
|
|
1513
1514
|
}), o = er(function() {
|
|
1514
|
-
|
|
1515
|
+
ht(r), e();
|
|
1515
1516
|
}, Qt);
|
|
1516
1517
|
return [r, o];
|
|
1517
1518
|
});
|
|
1518
|
-
function
|
|
1519
|
+
function Ho(t) {
|
|
1519
1520
|
let e, r, o, n, a, c, s;
|
|
1520
1521
|
const l = typeof document < "u" && document.attachEvent;
|
|
1521
1522
|
if (!l) {
|
|
1522
|
-
c = function(
|
|
1523
|
-
const
|
|
1524
|
-
x.scrollLeft = x.scrollWidth, x.scrollTop = x.scrollHeight,
|
|
1525
|
-
}, a = function(
|
|
1526
|
-
return
|
|
1527
|
-
}, s = function(
|
|
1528
|
-
if (
|
|
1523
|
+
c = function(w) {
|
|
1524
|
+
const f = w.__resizeTriggers__, T = f.firstElementChild, x = f.lastElementChild, h = T.firstElementChild;
|
|
1525
|
+
x.scrollLeft = x.scrollWidth, x.scrollTop = x.scrollHeight, h.style.width = T.offsetWidth + 1 + "px", h.style.height = T.offsetHeight + 1 + "px", T.scrollLeft = T.scrollWidth, T.scrollTop = T.scrollHeight;
|
|
1526
|
+
}, a = function(w) {
|
|
1527
|
+
return w.offsetWidth !== w.__resizeLast__.width || w.offsetHeight !== w.__resizeLast__.height;
|
|
1528
|
+
}, s = function(w) {
|
|
1529
|
+
if (w.target.className && typeof w.target.className.indexOf == "function" && w.target.className.indexOf("contract-trigger") < 0 && w.target.className.indexOf("expand-trigger") < 0)
|
|
1529
1530
|
return;
|
|
1530
|
-
const
|
|
1531
|
-
c(this), this.__resizeRAF__ &&
|
|
1532
|
-
a(
|
|
1533
|
-
|
|
1531
|
+
const f = this;
|
|
1532
|
+
c(this), this.__resizeRAF__ && bt(this.__resizeRAF__), this.__resizeRAF__ = Ct(function() {
|
|
1533
|
+
a(f) && (f.__resizeLast__.width = f.offsetWidth, f.__resizeLast__.height = f.offsetHeight, f.__resizeListeners__.forEach(function(h) {
|
|
1534
|
+
h.call(f, w);
|
|
1534
1535
|
}));
|
|
1535
1536
|
});
|
|
1536
1537
|
};
|
|
1537
|
-
let
|
|
1538
|
+
let p = !1, g = "";
|
|
1538
1539
|
o = "animationstart";
|
|
1539
|
-
const
|
|
1540
|
+
const _ = "Webkit Moz O ms".split(" ");
|
|
1540
1541
|
let b = "webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "), v = "";
|
|
1541
1542
|
{
|
|
1542
|
-
const
|
|
1543
|
-
if (
|
|
1544
|
-
for (let
|
|
1545
|
-
if (
|
|
1546
|
-
v =
|
|
1543
|
+
const w = document.createElement("fakeelement");
|
|
1544
|
+
if (w.style.animationName !== void 0 && (p = !0), p === !1) {
|
|
1545
|
+
for (let f = 0; f < _.length; f++)
|
|
1546
|
+
if (w.style[_[f] + "AnimationName"] !== void 0) {
|
|
1547
|
+
v = _[f], g = "-" + v.toLowerCase() + "-", o = b[f], p = !0;
|
|
1547
1548
|
break;
|
|
1548
1549
|
}
|
|
1549
1550
|
}
|
|
1550
1551
|
}
|
|
1551
1552
|
r = "resizeanim", e = "@" + g + "keyframes " + r + " { from { opacity: 0; } to { opacity: 0; } } ", n = g + "animation: 1ms " + r + "; ";
|
|
1552
1553
|
}
|
|
1553
|
-
const d = function(
|
|
1554
|
-
if (!
|
|
1555
|
-
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%; }',
|
|
1556
|
-
b.id = "detectElementResize", b.type = "text/css", t != null && b.setAttribute("nonce", t), b.styleSheet ? b.styleSheet.cssText = g : b.appendChild(
|
|
1554
|
+
const d = function(p) {
|
|
1555
|
+
if (!p.getElementById("detectElementResize")) {
|
|
1556
|
+
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%; }', _ = p.head || p.getElementsByTagName("head")[0], b = p.createElement("style");
|
|
1557
|
+
b.id = "detectElementResize", b.type = "text/css", t != null && b.setAttribute("nonce", t), b.styleSheet ? b.styleSheet.cssText = g : b.appendChild(p.createTextNode(g)), _.appendChild(b);
|
|
1557
1558
|
}
|
|
1558
1559
|
};
|
|
1559
1560
|
return {
|
|
1560
|
-
addResizeListener: function(
|
|
1561
|
+
addResizeListener: function(p, g) {
|
|
1561
1562
|
if (l)
|
|
1562
|
-
|
|
1563
|
+
p.attachEvent("onresize", g);
|
|
1563
1564
|
else {
|
|
1564
|
-
if (!
|
|
1565
|
-
const
|
|
1566
|
-
b && b.position === "static" && (
|
|
1567
|
-
const v =
|
|
1568
|
-
v.className = "expand-trigger", v.appendChild(
|
|
1569
|
-
const
|
|
1570
|
-
|
|
1571
|
-
T.animationName === r && c(
|
|
1572
|
-
},
|
|
1565
|
+
if (!p.__resizeTriggers__) {
|
|
1566
|
+
const _ = p.ownerDocument, b = ie.getComputedStyle(p);
|
|
1567
|
+
b && b.position === "static" && (p.style.position = "relative"), d(_), p.__resizeLast__ = {}, p.__resizeListeners__ = [], (p.__resizeTriggers__ = _.createElement("div")).className = "resize-triggers";
|
|
1568
|
+
const v = _.createElement("div");
|
|
1569
|
+
v.className = "expand-trigger", v.appendChild(_.createElement("div"));
|
|
1570
|
+
const w = _.createElement("div");
|
|
1571
|
+
w.className = "contract-trigger", p.__resizeTriggers__.appendChild(v), p.__resizeTriggers__.appendChild(w), p.appendChild(p.__resizeTriggers__), c(p), p.addEventListener("scroll", s, !0), o && (p.__resizeTriggers__.__animationListener__ = function(T) {
|
|
1572
|
+
T.animationName === r && c(p);
|
|
1573
|
+
}, p.__resizeTriggers__.addEventListener(o, p.__resizeTriggers__.__animationListener__));
|
|
1573
1574
|
}
|
|
1574
|
-
|
|
1575
|
+
p.__resizeListeners__.push(g);
|
|
1575
1576
|
}
|
|
1576
1577
|
},
|
|
1577
|
-
removeResizeListener: function(
|
|
1578
|
+
removeResizeListener: function(p, g) {
|
|
1578
1579
|
if (l)
|
|
1579
|
-
|
|
1580
|
-
else if (
|
|
1581
|
-
|
|
1580
|
+
p.detachEvent("onresize", g);
|
|
1581
|
+
else if (p.__resizeListeners__.splice(p.__resizeListeners__.indexOf(g), 1), !p.__resizeListeners__.length) {
|
|
1582
|
+
p.removeEventListener("scroll", s, !0), p.__resizeTriggers__.__animationListener__ && (p.__resizeTriggers__.removeEventListener(o, p.__resizeTriggers__.__animationListener__), p.__resizeTriggers__.__animationListener__ = null);
|
|
1582
1583
|
try {
|
|
1583
|
-
|
|
1584
|
+
p.__resizeTriggers__ = !p.removeChild(p.__resizeTriggers__);
|
|
1584
1585
|
} catch {
|
|
1585
1586
|
}
|
|
1586
1587
|
}
|
|
1587
1588
|
}
|
|
1588
1589
|
};
|
|
1589
1590
|
}
|
|
1590
|
-
class
|
|
1591
|
+
class $o extends rn {
|
|
1591
1592
|
constructor(...e) {
|
|
1592
1593
|
super(...e), this.state = {
|
|
1593
1594
|
height: this.props.defaultHeight || 0,
|
|
1594
|
-
scaledHeight: this.props.defaultHeight || 0,
|
|
1595
|
-
scaledWidth: this.props.defaultWidth || 0,
|
|
1596
1595
|
width: this.props.defaultWidth || 0
|
|
1597
|
-
}, this._autoSizer = null, this._detectElementResize = null, this._parentNode = null, this._resizeObserver = null, this._timeoutId = null, this._onResize = () => {
|
|
1596
|
+
}, this._autoSizer = null, this._detectElementResize = null, this._didLogDeprecationWarning = !1, this._parentNode = null, this._resizeObserver = null, this._timeoutId = null, this._onResize = () => {
|
|
1598
1597
|
this._timeoutId = null;
|
|
1599
1598
|
const {
|
|
1600
1599
|
disableHeight: r,
|
|
@@ -1602,18 +1601,27 @@ class Vo extends rn {
|
|
|
1602
1601
|
onResize: n
|
|
1603
1602
|
} = this.props;
|
|
1604
1603
|
if (this._parentNode) {
|
|
1605
|
-
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(),
|
|
1606
|
-
(!r &&
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1604
|
+
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(), m = u.height - l - d, p = u.width - c - s;
|
|
1605
|
+
if (!r && this.state.height !== m || !o && this.state.width !== p) {
|
|
1606
|
+
this.setState({
|
|
1607
|
+
height: m,
|
|
1608
|
+
width: p
|
|
1609
|
+
});
|
|
1610
|
+
const g = () => {
|
|
1611
|
+
this._didLogDeprecationWarning || (this._didLogDeprecationWarning = !0, console.warn("scaledWidth and scaledHeight parameters have been deprecated; use width and height instead"));
|
|
1612
|
+
};
|
|
1613
|
+
typeof n == "function" && n({
|
|
1614
|
+
height: m,
|
|
1615
|
+
width: p,
|
|
1616
|
+
// TODO Remove these params in the next major release
|
|
1617
|
+
get scaledHeight() {
|
|
1618
|
+
return g(), m;
|
|
1619
|
+
},
|
|
1620
|
+
get scaledWidth() {
|
|
1621
|
+
return g(), p;
|
|
1622
|
+
}
|
|
1623
|
+
});
|
|
1624
|
+
}
|
|
1617
1625
|
}
|
|
1618
1626
|
}, this._setRef = (r) => {
|
|
1619
1627
|
this._autoSizer = r;
|
|
@@ -1628,7 +1636,7 @@ class Vo extends rn {
|
|
|
1628
1636
|
const o = r.ownerDocument.defaultView.ResizeObserver;
|
|
1629
1637
|
o != null ? (this._resizeObserver = new o(() => {
|
|
1630
1638
|
this._timeoutId = setTimeout(this._onResize, 0);
|
|
1631
|
-
}), this._resizeObserver.observe(r)) : (this._detectElementResize =
|
|
1639
|
+
}), this._resizeObserver.observe(r)) : (this._detectElementResize = Ho(e), this._detectElementResize.addResizeListener(r, this._onResize)), this._onResize();
|
|
1632
1640
|
}
|
|
1633
1641
|
}
|
|
1634
1642
|
componentWillUnmount() {
|
|
@@ -1646,27 +1654,25 @@ class Vo extends rn {
|
|
|
1646
1654
|
onResize: l,
|
|
1647
1655
|
style: d = {},
|
|
1648
1656
|
tagName: u = "div",
|
|
1649
|
-
...
|
|
1657
|
+
...m
|
|
1650
1658
|
} = this.props, {
|
|
1651
|
-
height:
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
width: b
|
|
1655
|
-
} = this.state, v = {
|
|
1659
|
+
height: p,
|
|
1660
|
+
width: g
|
|
1661
|
+
} = this.state, _ = {
|
|
1656
1662
|
overflow: "visible"
|
|
1657
|
-
},
|
|
1658
|
-
let
|
|
1659
|
-
return n || (
|
|
1663
|
+
}, b = {};
|
|
1664
|
+
let v = !1;
|
|
1665
|
+
return n || (p === 0 && (v = !0), _.height = 0, b.height = p, b.scaledHeight = p), a || (g === 0 && (v = !0), _.width = 0, b.width = g, b.scaledWidth = g), c && (v = !1), He(u, {
|
|
1660
1666
|
ref: this._setRef,
|
|
1661
1667
|
style: {
|
|
1662
|
-
...
|
|
1668
|
+
..._,
|
|
1663
1669
|
...d
|
|
1664
1670
|
},
|
|
1665
|
-
...
|
|
1666
|
-
}, !
|
|
1671
|
+
...m
|
|
1672
|
+
}, !v && e(b));
|
|
1667
1673
|
}
|
|
1668
1674
|
}
|
|
1669
|
-
const
|
|
1675
|
+
const Vo = ({ widths: t, heights: e }) => {
|
|
1670
1676
|
const { focusedPage: r, totalPages: o } = ce(), { isScrolling: n } = Qe(), a = k(() => {
|
|
1671
1677
|
const l = [], d = Math.ceil(r / 2) * 2 - 1;
|
|
1672
1678
|
if (l.push(d), d + 1 < o) {
|
|
@@ -1693,9 +1699,9 @@ const Go = ({ widths: t, heights: e }) => {
|
|
|
1693
1699
|
n.current = !1;
|
|
1694
1700
|
}, [r]);
|
|
1695
1701
|
const s = k(() => c.reduce((l, d) => l + Number(d.width || 0), 0), [c]);
|
|
1696
|
-
return /* @__PURE__ */ i("div", { style: { width: s, position: "relative" }, children: a.map((l, d) => /* @__PURE__ */ i(
|
|
1702
|
+
return /* @__PURE__ */ i("div", { style: { width: s, position: "relative" }, children: a.map((l, d) => /* @__PURE__ */ i(Rt, { onIntersectRatioChange: () => {
|
|
1697
1703
|
}, style: c[d], pageNumber: l }, l)) });
|
|
1698
|
-
},
|
|
1704
|
+
}, Go = ({ widths: t, heights: e }) => {
|
|
1699
1705
|
const { focusedPage: r } = ce(), { isScrolling: o } = Qe(), n = k(() => ({
|
|
1700
1706
|
position: "absolute",
|
|
1701
1707
|
width: t(r - 1),
|
|
@@ -1713,7 +1719,7 @@ const Go = ({ widths: t, heights: e }) => {
|
|
|
1713
1719
|
position: "relative"
|
|
1714
1720
|
},
|
|
1715
1721
|
children: /* @__PURE__ */ i(
|
|
1716
|
-
|
|
1722
|
+
Rt,
|
|
1717
1723
|
{
|
|
1718
1724
|
style: n,
|
|
1719
1725
|
onIntersectRatioChange: () => {
|
|
@@ -1724,10 +1730,10 @@ const Go = ({ widths: t, heights: e }) => {
|
|
|
1724
1730
|
)
|
|
1725
1731
|
}
|
|
1726
1732
|
);
|
|
1727
|
-
},
|
|
1733
|
+
}, qo = nn(({ columnIndex: t, rowIndex: e, data: r, style: o }) => {
|
|
1728
1734
|
const n = t + 1 + e * r.columnCount;
|
|
1729
1735
|
return /* @__PURE__ */ i(
|
|
1730
|
-
|
|
1736
|
+
Rt,
|
|
1731
1737
|
{
|
|
1732
1738
|
style: o,
|
|
1733
1739
|
onIntersectRatioChange: r.handleIntersectRatioChange,
|
|
@@ -1735,23 +1741,21 @@ const Go = ({ widths: t, heights: e }) => {
|
|
|
1735
1741
|
},
|
|
1736
1742
|
n
|
|
1737
1743
|
);
|
|
1738
|
-
},
|
|
1739
|
-
const { initialPage: t = 1, initialScrollMode: e } = ln(), { pagesRef: r, setPagesRef: o } = Ie()
|
|
1740
|
-
zn(r);
|
|
1741
|
-
const { scrollToPage: n } = gr(), {
|
|
1744
|
+
}, Mo), Ts = () => {
|
|
1745
|
+
const { initialPage: t = 1, initialScrollMode: e } = ln(), { pagesRef: r, setPagesRef: o } = Ie(), { scrollToPage: n } = gr(), {
|
|
1742
1746
|
virtualScrollRef: a,
|
|
1743
1747
|
getVirtualScrollRef: c,
|
|
1744
1748
|
getPageScrollElementRef: s,
|
|
1745
1749
|
getVirtualScrollableElementRef: l,
|
|
1746
1750
|
setTotalInnerDimensions: d,
|
|
1747
1751
|
virtualScrollableElementRef: u,
|
|
1748
|
-
totalInnerDimensions:
|
|
1749
|
-
pageScrollElementRef:
|
|
1750
|
-
} = Ye(), g = M(!0), { nextPage:
|
|
1751
|
-
|
|
1752
|
+
totalInnerDimensions: m,
|
|
1753
|
+
pageScrollElementRef: p
|
|
1754
|
+
} = Ye(), g = M(!0), { nextPage: _, prevPage: b, setFocusedPage: v, focusedPage: w } = ce(), { scrollMode: f } = Oe(), { viewMode: T } = Je(), x = M(null), { loading: h } = X(), { LoaderImageComponent: P } = dr(), C = M(
|
|
1755
|
+
m
|
|
1752
1756
|
), S = M({
|
|
1753
1757
|
viewMode: T,
|
|
1754
|
-
scrollMode:
|
|
1758
|
+
scrollMode: f
|
|
1755
1759
|
}), A = M(!1), R = M(), { isFullScreen: D } = dn(), {
|
|
1756
1760
|
pageDimension: L,
|
|
1757
1761
|
rowCount: F,
|
|
@@ -1760,12 +1764,12 @@ const Go = ({ widths: t, heights: e }) => {
|
|
|
1760
1764
|
columnWidth: N,
|
|
1761
1765
|
estimatedColumnWidth: V,
|
|
1762
1766
|
estimatedRowHeight: q
|
|
1763
|
-
} =
|
|
1767
|
+
} = Wo(), Z = _t(m, 100), [ee, B] = $({}), J = _t(ee, 100), { isScrolling: ae } = Qe(), re = M(), j = M({
|
|
1764
1768
|
scrollTop: 0,
|
|
1765
1769
|
scrollLeft: 0
|
|
1766
1770
|
});
|
|
1767
|
-
|
|
1768
|
-
const { isPressed: Y } =
|
|
1771
|
+
Mn(r);
|
|
1772
|
+
const { isPressed: Y } = Fn(), { selectionMode: de } = cn(), { initializeGrabScroll: Ce, resetGrabState: De } = kn({
|
|
1769
1773
|
isPressed: Y
|
|
1770
1774
|
}), ue = k(() => de === an.HAND, [de]), pe = I((W, H) => {
|
|
1771
1775
|
B((Q) => H > -1 ? { ...Q, [W]: Math.round(H * 100) } : (delete Q[W], Q));
|
|
@@ -1775,9 +1779,9 @@ const Go = ({ widths: t, heights: e }) => {
|
|
|
1775
1779
|
}), [y, pe]), Te = I(
|
|
1776
1780
|
(W) => {
|
|
1777
1781
|
const H = document.activeElement !== r;
|
|
1778
|
-
!D && H || (["ArrowUp", "ArrowLeft"].includes(W.key) ? (W.preventDefault(), b()) : ["ArrowDown", "ArrowRight"].includes(W.key) && (W.preventDefault(),
|
|
1782
|
+
!D && H || (["ArrowUp", "ArrowLeft"].includes(W.key) ? (W.preventDefault(), b()) : ["ArrowDown", "ArrowRight"].includes(W.key) && (W.preventDefault(), _()));
|
|
1779
1783
|
},
|
|
1780
|
-
[
|
|
1784
|
+
[_, b, D, f]
|
|
1781
1785
|
);
|
|
1782
1786
|
O(() => (window.addEventListener("keydown", Te), () => {
|
|
1783
1787
|
window.removeEventListener("keydown", Te);
|
|
@@ -1791,7 +1795,7 @@ const Go = ({ widths: t, heights: e }) => {
|
|
|
1791
1795
|
shouldForceUpdate: !0
|
|
1792
1796
|
});
|
|
1793
1797
|
}, [F, y, L, a]);
|
|
1794
|
-
const
|
|
1798
|
+
const rt = I(
|
|
1795
1799
|
(W, H) => {
|
|
1796
1800
|
if (!u)
|
|
1797
1801
|
return { scrollTop: 0, scrollLeft: 0 };
|
|
@@ -1806,24 +1810,24 @@ const Go = ({ widths: t, heights: e }) => {
|
|
|
1806
1810
|
(W, H) => {
|
|
1807
1811
|
if (ae.current)
|
|
1808
1812
|
return;
|
|
1809
|
-
if (S.current.viewMode !== T || S.current.scrollMode !==
|
|
1810
|
-
re.current && clearTimeout(re.current), B({}), A.current = !0, n(
|
|
1813
|
+
if (S.current.viewMode !== T || S.current.scrollMode !== f) {
|
|
1814
|
+
re.current && clearTimeout(re.current), B({}), A.current = !0, n(w), f === K.HORIZONTAL_SCROLLING && (a == null || a.scrollTo({
|
|
1811
1815
|
scrollTop: 0
|
|
1812
1816
|
})), re.current = setTimeout(() => {
|
|
1813
1817
|
requestAnimationFrame(() => {
|
|
1814
|
-
S.current = { viewMode: T, scrollMode:
|
|
1818
|
+
S.current = { viewMode: T, scrollMode: f };
|
|
1815
1819
|
});
|
|
1816
1820
|
}, 100);
|
|
1817
1821
|
return;
|
|
1818
1822
|
}
|
|
1819
|
-
const se = W.scrollTop,
|
|
1823
|
+
const se = W.scrollTop, nt = W.scrollLeft;
|
|
1820
1824
|
if (!H.height || !H.width)
|
|
1821
1825
|
return;
|
|
1822
1826
|
A.current = !0;
|
|
1823
|
-
const { height: Pe, width:
|
|
1824
|
-
if (Ot === Pe && Dt ===
|
|
1827
|
+
const { height: Pe, width: ot } = H, { height: Ot, width: Dt } = C.current;
|
|
1828
|
+
if (Ot === Pe && Dt === ot)
|
|
1825
1829
|
return;
|
|
1826
|
-
const Jr = se / Ot * Pe, Yr =
|
|
1830
|
+
const Jr = se / Ot * Pe, Yr = nt / Dt * ot, Qr = Math.round(Math.min(Jr, Pe)) || 0, en = Math.round(Math.min(Yr, ot)) || 0;
|
|
1827
1831
|
R.current = setTimeout(() => {
|
|
1828
1832
|
requestAnimationFrame(() => {
|
|
1829
1833
|
a == null || a.scrollTo({
|
|
@@ -1836,17 +1840,17 @@ const Go = ({ widths: t, heights: e }) => {
|
|
|
1836
1840
|
width: H.width
|
|
1837
1841
|
};
|
|
1838
1842
|
},
|
|
1839
|
-
[a, T,
|
|
1843
|
+
[a, T, f]
|
|
1840
1844
|
);
|
|
1841
1845
|
O(() => {
|
|
1842
1846
|
clearTimeout(R.current);
|
|
1843
1847
|
const W = Array.from({ length: F }).reduce(
|
|
1844
|
-
(se,
|
|
1848
|
+
(se, nt, Pe) => se + E(Pe),
|
|
1845
1849
|
0
|
|
1846
1850
|
), H = Array.from({ length: y }).reduce(
|
|
1847
|
-
(se,
|
|
1851
|
+
(se, nt, Pe) => se + N(Pe),
|
|
1848
1852
|
0
|
|
1849
|
-
), Q =
|
|
1853
|
+
), Q = rt(H, W);
|
|
1850
1854
|
j.current = Q, Br(Q, { height: W, width: H }), d({
|
|
1851
1855
|
height: W,
|
|
1852
1856
|
width: H
|
|
@@ -1882,11 +1886,11 @@ const Go = ({ widths: t, heights: e }) => {
|
|
|
1882
1886
|
[ue, Ce, he]
|
|
1883
1887
|
);
|
|
1884
1888
|
return O(() => {
|
|
1885
|
-
|
|
1886
|
-
}, [
|
|
1889
|
+
h && De();
|
|
1890
|
+
}, [h]), O(() => {
|
|
1887
1891
|
if (!(Z.height === 0 || !g.current)) {
|
|
1888
1892
|
if (e === K.PAGE_SCROLLING) {
|
|
1889
|
-
t !==
|
|
1893
|
+
t !== w && p && v(t), g.current = !1;
|
|
1890
1894
|
return;
|
|
1891
1895
|
}
|
|
1892
1896
|
if (a != null && a.scrollToItem) {
|
|
@@ -1912,19 +1916,19 @@ const Go = ({ widths: t, heights: e }) => {
|
|
|
1912
1916
|
}, [
|
|
1913
1917
|
a,
|
|
1914
1918
|
e,
|
|
1915
|
-
|
|
1919
|
+
p,
|
|
1916
1920
|
v,
|
|
1917
1921
|
Z
|
|
1918
|
-
]), /* @__PURE__ */ i("div", { ref: o, tabIndex: -1, className: Kr, children: /* @__PURE__ */ i(
|
|
1922
|
+
]), /* @__PURE__ */ i("div", { ref: o, tabIndex: -1, className: Kr, children: /* @__PURE__ */ i($o, { style: { minHeight: "50px" }, children: ({ width: W, height: H }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: Xr, style: { width: W, height: H }, children: f === K.PAGE_SCROLLING ? /* @__PURE__ */ i(
|
|
1919
1923
|
"div",
|
|
1920
1924
|
{
|
|
1921
1925
|
ref: s,
|
|
1922
1926
|
style: { width: W, height: H },
|
|
1923
1927
|
className: oe(he["rp-pages"], he["rp-page-scrolling-wrapper"]),
|
|
1924
|
-
children: T === qe.DUAL_PAGE ? /* @__PURE__ */ i(
|
|
1928
|
+
children: T === qe.DUAL_PAGE ? /* @__PURE__ */ i(Vo, { widths: N, heights: E }) : /* @__PURE__ */ i(Go, { widths: N, heights: E })
|
|
1925
1929
|
}
|
|
1926
1930
|
) : V ? /* @__PURE__ */ i(
|
|
1927
|
-
|
|
1931
|
+
Ao,
|
|
1928
1932
|
{
|
|
1929
1933
|
ref: c,
|
|
1930
1934
|
itemData: ge,
|
|
@@ -1941,11 +1945,11 @@ const Go = ({ widths: t, heights: e }) => {
|
|
|
1941
1945
|
rowCount: F,
|
|
1942
1946
|
className: oe(
|
|
1943
1947
|
he["rp-pages"],
|
|
1944
|
-
|
|
1948
|
+
f === K.HORIZONTAL_SCROLLING ? he["rp-pages-horizontal-scroll"] : ""
|
|
1945
1949
|
),
|
|
1946
|
-
children:
|
|
1950
|
+
children: qo
|
|
1947
1951
|
}
|
|
1948
|
-
) :
|
|
1952
|
+
) : h ? null : /* @__PURE__ */ i(
|
|
1949
1953
|
"div",
|
|
1950
1954
|
{
|
|
1951
1955
|
className: he["rp-loader"],
|
|
@@ -1965,34 +1969,34 @@ const Go = ({ widths: t, heights: e }) => {
|
|
|
1965
1969
|
"rp-toolbar-start": "_rp-toolbar-start_sz31z_33",
|
|
1966
1970
|
"rp-toolbar-middle": "_rp-toolbar-middle_sz31z_39",
|
|
1967
1971
|
"rp-toolbar-end": "_rp-toolbar-end_sz31z_46"
|
|
1968
|
-
},
|
|
1972
|
+
}, mt = {
|
|
1969
1973
|
"rp-paginate": "_rp-paginate_1y9vo_1",
|
|
1970
1974
|
"rp-page-input": "_rp-page-input_1y9vo_6",
|
|
1971
1975
|
"rp-total-page": "_rp-total-page_1y9vo_11"
|
|
1972
|
-
},
|
|
1976
|
+
}, Uo = () => {
|
|
1973
1977
|
const { prevIcon: t } = fe();
|
|
1974
1978
|
return t || /* @__PURE__ */ i(ke, {});
|
|
1975
|
-
},
|
|
1979
|
+
}, Zo = () => {
|
|
1976
1980
|
const { nextIcon: t } = fe();
|
|
1977
1981
|
return t || /* @__PURE__ */ i(ke, { style: { transform: "rotate(180deg" } });
|
|
1978
|
-
},
|
|
1982
|
+
}, Bo = () => {
|
|
1979
1983
|
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
1984
|
O(() => {
|
|
1981
1985
|
s(t.toString());
|
|
1982
1986
|
}, [t]);
|
|
1983
|
-
const
|
|
1987
|
+
const m = I((b) => {
|
|
1984
1988
|
const v = b.target.value;
|
|
1985
1989
|
s(v);
|
|
1986
|
-
}, []),
|
|
1990
|
+
}, []), p = I(async () => {
|
|
1987
1991
|
const b = await a(c);
|
|
1988
1992
|
b.success || s(b.currentPage.toString());
|
|
1989
1993
|
}, [a, c, e]), g = I(() => {
|
|
1990
1994
|
s(t.toString());
|
|
1991
|
-
}, [t]),
|
|
1995
|
+
}, [t]), _ = I(
|
|
1992
1996
|
(b) => {
|
|
1993
|
-
b.key === "Enter" &&
|
|
1997
|
+
b.key === "Enter" && p();
|
|
1994
1998
|
},
|
|
1995
|
-
[
|
|
1999
|
+
[p]
|
|
1996
2000
|
);
|
|
1997
2001
|
return typeof l != "boolean" ? /* @__PURE__ */ i(
|
|
1998
2002
|
l,
|
|
@@ -2004,27 +2008,27 @@ const Go = ({ widths: t, heights: e }) => {
|
|
|
2004
2008
|
goToPage: a,
|
|
2005
2009
|
changePage: r
|
|
2006
2010
|
}
|
|
2007
|
-
) : l ? /* @__PURE__ */ z("div", { className:
|
|
2011
|
+
) : l ? /* @__PURE__ */ z("div", { className: mt["rp-paginate"], children: [
|
|
2008
2012
|
!d && /* @__PURE__ */ i(U, { content: u == null ? void 0 : u.previousPageTooltip, children: /* @__PURE__ */ i(
|
|
2009
2013
|
te,
|
|
2010
2014
|
{
|
|
2011
2015
|
onClick: n,
|
|
2012
2016
|
"aria-label": u == null ? void 0 : u.previousPageTooltip,
|
|
2013
2017
|
"aria-disabled": t === 1,
|
|
2014
|
-
children: /* @__PURE__ */ i(
|
|
2018
|
+
children: /* @__PURE__ */ i(Uo, {})
|
|
2015
2019
|
}
|
|
2016
2020
|
) }),
|
|
2017
2021
|
/* @__PURE__ */ i(U, { content: u == null ? void 0 : u.currentPageTooltip, children: /* @__PURE__ */ i(
|
|
2018
2022
|
ar,
|
|
2019
2023
|
{
|
|
2020
|
-
onKeyDown:
|
|
2024
|
+
onKeyDown: _,
|
|
2021
2025
|
onBlur: g,
|
|
2022
|
-
onChange:
|
|
2026
|
+
onChange: m,
|
|
2023
2027
|
value: c,
|
|
2024
|
-
className:
|
|
2028
|
+
className: mt["rp-page-input"]
|
|
2025
2029
|
}
|
|
2026
2030
|
) }),
|
|
2027
|
-
/* @__PURE__ */ z("span", { className:
|
|
2031
|
+
/* @__PURE__ */ z("span", { className: mt["rp-total-page"], children: [
|
|
2028
2032
|
"/",
|
|
2029
2033
|
e
|
|
2030
2034
|
] }),
|
|
@@ -2034,12 +2038,12 @@ const Go = ({ widths: t, heights: e }) => {
|
|
|
2034
2038
|
onClick: o,
|
|
2035
2039
|
"aria-label": u == null ? void 0 : u.nextPageTooltip,
|
|
2036
2040
|
"aria-disabled": t === e,
|
|
2037
|
-
children: /* @__PURE__ */ i(
|
|
2041
|
+
children: /* @__PURE__ */ i(Zo, {})
|
|
2038
2042
|
}
|
|
2039
2043
|
) })
|
|
2040
2044
|
] }) : null;
|
|
2041
2045
|
};
|
|
2042
|
-
var
|
|
2046
|
+
var tt = "Dialog", [yr, Ps] = Vn(tt), [jo, le] = yr(tt), Ir = (t) => {
|
|
2043
2047
|
const {
|
|
2044
2048
|
__scopeDialog: e,
|
|
2045
2049
|
children: r,
|
|
@@ -2047,32 +2051,33 @@ var Rt = "Dialog", [yr, Ts] = Gn(Rt), [Ko, le] = yr(Rt), Ir = (t) => {
|
|
|
2047
2051
|
defaultOpen: n,
|
|
2048
2052
|
onOpenChange: a,
|
|
2049
2053
|
modal: c = !0
|
|
2050
|
-
} = t, s = G.useRef(null), l = G.useRef(null), [d
|
|
2054
|
+
} = t, s = G.useRef(null), l = G.useRef(null), [d, u] = qn({
|
|
2051
2055
|
prop: o,
|
|
2052
|
-
defaultProp: n,
|
|
2053
|
-
onChange: a
|
|
2056
|
+
defaultProp: n ?? !1,
|
|
2057
|
+
onChange: a,
|
|
2058
|
+
caller: tt
|
|
2054
2059
|
});
|
|
2055
2060
|
return /* @__PURE__ */ i(
|
|
2056
|
-
|
|
2061
|
+
jo,
|
|
2057
2062
|
{
|
|
2058
2063
|
scope: e,
|
|
2059
2064
|
triggerRef: s,
|
|
2060
2065
|
contentRef: l,
|
|
2061
|
-
contentId:
|
|
2062
|
-
titleId:
|
|
2063
|
-
descriptionId:
|
|
2066
|
+
contentId: at(),
|
|
2067
|
+
titleId: at(),
|
|
2068
|
+
descriptionId: at(),
|
|
2064
2069
|
open: d,
|
|
2065
2070
|
onOpenChange: u,
|
|
2066
|
-
onOpenToggle: G.useCallback(() => u((
|
|
2071
|
+
onOpenToggle: G.useCallback(() => u((m) => !m), [u]),
|
|
2067
2072
|
modal: c,
|
|
2068
2073
|
children: r
|
|
2069
2074
|
}
|
|
2070
2075
|
);
|
|
2071
2076
|
};
|
|
2072
|
-
Ir.displayName =
|
|
2073
|
-
var Rr = "DialogTrigger",
|
|
2077
|
+
Ir.displayName = tt;
|
|
2078
|
+
var Rr = "DialogTrigger", Ko = G.forwardRef(
|
|
2074
2079
|
(t, e) => {
|
|
2075
|
-
const { __scopeDialog: r, ...o } = t, n = le(Rr, r), a =
|
|
2080
|
+
const { __scopeDialog: r, ...o } = t, n = le(Rr, r), a = xt(e, n.triggerRef);
|
|
2076
2081
|
return /* @__PURE__ */ i(
|
|
2077
2082
|
We.button,
|
|
2078
2083
|
{
|
|
@@ -2088,28 +2093,28 @@ var Rr = "DialogTrigger", Xo = G.forwardRef(
|
|
|
2088
2093
|
);
|
|
2089
2094
|
}
|
|
2090
2095
|
);
|
|
2091
|
-
|
|
2092
|
-
var Lt = "DialogPortal", [
|
|
2096
|
+
Ko.displayName = Rr;
|
|
2097
|
+
var Lt = "DialogPortal", [Xo, Lr] = yr(Lt, {
|
|
2093
2098
|
forceMount: void 0
|
|
2094
2099
|
}), Nr = (t) => {
|
|
2095
2100
|
const { __scopeDialog: e, forceMount: r, children: o, container: n } = t, a = le(Lt, e);
|
|
2096
|
-
return /* @__PURE__ */ i(
|
|
2101
|
+
return /* @__PURE__ */ i(Xo, { scope: e, forceMount: r, children: G.Children.map(o, (c) => /* @__PURE__ */ i(yt, { present: r || a.open, children: /* @__PURE__ */ i(Xn, { asChild: !0, container: n, children: c }) })) });
|
|
2097
2102
|
};
|
|
2098
2103
|
Nr.displayName = Lt;
|
|
2099
2104
|
var Ze = "DialogOverlay", Er = G.forwardRef(
|
|
2100
2105
|
(t, e) => {
|
|
2101
2106
|
const r = Lr(Ze, t.__scopeDialog), { forceMount: o = r.forceMount, ...n } = t, a = le(Ze, t.__scopeDialog);
|
|
2102
|
-
return a.modal ? /* @__PURE__ */ i(
|
|
2107
|
+
return a.modal ? /* @__PURE__ */ i(yt, { present: o || a.open, children: /* @__PURE__ */ i(Yo, { ...n, ref: e }) }) : null;
|
|
2103
2108
|
}
|
|
2104
2109
|
);
|
|
2105
2110
|
Er.displayName = Ze;
|
|
2106
|
-
var Yo = G.forwardRef(
|
|
2111
|
+
var Jo = Un("DialogOverlay.RemoveScroll"), Yo = G.forwardRef(
|
|
2107
2112
|
(t, e) => {
|
|
2108
2113
|
const { __scopeDialog: r, ...o } = t, n = le(Ze, r);
|
|
2109
2114
|
return (
|
|
2110
2115
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
2111
2116
|
// ie. when `Overlay` and `Content` are siblings
|
|
2112
|
-
/* @__PURE__ */ i(
|
|
2117
|
+
/* @__PURE__ */ i(Bn, { as: Jo, allowPinchZoom: !0, shards: [n.contentRef], children: /* @__PURE__ */ i(
|
|
2113
2118
|
We.div,
|
|
2114
2119
|
{
|
|
2115
2120
|
"data-state": Et(n.open),
|
|
@@ -2123,17 +2128,17 @@ var Yo = G.forwardRef(
|
|
|
2123
2128
|
), ye = "DialogContent", Or = G.forwardRef(
|
|
2124
2129
|
(t, e) => {
|
|
2125
2130
|
const r = Lr(ye, t.__scopeDialog), { forceMount: o = r.forceMount, ...n } = t, a = le(ye, t.__scopeDialog);
|
|
2126
|
-
return /* @__PURE__ */ i(
|
|
2131
|
+
return /* @__PURE__ */ i(yt, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(Qo, { ...n, ref: e }) : /* @__PURE__ */ i(ei, { ...n, ref: e }) });
|
|
2127
2132
|
}
|
|
2128
2133
|
);
|
|
2129
2134
|
Or.displayName = ye;
|
|
2130
2135
|
var Qo = G.forwardRef(
|
|
2131
2136
|
(t, e) => {
|
|
2132
|
-
const r = le(ye, t.__scopeDialog), o = G.useRef(null), n =
|
|
2137
|
+
const r = le(ye, t.__scopeDialog), o = G.useRef(null), n = xt(e, r.contentRef, o);
|
|
2133
2138
|
return G.useEffect(() => {
|
|
2134
2139
|
const a = o.current;
|
|
2135
2140
|
if (a)
|
|
2136
|
-
return
|
|
2141
|
+
return Jn(a);
|
|
2137
2142
|
}, []), /* @__PURE__ */ i(
|
|
2138
2143
|
Dr,
|
|
2139
2144
|
{
|
|
@@ -2181,10 +2186,10 @@ var Qo = G.forwardRef(
|
|
|
2181
2186
|
}
|
|
2182
2187
|
), Dr = G.forwardRef(
|
|
2183
2188
|
(t, e) => {
|
|
2184
|
-
const { __scopeDialog: r, trapFocus: o, onOpenAutoFocus: n, onCloseAutoFocus: a, ...c } = t, s = le(ye, r), l = G.useRef(null), d =
|
|
2185
|
-
return
|
|
2189
|
+
const { __scopeDialog: r, trapFocus: o, onOpenAutoFocus: n, onCloseAutoFocus: a, ...c } = t, s = le(ye, r), l = G.useRef(null), d = xt(e, l);
|
|
2190
|
+
return jn(), /* @__PURE__ */ z(xe, { children: [
|
|
2186
2191
|
/* @__PURE__ */ i(
|
|
2187
|
-
|
|
2192
|
+
Kn,
|
|
2188
2193
|
{
|
|
2189
2194
|
asChild: !0,
|
|
2190
2195
|
loop: !0,
|
|
@@ -2192,7 +2197,7 @@ var Qo = G.forwardRef(
|
|
|
2192
2197
|
onMountAutoFocus: n,
|
|
2193
2198
|
onUnmountAutoFocus: a,
|
|
2194
2199
|
children: /* @__PURE__ */ i(
|
|
2195
|
-
|
|
2200
|
+
Zn,
|
|
2196
2201
|
{
|
|
2197
2202
|
role: "dialog",
|
|
2198
2203
|
id: s.contentId,
|
|
@@ -2244,7 +2249,7 @@ kr.displayName = Fr;
|
|
|
2244
2249
|
function Et(t) {
|
|
2245
2250
|
return t ? "open" : "closed";
|
|
2246
2251
|
}
|
|
2247
|
-
var Mr = "DialogTitleWarning", [
|
|
2252
|
+
var Mr = "DialogTitleWarning", [Ss, Wr] = Gn(Mr, {
|
|
2248
2253
|
contentName: ye,
|
|
2249
2254
|
titleName: Nt,
|
|
2250
2255
|
docsSlug: "dialog"
|
|
@@ -2274,7 +2279,7 @@ const Se = {
|
|
|
2274
2279
|
"rp-dialog-close": "_rp-dialog-close_slqo7_47",
|
|
2275
2280
|
"rp-properties-divider": "_rp-properties-divider_slqo7_55"
|
|
2276
2281
|
}, ui = () => {
|
|
2277
|
-
const { pdfProperties: t } = X(), { container: e } = Ie(), { activeDocumentProperties: r, setActiveDocumentProperties: o } =
|
|
2282
|
+
const { pdfProperties: t } = X(), { container: e } = Ie(), { activeDocumentProperties: r, setActiveDocumentProperties: o } = Qn(), { localeMessages: n } = me(), a = k(() => {
|
|
2278
2283
|
if (!t)
|
|
2279
2284
|
return [];
|
|
2280
2285
|
const {
|
|
@@ -2283,13 +2288,13 @@ const Se = {
|
|
|
2283
2288
|
title: l,
|
|
2284
2289
|
author: d,
|
|
2285
2290
|
subject: u,
|
|
2286
|
-
createdOn:
|
|
2287
|
-
creator:
|
|
2291
|
+
createdOn: m,
|
|
2292
|
+
creator: p,
|
|
2288
2293
|
keywords: g,
|
|
2289
|
-
modifiedOn:
|
|
2294
|
+
modifiedOn: _,
|
|
2290
2295
|
pdfProducer: b,
|
|
2291
2296
|
pdfVersion: v,
|
|
2292
|
-
pageCount:
|
|
2297
|
+
pageCount: w
|
|
2293
2298
|
} = t;
|
|
2294
2299
|
return [
|
|
2295
2300
|
{ label: n == null ? void 0 : n.propertiesFilenameLabel, value: s },
|
|
@@ -2299,26 +2304,26 @@ const Se = {
|
|
|
2299
2304
|
{ label: n == null ? void 0 : n.propertiesAuthorLabel, value: d },
|
|
2300
2305
|
{ label: n == null ? void 0 : n.propertiesSubjectLabel, value: u },
|
|
2301
2306
|
{ label: n == null ? void 0 : n.propertiesKeywordLabel, value: g },
|
|
2302
|
-
{ label: n == null ? void 0 : n.propertiesCreatorLabel, value:
|
|
2307
|
+
{ label: n == null ? void 0 : n.propertiesCreatorLabel, value: p },
|
|
2303
2308
|
{
|
|
2304
2309
|
label: n == null ? void 0 : n.propertiesCreateOnLabel,
|
|
2305
|
-
value:
|
|
2310
|
+
value: m ? Wt(m) : ""
|
|
2306
2311
|
},
|
|
2307
2312
|
{
|
|
2308
2313
|
label: n == null ? void 0 : n.propertiesModifiedOnLabel,
|
|
2309
|
-
value:
|
|
2314
|
+
value: _ ? Wt(_) : ""
|
|
2310
2315
|
},
|
|
2311
2316
|
{ separate: !0 },
|
|
2312
2317
|
{ label: n == null ? void 0 : n.propertiesPDFProducerLabel, value: b },
|
|
2313
2318
|
{ label: n == null ? void 0 : n.propertiesPDFVersionLabel, value: v },
|
|
2314
|
-
{ label: n == null ? void 0 : n.propertiesPageCountLabel, value:
|
|
2319
|
+
{ label: n == null ? void 0 : n.propertiesPageCountLabel, value: w }
|
|
2315
2320
|
];
|
|
2316
2321
|
}, [t, n]);
|
|
2317
2322
|
return /* @__PURE__ */ i(ii, { open: r, onOpenChange: o, children: /* @__PURE__ */ i(ai, { container: e, children: /* @__PURE__ */ z("div", { className: Se["rp-dialog-wrapper"], children: [
|
|
2318
2323
|
/* @__PURE__ */ i(si, { className: Se["rp-dialog-overlay"] }),
|
|
2319
2324
|
/* @__PURE__ */ z(ci, { className: Se["rp-document-dialog"], children: [
|
|
2320
2325
|
/* @__PURE__ */ i(li, { className: Se["rp-dialog-title"], children: n == null ? void 0 : n.documentPropertiesLabel }),
|
|
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(
|
|
2326
|
+
/* @__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(Yn, { label: c.label, value: c.value }) }, s)) }),
|
|
2322
2327
|
/* @__PURE__ */ i(di, { asChild: !0, className: Se["rp-dialog-close"], children: /* @__PURE__ */ i(hr, {}) })
|
|
2323
2328
|
] })
|
|
2324
2329
|
] }) }) });
|
|
@@ -2337,7 +2342,7 @@ const Se = {
|
|
|
2337
2342
|
}, [t, e]) };
|
|
2338
2343
|
}, $r = () => {
|
|
2339
2344
|
const { downloadIcon: t } = fe();
|
|
2340
|
-
return t || /* @__PURE__ */ i(
|
|
2345
|
+
return t || /* @__PURE__ */ i(oo, {});
|
|
2341
2346
|
}, 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: [
|
|
2342
2347
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i($r, {}) }),
|
|
2343
2348
|
e == null ? void 0 : e.downloadFileLabel
|
|
@@ -2346,7 +2351,7 @@ const Se = {
|
|
|
2346
2351
|
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;
|
|
2347
2352
|
}, qr = () => {
|
|
2348
2353
|
const { printIcon: t } = fe();
|
|
2349
|
-
return t || /* @__PURE__ */ i(
|
|
2354
|
+
return t || /* @__PURE__ */ i(io, {});
|
|
2350
2355
|
}, 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: [
|
|
2351
2356
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(qr, {}) }),
|
|
2352
2357
|
e == null ? void 0 : e.printLabel
|
|
@@ -2386,7 +2391,7 @@ const Se = {
|
|
|
2386
2391
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Ci, {}) }),
|
|
2387
2392
|
/* @__PURE__ */ i("span", { children: n == null ? void 0 : n.lastPageLabel })
|
|
2388
2393
|
] }) }) }),
|
|
2389
|
-
/* @__PURE__ */ i(
|
|
2394
|
+
/* @__PURE__ */ i(It, {})
|
|
2390
2395
|
] }) : null;
|
|
2391
2396
|
}, Pi = () => {
|
|
2392
2397
|
const { container: t } = Ie(), { isSmallScreen: e } = Re(), {
|
|
@@ -2399,11 +2404,11 @@ const Se = {
|
|
|
2399
2404
|
jumpNavigationTool: l,
|
|
2400
2405
|
printTool: d,
|
|
2401
2406
|
fullscreenTool: u
|
|
2402
|
-
} = _e(), { localeMessages:
|
|
2407
|
+
} = _e(), { localeMessages: m } = me();
|
|
2403
2408
|
return k(() => {
|
|
2404
2409
|
const g = l || c || s || a || n;
|
|
2405
|
-
let
|
|
2406
|
-
return e && (
|
|
2410
|
+
let _ = !1;
|
|
2411
|
+
return e && (_ = !(!r && !o && !d && !u)), g || _;
|
|
2407
2412
|
}, [
|
|
2408
2413
|
r,
|
|
2409
2414
|
o,
|
|
@@ -2413,25 +2418,25 @@ const Se = {
|
|
|
2413
2418
|
s,
|
|
2414
2419
|
l,
|
|
2415
2420
|
e
|
|
2416
|
-
]) ? /* @__PURE__ */ z(
|
|
2421
|
+
]) ? /* @__PURE__ */ z(eo, { children: [
|
|
2417
2422
|
/* @__PURE__ */ i(
|
|
2418
2423
|
pr,
|
|
2419
2424
|
{
|
|
2420
2425
|
container: t,
|
|
2421
|
-
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(U, { content:
|
|
2426
|
+
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(U, { content: m == null ? void 0 : m.moreOptionTooltip, children: /* @__PURE__ */ i(te, { "aria-label": m == null ? void 0 : m.moreOptionTooltip, children: /* @__PURE__ */ i($n, {}) }) }) }),
|
|
2422
2427
|
children: /* @__PURE__ */ z("div", { className: pi["rp-other-tool-content"], "data-rp": "moreOptionsDropdown", children: [
|
|
2423
2428
|
e && /* @__PURE__ */ z(Ue, { children: [
|
|
2424
2429
|
/* @__PURE__ */ i(ur, {}),
|
|
2425
2430
|
/* @__PURE__ */ i(Gr, {}),
|
|
2426
2431
|
/* @__PURE__ */ i(Zr, {}),
|
|
2427
2432
|
/* @__PURE__ */ i(mr, {}),
|
|
2428
|
-
/* @__PURE__ */ i(
|
|
2433
|
+
/* @__PURE__ */ i(It, {})
|
|
2429
2434
|
] }),
|
|
2430
2435
|
/* @__PURE__ */ i(Ti, {}),
|
|
2436
|
+
/* @__PURE__ */ i(ro, {}),
|
|
2437
|
+
/* @__PURE__ */ i(ao, {}),
|
|
2431
2438
|
/* @__PURE__ */ i(no, {}),
|
|
2432
|
-
/* @__PURE__ */ i(
|
|
2433
|
-
/* @__PURE__ */ i(oo, {}),
|
|
2434
|
-
/* @__PURE__ */ i(ro, {})
|
|
2439
|
+
/* @__PURE__ */ i(to, {})
|
|
2435
2440
|
] })
|
|
2436
2441
|
}
|
|
2437
2442
|
),
|
|
@@ -2440,7 +2445,7 @@ const Se = {
|
|
|
2440
2445
|
}, Si = () => {
|
|
2441
2446
|
const { isSmallScreen: t } = Re();
|
|
2442
2447
|
return /* @__PURE__ */ z(xe, { children: [
|
|
2443
|
-
/* @__PURE__ */ i(
|
|
2448
|
+
/* @__PURE__ */ i(Hn, {}),
|
|
2444
2449
|
!t && /* @__PURE__ */ z(xe, { children: [
|
|
2445
2450
|
/* @__PURE__ */ i(ur, {}),
|
|
2446
2451
|
/* @__PURE__ */ i(Gr, {}),
|
|
@@ -2455,35 +2460,35 @@ const Se = {
|
|
|
2455
2460
|
"rp-current-zoom-icon": "_rp-current-zoom-icon_cocqs_11",
|
|
2456
2461
|
"rp-current-zoom-text": "_rp-current-zoom-text_cocqs_16",
|
|
2457
2462
|
"rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_cocqs_20"
|
|
2458
|
-
}, xi = 25,
|
|
2463
|
+
}, xi = 25, ft = 1e3, yi = [50, 75, 100, 125, 150, 200, 300, 400], Ii = () => {
|
|
2459
2464
|
const { zoomInIcon: t } = fe();
|
|
2460
|
-
return t || /* @__PURE__ */ i(
|
|
2465
|
+
return t || /* @__PURE__ */ i(so, {});
|
|
2461
2466
|
}, Ri = () => {
|
|
2462
2467
|
const { zoomOutIcon: t } = fe();
|
|
2463
|
-
return t || /* @__PURE__ */ i(
|
|
2468
|
+
return t || /* @__PURE__ */ i(co, {});
|
|
2464
2469
|
}, Li = () => {
|
|
2465
2470
|
const { zoomLevel: t, setZoomLevel: e } = Xe(), { container: r, contentRef: o } = Ie(), { zoomTool: n = !0 } = _e(), { focusedPage: a } = ce(), { rotate: c } = Ke(), { pages: s } = X(), { isSmallScreen: l } = Re(), { localeMessages: d } = me(), u = I(() => {
|
|
2466
|
-
e((
|
|
2467
|
-
const
|
|
2468
|
-
return Math.min(
|
|
2471
|
+
e((w) => {
|
|
2472
|
+
const f = Math.floor(w / 25) * 25;
|
|
2473
|
+
return Math.min(f + 25, ft);
|
|
2469
2474
|
});
|
|
2470
|
-
}, [e]),
|
|
2471
|
-
e((
|
|
2472
|
-
const
|
|
2473
|
-
return Math.min(
|
|
2475
|
+
}, [e]), m = I(() => {
|
|
2476
|
+
e((w) => {
|
|
2477
|
+
const f = Math.ceil(w / 25) * 25;
|
|
2478
|
+
return Math.min(f - 25, ft);
|
|
2474
2479
|
});
|
|
2475
|
-
}, [e]),
|
|
2476
|
-
var
|
|
2477
|
-
return (
|
|
2480
|
+
}, [e]), p = k(() => t === xi, [t]), g = k(() => t === ft, [t]), _ = k(() => {
|
|
2481
|
+
var w;
|
|
2482
|
+
return (w = s.get(a)) == null ? void 0 : w.page.getViewport({ scale: 1, rotation: c });
|
|
2478
2483
|
}, [s, a, c]), b = I(
|
|
2479
|
-
(
|
|
2480
|
-
const
|
|
2484
|
+
(w) => {
|
|
2485
|
+
const f = ((_ == null ? void 0 : _.width) || 0) + 2 * Ht, T = ((_ == null ? void 0 : _.height) || 0) + 2 * Ht, x = (o == null ? void 0 : o.clientWidth) || 0, h = (o == null ? void 0 : o.clientHeight) || 0, P = lo(w, x, h, f, T);
|
|
2481
2486
|
e(P);
|
|
2482
2487
|
},
|
|
2483
|
-
[e,
|
|
2488
|
+
[e, _]
|
|
2484
2489
|
), v = I(
|
|
2485
|
-
(
|
|
2486
|
-
typeof
|
|
2490
|
+
(w) => {
|
|
2491
|
+
typeof w == "number" ? e(w) : b(w);
|
|
2487
2492
|
},
|
|
2488
2493
|
[e, b]
|
|
2489
2494
|
);
|
|
@@ -2491,8 +2496,8 @@ const Se = {
|
|
|
2491
2496
|
/* @__PURE__ */ i(U, { content: d == null ? void 0 : d.zoomOutTooltip, children: /* @__PURE__ */ i(
|
|
2492
2497
|
te,
|
|
2493
2498
|
{
|
|
2494
|
-
disabled:
|
|
2495
|
-
onClick:
|
|
2499
|
+
disabled: p,
|
|
2500
|
+
onClick: m,
|
|
2496
2501
|
"aria-label": d == null ? void 0 : d.zoomOutTooltip,
|
|
2497
2502
|
children: /* @__PURE__ */ i(Ri, {})
|
|
2498
2503
|
}
|
|
@@ -2517,15 +2522,15 @@ const Se = {
|
|
|
2517
2522
|
align: "center",
|
|
2518
2523
|
children: /* @__PURE__ */ z("div", { className: Ne["rp-zoom-dropdown-content"], children: [
|
|
2519
2524
|
/* @__PURE__ */ z(Ue, { children: [
|
|
2520
|
-
/* @__PURE__ */ i(be, { onClick: () => v(
|
|
2521
|
-
/* @__PURE__ */ i(be, { onClick: () => v(
|
|
2522
|
-
/* @__PURE__ */ i(be, { onClick: () => v(
|
|
2525
|
+
/* @__PURE__ */ i(be, { onClick: () => v(it.ACTUAL), children: d == null ? void 0 : d.zoomActualSize }),
|
|
2526
|
+
/* @__PURE__ */ i(be, { onClick: () => v(it.PAGE_FIT), children: d == null ? void 0 : d.zoomPageFit }),
|
|
2527
|
+
/* @__PURE__ */ i(be, { onClick: () => v(it.PAGE_WIDTH), children: d == null ? void 0 : d.zoomPageWidth })
|
|
2523
2528
|
] }),
|
|
2524
|
-
/* @__PURE__ */ i(
|
|
2525
|
-
/* @__PURE__ */ i(Ue, { children: yi.map((
|
|
2526
|
-
|
|
2529
|
+
/* @__PURE__ */ i(It, {}),
|
|
2530
|
+
/* @__PURE__ */ i(Ue, { children: yi.map((w) => /* @__PURE__ */ z(be, { onClick: () => v(w), children: [
|
|
2531
|
+
w,
|
|
2527
2532
|
" %"
|
|
2528
|
-
] },
|
|
2533
|
+
] }, w)) })
|
|
2529
2534
|
] })
|
|
2530
2535
|
}
|
|
2531
2536
|
),
|
|
@@ -2551,7 +2556,7 @@ const Se = {
|
|
|
2551
2556
|
"rp-search-icon-info": "_rp-search-icon-info_3xbn5_65"
|
|
2552
2557
|
}, nr = () => {
|
|
2553
2558
|
const { searchIcon: t } = fe();
|
|
2554
|
-
return t || /* @__PURE__ */ i(
|
|
2559
|
+
return t || /* @__PURE__ */ i(uo, {});
|
|
2555
2560
|
}, Ni = () => {
|
|
2556
2561
|
const { container: t } = Ie(), [e, r] = $(!1), { pdf: o } = X(), [n, a] = $(null), {
|
|
2557
2562
|
searchOptions: c,
|
|
@@ -2559,15 +2564,15 @@ const Se = {
|
|
|
2559
2564
|
loading: l,
|
|
2560
2565
|
setSearch: d,
|
|
2561
2566
|
totalMatches: u,
|
|
2562
|
-
currentMatchPosition:
|
|
2563
|
-
nextMatch:
|
|
2567
|
+
currentMatchPosition: m,
|
|
2568
|
+
nextMatch: p,
|
|
2564
2569
|
prevMatch: g,
|
|
2565
|
-
search:
|
|
2566
|
-
} = Tr(), { searchTool: b = !0 } = _e(), [v,
|
|
2570
|
+
search: _
|
|
2571
|
+
} = Tr(), { searchTool: b = !0 } = _e(), [v, w] = $(_), { localeMessages: f } = me(), T = I(() => {
|
|
2567
2572
|
r(!0);
|
|
2568
2573
|
}, []), x = I(() => {
|
|
2569
|
-
d(""),
|
|
2570
|
-
}, [d]),
|
|
2574
|
+
d(""), w(""), r(!1);
|
|
2575
|
+
}, [d]), h = (y) => {
|
|
2571
2576
|
const N = y.key === "Enter", V = y.key === " ";
|
|
2572
2577
|
(N || V) && x();
|
|
2573
2578
|
}, P = I(
|
|
@@ -2577,9 +2582,9 @@ const Se = {
|
|
|
2577
2582
|
[e]
|
|
2578
2583
|
), C = I(
|
|
2579
2584
|
(y) => {
|
|
2580
|
-
y.shiftKey && y.key === "Enter" ? g() : y.key === "Enter" &&
|
|
2585
|
+
y.shiftKey && y.key === "Enter" ? g() : y.key === "Enter" && _ !== v ? d(v) : y.key === "Enter" && p();
|
|
2581
2586
|
},
|
|
2582
|
-
[v, g,
|
|
2587
|
+
[v, g, p, d, _]
|
|
2583
2588
|
);
|
|
2584
2589
|
O(() => (window.addEventListener("keydown", P), () => {
|
|
2585
2590
|
window.removeEventListener("keydown", P);
|
|
@@ -2587,10 +2592,10 @@ const Se = {
|
|
|
2587
2592
|
n && n.focus();
|
|
2588
2593
|
}, [n]);
|
|
2589
2594
|
const S = I((y) => {
|
|
2590
|
-
|
|
2595
|
+
w(y.target.value);
|
|
2591
2596
|
}, []), A = I(() => {
|
|
2592
|
-
|
|
2593
|
-
}, [d]), R = k(() => `${
|
|
2597
|
+
w(""), d("");
|
|
2598
|
+
}, [d]), R = k(() => `${m} / ${u}`, [m, u]), { wholeWords: D, matchCase: L } = k(() => c, [c]), F = I(
|
|
2594
2599
|
(y) => {
|
|
2595
2600
|
s((N) => ({ ...N, matchCase: y }));
|
|
2596
2601
|
},
|
|
@@ -2604,45 +2609,45 @@ const Se = {
|
|
|
2604
2609
|
return O(() => {
|
|
2605
2610
|
x();
|
|
2606
2611
|
}, [o, x]), b ? /* @__PURE__ */ i(xe, { children: /* @__PURE__ */ i(
|
|
2607
|
-
|
|
2612
|
+
An,
|
|
2608
2613
|
{
|
|
2609
2614
|
open: e,
|
|
2610
2615
|
container: t,
|
|
2611
|
-
triggerComponent: /* @__PURE__ */ i(U, { content:
|
|
2616
|
+
triggerComponent: /* @__PURE__ */ i(U, { content: f == null ? void 0 : f.searchButtonTooltip, children: /* @__PURE__ */ i(te, { onClick: T, "aria-label": f == null ? void 0 : f.searchButtonTooltip, children: /* @__PURE__ */ i(nr, {}) }) }),
|
|
2612
2617
|
children: /* @__PURE__ */ z("div", { className: ne["rp-search-tool-content"], children: [
|
|
2613
2618
|
/* @__PURE__ */ z("div", { className: ne["rp-search-tool-input-wrapper"], children: [
|
|
2614
2619
|
/* @__PURE__ */ z("div", { className: ne["rp-search-tool-input"], children: [
|
|
2615
|
-
/* @__PURE__ */ i(U, { content:
|
|
2620
|
+
/* @__PURE__ */ i(U, { content: f == null ? void 0 : f.searchInputTooltip, children: /* @__PURE__ */ i(
|
|
2616
2621
|
ar,
|
|
2617
2622
|
{
|
|
2618
2623
|
value: v,
|
|
2619
2624
|
onKeyDown: C,
|
|
2620
2625
|
onChange: S,
|
|
2621
2626
|
icon: /* @__PURE__ */ i(nr, {}),
|
|
2622
|
-
placeholder:
|
|
2627
|
+
placeholder: f == null ? void 0 : f.searchInputPlaceholder,
|
|
2623
2628
|
className: ne["rp-search-input"],
|
|
2624
2629
|
ref: a,
|
|
2625
|
-
children: !!v && /* @__PURE__ */ i("span", { className: ne["rp-search-tool-input-clear"], onClick: A, children: /* @__PURE__ */ i(
|
|
2630
|
+
children: !!v && /* @__PURE__ */ i("span", { className: ne["rp-search-tool-input-clear"], onClick: A, children: /* @__PURE__ */ i(po, {}) })
|
|
2626
2631
|
}
|
|
2627
2632
|
) }),
|
|
2628
|
-
l ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(
|
|
2633
|
+
l ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(St, {}) }) : /* @__PURE__ */ i("span", { children: R })
|
|
2629
2634
|
] }),
|
|
2630
2635
|
/* @__PURE__ */ z("div", { className: ne["rp-search-tool-input-checkboxes"], children: [
|
|
2631
|
-
/* @__PURE__ */ i($t, { name: "matchCase", value: L, onChange: F, children:
|
|
2632
|
-
/* @__PURE__ */ i(U, { content:
|
|
2633
|
-
/* @__PURE__ */ i($t, { name: "wholeWord", value: D, onChange: E, children:
|
|
2634
|
-
/* @__PURE__ */ i(U, { content:
|
|
2636
|
+
/* @__PURE__ */ i($t, { name: "matchCase", value: L, onChange: F, children: f == null ? void 0 : f.searchMatchCaseLabel }),
|
|
2637
|
+
/* @__PURE__ */ i(U, { content: f == null ? void 0 : f.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: ne["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Vt, {}) }) }),
|
|
2638
|
+
/* @__PURE__ */ i($t, { name: "wholeWord", value: D, onChange: E, children: f == null ? void 0 : f.searchWholeWordsLabel }),
|
|
2639
|
+
/* @__PURE__ */ i(U, { content: f == null ? void 0 : f.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { className: ne["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(Vt, {}) }) })
|
|
2635
2640
|
] })
|
|
2636
2641
|
] }),
|
|
2637
2642
|
/* @__PURE__ */ z("div", { className: ne["rp-search-tool-controls"], children: [
|
|
2638
|
-
/* @__PURE__ */ i(U, { content:
|
|
2643
|
+
/* @__PURE__ */ i(U, { content: f == null ? void 0 : f.searchPrevTooltip, children: /* @__PURE__ */ i(te, { onClick: g, "aria-label": f == null ? void 0 : f.searchPrevTooltip, children: /* @__PURE__ */ i(
|
|
2639
2644
|
ke,
|
|
2640
2645
|
{
|
|
2641
2646
|
className: ne["rp-search-tool-input-icon"],
|
|
2642
2647
|
"aria-disabled": !u
|
|
2643
2648
|
}
|
|
2644
2649
|
) }) }),
|
|
2645
|
-
/* @__PURE__ */ i(U, { content:
|
|
2650
|
+
/* @__PURE__ */ i(U, { content: f == null ? void 0 : f.searchNextTooltip, children: /* @__PURE__ */ i(te, { onClick: p, "aria-label": f == null ? void 0 : f.searchNextTooltip, children: /* @__PURE__ */ i(
|
|
2646
2651
|
ke,
|
|
2647
2652
|
{
|
|
2648
2653
|
style: { transform: "rotate(180deg" },
|
|
@@ -2650,11 +2655,11 @@ const Se = {
|
|
|
2650
2655
|
"aria-disabled": !u
|
|
2651
2656
|
}
|
|
2652
2657
|
) }) }),
|
|
2653
|
-
/* @__PURE__ */ i(U, { content:
|
|
2658
|
+
/* @__PURE__ */ i(U, { content: f == null ? void 0 : f.searchCloseButtonTooltip, children: /* @__PURE__ */ i(
|
|
2654
2659
|
te,
|
|
2655
2660
|
{
|
|
2656
|
-
onKeyDown:
|
|
2657
|
-
"aria-label":
|
|
2661
|
+
onKeyDown: h,
|
|
2662
|
+
"aria-label": f == null ? void 0 : f.searchCloseButtonTooltip,
|
|
2658
2663
|
children: /* @__PURE__ */ i(hr, { onClick: x, className: ne["rp-search-tool-input-icon"] })
|
|
2659
2664
|
}
|
|
2660
2665
|
) })
|
|
@@ -2692,14 +2697,14 @@ const Se = {
|
|
|
2692
2697
|
/* @__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
2698
|
/* @__PURE__ */ z("div", { "data-rp": "topBarLeft", className: ze["rp-toolbar-start"], children: [
|
|
2694
2699
|
/* @__PURE__ */ i(Ni, {}),
|
|
2695
|
-
/* @__PURE__ */ i(
|
|
2700
|
+
/* @__PURE__ */ i(Bo, {})
|
|
2696
2701
|
] }),
|
|
2697
2702
|
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: ze["rp-toolbar-middle"], children: /* @__PURE__ */ i(Li, {}) }),
|
|
2698
2703
|
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: ze["rp-toolbar-end"], children: /* @__PURE__ */ i(Si, {}) })
|
|
2699
2704
|
] }) }),
|
|
2700
2705
|
r && a ? /* @__PURE__ */ i(Oi, { percentage: a }) : null
|
|
2701
2706
|
] });
|
|
2702
|
-
}),
|
|
2707
|
+
}), gt = {
|
|
2703
2708
|
"rp-sidebar-content-wrapper": "_rp-sidebar-content-wrapper_1sdl6_1",
|
|
2704
2709
|
"rp-sidebar-content": "_rp-sidebar-content_1sdl6_1",
|
|
2705
2710
|
"rp-thumbnails-wrapper": "_rp-thumbnails-wrapper_1sdl6_16",
|
|
@@ -2740,7 +2745,7 @@ const Se = {
|
|
|
2740
2745
|
width: `${s.width}px`,
|
|
2741
2746
|
height: `${s.height}px`
|
|
2742
2747
|
},
|
|
2743
|
-
children: /* @__PURE__ */ i(
|
|
2748
|
+
children: /* @__PURE__ */ i(St, {})
|
|
2744
2749
|
}
|
|
2745
2750
|
) }),
|
|
2746
2751
|
/* @__PURE__ */ i("div", { className: Ae["rp-thumbnail-text"], children: r })
|
|
@@ -2756,13 +2761,13 @@ const Se = {
|
|
|
2756
2761
|
}, ki = Me((t, e) => {
|
|
2757
2762
|
const { show: r } = t, { focusedPage: o, totalPages: n } = ce(), { thumbnailPages: a, addPage: c, thumbnailLength: s, addToPage: l } = br(), d = M(null), u = M(1);
|
|
2758
2763
|
ir(e, () => d.current);
|
|
2759
|
-
const
|
|
2764
|
+
const m = k(() => Object.values(a), [a]), p = I(() => {
|
|
2760
2765
|
const g = s + 1;
|
|
2761
2766
|
g <= n && c(g);
|
|
2762
2767
|
}, [c, n, s]);
|
|
2763
2768
|
return O(() => {
|
|
2764
2769
|
o > s ? l(o) : r && u.current !== o && (Fi(d.current, o), u.current = o);
|
|
2765
|
-
}, [o, s, l, r,
|
|
2770
|
+
}, [o, s, l, r, m]), wn(d.current, p), /* @__PURE__ */ i("div", { ref: d, className: or["rp-thumbnails-container"], children: /* @__PURE__ */ i("div", { className: or["rp-thumbnails"], children: r ? m.map((g, _) => {
|
|
2766
2771
|
var b, v;
|
|
2767
2772
|
return /* @__PURE__ */ i(
|
|
2768
2773
|
zi,
|
|
@@ -2773,7 +2778,7 @@ const Se = {
|
|
|
2773
2778
|
loading: g.loading,
|
|
2774
2779
|
viewport: g.viewport
|
|
2775
2780
|
},
|
|
2776
|
-
|
|
2781
|
+
_
|
|
2777
2782
|
);
|
|
2778
2783
|
}) : null }) });
|
|
2779
2784
|
}), Mi = () => {
|
|
@@ -2795,16 +2800,16 @@ const Se = {
|
|
|
2795
2800
|
"div",
|
|
2796
2801
|
{
|
|
2797
2802
|
style: { "--rp-thumbnail-width": `${r}px` },
|
|
2798
|
-
className:
|
|
2803
|
+
className: gt["rp-sidebar-content-wrapper"],
|
|
2799
2804
|
"data-rp": "sidebar",
|
|
2800
2805
|
children: [
|
|
2801
|
-
/* @__PURE__ */ i("div", { className:
|
|
2806
|
+
/* @__PURE__ */ i("div", { className: gt["rp-sidebar-content"], children: d }),
|
|
2802
2807
|
/* @__PURE__ */ z(
|
|
2803
2808
|
"div",
|
|
2804
2809
|
{
|
|
2805
2810
|
"data-rp": "thumbnailSidebar",
|
|
2806
2811
|
hidden: !t,
|
|
2807
|
-
className:
|
|
2812
|
+
className: gt["rp-thumbnails-wrapper"],
|
|
2808
2813
|
children: [
|
|
2809
2814
|
/* @__PURE__ */ i(ki, { show: t, ref: n }),
|
|
2810
2815
|
/* @__PURE__ */ i(bn, { onWidthChange: o, thumbnailRef: n })
|
|
@@ -2845,14 +2850,14 @@ const Se = {
|
|
|
2845
2850
|
}
|
|
2846
2851
|
);
|
|
2847
2852
|
}
|
|
2848
|
-
),
|
|
2849
|
-
const { children: r, slots: o, icons: n, style: a, className: c, mobileWidth: s, onLoaded: l, cleanupOnLoaded: d } = t, [u,
|
|
2853
|
+
), xs = Me((t, e) => {
|
|
2854
|
+
const { children: r, slots: o, icons: n, style: a, className: c, mobileWidth: s, onLoaded: l, cleanupOnLoaded: d } = t, [u, m] = $(null), { setContainer: p, setContentRef: g } = Ie(), { loading: _ } = X(), { LoaderImageComponent: b } = dr();
|
|
2850
2855
|
return O(() => (l && l(), () => {
|
|
2851
2856
|
d && d();
|
|
2852
|
-
}), [l, d]), /* @__PURE__ */ i(Hi, { toolbarRef: u, ref: e, children: /* @__PURE__ */ i(yn, { mobileWidth: s, children: /* @__PURE__ */ i(Cn, { slots: o, children: /* @__PURE__ */ i(Tn, { icons: n, children: /* @__PURE__ */ z(Pn, { getContainerRef:
|
|
2857
|
+
}), [l, d]), /* @__PURE__ */ i(Hi, { toolbarRef: u, ref: e, children: /* @__PURE__ */ i(yn, { mobileWidth: s, children: /* @__PURE__ */ i(Cn, { slots: o, children: /* @__PURE__ */ i(Tn, { icons: n, children: /* @__PURE__ */ z(Pn, { getContainerRef: p, style: a, className: c, children: [
|
|
2853
2858
|
/* @__PURE__ */ z(Sn, { children: [
|
|
2854
2859
|
/* @__PURE__ */ z("div", { className: we["rp-layout"], children: [
|
|
2855
|
-
/* @__PURE__ */ i(Di, { ref:
|
|
2860
|
+
/* @__PURE__ */ i(Di, { ref: m }),
|
|
2856
2861
|
/* @__PURE__ */ z("div", { className: we["rp-content"], children: [
|
|
2857
2862
|
/* @__PURE__ */ i("div", { className: we["rp-sidebar"], children: /* @__PURE__ */ i(Wi, {}) }),
|
|
2858
2863
|
/* @__PURE__ */ i("div", { ref: g, className: we["rp-pages"], children: r })
|
|
@@ -2860,7 +2865,7 @@ const Se = {
|
|
|
2860
2865
|
] }),
|
|
2861
2866
|
/* @__PURE__ */ i(xn, {})
|
|
2862
2867
|
] }),
|
|
2863
|
-
|
|
2868
|
+
_ ? /* @__PURE__ */ i(
|
|
2864
2869
|
"div",
|
|
2865
2870
|
{
|
|
2866
2871
|
className: we["rp-loader"],
|
|
@@ -2891,10 +2896,10 @@ const Se = {
|
|
|
2891
2896
|
] }) }) }) }) });
|
|
2892
2897
|
});
|
|
2893
2898
|
export {
|
|
2894
|
-
|
|
2899
|
+
Co as A,
|
|
2895
2900
|
Di as B,
|
|
2896
|
-
|
|
2897
|
-
|
|
2901
|
+
vo as C,
|
|
2902
|
+
Vo as D,
|
|
2898
2903
|
zi as E,
|
|
2899
2904
|
Gr as F,
|
|
2900
2905
|
ki as G,
|
|
@@ -2903,33 +2908,33 @@ export {
|
|
|
2903
2908
|
Oi as L,
|
|
2904
2909
|
Ti as M,
|
|
2905
2910
|
Pi as O,
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2911
|
+
_s as P,
|
|
2912
|
+
Ts as R,
|
|
2913
|
+
Cs as S,
|
|
2914
|
+
bs as T,
|
|
2910
2915
|
Li as Z,
|
|
2911
|
-
|
|
2912
|
-
|
|
2916
|
+
ws as a,
|
|
2917
|
+
xs as b,
|
|
2913
2918
|
Hr as c,
|
|
2914
2919
|
et as d,
|
|
2915
2920
|
Tr as e,
|
|
2916
2921
|
gr as f,
|
|
2917
|
-
|
|
2922
|
+
ho as g,
|
|
2918
2923
|
vr as h,
|
|
2919
|
-
|
|
2924
|
+
mo as i,
|
|
2920
2925
|
_r as j,
|
|
2921
|
-
|
|
2926
|
+
fo as k,
|
|
2922
2927
|
wr as l,
|
|
2923
2928
|
br as m,
|
|
2924
|
-
|
|
2929
|
+
go as n,
|
|
2925
2930
|
Cr as o,
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
+
_o as p,
|
|
2932
|
+
To as q,
|
|
2933
|
+
Rt as r,
|
|
2934
|
+
Wo as s,
|
|
2935
|
+
Go as t,
|
|
2931
2936
|
ce as u,
|
|
2932
|
-
|
|
2937
|
+
Bo as v,
|
|
2933
2938
|
ui as w,
|
|
2934
2939
|
Zr as x,
|
|
2935
2940
|
Si as y,
|