@prose-reader/react-reader 1.234.0 → 1.235.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gallery/GalleryDialog.d.ts +1 -1
- package/dist/help/HelpDialog.d.ts +1 -1
- package/dist/index.js +481 -512
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/dist/search/SearchDialogContent.d.ts +1 -1
- package/dist/toc/TableOfContentsDialogContent.d.ts +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,117 +1,116 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
1
|
+
import { jsx as n, jsxs as s, Fragment as oe } from "react/jsx-runtime";
|
|
2
2
|
import * as E from "react";
|
|
3
|
-
import Me, { createContext as Le, memo as
|
|
4
|
-
import { signal as ce, useSignalState as
|
|
5
|
-
import { Subject as de, tap as ue, map as
|
|
6
|
-
import { IconButton as
|
|
7
|
-
import { LuX as Xe, LuNotebookPen as
|
|
8
|
-
import { createPortal as
|
|
9
|
-
import { isPositionInArea as
|
|
10
|
-
import { isShallowEqual as
|
|
11
|
-
import { BsBookmarks as
|
|
12
|
-
import { RiGalleryView2 as
|
|
13
|
-
import { RxDoubleArrowUp as
|
|
14
|
-
import { HiOutlineInformationCircle as
|
|
15
|
-
import
|
|
3
|
+
import Me, { createContext as Le, memo as m, useMemo as Ie, useEffect as F, useContext as $e, useState as k, useLayoutEffect as _e, useCallback as N } from "react";
|
|
4
|
+
import { signal as ce, useSignalState as ke, useConstant as Se, useLiveRef as Ne, useSubscribe as D, useObserve as f, isDefined as ye, useSignalValue as He } from "reactjrx";
|
|
5
|
+
import { Subject as de, tap as ue, map as z, filter as J, switchMap as A, EMPTY as se, of as ee, withLatestFrom as We, NEVER as re, startWith as Fe, distinctUntilChanged as he, throttleTime as je, first as Te, combineLatest as Ve, finalize as we, mergeMap as Ge, skip as Re, merge as Pe, timer as Ae, BehaviorSubject as Ye } from "rxjs";
|
|
6
|
+
import { IconButton as v, Portal as ge, Dialog as I, List as y, Link as pe, Stack as T, Text as g, Tabs as P, Button as j, Presence as ne, Box as R, createToaster as Ue, Toaster as qe, Toast as M, Spinner as Qe, Heading as xe, HStack as O, Kbd as ve, Popover as L, Progress as H, chakra as Ke, Collapsible as ae, Input as Ze } from "@chakra-ui/react";
|
|
7
|
+
import { LuX as Xe, LuNotebookPen as te, LuBookmark as Je, LuArrowBigRight as en, LuArrowBigLeft as nn, LuChevronDown as tn, LuCircleHelp as on, LuTableOfContents as rn, LuSearch as an, LuGalleryHorizontal as sn, LuCircleCheck as Ce } from "react-icons/lu";
|
|
8
|
+
import { createPortal as ln } from "react-dom";
|
|
9
|
+
import { isPositionInArea as cn } from "@prose-reader/enhancer-gestures";
|
|
10
|
+
import { isShallowEqual as dn, observeIntersection as un, isHtmlTagElement as hn } from "@prose-reader/core";
|
|
11
|
+
import { BsBookmarks as gn } from "react-icons/bs";
|
|
12
|
+
import { RiGalleryView2 as pn } from "react-icons/ri";
|
|
13
|
+
import { RxDoubleArrowUp as mn, RxDoubleArrowLeft as fn, RxDoubleArrowDown as bn, RxDoubleArrowRight as xn } from "react-icons/rx";
|
|
14
|
+
import { HiOutlineInformationCircle as vn } from "react-icons/hi";
|
|
15
|
+
import Cn from "rc-slider";
|
|
16
16
|
import "rc-slider/assets/index.css";
|
|
17
|
-
import { IoIosArrowBack as
|
|
18
|
-
import { MdFullscreenExit as
|
|
17
|
+
import { IoIosArrowBack as In, IoMdMore as kn } from "react-icons/io";
|
|
18
|
+
import { MdFullscreenExit as Sn, MdFullscreen as yn } from "react-icons/md";
|
|
19
19
|
const Oe = Le({
|
|
20
20
|
reader: void 0,
|
|
21
21
|
quickMenuSignal: ce({ default: !1 }),
|
|
22
22
|
notificationsSubject: new de()
|
|
23
|
-
}),
|
|
23
|
+
}), Ft = m(
|
|
24
24
|
({
|
|
25
25
|
children: e,
|
|
26
26
|
reader: t,
|
|
27
27
|
quickMenuOpen: o,
|
|
28
28
|
onQuickMenuOpenChange: i
|
|
29
29
|
}) => {
|
|
30
|
-
const [, r] =
|
|
30
|
+
const [, r] = ke(
|
|
31
31
|
() => ce({
|
|
32
32
|
default: o
|
|
33
33
|
})
|
|
34
|
-
),
|
|
34
|
+
), a = Se(
|
|
35
35
|
() => new de()
|
|
36
|
-
),
|
|
36
|
+
), l = Ne(i), c = Ie(
|
|
37
37
|
() => ({
|
|
38
38
|
quickMenuSignal: r,
|
|
39
39
|
reader: t,
|
|
40
|
-
notificationsSubject:
|
|
40
|
+
notificationsSubject: a
|
|
41
41
|
}),
|
|
42
|
-
[r, t,
|
|
42
|
+
[r, t, a]
|
|
43
43
|
);
|
|
44
|
-
return
|
|
44
|
+
return F(() => {
|
|
45
45
|
r.setValue(o);
|
|
46
|
-
}, [o, r]),
|
|
47
|
-
() => r.pipe(ue(
|
|
48
|
-
[r,
|
|
49
|
-
), /* @__PURE__ */ n(Oe.Provider, { value:
|
|
46
|
+
}, [o, r]), D(
|
|
47
|
+
() => r.pipe(ue(l.current)),
|
|
48
|
+
[r, l]
|
|
49
|
+
), /* @__PURE__ */ n(Oe.Provider, { value: c, children: e });
|
|
50
50
|
}
|
|
51
|
-
),
|
|
52
|
-
return /* @__PURE__ */ n(
|
|
51
|
+
), Tn = E.forwardRef(function(t, o) {
|
|
52
|
+
return /* @__PURE__ */ n(v, { variant: "ghost", "aria-label": "Close", ref: o, ...t, children: t.children ?? /* @__PURE__ */ n(Xe, {}) });
|
|
53
53
|
}), V = E.forwardRef(function(t, o) {
|
|
54
54
|
const {
|
|
55
55
|
children: i,
|
|
56
56
|
portalled: r = !0,
|
|
57
|
-
portalRef:
|
|
58
|
-
backdrop:
|
|
59
|
-
...
|
|
57
|
+
portalRef: a,
|
|
58
|
+
backdrop: l = !0,
|
|
59
|
+
...c
|
|
60
60
|
} = t;
|
|
61
|
-
return /* @__PURE__ */
|
|
62
|
-
|
|
63
|
-
/* @__PURE__ */ n(
|
|
61
|
+
return /* @__PURE__ */ s(ge, { disabled: !r, container: a, children: [
|
|
62
|
+
l && /* @__PURE__ */ n(I.Backdrop, {}),
|
|
63
|
+
/* @__PURE__ */ n(I.Positioner, { children: /* @__PURE__ */ n(I.Content, { ref: o, ...c, asChild: !1, children: i }) })
|
|
64
64
|
] });
|
|
65
65
|
}), G = E.forwardRef(function(t, o) {
|
|
66
66
|
return /* @__PURE__ */ n(
|
|
67
|
-
|
|
67
|
+
I.CloseTrigger,
|
|
68
68
|
{
|
|
69
69
|
position: "absolute",
|
|
70
70
|
top: "2",
|
|
71
71
|
insetEnd: "2",
|
|
72
72
|
...t,
|
|
73
73
|
asChild: !0,
|
|
74
|
-
children: /* @__PURE__ */ n(
|
|
74
|
+
children: /* @__PURE__ */ n(Tn, { size: "sm", ref: o, children: t.children })
|
|
75
75
|
}
|
|
76
76
|
);
|
|
77
|
-
}), Y =
|
|
78
|
-
|
|
79
|
-
const K =
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
const Z =
|
|
77
|
+
}), Y = I.Root, U = I.Footer, q = I.Header, Q = I.Body;
|
|
78
|
+
I.Backdrop;
|
|
79
|
+
const K = I.Title;
|
|
80
|
+
I.Description;
|
|
81
|
+
I.Trigger;
|
|
82
|
+
const Z = I.ActionTrigger, X = () => $e(Oe), p = () => {
|
|
83
83
|
const { reader: e } = X();
|
|
84
84
|
return e;
|
|
85
|
-
},
|
|
86
|
-
const t = p(), o =
|
|
87
|
-
return { data:
|
|
88
|
-
() => o
|
|
89
|
-
|
|
90
|
-
J(
|
|
91
|
-
|
|
85
|
+
}, Ee = (e) => !!e && "__PROSE_READER_ENHANCER_SEARCH" in e, W = (e) => !!e && "__PROSE_READER_ENHANCER_ANNOTATIONS" in e, De = (e) => !!e && "__PROSE_READER_ENHANCER_GALLERY" in e, wn = (e) => {
|
|
86
|
+
const t = p(), o = W(t) ? t : void 0;
|
|
87
|
+
return { data: f(
|
|
88
|
+
() => o?.annotations.annotations$.pipe(
|
|
89
|
+
z((r) => r.find((a) => a.id === e)),
|
|
90
|
+
J(ye),
|
|
91
|
+
A((r) => o.locateResource(r))
|
|
92
92
|
),
|
|
93
93
|
[o]
|
|
94
94
|
) };
|
|
95
|
-
},
|
|
95
|
+
}, ze = ({
|
|
96
96
|
id: e,
|
|
97
97
|
onNavigate: t,
|
|
98
98
|
allowLeftIcon: o = !0
|
|
99
99
|
}) => {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
return /* @__PURE__ */ n(w.Item, { children: /* @__PURE__ */ c(
|
|
100
|
+
const i = p(), { data: r } = wn(e), a = r?.meta.range?.toString() || r?.meta.node?.textContent;
|
|
101
|
+
return /* @__PURE__ */ n(y.Item, { children: /* @__PURE__ */ s(
|
|
103
102
|
pe,
|
|
104
103
|
{
|
|
105
104
|
href: "#",
|
|
106
105
|
onClick: () => {
|
|
107
|
-
t(), i
|
|
106
|
+
t(), i?.navigation.goToCfi(r?.meta.cfi ?? "");
|
|
108
107
|
},
|
|
109
108
|
children: [
|
|
110
|
-
|
|
111
|
-
/* @__PURE__ */
|
|
112
|
-
|
|
109
|
+
r?.resource?.notes ? /* @__PURE__ */ n(y.Indicator, { asChild: !0, children: /* @__PURE__ */ n(te, {}) }) : o ? /* @__PURE__ */ n(y.Indicator, { asChild: !0, visibility: "hidden", children: /* @__PURE__ */ n(te, {}) }) : null,
|
|
110
|
+
/* @__PURE__ */ s(T, { gap: 0, children: [
|
|
111
|
+
a ? /* @__PURE__ */ n(g, { lineClamp: 2, fontSize: "md", children: a }) : /* @__PURE__ */ s(g, { lineClamp: 2, fontSize: "md", fontStyle: "italic", children: [
|
|
113
112
|
"Page ",
|
|
114
|
-
(
|
|
113
|
+
(r?.meta.absolutePageIndex ?? 0) + 1
|
|
115
114
|
] }),
|
|
116
115
|
/* @__PURE__ */ n(
|
|
117
116
|
g,
|
|
@@ -119,7 +118,7 @@ const Z = y.ActionTrigger, X = () => $e(Oe), p = () => {
|
|
|
119
118
|
fontStyle: "italic",
|
|
120
119
|
fontWeight: "bold",
|
|
121
120
|
fontSize: "sm",
|
|
122
|
-
children: `Book page: ${
|
|
121
|
+
children: `Book page: ${r?.meta?.absolutePageIndex !== void 0 ? r.meta.absolutePageIndex + 1 : "unknown (not loaded)"}`
|
|
123
122
|
}
|
|
124
123
|
)
|
|
125
124
|
] })
|
|
@@ -127,41 +126,41 @@ const Z = y.ActionTrigger, X = () => $e(Oe), p = () => {
|
|
|
127
126
|
}
|
|
128
127
|
) });
|
|
129
128
|
}, ie = () => {
|
|
130
|
-
const e = p(), t =
|
|
131
|
-
return { data:
|
|
132
|
-
() => t
|
|
133
|
-
|
|
129
|
+
const e = p(), t = W(e) ? e : void 0;
|
|
130
|
+
return { data: f(
|
|
131
|
+
() => t?.annotations.annotations$.pipe(
|
|
132
|
+
A(
|
|
134
133
|
(i) => t.locateResource(i)
|
|
135
134
|
)
|
|
136
135
|
),
|
|
137
136
|
[t]
|
|
138
137
|
) };
|
|
139
|
-
},
|
|
138
|
+
}, Rn = () => {
|
|
140
139
|
const { data: e } = ie();
|
|
141
140
|
return {
|
|
142
|
-
data: e
|
|
141
|
+
data: e?.filter((t) => t.meta.isCfiRange)
|
|
143
142
|
};
|
|
144
|
-
},
|
|
145
|
-
const { data: t } =
|
|
146
|
-
return /* @__PURE__ */ n(
|
|
147
|
-
|
|
143
|
+
}, Pn = ({ onNavigate: e }) => {
|
|
144
|
+
const { data: t } = Rn();
|
|
145
|
+
return /* @__PURE__ */ n(y.Root, { overflowY: "auto", gap: 3, pt: 4, variant: "plain", children: t?.map((o) => /* @__PURE__ */ n(
|
|
146
|
+
ze,
|
|
148
147
|
{
|
|
149
148
|
id: o.resource.id,
|
|
150
149
|
onNavigate: e
|
|
151
150
|
},
|
|
152
151
|
o.resource.id
|
|
153
152
|
)) });
|
|
154
|
-
},
|
|
153
|
+
}, An = () => {
|
|
155
154
|
const { data: e } = ie();
|
|
156
155
|
return {
|
|
157
|
-
data: e
|
|
156
|
+
data: e?.filter(
|
|
158
157
|
(t) => !t.meta.isCfiRange && !t.resource.notes
|
|
159
158
|
)
|
|
160
159
|
};
|
|
161
|
-
},
|
|
162
|
-
const { data: t } =
|
|
163
|
-
return /* @__PURE__ */ n(
|
|
164
|
-
|
|
160
|
+
}, On = ({ onNavigate: e }) => {
|
|
161
|
+
const { data: t } = An();
|
|
162
|
+
return /* @__PURE__ */ n(y.Root, { overflowY: "auto", gap: 3, pt: 4, variant: "plain", children: t?.map((o) => /* @__PURE__ */ n(
|
|
163
|
+
ze,
|
|
165
164
|
{
|
|
166
165
|
id: o.resource.id,
|
|
167
166
|
onNavigate: e,
|
|
@@ -169,36 +168,36 @@ const Z = y.ActionTrigger, X = () => $e(Oe), p = () => {
|
|
|
169
168
|
},
|
|
170
169
|
o.resource.id
|
|
171
170
|
)) });
|
|
172
|
-
},
|
|
171
|
+
}, En = m(
|
|
173
172
|
({
|
|
174
173
|
onNavigate: e,
|
|
175
174
|
defaultTab: t
|
|
176
175
|
}) => {
|
|
177
|
-
const [o, i] =
|
|
178
|
-
return /* @__PURE__ */
|
|
179
|
-
|
|
176
|
+
const [o, i] = k(t ?? "bookmarks");
|
|
177
|
+
return /* @__PURE__ */ s(
|
|
178
|
+
P.Root,
|
|
180
179
|
{
|
|
181
180
|
value: o,
|
|
182
181
|
onValueChange: (r) => i(r.value),
|
|
183
182
|
children: [
|
|
184
|
-
/* @__PURE__ */
|
|
185
|
-
/* @__PURE__ */
|
|
183
|
+
/* @__PURE__ */ s(P.List, { children: [
|
|
184
|
+
/* @__PURE__ */ s(P.Trigger, { value: "bookmarks", children: [
|
|
186
185
|
/* @__PURE__ */ n(Je, {}),
|
|
187
186
|
"Bookmarks"
|
|
188
187
|
] }),
|
|
189
|
-
/* @__PURE__ */
|
|
190
|
-
/* @__PURE__ */ n(
|
|
188
|
+
/* @__PURE__ */ s(P.Trigger, { value: "annotations", children: [
|
|
189
|
+
/* @__PURE__ */ n(te, {}),
|
|
191
190
|
"Annotations"
|
|
192
191
|
] }),
|
|
193
|
-
/* @__PURE__ */ n(
|
|
192
|
+
/* @__PURE__ */ n(P.Indicator, {})
|
|
194
193
|
] }),
|
|
195
|
-
/* @__PURE__ */ n(
|
|
196
|
-
/* @__PURE__ */ n(
|
|
194
|
+
/* @__PURE__ */ n(P.Content, { value: "bookmarks", children: /* @__PURE__ */ n(On, { onNavigate: e }) }),
|
|
195
|
+
/* @__PURE__ */ n(P.Content, { value: "annotations", children: /* @__PURE__ */ n(Pn, { onNavigate: e }) })
|
|
197
196
|
]
|
|
198
197
|
}
|
|
199
198
|
);
|
|
200
199
|
}
|
|
201
|
-
),
|
|
200
|
+
), Dn = m(
|
|
202
201
|
({
|
|
203
202
|
openWith: e,
|
|
204
203
|
setOpen: t,
|
|
@@ -212,10 +211,10 @@ const Z = y.ActionTrigger, X = () => $e(Oe), p = () => {
|
|
|
212
211
|
onOpenChange: (i) => t(i.open),
|
|
213
212
|
size: { mdDown: "full", md: "lg" },
|
|
214
213
|
scrollBehavior: "inside",
|
|
215
|
-
children: /* @__PURE__ */
|
|
214
|
+
children: /* @__PURE__ */ s(V, { height: "100%", children: [
|
|
216
215
|
/* @__PURE__ */ n(q, { children: /* @__PURE__ */ n(K, { children: "Annotations" }) }),
|
|
217
216
|
/* @__PURE__ */ n(Q, { flex: 1, children: /* @__PURE__ */ n(
|
|
218
|
-
|
|
217
|
+
En,
|
|
219
218
|
{
|
|
220
219
|
onNavigate: o,
|
|
221
220
|
defaultTab: e
|
|
@@ -226,63 +225,60 @@ const Z = y.ActionTrigger, X = () => $e(Oe), p = () => {
|
|
|
226
225
|
] })
|
|
227
226
|
}
|
|
228
227
|
)
|
|
229
|
-
),
|
|
230
|
-
const t = p(), o =
|
|
231
|
-
return o ? /* @__PURE__ */ n(oe, { children:
|
|
232
|
-
}),
|
|
228
|
+
), zn = m(({ children: e }) => {
|
|
229
|
+
const t = p(), o = f(() => t?.spine.element$, [t]);
|
|
230
|
+
return o ? /* @__PURE__ */ n(oe, { children: ln(e, o) }) : null;
|
|
231
|
+
}), Bn = ({
|
|
233
232
|
absolutePageIndex: e,
|
|
234
233
|
itemIndex: t
|
|
235
234
|
}) => {
|
|
236
235
|
const o = p();
|
|
237
236
|
return {
|
|
238
|
-
spineItem:
|
|
239
|
-
|
|
240
|
-
) :
|
|
237
|
+
spineItem: f(() => o ? t !== void 0 ? ee(o.spine.spineItemsManager.get(t)) : e !== void 0 ? o.spine.pages.observeFromAbsolutePageIndex(e).pipe(
|
|
238
|
+
z((r) => o.spine.spineItemsManager.get(r?.itemIndex))
|
|
239
|
+
) : se : se, [t, e, o])
|
|
241
240
|
};
|
|
242
|
-
},
|
|
241
|
+
}, Mn = ({
|
|
243
242
|
absolutePageIndex: e,
|
|
244
243
|
itemIndex: t
|
|
245
244
|
}) => {
|
|
246
|
-
const { spineItem: o } =
|
|
247
|
-
() =>
|
|
245
|
+
const { spineItem: o } = Bn({ absolutePageIndex: e, itemIndex: t }), i = f(
|
|
246
|
+
() => o?.isReady$ ?? ee(!1),
|
|
248
247
|
[o]
|
|
249
248
|
);
|
|
250
249
|
return { spineItem: o, isReady: i };
|
|
251
|
-
},
|
|
250
|
+
}, Ln = "data-bookmark-area", $n = m(
|
|
252
251
|
({
|
|
253
252
|
absolutePageIndex: e,
|
|
254
253
|
left: t,
|
|
255
254
|
top: o,
|
|
256
255
|
width: i
|
|
257
256
|
}) => {
|
|
258
|
-
const { isReady: r } =
|
|
257
|
+
const { isReady: r } = Mn({
|
|
259
258
|
absolutePageIndex: e
|
|
260
|
-
}), { data:
|
|
261
|
-
(u) =>
|
|
262
|
-
var l;
|
|
263
|
-
return ((l = u == null ? void 0 : u.meta) == null ? void 0 : l.absolutePageIndex) === e && u.meta.range === void 0;
|
|
264
|
-
}
|
|
259
|
+
}), { data: a } = ie(), l = a?.find(
|
|
260
|
+
(u) => u?.meta?.absolutePageIndex === e && u.meta.range === void 0
|
|
265
261
|
);
|
|
266
262
|
if (!r) return null;
|
|
267
|
-
const
|
|
263
|
+
const c = i * 0.1 / 2;
|
|
268
264
|
return /* @__PURE__ */ n(
|
|
269
|
-
|
|
265
|
+
ne,
|
|
270
266
|
{
|
|
271
|
-
present: !!
|
|
267
|
+
present: !!l,
|
|
272
268
|
lazyMount: !0,
|
|
273
269
|
animationName: { _open: "fade-in", _closed: "fade-out" },
|
|
274
270
|
animationDuration: "moderate",
|
|
275
271
|
children: /* @__PURE__ */ n(
|
|
276
|
-
|
|
272
|
+
R,
|
|
277
273
|
{
|
|
278
|
-
"data-bookmark-area":
|
|
274
|
+
"data-bookmark-area": Ln,
|
|
279
275
|
position: "absolute",
|
|
280
276
|
left: t + i,
|
|
281
277
|
transform: "translateX(-100%)",
|
|
282
278
|
pointerEvents: "none",
|
|
283
279
|
top: o,
|
|
284
|
-
width:
|
|
285
|
-
height:
|
|
280
|
+
width: c,
|
|
281
|
+
height: c,
|
|
286
282
|
_before: {
|
|
287
283
|
content: '""',
|
|
288
284
|
position: "absolute",
|
|
@@ -290,46 +286,46 @@ const Z = y.ActionTrigger, X = () => $e(Oe), p = () => {
|
|
|
290
286
|
left: 0,
|
|
291
287
|
width: 0,
|
|
292
288
|
height: 0,
|
|
293
|
-
borderTop: `${
|
|
294
|
-
borderLeft: `${
|
|
289
|
+
borderTop: `${c}px solid #03030373`,
|
|
290
|
+
borderLeft: `${c}px solid transparent`
|
|
295
291
|
}
|
|
296
292
|
}
|
|
297
293
|
)
|
|
298
294
|
}
|
|
299
295
|
);
|
|
300
296
|
}
|
|
301
|
-
),
|
|
302
|
-
const e = p(), t =
|
|
303
|
-
return /* @__PURE__ */ n(
|
|
304
|
-
({ absoluteLayout: { left: o, top: i, width: r } },
|
|
305
|
-
|
|
297
|
+
), _n = m(() => {
|
|
298
|
+
const e = p(), t = f(() => e?.layoutInfo$, [e]);
|
|
299
|
+
return /* @__PURE__ */ n(zn, { children: t?.pages.map(
|
|
300
|
+
({ absoluteLayout: { left: o, top: i, width: r } }, a) => /* @__PURE__ */ n(
|
|
301
|
+
$n,
|
|
306
302
|
{
|
|
307
|
-
absolutePageIndex:
|
|
303
|
+
absolutePageIndex: a,
|
|
308
304
|
left: o,
|
|
309
305
|
top: i,
|
|
310
306
|
width: r
|
|
311
307
|
},
|
|
312
|
-
|
|
308
|
+
a
|
|
313
309
|
)
|
|
314
310
|
) });
|
|
315
|
-
}),
|
|
311
|
+
}), Nn = () => {
|
|
316
312
|
const e = p();
|
|
317
|
-
return
|
|
318
|
-
},
|
|
319
|
-
const e =
|
|
320
|
-
|
|
313
|
+
return W(e) ? e : void 0;
|
|
314
|
+
}, Hn = () => {
|
|
315
|
+
const e = Nn(), { data: t } = ie();
|
|
316
|
+
F(() => e ? e.gestures.hooks.register(
|
|
321
317
|
"beforeTapGesture",
|
|
322
318
|
({ event$: i }) => i.pipe(
|
|
323
|
-
|
|
324
|
-
|
|
319
|
+
We(e?.annotations.candidates$),
|
|
320
|
+
z(([r, a]) => {
|
|
325
321
|
if (!r.page) return !0;
|
|
326
322
|
const {
|
|
327
|
-
spineItem:
|
|
328
|
-
spineItemPageIndex:
|
|
323
|
+
spineItem: l,
|
|
324
|
+
spineItemPageIndex: c,
|
|
329
325
|
spineItemPagePosition: u,
|
|
330
|
-
pageSize:
|
|
326
|
+
pageSize: d
|
|
331
327
|
} = r.page;
|
|
332
|
-
if (
|
|
328
|
+
if (cn(
|
|
333
329
|
u,
|
|
334
330
|
{
|
|
335
331
|
type: "corner",
|
|
@@ -337,23 +333,20 @@ const Z = y.ActionTrigger, X = () => $e(Oe), p = () => {
|
|
|
337
333
|
size: 10,
|
|
338
334
|
unit: "%"
|
|
339
335
|
},
|
|
340
|
-
|
|
336
|
+
d
|
|
341
337
|
)) {
|
|
342
338
|
const h = e.spine.pages.fromSpineItemPageIndex(
|
|
343
|
-
|
|
344
|
-
|
|
339
|
+
l,
|
|
340
|
+
c
|
|
345
341
|
);
|
|
346
342
|
if (!h) return !0;
|
|
347
|
-
const
|
|
348
|
-
(
|
|
349
|
-
var k;
|
|
350
|
-
return ((k = C == null ? void 0 : C.meta) == null ? void 0 : k.absolutePageIndex) === h.absolutePageIndex && C.meta.range === void 0;
|
|
351
|
-
}
|
|
343
|
+
const x = t?.find(
|
|
344
|
+
(w) => w?.meta?.absolutePageIndex === h.absolutePageIndex && w.meta.range === void 0
|
|
352
345
|
);
|
|
353
|
-
if (
|
|
354
|
-
return e
|
|
355
|
-
if (
|
|
356
|
-
return e
|
|
346
|
+
if (x)
|
|
347
|
+
return e?.annotations.delete(x.resource.id), !1;
|
|
348
|
+
if (a?.[h.absolutePageIndex])
|
|
349
|
+
return e?.annotations.annotateAbsolutePage({
|
|
357
350
|
absolutePageIndex: h.absolutePageIndex
|
|
358
351
|
}), !1;
|
|
359
352
|
}
|
|
@@ -361,21 +354,18 @@ const Z = y.ActionTrigger, X = () => $e(Oe), p = () => {
|
|
|
361
354
|
})
|
|
362
355
|
)
|
|
363
356
|
) : void 0, [e, t]);
|
|
364
|
-
},
|
|
357
|
+
}, le = Ue({
|
|
365
358
|
placement: "bottom-end",
|
|
366
359
|
pauseOnPageIdle: !0
|
|
367
|
-
}),
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
e.
|
|
371
|
-
/* @__PURE__ */
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
((t = e.meta) == null ? void 0 : t.closable) && /* @__PURE__ */ n(L.CloseTrigger, {})
|
|
377
|
-
] });
|
|
378
|
-
} }) }), Ft = {
|
|
360
|
+
}), Wn = () => /* @__PURE__ */ n(ge, { children: /* @__PURE__ */ n(qe, { toaster: le, insetInline: { mdDown: "4" }, children: (e) => /* @__PURE__ */ s(M.Root, { width: { md: "sm" }, children: [
|
|
361
|
+
e.type === "loading" ? /* @__PURE__ */ n(Qe, { size: "sm", color: "blue.solid" }) : /* @__PURE__ */ n(M.Indicator, {}),
|
|
362
|
+
/* @__PURE__ */ s(T, { gap: "1", flex: "1", maxWidth: "100%", children: [
|
|
363
|
+
e.title && /* @__PURE__ */ n(M.Title, { children: e.title }),
|
|
364
|
+
e.description && /* @__PURE__ */ n(M.Description, { children: e.description })
|
|
365
|
+
] }),
|
|
366
|
+
e.action && /* @__PURE__ */ n(M.ActionTrigger, { children: e.action.label }),
|
|
367
|
+
e.meta?.closable && /* @__PURE__ */ n(M.CloseTrigger, {})
|
|
368
|
+
] }) }) }), Fn = {
|
|
379
369
|
x: 0,
|
|
380
370
|
y: 0,
|
|
381
371
|
width: 0,
|
|
@@ -385,12 +375,12 @@ const Z = y.ActionTrigger, X = () => $e(Oe), p = () => {
|
|
|
385
375
|
bottom: 0,
|
|
386
376
|
right: 0
|
|
387
377
|
};
|
|
388
|
-
function
|
|
389
|
-
const [e, t] =
|
|
390
|
-
() => new ResizeObserver((
|
|
391
|
-
if (
|
|
392
|
-
const { x:
|
|
393
|
-
i({ x:
|
|
378
|
+
function jn() {
|
|
379
|
+
const [e, t] = k(null), [o, i] = k(Fn), r = Ie(
|
|
380
|
+
() => new ResizeObserver((a) => {
|
|
381
|
+
if (a[0]) {
|
|
382
|
+
const { x: l, y: c, width: u, height: d, top: b, left: h, bottom: x, right: S } = a[0].contentRect;
|
|
383
|
+
i({ x: l, y: c, width: u, height: d, top: b, left: h, bottom: x, right: S });
|
|
394
384
|
}
|
|
395
385
|
}),
|
|
396
386
|
[]
|
|
@@ -402,26 +392,26 @@ function Wt() {
|
|
|
402
392
|
};
|
|
403
393
|
}, [e, r]), [t, o, e];
|
|
404
394
|
}
|
|
405
|
-
const
|
|
406
|
-
const i = p(), r =
|
|
407
|
-
|
|
395
|
+
const Vn = (e, t, o) => {
|
|
396
|
+
const i = p(), r = De(i) ? i : void 0;
|
|
397
|
+
D(() => {
|
|
408
398
|
if (!r || !e) return re;
|
|
409
|
-
const
|
|
410
|
-
|
|
411
|
-
he(
|
|
412
|
-
),
|
|
399
|
+
const a = t.layout.layout$.pipe(
|
|
400
|
+
Fe(t.layout.layoutInfo),
|
|
401
|
+
he(dn)
|
|
402
|
+
), l = un(
|
|
413
403
|
e
|
|
414
|
-
).pipe(
|
|
415
|
-
return
|
|
404
|
+
).pipe(z((c) => c.some((u) => u.isIntersecting)));
|
|
405
|
+
return a.pipe(
|
|
416
406
|
je(100, void 0, { trailing: !0 }),
|
|
417
|
-
|
|
418
|
-
ue((
|
|
419
|
-
|
|
407
|
+
A(() => l.pipe(
|
|
408
|
+
ue((c) => {
|
|
409
|
+
c || (e.innerHTML = "");
|
|
420
410
|
}),
|
|
421
|
-
J((
|
|
411
|
+
J((c) => c),
|
|
422
412
|
Te()
|
|
423
413
|
).pipe(
|
|
424
|
-
|
|
414
|
+
A(() => (e.innerHTML = "", r?.gallery.snapshot(
|
|
425
415
|
t,
|
|
426
416
|
e,
|
|
427
417
|
o
|
|
@@ -429,20 +419,16 @@ const jt = (e, t, o) => {
|
|
|
429
419
|
))
|
|
430
420
|
);
|
|
431
421
|
}, [r, t, o, e]);
|
|
432
|
-
},
|
|
433
|
-
({
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
jt(r, e, i);
|
|
440
|
-
const a = b(
|
|
441
|
-
() => s == null ? void 0 : s.locateResource(e, { mode: "shallow" }),
|
|
442
|
-
[s, e]
|
|
422
|
+
}, Gn = m(
|
|
423
|
+
({ item: e, onNavigated: t }) => {
|
|
424
|
+
const [o, i, r] = jn(), a = p();
|
|
425
|
+
Vn(r, e, i);
|
|
426
|
+
const l = f(
|
|
427
|
+
() => a?.locateResource(e, { mode: "shallow" }),
|
|
428
|
+
[a, e]
|
|
443
429
|
);
|
|
444
|
-
return /* @__PURE__ */
|
|
445
|
-
|
|
430
|
+
return /* @__PURE__ */ s(
|
|
431
|
+
R,
|
|
446
432
|
{
|
|
447
433
|
width: "100%",
|
|
448
434
|
aspectRatio: "2/3",
|
|
@@ -454,11 +440,11 @@ const jt = (e, t, o) => {
|
|
|
454
440
|
position: "relative",
|
|
455
441
|
overflow: "hidden",
|
|
456
442
|
onClick: () => {
|
|
457
|
-
t(),
|
|
443
|
+
t(), a?.navigation.goToSpineItem({ indexOrId: e });
|
|
458
444
|
},
|
|
459
445
|
children: [
|
|
460
446
|
/* @__PURE__ */ n(
|
|
461
|
-
|
|
447
|
+
R,
|
|
462
448
|
{
|
|
463
449
|
height: "100%",
|
|
464
450
|
width: "100%",
|
|
@@ -467,7 +453,7 @@ const jt = (e, t, o) => {
|
|
|
467
453
|
ref: o
|
|
468
454
|
}
|
|
469
455
|
),
|
|
470
|
-
/* @__PURE__ */
|
|
456
|
+
/* @__PURE__ */ s(
|
|
471
457
|
g,
|
|
472
458
|
{
|
|
473
459
|
position: "absolute",
|
|
@@ -480,7 +466,7 @@ const jt = (e, t, o) => {
|
|
|
480
466
|
fontSize: "xs",
|
|
481
467
|
children: [
|
|
482
468
|
"Page ",
|
|
483
|
-
(
|
|
469
|
+
(l?.meta?.absolutePageIndex ?? 0) + 1
|
|
484
470
|
]
|
|
485
471
|
}
|
|
486
472
|
)
|
|
@@ -488,12 +474,9 @@ const jt = (e, t, o) => {
|
|
|
488
474
|
}
|
|
489
475
|
);
|
|
490
476
|
}
|
|
491
|
-
),
|
|
492
|
-
({
|
|
493
|
-
|
|
494
|
-
setOpen: t
|
|
495
|
-
}) => {
|
|
496
|
-
const o = p(), i = b(() => o == null ? void 0 : o.spineItemsManager.items$, [o]);
|
|
477
|
+
), Yn = m(
|
|
478
|
+
({ open: e, setOpen: t }) => {
|
|
479
|
+
const o = p(), i = f(() => o?.spineItemsManager.items$, [o]);
|
|
497
480
|
return /* @__PURE__ */ n(
|
|
498
481
|
Y,
|
|
499
482
|
{
|
|
@@ -503,10 +486,10 @@ const jt = (e, t, o) => {
|
|
|
503
486
|
onOpenChange: (r) => t(r.open),
|
|
504
487
|
size: { mdDown: "full", md: "lg" },
|
|
505
488
|
scrollBehavior: "inside",
|
|
506
|
-
children: /* @__PURE__ */
|
|
489
|
+
children: /* @__PURE__ */ s(V, { height: "100%", children: [
|
|
507
490
|
/* @__PURE__ */ n(q, { children: /* @__PURE__ */ n(K, { children: "Gallery" }) }),
|
|
508
491
|
/* @__PURE__ */ n(Q, { children: /* @__PURE__ */ n(
|
|
509
|
-
|
|
492
|
+
R,
|
|
510
493
|
{
|
|
511
494
|
gridTemplateColumns: [
|
|
512
495
|
"repeat(2, minmax(0, 1fr))",
|
|
@@ -516,8 +499,8 @@ const jt = (e, t, o) => {
|
|
|
516
499
|
gap: [2, 4],
|
|
517
500
|
pt: 2,
|
|
518
501
|
"data-grid": !0,
|
|
519
|
-
children: i
|
|
520
|
-
|
|
502
|
+
children: i?.map((r) => /* @__PURE__ */ n(
|
|
503
|
+
Gn,
|
|
521
504
|
{
|
|
522
505
|
item: r,
|
|
523
506
|
onNavigated: () => {
|
|
@@ -534,11 +517,8 @@ const jt = (e, t, o) => {
|
|
|
534
517
|
}
|
|
535
518
|
);
|
|
536
519
|
}
|
|
537
|
-
),
|
|
538
|
-
({
|
|
539
|
-
open: e,
|
|
540
|
-
setOpen: t
|
|
541
|
-
}) => /* @__PURE__ */ n(
|
|
520
|
+
), Un = "@prose-reader/react-reader", qn = "1.234.0", Qn = m(
|
|
521
|
+
({ open: e, setOpen: t }) => /* @__PURE__ */ n(
|
|
542
522
|
Y,
|
|
543
523
|
{
|
|
544
524
|
lazyMount: !0,
|
|
@@ -547,25 +527,25 @@ const jt = (e, t, o) => {
|
|
|
547
527
|
onOpenChange: (o) => t(o.open),
|
|
548
528
|
size: { mdDown: "full", md: "lg" },
|
|
549
529
|
scrollBehavior: "inside",
|
|
550
|
-
children: /* @__PURE__ */
|
|
530
|
+
children: /* @__PURE__ */ s(V, { children: [
|
|
551
531
|
/* @__PURE__ */ n(q, { children: /* @__PURE__ */ n(K, { children: "Help" }) }),
|
|
552
|
-
/* @__PURE__ */
|
|
532
|
+
/* @__PURE__ */ s(Q, { overflowY: "auto", flex: 1, children: [
|
|
553
533
|
/* @__PURE__ */ n(xe, { mb: 2, as: "h3", size: "lg", children: "Shortcuts" }),
|
|
554
|
-
/* @__PURE__ */
|
|
555
|
-
/* @__PURE__ */ n(ve, { children: /* @__PURE__ */ n(
|
|
534
|
+
/* @__PURE__ */ s(O, { mb: 1, children: [
|
|
535
|
+
/* @__PURE__ */ n(ve, { children: /* @__PURE__ */ n(en, {}) }),
|
|
556
536
|
" ",
|
|
557
537
|
/* @__PURE__ */ n(g, { children: "Navigate to right page" })
|
|
558
538
|
] }),
|
|
559
|
-
/* @__PURE__ */
|
|
560
|
-
/* @__PURE__ */ n(ve, { children: /* @__PURE__ */ n(
|
|
539
|
+
/* @__PURE__ */ s(O, { mb: 1, children: [
|
|
540
|
+
/* @__PURE__ */ n(ve, { children: /* @__PURE__ */ n(nn, {}) }),
|
|
561
541
|
" ",
|
|
562
542
|
/* @__PURE__ */ n(g, { children: "Navigate to left page" })
|
|
563
543
|
] }),
|
|
564
544
|
/* @__PURE__ */ n(xe, { mb: 2, mt: 4, as: "h3", size: "lg", children: "About" }),
|
|
565
|
-
/* @__PURE__ */
|
|
566
|
-
|
|
545
|
+
/* @__PURE__ */ s(g, { children: [
|
|
546
|
+
Un,
|
|
567
547
|
" version: ",
|
|
568
|
-
|
|
548
|
+
qn
|
|
569
549
|
] })
|
|
570
550
|
] }),
|
|
571
551
|
/* @__PURE__ */ n(U, { children: /* @__PURE__ */ n(Z, { asChild: !0, children: /* @__PURE__ */ n(j, { variant: "outline", children: "Cancel" }) }) }),
|
|
@@ -573,17 +553,13 @@ const jt = (e, t, o) => {
|
|
|
573
553
|
] })
|
|
574
554
|
}
|
|
575
555
|
)
|
|
576
|
-
),
|
|
556
|
+
), $ = () => {
|
|
577
557
|
const e = p();
|
|
578
|
-
return
|
|
558
|
+
return f(
|
|
579
559
|
() => e ? Ve([e.pagination.state$, e.context.state$]).pipe(
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
(s) => {
|
|
584
|
-
var a;
|
|
585
|
-
return (a = s.mediaType) == null ? void 0 : a.startsWith("image/");
|
|
586
|
-
}
|
|
560
|
+
z(([t, o]) => {
|
|
561
|
+
const i = o.manifest?.spineItems.every(
|
|
562
|
+
(r) => r.mediaType?.startsWith("image/")
|
|
587
563
|
);
|
|
588
564
|
return {
|
|
589
565
|
...t,
|
|
@@ -593,49 +569,49 @@ const jt = (e, t, o) => {
|
|
|
593
569
|
) : re,
|
|
594
570
|
[e]
|
|
595
571
|
);
|
|
596
|
-
},
|
|
597
|
-
const e =
|
|
598
|
-
(
|
|
572
|
+
}, Kn = () => {
|
|
573
|
+
const e = $(), t = Math.floor(
|
|
574
|
+
(e?.percentageEstimateOfBook ?? 0) * 100
|
|
599
575
|
), o = t > 0 ? t : 1;
|
|
600
|
-
return
|
|
576
|
+
return e?.percentageEstimateOfBook === void 0 ? null : /* @__PURE__ */ n(R, { position: "absolute", right: 0, bottom: 0, p: 2, color: "black", children: /* @__PURE__ */ s(g, { fontSize: "sm", children: [
|
|
601
577
|
o,
|
|
602
578
|
" %"
|
|
603
579
|
] }) });
|
|
604
|
-
},
|
|
605
|
-
const [e, t] =
|
|
606
|
-
return
|
|
580
|
+
}, Zn = () => {
|
|
581
|
+
const [e, t] = k(/* @__PURE__ */ new Date());
|
|
582
|
+
return F(() => {
|
|
607
583
|
const o = setInterval(() => {
|
|
608
584
|
t(/* @__PURE__ */ new Date());
|
|
609
585
|
}, 6e4);
|
|
610
586
|
return () => clearInterval(o);
|
|
611
587
|
}, []), e;
|
|
612
|
-
},
|
|
613
|
-
const t =
|
|
588
|
+
}, Xn = (e) => {
|
|
589
|
+
const t = Zn();
|
|
614
590
|
return /* @__PURE__ */ n(g, { fontSize: "xs", ...e, children: t.toLocaleTimeString(navigator.language, {
|
|
615
591
|
hour: "2-digit",
|
|
616
592
|
minute: "2-digit"
|
|
617
593
|
}) });
|
|
618
|
-
},
|
|
594
|
+
}, me = () => {
|
|
619
595
|
const { quickMenuSignal: e } = X();
|
|
620
596
|
return [He(e), e.setValue, e];
|
|
621
|
-
},
|
|
622
|
-
const [e] =
|
|
597
|
+
}, Jn = () => {
|
|
598
|
+
const [e] = me();
|
|
623
599
|
return /* @__PURE__ */ n(
|
|
624
|
-
|
|
600
|
+
R,
|
|
625
601
|
{
|
|
626
602
|
position: "absolute",
|
|
627
603
|
left: 0,
|
|
628
604
|
bottom: 0,
|
|
629
605
|
p: 2,
|
|
630
606
|
color: e ? void 0 : "colorPalette.contrast",
|
|
631
|
-
children: /* @__PURE__ */ n(
|
|
607
|
+
children: /* @__PURE__ */ n(Xn, {})
|
|
632
608
|
}
|
|
633
609
|
);
|
|
634
|
-
},
|
|
610
|
+
}, et = () => {
|
|
635
611
|
const e = p();
|
|
636
|
-
|
|
637
|
-
() => e
|
|
638
|
-
if (t.type === "click" &&
|
|
612
|
+
D(
|
|
613
|
+
() => e?.links$.subscribe((t) => {
|
|
614
|
+
if (t.type === "click" && hn(t.target, "a")) {
|
|
639
615
|
if (!t.target.href) return;
|
|
640
616
|
const o = new URL(t.target.href);
|
|
641
617
|
window.location.host !== o.host && confirm(
|
|
@@ -645,12 +621,12 @@ const jt = (e, t, o) => {
|
|
|
645
621
|
}),
|
|
646
622
|
[e]
|
|
647
623
|
);
|
|
648
|
-
},
|
|
624
|
+
}, nt = () => {
|
|
649
625
|
const e = p(), { notificationsSubject: t } = X();
|
|
650
|
-
|
|
651
|
-
() => e
|
|
652
|
-
|
|
653
|
-
if (!o) return
|
|
626
|
+
D(
|
|
627
|
+
() => e?.zoom.isZooming$.pipe(
|
|
628
|
+
A((o) => {
|
|
629
|
+
if (!o) return se;
|
|
654
630
|
const i = new de();
|
|
655
631
|
return t.next({
|
|
656
632
|
key: "zoom",
|
|
@@ -666,13 +642,13 @@ const jt = (e, t, o) => {
|
|
|
666
642
|
),
|
|
667
643
|
[e]
|
|
668
644
|
);
|
|
669
|
-
},
|
|
645
|
+
}, tt = () => {
|
|
670
646
|
const e = p(), { notificationsSubject: t } = X();
|
|
671
|
-
|
|
672
|
-
() => e
|
|
673
|
-
|
|
647
|
+
D(
|
|
648
|
+
() => e?.settings.values$.pipe(
|
|
649
|
+
z(({ fontScale: o }) => o),
|
|
674
650
|
he(),
|
|
675
|
-
|
|
651
|
+
Re(1),
|
|
676
652
|
ue((o) => {
|
|
677
653
|
t.next({
|
|
678
654
|
key: "fontScaleChange",
|
|
@@ -683,53 +659,53 @@ const jt = (e, t, o) => {
|
|
|
683
659
|
),
|
|
684
660
|
[e, t]
|
|
685
661
|
);
|
|
686
|
-
},
|
|
662
|
+
}, ot = () => {
|
|
687
663
|
const { notificationsSubject: e } = X();
|
|
688
|
-
|
|
664
|
+
tt(), nt(), D(
|
|
689
665
|
() => e.pipe(
|
|
690
|
-
J(
|
|
666
|
+
J(ye),
|
|
691
667
|
Ge((t) => {
|
|
692
|
-
const o = t.duration ?? 3e3, i =
|
|
668
|
+
const o = t.duration ?? 3e3, i = le.create({
|
|
693
669
|
title: t.title,
|
|
694
670
|
description: t.description,
|
|
695
671
|
duration: o
|
|
696
672
|
}), r = e.pipe(
|
|
697
|
-
|
|
698
|
-
J((
|
|
673
|
+
Re(1),
|
|
674
|
+
J((a) => !!t.key && a?.key === t.key)
|
|
699
675
|
);
|
|
700
|
-
return
|
|
676
|
+
return Pe(
|
|
701
677
|
Ae(o),
|
|
702
678
|
t.abort ?? re,
|
|
703
679
|
r
|
|
704
680
|
).pipe(
|
|
705
681
|
Te(),
|
|
706
682
|
we(() => {
|
|
707
|
-
|
|
683
|
+
le.dismiss(i);
|
|
708
684
|
})
|
|
709
685
|
);
|
|
710
686
|
})
|
|
711
687
|
),
|
|
712
688
|
[e]
|
|
713
689
|
);
|
|
714
|
-
},
|
|
690
|
+
}, rt = E.forwardRef(
|
|
715
691
|
function(t, o) {
|
|
716
692
|
const {
|
|
717
693
|
showArrow: i,
|
|
718
694
|
children: r,
|
|
719
|
-
portalled:
|
|
720
|
-
content:
|
|
721
|
-
portalRef:
|
|
695
|
+
portalled: a = !0,
|
|
696
|
+
content: l,
|
|
697
|
+
portalRef: c,
|
|
722
698
|
...u
|
|
723
699
|
} = t;
|
|
724
|
-
return /* @__PURE__ */
|
|
725
|
-
|
|
700
|
+
return /* @__PURE__ */ s(
|
|
701
|
+
L.Root,
|
|
726
702
|
{
|
|
727
703
|
...u,
|
|
728
704
|
positioning: { ...u.positioning, gutter: 4 },
|
|
729
705
|
children: [
|
|
730
|
-
/* @__PURE__ */ n(
|
|
731
|
-
/* @__PURE__ */ n(ge, { disabled: !
|
|
732
|
-
|
|
706
|
+
/* @__PURE__ */ n(L.Trigger, { asChild: !0, children: r }),
|
|
707
|
+
/* @__PURE__ */ n(ge, { disabled: !a, container: c, children: /* @__PURE__ */ n(L.Positioner, { children: /* @__PURE__ */ s(
|
|
708
|
+
L.Content,
|
|
733
709
|
{
|
|
734
710
|
width: "auto",
|
|
735
711
|
px: "2",
|
|
@@ -738,8 +714,8 @@ const jt = (e, t, o) => {
|
|
|
738
714
|
rounded: "sm",
|
|
739
715
|
ref: o,
|
|
740
716
|
children: [
|
|
741
|
-
i && /* @__PURE__ */ n(
|
|
742
|
-
|
|
717
|
+
i && /* @__PURE__ */ n(L.Arrow, { children: /* @__PURE__ */ n(L.ArrowTip, {}) }),
|
|
718
|
+
l
|
|
743
719
|
]
|
|
744
720
|
}
|
|
745
721
|
) }) })
|
|
@@ -747,77 +723,77 @@ const jt = (e, t, o) => {
|
|
|
747
723
|
}
|
|
748
724
|
);
|
|
749
725
|
}
|
|
750
|
-
),
|
|
726
|
+
), it = E.forwardRef(function(t, o) {
|
|
751
727
|
const { children: i, ...r } = t;
|
|
752
|
-
return /* @__PURE__ */ n(
|
|
753
|
-
|
|
728
|
+
return /* @__PURE__ */ n(rt, { content: i, ...r, ref: o, children: /* @__PURE__ */ n(
|
|
729
|
+
v,
|
|
754
730
|
{
|
|
755
731
|
variant: "ghost",
|
|
756
732
|
"aria-label": "info",
|
|
757
733
|
size: "2xs",
|
|
758
734
|
colorPalette: "gray",
|
|
759
|
-
children: /* @__PURE__ */ n(
|
|
735
|
+
children: /* @__PURE__ */ n(vn, {})
|
|
760
736
|
}
|
|
761
737
|
) });
|
|
762
|
-
}),
|
|
738
|
+
}), at = E.forwardRef(function(t, o) {
|
|
763
739
|
return /* @__PURE__ */ n(H.Track, { ...t, ref: o, children: /* @__PURE__ */ n(H.Range, {}) });
|
|
764
740
|
});
|
|
765
741
|
E.forwardRef(function(t, o) {
|
|
766
|
-
const { children: i, info: r, ...
|
|
767
|
-
return /* @__PURE__ */
|
|
742
|
+
const { children: i, info: r, ...a } = t;
|
|
743
|
+
return /* @__PURE__ */ s(H.Label, { ...a, ref: o, children: [
|
|
768
744
|
i,
|
|
769
|
-
r && /* @__PURE__ */ n(
|
|
745
|
+
r && /* @__PURE__ */ n(it, { children: r })
|
|
770
746
|
] });
|
|
771
747
|
});
|
|
772
|
-
const
|
|
773
|
-
const e =
|
|
748
|
+
const st = H.Root, lt = H.ValueText, fe = () => {
|
|
749
|
+
const e = $(), t = e?.numberOfTotalPages === 1, o = (e?.beginNumberOfPagesInSpineItem ?? 0) > 1, i = (e?.endNumberOfPagesInSpineItem ?? 0) > 1, r = (e?.hasChapters ? e?.beginPageIndexInSpineItem : e?.beginAbsolutePageIndex) ?? 0, a = (e?.hasChapters ? e?.endPageIndexInSpineItem : e?.endAbsolutePageIndex) ?? 0, [l = 0, c = 0] = [
|
|
774
750
|
r,
|
|
775
|
-
|
|
776
|
-
].sort((
|
|
751
|
+
a
|
|
752
|
+
].sort((b, h) => b - h), u = e?.beginPageIndexInSpineItem !== e?.endPageIndexInSpineItem || e?.beginSpineItemIndex !== e?.endSpineItemIndex, d = e?.hasChapters ? e?.beginNumberOfPagesInSpineItem : e?.numberOfTotalPages;
|
|
777
753
|
return {
|
|
778
754
|
hasOnlyOnePage: t,
|
|
779
755
|
beginPageIndex: r,
|
|
780
|
-
endPageIndex:
|
|
756
|
+
endPageIndex: a,
|
|
781
757
|
isBeginWithinChapter: o,
|
|
782
758
|
isEndWithinChapter: i,
|
|
783
759
|
beginAndEndAreDifferent: u,
|
|
784
|
-
totalApproximatePages:
|
|
785
|
-
leftPageIndex:
|
|
786
|
-
rightPageIndex:
|
|
760
|
+
totalApproximatePages: d,
|
|
761
|
+
leftPageIndex: l,
|
|
762
|
+
rightPageIndex: c
|
|
787
763
|
};
|
|
788
|
-
},
|
|
789
|
-
const e =
|
|
764
|
+
}, ct = () => {
|
|
765
|
+
const e = $(), {
|
|
790
766
|
hasOnlyOnePage: t,
|
|
791
767
|
leftPageIndex: o,
|
|
792
768
|
rightPageIndex: i,
|
|
793
769
|
totalApproximatePages: r,
|
|
794
|
-
beginAndEndAreDifferent:
|
|
795
|
-
} =
|
|
796
|
-
return /* @__PURE__ */
|
|
797
|
-
/* @__PURE__ */ n(
|
|
798
|
-
/* @__PURE__ */ n(
|
|
799
|
-
/* @__PURE__ */ n(
|
|
770
|
+
beginAndEndAreDifferent: a
|
|
771
|
+
} = fe(), l = Math.round((e?.percentageEstimateOfBook ?? 0) * 100), c = (d) => d?.subChapter ? `${d.title} / ${c(d.subChapter)}` : d?.title || "", u = c(e?.beginChapterInfo);
|
|
772
|
+
return /* @__PURE__ */ s(T, { alignItems: "center", gap: 1, maxW: "100%", overflow: "auto", children: [
|
|
773
|
+
/* @__PURE__ */ n(st, { value: l, size: "xs", width: 150, children: /* @__PURE__ */ s(O, { justifyContent: "space-between", children: [
|
|
774
|
+
/* @__PURE__ */ n(at, { width: 110 }),
|
|
775
|
+
/* @__PURE__ */ n(lt, { children: `${l}%` })
|
|
800
776
|
] }) }),
|
|
801
777
|
/* @__PURE__ */ n(g, { truncate: !0, maxWidth: "100%", fontSize: "sm", mt: 1, children: u ? `Chapter: ${u}` : " " }),
|
|
802
|
-
!t && /* @__PURE__ */
|
|
803
|
-
/* @__PURE__ */ n(g, { fontSize: "xs", children:
|
|
804
|
-
!!
|
|
778
|
+
!t && /* @__PURE__ */ s(O, { children: [
|
|
779
|
+
/* @__PURE__ */ n(g, { fontSize: "xs", children: a ? `${o + 1} - ${i + 1} of ${r}` : `${o + 1} of ${r}` }),
|
|
780
|
+
!!e?.hasChapters && /* @__PURE__ */ s(oe, { children: [
|
|
805
781
|
/* @__PURE__ */ n(g, { children: "-" }),
|
|
806
|
-
/* @__PURE__ */
|
|
782
|
+
/* @__PURE__ */ s(g, { fontSize: "xs", children: [
|
|
807
783
|
"(",
|
|
808
|
-
(
|
|
784
|
+
(e?.beginAbsolutePageIndex ?? 0) + 1,
|
|
809
785
|
")"
|
|
810
786
|
] })
|
|
811
787
|
] })
|
|
812
788
|
] })
|
|
813
789
|
] });
|
|
814
|
-
}, Be =
|
|
790
|
+
}, Be = m(
|
|
815
791
|
({
|
|
816
792
|
children: e,
|
|
817
793
|
position: t,
|
|
818
794
|
...o
|
|
819
795
|
}) => /* @__PURE__ */ n(
|
|
820
|
-
|
|
796
|
+
ne,
|
|
821
797
|
{
|
|
822
798
|
display: "flex",
|
|
823
799
|
flexDirection: "row",
|
|
@@ -841,8 +817,8 @@ const ln = H.Root, an = H.ValueText, me = () => {
|
|
|
841
817
|
children: e
|
|
842
818
|
}
|
|
843
819
|
)
|
|
844
|
-
),
|
|
845
|
-
|
|
820
|
+
), dt = Ke(Cn), ut = m((e) => /* @__PURE__ */ n(
|
|
821
|
+
R,
|
|
846
822
|
{
|
|
847
823
|
display: "contents",
|
|
848
824
|
css: {
|
|
@@ -851,7 +827,7 @@ const ln = H.Root, an = H.ValueText, me = () => {
|
|
|
851
827
|
"--color-solid": "colors.colorPalette.solid"
|
|
852
828
|
},
|
|
853
829
|
children: /* @__PURE__ */ n(
|
|
854
|
-
|
|
830
|
+
dt,
|
|
855
831
|
{
|
|
856
832
|
keyboard: !1,
|
|
857
833
|
style: {
|
|
@@ -895,65 +871,65 @@ const ln = H.Root, an = H.ValueText, me = () => {
|
|
|
895
871
|
}
|
|
896
872
|
)
|
|
897
873
|
}
|
|
898
|
-
)),
|
|
899
|
-
const
|
|
874
|
+
)), ht = () => {
|
|
875
|
+
const t = $()?.isUsingSpread, { beginPageIndex: o, totalApproximatePages: i = 0 } = fe(), r = t ? Math.floor((o || 0) / 2) : o, [a, l] = ke(
|
|
900
876
|
() => ce({
|
|
901
877
|
default: r || 0
|
|
902
878
|
})
|
|
903
|
-
),
|
|
879
|
+
), c = 0, u = Math.max(
|
|
904
880
|
0,
|
|
905
881
|
t ? Math.floor((i - 1) / 2) : i - 1
|
|
906
882
|
);
|
|
907
|
-
return
|
|
908
|
-
|
|
909
|
-
}, [r,
|
|
910
|
-
value:
|
|
911
|
-
valueSignal:
|
|
912
|
-
min:
|
|
883
|
+
return F(() => {
|
|
884
|
+
l.update(r || 0);
|
|
885
|
+
}, [r, l]), {
|
|
886
|
+
value: a,
|
|
887
|
+
valueSignal: l,
|
|
888
|
+
min: c,
|
|
913
889
|
max: u
|
|
914
890
|
};
|
|
915
|
-
},
|
|
916
|
-
const t = p(), o =
|
|
917
|
-
(
|
|
918
|
-
const [
|
|
919
|
-
h.setValue(
|
|
920
|
-
const be =
|
|
921
|
-
|
|
891
|
+
}, gt = (e) => {
|
|
892
|
+
const t = p(), o = $(), { manifest: i } = f(() => t?.context.state$, [t]) ?? {}, r = i?.readingDirection === "rtl", a = o?.isUsingSpread, { totalApproximatePages: l = 0, isBeginWithinChapter: c } = fe(), u = 1, d = c, { value: b, valueSignal: h, min: x, max: S } = ht(), w = N(
|
|
893
|
+
(_) => {
|
|
894
|
+
const [C = 0] = Array.isArray(_) ? _ : [_];
|
|
895
|
+
h.setValue(C);
|
|
896
|
+
const be = a ? Math.floor(C) * 2 : Math.floor(C);
|
|
897
|
+
d ? t?.navigation.goToPageOfSpineItem({
|
|
922
898
|
pageIndex: be,
|
|
923
899
|
spineItemId: t.pagination.state.beginSpineItemIndex ?? 0,
|
|
924
900
|
animation: !1
|
|
925
|
-
}) : t
|
|
901
|
+
}) : t?.navigation.goToAbsolutePageIndex({
|
|
926
902
|
absolutePageIndex: be,
|
|
927
903
|
animation: !1
|
|
928
904
|
});
|
|
929
905
|
},
|
|
930
|
-
[t,
|
|
906
|
+
[t, a, h, d]
|
|
931
907
|
);
|
|
932
|
-
return
|
|
933
|
-
() => t
|
|
908
|
+
return D(
|
|
909
|
+
() => t?.navigation.throttleLock({
|
|
934
910
|
duration: 100,
|
|
935
911
|
trigger: h.subject
|
|
936
912
|
}),
|
|
937
913
|
[t, h]
|
|
938
|
-
),
|
|
939
|
-
|
|
914
|
+
), l === 1 || a && l === 2 ? /* @__PURE__ */ n(R, { style: e.style }) : /* @__PURE__ */ n(
|
|
915
|
+
ut,
|
|
940
916
|
{
|
|
941
|
-
value: [
|
|
917
|
+
value: [b],
|
|
942
918
|
max: S,
|
|
943
|
-
min:
|
|
919
|
+
min: x,
|
|
944
920
|
reverse: r,
|
|
945
921
|
step: u,
|
|
946
|
-
onChange:
|
|
922
|
+
onChange: w,
|
|
947
923
|
...e
|
|
948
924
|
}
|
|
949
925
|
);
|
|
950
|
-
},
|
|
926
|
+
}, pt = m(
|
|
951
927
|
({
|
|
952
928
|
open: e,
|
|
953
929
|
onItemClick: t
|
|
954
930
|
}) => {
|
|
955
|
-
const o = p(), i =
|
|
956
|
-
return /* @__PURE__ */
|
|
931
|
+
const o = p(), i = f(() => o?.navigation.state$, [o]), a = f(() => o?.settings.values$, [o])?.computedPageTurnDirection === "vertical", [l, c] = k(!0);
|
|
932
|
+
return /* @__PURE__ */ s(
|
|
957
933
|
Be,
|
|
958
934
|
{
|
|
959
935
|
present: e,
|
|
@@ -963,8 +939,8 @@ const ln = H.Root, an = H.ValueText, me = () => {
|
|
|
963
939
|
overflow: "auto",
|
|
964
940
|
pb: 8,
|
|
965
941
|
children: [
|
|
966
|
-
/* @__PURE__ */
|
|
967
|
-
|
|
942
|
+
/* @__PURE__ */ s(
|
|
943
|
+
O,
|
|
968
944
|
{
|
|
969
945
|
flex: 1,
|
|
970
946
|
alignItems: "center",
|
|
@@ -972,19 +948,19 @@ const ln = H.Root, an = H.ValueText, me = () => {
|
|
|
972
948
|
maxWidth: "100%",
|
|
973
949
|
children: [
|
|
974
950
|
/* @__PURE__ */ n(
|
|
975
|
-
|
|
951
|
+
v,
|
|
976
952
|
{
|
|
977
953
|
"aria-label": "left",
|
|
978
954
|
size: "lg",
|
|
979
955
|
variant: "ghost",
|
|
980
956
|
flexShrink: 0,
|
|
981
|
-
onClick: () => o
|
|
982
|
-
disabled: !
|
|
983
|
-
children:
|
|
957
|
+
onClick: () => o?.navigation.goToLeftOrTopSpineItem(),
|
|
958
|
+
disabled: !i?.canGoLeftSpineItem && !i?.canGoTopSpineItem,
|
|
959
|
+
children: a ? /* @__PURE__ */ n(mn, {}) : /* @__PURE__ */ n(fn, {})
|
|
984
960
|
}
|
|
985
961
|
),
|
|
986
|
-
/* @__PURE__ */
|
|
987
|
-
|
|
962
|
+
/* @__PURE__ */ s(
|
|
963
|
+
T,
|
|
988
964
|
{
|
|
989
965
|
flex: 1,
|
|
990
966
|
maxW: 400,
|
|
@@ -993,9 +969,9 @@ const ln = H.Root, an = H.ValueText, me = () => {
|
|
|
993
969
|
overflow: "auto",
|
|
994
970
|
px: 4,
|
|
995
971
|
children: [
|
|
996
|
-
/* @__PURE__ */ n(
|
|
972
|
+
/* @__PURE__ */ n(ct, {}),
|
|
997
973
|
/* @__PURE__ */ n(
|
|
998
|
-
|
|
974
|
+
gt,
|
|
999
975
|
{
|
|
1000
976
|
style: {
|
|
1001
977
|
width: "100%",
|
|
@@ -1008,121 +984,121 @@ const ln = H.Root, an = H.ValueText, me = () => {
|
|
|
1008
984
|
}
|
|
1009
985
|
),
|
|
1010
986
|
/* @__PURE__ */ n(
|
|
1011
|
-
|
|
987
|
+
v,
|
|
1012
988
|
{
|
|
1013
989
|
"aria-label": "right",
|
|
1014
990
|
size: "lg",
|
|
1015
991
|
flexShrink: 0,
|
|
1016
992
|
variant: "ghost",
|
|
1017
|
-
disabled: !
|
|
993
|
+
disabled: !i?.canGoRightSpineItem && !i?.canGoBottomSpineItem,
|
|
1018
994
|
onClick: () => {
|
|
1019
|
-
o
|
|
995
|
+
o?.navigation.goToRightOrBottomSpineItem();
|
|
1020
996
|
},
|
|
1021
|
-
children:
|
|
997
|
+
children: a ? /* @__PURE__ */ n(bn, {}) : /* @__PURE__ */ n(xn, {})
|
|
1022
998
|
}
|
|
1023
999
|
)
|
|
1024
1000
|
]
|
|
1025
1001
|
}
|
|
1026
1002
|
),
|
|
1027
|
-
/* @__PURE__ */ n(
|
|
1028
|
-
|
|
1003
|
+
/* @__PURE__ */ n(O, { alignSelf: "stretch", alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ s(
|
|
1004
|
+
ae.Root,
|
|
1029
1005
|
{
|
|
1030
|
-
open:
|
|
1006
|
+
open: l,
|
|
1031
1007
|
flex: 1,
|
|
1032
1008
|
onOpenChange: ({ open: u }) => {
|
|
1033
|
-
|
|
1009
|
+
c(u);
|
|
1034
1010
|
},
|
|
1035
1011
|
children: [
|
|
1036
1012
|
/* @__PURE__ */ n(
|
|
1037
|
-
|
|
1013
|
+
ae.Trigger,
|
|
1038
1014
|
{
|
|
1039
1015
|
paddingY: "3",
|
|
1040
1016
|
width: "100%",
|
|
1041
1017
|
display: "flex",
|
|
1042
1018
|
justifyContent: "center",
|
|
1043
1019
|
children: /* @__PURE__ */ n(
|
|
1044
|
-
|
|
1020
|
+
tn,
|
|
1045
1021
|
{
|
|
1046
1022
|
style: {
|
|
1047
|
-
transform:
|
|
1023
|
+
transform: l ? "rotate(0deg)" : "rotate(180deg)"
|
|
1048
1024
|
}
|
|
1049
1025
|
}
|
|
1050
1026
|
)
|
|
1051
1027
|
}
|
|
1052
1028
|
),
|
|
1053
|
-
/* @__PURE__ */
|
|
1029
|
+
/* @__PURE__ */ s(ae.Content, { display: "flex", justifyContent: "center", children: [
|
|
1054
1030
|
/* @__PURE__ */ n(
|
|
1055
|
-
|
|
1031
|
+
v,
|
|
1056
1032
|
{
|
|
1057
1033
|
"aria-label": "Help",
|
|
1058
1034
|
size: "lg",
|
|
1059
1035
|
variant: "ghost",
|
|
1060
1036
|
onClick: () => t("help"),
|
|
1061
|
-
children: /* @__PURE__ */ n(
|
|
1037
|
+
children: /* @__PURE__ */ n(on, {})
|
|
1062
1038
|
}
|
|
1063
1039
|
),
|
|
1064
1040
|
/* @__PURE__ */ n(
|
|
1065
|
-
|
|
1041
|
+
v,
|
|
1066
1042
|
{
|
|
1067
1043
|
"aria-label": "Table of contents",
|
|
1068
1044
|
size: "lg",
|
|
1069
1045
|
variant: "ghost",
|
|
1070
1046
|
onClick: () => t("toc"),
|
|
1071
|
-
children: /* @__PURE__ */ n(
|
|
1047
|
+
children: /* @__PURE__ */ n(rn, {})
|
|
1072
1048
|
}
|
|
1073
1049
|
),
|
|
1074
|
-
|
|
1075
|
-
|
|
1050
|
+
Ee(o) && /* @__PURE__ */ n(
|
|
1051
|
+
v,
|
|
1076
1052
|
{
|
|
1077
1053
|
"aria-label": "Search",
|
|
1078
1054
|
size: "lg",
|
|
1079
1055
|
variant: "ghost",
|
|
1080
1056
|
onClick: () => t("search"),
|
|
1081
|
-
children: /* @__PURE__ */ n(
|
|
1057
|
+
children: /* @__PURE__ */ n(an, {})
|
|
1082
1058
|
}
|
|
1083
1059
|
),
|
|
1084
|
-
|
|
1085
|
-
|
|
1060
|
+
W(o) && /* @__PURE__ */ n(
|
|
1061
|
+
v,
|
|
1086
1062
|
{
|
|
1087
1063
|
"aria-label": "Bookmarks",
|
|
1088
1064
|
size: "lg",
|
|
1089
1065
|
variant: "ghost",
|
|
1090
1066
|
onClick: () => t("bookmarks"),
|
|
1091
|
-
children: /* @__PURE__ */ n(
|
|
1067
|
+
children: /* @__PURE__ */ n(gn, {})
|
|
1092
1068
|
}
|
|
1093
1069
|
),
|
|
1094
|
-
|
|
1095
|
-
|
|
1070
|
+
W(o) && /* @__PURE__ */ n(
|
|
1071
|
+
v,
|
|
1096
1072
|
{
|
|
1097
1073
|
"aria-label": "Annotations",
|
|
1098
1074
|
size: "lg",
|
|
1099
1075
|
variant: "ghost",
|
|
1100
1076
|
onClick: () => t("annotations"),
|
|
1101
|
-
children: /* @__PURE__ */ n(
|
|
1077
|
+
children: /* @__PURE__ */ n(te, {})
|
|
1102
1078
|
}
|
|
1103
1079
|
),
|
|
1104
1080
|
/* @__PURE__ */ n(
|
|
1105
|
-
|
|
1081
|
+
v,
|
|
1106
1082
|
{
|
|
1107
1083
|
"aria-label": "Thumbnails",
|
|
1108
1084
|
size: "lg",
|
|
1109
|
-
variant:
|
|
1085
|
+
variant: o?.settings.values.viewportMode === "thumbnails" ? "solid" : "ghost",
|
|
1110
1086
|
onClick: () => {
|
|
1111
|
-
o
|
|
1112
|
-
viewportMode:
|
|
1087
|
+
o?.settings.update({
|
|
1088
|
+
viewportMode: o?.settings.values.viewportMode === "normal" ? "thumbnails" : "normal"
|
|
1113
1089
|
});
|
|
1114
1090
|
},
|
|
1115
|
-
children: /* @__PURE__ */ n(
|
|
1091
|
+
children: /* @__PURE__ */ n(sn, {})
|
|
1116
1092
|
}
|
|
1117
1093
|
),
|
|
1118
|
-
|
|
1119
|
-
|
|
1094
|
+
De(o) && /* @__PURE__ */ n(
|
|
1095
|
+
v,
|
|
1120
1096
|
{
|
|
1121
1097
|
"aria-label": "Gallery",
|
|
1122
1098
|
size: "lg",
|
|
1123
1099
|
variant: "ghost",
|
|
1124
1100
|
onClick: () => t("gallery"),
|
|
1125
|
-
children: /* @__PURE__ */ n(
|
|
1101
|
+
children: /* @__PURE__ */ n(pn, {})
|
|
1126
1102
|
}
|
|
1127
1103
|
)
|
|
1128
1104
|
] })
|
|
@@ -1133,13 +1109,13 @@ const ln = H.Root, an = H.ValueText, me = () => {
|
|
|
1133
1109
|
}
|
|
1134
1110
|
);
|
|
1135
1111
|
}
|
|
1136
|
-
),
|
|
1137
|
-
const [e, t] =
|
|
1112
|
+
), mt = () => {
|
|
1113
|
+
const [e, t] = k(!1), o = N(() => document.fullscreenElement ? document.exitFullscreen().catch(console.error).then(() => {
|
|
1138
1114
|
t(!1);
|
|
1139
1115
|
}) : document.documentElement.requestFullscreen({ navigationUI: "hide" }).catch(console.error).then(() => {
|
|
1140
1116
|
t(!0);
|
|
1141
1117
|
}), []);
|
|
1142
|
-
return
|
|
1118
|
+
return F(() => {
|
|
1143
1119
|
function i() {
|
|
1144
1120
|
t(!!document.fullscreenElement);
|
|
1145
1121
|
}
|
|
@@ -1150,13 +1126,13 @@ const ln = H.Root, an = H.ValueText, me = () => {
|
|
|
1150
1126
|
isFullscreen: e,
|
|
1151
1127
|
onToggleFullscreenClick: o
|
|
1152
1128
|
};
|
|
1153
|
-
},
|
|
1129
|
+
}, ft = m(
|
|
1154
1130
|
({
|
|
1155
1131
|
open: e,
|
|
1156
1132
|
onItemClick: t
|
|
1157
1133
|
}) => {
|
|
1158
|
-
const o = p(), i =
|
|
1159
|
-
return /* @__PURE__ */
|
|
1134
|
+
const o = p(), i = f(() => o?.context.manifest$, [o]), { isFullscreen: r, onToggleFullscreenClick: a } = mt();
|
|
1135
|
+
return /* @__PURE__ */ s(
|
|
1160
1136
|
Be,
|
|
1161
1137
|
{
|
|
1162
1138
|
present: e,
|
|
@@ -1165,18 +1141,18 @@ const ln = H.Root, an = H.ValueText, me = () => {
|
|
|
1165
1141
|
justifyContent: "space-between",
|
|
1166
1142
|
children: [
|
|
1167
1143
|
/* @__PURE__ */ n(
|
|
1168
|
-
|
|
1144
|
+
v,
|
|
1169
1145
|
{
|
|
1170
1146
|
"aria-label": "left",
|
|
1171
1147
|
size: "lg",
|
|
1172
1148
|
variant: "ghost",
|
|
1173
1149
|
flexShrink: 0,
|
|
1174
1150
|
onClick: () => t("back"),
|
|
1175
|
-
children: /* @__PURE__ */ n(
|
|
1151
|
+
children: /* @__PURE__ */ n(In, {})
|
|
1176
1152
|
}
|
|
1177
1153
|
),
|
|
1178
1154
|
/* @__PURE__ */ n(
|
|
1179
|
-
|
|
1155
|
+
T,
|
|
1180
1156
|
{
|
|
1181
1157
|
flex: 1,
|
|
1182
1158
|
maxW: 600,
|
|
@@ -1184,30 +1160,30 @@ const ln = H.Root, an = H.ValueText, me = () => {
|
|
|
1184
1160
|
alignItems: "center",
|
|
1185
1161
|
overflow: "auto",
|
|
1186
1162
|
px: 4,
|
|
1187
|
-
children: /* @__PURE__ */ n(g, { truncate: !0, maxWidth: "100%", children: i
|
|
1163
|
+
children: /* @__PURE__ */ n(g, { truncate: !0, maxWidth: "100%", children: i?.title })
|
|
1188
1164
|
}
|
|
1189
1165
|
),
|
|
1190
|
-
/* @__PURE__ */
|
|
1166
|
+
/* @__PURE__ */ s(O, { children: [
|
|
1191
1167
|
/* @__PURE__ */ n(
|
|
1192
|
-
|
|
1168
|
+
v,
|
|
1193
1169
|
{
|
|
1194
1170
|
"aria-label": "right",
|
|
1195
1171
|
size: "lg",
|
|
1196
1172
|
flexShrink: 0,
|
|
1197
1173
|
variant: "ghost",
|
|
1198
1174
|
onClick: () => t("more"),
|
|
1199
|
-
children: /* @__PURE__ */ n(
|
|
1175
|
+
children: /* @__PURE__ */ n(kn, {})
|
|
1200
1176
|
}
|
|
1201
1177
|
),
|
|
1202
1178
|
/* @__PURE__ */ n(
|
|
1203
|
-
|
|
1179
|
+
v,
|
|
1204
1180
|
{
|
|
1205
1181
|
"aria-label": "right",
|
|
1206
1182
|
size: "lg",
|
|
1207
1183
|
flexShrink: 0,
|
|
1208
1184
|
variant: "ghost",
|
|
1209
|
-
onClick:
|
|
1210
|
-
children: r ? /* @__PURE__ */ n(
|
|
1185
|
+
onClick: a,
|
|
1186
|
+
children: r ? /* @__PURE__ */ n(Sn, {}) : /* @__PURE__ */ n(yn, {})
|
|
1211
1187
|
}
|
|
1212
1188
|
)
|
|
1213
1189
|
] })
|
|
@@ -1215,26 +1191,26 @@ const ln = H.Root, an = H.ValueText, me = () => {
|
|
|
1215
1191
|
}
|
|
1216
1192
|
);
|
|
1217
1193
|
}
|
|
1218
|
-
),
|
|
1194
|
+
), bt = m(
|
|
1219
1195
|
({
|
|
1220
1196
|
onItemClick: e
|
|
1221
1197
|
}) => {
|
|
1222
|
-
const [t] =
|
|
1223
|
-
return /* @__PURE__ */
|
|
1224
|
-
/* @__PURE__ */ n(
|
|
1225
|
-
/* @__PURE__ */ n(
|
|
1198
|
+
const [t] = me();
|
|
1199
|
+
return /* @__PURE__ */ s(oe, { children: [
|
|
1200
|
+
/* @__PURE__ */ n(ft, { open: t, onItemClick: e }),
|
|
1201
|
+
/* @__PURE__ */ n(pt, { open: t, onItemClick: e })
|
|
1226
1202
|
] });
|
|
1227
1203
|
}
|
|
1228
|
-
),
|
|
1204
|
+
), xt = m(
|
|
1229
1205
|
({
|
|
1230
1206
|
contextText: e = "",
|
|
1231
1207
|
startOffset: t = 0,
|
|
1232
1208
|
text: o,
|
|
1233
1209
|
cfi: i = "#",
|
|
1234
1210
|
onClick: r,
|
|
1235
|
-
absolutePageIndex:
|
|
1211
|
+
absolutePageIndex: a
|
|
1236
1212
|
}) => {
|
|
1237
|
-
const
|
|
1213
|
+
const c = e.substring(
|
|
1238
1214
|
Math.max(t - 15, 0),
|
|
1239
1215
|
Math.max(t, 0)
|
|
1240
1216
|
), u = e.substring(
|
|
@@ -1244,43 +1220,43 @@ const ln = H.Root, an = H.ValueText, me = () => {
|
|
|
1244
1220
|
e.length - 1
|
|
1245
1221
|
)
|
|
1246
1222
|
);
|
|
1247
|
-
return /* @__PURE__ */
|
|
1223
|
+
return /* @__PURE__ */ s(
|
|
1248
1224
|
pe,
|
|
1249
1225
|
{
|
|
1250
1226
|
href: i,
|
|
1251
1227
|
style: { margin: 5, overflow: "hidden" },
|
|
1252
|
-
onClick: (
|
|
1253
|
-
|
|
1228
|
+
onClick: (d) => {
|
|
1229
|
+
d.preventDefault(), r(i);
|
|
1254
1230
|
},
|
|
1255
1231
|
display: "flex",
|
|
1256
1232
|
flexDirection: "column",
|
|
1257
1233
|
alignItems: "flex-start",
|
|
1258
1234
|
gap: 0,
|
|
1259
1235
|
children: [
|
|
1260
|
-
/* @__PURE__ */
|
|
1236
|
+
/* @__PURE__ */ s(g, { lineClamp: 1, as: "cite", style: { display: "block" }, children: [
|
|
1261
1237
|
'"',
|
|
1262
|
-
|
|
1238
|
+
c,
|
|
1263
1239
|
/* @__PURE__ */ n("b", { children: o }),
|
|
1264
1240
|
u,
|
|
1265
1241
|
'"'
|
|
1266
1242
|
] }),
|
|
1267
|
-
/* @__PURE__ */ n(g, { fontSize: "sm", color: "gray.500", style: { textDecoration: "none" }, children: `Book page: ${
|
|
1243
|
+
/* @__PURE__ */ n(g, { fontSize: "sm", color: "gray.500", style: { textDecoration: "none" }, children: `Book page: ${a !== void 0 ? a + 1 : "unknown (not loaded)"}` })
|
|
1268
1244
|
]
|
|
1269
1245
|
}
|
|
1270
1246
|
);
|
|
1271
1247
|
}
|
|
1272
|
-
),
|
|
1273
|
-
const e =
|
|
1248
|
+
), vt = 500, Ct = () => {
|
|
1249
|
+
const e = Se(() => new Ye("")), t = f(e), o = p(), i = Ee(o) ? o : void 0, r = f(() => e.pipe(
|
|
1274
1250
|
he(),
|
|
1275
|
-
|
|
1276
|
-
(
|
|
1251
|
+
A(
|
|
1252
|
+
(a) => a === "" || !i ? ee(void 0) : Pe(
|
|
1277
1253
|
ee({
|
|
1278
1254
|
type: "start",
|
|
1279
1255
|
data: void 0
|
|
1280
1256
|
}),
|
|
1281
|
-
Ae(
|
|
1282
|
-
|
|
1283
|
-
|
|
1257
|
+
Ae(vt).pipe(
|
|
1258
|
+
A(() => i.search.search(a)),
|
|
1259
|
+
z((l) => ({ type: "end", data: l }))
|
|
1284
1260
|
)
|
|
1285
1261
|
)
|
|
1286
1262
|
)
|
|
@@ -1288,31 +1264,29 @@ const ln = H.Root, an = H.ValueText, me = () => {
|
|
|
1288
1264
|
return {
|
|
1289
1265
|
value: t,
|
|
1290
1266
|
setValue: e.next.bind(e),
|
|
1291
|
-
status:
|
|
1292
|
-
data: r
|
|
1267
|
+
status: r?.type ?? "idle",
|
|
1268
|
+
data: r?.data
|
|
1293
1269
|
};
|
|
1294
|
-
},
|
|
1295
|
-
({
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
(l) => {
|
|
1302
|
-
e(), t == null || t.navigation.goToCfi(l);
|
|
1270
|
+
}, It = m(
|
|
1271
|
+
({ onNavigate: e }) => {
|
|
1272
|
+
const t = p(), { value: o, setValue: i, status: r, data: a } = Ct(), l = (d) => {
|
|
1273
|
+
i(d.target.value);
|
|
1274
|
+
}, c = N(
|
|
1275
|
+
(d) => {
|
|
1276
|
+
e(), t?.navigation.goToCfi(d);
|
|
1303
1277
|
},
|
|
1304
1278
|
[t, e]
|
|
1305
|
-
), u =
|
|
1306
|
-
() => t
|
|
1307
|
-
[
|
|
1279
|
+
), u = f(
|
|
1280
|
+
() => t?.locateResource(a?.slice(0, 100) ?? []),
|
|
1281
|
+
[a]
|
|
1308
1282
|
);
|
|
1309
|
-
return /* @__PURE__ */
|
|
1283
|
+
return /* @__PURE__ */ s(T, { flex: 1, height: "100%", gap: 2, children: [
|
|
1310
1284
|
/* @__PURE__ */ n(
|
|
1311
1285
|
Ze,
|
|
1312
1286
|
{
|
|
1313
1287
|
placeholder: "Type something...",
|
|
1314
1288
|
value: o,
|
|
1315
|
-
onChange:
|
|
1289
|
+
onChange: l,
|
|
1316
1290
|
flexShrink: 0,
|
|
1317
1291
|
variant: "subtle",
|
|
1318
1292
|
name: "search",
|
|
@@ -1322,8 +1296,8 @@ const ln = H.Root, an = H.ValueText, me = () => {
|
|
|
1322
1296
|
focusRingColor: "transparent"
|
|
1323
1297
|
}
|
|
1324
1298
|
),
|
|
1325
|
-
/* @__PURE__ */
|
|
1326
|
-
|
|
1299
|
+
/* @__PURE__ */ s(
|
|
1300
|
+
T,
|
|
1327
1301
|
{
|
|
1328
1302
|
style: { overflow: "hidden", overflowY: "auto" },
|
|
1329
1303
|
overflow: "auto",
|
|
@@ -1331,35 +1305,32 @@ const ln = H.Root, an = H.ValueText, me = () => {
|
|
|
1331
1305
|
flex: 1,
|
|
1332
1306
|
children: [
|
|
1333
1307
|
r === "start" && /* @__PURE__ */ n(g, { children: "Searching ..." }),
|
|
1334
|
-
|
|
1335
|
-
r === "end" && (
|
|
1336
|
-
/* @__PURE__ */
|
|
1337
|
-
|
|
1308
|
+
a?.length === 0 && /* @__PURE__ */ n(g, { children: "No results" }),
|
|
1309
|
+
r === "end" && (a?.length ?? 0) > 0 && /* @__PURE__ */ s(T, { children: [
|
|
1310
|
+
/* @__PURE__ */ s(g, { fontSize: "md", children: [
|
|
1311
|
+
a?.length,
|
|
1338
1312
|
" result(s)"
|
|
1339
1313
|
] }),
|
|
1340
|
-
/* @__PURE__ */ n(
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
x
|
|
1354
|
-
);
|
|
1355
|
-
}) })
|
|
1314
|
+
/* @__PURE__ */ n(T, { gap: 0, children: u?.map((d, b) => /* @__PURE__ */ n(
|
|
1315
|
+
xt,
|
|
1316
|
+
{
|
|
1317
|
+
contextText: d.meta?.range?.startContainer.parentElement?.textContent ?? "",
|
|
1318
|
+
pageIndex: d.meta?.itemPageIndex,
|
|
1319
|
+
startOffset: d.meta?.range?.startOffset ?? 0,
|
|
1320
|
+
text: o,
|
|
1321
|
+
cfi: d.meta.cfi,
|
|
1322
|
+
onClick: c,
|
|
1323
|
+
absolutePageIndex: d.meta?.absolutePageIndex
|
|
1324
|
+
},
|
|
1325
|
+
b
|
|
1326
|
+
)) })
|
|
1356
1327
|
] })
|
|
1357
1328
|
]
|
|
1358
1329
|
}
|
|
1359
1330
|
)
|
|
1360
1331
|
] });
|
|
1361
1332
|
}
|
|
1362
|
-
),
|
|
1333
|
+
), kt = m(
|
|
1363
1334
|
({
|
|
1364
1335
|
open: e,
|
|
1365
1336
|
setOpen: t,
|
|
@@ -1373,46 +1344,44 @@ const ln = H.Root, an = H.ValueText, me = () => {
|
|
|
1373
1344
|
onOpenChange: (i) => t(i.open),
|
|
1374
1345
|
size: { mdDown: "full", md: "lg" },
|
|
1375
1346
|
scrollBehavior: "inside",
|
|
1376
|
-
children: /* @__PURE__ */
|
|
1347
|
+
children: /* @__PURE__ */ s(V, { height: "100%", children: [
|
|
1377
1348
|
/* @__PURE__ */ n(q, { children: /* @__PURE__ */ n(K, { children: "Search" }) }),
|
|
1378
|
-
/* @__PURE__ */ n(Q, { flex: 1, p: 0, children: /* @__PURE__ */ n(
|
|
1349
|
+
/* @__PURE__ */ n(Q, { flex: 1, p: 0, children: /* @__PURE__ */ n(It, { onNavigate: o }) }),
|
|
1379
1350
|
/* @__PURE__ */ n(U, { children: /* @__PURE__ */ n(Z, { asChild: !0, children: /* @__PURE__ */ n(j, { variant: "outline", children: "Cancel" }) }) }),
|
|
1380
1351
|
/* @__PURE__ */ n(G, {})
|
|
1381
1352
|
] })
|
|
1382
1353
|
}
|
|
1383
1354
|
)
|
|
1384
|
-
),
|
|
1385
|
-
({
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
const
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
l = l == null ? void 0 : l.subChapter;
|
|
1394
|
-
const x = (h, m, S) => /* @__PURE__ */ c(Me.Fragment, { children: [
|
|
1355
|
+
), St = m(
|
|
1356
|
+
({ onNavigate: e }) => {
|
|
1357
|
+
const t = p(), { manifest: o, assumedRenditionLayout: i } = f(() => t?.context.state$, [t]) ?? {}, { nav: r } = o ?? {}, a = $();
|
|
1358
|
+
r?.toc;
|
|
1359
|
+
const { beginSpineItemIndex: l, beginPageIndexInSpineItem: c } = a ?? {}, u = (i === "reflowable" ? c : l) || 0;
|
|
1360
|
+
let d = a?.beginChapterInfo;
|
|
1361
|
+
for (; d?.subChapter; )
|
|
1362
|
+
d = d?.subChapter;
|
|
1363
|
+
const b = (h, x, S) => /* @__PURE__ */ s(Me.Fragment, { children: [
|
|
1395
1364
|
/* @__PURE__ */ n(
|
|
1396
|
-
|
|
1365
|
+
y.Item,
|
|
1397
1366
|
{
|
|
1398
1367
|
pl: 4 * (S + 1),
|
|
1399
1368
|
style: {
|
|
1400
1369
|
display: "flex",
|
|
1401
1370
|
alignItems: "center"
|
|
1402
1371
|
},
|
|
1403
|
-
children: /* @__PURE__ */
|
|
1372
|
+
children: /* @__PURE__ */ s(
|
|
1404
1373
|
pe,
|
|
1405
1374
|
{
|
|
1406
1375
|
onClick: () => {
|
|
1407
|
-
e(), t
|
|
1376
|
+
e(), t?.navigation.goToUrl(h.href);
|
|
1408
1377
|
},
|
|
1409
1378
|
href: "#",
|
|
1410
1379
|
children: [
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
/* @__PURE__ */
|
|
1380
|
+
d?.path === h.path && /* @__PURE__ */ n(y.Indicator, { asChild: !0, children: /* @__PURE__ */ n(Ce, {}) }),
|
|
1381
|
+
d?.path !== h.path && /* @__PURE__ */ n(y.Indicator, { asChild: !0, visibility: "hidden", children: /* @__PURE__ */ n(Ce, {}) }),
|
|
1382
|
+
/* @__PURE__ */ s(T, { gap: 0, children: [
|
|
1414
1383
|
/* @__PURE__ */ n(g, { fontSize: "md", children: h.title || h.path }),
|
|
1415
|
-
|
|
1384
|
+
d?.path === h.path && /* @__PURE__ */ n(
|
|
1416
1385
|
g,
|
|
1417
1386
|
{
|
|
1418
1387
|
fontStyle: "italic",
|
|
@@ -1427,13 +1396,13 @@ const ln = H.Root, an = H.ValueText, me = () => {
|
|
|
1427
1396
|
)
|
|
1428
1397
|
}
|
|
1429
1398
|
),
|
|
1430
|
-
h.contents.length > 0 && /* @__PURE__ */ n(
|
|
1431
|
-
(
|
|
1399
|
+
h.contents.length > 0 && /* @__PURE__ */ n(y.Root, { as: "div", gap: 2, children: h.contents.map(
|
|
1400
|
+
(w, B) => b(w, B, S + 1)
|
|
1432
1401
|
) })
|
|
1433
|
-
] },
|
|
1434
|
-
return /* @__PURE__ */ n(
|
|
1402
|
+
] }, x);
|
|
1403
|
+
return /* @__PURE__ */ n(y.Root, { gap: 3, overflowY: "auto", py: 4, flex: 1, children: r?.toc.map((h, x) => b(h, x, 0)) });
|
|
1435
1404
|
}
|
|
1436
|
-
),
|
|
1405
|
+
), yt = m(
|
|
1437
1406
|
({
|
|
1438
1407
|
open: e,
|
|
1439
1408
|
setOpen: t,
|
|
@@ -1447,81 +1416,81 @@ const ln = H.Root, an = H.ValueText, me = () => {
|
|
|
1447
1416
|
onOpenChange: (i) => t(i.open),
|
|
1448
1417
|
size: { mdDown: "full", md: "lg" },
|
|
1449
1418
|
scrollBehavior: "inside",
|
|
1450
|
-
children: /* @__PURE__ */
|
|
1419
|
+
children: /* @__PURE__ */ s(V, { children: [
|
|
1451
1420
|
/* @__PURE__ */ n(q, { children: /* @__PURE__ */ n(K, { children: "Table of Contents" }) }),
|
|
1452
|
-
/* @__PURE__ */ n(Q, { overflowY: "auto", flex: 1, children: /* @__PURE__ */ n(
|
|
1421
|
+
/* @__PURE__ */ n(Q, { overflowY: "auto", flex: 1, children: /* @__PURE__ */ n(St, { onNavigate: o }) }),
|
|
1453
1422
|
/* @__PURE__ */ n(U, { children: /* @__PURE__ */ n(Z, { asChild: !0, children: /* @__PURE__ */ n(j, { variant: "outline", children: "Cancel" }) }) }),
|
|
1454
1423
|
/* @__PURE__ */ n(G, {})
|
|
1455
1424
|
] })
|
|
1456
1425
|
}
|
|
1457
1426
|
)
|
|
1458
|
-
),
|
|
1427
|
+
), jt = ({
|
|
1459
1428
|
enableFloatingTime: e = !0,
|
|
1460
1429
|
enableFloatingProgress: t = !0,
|
|
1461
1430
|
onItemClick: o
|
|
1462
1431
|
}) => {
|
|
1463
|
-
const [i, r] =
|
|
1464
|
-
r(!1),
|
|
1465
|
-
}, [
|
|
1466
|
-
(
|
|
1467
|
-
|
|
1432
|
+
const [i, r] = k(!1), [a, l] = k(!1), [c, u] = k(!1), [d, b] = k(void 0), [h, x] = k(!1), [S, w] = me(), B = N(() => {
|
|
1433
|
+
r(!1), l(!1), u(!1), b(void 0), w(!1), x(!1);
|
|
1434
|
+
}, [w]), _ = N(
|
|
1435
|
+
(C) => {
|
|
1436
|
+
C === "annotations" ? b("annotations") : C === "search" ? u(!0) : C === "help" ? l(!0) : C === "toc" ? r(!0) : C === "bookmarks" ? b("bookmarks") : C === "gallery" && x(!0), o?.(C);
|
|
1468
1437
|
},
|
|
1469
1438
|
[o]
|
|
1470
1439
|
);
|
|
1471
|
-
return
|
|
1440
|
+
return et(), ot(), Hn(), /* @__PURE__ */ s(oe, { children: [
|
|
1472
1441
|
t && /* @__PURE__ */ n(
|
|
1473
|
-
|
|
1442
|
+
ne,
|
|
1474
1443
|
{
|
|
1475
1444
|
present: !S,
|
|
1476
1445
|
animationName: { _open: "fade-in", _closed: "fade-out" },
|
|
1477
1446
|
animationDuration: "moderate",
|
|
1478
|
-
children: /* @__PURE__ */ n(
|
|
1447
|
+
children: /* @__PURE__ */ n(Kn, {})
|
|
1479
1448
|
}
|
|
1480
1449
|
),
|
|
1481
|
-
/* @__PURE__ */ n(
|
|
1482
|
-
/* @__PURE__ */ n(
|
|
1483
|
-
/* @__PURE__ */ n(
|
|
1484
|
-
/* @__PURE__ */ n(
|
|
1450
|
+
/* @__PURE__ */ n(Yn, { open: h, setOpen: x }),
|
|
1451
|
+
/* @__PURE__ */ n(bt, { onItemClick: _ }),
|
|
1452
|
+
/* @__PURE__ */ n(_n, {}),
|
|
1453
|
+
/* @__PURE__ */ n(Qn, { open: a, setOpen: l }),
|
|
1485
1454
|
/* @__PURE__ */ n(
|
|
1486
|
-
|
|
1455
|
+
yt,
|
|
1487
1456
|
{
|
|
1488
1457
|
open: i,
|
|
1489
1458
|
setOpen: r,
|
|
1490
|
-
onNavigate:
|
|
1459
|
+
onNavigate: B
|
|
1491
1460
|
}
|
|
1492
1461
|
),
|
|
1493
1462
|
/* @__PURE__ */ n(
|
|
1494
|
-
|
|
1463
|
+
kt,
|
|
1495
1464
|
{
|
|
1496
|
-
open:
|
|
1465
|
+
open: c,
|
|
1497
1466
|
setOpen: u,
|
|
1498
|
-
onNavigate:
|
|
1467
|
+
onNavigate: B
|
|
1499
1468
|
}
|
|
1500
1469
|
),
|
|
1501
1470
|
/* @__PURE__ */ n(
|
|
1502
|
-
|
|
1471
|
+
Dn,
|
|
1503
1472
|
{
|
|
1504
|
-
openWith:
|
|
1505
|
-
setOpen: (
|
|
1506
|
-
onNavigate:
|
|
1473
|
+
openWith: d,
|
|
1474
|
+
setOpen: (C) => b(C ? "annotations" : void 0),
|
|
1475
|
+
onNavigate: B
|
|
1507
1476
|
}
|
|
1508
1477
|
),
|
|
1509
1478
|
/* @__PURE__ */ n(
|
|
1510
|
-
|
|
1479
|
+
ne,
|
|
1511
1480
|
{
|
|
1512
1481
|
present: e || S,
|
|
1513
1482
|
animationName: { _open: "fade-in", _closed: "fade-out" },
|
|
1514
1483
|
animationDuration: "slow",
|
|
1515
1484
|
overflow: "hidden",
|
|
1516
|
-
children: /* @__PURE__ */ n(
|
|
1485
|
+
children: /* @__PURE__ */ n(Jn, {})
|
|
1517
1486
|
}
|
|
1518
1487
|
),
|
|
1519
|
-
/* @__PURE__ */ n(
|
|
1488
|
+
/* @__PURE__ */ n(Wn, {})
|
|
1520
1489
|
] });
|
|
1521
1490
|
};
|
|
1522
1491
|
export {
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1492
|
+
Ln as BOOKMARK_AREA_DATA_ATTRIBUTE,
|
|
1493
|
+
jt as ReactReader,
|
|
1494
|
+
Ft as ReactReaderProvider
|
|
1526
1495
|
};
|
|
1527
1496
|
//# sourceMappingURL=index.js.map
|