@pdf-viewer/react 1.9.1-rc.1 → 1.9.1-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ToolbarLayout.module-231e1237.js → ToolbarLayout.module-c973eb9c.js} +540 -536
- package/dist/components/RPController.js +1 -1
- package/dist/components/RPPages.js +1 -1
- package/dist/components/layout/LayoutContainer.js +1 -1
- package/dist/components/layout/RPDefaultLayout.js +1 -1
- package/dist/components/layout/RPLayout.js +1 -1
- package/dist/components/layout/sidebar/RPSidebar.js +1 -1
- package/dist/components/layout/sidebar/Thumbnail.js +1 -1
- package/dist/components/layout/sidebar/Thumbnails.js +1 -1
- package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
- package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/MostPageTool.js +1 -1
- package/dist/components/layout/toolbar/OtherTool.js +1 -1
- package/dist/components/layout/toolbar/Paginate.js +1 -1
- package/dist/components/layout/toolbar/PrintTool.js +1 -1
- package/dist/components/layout/toolbar/RPToolbar.js +1 -1
- package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
- package/dist/components/layout/toolbar/SearchResultNavigator.js +1 -1
- package/dist/components/layout/toolbar/SearchTool.js +1 -1
- package/dist/components/layout/toolbar/ThumbnailTool.js +1 -1
- package/dist/components/layout/toolbar/ToolbarCustom.js +1 -1
- package/dist/components/layout/toolbar/ToolbarDefault.js +1 -1
- package/dist/components/layout/toolbar/ZoomTool.js +1 -1
- package/dist/components/layout/toolbar/tools/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/tools/InputPageTool.js +1 -1
- package/dist/components/layout/toolbar/tools/NextPageTool.js +1 -1
- package/dist/components/layout/toolbar/tools/PreviousPageTool.js +1 -1
- package/dist/components/layout/toolbar/tools/PrintTool.js +1 -1
- package/dist/components/layout/toolbar/tools/ThumbnailTool.js +1 -1
- package/dist/components/layout/toolbar/tools/ZoomInTool.js +1 -1
- package/dist/components/layout/toolbar/tools/ZoomLevelTool.js +1 -1
- package/dist/components/layout/toolbar/tools/ZoomOutTool.js +1 -1
- package/dist/components/layout/toolbar/tools/defaults/RPHorizontalBar.js +1 -1
- package/dist/components/page/AnnotationLayer.js +1 -1
- package/dist/components/page/CanvasLayer.js +1 -1
- package/dist/components/page/CustomElement.js +1 -1
- package/dist/components/page/DualPage.js +1 -1
- package/dist/components/page/RPPage.js +1 -1
- package/dist/components/page/SinglePage.js +1 -1
- package/dist/components/page/TextHighlightLayer.js +1 -1
- package/dist/components/page/TextLayer.js +1 -1
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/contexts/DimensionPagesContext.js +1 -1
- package/dist/contexts/ElementPageContext.js +1 -1
- package/dist/contexts/PaginationContext.js +1 -1
- package/dist/contexts/PrintContext.js +1 -1
- package/dist/contexts/RenderQueueProvider.js +1 -1
- package/dist/contexts/SearchContext.js +1 -1
- package/dist/contexts/ThumbnailsContext.js +1 -1
- package/dist/contexts/ZoomContext.js +1 -1
- package/dist/main.js +1 -1
- package/dist/utils/hooks/useFileDownload.js +1 -1
- package/dist/utils/hooks/useLicense.js +1 -1
- package/dist/utils/hooks/usePaginate.js +1 -1
- package/dist/utils/hooks/usePinch.js +1 -1
- package/dist/utils/hooks/usePresentPage.js +1 -1
- package/dist/utils/hooks/usePrint.js +1 -1
- package/dist/utils/hooks/useScrollToPage.js +1 -1
- package/dist/utils/hooks/useSearch.js +1 -1
- package/dist/utils/hooks/useThumbnail.js +1 -1
- package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as s, Fragment as
|
|
2
|
-
import * as
|
|
3
|
-
import { createContext as
|
|
1
|
+
import { jsx as s, Fragment as de, jsxs as H } from "react/jsx-runtime";
|
|
2
|
+
import * as X from "react";
|
|
3
|
+
import { createContext as xe, useContext as Ie, useState as A, useRef as k, useEffect as N, useMemo as W, useCallback as E, useImperativeHandle as pn, createElement as Ke, PureComponent as uo, Component as po, memo as hn, forwardRef as ho } from "react";
|
|
4
4
|
import { ChevronUpIcon as Be } from "./components/icons/ChevronUpIcon.js";
|
|
5
|
-
import { UIButton as
|
|
5
|
+
import { UIButton as ce } from "./components/ui/Button.js";
|
|
6
6
|
import { UIInput as fn } from "./components/ui/Input.js";
|
|
7
|
-
import { ZoomLevel as Xe, ViewMode as
|
|
8
|
-
import { useScrollModeContext as
|
|
9
|
-
import { useDocumentContext as
|
|
7
|
+
import { ZoomLevel as Xe, ViewMode as ze, ScrollMode as ne, LicenseType as fo, AnnotationSubType as $t, SelectionMode as mo } from "./utils/types.js";
|
|
8
|
+
import { useScrollModeContext as Fe } from "./contexts/ScrollModeContext.js";
|
|
9
|
+
import { useDocumentContext as J } from "./contexts/RPDocumentContext.js";
|
|
10
10
|
import { useDocumentPasswordContext as go } from "./contexts/DocumentPasswordContext.js";
|
|
11
11
|
import { useDarkModeContext as vo } from "./contexts/DarkModeContext.js";
|
|
12
12
|
import { useRotationContext as wo } from "./contexts/RotationContext.js";
|
|
@@ -15,8 +15,8 @@ import { appConsole as St } from "./utils/appConsole.js";
|
|
|
15
15
|
import { useInitialStateContext as mn } from "./contexts/InitialStateContext.js";
|
|
16
16
|
import { PAGE_PADDING as et } from "./utils/constants.js";
|
|
17
17
|
import { getZoomLevel as bo } from "./utils/getZoomLevel.js";
|
|
18
|
-
import { useLayoutContainer as
|
|
19
|
-
import { useViewModeContext as
|
|
18
|
+
import { useLayoutContainer as me } from "./contexts/LayoutContainerContext.js";
|
|
19
|
+
import { useViewModeContext as We } from "./contexts/ViewModeContext.js";
|
|
20
20
|
import { useVirtualScrollContext as ot } from "./contexts/VirtualScrollContext.js";
|
|
21
21
|
import { useVirtualGridContext as gn } from "./contexts/VirtualGridContext.js";
|
|
22
22
|
import { useSelectionModeContext as To } from "./contexts/SelectionModeContext.js";
|
|
@@ -24,8 +24,8 @@ import { useFullScreenContext as Co } from "./contexts/FullScreenContext.js";
|
|
|
24
24
|
import "./contexts/FileInputContext.js";
|
|
25
25
|
import "./contexts/DropFileZoneContext.js";
|
|
26
26
|
import { findMatches as Po, resetDivs as yo, highlightMatches as xo, isMatchEntireWord as Io } from "./utils/highlight.js";
|
|
27
|
-
import { usePagesRotateContext as
|
|
28
|
-
import { useLocalizationContext as
|
|
27
|
+
import { usePagesRotateContext as qe } from "./contexts/PagesRotateContext.js";
|
|
28
|
+
import { useLocalizationContext as ue } from "./contexts/LocalizationContext.js";
|
|
29
29
|
import { useHighlightContext as So } from "./contexts/HighlightContext.js";
|
|
30
30
|
import { useLicenseContext as Lo } from "./contexts/LicenseContext.js";
|
|
31
31
|
import { useDownloadContext as Ro } from "./contexts/DownloadContext.js";
|
|
@@ -34,25 +34,25 @@ import { ORGANIZATION_ALLOWED_FEATURES_MESSAGE as ut } from "./utils/const.js";
|
|
|
34
34
|
import { Queue as Eo } from "./utils/Queue.js";
|
|
35
35
|
import { renderPage as No } from "./utils/renderPage.js";
|
|
36
36
|
import { useLoaderContext as wn } from "./contexts/LoaderContext.js";
|
|
37
|
-
import { useToolComponentContext as
|
|
38
|
-
import { useIconToolContext as
|
|
37
|
+
import { useToolComponentContext as Se } from "./contexts/ToolComponentContext.js";
|
|
38
|
+
import { useIconToolContext as ge } from "./contexts/IconToolContext.js";
|
|
39
39
|
import { useOtherToolContext as Oo, OtherToolProvider as Do } from "./contexts/OtherToolContext.js";
|
|
40
40
|
import "./components/RPConfig.js";
|
|
41
41
|
import { ThumbnailIcon as zo } from "./components/icons/Thumbnail.js";
|
|
42
|
-
import { c as
|
|
42
|
+
import { c as se } from "./clsx-0c6e471a.js";
|
|
43
43
|
import { LoaderIcon as Lt } from "./components/icons/LoaderIcon.js";
|
|
44
44
|
import { Container as Ao } from "./components/layout/Container.js";
|
|
45
|
-
import { useViewportContext as
|
|
46
|
-
import { useToolbarComponentContext as
|
|
45
|
+
import { useViewportContext as Le, ViewportProvider as Fo } from "./contexts/ViewportContext.js";
|
|
46
|
+
import { useToolbarComponentContext as be, ToolbarComponentProvider as Wo } from "./contexts/ToolbarComponentContext.js";
|
|
47
47
|
import { WrapperLayout as Mo } from "./components/layout/WrapperLayout.js";
|
|
48
48
|
import { useThemeContext as ko } from "./contexts/ThemeContext.js";
|
|
49
49
|
import { RPDropFileZone as Ho } from "./components/RPDropFileZone.js";
|
|
50
50
|
import { c as te, S as qt } from "./SearchCloseButton-cbf182aa.js";
|
|
51
51
|
import { UICheckbox as Gt } from "./components/ui/Checkbox.js";
|
|
52
|
-
import { useIconContext as
|
|
52
|
+
import { useIconContext as ve, IconProvider as $o } from "./contexts/IconContext.js";
|
|
53
53
|
import K from "./components/ui/RPTooltip.js";
|
|
54
54
|
import { UIDropDown as Rt } from "./components/ui/DropDown.js";
|
|
55
|
-
import { MenuItem as
|
|
55
|
+
import { MenuItem as ye } from "./components/layout/toolbar/MenuItem.js";
|
|
56
56
|
import { MenuSeparator as Et } from "./components/layout/toolbar/MenuSeparator.js";
|
|
57
57
|
import { dateFormatter as Vt } from "./utils/dateFormatter.js";
|
|
58
58
|
import { PropertyItem as qo } from "./components/layout/toolbar/PropertyItem.js";
|
|
@@ -70,7 +70,7 @@ import { useGrabScroll as ar } from "./utils/hooks/useGrabScroll.js";
|
|
|
70
70
|
import { useDebounce as it } from "./utils/hooks/useDebounce.js";
|
|
71
71
|
import cr from "./components/ui/PasswordModal.js";
|
|
72
72
|
import { getPositionFromPage as lr, getPageFromPosition as dr } from "./utils/calculatePage.js";
|
|
73
|
-
import { getScrollDistance as
|
|
73
|
+
import { getScrollDistance as $e } from "./utils/getScrollDistance.js";
|
|
74
74
|
import { getWordPositionInPage as ur } from "./utils/getWordPositionInPage.js";
|
|
75
75
|
import { getThumbnailViewport as pr } from "./utils/getThumbnailViewport.js";
|
|
76
76
|
import { smoothScrollTo as pt } from "./utils/smoothScrollTo.js";
|
|
@@ -94,16 +94,16 @@ import { ZoomOutIcon as Dr } from "./components/icons/ZoomOutIcon.js";
|
|
|
94
94
|
import { SearchIcon as Cn } from "./components/icons/SearchIcon.js";
|
|
95
95
|
import { ClearIcon as zr } from "./components/icons/ClearIcon.js";
|
|
96
96
|
import { InfoIcon as Bt } from "./components/icons/InfoIcon.js";
|
|
97
|
-
import './assets/ToolbarLayout.css';const Pn =
|
|
97
|
+
import './assets/ToolbarLayout.css';const Pn = xe({
|
|
98
98
|
zoomLevel: 100,
|
|
99
99
|
currentZoom: 1,
|
|
100
100
|
setZoomLevel: () => {
|
|
101
101
|
}
|
|
102
|
-
}),
|
|
103
|
-
const t =
|
|
102
|
+
}), Me = () => {
|
|
103
|
+
const t = Ie(Pn);
|
|
104
104
|
return typeof t.currentZoom != "number" && St.warn("Please use this hooks inside children component of RPProvider"), t;
|
|
105
105
|
}, nc = ({ children: t }) => {
|
|
106
|
-
const { initialScale: e = Xe.PAGE_FIT, initialPage: n = 1 } = mn(), [r, o] =
|
|
106
|
+
const { initialScale: e = Xe.PAGE_FIT, initialPage: n = 1 } = mn(), [r, o] = A(e), { pages: i } = J(), { pagesRef: a } = me(), { viewMode: d } = We(), [l, m] = A((a == null ? void 0 : a.clientWidth) || 0), { rotate: h } = wo(), { focusedPage: b } = ae(), [p, w] = A(null), P = k(null), [y, v] = A(n);
|
|
107
107
|
N(() => {
|
|
108
108
|
let u = i.get(y);
|
|
109
109
|
u || (u = i.get(1));
|
|
@@ -113,12 +113,12 @@ import './assets/ToolbarLayout.css';const Pn = ye({
|
|
|
113
113
|
});
|
|
114
114
|
c && JSON.stringify(c) !== JSON.stringify(P.current) && (P.current = c, w(c));
|
|
115
115
|
}, [i, h, y]);
|
|
116
|
-
const _ =
|
|
116
|
+
const _ = W(() => {
|
|
117
117
|
if (!p)
|
|
118
118
|
return null;
|
|
119
119
|
const u = ((p == null ? void 0 : p.width) || 0) + 2 * et, c = ((p == null ? void 0 : p.height) || 0) + 2 * et, T = (a == null ? void 0 : a.clientWidth) || 0, C = (a == null ? void 0 : a.clientHeight) || 0;
|
|
120
120
|
return { pageWidth: u, pageHeight: c, clientWidth: T, clientHeight: C };
|
|
121
|
-
}, [p, a]), g =
|
|
121
|
+
}, [p, a]), g = W(() => {
|
|
122
122
|
if (!l || !_)
|
|
123
123
|
return 0;
|
|
124
124
|
if (typeof r == "number")
|
|
@@ -138,28 +138,28 @@ import './assets/ToolbarLayout.css';const Pn = ye({
|
|
|
138
138
|
c.disconnect();
|
|
139
139
|
};
|
|
140
140
|
}, [a]);
|
|
141
|
-
const f =
|
|
141
|
+
const f = W(() => ({
|
|
142
142
|
zoomLevel: r,
|
|
143
143
|
currentZoom: g,
|
|
144
144
|
setZoomLevel: o
|
|
145
145
|
}), [g, r]);
|
|
146
146
|
return /* @__PURE__ */ s(Pn.Provider, { value: f, children: t });
|
|
147
|
-
}, yn =
|
|
147
|
+
}, yn = xe({
|
|
148
148
|
widths: [],
|
|
149
149
|
heights: [],
|
|
150
150
|
setWidths: () => {
|
|
151
151
|
},
|
|
152
152
|
setHeights: () => {
|
|
153
153
|
}
|
|
154
|
-
}),
|
|
155
|
-
const t =
|
|
154
|
+
}), Ge = () => {
|
|
155
|
+
const t = Ie(yn), { widths: e, heights: n } = t;
|
|
156
156
|
if (e && n) {
|
|
157
157
|
const r = e.every((i) => typeof i == "number"), o = n.every((i) => typeof i == "number");
|
|
158
158
|
(!r || !o) && St.warn("Please use this hooks inside children component of RPProvider");
|
|
159
159
|
}
|
|
160
160
|
return t;
|
|
161
161
|
}, oc = ({ children: t }) => {
|
|
162
|
-
const [e, n] =
|
|
162
|
+
const [e, n] = A([]), [r, o] = A([]), { pages: i } = J(), { currentZoom: a } = Me(), { pageRotate: d } = qe();
|
|
163
163
|
return N(() => {
|
|
164
164
|
if (!i)
|
|
165
165
|
return;
|
|
@@ -175,7 +175,7 @@ import './assets/ToolbarLayout.css';const Pn = ye({
|
|
|
175
175
|
n((h) => [...l]), o((h) => [...m]);
|
|
176
176
|
}, [a, d, i]), /* @__PURE__ */ s(yn.Provider, { value: { widths: e, heights: r, setWidths: n, setHeights: o }, children: t });
|
|
177
177
|
}, xn = () => {
|
|
178
|
-
const { viewMode: t } =
|
|
178
|
+
const { viewMode: t } = We(), { scrollMode: e } = Fe(), { virtualScrollRef: n, virtualScrollableElementRef: r, pageScrollElementRef: o } = ot(), { setFocusedPage: i } = ae(), a = k(), { columnCount: d } = gn(), { widths: l, heights: m } = Ge(), h = k(e), b = k(t), p = k(d), { targetScrollPage: w } = vn();
|
|
179
179
|
N(() => {
|
|
180
180
|
n != null && n.scrollToItem && (a.current = n);
|
|
181
181
|
}, [n]), N(() => {
|
|
@@ -215,7 +215,7 @@ import './assets/ToolbarLayout.css';const Pn = ye({
|
|
|
215
215
|
i(v);
|
|
216
216
|
const g = v - 1;
|
|
217
217
|
let f = g, u = 0;
|
|
218
|
-
if (b.current ===
|
|
218
|
+
if (b.current === ze.DUAL_PAGE && h.current === ne.PAGE_SCROLLING) {
|
|
219
219
|
P(v, _);
|
|
220
220
|
return;
|
|
221
221
|
}
|
|
@@ -229,7 +229,7 @@ import './assets/ToolbarLayout.css';const Pn = ye({
|
|
|
229
229
|
if (_ === "smooth" && (w.current = v), h.current === ne.HORIZONTAL_SCROLLING) {
|
|
230
230
|
u = g;
|
|
231
231
|
const x = {
|
|
232
|
-
left:
|
|
232
|
+
left: $e(l, u),
|
|
233
233
|
top: 0
|
|
234
234
|
};
|
|
235
235
|
return c.scrollTo({
|
|
@@ -237,11 +237,11 @@ import './assets/ToolbarLayout.css';const Pn = ye({
|
|
|
237
237
|
behavior: _
|
|
238
238
|
});
|
|
239
239
|
}
|
|
240
|
-
if (b.current ===
|
|
240
|
+
if (b.current === ze.DUAL_PAGE) {
|
|
241
241
|
u = g % 2, f = Math.floor(g / 2);
|
|
242
242
|
const x = {
|
|
243
|
-
left:
|
|
244
|
-
top:
|
|
243
|
+
left: $e(l, u),
|
|
244
|
+
top: $e(m, f)
|
|
245
245
|
};
|
|
246
246
|
return c.scrollTo({
|
|
247
247
|
...x,
|
|
@@ -250,7 +250,7 @@ import './assets/ToolbarLayout.css';const Pn = ye({
|
|
|
250
250
|
}
|
|
251
251
|
const T = {
|
|
252
252
|
left: 0,
|
|
253
|
-
top:
|
|
253
|
+
top: $e(m, f)
|
|
254
254
|
};
|
|
255
255
|
return c.scrollTo({
|
|
256
256
|
...T,
|
|
@@ -268,7 +268,7 @@ import './assets/ToolbarLayout.css';const Pn = ye({
|
|
|
268
268
|
]
|
|
269
269
|
) };
|
|
270
270
|
}, Ar = (t = 1) => {
|
|
271
|
-
const [e, n] =
|
|
271
|
+
const [e, n] = A(t), [r, o] = A(0), { scrollToPage: i } = xn(), a = k(1), { viewMode: d } = We(), { scrollMode: l } = Fe(), { widths: m } = Ge(), { pagesRef: h } = me(), b = it(e, 100), p = E(
|
|
272
272
|
(f) => {
|
|
273
273
|
if (!/^[0-9]*$/g.test(f.toString()) || !f)
|
|
274
274
|
return { success: !1, currentPage: a.current };
|
|
@@ -287,11 +287,11 @@ import './assets/ToolbarLayout.css';const Pn = ye({
|
|
|
287
287
|
if (!h || u)
|
|
288
288
|
return !1;
|
|
289
289
|
const c = u ? m[f] : m[f - 1], T = u ? m[f + 1] : m[f];
|
|
290
|
-
return d ===
|
|
290
|
+
return d === ze.DUAL_PAGE && c + T < h.clientWidth;
|
|
291
291
|
}, [d, m, h, r]), v = E(() => {
|
|
292
292
|
let f = e - 1;
|
|
293
293
|
y(f) && (f = e - 2), P(f);
|
|
294
|
-
}, [P, e, d, l, y]), _ =
|
|
294
|
+
}, [P, e, d, l, y]), _ = W(() => d === ze.DUAL_PAGE && l === ne.PAGE_SCROLLING ? e === r - 1 : e === r, [e, r, d, l]), g = E(() => {
|
|
295
295
|
if (_)
|
|
296
296
|
return;
|
|
297
297
|
let f = e + 1;
|
|
@@ -306,7 +306,7 @@ import './assets/ToolbarLayout.css';const Pn = ye({
|
|
|
306
306
|
prevPage: v,
|
|
307
307
|
goToPage: P
|
|
308
308
|
};
|
|
309
|
-
}, In =
|
|
309
|
+
}, In = xe({
|
|
310
310
|
focusedPage: 0,
|
|
311
311
|
setFocusedPage: (t) => {
|
|
312
312
|
},
|
|
@@ -318,11 +318,11 @@ import './assets/ToolbarLayout.css';const Pn = ye({
|
|
|
318
318
|
},
|
|
319
319
|
nextPage: () => {
|
|
320
320
|
}
|
|
321
|
-
}),
|
|
322
|
-
const t =
|
|
321
|
+
}), ae = () => {
|
|
322
|
+
const t = Ie(In);
|
|
323
323
|
return typeof (t == null ? void 0 : t.focusedPage) > "u" && St.error("Please use this hooks inside children component of RPProvider"), t;
|
|
324
324
|
}, rc = ({ children: t }) => {
|
|
325
|
-
const { pdf: e } =
|
|
325
|
+
const { pdf: e } = J(), { focusedPage: n, totalPages: r, setFocusedPage: o, setTotalPages: i, goToPage: a, nextPage: d, prevPage: l } = Ar();
|
|
326
326
|
return N(() => {
|
|
327
327
|
e != null && e.numPages && (i(e.numPages), o(1));
|
|
328
328
|
}, [e, i, o]), /* @__PURE__ */ s(
|
|
@@ -342,11 +342,11 @@ import './assets/ToolbarLayout.css';const Pn = ye({
|
|
|
342
342
|
);
|
|
343
343
|
};
|
|
344
344
|
const Fr = () => {
|
|
345
|
-
const { pdf: t, pages: e } =
|
|
345
|
+
const { pdf: t, pages: e } = J(), [n, r] = A({
|
|
346
346
|
loadedPages: 0,
|
|
347
347
|
totalPages: 0,
|
|
348
348
|
percentage: 0
|
|
349
|
-
}), [o, i] =
|
|
349
|
+
}), [o, i] = A(!1), [a, d] = A(!1), [l, m] = A(null), h = k(!1);
|
|
350
350
|
N(() => {
|
|
351
351
|
h.current;
|
|
352
352
|
}, [h]);
|
|
@@ -369,7 +369,7 @@ const Fr = () => {
|
|
|
369
369
|
viewerPdfPage: T,
|
|
370
370
|
printResolution: C,
|
|
371
371
|
optionalContentConfigPromise: x,
|
|
372
|
-
printAnnotationStoragePromise:
|
|
372
|
+
printAnnotationStoragePromise: R
|
|
373
373
|
}) => {
|
|
374
374
|
if (h.current) {
|
|
375
375
|
p();
|
|
@@ -377,29 +377,29 @@ const Fr = () => {
|
|
|
377
377
|
}
|
|
378
378
|
const I = C / Bo.PDF;
|
|
379
379
|
f.width = Math.floor(T.width * I), f.height = Math.floor(T.height * I);
|
|
380
|
-
const
|
|
381
|
-
|
|
382
|
-
const [D,
|
|
380
|
+
const S = f.getContext("2d");
|
|
381
|
+
S.save(), S.fillStyle = "rgb(255, 255, 255)", S.fillRect(0, 0, f.width, f.height), S.restore();
|
|
382
|
+
const [D, z] = await Promise.all([
|
|
383
383
|
u.getPage(c),
|
|
384
|
-
|
|
384
|
+
R
|
|
385
385
|
]);
|
|
386
386
|
if (h.current) {
|
|
387
387
|
p();
|
|
388
388
|
return;
|
|
389
389
|
}
|
|
390
390
|
const M = {
|
|
391
|
-
canvasContext:
|
|
391
|
+
canvasContext: S,
|
|
392
392
|
transform: [I, 0, 0, I, 0, 0],
|
|
393
393
|
viewport: D.getViewport({ scale: 1, rotation: T.rotation }),
|
|
394
394
|
intent: "print",
|
|
395
395
|
annotationMode: jo.ENABLE_STORAGE,
|
|
396
396
|
optionalContentConfigPromise: x,
|
|
397
|
-
printAnnotationStorage:
|
|
397
|
+
printAnnotationStorage: z
|
|
398
398
|
};
|
|
399
399
|
try {
|
|
400
400
|
return D.render(M).promise;
|
|
401
|
-
} catch (
|
|
402
|
-
throw
|
|
401
|
+
} catch (L) {
|
|
402
|
+
throw L instanceof Ko || console.error(L), L;
|
|
403
403
|
}
|
|
404
404
|
}, y = E(() => {
|
|
405
405
|
const f = window.print;
|
|
@@ -433,8 +433,8 @@ const Fr = () => {
|
|
|
433
433
|
c.classList.add("rp-print-zone");
|
|
434
434
|
const T = document.createElement("style"), C = u.get(1);
|
|
435
435
|
if (C) {
|
|
436
|
-
const { width: x, height:
|
|
437
|
-
T.innerHTML = `@page { size: ${x}px ${
|
|
436
|
+
const { width: x, height: R } = C == null ? void 0 : C.page.getViewport({ scale: 1 });
|
|
437
|
+
T.innerHTML = `@page { size: ${x}px ${R}px }`;
|
|
438
438
|
}
|
|
439
439
|
return c.appendChild(T), c.append(...f), c;
|
|
440
440
|
}, g = E(async () => {
|
|
@@ -447,12 +447,12 @@ const Fr = () => {
|
|
|
447
447
|
const T = t.getOptionalContentConfig({ intent: "print" }), C = Promise.resolve(
|
|
448
448
|
t.annotationStorage.print ?? void 0
|
|
449
449
|
), x = e.size;
|
|
450
|
-
for (const [I,
|
|
450
|
+
for (const [I, S] of e) {
|
|
451
451
|
if (h.current) {
|
|
452
452
|
p();
|
|
453
453
|
return;
|
|
454
454
|
}
|
|
455
|
-
const D =
|
|
455
|
+
const D = S.page.getViewport({ scale: 1 });
|
|
456
456
|
if (await P({
|
|
457
457
|
scratchCanvas: f,
|
|
458
458
|
pdfDocument: t,
|
|
@@ -465,8 +465,8 @@ const Fr = () => {
|
|
|
465
465
|
p();
|
|
466
466
|
return;
|
|
467
467
|
}
|
|
468
|
-
const
|
|
469
|
-
u.push(
|
|
468
|
+
const z = await v(f);
|
|
469
|
+
u.push(z);
|
|
470
470
|
const M = parseFloat((u.length / x * 100).toFixed(2));
|
|
471
471
|
r({
|
|
472
472
|
loadedPages: I,
|
|
@@ -478,8 +478,8 @@ const Fr = () => {
|
|
|
478
478
|
p();
|
|
479
479
|
return;
|
|
480
480
|
}
|
|
481
|
-
const
|
|
482
|
-
document.body.appendChild(
|
|
481
|
+
const R = _(u, e);
|
|
482
|
+
document.body.appendChild(R), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), i(!0), await y();
|
|
483
483
|
} catch (c) {
|
|
484
484
|
d(!0), c instanceof Error && m(c);
|
|
485
485
|
} finally {
|
|
@@ -501,7 +501,7 @@ const Fr = () => {
|
|
|
501
501
|
isError: a,
|
|
502
502
|
error: l
|
|
503
503
|
};
|
|
504
|
-
}, Sn =
|
|
504
|
+
}, Sn = xe({
|
|
505
505
|
print: () => {
|
|
506
506
|
},
|
|
507
507
|
cancel: () => {
|
|
@@ -519,7 +519,7 @@ const Fr = () => {
|
|
|
519
519
|
}
|
|
520
520
|
}
|
|
521
521
|
}), ic = ({ children: t }) => {
|
|
522
|
-
const [e, n] =
|
|
522
|
+
const [e, n] = A(null), [r, o] = A(null), { print: i, cancel: a, progress: d, isComplete: l, isError: m, error: h } = Fr(), b = E((v) => {
|
|
523
523
|
v && typeof v == "function" && o(() => v);
|
|
524
524
|
}, []), p = (v) => {
|
|
525
525
|
h && v(h);
|
|
@@ -550,12 +550,12 @@ const Fr = () => {
|
|
|
550
550
|
};
|
|
551
551
|
return /* @__PURE__ */ s(Sn.Provider, { value: y, children: t });
|
|
552
552
|
}, st = () => {
|
|
553
|
-
const t =
|
|
553
|
+
const t = Ie(Sn);
|
|
554
554
|
if (!t)
|
|
555
555
|
throw new Error("usePrintContext must be used within a PrintProvider");
|
|
556
556
|
return t;
|
|
557
557
|
}, Wr = () => {
|
|
558
|
-
const [t, e] =
|
|
558
|
+
const [t, e] = A({}), { pages: n } = J(), r = W(() => Object.keys(t).length, [t]), o = E(
|
|
559
559
|
(a) => {
|
|
560
560
|
if (!n.size)
|
|
561
561
|
return;
|
|
@@ -595,7 +595,7 @@ const Fr = () => {
|
|
|
595
595
|
[n]
|
|
596
596
|
);
|
|
597
597
|
return { thumbnailPages: t, addPage: i, addToPage: o, thumbnailLength: r };
|
|
598
|
-
}, Ln =
|
|
598
|
+
}, Ln = xe({
|
|
599
599
|
thumbnailPages: {},
|
|
600
600
|
addPage: (t) => {
|
|
601
601
|
},
|
|
@@ -605,11 +605,11 @@ const Fr = () => {
|
|
|
605
605
|
setActive: (t) => {
|
|
606
606
|
},
|
|
607
607
|
active: !1
|
|
608
|
-
}), Rn = () =>
|
|
608
|
+
}), Rn = () => Ie(Ln), sc = ({
|
|
609
609
|
children: t,
|
|
610
610
|
initialThumbnailsVisible: e
|
|
611
611
|
}) => {
|
|
612
|
-
const { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: i } = Wr(), [a, d] =
|
|
612
|
+
const { thumbnailPages: n, addPage: r, addToPage: o, thumbnailLength: i } = Wr(), [a, d] = A(e);
|
|
613
613
|
return /* @__PURE__ */ s(
|
|
614
614
|
Ln.Provider,
|
|
615
615
|
{
|
|
@@ -618,40 +618,40 @@ const Fr = () => {
|
|
|
618
618
|
}
|
|
619
619
|
);
|
|
620
620
|
}, Mr = (t = {}, e = "") => {
|
|
621
|
-
const [n, r] =
|
|
621
|
+
const [n, r] = A(e), [o, i] = A(!1), { pdf: a, pages: d } = J(), { widths: l, heights: m } = Ge(), h = k(!n), { currentZoom: b } = Me(), [p, w] = A([]), { setFocusedPage: P } = ae(), { columnCount: y } = We(), { pageRotate: v } = qe(), [_, g] = A(0), { pageScrollElementRef: f, virtualScrollableElementRef: u } = ot(), { scrollMode: c } = Fe(), { pagesRef: T } = me(), [C, x] = A(null), R = k({}), I = W(() => _ === 0 ? null : p[_ - 1], [_, p]), S = W(() => p.length, [p]);
|
|
622
622
|
N(() => {
|
|
623
623
|
if (!I || !d)
|
|
624
624
|
return;
|
|
625
|
-
const
|
|
626
|
-
if (!
|
|
625
|
+
const L = u || f;
|
|
626
|
+
if (!L || !T)
|
|
627
627
|
return;
|
|
628
628
|
const O = d.get(I.page);
|
|
629
629
|
if (c === ne.PAGE_SCROLLING && P(I.page), !O)
|
|
630
630
|
return;
|
|
631
|
-
let
|
|
631
|
+
let F = 0, $ = 0;
|
|
632
632
|
if (c === ne.VERTICAL_SCROLLING) {
|
|
633
|
-
const
|
|
634
|
-
|
|
633
|
+
const re = I.page - 1, Q = y, ie = re % Q, he = Math.floor(re / Q);
|
|
634
|
+
F = $e(m, he), $ = $e(l, ie);
|
|
635
635
|
}
|
|
636
|
-
c === ne.HORIZONTAL_SCROLLING && (
|
|
636
|
+
c === ne.HORIZONTAL_SCROLLING && ($ = l.slice(0, I.page - 1).reduce((re, Q) => re + Q, 0));
|
|
637
637
|
const G = {
|
|
638
638
|
height: m[I.page - 1],
|
|
639
639
|
width: l[I.page - 1]
|
|
640
|
-
},
|
|
640
|
+
}, B = {
|
|
641
641
|
top: G.height / 2,
|
|
642
642
|
left: G.width / 2
|
|
643
|
-
}, j = v[I.page], { leftInPage:
|
|
643
|
+
}, j = v[I.page], { leftInPage: V, topInPage: ee } = ur(
|
|
644
644
|
G,
|
|
645
|
-
|
|
645
|
+
B,
|
|
646
646
|
I.rect,
|
|
647
647
|
b,
|
|
648
648
|
j
|
|
649
|
-
),
|
|
650
|
-
left: Math.max(
|
|
651
|
-
top: Math.max(
|
|
649
|
+
), q = $ + V, Y = F + ee, oe = {
|
|
650
|
+
left: Math.max(q, 0),
|
|
651
|
+
top: Math.max(Y, 0)
|
|
652
652
|
};
|
|
653
|
-
|
|
654
|
-
...
|
|
653
|
+
L.scrollTo({
|
|
654
|
+
...oe,
|
|
655
655
|
behavior: "smooth"
|
|
656
656
|
});
|
|
657
657
|
}, [
|
|
@@ -666,38 +666,38 @@ const Fr = () => {
|
|
|
666
666
|
T
|
|
667
667
|
]);
|
|
668
668
|
const D = E(() => {
|
|
669
|
-
g((
|
|
670
|
-
}, [
|
|
671
|
-
g((
|
|
672
|
-
}, [
|
|
673
|
-
if (!
|
|
669
|
+
g((L) => S ? L + 1 > S ? 1 : L + 1 : 0);
|
|
670
|
+
}, [S]), z = E(() => {
|
|
671
|
+
g((L) => S ? L - 1 <= 0 ? S : L - 1 : 0);
|
|
672
|
+
}, [S]), M = E(async (L) => {
|
|
673
|
+
if (!L)
|
|
674
674
|
return {};
|
|
675
|
-
const O =
|
|
676
|
-
for (let
|
|
675
|
+
const O = L.numPages, F = {};
|
|
676
|
+
for (let $ = 1; $ <= O; $++) {
|
|
677
677
|
if (h.current)
|
|
678
678
|
throw "close pop over";
|
|
679
|
-
const G = await
|
|
680
|
-
|
|
679
|
+
const G = await L.getPage($);
|
|
680
|
+
F[$.toString()] = await G.getTextContent();
|
|
681
681
|
}
|
|
682
|
-
return
|
|
682
|
+
return F;
|
|
683
683
|
}, []);
|
|
684
684
|
return N(() => {
|
|
685
685
|
if (!n) {
|
|
686
686
|
h.current = !0, w([]), g(0);
|
|
687
687
|
return;
|
|
688
688
|
}
|
|
689
|
-
h.current = !1, i(!0), w([]), g(0), M(a).then((
|
|
690
|
-
|
|
691
|
-
const
|
|
692
|
-
const
|
|
689
|
+
h.current = !1, i(!0), w([]), g(0), M(a).then((L) => {
|
|
690
|
+
R.current = L;
|
|
691
|
+
const F = Object.keys(L).reduce(($, G) => {
|
|
692
|
+
const B = Po(
|
|
693
693
|
[n],
|
|
694
|
-
|
|
694
|
+
L[G],
|
|
695
695
|
Number(G) - 1,
|
|
696
696
|
t
|
|
697
|
-
).map((j,
|
|
698
|
-
return [
|
|
697
|
+
).map((j, V) => ({ ...j, page: Number(G), pageMatchIdx: V }));
|
|
698
|
+
return [...$, ...B];
|
|
699
699
|
}, []);
|
|
700
|
-
w(
|
|
700
|
+
w(F), g(F.length ? 1 : 0);
|
|
701
701
|
}).catch(() => {
|
|
702
702
|
w([]), g(0);
|
|
703
703
|
}).finally(() => i(!1));
|
|
@@ -706,15 +706,15 @@ const Fr = () => {
|
|
|
706
706
|
setSearch: r,
|
|
707
707
|
loading: o,
|
|
708
708
|
matches: p,
|
|
709
|
-
totalMatches:
|
|
709
|
+
totalMatches: S,
|
|
710
710
|
currentMatchPosition: _,
|
|
711
711
|
currentMatch: I,
|
|
712
712
|
nextMatch: D,
|
|
713
|
-
prevMatch:
|
|
713
|
+
prevMatch: z,
|
|
714
714
|
currentMatchElement: C,
|
|
715
715
|
setCurrentMatchElement: x
|
|
716
716
|
};
|
|
717
|
-
}, En =
|
|
717
|
+
}, En = xe({
|
|
718
718
|
search: "",
|
|
719
719
|
setSearch: (t) => {
|
|
720
720
|
},
|
|
@@ -736,7 +736,7 @@ const Fr = () => {
|
|
|
736
736
|
children: t,
|
|
737
737
|
initialSearch: e
|
|
738
738
|
}) => {
|
|
739
|
-
const [n, r] =
|
|
739
|
+
const [n, r] = A({}), {
|
|
740
740
|
loading: o,
|
|
741
741
|
setSearch: i,
|
|
742
742
|
totalMatches: a,
|
|
@@ -770,8 +770,8 @@ const Fr = () => {
|
|
|
770
770
|
children: t
|
|
771
771
|
}
|
|
772
772
|
);
|
|
773
|
-
}, Dt = () =>
|
|
774
|
-
const [e, n] =
|
|
773
|
+
}, Dt = () => Ie(En), Nn = xe(void 0), cc = ({ children: t }) => {
|
|
774
|
+
const [e, n] = A({}), { widths: r, heights: o } = Ge(), { pageRotate: i } = qe(), { currentZoom: a } = Me(), d = E(
|
|
775
775
|
(h, b) => {
|
|
776
776
|
n((p) => {
|
|
777
777
|
const w = { width: r[h], height: o[h] };
|
|
@@ -807,7 +807,7 @@ const Fr = () => {
|
|
|
807
807
|
);
|
|
808
808
|
}, ft = () => {
|
|
809
809
|
}, kr = () => {
|
|
810
|
-
const t =
|
|
810
|
+
const t = Ie(Nn), { type: e, validating: n } = Lo(), r = k(0), o = W(() => {
|
|
811
811
|
if (n !== !1)
|
|
812
812
|
return {
|
|
813
813
|
updateElement: ft,
|
|
@@ -832,10 +832,10 @@ const Fr = () => {
|
|
|
832
832
|
if (!t)
|
|
833
833
|
throw new Error("useElementPageContext must be used within a ElementPageProvider");
|
|
834
834
|
return o || t;
|
|
835
|
-
}, On =
|
|
836
|
-
const e = k(!1), [n, r] =
|
|
835
|
+
}, On = xe(null), lc = ({ children: t }) => {
|
|
836
|
+
const e = k(!1), [n, r] = A([]), o = E((l) => {
|
|
837
837
|
r((m) => [...m, { id: l.page.pageNumber.toString(), data: l, priority: 0 }]);
|
|
838
|
-
}, []), i =
|
|
838
|
+
}, []), i = W(() => new Eo(o), [o]), { focusedPage: a } = ae(), d = E((l) => (e.current = !0, No(
|
|
839
839
|
l.data.page,
|
|
840
840
|
l.data.canvasElem,
|
|
841
841
|
l.data.options
|
|
@@ -858,11 +858,11 @@ const Fr = () => {
|
|
|
858
858
|
l();
|
|
859
859
|
}, [i, d, n]), /* @__PURE__ */ s(On.Provider, { value: i, children: t });
|
|
860
860
|
}, Dn = () => {
|
|
861
|
-
const t =
|
|
861
|
+
const t = Ie(On);
|
|
862
862
|
if (!t)
|
|
863
863
|
throw new Error("RenderQueue not found");
|
|
864
864
|
return t;
|
|
865
|
-
},
|
|
865
|
+
}, fe = {
|
|
866
866
|
"rp-pages": "_rp-pages_6vux6_1",
|
|
867
867
|
"rp-pages-horizontal-scroll": "_rp-pages-horizontal-scroll_6vux6_6",
|
|
868
868
|
"rp-pages-container": "_rp-pages-container_6vux6_10",
|
|
@@ -876,7 +876,7 @@ const Fr = () => {
|
|
|
876
876
|
"rp-page": "_rp-page_14ohm_1",
|
|
877
877
|
"rp-loader-wrapper": "_rp-loader-wrapper_14ohm_15"
|
|
878
878
|
}, Hr = (t) => {
|
|
879
|
-
const { pageNumber: e, onLoaded: n, onLoading: r } = t, o = k(null), { pages: i } =
|
|
879
|
+
const { pageNumber: e, onLoaded: n, onLoading: r } = t, o = k(null), { pages: i } = J(), { pageRotate: a } = qe(), d = k(), { currentZoom: l } = Me(), m = Dn(), h = k(`page-${e}`);
|
|
880
880
|
return N(() => {
|
|
881
881
|
if (!i || l === 0)
|
|
882
882
|
return;
|
|
@@ -904,14 +904,14 @@ const Fr = () => {
|
|
|
904
904
|
m.removeQueue(h.current);
|
|
905
905
|
};
|
|
906
906
|
}, [i, e, a, l, r, n, m]), /* @__PURE__ */ s("canvas", { "data-rp": `page-${e}-canvas`, ref: o });
|
|
907
|
-
}, $r = "_selecting_usdup_9",
|
|
907
|
+
}, $r = "_selecting_usdup_9", we = {
|
|
908
908
|
"rp-text-layer": "_rp-text-layer_usdup_1",
|
|
909
909
|
selecting: $r,
|
|
910
910
|
"rp-text-layer-text": "_rp-text-layer-text_usdup_39"
|
|
911
911
|
}, qr = (t) => {
|
|
912
|
-
const { pageNumber: e } = t, { pages: n } =
|
|
912
|
+
const { pageNumber: e } = t, { pages: n } = J(), r = k(null), { matches: o, currentMatch: i, setCurrentMatchElement: a } = Dt(), [d, l] = A(
|
|
913
913
|
[]
|
|
914
|
-
), m = k(), h = k(), b = k([]), p =
|
|
914
|
+
), m = k(), h = k(), b = k([]), p = W(() => o.filter((f) => f.pageIndex === e - 1), [o, e]), w = E(
|
|
915
915
|
(f, u, c = !1) => {
|
|
916
916
|
if (c && yo(f, u), !p.length) {
|
|
917
917
|
b.current = [], l([]);
|
|
@@ -929,7 +929,7 @@ const Fr = () => {
|
|
|
929
929
|
const { signal: u } = P.current, c = () => {
|
|
930
930
|
v().forEach((C) => {
|
|
931
931
|
const x = C.querySelector(".endOfContent");
|
|
932
|
-
x && (C.appendChild(x), x.style.width = "", x.style.height = "", C.classList.remove(
|
|
932
|
+
x && (C.appendChild(x), x.style.width = "", x.style.height = "", C.classList.remove(we.selecting));
|
|
933
933
|
});
|
|
934
934
|
};
|
|
935
935
|
document.addEventListener(
|
|
@@ -961,7 +961,7 @@ const Fr = () => {
|
|
|
961
961
|
document.addEventListener(
|
|
962
962
|
"selectionchange",
|
|
963
963
|
() => {
|
|
964
|
-
var M,
|
|
964
|
+
var M, L;
|
|
965
965
|
const C = document.getSelection();
|
|
966
966
|
if (!C)
|
|
967
967
|
return;
|
|
@@ -971,26 +971,26 @@ const Fr = () => {
|
|
|
971
971
|
}
|
|
972
972
|
const x = /* @__PURE__ */ new Set();
|
|
973
973
|
for (let O = 0; O < C.rangeCount; O++) {
|
|
974
|
-
const
|
|
975
|
-
v().forEach((
|
|
976
|
-
|
|
974
|
+
const F = C.getRangeAt(O);
|
|
975
|
+
v().forEach(($) => {
|
|
976
|
+
F.intersectsNode($) && !x.has($) && x.add($);
|
|
977
977
|
});
|
|
978
978
|
}
|
|
979
979
|
v().forEach((O) => {
|
|
980
980
|
if (x.has(O))
|
|
981
|
-
O.classList.add(
|
|
981
|
+
O.classList.add(we.selecting);
|
|
982
982
|
else {
|
|
983
|
-
const
|
|
984
|
-
|
|
983
|
+
const F = O.querySelector(".endOfContent");
|
|
984
|
+
F && (O.appendChild(F), F.style.width = "", F.style.height = "", O.classList.remove(we.selecting));
|
|
985
985
|
}
|
|
986
986
|
});
|
|
987
|
-
const
|
|
988
|
-
let
|
|
989
|
-
|
|
990
|
-
const D = (M =
|
|
991
|
-
|
|
992
|
-
),
|
|
993
|
-
|
|
987
|
+
const R = C.getRangeAt(0);
|
|
988
|
+
let S = T && (R.compareBoundaryPoints(Range.END_TO_END, T) === 0 || R.compareBoundaryPoints(Range.START_TO_END, T) === 0) ? R.startContainer : R.endContainer;
|
|
989
|
+
S.nodeType === Node.TEXT_NODE && (S = S.parentNode);
|
|
990
|
+
const D = (M = S.parentElement) == null ? void 0 : M.closest(
|
|
991
|
+
we["rp-text-layer"]
|
|
992
|
+
), z = D == null ? void 0 : D.querySelector(".endOfContent");
|
|
993
|
+
z && D && (z.style.width = D.style.width, z.style.height = D.style.height, (L = S.parentElement) == null || L.insertBefore(z, S.nextSibling)), T = R.cloneRange();
|
|
994
994
|
},
|
|
995
995
|
{ signal: u }
|
|
996
996
|
);
|
|
@@ -999,9 +999,9 @@ const Fr = () => {
|
|
|
999
999
|
(u = P.current) == null || u.abort(), P.current = void 0;
|
|
1000
1000
|
}), [v]);
|
|
1001
1001
|
const _ = E(() => {
|
|
1002
|
-
r.current && r.current.classList.add(
|
|
1002
|
+
r.current && r.current.classList.add(we.selecting);
|
|
1003
1003
|
}, []), g = E(() => {
|
|
1004
|
-
r.current && r.current.classList.remove(
|
|
1004
|
+
r.current && r.current.classList.remove(we.selecting);
|
|
1005
1005
|
}, []);
|
|
1006
1006
|
return N(() => {
|
|
1007
1007
|
if (b.current.forEach((c) => {
|
|
@@ -1030,14 +1030,14 @@ const Fr = () => {
|
|
|
1030
1030
|
container: u
|
|
1031
1031
|
}), h.current = c, u && (u.innerText = ""), m.current.render();
|
|
1032
1032
|
}).then(() => {
|
|
1033
|
-
var x,
|
|
1033
|
+
var x, R;
|
|
1034
1034
|
[].slice.call(u.children).forEach((I) => {
|
|
1035
|
-
I.classList.add(
|
|
1035
|
+
I.classList.add(we["rp-text-layer-text"]), I.setAttribute("data-rp", "rp-text-layer-text");
|
|
1036
1036
|
});
|
|
1037
1037
|
const T = (x = m.current) == null ? void 0 : x.textDivs;
|
|
1038
1038
|
T && h.current && w(h.current, T);
|
|
1039
1039
|
const C = document.createElement("div");
|
|
1040
|
-
C.className = "endOfContent", (
|
|
1040
|
+
C.className = "endOfContent", (R = r.current) == null || R.appendChild(C);
|
|
1041
1041
|
}).catch(() => {
|
|
1042
1042
|
}), () => {
|
|
1043
1043
|
var c;
|
|
@@ -1046,7 +1046,7 @@ const Fr = () => {
|
|
|
1046
1046
|
}, [n, e]), N(() => {
|
|
1047
1047
|
var c;
|
|
1048
1048
|
[].slice.call(r.current.children).forEach((T) => {
|
|
1049
|
-
T.classList.add(
|
|
1049
|
+
T.classList.add(we["rp-text-layer-text"]);
|
|
1050
1050
|
});
|
|
1051
1051
|
const u = (c = m.current) == null ? void 0 : c.textDivs;
|
|
1052
1052
|
u && h.current && w(h.current, u, !0);
|
|
@@ -1054,7 +1054,7 @@ const Fr = () => {
|
|
|
1054
1054
|
"div",
|
|
1055
1055
|
{
|
|
1056
1056
|
"data-rp": `page-${e}-textLayer`,
|
|
1057
|
-
className:
|
|
1057
|
+
className: we["rp-text-layer"],
|
|
1058
1058
|
ref: r,
|
|
1059
1059
|
onMouseDown: _,
|
|
1060
1060
|
onMouseUp: g
|
|
@@ -1065,7 +1065,7 @@ const Fr = () => {
|
|
|
1065
1065
|
};
|
|
1066
1066
|
let Vr = "https://unpkg.com/pdfjs-dist@4.4.168/web/images/";
|
|
1067
1067
|
const Ur = (t) => {
|
|
1068
|
-
const { pageNumber: e } = t, n = k(null), { pages: r, pdf: o } =
|
|
1068
|
+
const { pageNumber: e } = t, n = k(null), { pages: r, pdf: o } = J(), i = k(), [a, d] = A(), { setFocusedPage: l, goToPage: m } = ae(), { scrollMode: h } = Fe(), { print: b } = st(), { download: p } = Qn(), w = W(() => r.get(e), [r, e]), P = W(() => w == null ? void 0 : w.page.getViewport(), [w]);
|
|
1069
1069
|
N(() => {
|
|
1070
1070
|
i.current && (i.current.div.replaceChildren(), i.current = void 0);
|
|
1071
1071
|
}, [o]), N(() => {
|
|
@@ -1153,7 +1153,7 @@ const Ur = (t) => {
|
|
|
1153
1153
|
}, Zr = {
|
|
1154
1154
|
"rp-text-highlight": "_rp-text-highlight_jdkf8_1"
|
|
1155
1155
|
}, Br = ({ pageNumber: t, viewport: e }) => {
|
|
1156
|
-
const [n, r] =
|
|
1156
|
+
const [n, r] = A(), { pages: o } = J(), { highlightKeywords: i } = So(), a = !0, d = k(null), [l, m] = A(null), [h, b] = A([]);
|
|
1157
1157
|
N(() => {
|
|
1158
1158
|
d.current && m(d.current.parentElement);
|
|
1159
1159
|
}, [d]), N(() => {
|
|
@@ -1165,7 +1165,7 @@ const Ur = (t) => {
|
|
|
1165
1165
|
r(u);
|
|
1166
1166
|
})();
|
|
1167
1167
|
}, [o, t]);
|
|
1168
|
-
const p =
|
|
1168
|
+
const p = W(() => i ? i.map((g) => {
|
|
1169
1169
|
var f, u;
|
|
1170
1170
|
return {
|
|
1171
1171
|
...or(g.keyword, (f = g.options) == null ? void 0 : f.matchCase, (u = g.options) == null ? void 0 : u.wholeWords),
|
|
@@ -1182,9 +1182,9 @@ const Ur = (t) => {
|
|
|
1182
1182
|
c(T);
|
|
1183
1183
|
return;
|
|
1184
1184
|
}
|
|
1185
|
-
new MutationObserver((x,
|
|
1185
|
+
new MutationObserver((x, R) => {
|
|
1186
1186
|
const I = g.querySelector(u);
|
|
1187
|
-
I && (c(I),
|
|
1187
|
+
I && (c(I), R.disconnect());
|
|
1188
1188
|
}).observe(g, { childList: !0, subtree: !0 });
|
|
1189
1189
|
});
|
|
1190
1190
|
}
|
|
@@ -1206,25 +1206,25 @@ const Ur = (t) => {
|
|
|
1206
1206
|
});
|
|
1207
1207
|
}
|
|
1208
1208
|
const y = (g, f, u, c) => {
|
|
1209
|
-
var
|
|
1209
|
+
var B;
|
|
1210
1210
|
const T = document.createRange(), C = u.firstChild;
|
|
1211
1211
|
if (!C || C.nodeType !== Node.TEXT_NODE)
|
|
1212
1212
|
return null;
|
|
1213
|
-
const x = ((
|
|
1214
|
-
if (
|
|
1213
|
+
const x = ((B = C.textContent) == null ? void 0 : B.length) ?? 0, R = c[0].charIdxInSpan, I = c.length === 1 ? R : c[c.length - 1].charIdxInSpan;
|
|
1214
|
+
if (R > x || I + 1 > x)
|
|
1215
1215
|
return null;
|
|
1216
|
-
T.setStart(C,
|
|
1217
|
-
const
|
|
1218
|
-
|
|
1219
|
-
const D =
|
|
1220
|
-
return ir(
|
|
1216
|
+
T.setStart(C, R), T.setEnd(C, I + 1);
|
|
1217
|
+
const S = document.createElement("span");
|
|
1218
|
+
S.style.width = "auto", T.surroundContents(S);
|
|
1219
|
+
const D = S.getBoundingClientRect(), z = g.getBoundingClientRect(), M = z.height, L = z.width, O = 100 * (D.left - z.left) / L, F = 100 * (D.top - z.top) / M, $ = 100 * D.height / M, G = 100 * D.width / L;
|
|
1220
|
+
return ir(S), {
|
|
1221
1221
|
keywordStr: f,
|
|
1222
1222
|
left: O,
|
|
1223
|
-
top:
|
|
1224
|
-
height:
|
|
1223
|
+
top: F,
|
|
1224
|
+
height: $,
|
|
1225
1225
|
width: G,
|
|
1226
1226
|
pageHeight: M,
|
|
1227
|
-
pageWidth:
|
|
1227
|
+
pageWidth: L
|
|
1228
1228
|
};
|
|
1229
1229
|
};
|
|
1230
1230
|
async function v(g, f) {
|
|
@@ -1234,9 +1234,9 @@ const Ur = (t) => {
|
|
|
1234
1234
|
const c = await P(u);
|
|
1235
1235
|
if (c.length) {
|
|
1236
1236
|
const T = c.map((x) => x.tagName === "BR" ? " " : x.textContent).reduce(
|
|
1237
|
-
(x,
|
|
1238
|
-
|
|
1239
|
-
char:
|
|
1237
|
+
(x, R, I) => x.concat(
|
|
1238
|
+
R.split("").map((S, D) => ({
|
|
1239
|
+
char: S,
|
|
1240
1240
|
charIdxInSpan: D,
|
|
1241
1241
|
spanIdx: I
|
|
1242
1242
|
}))
|
|
@@ -1256,43 +1256,43 @@ const Ur = (t) => {
|
|
|
1256
1256
|
const T = f.length;
|
|
1257
1257
|
if (!c.length || !T)
|
|
1258
1258
|
return [];
|
|
1259
|
-
const C = [], x = c.map((
|
|
1260
|
-
return p.forEach((
|
|
1261
|
-
const { keyword: I, regExp:
|
|
1259
|
+
const C = [], x = c.map((R) => R.char).join("");
|
|
1260
|
+
return p.forEach((R) => {
|
|
1261
|
+
const { keyword: I, regExp: S, wholeWords: D, color: z } = R, M = I;
|
|
1262
1262
|
if (!M.trim())
|
|
1263
1263
|
return;
|
|
1264
|
-
const
|
|
1264
|
+
const L = S.flags.indexOf("g") === -1 ? new RegExp(S, `${S.flags}g`) : S;
|
|
1265
1265
|
let O;
|
|
1266
|
-
const
|
|
1267
|
-
for (; (O =
|
|
1268
|
-
D && !Io(x, O.index, O[0].length) ||
|
|
1269
|
-
keyword:
|
|
1266
|
+
const F = [];
|
|
1267
|
+
for (; (O = L.exec(x)) !== null; )
|
|
1268
|
+
D && !Io(x, O.index, O[0].length) || F.push({
|
|
1269
|
+
keyword: L,
|
|
1270
1270
|
startIndex: O.index,
|
|
1271
|
-
endIndex:
|
|
1271
|
+
endIndex: L.lastIndex
|
|
1272
1272
|
});
|
|
1273
|
-
const
|
|
1273
|
+
const $ = F.map((G) => ({
|
|
1274
1274
|
keyword: G.keyword,
|
|
1275
1275
|
indexes: c.slice(G.startIndex, G.endIndex),
|
|
1276
|
-
color:
|
|
1276
|
+
color: z
|
|
1277
1277
|
}));
|
|
1278
|
-
for (const G of
|
|
1279
|
-
const
|
|
1280
|
-
(j,
|
|
1278
|
+
for (const G of $) {
|
|
1279
|
+
const B = G.indexes.reduce(
|
|
1280
|
+
(j, V) => (j[V.spanIdx] = (j[V.spanIdx] || []).concat([V]), j),
|
|
1281
1281
|
{}
|
|
1282
1282
|
);
|
|
1283
|
-
for (const j of Object.values(
|
|
1283
|
+
for (const j of Object.values(B))
|
|
1284
1284
|
if (j.length !== 1 || j[0].char.trim() !== "") {
|
|
1285
|
-
const
|
|
1285
|
+
const V = j, ee = u[V[0].spanIdx], q = y(
|
|
1286
1286
|
g,
|
|
1287
1287
|
M,
|
|
1288
|
-
|
|
1289
|
-
|
|
1288
|
+
ee,
|
|
1289
|
+
V
|
|
1290
1290
|
);
|
|
1291
|
-
if (
|
|
1292
|
-
const { left:
|
|
1293
|
-
if (C.find((
|
|
1291
|
+
if (q) {
|
|
1292
|
+
const { left: Y, top: oe } = q;
|
|
1293
|
+
if (C.find((Q) => Q.left === Y && Q.top === oe))
|
|
1294
1294
|
continue;
|
|
1295
|
-
C.push({ ...
|
|
1295
|
+
C.push({ ...q, highlightColor: G.color });
|
|
1296
1296
|
}
|
|
1297
1297
|
}
|
|
1298
1298
|
}
|
|
@@ -1307,7 +1307,7 @@ const Ur = (t) => {
|
|
|
1307
1307
|
console.error(f);
|
|
1308
1308
|
}
|
|
1309
1309
|
})();
|
|
1310
|
-
}, [a, i, t, n, e]), /* @__PURE__ */ s(
|
|
1310
|
+
}, [a, i, t, n, e]), /* @__PURE__ */ s(de, { children: /* @__PURE__ */ s("div", { ref: d, "data-rp": `page-${t}-textHighlightLayer`, children: h.map((g, f) => /* @__PURE__ */ s(
|
|
1311
1311
|
"div",
|
|
1312
1312
|
{
|
|
1313
1313
|
className: Zr["rp-text-highlight"],
|
|
@@ -1331,18 +1331,18 @@ const Ur = (t) => {
|
|
|
1331
1331
|
};
|
|
1332
1332
|
}, [t]), /* @__PURE__ */ s("div", { ref: e });
|
|
1333
1333
|
}, Kr = ({ pageNumber: t }) => {
|
|
1334
|
-
const { elementList: e } = kr(), n = k(null), r =
|
|
1334
|
+
const { elementList: e } = kr(), n = k(null), r = W(() => {
|
|
1335
1335
|
var o;
|
|
1336
1336
|
return (o = e[t]) == null ? void 0 : o.map((i, a) => i instanceof HTMLElement ? /* @__PURE__ */ s(jr, { child: i }, a) : /* @__PURE__ */ s("div", { children: i }, a));
|
|
1337
1337
|
}, [e, t]);
|
|
1338
|
-
return r ? /* @__PURE__ */ s(
|
|
1338
|
+
return r ? /* @__PURE__ */ s(de, { children: /* @__PURE__ */ s("div", { ref: n, "data-rp": `page-${t}-customElement`, children: r.map((o) => o) }) }) : null;
|
|
1339
1339
|
}, zt = rt((t, e) => {
|
|
1340
|
-
const { pageNumber: n, style: r, ...o } = t, { pages: i } =
|
|
1340
|
+
const { pageNumber: n, style: r, ...o } = t, { pages: i } = J(), { pageRotate: a } = qe(), { textLayer: d } = _o(), { currentZoom: l } = Me(), m = k(i.get(n)), [h, b] = A(!1), p = k(null), [w, P] = A({
|
|
1341
1341
|
width: 0,
|
|
1342
1342
|
height: 0
|
|
1343
1343
|
});
|
|
1344
1344
|
pn(e, () => p.current);
|
|
1345
|
-
const y =
|
|
1345
|
+
const y = W(() => m.current ? a[n] : 0, [n, a]);
|
|
1346
1346
|
N(() => {
|
|
1347
1347
|
if (i && (m.current = i.get(n), m.current)) {
|
|
1348
1348
|
const f = m.current.page.getViewport({
|
|
@@ -1352,7 +1352,7 @@ const Ur = (t) => {
|
|
|
1352
1352
|
P(f);
|
|
1353
1353
|
}
|
|
1354
1354
|
}, [i, n, y, l]);
|
|
1355
|
-
const v =
|
|
1355
|
+
const v = W(() => {
|
|
1356
1356
|
switch (y) {
|
|
1357
1357
|
case 90:
|
|
1358
1358
|
return `${w.width / 2}px ${w.width / 2}px`;
|
|
@@ -1487,15 +1487,15 @@ function ti(t) {
|
|
|
1487
1487
|
}
|
|
1488
1488
|
return vt;
|
|
1489
1489
|
}
|
|
1490
|
-
var
|
|
1490
|
+
var ke = null;
|
|
1491
1491
|
function Jt(t) {
|
|
1492
|
-
if (t === void 0 && (t = !1),
|
|
1492
|
+
if (t === void 0 && (t = !1), ke === null || t) {
|
|
1493
1493
|
var e = document.createElement("div"), n = e.style;
|
|
1494
1494
|
n.width = "50px", n.height = "50px", n.overflow = "scroll", n.direction = "rtl";
|
|
1495
1495
|
var r = document.createElement("div"), o = r.style;
|
|
1496
|
-
return o.width = "100px", o.height = "100px", e.appendChild(r), document.body.appendChild(e), e.scrollLeft > 0 ?
|
|
1496
|
+
return o.width = "100px", o.height = "100px", e.appendChild(r), document.body.appendChild(e), e.scrollLeft > 0 ? ke = "positive-descending" : (e.scrollLeft = 1, e.scrollLeft === 0 ? ke = "negative" : ke = "positive-ascending"), document.body.removeChild(e), ke;
|
|
1497
1497
|
}
|
|
1498
|
-
return
|
|
1498
|
+
return ke;
|
|
1499
1499
|
}
|
|
1500
1500
|
var ni = 150, oi = function(e) {
|
|
1501
1501
|
var n = e.columnIndex;
|
|
@@ -1518,35 +1518,35 @@ function ri(t) {
|
|
|
1518
1518
|
scrollTop: typeof c.props.initialScrollTop == "number" ? c.props.initialScrollTop : 0,
|
|
1519
1519
|
scrollUpdateWasRequested: !1,
|
|
1520
1520
|
verticalScrollDirection: "forward"
|
|
1521
|
-
}, c._callOnItemsRendered = void 0, c._callOnItemsRendered = gt(function(T, C, x,
|
|
1521
|
+
}, c._callOnItemsRendered = void 0, c._callOnItemsRendered = gt(function(T, C, x, R, I, S, D, z) {
|
|
1522
1522
|
return c.props.onItemsRendered({
|
|
1523
1523
|
overscanColumnStartIndex: T,
|
|
1524
1524
|
overscanColumnStopIndex: C,
|
|
1525
1525
|
overscanRowStartIndex: x,
|
|
1526
|
-
overscanRowStopIndex:
|
|
1526
|
+
overscanRowStopIndex: R,
|
|
1527
1527
|
visibleColumnStartIndex: I,
|
|
1528
|
-
visibleColumnStopIndex:
|
|
1528
|
+
visibleColumnStopIndex: S,
|
|
1529
1529
|
visibleRowStartIndex: D,
|
|
1530
|
-
visibleRowStopIndex:
|
|
1530
|
+
visibleRowStopIndex: z
|
|
1531
1531
|
});
|
|
1532
|
-
}), c._callOnScroll = void 0, c._callOnScroll = gt(function(T, C, x,
|
|
1532
|
+
}), c._callOnScroll = void 0, c._callOnScroll = gt(function(T, C, x, R, I) {
|
|
1533
1533
|
return c.props.onScroll({
|
|
1534
1534
|
horizontalScrollDirection: x,
|
|
1535
1535
|
scrollLeft: T,
|
|
1536
1536
|
scrollTop: C,
|
|
1537
|
-
verticalScrollDirection:
|
|
1537
|
+
verticalScrollDirection: R,
|
|
1538
1538
|
scrollUpdateWasRequested: I
|
|
1539
1539
|
});
|
|
1540
1540
|
}), c._getItemStyle = void 0, c._getItemStyle = function(T, C) {
|
|
1541
|
-
var x = c.props,
|
|
1542
|
-
if (D.hasOwnProperty(
|
|
1543
|
-
M = D[
|
|
1541
|
+
var x = c.props, R = x.columnWidth, I = x.direction, S = x.rowHeight, D = c._getItemStyleCache(y && R, y && I, y && S), z = T + ":" + C, M;
|
|
1542
|
+
if (D.hasOwnProperty(z))
|
|
1543
|
+
M = D[z];
|
|
1544
1544
|
else {
|
|
1545
|
-
var
|
|
1546
|
-
D[
|
|
1545
|
+
var L = n(c.props, C, c._instanceProps), O = I === "rtl";
|
|
1546
|
+
D[z] = M = {
|
|
1547
1547
|
position: "absolute",
|
|
1548
|
-
left: O ? void 0 :
|
|
1549
|
-
right: O ?
|
|
1548
|
+
left: O ? void 0 : L,
|
|
1549
|
+
right: O ? L : void 0,
|
|
1550
1550
|
top: b(c.props, T, c._instanceProps),
|
|
1551
1551
|
height: h(c.props, T, c._instanceProps),
|
|
1552
1552
|
width: i(c.props, C, c._instanceProps)
|
|
@@ -1556,28 +1556,28 @@ function ri(t) {
|
|
|
1556
1556
|
}, c._getItemStyleCache = void 0, c._getItemStyleCache = gt(function(T, C, x) {
|
|
1557
1557
|
return {};
|
|
1558
1558
|
}), c._onScroll = function(T) {
|
|
1559
|
-
var C = T.currentTarget, x = C.clientHeight,
|
|
1559
|
+
var C = T.currentTarget, x = C.clientHeight, R = C.clientWidth, I = C.scrollLeft, S = C.scrollTop, D = C.scrollHeight, z = C.scrollWidth;
|
|
1560
1560
|
c.setState(function(M) {
|
|
1561
|
-
if (M.scrollLeft === I && M.scrollTop ===
|
|
1561
|
+
if (M.scrollLeft === I && M.scrollTop === S)
|
|
1562
1562
|
return null;
|
|
1563
|
-
var
|
|
1564
|
-
if (
|
|
1563
|
+
var L = c.props.direction, O = I;
|
|
1564
|
+
if (L === "rtl")
|
|
1565
1565
|
switch (Jt()) {
|
|
1566
1566
|
case "negative":
|
|
1567
1567
|
O = -I;
|
|
1568
1568
|
break;
|
|
1569
1569
|
case "positive-descending":
|
|
1570
|
-
O =
|
|
1570
|
+
O = z - R - I;
|
|
1571
1571
|
break;
|
|
1572
1572
|
}
|
|
1573
|
-
O = Math.max(0, Math.min(O,
|
|
1574
|
-
var
|
|
1573
|
+
O = Math.max(0, Math.min(O, z - R));
|
|
1574
|
+
var F = Math.max(0, Math.min(S, D - x));
|
|
1575
1575
|
return {
|
|
1576
1576
|
isScrolling: !0,
|
|
1577
1577
|
horizontalScrollDirection: M.scrollLeft < I ? "forward" : "backward",
|
|
1578
1578
|
scrollLeft: O,
|
|
1579
|
-
scrollTop:
|
|
1580
|
-
verticalScrollDirection: M.scrollTop <
|
|
1579
|
+
scrollTop: F,
|
|
1580
|
+
verticalScrollDirection: M.scrollTop < S ? "forward" : "backward",
|
|
1581
1581
|
scrollUpdateWasRequested: !1
|
|
1582
1582
|
};
|
|
1583
1583
|
}, c._resetIsScrollingDebounced);
|
|
@@ -1610,12 +1610,12 @@ function ri(t) {
|
|
|
1610
1610
|
};
|
|
1611
1611
|
}, this._resetIsScrollingDebounced);
|
|
1612
1612
|
}, f.scrollToItem = function(c) {
|
|
1613
|
-
var T = c.align, C = T === void 0 ? "auto" : T, x = c.columnIndex,
|
|
1614
|
-
x !== void 0 && (x = Math.max(0, Math.min(x,
|
|
1615
|
-
var G = a(this.props, this._instanceProps),
|
|
1613
|
+
var T = c.align, C = T === void 0 ? "auto" : T, x = c.columnIndex, R = c.rowIndex, I = this.props, S = I.columnCount, D = I.height, z = I.rowCount, M = I.width, L = this.state, O = L.scrollLeft, F = L.scrollTop, $ = ti();
|
|
1614
|
+
x !== void 0 && (x = Math.max(0, Math.min(x, S - 1))), R !== void 0 && (R = Math.max(0, Math.min(R, z - 1)));
|
|
1615
|
+
var G = a(this.props, this._instanceProps), B = d(this.props, this._instanceProps), j = B > M ? $ : 0, V = G > D ? $ : 0;
|
|
1616
1616
|
this.scrollTo({
|
|
1617
|
-
scrollLeft: x !== void 0 ? l(this.props, x, C, O, this._instanceProps,
|
|
1618
|
-
scrollTop:
|
|
1617
|
+
scrollLeft: x !== void 0 ? l(this.props, x, C, O, this._instanceProps, V) : O,
|
|
1618
|
+
scrollTop: R !== void 0 ? m(this.props, R, C, F, this._instanceProps, j) : F
|
|
1619
1619
|
});
|
|
1620
1620
|
}, f.componentDidMount = function() {
|
|
1621
1621
|
var c = this.props, T = c.initialScrollLeft, C = c.initialScrollTop;
|
|
@@ -1625,8 +1625,8 @@ function ri(t) {
|
|
|
1625
1625
|
}
|
|
1626
1626
|
this._callPropsCallbacks();
|
|
1627
1627
|
}, f.componentDidUpdate = function() {
|
|
1628
|
-
var c = this.props.direction, T = this.state, C = T.scrollLeft, x = T.scrollTop,
|
|
1629
|
-
if (
|
|
1628
|
+
var c = this.props.direction, T = this.state, C = T.scrollLeft, x = T.scrollTop, R = T.scrollUpdateWasRequested;
|
|
1629
|
+
if (R && this._outerRef != null) {
|
|
1630
1630
|
var I = this._outerRef;
|
|
1631
1631
|
if (c === "rtl")
|
|
1632
1632
|
switch (Jt()) {
|
|
@@ -1637,8 +1637,8 @@ function ri(t) {
|
|
|
1637
1637
|
I.scrollLeft = C;
|
|
1638
1638
|
break;
|
|
1639
1639
|
default:
|
|
1640
|
-
var
|
|
1641
|
-
I.scrollLeft = D -
|
|
1640
|
+
var S = I.clientWidth, D = I.scrollWidth;
|
|
1641
|
+
I.scrollLeft = D - S - C;
|
|
1642
1642
|
break;
|
|
1643
1643
|
}
|
|
1644
1644
|
else
|
|
@@ -1649,67 +1649,67 @@ function ri(t) {
|
|
|
1649
1649
|
}, f.componentWillUnmount = function() {
|
|
1650
1650
|
this._resetIsScrollingTimeoutId !== null && Qt(this._resetIsScrollingTimeoutId);
|
|
1651
1651
|
}, f.render = function() {
|
|
1652
|
-
var c = this.props, T = c.children, C = c.className, x = c.columnCount,
|
|
1652
|
+
var c = this.props, T = c.children, C = c.className, x = c.columnCount, R = c.direction, I = c.height, S = c.innerRef, D = c.innerElementType, z = c.innerTagName, M = c.itemData, L = c.itemKey, O = L === void 0 ? oi : L, F = c.outerElementType, $ = c.outerTagName, G = c.rowCount, B = c.style, j = c.useIsScrolling, V = c.width, ee = this.state.isScrolling, q = this._getHorizontalRangeToRender(), Y = q[0], oe = q[1], re = this._getVerticalRangeToRender(), Q = re[0], ie = re[1], he = [];
|
|
1653
1653
|
if (x > 0 && G)
|
|
1654
|
-
for (var
|
|
1655
|
-
for (var
|
|
1656
|
-
|
|
1657
|
-
columnIndex:
|
|
1654
|
+
for (var Re = Q; Re <= ie; Re++)
|
|
1655
|
+
for (var Te = Y; Te <= oe; Te++)
|
|
1656
|
+
he.push(Ke(T, {
|
|
1657
|
+
columnIndex: Te,
|
|
1658
1658
|
data: M,
|
|
1659
|
-
isScrolling: j ?
|
|
1659
|
+
isScrolling: j ? ee : void 0,
|
|
1660
1660
|
key: O({
|
|
1661
|
-
columnIndex:
|
|
1661
|
+
columnIndex: Te,
|
|
1662
1662
|
data: M,
|
|
1663
|
-
rowIndex:
|
|
1663
|
+
rowIndex: Re
|
|
1664
1664
|
}),
|
|
1665
|
-
rowIndex:
|
|
1666
|
-
style: this._getItemStyle(
|
|
1665
|
+
rowIndex: Re,
|
|
1666
|
+
style: this._getItemStyle(Re, Te)
|
|
1667
1667
|
}));
|
|
1668
1668
|
var at = a(this.props, this._instanceProps), ct = d(this.props, this._instanceProps);
|
|
1669
|
-
return Ke(
|
|
1669
|
+
return Ke(F || $ || "div", {
|
|
1670
1670
|
className: C,
|
|
1671
1671
|
onScroll: this._onScroll,
|
|
1672
1672
|
ref: this._outerRefSetter,
|
|
1673
1673
|
style: Pt({
|
|
1674
1674
|
position: "relative",
|
|
1675
1675
|
height: I,
|
|
1676
|
-
width:
|
|
1676
|
+
width: V,
|
|
1677
1677
|
overflow: "auto",
|
|
1678
1678
|
WebkitOverflowScrolling: "touch",
|
|
1679
1679
|
willChange: "transform",
|
|
1680
|
-
direction:
|
|
1681
|
-
},
|
|
1682
|
-
}, Ke(D ||
|
|
1683
|
-
children:
|
|
1684
|
-
ref:
|
|
1680
|
+
direction: R
|
|
1681
|
+
}, B)
|
|
1682
|
+
}, Ke(D || z || "div", {
|
|
1683
|
+
children: he,
|
|
1684
|
+
ref: S,
|
|
1685
1685
|
style: {
|
|
1686
1686
|
height: at,
|
|
1687
|
-
pointerEvents:
|
|
1687
|
+
pointerEvents: ee ? "none" : void 0,
|
|
1688
1688
|
width: ct
|
|
1689
1689
|
}
|
|
1690
1690
|
}));
|
|
1691
1691
|
}, f._callPropsCallbacks = function() {
|
|
1692
|
-
var c = this.props, T = c.columnCount, C = c.onItemsRendered, x = c.onScroll,
|
|
1693
|
-
if (typeof C == "function" && T > 0 &&
|
|
1694
|
-
var I = this._getHorizontalRangeToRender(),
|
|
1695
|
-
this._callOnItemsRendered(
|
|
1692
|
+
var c = this.props, T = c.columnCount, C = c.onItemsRendered, x = c.onScroll, R = c.rowCount;
|
|
1693
|
+
if (typeof C == "function" && T > 0 && R > 0) {
|
|
1694
|
+
var I = this._getHorizontalRangeToRender(), S = I[0], D = I[1], z = I[2], M = I[3], L = this._getVerticalRangeToRender(), O = L[0], F = L[1], $ = L[2], G = L[3];
|
|
1695
|
+
this._callOnItemsRendered(S, D, O, F, z, M, $, G);
|
|
1696
1696
|
}
|
|
1697
1697
|
if (typeof x == "function") {
|
|
1698
|
-
var
|
|
1699
|
-
this._callOnScroll(
|
|
1698
|
+
var B = this.state, j = B.horizontalScrollDirection, V = B.scrollLeft, ee = B.scrollTop, q = B.scrollUpdateWasRequested, Y = B.verticalScrollDirection;
|
|
1699
|
+
this._callOnScroll(V, ee, j, Y, q);
|
|
1700
1700
|
}
|
|
1701
1701
|
}, f._getHorizontalRangeToRender = function() {
|
|
1702
|
-
var c = this.props, T = c.columnCount, C = c.overscanColumnCount, x = c.overscanColumnsCount,
|
|
1702
|
+
var c = this.props, T = c.columnCount, C = c.overscanColumnCount, x = c.overscanColumnsCount, R = c.overscanCount, I = c.rowCount, S = this.state, D = S.horizontalScrollDirection, z = S.isScrolling, M = S.scrollLeft, L = C || x || R || 1;
|
|
1703
1703
|
if (T === 0 || I === 0)
|
|
1704
1704
|
return [0, 0, 0, 0];
|
|
1705
|
-
var O = r(this.props, M, this._instanceProps),
|
|
1706
|
-
return [Math.max(0, O -
|
|
1705
|
+
var O = r(this.props, M, this._instanceProps), F = o(this.props, O, M, this._instanceProps), $ = !z || D === "backward" ? Math.max(1, L) : 1, G = !z || D === "forward" ? Math.max(1, L) : 1;
|
|
1706
|
+
return [Math.max(0, O - $), Math.max(0, Math.min(T - 1, F + G)), O, F];
|
|
1707
1707
|
}, f._getVerticalRangeToRender = function() {
|
|
1708
|
-
var c = this.props, T = c.columnCount, C = c.overscanCount, x = c.overscanRowCount,
|
|
1708
|
+
var c = this.props, T = c.columnCount, C = c.overscanCount, x = c.overscanRowCount, R = c.overscanRowsCount, I = c.rowCount, S = this.state, D = S.isScrolling, z = S.verticalScrollDirection, M = S.scrollTop, L = x || R || C || 1;
|
|
1709
1709
|
if (T === 0 || I === 0)
|
|
1710
1710
|
return [0, 0, 0, 0];
|
|
1711
|
-
var O = p(this.props, M, this._instanceProps),
|
|
1712
|
-
return [Math.max(0, O -
|
|
1711
|
+
var O = p(this.props, M, this._instanceProps), F = w(this.props, O, M, this._instanceProps), $ = !D || z === "backward" ? Math.max(1, L) : 1, G = !D || z === "forward" ? Math.max(1, L) : 1;
|
|
1712
|
+
return [Math.max(0, O - $), Math.max(0, Math.min(I - 1, F + G)), O, F];
|
|
1713
1713
|
}, g;
|
|
1714
1714
|
}(uo), e.defaultProps = {
|
|
1715
1715
|
direction: "ltr",
|
|
@@ -1750,7 +1750,7 @@ var ii = function(e, n) {
|
|
|
1750
1750
|
}
|
|
1751
1751
|
var m = r - a - 1, h = m * i;
|
|
1752
1752
|
return d + h;
|
|
1753
|
-
},
|
|
1753
|
+
}, _e = function(e, n, r, o) {
|
|
1754
1754
|
var i, a, d;
|
|
1755
1755
|
if (e === "column" ? (i = o.columnMetadataMap, a = n.columnWidth, d = o.lastMeasuredColumnIndex) : (i = o.rowMetadataMap, a = n.rowHeight, d = o.lastMeasuredRowIndex), r > d) {
|
|
1756
1756
|
var l = 0;
|
|
@@ -1775,18 +1775,18 @@ var ii = function(e, n) {
|
|
|
1775
1775
|
return d >= o ? Fn(e, n, r, a, 0, o) : si(e, n, r, Math.max(0, a), o);
|
|
1776
1776
|
}, Fn = function(e, n, r, o, i, a) {
|
|
1777
1777
|
for (; i <= o; ) {
|
|
1778
|
-
var d = i + Math.floor((o - i) / 2), l =
|
|
1778
|
+
var d = i + Math.floor((o - i) / 2), l = _e(e, n, d, r).offset;
|
|
1779
1779
|
if (l === a)
|
|
1780
1780
|
return d;
|
|
1781
1781
|
l < a ? i = d + 1 : l > a && (o = d - 1);
|
|
1782
1782
|
}
|
|
1783
1783
|
return i > 0 ? i - 1 : 0;
|
|
1784
1784
|
}, si = function(e, n, r, o, i) {
|
|
1785
|
-
for (var a = e === "column" ? n.columnCount : n.rowCount, d = 1; o < a &&
|
|
1785
|
+
for (var a = e === "column" ? n.columnCount : n.rowCount, d = 1; o < a && _e(e, n, o, r).offset < i; )
|
|
1786
1786
|
o += d, d *= 2;
|
|
1787
1787
|
return Fn(e, n, r, Math.min(o, a - 1), Math.floor(o / 2), i);
|
|
1788
1788
|
}, nn = function(e, n, r, o, i, a, d) {
|
|
1789
|
-
var l = e === "column" ? n.width : n.height, m =
|
|
1789
|
+
var l = e === "column" ? n.width : n.height, m = _e(e, n, r, a), h = e === "column" ? An(n, a) : zn(n, a), b = Math.max(0, Math.min(h - l, m.offset)), p = Math.max(0, m.offset - l + d + m.size);
|
|
1790
1790
|
switch (o === "smart" && (i >= p - l && i <= b + l ? o = "auto" : o = "center"), o) {
|
|
1791
1791
|
case "start":
|
|
1792
1792
|
return b;
|
|
@@ -1800,14 +1800,14 @@ var ii = function(e, n) {
|
|
|
1800
1800
|
}
|
|
1801
1801
|
}, ai = /* @__PURE__ */ ri({
|
|
1802
1802
|
getColumnOffset: function(e, n, r) {
|
|
1803
|
-
return
|
|
1803
|
+
return _e("column", e, n, r).offset;
|
|
1804
1804
|
},
|
|
1805
1805
|
getColumnStartIndexForOffset: function(e, n, r) {
|
|
1806
1806
|
return tn("column", e, r, n);
|
|
1807
1807
|
},
|
|
1808
1808
|
getColumnStopIndexForStartIndex: function(e, n, r, o) {
|
|
1809
|
-
for (var i = e.columnCount, a = e.width, d =
|
|
1810
|
-
h++, m +=
|
|
1809
|
+
for (var i = e.columnCount, a = e.width, d = _e("column", e, n, o), l = r + a, m = d.offset + d.size, h = n; h < i - 1 && m < l; )
|
|
1810
|
+
h++, m += _e("column", e, h, o).size;
|
|
1811
1811
|
return h;
|
|
1812
1812
|
},
|
|
1813
1813
|
getColumnWidth: function(e, n, r) {
|
|
@@ -1822,7 +1822,7 @@ var ii = function(e, n) {
|
|
|
1822
1822
|
return nn("row", e, n, r, o, i, a);
|
|
1823
1823
|
},
|
|
1824
1824
|
getRowOffset: function(e, n, r) {
|
|
1825
|
-
return
|
|
1825
|
+
return _e("row", e, n, r).offset;
|
|
1826
1826
|
},
|
|
1827
1827
|
getRowHeight: function(e, n, r) {
|
|
1828
1828
|
return r.rowMetadataMap[n].size;
|
|
@@ -1831,8 +1831,8 @@ var ii = function(e, n) {
|
|
|
1831
1831
|
return tn("row", e, r, n);
|
|
1832
1832
|
},
|
|
1833
1833
|
getRowStopIndexForStartIndex: function(e, n, r, o) {
|
|
1834
|
-
for (var i = e.rowCount, a = e.height, d =
|
|
1835
|
-
h++, m +=
|
|
1834
|
+
for (var i = e.rowCount, a = e.height, d = _e("row", e, n, o), l = r + a, m = d.offset + d.size, h = n; h < i - 1 && m < l; )
|
|
1835
|
+
h++, m += _e("row", e, h, o).size;
|
|
1836
1836
|
return h;
|
|
1837
1837
|
},
|
|
1838
1838
|
initInstanceProps: function(e, n) {
|
|
@@ -1886,7 +1886,7 @@ function di(t, e) {
|
|
|
1886
1886
|
return !on(n, o) && !on(r, i);
|
|
1887
1887
|
}
|
|
1888
1888
|
const ui = () => {
|
|
1889
|
-
const { viewMode: t } =
|
|
1889
|
+
const { viewMode: t } = We(), { scrollMode: e } = Fe(), { setColumnCount: n } = gn(), { virtualScrollableElementRef: r } = ot(), o = Ge(), i = W(() => o.heights.length, [o.heights]), a = W(() => e === ne.HORIZONTAL_SCROLLING ? i : t === ze.DUAL_PAGE ? 2 : 1, [t, e, e, i, r]), d = W(() => o.widths.reduce((P, y, v) => {
|
|
1890
1890
|
const _ = v % a;
|
|
1891
1891
|
return (!P[_] || y > P[_]) && (P[_] = y), P;
|
|
1892
1892
|
}, []), [o.widths, a]), l = E(
|
|
@@ -1908,7 +1908,7 @@ const ui = () => {
|
|
|
1908
1908
|
N(() => {
|
|
1909
1909
|
n(a);
|
|
1910
1910
|
}, [a, n]);
|
|
1911
|
-
const h =
|
|
1911
|
+
const h = W(() => e === ne.HORIZONTAL_SCROLLING || e === ne.PAGE_SCROLLING ? 1 : Math.round(i / a), [a, i, e]), b = W(() => o.heights.reduce((w, P) => w + P, 0) / o.heights.length || 0, [o]), p = W(() => o.widths.reduce((w, P) => w + P, 0) / o.heights.length || 0, [o]);
|
|
1912
1912
|
return {
|
|
1913
1913
|
rowCount: h,
|
|
1914
1914
|
rowHeight: m,
|
|
@@ -1919,10 +1919,10 @@ const ui = () => {
|
|
|
1919
1919
|
estimatedColumnWidth: p
|
|
1920
1920
|
};
|
|
1921
1921
|
};
|
|
1922
|
-
let
|
|
1923
|
-
typeof window < "u" ?
|
|
1922
|
+
let le;
|
|
1923
|
+
typeof window < "u" ? le = window : typeof self < "u" ? le = self : le = global;
|
|
1924
1924
|
let xt = null, It = null;
|
|
1925
|
-
const rn = 20, wt =
|
|
1925
|
+
const rn = 20, wt = le.clearTimeout, sn = le.setTimeout, _t = le.cancelAnimationFrame || le.mozCancelAnimationFrame || le.webkitCancelAnimationFrame, an = le.requestAnimationFrame || le.mozRequestAnimationFrame || le.webkitRequestAnimationFrame;
|
|
1926
1926
|
_t == null || an == null ? (xt = wt, It = function(e) {
|
|
1927
1927
|
return sn(e, rn);
|
|
1928
1928
|
}) : (xt = function([e, n]) {
|
|
@@ -1982,7 +1982,7 @@ function pi(t) {
|
|
|
1982
1982
|
p.attachEvent("onresize", w);
|
|
1983
1983
|
else {
|
|
1984
1984
|
if (!p.__resizeTriggers__) {
|
|
1985
|
-
const P = p.ownerDocument, y =
|
|
1985
|
+
const P = p.ownerDocument, y = le.getComputedStyle(p);
|
|
1986
1986
|
y && y.position === "static" && (p.style.position = "relative"), m(P), p.__resizeLast__ = {}, p.__resizeListeners__ = [], (p.__resizeTriggers__ = P.createElement("div")).className = "resize-triggers";
|
|
1987
1987
|
const v = P.createElement("div");
|
|
1988
1988
|
v.className = "expand-trigger", v.appendChild(P.createElement("div"));
|
|
@@ -2087,14 +2087,14 @@ class hi extends po {
|
|
|
2087
2087
|
}
|
|
2088
2088
|
}
|
|
2089
2089
|
const fi = hn(({ widths: t, heights: e }) => {
|
|
2090
|
-
const { focusedPage: n, totalPages: r } =
|
|
2090
|
+
const { focusedPage: n, totalPages: r } = ae(), o = W(() => {
|
|
2091
2091
|
const d = [], l = Math.ceil(n / 2) * 2 - 1;
|
|
2092
2092
|
if (d.push(l), l + 1 <= r) {
|
|
2093
2093
|
const m = l + 1;
|
|
2094
2094
|
d.push(m);
|
|
2095
2095
|
}
|
|
2096
2096
|
return d;
|
|
2097
|
-
}, [n, r]), i =
|
|
2097
|
+
}, [n, r]), i = W(() => {
|
|
2098
2098
|
const d = n % 2 === 1 ? n - 1 : n - 2, l = Math.floor(d / 2), m = e(l), h = t(d), b = t(d + 1);
|
|
2099
2099
|
return [
|
|
2100
2100
|
{
|
|
@@ -2110,14 +2110,14 @@ const fi = hn(({ widths: t, heights: e }) => {
|
|
|
2110
2110
|
height: m
|
|
2111
2111
|
}
|
|
2112
2112
|
];
|
|
2113
|
-
}, [t, e, o]), a =
|
|
2113
|
+
}, [t, e, o]), a = W(() => i.reduce((d, l) => d + Number(l.width || 0), 0), [i]);
|
|
2114
2114
|
return /* @__PURE__ */ s("div", { style: { width: a, position: "relative" }, children: o.map((d, l) => /* @__PURE__ */ s(zt, { style: i[l], pageNumber: d }, d)) });
|
|
2115
2115
|
}), mi = ({ widths: t, heights: e }) => {
|
|
2116
|
-
const { focusedPage: n } =
|
|
2116
|
+
const { focusedPage: n } = ae(), r = W(() => ({
|
|
2117
2117
|
position: "absolute",
|
|
2118
2118
|
width: t(n - 1),
|
|
2119
2119
|
height: e(n - 1)
|
|
2120
|
-
}), [t, e, n]), o =
|
|
2120
|
+
}), [t, e, n]), o = W(() => t(n - 1), [t]);
|
|
2121
2121
|
return /* @__PURE__ */ s(
|
|
2122
2122
|
"div",
|
|
2123
2123
|
{
|
|
@@ -2129,7 +2129,7 @@ const fi = hn(({ widths: t, heights: e }) => {
|
|
|
2129
2129
|
}
|
|
2130
2130
|
);
|
|
2131
2131
|
}, gi = (t) => {
|
|
2132
|
-
const { currentZoom: e, setZoomLevel: n } =
|
|
2132
|
+
const { currentZoom: e, setZoomLevel: n } = Me(), [r, o] = A(0), i = it(r, 100), [a, d] = A(!1), l = k(null), m = E((v) => {
|
|
2133
2133
|
o(v ? (_) => _ + 3 : (_) => _ - 3);
|
|
2134
2134
|
}, []), h = E(
|
|
2135
2135
|
(v) => {
|
|
@@ -2201,7 +2201,7 @@ const fi = hn(({ widths: t, heights: e }) => {
|
|
|
2201
2201
|
};
|
|
2202
2202
|
}, [t, h, p, P, w]);
|
|
2203
2203
|
}, vi = (t, e, n) => {
|
|
2204
|
-
const r = k(), { contentRef: o } =
|
|
2204
|
+
const r = k(), { contentRef: o } = me(), { heights: i, widths: a } = Ge(), { setFocusedPage: d } = ae(), [l, m] = A([]), { targetScrollPage: h } = vn(), b = it(l, 0, 500), p = W(() => i.map((P, y) => {
|
|
2205
2205
|
const v = a[y], _ = lr(y + 1, t), g = v * _.columnIndex, f = P * _.rowIndex, u = g + v, c = f + P;
|
|
2206
2206
|
return {
|
|
2207
2207
|
pageNumber: y + 1,
|
|
@@ -2249,7 +2249,7 @@ const fi = hn(({ widths: t, heights: e }) => {
|
|
|
2249
2249
|
n == null || n.removeEventListener("scroll", w);
|
|
2250
2250
|
};
|
|
2251
2251
|
}, [n, w]);
|
|
2252
|
-
},
|
|
2252
|
+
}, Pe = {
|
|
2253
2253
|
"rp-layout": "_rp-layout_1q08v_1",
|
|
2254
2254
|
"rp-content": "_rp-content_1q08v_5",
|
|
2255
2255
|
"rp-pages": "_rp-pages_1q08v_11",
|
|
@@ -2264,10 +2264,10 @@ const fi = hn(({ widths: t, heights: e }) => {
|
|
|
2264
2264
|
{
|
|
2265
2265
|
ref: e,
|
|
2266
2266
|
...a,
|
|
2267
|
-
className:
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
m ?
|
|
2267
|
+
className: se(
|
|
2268
|
+
Pe["rp-theme-variables"],
|
|
2269
|
+
Pe["rp-container"],
|
|
2270
|
+
m ? Pe["rp-dark-mode"] : "",
|
|
2271
2271
|
i
|
|
2272
2272
|
),
|
|
2273
2273
|
style: {
|
|
@@ -2283,7 +2283,7 @@ const fi = hn(({ widths: t, heights: e }) => {
|
|
|
2283
2283
|
const o = dr(e, t, n.columnCount);
|
|
2284
2284
|
return /* @__PURE__ */ s(zt, { style: r, pageNumber: o }, o);
|
|
2285
2285
|
}, di), dc = () => {
|
|
2286
|
-
const { initialPage: t = 1, initialScrollMode: e, instanceId: n } = mn(), { pagesRef: r, setPagesRef: o } =
|
|
2286
|
+
const { initialPage: t = 1, initialScrollMode: e, instanceId: n } = mn(), { pagesRef: r, setPagesRef: o } = me(), { scrollToPage: i } = xn(), {
|
|
2287
2287
|
virtualScrollRef: a,
|
|
2288
2288
|
getVirtualScrollRef: d,
|
|
2289
2289
|
getPageScrollElementRef: l,
|
|
@@ -2292,78 +2292,78 @@ const fi = hn(({ widths: t, heights: e }) => {
|
|
|
2292
2292
|
virtualScrollableElementRef: b,
|
|
2293
2293
|
totalInnerDimensions: p,
|
|
2294
2294
|
pageScrollElementRef: w
|
|
2295
|
-
} = ot(), P = k(!0), { nextPage: y, prevPage: v, setFocusedPage: _, focusedPage: g } =
|
|
2295
|
+
} = ot(), P = k(!0), { nextPage: y, prevPage: v, setFocusedPage: _, focusedPage: g } = ae(), { scrollMode: f } = Fe(), { viewMode: u } = We(), c = k(null), { loading: T } = J(), { passwordRequired: C } = go(), { LoaderImageComponent: x } = wn(), R = k(
|
|
2296
2296
|
p
|
|
2297
2297
|
), I = k({
|
|
2298
2298
|
viewMode: u,
|
|
2299
2299
|
scrollMode: f
|
|
2300
|
-
}),
|
|
2300
|
+
}), S = k(!1), D = k(), { isFullScreen: z } = Co(), {
|
|
2301
2301
|
pageDimension: M,
|
|
2302
|
-
rowCount:
|
|
2302
|
+
rowCount: L,
|
|
2303
2303
|
rowHeight: O,
|
|
2304
|
-
columnCount:
|
|
2305
|
-
columnWidth:
|
|
2304
|
+
columnCount: F,
|
|
2305
|
+
columnWidth: $,
|
|
2306
2306
|
estimatedColumnWidth: G,
|
|
2307
|
-
estimatedRowHeight:
|
|
2308
|
-
} = ui(), j = it(p, 100),
|
|
2309
|
-
vi(
|
|
2310
|
-
const
|
|
2307
|
+
estimatedRowHeight: B
|
|
2308
|
+
} = ui(), j = it(p, 100), V = k();
|
|
2309
|
+
vi(F, L, b);
|
|
2310
|
+
const ee = k({
|
|
2311
2311
|
scrollTop: 0,
|
|
2312
2312
|
scrollLeft: 0
|
|
2313
2313
|
});
|
|
2314
2314
|
gi(r);
|
|
2315
|
-
const { isPressed:
|
|
2316
|
-
isPressed:
|
|
2317
|
-
}),
|
|
2318
|
-
columnCount:
|
|
2319
|
-
}), [
|
|
2315
|
+
const { isPressed: q } = sr(), { selectionMode: Y } = To(), { initializeGrabScroll: oe, resetGrabState: re } = ar({
|
|
2316
|
+
isPressed: q
|
|
2317
|
+
}), Q = W(() => Y === mo.HAND, [Y]), ie = W(() => ({
|
|
2318
|
+
columnCount: F
|
|
2319
|
+
}), [F]), he = E(
|
|
2320
2320
|
(U) => {
|
|
2321
|
-
const
|
|
2322
|
-
!
|
|
2321
|
+
const Z = document.activeElement !== r;
|
|
2322
|
+
!z && Z || (["ArrowUp", "ArrowLeft"].includes(U.key) ? (U.preventDefault(), v()) : ["ArrowDown", "ArrowRight"].includes(U.key) && (U.preventDefault(), y()));
|
|
2323
2323
|
},
|
|
2324
|
-
[y, v,
|
|
2324
|
+
[y, v, z, f]
|
|
2325
2325
|
);
|
|
2326
|
-
N(() => (window.addEventListener("keydown",
|
|
2327
|
-
window.removeEventListener("keydown",
|
|
2328
|
-
}), [
|
|
2326
|
+
N(() => (window.addEventListener("keydown", he), () => {
|
|
2327
|
+
window.removeEventListener("keydown", he);
|
|
2328
|
+
}), [he]), N(() => {
|
|
2329
2329
|
if (c.current && (c.current.style.position = "relative"), !!a)
|
|
2330
|
-
for (let U = 0; U <
|
|
2331
|
-
for (let
|
|
2330
|
+
for (let U = 0; U < L; U++)
|
|
2331
|
+
for (let Z = 0; Z < F; Z++)
|
|
2332
2332
|
a.resetAfterIndices({
|
|
2333
|
-
columnIndex:
|
|
2333
|
+
columnIndex: Z,
|
|
2334
2334
|
rowIndex: U,
|
|
2335
2335
|
shouldForceUpdate: !0
|
|
2336
2336
|
});
|
|
2337
|
-
}, [
|
|
2338
|
-
const
|
|
2339
|
-
(U,
|
|
2337
|
+
}, [L, F, M, a]);
|
|
2338
|
+
const Re = E(
|
|
2339
|
+
(U, Z) => {
|
|
2340
2340
|
if (!b)
|
|
2341
2341
|
return { scrollTop: 0, scrollLeft: 0 };
|
|
2342
|
-
const
|
|
2343
|
-
return
|
|
2342
|
+
const Ee = ee.current.scrollTop > Z, Ne = ee.current.scrollLeft > U;
|
|
2343
|
+
return Ee || Ne ? ee.current : {
|
|
2344
2344
|
scrollTop: b.scrollTop,
|
|
2345
2345
|
scrollLeft: b.scrollLeft
|
|
2346
2346
|
};
|
|
2347
2347
|
},
|
|
2348
2348
|
[b]
|
|
2349
|
-
),
|
|
2350
|
-
(U,
|
|
2349
|
+
), Te = E(
|
|
2350
|
+
(U, Z) => {
|
|
2351
2351
|
if (I.current.viewMode !== u || I.current.scrollMode !== f) {
|
|
2352
|
-
|
|
2352
|
+
V.current && clearTimeout(V.current), S.current = !0, i(g, "auto"), V.current = setTimeout(() => {
|
|
2353
2353
|
requestAnimationFrame(() => {
|
|
2354
2354
|
I.current = { viewMode: u, scrollMode: f };
|
|
2355
2355
|
});
|
|
2356
2356
|
}, 100);
|
|
2357
2357
|
return;
|
|
2358
2358
|
}
|
|
2359
|
-
const
|
|
2360
|
-
if (!
|
|
2359
|
+
const Ne = U.scrollTop, lt = U.scrollLeft;
|
|
2360
|
+
if (!Z.height || !Z.width)
|
|
2361
2361
|
return;
|
|
2362
|
-
|
|
2363
|
-
const { height:
|
|
2364
|
-
if (kt ===
|
|
2362
|
+
S.current = !0;
|
|
2363
|
+
const { height: Oe, width: dt } = Z, { height: kt, width: Ht } = R.current;
|
|
2364
|
+
if (kt === Oe && Ht === dt)
|
|
2365
2365
|
return;
|
|
2366
|
-
const so =
|
|
2366
|
+
const so = Ne / kt * Oe, ao = lt / Ht * dt, co = Math.round(Math.min(so, Oe)) || 0, lo = Math.round(Math.min(ao, dt)) || 0;
|
|
2367
2367
|
D.current = setTimeout(() => {
|
|
2368
2368
|
requestAnimationFrame(() => {
|
|
2369
2369
|
a == null || a.scrollTo({
|
|
@@ -2371,30 +2371,30 @@ const fi = hn(({ widths: t, heights: e }) => {
|
|
|
2371
2371
|
scrollLeft: lo
|
|
2372
2372
|
});
|
|
2373
2373
|
});
|
|
2374
|
-
}, 0),
|
|
2375
|
-
height:
|
|
2376
|
-
width:
|
|
2374
|
+
}, 0), R.current = {
|
|
2375
|
+
height: Z.height,
|
|
2376
|
+
width: Z.width
|
|
2377
2377
|
};
|
|
2378
2378
|
},
|
|
2379
2379
|
[a, u, f, i]
|
|
2380
2380
|
);
|
|
2381
2381
|
N(() => {
|
|
2382
2382
|
clearTimeout(D.current);
|
|
2383
|
-
const U = Array.from({ length:
|
|
2384
|
-
(
|
|
2383
|
+
const U = Array.from({ length: L }).reduce(
|
|
2384
|
+
(Ne, lt, Oe) => Ne + O(Oe),
|
|
2385
2385
|
0
|
|
2386
|
-
),
|
|
2387
|
-
(
|
|
2386
|
+
), Z = Array.from({ length: F }).reduce(
|
|
2387
|
+
(Ne, lt, Oe) => Ne + $(Oe),
|
|
2388
2388
|
0
|
|
2389
|
-
),
|
|
2390
|
-
|
|
2389
|
+
), Ee = Re(Z, U);
|
|
2390
|
+
ee.current = Ee, Te(Ee, { height: U, width: Z }), h({
|
|
2391
2391
|
height: U,
|
|
2392
|
-
width:
|
|
2392
|
+
width: Z
|
|
2393
2393
|
});
|
|
2394
|
-
}, [M,
|
|
2394
|
+
}, [M, L, F, Te]);
|
|
2395
2395
|
const at = E(
|
|
2396
2396
|
(U) => {
|
|
2397
|
-
|
|
2397
|
+
ee.current = {
|
|
2398
2398
|
scrollTop: U.scrollTop,
|
|
2399
2399
|
scrollLeft: U.scrollLeft
|
|
2400
2400
|
};
|
|
@@ -2402,22 +2402,22 @@ const fi = hn(({ widths: t, heights: e }) => {
|
|
|
2402
2402
|
[b]
|
|
2403
2403
|
);
|
|
2404
2404
|
N(() => () => {
|
|
2405
|
-
|
|
2405
|
+
V.current && clearTimeout(V.current);
|
|
2406
2406
|
}, []);
|
|
2407
|
-
const ct =
|
|
2408
|
-
[
|
|
2409
|
-
[
|
|
2410
|
-
}), [
|
|
2407
|
+
const ct = W(() => se(fe["rp-pages-container"], {
|
|
2408
|
+
[fe["rp-cursor-grab"]]: Q && !q,
|
|
2409
|
+
[fe["rp-cursor-grabbing"]]: Q && q
|
|
2410
|
+
}), [Q, q]), io = E(
|
|
2411
2411
|
(U) => {
|
|
2412
|
-
if (
|
|
2413
|
-
const
|
|
2414
|
-
|
|
2412
|
+
if (Q && U) {
|
|
2413
|
+
const Z = se(fe["rp-pages"]), Ee = document.querySelector(`.${Z}`);
|
|
2414
|
+
oe(Ee);
|
|
2415
2415
|
}
|
|
2416
2416
|
},
|
|
2417
|
-
[
|
|
2417
|
+
[Q, oe, fe]
|
|
2418
2418
|
);
|
|
2419
2419
|
return N(() => {
|
|
2420
|
-
T &&
|
|
2420
|
+
T && re();
|
|
2421
2421
|
}, [T]), N(() => {
|
|
2422
2422
|
if (!(j.height === 0 || !P.current)) {
|
|
2423
2423
|
if (e === ne.PAGE_SCROLLING) {
|
|
@@ -2432,41 +2432,41 @@ const fi = hn(({ widths: t, heights: e }) => {
|
|
|
2432
2432
|
w,
|
|
2433
2433
|
_,
|
|
2434
2434
|
j
|
|
2435
|
-
]), /* @__PURE__ */ H(
|
|
2436
|
-
/* @__PURE__ */ s(Wn, { id: n, ref: o, tabIndex: -1, className: ct, children: /* @__PURE__ */ s(hi, { style: { minHeight: "50px" }, children: ({ width: U, height:
|
|
2435
|
+
]), /* @__PURE__ */ H(de, { children: [
|
|
2436
|
+
/* @__PURE__ */ s(Wn, { id: n, ref: o, tabIndex: -1, className: ct, children: /* @__PURE__ */ s(hi, { style: { minHeight: "50px" }, children: ({ width: U, height: Z }) => /* @__PURE__ */ s("div", { "data-rp": "pages", ref: io, style: { width: U, height: Z }, children: f === ne.PAGE_SCROLLING ? /* @__PURE__ */ s(
|
|
2437
2437
|
"div",
|
|
2438
2438
|
{
|
|
2439
2439
|
ref: l,
|
|
2440
|
-
style: { width: U, height:
|
|
2441
|
-
className:
|
|
2442
|
-
children: u ===
|
|
2440
|
+
style: { width: U, height: Z },
|
|
2441
|
+
className: se(fe["rp-pages"], fe["rp-page-scrolling-wrapper"]),
|
|
2442
|
+
children: u === ze.DUAL_PAGE ? /* @__PURE__ */ s(fi, { widths: $, heights: O }) : /* @__PURE__ */ s(mi, { widths: $, heights: O })
|
|
2443
2443
|
}
|
|
2444
2444
|
) : G ? /* @__PURE__ */ s(
|
|
2445
2445
|
ai,
|
|
2446
2446
|
{
|
|
2447
2447
|
ref: d,
|
|
2448
|
-
itemData:
|
|
2448
|
+
itemData: ie,
|
|
2449
2449
|
outerRef: m,
|
|
2450
2450
|
innerRef: c,
|
|
2451
2451
|
onScroll: at,
|
|
2452
|
-
columnCount:
|
|
2453
|
-
columnWidth:
|
|
2452
|
+
columnCount: F,
|
|
2453
|
+
columnWidth: $,
|
|
2454
2454
|
rowHeight: O,
|
|
2455
|
-
height:
|
|
2455
|
+
height: Z,
|
|
2456
2456
|
width: U,
|
|
2457
2457
|
estimatedColumnWidth: G,
|
|
2458
|
-
estimatedRowHeight:
|
|
2459
|
-
rowCount:
|
|
2460
|
-
className:
|
|
2461
|
-
|
|
2462
|
-
f === ne.HORIZONTAL_SCROLLING ?
|
|
2458
|
+
estimatedRowHeight: B,
|
|
2459
|
+
rowCount: L,
|
|
2460
|
+
className: se(
|
|
2461
|
+
fe["rp-pages"],
|
|
2462
|
+
f === ne.HORIZONTAL_SCROLLING ? fe["rp-pages-horizontal-scroll"] : ""
|
|
2463
2463
|
),
|
|
2464
2464
|
children: wi
|
|
2465
2465
|
}
|
|
2466
2466
|
) : T ? null : /* @__PURE__ */ s(
|
|
2467
2467
|
"div",
|
|
2468
2468
|
{
|
|
2469
|
-
className:
|
|
2469
|
+
className: fe["rp-loader"],
|
|
2470
2470
|
style: {
|
|
2471
2471
|
display: "flex",
|
|
2472
2472
|
justifyContent: "center",
|
|
@@ -2490,13 +2490,13 @@ const fi = hn(({ widths: t, heights: e }) => {
|
|
|
2490
2490
|
"rp-page-input": "_rp-page-input_1gck0_6",
|
|
2491
2491
|
"rp-total-page": "_rp-total-page_1gck0_18"
|
|
2492
2492
|
}, _i = () => {
|
|
2493
|
-
const { prevIcon: t } =
|
|
2493
|
+
const { prevIcon: t } = ve(), { prevIcon: e } = ge();
|
|
2494
2494
|
return t || e || /* @__PURE__ */ s(Be, {});
|
|
2495
2495
|
}, bi = () => {
|
|
2496
|
-
const { nextIcon: t } =
|
|
2496
|
+
const { nextIcon: t } = ve(), { nextIcon: e } = ge();
|
|
2497
2497
|
return t || e || /* @__PURE__ */ s(Be, { style: { transform: "rotate(180deg" } });
|
|
2498
2498
|
}, Ti = () => {
|
|
2499
|
-
const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: r, prevPage: o, goToPage: i } =
|
|
2499
|
+
const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: r, prevPage: o, goToPage: i } = ae(), [a, d] = A(t.toString()), { pageNavigationTool: l = !0 } = be(), { pageNavigationTool: m = !0 } = Se(), { isSmallScreen: h } = Le(), { viewMode: b } = We(), { scrollMode: p } = Fe(), { localeMessages: w } = ue();
|
|
2500
2500
|
N(() => {
|
|
2501
2501
|
d(t.toString());
|
|
2502
2502
|
}, [t]);
|
|
@@ -2513,7 +2513,7 @@ const fi = hn(({ widths: t, heights: e }) => {
|
|
|
2513
2513
|
f.key === "Enter" && y();
|
|
2514
2514
|
},
|
|
2515
2515
|
[y]
|
|
2516
|
-
), g =
|
|
2516
|
+
), g = W(() => b === ze.DUAL_PAGE && p === ne.PAGE_SCROLLING && t === e - 1 || t === e, [t, e, b, p]);
|
|
2517
2517
|
return !l || !m ? null : typeof l != "boolean" ? /* @__PURE__ */ s(
|
|
2518
2518
|
l,
|
|
2519
2519
|
{
|
|
@@ -2536,7 +2536,7 @@ const fi = hn(({ widths: t, heights: e }) => {
|
|
|
2536
2536
|
}
|
|
2537
2537
|
) : /* @__PURE__ */ H("div", { className: bt["rp-paginate"], children: [
|
|
2538
2538
|
!h && /* @__PURE__ */ s(K, { content: w == null ? void 0 : w.previousPageTooltip, children: /* @__PURE__ */ s(
|
|
2539
|
-
|
|
2539
|
+
ce,
|
|
2540
2540
|
{
|
|
2541
2541
|
onClick: o,
|
|
2542
2542
|
"aria-label": w == null ? void 0 : w.previousPageTooltip,
|
|
@@ -2561,7 +2561,7 @@ const fi = hn(({ widths: t, heights: e }) => {
|
|
|
2561
2561
|
e
|
|
2562
2562
|
] }),
|
|
2563
2563
|
!h && /* @__PURE__ */ s(K, { content: w == null ? void 0 : w.nextPageTooltip, children: /* @__PURE__ */ s(
|
|
2564
|
-
|
|
2564
|
+
ce,
|
|
2565
2565
|
{
|
|
2566
2566
|
onClick: r,
|
|
2567
2567
|
"aria-label": w == null ? void 0 : w.nextPageTooltip,
|
|
@@ -2571,7 +2571,7 @@ const fi = hn(({ widths: t, heights: e }) => {
|
|
|
2571
2571
|
) })
|
|
2572
2572
|
] });
|
|
2573
2573
|
};
|
|
2574
|
-
var At = "Dialog", [Mn, uc] = mr(At), [Ci,
|
|
2574
|
+
var At = "Dialog", [Mn, uc] = mr(At), [Ci, pe] = Mn(At), kn = (t) => {
|
|
2575
2575
|
const {
|
|
2576
2576
|
__scopeDialog: e,
|
|
2577
2577
|
children: n,
|
|
@@ -2579,7 +2579,7 @@ var At = "Dialog", [Mn, uc] = mr(At), [Ci, ue] = Mn(At), kn = (t) => {
|
|
|
2579
2579
|
defaultOpen: o,
|
|
2580
2580
|
onOpenChange: i,
|
|
2581
2581
|
modal: a = !0
|
|
2582
|
-
} = t, d =
|
|
2582
|
+
} = t, d = X.useRef(null), l = X.useRef(null), [m = !1, h] = wr({
|
|
2583
2583
|
prop: r,
|
|
2584
2584
|
defaultProp: o,
|
|
2585
2585
|
onChange: i
|
|
@@ -2595,16 +2595,16 @@ var At = "Dialog", [Mn, uc] = mr(At), [Ci, ue] = Mn(At), kn = (t) => {
|
|
|
2595
2595
|
descriptionId: ht(),
|
|
2596
2596
|
open: m,
|
|
2597
2597
|
onOpenChange: h,
|
|
2598
|
-
onOpenToggle:
|
|
2598
|
+
onOpenToggle: X.useCallback(() => h((b) => !b), [h]),
|
|
2599
2599
|
modal: a,
|
|
2600
2600
|
children: n
|
|
2601
2601
|
}
|
|
2602
2602
|
);
|
|
2603
2603
|
};
|
|
2604
2604
|
kn.displayName = At;
|
|
2605
|
-
var Hn = "DialogTrigger", Pi =
|
|
2605
|
+
var Hn = "DialogTrigger", Pi = X.forwardRef(
|
|
2606
2606
|
(t, e) => {
|
|
2607
|
-
const { __scopeDialog: n, ...r } = t, o =
|
|
2607
|
+
const { __scopeDialog: n, ...r } = t, o = pe(Hn, n), i = Nt(e, o.triggerRef);
|
|
2608
2608
|
return /* @__PURE__ */ s(
|
|
2609
2609
|
je.button,
|
|
2610
2610
|
{
|
|
@@ -2624,20 +2624,20 @@ Pi.displayName = Hn;
|
|
|
2624
2624
|
var Ft = "DialogPortal", [yi, $n] = Mn(Ft, {
|
|
2625
2625
|
forceMount: void 0
|
|
2626
2626
|
}), qn = (t) => {
|
|
2627
|
-
const { __scopeDialog: e, forceMount: n, children: r, container: o } = t, i =
|
|
2628
|
-
return /* @__PURE__ */ s(yi, { scope: e, forceMount: n, children:
|
|
2627
|
+
const { __scopeDialog: e, forceMount: n, children: r, container: o } = t, i = pe(Ft, e);
|
|
2628
|
+
return /* @__PURE__ */ s(yi, { scope: e, forceMount: n, children: X.Children.map(r, (a) => /* @__PURE__ */ s(Ot, { present: n || i.open, children: /* @__PURE__ */ s(yr, { asChild: !0, container: o, children: a }) })) });
|
|
2629
2629
|
};
|
|
2630
2630
|
qn.displayName = Ft;
|
|
2631
|
-
var nt = "DialogOverlay", Gn =
|
|
2631
|
+
var nt = "DialogOverlay", Gn = X.forwardRef(
|
|
2632
2632
|
(t, e) => {
|
|
2633
|
-
const n = $n(nt, t.__scopeDialog), { forceMount: r = n.forceMount, ...o } = t, i =
|
|
2633
|
+
const n = $n(nt, t.__scopeDialog), { forceMount: r = n.forceMount, ...o } = t, i = pe(nt, t.__scopeDialog);
|
|
2634
2634
|
return i.modal ? /* @__PURE__ */ s(Ot, { present: r || i.open, children: /* @__PURE__ */ s(xi, { ...o, ref: e }) }) : null;
|
|
2635
2635
|
}
|
|
2636
2636
|
);
|
|
2637
2637
|
Gn.displayName = nt;
|
|
2638
|
-
var xi =
|
|
2638
|
+
var xi = X.forwardRef(
|
|
2639
2639
|
(t, e) => {
|
|
2640
|
-
const { __scopeDialog: n, ...r } = t, o =
|
|
2640
|
+
const { __scopeDialog: n, ...r } = t, o = pe(nt, n);
|
|
2641
2641
|
return (
|
|
2642
2642
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
2643
2643
|
// ie. when `Overlay` and `Content` are siblings
|
|
@@ -2652,17 +2652,17 @@ var xi = Y.forwardRef(
|
|
|
2652
2652
|
) })
|
|
2653
2653
|
);
|
|
2654
2654
|
}
|
|
2655
|
-
),
|
|
2655
|
+
), Ae = "DialogContent", Vn = X.forwardRef(
|
|
2656
2656
|
(t, e) => {
|
|
2657
|
-
const n = $n(
|
|
2657
|
+
const n = $n(Ae, t.__scopeDialog), { forceMount: r = n.forceMount, ...o } = t, i = pe(Ae, t.__scopeDialog);
|
|
2658
2658
|
return /* @__PURE__ */ s(Ot, { present: r || i.open, children: i.modal ? /* @__PURE__ */ s(Ii, { ...o, ref: e }) : /* @__PURE__ */ s(Si, { ...o, ref: e }) });
|
|
2659
2659
|
}
|
|
2660
2660
|
);
|
|
2661
|
-
Vn.displayName =
|
|
2662
|
-
var Ii =
|
|
2661
|
+
Vn.displayName = Ae;
|
|
2662
|
+
var Ii = X.forwardRef(
|
|
2663
2663
|
(t, e) => {
|
|
2664
|
-
const n =
|
|
2665
|
-
return
|
|
2664
|
+
const n = pe(Ae, t.__scopeDialog), r = X.useRef(null), o = Nt(e, n.contentRef, r);
|
|
2665
|
+
return X.useEffect(() => {
|
|
2666
2666
|
const i = r.current;
|
|
2667
2667
|
if (i)
|
|
2668
2668
|
return Tr(i);
|
|
@@ -2688,9 +2688,9 @@ var Ii = Y.forwardRef(
|
|
|
2688
2688
|
}
|
|
2689
2689
|
);
|
|
2690
2690
|
}
|
|
2691
|
-
), Si =
|
|
2691
|
+
), Si = X.forwardRef(
|
|
2692
2692
|
(t, e) => {
|
|
2693
|
-
const n =
|
|
2693
|
+
const n = pe(Ae, t.__scopeDialog), r = X.useRef(!1), o = X.useRef(!1);
|
|
2694
2694
|
return /* @__PURE__ */ s(
|
|
2695
2695
|
Un,
|
|
2696
2696
|
{
|
|
@@ -2711,10 +2711,10 @@ var Ii = Y.forwardRef(
|
|
|
2711
2711
|
}
|
|
2712
2712
|
);
|
|
2713
2713
|
}
|
|
2714
|
-
), Un =
|
|
2714
|
+
), Un = X.forwardRef(
|
|
2715
2715
|
(t, e) => {
|
|
2716
|
-
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: i, ...a } = t, d =
|
|
2717
|
-
return Cr(), /* @__PURE__ */ H(
|
|
2716
|
+
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: i, ...a } = t, d = pe(Ae, n), l = X.useRef(null), m = Nt(e, l);
|
|
2717
|
+
return Cr(), /* @__PURE__ */ H(de, { children: [
|
|
2718
2718
|
/* @__PURE__ */ s(
|
|
2719
2719
|
Pr,
|
|
2720
2720
|
{
|
|
@@ -2738,29 +2738,29 @@ var Ii = Y.forwardRef(
|
|
|
2738
2738
|
)
|
|
2739
2739
|
}
|
|
2740
2740
|
),
|
|
2741
|
-
/* @__PURE__ */ H(
|
|
2741
|
+
/* @__PURE__ */ H(de, { children: [
|
|
2742
2742
|
/* @__PURE__ */ s(Ri, { titleId: d.titleId }),
|
|
2743
2743
|
/* @__PURE__ */ s(Ni, { contentRef: l, descriptionId: d.descriptionId })
|
|
2744
2744
|
] })
|
|
2745
2745
|
] });
|
|
2746
2746
|
}
|
|
2747
|
-
), Wt = "DialogTitle", Zn =
|
|
2747
|
+
), Wt = "DialogTitle", Zn = X.forwardRef(
|
|
2748
2748
|
(t, e) => {
|
|
2749
|
-
const { __scopeDialog: n, ...r } = t, o =
|
|
2749
|
+
const { __scopeDialog: n, ...r } = t, o = pe(Wt, n);
|
|
2750
2750
|
return /* @__PURE__ */ s(je.h2, { id: o.titleId, ...r, ref: e });
|
|
2751
2751
|
}
|
|
2752
2752
|
);
|
|
2753
2753
|
Zn.displayName = Wt;
|
|
2754
|
-
var Bn = "DialogDescription", Li =
|
|
2754
|
+
var Bn = "DialogDescription", Li = X.forwardRef(
|
|
2755
2755
|
(t, e) => {
|
|
2756
|
-
const { __scopeDialog: n, ...r } = t, o =
|
|
2756
|
+
const { __scopeDialog: n, ...r } = t, o = pe(Bn, n);
|
|
2757
2757
|
return /* @__PURE__ */ s(je.p, { id: o.descriptionId, ...r, ref: e });
|
|
2758
2758
|
}
|
|
2759
2759
|
);
|
|
2760
2760
|
Li.displayName = Bn;
|
|
2761
|
-
var jn = "DialogClose", Kn =
|
|
2761
|
+
var jn = "DialogClose", Kn = X.forwardRef(
|
|
2762
2762
|
(t, e) => {
|
|
2763
|
-
const { __scopeDialog: n, ...r } = t, o =
|
|
2763
|
+
const { __scopeDialog: n, ...r } = t, o = pe(jn, n);
|
|
2764
2764
|
return /* @__PURE__ */ s(
|
|
2765
2765
|
je.button,
|
|
2766
2766
|
{
|
|
@@ -2777,7 +2777,7 @@ function Mt(t) {
|
|
|
2777
2777
|
return t ? "open" : "closed";
|
|
2778
2778
|
}
|
|
2779
2779
|
var Xn = "DialogTitleWarning", [pc, Yn] = vr(Xn, {
|
|
2780
|
-
contentName:
|
|
2780
|
+
contentName: Ae,
|
|
2781
2781
|
titleName: Wt,
|
|
2782
2782
|
docsSlug: "dialog"
|
|
2783
2783
|
}), Ri = ({ titleId: t }) => {
|
|
@@ -2786,18 +2786,18 @@ var Xn = "DialogTitleWarning", [pc, Yn] = vr(Xn, {
|
|
|
2786
2786
|
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
2787
2787
|
|
|
2788
2788
|
For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;
|
|
2789
|
-
return
|
|
2789
|
+
return X.useEffect(() => {
|
|
2790
2790
|
t && (document.getElementById(t) || console.error(n));
|
|
2791
2791
|
}, [n, t]), null;
|
|
2792
2792
|
}, Ei = "DialogDescriptionWarning", Ni = ({ contentRef: t, descriptionId: e }) => {
|
|
2793
2793
|
const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Yn(Ei).contentName}}.`;
|
|
2794
|
-
return
|
|
2794
|
+
return X.useEffect(() => {
|
|
2795
2795
|
var i;
|
|
2796
2796
|
const o = (i = t.current) == null ? void 0 : i.getAttribute("aria-describedby");
|
|
2797
2797
|
e && o && (document.getElementById(e) || console.warn(r));
|
|
2798
2798
|
}, [r, t, e]), null;
|
|
2799
2799
|
}, Oi = kn, Di = qn, zi = Gn, Ai = Vn, Fi = Zn, Wi = Kn;
|
|
2800
|
-
const
|
|
2800
|
+
const De = {
|
|
2801
2801
|
"rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
|
|
2802
2802
|
"rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
|
|
2803
2803
|
"rp-document-dialog": "_rp-document-dialog_slqo7_13",
|
|
@@ -2806,7 +2806,7 @@ const Oe = {
|
|
|
2806
2806
|
"rp-dialog-close": "_rp-dialog-close_slqo7_47",
|
|
2807
2807
|
"rp-properties-divider": "_rp-properties-divider_slqo7_55"
|
|
2808
2808
|
}, Mi = () => {
|
|
2809
|
-
const { pdfProperties: t } =
|
|
2809
|
+
const { pdfProperties: t } = J(), { container: e } = me(), { activeDocumentProperties: n, setActiveDocumentProperties: r } = Oo(), { localeMessages: o } = ue(), i = W(() => {
|
|
2810
2810
|
if (!t)
|
|
2811
2811
|
return [];
|
|
2812
2812
|
const {
|
|
@@ -2846,12 +2846,12 @@ const Oe = {
|
|
|
2846
2846
|
{ label: o == null ? void 0 : o.propertiesPageCountLabel, value: _ }
|
|
2847
2847
|
];
|
|
2848
2848
|
}, [t, o]);
|
|
2849
|
-
return /* @__PURE__ */ s(Oi, { open: n, onOpenChange: r, children: /* @__PURE__ */ s(Di, { container: e, children: /* @__PURE__ */ H("div", { className:
|
|
2850
|
-
/* @__PURE__ */ s(zi, { className:
|
|
2851
|
-
/* @__PURE__ */ H(Ai, { className:
|
|
2852
|
-
/* @__PURE__ */ s(Fi, { className:
|
|
2853
|
-
/* @__PURE__ */ s("div", { className:
|
|
2854
|
-
/* @__PURE__ */ s(Wi, { asChild: !0, className:
|
|
2849
|
+
return /* @__PURE__ */ s(Oi, { open: n, onOpenChange: r, children: /* @__PURE__ */ s(Di, { container: e, children: /* @__PURE__ */ H("div", { className: De["rp-dialog-wrapper"], children: [
|
|
2850
|
+
/* @__PURE__ */ s(zi, { className: De["rp-dialog-overlay"] }),
|
|
2851
|
+
/* @__PURE__ */ H(Ai, { className: De["rp-document-dialog"], children: [
|
|
2852
|
+
/* @__PURE__ */ s(Fi, { className: De["rp-dialog-title"], children: o == null ? void 0 : o.documentPropertiesLabel }),
|
|
2853
|
+
/* @__PURE__ */ s("div", { className: De["rp-document-properties"], children: i.map((a, d) => /* @__PURE__ */ s("div", { children: a.separate ? /* @__PURE__ */ s("div", { className: De["rp-properties-divider"] }) : /* @__PURE__ */ s(qo, { label: a.label, value: a.value }) }, d)) }),
|
|
2854
|
+
/* @__PURE__ */ s(Wi, { asChild: !0, className: De["rp-dialog-close"], children: /* @__PURE__ */ s(xr, {}) })
|
|
2855
2855
|
] })
|
|
2856
2856
|
] }) }) });
|
|
2857
2857
|
}, ki = {
|
|
@@ -2860,7 +2860,7 @@ const Oe = {
|
|
|
2860
2860
|
const n = await (await fetch(t)).blob();
|
|
2861
2861
|
return Hi(n);
|
|
2862
2862
|
}, Qn = () => {
|
|
2863
|
-
const { filename: t, pdfSrc: e } =
|
|
2863
|
+
const { filename: t, pdfSrc: e } = J(), { downloadFilename: n } = Ro(), r = (i) => {
|
|
2864
2864
|
const a = n || i;
|
|
2865
2865
|
return a.endsWith(cn) ? a : `${a}${cn}`;
|
|
2866
2866
|
};
|
|
@@ -2871,22 +2871,22 @@ const Oe = {
|
|
|
2871
2871
|
i.href = await $i(e), i.download = r(t), document.body.appendChild(i), i.click(), document.body.removeChild(i);
|
|
2872
2872
|
}, [t, e]) };
|
|
2873
2873
|
}, Jn = () => {
|
|
2874
|
-
const { downloadIcon: t } =
|
|
2874
|
+
const { downloadIcon: t } = ve(), { downloadIcon: e } = ge();
|
|
2875
2875
|
return t || e || /* @__PURE__ */ s(Rr, {});
|
|
2876
|
-
}, eo = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ s(K, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }), qi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ s(eo, { localeMessages: e, children: /* @__PURE__ */ s(
|
|
2876
|
+
}, eo = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ s(K, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }), qi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ s(eo, { localeMessages: e, children: /* @__PURE__ */ s(ce, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ s(Jn, {}) }) }), Gi = ({ download: t, localeMessages: e }) => /* @__PURE__ */ s(ye, { onClick: t, children: /* @__PURE__ */ H(eo, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2877
2877
|
/* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(Jn, {}) }),
|
|
2878
2878
|
e == null ? void 0 : e.downloadFileLabel
|
|
2879
2879
|
] }) }), to = () => {
|
|
2880
|
-
const { download: t } = Qn(), { downloadTool: e = !0 } =
|
|
2880
|
+
const { download: t } = Qn(), { downloadTool: e = !0 } = be(), { downloadTool: n = !0 } = Se(), { isSmallScreen: r } = Le(), { localeMessages: o } = ue(), i = o == null ? void 0 : o.downloadFileTooltip;
|
|
2881
2881
|
return !e || !n ? null : r ? /* @__PURE__ */ s(Gi, { download: t, localeMessages: o }) : typeof e == "function" ? /* @__PURE__ */ s(K, { content: i, children: /* @__PURE__ */ s(e, { download: t }) }) : typeof n == "function" ? /* @__PURE__ */ s(K, { content: i, children: /* @__PURE__ */ s(n, { download: t }) }) : /* @__PURE__ */ s(qi, { download: t, localeMessages: o });
|
|
2882
2882
|
}, no = () => {
|
|
2883
|
-
const { printIcon: t } =
|
|
2883
|
+
const { printIcon: t } = ve(), { printIcon: e } = ge();
|
|
2884
2884
|
return t || e || /* @__PURE__ */ s(Er, {});
|
|
2885
|
-
}, oo = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ s(K, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }), Vi = ({ print: t, localeMessages: e }) => /* @__PURE__ */ s(oo, { localeMessages: e, children: /* @__PURE__ */ s(
|
|
2885
|
+
}, oo = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ s(K, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }), Vi = ({ print: t, localeMessages: e }) => /* @__PURE__ */ s(oo, { localeMessages: e, children: /* @__PURE__ */ s(ce, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ s(no, {}) }) }), Ui = ({ print: t, localeMessages: e }) => /* @__PURE__ */ s(ye, { onClick: t, children: /* @__PURE__ */ H(oo, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2886
2886
|
/* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(no, {}) }),
|
|
2887
2887
|
e == null ? void 0 : e.printLabel
|
|
2888
2888
|
] }) }), ro = () => {
|
|
2889
|
-
const { print: t, cancel: e, setOnProgress: n, setOnComplete: r, setOnError: o, progress: i } = st(), { printTool: a = !0 } =
|
|
2889
|
+
const { print: t, cancel: e, setOnProgress: n, setOnComplete: r, setOnError: o, progress: i } = st(), { printTool: a = !0 } = be(), { printTool: d = !0 } = Se(), { isSmallScreen: l } = Le(), { localeMessages: m } = ue(), h = m == null ? void 0 : m.printTooltip;
|
|
2890
2890
|
return !a || !d ? null : l ? /* @__PURE__ */ s(Ui, { print: t, localeMessages: m }) : typeof a == "function" ? /* @__PURE__ */ s(K, { content: h, children: /* @__PURE__ */ s(
|
|
2891
2891
|
a,
|
|
2892
2892
|
{
|
|
@@ -2911,30 +2911,30 @@ const Oe = {
|
|
|
2911
2911
|
}, Zi = {
|
|
2912
2912
|
"rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
|
|
2913
2913
|
}, Bi = () => {
|
|
2914
|
-
const { goToFirstPageIcon: t } =
|
|
2914
|
+
const { goToFirstPageIcon: t } = ve(), { goToFirstPageIcon: e } = ge();
|
|
2915
2915
|
return t || e || /* @__PURE__ */ s(Tn, { className: Zi["rp-go-to-Top"] });
|
|
2916
2916
|
}, ji = () => {
|
|
2917
|
-
const { goToLastPageIcon: t } =
|
|
2917
|
+
const { goToLastPageIcon: t } = ve(), { goToLastPageIcon: e } = ge();
|
|
2918
2918
|
return t || e || /* @__PURE__ */ s(Tn, {});
|
|
2919
2919
|
}, ln = { width: "100%" }, Ki = () => {
|
|
2920
|
-
const { goToPage: t, totalPages: e, focusedPage: n } =
|
|
2920
|
+
const { goToPage: t, totalPages: e, focusedPage: n } = ae(), { jumpNavigationTool: r = !0 } = be(), { jumpNavigationTool: o = !0 } = Se(), { localeMessages: i } = ue(), a = W(() => n === 1, [n]), d = W(() => n === e, [n, e]), l = E(() => {
|
|
2921
2921
|
t(1);
|
|
2922
2922
|
}, [t]), m = E(() => {
|
|
2923
2923
|
t(e);
|
|
2924
2924
|
}, [t, e]);
|
|
2925
2925
|
return !r || !o ? null : /* @__PURE__ */ H(tt, { children: [
|
|
2926
|
-
/* @__PURE__ */ s(
|
|
2926
|
+
/* @__PURE__ */ s(ye, { onClick: l, children: /* @__PURE__ */ s(K, { content: i == null ? void 0 : i.firstPageTooltip, style: ln, children: /* @__PURE__ */ H("div", { className: "rp-menu-item", "aria-disabled": a, children: [
|
|
2927
2927
|
/* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(Bi, {}) }),
|
|
2928
2928
|
/* @__PURE__ */ s("span", { children: i == null ? void 0 : i.firstPageLabel })
|
|
2929
2929
|
] }) }) }),
|
|
2930
|
-
/* @__PURE__ */ s(
|
|
2930
|
+
/* @__PURE__ */ s(ye, { onClick: m, children: /* @__PURE__ */ s(K, { content: i == null ? void 0 : i.lastPageTooltip, style: ln, children: /* @__PURE__ */ H("div", { className: "rp-menu-item", "aria-disabled": d, children: [
|
|
2931
2931
|
/* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(ji, {}) }),
|
|
2932
2932
|
/* @__PURE__ */ s("span", { children: i == null ? void 0 : i.lastPageLabel })
|
|
2933
2933
|
] }) }) }),
|
|
2934
2934
|
/* @__PURE__ */ s(Et, {})
|
|
2935
2935
|
] });
|
|
2936
2936
|
}, Xi = () => {
|
|
2937
|
-
const [t, e] =
|
|
2937
|
+
const [t, e] = A(!1), { container: n, pagesRef: r } = me(), { isSmallScreen: o } = Le(), {
|
|
2938
2938
|
openFileTool: i,
|
|
2939
2939
|
downloadTool: a,
|
|
2940
2940
|
documentProperties: d,
|
|
@@ -2945,7 +2945,7 @@ const Oe = {
|
|
|
2945
2945
|
printTool: p,
|
|
2946
2946
|
fullscreenTool: w,
|
|
2947
2947
|
viewModeTool: P
|
|
2948
|
-
} =
|
|
2948
|
+
} = be(), {
|
|
2949
2949
|
openFileTool: y,
|
|
2950
2950
|
downloadTool: v,
|
|
2951
2951
|
documentProperties: _,
|
|
@@ -2956,11 +2956,11 @@ const Oe = {
|
|
|
2956
2956
|
printTool: T,
|
|
2957
2957
|
fullscreenTool: C,
|
|
2958
2958
|
viewModeTool: x
|
|
2959
|
-
} =
|
|
2960
|
-
new ResizeObserver((
|
|
2961
|
-
L
|
|
2959
|
+
} = Se(), { localeMessages: R } = ue(), [I, S] = A(0), D = k(
|
|
2960
|
+
new ResizeObserver((L) => {
|
|
2961
|
+
S(L[0].contentRect.height);
|
|
2962
2962
|
})
|
|
2963
|
-
),
|
|
2963
|
+
), z = W(() => b || m || h || l || d || P || o && (i || a || p || w), [
|
|
2964
2964
|
i,
|
|
2965
2965
|
a,
|
|
2966
2966
|
p,
|
|
@@ -2971,7 +2971,7 @@ const Oe = {
|
|
|
2971
2971
|
h,
|
|
2972
2972
|
b,
|
|
2973
2973
|
o
|
|
2974
|
-
]), M =
|
|
2974
|
+
]), M = W(() => c || f || u || g || _ || x || o && (y || v || T || C), [
|
|
2975
2975
|
y,
|
|
2976
2976
|
v,
|
|
2977
2977
|
T,
|
|
@@ -2985,13 +2985,13 @@ const Oe = {
|
|
|
2985
2985
|
]);
|
|
2986
2986
|
return N(() => (r && D.current.observe(r), () => {
|
|
2987
2987
|
D.current.disconnect();
|
|
2988
|
-
}), [r]), !
|
|
2988
|
+
}), [r]), !z || !M ? null : /* @__PURE__ */ H(de, { children: [
|
|
2989
2989
|
/* @__PURE__ */ s(
|
|
2990
2990
|
Rt,
|
|
2991
2991
|
{
|
|
2992
2992
|
container: n,
|
|
2993
2993
|
onOpenChange: e,
|
|
2994
|
-
triggerComponent: /* @__PURE__ */ s("div", { role: "button", children: /* @__PURE__ */ s(K, { content:
|
|
2994
|
+
triggerComponent: /* @__PURE__ */ s("div", { role: "button", children: /* @__PURE__ */ s(K, { content: R == null ? void 0 : R.moreOptionTooltip, children: /* @__PURE__ */ s(ce, { active: t, "aria-label": R == null ? void 0 : R.moreOptionTooltip, children: /* @__PURE__ */ s(fr, {}) }) }) }),
|
|
2995
2995
|
side: "bottom",
|
|
2996
2996
|
avoidCollisions: !1,
|
|
2997
2997
|
children: /* @__PURE__ */ H(
|
|
@@ -3022,10 +3022,10 @@ const Oe = {
|
|
|
3022
3022
|
/* @__PURE__ */ s(Mi, {})
|
|
3023
3023
|
] });
|
|
3024
3024
|
}, Yi = () => {
|
|
3025
|
-
const { isSmallScreen: t } =
|
|
3026
|
-
return /* @__PURE__ */ H(
|
|
3025
|
+
const { isSmallScreen: t } = Le();
|
|
3026
|
+
return /* @__PURE__ */ H(de, { children: [
|
|
3027
3027
|
/* @__PURE__ */ s(hr, {}),
|
|
3028
|
-
!t && /* @__PURE__ */ H(
|
|
3028
|
+
!t && /* @__PURE__ */ H(de, { children: [
|
|
3029
3029
|
/* @__PURE__ */ s(_n, {}),
|
|
3030
3030
|
/* @__PURE__ */ s(to, {}),
|
|
3031
3031
|
/* @__PURE__ */ s(ro, {}),
|
|
@@ -3033,7 +3033,7 @@ const Oe = {
|
|
|
3033
3033
|
] }),
|
|
3034
3034
|
/* @__PURE__ */ s(Xi, {})
|
|
3035
3035
|
] });
|
|
3036
|
-
}, Qi = "_active_1yldl_11",
|
|
3036
|
+
}, Qi = "_active_1yldl_11", Ce = {
|
|
3037
3037
|
"rp-zoom-wrapper": "_rp-zoom-wrapper_1yldl_1",
|
|
3038
3038
|
"rp-current-zoom-wrapper": "_rp-current-zoom-wrapper_1yldl_6",
|
|
3039
3039
|
active: Qi,
|
|
@@ -3042,13 +3042,13 @@ const Oe = {
|
|
|
3042
3042
|
"rp-current-zoom-text": "_rp-current-zoom-text_1yldl_24",
|
|
3043
3043
|
"rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_1yldl_28"
|
|
3044
3044
|
}, Ji = 25, Tt = 1e3, es = [50, 75, 100, 125, 150, 200, 300, 400], ts = () => {
|
|
3045
|
-
const { zoomInIcon: t } =
|
|
3045
|
+
const { zoomInIcon: t } = ve(), { zoomInIcon: e } = ge();
|
|
3046
3046
|
return t || e || /* @__PURE__ */ s(Or, {});
|
|
3047
3047
|
}, ns = () => {
|
|
3048
|
-
const { zoomOutIcon: t } =
|
|
3048
|
+
const { zoomOutIcon: t } = ve(), { zoomOutIcon: e } = ge();
|
|
3049
3049
|
return t || e || /* @__PURE__ */ s(Dr, {});
|
|
3050
3050
|
}, os = () => {
|
|
3051
|
-
const { zoomLevel: t, setZoomLevel: e, currentZoom: n } =
|
|
3051
|
+
const { zoomLevel: t, setZoomLevel: e, currentZoom: n } = Me(), { container: r, pagesRef: o } = me(), { zoomTool: i = !0 } = be(), { zoomTool: a = !0 } = Se(), { isSmallScreen: d } = Le(), { localeMessages: l } = ue(), [m, h] = A(0), [b, p] = A(!1), w = k(
|
|
3052
3052
|
new ResizeObserver((g) => {
|
|
3053
3053
|
h(g[0].contentRect.height);
|
|
3054
3054
|
})
|
|
@@ -3062,12 +3062,12 @@ const Oe = {
|
|
|
3062
3062
|
const g = Math.ceil(n * 100 / 25) * 25;
|
|
3063
3063
|
return Math.min(g - 25, Tt);
|
|
3064
3064
|
});
|
|
3065
|
-
}, [e, n]), v =
|
|
3065
|
+
}, [e, n]), v = W(() => n * 100 <= Ji, [n]), _ = W(() => n * 100 >= Tt, [n]);
|
|
3066
3066
|
return N(() => (o && w.current.observe(o), () => {
|
|
3067
3067
|
w.current.disconnect();
|
|
3068
|
-
}), [o]), !i || !a ? null : typeof i == "function" ? /* @__PURE__ */ s(i, { zoomLevel: t, setZoomLevel: e }) : typeof a == "function" ? /* @__PURE__ */ s(a, { zoomLevel: t, setZoomLevel: e }) : /* @__PURE__ */ H("div", { className:
|
|
3068
|
+
}), [o]), !i || !a ? null : typeof i == "function" ? /* @__PURE__ */ s(i, { zoomLevel: t, setZoomLevel: e }) : typeof a == "function" ? /* @__PURE__ */ s(a, { zoomLevel: t, setZoomLevel: e }) : /* @__PURE__ */ H("div", { className: Ce["rp-zoom-wrapper"], children: [
|
|
3069
3069
|
/* @__PURE__ */ s(K, { content: l == null ? void 0 : l.zoomOutTooltip, children: /* @__PURE__ */ s(
|
|
3070
|
-
|
|
3070
|
+
ce,
|
|
3071
3071
|
{
|
|
3072
3072
|
disabled: v,
|
|
3073
3073
|
onClick: y,
|
|
@@ -3082,19 +3082,19 @@ const Oe = {
|
|
|
3082
3082
|
open: b,
|
|
3083
3083
|
onOpenChange: p,
|
|
3084
3084
|
triggerComponent: /* @__PURE__ */ s("div", { role: "button", children: /* @__PURE__ */ s(K, { content: l == null ? void 0 : l.zoomSelectTooltip, children: /* @__PURE__ */ H(
|
|
3085
|
-
|
|
3085
|
+
ce,
|
|
3086
3086
|
{
|
|
3087
|
-
className:
|
|
3088
|
-
|
|
3089
|
-
b &&
|
|
3087
|
+
className: se(
|
|
3088
|
+
Ce["rp-current-zoom-wrapper"],
|
|
3089
|
+
b && Ce.active
|
|
3090
3090
|
),
|
|
3091
3091
|
"aria-label": l == null ? void 0 : l.zoomSelectTooltip,
|
|
3092
3092
|
children: [
|
|
3093
|
-
typeof t == "number" ? /* @__PURE__ */ H(
|
|
3094
|
-
/* @__PURE__ */ s("span", { className:
|
|
3095
|
-
/* @__PURE__ */ s("span", { className:
|
|
3096
|
-
] }) : /* @__PURE__ */ s("span", { className:
|
|
3097
|
-
/* @__PURE__ */ s(Be, { className:
|
|
3093
|
+
typeof t == "number" ? /* @__PURE__ */ H(de, { children: [
|
|
3094
|
+
/* @__PURE__ */ s("span", { className: Ce["rp-current-zoom-text"], children: t }),
|
|
3095
|
+
/* @__PURE__ */ s("span", { className: Ce["rp-current-zoom-text"], children: "%" })
|
|
3096
|
+
] }) : /* @__PURE__ */ s("span", { className: Ce["rp-current-zoom-text"], children: t }),
|
|
3097
|
+
/* @__PURE__ */ s(Be, { className: Ce["rp-current-zoom-icon"] })
|
|
3098
3098
|
]
|
|
3099
3099
|
}
|
|
3100
3100
|
) }) }),
|
|
@@ -3106,15 +3106,15 @@ const Oe = {
|
|
|
3106
3106
|
"div",
|
|
3107
3107
|
{
|
|
3108
3108
|
style: { maxHeight: `${m}px`, overflow: "auto" },
|
|
3109
|
-
className:
|
|
3109
|
+
className: Ce["rp-zoom-dropdown-content"],
|
|
3110
3110
|
children: [
|
|
3111
3111
|
/* @__PURE__ */ H(tt, { children: [
|
|
3112
|
-
/* @__PURE__ */ s(
|
|
3113
|
-
/* @__PURE__ */ s(
|
|
3114
|
-
/* @__PURE__ */ s(
|
|
3112
|
+
/* @__PURE__ */ s(ye, { onClick: () => e(Xe.ACTUAL), children: l == null ? void 0 : l.zoomActualSize }),
|
|
3113
|
+
/* @__PURE__ */ s(ye, { onClick: () => e(Xe.PAGE_FIT), children: l == null ? void 0 : l.zoomPageFit }),
|
|
3114
|
+
/* @__PURE__ */ s(ye, { onClick: () => e(Xe.PAGE_WIDTH), children: l == null ? void 0 : l.zoomPageWidth })
|
|
3115
3115
|
] }),
|
|
3116
3116
|
/* @__PURE__ */ s(Et, {}),
|
|
3117
|
-
/* @__PURE__ */ s(tt, { children: es.map((g) => /* @__PURE__ */ H(
|
|
3117
|
+
/* @__PURE__ */ s(tt, { children: es.map((g) => /* @__PURE__ */ H(ye, { onClick: () => e(g), children: [
|
|
3118
3118
|
g,
|
|
3119
3119
|
" %"
|
|
3120
3120
|
] }, g)) })
|
|
@@ -3124,7 +3124,7 @@ const Oe = {
|
|
|
3124
3124
|
}
|
|
3125
3125
|
),
|
|
3126
3126
|
/* @__PURE__ */ s(K, { content: l == null ? void 0 : l.zoomInTooltip, children: /* @__PURE__ */ s(
|
|
3127
|
-
|
|
3127
|
+
ce,
|
|
3128
3128
|
{
|
|
3129
3129
|
disabled: _,
|
|
3130
3130
|
onClick: P,
|
|
@@ -3134,14 +3134,14 @@ const Oe = {
|
|
|
3134
3134
|
) })
|
|
3135
3135
|
] });
|
|
3136
3136
|
}, dn = () => {
|
|
3137
|
-
const { totalMatches: t, nextMatch: e, prevMatch: n } = Dt(), { localeMessages: r } =
|
|
3138
|
-
return /* @__PURE__ */ H(
|
|
3137
|
+
const { totalMatches: t, nextMatch: e, prevMatch: n } = Dt(), { localeMessages: r } = ue();
|
|
3138
|
+
return /* @__PURE__ */ H(de, { children: [
|
|
3139
3139
|
/* @__PURE__ */ s(
|
|
3140
3140
|
K,
|
|
3141
3141
|
{
|
|
3142
3142
|
content: r == null ? void 0 : r.searchPrevTooltip,
|
|
3143
3143
|
className: te["rp-search-tool-result-navigator"],
|
|
3144
|
-
children: /* @__PURE__ */ s(
|
|
3144
|
+
children: /* @__PURE__ */ s(ce, { tabIndex: 0, onClick: n, "aria-label": r == null ? void 0 : r.searchPrevTooltip, children: /* @__PURE__ */ s(
|
|
3145
3145
|
Be,
|
|
3146
3146
|
{
|
|
3147
3147
|
className: te["rp-search-tool-input-icon"],
|
|
@@ -3155,7 +3155,7 @@ const Oe = {
|
|
|
3155
3155
|
{
|
|
3156
3156
|
content: r == null ? void 0 : r.searchNextTooltip,
|
|
3157
3157
|
className: te["rp-search-tool-result-navigator"],
|
|
3158
|
-
children: /* @__PURE__ */ s(
|
|
3158
|
+
children: /* @__PURE__ */ s(ce, { tabIndex: 0, onClick: e, "aria-label": r == null ? void 0 : r.searchNextTooltip, children: /* @__PURE__ */ s(
|
|
3159
3159
|
Be,
|
|
3160
3160
|
{
|
|
3161
3161
|
style: { transform: "rotate(180deg" },
|
|
@@ -3167,10 +3167,10 @@ const Oe = {
|
|
|
3167
3167
|
)
|
|
3168
3168
|
] });
|
|
3169
3169
|
}, rs = () => {
|
|
3170
|
-
const { searchIcon: t } =
|
|
3170
|
+
const { searchIcon: t } = ve(), { searchIcon: e } = ge();
|
|
3171
3171
|
return t || e || /* @__PURE__ */ s(Cn, {});
|
|
3172
3172
|
}, is = ({ icon: t }) => {
|
|
3173
|
-
const { container: e } =
|
|
3173
|
+
const { container: e } = me(), [n, r] = A(!1), { pdf: o } = J(), [i, a] = A(null), {
|
|
3174
3174
|
searchOptions: d,
|
|
3175
3175
|
setSearchOptions: l,
|
|
3176
3176
|
loading: m,
|
|
@@ -3180,76 +3180,80 @@ const Oe = {
|
|
|
3180
3180
|
nextMatch: w,
|
|
3181
3181
|
prevMatch: P,
|
|
3182
3182
|
search: y
|
|
3183
|
-
} = Dt(), { searchTool: v = !0 } =
|
|
3183
|
+
} = Dt(), { searchTool: v = !0 } = be(), { searchTool: _ = !0 } = Se(), [g, f] = A(y), { localeMessages: u } = ue(), { isSmallScreen: c } = Le(), [T, C] = A(null), [x, R] = A(!1), I = E(() => {
|
|
3184
3184
|
r(!0);
|
|
3185
3185
|
}, []), S = E(() => {
|
|
3186
3186
|
h(""), f(""), r(!1);
|
|
3187
|
-
}, [h]),
|
|
3188
|
-
const
|
|
3189
|
-
(
|
|
3190
|
-
},
|
|
3191
|
-
(
|
|
3192
|
-
|
|
3187
|
+
}, [h]), D = (q) => {
|
|
3188
|
+
const Y = q.key === "Enter", oe = q.key === " ";
|
|
3189
|
+
(Y || oe) && S();
|
|
3190
|
+
}, z = E(
|
|
3191
|
+
(q) => {
|
|
3192
|
+
q.key === "Escape" && n && S();
|
|
3193
3193
|
},
|
|
3194
3194
|
[n]
|
|
3195
|
-
),
|
|
3196
|
-
(
|
|
3197
|
-
|
|
3195
|
+
), M = E(
|
|
3196
|
+
(q) => {
|
|
3197
|
+
q.shiftKey && q.key === "Enter" ? P() : q.key === "Enter" && y !== g ? h(g) : q.key === "Enter" && w();
|
|
3198
3198
|
},
|
|
3199
3199
|
[g, P, w, h, y]
|
|
3200
3200
|
);
|
|
3201
3201
|
N(() => {
|
|
3202
3202
|
f(y);
|
|
3203
|
-
}, [y]), N(() =>
|
|
3204
|
-
|
|
3205
|
-
}
|
|
3203
|
+
}, [y]), N(() => {
|
|
3204
|
+
y && o && R(!0);
|
|
3205
|
+
}, [y, o]), N(() => {
|
|
3206
|
+
y && y.trim() !== "" && (f(y), h(y));
|
|
3207
|
+
}, []), N(() => (window.addEventListener("keydown", z), () => {
|
|
3208
|
+
window.removeEventListener("keydown", z);
|
|
3209
|
+
}), [z]), N(() => {
|
|
3206
3210
|
i && setTimeout(() => {
|
|
3207
3211
|
i.focus();
|
|
3208
3212
|
}, 0);
|
|
3209
3213
|
}, [i]);
|
|
3210
|
-
const
|
|
3211
|
-
f(
|
|
3212
|
-
}, []),
|
|
3214
|
+
const L = E((q) => {
|
|
3215
|
+
f(q.target.value);
|
|
3216
|
+
}, []), O = E(() => {
|
|
3213
3217
|
f(""), h("");
|
|
3214
|
-
}, [h]),
|
|
3215
|
-
(
|
|
3216
|
-
l((
|
|
3218
|
+
}, [h]), F = W(() => `${p} / ${b}`, [p, b]), { wholeWords: $, matchCase: G } = W(() => d, [d]), B = E(
|
|
3219
|
+
(q) => {
|
|
3220
|
+
l((Y) => ({ ...Y, matchCase: q }));
|
|
3217
3221
|
},
|
|
3218
3222
|
[l]
|
|
3219
|
-
),
|
|
3220
|
-
(
|
|
3221
|
-
l((
|
|
3223
|
+
), j = E(
|
|
3224
|
+
(q) => {
|
|
3225
|
+
l((Y) => ({ ...Y, wholeWords: q }));
|
|
3222
3226
|
},
|
|
3223
3227
|
[l]
|
|
3224
3228
|
);
|
|
3225
3229
|
N(() => {
|
|
3226
|
-
S();
|
|
3230
|
+
o && x && S();
|
|
3227
3231
|
}, [o, S]);
|
|
3228
|
-
const V =
|
|
3229
|
-
(
|
|
3230
|
-
if (
|
|
3231
|
-
const
|
|
3232
|
-
let
|
|
3233
|
-
V.forEach((
|
|
3234
|
-
|
|
3232
|
+
const V = W(() => (T == null ? void 0 : T.querySelectorAll('[tabindex]:not([tabindex="-1"])')) || [], [T]), ee = E(
|
|
3233
|
+
(q) => {
|
|
3234
|
+
if (q.key === "Tab") {
|
|
3235
|
+
const Y = document.activeElement;
|
|
3236
|
+
let oe = 0;
|
|
3237
|
+
V.forEach((ie, he) => {
|
|
3238
|
+
ie === Y && (oe = he);
|
|
3235
3239
|
});
|
|
3236
|
-
let
|
|
3237
|
-
|
|
3238
|
-
const
|
|
3239
|
-
if (
|
|
3240
|
-
|
|
3241
|
-
else if (
|
|
3242
|
-
const
|
|
3243
|
-
|
|
3240
|
+
let re = oe + 1;
|
|
3241
|
+
q.shiftKey && (re = oe - 1);
|
|
3242
|
+
const Q = V[re];
|
|
3243
|
+
if (Q)
|
|
3244
|
+
Q.focus();
|
|
3245
|
+
else if (re > V.length - 1) {
|
|
3246
|
+
const ie = V[0];
|
|
3247
|
+
ie && ie.focus();
|
|
3244
3248
|
} else {
|
|
3245
|
-
const
|
|
3246
|
-
|
|
3249
|
+
const ie = V[V.length - 1];
|
|
3250
|
+
ie && ie.focus();
|
|
3247
3251
|
}
|
|
3248
3252
|
}
|
|
3249
3253
|
},
|
|
3250
3254
|
[V]
|
|
3251
3255
|
);
|
|
3252
|
-
return !v || !_ ? null : /* @__PURE__ */ s(
|
|
3256
|
+
return !v || !_ ? null : /* @__PURE__ */ s(de, { children: /* @__PURE__ */ s(
|
|
3253
3257
|
Rt,
|
|
3254
3258
|
{
|
|
3255
3259
|
open: n,
|
|
@@ -3259,10 +3263,10 @@ const Oe = {
|
|
|
3259
3263
|
tabIndex: 0,
|
|
3260
3264
|
avoidCollisions: !1,
|
|
3261
3265
|
triggerComponent: /* @__PURE__ */ s(K, { content: u == null ? void 0 : u.searchButtonTooltip, children: /* @__PURE__ */ s(
|
|
3262
|
-
|
|
3266
|
+
ce,
|
|
3263
3267
|
{
|
|
3264
3268
|
active: n,
|
|
3265
|
-
onClick:
|
|
3269
|
+
onClick: I,
|
|
3266
3270
|
"aria-label": u == null ? void 0 : u.searchButtonTooltip,
|
|
3267
3271
|
children: t || /* @__PURE__ */ s(rs, {})
|
|
3268
3272
|
}
|
|
@@ -3273,7 +3277,7 @@ const Oe = {
|
|
|
3273
3277
|
ref: C,
|
|
3274
3278
|
className: te["rp-search-tool-content"],
|
|
3275
3279
|
tabIndex: 0,
|
|
3276
|
-
onKeyDown:
|
|
3280
|
+
onKeyDown: ee,
|
|
3277
3281
|
children: [
|
|
3278
3282
|
/* @__PURE__ */ H("div", { className: te["rp-search-tool-input-wrapper"], children: [
|
|
3279
3283
|
/* @__PURE__ */ H("div", { className: te["rp-search-tool-input"], children: [
|
|
@@ -3281,8 +3285,8 @@ const Oe = {
|
|
|
3281
3285
|
fn,
|
|
3282
3286
|
{
|
|
3283
3287
|
value: g,
|
|
3284
|
-
onKeyDown:
|
|
3285
|
-
onChange:
|
|
3288
|
+
onKeyDown: M,
|
|
3289
|
+
onChange: L,
|
|
3286
3290
|
icon: /* @__PURE__ */ s(Cn, {}),
|
|
3287
3291
|
placeholder: u == null ? void 0 : u.searchInputPlaceholder,
|
|
3288
3292
|
className: te["rp-search-input"],
|
|
@@ -3290,11 +3294,11 @@ const Oe = {
|
|
|
3290
3294
|
id: "search-input",
|
|
3291
3295
|
name: "search-input",
|
|
3292
3296
|
tabIndex: 0,
|
|
3293
|
-
children: !!g && /* @__PURE__ */ s("span", { className: te["rp-search-tool-input-clear"], onClick:
|
|
3297
|
+
children: !!g && /* @__PURE__ */ s("span", { className: te["rp-search-tool-input-clear"], onClick: O, children: /* @__PURE__ */ s(zr, {}) })
|
|
3294
3298
|
}
|
|
3295
3299
|
) }),
|
|
3296
|
-
m ? /* @__PURE__ */ s("span", { children: /* @__PURE__ */ s(Lt, { className: te["rp-search-loader-icon"] }) }) : /* @__PURE__ */ s("span", { children:
|
|
3297
|
-
c && /* @__PURE__ */ s("div", { className: te["rp-search-tool-controls"], children: /* @__PURE__ */ s(qt, { onKeyPress:
|
|
3300
|
+
m ? /* @__PURE__ */ s("span", { children: /* @__PURE__ */ s(Lt, { className: te["rp-search-loader-icon"] }) }) : /* @__PURE__ */ s("span", { children: F }),
|
|
3301
|
+
c && /* @__PURE__ */ s("div", { className: te["rp-search-tool-controls"], children: /* @__PURE__ */ s(qt, { onKeyPress: D, handleClose: S }) })
|
|
3298
3302
|
] }),
|
|
3299
3303
|
/* @__PURE__ */ H("div", { className: te["rp-search-tool-input-checkboxes"], children: [
|
|
3300
3304
|
c && /* @__PURE__ */ s(dn, {}),
|
|
@@ -3303,8 +3307,8 @@ const Oe = {
|
|
|
3303
3307
|
{
|
|
3304
3308
|
tabIndex: 0,
|
|
3305
3309
|
name: "matchCase",
|
|
3306
|
-
value:
|
|
3307
|
-
onChange:
|
|
3310
|
+
value: G,
|
|
3311
|
+
onChange: B,
|
|
3308
3312
|
children: u == null ? void 0 : u.searchMatchCaseLabel
|
|
3309
3313
|
}
|
|
3310
3314
|
),
|
|
@@ -3314,8 +3318,8 @@ const Oe = {
|
|
|
3314
3318
|
{
|
|
3315
3319
|
tabIndex: 0,
|
|
3316
3320
|
name: "wholeWord",
|
|
3317
|
-
value:
|
|
3318
|
-
onChange:
|
|
3321
|
+
value: $,
|
|
3322
|
+
onChange: j,
|
|
3319
3323
|
children: u == null ? void 0 : u.searchWholeWordsLabel
|
|
3320
3324
|
}
|
|
3321
3325
|
),
|
|
@@ -3324,14 +3328,14 @@ const Oe = {
|
|
|
3324
3328
|
] }),
|
|
3325
3329
|
!c && /* @__PURE__ */ H("div", { className: te["rp-search-tool-controls"], children: [
|
|
3326
3330
|
/* @__PURE__ */ s(dn, {}),
|
|
3327
|
-
/* @__PURE__ */ s(qt, { onKeyPress:
|
|
3331
|
+
/* @__PURE__ */ s(qt, { onKeyPress: D, handleClose: S })
|
|
3328
3332
|
] })
|
|
3329
3333
|
]
|
|
3330
3334
|
}
|
|
3331
3335
|
)
|
|
3332
3336
|
}
|
|
3333
3337
|
) });
|
|
3334
|
-
}, ss = "_loading_wazy2_1",
|
|
3338
|
+
}, ss = "_loading_wazy2_1", He = {
|
|
3335
3339
|
"rp-loading-overlay": "_rp-loading-overlay_wazy2_1",
|
|
3336
3340
|
"rp-loading-modal": "_rp-loading-modal_wazy2_14",
|
|
3337
3341
|
"rp-loading-title": "_rp-loading-title_wazy2_27",
|
|
@@ -3340,23 +3344,23 @@ const Oe = {
|
|
|
3340
3344
|
"rp-loading-cancel-button": "_rp-loading-cancel-button_wazy2_55",
|
|
3341
3345
|
loading: ss
|
|
3342
3346
|
}, as = ({ percentage: t }) => {
|
|
3343
|
-
const { cancel: e } = st(), { localeMessages: n } =
|
|
3344
|
-
return t < 1 ? null : /* @__PURE__ */ s("div", { className:
|
|
3345
|
-
/* @__PURE__ */ H("div", { className:
|
|
3347
|
+
const { cancel: e } = st(), { localeMessages: n } = ue();
|
|
3348
|
+
return t < 1 ? null : /* @__PURE__ */ s("div", { className: se(He["rp-loading-overlay"]), children: /* @__PURE__ */ H("div", { className: se(He["rp-loading-modal"]), children: [
|
|
3349
|
+
/* @__PURE__ */ H("div", { className: se(He["rp-loading-title"]), children: [
|
|
3346
3350
|
n == null ? void 0 : n.printLoadingMessage,
|
|
3347
3351
|
"..."
|
|
3348
3352
|
] }),
|
|
3349
|
-
/* @__PURE__ */ s("div", { className:
|
|
3353
|
+
/* @__PURE__ */ s("div", { className: se(He["rp-loading-progress-bar"]), children: /* @__PURE__ */ s(
|
|
3350
3354
|
"div",
|
|
3351
3355
|
{
|
|
3352
|
-
className:
|
|
3356
|
+
className: se(He["rp-loading-progress"]),
|
|
3353
3357
|
style: { width: `${t}%` }
|
|
3354
3358
|
}
|
|
3355
3359
|
) }),
|
|
3356
|
-
/* @__PURE__ */ s("button", { className:
|
|
3360
|
+
/* @__PURE__ */ s("button", { className: se(He["rp-loading-cancel-button"]), onClick: e, children: n == null ? void 0 : n.printCancelLabel })
|
|
3357
3361
|
] }) });
|
|
3358
3362
|
}, cs = rt((t, e) => {
|
|
3359
|
-
const { showPrintProgress: n = !0 } =
|
|
3363
|
+
const { showPrintProgress: n = !0 } = be(), { showPrintProgress: r = !0 } = Se(), { progress: o } = st(), { isSmallScreen: i } = Le(), { percentage: a } = o || {}, d = () => i ? { gridTemplateColumns: "25% 60% 15%" } : void 0, l = () => {
|
|
3360
3364
|
if (!(!n || !r || !a))
|
|
3361
3365
|
return /* @__PURE__ */ s(as, { percentage: a });
|
|
3362
3366
|
};
|
|
@@ -3383,7 +3387,7 @@ const Oe = {
|
|
|
3383
3387
|
"rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
|
|
3384
3388
|
"rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
|
|
3385
3389
|
}, ls = (t) => {
|
|
3386
|
-
const { pageNumber: e, isFocused: n, viewport: r } = t, { goToPage: o } =
|
|
3390
|
+
const { pageNumber: e, isFocused: n, viewport: r } = t, { goToPage: o } = ae(), { pageRotate: i } = qe(), a = k(null), d = Dn(), { pages: l } = J(), [m, h] = A(null), b = k(!1), p = k(), w = W(() => n ? Ue["rp-thumbnail-active"] : "", [n]), P = W(() => ({
|
|
3387
3391
|
width: Math.round(r.width),
|
|
3388
3392
|
height: Math.round(r.height)
|
|
3389
3393
|
}), [r]), y = E(() => {
|
|
@@ -3443,7 +3447,7 @@ const Oe = {
|
|
|
3443
3447
|
style: {
|
|
3444
3448
|
transform: `rotate(${i[e || 0]}deg)`
|
|
3445
3449
|
},
|
|
3446
|
-
className:
|
|
3450
|
+
className: se(w, Ue["rp-thumbnail"]),
|
|
3447
3451
|
children: m ? /* @__PURE__ */ s(
|
|
3448
3452
|
"img",
|
|
3449
3453
|
{
|
|
@@ -3476,9 +3480,9 @@ const Oe = {
|
|
|
3476
3480
|
const n = t == null ? void 0 : t.querySelector(`#page-${e}`);
|
|
3477
3481
|
t && (n != null && n.offsetTop) && (t.scrollTop = (n == null ? void 0 : n.offsetTop) - ds);
|
|
3478
3482
|
}, ps = rt((t, e) => {
|
|
3479
|
-
const { show: n } = t, { focusedPage: r, totalPages: o } =
|
|
3483
|
+
const { show: n } = t, { focusedPage: r, totalPages: o } = ae(), { thumbnailPages: i, addPage: a, thumbnailLength: d, addToPage: l } = Rn(), m = k(null), h = k(1);
|
|
3480
3484
|
pn(e, () => m.current);
|
|
3481
|
-
const b =
|
|
3485
|
+
const b = W(() => Object.values(i), [i]), p = E(() => {
|
|
3482
3486
|
const w = d + 1;
|
|
3483
3487
|
w <= o && a(w);
|
|
3484
3488
|
}, [a, o, d]);
|
|
@@ -3499,13 +3503,13 @@ const Oe = {
|
|
|
3499
3503
|
);
|
|
3500
3504
|
}) : null }) });
|
|
3501
3505
|
}), hs = () => {
|
|
3502
|
-
const { thumbnailIcon: t } =
|
|
3506
|
+
const { thumbnailIcon: t } = ve(), { thumbnailIcon: e } = ge();
|
|
3503
3507
|
return t || e || /* @__PURE__ */ s(zo, {});
|
|
3504
3508
|
}, fs = () => {
|
|
3505
|
-
const { active: t, setActive: e } = Rn(), [n, r] =
|
|
3509
|
+
const { active: t, setActive: e } = Rn(), [n, r] = A(200), o = k(null), { thumbnailTool: i, sidebarEnable: a } = be(), { localeMessages: d } = ue(), l = E(() => {
|
|
3506
3510
|
e((h) => !h);
|
|
3507
|
-
}, []), m =
|
|
3508
|
-
|
|
3511
|
+
}, []), m = W(() => typeof i != "boolean" && i ? /* @__PURE__ */ s(i, { onClick: l, active: t }) : i ? /* @__PURE__ */ s(K, { content: d == null ? void 0 : d.thumbnailTooltip, children: /* @__PURE__ */ s(
|
|
3512
|
+
ce,
|
|
3509
3513
|
{
|
|
3510
3514
|
onClick: l,
|
|
3511
3515
|
active: t,
|
|
@@ -3513,7 +3517,7 @@ const Oe = {
|
|
|
3513
3517
|
children: /* @__PURE__ */ s(hs, {})
|
|
3514
3518
|
}
|
|
3515
3519
|
) }) : null, [i, t, l, d]);
|
|
3516
|
-
return /* @__PURE__ */ s(
|
|
3520
|
+
return /* @__PURE__ */ s(de, { children: a && /* @__PURE__ */ H(
|
|
3517
3521
|
"div",
|
|
3518
3522
|
{
|
|
3519
3523
|
style: { "--rp-thumbnail-width": `${n}px` },
|
|
@@ -3547,22 +3551,22 @@ const Oe = {
|
|
|
3547
3551
|
onLoaded: l,
|
|
3548
3552
|
cleanupOnLoaded: m,
|
|
3549
3553
|
onLayoutWidthChange: h
|
|
3550
|
-
} = t, [b, p] =
|
|
3554
|
+
} = t, [b, p] = A(null), { setContainer: w, setContentRef: P } = me(), { loading: y } = J(), { LoaderImageComponent: v } = wn();
|
|
3551
3555
|
return N(() => (l && l(), () => {
|
|
3552
3556
|
m && m();
|
|
3553
3557
|
}), [l, m]), // TODO: deprecated in v2.0.0, remove later ~
|
|
3554
3558
|
/* @__PURE__ */ s(Wn, { toolbarRef: b, ref: e, children: /* @__PURE__ */ s(Fo, { mobileWidth: d, onLayoutWidthChange: h, children: /* @__PURE__ */ s(Wo, { slots: r, children: /* @__PURE__ */ s($o, { icons: o, children: /* @__PURE__ */ s(Do, { children: /* @__PURE__ */ H(Ao, { getContainerRef: w, style: i, className: a, children: [
|
|
3555
3559
|
/* @__PURE__ */ H(Mo, { children: [
|
|
3556
|
-
/* @__PURE__ */ H("div", { className:
|
|
3560
|
+
/* @__PURE__ */ H("div", { className: Pe["rp-layout"], children: [
|
|
3557
3561
|
/* @__PURE__ */ s(
|
|
3558
3562
|
cs,
|
|
3559
3563
|
{
|
|
3560
3564
|
ref: p
|
|
3561
3565
|
}
|
|
3562
3566
|
),
|
|
3563
|
-
/* @__PURE__ */ H("div", { className:
|
|
3564
|
-
/* @__PURE__ */ s("div", { className:
|
|
3565
|
-
/* @__PURE__ */ s("div", { ref: P, className:
|
|
3567
|
+
/* @__PURE__ */ H("div", { className: Pe["rp-content"], children: [
|
|
3568
|
+
/* @__PURE__ */ s("div", { className: Pe["rp-sidebar"], children: /* @__PURE__ */ s(fs, {}) }),
|
|
3569
|
+
/* @__PURE__ */ s("div", { ref: P, className: Pe["rp-pages"], children: n })
|
|
3566
3570
|
] })
|
|
3567
3571
|
] }),
|
|
3568
3572
|
/* @__PURE__ */ s(Ho, {})
|
|
@@ -3570,7 +3574,7 @@ const Oe = {
|
|
|
3570
3574
|
y ? /* @__PURE__ */ s(
|
|
3571
3575
|
"div",
|
|
3572
3576
|
{
|
|
3573
|
-
className:
|
|
3577
|
+
className: Pe["rp-loader"],
|
|
3574
3578
|
style: {
|
|
3575
3579
|
position: "absolute",
|
|
3576
3580
|
top: 0,
|
|
@@ -3645,16 +3649,16 @@ export {
|
|
|
3645
3649
|
fs as a8,
|
|
3646
3650
|
Qn as b,
|
|
3647
3651
|
st as c,
|
|
3648
|
-
|
|
3652
|
+
Me as d,
|
|
3649
3653
|
Dt as e,
|
|
3650
3654
|
kr as f,
|
|
3651
|
-
|
|
3655
|
+
Pe as g,
|
|
3652
3656
|
ac as h,
|
|
3653
3657
|
lc as i,
|
|
3654
3658
|
ic as j,
|
|
3655
3659
|
Rn as k,
|
|
3656
3660
|
bt as l,
|
|
3657
|
-
|
|
3661
|
+
Ce as m,
|
|
3658
3662
|
Ve as n,
|
|
3659
3663
|
Ti as o,
|
|
3660
3664
|
os as p,
|
|
@@ -3662,9 +3666,9 @@ export {
|
|
|
3662
3666
|
fc as r,
|
|
3663
3667
|
ps as s,
|
|
3664
3668
|
as as t,
|
|
3665
|
-
|
|
3669
|
+
ae as u,
|
|
3666
3670
|
Pn as v,
|
|
3667
|
-
|
|
3671
|
+
Ge as w,
|
|
3668
3672
|
xn as x,
|
|
3669
3673
|
Ar as y,
|
|
3670
3674
|
In as z
|