@readium/navigator 2.2.2 → 2.2.4
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 +805 -968
- package/dist/index.umd.cjs +33 -221
- package/package.json +2 -2
- package/src/epub/preferences/EpubPreferencesEditor.ts +24 -3
- package/src/webpub/WebPubBlobBuilder.ts +17 -8
- package/src/webpub/css/Properties.ts +8 -0
- package/src/webpub/css/WebPubCSS.ts +2 -0
- package/src/webpub/css/index.ts +1 -2
- package/src/webpub/preferences/WebPubDefaults.ts +12 -0
- package/src/webpub/preferences/WebPubPreferences.ts +6 -0
- package/src/webpub/preferences/WebPubPreferencesEditor.ts +22 -0
- package/src/webpub/preferences/WebPubSettings.ts +17 -0
- package/types/src/webpub/css/Properties.d.ts +4 -0
- package/types/src/webpub/css/WebPubStylesheet.d.ts +1 -1
- package/types/src/webpub/css/index.d.ts +0 -1
- package/types/src/webpub/preferences/WebPubDefaults.d.ts +4 -0
- package/types/src/webpub/preferences/WebPubPreferences.d.ts +4 -0
- package/types/src/webpub/preferences/WebPubPreferencesEditor.d.ts +2 -0
- package/types/src/webpub/preferences/WebPubSettings.d.ts +4 -0
- package/src/webpub/css/WebPubStylesheet.ts +0 -204
package/dist/index.js
CHANGED
|
@@ -33,7 +33,7 @@ const W = class ot {
|
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
W.VALID_MODES = /* @__PURE__ */ new Set(["auditory", "tactile", "textual", "visual"]), W.AUDITORY = new W("auditory"), W.TACTILE = new W("tactile"), W.TEXTUAL = new W("textual"), W.VISUAL = new W("visual");
|
|
36
|
-
const f = class
|
|
36
|
+
const f = class di {
|
|
37
37
|
constructor(t) {
|
|
38
38
|
this.value = t;
|
|
39
39
|
}
|
|
@@ -42,7 +42,7 @@ const f = class gi {
|
|
|
42
42
|
*/
|
|
43
43
|
static deserialize(t) {
|
|
44
44
|
if (!(!t || typeof t != "string"))
|
|
45
|
-
return new
|
|
45
|
+
return new di(t);
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
48
|
* Serializes a [Feature] to its RWPM JSON representation.
|
|
@@ -52,9 +52,9 @@ const f = class gi {
|
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
54
|
f.NONE = new f("none"), f.ANNOTATIONS = new f("annotations"), f.ARIA = new f("ARIA"), f.INDEX = new f("index"), f.PAGE_BREAK_MARKERS = new f("pageBreakMarkers"), f.PAGE_NAVIGATION = new f("pageNavigation"), f.PRINT_PAGE_NUMBERS = new f("printPageNumbers"), f.READING_ORDER = new f("readingOrder"), f.STRUCTURAL_NAVIGATION = new f("structuralNavigation"), f.TABLE_OF_CONTENTS = new f("tableOfContents"), f.TAGGED_PDF = new f("taggedPDF"), f.ALTERNATIVE_TEXT = new f("alternativeText"), f.AUDIO_DESCRIPTION = new f("audioDescription"), f.CAPTIONS = new f("captions"), f.CLOSED_CAPTIONS = new f("closedCaptions"), f.DESCRIBED_MATH = new f("describedMath"), f.LONG_DESCRIPTION = new f("longDescription"), f.OPEN_CAPTIONS = new f("openCaptions"), f.SIGN_LANGUAGE = new f("signLanguage"), f.TRANSCRIPT = new f("transcript"), f.DISPLAY_TRANSFORMABILITY = new f("displayTransformability"), f.SYNCHRONIZED_AUDIO_TEXT = new f("synchronizedAudioText"), f.TIMING_CONTROL = new f("timingControl"), f.UNLOCKED = new f("unlocked"), f.CHEM_ML = new f("ChemML"), f.LATEX = new f("latex"), f.LATEX_CHEMISTRY = new f("latex-chemistry"), f.MATH_ML = new f("MathML"), f.MATH_ML_CHEMISTRY = new f("MathML-chemistry"), f.TTS_MARKUP = new f("ttsMarkup"), f.HIGH_CONTRAST_AUDIO = new f("highContrastAudio"), f.HIGH_CONTRAST_DISPLAY = new f("highContrastDisplay"), f.LARGE_PRINT = new f("largePrint"), f.BRAILLE = new f("braille"), f.TACTILE_GRAPHIC = new f("tactileGraphic"), f.TACTILE_OBJECT = new f("tactileObject"), f.FULL_RUBY_ANNOTATIONS = new f("fullRubyAnnotations"), f.HORIZONTAL_WRITING = new f("horizontalWriting"), f.RUBY_ANNOTATIONS = new f("rubyAnnotations"), f.VERTICAL_WRITING = new f("verticalWriting"), f.WITH_ADDITIONAL_WORD_SEGMENTATION = new f("withAdditionalWordSegmentation"), f.WITHOUT_ADDITIONAL_WORD_SEGMENTATION = new f("withoutAdditionalWordSegmentation");
|
|
55
|
-
let
|
|
55
|
+
let gi = f;
|
|
56
56
|
var B = /* @__PURE__ */ ((r) => (r.reflowable = "reflowable", r.fixed = "fixed", r.scrolled = "scrolled", r))(B || {});
|
|
57
|
-
class
|
|
57
|
+
class ce {
|
|
58
58
|
/**
|
|
59
59
|
* Creates a [Encryption].
|
|
60
60
|
*/
|
|
@@ -66,7 +66,7 @@ class he {
|
|
|
66
66
|
*/
|
|
67
67
|
static deserialize(t) {
|
|
68
68
|
if (t && t.algorithm)
|
|
69
|
-
return new
|
|
69
|
+
return new ce({
|
|
70
70
|
algorithm: t.algorithm,
|
|
71
71
|
compression: t.compression,
|
|
72
72
|
originalLength: t.originalLength,
|
|
@@ -82,8 +82,8 @@ class he {
|
|
|
82
82
|
return this.compression !== void 0 && (t.compression = this.compression), this.originalLength !== void 0 && (t.originalLength = this.originalLength), this.profile !== void 0 && (t.profile = this.profile), this.scheme !== void 0 && (t.scheme = this.scheme), t;
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
var
|
|
86
|
-
let
|
|
85
|
+
var H = /* @__PURE__ */ ((r) => (r.left = "left", r.right = "right", r.center = "center", r))(H || {});
|
|
86
|
+
let G = class ie {
|
|
87
87
|
constructor(t) {
|
|
88
88
|
this.otherProperties = t;
|
|
89
89
|
}
|
|
@@ -95,7 +95,7 @@ let H = class ee {
|
|
|
95
95
|
*/
|
|
96
96
|
static deserialize(t) {
|
|
97
97
|
if (t)
|
|
98
|
-
return new
|
|
98
|
+
return new ie(t);
|
|
99
99
|
}
|
|
100
100
|
/**
|
|
101
101
|
* Serializes a [Properties] to its RWPM JSON representation.
|
|
@@ -110,12 +110,12 @@ let H = class ee {
|
|
|
110
110
|
const e = Object.assign({}, this.otherProperties);
|
|
111
111
|
for (const i in t)
|
|
112
112
|
e[i] = t[i];
|
|
113
|
-
return new
|
|
113
|
+
return new ie(e);
|
|
114
114
|
}
|
|
115
115
|
};
|
|
116
|
-
Object.defineProperty(
|
|
116
|
+
Object.defineProperty(G.prototype, "encryption", {
|
|
117
117
|
get: function() {
|
|
118
|
-
return
|
|
118
|
+
return ce.deserialize(this.otherProperties.encrypted);
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
121
|
function nA(r) {
|
|
@@ -127,11 +127,11 @@ function ui(r) {
|
|
|
127
127
|
function Ye(r) {
|
|
128
128
|
return typeof r == "string" ? new Date(r) : void 0;
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function Ut(r) {
|
|
131
131
|
return isNaN(r) ? void 0 : r;
|
|
132
132
|
}
|
|
133
|
-
function
|
|
134
|
-
return
|
|
133
|
+
function x(r) {
|
|
134
|
+
return Ut(r) !== void 0 && Math.sign(r) >= 0 ? r : void 0;
|
|
135
135
|
}
|
|
136
136
|
function rA(r) {
|
|
137
137
|
const t = new Array();
|
|
@@ -148,22 +148,22 @@ class u {
|
|
|
148
148
|
} else
|
|
149
149
|
throw new Error("Invalid media type");
|
|
150
150
|
const s = {};
|
|
151
|
-
for (let
|
|
152
|
-
const M = A[
|
|
151
|
+
for (let g = 1; g < A.length; g++) {
|
|
152
|
+
const M = A[g].split("=");
|
|
153
153
|
if (M.length === 2) {
|
|
154
154
|
const l = M[0].toLocaleLowerCase(), p = l === "charset" ? M[1].toUpperCase() : M[1];
|
|
155
155
|
s[l] = p;
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
const o = {}, a = Object.keys(s);
|
|
159
|
-
a.sort((
|
|
159
|
+
a.sort((g, M) => g.localeCompare(M)), a.forEach((g) => o[g] = s[g]);
|
|
160
160
|
let h = "";
|
|
161
|
-
for (const
|
|
162
|
-
const M = o[
|
|
163
|
-
h += `;${
|
|
161
|
+
for (const g in o) {
|
|
162
|
+
const M = o[g];
|
|
163
|
+
h += `;${g}=${M}`;
|
|
164
164
|
}
|
|
165
|
-
const c = `${e}/${i}${h}`,
|
|
166
|
-
this.string = c, this.type = e, this.subtype = i, this.parameters = o, this.encoding =
|
|
165
|
+
const c = `${e}/${i}${h}`, d = o.encoding;
|
|
166
|
+
this.string = c, this.type = e, this.subtype = i, this.parameters = o, this.encoding = d, this.name = t.name, this.fileExtension = t.fileExtension;
|
|
167
167
|
}
|
|
168
168
|
static parse(t) {
|
|
169
169
|
return new u(t);
|
|
@@ -619,7 +619,7 @@ let Ne = class {
|
|
|
619
619
|
}).join("&");
|
|
620
620
|
return this.uri.replace(/\{(\??)([^}]+)\}/g, (...A) => A[1] ? i(A[2]) : e(A[2]));
|
|
621
621
|
}
|
|
622
|
-
},
|
|
622
|
+
}, j = class mi {
|
|
623
623
|
/**
|
|
624
624
|
* Creates a [Locations].
|
|
625
625
|
*/
|
|
@@ -631,7 +631,7 @@ let Ne = class {
|
|
|
631
631
|
*/
|
|
632
632
|
static deserialize(t) {
|
|
633
633
|
if (!t) return;
|
|
634
|
-
const e =
|
|
634
|
+
const e = Ut(t.progression), i = Ut(t.totalProgression), A = Ut(t.position), n = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set([
|
|
635
635
|
"fragment",
|
|
636
636
|
"fragments",
|
|
637
637
|
"progression",
|
|
@@ -680,23 +680,23 @@ let Ne = class {
|
|
|
680
680
|
const t = {};
|
|
681
681
|
return this.after !== void 0 && (t.after = this.after), this.before !== void 0 && (t.before = this.before), this.highlight !== void 0 && (t.highlight = this.highlight), t;
|
|
682
682
|
}
|
|
683
|
-
}, ht = class
|
|
683
|
+
}, ht = class Ae {
|
|
684
684
|
/**
|
|
685
685
|
* Creates a [Locator].
|
|
686
686
|
*/
|
|
687
687
|
constructor(t) {
|
|
688
|
-
this.href = t.href, this.type = t.type, this.title = t.title, this.locations = t.locations ? t.locations : new
|
|
688
|
+
this.href = t.href, this.type = t.type, this.title = t.title, this.locations = t.locations ? t.locations : new j({}), this.text = t.text;
|
|
689
689
|
}
|
|
690
690
|
/**
|
|
691
691
|
* Parses a [Link] from its RWPM JSON representation.
|
|
692
692
|
*/
|
|
693
693
|
static deserialize(t) {
|
|
694
694
|
if (t && t.href && t.type)
|
|
695
|
-
return new
|
|
695
|
+
return new Ae({
|
|
696
696
|
href: t.href,
|
|
697
697
|
type: t.type,
|
|
698
698
|
title: t.title,
|
|
699
|
-
locations:
|
|
699
|
+
locations: j.deserialize(t.locations),
|
|
700
700
|
text: sA.deserialize(t.text)
|
|
701
701
|
});
|
|
702
702
|
}
|
|
@@ -711,15 +711,15 @@ let Ne = class {
|
|
|
711
711
|
* Shortcut to get a copy of the [Locator] with different [Locations] sub-properties.
|
|
712
712
|
*/
|
|
713
713
|
copyWithLocations(t) {
|
|
714
|
-
return new
|
|
714
|
+
return new Ae({
|
|
715
715
|
href: this.href,
|
|
716
716
|
type: this.type,
|
|
717
717
|
title: this.title,
|
|
718
718
|
text: this.text,
|
|
719
|
-
locations: new
|
|
719
|
+
locations: new j({ ...this.locations, ...t })
|
|
720
720
|
});
|
|
721
721
|
}
|
|
722
|
-
}, q = class
|
|
722
|
+
}, q = class Rt {
|
|
723
723
|
/**
|
|
724
724
|
* Creates a [Link].
|
|
725
725
|
*/
|
|
@@ -731,18 +731,18 @@ let Ne = class {
|
|
|
731
731
|
*/
|
|
732
732
|
static deserialize(t) {
|
|
733
733
|
if (!(!t || typeof t.href != "string"))
|
|
734
|
-
return new
|
|
734
|
+
return new Rt({
|
|
735
735
|
href: t.href,
|
|
736
736
|
templated: t.templated,
|
|
737
737
|
type: t.type,
|
|
738
738
|
title: t.title,
|
|
739
739
|
rels: t.rel ? Array.isArray(t.rel) ? new Set(t.rel) : /* @__PURE__ */ new Set([t.rel]) : void 0,
|
|
740
|
-
properties:
|
|
741
|
-
height:
|
|
742
|
-
width:
|
|
743
|
-
size:
|
|
744
|
-
duration:
|
|
745
|
-
bitrate:
|
|
740
|
+
properties: G.deserialize(t.properties),
|
|
741
|
+
height: x(t.height),
|
|
742
|
+
width: x(t.width),
|
|
743
|
+
size: x(t.size),
|
|
744
|
+
duration: x(t.duration),
|
|
745
|
+
bitrate: x(t.bitrate),
|
|
746
746
|
languages: ui(t.language),
|
|
747
747
|
alternates: xe.deserialize(t.alternate),
|
|
748
748
|
children: xe.deserialize(t.children)
|
|
@@ -776,7 +776,7 @@ let Ne = class {
|
|
|
776
776
|
* See RFC 6570 on URI template: https://tools.ietf.org/html/rfc6570
|
|
777
777
|
*/
|
|
778
778
|
expandTemplate(t) {
|
|
779
|
-
return new
|
|
779
|
+
return new Rt({
|
|
780
780
|
href: new Ne(this.href).expand(t),
|
|
781
781
|
templated: !1
|
|
782
782
|
});
|
|
@@ -785,8 +785,8 @@ let Ne = class {
|
|
|
785
785
|
* Makes a copy of this [Link] after merging in the given additional other [properties].
|
|
786
786
|
*/
|
|
787
787
|
addProperties(t) {
|
|
788
|
-
const e =
|
|
789
|
-
return e.properties = e.properties ? e.properties?.add(t) : new
|
|
788
|
+
const e = Rt.deserialize(this.serialize());
|
|
789
|
+
return e.properties = e.properties ? e.properties?.add(t) : new G(t), e;
|
|
790
790
|
}
|
|
791
791
|
/**
|
|
792
792
|
* Creates a [Locator] from a reading order [Link].
|
|
@@ -797,7 +797,7 @@ let Ne = class {
|
|
|
797
797
|
href: t.length > 0 && t[0] !== void 0 ? t[0] : this.href,
|
|
798
798
|
type: this.type ?? "",
|
|
799
799
|
title: this.title,
|
|
800
|
-
locations: new
|
|
800
|
+
locations: new j({
|
|
801
801
|
fragments: t.length > 1 && t[1] !== void 0 ? [t[1]] : []
|
|
802
802
|
})
|
|
803
803
|
});
|
|
@@ -896,8 +896,8 @@ let Ne = class {
|
|
|
896
896
|
return this.items.filter((t) => t.type);
|
|
897
897
|
}
|
|
898
898
|
};
|
|
899
|
-
var Mi = /* @__PURE__ */ ((r) => (r.EPUB = "https://readium.org/webpub-manifest/profiles/epub", r.AUDIOBOOK = "https://readium.org/webpub-manifest/profiles/audiobook", r.DIVINA = "https://readium.org/webpub-manifest/profiles/divina", r.PDF = "https://readium.org/webpub-manifest/profiles/pdf", r))(Mi || {}),
|
|
900
|
-
|
|
899
|
+
var Mi = /* @__PURE__ */ ((r) => (r.EPUB = "https://readium.org/webpub-manifest/profiles/epub", r.AUDIOBOOK = "https://readium.org/webpub-manifest/profiles/audiobook", r.DIVINA = "https://readium.org/webpub-manifest/profiles/divina", r.PDF = "https://readium.org/webpub-manifest/profiles/pdf", r))(Mi || {}), N = /* @__PURE__ */ ((r) => (r.ltr = "ltr", r.rtl = "rtl", r))(N || {});
|
|
900
|
+
G.prototype.getContains = function() {
|
|
901
901
|
return new Set(this.otherProperties.contains || []);
|
|
902
902
|
};
|
|
903
903
|
let Te = class Bi {
|
|
@@ -912,10 +912,10 @@ let Te = class Bi {
|
|
|
912
912
|
*/
|
|
913
913
|
static deserialize(t) {
|
|
914
914
|
if (!(t && t.cssSelector)) return;
|
|
915
|
-
let e =
|
|
915
|
+
let e = x(t.textNodeIndex);
|
|
916
916
|
if (e === void 0) return;
|
|
917
|
-
let i =
|
|
918
|
-
return i === void 0 && (i =
|
|
917
|
+
let i = x(t.charOffset);
|
|
918
|
+
return i === void 0 && (i = x(t.offset)), new Bi({
|
|
919
919
|
cssSelector: t.cssSelector,
|
|
920
920
|
textNodeIndex: e,
|
|
921
921
|
charOffset: i
|
|
@@ -932,7 +932,7 @@ let Te = class Bi {
|
|
|
932
932
|
return this.charOffset !== void 0 && (t.charOffset = this.charOffset), t;
|
|
933
933
|
}
|
|
934
934
|
};
|
|
935
|
-
class
|
|
935
|
+
class de {
|
|
936
936
|
/**
|
|
937
937
|
* Creates a [DomRange].
|
|
938
938
|
*/
|
|
@@ -946,7 +946,7 @@ class ce {
|
|
|
946
946
|
if (!t) return;
|
|
947
947
|
let e = Te.deserialize(t.start);
|
|
948
948
|
if (e)
|
|
949
|
-
return new
|
|
949
|
+
return new de({
|
|
950
950
|
start: e,
|
|
951
951
|
end: Te.deserialize(t.end)
|
|
952
952
|
});
|
|
@@ -959,16 +959,16 @@ class ce {
|
|
|
959
959
|
return this.end && (t.end = this.end.serialize()), t;
|
|
960
960
|
}
|
|
961
961
|
}
|
|
962
|
-
|
|
962
|
+
j.prototype.getCssSelector = function() {
|
|
963
963
|
return this.otherLocations?.get("cssSelector");
|
|
964
964
|
};
|
|
965
|
-
|
|
965
|
+
j.prototype.getPartialCfi = function() {
|
|
966
966
|
return this.otherLocations?.get("partialCfi");
|
|
967
967
|
};
|
|
968
|
-
|
|
969
|
-
return
|
|
968
|
+
j.prototype.getDomRange = function() {
|
|
969
|
+
return de.deserialize(this.otherLocations?.get("domRange"));
|
|
970
970
|
};
|
|
971
|
-
|
|
971
|
+
j.prototype.fragmentParameters = function() {
|
|
972
972
|
return new Map(
|
|
973
973
|
this.fragments.map((r) => r.startsWith("#") ? r.slice(1) : r).join("&").split("&").filter((r) => !r.startsWith("#")).map((r) => r.split("=")).filter((r) => r.length === 2).map((r) => [
|
|
974
974
|
r[0].trim().toLowerCase(),
|
|
@@ -976,7 +976,7 @@ b.prototype.fragmentParameters = function() {
|
|
|
976
976
|
])
|
|
977
977
|
);
|
|
978
978
|
};
|
|
979
|
-
|
|
979
|
+
j.prototype.htmlId = function() {
|
|
980
980
|
if (!this.fragments.length) return;
|
|
981
981
|
let r = this.fragments.find((t) => t.length && !t.includes("="));
|
|
982
982
|
if (!r) {
|
|
@@ -985,15 +985,15 @@ b.prototype.htmlId = function() {
|
|
|
985
985
|
}
|
|
986
986
|
return r?.startsWith("#") ? r.slice(1) : r;
|
|
987
987
|
};
|
|
988
|
-
|
|
988
|
+
j.prototype.page = function() {
|
|
989
989
|
const r = parseInt(this.fragmentParameters().get("page"));
|
|
990
990
|
if (!isNaN(r) && r >= 0) return r;
|
|
991
991
|
};
|
|
992
|
-
|
|
992
|
+
j.prototype.time = function() {
|
|
993
993
|
const r = parseInt(this.fragmentParameters().get("t"));
|
|
994
994
|
if (!isNaN(r)) return r;
|
|
995
995
|
};
|
|
996
|
-
|
|
996
|
+
j.prototype.space = function() {
|
|
997
997
|
const r = this.fragmentParameters();
|
|
998
998
|
if (!r.has("xywh")) return;
|
|
999
999
|
const t = r.get("xywh").split(",").map((e) => parseInt(e));
|
|
@@ -1013,7 +1013,7 @@ class ge {
|
|
|
1013
1013
|
let e = t.currency;
|
|
1014
1014
|
if (!(e && typeof e == "string" && e.length > 0))
|
|
1015
1015
|
return;
|
|
1016
|
-
let i =
|
|
1016
|
+
let i = x(t.value);
|
|
1017
1017
|
if (i !== void 0)
|
|
1018
1018
|
return new ge({ currency: e, value: i });
|
|
1019
1019
|
}
|
|
@@ -1024,7 +1024,7 @@ class ge {
|
|
|
1024
1024
|
return { currency: this.currency, value: this.value };
|
|
1025
1025
|
}
|
|
1026
1026
|
}
|
|
1027
|
-
let oA = class
|
|
1027
|
+
let oA = class Ct {
|
|
1028
1028
|
/** Creates a [Acquisition]. */
|
|
1029
1029
|
constructor(t) {
|
|
1030
1030
|
this.type = t.type, this.children = t.children;
|
|
@@ -1034,14 +1034,14 @@ let oA = class Rt {
|
|
|
1034
1034
|
*/
|
|
1035
1035
|
static deserialize(t) {
|
|
1036
1036
|
if (t && t.type)
|
|
1037
|
-
return new
|
|
1037
|
+
return new Ct({
|
|
1038
1038
|
type: t.type,
|
|
1039
|
-
children:
|
|
1039
|
+
children: Ct.deserializeArray(t.children)
|
|
1040
1040
|
});
|
|
1041
1041
|
}
|
|
1042
1042
|
static deserializeArray(t) {
|
|
1043
1043
|
if (Array.isArray(t))
|
|
1044
|
-
return t.map((e) =>
|
|
1044
|
+
return t.map((e) => Ct.deserialize(e)).filter((e) => e !== void 0);
|
|
1045
1045
|
}
|
|
1046
1046
|
/**
|
|
1047
1047
|
* Serializes a [Acquisition] to its RWPM JSON representation.
|
|
@@ -1051,7 +1051,7 @@ let oA = class Rt {
|
|
|
1051
1051
|
return this.children && (t.children = this.children.map((e) => e.serialize())), t;
|
|
1052
1052
|
}
|
|
1053
1053
|
};
|
|
1054
|
-
class
|
|
1054
|
+
class ue {
|
|
1055
1055
|
/** Creates a [Price]. */
|
|
1056
1056
|
constructor(t) {
|
|
1057
1057
|
this.total = t.total, this.position = t.position;
|
|
@@ -1061,9 +1061,9 @@ class de {
|
|
|
1061
1061
|
*/
|
|
1062
1062
|
static deserialize(t) {
|
|
1063
1063
|
if (t)
|
|
1064
|
-
return new
|
|
1065
|
-
total:
|
|
1066
|
-
position:
|
|
1064
|
+
return new ue({
|
|
1065
|
+
total: x(t.total),
|
|
1066
|
+
position: x(t.position)
|
|
1067
1067
|
});
|
|
1068
1068
|
}
|
|
1069
1069
|
/**
|
|
@@ -1074,7 +1074,7 @@ class de {
|
|
|
1074
1074
|
return this.total !== void 0 && (t.total = this.total), this.position !== void 0 && (t.position = this.position), t;
|
|
1075
1075
|
}
|
|
1076
1076
|
}
|
|
1077
|
-
class
|
|
1077
|
+
class me {
|
|
1078
1078
|
/** Creates a [Copies]. */
|
|
1079
1079
|
constructor(t) {
|
|
1080
1080
|
this.total = t.total, this.available = t.available;
|
|
@@ -1084,9 +1084,9 @@ class ue {
|
|
|
1084
1084
|
*/
|
|
1085
1085
|
static deserialize(t) {
|
|
1086
1086
|
if (t)
|
|
1087
|
-
return new
|
|
1088
|
-
total:
|
|
1089
|
-
available:
|
|
1087
|
+
return new me({
|
|
1088
|
+
total: x(t.total),
|
|
1089
|
+
available: x(t.available)
|
|
1090
1090
|
});
|
|
1091
1091
|
}
|
|
1092
1092
|
/**
|
|
@@ -1097,7 +1097,7 @@ class ue {
|
|
|
1097
1097
|
return this.total !== void 0 && (t.total = this.total), this.available !== void 0 && (t.available = this.available), t;
|
|
1098
1098
|
}
|
|
1099
1099
|
}
|
|
1100
|
-
class
|
|
1100
|
+
class pe {
|
|
1101
1101
|
/** Creates a [Availability]. */
|
|
1102
1102
|
constructor(t) {
|
|
1103
1103
|
this.state = t.state, this.since = t.since, this.until = t.until;
|
|
@@ -1107,7 +1107,7 @@ class me {
|
|
|
1107
1107
|
*/
|
|
1108
1108
|
static deserialize(t) {
|
|
1109
1109
|
if (t && t.state)
|
|
1110
|
-
return new
|
|
1110
|
+
return new pe({
|
|
1111
1111
|
state: t.state,
|
|
1112
1112
|
since: Ye(t.since),
|
|
1113
1113
|
until: Ye(t.until)
|
|
@@ -1121,31 +1121,31 @@ class me {
|
|
|
1121
1121
|
return this.since !== void 0 && (t.since = this.since.toISOString()), this.until !== void 0 && (t.until = this.until.toISOString()), t;
|
|
1122
1122
|
}
|
|
1123
1123
|
}
|
|
1124
|
-
|
|
1125
|
-
return
|
|
1124
|
+
G.prototype.getNumberOfItems = function() {
|
|
1125
|
+
return x(this.otherProperties.numberOfItems);
|
|
1126
1126
|
};
|
|
1127
|
-
|
|
1127
|
+
G.prototype.getPrice = function() {
|
|
1128
1128
|
return ge.deserialize(this.otherProperties.price);
|
|
1129
1129
|
};
|
|
1130
|
-
|
|
1130
|
+
G.prototype.getIndirectAcquisitions = function() {
|
|
1131
1131
|
const r = this.otherProperties.indirectAcquisition;
|
|
1132
1132
|
if (r && Array.isArray(r))
|
|
1133
1133
|
return r.map((t) => oA.deserialize(t)).filter((t) => t !== void 0);
|
|
1134
1134
|
};
|
|
1135
|
-
|
|
1136
|
-
return
|
|
1135
|
+
G.prototype.getHolds = function() {
|
|
1136
|
+
return ue.deserialize(this.otherProperties.holds);
|
|
1137
1137
|
};
|
|
1138
|
-
|
|
1139
|
-
return
|
|
1138
|
+
G.prototype.getCopies = function() {
|
|
1139
|
+
return me.deserialize(this.otherProperties.copies);
|
|
1140
1140
|
};
|
|
1141
|
-
|
|
1142
|
-
return
|
|
1141
|
+
G.prototype.getAvailability = function() {
|
|
1142
|
+
return pe.deserialize(this.otherProperties.availability);
|
|
1143
1143
|
};
|
|
1144
|
-
|
|
1144
|
+
G.prototype.getAuthenticate = function() {
|
|
1145
1145
|
return q.deserialize(this.otherProperties.authenticate);
|
|
1146
1146
|
};
|
|
1147
1147
|
const aA = "CssSelectorGenerator";
|
|
1148
|
-
function
|
|
1148
|
+
function Pe(r = "unknown problem", ...t) {
|
|
1149
1149
|
console.warn(`${aA}: ${r}`, ...t);
|
|
1150
1150
|
}
|
|
1151
1151
|
function lA(r) {
|
|
@@ -1161,13 +1161,13 @@ function cA(r) {
|
|
|
1161
1161
|
if (typeof e == "function")
|
|
1162
1162
|
return (i) => {
|
|
1163
1163
|
const A = e(i);
|
|
1164
|
-
return typeof A != "boolean" ? (
|
|
1164
|
+
return typeof A != "boolean" ? (Pe("pattern matcher function invalid", "Provided pattern matching function does not return boolean. It's result will be ignored.", e), !1) : A;
|
|
1165
1165
|
};
|
|
1166
1166
|
if (typeof e == "string") {
|
|
1167
1167
|
const i = new RegExp("^" + hA(e) + "$");
|
|
1168
1168
|
return (A) => i.test(A);
|
|
1169
1169
|
}
|
|
1170
|
-
return
|
|
1170
|
+
return Pe("pattern matcher invalid", "Pattern matching only accepts strings, regular expressions and/or functions. This item is invalid and will be ignored.", e), () => !1;
|
|
1171
1171
|
});
|
|
1172
1172
|
return (e) => t.some((i) => i(e));
|
|
1173
1173
|
}
|
|
@@ -1177,241 +1177,53 @@ cA([
|
|
|
1177
1177
|
// Angular attributes
|
|
1178
1178
|
"ng-*"
|
|
1179
1179
|
]);
|
|
1180
|
-
class
|
|
1180
|
+
class dA {
|
|
1181
1181
|
}
|
|
1182
|
-
class wi extends
|
|
1182
|
+
class wi extends dA {
|
|
1183
1183
|
/**
|
|
1184
1184
|
* Moves to the left content portion (eg. page) relative to the reading progression direction.
|
|
1185
1185
|
*/
|
|
1186
1186
|
goLeft(t = !1, e) {
|
|
1187
|
-
this.readingProgression ===
|
|
1187
|
+
this.readingProgression === N.ltr ? this.goBackward(t, e) : this.readingProgression === N.rtl && this.goForward(t, e);
|
|
1188
1188
|
}
|
|
1189
1189
|
/**
|
|
1190
1190
|
* Moves to the right content portion (eg. page) relative to the reading progression direction.
|
|
1191
1191
|
*/
|
|
1192
1192
|
goRight(t = !1, e) {
|
|
1193
|
-
this.readingProgression ===
|
|
1194
|
-
}
|
|
1195
|
-
}
|
|
1196
|
-
const dA = `
|
|
1197
|
-
/* FontFamily */
|
|
1198
|
-
|
|
1199
|
-
:root[style*="--USER__fontFamily"] {
|
|
1200
|
-
font-family: var(--USER__fontFamily) !important;
|
|
1201
|
-
}
|
|
1202
|
-
|
|
1203
|
-
:root[style*="--USER__fontFamily"] * {
|
|
1204
|
-
font-family: revert !important;
|
|
1205
|
-
}
|
|
1206
|
-
|
|
1207
|
-
/* FontWeight */
|
|
1208
|
-
|
|
1209
|
-
:root[style*="--USER__fontWeight"] body {
|
|
1210
|
-
font-weight: var(--USER__fontWeight) !important;
|
|
1211
|
-
}
|
|
1212
|
-
|
|
1213
|
-
/* Attempt to handle known bolds */
|
|
1214
|
-
:root[style*="--USER__fontWeight"] b,
|
|
1215
|
-
:root[style*="--USER__fontWeight"] strong {
|
|
1216
|
-
font-weight: bolder;
|
|
1217
|
-
}
|
|
1218
|
-
|
|
1219
|
-
/* Hyphens */
|
|
1220
|
-
|
|
1221
|
-
:root[style*="--USER__bodyHyphens"] {
|
|
1222
|
-
-webkit-hyphens: var(--USER__bodyHyphens) !important;
|
|
1223
|
-
-moz-hyphens: var(--USER__bodyHyphens) !important;
|
|
1224
|
-
-ms-hyphens: var(--USER__bodyHyphens) !important;
|
|
1225
|
-
-epub-hyphens: var(--USER__bodyHyphens) !important;
|
|
1226
|
-
hyphens: var(--USER__bodyHyphens) !important;
|
|
1227
|
-
}
|
|
1228
|
-
|
|
1229
|
-
:root[style*="--USER__bodyHyphens"] body,
|
|
1230
|
-
:root[style*="--USER__bodyHyphens"] p,
|
|
1231
|
-
:root[style*="--USER__bodyHyphens"] li,
|
|
1232
|
-
:root[style*="--USER__bodyHyphens"] div,
|
|
1233
|
-
:root[style*="--USER__bodyHyphens"] dd {
|
|
1234
|
-
-webkit-hyphens: inherit;
|
|
1235
|
-
-moz-hyphens: inherit;
|
|
1236
|
-
-ms-hyphens: inherit;
|
|
1237
|
-
-epub-hyphens: inherit;
|
|
1238
|
-
hyphens: inherit;
|
|
1239
|
-
}
|
|
1240
|
-
|
|
1241
|
-
/* LetterSpacing */
|
|
1242
|
-
|
|
1243
|
-
:root[style*="--USER__letterSpacing"] h1,
|
|
1244
|
-
:root[style*="--USER__letterSpacing"] h2,
|
|
1245
|
-
:root[style*="--USER__letterSpacing"] h3,
|
|
1246
|
-
:root[style*="--USER__letterSpacing"] h4,
|
|
1247
|
-
:root[style*="--USER__letterSpacing"] h5,
|
|
1248
|
-
:root[style*="--USER__letterSpacing"] h6,
|
|
1249
|
-
:root[style*="--USER__letterSpacing"] p,
|
|
1250
|
-
:root[style*="--USER__letterSpacing"] li,
|
|
1251
|
-
:root[style*="--USER__letterSpacing"] div,
|
|
1252
|
-
:root[style*="--USER__letterSpacing"] dt,
|
|
1253
|
-
:root[style*="--USER__letterSpacing"] dd {
|
|
1254
|
-
letter-spacing: var(--USER__letterSpacing);
|
|
1255
|
-
font-variant: none;
|
|
1256
|
-
}
|
|
1257
|
-
|
|
1258
|
-
/* Ligatures */
|
|
1259
|
-
|
|
1260
|
-
:root[style*="--USER__ligatures"] {
|
|
1261
|
-
font-variant-ligatures: var(--USER__ligatures) !important;
|
|
1262
|
-
}
|
|
1263
|
-
|
|
1264
|
-
:root[style*="--USER__ligatures"] * {
|
|
1265
|
-
font-variant-ligatures: inherit !important;
|
|
1266
|
-
}
|
|
1267
|
-
|
|
1268
|
-
/* LineHeight */
|
|
1269
|
-
|
|
1270
|
-
:root[style*="--USER__lineHeight"] {
|
|
1271
|
-
line-height: var(--USER__lineHeight) !important;
|
|
1272
|
-
}
|
|
1273
|
-
|
|
1274
|
-
:root[style*="--USER__lineHeight"] body,
|
|
1275
|
-
:root[style*="--USER__lineHeight"] p,
|
|
1276
|
-
:root[style*="--USER__lineHeight"] li,
|
|
1277
|
-
:root[style*="--USER__lineHeight"] div {
|
|
1278
|
-
line-height: inherit;
|
|
1279
|
-
}
|
|
1280
|
-
|
|
1281
|
-
/* ParagraphIndent */
|
|
1282
|
-
|
|
1283
|
-
:root[style*="--USER__paraIndent"] p {
|
|
1284
|
-
text-indent: var(--USER__paraIndent) !important;
|
|
1285
|
-
}
|
|
1286
|
-
|
|
1287
|
-
:root[style*="--USER__paraIndent"] p *,
|
|
1288
|
-
:root[style*="--USER__paraIndent"] p:first-letter {
|
|
1289
|
-
text-indent: 0 !important;
|
|
1290
|
-
}
|
|
1291
|
-
|
|
1292
|
-
/* ParagraphSpacing */
|
|
1293
|
-
|
|
1294
|
-
:root[style*="--USER__paraSpacing"] p {
|
|
1295
|
-
margin-block: var(--USER__paraSpacing) !important;
|
|
1296
|
-
}
|
|
1297
|
-
|
|
1298
|
-
/* Ruby */
|
|
1299
|
-
|
|
1300
|
-
:root[style*="readium-noRuby-on"] body rt,
|
|
1301
|
-
:root[style*="readium-noRuby-on"] body rp {
|
|
1302
|
-
display: none;
|
|
1303
|
-
}
|
|
1304
|
-
|
|
1305
|
-
/* TextAlign */
|
|
1306
|
-
|
|
1307
|
-
:root[style*="--USER__textAlign"] {
|
|
1308
|
-
text-align: var(--USER__textAlign);
|
|
1309
|
-
}
|
|
1310
|
-
|
|
1311
|
-
:root[style*="--USER__textAlign"] body,
|
|
1312
|
-
:root[style*="--USER__textAlign"] p:not(blockquote p):not(figcaption p):not(hgroup p),
|
|
1313
|
-
:root[style*="--USER__textAlign"] li,
|
|
1314
|
-
:root[style*="--USER__textAlign"] dd {
|
|
1315
|
-
text-align: var(--USER__textAlign) !important;
|
|
1316
|
-
-moz-text-align-last: auto !important;
|
|
1317
|
-
-epub-text-align-last: auto !important;
|
|
1318
|
-
text-align-last: auto !important;
|
|
1319
|
-
}
|
|
1320
|
-
|
|
1321
|
-
/* TextNormalize */
|
|
1322
|
-
|
|
1323
|
-
:root[style*="readium-a11y-on"] {
|
|
1324
|
-
font-weight: normal !important;
|
|
1325
|
-
font-style: normal !important;
|
|
1326
|
-
}
|
|
1327
|
-
|
|
1328
|
-
:root[style*="readium-a11y-on"] *:not(code):not(var):not(kbd):not(samp) {
|
|
1329
|
-
font-family: inherit !important;
|
|
1330
|
-
font-weight: inherit !important;
|
|
1331
|
-
font-style: inherit !important;
|
|
1332
|
-
}
|
|
1333
|
-
|
|
1334
|
-
:root[style*="readium-a11y-on"] * {
|
|
1335
|
-
text-decoration: none !important;
|
|
1336
|
-
font-variant-caps: normal !important;
|
|
1337
|
-
font-variant-position: normal !important;
|
|
1338
|
-
font-variant-numeric: normal !important;
|
|
1339
|
-
}
|
|
1340
|
-
|
|
1341
|
-
:root[style*="readium-a11y-on"] sup,
|
|
1342
|
-
:root[style*="readium-a11y-on"] sub {
|
|
1343
|
-
font-size: 1rem !important;
|
|
1344
|
-
vertical-align: baseline !important;
|
|
1345
|
-
}
|
|
1346
|
-
|
|
1347
|
-
/* Word Spacing */
|
|
1348
|
-
|
|
1349
|
-
:root[style*="--USER__wordSpacing"] h1,
|
|
1350
|
-
:root[style*="--USER__wordSpacing"] h2,
|
|
1351
|
-
:root[style*="--USER__wordSpacing"] h3,
|
|
1352
|
-
:root[style*="--USER__wordSpacing"] h4,
|
|
1353
|
-
:root[style*="--USER__wordSpacing"] h5,
|
|
1354
|
-
:root[style*="--USER__wordSpacing"] h6,
|
|
1355
|
-
:root[style*="--USER__wordSpacing"] p,
|
|
1356
|
-
:root[style*="--USER__wordSpacing"] li,
|
|
1357
|
-
:root[style*="--USER__wordSpacing"] div,
|
|
1358
|
-
:root[style*="--USER__wordSpacing"] dt,
|
|
1359
|
-
:root[style*="--USER__wordSpacing"] dd {
|
|
1360
|
-
word-spacing: var(--USER__wordSpacing);
|
|
1361
|
-
}
|
|
1362
|
-
|
|
1363
|
-
/* Zoom */
|
|
1364
|
-
|
|
1365
|
-
:root {
|
|
1366
|
-
--USER__zoom: 1;
|
|
1367
|
-
}
|
|
1368
|
-
|
|
1369
|
-
:root[style*="--USER__zoom"] body {
|
|
1370
|
-
zoom: var(--USER__zoom) !important;
|
|
1371
|
-
}
|
|
1372
|
-
|
|
1373
|
-
@supports selector(figure:has(> img)) {
|
|
1374
|
-
:root[style*="--USER__zoom"] figure:has(> img),
|
|
1375
|
-
:root[style*="--USER__zoom"] figure:has(> video),
|
|
1376
|
-
:root[style*="--USER__zoom"] figure:has(> svg),
|
|
1377
|
-
:root[style*="--USER__zoom"] figure:has(> canvas),
|
|
1378
|
-
:root[style*="--USER__zoom"] figure:has(> iframe),
|
|
1379
|
-
:root[style*="--USER__zoom"] figure:has(> audio),
|
|
1380
|
-
:root[style*="--USER__zoom"] div:has(> img),
|
|
1381
|
-
:root[style*="--USER__zoom"] div:has(> video),
|
|
1382
|
-
:root[style*="--USER__zoom"] div:has(> svg),
|
|
1383
|
-
:root[style*="--USER__zoom"] div:has(> canvas),
|
|
1384
|
-
:root[style*="--USER__zoom"] div:has(> iframe),
|
|
1385
|
-
:root[style*="--USER__zoom"] div:has(> audio),
|
|
1386
|
-
:root[style*="--USER__zoom"] table {
|
|
1387
|
-
zoom: calc(100% / var(--USER__zoom)) !important;
|
|
1388
|
-
}
|
|
1389
|
-
|
|
1390
|
-
:root[style*="--USER__zoom"] figcaption,
|
|
1391
|
-
:root[style*="--USER__zoom"] caption,
|
|
1392
|
-
:root[style*="--USER__zoom"] td,
|
|
1393
|
-
:root[style*="--USER__zoom"] th {
|
|
1394
|
-
zoom: var(--USER__zoom) !important;
|
|
1193
|
+
this.readingProgression === N.ltr ? this.goForward(t, e) : this.readingProgression === N.rtl && this.goBackward(t, e);
|
|
1395
1194
|
}
|
|
1396
1195
|
}
|
|
1397
|
-
|
|
1196
|
+
const gA = `/*!
|
|
1197
|
+
* Readium CSS v.2.0.0-beta.22
|
|
1198
|
+
* Copyright (c) 2017–2025. Readium Foundation. All rights reserved.
|
|
1199
|
+
* Use of this source code is governed by a BSD-style license which is detailed in the
|
|
1200
|
+
* LICENSE file present in the project repository where this source code is maintained.
|
|
1201
|
+
* Core maintainer: Jiminy Panoz <jiminy.panoz@edrlab.org>
|
|
1202
|
+
* Contributors:
|
|
1203
|
+
* Daniel Weck
|
|
1204
|
+
* Hadrien Gardeur
|
|
1205
|
+
* Innovimax
|
|
1206
|
+
* L. Le Meur
|
|
1207
|
+
* Mickaël Menu
|
|
1208
|
+
* k_taka
|
|
1209
|
+
*/:root[style*=--USER__textAlign]{text-align:var(--USER__textAlign)}:root[style*=--USER__textAlign] body,:root[style*=--USER__textAlign] p:not([class*=title]):not(blockquote p):not(figcaption p):not(header p):not(hgroup p):not(div:has(+*)>h1+p):not(div:has(+*)>p:has(+h1)),:root[style*=--USER__textAlign] li,:root[style*=--USER__textAlign] dd{text-align:var(--USER__textAlign)!important;-moz-text-align-last:auto!important;-epub-text-align-last:auto!important;text-align-last:auto!important}:root[style*=--USER__bodyHyphens]{-webkit-hyphens:var(--USER__bodyHyphens)!important;-moz-hyphens:var(--USER__bodyHyphens)!important;-ms-hyphens:var(--USER__bodyHyphens)!important;-epub-hyphens:var(--USER__bodyHyphens)!important;hyphens:var(--USER__bodyHyphens)!important}:root[style*=--USER__bodyHyphens] body,:root[style*=--USER__bodyHyphens] p,:root[style*=--USER__bodyHyphens] li,:root[style*=--USER__bodyHyphens] div,:root[style*=--USER__bodyHyphens] dd{-webkit-hyphens:inherit;-moz-hyphens:inherit;-ms-hyphens:inherit;-epub-hyphens:inherit;hyphens:inherit}:root[style*=--USER__fontFamily]{font-family:var(--USER__fontFamily)!important}:root[style*=--USER__fontFamily] *{font-family:revert!important}:root[style*=AccessibleDfA]{font-family:AccessibleDfA,Verdana,Tahoma,Trebuchet MS,sans-serif!important}:root[style*="IA Writer Duospace"]{font-family:IA Writer Duospace,Menlo,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier,monospace!important}:root[style*=AccessibleDfA],:root[style*="IA Writer Duospace"],:root[style*=readium-a11y-on]{font-style:normal!important;font-weight:400!important}:root[style*=AccessibleDfA] body *:not(code):not(var):not(kbd):not(samp),:root[style*="IA Writer Duospace"] body *:not(code):not(var):not(kbd):not(samp),:root[style*=readium-a11y-on] body *:not(code):not(var):not(kbd):not(samp){font-family:inherit!important;font-style:inherit!important;font-weight:inherit!important}:root[style*=AccessibleDfA] body *:not(a),:root[style*="IA Writer Duospace"] body *:not(a),:root[style*=readium-a11y-on] body *:not(a){text-decoration:none!important}:root[style*=AccessibleDfA] body *,:root[style*="IA Writer Duospace"] body *,:root[style*=readium-a11y-on] body *{font-variant-caps:normal!important;font-variant-numeric:normal!important;font-variant-position:normal!important}:root[style*=AccessibleDfA] sup,:root[style*="IA Writer Duospace"] sup,:root[style*=readium-a11y-on] sup,:root[style*=AccessibleDfA] sub,:root[style*="IA Writer Duospace"] sub,:root[style*=readium-a11y-on] sub{font-size:1rem!important;vertical-align:baseline!important}:root:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] body{zoom:var(--USER__zoom)!important}:root[style*=readium-iOSPatch-on][style*=--USER__zoom] body{-webkit-text-size-adjust:var(--USER__zoom)!important}@supports selector(figure:has(> img)){:root:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] figure:has(>img),:root:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] figure:has(>video),:root:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] figure:has(>svg),:root:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] figure:has(>canvas),:root:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] figure:has(>iframe),:root:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] figure:has(>audio),:root:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] div:has(>img),:root:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] div:has(>video),:root:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] div:has(>svg),:root:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] div:has(>canvas),:root:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] div:has(>iframe),:root:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] div:has(>audio),:root:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] table{zoom:calc(100% / var(--USER__zoom))!important}:root:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] figcaption,:root:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] caption,:root:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] td,:root:not([style*=readium-iOSPatch-on])[style*=--USER__zoom] th{zoom:var(--USER__zoom)!important}}:root[style*=--USER__lineHeight]{line-height:var(--USER__lineHeight)!important}:root[style*=--USER__lineHeight] body,:root[style*=--USER__lineHeight] p,:root[style*=--USER__lineHeight] li,:root[style*=--USER__lineHeight] div{line-height:inherit}:root[style*=--USER__paraSpacing] p{margin-top:var(--USER__paraSpacing)!important;margin-bottom:var(--USER__paraSpacing)!important}:root[style*=--USER__paraIndent] p:not([class*=title]):not(blockquote p):not(figcaption p):not(header p):not(hgroup p):not(div:has(+*)>h1+p):not(div:has(+*)>p:has(+h1)){text-indent:var(--USER__paraIndent)!important}:root[style*=--USER__paraIndent] p *,:root[style*=--USER__paraIndent] p:first-letter{text-indent:0!important}:root[style*=--USER__wordSpacing] h1,:root[style*=--USER__wordSpacing] h2,:root[style*=--USER__wordSpacing] h3,:root[style*=--USER__wordSpacing] h4,:root[style*=--USER__wordSpacing] h5,:root[style*=--USER__wordSpacing] h6,:root[style*=--USER__wordSpacing] p,:root[style*=--USER__wordSpacing] li,:root[style*=--USER__wordSpacing] div,:root[style*=--USER__wordSpacing] dt,:root[style*=--USER__wordSpacing] dd{word-spacing:var(--USER__wordSpacing)}:root[style*=--USER__letterSpacing] h1,:root[style*=--USER__letterSpacing] h2,:root[style*=--USER__letterSpacing] h3,:root[style*=--USER__letterSpacing] h4,:root[style*=--USER__letterSpacing] h5,:root[style*=--USER__letterSpacing] h6,:root[style*=--USER__letterSpacing] p,:root[style*=--USER__letterSpacing] li,:root[style*=--USER__letterSpacing] div,:root[style*=--USER__letterSpacing] dt,:root[style*=--USER__letterSpacing] dd{letter-spacing:var(--USER__letterSpacing);font-variant:none}:root[style*=--USER__fontWeight] body{font-weight:var(--USER__fontWeight)!important}:root[style*=--USER__fontWeight] b,:root[style*=--USER__fontWeight] strong{font-weight:bolder}:root[style*=--USER__fontWidth] body{font-stretch:var(--USER__fontWidth)!important}:root[style*=--USER__fontOpticalSizing] body{font-optical-sizing:var(--USER__fontOpticalSizing)!important}:root[style*=readium-noRuby-on] body rt,:root[style*=readium-noRuby-on] body rp{display:none}:root[style*=--USER__ligatures]{font-variant-ligatures:var(--USER__ligatures)!important}:root[style*=--USER__ligatures] *{font-variant-ligatures:inherit!important}:root[style*=readium-iPadOSPatch-on] body{-webkit-text-size-adjust:none}:root[style*=readium-iPadOSPatch-on] p,:root[style*=readium-iPadOSPatch-on] h1,:root[style*=readium-iPadOSPatch-on] h2,:root[style*=readium-iPadOSPatch-on] h3,:root[style*=readium-iPadOSPatch-on] h4,:root[style*=readium-iPadOSPatch-on] h5,:root[style*=readium-iPadOSPatch-on] h6,:root[style*=readium-iPadOSPatch-on] li,:root[style*=readium-iPadOSPatch-on] th,:root[style*=readium-iPadOSPatch-on] td,:root[style*=readium-iPadOSPatch-on] dt,:root[style*=readium-iPadOSPatch-on] dd,:root[style*=readium-iPadOSPatch-on] pre,:root[style*=readium-iPadOSPatch-on] address,:root[style*=readium-iPadOSPatch-on] details,:root[style*=readium-iPadOSPatch-on] summary,:root[style*=readium-iPadOSPatch-on] figcaption,:root[style*=readium-iPadOSPatch-on] div:not(:has(p,h1,h2,h3,h4,h5,h6,li,th,td,dt,dd,pre,address,aside,details,figcaption,summary)),:root[style*=readium-iPadOSPatch-on] aside:not(:has(p,h1,h2,h3,h4,h5,h6,li,th,td,dt,dd,pre,address,aside,details,figcaption,summary)){-webkit-text-zoom:reset}:root[style*=readium-iPadOSPatch-on] abbr,:root[style*=readium-iPadOSPatch-on] b,:root[style*=readium-iPadOSPatch-on] bdi,:root[style*=readium-iPadOSPatch-on] bdo,:root[style*=readium-iPadOSPatch-on] cite,:root[style*=readium-iPadOSPatch-on] code,:root[style*=readium-iPadOSPatch-on] dfn,:root[style*=readium-iPadOSPatch-on] em,:root[style*=readium-iPadOSPatch-on] i,:root[style*=readium-iPadOSPatch-on] kbd,:root[style*=readium-iPadOSPatch-on] mark,:root[style*=readium-iPadOSPatch-on] q,:root[style*=readium-iPadOSPatch-on] rp,:root[style*=readium-iPadOSPatch-on] rt,:root[style*=readium-iPadOSPatch-on] ruby,:root[style*=readium-iPadOSPatch-on] s,:root[style*=readium-iPadOSPatch-on] samp,:root[style*=readium-iPadOSPatch-on] small,:root[style*=readium-iPadOSPatch-on] span,:root[style*=readium-iPadOSPatch-on] strong,:root[style*=readium-iPadOSPatch-on] sub,:root[style*=readium-iPadOSPatch-on] sup,:root[style*=readium-iPadOSPatch-on] time,:root[style*=readium-iPadOSPatch-on] u,:root[style*=readium-iPadOSPatch-on] var{-webkit-text-zoom:normal}:root[style*=readium-iPadOSPatch-on] p:not(:has(b,cite,em,i,q,s,small,span,strong)):first-line{-webkit-text-zoom:normal}`, mt = (r, t) => URL.createObjectURL(new Blob([r], { type: t })), Ei = (r) => r.replace(/\/\/.*/g, "").replace(/\/\*[\s\S]*?\*\//g, "").replace(/\n/g, "").replace(/\s+/g, " "), uA = (r) => r.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g, "").replace(/ {2,}/g, " ").replace(/url\((?!(https?:)?\/\/)("?)\/([^\)]+)/g, `url($2${window.location.origin}/$3`), fe = (r, t) => {
|
|
1398
1210
|
const e = r.createElement("script");
|
|
1399
|
-
return e.dataset.readium = "true", e.src = t.startsWith("blob:") ? t :
|
|
1400
|
-
},
|
|
1401
|
-
const e = r.createElement("
|
|
1402
|
-
return e.dataset.readium = "true", e.
|
|
1403
|
-
},
|
|
1404
|
-
if (
|
|
1211
|
+
return e.dataset.readium = "true", e.src = t.startsWith("blob:") ? t : mt(t, "text/javascript"), e;
|
|
1212
|
+
}, mA = (r, t) => {
|
|
1213
|
+
const e = r.createElement("link");
|
|
1214
|
+
return e.dataset.readium = "true", e.rel = "stylesheet", e.type = "text/css", e.href = t.startsWith("blob:") ? t : mt(t, "text/css"), e;
|
|
1215
|
+
}, Xt = /* @__PURE__ */ new Map(), Jt = (r, t) => {
|
|
1216
|
+
if (Xt.has(r)) return Xt.get(r);
|
|
1405
1217
|
const e = t();
|
|
1406
|
-
return
|
|
1407
|
-
},
|
|
1218
|
+
return Xt.set(r, e), e;
|
|
1219
|
+
}, pA = (r) => fe(r, Jt("css-selector-generator", () => mt(
|
|
1408
1220
|
'!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports._readium_cssSelectorGenerator=e():t._readium_cssSelectorGenerator=e()}(self,(()=>(()=>{"use strict";var t,e,n={d:(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},o={};function r(t){return t&&t instanceof Element}function i(t="unknown problem",...e){console.warn(`CssSelectorGenerator: ${t}`,...e)}n.r(o),n.d(o,{default:()=>z,getCssSelector:()=>U}),function(t){t.NONE="none",t.DESCENDANT="descendant",t.CHILD="child"}(t||(t={})),function(t){t.id="id",t.class="class",t.tag="tag",t.attribute="attribute",t.nthchild="nthchild",t.nthoftype="nthoftype"}(e||(e={}));const c={selectors:[e.id,e.class,e.tag,e.attribute],includeTag:!1,whitelist:[],blacklist:[],combineWithinSelector:!0,combineBetweenSelectors:!0,root:null,maxCombinations:Number.POSITIVE_INFINITY,maxCandidates:Number.POSITIVE_INFINITY};function u(t){return t instanceof RegExp}function s(t){return["string","function"].includes(typeof t)||u(t)}function l(t){return Array.isArray(t)?t.filter(s):[]}function a(t){const e=[Node.DOCUMENT_NODE,Node.DOCUMENT_FRAGMENT_NODE,Node.ELEMENT_NODE];return function(t){return t instanceof Node}(t)&&e.includes(t.nodeType)}function f(t,e){if(a(t))return t.contains(e)||i("element root mismatch","Provided root does not contain the element. This will most likely result in producing a fallback selector using element\'s real root node. If you plan to use the selector using provided root (e.g. `root.querySelector`), it will nto work as intended."),t;const n=e.getRootNode({composed:!1});return a(n)?(n!==document&&i("shadow root inferred","You did not provide a root and the element is a child of Shadow DOM. This will produce a selector using ShadowRoot as a root. If you plan to use the selector using document as a root (e.g. `document.querySelector`), it will not work as intended."),n):e.ownerDocument.querySelector(":root")}function d(t){return"number"==typeof t?t:Number.POSITIVE_INFINITY}function m(t=[]){const[e=[],...n]=t;return 0===n.length?e:n.reduce(((t,e)=>t.filter((t=>e.includes(t)))),e)}function p(t){return[].concat(...t)}function h(t){const e=t.map((t=>{if(u(t))return e=>t.test(e);if("function"==typeof t)return e=>{const n=t(e);return"boolean"!=typeof n?(i("pattern matcher function invalid","Provided pattern matching function does not return boolean. It\'s result will be ignored.",t),!1):n};if("string"==typeof t){const e=new RegExp("^"+t.replace(/[|\\\\{}()[\\]^$+?.]/g,"\\\\$&").replace(/\\*/g,".+")+"$");return t=>e.test(t)}return i("pattern matcher invalid","Pattern matching only accepts strings, regular expressions and/or functions. This item is invalid and will be ignored.",t),()=>!1}));return t=>e.some((e=>e(t)))}function g(t,e,n){const o=Array.from(f(n,t[0]).querySelectorAll(e));return o.length===t.length&&t.every((t=>o.includes(t)))}function y(t,e){e=null!=e?e:function(t){return t.ownerDocument.querySelector(":root")}(t);const n=[];let o=t;for(;r(o)&&o!==e;)n.push(o),o=o.parentElement;return n}function b(t,e){return m(t.map((t=>y(t,e))))}const N={[t.NONE]:{type:t.NONE,value:""},[t.DESCENDANT]:{type:t.DESCENDANT,value:" > "},[t.CHILD]:{type:t.CHILD,value:" "}},S=new RegExp(["^$","\\\\s"].join("|")),E=new RegExp(["^$"].join("|")),w=[e.nthoftype,e.tag,e.id,e.class,e.attribute,e.nthchild],v=h(["class","id","ng-*"]);function C({nodeName:t}){return`[${t}]`}function O({nodeName:t,nodeValue:e}){return`[${t}=\'${L(e)}\']`}function T(t){const e=Array.from(t.attributes).filter((e=>function({nodeName:t},e){const n=e.tagName.toLowerCase();return!(["input","option"].includes(n)&&"value"===t||v(t))}(e,t)));return[...e.map(C),...e.map(O)]}function I(t){return(t.getAttribute("class")||"").trim().split(/\\s+/).filter((t=>!E.test(t))).map((t=>`.${L(t)}`))}function x(t){const e=t.getAttribute("id")||"",n=`#${L(e)}`,o=t.getRootNode({composed:!1});return!S.test(e)&&g([t],n,o)?[n]:[]}function j(t){const e=t.parentNode;if(e){const n=Array.from(e.childNodes).filter(r).indexOf(t);if(n>-1)return[`:nth-child(${n+1})`]}return[]}function A(t){return[L(t.tagName.toLowerCase())]}function D(t){const e=[...new Set(p(t.map(A)))];return 0===e.length||e.length>1?[]:[e[0]]}function $(t){const e=D([t])[0],n=t.parentElement;if(n){const o=Array.from(n.children).filter((t=>t.tagName.toLowerCase()===e)),r=o.indexOf(t);if(r>-1)return[`${e}:nth-of-type(${r+1})`]}return[]}function R(t=[],{maxResults:e=Number.POSITIVE_INFINITY}={}){const n=[];let o=0,r=k(1);for(;r.length<=t.length&&o<e;)o+=1,n.push(r.map((e=>t[e]))),r=P(r,t.length-1);return n}function P(t=[],e=0){const n=t.length;if(0===n)return[];const o=[...t];o[n-1]+=1;for(let t=n-1;t>=0;t--)if(o[t]>e){if(0===t)return k(n+1);o[t-1]++,o[t]=o[t-1]+1}return o[n-1]>e?k(n+1):o}function k(t=1){return Array.from(Array(t).keys())}const _=":".charCodeAt(0).toString(16).toUpperCase(),M=/[ !"#$%&\'()\\[\\]{|}<>*+,./;=?@^`~\\\\]/;function L(t=""){var e,n;return null!==(n=null===(e=null===CSS||void 0===CSS?void 0:CSS.escape)||void 0===e?void 0:e.call(CSS,t))&&void 0!==n?n:function(t=""){return t.split("").map((t=>":"===t?`\\\\${_} `:M.test(t)?`\\\\${t}`:escape(t).replace(/%/g,"\\\\"))).join("")}(t)}const q={tag:D,id:function(t){return 0===t.length||t.length>1?[]:x(t[0])},class:function(t){return m(t.map(I))},attribute:function(t){return m(t.map(T))},nthchild:function(t){return m(t.map(j))},nthoftype:function(t){return m(t.map($))}},F={tag:A,id:x,class:I,attribute:T,nthchild:j,nthoftype:$};function V(t){return t.includes(e.tag)||t.includes(e.nthoftype)?[...t]:[...t,e.tag]}function Y(t={}){const n=[...w];return t[e.tag]&&t[e.nthoftype]&&n.splice(n.indexOf(e.tag),1),n.map((e=>{return(o=t)[n=e]?o[n].join(""):"";var n,o})).join("")}function B(t,e,n="",o){const r=function(t,e){return""===e?t:function(t,e){return[...t.map((t=>e+" "+t)),...t.map((t=>e+" > "+t))]}(t,e)}(function(t,e,n){const o=function(t,e){const{blacklist:n,whitelist:o,combineWithinSelector:r,maxCombinations:i}=e,c=h(n),u=h(o);return function(t){const{selectors:e,includeTag:n}=t,o=[].concat(e);return n&&!o.includes("tag")&&o.push("tag"),o}(e).reduce(((e,n)=>{const o=function(t,e){var n;return(null!==(n=q[e])&&void 0!==n?n:()=>[])(t)}(t,n),s=function(t=[],e,n){return t.filter((t=>n(t)||!e(t)))}(o,c,u),l=function(t=[],e){return t.sort(((t,n)=>{const o=e(t),r=e(n);return o&&!r?-1:!o&&r?1:0}))}(s,u);return e[n]=r?R(l,{maxResults:i}):l.map((t=>[t])),e}),{})}(t,n),r=function(t,e){return function(t){const{selectors:e,combineBetweenSelectors:n,includeTag:o,maxCandidates:r}=t,i=n?R(e,{maxResults:r}):e.map((t=>[t]));return o?i.map(V):i}(e).map((e=>function(t,e){const n={};return t.forEach((t=>{const o=e[t];o.length>0&&(n[t]=o)})),function(t={}){let e=[];return Object.entries(t).forEach((([t,n])=>{e=n.flatMap((n=>0===e.length?[{[t]:n}]:e.map((e=>Object.assign(Object.assign({},e),{[t]:n})))))})),e}(n).map(Y)}(e,t))).filter((t=>t.length>0))}(o,n),i=p(r);return[...new Set(i)]}(t,o.root,o),n);for(const e of r)if(g(t,e,o.root))return e;return null}function G(t){return{value:t,include:!1}}function W({selectors:t,operator:n}){let o=[...w];t[e.tag]&&t[e.nthoftype]&&(o=o.filter((t=>t!==e.tag)));let r="";return o.forEach((e=>{(t[e]||[]).forEach((({value:t,include:e})=>{e&&(r+=t)}))})),n.value+r}function H(n){return[":root",...y(n).reverse().map((n=>{const o=function(e,n,o=t.NONE){const r={};return n.forEach((t=>{Reflect.set(r,t,function(t,e){return F[e](t)}(e,t).map(G))})),{element:e,operator:N[o],selectors:r}}(n,[e.nthchild],t.DESCENDANT);return o.selectors.nthchild.forEach((t=>{t.include=!0})),o})).map(W)].join("")}function U(t,n={}){const o=function(t){const e=(Array.isArray(t)?t:[t]).filter(r);return[...new Set(e)]}(t),i=function(t,n={}){const o=Object.assign(Object.assign({},c),n);return{selectors:(r=o.selectors,Array.isArray(r)?r.filter((t=>{return n=e,o=t,Object.values(n).includes(o);var n,o})):[]),whitelist:l(o.whitelist),blacklist:l(o.blacklist),root:f(o.root,t),combineWithinSelector:!!o.combineWithinSelector,combineBetweenSelectors:!!o.combineBetweenSelectors,includeTag:!!o.includeTag,maxCombinations:d(o.maxCombinations),maxCandidates:d(o.maxCandidates)};var r}(o[0],n);let u="",s=i.root;function a(){return function(t,e,n="",o){if(0===t.length)return null;const r=[t.length>1?t:[],...b(t,e).map((t=>[t]))];for(const t of r){const e=B(t,0,n,o);if(e)return{foundElements:t,selector:e}}return null}(o,s,u,i)}let m=a();for(;m;){const{foundElements:t,selector:e}=m;if(g(o,e,i.root))return e;s=t[0],u=e,m=a()}return o.length>1?o.map((t=>U(t,i))).join(", "):function(t){return t.map(H).join(", ")}(o)}const z=U;return o})()));',
|
|
1409
1221
|
"text/javascript"
|
|
1410
|
-
))),
|
|
1222
|
+
))), fA = `
|
|
1411
1223
|
window._readium_blockedEvents = [];
|
|
1412
1224
|
window._readium_blockEvents = false; // WebPub doesn't need event blocking
|
|
1413
1225
|
window._readium_eventBlocker = null;
|
|
1414
|
-
`,
|
|
1226
|
+
`, MA = (r) => fe(r, Jt("webpub-js-before", () => mt(Ei(fA), "text/javascript"))), BA = (r) => fe(r, Jt("webpub-js-after", () => mt(Ei(`
|
|
1415
1227
|
if(window.onload) window.onload = new Proxy(window.onload, {
|
|
1416
1228
|
apply: function(target, receiver, args) {
|
|
1417
1229
|
if(!window._readium_blockEvents) {
|
|
@@ -1421,7 +1233,7 @@ if(window.onload) window.onload = new Proxy(window.onload, {
|
|
|
1421
1233
|
_readium_blockedEvents.push([0, target, receiver, args]);
|
|
1422
1234
|
}
|
|
1423
1235
|
});`), "text/javascript")));
|
|
1424
|
-
class
|
|
1236
|
+
class wA {
|
|
1425
1237
|
constructor(t, e, i, A) {
|
|
1426
1238
|
this.pub = t, this.item = i, this.burl = i.toURL(e) || "", this.cssProperties = A;
|
|
1427
1239
|
}
|
|
@@ -1454,18 +1266,17 @@ class BA {
|
|
|
1454
1266
|
}
|
|
1455
1267
|
finalizeDOM(t, e, i, A, n) {
|
|
1456
1268
|
if (!t) return "";
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
h.setAttribute("fetchpriority", "high");
|
|
1269
|
+
if (t.head.appendChild(mA(t, Jt("ReadiumCSS-webpub", () => mt(uA(gA), "text/css")))), n && this.setProperties(n, t), t.body.querySelectorAll("img").forEach((a) => {
|
|
1270
|
+
a.setAttribute("fetchpriority", "high");
|
|
1460
1271
|
}), e !== void 0) {
|
|
1461
|
-
const
|
|
1462
|
-
|
|
1272
|
+
const a = t.createElement("base");
|
|
1273
|
+
a.href = e, a.dataset.readium = "true", t.head.firstChild.before(a);
|
|
1463
1274
|
}
|
|
1464
|
-
const
|
|
1465
|
-
|
|
1466
|
-
let
|
|
1467
|
-
return i.string === "application/xhtml+xml" ?
|
|
1468
|
-
new Blob([
|
|
1275
|
+
const s = this.hasExecutable(t);
|
|
1276
|
+
s && t.head.firstChild.before(MA(t)), t.head.firstChild.before(pA(t)), s && t.head.appendChild(BA(t));
|
|
1277
|
+
let o;
|
|
1278
|
+
return i.string === "application/xhtml+xml" ? o = new XMLSerializer().serializeToString(t) : o = this.serializeAsHTML(t, A || ""), URL.createObjectURL(
|
|
1279
|
+
new Blob([o], {
|
|
1469
1280
|
type: i.isHTML ? i.string : "application/xhtml+xml"
|
|
1470
1281
|
})
|
|
1471
1282
|
);
|
|
@@ -1477,8 +1288,8 @@ class BA {
|
|
|
1477
1288
|
return A + s;
|
|
1478
1289
|
}
|
|
1479
1290
|
}
|
|
1480
|
-
const
|
|
1481
|
-
class
|
|
1291
|
+
const EA = Math.pow(2, 32), be = () => Math.round(Math.random() * EA).toString(36), ne = () => `${Math.round(performance.now())}-${be()}-${be()}`, at = 1;
|
|
1292
|
+
class IA {
|
|
1482
1293
|
constructor(t) {
|
|
1483
1294
|
this.destination = null, this.registrar = /* @__PURE__ */ new Map(), this.origin = "", this.channelId = "", this.receiver = this.receive.bind(this), this.preLog = [], this.wnd = t, t.addEventListener("message", this.receiver);
|
|
1484
1295
|
}
|
|
@@ -1552,7 +1363,7 @@ class EA {
|
|
|
1552
1363
|
const n = {
|
|
1553
1364
|
_readium: at,
|
|
1554
1365
|
_channel: this.channelId,
|
|
1555
|
-
id: i ??
|
|
1366
|
+
id: i ?? ne(),
|
|
1556
1367
|
// scrict,
|
|
1557
1368
|
key: t,
|
|
1558
1369
|
data: e
|
|
@@ -1568,7 +1379,7 @@ class EA {
|
|
|
1568
1379
|
}
|
|
1569
1380
|
}
|
|
1570
1381
|
}
|
|
1571
|
-
const
|
|
1382
|
+
const O = class lt {
|
|
1572
1383
|
constructor(t) {
|
|
1573
1384
|
if (typeof t == "string") {
|
|
1574
1385
|
if (!lt.VALID_MODES.has(t.toLowerCase()))
|
|
@@ -1602,7 +1413,7 @@ const L = class lt {
|
|
|
1602
1413
|
return this.value;
|
|
1603
1414
|
}
|
|
1604
1415
|
};
|
|
1605
|
-
|
|
1416
|
+
O.VALID_MODES = /* @__PURE__ */ new Set(["auditory", "tactile", "textual", "visual"]), O.AUDITORY = new O("auditory"), O.TACTILE = new O("tactile"), O.TEXTUAL = new O("textual"), O.VISUAL = new O("visual");
|
|
1606
1417
|
class Me {
|
|
1607
1418
|
/**
|
|
1608
1419
|
* Creates a [Encryption].
|
|
@@ -1631,7 +1442,7 @@ class Me {
|
|
|
1631
1442
|
return this.compression !== void 0 && (t.compression = this.compression), this.originalLength !== void 0 && (t.originalLength = this.originalLength), this.profile !== void 0 && (t.profile = this.profile), this.scheme !== void 0 && (t.scheme = this.scheme), t;
|
|
1632
1443
|
}
|
|
1633
1444
|
}
|
|
1634
|
-
class
|
|
1445
|
+
class P {
|
|
1635
1446
|
constructor(t) {
|
|
1636
1447
|
this.otherProperties = t;
|
|
1637
1448
|
}
|
|
@@ -1643,7 +1454,7 @@ class T {
|
|
|
1643
1454
|
*/
|
|
1644
1455
|
static deserialize(t) {
|
|
1645
1456
|
if (t)
|
|
1646
|
-
return new
|
|
1457
|
+
return new P(t);
|
|
1647
1458
|
}
|
|
1648
1459
|
/**
|
|
1649
1460
|
* Serializes a [Properties] to its RWPM JSON representation.
|
|
@@ -1658,28 +1469,28 @@ class T {
|
|
|
1658
1469
|
const e = Object.assign({}, this.otherProperties);
|
|
1659
1470
|
for (const i in t)
|
|
1660
1471
|
e[i] = t[i];
|
|
1661
|
-
return new
|
|
1472
|
+
return new P(e);
|
|
1662
1473
|
}
|
|
1663
1474
|
}
|
|
1664
|
-
Object.defineProperty(
|
|
1475
|
+
Object.defineProperty(P.prototype, "encryption", {
|
|
1665
1476
|
get: function() {
|
|
1666
1477
|
return Me.deserialize(this.otherProperties.encrypted);
|
|
1667
1478
|
}
|
|
1668
1479
|
});
|
|
1669
|
-
function
|
|
1480
|
+
function yA(r) {
|
|
1670
1481
|
return r && Array.isArray(r) ? r : void 0;
|
|
1671
1482
|
}
|
|
1672
1483
|
function Ii(r) {
|
|
1673
|
-
return r && typeof r == "string" ? [r] :
|
|
1484
|
+
return r && typeof r == "string" ? [r] : yA(r);
|
|
1674
1485
|
}
|
|
1675
|
-
function
|
|
1486
|
+
function je(r) {
|
|
1676
1487
|
return typeof r == "string" ? new Date(r) : void 0;
|
|
1677
1488
|
}
|
|
1678
|
-
function
|
|
1489
|
+
function St(r) {
|
|
1679
1490
|
return isNaN(r) ? void 0 : r;
|
|
1680
1491
|
}
|
|
1681
|
-
function
|
|
1682
|
-
return
|
|
1492
|
+
function T(r) {
|
|
1493
|
+
return St(r) !== void 0 && Math.sign(r) >= 0 ? r : void 0;
|
|
1683
1494
|
}
|
|
1684
1495
|
function FA(r) {
|
|
1685
1496
|
const t = new Array();
|
|
@@ -1696,22 +1507,22 @@ class m {
|
|
|
1696
1507
|
} else
|
|
1697
1508
|
throw new Error("Invalid media type");
|
|
1698
1509
|
const s = {};
|
|
1699
|
-
for (let
|
|
1700
|
-
const M = A[
|
|
1510
|
+
for (let g = 1; g < A.length; g++) {
|
|
1511
|
+
const M = A[g].split("=");
|
|
1701
1512
|
if (M.length === 2) {
|
|
1702
1513
|
const l = M[0].toLocaleLowerCase(), p = l === "charset" ? M[1].toUpperCase() : M[1];
|
|
1703
1514
|
s[l] = p;
|
|
1704
1515
|
}
|
|
1705
1516
|
}
|
|
1706
1517
|
const o = {}, a = Object.keys(s);
|
|
1707
|
-
a.sort((
|
|
1518
|
+
a.sort((g, M) => g.localeCompare(M)), a.forEach((g) => o[g] = s[g]);
|
|
1708
1519
|
let h = "";
|
|
1709
|
-
for (const
|
|
1710
|
-
const M = o[
|
|
1711
|
-
h += `;${
|
|
1520
|
+
for (const g in o) {
|
|
1521
|
+
const M = o[g];
|
|
1522
|
+
h += `;${g}=${M}`;
|
|
1712
1523
|
}
|
|
1713
|
-
const c = `${e}/${i}${h}`,
|
|
1714
|
-
this.string = c, this.type = e, this.subtype = i, this.parameters = o, this.encoding =
|
|
1524
|
+
const c = `${e}/${i}${h}`, d = o.encoding;
|
|
1525
|
+
this.string = c, this.type = e, this.subtype = i, this.parameters = o, this.encoding = d, this.name = t.name, this.fileExtension = t.fileExtension;
|
|
1715
1526
|
}
|
|
1716
1527
|
static parse(t) {
|
|
1717
1528
|
return new m(t);
|
|
@@ -2140,7 +1951,7 @@ class m {
|
|
|
2140
1951
|
});
|
|
2141
1952
|
}
|
|
2142
1953
|
}
|
|
2143
|
-
class
|
|
1954
|
+
class Ve {
|
|
2144
1955
|
constructor(t) {
|
|
2145
1956
|
this.uri = t, this.parameters = this.getParameters(t);
|
|
2146
1957
|
}
|
|
@@ -2168,7 +1979,7 @@ class Pe {
|
|
|
2168
1979
|
return this.uri.replace(/\{(\??)([^}]+)\}/g, (...A) => A[1] ? i(A[2]) : e(A[2]));
|
|
2169
1980
|
}
|
|
2170
1981
|
}
|
|
2171
|
-
class
|
|
1982
|
+
class S {
|
|
2172
1983
|
/**
|
|
2173
1984
|
* Creates a [Locations].
|
|
2174
1985
|
*/
|
|
@@ -2180,7 +1991,7 @@ class C {
|
|
|
2180
1991
|
*/
|
|
2181
1992
|
static deserialize(t) {
|
|
2182
1993
|
if (!t) return;
|
|
2183
|
-
const e =
|
|
1994
|
+
const e = St(t.progression), i = St(t.totalProgression), A = St(t.position), n = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set([
|
|
2184
1995
|
"fragment",
|
|
2185
1996
|
"fragments",
|
|
2186
1997
|
"progression",
|
|
@@ -2189,7 +2000,7 @@ class C {
|
|
|
2189
2000
|
]);
|
|
2190
2001
|
return Object.entries(t).forEach(([o, a]) => {
|
|
2191
2002
|
s.has(o) || n.set(o, a);
|
|
2192
|
-
}), new
|
|
2003
|
+
}), new S({
|
|
2193
2004
|
fragments: Ii(t.fragments || t.fragment),
|
|
2194
2005
|
progression: e !== void 0 && e >= 0 && e <= 1 ? e : void 0,
|
|
2195
2006
|
totalProgression: i !== void 0 && i >= 0 && i <= 1 ? i : void 0,
|
|
@@ -2231,23 +2042,23 @@ class At {
|
|
|
2231
2042
|
return this.after !== void 0 && (t.after = this.after), this.before !== void 0 && (t.before = this.before), this.highlight !== void 0 && (t.highlight = this.highlight), t;
|
|
2232
2043
|
}
|
|
2233
2044
|
}
|
|
2234
|
-
class
|
|
2045
|
+
class L {
|
|
2235
2046
|
/**
|
|
2236
2047
|
* Creates a [Locator].
|
|
2237
2048
|
*/
|
|
2238
2049
|
constructor(t) {
|
|
2239
|
-
this.href = t.href, this.type = t.type, this.title = t.title, this.locations = t.locations ? t.locations : new
|
|
2050
|
+
this.href = t.href, this.type = t.type, this.title = t.title, this.locations = t.locations ? t.locations : new S({}), this.text = t.text;
|
|
2240
2051
|
}
|
|
2241
2052
|
/**
|
|
2242
2053
|
* Parses a [Link] from its RWPM JSON representation.
|
|
2243
2054
|
*/
|
|
2244
2055
|
static deserialize(t) {
|
|
2245
2056
|
if (t && t.href && t.type)
|
|
2246
|
-
return new
|
|
2057
|
+
return new L({
|
|
2247
2058
|
href: t.href,
|
|
2248
2059
|
type: t.type,
|
|
2249
2060
|
title: t.title,
|
|
2250
|
-
locations:
|
|
2061
|
+
locations: S.deserialize(t.locations),
|
|
2251
2062
|
text: At.deserialize(t.text)
|
|
2252
2063
|
});
|
|
2253
2064
|
}
|
|
@@ -2262,12 +2073,12 @@ class O {
|
|
|
2262
2073
|
* Shortcut to get a copy of the [Locator] with different [Locations] sub-properties.
|
|
2263
2074
|
*/
|
|
2264
2075
|
copyWithLocations(t) {
|
|
2265
|
-
return new
|
|
2076
|
+
return new L({
|
|
2266
2077
|
href: this.href,
|
|
2267
2078
|
type: this.type,
|
|
2268
2079
|
title: this.title,
|
|
2269
2080
|
text: this.text,
|
|
2270
|
-
locations: new
|
|
2081
|
+
locations: new S({ ...this.locations, ...t })
|
|
2271
2082
|
});
|
|
2272
2083
|
}
|
|
2273
2084
|
}
|
|
@@ -2289,12 +2100,12 @@ class ct {
|
|
|
2289
2100
|
type: t.type,
|
|
2290
2101
|
title: t.title,
|
|
2291
2102
|
rels: t.rel ? Array.isArray(t.rel) ? new Set(t.rel) : /* @__PURE__ */ new Set([t.rel]) : void 0,
|
|
2292
|
-
properties:
|
|
2293
|
-
height:
|
|
2294
|
-
width:
|
|
2295
|
-
size:
|
|
2296
|
-
duration:
|
|
2297
|
-
bitrate:
|
|
2103
|
+
properties: P.deserialize(t.properties),
|
|
2104
|
+
height: T(t.height),
|
|
2105
|
+
width: T(t.width),
|
|
2106
|
+
size: T(t.size),
|
|
2107
|
+
duration: T(t.duration),
|
|
2108
|
+
bitrate: T(t.bitrate),
|
|
2298
2109
|
languages: Ii(t.language),
|
|
2299
2110
|
alternates: Qt.deserialize(t.alternate),
|
|
2300
2111
|
children: Qt.deserialize(t.children)
|
|
@@ -2322,14 +2133,14 @@ class ct {
|
|
|
2322
2133
|
}
|
|
2323
2134
|
/** List of URI template parameter keys, if the `Link` is templated. */
|
|
2324
2135
|
get templateParameters() {
|
|
2325
|
-
return this.templated ? new
|
|
2136
|
+
return this.templated ? new Ve(this.href).parameters : /* @__PURE__ */ new Set();
|
|
2326
2137
|
}
|
|
2327
2138
|
/** Expands the `Link`'s HREF by replacing URI template variables by the given parameters.
|
|
2328
2139
|
* See RFC 6570 on URI template: https://tools.ietf.org/html/rfc6570
|
|
2329
2140
|
*/
|
|
2330
2141
|
expandTemplate(t) {
|
|
2331
2142
|
return new ct({
|
|
2332
|
-
href: new
|
|
2143
|
+
href: new Ve(this.href).expand(t),
|
|
2333
2144
|
templated: !1
|
|
2334
2145
|
});
|
|
2335
2146
|
}
|
|
@@ -2338,18 +2149,18 @@ class ct {
|
|
|
2338
2149
|
*/
|
|
2339
2150
|
addProperties(t) {
|
|
2340
2151
|
const e = ct.deserialize(this.serialize());
|
|
2341
|
-
return e.properties = e.properties ? e.properties?.add(t) : new
|
|
2152
|
+
return e.properties = e.properties ? e.properties?.add(t) : new P(t), e;
|
|
2342
2153
|
}
|
|
2343
2154
|
/**
|
|
2344
2155
|
* Creates a [Locator] from a reading order [Link].
|
|
2345
2156
|
*/
|
|
2346
2157
|
get locator() {
|
|
2347
2158
|
let t = this.href.split("#");
|
|
2348
|
-
return new
|
|
2159
|
+
return new L({
|
|
2349
2160
|
href: t.length > 0 && t[0] !== void 0 ? t[0] : this.href,
|
|
2350
2161
|
type: this.type ?? "",
|
|
2351
2162
|
title: this.title,
|
|
2352
|
-
locations: new
|
|
2163
|
+
locations: new S({
|
|
2353
2164
|
fragments: t.length > 1 && t[1] !== void 0 ? [t[1]] : []
|
|
2354
2165
|
})
|
|
2355
2166
|
});
|
|
@@ -2449,10 +2260,10 @@ class Qt {
|
|
|
2449
2260
|
return this.items.filter((t) => t.type);
|
|
2450
2261
|
}
|
|
2451
2262
|
}
|
|
2452
|
-
|
|
2263
|
+
P.prototype.getContains = function() {
|
|
2453
2264
|
return new Set(this.otherProperties.contains || []);
|
|
2454
2265
|
};
|
|
2455
|
-
class
|
|
2266
|
+
class Yt {
|
|
2456
2267
|
/**
|
|
2457
2268
|
* Creates a [DomRange].
|
|
2458
2269
|
*/
|
|
@@ -2464,10 +2275,10 @@ class zt {
|
|
|
2464
2275
|
*/
|
|
2465
2276
|
static deserialize(t) {
|
|
2466
2277
|
if (!(t && t.cssSelector)) return;
|
|
2467
|
-
let e =
|
|
2278
|
+
let e = T(t.textNodeIndex);
|
|
2468
2279
|
if (e === void 0) return;
|
|
2469
|
-
let i =
|
|
2470
|
-
return i === void 0 && (i =
|
|
2280
|
+
let i = T(t.charOffset);
|
|
2281
|
+
return i === void 0 && (i = T(t.offset)), new Yt({
|
|
2471
2282
|
cssSelector: t.cssSelector,
|
|
2472
2283
|
textNodeIndex: e,
|
|
2473
2284
|
charOffset: i
|
|
@@ -2496,11 +2307,11 @@ class Be {
|
|
|
2496
2307
|
*/
|
|
2497
2308
|
static deserialize(t) {
|
|
2498
2309
|
if (!t) return;
|
|
2499
|
-
let e =
|
|
2310
|
+
let e = Yt.deserialize(t.start);
|
|
2500
2311
|
if (e)
|
|
2501
2312
|
return new Be({
|
|
2502
2313
|
start: e,
|
|
2503
|
-
end:
|
|
2314
|
+
end: Yt.deserialize(t.end)
|
|
2504
2315
|
});
|
|
2505
2316
|
}
|
|
2506
2317
|
/**
|
|
@@ -2511,16 +2322,16 @@ class Be {
|
|
|
2511
2322
|
return this.end && (t.end = this.end.serialize()), t;
|
|
2512
2323
|
}
|
|
2513
2324
|
}
|
|
2514
|
-
|
|
2325
|
+
S.prototype.getCssSelector = function() {
|
|
2515
2326
|
return this.otherLocations?.get("cssSelector");
|
|
2516
2327
|
};
|
|
2517
|
-
|
|
2328
|
+
S.prototype.getPartialCfi = function() {
|
|
2518
2329
|
return this.otherLocations?.get("partialCfi");
|
|
2519
2330
|
};
|
|
2520
|
-
|
|
2331
|
+
S.prototype.getDomRange = function() {
|
|
2521
2332
|
return Be.deserialize(this.otherLocations?.get("domRange"));
|
|
2522
2333
|
};
|
|
2523
|
-
|
|
2334
|
+
S.prototype.fragmentParameters = function() {
|
|
2524
2335
|
return new Map(
|
|
2525
2336
|
this.fragments.map((r) => r.startsWith("#") ? r.slice(1) : r).join("&").split("&").filter((r) => !r.startsWith("#")).map((r) => r.split("=")).filter((r) => r.length === 2).map((r) => [
|
|
2526
2337
|
r[0].trim().toLowerCase(),
|
|
@@ -2528,7 +2339,7 @@ C.prototype.fragmentParameters = function() {
|
|
|
2528
2339
|
])
|
|
2529
2340
|
);
|
|
2530
2341
|
};
|
|
2531
|
-
|
|
2342
|
+
S.prototype.htmlId = function() {
|
|
2532
2343
|
if (!this.fragments.length) return;
|
|
2533
2344
|
let r = this.fragments.find((t) => t.length && !t.includes("="));
|
|
2534
2345
|
if (!r) {
|
|
@@ -2537,15 +2348,15 @@ C.prototype.htmlId = function() {
|
|
|
2537
2348
|
}
|
|
2538
2349
|
return r?.startsWith("#") ? r.slice(1) : r;
|
|
2539
2350
|
};
|
|
2540
|
-
|
|
2351
|
+
S.prototype.page = function() {
|
|
2541
2352
|
const r = parseInt(this.fragmentParameters().get("page"));
|
|
2542
2353
|
if (!isNaN(r) && r >= 0) return r;
|
|
2543
2354
|
};
|
|
2544
|
-
|
|
2355
|
+
S.prototype.time = function() {
|
|
2545
2356
|
const r = parseInt(this.fragmentParameters().get("t"));
|
|
2546
2357
|
if (!isNaN(r)) return r;
|
|
2547
2358
|
};
|
|
2548
|
-
|
|
2359
|
+
S.prototype.space = function() {
|
|
2549
2360
|
const r = this.fragmentParameters();
|
|
2550
2361
|
if (!r.has("xywh")) return;
|
|
2551
2362
|
const t = r.get("xywh").split(",").map((e) => parseInt(e));
|
|
@@ -2565,7 +2376,7 @@ class we {
|
|
|
2565
2376
|
let e = t.currency;
|
|
2566
2377
|
if (!(e && typeof e == "string" && e.length > 0))
|
|
2567
2378
|
return;
|
|
2568
|
-
let i =
|
|
2379
|
+
let i = T(t.value);
|
|
2569
2380
|
if (i !== void 0)
|
|
2570
2381
|
return new we({ currency: e, value: i });
|
|
2571
2382
|
}
|
|
@@ -2576,7 +2387,7 @@ class we {
|
|
|
2576
2387
|
return { currency: this.currency, value: this.value };
|
|
2577
2388
|
}
|
|
2578
2389
|
}
|
|
2579
|
-
class
|
|
2390
|
+
class pt {
|
|
2580
2391
|
/** Creates a [Acquisition]. */
|
|
2581
2392
|
constructor(t) {
|
|
2582
2393
|
this.type = t.type, this.children = t.children;
|
|
@@ -2586,14 +2397,14 @@ class mt {
|
|
|
2586
2397
|
*/
|
|
2587
2398
|
static deserialize(t) {
|
|
2588
2399
|
if (t && t.type)
|
|
2589
|
-
return new
|
|
2400
|
+
return new pt({
|
|
2590
2401
|
type: t.type,
|
|
2591
|
-
children:
|
|
2402
|
+
children: pt.deserializeArray(t.children)
|
|
2592
2403
|
});
|
|
2593
2404
|
}
|
|
2594
2405
|
static deserializeArray(t) {
|
|
2595
2406
|
if (Array.isArray(t))
|
|
2596
|
-
return t.map((e) =>
|
|
2407
|
+
return t.map((e) => pt.deserialize(e)).filter((e) => e !== void 0);
|
|
2597
2408
|
}
|
|
2598
2409
|
/**
|
|
2599
2410
|
* Serializes a [Acquisition] to its RWPM JSON representation.
|
|
@@ -2614,8 +2425,8 @@ class Ee {
|
|
|
2614
2425
|
static deserialize(t) {
|
|
2615
2426
|
if (t)
|
|
2616
2427
|
return new Ee({
|
|
2617
|
-
total:
|
|
2618
|
-
position:
|
|
2428
|
+
total: T(t.total),
|
|
2429
|
+
position: T(t.position)
|
|
2619
2430
|
});
|
|
2620
2431
|
}
|
|
2621
2432
|
/**
|
|
@@ -2637,8 +2448,8 @@ class Ie {
|
|
|
2637
2448
|
static deserialize(t) {
|
|
2638
2449
|
if (t)
|
|
2639
2450
|
return new Ie({
|
|
2640
|
-
total:
|
|
2641
|
-
available:
|
|
2451
|
+
total: T(t.total),
|
|
2452
|
+
available: T(t.available)
|
|
2642
2453
|
});
|
|
2643
2454
|
}
|
|
2644
2455
|
/**
|
|
@@ -2649,7 +2460,7 @@ class Ie {
|
|
|
2649
2460
|
return this.total !== void 0 && (t.total = this.total), this.available !== void 0 && (t.available = this.available), t;
|
|
2650
2461
|
}
|
|
2651
2462
|
}
|
|
2652
|
-
class
|
|
2463
|
+
class ye {
|
|
2653
2464
|
/** Creates a [Availability]. */
|
|
2654
2465
|
constructor(t) {
|
|
2655
2466
|
this.state = t.state, this.since = t.since, this.until = t.until;
|
|
@@ -2659,10 +2470,10 @@ class Fe {
|
|
|
2659
2470
|
*/
|
|
2660
2471
|
static deserialize(t) {
|
|
2661
2472
|
if (t && t.state)
|
|
2662
|
-
return new
|
|
2473
|
+
return new ye({
|
|
2663
2474
|
state: t.state,
|
|
2664
|
-
since:
|
|
2665
|
-
until:
|
|
2475
|
+
since: je(t.since),
|
|
2476
|
+
until: je(t.until)
|
|
2666
2477
|
});
|
|
2667
2478
|
}
|
|
2668
2479
|
/**
|
|
@@ -2673,42 +2484,42 @@ class Fe {
|
|
|
2673
2484
|
return this.since !== void 0 && (t.since = this.since.toISOString()), this.until !== void 0 && (t.until = this.until.toISOString()), t;
|
|
2674
2485
|
}
|
|
2675
2486
|
}
|
|
2676
|
-
|
|
2677
|
-
return
|
|
2487
|
+
P.prototype.getNumberOfItems = function() {
|
|
2488
|
+
return T(this.otherProperties.numberOfItems);
|
|
2678
2489
|
};
|
|
2679
|
-
|
|
2490
|
+
P.prototype.getPrice = function() {
|
|
2680
2491
|
return we.deserialize(this.otherProperties.price);
|
|
2681
2492
|
};
|
|
2682
|
-
|
|
2493
|
+
P.prototype.getIndirectAcquisitions = function() {
|
|
2683
2494
|
const r = this.otherProperties.indirectAcquisition;
|
|
2684
2495
|
if (r && Array.isArray(r))
|
|
2685
|
-
return r.map((t) =>
|
|
2496
|
+
return r.map((t) => pt.deserialize(t)).filter((t) => t !== void 0);
|
|
2686
2497
|
};
|
|
2687
|
-
|
|
2498
|
+
P.prototype.getHolds = function() {
|
|
2688
2499
|
return Ee.deserialize(this.otherProperties.holds);
|
|
2689
2500
|
};
|
|
2690
|
-
|
|
2501
|
+
P.prototype.getCopies = function() {
|
|
2691
2502
|
return Ie.deserialize(this.otherProperties.copies);
|
|
2692
2503
|
};
|
|
2693
|
-
|
|
2694
|
-
return
|
|
2504
|
+
P.prototype.getAvailability = function() {
|
|
2505
|
+
return ye.deserialize(this.otherProperties.availability);
|
|
2695
2506
|
};
|
|
2696
|
-
|
|
2507
|
+
P.prototype.getAuthenticate = function() {
|
|
2697
2508
|
return ct.deserialize(this.otherProperties.authenticate);
|
|
2698
2509
|
};
|
|
2699
|
-
const
|
|
2510
|
+
const UA = "CssSelectorGenerator";
|
|
2700
2511
|
function ve(r = "unknown problem", ...t) {
|
|
2701
|
-
console.warn(`${
|
|
2512
|
+
console.warn(`${UA}: ${r}`, ...t);
|
|
2702
2513
|
}
|
|
2703
|
-
function
|
|
2514
|
+
function RA(r) {
|
|
2704
2515
|
return r instanceof RegExp;
|
|
2705
2516
|
}
|
|
2706
|
-
function
|
|
2517
|
+
function CA(r) {
|
|
2707
2518
|
return r.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".+");
|
|
2708
2519
|
}
|
|
2709
|
-
function
|
|
2520
|
+
function SA(r) {
|
|
2710
2521
|
const t = r.map((e) => {
|
|
2711
|
-
if (
|
|
2522
|
+
if (RA(e))
|
|
2712
2523
|
return (i) => e.test(i);
|
|
2713
2524
|
if (typeof e == "function")
|
|
2714
2525
|
return (i) => {
|
|
@@ -2716,46 +2527,46 @@ function CA(r) {
|
|
|
2716
2527
|
return typeof A != "boolean" ? (ve("pattern matcher function invalid", "Provided pattern matching function does not return boolean. It's result will be ignored.", e), !1) : A;
|
|
2717
2528
|
};
|
|
2718
2529
|
if (typeof e == "string") {
|
|
2719
|
-
const i = new RegExp("^" +
|
|
2530
|
+
const i = new RegExp("^" + CA(e) + "$");
|
|
2720
2531
|
return (A) => i.test(A);
|
|
2721
2532
|
}
|
|
2722
2533
|
return ve("pattern matcher invalid", "Pattern matching only accepts strings, regular expressions and/or functions. This item is invalid and will be ignored.", e), () => !1;
|
|
2723
2534
|
});
|
|
2724
2535
|
return (e) => t.some((i) => i(e));
|
|
2725
2536
|
}
|
|
2726
|
-
|
|
2537
|
+
SA([
|
|
2727
2538
|
"class",
|
|
2728
2539
|
"id",
|
|
2729
2540
|
// Angular attributes
|
|
2730
2541
|
"ng-*"
|
|
2731
2542
|
]);
|
|
2732
|
-
class
|
|
2543
|
+
class yt {
|
|
2733
2544
|
}
|
|
2734
2545
|
function De(r) {
|
|
2735
2546
|
return r.split("").reverse().join("");
|
|
2736
2547
|
}
|
|
2737
|
-
function
|
|
2548
|
+
function zA(r, t, e) {
|
|
2738
2549
|
const i = De(t);
|
|
2739
2550
|
return e.map((A) => {
|
|
2740
2551
|
const n = Math.max(0, A.end - t.length - A.errors), s = De(r.slice(n, A.end));
|
|
2741
2552
|
return {
|
|
2742
|
-
start:
|
|
2553
|
+
start: yi(s, i, A.errors).reduce((o, a) => A.end - a.end < o ? A.end - a.end : o, A.end),
|
|
2743
2554
|
end: A.end,
|
|
2744
2555
|
errors: A.errors
|
|
2745
2556
|
};
|
|
2746
2557
|
});
|
|
2747
2558
|
}
|
|
2748
|
-
function
|
|
2559
|
+
function Zt(r) {
|
|
2749
2560
|
return (r | -r) >> 31 & 1;
|
|
2750
2561
|
}
|
|
2751
2562
|
function He(r, t, e, i) {
|
|
2752
2563
|
let A = r.P[e], n = r.M[e];
|
|
2753
2564
|
const s = i >>> 31, o = t[e] | s, a = o | n, h = (o & A) + A ^ A | o;
|
|
2754
|
-
let c = n | ~(h | A),
|
|
2755
|
-
const
|
|
2756
|
-
return c <<= 1,
|
|
2565
|
+
let c = n | ~(h | A), d = A & h;
|
|
2566
|
+
const g = Zt(c & r.lastRowMask[e]) - Zt(d & r.lastRowMask[e]);
|
|
2567
|
+
return c <<= 1, d <<= 1, d |= s, c |= Zt(i) - s, A = d | ~(a | c), n = c & a, r.P[e] = A, r.M[e] = n, g;
|
|
2757
2568
|
}
|
|
2758
|
-
function
|
|
2569
|
+
function yi(r, t, e) {
|
|
2759
2570
|
if (t.length === 0)
|
|
2760
2571
|
return [];
|
|
2761
2572
|
e = Math.min(e, t.length);
|
|
@@ -2766,10 +2577,10 @@ function Fi(r, t, e) {
|
|
|
2766
2577
|
};
|
|
2767
2578
|
s.lastRowMask.fill(1 << 31), s.lastRowMask[n] = 1 << (t.length - 1) % A;
|
|
2768
2579
|
const o = new Uint32Array(n + 1), a = /* @__PURE__ */ new Map(), h = [];
|
|
2769
|
-
for (let
|
|
2580
|
+
for (let g = 0; g < 256; g++)
|
|
2770
2581
|
h.push(o);
|
|
2771
|
-
for (let
|
|
2772
|
-
const M = t.charCodeAt(
|
|
2582
|
+
for (let g = 0; g < t.length; g += 1) {
|
|
2583
|
+
const M = t.charCodeAt(g);
|
|
2773
2584
|
if (a.has(M))
|
|
2774
2585
|
continue;
|
|
2775
2586
|
const l = new Uint32Array(n + 1);
|
|
@@ -2783,20 +2594,20 @@ function Fi(r, t, e) {
|
|
|
2783
2594
|
}
|
|
2784
2595
|
}
|
|
2785
2596
|
let c = Math.max(0, Math.ceil(e / A) - 1);
|
|
2786
|
-
const
|
|
2787
|
-
for (let
|
|
2788
|
-
g
|
|
2789
|
-
|
|
2790
|
-
for (let
|
|
2791
|
-
s.P[
|
|
2792
|
-
for (let
|
|
2793
|
-
const M = r.charCodeAt(
|
|
2597
|
+
const d = new Uint32Array(n + 1);
|
|
2598
|
+
for (let g = 0; g <= c; g += 1)
|
|
2599
|
+
d[g] = (g + 1) * A;
|
|
2600
|
+
d[n] = t.length;
|
|
2601
|
+
for (let g = 0; g <= c; g += 1)
|
|
2602
|
+
s.P[g] = -1, s.M[g] = 0;
|
|
2603
|
+
for (let g = 0; g < r.length; g += 1) {
|
|
2604
|
+
const M = r.charCodeAt(g);
|
|
2794
2605
|
let l;
|
|
2795
2606
|
M < h.length ? l = h[M] : (l = a.get(M), typeof l > "u" && (l = o));
|
|
2796
2607
|
let p = 0;
|
|
2797
2608
|
for (let w = 0; w <= c; w += 1)
|
|
2798
|
-
p = He(s, l, w, p),
|
|
2799
|
-
if (
|
|
2609
|
+
p = He(s, l, w, p), d[w] += p;
|
|
2610
|
+
if (d[c] - p <= e && c < n && (l[c + 1] & 1 || p < 0)) {
|
|
2800
2611
|
c += 1, s.P[c] = -1, s.M[c] = 0;
|
|
2801
2612
|
let w;
|
|
2802
2613
|
if (c === n) {
|
|
@@ -2804,23 +2615,23 @@ function Fi(r, t, e) {
|
|
|
2804
2615
|
w = E === 0 ? A : E;
|
|
2805
2616
|
} else
|
|
2806
2617
|
w = A;
|
|
2807
|
-
|
|
2618
|
+
d[c] = d[c - 1] + w - p + He(s, l, c, p);
|
|
2808
2619
|
} else
|
|
2809
|
-
for (; c > 0 &&
|
|
2620
|
+
for (; c > 0 && d[c] >= e + A; )
|
|
2810
2621
|
c -= 1;
|
|
2811
|
-
c === n &&
|
|
2622
|
+
c === n && d[c] <= e && (d[c] < e && i.splice(0, i.length), i.push({
|
|
2812
2623
|
start: -1,
|
|
2813
|
-
end:
|
|
2814
|
-
errors:
|
|
2815
|
-
}), e =
|
|
2624
|
+
end: g + 1,
|
|
2625
|
+
errors: d[c]
|
|
2626
|
+
}), e = d[c]);
|
|
2816
2627
|
}
|
|
2817
2628
|
return i;
|
|
2818
2629
|
}
|
|
2819
2630
|
function QA(r, t, e) {
|
|
2820
|
-
const i =
|
|
2821
|
-
return
|
|
2631
|
+
const i = yi(r, t, e);
|
|
2632
|
+
return zA(r, t, i);
|
|
2822
2633
|
}
|
|
2823
|
-
function
|
|
2634
|
+
function Fi(r, t, e) {
|
|
2824
2635
|
let i = 0;
|
|
2825
2636
|
const A = [];
|
|
2826
2637
|
for (; i !== -1; )
|
|
@@ -2832,12 +2643,12 @@ function yi(r, t, e) {
|
|
|
2832
2643
|
return A.length > 0 ? A : QA(r, t, e);
|
|
2833
2644
|
}
|
|
2834
2645
|
function Ge(r, t) {
|
|
2835
|
-
return t.length === 0 || r.length === 0 ? 0 : 1 -
|
|
2646
|
+
return t.length === 0 || r.length === 0 ? 0 : 1 - Fi(r, t, t.length)[0].errors / t.length;
|
|
2836
2647
|
}
|
|
2837
|
-
function
|
|
2648
|
+
function YA(r, t, e = {}) {
|
|
2838
2649
|
if (t.length === 0)
|
|
2839
2650
|
return null;
|
|
2840
|
-
const i = Math.min(256, t.length / 2), A =
|
|
2651
|
+
const i = Math.min(256, t.length / 2), A = Fi(r, t, i);
|
|
2841
2652
|
if (A.length === 0)
|
|
2842
2653
|
return null;
|
|
2843
2654
|
const n = (o) => {
|
|
@@ -2851,8 +2662,8 @@ function zA(r, t, e = {}) {
|
|
|
2851
2662
|
r.slice(o.end, o.end + e.suffix.length),
|
|
2852
2663
|
e.suffix
|
|
2853
2664
|
) : 1;
|
|
2854
|
-
let
|
|
2855
|
-
return typeof e.hint == "number" && (
|
|
2665
|
+
let d = 1;
|
|
2666
|
+
return typeof e.hint == "number" && (d = 1 - Math.abs(o.start - e.hint) / r.length), (50 * a + 20 * h + 20 * c + 2 * d) / 92;
|
|
2856
2667
|
}, s = A.map((o) => ({
|
|
2857
2668
|
start: o.start,
|
|
2858
2669
|
end: o.end,
|
|
@@ -2860,7 +2671,7 @@ function zA(r, t, e = {}) {
|
|
|
2860
2671
|
}));
|
|
2861
2672
|
return s.sort((o, a) => a.score - o.score), s[0];
|
|
2862
2673
|
}
|
|
2863
|
-
function
|
|
2674
|
+
function re(r, t, e) {
|
|
2864
2675
|
const i = e === 1 ? t : t - 1;
|
|
2865
2676
|
if (r.charAt(i).trim() !== "")
|
|
2866
2677
|
return t;
|
|
@@ -2883,7 +2694,7 @@ function ke(r, t) {
|
|
|
2883
2694
|
const o = () => {
|
|
2884
2695
|
if (n = t === 1 ? e.nextNode() : e.previousNode(), n) {
|
|
2885
2696
|
const a = n.textContent, h = t === 1 ? 0 : a.length;
|
|
2886
|
-
s =
|
|
2697
|
+
s = re(a, h, t);
|
|
2887
2698
|
}
|
|
2888
2699
|
};
|
|
2889
2700
|
for (; n && s === -1 && n !== A; )
|
|
@@ -2892,7 +2703,7 @@ function ke(r, t) {
|
|
|
2892
2703
|
return { node: n, offset: s };
|
|
2893
2704
|
throw new RangeError("No text nodes with non-whitespace text found in range");
|
|
2894
2705
|
}
|
|
2895
|
-
function
|
|
2706
|
+
function NA(r) {
|
|
2896
2707
|
if (!r.toString().trim().length)
|
|
2897
2708
|
throw new RangeError("Range contains no non-whitespace text");
|
|
2898
2709
|
if (r.startContainer.nodeType !== Node.TEXT_NODE)
|
|
@@ -2902,13 +2713,13 @@ function YA(r) {
|
|
|
2902
2713
|
const t = r.cloneRange();
|
|
2903
2714
|
let e = !1, i = !1;
|
|
2904
2715
|
const A = {
|
|
2905
|
-
start:
|
|
2716
|
+
start: re(
|
|
2906
2717
|
r.startContainer.textContent,
|
|
2907
2718
|
r.startOffset,
|
|
2908
2719
|
1
|
|
2909
2720
|
/* Forwards */
|
|
2910
2721
|
),
|
|
2911
|
-
end:
|
|
2722
|
+
end: re(
|
|
2912
2723
|
r.endContainer.textContent,
|
|
2913
2724
|
r.endOffset,
|
|
2914
2725
|
2
|
|
@@ -2965,7 +2776,7 @@ function Ri(r, ...t) {
|
|
|
2965
2776
|
throw new RangeError("Offset exceeds text length");
|
|
2966
2777
|
return A;
|
|
2967
2778
|
}
|
|
2968
|
-
class
|
|
2779
|
+
class k {
|
|
2969
2780
|
constructor(t, e) {
|
|
2970
2781
|
if (e < 0)
|
|
2971
2782
|
throw new Error("Offset is invalid");
|
|
@@ -2983,7 +2794,7 @@ class G {
|
|
|
2983
2794
|
let e = this.element, i = this.offset;
|
|
2984
2795
|
for (; e !== t; )
|
|
2985
2796
|
i += Je(e), e = e.parentElement;
|
|
2986
|
-
return new
|
|
2797
|
+
return new k(e, i);
|
|
2987
2798
|
}
|
|
2988
2799
|
/**
|
|
2989
2800
|
* Resolve the position to a specific text node and offset within that node.
|
|
@@ -3027,9 +2838,9 @@ class G {
|
|
|
3027
2838
|
static fromCharOffset(t, e) {
|
|
3028
2839
|
switch (t.nodeType) {
|
|
3029
2840
|
case Node.TEXT_NODE:
|
|
3030
|
-
return
|
|
2841
|
+
return k.fromPoint(t, e);
|
|
3031
2842
|
case Node.ELEMENT_NODE:
|
|
3032
|
-
return new
|
|
2843
|
+
return new k(t, e);
|
|
3033
2844
|
default:
|
|
3034
2845
|
throw new Error("Node is not an element or text node");
|
|
3035
2846
|
}
|
|
@@ -3048,7 +2859,7 @@ class G {
|
|
|
3048
2859
|
if (!t.parentElement)
|
|
3049
2860
|
throw new Error("Text node has no parent");
|
|
3050
2861
|
const i = Je(t) + e;
|
|
3051
|
-
return new
|
|
2862
|
+
return new k(t.parentElement, i);
|
|
3052
2863
|
}
|
|
3053
2864
|
case Node.ELEMENT_NODE: {
|
|
3054
2865
|
if (e < 0 || e > t.childNodes.length)
|
|
@@ -3056,7 +2867,7 @@ class G {
|
|
|
3056
2867
|
let i = 0;
|
|
3057
2868
|
for (let A = 0; A < e; A++)
|
|
3058
2869
|
i += Ui(t.childNodes[A]);
|
|
3059
|
-
return new
|
|
2870
|
+
return new k(t, i);
|
|
3060
2871
|
}
|
|
3061
2872
|
default:
|
|
3062
2873
|
throw new Error("Point is not in an element or text node");
|
|
@@ -3107,10 +2918,10 @@ class K {
|
|
|
3107
2918
|
* Create a TextRange from a (DOM) Range
|
|
3108
2919
|
*/
|
|
3109
2920
|
static fromRange(t) {
|
|
3110
|
-
const e =
|
|
2921
|
+
const e = k.fromPoint(
|
|
3111
2922
|
t.startContainer,
|
|
3112
2923
|
t.startOffset
|
|
3113
|
-
), i =
|
|
2924
|
+
), i = k.fromPoint(t.endContainer, t.endOffset);
|
|
3114
2925
|
return new K(e, i);
|
|
3115
2926
|
}
|
|
3116
2927
|
/**
|
|
@@ -3119,8 +2930,8 @@ class K {
|
|
|
3119
2930
|
*/
|
|
3120
2931
|
static fromOffsets(t, e, i) {
|
|
3121
2932
|
return new K(
|
|
3122
|
-
new
|
|
3123
|
-
new
|
|
2933
|
+
new k(t, e),
|
|
2934
|
+
new k(t, i)
|
|
3124
2935
|
);
|
|
3125
2936
|
}
|
|
3126
2937
|
/**
|
|
@@ -3128,23 +2939,23 @@ class K {
|
|
|
3128
2939
|
* whitespace
|
|
3129
2940
|
*/
|
|
3130
2941
|
static trimmedRange(t) {
|
|
3131
|
-
return
|
|
2942
|
+
return NA(K.fromRange(t).toRange());
|
|
3132
2943
|
}
|
|
3133
2944
|
}
|
|
3134
|
-
class
|
|
2945
|
+
class Nt {
|
|
3135
2946
|
constructor(t, e, i) {
|
|
3136
2947
|
this.root = t, this.start = e, this.end = i;
|
|
3137
2948
|
}
|
|
3138
2949
|
static fromRange(t, e) {
|
|
3139
2950
|
const i = K.fromRange(e).relativeTo(t);
|
|
3140
|
-
return new
|
|
2951
|
+
return new Nt(
|
|
3141
2952
|
t,
|
|
3142
2953
|
i.start.offset,
|
|
3143
2954
|
i.end.offset
|
|
3144
2955
|
);
|
|
3145
2956
|
}
|
|
3146
2957
|
static fromSelector(t, e) {
|
|
3147
|
-
return new
|
|
2958
|
+
return new Nt(t, e.start, e.end);
|
|
3148
2959
|
}
|
|
3149
2960
|
toSelector() {
|
|
3150
2961
|
return {
|
|
@@ -3157,7 +2968,7 @@ class Yt {
|
|
|
3157
2968
|
return K.fromOffsets(this.root, this.start, this.end).toRange();
|
|
3158
2969
|
}
|
|
3159
2970
|
}
|
|
3160
|
-
class
|
|
2971
|
+
class xt {
|
|
3161
2972
|
/**
|
|
3162
2973
|
* @param root - A root element from which to anchor.
|
|
3163
2974
|
*/
|
|
@@ -3171,14 +2982,14 @@ class Nt {
|
|
|
3171
2982
|
*/
|
|
3172
2983
|
static fromRange(t, e) {
|
|
3173
2984
|
const i = t.textContent, A = K.fromRange(e).relativeTo(t), n = A.start.offset, s = A.end.offset, o = 32;
|
|
3174
|
-
return new
|
|
2985
|
+
return new xt(t, i.slice(n, s), {
|
|
3175
2986
|
prefix: i.slice(Math.max(0, n - o), n),
|
|
3176
2987
|
suffix: i.slice(s, Math.min(i.length, s + o))
|
|
3177
2988
|
});
|
|
3178
2989
|
}
|
|
3179
2990
|
static fromSelector(t, e) {
|
|
3180
2991
|
const { prefix: i, suffix: A } = e;
|
|
3181
|
-
return new
|
|
2992
|
+
return new xt(t, e.exact, { prefix: i, suffix: A });
|
|
3182
2993
|
}
|
|
3183
2994
|
toSelector() {
|
|
3184
2995
|
return {
|
|
@@ -3192,26 +3003,26 @@ class Nt {
|
|
|
3192
3003
|
return this.toPositionAnchor(t).toRange();
|
|
3193
3004
|
}
|
|
3194
3005
|
toPositionAnchor(t = {}) {
|
|
3195
|
-
const e = this.root.textContent, i =
|
|
3006
|
+
const e = this.root.textContent, i = YA(e, this.exact, {
|
|
3196
3007
|
...this.context,
|
|
3197
3008
|
hint: t.hint
|
|
3198
3009
|
});
|
|
3199
3010
|
if (!i)
|
|
3200
3011
|
throw new Error("Quote not found");
|
|
3201
|
-
return new
|
|
3012
|
+
return new Nt(this.root, i.start, i.end);
|
|
3202
3013
|
}
|
|
3203
3014
|
}
|
|
3204
|
-
function
|
|
3015
|
+
function xA(r) {
|
|
3205
3016
|
const t = r.tagName.toUpperCase();
|
|
3206
3017
|
return t === "IMG" || t === "VIDEO" || t === "AUDIO" || t === "IFRAME" || t === "OBJECT" || t === "EMBED" || t === "CANVAS";
|
|
3207
3018
|
}
|
|
3208
|
-
function
|
|
3019
|
+
function Wt(r, t) {
|
|
3209
3020
|
try {
|
|
3210
3021
|
const e = t.locations, i = t.text;
|
|
3211
3022
|
if (i && i.highlight) {
|
|
3212
3023
|
let A;
|
|
3213
3024
|
e && e.getCssSelector() && (A = r.querySelector(e.getCssSelector())), A || (A = r.body);
|
|
3214
|
-
const n = new
|
|
3025
|
+
const n = new xt(A, i.highlight, {
|
|
3215
3026
|
prefix: i.before,
|
|
3216
3027
|
suffix: i.after
|
|
3217
3028
|
});
|
|
@@ -3230,7 +3041,7 @@ function Jt(r, t) {
|
|
|
3230
3041
|
}
|
|
3231
3042
|
if (A) {
|
|
3232
3043
|
const n = r.createRange();
|
|
3233
|
-
return A.childNodes.length === 0 ||
|
|
3044
|
+
return A.childNodes.length === 0 || xA(A) ? (n.selectNode(A), n) : (n.setStartBefore(A), n.setEndAfter(A), n);
|
|
3234
3045
|
}
|
|
3235
3046
|
}
|
|
3236
3047
|
} catch (e) {
|
|
@@ -3238,7 +3049,7 @@ function Jt(r, t) {
|
|
|
3238
3049
|
}
|
|
3239
3050
|
return null;
|
|
3240
3051
|
}
|
|
3241
|
-
function
|
|
3052
|
+
function TA(r, t) {
|
|
3242
3053
|
let e = r.getClientRects();
|
|
3243
3054
|
e.length || r.commonAncestorContainer.nodeType === Node.ELEMENT_NODE && (e = r.commonAncestorContainer.getClientRects());
|
|
3244
3055
|
const i = 1, A = [];
|
|
@@ -3254,7 +3065,7 @@ function xA(r, t) {
|
|
|
3254
3065
|
const n = Ci(
|
|
3255
3066
|
A,
|
|
3256
3067
|
i
|
|
3257
|
-
), s =
|
|
3068
|
+
), s = bA(n, i), o = Si(s), a = 4;
|
|
3258
3069
|
for (let h = o.length - 1; h >= 0; h--) {
|
|
3259
3070
|
const c = o[h];
|
|
3260
3071
|
if (!(c.width * c.height > a))
|
|
@@ -3271,9 +3082,9 @@ function Ci(r, t, e) {
|
|
|
3271
3082
|
const n = r[i], s = r[A];
|
|
3272
3083
|
if (n === s)
|
|
3273
3084
|
continue;
|
|
3274
|
-
const o =
|
|
3275
|
-
if (o && !a &&
|
|
3276
|
-
const h = r.filter((
|
|
3085
|
+
const o = D(n.top, s.top, t) && D(n.bottom, s.bottom, t), a = D(n.left, s.left, t) && D(n.right, s.right, t);
|
|
3086
|
+
if (o && !a && zi(n, s, t)) {
|
|
3087
|
+
const h = r.filter((d) => d !== n && d !== s), c = PA(n, s);
|
|
3277
3088
|
return h.push(c), Ci(
|
|
3278
3089
|
h,
|
|
3279
3090
|
t
|
|
@@ -3282,7 +3093,7 @@ function Ci(r, t, e) {
|
|
|
3282
3093
|
}
|
|
3283
3094
|
return r;
|
|
3284
3095
|
}
|
|
3285
|
-
function
|
|
3096
|
+
function PA(r, t) {
|
|
3286
3097
|
const e = Math.min(r.left, t.left), i = Math.max(r.right, t.right), A = Math.min(r.top, t.top), n = Math.max(r.bottom, t.bottom);
|
|
3287
3098
|
return {
|
|
3288
3099
|
bottom: n,
|
|
@@ -3293,7 +3104,7 @@ function TA(r, t) {
|
|
|
3293
3104
|
width: i - e
|
|
3294
3105
|
};
|
|
3295
3106
|
}
|
|
3296
|
-
function
|
|
3107
|
+
function bA(r, t) {
|
|
3297
3108
|
const e = new Set(r);
|
|
3298
3109
|
for (const i of r) {
|
|
3299
3110
|
if (!(i.width > 1 && i.height > 1)) {
|
|
@@ -3301,24 +3112,24 @@ function jA(r, t) {
|
|
|
3301
3112
|
continue;
|
|
3302
3113
|
}
|
|
3303
3114
|
for (const A of r)
|
|
3304
|
-
if (i !== A && e.has(A) &&
|
|
3115
|
+
if (i !== A && e.has(A) && jA(A, i, t)) {
|
|
3305
3116
|
e.delete(i);
|
|
3306
3117
|
break;
|
|
3307
3118
|
}
|
|
3308
3119
|
}
|
|
3309
3120
|
return Array.from(e);
|
|
3310
3121
|
}
|
|
3311
|
-
function
|
|
3122
|
+
function jA(r, t, e) {
|
|
3312
3123
|
return Ft(r, t.left, t.top, e) && Ft(r, t.right, t.top, e) && Ft(r, t.left, t.bottom, e) && Ft(r, t.right, t.bottom, e);
|
|
3313
3124
|
}
|
|
3314
3125
|
function Ft(r, t, e, i) {
|
|
3315
|
-
return (r.left < t ||
|
|
3126
|
+
return (r.left < t || D(r.left, t, i)) && (r.right > t || D(r.right, t, i)) && (r.top < e || D(r.top, e, i)) && (r.bottom > e || D(r.bottom, e, i));
|
|
3316
3127
|
}
|
|
3317
3128
|
function Si(r) {
|
|
3318
3129
|
for (let t = 0; t < r.length; t++)
|
|
3319
3130
|
for (let e = t + 1; e < r.length; e++) {
|
|
3320
3131
|
const i = r[t], A = r[e];
|
|
3321
|
-
if (i !== A &&
|
|
3132
|
+
if (i !== A && zi(i, A, -1)) {
|
|
3322
3133
|
let n = [], s;
|
|
3323
3134
|
const o = We(i, A);
|
|
3324
3135
|
if (o.length === 1)
|
|
@@ -3395,36 +3206,36 @@ function VA(r, t) {
|
|
|
3395
3206
|
width: Math.max(0, i - e)
|
|
3396
3207
|
};
|
|
3397
3208
|
}
|
|
3398
|
-
function
|
|
3399
|
-
return (r.left < t.right || e >= 0 &&
|
|
3209
|
+
function zi(r, t, e) {
|
|
3210
|
+
return (r.left < t.right || e >= 0 && D(r.left, t.right, e)) && (t.left < r.right || e >= 0 && D(t.left, r.right, e)) && (r.top < t.bottom || e >= 0 && D(r.top, t.bottom, e)) && (t.top < r.bottom || e >= 0 && D(t.top, r.bottom, e));
|
|
3400
3211
|
}
|
|
3401
|
-
function
|
|
3212
|
+
function D(r, t, e) {
|
|
3402
3213
|
return Math.abs(r - t) <= e;
|
|
3403
3214
|
}
|
|
3404
|
-
function
|
|
3215
|
+
function Fe(r) {
|
|
3405
3216
|
const t = {}, e = r.document.documentElement.style;
|
|
3406
3217
|
for (const i in r.document.documentElement.style)
|
|
3407
3218
|
Object.hasOwn(e, i) && !Number.isNaN(Number.parseInt(i)) && (t[e[i]] = e.getPropertyValue(e[i]));
|
|
3408
3219
|
return t;
|
|
3409
3220
|
}
|
|
3410
|
-
function
|
|
3411
|
-
const e =
|
|
3221
|
+
function Qi(r, t) {
|
|
3222
|
+
const e = Fe(r);
|
|
3412
3223
|
Object.keys(e).forEach((i) => {
|
|
3413
|
-
t.hasOwnProperty(i) ||
|
|
3224
|
+
t.hasOwnProperty(i) || Ot(r, i);
|
|
3414
3225
|
}), Object.entries(t).forEach(([i, A]) => {
|
|
3415
|
-
e[i] !== A &&
|
|
3226
|
+
e[i] !== A && Bt(r, i, A);
|
|
3416
3227
|
});
|
|
3417
3228
|
}
|
|
3418
|
-
function
|
|
3229
|
+
function Oe(r, t) {
|
|
3419
3230
|
return r.document.documentElement.style.getPropertyValue(t);
|
|
3420
3231
|
}
|
|
3421
|
-
function
|
|
3232
|
+
function Bt(r, t, e) {
|
|
3422
3233
|
r.document.documentElement.style.setProperty(t, e);
|
|
3423
3234
|
}
|
|
3424
|
-
function
|
|
3235
|
+
function Ot(r, t) {
|
|
3425
3236
|
r.document.documentElement.style.removeProperty(t);
|
|
3426
3237
|
}
|
|
3427
|
-
const
|
|
3238
|
+
const vA = (r) => {
|
|
3428
3239
|
if (r.startsWith("rgb")) {
|
|
3429
3240
|
const t = r.match(/rgb\((\d+),\s(\d+),\s(\d+)(?:,\s(\d+))?\)/);
|
|
3430
3241
|
if (t)
|
|
@@ -3452,18 +3263,18 @@ const PA = (r) => {
|
|
|
3452
3263
|
};
|
|
3453
3264
|
}
|
|
3454
3265
|
return { r: 0, g: 0, b: 0, a: 1 };
|
|
3455
|
-
},
|
|
3456
|
-
const t =
|
|
3457
|
-
return
|
|
3458
|
-
},
|
|
3459
|
-
class
|
|
3266
|
+
}, DA = (r) => 0.2126 * r.r * r.a + 0.7152 * r.g * r.a + 0.0722 * r.b * r.a, HA = (r) => {
|
|
3267
|
+
const t = vA(r);
|
|
3268
|
+
return DA(t) < 128;
|
|
3269
|
+
}, GA = () => "Highlight" in window, Le = ["IMG", "IMAGE", "AUDIO", "VIDEO", "SVG"];
|
|
3270
|
+
class kA {
|
|
3460
3271
|
/**
|
|
3461
3272
|
* Creates a DecorationGroup object
|
|
3462
3273
|
* @param id Unique HTML ID-adhering name of the group
|
|
3463
3274
|
* @param name Human-readable name of the group
|
|
3464
3275
|
*/
|
|
3465
3276
|
constructor(t, e, i, A) {
|
|
3466
|
-
this.wnd = t, this.comms = e, this.id = i, this.name = A, this.items = [], this.lastItemId = 0, this.container = void 0, this.activateable = !1, this.experimentalHighlights = !1, this.currentRender = 0,
|
|
3277
|
+
this.wnd = t, this.comms = e, this.id = i, this.name = A, this.items = [], this.lastItemId = 0, this.container = void 0, this.activateable = !1, this.experimentalHighlights = !1, this.currentRender = 0, GA() && (this.experimentalHighlights = !0, this.notTextFlag = /* @__PURE__ */ new Map());
|
|
3467
3278
|
}
|
|
3468
3279
|
get activeable() {
|
|
3469
3280
|
return this.activateable;
|
|
@@ -3476,13 +3287,13 @@ class GA {
|
|
|
3476
3287
|
* @param decoration Decoration to add
|
|
3477
3288
|
*/
|
|
3478
3289
|
add(t) {
|
|
3479
|
-
const e = `${this.id}-${this.lastItemId++}`, i =
|
|
3290
|
+
const e = `${this.id}-${this.lastItemId++}`, i = Wt(this.wnd.document, t.locator);
|
|
3480
3291
|
if (!i) {
|
|
3481
3292
|
this.comms.log("Can't locate DOM range for decoration", t);
|
|
3482
3293
|
return;
|
|
3483
3294
|
}
|
|
3484
3295
|
const A = i.commonAncestorContainer;
|
|
3485
|
-
A.nodeType !== Node.TEXT_NODE && this.experimentalHighlights && (
|
|
3296
|
+
A.nodeType !== Node.TEXT_NODE && this.experimentalHighlights && (Le.includes(A.nodeName.toUpperCase()) && this.notTextFlag?.set(e, !0), A.querySelector(Le.join(", ").toLowerCase()) && this.notTextFlag?.set(e, !0), (A.textContent?.trim() || "").length === 0 && this.notTextFlag?.set(e, !0));
|
|
3486
3297
|
const n = {
|
|
3487
3298
|
decoration: t,
|
|
3488
3299
|
id: e,
|
|
@@ -3555,27 +3366,27 @@ class GA {
|
|
|
3555
3366
|
} else
|
|
3556
3367
|
l.style.width = `${p.width}px`, l.style.height = `${p.height}px`, l.style.left = `${p.left + o}px`, l.style.top = `${p.top + a}px`;
|
|
3557
3368
|
}, c = t.range.getBoundingClientRect();
|
|
3558
|
-
let
|
|
3559
|
-
const
|
|
3560
|
-
|
|
3369
|
+
let d = this.wnd.document.createElement("template");
|
|
3370
|
+
const g = Oe(this.wnd, "--USER__appearance") === "readium-night-on" || HA(Oe(this.wnd, "--USER__backgroundColor"));
|
|
3371
|
+
d.innerHTML = `
|
|
3561
3372
|
<div
|
|
3562
3373
|
class="r2-highlight-0"
|
|
3563
3374
|
style="${[
|
|
3564
3375
|
`background-color: ${t.decoration?.style?.tint ?? "yellow"} !important`,
|
|
3565
3376
|
//"opacity: 0.3 !important",
|
|
3566
|
-
`mix-blend-mode: ${
|
|
3377
|
+
`mix-blend-mode: ${g ? "exclusion" : "multiply"} !important`,
|
|
3567
3378
|
"opacity: 1 !important",
|
|
3568
3379
|
"box-sizing: border-box !important"
|
|
3569
3380
|
].join("; ")}"
|
|
3570
3381
|
>
|
|
3571
3382
|
</div>
|
|
3572
3383
|
`.trim();
|
|
3573
|
-
const M =
|
|
3384
|
+
const M = d.content.firstElementChild;
|
|
3574
3385
|
if (t.decoration?.style?.layout === "bounds") {
|
|
3575
3386
|
const l = M.cloneNode(!0);
|
|
3576
3387
|
l.style.setProperty("pointer-events", "none"), h(l, c, c), e.append(l);
|
|
3577
3388
|
} else {
|
|
3578
|
-
let l =
|
|
3389
|
+
let l = TA(
|
|
3579
3390
|
t.range
|
|
3580
3391
|
);
|
|
3581
3392
|
l = l.sort((p, w) => p.top < w.top ? -1 : p.top > w.top ? 1 : 0);
|
|
@@ -3613,7 +3424,7 @@ class GA {
|
|
|
3613
3424
|
this.experimentalHighlights && this.wnd.CSS.highlights.delete(this.id), this.container && (this.container.remove(), this.container = void 0);
|
|
3614
3425
|
}
|
|
3615
3426
|
}
|
|
3616
|
-
const Yi = class
|
|
3427
|
+
const Yi = class se extends yt {
|
|
3617
3428
|
constructor() {
|
|
3618
3429
|
super(...arguments), this.resizeFrame = 0, this.lastGroupId = 0, this.groups = /* @__PURE__ */ new Map(), this.handleResizer = this.handleResize.bind(this);
|
|
3619
3430
|
}
|
|
@@ -3628,9 +3439,9 @@ const Yi = class re extends It {
|
|
|
3628
3439
|
}, 50);
|
|
3629
3440
|
}
|
|
3630
3441
|
mount(t, e) {
|
|
3631
|
-
return this.wnd = t, e.register("decorate",
|
|
3442
|
+
return this.wnd = t, e.register("decorate", se.moduleName, (i, A) => {
|
|
3632
3443
|
const n = i;
|
|
3633
|
-
n.decoration && n.decoration.locator && (n.decoration.locator =
|
|
3444
|
+
n.decoration && n.decoration.locator && (n.decoration.locator = L.deserialize(n.decoration.locator)), this.groups.has(n.group) || this.groups.set(n.group, new kA(
|
|
3634
3445
|
t,
|
|
3635
3446
|
e,
|
|
3636
3447
|
`readium-decoration-${this.lastGroupId++}`,
|
|
@@ -3655,12 +3466,12 @@ const Yi = class re extends It {
|
|
|
3655
3466
|
}), this.resizeObserver = new ResizeObserver(() => t.requestAnimationFrame(() => this.handleResize())), this.resizeObserver.observe(t.document.body), t.addEventListener("orientationchange", this.handleResizer), t.addEventListener("resize", this.handleResizer), e.log("Decorator Mounted"), !0;
|
|
3656
3467
|
}
|
|
3657
3468
|
unmount(t, e) {
|
|
3658
|
-
return t.removeEventListener("orientationchange", this.handleResizer), t.removeEventListener("resize", this.handleResizer), e.unregisterAll(
|
|
3469
|
+
return t.removeEventListener("orientationchange", this.handleResizer), t.removeEventListener("resize", this.handleResizer), e.unregisterAll(se.moduleName), this.resizeObserver.disconnect(), this.cleanup(), e.log("Decorator Unmounted"), !0;
|
|
3659
3470
|
}
|
|
3660
3471
|
};
|
|
3661
3472
|
Yi.moduleName = "decorator";
|
|
3662
|
-
let
|
|
3663
|
-
const Xe = "readium-snapper-style", Ni = class
|
|
3473
|
+
let JA = Yi;
|
|
3474
|
+
const Xe = "readium-snapper-style", Ni = class oe extends yt {
|
|
3664
3475
|
constructor() {
|
|
3665
3476
|
super(...arguments), this.protected = !1;
|
|
3666
3477
|
}
|
|
@@ -3673,9 +3484,9 @@ const Xe = "readium-snapper-style", Ni = class se extends It {
|
|
|
3673
3484
|
}
|
|
3674
3485
|
mount(t, e) {
|
|
3675
3486
|
const i = t.document.createElement("style");
|
|
3676
|
-
return i.dataset.readium = "true", i.id = Xe, i.textContent = this.buildStyles(), t.document.head.appendChild(i), e.register("protect",
|
|
3487
|
+
return i.dataset.readium = "true", i.id = Xe, i.textContent = this.buildStyles(), t.document.head.appendChild(i), e.register("protect", oe.moduleName, (A, n) => {
|
|
3677
3488
|
this.protected = !0, i.textContent = this.buildStyles(), n(!0);
|
|
3678
|
-
}), e.register("unprotect",
|
|
3489
|
+
}), e.register("unprotect", oe.moduleName, (A, n) => {
|
|
3679
3490
|
this.protected = !1, i.textContent = this.buildStyles(), n(!0);
|
|
3680
3491
|
}), e.log("Snapper Mounted"), !0;
|
|
3681
3492
|
}
|
|
@@ -3695,7 +3506,7 @@ function xi(r) {
|
|
|
3695
3506
|
).getPropertyValue("column-count")
|
|
3696
3507
|
);
|
|
3697
3508
|
}
|
|
3698
|
-
function
|
|
3509
|
+
function WA(r) {
|
|
3699
3510
|
const t = getComputedStyle(r), e = parseFloat(t.paddingTop || "0"), i = parseFloat(t.paddingBottom || "0");
|
|
3700
3511
|
return r.clientHeight - e - i;
|
|
3701
3512
|
}
|
|
@@ -3710,7 +3521,7 @@ function Ze(r) {
|
|
|
3710
3521
|
if (o > 0)
|
|
3711
3522
|
for (let a = 0; a < o; a++) {
|
|
3712
3523
|
const h = r.document.createElement("div");
|
|
3713
|
-
h.setAttribute("id", `readium-virtual-page-${a}`), h.dataset.readium = "true", CSS.supports("break-before", "column") ? h.style.breakBefore = "column" : (CSS.supports("break-inside", "avoid-column") && (h.style.breakInside = "avoid-column"), h.style.height =
|
|
3524
|
+
h.setAttribute("id", `readium-virtual-page-${a}`), h.dataset.readium = "true", CSS.supports("break-before", "column") ? h.style.breakBefore = "column" : (CSS.supports("break-inside", "avoid-column") && (h.style.breakInside = "avoid-column"), h.style.height = WA(r.document.documentElement) + "px"), h.innerHTML = "​", r.document.body.appendChild(h);
|
|
3714
3525
|
}
|
|
3715
3526
|
return i !== o;
|
|
3716
3527
|
}
|
|
@@ -3718,10 +3529,10 @@ function Ti(r) {
|
|
|
3718
3529
|
const t = r.document.createElement("style");
|
|
3719
3530
|
t.appendChild(r.document.createTextNode("*{}")), r.document.body.appendChild(t), r.document.body.removeChild(t);
|
|
3720
3531
|
}
|
|
3721
|
-
function
|
|
3532
|
+
function OA(r) {
|
|
3722
3533
|
return r < 0.5 ? 2 * r * r : -1 + (4 - 2 * r) * r;
|
|
3723
3534
|
}
|
|
3724
|
-
function
|
|
3535
|
+
function C(r) {
|
|
3725
3536
|
const t = r.getSelection();
|
|
3726
3537
|
t && t.removeAllRanges();
|
|
3727
3538
|
}
|
|
@@ -3739,17 +3550,17 @@ const LA = [
|
|
|
3739
3550
|
"textarea",
|
|
3740
3551
|
"video"
|
|
3741
3552
|
];
|
|
3742
|
-
function
|
|
3743
|
-
return LA.indexOf(r.nodeName.toLowerCase()) !== -1 || r.hasAttribute("contenteditable") && r.getAttribute("contenteditable")?.toLowerCase() !== "false" ? r : r.parentElement ?
|
|
3553
|
+
function Pi(r) {
|
|
3554
|
+
return LA.indexOf(r.nodeName.toLowerCase()) !== -1 || r.hasAttribute("contenteditable") && r.getAttribute("contenteditable")?.toLowerCase() !== "false" ? r : r.parentElement ? Pi(r.parentElement) : null;
|
|
3744
3555
|
}
|
|
3745
3556
|
function Re(r, t) {
|
|
3746
3557
|
const e = bi(r, r.document.body, t), i = r._readium_cssSelectorGenerator.getCssSelector(e, {
|
|
3747
3558
|
selectors: ["tag", "id", "class", "nthchild", "nthoftype", "attribute"]
|
|
3748
3559
|
});
|
|
3749
|
-
return new
|
|
3560
|
+
return new L({
|
|
3750
3561
|
href: "#",
|
|
3751
3562
|
type: "application/xhtml+xml",
|
|
3752
|
-
locations: new
|
|
3563
|
+
locations: new S({
|
|
3753
3564
|
otherLocations: /* @__PURE__ */ new Map([
|
|
3754
3565
|
["cssSelector", i]
|
|
3755
3566
|
])
|
|
@@ -3762,12 +3573,12 @@ function Re(r, t) {
|
|
|
3762
3573
|
function bi(r, t, e) {
|
|
3763
3574
|
for (var i = 0; i < t.children.length; i++) {
|
|
3764
3575
|
const A = t.children[i];
|
|
3765
|
-
if (!
|
|
3766
|
-
return
|
|
3576
|
+
if (!KA(A) && XA(r, A, e))
|
|
3577
|
+
return ZA(r, A) ? A : bi(r, A, e);
|
|
3767
3578
|
}
|
|
3768
3579
|
return t;
|
|
3769
3580
|
}
|
|
3770
|
-
function
|
|
3581
|
+
function XA(r, t, e) {
|
|
3771
3582
|
if (t === document.body || t === document.documentElement)
|
|
3772
3583
|
return !0;
|
|
3773
3584
|
if (!document || !document.documentElement || !document.body)
|
|
@@ -3775,11 +3586,11 @@ function OA(r, t, e) {
|
|
|
3775
3586
|
const i = t.getBoundingClientRect();
|
|
3776
3587
|
return e ? i.bottom > 0 && i.top < r.innerHeight : i.right > 0 && i.left < r.innerWidth;
|
|
3777
3588
|
}
|
|
3778
|
-
function
|
|
3589
|
+
function ZA(r, t) {
|
|
3779
3590
|
const e = t.getBoundingClientRect();
|
|
3780
3591
|
return e.top >= 0 && e.left >= 0 && e.bottom <= r.innerHeight && e.right <= r.innerWidth;
|
|
3781
3592
|
}
|
|
3782
|
-
function
|
|
3593
|
+
function KA(r) {
|
|
3783
3594
|
const t = getComputedStyle(r);
|
|
3784
3595
|
if (t) {
|
|
3785
3596
|
const e = t.getPropertyValue("display");
|
|
@@ -3788,7 +3599,7 @@ function ZA(r) {
|
|
|
3788
3599
|
}
|
|
3789
3600
|
return !1;
|
|
3790
3601
|
}
|
|
3791
|
-
const Ke = "readium-column-snapper-style",
|
|
3602
|
+
const Ke = "readium-column-snapper-style", qA = 200, ji = class b extends Ue {
|
|
3792
3603
|
constructor() {
|
|
3793
3604
|
super(...arguments), this.shakeTimeout = 0, this.snappingCancelled = !1, this.alreadyScrollLeft = 0, this.overscroll = 0, this.cachedScrollWidth = 0, this.touchState = 0, this.startingX = void 0, this.endingX = void 0, this.onTouchStarter = this.onTouchStart.bind(this), this.onTouchEnder = this.onTouchEnd.bind(this), this.onWidthChanger = this.onWidthChange.bind(this), this.onTouchMover = this.onTouchMove.bind(this);
|
|
3794
3605
|
}
|
|
@@ -3832,16 +3643,16 @@ const Ke = "readium-column-snapper-style", KA = 200, Vi = class j extends Ue {
|
|
|
3832
3643
|
), c = this.snapOffset(o + h);
|
|
3833
3644
|
if (t && c !== this.scrollOffset()) {
|
|
3834
3645
|
this.snappingCancelled = !1;
|
|
3835
|
-
const
|
|
3646
|
+
const d = (p, w, E, R) => E > R ? w : p + (w - p) * OA(E / R), g = (
|
|
3836
3647
|
/*Math.abs(startX - (this.useTransform ? currentOffset : 0)) < 10 ? 1 : */
|
|
3837
|
-
|
|
3648
|
+
qA * s
|
|
3838
3649
|
);
|
|
3839
3650
|
let M;
|
|
3840
3651
|
const l = (p) => {
|
|
3841
3652
|
if (this.snappingCancelled) return;
|
|
3842
3653
|
M || (M = p);
|
|
3843
|
-
const w = p - M, E =
|
|
3844
|
-
A.scrollLeft =
|
|
3654
|
+
const w = p - M, E = d(this.overscroll, 0, w, g), R = d(i, c, w, g);
|
|
3655
|
+
A.scrollLeft = R, this.overscroll !== 0 && (A.style.transform = `translate3d(${-E}px, 0px, 0px)`), w < g ? this.wnd.requestAnimationFrame(l) : (this.clearTouches(), A.style.removeProperty("transform"), A.scrollLeft = c, e || this.reportProgress());
|
|
3845
3656
|
};
|
|
3846
3657
|
this.wnd.requestAnimationFrame(l);
|
|
3847
3658
|
} else
|
|
@@ -3881,7 +3692,7 @@ const Ke = "readium-column-snapper-style", KA = 200, Vi = class j extends Ue {
|
|
|
3881
3692
|
}
|
|
3882
3693
|
onTouchMove(t) {
|
|
3883
3694
|
if (this.touchState === 0) return;
|
|
3884
|
-
this.touchState === 1 && (this.touchState = 2,
|
|
3695
|
+
this.touchState === 1 && (this.touchState = 2, C(this.wnd)), this.endingX = t.touches[0].clientX;
|
|
3885
3696
|
const e = this.dragOffset(), i = this.alreadyScrollLeft + e;
|
|
3886
3697
|
i < 0 ? (this.overscroll = i, this.doc().style.transform = `translate3d(${-this.overscroll}px, 0px, 0px)`) : i + this.wnd.innerWidth > this.cachedScrollWidth ? (this.overscroll = i, this.doc().style.transform = `translate3d(${-i}px, 0px, 0px)`) : (this.overscroll = 0, this.doc().style.removeProperty("transform"), this.doc().scrollLeft = this.alreadyScrollLeft + e);
|
|
3887
3698
|
}
|
|
@@ -3930,8 +3741,8 @@ const Ke = "readium-column-snapper-style", KA = 200, Vi = class j extends Ue {
|
|
|
3930
3741
|
}), this.resizeObserver.observe(t.document.body), this.mutationObserver = new MutationObserver((n) => {
|
|
3931
3742
|
for (const s of n)
|
|
3932
3743
|
if (s.target === this.wnd.document.documentElement) {
|
|
3933
|
-
const o = s.oldValue, a = s.target.getAttribute("style"), h = /transform\s*:\s*([^;]+)/, c = o?.match(h),
|
|
3934
|
-
(!c && !
|
|
3744
|
+
const o = s.oldValue, a = s.target.getAttribute("style"), h = /transform\s*:\s*([^;]+)/, c = o?.match(h), d = a?.match(h);
|
|
3745
|
+
(!c && !d || c && !d || c && d && c[1] !== d[1]) && (t.requestAnimationFrame(() => {
|
|
3935
3746
|
t && Ze(t);
|
|
3936
3747
|
}), this.onWidthChange());
|
|
3937
3748
|
} else
|
|
@@ -3941,7 +3752,7 @@ const Ke = "readium-column-snapper-style", KA = 200, Vi = class j extends Ue {
|
|
|
3941
3752
|
const s = this.doc().scrollLeft;
|
|
3942
3753
|
return this.doc().scrollLeft = this.snapOffset(n), s !== this.doc().scrollLeft;
|
|
3943
3754
|
};
|
|
3944
|
-
return t.addEventListener("orientationchange", this.onWidthChanger), t.addEventListener("resize", this.onWidthChanger), t.requestAnimationFrame(() => this.cachedScrollWidth = this.doc().scrollWidth), e.register("go_progression",
|
|
3755
|
+
return t.addEventListener("orientationchange", this.onWidthChanger), t.addEventListener("resize", this.onWidthChanger), t.requestAnimationFrame(() => this.cachedScrollWidth = this.doc().scrollWidth), e.register("go_progression", b.moduleName, (n, s) => {
|
|
3945
3756
|
const o = n;
|
|
3946
3757
|
if (o < 0 || o > 1) {
|
|
3947
3758
|
e.send("error", {
|
|
@@ -3952,25 +3763,25 @@ const Ke = "readium-column-snapper-style", KA = 200, Vi = class j extends Ue {
|
|
|
3952
3763
|
this.wnd.requestAnimationFrame(() => {
|
|
3953
3764
|
this.cachedScrollWidth = this.doc().scrollWidth;
|
|
3954
3765
|
const a = this.cachedScrollWidth, h = tt(t) ? -1 : 1, c = a * o * h;
|
|
3955
|
-
this.doc().scrollLeft = this.snapOffset(c), this.reportProgress(),
|
|
3766
|
+
this.doc().scrollLeft = this.snapOffset(c), this.reportProgress(), C(this.wnd), s(!0);
|
|
3956
3767
|
});
|
|
3957
|
-
}), e.register("go_id",
|
|
3768
|
+
}), e.register("go_id", b.moduleName, (n, s) => {
|
|
3958
3769
|
const o = t.document.getElementById(n);
|
|
3959
3770
|
if (!o) {
|
|
3960
3771
|
s(!1);
|
|
3961
3772
|
return;
|
|
3962
3773
|
}
|
|
3963
3774
|
this.wnd.requestAnimationFrame(() => {
|
|
3964
|
-
this.doc().scrollLeft = this.snapOffset(o.getBoundingClientRect().left + t.scrollX), this.reportProgress(),
|
|
3775
|
+
this.doc().scrollLeft = this.snapOffset(o.getBoundingClientRect().left + t.scrollX), this.reportProgress(), C(this.wnd), s(!0);
|
|
3965
3776
|
});
|
|
3966
|
-
}), e.register("go_text",
|
|
3777
|
+
}), e.register("go_text", b.moduleName, (n, s) => {
|
|
3967
3778
|
let o;
|
|
3968
3779
|
Array.isArray(n) && (n.length > 1 && (o = n[1]), n = n[0]);
|
|
3969
|
-
const a = At.deserialize(n), h =
|
|
3780
|
+
const a = At.deserialize(n), h = Wt(this.wnd.document, new L({
|
|
3970
3781
|
href: t.location.href,
|
|
3971
3782
|
type: "text/html",
|
|
3972
3783
|
text: a,
|
|
3973
|
-
locations: o ? new
|
|
3784
|
+
locations: o ? new S({
|
|
3974
3785
|
otherLocations: /* @__PURE__ */ new Map([
|
|
3975
3786
|
["cssSelector", o]
|
|
3976
3787
|
])
|
|
@@ -3981,54 +3792,54 @@ const Ke = "readium-column-snapper-style", KA = 200, Vi = class j extends Ue {
|
|
|
3981
3792
|
return;
|
|
3982
3793
|
}
|
|
3983
3794
|
this.wnd.requestAnimationFrame(() => {
|
|
3984
|
-
this.doc().scrollLeft = this.snapOffset(h.getBoundingClientRect().left + t.scrollX), this.reportProgress(),
|
|
3795
|
+
this.doc().scrollLeft = this.snapOffset(h.getBoundingClientRect().left + t.scrollX), this.reportProgress(), C(this.wnd), s(!0);
|
|
3985
3796
|
});
|
|
3986
|
-
}), e.register("go_end",
|
|
3797
|
+
}), e.register("go_end", b.moduleName, (n, s) => {
|
|
3987
3798
|
const o = tt(t) ? -1 : 1;
|
|
3988
3799
|
this.wnd.requestAnimationFrame(() => {
|
|
3989
3800
|
this.cachedScrollWidth = this.doc().scrollWidth;
|
|
3990
3801
|
const a = this.cachedScrollWidth * o;
|
|
3991
3802
|
if (this.doc().scrollLeft === a) return s(!1);
|
|
3992
|
-
this.doc().scrollLeft = this.snapOffset(a), this.reportProgress(),
|
|
3803
|
+
this.doc().scrollLeft = this.snapOffset(a), this.reportProgress(), C(this.wnd), s(!0);
|
|
3993
3804
|
});
|
|
3994
|
-
}), e.register("go_start",
|
|
3805
|
+
}), e.register("go_start", b.moduleName, (n, s) => {
|
|
3995
3806
|
this.wnd.requestAnimationFrame(() => {
|
|
3996
3807
|
if (this.doc().scrollLeft === 0) return s(!1);
|
|
3997
|
-
this.doc().scrollLeft = 0, this.reportProgress(),
|
|
3808
|
+
this.doc().scrollLeft = 0, this.reportProgress(), C(this.wnd), s(!0);
|
|
3998
3809
|
});
|
|
3999
|
-
}), e.register("go_prev",
|
|
3810
|
+
}), e.register("go_prev", b.moduleName, (n, s) => {
|
|
4000
3811
|
this.wnd.requestAnimationFrame(() => {
|
|
4001
3812
|
this.cachedScrollWidth = this.doc().scrollWidth;
|
|
4002
3813
|
const o = t.scrollX - t.innerWidth, a = tt(t) ? -(this.cachedScrollWidth - t.innerWidth) : 0, h = A(Math.max(o, a));
|
|
4003
|
-
h && (this.reportProgress(),
|
|
3814
|
+
h && (this.reportProgress(), C(this.wnd)), s(h);
|
|
4004
3815
|
});
|
|
4005
|
-
}), e.register("go_next",
|
|
3816
|
+
}), e.register("go_next", b.moduleName, (n, s) => {
|
|
4006
3817
|
this.wnd.requestAnimationFrame(() => {
|
|
4007
3818
|
this.cachedScrollWidth = this.doc().scrollWidth;
|
|
4008
3819
|
const o = t.scrollX + t.innerWidth, a = tt(t) ? 0 : this.cachedScrollWidth - t.innerWidth, h = A(Math.min(o, a));
|
|
4009
|
-
h && (this.reportProgress(),
|
|
3820
|
+
h && (this.reportProgress(), C(this.wnd)), s(h);
|
|
4010
3821
|
});
|
|
4011
|
-
}), e.register("unfocus",
|
|
4012
|
-
this.snappingCancelled = !0,
|
|
4013
|
-
}), e.register("shake",
|
|
3822
|
+
}), e.register("unfocus", b.moduleName, (n, s) => {
|
|
3823
|
+
this.snappingCancelled = !0, C(this.wnd), s(!0);
|
|
3824
|
+
}), e.register("shake", b.moduleName, (n, s) => {
|
|
4014
3825
|
this.shake(), s(!0);
|
|
4015
|
-
}), e.register("focus",
|
|
3826
|
+
}), e.register("focus", b.moduleName, (n, s) => {
|
|
4016
3827
|
this.wnd.requestAnimationFrame(() => {
|
|
4017
3828
|
this.cachedScrollWidth = this.doc().scrollWidth, this.snapCurrentOffset(!1, !0), this.reportProgress(), s(!0);
|
|
4018
3829
|
});
|
|
4019
|
-
}), e.register("first_visible_locator",
|
|
3830
|
+
}), e.register("first_visible_locator", b.moduleName, (n, s) => {
|
|
4020
3831
|
const o = Re(t, !1);
|
|
4021
3832
|
this.comms.send("first_visible_locator", o.serialize()), s(!0);
|
|
4022
3833
|
}), t.addEventListener("touchstart", this.onTouchStarter, { passive: !0 }), t.addEventListener("touchend", this.onTouchEnder, { passive: !0 }), t.addEventListener("touchmove", this.onTouchMover, { passive: !0 }), t.document.addEventListener("touchstart", () => {
|
|
4023
3834
|
}), e.log("ColumnSnapper Mounted"), !0;
|
|
4024
3835
|
}
|
|
4025
3836
|
unmount(t, e) {
|
|
4026
|
-
return this.snappingCancelled = !0, e.unregisterAll(
|
|
3837
|
+
return this.snappingCancelled = !0, e.unregisterAll(b.moduleName), this.resizeObserver.disconnect(), this.mutationObserver.disconnect(), t.removeEventListener("touchstart", this.onTouchStarter), t.removeEventListener("touchend", this.onTouchEnder), t.removeEventListener("touchmove", this.onTouchMover), t.removeEventListener("orientationchange", this.onWidthChanger), t.removeEventListener("resize", this.onWidthChanger), t.document.getElementById(Ke)?.remove(), e.log("ColumnSnapper Unmounted"), super.unmount(t, e);
|
|
4027
3838
|
}
|
|
4028
3839
|
};
|
|
4029
|
-
|
|
4030
|
-
let
|
|
4031
|
-
const qe = "readium-scroll-snapper-style",
|
|
3840
|
+
ji.moduleName = "column_snapper";
|
|
3841
|
+
let _A = ji;
|
|
3842
|
+
const qe = "readium-scroll-snapper-style", Vi = class V extends Ue {
|
|
4032
3843
|
constructor() {
|
|
4033
3844
|
super(...arguments), this.initialScrollHandled = !1, this.isScrolling = !1, this.lastScrollTop = 0, this.isResizing = !1, this.resizeDebounce = null, this.handleScroll = () => {
|
|
4034
3845
|
if (this.comms.ready && !this.isResizing) {
|
|
@@ -4083,7 +3894,7 @@ const qe = "readium-scroll-snapper-style", Pi = class V extends Ue {
|
|
|
4083
3894
|
return;
|
|
4084
3895
|
}
|
|
4085
3896
|
this.wnd.requestAnimationFrame(() => {
|
|
4086
|
-
this.doc().scrollTop = this.doc().offsetHeight * s, this.reportProgress(),
|
|
3897
|
+
this.doc().scrollTop = this.doc().offsetHeight * s, this.reportProgress(), C(this.wnd), n(!0);
|
|
4087
3898
|
});
|
|
4088
3899
|
}), e.register("go_id", V.moduleName, (A, n) => {
|
|
4089
3900
|
const s = t.document.getElementById(A);
|
|
@@ -4092,16 +3903,16 @@ const qe = "readium-scroll-snapper-style", Pi = class V extends Ue {
|
|
|
4092
3903
|
return;
|
|
4093
3904
|
}
|
|
4094
3905
|
this.wnd.requestAnimationFrame(() => {
|
|
4095
|
-
this.doc().scrollTop = s.getBoundingClientRect().top + t.scrollY - t.innerHeight / 2, this.reportProgress(),
|
|
3906
|
+
this.doc().scrollTop = s.getBoundingClientRect().top + t.scrollY - t.innerHeight / 2, this.reportProgress(), C(this.wnd), n(!0);
|
|
4096
3907
|
});
|
|
4097
3908
|
}), e.register("go_text", V.moduleName, (A, n) => {
|
|
4098
3909
|
let s;
|
|
4099
3910
|
Array.isArray(A) && (A.length > 1 && (s = A[1]), A = A[0]);
|
|
4100
|
-
const o = At.deserialize(A), a =
|
|
3911
|
+
const o = At.deserialize(A), a = Wt(this.wnd.document, new L({
|
|
4101
3912
|
href: t.location.href,
|
|
4102
3913
|
type: "text/html",
|
|
4103
3914
|
text: o,
|
|
4104
|
-
locations: s ? new
|
|
3915
|
+
locations: s ? new S({
|
|
4105
3916
|
otherLocations: /* @__PURE__ */ new Map([
|
|
4106
3917
|
["cssSelector", s]
|
|
4107
3918
|
])
|
|
@@ -4112,7 +3923,7 @@ const qe = "readium-scroll-snapper-style", Pi = class V extends Ue {
|
|
|
4112
3923
|
return;
|
|
4113
3924
|
}
|
|
4114
3925
|
this.wnd.requestAnimationFrame(() => {
|
|
4115
|
-
this.doc().scrollTop = a.getBoundingClientRect().top + t.scrollY - t.innerHeight / 2, this.reportProgress(),
|
|
3926
|
+
this.doc().scrollTop = a.getBoundingClientRect().top + t.scrollY - t.innerHeight / 2, this.reportProgress(), C(this.wnd), n(!0);
|
|
4116
3927
|
});
|
|
4117
3928
|
}), e.register("go_start", V.moduleName, (A, n) => {
|
|
4118
3929
|
if (this.doc().scrollTop === 0) return n(!1);
|
|
@@ -4121,7 +3932,7 @@ const qe = "readium-scroll-snapper-style", Pi = class V extends Ue {
|
|
|
4121
3932
|
if (this.doc().scrollTop === this.doc().scrollHeight - this.doc().offsetHeight) return n(!1);
|
|
4122
3933
|
this.doc().scrollTop = this.doc().scrollHeight - this.doc().offsetHeight, this.reportProgress(), n(!0);
|
|
4123
3934
|
}), e.register("unfocus", V.moduleName, (A, n) => {
|
|
4124
|
-
|
|
3935
|
+
C(this.wnd), n(!0);
|
|
4125
3936
|
}), e.register([
|
|
4126
3937
|
"go_next",
|
|
4127
3938
|
"go_prev"
|
|
@@ -4136,9 +3947,9 @@ const qe = "readium-scroll-snapper-style", Pi = class V extends Ue {
|
|
|
4136
3947
|
return e.unregisterAll(V.moduleName), this.resizeObserver.disconnect(), this.handleScroll && t.removeEventListener("scroll", this.handleScroll), t.document.getElementById(qe)?.remove(), e.log("ScrollSnapper Unmounted"), !0;
|
|
4137
3948
|
}
|
|
4138
3949
|
};
|
|
4139
|
-
|
|
4140
|
-
let
|
|
4141
|
-
const vi = class
|
|
3950
|
+
Vi.moduleName = "scroll_snapper";
|
|
3951
|
+
let $A = Vi;
|
|
3952
|
+
const vi = class v extends Ue {
|
|
4142
3953
|
constructor() {
|
|
4143
3954
|
super(...arguments), this.initialScrollHandled = !1, this.isScrolling = !1, this.lastScrollTop = 0, this.isResizing = !1, this.resizeDebounce = null, this.handleScroll = () => {
|
|
4144
3955
|
if (this.comms.ready && !this.isResizing) {
|
|
@@ -4170,11 +3981,11 @@ const vi = class P extends Ue {
|
|
|
4170
3981
|
this.resizeDebounce && this.wnd.clearTimeout(this.resizeDebounce), this.isResizing = !0, this.resizeDebounce = this.wnd.setTimeout(() => {
|
|
4171
3982
|
this.isResizing = !1, this.resizeDebounce = null, this.reportProgress();
|
|
4172
3983
|
}, 50);
|
|
4173
|
-
}), this.resizeObserver.observe(t.document.body), t.addEventListener("scroll", this.handleScroll, { passive: !0 }), e.register("force_webkit_recalc",
|
|
3984
|
+
}), this.resizeObserver.observe(t.document.body), t.addEventListener("scroll", this.handleScroll, { passive: !0 }), e.register("force_webkit_recalc", v.moduleName, () => {
|
|
4174
3985
|
Ti(this.wnd);
|
|
4175
3986
|
const i = this.doc().scrollTop;
|
|
4176
3987
|
i > 1 ? this.doc().scrollTop = i - 1 : this.doc().scrollTop = i + 1, this.doc().scrollTop = i;
|
|
4177
|
-
}), e.register("go_progression",
|
|
3988
|
+
}), e.register("go_progression", v.moduleName, (i, A) => {
|
|
4178
3989
|
const n = i;
|
|
4179
3990
|
if (n < 0 || n > 1) {
|
|
4180
3991
|
e.send("error", {
|
|
@@ -4183,25 +3994,25 @@ const vi = class P extends Ue {
|
|
|
4183
3994
|
return;
|
|
4184
3995
|
}
|
|
4185
3996
|
this.wnd.requestAnimationFrame(() => {
|
|
4186
|
-
this.doc().scrollTop = this.doc().offsetHeight * n, this.reportProgress(),
|
|
3997
|
+
this.doc().scrollTop = this.doc().offsetHeight * n, this.reportProgress(), C(this.wnd), A(!0);
|
|
4187
3998
|
});
|
|
4188
|
-
}), this.comms.register("go_id",
|
|
3999
|
+
}), this.comms.register("go_id", v.moduleName, (i, A) => {
|
|
4189
4000
|
const n = t.document.getElementById(i);
|
|
4190
4001
|
if (!n) {
|
|
4191
4002
|
A(!1);
|
|
4192
4003
|
return;
|
|
4193
4004
|
}
|
|
4194
4005
|
this.wnd.requestAnimationFrame(() => {
|
|
4195
|
-
this.doc().scrollTop = n.getBoundingClientRect().top + t.scrollY - t.innerHeight / 2, this.reportProgress(),
|
|
4006
|
+
this.doc().scrollTop = n.getBoundingClientRect().top + t.scrollY - t.innerHeight / 2, this.reportProgress(), C(this.wnd), A(!0);
|
|
4196
4007
|
});
|
|
4197
|
-
}), e.register("go_text",
|
|
4008
|
+
}), e.register("go_text", v.moduleName, (i, A) => {
|
|
4198
4009
|
let n;
|
|
4199
4010
|
Array.isArray(i) && (i.length > 1 && (n = i[1]), i = i[0]);
|
|
4200
|
-
const s = At.deserialize(i), o =
|
|
4011
|
+
const s = At.deserialize(i), o = Wt(this.wnd.document, new L({
|
|
4201
4012
|
href: t.location.href,
|
|
4202
4013
|
type: "text/html",
|
|
4203
4014
|
text: s,
|
|
4204
|
-
locations: n ? new
|
|
4015
|
+
locations: n ? new S({
|
|
4205
4016
|
otherLocations: /* @__PURE__ */ new Map([
|
|
4206
4017
|
["cssSelector", n]
|
|
4207
4018
|
])
|
|
@@ -4212,33 +4023,33 @@ const vi = class P extends Ue {
|
|
|
4212
4023
|
return;
|
|
4213
4024
|
}
|
|
4214
4025
|
this.wnd.requestAnimationFrame(() => {
|
|
4215
|
-
this.doc().scrollTop = o.getBoundingClientRect().top + t.scrollY - t.innerHeight / 2, this.reportProgress(),
|
|
4026
|
+
this.doc().scrollTop = o.getBoundingClientRect().top + t.scrollY - t.innerHeight / 2, this.reportProgress(), C(this.wnd), A(!0);
|
|
4216
4027
|
});
|
|
4217
|
-
}), e.register("go_start",
|
|
4028
|
+
}), e.register("go_start", v.moduleName, (i, A) => {
|
|
4218
4029
|
if (this.doc().scrollTop === 0) return A(!1);
|
|
4219
4030
|
this.doc().scrollTop = 0, this.reportProgress(), A(!0);
|
|
4220
|
-
}), e.register("go_end",
|
|
4031
|
+
}), e.register("go_end", v.moduleName, (i, A) => {
|
|
4221
4032
|
if (this.doc().scrollTop === this.doc().scrollHeight - this.doc().offsetHeight) return A(!1);
|
|
4222
4033
|
this.doc().scrollTop = this.doc().scrollHeight - this.doc().offsetHeight, this.reportProgress(), A(!0);
|
|
4223
|
-
}), e.register("unfocus",
|
|
4224
|
-
|
|
4034
|
+
}), e.register("unfocus", v.moduleName, (i, A) => {
|
|
4035
|
+
C(this.wnd), A(!0);
|
|
4225
4036
|
}), e.register([
|
|
4226
4037
|
"go_next",
|
|
4227
4038
|
"go_prev"
|
|
4228
|
-
],
|
|
4039
|
+
], v.moduleName, (i, A) => A(!1)), e.register("focus", v.moduleName, (i, A) => {
|
|
4229
4040
|
this.reportProgress(), A(!0);
|
|
4230
|
-
}), e.register("first_visible_locator",
|
|
4041
|
+
}), e.register("first_visible_locator", v.moduleName, (i, A) => {
|
|
4231
4042
|
const n = Re(t, !0);
|
|
4232
4043
|
e.send("first_visible_locator", n.serialize()), A(!0);
|
|
4233
4044
|
}), e.log("WebPubSnapper Mounted"), !0;
|
|
4234
4045
|
}
|
|
4235
4046
|
unmount(t, e) {
|
|
4236
|
-
return e.unregisterAll(
|
|
4047
|
+
return e.unregisterAll(v.moduleName), this.resizeObserver.disconnect(), this.handleScroll && t.removeEventListener("scroll", this.handleScroll), e.log("WebPubSnapper Unmounted"), !0;
|
|
4237
4048
|
}
|
|
4238
4049
|
};
|
|
4239
4050
|
vi.moduleName = "webpub_snapper";
|
|
4240
|
-
let
|
|
4241
|
-
const Di = class extends
|
|
4051
|
+
let tn = vi;
|
|
4052
|
+
const Di = class extends yt {
|
|
4242
4053
|
constructor() {
|
|
4243
4054
|
super(...arguments), this.pointerMoved = !1, this.onPointerUp = this.onPointUp.bind(this), this.onPointerMove = this.onPointMove.bind(this), this.onPointerDown = this.onPointDown.bind(this), this.onContextMenu = this.onContext.bind(this), this.onClicker = this.onClick.bind(this);
|
|
4244
4055
|
}
|
|
@@ -4270,7 +4081,7 @@ const Di = class extends It {
|
|
|
4270
4081
|
y: t.clientY * i,
|
|
4271
4082
|
targetFrameSrc: this.wnd.location.href,
|
|
4272
4083
|
targetElement: t.target.outerHTML,
|
|
4273
|
-
interactiveElement:
|
|
4084
|
+
interactiveElement: Pi(t.target)?.outerHTML,
|
|
4274
4085
|
cssSelector: this.wnd._readium_cssSelectorGenerator.getCssSelector(t.target)
|
|
4275
4086
|
}), this.pointerMoved = !1;
|
|
4276
4087
|
}
|
|
@@ -4307,8 +4118,8 @@ const Di = class extends It {
|
|
|
4307
4118
|
}
|
|
4308
4119
|
};
|
|
4309
4120
|
Di.moduleName = "peripherals";
|
|
4310
|
-
let
|
|
4311
|
-
const Hi = class
|
|
4121
|
+
let en = Di;
|
|
4122
|
+
const Hi = class ae extends yt {
|
|
4312
4123
|
constructor() {
|
|
4313
4124
|
super(...arguments), this.mediaPlayingCount = 0, this.allAnimations = /* @__PURE__ */ new Set();
|
|
4314
4125
|
}
|
|
@@ -4383,11 +4194,11 @@ const Hi = class oe extends It {
|
|
|
4383
4194
|
writable: !1
|
|
4384
4195
|
}), "getAnimations" in t.document && t.document.getAnimations().forEach((A) => {
|
|
4385
4196
|
A.cancel(), this.allAnimations.add(A);
|
|
4386
|
-
}), e.register("activate",
|
|
4197
|
+
}), e.register("activate", ae.moduleName, (A, n) => {
|
|
4387
4198
|
this.allAnimations.forEach((s) => {
|
|
4388
4199
|
s.cancel(), s.play();
|
|
4389
4200
|
}), n(!0);
|
|
4390
|
-
}), e.register("unfocus",
|
|
4201
|
+
}), e.register("unfocus", ae.moduleName, (A, n) => {
|
|
4391
4202
|
this.pauseAllMedia(t), this.allAnimations.forEach((s) => s.pause()), n(!0);
|
|
4392
4203
|
});
|
|
4393
4204
|
const i = t.document.querySelectorAll("audio,video");
|
|
@@ -4410,7 +4221,7 @@ let Gi = Hi;
|
|
|
4410
4221
|
const _e = "readium-viewport", ki = class et extends Gi {
|
|
4411
4222
|
onViewportWidthChanged(t) {
|
|
4412
4223
|
const e = t.target;
|
|
4413
|
-
|
|
4224
|
+
Bt(e, "--RS__viewportWidth", `${e.innerWidth}px`);
|
|
4414
4225
|
}
|
|
4415
4226
|
mount(t, e) {
|
|
4416
4227
|
if (!super.mount(t, e)) return !1;
|
|
@@ -4421,14 +4232,14 @@ const _e = "readium-viewport", ki = class et extends Gi {
|
|
|
4421
4232
|
), t.document.head.appendChild(i), t.addEventListener("orientationchange", this.onViewportWidthChanged), t.addEventListener("resize", this.onViewportWidthChanged), this.onViewportWidthChanged({
|
|
4422
4233
|
target: t
|
|
4423
4234
|
}), e.register("get_properties", et.moduleName, (A, n) => {
|
|
4424
|
-
|
|
4235
|
+
Fe(t), n(!0);
|
|
4425
4236
|
}), e.register("update_properties", et.moduleName, (A, n) => {
|
|
4426
|
-
A["--RS__viewportWidth"] = `${t.innerWidth}px`,
|
|
4237
|
+
A["--RS__viewportWidth"] = `${t.innerWidth}px`, Qi(t, A), n(!0);
|
|
4427
4238
|
}), e.register("set_property", et.moduleName, (A, n) => {
|
|
4428
4239
|
const s = A;
|
|
4429
|
-
|
|
4240
|
+
Bt(t, s[0], s[1]), n(!0);
|
|
4430
4241
|
}), e.register("remove_property", et.moduleName, (A, n) => {
|
|
4431
|
-
|
|
4242
|
+
Ot(t, A), n(!0);
|
|
4432
4243
|
}), e.register("activate", et.moduleName, (A, n) => {
|
|
4433
4244
|
this.unblock(t), n(!0);
|
|
4434
4245
|
}), e.log("ReflowableSetup Mounted"), !0;
|
|
@@ -4438,7 +4249,7 @@ const _e = "readium-viewport", ki = class et extends Gi {
|
|
|
4438
4249
|
}
|
|
4439
4250
|
};
|
|
4440
4251
|
ki.moduleName = "reflowable_setup";
|
|
4441
|
-
let
|
|
4252
|
+
let An = ki;
|
|
4442
4253
|
const $e = "readium-fixed-style", Ji = class Z extends Gi {
|
|
4443
4254
|
mount(t, e) {
|
|
4444
4255
|
if (!super.mount(t, e)) return !1;
|
|
@@ -4458,11 +4269,11 @@ const $e = "readium-fixed-style", Ji = class Z extends Gi {
|
|
|
4458
4269
|
/*cursor: var() TODO*/
|
|
4459
4270
|
}`, t.document.head.appendChild(i), e.register("set_property", Z.moduleName, (A, n) => {
|
|
4460
4271
|
const s = A;
|
|
4461
|
-
|
|
4272
|
+
Bt(t, s[0], s[1]), n(!0);
|
|
4462
4273
|
}), e.register("remove_property", Z.moduleName, (A, n) => {
|
|
4463
|
-
|
|
4274
|
+
Ot(t, A), n(!0);
|
|
4464
4275
|
}), e.register("first_visible_locator", Z.moduleName, (A, n) => n(!1)), e.register("unfocus", Z.moduleName, (A, n) => {
|
|
4465
|
-
|
|
4276
|
+
C(t), n(!0);
|
|
4466
4277
|
}), e.register([
|
|
4467
4278
|
"focus",
|
|
4468
4279
|
"go_next",
|
|
@@ -4481,8 +4292,8 @@ const $e = "readium-fixed-style", Ji = class Z extends Gi {
|
|
|
4481
4292
|
}
|
|
4482
4293
|
};
|
|
4483
4294
|
Ji.moduleName = "fixed_setup";
|
|
4484
|
-
let
|
|
4485
|
-
const Wi = class it extends
|
|
4295
|
+
let nn = Ji;
|
|
4296
|
+
const Wi = class it extends yt {
|
|
4486
4297
|
wndOnErr(t) {
|
|
4487
4298
|
this.comms?.send("error", {
|
|
4488
4299
|
message: t.message,
|
|
@@ -4497,14 +4308,14 @@ const Wi = class it extends It {
|
|
|
4497
4308
|
this.wndOnErr,
|
|
4498
4309
|
!1
|
|
4499
4310
|
), e.register("get_properties", it.moduleName, (i, A) => {
|
|
4500
|
-
|
|
4311
|
+
Fe(t), A(!0);
|
|
4501
4312
|
}), e.register("update_properties", it.moduleName, (i, A) => {
|
|
4502
|
-
|
|
4313
|
+
Qi(t, i), A(!0);
|
|
4503
4314
|
}), e.register("set_property", it.moduleName, (i, A) => {
|
|
4504
4315
|
const n = i;
|
|
4505
|
-
|
|
4316
|
+
Bt(t, n[0], n[1]), A(!0);
|
|
4506
4317
|
}), e.register("remove_property", it.moduleName, (i, A) => {
|
|
4507
|
-
|
|
4318
|
+
Ot(t, i), A(!0);
|
|
4508
4319
|
}), e.register("activate", it.moduleName, (i, A) => {
|
|
4509
4320
|
A(!0);
|
|
4510
4321
|
}), e.log("WebPubSetup Mounted"), !0;
|
|
@@ -4514,32 +4325,32 @@ const Wi = class it extends It {
|
|
|
4514
4325
|
}
|
|
4515
4326
|
};
|
|
4516
4327
|
Wi.moduleName = "webpub_setup";
|
|
4517
|
-
let
|
|
4518
|
-
const
|
|
4328
|
+
let rn = Wi;
|
|
4329
|
+
const sn = [
|
|
4519
4330
|
"fixed_setup",
|
|
4520
4331
|
"decorator",
|
|
4521
4332
|
"peripherals"
|
|
4522
|
-
],
|
|
4333
|
+
], on = [
|
|
4523
4334
|
"reflowable_setup",
|
|
4524
4335
|
"decorator",
|
|
4525
4336
|
"peripherals",
|
|
4526
4337
|
"column_snapper",
|
|
4527
4338
|
"scroll_snapper"
|
|
4528
|
-
],
|
|
4339
|
+
], an = [
|
|
4529
4340
|
"webpub_setup",
|
|
4530
4341
|
"webpub_snapper",
|
|
4531
4342
|
"decorator",
|
|
4532
4343
|
"peripherals"
|
|
4533
|
-
],
|
|
4344
|
+
], Tt = new Map([
|
|
4534
4345
|
// All modules go here
|
|
4535
|
-
An,
|
|
4536
|
-
en,
|
|
4537
4346
|
nn,
|
|
4538
|
-
|
|
4347
|
+
An,
|
|
4348
|
+
rn,
|
|
4539
4349
|
tn,
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
_A
|
|
4350
|
+
en,
|
|
4351
|
+
JA,
|
|
4352
|
+
_A,
|
|
4353
|
+
$A
|
|
4543
4354
|
].map((r) => [r.moduleName, r]));
|
|
4544
4355
|
class ut {
|
|
4545
4356
|
/**
|
|
@@ -4547,7 +4358,7 @@ class ut {
|
|
|
4547
4358
|
* @param initialModules List of initial modules to load
|
|
4548
4359
|
*/
|
|
4549
4360
|
constructor(t = window, e = []) {
|
|
4550
|
-
this.loadedModules = [], this.wnd = t, this.comms = new
|
|
4361
|
+
this.loadedModules = [], this.wnd = t, this.comms = new IA(t);
|
|
4551
4362
|
const i = [...new Set(e)];
|
|
4552
4363
|
if (i.length) {
|
|
4553
4364
|
if (typeof t > "u")
|
|
@@ -4560,7 +4371,7 @@ class ut {
|
|
|
4560
4371
|
}
|
|
4561
4372
|
}
|
|
4562
4373
|
loadModule(t) {
|
|
4563
|
-
const e =
|
|
4374
|
+
const e = Tt.get(t);
|
|
4564
4375
|
return e === void 0 ? (this.comms.log(`Module "${name}" does not exist in the library`), e) : new e();
|
|
4565
4376
|
}
|
|
4566
4377
|
/**
|
|
@@ -4578,7 +4389,7 @@ class ut {
|
|
|
4578
4389
|
* @returns Success
|
|
4579
4390
|
*/
|
|
4580
4391
|
removeModule(t) {
|
|
4581
|
-
const e =
|
|
4392
|
+
const e = Tt.get(t);
|
|
4582
4393
|
if (e === void 0)
|
|
4583
4394
|
return this.comms.log(`Module "${t}" does not exist in the library`), !1;
|
|
4584
4395
|
const i = this.loadedModules.findIndex((A) => A instanceof e);
|
|
@@ -4591,18 +4402,18 @@ class ut {
|
|
|
4591
4402
|
this.comms.destroy(), this.loadedModules.forEach((t) => t.unmount(this.wnd, this.comms)), this.loadedModules = [];
|
|
4592
4403
|
}
|
|
4593
4404
|
}
|
|
4594
|
-
const
|
|
4595
|
-
class
|
|
4405
|
+
const ln = 1e4;
|
|
4406
|
+
class wt {
|
|
4596
4407
|
constructor(t, e) {
|
|
4597
4408
|
this.registry = /* @__PURE__ */ new Map(), this._ready = !1, this.listenerBuffer = [], this.handler = this.handle.bind(this), this.wnd = t, this.origin = e;
|
|
4598
4409
|
try {
|
|
4599
4410
|
this.channelId = window.crypto.randomUUID();
|
|
4600
4411
|
} catch {
|
|
4601
|
-
this.channelId =
|
|
4412
|
+
this.channelId = ne();
|
|
4602
4413
|
}
|
|
4603
4414
|
this.gc = setInterval(() => {
|
|
4604
4415
|
this.registry.forEach((i, A) => {
|
|
4605
|
-
performance.now() - i.time >
|
|
4416
|
+
performance.now() - i.time > ln && (console.warn(A, "event for", i.key, "was never handled!"), this.registry.delete(A));
|
|
4606
4417
|
});
|
|
4607
4418
|
}, 5e3), window.addEventListener("message", this.handler), this.send("_ping", void 0);
|
|
4608
4419
|
}
|
|
@@ -4650,7 +4461,7 @@ class Bt {
|
|
|
4650
4461
|
* @returns Identifier associated with the message
|
|
4651
4462
|
*/
|
|
4652
4463
|
send(t, e, i, A = !1, n = []) {
|
|
4653
|
-
const s =
|
|
4464
|
+
const s = ne();
|
|
4654
4465
|
return i && this.registry.set(s, {
|
|
4655
4466
|
// Add callback to the registry
|
|
4656
4467
|
cb: i,
|
|
@@ -4671,12 +4482,12 @@ class Bt {
|
|
|
4671
4482
|
), s;
|
|
4672
4483
|
}
|
|
4673
4484
|
}
|
|
4674
|
-
const
|
|
4675
|
-
RS__oldStyleTf:
|
|
4676
|
-
},
|
|
4677
|
-
class
|
|
4485
|
+
const hn = "'Iowan Old Style', Sitka, 'Sitka Text', Palatino, 'Book Antiqua', 'URW Palladio L', P052, serif", cn = {
|
|
4486
|
+
RS__oldStyleTf: hn
|
|
4487
|
+
}, dn = 16, ti = cn.RS__oldStyleTf;
|
|
4488
|
+
class ft {
|
|
4678
4489
|
constructor(t) {
|
|
4679
|
-
this._optimalLineLength = null, this._canvas = document.createElement("canvas"), this._optimalChars = t.optimalChars, this._minChars = t.minChars, this._maxChars = t.maxChars, this._baseFontSize = t.baseFontSize ||
|
|
4490
|
+
this._optimalLineLength = null, this._canvas = document.createElement("canvas"), this._optimalChars = t.optimalChars, this._minChars = t.minChars, this._maxChars = t.maxChars, this._baseFontSize = t.baseFontSize || dn, this._fontFace = t.fontFace || ti, this._sample = t.sample || null, this._pageGutter = t.pageGutter || 0, this._letterSpacing = t.letterSpacing ? Math.round(t.letterSpacing * this._baseFontSize) : 0, this._wordSpacing = t.wordSpacing ? Math.round(t.wordSpacing * this._baseFontSize) : 0, this._isCJK = t.isCJK || !1, this._getRelative = t.getRelative || !1, this._padding = this._pageGutter * 2, this._minDivider = this._minChars && this._minChars < this._optimalChars ? this._optimalChars / this._minChars : this._minChars === null ? null : 1, this._maxMultiplier = this._maxChars && this._maxChars > this._optimalChars ? this._maxChars / this._optimalChars : this._maxChars === null ? null : 1, this._approximatedWordSpaces = ft.approximateWordSpaces(this._optimalChars, this._sample);
|
|
4680
4491
|
}
|
|
4681
4492
|
updateMultipliers() {
|
|
4682
4493
|
this._minDivider = this._minChars && this._minChars < this._optimalChars ? this._optimalChars / this._minChars : this._minChars === null ? null : 1, this._maxMultiplier = this._maxChars && this._maxChars > this._optimalChars ? this._maxChars / this._optimalChars : this._maxChars === null ? null : 1;
|
|
@@ -4685,7 +4496,7 @@ class pt {
|
|
|
4685
4496
|
// Not filtering because pretty much everything can
|
|
4686
4497
|
// trigger a recomputation anyway.
|
|
4687
4498
|
update(t) {
|
|
4688
|
-
t.optimalChars && (this._optimalChars = t.optimalChars), t.minChars !== void 0 && (this._minChars = t.minChars), t.maxChars !== void 0 && (this._maxChars = t.maxChars), t.baseFontSize && (this._baseFontSize = t.baseFontSize), t.fontFace !== void 0 && (this._fontFace = t.fontFace || ti), t.letterSpacing && (this._letterSpacing = t.letterSpacing), t.wordSpacing && (this._wordSpacing = t.wordSpacing), t.isCJK != null && (this._isCJK = t.isCJK), t.pageGutter && (this._pageGutter = t.pageGutter), t.getRelative && (this._getRelative = t.getRelative), t.sample && (this._sample = t.sample, this._approximatedWordSpaces =
|
|
4499
|
+
t.optimalChars && (this._optimalChars = t.optimalChars), t.minChars !== void 0 && (this._minChars = t.minChars), t.maxChars !== void 0 && (this._maxChars = t.maxChars), t.baseFontSize && (this._baseFontSize = t.baseFontSize), t.fontFace !== void 0 && (this._fontFace = t.fontFace || ti), t.letterSpacing && (this._letterSpacing = t.letterSpacing), t.wordSpacing && (this._wordSpacing = t.wordSpacing), t.isCJK != null && (this._isCJK = t.isCJK), t.pageGutter && (this._pageGutter = t.pageGutter), t.getRelative && (this._getRelative = t.getRelative), t.sample && (this._sample = t.sample, this._approximatedWordSpaces = ft.approximateWordSpaces(this._optimalChars, this._sample)), this.updateMultipliers(), this._optimalLineLength = this.getOptimalLineLength();
|
|
4689
4500
|
}
|
|
4690
4501
|
get baseFontSize() {
|
|
4691
4502
|
return this._baseFontSize;
|
|
@@ -4741,7 +4552,7 @@ class pt {
|
|
|
4741
4552
|
if (e.font = `${this._baseFontSize}px ${t}`, this._sample && this._sample.length >= this._optimalChars && (i = this._sample.slice(0, this._optimalChars)), Object.hasOwn(e, "letterSpacing") && Object.hasOwn(e, "wordSpacing"))
|
|
4742
4553
|
return e.letterSpacing = this._letterSpacing.toString() + "px", e.wordSpacing = this._wordSpacing.toString() + "px", e.measureText(i).width;
|
|
4743
4554
|
{
|
|
4744
|
-
const A = this._letterSpacing * (this._optimalChars - 1), n = this._wordSpacing *
|
|
4555
|
+
const A = this._letterSpacing * (this._optimalChars - 1), n = this._wordSpacing * ft.approximateWordSpaces(this._optimalChars, this._sample);
|
|
4745
4556
|
return e.measureText(i).width + A + n;
|
|
4746
4557
|
}
|
|
4747
4558
|
} else
|
|
@@ -4758,10 +4569,10 @@ class pt {
|
|
|
4758
4569
|
* Portions of this code come from the sML library
|
|
4759
4570
|
* Current version: 1.0.36
|
|
4760
4571
|
*/
|
|
4761
|
-
const
|
|
4572
|
+
const Oi = () => typeof navigator > "u" ? "" : navigator.userAgent || "", Li = () => typeof navigator > "u" ? void 0 : navigator.userAgentData || void 0;
|
|
4762
4573
|
class Xi {
|
|
4763
4574
|
constructor() {
|
|
4764
|
-
const t =
|
|
4575
|
+
const t = Li(), e = Oi(), i = (n) => (typeof n == "string" || typeof n == "number") && n ? String(n).replace(/_/g, ".").split(".").map((s) => parseInt(s) || 0) : [], A = (n = "") => {
|
|
4765
4576
|
if (!n) return [];
|
|
4766
4577
|
const s = new RegExp("^.*" + n + "[ :\\/]?(\\d+([\\._]\\d+)*).*$");
|
|
4767
4578
|
return s.test(e) ? i(e.replace(s, "$1")) : [];
|
|
@@ -4794,15 +4605,15 @@ class Xi {
|
|
|
4794
4605
|
}
|
|
4795
4606
|
class gn extends Xi {
|
|
4796
4607
|
get iOSRequest() {
|
|
4797
|
-
const t =
|
|
4608
|
+
const t = Li(), e = Oi();
|
|
4798
4609
|
if (this.OS.iOS && !this.OS.iPadOS)
|
|
4799
4610
|
return "mobile";
|
|
4800
4611
|
if (this.OS.iPadOS)
|
|
4801
4612
|
return /\(iPad;/.test(e) || t && /^iPad(OS)?$/.test(t.platform) ? "mobile" : "desktop";
|
|
4802
4613
|
}
|
|
4803
4614
|
}
|
|
4804
|
-
const
|
|
4805
|
-
class
|
|
4615
|
+
const Mt = new Xi(), U = new gn();
|
|
4616
|
+
class un {
|
|
4806
4617
|
constructor(t) {
|
|
4807
4618
|
this.hidden = !0, this.destroyed = !1, this.currModules = [], this.frame = document.createElement("iframe"), this.frame.classList.add("readium-navigator-iframe"), this.frame.style.visibility = "hidden", this.frame.style.setProperty("aria-hidden", "true"), this.frame.style.opacity = "0", this.frame.style.position = "absolute", this.frame.style.pointerEvents = "none", this.frame.style.transition = "visibility 0s, opacity 0.1s linear", this.frame.style.backgroundColor = "#FFFFFF", this.source = t;
|
|
4808
4619
|
}
|
|
@@ -4856,11 +4667,11 @@ class dn {
|
|
|
4856
4667
|
async show(t) {
|
|
4857
4668
|
if (this.destroyed) throw Error("Trying to show frame when it doesn't exist");
|
|
4858
4669
|
if (!this.frame.parentElement) throw Error("Trying to show frame that is not attached to the DOM");
|
|
4859
|
-
return this.comms ? this.comms.resume() : this.comms = new
|
|
4670
|
+
return this.comms ? this.comms.resume() : this.comms = new wt(this.frame.contentWindow, this.source), new Promise((e, i) => {
|
|
4860
4671
|
this.comms?.send("activate", void 0, () => {
|
|
4861
4672
|
this.comms?.send("focus", void 0, () => {
|
|
4862
4673
|
const A = () => {
|
|
4863
|
-
this.frame.style.removeProperty("visibility"), this.frame.style.removeProperty("aria-hidden"), this.frame.style.removeProperty("opacity"), this.frame.style.removeProperty("pointer-events"), this.hidden = !1,
|
|
4674
|
+
this.frame.style.removeProperty("visibility"), this.frame.style.removeProperty("aria-hidden"), this.frame.style.removeProperty("opacity"), this.frame.style.removeProperty("pointer-events"), this.hidden = !1, Mt.UA.WebKit && this.comms?.send("force_webkit_recalc", void 0), e();
|
|
4864
4675
|
};
|
|
4865
4676
|
t !== void 0 ? this.comms?.send("go_progression", t, A) : A();
|
|
4866
4677
|
});
|
|
@@ -4868,7 +4679,7 @@ class dn {
|
|
|
4868
4679
|
});
|
|
4869
4680
|
}
|
|
4870
4681
|
setCSSProperties(t) {
|
|
4871
|
-
this.destroyed || !this.frame.contentWindow || (this.hidden && (this.comms ? this.comms?.resume() : this.comms = new
|
|
4682
|
+
this.destroyed || !this.frame.contentWindow || (this.hidden && (this.comms ? this.comms?.resume() : this.comms = new wt(this.frame.contentWindow, this.source)), this.comms?.send("update_properties", t), this.hidden && this.comms?.halt());
|
|
4872
4683
|
}
|
|
4873
4684
|
get iframe() {
|
|
4874
4685
|
if (this.destroyed) throw Error("Trying to use frame when it doesn't exist");
|
|
@@ -4889,7 +4700,7 @@ class dn {
|
|
|
4889
4700
|
return this.loader;
|
|
4890
4701
|
}
|
|
4891
4702
|
}
|
|
4892
|
-
class
|
|
4703
|
+
class mn {
|
|
4893
4704
|
constructor(t, e) {
|
|
4894
4705
|
this.pool = /* @__PURE__ */ new Map(), this.blobs = /* @__PURE__ */ new Map(), this.inprogress = /* @__PURE__ */ new Map(), this.pendingUpdates = /* @__PURE__ */ new Map(), this.container = t, this.currentCssProperties = e;
|
|
4895
4706
|
}
|
|
@@ -4913,13 +4724,13 @@ class un {
|
|
|
4913
4724
|
const s = A[n].href;
|
|
4914
4725
|
this.inprogress.has(s) && await this.inprogress.get(s);
|
|
4915
4726
|
const o = new Promise(async (a, h) => {
|
|
4916
|
-
const c = [],
|
|
4727
|
+
const c = [], d = [];
|
|
4917
4728
|
t.readingOrder.items.forEach((l, p) => {
|
|
4918
|
-
p !== n && p !== n - 1 && p !== n + 1 && (c.includes(l.href) || c.push(l.href)), p === n && (
|
|
4729
|
+
p !== n && p !== n - 1 && p !== n + 1 && (c.includes(l.href) || c.push(l.href)), p === n && (d.includes(l.href) || d.push(l.href));
|
|
4919
4730
|
}), c.forEach(async (l) => {
|
|
4920
|
-
|
|
4731
|
+
d.includes(l) || this.pool.has(l) && (await this.pool.get(l)?.destroy(), this.pool.delete(l));
|
|
4921
4732
|
}), this.currentBaseURL !== void 0 && t.baseURL !== this.currentBaseURL && (this.blobs.forEach((l) => URL.revokeObjectURL(l)), this.blobs.clear()), this.currentBaseURL = t.baseURL;
|
|
4922
|
-
const
|
|
4733
|
+
const g = async (l) => {
|
|
4923
4734
|
if (this.pendingUpdates.has(l) && this.pendingUpdates.get(l)?.inPool === !1) {
|
|
4924
4735
|
const E = this.blobs.get(l);
|
|
4925
4736
|
E && (URL.revokeObjectURL(E), this.blobs.delete(l), this.pendingUpdates.delete(l));
|
|
@@ -4936,14 +4747,14 @@ class un {
|
|
|
4936
4747
|
const p = t.readingOrder.findWithHref(l);
|
|
4937
4748
|
if (!p) return;
|
|
4938
4749
|
if (!this.blobs.has(l)) {
|
|
4939
|
-
const
|
|
4940
|
-
this.blobs.set(l,
|
|
4750
|
+
const R = await new wA(t, this.currentBaseURL || "", p, this.currentCssProperties).build();
|
|
4751
|
+
this.blobs.set(l, R);
|
|
4941
4752
|
}
|
|
4942
|
-
const w = new
|
|
4753
|
+
const w = new un(this.blobs.get(l));
|
|
4943
4754
|
l !== s && await w.hide(), this.container.appendChild(w.iframe), await w.load(i), this.pool.set(l, w);
|
|
4944
4755
|
};
|
|
4945
4756
|
try {
|
|
4946
|
-
await Promise.all(
|
|
4757
|
+
await Promise.all(d.map((l) => g(l)));
|
|
4947
4758
|
} catch (l) {
|
|
4948
4759
|
h(l);
|
|
4949
4760
|
}
|
|
@@ -4993,41 +4804,41 @@ class un {
|
|
|
4993
4804
|
}), t;
|
|
4994
4805
|
}
|
|
4995
4806
|
}
|
|
4996
|
-
var
|
|
4997
|
-
function
|
|
4998
|
-
if (ei) return
|
|
4807
|
+
var Kt, ei;
|
|
4808
|
+
function pn() {
|
|
4809
|
+
if (ei) return Kt;
|
|
4999
4810
|
ei = 1;
|
|
5000
4811
|
function r(A) {
|
|
5001
4812
|
if (typeof A != "string")
|
|
5002
4813
|
throw new TypeError("Path must be a string. Received " + JSON.stringify(A));
|
|
5003
4814
|
}
|
|
5004
4815
|
function t(A, n) {
|
|
5005
|
-
for (var s = "", o = 0, a = -1, h = 0, c,
|
|
5006
|
-
if (
|
|
5007
|
-
c = A.charCodeAt(
|
|
4816
|
+
for (var s = "", o = 0, a = -1, h = 0, c, d = 0; d <= A.length; ++d) {
|
|
4817
|
+
if (d < A.length)
|
|
4818
|
+
c = A.charCodeAt(d);
|
|
5008
4819
|
else {
|
|
5009
4820
|
if (c === 47)
|
|
5010
4821
|
break;
|
|
5011
4822
|
c = 47;
|
|
5012
4823
|
}
|
|
5013
4824
|
if (c === 47) {
|
|
5014
|
-
if (!(a ===
|
|
4825
|
+
if (!(a === d - 1 || h === 1)) if (a !== d - 1 && h === 2) {
|
|
5015
4826
|
if (s.length < 2 || o !== 2 || s.charCodeAt(s.length - 1) !== 46 || s.charCodeAt(s.length - 2) !== 46) {
|
|
5016
4827
|
if (s.length > 2) {
|
|
5017
|
-
var
|
|
5018
|
-
if (
|
|
5019
|
-
|
|
4828
|
+
var g = s.lastIndexOf("/");
|
|
4829
|
+
if (g !== s.length - 1) {
|
|
4830
|
+
g === -1 ? (s = "", o = 0) : (s = s.slice(0, g), o = s.length - 1 - s.lastIndexOf("/")), a = d, h = 0;
|
|
5020
4831
|
continue;
|
|
5021
4832
|
}
|
|
5022
4833
|
} else if (s.length === 2 || s.length === 1) {
|
|
5023
|
-
s = "", o = 0, a =
|
|
4834
|
+
s = "", o = 0, a = d, h = 0;
|
|
5024
4835
|
continue;
|
|
5025
4836
|
}
|
|
5026
4837
|
}
|
|
5027
4838
|
n && (s.length > 0 ? s += "/.." : s = "..", o = 2);
|
|
5028
4839
|
} else
|
|
5029
|
-
s.length > 0 ? s += "/" + A.slice(a + 1,
|
|
5030
|
-
a =
|
|
4840
|
+
s.length > 0 ? s += "/" + A.slice(a + 1, d) : s = A.slice(a + 1, d), o = d - a - 1;
|
|
4841
|
+
a = d, h = 0;
|
|
5031
4842
|
} else c === 46 && h !== -1 ? ++h : h = -1;
|
|
5032
4843
|
}
|
|
5033
4844
|
return s;
|
|
@@ -5068,9 +4879,9 @@ function mn() {
|
|
|
5068
4879
|
;
|
|
5069
4880
|
for (var a = n.length, h = a - o, c = 1; c < s.length && s.charCodeAt(c) === 47; ++c)
|
|
5070
4881
|
;
|
|
5071
|
-
for (var
|
|
4882
|
+
for (var d = s.length, g = d - c, M = h < g ? h : g, l = -1, p = 0; p <= M; ++p) {
|
|
5072
4883
|
if (p === M) {
|
|
5073
|
-
if (
|
|
4884
|
+
if (g > M) {
|
|
5074
4885
|
if (s.charCodeAt(c + p) === 47)
|
|
5075
4886
|
return s.slice(c + p + 1);
|
|
5076
4887
|
if (p === 0)
|
|
@@ -5083,10 +4894,10 @@ function mn() {
|
|
|
5083
4894
|
break;
|
|
5084
4895
|
w === 47 && (l = p);
|
|
5085
4896
|
}
|
|
5086
|
-
var
|
|
4897
|
+
var R = "";
|
|
5087
4898
|
for (p = o + l + 1; p <= a; ++p)
|
|
5088
|
-
(p === a || n.charCodeAt(p) === 47) && (
|
|
5089
|
-
return
|
|
4899
|
+
(p === a || n.charCodeAt(p) === 47) && (R.length === 0 ? R += ".." : R += "/..");
|
|
4900
|
+
return R.length > 0 ? R + s.slice(c + l) : (c += l, s.charCodeAt(c) === 47 && ++c, s.slice(c));
|
|
5090
4901
|
},
|
|
5091
4902
|
_makeLong: function(n) {
|
|
5092
4903
|
return n;
|
|
@@ -5109,7 +4920,7 @@ function mn() {
|
|
|
5109
4920
|
var o = 0, a = -1, h = !0, c;
|
|
5110
4921
|
if (s !== void 0 && s.length > 0 && s.length <= n.length) {
|
|
5111
4922
|
if (s.length === n.length && s === n) return "";
|
|
5112
|
-
var
|
|
4923
|
+
var d = s.length - 1, g = -1;
|
|
5113
4924
|
for (c = n.length - 1; c >= 0; --c) {
|
|
5114
4925
|
var M = n.charCodeAt(c);
|
|
5115
4926
|
if (M === 47) {
|
|
@@ -5118,9 +4929,9 @@ function mn() {
|
|
|
5118
4929
|
break;
|
|
5119
4930
|
}
|
|
5120
4931
|
} else
|
|
5121
|
-
|
|
4932
|
+
g === -1 && (h = !1, g = c + 1), d >= 0 && (M === s.charCodeAt(d) ? --d === -1 && (a = c) : (d = -1, a = g));
|
|
5122
4933
|
}
|
|
5123
|
-
return o === a ? a =
|
|
4934
|
+
return o === a ? a = g : a === -1 && (a = n.length), n.slice(o, a);
|
|
5124
4935
|
} else {
|
|
5125
4936
|
for (c = n.length - 1; c >= 0; --c)
|
|
5126
4937
|
if (n.charCodeAt(c) === 47) {
|
|
@@ -5134,16 +4945,16 @@ function mn() {
|
|
|
5134
4945
|
},
|
|
5135
4946
|
extname: function(n) {
|
|
5136
4947
|
r(n);
|
|
5137
|
-
for (var s = -1, o = 0, a = -1, h = !0, c = 0,
|
|
5138
|
-
var
|
|
5139
|
-
if (
|
|
4948
|
+
for (var s = -1, o = 0, a = -1, h = !0, c = 0, d = n.length - 1; d >= 0; --d) {
|
|
4949
|
+
var g = n.charCodeAt(d);
|
|
4950
|
+
if (g === 47) {
|
|
5140
4951
|
if (!h) {
|
|
5141
|
-
o =
|
|
4952
|
+
o = d + 1;
|
|
5142
4953
|
break;
|
|
5143
4954
|
}
|
|
5144
4955
|
continue;
|
|
5145
4956
|
}
|
|
5146
|
-
a === -1 && (h = !1, a =
|
|
4957
|
+
a === -1 && (h = !1, a = d + 1), g === 46 ? s === -1 ? s = d : c !== 1 && (c = 1) : s !== -1 && (c = -1);
|
|
5147
4958
|
}
|
|
5148
4959
|
return s === -1 || a === -1 || // We saw a non-dot character immediately before the dot
|
|
5149
4960
|
c === 0 || // The (right-most) trimmed path component is exactly '..'
|
|
@@ -5160,28 +4971,28 @@ function mn() {
|
|
|
5160
4971
|
if (n.length === 0) return s;
|
|
5161
4972
|
var o = n.charCodeAt(0), a = o === 47, h;
|
|
5162
4973
|
a ? (s.root = "/", h = 1) : h = 0;
|
|
5163
|
-
for (var c = -1,
|
|
4974
|
+
for (var c = -1, d = 0, g = -1, M = !0, l = n.length - 1, p = 0; l >= h; --l) {
|
|
5164
4975
|
if (o = n.charCodeAt(l), o === 47) {
|
|
5165
4976
|
if (!M) {
|
|
5166
|
-
|
|
4977
|
+
d = l + 1;
|
|
5167
4978
|
break;
|
|
5168
4979
|
}
|
|
5169
4980
|
continue;
|
|
5170
4981
|
}
|
|
5171
|
-
|
|
4982
|
+
g === -1 && (M = !1, g = l + 1), o === 46 ? c === -1 ? c = l : p !== 1 && (p = 1) : c !== -1 && (p = -1);
|
|
5172
4983
|
}
|
|
5173
|
-
return c === -1 ||
|
|
4984
|
+
return c === -1 || g === -1 || // We saw a non-dot character immediately before the dot
|
|
5174
4985
|
p === 0 || // The (right-most) trimmed path component is exactly '..'
|
|
5175
|
-
p === 1 && c ===
|
|
4986
|
+
p === 1 && c === g - 1 && c === d + 1 ? g !== -1 && (d === 0 && a ? s.base = s.name = n.slice(1, g) : s.base = s.name = n.slice(d, g)) : (d === 0 && a ? (s.name = n.slice(1, c), s.base = n.slice(1, g)) : (s.name = n.slice(d, c), s.base = n.slice(d, g)), s.ext = n.slice(c, g)), d > 0 ? s.dir = n.slice(0, d - 1) : a && (s.dir = "/"), s;
|
|
5176
4987
|
},
|
|
5177
4988
|
sep: "/",
|
|
5178
4989
|
delimiter: ":",
|
|
5179
4990
|
win32: null,
|
|
5180
4991
|
posix: null
|
|
5181
4992
|
};
|
|
5182
|
-
return i.posix = i,
|
|
4993
|
+
return i.posix = i, Kt = i, Kt;
|
|
5183
4994
|
}
|
|
5184
|
-
var
|
|
4995
|
+
var Pt = pn();
|
|
5185
4996
|
class Ce {
|
|
5186
4997
|
constructor() {
|
|
5187
4998
|
}
|
|
@@ -5211,14 +5022,14 @@ class Ce {
|
|
|
5211
5022
|
}
|
|
5212
5023
|
class Zi extends Ce {
|
|
5213
5024
|
constructor(t) {
|
|
5214
|
-
super(), this.a11yNormalize = t.a11yNormalize ?? null, this.bodyHyphens = t.bodyHyphens ?? null, this.fontFamily = t.fontFamily ?? null, this.fontWeight = t.fontWeight ?? null, this.letterSpacing = t.letterSpacing ?? null, this.ligatures = t.ligatures ?? null, this.lineHeight = t.lineHeight ?? null, this.noRuby = t.noRuby ?? null, this.paraIndent = t.paraIndent ?? null, this.paraSpacing = t.paraSpacing ?? null, this.textAlign = t.textAlign ?? null, this.wordSpacing = t.wordSpacing ?? null, this.zoom = t.zoom ?? null;
|
|
5025
|
+
super(), this.a11yNormalize = t.a11yNormalize ?? null, this.bodyHyphens = t.bodyHyphens ?? null, this.fontFamily = t.fontFamily ?? null, this.fontWeight = t.fontWeight ?? null, this.iOSPatch = t.iOSPatch ?? null, this.iPadOSPatch = t.iPadOSPatch ?? null, this.letterSpacing = t.letterSpacing ?? null, this.ligatures = t.ligatures ?? null, this.lineHeight = t.lineHeight ?? null, this.noRuby = t.noRuby ?? null, this.paraIndent = t.paraIndent ?? null, this.paraSpacing = t.paraSpacing ?? null, this.textAlign = t.textAlign ?? null, this.wordSpacing = t.wordSpacing ?? null, this.zoom = t.zoom ?? null;
|
|
5215
5026
|
}
|
|
5216
5027
|
toCSSProperties() {
|
|
5217
5028
|
const t = {};
|
|
5218
|
-
return this.a11yNormalize && (t["--USER__a11yNormalize"] = this.toFlag("a11y")), this.bodyHyphens && (t["--USER__bodyHyphens"] = this.bodyHyphens), this.fontFamily && (t["--USER__fontFamily"] = this.fontFamily), this.fontWeight != null && (t["--USER__fontWeight"] = this.toUnitless(this.fontWeight)), this.letterSpacing != null && (t["--USER__letterSpacing"] = this.toRem(this.letterSpacing)), this.ligatures && (t["--USER__ligatures"] = this.ligatures), this.lineHeight != null && (t["--USER__lineHeight"] = this.toUnitless(this.lineHeight)), this.noRuby && (t["--USER__noRuby"] = this.toFlag("noRuby")), this.paraIndent != null && (t["--USER__paraIndent"] = this.toRem(this.paraIndent)), this.paraSpacing != null && (t["--USER__paraSpacing"] = this.toRem(this.paraSpacing)), this.textAlign && (t["--USER__textAlign"] = this.textAlign), this.wordSpacing != null && (t["--USER__wordSpacing"] = this.toRem(this.wordSpacing)), this.zoom !== null && (t["--USER__zoom"] = this.toPercentage(this.zoom, !0)), t;
|
|
5029
|
+
return this.a11yNormalize && (t["--USER__a11yNormalize"] = this.toFlag("a11y")), this.bodyHyphens && (t["--USER__bodyHyphens"] = this.bodyHyphens), this.fontFamily && (t["--USER__fontFamily"] = this.fontFamily), this.fontWeight != null && (t["--USER__fontWeight"] = this.toUnitless(this.fontWeight)), this.iOSPatch && (t["--USER__iOSPatch"] = this.toFlag("iOSPatch")), this.iPadOSPatch && (t["--USER__iPadOSPatch"] = this.toFlag("iPadOSPatch")), this.letterSpacing != null && (t["--USER__letterSpacing"] = this.toRem(this.letterSpacing)), this.ligatures && (t["--USER__ligatures"] = this.ligatures), this.lineHeight != null && (t["--USER__lineHeight"] = this.toUnitless(this.lineHeight)), this.noRuby && (t["--USER__noRuby"] = this.toFlag("noRuby")), this.paraIndent != null && (t["--USER__paraIndent"] = this.toRem(this.paraIndent)), this.paraSpacing != null && (t["--USER__paraSpacing"] = this.toRem(this.paraSpacing)), this.textAlign && (t["--USER__textAlign"] = this.textAlign), this.wordSpacing != null && (t["--USER__wordSpacing"] = this.toRem(this.wordSpacing)), this.zoom !== null && (t["--USER__zoom"] = this.toPercentage(this.zoom, !0)), t;
|
|
5219
5030
|
}
|
|
5220
5031
|
}
|
|
5221
|
-
class
|
|
5032
|
+
class fn {
|
|
5222
5033
|
constructor(t) {
|
|
5223
5034
|
this.userProperties = t.userProperties;
|
|
5224
5035
|
}
|
|
@@ -5228,6 +5039,8 @@ class pn {
|
|
|
5228
5039
|
bodyHyphens: typeof t.hyphens != "boolean" ? null : t.hyphens ? "auto" : "none",
|
|
5229
5040
|
fontFamily: t.fontFamily,
|
|
5230
5041
|
fontWeight: t.fontWeight,
|
|
5042
|
+
iOSPatch: t.iOSPatch,
|
|
5043
|
+
iPadOSPatch: t.iPadOSPatch,
|
|
5231
5044
|
letterSpacing: t.letterSpacing,
|
|
5232
5045
|
ligatures: typeof t.ligatures != "boolean" ? null : t.ligatures ? "common-ligatures" : "none",
|
|
5233
5046
|
lineHeight: t.lineHeight,
|
|
@@ -5245,54 +5058,54 @@ var X = /* @__PURE__ */ ((r) => (r.start = "start", r.left = "left", r.right = "
|
|
|
5245
5058
|
const nt = {
|
|
5246
5059
|
range: [0, 100],
|
|
5247
5060
|
step: 1
|
|
5248
|
-
},
|
|
5061
|
+
}, bt = {
|
|
5249
5062
|
range: [0.7, 4],
|
|
5250
5063
|
step: 0.05
|
|
5251
5064
|
}, $ = {
|
|
5252
5065
|
range: [100, 1e3],
|
|
5253
5066
|
step: 100
|
|
5254
|
-
},
|
|
5067
|
+
}, jt = {
|
|
5255
5068
|
range: [50, 250],
|
|
5256
5069
|
step: 10
|
|
5257
5070
|
}, Vt = {
|
|
5258
5071
|
range: [0, 1],
|
|
5259
5072
|
step: 0.125
|
|
5260
|
-
},
|
|
5073
|
+
}, vt = {
|
|
5261
5074
|
range: [1, 2],
|
|
5262
5075
|
step: 0.1
|
|
5263
5076
|
}, rt = {
|
|
5264
5077
|
range: [20, 100],
|
|
5265
5078
|
step: 1
|
|
5266
|
-
}, vt = {
|
|
5267
|
-
range: [0, 3],
|
|
5268
|
-
step: 0.25
|
|
5269
5079
|
}, Dt = {
|
|
5270
5080
|
range: [0, 3],
|
|
5271
5081
|
step: 0.25
|
|
5272
5082
|
}, Ht = {
|
|
5083
|
+
range: [0, 3],
|
|
5084
|
+
step: 0.25
|
|
5085
|
+
}, Gt = {
|
|
5273
5086
|
range: [0, 2],
|
|
5274
5087
|
step: 0.125
|
|
5275
|
-
},
|
|
5088
|
+
}, kt = {
|
|
5276
5089
|
range: [0.7, 4],
|
|
5277
5090
|
step: 0.05
|
|
5278
5091
|
};
|
|
5279
|
-
function
|
|
5092
|
+
function Mn(r, t) {
|
|
5280
5093
|
return r == null || t == null || r <= t ? r : void 0;
|
|
5281
5094
|
}
|
|
5282
|
-
function
|
|
5095
|
+
function Bn(r, t) {
|
|
5283
5096
|
return r == null || t == null || r >= t ? r : void 0;
|
|
5284
5097
|
}
|
|
5285
|
-
function
|
|
5098
|
+
function Y(r) {
|
|
5286
5099
|
return typeof r == "string" ? r : r === null ? null : void 0;
|
|
5287
5100
|
}
|
|
5288
|
-
function
|
|
5101
|
+
function y(r) {
|
|
5289
5102
|
return typeof r == "boolean" || r == null ? r : void 0;
|
|
5290
5103
|
}
|
|
5291
5104
|
function Lt(r, t) {
|
|
5292
5105
|
if (r !== void 0)
|
|
5293
5106
|
return r === null ? null : t[r] !== void 0 ? r : void 0;
|
|
5294
5107
|
}
|
|
5295
|
-
function
|
|
5108
|
+
function dt(r) {
|
|
5296
5109
|
return typeof r == "boolean" || typeof r == "number" && r >= 0 ? r : r === null ? null : void 0;
|
|
5297
5110
|
}
|
|
5298
5111
|
function I(r) {
|
|
@@ -5307,12 +5120,12 @@ function J(r, t) {
|
|
|
5307
5120
|
const e = Math.min(...t), i = Math.max(...t);
|
|
5308
5121
|
return r >= e && r <= i ? r : void 0;
|
|
5309
5122
|
}
|
|
5310
|
-
function
|
|
5123
|
+
function qt(r, t) {
|
|
5311
5124
|
return r === void 0 ? t : r;
|
|
5312
5125
|
}
|
|
5313
|
-
class
|
|
5126
|
+
class Et {
|
|
5314
5127
|
constructor(t = {}) {
|
|
5315
|
-
this.fontFamily =
|
|
5128
|
+
this.fontFamily = Y(t.fontFamily), this.fontWeight = J(t.fontWeight, $.range), this.hyphens = y(t.hyphens), this.iOSPatch = y(t.iOSPatch), this.iPadOSPatch = y(t.iPadOSPatch), this.letterSpacing = I(t.letterSpacing), this.ligatures = y(t.ligatures), this.lineHeight = I(t.lineHeight), this.noRuby = y(t.noRuby), this.paragraphIndent = I(t.paragraphIndent), this.paragraphSpacing = I(t.paragraphSpacing), this.textAlign = Lt(t.textAlign, X), this.textNormalization = y(t.textNormalization), this.wordSpacing = I(t.wordSpacing), this.zoom = J(t.zoom, kt.range);
|
|
5316
5129
|
}
|
|
5317
5130
|
static serialize(t) {
|
|
5318
5131
|
const { ...e } = t;
|
|
@@ -5321,7 +5134,7 @@ class wt {
|
|
|
5321
5134
|
static deserialize(t) {
|
|
5322
5135
|
try {
|
|
5323
5136
|
const e = JSON.parse(t);
|
|
5324
|
-
return new
|
|
5137
|
+
return new Et(e);
|
|
5325
5138
|
} catch (e) {
|
|
5326
5139
|
return console.error("Failed to deserialize preferences:", e), null;
|
|
5327
5140
|
}
|
|
@@ -5330,20 +5143,20 @@ class wt {
|
|
|
5330
5143
|
const e = { ...this };
|
|
5331
5144
|
for (const i of Object.keys(t))
|
|
5332
5145
|
t[i] !== void 0 && (e[i] = t[i]);
|
|
5333
|
-
return new
|
|
5146
|
+
return new Et(e);
|
|
5334
5147
|
}
|
|
5335
5148
|
}
|
|
5336
|
-
class
|
|
5149
|
+
class wn {
|
|
5337
5150
|
constructor(t) {
|
|
5338
|
-
this.fontFamily =
|
|
5151
|
+
this.fontFamily = Y(t.fontFamily) || null, this.fontWeight = J(t.fontWeight, $.range) || null, this.hyphens = y(t.hyphens) ?? null, this.iOSPatch = t.iOSPatch === !1 ? !1 : (U.OS.iOS || U.OS.iPadOS) && U.iOSRequest === "mobile", this.iPadOSPatch = t.iPadOSPatch === !1 ? !1 : U.OS.iPadOS && U.iOSRequest === "desktop", this.letterSpacing = I(t.letterSpacing) || null, this.ligatures = y(t.ligatures) ?? null, this.lineHeight = I(t.lineHeight) || null, this.noRuby = y(t.noRuby) ?? !1, this.paragraphIndent = I(t.paragraphIndent) ?? null, this.paragraphSpacing = I(t.paragraphSpacing) ?? null, this.textAlign = Lt(t.textAlign, X) || null, this.textNormalization = y(t.textNormalization) ?? !1, this.wordSpacing = I(t.wordSpacing) || null, this.zoom = J(t.zoom, kt.range) || 1;
|
|
5339
5152
|
}
|
|
5340
5153
|
}
|
|
5341
5154
|
class ii {
|
|
5342
5155
|
constructor(t, e, i) {
|
|
5343
|
-
this.fontFamily = null, this.fontWeight = null, this.hyphens = null, this.letterSpacing = null, this.ligatures = null, this.lineHeight = null, this.noRuby = null, this.paragraphIndent = null, this.paragraphSpacing = null, this.textAlign = null, this.textNormalization = null, this.wordSpacing = null, i && (this.fontFamily = t.fontFamily || e.fontFamily || null, this.fontWeight = t.fontWeight !== void 0 ? t.fontWeight : e.fontWeight !== void 0 ? e.fontWeight : null, this.hyphens = typeof t.hyphens == "boolean" ? t.hyphens : e.hyphens ?? null, this.letterSpacing = t.letterSpacing !== void 0 ? t.letterSpacing : e.letterSpacing !== void 0 ? e.letterSpacing : null, this.ligatures = typeof t.ligatures == "boolean" ? t.ligatures : e.ligatures ?? null, this.lineHeight = t.lineHeight !== void 0 ? t.lineHeight : e.lineHeight !== void 0 ? e.lineHeight : null, this.noRuby = typeof t.noRuby == "boolean" ? t.noRuby : e.noRuby ?? null, this.paragraphIndent = t.paragraphIndent !== void 0 ? t.paragraphIndent : e.paragraphIndent !== void 0 ? e.paragraphIndent : null, this.paragraphSpacing = t.paragraphSpacing !== void 0 ? t.paragraphSpacing : e.paragraphSpacing !== void 0 ? e.paragraphSpacing : null, this.textAlign = t.textAlign || e.textAlign || null, this.textNormalization = typeof t.textNormalization == "boolean" ? t.textNormalization : e.textNormalization ?? null, this.wordSpacing = t.wordSpacing !== void 0 ? t.wordSpacing : e.wordSpacing !== void 0 ? e.wordSpacing : null), this.zoom = t.zoom !== void 0 ? t.zoom : e.zoom !== void 0 ? e.zoom : null;
|
|
5156
|
+
this.fontFamily = null, this.fontWeight = null, this.hyphens = null, this.iOSPatch = null, this.iPadOSPatch = null, this.letterSpacing = null, this.ligatures = null, this.lineHeight = null, this.noRuby = null, this.paragraphIndent = null, this.paragraphSpacing = null, this.textAlign = null, this.textNormalization = null, this.wordSpacing = null, i && (this.fontFamily = t.fontFamily || e.fontFamily || null, this.fontWeight = t.fontWeight !== void 0 ? t.fontWeight : e.fontWeight !== void 0 ? e.fontWeight : null, this.hyphens = typeof t.hyphens == "boolean" ? t.hyphens : e.hyphens ?? null, this.iOSPatch = t.iOSPatch === !1 ? !1 : t.iOSPatch === !0 ? (U.OS.iOS || U.OS.iPadOS) && U.iOSRequest === "mobile" : e.iOSPatch, this.iPadOSPatch = t.iPadOSPatch === !1 ? !1 : t.iPadOSPatch === !0 ? U.OS.iPadOS && U.iOSRequest === "desktop" : e.iPadOSPatch, this.letterSpacing = t.letterSpacing !== void 0 ? t.letterSpacing : e.letterSpacing !== void 0 ? e.letterSpacing : null, this.ligatures = typeof t.ligatures == "boolean" ? t.ligatures : e.ligatures ?? null, this.lineHeight = t.lineHeight !== void 0 ? t.lineHeight : e.lineHeight !== void 0 ? e.lineHeight : null, this.noRuby = typeof t.noRuby == "boolean" ? t.noRuby : e.noRuby ?? null, this.paragraphIndent = t.paragraphIndent !== void 0 ? t.paragraphIndent : e.paragraphIndent !== void 0 ? e.paragraphIndent : null, this.paragraphSpacing = t.paragraphSpacing !== void 0 ? t.paragraphSpacing : e.paragraphSpacing !== void 0 ? e.paragraphSpacing : null, this.textAlign = t.textAlign || e.textAlign || null, this.textNormalization = typeof t.textNormalization == "boolean" ? t.textNormalization : e.textNormalization ?? null, this.wordSpacing = t.wordSpacing !== void 0 ? t.wordSpacing : e.wordSpacing !== void 0 ? e.wordSpacing : null), this.zoom = t.zoom !== void 0 ? t.zoom : e.zoom !== void 0 ? e.zoom : null;
|
|
5344
5157
|
}
|
|
5345
5158
|
}
|
|
5346
|
-
class
|
|
5159
|
+
class Q {
|
|
5347
5160
|
constructor({
|
|
5348
5161
|
initialValue: t = null,
|
|
5349
5162
|
effectiveValue: e,
|
|
@@ -5368,7 +5181,7 @@ class S {
|
|
|
5368
5181
|
this._value = null;
|
|
5369
5182
|
}
|
|
5370
5183
|
}
|
|
5371
|
-
class
|
|
5184
|
+
class z extends Q {
|
|
5372
5185
|
set value(t) {
|
|
5373
5186
|
this._value = t, this._onChange(this._value);
|
|
5374
5187
|
}
|
|
@@ -5388,7 +5201,7 @@ class Y extends S {
|
|
|
5388
5201
|
this._value = !this._value, this._onChange(this._value);
|
|
5389
5202
|
}
|
|
5390
5203
|
}
|
|
5391
|
-
class Ki extends
|
|
5204
|
+
class Ki extends Q {
|
|
5392
5205
|
constructor({
|
|
5393
5206
|
initialValue: t = null,
|
|
5394
5207
|
effectiveValue: e,
|
|
@@ -5419,7 +5232,7 @@ class Ki extends S {
|
|
|
5419
5232
|
this._value = null;
|
|
5420
5233
|
}
|
|
5421
5234
|
}
|
|
5422
|
-
class
|
|
5235
|
+
class F extends Q {
|
|
5423
5236
|
constructor({
|
|
5424
5237
|
initialValue: t = null,
|
|
5425
5238
|
effectiveValue: e,
|
|
@@ -5474,18 +5287,18 @@ class Ai {
|
|
|
5474
5287
|
this.preferences = t, this.settings = e, this.metadata = i;
|
|
5475
5288
|
}
|
|
5476
5289
|
clear() {
|
|
5477
|
-
this.preferences = new
|
|
5290
|
+
this.preferences = new Et({});
|
|
5478
5291
|
}
|
|
5479
5292
|
updatePreference(t, e) {
|
|
5480
5293
|
this.preferences[t] = e;
|
|
5481
5294
|
}
|
|
5482
5295
|
get isDisplayTransformable() {
|
|
5483
5296
|
return this.metadata?.accessibility?.feature?.some(
|
|
5484
|
-
(t) => t.value ===
|
|
5297
|
+
(t) => t.value === gi.DISPLAY_TRANSFORMABILITY.value
|
|
5485
5298
|
) ?? !1;
|
|
5486
5299
|
}
|
|
5487
5300
|
get fontFamily() {
|
|
5488
|
-
return new
|
|
5301
|
+
return new Q({
|
|
5489
5302
|
initialValue: this.preferences.fontFamily,
|
|
5490
5303
|
effectiveValue: this.settings.fontFamily || null,
|
|
5491
5304
|
isEffective: this.isDisplayTransformable,
|
|
@@ -5495,7 +5308,7 @@ class Ai {
|
|
|
5495
5308
|
});
|
|
5496
5309
|
}
|
|
5497
5310
|
get fontWeight() {
|
|
5498
|
-
return new
|
|
5311
|
+
return new F({
|
|
5499
5312
|
initialValue: this.preferences.fontWeight,
|
|
5500
5313
|
effectiveValue: this.settings.fontWeight || 400,
|
|
5501
5314
|
isEffective: this.isDisplayTransformable,
|
|
@@ -5507,7 +5320,7 @@ class Ai {
|
|
|
5507
5320
|
});
|
|
5508
5321
|
}
|
|
5509
5322
|
get hyphens() {
|
|
5510
|
-
return new
|
|
5323
|
+
return new z({
|
|
5511
5324
|
initialValue: this.preferences.hyphens,
|
|
5512
5325
|
effectiveValue: this.settings.hyphens || !1,
|
|
5513
5326
|
isEffective: this.isDisplayTransformable,
|
|
@@ -5516,8 +5329,28 @@ class Ai {
|
|
|
5516
5329
|
}
|
|
5517
5330
|
});
|
|
5518
5331
|
}
|
|
5332
|
+
get iOSPatch() {
|
|
5333
|
+
return new z({
|
|
5334
|
+
initialValue: this.preferences.iOSPatch,
|
|
5335
|
+
effectiveValue: this.settings.iOSPatch || !1,
|
|
5336
|
+
isEffective: !0,
|
|
5337
|
+
onChange: (t) => {
|
|
5338
|
+
this.updatePreference("iOSPatch", t || null);
|
|
5339
|
+
}
|
|
5340
|
+
});
|
|
5341
|
+
}
|
|
5342
|
+
get iPadOSPatch() {
|
|
5343
|
+
return new z({
|
|
5344
|
+
initialValue: this.preferences.iPadOSPatch,
|
|
5345
|
+
effectiveValue: this.settings.iPadOSPatch || !1,
|
|
5346
|
+
isEffective: !0,
|
|
5347
|
+
onChange: (t) => {
|
|
5348
|
+
this.updatePreference("iPadOSPatch", t || null);
|
|
5349
|
+
}
|
|
5350
|
+
});
|
|
5351
|
+
}
|
|
5519
5352
|
get letterSpacing() {
|
|
5520
|
-
return new
|
|
5353
|
+
return new F({
|
|
5521
5354
|
initialValue: this.preferences.letterSpacing,
|
|
5522
5355
|
effectiveValue: this.settings.letterSpacing || 0,
|
|
5523
5356
|
isEffective: this.isDisplayTransformable,
|
|
@@ -5529,7 +5362,7 @@ class Ai {
|
|
|
5529
5362
|
});
|
|
5530
5363
|
}
|
|
5531
5364
|
get ligatures() {
|
|
5532
|
-
return new
|
|
5365
|
+
return new z({
|
|
5533
5366
|
initialValue: this.preferences.ligatures,
|
|
5534
5367
|
effectiveValue: this.settings.ligatures || !0,
|
|
5535
5368
|
isEffective: this.isDisplayTransformable,
|
|
@@ -5539,19 +5372,19 @@ class Ai {
|
|
|
5539
5372
|
});
|
|
5540
5373
|
}
|
|
5541
5374
|
get lineHeight() {
|
|
5542
|
-
return new
|
|
5375
|
+
return new F({
|
|
5543
5376
|
initialValue: this.preferences.lineHeight,
|
|
5544
5377
|
effectiveValue: this.settings.lineHeight,
|
|
5545
5378
|
isEffective: this.isDisplayTransformable,
|
|
5546
5379
|
onChange: (t) => {
|
|
5547
5380
|
this.updatePreference("lineHeight", t || null);
|
|
5548
5381
|
},
|
|
5549
|
-
supportedRange:
|
|
5550
|
-
step:
|
|
5382
|
+
supportedRange: vt.range,
|
|
5383
|
+
step: vt.step
|
|
5551
5384
|
});
|
|
5552
5385
|
}
|
|
5553
5386
|
get noRuby() {
|
|
5554
|
-
return new
|
|
5387
|
+
return new z({
|
|
5555
5388
|
initialValue: this.preferences.noRuby,
|
|
5556
5389
|
effectiveValue: this.settings.noRuby || !1,
|
|
5557
5390
|
isEffective: this.isDisplayTransformable,
|
|
@@ -5561,27 +5394,27 @@ class Ai {
|
|
|
5561
5394
|
});
|
|
5562
5395
|
}
|
|
5563
5396
|
get paragraphIndent() {
|
|
5564
|
-
return new
|
|
5397
|
+
return new F({
|
|
5565
5398
|
initialValue: this.preferences.paragraphIndent,
|
|
5566
5399
|
effectiveValue: this.settings.paragraphIndent || 0,
|
|
5567
5400
|
isEffective: this.isDisplayTransformable,
|
|
5568
5401
|
onChange: (t) => {
|
|
5569
5402
|
this.updatePreference("paragraphIndent", t || null);
|
|
5570
5403
|
},
|
|
5571
|
-
supportedRange:
|
|
5572
|
-
step:
|
|
5404
|
+
supportedRange: Dt.range,
|
|
5405
|
+
step: Dt.step
|
|
5573
5406
|
});
|
|
5574
5407
|
}
|
|
5575
5408
|
get paragraphSpacing() {
|
|
5576
|
-
return new
|
|
5409
|
+
return new F({
|
|
5577
5410
|
initialValue: this.preferences.paragraphSpacing,
|
|
5578
5411
|
effectiveValue: this.settings.paragraphSpacing || 0,
|
|
5579
5412
|
isEffective: this.isDisplayTransformable,
|
|
5580
5413
|
onChange: (t) => {
|
|
5581
5414
|
this.updatePreference("paragraphSpacing", t || null);
|
|
5582
5415
|
},
|
|
5583
|
-
supportedRange:
|
|
5584
|
-
step:
|
|
5416
|
+
supportedRange: Ht.range,
|
|
5417
|
+
step: Ht.step
|
|
5585
5418
|
});
|
|
5586
5419
|
}
|
|
5587
5420
|
get textAlign() {
|
|
@@ -5596,7 +5429,7 @@ class Ai {
|
|
|
5596
5429
|
});
|
|
5597
5430
|
}
|
|
5598
5431
|
get textNormalization() {
|
|
5599
|
-
return new
|
|
5432
|
+
return new z({
|
|
5600
5433
|
initialValue: this.preferences.textNormalization,
|
|
5601
5434
|
effectiveValue: this.settings.textNormalization || !1,
|
|
5602
5435
|
isEffective: this.isDisplayTransformable,
|
|
@@ -5606,31 +5439,31 @@ class Ai {
|
|
|
5606
5439
|
});
|
|
5607
5440
|
}
|
|
5608
5441
|
get wordSpacing() {
|
|
5609
|
-
return new
|
|
5442
|
+
return new F({
|
|
5610
5443
|
initialValue: this.preferences.wordSpacing,
|
|
5611
5444
|
effectiveValue: this.settings.wordSpacing || 0,
|
|
5612
5445
|
isEffective: this.isDisplayTransformable,
|
|
5613
5446
|
onChange: (t) => {
|
|
5614
5447
|
this.updatePreference("wordSpacing", t || null);
|
|
5615
5448
|
},
|
|
5616
|
-
supportedRange:
|
|
5617
|
-
step:
|
|
5449
|
+
supportedRange: Gt.range,
|
|
5450
|
+
step: Gt.step
|
|
5618
5451
|
});
|
|
5619
5452
|
}
|
|
5620
5453
|
get zoom() {
|
|
5621
|
-
return new
|
|
5454
|
+
return new F({
|
|
5622
5455
|
initialValue: this.preferences.zoom,
|
|
5623
5456
|
effectiveValue: this.settings.zoom || 1,
|
|
5624
5457
|
isEffective: CSS.supports("zoom", "1") ?? !1,
|
|
5625
5458
|
onChange: (t) => {
|
|
5626
5459
|
this.updatePreference("zoom", t || null);
|
|
5627
5460
|
},
|
|
5628
|
-
supportedRange:
|
|
5629
|
-
step:
|
|
5461
|
+
supportedRange: kt.range,
|
|
5462
|
+
step: kt.step
|
|
5630
5463
|
});
|
|
5631
5464
|
}
|
|
5632
5465
|
}
|
|
5633
|
-
const
|
|
5466
|
+
const En = (r) => ({
|
|
5634
5467
|
frameLoaded: r.frameLoaded || (() => {
|
|
5635
5468
|
}),
|
|
5636
5469
|
positionChanged: r.positionChanged || (() => {
|
|
@@ -5647,13 +5480,13 @@ const wn = (r) => ({
|
|
|
5647
5480
|
textSelected: r.textSelected || (() => {
|
|
5648
5481
|
})
|
|
5649
5482
|
});
|
|
5650
|
-
class
|
|
5483
|
+
class In extends wi {
|
|
5651
5484
|
constructor(t, e, i, A = void 0, n = { preferences: {}, defaults: {} }) {
|
|
5652
5485
|
if (super(), this.currentIndex = 0, this._preferencesEditor = null, this.webViewport = {
|
|
5653
5486
|
readingOrder: [],
|
|
5654
5487
|
progressions: /* @__PURE__ */ new Map(),
|
|
5655
5488
|
positions: null
|
|
5656
|
-
}, this.pub = e, this.container = t, this.listeners =
|
|
5489
|
+
}, this.pub = e, this.container = t, this.listeners = En(i), this._preferences = new Et(n.preferences), this._defaults = new wn(n.defaults), this._settings = new ii(this._preferences, this._defaults, this.hasDisplayTransformability), this._css = new fn({
|
|
5657
5490
|
userProperties: new Zi({ zoom: this._settings.zoom })
|
|
5658
5491
|
}), A && typeof A.copyWithLocations == "function") {
|
|
5659
5492
|
this.currentLocation = A;
|
|
@@ -5665,7 +5498,7 @@ class En extends wi {
|
|
|
5665
5498
|
async load() {
|
|
5666
5499
|
await this.updateCSS(!1);
|
|
5667
5500
|
const t = this.compileCSSProperties(this._css);
|
|
5668
|
-
this.framePool = new
|
|
5501
|
+
this.framePool = new mn(this.container, t), await this.apply();
|
|
5669
5502
|
}
|
|
5670
5503
|
// Configurable interface implementation
|
|
5671
5504
|
get settings() {
|
|
@@ -5702,7 +5535,7 @@ class En extends wi {
|
|
|
5702
5535
|
}
|
|
5703
5536
|
get hasDisplayTransformability() {
|
|
5704
5537
|
return this.pub.metadata?.accessibility?.feature?.some(
|
|
5705
|
-
(t) => t.value ===
|
|
5538
|
+
(t) => t.value === gi.DISPLAY_TRANSFORMABILITY.value
|
|
5706
5539
|
) ?? !1;
|
|
5707
5540
|
}
|
|
5708
5541
|
eventListener(t, e) {
|
|
@@ -5752,7 +5585,7 @@ class En extends wi {
|
|
|
5752
5585
|
const h = new URL(this.currentLocation.href);
|
|
5753
5586
|
o = new URL(s, h).href;
|
|
5754
5587
|
} else
|
|
5755
|
-
o =
|
|
5588
|
+
o = Pt.join(Pt.dirname(this.currentLocation.href), s);
|
|
5756
5589
|
const a = this.pub.readingOrder.findWithHref(o);
|
|
5757
5590
|
a ? this.goLink(a, !1, () => {
|
|
5758
5591
|
}) : (console.warn(`Internal link not found in readingOrder: ${o}`), this.listeners.handleLocator(new q({
|
|
@@ -5784,7 +5617,7 @@ class En extends wi {
|
|
|
5784
5617
|
}
|
|
5785
5618
|
}
|
|
5786
5619
|
determineModules() {
|
|
5787
|
-
return Array.from(
|
|
5620
|
+
return Array.from(Tt.keys()).filter((e) => an.includes(e));
|
|
5788
5621
|
}
|
|
5789
5622
|
attachListener() {
|
|
5790
5623
|
this.framePool.currentFrames[0]?.msg && (this.framePool.currentFrames[0].msg.listener = (t, e) => {
|
|
@@ -5914,7 +5747,7 @@ class En extends wi {
|
|
|
5914
5747
|
return this.pub.manifest.locatorFromLink(e) || new ht({
|
|
5915
5748
|
href: e.href,
|
|
5916
5749
|
type: e.type || "text/html",
|
|
5917
|
-
locations: new
|
|
5750
|
+
locations: new j({
|
|
5918
5751
|
fragments: [],
|
|
5919
5752
|
progression: A,
|
|
5920
5753
|
position: this.currentIndex + 1
|
|
@@ -5922,8 +5755,8 @@ class En extends wi {
|
|
|
5922
5755
|
});
|
|
5923
5756
|
}
|
|
5924
5757
|
}
|
|
5925
|
-
const
|
|
5926
|
-
* Readium CSS v.2.0.0-beta.
|
|
5758
|
+
const ir = In, yn = `/*!
|
|
5759
|
+
* Readium CSS v.2.0.0-beta.22
|
|
5927
5760
|
* Copyright (c) 2017–2025. Readium Foundation. All rights reserved.
|
|
5928
5761
|
* Use of this source code is governed by a BSD-style license which is detailed in the
|
|
5929
5762
|
* LICENSE file present in the project repository where this source code is maintained.
|
|
@@ -5935,8 +5768,8 @@ const er = En, In = `/*!
|
|
|
5935
5768
|
* L. Le Meur
|
|
5936
5769
|
* Mickaël Menu
|
|
5937
5770
|
* k_taka
|
|
5938
|
-
*/@namespace url(http://www.w3.org/1999/xhtml);@namespace epub url(http://www.idpf.org/2007/ops);@namespace m url(http://www.w3.org/1998/Math/MathML);@namespace svg url(http://www.w3.org/2000/svg);:root{--RS__viewportWidth:100%;--RS__pageGutter:0;--RS__defaultLineLength:40rem;--RS__colGap:0;--RS__colCount:1;--RS__colWidth:100vw}@page{margin:0!important}:root{position:relative;-webkit-column-width:var(--RS__colWidth);-moz-column-width:var(--RS__colWidth);column-width:var(--RS__colWidth);-webkit-column-count:var(--RS__colCount);-moz-column-count:var(--RS__colCount);column-count:var(--RS__colCount);-webkit-column-gap:var(--RS__colGap);-moz-column-gap:var(--RS__colGap);column-gap:var(--RS__colGap);-moz-column-fill:auto;column-fill:auto;width:var(--RS__viewportWidth);height:100vh;max-width:var(--RS__viewportWidth);max-height:100vh;min-width:var(--RS__viewportWidth);min-height:100vh;padding:0!important;margin:0!important;font-size:1rem!important;box-sizing:border-box;-webkit-touch-callout:none}body{width:100%;max-width:var(--RS__defaultLineLength)!important;padding:0 var(--RS__pageGutter)!important;margin:0 auto!important;box-sizing:border-box}:root:not([style*=readium-noOverflow-on]) body{overflow:hidden}@supports (overflow: clip){:root:not([style*=readium-noOverflow-on]){overflow:clip}:root:not([style*=readium-noOverflow-on]) body{overflow:clip;overflow-clip-margin:content-box}}:root[style*=readium-scroll-on]{-webkit-columns:auto auto!important;-moz-columns:auto auto!important;columns:auto auto!important;width:auto!important;height:auto!important;max-width:none!important;max-height:none!important;min-width:0!important;min-height:0!important}:root[style*=readium-scroll-on] body{max-width:var(--RS__defaultLineLength)!important;box-sizing:border-box!important}:root[style*=readium-scroll-on]:not([style*=readium-noOverflow-on]) body{overflow:auto}@supports (overflow: clip){:root[style*=readium-scroll-on]:not([style*=readium-noOverflow-on]){overflow:auto}:root[style*=readium-scroll-on]:not([style*=readium-noOverflow-on]) body{overflow:clip}}:root[style*=readium-scroll-on][style*=--RS__scrollPaddingTop] body{padding-top:var(--RS__scrollPaddingTop)!important}:root[style*=readium-scroll-on][style*=--RS__scrollPaddingBottom] body{padding-bottom:var(--RS__scrollPaddingBottom)!important}:root[style*=readium-scroll-on][style*=--RS__scrollPaddingLeft] body{padding-left:var(--RS__scrollPaddingLeft)!important}:root[style*=readium-scroll-on][style*=--RS__scrollPaddingRight] body{padding-right:var(--RS__scrollPaddingRight)!important}:root[style*=--USER__backgroundColor]{background-color:var(--USER__backgroundColor)!important}:root[style*=--USER__backgroundColor] *{background-color:transparent!important}:root[style*=--USER__textColor]{color:var(--USER__textColor)!important}:root[style*=--USER__textColor] *:not(a){color:inherit!important;background-color:transparent!important;border-color:currentcolor!important}:root[style*=--USER__textColor] svg text{fill:currentcolor!important;stroke:none!important}:root[style*=--USER__linkColor] a:link,:root[style*=--USER__linkColor] a:link *{color:var(--USER__linkColor)!important}:root[style*=--USER__visitedColor] a:visited,:root[style*=--USER__visitedColor] a:visited *{color:var(--USER__visitedColor)!important}:root[style*=--USER__selectionBackgroundColor][style*=--USER__selectionTextColor] ::-moz-selection{color:var(--USER__selectionTextColor)!important;background-color:var(--USER__selectionBackgroundColor)!important}:root[style*=--USER__selectionBackgroundColor][style*=--USER__selectionTextColor] ::selection{color:var(--USER__selectionTextColor)!important;background-color:var(--USER__selectionBackgroundColor)!important}:root[style*=--USER__colCount]{-webkit-column-count:var(--USER__colCount);-moz-column-count:var(--USER__colCount);column-count:var(--USER__colCount);--RS__colWidth:auto}:root[style*="--USER__colCount: 0"],:root[style*="--USER__colCount:0"]{-webkit-column-count:1;-moz-column-count:1;column-count:1}:root[style*="--USER__colCount: 0"],:root[style*="--USER__colCount:0"],:root[style*="--USER__colCount: 1"],:root[style*="--USER__colCount:1"]{--RS__colWidth:100vw}:root[style*=--USER__lineLength] body{max-width:var(--USER__lineLength)!important}:root[style*=--USER__textAlign]{text-align:var(--USER__textAlign)}:root[style*=--USER__textAlign] body,:root[style*=--USER__textAlign] p:not(blockquote p):not(figcaption p):not(hgroup p),:root[style*=--USER__textAlign] li,:root[style*=--USER__textAlign] dd{text-align:var(--USER__textAlign)!important;-moz-text-align-last:auto!important;-epub-text-align-last:auto!important;text-align-last:auto!important}:root[style*=--USER__bodyHyphens]{-webkit-hyphens:var(--USER__bodyHyphens)!important;-moz-hyphens:var(--USER__bodyHyphens)!important;-ms-hyphens:var(--USER__bodyHyphens)!important;-epub-hyphens:var(--USER__bodyHyphens)!important;hyphens:var(--USER__bodyHyphens)!important}:root[style*=--USER__bodyHyphens] body,:root[style*=--USER__bodyHyphens] p,:root[style*=--USER__bodyHyphens] li,:root[style*=--USER__bodyHyphens] div,:root[style*=--USER__bodyHyphens] dd{-webkit-hyphens:inherit;-moz-hyphens:inherit;-ms-hyphens:inherit;-epub-hyphens:inherit;hyphens:inherit}:root[style*=--USER__fontFamily]{font-family:var(--USER__fontFamily)!important}:root[style*=--USER__fontFamily] *{font-family:revert!important}:root[style*=AccessibleDfA]{font-family:AccessibleDfA,Verdana,Tahoma,Trebuchet MS,sans-serif!important}:root[style*="IA Writer Duospace"]{font-family:IA Writer Duospace,Menlo,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier,monospace!important}:root[style*=AccessibleDfA],:root[style*="IA Writer Duospace"],:root[style*=readium-a11y-on]{font-style:normal!important;font-weight:400!important}:root[style*=AccessibleDfA] *:not(code):not(var):not(kbd):not(samp),:root[style*="IA Writer Duospace"] *:not(code):not(var):not(kbd):not(samp),:root[style*=readium-a11y-on] *:not(code):not(var):not(kbd):not(samp){font-family:inherit!important;font-style:inherit!important;font-weight:inherit!important}:root[style*=AccessibleDfA] *,:root[style*="IA Writer Duospace"] *,:root[style*=readium-a11y-on] *{text-decoration:none!important;font-variant-caps:normal!important;font-variant-numeric:normal!important;font-variant-position:normal!important}:root[style*=AccessibleDfA] sup,:root[style*="IA Writer Duospace"] sup,:root[style*=readium-a11y-on] sup,:root[style*=AccessibleDfA] sub,:root[style*="IA Writer Duospace"] sub,:root[style*=readium-a11y-on] sub{font-size:1rem!important;vertical-align:baseline!important}:root:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] body{zoom:var(--USER__fontSize)!important}:root[style*=readium-iOSPatch-on][style*=--USER__fontSize] body{-webkit-text-size-adjust:var(--USER__fontSize)!important}@supports not (zoom: 1){:root[style*=--USER__fontSize]{font-size:var(--USER__fontSize)!important}}:root[style*=readium-deprecatedFontSize-on][style*=--USER__fontSize]{font-size:var(--USER__fontSize)!important}:root[style*=--USER__lineHeight]{line-height:var(--USER__lineHeight)!important}:root[style*=--USER__lineHeight] body,:root[style*=--USER__lineHeight] p,:root[style*=--USER__lineHeight] li,:root[style*=--USER__lineHeight] div{line-height:inherit}:root[style*=--USER__paraSpacing] p{margin-top:var(--USER__paraSpacing)!important;margin-bottom:var(--USER__paraSpacing)!important}:root[style*=--USER__paraIndent] p{text-indent:var(--USER__paraIndent)!important}:root[style*=--USER__paraIndent] p *,:root[style*=--USER__paraIndent] p:first-letter{text-indent:0!important}:root[style*=--USER__wordSpacing] h1,:root[style*=--USER__wordSpacing] h2,:root[style*=--USER__wordSpacing] h3,:root[style*=--USER__wordSpacing] h4,:root[style*=--USER__wordSpacing] h5,:root[style*=--USER__wordSpacing] h6,:root[style*=--USER__wordSpacing] p,:root[style*=--USER__wordSpacing] li,:root[style*=--USER__wordSpacing] div,:root[style*=--USER__wordSpacing] dt,:root[style*=--USER__wordSpacing] dd{word-spacing:var(--USER__wordSpacing)}:root[style*=--USER__letterSpacing] h1,:root[style*=--USER__letterSpacing] h2,:root[style*=--USER__letterSpacing] h3,:root[style*=--USER__letterSpacing] h4,:root[style*=--USER__letterSpacing] h5,:root[style*=--USER__letterSpacing] h6,:root[style*=--USER__letterSpacing] p,:root[style*=--USER__letterSpacing] li,:root[style*=--USER__letterSpacing] div,:root[style*=--USER__letterSpacing] dt,:root[style*=--USER__letterSpacing] dd{letter-spacing:var(--USER__letterSpacing);font-variant:none}:root[style*=--USER__fontWeight] body{font-weight:var(--USER__fontWeight)!important}:root[style*=--USER__fontWeight] b,:root[style*=--USER__fontWeight] strong{font-weight:bolder}:root[style*=--USER__fontWidth] body{font-stretch:var(--USER__fontWidth)!important}:root[style*=--USER__fontOpticalSizing] body{font-optical-sizing:var(--USER__fontOpticalSizing)!important}:root[style*=readium-blend-on] svg,:root[style*=readium-blend-on] img{background-color:transparent!important;mix-blend-mode:multiply!important}:root[style*=--USER__darkenImages] img{-webkit-filter:brightness(var(--USER__darkenImages))!important;filter:brightness(var(--USER__darkenImages))!important}:root[style*=readium-darken-on] img{-webkit-filter:brightness(80%)!important;filter:brightness(80%)!important}:root[style*=--USER__invertImages] img{-webkit-filter:invert(var(--USER__invertImages))!important;filter:invert(var(--USER__invertImages))!important}:root[style*=readium-invert-on] img{-webkit-filter:invert(100%)!important;filter:invert(100%)!important}:root[style*=--USER__darkenImages][style*=--USER__invertImages] img{-webkit-filter:brightness(var(--USER__darkenImages)) invert(var(--USER__invertImages))!important;filter:brightness(var(--USER__darkenImages)) invert(var(--USER__invertImages))!important}:root[style*=readium-darken-on][style*=--USER__invertImages] img{-webkit-filter:brightness(80%) invert(var(--USER__invertImages))!important;filter:brightness(80%) invert(var(--USER__invertImages))!important}:root[style*=--USER__darkenImages][style*=readium-invert-on] img{-webkit-filter:brightness(var(--USER__darkenImages)) invert(100%)!important;filter:brightness(var(--USER__darkenImages)) invert(100%)!important}:root[style*=readium-darken-on][style*=readium-invert-on] img{-webkit-filter:brightness(80%) invert(100%)!important;filter:brightness(80%) invert(100%)!important}:root[style*=--USER__invertGaiji] img[class*=gaiji]{-webkit-filter:invert(var(--USER__invertGaiji))!important;filter:invert(var(--USER__invertGaiji))!important}:root[style*=readium-invertGaiji-on] img[class*=gaiji]{-webkit-filter:invert(100%)!important;filter:invert(100%)!important}:root[style*=readium-normalize-on]{--USER__typeScale:1.2}:root[style*=readium-normalize-on] p,:root[style*=readium-normalize-on] li,:root[style*=readium-normalize-on] div,:root[style*=readium-normalize-on] pre,:root[style*=readium-normalize-on] dd{font-size:1rem!important}:root[style*=readium-normalize-on] h1{font-size:1.75rem!important;font-size:calc(((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) * var(--USER__typeScale))!important}:root[style*=readium-normalize-on] h2{font-size:1.5rem!important;font-size:calc((1rem * var(--USER__typeScale)) * var(--USER__typeScale))!important}:root[style*=readium-normalize-on] h3{font-size:1.25rem!important;font-size:calc(1rem * var(--USER__typeScale))!important}:root[style*=readium-normalize-on] h4,:root[style*=readium-normalize-on] h5,:root[style*=readium-normalize-on] h6{font-size:1rem!important}:root[style*=readium-normalize-on] small{font-size:smaller!important}:root[style*=readium-normalize-on] sub,:root[style*=readium-normalize-on] sup{font-size:67.5%!important}:root[style*=readium-normalize-on][style*=--USER__typeScale] h1{font-size:calc(((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) * var(--USER__typeScale))!important}:root[style*=readium-normalize-on][style*=--USER__typeScale] h2{font-size:calc((1rem * var(--USER__typeScale)) * var(--USER__typeScale))!important}:root[style*=readium-normalize-on][style*=--USER__typeScale] h3{font-size:calc(1rem * var(--USER__typeScale))!important}:root[style*=readium-iPadOSPatch-on] body{-webkit-text-size-adjust:none}:root[style*=readium-iPadOSPatch-on] p,:root[style*=readium-iPadOSPatch-on] h1,:root[style*=readium-iPadOSPatch-on] h2,:root[style*=readium-iPadOSPatch-on] h3,:root[style*=readium-iPadOSPatch-on] h4,:root[style*=readium-iPadOSPatch-on] h5,:root[style*=readium-iPadOSPatch-on] h6,:root[style*=readium-iPadOSPatch-on] li,:root[style*=readium-iPadOSPatch-on] th,:root[style*=readium-iPadOSPatch-on] td,:root[style*=readium-iPadOSPatch-on] dt,:root[style*=readium-iPadOSPatch-on] dd,:root[style*=readium-iPadOSPatch-on] pre,:root[style*=readium-iPadOSPatch-on] address,:root[style*=readium-iPadOSPatch-on] details,:root[style*=readium-iPadOSPatch-on] summary,:root[style*=readium-iPadOSPatch-on] figcaption,:root[style*=readium-iPadOSPatch-on] div:not(:has(p,h1,h2,h3,h4,h5,h6,li,th,td,dt,dd,pre,address,aside,details,figcaption,summary)),:root[style*=readium-iPadOSPatch-on] aside:not(:has(p,h1,h2,h3,h4,h5,h6,li,th,td,dt,dd,pre,address,aside,details,figcaption,summary)){-webkit-text-zoom:reset}:root[style*=readium-iPadOSPatch-on] abbr,:root[style*=readium-iPadOSPatch-on] b,:root[style*=readium-iPadOSPatch-on] bdi,:root[style*=readium-iPadOSPatch-on] bdo,:root[style*=readium-iPadOSPatch-on] cite,:root[style*=readium-iPadOSPatch-on] code,:root[style*=readium-iPadOSPatch-on] dfn,:root[style*=readium-iPadOSPatch-on] em,:root[style*=readium-iPadOSPatch-on] i,:root[style*=readium-iPadOSPatch-on] kbd,:root[style*=readium-iPadOSPatch-on] mark,:root[style*=readium-iPadOSPatch-on] q,:root[style*=readium-iPadOSPatch-on] rp,:root[style*=readium-iPadOSPatch-on] rt,:root[style*=readium-iPadOSPatch-on] ruby,:root[style*=readium-iPadOSPatch-on] s,:root[style*=readium-iPadOSPatch-on] samp,:root[style*=readium-iPadOSPatch-on] small,:root[style*=readium-iPadOSPatch-on] span,:root[style*=readium-iPadOSPatch-on] strong,:root[style*=readium-iPadOSPatch-on] sub,:root[style*=readium-iPadOSPatch-on] sup,:root[style*=readium-iPadOSPatch-on] time,:root[style*=readium-iPadOSPatch-on] u,:root[style*=readium-iPadOSPatch-on] var{-webkit-text-zoom:normal}:root[style*=readium-iPadOSPatch-on] p:not(:has(b,cite,em,i,q,s,small,span,strong)):first-line{-webkit-text-zoom:normal}`, Fn = `/*!
|
|
5939
|
-
* Readium CSS v.2.0.0-beta.
|
|
5771
|
+
*/@namespace url(http://www.w3.org/1999/xhtml);@namespace epub url(http://www.idpf.org/2007/ops);@namespace m url(http://www.w3.org/1998/Math/MathML);@namespace svg url(http://www.w3.org/2000/svg);:root{--RS__viewportWidth:100%;--RS__pageGutter:0;--RS__defaultLineLength:40rem;--RS__colGap:0;--RS__colCount:1;--RS__colWidth:100vw}@page{margin:0!important}:root{position:relative;-webkit-column-width:var(--RS__colWidth);-moz-column-width:var(--RS__colWidth);column-width:var(--RS__colWidth);-webkit-column-count:var(--RS__colCount);-moz-column-count:var(--RS__colCount);column-count:var(--RS__colCount);-webkit-column-gap:var(--RS__colGap);-moz-column-gap:var(--RS__colGap);column-gap:var(--RS__colGap);-moz-column-fill:auto;column-fill:auto;width:var(--RS__viewportWidth);height:100vh;max-width:var(--RS__viewportWidth);max-height:100vh;min-width:var(--RS__viewportWidth);min-height:100vh;padding:0!important;margin:0!important;font-size:1rem!important;box-sizing:border-box;-webkit-touch-callout:none}body{width:100%;max-width:var(--RS__defaultLineLength)!important;padding:0 var(--RS__pageGutter)!important;margin:0 auto!important;box-sizing:border-box}:root:not([style*=readium-noOverflow-on]) body{overflow:hidden}@supports (overflow: clip){:root:not([style*=readium-noOverflow-on]){overflow:clip}:root:not([style*=readium-noOverflow-on]) body{overflow:clip;overflow-clip-margin:content-box}}:root[style*=readium-scroll-on]{-webkit-columns:auto auto!important;-moz-columns:auto auto!important;columns:auto auto!important;width:auto!important;height:auto!important;max-width:none!important;max-height:none!important;min-width:0!important;min-height:0!important}:root[style*=readium-scroll-on] body{max-width:var(--RS__defaultLineLength)!important;box-sizing:border-box!important}:root[style*=readium-scroll-on]:not([style*=readium-noOverflow-on]) body{overflow:auto}@supports (overflow: clip){:root[style*=readium-scroll-on]:not([style*=readium-noOverflow-on]){overflow:auto}:root[style*=readium-scroll-on]:not([style*=readium-noOverflow-on]) body{overflow:clip}}:root[style*=readium-scroll-on][style*=--RS__scrollPaddingTop] body{padding-top:var(--RS__scrollPaddingTop)!important}:root[style*=readium-scroll-on][style*=--RS__scrollPaddingBottom] body{padding-bottom:var(--RS__scrollPaddingBottom)!important}:root[style*=readium-scroll-on][style*=--RS__scrollPaddingLeft] body{padding-left:var(--RS__scrollPaddingLeft)!important}:root[style*=readium-scroll-on][style*=--RS__scrollPaddingRight] body{padding-right:var(--RS__scrollPaddingRight)!important}:root[style*=--USER__backgroundColor]{background-color:var(--USER__backgroundColor)!important}:root[style*=--USER__backgroundColor] *{background-color:transparent!important}:root[style*=--USER__textColor]{color:var(--USER__textColor)!important}:root[style*=--USER__textColor] *:not(a){color:inherit!important;background-color:transparent!important;border-color:currentcolor!important}:root[style*=--USER__textColor] svg text{fill:currentcolor!important;stroke:none!important}:root[style*=--USER__linkColor] a:link,:root[style*=--USER__linkColor] a:link *{color:var(--USER__linkColor)!important}:root[style*=--USER__visitedColor] a:visited,:root[style*=--USER__visitedColor] a:visited *{color:var(--USER__visitedColor)!important}:root[style*=--USER__selectionBackgroundColor][style*=--USER__selectionTextColor] ::-moz-selection{color:var(--USER__selectionTextColor)!important;background-color:var(--USER__selectionBackgroundColor)!important}:root[style*=--USER__selectionBackgroundColor][style*=--USER__selectionTextColor] ::selection{color:var(--USER__selectionTextColor)!important;background-color:var(--USER__selectionBackgroundColor)!important}:root[style*=--USER__colCount]{-webkit-column-count:var(--USER__colCount);-moz-column-count:var(--USER__colCount);column-count:var(--USER__colCount);--RS__colWidth:auto}:root[style*="--USER__colCount: 0"],:root[style*="--USER__colCount:0"]{-webkit-column-count:1;-moz-column-count:1;column-count:1}:root[style*="--USER__colCount: 0"],:root[style*="--USER__colCount:0"],:root[style*="--USER__colCount: 1"],:root[style*="--USER__colCount:1"]{--RS__colWidth:100vw}:root[style*=--USER__lineLength] body{max-width:var(--USER__lineLength)!important}:root[style*=--USER__textAlign]{text-align:var(--USER__textAlign)}:root[style*=--USER__textAlign] body,:root[style*=--USER__textAlign] p:not([class*=title]):not(blockquote p):not(figcaption p):not(header p):not(hgroup p):not(div:has(+*)>h1+p):not(div:has(+*)>p:has(+h1)),:root[style*=--USER__textAlign] li,:root[style*=--USER__textAlign] dd{text-align:var(--USER__textAlign)!important;-moz-text-align-last:auto!important;-epub-text-align-last:auto!important;text-align-last:auto!important}:root[style*=--USER__bodyHyphens]{-webkit-hyphens:var(--USER__bodyHyphens)!important;-moz-hyphens:var(--USER__bodyHyphens)!important;-ms-hyphens:var(--USER__bodyHyphens)!important;-epub-hyphens:var(--USER__bodyHyphens)!important;hyphens:var(--USER__bodyHyphens)!important}:root[style*=--USER__bodyHyphens] body,:root[style*=--USER__bodyHyphens] p,:root[style*=--USER__bodyHyphens] li,:root[style*=--USER__bodyHyphens] div,:root[style*=--USER__bodyHyphens] dd{-webkit-hyphens:inherit;-moz-hyphens:inherit;-ms-hyphens:inherit;-epub-hyphens:inherit;hyphens:inherit}:root[style*=--USER__fontFamily]{font-family:var(--USER__fontFamily)!important}:root[style*=--USER__fontFamily] *{font-family:revert!important}:root[style*=AccessibleDfA]{font-family:AccessibleDfA,Verdana,Tahoma,Trebuchet MS,sans-serif!important}:root[style*="IA Writer Duospace"]{font-family:IA Writer Duospace,Menlo,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier,monospace!important}:root[style*=AccessibleDfA],:root[style*="IA Writer Duospace"],:root[style*=readium-a11y-on]{font-style:normal!important;font-weight:400!important}:root[style*=AccessibleDfA] body *:not(code):not(var):not(kbd):not(samp),:root[style*="IA Writer Duospace"] body *:not(code):not(var):not(kbd):not(samp),:root[style*=readium-a11y-on] body *:not(code):not(var):not(kbd):not(samp){font-family:inherit!important;font-style:inherit!important;font-weight:inherit!important}:root[style*=AccessibleDfA] body *:not(a),:root[style*="IA Writer Duospace"] body *:not(a),:root[style*=readium-a11y-on] body *:not(a){text-decoration:none!important}:root[style*=AccessibleDfA] body *,:root[style*="IA Writer Duospace"] body *,:root[style*=readium-a11y-on] body *{font-variant-caps:normal!important;font-variant-numeric:normal!important;font-variant-position:normal!important}:root[style*=AccessibleDfA] sup,:root[style*="IA Writer Duospace"] sup,:root[style*=readium-a11y-on] sup,:root[style*=AccessibleDfA] sub,:root[style*="IA Writer Duospace"] sub,:root[style*=readium-a11y-on] sub{font-size:1rem!important;vertical-align:baseline!important}:root:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] body{zoom:var(--USER__fontSize)!important}:root:not([style*=readium-deprecatedFontSize-on])[style*=readium-iOSPatch-on][style*=--USER__fontSize] body{-webkit-text-size-adjust:var(--USER__fontSize)!important}@supports selector(figure:has(> img)){:root:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] figure:has(>img),:root:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] figure:has(>video),:root:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] figure:has(>svg),:root:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] figure:has(>canvas),:root:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] figure:has(>iframe),:root:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] figure:has(>audio),:root:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] div:has(>img),:root:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] div:has(>video),:root:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] div:has(>svg),:root:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] div:has(>canvas),:root:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] div:has(>iframe),:root:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] div:has(>audio),:root:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] table{zoom:calc(100% / var(--USER__fontSize))!important}:root:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] figcaption,:root:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] caption,:root:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] td,:root:not([style*=readium-deprecatedFontSize-on]):not([style*=readium-iOSPatch-on])[style*=--USER__fontSize] th{zoom:var(--USER__fontSize)!important}}@supports not (zoom: 1){:root[style*=--USER__fontSize]{font-size:var(--USER__fontSize)!important}}:root[style*=readium-deprecatedFontSize-on][style*=--USER__fontSize]{font-size:var(--USER__fontSize)!important}:root[style*=--USER__lineHeight]{line-height:var(--USER__lineHeight)!important}:root[style*=--USER__lineHeight] body,:root[style*=--USER__lineHeight] p,:root[style*=--USER__lineHeight] li,:root[style*=--USER__lineHeight] div{line-height:inherit}:root[style*=--USER__paraSpacing] p{margin-top:var(--USER__paraSpacing)!important;margin-bottom:var(--USER__paraSpacing)!important}:root[style*=--USER__paraIndent] p:not([class*=title]):not(blockquote p):not(figcaption p):not(header p):not(hgroup p):not(div:has(+*)>h1+p):not(div:has(+*)>p:has(+h1)){text-indent:var(--USER__paraIndent)!important}:root[style*=--USER__paraIndent] p *,:root[style*=--USER__paraIndent] p:first-letter{text-indent:0!important}:root[style*=--USER__wordSpacing] h1,:root[style*=--USER__wordSpacing] h2,:root[style*=--USER__wordSpacing] h3,:root[style*=--USER__wordSpacing] h4,:root[style*=--USER__wordSpacing] h5,:root[style*=--USER__wordSpacing] h6,:root[style*=--USER__wordSpacing] p,:root[style*=--USER__wordSpacing] li,:root[style*=--USER__wordSpacing] div,:root[style*=--USER__wordSpacing] dt,:root[style*=--USER__wordSpacing] dd{word-spacing:var(--USER__wordSpacing)}:root[style*=--USER__letterSpacing] h1,:root[style*=--USER__letterSpacing] h2,:root[style*=--USER__letterSpacing] h3,:root[style*=--USER__letterSpacing] h4,:root[style*=--USER__letterSpacing] h5,:root[style*=--USER__letterSpacing] h6,:root[style*=--USER__letterSpacing] p,:root[style*=--USER__letterSpacing] li,:root[style*=--USER__letterSpacing] div,:root[style*=--USER__letterSpacing] dt,:root[style*=--USER__letterSpacing] dd{letter-spacing:var(--USER__letterSpacing);font-variant:none}:root[style*=--USER__ligatures]{font-variant-ligatures:var(--USER__ligatures)!important}:root[style*=--USER__ligatures] *{font-variant-ligatures:inherit!important}:root[style*=--USER__fontWeight] body{font-weight:var(--USER__fontWeight)!important}:root[style*=--USER__fontWeight] b,:root[style*=--USER__fontWeight] strong{font-weight:bolder}:root[style*=--USER__fontWidth] body{font-stretch:var(--USER__fontWidth)!important}:root[style*=--USER__fontOpticalSizing] body{font-optical-sizing:var(--USER__fontOpticalSizing)!important}:root[style*=readium-blend-on] svg,:root[style*=readium-blend-on] img{background-color:transparent!important;mix-blend-mode:multiply!important}:root[style*=--USER__darkenImages] img{-webkit-filter:brightness(var(--USER__darkenImages))!important;filter:brightness(var(--USER__darkenImages))!important}:root[style*=readium-darken-on] img{-webkit-filter:brightness(80%)!important;filter:brightness(80%)!important}:root[style*=--USER__invertImages] img{-webkit-filter:invert(var(--USER__invertImages))!important;filter:invert(var(--USER__invertImages))!important}:root[style*=readium-invert-on] img{-webkit-filter:invert(100%)!important;filter:invert(100%)!important}:root[style*=--USER__darkenImages][style*=--USER__invertImages] img{-webkit-filter:brightness(var(--USER__darkenImages)) invert(var(--USER__invertImages))!important;filter:brightness(var(--USER__darkenImages)) invert(var(--USER__invertImages))!important}:root[style*=readium-darken-on][style*=--USER__invertImages] img{-webkit-filter:brightness(80%) invert(var(--USER__invertImages))!important;filter:brightness(80%) invert(var(--USER__invertImages))!important}:root[style*=--USER__darkenImages][style*=readium-invert-on] img{-webkit-filter:brightness(var(--USER__darkenImages)) invert(100%)!important;filter:brightness(var(--USER__darkenImages)) invert(100%)!important}:root[style*=readium-darken-on][style*=readium-invert-on] img{-webkit-filter:brightness(80%) invert(100%)!important;filter:brightness(80%) invert(100%)!important}:root[style*=--USER__invertGaiji] img[class*=gaiji]{-webkit-filter:invert(var(--USER__invertGaiji))!important;filter:invert(var(--USER__invertGaiji))!important}:root[style*=readium-invertGaiji-on] img[class*=gaiji]{-webkit-filter:invert(100%)!important;filter:invert(100%)!important}:root[style*=readium-normalize-on]{--USER__typeScale:1.2}:root[style*=readium-normalize-on] p,:root[style*=readium-normalize-on] li,:root[style*=readium-normalize-on] div,:root[style*=readium-normalize-on] pre,:root[style*=readium-normalize-on] dd{font-size:1rem!important}:root[style*=readium-normalize-on] h1{font-size:1.75rem!important;font-size:calc(((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) * var(--USER__typeScale))!important}:root[style*=readium-normalize-on] h2{font-size:1.5rem!important;font-size:calc((1rem * var(--USER__typeScale)) * var(--USER__typeScale))!important}:root[style*=readium-normalize-on] h3{font-size:1.25rem!important;font-size:calc(1rem * var(--USER__typeScale))!important}:root[style*=readium-normalize-on] h4,:root[style*=readium-normalize-on] h5,:root[style*=readium-normalize-on] h6{font-size:1rem!important}:root[style*=readium-normalize-on] small{font-size:smaller!important}:root[style*=readium-normalize-on] sub,:root[style*=readium-normalize-on] sup{font-size:67.5%!important}:root[style*=readium-normalize-on][style*=--USER__typeScale] h1{font-size:calc(((1rem * var(--USER__typeScale)) * var(--USER__typeScale)) * var(--USER__typeScale))!important}:root[style*=readium-normalize-on][style*=--USER__typeScale] h2{font-size:calc((1rem * var(--USER__typeScale)) * var(--USER__typeScale))!important}:root[style*=readium-normalize-on][style*=--USER__typeScale] h3{font-size:calc(1rem * var(--USER__typeScale))!important}:root[style*=readium-iPadOSPatch-on] body{-webkit-text-size-adjust:none}:root[style*=readium-iPadOSPatch-on] p,:root[style*=readium-iPadOSPatch-on] h1,:root[style*=readium-iPadOSPatch-on] h2,:root[style*=readium-iPadOSPatch-on] h3,:root[style*=readium-iPadOSPatch-on] h4,:root[style*=readium-iPadOSPatch-on] h5,:root[style*=readium-iPadOSPatch-on] h6,:root[style*=readium-iPadOSPatch-on] li,:root[style*=readium-iPadOSPatch-on] th,:root[style*=readium-iPadOSPatch-on] td,:root[style*=readium-iPadOSPatch-on] dt,:root[style*=readium-iPadOSPatch-on] dd,:root[style*=readium-iPadOSPatch-on] pre,:root[style*=readium-iPadOSPatch-on] address,:root[style*=readium-iPadOSPatch-on] details,:root[style*=readium-iPadOSPatch-on] summary,:root[style*=readium-iPadOSPatch-on] figcaption,:root[style*=readium-iPadOSPatch-on] div:not(:has(p,h1,h2,h3,h4,h5,h6,li,th,td,dt,dd,pre,address,aside,details,figcaption,summary)),:root[style*=readium-iPadOSPatch-on] aside:not(:has(p,h1,h2,h3,h4,h5,h6,li,th,td,dt,dd,pre,address,aside,details,figcaption,summary)){-webkit-text-zoom:reset}:root[style*=readium-iPadOSPatch-on] abbr,:root[style*=readium-iPadOSPatch-on] b,:root[style*=readium-iPadOSPatch-on] bdi,:root[style*=readium-iPadOSPatch-on] bdo,:root[style*=readium-iPadOSPatch-on] cite,:root[style*=readium-iPadOSPatch-on] code,:root[style*=readium-iPadOSPatch-on] dfn,:root[style*=readium-iPadOSPatch-on] em,:root[style*=readium-iPadOSPatch-on] i,:root[style*=readium-iPadOSPatch-on] kbd,:root[style*=readium-iPadOSPatch-on] mark,:root[style*=readium-iPadOSPatch-on] q,:root[style*=readium-iPadOSPatch-on] rp,:root[style*=readium-iPadOSPatch-on] rt,:root[style*=readium-iPadOSPatch-on] ruby,:root[style*=readium-iPadOSPatch-on] s,:root[style*=readium-iPadOSPatch-on] samp,:root[style*=readium-iPadOSPatch-on] small,:root[style*=readium-iPadOSPatch-on] span,:root[style*=readium-iPadOSPatch-on] strong,:root[style*=readium-iPadOSPatch-on] sub,:root[style*=readium-iPadOSPatch-on] sup,:root[style*=readium-iPadOSPatch-on] time,:root[style*=readium-iPadOSPatch-on] u,:root[style*=readium-iPadOSPatch-on] var{-webkit-text-zoom:normal}:root[style*=readium-iPadOSPatch-on] p:not(:has(b,cite,em,i,q,s,small,span,strong)):first-line{-webkit-text-zoom:normal}`, Fn = `/*!
|
|
5772
|
+
* Readium CSS v.2.0.0-beta.22
|
|
5940
5773
|
* Copyright (c) 2017–2025. Readium Foundation. All rights reserved.
|
|
5941
5774
|
* Use of this source code is governed by a BSD-style license which is detailed in the
|
|
5942
5775
|
* LICENSE file present in the project repository where this source code is maintained.
|
|
@@ -5948,8 +5781,8 @@ const er = En, In = `/*!
|
|
|
5948
5781
|
* L. Le Meur
|
|
5949
5782
|
* Mickaël Menu
|
|
5950
5783
|
* k_taka
|
|
5951
|
-
*/@namespace url(http://www.w3.org/1999/xhtml);@namespace epub url(http://www.idpf.org/2007/ops);@namespace m url(http://www.w3.org/1998/Math/MathML);@namespace svg url(http://www.w3.org/2000/svg);@-ms-viewport{width:device-width}@viewport{width:device-width;zoom:1}:root{--RS__monospaceTf:ui-monospace, "Andale Mono", "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;--RS__humanistTf:Seravek, Calibri, "Gill Sans Nova", Roboto, Ubuntu, "DejaVu Sans", source-sans-pro, sans-serif;--RS__sansTf:-ui-sans-serif, -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Inter, Roboto, "Helvetica Neue", "Arial Nova", "Liberation Sans", Arial, sans-serif;--RS__modernTf:Athelas, Constantia, Charter, "Bitstream Charter", Cambria, "Georgia Pro", Georgia, serif;--RS__oldStyleTf:"Iowan Old Style", Sitka, "Sitka Text", Palatino, "Book Antiqua", "URW Palladio L", P052, serif;--RS__baseFontFamily:var(--RS__oldStyleTf);--RS__lineHeightCompensation:1;--RS__baseLineHeight:calc(1.5 * var(--RS__lineHeightCompensation));--RS__selectionTextColor:inherit;--RS__selectionBackgroundColor:#b4d8fe;--RS__visitedColor:#551A8B;--RS__linkColor:#0000EE;--RS__textColor:#121212;--RS__backgroundColor:#FFFFFF;color:var(--RS__textColor)!important;background-color:var(--RS__backgroundColor)!important}::-moz-selection{color:var(--RS__selectionTextColor);background-color:var(--RS__selectionBackgroundColor)}::selection{color:var(--RS__selectionTextColor);background-color:var(--RS__selectionBackgroundColor)}html{font-family:var(--RS__baseFontFamily);line-height:1.6;line-height:var(--RS__baseLineHeight);text-rendering:optimizelegibility}h1,h2,h3{line-height:normal}:lang(ja),:lang(zh),:lang(ko){word-wrap:break-word;-webkit-line-break:strict;-epub-line-break:strict;line-break:strict}math{font-family:"Latin Modern Math","STIX Two Math","XITS Math","STIX Math","Libertinus Math","TeX Gyre Termes Math","TeX Gyre Bonum Math",TeX Gyre Schola,"DejaVu Math TeX Gyre","TeX Gyre Pagella Math","Asana Math","Cambria Math","Lucida Bright Math","Minion Math",STIXGeneral,STIXSizeOneSym,Symbol,Times New Roman,serif}:lang(am){--RS__baseFontFamily:kefa, nyala, roboto, noto, "Noto Sans Ethiopic", serif;--RS__lineHeightCompensation:1.167}:lang(ar){--RS__baseFontFamily:"Geeza Pro", "Arabic Typesetting", roboto, noto, "Noto Naskh Arabic", "Times New Roman", serif}:lang(bn){--RS__baseFontFamily:"Kohinoor Bangla", "Bangla Sangam MN", vrinda, roboto, noto, "Noto Sans Bengali", sans-serif;--RS__lineHeightCompensation:1.067}:lang(bo){--RS__baseFontFamily:kailasa, "Microsoft Himalaya", roboto, noto, "Noto Sans Tibetan", sans-serif}:lang(chr){--RS__baseFontFamily:"Plantagenet Cherokee", roboto, noto, "Noto Sans Cherokee";--RS__lineHeightCompensation:1.167}:lang(fa){--RS__baseFontFamily:"Geeza Pro", "Arabic Typesetting", roboto, noto, "Noto Naskh Arabic", "Times New Roman", serif}:lang(gu){--RS__baseFontFamily:"Gujarati Sangam MN", "Nirmala UI", shruti, roboto, noto, "Noto Sans Gujarati", sans-serif;--RS__lineHeightCompensation:1.167}:lang(he){--RS__baseFontFamily:"New Peninim MT", "Arial Hebrew", gisha, "Times New Roman", roboto, noto, "Noto Sans Hebrew" sans-serif;--RS__lineHeightCompensation:1.1}:lang(hi){--RS__baseFontFamily:"Kohinoor Devanagari", "Devanagari Sangam MN", kokila, "Nirmala UI", roboto, noto, "Noto Sans Devanagari", sans-serif;--RS__lineHeightCompensation:1.1}:lang(hy){--RS__baseFontFamily:mshtakan, sylfaen, roboto, noto, "Noto Serif Armenian", serif}:lang(iu){--RS__baseFontFamily:"Euphemia UCAS", euphemia, roboto, noto, "Noto Sans Canadian Aboriginal", sans-serif}:lang(ja){--RS__baseFontFamily:yugothic, "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Meiryo UI", "MS Gothic", roboto, noto, "Noto Sans CJK JP", sans-serif;--RS__lineHeightCompensation:1.167;--RS__serif-ja:"Hiragino Mincho ProN", "Hiragino Mincho Pro", "YuMincho", "BIZ UDPMincho", "Yu Mincho", "MS P明朝", "MS PMincho", serif;--RS__sans-serif-ja:"Hiragino Sans", "Hiragino Kaku Gothic ProN", "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ W3", "YuGothic", "Yu Gothic Medium", "BIZ UDPGothic", "Yu Gothic", "MS Pゴシック", "MS PGothic", sans-serif;--RS__serif-ja-v:"Hiragino Mincho ProN", "Hiragino Mincho Pro", "YuMincho", "BIZ UDMincho", "Yu Mincho", "MS明朝", "MS Mincho", serif;--RS__sans-serif-ja-v:"Hiragino Sans", "Hiragino Kaku Gothic ProN", "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ W3", "YuGothic", "Yu Gothic Medium", "BIZ UDGothic", "Yu Gothic", "MSゴシック", "MS Gothic", sans-serif}:lang(km){--RS__baseFontFamily:"Khmer Sangam MN", "Leelawadee UI", "Khmer UI", roboto, noto, "Noto Sans Khmer", sans-serif;--RS__lineHeightCompensation:1.067}:lang(kn){--RS__baseFontFamily:"Kannada Sangam MN", "Nirmala UI", tunga, roboto, noto, "Noto Sans Kannada", sans-serif;--RS__lineHeightCompensation:1.1}:lang(ko){--RS__baseFontFamily:"Nanum Gothic", "Apple SD Gothic Neo", "Malgun Gothic", roboto, noto, "Noto Sans CJK KR", sans-serif;--RS__lineHeightCompensation:1.167}:lang(lo){--RS__baseFontFamily:"Lao Sangam MN", "Leelawadee UI", "Lao UI", roboto, noto, "Noto Sans Lao", sans-serif}:lang(ml){--RS__baseFontFamily:"Malayalam Sangam MN", "Nirmala UI", kartika, roboto, noto, "Noto Sans Malayalam", sans-serif;--RS__lineHeightCompensation:1.067}:lang(or){--RS__baseFontFamily:"Oriya Sangam MN", "Nirmala UI", kalinga, roboto, noto, "Noto Sans Oriya", sans-serif;--RS__lineHeightCompensation:1.167}:lang(pa){--RS__baseFontFamily:"Gurmukhi MN", "Nirmala UI", kartika, roboto, noto, "Noto Sans Gurmukhi", sans-serif;--RS__lineHeightCompensation:1.1}:lang(si){--RS__baseFontFamily:"Sinhala Sangam MN", "Nirmala UI", "Iskoola Pota", roboto, noto, "Noto Sans Sinhala", sans-serif;--RS__lineHeightCompensation:1.167}:lang(ta){--RS__baseFontFamily:"Tamil Sangam MN", "Nirmala UI", latha, roboto, noto, "Noto Sans Tamil", sans-serif;--RS__lineHeightCompensation:1.067}:lang(te){--RS__baseFontFamily:"Kohinoor Telugu", "Telugu Sangam MN", "Nirmala UI", gautami, roboto, noto, "Noto Sans Telugu", sans-serif}:lang(th){--RS__baseFontFamily:"Thonburi", "Leelawadee UI", "Cordia New", roboto, noto, "Noto Sans Thai", sans-serif;--RS__lineHeightCompensation:1.067}:lang(zh){--RS__baseFontFamily:"方体", "PingFang SC", "黑体", "Heiti SC", "Microsoft JhengHei UI", "Microsoft JhengHei", roboto, noto, "Noto Sans CJK SC", sans-serif;--RS__lineHeightCompensation:1.167}:lang(zh-Hant),:lang(zh-TW){--RS__baseFontFamily:"方體", "PingFang TC", "黑體", "Heiti TC", "Microsoft JhengHei UI", "Microsoft JhengHei", roboto, noto, "Noto Sans CJK TC", sans-serif;--RS__lineHeightCompensation:1.167}:lang(zh-HK){--RS__baseFontFamily:"方體", "PingFang HK", "方體", "PingFang TC", "黑體", "Heiti TC", "Microsoft JhengHei UI", "Microsoft JhengHei", roboto, noto, "Noto Sans CJK TC", sans-serif;--RS__lineHeightCompensation:1.167}@font-face{font-family:AccessibleDfA;font-style:normal;font-weight:400;src:local("AccessibleDfA"),url(./assets/AccessibleDfA-Regular.woff2) format("woff2"),url(./assets/AccessibleDfA-Regular.woff) format("woff")}@font-face{font-family:AccessibleDfA;font-style:normal;font-weight:700;src:local("AccessibleDfA"),url(./assets/AccessibleDfA-Bold.woff2) format("woff2")}@font-face{font-family:AccessibleDfA;font-style:italic;font-weight:400;src:local("AccessibleDfA"),url(./assets/AccessibleDfA-Italic.woff2) format("woff2")}@font-face{font-family:IA Writer Duospace;font-style:normal;font-weight:400;src:local("iAWriterDuospace-Regular"),url(./assets/iAWriterDuospace-Regular.ttf) format("truetype")}body{widows:2;orphans:2}figcaption,th,td{widows:1;orphans:1}h2,h3,h4,h5,h6,dt,hr,caption{-webkit-column-break-after:avoid;page-break-after:avoid;break-after:avoid}h1,h2,h3,h4,h5,h6,dt,figure,tr{-webkit-column-break-inside:avoid;page-break-inside:avoid;break-inside:avoid}body{-webkit-hyphenate-character:"-";-moz-hyphenate-character:"-";-ms-hyphenate-character:"-";hyphenate-character:"-";-webkit-hyphenate-limit-lines:3;-ms-hyphenate-limit-lines:3;hyphenate-limit-lines:3}h1,h2,h3,h4,h5,h6,dt,figcaption,pre,caption,address,center,code,var{-ms-hyphens:none;-moz-hyphens:none;-webkit-hyphens:none;-epub-hyphens:none;hyphens:none}body{font-variant-numeric:oldstyle-nums proportional-nums}:lang(ja) body,:lang(zh) body,:lang(ko) body{font-variant-numeric:lining-nums proportional-nums}h1,h2,h3,h4,h5,h6,dt{font-variant-numeric:lining-nums proportional-nums}table{font-variant-numeric:lining-nums tabular-nums}code,var{font-variant-ligatures:none;font-variant-numeric:lining-nums tabular-nums slashed-zero}rt{font-variant-east-asian:ruby}:lang(ar){font-variant-ligatures:common-ligatures}:lang(ko){font-kerning:normal}hr{color:inherit;border-color:currentcolor}table,th,td{border-color:currentcolor}figure,blockquote{margin:1em 5%}ul,ol{padding-left:5%}dd{margin-left:5%}pre{white-space:pre-wrap;-ms-tab-size:2;-moz-tab-size:2;-webkit-tab-size:2;tab-size:2}abbr[title],acronym[title]{text-decoration:dotted underline}nobr wbr{white-space:normal}ruby>rt,ruby>rp{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}*:lang(ja):not(:lang(ja-Latn)):not(:lang(ja-Cyrl)),*:lang(zh):not(:lang(zh-Latn)):not(:lang(zh-Cyrl)),*:lang(ko):not(:lang(ko-Latn)):not(:lang(ko-Cyrl)),:lang(ja):not(:lang(ja-Latn)):not(:lang(ja-Cyrl)) cite,:lang(ja):not(:lang(ja-Latn)):not(:lang(ja-Cyrl)) dfn,:lang(ja):not(:lang(ja-Latn)):not(:lang(ja-Cyrl)) em,:lang(ja):not(:lang(ja-Latn)):not(:lang(ja-Cyrl)) i,:lang(zh):not(:lang(zh-Latn)):not(:lang(zh-Cyrl)) cite,:lang(zh):not(:lang(zh-Latn)):not(:lang(zh-Cyrl)) dfn,:lang(zh):not(:lang(zh-Latn)):not(:lang(zh-Cyrl)) em,:lang(zh):not(:lang(zh-Latn)):not(:lang(zh-Cyrl)) i,:lang(ko):not(:lang(ko-Latn)):not(:lang(ko-Cyrl)) cite,:lang(ko):not(:lang(ko-Latn)):not(:lang(ko-Cyrl)) dfn,:lang(ko):not(:lang(ko-Latn)):not(:lang(ko-Cyrl)) em,:lang(ko):not(:lang(ko-Latn)):not(:lang(ko-Cyrl)) i{font-style:normal}:lang(ja) a,:lang(zh) a,:lang(ko) a{text-decoration:none}:root{--RS__maxMediaWidth:100%;--RS__maxMediaHeight:95vh;--RS__boxSizingMedia:border-box;--RS__boxSizingTable:border-box}a,a span,span a,h1,h2,h3,h4,h5,h6{word-wrap:break-word}div{max-width:var(--RS__maxMediaWidth)}img,svg|svg,video{object-fit:contain;width:auto;height:auto;max-width:var(--RS__maxMediaWidth);max-height:var(--RS__maxMediaHeight)!important;box-sizing:var(--RS__boxSizingMedia);-webkit-column-break-inside:avoid;page-break-inside:avoid;break-inside:avoid}audio{max-width:100%;-webkit-column-break-inside:avoid;page-break-inside:avoid;break-inside:avoid}table{max-width:var(--RS__maxMediaWidth);box-sizing:var(--RS__boxSizingTable)}`, yn = `/*!
|
|
5952
|
-
* Readium CSS v.2.0.0-beta.
|
|
5784
|
+
*/@namespace url(http://www.w3.org/1999/xhtml);@namespace epub url(http://www.idpf.org/2007/ops);@namespace m url(http://www.w3.org/1998/Math/MathML);@namespace svg url(http://www.w3.org/2000/svg);@-ms-viewport{width:device-width}@viewport{width:device-width;zoom:1}:root{--RS__monospaceTf:ui-monospace, "Andale Mono", "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;--RS__humanistTf:Seravek, Calibri, "Gill Sans Nova", Roboto, Ubuntu, "DejaVu Sans", source-sans-pro, sans-serif;--RS__sansTf:-ui-sans-serif, -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Inter, Roboto, "Helvetica Neue", "Arial Nova", "Liberation Sans", Arial, sans-serif;--RS__modernTf:Athelas, Constantia, Charter, "Bitstream Charter", Cambria, "Georgia Pro", Georgia, serif;--RS__oldStyleTf:"Iowan Old Style", Sitka, "Sitka Text", Palatino, "Book Antiqua", "URW Palladio L", P052, serif;--RS__baseFontFamily:var(--RS__oldStyleTf);--RS__lineHeightCompensation:1;--RS__baseLineHeight:calc(1.5 * var(--RS__lineHeightCompensation));--RS__selectionTextColor:inherit;--RS__selectionBackgroundColor:#b4d8fe;--RS__visitedColor:#551A8B;--RS__linkColor:#0000EE;--RS__textColor:#121212;--RS__backgroundColor:#FFFFFF;color:var(--RS__textColor)!important;background-color:var(--RS__backgroundColor)!important}::-moz-selection{color:var(--RS__selectionTextColor);background-color:var(--RS__selectionBackgroundColor)}::selection{color:var(--RS__selectionTextColor);background-color:var(--RS__selectionBackgroundColor)}html{font-family:var(--RS__baseFontFamily);line-height:1.6;line-height:var(--RS__baseLineHeight);text-rendering:optimizelegibility}h1,h2,h3{line-height:normal}:lang(ja),:lang(zh),:lang(ko){word-wrap:break-word;-webkit-line-break:strict;-epub-line-break:strict;line-break:strict}math{font-family:"Latin Modern Math","STIX Two Math","XITS Math","STIX Math","Libertinus Math","TeX Gyre Termes Math","TeX Gyre Bonum Math",TeX Gyre Schola,"DejaVu Math TeX Gyre","TeX Gyre Pagella Math","Asana Math","Cambria Math","Lucida Bright Math","Minion Math",STIXGeneral,STIXSizeOneSym,Symbol,Times New Roman,serif}:lang(am){--RS__baseFontFamily:kefa, nyala, roboto, noto, "Noto Sans Ethiopic", serif;--RS__lineHeightCompensation:1.167}:lang(ar){--RS__baseFontFamily:"Geeza Pro", "Arabic Typesetting", roboto, noto, "Noto Naskh Arabic", "Times New Roman", serif}:lang(bn){--RS__baseFontFamily:"Kohinoor Bangla", "Bangla Sangam MN", vrinda, roboto, noto, "Noto Sans Bengali", sans-serif;--RS__lineHeightCompensation:1.067}:lang(bo){--RS__baseFontFamily:kailasa, "Microsoft Himalaya", roboto, noto, "Noto Sans Tibetan", sans-serif}:lang(chr){--RS__baseFontFamily:"Plantagenet Cherokee", roboto, noto, "Noto Sans Cherokee";--RS__lineHeightCompensation:1.167}:lang(fa){--RS__baseFontFamily:"Geeza Pro", "Arabic Typesetting", roboto, noto, "Noto Naskh Arabic", "Times New Roman", serif}:lang(gu){--RS__baseFontFamily:"Gujarati Sangam MN", "Nirmala UI", shruti, roboto, noto, "Noto Sans Gujarati", sans-serif;--RS__lineHeightCompensation:1.167}:lang(he){--RS__baseFontFamily:"New Peninim MT", "Arial Hebrew", gisha, "Times New Roman", roboto, noto, "Noto Sans Hebrew" sans-serif;--RS__lineHeightCompensation:1.1}:lang(hi){--RS__baseFontFamily:"Kohinoor Devanagari", "Devanagari Sangam MN", kokila, "Nirmala UI", roboto, noto, "Noto Sans Devanagari", sans-serif;--RS__lineHeightCompensation:1.1}:lang(hy){--RS__baseFontFamily:mshtakan, sylfaen, roboto, noto, "Noto Serif Armenian", serif}:lang(iu){--RS__baseFontFamily:"Euphemia UCAS", euphemia, roboto, noto, "Noto Sans Canadian Aboriginal", sans-serif}:lang(ja){--RS__baseFontFamily:yugothic, "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Meiryo UI", "MS Gothic", roboto, noto, "Noto Sans CJK JP", sans-serif;--RS__lineHeightCompensation:1.167;--RS__serif-ja:"Hiragino Mincho ProN", "Hiragino Mincho Pro", "YuMincho", "BIZ UDPMincho", "Yu Mincho", "MS P明朝", "MS PMincho", serif;--RS__sans-serif-ja:"Hiragino Sans", "Hiragino Kaku Gothic ProN", "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ W3", "YuGothic", "Yu Gothic Medium", "BIZ UDPGothic", "Yu Gothic", "MS Pゴシック", "MS PGothic", sans-serif;--RS__serif-ja-v:"Hiragino Mincho ProN", "Hiragino Mincho Pro", "YuMincho", "BIZ UDMincho", "Yu Mincho", "MS明朝", "MS Mincho", serif;--RS__sans-serif-ja-v:"Hiragino Sans", "Hiragino Kaku Gothic ProN", "Hiragino Kaku Gothic Pro", "ヒラギノ角ゴ W3", "YuGothic", "Yu Gothic Medium", "BIZ UDGothic", "Yu Gothic", "MSゴシック", "MS Gothic", sans-serif}:lang(km){--RS__baseFontFamily:"Khmer Sangam MN", "Leelawadee UI", "Khmer UI", roboto, noto, "Noto Sans Khmer", sans-serif;--RS__lineHeightCompensation:1.067}:lang(kn){--RS__baseFontFamily:"Kannada Sangam MN", "Nirmala UI", tunga, roboto, noto, "Noto Sans Kannada", sans-serif;--RS__lineHeightCompensation:1.1}:lang(ko){--RS__baseFontFamily:"Nanum Gothic", "Apple SD Gothic Neo", "Malgun Gothic", roboto, noto, "Noto Sans CJK KR", sans-serif;--RS__lineHeightCompensation:1.167}:lang(lo){--RS__baseFontFamily:"Lao Sangam MN", "Leelawadee UI", "Lao UI", roboto, noto, "Noto Sans Lao", sans-serif}:lang(ml){--RS__baseFontFamily:"Malayalam Sangam MN", "Nirmala UI", kartika, roboto, noto, "Noto Sans Malayalam", sans-serif;--RS__lineHeightCompensation:1.067}:lang(or){--RS__baseFontFamily:"Oriya Sangam MN", "Nirmala UI", kalinga, roboto, noto, "Noto Sans Oriya", sans-serif;--RS__lineHeightCompensation:1.167}:lang(pa){--RS__baseFontFamily:"Gurmukhi MN", "Nirmala UI", kartika, roboto, noto, "Noto Sans Gurmukhi", sans-serif;--RS__lineHeightCompensation:1.1}:lang(si){--RS__baseFontFamily:"Sinhala Sangam MN", "Nirmala UI", "Iskoola Pota", roboto, noto, "Noto Sans Sinhala", sans-serif;--RS__lineHeightCompensation:1.167}:lang(ta){--RS__baseFontFamily:"Tamil Sangam MN", "Nirmala UI", latha, roboto, noto, "Noto Sans Tamil", sans-serif;--RS__lineHeightCompensation:1.067}:lang(te){--RS__baseFontFamily:"Kohinoor Telugu", "Telugu Sangam MN", "Nirmala UI", gautami, roboto, noto, "Noto Sans Telugu", sans-serif}:lang(th){--RS__baseFontFamily:"Thonburi", "Leelawadee UI", "Cordia New", roboto, noto, "Noto Sans Thai", sans-serif;--RS__lineHeightCompensation:1.067}:lang(zh){--RS__baseFontFamily:"方体", "PingFang SC", "黑体", "Heiti SC", "Microsoft JhengHei UI", "Microsoft JhengHei", roboto, noto, "Noto Sans CJK SC", sans-serif;--RS__lineHeightCompensation:1.167}:lang(zh-Hant),:lang(zh-TW){--RS__baseFontFamily:"方體", "PingFang TC", "黑體", "Heiti TC", "Microsoft JhengHei UI", "Microsoft JhengHei", roboto, noto, "Noto Sans CJK TC", sans-serif;--RS__lineHeightCompensation:1.167}:lang(zh-HK){--RS__baseFontFamily:"方體", "PingFang HK", "方體", "PingFang TC", "黑體", "Heiti TC", "Microsoft JhengHei UI", "Microsoft JhengHei", roboto, noto, "Noto Sans CJK TC", sans-serif;--RS__lineHeightCompensation:1.167}@font-face{font-family:AccessibleDfA;font-style:normal;font-weight:400;src:local("AccessibleDfA"),url(./assets/AccessibleDfA-Regular.woff2) format("woff2"),url(./assets/AccessibleDfA-Regular.woff) format("woff")}@font-face{font-family:AccessibleDfA;font-style:normal;font-weight:700;src:local("AccessibleDfA"),url(./assets/AccessibleDfA-Bold.woff2) format("woff2")}@font-face{font-family:AccessibleDfA;font-style:italic;font-weight:400;src:local("AccessibleDfA"),url(./assets/AccessibleDfA-Italic.woff2) format("woff2")}@font-face{font-family:IA Writer Duospace;font-style:normal;font-weight:400;src:local("iAWriterDuospace-Regular"),url(./assets/iAWriterDuospace-Regular.ttf) format("truetype")}body{widows:2;orphans:2}figcaption,th,td{widows:1;orphans:1}h2,h3,h4,h5,h6,dt,hr,caption{-webkit-column-break-after:avoid;page-break-after:avoid;break-after:avoid}h1,h2,h3,h4,h5,h6,dt,figure,tr{-webkit-column-break-inside:avoid;page-break-inside:avoid;break-inside:avoid}body{-webkit-hyphenate-character:"-";-moz-hyphenate-character:"-";-ms-hyphenate-character:"-";hyphenate-character:"-";-webkit-hyphenate-limit-lines:3;-ms-hyphenate-limit-lines:3;hyphenate-limit-lines:3}h1,h2,h3,h4,h5,h6,dt,figcaption,pre,caption,address,center,code,var{-ms-hyphens:none;-moz-hyphens:none;-webkit-hyphens:none;-epub-hyphens:none;hyphens:none}body{font-variant-numeric:oldstyle-nums proportional-nums}:lang(ja) body,:lang(zh) body,:lang(ko) body{font-variant-numeric:lining-nums proportional-nums}h1,h2,h3,h4,h5,h6,dt{font-variant-numeric:lining-nums proportional-nums}table{font-variant-numeric:lining-nums tabular-nums}code,var{font-variant-ligatures:none;font-variant-numeric:lining-nums tabular-nums slashed-zero}rt{font-variant-east-asian:ruby}:lang(ar){font-variant-ligatures:common-ligatures}:lang(ko){font-kerning:normal}hr{color:inherit;border-color:currentcolor}table,th,td{border-color:currentcolor}figure,blockquote{margin:1em 5%}ul,ol{padding-left:5%}dd{margin-left:5%}pre{white-space:pre-wrap;-ms-tab-size:2;-moz-tab-size:2;-webkit-tab-size:2;tab-size:2}abbr[title],acronym[title]{text-decoration:dotted underline}nobr wbr{white-space:normal}ruby>rt,ruby>rp{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}*:lang(ja):not(:lang(ja-Latn)):not(:lang(ja-Cyrl)),*:lang(zh):not(:lang(zh-Latn)):not(:lang(zh-Cyrl)),*:lang(ko):not(:lang(ko-Latn)):not(:lang(ko-Cyrl)),:lang(ja):not(:lang(ja-Latn)):not(:lang(ja-Cyrl)) cite,:lang(ja):not(:lang(ja-Latn)):not(:lang(ja-Cyrl)) dfn,:lang(ja):not(:lang(ja-Latn)):not(:lang(ja-Cyrl)) em,:lang(ja):not(:lang(ja-Latn)):not(:lang(ja-Cyrl)) i,:lang(zh):not(:lang(zh-Latn)):not(:lang(zh-Cyrl)) cite,:lang(zh):not(:lang(zh-Latn)):not(:lang(zh-Cyrl)) dfn,:lang(zh):not(:lang(zh-Latn)):not(:lang(zh-Cyrl)) em,:lang(zh):not(:lang(zh-Latn)):not(:lang(zh-Cyrl)) i,:lang(ko):not(:lang(ko-Latn)):not(:lang(ko-Cyrl)) cite,:lang(ko):not(:lang(ko-Latn)):not(:lang(ko-Cyrl)) dfn,:lang(ko):not(:lang(ko-Latn)):not(:lang(ko-Cyrl)) em,:lang(ko):not(:lang(ko-Latn)):not(:lang(ko-Cyrl)) i{font-style:normal}:lang(ja) a,:lang(zh) a,:lang(ko) a{text-decoration:none}:root{--RS__maxMediaWidth:100%;--RS__maxMediaHeight:95vh;--RS__boxSizingMedia:border-box;--RS__boxSizingTable:border-box}a,a span,span a,h1,h2,h3,h4,h5,h6{word-wrap:break-word}div{max-width:var(--RS__maxMediaWidth)}img,svg|svg,video{object-fit:contain;width:auto;height:auto;max-width:var(--RS__maxMediaWidth);max-height:var(--RS__maxMediaHeight)!important;box-sizing:var(--RS__boxSizingMedia);-webkit-column-break-inside:avoid;page-break-inside:avoid;break-inside:avoid}audio{max-width:100%;-webkit-column-break-inside:avoid;page-break-inside:avoid;break-inside:avoid}table{max-width:var(--RS__maxMediaWidth);box-sizing:var(--RS__boxSizingTable)}`, Un = `/*!
|
|
5785
|
+
* Readium CSS v.2.0.0-beta.22
|
|
5953
5786
|
* Copyright (c) 2017–2025. Readium Foundation. All rights reserved.
|
|
5954
5787
|
* Use of this source code is governed by a BSD-style license which is detailed in the
|
|
5955
5788
|
* LICENSE file present in the project repository where this source code is maintained.
|
|
@@ -5961,20 +5794,20 @@ const er = En, In = `/*!
|
|
|
5961
5794
|
* L. Le Meur
|
|
5962
5795
|
* Mickaël Menu
|
|
5963
5796
|
* k_taka
|
|
5964
|
-
*/@namespace url(http://www.w3.org/1999/xhtml);@namespace epub url(http://www.idpf.org/2007/ops);@namespace m url(http://www.w3.org/1998/Math/MathML);@namespace svg url(http://www.w3.org/2000/svg);:root{--RS__compFontFamily:var(--RS__baseFontFamily);--RS__codeFontFamily:var(--RS__monospaceTf);--RS__typeScale:1.125;--RS__baseFontSize:100%;--RS__flowSpacing:1.5rem;--RS__paraSpacing:0;--RS__paraIndent:1em;--RS__linkColor:#0000EE;--RS__visitedColor:#551A8B;--RS__primaryColor:;--RS__secondaryColor:}body{font-size:var(--RS__baseFontSize)}h1,h2,h3,h4,h5,h6{font-family:var(--RS__compFontFamily)}blockquote,figure,p,pre,aside,footer,form,hr{margin-top:var(--RS__flowSpacing);margin-bottom:var(--RS__flowSpacing)}p{margin-top:var(--RS__paraSpacing);margin-bottom:var(--RS__paraSpacing);text-indent:var(--RS__paraIndent)}h1+p,h2+p,h3+p,h4+p,h5+p,h6+p,hr+p{text-indent:0}pre{font-family:var(--RS__codeFontFamily)}code,kbd,samp,tt{font-family:var(--RS__codeFontFamily)}sub,sup{position:relative;font-size:67.5%;line-height:1}sub{bottom:-.2ex}sup{bottom:0}:link{color:var(--RS__linkColor)}:visited{color:var(--RS__visitedColor)}h1{margin-top:calc(var(--RS__flowSpacing) * 2);margin-bottom:calc(var(--RS__flowSpacing) * 2);font-size:calc(((1em * var(--RS__typeScale)) * var(--RS__typeScale)) * var(--RS__typeScale))}h2{margin-top:calc(var(--RS__flowSpacing) * 2);margin-bottom:var(--RS__flowSpacing);font-size:calc((1em * var(--RS__typeScale)) * var(--RS__typeScale))}h3{margin-top:var(--RS__flowSpacing);margin-bottom:var(--RS__flowSpacing);font-size:calc(1em * var(--RS__typeScale))}h4{margin-top:var(--RS__flowSpacing);margin-bottom:var(--RS__flowSpacing);font-size:1em}h5{margin-top:var(--RS__flowSpacing);margin-bottom:var(--RS__flowSpacing);font-size:1em;font-variant:small-caps}h6{margin-top:var(--RS__flowSpacing);margin-bottom:0;font-size:1em;text-transform:lowercase;font-variant:small-caps}dl,ol,ul{margin-top:var(--RS__flowSpacing);margin-bottom:var(--RS__flowSpacing)}table{margin:var(--RS__flowSpacing) 0;border:1px solid currentcolor;border-collapse:collapse;empty-cells:show}thead,tbody,tfoot,table>tr{vertical-align:top}th{text-align:left}th,td{padding:4px;border:1px solid currentcolor}`, _ = (r, t) => URL.createObjectURL(new Blob([r], { type: t })), qi = (r) => r.replace(/\/\/.*/g, "").replace(/\/\*[\s\S]*?\*\//g, "").replace(/\n/g, "").replace(/\s+/g, " "),
|
|
5797
|
+
*/@namespace url(http://www.w3.org/1999/xhtml);@namespace epub url(http://www.idpf.org/2007/ops);@namespace m url(http://www.w3.org/1998/Math/MathML);@namespace svg url(http://www.w3.org/2000/svg);:root{--RS__compFontFamily:var(--RS__baseFontFamily);--RS__codeFontFamily:var(--RS__monospaceTf);--RS__typeScale:1.125;--RS__baseFontSize:100%;--RS__flowSpacing:1.5rem;--RS__paraSpacing:0;--RS__paraIndent:1em;--RS__linkColor:#0000EE;--RS__visitedColor:#551A8B;--RS__primaryColor:;--RS__secondaryColor:}body{font-size:var(--RS__baseFontSize)}h1,h2,h3,h4,h5,h6{font-family:var(--RS__compFontFamily)}blockquote,figure,p,pre,aside,footer,form,hr{margin-top:var(--RS__flowSpacing);margin-bottom:var(--RS__flowSpacing)}p{margin-top:var(--RS__paraSpacing);margin-bottom:var(--RS__paraSpacing);text-indent:var(--RS__paraIndent)}h1+p,h2+p,h3+p,h4+p,h5+p,h6+p,hr+p{text-indent:0}pre{font-family:var(--RS__codeFontFamily)}code,kbd,samp,tt{font-family:var(--RS__codeFontFamily)}sub,sup{position:relative;font-size:67.5%;line-height:1}sub{bottom:-.2ex}sup{bottom:0}:link{color:var(--RS__linkColor)}:visited{color:var(--RS__visitedColor)}h1{margin-top:calc(var(--RS__flowSpacing) * 2);margin-bottom:calc(var(--RS__flowSpacing) * 2);font-size:calc(((1em * var(--RS__typeScale)) * var(--RS__typeScale)) * var(--RS__typeScale))}h2{margin-top:calc(var(--RS__flowSpacing) * 2);margin-bottom:var(--RS__flowSpacing);font-size:calc((1em * var(--RS__typeScale)) * var(--RS__typeScale))}h3{margin-top:var(--RS__flowSpacing);margin-bottom:var(--RS__flowSpacing);font-size:calc(1em * var(--RS__typeScale))}h4{margin-top:var(--RS__flowSpacing);margin-bottom:var(--RS__flowSpacing);font-size:1em}h5{margin-top:var(--RS__flowSpacing);margin-bottom:var(--RS__flowSpacing);font-size:1em;font-variant:small-caps}h6{margin-top:var(--RS__flowSpacing);margin-bottom:0;font-size:1em;text-transform:lowercase;font-variant:small-caps}dl,ol,ul{margin-top:var(--RS__flowSpacing);margin-bottom:var(--RS__flowSpacing)}table{margin:var(--RS__flowSpacing) 0;border:1px solid currentcolor;border-collapse:collapse;empty-cells:show}thead,tbody,tfoot,table>tr{vertical-align:top}th{text-align:left}th,td{padding:4px;border:1px solid currentcolor}`, _ = (r, t) => URL.createObjectURL(new Blob([r], { type: t })), qi = (r) => r.replace(/\/\/.*/g, "").replace(/\/\*[\s\S]*?\*\//g, "").replace(/\n/g, "").replace(/\s+/g, " "), _t = (r) => r.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g, "").replace(/ {2,}/g, " ").replace(/url\((?!(https?:)?\/\/)("?)\/([^\)]+)/g, `url($2${window.location.origin}/$3`), Se = (r, t) => {
|
|
5965
5798
|
const e = r.createElement("script");
|
|
5966
5799
|
return e.dataset.readium = "true", e.src = t.startsWith("blob:") ? t : _(t, "text/javascript"), e;
|
|
5967
|
-
},
|
|
5800
|
+
}, $t = (r, t) => {
|
|
5968
5801
|
const e = r.createElement("link");
|
|
5969
5802
|
return e.dataset.readium = "true", e.rel = "stylesheet", e.type = "text/css", e.href = t.startsWith("blob:") ? t : _(t, "text/css"), e;
|
|
5970
|
-
},
|
|
5971
|
-
if (
|
|
5803
|
+
}, te = /* @__PURE__ */ new Map(), gt = (r, t) => {
|
|
5804
|
+
if (te.has(r)) return te.get(r);
|
|
5972
5805
|
const e = t();
|
|
5973
|
-
return
|
|
5974
|
-
},
|
|
5806
|
+
return te.set(r, e), e;
|
|
5807
|
+
}, Rn = (r) => Se(r, gt("css-selector-generator", () => _(
|
|
5975
5808
|
'!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports._readium_cssSelectorGenerator=e():t._readium_cssSelectorGenerator=e()}(self,(()=>(()=>{"use strict";var t,e,n={d:(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},o={};function r(t){return t&&t instanceof Element}function i(t="unknown problem",...e){console.warn(`CssSelectorGenerator: ${t}`,...e)}n.r(o),n.d(o,{default:()=>z,getCssSelector:()=>U}),function(t){t.NONE="none",t.DESCENDANT="descendant",t.CHILD="child"}(t||(t={})),function(t){t.id="id",t.class="class",t.tag="tag",t.attribute="attribute",t.nthchild="nthchild",t.nthoftype="nthoftype"}(e||(e={}));const c={selectors:[e.id,e.class,e.tag,e.attribute],includeTag:!1,whitelist:[],blacklist:[],combineWithinSelector:!0,combineBetweenSelectors:!0,root:null,maxCombinations:Number.POSITIVE_INFINITY,maxCandidates:Number.POSITIVE_INFINITY};function u(t){return t instanceof RegExp}function s(t){return["string","function"].includes(typeof t)||u(t)}function l(t){return Array.isArray(t)?t.filter(s):[]}function a(t){const e=[Node.DOCUMENT_NODE,Node.DOCUMENT_FRAGMENT_NODE,Node.ELEMENT_NODE];return function(t){return t instanceof Node}(t)&&e.includes(t.nodeType)}function f(t,e){if(a(t))return t.contains(e)||i("element root mismatch","Provided root does not contain the element. This will most likely result in producing a fallback selector using element\'s real root node. If you plan to use the selector using provided root (e.g. `root.querySelector`), it will nto work as intended."),t;const n=e.getRootNode({composed:!1});return a(n)?(n!==document&&i("shadow root inferred","You did not provide a root and the element is a child of Shadow DOM. This will produce a selector using ShadowRoot as a root. If you plan to use the selector using document as a root (e.g. `document.querySelector`), it will not work as intended."),n):e.ownerDocument.querySelector(":root")}function d(t){return"number"==typeof t?t:Number.POSITIVE_INFINITY}function m(t=[]){const[e=[],...n]=t;return 0===n.length?e:n.reduce(((t,e)=>t.filter((t=>e.includes(t)))),e)}function p(t){return[].concat(...t)}function h(t){const e=t.map((t=>{if(u(t))return e=>t.test(e);if("function"==typeof t)return e=>{const n=t(e);return"boolean"!=typeof n?(i("pattern matcher function invalid","Provided pattern matching function does not return boolean. It\'s result will be ignored.",t),!1):n};if("string"==typeof t){const e=new RegExp("^"+t.replace(/[|\\\\{}()[\\]^$+?.]/g,"\\\\$&").replace(/\\*/g,".+")+"$");return t=>e.test(t)}return i("pattern matcher invalid","Pattern matching only accepts strings, regular expressions and/or functions. This item is invalid and will be ignored.",t),()=>!1}));return t=>e.some((e=>e(t)))}function g(t,e,n){const o=Array.from(f(n,t[0]).querySelectorAll(e));return o.length===t.length&&t.every((t=>o.includes(t)))}function y(t,e){e=null!=e?e:function(t){return t.ownerDocument.querySelector(":root")}(t);const n=[];let o=t;for(;r(o)&&o!==e;)n.push(o),o=o.parentElement;return n}function b(t,e){return m(t.map((t=>y(t,e))))}const N={[t.NONE]:{type:t.NONE,value:""},[t.DESCENDANT]:{type:t.DESCENDANT,value:" > "},[t.CHILD]:{type:t.CHILD,value:" "}},S=new RegExp(["^$","\\\\s"].join("|")),E=new RegExp(["^$"].join("|")),w=[e.nthoftype,e.tag,e.id,e.class,e.attribute,e.nthchild],v=h(["class","id","ng-*"]);function C({nodeName:t}){return`[${t}]`}function O({nodeName:t,nodeValue:e}){return`[${t}=\'${L(e)}\']`}function T(t){const e=Array.from(t.attributes).filter((e=>function({nodeName:t},e){const n=e.tagName.toLowerCase();return!(["input","option"].includes(n)&&"value"===t||v(t))}(e,t)));return[...e.map(C),...e.map(O)]}function I(t){return(t.getAttribute("class")||"").trim().split(/\\s+/).filter((t=>!E.test(t))).map((t=>`.${L(t)}`))}function x(t){const e=t.getAttribute("id")||"",n=`#${L(e)}`,o=t.getRootNode({composed:!1});return!S.test(e)&&g([t],n,o)?[n]:[]}function j(t){const e=t.parentNode;if(e){const n=Array.from(e.childNodes).filter(r).indexOf(t);if(n>-1)return[`:nth-child(${n+1})`]}return[]}function A(t){return[L(t.tagName.toLowerCase())]}function D(t){const e=[...new Set(p(t.map(A)))];return 0===e.length||e.length>1?[]:[e[0]]}function $(t){const e=D([t])[0],n=t.parentElement;if(n){const o=Array.from(n.children).filter((t=>t.tagName.toLowerCase()===e)),r=o.indexOf(t);if(r>-1)return[`${e}:nth-of-type(${r+1})`]}return[]}function R(t=[],{maxResults:e=Number.POSITIVE_INFINITY}={}){const n=[];let o=0,r=k(1);for(;r.length<=t.length&&o<e;)o+=1,n.push(r.map((e=>t[e]))),r=P(r,t.length-1);return n}function P(t=[],e=0){const n=t.length;if(0===n)return[];const o=[...t];o[n-1]+=1;for(let t=n-1;t>=0;t--)if(o[t]>e){if(0===t)return k(n+1);o[t-1]++,o[t]=o[t-1]+1}return o[n-1]>e?k(n+1):o}function k(t=1){return Array.from(Array(t).keys())}const _=":".charCodeAt(0).toString(16).toUpperCase(),M=/[ !"#$%&\'()\\[\\]{|}<>*+,./;=?@^`~\\\\]/;function L(t=""){var e,n;return null!==(n=null===(e=null===CSS||void 0===CSS?void 0:CSS.escape)||void 0===e?void 0:e.call(CSS,t))&&void 0!==n?n:function(t=""){return t.split("").map((t=>":"===t?`\\\\${_} `:M.test(t)?`\\\\${t}`:escape(t).replace(/%/g,"\\\\"))).join("")}(t)}const q={tag:D,id:function(t){return 0===t.length||t.length>1?[]:x(t[0])},class:function(t){return m(t.map(I))},attribute:function(t){return m(t.map(T))},nthchild:function(t){return m(t.map(j))},nthoftype:function(t){return m(t.map($))}},F={tag:A,id:x,class:I,attribute:T,nthchild:j,nthoftype:$};function V(t){return t.includes(e.tag)||t.includes(e.nthoftype)?[...t]:[...t,e.tag]}function Y(t={}){const n=[...w];return t[e.tag]&&t[e.nthoftype]&&n.splice(n.indexOf(e.tag),1),n.map((e=>{return(o=t)[n=e]?o[n].join(""):"";var n,o})).join("")}function B(t,e,n="",o){const r=function(t,e){return""===e?t:function(t,e){return[...t.map((t=>e+" "+t)),...t.map((t=>e+" > "+t))]}(t,e)}(function(t,e,n){const o=function(t,e){const{blacklist:n,whitelist:o,combineWithinSelector:r,maxCombinations:i}=e,c=h(n),u=h(o);return function(t){const{selectors:e,includeTag:n}=t,o=[].concat(e);return n&&!o.includes("tag")&&o.push("tag"),o}(e).reduce(((e,n)=>{const o=function(t,e){var n;return(null!==(n=q[e])&&void 0!==n?n:()=>[])(t)}(t,n),s=function(t=[],e,n){return t.filter((t=>n(t)||!e(t)))}(o,c,u),l=function(t=[],e){return t.sort(((t,n)=>{const o=e(t),r=e(n);return o&&!r?-1:!o&&r?1:0}))}(s,u);return e[n]=r?R(l,{maxResults:i}):l.map((t=>[t])),e}),{})}(t,n),r=function(t,e){return function(t){const{selectors:e,combineBetweenSelectors:n,includeTag:o,maxCandidates:r}=t,i=n?R(e,{maxResults:r}):e.map((t=>[t]));return o?i.map(V):i}(e).map((e=>function(t,e){const n={};return t.forEach((t=>{const o=e[t];o.length>0&&(n[t]=o)})),function(t={}){let e=[];return Object.entries(t).forEach((([t,n])=>{e=n.flatMap((n=>0===e.length?[{[t]:n}]:e.map((e=>Object.assign(Object.assign({},e),{[t]:n})))))})),e}(n).map(Y)}(e,t))).filter((t=>t.length>0))}(o,n),i=p(r);return[...new Set(i)]}(t,o.root,o),n);for(const e of r)if(g(t,e,o.root))return e;return null}function G(t){return{value:t,include:!1}}function W({selectors:t,operator:n}){let o=[...w];t[e.tag]&&t[e.nthoftype]&&(o=o.filter((t=>t!==e.tag)));let r="";return o.forEach((e=>{(t[e]||[]).forEach((({value:t,include:e})=>{e&&(r+=t)}))})),n.value+r}function H(n){return[":root",...y(n).reverse().map((n=>{const o=function(e,n,o=t.NONE){const r={};return n.forEach((t=>{Reflect.set(r,t,function(t,e){return F[e](t)}(e,t).map(G))})),{element:e,operator:N[o],selectors:r}}(n,[e.nthchild],t.DESCENDANT);return o.selectors.nthchild.forEach((t=>{t.include=!0})),o})).map(W)].join("")}function U(t,n={}){const o=function(t){const e=(Array.isArray(t)?t:[t]).filter(r);return[...new Set(e)]}(t),i=function(t,n={}){const o=Object.assign(Object.assign({},c),n);return{selectors:(r=o.selectors,Array.isArray(r)?r.filter((t=>{return n=e,o=t,Object.values(n).includes(o);var n,o})):[]),whitelist:l(o.whitelist),blacklist:l(o.blacklist),root:f(o.root,t),combineWithinSelector:!!o.combineWithinSelector,combineBetweenSelectors:!!o.combineBetweenSelectors,includeTag:!!o.includeTag,maxCombinations:d(o.maxCombinations),maxCandidates:d(o.maxCandidates)};var r}(o[0],n);let u="",s=i.root;function a(){return function(t,e,n="",o){if(0===t.length)return null;const r=[t.length>1?t:[],...b(t,e).map((t=>[t]))];for(const t of r){const e=B(t,0,n,o);if(e)return{foundElements:t,selector:e}}return null}(o,s,u,i)}let m=a();for(;m;){const{foundElements:t,selector:e}=m;if(g(o,e,i.root))return e;s=t[0],u=e,m=a()}return o.length>1?o.map((t=>U(t,i))).join(", "):function(t){return t.map(H).join(", ")}(o)}const z=U;return o})()));',
|
|
5976
5809
|
"text/javascript"
|
|
5977
|
-
))),
|
|
5810
|
+
))), Cn = (r) => Se(r, gt("JS-Before", () => _(qi(
|
|
5978
5811
|
`
|
|
5979
5812
|
window._readium_blockedEvents = [];
|
|
5980
5813
|
window._readium_blockEvents = true;
|
|
@@ -5988,7 +5821,7 @@ const er = En, In = `/*!
|
|
|
5988
5821
|
};
|
|
5989
5822
|
window.addEventListener("DOMContentLoaded", window._readium_eventBlocker, true);
|
|
5990
5823
|
window.addEventListener("load", window._readium_eventBlocker, true);`
|
|
5991
|
-
), "text/javascript"))),
|
|
5824
|
+
), "text/javascript"))), Sn = (r) => Se(r, gt("JS-After", () => _(qi(
|
|
5992
5825
|
`
|
|
5993
5826
|
if(window.onload) window.onload = new Proxy(window.onload, {
|
|
5994
5827
|
apply: function(target, receiver, args) {
|
|
@@ -6049,8 +5882,8 @@ class _i {
|
|
|
6049
5882
|
finalizeDOM(t, e, i, A = !1, n) {
|
|
6050
5883
|
if (!t) return "";
|
|
6051
5884
|
if (!A) {
|
|
6052
|
-
const o =
|
|
6053
|
-
t.head.firstChild ? t.head.firstChild.before(o) : t.head.appendChild(o), this.hasStyle(t) || o.after(
|
|
5885
|
+
const o = $t(t, gt("ReadiumCSS-before", () => _(_t(Fn), "text/css")));
|
|
5886
|
+
t.head.firstChild ? t.head.firstChild.before(o) : t.head.appendChild(o), this.hasStyle(t) || o.after($t(t, gt("ReadiumCSS-default", () => _(_t(Un), "text/css")))), t.head.appendChild($t(t, gt("ReadiumCSS-after", () => _(_t(yn), "text/css")))), n && this.setProperties(n, t);
|
|
6054
5887
|
}
|
|
6055
5888
|
if (t.body.querySelectorAll("img").forEach((o) => {
|
|
6056
5889
|
o.setAttribute("fetchpriority", "high");
|
|
@@ -6066,7 +5899,7 @@ class _i {
|
|
|
6066
5899
|
o.href = e, o.dataset.readium = "true", t.head.firstChild.before(o);
|
|
6067
5900
|
}
|
|
6068
5901
|
const s = this.hasExecutable(t);
|
|
6069
|
-
return s && t.head.firstChild.before(
|
|
5902
|
+
return s && t.head.firstChild.before(Cn(t)), t.head.firstChild.before(Rn(t)), s && t.head.appendChild(Sn(t)), URL.createObjectURL(
|
|
6070
5903
|
new Blob([new XMLSerializer().serializeToString(t)], {
|
|
6071
5904
|
type: i.isHTML ? i.string : "application/xhtml+xml"
|
|
6072
5905
|
// Fallback to XHTML
|
|
@@ -6074,7 +5907,7 @@ class _i {
|
|
|
6074
5907
|
);
|
|
6075
5908
|
}
|
|
6076
5909
|
}
|
|
6077
|
-
class
|
|
5910
|
+
class zn {
|
|
6078
5911
|
constructor(t) {
|
|
6079
5912
|
this.hidden = !0, this.destroyed = !1, this.currModules = [], this.frame = document.createElement("iframe"), this.frame.classList.add("readium-navigator-iframe"), this.frame.style.visibility = "hidden", this.frame.style.setProperty("aria-hidden", "true"), this.frame.style.opacity = "0", this.frame.style.position = "absolute", this.frame.style.pointerEvents = "none", this.frame.style.transition = "visibility 0s, opacity 0.1s linear", this.source = t;
|
|
6080
5913
|
}
|
|
@@ -6128,11 +5961,11 @@ class Sn {
|
|
|
6128
5961
|
async show(t) {
|
|
6129
5962
|
if (this.destroyed) throw Error("Trying to show frame when it doesn't exist");
|
|
6130
5963
|
if (!this.frame.parentElement) throw Error("Trying to show frame that is not attached to the DOM");
|
|
6131
|
-
return this.comms ? this.comms.resume() : this.comms = new
|
|
5964
|
+
return this.comms ? this.comms.resume() : this.comms = new wt(this.frame.contentWindow, this.source), new Promise((e, i) => {
|
|
6132
5965
|
this.comms?.send("activate", void 0, () => {
|
|
6133
5966
|
this.comms?.send("focus", void 0, () => {
|
|
6134
5967
|
const A = () => {
|
|
6135
|
-
this.frame.style.removeProperty("visibility"), this.frame.style.removeProperty("aria-hidden"), this.frame.style.removeProperty("opacity"), this.frame.style.removeProperty("pointer-events"), this.hidden = !1,
|
|
5968
|
+
this.frame.style.removeProperty("visibility"), this.frame.style.removeProperty("aria-hidden"), this.frame.style.removeProperty("opacity"), this.frame.style.removeProperty("pointer-events"), this.hidden = !1, Mt.UA.WebKit && this.comms?.send("force_webkit_recalc", void 0), e();
|
|
6136
5969
|
};
|
|
6137
5970
|
t !== void 0 ? this.comms?.send("go_progression", t, A) : A();
|
|
6138
5971
|
});
|
|
@@ -6140,7 +5973,7 @@ class Sn {
|
|
|
6140
5973
|
});
|
|
6141
5974
|
}
|
|
6142
5975
|
setCSSProperties(t) {
|
|
6143
|
-
this.destroyed || !this.frame.contentWindow || (this.hidden && (this.comms ? this.comms?.resume() : this.comms = new
|
|
5976
|
+
this.destroyed || !this.frame.contentWindow || (this.hidden && (this.comms ? this.comms?.resume() : this.comms = new wt(this.frame.contentWindow, this.source)), this.comms?.send("update_properties", t), this.hidden && this.comms?.halt());
|
|
6144
5977
|
}
|
|
6145
5978
|
get iframe() {
|
|
6146
5979
|
if (this.destroyed) throw Error("Trying to use frame when it doesn't exist");
|
|
@@ -6191,13 +6024,13 @@ class Qn {
|
|
|
6191
6024
|
const s = this.positions[n].href;
|
|
6192
6025
|
this.inprogress.has(s) && await this.inprogress.get(s);
|
|
6193
6026
|
const o = new Promise(async (a, h) => {
|
|
6194
|
-
const c = [],
|
|
6027
|
+
const c = [], d = [];
|
|
6195
6028
|
this.positions.forEach((l, p) => {
|
|
6196
|
-
(p > n + ni || p < n - ni) && (c.includes(l.href) || c.push(l.href)), p < n + ri && p > n - ri && (
|
|
6029
|
+
(p > n + ni || p < n - ni) && (c.includes(l.href) || c.push(l.href)), p < n + ri && p > n - ri && (d.includes(l.href) || d.push(l.href));
|
|
6197
6030
|
}), c.forEach(async (l) => {
|
|
6198
|
-
|
|
6031
|
+
d.includes(l) || this.pool.has(l) && (await this.pool.get(l)?.destroy(), this.pool.delete(l), this.pendingUpdates.has(l) && this.pendingUpdates.set(l, { inPool: !1 }));
|
|
6199
6032
|
}), this.currentBaseURL !== void 0 && t.baseURL !== this.currentBaseURL && (this.blobs.forEach((l) => URL.revokeObjectURL(l)), this.blobs.clear()), this.currentBaseURL = t.baseURL;
|
|
6200
|
-
const
|
|
6033
|
+
const g = async (l) => {
|
|
6201
6034
|
if (A && (this.blobs.forEach((E) => URL.revokeObjectURL(E)), this.blobs.clear(), this.pendingUpdates.clear()), this.pendingUpdates.has(l) && this.pendingUpdates.get(l)?.inPool === !1) {
|
|
6202
6035
|
const E = this.blobs.get(l);
|
|
6203
6036
|
E && (URL.revokeObjectURL(E), this.blobs.delete(l), this.pendingUpdates.delete(l));
|
|
@@ -6214,14 +6047,14 @@ class Qn {
|
|
|
6214
6047
|
const p = t.readingOrder.findWithHref(l);
|
|
6215
6048
|
if (!p) return;
|
|
6216
6049
|
if (!this.blobs.has(l)) {
|
|
6217
|
-
const
|
|
6218
|
-
this.blobs.set(l,
|
|
6050
|
+
const R = await new _i(t, this.currentBaseURL || "", p, this.currentCssProperties).build();
|
|
6051
|
+
this.blobs.set(l, R);
|
|
6219
6052
|
}
|
|
6220
|
-
const w = new
|
|
6053
|
+
const w = new zn(this.blobs.get(l));
|
|
6221
6054
|
l !== s && await w.hide(), this.container.appendChild(w.iframe), await w.load(i), this.pool.set(l, w);
|
|
6222
6055
|
};
|
|
6223
6056
|
try {
|
|
6224
|
-
await Promise.all(
|
|
6057
|
+
await Promise.all(d.map((l) => g(l)));
|
|
6225
6058
|
} catch (l) {
|
|
6226
6059
|
h(l);
|
|
6227
6060
|
}
|
|
@@ -6271,9 +6104,9 @@ class Qn {
|
|
|
6271
6104
|
}), t;
|
|
6272
6105
|
}
|
|
6273
6106
|
}
|
|
6274
|
-
class
|
|
6107
|
+
class Yn {
|
|
6275
6108
|
constructor(t, e, i) {
|
|
6276
|
-
this.currModules = [], this.cachedPage = void 0, this.peripherals = t, this.debugHref = i, this.frame = document.createElement("iframe"), this.frame.classList.add("readium-navigator-iframe"), this.frame.classList.add("blank"), this.frame.scrolling = "no", this.frame.style.visibility = "hidden", this.frame.style.setProperty("aria-hidden", "true"), this.frame.style.display = "none", this.frame.style.position = "absolute", this.frame.style.pointerEvents = "none", this.frame.style.transformOrigin = "0 0", this.frame.style.transform = "scale(1)", this.frame.style.background = "#fff", this.frame.style.touchAction = "none", this.frame.dataset.originalHref = i, this.source = "about:blank", this.wrapper = document.createElement("div"), this.wrapper.style.position = "relative", this.wrapper.style.float = this.wrapper.style.cssFloat = e ===
|
|
6109
|
+
this.currModules = [], this.cachedPage = void 0, this.peripherals = t, this.debugHref = i, this.frame = document.createElement("iframe"), this.frame.classList.add("readium-navigator-iframe"), this.frame.classList.add("blank"), this.frame.scrolling = "no", this.frame.style.visibility = "hidden", this.frame.style.setProperty("aria-hidden", "true"), this.frame.style.display = "none", this.frame.style.position = "absolute", this.frame.style.pointerEvents = "none", this.frame.style.transformOrigin = "0 0", this.frame.style.transform = "scale(1)", this.frame.style.background = "#fff", this.frame.style.touchAction = "none", this.frame.dataset.originalHref = i, this.source = "about:blank", this.wrapper = document.createElement("div"), this.wrapper.style.position = "relative", this.wrapper.style.float = this.wrapper.style.cssFloat = e === N.rtl ? "right" : "left", this.wrapper.appendChild(this.frame);
|
|
6277
6110
|
}
|
|
6278
6111
|
async load(t, e) {
|
|
6279
6112
|
return this.source === e && this.loadPromise && [...this.currModules].sort().join("|") === [...t].sort().join("|") ? this.loadPromise : (this.loaded && this.source !== e && this.window.stop(), this.source = e, this.loadPromise = new Promise((i, A) => {
|
|
@@ -6333,10 +6166,10 @@ class zn {
|
|
|
6333
6166
|
const i = Math.min(this.wrapper.clientWidth / e.width, this.wrapper.clientHeight / e.height);
|
|
6334
6167
|
this.frame.style.transform = `scale(${i})`;
|
|
6335
6168
|
const A = this.frame.getBoundingClientRect(), n = this.wrapper.clientHeight - A.height;
|
|
6336
|
-
if (this.frame.style.top = `${n / 2}px`, t ===
|
|
6169
|
+
if (this.frame.style.top = `${n / 2}px`, t === H.left) {
|
|
6337
6170
|
const s = this.wrapper.clientWidth - A.width;
|
|
6338
6171
|
this.frame.style.left = `${s}px`;
|
|
6339
|
-
} else if (t ===
|
|
6172
|
+
} else if (t === H.center) {
|
|
6340
6173
|
const s = this.wrapper.clientWidth - A.width;
|
|
6341
6174
|
this.frame.style.left = `${s / 2}px`;
|
|
6342
6175
|
} else
|
|
@@ -6383,7 +6216,7 @@ class zn {
|
|
|
6383
6216
|
this.showPromise = void 0;
|
|
6384
6217
|
return;
|
|
6385
6218
|
}
|
|
6386
|
-
return this.showPromise ? (this.cachedPage !== t && (this.update(t), this.cachedPage = t), this.showPromise) : (this.cachedPage = t, this.comms ? this.comms.resume() : this.comms = new
|
|
6219
|
+
return this.showPromise ? (this.cachedPage !== t && (this.update(t), this.cachedPage = t), this.showPromise) : (this.cachedPage = t, this.comms ? this.comms.resume() : this.comms = new wt(this.frame.contentWindow, this.source), this.showPromise = new Promise((e, i) => {
|
|
6387
6220
|
this.comms.send("focus", void 0, (A) => {
|
|
6388
6221
|
this.update(this.cachedPage), e();
|
|
6389
6222
|
});
|
|
@@ -6434,13 +6267,13 @@ class zn {
|
|
|
6434
6267
|
return this.loader;
|
|
6435
6268
|
}
|
|
6436
6269
|
}
|
|
6437
|
-
var
|
|
6438
|
-
class
|
|
6270
|
+
var Nn = /* @__PURE__ */ ((r) => (r[r.Left = 0] = "Left", r[r.Center = 1] = "Center", r[r.Right = 2] = "Right", r))(Nn || {}), xn = /* @__PURE__ */ ((r) => (r[r.Top = 0] = "Top", r[r.Middle = 1] = "Middle", r[r.Bottom = 2] = "Bottom", r))(xn || {});
|
|
6271
|
+
class Tn {
|
|
6439
6272
|
constructor() {
|
|
6440
6273
|
this.outerWidth = 0, this.outerHeight = 0, this.HTML = document.documentElement, this.Head = document.head, this.Body = document.body;
|
|
6441
6274
|
}
|
|
6442
6275
|
refreshOuterPixels(t) {
|
|
6443
|
-
|
|
6276
|
+
Mt.OS.iOS || (this.outerHeight = window.outerHeight - window.innerHeight, Mt.OS.Android && Mt.UA.Chrome && window.screen.height > window.innerHeight && (this.outerHeight = (window.screen.height - window.innerHeight) / 1.5), this.outerWidth = window.outerWidth - window.innerWidth);
|
|
6444
6277
|
}
|
|
6445
6278
|
getBibiEventCoord(t, e = 0) {
|
|
6446
6279
|
const i = { X: 0, Y: 0 };
|
|
@@ -6483,7 +6316,7 @@ class xn {
|
|
|
6483
6316
|
};
|
|
6484
6317
|
}
|
|
6485
6318
|
}
|
|
6486
|
-
class
|
|
6319
|
+
class Pn {
|
|
6487
6320
|
constructor() {
|
|
6488
6321
|
this._DOM = {
|
|
6489
6322
|
show: !1,
|
|
@@ -6501,8 +6334,8 @@ class Tn {
|
|
|
6501
6334
|
return this._DOM;
|
|
6502
6335
|
}
|
|
6503
6336
|
}
|
|
6504
|
-
const si = 6,
|
|
6505
|
-
class
|
|
6337
|
+
const si = 6, ee = 1.02, oi = 50;
|
|
6338
|
+
class bn {
|
|
6506
6339
|
constructor(t, e = !1) {
|
|
6507
6340
|
this.dragState = 0, this.minimumMoved = !1, this.pan = {
|
|
6508
6341
|
startX: 0,
|
|
@@ -6521,14 +6354,14 @@ class jn {
|
|
|
6521
6354
|
target: { X: 0, Y: 0 },
|
|
6522
6355
|
touchN: 0,
|
|
6523
6356
|
startTranslate: { X: 0, Y: 0 }
|
|
6524
|
-
}, this._scale = 1, this.scaleDebouncer = 0, this.frameBounds = null, this.debugger = null, this.btouchstartHandler = this.touchstartHandler.bind(this), this.btouchendHandler = this.touchendHandler.bind(this), this.btouchmoveHandler = this.touchmoveHandler.bind(this), this.bdblclickHandler = this.dblclickHandler.bind(this), this.bmousedownHandler = this.mousedownHandler.bind(this), this.bmouseupHandler = this.mouseupHandler.bind(this), this.bmousemoveHandler = this.mousemoveHandler.bind(this), this.moveFrame = 0, this.manager = t, this.coordinator = new
|
|
6357
|
+
}, this._scale = 1, this.scaleDebouncer = 0, this.frameBounds = null, this.debugger = null, this.btouchstartHandler = this.touchstartHandler.bind(this), this.btouchendHandler = this.touchendHandler.bind(this), this.btouchmoveHandler = this.touchmoveHandler.bind(this), this.bdblclickHandler = this.dblclickHandler.bind(this), this.bmousedownHandler = this.mousedownHandler.bind(this), this.bmouseupHandler = this.mouseupHandler.bind(this), this.bmousemoveHandler = this.mousemoveHandler.bind(this), this.moveFrame = 0, this.manager = t, this.coordinator = new Tn(), this.attachEvents(), e && (this.debugger = new Pn());
|
|
6525
6358
|
}
|
|
6526
6359
|
get scale() {
|
|
6527
6360
|
return this._scale;
|
|
6528
6361
|
}
|
|
6529
6362
|
set scale(t) {
|
|
6530
6363
|
isNaN(t) && (t = 1), window.clearTimeout(this.scaleDebouncer), this.scaleDebouncer = window.setTimeout(() => {
|
|
6531
|
-
this.dragState === 0 && this.scale <
|
|
6364
|
+
this.dragState === 0 && this.scale < ee && (this.pan.translateX = 0, this.pan.translateY = 0, this.clearPan(), this.manager.updateBookStyle()), this.manager.listener("zoom", t);
|
|
6532
6365
|
}, 100), this._scale = t;
|
|
6533
6366
|
}
|
|
6534
6367
|
/**
|
|
@@ -6624,7 +6457,7 @@ class jn {
|
|
|
6624
6457
|
this.pan.startX = e.X, this.pan.startY = e.Y;
|
|
6625
6458
|
}
|
|
6626
6459
|
window.setTimeout(() => {
|
|
6627
|
-
this.manager.updateBookStyle(!0), this.dragState === 0 && (this.scale <
|
|
6460
|
+
this.manager.updateBookStyle(!0), this.dragState === 0 && (this.scale < ee && (this.pan.translateX = 0, this.pan.translateY = 0), this.clearPan()), this.manager.updateBookStyle(!0);
|
|
6628
6461
|
}, 50);
|
|
6629
6462
|
}
|
|
6630
6463
|
/**
|
|
@@ -6640,7 +6473,7 @@ class jn {
|
|
|
6640
6473
|
if (this.dragState === 2 && i) {
|
|
6641
6474
|
if (this.pinch.touchN++, this.pinch.touchN < 4) return;
|
|
6642
6475
|
let s = i / this.pinch.startDistance * this.scale;
|
|
6643
|
-
s >= si && (s = si), s <=
|
|
6476
|
+
s >= si && (s = si), s <= ee && (s = 1), this.scale = s, this.pinch.startDistance = i, A = !0;
|
|
6644
6477
|
}
|
|
6645
6478
|
if (this.pan.letItGo === !1 && (this.pan.letItGo = Math.abs(this.pan.startY - e.Y) < Math.abs(this.pan.startX - e.X)), this.debugger?.show && (this.debugger.DOM.touch1.style.top = `${e.Y - 10}px`, this.debugger.DOM.touch1.style.left = `${e.X - 10}px`, this.debugger.DOM.touch1.innerText = `${e.X.toFixed(2)},${e.Y.toFixed(2)}`), this.dragState > 0 && this.isScaled || this.dragState > 1) {
|
|
6646
6479
|
if (this.dragState === 1) {
|
|
@@ -6661,8 +6494,8 @@ class jn {
|
|
|
6661
6494
|
h += a.X / this.scale, this.pinch.target.X += h, a.X += this.pinch.target.X * this.scale / this.pinch.startScale;
|
|
6662
6495
|
let c = -a.Y / n;
|
|
6663
6496
|
c += a.Y / this.scale, this.pinch.target.Y += c, a.Y += this.pinch.target.Y * this.scale / this.pinch.startScale;
|
|
6664
|
-
let
|
|
6665
|
-
this.pan.translateX =
|
|
6497
|
+
let d = (a.X - (this.pan.startX - this.manager.width / 2)) * 1 / this.scale, g = (a.Y - (this.pan.startY - this.manager.height / 2)) * 1 / this.scale;
|
|
6498
|
+
this.pan.translateX = d, this.pan.translateY = g, this.debugger?.show && (this.debugger.DOM.pinchTarget.style.left = `${this.pinch.target.X * this.scale / this.pinch.startScale - 5 + this.manager.width / 2}px`, this.debugger.DOM.pinchTarget.style.top = `${this.pinch.target.Y * this.scale / this.pinch.startScale - 5 + this.manager.height / 2}px`, this.debugger.DOM.pinchTarget.innerText = `${(this.pinch.target.X * this.scale / this.pinch.startScale).toFixed(2)},${(this.pinch.target.Y * this.scale / this.pinch.startScale).toFixed(2)}`);
|
|
6666
6499
|
}
|
|
6667
6500
|
const s = this.frameBounds.width / 6, o = this.frameBounds.height / 6;
|
|
6668
6501
|
this.pan.translateX < -s && (this.pan.overscrollX = -(s + this.pan.translateX), this.pan.translateX = -s), this.pan.translateY < -o && (this.pan.overscrollY = -(o + this.pan.translateY), this.pan.translateY = -o), this.pan.translateX > s && (this.pan.overscrollX = s - this.pan.translateX, this.pan.translateX = s), this.pan.translateY > o && (this.pan.overscrollY = o - this.pan.translateY, this.pan.translateY = o), A = !0, this.debugger?.show && (this.debugger.DOM.stats.innerText = `TX: ${this.pan.translateX.toFixed(2)}
|
|
@@ -6722,8 +6555,8 @@ Overscroll: ${this.pan.overscrollX.toFixed(2)},${this.pan.overscrollY.toFixed(2)
|
|
|
6722
6555
|
t > 0 && e > this.manager.threshold && this.manager.slength > this.manager.perPage ? this.manager.listener("no_less", void 0) : t < 0 && e > this.manager.threshold && this.manager.slength > this.manager.perPage && this.manager.listener("no_more", void 0), this.manager.slideToCurrent(!0, !0);
|
|
6723
6556
|
}
|
|
6724
6557
|
}
|
|
6725
|
-
var
|
|
6726
|
-
class
|
|
6558
|
+
var le = /* @__PURE__ */ ((r) => (r.auto = "auto", r.landscape = "landscape", r.portrait = "portrait", r))(le || {}), he = /* @__PURE__ */ ((r) => (r.auto = "auto", r.both = "both", r.none = "none", r.landscape = "landscape", r))(he || {});
|
|
6559
|
+
class jn {
|
|
6727
6560
|
// TODO getter
|
|
6728
6561
|
constructor(t) {
|
|
6729
6562
|
this.shift = !0, this.spreads = [], this.nLandscape = 0, this.index(t), this.testShift(t), console.log(`Indexed ${this.spreads.length} spreads for ${t.readingOrder.items.length} items`);
|
|
@@ -6741,7 +6574,7 @@ class bn {
|
|
|
6741
6574
|
"center"
|
|
6742
6575
|
) : (
|
|
6743
6576
|
// Center it
|
|
6744
|
-
((this.shift ? 0 : 1) + A - this.nLandscape) % 2 ? t.metadata.readingProgression ===
|
|
6577
|
+
((this.shift ? 0 : 1) + A - this.nLandscape) % 2 ? t.metadata.readingProgression === N.rtl ? "right" : "left" : t.metadata.readingProgression === N.rtl ? "left" : "right"
|
|
6745
6578
|
)
|
|
6746
6579
|
})), (n || i.properties?.otherProperties.addBlank) && this.nLandscape++;
|
|
6747
6580
|
}), e && (this.spreads = []), this.buildSpreads(t.readingOrder);
|
|
@@ -6752,13 +6585,13 @@ class bn {
|
|
|
6752
6585
|
if (i.length > 1)
|
|
6753
6586
|
return;
|
|
6754
6587
|
const n = i[0], s = n.properties?.otherProperties.orientation;
|
|
6755
|
-
A === 0 && (s === "landscape" || s !== "portrait" && ((n.width || 0) > (n.height || 0) || n.properties?.otherProperties.spread === "both")) && (this.shift = !1), e && n.properties?.page ===
|
|
6588
|
+
A === 0 && (s === "landscape" || s !== "portrait" && ((n.width || 0) > (n.height || 0) || n.properties?.otherProperties.spread === "both")) && (this.shift = !1), e && n.properties?.page === H.center && this.spreads[A - 1][0].addProperties({ addBlank: !0 }), s === "portrait" && n.properties?.page !== "center" && n.properties?.otherProperties.number > 1 ? e = !0 : e = !1;
|
|
6756
6589
|
}), this.shift || this.index(t, !0);
|
|
6757
6590
|
}
|
|
6758
6591
|
buildSpreads(t) {
|
|
6759
6592
|
let e = [];
|
|
6760
6593
|
t.items.forEach((i, A) => {
|
|
6761
|
-
!A && this.shift ? this.spreads.push([i]) : i.properties?.page ===
|
|
6594
|
+
!A && this.shift ? this.spreads.push([i]) : i.properties?.page === H.center ? (e.length > 0 && this.spreads.push(e), this.spreads.push([i]), e = []) : e.length >= 2 ? (this.spreads.push(e), e = [i]) : e.push(i);
|
|
6762
6595
|
}), e.length > 0 && this.spreads.push(e);
|
|
6763
6596
|
}
|
|
6764
6597
|
currentSpread(t, e) {
|
|
@@ -6768,14 +6601,14 @@ class bn {
|
|
|
6768
6601
|
return this.spreads.find((e) => e.includes(t)) || void 0;
|
|
6769
6602
|
}
|
|
6770
6603
|
}
|
|
6771
|
-
const ai = 8, li = 5, Vn = 300,
|
|
6772
|
-
class
|
|
6604
|
+
const ai = 8, li = 5, Vn = 300, vn = 15e3, Dn = 250, Hn = 150, Gn = 500;
|
|
6605
|
+
class kn {
|
|
6773
6606
|
constructor(t, e, i) {
|
|
6774
|
-
if (this.pool = /* @__PURE__ */ new Map(), this.blobs = /* @__PURE__ */ new Map(), this.inprogress = /* @__PURE__ */ new Map(), this.delayedShow = /* @__PURE__ */ new Map(), this.delayedTimeout = /* @__PURE__ */ new Map(), this.previousFrames = [], this.width = 0, this.height = 0, this.transform = "", this.currentSlide = 0, this.spread = !0, this.orientationInternal = -1, this.container = t, this.positions = e, this.pub = i, this.spreadPresentation = i.metadata.otherMetadata?.spread ||
|
|
6607
|
+
if (this.pool = /* @__PURE__ */ new Map(), this.blobs = /* @__PURE__ */ new Map(), this.inprogress = /* @__PURE__ */ new Map(), this.delayedShow = /* @__PURE__ */ new Map(), this.delayedTimeout = /* @__PURE__ */ new Map(), this.previousFrames = [], this.width = 0, this.height = 0, this.transform = "", this.currentSlide = 0, this.spread = !0, this.orientationInternal = -1, this.container = t, this.positions = e, this.pub = i, this.spreadPresentation = i.metadata.otherMetadata?.spread || he.auto, this.pub.metadata.effectiveReadingProgression !== N.rtl && this.pub.metadata.effectiveReadingProgression !== N.ltr)
|
|
6775
6608
|
throw Error("Unsupported reading progression for EPUB");
|
|
6776
|
-
this.spreader = new
|
|
6777
|
-
const n = new
|
|
6778
|
-
this.spineElement.appendChild(n.element), this.pool.set(A.href, n), n.width = 100 / this.length * (A.properties?.otherProperties.orientation ===
|
|
6609
|
+
this.spreader = new jn(this.pub), this.containerHeightCached = t.clientHeight, this.bookElement = document.createElement("div"), this.bookElement.ariaLabel = "Book", this.bookElement.tabIndex = -1, this.updateBookStyle(!0), this.spineElement = document.createElement("div"), this.spineElement.ariaLabel = "Spine", this.bookElement.appendChild(this.spineElement), this.container.appendChild(this.bookElement), this.updateSpineStyle(!0), this.peripherals = new bn(this), this.pub.readingOrder.items.forEach((A) => {
|
|
6610
|
+
const n = new Yn(this.peripherals, this.pub.metadata.effectiveReadingProgression, A.href);
|
|
6611
|
+
this.spineElement.appendChild(n.element), this.pool.set(A.href, n), n.width = 100 / this.length * (A.properties?.otherProperties.orientation === le.landscape || A.properties?.otherProperties.addBlank ? this.perPage : 1), n.height = this.height;
|
|
6779
6612
|
});
|
|
6780
6613
|
}
|
|
6781
6614
|
set listener(t) {
|
|
@@ -6795,11 +6628,11 @@ class Gn {
|
|
|
6795
6628
|
this.pool.forEach((i, A) => {
|
|
6796
6629
|
let n = this.pub.readingOrder.items.findIndex((a) => a.href === A);
|
|
6797
6630
|
const s = this.pub.readingOrder.items[n];
|
|
6798
|
-
if (i.width = 100 / this.length * (s.properties?.otherProperties.orientation ===
|
|
6631
|
+
if (i.width = 100 / this.length * (s.properties?.otherProperties.orientation === le.landscape || s.properties?.otherProperties.addBlank ? this.perPage : 1), i.height = this.height, !i.loaded) return;
|
|
6799
6632
|
const o = this.spreader.findByLink(s);
|
|
6800
6633
|
i.update(this.spreadPosition(o, s));
|
|
6801
6634
|
});
|
|
6802
|
-
},
|
|
6635
|
+
}, Dn);
|
|
6803
6636
|
}
|
|
6804
6637
|
/**
|
|
6805
6638
|
* It is important that these values be cached to avoid spamming them on redraws, they are expensive.
|
|
@@ -6808,7 +6641,7 @@ class Gn {
|
|
|
6808
6641
|
this.width = this.bookElement.clientWidth, this.height = this.bookElement.clientHeight;
|
|
6809
6642
|
}
|
|
6810
6643
|
get rtl() {
|
|
6811
|
-
return this.pub.metadata.effectiveReadingProgression ===
|
|
6644
|
+
return this.pub.metadata.effectiveReadingProgression === N.rtl;
|
|
6812
6645
|
}
|
|
6813
6646
|
get single() {
|
|
6814
6647
|
return !this.spread || this.portrait;
|
|
@@ -6820,13 +6653,13 @@ class Gn {
|
|
|
6820
6653
|
return 50;
|
|
6821
6654
|
}
|
|
6822
6655
|
get portrait() {
|
|
6823
|
-
return this.spreadPresentation ===
|
|
6656
|
+
return this.spreadPresentation === he.none ? !0 : (this.orientationInternal === -1 && (this.orientationInternal = this.containerHeightCached > this.container.clientWidth ? 1 : 0), this.orientationInternal === 1);
|
|
6824
6657
|
}
|
|
6825
6658
|
updateSpineStyle(t, e = !0) {
|
|
6826
6659
|
let i = "0";
|
|
6827
6660
|
this.updateDimensions(), this.perPage > 1 && (i = `${this.width / 2}px`);
|
|
6828
6661
|
const A = {
|
|
6829
|
-
transition: t ? `all ${e ?
|
|
6662
|
+
transition: t ? `all ${e ? Hn : Gn}ms ease-out` : "all 0ms ease-out",
|
|
6830
6663
|
marginRight: this.rtl ? i : "0",
|
|
6831
6664
|
marginLeft: this.rtl ? "0" : i,
|
|
6832
6665
|
width: `${this.width / this.perPage * this.length}px`,
|
|
@@ -6961,7 +6794,7 @@ class Gn {
|
|
|
6961
6794
|
return t % 2 && !this.single && t++, t;
|
|
6962
6795
|
}
|
|
6963
6796
|
spreadPosition(t, e) {
|
|
6964
|
-
return this.perPage < 2 || t.length < 2 ?
|
|
6797
|
+
return this.perPage < 2 || t.length < 2 ? H.center : e.href === t[0].href ? this.rtl ? H.right : H.left : this.rtl ? H.left : H.right;
|
|
6965
6798
|
}
|
|
6966
6799
|
async waitForItem(t) {
|
|
6967
6800
|
if (this.inprogress.has(t) && await this.inprogress.get(t), this.delayedShow.has(t)) {
|
|
@@ -6984,34 +6817,34 @@ class Gn {
|
|
|
6984
6817
|
for (const a of s)
|
|
6985
6818
|
await this.waitForItem(a.href);
|
|
6986
6819
|
const o = new Promise(async (a, h) => {
|
|
6987
|
-
const c = [],
|
|
6820
|
+
const c = [], d = [];
|
|
6988
6821
|
this.positions.forEach((l, p) => {
|
|
6989
|
-
(p > n + ai || p < n - ai) && (c.includes(l.href) || c.push(l.href)), p < n + li && p > n - li && (
|
|
6822
|
+
(p > n + ai || p < n - ai) && (c.includes(l.href) || c.push(l.href)), p < n + li && p > n - li && (d.includes(l.href) || d.push(l.href));
|
|
6990
6823
|
}), c.forEach(async (l) => {
|
|
6991
|
-
|
|
6824
|
+
d.includes(l) || this.pool.has(l) && (this.cancelShowing(l), await this.pool.get(l)?.unload());
|
|
6992
6825
|
}), this.currentBaseURL !== void 0 && t.baseURL !== this.currentBaseURL && (this.blobs.forEach((l) => URL.revokeObjectURL(l)), this.blobs.clear()), this.currentBaseURL = t.baseURL;
|
|
6993
|
-
const
|
|
6826
|
+
const g = async (l) => {
|
|
6994
6827
|
const p = t.readingOrder.findIndexWithHref(l), w = t.readingOrder.items[p];
|
|
6995
6828
|
if (w) {
|
|
6996
6829
|
if (!this.blobs.has(l)) {
|
|
6997
|
-
const
|
|
6998
|
-
this.blobs.set(l,
|
|
6830
|
+
const R = await new _i(t, this.currentBaseURL || "", w).build(!0);
|
|
6831
|
+
this.blobs.set(l, R);
|
|
6999
6832
|
}
|
|
7000
|
-
this.delayedShow.has(l) || this.delayedShow.set(l, new Promise((E,
|
|
7001
|
-
let
|
|
6833
|
+
this.delayedShow.has(l) || this.delayedShow.set(l, new Promise((E, R) => {
|
|
6834
|
+
let ze = !1;
|
|
7002
6835
|
const eA = window.setTimeout(async () => {
|
|
7003
6836
|
this.delayedTimeout.set(l, 0);
|
|
7004
|
-
const iA = this.makeSpread(this.reAlign(p)), AA = this.spreadPosition(iA, w),
|
|
7005
|
-
await
|
|
6837
|
+
const iA = this.makeSpread(this.reAlign(p)), AA = this.spreadPosition(iA, w), Qe = this.pool.get(l);
|
|
6838
|
+
await Qe.load(i, this.blobs.get(l)), this.peripherals.isScaled || await Qe.show(AA), this.delayedShow.delete(l), ze = !0, E();
|
|
7006
6839
|
}, Vn);
|
|
7007
6840
|
setTimeout(() => {
|
|
7008
|
-
!
|
|
7009
|
-
},
|
|
6841
|
+
!ze && this.delayedShow.has(l) && R(`Offscreen load timeout: ${l}`);
|
|
6842
|
+
}, vn), this.delayedTimeout.set(l, eA);
|
|
7010
6843
|
}));
|
|
7011
6844
|
}
|
|
7012
6845
|
};
|
|
7013
6846
|
try {
|
|
7014
|
-
await Promise.all(
|
|
6847
|
+
await Promise.all(d.map((l) => g(l)));
|
|
7015
6848
|
} catch (l) {
|
|
7016
6849
|
h(l);
|
|
7017
6850
|
}
|
|
@@ -7082,9 +6915,9 @@ class Gn {
|
|
|
7082
6915
|
this.currentFrames?.forEach((t) => t?.deselect());
|
|
7083
6916
|
}
|
|
7084
6917
|
}
|
|
7085
|
-
class
|
|
6918
|
+
class It {
|
|
7086
6919
|
constructor(t = {}) {
|
|
7087
|
-
this.backgroundColor =
|
|
6920
|
+
this.backgroundColor = Y(t.backgroundColor), this.blendFilter = y(t.blendFilter), this.constraint = I(t.constraint), this.columnCount = I(t.columnCount), this.darkenFilter = dt(t.darkenFilter), this.deprecatedFontSize = y(t.deprecatedFontSize), this.fontFamily = Y(t.fontFamily), this.fontSize = J(t.fontSize, bt.range), this.fontSizeNormalize = y(t.fontSizeNormalize), this.fontOpticalSizing = y(t.fontOpticalSizing), this.fontWeight = J(t.fontWeight, $.range), this.fontWidth = J(t.fontWidth, jt.range), this.hyphens = y(t.hyphens), this.invertFilter = dt(t.invertFilter), this.invertGaijiFilter = dt(t.invertGaijiFilter), this.iOSPatch = y(t.iOSPatch), this.iPadOSPatch = y(t.iPadOSPatch), this.letterSpacing = I(t.letterSpacing), this.ligatures = y(t.ligatures), this.lineHeight = I(t.lineHeight), this.linkColor = Y(t.linkColor), this.noRuby = y(t.noRuby), this.pageGutter = I(t.pageGutter), this.paragraphIndent = I(t.paragraphIndent), this.paragraphSpacing = I(t.paragraphSpacing), this.scroll = y(t.scroll), this.scrollPaddingTop = I(t.scrollPaddingTop), this.scrollPaddingBottom = I(t.scrollPaddingBottom), this.selectionBackgroundColor = Y(t.selectionBackgroundColor), this.selectionTextColor = Y(t.selectionTextColor), this.textAlign = Lt(t.textAlign, X), this.textColor = Y(t.textColor), this.textNormalization = y(t.textNormalization), this.visitedColor = Y(t.visitedColor), this.wordSpacing = I(t.wordSpacing), this.optimalLineLength = I(t.optimalLineLength), this.maximalLineLength = I(t.maximalLineLength), this.minimalLineLength = I(t.minimalLineLength);
|
|
7088
6921
|
}
|
|
7089
6922
|
static serialize(t) {
|
|
7090
6923
|
const { ...e } = t;
|
|
@@ -7093,7 +6926,7 @@ class Et {
|
|
|
7093
6926
|
static deserialize(t) {
|
|
7094
6927
|
try {
|
|
7095
6928
|
const e = JSON.parse(t);
|
|
7096
|
-
return new
|
|
6929
|
+
return new It(e);
|
|
7097
6930
|
} catch (e) {
|
|
7098
6931
|
return console.error("Failed to deserialize preferences:", e), null;
|
|
7099
6932
|
}
|
|
@@ -7102,34 +6935,34 @@ class Et {
|
|
|
7102
6935
|
const e = { ...this };
|
|
7103
6936
|
for (const i of Object.keys(t))
|
|
7104
6937
|
t[i] !== void 0 && (i !== "maximalLineLength" || t[i] === null || t[i] >= (t.optimalLineLength ?? e.optimalLineLength ?? 65)) && (i !== "minimalLineLength" || t[i] === null || t[i] <= (t.optimalLineLength ?? e.optimalLineLength ?? 65)) && (e[i] = t[i]);
|
|
7105
|
-
return new
|
|
6938
|
+
return new It(e);
|
|
7106
6939
|
}
|
|
7107
6940
|
}
|
|
7108
|
-
class
|
|
6941
|
+
class Jn {
|
|
7109
6942
|
constructor(t) {
|
|
7110
|
-
this.backgroundColor =
|
|
6943
|
+
this.backgroundColor = Y(t.backgroundColor) || null, this.blendFilter = y(t.blendFilter) ?? !1, this.constraint = I(t.constraint) || 0, this.columnCount = I(t.columnCount) || null, this.darkenFilter = dt(t.darkenFilter) ?? !1, this.deprecatedFontSize = y(t.deprecatedFontSize), (this.deprecatedFontSize === !1 || this.deprecatedFontSize === null) && (this.deprecatedFontSize = !CSS.supports("zoom", "1")), this.fontFamily = Y(t.fontFamily) || null, this.fontSize = J(t.fontSize, bt.range) || 1, this.fontSizeNormalize = y(t.fontSizeNormalize) ?? !1, this.fontOpticalSizing = y(t.fontOpticalSizing) ?? null, this.fontWeight = J(t.fontWeight, $.range) || null, this.fontWidth = J(t.fontWidth, jt.range) || null, this.hyphens = y(t.hyphens) ?? null, this.invertFilter = dt(t.invertFilter) ?? !1, this.invertGaijiFilter = dt(t.invertGaijiFilter) ?? !1, this.iOSPatch = t.iOSPatch === !1 ? !1 : (U.OS.iOS || U.OS.iPadOS) && U.iOSRequest === "mobile", this.iPadOSPatch = t.iPadOSPatch === !1 ? !1 : U.OS.iPadOS && U.iOSRequest === "desktop", this.letterSpacing = I(t.letterSpacing) || null, this.ligatures = y(t.ligatures) ?? null, this.lineHeight = I(t.lineHeight) || null, this.linkColor = Y(t.linkColor) || null, this.noRuby = y(t.noRuby) ?? !1, this.pageGutter = qt(I(t.pageGutter), 20), this.paragraphIndent = I(t.paragraphIndent) ?? null, this.paragraphSpacing = I(t.paragraphSpacing) ?? null, this.scroll = y(t.scroll) ?? !1, this.scrollPaddingTop = I(t.scrollPaddingTop) ?? null, this.scrollPaddingBottom = I(t.scrollPaddingBottom) ?? null, this.selectionBackgroundColor = Y(t.selectionBackgroundColor) || null, this.selectionTextColor = Y(t.selectionTextColor) || null, this.textAlign = Lt(t.textAlign, X) || null, this.textColor = Y(t.textColor) || null, this.textNormalization = y(t.textNormalization) ?? !1, this.visitedColor = Y(t.visitedColor) || null, this.wordSpacing = I(t.wordSpacing) || null, this.optimalLineLength = I(t.optimalLineLength) || 65, this.maximalLineLength = qt(Bn(t.maximalLineLength, this.optimalLineLength), 80), this.minimalLineLength = qt(Mn(t.minimalLineLength, this.optimalLineLength), 40);
|
|
7111
6944
|
}
|
|
7112
6945
|
}
|
|
7113
|
-
const
|
|
7114
|
-
RS__backgroundColor:
|
|
7115
|
-
RS__textColor:
|
|
6946
|
+
const Wn = "#FFFFFF", On = "#121212", Ln = "#0000EE", Xn = "#551A8B", Zn = "#b4d8fe", Kn = "inherit", st = {
|
|
6947
|
+
RS__backgroundColor: Wn,
|
|
6948
|
+
RS__textColor: On,
|
|
7116
6949
|
RS__linkColor: Ln,
|
|
7117
|
-
RS__visitedColor:
|
|
7118
|
-
RS__selectionBackgroundColor:
|
|
7119
|
-
RS__selectionTextColor:
|
|
6950
|
+
RS__visitedColor: Xn,
|
|
6951
|
+
RS__selectionBackgroundColor: Zn,
|
|
6952
|
+
RS__selectionTextColor: Kn
|
|
7120
6953
|
};
|
|
7121
6954
|
class hi {
|
|
7122
6955
|
constructor(t, e, i) {
|
|
7123
6956
|
this.preferences = t, this.settings = e, this.metadata = i, this.layout = this.metadata?.effectiveLayout || B.reflowable;
|
|
7124
6957
|
}
|
|
7125
6958
|
clear() {
|
|
7126
|
-
this.preferences = new
|
|
6959
|
+
this.preferences = new It({ optimalLineLength: 65 });
|
|
7127
6960
|
}
|
|
7128
6961
|
updatePreference(t, e) {
|
|
7129
6962
|
this.preferences[t] = e;
|
|
7130
6963
|
}
|
|
7131
6964
|
get backgroundColor() {
|
|
7132
|
-
return new
|
|
6965
|
+
return new Q({
|
|
7133
6966
|
initialValue: this.preferences.backgroundColor,
|
|
7134
6967
|
effectiveValue: this.settings.backgroundColor || st.RS__backgroundColor,
|
|
7135
6968
|
isEffective: this.preferences.backgroundColor !== null,
|
|
@@ -7139,7 +6972,7 @@ class hi {
|
|
|
7139
6972
|
});
|
|
7140
6973
|
}
|
|
7141
6974
|
get blendFilter() {
|
|
7142
|
-
return new
|
|
6975
|
+
return new z({
|
|
7143
6976
|
initialValue: this.preferences.blendFilter,
|
|
7144
6977
|
effectiveValue: this.settings.blendFilter || !1,
|
|
7145
6978
|
isEffective: this.preferences.blendFilter !== null,
|
|
@@ -7149,7 +6982,7 @@ class hi {
|
|
|
7149
6982
|
});
|
|
7150
6983
|
}
|
|
7151
6984
|
get columnCount() {
|
|
7152
|
-
return new
|
|
6985
|
+
return new Q({
|
|
7153
6986
|
initialValue: this.preferences.columnCount,
|
|
7154
6987
|
effectiveValue: this.settings.columnCount || null,
|
|
7155
6988
|
isEffective: this.layout !== B.fixed && !this.settings.scroll,
|
|
@@ -7159,7 +6992,7 @@ class hi {
|
|
|
7159
6992
|
});
|
|
7160
6993
|
}
|
|
7161
6994
|
get constraint() {
|
|
7162
|
-
return new
|
|
6995
|
+
return new Q({
|
|
7163
6996
|
initialValue: this.preferences.constraint,
|
|
7164
6997
|
effectiveValue: this.preferences.constraint || 0,
|
|
7165
6998
|
isEffective: !0,
|
|
@@ -7169,7 +7002,7 @@ class hi {
|
|
|
7169
7002
|
});
|
|
7170
7003
|
}
|
|
7171
7004
|
get darkenFilter() {
|
|
7172
|
-
return new
|
|
7005
|
+
return new F({
|
|
7173
7006
|
initialValue: typeof this.preferences.darkenFilter == "boolean" ? 100 : this.preferences.darkenFilter,
|
|
7174
7007
|
effectiveValue: typeof this.settings.darkenFilter == "boolean" ? 100 : this.settings.darkenFilter || 0,
|
|
7175
7008
|
isEffective: this.settings.darkenFilter !== null,
|
|
@@ -7181,7 +7014,7 @@ class hi {
|
|
|
7181
7014
|
});
|
|
7182
7015
|
}
|
|
7183
7016
|
get deprecatedFontSize() {
|
|
7184
|
-
return new
|
|
7017
|
+
return new z({
|
|
7185
7018
|
initialValue: this.preferences.deprecatedFontSize,
|
|
7186
7019
|
effectiveValue: CSS.supports("zoom", "1") ? this.settings.deprecatedFontSize || !1 : !0,
|
|
7187
7020
|
isEffective: this.layout !== B.fixed,
|
|
@@ -7191,7 +7024,7 @@ class hi {
|
|
|
7191
7024
|
});
|
|
7192
7025
|
}
|
|
7193
7026
|
get fontFamily() {
|
|
7194
|
-
return new
|
|
7027
|
+
return new Q({
|
|
7195
7028
|
initialValue: this.preferences.fontFamily,
|
|
7196
7029
|
effectiveValue: this.settings.fontFamily || null,
|
|
7197
7030
|
isEffective: this.layout !== B.fixed,
|
|
@@ -7201,19 +7034,19 @@ class hi {
|
|
|
7201
7034
|
});
|
|
7202
7035
|
}
|
|
7203
7036
|
get fontSize() {
|
|
7204
|
-
return new
|
|
7037
|
+
return new F({
|
|
7205
7038
|
initialValue: this.preferences.fontSize,
|
|
7206
7039
|
effectiveValue: this.settings.fontSize || 1,
|
|
7207
7040
|
isEffective: this.layout !== B.fixed,
|
|
7208
7041
|
onChange: (t) => {
|
|
7209
7042
|
this.updatePreference("fontSize", t || null);
|
|
7210
7043
|
},
|
|
7211
|
-
supportedRange:
|
|
7212
|
-
step:
|
|
7044
|
+
supportedRange: bt.range,
|
|
7045
|
+
step: bt.step
|
|
7213
7046
|
});
|
|
7214
7047
|
}
|
|
7215
7048
|
get fontSizeNormalize() {
|
|
7216
|
-
return new
|
|
7049
|
+
return new z({
|
|
7217
7050
|
initialValue: this.preferences.fontSizeNormalize,
|
|
7218
7051
|
effectiveValue: this.settings.fontSizeNormalize || !1,
|
|
7219
7052
|
isEffective: this.layout !== B.fixed && this.preferences.fontSizeNormalize !== null,
|
|
@@ -7223,7 +7056,7 @@ class hi {
|
|
|
7223
7056
|
});
|
|
7224
7057
|
}
|
|
7225
7058
|
get fontOpticalSizing() {
|
|
7226
|
-
return new
|
|
7059
|
+
return new z({
|
|
7227
7060
|
initialValue: this.preferences.fontOpticalSizing,
|
|
7228
7061
|
effectiveValue: this.settings.fontOpticalSizing || !0,
|
|
7229
7062
|
isEffective: this.layout !== B.fixed && this.preferences.fontOpticalSizing !== null,
|
|
@@ -7233,7 +7066,7 @@ class hi {
|
|
|
7233
7066
|
});
|
|
7234
7067
|
}
|
|
7235
7068
|
get fontWeight() {
|
|
7236
|
-
return new
|
|
7069
|
+
return new F({
|
|
7237
7070
|
initialValue: this.preferences.fontWeight,
|
|
7238
7071
|
effectiveValue: this.settings.fontWeight || 400,
|
|
7239
7072
|
isEffective: this.layout !== B.fixed && this.preferences.fontWeight !== null,
|
|
@@ -7245,29 +7078,29 @@ class hi {
|
|
|
7245
7078
|
});
|
|
7246
7079
|
}
|
|
7247
7080
|
get fontWidth() {
|
|
7248
|
-
return new
|
|
7081
|
+
return new F({
|
|
7249
7082
|
initialValue: this.preferences.fontWidth,
|
|
7250
7083
|
effectiveValue: this.settings.fontWidth || 100,
|
|
7251
7084
|
isEffective: this.layout !== B.fixed && this.preferences.fontWidth !== null,
|
|
7252
7085
|
onChange: (t) => {
|
|
7253
7086
|
this.updatePreference("fontWidth", t || null);
|
|
7254
7087
|
},
|
|
7255
|
-
supportedRange:
|
|
7256
|
-
step:
|
|
7088
|
+
supportedRange: jt.range,
|
|
7089
|
+
step: jt.step
|
|
7257
7090
|
});
|
|
7258
7091
|
}
|
|
7259
7092
|
get hyphens() {
|
|
7260
|
-
return new
|
|
7093
|
+
return new z({
|
|
7261
7094
|
initialValue: this.preferences.hyphens,
|
|
7262
7095
|
effectiveValue: this.settings.hyphens || !1,
|
|
7263
|
-
isEffective: this.layout !== B.fixed && this.metadata?.effectiveReadingProgression ===
|
|
7096
|
+
isEffective: this.layout !== B.fixed && this.metadata?.effectiveReadingProgression === N.ltr && this.preferences.hyphens !== null,
|
|
7264
7097
|
onChange: (t) => {
|
|
7265
7098
|
this.updatePreference("hyphens", t || null);
|
|
7266
7099
|
}
|
|
7267
7100
|
});
|
|
7268
7101
|
}
|
|
7269
7102
|
get invertFilter() {
|
|
7270
|
-
return new
|
|
7103
|
+
return new F({
|
|
7271
7104
|
initialValue: typeof this.preferences.invertFilter == "boolean" ? 100 : this.preferences.invertFilter,
|
|
7272
7105
|
effectiveValue: typeof this.settings.invertFilter == "boolean" ? 100 : this.settings.invertFilter || 0,
|
|
7273
7106
|
isEffective: this.settings.invertFilter !== null,
|
|
@@ -7279,7 +7112,7 @@ class hi {
|
|
|
7279
7112
|
});
|
|
7280
7113
|
}
|
|
7281
7114
|
get invertGaijiFilter() {
|
|
7282
|
-
return new
|
|
7115
|
+
return new F({
|
|
7283
7116
|
initialValue: typeof this.preferences.invertGaijiFilter == "boolean" ? 100 : this.preferences.invertGaijiFilter,
|
|
7284
7117
|
effectiveValue: typeof this.settings.invertGaijiFilter == "boolean" ? 100 : this.settings.invertGaijiFilter || 0,
|
|
7285
7118
|
isEffective: this.preferences.invertGaijiFilter !== null,
|
|
@@ -7291,7 +7124,7 @@ class hi {
|
|
|
7291
7124
|
});
|
|
7292
7125
|
}
|
|
7293
7126
|
get iOSPatch() {
|
|
7294
|
-
return new
|
|
7127
|
+
return new z({
|
|
7295
7128
|
initialValue: this.preferences.iOSPatch,
|
|
7296
7129
|
effectiveValue: this.settings.iOSPatch || !1,
|
|
7297
7130
|
isEffective: this.layout !== B.fixed,
|
|
@@ -7301,7 +7134,7 @@ class hi {
|
|
|
7301
7134
|
});
|
|
7302
7135
|
}
|
|
7303
7136
|
get iPadOSPatch() {
|
|
7304
|
-
return new
|
|
7137
|
+
return new z({
|
|
7305
7138
|
initialValue: this.preferences.iPadOSPatch,
|
|
7306
7139
|
effectiveValue: this.settings.iPadOSPatch || !1,
|
|
7307
7140
|
isEffective: this.layout !== B.fixed,
|
|
@@ -7311,7 +7144,7 @@ class hi {
|
|
|
7311
7144
|
});
|
|
7312
7145
|
}
|
|
7313
7146
|
get letterSpacing() {
|
|
7314
|
-
return new
|
|
7147
|
+
return new F({
|
|
7315
7148
|
initialValue: this.preferences.letterSpacing,
|
|
7316
7149
|
effectiveValue: this.settings.letterSpacing || 0,
|
|
7317
7150
|
isEffective: this.layout !== B.fixed && this.preferences.letterSpacing !== null,
|
|
@@ -7323,29 +7156,34 @@ class hi {
|
|
|
7323
7156
|
});
|
|
7324
7157
|
}
|
|
7325
7158
|
get ligatures() {
|
|
7326
|
-
return new
|
|
7159
|
+
return new z({
|
|
7327
7160
|
initialValue: this.preferences.ligatures,
|
|
7328
7161
|
effectiveValue: this.settings.ligatures || !0,
|
|
7329
|
-
isEffective:
|
|
7162
|
+
isEffective: (() => {
|
|
7163
|
+
if (this.preferences.ligatures === null || this.layout === B.fixed)
|
|
7164
|
+
return !1;
|
|
7165
|
+
const t = this.metadata?.languages?.[0]?.toLowerCase();
|
|
7166
|
+
return !(t && ["zh", "ja", "ko", "mn-mong"].some((e) => t.startsWith(e)));
|
|
7167
|
+
})(),
|
|
7330
7168
|
onChange: (t) => {
|
|
7331
7169
|
this.updatePreference("ligatures", t || null);
|
|
7332
7170
|
}
|
|
7333
7171
|
});
|
|
7334
7172
|
}
|
|
7335
7173
|
get lineHeight() {
|
|
7336
|
-
return new
|
|
7174
|
+
return new F({
|
|
7337
7175
|
initialValue: this.preferences.lineHeight,
|
|
7338
7176
|
effectiveValue: this.settings.lineHeight,
|
|
7339
7177
|
isEffective: this.layout !== B.fixed && this.preferences.lineHeight !== null,
|
|
7340
7178
|
onChange: (t) => {
|
|
7341
7179
|
this.updatePreference("lineHeight", t || null);
|
|
7342
7180
|
},
|
|
7343
|
-
supportedRange:
|
|
7344
|
-
step:
|
|
7181
|
+
supportedRange: vt.range,
|
|
7182
|
+
step: vt.step
|
|
7345
7183
|
});
|
|
7346
7184
|
}
|
|
7347
7185
|
get linkColor() {
|
|
7348
|
-
return new
|
|
7186
|
+
return new Q({
|
|
7349
7187
|
initialValue: this.preferences.linkColor,
|
|
7350
7188
|
effectiveValue: this.settings.linkColor || st.RS__linkColor,
|
|
7351
7189
|
isEffective: this.layout !== B.fixed && this.preferences.linkColor !== null,
|
|
@@ -7355,7 +7193,7 @@ class hi {
|
|
|
7355
7193
|
});
|
|
7356
7194
|
}
|
|
7357
7195
|
get maximalLineLength() {
|
|
7358
|
-
return new
|
|
7196
|
+
return new F({
|
|
7359
7197
|
initialValue: this.preferences.maximalLineLength,
|
|
7360
7198
|
effectiveValue: this.settings.maximalLineLength,
|
|
7361
7199
|
isEffective: this.layout !== B.fixed,
|
|
@@ -7367,7 +7205,7 @@ class hi {
|
|
|
7367
7205
|
});
|
|
7368
7206
|
}
|
|
7369
7207
|
get minimalLineLength() {
|
|
7370
|
-
return new
|
|
7208
|
+
return new F({
|
|
7371
7209
|
initialValue: this.preferences.minimalLineLength,
|
|
7372
7210
|
effectiveValue: this.settings.minimalLineLength,
|
|
7373
7211
|
isEffective: this.layout !== B.fixed,
|
|
@@ -7379,7 +7217,7 @@ class hi {
|
|
|
7379
7217
|
});
|
|
7380
7218
|
}
|
|
7381
7219
|
get noRuby() {
|
|
7382
|
-
return new
|
|
7220
|
+
return new z({
|
|
7383
7221
|
initialValue: this.preferences.noRuby,
|
|
7384
7222
|
effectiveValue: this.settings.noRuby || !1,
|
|
7385
7223
|
isEffective: this.layout !== B.fixed && this.metadata?.languages?.includes("ja") || !1,
|
|
@@ -7389,7 +7227,7 @@ class hi {
|
|
|
7389
7227
|
});
|
|
7390
7228
|
}
|
|
7391
7229
|
get optimalLineLength() {
|
|
7392
|
-
return new
|
|
7230
|
+
return new F({
|
|
7393
7231
|
initialValue: this.preferences.optimalLineLength,
|
|
7394
7232
|
effectiveValue: this.settings.optimalLineLength,
|
|
7395
7233
|
isEffective: this.layout !== B.fixed,
|
|
@@ -7401,7 +7239,7 @@ class hi {
|
|
|
7401
7239
|
});
|
|
7402
7240
|
}
|
|
7403
7241
|
get pageGutter() {
|
|
7404
|
-
return new
|
|
7242
|
+
return new Q({
|
|
7405
7243
|
initialValue: this.preferences.pageGutter,
|
|
7406
7244
|
effectiveValue: this.settings.pageGutter,
|
|
7407
7245
|
isEffective: this.layout !== B.fixed,
|
|
@@ -7411,31 +7249,31 @@ class hi {
|
|
|
7411
7249
|
});
|
|
7412
7250
|
}
|
|
7413
7251
|
get paragraphIndent() {
|
|
7414
|
-
return new
|
|
7252
|
+
return new F({
|
|
7415
7253
|
initialValue: this.preferences.paragraphIndent,
|
|
7416
7254
|
effectiveValue: this.settings.paragraphIndent || 0,
|
|
7417
7255
|
isEffective: this.layout !== B.fixed && this.preferences.paragraphIndent !== null,
|
|
7418
7256
|
onChange: (t) => {
|
|
7419
7257
|
this.updatePreference("paragraphIndent", t || null);
|
|
7420
7258
|
},
|
|
7421
|
-
supportedRange:
|
|
7422
|
-
step:
|
|
7259
|
+
supportedRange: Dt.range,
|
|
7260
|
+
step: Dt.step
|
|
7423
7261
|
});
|
|
7424
7262
|
}
|
|
7425
7263
|
get paragraphSpacing() {
|
|
7426
|
-
return new
|
|
7264
|
+
return new F({
|
|
7427
7265
|
initialValue: this.preferences.paragraphSpacing,
|
|
7428
7266
|
effectiveValue: this.settings.paragraphSpacing || 0,
|
|
7429
7267
|
isEffective: this.layout !== B.fixed && this.preferences.paragraphSpacing !== null,
|
|
7430
7268
|
onChange: (t) => {
|
|
7431
7269
|
this.updatePreference("paragraphSpacing", t || null);
|
|
7432
7270
|
},
|
|
7433
|
-
supportedRange:
|
|
7434
|
-
step:
|
|
7271
|
+
supportedRange: Ht.range,
|
|
7272
|
+
step: Ht.step
|
|
7435
7273
|
});
|
|
7436
7274
|
}
|
|
7437
7275
|
get scroll() {
|
|
7438
|
-
return new
|
|
7276
|
+
return new z({
|
|
7439
7277
|
initialValue: this.preferences.scroll,
|
|
7440
7278
|
effectiveValue: this.settings.scroll || !1,
|
|
7441
7279
|
isEffective: this.layout !== B.fixed,
|
|
@@ -7445,7 +7283,7 @@ class hi {
|
|
|
7445
7283
|
});
|
|
7446
7284
|
}
|
|
7447
7285
|
get scrollPaddingTop() {
|
|
7448
|
-
return new
|
|
7286
|
+
return new Q({
|
|
7449
7287
|
initialValue: this.preferences.scrollPaddingTop,
|
|
7450
7288
|
effectiveValue: this.settings.scrollPaddingTop || 0,
|
|
7451
7289
|
isEffective: this.layout !== B.fixed && !!this.settings.scroll && this.preferences.scrollPaddingTop !== null,
|
|
@@ -7455,7 +7293,7 @@ class hi {
|
|
|
7455
7293
|
});
|
|
7456
7294
|
}
|
|
7457
7295
|
get scrollPaddingBottom() {
|
|
7458
|
-
return new
|
|
7296
|
+
return new Q({
|
|
7459
7297
|
initialValue: this.preferences.scrollPaddingBottom,
|
|
7460
7298
|
effectiveValue: this.settings.scrollPaddingBottom || 0,
|
|
7461
7299
|
isEffective: this.layout !== B.fixed && !!this.settings.scroll && this.preferences.scrollPaddingBottom !== null,
|
|
@@ -7488,7 +7326,7 @@ class hi {
|
|
|
7488
7326
|
}
|
|
7489
7327
|
*/
|
|
7490
7328
|
get selectionBackgroundColor() {
|
|
7491
|
-
return new
|
|
7329
|
+
return new Q({
|
|
7492
7330
|
initialValue: this.preferences.selectionBackgroundColor,
|
|
7493
7331
|
effectiveValue: this.settings.selectionBackgroundColor || st.RS__selectionBackgroundColor,
|
|
7494
7332
|
isEffective: this.layout !== B.fixed && this.preferences.selectionBackgroundColor !== null,
|
|
@@ -7498,7 +7336,7 @@ class hi {
|
|
|
7498
7336
|
});
|
|
7499
7337
|
}
|
|
7500
7338
|
get selectionTextColor() {
|
|
7501
|
-
return new
|
|
7339
|
+
return new Q({
|
|
7502
7340
|
initialValue: this.preferences.selectionTextColor,
|
|
7503
7341
|
effectiveValue: this.settings.selectionTextColor || st.RS__selectionTextColor,
|
|
7504
7342
|
isEffective: this.layout !== B.fixed && this.preferences.selectionTextColor !== null,
|
|
@@ -7519,7 +7357,7 @@ class hi {
|
|
|
7519
7357
|
});
|
|
7520
7358
|
}
|
|
7521
7359
|
get textColor() {
|
|
7522
|
-
return new
|
|
7360
|
+
return new Q({
|
|
7523
7361
|
initialValue: this.preferences.textColor,
|
|
7524
7362
|
effectiveValue: this.settings.textColor || st.RS__textColor,
|
|
7525
7363
|
isEffective: this.layout !== B.fixed && this.preferences.textColor !== null,
|
|
@@ -7529,7 +7367,7 @@ class hi {
|
|
|
7529
7367
|
});
|
|
7530
7368
|
}
|
|
7531
7369
|
get textNormalization() {
|
|
7532
|
-
return new
|
|
7370
|
+
return new z({
|
|
7533
7371
|
initialValue: this.preferences.textNormalization,
|
|
7534
7372
|
effectiveValue: this.settings.textNormalization || !1,
|
|
7535
7373
|
isEffective: this.layout !== B.fixed,
|
|
@@ -7539,7 +7377,7 @@ class hi {
|
|
|
7539
7377
|
});
|
|
7540
7378
|
}
|
|
7541
7379
|
get visitedColor() {
|
|
7542
|
-
return new
|
|
7380
|
+
return new Q({
|
|
7543
7381
|
initialValue: this.preferences.visitedColor,
|
|
7544
7382
|
effectiveValue: this.settings.visitedColor || st.RS__visitedColor,
|
|
7545
7383
|
isEffective: this.layout !== B.fixed && this.preferences.visitedColor !== null,
|
|
@@ -7549,24 +7387,24 @@ class hi {
|
|
|
7549
7387
|
});
|
|
7550
7388
|
}
|
|
7551
7389
|
get wordSpacing() {
|
|
7552
|
-
return new
|
|
7390
|
+
return new F({
|
|
7553
7391
|
initialValue: this.preferences.wordSpacing,
|
|
7554
7392
|
effectiveValue: this.settings.wordSpacing || 0,
|
|
7555
7393
|
isEffective: this.layout !== B.fixed && this.preferences.wordSpacing !== null,
|
|
7556
7394
|
onChange: (t) => {
|
|
7557
7395
|
this.updatePreference("wordSpacing", t || null);
|
|
7558
7396
|
},
|
|
7559
|
-
supportedRange:
|
|
7560
|
-
step:
|
|
7397
|
+
supportedRange: Gt.range,
|
|
7398
|
+
step: Gt.step
|
|
7561
7399
|
});
|
|
7562
7400
|
}
|
|
7563
7401
|
}
|
|
7564
7402
|
class ci {
|
|
7565
7403
|
constructor(t, e) {
|
|
7566
|
-
this.backgroundColor = t.backgroundColor || e.backgroundColor || null, this.blendFilter = typeof t.blendFilter == "boolean" ? t.blendFilter : e.blendFilter ?? null, this.columnCount = t.columnCount !== void 0 ? t.columnCount : e.columnCount !== void 0 ? e.columnCount : null, this.constraint = t.constraint || e.constraint, this.darkenFilter = typeof t.darkenFilter == "boolean" ? t.darkenFilter : e.darkenFilter ?? null, this.deprecatedFontSize = typeof t.deprecatedFontSize == "boolean" ? t.deprecatedFontSize : e.deprecatedFontSize ?? null, this.fontFamily = t.fontFamily || e.fontFamily || null, this.fontSize = t.fontSize !== void 0 ? t.fontSize : e.fontSize !== void 0 ? e.fontSize : null, this.fontSizeNormalize = typeof t.fontSizeNormalize == "boolean" ? t.fontSizeNormalize : e.fontSizeNormalize ?? null, this.fontOpticalSizing = typeof t.fontOpticalSizing == "boolean" ? t.fontOpticalSizing : e.fontOpticalSizing ?? null, this.fontWeight = t.fontWeight !== void 0 ? t.fontWeight : e.fontWeight !== void 0 ? e.fontWeight : null, this.fontWidth = t.fontWidth !== void 0 ? t.fontWidth : e.fontWidth !== void 0 ? e.fontWidth : null, this.hyphens = typeof t.hyphens == "boolean" ? t.hyphens : e.hyphens ?? null, this.invertFilter = typeof t.invertFilter == "boolean" ? t.invertFilter : e.invertFilter ?? null, this.invertGaijiFilter = typeof t.invertGaijiFilter == "boolean" ? t.invertGaijiFilter : e.invertGaijiFilter ?? null, this.iOSPatch = this.deprecatedFontSize || t.iOSPatch === !1 ? !1 : t.iOSPatch === !0 ? (
|
|
7404
|
+
this.backgroundColor = t.backgroundColor || e.backgroundColor || null, this.blendFilter = typeof t.blendFilter == "boolean" ? t.blendFilter : e.blendFilter ?? null, this.columnCount = t.columnCount !== void 0 ? t.columnCount : e.columnCount !== void 0 ? e.columnCount : null, this.constraint = t.constraint || e.constraint, this.darkenFilter = typeof t.darkenFilter == "boolean" ? t.darkenFilter : e.darkenFilter ?? null, this.deprecatedFontSize = typeof t.deprecatedFontSize == "boolean" ? t.deprecatedFontSize : e.deprecatedFontSize ?? null, this.fontFamily = t.fontFamily || e.fontFamily || null, this.fontSize = t.fontSize !== void 0 ? t.fontSize : e.fontSize !== void 0 ? e.fontSize : null, this.fontSizeNormalize = typeof t.fontSizeNormalize == "boolean" ? t.fontSizeNormalize : e.fontSizeNormalize ?? null, this.fontOpticalSizing = typeof t.fontOpticalSizing == "boolean" ? t.fontOpticalSizing : e.fontOpticalSizing ?? null, this.fontWeight = t.fontWeight !== void 0 ? t.fontWeight : e.fontWeight !== void 0 ? e.fontWeight : null, this.fontWidth = t.fontWidth !== void 0 ? t.fontWidth : e.fontWidth !== void 0 ? e.fontWidth : null, this.hyphens = typeof t.hyphens == "boolean" ? t.hyphens : e.hyphens ?? null, this.invertFilter = typeof t.invertFilter == "boolean" ? t.invertFilter : e.invertFilter ?? null, this.invertGaijiFilter = typeof t.invertGaijiFilter == "boolean" ? t.invertGaijiFilter : e.invertGaijiFilter ?? null, this.iOSPatch = this.deprecatedFontSize || t.iOSPatch === !1 ? !1 : t.iOSPatch === !0 ? (U.OS.iOS || U.OS.iPadOS) && U.iOSRequest === "mobile" : e.iOSPatch, this.iPadOSPatch = this.deprecatedFontSize || t.iPadOSPatch === !1 ? !1 : t.iPadOSPatch === !0 ? U.OS.iPadOS && U.iOSRequest === "desktop" : e.iPadOSPatch, this.letterSpacing = t.letterSpacing !== void 0 ? t.letterSpacing : e.letterSpacing !== void 0 ? e.letterSpacing : null, this.ligatures = typeof t.ligatures == "boolean" ? t.ligatures : e.ligatures ?? null, this.lineHeight = t.lineHeight !== void 0 ? t.lineHeight : e.lineHeight !== void 0 ? e.lineHeight : null, this.linkColor = t.linkColor || e.linkColor || null, this.maximalLineLength = t.maximalLineLength === null ? null : t.maximalLineLength || e.maximalLineLength || null, this.minimalLineLength = t.minimalLineLength === null ? null : t.minimalLineLength || e.minimalLineLength || null, this.noRuby = typeof t.noRuby == "boolean" ? t.noRuby : e.noRuby ?? null, this.optimalLineLength = t.optimalLineLength || e.optimalLineLength, this.pageGutter = t.pageGutter !== void 0 ? t.pageGutter : e.pageGutter !== void 0 ? e.pageGutter : null, this.paragraphIndent = t.paragraphIndent !== void 0 ? t.paragraphIndent : e.paragraphIndent !== void 0 ? e.paragraphIndent : null, this.paragraphSpacing = t.paragraphSpacing !== void 0 ? t.paragraphSpacing : e.paragraphSpacing !== void 0 ? e.paragraphSpacing : null, this.scroll = typeof t.scroll == "boolean" ? t.scroll : e.scroll ?? null, this.scrollPaddingTop = t.scrollPaddingTop !== void 0 ? t.scrollPaddingTop : e.scrollPaddingTop !== void 0 ? e.scrollPaddingTop : null, this.scrollPaddingBottom = t.scrollPaddingBottom !== void 0 ? t.scrollPaddingBottom : e.scrollPaddingBottom !== void 0 ? e.scrollPaddingBottom : null, this.selectionBackgroundColor = t.selectionBackgroundColor || e.selectionBackgroundColor || null, this.selectionTextColor = t.selectionTextColor || e.selectionTextColor || null, this.textAlign = t.textAlign || e.textAlign || null, this.textColor = t.textColor || e.textColor || null, this.textNormalization = typeof t.textNormalization == "boolean" ? t.textNormalization : e.textNormalization ?? null, this.visitedColor = t.visitedColor || e.visitedColor || null, this.wordSpacing = t.wordSpacing !== void 0 ? t.wordSpacing : e.wordSpacing !== void 0 ? e.wordSpacing : null;
|
|
7567
7405
|
}
|
|
7568
7406
|
}
|
|
7569
|
-
function
|
|
7407
|
+
function zt(r) {
|
|
7570
7408
|
const t = getComputedStyle(r), e = parseFloat(t.paddingLeft || "0"), i = parseFloat(t.paddingRight || "0");
|
|
7571
7409
|
return r.clientWidth - e - i;
|
|
7572
7410
|
}
|
|
@@ -7579,7 +7417,7 @@ class $i extends Ce {
|
|
|
7579
7417
|
return this.a11yNormalize && (t["--USER__a11yNormalize"] = this.toFlag("a11y")), this.backgroundColor && (t["--USER__backgroundColor"] = this.backgroundColor), this.blendFilter && (t["--USER__blendFilter"] = this.toFlag("blend")), this.bodyHyphens && (t["--USER__bodyHyphens"] = this.bodyHyphens), this.colCount && (t["--USER__colCount"] = this.toUnitless(this.colCount)), this.darkenFilter === !0 ? t["--USER__darkenFilter"] = this.toFlag("darken") : typeof this.darkenFilter == "number" && (t["--USER__darkenFilter"] = this.toPercentage(this.darkenFilter)), this.deprecatedFontSize && (t["--USER__fontSizeImplementation"] = this.toFlag("deprecatedFontSize")), this.fontFamily && (t["--USER__fontFamily"] = this.fontFamily), this.fontOpticalSizing != null && (t["--USER__fontOpticalSizing"] = this.fontOpticalSizing), this.fontSize != null && (t["--USER__fontSize"] = this.toPercentage(this.fontSize, !0)), this.fontSizeNormalize && (t["--USER__fontSizeNormalize"] = this.toFlag("normalize")), this.fontWeight != null && (t["--USER__fontWeight"] = this.toUnitless(this.fontWeight)), this.fontWidth != null && (t["--USER__fontWidth"] = typeof this.fontWidth == "string" ? this.fontWidth : this.toUnitless(this.fontWidth)), this.invertFilter === !0 ? t["--USER__invertFilter"] = this.toFlag("invert") : typeof this.invertFilter == "number" && (t["--USER__invertFilter"] = this.toPercentage(this.invertFilter)), this.invertGaijiFilter === !0 ? t["--USER__invertGaiji"] = this.toFlag("invertGaiji") : typeof this.invertGaijiFilter == "number" && (t["--USER__invertGaiji"] = this.toPercentage(this.invertGaijiFilter)), this.iOSPatch && (t["--USER__iOSPatch"] = this.toFlag("iOSPatch")), this.iPadOSPatch && (t["--USER__iPadOSPatch"] = this.toFlag("iPadOSPatch")), this.letterSpacing != null && (t["--USER__letterSpacing"] = this.toRem(this.letterSpacing)), this.ligatures && (t["--USER__ligatures"] = this.ligatures), this.lineHeight != null && (t["--USER__lineHeight"] = this.toUnitless(this.lineHeight)), this.lineLength != null && (t["--USER__lineLength"] = this.toPx(this.lineLength)), this.linkColor && (t["--USER__linkColor"] = this.linkColor), this.noRuby && (t["--USER__noRuby"] = this.toFlag("noRuby")), this.paraIndent != null && (t["--USER__paraIndent"] = this.toRem(this.paraIndent)), this.paraSpacing != null && (t["--USER__paraSpacing"] = this.toRem(this.paraSpacing)), this.selectionBackgroundColor && (t["--USER__selectionBackgroundColor"] = this.selectionBackgroundColor), this.selectionTextColor && (t["--USER__selectionTextColor"] = this.selectionTextColor), this.textAlign && (t["--USER__textAlign"] = this.textAlign), this.textColor && (t["--USER__textColor"] = this.textColor), this.view && (t["--USER__view"] = this.toFlag(this.view)), this.visitedColor && (t["--USER__visitedColor"] = this.visitedColor), this.wordSpacing != null && (t["--USER__wordSpacing"] = this.toRem(this.wordSpacing)), t;
|
|
7580
7418
|
}
|
|
7581
7419
|
}
|
|
7582
|
-
class
|
|
7420
|
+
class qn extends Ce {
|
|
7583
7421
|
constructor(t) {
|
|
7584
7422
|
super(), this.backgroundColor = t.backgroundColor ?? null, this.baseFontFamily = t.baseFontFamily ?? null, this.baseFontSize = t.baseFontSize ?? null, this.baseLineHeight = t.baseLineHeight ?? null, this.boxSizingMedia = t.boxSizingMedia ?? null, this.boxSizingTable = t.boxSizingTable ?? null, this.colWidth = t.colWidth ?? null, this.colCount = t.colCount ?? null, this.colGap = t.colGap ?? null, this.codeFontFamily = t.codeFontFamily ?? null, this.compFontFamily = t.compFontFamily ?? null, this.defaultLineLength = t.defaultLineLength ?? null, this.flowSpacing = t.flowSpacing ?? null, this.humanistTf = t.humanistTf ?? null, this.linkColor = t.linkColor ?? null, this.maxMediaWidth = t.maxMediaWidth ?? null, this.maxMediaHeight = t.maxMediaHeight ?? null, this.modernTf = t.modernTf ?? null, this.monospaceTf = t.monospaceTf ?? null, this.noOverflow = t.noOverflow ?? null, this.noVerticalPagination = t.noVerticalPagination ?? null, this.oldStyleTf = t.oldStyleTf ?? null, this.pageGutter = t.pageGutter ?? null, this.paraIndent = t.paraIndent ?? null, this.paraSpacing = t.paraSpacing ?? null, this.primaryColor = t.primaryColor ?? null, this.scrollPaddingBottom = t.scrollPaddingBottom ?? null, this.scrollPaddingTop = t.scrollPaddingTop ?? null, this.sansSerifJa = t.sansSerifJa ?? null, this.sansSerifJaV = t.sansSerifJaV ?? null, this.sansTf = t.sansTf ?? null, this.secondaryColor = t.secondaryColor ?? null, this.selectionBackgroundColor = t.selectionBackgroundColor ?? null, this.selectionTextColor = t.selectionTextColor ?? null, this.serifJa = t.serifJa ?? null, this.serifJaV = t.serifJaV ?? null, this.textColor = t.textColor ?? null, this.typeScale = t.typeScale ?? null, this.visitedColor = t.visitedColor ?? null;
|
|
7585
7423
|
}
|
|
@@ -7588,9 +7426,9 @@ class Kn extends Ce {
|
|
|
7588
7426
|
return this.backgroundColor && (t["--RS__backgroundColor"] = this.backgroundColor), this.baseFontFamily && (t["--RS__baseFontFamily"] = this.baseFontFamily), this.baseFontSize != null && (t["--RS__baseFontSize"] = this.toRem(this.baseFontSize)), this.baseLineHeight != null && (t["--RS__baseLineHeight"] = this.toUnitless(this.baseLineHeight)), this.boxSizingMedia && (t["--RS__boxSizingMedia"] = this.boxSizingMedia), this.boxSizingTable && (t["--RS__boxSizingTable"] = this.boxSizingTable), this.colWidth != null && (t["--RS__colWidth"] = this.colWidth), this.colCount != null && (t["--RS__colCount"] = this.toUnitless(this.colCount)), this.colGap != null && (t["--RS__colGap"] = this.toPx(this.colGap)), this.codeFontFamily && (t["--RS__codeFontFamily"] = this.codeFontFamily), this.compFontFamily && (t["--RS__compFontFamily"] = this.compFontFamily), this.defaultLineLength != null && (t["--RS__defaultLineLength"] = this.toPx(this.defaultLineLength)), this.flowSpacing != null && (t["--RS__flowSpacing"] = this.toRem(this.flowSpacing)), this.humanistTf && (t["--RS__humanistTf"] = this.humanistTf), this.linkColor && (t["--RS__linkColor"] = this.linkColor), this.maxMediaWidth && (t["--RS__maxMediaWidth"] = this.toVw(this.maxMediaWidth)), this.maxMediaHeight && (t["--RS__maxMediaHeight"] = this.toVh(this.maxMediaHeight)), this.modernTf && (t["--RS__modernTf"] = this.modernTf), this.monospaceTf && (t["--RS__monospaceTf"] = this.monospaceTf), this.noOverflow && (t["--RS__disableOverflow"] = this.toFlag("noOverflow")), this.noVerticalPagination && (t["--RS__disablePagination"] = this.toFlag("noVerticalPagination")), this.oldStyleTf && (t["--RS__oldStyleTf"] = this.oldStyleTf), this.pageGutter != null && (t["--RS__pageGutter"] = this.toPx(this.pageGutter)), this.paraIndent != null && (t["--RS__paraIndent"] = this.toRem(this.paraIndent)), this.paraSpacing != null && (t["--RS__paraSpacing"] = this.toRem(this.paraSpacing)), this.primaryColor && (t["--RS__primaryColor"] = this.primaryColor), this.sansSerifJa && (t["--RS__sans-serif-ja"] = this.sansSerifJa), this.sansSerifJaV && (t["--RS__sans-serif-ja-v"] = this.sansSerifJaV), this.sansTf && (t["--RS__sansTf"] = this.sansTf), this.scrollPaddingBottom != null && (t["--RS__scrollPaddingBottom"] = this.toPx(this.scrollPaddingBottom)), this.scrollPaddingTop != null && (t["--RS__scrollPaddingTop"] = this.toPx(this.scrollPaddingTop)), this.secondaryColor && (t["--RS__secondaryColor"] = this.secondaryColor), this.selectionBackgroundColor && (t["--RS__selectionBackgroundColor"] = this.selectionBackgroundColor), this.selectionTextColor && (t["--RS__selectionTextColor"] = this.selectionTextColor), this.serifJa && (t["--RS__serif-ja"] = this.serifJa), this.serifJaV && (t["--RS__serif-ja-v"] = this.serifJaV), this.textColor && (t["--RS__textColor"] = this.textColor), this.typeScale && (t["--RS__typeScale"] = this.toUnitless(this.typeScale)), this.visitedColor && (t["--RS__visitedColor"] = this.visitedColor), t;
|
|
7589
7427
|
}
|
|
7590
7428
|
}
|
|
7591
|
-
class
|
|
7429
|
+
class _n {
|
|
7592
7430
|
constructor(t) {
|
|
7593
|
-
this.rsProperties = t.rsProperties, this.userProperties = t.userProperties, this.lineLengths = t.lineLengths, this.container = t.container, this.containerParent = t.container.parentElement || document.documentElement, this.constraint = t.constraint, this.cachedColCount = t.userProperties.colCount, this.effectiveContainerWidth =
|
|
7431
|
+
this.rsProperties = t.rsProperties, this.userProperties = t.userProperties, this.lineLengths = t.lineLengths, this.container = t.container, this.containerParent = t.container.parentElement || document.documentElement, this.constraint = t.constraint, this.cachedColCount = t.userProperties.colCount, this.effectiveContainerWidth = zt(this.containerParent);
|
|
7594
7432
|
}
|
|
7595
7433
|
update(t) {
|
|
7596
7434
|
this.cachedColCount = t.columnCount, t.constraint !== this.constraint && (this.constraint = t.constraint), t.pageGutter !== this.rsProperties.pageGutter && (this.rsProperties.pageGutter = t.pageGutter), t.scrollPaddingBottom !== this.rsProperties.scrollPaddingBottom && (this.rsProperties.scrollPaddingBottom = t.scrollPaddingBottom), t.scrollPaddingTop !== this.rsProperties.scrollPaddingTop && (this.rsProperties.scrollPaddingTop = t.scrollPaddingTop), this.lineLengths.update({
|
|
@@ -7657,59 +7495,59 @@ class qn {
|
|
|
7657
7495
|
// TODO: As scroll shows, the effective line-length
|
|
7658
7496
|
// should be the same as uncompensated when scale >= 1
|
|
7659
7497
|
paginate(t, e, i) {
|
|
7660
|
-
const A = Math.round(
|
|
7661
|
-
let
|
|
7498
|
+
const A = Math.round(zt(this.containerParent) - this.constraint), n = this.getCompensatedMetrics(t, e), { zoomCompensation: s, optimal: o, minimal: a, maximal: h } = n, c = () => A >= o && h !== null ? Math.min(Math.round(h * s), A) : A;
|
|
7499
|
+
let d = 1, g = A;
|
|
7662
7500
|
if (i === void 0)
|
|
7663
7501
|
return {
|
|
7664
7502
|
colCount: void 0,
|
|
7665
|
-
effectiveContainerWidth:
|
|
7666
|
-
effectiveLineLength: Math.round(
|
|
7503
|
+
effectiveContainerWidth: g,
|
|
7504
|
+
effectiveLineLength: Math.round(g / d * s)
|
|
7667
7505
|
};
|
|
7668
7506
|
if (i === null)
|
|
7669
7507
|
if (A >= o && h !== null) {
|
|
7670
|
-
|
|
7671
|
-
const M = Math.round(
|
|
7672
|
-
|
|
7508
|
+
d = Math.floor(A / o);
|
|
7509
|
+
const M = Math.round(d * (h * s));
|
|
7510
|
+
g = Math.min(M, A);
|
|
7673
7511
|
} else
|
|
7674
|
-
|
|
7512
|
+
g = c();
|
|
7675
7513
|
else if (i > 1) {
|
|
7676
7514
|
const M = Math.round(i * (a !== null ? a : o));
|
|
7677
7515
|
if (A >= M)
|
|
7678
|
-
if (
|
|
7679
|
-
|
|
7516
|
+
if (d = i, h === null)
|
|
7517
|
+
g = A;
|
|
7680
7518
|
else {
|
|
7681
|
-
const l = Math.round(
|
|
7682
|
-
|
|
7519
|
+
const l = Math.round(d * (h * s));
|
|
7520
|
+
g = Math.min(l, A);
|
|
7683
7521
|
}
|
|
7684
7522
|
else if (a !== null && A < Math.round(i * a))
|
|
7685
|
-
if (
|
|
7686
|
-
|
|
7523
|
+
if (d = Math.floor(A / a), d <= 1)
|
|
7524
|
+
d = 1, g = c();
|
|
7687
7525
|
else {
|
|
7688
|
-
const l = Math.round(
|
|
7689
|
-
|
|
7526
|
+
const l = Math.round(d * (o * s));
|
|
7527
|
+
g = Math.min(l, A);
|
|
7690
7528
|
}
|
|
7691
7529
|
else {
|
|
7692
|
-
|
|
7693
|
-
const l = Math.round(
|
|
7694
|
-
|
|
7530
|
+
d = i;
|
|
7531
|
+
const l = Math.round(d * (o * s));
|
|
7532
|
+
g = Math.min(l, A);
|
|
7695
7533
|
}
|
|
7696
7534
|
} else
|
|
7697
|
-
|
|
7535
|
+
d = 1, g = c();
|
|
7698
7536
|
return {
|
|
7699
|
-
colCount:
|
|
7700
|
-
effectiveContainerWidth:
|
|
7701
|
-
effectiveLineLength: Math.round(
|
|
7537
|
+
colCount: d,
|
|
7538
|
+
effectiveContainerWidth: g,
|
|
7539
|
+
effectiveLineLength: Math.round(g / d / (t && t >= 1 ? t : 1) * s)
|
|
7702
7540
|
};
|
|
7703
7541
|
}
|
|
7704
7542
|
// This behaves as paginate where colCount = 1
|
|
7705
7543
|
computeScrollLength(t, e) {
|
|
7706
|
-
const i = Math.round(
|
|
7544
|
+
const i = Math.round(zt(this.containerParent) - this.constraint), A = this.getCompensatedMetrics(t && (t < 1 || e) ? t : 1, e), n = A.zoomCompensation, s = A.optimal, o = A.maximal;
|
|
7707
7545
|
let a, h = i, c = Math.round(s * n);
|
|
7708
7546
|
if (o === null)
|
|
7709
7547
|
c = i;
|
|
7710
7548
|
else {
|
|
7711
|
-
const
|
|
7712
|
-
c = e ?
|
|
7549
|
+
const d = Math.min(Math.round(o * n), i);
|
|
7550
|
+
c = e ? d : Math.round(d * n);
|
|
7713
7551
|
}
|
|
7714
7552
|
return {
|
|
7715
7553
|
colCount: a,
|
|
@@ -7725,7 +7563,7 @@ class qn {
|
|
|
7725
7563
|
this.userProperties.colCount = t.colCount, this.userProperties.lineLength = t.effectiveLineLength, this.effectiveContainerWidth = t.effectiveContainerWidth, this.container.style.width = `${this.effectiveContainerWidth}px`;
|
|
7726
7564
|
}
|
|
7727
7565
|
}
|
|
7728
|
-
const
|
|
7566
|
+
const $n = (r) => ({
|
|
7729
7567
|
frameLoaded: r.frameLoaded || (() => {
|
|
7730
7568
|
}),
|
|
7731
7569
|
positionChanged: r.positionChanged || (() => {
|
|
@@ -7750,10 +7588,10 @@ class tA extends wi {
|
|
|
7750
7588
|
readingOrder: [],
|
|
7751
7589
|
progressions: /* @__PURE__ */ new Map(),
|
|
7752
7590
|
positions: null
|
|
7753
|
-
}, this.pub = e, this.container = t, this.listeners =
|
|
7754
|
-
rsProperties: new
|
|
7591
|
+
}, this.pub = e, this.container = t, this.listeners = $n(i), this.currentLocation = n, A.length && (this.positions = A), this._preferences = new It(s.preferences), this._defaults = new Jn(s.defaults), this._settings = new ci(this._preferences, this._defaults), this._css = new _n({
|
|
7592
|
+
rsProperties: new qn({}),
|
|
7755
7593
|
userProperties: new $i({}),
|
|
7756
|
-
lineLengths: new
|
|
7594
|
+
lineLengths: new ft({
|
|
7757
7595
|
optimalChars: this._settings.optimalLineLength,
|
|
7758
7596
|
minChars: this._settings.minimalLineLength,
|
|
7759
7597
|
maxChars: this._settings.maximalLineLength,
|
|
@@ -7773,7 +7611,7 @@ class tA extends wi {
|
|
|
7773
7611
|
}
|
|
7774
7612
|
async load() {
|
|
7775
7613
|
if (this.positions?.length || (this.positions = await this.pub.positionsFromManifest()), this._layout === B.fixed)
|
|
7776
|
-
this.framePool = new
|
|
7614
|
+
this.framePool = new kn(this.container, this.positions, this.pub), this.framePool.listener = (t, e) => {
|
|
7777
7615
|
this.eventListener(t, e);
|
|
7778
7616
|
};
|
|
7779
7617
|
else {
|
|
@@ -7823,7 +7661,7 @@ class tA extends wi {
|
|
|
7823
7661
|
async resizeHandler() {
|
|
7824
7662
|
const t = this.container.parentElement || document.documentElement;
|
|
7825
7663
|
if (this._layout === B.fixed)
|
|
7826
|
-
this.container.style.width = `${
|
|
7664
|
+
this.container.style.width = `${zt(t) - this._settings.constraint}px`, this.framePool.resizeHandler();
|
|
7827
7665
|
else {
|
|
7828
7666
|
const e = this._css.userProperties.colCount, i = this._css.userProperties.lineLength;
|
|
7829
7667
|
this._css.resizeHandler(), (this._css.userProperties.view !== "scroll" && e !== this._css.userProperties.colCount || i !== this._css.userProperties.lineLength) && await this.commitCSS(this._css);
|
|
@@ -7895,7 +7733,7 @@ class tA extends wi {
|
|
|
7895
7733
|
else
|
|
7896
7734
|
try {
|
|
7897
7735
|
this.goLink(new q({
|
|
7898
|
-
href:
|
|
7736
|
+
href: Pt.join(Pt.dirname(this.currentLocation.href), s)
|
|
7899
7737
|
}), !1, () => {
|
|
7900
7738
|
});
|
|
7901
7739
|
} catch (o) {
|
|
@@ -7905,9 +7743,9 @@ class tA extends wi {
|
|
|
7905
7743
|
}
|
|
7906
7744
|
} else console.log("Clicked on", n);
|
|
7907
7745
|
} else {
|
|
7908
|
-
if (this._layout === B.fixed && this.framePool.doNotDisturb && (A.doNotDisturb = !0), this._layout === B.fixed && (this.currentProgression ===
|
|
7746
|
+
if (this._layout === B.fixed && this.framePool.doNotDisturb && (A.doNotDisturb = !0), this._layout === B.fixed && (this.currentProgression === N.rtl || this.currentProgression === N.ltr) && this.framePool.currentFrames.length > 1) {
|
|
7909
7747
|
const o = this.framePool.currentFrames;
|
|
7910
|
-
A.targetFrameSrc === o[this.currentProgression ===
|
|
7748
|
+
A.targetFrameSrc === o[this.currentProgression === N.rtl ? 0 : 1]?.source && (A.x += (o[this.currentProgression === N.rtl ? 1 : 0]?.iframe.contentWindow?.innerWidth ?? 0) * window.devicePixelRatio);
|
|
7911
7749
|
}
|
|
7912
7750
|
if (t === "click" ? this.listeners.click(A) : this.listeners.tap(A)) break;
|
|
7913
7751
|
const s = (this._cframes.length === 2 ? this._cframes[0].window.innerWidth + this._cframes[1].window.innerWidth : this._cframes[0].window.innerWidth) * window.devicePixelRatio / 4;
|
|
@@ -7945,8 +7783,8 @@ class tA extends wi {
|
|
|
7945
7783
|
}
|
|
7946
7784
|
}
|
|
7947
7785
|
determineModules() {
|
|
7948
|
-
let t = Array.from(
|
|
7949
|
-
return this._layout === B.fixed ? t.filter((e) =>
|
|
7786
|
+
let t = Array.from(Tt.keys());
|
|
7787
|
+
return this._layout === B.fixed ? t.filter((e) => sn.includes(e)) : (t = t.filter((e) => on.includes(e)), this._layout === B.scrolled ? t = t.filter((e) => e !== "column_snapper") : t = t.filter((e) => e !== "scroll_snapper"), t);
|
|
7950
7788
|
}
|
|
7951
7789
|
// Start listening to messages from the current iframe
|
|
7952
7790
|
attachListener() {
|
|
@@ -8140,7 +7978,7 @@ class tA extends wi {
|
|
|
8140
7978
|
return this.go(t.locator, e, i);
|
|
8141
7979
|
}
|
|
8142
7980
|
}
|
|
8143
|
-
class
|
|
7981
|
+
class Ar {
|
|
8144
7982
|
constructor(t) {
|
|
8145
7983
|
this.sourceNode = null, this.listeners = {}, this.isMutedValue = !1, this.isPlayingValue = !1, this.isPausedValue = !1, this.isLoadingValue = !1, this.isLoadedValue = !1, this.isEndedValue = !1, this.playback = t.playback, this.audioContext = t.audioContext, this.gainNode = this.audioContext?.createGain(), this.setVolume(this.playback.state.volume), this.mediaElement = document.createElement("audio"), this.mediaElement.crossOrigin = "use-credentials", this.mediaElement.addEventListener(
|
|
8146
7984
|
"canplaythrough",
|
|
@@ -8314,68 +8152,67 @@ class ir {
|
|
|
8314
8152
|
}
|
|
8315
8153
|
}
|
|
8316
8154
|
export {
|
|
8317
|
-
|
|
8155
|
+
z as BooleanPreference,
|
|
8318
8156
|
Ki as EnumPreference,
|
|
8319
|
-
|
|
8157
|
+
Jn as EpubDefaults,
|
|
8320
8158
|
tA as EpubNavigator,
|
|
8321
|
-
|
|
8159
|
+
It as EpubPreferences,
|
|
8322
8160
|
hi as EpubPreferencesEditor,
|
|
8323
8161
|
ci as EpubSettings,
|
|
8324
|
-
|
|
8325
|
-
|
|
8326
|
-
|
|
8327
|
-
|
|
8328
|
-
|
|
8329
|
-
|
|
8330
|
-
|
|
8331
|
-
|
|
8162
|
+
ir as ExperimentalWebPubNavigator,
|
|
8163
|
+
Tn as FXLCoordinator,
|
|
8164
|
+
Yn as FXLFrameManager,
|
|
8165
|
+
kn as FXLFramePoolManager,
|
|
8166
|
+
bn as FXLPeripherals,
|
|
8167
|
+
jn as FXLSpreader,
|
|
8168
|
+
wt as FrameComms,
|
|
8169
|
+
zn as FrameManager,
|
|
8332
8170
|
Qn as FramePoolManager,
|
|
8333
|
-
|
|
8334
|
-
|
|
8335
|
-
|
|
8336
|
-
|
|
8337
|
-
|
|
8171
|
+
Nn as HorizontalThird,
|
|
8172
|
+
ft as LineLengths,
|
|
8173
|
+
dA as Navigator,
|
|
8174
|
+
le as Orientation,
|
|
8175
|
+
Q as Preference,
|
|
8338
8176
|
Ce as Properties,
|
|
8339
|
-
|
|
8340
|
-
|
|
8341
|
-
|
|
8342
|
-
|
|
8177
|
+
qn as RSProperties,
|
|
8178
|
+
F as RangePreference,
|
|
8179
|
+
_n as ReadiumCSS,
|
|
8180
|
+
he as Spread,
|
|
8343
8181
|
X as TextAlignment,
|
|
8344
8182
|
$i as UserProperties,
|
|
8345
|
-
|
|
8183
|
+
xn as VerticalThird,
|
|
8346
8184
|
wi as VisualNavigator,
|
|
8347
|
-
|
|
8348
|
-
|
|
8349
|
-
|
|
8350
|
-
|
|
8351
|
-
|
|
8352
|
-
|
|
8353
|
-
|
|
8354
|
-
|
|
8185
|
+
Ar as WebAudioEngine,
|
|
8186
|
+
wA as WebPubBlobBuilder,
|
|
8187
|
+
fn as WebPubCSS,
|
|
8188
|
+
wn as WebPubDefaults,
|
|
8189
|
+
un as WebPubFrameManager,
|
|
8190
|
+
mn as WebPubFramePoolManager,
|
|
8191
|
+
In as WebPubNavigator,
|
|
8192
|
+
Et as WebPubPreferences,
|
|
8355
8193
|
Ai as WebPubPreferencesEditor,
|
|
8356
8194
|
ii as WebPubSettings,
|
|
8357
8195
|
Zi as WebUserProperties,
|
|
8358
|
-
|
|
8196
|
+
y as ensureBoolean,
|
|
8359
8197
|
Lt as ensureEnumValue,
|
|
8360
|
-
|
|
8361
|
-
|
|
8362
|
-
|
|
8198
|
+
dt as ensureFilter,
|
|
8199
|
+
Mn as ensureLessThanOrEqual,
|
|
8200
|
+
Bn as ensureMoreThanOrEqual,
|
|
8363
8201
|
I as ensureNonNegative,
|
|
8364
|
-
|
|
8202
|
+
Y as ensureString,
|
|
8365
8203
|
J as ensureValueInRange,
|
|
8366
8204
|
nt as filterRangeConfig,
|
|
8367
|
-
|
|
8205
|
+
bt as fontSizeRangeConfig,
|
|
8368
8206
|
$ as fontWeightRangeConfig,
|
|
8369
|
-
|
|
8207
|
+
jt as fontWidthRangeConfig,
|
|
8370
8208
|
Vt as letterSpacingRangeConfig,
|
|
8371
|
-
|
|
8209
|
+
vt as lineHeightRangeConfig,
|
|
8372
8210
|
rt as lineLengthRangeConfig,
|
|
8373
|
-
|
|
8374
|
-
|
|
8375
|
-
|
|
8376
|
-
|
|
8377
|
-
|
|
8378
|
-
|
|
8379
|
-
|
|
8380
|
-
Gt as zoomRangeConfig
|
|
8211
|
+
Dt as paragraphIndentRangeConfig,
|
|
8212
|
+
Ht as paragraphSpacingRangeConfig,
|
|
8213
|
+
Mt as sML,
|
|
8214
|
+
U as sMLWithRequest,
|
|
8215
|
+
qt as withFallback,
|
|
8216
|
+
Gt as wordSpacingRangeConfig,
|
|
8217
|
+
kt as zoomRangeConfig
|
|
8381
8218
|
};
|