@prose-reader/react-reader 1.255.0 → 1.256.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/index.js CHANGED
@@ -1,23 +1,23 @@
1
- import { jsxs as l, jsx as e, Fragment as Se } from "react/jsx-runtime";
1
+ import { jsxs as l, jsx as e, Fragment as Ce } from "react/jsx-runtime";
2
2
  import * as B from "react";
3
- import Ze, { createContext as Ke, useContext as De, useEffect as W, memo as v, useCallback as D, useState as w, useMemo as Xe, useLayoutEffect as Je, useRef as en } from "react";
4
- import { signal as V, useObserve as b, useConstant as oe, useSignalValue as de, isDefined as Fe, useLiveRef as nn, useSubscribe as ce, useSignalState as tn } from "reactjrx";
5
- import { Subject as on, map as _, filter as ue, switchMap as H, EMPTY as ve, of as he, withLatestFrom as rn, NEVER as xe, startWith as an, distinctUntilChanged as ke, throttleTime as _e, tap as Le, first as $e, combineLatest as ln, mergeMap as sn, Observable as cn, skip as Ve, merge as Ne, timer as He, finalize as dn, BehaviorSubject as un, animationFrameScheduler as hn } from "rxjs";
6
- import { IconButton as I, Portal as Ie, Dialog as T, List as A, Link as Re, Stack as O, Text as m, Tabs as E, Button as G, Presence as ae, Box as L, createToaster as pn, Toaster as gn, Toast as J, Spinner as fn, RadioGroup as re, Slider as y, HStack as F, For as mn, useMediaQuery as bn, Fieldset as N, Heading as me, Kbd as ye, Popover as ee, Progress as le, chakra as vn, Collapsible as be, Field as te, Input as Cn } from "@chakra-ui/react";
7
- import { LuX as Sn, LuNotebookPen as pe, LuBookmark as xn, LuCheck as kn, LuArrowBigRight as In, LuArrowBigLeft as Rn, LuChevronDown as On, LuCircleHelp as Mn, LuTableOfContents as Tn, LuSearch as zn, LuZoomOut as yn, LuZoomIn as wn, LuGalleryHorizontal as Pn, LuCircleCheck as we } from "react-icons/lu";
3
+ import Ue, { createContext as Ye, useContext as Ae, useEffect as N, memo as v, useCallback as D, useState as y, useMemo as Ze, useLayoutEffect as Xe, useRef as Ke } from "react";
4
+ import { signal as V, useObserve as b, useConstant as oe, useSignalValue as ce, isDefined as De, useLiveRef as Je, useSubscribe as pe, useSignalState as en } from "reactjrx";
5
+ import { Subject as nn, map as L, filter as de, switchMap as W, EMPTY as Te, of as ue, withLatestFrom as tn, NEVER as Se, startWith as on, distinctUntilChanged as Fe, throttleTime as _e, tap as rn, first as Le, combineLatest as an, mergeMap as ln, Observable as sn, skip as cn, merge as $e, timer as Ve, finalize as dn, BehaviorSubject as un, animationFrameScheduler as hn } from "rxjs";
6
+ import { IconButton as I, Portal as xe, Dialog as T, List as A, Link as ke, Stack as O, Text as m, Tabs as E, Button as G, Presence as ae, Box as _, createToaster as pn, Toaster as gn, Toast as J, Spinner as fn, RadioGroup as re, Slider as w, HStack as F, For as mn, useMediaQuery as bn, Fieldset as H, Heading as me, Kbd as ze, Popover as ee, Progress as le, chakra as vn, Collapsible as be, Field as te, Input as Cn } from "@chakra-ui/react";
7
+ import { LuX as Sn, LuNotebookPen as he, LuBookmark as xn, LuCheck as kn, LuArrowBigRight as In, LuArrowBigLeft as Rn, LuChevronDown as On, LuCircleHelp as Mn, LuTableOfContents as Tn, LuSearch as zn, LuZoomOut as wn, LuZoomIn as yn, LuGalleryHorizontal as Pn, LuCircleCheck as we } from "react-icons/lu";
8
8
  import { createPortal as En } from "react-dom";
9
9
  import { isPositionInArea as Bn } from "@prose-reader/enhancer-gestures";
10
10
  import { isShallowEqual as An, observeIntersection as Dn, isHtmlTagElement as Fn } from "@prose-reader/core";
11
11
  import { BiFontSize as _n } from "react-icons/bi";
12
12
  import { BsBookmarks as Ln } from "react-icons/bs";
13
- import { MdOutlineFitScreen as $n, MdFullscreenExit as Vn, MdFullscreen as Nn } from "react-icons/md";
14
- import { RiGalleryView2 as Hn } from "react-icons/ri";
15
- import { RxDoubleArrowUp as Wn, RxDoubleArrowLeft as Gn, RxDoubleArrowDown as jn, RxDoubleArrowRight as qn } from "react-icons/rx";
13
+ import { MdOutlineFitScreen as $n, MdFullscreenExit as Vn, MdFullscreen as Hn } from "react-icons/md";
14
+ import { RiGalleryView2 as Wn } from "react-icons/ri";
15
+ import { RxDoubleArrowUp as Nn, RxDoubleArrowLeft as Gn, RxDoubleArrowDown as qn, RxDoubleArrowRight as jn } from "react-icons/rx";
16
16
  import { HiOutlineInformationCircle as Qn } from "react-icons/hi";
17
- import Yn from "rc-slider";
17
+ import Un from "rc-slider";
18
18
  import "rc-slider/assets/index.css";
19
- import { IoIosArrowBack as Un, IoMdMore as Zn } from "react-icons/io";
20
- const Kn = "data-bookmark-area", We = () => ({
19
+ import { IoIosArrowBack as Yn, IoMdMore as Zn } from "react-icons/io";
20
+ const Xn = "data-bookmark-area", He = () => ({
21
21
  reader: void 0,
22
22
  quickMenuOpen: !1,
23
23
  onQuickMenuOpenChange: () => {
@@ -25,7 +25,7 @@ const Kn = "data-bookmark-area", We = () => ({
25
25
  quickMenuBottomBarBoundingBoxSignal: V({
26
26
  default: void 0
27
27
  }),
28
- notificationsSubject: new on(),
28
+ notificationsSubject: new nn(),
29
29
  refitMenuOpen: !1,
30
30
  onRefitMenuOpenChange: () => {
31
31
  },
@@ -35,26 +35,29 @@ const Kn = "data-bookmark-area", We = () => ({
35
35
  fontSizeMin: 0.2,
36
36
  fontSizeMax: 5,
37
37
  uncontrolledFontSize: 1
38
- }), Oe = Ke(
39
- V({ default: We() })
38
+ }), Ie = Ye(
39
+ V({ default: He() })
40
40
  ), $ = (n) => {
41
- const t = De(Oe);
41
+ const t = Ae(Ie);
42
42
  return b(t, n);
43
- }, Xn = () => De(Oe), C = () => {
43
+ }, Kn = () => Ae(Ie), C = () => {
44
44
  const { reader: n } = $(["reader"]);
45
45
  return n;
46
- }, Ge = (n) => !!n && "__PROSE_READER_ENHANCER_SEARCH" in n, se = (n) => !!n && "__PROSE_READER_ENHANCER_ANNOTATIONS" in n, je = (n) => !!n && "__PROSE_READER_ENHANCER_GALLERY" in n, qe = (n) => !!n && "__PROSE_READER_ENHANCER_REFIT" in n, Jn = () => {
47
- const n = C(), { fontSize: t } = $(["fontSize"]);
48
- return W(() => {
49
- if (n && typeof t == "number") {
50
- const o = setTimeout(() => {
46
+ }, We = (n) => !!n && "__PROSE_READER_ENHANCER_SEARCH" in n, se = (n) => !!n && "__PROSE_READER_ENHANCER_ANNOTATIONS" in n, Ne = (n) => !!n && "__PROSE_READER_ENHANCER_GALLERY" in n, Ge = (n) => !!n && "__PROSE_READER_ENHANCER_REFIT" in n, Jn = () => {
47
+ const n = C(), { fontSize: t, uncontrolledFontSize: o } = $([
48
+ "fontSize",
49
+ "uncontrolledFontSize"
50
+ ]), r = t ?? o;
51
+ return N(() => {
52
+ if (n && r) {
53
+ const i = setTimeout(() => {
51
54
  n.settings.update({
52
- fontScale: t
55
+ fontScale: r
53
56
  });
54
57
  }, 200);
55
- return () => clearTimeout(o);
58
+ return () => clearTimeout(i);
56
59
  }
57
- }, [n, t]), null;
60
+ }, [n, r]), null;
58
61
  }, et = ({
59
62
  children: n,
60
63
  onQuickMenuOpenChange: t,
@@ -65,9 +68,9 @@ const Kn = "data-bookmark-area", We = () => ({
65
68
  onFontSizeChange: s,
66
69
  ...c
67
70
  }) => {
68
- const d = oe(() => V({ default: We() })), u = oe(
71
+ const d = oe(() => V({ default: He() })), u = oe(
69
72
  () => V({ default: d.value.fontSizeMenuOpen })
70
- ), g = de(
73
+ ), g = ce(
71
74
  u
72
75
  ), p = D(
73
76
  (M) => {
@@ -81,7 +84,7 @@ const Kn = "data-bookmark-area", We = () => ({
81
84
  f.update(M);
82
85
  },
83
86
  [f]
84
- ), k = de(
87
+ ), k = ce(
85
88
  f
86
89
  ), z = o ?? k, x = t ?? S, R = oe(
87
90
  () => V({ default: d.value.refitMenuOpen })
@@ -90,10 +93,10 @@ const Kn = "data-bookmark-area", We = () => ({
90
93
  R.update(M);
91
94
  },
92
95
  [R]
93
- ), h = de(
96
+ ), h = ce(
94
97
  R
95
98
  );
96
- return W(() => {
99
+ return N(() => {
97
100
  d.update((M) => ({
98
101
  ...M,
99
102
  ...c,
@@ -121,8 +124,8 @@ const Kn = "data-bookmark-area", We = () => ({
121
124
  p,
122
125
  h,
123
126
  P
124
- ]), /* @__PURE__ */ e(Oe.Provider, { value: d, children: n });
125
- }, yo = v(
127
+ ]), /* @__PURE__ */ e(Ie.Provider, { value: d, children: n });
128
+ }, To = v(
126
129
  ({
127
130
  children: n,
128
131
  ...t
@@ -132,7 +135,7 @@ const Kn = "data-bookmark-area", We = () => ({
132
135
  ] })
133
136
  ), nt = B.forwardRef(function(t, o) {
134
137
  return /* @__PURE__ */ e(I, { variant: "ghost", "aria-label": "Close", ref: o, ...t, children: t.children ?? /* @__PURE__ */ e(Sn, {}) });
135
- }), j = B.forwardRef(function(t, o) {
138
+ }), q = B.forwardRef(function(t, o) {
136
139
  const {
137
140
  children: r,
138
141
  portalled: i = !0,
@@ -140,11 +143,11 @@ const Kn = "data-bookmark-area", We = () => ({
140
143
  backdrop: s = !0,
141
144
  ...c
142
145
  } = t;
143
- return /* @__PURE__ */ l(Ie, { disabled: !i, container: a, children: [
146
+ return /* @__PURE__ */ l(xe, { disabled: !i, container: a, children: [
144
147
  s && /* @__PURE__ */ e(T.Backdrop, {}),
145
148
  /* @__PURE__ */ e(T.Positioner, { children: /* @__PURE__ */ e(T.Content, { ref: o, ...c, asChild: !1, children: r }) })
146
149
  ] });
147
- }), q = B.forwardRef(function(t, o) {
150
+ }), j = B.forwardRef(function(t, o) {
148
151
  return /* @__PURE__ */ e(
149
152
  T.CloseTrigger,
150
153
  {
@@ -156,36 +159,36 @@ const Kn = "data-bookmark-area", We = () => ({
156
159
  children: /* @__PURE__ */ e(nt, { size: "sm", ref: o, children: t.children })
157
160
  }
158
161
  );
159
- }), Q = T.Root, Y = T.Footer, U = T.Header, Z = T.Body;
162
+ }), Q = T.Root, U = T.Footer, Y = T.Header, Z = T.Body;
160
163
  T.Backdrop;
161
- const K = T.Title;
164
+ const X = T.Title;
162
165
  T.Description;
163
166
  T.Trigger;
164
- const X = T.ActionTrigger, tt = (n) => {
167
+ const K = T.ActionTrigger, tt = (n) => {
165
168
  const t = C(), o = se(t) ? t : void 0;
166
169
  return { data: b(
167
170
  () => o?.annotations.annotations$.pipe(
168
- _((i) => i.find((a) => a.id === n)),
169
- ue(Fe),
170
- H((i) => o.locateResource(i))
171
+ L((i) => i.find((a) => a.id === n)),
172
+ de(De),
173
+ W((i) => o.locateResource(i))
171
174
  ),
172
175
  [o]
173
176
  ) };
174
- }, Qe = ({
177
+ }, qe = ({
175
178
  id: n,
176
179
  onNavigate: t,
177
180
  allowLeftIcon: o = !0
178
181
  }) => {
179
182
  const r = C(), { data: i } = tt(n), a = i?.meta.range?.toString() || i?.meta.node?.textContent;
180
183
  return /* @__PURE__ */ e(A.Item, { children: /* @__PURE__ */ l(
181
- Re,
184
+ ke,
182
185
  {
183
186
  href: "#",
184
187
  onClick: () => {
185
188
  t(), r?.navigation.goToCfi(i?.meta.cfi ?? "");
186
189
  },
187
190
  children: [
188
- i?.resource?.notes ? /* @__PURE__ */ e(A.Indicator, { asChild: !0, children: /* @__PURE__ */ e(pe, {}) }) : o ? /* @__PURE__ */ e(A.Indicator, { asChild: !0, visibility: "hidden", children: /* @__PURE__ */ e(pe, {}) }) : null,
191
+ 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,
189
192
  /* @__PURE__ */ l(O, { gap: 0, children: [
190
193
  a ? /* @__PURE__ */ e(m, { lineClamp: 2, fontSize: "md", children: a }) : /* @__PURE__ */ l(m, { lineClamp: 2, fontSize: "md", fontStyle: "italic", children: [
191
194
  "Page ",
@@ -208,7 +211,7 @@ const X = T.ActionTrigger, tt = (n) => {
208
211
  const n = C(), t = se(n) ? n : void 0;
209
212
  return { data: b(
210
213
  () => t?.annotations.annotations$.pipe(
211
- H(
214
+ W(
212
215
  (r) => t.locateResource(r)
213
216
  )
214
217
  ),
@@ -222,7 +225,7 @@ const X = T.ActionTrigger, tt = (n) => {
222
225
  }, rt = ({ onNavigate: n }) => {
223
226
  const { data: t } = ot();
224
227
  return /* @__PURE__ */ e(A.Root, { overflowY: "auto", gap: 3, pt: 4, variant: "plain", children: t?.map((o) => /* @__PURE__ */ e(
225
- Qe,
228
+ qe,
226
229
  {
227
230
  id: o.resource.id,
228
231
  onNavigate: n
@@ -239,7 +242,7 @@ const X = T.ActionTrigger, tt = (n) => {
239
242
  }, at = ({ onNavigate: n }) => {
240
243
  const { data: t } = it();
241
244
  return /* @__PURE__ */ e(A.Root, { overflowY: "auto", gap: 3, pt: 4, variant: "plain", children: t?.map((o) => /* @__PURE__ */ e(
242
- Qe,
245
+ qe,
243
246
  {
244
247
  id: o.resource.id,
245
248
  onNavigate: n,
@@ -252,7 +255,7 @@ const X = T.ActionTrigger, tt = (n) => {
252
255
  onNavigate: n,
253
256
  defaultTab: t
254
257
  }) => {
255
- const [o, r] = w(t ?? "bookmarks");
258
+ const [o, r] = y(t ?? "bookmarks");
256
259
  return /* @__PURE__ */ l(
257
260
  E.Root,
258
261
  {
@@ -265,7 +268,7 @@ const X = T.ActionTrigger, tt = (n) => {
265
268
  "Bookmarks"
266
269
  ] }),
267
270
  /* @__PURE__ */ l(E.Trigger, { value: "annotations", children: [
268
- /* @__PURE__ */ e(pe, {}),
271
+ /* @__PURE__ */ e(he, {}),
269
272
  "Annotations"
270
273
  ] }),
271
274
  /* @__PURE__ */ e(E.Indicator, {})
@@ -290,8 +293,8 @@ const X = T.ActionTrigger, tt = (n) => {
290
293
  onOpenChange: (r) => t(r.open),
291
294
  size: { mdDown: "full", md: "lg" },
292
295
  scrollBehavior: "inside",
293
- children: /* @__PURE__ */ l(j, { height: "100%", children: [
294
- /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(K, { children: "Annotations" }) }),
296
+ children: /* @__PURE__ */ l(q, { height: "100%", children: [
297
+ /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(X, { children: "Annotations" }) }),
295
298
  /* @__PURE__ */ e(Z, { flex: 1, children: /* @__PURE__ */ e(
296
299
  lt,
297
300
  {
@@ -299,30 +302,30 @@ const X = T.ActionTrigger, tt = (n) => {
299
302
  defaultTab: n
300
303
  }
301
304
  ) }),
302
- /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(X, { asChild: !0, children: /* @__PURE__ */ e(G, { variant: "outline", children: "Cancel" }) }) }),
303
- /* @__PURE__ */ e(q, {})
305
+ /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(K, { asChild: !0, children: /* @__PURE__ */ e(G, { variant: "outline", children: "Cancel" }) }) }),
306
+ /* @__PURE__ */ e(j, {})
304
307
  ] })
305
308
  }
306
309
  )
307
310
  ), ct = v(({ children: n }) => {
308
311
  const t = C(), o = b(() => t?.spine.element$, [t]);
309
- return o ? /* @__PURE__ */ e(Se, { children: En(n, o) }) : null;
312
+ return o ? /* @__PURE__ */ e(Ce, { children: En(n, o) }) : null;
310
313
  }), dt = ({
311
314
  absolutePageIndex: n,
312
315
  itemIndex: t
313
316
  }) => {
314
317
  const o = C();
315
318
  return {
316
- spineItem: b(() => o ? t !== void 0 ? he(o.spine.spineItemsManager.get(t)) : n !== void 0 ? o.spine.pages.observeFromAbsolutePageIndex(n).pipe(
317
- _((i) => o.spine.spineItemsManager.get(i?.itemIndex))
318
- ) : ve : ve, [t, n, o])
319
+ spineItem: b(() => o ? t !== void 0 ? ue(o.spine.spineItemsManager.get(t)) : n !== void 0 ? o.spine.pages.observeFromAbsolutePageIndex(n).pipe(
320
+ L((i) => o.spine.spineItemsManager.get(i?.itemIndex))
321
+ ) : Te : Te, [t, n, o])
319
322
  };
320
323
  }, ut = ({
321
324
  absolutePageIndex: n,
322
325
  itemIndex: t
323
326
  }) => {
324
327
  const { spineItem: o } = dt({ absolutePageIndex: n, itemIndex: t }), r = b(
325
- () => o?.isReady$ ?? he(!1),
328
+ () => o?.isReady$ ?? ue(!1),
326
329
  [o]
327
330
  );
328
331
  return { spineItem: o, isReady: r };
@@ -348,9 +351,9 @@ const X = T.ActionTrigger, tt = (n) => {
348
351
  animationName: { _open: "fade-in", _closed: "fade-out" },
349
352
  animationDuration: "moderate",
350
353
  children: /* @__PURE__ */ e(
351
- L,
354
+ _,
352
355
  {
353
- "data-bookmark-area": Kn,
356
+ "data-bookmark-area": Xn,
354
357
  position: "absolute",
355
358
  left: t + r,
356
359
  transform: "translateX(-100%)",
@@ -392,11 +395,11 @@ const X = T.ActionTrigger, tt = (n) => {
392
395
  return se(n) ? n : void 0;
393
396
  }, ft = () => {
394
397
  const n = gt(), { data: t } = ge();
395
- W(() => n ? n.gestures.hooks.register(
398
+ N(() => n ? n.gestures.hooks.register(
396
399
  "beforeTapGesture",
397
400
  ({ event$: r }) => r.pipe(
398
- rn(n?.annotations.candidates$),
399
- _(([i, a]) => {
401
+ tn(n?.annotations.candidates$),
402
+ L(([i, a]) => {
400
403
  if (!i.page) return !0;
401
404
  const {
402
405
  spineItem: s,
@@ -433,10 +436,10 @@ const X = T.ActionTrigger, tt = (n) => {
433
436
  })
434
437
  )
435
438
  ) : void 0, [n, t]);
436
- }, Ce = pn({
439
+ }, ve = pn({
437
440
  placement: "bottom-end",
438
441
  pauseOnPageIdle: !0
439
- }), mt = () => /* @__PURE__ */ e(Ie, { children: /* @__PURE__ */ e(gn, { toaster: Ce, insetInline: { mdDown: "4" }, children: (n) => /* @__PURE__ */ l(J.Root, { width: { md: "sm" }, children: [
442
+ }), mt = () => /* @__PURE__ */ e(xe, { children: /* @__PURE__ */ e(gn, { toaster: ve, insetInline: { mdDown: "4" }, children: (n) => /* @__PURE__ */ l(J.Root, { width: { md: "sm" }, children: [
440
443
  n.type === "loading" ? /* @__PURE__ */ e(fn, { size: "sm", color: "blue.solid" }) : /* @__PURE__ */ e(J.Indicator, {}),
441
444
  /* @__PURE__ */ l(O, { gap: "1", flex: "1", maxWidth: "100%", children: [
442
445
  n.title && /* @__PURE__ */ e(J.Title, { children: n.title }),
@@ -453,17 +456,17 @@ const X = T.ActionTrigger, tt = (n) => {
453
456
  r && /* @__PURE__ */ e(re.ItemText, { children: r })
454
457
  ] });
455
458
  }
456
- ), Ye = re.Root, Me = B.forwardRef(
459
+ ), je = re.Root, Re = B.forwardRef(
457
460
  function(t, o) {
458
461
  const { marks: r, label: i, showValue: a, ...s } = 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);
459
- return /* @__PURE__ */ l(y.Root, { ref: o, thumbAlignment: "center", ...s, children: [
460
- i && !a && /* @__PURE__ */ e(y.Label, { children: i }),
462
+ return /* @__PURE__ */ l(w.Root, { ref: o, thumbAlignment: "center", ...s, children: [
463
+ i && !a && /* @__PURE__ */ e(w.Label, { children: i }),
461
464
  i && a && /* @__PURE__ */ l(F, { justify: "space-between", children: [
462
- /* @__PURE__ */ e(y.Label, { children: i }),
463
- /* @__PURE__ */ e(y.ValueText, {})
465
+ /* @__PURE__ */ e(w.Label, { children: i }),
466
+ /* @__PURE__ */ e(w.ValueText, {})
464
467
  ] }),
465
- /* @__PURE__ */ l(y.Control, { "data-has-mark-label": u || void 0, children: [
466
- /* @__PURE__ */ e(y.Track, { children: /* @__PURE__ */ e(y.Range, {}) }),
468
+ /* @__PURE__ */ l(w.Control, { "data-has-mark-label": u || void 0, children: [
469
+ /* @__PURE__ */ e(w.Track, { children: /* @__PURE__ */ e(w.Range, {}) }),
467
470
  /* @__PURE__ */ e(bt, { value: c }),
468
471
  /* @__PURE__ */ e(vt, { marks: d })
469
472
  ] })
@@ -472,27 +475,27 @@ const X = T.ActionTrigger, tt = (n) => {
472
475
  );
473
476
  function bt(n) {
474
477
  const { value: t } = n;
475
- return /* @__PURE__ */ e(mn, { each: t, children: (o, r) => /* @__PURE__ */ e(y.Thumb, { index: r, children: /* @__PURE__ */ e(y.HiddenInput, {}) }, r) });
478
+ return /* @__PURE__ */ e(mn, { each: t, children: (o, r) => /* @__PURE__ */ e(w.Thumb, { index: r, children: /* @__PURE__ */ e(w.HiddenInput, {}) }, r) });
476
479
  }
477
480
  const vt = B.forwardRef(
478
481
  function(t, o) {
479
482
  const { marks: r } = t;
480
- return r?.length ? /* @__PURE__ */ e(y.MarkerGroup, { ref: o, children: r.map((i, a) => {
483
+ return r?.length ? /* @__PURE__ */ e(w.MarkerGroup, { ref: o, children: r.map((i, a) => {
481
484
  const s = typeof i == "number" ? i : i.value, c = typeof i == "number" ? void 0 : i.label;
482
- return /* @__PURE__ */ l(y.Marker, { value: s, children: [
483
- /* @__PURE__ */ e(y.MarkerIndicator, {}),
485
+ return /* @__PURE__ */ l(w.Marker, { value: s, children: [
486
+ /* @__PURE__ */ e(w.MarkerIndicator, {}),
484
487
  c
485
488
  ] }, a);
486
489
  }) }) : null;
487
490
  }
488
- ), Ct = ["global", "book", "device"], Pe = [
491
+ ), Ct = ["global", "book", "device"], ye = [
489
492
  "global",
490
493
  "book",
491
494
  "mobile",
492
495
  "tablet",
493
496
  "desktop"
494
497
  ], St = "(max-width: 767px)", xt = "(max-width: 1023px)", kt = v(() => {
495
- const n = Xn(), {
498
+ const n = Kn(), {
496
499
  fontSizeMenuOpen: t,
497
500
  onFontSizeMenuOpenChange: o,
498
501
  uncontrolledFontSize: r,
@@ -512,10 +515,10 @@ const vt = B.forwardRef(
512
515
  "onFontSizeChange",
513
516
  "onFontSizeScopeChange",
514
517
  "uncontrolledFontSize"
515
- ]), g = nn(d), [p, f] = bn([
518
+ ]), g = Je(d), [p, f] = bn([
516
519
  St,
517
520
  xt
518
- ]), S = c === "book" ? "book" : c === "device" ? p ? "mobile" : f ? "tablet" : "desktop" : "global", [k, z] = w(S), x = D(
521
+ ]), S = c === "book" ? "book" : c === "device" ? p ? "mobile" : f ? "tablet" : "desktop" : "global", [k, z] = y(S), x = D(
519
522
  (h, M) => {
520
523
  h === S && (g.current ? g.current(M) : n.update((fe) => ({
521
524
  ...fe,
@@ -549,14 +552,14 @@ const vt = B.forwardRef(
549
552
  o(h.open);
550
553
  },
551
554
  placement: "center",
552
- children: /* @__PURE__ */ l(j, { maxH: "40vh", overflow: "auto", children: [
553
- /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(K, { children: "Font size" }) }),
555
+ children: /* @__PURE__ */ l(q, { maxH: "40vh", overflow: "auto", children: [
556
+ /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(X, { children: "Font size" }) }),
554
557
  /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ l(O, { gap: 8, flex: 1, children: [
555
- /* @__PURE__ */ l(N.Root, { children: [
556
- /* @__PURE__ */ e(N.Legend, { children: "Scope" }),
557
- /* @__PURE__ */ e(N.HelperText, { children: "The scope to which apply the font size for this book." }),
558
- /* @__PURE__ */ e(N.Content, { children: /* @__PURE__ */ e(
559
- Ye,
558
+ /* @__PURE__ */ l(H.Root, { children: [
559
+ /* @__PURE__ */ e(H.Legend, { children: "Scope" }),
560
+ /* @__PURE__ */ e(H.HelperText, { children: "The scope to which apply the font size for this book." }),
561
+ /* @__PURE__ */ e(H.Content, { children: /* @__PURE__ */ e(
562
+ je,
560
563
  {
561
564
  onValueChange: (h) => {
562
565
  const M = h.value;
@@ -574,7 +577,7 @@ const vt = B.forwardRef(
574
577
  value: k,
575
578
  onValueChange: (h) => z(h.value),
576
579
  children: [
577
- /* @__PURE__ */ e(E.List, { children: Pe.map((h) => /* @__PURE__ */ l(
580
+ /* @__PURE__ */ e(E.List, { children: ye.map((h) => /* @__PURE__ */ l(
578
581
  E.Trigger,
579
582
  {
580
583
  value: h,
@@ -587,8 +590,8 @@ const vt = B.forwardRef(
587
590
  },
588
591
  h
589
592
  )) }),
590
- Pe.map((h) => /* @__PURE__ */ e(E.Content, { value: h, children: /* @__PURE__ */ e(
591
- Me,
593
+ ye.map((h) => /* @__PURE__ */ e(E.Content, { value: h, children: /* @__PURE__ */ e(
594
+ Re,
592
595
  {
593
596
  label: "%",
594
597
  value: [(R(h) ?? 1) * 100],
@@ -603,8 +606,8 @@ const vt = B.forwardRef(
603
606
  }
604
607
  )
605
608
  ] }) }),
606
- /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(X, { asChild: !0, children: /* @__PURE__ */ e(G, { variant: "outline", children: "Close" }) }) }),
607
- /* @__PURE__ */ e(q, {})
609
+ /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(K, { asChild: !0, children: /* @__PURE__ */ e(G, { variant: "outline", children: "Close" }) }) }),
610
+ /* @__PURE__ */ e(j, {})
608
611
  ] })
609
612
  }
610
613
  );
@@ -619,7 +622,7 @@ const vt = B.forwardRef(
619
622
  right: 0
620
623
  };
621
624
  function Rt() {
622
- const [n, t] = w(null), [o, r] = w(It), i = Xe(
625
+ const [n, t] = y(null), [o, r] = y(It), i = Ze(
623
626
  () => new ResizeObserver((a) => {
624
627
  if (a[0]) {
625
628
  const { x: s, y: c, width: d, height: u, top: g, left: p, bottom: f, right: S } = a[0].contentRect;
@@ -628,7 +631,7 @@ function Rt() {
628
631
  }),
629
632
  []
630
633
  );
631
- return Je(() => {
634
+ return Xe(() => {
632
635
  if (n)
633
636
  return i.observe(n), () => {
634
637
  i.disconnect();
@@ -636,25 +639,25 @@ function Rt() {
636
639
  }, [n, i]), [t, o, n];
637
640
  }
638
641
  const Ot = (n, t, o) => {
639
- const r = C(), i = je(r) ? r : void 0;
640
- ce(() => {
641
- if (!i || !n) return xe;
642
+ const r = C(), i = Ne(r) ? r : void 0;
643
+ pe(() => {
644
+ if (!i || !n) return Se;
642
645
  const a = t.layout.layout$.pipe(
643
- an(t.layout.layoutInfo),
644
- ke(An)
646
+ on(t.layout.layoutInfo),
647
+ Fe(An)
645
648
  ), s = Dn(
646
649
  n
647
- ).pipe(_((c) => c.some((d) => d.isIntersecting)));
650
+ ).pipe(L((c) => c.some((d) => d.isIntersecting)));
648
651
  return a.pipe(
649
652
  _e(100, void 0, { trailing: !0 }),
650
- H(() => s.pipe(
651
- Le((c) => {
653
+ W(() => s.pipe(
654
+ rn((c) => {
652
655
  c || (n.innerHTML = "");
653
656
  }),
654
- ue((c) => c),
655
- $e()
657
+ de((c) => c),
658
+ Le()
656
659
  ).pipe(
657
- H(() => (n.innerHTML = "", i?.gallery.snapshot(
660
+ W(() => (n.innerHTML = "", i?.gallery.snapshot(
658
661
  t,
659
662
  n,
660
663
  o
@@ -671,7 +674,7 @@ const Ot = (n, t, o) => {
671
674
  [a, n]
672
675
  );
673
676
  return /* @__PURE__ */ l(
674
- L,
677
+ _,
675
678
  {
676
679
  width: "100%",
677
680
  aspectRatio: "2/3",
@@ -687,7 +690,7 @@ const Ot = (n, t, o) => {
687
690
  },
688
691
  children: [
689
692
  /* @__PURE__ */ e(
690
- L,
693
+ _,
691
694
  {
692
695
  height: "100%",
693
696
  width: "100%",
@@ -729,10 +732,10 @@ const Ot = (n, t, o) => {
729
732
  onOpenChange: (i) => t(i.open),
730
733
  size: { mdDown: "full", md: "lg" },
731
734
  scrollBehavior: "inside",
732
- children: /* @__PURE__ */ l(j, { height: "100%", children: [
733
- /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(K, { children: "Gallery" }) }),
735
+ children: /* @__PURE__ */ l(q, { height: "100%", children: [
736
+ /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(X, { children: "Gallery" }) }),
734
737
  /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(
735
- L,
738
+ _,
736
739
  {
737
740
  gridTemplateColumns: [
738
741
  "repeat(2, minmax(0, 1fr))",
@@ -754,13 +757,13 @@ const Ot = (n, t, o) => {
754
757
  ))
755
758
  }
756
759
  ) }),
757
- /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(X, { asChild: !0, children: /* @__PURE__ */ e(G, { variant: "outline", children: "Cancel" }) }) }),
758
- /* @__PURE__ */ e(q, {})
760
+ /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(K, { asChild: !0, children: /* @__PURE__ */ e(G, { variant: "outline", children: "Cancel" }) }) }),
761
+ /* @__PURE__ */ e(j, {})
759
762
  ] })
760
763
  }
761
764
  );
762
765
  }
763
- ), zt = "@prose-reader/react-reader", yt = "1.254.0", wt = v(
766
+ ), zt = "@prose-reader/react-reader", wt = "1.255.0", yt = v(
764
767
  ({ open: n, setOpen: t }) => /* @__PURE__ */ e(
765
768
  Q,
766
769
  {
@@ -770,8 +773,8 @@ const Ot = (n, t, o) => {
770
773
  onOpenChange: (o) => t(o.open),
771
774
  size: { mdDown: "full", md: "lg" },
772
775
  scrollBehavior: "inside",
773
- children: /* @__PURE__ */ l(j, { children: [
774
- /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(K, { children: "Help" }) }),
776
+ children: /* @__PURE__ */ l(q, { children: [
777
+ /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(X, { children: "Help" }) }),
775
778
  /* @__PURE__ */ l(
776
779
  Z,
777
780
  {
@@ -784,12 +787,12 @@ const Ot = (n, t, o) => {
784
787
  /* @__PURE__ */ l(O, { children: [
785
788
  /* @__PURE__ */ e(me, { mb: 2, as: "h3", size: "lg", children: "Shortcuts" }),
786
789
  /* @__PURE__ */ l(F, { mb: 1, children: [
787
- /* @__PURE__ */ e(ye, { children: /* @__PURE__ */ e(In, {}) }),
790
+ /* @__PURE__ */ e(ze, { children: /* @__PURE__ */ e(In, {}) }),
788
791
  " ",
789
792
  /* @__PURE__ */ e(m, { children: "Navigate to right page" })
790
793
  ] }),
791
794
  /* @__PURE__ */ l(F, { mb: 1, children: [
792
- /* @__PURE__ */ e(ye, { children: /* @__PURE__ */ e(Rn, {}) }),
795
+ /* @__PURE__ */ e(ze, { children: /* @__PURE__ */ e(Rn, {}) }),
793
796
  " ",
794
797
  /* @__PURE__ */ e(m, { children: "Navigate to left page" })
795
798
  ] })
@@ -803,22 +806,22 @@ const Ot = (n, t, o) => {
803
806
  /* @__PURE__ */ l(m, { children: [
804
807
  zt,
805
808
  " version: ",
806
- yt
809
+ wt
807
810
  ] })
808
811
  ] })
809
812
  ]
810
813
  }
811
814
  ),
812
- /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(X, { asChild: !0, children: /* @__PURE__ */ e(G, { variant: "outline", children: "Cancel" }) }) }),
813
- /* @__PURE__ */ e(q, {})
815
+ /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(K, { asChild: !0, children: /* @__PURE__ */ e(G, { variant: "outline", children: "Cancel" }) }) }),
816
+ /* @__PURE__ */ e(j, {})
814
817
  ] })
815
818
  }
816
819
  )
817
820
  ), ne = () => {
818
821
  const n = C();
819
822
  return b(
820
- () => n ? ln([n.pagination.state$, n.context]).pipe(
821
- _(([t, o]) => {
823
+ () => n ? an([n.pagination.state$, n.context]).pipe(
824
+ L(([t, o]) => {
822
825
  const r = o.manifest?.spineItems.every(
823
826
  (i) => i.mediaType?.startsWith("image/")
824
827
  );
@@ -827,20 +830,20 @@ const Ot = (n, t, o) => {
827
830
  hasChapters: !o.isFullyPrePaginated && !r
828
831
  };
829
832
  })
830
- ) : xe,
833
+ ) : Se,
831
834
  [n]
832
835
  );
833
836
  }, Pt = () => {
834
837
  const n = ne(), t = Math.floor(
835
838
  (n?.percentageEstimateOfBook ?? 0) * 100
836
839
  ), o = t > 0 ? t : 1;
837
- return n?.percentageEstimateOfBook === void 0 ? null : /* @__PURE__ */ e(L, { position: "absolute", right: 0, bottom: 0, p: 2, color: "black", children: /* @__PURE__ */ l(m, { fontSize: "sm", children: [
840
+ return n?.percentageEstimateOfBook === void 0 ? null : /* @__PURE__ */ e(_, { position: "absolute", right: 0, bottom: 0, p: 2, color: "black", children: /* @__PURE__ */ l(m, { fontSize: "sm", children: [
838
841
  o,
839
842
  " %"
840
843
  ] }) });
841
844
  }, Et = () => {
842
- const [n, t] = w(/* @__PURE__ */ new Date());
843
- return W(() => {
845
+ const [n, t] = y(/* @__PURE__ */ new Date());
846
+ return N(() => {
844
847
  const o = setInterval(() => {
845
848
  t(/* @__PURE__ */ new Date());
846
849
  }, 6e4);
@@ -852,16 +855,16 @@ const Ot = (n, t, o) => {
852
855
  hour: "2-digit",
853
856
  minute: "2-digit"
854
857
  }) });
855
- }, Te = () => {
858
+ }, Oe = () => {
856
859
  const { quickMenuOpen: n, onQuickMenuOpenChange: t } = $([
857
860
  "quickMenuOpen",
858
861
  "onQuickMenuOpenChange"
859
862
  ]);
860
863
  return [n, t];
861
864
  }, At = () => {
862
- const [n] = Te();
865
+ const [n] = Oe();
863
866
  return /* @__PURE__ */ e(
864
- L,
867
+ _,
865
868
  {
866
869
  position: "absolute",
867
870
  left: 0,
@@ -873,7 +876,7 @@ const Ot = (n, t, o) => {
873
876
  );
874
877
  }, Dt = () => {
875
878
  const n = C();
876
- ce(
879
+ pe(
877
880
  () => n?.links$.subscribe((t) => {
878
881
  if (t.type === "click" && Fn(t.target, "a")) {
879
882
  if (!t.target.href) return;
@@ -885,40 +888,18 @@ const Ot = (n, t, o) => {
885
888
  }),
886
889
  [n]
887
890
  );
888
- }, Ft = {
889
- fontScaleChange: "fontScaleChange"
890
- }, _t = () => {
891
- const n = C(), { notificationsSubject: t, fontSizeMenuOpen: o } = $([
892
- "notificationsSubject",
893
- "fontSizeMenuOpen"
894
- ]);
895
- ce(
896
- () => o ? ve : n?.settings.values$.pipe(
897
- _(({ fontScale: r }) => r),
898
- ke(),
899
- Ve(1),
900
- Le((r) => {
901
- t.next({
902
- key: Ft.fontScaleChange,
903
- title: "Font size changed",
904
- description: `${r * 100} %`
905
- });
906
- })
907
- ),
908
- [n, t, o]
909
- );
910
- }, Lt = () => {
891
+ }, Ft = () => {
911
892
  const { notificationsSubject: n } = $([
912
893
  "notificationsSubject"
913
894
  ]);
914
- _t(), ce(
895
+ pe(
915
896
  () => n.pipe(
916
- ue(Fe),
917
- sn((t) => {
918
- const o = t.duration ?? 3e3, r = new cn((a) => {
897
+ de(De),
898
+ ln((t) => {
899
+ const o = t.duration ?? 3e3, r = new sn((a) => {
919
900
  try {
920
901
  queueMicrotask(() => {
921
- const s = Ce.create({
902
+ const s = ve.create({
922
903
  title: t.title,
923
904
  description: t.description,
924
905
  duration: o
@@ -929,20 +910,20 @@ const Ot = (n, t, o) => {
929
910
  a.error(s);
930
911
  }
931
912
  }), i = n.pipe(
932
- Ve(1),
933
- ue((a) => !!t.key && a?.key === t.key)
913
+ cn(1),
914
+ de((a) => !!t.key && a?.key === t.key)
934
915
  );
935
916
  return r.pipe(
936
- H(
937
- (a) => Ne(
938
- He(o),
939
- t.abort ?? xe,
917
+ W(
918
+ (a) => $e(
919
+ Ve(o),
920
+ t.abort ?? Se,
940
921
  i
941
922
  ).pipe(
942
- $e(),
923
+ Le(),
943
924
  dn(() => {
944
925
  queueMicrotask(() => {
945
- Ce.dismiss(a);
926
+ ve.dismiss(a);
946
927
  });
947
928
  })
948
929
  )
@@ -952,7 +933,7 @@ const Ot = (n, t, o) => {
952
933
  ),
953
934
  [n]
954
935
  );
955
- }, $t = B.forwardRef(
936
+ }, _t = B.forwardRef(
956
937
  function(t, o) {
957
938
  const {
958
939
  showArrow: r,
@@ -969,7 +950,7 @@ const Ot = (n, t, o) => {
969
950
  positioning: { ...d.positioning, gutter: 4 },
970
951
  children: [
971
952
  /* @__PURE__ */ e(ee.Trigger, { asChild: !0, children: i }),
972
- /* @__PURE__ */ e(Ie, { disabled: !a, container: c, children: /* @__PURE__ */ e(ee.Positioner, { children: /* @__PURE__ */ l(
953
+ /* @__PURE__ */ e(xe, { disabled: !a, container: c, children: /* @__PURE__ */ e(ee.Positioner, { children: /* @__PURE__ */ l(
973
954
  ee.Content,
974
955
  {
975
956
  width: "auto",
@@ -988,9 +969,9 @@ const Ot = (n, t, o) => {
988
969
  }
989
970
  );
990
971
  }
991
- ), Vt = B.forwardRef(function(t, o) {
972
+ ), Lt = B.forwardRef(function(t, o) {
992
973
  const { children: r, ...i } = t;
993
- return /* @__PURE__ */ e($t, { content: r, ...i, ref: o, children: /* @__PURE__ */ e(
974
+ return /* @__PURE__ */ e(_t, { content: r, ...i, ref: o, children: /* @__PURE__ */ e(
994
975
  I,
995
976
  {
996
977
  variant: "ghost",
@@ -1000,17 +981,17 @@ const Ot = (n, t, o) => {
1000
981
  children: /* @__PURE__ */ e(Qn, {})
1001
982
  }
1002
983
  ) });
1003
- }), Nt = B.forwardRef(function(t, o) {
984
+ }), $t = B.forwardRef(function(t, o) {
1004
985
  return /* @__PURE__ */ e(le.Track, { ...t, ref: o, children: /* @__PURE__ */ e(le.Range, {}) });
1005
986
  });
1006
987
  B.forwardRef(function(t, o) {
1007
988
  const { children: r, info: i, ...a } = t;
1008
989
  return /* @__PURE__ */ l(le.Label, { ...a, ref: o, children: [
1009
990
  r,
1010
- i && /* @__PURE__ */ e(Vt, { children: i })
991
+ i && /* @__PURE__ */ e(Lt, { children: i })
1011
992
  ] });
1012
993
  });
1013
- const Ht = le.Root, Wt = le.ValueText, ze = () => {
994
+ const Vt = le.Root, Ht = le.ValueText, Me = () => {
1014
995
  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, [s = 0, c = 0] = [
1015
996
  i,
1016
997
  a
@@ -1026,23 +1007,23 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1026
1007
  leftPageIndex: s,
1027
1008
  rightPageIndex: c
1028
1009
  };
1029
- }, Gt = () => {
1010
+ }, Wt = () => {
1030
1011
  const n = ne(), {
1031
1012
  hasOnlyOnePage: t,
1032
1013
  leftPageIndex: o,
1033
1014
  rightPageIndex: r,
1034
1015
  totalApproximatePages: i,
1035
1016
  beginAndEndAreDifferent: a
1036
- } = ze(), s = Math.round((n?.percentageEstimateOfBook ?? 0) * 100), c = (u) => u?.subChapter ? `${u.title} / ${c(u.subChapter)}` : u?.title || "", d = c(n?.beginChapterInfo);
1017
+ } = Me(), s = Math.round((n?.percentageEstimateOfBook ?? 0) * 100), c = (u) => u?.subChapter ? `${u.title} / ${c(u.subChapter)}` : u?.title || "", d = c(n?.beginChapterInfo);
1037
1018
  return /* @__PURE__ */ l(O, { alignItems: "center", gap: 1, maxW: "100%", overflow: "auto", children: [
1038
- /* @__PURE__ */ e(Ht, { value: s, size: "xs", width: 150, children: /* @__PURE__ */ l(F, { justifyContent: "space-between", children: [
1039
- /* @__PURE__ */ e(Nt, { width: 110 }),
1040
- /* @__PURE__ */ e(Wt, { children: `${s}%` })
1019
+ /* @__PURE__ */ e(Vt, { value: s, size: "xs", width: 150, children: /* @__PURE__ */ l(F, { justifyContent: "space-between", children: [
1020
+ /* @__PURE__ */ e($t, { width: 110 }),
1021
+ /* @__PURE__ */ e(Ht, { children: `${s}%` })
1041
1022
  ] }) }),
1042
1023
  /* @__PURE__ */ e(m, { truncate: !0, maxWidth: "100%", fontSize: "sm", mt: 1, children: d ? `Chapter: ${d}` : " " }),
1043
1024
  !t && /* @__PURE__ */ l(F, { children: [
1044
1025
  /* @__PURE__ */ e(m, { fontSize: "xs", children: a ? `${o + 1} - ${r + 1} of ${i}` : `${o + 1} of ${i}` }),
1045
- !!n?.hasChapters && /* @__PURE__ */ l(Se, { children: [
1026
+ !!n?.hasChapters && /* @__PURE__ */ l(Ce, { children: [
1046
1027
  /* @__PURE__ */ e(m, { children: "-" }),
1047
1028
  /* @__PURE__ */ l(m, { fontSize: "xs", children: [
1048
1029
  "(",
@@ -1052,7 +1033,7 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1052
1033
  ] })
1053
1034
  ] })
1054
1035
  ] });
1055
- }, Ue = v(
1036
+ }, Qe = v(
1056
1037
  ({
1057
1038
  children: n,
1058
1039
  position: t,
@@ -1082,8 +1063,8 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1082
1063
  children: n
1083
1064
  }
1084
1065
  )
1085
- ), jt = vn(Yn), qt = v((n) => /* @__PURE__ */ e(
1086
- L,
1066
+ ), Nt = vn(Un), Gt = v((n) => /* @__PURE__ */ e(
1067
+ _,
1087
1068
  {
1088
1069
  display: "contents",
1089
1070
  css: {
@@ -1092,7 +1073,7 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1092
1073
  "--color-solid": "colors.colorPalette.solid"
1093
1074
  },
1094
1075
  children: /* @__PURE__ */ e(
1095
- jt,
1076
+ Nt,
1096
1077
  {
1097
1078
  keyboard: !1,
1098
1079
  style: {
@@ -1136,8 +1117,8 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1136
1117
  }
1137
1118
  )
1138
1119
  }
1139
- )), Qt = () => {
1140
- const t = ne()?.isUsingSpread, { beginPageIndex: o, totalApproximatePages: r = 0 } = ze(), i = t ? Math.floor((o || 0) / 2) : o, [a, s] = tn(
1120
+ )), qt = () => {
1121
+ const t = ne()?.isUsingSpread, { beginPageIndex: o, totalApproximatePages: r = 0 } = Me(), i = t ? Math.floor((o || 0) / 2) : o, [a, s] = en(
1141
1122
  () => V({
1142
1123
  default: i || 0
1143
1124
  })
@@ -1145,7 +1126,7 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1145
1126
  0,
1146
1127
  t ? Math.floor((r - 1) / 2) : r - 1
1147
1128
  );
1148
- return W(() => {
1129
+ return N(() => {
1149
1130
  s.update(i || 0);
1150
1131
  }, [i, s]), {
1151
1132
  value: a,
@@ -1153,8 +1134,8 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1153
1134
  min: c,
1154
1135
  max: d
1155
1136
  };
1156
- }, Yt = (n) => {
1157
- const t = C(), o = ne(), { manifest: r } = b(() => t?.context, [t]) ?? {}, i = r?.readingDirection === "rtl", a = o?.isUsingSpread, { totalApproximatePages: s = 0, isBeginWithinChapter: c } = ze(), d = 1, u = c, { value: g, valueSignal: p, min: f, max: S } = Qt(), k = D(
1137
+ }, jt = (n) => {
1138
+ const t = C(), o = ne(), { manifest: r } = b(() => t?.context, [t]) ?? {}, i = r?.readingDirection === "rtl", a = o?.isUsingSpread, { totalApproximatePages: s = 0, isBeginWithinChapter: c } = Me(), d = 1, u = c, { value: g, valueSignal: p, min: f, max: S } = qt(), k = D(
1158
1139
  (x) => {
1159
1140
  const [R = 0] = Array.isArray(x) ? x : [x];
1160
1141
  p.update(R);
@@ -1170,14 +1151,14 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1170
1151
  },
1171
1152
  [t, a, p, u]
1172
1153
  );
1173
- return ce(
1154
+ return pe(
1174
1155
  () => t?.navigation.throttleLock({
1175
1156
  duration: 100,
1176
1157
  trigger: p.subject
1177
1158
  }),
1178
1159
  [t, p]
1179
- ), s === 1 || a && s === 2 ? /* @__PURE__ */ e(L, { style: n.style }) : /* @__PURE__ */ e(
1180
- qt,
1160
+ ), s === 1 || a && s === 2 ? /* @__PURE__ */ e(_, { style: n.style }) : /* @__PURE__ */ e(
1161
+ Gt,
1181
1162
  {
1182
1163
  value: [g],
1183
1164
  max: S,
@@ -1188,12 +1169,12 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1188
1169
  ...n
1189
1170
  }
1190
1171
  );
1191
- }, Ut = v(
1172
+ }, Qt = v(
1192
1173
  ({
1193
1174
  open: n,
1194
1175
  onItemClick: t
1195
1176
  }) => {
1196
- const o = en(null), r = C(), {
1177
+ const o = Ke(null), r = C(), {
1197
1178
  quickMenuBottomBarBoundingBoxSignal: i,
1198
1179
  onFontSizeMenuOpenChange: a,
1199
1180
  onRefitMenuOpenChange: s
@@ -1203,13 +1184,13 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1203
1184
  "onRefitMenuOpenChange"
1204
1185
  ]), c = b(() => r?.navigation.state$, [r]), d = b(() => r?.settings.values$, [r]), u = b(
1205
1186
  () => r?.zoom.state$.pipe(
1206
- _(
1187
+ L(
1207
1188
  (x) => x.currentScale > 1 ? "in" : x.currentScale < 1 ? "out" : void 0
1208
1189
  )
1209
1190
  ),
1210
1191
  [r]
1211
- ), g = u === "in", p = u === "out", f = d?.computedPageTurnMode === "scrollable", S = d?.computedPageTurnDirection === "vertical", [k, z] = w(!0);
1212
- return W(() => {
1192
+ ), g = u === "in", p = u === "out", f = d?.computedPageTurnMode === "scrollable", S = d?.computedPageTurnDirection === "vertical", [k, z] = y(!0);
1193
+ return N(() => {
1213
1194
  if (!o.current) return;
1214
1195
  const x = new ResizeObserver((R) => {
1215
1196
  for (const P of R)
@@ -1219,7 +1200,7 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1219
1200
  x.disconnect();
1220
1201
  };
1221
1202
  }, [i]), /* @__PURE__ */ l(
1222
- Ue,
1203
+ Qe,
1223
1204
  {
1224
1205
  present: n,
1225
1206
  position: "bottom",
@@ -1248,7 +1229,7 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1248
1229
  flexShrink: 0,
1249
1230
  onClick: () => r?.navigation.goToLeftOrTopSpineItem(),
1250
1231
  disabled: !c?.canGoLeftSpineItem && !c?.canGoTopSpineItem,
1251
- children: S ? /* @__PURE__ */ e(Wn, {}) : /* @__PURE__ */ e(Gn, {})
1232
+ children: S ? /* @__PURE__ */ e(Nn, {}) : /* @__PURE__ */ e(Gn, {})
1252
1233
  }
1253
1234
  ),
1254
1235
  /* @__PURE__ */ l(
@@ -1261,9 +1242,9 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1261
1242
  overflow: "auto",
1262
1243
  px: 4,
1263
1244
  children: [
1264
- /* @__PURE__ */ e(Gt, {}),
1245
+ /* @__PURE__ */ e(Wt, {}),
1265
1246
  /* @__PURE__ */ e(
1266
- Yt,
1247
+ jt,
1267
1248
  {
1268
1249
  style: {
1269
1250
  width: "100%",
@@ -1286,7 +1267,7 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1286
1267
  onClick: () => {
1287
1268
  r?.navigation.goToRightOrBottomSpineItem();
1288
1269
  },
1289
- children: S ? /* @__PURE__ */ e(jn, {}) : /* @__PURE__ */ e(qn, {})
1270
+ children: S ? /* @__PURE__ */ e(qn, {}) : /* @__PURE__ */ e(jn, {})
1290
1271
  }
1291
1272
  )
1292
1273
  ]
@@ -1319,7 +1300,7 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1319
1300
  )
1320
1301
  }
1321
1302
  ),
1322
- /* @__PURE__ */ e(be.Content, { display: "flex", justifyContent: "center", children: /* @__PURE__ */ l(L, { display: "flex", overflowX: "auto", px: 4, pb: 1, children: [
1303
+ /* @__PURE__ */ e(be.Content, { display: "flex", justifyContent: "center", children: /* @__PURE__ */ l(_, { display: "flex", overflowX: "auto", px: 4, pb: 1, children: [
1323
1304
  /* @__PURE__ */ e(
1324
1305
  I,
1325
1306
  {
@@ -1340,7 +1321,7 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1340
1321
  children: /* @__PURE__ */ e(Tn, {})
1341
1322
  }
1342
1323
  ),
1343
- Ge(r) && /* @__PURE__ */ e(
1324
+ We(r) && /* @__PURE__ */ e(
1344
1325
  I,
1345
1326
  {
1346
1327
  "aria-label": "Search",
@@ -1362,7 +1343,7 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1362
1343
  scale: 2
1363
1344
  });
1364
1345
  },
1365
- children: g ? /* @__PURE__ */ e(yn, {}) : /* @__PURE__ */ e(wn, {})
1346
+ children: g ? /* @__PURE__ */ e(wn, {}) : /* @__PURE__ */ e(yn, {})
1366
1347
  }
1367
1348
  ),
1368
1349
  /* @__PURE__ */ e(
@@ -1394,10 +1375,10 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1394
1375
  size: "lg",
1395
1376
  variant: "ghost",
1396
1377
  onClick: () => t("annotations"),
1397
- children: /* @__PURE__ */ e(pe, {})
1378
+ children: /* @__PURE__ */ e(he, {})
1398
1379
  }
1399
1380
  ),
1400
- qe(r) && /* @__PURE__ */ e(
1381
+ Ge(r) && /* @__PURE__ */ e(
1401
1382
  I,
1402
1383
  {
1403
1384
  "aria-label": "Refit",
@@ -1425,14 +1406,14 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1425
1406
  children: /* @__PURE__ */ e(Pn, {})
1426
1407
  }
1427
1408
  ),
1428
- je(r) && /* @__PURE__ */ e(
1409
+ Ne(r) && /* @__PURE__ */ e(
1429
1410
  I,
1430
1411
  {
1431
1412
  "aria-label": "Gallery",
1432
1413
  size: "lg",
1433
1414
  variant: "ghost",
1434
1415
  onClick: () => t("gallery"),
1435
- children: /* @__PURE__ */ e(Hn, {})
1416
+ children: /* @__PURE__ */ e(Wn, {})
1436
1417
  }
1437
1418
  )
1438
1419
  ] }) })
@@ -1443,13 +1424,13 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1443
1424
  }
1444
1425
  );
1445
1426
  }
1446
- ), Zt = () => {
1447
- const [n, t] = w(!1), o = D(() => document.fullscreenElement ? document.exitFullscreen().catch(console.error).then(() => {
1427
+ ), Ut = () => {
1428
+ const [n, t] = y(!1), o = D(() => document.fullscreenElement ? document.exitFullscreen().catch(console.error).then(() => {
1448
1429
  t(!1);
1449
1430
  }) : document.documentElement.requestFullscreen({ navigationUI: "hide" }).catch(console.error).then(() => {
1450
1431
  t(!0);
1451
1432
  }), []);
1452
- return W(() => {
1433
+ return N(() => {
1453
1434
  function r() {
1454
1435
  t(!!document.fullscreenElement);
1455
1436
  }
@@ -1460,14 +1441,14 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1460
1441
  isFullscreen: n,
1461
1442
  onToggleFullscreenClick: o
1462
1443
  };
1463
- }, Kt = v(
1444
+ }, Yt = v(
1464
1445
  ({
1465
1446
  open: n,
1466
1447
  onItemClick: t
1467
1448
  }) => {
1468
- const o = C(), r = b(() => o?.context.manifest$, [o]), { isFullscreen: i, onToggleFullscreenClick: a } = Zt();
1449
+ const o = C(), r = b(() => o?.context.manifest$, [o]), { isFullscreen: i, onToggleFullscreenClick: a } = Ut();
1469
1450
  return /* @__PURE__ */ l(
1470
- Ue,
1451
+ Qe,
1471
1452
  {
1472
1453
  present: n,
1473
1454
  position: "top",
@@ -1482,7 +1463,7 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1482
1463
  variant: "ghost",
1483
1464
  flexShrink: 0,
1484
1465
  onClick: () => t("back"),
1485
- children: /* @__PURE__ */ e(Un, {})
1466
+ children: /* @__PURE__ */ e(Yn, {})
1486
1467
  }
1487
1468
  ),
1488
1469
  /* @__PURE__ */ e(
@@ -1517,7 +1498,7 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1517
1498
  flexShrink: 0,
1518
1499
  variant: "ghost",
1519
1500
  onClick: a,
1520
- children: i ? /* @__PURE__ */ e(Vn, {}) : /* @__PURE__ */ e(Nn, {})
1501
+ children: i ? /* @__PURE__ */ e(Vn, {}) : /* @__PURE__ */ e(Hn, {})
1521
1502
  }
1522
1503
  )
1523
1504
  ] })
@@ -1525,24 +1506,24 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1525
1506
  }
1526
1507
  );
1527
1508
  }
1528
- ), Xt = v(
1509
+ ), Zt = v(
1529
1510
  ({
1530
1511
  onItemClick: n
1531
1512
  }) => {
1532
- const [t] = Te(), { refitMenuOpen: o, fontSizeMenuOpen: r } = $([
1513
+ const [t] = Oe(), { refitMenuOpen: o, fontSizeMenuOpen: r } = $([
1533
1514
  "refitMenuOpen",
1534
1515
  "fontSizeMenuOpen"
1535
1516
  ]);
1536
- return /* @__PURE__ */ l(Se, { children: [
1517
+ return /* @__PURE__ */ l(Ce, { children: [
1537
1518
  /* @__PURE__ */ e(
1538
- Kt,
1519
+ Yt,
1539
1520
  {
1540
1521
  open: t && !o && !r,
1541
1522
  onItemClick: n
1542
1523
  }
1543
1524
  ),
1544
1525
  /* @__PURE__ */ e(
1545
- Ut,
1526
+ Qt,
1546
1527
  {
1547
1528
  open: t && !o && !r,
1548
1529
  onItemClick: n
@@ -1550,7 +1531,7 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1550
1531
  )
1551
1532
  ] });
1552
1533
  }
1553
- ), Jt = B.forwardRef(
1534
+ ), Xt = B.forwardRef(
1554
1535
  function(t, o) {
1555
1536
  const { label: r, children: i, helperText: a, errorText: s, optionalText: c, ...d } = t;
1556
1537
  return /* @__PURE__ */ l(te.Root, { ref: o, ...d, children: [
@@ -1563,11 +1544,11 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1563
1544
  s && /* @__PURE__ */ e(te.ErrorText, { children: s })
1564
1545
  ] });
1565
1546
  }
1566
- ), eo = v(() => {
1547
+ ), Kt = v(() => {
1567
1548
  const { refitMenuOpen: t, onRefitMenuOpenChange: o } = $([
1568
1549
  "refitMenuOpen",
1569
1550
  "onRefitMenuOpenChange"
1570
- ]), r = C(), i = qe(r) ? r : void 0, a = b(
1551
+ ]), r = C(), i = Ge(r) ? r : void 0, a = b(
1571
1552
  () => i?.refit.settings$,
1572
1553
  [i]
1573
1554
  );
@@ -1578,13 +1559,13 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1578
1559
  open: t,
1579
1560
  onOpenChange: (s) => o(s.open),
1580
1561
  placement: "center",
1581
- children: /* @__PURE__ */ l(j, { children: [
1582
- /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(K, { children: "Viewport fit" }) }),
1583
- /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ l(N.Root, { children: [
1584
- /* @__PURE__ */ e(N.HelperText, { children: "Adjust the viewport for a more comfortable reading experience." }),
1585
- /* @__PURE__ */ l(N.Content, { children: [
1586
- /* @__PURE__ */ e(Jt, { label: "Profile", children: /* @__PURE__ */ e(
1587
- Ye,
1562
+ children: /* @__PURE__ */ l(q, { children: [
1563
+ /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(X, { children: "Viewport fit" }) }),
1564
+ /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ l(H.Root, { children: [
1565
+ /* @__PURE__ */ e(H.HelperText, { children: "Adjust the viewport for a more comfortable reading experience." }),
1566
+ /* @__PURE__ */ l(H.Content, { children: [
1567
+ /* @__PURE__ */ e(Xt, { label: "Profile", children: /* @__PURE__ */ e(
1568
+ je,
1588
1569
  {
1589
1570
  defaultValue: "fit",
1590
1571
  onValueChange: (s) => {
@@ -1604,7 +1585,7 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1604
1585
  }
1605
1586
  ) }),
1606
1587
  /* @__PURE__ */ e(
1607
- Me,
1588
+ Re,
1608
1589
  {
1609
1590
  label: "Maximum width (%)",
1610
1591
  showValue: !0,
@@ -1623,12 +1604,12 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1623
1604
  )
1624
1605
  ] })
1625
1606
  ] }) }),
1626
- /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(X, { asChild: !0, children: /* @__PURE__ */ e(G, { variant: "outline", children: "Close" }) }) }),
1627
- /* @__PURE__ */ e(q, {})
1607
+ /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(K, { asChild: !0, children: /* @__PURE__ */ e(G, { variant: "outline", children: "Close" }) }) }),
1608
+ /* @__PURE__ */ e(j, {})
1628
1609
  ] })
1629
1610
  }
1630
1611
  );
1631
- }), no = v(
1612
+ }), Jt = v(
1632
1613
  ({
1633
1614
  contextText: n = "",
1634
1615
  startOffset: t = 0,
@@ -1648,7 +1629,7 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1648
1629
  )
1649
1630
  );
1650
1631
  return /* @__PURE__ */ l(
1651
- Re,
1632
+ ke,
1652
1633
  {
1653
1634
  href: r,
1654
1635
  style: { margin: 5, overflow: "hidden" },
@@ -1672,18 +1653,18 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1672
1653
  }
1673
1654
  );
1674
1655
  }
1675
- ), to = 500, oo = () => {
1676
- const n = oe(() => new un("")), t = b(n), o = C(), r = Ge(o) ? o : void 0, i = b(() => n.pipe(
1677
- ke(),
1678
- H(
1679
- (a) => a === "" || !r ? he(void 0) : Ne(
1680
- he({
1656
+ ), eo = 500, no = () => {
1657
+ const n = oe(() => new un("")), t = b(n), o = C(), r = We(o) ? o : void 0, i = b(() => n.pipe(
1658
+ Fe(),
1659
+ W(
1660
+ (a) => a === "" || !r ? ue(void 0) : $e(
1661
+ ue({
1681
1662
  type: "start",
1682
1663
  data: void 0
1683
1664
  }),
1684
- He(to).pipe(
1685
- H(() => r.search.search(a)),
1686
- _((s) => ({ type: "end", data: s }))
1665
+ Ve(eo).pipe(
1666
+ W(() => r.search.search(a)),
1667
+ L((s) => ({ type: "end", data: s }))
1687
1668
  )
1688
1669
  )
1689
1670
  )
@@ -1694,9 +1675,9 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1694
1675
  status: i?.type ?? "idle",
1695
1676
  data: i?.data
1696
1677
  };
1697
- }, ro = v(
1678
+ }, to = v(
1698
1679
  ({ onNavigate: n }) => {
1699
- const t = C(), { value: o, setValue: r, status: i, data: a } = oo(), s = (u) => {
1680
+ const t = C(), { value: o, setValue: r, status: i, data: a } = no(), s = (u) => {
1700
1681
  r(u.target.value);
1701
1682
  }, c = D(
1702
1683
  (u) => {
@@ -1739,7 +1720,7 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1739
1720
  " result(s)"
1740
1721
  ] }),
1741
1722
  /* @__PURE__ */ e(O, { gap: 0, children: d?.map((u, g) => /* @__PURE__ */ e(
1742
- no,
1723
+ Jt,
1743
1724
  {
1744
1725
  contextText: u.meta?.range?.startContainer.parentElement?.textContent ?? "",
1745
1726
  pageIndex: u.meta?.itemPageIndex,
@@ -1757,7 +1738,7 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1757
1738
  )
1758
1739
  ] });
1759
1740
  }
1760
- ), io = v(
1741
+ ), oo = v(
1761
1742
  ({
1762
1743
  open: n,
1763
1744
  setOpen: t,
@@ -1771,15 +1752,15 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1771
1752
  onOpenChange: (r) => t(r.open),
1772
1753
  size: { mdDown: "full", md: "lg" },
1773
1754
  scrollBehavior: "inside",
1774
- children: /* @__PURE__ */ l(j, { height: "100%", children: [
1775
- /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(K, { children: "Search" }) }),
1776
- /* @__PURE__ */ e(Z, { flex: 1, p: 0, children: /* @__PURE__ */ e(ro, { onNavigate: o }) }),
1777
- /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(X, { asChild: !0, children: /* @__PURE__ */ e(G, { variant: "outline", children: "Cancel" }) }) }),
1778
- /* @__PURE__ */ e(q, {})
1755
+ children: /* @__PURE__ */ l(q, { height: "100%", children: [
1756
+ /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(X, { children: "Search" }) }),
1757
+ /* @__PURE__ */ e(Z, { flex: 1, p: 0, children: /* @__PURE__ */ e(to, { onNavigate: o }) }),
1758
+ /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(K, { asChild: !0, children: /* @__PURE__ */ e(G, { variant: "outline", children: "Cancel" }) }) }),
1759
+ /* @__PURE__ */ e(j, {})
1779
1760
  ] })
1780
1761
  }
1781
1762
  )
1782
- ), ao = v(
1763
+ ), ro = v(
1783
1764
  ({ onNavigate: n }) => {
1784
1765
  const t = C(), { manifest: o, assumedRenditionLayout: r } = b(() => t?.context, [t]) ?? {}, { nav: i } = o ?? {}, a = ne();
1785
1766
  i?.toc;
@@ -1787,7 +1768,7 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1787
1768
  let u = a?.beginChapterInfo;
1788
1769
  for (; u?.subChapter; )
1789
1770
  u = u?.subChapter;
1790
- const g = (p, f, S) => /* @__PURE__ */ l(Ze.Fragment, { children: [
1771
+ const g = (p, f, S) => /* @__PURE__ */ l(Ue.Fragment, { children: [
1791
1772
  /* @__PURE__ */ e(
1792
1773
  A.Item,
1793
1774
  {
@@ -1797,7 +1778,7 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1797
1778
  alignItems: "center"
1798
1779
  },
1799
1780
  children: /* @__PURE__ */ l(
1800
- Re,
1781
+ ke,
1801
1782
  {
1802
1783
  onClick: () => {
1803
1784
  n(), t?.navigation.goToUrl(p.href);
@@ -1829,7 +1810,7 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1829
1810
  ] }, f);
1830
1811
  return /* @__PURE__ */ e(A.Root, { gap: 3, overflowY: "auto", py: 4, flex: 1, children: i?.toc.map((p, f) => g(p, f, 0)) });
1831
1812
  }
1832
- ), lo = v(
1813
+ ), io = v(
1833
1814
  ({
1834
1815
  open: n,
1835
1816
  setOpen: t,
@@ -1843,27 +1824,27 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1843
1824
  onOpenChange: (r) => t(r.open),
1844
1825
  size: { mdDown: "full", md: "lg" },
1845
1826
  scrollBehavior: "inside",
1846
- children: /* @__PURE__ */ l(j, { children: [
1847
- /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(K, { children: "Table of Contents" }) }),
1848
- /* @__PURE__ */ e(Z, { overflowY: "auto", flex: 1, children: /* @__PURE__ */ e(ao, { onNavigate: o }) }),
1849
- /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(X, { asChild: !0, children: /* @__PURE__ */ e(G, { variant: "outline", children: "Cancel" }) }) }),
1850
- /* @__PURE__ */ e(q, {})
1827
+ children: /* @__PURE__ */ l(q, { children: [
1828
+ /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e(X, { children: "Table of Contents" }) }),
1829
+ /* @__PURE__ */ e(Z, { overflowY: "auto", flex: 1, children: /* @__PURE__ */ e(ro, { onNavigate: o }) }),
1830
+ /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(K, { asChild: !0, children: /* @__PURE__ */ e(G, { variant: "outline", children: "Cancel" }) }) }),
1831
+ /* @__PURE__ */ e(j, {})
1851
1832
  ] })
1852
1833
  }
1853
1834
  )
1854
- ), Ee = 0.5, Be = 1, Ae = 5, so = (n, t, o, r) => {
1835
+ ), Pe = 0.5, Ee = 1, Be = 5, ao = (n, t, o, r) => {
1855
1836
  if (n > t && n < t + r)
1856
1837
  return t + r;
1857
1838
  const i = Math.min(Math.max(n, t), o), a = Math.round((i - t) / r) * r + t;
1858
1839
  return Math.round(a * 100) / 100;
1859
- }, co = v(() => {
1840
+ }, lo = v(() => {
1860
1841
  const { quickMenuBottomBarBoundingBoxSignal: n } = $([
1861
1842
  "quickMenuBottomBarBoundingBoxSignal"
1862
- ]), t = de(
1843
+ ]), t = ce(
1863
1844
  n
1864
1845
  ), o = C(), r = b(
1865
1846
  () => o?.zoom.state$.pipe(
1866
- _((c) => c.currentScale),
1847
+ L((c) => c.currentScale),
1867
1848
  _e(100, hn, {
1868
1849
  leading: !0,
1869
1850
  trailing: !0
@@ -1871,13 +1852,13 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1871
1852
  ),
1872
1853
  [o]
1873
1854
  ) ?? 1, i = b(
1874
- () => o?.zoom.state$.pipe(_((c) => c.isZooming)),
1855
+ () => o?.zoom.state$.pipe(L((c) => c.isZooming)),
1875
1856
  [o]
1876
- ) ?? !1, a = so(
1857
+ ) ?? !1, a = ao(
1877
1858
  r,
1859
+ Ee,
1878
1860
  Be,
1879
- Ae,
1880
- Ee
1861
+ Pe
1881
1862
  ), s = t?.borderBoxSize?.[0]?.blockSize ?? 1;
1882
1863
  return /* @__PURE__ */ e(
1883
1864
  ae,
@@ -1893,12 +1874,12 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1893
1874
  borderRadius: "md",
1894
1875
  p: 4,
1895
1876
  children: /* @__PURE__ */ e(
1896
- Me,
1877
+ Re,
1897
1878
  {
1898
1879
  value: [a],
1899
- min: Be,
1900
- max: Ae,
1901
- step: Ee,
1880
+ min: Ee,
1881
+ max: Be,
1882
+ step: Pe,
1902
1883
  minWidth: 200,
1903
1884
  onValueChange: (c) => {
1904
1885
  const d = c.value?.[0] ?? 1;
@@ -1908,14 +1889,14 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1908
1889
  )
1909
1890
  }
1910
1891
  );
1911
- }), wo = ({
1892
+ }), zo = ({
1912
1893
  enableFloatingTime: n = !0,
1913
1894
  enableFloatingProgress: t = !0,
1914
1895
  onItemClick: o,
1915
1896
  children: r,
1916
1897
  ...i
1917
1898
  }) => {
1918
- const [a, s] = w(!1), [c, d] = w(!1), [u, g] = w(!1), [p, f] = w(void 0), [S, k] = w(!1), [z, x] = Te(), R = D(() => {
1899
+ const [a, s] = y(!1), [c, d] = y(!1), [u, g] = y(!1), [p, f] = y(void 0), [S, k] = y(!1), [z, x] = Oe(), R = D(() => {
1919
1900
  s(!1), d(!1), g(!1), f(void 0), x(!1), k(!1);
1920
1901
  }, [x]), P = D(
1921
1902
  (h) => {
@@ -1923,8 +1904,8 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1923
1904
  },
1924
1905
  [o]
1925
1906
  );
1926
- return Dt(), Lt(), ft(), /* @__PURE__ */ l(
1927
- L,
1907
+ return Dt(), Ft(), ft(), /* @__PURE__ */ l(
1908
+ _,
1928
1909
  {
1929
1910
  position: "absolute",
1930
1911
  top: 0,
@@ -1946,14 +1927,14 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1946
1927
  }
1947
1928
  ),
1948
1929
  /* @__PURE__ */ e(Tt, { open: S, setOpen: k }),
1949
- /* @__PURE__ */ e(eo, {}),
1950
- /* @__PURE__ */ e(Xt, { onItemClick: P }),
1951
- /* @__PURE__ */ e(co, {}),
1930
+ /* @__PURE__ */ e(Kt, {}),
1931
+ /* @__PURE__ */ e(Zt, { onItemClick: P }),
1932
+ /* @__PURE__ */ e(lo, {}),
1952
1933
  /* @__PURE__ */ e(kt, {}),
1953
1934
  /* @__PURE__ */ e(pt, {}),
1954
- /* @__PURE__ */ e(wt, { open: c, setOpen: d }),
1935
+ /* @__PURE__ */ e(yt, { open: c, setOpen: d }),
1955
1936
  /* @__PURE__ */ e(
1956
- lo,
1937
+ io,
1957
1938
  {
1958
1939
  open: a,
1959
1940
  setOpen: s,
@@ -1961,7 +1942,7 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1961
1942
  }
1962
1943
  ),
1963
1944
  /* @__PURE__ */ e(
1964
- io,
1945
+ oo,
1965
1946
  {
1966
1947
  open: u,
1967
1948
  setOpen: g,
@@ -1992,8 +1973,8 @@ const Ht = le.Root, Wt = le.ValueText, ze = () => {
1992
1973
  );
1993
1974
  };
1994
1975
  export {
1995
- Kn as BOOKMARK_AREA_DATA_ATTRIBUTE,
1996
- wo as ReactReader,
1997
- yo as ReactReaderProvider
1976
+ Xn as BOOKMARK_AREA_DATA_ATTRIBUTE,
1977
+ zo as ReactReader,
1978
+ To as ReactReaderProvider
1998
1979
  };
1999
1980
  //# sourceMappingURL=index.js.map