pdf-tsx 0.9.0 → 0.10.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/README.md +2 -0
- package/dist/cjs/components/PDFSidebar.cjs +1 -1
- package/dist/cjs/components/PDFSidebar.module.cjs +1 -1
- package/dist/cjs/components/PDFViewer.cjs +1 -1
- package/dist/cjs/components/PDFViewer.module.cjs +1 -1
- package/dist/cjs/components/features/PDFAnnotations.cjs +1 -1
- package/dist/cjs/components/features/PDFAnnotations.module.cjs +1 -1
- package/dist/cjs/components/features/PDFAttachments.cjs +1 -1
- package/dist/cjs/components/features/PDFAttachments.module.cjs +1 -1
- package/dist/cjs/components/features/PDFChangeFile.cjs +1 -1
- package/dist/cjs/components/features/PDFDownloadButton.cjs +1 -1
- package/dist/cjs/components/features/PDFNavigation.cjs +1 -1
- package/dist/cjs/components/features/PDFNavigation.module.cjs +1 -1
- package/dist/cjs/components/features/PDFOutline.cjs +1 -1
- package/dist/cjs/components/features/PDFOutline.module.cjs +1 -1
- package/dist/cjs/components/features/PDFPageFit.cjs +1 -1
- package/dist/cjs/components/features/PDFPrintButton.cjs +1 -1
- package/dist/cjs/components/features/PDFRotationControl.cjs +1 -1
- package/dist/cjs/components/features/PDFSearch.cjs +1 -1
- package/dist/cjs/components/features/PDFSearch.module.cjs +1 -1
- package/dist/cjs/components/features/PDFSidebarToggle.cjs +1 -1
- package/dist/cjs/components/features/PDFSignatures.cjs +1 -1
- package/dist/cjs/components/features/PDFSignatures.module.cjs +1 -1
- package/dist/cjs/components/features/PDFThemeToggle.cjs +1 -1
- package/dist/cjs/components/features/PDFThumbnails.cjs +1 -1
- package/dist/cjs/components/features/PDFThumbnails.module.cjs +1 -1
- package/dist/cjs/components/features/PDFZoomControls.cjs +1 -1
- package/dist/cjs/components/features/PDFZoomControls.module.cjs +1 -1
- package/dist/cjs/components/ui/PDFToolbar.cjs +1 -1
- package/dist/cjs/components/ui/PDFToolbar.module.cjs +1 -1
- package/dist/cjs/components/ui/PDFToolbarItem.cjs +1 -1
- package/dist/cjs/components/ui/ToolbarButton.cjs +1 -1
- package/dist/cjs/components/ui/ToolbarButton.module.cjs +1 -1
- package/dist/cjs/components/ui/icons.cjs +1 -1
- package/dist/cjs/context/ThemeContext.cjs +1 -1
- package/dist/cjs/hooks/useAnnotationLayer.cjs +1 -1
- package/dist/cjs/hooks/useKeyboardShortcuts.cjs +1 -1
- package/dist/cjs/hooks/useOutline.cjs +1 -1
- package/dist/cjs/hooks/useOverlayRects.cjs +1 -1
- package/dist/cjs/hooks/usePDFLoader.cjs +1 -1
- package/dist/cjs/hooks/useScrollTracking.cjs +1 -1
- package/dist/cjs/hooks/useTextLayer.cjs +1 -1
- package/dist/cjs/hooks/useTextSearch.cjs +1 -1
- package/dist/cjs/hooks/useThumbnails.cjs +1 -1
- package/dist/cjs/pdf-tsx.css +1 -1
- package/dist/components/features/PDFSearch.d.ts +1 -1
- package/dist/components/features/PDFSidebarToggle.d.ts +1 -1
- package/dist/components/features/PDFZoomControls.d.ts +1 -1
- package/dist/context/ThemeContext.d.ts +1 -1
- package/dist/es/components/PDFSidebar.js +25 -39
- package/dist/es/components/PDFSidebar.module.js +9 -9
- package/dist/es/components/PDFViewer.js +213 -253
- package/dist/es/components/PDFViewer.module.js +15 -15
- package/dist/es/components/features/PDFAnnotations.js +54 -62
- package/dist/es/components/features/PDFAnnotations.module.js +12 -12
- package/dist/es/components/features/PDFAttachments.js +52 -70
- package/dist/es/components/features/PDFAttachments.module.js +8 -8
- package/dist/es/components/features/PDFChangeFile.js +13 -24
- package/dist/es/components/features/PDFDownloadButton.js +10 -13
- package/dist/es/components/features/PDFNavigation.js +38 -59
- package/dist/es/components/features/PDFNavigation.module.js +3 -3
- package/dist/es/components/features/PDFOutline.js +66 -83
- package/dist/es/components/features/PDFOutline.module.js +5 -5
- package/dist/es/components/features/PDFPageFit.js +18 -23
- package/dist/es/components/features/PDFPrintButton.js +14 -17
- package/dist/es/components/features/PDFRotationControl.js +7 -13
- package/dist/es/components/features/PDFSearch.js +60 -69
- package/dist/es/components/features/PDFSearch.module.js +5 -5
- package/dist/es/components/features/PDFSidebarToggle.js +8 -13
- package/dist/es/components/features/PDFSignatures.js +116 -139
- package/dist/es/components/features/PDFSignatures.module.js +16 -16
- package/dist/es/components/features/PDFThemeToggle.js +10 -11
- package/dist/es/components/features/PDFThumbnails.js +25 -34
- package/dist/es/components/features/PDFThumbnails.module.js +9 -9
- package/dist/es/components/features/PDFZoomControls.js +21 -36
- package/dist/es/components/features/PDFZoomControls.module.js +1 -1
- package/dist/es/components/ui/PDFToolbar.js +53 -83
- package/dist/es/components/ui/PDFToolbar.module.js +9 -9
- package/dist/es/components/ui/PDFToolbarItem.js +10 -19
- package/dist/es/components/ui/ToolbarButton.js +8 -11
- package/dist/es/components/ui/ToolbarButton.module.js +2 -2
- package/dist/es/components/ui/icons.js +5 -16
- package/dist/es/context/ThemeContext.js +28 -38
- package/dist/es/hooks/useAnnotationLayer.js +33 -42
- package/dist/es/hooks/useKeyboardShortcuts.js +25 -34
- package/dist/es/hooks/useOutline.js +18 -23
- package/dist/es/hooks/useOverlayRects.js +42 -51
- package/dist/es/hooks/usePDFLoader.js +13 -16
- package/dist/es/hooks/useScrollTracking.js +24 -25
- package/dist/es/hooks/useTextLayer.js +34 -43
- package/dist/es/hooks/useTextSearch.js +31 -38
- package/dist/es/hooks/useThumbnails.js +33 -44
- package/dist/es/pdf-tsx.css +1 -1
- package/dist/hooks/useAttachments.d.ts +1 -1
- package/dist/hooks/useOutline.d.ts +1 -1
- package/dist/hooks/useOverlayRects.d.ts +1 -1
- package/dist/hooks/usePDFRenderer.d.ts +1 -1
- package/dist/hooks/useSignatures.d.ts +1 -1
- package/dist/hooks/useThumbnails.d.ts +1 -1
- package/dist/index.d.ts +3 -3
- package/package.json +3 -3
|
@@ -1,261 +1,221 @@
|
|
|
1
1
|
import { PDFViewerContext as e } from "../context/PDFViewerContext.js";
|
|
2
2
|
import { useScrollTracking as t } from "../hooks/useScrollTracking.js";
|
|
3
|
-
import { useKeyboardShortcuts as
|
|
4
|
-
import { useTextLayer as
|
|
5
|
-
import { isSafeUrl as
|
|
6
|
-
import { useAnnotationLayer as
|
|
7
|
-
import { usePDFLoader as
|
|
8
|
-
import { usePDFRenderer as
|
|
9
|
-
import { useOverlayRects as
|
|
10
|
-
import { computeFit as
|
|
11
|
-
import { ThemeProvider as
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import { Fragment as le, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
3
|
+
import { useKeyboardShortcuts as n } from "../hooks/useKeyboardShortcuts.js";
|
|
4
|
+
import { useTextLayer as r } from "../hooks/useTextLayer.js";
|
|
5
|
+
import { isSafeUrl as i } from "../utils/url.js";
|
|
6
|
+
import { useAnnotationLayer as a } from "../hooks/useAnnotationLayer.js";
|
|
7
|
+
import { usePDFLoader as ee } from "../hooks/usePDFLoader.js";
|
|
8
|
+
import { usePDFRenderer as te } from "../hooks/usePDFRenderer.js";
|
|
9
|
+
import { useOverlayRects as o } from "../hooks/useOverlayRects.js";
|
|
10
|
+
import { computeFit as s } from "../utils/pdfFit.js";
|
|
11
|
+
import { ThemeProvider as c } from "../context/ThemeContext.js";
|
|
12
|
+
import l from "./PDFViewer.module.js";
|
|
13
|
+
import { useCallback as u, useEffect as d, useMemo as f, useRef as p, useState as m } from "react";
|
|
14
|
+
import * as h from "pdfjs-dist";
|
|
15
|
+
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
17
16
|
//#region src/components/PDFViewer.tsx
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
!O || !f || !S.current || ae(f, O, S.current, Ae.current).then(g);
|
|
42
|
-
}, N = [O, f], u[12] = f, u[13] = O, u[14] = M, u[15] = N) : (M = u[14], N = u[15]), a(M, N);
|
|
43
|
-
let Ne = o(x), P, F;
|
|
44
|
-
u[16] === x ? (P = u[17], F = u[18]) : (P = () => {
|
|
45
|
-
Ne.current = x;
|
|
46
|
-
}, F = [x], u[16] = x, u[17] = P, u[18] = F), a(P, F);
|
|
47
|
-
let I, L;
|
|
48
|
-
u[19] === O ? (I = u[20], L = u[21]) : (I = () => {
|
|
49
|
-
if (!O || !S.current) return;
|
|
50
|
-
let e = S.current, t = new ResizeObserver(() => {
|
|
51
|
-
Ne.current && ae(Ne.current, O, e, Ae.current).then(g);
|
|
17
|
+
var y = 2, b = ({ file: b, workerSrc: x, sidebar: S, toolbar: C, onChangeFile: w, themeOverrides: ne, defaultTheme: re, defaultFit: T, className: E, style: ie }) => {
|
|
18
|
+
d(() => {
|
|
19
|
+
h.GlobalWorkerOptions.workerSrc = x;
|
|
20
|
+
}, [x]);
|
|
21
|
+
let [D, O] = m(1), [k, A] = m(0), [j, M] = m(null), [N, P] = m([]), [F, I] = m(!1), [L, R] = m(T ?? null), z = p(null), B = p([]), V = p([]), H = p(k);
|
|
22
|
+
d(() => {
|
|
23
|
+
H.current = k;
|
|
24
|
+
}, [k]);
|
|
25
|
+
let [U, W] = m(null);
|
|
26
|
+
U !== b && (W(b), M(null));
|
|
27
|
+
let { pdf: G, numPages: K } = ee(b);
|
|
28
|
+
d(() => {
|
|
29
|
+
G && (B.current = Array(G.numPages).fill(null), V.current = Array(G.numPages).fill(null));
|
|
30
|
+
}, [G]), d(() => {
|
|
31
|
+
!G || !T || !z.current || s(T, G, z.current, H.current).then(O);
|
|
32
|
+
}, [G, T]);
|
|
33
|
+
let q = p(L);
|
|
34
|
+
d(() => {
|
|
35
|
+
q.current = L;
|
|
36
|
+
}, [L]), d(() => {
|
|
37
|
+
if (!G || !z.current) return;
|
|
38
|
+
let e = z.current, t = new ResizeObserver(() => {
|
|
39
|
+
q.current && s(q.current, G, e, H.current).then(O);
|
|
52
40
|
});
|
|
53
41
|
return t.observe(e), () => t.disconnect();
|
|
54
|
-
},
|
|
55
|
-
let
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
pdf:
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
},
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
pdf:
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
42
|
+
}, [G]);
|
|
43
|
+
let { currentPage: J, goToPage: Y } = t({
|
|
44
|
+
numPages: K,
|
|
45
|
+
containerRef: z,
|
|
46
|
+
pageRefs: B
|
|
47
|
+
}), X = f(() => {
|
|
48
|
+
if (K === 0) return [];
|
|
49
|
+
let e = /* @__PURE__ */ new Set(), t = Math.max(J - y, 1), n = Math.min(J + y, K);
|
|
50
|
+
for (let r = t; r <= n; r++) e.add(r);
|
|
51
|
+
j && e.add(j.page);
|
|
52
|
+
for (let t of N) e.add(t.page);
|
|
53
|
+
return Array.from(e).sort((e, t) => e - t);
|
|
54
|
+
}, [
|
|
55
|
+
J,
|
|
56
|
+
K,
|
|
57
|
+
j,
|
|
58
|
+
N
|
|
59
|
+
]), { pageSizes: ae, renderedPages: Z } = te({
|
|
60
|
+
pdf: G,
|
|
61
|
+
zoom: D,
|
|
62
|
+
rotation: k,
|
|
63
|
+
visiblePages: X,
|
|
64
|
+
canvasRefs: V
|
|
65
|
+
}), Q = f(() => {
|
|
66
|
+
let e = new Set(X);
|
|
67
|
+
for (let t of Z) e.add(t);
|
|
68
|
+
return Array.from(e).sort((e, t) => e - t);
|
|
69
|
+
}, [X, Z]);
|
|
70
|
+
n({
|
|
71
|
+
pdf: G,
|
|
72
|
+
currentPage: J,
|
|
73
|
+
goToPage: Y,
|
|
74
|
+
setZoom: O,
|
|
75
|
+
setRotation: A,
|
|
76
|
+
setFitMode: R
|
|
77
|
+
});
|
|
78
|
+
let oe = r({
|
|
79
|
+
pdf: G,
|
|
80
|
+
zoom: D,
|
|
81
|
+
rotation: k,
|
|
82
|
+
mountedPages: Q,
|
|
83
|
+
canvasRefs: V
|
|
84
|
+
}), se = a({
|
|
85
|
+
pdf: G,
|
|
86
|
+
zoom: D,
|
|
87
|
+
rotation: k,
|
|
88
|
+
mountedPages: Q,
|
|
89
|
+
goToPage: Y
|
|
90
|
+
}), { overlayRect: $, searchOverlays: ce } = o({
|
|
91
|
+
pdf: G,
|
|
92
|
+
highlight: j,
|
|
93
|
+
searchMatches: N,
|
|
94
|
+
zoom: D,
|
|
95
|
+
rotation: k
|
|
96
|
+
}), le = u((e, t) => {
|
|
97
|
+
(!e.url || !i(e.url)) && (t.preventDefault(), e.url || e._handleClick());
|
|
98
|
+
}, []), ue = f(() => ({
|
|
99
|
+
pdf: G,
|
|
100
|
+
numPages: K,
|
|
101
|
+
zoom: D,
|
|
102
|
+
setZoom: O,
|
|
103
|
+
rotation: k,
|
|
104
|
+
setRotation: A,
|
|
105
|
+
currentPage: J,
|
|
106
|
+
goToPage: Y,
|
|
107
|
+
containerRef: z,
|
|
108
|
+
canvasRefs: V,
|
|
109
|
+
file: b,
|
|
110
|
+
highlight: j,
|
|
111
|
+
setHighlight: M,
|
|
112
|
+
searchMatches: N,
|
|
113
|
+
setSearchMatches: P,
|
|
114
|
+
onChangeFile: w,
|
|
115
|
+
sidebarCollapsed: F,
|
|
116
|
+
setSidebarCollapsed: I,
|
|
117
|
+
fitMode: L,
|
|
118
|
+
setFitMode: R
|
|
119
|
+
}), [
|
|
120
|
+
G,
|
|
121
|
+
K,
|
|
122
|
+
D,
|
|
123
|
+
k,
|
|
124
|
+
J,
|
|
125
|
+
Y,
|
|
126
|
+
b,
|
|
127
|
+
j,
|
|
128
|
+
N,
|
|
129
|
+
w,
|
|
130
|
+
F,
|
|
131
|
+
L
|
|
132
|
+
]);
|
|
133
|
+
return /* @__PURE__ */ _(c, {
|
|
134
|
+
themeOverrides: ne,
|
|
135
|
+
defaultTheme: re,
|
|
136
|
+
children: /* @__PURE__ */ _(e.Provider, {
|
|
137
|
+
value: ue,
|
|
138
|
+
children: /* @__PURE__ */ v("div", {
|
|
139
|
+
className: `${l.appLayout}${E ? ` ${E}` : ""}`,
|
|
140
|
+
style: ie,
|
|
141
|
+
children: [C && /* @__PURE__ */ _("div", {
|
|
142
|
+
className: l.toolbar,
|
|
143
|
+
children: C
|
|
144
|
+
}), /* @__PURE__ */ v("div", {
|
|
145
|
+
className: l.body,
|
|
146
|
+
children: [S, /* @__PURE__ */ _("div", {
|
|
147
|
+
className: l.scrollContainer,
|
|
148
|
+
ref: z,
|
|
149
|
+
children: Array.from({ length: K }, (e, t) => {
|
|
150
|
+
let n = Z.has(t + 1), r = ae[t], a = Q.includes(t + 1);
|
|
151
|
+
return /* @__PURE__ */ v("div", {
|
|
152
|
+
className: l.pageWrapper,
|
|
153
|
+
ref: (e) => {
|
|
154
|
+
B.current[t] = e;
|
|
155
|
+
},
|
|
156
|
+
style: r ? {
|
|
157
|
+
width: r.width,
|
|
158
|
+
height: r.height
|
|
159
|
+
} : void 0,
|
|
160
|
+
children: [
|
|
161
|
+
r && !n && /* @__PURE__ */ _("div", {
|
|
162
|
+
className: l.pageSkeleton,
|
|
163
|
+
style: {
|
|
164
|
+
width: r.width,
|
|
165
|
+
height: r.height
|
|
166
|
+
}
|
|
167
|
+
}),
|
|
168
|
+
a && /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("canvas", {
|
|
169
|
+
className: l.pageCanvas,
|
|
170
|
+
ref: (e) => {
|
|
171
|
+
V.current[t] = e;
|
|
172
|
+
},
|
|
173
|
+
style: { display: n ? "block" : "none" }
|
|
174
|
+
}), /* @__PURE__ */ _("div", {
|
|
175
|
+
className: `textLayer ${l.textLayer}`,
|
|
176
|
+
ref: (e) => {
|
|
177
|
+
oe.current[t] = e;
|
|
178
|
+
}
|
|
179
|
+
})] }),
|
|
180
|
+
se.filter((e) => e.page === t + 1).map((e, t) => /* @__PURE__ */ _("a", {
|
|
181
|
+
className: l.linkOverlay,
|
|
182
|
+
href: e.url && i(e.url) ? e.url : "#",
|
|
183
|
+
target: "_blank",
|
|
184
|
+
rel: "noopener noreferrer",
|
|
185
|
+
style: {
|
|
186
|
+
left: e.x,
|
|
187
|
+
top: e.y,
|
|
188
|
+
width: e.width,
|
|
189
|
+
height: e.height
|
|
190
|
+
},
|
|
191
|
+
onClick: (t) => le(e, t)
|
|
192
|
+
}, t)),
|
|
193
|
+
ce.filter((e) => e.page === t + 1).map((e, t) => /* @__PURE__ */ _("div", {
|
|
194
|
+
className: l.searchMatchOverlay,
|
|
195
|
+
style: {
|
|
196
|
+
left: e.x,
|
|
197
|
+
top: e.y,
|
|
198
|
+
width: e.width,
|
|
199
|
+
height: e.height
|
|
200
|
+
}
|
|
201
|
+
}, t)),
|
|
202
|
+
j && $?.page === t + 1 && /* @__PURE__ */ _("div", {
|
|
203
|
+
className: l.highlightOverlay,
|
|
204
|
+
style: {
|
|
205
|
+
left: $.x,
|
|
206
|
+
top: $.y,
|
|
207
|
+
width: $.width,
|
|
208
|
+
height: $.height
|
|
209
|
+
}
|
|
210
|
+
})
|
|
211
|
+
]
|
|
212
|
+
}, `${t}-${k}`);
|
|
213
|
+
})
|
|
214
|
+
})]
|
|
215
|
+
})]
|
|
216
|
+
})
|
|
201
217
|
})
|
|
202
|
-
})
|
|
203
|
-
let X;
|
|
204
|
-
u[85] !== ge || u[86] !== Y ? (X = /* @__PURE__ */ l("div", {
|
|
205
|
-
className: i.body,
|
|
206
|
-
children: [ge, Y]
|
|
207
|
-
}), u[85] = ge, u[86] = Y, u[87] = X) : X = u[87];
|
|
208
|
-
let Z;
|
|
209
|
-
u[88] !== Se || u[89] !== Ue || u[90] !== J || u[91] !== X ? (Z = /* @__PURE__ */ l("div", {
|
|
210
|
-
className: Ue,
|
|
211
|
-
style: Se,
|
|
212
|
-
children: [J, X]
|
|
213
|
-
}), u[88] = Se, u[89] = Ue, u[90] = J, u[91] = X, u[92] = Z) : Z = u[92];
|
|
214
|
-
let Q;
|
|
215
|
-
u[93] !== q || u[94] !== Z ? (Q = /* @__PURE__ */ c(e.Provider, {
|
|
216
|
-
value: q,
|
|
217
|
-
children: Z
|
|
218
|
-
}), u[93] = q, u[94] = Z, u[95] = Q) : Q = u[95];
|
|
219
|
-
let $;
|
|
220
|
-
return u[96] !== be || u[97] !== Q || u[98] !== ye ? ($ = /* @__PURE__ */ c(oe, {
|
|
221
|
-
themeOverrides: ye,
|
|
222
|
-
defaultTheme: be,
|
|
223
|
-
children: Q
|
|
224
|
-
}), u[96] = be, u[97] = Q, u[98] = ye, u[99] = $) : $ = u[99], $;
|
|
218
|
+
});
|
|
225
219
|
};
|
|
226
|
-
function de(e, t) {
|
|
227
|
-
return e - t;
|
|
228
|
-
}
|
|
229
|
-
function fe(e, t) {
|
|
230
|
-
return e - t;
|
|
231
|
-
}
|
|
232
|
-
function pe(e, t) {
|
|
233
|
-
return /* @__PURE__ */ c("a", {
|
|
234
|
-
className: i.linkOverlay,
|
|
235
|
-
href: e.url && r(e.url) ? e.url : "#",
|
|
236
|
-
target: "_blank",
|
|
237
|
-
rel: "noopener noreferrer",
|
|
238
|
-
style: {
|
|
239
|
-
left: e.x,
|
|
240
|
-
top: e.y,
|
|
241
|
-
width: e.width,
|
|
242
|
-
height: e.height
|
|
243
|
-
},
|
|
244
|
-
onClick: (t) => {
|
|
245
|
-
(!e.url || !r(e.url)) && (t.preventDefault(), e.url || e._handleClick());
|
|
246
|
-
}
|
|
247
|
-
}, t);
|
|
248
|
-
}
|
|
249
|
-
function me(e, t) {
|
|
250
|
-
return /* @__PURE__ */ c("div", {
|
|
251
|
-
className: i.searchMatchOverlay,
|
|
252
|
-
style: {
|
|
253
|
-
left: e.x,
|
|
254
|
-
top: e.y,
|
|
255
|
-
width: e.width,
|
|
256
|
-
height: e.height
|
|
257
|
-
}
|
|
258
|
-
}, t);
|
|
259
|
-
}
|
|
260
220
|
//#endregion
|
|
261
|
-
export {
|
|
221
|
+
export { b as default };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
var e = {
|
|
2
|
-
appLayout: "
|
|
3
|
-
body: "
|
|
4
|
-
toolbar: "
|
|
5
|
-
scrollContainer: "
|
|
6
|
-
pageWrapper: "
|
|
7
|
-
pageCanvas: "
|
|
8
|
-
textLayer: "
|
|
9
|
-
markedContent: "
|
|
10
|
-
endOfContent: "
|
|
11
|
-
selecting: "
|
|
12
|
-
pageSkeleton: "
|
|
13
|
-
spin: "
|
|
14
|
-
highlightOverlay: "
|
|
15
|
-
linkOverlay: "
|
|
16
|
-
searchMatchOverlay: "
|
|
2
|
+
appLayout: "_appLayout_1nhg3_1",
|
|
3
|
+
body: "_body_1nhg3_9",
|
|
4
|
+
toolbar: "_toolbar_1nhg3_17",
|
|
5
|
+
scrollContainer: "_scrollContainer_1nhg3_29",
|
|
6
|
+
pageWrapper: "_pageWrapper_1nhg3_39",
|
|
7
|
+
pageCanvas: "_pageCanvas_1nhg3_44",
|
|
8
|
+
textLayer: "_textLayer_1nhg3_53",
|
|
9
|
+
markedContent: "_markedContent_1nhg3_79",
|
|
10
|
+
endOfContent: "_endOfContent_1nhg3_94",
|
|
11
|
+
selecting: "_selecting_1nhg3_103",
|
|
12
|
+
pageSkeleton: "_pageSkeleton_1nhg3_123",
|
|
13
|
+
spin: "_spin_1nhg3_1",
|
|
14
|
+
highlightOverlay: "_highlightOverlay_1nhg3_152",
|
|
15
|
+
linkOverlay: "_linkOverlay_1nhg3_161",
|
|
16
|
+
searchMatchOverlay: "_searchMatchOverlay_1nhg3_168"
|
|
17
17
|
};
|
|
18
18
|
//#endregion
|
|
19
19
|
export { e as default };
|