@pdf-viewer/react 1.2.0-beta.1 → 1.2.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Container-8fea0875.js +39 -0
- package/dist/{RPDefaultLayout-17ed747f.js → RPDefaultLayout-31523cdc.js} +257 -257
- package/dist/assets/Container.css +1 -1
- package/dist/assets/Popover.css +1 -1
- package/dist/assets/RPDefaultLayout.css +1 -1
- package/dist/components/RPController.js +1 -1
- package/dist/components/RPPages.js +1 -1
- package/dist/components/RPProvider.js +1 -1
- package/dist/components/layout/Container.js +1 -1
- package/dist/components/layout/RPDefaultLayout.js +2 -2
- 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/SearchTool.js +1 -1
- package/dist/components/layout/toolbar/ZoomTool.js +1 -1
- package/dist/components/page/AnnotationLayer.js +1 -1
- package/dist/components/page/CanvasLayer.js +1 -1
- package/dist/components/page/DualPage.js +1 -1
- package/dist/components/page/RPPage.js +1 -1
- package/dist/components/page/SinglePage.js +1 -1
- package/dist/components/page/TextLayer.js +1 -1
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/components/ui/Popover.js +166 -166
- package/dist/contexts/PaginationContext.js +1 -1
- package/dist/contexts/PrintContext.js +1 -1
- package/dist/contexts/SearchContext.js +1 -1
- package/dist/contexts/ThumbnailsContext.js +1 -1
- package/dist/main.js +1 -1
- package/dist/types/utils/types.d.ts +6 -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/usePrint.js +1 -1
- package/dist/utils/hooks/useScrollToPage.js +1 -1
- package/dist/utils/hooks/useSearch.js +1 -1
- package/dist/utils/hooks/useThumbnail.js +1 -1
- package/dist/utils/hooks/useVirtualReactWindow.js +1 -1
- package/dist/utils/types.js +9 -9
- package/package.json +1 -1
- package/dist/Container-f68e1779.js +0 -38
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as i, jsxs as
|
|
1
|
+
import { jsx as i, jsxs as D, Fragment as ke } from "react/jsx-runtime";
|
|
2
2
|
import * as V from "react";
|
|
3
|
-
import { useRef as W, useEffect as O, useCallback as L, useState as H, createContext as Be, useContext as Ke, useMemo as
|
|
3
|
+
import { useRef as W, useEffect as O, useCallback as L, useState as H, createContext as Be, useContext as Ke, useMemo as k, forwardRef as Xe, useImperativeHandle as en, createElement as $e, PureComponent as Jn, Component as Yn, memo as Qn } from "react";
|
|
4
4
|
import { ChevronUpIcon as We } from "./components/icons/ChevronUpIcon.js";
|
|
5
5
|
import { UIButton as te } from "./components/ui/Button.js";
|
|
6
6
|
import { UIInput as tn } from "./components/ui/Input.js";
|
|
@@ -24,7 +24,7 @@ import { renderPage as mt } from "./utils/renderPage.js";
|
|
|
24
24
|
import { highlightMatches as rn, findMatches as ir, resetDivs as ar } from "./utils/highlight.js";
|
|
25
25
|
import * as on from "pdfjs-dist";
|
|
26
26
|
import { PixelsPerInch as sr, AnnotationMode as cr, RenderingCancelledException as lr, AnnotationLayer as ur } from "pdfjs-dist";
|
|
27
|
-
import { useLayoutContainer as
|
|
27
|
+
import { useLayoutContainer as Ie } from "./contexts/LayoutContainerContext.js";
|
|
28
28
|
import { useDimensionPagesContext as an } from "./contexts/DimensionPagesContext.js";
|
|
29
29
|
import { useLocalizationContext as le } from "./contexts/LocalizationContext.js";
|
|
30
30
|
import "./components/RPConfig.js";
|
|
@@ -35,11 +35,11 @@ import { useInfiniteScroll as pr } from "./utils/hooks/useInfiniteScroll.js";
|
|
|
35
35
|
import { RPSplitter as hr } from "./components/layout/sidebar/RPSplitter.js";
|
|
36
36
|
import { useToolbarComponentContext as ge, ToolbarComponentProvider as mr } from "./contexts/ToolbarComponentContext.js";
|
|
37
37
|
import { useIconContext as ue, IconProvider as fr } from "./contexts/IconContext.js";
|
|
38
|
-
import
|
|
39
|
-
import { c as
|
|
38
|
+
import j from "./components/ui/RPTooltip.js";
|
|
39
|
+
import { c as Ce, C as gr } from "./Container-8fea0875.js";
|
|
40
40
|
import { WrapperLayout as vr } from "./components/layout/WrapperLayout.js";
|
|
41
41
|
import { RPDropFileZone as _r } from "./components/RPDropFileZone.js";
|
|
42
|
-
import { useViewportContext as
|
|
42
|
+
import { useViewportContext as ye, ViewportProvider as wr } from "./contexts/ViewportContext.js";
|
|
43
43
|
import "./contexts/ThemeContext.js";
|
|
44
44
|
import { SimpleLinkService as br } from "./utils/link_service.js";
|
|
45
45
|
import { dateFormatter as ft } from "./utils/dateFormatter.js";
|
|
@@ -51,15 +51,15 @@ import { usePinch as Ir } from "./utils/hooks/usePinch.js";
|
|
|
51
51
|
import { useDebounce as gt } from "./utils/hooks/useDebounce.js";
|
|
52
52
|
import { getThumbnailViewport as Et } from "./utils/getThumbnailViewport.js";
|
|
53
53
|
import { useDimensionPages as yr } from "./utils/hooks/useDimensionPages.js";
|
|
54
|
-
import { smoothScrollTo as
|
|
54
|
+
import { smoothScrollTo as Te } from "./utils/smoothScrollTo.js";
|
|
55
55
|
import { appConsole as xr } from "./utils/appConsole.js";
|
|
56
56
|
import { FileUploadTool as sn } from "./components/layout/toolbar/FileUploadTool.js";
|
|
57
57
|
import { DarkModeTool as Rr } from "./components/layout/toolbar/DarkModeTool.js";
|
|
58
58
|
import { ThreeDotIcon as Lr } from "./components/icons/ThreeDotIcon.js";
|
|
59
59
|
import { UIDropDown as cn } from "./components/ui/DropDown.js";
|
|
60
|
-
import { c as Nr, u as Tt, P as He, b as
|
|
61
|
-
import { D as
|
|
62
|
-
import { a as Ar, h as
|
|
60
|
+
import { c as Nr, u as Tt, P as He, b as Fe, d as Pt, i as Er, k as Or, a as Dr } from "./index-48ca3f30.js";
|
|
61
|
+
import { D as zr, d as rt } from "./floating-ui.react-dom-88a86594.js";
|
|
62
|
+
import { a as Ar, h as Fr, u as kr, F as Wr, b as Mr, G as je } from "./index-4ba3ab9a.js";
|
|
63
63
|
import { CloseIcon as ln } from "./components/icons/CloseIcon.js";
|
|
64
64
|
import { PropertyItem as Hr } from "./components/layout/toolbar/PropertyItem.js";
|
|
65
65
|
import { useOtherToolContext as $r, OtherToolProvider as Gr } from "./contexts/OtherToolContext.js";
|
|
@@ -67,9 +67,9 @@ import { DocumentProperties as Vr } from "./components/layout/toolbar/DocumentPr
|
|
|
67
67
|
import { RotateTool as Ur } from "./components/layout/toolbar/RotateTool.js";
|
|
68
68
|
import { ScrollModeTool as qr } from "./components/layout/toolbar/ScrollModeTool.js";
|
|
69
69
|
import { MenuSeparator as St } from "./components/layout/toolbar/MenuSeparator.js";
|
|
70
|
-
import { FileDownloadDefaultIcon as
|
|
70
|
+
import { FileDownloadDefaultIcon as jr } from "./components/icons/FileDownloadDefaultIcon.js";
|
|
71
71
|
import { MenuItem as we } from "./components/layout/toolbar/MenuItem.js";
|
|
72
|
-
import { PrintDefaultTool as
|
|
72
|
+
import { PrintDefaultTool as Zr } from "./components/icons/PrintDefaultIcon.js";
|
|
73
73
|
import { FullScreenTool as un } from "./components/layout/toolbar/FullScreenTool.js";
|
|
74
74
|
import { GoToDownIcon as dn } from "./components/icons/GoToDownIcon.js";
|
|
75
75
|
import { SelectionModeTool as Br } from "./components/layout/toolbar/SelectionModeTool.js";
|
|
@@ -78,9 +78,9 @@ import { ZoomOutIcon as Xr } from "./components/icons/ZoomOutIcon.js";
|
|
|
78
78
|
import { PAGE_PADDING as Ot } from "./utils/constants.js";
|
|
79
79
|
import { getZoomLevel as Jr } from "./utils/getZoomLevel.js";
|
|
80
80
|
import { SearchIcon as Yr } from "./components/icons/SearchIcon.js";
|
|
81
|
-
import { UICheckbox as
|
|
81
|
+
import { UICheckbox as Dt } from "./components/ui/Checkbox.js";
|
|
82
82
|
import { ClearIcon as Qr } from "./components/icons/ClearIcon.js";
|
|
83
|
-
import { InfoIcon as
|
|
83
|
+
import { InfoIcon as zt } from "./components/icons/InfoIcon.js";
|
|
84
84
|
import { UIPopOver as eo } from "./components/ui/Popover.js";
|
|
85
85
|
import './assets/RPDefaultLayout.css';const pn = () => {
|
|
86
86
|
const { viewMode: t } = Qe(), { scrollMode: e } = Ee(), { virtualScrollRef: n, virtualScrollableElementRef: o, pageScrollElementRef: r } = et(), { setFocusedPage: a } = se(), s = W(), { columnCount: c } = nn(), { widths: l, heights: u } = yr(), h = W(e), m = W(t), d = W(c);
|
|
@@ -95,7 +95,7 @@ import './assets/RPDefaultLayout.css';const pn = () => {
|
|
|
95
95
|
return;
|
|
96
96
|
const v = Math.ceil(b / 2) * 2 - 1;
|
|
97
97
|
return b === v + 1 ? new Promise(
|
|
98
|
-
(_) =>
|
|
98
|
+
(_) => Te(
|
|
99
99
|
r,
|
|
100
100
|
{
|
|
101
101
|
left: l[v],
|
|
@@ -104,10 +104,10 @@ import './assets/RPDefaultLayout.css';const pn = () => {
|
|
|
104
104
|
_
|
|
105
105
|
)
|
|
106
106
|
) : new Promise(
|
|
107
|
-
(_) =>
|
|
107
|
+
(_) => Te(r, { left: 0, top: 0 }, _)
|
|
108
108
|
);
|
|
109
109
|
},
|
|
110
|
-
[r, l,
|
|
110
|
+
[r, l, Te]
|
|
111
111
|
);
|
|
112
112
|
return O(() => {
|
|
113
113
|
h.current = e, m.current = t;
|
|
@@ -128,19 +128,19 @@ import './assets/RPDefaultLayout.css';const pn = () => {
|
|
|
128
128
|
f = v;
|
|
129
129
|
const p = v * (l[v] ?? 0);
|
|
130
130
|
return new Promise(
|
|
131
|
-
(T) =>
|
|
131
|
+
(T) => Te(P, { left: p, top: 0 }, T)
|
|
132
132
|
);
|
|
133
133
|
}
|
|
134
134
|
if (m.current === qe.DUAL_PAGE) {
|
|
135
135
|
f = v % 2, _ = Math.floor(v / 2);
|
|
136
136
|
const T = _ * (u[_] ?? 0), C = f * (l[f] ?? 0);
|
|
137
137
|
return new Promise(
|
|
138
|
-
(S) =>
|
|
138
|
+
(S) => Te(P, { left: C, top: T }, S)
|
|
139
139
|
);
|
|
140
140
|
}
|
|
141
141
|
const R = _ * (u[_] ?? 0);
|
|
142
142
|
return new Promise(
|
|
143
|
-
(p) =>
|
|
143
|
+
(p) => Te(P, { left: 0, top: R }, p)
|
|
144
144
|
);
|
|
145
145
|
},
|
|
146
146
|
[
|
|
@@ -148,7 +148,7 @@ import './assets/RPDefaultLayout.css';const pn = () => {
|
|
|
148
148
|
c,
|
|
149
149
|
w,
|
|
150
150
|
a,
|
|
151
|
-
|
|
151
|
+
Te,
|
|
152
152
|
u,
|
|
153
153
|
l
|
|
154
154
|
]
|
|
@@ -259,7 +259,7 @@ const no = () => {
|
|
|
259
259
|
P.width = Math.floor(T.width * I), P.height = Math.floor(T.height * I);
|
|
260
260
|
const E = P.getContext("2d");
|
|
261
261
|
E.save(), E.fillStyle = "rgb(255, 255, 255)", E.fillRect(0, 0, P.width, P.height), E.restore();
|
|
262
|
-
const [y,
|
|
262
|
+
const [y, F] = await Promise.all([
|
|
263
263
|
R.getPage(p),
|
|
264
264
|
A
|
|
265
265
|
]);
|
|
@@ -267,17 +267,17 @@ const no = () => {
|
|
|
267
267
|
d();
|
|
268
268
|
return;
|
|
269
269
|
}
|
|
270
|
-
const
|
|
270
|
+
const z = {
|
|
271
271
|
canvasContext: E,
|
|
272
272
|
transform: [I, 0, 0, I, 0, 0],
|
|
273
273
|
viewport: y.getViewport({ scale: 1, rotation: T.rotation }),
|
|
274
274
|
intent: "print",
|
|
275
275
|
annotationMode: cr.ENABLE_STORAGE,
|
|
276
276
|
optionalContentConfigPromise: S,
|
|
277
|
-
printAnnotationStorage:
|
|
277
|
+
printAnnotationStorage: F
|
|
278
278
|
};
|
|
279
279
|
try {
|
|
280
|
-
return y.render(
|
|
280
|
+
return y.render(z).promise;
|
|
281
281
|
} catch (x) {
|
|
282
282
|
throw x instanceof lr || console.error(x), x;
|
|
283
283
|
}
|
|
@@ -345,13 +345,13 @@ const no = () => {
|
|
|
345
345
|
d();
|
|
346
346
|
return;
|
|
347
347
|
}
|
|
348
|
-
const
|
|
349
|
-
R.push(
|
|
350
|
-
const
|
|
348
|
+
const F = await v(P);
|
|
349
|
+
R.push(F);
|
|
350
|
+
const z = parseFloat((R.length / S * 100).toFixed(2));
|
|
351
351
|
o({
|
|
352
352
|
loadedPages: I,
|
|
353
353
|
totalPages: S,
|
|
354
|
-
percentage:
|
|
354
|
+
percentage: z
|
|
355
355
|
});
|
|
356
356
|
}
|
|
357
357
|
if (h.current) {
|
|
@@ -435,7 +435,7 @@ const no = () => {
|
|
|
435
435
|
throw new Error("usePrintContext must be used within a PrintProvider");
|
|
436
436
|
return t;
|
|
437
437
|
}, ro = () => {
|
|
438
|
-
const [t, e] = H({}), { pages: n } = Y(), { rotate: o } = Je(), r =
|
|
438
|
+
const [t, e] = H({}), { pages: n } = Y(), { rotate: o } = Je(), r = k(() => Object.keys(t).length, [t]), a = L(
|
|
439
439
|
(c) => {
|
|
440
440
|
if (!n.size)
|
|
441
441
|
return;
|
|
@@ -535,33 +535,33 @@ const no = () => {
|
|
|
535
535
|
}
|
|
536
536
|
);
|
|
537
537
|
}, oo = (t = {}, e = "") => {
|
|
538
|
-
const [n, o] = H(e), [r, a] = H(!1), { pdf: s, pages: c } = Y(), l = an(), u = W(!n), { currentZoom: h } = Ye(), [m, d] = H([]), { setFocusedPage: w } = se(), [g, b] = H(0), { pageScrollElementRef: v, virtualScrollableElementRef: _ } = et(), { scrollMode: f } = Ee(), { pagesRef: P } =
|
|
538
|
+
const [n, o] = H(e), [r, a] = H(!1), { pdf: s, pages: c } = Y(), l = an(), u = W(!n), { currentZoom: h } = Ye(), [m, d] = H([]), { setFocusedPage: w } = se(), [g, b] = H(0), { pageScrollElementRef: v, virtualScrollableElementRef: _ } = et(), { scrollMode: f } = Ee(), { pagesRef: P } = Ie(), [R, p] = H(null), T = W({}), C = k(() => g === 0 ? null : m[g - 1], [g, m]), S = k(() => m.length, [m]);
|
|
539
539
|
O(() => {
|
|
540
540
|
if (!C || !c)
|
|
541
541
|
return;
|
|
542
542
|
const y = _ || v;
|
|
543
543
|
if (!y || !P)
|
|
544
544
|
return;
|
|
545
|
-
const
|
|
545
|
+
const F = c.get(C.page), z = P.clientHeight / 2, x = P.clientWidth / 2;
|
|
546
546
|
let N = 0, $ = 0;
|
|
547
547
|
f === X.PAGE_SCROLLING && w(C.page), f === X.VERTICAL_SCROLLING && (N = l.heights.slice(0, C.page - 1).reduce((q, K) => q + K, 0)), f === X.HORIZONTAL_SCROLLING && ($ = l.widths.slice(0, C.page - 1).reduce((q, K) => q + K, 0));
|
|
548
548
|
let U;
|
|
549
|
-
if (!
|
|
549
|
+
if (!F)
|
|
550
550
|
return;
|
|
551
|
-
const
|
|
551
|
+
const Z = T.current[C.page], B = F.page.getViewport({ scale: 1 });
|
|
552
552
|
U = new on.TextLayer({
|
|
553
553
|
viewport: B,
|
|
554
|
-
textContentSource:
|
|
554
|
+
textContentSource: Z,
|
|
555
555
|
container: document.createElement("div")
|
|
556
556
|
}), U.render().then(() => {
|
|
557
|
-
const q = U.textDivs[C.start.idx], [K] = rn([C],
|
|
557
|
+
const q = U.textDivs[C.start.idx], [K] = rn([C], Z, U.textDivs), ie = l.widths[C.page - 1], de = l.heights[C.page - 1], Q = document.createElement("div"), ae = document.createElement("div");
|
|
558
558
|
q.style.position = "absolute", q.style.color = "transparent", ae.style.position = "absolute", ae.style.top = "0", ae.style.setProperty("--scale-factor", `${h}`), Q.style.position = "relative", Q.style.width = `${ie}px`, Q.style.height = `${de}px`, Q.style.zIndex = "-1", Q.appendChild(q), ae.appendChild(Q), P.prepend(ae);
|
|
559
|
-
const ee = K.element.getBoundingClientRect(), be = ae.getBoundingClientRect(), Oe = ee.top - be.top, ve = ee.left - be.left, pe = N + Oe -
|
|
559
|
+
const ee = K.element.getBoundingClientRect(), be = ae.getBoundingClientRect(), Oe = ee.top - be.top, ve = ee.left - be.left, pe = N + Oe - z + ee.height / 2, he = $ + ve - x + ee.width / 2, De = {
|
|
560
560
|
left: Math.max(he, 0),
|
|
561
561
|
top: Math.max(pe, 0)
|
|
562
562
|
};
|
|
563
563
|
P.removeChild(ae), y.scrollTo({
|
|
564
|
-
...
|
|
564
|
+
...De
|
|
565
565
|
});
|
|
566
566
|
});
|
|
567
567
|
}, [
|
|
@@ -581,14 +581,14 @@ const no = () => {
|
|
|
581
581
|
}, [S]), E = L(async (y) => {
|
|
582
582
|
if (!y)
|
|
583
583
|
return {};
|
|
584
|
-
const
|
|
585
|
-
for (let x = 1; x <=
|
|
584
|
+
const F = y.numPages, z = {};
|
|
585
|
+
for (let x = 1; x <= F; x++) {
|
|
586
586
|
if (u.current)
|
|
587
587
|
throw "close pop over";
|
|
588
588
|
const N = await y.getPage(x);
|
|
589
|
-
|
|
589
|
+
z[x.toString()] = await N.getTextContent();
|
|
590
590
|
}
|
|
591
|
-
return
|
|
591
|
+
return z;
|
|
592
592
|
}, []);
|
|
593
593
|
return O(() => {
|
|
594
594
|
if (!n) {
|
|
@@ -597,16 +597,16 @@ const no = () => {
|
|
|
597
597
|
}
|
|
598
598
|
u.current = !1, a(!0), d([]), b(0), E(s).then((y) => {
|
|
599
599
|
T.current = y;
|
|
600
|
-
const
|
|
600
|
+
const z = Object.keys(y).reduce((x, N) => {
|
|
601
601
|
const $ = ir(
|
|
602
602
|
[n],
|
|
603
603
|
y[N],
|
|
604
604
|
Number(N) - 1,
|
|
605
605
|
t
|
|
606
|
-
).map((U,
|
|
606
|
+
).map((U, Z) => ({ ...U, page: Number(N), pageMatchIdx: Z }));
|
|
607
607
|
return [...x, ...$];
|
|
608
608
|
}, []);
|
|
609
|
-
d(
|
|
609
|
+
d(z), b(z.length ? 1 : 0);
|
|
610
610
|
}).catch(() => {
|
|
611
611
|
d([]), b(0);
|
|
612
612
|
}).finally(() => a(!1));
|
|
@@ -715,7 +715,7 @@ const no = () => {
|
|
|
715
715
|
}, ao = (t) => {
|
|
716
716
|
const { pageNumber: e } = t, { pages: n } = Y(), o = W(null), { matches: r, currentMatch: a, setCurrentMatchElement: s } = _n(), [c, l] = H(
|
|
717
717
|
[]
|
|
718
|
-
), u = W(), h = W(), m = W(), d =
|
|
718
|
+
), u = W(), h = W(), m = W(), d = k(() => r.filter((g) => g.pageIndex === e - 1), [r, e]), w = L(
|
|
719
719
|
(g, b, v = !1) => {
|
|
720
720
|
if (v && ar(g, b), !d.length) {
|
|
721
721
|
m.current = void 0, l([]);
|
|
@@ -868,7 +868,7 @@ const ho = (t) => {
|
|
|
868
868
|
attributes: !0
|
|
869
869
|
// Watch for changes to attributes
|
|
870
870
|
}), () => o.disconnect();
|
|
871
|
-
},
|
|
871
|
+
}, Ft = (t, e, n, o) => {
|
|
872
872
|
if (t.type !== "click")
|
|
873
873
|
return;
|
|
874
874
|
const r = t.target, a = r.getAttribute("data-element-id"), s = r.getAttribute("href");
|
|
@@ -883,16 +883,16 @@ function mo(t, e) {
|
|
|
883
883
|
for (const n of wn)
|
|
884
884
|
t.addEventListener(n, e);
|
|
885
885
|
}
|
|
886
|
-
function
|
|
886
|
+
function kt(t, e) {
|
|
887
887
|
for (const n of wn)
|
|
888
888
|
t.removeEventListener(n, e);
|
|
889
889
|
}
|
|
890
890
|
const fo = (t) => {
|
|
891
|
-
const { pageNumber: e } = t, n = W(null), { pages: o, pdf: r } = Y(), a = W(), [s, c] = H(), { setFocusedPage: l, goToPage: u } = se(), { scrollMode: h } = Ee(), m =
|
|
891
|
+
const { pageNumber: e } = t, n = W(null), { pages: o, pdf: r } = Y(), a = W(), [s, c] = H(), { setFocusedPage: l, goToPage: u } = se(), { scrollMode: h } = Ee(), m = k(() => o.get(e), [o, e]), d = k(() => m == null ? void 0 : m.page.getViewport(), [m]);
|
|
892
892
|
O(() => {
|
|
893
893
|
a.current && (a.current.div.replaceChildren(), a.current = void 0);
|
|
894
894
|
}, [r]);
|
|
895
|
-
const w =
|
|
895
|
+
const w = k(() => r == null ? void 0 : r.annotationStorage, [r]);
|
|
896
896
|
O(() => {
|
|
897
897
|
m && m.page.getAnnotations().then((b) => {
|
|
898
898
|
a.current = void 0, c(b), n.current && (n.current.innerText = "");
|
|
@@ -900,7 +900,7 @@ const fo = (t) => {
|
|
|
900
900
|
}, [m]);
|
|
901
901
|
const g = L(
|
|
902
902
|
(b) => {
|
|
903
|
-
ho(b), !(!s || !r) && (h === X.PAGE_SCROLLING ?
|
|
903
|
+
ho(b), !(!s || !r) && (h === X.PAGE_SCROLLING ? Ft(b, s, r, (v) => l(v.pageIndex + 1)) : Ft(b, s, r, (v) => u(v.pageIndex + 1)));
|
|
904
904
|
},
|
|
905
905
|
[r, s, u, l, h]
|
|
906
906
|
);
|
|
@@ -933,7 +933,7 @@ const fo = (t) => {
|
|
|
933
933
|
structTreeLayer: void 0,
|
|
934
934
|
page: m.page,
|
|
935
935
|
viewport: b.clone({ dontFlip: !0 })
|
|
936
|
-
}), n.current &&
|
|
936
|
+
}), n.current && kt(n.current, g);
|
|
937
937
|
const _ = await (r == null ? void 0 : r.hasJSActions()), f = await (r == null ? void 0 : r.getFieldObjects());
|
|
938
938
|
return a.current.render({
|
|
939
939
|
annotations: s,
|
|
@@ -952,7 +952,7 @@ const fo = (t) => {
|
|
|
952
952
|
})().then(() => {
|
|
953
953
|
n.current && mo(n.current, g);
|
|
954
954
|
}), () => {
|
|
955
|
-
n.current &&
|
|
955
|
+
n.current && kt(n.current, g);
|
|
956
956
|
};
|
|
957
957
|
}, [r, s, g]), /* @__PURE__ */ i(
|
|
958
958
|
"div",
|
|
@@ -974,7 +974,7 @@ const fo = (t) => {
|
|
|
974
974
|
b(P);
|
|
975
975
|
}
|
|
976
976
|
}, [s, n, c, u]);
|
|
977
|
-
const v =
|
|
977
|
+
const v = k(() => {
|
|
978
978
|
switch (c) {
|
|
979
979
|
case 90:
|
|
980
980
|
return `${g.width / 2}px ${g.width / 2}px`;
|
|
@@ -1013,7 +1013,7 @@ const fo = (t) => {
|
|
|
1013
1013
|
"--scale-factor": u
|
|
1014
1014
|
},
|
|
1015
1015
|
className: ot["rp-page-wrapper"],
|
|
1016
|
-
children: /* @__PURE__ */
|
|
1016
|
+
children: /* @__PURE__ */ D(
|
|
1017
1017
|
"div",
|
|
1018
1018
|
{
|
|
1019
1019
|
style: {
|
|
@@ -1148,7 +1148,7 @@ function Io(t) {
|
|
|
1148
1148
|
scrollTop: typeof p.props.initialScrollTop == "number" ? p.props.initialScrollTop : 0,
|
|
1149
1149
|
scrollUpdateWasRequested: !1,
|
|
1150
1150
|
verticalScrollDirection: "forward"
|
|
1151
|
-
}, p._callOnItemsRendered = void 0, p._callOnItemsRendered = at(function(T, C, S, A, I, E, y,
|
|
1151
|
+
}, p._callOnItemsRendered = void 0, p._callOnItemsRendered = at(function(T, C, S, A, I, E, y, F) {
|
|
1152
1152
|
return p.props.onItemsRendered({
|
|
1153
1153
|
overscanColumnStartIndex: T,
|
|
1154
1154
|
overscanColumnStopIndex: C,
|
|
@@ -1157,7 +1157,7 @@ function Io(t) {
|
|
|
1157
1157
|
visibleColumnStartIndex: I,
|
|
1158
1158
|
visibleColumnStopIndex: E,
|
|
1159
1159
|
visibleRowStartIndex: y,
|
|
1160
|
-
visibleRowStopIndex:
|
|
1160
|
+
visibleRowStopIndex: F
|
|
1161
1161
|
});
|
|
1162
1162
|
}), p._callOnScroll = void 0, p._callOnScroll = at(function(T, C, S, A, I) {
|
|
1163
1163
|
return p.props.onScroll({
|
|
@@ -1168,12 +1168,12 @@ function Io(t) {
|
|
|
1168
1168
|
scrollUpdateWasRequested: I
|
|
1169
1169
|
});
|
|
1170
1170
|
}), p._getItemStyle = void 0, p._getItemStyle = function(T, C) {
|
|
1171
|
-
var S = p.props, A = S.columnWidth, I = S.direction, E = S.rowHeight, y = p._getItemStyleCache(b && A, b && I, b && E),
|
|
1172
|
-
if (y.hasOwnProperty(
|
|
1173
|
-
|
|
1171
|
+
var S = p.props, A = S.columnWidth, I = S.direction, E = S.rowHeight, y = p._getItemStyleCache(b && A, b && I, b && E), F = T + ":" + C, z;
|
|
1172
|
+
if (y.hasOwnProperty(F))
|
|
1173
|
+
z = y[F];
|
|
1174
1174
|
else {
|
|
1175
1175
|
var x = n(p.props, C, p._instanceProps), N = I === "rtl";
|
|
1176
|
-
y[
|
|
1176
|
+
y[F] = z = {
|
|
1177
1177
|
position: "absolute",
|
|
1178
1178
|
left: N ? void 0 : x,
|
|
1179
1179
|
right: N ? x : void 0,
|
|
@@ -1182,13 +1182,13 @@ function Io(t) {
|
|
|
1182
1182
|
width: a(p.props, C, p._instanceProps)
|
|
1183
1183
|
};
|
|
1184
1184
|
}
|
|
1185
|
-
return
|
|
1185
|
+
return z;
|
|
1186
1186
|
}, p._getItemStyleCache = void 0, p._getItemStyleCache = at(function(T, C, S) {
|
|
1187
1187
|
return {};
|
|
1188
1188
|
}), p._onScroll = function(T) {
|
|
1189
|
-
var C = T.currentTarget, S = C.clientHeight, A = C.clientWidth, I = C.scrollLeft, E = C.scrollTop, y = C.scrollHeight,
|
|
1190
|
-
p.setState(function(
|
|
1191
|
-
if (
|
|
1189
|
+
var C = T.currentTarget, S = C.clientHeight, A = C.clientWidth, I = C.scrollLeft, E = C.scrollTop, y = C.scrollHeight, F = C.scrollWidth;
|
|
1190
|
+
p.setState(function(z) {
|
|
1191
|
+
if (z.scrollLeft === I && z.scrollTop === E)
|
|
1192
1192
|
return null;
|
|
1193
1193
|
var x = p.props.direction, N = I;
|
|
1194
1194
|
if (x === "rtl")
|
|
@@ -1197,17 +1197,17 @@ function Io(t) {
|
|
|
1197
1197
|
N = -I;
|
|
1198
1198
|
break;
|
|
1199
1199
|
case "positive-descending":
|
|
1200
|
-
N =
|
|
1200
|
+
N = F - A - I;
|
|
1201
1201
|
break;
|
|
1202
1202
|
}
|
|
1203
|
-
N = Math.max(0, Math.min(N,
|
|
1203
|
+
N = Math.max(0, Math.min(N, F - A));
|
|
1204
1204
|
var $ = Math.max(0, Math.min(E, y - S));
|
|
1205
1205
|
return {
|
|
1206
1206
|
isScrolling: !0,
|
|
1207
|
-
horizontalScrollDirection:
|
|
1207
|
+
horizontalScrollDirection: z.scrollLeft < I ? "forward" : "backward",
|
|
1208
1208
|
scrollLeft: N,
|
|
1209
1209
|
scrollTop: $,
|
|
1210
|
-
verticalScrollDirection:
|
|
1210
|
+
verticalScrollDirection: z.scrollTop < E ? "forward" : "backward",
|
|
1211
1211
|
scrollUpdateWasRequested: !1
|
|
1212
1212
|
};
|
|
1213
1213
|
}, p._resetIsScrollingDebounced);
|
|
@@ -1240,9 +1240,9 @@ function Io(t) {
|
|
|
1240
1240
|
};
|
|
1241
1241
|
}, this._resetIsScrollingDebounced);
|
|
1242
1242
|
}, P.scrollToItem = function(p) {
|
|
1243
|
-
var T = p.align, C = T === void 0 ? "auto" : T, S = p.columnIndex, A = p.rowIndex, I = this.props, E = I.columnCount, y = I.height,
|
|
1244
|
-
S !== void 0 && (S = Math.max(0, Math.min(S, E - 1))), A !== void 0 && (A = Math.max(0, Math.min(A,
|
|
1245
|
-
var
|
|
1243
|
+
var T = p.align, C = T === void 0 ? "auto" : T, S = p.columnIndex, A = p.rowIndex, I = this.props, E = I.columnCount, y = I.height, F = I.rowCount, z = I.width, x = this.state, N = x.scrollLeft, $ = x.scrollTop, U = To();
|
|
1244
|
+
S !== void 0 && (S = Math.max(0, Math.min(S, E - 1))), A !== void 0 && (A = Math.max(0, Math.min(A, F - 1)));
|
|
1245
|
+
var Z = s(this.props, this._instanceProps), B = c(this.props, this._instanceProps), q = B > z ? U : 0, K = Z > y ? U : 0;
|
|
1246
1246
|
this.scrollTo({
|
|
1247
1247
|
scrollLeft: S !== void 0 ? l(this.props, S, C, N, this._instanceProps, K) : N,
|
|
1248
1248
|
scrollTop: A !== void 0 ? u(this.props, A, C, $, this._instanceProps, q) : $
|
|
@@ -1279,23 +1279,23 @@ function Io(t) {
|
|
|
1279
1279
|
}, P.componentWillUnmount = function() {
|
|
1280
1280
|
this._resetIsScrollingTimeoutId !== null && Gt(this._resetIsScrollingTimeoutId);
|
|
1281
1281
|
}, P.render = function() {
|
|
1282
|
-
var p = this.props, T = p.children, C = p.className, S = p.columnCount, A = p.direction, I = p.height, E = p.innerRef, y = p.innerElementType,
|
|
1283
|
-
if (S > 0 &&
|
|
1282
|
+
var p = this.props, T = p.children, C = p.className, S = p.columnCount, A = p.direction, I = p.height, E = p.innerRef, y = p.innerElementType, F = p.innerTagName, z = p.itemData, x = p.itemKey, N = x === void 0 ? So : x, $ = p.outerElementType, U = p.outerTagName, Z = p.rowCount, B = p.style, q = p.useIsScrolling, K = p.width, ie = this.state.isScrolling, de = this._getHorizontalRangeToRender(), Q = de[0], ae = de[1], ee = this._getVerticalRangeToRender(), be = ee[0], Oe = ee[1], ve = [];
|
|
1283
|
+
if (S > 0 && Z)
|
|
1284
1284
|
for (var pe = be; pe <= Oe; pe++)
|
|
1285
1285
|
for (var he = Q; he <= ae; he++)
|
|
1286
1286
|
ve.push($e(T, {
|
|
1287
1287
|
columnIndex: he,
|
|
1288
|
-
data:
|
|
1288
|
+
data: z,
|
|
1289
1289
|
isScrolling: q ? ie : void 0,
|
|
1290
1290
|
key: N({
|
|
1291
1291
|
columnIndex: he,
|
|
1292
|
-
data:
|
|
1292
|
+
data: z,
|
|
1293
1293
|
rowIndex: pe
|
|
1294
1294
|
}),
|
|
1295
1295
|
rowIndex: pe,
|
|
1296
1296
|
style: this._getItemStyle(pe, he)
|
|
1297
1297
|
}));
|
|
1298
|
-
var
|
|
1298
|
+
var De = s(this.props, this._instanceProps), M = c(this.props, this._instanceProps);
|
|
1299
1299
|
return $e($ || U || "div", {
|
|
1300
1300
|
className: C,
|
|
1301
1301
|
onScroll: this._onScroll,
|
|
@@ -1309,11 +1309,11 @@ function Io(t) {
|
|
|
1309
1309
|
willChange: "transform",
|
|
1310
1310
|
direction: A
|
|
1311
1311
|
}, B)
|
|
1312
|
-
}, $e(y ||
|
|
1312
|
+
}, $e(y || F || "div", {
|
|
1313
1313
|
children: ve,
|
|
1314
1314
|
ref: E,
|
|
1315
1315
|
style: {
|
|
1316
|
-
height:
|
|
1316
|
+
height: De,
|
|
1317
1317
|
pointerEvents: ie ? "none" : void 0,
|
|
1318
1318
|
width: M
|
|
1319
1319
|
}
|
|
@@ -1321,25 +1321,25 @@ function Io(t) {
|
|
|
1321
1321
|
}, P._callPropsCallbacks = function() {
|
|
1322
1322
|
var p = this.props, T = p.columnCount, C = p.onItemsRendered, S = p.onScroll, A = p.rowCount;
|
|
1323
1323
|
if (typeof C == "function" && T > 0 && A > 0) {
|
|
1324
|
-
var I = this._getHorizontalRangeToRender(), E = I[0], y = I[1],
|
|
1325
|
-
this._callOnItemsRendered(E, y, N, $,
|
|
1324
|
+
var I = this._getHorizontalRangeToRender(), E = I[0], y = I[1], F = I[2], z = I[3], x = this._getVerticalRangeToRender(), N = x[0], $ = x[1], U = x[2], Z = x[3];
|
|
1325
|
+
this._callOnItemsRendered(E, y, N, $, F, z, U, Z);
|
|
1326
1326
|
}
|
|
1327
1327
|
if (typeof S == "function") {
|
|
1328
1328
|
var B = this.state, q = B.horizontalScrollDirection, K = B.scrollLeft, ie = B.scrollTop, de = B.scrollUpdateWasRequested, Q = B.verticalScrollDirection;
|
|
1329
1329
|
this._callOnScroll(K, ie, q, Q, de);
|
|
1330
1330
|
}
|
|
1331
1331
|
}, P._getHorizontalRangeToRender = function() {
|
|
1332
|
-
var p = this.props, T = p.columnCount, C = p.overscanColumnCount, S = p.overscanColumnsCount, A = p.overscanCount, I = p.rowCount, E = this.state, y = E.horizontalScrollDirection,
|
|
1332
|
+
var p = this.props, T = p.columnCount, C = p.overscanColumnCount, S = p.overscanColumnsCount, A = p.overscanCount, I = p.rowCount, E = this.state, y = E.horizontalScrollDirection, F = E.isScrolling, z = E.scrollLeft, x = C || S || A || 1;
|
|
1333
1333
|
if (T === 0 || I === 0)
|
|
1334
1334
|
return [0, 0, 0, 0];
|
|
1335
|
-
var N = o(this.props,
|
|
1336
|
-
return [Math.max(0, N - U), Math.max(0, Math.min(T - 1, $ +
|
|
1335
|
+
var N = o(this.props, z, this._instanceProps), $ = r(this.props, N, z, this._instanceProps), U = !F || y === "backward" ? Math.max(1, x) : 1, Z = !F || y === "forward" ? Math.max(1, x) : 1;
|
|
1336
|
+
return [Math.max(0, N - U), Math.max(0, Math.min(T - 1, $ + Z)), N, $];
|
|
1337
1337
|
}, P._getVerticalRangeToRender = function() {
|
|
1338
|
-
var p = this.props, T = p.columnCount, C = p.overscanCount, S = p.overscanRowCount, A = p.overscanRowsCount, I = p.rowCount, E = this.state, y = E.isScrolling,
|
|
1338
|
+
var p = this.props, T = p.columnCount, C = p.overscanCount, S = p.overscanRowCount, A = p.overscanRowsCount, I = p.rowCount, E = this.state, y = E.isScrolling, F = E.verticalScrollDirection, z = E.scrollTop, x = S || A || C || 1;
|
|
1339
1339
|
if (T === 0 || I === 0)
|
|
1340
1340
|
return [0, 0, 0, 0];
|
|
1341
|
-
var N = d(this.props,
|
|
1342
|
-
return [Math.max(0, N - U), Math.max(0, Math.min(I - 1, $ +
|
|
1341
|
+
var N = d(this.props, z, this._instanceProps), $ = w(this.props, N, z, this._instanceProps), U = !y || F === "backward" ? Math.max(1, x) : 1, Z = !y || F === "forward" ? Math.max(1, x) : 1;
|
|
1342
|
+
return [Math.max(0, N - U), Math.max(0, Math.min(I - 1, $ + Z)), N, $];
|
|
1343
1343
|
}, f;
|
|
1344
1344
|
}(Jn), e.defaultProps = {
|
|
1345
1345
|
direction: "ltr",
|
|
@@ -1415,7 +1415,7 @@ var yo = function(e, n) {
|
|
|
1415
1415
|
for (var s = e === "column" ? n.columnCount : n.rowCount, c = 1; r < s && fe(e, n, r, o).offset < a; )
|
|
1416
1416
|
r += c, c *= 2;
|
|
1417
1417
|
return Sn(e, n, o, Math.min(r, s - 1), Math.floor(r / 2), a);
|
|
1418
|
-
},
|
|
1418
|
+
}, jt = function(e, n, o, r, a, s, c) {
|
|
1419
1419
|
var l = e === "column" ? n.width : n.height, u = fe(e, n, o, s), h = e === "column" ? Pn(n, s) : Tn(n, s), m = Math.max(0, Math.min(h - l, u.offset)), d = Math.max(0, u.offset - l + c + u.size);
|
|
1420
1420
|
switch (r === "smart" && (a >= d - l && a <= m + l ? r = "auto" : r = "center"), r) {
|
|
1421
1421
|
case "start":
|
|
@@ -1446,10 +1446,10 @@ var yo = function(e, n) {
|
|
|
1446
1446
|
getEstimatedTotalHeight: Tn,
|
|
1447
1447
|
getEstimatedTotalWidth: Pn,
|
|
1448
1448
|
getOffsetForColumnAndAlignment: function(e, n, o, r, a, s) {
|
|
1449
|
-
return
|
|
1449
|
+
return jt("column", e, n, o, r, a, s);
|
|
1450
1450
|
},
|
|
1451
1451
|
getOffsetForRowAndAlignment: function(e, n, o, r, a, s) {
|
|
1452
|
-
return
|
|
1452
|
+
return jt("row", e, n, o, r, a, s);
|
|
1453
1453
|
},
|
|
1454
1454
|
getRowOffset: function(e, n, o) {
|
|
1455
1455
|
return fe("row", e, n, o).offset;
|
|
@@ -1501,7 +1501,7 @@ var yo = function(e, n) {
|
|
|
1501
1501
|
}
|
|
1502
1502
|
});
|
|
1503
1503
|
process.env.NODE_ENV;
|
|
1504
|
-
function
|
|
1504
|
+
function Zt(t, e) {
|
|
1505
1505
|
for (var n in t)
|
|
1506
1506
|
if (!(n in e))
|
|
1507
1507
|
return !0;
|
|
@@ -1513,7 +1513,7 @@ function jt(t, e) {
|
|
|
1513
1513
|
var Lo = ["style"], No = ["style"];
|
|
1514
1514
|
function Eo(t, e) {
|
|
1515
1515
|
var n = t.style, o = Ht(t, Lo), r = e.style, a = Ht(e, No);
|
|
1516
|
-
return !
|
|
1516
|
+
return !Zt(n, r) && !Zt(o, a);
|
|
1517
1517
|
}
|
|
1518
1518
|
const Oo = () => {
|
|
1519
1519
|
const { viewMode: t } = Qe(), { scrollMode: e } = Ee(), { setColumnCount: n } = nn(), { virtualScrollableElementRef: o } = et(), r = an(), a = L(
|
|
@@ -1522,11 +1522,11 @@ const Oo = () => {
|
|
|
1522
1522
|
), s = L(
|
|
1523
1523
|
(w) => r.heights[w] || 0,
|
|
1524
1524
|
[r.heights]
|
|
1525
|
-
), c =
|
|
1525
|
+
), c = k(() => r.heights.length, [r.heights]), l = k(() => Math.max(...r.widths), [r.widths]), u = k(() => e === X.HORIZONTAL_SCROLLING ? c : t === qe.DUAL_PAGE ? 2 : 1, [t, e, e, c, o, l]);
|
|
1526
1526
|
O(() => {
|
|
1527
1527
|
n(u);
|
|
1528
1528
|
}, [u, n]);
|
|
1529
|
-
const h =
|
|
1529
|
+
const h = k(() => e === X.HORIZONTAL_SCROLLING || e === X.PAGE_SCROLLING ? 1 : Math.round(c / u), [u, c, e]), m = k(() => r.heights.reduce((w, g) => w + g, 0) / r.heights.length || 0, [r]), d = k(() => r.widths.reduce((w, g) => w + g, 0) / r.heights.length || 0, [r]);
|
|
1530
1530
|
return {
|
|
1531
1531
|
rowCount: h,
|
|
1532
1532
|
rowHeight: s,
|
|
@@ -1553,7 +1553,7 @@ lt == null || Xt == null ? (bt = ct, Ct = function(e) {
|
|
|
1553
1553
|
}, Bt);
|
|
1554
1554
|
return [n, o];
|
|
1555
1555
|
});
|
|
1556
|
-
function
|
|
1556
|
+
function Do(t) {
|
|
1557
1557
|
let e, n, o, r, a, s, c;
|
|
1558
1558
|
const l = typeof document < "u" && document.attachEvent;
|
|
1559
1559
|
if (!l) {
|
|
@@ -1625,7 +1625,7 @@ function zo(t) {
|
|
|
1625
1625
|
}
|
|
1626
1626
|
};
|
|
1627
1627
|
}
|
|
1628
|
-
class
|
|
1628
|
+
class zo extends Yn {
|
|
1629
1629
|
constructor(...e) {
|
|
1630
1630
|
super(...e), this.state = {
|
|
1631
1631
|
height: this.props.defaultHeight || 0,
|
|
@@ -1666,7 +1666,7 @@ class Do extends Yn {
|
|
|
1666
1666
|
const o = n.ownerDocument.defaultView.ResizeObserver;
|
|
1667
1667
|
o != null ? (this._resizeObserver = new o(() => {
|
|
1668
1668
|
this._timeoutId = setTimeout(this._onResize, 0);
|
|
1669
|
-
}), this._resizeObserver.observe(n)) : (this._detectElementResize =
|
|
1669
|
+
}), this._resizeObserver.observe(n)) : (this._detectElementResize = Do(e), this._detectElementResize.addResizeListener(n, this._onResize)), this._onResize();
|
|
1670
1670
|
}
|
|
1671
1671
|
}
|
|
1672
1672
|
componentWillUnmount() {
|
|
@@ -1705,14 +1705,14 @@ class Do extends Yn {
|
|
|
1705
1705
|
}
|
|
1706
1706
|
}
|
|
1707
1707
|
const Ao = ({ widths: t, heights: e }) => {
|
|
1708
|
-
const { focusedPage: n, totalPages: o } = se(), { isScrolling: r } = tt(), a =
|
|
1708
|
+
const { focusedPage: n, totalPages: o } = se(), { isScrolling: r } = tt(), a = k(() => {
|
|
1709
1709
|
const l = [], u = Math.ceil(n / 2) * 2 - 1;
|
|
1710
1710
|
if (l.push(u), u + 1 < o) {
|
|
1711
1711
|
const h = u + 1;
|
|
1712
1712
|
l.push(h);
|
|
1713
1713
|
}
|
|
1714
1714
|
return l;
|
|
1715
|
-
}, [n, o]), s =
|
|
1715
|
+
}, [n, o]), s = k(() => [
|
|
1716
1716
|
{
|
|
1717
1717
|
position: "absolute",
|
|
1718
1718
|
left: 0,
|
|
@@ -1730,11 +1730,11 @@ const Ao = ({ widths: t, heights: e }) => {
|
|
|
1730
1730
|
O(() => {
|
|
1731
1731
|
r.current = !1;
|
|
1732
1732
|
}, [n]);
|
|
1733
|
-
const c =
|
|
1733
|
+
const c = k(() => s.reduce((l, u) => l + Number(u.width || 0), 0), [s]);
|
|
1734
1734
|
return /* @__PURE__ */ i("div", { style: { width: c, position: "relative" }, children: a.map((l, u) => /* @__PURE__ */ i(yt, { onIntersectRatioChange: () => {
|
|
1735
1735
|
}, style: s[u], pageNumber: l }, l)) });
|
|
1736
|
-
},
|
|
1737
|
-
const { focusedPage: n } = se(), { isScrolling: o } = tt(), r =
|
|
1736
|
+
}, Fo = ({ widths: t, heights: e }) => {
|
|
1737
|
+
const { focusedPage: n } = se(), { isScrolling: o } = tt(), r = k(() => ({
|
|
1738
1738
|
position: "absolute",
|
|
1739
1739
|
width: t(n - 1),
|
|
1740
1740
|
height: e(n - 1)
|
|
@@ -1742,7 +1742,7 @@ const Ao = ({ widths: t, heights: e }) => {
|
|
|
1742
1742
|
O(() => {
|
|
1743
1743
|
o.current = !1;
|
|
1744
1744
|
}, [n]);
|
|
1745
|
-
const a =
|
|
1745
|
+
const a = k(() => t(n - 1), [t]);
|
|
1746
1746
|
return /* @__PURE__ */ i(
|
|
1747
1747
|
"div",
|
|
1748
1748
|
{
|
|
@@ -1762,7 +1762,7 @@ const Ao = ({ widths: t, heights: e }) => {
|
|
|
1762
1762
|
)
|
|
1763
1763
|
}
|
|
1764
1764
|
);
|
|
1765
|
-
},
|
|
1765
|
+
}, ko = Qn(({ columnIndex: t, rowIndex: e, data: n, style: o }) => {
|
|
1766
1766
|
const r = t + 1 + e * n.columnCount;
|
|
1767
1767
|
return /* @__PURE__ */ i(
|
|
1768
1768
|
yt,
|
|
@@ -1774,7 +1774,7 @@ const Ao = ({ widths: t, heights: e }) => {
|
|
|
1774
1774
|
r
|
|
1775
1775
|
);
|
|
1776
1776
|
}, Eo), ds = () => {
|
|
1777
|
-
const { initialPage: t = 1, initialScrollMode: e } = rr(), { pagesRef: n, setPagesRef: o } =
|
|
1777
|
+
const { initialPage: t = 1, initialScrollMode: e } = rr(), { pagesRef: n, setPagesRef: o } = Ie();
|
|
1778
1778
|
Tr(n);
|
|
1779
1779
|
const { scrollToPage: r } = pn(), {
|
|
1780
1780
|
virtualScrollRef: a,
|
|
@@ -1794,19 +1794,19 @@ const Ao = ({ widths: t, heights: e }) => {
|
|
|
1794
1794
|
rowCount: I,
|
|
1795
1795
|
rowHeight: E,
|
|
1796
1796
|
columnCount: y,
|
|
1797
|
-
columnWidth:
|
|
1798
|
-
estimatedColumnWidth:
|
|
1797
|
+
columnWidth: F,
|
|
1798
|
+
estimatedColumnWidth: z,
|
|
1799
1799
|
estimatedRowHeight: x
|
|
1800
|
-
} = Oo(), N = gt(h, 100), [$, U] = H({}),
|
|
1800
|
+
} = Oo(), N = gt(h, 100), [$, U] = H({}), Z = gt($, 100), { isScrolling: B } = tt(), q = W(), K = W({
|
|
1801
1801
|
scrollTop: 0,
|
|
1802
1802
|
scrollLeft: 0
|
|
1803
1803
|
});
|
|
1804
1804
|
Ir(n);
|
|
1805
1805
|
const { isPressed: ie } = Pr(), { selectionMode: de } = nr(), { initializeGrabScroll: Q, resetGrabState: ae } = Sr({
|
|
1806
1806
|
isPressed: ie
|
|
1807
|
-
}), ee =
|
|
1807
|
+
}), ee = k(() => de === er.HAND, [de]), be = L((M, G) => {
|
|
1808
1808
|
U((J) => G > -1 ? { ...J, [M]: Math.round(G * 100) } : (delete J[M], J));
|
|
1809
|
-
}, []), Oe =
|
|
1809
|
+
}, []), Oe = k(() => ({
|
|
1810
1810
|
columnCount: y,
|
|
1811
1811
|
handleIntersectRatioChange: be
|
|
1812
1812
|
}), [y, be]), ve = L(
|
|
@@ -1834,10 +1834,10 @@ const Ao = ({ widths: t, heights: e }) => {
|
|
|
1834
1834
|
});
|
|
1835
1835
|
}, [I, y, A, a]), O(() => {
|
|
1836
1836
|
const M = Array.from({ length: I }).reduce(
|
|
1837
|
-
(J, _e,
|
|
1837
|
+
(J, _e, xe) => J + E(xe),
|
|
1838
1838
|
0
|
|
1839
1839
|
), G = Array.from({ length: y }).reduce(
|
|
1840
|
-
(J, _e,
|
|
1840
|
+
(J, _e, xe) => J + F(xe),
|
|
1841
1841
|
0
|
|
1842
1842
|
);
|
|
1843
1843
|
u({
|
|
@@ -1860,7 +1860,7 @@ const Ao = ({ widths: t, heights: e }) => {
|
|
|
1860
1860
|
const G = K.current.scrollTop, J = K.current.scrollLeft;
|
|
1861
1861
|
if (N.height && N.width) {
|
|
1862
1862
|
T.current = !0;
|
|
1863
|
-
const { height: _e, width:
|
|
1863
|
+
const { height: _e, width: xe } = N, { height: qn, width: jn } = R.current, Zn = G / qn * _e, Bn = J / jn * xe, Kn = Math.min(Zn, _e) || 0, Xn = Math.min(Bn, xe) || 0;
|
|
1864
1864
|
a == null || a.scrollTo({
|
|
1865
1865
|
scrollTop: Kn,
|
|
1866
1866
|
scrollLeft: Xn
|
|
@@ -1874,18 +1874,18 @@ const Ao = ({ widths: t, heights: e }) => {
|
|
|
1874
1874
|
}, [N, _, v]), O(() => {
|
|
1875
1875
|
if ((B.current || T.current) && (B.current = !1), B.current)
|
|
1876
1876
|
return;
|
|
1877
|
-
const M = Object.entries(
|
|
1877
|
+
const M = Object.entries(Z);
|
|
1878
1878
|
let G = 0, J = -1;
|
|
1879
1879
|
M.forEach((_e) => {
|
|
1880
1880
|
J < _e[1] && (G = Number(_e[0]), J = _e[1]);
|
|
1881
1881
|
}), G && g(G);
|
|
1882
|
-
}, [
|
|
1882
|
+
}, [Z, g]), O(() => () => {
|
|
1883
1883
|
q.current && clearTimeout(q.current), C.current && clearTimeout(C.current);
|
|
1884
1884
|
}, []);
|
|
1885
|
-
const he =
|
|
1885
|
+
const he = k(() => re(me["rp-pages-container"], {
|
|
1886
1886
|
[me["rp-cursor-grab"]]: ee && !ie,
|
|
1887
1887
|
[me["rp-cursor-grabbing"]]: ee && ie
|
|
1888
|
-
}), [ee, ie]),
|
|
1888
|
+
}), [ee, ie]), De = L(
|
|
1889
1889
|
(M) => {
|
|
1890
1890
|
if (ee && M) {
|
|
1891
1891
|
const G = re(me["rp-pages"]), J = document.querySelector(`.${G}`);
|
|
@@ -1918,15 +1918,15 @@ const Ao = ({ widths: t, heights: e }) => {
|
|
|
1918
1918
|
});
|
|
1919
1919
|
break;
|
|
1920
1920
|
}
|
|
1921
|
-
}, [a, e, m, g]), /* @__PURE__ */ i("div", { ref: o, tabIndex: -1, className: he, children: /* @__PURE__ */ i(
|
|
1921
|
+
}, [a, e, m, g]), /* @__PURE__ */ i("div", { ref: o, tabIndex: -1, className: he, children: /* @__PURE__ */ i(zo, { style: { minHeight: "50px" }, children: ({ width: M, height: G }) => /* @__PURE__ */ i("div", { "data-rp": "pages", ref: De, style: { width: M, height: G }, children: v === X.PAGE_SCROLLING ? /* @__PURE__ */ i(
|
|
1922
1922
|
"div",
|
|
1923
1923
|
{
|
|
1924
1924
|
ref: c,
|
|
1925
1925
|
style: { width: M, height: G },
|
|
1926
1926
|
className: re(me["rp-pages"], me["rp-page-scrolling-wrapper"]),
|
|
1927
|
-
children: _ === qe.DUAL_PAGE ? /* @__PURE__ */ i(Ao, { widths:
|
|
1927
|
+
children: _ === qe.DUAL_PAGE ? /* @__PURE__ */ i(Ao, { widths: F, heights: E }) : /* @__PURE__ */ i(Fo, { widths: F, heights: E })
|
|
1928
1928
|
}
|
|
1929
|
-
) :
|
|
1929
|
+
) : z ? /* @__PURE__ */ i(
|
|
1930
1930
|
Ro,
|
|
1931
1931
|
{
|
|
1932
1932
|
ref: s,
|
|
@@ -1935,18 +1935,18 @@ const Ao = ({ widths: t, heights: e }) => {
|
|
|
1935
1935
|
innerRef: f,
|
|
1936
1936
|
onScroll: pe,
|
|
1937
1937
|
columnCount: y,
|
|
1938
|
-
columnWidth:
|
|
1938
|
+
columnWidth: F,
|
|
1939
1939
|
rowHeight: E,
|
|
1940
1940
|
height: G,
|
|
1941
1941
|
width: M,
|
|
1942
|
-
estimatedColumnWidth:
|
|
1942
|
+
estimatedColumnWidth: z,
|
|
1943
1943
|
estimatedRowHeight: x,
|
|
1944
1944
|
rowCount: I,
|
|
1945
1945
|
className: re(
|
|
1946
1946
|
me["rp-pages"],
|
|
1947
1947
|
v === X.HORIZONTAL_SCROLLING ? me["rp-pages-horizontal-scroll"] : ""
|
|
1948
1948
|
),
|
|
1949
|
-
children:
|
|
1949
|
+
children: ko
|
|
1950
1950
|
}
|
|
1951
1951
|
) : P ? null : /* @__PURE__ */ i(
|
|
1952
1952
|
"div",
|
|
@@ -1961,7 +1961,7 @@ const Ao = ({ widths: t, heights: e }) => {
|
|
|
1961
1961
|
children: /* @__PURE__ */ i(Me, {})
|
|
1962
1962
|
}
|
|
1963
1963
|
) }) }) });
|
|
1964
|
-
},
|
|
1964
|
+
}, ze = {
|
|
1965
1965
|
"rp-toolbar-content": "_rp-toolbar-content_sz31z_1",
|
|
1966
1966
|
"rp-toolbar-wrapper": "_rp-toolbar-wrapper_sz31z_10",
|
|
1967
1967
|
"rp-toolbar-start": "_rp-toolbar-start_sz31z_33",
|
|
@@ -1978,7 +1978,7 @@ const Ao = ({ widths: t, heights: e }) => {
|
|
|
1978
1978
|
const { nextIcon: t } = ue();
|
|
1979
1979
|
return t || /* @__PURE__ */ i(We, { style: { transform: "rotate(180deg" } });
|
|
1980
1980
|
}, Ho = () => {
|
|
1981
|
-
const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } = se(), [s, c] = H(t.toString()), { pageNavigationTool: l = !0 } = ge(), { isSmallScreen: u } =
|
|
1981
|
+
const { focusedPage: t, totalPages: e, setFocusedPage: n, nextPage: o, prevPage: r, goToPage: a } = se(), [s, c] = H(t.toString()), { pageNavigationTool: l = !0 } = ge(), { isSmallScreen: u } = ye(), { localeMessages: h } = le();
|
|
1982
1982
|
O(() => {
|
|
1983
1983
|
c(t.toString());
|
|
1984
1984
|
}, [t]);
|
|
@@ -2006,8 +2006,8 @@ const Ao = ({ widths: t, heights: e }) => {
|
|
|
2006
2006
|
goToPage: a,
|
|
2007
2007
|
changePage: n
|
|
2008
2008
|
}
|
|
2009
|
-
) : l ? /* @__PURE__ */
|
|
2010
|
-
!u && /* @__PURE__ */ i(
|
|
2009
|
+
) : l ? /* @__PURE__ */ D("div", { className: ut["rp-paginate"], children: [
|
|
2010
|
+
!u && /* @__PURE__ */ i(j, { content: h == null ? void 0 : h.previousPageTooltip, children: /* @__PURE__ */ i(
|
|
2011
2011
|
te,
|
|
2012
2012
|
{
|
|
2013
2013
|
onClick: r,
|
|
@@ -2016,7 +2016,7 @@ const Ao = ({ widths: t, heights: e }) => {
|
|
|
2016
2016
|
children: /* @__PURE__ */ i(Wo, {})
|
|
2017
2017
|
}
|
|
2018
2018
|
) }),
|
|
2019
|
-
/* @__PURE__ */ i(
|
|
2019
|
+
/* @__PURE__ */ i(j, { content: h == null ? void 0 : h.currentPageTooltip, children: /* @__PURE__ */ i(
|
|
2020
2020
|
tn,
|
|
2021
2021
|
{
|
|
2022
2022
|
onKeyDown: g,
|
|
@@ -2026,11 +2026,11 @@ const Ao = ({ widths: t, heights: e }) => {
|
|
|
2026
2026
|
className: ut["rp-page-input"]
|
|
2027
2027
|
}
|
|
2028
2028
|
) }),
|
|
2029
|
-
/* @__PURE__ */
|
|
2029
|
+
/* @__PURE__ */ D("span", { className: ut["rp-total-page"], children: [
|
|
2030
2030
|
"/",
|
|
2031
2031
|
e
|
|
2032
2032
|
] }),
|
|
2033
|
-
!u && /* @__PURE__ */ i(
|
|
2033
|
+
!u && /* @__PURE__ */ i(j, { content: h == null ? void 0 : h.nextPageTooltip, children: /* @__PURE__ */ i(
|
|
2034
2034
|
te,
|
|
2035
2035
|
{
|
|
2036
2036
|
onClick: o,
|
|
@@ -2049,7 +2049,7 @@ var xt = "Dialog", [In, ps] = Nr(xt), [$o, ce] = In(xt), yn = (t) => {
|
|
|
2049
2049
|
defaultOpen: r,
|
|
2050
2050
|
onOpenChange: a,
|
|
2051
2051
|
modal: s = !0
|
|
2052
|
-
} = t, c = V.useRef(null), l = V.useRef(null), [u = !1, h] =
|
|
2052
|
+
} = t, c = V.useRef(null), l = V.useRef(null), [u = !1, h] = Dr({
|
|
2053
2053
|
prop: o,
|
|
2054
2054
|
defaultProp: r,
|
|
2055
2055
|
onChange: a
|
|
@@ -2085,7 +2085,7 @@ var xn = "DialogTrigger", Go = V.forwardRef(
|
|
|
2085
2085
|
"data-state": Nt(r.open),
|
|
2086
2086
|
...o,
|
|
2087
2087
|
ref: a,
|
|
2088
|
-
onClick:
|
|
2088
|
+
onClick: Fe(t.onClick, r.onOpenToggle)
|
|
2089
2089
|
}
|
|
2090
2090
|
);
|
|
2091
2091
|
}
|
|
@@ -2098,16 +2098,16 @@ var Rt = "DialogPortal", [Vo, Rn] = In(Rt, {
|
|
|
2098
2098
|
return /* @__PURE__ */ i(Vo, { scope: e, forceMount: n, children: V.Children.map(o, (s) => /* @__PURE__ */ i(Pt, { present: n || a.open, children: /* @__PURE__ */ i(Mr, { asChild: !0, container: r, children: s }) })) });
|
|
2099
2099
|
};
|
|
2100
2100
|
Ln.displayName = Rt;
|
|
2101
|
-
var
|
|
2101
|
+
var Ze = "DialogOverlay", Nn = V.forwardRef(
|
|
2102
2102
|
(t, e) => {
|
|
2103
|
-
const n = Rn(
|
|
2103
|
+
const n = Rn(Ze, t.__scopeDialog), { forceMount: o = n.forceMount, ...r } = t, a = ce(Ze, t.__scopeDialog);
|
|
2104
2104
|
return a.modal ? /* @__PURE__ */ i(Pt, { present: o || a.open, children: /* @__PURE__ */ i(Uo, { ...r, ref: e }) }) : null;
|
|
2105
2105
|
}
|
|
2106
2106
|
);
|
|
2107
|
-
Nn.displayName =
|
|
2107
|
+
Nn.displayName = Ze;
|
|
2108
2108
|
var Uo = V.forwardRef(
|
|
2109
2109
|
(t, e) => {
|
|
2110
|
-
const { __scopeDialog: n, ...o } = t, r = ce(
|
|
2110
|
+
const { __scopeDialog: n, ...o } = t, r = ce(Ze, n);
|
|
2111
2111
|
return (
|
|
2112
2112
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
2113
2113
|
// ie. when `Overlay` and `Content` are siblings
|
|
@@ -2122,20 +2122,20 @@ var Uo = V.forwardRef(
|
|
|
2122
2122
|
) })
|
|
2123
2123
|
);
|
|
2124
2124
|
}
|
|
2125
|
-
),
|
|
2125
|
+
), Se = "DialogContent", En = V.forwardRef(
|
|
2126
2126
|
(t, e) => {
|
|
2127
|
-
const n = Rn(
|
|
2128
|
-
return /* @__PURE__ */ i(Pt, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(qo, { ...r, ref: e }) : /* @__PURE__ */ i(
|
|
2127
|
+
const n = Rn(Se, t.__scopeDialog), { forceMount: o = n.forceMount, ...r } = t, a = ce(Se, t.__scopeDialog);
|
|
2128
|
+
return /* @__PURE__ */ i(Pt, { present: o || a.open, children: a.modal ? /* @__PURE__ */ i(qo, { ...r, ref: e }) : /* @__PURE__ */ i(jo, { ...r, ref: e }) });
|
|
2129
2129
|
}
|
|
2130
2130
|
);
|
|
2131
|
-
En.displayName =
|
|
2131
|
+
En.displayName = Se;
|
|
2132
2132
|
var qo = V.forwardRef(
|
|
2133
2133
|
(t, e) => {
|
|
2134
|
-
const n = ce(
|
|
2134
|
+
const n = ce(Se, t.__scopeDialog), o = V.useRef(null), r = Tt(e, n.contentRef, o);
|
|
2135
2135
|
return V.useEffect(() => {
|
|
2136
2136
|
const a = o.current;
|
|
2137
2137
|
if (a)
|
|
2138
|
-
return
|
|
2138
|
+
return Fr(a);
|
|
2139
2139
|
}, []), /* @__PURE__ */ i(
|
|
2140
2140
|
On,
|
|
2141
2141
|
{
|
|
@@ -2143,24 +2143,24 @@ var qo = V.forwardRef(
|
|
|
2143
2143
|
ref: r,
|
|
2144
2144
|
trapFocus: n.open,
|
|
2145
2145
|
disableOutsidePointerEvents: !0,
|
|
2146
|
-
onCloseAutoFocus:
|
|
2146
|
+
onCloseAutoFocus: Fe(t.onCloseAutoFocus, (a) => {
|
|
2147
2147
|
var s;
|
|
2148
2148
|
a.preventDefault(), (s = n.triggerRef.current) == null || s.focus();
|
|
2149
2149
|
}),
|
|
2150
|
-
onPointerDownOutside:
|
|
2150
|
+
onPointerDownOutside: Fe(t.onPointerDownOutside, (a) => {
|
|
2151
2151
|
const s = a.detail.originalEvent, c = s.button === 0 && s.ctrlKey === !0;
|
|
2152
2152
|
(s.button === 2 || c) && a.preventDefault();
|
|
2153
2153
|
}),
|
|
2154
|
-
onFocusOutside:
|
|
2154
|
+
onFocusOutside: Fe(
|
|
2155
2155
|
t.onFocusOutside,
|
|
2156
2156
|
(a) => a.preventDefault()
|
|
2157
2157
|
)
|
|
2158
2158
|
}
|
|
2159
2159
|
);
|
|
2160
2160
|
}
|
|
2161
|
-
),
|
|
2161
|
+
), jo = V.forwardRef(
|
|
2162
2162
|
(t, e) => {
|
|
2163
|
-
const n = ce(
|
|
2163
|
+
const n = ce(Se, t.__scopeDialog), o = V.useRef(!1), r = V.useRef(!1);
|
|
2164
2164
|
return /* @__PURE__ */ i(
|
|
2165
2165
|
On,
|
|
2166
2166
|
{
|
|
@@ -2183,8 +2183,8 @@ var qo = V.forwardRef(
|
|
|
2183
2183
|
}
|
|
2184
2184
|
), On = V.forwardRef(
|
|
2185
2185
|
(t, e) => {
|
|
2186
|
-
const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...s } = t, c = ce(
|
|
2187
|
-
return
|
|
2186
|
+
const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...s } = t, c = ce(Se, n), l = V.useRef(null), u = Tt(e, l);
|
|
2187
|
+
return kr(), /* @__PURE__ */ D(ke, { children: [
|
|
2188
2188
|
/* @__PURE__ */ i(
|
|
2189
2189
|
Wr,
|
|
2190
2190
|
{
|
|
@@ -2194,7 +2194,7 @@ var qo = V.forwardRef(
|
|
|
2194
2194
|
onMountAutoFocus: r,
|
|
2195
2195
|
onUnmountAutoFocus: a,
|
|
2196
2196
|
children: /* @__PURE__ */ i(
|
|
2197
|
-
|
|
2197
|
+
zr,
|
|
2198
2198
|
{
|
|
2199
2199
|
role: "dialog",
|
|
2200
2200
|
id: c.contentId,
|
|
@@ -2208,27 +2208,27 @@ var qo = V.forwardRef(
|
|
|
2208
2208
|
)
|
|
2209
2209
|
}
|
|
2210
2210
|
),
|
|
2211
|
-
/* @__PURE__ */
|
|
2211
|
+
/* @__PURE__ */ D(ke, { children: [
|
|
2212
2212
|
/* @__PURE__ */ i(Bo, { titleId: c.titleId }),
|
|
2213
2213
|
/* @__PURE__ */ i(Xo, { contentRef: l, descriptionId: c.descriptionId })
|
|
2214
2214
|
] })
|
|
2215
2215
|
] });
|
|
2216
2216
|
}
|
|
2217
|
-
), Lt = "DialogTitle",
|
|
2217
|
+
), Lt = "DialogTitle", Dn = V.forwardRef(
|
|
2218
2218
|
(t, e) => {
|
|
2219
2219
|
const { __scopeDialog: n, ...o } = t, r = ce(Lt, n);
|
|
2220
2220
|
return /* @__PURE__ */ i(He.h2, { id: r.titleId, ...o, ref: e });
|
|
2221
2221
|
}
|
|
2222
2222
|
);
|
|
2223
|
-
|
|
2224
|
-
var
|
|
2223
|
+
Dn.displayName = Lt;
|
|
2224
|
+
var zn = "DialogDescription", Zo = V.forwardRef(
|
|
2225
2225
|
(t, e) => {
|
|
2226
|
-
const { __scopeDialog: n, ...o } = t, r = ce(
|
|
2226
|
+
const { __scopeDialog: n, ...o } = t, r = ce(zn, n);
|
|
2227
2227
|
return /* @__PURE__ */ i(He.p, { id: r.descriptionId, ...o, ref: e });
|
|
2228
2228
|
}
|
|
2229
2229
|
);
|
|
2230
|
-
|
|
2231
|
-
var An = "DialogClose",
|
|
2230
|
+
Zo.displayName = zn;
|
|
2231
|
+
var An = "DialogClose", Fn = V.forwardRef(
|
|
2232
2232
|
(t, e) => {
|
|
2233
2233
|
const { __scopeDialog: n, ...o } = t, r = ce(An, n);
|
|
2234
2234
|
return /* @__PURE__ */ i(
|
|
@@ -2237,21 +2237,21 @@ var An = "DialogClose", kn = V.forwardRef(
|
|
|
2237
2237
|
type: "button",
|
|
2238
2238
|
...o,
|
|
2239
2239
|
ref: e,
|
|
2240
|
-
onClick:
|
|
2240
|
+
onClick: Fe(t.onClick, () => r.onOpenChange(!1))
|
|
2241
2241
|
}
|
|
2242
2242
|
);
|
|
2243
2243
|
}
|
|
2244
2244
|
);
|
|
2245
|
-
|
|
2245
|
+
Fn.displayName = An;
|
|
2246
2246
|
function Nt(t) {
|
|
2247
2247
|
return t ? "open" : "closed";
|
|
2248
2248
|
}
|
|
2249
|
-
var
|
|
2250
|
-
contentName:
|
|
2249
|
+
var kn = "DialogTitleWarning", [hs, Wn] = Or(kn, {
|
|
2250
|
+
contentName: Se,
|
|
2251
2251
|
titleName: Lt,
|
|
2252
2252
|
docsSlug: "dialog"
|
|
2253
2253
|
}), Bo = ({ titleId: t }) => {
|
|
2254
|
-
const e = Wn(
|
|
2254
|
+
const e = Wn(kn), n = `\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
|
|
2255
2255
|
|
|
2256
2256
|
If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
2257
2257
|
|
|
@@ -2266,8 +2266,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do
|
|
|
2266
2266
|
const r = (a = t.current) == null ? void 0 : a.getAttribute("aria-describedby");
|
|
2267
2267
|
e && r && (document.getElementById(e) || console.warn(o));
|
|
2268
2268
|
}, [o, t, e]), null;
|
|
2269
|
-
}, Jo = yn, Yo = Ln, Qo = Nn, ei = En, ti =
|
|
2270
|
-
const
|
|
2269
|
+
}, Jo = yn, Yo = Ln, Qo = Nn, ei = En, ti = Dn, ni = Fn;
|
|
2270
|
+
const Pe = {
|
|
2271
2271
|
"rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
|
|
2272
2272
|
"rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
|
|
2273
2273
|
"rp-document-dialog": "_rp-document-dialog_slqo7_13",
|
|
@@ -2276,7 +2276,7 @@ const Te = {
|
|
|
2276
2276
|
"rp-dialog-close": "_rp-dialog-close_slqo7_47",
|
|
2277
2277
|
"rp-properties-divider": "_rp-properties-divider_slqo7_55"
|
|
2278
2278
|
}, ri = () => {
|
|
2279
|
-
const { pdfProperties: t } = Y(), { container: e } =
|
|
2279
|
+
const { pdfProperties: t } = Y(), { container: e } = Ie(), { activeDocumentProperties: n, setActiveDocumentProperties: o } = $r(), { localeMessages: r } = le(), a = k(() => {
|
|
2280
2280
|
if (!t)
|
|
2281
2281
|
return [];
|
|
2282
2282
|
const {
|
|
@@ -2316,12 +2316,12 @@ const Te = {
|
|
|
2316
2316
|
{ label: r == null ? void 0 : r.propertiesPageCountLabel, value: _ }
|
|
2317
2317
|
];
|
|
2318
2318
|
}, [t, r]);
|
|
2319
|
-
return /* @__PURE__ */ i(Jo, { open: n, onOpenChange: o, children: /* @__PURE__ */ i(Yo, { container: e, children: /* @__PURE__ */
|
|
2320
|
-
/* @__PURE__ */ i(Qo, { className:
|
|
2321
|
-
/* @__PURE__ */
|
|
2322
|
-
/* @__PURE__ */ i(ti, { className:
|
|
2323
|
-
/* @__PURE__ */ i("div", { className:
|
|
2324
|
-
/* @__PURE__ */ i(ni, { asChild: !0, className:
|
|
2319
|
+
return /* @__PURE__ */ i(Jo, { open: n, onOpenChange: o, children: /* @__PURE__ */ i(Yo, { container: e, children: /* @__PURE__ */ D("div", { className: Pe["rp-dialog-wrapper"], children: [
|
|
2320
|
+
/* @__PURE__ */ i(Qo, { className: Pe["rp-dialog-overlay"] }),
|
|
2321
|
+
/* @__PURE__ */ D(ei, { className: Pe["rp-document-dialog"], children: [
|
|
2322
|
+
/* @__PURE__ */ i(ti, { className: Pe["rp-dialog-title"], children: r == null ? void 0 : r.documentPropertiesLabel }),
|
|
2323
|
+
/* @__PURE__ */ i("div", { className: Pe["rp-document-properties"], children: a.map((s, c) => /* @__PURE__ */ i("div", { children: s.separate ? /* @__PURE__ */ i("div", { className: Pe["rp-properties-divider"] }) : /* @__PURE__ */ i(Hr, { label: s.label, value: s.value }) }, c)) }),
|
|
2324
|
+
/* @__PURE__ */ i(ni, { asChild: !0, className: Pe["rp-dialog-close"], children: /* @__PURE__ */ i(ln, {}) })
|
|
2325
2325
|
] })
|
|
2326
2326
|
] }) }) });
|
|
2327
2327
|
}, oi = {
|
|
@@ -2339,21 +2339,21 @@ const Te = {
|
|
|
2339
2339
|
}, []) };
|
|
2340
2340
|
}, Mn = () => {
|
|
2341
2341
|
const { downloadIcon: t } = ue();
|
|
2342
|
-
return t || /* @__PURE__ */ i(
|
|
2343
|
-
}, Hn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(
|
|
2342
|
+
return t || /* @__PURE__ */ i(jr, {});
|
|
2343
|
+
}, Hn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(j, { className: e, content: n == null ? void 0 : n.downloadFileTooltip, children: t }), ci = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(Hn, { localeMessages: e, children: /* @__PURE__ */ i(te, { onClick: t, "aria-label": e == null ? void 0 : e.downloadFileTooltip, children: /* @__PURE__ */ i(Mn, {}) }) }), li = ({ download: t, localeMessages: e }) => /* @__PURE__ */ i(we, { onClick: t, children: /* @__PURE__ */ D(Hn, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2344
2344
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Mn, {}) }),
|
|
2345
2345
|
e == null ? void 0 : e.downloadFileLabel
|
|
2346
2346
|
] }) }), $n = () => {
|
|
2347
|
-
const { download: t } = si(), { downloadTool: e = !0 } = ge(), { isSmallScreen: n } =
|
|
2347
|
+
const { download: t } = si(), { downloadTool: e = !0 } = ge(), { isSmallScreen: n } = ye(), { localeMessages: o } = le();
|
|
2348
2348
|
return e ? n ? /* @__PURE__ */ i(li, { download: t, localeMessages: o }) : typeof e == "function" ? /* @__PURE__ */ i(e, { download: t }) : e ? /* @__PURE__ */ i(ci, { download: t, localeMessages: o }) : null : null;
|
|
2349
2349
|
}, Gn = () => {
|
|
2350
2350
|
const { printIcon: t } = ue();
|
|
2351
|
-
return t || /* @__PURE__ */ i(
|
|
2352
|
-
}, Vn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(
|
|
2351
|
+
return t || /* @__PURE__ */ i(Zr, {});
|
|
2352
|
+
}, Vn = ({ children: t, className: e, localeMessages: n }) => /* @__PURE__ */ i(j, { className: e, content: n == null ? void 0 : n.printTooltip, children: t }), ui = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(Vn, { localeMessages: e, children: /* @__PURE__ */ i(te, { onClick: t, "aria-label": e == null ? void 0 : e.printTooltip, children: /* @__PURE__ */ i(Gn, {}) }) }), di = ({ print: t, localeMessages: e }) => /* @__PURE__ */ i(we, { onClick: t, children: /* @__PURE__ */ D(Vn, { className: "rp-menu-item", localeMessages: e, children: [
|
|
2353
2353
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(Gn, {}) }),
|
|
2354
2354
|
e == null ? void 0 : e.printLabel
|
|
2355
2355
|
] }) }), Un = () => {
|
|
2356
|
-
const { print: t, cancel: e, setOnProgress: n, setOnComplete: o, setOnError: r, progress: a } = It(), { printTool: s = !0 } = ge(), { isSmallScreen: c } =
|
|
2356
|
+
const { print: t, cancel: e, setOnProgress: n, setOnComplete: o, setOnError: r, progress: a } = It(), { printTool: s = !0 } = ge(), { isSmallScreen: c } = ye(), { localeMessages: l } = le();
|
|
2357
2357
|
return s ? c ? /* @__PURE__ */ i(di, { print: t, localeMessages: l }) : typeof s == "function" ? /* @__PURE__ */ i(
|
|
2358
2358
|
s,
|
|
2359
2359
|
{
|
|
@@ -2374,24 +2374,24 @@ const Te = {
|
|
|
2374
2374
|
const { goToLastPageIcon: t } = ue();
|
|
2375
2375
|
return t || /* @__PURE__ */ i(dn, {});
|
|
2376
2376
|
}, Jt = { width: "100%" }, fi = () => {
|
|
2377
|
-
const { goToPage: t, totalPages: e, focusedPage: n } = se(), { jumpNavigationTool: o = !0 } = ge(), { localeMessages: r } = le(), a =
|
|
2377
|
+
const { goToPage: t, totalPages: e, focusedPage: n } = se(), { jumpNavigationTool: o = !0 } = ge(), { localeMessages: r } = le(), a = k(() => n === 1, [n]), s = k(() => n === e, [n, e]), c = L(() => {
|
|
2378
2378
|
t(1);
|
|
2379
2379
|
}, [t]), l = L(() => {
|
|
2380
2380
|
t(e);
|
|
2381
2381
|
}, [t, e]);
|
|
2382
|
-
return o ? /* @__PURE__ */
|
|
2383
|
-
/* @__PURE__ */ i(we, { onClick: c, children: /* @__PURE__ */ i(
|
|
2382
|
+
return o ? /* @__PURE__ */ D(je, { children: [
|
|
2383
|
+
/* @__PURE__ */ i(we, { onClick: c, children: /* @__PURE__ */ i(j, { content: r == null ? void 0 : r.firstPageTooltip, style: Jt, children: /* @__PURE__ */ D("div", { className: "rp-menu-item", "aria-disabled": a, children: [
|
|
2384
2384
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(hi, {}) }),
|
|
2385
2385
|
/* @__PURE__ */ i("span", { children: r == null ? void 0 : r.firstPageLabel })
|
|
2386
2386
|
] }) }) }),
|
|
2387
|
-
/* @__PURE__ */ i(we, { onClick: l, children: /* @__PURE__ */ i(
|
|
2387
|
+
/* @__PURE__ */ i(we, { onClick: l, children: /* @__PURE__ */ i(j, { content: r == null ? void 0 : r.lastPageTooltip, style: Jt, children: /* @__PURE__ */ D("div", { className: "rp-menu-item", "aria-disabled": s, children: [
|
|
2388
2388
|
/* @__PURE__ */ i("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ i(mi, {}) }),
|
|
2389
2389
|
/* @__PURE__ */ i("span", { children: r == null ? void 0 : r.lastPageLabel })
|
|
2390
2390
|
] }) }) }),
|
|
2391
2391
|
/* @__PURE__ */ i(St, {})
|
|
2392
2392
|
] }) : null;
|
|
2393
2393
|
}, gi = () => {
|
|
2394
|
-
const { container: t } =
|
|
2394
|
+
const { container: t } = Ie(), { isSmallScreen: e } = ye(), {
|
|
2395
2395
|
openFileTool: n,
|
|
2396
2396
|
downloadTool: o,
|
|
2397
2397
|
documentProperties: r,
|
|
@@ -2402,7 +2402,7 @@ const Te = {
|
|
|
2402
2402
|
printTool: u,
|
|
2403
2403
|
fullscreenTool: h
|
|
2404
2404
|
} = ge(), { localeMessages: m } = le();
|
|
2405
|
-
return
|
|
2405
|
+
return k(() => {
|
|
2406
2406
|
const w = l || s || c || a || r;
|
|
2407
2407
|
let g = !1;
|
|
2408
2408
|
return e && (g = !(!n && !o && !u && !h)), w || g;
|
|
@@ -2415,14 +2415,14 @@ const Te = {
|
|
|
2415
2415
|
c,
|
|
2416
2416
|
l,
|
|
2417
2417
|
e
|
|
2418
|
-
]) ? /* @__PURE__ */
|
|
2418
|
+
]) ? /* @__PURE__ */ D(Gr, { children: [
|
|
2419
2419
|
/* @__PURE__ */ i(
|
|
2420
2420
|
cn,
|
|
2421
2421
|
{
|
|
2422
2422
|
container: t,
|
|
2423
|
-
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(
|
|
2424
|
-
children: /* @__PURE__ */
|
|
2425
|
-
e && /* @__PURE__ */
|
|
2423
|
+
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(j, { content: m == null ? void 0 : m.moreOptionTooltip, children: /* @__PURE__ */ i(te, { "aria-label": m == null ? void 0 : m.moreOptionTooltip, children: /* @__PURE__ */ i(Lr, {}) }) }) }),
|
|
2424
|
+
children: /* @__PURE__ */ D("div", { className: oi["rp-other-tool-content"], "data-rp": "moreOptionsDropdown", children: [
|
|
2425
|
+
e && /* @__PURE__ */ D(je, { children: [
|
|
2426
2426
|
/* @__PURE__ */ i(sn, {}),
|
|
2427
2427
|
/* @__PURE__ */ i($n, {}),
|
|
2428
2428
|
/* @__PURE__ */ i(Un, {}),
|
|
@@ -2440,10 +2440,10 @@ const Te = {
|
|
|
2440
2440
|
/* @__PURE__ */ i(ri, {})
|
|
2441
2441
|
] }) : null;
|
|
2442
2442
|
}, vi = () => {
|
|
2443
|
-
const { isSmallScreen: t } =
|
|
2444
|
-
return /* @__PURE__ */
|
|
2443
|
+
const { isSmallScreen: t } = ye();
|
|
2444
|
+
return /* @__PURE__ */ D(ke, { children: [
|
|
2445
2445
|
/* @__PURE__ */ i(Rr, {}),
|
|
2446
|
-
!t && /* @__PURE__ */
|
|
2446
|
+
!t && /* @__PURE__ */ D(ke, { children: [
|
|
2447
2447
|
/* @__PURE__ */ i(sn, {}),
|
|
2448
2448
|
/* @__PURE__ */ i($n, {}),
|
|
2449
2449
|
/* @__PURE__ */ i(Un, {}),
|
|
@@ -2464,7 +2464,7 @@ const Te = {
|
|
|
2464
2464
|
const { zoomOutIcon: t } = ue();
|
|
2465
2465
|
return t || /* @__PURE__ */ i(Xr, {});
|
|
2466
2466
|
}, Ti = () => {
|
|
2467
|
-
const { zoomLevel: t, setZoomLevel: e } = Ye(), { container: n, contentRef: o } =
|
|
2467
|
+
const { zoomLevel: t, setZoomLevel: e } = Ye(), { container: n, contentRef: o } = Ie(), { zoomTool: r = !0 } = ge(), { focusedPage: a } = se(), { rotate: s } = Je(), { pages: c } = Y(), { isSmallScreen: l } = ye(), { localeMessages: u } = le(), h = L(() => {
|
|
2468
2468
|
e((_) => {
|
|
2469
2469
|
const f = Math.floor(_ / 25) * 25;
|
|
2470
2470
|
return Math.min(f + 25, dt);
|
|
@@ -2474,7 +2474,7 @@ const Te = {
|
|
|
2474
2474
|
const f = Math.ceil(_ / 25) * 25;
|
|
2475
2475
|
return Math.min(f - 25, dt);
|
|
2476
2476
|
});
|
|
2477
|
-
}, [e]), d =
|
|
2477
|
+
}, [e]), d = k(() => t === _i, [t]), w = k(() => t === dt, [t]), g = k(() => {
|
|
2478
2478
|
var _;
|
|
2479
2479
|
return (_ = c.get(a)) == null ? void 0 : _.page.getViewport({ scale: 1, rotation: s });
|
|
2480
2480
|
}, [c, a, s]), b = L(
|
|
@@ -2489,8 +2489,8 @@ const Te = {
|
|
|
2489
2489
|
},
|
|
2490
2490
|
[e, b]
|
|
2491
2491
|
);
|
|
2492
|
-
return typeof r != "boolean" ? /* @__PURE__ */ i(r, { zoomLevel: t, setZoomLevel: e }) : r ? /* @__PURE__ */
|
|
2493
|
-
/* @__PURE__ */ i(
|
|
2492
|
+
return typeof r != "boolean" ? /* @__PURE__ */ i(r, { zoomLevel: t, setZoomLevel: e }) : r ? /* @__PURE__ */ D("div", { className: Le["rp-zoom-wrapper"], children: [
|
|
2493
|
+
/* @__PURE__ */ i(j, { content: u == null ? void 0 : u.zoomOutTooltip, children: /* @__PURE__ */ i(
|
|
2494
2494
|
te,
|
|
2495
2495
|
{
|
|
2496
2496
|
disabled: d,
|
|
@@ -2503,7 +2503,7 @@ const Te = {
|
|
|
2503
2503
|
cn,
|
|
2504
2504
|
{
|
|
2505
2505
|
container: n,
|
|
2506
|
-
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(
|
|
2506
|
+
triggerComponent: /* @__PURE__ */ i("div", { role: "button", children: /* @__PURE__ */ i(j, { content: u == null ? void 0 : u.zoomSelectTooltip, children: /* @__PURE__ */ D(
|
|
2507
2507
|
te,
|
|
2508
2508
|
{
|
|
2509
2509
|
className: Le["rp-current-zoom-wrapper"],
|
|
@@ -2517,21 +2517,21 @@ const Te = {
|
|
|
2517
2517
|
) }) }),
|
|
2518
2518
|
style: { minWidth: "200px" },
|
|
2519
2519
|
align: "center",
|
|
2520
|
-
children: /* @__PURE__ */
|
|
2521
|
-
/* @__PURE__ */
|
|
2520
|
+
children: /* @__PURE__ */ D("div", { className: Le["rp-zoom-dropdown-content"], children: [
|
|
2521
|
+
/* @__PURE__ */ D(je, { children: [
|
|
2522
2522
|
/* @__PURE__ */ i(we, { onClick: () => v(nt.ACTUAL), children: u == null ? void 0 : u.zoomActualSize }),
|
|
2523
2523
|
/* @__PURE__ */ i(we, { onClick: () => v(nt.PAGE_FIT), children: u == null ? void 0 : u.zoomPageFit }),
|
|
2524
2524
|
/* @__PURE__ */ i(we, { onClick: () => v(nt.PAGE_WIDTH), children: u == null ? void 0 : u.zoomPageWidth })
|
|
2525
2525
|
] }),
|
|
2526
2526
|
/* @__PURE__ */ i(St, {}),
|
|
2527
|
-
/* @__PURE__ */ i(
|
|
2527
|
+
/* @__PURE__ */ i(je, { children: wi.map((_) => /* @__PURE__ */ D(we, { onClick: () => v(_), children: [
|
|
2528
2528
|
_,
|
|
2529
2529
|
" %"
|
|
2530
2530
|
] }, _)) })
|
|
2531
2531
|
] })
|
|
2532
2532
|
}
|
|
2533
2533
|
),
|
|
2534
|
-
/* @__PURE__ */ i(
|
|
2534
|
+
/* @__PURE__ */ i(j, { content: u == null ? void 0 : u.zoomInTooltip, children: /* @__PURE__ */ i(
|
|
2535
2535
|
te,
|
|
2536
2536
|
{
|
|
2537
2537
|
disabled: w,
|
|
@@ -2542,20 +2542,20 @@ const Te = {
|
|
|
2542
2542
|
) })
|
|
2543
2543
|
] }) : null;
|
|
2544
2544
|
}, ne = {
|
|
2545
|
-
"rp-search-tool-content": "_rp-search-tool-
|
|
2546
|
-
"rp-search-tool-input": "_rp-search-tool-
|
|
2547
|
-
"rp-search-tool-input-icon": "_rp-search-tool-input-
|
|
2548
|
-
"rp-search-tool-controls": "_rp-search-tool-
|
|
2549
|
-
"rp-search-tool-input-wrapper": "_rp-search-tool-input-
|
|
2550
|
-
"rp-search-tool-input-checkboxes": "_rp-search-tool-input-
|
|
2551
|
-
"rp-search-tool-input-clear": "_rp-search-tool-input-
|
|
2552
|
-
"rp-search-input": "_rp-search-
|
|
2553
|
-
"rp-search-icon-info": "_rp-search-icon-
|
|
2545
|
+
"rp-search-tool-content": "_rp-search-tool-content_jvchu_1",
|
|
2546
|
+
"rp-search-tool-input": "_rp-search-tool-input_jvchu_8",
|
|
2547
|
+
"rp-search-tool-input-icon": "_rp-search-tool-input-icon_jvchu_14",
|
|
2548
|
+
"rp-search-tool-controls": "_rp-search-tool-controls_jvchu_24",
|
|
2549
|
+
"rp-search-tool-input-wrapper": "_rp-search-tool-input-wrapper_jvchu_32",
|
|
2550
|
+
"rp-search-tool-input-checkboxes": "_rp-search-tool-input-checkboxes_jvchu_38",
|
|
2551
|
+
"rp-search-tool-input-clear": "_rp-search-tool-input-clear_jvchu_43",
|
|
2552
|
+
"rp-search-input": "_rp-search-input_jvchu_57",
|
|
2553
|
+
"rp-search-icon-info": "_rp-search-icon-info_jvchu_62"
|
|
2554
2554
|
}, Yt = () => {
|
|
2555
2555
|
const { searchIcon: t } = ue();
|
|
2556
2556
|
return t || /* @__PURE__ */ i(Yr, {});
|
|
2557
2557
|
}, Pi = () => {
|
|
2558
|
-
const { container: t } =
|
|
2558
|
+
const { container: t } = Ie(), [e, n] = H(!1), { pdf: o } = Y(), [r, a] = H(null), {
|
|
2559
2559
|
searchOptions: s,
|
|
2560
2560
|
setSearchOptions: c,
|
|
2561
2561
|
loading: l,
|
|
@@ -2592,12 +2592,12 @@ const Te = {
|
|
|
2592
2592
|
_(x.target.value);
|
|
2593
2593
|
}, []), A = L(() => {
|
|
2594
2594
|
_(""), u("");
|
|
2595
|
-
}, [u]), I =
|
|
2595
|
+
}, [u]), I = k(() => `${m} / ${h}`, [m, h]), { wholeWords: E, matchCase: y } = k(() => s, [s]), F = L(
|
|
2596
2596
|
(x) => {
|
|
2597
2597
|
c((N) => ({ ...N, matchCase: x }));
|
|
2598
2598
|
},
|
|
2599
2599
|
[c]
|
|
2600
|
-
),
|
|
2600
|
+
), z = L(
|
|
2601
2601
|
(x) => {
|
|
2602
2602
|
c((N) => ({ ...N, wholeWords: x }));
|
|
2603
2603
|
},
|
|
@@ -2605,16 +2605,16 @@ const Te = {
|
|
|
2605
2605
|
);
|
|
2606
2606
|
return O(() => {
|
|
2607
2607
|
R();
|
|
2608
|
-
}, [o, R]), b ? /* @__PURE__ */ i(
|
|
2608
|
+
}, [o, R]), b ? /* @__PURE__ */ i(ke, { children: /* @__PURE__ */ i(
|
|
2609
2609
|
eo,
|
|
2610
2610
|
{
|
|
2611
2611
|
open: e,
|
|
2612
2612
|
container: t,
|
|
2613
|
-
triggerComponent: /* @__PURE__ */ i(
|
|
2614
|
-
children: /* @__PURE__ */
|
|
2615
|
-
/* @__PURE__ */
|
|
2616
|
-
/* @__PURE__ */
|
|
2617
|
-
/* @__PURE__ */ i(
|
|
2613
|
+
triggerComponent: /* @__PURE__ */ i(j, { content: f == null ? void 0 : f.searchButtonTooltip, children: /* @__PURE__ */ i(te, { onClick: P, "aria-label": f == null ? void 0 : f.searchButtonTooltip, children: /* @__PURE__ */ i(Yt, {}) }) }),
|
|
2614
|
+
children: /* @__PURE__ */ D("div", { className: ne["rp-search-tool-content"], children: [
|
|
2615
|
+
/* @__PURE__ */ D("div", { className: ne["rp-search-tool-input-wrapper"], children: [
|
|
2616
|
+
/* @__PURE__ */ D("div", { className: ne["rp-search-tool-input"], children: [
|
|
2617
|
+
/* @__PURE__ */ i(j, { content: f == null ? void 0 : f.searchInputTooltip, children: /* @__PURE__ */ i(
|
|
2618
2618
|
tn,
|
|
2619
2619
|
{
|
|
2620
2620
|
value: v,
|
|
@@ -2629,22 +2629,22 @@ const Te = {
|
|
|
2629
2629
|
) }),
|
|
2630
2630
|
l ? /* @__PURE__ */ i("span", { children: /* @__PURE__ */ i(Me, {}) }) : /* @__PURE__ */ i("span", { children: I })
|
|
2631
2631
|
] }),
|
|
2632
|
-
/* @__PURE__ */
|
|
2633
|
-
/* @__PURE__ */ i(
|
|
2634
|
-
/* @__PURE__ */ i(
|
|
2635
|
-
/* @__PURE__ */ i(
|
|
2636
|
-
/* @__PURE__ */ i(
|
|
2632
|
+
/* @__PURE__ */ D("div", { className: ne["rp-search-tool-input-checkboxes"], children: [
|
|
2633
|
+
/* @__PURE__ */ i(Dt, { name: "matchCase", value: y, onChange: F, children: f == null ? void 0 : f.searchMatchCaseLabel }),
|
|
2634
|
+
/* @__PURE__ */ i(j, { content: f == null ? void 0 : f.searchMatchCaseTooltip, children: /* @__PURE__ */ i("div", { className: ne["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(zt, {}) }) }),
|
|
2635
|
+
/* @__PURE__ */ i(Dt, { name: "wholeWord", value: E, onChange: z, children: f == null ? void 0 : f.searchWholeWordsLabel }),
|
|
2636
|
+
/* @__PURE__ */ i(j, { content: f == null ? void 0 : f.searchWholeWordsTooltip, children: /* @__PURE__ */ i("div", { className: ne["rp-search-icon-info"], tabIndex: 0, children: /* @__PURE__ */ i(zt, {}) }) })
|
|
2637
2637
|
] })
|
|
2638
2638
|
] }),
|
|
2639
|
-
/* @__PURE__ */
|
|
2640
|
-
/* @__PURE__ */ i(
|
|
2639
|
+
/* @__PURE__ */ D("div", { className: ne["rp-search-tool-controls"], children: [
|
|
2640
|
+
/* @__PURE__ */ i(j, { content: f == null ? void 0 : f.searchPrevTooltip, children: /* @__PURE__ */ i(te, { onClick: w, "aria-label": f == null ? void 0 : f.searchPrevTooltip, children: /* @__PURE__ */ i(
|
|
2641
2641
|
We,
|
|
2642
2642
|
{
|
|
2643
2643
|
className: ne["rp-search-tool-input-icon"],
|
|
2644
2644
|
"aria-disabled": !h
|
|
2645
2645
|
}
|
|
2646
2646
|
) }) }),
|
|
2647
|
-
/* @__PURE__ */ i(
|
|
2647
|
+
/* @__PURE__ */ i(j, { content: f == null ? void 0 : f.searchNextTooltip, children: /* @__PURE__ */ i(te, { onClick: d, "aria-label": f == null ? void 0 : f.searchNextTooltip, children: /* @__PURE__ */ i(
|
|
2648
2648
|
We,
|
|
2649
2649
|
{
|
|
2650
2650
|
style: { transform: "rotate(180deg" },
|
|
@@ -2652,7 +2652,7 @@ const Te = {
|
|
|
2652
2652
|
"aria-disabled": !h
|
|
2653
2653
|
}
|
|
2654
2654
|
) }) }),
|
|
2655
|
-
/* @__PURE__ */ i(
|
|
2655
|
+
/* @__PURE__ */ i(j, { content: f == null ? void 0 : f.searchCloseButtonTooltip, children: /* @__PURE__ */ i(
|
|
2656
2656
|
te,
|
|
2657
2657
|
{
|
|
2658
2658
|
onKeyDown: p,
|
|
@@ -2664,18 +2664,18 @@ const Te = {
|
|
|
2664
2664
|
] })
|
|
2665
2665
|
}
|
|
2666
2666
|
) }) : null;
|
|
2667
|
-
}, Si = "
|
|
2668
|
-
"rp-loading-overlay": "_rp-loading-
|
|
2669
|
-
"rp-loading-modal": "_rp-loading-
|
|
2670
|
-
"rp-loading-title": "_rp-loading-
|
|
2671
|
-
"rp-loading-progress-bar": "_rp-loading-progress-
|
|
2672
|
-
"rp-loading-progress": "_rp-loading-
|
|
2673
|
-
"rp-loading-cancel-button": "_rp-loading-cancel-
|
|
2667
|
+
}, Si = "_loading_16o91_1", Ne = {
|
|
2668
|
+
"rp-loading-overlay": "_rp-loading-overlay_16o91_1",
|
|
2669
|
+
"rp-loading-modal": "_rp-loading-modal_16o91_14",
|
|
2670
|
+
"rp-loading-title": "_rp-loading-title_16o91_27",
|
|
2671
|
+
"rp-loading-progress-bar": "_rp-loading-progress-bar_16o91_35",
|
|
2672
|
+
"rp-loading-progress": "_rp-loading-progress_16o91_35",
|
|
2673
|
+
"rp-loading-cancel-button": "_rp-loading-cancel-button_16o91_52",
|
|
2674
2674
|
loading: Si
|
|
2675
2675
|
}, Ii = ({ percentage: t }) => {
|
|
2676
2676
|
const { cancel: e } = It(), { localeMessages: n } = le();
|
|
2677
|
-
return t < 1 ? null : /* @__PURE__ */ i("div", { className: re(Ne["rp-loading-overlay"]), children: /* @__PURE__ */
|
|
2678
|
-
/* @__PURE__ */
|
|
2677
|
+
return t < 1 ? null : /* @__PURE__ */ i("div", { className: re(Ne["rp-loading-overlay"]), children: /* @__PURE__ */ D("div", { className: re(Ne["rp-loading-modal"]), children: [
|
|
2678
|
+
/* @__PURE__ */ D("div", { className: re(Ne["rp-loading-title"]), children: [
|
|
2679
2679
|
n == null ? void 0 : n.printLoadingMessage,
|
|
2680
2680
|
"..."
|
|
2681
2681
|
] }),
|
|
@@ -2689,15 +2689,15 @@ const Te = {
|
|
|
2689
2689
|
/* @__PURE__ */ i("button", { className: re(Ne["rp-loading-cancel-button"]), onClick: e, children: n == null ? void 0 : n.printCancelLabel })
|
|
2690
2690
|
] }) });
|
|
2691
2691
|
}, yi = Xe((t, e) => {
|
|
2692
|
-
const { showPrintProgress: n } = ge(), { progress: o } = It(), { isSmallScreen: r } =
|
|
2693
|
-
return /* @__PURE__ */
|
|
2694
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBar", ref: e, className:
|
|
2695
|
-
/* @__PURE__ */
|
|
2692
|
+
const { showPrintProgress: n } = ge(), { progress: o } = It(), { isSmallScreen: r } = ye(), { percentage: a } = o || {}, s = () => r ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
|
|
2693
|
+
return /* @__PURE__ */ D("div", { children: [
|
|
2694
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBar", ref: e, className: ze["rp-toolbar-content"], children: /* @__PURE__ */ D("div", { className: ze["rp-toolbar-wrapper"], style: s(), children: [
|
|
2695
|
+
/* @__PURE__ */ D("div", { "data-rp": "topBarLeft", className: ze["rp-toolbar-start"], children: [
|
|
2696
2696
|
/* @__PURE__ */ i(Pi, {}),
|
|
2697
2697
|
/* @__PURE__ */ i(Ho, {})
|
|
2698
2698
|
] }),
|
|
2699
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className:
|
|
2700
|
-
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className:
|
|
2699
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarCenter", className: ze["rp-toolbar-middle"], children: /* @__PURE__ */ i(Ti, {}) }),
|
|
2700
|
+
/* @__PURE__ */ i("div", { "data-rp": "topBarRight", className: ze["rp-toolbar-end"], children: /* @__PURE__ */ i(vi, {}) })
|
|
2701
2701
|
] }) }),
|
|
2702
2702
|
n && a ? /* @__PURE__ */ i(Ii, { percentage: a }) : null
|
|
2703
2703
|
] });
|
|
@@ -2713,13 +2713,13 @@ const Te = {
|
|
|
2713
2713
|
"rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
|
|
2714
2714
|
"rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
|
|
2715
2715
|
}, xi = (t) => {
|
|
2716
|
-
const { thumbnailSrc: e, pageNumber: n, isFocused: o, viewport: r } = t, { goToPage: a } = se(), s =
|
|
2716
|
+
const { thumbnailSrc: e, pageNumber: n, isFocused: o, viewport: r } = t, { goToPage: a } = se(), s = k(() => o ? Ae["rp-thumbnail-active"] : "", [o]), c = k(() => ({
|
|
2717
2717
|
width: Math.round(r.width),
|
|
2718
2718
|
height: Math.round(r.height)
|
|
2719
2719
|
}), [r]), l = L(() => {
|
|
2720
2720
|
n && a(n);
|
|
2721
2721
|
}, [a, n]);
|
|
2722
|
-
return /* @__PURE__ */
|
|
2722
|
+
return /* @__PURE__ */ D(
|
|
2723
2723
|
"div",
|
|
2724
2724
|
{
|
|
2725
2725
|
onClick: l,
|
|
@@ -2758,7 +2758,7 @@ const Te = {
|
|
|
2758
2758
|
}, Ni = Xe((t, e) => {
|
|
2759
2759
|
const { show: n } = t, { focusedPage: o, totalPages: r } = se(), { thumbnailPages: a, addPage: s, thumbnailLength: c, addToPage: l } = gn(), u = W(null), h = W(1);
|
|
2760
2760
|
en(e, () => u.current);
|
|
2761
|
-
const m =
|
|
2761
|
+
const m = k(() => Object.values(a), [a]), d = L(() => {
|
|
2762
2762
|
const w = c + 1;
|
|
2763
2763
|
w <= r && s(w);
|
|
2764
2764
|
}, [s, r, c]);
|
|
@@ -2784,7 +2784,7 @@ const Te = {
|
|
|
2784
2784
|
}, Oi = () => {
|
|
2785
2785
|
const { active: t, setActive: e } = gn(), [n, o] = H(200), r = W(null), { thumbnailTool: a } = ge(), { localeMessages: s } = le(), c = L(() => {
|
|
2786
2786
|
e((u) => !u);
|
|
2787
|
-
}, []), l =
|
|
2787
|
+
}, []), l = k(() => typeof a != "boolean" && a ? /* @__PURE__ */ i(a, { onClick: c, active: t }) : a ? /* @__PURE__ */ i(j, { content: s == null ? void 0 : s.thumbnailTooltip, children: /* @__PURE__ */ i(
|
|
2788
2788
|
te,
|
|
2789
2789
|
{
|
|
2790
2790
|
onClick: c,
|
|
@@ -2793,7 +2793,7 @@ const Te = {
|
|
|
2793
2793
|
children: /* @__PURE__ */ i(Ei, {})
|
|
2794
2794
|
}
|
|
2795
2795
|
) }) : null, [a, t, c]);
|
|
2796
|
-
return /* @__PURE__ */
|
|
2796
|
+
return /* @__PURE__ */ D(
|
|
2797
2797
|
"div",
|
|
2798
2798
|
{
|
|
2799
2799
|
style: { "--rp-thumbnail-width": `${n}px` },
|
|
@@ -2801,7 +2801,7 @@ const Te = {
|
|
|
2801
2801
|
"data-rp": "sidebar",
|
|
2802
2802
|
children: [
|
|
2803
2803
|
/* @__PURE__ */ i("div", { className: pt["rp-sidebar-content"], children: l }),
|
|
2804
|
-
/* @__PURE__ */
|
|
2804
|
+
/* @__PURE__ */ D("div", { "data-rp": "thumbnailSidebar", hidden: !t, className: pt["rp-thumbnails-wrapper"], children: [
|
|
2805
2805
|
/* @__PURE__ */ i(Ni, { show: t, ref: r }),
|
|
2806
2806
|
/* @__PURE__ */ i(hr, { onWidthChange: o, thumbnailRef: r })
|
|
2807
2807
|
] })
|
|
@@ -2809,10 +2809,10 @@ const Te = {
|
|
|
2809
2809
|
}
|
|
2810
2810
|
);
|
|
2811
2811
|
}, ms = Xe((t, e) => {
|
|
2812
|
-
const { children: n, slots: o, icons: r, style: a, className: s, mobileWidth: c, onLoaded: l, cleanupOnLoaded: u } = t, [h, m] = H(null), { setContainer: d, setContentRef: w } =
|
|
2812
|
+
const { children: n, slots: o, icons: r, style: a, className: s, mobileWidth: c, onLoaded: l, cleanupOnLoaded: u } = t, [h, m] = H(null), { setContainer: d, setContentRef: w } = Ie(), { loading: g } = Y();
|
|
2813
2813
|
return O(() => (l && l(), () => {
|
|
2814
2814
|
u && u();
|
|
2815
|
-
}), [l, u]), /* @__PURE__ */ i("div", { ref: e, className: re(
|
|
2815
|
+
}), [l, u]), /* @__PURE__ */ i("div", { ref: e, className: re(Ce["rp-theme-variables"], Ce["rp-container"]), children: /* @__PURE__ */ i(wr, { mobileWidth: c, children: /* @__PURE__ */ i(mr, { slots: o, children: /* @__PURE__ */ i(fr, { icons: r, children: /* @__PURE__ */ D(
|
|
2816
2816
|
gr,
|
|
2817
2817
|
{
|
|
2818
2818
|
getContainerRef: d,
|
|
@@ -2820,12 +2820,12 @@ const Te = {
|
|
|
2820
2820
|
style: a,
|
|
2821
2821
|
className: s,
|
|
2822
2822
|
children: [
|
|
2823
|
-
/* @__PURE__ */
|
|
2824
|
-
/* @__PURE__ */
|
|
2823
|
+
/* @__PURE__ */ D(vr, { children: [
|
|
2824
|
+
/* @__PURE__ */ D("div", { className: Ce["rp-layout"], children: [
|
|
2825
2825
|
/* @__PURE__ */ i(yi, { ref: m }),
|
|
2826
|
-
/* @__PURE__ */
|
|
2827
|
-
/* @__PURE__ */ i("div", { className:
|
|
2828
|
-
/* @__PURE__ */ i("div", { ref: w, className:
|
|
2826
|
+
/* @__PURE__ */ D("div", { className: Ce["rp-content"], children: [
|
|
2827
|
+
/* @__PURE__ */ i("div", { className: Ce["rp-sidebar"], children: /* @__PURE__ */ i(Oi, {}) }),
|
|
2828
|
+
/* @__PURE__ */ i("div", { ref: w, className: Ce["rp-pages"], children: n })
|
|
2829
2829
|
] })
|
|
2830
2830
|
] }),
|
|
2831
2831
|
/* @__PURE__ */ i(_r, {})
|
|
@@ -2833,6 +2833,7 @@ const Te = {
|
|
|
2833
2833
|
g ? /* @__PURE__ */ i(
|
|
2834
2834
|
"div",
|
|
2835
2835
|
{
|
|
2836
|
+
className: Ce["rp-loader"],
|
|
2836
2837
|
style: {
|
|
2837
2838
|
position: "absolute",
|
|
2838
2839
|
top: 0,
|
|
@@ -2840,8 +2841,7 @@ const Te = {
|
|
|
2840
2841
|
right: 0,
|
|
2841
2842
|
bottom: 0,
|
|
2842
2843
|
width: "100%",
|
|
2843
|
-
height: "100%"
|
|
2844
|
-
backgroundColor: "rgba(0, 0, 0, 0.2)"
|
|
2844
|
+
height: "100%"
|
|
2845
2845
|
},
|
|
2846
2846
|
children: /* @__PURE__ */ i(
|
|
2847
2847
|
"div",
|
|
@@ -2896,7 +2896,7 @@ export {
|
|
|
2896
2896
|
ao as p,
|
|
2897
2897
|
yt as q,
|
|
2898
2898
|
Oo as r,
|
|
2899
|
-
|
|
2899
|
+
Fo as s,
|
|
2900
2900
|
Ho as t,
|
|
2901
2901
|
se as u,
|
|
2902
2902
|
ri as v,
|