@pdf-viewer/react 0.9.0-beta.8 → 0.9.0-beta.9
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/{RPDefaultLayout-ae8b7de8.js → RPDefaultLayout-c9484abe.js} +311 -308
- package/dist/components/RPConfig.js +340 -318
- 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/RPDefaultLayout.js +1 -1
- package/dist/components/layout/sidebar/RPSidebar.js +1 -1
- package/dist/components/layout/sidebar/Thumbnail.js +1 -1
- package/dist/components/layout/sidebar/Thumbnails.js +1 -1
- package/dist/components/layout/toolbar/DocumentDialog.js +1 -1
- package/dist/components/layout/toolbar/FileDownloadTool.js +1 -1
- package/dist/components/layout/toolbar/MenuItem.js +1 -1
- package/dist/components/layout/toolbar/MenuSeparator.js +1 -1
- package/dist/components/layout/toolbar/MostPageTool.js +2 -2
- package/dist/components/layout/toolbar/OtherTool.js +2 -2
- package/dist/components/layout/toolbar/Paginate.js +1 -1
- package/dist/components/layout/toolbar/PrintTool.js +1 -1
- package/dist/components/layout/toolbar/RPToolbar.js +1 -1
- package/dist/components/layout/toolbar/RPToolbarEnd.js +1 -1
- package/dist/components/layout/toolbar/RotateTool.js +1 -1
- package/dist/components/layout/toolbar/ScrollModeTool.js +1 -1
- package/dist/components/layout/toolbar/SearchTool.js +1 -1
- package/dist/components/layout/toolbar/SelectionModeTool.js +1 -1
- package/dist/components/layout/toolbar/ViewModeTool.js +1 -1
- package/dist/components/layout/toolbar/ZoomTool.js +2 -2
- package/dist/components/page/AnnotationLayer.js +1 -1
- package/dist/components/page/CanvasLayer.js +1 -1
- package/dist/components/page/DualPage.js +1 -1
- package/dist/components/page/RPPage.js +1 -1
- package/dist/components/page/SinglePage.js +1 -1
- package/dist/components/page/TextLayer.js +1 -1
- package/dist/components/ui/Checkbox.js +92 -252
- package/dist/components/ui/DropDown.js +1 -1
- package/dist/components/ui/LoadingIndicator.js +1 -1
- package/dist/components/ui/RPTooltip.js +224 -961
- 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/index-1db49c1a.js +1664 -0
- package/dist/index-3dff3fa8.js +307 -0
- package/dist/index-4f17fe4d.js +1657 -0
- package/dist/main.js +1 -1
- package/dist/types/utils/hooks/useFileDownload.d.ts +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/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
- package/dist/floating-ui.react-dom-e6d5fe8f.js +0 -1327
- package/dist/index-316854c1.js +0 -2299
- package/dist/index-71898eb9.js +0 -139
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as s, jsxs as O, Fragment as Ae } from "react/jsx-runtime";
|
|
2
2
|
import * as V from "react";
|
|
3
|
-
import { useRef as $, useEffect as F, useCallback as
|
|
3
|
+
import { useRef as $, useEffect as F, useCallback as R, useState as W, createContext as We, useContext as He, useMemo as A, forwardRef as $e, useImperativeHandle as Zt, createElement as Me, PureComponent as kn, Component as Wn, memo as Hn } from "react";
|
|
4
4
|
import { ChevronUpIcon as Re } from "./components/icons/ChevronUpIcon.js";
|
|
5
5
|
import { UIButton as X } from "./components/ui/Button.js";
|
|
6
6
|
import { UIInput as jt } from "./components/ui/Input.js";
|
|
@@ -26,7 +26,7 @@ import { highlightMatches as Xt, findMatches as Zn, resetDivs as jn } from "./ut
|
|
|
26
26
|
import * as Jt from "pdfjs-dist";
|
|
27
27
|
import { PixelsPerInch as Bn, AnnotationMode as Kn, RenderingCancelledException as Xn, AnnotationLayer as Jn } from "pdfjs-dist";
|
|
28
28
|
import { usePageDimension as ht } from "./utils/hooks/usePageDimension.js";
|
|
29
|
-
import { useLayoutContainer as
|
|
29
|
+
import { useLayoutContainer as Le } from "./contexts/LayoutContainerContext.js";
|
|
30
30
|
import "./components/RPConfig.js";
|
|
31
31
|
import { ThumbnailIcon as Yn } from "./components/icons/Thumbnail.js";
|
|
32
32
|
import { c as Q } from "./clsx-0c6e471a.js";
|
|
@@ -54,14 +54,14 @@ import { FileUploadTool as Yt } from "./components/layout/toolbar/FileUploadTool
|
|
|
54
54
|
import { DarkModeTool as mr } from "./components/layout/toolbar/DarkModeTool.js";
|
|
55
55
|
import { ThreeDotIcon as fr } from "./components/icons/ThreeDotIcon.js";
|
|
56
56
|
import { UIDropDown as ft } from "./components/ui/DropDown.js";
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
57
|
+
import { c as gr, a as gt, P as Ne, b as xe, d as vt, i as vr, k as _r, u as wr } from "./index-3dff3fa8.js";
|
|
58
|
+
import { D as br, u as Ke } from "./index-4f17fe4d.js";
|
|
59
|
+
import { a as Cr, h as Pr, u as Tr, F as Sr, b as yr, G as Fe } from "./index-1db49c1a.js";
|
|
60
60
|
import { CloseIcon as Qt } from "./components/icons/CloseIcon.js";
|
|
61
61
|
import { PropertyItem as Ir } from "./components/layout/toolbar/PropertyItem.js";
|
|
62
62
|
import { useOtherToolContext as xr, OtherToolProvider as Rr } from "./contexts/OtherToolContext.js";
|
|
63
|
-
import { DocumentProperties as
|
|
64
|
-
import { RotateTool as
|
|
63
|
+
import { DocumentProperties as Lr } from "./components/layout/toolbar/DocumentProperties.js";
|
|
64
|
+
import { RotateTool as Nr } from "./components/layout/toolbar/RotateTool.js";
|
|
65
65
|
import { ScrollModeTool as Mr } from "./components/layout/toolbar/ScrollModeTool.js";
|
|
66
66
|
import { MenuSeparator as _t } from "./components/layout/toolbar/MenuSeparator.js";
|
|
67
67
|
import { FileDownloadDefaultIcon as Er } from "./components/icons/FileDownloadDefaultIcon.js";
|
|
@@ -82,7 +82,7 @@ import './assets/RPDefaultLayout.css';const nn = () => {
|
|
|
82
82
|
F(() => {
|
|
83
83
|
n != null && n.scrollToItem && (a.current = n);
|
|
84
84
|
}, [n]);
|
|
85
|
-
const h =
|
|
85
|
+
const h = R(
|
|
86
86
|
(u) => {
|
|
87
87
|
if (!r)
|
|
88
88
|
return;
|
|
@@ -93,7 +93,7 @@ import './assets/RPDefaultLayout.css';const nn = () => {
|
|
|
93
93
|
);
|
|
94
94
|
return F(() => {
|
|
95
95
|
l.current = t, p.current = e;
|
|
96
|
-
}, [t, e]), { scrollToPage:
|
|
96
|
+
}, [t, e]), { scrollToPage: R(
|
|
97
97
|
(u, m = "start") => {
|
|
98
98
|
const g = u - 1;
|
|
99
99
|
let _ = g, v = 0;
|
|
@@ -110,7 +110,7 @@ import './assets/RPDefaultLayout.css';const nn = () => {
|
|
|
110
110
|
[c, h, o]
|
|
111
111
|
) };
|
|
112
112
|
}, Hr = (e = 1) => {
|
|
113
|
-
const [t, n] = W(e), [r, o] = W(0), { scrollToPage: a } = nn(), c = $(1), { isScrolling: i } = Kt(), { viewMode: l } = Ue(), { scrollMode: p } = Pe(), h = pr(t, 100), f =
|
|
113
|
+
const [t, n] = W(e), [r, o] = W(0), { scrollToPage: a } = nn(), c = $(1), { isScrolling: i } = Kt(), { viewMode: l } = Ue(), { scrollMode: p } = Pe(), h = pr(t, 100), f = R(
|
|
114
114
|
(v) => {
|
|
115
115
|
if (!/^[0-9]*$/g.test(v.toString()) || !v)
|
|
116
116
|
return { success: !1, currentPage: c.current };
|
|
@@ -118,16 +118,16 @@ import './assets/RPDefaultLayout.css';const nn = () => {
|
|
|
118
118
|
return y < 0 || y > r ? { success: !1, currentPage: c.current } : (n(y), c.current = y, { success: !0, currentPage: +v });
|
|
119
119
|
},
|
|
120
120
|
[r]
|
|
121
|
-
), u =
|
|
121
|
+
), u = R(f, [f]), m = R(
|
|
122
122
|
(v) => {
|
|
123
123
|
const C = f(v);
|
|
124
124
|
return C.success && (i.current = !0, a(C.currentPage)), C;
|
|
125
125
|
},
|
|
126
126
|
[f, a]
|
|
127
|
-
), g =
|
|
127
|
+
), g = R(() => {
|
|
128
128
|
let v = t - 1;
|
|
129
129
|
m(v);
|
|
130
|
-
}, [m, t, l, p]), _ =
|
|
130
|
+
}, [m, t, l, p]), _ = R(() => {
|
|
131
131
|
let v = t + 1;
|
|
132
132
|
m(v);
|
|
133
133
|
}, [m, t, l, p]);
|
|
@@ -155,7 +155,7 @@ import './assets/RPDefaultLayout.css';const nn = () => {
|
|
|
155
155
|
}), oe = () => {
|
|
156
156
|
const e = He(rn);
|
|
157
157
|
return typeof (e == null ? void 0 : e.focusedPage) > "u" && hr.error("Please use this hooks inside children component of RPController or RPLayout"), e;
|
|
158
|
-
},
|
|
158
|
+
}, $s = ({ children: e }) => {
|
|
159
159
|
const { initialPage: t = 1 } = Un(), { pdf: n } = ne(), { focusedPage: r, totalPages: o, setFocusedPage: a, setTotalPages: c, goToPage: i, nextPage: l, prevPage: p } = Hr(t);
|
|
160
160
|
return F(() => {
|
|
161
161
|
n != null && n.numPages && c(n.numPages);
|
|
@@ -188,11 +188,11 @@ const $r = () => {
|
|
|
188
188
|
F(() => {
|
|
189
189
|
h.current;
|
|
190
190
|
}, [h]);
|
|
191
|
-
const f =
|
|
191
|
+
const f = R(() => {
|
|
192
192
|
document.documentElement.classList.remove("rp-print-html-printing"), document.body.classList.remove("rp-print-body-printing");
|
|
193
193
|
const P = document.querySelector(".rp-print-zone");
|
|
194
194
|
P && P.remove();
|
|
195
|
-
}, []), u =
|
|
195
|
+
}, []), u = R(() => {
|
|
196
196
|
h.current = !1, a(!1), i(!1), p(null), r({
|
|
197
197
|
loadedPages: 0,
|
|
198
198
|
totalPages: 0,
|
|
@@ -202,11 +202,11 @@ const $r = () => {
|
|
|
202
202
|
h.current = !0;
|
|
203
203
|
}, g = async ({
|
|
204
204
|
scratchCanvas: P,
|
|
205
|
-
pdfDocument:
|
|
205
|
+
pdfDocument: L,
|
|
206
206
|
pageNumber: d,
|
|
207
207
|
viewerPdfPage: b,
|
|
208
208
|
printResolution: w,
|
|
209
|
-
optionalContentConfigPromise:
|
|
209
|
+
optionalContentConfigPromise: T,
|
|
210
210
|
printAnnotationStoragePromise: D
|
|
211
211
|
}) => {
|
|
212
212
|
if (h.current) {
|
|
@@ -215,82 +215,82 @@ const $r = () => {
|
|
|
215
215
|
}
|
|
216
216
|
const I = w / Bn.PDF;
|
|
217
217
|
P.width = Math.floor(b.width * I), P.height = Math.floor(b.height * I);
|
|
218
|
-
const
|
|
219
|
-
|
|
218
|
+
const S = P.getContext("2d");
|
|
219
|
+
S.save(), S.fillStyle = "rgb(255, 255, 255)", S.fillRect(0, 0, P.width, P.height), S.restore();
|
|
220
220
|
const [E, x] = await Promise.all([
|
|
221
|
-
|
|
221
|
+
L.getPage(d),
|
|
222
222
|
D
|
|
223
223
|
]);
|
|
224
224
|
if (h.current) {
|
|
225
225
|
u();
|
|
226
226
|
return;
|
|
227
227
|
}
|
|
228
|
-
const
|
|
229
|
-
canvasContext:
|
|
228
|
+
const N = {
|
|
229
|
+
canvasContext: S,
|
|
230
230
|
transform: [I, 0, 0, I, 0, 0],
|
|
231
231
|
viewport: E.getViewport({ scale: 1, rotation: b.rotation }),
|
|
232
232
|
intent: "print",
|
|
233
233
|
annotationMode: Kn.ENABLE_STORAGE,
|
|
234
|
-
optionalContentConfigPromise:
|
|
234
|
+
optionalContentConfigPromise: T,
|
|
235
235
|
printAnnotationStorage: x
|
|
236
236
|
};
|
|
237
237
|
try {
|
|
238
|
-
return E.render(
|
|
238
|
+
return E.render(N).promise;
|
|
239
239
|
} catch (M) {
|
|
240
240
|
throw M instanceof Xn || console.error(M), M;
|
|
241
241
|
}
|
|
242
|
-
}, _ =
|
|
242
|
+
}, _ = R(() => {
|
|
243
243
|
const P = window.print;
|
|
244
|
-
return new Promise((
|
|
245
|
-
const d = (
|
|
244
|
+
return new Promise((L) => {
|
|
245
|
+
const d = (T) => {
|
|
246
246
|
setTimeout(() => {
|
|
247
|
-
P.call(window), setTimeout(() =>
|
|
247
|
+
P.call(window), setTimeout(() => T(), 20);
|
|
248
248
|
}, 0);
|
|
249
249
|
};
|
|
250
250
|
if (document.querySelector(".rp-print-zone")) {
|
|
251
|
-
d(
|
|
251
|
+
d(L);
|
|
252
252
|
return;
|
|
253
253
|
}
|
|
254
254
|
const w = new MutationObserver(() => {
|
|
255
|
-
document.querySelector(".rp-print-zone") && (d(
|
|
255
|
+
document.querySelector(".rp-print-zone") && (d(L), w.disconnect());
|
|
256
256
|
});
|
|
257
257
|
w.observe(document.body, { childList: !0, subtree: !0 });
|
|
258
258
|
});
|
|
259
259
|
}, []), v = async (P) => {
|
|
260
|
-
const
|
|
260
|
+
const L = document.createElement("img"), d = document.createElement("div");
|
|
261
261
|
return d.classList.add("rp-print-page"), await new Promise((b, w) => {
|
|
262
|
-
P.toBlob((
|
|
263
|
-
|
|
264
|
-
URL.revokeObjectURL(
|
|
265
|
-
},
|
|
262
|
+
P.toBlob((T) => {
|
|
263
|
+
T ? (L.src = URL.createObjectURL(T), L.onload = () => {
|
|
264
|
+
URL.revokeObjectURL(L.src), b();
|
|
265
|
+
}, L.onerror = w) : w(new Error("Failed to create blob"));
|
|
266
266
|
});
|
|
267
267
|
}).catch(() => {
|
|
268
|
-
}), d.appendChild(
|
|
269
|
-
}, C = (P,
|
|
268
|
+
}), d.appendChild(L), d;
|
|
269
|
+
}, C = (P, L) => {
|
|
270
270
|
const d = document.createElement("div");
|
|
271
271
|
d.classList.add("rp-print-zone");
|
|
272
|
-
const b = document.createElement("style"), w =
|
|
272
|
+
const b = document.createElement("style"), w = L.get(1);
|
|
273
273
|
if (w) {
|
|
274
|
-
const { width:
|
|
275
|
-
b.innerHTML = `@page { size: ${
|
|
274
|
+
const { width: T, height: D } = w == null ? void 0 : w.page.getViewport({ scale: 1 });
|
|
275
|
+
b.innerHTML = `@page { size: ${T}px ${D}px }`;
|
|
276
276
|
}
|
|
277
277
|
return d.appendChild(b), d.append(...P), d;
|
|
278
|
-
}, y =
|
|
278
|
+
}, y = R(async () => {
|
|
279
279
|
if (!e)
|
|
280
280
|
return;
|
|
281
281
|
u();
|
|
282
|
-
const P = document.createElement("canvas"),
|
|
282
|
+
const P = document.createElement("canvas"), L = [];
|
|
283
283
|
try {
|
|
284
284
|
e.isPureXfa && console.warn("[rp] XFA Form is not supported at the moment.");
|
|
285
285
|
const b = e.getOptionalContentConfig({ intent: "print" }), w = Promise.resolve(
|
|
286
286
|
e.annotationStorage.print ?? void 0
|
|
287
|
-
),
|
|
288
|
-
for (const [I,
|
|
287
|
+
), T = t.size;
|
|
288
|
+
for (const [I, S] of t) {
|
|
289
289
|
if (h.current) {
|
|
290
290
|
u();
|
|
291
291
|
return;
|
|
292
292
|
}
|
|
293
|
-
const E =
|
|
293
|
+
const E = S.page.getViewport({ scale: 1 });
|
|
294
294
|
if (await g({
|
|
295
295
|
scratchCanvas: P,
|
|
296
296
|
pdfDocument: e,
|
|
@@ -304,19 +304,19 @@ const $r = () => {
|
|
|
304
304
|
return;
|
|
305
305
|
}
|
|
306
306
|
const x = await v(P);
|
|
307
|
-
|
|
308
|
-
const
|
|
307
|
+
L.push(x);
|
|
308
|
+
const N = parseFloat((L.length / T * 100).toFixed(2));
|
|
309
309
|
r({
|
|
310
310
|
loadedPages: I,
|
|
311
|
-
totalPages:
|
|
312
|
-
percentage:
|
|
311
|
+
totalPages: T,
|
|
312
|
+
percentage: N
|
|
313
313
|
});
|
|
314
314
|
}
|
|
315
315
|
if (h.current) {
|
|
316
316
|
u();
|
|
317
317
|
return;
|
|
318
318
|
}
|
|
319
|
-
const D = C(
|
|
319
|
+
const D = C(L, t);
|
|
320
320
|
document.body.appendChild(D), document.documentElement.classList.add("rp-print-html-printing"), document.body.classList.add("rp-print-body-printing"), a(!0), await _();
|
|
321
321
|
} catch (d) {
|
|
322
322
|
i(!0), d instanceof Error && p(d);
|
|
@@ -356,12 +356,12 @@ const $r = () => {
|
|
|
356
356
|
console.error("Error in setOnError callback:", t);
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
|
-
}),
|
|
360
|
-
const [t, n] = W(null), [r, o] = W(null), { print: a, cancel: c, progress: i, isComplete: l, isError: p, error: h } = $r(), f =
|
|
359
|
+
}), Gs = ({ children: e }) => {
|
|
360
|
+
const [t, n] = W(null), [r, o] = W(null), { print: a, cancel: c, progress: i, isComplete: l, isError: p, error: h } = $r(), f = R((v) => {
|
|
361
361
|
v && typeof v == "function" && o(() => v);
|
|
362
362
|
}, []), u = (v) => {
|
|
363
363
|
h && v(h);
|
|
364
|
-
}, m =
|
|
364
|
+
}, m = R(
|
|
365
365
|
(v) => {
|
|
366
366
|
n(() => v);
|
|
367
367
|
},
|
|
@@ -393,7 +393,7 @@ const $r = () => {
|
|
|
393
393
|
throw new Error("usePrintContext must be used within a PrintProvider");
|
|
394
394
|
return e;
|
|
395
395
|
}, Gr = () => {
|
|
396
|
-
const [e, t] = W({}), { pages: n } = ne(), { rotate: r } = Ge(), o = A(() => Object.keys(e).length, [e]), a =
|
|
396
|
+
const [e, t] = W({}), { pages: n } = ne(), { rotate: r } = Ge(), o = A(() => Object.keys(e).length, [e]), a = R(
|
|
397
397
|
(i) => {
|
|
398
398
|
if (!n.size)
|
|
399
399
|
return;
|
|
@@ -437,7 +437,7 @@ const $r = () => {
|
|
|
437
437
|
F(() => {
|
|
438
438
|
a(10);
|
|
439
439
|
}, [a]);
|
|
440
|
-
const c =
|
|
440
|
+
const c = R(
|
|
441
441
|
(i) => {
|
|
442
442
|
if (!n)
|
|
443
443
|
return;
|
|
@@ -480,7 +480,7 @@ const $r = () => {
|
|
|
480
480
|
setActive: (e) => {
|
|
481
481
|
},
|
|
482
482
|
active: !1
|
|
483
|
-
}), sn = () => He(an),
|
|
483
|
+
}), sn = () => He(an), Vs = ({
|
|
484
484
|
children: e,
|
|
485
485
|
initialThumbnailsVisible: t
|
|
486
486
|
}) => {
|
|
@@ -493,14 +493,14 @@ const $r = () => {
|
|
|
493
493
|
}
|
|
494
494
|
);
|
|
495
495
|
}, Vr = (e = {}, t = "") => {
|
|
496
|
-
const [n, r] = W(t), [o, a] = W(!1), { pdf: c, pages: i } = ne(), l = ht(), p = $(!n), { currentZoom: h } = Ve(), [f, u] = W([]), { setFocusedPage: m } = oe(), [g, _] = W(0), { pageScrollElementRef: v, virtualScrollableElementRef: C } = qe(), { scrollMode: y } = Pe(), [P,
|
|
496
|
+
const [n, r] = W(t), [o, a] = W(!1), { pdf: c, pages: i } = ne(), l = ht(), p = $(!n), { currentZoom: h } = Ve(), [f, u] = W([]), { setFocusedPage: m } = oe(), [g, _] = W(0), { pageScrollElementRef: v, virtualScrollableElementRef: C } = qe(), { scrollMode: y } = Pe(), [P, L] = W(null), d = $({}), b = A(() => g === 0 ? null : f[g - 1], [g, f]), w = A(() => f.length, [f]);
|
|
497
497
|
F(() => {
|
|
498
498
|
if (!b || !i)
|
|
499
499
|
return;
|
|
500
|
-
const
|
|
501
|
-
if (!
|
|
500
|
+
const S = C || v;
|
|
501
|
+
if (!S)
|
|
502
502
|
return;
|
|
503
|
-
const E = i.get(b.page), x =
|
|
503
|
+
const E = i.get(b.page), x = S.clientHeight / 2, N = S.clientWidth / 2;
|
|
504
504
|
let M = 0, k = 0;
|
|
505
505
|
y === J.PAGE_SCROLLING && m(b.page), y === J.VERTICAL_SCROLLING && (M = l.heights.slice(0, b.page - 1).reduce((U, B) => U + B, 0)), y === J.HORIZONTAL_SCROLLING && (k = l.widths.slice(0, b.page - 1).reduce((U, B) => U + B, 0));
|
|
506
506
|
let G;
|
|
@@ -515,10 +515,10 @@ const $r = () => {
|
|
|
515
515
|
const U = G.textDivs[b.start.idx], [B] = Xt([b], q, G.textDivs), re = l.widths[b.page - 1], pe = l.heights[b.page - 1], K = document.createElement("div"), Y = document.createElement("div");
|
|
516
516
|
U.style.position = "absolute", U.style.color = "transparent", Y.style.position = "absolute", Y.style.top = "0", Y.style.setProperty("--scale-factor", `${h}`), K.style.position = "relative", K.style.width = `${re}px`, K.style.height = `${pe}px`, K.style.zIndex = "-1", K.appendChild(U), Y.appendChild(K), document.body.prepend(Y);
|
|
517
517
|
const z = B.element.getBoundingClientRect(), H = M + +z.top - x + z.height / 2, se = {
|
|
518
|
-
left: k + +z.left -
|
|
518
|
+
left: k + +z.left - N + z.width / 2,
|
|
519
519
|
top: H
|
|
520
520
|
};
|
|
521
|
-
document.body.removeChild(Y),
|
|
521
|
+
document.body.removeChild(Y), S.scrollTo({
|
|
522
522
|
...se
|
|
523
523
|
});
|
|
524
524
|
});
|
|
@@ -531,19 +531,19 @@ const $r = () => {
|
|
|
531
531
|
C,
|
|
532
532
|
v
|
|
533
533
|
]);
|
|
534
|
-
const
|
|
535
|
-
_((
|
|
536
|
-
}, [w]), D =
|
|
537
|
-
_((
|
|
538
|
-
}, [w]), I =
|
|
539
|
-
if (!
|
|
534
|
+
const T = R(() => {
|
|
535
|
+
_((S) => w ? S + 1 > w ? 1 : S + 1 : 0);
|
|
536
|
+
}, [w]), D = R(() => {
|
|
537
|
+
_((S) => w ? S - 1 <= 0 ? w : S - 1 : 0);
|
|
538
|
+
}, [w]), I = R(async (S) => {
|
|
539
|
+
if (!S)
|
|
540
540
|
return {};
|
|
541
|
-
const E =
|
|
542
|
-
for (let
|
|
541
|
+
const E = S.numPages, x = {};
|
|
542
|
+
for (let N = 1; N <= E; N++) {
|
|
543
543
|
if (p.current)
|
|
544
544
|
throw "close pop over";
|
|
545
|
-
const M = await
|
|
546
|
-
x[
|
|
545
|
+
const M = await S.getPage(N);
|
|
546
|
+
x[N.toString()] = await M.getTextContent();
|
|
547
547
|
}
|
|
548
548
|
return x;
|
|
549
549
|
}, []);
|
|
@@ -552,16 +552,16 @@ const $r = () => {
|
|
|
552
552
|
p.current = !0, u([]), _(0);
|
|
553
553
|
return;
|
|
554
554
|
}
|
|
555
|
-
p.current = !1, a(!0), u([]), _(0), I(c).then((
|
|
556
|
-
d.current =
|
|
557
|
-
const x = Object.keys(
|
|
555
|
+
p.current = !1, a(!0), u([]), _(0), I(c).then((S) => {
|
|
556
|
+
d.current = S;
|
|
557
|
+
const x = Object.keys(S).reduce((N, M) => {
|
|
558
558
|
const k = Zn(
|
|
559
559
|
[n],
|
|
560
|
-
|
|
560
|
+
S[M],
|
|
561
561
|
Number(M) - 1,
|
|
562
562
|
e
|
|
563
563
|
).map((G, q) => ({ ...G, page: Number(M), pageMatchIdx: q }));
|
|
564
|
-
return [...
|
|
564
|
+
return [...N, ...k];
|
|
565
565
|
}, []);
|
|
566
566
|
u(x), _(x.length ? 1 : 0);
|
|
567
567
|
}).catch(() => {
|
|
@@ -575,10 +575,10 @@ const $r = () => {
|
|
|
575
575
|
totalMatches: w,
|
|
576
576
|
currentMatchPosition: g,
|
|
577
577
|
currentMatch: b,
|
|
578
|
-
nextMatch:
|
|
578
|
+
nextMatch: T,
|
|
579
579
|
prevMatch: D,
|
|
580
580
|
currentMatchElement: P,
|
|
581
|
-
setCurrentMatchElement:
|
|
581
|
+
setCurrentMatchElement: L
|
|
582
582
|
};
|
|
583
583
|
}, cn = We({
|
|
584
584
|
search: "",
|
|
@@ -598,7 +598,7 @@ const $r = () => {
|
|
|
598
598
|
currentMatchElement: null,
|
|
599
599
|
setCurrentMatchElement: (e) => {
|
|
600
600
|
}
|
|
601
|
-
}),
|
|
601
|
+
}), Us = ({
|
|
602
602
|
children: e,
|
|
603
603
|
initialSearch: t
|
|
604
604
|
}) => {
|
|
@@ -672,7 +672,7 @@ const $r = () => {
|
|
|
672
672
|
}, qr = (e) => {
|
|
673
673
|
const { pageNumber: t } = e, { pages: n } = ne(), r = $(null), { matches: o, currentMatch: a, setCurrentMatchElement: c } = ln(), [i, l] = W(
|
|
674
674
|
[]
|
|
675
|
-
), p = $(), h = $(), f = $(), u = A(() => o.filter((g) => g.pageIndex === t - 1), [o, t]), m =
|
|
675
|
+
), p = $(), h = $(), f = $(), u = A(() => o.filter((g) => g.pageIndex === t - 1), [o, t]), m = R(
|
|
676
676
|
(g, _, v = !1) => {
|
|
677
677
|
if (v && jn(g, _), !u.length) {
|
|
678
678
|
f.current = void 0, l([]);
|
|
@@ -825,7 +825,7 @@ const Jr = (e) => {
|
|
|
825
825
|
attributes: !0
|
|
826
826
|
// Watch for changes to attributes
|
|
827
827
|
}), () => r.disconnect();
|
|
828
|
-
},
|
|
828
|
+
}, Lt = (e, t, n, r) => {
|
|
829
829
|
if (e.type !== "click")
|
|
830
830
|
return;
|
|
831
831
|
const o = e.target, a = o.getAttribute("data-element-id"), c = o.getAttribute("href");
|
|
@@ -840,7 +840,7 @@ function Yr(e, t) {
|
|
|
840
840
|
for (const n of un)
|
|
841
841
|
e.addEventListener(n, t);
|
|
842
842
|
}
|
|
843
|
-
function
|
|
843
|
+
function Nt(e, t) {
|
|
844
844
|
for (const n of un)
|
|
845
845
|
e.removeEventListener(n, t);
|
|
846
846
|
}
|
|
@@ -855,9 +855,9 @@ const Qr = (e) => {
|
|
|
855
855
|
a.current = void 0, i(_), n.current && (n.current.innerText = "");
|
|
856
856
|
});
|
|
857
857
|
}, [f]);
|
|
858
|
-
const g =
|
|
858
|
+
const g = R(
|
|
859
859
|
(_) => {
|
|
860
|
-
Jr(_), !(!c || !o) && (h === J.PAGE_SCROLLING ?
|
|
860
|
+
Jr(_), !(!c || !o) && (h === J.PAGE_SCROLLING ? Lt(_, c, o, (v) => l(v.pageIndex + 1)) : Lt(_, c, o, (v) => p(v.pageIndex + 1)));
|
|
861
861
|
},
|
|
862
862
|
[o, c, p, l, h]
|
|
863
863
|
);
|
|
@@ -890,7 +890,7 @@ const Qr = (e) => {
|
|
|
890
890
|
structTreeLayer: void 0,
|
|
891
891
|
page: f.page,
|
|
892
892
|
viewport: _.clone({ dontFlip: !0 })
|
|
893
|
-
}), n.current &&
|
|
893
|
+
}), n.current && Nt(n.current, g);
|
|
894
894
|
const C = await (o == null ? void 0 : o.hasJSActions()), y = await (o == null ? void 0 : o.getFieldObjects());
|
|
895
895
|
return a.current.render({
|
|
896
896
|
annotations: c,
|
|
@@ -909,7 +909,7 @@ const Qr = (e) => {
|
|
|
909
909
|
})().then(() => {
|
|
910
910
|
n.current && Yr(n.current, g);
|
|
911
911
|
}), () => {
|
|
912
|
-
n.current &&
|
|
912
|
+
n.current && Nt(n.current, g);
|
|
913
913
|
};
|
|
914
914
|
}, [o, c, g]), /* @__PURE__ */ s(
|
|
915
915
|
"div",
|
|
@@ -941,15 +941,15 @@ const Qr = (e) => {
|
|
|
941
941
|
default:
|
|
942
942
|
return "center";
|
|
943
943
|
}
|
|
944
|
-
}, [i, g]), C =
|
|
944
|
+
}, [i, g]), C = R(() => {
|
|
945
945
|
u(!0);
|
|
946
|
-
}, []), y =
|
|
946
|
+
}, []), y = R(() => {
|
|
947
947
|
u(!1);
|
|
948
948
|
}, []);
|
|
949
949
|
return F(() => {
|
|
950
950
|
const P = new IntersectionObserver(
|
|
951
|
-
(
|
|
952
|
-
o && o(n,
|
|
951
|
+
(L) => {
|
|
952
|
+
o && o(n, L[0].intersectionRatio);
|
|
953
953
|
},
|
|
954
954
|
{ threshold: eo }
|
|
955
955
|
);
|
|
@@ -1042,7 +1042,7 @@ function Ot(e, t) {
|
|
|
1042
1042
|
var n = {};
|
|
1043
1043
|
for (var r in e)
|
|
1044
1044
|
if ({}.hasOwnProperty.call(e, r)) {
|
|
1045
|
-
if (t.
|
|
1045
|
+
if (t.indexOf(r) !== -1)
|
|
1046
1046
|
continue;
|
|
1047
1047
|
n[r] = e[r];
|
|
1048
1048
|
}
|
|
@@ -1095,9 +1095,9 @@ function lo(e) {
|
|
|
1095
1095
|
var t, n = e.getColumnOffset, r = e.getColumnStartIndexForOffset, o = e.getColumnStopIndexForStartIndex, a = e.getColumnWidth, c = e.getEstimatedTotalHeight, i = e.getEstimatedTotalWidth, l = e.getOffsetForColumnAndAlignment, p = e.getOffsetForRowAndAlignment, h = e.getRowHeight, f = e.getRowOffset, u = e.getRowStartIndexForOffset, m = e.getRowStopIndexForStartIndex, g = e.initInstanceProps, _ = e.shouldResetStyleCacheOnItemSizeChange, v = e.validateProps;
|
|
1096
1096
|
return t = /* @__PURE__ */ function(C) {
|
|
1097
1097
|
to(y, C);
|
|
1098
|
-
function y(
|
|
1098
|
+
function y(L) {
|
|
1099
1099
|
var d;
|
|
1100
|
-
return d = C.call(this,
|
|
1100
|
+
return d = C.call(this, L) || this, d._instanceProps = g(d.props, Mt(d)), d._resetIsScrollingTimeoutId = null, d._outerRef = void 0, d.state = {
|
|
1101
1101
|
instance: Mt(d),
|
|
1102
1102
|
isScrolling: !1,
|
|
1103
1103
|
horizontalScrollDirection: "forward",
|
|
@@ -1105,32 +1105,32 @@ function lo(e) {
|
|
|
1105
1105
|
scrollTop: typeof d.props.initialScrollTop == "number" ? d.props.initialScrollTop : 0,
|
|
1106
1106
|
scrollUpdateWasRequested: !1,
|
|
1107
1107
|
verticalScrollDirection: "forward"
|
|
1108
|
-
}, d._callOnItemsRendered = void 0, d._callOnItemsRendered = Ye(function(b, w,
|
|
1108
|
+
}, d._callOnItemsRendered = void 0, d._callOnItemsRendered = Ye(function(b, w, T, D, I, S, E, x) {
|
|
1109
1109
|
return d.props.onItemsRendered({
|
|
1110
1110
|
overscanColumnStartIndex: b,
|
|
1111
1111
|
overscanColumnStopIndex: w,
|
|
1112
|
-
overscanRowStartIndex:
|
|
1112
|
+
overscanRowStartIndex: T,
|
|
1113
1113
|
overscanRowStopIndex: D,
|
|
1114
1114
|
visibleColumnStartIndex: I,
|
|
1115
|
-
visibleColumnStopIndex:
|
|
1115
|
+
visibleColumnStopIndex: S,
|
|
1116
1116
|
visibleRowStartIndex: E,
|
|
1117
1117
|
visibleRowStopIndex: x
|
|
1118
1118
|
});
|
|
1119
|
-
}), d._callOnScroll = void 0, d._callOnScroll = Ye(function(b, w,
|
|
1119
|
+
}), d._callOnScroll = void 0, d._callOnScroll = Ye(function(b, w, T, D, I) {
|
|
1120
1120
|
return d.props.onScroll({
|
|
1121
|
-
horizontalScrollDirection:
|
|
1121
|
+
horizontalScrollDirection: T,
|
|
1122
1122
|
scrollLeft: b,
|
|
1123
1123
|
scrollTop: w,
|
|
1124
1124
|
verticalScrollDirection: D,
|
|
1125
1125
|
scrollUpdateWasRequested: I
|
|
1126
1126
|
});
|
|
1127
1127
|
}), d._getItemStyle = void 0, d._getItemStyle = function(b, w) {
|
|
1128
|
-
var
|
|
1128
|
+
var T = d.props, D = T.columnWidth, I = T.direction, S = T.rowHeight, E = d._getItemStyleCache(_ && D, _ && I, _ && S), x = b + ":" + w, N;
|
|
1129
1129
|
if (E.hasOwnProperty(x))
|
|
1130
|
-
|
|
1130
|
+
N = E[x];
|
|
1131
1131
|
else {
|
|
1132
1132
|
var M = n(d.props, w, d._instanceProps), k = I === "rtl";
|
|
1133
|
-
E[x] =
|
|
1133
|
+
E[x] = N = {
|
|
1134
1134
|
position: "absolute",
|
|
1135
1135
|
left: k ? void 0 : M,
|
|
1136
1136
|
right: k ? M : void 0,
|
|
@@ -1139,13 +1139,13 @@ function lo(e) {
|
|
|
1139
1139
|
width: a(d.props, w, d._instanceProps)
|
|
1140
1140
|
};
|
|
1141
1141
|
}
|
|
1142
|
-
return
|
|
1143
|
-
}, d._getItemStyleCache = void 0, d._getItemStyleCache = Ye(function(b, w,
|
|
1142
|
+
return N;
|
|
1143
|
+
}, d._getItemStyleCache = void 0, d._getItemStyleCache = Ye(function(b, w, T) {
|
|
1144
1144
|
return {};
|
|
1145
1145
|
}), d._onScroll = function(b) {
|
|
1146
|
-
var w = b.currentTarget,
|
|
1147
|
-
d.setState(function(
|
|
1148
|
-
if (
|
|
1146
|
+
var w = b.currentTarget, T = w.clientHeight, D = w.clientWidth, I = w.scrollLeft, S = w.scrollTop, E = w.scrollHeight, x = w.scrollWidth;
|
|
1147
|
+
d.setState(function(N) {
|
|
1148
|
+
if (N.scrollLeft === I && N.scrollTop === S)
|
|
1149
1149
|
return null;
|
|
1150
1150
|
var M = d.props.direction, k = I;
|
|
1151
1151
|
if (M === "rtl")
|
|
@@ -1158,13 +1158,13 @@ function lo(e) {
|
|
|
1158
1158
|
break;
|
|
1159
1159
|
}
|
|
1160
1160
|
k = Math.max(0, Math.min(k, x - D));
|
|
1161
|
-
var G = Math.max(0, Math.min(
|
|
1161
|
+
var G = Math.max(0, Math.min(S, E - T));
|
|
1162
1162
|
return {
|
|
1163
1163
|
isScrolling: !0,
|
|
1164
|
-
horizontalScrollDirection:
|
|
1164
|
+
horizontalScrollDirection: N.scrollLeft < I ? "forward" : "backward",
|
|
1165
1165
|
scrollLeft: k,
|
|
1166
1166
|
scrollTop: G,
|
|
1167
|
-
verticalScrollDirection:
|
|
1167
|
+
verticalScrollDirection: N.scrollTop < S ? "forward" : "backward",
|
|
1168
1168
|
scrollUpdateWasRequested: !1
|
|
1169
1169
|
};
|
|
1170
1170
|
}, d._resetIsScrollingDebounced);
|
|
@@ -1187,32 +1187,32 @@ function lo(e) {
|
|
|
1187
1187
|
var P = y.prototype;
|
|
1188
1188
|
return P.scrollTo = function(d) {
|
|
1189
1189
|
var b = d.scrollLeft, w = d.scrollTop;
|
|
1190
|
-
b !== void 0 && (b = Math.max(0, b)), w !== void 0 && (w = Math.max(0, w)), this.setState(function(
|
|
1191
|
-
return b === void 0 && (b =
|
|
1192
|
-
horizontalScrollDirection:
|
|
1190
|
+
b !== void 0 && (b = Math.max(0, b)), w !== void 0 && (w = Math.max(0, w)), this.setState(function(T) {
|
|
1191
|
+
return b === void 0 && (b = T.scrollLeft), w === void 0 && (w = T.scrollTop), T.scrollLeft === b && T.scrollTop === w ? null : {
|
|
1192
|
+
horizontalScrollDirection: T.scrollLeft < b ? "forward" : "backward",
|
|
1193
1193
|
scrollLeft: b,
|
|
1194
1194
|
scrollTop: w,
|
|
1195
1195
|
scrollUpdateWasRequested: !0,
|
|
1196
|
-
verticalScrollDirection:
|
|
1196
|
+
verticalScrollDirection: T.scrollTop < w ? "forward" : "backward"
|
|
1197
1197
|
};
|
|
1198
1198
|
}, this._resetIsScrollingDebounced);
|
|
1199
1199
|
}, P.scrollToItem = function(d) {
|
|
1200
|
-
var b = d.align, w = b === void 0 ? "auto" : b,
|
|
1201
|
-
|
|
1202
|
-
var Z = c(this.props, this._instanceProps), U = i(this.props, this._instanceProps), B = U >
|
|
1200
|
+
var b = d.align, w = b === void 0 ? "auto" : b, T = d.columnIndex, D = d.rowIndex, I = this.props, S = I.columnCount, E = I.height, x = I.rowCount, N = I.width, M = this.state, k = M.scrollLeft, G = M.scrollTop, q = so();
|
|
1201
|
+
T !== void 0 && (T = Math.max(0, Math.min(T, S - 1))), D !== void 0 && (D = Math.max(0, Math.min(D, x - 1)));
|
|
1202
|
+
var Z = c(this.props, this._instanceProps), U = i(this.props, this._instanceProps), B = U > N ? q : 0, re = Z > E ? q : 0;
|
|
1203
1203
|
this.scrollTo({
|
|
1204
|
-
scrollLeft:
|
|
1204
|
+
scrollLeft: T !== void 0 ? l(this.props, T, w, k, this._instanceProps, re) : k,
|
|
1205
1205
|
scrollTop: D !== void 0 ? p(this.props, D, w, G, this._instanceProps, B) : G
|
|
1206
1206
|
});
|
|
1207
1207
|
}, P.componentDidMount = function() {
|
|
1208
1208
|
var d = this.props, b = d.initialScrollLeft, w = d.initialScrollTop;
|
|
1209
1209
|
if (this._outerRef != null) {
|
|
1210
|
-
var
|
|
1211
|
-
typeof b == "number" && (
|
|
1210
|
+
var T = this._outerRef;
|
|
1211
|
+
typeof b == "number" && (T.scrollLeft = b), typeof w == "number" && (T.scrollTop = w);
|
|
1212
1212
|
}
|
|
1213
1213
|
this._callPropsCallbacks();
|
|
1214
1214
|
}, P.componentDidUpdate = function() {
|
|
1215
|
-
var d = this.props.direction, b = this.state, w = b.scrollLeft,
|
|
1215
|
+
var d = this.props.direction, b = this.state, w = b.scrollLeft, T = b.scrollTop, D = b.scrollUpdateWasRequested;
|
|
1216
1216
|
if (D && this._outerRef != null) {
|
|
1217
1217
|
var I = this._outerRef;
|
|
1218
1218
|
if (d === "rtl")
|
|
@@ -1224,29 +1224,29 @@ function lo(e) {
|
|
|
1224
1224
|
I.scrollLeft = w;
|
|
1225
1225
|
break;
|
|
1226
1226
|
default:
|
|
1227
|
-
var
|
|
1228
|
-
I.scrollLeft = E -
|
|
1227
|
+
var S = I.clientWidth, E = I.scrollWidth;
|
|
1228
|
+
I.scrollLeft = E - S - w;
|
|
1229
1229
|
break;
|
|
1230
1230
|
}
|
|
1231
1231
|
else
|
|
1232
1232
|
I.scrollLeft = Math.max(0, w);
|
|
1233
|
-
I.scrollTop = Math.max(0,
|
|
1233
|
+
I.scrollTop = Math.max(0, T);
|
|
1234
1234
|
}
|
|
1235
1235
|
this._callPropsCallbacks();
|
|
1236
1236
|
}, P.componentWillUnmount = function() {
|
|
1237
1237
|
this._resetIsScrollingTimeoutId !== null && At(this._resetIsScrollingTimeoutId);
|
|
1238
1238
|
}, P.render = function() {
|
|
1239
|
-
var d = this.props, b = d.children, w = d.className,
|
|
1240
|
-
if (
|
|
1239
|
+
var d = this.props, b = d.children, w = d.className, T = d.columnCount, D = d.direction, I = d.height, S = d.innerRef, E = d.innerElementType, x = d.innerTagName, N = d.itemData, M = d.itemKey, k = M === void 0 ? co : M, G = d.outerElementType, q = d.outerTagName, Z = d.rowCount, U = d.style, B = d.useIsScrolling, re = d.width, pe = this.state.isScrolling, K = this._getHorizontalRangeToRender(), Y = K[0], z = K[1], H = this._getVerticalRangeToRender(), j = H[0], se = H[1], Te = [];
|
|
1240
|
+
if (T > 0 && Z)
|
|
1241
1241
|
for (var me = j; me <= se; me++)
|
|
1242
1242
|
for (var fe = Y; fe <= z; fe++)
|
|
1243
|
-
|
|
1243
|
+
Te.push(Me(b, {
|
|
1244
1244
|
columnIndex: fe,
|
|
1245
|
-
data:
|
|
1245
|
+
data: N,
|
|
1246
1246
|
isScrolling: B ? pe : void 0,
|
|
1247
1247
|
key: k({
|
|
1248
1248
|
columnIndex: fe,
|
|
1249
|
-
data:
|
|
1249
|
+
data: N,
|
|
1250
1250
|
rowIndex: me
|
|
1251
1251
|
}),
|
|
1252
1252
|
rowIndex: me,
|
|
@@ -1267,8 +1267,8 @@ function lo(e) {
|
|
|
1267
1267
|
direction: D
|
|
1268
1268
|
}, U)
|
|
1269
1269
|
}, Me(E || x || "div", {
|
|
1270
|
-
children:
|
|
1271
|
-
ref:
|
|
1270
|
+
children: Te,
|
|
1271
|
+
ref: S,
|
|
1272
1272
|
style: {
|
|
1273
1273
|
height: Ze,
|
|
1274
1274
|
pointerEvents: pe ? "none" : void 0,
|
|
@@ -1276,26 +1276,26 @@ function lo(e) {
|
|
|
1276
1276
|
}
|
|
1277
1277
|
}));
|
|
1278
1278
|
}, P._callPropsCallbacks = function() {
|
|
1279
|
-
var d = this.props, b = d.columnCount, w = d.onItemsRendered,
|
|
1279
|
+
var d = this.props, b = d.columnCount, w = d.onItemsRendered, T = d.onScroll, D = d.rowCount;
|
|
1280
1280
|
if (typeof w == "function" && b > 0 && D > 0) {
|
|
1281
|
-
var I = this._getHorizontalRangeToRender(),
|
|
1282
|
-
this._callOnItemsRendered(
|
|
1281
|
+
var I = this._getHorizontalRangeToRender(), S = I[0], E = I[1], x = I[2], N = I[3], M = this._getVerticalRangeToRender(), k = M[0], G = M[1], q = M[2], Z = M[3];
|
|
1282
|
+
this._callOnItemsRendered(S, E, k, G, x, N, q, Z);
|
|
1283
1283
|
}
|
|
1284
|
-
if (typeof
|
|
1284
|
+
if (typeof T == "function") {
|
|
1285
1285
|
var U = this.state, B = U.horizontalScrollDirection, re = U.scrollLeft, pe = U.scrollTop, K = U.scrollUpdateWasRequested, Y = U.verticalScrollDirection;
|
|
1286
1286
|
this._callOnScroll(re, pe, B, Y, K);
|
|
1287
1287
|
}
|
|
1288
1288
|
}, P._getHorizontalRangeToRender = function() {
|
|
1289
|
-
var d = this.props, b = d.columnCount, w = d.overscanColumnCount,
|
|
1289
|
+
var d = this.props, b = d.columnCount, w = d.overscanColumnCount, T = d.overscanColumnsCount, D = d.overscanCount, I = d.rowCount, S = this.state, E = S.horizontalScrollDirection, x = S.isScrolling, N = S.scrollLeft, M = w || T || D || 1;
|
|
1290
1290
|
if (b === 0 || I === 0)
|
|
1291
1291
|
return [0, 0, 0, 0];
|
|
1292
|
-
var k = r(this.props,
|
|
1292
|
+
var k = r(this.props, N, this._instanceProps), G = o(this.props, k, N, this._instanceProps), q = !x || E === "backward" ? Math.max(1, M) : 1, Z = !x || E === "forward" ? Math.max(1, M) : 1;
|
|
1293
1293
|
return [Math.max(0, k - q), Math.max(0, Math.min(b - 1, G + Z)), k, G];
|
|
1294
1294
|
}, P._getVerticalRangeToRender = function() {
|
|
1295
|
-
var d = this.props, b = d.columnCount, w = d.overscanCount,
|
|
1295
|
+
var d = this.props, b = d.columnCount, w = d.overscanCount, T = d.overscanRowCount, D = d.overscanRowsCount, I = d.rowCount, S = this.state, E = S.isScrolling, x = S.verticalScrollDirection, N = S.scrollTop, M = T || D || w || 1;
|
|
1296
1296
|
if (b === 0 || I === 0)
|
|
1297
1297
|
return [0, 0, 0, 0];
|
|
1298
|
-
var k = u(this.props,
|
|
1298
|
+
var k = u(this.props, N, this._instanceProps), G = m(this.props, k, N, this._instanceProps), q = !E || x === "backward" ? Math.max(1, M) : 1, Z = !E || x === "forward" ? Math.max(1, M) : 1;
|
|
1299
1299
|
return [Math.max(0, k - q), Math.max(0, Math.min(I - 1, G + Z)), k, G];
|
|
1300
1300
|
}, y;
|
|
1301
1301
|
}(kn), t.defaultProps = {
|
|
@@ -1473,10 +1473,10 @@ function go(e, t) {
|
|
|
1473
1473
|
return !Ht(n, o) && !Ht(r, a);
|
|
1474
1474
|
}
|
|
1475
1475
|
const vo = () => {
|
|
1476
|
-
const { viewMode: e } = Ue(), { scrollMode: t } = Pe(), { setColumnCount: n } = Bt(), { virtualScrollableElementRef: r } = qe(), o = ht(), a =
|
|
1476
|
+
const { viewMode: e } = Ue(), { scrollMode: t } = Pe(), { setColumnCount: n } = Bt(), { virtualScrollableElementRef: r } = qe(), o = ht(), a = R(
|
|
1477
1477
|
(m) => o.widths[m] || 0,
|
|
1478
1478
|
[o]
|
|
1479
|
-
), c =
|
|
1479
|
+
), c = R(
|
|
1480
1480
|
(m) => o.heights[m] || 0,
|
|
1481
1481
|
[o]
|
|
1482
1482
|
), i = A(() => o.heights.length, [o]), l = A(() => Math.max(...o.widths), [o]), p = A(() => t === J.HORIZONTAL_SCROLLING ? i : e === ze.DUAL_PAGE ? 2 : 1, [e, t, t, i, r, l]);
|
|
@@ -1515,8 +1515,8 @@ function _o(e) {
|
|
|
1515
1515
|
const l = typeof document < "u" && document.attachEvent;
|
|
1516
1516
|
if (!l) {
|
|
1517
1517
|
c = function(C) {
|
|
1518
|
-
const y = C.__resizeTriggers__, P = y.firstElementChild,
|
|
1519
|
-
|
|
1518
|
+
const y = C.__resizeTriggers__, P = y.firstElementChild, L = y.lastElementChild, d = P.firstElementChild;
|
|
1519
|
+
L.scrollLeft = L.scrollWidth, L.scrollTop = L.scrollHeight, d.style.width = P.offsetWidth + 1 + "px", d.style.height = P.offsetHeight + 1 + "px", P.scrollLeft = P.scrollWidth, P.scrollTop = P.scrollHeight;
|
|
1520
1520
|
}, a = function(C) {
|
|
1521
1521
|
return C.offsetWidth !== C.__resizeLast__.width || C.offsetHeight !== C.__resizeLast__.height;
|
|
1522
1522
|
}, i = function(C) {
|
|
@@ -1712,7 +1712,7 @@ const bo = ({ widths: e, heights: t }) => {
|
|
|
1712
1712
|
},
|
|
1713
1713
|
o
|
|
1714
1714
|
);
|
|
1715
|
-
}, go),
|
|
1715
|
+
}, go), qs = () => {
|
|
1716
1716
|
const { getContainer: e, container: t } = cr(), { scrollToPage: n } = nn(), {
|
|
1717
1717
|
virtualScrollRef: r,
|
|
1718
1718
|
getVirtualScrollRef: o,
|
|
@@ -1728,32 +1728,32 @@ const bo = ({ widths: e, heights: t }) => {
|
|
|
1728
1728
|
scrollMode: m
|
|
1729
1729
|
}), { isFullScreen: y } = qn(), {
|
|
1730
1730
|
pageDimension: P,
|
|
1731
|
-
rowCount:
|
|
1731
|
+
rowCount: L,
|
|
1732
1732
|
rowHeight: d,
|
|
1733
1733
|
columnCount: b,
|
|
1734
1734
|
columnWidth: w,
|
|
1735
|
-
estimatedColumnWidth:
|
|
1735
|
+
estimatedColumnWidth: T,
|
|
1736
1736
|
estimatedRowHeight: D
|
|
1737
|
-
} = vo(), [I,
|
|
1737
|
+
} = vo(), [I, S] = W({}), { isScrolling: E } = Kt(), x = $(), N = $({
|
|
1738
1738
|
scrollTop: 0,
|
|
1739
1739
|
scrollLeft: 0
|
|
1740
1740
|
});
|
|
1741
1741
|
dr(t);
|
|
1742
1742
|
const { isPressed: M } = lr(), { selectionMode: k } = Vn(), { initializeGrabScroll: G, scrollBehavior: q } = ur({
|
|
1743
1743
|
isPressed: M
|
|
1744
|
-
}), Z = A(() => k === $n.HAND, [k]), U =
|
|
1745
|
-
|
|
1744
|
+
}), Z = A(() => k === $n.HAND, [k]), U = R((z, H) => {
|
|
1745
|
+
S((j) => ({ ...j, [z]: Math.round(H * 100) }));
|
|
1746
1746
|
}, []), B = A(() => ({
|
|
1747
1747
|
columnCount: b,
|
|
1748
1748
|
handleIntersectRatioChange: U
|
|
1749
|
-
}), [b, U]), re =
|
|
1749
|
+
}), [b, U]), re = R(
|
|
1750
1750
|
(z) => {
|
|
1751
1751
|
const H = document.activeElement !== t;
|
|
1752
1752
|
!y && H || (["ArrowUp", "ArrowLeft"].includes(z.key) ? (z.preventDefault(), h()) : ["ArrowDown", "ArrowRight"].includes(z.key) && (z.preventDefault(), p()));
|
|
1753
1753
|
},
|
|
1754
1754
|
[p, h, y, m]
|
|
1755
|
-
), pe =
|
|
1756
|
-
|
|
1755
|
+
), pe = R((z) => {
|
|
1756
|
+
N.current = {
|
|
1757
1757
|
scrollTop: z.scrollTop,
|
|
1758
1758
|
scrollLeft: z.scrollLeft
|
|
1759
1759
|
};
|
|
@@ -1763,7 +1763,7 @@ const bo = ({ widths: e, heights: t }) => {
|
|
|
1763
1763
|
}), [re]), F(() => {
|
|
1764
1764
|
if (_.current && (_.current.style.position = "relative"), !!r) {
|
|
1765
1765
|
v.current = l, i({
|
|
1766
|
-
height: Array.from({ length:
|
|
1766
|
+
height: Array.from({ length: L }).reduce(
|
|
1767
1767
|
(z, H, j) => z + d(j),
|
|
1768
1768
|
0
|
|
1769
1769
|
),
|
|
@@ -1772,7 +1772,7 @@ const bo = ({ widths: e, heights: t }) => {
|
|
|
1772
1772
|
0
|
|
1773
1773
|
)
|
|
1774
1774
|
});
|
|
1775
|
-
for (let z = 0; z <
|
|
1775
|
+
for (let z = 0; z < L; z++)
|
|
1776
1776
|
for (let H = 0; H < b; H++)
|
|
1777
1777
|
r.resetAfterIndices({
|
|
1778
1778
|
columnIndex: H,
|
|
@@ -1780,11 +1780,11 @@ const bo = ({ widths: e, heights: t }) => {
|
|
|
1780
1780
|
shouldForceUpdate: !0
|
|
1781
1781
|
});
|
|
1782
1782
|
}
|
|
1783
|
-
}, [
|
|
1783
|
+
}, [L, b, P, r, n]), F(() => {
|
|
1784
1784
|
if (E.current)
|
|
1785
1785
|
return;
|
|
1786
1786
|
if (C.current.viewMode !== g || C.current.scrollMode !== m) {
|
|
1787
|
-
x.current && clearTimeout(x.current),
|
|
1787
|
+
x.current && clearTimeout(x.current), S({}), n(u), m === J.HORIZONTAL_SCROLLING && (r == null || r.scrollTo({
|
|
1788
1788
|
scrollTop: 0
|
|
1789
1789
|
})), x.current = setTimeout(() => {
|
|
1790
1790
|
requestAnimationFrame(() => {
|
|
@@ -1793,9 +1793,9 @@ const bo = ({ widths: e, heights: t }) => {
|
|
|
1793
1793
|
}, 100);
|
|
1794
1794
|
return;
|
|
1795
1795
|
}
|
|
1796
|
-
const H =
|
|
1796
|
+
const H = N.current.scrollTop, j = N.current.scrollLeft;
|
|
1797
1797
|
if (l.height !== 0 && l.width !== 0) {
|
|
1798
|
-
const { height: se, width:
|
|
1798
|
+
const { height: se, width: Te } = l, { height: me, width: fe } = v.current, Ze = H / me * se, je = j / fe * Te, zn = Math.min(Ze, se) || 0, Fn = Math.min(je, Te) || 0;
|
|
1799
1799
|
r == null || r.scrollTo({
|
|
1800
1800
|
scrollTop: zn,
|
|
1801
1801
|
scrollLeft: Fn
|
|
@@ -1817,7 +1817,7 @@ const bo = ({ widths: e, heights: t }) => {
|
|
|
1817
1817
|
const K = A(() => Q(le["rp-pages-container"], {
|
|
1818
1818
|
[le["rp-cursor-grab"]]: Z && !M,
|
|
1819
1819
|
[le["rp-cursor-grabbing"]]: Z && M
|
|
1820
|
-
}), [Z, M]), Y =
|
|
1820
|
+
}), [Z, M]), Y = R(
|
|
1821
1821
|
(z) => {
|
|
1822
1822
|
if (Z && z) {
|
|
1823
1823
|
const H = Q(le["rp-pages"]), j = document.querySelector(`.${H}`);
|
|
@@ -1834,7 +1834,7 @@ const bo = ({ widths: e, heights: t }) => {
|
|
|
1834
1834
|
className: Q(le["rp-pages"], le["rp-page-scrolling-wrapper"]),
|
|
1835
1835
|
children: g === ze.DUAL_PAGE ? /* @__PURE__ */ s(bo, { widths: w, heights: d }) : /* @__PURE__ */ s(Co, { widths: w, heights: d })
|
|
1836
1836
|
}
|
|
1837
|
-
) :
|
|
1837
|
+
) : T ? /* @__PURE__ */ s(
|
|
1838
1838
|
ho,
|
|
1839
1839
|
{
|
|
1840
1840
|
ref: o,
|
|
@@ -1847,9 +1847,9 @@ const bo = ({ widths: e, heights: t }) => {
|
|
|
1847
1847
|
rowHeight: d,
|
|
1848
1848
|
height: H,
|
|
1849
1849
|
width: z,
|
|
1850
|
-
estimatedColumnWidth:
|
|
1850
|
+
estimatedColumnWidth: T,
|
|
1851
1851
|
estimatedRowHeight: D,
|
|
1852
|
-
rowCount:
|
|
1852
|
+
rowCount: L,
|
|
1853
1853
|
className: Q(
|
|
1854
1854
|
le["rp-pages"],
|
|
1855
1855
|
m === J.HORIZONTAL_SCROLLING ? le["rp-pages-horizontal-scroll"] : ""
|
|
@@ -1858,7 +1858,7 @@ const bo = ({ widths: e, heights: t }) => {
|
|
|
1858
1858
|
children: Po
|
|
1859
1859
|
}
|
|
1860
1860
|
) : null }) }) });
|
|
1861
|
-
},
|
|
1861
|
+
}, Se = {
|
|
1862
1862
|
"rp-toolbar-content": "_rp-toolbar-content_fw3uq_1",
|
|
1863
1863
|
"rp-toolbar-wrapper": "_rp-toolbar-wrapper_fw3uq_10",
|
|
1864
1864
|
"rp-toolbar-start": "_rp-toolbar-start_fw3uq_18",
|
|
@@ -1868,10 +1868,10 @@ const bo = ({ widths: e, heights: t }) => {
|
|
|
1868
1868
|
"rp-paginate": "_rp-paginate_1vu6o_1",
|
|
1869
1869
|
"rp-page-input": "_rp-page-input_1vu6o_6",
|
|
1870
1870
|
"rp-total-page": "_rp-total-page_1vu6o_12"
|
|
1871
|
-
},
|
|
1871
|
+
}, To = () => {
|
|
1872
1872
|
const { prevIcon: e } = ce();
|
|
1873
1873
|
return e || /* @__PURE__ */ s(Re, {});
|
|
1874
|
-
},
|
|
1874
|
+
}, So = () => {
|
|
1875
1875
|
const { nextIcon: e } = ce();
|
|
1876
1876
|
return e || /* @__PURE__ */ s(Re, { style: { transform: "rotate(180deg" } });
|
|
1877
1877
|
}, yo = () => {
|
|
@@ -1879,15 +1879,15 @@ const bo = ({ widths: e, heights: t }) => {
|
|
|
1879
1879
|
F(() => {
|
|
1880
1880
|
i(e.toString());
|
|
1881
1881
|
}, [e]);
|
|
1882
|
-
const h =
|
|
1882
|
+
const h = R((g) => {
|
|
1883
1883
|
const _ = g.target.value;
|
|
1884
1884
|
i(_);
|
|
1885
|
-
}, []), f =
|
|
1885
|
+
}, []), f = R(() => {
|
|
1886
1886
|
const g = a(c);
|
|
1887
1887
|
g.success || i(g.currentPage.toString());
|
|
1888
|
-
}, [a, c, t]), u =
|
|
1888
|
+
}, [a, c, t]), u = R(() => {
|
|
1889
1889
|
i(e.toString());
|
|
1890
|
-
}, [e]), m =
|
|
1890
|
+
}, [e]), m = R(
|
|
1891
1891
|
(g) => {
|
|
1892
1892
|
g.key === "Enter" && f();
|
|
1893
1893
|
},
|
|
@@ -1904,7 +1904,7 @@ const bo = ({ widths: e, heights: t }) => {
|
|
|
1904
1904
|
changePage: n
|
|
1905
1905
|
}
|
|
1906
1906
|
) : l ? /* @__PURE__ */ O("div", { className: nt["rp-paginate"], children: [
|
|
1907
|
-
!p && /* @__PURE__ */ s(ee, { content: "Previous page", children: /* @__PURE__ */ s(X, { onClick: o, disabled: e === 1, children: /* @__PURE__ */ s(
|
|
1907
|
+
!p && /* @__PURE__ */ s(ee, { content: "Previous page", children: /* @__PURE__ */ s(X, { onClick: o, disabled: e === 1, children: /* @__PURE__ */ s(To, {}) }) }),
|
|
1908
1908
|
/* @__PURE__ */ s(
|
|
1909
1909
|
jt,
|
|
1910
1910
|
{
|
|
@@ -1919,10 +1919,10 @@ const bo = ({ widths: e, heights: t }) => {
|
|
|
1919
1919
|
"/",
|
|
1920
1920
|
t
|
|
1921
1921
|
] }),
|
|
1922
|
-
!p && /* @__PURE__ */ s(ee, { content: "Next page", children: /* @__PURE__ */ s(X, { onClick: r, disabled: e === t, children: /* @__PURE__ */ s(
|
|
1922
|
+
!p && /* @__PURE__ */ s(ee, { content: "Next page", children: /* @__PURE__ */ s(X, { onClick: r, disabled: e === t, children: /* @__PURE__ */ s(So, {}) }) })
|
|
1923
1923
|
] }) : null;
|
|
1924
1924
|
};
|
|
1925
|
-
var Ct = "Dialog", [gn,
|
|
1925
|
+
var Ct = "Dialog", [gn, Zs] = gr(Ct), [Io, ae] = gn(Ct), vn = (e) => {
|
|
1926
1926
|
const {
|
|
1927
1927
|
__scopeDialog: t,
|
|
1928
1928
|
children: n,
|
|
@@ -1930,7 +1930,7 @@ var Ct = "Dialog", [gn, Us] = Sr(Ct), [Io, ae] = gn(Ct), vn = (e) => {
|
|
|
1930
1930
|
defaultOpen: o,
|
|
1931
1931
|
onOpenChange: a,
|
|
1932
1932
|
modal: c = !0
|
|
1933
|
-
} = e, i = V.useRef(null), l = V.useRef(null), [p = !1, h] =
|
|
1933
|
+
} = e, i = V.useRef(null), l = V.useRef(null), [p = !1, h] = wr({
|
|
1934
1934
|
prop: r,
|
|
1935
1935
|
defaultProp: o,
|
|
1936
1936
|
onChange: a
|
|
@@ -1957,13 +1957,13 @@ var _n = "DialogTrigger", xo = V.forwardRef(
|
|
|
1957
1957
|
(e, t) => {
|
|
1958
1958
|
const { __scopeDialog: n, ...r } = e, o = ae(_n, n), a = gt(t, o.triggerRef);
|
|
1959
1959
|
return /* @__PURE__ */ s(
|
|
1960
|
-
|
|
1960
|
+
Ne.button,
|
|
1961
1961
|
{
|
|
1962
1962
|
type: "button",
|
|
1963
1963
|
"aria-haspopup": "dialog",
|
|
1964
1964
|
"aria-expanded": o.open,
|
|
1965
1965
|
"aria-controls": o.contentId,
|
|
1966
|
-
"data-state":
|
|
1966
|
+
"data-state": St(o.open),
|
|
1967
1967
|
...r,
|
|
1968
1968
|
ref: a,
|
|
1969
1969
|
onClick: xe(e.onClick, o.onOpenToggle)
|
|
@@ -1976,26 +1976,26 @@ var Pt = "DialogPortal", [Ro, wn] = gn(Pt, {
|
|
|
1976
1976
|
forceMount: void 0
|
|
1977
1977
|
}), bn = (e) => {
|
|
1978
1978
|
const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, a = ae(Pt, t);
|
|
1979
|
-
return /* @__PURE__ */ s(Ro, { scope: t, forceMount: n, children: V.Children.map(r, (c) => /* @__PURE__ */ s(vt, { present: n || a.open, children: /* @__PURE__ */ s(
|
|
1979
|
+
return /* @__PURE__ */ s(Ro, { scope: t, forceMount: n, children: V.Children.map(r, (c) => /* @__PURE__ */ s(vt, { present: n || a.open, children: /* @__PURE__ */ s(yr, { asChild: !0, container: o, children: c }) })) });
|
|
1980
1980
|
};
|
|
1981
1981
|
bn.displayName = Pt;
|
|
1982
1982
|
var ke = "DialogOverlay", Cn = V.forwardRef(
|
|
1983
1983
|
(e, t) => {
|
|
1984
1984
|
const n = wn(ke, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, a = ae(ke, e.__scopeDialog);
|
|
1985
|
-
return a.modal ? /* @__PURE__ */ s(vt, { present: r || a.open, children: /* @__PURE__ */ s(
|
|
1985
|
+
return a.modal ? /* @__PURE__ */ s(vt, { present: r || a.open, children: /* @__PURE__ */ s(Lo, { ...o, ref: t }) }) : null;
|
|
1986
1986
|
}
|
|
1987
1987
|
);
|
|
1988
1988
|
Cn.displayName = ke;
|
|
1989
|
-
var
|
|
1989
|
+
var Lo = V.forwardRef(
|
|
1990
1990
|
(e, t) => {
|
|
1991
1991
|
const { __scopeDialog: n, ...r } = e, o = ae(ke, n);
|
|
1992
1992
|
return (
|
|
1993
1993
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
1994
1994
|
// ie. when `Overlay` and `Content` are siblings
|
|
1995
|
-
/* @__PURE__ */ s(
|
|
1996
|
-
|
|
1995
|
+
/* @__PURE__ */ s(Cr, { as: vr, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ s(
|
|
1996
|
+
Ne.div,
|
|
1997
1997
|
{
|
|
1998
|
-
"data-state":
|
|
1998
|
+
"data-state": St(o.open),
|
|
1999
1999
|
...r,
|
|
2000
2000
|
ref: t,
|
|
2001
2001
|
style: { pointerEvents: "auto", ...r.style }
|
|
@@ -2006,19 +2006,19 @@ var No = V.forwardRef(
|
|
|
2006
2006
|
), ve = "DialogContent", Pn = V.forwardRef(
|
|
2007
2007
|
(e, t) => {
|
|
2008
2008
|
const n = wn(ve, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, a = ae(ve, e.__scopeDialog);
|
|
2009
|
-
return /* @__PURE__ */ s(vt, { present: r || a.open, children: a.modal ? /* @__PURE__ */ s(
|
|
2009
|
+
return /* @__PURE__ */ s(vt, { present: r || a.open, children: a.modal ? /* @__PURE__ */ s(No, { ...o, ref: t }) : /* @__PURE__ */ s(Mo, { ...o, ref: t }) });
|
|
2010
2010
|
}
|
|
2011
2011
|
);
|
|
2012
2012
|
Pn.displayName = ve;
|
|
2013
|
-
var
|
|
2013
|
+
var No = V.forwardRef(
|
|
2014
2014
|
(e, t) => {
|
|
2015
2015
|
const n = ae(ve, e.__scopeDialog), r = V.useRef(null), o = gt(t, n.contentRef, r);
|
|
2016
2016
|
return V.useEffect(() => {
|
|
2017
2017
|
const a = r.current;
|
|
2018
2018
|
if (a)
|
|
2019
|
-
return
|
|
2019
|
+
return Pr(a);
|
|
2020
2020
|
}, []), /* @__PURE__ */ s(
|
|
2021
|
-
|
|
2021
|
+
Tn,
|
|
2022
2022
|
{
|
|
2023
2023
|
...e,
|
|
2024
2024
|
ref: o,
|
|
@@ -2043,7 +2043,7 @@ var Lo = V.forwardRef(
|
|
|
2043
2043
|
(e, t) => {
|
|
2044
2044
|
const n = ae(ve, e.__scopeDialog), r = V.useRef(!1), o = V.useRef(!1);
|
|
2045
2045
|
return /* @__PURE__ */ s(
|
|
2046
|
-
|
|
2046
|
+
Tn,
|
|
2047
2047
|
{
|
|
2048
2048
|
...e,
|
|
2049
2049
|
ref: t,
|
|
@@ -2062,12 +2062,12 @@ var Lo = V.forwardRef(
|
|
|
2062
2062
|
}
|
|
2063
2063
|
);
|
|
2064
2064
|
}
|
|
2065
|
-
),
|
|
2065
|
+
), Tn = V.forwardRef(
|
|
2066
2066
|
(e, t) => {
|
|
2067
2067
|
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: a, ...c } = e, i = ae(ve, n), l = V.useRef(null), p = gt(t, l);
|
|
2068
|
-
return
|
|
2068
|
+
return Tr(), /* @__PURE__ */ O(Ae, { children: [
|
|
2069
2069
|
/* @__PURE__ */ s(
|
|
2070
|
-
|
|
2070
|
+
Sr,
|
|
2071
2071
|
{
|
|
2072
2072
|
asChild: !0,
|
|
2073
2073
|
loop: !0,
|
|
@@ -2075,13 +2075,13 @@ var Lo = V.forwardRef(
|
|
|
2075
2075
|
onMountAutoFocus: o,
|
|
2076
2076
|
onUnmountAutoFocus: a,
|
|
2077
2077
|
children: /* @__PURE__ */ s(
|
|
2078
|
-
|
|
2078
|
+
br,
|
|
2079
2079
|
{
|
|
2080
2080
|
role: "dialog",
|
|
2081
2081
|
id: i.contentId,
|
|
2082
2082
|
"aria-describedby": i.descriptionId,
|
|
2083
2083
|
"aria-labelledby": i.titleId,
|
|
2084
|
-
"data-state":
|
|
2084
|
+
"data-state": St(i.open),
|
|
2085
2085
|
...c,
|
|
2086
2086
|
ref: p,
|
|
2087
2087
|
onDismiss: () => i.onOpenChange(!1)
|
|
@@ -2095,17 +2095,17 @@ var Lo = V.forwardRef(
|
|
|
2095
2095
|
] })
|
|
2096
2096
|
] });
|
|
2097
2097
|
}
|
|
2098
|
-
),
|
|
2098
|
+
), Tt = "DialogTitle", Sn = V.forwardRef(
|
|
2099
2099
|
(e, t) => {
|
|
2100
|
-
const { __scopeDialog: n, ...r } = e, o = ae(
|
|
2101
|
-
return /* @__PURE__ */ s(
|
|
2100
|
+
const { __scopeDialog: n, ...r } = e, o = ae(Tt, n);
|
|
2101
|
+
return /* @__PURE__ */ s(Ne.h2, { id: o.titleId, ...r, ref: t });
|
|
2102
2102
|
}
|
|
2103
2103
|
);
|
|
2104
|
-
|
|
2104
|
+
Sn.displayName = Tt;
|
|
2105
2105
|
var yn = "DialogDescription", Eo = V.forwardRef(
|
|
2106
2106
|
(e, t) => {
|
|
2107
2107
|
const { __scopeDialog: n, ...r } = e, o = ae(yn, n);
|
|
2108
|
-
return /* @__PURE__ */ s(
|
|
2108
|
+
return /* @__PURE__ */ s(Ne.p, { id: o.descriptionId, ...r, ref: t });
|
|
2109
2109
|
}
|
|
2110
2110
|
);
|
|
2111
2111
|
Eo.displayName = yn;
|
|
@@ -2113,7 +2113,7 @@ var In = "DialogClose", xn = V.forwardRef(
|
|
|
2113
2113
|
(e, t) => {
|
|
2114
2114
|
const { __scopeDialog: n, ...r } = e, o = ae(In, n);
|
|
2115
2115
|
return /* @__PURE__ */ s(
|
|
2116
|
-
|
|
2116
|
+
Ne.button,
|
|
2117
2117
|
{
|
|
2118
2118
|
type: "button",
|
|
2119
2119
|
...r,
|
|
@@ -2124,15 +2124,15 @@ var In = "DialogClose", xn = V.forwardRef(
|
|
|
2124
2124
|
}
|
|
2125
2125
|
);
|
|
2126
2126
|
xn.displayName = In;
|
|
2127
|
-
function
|
|
2127
|
+
function St(e) {
|
|
2128
2128
|
return e ? "open" : "closed";
|
|
2129
2129
|
}
|
|
2130
|
-
var Rn = "DialogTitleWarning", [
|
|
2130
|
+
var Rn = "DialogTitleWarning", [js, Ln] = _r(Rn, {
|
|
2131
2131
|
contentName: ve,
|
|
2132
|
-
titleName:
|
|
2132
|
+
titleName: Tt,
|
|
2133
2133
|
docsSlug: "dialog"
|
|
2134
2134
|
}), Oo = ({ titleId: e }) => {
|
|
2135
|
-
const t =
|
|
2135
|
+
const t = Ln(Rn), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
2136
2136
|
|
|
2137
2137
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
2138
2138
|
|
|
@@ -2141,13 +2141,13 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
2141
2141
|
e && (document.getElementById(e) || console.error(n));
|
|
2142
2142
|
}, [n, e]), null;
|
|
2143
2143
|
}, Do = "DialogDescriptionWarning", Ao = ({ contentRef: e, descriptionId: t }) => {
|
|
2144
|
-
const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${
|
|
2144
|
+
const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ln(Do).contentName}}.`;
|
|
2145
2145
|
return V.useEffect(() => {
|
|
2146
2146
|
var a;
|
|
2147
2147
|
const o = (a = e.current) == null ? void 0 : a.getAttribute("aria-describedby");
|
|
2148
2148
|
t && o && (document.getElementById(t) || console.warn(r));
|
|
2149
2149
|
}, [r, e, t]), null;
|
|
2150
|
-
}, zo = vn, Fo = bn, ko = Cn, Wo = Pn, Ho =
|
|
2150
|
+
}, zo = vn, Fo = bn, ko = Cn, Wo = Pn, Ho = Sn, $o = xn;
|
|
2151
2151
|
const ge = {
|
|
2152
2152
|
"rp-dialog-wrapper": "_rp-dialog-wrapper_slqo7_1",
|
|
2153
2153
|
"rp-dialog-overlay": "_rp-dialog-overlay_slqo7_7",
|
|
@@ -2157,7 +2157,7 @@ const ge = {
|
|
|
2157
2157
|
"rp-dialog-close": "_rp-dialog-close_slqo7_47",
|
|
2158
2158
|
"rp-properties-divider": "_rp-properties-divider_slqo7_55"
|
|
2159
2159
|
}, Go = () => {
|
|
2160
|
-
const { pdfProperties: e } = ne(), { container: t } =
|
|
2160
|
+
const { pdfProperties: e } = ne(), { container: t } = Le(), { activeDocumentProperties: n, setActiveDocumentProperties: r } = xr(), o = A(() => {
|
|
2161
2161
|
if (!e)
|
|
2162
2162
|
return [];
|
|
2163
2163
|
const {
|
|
@@ -2207,32 +2207,35 @@ const ge = {
|
|
|
2207
2207
|
] }) }) });
|
|
2208
2208
|
}, Vo = {
|
|
2209
2209
|
"rp-other-tool-content": "_rp-other-tool-content_su718_1"
|
|
2210
|
-
}, Uo = () => {
|
|
2210
|
+
}, Uo = (e) => URL.createObjectURL(e), qo = async (e) => {
|
|
2211
|
+
const n = await (await fetch(e)).blob();
|
|
2212
|
+
return Uo(n);
|
|
2213
|
+
}, Zo = () => {
|
|
2211
2214
|
const { filename: e, pdfSrc: t } = ne();
|
|
2212
|
-
return { download: () => {
|
|
2213
|
-
if (!e)
|
|
2214
|
-
|
|
2215
|
+
return { download: R(async () => {
|
|
2216
|
+
if (!e || !t)
|
|
2217
|
+
throw new Error("There is no PDF source to download");
|
|
2215
2218
|
const r = document.createElement("a");
|
|
2216
|
-
r.href = t, r.download = e, document.body.appendChild(r), r.click(), document.body.removeChild(r);
|
|
2217
|
-
} };
|
|
2218
|
-
},
|
|
2219
|
+
r.href = await qo(t), r.download = e, document.body.appendChild(r), r.click(), document.body.removeChild(r);
|
|
2220
|
+
}, []) };
|
|
2221
|
+
}, Nn = () => {
|
|
2219
2222
|
const { downloadIcon: e } = ce();
|
|
2220
2223
|
return e || /* @__PURE__ */ s(Er, {});
|
|
2221
|
-
}, Mn = ({ children: e, className: t }) => /* @__PURE__ */ s(ee, { className: t, content: "Download file", children: e }),
|
|
2222
|
-
/* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(
|
|
2224
|
+
}, Mn = ({ children: e, className: t }) => /* @__PURE__ */ s(ee, { className: t, content: "Download file", children: e }), jo = ({ download: e }) => /* @__PURE__ */ s(Mn, { children: /* @__PURE__ */ s(X, { onClick: e, children: /* @__PURE__ */ s(Nn, {}) }) }), Bo = ({ download: e }) => /* @__PURE__ */ s(he, { onClick: e, children: /* @__PURE__ */ O(Mn, { className: "rp-menu-item", children: [
|
|
2225
|
+
/* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(Nn, {}) }),
|
|
2223
2226
|
"Download file"
|
|
2224
2227
|
] }) }), En = () => {
|
|
2225
|
-
const { download: e } =
|
|
2226
|
-
return t ? n ? /* @__PURE__ */ s(
|
|
2228
|
+
const { download: e } = Zo(), { downloadTool: t = !0 } = de(), { isSmallScreen: n } = _e();
|
|
2229
|
+
return t ? n ? /* @__PURE__ */ s(Bo, { download: e }) : typeof t == "function" ? /* @__PURE__ */ s(t, { download: e }) : t ? /* @__PURE__ */ s(jo, { download: e }) : null : null;
|
|
2227
2230
|
}, On = () => {
|
|
2228
2231
|
const { printIcon: e } = ce();
|
|
2229
2232
|
return e || /* @__PURE__ */ s(Or, {});
|
|
2230
|
-
}, Dn = ({ children: e, className: t }) => /* @__PURE__ */ s(ee, { className: t, content: "Print", children: e }),
|
|
2233
|
+
}, Dn = ({ children: e, className: t }) => /* @__PURE__ */ s(ee, { className: t, content: "Print", children: e }), Ko = ({ print: e }) => /* @__PURE__ */ s(Dn, { children: /* @__PURE__ */ s(X, { onClick: e, children: /* @__PURE__ */ s(On, {}) }) }), Xo = ({ print: e }) => /* @__PURE__ */ s(he, { onClick: e, children: /* @__PURE__ */ O(Dn, { className: "rp-menu-item", children: [
|
|
2231
2234
|
/* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(On, {}) }),
|
|
2232
2235
|
"Print"
|
|
2233
2236
|
] }) }), An = () => {
|
|
2234
2237
|
const { print: e, cancel: t, setOnProgress: n, setOnComplete: r, setOnError: o, progress: a } = wt(), { printTool: c = !0 } = de(), { isSmallScreen: i } = _e();
|
|
2235
|
-
return c ? i ? /* @__PURE__ */ s(
|
|
2238
|
+
return c ? i ? /* @__PURE__ */ s(Xo, { print: e }) : typeof c == "function" ? /* @__PURE__ */ s(
|
|
2236
2239
|
c,
|
|
2237
2240
|
{
|
|
2238
2241
|
print: e,
|
|
@@ -2242,34 +2245,34 @@ const ge = {
|
|
|
2242
2245
|
setOnComplete: r,
|
|
2243
2246
|
progress: a
|
|
2244
2247
|
}
|
|
2245
|
-
) : c ? /* @__PURE__ */ s(
|
|
2246
|
-
},
|
|
2248
|
+
) : c ? /* @__PURE__ */ s(Ko, { print: e }) : null : null;
|
|
2249
|
+
}, Jo = {
|
|
2247
2250
|
"rp-go-to-Top": "_rp-go-to-Top_4e0yd_1"
|
|
2248
|
-
},
|
|
2251
|
+
}, Yo = () => {
|
|
2249
2252
|
const { goToFirstPageIcon: e } = ce();
|
|
2250
|
-
return e || /* @__PURE__ */ s(tn, { className:
|
|
2251
|
-
},
|
|
2253
|
+
return e || /* @__PURE__ */ s(tn, { className: Jo["rp-go-to-Top"] });
|
|
2254
|
+
}, Qo = () => {
|
|
2252
2255
|
const { goToLastPageIcon: e } = ce();
|
|
2253
2256
|
return e || /* @__PURE__ */ s(tn, {});
|
|
2254
|
-
},
|
|
2255
|
-
const { goToPage: e, totalPages: t, focusedPage: n } = oe(), { jumpNavigationTool: r = !0 } = de(), o = A(() => n === 1, [n]), a = A(() => n === t, [n, t]), c =
|
|
2257
|
+
}, ea = () => {
|
|
2258
|
+
const { goToPage: e, totalPages: t, focusedPage: n } = oe(), { jumpNavigationTool: r = !0 } = de(), o = A(() => n === 1, [n]), a = A(() => n === t, [n, t]), c = R(() => {
|
|
2256
2259
|
e(1);
|
|
2257
|
-
}, [e]), i =
|
|
2260
|
+
}, [e]), i = R(() => {
|
|
2258
2261
|
e(t);
|
|
2259
2262
|
}, [e, t]);
|
|
2260
2263
|
return r ? /* @__PURE__ */ O(Fe, { children: [
|
|
2261
2264
|
/* @__PURE__ */ s(he, { disabled: o, onClick: c, children: /* @__PURE__ */ O(ee, { className: "rp-menu-item", content: "Go to first page", children: [
|
|
2262
|
-
/* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(
|
|
2265
|
+
/* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(Yo, {}) }),
|
|
2263
2266
|
"First page"
|
|
2264
2267
|
] }) }),
|
|
2265
2268
|
/* @__PURE__ */ s(he, { disabled: a, onClick: i, children: /* @__PURE__ */ O(ee, { className: "rp-menu-item", content: "Go to last page", children: [
|
|
2266
|
-
/* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(
|
|
2269
|
+
/* @__PURE__ */ s("div", { className: "rp-menu-item-left", children: /* @__PURE__ */ s(Qo, {}) }),
|
|
2267
2270
|
"Last page"
|
|
2268
2271
|
] }) }),
|
|
2269
2272
|
/* @__PURE__ */ s(_t, {})
|
|
2270
2273
|
] }) : null;
|
|
2271
|
-
},
|
|
2272
|
-
const { container: e } =
|
|
2274
|
+
}, ta = () => {
|
|
2275
|
+
const { container: e } = Le(), { isSmallScreen: t } = _e(), {
|
|
2273
2276
|
openFileTool: n,
|
|
2274
2277
|
downloadTool: r,
|
|
2275
2278
|
documentProperties: o,
|
|
@@ -2307,17 +2310,17 @@ const ge = {
|
|
|
2307
2310
|
/* @__PURE__ */ s(en, {}),
|
|
2308
2311
|
/* @__PURE__ */ s(_t, {})
|
|
2309
2312
|
] }),
|
|
2310
|
-
/* @__PURE__ */ s(
|
|
2311
|
-
/* @__PURE__ */ s(
|
|
2313
|
+
/* @__PURE__ */ s(ea, {}),
|
|
2314
|
+
/* @__PURE__ */ s(Nr, {}),
|
|
2312
2315
|
/* @__PURE__ */ s(Dr, {}),
|
|
2313
2316
|
/* @__PURE__ */ s(Mr, {}),
|
|
2314
|
-
/* @__PURE__ */ s(
|
|
2317
|
+
/* @__PURE__ */ s(Lr, {})
|
|
2315
2318
|
] })
|
|
2316
2319
|
}
|
|
2317
2320
|
),
|
|
2318
2321
|
/* @__PURE__ */ s(Go, {})
|
|
2319
2322
|
] }) : null;
|
|
2320
|
-
},
|
|
2323
|
+
}, na = () => {
|
|
2321
2324
|
const { isSmallScreen: e } = _e();
|
|
2322
2325
|
return /* @__PURE__ */ O(Ae, { children: [
|
|
2323
2326
|
/* @__PURE__ */ s(mr, {}),
|
|
@@ -2327,7 +2330,7 @@ const ge = {
|
|
|
2327
2330
|
/* @__PURE__ */ s(An, {}),
|
|
2328
2331
|
/* @__PURE__ */ s(en, {})
|
|
2329
2332
|
] }),
|
|
2330
|
-
/* @__PURE__ */ s(
|
|
2333
|
+
/* @__PURE__ */ s(ta, {})
|
|
2331
2334
|
] });
|
|
2332
2335
|
}, ye = {
|
|
2333
2336
|
"rp-zoom-wrapper": "_rp-zoom-wrapper_163s9_1",
|
|
@@ -2335,40 +2338,40 @@ const ge = {
|
|
|
2335
2338
|
"rp-current-zoom-icon": "_rp-current-zoom-icon_163s9_11",
|
|
2336
2339
|
"rp-current-zoom": "_rp-current-zoom_163s9_6",
|
|
2337
2340
|
"rp-zoom-dropdown-content": "_rp-zoom-dropdown-content_163s9_20"
|
|
2338
|
-
},
|
|
2341
|
+
}, ra = 25, rt = 1e3, oa = [50, 75, 100, 125, 150, 200, 300, 400], aa = () => {
|
|
2339
2342
|
const { zoomInIcon: e } = ce();
|
|
2340
2343
|
return e || /* @__PURE__ */ s(Ar, {});
|
|
2341
|
-
},
|
|
2344
|
+
}, sa = () => {
|
|
2342
2345
|
const { zoomOutIcon: e } = ce();
|
|
2343
2346
|
return e || /* @__PURE__ */ s(zr, {});
|
|
2344
|
-
},
|
|
2345
|
-
const { zoomLevel: e, setZoomLevel: t } = Ve(), { container: n, contentRef: r } =
|
|
2347
|
+
}, ia = () => {
|
|
2348
|
+
const { zoomLevel: e, setZoomLevel: t } = Ve(), { container: n, contentRef: r } = Le(), { zoomTool: o = !0 } = de(), { focusedPage: a } = oe(), { rotate: c } = Ge(), { pages: i } = ne(), { isSmallScreen: l } = _e(), p = R(() => {
|
|
2346
2349
|
t((v) => {
|
|
2347
2350
|
const C = Math.floor(v / 25) * 25;
|
|
2348
2351
|
return Math.min(C + 25, rt);
|
|
2349
2352
|
});
|
|
2350
|
-
}, [t]), h =
|
|
2353
|
+
}, [t]), h = R(() => {
|
|
2351
2354
|
t((v) => {
|
|
2352
2355
|
const C = Math.ceil(v / 25) * 25;
|
|
2353
2356
|
return Math.min(C - 25, rt);
|
|
2354
2357
|
});
|
|
2355
|
-
}, [t]), f = A(() => e ===
|
|
2358
|
+
}, [t]), f = A(() => e === ra, [e]), u = A(() => e === rt, [e]), m = A(() => {
|
|
2356
2359
|
var v;
|
|
2357
2360
|
return (v = i.get(a)) == null ? void 0 : v.page.getViewport({ scale: 1, rotation: c });
|
|
2358
|
-
}, [i, a, c]), g =
|
|
2361
|
+
}, [i, a, c]), g = R(
|
|
2359
2362
|
(v) => {
|
|
2360
|
-
const C = ((m == null ? void 0 : m.width) || 0) + 2 * It, y = ((m == null ? void 0 : m.height) || 0) + 2 * It, P = (r == null ? void 0 : r.clientWidth) || 0,
|
|
2363
|
+
const C = ((m == null ? void 0 : m.width) || 0) + 2 * It, y = ((m == null ? void 0 : m.height) || 0) + 2 * It, P = (r == null ? void 0 : r.clientWidth) || 0, L = (r == null ? void 0 : r.clientHeight) || 0, d = Fr(v, P, L, C, y);
|
|
2361
2364
|
t(d);
|
|
2362
2365
|
},
|
|
2363
2366
|
[t, m]
|
|
2364
|
-
), _ =
|
|
2367
|
+
), _ = R(
|
|
2365
2368
|
(v) => {
|
|
2366
2369
|
typeof v == "number" ? t(v) : g(v);
|
|
2367
2370
|
},
|
|
2368
2371
|
[t, g]
|
|
2369
2372
|
);
|
|
2370
2373
|
return typeof o != "boolean" ? /* @__PURE__ */ s(o, { zoomLevel: e, setZoomLevel: t }) : o ? /* @__PURE__ */ O("div", { className: ye["rp-zoom-wrapper"], children: [
|
|
2371
|
-
/* @__PURE__ */ s(ee, { content: "Zoom out", children: /* @__PURE__ */ s(X, { disabled: f, onClick: h, children: /* @__PURE__ */ s(
|
|
2374
|
+
/* @__PURE__ */ s(ee, { content: "Zoom out", children: /* @__PURE__ */ s(X, { disabled: f, onClick: h, children: /* @__PURE__ */ s(sa, {}) }) }),
|
|
2372
2375
|
!l && /* @__PURE__ */ s(
|
|
2373
2376
|
ft,
|
|
2374
2377
|
{
|
|
@@ -2389,14 +2392,14 @@ const ge = {
|
|
|
2389
2392
|
/* @__PURE__ */ s(he, { onClick: () => _(Be.PAGE_WIDTH), children: "Page width" })
|
|
2390
2393
|
] }),
|
|
2391
2394
|
/* @__PURE__ */ s(_t, {}),
|
|
2392
|
-
/* @__PURE__ */ s(Fe, { children:
|
|
2395
|
+
/* @__PURE__ */ s(Fe, { children: oa.map((v) => /* @__PURE__ */ O(he, { onClick: () => _(v), children: [
|
|
2393
2396
|
v,
|
|
2394
2397
|
" %"
|
|
2395
2398
|
] }, v)) })
|
|
2396
2399
|
] })
|
|
2397
2400
|
}
|
|
2398
2401
|
),
|
|
2399
|
-
/* @__PURE__ */ s(ee, { content: "Zoom in", children: /* @__PURE__ */ s(X, { disabled: u, onClick: p, children: /* @__PURE__ */ s(
|
|
2402
|
+
/* @__PURE__ */ s(ee, { content: "Zoom in", children: /* @__PURE__ */ s(X, { disabled: u, onClick: p, children: /* @__PURE__ */ s(aa, {}) }) })
|
|
2400
2403
|
] }) : null;
|
|
2401
2404
|
}, ie = {
|
|
2402
2405
|
"rp-search-tool-content": "_rp-search-tool-content_1vxow_1",
|
|
@@ -2410,8 +2413,8 @@ const ge = {
|
|
|
2410
2413
|
}, Ut = () => {
|
|
2411
2414
|
const { searchIcon: e } = ce();
|
|
2412
2415
|
return e || /* @__PURE__ */ s(kr, {});
|
|
2413
|
-
},
|
|
2414
|
-
const { container: e } =
|
|
2416
|
+
}, ca = () => {
|
|
2417
|
+
const { container: e } = Le(), [t, n] = W(!1), { pdf: r } = ne(), [o, a] = W(null), {
|
|
2415
2418
|
searchOptions: c,
|
|
2416
2419
|
setSearchOptions: i,
|
|
2417
2420
|
loading: l,
|
|
@@ -2421,38 +2424,38 @@ const ge = {
|
|
|
2421
2424
|
nextMatch: u,
|
|
2422
2425
|
prevMatch: m,
|
|
2423
2426
|
search: g
|
|
2424
|
-
} = ln(), { searchTool: _ = !0 } = de(), [v, C] = W(g), y =
|
|
2427
|
+
} = ln(), { searchTool: _ = !0 } = de(), [v, C] = W(g), y = R(() => {
|
|
2425
2428
|
n(!0);
|
|
2426
|
-
}, []), P =
|
|
2429
|
+
}, []), P = R(() => {
|
|
2427
2430
|
p(""), C(""), n(!1);
|
|
2428
|
-
}, [p]),
|
|
2431
|
+
}, [p]), L = R(
|
|
2429
2432
|
(x) => {
|
|
2430
2433
|
x.key === "Escape" && t && P();
|
|
2431
2434
|
},
|
|
2432
2435
|
[t]
|
|
2433
|
-
), d =
|
|
2436
|
+
), d = R(
|
|
2434
2437
|
(x) => {
|
|
2435
2438
|
x.shiftKey && x.key === "Enter" ? m() : x.key === "Enter" && g !== v ? p(v) : x.key === "Enter" && u();
|
|
2436
2439
|
},
|
|
2437
2440
|
[v, m, u, p, g]
|
|
2438
2441
|
);
|
|
2439
|
-
F(() => (window.addEventListener("keydown",
|
|
2440
|
-
window.removeEventListener("keydown",
|
|
2441
|
-
}), [
|
|
2442
|
+
F(() => (window.addEventListener("keydown", L), () => {
|
|
2443
|
+
window.removeEventListener("keydown", L);
|
|
2444
|
+
}), [L]), F(() => {
|
|
2442
2445
|
o && o.focus();
|
|
2443
2446
|
}, [o]);
|
|
2444
|
-
const b =
|
|
2447
|
+
const b = R((x) => {
|
|
2445
2448
|
C(x.target.value);
|
|
2446
|
-
}, []), w =
|
|
2449
|
+
}, []), w = R(() => {
|
|
2447
2450
|
C(""), p("");
|
|
2448
|
-
}, [p]),
|
|
2451
|
+
}, [p]), T = A(() => `${f} / ${h}`, [f, h]), { wholeWords: D, matchCase: I } = A(() => c, [c]), S = R(
|
|
2449
2452
|
(x) => {
|
|
2450
|
-
i((
|
|
2453
|
+
i((N) => ({ ...N, matchCase: x }));
|
|
2451
2454
|
},
|
|
2452
2455
|
[i]
|
|
2453
|
-
), E =
|
|
2456
|
+
), E = R(
|
|
2454
2457
|
(x) => {
|
|
2455
|
-
i((
|
|
2458
|
+
i((N) => ({ ...N, wholeWords: x }));
|
|
2456
2459
|
},
|
|
2457
2460
|
[i]
|
|
2458
2461
|
);
|
|
@@ -2481,10 +2484,10 @@ const ge = {
|
|
|
2481
2484
|
children: !!v && /* @__PURE__ */ s("span", { className: ie["rp-search-tool-input-clear"], onClick: w, children: /* @__PURE__ */ s(Wr, {}) })
|
|
2482
2485
|
}
|
|
2483
2486
|
),
|
|
2484
|
-
l ? /* @__PURE__ */ s("span", { children: /* @__PURE__ */ s(mt, {}) }) : /* @__PURE__ */ s("span", { children:
|
|
2487
|
+
l ? /* @__PURE__ */ s("span", { children: /* @__PURE__ */ s(mt, {}) }) : /* @__PURE__ */ s("span", { children: T })
|
|
2485
2488
|
] }),
|
|
2486
2489
|
/* @__PURE__ */ O("div", { className: ie["rp-search-tool-input-checkboxes"], children: [
|
|
2487
|
-
/* @__PURE__ */ s(xt, { name: "matchCase", value: I, onChange:
|
|
2490
|
+
/* @__PURE__ */ s(xt, { name: "matchCase", value: I, onChange: S, children: "Match Case" }),
|
|
2488
2491
|
/* @__PURE__ */ s(xt, { name: "wholeWord", value: D, onChange: E, children: "Whole Word" })
|
|
2489
2492
|
] })
|
|
2490
2493
|
] }),
|
|
@@ -2502,15 +2505,15 @@ const ge = {
|
|
|
2502
2505
|
] })
|
|
2503
2506
|
}
|
|
2504
2507
|
) : null;
|
|
2505
|
-
},
|
|
2508
|
+
}, la = "_loading_1snj5_1", Ce = {
|
|
2506
2509
|
"rp-loading-overlay": "_rp-loading-overlay_1snj5_1",
|
|
2507
2510
|
"rp-loading-modal": "_rp-loading-modal_1snj5_14",
|
|
2508
2511
|
"rp-loading-title": "_rp-loading-title_1snj5_27",
|
|
2509
2512
|
"rp-loading-progress-bar": "_rp-loading-progress-bar_1snj5_35",
|
|
2510
2513
|
"rp-loading-progress": "_rp-loading-progress_1snj5_35",
|
|
2511
2514
|
"rp-loading-cancel-button": "_rp-loading-cancel-button_1snj5_52",
|
|
2512
|
-
loading:
|
|
2513
|
-
},
|
|
2515
|
+
loading: la
|
|
2516
|
+
}, ua = ({ percentage: e }) => {
|
|
2514
2517
|
const { cancel: t } = wt();
|
|
2515
2518
|
return e < 1 ? null : /* @__PURE__ */ s("div", { className: Q(Ce["rp-loading-overlay"]), children: /* @__PURE__ */ O("div", { className: Q(Ce["rp-loading-modal"]), children: [
|
|
2516
2519
|
/* @__PURE__ */ s("div", { className: Q(Ce["rp-loading-title"]), children: "Preparing document..." }),
|
|
@@ -2523,18 +2526,18 @@ const ge = {
|
|
|
2523
2526
|
) }),
|
|
2524
2527
|
/* @__PURE__ */ s("button", { className: Q(Ce["rp-loading-cancel-button"]), onClick: t, children: "Cancel" })
|
|
2525
2528
|
] }) });
|
|
2526
|
-
},
|
|
2529
|
+
}, da = $e((e, t) => {
|
|
2527
2530
|
const { showPrintProgress: n } = de(), { progress: r } = wt(), { isSmallScreen: o } = _e(), { percentage: a } = r || {}, c = () => o ? { gridTemplateColumns: "25% 60% 15%" } : void 0;
|
|
2528
2531
|
return /* @__PURE__ */ O("div", { children: [
|
|
2529
|
-
/* @__PURE__ */ s("div", { "data-rp": "topBar", ref: t, className:
|
|
2530
|
-
/* @__PURE__ */ O("div", { "data-rp": "topBarLeft", className:
|
|
2531
|
-
/* @__PURE__ */ s(
|
|
2532
|
+
/* @__PURE__ */ s("div", { "data-rp": "topBar", ref: t, className: Se["rp-toolbar-content"], children: /* @__PURE__ */ O("div", { className: Se["rp-toolbar-wrapper"], style: c(), children: [
|
|
2533
|
+
/* @__PURE__ */ O("div", { "data-rp": "topBarLeft", className: Se["rp-toolbar-start"], children: [
|
|
2534
|
+
/* @__PURE__ */ s(ca, {}),
|
|
2532
2535
|
/* @__PURE__ */ s(yo, {})
|
|
2533
2536
|
] }),
|
|
2534
|
-
/* @__PURE__ */ s("div", { "data-rp": "topBarCenter", className:
|
|
2535
|
-
/* @__PURE__ */ s("div", { "data-rp": "topBarRight", className:
|
|
2537
|
+
/* @__PURE__ */ s("div", { "data-rp": "topBarCenter", className: Se["rp-toolbar-middle"], children: /* @__PURE__ */ s(ia, {}) }),
|
|
2538
|
+
/* @__PURE__ */ s("div", { "data-rp": "topBarRight", className: Se["rp-toolbar-end"], children: /* @__PURE__ */ s(na, {}) })
|
|
2536
2539
|
] }) }),
|
|
2537
|
-
n && a ? /* @__PURE__ */ s(
|
|
2540
|
+
n && a ? /* @__PURE__ */ s(ua, { percentage: a }) : null
|
|
2538
2541
|
] });
|
|
2539
2542
|
}), ot = {
|
|
2540
2543
|
"rp-sidebar-content-wrapper": "_rp-sidebar-content-wrapper_4wlw3_1",
|
|
@@ -2547,11 +2550,11 @@ const ge = {
|
|
|
2547
2550
|
"rp-thumbnail": "_rp-thumbnail_3fenb_1",
|
|
2548
2551
|
"rp-thumbnail-active": "_rp-thumbnail-active_3fenb_22",
|
|
2549
2552
|
"rp-thumbnail-loader": "_rp-thumbnail-loader_3fenb_31"
|
|
2550
|
-
},
|
|
2553
|
+
}, pa = (e) => {
|
|
2551
2554
|
const { thumbnailSrc: t, pageNumber: n, isFocused: r, viewport: o } = e, { goToPage: a } = oe(), c = A(() => r ? Ie["rp-thumbnail-active"] : "", [r]), i = A(() => ({
|
|
2552
2555
|
width: Math.round(o.width),
|
|
2553
2556
|
height: Math.round(o.height)
|
|
2554
|
-
}), [o]), l =
|
|
2557
|
+
}), [o]), l = R(() => {
|
|
2555
2558
|
n && a(n);
|
|
2556
2559
|
}, [a, n]);
|
|
2557
2560
|
return /* @__PURE__ */ O(
|
|
@@ -2587,22 +2590,22 @@ const ge = {
|
|
|
2587
2590
|
}, qt = {
|
|
2588
2591
|
"rp-thumbnails-container": "_rp-thumbnails-container_16vqr_1",
|
|
2589
2592
|
"rp-thumbnails": "_rp-thumbnails_16vqr_1"
|
|
2590
|
-
},
|
|
2593
|
+
}, ha = 16, ma = (e, t) => {
|
|
2591
2594
|
const n = e == null ? void 0 : e.querySelector(`#page-${t}`);
|
|
2592
|
-
e && (n != null && n.offsetTop) && (e.scrollTop = (n == null ? void 0 : n.offsetTop) -
|
|
2593
|
-
},
|
|
2595
|
+
e && (n != null && n.offsetTop) && (e.scrollTop = (n == null ? void 0 : n.offsetTop) - ha);
|
|
2596
|
+
}, fa = $e((e, t) => {
|
|
2594
2597
|
const { show: n } = e, { focusedPage: r, totalPages: o } = oe(), { thumbnailPages: a, addPage: c, thumbnailLength: i, addToPage: l } = sn(), p = $(null), h = $(1);
|
|
2595
2598
|
Zt(t, () => p.current);
|
|
2596
|
-
const f = A(() => Object.values(a), [a]), u =
|
|
2599
|
+
const f = A(() => Object.values(a), [a]), u = R(() => {
|
|
2597
2600
|
const m = i + 1;
|
|
2598
2601
|
m <= o && c(m);
|
|
2599
2602
|
}, [c, o, i]);
|
|
2600
2603
|
return F(() => {
|
|
2601
|
-
r > i ? l(r) : n && h.current !== r && (
|
|
2604
|
+
r > i ? l(r) : n && h.current !== r && (ma(p.current, r), h.current = r);
|
|
2602
2605
|
}, [r, i, l, n, f]), Qn(p.current, u), /* @__PURE__ */ s("div", { ref: p, className: qt["rp-thumbnails-container"], children: /* @__PURE__ */ s("div", { className: qt["rp-thumbnails"], children: n ? f.map((m, g) => {
|
|
2603
2606
|
var _, v;
|
|
2604
2607
|
return /* @__PURE__ */ s(
|
|
2605
|
-
|
|
2608
|
+
pa,
|
|
2606
2609
|
{
|
|
2607
2610
|
isFocused: r === ((_ = m.page) == null ? void 0 : _.pageNumber),
|
|
2608
2611
|
pageNumber: (v = m.page) == null ? void 0 : v.pageNumber,
|
|
@@ -2613,13 +2616,13 @@ const ge = {
|
|
|
2613
2616
|
g
|
|
2614
2617
|
);
|
|
2615
2618
|
}) : null }) });
|
|
2616
|
-
}),
|
|
2619
|
+
}), ga = () => {
|
|
2617
2620
|
const { thumbnailIcon: e } = ce();
|
|
2618
2621
|
return e || /* @__PURE__ */ s(Yn, {});
|
|
2619
|
-
},
|
|
2620
|
-
const { active: e, setActive: t } = sn(), [n, r] = W(200), o = $(null), { thumbnailTool: a } = de(), c =
|
|
2622
|
+
}, va = () => {
|
|
2623
|
+
const { active: e, setActive: t } = sn(), [n, r] = W(200), o = $(null), { thumbnailTool: a } = de(), c = R(() => {
|
|
2621
2624
|
t((l) => !l);
|
|
2622
|
-
}, []), i = A(() => typeof a != "boolean" && a ? /* @__PURE__ */ s(a, { onClick: c, active: e }) : a ? /* @__PURE__ */ s(ee, { content: "Thumbnail", children: /* @__PURE__ */ s(X, { onClick: c, active: e, children: /* @__PURE__ */ s(
|
|
2625
|
+
}, []), i = A(() => typeof a != "boolean" && a ? /* @__PURE__ */ s(a, { onClick: c, active: e }) : a ? /* @__PURE__ */ s(ee, { content: "Thumbnail", children: /* @__PURE__ */ s(X, { onClick: c, active: e, children: /* @__PURE__ */ s(ga, {}) }) }) : null, [a, e, c]);
|
|
2623
2626
|
return /* @__PURE__ */ O(
|
|
2624
2627
|
"div",
|
|
2625
2628
|
{
|
|
@@ -2629,14 +2632,14 @@ const ge = {
|
|
|
2629
2632
|
children: [
|
|
2630
2633
|
/* @__PURE__ */ s("div", { className: ot["rp-sidebar-content"], children: i }),
|
|
2631
2634
|
/* @__PURE__ */ O("div", { "data-rp": "thumbnailSidebar", hidden: !e, className: ot["rp-thumbnails-wrapper"], children: [
|
|
2632
|
-
/* @__PURE__ */ s(
|
|
2635
|
+
/* @__PURE__ */ s(fa, { show: e, ref: o }),
|
|
2633
2636
|
/* @__PURE__ */ s(er, { onWidthChange: r, thumbnailRef: o })
|
|
2634
2637
|
] })
|
|
2635
2638
|
]
|
|
2636
2639
|
}
|
|
2637
2640
|
);
|
|
2638
|
-
},
|
|
2639
|
-
const { children: n, slots: r, icons: o, style: a, className: c, onLoaded: i, cleanupOnLoaded: l } = e, [p, h] = W(null), { setContainer: f, setContentRef: u } =
|
|
2641
|
+
}, Bs = $e((e, t) => {
|
|
2642
|
+
const { children: n, slots: r, icons: o, style: a, className: c, onLoaded: i, cleanupOnLoaded: l } = e, [p, h] = W(null), { setContainer: f, setContentRef: u } = Le();
|
|
2640
2643
|
return F(() => (i && i(), () => {
|
|
2641
2644
|
l && l();
|
|
2642
2645
|
}), [i, l]), /* @__PURE__ */ s("div", { ref: t, className: Q(we["rp-theme-variables"], we["rp-container"]), children: /* @__PURE__ */ s(tr, { slots: r, children: /* @__PURE__ */ s(nr, { icons: o, children: /* @__PURE__ */ s(
|
|
@@ -2648,9 +2651,9 @@ const ge = {
|
|
|
2648
2651
|
className: c,
|
|
2649
2652
|
children: /* @__PURE__ */ O(or, { children: [
|
|
2650
2653
|
/* @__PURE__ */ O("div", { className: we["rp-layout"], children: [
|
|
2651
|
-
/* @__PURE__ */ s(
|
|
2654
|
+
/* @__PURE__ */ s(da, { ref: h }),
|
|
2652
2655
|
/* @__PURE__ */ O("div", { className: we["rp-content"], children: [
|
|
2653
|
-
/* @__PURE__ */ s("div", { className: we["rp-sidebar"], children: /* @__PURE__ */ s(
|
|
2656
|
+
/* @__PURE__ */ s("div", { className: we["rp-sidebar"], children: /* @__PURE__ */ s(va, {}) }),
|
|
2654
2657
|
/* @__PURE__ */ s("div", { ref: u, className: we["rp-pages"], children: n })
|
|
2655
2658
|
] })
|
|
2656
2659
|
] }),
|
|
@@ -2661,23 +2664,23 @@ const ge = {
|
|
|
2661
2664
|
});
|
|
2662
2665
|
export {
|
|
2663
2666
|
Qr as A,
|
|
2664
|
-
|
|
2667
|
+
pa as B,
|
|
2665
2668
|
Ur as C,
|
|
2666
2669
|
bo as D,
|
|
2667
|
-
|
|
2670
|
+
fa as E,
|
|
2668
2671
|
En as F,
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2672
|
+
va as G,
|
|
2673
|
+
ua as L,
|
|
2674
|
+
ea as M,
|
|
2675
|
+
ta as O,
|
|
2676
|
+
$s as P,
|
|
2677
|
+
qs as R,
|
|
2678
|
+
Us as S,
|
|
2679
|
+
Vs as T,
|
|
2680
|
+
ia as Z,
|
|
2681
|
+
Gs as a,
|
|
2682
|
+
Bs as b,
|
|
2683
|
+
Zo as c,
|
|
2681
2684
|
wt as d,
|
|
2682
2685
|
ln as e,
|
|
2683
2686
|
nn as f,
|
|
@@ -2698,7 +2701,7 @@ export {
|
|
|
2698
2701
|
oe as u,
|
|
2699
2702
|
Go as v,
|
|
2700
2703
|
An as w,
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
+
na as x,
|
|
2705
|
+
ca as y,
|
|
2706
|
+
da as z
|
|
2704
2707
|
};
|