@prose-reader/core 1.231.0 → 1.232.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,6 +1,6 @@
1
1
  import { switchMap as P, of as w, fromEvent as q, take as we, map as S, from as j, takeUntil as T, Observable as ot, defer as kt, Subject as W, combineLatest as B, merge as v, EMPTY as Q, withLatestFrom as A, NEVER as gt, tap as $, share as V, BehaviorSubject as U, filter as M, first as z, mergeMap as $t, endWith as ht, finalize as dt, catchError as Pe, lastValueFrom as ei, scheduled as ii, animationFrameScheduler as rt, distinctUntilChanged as H, throttleTime as ni, debounceTime as St, startWith as it, switchScan as oi, shareReplay as tt, defaultIfEmpty as si, forkJoin as ri, delay as wt, ReplaySubject as ie, skip as ve, identity as Pt, exhaustMap as Wt, timer as ne, reduce as ai, concatMap as oe } from "rxjs";
2
2
  import { Report as ci, isShallowEqual as N, shallowMergeIfDefined as vt, getParentPath as ui, parseContentType as di, detectMimeTypeFromName as Mt, arrayEqual as gi } from "@prose-reader/shared";
3
- import { isShallowEqual as Hs } from "@prose-reader/shared";
3
+ import { isShallowEqual as Us } from "@prose-reader/shared";
4
4
  import { switchMap as _, first as xe, map as Y, distinctUntilChanged as Z, startWith as $e, shareReplay as bt, tap as k, pairwise as li, take as pi, takeUntil as G, filter as K, debounceTime as hi, skip as mi, mergeMap as fi, catchError as se, withLatestFrom as yi } from "rxjs/operators";
5
5
  import { generate as Ut, parse as Te, isIndirectionOnly as Si, isParsedCfiRange as bi, resolve as Ii } from "@prose-reader/cfi";
6
6
  import { isDefined as qt } from "reactjrx";
@@ -451,7 +451,7 @@ const ce = (e, t) => new ot((i) => {
451
451
  });
452
452
  return n.observe(e, t), () => n.disconnect();
453
453
  });
454
- function Ns(e, t) {
454
+ function As(e, t) {
455
455
  return new ot((i) => {
456
456
  const n = new IntersectionObserver((o) => {
457
457
  i.next(o);
@@ -509,19 +509,7 @@ class Ne {
509
509
  this.outputSettingsUpdateSubject.complete();
510
510
  }
511
511
  }
512
- const Bi = (e) => {
513
- const t = new FileReader();
514
- return new Promise((i) => {
515
- t.addEventListener(
516
- "load",
517
- () => {
518
- i(t.result);
519
- },
520
- !1
521
- ), t.readAsDataURL(e);
522
- });
523
- };
524
- let Ei = class extends Ne {
512
+ let Bi = class extends Ne {
525
513
  computeOutputSettings(t) {
526
514
  return t;
527
515
  }
@@ -541,8 +529,8 @@ let Ei = class extends Ne {
541
529
  };
542
530
  }
543
531
  };
544
- const _i = (e) => (t) => {
545
- const { fontScale: i, lineHeight: n, fontWeight: o, fontJustification: s } = t, r = new W(), a = e(t), c = new Ei(
532
+ const Ei = (e) => (t) => {
533
+ const { fontScale: i, lineHeight: n, fontWeight: o, fontJustification: s } = t, r = new W(), a = e(t), c = new Bi(
546
534
  {
547
535
  fontScale: i,
548
536
  lineHeight: n,
@@ -588,7 +576,7 @@ const _i = (e) => (t) => {
588
576
  },
589
577
  settings: c
590
578
  };
591
- }, Xi = (e) => (t) => {
579
+ }, _i = (e) => (t) => {
592
580
  const i = e(t), n = (o) => q(o, "keyup").pipe(
593
581
  A(i.settings.values$),
594
582
  S(([s, { pageTurnDirection: r }]) => {
@@ -622,7 +610,7 @@ const _i = (e) => (t) => {
622
610
  ),
623
611
  T(i.$.destroy$)
624
612
  ).subscribe(), i;
625
- }, Yi = (e) => e.spine.spineItemsManager.items$.pipe(
613
+ }, Xi = (e) => e.spine.spineItemsManager.items$.pipe(
626
614
  P(
627
615
  (t) => v(
628
616
  ...t.map((i) => i.loaded$.pipe(
@@ -792,7 +780,7 @@ const Lt = class Lt extends X {
792
780
  };
793
781
  Lt.DOCUMENT_CONTAINER_CLASS_NAME = "prose-reader-document-container";
794
782
  let mt = Lt;
795
- const qi = (e) => new URL(e.href);
783
+ const Yi = (e) => new URL(e.href);
796
784
  class Qt {
797
785
  constructor(t, i) {
798
786
  this.item = t, this.settings = i;
@@ -801,7 +789,7 @@ class Qt {
801
789
  var i, n;
802
790
  return await ei(
803
791
  ((n = (i = this.settings.values).getResource) == null ? void 0 : n.call(i, this.item)) ?? w(void 0)
804
- ) ?? qi(this.item);
792
+ ) ?? Yi(this.item);
805
793
  }
806
794
  async fetchResource() {
807
795
  const t = await this.getResource();
@@ -811,7 +799,7 @@ class Qt {
811
799
  const Oe = (e, t) => {
812
800
  const i = e.startsWith("file://"), n = i ? e.replace("file://", "http://") : e, o = new URL(t, n).toString();
813
801
  return i ? o.replace("http://", "file://") : o;
814
- }, Zi = async (e, t, i, n, o) => {
802
+ }, qi = async (e, t, i, n, o) => {
815
803
  if (!e || !e.defaultView) return;
816
804
  const s = t.sheet;
817
805
  if (s)
@@ -860,7 +848,7 @@ const Oe = (e, t) => {
860
848
  } catch (r) {
861
849
  console.error("Could not access stylesheet rules:", r);
862
850
  }
863
- }, Gi = (e, t, i, n, o) => {
851
+ }, Zi = (e, t, i, n, o) => {
864
852
  var c;
865
853
  const s = t.getAttribute("src") || t.getAttribute("href");
866
854
  if (!s) return w(null);
@@ -884,7 +872,7 @@ const Oe = (e, t) => {
884
872
  return new ot((l) => {
885
873
  t.onload = async () => {
886
874
  try {
887
- t.sheet && await Zi(
875
+ t.sheet && await qi(
888
876
  e,
889
877
  t,
890
878
  i,
@@ -899,7 +887,7 @@ const Oe = (e, t) => {
899
887
  return w(null);
900
888
  })
901
889
  );
902
- }, Ji = ({
890
+ }, Gi = ({
903
891
  settings: e,
904
892
  item: t,
905
893
  context: i
@@ -908,7 +896,7 @@ const Oe = (e, t) => {
908
896
  const s = Me(
909
897
  o.contentDocument
910
898
  ), r = ui(t.href), a = s.map(
911
- (c) => Gi(
899
+ (c) => Zi(
912
900
  o.contentDocument,
913
901
  c,
914
902
  r,
@@ -918,28 +906,23 @@ const Oe = (e, t) => {
918
906
  );
919
907
  return B(a).pipe(S(() => o));
920
908
  })
921
- ), Ki = (e) => {
909
+ ), Ji = (e) => {
922
910
  Oi(e == null ? void 0 : e.contentDocument);
923
- }, Qi = [".xhtml", ".html", ".htm"], lt = "prose-reader", tn = (e) => new Promise((t, i) => {
924
- const n = new Image();
925
- n.src = e, n.onload = () => {
926
- t({ height: n.naturalHeight, width: n.naturalWidth });
927
- }, n.onerror = i;
928
- }), en = async (e, t) => {
911
+ }, Ki = [".xhtml", ".html", ".htm"], lt = "prose-reader", Qi = async (e, t) => {
929
912
  if (typeof e == "string") return e;
930
913
  const i = di(e.headers.get("Content-Type") || "") || Mt(t.href);
931
914
  if (["image/jpg", "image/jpeg", "image/png", "image/webp"].some(
932
915
  (o) => o === i
933
916
  )) {
934
- const o = await Bi(await e.blob()), { height: s, width: r } = await tn(o);
935
- return `
917
+ const o = await e.blob(), s = URL.createObjectURL(o), r = await createImageBitmap(o), { width: a, height: c } = { width: r.width, height: r.height };
918
+ return r.close(), `
936
919
  <html>
937
920
  <head>
938
- ${t.renditionLayout === "pre-paginated" ? `<meta name="viewport" content="width=${r}, height=${s}">` : ""}
921
+ ${t.renditionLayout === "pre-paginated" ? `<meta name="viewport" content="width=${a}, height=${c}">` : ""}
939
922
  </head>
940
923
  <body style="margin: 0px;" tab-index="-1;">
941
924
  <img
942
- src="${o}"
925
+ src="${s}"
943
926
  style="max-width: 100%;height:100%;object-fit:contain;"
944
927
  >
945
928
  </body>
@@ -963,11 +946,11 @@ const Oe = (e, t) => {
963
946
  </body>
964
947
  </html>
965
948
  ` : await e.text();
966
- }, nn = ({
949
+ }, tn = ({
967
950
  item: e,
968
951
  resourcesHandler: t
969
952
  }) => {
970
- const i = (n) => en(n, e);
953
+ const i = (n) => Qi(n, e);
971
954
  return (n) => n.pipe(
972
955
  P((o) => j(t.getResource()).pipe(
973
956
  P((s) => s instanceof URL && e.href.startsWith(window.location.origin) && // we have an encoding and it's a valid html
@@ -977,7 +960,7 @@ const Oe = (e, t) => {
977
960
  "text/html",
978
961
  "text/xml"
979
962
  ].includes(e.mediaType) || // no encoding ? then try to detect html
980
- !e.mediaType && Qi.some(
963
+ !e.mediaType && Ki.some(
981
964
  (a) => e.href.endsWith(a)
982
965
  )) ? (o == null || o.setAttribute("src", e.href), w(o)) : (s instanceof URL ? j(t.fetchResource()) : w(s)).pipe(
983
966
  P((a) => {
@@ -999,7 +982,7 @@ const Oe = (e, t) => {
999
982
  ))
1000
983
  ))
1001
984
  );
1002
- }, on = () => {
985
+ }, en = () => {
1003
986
  const e = document.createElement("iframe");
1004
987
  return e.frameBorder = "no", e.tabIndex = 0, e.setAttribute(
1005
988
  "sandbox",
@@ -1032,7 +1015,7 @@ const Oe = (e, t) => {
1032
1015
  e / (n.height ?? 1)
1033
1016
  ), computedWidthScale: o, viewportDimensions: n };
1034
1017
  }
1035
- }, sn = ({
1018
+ }, nn = ({
1036
1019
  columnWidth: e,
1037
1020
  enableTouch: t,
1038
1021
  spreadPosition: i
@@ -1077,12 +1060,12 @@ const Oe = (e, t) => {
1077
1060
  object-fit:contain;
1078
1061
  `}
1079
1062
  }
1080
- `, rn = ({
1063
+ `, on = ({
1081
1064
  pageHeight: e,
1082
1065
  pageWidth: t
1083
1066
  }) => ({ columnHeight: e, columnWidth: t }), ue = (e, t) => {
1084
1067
  e.style.width = `${t.width}px`, e.style.height = `${t.height}px`;
1085
- }, an = ({
1068
+ }, sn = ({
1086
1069
  minPageSpread: e,
1087
1070
  blankPagePosition: t,
1088
1071
  spreadPosition: i,
@@ -1094,9 +1077,9 @@ const Oe = (e, t) => {
1094
1077
  }) => {
1095
1078
  const c = e * o;
1096
1079
  if (s != null && s.contentDocument && (s != null && s.contentWindow)) {
1097
- const { viewportDimensions: u, computedScale: d = 1 } = je({ frameElement: s, pageHeight: n, pageWidth: o }) ?? {}, g = o, l = n, h = sn(
1080
+ const { viewportDimensions: u, computedScale: d = 1 } = je({ frameElement: s, pageHeight: n, pageWidth: o }) ?? {}, g = o, l = n, h = nn(
1098
1081
  {
1099
- ...rn({ pageHeight: n, pageWidth: o }),
1082
+ ...on({ pageHeight: n, pageWidth: o }),
1100
1083
  enableTouch: a,
1101
1084
  spreadPosition: i
1102
1085
  },
@@ -1126,7 +1109,7 @@ const Oe = (e, t) => {
1126
1109
  return { width: c, height: l };
1127
1110
  }
1128
1111
  return { width: c, height: n };
1129
- }, cn = () => `
1112
+ }, rn = () => `
1130
1113
  ${Ve()}
1131
1114
  html {
1132
1115
  width: 100%;
@@ -1141,7 +1124,7 @@ const Oe = (e, t) => {
1141
1124
  html, body {
1142
1125
  touch-action: none;
1143
1126
  }
1144
- `, un = ({
1127
+ `, an = ({
1145
1128
  isScrollable: e,
1146
1129
  enableTouch: t
1147
1130
  }) => `
@@ -1166,7 +1149,7 @@ const Oe = (e, t) => {
1166
1149
  display: block;
1167
1150
  }
1168
1151
  ` : ""}
1169
- `, dn = ({
1152
+ `, cn = ({
1170
1153
  width: e,
1171
1154
  columnHeight: t,
1172
1155
  columnWidth: i
@@ -1234,7 +1217,7 @@ const Oe = (e, t) => {
1234
1217
  td {
1235
1218
  max-width: ${i}px;
1236
1219
  }
1237
- `, gn = ({
1220
+ `, un = ({
1238
1221
  isUsingVerticalWriting: e,
1239
1222
  minimumWidth: t,
1240
1223
  pageHeight: i,
@@ -1250,7 +1233,7 @@ const Oe = (e, t) => {
1250
1233
  };
1251
1234
  }, It = (e, t) => {
1252
1235
  e.style.width = `${t.width}px`, e.style.height = `${t.height}px`;
1253
- }, ln = ({
1236
+ }, dn = ({
1254
1237
  pageHeight: e,
1255
1238
  pageWidth: t,
1256
1239
  frameElement: i,
@@ -1278,7 +1261,7 @@ const Oe = (e, t) => {
1278
1261
  nt(
1279
1262
  i,
1280
1263
  "prose-reader-html-renderer-framce-css",
1281
- cn()
1264
+ rn()
1282
1265
  ), It(i, {
1283
1266
  width: m.width ?? 1,
1284
1267
  height: m.height ?? 1
@@ -1290,11 +1273,11 @@ const Oe = (e, t) => {
1290
1273
  `translate(-50%, -50%) scale(${y})`
1291
1274
  ), i == null || i.style.setProperty("transform-origin", "center center");
1292
1275
  else {
1293
- const C = c ? un({
1276
+ const C = c ? an({
1294
1277
  isScrollable: (n == null ? void 0 : n.renditionFlow) === "scrolled-continuous",
1295
1278
  enableTouch: u
1296
- }) : dn(
1297
- gn({
1279
+ }) : cn(
1280
+ un({
1298
1281
  isUsingVerticalWriting: d,
1299
1282
  minimumWidth: g,
1300
1283
  pageHeight: p,
@@ -1331,7 +1314,7 @@ const Oe = (e, t) => {
1331
1314
  latestContentHeightWhenLoaded: l
1332
1315
  };
1333
1316
  };
1334
- class pn extends mt {
1317
+ class gn extends mt {
1335
1318
  constructor() {
1336
1319
  super(...arguments), this.isImageType = () => {
1337
1320
  const t = this.item.mediaType ?? Mt(this.item.href);
@@ -1339,14 +1322,14 @@ class pn extends mt {
1339
1322
  };
1340
1323
  }
1341
1324
  onCreateDocument() {
1342
- const t = on();
1325
+ const t = en();
1343
1326
  return this.setDocumentContainer(t), w(t);
1344
1327
  }
1345
1328
  onLoadDocument() {
1346
1329
  const t = this.getFrameElement();
1347
1330
  if (!t) throw new Error("invalid frame");
1348
1331
  return w(t).pipe(
1349
- nn({
1332
+ tn({
1350
1333
  item: this.item,
1351
1334
  resourcesHandler: this.resourcesHandler,
1352
1335
  settings: this.settings
@@ -1356,7 +1339,7 @@ class pn extends mt {
1356
1339
  this.attach();
1357
1340
  }),
1358
1341
  vi,
1359
- Ji({
1342
+ Gi({
1360
1343
  context: this.context,
1361
1344
  item: this.item,
1362
1345
  settings: this.settings
@@ -1365,7 +1348,7 @@ class pn extends mt {
1365
1348
  );
1366
1349
  }
1367
1350
  onUnload() {
1368
- return Ki(this.getFrameElement()), this.detach(), Q;
1351
+ return Ji(this.getFrameElement()), this.detach(), Q;
1369
1352
  }
1370
1353
  onLayout({
1371
1354
  minPageSpread: t,
@@ -1377,7 +1360,7 @@ class pn extends mt {
1377
1360
  if (!r) return w(void 0);
1378
1361
  const a = !!((d = this.writingMode) != null && d.startsWith("vertical"));
1379
1362
  if (this.item.renditionLayout === "pre-paginated" || !this.item.renditionLayout && ((g = this.context.manifest) == null ? void 0 : g.renditionLayout) === "pre-paginated") {
1380
- const l = an({
1363
+ const l = sn({
1381
1364
  blankPagePosition: i,
1382
1365
  enableTouch: this.settings.values.computedPageTurnMode !== "scrollable",
1383
1366
  frameElement: r,
@@ -1389,7 +1372,7 @@ class pn extends mt {
1389
1372
  });
1390
1373
  return w(l);
1391
1374
  }
1392
- const { latestContentHeightWhenLoaded: c, ...u } = ln({
1375
+ const { latestContentHeightWhenLoaded: c, ...u } = dn({
1393
1376
  pageHeight: s,
1394
1377
  pageWidth: o,
1395
1378
  frameElement: r,
@@ -1461,14 +1444,14 @@ class pn extends mt {
1461
1444
  return this.getFrameElement();
1462
1445
  }
1463
1446
  }
1464
- const hn = (e) => (t) => {
1447
+ const ln = (e) => (t) => {
1465
1448
  const i = e({
1466
1449
  ...t,
1467
1450
  getRenderer(o) {
1468
1451
  var r;
1469
- return ((r = t.getRenderer) == null ? void 0 : r.call(t, o)) ?? ((a) => new pn(a));
1452
+ return ((r = t.getRenderer) == null ? void 0 : r.call(t, o)) ?? ((a) => new gn(a));
1470
1453
  }
1471
- }), n = Yi(i);
1454
+ }), n = Xi(i);
1472
1455
  return n.pipe(T(i.$.destroy$)).subscribe(), {
1473
1456
  ...i,
1474
1457
  links$: n
@@ -1477,7 +1460,7 @@ const hn = (e) => (t) => {
1477
1460
  function at(e) {
1478
1461
  return e != null;
1479
1462
  }
1480
- let mn = class extends Ne {
1463
+ let pn = class extends Ne {
1481
1464
  computeOutputSettings(t) {
1482
1465
  return t;
1483
1466
  }
@@ -1520,7 +1503,7 @@ class Nt {
1520
1503
  this.__symbol = Symbol("SpineItemPagePosition"), this.x = t.x, this.y = t.y;
1521
1504
  }
1522
1505
  }
1523
- class fn extends te {
1506
+ class hn extends te {
1524
1507
  constructor() {
1525
1508
  super(...arguments), this.__symbol = "SpineItemPageLayout";
1526
1509
  }
@@ -1530,7 +1513,7 @@ class Ht extends te {
1530
1513
  super(...arguments), this.__symbol = "SpineItemSpineLayout";
1531
1514
  }
1532
1515
  }
1533
- class yn extends te {
1516
+ class mn extends te {
1534
1517
  constructor() {
1535
1518
  super(...arguments), this.__symbol = "SpineItemPageSpineLayout";
1536
1519
  }
@@ -1553,17 +1536,17 @@ class Rt extends ke {
1553
1536
  return new Rt(t);
1554
1537
  }
1555
1538
  }
1556
- const Sn = (e, t) => {
1539
+ const fn = (e, t) => {
1557
1540
  const i = t.getBoundingClientRect(), { x: n, y: o } = e, { left: s, top: r } = i, a = i.width / t.offsetWidth, c = i.height / t.offsetHeight, u = n - s, d = o - r;
1558
1541
  return {
1559
1542
  x: u / a,
1560
1543
  y: d / c
1561
1544
  };
1562
- }, bn = (e, t) => new Rt(
1563
- Sn(e, t)
1564
- ), In = (e) => ({
1565
- getSpinePositionFromClientPosition: (t) => e.spine.element ? bn(t, e.spine.element) : void 0
1566
- }), wn = (e) => {
1545
+ }, yn = (e, t) => new Rt(
1546
+ fn(e, t)
1547
+ ), Sn = (e) => ({
1548
+ getSpinePositionFromClientPosition: (t) => e.spine.element ? yn(t, e.spine.element) : void 0
1549
+ }), bn = (e) => {
1567
1550
  let t;
1568
1551
  const i = e.context.state$.pipe(
1569
1552
  _(({ rootElement: c }) => c ? new ot(() => (t = c.ownerDocument.createElement("div"), t.style.cssText = `
@@ -1602,7 +1585,7 @@ const Sn = (e, t) => {
1602
1585
  G(e.$.destroy$)
1603
1586
  );
1604
1587
  return v(i, a);
1605
- }, Pn = (e) => {
1588
+ }, In = (e) => {
1606
1589
  e.hookManager.register(
1607
1590
  "item.onAfterLayout",
1608
1591
  ({ item: t, blankPagePosition: i, minimumWidth: n }) => {
@@ -1619,18 +1602,18 @@ const Sn = (e, t) => {
1619
1602
  }
1620
1603
  }
1621
1604
  );
1622
- }, vn = (e, t) => t.pipe(
1605
+ }, wn = (e, t) => t.pipe(
1623
1606
  $((i) => {
1624
1607
  e.viewport.value.element.style.transition = "transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275)", e.settings.values.computedPageTurnMode === "scrollable" ? e.viewport.value.element.style.transformOrigin = "top" : e.viewport.value.element.style.transformOrigin = "center", i === "thumbnails" ? e.viewport.value.element.style.transform = "scale(0.5)" : e.viewport.value.element.style.transform = "scale(1)", e.layout();
1625
1608
  })
1626
- ), xn = (e) => (t) => {
1609
+ ), Pn = (e) => (t) => {
1627
1610
  const {
1628
1611
  pageHorizontalMargin: i,
1629
1612
  pageVerticalMargin: n,
1630
1613
  layoutAutoResize: o,
1631
1614
  layoutLayerTransition: s,
1632
1615
  viewportMode: r
1633
- } = t, a = e(t), c = new mn(
1616
+ } = t, a = e(t), c = new pn(
1634
1617
  {
1635
1618
  pageHorizontalMargin: i,
1636
1619
  pageVerticalMargin: n,
@@ -1678,7 +1661,7 @@ const Sn = (e, t) => {
1678
1661
  `
1679
1662
  );
1680
1663
  }
1681
- }), Pn(a), a.hookManager.register(
1664
+ }), In(a), a.hookManager.register(
1682
1665
  "item.onDocumentCreated",
1683
1666
  ({ documentContainer: m }) => {
1684
1667
  m.style.opacity = "0", c.values.layoutLayerTransition && (m.style.transition = "opacity 300ms");
@@ -1703,7 +1686,7 @@ const Sn = (e, t) => {
1703
1686
  k(() => {
1704
1687
  a == null || a.layout();
1705
1688
  })
1706
- ), g = wn(a);
1689
+ ), g = bn(a);
1707
1690
  c.watch(["pageHorizontalMargin", "pageVerticalMargin"]).pipe(
1708
1691
  mi(1),
1709
1692
  k(() => {
@@ -1716,7 +1699,7 @@ const Sn = (e, t) => {
1716
1699
  const f = "prose-spineItem-ready";
1717
1700
  y ? m.containerElement.classList.add(f) : m.containerElement.classList.remove(f);
1718
1701
  })
1719
- ), h = vn(
1702
+ ), h = wn(
1720
1703
  a,
1721
1704
  c.watch("viewportMode")
1722
1705
  ), p = a.spine.pages.pipe(
@@ -1737,9 +1720,9 @@ const Sn = (e, t) => {
1737
1720
  settings: c,
1738
1721
  layout$: a.spine.layout$,
1739
1722
  layoutInfo$: p,
1740
- coordinates: In(a)
1723
+ coordinates: Sn(a)
1741
1724
  };
1742
- }, $n = `${lt}-enhancer-loading`, We = `${$n}-container`, Tn = (e, t) => {
1725
+ }, vn = `${lt}-enhancer-loading`, We = `${vn}-container`, xn = (e, t) => {
1743
1726
  const i = e.ownerDocument.createElement("div");
1744
1727
  return i.classList.add(We), i.style.cssText = `
1745
1728
  height: 100%;
@@ -1757,7 +1740,7 @@ const Sn = (e, t) => {
1757
1740
  background-color: white;
1758
1741
  z-index: 1;
1759
1742
  `, i;
1760
- }, Fn = ({
1743
+ }, $n = ({
1761
1744
  container: e,
1762
1745
  item: t
1763
1746
  }) => {
@@ -1774,8 +1757,8 @@ const Sn = (e, t) => {
1774
1757
  max-width: 300px;
1775
1758
  width: 80%;
1776
1759
  `, e.appendChild(i), e.appendChild(n), e;
1777
- }, Ln = (e) => (t) => {
1778
- const { loadingElementCreate: i = Fn } = t, n = e(t), o = (c) => w(
1760
+ }, Tn = (e) => (t) => {
1761
+ const { loadingElementCreate: i = $n } = t, n = e(t), o = (c) => w(
1779
1762
  c.reduce((u, { item: d, element: g }) => {
1780
1763
  g.style.zIndex = "0";
1781
1764
  const l = g.querySelector(
@@ -1784,7 +1767,7 @@ const Sn = (e, t) => {
1784
1767
  if (l instanceof HTMLElement)
1785
1768
  return u[d.id] = l, u;
1786
1769
  const h = i({
1787
- container: Tn(g, n.context),
1770
+ container: xn(g, n.context),
1788
1771
  item: d
1789
1772
  });
1790
1773
  return g.appendChild(h), u[d.id] = h, u;
@@ -1836,7 +1819,7 @@ const Sn = (e, t) => {
1836
1819
  }
1837
1820
  };
1838
1821
  };
1839
- class Mn extends mt {
1822
+ class Fn extends mt {
1840
1823
  getImageElement() {
1841
1824
  const t = this.documentContainer;
1842
1825
  if (t instanceof HTMLImageElement)
@@ -1888,13 +1871,13 @@ class Mn extends mt {
1888
1871
  getDocumentFrame() {
1889
1872
  }
1890
1873
  }
1891
- const Cn = (e) => (t) => {
1874
+ const Ln = (e) => (t) => {
1892
1875
  const i = e({
1893
1876
  ...t,
1894
1877
  getRenderer(r) {
1895
1878
  var d;
1896
1879
  const a = (d = t.getRenderer) == null ? void 0 : d.call(t, r), c = r.mediaType ?? Mt(r.href), u = !!(c != null && c.startsWith("image/"));
1897
- return !a && u ? (g) => new Mn(g) : a;
1880
+ return !a && u ? (g) => new Fn(g) : a;
1898
1881
  }
1899
1882
  }), n = new IntersectionObserver(
1900
1883
  (r) => {
@@ -1944,7 +1927,7 @@ const Cn = (e) => (t) => {
1944
1927
  n.disconnect(), o.disconnect(), i.destroy();
1945
1928
  }
1946
1929
  };
1947
- }, Rn = (e, t) => e.links$.pipe(
1930
+ }, Mn = (e, t) => e.links$.pipe(
1948
1931
  $((i) => {
1949
1932
  var r;
1950
1933
  if (!Vi(i.target, "a") || i.type !== "click") return;
@@ -1953,7 +1936,7 @@ const Cn = (e) => (t) => {
1953
1936
  (a) => a.href === o
1954
1937
  )) && t.goToUrl(n);
1955
1938
  })
1956
- ), st = O.namespace("navigation"), An = ({
1939
+ ), st = O.namespace("navigation"), Cn = ({
1957
1940
  position: e,
1958
1941
  spineItem: t,
1959
1942
  pageHeight: i,
@@ -1985,7 +1968,7 @@ const Cn = (e) => (t) => {
1985
1968
  const u = o.getSpineItemPositionFromSpinePosition(
1986
1969
  e,
1987
1970
  a
1988
- ), d = An({
1971
+ ), d = Cn({
1989
1972
  position: u,
1990
1973
  spineItem: a,
1991
1974
  pageHeight: s.getPageSize().height,
@@ -2007,7 +1990,7 @@ const Cn = (e) => (t) => {
2007
1990
  x: 0
2008
1991
  })
2009
1992
  );
2010
- }, Dn = ({
1993
+ }, Rn = ({
2011
1994
  position: e,
2012
1995
  spineItem: t,
2013
1996
  context: i,
@@ -2049,7 +2032,7 @@ const Cn = (e) => (t) => {
2049
2032
  return n.getAdjustedPositionForSpread(c);
2050
2033
  }
2051
2034
  return n.getAdjustedPositionForSpread(a);
2052
- }, Nn = ({
2035
+ }, An = ({
2053
2036
  position: e,
2054
2037
  spineItem: t,
2055
2038
  pageHeight: i,
@@ -2081,7 +2064,7 @@ const Cn = (e) => (t) => {
2081
2064
  const u = o.getSpineItemPositionFromSpinePosition(
2082
2065
  e,
2083
2066
  a
2084
- ), d = Nn({
2067
+ ), d = An({
2085
2068
  position: u,
2086
2069
  spineItem: a,
2087
2070
  pageHeight: s.getPageSize().height,
@@ -2103,7 +2086,7 @@ const Cn = (e) => (t) => {
2103
2086
  x: 0
2104
2087
  })
2105
2088
  );
2106
- }, On = ({
2089
+ }, Dn = ({
2107
2090
  position: e,
2108
2091
  spineItem: t,
2109
2092
  context: i,
@@ -2149,7 +2132,7 @@ const Cn = (e) => (t) => {
2149
2132
  }
2150
2133
  return n.getAdjustedPositionForSpread(a);
2151
2134
  };
2152
- class Vn {
2135
+ class Nn {
2153
2136
  constructor(t) {
2154
2137
  this.reader = t, this.movingLastDelta = { x: 0, y: 0 }, this.movingLastPosition = new L({ x: 0, y: 0 }), this.unlock = void 0;
2155
2138
  }
@@ -2168,7 +2151,7 @@ class Vn {
2168
2151
  turnRightOrBottom() {
2169
2152
  const t = this.reader.navigation.getNavigation(), i = this.reader.spineItemsManager.get(t.spineItem);
2170
2153
  if (!i) return;
2171
- const n = On({
2154
+ const n = Dn({
2172
2155
  context: this.reader.context,
2173
2156
  navigationResolver: this.reader.navigation.navigationResolver,
2174
2157
  position: t.position,
@@ -2184,7 +2167,7 @@ class Vn {
2184
2167
  turnLeftOrTop() {
2185
2168
  const t = this.reader.navigation.getNavigation(), i = this.reader.spineItemsManager.get(t.spineItem);
2186
2169
  if (!i) return;
2187
- const n = Dn({
2170
+ const n = Rn({
2188
2171
  context: this.reader.context,
2189
2172
  navigationResolver: this.reader.navigation.navigationResolver,
2190
2173
  position: t.position,
@@ -2326,7 +2309,7 @@ class Vn {
2326
2309
  }
2327
2310
  }
2328
2311
  }
2329
- class jn {
2312
+ class On {
2330
2313
  constructor(t) {
2331
2314
  this.reader = t, this.lastDelta = { x: 0, y: 0 }, this.lastPosition = new L({ x: 0, y: 0 }), this.lastStartPosition = new L({ x: 0, y: 0 }), this.unlock = void 0;
2332
2315
  }
@@ -2366,7 +2349,7 @@ class jn {
2366
2349
  });
2367
2350
  }
2368
2351
  }
2369
- const kn = (e) => e.pagination.state$.pipe(
2352
+ const Vn = (e) => e.pagination.state$.pipe(
2370
2353
  A(e.context.manifest$, e.settings.values$),
2371
2354
  S(
2372
2355
  ([
@@ -2386,7 +2369,7 @@ const kn = (e) => e.pagination.state$.pipe(
2386
2369
  }
2387
2370
  ),
2388
2371
  H(N)
2389
- ), Wn = ({ reader: e, duration: t }) => (i) => {
2372
+ ), jn = ({ reader: e, duration: t }) => (i) => {
2390
2373
  let n;
2391
2374
  const o = () => {
2392
2375
  n == null || n(), n = void 0;
@@ -2402,18 +2385,18 @@ const kn = (e) => e.pagination.state$.pipe(
2402
2385
  $(o),
2403
2386
  dt(o)
2404
2387
  );
2405
- }, Un = (e) => (t) => {
2406
- const i = e(t), n = kn(i), o = new Vn(i), s = new jn(i), r = (c) => {
2388
+ }, kn = (e) => (t) => {
2389
+ const i = e(t), n = Vn(i), o = new Nn(i), s = new On(i), r = (c) => {
2407
2390
  const { cfi: u, ...d } = c;
2408
2391
  i.load(d), u && o.goToCfi(u, { animate: !1 });
2409
2392
  };
2410
- return Rn(i, o).pipe(T(i.$.destroy$)).subscribe(), {
2393
+ return Mn(i, o).pipe(T(i.$.destroy$)).subscribe(), {
2411
2394
  ...i,
2412
2395
  load: r,
2413
2396
  navigation: {
2414
2397
  ...i.navigation,
2415
2398
  state$: n,
2416
- throttleLock: ({ duration: c, trigger: u }) => u.pipe(Wn({ duration: c, reader: i })),
2399
+ throttleLock: ({ duration: c, trigger: u }) => u.pipe(jn({ duration: c, reader: i })),
2417
2400
  moveTo: s.moveTo.bind(s),
2418
2401
  turnBottom: o.turnBottom.bind(o),
2419
2402
  turnTop: o.turnTop.bind(o),
@@ -2478,18 +2461,18 @@ const kn = (e) => e.pagination.state$.pipe(
2478
2461
  offset: o.offset,
2479
2462
  item: t.item
2480
2463
  }).trim() : ft(t.item);
2481
- }, zn = (e, t) => Ue({
2464
+ }, Wn = (e, t) => Ue({
2482
2465
  nodeOrRange: e,
2483
2466
  item: t
2484
- }), js = (e) => e.index.toString(), le = (e) => {
2467
+ }), Os = (e) => e.index.toString(), le = (e) => {
2485
2468
  var t;
2486
2469
  return ((t = e[0]) == null ? void 0 : t.index) === 6 && e.length > 1;
2487
2470
  }, Et = (e) => {
2488
2471
  const t = Te(e);
2489
2472
  return Si(t);
2490
- }, Hn = (e) => Array.isArray(e) ? e[0] && le(e[0]) ? e[0] : void 0 : e.parent[0] && le(e.parent[0]) ? e.parent[0] : void 0, ee = (e) => {
2473
+ }, Un = (e) => Array.isArray(e) ? e[0] && le(e[0]) ? e[0] : void 0 : e.parent[0] && le(e.parent[0]) ? e.parent[0] : void 0, ee = (e) => {
2491
2474
  var a, c, u, d;
2492
- const t = Te(e), n = (Hn(t) ?? [])[1], s = ((n == null ? void 0 : n.index) ?? 2) / 2 - 1, r = bi(t) ? (c = (a = t.end.at(-1)) == null ? void 0 : a.at(-1)) == null ? void 0 : c.offset : (d = (u = t.at(-1)) == null ? void 0 : u.at(-1)) == null ? void 0 : d.offset;
2475
+ const t = Te(e), n = (Un(t) ?? [])[1], s = ((n == null ? void 0 : n.index) ?? 2) / 2 - 1, r = bi(t) ? (c = (a = t.end.at(-1)) == null ? void 0 : a.at(-1)) == null ? void 0 : c.offset : (d = (u = t.at(-1)) == null ? void 0 : u.at(-1)) == null ? void 0 : d.offset;
2493
2476
  return {
2494
2477
  cleanedCfi: e,
2495
2478
  itemIndex: s,
@@ -2527,7 +2510,7 @@ const kn = (e) => e.pagination.state$.pipe(
2527
2510
  return {
2528
2511
  spineItem: n
2529
2512
  };
2530
- }, Bn = (e, t) => {
2513
+ }, zn = (e, t) => {
2531
2514
  if ("cfi" in t)
2532
2515
  return t;
2533
2516
  const i = e.spineItemsManager.get(t);
@@ -2536,7 +2519,7 @@ const kn = (e) => e.pagination.state$.pipe(
2536
2519
  return {
2537
2520
  cfi: ft(i.item)
2538
2521
  };
2539
- }, En = (e, t) => {
2522
+ }, Hn = (e, t) => {
2540
2523
  let i = e == null ? void 0 : e.itemPageIndex;
2541
2524
  const { itemIndex: n } = t.cfi.parseCfi(e.cfi), o = t.spineItemsManager.get(n);
2542
2525
  return o ? De().pipe(
@@ -2568,7 +2551,7 @@ const kn = (e) => e.pagination.state$.pipe(
2568
2551
  })
2569
2552
  ) : w({ ...e, itemIndex: n });
2570
2553
  };
2571
- class _n {
2554
+ class Bn {
2572
2555
  constructor(t) {
2573
2556
  this.reader = t, this.locatorsByKey = /* @__PURE__ */ new Map(), this.deregisterMemoizedStream = (i) => {
2574
2557
  const n = this.locatorsByKey.get(i);
@@ -2576,7 +2559,7 @@ class _n {
2576
2559
  }, this.locate = (i, n) => {
2577
2560
  const o = {
2578
2561
  resource: i,
2579
- meta: Bn(this.reader, i)
2562
+ meta: zn(this.reader, i)
2580
2563
  };
2581
2564
  return ae(() => {
2582
2565
  var h;
@@ -2602,7 +2585,7 @@ class _n {
2602
2585
  const l = this.reader.spine.layout$.pipe(
2603
2586
  St(10),
2604
2587
  it(o),
2605
- oi((p) => En(p.meta, this.reader).pipe(
2588
+ oi((p) => Hn(p.meta, this.reader).pipe(
2606
2589
  S((m) => ({
2607
2590
  ...p,
2608
2591
  meta: m
@@ -2650,20 +2633,20 @@ const He = (e, t, i) => {
2650
2633
  }
2651
2634
  return o;
2652
2635
  }, void 0);
2653
- }, Xn = (e, t) => {
2636
+ }, En = (e, t) => {
2654
2637
  var n;
2655
2638
  const { href: i } = t;
2656
2639
  return He(i, ((n = e.nav) == null ? void 0 : n.toc) ?? [], e);
2657
- }, Yn = (e) => {
2640
+ }, _n = (e) => {
2658
2641
  const t = e.context.manifest, i = e.spineItemsManager.items;
2659
2642
  return t ? i.reduce(
2660
- (n, { item: o }) => (n[o.id] = Xn(t, o), n),
2643
+ (n, { item: o }) => (n[o.id] = En(t, o), n),
2661
2644
  {}
2662
2645
  ) : {};
2663
- }, qn = (e) => e.spineItemsManager.items$.pipe(
2646
+ }, Xn = (e) => e.spineItemsManager.items$.pipe(
2664
2647
  it([]),
2665
- S(() => Yn(e))
2666
- ), Zn = (e, t, i) => e + t * i, Gn = (e, t, i) => {
2648
+ S(() => _n(e))
2649
+ ), Yn = (e, t, i) => e + t * i, qn = (e, t, i) => {
2667
2650
  const n = e.context, { height: o, width: s } = i.layout.layoutInfo, { top: r, left: a } = e.spine.getSpineItemSpineLayoutInfo(i);
2668
2651
  return e.settings.values.computedPageTurnDirection === "vertical" ? Math.max(
2669
2652
  0,
@@ -2678,7 +2661,7 @@ const He = (e, t, i) => {
2678
2661
  (t.x - a + n.state.visibleAreaRect.width) / s
2679
2662
  )
2680
2663
  );
2681
- }, Jn = (e, t, i, n, o) => o.isReady$.pipe(
2664
+ }, Zn = (e, t, i, n, o) => o.isReady$.pipe(
2682
2665
  z(),
2683
2666
  A(e.layoutInfo$),
2684
2667
  S(([s, r]) => {
@@ -2689,17 +2672,17 @@ const He = (e, t, i) => {
2689
2672
  let m = (i + 1) * (p / h);
2690
2673
  !c && o.renditionLayout === "reflowable" && !s && (m = 0);
2691
2674
  let y = d + m;
2692
- return ((D = a.manifest) == null ? void 0 : D.renditionFlow) === "scrolled-continuous" && (s ? m = Gn(
2675
+ return ((D = a.manifest) == null ? void 0 : D.renditionFlow) === "scrolled-continuous" && (s ? m = qn(
2693
2676
  e,
2694
2677
  n,
2695
2678
  o
2696
- ) : m = 0, y = Zn(
2679
+ ) : m = 0, y = Yn(
2697
2680
  d,
2698
2681
  p,
2699
2682
  m
2700
2683
  )), t === u - 1 && i === h - 1 && y > 0.99 ? 1 : y;
2701
2684
  })
2702
- ), Kn = (e) => e.spine.layout$.pipe(
2685
+ ), Gn = (e) => e.spine.layout$.pipe(
2703
2686
  St(10, rt),
2704
2687
  A(e.pagination.state$),
2705
2688
  S(() => ({
@@ -2717,7 +2700,7 @@ const He = (e, t, i) => {
2717
2700
  numberOfPagesPerItems: [],
2718
2701
  numberOfTotalPages: 0
2719
2702
  })
2720
- ), Qn = (e, t, i, n) => {
2703
+ ), Jn = (e, t, i, n) => {
2721
2704
  const o = e.context, s = t.beginSpineItemIndex !== void 0 ? e.spineItemsManager.get(t.beginSpineItemIndex) : void 0, r = t.endSpineItemIndex !== void 0 ? e.spineItemsManager.get(t.endSpineItemIndex) : void 0;
2722
2705
  return w({
2723
2706
  ...t,
@@ -2748,7 +2731,7 @@ const He = (e, t, i) => {
2748
2731
  // hasPreviousChapter: (reader.spine.spineItemIndex || 0) < (manifest.readingOrder.length - 1),
2749
2732
  // numberOfSpineItems: context.manifest?.readingOrder.length,
2750
2733
  });
2751
- }, to = (e) => B([
2734
+ }, Kn = (e) => B([
2752
2735
  e.pagination.state$,
2753
2736
  // Usually pagination change if layout changes (number of pages) however it is especially
2754
2737
  // useful for like webtoon where you still have one page but only the layout will give you the final size
@@ -2757,7 +2740,7 @@ const He = (e, t, i) => {
2757
2740
  ]).pipe(
2758
2741
  P(([t]) => {
2759
2742
  const i = t.endSpineItemIndex !== void 0 ? e.spineItemsManager.get(t.endSpineItemIndex) : void 0;
2760
- return i ? Jn(
2743
+ return i ? Zn(
2761
2744
  e,
2762
2745
  t.endSpineItemIndex ?? 0,
2763
2746
  t.endPageIndexInSpineItem || 0,
@@ -2765,8 +2748,8 @@ const He = (e, t, i) => {
2765
2748
  i
2766
2749
  ) : w(0);
2767
2750
  })
2768
- ), eo = (e) => {
2769
- const t = qn(e), i = Kn(e), n = new U({
2751
+ ), Qn = (e) => {
2752
+ const t = Xn(e), i = Gn(e), n = new U({
2770
2753
  ...e.pagination.state,
2771
2754
  beginChapterInfo: void 0,
2772
2755
  beginCfi: void 0,
@@ -2784,10 +2767,10 @@ const He = (e, t, i) => {
2784
2767
  }), o = B([
2785
2768
  e.pagination.state$,
2786
2769
  t,
2787
- to(e)
2770
+ Kn(e)
2788
2771
  ]).pipe(
2789
2772
  P(
2790
- ([r, a, c]) => Qn(
2773
+ ([r, a, c]) => Jn(
2791
2774
  e,
2792
2775
  r,
2793
2776
  a,
@@ -2822,10 +2805,10 @@ const He = (e, t, i) => {
2822
2805
  }),
2823
2806
  tt(1)
2824
2807
  ), getPaginationInfo: () => n.value };
2825
- }, io = (e) => (t) => {
2826
- const i = e(t), { paginationInfo$: n, getPaginationInfo: o } = eo(i);
2808
+ }, to = (e) => (t) => {
2809
+ const i = e(t), { paginationInfo$: n, getPaginationInfo: o } = Qn(i);
2827
2810
  n.pipe(T(i.$.destroy$)).subscribe();
2828
- const s = new _n(i);
2811
+ const s = new Bn(i);
2829
2812
  return {
2830
2813
  ...i,
2831
2814
  locateResource: s.locateResource.bind(s),
@@ -2839,7 +2822,7 @@ const He = (e, t, i) => {
2839
2822
  }
2840
2823
  }
2841
2824
  };
2842
- }, no = (e) => ({
2825
+ }, eo = (e) => ({
2843
2826
  put: (s, r) => new Promise((a, c) => {
2844
2827
  const u = e.transaction(["store"], "readwrite");
2845
2828
  u.onerror = (l) => {
@@ -2897,11 +2880,11 @@ const He = (e, t, i) => {
2897
2880
  n.onerror = (o) => {
2898
2881
  i(o);
2899
2882
  }, n.onsuccess = () => {
2900
- t(no(n.result));
2883
+ t(eo(n.result));
2901
2884
  }, n.onupgradeneeded = () => {
2902
2885
  n.result.createObjectStore("store");
2903
2886
  };
2904
- }), oo = (e) => {
2887
+ }), io = (e) => {
2905
2888
  let t = Date.now().toString();
2906
2889
  const i = new W(), n = (c) => {
2907
2890
  var u, d;
@@ -2960,8 +2943,8 @@ const He = (e, t, i) => {
2960
2943
  i.complete();
2961
2944
  }
2962
2945
  };
2963
- }, so = (e) => (t) => {
2964
- const i = e(t), n = oo(i.context);
2946
+ }, no = (e) => (t) => {
2947
+ const i = e(t), n = io(i.context);
2965
2948
  return {
2966
2949
  ...i,
2967
2950
  // $: {
@@ -2973,7 +2956,7 @@ const He = (e, t, i) => {
2973
2956
  }
2974
2957
  // load,
2975
2958
  };
2976
- }, ro = (e, t) => {
2959
+ }, oo = (e, t) => {
2977
2960
  var o;
2978
2961
  const i = (o = e.node.ownerDocument) == null ? void 0 : o.createRange(), n = e.node.compareDocumentPosition(t.node);
2979
2962
  if (i) {
@@ -2994,14 +2977,14 @@ const He = (e, t, i) => {
2994
2977
  }
2995
2978
  return i;
2996
2979
  }
2997
- }, ao = ({
2980
+ }, so = ({
2998
2981
  selection: e,
2999
2982
  spineItem: t
3000
2983
  }) => {
3001
2984
  const { anchorNode: i, anchorOffset: n, focusNode: o, focusOffset: s } = e;
3002
2985
  if (!(!i || !o))
3003
2986
  try {
3004
- return ro(
2987
+ return oo(
3005
2988
  { node: i, offset: n },
3006
2989
  { node: o, offset: s }
3007
2990
  );
@@ -3013,7 +2996,7 @@ const He = (e, t, i) => {
3013
2996
  return;
3014
2997
  }
3015
2998
  };
3016
- class co extends X {
2999
+ class ro extends X {
3017
3000
  constructor(t) {
3018
3001
  var n;
3019
3002
  super();
@@ -3069,12 +3052,12 @@ class co extends X {
3069
3052
  }
3070
3053
  }
3071
3054
  }
3072
- const uo = (e) => e.loaded$.pipe(
3055
+ const ao = (e) => e.loaded$.pipe(
3073
3056
  P(() => {
3074
3057
  var o;
3075
3058
  const t = e.renderer.getDocumentFrame(), i = (t == null ? void 0 : t.contentDocument) || ((o = t == null ? void 0 : t.contentWindow) == null ? void 0 : o.document);
3076
3059
  if (!t || !i) return gt;
3077
- const n = new co(t);
3060
+ const n = new ro(t);
3078
3061
  return v(
3079
3062
  n.selectionChange$.pipe(
3080
3063
  S((s) => {
@@ -3101,14 +3084,14 @@ const uo = (e) => e.loaded$.pipe(
3101
3084
  );
3102
3085
  }),
3103
3086
  H()
3104
- ), go = (e) => (t) => {
3087
+ ), co = (e) => (t) => {
3105
3088
  const i = e(t);
3106
3089
  let n;
3107
3090
  const o = i.spineItemsManager.items$.pipe(
3108
3091
  P((d) => {
3109
3092
  const g = d.map((l) => {
3110
3093
  const h = i.spineItemsManager.getSpineItemIndex(l) ?? 0;
3111
- return uo(l).pipe(
3094
+ return ao(l).pipe(
3112
3095
  S((p) => {
3113
3096
  if (p)
3114
3097
  return {
@@ -3156,7 +3139,7 @@ const uo = (e) => e.loaded$.pipe(
3156
3139
  selectionOver$: c,
3157
3140
  lastSelectionOnPointerdown$: u,
3158
3141
  getSelection: () => n,
3159
- createOrderedRangeFromSelection: ao
3142
+ createOrderedRangeFromSelection: so
3160
3143
  }
3161
3144
  };
3162
3145
  }, pe = [
@@ -3174,7 +3157,7 @@ const uo = (e) => e.loaded$.pipe(
3174
3157
  backgroundColor: "#191717",
3175
3158
  foregroundColor: "#f1ebeb"
3176
3159
  }
3177
- ], lo = (e) => (t) => {
3160
+ ], uo = (e) => (t) => {
3178
3161
  const i = e(t), n = new U(
3179
3162
  t.theme ?? "bright"
3180
3163
  ), o = () => {
@@ -3239,7 +3222,7 @@ const uo = (e) => e.loaded$.pipe(
3239
3222
  }
3240
3223
  }
3241
3224
  };
3242
- }, po = (e) => (t) => ({
3225
+ }, go = (e) => (t) => ({
3243
3226
  ...e(t),
3244
3227
  utils: {
3245
3228
  isOrIsWithinValidLink: (o) => {
@@ -3253,13 +3236,13 @@ const uo = (e) => e.loaded$.pipe(
3253
3236
  }
3254
3237
  });
3255
3238
  navigator.userAgent.indexOf("") > -1 && navigator.userAgent.indexOf("Chrome") <= -1;
3256
- const ho = (e) => (t) => e(t);
3239
+ const lo = (e) => (t) => e(t);
3257
3240
  class Be {
3258
3241
  constructor(t) {
3259
3242
  this.reader = t;
3260
3243
  }
3261
3244
  }
3262
- class mo extends Be {
3245
+ class po extends Be {
3263
3246
  constructor() {
3264
3247
  super(...arguments), this.isZooming$ = new U(!1), this.currentScale = 1, this.currentPosition = { x: 0, y: 0 };
3265
3248
  }
@@ -3316,7 +3299,7 @@ const Tt = ({
3316
3299
  const o = i * e / 2 - i + i / 2, s = i * t / 2 - i + i / 2, r = e / t, a = n - s;
3317
3300
  return Math.max(o + a * r, 0);
3318
3301
  };
3319
- class fo extends Be {
3302
+ class ho extends Be {
3320
3303
  constructor() {
3321
3304
  super(...arguments), this.isZooming$ = new U(!1), this.currentScale = 1, this.currentPosition = { x: 0, y: 0 };
3322
3305
  }
@@ -3349,8 +3332,8 @@ class fo extends Be {
3349
3332
  }), this.currentScale = o;
3350
3333
  }
3351
3334
  }
3352
- const yo = (e) => (t) => {
3353
- const i = e(t), n = new mo(i), o = new fo(i), s = new U(o);
3335
+ const mo = (e) => (t) => {
3336
+ const i = e(t), n = new po(i), o = new ho(i), s = new U(o);
3354
3337
  return {
3355
3338
  ...i,
3356
3339
  destroy: () => {
@@ -3409,7 +3392,7 @@ class pt extends ot {
3409
3392
  this.stateSubject.complete(), this.destroy$.complete();
3410
3393
  }
3411
3394
  }
3412
- class So {
3395
+ class fo {
3413
3396
  constructor() {
3414
3397
  this.navigationSubject = new ie(1), this.viewportStateSubject = new U("free"), this.paginationSubject = new ie(), this.navigationIsLockedSubject = new U(!1), this.pagination$ = this.paginationSubject.asObservable(), this.navigationUnlocked$ = this.navigationIsLockedSubject.pipe(
3415
3398
  H(),
@@ -3421,7 +3404,7 @@ class So {
3421
3404
  ), this.navigation$ = this.navigationSubject.asObservable();
3422
3405
  }
3423
3406
  }
3424
- const bo = ({
3407
+ const yo = ({
3425
3408
  manifest: e,
3426
3409
  visibleAreaRect: t,
3427
3410
  forceSinglePageMode: i
@@ -3429,7 +3412,7 @@ const bo = ({
3429
3412
  const { height: n, width: o } = t, s = o > n;
3430
3413
  return i || (e == null ? void 0 : e.renditionFlow) === "scrolled-continuous" ? !1 : !s && (e == null ? void 0 : e.renditionSpread) === "portrait" ? !0 : s && ((e == null ? void 0 : e.renditionSpread) === void 0 || (e == null ? void 0 : e.renditionSpread) === "auto" || (e == null ? void 0 : e.renditionSpread) === "landscape" || (e == null ? void 0 : e.renditionSpread) === "both");
3431
3414
  };
3432
- class Io extends pt {
3415
+ class So extends pt {
3433
3416
  constructor() {
3434
3417
  super({
3435
3418
  marginBottom: 0,
@@ -3442,7 +3425,7 @@ class Io extends pt {
3442
3425
  x: 0,
3443
3426
  y: 0
3444
3427
  }
3445
- }), this.bridgeEvent = new So(), this.destroy$ = new W(), this.state$ = this.pipe(Z(N)), this.manifest$ = this.pipe(
3428
+ }), this.bridgeEvent = new fo(), this.destroy$ = new W(), this.state$ = this.pipe(Z(N)), this.manifest$ = this.pipe(
3446
3429
  Y((t) => t.manifest),
3447
3430
  K(at),
3448
3431
  Z()
@@ -3473,7 +3456,7 @@ class Io extends pt {
3473
3456
  isFullyPrePaginated: Ee(n),
3474
3457
  assumedRenditionLayout: (n == null ? void 0 : n.renditionLayout) ?? "reflowable"
3475
3458
  },
3476
- isUsingSpreadMode: bo({
3459
+ isUsingSpreadMode: yo({
3477
3460
  manifest: n,
3478
3461
  visibleAreaRect: s,
3479
3462
  forceSinglePageMode: o
@@ -3505,7 +3488,7 @@ class Io extends pt {
3505
3488
  };
3506
3489
  }
3507
3490
  }
3508
- class wo extends pt {
3491
+ class bo extends pt {
3509
3492
  constructor(t, i) {
3510
3493
  super({
3511
3494
  supportedPageTurnAnimation: ["fade", "none", "slide"],
@@ -3541,7 +3524,7 @@ class wo extends pt {
3541
3524
  ).subscribe(this.next.bind(this));
3542
3525
  }
3543
3526
  }
3544
- class Po {
3527
+ class Io {
3545
3528
  constructor() {
3546
3529
  this._hooks = [], this._hookExecutions = [];
3547
3530
  }
@@ -3617,7 +3600,7 @@ class _e {
3617
3600
  };
3618
3601
  }
3619
3602
  }
3620
- const vo = () => (e) => e.pipe(
3603
+ const wo = () => (e) => e.pipe(
3621
3604
  S(({ navigation: t, pagination: i, ...n }) => ({
3622
3605
  navigation: {
3623
3606
  ...t,
@@ -3625,7 +3608,7 @@ const vo = () => (e) => e.pipe(
3625
3608
  },
3626
3609
  ...n
3627
3610
  }))
3628
- ), xo = (e, t, i) => e.bridgeEvent.pagination$.pipe(
3611
+ ), Po = (e, t, i) => e.bridgeEvent.pagination$.pipe(
3629
3612
  A(t),
3630
3613
  M(
3631
3614
  ([n, o]) => n.navigationId === o.id
@@ -3645,7 +3628,7 @@ const vo = () => (e) => e.pipe(
3645
3628
  }))
3646
3629
  );
3647
3630
  }),
3648
- vo(),
3631
+ wo(),
3649
3632
  H(
3650
3633
  (n, o) => n.navigation.paginationBeginCfi === o.navigation.paginationBeginCfi
3651
3634
  ),
@@ -3657,7 +3640,7 @@ const vo = () => (e) => e.pipe(
3657
3640
  }
3658
3641
  })
3659
3642
  )
3660
- ), $o = (e) => e.pipe(
3643
+ ), vo = (e) => e.pipe(
3661
3644
  S(([t, i]) => {
3662
3645
  const n = {
3663
3646
  type: "api",
@@ -3673,7 +3656,7 @@ const vo = () => (e) => e.pipe(
3673
3656
  navigation: n
3674
3657
  };
3675
3658
  })
3676
- ), To = ({ navigationResolver: e }) => (t) => t.pipe(
3659
+ ), xo = ({ navigationResolver: e }) => (t) => t.pipe(
3677
3660
  S((i) => {
3678
3661
  if (i.navigation.cfi) {
3679
3662
  const n = e.getNavigationForCfi(
@@ -3690,16 +3673,16 @@ const vo = () => (e) => e.pipe(
3690
3673
  }
3691
3674
  return i;
3692
3675
  })
3693
- ), Fo = ({
3676
+ ), $o = ({
3694
3677
  navigation: e,
3695
3678
  previousNavigation: t,
3696
3679
  settings: i
3697
- }) => e.directionFromLastNavigation ? e.directionFromLastNavigation : e.url !== void 0 || e.cfi !== void 0 ? "anchor" : t.spineItem === void 0 || e.spineItem || !e.position ? "forward" : i.values.computedPageTurnDirection === "vertical" ? e.position.y > t.position.y || e.position.y === t.position.y && t.directionFromLastNavigation !== "backward" ? "forward" : "backward" : Math.abs(e.position.x) > Math.abs(t.position.x) || e.position.x === t.position.x && t.directionFromLastNavigation !== "backward" ? "forward" : "backward", Lo = ({
3680
+ }) => e.directionFromLastNavigation ? e.directionFromLastNavigation : e.url !== void 0 || e.cfi !== void 0 ? "anchor" : t.spineItem === void 0 || e.spineItem || !e.position ? "forward" : i.values.computedPageTurnDirection === "vertical" ? e.position.y > t.position.y || e.position.y === t.position.y && t.directionFromLastNavigation !== "backward" ? "forward" : "backward" : Math.abs(e.position.x) > Math.abs(t.position.x) || e.position.x === t.position.x && t.directionFromLastNavigation !== "backward" ? "forward" : "backward", To = ({
3698
3681
  context: e,
3699
3682
  settings: t
3700
3683
  }) => (i) => i.pipe(
3701
3684
  S(({ navigation: n, previousNavigation: o }) => {
3702
- const s = Fo({
3685
+ const s = $o({
3703
3686
  navigation: n,
3704
3687
  previousNavigation: o,
3705
3688
  settings: t
@@ -3713,7 +3696,7 @@ const vo = () => (e) => e.pipe(
3713
3696
  direction: s
3714
3697
  };
3715
3698
  })
3716
- ), Mo = ({
3699
+ ), Fo = ({
3717
3700
  spineItemsManager: e,
3718
3701
  navigationResolver: t
3719
3702
  }) => (i) => i.pipe(
@@ -3867,7 +3850,7 @@ const vo = () => (e) => e.pipe(
3867
3850
  ...a
3868
3851
  }))
3869
3852
  );
3870
- }, Co = ({ navigationResolver: e }) => (t) => t.pipe(
3853
+ }, Lo = ({ navigationResolver: e }) => (t) => t.pipe(
3871
3854
  S((i) => {
3872
3855
  if (i.navigation.url) {
3873
3856
  const n = e.getNavigationForUrl(
@@ -3885,7 +3868,7 @@ const vo = () => (e) => e.pipe(
3885
3868
  }
3886
3869
  return i;
3887
3870
  })
3888
- ), Ro = ({
3871
+ ), Mo = ({
3889
3872
  spineLocator: e,
3890
3873
  navigation: t,
3891
3874
  navigationResolver: i,
@@ -3943,7 +3926,7 @@ const vo = () => (e) => e.pipe(
3943
3926
  return c ? i.getNavigationForPosition(t.position) : i.getNavigationForSpineIndexOrId(s);
3944
3927
  })
3945
3928
  ) : w(new L({ x: 0, y: 0 }));
3946
- }, Ao = ({
3929
+ }, Co = ({
3947
3930
  navigation: e,
3948
3931
  spineLocator: t,
3949
3932
  spineItemsManager: i,
@@ -4012,7 +3995,7 @@ const vo = () => (e) => e.pipe(
4012
3995
  }
4013
3996
  }
4014
3997
  return e.position;
4015
- }, Do = ({
3998
+ }, Ro = ({
4016
3999
  navigation: e,
4017
4000
  spineItemsManager: t,
4018
4001
  settings: i,
@@ -4020,7 +4003,7 @@ const vo = () => (e) => e.pipe(
4020
4003
  navigationResolver: o,
4021
4004
  spine: s
4022
4005
  }) => i.values.computedPageTurnMode === "scrollable" ? w(
4023
- Ao({
4006
+ Co({
4024
4007
  navigation: e,
4025
4008
  spineLocator: n,
4026
4009
  navigationResolver: o,
@@ -4028,7 +4011,7 @@ const vo = () => (e) => e.pipe(
4028
4011
  spineItemsManager: t,
4029
4012
  spine: s
4030
4013
  })
4031
- ) : Ro({
4014
+ ) : Mo({
4032
4015
  navigation: e,
4033
4016
  spineLocator: n,
4034
4017
  navigationResolver: o,
@@ -4040,7 +4023,7 @@ const vo = () => (e) => e.pipe(
4040
4023
  context: i,
4041
4024
  spine: n
4042
4025
  }) => (o) => o.pipe(
4043
- P((s) => Do({
4026
+ P((s) => Ro({
4044
4027
  spineLocator: n.locator,
4045
4028
  navigation: s.navigation,
4046
4029
  navigationResolver: t,
@@ -4057,8 +4040,8 @@ const vo = () => (e) => e.pipe(
4057
4040
  }
4058
4041
  }))
4059
4042
  ))
4060
- ), No = "navigation/InternalNavigator", Oo = O.namespace(No);
4061
- class Vo extends X {
4043
+ ), Ao = "navigation/InternalNavigator", Do = O.namespace(Ao);
4044
+ class No extends X {
4062
4045
  constructor(t, i, n, o, s, r, a, c) {
4063
4046
  super(), this.settings = t, this.context = i, this.userNavigation$ = n, this.viewportController = o, this.scrollNavigationController = s, this.navigationResolver = r, this.spine = a, this.isUserLocked$ = c, this.navigationSubject = new U({
4064
4047
  animation: !1,
@@ -4081,22 +4064,22 @@ class Vo extends X {
4081
4064
  ), this.locker = new _e();
4082
4065
  const u = n.pipe(
4083
4066
  A(this.navigationSubject),
4084
- $o,
4067
+ vo,
4085
4068
  /**
4086
4069
  * Url lookup is heavier so we start with it to fill
4087
4070
  * as much information as needed to reduce later lookup
4088
4071
  */
4089
- Co({
4072
+ Lo({
4090
4073
  navigationResolver: r
4091
4074
  }),
4092
4075
  /**
4093
4076
  * Cfi lookup is heavier so we start with it to fill
4094
4077
  * as much information as needed to reduce later lookup
4095
4078
  */
4096
- To({
4079
+ xo({
4097
4080
  navigationResolver: r
4098
4081
  }),
4099
- Lo({ context: i, settings: t }),
4082
+ To({ context: i, settings: t }),
4100
4083
  he({
4101
4084
  navigationResolver: r,
4102
4085
  settings: t,
@@ -4113,7 +4096,7 @@ class Vo extends X {
4113
4096
  spine: a
4114
4097
  })
4115
4098
  ).pipe(
4116
- Mo({
4099
+ Fo({
4117
4100
  navigationResolver: r,
4118
4101
  spineItemsManager: a.spineItemsManager
4119
4102
  }),
@@ -4229,7 +4212,7 @@ class Vo extends X {
4229
4212
  }),
4230
4213
  S(({ navigation: f }) => f),
4231
4214
  V()
4232
- ), h = xo(
4215
+ ), h = Po(
4233
4216
  i,
4234
4217
  this.navigationSubject,
4235
4218
  a
@@ -4239,7 +4222,7 @@ class Vo extends X {
4239
4222
  h
4240
4223
  ), m = (f) => f.pipe(
4241
4224
  $(([b, I]) => {
4242
- Oo.info(
4225
+ Do.info(
4243
4226
  `navigation updated from ${b.meta.triggeredBy} of type ${b.type}`,
4244
4227
  {
4245
4228
  previousNavigation: I,
@@ -4303,8 +4286,8 @@ const Xe = ({
4303
4286
  scrollOffset: t
4304
4287
  })
4305
4288
  });
4306
- }, jo = 500;
4307
- class ko extends X {
4289
+ }, Oo = 500;
4290
+ class Vo extends X {
4308
4291
  constructor(t, i, n, o, s) {
4309
4292
  super(), this.settings = t, this.context = i, this.spine = n, this.scrollNavigationController = o, this.locker = s, this.navigationSubject = new W(), this.navigation$ = this.navigationSubject.asObservable();
4310
4293
  const r = this.scrollNavigationController.userScroll$.pipe(
@@ -4315,7 +4298,7 @@ class ko extends X {
4315
4298
  w(a)
4316
4299
  ).pipe(
4317
4300
  St(
4318
- jo,
4301
+ Oo,
4319
4302
  rt
4320
4303
  ),
4321
4304
  z(),
@@ -4343,17 +4326,17 @@ class ko extends X {
4343
4326
  v(r).pipe(T(this.destroy$)).subscribe();
4344
4327
  }
4345
4328
  }
4346
- const Wo = (e) => ({
4329
+ const jo = (e) => ({
4347
4330
  x: -e.x,
4348
4331
  y: -e.y
4349
- }), Uo = (e) => e instanceof DOMMatrix ? new L({
4332
+ }), ko = (e) => e instanceof DOMMatrix ? new L({
4350
4333
  x: -e.e,
4351
4334
  y: -e.f
4352
4335
  }) : new L({
4353
4336
  x: -e.x,
4354
4337
  y: -e.y
4355
- }), zo = "navigation/ViewportNavigator", ye = O.namespace(zo);
4356
- class Ho extends X {
4338
+ }), Wo = "navigation/ViewportNavigator", ye = O.namespace(Wo);
4339
+ class Uo extends X {
4357
4340
  constructor(t, i, n, o, s) {
4358
4341
  super(), this.settings = t, this.hookManager = i, this.context = n, this.spine = o, this.viewport = s, this.navigateSubject = new W(), this.element$ = new U(
4359
4342
  document.createElement("div")
@@ -4465,7 +4448,7 @@ class Ho extends X {
4465
4448
  * for remark about flicker / fonts smoothing
4466
4449
  */
4467
4450
  setViewportPosition(t) {
4468
- const i = this.element$.getValue(), n = Wo(t);
4451
+ const i = this.element$.getValue(), n = jo(t);
4469
4452
  i.style.transform = `translate(${n.x}px, ${n.y}px)`, this.hookManager.execute("onViewportOffsetAdjust", void 0, {});
4470
4453
  }
4471
4454
  navigate(t) {
@@ -4480,10 +4463,10 @@ class Ho extends X {
4480
4463
  if (!n || n === "none")
4481
4464
  return new L({ x: 0, y: 0 });
4482
4465
  const o = new DOMMatrix(n);
4483
- return Uo(o);
4466
+ return ko(o);
4484
4467
  }
4485
4468
  }
4486
- class Bo extends pt {
4469
+ class zo extends pt {
4487
4470
  constructor(t, i, n, o, s) {
4488
4471
  super({
4489
4472
  element: void 0
@@ -4599,7 +4582,7 @@ const Ft = (e, t, i) => {
4599
4582
  }, Se = (e, t, i) => {
4600
4583
  const n = [...Array(i)].map((o, s) => s * t);
4601
4584
  return e <= 0 || i === 0 ? 0 : e >= i * t ? i - 1 : n.findIndex((o) => e < o + t) ?? 0;
4602
- }, Eo = ({
4585
+ }, Ho = ({
4603
4586
  itemWidth: e,
4604
4587
  itemHeight: t,
4605
4588
  spineItemPosition: i
@@ -4625,7 +4608,7 @@ const Ft = (e, t, i) => {
4625
4608
  pageTurnMode: a,
4626
4609
  isRTL: c
4627
4610
  }) => {
4628
- const d = Eo({
4611
+ const d = Ho({
4629
4612
  spineItemPosition: i,
4630
4613
  itemHeight: t,
4631
4614
  itemWidth: e
@@ -4642,7 +4625,7 @@ const Ft = (e, t, i) => {
4642
4625
  return Se(i.y, s, g);
4643
4626
  const l = Se(d, o, g);
4644
4627
  return c ? g - 1 - l : l;
4645
- }, _o = ({
4628
+ }, Bo = ({
4646
4629
  pageIndex: e,
4647
4630
  itemLayout: t,
4648
4631
  context: i,
@@ -4699,7 +4682,7 @@ const Ft = (e, t, i) => {
4699
4682
  getSpineItemPositionFromPageIndex: ({
4700
4683
  pageIndex: r,
4701
4684
  spineItem: a
4702
- }) => _o({
4685
+ }) => Bo({
4703
4686
  context: e,
4704
4687
  isUsingVerticalWriting: !!a.isUsingVerticalWriting(),
4705
4688
  itemLayout: a.layout.layoutInfo,
@@ -4769,7 +4752,7 @@ const Ft = (e, t, i) => {
4769
4752
  });
4770
4753
  }
4771
4754
  };
4772
- }, Xo = ({
4755
+ }, Eo = ({
4773
4756
  context: e,
4774
4757
  settings: t
4775
4758
  }) => {
@@ -4847,7 +4830,7 @@ const Ft = (e, t, i) => {
4847
4830
  });
4848
4831
  }
4849
4832
  return new L({ x: 0, y: 0 });
4850
- }, Yo = ({
4833
+ }, _o = ({
4851
4834
  pageIndex: e,
4852
4835
  spineItemsManager: t,
4853
4836
  spineItemId: i,
@@ -4877,7 +4860,7 @@ const Ft = (e, t, i) => {
4877
4860
  pageSizeWidth: n.getPageSize().width,
4878
4861
  visibleAreaRectWidth: n.state.visibleAreaRect.width
4879
4862
  });
4880
- }, qo = ({
4863
+ }, Xo = ({
4881
4864
  anchor: e,
4882
4865
  spineItem: t,
4883
4866
  context: i
@@ -4889,13 +4872,13 @@ const Ft = (e, t, i) => {
4889
4872
  o,
4890
4873
  n
4891
4874
  );
4892
- }, Zo = ({
4875
+ }, Yo = ({
4893
4876
  anchor: e,
4894
4877
  context: t,
4895
4878
  spineItem: i,
4896
4879
  spineLocator: n
4897
4880
  }) => {
4898
- const o = qo({
4881
+ const o = Xo({
4899
4882
  anchor: e,
4900
4883
  spineItem: i,
4901
4884
  context: t
@@ -4904,7 +4887,7 @@ const Ft = (e, t, i) => {
4904
4887
  spineItemPosition: new R({ x: o, y: 0 }),
4905
4888
  spineItem: i
4906
4889
  });
4907
- }, Go = ({
4890
+ }, qo = ({
4908
4891
  anchor: e,
4909
4892
  spineItem: t,
4910
4893
  spineLocator: i,
@@ -4912,7 +4895,7 @@ const Ft = (e, t, i) => {
4912
4895
  pageSizeWidth: o,
4913
4896
  visibleAreaRectWidth: s
4914
4897
  }) => {
4915
- const r = Zo({
4898
+ const r = Yo({
4916
4899
  anchor: e,
4917
4900
  context: n,
4918
4901
  spineItem: t,
@@ -4923,7 +4906,7 @@ const Ft = (e, t, i) => {
4923
4906
  pageSizeWidth: o,
4924
4907
  visibleAreaRectWidth: s
4925
4908
  });
4926
- }, Jo = ({
4909
+ }, Zo = ({
4927
4910
  context: e,
4928
4911
  spineItemsManager: t,
4929
4912
  spineLocator: i,
@@ -4939,7 +4922,7 @@ const Ft = (e, t, i) => {
4939
4922
  if (u) {
4940
4923
  const d = t.get(u.id);
4941
4924
  if (d) {
4942
- const g = Go({
4925
+ const g = qo({
4943
4926
  anchor: a.hash,
4944
4927
  spineItem: d,
4945
4928
  context: e,
@@ -4962,7 +4945,7 @@ const Ft = (e, t, i) => {
4962
4945
  console.error(a);
4963
4946
  return;
4964
4947
  }
4965
- }, Ko = ({
4948
+ }, Go = ({
4966
4949
  spineItem: e,
4967
4950
  spineItemPosition: t,
4968
4951
  spineLocator: i,
@@ -4981,16 +4964,16 @@ const Ft = (e, t, i) => {
4981
4964
  pageSizeWidth: o.getPageSize().width,
4982
4965
  visibleAreaRectWidth: o.state.visibleAreaRect.width
4983
4966
  });
4984
- }, Qo = "spineNavigator", ts = ({
4967
+ }, Jo = "spineNavigator", Ko = ({
4985
4968
  context: e,
4986
4969
  spineItemsManager: t,
4987
4970
  locator: i,
4988
4971
  settings: n,
4989
4972
  spine: o
4990
4973
  }) => {
4991
- const s = Xo({ context: e, settings: n });
4974
+ const s = Eo({ context: e, settings: n });
4992
4975
  return {
4993
- getNavigationForUrl: (l) => Jo({
4976
+ getNavigationForUrl: (l) => Zo({
4994
4977
  context: e,
4995
4978
  spineItemsManager: t,
4996
4979
  spineLocator: i,
@@ -4998,14 +4981,14 @@ const Ft = (e, t, i) => {
4998
4981
  pageSizeWidth: e.getPageSize().width,
4999
4982
  visibleAreaRectWidth: e.state.visibleAreaRect.width
5000
4983
  }),
5001
- getNavigationForSpineItemPage: (l) => Yo({
4984
+ getNavigationForSpineItemPage: (l) => _o({
5002
4985
  ...l,
5003
4986
  context: e,
5004
4987
  spineItemsManager: t,
5005
4988
  spineItemNavigationResolver: s,
5006
4989
  spineLocator: i
5007
4990
  }),
5008
- getNavigationFromSpineItemPosition: (l) => Ko({
4991
+ getNavigationFromSpineItemPosition: (l) => Go({
5009
4992
  ...l,
5010
4993
  spineItemLocator: i.spineItemLocator,
5011
4994
  spineLocator: i,
@@ -5017,7 +5000,7 @@ const Ft = (e, t, i) => {
5017
5000
  spineItemsManager: t
5018
5001
  }) || {};
5019
5002
  if (!h) {
5020
- O.warn(Qo, `unable to detect item id from cfi ${l}`);
5003
+ O.warn(Jo, `unable to detect item id from cfi ${l}`);
5021
5004
  return;
5022
5005
  }
5023
5006
  const y = p ? s.getNavigationFromNode(h, p, m) : new R({ x: 0, y: 0 }), f = i.getSpinePositionFromSpineItemPosition({
@@ -5095,7 +5078,7 @@ const Ft = (e, t, i) => {
5095
5078
  }),
5096
5079
  spineItemNavigator: s
5097
5080
  };
5098
- }, es = ({
5081
+ }, Qo = ({
5099
5082
  spineItemsManager: e,
5100
5083
  context: t,
5101
5084
  hookManager: i,
@@ -5103,25 +5086,25 @@ const Ft = (e, t, i) => {
5103
5086
  settings: o,
5104
5087
  viewport: s
5105
5088
  }) => {
5106
- const r = new W(), a = new _e(), c = ts({
5089
+ const r = new W(), a = new _e(), c = Ko({
5107
5090
  context: t,
5108
5091
  settings: o,
5109
5092
  spineItemsManager: e,
5110
5093
  locator: n.locator,
5111
5094
  spine: n
5112
- }), u = new Ho(
5095
+ }), u = new Uo(
5113
5096
  o,
5114
5097
  i,
5115
5098
  t,
5116
5099
  n,
5117
5100
  s
5118
- ), d = new Bo(
5101
+ ), d = new zo(
5119
5102
  s,
5120
5103
  o,
5121
5104
  i,
5122
5105
  n,
5123
5106
  t
5124
- ), g = new ko(
5107
+ ), g = new Vo(
5125
5108
  o,
5126
5109
  t,
5127
5110
  n,
@@ -5130,7 +5113,7 @@ const Ft = (e, t, i) => {
5130
5113
  ), l = v(
5131
5114
  r,
5132
5115
  g.navigation$
5133
- ), h = new Vo(
5116
+ ), h = new No(
5134
5117
  o,
5135
5118
  t,
5136
5119
  l,
@@ -5169,7 +5152,7 @@ const Ft = (e, t, i) => {
5169
5152
  navigation$: h.navigation$
5170
5153
  };
5171
5154
  };
5172
- class is extends pt {
5155
+ class ts extends pt {
5173
5156
  constructor(t, i) {
5174
5157
  super({
5175
5158
  beginPageIndexInSpineItem: void 0,
@@ -5187,7 +5170,7 @@ class is extends pt {
5187
5170
  this.mergeCompare(t);
5188
5171
  }
5189
5172
  }
5190
- class ns extends X {
5173
+ class es extends X {
5191
5174
  constructor(t, i, n, o, s) {
5192
5175
  super(), this.context = t, this.pagination = i, this.spineItemsManager = n, this.spine = o, this.spineItemLocator = s;
5193
5176
  const r = v(
@@ -5265,7 +5248,7 @@ class ns extends X {
5265
5248
  v(r, a).pipe(T(this.destroy$)).subscribe();
5266
5249
  }
5267
5250
  }
5268
- class os extends X {
5251
+ class is extends X {
5269
5252
  constructor(t) {
5270
5253
  super();
5271
5254
  const i = {
@@ -5310,7 +5293,7 @@ class os extends X {
5310
5293
  super.destroy(), this.outputSettingsUpdateSubject.complete();
5311
5294
  }
5312
5295
  }
5313
- class ss extends os {
5296
+ class ns extends is {
5314
5297
  constructor(t, i) {
5315
5298
  super(t), this.context = i;
5316
5299
  const n = B([
@@ -5355,7 +5338,7 @@ class ss extends os {
5355
5338
  };
5356
5339
  }
5357
5340
  }
5358
- class rs extends X {
5341
+ class os extends X {
5359
5342
  constructor(t, i, n, o, s, r) {
5360
5343
  super(), this.item = t, this.containerElement = i, this.context = n, this.hookManager = o, this.renderer = s, this.settings = r, this.layoutTriggerSubject = new W(), this.lastLayout = null, this.applyDimsAfterLayout = ({
5361
5344
  blankPagePosition: a,
@@ -5441,7 +5424,7 @@ class rs extends X {
5441
5424
  };
5442
5425
  }
5443
5426
  }
5444
- class as extends mt {
5427
+ class ss extends mt {
5445
5428
  onUnload() {
5446
5429
  return Q;
5447
5430
  }
@@ -5477,7 +5460,7 @@ class Ze extends X {
5477
5460
  }, this.isUsingVerticalWriting = () => {
5478
5461
  var g;
5479
5462
  return !!((g = this.renderer.writingMode) != null && g.startsWith("vertical"));
5480
- }, this.containerElement = cs(
5463
+ }, this.containerElement = rs(
5481
5464
  i,
5482
5465
  t,
5483
5466
  s
@@ -5492,7 +5475,7 @@ class Ze extends X {
5492
5475
  containerElement: this.containerElement,
5493
5476
  resourcesHandler: this.resourcesHandler
5494
5477
  };
5495
- this.renderer = a ? a(c) : new as(c), this.layout = new rs(
5478
+ this.renderer = a ? a(c) : new ss(c), this.layout = new os(
5496
5479
  t,
5497
5480
  this.containerElement,
5498
5481
  n,
@@ -5566,16 +5549,16 @@ class Ze extends X {
5566
5549
  });
5567
5550
  }
5568
5551
  }
5569
- const cs = (e, t, i) => {
5552
+ const rs = (e, t, i) => {
5570
5553
  const n = e.ownerDocument.createElement("div");
5571
5554
  return n.classList.add("spineItem"), n.classList.add(`spineItem-${t.renditionLayout ?? "reflowable"}`), n.style.cssText = `
5572
5555
  position: absolute;
5573
5556
  overflow: hidden;
5574
5557
  `, n.dataset.isReady = "false", i.execute("item.onBeforeContainerCreated", void 0, { element: n }), n;
5575
- }, us = O.namespace("spine"), ds = ({
5558
+ }, as = O.namespace("spine"), cs = ({
5576
5559
  position: e,
5577
5560
  pageSize: t
5578
- }) => new yn({
5561
+ }) => new mn({
5579
5562
  ...e,
5580
5563
  left: e.x,
5581
5564
  top: e.y,
@@ -5584,7 +5567,7 @@ const cs = (e, t, i) => {
5584
5567
  bottom: e.y + t.height,
5585
5568
  right: e.x + t.width
5586
5569
  });
5587
- class gs extends pt {
5570
+ class us extends pt {
5588
5571
  constructor(t, i, n, o, s, r) {
5589
5572
  super({ pages: [] }), this.spineLayout = t, this.spineItemsManager = i, this.spineItemLocator = n, this.context = o, this.locator = s, this.viewport = r, this.fromSpineItemPageIndex = (a, c) => this.value.pages.find(
5590
5573
  (u) => u.itemIndex === a.index && u.pageIndex === c
@@ -5602,11 +5585,11 @@ class gs extends pt {
5602
5585
  spineItemPosition: f
5603
5586
  });
5604
5587
  return {
5605
- absoluteLayout: ds({
5588
+ absoluteLayout: cs({
5606
5589
  pageSize: a,
5607
5590
  position: b
5608
5591
  }),
5609
- layout: new fn({
5592
+ layout: new hn({
5610
5593
  left: f.x,
5611
5594
  right: f.x + a.width,
5612
5595
  top: f.y,
@@ -5642,12 +5625,12 @@ class gs extends pt {
5642
5625
  })
5643
5626
  );
5644
5627
  }),
5645
- S((a) => (us.info("Pages layout", a), { pages: a })),
5628
+ S((a) => (as.info("Pages layout", a), { pages: a })),
5646
5629
  V()
5647
5630
  ), this.layout$.pipe(T(this.destroy$)).subscribe(this.next.bind(this));
5648
5631
  }
5649
5632
  }
5650
- class ls extends X {
5633
+ class ds extends X {
5651
5634
  constructor(t, i) {
5652
5635
  super(), this.spineItemsManager = t, this.spineLocator = i, this.itemIsReady$ = this.spineItemsManager.items$.pipe(
5653
5636
  P((n) => {
@@ -5677,7 +5660,7 @@ class ls extends X {
5677
5660
  );
5678
5661
  }
5679
5662
  }
5680
- const ps = ({
5663
+ const gs = ({
5681
5664
  horizontalOffset: e,
5682
5665
  verticalOffset: t,
5683
5666
  context: i,
@@ -5747,7 +5730,7 @@ const ps = ({
5747
5730
  })
5748
5731
  );
5749
5732
  };
5750
- class hs extends X {
5733
+ class ls extends X {
5751
5734
  constructor(t, i, n, o) {
5752
5735
  super(), this.spineItemsManager = t, this.context = i, this.settings = n, this.viewport = o, this.layoutSubject = new W(), this.spineItemsRelativeLayouts = [], t.items$.pipe(
5753
5736
  $(() => {
@@ -5791,7 +5774,7 @@ class hs extends X {
5791
5774
  ai(
5792
5775
  (u, d, g) => u.pipe(
5793
5776
  oe(
5794
- ({ horizontalOffset: l, verticalOffset: h }) => ps({
5777
+ ({ horizontalOffset: l, verticalOffset: h }) => gs({
5795
5778
  context: this.context,
5796
5779
  horizontalOffset: l,
5797
5780
  index: g,
@@ -5849,7 +5832,7 @@ class hs extends X {
5849
5832
  super.destroy(), this.layoutSubject.complete();
5850
5833
  }
5851
5834
  }
5852
- class ms extends X {
5835
+ class ps extends X {
5853
5836
  constructor(t, i, n, o, s) {
5854
5837
  super(), this.context = t, this.spineItemsManager = i, this.spineLocator = n, this.settings = o, this.spineLayout = s, this.forcedOpenSubject = new U([]);
5855
5838
  const r = this.forcedOpenSubject.pipe(
@@ -5925,17 +5908,17 @@ class yt extends DOMRect {
5925
5908
  return new yt(n.x, n.y, n.width, n.height);
5926
5909
  }
5927
5910
  }
5928
- class fs {
5911
+ class hs {
5929
5912
  constructor({ width: t, height: i }) {
5930
5913
  this.__symbol = Symbol("AbsoluteViewport"), this.width = t, this.height = i;
5931
5914
  }
5932
5915
  }
5933
- class ys {
5916
+ class ms {
5934
5917
  constructor({ width: t, height: i }) {
5935
5918
  this.__symbol = Symbol("RelativeViewport"), this.width = t, this.height = i;
5936
5919
  }
5937
5920
  }
5938
- const Ss = ({
5921
+ const fs = ({
5939
5922
  pageIndex: e,
5940
5923
  spineItemOrId: t,
5941
5924
  spineItemsManager: i
@@ -5957,7 +5940,7 @@ const Ss = ({
5957
5940
  { currentAbsolutePage: 0, found: !1 }
5958
5941
  );
5959
5942
  return s;
5960
- }, bs = ({
5943
+ }, ys = ({
5961
5944
  itemHeight: e,
5962
5945
  itemWidth: t,
5963
5946
  visibleWidthOfItem: i,
@@ -5966,7 +5949,7 @@ const Ss = ({
5966
5949
  }) => {
5967
5950
  const s = i / t, r = n / e;
5968
5951
  return o.type === "percentage" ? s >= o.value && r >= o.value : i >= o.value && n >= o.value;
5969
- }, Is = ({
5952
+ }, Ss = ({
5970
5953
  visibleWidthOfItem: e,
5971
5954
  visibleHeightOfItem: t,
5972
5955
  threshold: i,
@@ -5998,14 +5981,14 @@ const Ss = ({
5998
5981
  Math.min(e, l) - Math.max(n, g)
5999
5982
  );
6000
5983
  if (h <= 0 || p <= 0) return { visible: !1 };
6001
- const y = Is({
5984
+ const y = Ss({
6002
5985
  threshold: r,
6003
5986
  visibleHeightOfItem: p,
6004
5987
  visibleWidthOfItem: h,
6005
5988
  viewportPosition: a
6006
5989
  });
6007
5990
  return c ? { visible: y } : {
6008
- visible: bs({
5991
+ visible: ys({
6009
5992
  itemHeight: s,
6010
5993
  itemWidth: o,
6011
5994
  threshold: r,
@@ -6013,7 +5996,7 @@ const Ss = ({
6013
5996
  visibleWidthOfItem: h
6014
5997
  }) || y
6015
5998
  };
6016
- }, ws = ({
5999
+ }, bs = ({
6017
6000
  absolutePageIndex: e,
6018
6001
  spineItemsManager: t
6019
6002
  }) => {
@@ -6055,7 +6038,7 @@ const Ss = ({
6055
6038
  }) => new L({
6056
6039
  x: t + e.x,
6057
6040
  y: i + e.y
6058
- }), Ps = ({
6041
+ }), Is = ({
6059
6042
  position: e,
6060
6043
  threshold: t,
6061
6044
  restrictToScreen: i,
@@ -6093,7 +6076,7 @@ const Ss = ({
6093
6076
  beginIndex: g ?? 0,
6094
6077
  endIndex: l ?? 0
6095
6078
  };
6096
- }, vs = ({
6079
+ }, ws = ({
6097
6080
  spineItemsManager: e,
6098
6081
  context: t,
6099
6082
  spineItemLocator: i,
@@ -6197,11 +6180,11 @@ const Ss = ({
6197
6180
  /**
6198
6181
  * @deprecated use Pages
6199
6182
  */
6200
- _getAbsolutePageIndexFromPageIndex: (p) => Ss({
6183
+ _getAbsolutePageIndexFromPageIndex: (p) => fs({
6201
6184
  ...p,
6202
6185
  spineItemsManager: e
6203
6186
  }),
6204
- getSpineInfoFromAbsolutePageIndex: (p) => ws({
6187
+ getSpineInfoFromAbsolutePageIndex: (p) => bs({
6205
6188
  ...p,
6206
6189
  spineItemsManager: e
6207
6190
  }),
@@ -6242,7 +6225,7 @@ const Ss = ({
6242
6225
  }),
6243
6226
  getSpineItemFromIframe: c,
6244
6227
  getSpineItemPageIndexFromNode: u,
6245
- getVisibleSpineItemsFromPosition: (p) => Ps({
6228
+ getVisibleSpineItemsFromPosition: (p) => Is({
6246
6229
  spineItemsManager: e,
6247
6230
  spineLayout: o,
6248
6231
  viewport: s,
@@ -6266,32 +6249,32 @@ const Ss = ({
6266
6249
  }
6267
6250
  };
6268
6251
  };
6269
- class xs extends X {
6252
+ class Ps extends X {
6270
6253
  constructor(t, i, n, o, s, r, a, c) {
6271
6254
  super(), this.parentElement$ = t, this.context = i, this.pagination = n, this.spineItemsManager = o, this.spineItemLocator = s, this.settings = r, this.hookManager = a, this.viewport = c, this.elementSubject = new U(
6272
6255
  void 0
6273
- ), this.element$ = this.elementSubject.asObservable(), this.spineLayout = new hs(
6256
+ ), this.element$ = this.elementSubject.asObservable(), this.spineLayout = new ls(
6274
6257
  o,
6275
6258
  i,
6276
6259
  r,
6277
6260
  c
6278
- ), this.locator = vs({
6261
+ ), this.locator = ws({
6279
6262
  context: i,
6280
6263
  spineItemsManager: o,
6281
6264
  spineItemLocator: s,
6282
6265
  settings: r,
6283
6266
  spineLayout: this.spineLayout,
6284
6267
  viewport: c
6285
- }), this.spineItemsLoader = new ms(
6268
+ }), this.spineItemsLoader = new ps(
6286
6269
  this.context,
6287
6270
  o,
6288
6271
  this.locator,
6289
6272
  r,
6290
6273
  this.spineLayout
6291
- ), this.spineItemsObserver = new ls(
6274
+ ), this.spineItemsObserver = new ds(
6292
6275
  o,
6293
6276
  this.locator
6294
- ), this.pages = new gs(
6277
+ ), this.pages = new us(
6295
6278
  this.spineLayout,
6296
6279
  this.spineItemsManager,
6297
6280
  this.spineItemLocator,
@@ -6347,7 +6330,7 @@ class xs extends X {
6347
6330
  super.destroy(), this.pages.destroy(), this.spineItemsLoader.destroy(), (t = this.elementSubject.getValue()) == null || t.remove(), this.elementSubject.complete();
6348
6331
  }
6349
6332
  }
6350
- class $s extends X {
6333
+ class vs extends X {
6351
6334
  constructor(t, i) {
6352
6335
  super(), this.context = t, this.settings = i, this.orderedSpineItemsSubject = new U([]), this.items$ = this.orderedSpineItemsSubject.asObservable();
6353
6336
  }
@@ -6388,7 +6371,7 @@ class $s extends X {
6388
6371
  this.orderedSpineItemsSubject.value.forEach((t) => t.destroy());
6389
6372
  }
6390
6373
  }
6391
- class Ts extends pt {
6374
+ class xs extends pt {
6392
6375
  constructor(t) {
6393
6376
  const i = document.createElement("div");
6394
6377
  i.style.cssText = `
@@ -6422,7 +6405,7 @@ class Ts extends pt {
6422
6405
  }
6423
6406
  get absoluteViewport() {
6424
6407
  const t = this.context.state.visibleAreaRect;
6425
- return new fs({
6408
+ return new hs({
6426
6409
  width: t.width,
6427
6410
  height: t.height
6428
6411
  });
@@ -6443,17 +6426,17 @@ class Ts extends pt {
6443
6426
  */
6444
6427
  get relativeViewport() {
6445
6428
  const t = this.absoluteViewport, i = this.value.element.getBoundingClientRect(), n = ((i == null ? void 0 : i.width) ?? t.width) / t.width;
6446
- return new ys({
6429
+ return new ms({
6447
6430
  width: t.width / n,
6448
6431
  height: t.height / n
6449
6432
  });
6450
6433
  }
6451
6434
  }
6452
- const Fs = (e) => {
6453
- const t = new W(), i = new Po(), n = new Io(), o = new ss(e, n), s = new wo(n, o), r = new $s(n, o), a = new Ts(n), c = n.watch("rootElement"), u = qe({
6435
+ const $s = (e) => {
6436
+ const t = new W(), i = new Io(), n = new So(), o = new ns(e, n), s = new bo(n, o), r = new vs(n, o), a = new xs(n), c = n.watch("rootElement"), u = qe({
6454
6437
  context: n,
6455
6438
  settings: o
6456
- }), d = new is(n, r), g = new xs(
6439
+ }), d = new ts(n, r), g = new Ps(
6457
6440
  c,
6458
6441
  n,
6459
6442
  d,
@@ -6462,14 +6445,14 @@ const Fs = (e) => {
6462
6445
  o,
6463
6446
  i,
6464
6447
  a
6465
- ), l = es({
6448
+ ), l = Qo({
6466
6449
  context: n,
6467
6450
  spineItemsManager: r,
6468
6451
  hookManager: i,
6469
6452
  spine: g,
6470
6453
  settings: o,
6471
6454
  viewport: a
6472
- }), h = new ns(
6455
+ }), h = new es(
6473
6456
  n,
6474
6457
  d,
6475
6458
  r,
@@ -6503,7 +6486,7 @@ const Fs = (e) => {
6503
6486
  return;
6504
6487
  }
6505
6488
  O.log("load", { options: f });
6506
- const x = Ls(b);
6489
+ const x = Ts(b);
6507
6490
  n.update({
6508
6491
  manifest: I,
6509
6492
  rootElement: x,
@@ -6517,7 +6500,7 @@ const Fs = (e) => {
6517
6500
  spine: g,
6518
6501
  hookManager: i,
6519
6502
  cfi: {
6520
- generateCfiFromRange: zn,
6503
+ generateCfiFromRange: Wn,
6521
6504
  parseCfi: ee,
6522
6505
  generateCfiForSpineItemPage: (f) => Bt({
6523
6506
  ...f,
@@ -6558,31 +6541,31 @@ const Fs = (e) => {
6558
6541
  destroy$: t
6559
6542
  }
6560
6543
  };
6561
- }, Ls = (e) => (e.style.cssText = `
6544
+ }, Ts = (e) => (e.style.cssText = `
6562
6545
  ${e.style.cssText}
6563
6546
  background-color: white;
6564
6547
  position: relative;
6565
- `, e.classList.add(`${lt}-reader`), e), ks = (
6548
+ `, e.classList.add(`${lt}-reader`), e), Vs = (
6566
6549
  //__
6567
- go(
6568
- Xi(
6569
- Ln(
6570
- ho(
6571
- _i(
6550
+ co(
6551
+ _i(
6552
+ Tn(
6553
+ lo(
6554
+ Ei(
6572
6555
  $i(
6573
- so(
6574
- po(
6575
- yo(
6576
- Un(
6577
- hn(
6578
- Cn(
6556
+ no(
6557
+ go(
6558
+ mo(
6559
+ kn(
6560
+ ln(
6561
+ Ln(
6579
6562
  Ti(
6580
- lo(
6581
- io(
6582
- xn(
6563
+ uo(
6564
+ to(
6565
+ Pn(
6583
6566
  zi(
6584
6567
  // __
6585
- Fs
6568
+ $s
6586
6569
  )
6587
6570
  )
6588
6571
  )
@@ -6600,65 +6583,65 @@ const Fs = (e) => {
6600
6583
  )
6601
6584
  )
6602
6585
  )
6603
- ), Ws = (e) => (t) => e(t);
6586
+ ), js = (e) => (t) => e(t);
6604
6587
  export {
6605
6588
  ke as AbstractSpinePosition,
6606
- Io as Context,
6607
- Ho as ControlledNavigationController,
6589
+ So as Context,
6590
+ Uo as ControlledNavigationController,
6608
6591
  X as DestroyableClass,
6609
6592
  mt as DocumentRenderer,
6610
- wo as Features,
6611
- Po as HookManager,
6612
- Vo as InternalNavigator,
6593
+ bo as Features,
6594
+ Io as HookManager,
6595
+ No as InternalNavigator,
6613
6596
  te as LayoutEntry,
6614
6597
  _e as Locker,
6615
- gs as Pages,
6616
- is as Pagination,
6617
- ns as PaginationController,
6598
+ us as Pages,
6599
+ ts as Pagination,
6600
+ es as PaginationController,
6618
6601
  Qt as ResourceHandler,
6619
- _n as ResourcesLocator,
6620
- Bo as ScrollNavigationController,
6621
- os as SettingsManager,
6622
- xs as Spine,
6602
+ Bn as ResourcesLocator,
6603
+ zo as ScrollNavigationController,
6604
+ is as SettingsManager,
6605
+ Ps as Spine,
6623
6606
  Ze as SpineItem,
6624
- fn as SpineItemPageLayout,
6625
- yn as SpineItemPageSpineLayout,
6607
+ hn as SpineItemPageLayout,
6608
+ mn as SpineItemPageSpineLayout,
6626
6609
  R as SpineItemPosition,
6627
6610
  Ht as SpineItemSpineLayout,
6628
- $s as SpineItemsManager,
6629
- ls as SpineItemsObserver,
6611
+ vs as SpineItemsManager,
6612
+ ds as SpineItemsObserver,
6630
6613
  L as SpinePosition,
6631
6614
  Nt as UnsafeSpineItemPagePosition,
6632
6615
  Rt as UnsafeSpinePosition,
6633
- Ts as Viewport,
6634
- En as consolidate,
6635
- ks as createReader,
6616
+ xs as Viewport,
6617
+ Hn as consolidate,
6618
+ Vs as createReader,
6636
6619
  ae as deferIdle,
6637
6620
  Hi as deferNextResult,
6638
6621
  Bt as generateCfiForSpineItemPage,
6639
- zn as generateCfiFromRange,
6622
+ Wn as generateCfiFromRange,
6640
6623
  ft as generateRootCfi,
6641
6624
  re as getAttributeValueFromString,
6642
6625
  Zt as getFrameViewportInfo,
6643
- js as getItemAnchor,
6644
- hn as htmlEnhancer,
6626
+ Os as getItemAnchor,
6627
+ ln as htmlEnhancer,
6645
6628
  De as idle,
6646
6629
  wi as injectCSS,
6647
6630
  Re as isHtmlElement,
6648
6631
  Vi as isHtmlTagElement,
6649
6632
  Et as isRootCfi,
6650
- Hs as isShallowEqual,
6651
- xn as layoutEnhancer,
6633
+ Us as isShallowEqual,
6634
+ Pn as layoutEnhancer,
6652
6635
  Ae as mapKeysTo,
6653
- Ns as observeIntersection,
6636
+ As as observeIntersection,
6654
6637
  ce as observeMutation,
6655
6638
  Kt as observeResize,
6656
- io as paginationEnhancer,
6639
+ to as paginationEnhancer,
6657
6640
  ee as parseCfi,
6658
6641
  Pi as removeCSS,
6659
6642
  ze as resolveCfi,
6660
- Ws as rootEnhancer,
6661
- ds as spinePositionToSpineItemSpineLayout,
6643
+ js as rootEnhancer,
6644
+ cs as spinePositionToSpineItemSpineLayout,
6662
6645
  nt as upsertCSSToFrame,
6663
6646
  vi as waitForFrameLoad,
6664
6647
  xi as waitForFrameReady,