@prose-reader/react-reader 1.259.0 → 1.261.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/context/context.d.ts +5 -4
- package/dist/index.js +647 -604
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/dist/settings/types.d.ts +12 -6
- package/package.json +2 -2
- package/dist/common/useMemoCompare.d.ts +0 -1
package/dist/index.js
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { IconButton as R, Portal as
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
5
|
-
import { LuX as
|
|
6
|
-
import { signal as N, useObserve as
|
|
7
|
-
import { Subject as Rn, map as
|
|
8
|
-
import { createPortal as
|
|
9
|
-
import { isPositionInArea as
|
|
1
|
+
import { jsx as e, jsxs as s, Fragment as ce } from "react/jsx-runtime";
|
|
2
|
+
import { IconButton as R, Portal as Ce, Dialog as T, List as A, Link as ve, Stack as z, Text as b, Tabs as P, Button as H, Presence as ae, Box as F, createToaster as Xe, Toaster as Ke, Toast as J, Spinner as Je, RadioGroup as oe, Slider as w, HStack as B, For as en, Fieldset as V, Heading as me, Kbd as Te, Popover as ee, Progress as le, chakra as nn, Collapsible as be, Field as te, Input as tn } from "@chakra-ui/react";
|
|
3
|
+
import * as E from "react";
|
|
4
|
+
import on, { createContext as rn, useContext as Fe, memo as f, useState as y, useEffect as $, useCallback as O, useMemo as an, useLayoutEffect as ln, useRef as sn } from "react";
|
|
5
|
+
import { LuX as cn, LuNotebookPen as he, LuBookmark as dn, LuCheck as un, LuArrowBigRight as hn, LuArrowBigLeft as pn, LuChevronDown as gn, LuCircleHelp as fn, LuTableOfContents as mn, LuSearch as bn, LuZoomOut as Sn, LuZoomIn as Cn, LuGalleryHorizontal as vn, LuCircleCheck as Me } from "react-icons/lu";
|
|
6
|
+
import { signal as N, useObserve as S, isDefined as De, useConstant as re, useSignalValue as ue, useMemoCompare as xn, useLiveRef as kn, useSubscribe as de, useSignalState as In } from "reactjrx";
|
|
7
|
+
import { Subject as Rn, map as D, filter as pe, switchMap as W, EMPTY as we, of as ge, withLatestFrom as zn, NEVER as xe, startWith as On, distinctUntilChanged as _e, throttleTime as Le, tap as Tn, first as $e, combineLatest as Mn, mergeMap as wn, Observable as yn, skip as Pn, merge as Ve, timer as Ne, finalize as En, BehaviorSubject as An, animationFrameScheduler as Bn } from "rxjs";
|
|
8
|
+
import { createPortal as Fn } from "react-dom";
|
|
9
|
+
import { isPositionInArea as Dn } from "@prose-reader/enhancer-gestures";
|
|
10
10
|
import { isShallowEqual as _n } from "@prose-reader/shared";
|
|
11
|
-
import { isShallowEqual as Ln, observeIntersection as
|
|
11
|
+
import { isShallowEqual as Ln, observeIntersection as $n, isHtmlTagElement as Vn } from "@prose-reader/core";
|
|
12
12
|
import { BiFontSize as Nn } from "react-icons/bi";
|
|
13
|
-
import { BsBookmarks as
|
|
14
|
-
import { MdOutlineFitScreen as
|
|
13
|
+
import { BsBookmarks as Wn } from "react-icons/bs";
|
|
14
|
+
import { MdOutlineFitScreen as Hn, MdFullscreenExit as Gn, MdFullscreen as qn } from "react-icons/md";
|
|
15
15
|
import { RiGalleryView2 as jn } from "react-icons/ri";
|
|
16
|
-
import { RxDoubleArrowUp as
|
|
16
|
+
import { RxDoubleArrowUp as Un, RxDoubleArrowLeft as Qn, RxDoubleArrowDown as Yn, RxDoubleArrowRight as Zn } from "react-icons/rx";
|
|
17
17
|
import { HiOutlineInformationCircle as Xn } from "react-icons/hi";
|
|
18
18
|
import Kn from "rc-slider";
|
|
19
19
|
import "rc-slider/assets/index.css";
|
|
20
20
|
import { IoIosArrowBack as Jn, IoMdMore as et } from "react-icons/io";
|
|
21
|
-
const nt = "data-bookmark-area", tt =
|
|
22
|
-
return /* @__PURE__ */ e(R, { variant: "ghost", "aria-label": "Close", ref: o, ...t, children: t.children ?? /* @__PURE__ */ e(
|
|
23
|
-
}), G =
|
|
21
|
+
const nt = "data-bookmark-area", tt = E.forwardRef(function(t, o) {
|
|
22
|
+
return /* @__PURE__ */ e(R, { variant: "ghost", "aria-label": "Close", ref: o, ...t, children: t.children ?? /* @__PURE__ */ e(cn, {}) });
|
|
23
|
+
}), G = E.forwardRef(function(t, o) {
|
|
24
24
|
const {
|
|
25
25
|
children: r,
|
|
26
26
|
portalled: i = !0,
|
|
27
27
|
portalRef: a,
|
|
28
|
-
backdrop:
|
|
28
|
+
backdrop: l = !0,
|
|
29
29
|
...c
|
|
30
30
|
} = t;
|
|
31
|
-
return /* @__PURE__ */
|
|
32
|
-
|
|
33
|
-
/* @__PURE__ */ e(
|
|
31
|
+
return /* @__PURE__ */ s(Ce, { disabled: !i, container: a, children: [
|
|
32
|
+
l && /* @__PURE__ */ e(T.Backdrop, {}),
|
|
33
|
+
/* @__PURE__ */ e(T.Positioner, { children: /* @__PURE__ */ e(T.Content, { ref: o, ...c, asChild: !1, children: r }) })
|
|
34
34
|
] });
|
|
35
|
-
}),
|
|
35
|
+
}), q = E.forwardRef(function(t, o) {
|
|
36
36
|
return /* @__PURE__ */ e(
|
|
37
|
-
|
|
37
|
+
T.CloseTrigger,
|
|
38
38
|
{
|
|
39
39
|
position: "absolute",
|
|
40
40
|
top: "2",
|
|
@@ -44,12 +44,12 @@ const nt = "data-bookmark-area", tt = B.forwardRef(function(t, o) {
|
|
|
44
44
|
children: /* @__PURE__ */ e(tt, { size: "sm", ref: o, children: t.children })
|
|
45
45
|
}
|
|
46
46
|
);
|
|
47
|
-
}),
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
const
|
|
47
|
+
}), j = T.Root, U = T.Footer, Q = T.Header, Y = T.Body;
|
|
48
|
+
T.Backdrop;
|
|
49
|
+
const Z = T.Title;
|
|
50
|
+
T.Description;
|
|
51
|
+
T.Trigger;
|
|
52
|
+
const X = T.ActionTrigger, We = () => ({
|
|
53
53
|
reader: void 0,
|
|
54
54
|
quickMenuOpen: !1,
|
|
55
55
|
onQuickMenuOpenChange: () => {
|
|
@@ -67,21 +67,21 @@ const K = z.ActionTrigger, qe = () => ({
|
|
|
67
67
|
fontSizeMin: 0.2,
|
|
68
68
|
fontSizeMax: 5,
|
|
69
69
|
uncontrolledFontSize: 1
|
|
70
|
-
}),
|
|
71
|
-
N({ default:
|
|
70
|
+
}), ke = rn(
|
|
71
|
+
N({ default: We() })
|
|
72
72
|
), _ = (n) => {
|
|
73
|
-
const t =
|
|
74
|
-
return
|
|
75
|
-
},
|
|
73
|
+
const t = Fe(ke);
|
|
74
|
+
return S(t, n);
|
|
75
|
+
}, He = () => Fe(ke), C = () => {
|
|
76
76
|
const { reader: n } = _(["reader"]);
|
|
77
77
|
return n;
|
|
78
|
-
}, Ge = (n) => !!n && "__PROSE_READER_ENHANCER_SEARCH" in n,
|
|
79
|
-
const t =
|
|
80
|
-
return { data:
|
|
78
|
+
}, Ge = (n) => !!n && "__PROSE_READER_ENHANCER_SEARCH" in n, se = (n) => !!n && "__PROSE_READER_ENHANCER_ANNOTATIONS" in n, qe = (n) => !!n && "__PROSE_READER_ENHANCER_GALLERY" in n, je = (n) => !!n && "__PROSE_READER_ENHANCER_REFIT" in n, ot = (n) => {
|
|
79
|
+
const t = C(), o = se(t) ? t : void 0;
|
|
80
|
+
return { data: S(
|
|
81
81
|
() => o?.annotations.annotations$.pipe(
|
|
82
|
-
|
|
83
|
-
pe(
|
|
84
|
-
|
|
82
|
+
D((i) => i.find((a) => a.id === n)),
|
|
83
|
+
pe(De),
|
|
84
|
+
W((i) => o.locateResource(i))
|
|
85
85
|
),
|
|
86
86
|
[o]
|
|
87
87
|
) };
|
|
@@ -90,9 +90,9 @@ const K = z.ActionTrigger, qe = () => ({
|
|
|
90
90
|
onNavigate: t,
|
|
91
91
|
allowLeftIcon: o = !0
|
|
92
92
|
}) => {
|
|
93
|
-
const r =
|
|
94
|
-
return /* @__PURE__ */ e(A.Item, { children: /* @__PURE__ */
|
|
95
|
-
|
|
93
|
+
const r = C(), { data: i } = ot(n), a = i?.meta.range?.toString() || i?.meta.node?.textContent;
|
|
94
|
+
return /* @__PURE__ */ e(A.Item, { children: /* @__PURE__ */ s(
|
|
95
|
+
ve,
|
|
96
96
|
{
|
|
97
97
|
href: "#",
|
|
98
98
|
onClick: () => {
|
|
@@ -100,8 +100,8 @@ const K = z.ActionTrigger, qe = () => ({
|
|
|
100
100
|
},
|
|
101
101
|
children: [
|
|
102
102
|
i?.resource?.notes ? /* @__PURE__ */ e(A.Indicator, { asChild: !0, children: /* @__PURE__ */ e(he, {}) }) : o ? /* @__PURE__ */ e(A.Indicator, { asChild: !0, visibility: "hidden", children: /* @__PURE__ */ e(he, {}) }) : null,
|
|
103
|
-
/* @__PURE__ */
|
|
104
|
-
a ? /* @__PURE__ */ e(b, { lineClamp: 2, fontSize: "md", children: a }) : /* @__PURE__ */
|
|
103
|
+
/* @__PURE__ */ s(z, { gap: 0, children: [
|
|
104
|
+
a ? /* @__PURE__ */ e(b, { lineClamp: 2, fontSize: "md", children: a }) : /* @__PURE__ */ s(b, { lineClamp: 2, fontSize: "md", fontStyle: "italic", children: [
|
|
105
105
|
"Page ",
|
|
106
106
|
(i?.meta.absolutePageIndex ?? 0) + 1
|
|
107
107
|
] }),
|
|
@@ -118,23 +118,23 @@ const K = z.ActionTrigger, qe = () => ({
|
|
|
118
118
|
]
|
|
119
119
|
}
|
|
120
120
|
) });
|
|
121
|
-
},
|
|
122
|
-
const n =
|
|
123
|
-
return { data:
|
|
121
|
+
}, fe = () => {
|
|
122
|
+
const n = C(), t = se(n) ? n : void 0;
|
|
123
|
+
return { data: S(
|
|
124
124
|
() => t?.annotations.annotations$.pipe(
|
|
125
|
-
|
|
125
|
+
W(
|
|
126
126
|
(r) => t.locateResource(r)
|
|
127
127
|
)
|
|
128
128
|
),
|
|
129
129
|
[t]
|
|
130
130
|
) };
|
|
131
|
-
},
|
|
132
|
-
const { data: n } =
|
|
131
|
+
}, rt = () => {
|
|
132
|
+
const { data: n } = fe();
|
|
133
133
|
return {
|
|
134
134
|
data: n?.filter((t) => t.meta.isCfiRange)
|
|
135
135
|
};
|
|
136
|
-
},
|
|
137
|
-
const { data: t } =
|
|
136
|
+
}, it = ({ onNavigate: n }) => {
|
|
137
|
+
const { data: t } = rt();
|
|
138
138
|
return /* @__PURE__ */ e(A.Root, { overflowY: "auto", gap: 3, pt: 4, variant: "plain", children: t?.map((o) => /* @__PURE__ */ e(
|
|
139
139
|
Ue,
|
|
140
140
|
{
|
|
@@ -143,15 +143,15 @@ const K = z.ActionTrigger, qe = () => ({
|
|
|
143
143
|
},
|
|
144
144
|
o.resource.id
|
|
145
145
|
)) });
|
|
146
|
-
},
|
|
147
|
-
const { data: n } =
|
|
146
|
+
}, at = () => {
|
|
147
|
+
const { data: n } = fe();
|
|
148
148
|
return {
|
|
149
149
|
data: n?.filter(
|
|
150
150
|
(t) => !t.meta.isCfiRange && !t.resource.notes
|
|
151
151
|
)
|
|
152
152
|
};
|
|
153
|
-
},
|
|
154
|
-
const { data: t } =
|
|
153
|
+
}, lt = ({ onNavigate: n }) => {
|
|
154
|
+
const { data: t } = at();
|
|
155
155
|
return /* @__PURE__ */ e(A.Root, { overflowY: "auto", gap: 3, pt: 4, variant: "plain", children: t?.map((o) => /* @__PURE__ */ e(
|
|
156
156
|
Ue,
|
|
157
157
|
{
|
|
@@ -161,42 +161,42 @@ const K = z.ActionTrigger, qe = () => ({
|
|
|
161
161
|
},
|
|
162
162
|
o.resource.id
|
|
163
163
|
)) });
|
|
164
|
-
},
|
|
164
|
+
}, st = f(
|
|
165
165
|
({
|
|
166
166
|
onNavigate: n,
|
|
167
167
|
defaultTab: t
|
|
168
168
|
}) => {
|
|
169
169
|
const [o, r] = y(t ?? "bookmarks");
|
|
170
|
-
return /* @__PURE__ */
|
|
171
|
-
|
|
170
|
+
return /* @__PURE__ */ s(
|
|
171
|
+
P.Root,
|
|
172
172
|
{
|
|
173
173
|
value: o,
|
|
174
174
|
onValueChange: (i) => r(i.value),
|
|
175
175
|
children: [
|
|
176
|
-
/* @__PURE__ */
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
-
/* @__PURE__ */ e(
|
|
176
|
+
/* @__PURE__ */ s(P.List, { children: [
|
|
177
|
+
/* @__PURE__ */ s(P.Trigger, { value: "bookmarks", children: [
|
|
178
|
+
/* @__PURE__ */ e(dn, {}),
|
|
179
179
|
"Bookmarks"
|
|
180
180
|
] }),
|
|
181
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ s(P.Trigger, { value: "annotations", children: [
|
|
182
182
|
/* @__PURE__ */ e(he, {}),
|
|
183
183
|
"Annotations"
|
|
184
184
|
] }),
|
|
185
|
-
/* @__PURE__ */ e(
|
|
185
|
+
/* @__PURE__ */ e(P.Indicator, {})
|
|
186
186
|
] }),
|
|
187
|
-
/* @__PURE__ */ e(
|
|
188
|
-
/* @__PURE__ */ e(
|
|
187
|
+
/* @__PURE__ */ e(P.Content, { value: "bookmarks", children: /* @__PURE__ */ e(lt, { onNavigate: n }) }),
|
|
188
|
+
/* @__PURE__ */ e(P.Content, { value: "annotations", children: /* @__PURE__ */ e(it, { onNavigate: n }) })
|
|
189
189
|
]
|
|
190
190
|
}
|
|
191
191
|
);
|
|
192
192
|
}
|
|
193
|
-
),
|
|
193
|
+
), ct = f(
|
|
194
194
|
({
|
|
195
195
|
openWith: n,
|
|
196
196
|
setOpen: t,
|
|
197
197
|
onNavigate: o
|
|
198
198
|
}) => /* @__PURE__ */ e(
|
|
199
|
-
|
|
199
|
+
j,
|
|
200
200
|
{
|
|
201
201
|
lazyMount: !0,
|
|
202
202
|
placement: "center",
|
|
@@ -204,60 +204,60 @@ const K = z.ActionTrigger, qe = () => ({
|
|
|
204
204
|
onOpenChange: (r) => t(r.open),
|
|
205
205
|
size: { mdDown: "full", md: "lg" },
|
|
206
206
|
scrollBehavior: "inside",
|
|
207
|
-
children: /* @__PURE__ */
|
|
208
|
-
/* @__PURE__ */ e(
|
|
209
|
-
/* @__PURE__ */ e(
|
|
210
|
-
|
|
207
|
+
children: /* @__PURE__ */ s(G, { height: "100%", children: [
|
|
208
|
+
/* @__PURE__ */ e(Q, { children: /* @__PURE__ */ e(Z, { children: "Annotations" }) }),
|
|
209
|
+
/* @__PURE__ */ e(Y, { flex: 1, children: /* @__PURE__ */ e(
|
|
210
|
+
st,
|
|
211
211
|
{
|
|
212
212
|
onNavigate: o,
|
|
213
213
|
defaultTab: n
|
|
214
214
|
}
|
|
215
215
|
) }),
|
|
216
|
-
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(
|
|
217
|
-
/* @__PURE__ */ e(
|
|
216
|
+
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(X, { asChild: !0, children: /* @__PURE__ */ e(H, { variant: "outline", children: "Cancel" }) }) }),
|
|
217
|
+
/* @__PURE__ */ e(q, {})
|
|
218
218
|
] })
|
|
219
219
|
}
|
|
220
220
|
)
|
|
221
|
-
),
|
|
222
|
-
const t =
|
|
223
|
-
return o ? /* @__PURE__ */ e(
|
|
224
|
-
}),
|
|
221
|
+
), dt = f(({ children: n }) => {
|
|
222
|
+
const t = C(), o = S(() => t?.spine.element$, [t]);
|
|
223
|
+
return o ? /* @__PURE__ */ e(ce, { children: Fn(n, o) }) : null;
|
|
224
|
+
}), ut = ({
|
|
225
225
|
absolutePageIndex: n,
|
|
226
226
|
itemIndex: t
|
|
227
227
|
}) => {
|
|
228
|
-
const o =
|
|
228
|
+
const o = C();
|
|
229
229
|
return {
|
|
230
|
-
spineItem:
|
|
231
|
-
|
|
230
|
+
spineItem: S(() => o ? t !== void 0 ? ge(o.spine.spineItemsManager.get(t)) : n !== void 0 ? o.spine.pages.observeFromAbsolutePageIndex(n).pipe(
|
|
231
|
+
D((i) => o.spine.spineItemsManager.get(i?.itemIndex))
|
|
232
232
|
) : we : we, [t, n, o])
|
|
233
233
|
};
|
|
234
|
-
},
|
|
234
|
+
}, ht = ({
|
|
235
235
|
absolutePageIndex: n,
|
|
236
236
|
itemIndex: t
|
|
237
237
|
}) => {
|
|
238
|
-
const { spineItem: o } =
|
|
238
|
+
const { spineItem: o } = ut({ absolutePageIndex: n, itemIndex: t }), r = S(
|
|
239
239
|
() => o?.isReady$ ?? ge(!1),
|
|
240
240
|
[o]
|
|
241
241
|
);
|
|
242
242
|
return { spineItem: o, isReady: r };
|
|
243
|
-
},
|
|
243
|
+
}, pt = f(
|
|
244
244
|
({
|
|
245
245
|
absolutePageIndex: n,
|
|
246
246
|
left: t,
|
|
247
247
|
top: o,
|
|
248
248
|
width: r
|
|
249
249
|
}) => {
|
|
250
|
-
const { isReady: i } =
|
|
250
|
+
const { isReady: i } = ht({
|
|
251
251
|
absolutePageIndex: n
|
|
252
|
-
}), { data: a } =
|
|
252
|
+
}), { data: a } = fe(), l = a?.find(
|
|
253
253
|
(d) => d?.meta?.absolutePageIndex === n && d.meta.range === void 0
|
|
254
254
|
);
|
|
255
255
|
if (!i) return null;
|
|
256
256
|
const c = r * 0.1 / 2;
|
|
257
257
|
return /* @__PURE__ */ e(
|
|
258
|
-
|
|
258
|
+
ae,
|
|
259
259
|
{
|
|
260
|
-
present: !!
|
|
260
|
+
present: !!l,
|
|
261
261
|
lazyMount: !0,
|
|
262
262
|
animationName: { _open: "fade-in", _closed: "fade-out" },
|
|
263
263
|
animationDuration: "moderate",
|
|
@@ -287,11 +287,11 @@ const K = z.ActionTrigger, qe = () => ({
|
|
|
287
287
|
}
|
|
288
288
|
);
|
|
289
289
|
}
|
|
290
|
-
),
|
|
291
|
-
const n =
|
|
292
|
-
return /* @__PURE__ */ e(
|
|
290
|
+
), gt = f(() => {
|
|
291
|
+
const n = C(), t = S(() => n?.layoutInfo$, [n]);
|
|
292
|
+
return /* @__PURE__ */ e(dt, { children: t?.pages.map(
|
|
293
293
|
({ absoluteLayout: { left: o, top: r, width: i } }, a) => /* @__PURE__ */ e(
|
|
294
|
-
|
|
294
|
+
pt,
|
|
295
295
|
{
|
|
296
296
|
absolutePageIndex: a,
|
|
297
297
|
left: o,
|
|
@@ -301,24 +301,24 @@ const K = z.ActionTrigger, qe = () => ({
|
|
|
301
301
|
a
|
|
302
302
|
)
|
|
303
303
|
) });
|
|
304
|
-
}),
|
|
305
|
-
const n =
|
|
306
|
-
return
|
|
307
|
-
},
|
|
308
|
-
const n =
|
|
309
|
-
|
|
304
|
+
}), ft = () => {
|
|
305
|
+
const n = C();
|
|
306
|
+
return se(n) ? n : void 0;
|
|
307
|
+
}, mt = () => {
|
|
308
|
+
const n = ft(), { data: t } = fe();
|
|
309
|
+
$(() => n ? n.gestures.hooks.register(
|
|
310
310
|
"beforeTapGesture",
|
|
311
311
|
({ event$: r }) => r.pipe(
|
|
312
|
-
|
|
313
|
-
|
|
312
|
+
zn(n?.annotations.candidates$),
|
|
313
|
+
D(([i, a]) => {
|
|
314
314
|
if (!i.page) return !0;
|
|
315
315
|
const {
|
|
316
|
-
spineItem:
|
|
316
|
+
spineItem: l,
|
|
317
317
|
spineItemPageIndex: c,
|
|
318
318
|
spineItemPagePosition: d,
|
|
319
319
|
pageSize: u
|
|
320
320
|
} = i.page;
|
|
321
|
-
if (
|
|
321
|
+
if (Dn(
|
|
322
322
|
d,
|
|
323
323
|
{
|
|
324
324
|
type: "corner",
|
|
@@ -329,12 +329,12 @@ const K = z.ActionTrigger, qe = () => ({
|
|
|
329
329
|
u
|
|
330
330
|
)) {
|
|
331
331
|
const h = n.spine.pages.fromSpineItemPageIndex(
|
|
332
|
-
|
|
332
|
+
l,
|
|
333
333
|
c
|
|
334
334
|
);
|
|
335
335
|
if (!h) return !0;
|
|
336
336
|
const m = t?.find(
|
|
337
|
-
(
|
|
337
|
+
(x) => x?.meta?.absolutePageIndex === h.absolutePageIndex && x.meta.range === void 0
|
|
338
338
|
);
|
|
339
339
|
if (m)
|
|
340
340
|
return n?.annotations.delete(m.resource.id), !1;
|
|
@@ -347,135 +347,147 @@ const K = z.ActionTrigger, qe = () => ({
|
|
|
347
347
|
})
|
|
348
348
|
)
|
|
349
349
|
) : void 0, [n, t]);
|
|
350
|
-
}, Se =
|
|
350
|
+
}, Se = Xe({
|
|
351
351
|
placement: "bottom-end",
|
|
352
352
|
pauseOnPageIdle: !0
|
|
353
|
-
}),
|
|
354
|
-
n.type === "loading" ? /* @__PURE__ */ e(
|
|
355
|
-
/* @__PURE__ */
|
|
356
|
-
n.title && /* @__PURE__ */ e(
|
|
357
|
-
n.description && /* @__PURE__ */ e(
|
|
353
|
+
}), bt = () => /* @__PURE__ */ e(Ce, { children: /* @__PURE__ */ e(Ke, { toaster: Se, insetInline: { mdDown: "4" }, children: (n) => /* @__PURE__ */ s(J.Root, { width: { md: "sm" }, children: [
|
|
354
|
+
n.type === "loading" ? /* @__PURE__ */ e(Je, { size: "sm", color: "blue.solid" }) : /* @__PURE__ */ e(J.Indicator, {}),
|
|
355
|
+
/* @__PURE__ */ s(z, { gap: "1", flex: "1", maxWidth: "100%", children: [
|
|
356
|
+
n.title && /* @__PURE__ */ e(J.Title, { children: n.title }),
|
|
357
|
+
n.description && /* @__PURE__ */ e(J.Description, { children: n.description })
|
|
358
358
|
] }),
|
|
359
|
-
n.action && /* @__PURE__ */ e(
|
|
360
|
-
n.meta?.closable && /* @__PURE__ */ e(
|
|
361
|
-
] }) }) }), St = (
|
|
362
|
-
const o = Fe({ value: n });
|
|
363
|
-
return _e(() => t(n, o.current.value) ? o.current.value : (o.current = { value: n }, n), [n, t]);
|
|
364
|
-
}, vt = ({
|
|
359
|
+
n.action && /* @__PURE__ */ e(J.ActionTrigger, { children: n.action.label }),
|
|
360
|
+
n.meta?.closable && /* @__PURE__ */ e(J.CloseTrigger, {})
|
|
361
|
+
] }) }) }), St = ({
|
|
365
362
|
children: n,
|
|
366
363
|
onQuickMenuOpenChange: t,
|
|
367
364
|
quickMenuOpen: o,
|
|
368
365
|
...r
|
|
369
366
|
}) => {
|
|
370
|
-
const i =
|
|
367
|
+
const i = re(() => N({ default: We() })), a = re(
|
|
371
368
|
() => N({ default: i.value.fontSizeMenuOpen })
|
|
372
|
-
),
|
|
369
|
+
), l = ue(
|
|
373
370
|
a
|
|
374
|
-
), c =
|
|
375
|
-
(
|
|
376
|
-
a.update(
|
|
371
|
+
), c = O(
|
|
372
|
+
(I) => {
|
|
373
|
+
a.update(I);
|
|
377
374
|
},
|
|
378
375
|
[a]
|
|
379
|
-
), d =
|
|
376
|
+
), d = re(
|
|
380
377
|
() => N({ default: i.value.quickMenuOpen })
|
|
381
|
-
), u =
|
|
382
|
-
(
|
|
383
|
-
d.update(
|
|
378
|
+
), u = O(
|
|
379
|
+
(I) => {
|
|
380
|
+
d.update(I);
|
|
384
381
|
},
|
|
385
382
|
[d]
|
|
386
|
-
),
|
|
383
|
+
), g = ue(
|
|
387
384
|
d
|
|
388
|
-
), h = o ??
|
|
385
|
+
), h = o ?? g, m = t ?? u, v = re(
|
|
389
386
|
() => N({ default: i.value.refitMenuOpen })
|
|
390
|
-
),
|
|
391
|
-
(
|
|
392
|
-
v.update(
|
|
387
|
+
), x = O(
|
|
388
|
+
(I) => {
|
|
389
|
+
v.update(I);
|
|
393
390
|
},
|
|
394
391
|
[v]
|
|
395
|
-
),
|
|
392
|
+
), M = ue(
|
|
396
393
|
v
|
|
397
|
-
),
|
|
398
|
-
return
|
|
399
|
-
i.update((
|
|
394
|
+
), k = xn(r, _n);
|
|
395
|
+
return $(() => {
|
|
396
|
+
i.update((I) => ({
|
|
397
|
+
...I,
|
|
400
398
|
...k,
|
|
401
|
-
...x,
|
|
402
399
|
onQuickMenuOpenChange: m,
|
|
403
400
|
quickMenuOpen: h,
|
|
404
401
|
onFontSizeMenuOpenChange: c,
|
|
405
|
-
fontSizeMenuOpen:
|
|
406
|
-
onRefitMenuOpenChange:
|
|
407
|
-
refitMenuOpen:
|
|
402
|
+
fontSizeMenuOpen: l,
|
|
403
|
+
onRefitMenuOpenChange: x,
|
|
404
|
+
refitMenuOpen: M
|
|
408
405
|
}));
|
|
409
406
|
}, [
|
|
410
|
-
|
|
407
|
+
k,
|
|
411
408
|
h,
|
|
412
409
|
m,
|
|
413
410
|
i,
|
|
414
|
-
|
|
411
|
+
l,
|
|
415
412
|
c,
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
]), /* @__PURE__ */ e(
|
|
419
|
-
},
|
|
420
|
-
({ children: n, ...t }) => /* @__PURE__ */ e(
|
|
421
|
-
),
|
|
413
|
+
M,
|
|
414
|
+
x
|
|
415
|
+
]), /* @__PURE__ */ e(ke.Provider, { value: i, children: n });
|
|
416
|
+
}, Ct = f(
|
|
417
|
+
({ children: n, ...t }) => /* @__PURE__ */ e(St, { ...t, children: n })
|
|
418
|
+
), ie = E.forwardRef(
|
|
422
419
|
function(t, o) {
|
|
423
|
-
const { children: r, inputProps: i, rootRef: a, ...
|
|
424
|
-
return /* @__PURE__ */
|
|
425
|
-
/* @__PURE__ */ e(
|
|
426
|
-
/* @__PURE__ */ e(
|
|
427
|
-
r && /* @__PURE__ */ e(
|
|
420
|
+
const { children: r, inputProps: i, rootRef: a, ...l } = t;
|
|
421
|
+
return /* @__PURE__ */ s(oe.Item, { ref: a, ...l, children: [
|
|
422
|
+
/* @__PURE__ */ e(oe.ItemHiddenInput, { ref: o, ...i }),
|
|
423
|
+
/* @__PURE__ */ e(oe.ItemIndicator, {}),
|
|
424
|
+
r && /* @__PURE__ */ e(oe.ItemText, { children: r })
|
|
428
425
|
] });
|
|
429
426
|
}
|
|
430
|
-
),
|
|
427
|
+
), Qe = oe.Root, Ie = E.forwardRef(
|
|
431
428
|
function(t, o) {
|
|
432
|
-
const { marks: r, label: i, showValue: a, ...
|
|
433
|
-
return /* @__PURE__ */
|
|
429
|
+
const { marks: r, label: i, showValue: a, ...l } = t, c = t.defaultValue ?? t.value, d = r?.map((g) => typeof g == "number" ? { value: g, label: void 0 } : g), u = !!d?.some((g) => g.label);
|
|
430
|
+
return /* @__PURE__ */ s(w.Root, { ref: o, thumbAlignment: "center", ...l, children: [
|
|
434
431
|
i && !a && /* @__PURE__ */ e(w.Label, { children: i }),
|
|
435
|
-
i && a && /* @__PURE__ */
|
|
432
|
+
i && a && /* @__PURE__ */ s(B, { justify: "space-between", children: [
|
|
436
433
|
/* @__PURE__ */ e(w.Label, { children: i }),
|
|
437
434
|
/* @__PURE__ */ e(w.ValueText, {})
|
|
438
435
|
] }),
|
|
439
|
-
/* @__PURE__ */
|
|
436
|
+
/* @__PURE__ */ s(w.Control, { "data-has-mark-label": u || void 0, children: [
|
|
440
437
|
/* @__PURE__ */ e(w.Track, { children: /* @__PURE__ */ e(w.Range, {}) }),
|
|
441
|
-
/* @__PURE__ */ e(
|
|
442
|
-
/* @__PURE__ */ e(
|
|
438
|
+
/* @__PURE__ */ e(vt, { value: c }),
|
|
439
|
+
/* @__PURE__ */ e(xt, { marks: d })
|
|
443
440
|
] })
|
|
444
441
|
] });
|
|
445
442
|
}
|
|
446
443
|
);
|
|
447
|
-
function
|
|
444
|
+
function vt(n) {
|
|
448
445
|
const { value: t } = n;
|
|
449
|
-
return /* @__PURE__ */ e(
|
|
446
|
+
return /* @__PURE__ */ e(en, { each: t, children: (o, r) => /* @__PURE__ */ e(w.Thumb, { index: r, children: /* @__PURE__ */ e(w.HiddenInput, {}) }, r) });
|
|
450
447
|
}
|
|
451
|
-
const
|
|
448
|
+
const xt = E.forwardRef(
|
|
452
449
|
function(t, o) {
|
|
453
450
|
const { marks: r } = t;
|
|
454
451
|
return r?.length ? /* @__PURE__ */ e(w.MarkerGroup, { ref: o, children: r.map((i, a) => {
|
|
455
|
-
const
|
|
456
|
-
return /* @__PURE__ */
|
|
452
|
+
const l = typeof i == "number" ? i : i.value, c = typeof i == "number" ? void 0 : i.label;
|
|
453
|
+
return /* @__PURE__ */ s(w.Marker, { value: l, children: [
|
|
457
454
|
/* @__PURE__ */ e(w.MarkerIndicator, {}),
|
|
458
455
|
c
|
|
459
456
|
] }, a);
|
|
460
457
|
}) }) : null;
|
|
461
458
|
}
|
|
462
|
-
),
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
459
|
+
), Re = [
|
|
460
|
+
{
|
|
461
|
+
value: "global",
|
|
462
|
+
references: ["global"]
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
value: "book",
|
|
466
|
+
references: ["book"]
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
value: "screen",
|
|
470
|
+
references: ["mobile", "tablet", "desktop"]
|
|
471
|
+
}
|
|
472
|
+
], kt = Re.map((n) => n.value), ye = Re.flatMap(
|
|
473
|
+
(n) => n.references
|
|
474
|
+
), It = (n) => {
|
|
475
|
+
if (n)
|
|
476
|
+
return Re.find(
|
|
477
|
+
(t) => t.references.includes(n)
|
|
478
|
+
)?.value;
|
|
479
|
+
}, Rt = f(() => {
|
|
480
|
+
const n = He(), {
|
|
470
481
|
fontSizeMenuOpen: t,
|
|
471
482
|
onFontSizeMenuOpenChange: o,
|
|
472
483
|
uncontrolledFontSize: r,
|
|
473
484
|
fontSize: i = r,
|
|
474
485
|
fontSizeMin: a,
|
|
475
|
-
fontSizeMax:
|
|
486
|
+
fontSizeMax: l,
|
|
476
487
|
fontSizeScope: c,
|
|
477
|
-
|
|
478
|
-
|
|
488
|
+
fontSizeValues: d,
|
|
489
|
+
onFontSizeChange: u,
|
|
490
|
+
onFontSizeScopeChange: g
|
|
479
491
|
} = _([
|
|
480
492
|
"fontSizeMenuOpen",
|
|
481
493
|
"onFontSizeMenuOpenChange",
|
|
@@ -485,120 +497,151 @@ const It = B.forwardRef(
|
|
|
485
497
|
"fontSizeScope",
|
|
486
498
|
"onFontSizeChange",
|
|
487
499
|
"onFontSizeScopeChange",
|
|
488
|
-
"uncontrolledFontSize"
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
Tt
|
|
492
|
-
]), [v, I] = y(
|
|
500
|
+
"uncontrolledFontSize",
|
|
501
|
+
"fontSizeValues"
|
|
502
|
+
]), h = kn(u), [m, v] = y(
|
|
493
503
|
c ?? "global"
|
|
494
|
-
),
|
|
495
|
-
(
|
|
496
|
-
|
|
497
|
-
...
|
|
498
|
-
|
|
504
|
+
), x = O(
|
|
505
|
+
(p, K) => {
|
|
506
|
+
h.current ? h.current(p, K) : n.update((Ze) => ({
|
|
507
|
+
...Ze,
|
|
508
|
+
uncontrolledFontSize: K
|
|
499
509
|
}));
|
|
500
510
|
},
|
|
501
|
-
[
|
|
502
|
-
),
|
|
503
|
-
(
|
|
504
|
-
[i]
|
|
505
|
-
), k =
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
width: "100%",
|
|
510
|
-
step: 0.1 * 100,
|
|
511
|
-
marks: [
|
|
512
|
-
{ value: 100, label: "Publisher" },
|
|
513
|
-
{ value: a * 100, label: `${a * 100}%` },
|
|
514
|
-
{ value: s * 100, label: `${s * 100}%` }
|
|
515
|
-
]
|
|
516
|
-
}, V = M(
|
|
517
|
-
(f) => {
|
|
518
|
-
const J = f.value;
|
|
519
|
-
u?.(J);
|
|
511
|
+
[h, n]
|
|
512
|
+
), M = O(
|
|
513
|
+
(p) => d?.[p] ?? i,
|
|
514
|
+
[i, d]
|
|
515
|
+
), k = O(
|
|
516
|
+
(p) => {
|
|
517
|
+
const K = p.value;
|
|
518
|
+
g?.(K);
|
|
520
519
|
},
|
|
521
|
-
[
|
|
522
|
-
),
|
|
523
|
-
|
|
524
|
-
}, []),
|
|
525
|
-
(
|
|
526
|
-
const
|
|
527
|
-
|
|
520
|
+
[g]
|
|
521
|
+
), I = O((p) => {
|
|
522
|
+
v(p.value);
|
|
523
|
+
}, []), L = O(
|
|
524
|
+
(p) => {
|
|
525
|
+
const K = p.value[0] ?? 0;
|
|
526
|
+
x(m, K / 100);
|
|
528
527
|
},
|
|
529
|
-
[
|
|
528
|
+
[x, m]
|
|
530
529
|
);
|
|
531
|
-
return
|
|
532
|
-
|
|
530
|
+
return $(
|
|
531
|
+
function() {
|
|
532
|
+
v(c ?? "global");
|
|
533
|
+
},
|
|
534
|
+
[c]
|
|
535
|
+
), /* @__PURE__ */ e(
|
|
536
|
+
j,
|
|
533
537
|
{
|
|
534
538
|
lazyMount: !0,
|
|
535
539
|
open: t,
|
|
536
|
-
onOpenChange: (
|
|
537
|
-
o(
|
|
540
|
+
onOpenChange: (p) => {
|
|
541
|
+
o(p.open);
|
|
538
542
|
},
|
|
539
543
|
placement: "center",
|
|
540
|
-
children: /* @__PURE__ */
|
|
541
|
-
/* @__PURE__ */ e(
|
|
542
|
-
/* @__PURE__ */ e(
|
|
543
|
-
/* @__PURE__ */
|
|
544
|
-
/* @__PURE__ */ e(
|
|
545
|
-
/* @__PURE__ */ e(
|
|
546
|
-
/* @__PURE__ */ e(
|
|
547
|
-
|
|
544
|
+
children: /* @__PURE__ */ s(G, { maxH: "40vh", overflow: "auto", children: [
|
|
545
|
+
/* @__PURE__ */ e(Q, { children: /* @__PURE__ */ e(Z, { children: "Font size" }) }),
|
|
546
|
+
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ s(z, { gap: 4, flex: 1, children: [
|
|
547
|
+
/* @__PURE__ */ s(V.Root, { children: [
|
|
548
|
+
/* @__PURE__ */ e(V.Legend, { children: "Scope" }),
|
|
549
|
+
/* @__PURE__ */ e(V.HelperText, { children: "The scope to which apply the font size for this book." }),
|
|
550
|
+
/* @__PURE__ */ e(V.Content, { children: /* @__PURE__ */ e(
|
|
551
|
+
Qe,
|
|
548
552
|
{
|
|
549
|
-
onValueChange:
|
|
550
|
-
value: c ?? "global",
|
|
551
|
-
disabled: !
|
|
552
|
-
children: /* @__PURE__ */ e(
|
|
553
|
+
onValueChange: k,
|
|
554
|
+
value: It(c) ?? "global",
|
|
555
|
+
disabled: !g,
|
|
556
|
+
children: /* @__PURE__ */ e(B, { gap: 2, children: kt.map((p) => /* @__PURE__ */ e(ie, { value: p, children: p }, p)) })
|
|
553
557
|
}
|
|
554
558
|
) })
|
|
555
559
|
] }),
|
|
556
|
-
/* @__PURE__ */
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
560
|
+
/* @__PURE__ */ s(
|
|
561
|
+
P.Root,
|
|
562
|
+
{
|
|
563
|
+
value: m,
|
|
564
|
+
onValueChange: I,
|
|
565
|
+
fitted: !1,
|
|
566
|
+
size: "sm",
|
|
567
|
+
children: [
|
|
568
|
+
/* @__PURE__ */ e(P.List, { children: ye.map((p) => /* @__PURE__ */ s(
|
|
569
|
+
P.Trigger,
|
|
570
|
+
{
|
|
571
|
+
value: p,
|
|
572
|
+
textTransform: "capitalize",
|
|
573
|
+
disabled: p !== "global" && !c,
|
|
574
|
+
children: [
|
|
575
|
+
c === p && /* @__PURE__ */ e(un, {}),
|
|
576
|
+
p
|
|
577
|
+
]
|
|
578
|
+
},
|
|
579
|
+
p
|
|
580
|
+
)) }),
|
|
581
|
+
ye.map((p) => /* @__PURE__ */ e(P.Content, { value: p, children: /* @__PURE__ */ e(
|
|
582
|
+
Ie,
|
|
583
|
+
{
|
|
584
|
+
label: "%",
|
|
585
|
+
value: [(M(p) ?? 1) * 100],
|
|
586
|
+
onValueChange: L,
|
|
587
|
+
showValue: !0,
|
|
588
|
+
marks: [
|
|
589
|
+
{ value: 100, label: "Publisher" },
|
|
590
|
+
{
|
|
591
|
+
value: a * 100,
|
|
592
|
+
label: `${a * 100}%`
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
value: l * 100,
|
|
596
|
+
label: `${l * 100}%`
|
|
597
|
+
}
|
|
598
|
+
],
|
|
599
|
+
max: l * 100,
|
|
600
|
+
min: a * 100,
|
|
601
|
+
width: "100%",
|
|
602
|
+
step: 0.1 * 100
|
|
603
|
+
}
|
|
604
|
+
) }, p))
|
|
605
|
+
]
|
|
606
|
+
}
|
|
607
|
+
)
|
|
580
608
|
] }) }),
|
|
581
|
-
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(
|
|
582
|
-
/* @__PURE__ */ e(
|
|
609
|
+
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(X, { asChild: !0, children: /* @__PURE__ */ e(H, { variant: "outline", children: "Close" }) }) }),
|
|
610
|
+
/* @__PURE__ */ e(q, {})
|
|
583
611
|
] })
|
|
584
612
|
}
|
|
585
613
|
);
|
|
586
614
|
}), zt = () => {
|
|
587
|
-
const n =
|
|
615
|
+
const n = C(), t = He(), { fontSize: o, uncontrolledFontSize: r } = _([
|
|
588
616
|
"fontSize",
|
|
589
|
-
"uncontrolledFontSize"
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
}
|
|
617
|
+
"uncontrolledFontSize",
|
|
618
|
+
"onFontSizeChange"
|
|
619
|
+
]), i = o ?? r;
|
|
620
|
+
return $(
|
|
621
|
+
function() {
|
|
622
|
+
if (n && i) {
|
|
623
|
+
const l = setTimeout(() => {
|
|
624
|
+
n.settings.update({
|
|
625
|
+
fontScale: i
|
|
626
|
+
});
|
|
627
|
+
}, 200);
|
|
628
|
+
return () => clearTimeout(l);
|
|
629
|
+
}
|
|
630
|
+
},
|
|
631
|
+
[n, i]
|
|
632
|
+
), de(
|
|
633
|
+
function() {
|
|
634
|
+
return n?.settings.values$.pipe(D((l) => l.fontScale)).subscribe((l) => {
|
|
635
|
+
const c = t.value.fontSize ?? t.value.uncontrolledFontSize;
|
|
636
|
+
l !== c && (t.value.onFontSizeChange?.("internal", l), t.update((d) => ({
|
|
637
|
+
...d,
|
|
638
|
+
uncontrolledFontSize: l
|
|
639
|
+
})));
|
|
640
|
+
});
|
|
641
|
+
},
|
|
642
|
+
[n, t]
|
|
643
|
+
), null;
|
|
644
|
+
}, Ot = {
|
|
602
645
|
x: 0,
|
|
603
646
|
y: 0,
|
|
604
647
|
width: 0,
|
|
@@ -608,43 +651,43 @@ const It = B.forwardRef(
|
|
|
608
651
|
bottom: 0,
|
|
609
652
|
right: 0
|
|
610
653
|
};
|
|
611
|
-
function
|
|
612
|
-
const [n, t] = y(null), [o, r] = y(
|
|
654
|
+
function Tt() {
|
|
655
|
+
const [n, t] = y(null), [o, r] = y(Ot), i = an(
|
|
613
656
|
() => new ResizeObserver((a) => {
|
|
614
657
|
if (a[0]) {
|
|
615
|
-
const { x:
|
|
616
|
-
r({ x:
|
|
658
|
+
const { x: l, y: c, width: d, height: u, top: g, left: h, bottom: m, right: v } = a[0].contentRect;
|
|
659
|
+
r({ x: l, y: c, width: d, height: u, top: g, left: h, bottom: m, right: v });
|
|
617
660
|
}
|
|
618
661
|
}),
|
|
619
662
|
[]
|
|
620
663
|
);
|
|
621
|
-
return
|
|
664
|
+
return ln(() => {
|
|
622
665
|
if (n)
|
|
623
666
|
return i.observe(n), () => {
|
|
624
667
|
i.disconnect();
|
|
625
668
|
};
|
|
626
669
|
}, [n, i]), [t, o, n];
|
|
627
670
|
}
|
|
628
|
-
const
|
|
629
|
-
const r =
|
|
630
|
-
|
|
631
|
-
if (!i || !n) return
|
|
671
|
+
const Mt = (n, t, o) => {
|
|
672
|
+
const r = C(), i = qe(r) ? r : void 0;
|
|
673
|
+
de(() => {
|
|
674
|
+
if (!i || !n) return xe;
|
|
632
675
|
const a = t.layout.layout$.pipe(
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
),
|
|
676
|
+
On(t.layout.layoutInfo),
|
|
677
|
+
_e(Ln)
|
|
678
|
+
), l = $n(
|
|
636
679
|
n
|
|
637
|
-
).pipe(
|
|
680
|
+
).pipe(D((c) => c.some((d) => d.isIntersecting)));
|
|
638
681
|
return a.pipe(
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
682
|
+
Le(100, void 0, { trailing: !0 }),
|
|
683
|
+
W(() => l.pipe(
|
|
684
|
+
Tn((c) => {
|
|
642
685
|
c || (n.innerHTML = "");
|
|
643
686
|
}),
|
|
644
687
|
pe((c) => c),
|
|
645
|
-
|
|
688
|
+
$e()
|
|
646
689
|
).pipe(
|
|
647
|
-
|
|
690
|
+
W(() => (n.innerHTML = "", i?.gallery.snapshot(
|
|
648
691
|
t,
|
|
649
692
|
n,
|
|
650
693
|
o
|
|
@@ -652,15 +695,15 @@ const Pt = (n, t, o) => {
|
|
|
652
695
|
))
|
|
653
696
|
);
|
|
654
697
|
}, [i, t, o, n]);
|
|
655
|
-
},
|
|
698
|
+
}, wt = f(
|
|
656
699
|
({ item: n, onNavigated: t }) => {
|
|
657
|
-
const [o, r, i] =
|
|
658
|
-
|
|
659
|
-
const
|
|
700
|
+
const [o, r, i] = Tt(), a = C();
|
|
701
|
+
Mt(i, n, r);
|
|
702
|
+
const l = S(
|
|
660
703
|
() => a?.locateResource(n, { mode: "shallow" }),
|
|
661
704
|
[a, n]
|
|
662
705
|
);
|
|
663
|
-
return /* @__PURE__ */
|
|
706
|
+
return /* @__PURE__ */ s(
|
|
664
707
|
F,
|
|
665
708
|
{
|
|
666
709
|
width: "100%",
|
|
@@ -686,7 +729,7 @@ const Pt = (n, t, o) => {
|
|
|
686
729
|
ref: o
|
|
687
730
|
}
|
|
688
731
|
),
|
|
689
|
-
/* @__PURE__ */
|
|
732
|
+
/* @__PURE__ */ s(
|
|
690
733
|
b,
|
|
691
734
|
{
|
|
692
735
|
position: "absolute",
|
|
@@ -699,7 +742,7 @@ const Pt = (n, t, o) => {
|
|
|
699
742
|
fontSize: "xs",
|
|
700
743
|
children: [
|
|
701
744
|
"Page ",
|
|
702
|
-
(
|
|
745
|
+
(l?.meta?.absolutePageIndex ?? 0) + 1
|
|
703
746
|
]
|
|
704
747
|
}
|
|
705
748
|
)
|
|
@@ -707,11 +750,11 @@ const Pt = (n, t, o) => {
|
|
|
707
750
|
}
|
|
708
751
|
);
|
|
709
752
|
}
|
|
710
|
-
),
|
|
753
|
+
), yt = f(
|
|
711
754
|
({ open: n, setOpen: t }) => {
|
|
712
|
-
const o =
|
|
755
|
+
const o = C(), r = S(() => o?.spineItemsManager.items$, [o]);
|
|
713
756
|
return /* @__PURE__ */ e(
|
|
714
|
-
|
|
757
|
+
j,
|
|
715
758
|
{
|
|
716
759
|
lazyMount: !0,
|
|
717
760
|
placement: "center",
|
|
@@ -719,9 +762,9 @@ const Pt = (n, t, o) => {
|
|
|
719
762
|
onOpenChange: (i) => t(i.open),
|
|
720
763
|
size: { mdDown: "full", md: "lg" },
|
|
721
764
|
scrollBehavior: "inside",
|
|
722
|
-
children: /* @__PURE__ */
|
|
723
|
-
/* @__PURE__ */ e(
|
|
724
|
-
/* @__PURE__ */ e(
|
|
765
|
+
children: /* @__PURE__ */ s(G, { height: "100%", children: [
|
|
766
|
+
/* @__PURE__ */ e(Q, { children: /* @__PURE__ */ e(Z, { children: "Gallery" }) }),
|
|
767
|
+
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(
|
|
725
768
|
F,
|
|
726
769
|
{
|
|
727
770
|
gridTemplateColumns: [
|
|
@@ -733,7 +776,7 @@ const Pt = (n, t, o) => {
|
|
|
733
776
|
pt: 2,
|
|
734
777
|
"data-grid": !0,
|
|
735
778
|
children: r?.map((i) => /* @__PURE__ */ e(
|
|
736
|
-
|
|
779
|
+
wt,
|
|
737
780
|
{
|
|
738
781
|
item: i,
|
|
739
782
|
onNavigated: () => {
|
|
@@ -744,15 +787,15 @@ const Pt = (n, t, o) => {
|
|
|
744
787
|
))
|
|
745
788
|
}
|
|
746
789
|
) }),
|
|
747
|
-
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(
|
|
748
|
-
/* @__PURE__ */ e(
|
|
790
|
+
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(X, { asChild: !0, children: /* @__PURE__ */ e(H, { variant: "outline", children: "Cancel" }) }) }),
|
|
791
|
+
/* @__PURE__ */ e(q, {})
|
|
749
792
|
] })
|
|
750
793
|
}
|
|
751
794
|
);
|
|
752
795
|
}
|
|
753
|
-
),
|
|
796
|
+
), Pt = "@prose-reader/react-reader", Et = "1.260.0", At = f(
|
|
754
797
|
({ open: n, setOpen: t }) => /* @__PURE__ */ e(
|
|
755
|
-
|
|
798
|
+
j,
|
|
756
799
|
{
|
|
757
800
|
lazyMount: !0,
|
|
758
801
|
placement: "center",
|
|
@@ -760,10 +803,10 @@ const Pt = (n, t, o) => {
|
|
|
760
803
|
onOpenChange: (o) => t(o.open),
|
|
761
804
|
size: { mdDown: "full", md: "lg" },
|
|
762
805
|
scrollBehavior: "inside",
|
|
763
|
-
children: /* @__PURE__ */
|
|
764
|
-
/* @__PURE__ */ e(
|
|
765
|
-
/* @__PURE__ */
|
|
766
|
-
|
|
806
|
+
children: /* @__PURE__ */ s(G, { children: [
|
|
807
|
+
/* @__PURE__ */ e(Q, { children: /* @__PURE__ */ e(Z, { children: "Help" }) }),
|
|
808
|
+
/* @__PURE__ */ s(
|
|
809
|
+
Y,
|
|
767
810
|
{
|
|
768
811
|
overflowY: "auto",
|
|
769
812
|
flex: 1,
|
|
@@ -771,44 +814,44 @@ const Pt = (n, t, o) => {
|
|
|
771
814
|
flexDirection: "column",
|
|
772
815
|
gap: 4,
|
|
773
816
|
children: [
|
|
774
|
-
/* @__PURE__ */
|
|
775
|
-
/* @__PURE__ */ e(
|
|
776
|
-
/* @__PURE__ */
|
|
777
|
-
/* @__PURE__ */ e(
|
|
817
|
+
/* @__PURE__ */ s(z, { children: [
|
|
818
|
+
/* @__PURE__ */ e(me, { mb: 2, as: "h3", size: "lg", children: "Shortcuts" }),
|
|
819
|
+
/* @__PURE__ */ s(B, { mb: 1, children: [
|
|
820
|
+
/* @__PURE__ */ e(Te, { children: /* @__PURE__ */ e(hn, {}) }),
|
|
778
821
|
" ",
|
|
779
822
|
/* @__PURE__ */ e(b, { children: "Navigate to right page" })
|
|
780
823
|
] }),
|
|
781
|
-
/* @__PURE__ */
|
|
782
|
-
/* @__PURE__ */ e(
|
|
824
|
+
/* @__PURE__ */ s(B, { mb: 1, children: [
|
|
825
|
+
/* @__PURE__ */ e(Te, { children: /* @__PURE__ */ e(pn, {}) }),
|
|
783
826
|
" ",
|
|
784
827
|
/* @__PURE__ */ e(b, { children: "Navigate to left page" })
|
|
785
828
|
] })
|
|
786
829
|
] }),
|
|
787
|
-
/* @__PURE__ */
|
|
788
|
-
/* @__PURE__ */ e(
|
|
789
|
-
/* @__PURE__ */ e(
|
|
830
|
+
/* @__PURE__ */ s(z, { children: [
|
|
831
|
+
/* @__PURE__ */ e(me, { mb: 2, as: "h3", size: "lg", children: "Bookmarks" }),
|
|
832
|
+
/* @__PURE__ */ e(B, { mb: 1, children: /* @__PURE__ */ e(b, { children: "Tap on the top right corner of a page bookmark it" }) })
|
|
790
833
|
] }),
|
|
791
|
-
/* @__PURE__ */
|
|
792
|
-
/* @__PURE__ */ e(
|
|
793
|
-
/* @__PURE__ */
|
|
794
|
-
|
|
834
|
+
/* @__PURE__ */ s(z, { children: [
|
|
835
|
+
/* @__PURE__ */ e(me, { mb: 2, as: "h3", size: "lg", children: "About" }),
|
|
836
|
+
/* @__PURE__ */ s(b, { children: [
|
|
837
|
+
Pt,
|
|
795
838
|
" version: ",
|
|
796
|
-
|
|
839
|
+
Et
|
|
797
840
|
] })
|
|
798
841
|
] })
|
|
799
842
|
]
|
|
800
843
|
}
|
|
801
844
|
),
|
|
802
|
-
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(
|
|
803
|
-
/* @__PURE__ */ e(
|
|
845
|
+
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(X, { asChild: !0, children: /* @__PURE__ */ e(H, { variant: "outline", children: "Cancel" }) }) }),
|
|
846
|
+
/* @__PURE__ */ e(q, {})
|
|
804
847
|
] })
|
|
805
848
|
}
|
|
806
849
|
)
|
|
807
|
-
),
|
|
808
|
-
const n =
|
|
809
|
-
return
|
|
810
|
-
() => n ?
|
|
811
|
-
|
|
850
|
+
), ne = () => {
|
|
851
|
+
const n = C();
|
|
852
|
+
return S(
|
|
853
|
+
() => n ? Mn([n.pagination.state$, n.context]).pipe(
|
|
854
|
+
D(([t, o]) => {
|
|
812
855
|
const r = o.manifest?.spineItems.every(
|
|
813
856
|
(i) => i.mediaType?.startsWith("image/")
|
|
814
857
|
);
|
|
@@ -817,39 +860,39 @@ const Pt = (n, t, o) => {
|
|
|
817
860
|
hasChapters: !o.isFullyPrePaginated && !r
|
|
818
861
|
};
|
|
819
862
|
})
|
|
820
|
-
) :
|
|
863
|
+
) : xe,
|
|
821
864
|
[n]
|
|
822
865
|
);
|
|
823
|
-
},
|
|
824
|
-
const n =
|
|
866
|
+
}, Bt = () => {
|
|
867
|
+
const n = ne(), t = Math.floor(
|
|
825
868
|
(n?.percentageEstimateOfBook ?? 0) * 100
|
|
826
869
|
), o = t > 0 ? t : 1;
|
|
827
|
-
return n?.percentageEstimateOfBook === void 0 ? null : /* @__PURE__ */ e(F, { position: "absolute", right: 0, bottom: 0, p: 2, color: "black", children: /* @__PURE__ */
|
|
870
|
+
return n?.percentageEstimateOfBook === void 0 ? null : /* @__PURE__ */ e(F, { position: "absolute", right: 0, bottom: 0, p: 2, color: "black", children: /* @__PURE__ */ s(b, { fontSize: "sm", children: [
|
|
828
871
|
o,
|
|
829
872
|
" %"
|
|
830
873
|
] }) });
|
|
831
|
-
},
|
|
874
|
+
}, Ft = () => {
|
|
832
875
|
const [n, t] = y(/* @__PURE__ */ new Date());
|
|
833
|
-
return
|
|
876
|
+
return $(() => {
|
|
834
877
|
const o = setInterval(() => {
|
|
835
878
|
t(/* @__PURE__ */ new Date());
|
|
836
879
|
}, 6e4);
|
|
837
880
|
return () => clearInterval(o);
|
|
838
881
|
}, []), n;
|
|
839
|
-
},
|
|
840
|
-
const t =
|
|
882
|
+
}, Dt = (n) => {
|
|
883
|
+
const t = Ft();
|
|
841
884
|
return /* @__PURE__ */ e(b, { fontSize: "xs", ...n, children: t.toLocaleTimeString(navigator.language, {
|
|
842
885
|
hour: "2-digit",
|
|
843
886
|
minute: "2-digit"
|
|
844
887
|
}) });
|
|
845
|
-
},
|
|
888
|
+
}, ze = () => {
|
|
846
889
|
const { quickMenuOpen: n, onQuickMenuOpenChange: t } = _([
|
|
847
890
|
"quickMenuOpen",
|
|
848
891
|
"onQuickMenuOpenChange"
|
|
849
892
|
]);
|
|
850
893
|
return [n, t];
|
|
851
|
-
},
|
|
852
|
-
const [n] =
|
|
894
|
+
}, _t = f(() => {
|
|
895
|
+
const [n] = ze();
|
|
853
896
|
return /* @__PURE__ */ e(
|
|
854
897
|
F,
|
|
855
898
|
{
|
|
@@ -858,14 +901,14 @@ const Pt = (n, t, o) => {
|
|
|
858
901
|
bottom: 0,
|
|
859
902
|
p: 2,
|
|
860
903
|
color: n ? void 0 : "colorPalette.contrast",
|
|
861
|
-
children: /* @__PURE__ */ e(
|
|
904
|
+
children: /* @__PURE__ */ e(Dt, {})
|
|
862
905
|
}
|
|
863
906
|
);
|
|
864
|
-
}),
|
|
865
|
-
const n =
|
|
866
|
-
|
|
907
|
+
}), Lt = () => {
|
|
908
|
+
const n = C();
|
|
909
|
+
de(
|
|
867
910
|
() => n?.links$.subscribe((t) => {
|
|
868
|
-
if (t.type === "click" &&
|
|
911
|
+
if (t.type === "click" && Vn(t.target, "a")) {
|
|
869
912
|
if (!t.target.href) return;
|
|
870
913
|
const o = new URL(t.target.href);
|
|
871
914
|
window.location.host !== o.host && confirm(
|
|
@@ -875,39 +918,39 @@ const Pt = (n, t, o) => {
|
|
|
875
918
|
}),
|
|
876
919
|
[n]
|
|
877
920
|
);
|
|
878
|
-
},
|
|
921
|
+
}, $t = () => {
|
|
879
922
|
const { notificationsSubject: n } = _([
|
|
880
923
|
"notificationsSubject"
|
|
881
924
|
]);
|
|
882
|
-
|
|
925
|
+
de(
|
|
883
926
|
() => n.pipe(
|
|
884
|
-
pe(
|
|
927
|
+
pe(De),
|
|
885
928
|
wn((t) => {
|
|
886
929
|
const o = t.duration ?? 3e3, r = new yn((a) => {
|
|
887
930
|
try {
|
|
888
931
|
queueMicrotask(() => {
|
|
889
|
-
const
|
|
932
|
+
const l = Se.create({
|
|
890
933
|
title: t.title,
|
|
891
934
|
description: t.description,
|
|
892
935
|
duration: o
|
|
893
936
|
});
|
|
894
|
-
a.next(
|
|
937
|
+
a.next(l), a.complete();
|
|
895
938
|
});
|
|
896
|
-
} catch (
|
|
897
|
-
a.error(
|
|
939
|
+
} catch (l) {
|
|
940
|
+
a.error(l);
|
|
898
941
|
}
|
|
899
942
|
}), i = n.pipe(
|
|
900
943
|
Pn(1),
|
|
901
944
|
pe((a) => !!t.key && a?.key === t.key)
|
|
902
945
|
);
|
|
903
946
|
return r.pipe(
|
|
904
|
-
|
|
905
|
-
(a) =>
|
|
906
|
-
|
|
907
|
-
t.abort ??
|
|
947
|
+
W(
|
|
948
|
+
(a) => Ve(
|
|
949
|
+
Ne(o),
|
|
950
|
+
t.abort ?? xe,
|
|
908
951
|
i
|
|
909
952
|
).pipe(
|
|
910
|
-
|
|
953
|
+
$e(),
|
|
911
954
|
En(() => {
|
|
912
955
|
queueMicrotask(() => {
|
|
913
956
|
Se.dismiss(a);
|
|
@@ -920,25 +963,25 @@ const Pt = (n, t, o) => {
|
|
|
920
963
|
),
|
|
921
964
|
[n]
|
|
922
965
|
);
|
|
923
|
-
},
|
|
966
|
+
}, Vt = E.forwardRef(
|
|
924
967
|
function(t, o) {
|
|
925
968
|
const {
|
|
926
969
|
showArrow: r,
|
|
927
970
|
children: i,
|
|
928
971
|
portalled: a = !0,
|
|
929
|
-
content:
|
|
972
|
+
content: l,
|
|
930
973
|
portalRef: c,
|
|
931
974
|
...d
|
|
932
975
|
} = t;
|
|
933
|
-
return /* @__PURE__ */
|
|
934
|
-
|
|
976
|
+
return /* @__PURE__ */ s(
|
|
977
|
+
ee.Root,
|
|
935
978
|
{
|
|
936
979
|
...d,
|
|
937
980
|
positioning: { ...d.positioning, gutter: 4 },
|
|
938
981
|
children: [
|
|
939
|
-
/* @__PURE__ */ e(
|
|
940
|
-
/* @__PURE__ */ e(
|
|
941
|
-
|
|
982
|
+
/* @__PURE__ */ e(ee.Trigger, { asChild: !0, children: i }),
|
|
983
|
+
/* @__PURE__ */ e(Ce, { disabled: !a, container: c, children: /* @__PURE__ */ e(ee.Positioner, { children: /* @__PURE__ */ s(
|
|
984
|
+
ee.Content,
|
|
942
985
|
{
|
|
943
986
|
width: "auto",
|
|
944
987
|
px: "2",
|
|
@@ -947,8 +990,8 @@ const Pt = (n, t, o) => {
|
|
|
947
990
|
rounded: "sm",
|
|
948
991
|
ref: o,
|
|
949
992
|
children: [
|
|
950
|
-
r && /* @__PURE__ */ e(
|
|
951
|
-
|
|
993
|
+
r && /* @__PURE__ */ e(ee.Arrow, { children: /* @__PURE__ */ e(ee.ArrowTip, {}) }),
|
|
994
|
+
l
|
|
952
995
|
]
|
|
953
996
|
}
|
|
954
997
|
) }) })
|
|
@@ -956,9 +999,9 @@ const Pt = (n, t, o) => {
|
|
|
956
999
|
}
|
|
957
1000
|
);
|
|
958
1001
|
}
|
|
959
|
-
),
|
|
1002
|
+
), Nt = E.forwardRef(function(t, o) {
|
|
960
1003
|
const { children: r, ...i } = t;
|
|
961
|
-
return /* @__PURE__ */ e(
|
|
1004
|
+
return /* @__PURE__ */ e(Vt, { content: r, ...i, ref: o, children: /* @__PURE__ */ e(
|
|
962
1005
|
R,
|
|
963
1006
|
{
|
|
964
1007
|
variant: "ghost",
|
|
@@ -968,21 +1011,21 @@ const Pt = (n, t, o) => {
|
|
|
968
1011
|
children: /* @__PURE__ */ e(Xn, {})
|
|
969
1012
|
}
|
|
970
1013
|
) });
|
|
971
|
-
}),
|
|
972
|
-
return /* @__PURE__ */ e(
|
|
1014
|
+
}), Wt = E.forwardRef(function(t, o) {
|
|
1015
|
+
return /* @__PURE__ */ e(le.Track, { ...t, ref: o, children: /* @__PURE__ */ e(le.Range, {}) });
|
|
973
1016
|
});
|
|
974
|
-
|
|
1017
|
+
E.forwardRef(function(t, o) {
|
|
975
1018
|
const { children: r, info: i, ...a } = t;
|
|
976
|
-
return /* @__PURE__ */
|
|
1019
|
+
return /* @__PURE__ */ s(le.Label, { ...a, ref: o, children: [
|
|
977
1020
|
r,
|
|
978
|
-
i && /* @__PURE__ */ e(
|
|
1021
|
+
i && /* @__PURE__ */ e(Nt, { children: i })
|
|
979
1022
|
] });
|
|
980
1023
|
});
|
|
981
|
-
const
|
|
982
|
-
const n =
|
|
1024
|
+
const Ht = le.Root, Gt = le.ValueText, Oe = () => {
|
|
1025
|
+
const n = ne(), t = n?.numberOfTotalPages === 1, o = (n?.beginNumberOfPagesInSpineItem ?? 0) > 1, r = (n?.endNumberOfPagesInSpineItem ?? 0) > 1, i = (n?.hasChapters ? n?.beginPageIndexInSpineItem : n?.beginAbsolutePageIndex) ?? 0, a = (n?.hasChapters ? n?.endPageIndexInSpineItem : n?.endAbsolutePageIndex) ?? 0, [l = 0, c = 0] = [
|
|
983
1026
|
i,
|
|
984
1027
|
a
|
|
985
|
-
].sort((
|
|
1028
|
+
].sort((g, h) => g - h), d = n?.beginPageIndexInSpineItem !== n?.endPageIndexInSpineItem || n?.beginSpineItemIndex !== n?.endSpineItemIndex, u = n?.hasChapters ? n?.beginNumberOfPagesInSpineItem : n?.numberOfTotalPages;
|
|
986
1029
|
return {
|
|
987
1030
|
hasOnlyOnePage: t,
|
|
988
1031
|
beginPageIndex: i,
|
|
@@ -991,28 +1034,28 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
991
1034
|
isEndWithinChapter: r,
|
|
992
1035
|
beginAndEndAreDifferent: d,
|
|
993
1036
|
totalApproximatePages: u,
|
|
994
|
-
leftPageIndex:
|
|
1037
|
+
leftPageIndex: l,
|
|
995
1038
|
rightPageIndex: c
|
|
996
1039
|
};
|
|
997
|
-
},
|
|
998
|
-
const n =
|
|
1040
|
+
}, qt = () => {
|
|
1041
|
+
const n = ne(), {
|
|
999
1042
|
hasOnlyOnePage: t,
|
|
1000
1043
|
leftPageIndex: o,
|
|
1001
1044
|
rightPageIndex: r,
|
|
1002
1045
|
totalApproximatePages: i,
|
|
1003
1046
|
beginAndEndAreDifferent: a
|
|
1004
|
-
} =
|
|
1005
|
-
return /* @__PURE__ */
|
|
1006
|
-
/* @__PURE__ */ e(
|
|
1007
|
-
/* @__PURE__ */ e(
|
|
1008
|
-
/* @__PURE__ */ e(
|
|
1047
|
+
} = Oe(), l = Math.round((n?.percentageEstimateOfBook ?? 0) * 100), c = (u) => u?.subChapter ? `${u.title} / ${c(u.subChapter)}` : u?.title || "", d = c(n?.beginChapterInfo);
|
|
1048
|
+
return /* @__PURE__ */ s(z, { alignItems: "center", gap: 1, maxW: "100%", overflow: "auto", children: [
|
|
1049
|
+
/* @__PURE__ */ e(Ht, { value: l, size: "xs", width: 150, children: /* @__PURE__ */ s(B, { justifyContent: "space-between", children: [
|
|
1050
|
+
/* @__PURE__ */ e(Wt, { width: 110 }),
|
|
1051
|
+
/* @__PURE__ */ e(Gt, { children: `${l}%` })
|
|
1009
1052
|
] }) }),
|
|
1010
1053
|
/* @__PURE__ */ e(b, { truncate: !0, maxWidth: "100%", fontSize: "sm", mt: 1, children: d ? `Chapter: ${d}` : " " }),
|
|
1011
|
-
!t && /* @__PURE__ */
|
|
1054
|
+
!t && /* @__PURE__ */ s(B, { children: [
|
|
1012
1055
|
/* @__PURE__ */ e(b, { fontSize: "xs", children: a ? `${o + 1} - ${r + 1} of ${i}` : `${o + 1} of ${i}` }),
|
|
1013
|
-
!!n?.hasChapters && /* @__PURE__ */
|
|
1056
|
+
!!n?.hasChapters && /* @__PURE__ */ s(ce, { children: [
|
|
1014
1057
|
/* @__PURE__ */ e(b, { children: "-" }),
|
|
1015
|
-
/* @__PURE__ */
|
|
1058
|
+
/* @__PURE__ */ s(b, { fontSize: "xs", children: [
|
|
1016
1059
|
"(",
|
|
1017
1060
|
(n?.beginAbsolutePageIndex ?? 0) + 1,
|
|
1018
1061
|
")"
|
|
@@ -1020,13 +1063,13 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1020
1063
|
] })
|
|
1021
1064
|
] })
|
|
1022
1065
|
] });
|
|
1023
|
-
},
|
|
1066
|
+
}, Ye = f(
|
|
1024
1067
|
({
|
|
1025
1068
|
children: n,
|
|
1026
1069
|
position: t,
|
|
1027
1070
|
...o
|
|
1028
1071
|
}) => /* @__PURE__ */ e(
|
|
1029
|
-
|
|
1072
|
+
ae,
|
|
1030
1073
|
{
|
|
1031
1074
|
display: "flex",
|
|
1032
1075
|
flexDirection: "row",
|
|
@@ -1050,7 +1093,7 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1050
1093
|
children: n
|
|
1051
1094
|
}
|
|
1052
1095
|
)
|
|
1053
|
-
),
|
|
1096
|
+
), jt = nn(Kn), Ut = f((n) => /* @__PURE__ */ e(
|
|
1054
1097
|
F,
|
|
1055
1098
|
{
|
|
1056
1099
|
display: "contents",
|
|
@@ -1060,7 +1103,7 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1060
1103
|
"--color-solid": "colors.colorPalette.solid"
|
|
1061
1104
|
},
|
|
1062
1105
|
children: /* @__PURE__ */ e(
|
|
1063
|
-
|
|
1106
|
+
jt,
|
|
1064
1107
|
{
|
|
1065
1108
|
keyboard: !1,
|
|
1066
1109
|
style: {
|
|
@@ -1104,8 +1147,8 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1104
1147
|
}
|
|
1105
1148
|
)
|
|
1106
1149
|
}
|
|
1107
|
-
)),
|
|
1108
|
-
const t =
|
|
1150
|
+
)), Qt = () => {
|
|
1151
|
+
const t = ne()?.isUsingSpread, { beginPageIndex: o, totalApproximatePages: r = 0 } = Oe(), i = t ? Math.floor((o || 0) / 2) : o, [a, l] = In(
|
|
1109
1152
|
() => N({
|
|
1110
1153
|
default: i || 0
|
|
1111
1154
|
})
|
|
@@ -1113,81 +1156,81 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1113
1156
|
0,
|
|
1114
1157
|
t ? Math.floor((r - 1) / 2) : r - 1
|
|
1115
1158
|
);
|
|
1116
|
-
return
|
|
1117
|
-
|
|
1118
|
-
}, [i,
|
|
1159
|
+
return $(() => {
|
|
1160
|
+
l.update(i || 0);
|
|
1161
|
+
}, [i, l]), {
|
|
1119
1162
|
value: a,
|
|
1120
|
-
valueSignal:
|
|
1163
|
+
valueSignal: l,
|
|
1121
1164
|
min: c,
|
|
1122
1165
|
max: d
|
|
1123
1166
|
};
|
|
1124
|
-
},
|
|
1125
|
-
const t =
|
|
1126
|
-
(
|
|
1127
|
-
const [
|
|
1128
|
-
h.update(
|
|
1129
|
-
const
|
|
1167
|
+
}, Yt = (n) => {
|
|
1168
|
+
const t = C(), o = ne(), { manifest: r } = S(() => t?.context, [t]) ?? {}, i = r?.readingDirection === "rtl", a = o?.isUsingSpread, { totalApproximatePages: l = 0, isBeginWithinChapter: c } = Oe(), d = 1, u = c, { value: g, valueSignal: h, min: m, max: v } = Qt(), x = O(
|
|
1169
|
+
(k) => {
|
|
1170
|
+
const [I = 0] = Array.isArray(k) ? k : [k];
|
|
1171
|
+
h.update(I);
|
|
1172
|
+
const L = a ? Math.floor(I) * 2 : Math.floor(I);
|
|
1130
1173
|
u ? t?.navigation.goToPageOfSpineItem({
|
|
1131
|
-
pageIndex:
|
|
1174
|
+
pageIndex: L,
|
|
1132
1175
|
spineItemId: t.pagination.state.beginSpineItemIndex ?? 0,
|
|
1133
1176
|
animation: !1
|
|
1134
1177
|
}) : t?.navigation.goToAbsolutePageIndex({
|
|
1135
|
-
absolutePageIndex:
|
|
1178
|
+
absolutePageIndex: L,
|
|
1136
1179
|
animation: !1
|
|
1137
1180
|
});
|
|
1138
1181
|
},
|
|
1139
1182
|
[t, a, h, u]
|
|
1140
1183
|
);
|
|
1141
|
-
return
|
|
1184
|
+
return de(
|
|
1142
1185
|
() => t?.navigation.throttleLock({
|
|
1143
1186
|
duration: 100,
|
|
1144
1187
|
trigger: h.subject
|
|
1145
1188
|
}),
|
|
1146
1189
|
[t, h]
|
|
1147
|
-
),
|
|
1148
|
-
|
|
1190
|
+
), l === 1 || a && l === 2 ? /* @__PURE__ */ e(F, { style: n.style }) : /* @__PURE__ */ e(
|
|
1191
|
+
Ut,
|
|
1149
1192
|
{
|
|
1150
|
-
value: [
|
|
1193
|
+
value: [g],
|
|
1151
1194
|
max: v,
|
|
1152
1195
|
min: m,
|
|
1153
1196
|
reverse: i,
|
|
1154
1197
|
step: d,
|
|
1155
|
-
onChange:
|
|
1198
|
+
onChange: x,
|
|
1156
1199
|
...n
|
|
1157
1200
|
}
|
|
1158
1201
|
);
|
|
1159
|
-
},
|
|
1202
|
+
}, Zt = f(
|
|
1160
1203
|
({
|
|
1161
1204
|
open: n,
|
|
1162
1205
|
onItemClick: t
|
|
1163
1206
|
}) => {
|
|
1164
|
-
const o =
|
|
1207
|
+
const o = sn(null), r = C(), {
|
|
1165
1208
|
quickMenuBottomBarBoundingBoxSignal: i,
|
|
1166
1209
|
onFontSizeMenuOpenChange: a,
|
|
1167
|
-
onRefitMenuOpenChange:
|
|
1210
|
+
onRefitMenuOpenChange: l
|
|
1168
1211
|
} = _([
|
|
1169
1212
|
"quickMenuBottomBarBoundingBoxSignal",
|
|
1170
1213
|
"onFontSizeMenuOpenChange",
|
|
1171
1214
|
"onRefitMenuOpenChange"
|
|
1172
|
-
]), c =
|
|
1215
|
+
]), c = S(() => r?.navigation.state$, [r]), d = S(() => r?.settings.values$, [r]), u = S(
|
|
1173
1216
|
() => r?.zoom.state$.pipe(
|
|
1174
|
-
|
|
1175
|
-
(
|
|
1217
|
+
D(
|
|
1218
|
+
(k) => k.currentScale > 1 ? "in" : k.currentScale < 1 ? "out" : void 0
|
|
1176
1219
|
)
|
|
1177
1220
|
),
|
|
1178
1221
|
[r]
|
|
1179
|
-
),
|
|
1180
|
-
return
|
|
1222
|
+
), g = u === "in", h = u === "out", m = d?.computedPageTurnMode === "scrollable", v = d?.computedPageTurnDirection === "vertical", [x, M] = y(!0);
|
|
1223
|
+
return $(() => {
|
|
1181
1224
|
if (!o.current) return;
|
|
1182
|
-
const
|
|
1183
|
-
for (const
|
|
1184
|
-
i.update(
|
|
1225
|
+
const k = new ResizeObserver((I) => {
|
|
1226
|
+
for (const L of I)
|
|
1227
|
+
i.update(L);
|
|
1185
1228
|
});
|
|
1186
|
-
return
|
|
1187
|
-
|
|
1229
|
+
return k.observe(o.current), () => {
|
|
1230
|
+
k.disconnect();
|
|
1188
1231
|
};
|
|
1189
|
-
}, [i]), /* @__PURE__ */
|
|
1190
|
-
|
|
1232
|
+
}, [i]), /* @__PURE__ */ s(
|
|
1233
|
+
Ye,
|
|
1191
1234
|
{
|
|
1192
1235
|
present: n,
|
|
1193
1236
|
position: "bottom",
|
|
@@ -1198,8 +1241,8 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1198
1241
|
px: 0,
|
|
1199
1242
|
ref: o,
|
|
1200
1243
|
children: [
|
|
1201
|
-
/* @__PURE__ */
|
|
1202
|
-
|
|
1244
|
+
/* @__PURE__ */ s(
|
|
1245
|
+
B,
|
|
1203
1246
|
{
|
|
1204
1247
|
flex: 1,
|
|
1205
1248
|
alignItems: "center",
|
|
@@ -1216,11 +1259,11 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1216
1259
|
flexShrink: 0,
|
|
1217
1260
|
onClick: () => r?.navigation.goToLeftOrTopSpineItem(),
|
|
1218
1261
|
disabled: !c?.canGoLeftSpineItem && !c?.canGoTopSpineItem,
|
|
1219
|
-
children: v ? /* @__PURE__ */ e(
|
|
1262
|
+
children: v ? /* @__PURE__ */ e(Un, {}) : /* @__PURE__ */ e(Qn, {})
|
|
1220
1263
|
}
|
|
1221
1264
|
),
|
|
1222
|
-
/* @__PURE__ */
|
|
1223
|
-
|
|
1265
|
+
/* @__PURE__ */ s(
|
|
1266
|
+
z,
|
|
1224
1267
|
{
|
|
1225
1268
|
flex: 1,
|
|
1226
1269
|
maxW: 400,
|
|
@@ -1229,9 +1272,9 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1229
1272
|
overflow: "auto",
|
|
1230
1273
|
px: 4,
|
|
1231
1274
|
children: [
|
|
1232
|
-
/* @__PURE__ */ e(
|
|
1275
|
+
/* @__PURE__ */ e(qt, {}),
|
|
1233
1276
|
/* @__PURE__ */ e(
|
|
1234
|
-
|
|
1277
|
+
Yt,
|
|
1235
1278
|
{
|
|
1236
1279
|
style: {
|
|
1237
1280
|
width: "100%",
|
|
@@ -1260,34 +1303,34 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1260
1303
|
]
|
|
1261
1304
|
}
|
|
1262
1305
|
),
|
|
1263
|
-
/* @__PURE__ */ e(
|
|
1264
|
-
|
|
1306
|
+
/* @__PURE__ */ e(B, { alignSelf: "stretch", alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ s(
|
|
1307
|
+
be.Root,
|
|
1265
1308
|
{
|
|
1266
|
-
open:
|
|
1309
|
+
open: x,
|
|
1267
1310
|
flex: 1,
|
|
1268
|
-
onOpenChange: ({ open:
|
|
1269
|
-
|
|
1311
|
+
onOpenChange: ({ open: k }) => {
|
|
1312
|
+
M(k);
|
|
1270
1313
|
},
|
|
1271
1314
|
width: "100%",
|
|
1272
1315
|
children: [
|
|
1273
1316
|
/* @__PURE__ */ e(
|
|
1274
|
-
|
|
1317
|
+
be.Trigger,
|
|
1275
1318
|
{
|
|
1276
1319
|
paddingY: "3",
|
|
1277
1320
|
width: "100%",
|
|
1278
1321
|
display: "flex",
|
|
1279
1322
|
justifyContent: "center",
|
|
1280
1323
|
children: /* @__PURE__ */ e(
|
|
1281
|
-
|
|
1324
|
+
gn,
|
|
1282
1325
|
{
|
|
1283
1326
|
style: {
|
|
1284
|
-
transform:
|
|
1327
|
+
transform: x ? "rotate(0deg)" : "rotate(180deg)"
|
|
1285
1328
|
}
|
|
1286
1329
|
}
|
|
1287
1330
|
)
|
|
1288
1331
|
}
|
|
1289
1332
|
),
|
|
1290
|
-
/* @__PURE__ */ e(
|
|
1333
|
+
/* @__PURE__ */ e(be.Content, { display: "flex", justifyContent: "center", children: /* @__PURE__ */ s(F, { display: "flex", overflowX: "auto", px: 4, pb: 1, children: [
|
|
1291
1334
|
/* @__PURE__ */ e(
|
|
1292
1335
|
R,
|
|
1293
1336
|
{
|
|
@@ -1295,7 +1338,7 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1295
1338
|
size: "lg",
|
|
1296
1339
|
variant: "ghost",
|
|
1297
1340
|
onClick: () => t("help"),
|
|
1298
|
-
children: /* @__PURE__ */ e(
|
|
1341
|
+
children: /* @__PURE__ */ e(fn, {})
|
|
1299
1342
|
}
|
|
1300
1343
|
),
|
|
1301
1344
|
/* @__PURE__ */ e(
|
|
@@ -1305,7 +1348,7 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1305
1348
|
size: "lg",
|
|
1306
1349
|
variant: "ghost",
|
|
1307
1350
|
onClick: () => t("toc"),
|
|
1308
|
-
children: /* @__PURE__ */ e(
|
|
1351
|
+
children: /* @__PURE__ */ e(mn, {})
|
|
1309
1352
|
}
|
|
1310
1353
|
),
|
|
1311
1354
|
Ge(r) && /* @__PURE__ */ e(
|
|
@@ -1315,7 +1358,7 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1315
1358
|
size: "lg",
|
|
1316
1359
|
variant: "ghost",
|
|
1317
1360
|
onClick: () => t("search"),
|
|
1318
|
-
children: /* @__PURE__ */ e(
|
|
1361
|
+
children: /* @__PURE__ */ e(bn, {})
|
|
1319
1362
|
}
|
|
1320
1363
|
),
|
|
1321
1364
|
/* @__PURE__ */ e(
|
|
@@ -1323,14 +1366,14 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1323
1366
|
{
|
|
1324
1367
|
"aria-label": "Zoom",
|
|
1325
1368
|
size: "lg",
|
|
1326
|
-
variant:
|
|
1369
|
+
variant: g ? "solid" : "ghost",
|
|
1327
1370
|
onClick: () => {
|
|
1328
|
-
|
|
1371
|
+
g ? r?.zoom.exit({ animate: !0 }) : r?.zoom.enter({
|
|
1329
1372
|
animate: !0,
|
|
1330
1373
|
scale: 2
|
|
1331
1374
|
});
|
|
1332
1375
|
},
|
|
1333
|
-
children:
|
|
1376
|
+
children: g ? /* @__PURE__ */ e(Sn, {}) : /* @__PURE__ */ e(Cn, {})
|
|
1334
1377
|
}
|
|
1335
1378
|
),
|
|
1336
1379
|
/* @__PURE__ */ e(
|
|
@@ -1345,17 +1388,17 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1345
1388
|
children: /* @__PURE__ */ e(Nn, {})
|
|
1346
1389
|
}
|
|
1347
1390
|
),
|
|
1348
|
-
|
|
1391
|
+
se(r) && /* @__PURE__ */ e(
|
|
1349
1392
|
R,
|
|
1350
1393
|
{
|
|
1351
1394
|
"aria-label": "Bookmarks",
|
|
1352
1395
|
size: "lg",
|
|
1353
1396
|
variant: "ghost",
|
|
1354
1397
|
onClick: () => t("bookmarks"),
|
|
1355
|
-
children: /* @__PURE__ */ e(
|
|
1398
|
+
children: /* @__PURE__ */ e(Wn, {})
|
|
1356
1399
|
}
|
|
1357
1400
|
),
|
|
1358
|
-
|
|
1401
|
+
se(r) && /* @__PURE__ */ e(
|
|
1359
1402
|
R,
|
|
1360
1403
|
{
|
|
1361
1404
|
"aria-label": "Annotations",
|
|
@@ -1365,17 +1408,17 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1365
1408
|
children: /* @__PURE__ */ e(he, {})
|
|
1366
1409
|
}
|
|
1367
1410
|
),
|
|
1368
|
-
|
|
1411
|
+
je(r) && /* @__PURE__ */ e(
|
|
1369
1412
|
R,
|
|
1370
1413
|
{
|
|
1371
1414
|
"aria-label": "Refit",
|
|
1372
1415
|
size: "lg",
|
|
1373
1416
|
variant: "ghost",
|
|
1374
1417
|
onClick: () => {
|
|
1375
|
-
|
|
1418
|
+
l(!0);
|
|
1376
1419
|
},
|
|
1377
1420
|
disabled: !m,
|
|
1378
|
-
children: /* @__PURE__ */ e(
|
|
1421
|
+
children: /* @__PURE__ */ e(Hn, {})
|
|
1379
1422
|
}
|
|
1380
1423
|
),
|
|
1381
1424
|
/* @__PURE__ */ e(
|
|
@@ -1390,10 +1433,10 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1390
1433
|
scale: 0.5
|
|
1391
1434
|
});
|
|
1392
1435
|
},
|
|
1393
|
-
children: /* @__PURE__ */ e(
|
|
1436
|
+
children: /* @__PURE__ */ e(vn, {})
|
|
1394
1437
|
}
|
|
1395
1438
|
),
|
|
1396
|
-
|
|
1439
|
+
qe(r) && /* @__PURE__ */ e(
|
|
1397
1440
|
R,
|
|
1398
1441
|
{
|
|
1399
1442
|
"aria-label": "Gallery",
|
|
@@ -1411,13 +1454,13 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1411
1454
|
}
|
|
1412
1455
|
);
|
|
1413
1456
|
}
|
|
1414
|
-
),
|
|
1415
|
-
const [n, t] = y(!1), o =
|
|
1457
|
+
), Xt = () => {
|
|
1458
|
+
const [n, t] = y(!1), o = O(() => document.fullscreenElement ? document.exitFullscreen().catch(console.error).then(() => {
|
|
1416
1459
|
t(!1);
|
|
1417
1460
|
}) : document.documentElement.requestFullscreen({ navigationUI: "hide" }).catch(console.error).then(() => {
|
|
1418
1461
|
t(!0);
|
|
1419
1462
|
}), []);
|
|
1420
|
-
return
|
|
1463
|
+
return $(() => {
|
|
1421
1464
|
function r() {
|
|
1422
1465
|
t(!!document.fullscreenElement);
|
|
1423
1466
|
}
|
|
@@ -1428,14 +1471,14 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1428
1471
|
isFullscreen: n,
|
|
1429
1472
|
onToggleFullscreenClick: o
|
|
1430
1473
|
};
|
|
1431
|
-
},
|
|
1474
|
+
}, Kt = f(
|
|
1432
1475
|
({
|
|
1433
1476
|
open: n,
|
|
1434
1477
|
onItemClick: t
|
|
1435
1478
|
}) => {
|
|
1436
|
-
const o =
|
|
1437
|
-
return /* @__PURE__ */
|
|
1438
|
-
|
|
1479
|
+
const o = C(), r = S(() => o?.context.manifest$, [o]), { isFullscreen: i, onToggleFullscreenClick: a } = Xt();
|
|
1480
|
+
return /* @__PURE__ */ s(
|
|
1481
|
+
Ye,
|
|
1439
1482
|
{
|
|
1440
1483
|
present: n,
|
|
1441
1484
|
position: "top",
|
|
@@ -1454,7 +1497,7 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1454
1497
|
}
|
|
1455
1498
|
),
|
|
1456
1499
|
/* @__PURE__ */ e(
|
|
1457
|
-
|
|
1500
|
+
z,
|
|
1458
1501
|
{
|
|
1459
1502
|
flex: 1,
|
|
1460
1503
|
maxW: 600,
|
|
@@ -1465,7 +1508,7 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1465
1508
|
children: /* @__PURE__ */ e(b, { truncate: !0, maxWidth: "100%", children: r?.title })
|
|
1466
1509
|
}
|
|
1467
1510
|
),
|
|
1468
|
-
/* @__PURE__ */
|
|
1511
|
+
/* @__PURE__ */ s(B, { children: [
|
|
1469
1512
|
/* @__PURE__ */ e(
|
|
1470
1513
|
R,
|
|
1471
1514
|
{
|
|
@@ -1485,7 +1528,7 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1485
1528
|
flexShrink: 0,
|
|
1486
1529
|
variant: "ghost",
|
|
1487
1530
|
onClick: a,
|
|
1488
|
-
children: i ? /* @__PURE__ */ e(
|
|
1531
|
+
children: i ? /* @__PURE__ */ e(Gn, {}) : /* @__PURE__ */ e(qn, {})
|
|
1489
1532
|
}
|
|
1490
1533
|
)
|
|
1491
1534
|
] })
|
|
@@ -1493,24 +1536,24 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1493
1536
|
}
|
|
1494
1537
|
);
|
|
1495
1538
|
}
|
|
1496
|
-
),
|
|
1539
|
+
), Jt = f(
|
|
1497
1540
|
({
|
|
1498
1541
|
onItemClick: n
|
|
1499
1542
|
}) => {
|
|
1500
|
-
const [t] =
|
|
1543
|
+
const [t] = ze(), { refitMenuOpen: o, fontSizeMenuOpen: r } = _([
|
|
1501
1544
|
"refitMenuOpen",
|
|
1502
1545
|
"fontSizeMenuOpen"
|
|
1503
1546
|
]);
|
|
1504
|
-
return /* @__PURE__ */
|
|
1547
|
+
return /* @__PURE__ */ s(ce, { children: [
|
|
1505
1548
|
/* @__PURE__ */ e(
|
|
1506
|
-
|
|
1549
|
+
Kt,
|
|
1507
1550
|
{
|
|
1508
1551
|
open: t && !o && !r,
|
|
1509
1552
|
onItemClick: n
|
|
1510
1553
|
}
|
|
1511
1554
|
),
|
|
1512
1555
|
/* @__PURE__ */ e(
|
|
1513
|
-
|
|
1556
|
+
Zt,
|
|
1514
1557
|
{
|
|
1515
1558
|
open: t && !o && !r,
|
|
1516
1559
|
onItemClick: n
|
|
@@ -1518,61 +1561,61 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1518
1561
|
)
|
|
1519
1562
|
] });
|
|
1520
1563
|
}
|
|
1521
|
-
),
|
|
1564
|
+
), eo = E.forwardRef(
|
|
1522
1565
|
function(t, o) {
|
|
1523
|
-
const { label: r, children: i, helperText: a, errorText:
|
|
1524
|
-
return /* @__PURE__ */
|
|
1525
|
-
r && /* @__PURE__ */
|
|
1566
|
+
const { label: r, children: i, helperText: a, errorText: l, optionalText: c, ...d } = t;
|
|
1567
|
+
return /* @__PURE__ */ s(te.Root, { ref: o, ...d, children: [
|
|
1568
|
+
r && /* @__PURE__ */ s(te.Label, { children: [
|
|
1526
1569
|
r,
|
|
1527
|
-
/* @__PURE__ */ e(
|
|
1570
|
+
/* @__PURE__ */ e(te.RequiredIndicator, { fallback: c })
|
|
1528
1571
|
] }),
|
|
1529
1572
|
i,
|
|
1530
|
-
a && /* @__PURE__ */ e(
|
|
1531
|
-
|
|
1573
|
+
a && /* @__PURE__ */ e(te.HelperText, { children: a }),
|
|
1574
|
+
l && /* @__PURE__ */ e(te.ErrorText, { children: l })
|
|
1532
1575
|
] });
|
|
1533
1576
|
}
|
|
1534
|
-
),
|
|
1577
|
+
), no = f(() => {
|
|
1535
1578
|
const { refitMenuOpen: t, onRefitMenuOpenChange: o } = _([
|
|
1536
1579
|
"refitMenuOpen",
|
|
1537
1580
|
"onRefitMenuOpenChange"
|
|
1538
|
-
]), r =
|
|
1581
|
+
]), r = C(), i = je(r) ? r : void 0, a = S(
|
|
1539
1582
|
() => i?.refit.settings$,
|
|
1540
1583
|
[i]
|
|
1541
1584
|
);
|
|
1542
1585
|
return /* @__PURE__ */ e(
|
|
1543
|
-
|
|
1586
|
+
j,
|
|
1544
1587
|
{
|
|
1545
1588
|
lazyMount: !0,
|
|
1546
1589
|
open: t,
|
|
1547
|
-
onOpenChange: (
|
|
1590
|
+
onOpenChange: (l) => o(l.open),
|
|
1548
1591
|
placement: "center",
|
|
1549
|
-
children: /* @__PURE__ */
|
|
1550
|
-
/* @__PURE__ */ e(
|
|
1551
|
-
/* @__PURE__ */ e(
|
|
1552
|
-
/* @__PURE__ */ e(
|
|
1553
|
-
/* @__PURE__ */
|
|
1554
|
-
/* @__PURE__ */ e(
|
|
1555
|
-
|
|
1592
|
+
children: /* @__PURE__ */ s(G, { children: [
|
|
1593
|
+
/* @__PURE__ */ e(Q, { children: /* @__PURE__ */ e(Z, { children: "Viewport fit" }) }),
|
|
1594
|
+
/* @__PURE__ */ e(Y, { children: /* @__PURE__ */ s(V.Root, { children: [
|
|
1595
|
+
/* @__PURE__ */ e(V.HelperText, { children: "Adjust the viewport for a more comfortable reading experience." }),
|
|
1596
|
+
/* @__PURE__ */ s(V.Content, { children: [
|
|
1597
|
+
/* @__PURE__ */ e(eo, { label: "Profile", children: /* @__PURE__ */ e(
|
|
1598
|
+
Qe,
|
|
1556
1599
|
{
|
|
1557
1600
|
defaultValue: "fit",
|
|
1558
|
-
onValueChange: (
|
|
1559
|
-
const c =
|
|
1601
|
+
onValueChange: (l) => {
|
|
1602
|
+
const c = l.value;
|
|
1560
1603
|
i?.refit.update({
|
|
1561
1604
|
viewportFit: c,
|
|
1562
1605
|
customWidth: 60
|
|
1563
1606
|
});
|
|
1564
1607
|
},
|
|
1565
1608
|
value: a?.viewportFit ?? "fit",
|
|
1566
|
-
children: /* @__PURE__ */
|
|
1567
|
-
/* @__PURE__ */ e(
|
|
1568
|
-
/* @__PURE__ */ e(
|
|
1569
|
-
/* @__PURE__ */ e(
|
|
1570
|
-
/* @__PURE__ */ e(
|
|
1609
|
+
children: /* @__PURE__ */ s(z, { gap: 2, children: [
|
|
1610
|
+
/* @__PURE__ */ e(ie, { value: "desktop", children: "Desktop" }),
|
|
1611
|
+
/* @__PURE__ */ e(ie, { value: "tablet", children: "Tablet" }),
|
|
1612
|
+
/* @__PURE__ */ e(ie, { value: "fit", children: "Full width (default)" }),
|
|
1613
|
+
/* @__PURE__ */ e(ie, { value: "custom", children: "Custom" })
|
|
1571
1614
|
] })
|
|
1572
1615
|
}
|
|
1573
1616
|
) }),
|
|
1574
1617
|
/* @__PURE__ */ e(
|
|
1575
|
-
|
|
1618
|
+
Ie,
|
|
1576
1619
|
{
|
|
1577
1620
|
label: "Maximum width (%)",
|
|
1578
1621
|
showValue: !0,
|
|
@@ -1581,8 +1624,8 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1581
1624
|
step: 1,
|
|
1582
1625
|
disabled: a?.viewportFit !== "custom",
|
|
1583
1626
|
value: [a?.customWidth ?? 60],
|
|
1584
|
-
onValueChange: (
|
|
1585
|
-
const c =
|
|
1627
|
+
onValueChange: (l) => {
|
|
1628
|
+
const c = l.value[0] ?? 0;
|
|
1586
1629
|
i?.refit.update({
|
|
1587
1630
|
customWidth: c
|
|
1588
1631
|
});
|
|
@@ -1591,12 +1634,12 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1591
1634
|
)
|
|
1592
1635
|
] })
|
|
1593
1636
|
] }) }),
|
|
1594
|
-
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(
|
|
1595
|
-
/* @__PURE__ */ e(
|
|
1637
|
+
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(X, { asChild: !0, children: /* @__PURE__ */ e(H, { variant: "outline", children: "Close" }) }) }),
|
|
1638
|
+
/* @__PURE__ */ e(q, {})
|
|
1596
1639
|
] })
|
|
1597
1640
|
}
|
|
1598
1641
|
);
|
|
1599
|
-
}),
|
|
1642
|
+
}), to = f(
|
|
1600
1643
|
({
|
|
1601
1644
|
contextText: n = "",
|
|
1602
1645
|
startOffset: t = 0,
|
|
@@ -1615,8 +1658,8 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1615
1658
|
n.length - 1
|
|
1616
1659
|
)
|
|
1617
1660
|
);
|
|
1618
|
-
return /* @__PURE__ */
|
|
1619
|
-
|
|
1661
|
+
return /* @__PURE__ */ s(
|
|
1662
|
+
ve,
|
|
1620
1663
|
{
|
|
1621
1664
|
href: r,
|
|
1622
1665
|
style: { margin: 5, overflow: "hidden" },
|
|
@@ -1628,7 +1671,7 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1628
1671
|
alignItems: "flex-start",
|
|
1629
1672
|
gap: 0,
|
|
1630
1673
|
children: [
|
|
1631
|
-
/* @__PURE__ */
|
|
1674
|
+
/* @__PURE__ */ s(b, { lineClamp: 1, as: "cite", style: { display: "block" }, children: [
|
|
1632
1675
|
'"',
|
|
1633
1676
|
c,
|
|
1634
1677
|
/* @__PURE__ */ e("b", { children: o }),
|
|
@@ -1640,18 +1683,18 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1640
1683
|
}
|
|
1641
1684
|
);
|
|
1642
1685
|
}
|
|
1643
|
-
),
|
|
1644
|
-
const n =
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
(a) => a === "" || !r ? ge(void 0) :
|
|
1686
|
+
), oo = 500, ro = () => {
|
|
1687
|
+
const n = re(() => new An("")), t = S(n), o = C(), r = Ge(o) ? o : void 0, i = S(() => n.pipe(
|
|
1688
|
+
_e(),
|
|
1689
|
+
W(
|
|
1690
|
+
(a) => a === "" || !r ? ge(void 0) : Ve(
|
|
1648
1691
|
ge({
|
|
1649
1692
|
type: "start",
|
|
1650
1693
|
data: void 0
|
|
1651
1694
|
}),
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1695
|
+
Ne(oo).pipe(
|
|
1696
|
+
W(() => r.search.search(a)),
|
|
1697
|
+
D((l) => ({ type: "end", data: l }))
|
|
1655
1698
|
)
|
|
1656
1699
|
)
|
|
1657
1700
|
)
|
|
@@ -1662,26 +1705,26 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1662
1705
|
status: i?.type ?? "idle",
|
|
1663
1706
|
data: i?.data
|
|
1664
1707
|
};
|
|
1665
|
-
},
|
|
1708
|
+
}, io = f(
|
|
1666
1709
|
({ onNavigate: n }) => {
|
|
1667
|
-
const t =
|
|
1710
|
+
const t = C(), { value: o, setValue: r, status: i, data: a } = ro(), l = (u) => {
|
|
1668
1711
|
r(u.target.value);
|
|
1669
|
-
}, c =
|
|
1712
|
+
}, c = O(
|
|
1670
1713
|
(u) => {
|
|
1671
1714
|
n(), t?.navigation.goToCfi(u);
|
|
1672
1715
|
},
|
|
1673
1716
|
[t, n]
|
|
1674
|
-
), d =
|
|
1717
|
+
), d = S(
|
|
1675
1718
|
() => t?.locateResource(a?.slice(0, 100) ?? []),
|
|
1676
1719
|
[a]
|
|
1677
1720
|
);
|
|
1678
|
-
return /* @__PURE__ */
|
|
1721
|
+
return /* @__PURE__ */ s(z, { flex: 1, height: "100%", gap: 2, children: [
|
|
1679
1722
|
/* @__PURE__ */ e(
|
|
1680
|
-
|
|
1723
|
+
tn,
|
|
1681
1724
|
{
|
|
1682
1725
|
placeholder: "Type something...",
|
|
1683
1726
|
value: o,
|
|
1684
|
-
onChange:
|
|
1727
|
+
onChange: l,
|
|
1685
1728
|
flexShrink: 0,
|
|
1686
1729
|
variant: "subtle",
|
|
1687
1730
|
name: "search",
|
|
@@ -1691,8 +1734,8 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1691
1734
|
focusRingColor: "transparent"
|
|
1692
1735
|
}
|
|
1693
1736
|
),
|
|
1694
|
-
/* @__PURE__ */
|
|
1695
|
-
|
|
1737
|
+
/* @__PURE__ */ s(
|
|
1738
|
+
z,
|
|
1696
1739
|
{
|
|
1697
1740
|
style: { overflow: "hidden", overflowY: "auto" },
|
|
1698
1741
|
overflow: "auto",
|
|
@@ -1701,13 +1744,13 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1701
1744
|
children: [
|
|
1702
1745
|
i === "start" && /* @__PURE__ */ e(b, { children: "Searching ..." }),
|
|
1703
1746
|
a?.length === 0 && /* @__PURE__ */ e(b, { children: "No results" }),
|
|
1704
|
-
i === "end" && (a?.length ?? 0) > 0 && /* @__PURE__ */
|
|
1705
|
-
/* @__PURE__ */
|
|
1747
|
+
i === "end" && (a?.length ?? 0) > 0 && /* @__PURE__ */ s(z, { children: [
|
|
1748
|
+
/* @__PURE__ */ s(b, { fontSize: "md", children: [
|
|
1706
1749
|
a?.length,
|
|
1707
1750
|
" result(s)"
|
|
1708
1751
|
] }),
|
|
1709
|
-
/* @__PURE__ */ e(
|
|
1710
|
-
|
|
1752
|
+
/* @__PURE__ */ e(z, { gap: 0, children: d?.map((u, g) => /* @__PURE__ */ e(
|
|
1753
|
+
to,
|
|
1711
1754
|
{
|
|
1712
1755
|
contextText: u.meta?.range?.startContainer.parentElement?.textContent ?? "",
|
|
1713
1756
|
pageIndex: u.meta?.itemPageIndex,
|
|
@@ -1717,7 +1760,7 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1717
1760
|
onClick: c,
|
|
1718
1761
|
absolutePageIndex: u.meta?.absolutePageIndex
|
|
1719
1762
|
},
|
|
1720
|
-
|
|
1763
|
+
g
|
|
1721
1764
|
)) })
|
|
1722
1765
|
] })
|
|
1723
1766
|
]
|
|
@@ -1725,13 +1768,13 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1725
1768
|
)
|
|
1726
1769
|
] });
|
|
1727
1770
|
}
|
|
1728
|
-
),
|
|
1771
|
+
), ao = f(
|
|
1729
1772
|
({
|
|
1730
1773
|
open: n,
|
|
1731
1774
|
setOpen: t,
|
|
1732
1775
|
onNavigate: o
|
|
1733
1776
|
}) => /* @__PURE__ */ e(
|
|
1734
|
-
|
|
1777
|
+
j,
|
|
1735
1778
|
{
|
|
1736
1779
|
lazyMount: !0,
|
|
1737
1780
|
placement: "center",
|
|
@@ -1739,23 +1782,23 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1739
1782
|
onOpenChange: (r) => t(r.open),
|
|
1740
1783
|
size: { mdDown: "full", md: "lg" },
|
|
1741
1784
|
scrollBehavior: "inside",
|
|
1742
|
-
children: /* @__PURE__ */
|
|
1743
|
-
/* @__PURE__ */ e(
|
|
1744
|
-
/* @__PURE__ */ e(
|
|
1745
|
-
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(
|
|
1746
|
-
/* @__PURE__ */ e(
|
|
1785
|
+
children: /* @__PURE__ */ s(G, { height: "100%", children: [
|
|
1786
|
+
/* @__PURE__ */ e(Q, { children: /* @__PURE__ */ e(Z, { children: "Search" }) }),
|
|
1787
|
+
/* @__PURE__ */ e(Y, { flex: 1, p: 0, children: /* @__PURE__ */ e(io, { onNavigate: o }) }),
|
|
1788
|
+
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(X, { asChild: !0, children: /* @__PURE__ */ e(H, { variant: "outline", children: "Cancel" }) }) }),
|
|
1789
|
+
/* @__PURE__ */ e(q, {})
|
|
1747
1790
|
] })
|
|
1748
1791
|
}
|
|
1749
1792
|
)
|
|
1750
|
-
),
|
|
1793
|
+
), lo = f(
|
|
1751
1794
|
({ onNavigate: n }) => {
|
|
1752
|
-
const t =
|
|
1795
|
+
const t = C(), { manifest: o, assumedRenditionLayout: r } = S(() => t?.context, [t]) ?? {}, { nav: i } = o ?? {}, a = ne();
|
|
1753
1796
|
i?.toc;
|
|
1754
|
-
const { beginSpineItemIndex:
|
|
1797
|
+
const { beginSpineItemIndex: l, beginPageIndexInSpineItem: c } = a ?? {}, d = (r === "reflowable" ? c : l) || 0;
|
|
1755
1798
|
let u = a?.beginChapterInfo;
|
|
1756
1799
|
for (; u?.subChapter; )
|
|
1757
1800
|
u = u?.subChapter;
|
|
1758
|
-
const
|
|
1801
|
+
const g = (h, m, v) => /* @__PURE__ */ s(on.Fragment, { children: [
|
|
1759
1802
|
/* @__PURE__ */ e(
|
|
1760
1803
|
A.Item,
|
|
1761
1804
|
{
|
|
@@ -1764,17 +1807,17 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1764
1807
|
display: "flex",
|
|
1765
1808
|
alignItems: "center"
|
|
1766
1809
|
},
|
|
1767
|
-
children: /* @__PURE__ */
|
|
1768
|
-
|
|
1810
|
+
children: /* @__PURE__ */ s(
|
|
1811
|
+
ve,
|
|
1769
1812
|
{
|
|
1770
1813
|
onClick: () => {
|
|
1771
1814
|
n(), t?.navigation.goToUrl(h.href);
|
|
1772
1815
|
},
|
|
1773
1816
|
href: "#",
|
|
1774
1817
|
children: [
|
|
1775
|
-
u?.path === h.path && /* @__PURE__ */ e(A.Indicator, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1776
|
-
u?.path !== h.path && /* @__PURE__ */ e(A.Indicator, { asChild: !0, visibility: "hidden", children: /* @__PURE__ */ e(
|
|
1777
|
-
/* @__PURE__ */
|
|
1818
|
+
u?.path === h.path && /* @__PURE__ */ e(A.Indicator, { asChild: !0, children: /* @__PURE__ */ e(Me, {}) }),
|
|
1819
|
+
u?.path !== h.path && /* @__PURE__ */ e(A.Indicator, { asChild: !0, visibility: "hidden", children: /* @__PURE__ */ e(Me, {}) }),
|
|
1820
|
+
/* @__PURE__ */ s(z, { gap: 0, children: [
|
|
1778
1821
|
/* @__PURE__ */ e(b, { fontSize: "md", children: h.title || h.path }),
|
|
1779
1822
|
u?.path === h.path && /* @__PURE__ */ e(
|
|
1780
1823
|
b,
|
|
@@ -1792,18 +1835,18 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1792
1835
|
}
|
|
1793
1836
|
),
|
|
1794
1837
|
h.contents.length > 0 && /* @__PURE__ */ e(A.Root, { as: "div", gap: 2, children: h.contents.map(
|
|
1795
|
-
(
|
|
1838
|
+
(x, M) => g(x, M, v + 1)
|
|
1796
1839
|
) })
|
|
1797
1840
|
] }, m);
|
|
1798
|
-
return /* @__PURE__ */ e(A.Root, { gap: 3, overflowY: "auto", py: 4, flex: 1, children: i?.toc.map((h, m) =>
|
|
1841
|
+
return /* @__PURE__ */ e(A.Root, { gap: 3, overflowY: "auto", py: 4, flex: 1, children: i?.toc.map((h, m) => g(h, m, 0)) });
|
|
1799
1842
|
}
|
|
1800
|
-
),
|
|
1843
|
+
), so = f(
|
|
1801
1844
|
({
|
|
1802
1845
|
open: n,
|
|
1803
1846
|
setOpen: t,
|
|
1804
1847
|
onNavigate: o
|
|
1805
1848
|
}) => /* @__PURE__ */ e(
|
|
1806
|
-
|
|
1849
|
+
j,
|
|
1807
1850
|
{
|
|
1808
1851
|
lazyMount: !0,
|
|
1809
1852
|
placement: "center",
|
|
@@ -1811,61 +1854,61 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1811
1854
|
onOpenChange: (r) => t(r.open),
|
|
1812
1855
|
size: { mdDown: "full", md: "lg" },
|
|
1813
1856
|
scrollBehavior: "inside",
|
|
1814
|
-
children: /* @__PURE__ */
|
|
1815
|
-
/* @__PURE__ */ e(
|
|
1816
|
-
/* @__PURE__ */ e(
|
|
1817
|
-
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(
|
|
1818
|
-
/* @__PURE__ */ e(
|
|
1857
|
+
children: /* @__PURE__ */ s(G, { children: [
|
|
1858
|
+
/* @__PURE__ */ e(Q, { children: /* @__PURE__ */ e(Z, { children: "Table of Contents" }) }),
|
|
1859
|
+
/* @__PURE__ */ e(Y, { overflowY: "auto", flex: 1, children: /* @__PURE__ */ e(lo, { onNavigate: o }) }),
|
|
1860
|
+
/* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(X, { asChild: !0, children: /* @__PURE__ */ e(H, { variant: "outline", children: "Cancel" }) }) }),
|
|
1861
|
+
/* @__PURE__ */ e(q, {})
|
|
1819
1862
|
] })
|
|
1820
1863
|
}
|
|
1821
1864
|
)
|
|
1822
|
-
), Pe = 0.5, Ee = 1,
|
|
1865
|
+
), Pe = 0.5, Ee = 1, Ae = 5, co = (n, t, o, r) => {
|
|
1823
1866
|
if (n > t && n < t + r)
|
|
1824
1867
|
return t + r;
|
|
1825
1868
|
const i = Math.min(Math.max(n, t), o), a = Math.round((i - t) / r) * r + t;
|
|
1826
1869
|
return Math.round(a * 100) / 100;
|
|
1827
|
-
},
|
|
1870
|
+
}, uo = f(() => {
|
|
1828
1871
|
const { quickMenuBottomBarBoundingBoxSignal: n } = _([
|
|
1829
1872
|
"quickMenuBottomBarBoundingBoxSignal"
|
|
1830
1873
|
]), t = ue(
|
|
1831
1874
|
n
|
|
1832
|
-
), o =
|
|
1875
|
+
), o = C(), r = S(
|
|
1833
1876
|
() => o?.zoom.state$.pipe(
|
|
1834
|
-
|
|
1835
|
-
|
|
1877
|
+
D((c) => c.currentScale),
|
|
1878
|
+
Le(100, Bn, {
|
|
1836
1879
|
leading: !0,
|
|
1837
1880
|
trailing: !0
|
|
1838
1881
|
})
|
|
1839
1882
|
),
|
|
1840
1883
|
[o]
|
|
1841
|
-
) ?? 1, i =
|
|
1842
|
-
() => o?.zoom.state$.pipe(
|
|
1884
|
+
) ?? 1, i = S(
|
|
1885
|
+
() => o?.zoom.state$.pipe(D((c) => c.isZooming)),
|
|
1843
1886
|
[o]
|
|
1844
|
-
) ?? !1, a =
|
|
1887
|
+
) ?? !1, a = co(
|
|
1845
1888
|
r,
|
|
1846
1889
|
Ee,
|
|
1847
|
-
|
|
1890
|
+
Ae,
|
|
1848
1891
|
Pe
|
|
1849
|
-
),
|
|
1892
|
+
), l = t?.borderBoxSize?.[0]?.blockSize ?? 1;
|
|
1850
1893
|
return /* @__PURE__ */ e(
|
|
1851
|
-
|
|
1894
|
+
ae,
|
|
1852
1895
|
{
|
|
1853
1896
|
present: i && r > 1,
|
|
1854
1897
|
animationName: { _open: "fade-in", _closed: "fade-out" },
|
|
1855
1898
|
animationDuration: "moderate",
|
|
1856
1899
|
position: "absolute",
|
|
1857
|
-
bottom: `calc(${
|
|
1900
|
+
bottom: `calc(${l}px + var(--chakra-spacing-4))`,
|
|
1858
1901
|
right: 4,
|
|
1859
1902
|
backgroundColor: "bg.panel",
|
|
1860
1903
|
shadow: "sm",
|
|
1861
1904
|
borderRadius: "md",
|
|
1862
1905
|
p: 4,
|
|
1863
1906
|
children: /* @__PURE__ */ e(
|
|
1864
|
-
|
|
1907
|
+
Ie,
|
|
1865
1908
|
{
|
|
1866
1909
|
value: [a],
|
|
1867
1910
|
min: Ee,
|
|
1868
|
-
max:
|
|
1911
|
+
max: Ae,
|
|
1869
1912
|
step: Pe,
|
|
1870
1913
|
minWidth: 200,
|
|
1871
1914
|
onValueChange: (c) => {
|
|
@@ -1876,10 +1919,10 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1876
1919
|
)
|
|
1877
1920
|
}
|
|
1878
1921
|
);
|
|
1879
|
-
}),
|
|
1922
|
+
}), Be = { _open: "fade-in", _closed: "fade-out" }, ho = f(() => (mt(), null)), po = f(() => (Lt(), $t(), /* @__PURE__ */ s(ce, { children: [
|
|
1880
1923
|
/* @__PURE__ */ e(zt, {}),
|
|
1881
|
-
/* @__PURE__ */ e(
|
|
1882
|
-
] }))),
|
|
1924
|
+
/* @__PURE__ */ e(ho, {})
|
|
1925
|
+
] }))), go = f(
|
|
1883
1926
|
({
|
|
1884
1927
|
children: n,
|
|
1885
1928
|
...t
|
|
@@ -1888,17 +1931,17 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1888
1931
|
"enableFloatingTime",
|
|
1889
1932
|
"enableFloatingProgress",
|
|
1890
1933
|
"onItemClick"
|
|
1891
|
-
]), [a,
|
|
1892
|
-
|
|
1893
|
-
}, [
|
|
1894
|
-
(
|
|
1895
|
-
|
|
1934
|
+
]), [a, l] = y(!1), [c, d] = y(!1), [u, g] = y(!1), [h, m] = y(void 0), [v, x] = y(!1), [M, k] = ze(), I = O(() => {
|
|
1935
|
+
l(!1), d(!1), g(!1), m(void 0), k(!1), x(!1);
|
|
1936
|
+
}, [k]), L = O(
|
|
1937
|
+
(p) => {
|
|
1938
|
+
p === "annotations" ? m("annotations") : p === "search" ? g(!0) : p === "help" ? d(!0) : p === "toc" ? l(!0) : p === "bookmarks" ? m("bookmarks") : p === "gallery" && x(!0), i?.(p);
|
|
1896
1939
|
},
|
|
1897
1940
|
[i]
|
|
1898
1941
|
);
|
|
1899
|
-
return /* @__PURE__ */
|
|
1900
|
-
/* @__PURE__ */ e(
|
|
1901
|
-
/* @__PURE__ */
|
|
1942
|
+
return /* @__PURE__ */ s(ce, { children: [
|
|
1943
|
+
/* @__PURE__ */ e(po, {}),
|
|
1944
|
+
/* @__PURE__ */ s(
|
|
1902
1945
|
F,
|
|
1903
1946
|
{
|
|
1904
1947
|
position: "absolute",
|
|
@@ -1912,74 +1955,74 @@ const jt = se.Root, Qt = se.ValueText, Te = () => {
|
|
|
1912
1955
|
children: [
|
|
1913
1956
|
n,
|
|
1914
1957
|
r && /* @__PURE__ */ e(
|
|
1915
|
-
|
|
1958
|
+
ae,
|
|
1916
1959
|
{
|
|
1917
|
-
present: !
|
|
1918
|
-
animationName:
|
|
1960
|
+
present: !M,
|
|
1961
|
+
animationName: Be,
|
|
1919
1962
|
animationDuration: "moderate",
|
|
1920
|
-
children: /* @__PURE__ */ e(
|
|
1963
|
+
children: /* @__PURE__ */ e(Bt, {})
|
|
1921
1964
|
}
|
|
1922
1965
|
),
|
|
1923
|
-
/* @__PURE__ */ e(
|
|
1924
|
-
/* @__PURE__ */ e(
|
|
1925
|
-
/* @__PURE__ */ e(
|
|
1926
|
-
/* @__PURE__ */ e(
|
|
1927
|
-
/* @__PURE__ */ e(
|
|
1928
|
-
/* @__PURE__ */ e(
|
|
1929
|
-
/* @__PURE__ */ e(
|
|
1966
|
+
/* @__PURE__ */ e(yt, { open: v, setOpen: x }),
|
|
1967
|
+
/* @__PURE__ */ e(no, {}),
|
|
1968
|
+
/* @__PURE__ */ e(Jt, { onItemClick: L }),
|
|
1969
|
+
/* @__PURE__ */ e(uo, {}),
|
|
1970
|
+
/* @__PURE__ */ e(Rt, {}),
|
|
1971
|
+
/* @__PURE__ */ e(gt, {}),
|
|
1972
|
+
/* @__PURE__ */ e(At, { open: c, setOpen: d }),
|
|
1930
1973
|
/* @__PURE__ */ e(
|
|
1931
|
-
|
|
1974
|
+
so,
|
|
1932
1975
|
{
|
|
1933
1976
|
open: a,
|
|
1934
|
-
setOpen:
|
|
1935
|
-
onNavigate:
|
|
1977
|
+
setOpen: l,
|
|
1978
|
+
onNavigate: I
|
|
1936
1979
|
}
|
|
1937
1980
|
),
|
|
1938
1981
|
/* @__PURE__ */ e(
|
|
1939
|
-
|
|
1982
|
+
ao,
|
|
1940
1983
|
{
|
|
1941
1984
|
open: u,
|
|
1942
|
-
setOpen:
|
|
1943
|
-
onNavigate:
|
|
1985
|
+
setOpen: g,
|
|
1986
|
+
onNavigate: I
|
|
1944
1987
|
}
|
|
1945
1988
|
),
|
|
1946
1989
|
/* @__PURE__ */ e(
|
|
1947
|
-
|
|
1990
|
+
ct,
|
|
1948
1991
|
{
|
|
1949
1992
|
openWith: h,
|
|
1950
|
-
setOpen: (
|
|
1951
|
-
onNavigate:
|
|
1993
|
+
setOpen: (p) => m(p ? "annotations" : void 0),
|
|
1994
|
+
onNavigate: I
|
|
1952
1995
|
}
|
|
1953
1996
|
),
|
|
1954
1997
|
/* @__PURE__ */ e(
|
|
1955
|
-
|
|
1998
|
+
ae,
|
|
1956
1999
|
{
|
|
1957
|
-
present: o ||
|
|
1958
|
-
animationName:
|
|
2000
|
+
present: o || M,
|
|
2001
|
+
animationName: Be,
|
|
1959
2002
|
animationDuration: "slow",
|
|
1960
2003
|
overflow: "hidden",
|
|
1961
|
-
children: /* @__PURE__ */ e(
|
|
2004
|
+
children: /* @__PURE__ */ e(_t, {})
|
|
1962
2005
|
}
|
|
1963
2006
|
),
|
|
1964
|
-
/* @__PURE__ */ e(
|
|
2007
|
+
/* @__PURE__ */ e(bt, {})
|
|
1965
2008
|
]
|
|
1966
2009
|
}
|
|
1967
2010
|
)
|
|
1968
2011
|
] });
|
|
1969
2012
|
}
|
|
1970
|
-
),
|
|
2013
|
+
), Bo = f(
|
|
1971
2014
|
({
|
|
1972
2015
|
children: n,
|
|
1973
2016
|
slots: t,
|
|
1974
2017
|
...o
|
|
1975
2018
|
}) => {
|
|
1976
2019
|
const { container: { props: r = {} } = {} } = t ?? {};
|
|
1977
|
-
return /* @__PURE__ */ e(
|
|
2020
|
+
return /* @__PURE__ */ e(Ct, { ...o, children: /* @__PURE__ */ e(go, { ...r, children: n }) });
|
|
1978
2021
|
}
|
|
1979
2022
|
);
|
|
1980
2023
|
export {
|
|
1981
2024
|
nt as BOOKMARK_AREA_DATA_ATTRIBUTE,
|
|
1982
|
-
|
|
1983
|
-
|
|
2025
|
+
go as InnerReactReader,
|
|
2026
|
+
Bo as ReactReader
|
|
1984
2027
|
};
|
|
1985
2028
|
//# sourceMappingURL=index.js.map
|