@readium/shared 2.1.3 → 2.1.5
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/ar-DyHX_uy2.js +7 -0
- package/dist/da-Dct0PS3E.js +7 -0
- package/dist/fr-C5HEel98.js +7 -0
- package/dist/index.js +957 -946
- package/dist/index.umd.cjs +3 -3
- package/dist/it-DFOBoXGy.js +7 -0
- package/dist/pt_PT-Di3sVjze.js +7 -0
- package/dist/sv-BfzAFsVN.js +7 -0
- package/package.json +10 -4
- package/src/publication/accessibility/Localization.md +39 -10
- package/src/publication/accessibility/Localization.ts +88 -18
- package/src/publication/accessibility/SupportedLanguages.ts +1 -0
- package/types/src/publication/accessibility/Localization.d.ts +15 -6
- package/types/src/publication/accessibility/SupportedLanguages.d.ts +1 -0
- package/src/publication/accessibility/locales/en.json +0 -231
- package/src/publication/accessibility/locales/fr.json +0 -231
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
class
|
|
1
|
+
class ti {
|
|
2
2
|
close() {
|
|
3
3
|
}
|
|
4
4
|
links() {
|
|
@@ -8,7 +8,7 @@ class Qe {
|
|
|
8
8
|
throw Error("This is an empty fetcher");
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
|
-
class
|
|
11
|
+
class tr {
|
|
12
12
|
constructor(t, e) {
|
|
13
13
|
this.client = t || window.fetch.bind(window), this.baseUrl = e;
|
|
14
14
|
}
|
|
@@ -19,12 +19,12 @@ class nn {
|
|
|
19
19
|
const e = t.toURL(this.baseUrl);
|
|
20
20
|
if (e === void 0)
|
|
21
21
|
throw Error(`Invalid HREF: ${t.href}`);
|
|
22
|
-
return new
|
|
22
|
+
return new ei(this.client, t, e);
|
|
23
23
|
}
|
|
24
24
|
close() {
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
class
|
|
27
|
+
class ei {
|
|
28
28
|
constructor(t, e, i) {
|
|
29
29
|
this.client = t || window.fetch.bind(window), this._link = e, this.url = i;
|
|
30
30
|
}
|
|
@@ -88,12 +88,12 @@ class je {
|
|
|
88
88
|
);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
class
|
|
91
|
+
class er {
|
|
92
92
|
constructor(t, e) {
|
|
93
93
|
this.start = t, this.endInclusive = e;
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
class
|
|
96
|
+
class ir {
|
|
97
97
|
readAsString() {
|
|
98
98
|
return this.read().then((t) => t === void 0 ? t : new TextDecoder().decode(t));
|
|
99
99
|
}
|
|
@@ -104,7 +104,7 @@ class an {
|
|
|
104
104
|
return this.readAsString().then((t) => t === void 0 ? t : new DOMParser().parseFromString(t, "text/xml"));
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
class
|
|
107
|
+
class _ {
|
|
108
108
|
constructor(t = {}) {
|
|
109
109
|
this.conformsTo = t.conformsTo ?? [], this.certification = t.certification ?? null, this.summary = t.summary ?? null, this.accessMode = t.accessMode ?? [], this.accessModeSufficient = t.accessModeSufficient ?? [], this.feature = t.feature ?? [], this.hazard = t.hazard ?? [], this.exemption = t.exemption ?? [];
|
|
110
110
|
}
|
|
@@ -114,15 +114,15 @@ class V {
|
|
|
114
114
|
static deserialize(t) {
|
|
115
115
|
if (!t || typeof t != "object") return;
|
|
116
116
|
const e = t;
|
|
117
|
-
return new
|
|
117
|
+
return new _({
|
|
118
118
|
conformsTo: e.conformsTo ? e.conformsTo.map((i) => Tt.deserialize(i)).filter((i) => i !== void 0) : void 0,
|
|
119
119
|
certification: e.certification ? Pt.deserialize(e.certification) : void 0,
|
|
120
120
|
summary: e.summary,
|
|
121
|
-
accessMode: e.accessMode ? e.accessMode.map((i) =>
|
|
122
|
-
accessModeSufficient: e.accessModeSufficient ? e.accessModeSufficient.map((i) =>
|
|
123
|
-
feature: e.feature ? e.feature.map((i) =>
|
|
121
|
+
accessMode: e.accessMode ? e.accessMode.map((i) => R.deserialize(i)).filter((i) => i !== void 0) : void 0,
|
|
122
|
+
accessModeSufficient: e.accessModeSufficient ? e.accessModeSufficient.map((i) => It.deserialize(i)).filter((i) => i !== void 0) : void 0,
|
|
123
|
+
feature: e.feature ? e.feature.map((i) => A.deserialize(i)).filter((i) => i !== void 0) : void 0,
|
|
124
124
|
hazard: e.hazard ? e.hazard.map((i) => P.deserialize(i)).filter((i) => i !== void 0) : void 0,
|
|
125
|
-
exemption: e.exemption ? e.exemption.map((i) =>
|
|
125
|
+
exemption: e.exemption ? e.exemption.map((i) => xt.deserialize(i)).filter((i) => i !== void 0) : void 0
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
128
|
/**
|
|
@@ -213,16 +213,16 @@ const y = class y {
|
|
|
213
213
|
}
|
|
214
214
|
};
|
|
215
215
|
y.AUDITORY = new y("auditory"), y.CHART_ON_VISUAL = new y("chartOnVisual"), y.CHEM_ON_VISUAL = new y("chemOnVisual"), y.COLOR_DEPENDENT = new y("colorDependent"), y.DIAGRAM_ON_VISUAL = new y("diagramOnVisual"), y.MATH_ON_VISUAL = new y("mathOnVisual"), y.MUSIC_ON_VISUAL = new y("musicOnVisual"), y.TACTILE = new y("tactile"), y.TEXT_ON_VISUAL = new y("textOnVisual"), y.TEXTUAL = new y("textual"), y.VISUAL = new y("visual");
|
|
216
|
-
let
|
|
217
|
-
const
|
|
216
|
+
let R = y;
|
|
217
|
+
const x = class x {
|
|
218
218
|
constructor(t) {
|
|
219
219
|
if (typeof t == "string") {
|
|
220
|
-
if (!
|
|
220
|
+
if (!x.VALID_MODES.has(t.toLowerCase()))
|
|
221
221
|
return;
|
|
222
222
|
this.value = t.toLowerCase();
|
|
223
223
|
} else {
|
|
224
224
|
const e = t.filter(
|
|
225
|
-
(i) =>
|
|
225
|
+
(i) => x.VALID_MODES.has(i.toLowerCase())
|
|
226
226
|
);
|
|
227
227
|
if (e.length === 0)
|
|
228
228
|
return;
|
|
@@ -235,11 +235,11 @@ const I = class I {
|
|
|
235
235
|
static deserialize(t) {
|
|
236
236
|
if (!t) return;
|
|
237
237
|
if (typeof t == "string")
|
|
238
|
-
return new
|
|
238
|
+
return new x(t);
|
|
239
239
|
if (!Array.isArray(t)) return;
|
|
240
|
-
const e = t.filter((i) => i ?
|
|
240
|
+
const e = t.filter((i) => i ? x.VALID_MODES.has(i.toLowerCase()) : !1);
|
|
241
241
|
if (e.length !== 0)
|
|
242
|
-
return new
|
|
242
|
+
return new x(e);
|
|
243
243
|
}
|
|
244
244
|
/**
|
|
245
245
|
* Serializes a [PrimaryAccessMode] to its RWPM JSON representation.
|
|
@@ -248,8 +248,8 @@ const I = class I {
|
|
|
248
248
|
return this.value;
|
|
249
249
|
}
|
|
250
250
|
};
|
|
251
|
-
|
|
252
|
-
let
|
|
251
|
+
x.VALID_MODES = /* @__PURE__ */ new Set(["auditory", "tactile", "textual", "visual"]), x.AUDITORY = new x("auditory"), x.TACTILE = new x("tactile"), x.TEXTUAL = new x("textual"), x.VISUAL = new x("visual");
|
|
252
|
+
let It = x;
|
|
253
253
|
const l = class l {
|
|
254
254
|
constructor(t) {
|
|
255
255
|
this.value = t;
|
|
@@ -269,7 +269,7 @@ const l = class l {
|
|
|
269
269
|
}
|
|
270
270
|
};
|
|
271
271
|
l.NONE = new l("none"), l.ANNOTATIONS = new l("annotations"), l.ARIA = new l("ARIA"), l.INDEX = new l("index"), l.PAGE_BREAK_MARKERS = new l("pageBreakMarkers"), l.PAGE_NAVIGATION = new l("pageNavigation"), l.PRINT_PAGE_NUMBERS = new l("printPageNumbers"), l.READING_ORDER = new l("readingOrder"), l.STRUCTURAL_NAVIGATION = new l("structuralNavigation"), l.TABLE_OF_CONTENTS = new l("tableOfContents"), l.TAGGED_PDF = new l("taggedPDF"), l.ALTERNATIVE_TEXT = new l("alternativeText"), l.AUDIO_DESCRIPTION = new l("audioDescription"), l.CAPTIONS = new l("captions"), l.CLOSED_CAPTIONS = new l("closedCaptions"), l.DESCRIBED_MATH = new l("describedMath"), l.LONG_DESCRIPTION = new l("longDescription"), l.OPEN_CAPTIONS = new l("openCaptions"), l.SIGN_LANGUAGE = new l("signLanguage"), l.TRANSCRIPT = new l("transcript"), l.DISPLAY_TRANSFORMABILITY = new l("displayTransformability"), l.SYNCHRONIZED_AUDIO_TEXT = new l("synchronizedAudioText"), l.TIMING_CONTROL = new l("timingControl"), l.UNLOCKED = new l("unlocked"), l.CHEM_ML = new l("ChemML"), l.LATEX = new l("latex"), l.LATEX_CHEMISTRY = new l("latex-chemistry"), l.MATH_ML = new l("MathML"), l.MATH_ML_CHEMISTRY = new l("MathML-chemistry"), l.TTS_MARKUP = new l("ttsMarkup"), l.HIGH_CONTRAST_AUDIO = new l("highContrastAudio"), l.HIGH_CONTRAST_DISPLAY = new l("highContrastDisplay"), l.LARGE_PRINT = new l("largePrint"), l.BRAILLE = new l("braille"), l.TACTILE_GRAPHIC = new l("tactileGraphic"), l.TACTILE_OBJECT = new l("tactileObject"), l.FULL_RUBY_ANNOTATIONS = new l("fullRubyAnnotations"), l.HORIZONTAL_WRITING = new l("horizontalWriting"), l.RUBY_ANNOTATIONS = new l("rubyAnnotations"), l.VERTICAL_WRITING = new l("verticalWriting"), l.WITH_ADDITIONAL_WORD_SEGMENTATION = new l("withAdditionalWordSegmentation"), l.WITHOUT_ADDITIONAL_WORD_SEGMENTATION = new l("withoutAdditionalWordSegmentation");
|
|
272
|
-
let
|
|
272
|
+
let A = l;
|
|
273
273
|
const w = class w {
|
|
274
274
|
constructor(t) {
|
|
275
275
|
this.value = t;
|
|
@@ -309,35 +309,46 @@ const S = class S {
|
|
|
309
309
|
}
|
|
310
310
|
};
|
|
311
311
|
S.NONE = new S("none"), S.DOCUMENTED = new S("documented"), S.LEGAL = new S("legal"), S.TEMPORARY = new S("temporary"), S.TECHNICAL = new S("technical"), S.EAA_DISPROPORTIONATE_BURDEN = new S("eaa-disproportionate-burden"), S.EAA_FUNDAMENTAL_ALTERATION = new S("eaa-fundamental-alteration"), S.EAA_MICROENTERPRISE = new S("eaa-microenterprise"), S.EAA_TECHNICAL_IMPOSSIBILITY = new S("eaa-technical-impossibility"), S.EAA_TEMPORARY = new S("eaa-temporary");
|
|
312
|
-
let
|
|
313
|
-
const ti = { title: "Conformance", "details-title": "Detailed conformance information", a: { compact: "This publication meets minimum accessibility standards", descriptive: "The publication contains a conformance statement that it meets the EPUB Accessibility and WCAG 2 Level A standard" }, aa: { compact: "This publication meets accepted accessibility standards", descriptive: "The publication contains a conformance statement that it meets the EPUB Accessibility and WCAG 2 Level AA standard" }, aaa: { compact: "This publication exceeds accepted accessibility standards", descriptive: "The publication contains a conformance statement that it meets the EPUB Accessibility and WCAG 2 Level AAA standard" }, no: "No information is available", "unknown-standard": "Conformance to accepted standards for accessibility of this publication cannot be determined", certifier: "The publication was certified by ", "certifier-credentials": "The certifier's credential is ", details: { "certification-info": "The publication was certified on ", "certifier-report": "For more information refer to the certifier's report", claim: "This publication claims to meet", "epub-accessibility-1-0": "EPUB Accessibility 1.0", "epub-accessibility-1-1": "EPUB Accessibility 1.1", "level-a": "Level A", "level-aa": "Level AA", "level-aaa": "Level AAA", "wcag-2-0": { compact: "WCAG 2.0", descriptive: "Web Content Accessibility Guidelines (WCAG) 2.0" }, "wcag-2-1": { compact: "WCAG 2.1", descriptive: "Web Content Accessibility Guidelines (WCAG) 2.1" }, "wcag-2-2": { compact: "WCAG 2.2", descriptive: "Web Content Accessibility Guidelines (WCAG) 2.2" } } }, ei = { title: "Navigation", index: { compact: "Index", descriptive: "Index with links to referenced entries" }, "no-metadata": "No information is available", "page-navigation": { compact: "Go to page", descriptive: "Page list to go to pages from the print source version" }, structural: { compact: "Headings", descriptive: "Elements such as headings, tables, etc for structured navigation" }, toc: { compact: "Table of contents", descriptive: "Table of contents to all chapters of the text via links" } }, ii = { title: "Hazards", flashing: { compact: "Flashing content", descriptive: "The publication contains flashing content that can cause photosensitive seizures" }, "flashing-none": { compact: "No flashing hazards", descriptive: "The publication does not contain flashing content that can cause photosensitive seizures" }, "flashing-unknown": { compact: "Flashing hazards not known", descriptive: "The presence of flashing content that can cause photosensitive seizures could not be determined" }, motion: { compact: "Motion simulation", descriptive: "The publication contains motion simulations that can cause motion sickness" }, "motion-none": { compact: "No motion simulation hazards", descriptive: "The publication does not contain motion simulations that can cause motion sickness" }, "motion-unknown": { compact: "Motion simulation hazards not known", descriptive: "The presence of motion simulations that can cause motion sickness could not be determined" }, "no-metadata": "No information is available", none: { compact: "No hazards", descriptive: "The publication contains no hazards" }, sound: { compact: "Sounds", descriptive: "The publication contains sounds that can cause sensitivity issues" }, "sound-none": { compact: "No sound hazards", descriptive: "The publication does not contain sounds that can cause sensitivity issues" }, "sound-unknown": { compact: "Sound hazards not known", descriptive: "The presence of sounds that can cause sensitivity issues could not be determined" }, unknown: "The presence of hazards is unknown" }, ee = {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
"accessibility-summary": { title: "Informations d'accessibilité supplémentaires fournies par l'éditeur", "no-metadata": "Aucune information disponible", "publisher-contact": "Pour plus d'information à propos de l'accessibilité de cette publication, veuillez contacter l'éditeur : " },
|
|
329
|
-
"legal-considerations": { title: "Considérations légales", exempt: { compact: "Déclare être sous le coup d'une exemption dans certaines juridictions", descriptive: "Cette publication dééclare être sous le coup d'une exemption dans certaines juridictions" }, "no-metadata": "Aucune information disponible" },
|
|
330
|
-
"additional-accessibility-information": { title: "Informations complémentaires sur l'accessibilité", aria: { compact: "Information enrichie pour les technologies d'assistances", descriptive: "La structure est enrichi de rôles ARIA afin d'optimiser l'organisation et de faciliter la navigation via les technologies d'assistances" }, "audio-descriptions": "Description audio", braille: "Braille", "color-not-sole-means-of-conveying-information": "La couleur n'est pas la seule manière de communiquer de l'information", "dyslexia-readability": "Lisibilité adapté aux publics dys", "full-ruby-annotations": "Annotations complètes au format ruby (langues asiatiques)", "high-contrast-between-foreground-and-background-audio": "Contraste sonore amélioré entre les différents plans", "high-contrast-between-text-and-background": "Contraste élevé entre le texte et l'arrière-plan", "large-print": "Grands caractères", "page-breaks": { compact: "Pagination identique à l'imprimé", descriptive: "Contient une pagination identique à la version imprimée" }, "ruby-annotations": "Annotations partielles au format ruby (langues asiatiques)", "sign-language": "Langue des signes", "tactile-graphics": { compact: "Graphiques tactiles", descriptive: "Des graphiques tactiles ont été intégrés pour faciliter l'accès des personnes aveugles aux éléments visuels" }, "tactile-objects": "Objets 3D ou tactiles", "text-to-speech-hinting": "Prononciation améliorée pour la synthèse vocale", "ultra-high-contrast-between-text-and-background": "Contraste très élevé entre le texte et l'arrière-plan", "visible-page-numbering": "Numérotation de page visible", "without-background-sounds": "Aucun bruit de fond" }
|
|
331
|
-
};
|
|
332
|
-
class $ {
|
|
312
|
+
let xt = S;
|
|
313
|
+
const ee = ["en", "ar", "da", "fr", "it", "pt_PT", "sv"], ii = /* @__PURE__ */ JSON.parse(`{"format":{"audiobook":"Audiobook","audiobookJSON":"Audiobook Manifest","cbz":"Comic Book Archive","divina":"Divina Publication","divinaJSON":"Divina Publication Manifest","epub":"EPUB","lcpa":"LCP Protected Audiobook","lcpdf":"LCP Protected PDF","lcpl":"LCP License Document","pdf":"PDF","rwp":"Readium Web Publication","rwpm":"Readium Web Publication Manifest","zab":"Audiobook Archive","zip":"ZIP Archive"},"kind":{"audiobook_one":"audiobook","audiobook_other":"audiobooks","book_one":"book","book_other":"books","comic_one":"comic","comic_other":"comics","document_one":"document","document_other":"documents"},"metadata":{"accessibility":{"display-guide":{"accessibility-summary":{"no-metadata":"No information is available","publisher-contact":"For more information about the accessibility of this product, please contact the publisher: ","title":"Accessibility summary"},"additional-accessibility-information":{"aria":{"compact":"ARIA roles included","descriptive":"Content is enhanced with ARIA roles to optimize organization and facilitate navigation"},"audio-descriptions":"Audio descriptions","braille":"Braille","color-not-sole-means-of-conveying-information":"Color is not the sole means of conveying information","dyslexia-readability":"Dyslexia readability","full-ruby-annotations":"Full ruby annotations","high-contrast-between-foreground-and-background-audio":"High contrast between foreground and background audio","high-contrast-between-text-and-background":"High contrast between foreground text and background","large-print":"Large print","page-breaks":{"compact":"Page breaks included","descriptive":"Page breaks included from the original print source"},"ruby-annotations":"Some Ruby annotations","sign-language":"Sign language","tactile-graphics":{"compact":"Tactile graphics included","descriptive":"Tactile graphics have been integrated to facilitate access to visual elements for blind people"},"tactile-objects":"Tactile 3D objects","text-to-speech-hinting":"Text-to-speech hinting provided","title":"Additional accessibility information","ultra-high-contrast-between-text-and-background":"Ultra high contrast between text and background","visible-page-numbering":"Visible page numbering","without-background-sounds":"Without background sounds"},"conformance":{"a":{"compact":"This publication meets minimum accessibility standards","descriptive":"The publication contains a conformance statement that it meets the EPUB Accessibility and WCAG 2 Level A standard"},"aa":{"compact":"This publication meets accepted accessibility standards","descriptive":"The publication contains a conformance statement that it meets the EPUB Accessibility and WCAG 2 Level AA standard"},"aaa":{"compact":"This publication exceeds accepted accessibility standards","descriptive":"The publication contains a conformance statement that it meets the EPUB Accessibility and WCAG 2 Level AAA standard"},"certifier":"The publication was certified by ","certifier-credentials":"The certifier's credential is ","details":{"certification-info":"The publication was certified on ","certifier-report":"For more information refer to the certifier's report","claim":"This publication claims to meet","epub-accessibility-1-0":"EPUB Accessibility 1.0","epub-accessibility-1-1":"EPUB Accessibility 1.1","level-a":"Level A","level-aa":"Level AA","level-aaa":"Level AAA","wcag-2-0":{"compact":"WCAG 2.0","descriptive":"Web Content Accessibility Guidelines (WCAG) 2.0"},"wcag-2-1":{"compact":"WCAG 2.1","descriptive":"Web Content Accessibility Guidelines (WCAG) 2.1"},"wcag-2-2":{"compact":"WCAG 2.2","descriptive":"Web Content Accessibility Guidelines (WCAG) 2.2"}},"details-title":"Detailed conformance information","no":"No information is available","title":"Conformance","unknown-standard":"Conformance to accepted standards for accessibility of this publication cannot be determined"},"hazards":{"flashing":{"compact":"Flashing content","descriptive":"The publication contains flashing content that can cause photosensitive seizures"},"flashing-none":{"compact":"No flashing hazards","descriptive":"The publication does not contain flashing content that can cause photosensitive seizures"},"flashing-unknown":{"compact":"Flashing hazards not known","descriptive":"The presence of flashing content that can cause photosensitive seizures could not be determined"},"motion":{"compact":"Motion simulation","descriptive":"The publication contains motion simulations that can cause motion sickness"},"motion-none":{"compact":"No motion simulation hazards","descriptive":"The publication does not contain motion simulations that can cause motion sickness"},"motion-unknown":{"compact":"Motion simulation hazards not known","descriptive":"The presence of motion simulations that can cause motion sickness could not be determined"},"no-metadata":"No information is available","none":{"compact":"No hazards","descriptive":"The publication contains no hazards"},"sound":{"compact":"Sounds","descriptive":"The publication contains sounds that can cause sensitivity issues"},"sound-none":{"compact":"No sound hazards","descriptive":"The publication does not contain sounds that can cause sensitivity issues"},"sound-unknown":{"compact":"Sound hazards not known","descriptive":"The presence of sounds that can cause sensitivity issues could not be determined"},"title":"Hazards","unknown":"The presence of hazards is unknown"},"legal-considerations":{"exempt":{"compact":"Claims an accessibility exemption in some jurisdictions","descriptive":"This publication claims an accessibility exemption in some jurisdictions"},"no-metadata":"No information is available","title":"Legal considerations"},"navigation":{"index":{"compact":"Index","descriptive":"Index with links to referenced entries"},"no-metadata":"No information is available","page-navigation":{"compact":"Go to page","descriptive":"Page list to go to pages from the print source version"},"structural":{"compact":"Headings","descriptive":"Elements such as headings, tables, etc for structured navigation"},"title":"Navigation","toc":{"compact":"Table of contents","descriptive":"Table of contents to all chapters of the text via links"}},"rich-content":{"accessible-chemistry-as-latex":{"compact":"Chemical formulas in LaTeX","descriptive":"Chemical formulas in accessible format (LaTeX)"},"accessible-chemistry-as-mathml":{"compact":"Chemical formulas in MathML","descriptive":"Chemical formulas in accessible format (MathML)"},"accessible-math-as-latex":{"compact":"Math as LaTeX","descriptive":"Math formulas in accessible format (LaTeX)"},"accessible-math-described":"Text descriptions of math are provided","closed-captions":{"compact":"Videos have closed captions","descriptive":"Videos included in publications have closed captions"},"extended-descriptions":"Information-rich images are described by extended descriptions","math-as-mathml":{"compact":"Math as MathML","descriptive":"Math formulas in accessible format (MathML)"},"open-captions":{"compact":"Videos have open captions","descriptive":"Videos included in publications have open captions"},"title":"Rich content","transcript":"Transcript(s) provided","unknown":"No information is available"},"ways-of-reading":{"nonvisual-reading":{"alt-text":{"compact":"Has alternative text","descriptive":"Has alternative text descriptions for images"},"no-metadata":"No information about nonvisual reading is available","none":{"compact":"Not readable in read aloud or dynamic braille","descriptive":"The content is not readable as read aloud speech or dynamic braille"},"not-fully":{"compact":"Not fully readable in read aloud or dynamic braille","descriptive":"Not all of the content will be readable as read aloud speech or dynamic braille"},"readable":{"compact":"Readable in read aloud or dynamic braille","descriptive":"All content can be read as read aloud speech or dynamic braille"}},"prerecorded-audio":{"complementary":{"compact":"Prerecorded audio clips","descriptive":"Prerecorded audio clips are embedded in the content"},"no-metadata":"No information about prerecorded audio is available","only":{"compact":"Prerecorded audio only","descriptive":"Audiobook with no text alternative"},"synchronized":{"compact":"Prerecorded audio synchronized with text","descriptive":"All the content is available as prerecorded audio synchronized with text"}},"title":"Ways of reading","visual-adjustments":{"modifiable":{"compact":"Appearance can be modified","descriptive":"Appearance of the text and page layout can be modified according to the capabilities of the reading system (font family and font size, spaces between paragraphs, sentences, words, and letters, as well as color of background and text)"},"unknown":"No information about appearance modifiability is available","unmodifiable":{"compact":"Appearance cannot be modified","descriptive":"Text and page layout cannot be modified as the reading experience is close to a print version, but reading systems can still provide zooming options"}}}}},"altIdentifier_one":"alternate identifier","altIdentifier_other":"alternate identifiers","artist_one":"artist","artist_other":"artists","author_one":"author","author_other":"authors","collection_one":"editorial collection","collection_other":"editorial collections","colorist_one":"colorist","colorist_other":"colorists","contributor_one":"contributor","contributor_other":"contributors","description":"description","duration":"duration","editor_one":"editor","editor_other":"editors","identifier_one":"identifier","identifier_other":"identifiers","illustrator_one":"illustrator","illustrator_other":"illustrators","imprint_one":"imprint","imprint_other":"imprints","inker_one":"inker","inker_other":"inkers","language_one":"language","language_other":"languages","letterer_one":"letterer","letterer_other":"letterers","modified":"modification date","narrator_one":"narrator","narrator_other":"narrators","numberOfPages":"print length","penciler_one":"penciler","penciler_other":"pencilers","published":"publication date","publisher_one":"publisher","publisher_other":"publishers","series_one":"series","series_other":"series","subject_one":"subject","subject_other":"subjects","subtitle":"subtitle","title":"title","translator_one":"translator","translator_other":"translators"}}`), si = {
|
|
314
|
+
publication: ii
|
|
315
|
+
}, ie = {
|
|
316
|
+
fr: () => import("./fr-C5HEel98.js"),
|
|
317
|
+
ar: () => import("./ar-DyHX_uy2.js"),
|
|
318
|
+
da: () => import("./da-Dct0PS3E.js"),
|
|
319
|
+
// 'el': () => import('@edrlab/thorium-locales/publication-metadata/el.json'),
|
|
320
|
+
// 'et': () => import('@edrlab/thorium-locales/publication-metadata/et.json'),
|
|
321
|
+
it: () => import("./it-DFOBoXGy.js"),
|
|
322
|
+
pt_PT: () => import("./pt_PT-Di3sVjze.js"),
|
|
323
|
+
sv: () => import("./sv-BfzAFsVN.js")
|
|
324
|
+
// 'tr': () => import('@edrlab/thorium-locales/publication-metadata/tr.json'),
|
|
325
|
+
// 'uk': () => import('@edrlab/thorium-locales/publication-metadata/uk.json')
|
|
326
|
+
}, se = si?.publication?.metadata?.accessibility?.["display-guide"] || {};
|
|
327
|
+
class Y {
|
|
333
328
|
constructor() {
|
|
334
|
-
this.currentLocaleCode = "en", this.locale =
|
|
335
|
-
en: ee,
|
|
336
|
-
fr: ai
|
|
337
|
-
};
|
|
329
|
+
this.currentLocaleCode = "en", this.locale = se, this.loadedLocales = {}, this.loadedLocales.en = se;
|
|
338
330
|
}
|
|
339
331
|
static getInstance() {
|
|
340
|
-
return
|
|
332
|
+
return Y.instance || (Y.instance = new Y()), Y.instance;
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* Loads a locale dynamically
|
|
336
|
+
* @param localeCode BCP 47 language code (e.g., 'en', 'fr')
|
|
337
|
+
* @returns Promise indicating if the locale was loaded successfully
|
|
338
|
+
*/
|
|
339
|
+
async loadLocale(t) {
|
|
340
|
+
if (!ee.includes(t))
|
|
341
|
+
return console.warn(`Locale '${t}' is not enabled`), !1;
|
|
342
|
+
if (t in this.loadedLocales)
|
|
343
|
+
return !0;
|
|
344
|
+
try {
|
|
345
|
+
if (!(t in ie))
|
|
346
|
+
return console.warn(`Locale file not found for: ${t}`), !1;
|
|
347
|
+
const r = (await ie[t]()).default?.publication?.metadata?.accessibility?.["display-guide"];
|
|
348
|
+
return r ? (this.loadedLocales[t] = r, !0) : (console.warn(`No accessibility strings found in locale ${t}`), !1);
|
|
349
|
+
} catch (e) {
|
|
350
|
+
return console.warn(`Failed to load locale ${t}:`, e), !1;
|
|
351
|
+
}
|
|
341
352
|
}
|
|
342
353
|
/**
|
|
343
354
|
* Registers a new locale or updates an existing one
|
|
@@ -347,15 +358,15 @@ class $ {
|
|
|
347
358
|
registerLocale(t, e) {
|
|
348
359
|
if (!t || typeof t != "string")
|
|
349
360
|
throw new Error("Locale code must be a non-empty string");
|
|
350
|
-
this.
|
|
361
|
+
this.loadedLocales[t] = e;
|
|
351
362
|
}
|
|
352
363
|
/**
|
|
353
|
-
* Sets the current locale by language code
|
|
354
|
-
* @param localeCode BCP 47 language code (e.g., 'en', 'fr
|
|
355
|
-
* @returns
|
|
364
|
+
* Sets the current locale by language code, loading it dynamically if needed
|
|
365
|
+
* @param localeCode BCP 47 language code (e.g., 'en', 'fr')
|
|
366
|
+
* @returns Promise indicating if the locale was set successfully
|
|
356
367
|
*/
|
|
357
|
-
setLocale(t) {
|
|
358
|
-
return t in this.
|
|
368
|
+
async setLocale(t) {
|
|
369
|
+
return t in this.loadedLocales || await this.loadLocale(t), t in this.loadedLocales ? (this.locale = this.loadedLocales[t], this.currentLocaleCode = t, !0) : (console.warn(`Locale '${t}' is not available`), !1);
|
|
359
370
|
}
|
|
360
371
|
/**
|
|
361
372
|
* Gets the current locale code (BCP 47)
|
|
@@ -367,17 +378,17 @@ class $ {
|
|
|
367
378
|
* Gets a list of available locale codes
|
|
368
379
|
*/
|
|
369
380
|
getAvailableLocales() {
|
|
370
|
-
return
|
|
381
|
+
return ee;
|
|
371
382
|
}
|
|
372
383
|
getNestedValue(t, e) {
|
|
373
384
|
const i = e.split(".");
|
|
374
|
-
let
|
|
375
|
-
for (const
|
|
376
|
-
if (
|
|
385
|
+
let r = t;
|
|
386
|
+
for (const n of i) {
|
|
387
|
+
if (r == null)
|
|
377
388
|
return;
|
|
378
|
-
|
|
389
|
+
r = r[n];
|
|
379
390
|
}
|
|
380
|
-
return
|
|
391
|
+
return r;
|
|
381
392
|
}
|
|
382
393
|
/**
|
|
383
394
|
* Gets a localized string by key
|
|
@@ -386,79 +397,79 @@ class $ {
|
|
|
386
397
|
*/
|
|
387
398
|
getString(t) {
|
|
388
399
|
let e = this.getNestedValue(this.locale, t);
|
|
389
|
-
return e === void 0 && this.currentLocaleCode !== "en" && (e = this.getNestedValue(this.
|
|
400
|
+
return e === void 0 && this.currentLocaleCode !== "en" && (e = this.getNestedValue(this.loadedLocales.en, t)), e !== void 0 ? typeof e == "string" ? { compact: e, descriptive: e } : e : (console.warn(`Missing localization for key: ${t}`), { compact: "", descriptive: "" });
|
|
390
401
|
}
|
|
391
402
|
}
|
|
392
|
-
const
|
|
393
|
-
var
|
|
403
|
+
const f = Y.getInstance();
|
|
404
|
+
var $ = /* @__PURE__ */ ((s) => (s.reflowable = "reflowable", s.fixed = "fixed", s.scrolled = "scrolled", s))($ || {}), ri = /* @__PURE__ */ ((s) => (s.Unknown = "unknown", s.Modifiable = "modifiable", s.Unmodifiable = "unmodifiable", s))(ri || {}), ni = /* @__PURE__ */ ((s) => (s.NoMetadata = "noMetadata", s.Readable = "readable", s.NotFully = "notFully", s.Unreadable = "unreadable", s))(ni || {}), ai = /* @__PURE__ */ ((s) => (s.NoMetadata = "noMetadata", s.Synchronized = "synchronized", s.AudioOnly = "audioOnly", s.AudioComplementary = "audioComplementary", s))(ai || {});
|
|
394
405
|
class kt {
|
|
395
|
-
constructor(t = "unknown", e = "noMetadata", i = !1,
|
|
396
|
-
this.id = "ways-of-reading.title", this.visualAdjustments = t, this.nonvisualReading = e, this.nonvisualReadingAltText = i, this.prerecordedAudio =
|
|
397
|
-
const
|
|
398
|
-
this.title =
|
|
399
|
-
const a = t === "modifiable" ? "ways-of-reading.visual-adjustments.modifiable" : t === "unmodifiable" ? "ways-of-reading.visual-adjustments.unmodifiable" : "ways-of-reading.visual-adjustments.unknown", o =
|
|
406
|
+
constructor(t = "unknown", e = "noMetadata", i = !1, r = "noMetadata") {
|
|
407
|
+
this.id = "ways-of-reading.title", this.visualAdjustments = t, this.nonvisualReading = e, this.nonvisualReadingAltText = i, this.prerecordedAudio = r, this.shouldDisplay = !0;
|
|
408
|
+
const n = f.getString(this.id);
|
|
409
|
+
this.title = n.compact, this.statements = [];
|
|
410
|
+
const a = t === "modifiable" ? "ways-of-reading.visual-adjustments.modifiable" : t === "unmodifiable" ? "ways-of-reading.visual-adjustments.unmodifiable" : "ways-of-reading.visual-adjustments.unknown", o = f.getString(a);
|
|
400
411
|
this.statements.push({
|
|
401
412
|
id: a,
|
|
402
413
|
compactString: o.compact,
|
|
403
414
|
descriptiveString: o.descriptive
|
|
404
415
|
});
|
|
405
|
-
let
|
|
406
|
-
e === "readable" ?
|
|
407
|
-
const m =
|
|
416
|
+
let h = "";
|
|
417
|
+
e === "readable" ? h = "ways-of-reading.nonvisual-reading.readable" : e === "notFully" ? h = "ways-of-reading.nonvisual-reading.not-fully" : e === "unreadable" ? h = "ways-of-reading.nonvisual-reading.none" : e === "noMetadata" && (h = "ways-of-reading.nonvisual-reading.no-metadata");
|
|
418
|
+
const m = f.getString(h);
|
|
408
419
|
if (this.statements.push({
|
|
409
|
-
id:
|
|
420
|
+
id: h,
|
|
410
421
|
compactString: m.compact,
|
|
411
422
|
descriptiveString: m.descriptive
|
|
412
423
|
}), i) {
|
|
413
|
-
const g =
|
|
424
|
+
const g = f.getString("ways-of-reading.nonvisual-reading.alt-text");
|
|
414
425
|
this.statements.push({
|
|
415
426
|
id: "ways-of-reading.nonvisual-reading.alt-text",
|
|
416
427
|
compactString: g.compact,
|
|
417
428
|
descriptiveString: g.descriptive
|
|
418
429
|
});
|
|
419
430
|
}
|
|
420
|
-
let
|
|
421
|
-
|
|
422
|
-
const
|
|
431
|
+
let p = "";
|
|
432
|
+
r === "synchronized" ? p = "ways-of-reading.prerecorded-audio.synchronized" : r === "audioOnly" ? p = "ways-of-reading.prerecorded-audio.only" : r === "audioComplementary" ? p = "ways-of-reading.prerecorded-audio.complementary" : r === "noMetadata" && (p = "ways-of-reading.prerecorded-audio.no-metadata");
|
|
433
|
+
const u = f.getString(p);
|
|
423
434
|
this.statements.push({
|
|
424
|
-
id:
|
|
425
|
-
compactString:
|
|
426
|
-
descriptiveString:
|
|
435
|
+
id: p,
|
|
436
|
+
compactString: u.compact,
|
|
437
|
+
descriptiveString: u.descriptive
|
|
427
438
|
});
|
|
428
439
|
}
|
|
429
440
|
static fromPublication(t) {
|
|
430
|
-
const e = t.metadata.accessibility ?? new
|
|
431
|
-
const
|
|
432
|
-
return Array.isArray(
|
|
433
|
-
}), m = a.some((d) => d.value ===
|
|
434
|
-
const
|
|
435
|
-
return Array.isArray(
|
|
436
|
-
}),
|
|
437
|
-
const
|
|
438
|
-
return Array.isArray(
|
|
439
|
-
}),
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
].includes(d.value)), g =
|
|
445
|
-
const
|
|
446
|
-
return Array.isArray(
|
|
447
|
-
}) ? "audioOnly" : a.some((d) => d.value ===
|
|
441
|
+
const e = t.metadata.accessibility ?? new _(), i = e.feature ?? [], r = t.metadata.layout === $.fixed, n = i.some((d) => d.value === A.DISPLAY_TRANSFORMABILITY.value) ? "modifiable" : r ? "unmodifiable" : "unknown", a = e.accessMode ?? [], o = e.accessModeSufficient ?? [], h = a.length > 0 && a.every((d) => d.value === R.TEXTUAL.value) || o.some((d) => {
|
|
442
|
+
const I = d.value;
|
|
443
|
+
return Array.isArray(I) ? I.every((B) => B === R.TEXTUAL.value) : I === R.TEXTUAL.value;
|
|
444
|
+
}), m = a.some((d) => d.value === R.TEXTUAL.value) || o.some((d) => {
|
|
445
|
+
const I = d.value;
|
|
446
|
+
return Array.isArray(I) ? I.some((B) => B === R.TEXTUAL.value) : I === R.TEXTUAL.value;
|
|
447
|
+
}), p = !(a.length === 0 && o.length === 0) && !a.some((d) => d.value === R.TEXTUAL.value) && !o.some((d) => {
|
|
448
|
+
const I = d.value;
|
|
449
|
+
return Array.isArray(I) ? I.some((B) => B === R.TEXTUAL.value) : I === R.TEXTUAL.value;
|
|
450
|
+
}), u = i.some((d) => [
|
|
451
|
+
A.LONG_DESCRIPTION.value,
|
|
452
|
+
A.ALTERNATIVE_TEXT.value,
|
|
453
|
+
A.DESCRIBED_MATH.value,
|
|
454
|
+
A.TRANSCRIPT.value
|
|
455
|
+
].includes(d.value)), g = h ? "readable" : m || u ? "notFully" : p ? "unreadable" : "noMetadata", v = u, C = i.some((d) => d.value === A.SYNCHRONIZED_AUDIO_TEXT.value) ? "synchronized" : o.some((d) => {
|
|
456
|
+
const I = d.value;
|
|
457
|
+
return Array.isArray(I) ? I.some((B) => B === R.AUDITORY.value) : I === R.AUDITORY.value;
|
|
458
|
+
}) ? "audioOnly" : a.some((d) => d.value === R.AUDITORY.value) ? "audioComplementary" : "noMetadata";
|
|
448
459
|
return new kt(
|
|
449
|
-
|
|
460
|
+
n,
|
|
450
461
|
g,
|
|
451
|
-
|
|
452
|
-
|
|
462
|
+
v,
|
|
463
|
+
C
|
|
453
464
|
);
|
|
454
465
|
}
|
|
455
466
|
}
|
|
456
467
|
class Dt {
|
|
457
|
-
constructor(t = !1, e = !1, i = !1,
|
|
458
|
-
this.id = "navigation.title", this.tableOfContents = t, this.index = e, this.headings = i, this.page =
|
|
459
|
-
const
|
|
460
|
-
if (this.title =
|
|
461
|
-
const a =
|
|
468
|
+
constructor(t = !1, e = !1, i = !1, r = !1) {
|
|
469
|
+
this.id = "navigation.title", this.tableOfContents = t, this.index = e, this.headings = i, this.page = r, this.noMetadata = !t && !e && !i && !r;
|
|
470
|
+
const n = f.getString(this.id);
|
|
471
|
+
if (this.title = n.compact, this.shouldDisplay = !this.noMetadata, this.statements = [], t) {
|
|
472
|
+
const a = f.getString("navigation.toc");
|
|
462
473
|
this.statements.push({
|
|
463
474
|
id: "navigation.toc",
|
|
464
475
|
compactString: a.compact,
|
|
@@ -466,7 +477,7 @@ class Dt {
|
|
|
466
477
|
});
|
|
467
478
|
}
|
|
468
479
|
if (e) {
|
|
469
|
-
const a =
|
|
480
|
+
const a = f.getString("navigation.index");
|
|
470
481
|
this.statements.push({
|
|
471
482
|
id: "navigation.index",
|
|
472
483
|
compactString: a.compact,
|
|
@@ -474,15 +485,15 @@ class Dt {
|
|
|
474
485
|
});
|
|
475
486
|
}
|
|
476
487
|
if (i) {
|
|
477
|
-
const a =
|
|
488
|
+
const a = f.getString("navigation.structural");
|
|
478
489
|
this.statements.push({
|
|
479
490
|
id: "navigation.structural",
|
|
480
491
|
compactString: a.compact,
|
|
481
492
|
descriptiveString: a.descriptive
|
|
482
493
|
});
|
|
483
494
|
}
|
|
484
|
-
if (
|
|
485
|
-
const a =
|
|
495
|
+
if (r) {
|
|
496
|
+
const a = f.getString("navigation.page-navigation");
|
|
486
497
|
this.statements.push({
|
|
487
498
|
id: "navigation.page-navigation",
|
|
488
499
|
compactString: a.compact,
|
|
@@ -490,7 +501,7 @@ class Dt {
|
|
|
490
501
|
});
|
|
491
502
|
}
|
|
492
503
|
if (this.statements.length === 0) {
|
|
493
|
-
const a =
|
|
504
|
+
const a = f.getString("navigation.no-metadata");
|
|
494
505
|
this.statements.push({
|
|
495
506
|
id: "navigation.no-metadata",
|
|
496
507
|
compactString: a.compact,
|
|
@@ -499,122 +510,122 @@ class Dt {
|
|
|
499
510
|
}
|
|
500
511
|
}
|
|
501
512
|
static fromPublication(t) {
|
|
502
|
-
const i = (t.metadata.accessibility ?? new
|
|
513
|
+
const i = (t.metadata.accessibility ?? new _()).feature ?? [];
|
|
503
514
|
return new Dt(
|
|
504
|
-
i.some((
|
|
505
|
-
i.some((
|
|
506
|
-
i.some((
|
|
507
|
-
i.some((
|
|
515
|
+
i.some((r) => r.value === A.TABLE_OF_CONTENTS.value),
|
|
516
|
+
i.some((r) => r.value === A.INDEX.value),
|
|
517
|
+
i.some((r) => r.value === A.STRUCTURAL_NAVIGATION.value),
|
|
518
|
+
i.some((r) => r.value === A.PAGE_NAVIGATION.value)
|
|
508
519
|
);
|
|
509
520
|
}
|
|
510
521
|
}
|
|
511
|
-
var
|
|
522
|
+
var oi = /* @__PURE__ */ ((s) => (s.Math = "math", s.Chemistry = "chemistry", s.Music = "music", s.Diagram = "diagram", s.Chart = "chart", s.Graph = "graph", s.Table = "table", s.Image = "image", s))(oi || {});
|
|
512
523
|
class Ut {
|
|
513
|
-
constructor(t = !1, e = !1, i = !1,
|
|
514
|
-
this.id = "rich-content.title", this.extendedAltTextDescriptions = t, this.mathFormula = e, this.mathFormulaAsMathML = i, this.mathFormulaAsLaTeX =
|
|
515
|
-
const
|
|
516
|
-
if (this.title =
|
|
517
|
-
const
|
|
524
|
+
constructor(t = !1, e = !1, i = !1, r = !1, n = !1, a = !1, o = !1, h = !1, m = !1) {
|
|
525
|
+
this.id = "rich-content.title", this.extendedAltTextDescriptions = t, this.mathFormula = e, this.mathFormulaAsMathML = i, this.mathFormulaAsLaTeX = r, this.chemicalFormulaAsMathML = n, this.chemicalFormulaAsLaTeX = a, this.closedCaptions = o, this.openCaptions = h, this.transcript = m, this.noMetadata = !t && !e && !i && !r && !n && !a && !o && !h && !m, this.shouldDisplay = !this.noMetadata;
|
|
526
|
+
const p = f.getString(this.id);
|
|
527
|
+
if (this.title = p.compact, this.statements = [], t) {
|
|
528
|
+
const u = f.getString("rich-content.extended-descriptions");
|
|
518
529
|
this.statements.push({
|
|
519
530
|
id: "rich-content.extended-descriptions",
|
|
520
|
-
compactString:
|
|
521
|
-
descriptiveString:
|
|
531
|
+
compactString: u.compact,
|
|
532
|
+
descriptiveString: u.descriptive
|
|
522
533
|
});
|
|
523
534
|
}
|
|
524
535
|
if (e) {
|
|
525
|
-
const
|
|
536
|
+
const u = f.getString("rich-content.accessible-math-described");
|
|
526
537
|
this.statements.push({
|
|
527
538
|
id: "rich-content.accessible-math-described",
|
|
528
|
-
compactString:
|
|
529
|
-
descriptiveString:
|
|
539
|
+
compactString: u.compact,
|
|
540
|
+
descriptiveString: u.descriptive
|
|
530
541
|
});
|
|
531
542
|
}
|
|
532
543
|
if (i) {
|
|
533
|
-
const
|
|
544
|
+
const u = f.getString("rich-content.math-as-mathml");
|
|
534
545
|
this.statements.push({
|
|
535
546
|
id: "rich-content.math-as-mathml",
|
|
536
|
-
compactString:
|
|
537
|
-
descriptiveString:
|
|
547
|
+
compactString: u.compact,
|
|
548
|
+
descriptiveString: u.descriptive
|
|
538
549
|
});
|
|
539
550
|
}
|
|
540
|
-
if (
|
|
541
|
-
const
|
|
551
|
+
if (r) {
|
|
552
|
+
const u = f.getString("rich-content.accessible-math-as-latex");
|
|
542
553
|
this.statements.push({
|
|
543
554
|
id: "rich-content.accessible-math-as-latex",
|
|
544
|
-
compactString:
|
|
545
|
-
descriptiveString:
|
|
555
|
+
compactString: u.compact,
|
|
556
|
+
descriptiveString: u.descriptive
|
|
546
557
|
});
|
|
547
558
|
}
|
|
548
|
-
if (
|
|
549
|
-
const
|
|
559
|
+
if (n) {
|
|
560
|
+
const u = f.getString("rich-content.accessible-chemistry-as-mathml");
|
|
550
561
|
this.statements.push({
|
|
551
562
|
id: "rich-content.accessible-chemistry-as-mathml",
|
|
552
|
-
compactString:
|
|
553
|
-
descriptiveString:
|
|
563
|
+
compactString: u.compact,
|
|
564
|
+
descriptiveString: u.descriptive
|
|
554
565
|
});
|
|
555
566
|
}
|
|
556
567
|
if (a) {
|
|
557
|
-
const
|
|
568
|
+
const u = f.getString("rich-content.accessible-chemistry-as-latex");
|
|
558
569
|
this.statements.push({
|
|
559
570
|
id: "rich-content.accessible-chemistry-as-latex",
|
|
560
|
-
compactString:
|
|
561
|
-
descriptiveString:
|
|
571
|
+
compactString: u.compact,
|
|
572
|
+
descriptiveString: u.descriptive
|
|
562
573
|
});
|
|
563
574
|
}
|
|
564
575
|
if (o) {
|
|
565
|
-
const
|
|
576
|
+
const u = f.getString("rich-content.closed-captions");
|
|
566
577
|
this.statements.push({
|
|
567
578
|
id: "rich-content.closed-captions",
|
|
568
|
-
compactString:
|
|
569
|
-
descriptiveString:
|
|
579
|
+
compactString: u.compact,
|
|
580
|
+
descriptiveString: u.descriptive
|
|
570
581
|
});
|
|
571
582
|
}
|
|
572
|
-
if (
|
|
573
|
-
const
|
|
583
|
+
if (h) {
|
|
584
|
+
const u = f.getString("rich-content.open-captions");
|
|
574
585
|
this.statements.push({
|
|
575
586
|
id: "rich-content.open-captions",
|
|
576
|
-
compactString:
|
|
577
|
-
descriptiveString:
|
|
587
|
+
compactString: u.compact,
|
|
588
|
+
descriptiveString: u.descriptive
|
|
578
589
|
});
|
|
579
590
|
}
|
|
580
591
|
if (m) {
|
|
581
|
-
const
|
|
592
|
+
const u = f.getString("rich-content.transcript");
|
|
582
593
|
this.statements.push({
|
|
583
594
|
id: "rich-content.transcript",
|
|
584
|
-
compactString:
|
|
585
|
-
descriptiveString:
|
|
595
|
+
compactString: u.compact,
|
|
596
|
+
descriptiveString: u.descriptive
|
|
586
597
|
});
|
|
587
598
|
}
|
|
588
599
|
if (this.statements.length === 0) {
|
|
589
|
-
const
|
|
600
|
+
const u = f.getString("rich-content.unknown");
|
|
590
601
|
this.statements.push({
|
|
591
602
|
id: "rich-content.unknown",
|
|
592
|
-
compactString:
|
|
593
|
-
descriptiveString:
|
|
603
|
+
compactString: u.compact,
|
|
604
|
+
descriptiveString: u.descriptive
|
|
594
605
|
});
|
|
595
606
|
}
|
|
596
607
|
}
|
|
597
608
|
static fromPublication(t) {
|
|
598
|
-
const i = (t.metadata.accessibility ?? new
|
|
609
|
+
const i = (t.metadata.accessibility ?? new _()).feature ?? [];
|
|
599
610
|
return new Ut(
|
|
600
|
-
i.some((
|
|
601
|
-
i.some((
|
|
602
|
-
i.some((
|
|
603
|
-
i.some((
|
|
604
|
-
i.some((
|
|
605
|
-
i.some((
|
|
606
|
-
i.some((
|
|
607
|
-
i.some((
|
|
608
|
-
i.some((
|
|
611
|
+
i.some((r) => r.value === A.LONG_DESCRIPTION.value),
|
|
612
|
+
i.some((r) => r.value === A.DESCRIBED_MATH.value),
|
|
613
|
+
i.some((r) => r.value === A.MATH_ML.value),
|
|
614
|
+
i.some((r) => r.value === A.LATEX.value),
|
|
615
|
+
i.some((r) => r.value === A.MATH_ML_CHEMISTRY.value),
|
|
616
|
+
i.some((r) => r.value === A.LATEX_CHEMISTRY.value),
|
|
617
|
+
i.some((r) => r.value === A.CLOSED_CAPTIONS.value),
|
|
618
|
+
i.some((r) => r.value === A.OPEN_CAPTIONS.value),
|
|
619
|
+
i.some((r) => r.value === A.TRANSCRIPT.value)
|
|
609
620
|
);
|
|
610
621
|
}
|
|
611
622
|
}
|
|
612
623
|
class Mt {
|
|
613
|
-
constructor(t = !1, e = !1, i = !1,
|
|
614
|
-
this.id = "additional-accessibility-information.title", this.pageBreakMarkers = t, this.aria = e, this.audioDescriptions = i, this.braille =
|
|
615
|
-
const
|
|
616
|
-
if (this.title =
|
|
617
|
-
const d =
|
|
624
|
+
constructor(t = !1, e = !1, i = !1, r = !1, n = !1, a = !1, o = !1, h = !1, m = !1, p = !1, u = !1, g = !1, v = !1) {
|
|
625
|
+
this.id = "additional-accessibility-information.title", this.pageBreakMarkers = t, this.aria = e, this.audioDescriptions = i, this.braille = r, this.rubyAnnotations = n, this.fullRubyAnnotations = a, this.highAudioContrast = o, this.highDisplayContrast = h, this.largePrint = m, this.signLanguage = p, this.tactileGraphics = u, this.tactileObjects = g, this.textToSpeechHinting = v, this.noMetadata = !t && !e && !i && !r && !n && !a && !o && !h && !m && !p && !u && !g && !v, this.shouldDisplay = !this.noMetadata;
|
|
626
|
+
const C = f.getString(this.id);
|
|
627
|
+
if (this.title = C.compact, this.statements = [], t) {
|
|
628
|
+
const d = f.getString("additional-accessibility-information.page-breaks");
|
|
618
629
|
this.statements.push({
|
|
619
630
|
id: "additional-accessibility-information.page-breaks",
|
|
620
631
|
compactString: d.compact,
|
|
@@ -622,7 +633,7 @@ class Mt {
|
|
|
622
633
|
});
|
|
623
634
|
}
|
|
624
635
|
if (e) {
|
|
625
|
-
const d =
|
|
636
|
+
const d = f.getString("additional-accessibility-information.aria");
|
|
626
637
|
this.statements.push({
|
|
627
638
|
id: "additional-accessibility-information.aria",
|
|
628
639
|
compactString: d.compact,
|
|
@@ -630,23 +641,23 @@ class Mt {
|
|
|
630
641
|
});
|
|
631
642
|
}
|
|
632
643
|
if (i) {
|
|
633
|
-
const d =
|
|
644
|
+
const d = f.getString("additional-accessibility-information.audio-descriptions");
|
|
634
645
|
this.statements.push({
|
|
635
646
|
id: "additional-accessibility-information.audio-descriptions",
|
|
636
647
|
compactString: d.compact,
|
|
637
648
|
descriptiveString: d.descriptive
|
|
638
649
|
});
|
|
639
650
|
}
|
|
640
|
-
if (
|
|
641
|
-
const d =
|
|
651
|
+
if (r) {
|
|
652
|
+
const d = f.getString("additional-accessibility-information.braille");
|
|
642
653
|
this.statements.push({
|
|
643
654
|
id: "additional-accessibility-information.braille",
|
|
644
655
|
compactString: d.compact,
|
|
645
656
|
descriptiveString: d.descriptive
|
|
646
657
|
});
|
|
647
658
|
}
|
|
648
|
-
if (
|
|
649
|
-
const d =
|
|
659
|
+
if (n) {
|
|
660
|
+
const d = f.getString("additional-accessibility-information.ruby-annotations");
|
|
650
661
|
this.statements.push({
|
|
651
662
|
id: "additional-accessibility-information.ruby-annotations",
|
|
652
663
|
compactString: d.compact,
|
|
@@ -654,7 +665,7 @@ class Mt {
|
|
|
654
665
|
});
|
|
655
666
|
}
|
|
656
667
|
if (a) {
|
|
657
|
-
const d =
|
|
668
|
+
const d = f.getString("additional-accessibility-information.full-ruby-annotations");
|
|
658
669
|
this.statements.push({
|
|
659
670
|
id: "additional-accessibility-information.full-ruby-annotations",
|
|
660
671
|
compactString: d.compact,
|
|
@@ -662,15 +673,15 @@ class Mt {
|
|
|
662
673
|
});
|
|
663
674
|
}
|
|
664
675
|
if (o) {
|
|
665
|
-
const d =
|
|
676
|
+
const d = f.getString("additional-accessibility-information.high-contrast-between-foreground-and-background-audio");
|
|
666
677
|
this.statements.push({
|
|
667
678
|
id: "additional-accessibility-information.high-contrast-between-foreground-and-background-audio",
|
|
668
679
|
compactString: d.compact,
|
|
669
680
|
descriptiveString: d.descriptive
|
|
670
681
|
});
|
|
671
682
|
}
|
|
672
|
-
if (
|
|
673
|
-
const d =
|
|
683
|
+
if (h) {
|
|
684
|
+
const d = f.getString("additional-accessibility-information.high-contrast-between-text-and-background");
|
|
674
685
|
this.statements.push({
|
|
675
686
|
id: "additional-accessibility-information.high-contrast-between-text-and-background",
|
|
676
687
|
compactString: d.compact,
|
|
@@ -678,23 +689,23 @@ class Mt {
|
|
|
678
689
|
});
|
|
679
690
|
}
|
|
680
691
|
if (m) {
|
|
681
|
-
const d =
|
|
692
|
+
const d = f.getString("additional-accessibility-information.large-print");
|
|
682
693
|
this.statements.push({
|
|
683
694
|
id: "additional-accessibility-information.large-print",
|
|
684
695
|
compactString: d.compact,
|
|
685
696
|
descriptiveString: d.descriptive
|
|
686
697
|
});
|
|
687
698
|
}
|
|
688
|
-
if (
|
|
689
|
-
const d =
|
|
699
|
+
if (p) {
|
|
700
|
+
const d = f.getString("additional-accessibility-information.sign-language");
|
|
690
701
|
this.statements.push({
|
|
691
702
|
id: "additional-accessibility-information.sign-language",
|
|
692
703
|
compactString: d.compact,
|
|
693
704
|
descriptiveString: d.descriptive
|
|
694
705
|
});
|
|
695
706
|
}
|
|
696
|
-
if (
|
|
697
|
-
const d =
|
|
707
|
+
if (u) {
|
|
708
|
+
const d = f.getString("additional-accessibility-information.tactile-graphics");
|
|
698
709
|
this.statements.push({
|
|
699
710
|
id: "additional-accessibility-information.tactile-graphics",
|
|
700
711
|
compactString: d.compact,
|
|
@@ -702,15 +713,15 @@ class Mt {
|
|
|
702
713
|
});
|
|
703
714
|
}
|
|
704
715
|
if (g) {
|
|
705
|
-
const d =
|
|
716
|
+
const d = f.getString("additional-accessibility-information.tactile-objects");
|
|
706
717
|
this.statements.push({
|
|
707
718
|
id: "additional-accessibility-information.tactile-objects",
|
|
708
719
|
compactString: d.compact,
|
|
709
720
|
descriptiveString: d.descriptive
|
|
710
721
|
});
|
|
711
722
|
}
|
|
712
|
-
if (
|
|
713
|
-
const d =
|
|
723
|
+
if (v) {
|
|
724
|
+
const d = f.getString("additional-accessibility-information.text-to-speech-hinting");
|
|
714
725
|
this.statements.push({
|
|
715
726
|
id: "additional-accessibility-information.text-to-speech-hinting",
|
|
716
727
|
compactString: d.compact,
|
|
@@ -719,115 +730,115 @@ class Mt {
|
|
|
719
730
|
}
|
|
720
731
|
}
|
|
721
732
|
static fromPublication(t) {
|
|
722
|
-
const i = (t.metadata.accessibility ?? new
|
|
733
|
+
const i = (t.metadata.accessibility ?? new _()).feature ?? [];
|
|
723
734
|
return new Mt(
|
|
724
|
-
i.some((
|
|
725
|
-
i.some((
|
|
726
|
-
i.some((
|
|
727
|
-
i.some((
|
|
728
|
-
i.some((
|
|
729
|
-
i.some((
|
|
730
|
-
i.some((
|
|
731
|
-
i.some((
|
|
732
|
-
i.some((
|
|
733
|
-
i.some((
|
|
734
|
-
i.some((
|
|
735
|
-
i.some((
|
|
736
|
-
i.some((
|
|
735
|
+
i.some((r) => r.value === A.PAGE_BREAK_MARKERS.value || r.value === A.PRINT_PAGE_NUMBERS.value),
|
|
736
|
+
i.some((r) => r.value === A.ARIA.value),
|
|
737
|
+
i.some((r) => r.value === A.AUDIO_DESCRIPTION.value),
|
|
738
|
+
i.some((r) => r.value === A.BRAILLE.value),
|
|
739
|
+
i.some((r) => r.value === A.RUBY_ANNOTATIONS.value),
|
|
740
|
+
i.some((r) => r.value === A.FULL_RUBY_ANNOTATIONS.value),
|
|
741
|
+
i.some((r) => r.value === A.HIGH_CONTRAST_AUDIO.value),
|
|
742
|
+
i.some((r) => r.value === A.HIGH_CONTRAST_DISPLAY.value),
|
|
743
|
+
i.some((r) => r.value === A.LARGE_PRINT.value),
|
|
744
|
+
i.some((r) => r.value === A.SIGN_LANGUAGE.value),
|
|
745
|
+
i.some((r) => r.value === A.TACTILE_GRAPHIC.value),
|
|
746
|
+
i.some((r) => r.value === A.TACTILE_OBJECT.value),
|
|
747
|
+
i.some((r) => r.value === A.TTS_MARKUP.value)
|
|
737
748
|
);
|
|
738
749
|
}
|
|
739
750
|
}
|
|
740
|
-
var
|
|
751
|
+
var ci = /* @__PURE__ */ ((s) => (s.yes = "yes", s.no = "no", s.unknown = "unknown", s.noMetadata = "noMetadata", s))(ci || {});
|
|
741
752
|
class Bt {
|
|
742
753
|
constructor(t = "unknown", e = "unknown", i = "unknown") {
|
|
743
754
|
this.id = "hazards.title", this.flashing = t, this.motion = e, this.sound = i;
|
|
744
|
-
const
|
|
745
|
-
if (this.title =
|
|
746
|
-
const
|
|
755
|
+
const r = f.getString(this.id);
|
|
756
|
+
if (this.title = r.compact, this.noMetadata = t === "noMetadata" && e === "noMetadata" && i === "noMetadata", this.noHazards = t === "no" && e === "no" && i === "no", this.unknown = t === "unknown" && e === "unknown" && i === "unknown", this.shouldDisplay = !this.noMetadata, this.statements = [], this.noHazards) {
|
|
757
|
+
const n = f.getString("hazards.none");
|
|
747
758
|
this.statements.push({
|
|
748
759
|
id: "hazards.none",
|
|
749
|
-
compactString:
|
|
750
|
-
descriptiveString:
|
|
760
|
+
compactString: n.compact,
|
|
761
|
+
descriptiveString: n.descriptive
|
|
751
762
|
});
|
|
752
763
|
} else if (this.unknown) {
|
|
753
|
-
const
|
|
764
|
+
const n = f.getString("hazards.unknown");
|
|
754
765
|
this.statements.push({
|
|
755
766
|
id: "hazards.unknown",
|
|
756
|
-
compactString:
|
|
757
|
-
descriptiveString:
|
|
767
|
+
compactString: n.compact,
|
|
768
|
+
descriptiveString: n.descriptive
|
|
758
769
|
});
|
|
759
770
|
} else if (this.noMetadata) {
|
|
760
|
-
const
|
|
771
|
+
const n = f.getString("hazards.no-metadata");
|
|
761
772
|
this.statements.push({
|
|
762
773
|
id: "hazards.no-metadata",
|
|
763
|
-
compactString:
|
|
764
|
-
descriptiveString:
|
|
774
|
+
compactString: n.compact,
|
|
775
|
+
descriptiveString: n.descriptive
|
|
765
776
|
});
|
|
766
777
|
} else {
|
|
767
778
|
if (t === "yes") {
|
|
768
|
-
const
|
|
779
|
+
const n = f.getString("hazards.flashing");
|
|
769
780
|
this.statements.push({
|
|
770
781
|
id: "hazards.flashing",
|
|
771
|
-
compactString:
|
|
772
|
-
descriptiveString:
|
|
782
|
+
compactString: n.compact,
|
|
783
|
+
descriptiveString: n.descriptive
|
|
773
784
|
});
|
|
774
785
|
} else if (t === "unknown") {
|
|
775
|
-
const
|
|
786
|
+
const n = f.getString("hazards.flashing-unknown");
|
|
776
787
|
this.statements.push({
|
|
777
788
|
id: "hazards.flashing-unknown",
|
|
778
|
-
compactString:
|
|
779
|
-
descriptiveString:
|
|
789
|
+
compactString: n.compact,
|
|
790
|
+
descriptiveString: n.descriptive
|
|
780
791
|
});
|
|
781
792
|
} else if (t === "no") {
|
|
782
|
-
const
|
|
793
|
+
const n = f.getString("hazards.flashing-none");
|
|
783
794
|
this.statements.push({
|
|
784
795
|
id: "hazards.flashing-none",
|
|
785
|
-
compactString:
|
|
786
|
-
descriptiveString:
|
|
796
|
+
compactString: n.compact,
|
|
797
|
+
descriptiveString: n.descriptive
|
|
787
798
|
});
|
|
788
799
|
}
|
|
789
800
|
if (e === "yes") {
|
|
790
|
-
const
|
|
801
|
+
const n = f.getString("hazards.motion");
|
|
791
802
|
this.statements.push({
|
|
792
803
|
id: "hazards.motion",
|
|
793
|
-
compactString:
|
|
794
|
-
descriptiveString:
|
|
804
|
+
compactString: n.compact,
|
|
805
|
+
descriptiveString: n.descriptive
|
|
795
806
|
});
|
|
796
807
|
} else if (e === "unknown") {
|
|
797
|
-
const
|
|
808
|
+
const n = f.getString("hazards.motion-unknown");
|
|
798
809
|
this.statements.push({
|
|
799
810
|
id: "hazards.motion-unknown",
|
|
800
|
-
compactString:
|
|
801
|
-
descriptiveString:
|
|
811
|
+
compactString: n.compact,
|
|
812
|
+
descriptiveString: n.descriptive
|
|
802
813
|
});
|
|
803
814
|
} else if (e === "no") {
|
|
804
|
-
const
|
|
815
|
+
const n = f.getString("hazards.motion-none");
|
|
805
816
|
this.statements.push({
|
|
806
817
|
id: "hazards.motion-none",
|
|
807
|
-
compactString:
|
|
808
|
-
descriptiveString:
|
|
818
|
+
compactString: n.compact,
|
|
819
|
+
descriptiveString: n.descriptive
|
|
809
820
|
});
|
|
810
821
|
}
|
|
811
822
|
if (i === "yes") {
|
|
812
|
-
const
|
|
823
|
+
const n = f.getString("hazards.sound");
|
|
813
824
|
this.statements.push({
|
|
814
825
|
id: "hazards.sound",
|
|
815
|
-
compactString:
|
|
816
|
-
descriptiveString:
|
|
826
|
+
compactString: n.compact,
|
|
827
|
+
descriptiveString: n.descriptive
|
|
817
828
|
});
|
|
818
829
|
} else if (i === "unknown") {
|
|
819
|
-
const
|
|
830
|
+
const n = f.getString("hazards.sound-unknown");
|
|
820
831
|
this.statements.push({
|
|
821
832
|
id: "hazards.sound-unknown",
|
|
822
|
-
compactString:
|
|
823
|
-
descriptiveString:
|
|
833
|
+
compactString: n.compact,
|
|
834
|
+
descriptiveString: n.descriptive
|
|
824
835
|
});
|
|
825
836
|
} else if (i === "no") {
|
|
826
|
-
const
|
|
837
|
+
const n = f.getString("hazards.sound-none");
|
|
827
838
|
this.statements.push({
|
|
828
839
|
id: "hazards.sound-none",
|
|
829
|
-
compactString:
|
|
830
|
-
descriptiveString:
|
|
840
|
+
compactString: n.compact,
|
|
841
|
+
descriptiveString: n.descriptive
|
|
831
842
|
});
|
|
832
843
|
}
|
|
833
844
|
}
|
|
@@ -836,20 +847,20 @@ class Bt {
|
|
|
836
847
|
const e = t.metadata.accessibility?.hazard ?? [];
|
|
837
848
|
let i;
|
|
838
849
|
e.some((o) => o.value === P.NONE.value) ? i = "no" : e.some((o) => o.value === P.UNKNOWN.value) ? i = "unknown" : i = "noMetadata";
|
|
839
|
-
let n;
|
|
840
|
-
e.some((o) => o.value === P.FLASHING.value) ? n = "yes" : e.some((o) => o.value === P.NO_FLASHING_HAZARD.value) ? n = "no" : e.some((o) => o.value === P.UNKNOWN_FLASHING_HAZARD.value) ? n = "unknown" : n = i;
|
|
841
850
|
let r;
|
|
842
|
-
e.some((o) => o.value === P.
|
|
851
|
+
e.some((o) => o.value === P.FLASHING.value) ? r = "yes" : e.some((o) => o.value === P.NO_FLASHING_HAZARD.value) ? r = "no" : e.some((o) => o.value === P.UNKNOWN_FLASHING_HAZARD.value) ? r = "unknown" : r = i;
|
|
852
|
+
let n;
|
|
853
|
+
e.some((o) => o.value === P.MOTION_SIMULATION.value) ? n = "yes" : e.some((o) => o.value === P.NO_MOTION_SIMULATION_HAZARD.value) ? n = "no" : e.some((o) => o.value === P.UNKNOWN_MOTION_SIMULATION_HAZARD.value) ? n = "unknown" : n = i;
|
|
843
854
|
let a;
|
|
844
|
-
return e.some((o) => o.value === P.SOUND.value) ? a = "yes" : e.some((o) => o.value === P.NO_SOUND_HAZARD.value) ? a = "no" : e.some((o) => o.value === P.UNKNOWN_SOUND_HAZARD.value) ? a = "unknown" : a = i, new Bt(
|
|
855
|
+
return e.some((o) => o.value === P.SOUND.value) ? a = "yes" : e.some((o) => o.value === P.NO_SOUND_HAZARD.value) ? a = "no" : e.some((o) => o.value === P.UNKNOWN_SOUND_HAZARD.value) ? a = "unknown" : a = i, new Bt(r, n, a);
|
|
845
856
|
}
|
|
846
857
|
}
|
|
847
858
|
class Gt {
|
|
848
859
|
constructor(t = []) {
|
|
849
860
|
this.id = "conformance.title", this.profiles = t, this.shouldDisplay = !0;
|
|
850
|
-
const e =
|
|
861
|
+
const e = f.getString(this.id);
|
|
851
862
|
if (this.title = e.compact, this.statements = [], t.length === 0) {
|
|
852
|
-
const i =
|
|
863
|
+
const i = f.getString("conformance.no");
|
|
853
864
|
this.statements.push({
|
|
854
865
|
id: "conformance.no",
|
|
855
866
|
compactString: i.compact,
|
|
@@ -858,28 +869,28 @@ class Gt {
|
|
|
858
869
|
return;
|
|
859
870
|
}
|
|
860
871
|
if (t.some((i) => i.isWCAGLevelAAA)) {
|
|
861
|
-
const i =
|
|
872
|
+
const i = f.getString("conformance.aaa");
|
|
862
873
|
this.statements.push({
|
|
863
874
|
id: "conformance.aaa",
|
|
864
875
|
compactString: i.compact,
|
|
865
876
|
descriptiveString: i.descriptive
|
|
866
877
|
});
|
|
867
878
|
} else if (t.some((i) => i.isWCAGLevelAA)) {
|
|
868
|
-
const i =
|
|
879
|
+
const i = f.getString("conformance.aa");
|
|
869
880
|
this.statements.push({
|
|
870
881
|
id: "conformance.aa",
|
|
871
882
|
compactString: i.compact,
|
|
872
883
|
descriptiveString: i.descriptive
|
|
873
884
|
});
|
|
874
885
|
} else if (t.some((i) => i.isWCAGLevelA)) {
|
|
875
|
-
const i =
|
|
886
|
+
const i = f.getString("conformance.a");
|
|
876
887
|
this.statements.push({
|
|
877
888
|
id: "conformance.a",
|
|
878
889
|
compactString: i.compact,
|
|
879
890
|
descriptiveString: i.descriptive
|
|
880
891
|
});
|
|
881
892
|
} else {
|
|
882
|
-
const i =
|
|
893
|
+
const i = f.getString("conformance.unknown-standard");
|
|
883
894
|
this.statements.push({
|
|
884
895
|
id: "conformance.unknown-standard",
|
|
885
896
|
compactString: i.compact,
|
|
@@ -895,16 +906,16 @@ class Gt {
|
|
|
895
906
|
class Wt {
|
|
896
907
|
constructor(t = !1) {
|
|
897
908
|
this.id = "legal-considerations.title", this.exemption = t, this.shouldDisplay = this.exemption;
|
|
898
|
-
const e =
|
|
909
|
+
const e = f.getString(this.id);
|
|
899
910
|
if (this.title = e.compact, this.statements = [], t) {
|
|
900
|
-
const i =
|
|
911
|
+
const i = f.getString("legal-considerations.exempt");
|
|
901
912
|
this.statements.push({
|
|
902
913
|
id: "legal-considerations.exempt",
|
|
903
914
|
compactString: i.compact,
|
|
904
915
|
descriptiveString: i.descriptive
|
|
905
916
|
});
|
|
906
917
|
} else {
|
|
907
|
-
const i =
|
|
918
|
+
const i = f.getString("legal-considerations.no-metadata");
|
|
908
919
|
this.statements.push({
|
|
909
920
|
id: "legal-considerations.no-metadata",
|
|
910
921
|
compactString: i.compact,
|
|
@@ -920,7 +931,7 @@ class Wt {
|
|
|
920
931
|
class Ht {
|
|
921
932
|
constructor(t) {
|
|
922
933
|
this.id = "accessibility-summary.title", this.shouldDisplay = !0;
|
|
923
|
-
const e =
|
|
934
|
+
const e = f.getString(this.id);
|
|
924
935
|
this.title = e.compact;
|
|
925
936
|
const i = t.metadata.accessibility?.summary;
|
|
926
937
|
if (this.statements = [], this.shouldDisplay && i)
|
|
@@ -930,11 +941,11 @@ class Ht {
|
|
|
930
941
|
descriptiveString: i
|
|
931
942
|
});
|
|
932
943
|
else {
|
|
933
|
-
const
|
|
944
|
+
const r = f.getString("accessibility-summary.no-metadata");
|
|
934
945
|
this.statements.push({
|
|
935
946
|
id: "accessibility-summary.no-metadata",
|
|
936
|
-
compactString:
|
|
937
|
-
descriptiveString:
|
|
947
|
+
compactString: r.compact,
|
|
948
|
+
descriptiveString: r.descriptive
|
|
938
949
|
});
|
|
939
950
|
}
|
|
940
951
|
}
|
|
@@ -942,7 +953,7 @@ class Ht {
|
|
|
942
953
|
return new Ht(t);
|
|
943
954
|
}
|
|
944
955
|
}
|
|
945
|
-
class
|
|
956
|
+
class sr {
|
|
946
957
|
constructor(t) {
|
|
947
958
|
this.waysOfReading = kt.fromPublication(t), this.navigation = Dt.fromPublication(t), this.richContent = Ut.fromPublication(t), this.additionalInformation = Mt.fromPublication(t), this.hazards = Bt.fromPublication(t), this.conformance = Gt.fromPublication(t), this.legal = Wt.fromPublication(t), this.accessibilitySummary = Ht.fromPublication(t), this.fields = [
|
|
948
959
|
this.waysOfReading,
|
|
@@ -1020,7 +1031,7 @@ Object.defineProperty(D.prototype, "encryption", {
|
|
|
1020
1031
|
return Ft.deserialize(this.otherProperties.encrypted);
|
|
1021
1032
|
}
|
|
1022
1033
|
});
|
|
1023
|
-
class
|
|
1034
|
+
class _t {
|
|
1024
1035
|
/** Creates a MediaOverlay object */
|
|
1025
1036
|
constructor(t) {
|
|
1026
1037
|
this.activeClass = t.activeClass, this.playbackActiveClass = t.playbackActiveClass;
|
|
@@ -1030,7 +1041,7 @@ class Vt {
|
|
|
1030
1041
|
*/
|
|
1031
1042
|
static deserialize(t) {
|
|
1032
1043
|
if (t)
|
|
1033
|
-
return new
|
|
1044
|
+
return new _t({
|
|
1034
1045
|
activeClass: t.activeClass,
|
|
1035
1046
|
playbackActiveClass: t.playbackActiveClass
|
|
1036
1047
|
});
|
|
@@ -1043,11 +1054,11 @@ class Vt {
|
|
|
1043
1054
|
return this.activeClass && (t.activeClass = this.activeClass), this.playbackActiveClass && (t.playbackActiveClass = this.playbackActiveClass), t;
|
|
1044
1055
|
}
|
|
1045
1056
|
}
|
|
1046
|
-
function
|
|
1057
|
+
function li(s) {
|
|
1047
1058
|
return s && Array.isArray(s) ? s : void 0;
|
|
1048
1059
|
}
|
|
1049
1060
|
function F(s) {
|
|
1050
|
-
return s && typeof s == "string" ? [s] :
|
|
1061
|
+
return s && typeof s == "string" ? [s] : li(s);
|
|
1051
1062
|
}
|
|
1052
1063
|
function ct(s) {
|
|
1053
1064
|
return typeof s == "string" ? new Date(s) : void 0;
|
|
@@ -1094,30 +1105,30 @@ class Z {
|
|
|
1094
1105
|
class c {
|
|
1095
1106
|
/** Creates a MediaType object. */
|
|
1096
1107
|
constructor(t) {
|
|
1097
|
-
let e, i,
|
|
1098
|
-
const
|
|
1099
|
-
if (
|
|
1100
|
-
if (e =
|
|
1108
|
+
let e, i, r = t.mediaType.replace(/\s/g, "").split(";");
|
|
1109
|
+
const n = r[0].split("/");
|
|
1110
|
+
if (n.length === 2) {
|
|
1111
|
+
if (e = n[0].toLowerCase().trim(), i = n[1].toLowerCase().trim(), e.length === 0 || i.length === 0)
|
|
1101
1112
|
throw new Error("Invalid media type");
|
|
1102
1113
|
} else
|
|
1103
1114
|
throw new Error("Invalid media type");
|
|
1104
1115
|
const a = {};
|
|
1105
|
-
for (let g = 1; g <
|
|
1106
|
-
const
|
|
1107
|
-
if (
|
|
1108
|
-
const
|
|
1109
|
-
a[
|
|
1116
|
+
for (let g = 1; g < r.length; g++) {
|
|
1117
|
+
const v = r[g].split("=");
|
|
1118
|
+
if (v.length === 2) {
|
|
1119
|
+
const C = v[0].toLocaleLowerCase(), d = C === "charset" ? v[1].toUpperCase() : v[1];
|
|
1120
|
+
a[C] = d;
|
|
1110
1121
|
}
|
|
1111
1122
|
}
|
|
1112
|
-
const o = {},
|
|
1113
|
-
|
|
1123
|
+
const o = {}, h = Object.keys(a);
|
|
1124
|
+
h.sort((g, v) => g.localeCompare(v)), h.forEach((g) => o[g] = a[g]);
|
|
1114
1125
|
let m = "";
|
|
1115
1126
|
for (const g in o) {
|
|
1116
|
-
const
|
|
1117
|
-
m += `;${g}=${
|
|
1127
|
+
const v = o[g];
|
|
1128
|
+
m += `;${g}=${v}`;
|
|
1118
1129
|
}
|
|
1119
|
-
const
|
|
1120
|
-
this.string =
|
|
1130
|
+
const p = `${e}/${i}${m}`, u = o.encoding;
|
|
1131
|
+
this.string = p, this.type = e, this.subtype = i, this.parameters = o, this.encoding = u, this.name = t.name, this.fileExtension = t.fileExtension;
|
|
1121
1132
|
}
|
|
1122
1133
|
static parse(t) {
|
|
1123
1134
|
return new c(t);
|
|
@@ -1154,12 +1165,12 @@ class c {
|
|
|
1154
1165
|
if (!((this.type === "*" || this.type === e.type) && (this.subtype === "*" || this.subtype === e.subtype)))
|
|
1155
1166
|
return !1;
|
|
1156
1167
|
const i = new Set(
|
|
1157
|
-
Object.entries(this.parameters).map(([
|
|
1158
|
-
),
|
|
1159
|
-
Object.entries(e.parameters).map(([
|
|
1168
|
+
Object.entries(this.parameters).map(([n, a]) => `${n}=${a}`)
|
|
1169
|
+
), r = new Set(
|
|
1170
|
+
Object.entries(e.parameters).map(([n, a]) => `${n}=${a}`)
|
|
1160
1171
|
);
|
|
1161
|
-
for (const
|
|
1162
|
-
if (!
|
|
1172
|
+
for (const n of Array.from(i.values()))
|
|
1173
|
+
if (!r.has(n))
|
|
1163
1174
|
return !1;
|
|
1164
1175
|
return !0;
|
|
1165
1176
|
}
|
|
@@ -1546,7 +1557,7 @@ class c {
|
|
|
1546
1557
|
});
|
|
1547
1558
|
}
|
|
1548
1559
|
}
|
|
1549
|
-
class
|
|
1560
|
+
class ht {
|
|
1550
1561
|
constructor(t) {
|
|
1551
1562
|
this.uri = t, this.parameters = this.getParameters(t);
|
|
1552
1563
|
}
|
|
@@ -1556,7 +1567,7 @@ class ut {
|
|
|
1556
1567
|
getParameters(t) {
|
|
1557
1568
|
const e = /\{\??([^}]+)\}/g, i = t.match(e);
|
|
1558
1569
|
return i ? new Set(
|
|
1559
|
-
i.join(",").replace(e, "$1").split(",").map((
|
|
1570
|
+
i.join(",").replace(e, "$1").split(",").map((r) => r.trim())
|
|
1560
1571
|
) : /* @__PURE__ */ new Set();
|
|
1561
1572
|
}
|
|
1562
1573
|
/** Expands the URI by replacing the template variables by the given parameters.
|
|
@@ -1564,14 +1575,14 @@ class ut {
|
|
|
1564
1575
|
* See RFC 6570 on URI template: https://tools.ietf.org/html/rfc6570
|
|
1565
1576
|
*/
|
|
1566
1577
|
expand(t) {
|
|
1567
|
-
const e = (
|
|
1568
|
-
const a = t[
|
|
1578
|
+
const e = (r) => r.split(",").map((n) => {
|
|
1579
|
+
const a = t[n];
|
|
1569
1580
|
return a ? encodeURIComponent(a) : "";
|
|
1570
|
-
}).join(","), i = (
|
|
1571
|
-
const a =
|
|
1581
|
+
}).join(","), i = (r) => "?" + r.split(",").map((n) => {
|
|
1582
|
+
const a = n.split("=")[0], o = t[a];
|
|
1572
1583
|
return o ? `${a}=${encodeURIComponent(o)}` : "";
|
|
1573
1584
|
}).join("&");
|
|
1574
|
-
return this.uri.replace(/\{(\??)([^}]+)\}/g, (...
|
|
1585
|
+
return this.uri.replace(/\{(\??)([^}]+)\}/g, (...r) => r[1] ? i(r[2]) : e(r[2]));
|
|
1575
1586
|
}
|
|
1576
1587
|
}
|
|
1577
1588
|
class T {
|
|
@@ -1586,21 +1597,21 @@ class T {
|
|
|
1586
1597
|
*/
|
|
1587
1598
|
static deserialize(t) {
|
|
1588
1599
|
if (!t) return;
|
|
1589
|
-
const e = K(t.progression), i = K(t.totalProgression),
|
|
1600
|
+
const e = K(t.progression), i = K(t.totalProgression), r = K(t.position), n = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Set([
|
|
1590
1601
|
"fragment",
|
|
1591
1602
|
"fragments",
|
|
1592
1603
|
"progression",
|
|
1593
1604
|
"totalProgression",
|
|
1594
1605
|
"position"
|
|
1595
1606
|
]);
|
|
1596
|
-
return Object.entries(t).forEach(([o,
|
|
1597
|
-
a.has(o) ||
|
|
1607
|
+
return Object.entries(t).forEach(([o, h]) => {
|
|
1608
|
+
a.has(o) || n.set(o, h);
|
|
1598
1609
|
}), new T({
|
|
1599
1610
|
fragments: F(t.fragments || t.fragment),
|
|
1600
1611
|
progression: e !== void 0 && e >= 0 && e <= 1 ? e : void 0,
|
|
1601
1612
|
totalProgression: i !== void 0 && i >= 0 && i <= 1 ? i : void 0,
|
|
1602
|
-
position:
|
|
1603
|
-
otherLocations:
|
|
1613
|
+
position: r !== void 0 && r > 0 ? r : void 0,
|
|
1614
|
+
otherLocations: n.size === 0 ? void 0 : n
|
|
1604
1615
|
});
|
|
1605
1616
|
}
|
|
1606
1617
|
/**
|
|
@@ -1611,7 +1622,7 @@ class T {
|
|
|
1611
1622
|
return this.fragments && (t.fragments = this.fragments), this.progression !== void 0 && (t.progression = this.progression), this.totalProgression !== void 0 && (t.totalProgression = this.totalProgression), this.position !== void 0 && (t.position = this.position), this.otherLocations && this.otherLocations.forEach((e, i) => t[i] = e), t;
|
|
1612
1623
|
}
|
|
1613
1624
|
}
|
|
1614
|
-
class
|
|
1625
|
+
class rt {
|
|
1615
1626
|
/**
|
|
1616
1627
|
* Creates a [Text].
|
|
1617
1628
|
*/
|
|
@@ -1623,7 +1634,7 @@ class nt {
|
|
|
1623
1634
|
*/
|
|
1624
1635
|
static deserialize(t) {
|
|
1625
1636
|
if (t)
|
|
1626
|
-
return new
|
|
1637
|
+
return new rt({
|
|
1627
1638
|
after: t.after,
|
|
1628
1639
|
before: t.before,
|
|
1629
1640
|
highlight: t.highlight
|
|
@@ -1654,7 +1665,7 @@ class k {
|
|
|
1654
1665
|
type: t.type,
|
|
1655
1666
|
title: t.title,
|
|
1656
1667
|
locations: T.deserialize(t.locations),
|
|
1657
|
-
text:
|
|
1668
|
+
text: rt.deserialize(t.text)
|
|
1658
1669
|
});
|
|
1659
1670
|
}
|
|
1660
1671
|
/**
|
|
@@ -1728,14 +1739,14 @@ class U {
|
|
|
1728
1739
|
}
|
|
1729
1740
|
/** List of URI template parameter keys, if the `Link` is templated. */
|
|
1730
1741
|
get templateParameters() {
|
|
1731
|
-
return this.templated ? new
|
|
1742
|
+
return this.templated ? new ht(this.href).parameters : /* @__PURE__ */ new Set();
|
|
1732
1743
|
}
|
|
1733
1744
|
/** Expands the `Link`'s HREF by replacing URI template variables by the given parameters.
|
|
1734
1745
|
* See RFC 6570 on URI template: https://tools.ietf.org/html/rfc6570
|
|
1735
1746
|
*/
|
|
1736
1747
|
expandTemplate(t) {
|
|
1737
1748
|
return new U({
|
|
1738
|
-
href: new
|
|
1749
|
+
href: new ht(this.href).expand(t),
|
|
1739
1750
|
templated: !1
|
|
1740
1751
|
});
|
|
1741
1752
|
}
|
|
@@ -1816,8 +1827,8 @@ class O {
|
|
|
1816
1827
|
/** Finds all the links matching any of the given media types. */
|
|
1817
1828
|
filterByMediaTypes(t) {
|
|
1818
1829
|
const e = (i) => {
|
|
1819
|
-
for (const
|
|
1820
|
-
if (i.mediaType.matches(
|
|
1830
|
+
for (const r of t)
|
|
1831
|
+
if (i.mediaType.matches(r))
|
|
1821
1832
|
return !0;
|
|
1822
1833
|
return !1;
|
|
1823
1834
|
};
|
|
@@ -1904,7 +1915,7 @@ const G = class G {
|
|
|
1904
1915
|
};
|
|
1905
1916
|
G.UNDEFINED_LANGUAGE = "und", G.LANGUAGE_EN = "en";
|
|
1906
1917
|
let M = G;
|
|
1907
|
-
class
|
|
1918
|
+
class ut {
|
|
1908
1919
|
/**
|
|
1909
1920
|
* Creates a [Contributor] object.
|
|
1910
1921
|
*/
|
|
@@ -1918,9 +1929,9 @@ class ht {
|
|
|
1918
1929
|
*/
|
|
1919
1930
|
static deserialize(t) {
|
|
1920
1931
|
if (t)
|
|
1921
|
-
return typeof t == "string" ? new
|
|
1932
|
+
return typeof t == "string" ? new ut({
|
|
1922
1933
|
name: M.deserialize(t)
|
|
1923
|
-
}) : t.name ? new
|
|
1934
|
+
}) : t.name ? new ut({
|
|
1924
1935
|
name: M.deserialize(t.name),
|
|
1925
1936
|
sortAs: M.deserialize(t.sortAs),
|
|
1926
1937
|
identifier: t.identifier,
|
|
@@ -1953,7 +1964,7 @@ class N {
|
|
|
1953
1964
|
if (!t) return;
|
|
1954
1965
|
const e = Array.isArray(t) ? t : [t];
|
|
1955
1966
|
return new N(
|
|
1956
|
-
e.map((i) =>
|
|
1967
|
+
e.map((i) => ut.deserialize(i)).filter((i) => i !== void 0)
|
|
1957
1968
|
);
|
|
1958
1969
|
}
|
|
1959
1970
|
/**
|
|
@@ -1963,7 +1974,7 @@ class N {
|
|
|
1963
1974
|
return this.items.map((t) => t.serialize());
|
|
1964
1975
|
}
|
|
1965
1976
|
}
|
|
1966
|
-
class
|
|
1977
|
+
class q {
|
|
1967
1978
|
/** Creates an Array of [Subject]. */
|
|
1968
1979
|
constructor(t) {
|
|
1969
1980
|
this.items = t && t.items ? t.items : /* @__PURE__ */ new Map();
|
|
@@ -1974,10 +1985,10 @@ class J {
|
|
|
1974
1985
|
static deserialize(t) {
|
|
1975
1986
|
if (!(t && typeof t == "object")) return;
|
|
1976
1987
|
const e = /* @__PURE__ */ new Map();
|
|
1977
|
-
return Object.entries(t).forEach(([i,
|
|
1978
|
-
const
|
|
1979
|
-
|
|
1980
|
-
}), new
|
|
1988
|
+
return Object.entries(t).forEach(([i, r]) => {
|
|
1989
|
+
const n = N.deserialize(r);
|
|
1990
|
+
n && n.items.length > 0 && e.set(i, n);
|
|
1991
|
+
}), new q({ items: e });
|
|
1981
1992
|
}
|
|
1982
1993
|
/**
|
|
1983
1994
|
* Serializes a [BelongsTo] to its RWPM JSON representation.
|
|
@@ -1989,8 +2000,8 @@ class J {
|
|
|
1989
2000
|
), t;
|
|
1990
2001
|
}
|
|
1991
2002
|
}
|
|
1992
|
-
var
|
|
1993
|
-
function
|
|
2003
|
+
var J = /* @__PURE__ */ ((s) => (s.EPUB = "https://readium.org/webpub-manifest/profiles/epub", s.AUDIOBOOK = "https://readium.org/webpub-manifest/profiles/audiobook", s.DIVINA = "https://readium.org/webpub-manifest/profiles/divina", s.PDF = "https://readium.org/webpub-manifest/profiles/pdf", s))(J || {}), H = /* @__PURE__ */ ((s) => (s.ltr = "ltr", s.rtl = "rtl", s))(H || {});
|
|
2004
|
+
function rr(s) {
|
|
1994
2005
|
return s === "rtl" ? Nt.right : Nt.left;
|
|
1995
2006
|
}
|
|
1996
2007
|
class dt {
|
|
@@ -2023,7 +2034,7 @@ class dt {
|
|
|
2023
2034
|
return this.sortAs !== void 0 && (t.sortAs = this.sortAs.serialize()), this.code !== void 0 && (t.code = this.code), this.scheme !== void 0 && (t.scheme = this.scheme), this.links && (t.links = this.links.serialize()), t;
|
|
2024
2035
|
}
|
|
2025
2036
|
}
|
|
2026
|
-
class
|
|
2037
|
+
class Vt {
|
|
2027
2038
|
/** Creates an Array of [Subject]. */
|
|
2028
2039
|
constructor(t) {
|
|
2029
2040
|
this.items = t;
|
|
@@ -2034,7 +2045,7 @@ class Yt {
|
|
|
2034
2045
|
static deserialize(t) {
|
|
2035
2046
|
if (!t) return;
|
|
2036
2047
|
const e = Array.isArray(t) ? t : [t];
|
|
2037
|
-
return new
|
|
2048
|
+
return new Vt(
|
|
2038
2049
|
e.map((i) => dt.deserialize(i)).filter((i) => i !== void 0)
|
|
2039
2050
|
);
|
|
2040
2051
|
}
|
|
@@ -2045,8 +2056,8 @@ class Yt {
|
|
|
2045
2056
|
return this.items.map((t) => t.serialize());
|
|
2046
2057
|
}
|
|
2047
2058
|
}
|
|
2048
|
-
var
|
|
2049
|
-
class
|
|
2059
|
+
var hi = /* @__PURE__ */ ((s) => (s.all = "all", s.none = "none", s))(hi || {});
|
|
2060
|
+
class Yt {
|
|
2050
2061
|
/** Creates a [TDM] object */
|
|
2051
2062
|
constructor(t) {
|
|
2052
2063
|
this.reservation = t.reservation, this.policy = t.policy;
|
|
@@ -2056,7 +2067,7 @@ class $t {
|
|
|
2056
2067
|
*/
|
|
2057
2068
|
static deserialize(t) {
|
|
2058
2069
|
if (t)
|
|
2059
|
-
return new
|
|
2070
|
+
return new Yt({
|
|
2060
2071
|
reservation: t.reservation,
|
|
2061
2072
|
policy: t.policy
|
|
2062
2073
|
});
|
|
@@ -2072,7 +2083,7 @@ class $t {
|
|
|
2072
2083
|
const tt = class tt {
|
|
2073
2084
|
/** Creates [Metadata] object */
|
|
2074
2085
|
constructor(t) {
|
|
2075
|
-
this.title = t.title, this.typeUri = t.typeUri, this.conformsTo = t.conformsTo, this.identifier = t.identifier, this.altIdentifier = t.altIdentifier, this.subtitle = t.subtitle, this.sortAs = t.sortAs, this.artists = t.artists, this.authors = t.authors, this.colorists = t.colorists, this.contributors = t.contributors, this.editors = t.editors, this.illustrators = t.illustrators, this.inkers = t.inkers, this.letterers = t.letterers, this.narrators = t.narrators, this.pencilers = t.pencilers, this.translators = t.translators, this.languages = t.languages, this.description = t.description, this.publishers = t.publishers, this.imprints = t.imprints, this.published = t.published, this.modified = t.modified, this.subjects = t.subjects, this.belongsTo = t.belongsTo, this.belongsToCollections = t.belongsToCollections, this.belongsToSeries = t.belongsToSeries, this.belongsToCollections && this.belongsToCollections.items.length > 0 && (this.belongsTo || (this.belongsTo = new
|
|
2086
|
+
this.title = t.title, this.typeUri = t.typeUri, this.conformsTo = t.conformsTo, this.identifier = t.identifier, this.altIdentifier = t.altIdentifier, this.subtitle = t.subtitle, this.sortAs = t.sortAs, this.artists = t.artists, this.authors = t.authors, this.colorists = t.colorists, this.contributors = t.contributors, this.editors = t.editors, this.illustrators = t.illustrators, this.inkers = t.inkers, this.letterers = t.letterers, this.narrators = t.narrators, this.pencilers = t.pencilers, this.translators = t.translators, this.languages = t.languages, this.description = t.description, this.publishers = t.publishers, this.imprints = t.imprints, this.published = t.published, this.modified = t.modified, this.subjects = t.subjects, this.belongsTo = t.belongsTo, this.belongsToCollections = t.belongsToCollections, this.belongsToSeries = t.belongsToSeries, this.belongsToCollections && this.belongsToCollections.items.length > 0 && (this.belongsTo || (this.belongsTo = new q()), this.belongsTo.items.set("collection", this.belongsToCollections)), this.belongsToSeries && this.belongsToSeries.items.length > 0 && (this.belongsTo || (this.belongsTo = new q()), this.belongsTo.items.set("series", this.belongsToSeries)), this.layout = t.layout, this.readingProgression = t.readingProgression, this.duration = t.duration, this.numberOfPages = t.numberOfPages, this.accessibility = t.accessibility, this.tdm = t.tdm, this.otherMetadata = t.otherMetadata;
|
|
2076
2087
|
}
|
|
2077
2088
|
/**
|
|
2078
2089
|
* Parses a [Metadata] from its RWPM JSON representation.
|
|
@@ -2081,41 +2092,41 @@ const tt = class tt {
|
|
|
2081
2092
|
*/
|
|
2082
2093
|
static deserialize(t) {
|
|
2083
2094
|
if (!(t && t.title)) return;
|
|
2084
|
-
const e = M.deserialize(t.title), i = t["@type"],
|
|
2095
|
+
const e = M.deserialize(t.title), i = t["@type"], r = F(t.conformsTo), n = t.identifier, a = Z.deserialize(t.altIdentifier), o = M.deserialize(t.subtitle), h = M.deserialize(t.sortAs), m = N.deserialize(t.artist), p = N.deserialize(t.author), u = N.deserialize(t.colorist), g = N.deserialize(t.contributor), v = N.deserialize(t.editor), C = N.deserialize(t.illustrator), d = N.deserialize(t.inker), I = N.deserialize(t.letterer), B = N.deserialize(t.narrator), Me = N.deserialize(t.penciler), Be = N.deserialize(t.translator), Ge = F(t.language), We = t.description, He = N.deserialize(t.publisher), Fe = N.deserialize(t.imprint), _e = ct(t.published), Ve = ct(t.modified), Ye = Vt.deserialize(t.subject), $e = q.deserialize(t.belongsTo), Xe = _.deserialize(t.accessibility), Ke = t.layout, Ze = t.readingProgression, Je = L(t.duration), qe = L(t.numberOfPages), Qe = Yt.deserialize(t.tdm);
|
|
2085
2096
|
let at = Object.assign({}, t);
|
|
2086
|
-
return tt.mappedProperties.forEach((
|
|
2097
|
+
return tt.mappedProperties.forEach((je) => delete at[je]), Object.keys(at).length === 0 && (at = void 0), new tt({
|
|
2087
2098
|
title: e,
|
|
2088
2099
|
typeUri: i,
|
|
2089
|
-
conformsTo:
|
|
2090
|
-
identifier:
|
|
2100
|
+
conformsTo: r,
|
|
2101
|
+
identifier: n,
|
|
2091
2102
|
altIdentifier: a,
|
|
2092
2103
|
subtitle: o,
|
|
2093
|
-
sortAs:
|
|
2104
|
+
sortAs: h,
|
|
2094
2105
|
artists: m,
|
|
2095
|
-
authors:
|
|
2096
|
-
colorists:
|
|
2106
|
+
authors: p,
|
|
2107
|
+
colorists: u,
|
|
2097
2108
|
contributors: g,
|
|
2098
|
-
editors:
|
|
2099
|
-
illustrators:
|
|
2109
|
+
editors: v,
|
|
2110
|
+
illustrators: C,
|
|
2100
2111
|
inkers: d,
|
|
2101
|
-
letterers:
|
|
2112
|
+
letterers: I,
|
|
2102
2113
|
narrators: B,
|
|
2103
|
-
pencilers:
|
|
2104
|
-
translators:
|
|
2105
|
-
languages:
|
|
2106
|
-
description:
|
|
2107
|
-
publishers:
|
|
2108
|
-
imprints:
|
|
2109
|
-
published:
|
|
2110
|
-
modified:
|
|
2111
|
-
subjects:
|
|
2112
|
-
belongsTo:
|
|
2113
|
-
layout:
|
|
2114
|
-
readingProgression:
|
|
2115
|
-
duration:
|
|
2116
|
-
numberOfPages:
|
|
2117
|
-
accessibility:
|
|
2118
|
-
tdm:
|
|
2114
|
+
pencilers: Me,
|
|
2115
|
+
translators: Be,
|
|
2116
|
+
languages: Ge,
|
|
2117
|
+
description: We,
|
|
2118
|
+
publishers: He,
|
|
2119
|
+
imprints: Fe,
|
|
2120
|
+
published: _e,
|
|
2121
|
+
modified: Ve,
|
|
2122
|
+
subjects: Ye,
|
|
2123
|
+
belongsTo: $e,
|
|
2124
|
+
layout: Ke,
|
|
2125
|
+
readingProgression: Ze,
|
|
2126
|
+
duration: Je,
|
|
2127
|
+
numberOfPages: qe,
|
|
2128
|
+
accessibility: Xe,
|
|
2129
|
+
tdm: Qe,
|
|
2119
2130
|
otherMetadata: at
|
|
2120
2131
|
});
|
|
2121
2132
|
}
|
|
@@ -2146,12 +2157,12 @@ const tt = class tt {
|
|
|
2146
2157
|
return null;
|
|
2147
2158
|
for (const t of this.conformsTo)
|
|
2148
2159
|
switch (t) {
|
|
2149
|
-
case
|
|
2150
|
-
return this.layout ||
|
|
2151
|
-
case
|
|
2152
|
-
return this.layout ===
|
|
2153
|
-
case
|
|
2154
|
-
case
|
|
2160
|
+
case J.EPUB:
|
|
2161
|
+
return this.layout || $.reflowable;
|
|
2162
|
+
case J.DIVINA:
|
|
2163
|
+
return this.layout === $.reflowable ? $.fixed : this.layout || $.fixed;
|
|
2164
|
+
case J.AUDIOBOOK:
|
|
2165
|
+
case J.PDF:
|
|
2155
2166
|
return null;
|
|
2156
2167
|
}
|
|
2157
2168
|
return null;
|
|
@@ -2215,22 +2226,22 @@ tt.mappedProperties = [
|
|
|
2215
2226
|
"accessibility",
|
|
2216
2227
|
"tdm"
|
|
2217
2228
|
];
|
|
2218
|
-
let
|
|
2219
|
-
|
|
2229
|
+
let ft = tt;
|
|
2230
|
+
ft.prototype.getMediaOverlay = function() {
|
|
2220
2231
|
const s = this.otherMetadata?.mediaOverlay;
|
|
2221
2232
|
if (s)
|
|
2222
|
-
return
|
|
2233
|
+
return _t.deserialize(s);
|
|
2223
2234
|
};
|
|
2224
2235
|
D.prototype.getContains = function() {
|
|
2225
2236
|
return new Set(this.otherProperties.contains || []);
|
|
2226
2237
|
};
|
|
2227
|
-
class
|
|
2238
|
+
class $t {
|
|
2228
2239
|
constructor(t) {
|
|
2229
2240
|
this.links = t.links, this.guided = t.guided;
|
|
2230
2241
|
}
|
|
2231
2242
|
static deserialize(t) {
|
|
2232
2243
|
if (t)
|
|
2233
|
-
return new
|
|
2244
|
+
return new $t({
|
|
2234
2245
|
links: O.deserialize(t.links),
|
|
2235
2246
|
guided: X.deserializeArray(t.guided)
|
|
2236
2247
|
});
|
|
@@ -2240,7 +2251,7 @@ class qt {
|
|
|
2240
2251
|
return this.links !== void 0 && (t.links = this.links.serialize()), this.guided !== void 0 && (t.guided = this.guided.map((e) => e.serialize())), t;
|
|
2241
2252
|
}
|
|
2242
2253
|
}
|
|
2243
|
-
class
|
|
2254
|
+
class pt {
|
|
2244
2255
|
constructor(t) {
|
|
2245
2256
|
this.plain = t.plain, this.ssml = t.ssml, this.language = t.language;
|
|
2246
2257
|
}
|
|
@@ -2250,9 +2261,9 @@ class ft {
|
|
|
2250
2261
|
static deserialize(t) {
|
|
2251
2262
|
if (t != null) {
|
|
2252
2263
|
if (typeof t == "string")
|
|
2253
|
-
return new
|
|
2264
|
+
return new pt({ plain: t });
|
|
2254
2265
|
if (t.plain || t.ssml || t.language)
|
|
2255
|
-
return new
|
|
2266
|
+
return new pt({
|
|
2256
2267
|
plain: t.plain,
|
|
2257
2268
|
ssml: t.ssml,
|
|
2258
2269
|
language: t.language
|
|
@@ -2304,7 +2315,7 @@ class X {
|
|
|
2304
2315
|
imgref: t.imgref,
|
|
2305
2316
|
role: t.role ? new Set(F(t.role)) : void 0,
|
|
2306
2317
|
level: typeof t.level == "number" ? t.level : void 0,
|
|
2307
|
-
text:
|
|
2318
|
+
text: pt.deserialize(t.text),
|
|
2308
2319
|
textref: t.textref,
|
|
2309
2320
|
description: X.deserialize(t.description)
|
|
2310
2321
|
});
|
|
@@ -2349,8 +2360,8 @@ class X {
|
|
|
2349
2360
|
fragmentId: this.fragmentId
|
|
2350
2361
|
};
|
|
2351
2362
|
if (!e) return i;
|
|
2352
|
-
const
|
|
2353
|
-
return i.start =
|
|
2363
|
+
const r = this.parseTimer(e);
|
|
2364
|
+
return i.start = r[0], i.end = r[1], i;
|
|
2354
2365
|
}
|
|
2355
2366
|
parseTimer(t) {
|
|
2356
2367
|
if (!t || !t.startsWith("t=")) return [void 0, void 0];
|
|
@@ -2358,16 +2369,16 @@ class X {
|
|
|
2358
2369
|
return e.length === 1 ? [isNaN(e[0]) ? void 0 : e[0], void 0] : e.length > 2 ? [void 0, void 0] : [isNaN(e[0]) ? void 0 : e[0], isNaN(e[1]) ? void 0 : e[1]];
|
|
2359
2370
|
}
|
|
2360
2371
|
}
|
|
2361
|
-
function
|
|
2372
|
+
function ui(s, t) {
|
|
2362
2373
|
return t.length > 1 ? t.indexOf(s.slice(-1)) > -1 : s.slice(-1) === t;
|
|
2363
2374
|
}
|
|
2364
|
-
function
|
|
2375
|
+
function di(s, t) {
|
|
2365
2376
|
return s.slice(s.length - t.length) === t;
|
|
2366
2377
|
}
|
|
2367
2378
|
const yt = {
|
|
2368
|
-
endsWith:
|
|
2369
|
-
endsWithChar:
|
|
2370
|
-
},
|
|
2379
|
+
endsWith: di,
|
|
2380
|
+
endsWithChar: ui
|
|
2381
|
+
}, fi = [
|
|
2371
2382
|
"ie",
|
|
2372
2383
|
"eg",
|
|
2373
2384
|
"ext",
|
|
@@ -2459,16 +2470,16 @@ const yt = {
|
|
|
2459
2470
|
"Fri",
|
|
2460
2471
|
"Sat"
|
|
2461
2472
|
];
|
|
2462
|
-
function
|
|
2473
|
+
function de(s) {
|
|
2463
2474
|
return /^[A-Z][a-z].*/.test(s) || Lt(s);
|
|
2464
2475
|
}
|
|
2465
|
-
function
|
|
2466
|
-
return
|
|
2476
|
+
function pi(s) {
|
|
2477
|
+
return de(s) || /``|"|'/.test(s.substring(0, 2));
|
|
2467
2478
|
}
|
|
2468
|
-
function
|
|
2469
|
-
return ~
|
|
2479
|
+
function mi(s) {
|
|
2480
|
+
return ~fi.indexOf(s.replace(/\W+/g, ""));
|
|
2470
2481
|
}
|
|
2471
|
-
function
|
|
2482
|
+
function gi(s, t) {
|
|
2472
2483
|
if (s === "a.m." || s === "p.m.") {
|
|
2473
2484
|
var e = t.replace(/\W+/g, "").slice(-3).toLowerCase();
|
|
2474
2485
|
if (e === "day")
|
|
@@ -2476,23 +2487,23 @@ function Ai(s, t) {
|
|
|
2476
2487
|
}
|
|
2477
2488
|
return !1;
|
|
2478
2489
|
}
|
|
2479
|
-
function
|
|
2490
|
+
function re(s) {
|
|
2480
2491
|
var t = s.replace(/[\(\)\[\]\{\}]/g, "").match(/(.\.)*/);
|
|
2481
2492
|
return t && t[0].length > 0;
|
|
2482
2493
|
}
|
|
2483
|
-
function
|
|
2484
|
-
return s.length <= 3 ? !0 :
|
|
2494
|
+
function ne(s) {
|
|
2495
|
+
return s.length <= 3 ? !0 : de(s);
|
|
2485
2496
|
}
|
|
2486
2497
|
function Lt(s, t) {
|
|
2487
2498
|
return t && (s = s.slice(t - 1, t + 2)), !isNaN(Number(s));
|
|
2488
2499
|
}
|
|
2489
|
-
function
|
|
2500
|
+
function bi(s) {
|
|
2490
2501
|
return s.match(/^(?:(?:\+?1\s*(?:[.-]\s*)?)?(?:\(\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\s*\)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\s*(?:[.-]\s*)?)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\s*(?:[.-]\s*)?([0-9]{4})(?:\s*(?:#|x\.?|ext\.?|extension)\s*(\d+))?$/);
|
|
2491
2502
|
}
|
|
2492
|
-
function
|
|
2503
|
+
function Ai(s) {
|
|
2493
2504
|
return s.match(/[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/);
|
|
2494
2505
|
}
|
|
2495
|
-
function
|
|
2506
|
+
function vi(s) {
|
|
2496
2507
|
var t = 0;
|
|
2497
2508
|
if ((t = s.indexOf(".")) > -1 || (t = s.indexOf("!")) > -1 || (t = s.indexOf("?")) > -1) {
|
|
2498
2509
|
var e = s.charAt(t + 1);
|
|
@@ -2501,10 +2512,10 @@ function Si(s) {
|
|
|
2501
2512
|
}
|
|
2502
2513
|
return !1;
|
|
2503
2514
|
}
|
|
2504
|
-
function
|
|
2515
|
+
function yi(s) {
|
|
2505
2516
|
return s === "." || s === "!" || s === "?";
|
|
2506
2517
|
}
|
|
2507
|
-
function
|
|
2518
|
+
function wi(s, t) {
|
|
2508
2519
|
t = Object.assign(t || {}, {
|
|
2509
2520
|
newlineBoundary: t && t.newlineBoundary || !0
|
|
2510
2521
|
});
|
|
@@ -2513,31 +2524,31 @@ function Ti(s, t) {
|
|
|
2513
2524
|
// Split into words
|
|
2514
2525
|
s.re(e, { split: !0 }),
|
|
2515
2526
|
// Merge words as sentences
|
|
2516
|
-
s.splitAndMerge(function(i,
|
|
2517
|
-
var m,
|
|
2518
|
-
return !e.test(
|
|
2527
|
+
s.splitAndMerge(function(i, r, n, a, o, h) {
|
|
2528
|
+
var m, p = [i, null], u = i, g = h.slice(o + 1).find(function(C) {
|
|
2529
|
+
return !e.test(C.value);
|
|
2519
2530
|
});
|
|
2520
2531
|
if (i === `
|
|
2521
|
-
` && t.newlineBoundary ||
|
|
2522
|
-
return
|
|
2532
|
+
` && t.newlineBoundary || yi(i) || yt.endsWithChar(i, "?!"))
|
|
2533
|
+
return p;
|
|
2523
2534
|
if (yt.endsWithChar(i, ".")) {
|
|
2524
2535
|
if (g) {
|
|
2525
|
-
if (i.length === 2 && isNaN(i.charAt(0)) && i.match(/[a-zA-Z]/) ||
|
|
2526
|
-
return
|
|
2527
|
-
if (
|
|
2528
|
-
if (
|
|
2529
|
-
return
|
|
2530
|
-
} else if (yt.endsWith(i, "..") ||
|
|
2531
|
-
return
|
|
2536
|
+
if (i.length === 2 && isNaN(i.charAt(0)) && i.match(/[a-zA-Z]/) || mi(i))
|
|
2537
|
+
return u;
|
|
2538
|
+
if (pi(g.value)) {
|
|
2539
|
+
if (gi(i, g.value) || Lt(g.value) && ne(i))
|
|
2540
|
+
return u;
|
|
2541
|
+
} else if (yt.endsWith(i, "..") || re(i) || ne(i))
|
|
2542
|
+
return u;
|
|
2532
2543
|
}
|
|
2533
|
-
return
|
|
2544
|
+
return p;
|
|
2534
2545
|
}
|
|
2535
|
-
let
|
|
2536
|
-
return (
|
|
2546
|
+
let v;
|
|
2547
|
+
return (v = i.indexOf(".")) > -1 && (Lt(i, v) || re(i) || Ai(i) || bi(i)) ? u : (m = vi(i)) ? [
|
|
2537
2548
|
m[0] + m[1],
|
|
2538
2549
|
null,
|
|
2539
2550
|
m[2]
|
|
2540
|
-
] :
|
|
2551
|
+
] : u;
|
|
2541
2552
|
}),
|
|
2542
2553
|
// Filter empty sentences
|
|
2543
2554
|
s.filter(function(i) {
|
|
@@ -2545,27 +2556,27 @@ function Ti(s, t) {
|
|
|
2545
2556
|
})
|
|
2546
2557
|
);
|
|
2547
2558
|
}
|
|
2548
|
-
const
|
|
2549
|
-
function
|
|
2559
|
+
const Si = (s, ...t) => (...e) => s(...t, ...e);
|
|
2560
|
+
function Ei(s) {
|
|
2550
2561
|
return {
|
|
2551
|
-
sentences:
|
|
2562
|
+
sentences: Si(wi, s)
|
|
2552
2563
|
};
|
|
2553
2564
|
}
|
|
2554
|
-
function
|
|
2565
|
+
function Ti(s, t) {
|
|
2555
2566
|
return t ? s.reduce(function(e, i) {
|
|
2556
|
-
var
|
|
2567
|
+
var r = [
|
|
2557
2568
|
i.index,
|
|
2558
2569
|
i.offset,
|
|
2559
2570
|
i.value
|
|
2560
2571
|
].join("-");
|
|
2561
|
-
return [e,
|
|
2572
|
+
return [e, r].join(":");
|
|
2562
2573
|
}, t) : null;
|
|
2563
2574
|
}
|
|
2564
|
-
function
|
|
2565
|
-
const { index: t, offset: e, value: i, ...
|
|
2566
|
-
return
|
|
2575
|
+
function Ii(s) {
|
|
2576
|
+
const { index: t, offset: e, value: i, ...r } = s;
|
|
2577
|
+
return r;
|
|
2567
2578
|
}
|
|
2568
|
-
function
|
|
2579
|
+
function xi(s, t) {
|
|
2569
2580
|
var e = 0;
|
|
2570
2581
|
return Array.isArray(t) || (t = [t]), t.map(function(i) {
|
|
2571
2582
|
return i === null ? null : (typeof i == "string" && (i = {
|
|
@@ -2575,31 +2586,31 @@ function Oi(s, t) {
|
|
|
2575
2586
|
}), typeof i == "object" && (i.index = i.index || 0, e = e + i.index + i.offset, i.index = s.index + i.index, i.offset = i.offset || i.value.length), i);
|
|
2576
2587
|
});
|
|
2577
2588
|
}
|
|
2578
|
-
function
|
|
2589
|
+
function Ni(s, t) {
|
|
2579
2590
|
if (s.length == 0) return null;
|
|
2580
|
-
var e = "", i = 0,
|
|
2581
|
-
return s.forEach(function(
|
|
2591
|
+
var e = "", i = 0, r = s[0]?.index;
|
|
2592
|
+
return s.forEach(function(n, a) {
|
|
2582
2593
|
var o = s[a - 1];
|
|
2583
2594
|
s[a + 1];
|
|
2584
|
-
var
|
|
2585
|
-
e = e + new Array(
|
|
2586
|
-
var m =
|
|
2595
|
+
var h = o ? n.index + 1 - (o.index + o.offset) : 0;
|
|
2596
|
+
e = e + new Array(h).join(t) + n.value;
|
|
2597
|
+
var m = n.index - r + n.offset;
|
|
2587
2598
|
m > i && (i = m);
|
|
2588
2599
|
}), {
|
|
2589
2600
|
// Index equal is the one from the first token
|
|
2590
|
-
index:
|
|
2601
|
+
index: r,
|
|
2591
2602
|
value: e,
|
|
2592
2603
|
offset: Math.max(i, e.length)
|
|
2593
2604
|
};
|
|
2594
2605
|
}
|
|
2595
2606
|
const Q = {
|
|
2596
|
-
tokensId:
|
|
2597
|
-
normalize:
|
|
2598
|
-
properties:
|
|
2599
|
-
merge:
|
|
2607
|
+
tokensId: Ti,
|
|
2608
|
+
normalize: xi,
|
|
2609
|
+
properties: Ii,
|
|
2610
|
+
merge: Ni
|
|
2600
2611
|
};
|
|
2601
|
-
var
|
|
2602
|
-
"([^" +
|
|
2612
|
+
var Li = ' \r\n !"#$%&()*+,-.\\/:;<=>?@[\\]^_`{|}~', Oi = new RegExp(
|
|
2613
|
+
"([^" + Li + "]+)"
|
|
2603
2614
|
);
|
|
2604
2615
|
function z(s) {
|
|
2605
2616
|
if (!(this instanceof z)) return new z(s);
|
|
@@ -2613,58 +2624,58 @@ function z(s) {
|
|
|
2613
2624
|
}
|
|
2614
2625
|
z.prototype.split = function(t, e = {}) {
|
|
2615
2626
|
var i = this;
|
|
2616
|
-
return e = Object.assign({ preserveProperties: !0, cache: () => null }, e), function(
|
|
2627
|
+
return e = Object.assign({ preserveProperties: !0, cache: () => null }, e), function(r, n) {
|
|
2617
2628
|
if (arguments.length === 6) return t.apply(null, arguments);
|
|
2618
|
-
var a, o,
|
|
2619
|
-
if (
|
|
2620
|
-
if (typeof
|
|
2621
|
-
value:
|
|
2629
|
+
var a, o, h;
|
|
2630
|
+
if (r === void 0) return [];
|
|
2631
|
+
if (typeof r == "string" ? r = [{
|
|
2632
|
+
value: r,
|
|
2622
2633
|
index: 0,
|
|
2623
|
-
offset:
|
|
2624
|
-
}] : Array.isArray(
|
|
2625
|
-
return
|
|
2626
|
-
var m =
|
|
2627
|
-
var g =
|
|
2628
|
-
|
|
2629
|
-
Object.assign({},
|
|
2634
|
+
offset: r.length
|
|
2635
|
+
}] : Array.isArray(r) || (r = [r]), o = Q.tokensId(r, e.cache()), o && (h = i.opts.cacheGet(o), h))
|
|
2636
|
+
return h;
|
|
2637
|
+
var m = r.map(function(p, u) {
|
|
2638
|
+
var g = r[u + 1], v = t(
|
|
2639
|
+
p.value,
|
|
2640
|
+
Object.assign({}, p),
|
|
2630
2641
|
a ? Object.assign({}, a) : null,
|
|
2631
2642
|
g ? Object.assign({}, g) : null,
|
|
2632
|
-
|
|
2633
|
-
|
|
2643
|
+
u,
|
|
2644
|
+
r
|
|
2634
2645
|
) || [];
|
|
2635
|
-
if (
|
|
2636
|
-
var
|
|
2637
|
-
|
|
2638
|
-
return Object.assign({}, d,
|
|
2646
|
+
if (v = Q.normalize(p, v), e.preserveProperties) {
|
|
2647
|
+
var C = Q.properties(p);
|
|
2648
|
+
v = v.map(function(d) {
|
|
2649
|
+
return Object.assign({}, d, C);
|
|
2639
2650
|
});
|
|
2640
2651
|
}
|
|
2641
|
-
return a =
|
|
2652
|
+
return a = p, v;
|
|
2642
2653
|
}).filter(Boolean).flat();
|
|
2643
2654
|
return o && i.opts.cacheSet(o, m), m;
|
|
2644
2655
|
};
|
|
2645
2656
|
};
|
|
2646
2657
|
z.prototype.re = function(t, e = {}) {
|
|
2647
|
-
return e = Object.assign({ split: !1 }, e), this.split(function(i,
|
|
2648
|
-
for (var
|
|
2649
|
-
var m = o.index,
|
|
2650
|
-
if (e.split &&
|
|
2651
|
-
var
|
|
2658
|
+
return e = Object.assign({ split: !1 }, e), this.split(function(i, r) {
|
|
2659
|
+
for (var n = i, a = [], o, h = 0; o = t.exec(i); ) {
|
|
2660
|
+
var m = o.index, p = h + m, u = o[0] || "", g = u.length;
|
|
2661
|
+
if (e.split && h < p) {
|
|
2662
|
+
var v = n.slice(h, p);
|
|
2652
2663
|
a.push({
|
|
2653
|
-
value:
|
|
2654
|
-
index:
|
|
2655
|
-
offset:
|
|
2664
|
+
value: v,
|
|
2665
|
+
index: h,
|
|
2666
|
+
offset: v.length
|
|
2656
2667
|
});
|
|
2657
2668
|
}
|
|
2658
2669
|
a.push({
|
|
2659
|
-
value:
|
|
2660
|
-
index:
|
|
2670
|
+
value: u,
|
|
2671
|
+
index: p,
|
|
2661
2672
|
offset: g,
|
|
2662
2673
|
match: o
|
|
2663
|
-
}), i = i.slice(m + g),
|
|
2674
|
+
}), i = i.slice(m + g), h = p + g;
|
|
2664
2675
|
}
|
|
2665
2676
|
return e.split && i && a.push({
|
|
2666
2677
|
value: i,
|
|
2667
|
-
index:
|
|
2678
|
+
index: h,
|
|
2668
2679
|
offset: i.length
|
|
2669
2680
|
}), a;
|
|
2670
2681
|
}, {
|
|
@@ -2675,20 +2686,20 @@ z.prototype.re = function(t, e = {}) {
|
|
|
2675
2686
|
};
|
|
2676
2687
|
z.prototype.splitAndMerge = function(t, e = {}) {
|
|
2677
2688
|
var i = this;
|
|
2678
|
-
return e = Object.assign({ mergeWith: "" }, e), function(
|
|
2679
|
-
var
|
|
2689
|
+
return e = Object.assign({ mergeWith: "" }, e), function(r) {
|
|
2690
|
+
var n = [], a = [];
|
|
2680
2691
|
function o() {
|
|
2681
2692
|
if (a.length != 0) {
|
|
2682
|
-
var
|
|
2683
|
-
|
|
2693
|
+
var h = Q.merge(a, e.mergeWith);
|
|
2694
|
+
n.push(h), a = [];
|
|
2684
2695
|
}
|
|
2685
2696
|
}
|
|
2686
|
-
return i.split(function(
|
|
2687
|
-
var
|
|
2688
|
-
|
|
2689
|
-
|
|
2697
|
+
return i.split(function(h, m) {
|
|
2698
|
+
var p = t.apply(null, arguments);
|
|
2699
|
+
p = Q.normalize(m, p), p.forEach(function(u) {
|
|
2700
|
+
u === null ? o() : a.push(u);
|
|
2690
2701
|
});
|
|
2691
|
-
})(
|
|
2702
|
+
})(r), o(), n;
|
|
2692
2703
|
};
|
|
2693
2704
|
};
|
|
2694
2705
|
z.prototype.filter = function(t) {
|
|
@@ -2703,20 +2714,20 @@ z.prototype.filter = function(t) {
|
|
|
2703
2714
|
};
|
|
2704
2715
|
z.prototype.extend = function(t) {
|
|
2705
2716
|
return this.split(function(e, i) {
|
|
2706
|
-
var
|
|
2717
|
+
var r = typeof t == "function" ? t.apply(null, arguments) : t;
|
|
2707
2718
|
return Object.assign({
|
|
2708
2719
|
value: i.value,
|
|
2709
2720
|
index: 0,
|
|
2710
2721
|
offset: i.offset
|
|
2711
|
-
},
|
|
2722
|
+
}, r);
|
|
2712
2723
|
});
|
|
2713
2724
|
};
|
|
2714
2725
|
z.prototype.ifthen = function(s, t) {
|
|
2715
2726
|
return this.split(function(e, i) {
|
|
2716
2727
|
if (s.apply(null, arguments))
|
|
2717
2728
|
return t.apply(null, arguments);
|
|
2718
|
-
const { index:
|
|
2719
|
-
return
|
|
2729
|
+
const { index: r, ...n } = i;
|
|
2730
|
+
return n;
|
|
2720
2731
|
});
|
|
2721
2732
|
};
|
|
2722
2733
|
z.prototype.test = function(t) {
|
|
@@ -2727,11 +2738,11 @@ z.prototype.test = function(t) {
|
|
|
2727
2738
|
});
|
|
2728
2739
|
};
|
|
2729
2740
|
z.prototype.flow = function(...t) {
|
|
2730
|
-
const e = t.reduce((i,
|
|
2741
|
+
const e = t.reduce((i, r) => (...n) => r(i(...n)));
|
|
2731
2742
|
return this.split(e);
|
|
2732
2743
|
};
|
|
2733
2744
|
z.prototype.serie = function(...t) {
|
|
2734
|
-
return t.reduce((e, i) => (...
|
|
2745
|
+
return t.reduce((e, i) => (...r) => i(e(...r)));
|
|
2735
2746
|
};
|
|
2736
2747
|
z.prototype.merge = function() {
|
|
2737
2748
|
return this.splitAndMerge((s) => [s]);
|
|
@@ -2740,14 +2751,14 @@ z.prototype.sections = function() {
|
|
|
2740
2751
|
return this.re(/([^\n\.,;!?]+)/i, { split: !1 });
|
|
2741
2752
|
};
|
|
2742
2753
|
z.prototype.words = function() {
|
|
2743
|
-
return this.re(
|
|
2754
|
+
return this.re(Oi);
|
|
2744
2755
|
};
|
|
2745
2756
|
z.prototype.characters = function() {
|
|
2746
2757
|
return this.re(/[^\s]/);
|
|
2747
2758
|
};
|
|
2748
|
-
var
|
|
2749
|
-
const
|
|
2750
|
-
class
|
|
2759
|
+
var zi = /* @__PURE__ */ ((s) => (s.Word = "word", s.Sentence = "sentence", s.Paragraph = "paragraph", s))(zi || {});
|
|
2760
|
+
const Ri = (s, t) => "Segmenter" in Intl ? new Ci(s, t) : new Pi(s, t);
|
|
2761
|
+
class Ci {
|
|
2751
2762
|
constructor(t, e) {
|
|
2752
2763
|
if (this.unit = e, t = t ?? navigator?.language, !("Segmenter" in Intl)) throw new Error("Intl.Segmenter is not supported in this environment");
|
|
2753
2764
|
if (e === "paragraph") throw new Error("IntlTextTokenizer does not handle TextUnit.Paragraph");
|
|
@@ -2757,15 +2768,15 @@ class Di {
|
|
|
2757
2768
|
}
|
|
2758
2769
|
tokenize(t) {
|
|
2759
2770
|
const e = this.segmenter.segment(t), i = [];
|
|
2760
|
-
for (let
|
|
2761
|
-
if (this.unit === "word" &&
|
|
2762
|
-
const
|
|
2763
|
-
|
|
2771
|
+
for (let r of e) {
|
|
2772
|
+
if (this.unit === "word" && r.isWordLike === !1) continue;
|
|
2773
|
+
const n = fe(r.segment);
|
|
2774
|
+
n !== null && i.push([r.index, r.index + n.length]);
|
|
2764
2775
|
}
|
|
2765
2776
|
return i;
|
|
2766
2777
|
}
|
|
2767
2778
|
}
|
|
2768
|
-
class
|
|
2779
|
+
class Pi {
|
|
2769
2780
|
constructor(t, e) {
|
|
2770
2781
|
if (this.unit = e, t = t ?? navigator?.language, this.isEnglish = t.toLowerCase().split("-")[0] === "en", e === "paragraph") throw new Error("NaiveTextTokenizer does not handle TextUnit.Paragraph");
|
|
2771
2782
|
this.tokenizer = new z();
|
|
@@ -2777,27 +2788,27 @@ class Ui {
|
|
|
2777
2788
|
e = this.tokenizer.words()(t);
|
|
2778
2789
|
break;
|
|
2779
2790
|
case "sentence":
|
|
2780
|
-
this.isEnglish ? e =
|
|
2791
|
+
this.isEnglish ? e = Ei(this.tokenizer).sentences()(t) : e = this.tokenizer.sections()(t);
|
|
2781
2792
|
break;
|
|
2782
2793
|
default:
|
|
2783
2794
|
e = [];
|
|
2784
2795
|
}
|
|
2785
2796
|
if (!e) return [];
|
|
2786
2797
|
const i = [];
|
|
2787
|
-
return e.forEach((
|
|
2788
|
-
if (
|
|
2789
|
-
const
|
|
2790
|
-
|
|
2798
|
+
return e.forEach((r) => {
|
|
2799
|
+
if (r.value.length === 0) return;
|
|
2800
|
+
const n = fe(r.value);
|
|
2801
|
+
n !== null && i.push([r.index, r.index + n.length]);
|
|
2791
2802
|
}), i;
|
|
2792
2803
|
}
|
|
2793
2804
|
}
|
|
2794
|
-
const
|
|
2805
|
+
const ki = new RegExp("[\\p{L}\\p{N}]+", "u"), fe = (s) => {
|
|
2795
2806
|
const t = s.trimEnd();
|
|
2796
|
-
return t.length === 0 || t.match(
|
|
2807
|
+
return t.length === 0 || t.match(ki) === null ? null : t;
|
|
2797
2808
|
};
|
|
2798
|
-
class
|
|
2809
|
+
class V {
|
|
2799
2810
|
constructor(t) {
|
|
2800
|
-
this.fetcher = new
|
|
2811
|
+
this.fetcher = new ti(), t.fetcher && (this.fetcher = t.fetcher), this.manifest = t.manifest, this.context = t.manifest.context, this.metadata = t.manifest.metadata, this.links = t.manifest.links, this.readingOrder = t.manifest.readingOrder, this.resources = t.manifest.resources, this.toc = t.manifest.toc, this.subcollections = t.manifest.subcollections;
|
|
2801
2812
|
}
|
|
2802
2813
|
/** The URL where this publication is served, computed from the `Link` with `self` relation.
|
|
2803
2814
|
* e.g. https://provider.com/pub1293/manifest.json gives https://provider.com/pub1293/
|
|
@@ -2849,15 +2860,15 @@ class Y {
|
|
|
2849
2860
|
if (i || (i = this.manifest.links.findWithMediaType(
|
|
2850
2861
|
"application/guided-navigation+json"
|
|
2851
2862
|
)), !i) return;
|
|
2852
|
-
let
|
|
2863
|
+
let r = i.href;
|
|
2853
2864
|
if (i.templated) {
|
|
2854
|
-
const a = new
|
|
2855
|
-
a.parameters.has("ref") && (o.ref = t.href),
|
|
2865
|
+
const a = new ht(r), o = {};
|
|
2866
|
+
a.parameters.has("ref") && (o.ref = t.href), r = new ht(r).expand(o);
|
|
2856
2867
|
}
|
|
2857
|
-
const
|
|
2858
|
-
href:
|
|
2868
|
+
const n = await this.get(new U({
|
|
2869
|
+
href: r
|
|
2859
2870
|
})).readAsJSON();
|
|
2860
|
-
return
|
|
2871
|
+
return $t.deserialize(n);
|
|
2861
2872
|
}
|
|
2862
2873
|
/**
|
|
2863
2874
|
* Returns the resource targeted by the given non-templated [link].
|
|
@@ -2866,22 +2877,22 @@ class Y {
|
|
|
2866
2877
|
return this.fetcher.get(t);
|
|
2867
2878
|
}
|
|
2868
2879
|
}
|
|
2869
|
-
|
|
2880
|
+
V.prototype.getPageList = function() {
|
|
2870
2881
|
return this.linksWithRole("pageList");
|
|
2871
2882
|
};
|
|
2872
|
-
|
|
2883
|
+
V.prototype.getLandmarks = function() {
|
|
2873
2884
|
return this.linksWithRole("landmarks");
|
|
2874
2885
|
};
|
|
2875
|
-
|
|
2886
|
+
V.prototype.getListOfAudioClips = function() {
|
|
2876
2887
|
return this.linksWithRole("loa");
|
|
2877
2888
|
};
|
|
2878
|
-
|
|
2889
|
+
V.prototype.getListOfIllustrations = function() {
|
|
2879
2890
|
return this.linksWithRole("loi");
|
|
2880
2891
|
};
|
|
2881
|
-
|
|
2892
|
+
V.prototype.getListOfTables = function() {
|
|
2882
2893
|
return this.linksWithRole("lot");
|
|
2883
2894
|
};
|
|
2884
|
-
|
|
2895
|
+
V.prototype.getListOfVideoClips = function() {
|
|
2885
2896
|
return this.linksWithRole("lov");
|
|
2886
2897
|
};
|
|
2887
2898
|
class mt {
|
|
@@ -3058,7 +3069,7 @@ class Zt {
|
|
|
3058
3069
|
return this.total !== void 0 && (t.total = this.total), this.position !== void 0 && (t.position = this.position), t;
|
|
3059
3070
|
}
|
|
3060
3071
|
}
|
|
3061
|
-
class
|
|
3072
|
+
class Jt {
|
|
3062
3073
|
/** Creates a [Copies]. */
|
|
3063
3074
|
constructor(t) {
|
|
3064
3075
|
this.total = t.total, this.available = t.available;
|
|
@@ -3068,7 +3079,7 @@ class _t {
|
|
|
3068
3079
|
*/
|
|
3069
3080
|
static deserialize(t) {
|
|
3070
3081
|
if (t)
|
|
3071
|
-
return new
|
|
3082
|
+
return new Jt({
|
|
3072
3083
|
total: L(t.total),
|
|
3073
3084
|
available: L(t.available)
|
|
3074
3085
|
});
|
|
@@ -3081,8 +3092,8 @@ class _t {
|
|
|
3081
3092
|
return this.total !== void 0 && (t.total = this.total), this.available !== void 0 && (t.available = this.available), t;
|
|
3082
3093
|
}
|
|
3083
3094
|
}
|
|
3084
|
-
var
|
|
3085
|
-
class
|
|
3095
|
+
var Di = /* @__PURE__ */ ((s) => (s.available = "available", s.reserved = "reserved", s.ready = "ready", s))(Di || {});
|
|
3096
|
+
class qt {
|
|
3086
3097
|
/** Creates a [Availability]. */
|
|
3087
3098
|
constructor(t) {
|
|
3088
3099
|
this.state = t.state, this.since = t.since, this.until = t.until;
|
|
@@ -3092,7 +3103,7 @@ class Jt {
|
|
|
3092
3103
|
*/
|
|
3093
3104
|
static deserialize(t) {
|
|
3094
3105
|
if (t && t.state)
|
|
3095
|
-
return new
|
|
3106
|
+
return new qt({
|
|
3096
3107
|
state: t.state,
|
|
3097
3108
|
since: ct(t.since),
|
|
3098
3109
|
until: ct(t.until)
|
|
@@ -3121,18 +3132,18 @@ D.prototype.getHolds = function() {
|
|
|
3121
3132
|
return Zt.deserialize(this.otherProperties.holds);
|
|
3122
3133
|
};
|
|
3123
3134
|
D.prototype.getCopies = function() {
|
|
3124
|
-
return
|
|
3135
|
+
return Jt.deserialize(this.otherProperties.copies);
|
|
3125
3136
|
};
|
|
3126
3137
|
D.prototype.getAvailability = function() {
|
|
3127
|
-
return
|
|
3138
|
+
return qt.deserialize(this.otherProperties.availability);
|
|
3128
3139
|
};
|
|
3129
3140
|
D.prototype.getAuthenticate = function() {
|
|
3130
3141
|
return U.deserialize(this.otherProperties.authenticate);
|
|
3131
3142
|
};
|
|
3132
|
-
|
|
3143
|
+
V.prototype.getImages = function() {
|
|
3133
3144
|
return this.linksWithRole("images");
|
|
3134
3145
|
};
|
|
3135
|
-
class
|
|
3146
|
+
class nr {
|
|
3136
3147
|
/**
|
|
3137
3148
|
* Extracts the full raw text, or returns null if no text content can be found.
|
|
3138
3149
|
* @param separator Separator to use between individual elements. Defaults to newline.
|
|
@@ -3151,13 +3162,13 @@ class ln {
|
|
|
3151
3162
|
return t;
|
|
3152
3163
|
}
|
|
3153
3164
|
}
|
|
3154
|
-
class
|
|
3165
|
+
class ae {
|
|
3155
3166
|
constructor(t, e) {
|
|
3156
3167
|
this.key = t, this.value = e;
|
|
3157
3168
|
}
|
|
3158
3169
|
}
|
|
3159
3170
|
var Ot = /* @__PURE__ */ ((s) => (s.ACCESSIBILITY_LABEL = "accessibilityLabel", s.LANGUAGE = "language", s))(Ot || {});
|
|
3160
|
-
class
|
|
3171
|
+
class pe {
|
|
3161
3172
|
constructor(t = []) {
|
|
3162
3173
|
this._attributes = t;
|
|
3163
3174
|
}
|
|
@@ -3186,12 +3197,12 @@ class de {
|
|
|
3186
3197
|
return this._attributes.filter((e) => e.key === t).map((e) => e.value);
|
|
3187
3198
|
}
|
|
3188
3199
|
}
|
|
3189
|
-
class
|
|
3200
|
+
class me extends pe {
|
|
3190
3201
|
constructor(t, e = []) {
|
|
3191
3202
|
super(e), this.locator = t;
|
|
3192
3203
|
}
|
|
3193
3204
|
}
|
|
3194
|
-
class
|
|
3205
|
+
class vt extends me {
|
|
3195
3206
|
/**
|
|
3196
3207
|
* Human-readable text representation for this element.
|
|
3197
3208
|
*/
|
|
@@ -3199,38 +3210,38 @@ class At extends pe {
|
|
|
3199
3210
|
return this.accessibilityLabel;
|
|
3200
3211
|
}
|
|
3201
3212
|
}
|
|
3202
|
-
class
|
|
3213
|
+
class Ui extends vt {
|
|
3203
3214
|
constructor(t, e, i = []) {
|
|
3204
3215
|
super(t, i), this.embeddedLink = e;
|
|
3205
3216
|
}
|
|
3206
3217
|
}
|
|
3207
|
-
class
|
|
3218
|
+
class Mi extends vt {
|
|
3208
3219
|
constructor(t, e, i = []) {
|
|
3209
3220
|
super(t, i), this.embeddedLink = e;
|
|
3210
3221
|
}
|
|
3211
3222
|
}
|
|
3212
|
-
class
|
|
3213
|
-
constructor(t, e, i,
|
|
3214
|
-
super(t,
|
|
3223
|
+
class Bi extends vt {
|
|
3224
|
+
constructor(t, e, i, r = []) {
|
|
3225
|
+
super(t, r), this.embeddedLink = e, this.caption = i;
|
|
3215
3226
|
}
|
|
3216
3227
|
get text() {
|
|
3217
3228
|
return (this.caption?.length || 0) > 0 ? this.caption : super.text;
|
|
3218
3229
|
}
|
|
3219
3230
|
}
|
|
3220
|
-
class
|
|
3231
|
+
class ge extends pe {
|
|
3221
3232
|
constructor(t, e, i = []) {
|
|
3222
3233
|
super(i), this.locator = t, this.text = e;
|
|
3223
3234
|
}
|
|
3224
3235
|
}
|
|
3225
|
-
class zt extends
|
|
3226
|
-
constructor(t, e, i,
|
|
3227
|
-
super(t,
|
|
3236
|
+
class zt extends vt {
|
|
3237
|
+
constructor(t, e, i, r = []) {
|
|
3238
|
+
super(t, r), this.role = e, this.segments = i;
|
|
3228
3239
|
}
|
|
3229
3240
|
get text() {
|
|
3230
3241
|
return this.segments.map((t) => t.text).join("");
|
|
3231
3242
|
}
|
|
3232
3243
|
}
|
|
3233
|
-
class
|
|
3244
|
+
class Gi {
|
|
3234
3245
|
constructor(t) {
|
|
3235
3246
|
this.level = t;
|
|
3236
3247
|
}
|
|
@@ -3238,17 +3249,17 @@ class Fi {
|
|
|
3238
3249
|
return `heading-${this.level}`;
|
|
3239
3250
|
}
|
|
3240
3251
|
}
|
|
3241
|
-
const
|
|
3252
|
+
const Wi = {
|
|
3242
3253
|
role: "body"
|
|
3243
|
-
},
|
|
3254
|
+
}, Hi = {
|
|
3244
3255
|
role: "footnote"
|
|
3245
3256
|
};
|
|
3246
|
-
class
|
|
3257
|
+
class Fi {
|
|
3247
3258
|
constructor(t, e) {
|
|
3248
3259
|
this.referenceUrl = t, this.referenceTitle = e, this.role = "quote";
|
|
3249
3260
|
}
|
|
3250
3261
|
}
|
|
3251
|
-
class
|
|
3262
|
+
class ar {
|
|
3252
3263
|
/**
|
|
3253
3264
|
*
|
|
3254
3265
|
* @param defaultLanguage The default assumed language
|
|
@@ -3256,8 +3267,8 @@ class un {
|
|
|
3256
3267
|
* @param contextSnippetLength Length of `before` and `after` snippets in the produced [Locator]s.
|
|
3257
3268
|
* @param textTokenizerFactory Factory to create a [TextTokenizer] from, using the specified language and unit.
|
|
3258
3269
|
*/
|
|
3259
|
-
constructor(t, e, i = 50,
|
|
3260
|
-
this.defaultLanguage = t, this.contextSnippetLength = i, this.textTokenizerFactory =
|
|
3270
|
+
constructor(t, e, i = 50, r = (n) => Ri(n, e)) {
|
|
3271
|
+
this.defaultLanguage = t, this.contextSnippetLength = i, this.textTokenizerFactory = r;
|
|
3261
3272
|
}
|
|
3262
3273
|
tokenize(t) {
|
|
3263
3274
|
return t instanceof zt ? [
|
|
@@ -3269,7 +3280,7 @@ class un {
|
|
|
3269
3280
|
] : [t];
|
|
3270
3281
|
}
|
|
3271
3282
|
tokenizeSegment(t) {
|
|
3272
|
-
return this.textTokenizerFactory(t.language ?? this.defaultLanguage).tokenize(t.text).map((e) => new
|
|
3283
|
+
return this.textTokenizerFactory(t.language ?? this.defaultLanguage).tokenize(t.text).map((e) => new ge(
|
|
3273
3284
|
new k({
|
|
3274
3285
|
href: t.locator.href,
|
|
3275
3286
|
type: t.locator.type,
|
|
@@ -3282,10 +3293,10 @@ class un {
|
|
|
3282
3293
|
));
|
|
3283
3294
|
}
|
|
3284
3295
|
extractTextContextIn(t, e) {
|
|
3285
|
-
const i = t.substring(e[1], e[1] + this.contextSnippetLength),
|
|
3286
|
-
return new
|
|
3296
|
+
const i = t.substring(e[1], e[1] + this.contextSnippetLength), r = t.substring(e[0] - this.contextSnippetLength, e[0]);
|
|
3297
|
+
return new rt({
|
|
3287
3298
|
after: i.length > 0 ? i : void 0,
|
|
3288
|
-
before:
|
|
3299
|
+
before: r.length > 0 ? r : void 0,
|
|
3289
3300
|
highlight: t.substring(e[0], e[1])
|
|
3290
3301
|
});
|
|
3291
3302
|
}
|
|
@@ -3309,12 +3320,12 @@ class Qt {
|
|
|
3309
3320
|
return await this.hasPrevious() ? this.previous() : null;
|
|
3310
3321
|
}
|
|
3311
3322
|
}
|
|
3312
|
-
let
|
|
3323
|
+
let _i = class {
|
|
3313
3324
|
constructor(t, e) {
|
|
3314
3325
|
this.element = t, this.direction = e;
|
|
3315
3326
|
}
|
|
3316
3327
|
};
|
|
3317
|
-
class
|
|
3328
|
+
class cr extends Qt {
|
|
3318
3329
|
constructor(t, e, i) {
|
|
3319
3330
|
super(), this.publication = t, this.startLocator = e, this.resourceContentIteratorFactories = i, this._currentIterator = null, this.currentElement = null;
|
|
3320
3331
|
}
|
|
@@ -3343,10 +3354,10 @@ class dn extends Qt {
|
|
|
3343
3354
|
if (!e) return null;
|
|
3344
3355
|
const i = await e.nextContentIn(t);
|
|
3345
3356
|
if (!i) {
|
|
3346
|
-
const
|
|
3347
|
-
return
|
|
3357
|
+
const r = this.nextIteratorIn(t, e.index);
|
|
3358
|
+
return r ? (this._currentIterator = r, this.nextIn(t)) : null;
|
|
3348
3359
|
}
|
|
3349
|
-
return new
|
|
3360
|
+
return new _i(i, t);
|
|
3350
3361
|
}
|
|
3351
3362
|
/**
|
|
3352
3363
|
* Returns the [Iterator] for the current [Resource] in the reading order.
|
|
@@ -3367,25 +3378,25 @@ class dn extends Qt {
|
|
|
3367
3378
|
nextIteratorIn(t, e) {
|
|
3368
3379
|
const i = e + t;
|
|
3369
3380
|
if (i < 0 || i >= this.publication.manifest.readingOrder.items.length) return null;
|
|
3370
|
-
const
|
|
3371
|
-
return this.loadIteratorAt(i,
|
|
3381
|
+
const r = t === 1 ? 0 : 1;
|
|
3382
|
+
return this.loadIteratorAt(i, r) ?? this.nextIteratorIn(t, i);
|
|
3372
3383
|
}
|
|
3373
3384
|
/**
|
|
3374
3385
|
* Loads the iterator at the given [index] in the reading order.
|
|
3375
3386
|
* The [location] will be used to compute the starting [Locator] for the iterator.
|
|
3376
3387
|
*/
|
|
3377
3388
|
loadIteratorAt(t, e) {
|
|
3378
|
-
const i = this.publication.readingOrder.items[t],
|
|
3389
|
+
const i = this.publication.readingOrder.items[t], r = typeof e == "number" ? this.publication.manifest.locatorFromLink(i)?.copyWithLocations({
|
|
3379
3390
|
progression: e
|
|
3380
3391
|
}) : e;
|
|
3381
|
-
if (!
|
|
3382
|
-
const
|
|
3392
|
+
if (!r) return null;
|
|
3393
|
+
const n = this.publication.get(i);
|
|
3383
3394
|
for (const a of this.resourceContentIteratorFactories)
|
|
3384
|
-
a(
|
|
3395
|
+
a(n, r);
|
|
3385
3396
|
return null;
|
|
3386
3397
|
}
|
|
3387
3398
|
}
|
|
3388
|
-
class wt extends
|
|
3399
|
+
class wt extends me {
|
|
3389
3400
|
constructor(t, e, i = []) {
|
|
3390
3401
|
super(t, i), this.element = e;
|
|
3391
3402
|
}
|
|
@@ -3393,25 +3404,25 @@ class wt extends pe {
|
|
|
3393
3404
|
return this.element.text;
|
|
3394
3405
|
}
|
|
3395
3406
|
}
|
|
3396
|
-
class
|
|
3407
|
+
class oe {
|
|
3397
3408
|
constructor(t, e) {
|
|
3398
3409
|
this.element = t, this.direction = e;
|
|
3399
3410
|
}
|
|
3400
3411
|
}
|
|
3401
|
-
class
|
|
3412
|
+
class lr extends Qt {
|
|
3402
3413
|
constructor(t, e) {
|
|
3403
3414
|
super(), this.pageContent = t, this.startLocator = e, this.pageContentFiltered = [], this.currentElement = null, this.currentProgression = 0, this.currentElementIndex = 0;
|
|
3404
3415
|
const i = this.pageContent.filter(
|
|
3405
|
-
(
|
|
3416
|
+
(r) => r?.str !== " " && r?.str !== ""
|
|
3406
3417
|
);
|
|
3407
|
-
if (this.pageContentFiltered = i.map((
|
|
3408
|
-
index: i.indexOf(
|
|
3409
|
-
text:
|
|
3410
|
-
readingDirection:
|
|
3418
|
+
if (this.pageContentFiltered = i.map((r) => new wt(r.locator, {
|
|
3419
|
+
index: i.indexOf(r),
|
|
3420
|
+
text: r.str,
|
|
3421
|
+
readingDirection: r.dir
|
|
3411
3422
|
})), this.startLocator && (this.currentProgression = this.startLocator?.locations?.progression || 0, this.updateElementIndex()), this.pageContentFiltered.length > 0) {
|
|
3412
|
-
const
|
|
3413
|
-
(
|
|
3414
|
-
this.pageContentFiltered[
|
|
3423
|
+
const r = this.currentElementIndex;
|
|
3424
|
+
(r || r === 0) && (this.currentElement = new oe(
|
|
3425
|
+
this.pageContentFiltered[r],
|
|
3415
3426
|
1
|
|
3416
3427
|
/* Forward */
|
|
3417
3428
|
));
|
|
@@ -3460,7 +3471,7 @@ class pn extends Qt {
|
|
|
3460
3471
|
const e = this.currentElementIndex;
|
|
3461
3472
|
if (e === null || e === this.pageContentFiltered.length - 1 && t === 1 || e === 0 && t === -1) return null;
|
|
3462
3473
|
const i = this.pageContentFiltered[e + t];
|
|
3463
|
-
return i ? new
|
|
3474
|
+
return i ? new oe(i, t) : null;
|
|
3464
3475
|
}
|
|
3465
3476
|
/**
|
|
3466
3477
|
* Updates the current [PDFReadableElement] position in the pageContentFiltered array
|
|
@@ -3470,7 +3481,7 @@ class pn extends Qt {
|
|
|
3470
3481
|
return this.currentProgression === 0 ? 0 : this.currentProgression < 0 || this.currentProgression >= 100 ? null : Math.floor(this.currentProgression * this.pageContentFiltered.length / 100);
|
|
3471
3482
|
}
|
|
3472
3483
|
}
|
|
3473
|
-
const
|
|
3484
|
+
const Vi = [
|
|
3474
3485
|
"OBJECT",
|
|
3475
3486
|
"BASE",
|
|
3476
3487
|
"FONT",
|
|
@@ -3538,8 +3549,8 @@ const Xi = [
|
|
|
3538
3549
|
"NOBR",
|
|
3539
3550
|
"RB"
|
|
3540
3551
|
];
|
|
3541
|
-
function
|
|
3542
|
-
return
|
|
3552
|
+
function ce(s) {
|
|
3553
|
+
return Vi.includes(s.nodeName.toUpperCase());
|
|
3543
3554
|
}
|
|
3544
3555
|
function St(s, t) {
|
|
3545
3556
|
const e = s.getAttribute("src");
|
|
@@ -3550,15 +3561,15 @@ function St(s, t) {
|
|
|
3550
3561
|
return e;
|
|
3551
3562
|
}
|
|
3552
3563
|
}
|
|
3553
|
-
const it = "[\\s\\u0085\\u00A0\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000]",
|
|
3564
|
+
const it = "[\\s\\u0085\\u00A0\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000]", Yi = new RegExp(`^${it}+$`, "g"), $i = new RegExp(`^${it}+|${it}+$/g`, "g"), be = new RegExp(`^${it}+`, "g"), Ae = new RegExp(`${it}+$`, "g"), ot = (s) => (
|
|
3554
3565
|
// Normal spaces, \t, \n, \v, \f, \r, U+0085, U+00A0, U+2000 to U+200A, U+2028, U+2029, U+202F, U+205F, U+3000
|
|
3555
|
-
s?.length ?
|
|
3556
|
-
),
|
|
3557
|
-
before: t + (
|
|
3558
|
-
highlight:
|
|
3559
|
-
after:
|
|
3566
|
+
s?.length ? Yi.test(s) : !0
|
|
3567
|
+
), ve = (s) => s.replace($i, ""), Xi = (s) => s.replace(be, ""), Ki = (s) => s.replace(Ae, ""), le = (s, t = "") => new rt({
|
|
3568
|
+
before: t + (be.exec(s)?.[0] ?? ""),
|
|
3569
|
+
highlight: ve(s),
|
|
3570
|
+
after: Ae.exec(s)?.[0] ?? ""
|
|
3560
3571
|
});
|
|
3561
|
-
function
|
|
3572
|
+
function Zi(s) {
|
|
3562
3573
|
for (; s; ) {
|
|
3563
3574
|
let t = s.getAttribute("lang") || s.getAttributeNS("http://www.w3.org/1999/xhtml", "lang") || s.getAttributeNS("http://www.w3.org/XML/1998/namespace", "lang");
|
|
3564
3575
|
if (t) return t;
|
|
@@ -3566,21 +3577,21 @@ function Qi(s) {
|
|
|
3566
3577
|
}
|
|
3567
3578
|
return null;
|
|
3568
3579
|
}
|
|
3569
|
-
function
|
|
3580
|
+
function Ji(s, t) {
|
|
3570
3581
|
const e = s.length > 0 && s[s.length - 1] === " ";
|
|
3571
|
-
let i = !1,
|
|
3572
|
-
for (let
|
|
3573
|
-
if (ot(t[
|
|
3574
|
-
if (e && !
|
|
3582
|
+
let i = !1, r = !1;
|
|
3583
|
+
for (let n = 0; n < t.length; n++)
|
|
3584
|
+
if (ot(t[n])) {
|
|
3585
|
+
if (e && !r || i)
|
|
3575
3586
|
continue;
|
|
3576
3587
|
s += " ", i = !0;
|
|
3577
3588
|
} else {
|
|
3578
|
-
const a = t.charCodeAt(
|
|
3579
|
-
a !== 8203 && a !== 173 && (s += t[
|
|
3589
|
+
const a = t.charCodeAt(n);
|
|
3590
|
+
a !== 8203 && a !== 173 && (s += t[n], i = !1, r = !0);
|
|
3580
3591
|
}
|
|
3581
3592
|
return s;
|
|
3582
3593
|
}
|
|
3583
|
-
function
|
|
3594
|
+
function ye(s) {
|
|
3584
3595
|
return typeof s == "object" && s !== null && s.nodeType === Node.ELEMENT_NODE;
|
|
3585
3596
|
}
|
|
3586
3597
|
const gt = {
|
|
@@ -3595,14 +3606,14 @@ const gt = {
|
|
|
3595
3606
|
nthchild: "nthchild",
|
|
3596
3607
|
nthoftype: "nthoftype"
|
|
3597
3608
|
};
|
|
3598
|
-
function
|
|
3609
|
+
function qi(s, t) {
|
|
3599
3610
|
return Object.values(s).includes(t);
|
|
3600
3611
|
}
|
|
3601
|
-
const
|
|
3612
|
+
const Qi = "CssSelectorGenerator";
|
|
3602
3613
|
function bt(s = "unknown problem", ...t) {
|
|
3603
|
-
console.warn(`${
|
|
3614
|
+
console.warn(`${Qi}: ${s}`, ...t);
|
|
3604
3615
|
}
|
|
3605
|
-
const
|
|
3616
|
+
const ji = {
|
|
3606
3617
|
selectors: [
|
|
3607
3618
|
E.id,
|
|
3608
3619
|
E.class,
|
|
@@ -3620,46 +3631,46 @@ const is = {
|
|
|
3620
3631
|
maxCandidates: Number.POSITIVE_INFINITY,
|
|
3621
3632
|
useScope: !1
|
|
3622
3633
|
};
|
|
3623
|
-
function
|
|
3624
|
-
return Array.isArray(s) ? s.filter((t) =>
|
|
3634
|
+
function ts(s) {
|
|
3635
|
+
return Array.isArray(s) ? s.filter((t) => qi(E, t)) : [];
|
|
3625
3636
|
}
|
|
3626
|
-
function
|
|
3637
|
+
function we(s) {
|
|
3627
3638
|
return s instanceof RegExp;
|
|
3628
3639
|
}
|
|
3629
|
-
function
|
|
3630
|
-
return ["string", "function"].includes(typeof s) ||
|
|
3640
|
+
function es(s) {
|
|
3641
|
+
return ["string", "function"].includes(typeof s) || we(s);
|
|
3631
3642
|
}
|
|
3632
|
-
function
|
|
3633
|
-
return Array.isArray(s) ? s.filter(
|
|
3643
|
+
function he(s) {
|
|
3644
|
+
return Array.isArray(s) ? s.filter(es) : [];
|
|
3634
3645
|
}
|
|
3635
|
-
function
|
|
3646
|
+
function is(s) {
|
|
3636
3647
|
return s instanceof Node;
|
|
3637
3648
|
}
|
|
3638
|
-
function
|
|
3649
|
+
function ue(s) {
|
|
3639
3650
|
const t = [
|
|
3640
3651
|
Node.DOCUMENT_NODE,
|
|
3641
3652
|
Node.DOCUMENT_FRAGMENT_NODE,
|
|
3642
3653
|
// this includes Shadow DOM root
|
|
3643
3654
|
Node.ELEMENT_NODE
|
|
3644
3655
|
];
|
|
3645
|
-
return
|
|
3656
|
+
return is(s) && t.includes(s.nodeType);
|
|
3646
3657
|
}
|
|
3647
|
-
function
|
|
3648
|
-
if (
|
|
3658
|
+
function Se(s, t) {
|
|
3659
|
+
if (ue(s))
|
|
3649
3660
|
return s.contains(t) || bt("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 not work as intended."), s;
|
|
3650
3661
|
const e = t.getRootNode({ composed: !1 });
|
|
3651
|
-
return
|
|
3662
|
+
return ue(e) ? (e !== document && bt("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."), e) : te(t);
|
|
3652
3663
|
}
|
|
3653
3664
|
function Et(s) {
|
|
3654
3665
|
return typeof s == "number" ? s : Number.POSITIVE_INFINITY;
|
|
3655
3666
|
}
|
|
3656
|
-
function
|
|
3657
|
-
const e = Object.assign(Object.assign({},
|
|
3667
|
+
function ss(s, t = {}) {
|
|
3668
|
+
const e = Object.assign(Object.assign({}, ji), t);
|
|
3658
3669
|
return {
|
|
3659
|
-
selectors:
|
|
3660
|
-
whitelist:
|
|
3661
|
-
blacklist:
|
|
3662
|
-
root:
|
|
3670
|
+
selectors: ts(e.selectors),
|
|
3671
|
+
whitelist: he(e.whitelist),
|
|
3672
|
+
blacklist: he(e.blacklist),
|
|
3673
|
+
root: Se(e.root, s),
|
|
3663
3674
|
combineWithinSelector: !!e.combineWithinSelector,
|
|
3664
3675
|
combineBetweenSelectors: !!e.combineBetweenSelectors,
|
|
3665
3676
|
includeTag: !!e.includeTag,
|
|
@@ -3669,116 +3680,116 @@ function as(s, t = {}) {
|
|
|
3669
3680
|
maxResults: Et(e.maxResults)
|
|
3670
3681
|
};
|
|
3671
3682
|
}
|
|
3672
|
-
function
|
|
3683
|
+
function nt(s = []) {
|
|
3673
3684
|
const [t = [], ...e] = s;
|
|
3674
|
-
return e.length === 0 ? t : e.reduce((i,
|
|
3685
|
+
return e.length === 0 ? t : e.reduce((i, r) => i.filter((n) => r.includes(n)), t);
|
|
3675
3686
|
}
|
|
3676
|
-
function
|
|
3687
|
+
function rs(s) {
|
|
3677
3688
|
return [].concat(...s);
|
|
3678
3689
|
}
|
|
3679
|
-
function
|
|
3690
|
+
function ns(s) {
|
|
3680
3691
|
return s.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".+");
|
|
3681
3692
|
}
|
|
3682
|
-
function
|
|
3693
|
+
function Rt(s) {
|
|
3683
3694
|
const t = s.map((e) => {
|
|
3684
|
-
if (
|
|
3695
|
+
if (we(e))
|
|
3685
3696
|
return (i) => e.test(i);
|
|
3686
3697
|
if (typeof e == "function")
|
|
3687
3698
|
return (i) => {
|
|
3688
|
-
const
|
|
3689
|
-
return typeof
|
|
3699
|
+
const r = e(i);
|
|
3700
|
+
return typeof r != "boolean" ? (bt("pattern matcher function invalid", "Provided pattern matching function does not return boolean. It's result will be ignored.", e), !1) : r;
|
|
3690
3701
|
};
|
|
3691
3702
|
if (typeof e == "string") {
|
|
3692
|
-
const i = new RegExp("^" +
|
|
3693
|
-
return (
|
|
3703
|
+
const i = new RegExp("^" + ns(e) + "$");
|
|
3704
|
+
return (r) => i.test(r);
|
|
3694
3705
|
}
|
|
3695
3706
|
return bt("pattern matcher invalid", "Pattern matching only accepts strings, regular expressions and/or functions. This item is invalid and will be ignored.", e), () => !1;
|
|
3696
3707
|
});
|
|
3697
3708
|
return (e) => t.some((i) => i(e));
|
|
3698
3709
|
}
|
|
3699
3710
|
function jt(s, t, e) {
|
|
3700
|
-
const i = Array.from(
|
|
3701
|
-
return i.length === s.length && s.every((
|
|
3711
|
+
const i = Array.from(Se(e, s[0]).querySelectorAll(t));
|
|
3712
|
+
return i.length === s.length && s.every((r) => i.includes(r));
|
|
3702
3713
|
}
|
|
3703
|
-
function
|
|
3714
|
+
function Ee(s, t) {
|
|
3704
3715
|
t = t ?? te(s);
|
|
3705
3716
|
const e = [];
|
|
3706
3717
|
let i = s;
|
|
3707
|
-
for (;
|
|
3718
|
+
for (; ye(i) && i !== t; )
|
|
3708
3719
|
e.push(i), i = i.parentElement;
|
|
3709
3720
|
return e;
|
|
3710
3721
|
}
|
|
3711
|
-
function
|
|
3712
|
-
return
|
|
3722
|
+
function as(s, t) {
|
|
3723
|
+
return nt(s.map((e) => Ee(e, t)));
|
|
3713
3724
|
}
|
|
3714
3725
|
function te(s) {
|
|
3715
3726
|
return s.ownerDocument.querySelector(":root");
|
|
3716
3727
|
}
|
|
3717
|
-
const
|
|
3728
|
+
const Te = ", ", os = new RegExp([
|
|
3718
3729
|
"^$",
|
|
3719
3730
|
// empty or not set
|
|
3720
3731
|
"\\s"
|
|
3721
3732
|
// contains whitespace
|
|
3722
|
-
].join("|")),
|
|
3733
|
+
].join("|")), cs = new RegExp([
|
|
3723
3734
|
"^$"
|
|
3724
3735
|
// empty or not set
|
|
3725
|
-
].join("|")),
|
|
3736
|
+
].join("|")), Ie = [
|
|
3726
3737
|
E.nthoftype,
|
|
3727
3738
|
E.tag,
|
|
3728
3739
|
E.id,
|
|
3729
3740
|
E.class,
|
|
3730
3741
|
E.attribute,
|
|
3731
3742
|
E.nthchild
|
|
3732
|
-
],
|
|
3743
|
+
], ls = Rt([
|
|
3733
3744
|
"class",
|
|
3734
3745
|
"id",
|
|
3735
3746
|
// Angular attributes
|
|
3736
3747
|
"ng-*"
|
|
3737
3748
|
]);
|
|
3738
|
-
function
|
|
3749
|
+
function hs({ name: s }) {
|
|
3739
3750
|
return `[${s}]`;
|
|
3740
3751
|
}
|
|
3741
|
-
function
|
|
3752
|
+
function us({ name: s, value: t }) {
|
|
3742
3753
|
return `[${s}='${t}']`;
|
|
3743
3754
|
}
|
|
3744
|
-
function
|
|
3755
|
+
function ds({ nodeName: s, nodeValue: t }, e) {
|
|
3745
3756
|
const i = e.tagName.toLowerCase();
|
|
3746
|
-
return ["input", "option"].includes(i) && s === "value" || s === "src" && t?.startsWith("data:") ? !1 : !
|
|
3757
|
+
return ["input", "option"].includes(i) && s === "value" || s === "src" && t?.startsWith("data:") ? !1 : !ls(s);
|
|
3747
3758
|
}
|
|
3748
|
-
function
|
|
3759
|
+
function fs({ nodeName: s, nodeValue: t }) {
|
|
3749
3760
|
return {
|
|
3750
3761
|
name: st(s),
|
|
3751
3762
|
value: st(t ?? void 0)
|
|
3752
3763
|
};
|
|
3753
3764
|
}
|
|
3754
|
-
function
|
|
3755
|
-
const t = Array.from(s.attributes).filter((e) =>
|
|
3765
|
+
function xe(s) {
|
|
3766
|
+
const t = Array.from(s.attributes).filter((e) => ds(e, s)).map(fs);
|
|
3756
3767
|
return [
|
|
3757
|
-
...t.map(
|
|
3758
|
-
...t.map(
|
|
3768
|
+
...t.map(hs),
|
|
3769
|
+
...t.map(us)
|
|
3759
3770
|
];
|
|
3760
3771
|
}
|
|
3761
|
-
function
|
|
3762
|
-
const t = s.map(
|
|
3763
|
-
return
|
|
3772
|
+
function ps(s) {
|
|
3773
|
+
const t = s.map(xe);
|
|
3774
|
+
return nt(t);
|
|
3764
3775
|
}
|
|
3765
|
-
function
|
|
3776
|
+
function Ne(s) {
|
|
3766
3777
|
var t;
|
|
3767
|
-
return ((t = s.getAttribute("class")) !== null && t !== void 0 ? t : "").trim().split(/\s+/).filter((e) => !
|
|
3778
|
+
return ((t = s.getAttribute("class")) !== null && t !== void 0 ? t : "").trim().split(/\s+/).filter((e) => !cs.test(e)).map((e) => `.${st(e)}`);
|
|
3768
3779
|
}
|
|
3769
|
-
function
|
|
3770
|
-
const t = s.map(
|
|
3771
|
-
return
|
|
3780
|
+
function ms(s) {
|
|
3781
|
+
const t = s.map(Ne);
|
|
3782
|
+
return nt(t);
|
|
3772
3783
|
}
|
|
3773
|
-
function
|
|
3784
|
+
function Le(s) {
|
|
3774
3785
|
var t;
|
|
3775
|
-
const e = (t = s.getAttribute("id")) !== null && t !== void 0 ? t : "", i = `#${st(e)}`,
|
|
3776
|
-
return !
|
|
3786
|
+
const e = (t = s.getAttribute("id")) !== null && t !== void 0 ? t : "", i = `#${st(e)}`, r = s.getRootNode({ composed: !1 });
|
|
3787
|
+
return !os.test(e) && jt([s], i, r) ? [i] : [];
|
|
3777
3788
|
}
|
|
3778
|
-
function
|
|
3779
|
-
return s.length === 0 || s.length > 1 ? [] :
|
|
3789
|
+
function gs(s) {
|
|
3790
|
+
return s.length === 0 || s.length > 1 ? [] : Le(s[0]);
|
|
3780
3791
|
}
|
|
3781
|
-
function
|
|
3792
|
+
function Oe(s) {
|
|
3782
3793
|
var t;
|
|
3783
3794
|
const e = (t = s.parentElement) === null || t === void 0 ? void 0 : t.children;
|
|
3784
3795
|
if (e) {
|
|
@@ -3788,60 +3799,60 @@ function Ne(s) {
|
|
|
3788
3799
|
}
|
|
3789
3800
|
return [];
|
|
3790
3801
|
}
|
|
3791
|
-
function
|
|
3792
|
-
return
|
|
3802
|
+
function bs(s) {
|
|
3803
|
+
return nt(s.map(Oe));
|
|
3793
3804
|
}
|
|
3794
|
-
function
|
|
3805
|
+
function ze(s) {
|
|
3795
3806
|
return [
|
|
3796
3807
|
st(s.tagName.toLowerCase())
|
|
3797
3808
|
];
|
|
3798
3809
|
}
|
|
3799
|
-
function
|
|
3810
|
+
function Re(s) {
|
|
3800
3811
|
const t = [
|
|
3801
|
-
...new Set(
|
|
3812
|
+
...new Set(rs(s.map(ze)))
|
|
3802
3813
|
];
|
|
3803
3814
|
return t.length === 0 || t.length > 1 ? [] : [t[0]];
|
|
3804
3815
|
}
|
|
3805
|
-
function
|
|
3806
|
-
const t =
|
|
3816
|
+
function Ce(s) {
|
|
3817
|
+
const t = Re([s])[0], e = s.parentElement;
|
|
3807
3818
|
if (e) {
|
|
3808
|
-
const
|
|
3809
|
-
if (
|
|
3819
|
+
const r = Array.from(e.children).filter((n) => n.tagName.toLowerCase() === t).indexOf(s);
|
|
3820
|
+
if (r > -1)
|
|
3810
3821
|
return [
|
|
3811
|
-
`${t}:nth-of-type(${String(
|
|
3822
|
+
`${t}:nth-of-type(${String(r + 1)})`
|
|
3812
3823
|
];
|
|
3813
3824
|
}
|
|
3814
3825
|
return [];
|
|
3815
3826
|
}
|
|
3816
|
-
function
|
|
3817
|
-
return
|
|
3827
|
+
function As(s) {
|
|
3828
|
+
return nt(s.map(Ce));
|
|
3818
3829
|
}
|
|
3819
|
-
function*
|
|
3820
|
-
let e = 0, i =
|
|
3830
|
+
function* Pe(s = [], { maxResults: t = Number.POSITIVE_INFINITY } = {}) {
|
|
3831
|
+
let e = 0, i = Ct(1);
|
|
3821
3832
|
for (; i.length <= s.length && e < t; )
|
|
3822
|
-
e += 1, yield i.map((
|
|
3833
|
+
e += 1, yield i.map((n) => s[n]), i = ys(i, s.length - 1);
|
|
3823
3834
|
}
|
|
3824
|
-
function
|
|
3825
|
-
return Array.from(
|
|
3835
|
+
function vs(s = [], { maxResults: t = Number.POSITIVE_INFINITY } = {}) {
|
|
3836
|
+
return Array.from(Pe(s, { maxResults: t }));
|
|
3826
3837
|
}
|
|
3827
|
-
function
|
|
3838
|
+
function ys(s = [], t = 0) {
|
|
3828
3839
|
const e = s.length;
|
|
3829
3840
|
if (e === 0)
|
|
3830
3841
|
return [];
|
|
3831
3842
|
const i = [...s];
|
|
3832
3843
|
i[e - 1] += 1;
|
|
3833
|
-
for (let
|
|
3834
|
-
if (i[
|
|
3835
|
-
if (
|
|
3836
|
-
return
|
|
3837
|
-
i[
|
|
3844
|
+
for (let r = e - 1; r >= 0; r--)
|
|
3845
|
+
if (i[r] > t) {
|
|
3846
|
+
if (r === 0)
|
|
3847
|
+
return Ct(e + 1);
|
|
3848
|
+
i[r - 1]++, i[r] = i[r - 1] + 1;
|
|
3838
3849
|
}
|
|
3839
|
-
return i[e - 1] > t ?
|
|
3850
|
+
return i[e - 1] > t ? Ct(e + 1) : i;
|
|
3840
3851
|
}
|
|
3841
|
-
function
|
|
3852
|
+
function Ct(s = 1) {
|
|
3842
3853
|
return Array.from(Array(s).keys());
|
|
3843
3854
|
}
|
|
3844
|
-
function*
|
|
3855
|
+
function* ws(s = {}) {
|
|
3845
3856
|
const t = Object.entries(s);
|
|
3846
3857
|
if (t.length === 0)
|
|
3847
3858
|
return;
|
|
@@ -3852,215 +3863,215 @@ function* Ts(s = {}) {
|
|
|
3852
3863
|
const i = e.pop();
|
|
3853
3864
|
if (!i)
|
|
3854
3865
|
break;
|
|
3855
|
-
const { index:
|
|
3856
|
-
if (
|
|
3857
|
-
yield
|
|
3866
|
+
const { index: r, partial: n } = i;
|
|
3867
|
+
if (r < 0) {
|
|
3868
|
+
yield n;
|
|
3858
3869
|
continue;
|
|
3859
3870
|
}
|
|
3860
|
-
const [a, o] = t[
|
|
3861
|
-
for (let
|
|
3871
|
+
const [a, o] = t[r];
|
|
3872
|
+
for (let h = o.length - 1; h >= 0; h--)
|
|
3862
3873
|
e.push({
|
|
3863
|
-
index:
|
|
3864
|
-
partial: Object.assign(Object.assign({},
|
|
3874
|
+
index: r - 1,
|
|
3875
|
+
partial: Object.assign(Object.assign({}, n), { [a]: o[h] })
|
|
3865
3876
|
});
|
|
3866
3877
|
}
|
|
3867
3878
|
}
|
|
3868
|
-
const
|
|
3879
|
+
const Ss = "3a".toUpperCase(), Es = /[ !"#$%&'()\[\]{|}<>*+,./;=?@^`~\\]/;
|
|
3869
3880
|
function st(s = "") {
|
|
3870
|
-
return CSS ? CSS.escape(s) :
|
|
3871
|
-
}
|
|
3872
|
-
function
|
|
3873
|
-
return s.split("").map((t) => t === ":" ? `\\${
|
|
3874
|
-
}
|
|
3875
|
-
const
|
|
3876
|
-
tag:
|
|
3877
|
-
id:
|
|
3878
|
-
class:
|
|
3879
|
-
attribute:
|
|
3880
|
-
nthchild:
|
|
3881
|
-
nthoftype:
|
|
3882
|
-
},
|
|
3883
|
-
tag:
|
|
3884
|
-
id:
|
|
3885
|
-
class:
|
|
3886
|
-
attribute:
|
|
3887
|
-
nthchild:
|
|
3888
|
-
nthoftype:
|
|
3881
|
+
return CSS ? CSS.escape(s) : Ts(s);
|
|
3882
|
+
}
|
|
3883
|
+
function Ts(s = "") {
|
|
3884
|
+
return s.split("").map((t) => t === ":" ? `\\${Ss} ` : Es.test(t) ? `\\${t}` : escape(t).replace(/%/g, "\\")).join("");
|
|
3885
|
+
}
|
|
3886
|
+
const Is = {
|
|
3887
|
+
tag: Re,
|
|
3888
|
+
id: gs,
|
|
3889
|
+
class: ms,
|
|
3890
|
+
attribute: ps,
|
|
3891
|
+
nthchild: bs,
|
|
3892
|
+
nthoftype: As
|
|
3893
|
+
}, xs = {
|
|
3894
|
+
tag: ze,
|
|
3895
|
+
id: Le,
|
|
3896
|
+
class: Ne,
|
|
3897
|
+
attribute: xe,
|
|
3898
|
+
nthchild: Oe,
|
|
3899
|
+
nthoftype: Ce
|
|
3889
3900
|
};
|
|
3890
|
-
function
|
|
3891
|
-
return
|
|
3901
|
+
function Ns(s, t) {
|
|
3902
|
+
return xs[t](s);
|
|
3892
3903
|
}
|
|
3893
|
-
function
|
|
3894
|
-
const e =
|
|
3904
|
+
function Ls(s, t) {
|
|
3905
|
+
const e = Is[t];
|
|
3895
3906
|
return e(s);
|
|
3896
3907
|
}
|
|
3897
|
-
function
|
|
3908
|
+
function Os(s = [], t, e) {
|
|
3898
3909
|
return s.filter((i) => e(i) || !t(i));
|
|
3899
3910
|
}
|
|
3900
|
-
function
|
|
3911
|
+
function zs(s = [], t) {
|
|
3901
3912
|
return s.sort((e, i) => {
|
|
3902
|
-
const
|
|
3903
|
-
return
|
|
3913
|
+
const r = t(e), n = t(i);
|
|
3914
|
+
return r && !n ? -1 : !r && n ? 1 : 0;
|
|
3904
3915
|
});
|
|
3905
3916
|
}
|
|
3906
|
-
function*
|
|
3907
|
-
const e = /* @__PURE__ */ new Set(), i =
|
|
3908
|
-
for (const
|
|
3909
|
-
e.has(
|
|
3917
|
+
function* Rs(s, t) {
|
|
3918
|
+
const e = /* @__PURE__ */ new Set(), i = Cs(s, t);
|
|
3919
|
+
for (const r of Us(i, t))
|
|
3920
|
+
e.has(r) || (e.add(r), yield r);
|
|
3910
3921
|
}
|
|
3911
|
-
function
|
|
3912
|
-
const { blacklist: e, whitelist: i, combineWithinSelector:
|
|
3913
|
-
const
|
|
3914
|
-
return m[
|
|
3922
|
+
function Cs(s, t) {
|
|
3923
|
+
const { blacklist: e, whitelist: i, combineWithinSelector: r, maxCombinations: n } = t, a = Rt(e), o = Rt(i), h = (m, p) => {
|
|
3924
|
+
const u = Ls(s, p), g = Os(u, a, o), v = zs(g, o);
|
|
3925
|
+
return m[p] = r ? Array.from(Pe(v, { maxResults: n })) : v.map((C) => [C]), m;
|
|
3915
3926
|
};
|
|
3916
|
-
return
|
|
3927
|
+
return Ps(t).reduce(h, {});
|
|
3917
3928
|
}
|
|
3918
|
-
function
|
|
3929
|
+
function Ps(s) {
|
|
3919
3930
|
const { selectors: t, includeTag: e } = s, i = [...t];
|
|
3920
3931
|
return e && !i.includes("tag") && i.push("tag"), i;
|
|
3921
3932
|
}
|
|
3922
|
-
function
|
|
3933
|
+
function ks(s) {
|
|
3923
3934
|
return s.includes(E.tag) || s.includes(E.nthoftype) ? [...s] : [...s, E.tag];
|
|
3924
3935
|
}
|
|
3925
|
-
function
|
|
3926
|
-
const { selectors: t, combineBetweenSelectors: e, includeTag: i, maxCandidates:
|
|
3927
|
-
return i ?
|
|
3936
|
+
function Ds(s) {
|
|
3937
|
+
const { selectors: t, combineBetweenSelectors: e, includeTag: i, maxCandidates: r } = s, n = e ? vs(t, { maxResults: r }) : t.map((a) => [a]);
|
|
3938
|
+
return i ? n.map(ks) : n;
|
|
3928
3939
|
}
|
|
3929
|
-
function*
|
|
3930
|
-
for (const e of
|
|
3931
|
-
yield*
|
|
3940
|
+
function* Us(s, t) {
|
|
3941
|
+
for (const e of Ds(t))
|
|
3942
|
+
yield* Ms(e, s);
|
|
3932
3943
|
}
|
|
3933
|
-
function*
|
|
3944
|
+
function* Ms(s, t) {
|
|
3934
3945
|
const e = {};
|
|
3935
3946
|
for (const i of s) {
|
|
3936
|
-
const
|
|
3937
|
-
|
|
3947
|
+
const r = t[i];
|
|
3948
|
+
r && r.length > 0 && (e[i] = r);
|
|
3938
3949
|
}
|
|
3939
|
-
for (const i of
|
|
3940
|
-
yield
|
|
3950
|
+
for (const i of ws(e))
|
|
3951
|
+
yield Gs(i);
|
|
3941
3952
|
}
|
|
3942
|
-
function
|
|
3953
|
+
function Bs(s, t) {
|
|
3943
3954
|
return t[s] ? t[s].join("") : "";
|
|
3944
3955
|
}
|
|
3945
|
-
function
|
|
3946
|
-
const t = [...
|
|
3947
|
-
return s[E.tag] && s[E.nthoftype] && t.splice(t.indexOf(E.tag), 1), t.map((e) =>
|
|
3956
|
+
function Gs(s = {}) {
|
|
3957
|
+
const t = [...Ie];
|
|
3958
|
+
return s[E.tag] && s[E.nthoftype] && t.splice(t.indexOf(E.tag), 1), t.map((e) => Bs(e, s)).join("");
|
|
3948
3959
|
}
|
|
3949
|
-
function
|
|
3960
|
+
function Ws(s, t) {
|
|
3950
3961
|
return [
|
|
3951
3962
|
...s.map((e) => t + gt.DESCENDANT + e),
|
|
3952
3963
|
...s.map((e) => t + gt.CHILD + e)
|
|
3953
3964
|
];
|
|
3954
3965
|
}
|
|
3955
|
-
function*
|
|
3966
|
+
function* Hs(s, t) {
|
|
3956
3967
|
if (t === "")
|
|
3957
3968
|
yield* s;
|
|
3958
3969
|
else
|
|
3959
3970
|
for (const e of s)
|
|
3960
|
-
yield*
|
|
3971
|
+
yield* Ws([e], t);
|
|
3961
3972
|
}
|
|
3962
|
-
function*
|
|
3963
|
-
const
|
|
3964
|
-
for (const
|
|
3965
|
-
jt(s,
|
|
3973
|
+
function* Fs(s, t, e = "", i) {
|
|
3974
|
+
const r = Rs(s, i);
|
|
3975
|
+
for (const n of Hs(r, e))
|
|
3976
|
+
jt(s, n, t) && (yield n);
|
|
3966
3977
|
}
|
|
3967
|
-
function*
|
|
3978
|
+
function* _s(s, t, e = "", i) {
|
|
3968
3979
|
if (s.length === 0)
|
|
3969
3980
|
return null;
|
|
3970
|
-
const
|
|
3981
|
+
const r = [
|
|
3971
3982
|
s.length > 1 ? s : [],
|
|
3972
|
-
...
|
|
3983
|
+
...as(s, t).map((n) => [n])
|
|
3973
3984
|
];
|
|
3974
|
-
for (const
|
|
3975
|
-
for (const a of
|
|
3985
|
+
for (const n of r)
|
|
3986
|
+
for (const a of Fs(n, t, e, i))
|
|
3976
3987
|
yield {
|
|
3977
|
-
foundElements:
|
|
3988
|
+
foundElements: n,
|
|
3978
3989
|
selector: a
|
|
3979
3990
|
};
|
|
3980
3991
|
}
|
|
3981
|
-
function*
|
|
3982
|
-
let
|
|
3992
|
+
function* Vs({ elements: s, root: t, rootSelector: e = "", options: i }) {
|
|
3993
|
+
let r = t, n = e, a = !0;
|
|
3983
3994
|
for (; a; ) {
|
|
3984
3995
|
let o = !1;
|
|
3985
|
-
for (const
|
|
3986
|
-
const { foundElements: m, selector:
|
|
3987
|
-
if (o = !0, jt(s,
|
|
3988
|
-
yield
|
|
3996
|
+
for (const h of _s(s, r, n, i)) {
|
|
3997
|
+
const { foundElements: m, selector: p } = h;
|
|
3998
|
+
if (o = !0, jt(s, p, t))
|
|
3999
|
+
yield p;
|
|
3989
4000
|
else {
|
|
3990
|
-
|
|
4001
|
+
r = m[0], n = p;
|
|
3991
4002
|
break;
|
|
3992
4003
|
}
|
|
3993
4004
|
}
|
|
3994
4005
|
o || (a = !1);
|
|
3995
4006
|
}
|
|
3996
4007
|
}
|
|
3997
|
-
function
|
|
4008
|
+
function Ys(s) {
|
|
3998
4009
|
(s instanceof NodeList || s instanceof HTMLCollection) && (s = Array.from(s));
|
|
3999
|
-
const t = (Array.isArray(s) ? s : [s]).filter(
|
|
4010
|
+
const t = (Array.isArray(s) ? s : [s]).filter(ye);
|
|
4000
4011
|
return [...new Set(t)];
|
|
4001
4012
|
}
|
|
4002
|
-
function
|
|
4013
|
+
function $s(s) {
|
|
4003
4014
|
return {
|
|
4004
4015
|
value: s,
|
|
4005
4016
|
include: !1
|
|
4006
4017
|
};
|
|
4007
4018
|
}
|
|
4008
|
-
function
|
|
4019
|
+
function Xs(s, t, e = gt.NONE) {
|
|
4009
4020
|
const i = {};
|
|
4010
|
-
return t.forEach((
|
|
4011
|
-
Reflect.set(i,
|
|
4021
|
+
return t.forEach((r) => {
|
|
4022
|
+
Reflect.set(i, r, Ns(s, r).map($s));
|
|
4012
4023
|
}), {
|
|
4013
4024
|
element: s,
|
|
4014
4025
|
operator: e,
|
|
4015
4026
|
selectors: i
|
|
4016
4027
|
};
|
|
4017
4028
|
}
|
|
4018
|
-
function
|
|
4019
|
-
let e = [...
|
|
4020
|
-
s[E.tag] && s[E.nthoftype] && (e = e.filter((
|
|
4029
|
+
function Ks({ selectors: s, operator: t }) {
|
|
4030
|
+
let e = [...Ie];
|
|
4031
|
+
s[E.tag] && s[E.nthoftype] && (e = e.filter((r) => r !== E.tag));
|
|
4021
4032
|
let i = "";
|
|
4022
|
-
return e.forEach((
|
|
4023
|
-
var
|
|
4024
|
-
((
|
|
4025
|
-
|
|
4033
|
+
return e.forEach((r) => {
|
|
4034
|
+
var n;
|
|
4035
|
+
((n = s[r]) !== null && n !== void 0 ? n : []).forEach(({ value: o, include: h }) => {
|
|
4036
|
+
h && (i += o);
|
|
4026
4037
|
});
|
|
4027
4038
|
}), t + i;
|
|
4028
4039
|
}
|
|
4029
|
-
function
|
|
4030
|
-
const i =
|
|
4031
|
-
var
|
|
4032
|
-
const a =
|
|
4033
|
-
return ((
|
|
4040
|
+
function Zs(s, t) {
|
|
4041
|
+
const i = Ee(s, t).reverse().map((r) => {
|
|
4042
|
+
var n;
|
|
4043
|
+
const a = Xs(r, [E.nthchild], gt.CHILD);
|
|
4044
|
+
return ((n = a.selectors.nthchild) !== null && n !== void 0 ? n : []).forEach((o) => {
|
|
4034
4045
|
o.include = !0;
|
|
4035
4046
|
}), a;
|
|
4036
4047
|
});
|
|
4037
4048
|
return [
|
|
4038
4049
|
t ? ":scope" : ":root",
|
|
4039
|
-
...i.map(
|
|
4050
|
+
...i.map(Ks)
|
|
4040
4051
|
].join("");
|
|
4041
4052
|
}
|
|
4042
|
-
function
|
|
4043
|
-
return s.map((e) =>
|
|
4053
|
+
function Js(s, t) {
|
|
4054
|
+
return s.map((e) => Zs(e, t)).join(Te);
|
|
4044
4055
|
}
|
|
4045
|
-
function
|
|
4056
|
+
function ke(s, t = {}) {
|
|
4046
4057
|
const e = Object.assign(Object.assign({}, t), { maxResults: 1 });
|
|
4047
|
-
return
|
|
4058
|
+
return qs(s, e).next().value;
|
|
4048
4059
|
}
|
|
4049
|
-
function*
|
|
4060
|
+
function* qs(s, t = {}) {
|
|
4050
4061
|
var e;
|
|
4051
|
-
const i =
|
|
4062
|
+
const i = Ys(s), r = ss(i[0], t), n = (e = r.root) !== null && e !== void 0 ? e : te(i[0]);
|
|
4052
4063
|
let a = 0;
|
|
4053
|
-
for (const o of
|
|
4064
|
+
for (const o of Vs({
|
|
4054
4065
|
elements: i,
|
|
4055
|
-
options:
|
|
4056
|
-
root:
|
|
4066
|
+
options: r,
|
|
4067
|
+
root: n,
|
|
4057
4068
|
rootSelector: ""
|
|
4058
4069
|
}))
|
|
4059
|
-
if (yield o, a++, a >=
|
|
4070
|
+
if (yield o, a++, a >= r.maxResults)
|
|
4060
4071
|
return;
|
|
4061
|
-
i.length > 1 && (yield i.map((o) =>
|
|
4072
|
+
i.length > 1 && (yield i.map((o) => ke(o, r)).join(Te), a++, a >= r.maxResults) || (yield Js(i, r.useScope ? n : void 0));
|
|
4062
4073
|
}
|
|
4063
|
-
class
|
|
4074
|
+
class hr extends Qt {
|
|
4064
4075
|
constructor(t, e, i = 50) {
|
|
4065
4076
|
super(), this.resource = t, this.locator = e, this.beforeMaxLength = i, this.currentElement = null, this.currentIndex = null, this.parsedElementRecipes = null, this.parser = null;
|
|
4066
4077
|
}
|
|
@@ -4095,15 +4106,15 @@ class fn extends Qt {
|
|
|
4095
4106
|
}
|
|
4096
4107
|
async parseElements() {
|
|
4097
4108
|
const t = await this.resource.readAsString(), e = new DOMParser().parseFromString(t, this.locator.type);
|
|
4098
|
-
return this.parser = new
|
|
4109
|
+
return this.parser = new js(
|
|
4099
4110
|
e,
|
|
4100
4111
|
this.locator,
|
|
4101
4112
|
this.locator.locations.getCssSelector() ? e.querySelector(this.locator.locations.getCssSelector()) : null,
|
|
4102
4113
|
this.beforeMaxLength
|
|
4103
|
-
),
|
|
4114
|
+
), Qs(this.parser, e.body), this.parser.result();
|
|
4104
4115
|
}
|
|
4105
4116
|
}
|
|
4106
|
-
function
|
|
4117
|
+
function Qs(s, t) {
|
|
4107
4118
|
let e = t, i = 0;
|
|
4108
4119
|
for (; e != null; )
|
|
4109
4120
|
if (s.head(e, i), e.firstChild != null)
|
|
@@ -4116,9 +4127,9 @@ function en(s, t) {
|
|
|
4116
4127
|
e = e?.nextSibling || null;
|
|
4117
4128
|
}
|
|
4118
4129
|
}
|
|
4119
|
-
class
|
|
4120
|
-
constructor(t, e, i,
|
|
4121
|
-
this.doc = t, this.baseLocator = e, this.startElement = i, this.beforeMaxLength =
|
|
4130
|
+
class js {
|
|
4131
|
+
constructor(t, e, i, r) {
|
|
4132
|
+
this.doc = t, this.baseLocator = e, this.startElement = i, this.beforeMaxLength = r, this.elementRecipes = [], this.startIndex = 0, this.segmentRecipesAcc = [], this.textAcc = "", this.wholeRawTextAcc = null, this.elementRawTextAcc = "", this.rawTextAcc = "", this.currentLanguage = null, this.breadcrumbs = [], this.recipeCssSelectorCache = /* @__PURE__ */ new WeakMap();
|
|
4122
4133
|
}
|
|
4123
4134
|
result() {
|
|
4124
4135
|
return {
|
|
@@ -4130,7 +4141,7 @@ class sn {
|
|
|
4130
4141
|
const e = t.recipe.cssSelectorNode ? this.cssSelector(t.recipe.cssSelectorNode) : null;
|
|
4131
4142
|
if (t.type === 1) {
|
|
4132
4143
|
const i = t.recipe;
|
|
4133
|
-
return new
|
|
4144
|
+
return new Bi(
|
|
4134
4145
|
new k({
|
|
4135
4146
|
href: this.baseLocator.href,
|
|
4136
4147
|
type: this.baseLocator.type,
|
|
@@ -4157,31 +4168,31 @@ class sn {
|
|
|
4157
4168
|
["cssSelector", e]
|
|
4158
4169
|
])
|
|
4159
4170
|
} : {})
|
|
4160
|
-
}),
|
|
4161
|
-
return t.type === 3 ? new
|
|
4171
|
+
}), r = t.recipe;
|
|
4172
|
+
return t.type === 3 ? new Mi(
|
|
4162
4173
|
i,
|
|
4163
|
-
|
|
4164
|
-
) : new
|
|
4174
|
+
r.link
|
|
4175
|
+
) : new Ui(
|
|
4165
4176
|
i,
|
|
4166
|
-
|
|
4177
|
+
r.link
|
|
4167
4178
|
);
|
|
4168
4179
|
} else if (t.type === 0) {
|
|
4169
|
-
const i = t.recipe,
|
|
4170
|
-
const a =
|
|
4171
|
-
return new
|
|
4180
|
+
const i = t.recipe, r = i.segments.map((n) => {
|
|
4181
|
+
const a = n.cssSelectorNode ? this.cssSelector(n.cssSelectorNode) : null;
|
|
4182
|
+
return new ge(
|
|
4172
4183
|
new k({
|
|
4173
4184
|
href: this.baseLocator.href,
|
|
4174
4185
|
type: this.baseLocator.type,
|
|
4175
4186
|
title: this.baseLocator.title,
|
|
4176
|
-
text:
|
|
4187
|
+
text: le(n.text, this.wholeRawTextAcc?.substring(n.beforeRange[0], n.beforeRange[1])),
|
|
4177
4188
|
locations: new T(a ? {
|
|
4178
4189
|
otherLocations: /* @__PURE__ */ new Map([
|
|
4179
4190
|
["cssSelector", a]
|
|
4180
4191
|
])
|
|
4181
4192
|
} : {})
|
|
4182
4193
|
}),
|
|
4183
|
-
|
|
4184
|
-
|
|
4194
|
+
n.text,
|
|
4195
|
+
n.attributes
|
|
4185
4196
|
);
|
|
4186
4197
|
});
|
|
4187
4198
|
return new zt(
|
|
@@ -4189,7 +4200,7 @@ class sn {
|
|
|
4189
4200
|
href: this.baseLocator.href,
|
|
4190
4201
|
type: this.baseLocator.type,
|
|
4191
4202
|
title: this.baseLocator.title,
|
|
4192
|
-
text:
|
|
4203
|
+
text: le(i.text, r.length && r[0].locator.text?.before || ""),
|
|
4193
4204
|
locations: new T(e ? {
|
|
4194
4205
|
otherLocations: /* @__PURE__ */ new Map([
|
|
4195
4206
|
["cssSelector", e]
|
|
@@ -4197,7 +4208,7 @@ class sn {
|
|
|
4197
4208
|
} : {})
|
|
4198
4209
|
}),
|
|
4199
4210
|
i.role,
|
|
4200
|
-
|
|
4211
|
+
r
|
|
4201
4212
|
);
|
|
4202
4213
|
} else
|
|
4203
4214
|
throw new Error("Unknown recipe type");
|
|
@@ -4205,73 +4216,73 @@ class sn {
|
|
|
4205
4216
|
cssSelector(t) {
|
|
4206
4217
|
const e = t, i = this.recipeCssSelectorCache.get(e);
|
|
4207
4218
|
if (i) return i;
|
|
4208
|
-
const
|
|
4209
|
-
let
|
|
4210
|
-
for (;
|
|
4211
|
-
for (let o = 0; o <
|
|
4212
|
-
const
|
|
4213
|
-
|
|
4219
|
+
const r = /* @__PURE__ */ new Map();
|
|
4220
|
+
let n = e;
|
|
4221
|
+
for (; n && n !== this.doc.body; ) {
|
|
4222
|
+
for (let o = 0; o < n.attributes.length; o++) {
|
|
4223
|
+
const h = n.attributes[o];
|
|
4224
|
+
h.prefix && (r.has(n) ? r.set(n, r.get(n).concat([h])) : r.set(n, [h]), n.attributes.removeNamedItem(h.name));
|
|
4214
4225
|
}
|
|
4215
|
-
|
|
4226
|
+
n = n.parentElement;
|
|
4216
4227
|
}
|
|
4217
|
-
const a =
|
|
4228
|
+
const a = ke(e, {
|
|
4218
4229
|
root: this.doc
|
|
4219
4230
|
});
|
|
4220
|
-
return
|
|
4231
|
+
return r.forEach((o, h) => o.forEach((m) => h.attributes.setNamedItem(m))), this.recipeCssSelectorCache.set(e, a), a;
|
|
4221
4232
|
}
|
|
4222
4233
|
// Implements NodeTraversor
|
|
4223
4234
|
head(t, e) {
|
|
4224
4235
|
if (t.nodeType == Node.ELEMENT_NODE) {
|
|
4225
|
-
const i = !
|
|
4236
|
+
const i = !ce(t);
|
|
4226
4237
|
i && (this.flushText(), this.breadcrumbs.push(t));
|
|
4227
|
-
const
|
|
4228
|
-
if (
|
|
4238
|
+
const r = t.nodeName.toUpperCase();
|
|
4239
|
+
if (r === "BR")
|
|
4229
4240
|
this.flushText();
|
|
4230
|
-
else if (
|
|
4231
|
-
if (this.flushText(),
|
|
4232
|
-
const
|
|
4233
|
-
let o =
|
|
4234
|
-
o?.length || (o =
|
|
4241
|
+
else if (r === "IMG" || r === "AUDIO" || r === "VIDEO")
|
|
4242
|
+
if (this.flushText(), r === "IMG") {
|
|
4243
|
+
const n = t, a = St(n, this.baseLocator.href);
|
|
4244
|
+
let o = n.getAttribute("alt");
|
|
4245
|
+
o?.length || (o = n.getAttribute("title")), a != null && this.elementRecipes.push({
|
|
4235
4246
|
type: 1,
|
|
4236
4247
|
recipe: {
|
|
4237
4248
|
href: a,
|
|
4238
4249
|
caption: void 0,
|
|
4239
4250
|
// FIXME: Get the caption from figcaption
|
|
4240
4251
|
cssSelectorNode: t,
|
|
4241
|
-
attributes: o?.length ? [new
|
|
4252
|
+
attributes: o?.length ? [new ae(
|
|
4242
4253
|
Ot.ACCESSIBILITY_LABEL,
|
|
4243
4254
|
o
|
|
4244
4255
|
)] : []
|
|
4245
4256
|
}
|
|
4246
4257
|
});
|
|
4247
4258
|
} else {
|
|
4248
|
-
const
|
|
4259
|
+
const n = t, a = St(n, this.baseLocator.href);
|
|
4249
4260
|
let o;
|
|
4250
4261
|
if (a != null)
|
|
4251
4262
|
o = new U({
|
|
4252
4263
|
href: a
|
|
4253
4264
|
});
|
|
4254
4265
|
else {
|
|
4255
|
-
const
|
|
4256
|
-
const
|
|
4257
|
-
return
|
|
4258
|
-
href:
|
|
4266
|
+
const h = [...n.getElementsByTagName("source")].map((m) => {
|
|
4267
|
+
const p = St(m, this.baseLocator.href);
|
|
4268
|
+
return p ? new U({
|
|
4269
|
+
href: p,
|
|
4259
4270
|
type: m.getAttribute("type") || void 0
|
|
4260
4271
|
}) : null;
|
|
4261
4272
|
}).filter((m) => !!m);
|
|
4262
|
-
|
|
4263
|
-
href:
|
|
4264
|
-
type:
|
|
4265
|
-
alternates:
|
|
4273
|
+
h.length > 0 && (o = new U({
|
|
4274
|
+
href: h[0].href,
|
|
4275
|
+
type: h[0].type,
|
|
4276
|
+
alternates: h.length > 1 ? new O(h.slice(1)) : void 0
|
|
4266
4277
|
}));
|
|
4267
4278
|
}
|
|
4268
|
-
o && (
|
|
4279
|
+
o && (r === "AUDIO" ? this.elementRecipes.push({
|
|
4269
4280
|
type: 2,
|
|
4270
4281
|
recipe: {
|
|
4271
4282
|
cssSelectorNode: t,
|
|
4272
4283
|
link: o
|
|
4273
4284
|
}
|
|
4274
|
-
}) :
|
|
4285
|
+
}) : r === "VIDEO" && this.elementRecipes.push({
|
|
4275
4286
|
type: 3,
|
|
4276
4287
|
recipe: {
|
|
4277
4288
|
cssSelectorNode: t,
|
|
@@ -4285,23 +4296,23 @@ class sn {
|
|
|
4285
4296
|
// Implements NodeTraversor
|
|
4286
4297
|
tail(t, e) {
|
|
4287
4298
|
if (t.nodeType === Node.TEXT_NODE && !ot(t.textContent)) {
|
|
4288
|
-
const i =
|
|
4289
|
-
this.currentLanguage !== i && (this.flushSegment(), this.currentLanguage = i), this.rawTextAcc += t.textContent, this.textAcc =
|
|
4290
|
-
} else if (t.nodeType === Node.ELEMENT_NODE && !
|
|
4299
|
+
const i = Zi(t.parentElement);
|
|
4300
|
+
this.currentLanguage !== i && (this.flushSegment(), this.currentLanguage = i), this.rawTextAcc += t.textContent, this.textAcc = Ji(this.textAcc, t.textContent);
|
|
4301
|
+
} else if (t.nodeType === Node.ELEMENT_NODE && !ce(t)) {
|
|
4291
4302
|
if (!this.breadcrumbs.length || this.breadcrumbs.at(-1) !== t) throw new Error("HTMLContentIterator: breadcrumbs mismatch");
|
|
4292
4303
|
this.flushText(), this.breadcrumbs.pop();
|
|
4293
4304
|
}
|
|
4294
4305
|
}
|
|
4295
4306
|
flushText() {
|
|
4296
4307
|
if (this.flushSegment(), this.startIndex === 0 && this.startElement && this.breadcrumbs.length && this.breadcrumbs.at(-1) === this.startElement && (this.startIndex = this.elementRecipes.length), !this.segmentRecipesAcc.length) return;
|
|
4297
|
-
this.segmentRecipesAcc[this.segmentRecipesAcc.length - 1].text =
|
|
4308
|
+
this.segmentRecipesAcc[this.segmentRecipesAcc.length - 1].text = Ki(
|
|
4298
4309
|
this.segmentRecipesAcc[this.segmentRecipesAcc.length - 1].text
|
|
4299
4310
|
);
|
|
4300
|
-
let t =
|
|
4311
|
+
let t = Wi;
|
|
4301
4312
|
if (this.breadcrumbs.length > 0) {
|
|
4302
4313
|
const e = this.breadcrumbs.at(-1);
|
|
4303
4314
|
if (e.getAttributeNS("http://www.idpf.org/2007/ops", "type") === "footnote")
|
|
4304
|
-
t =
|
|
4315
|
+
t = Hi;
|
|
4305
4316
|
else
|
|
4306
4317
|
switch (e.nodeName.toUpperCase()) {
|
|
4307
4318
|
case "H1":
|
|
@@ -4310,11 +4321,11 @@ class sn {
|
|
|
4310
4321
|
case "H4":
|
|
4311
4322
|
case "H5":
|
|
4312
4323
|
case "H6":
|
|
4313
|
-
t = new
|
|
4324
|
+
t = new Gi(parseInt(e.nodeName[1]));
|
|
4314
4325
|
break;
|
|
4315
4326
|
case "BLOCKQUOTE":
|
|
4316
4327
|
case "Q":
|
|
4317
|
-
t = new
|
|
4328
|
+
t = new Fi(
|
|
4318
4329
|
e.getAttribute("cite")?.length ? new URL(e.getAttribute("cite")) : void 0,
|
|
4319
4330
|
e.getAttribute("title") || void 0
|
|
4320
4331
|
);
|
|
@@ -4333,16 +4344,16 @@ class sn {
|
|
|
4333
4344
|
}
|
|
4334
4345
|
flushSegment() {
|
|
4335
4346
|
let t = this.textAcc;
|
|
4336
|
-
const e =
|
|
4347
|
+
const e = ve(t);
|
|
4337
4348
|
if (!ot(e)) {
|
|
4338
4349
|
if (!this.segmentRecipesAcc.length) {
|
|
4339
|
-
t =
|
|
4350
|
+
t = Xi(t);
|
|
4340
4351
|
const i = t.length && ot(t[t.length - 1]) ? t[t.length - 1] : "";
|
|
4341
4352
|
t = e + i;
|
|
4342
4353
|
}
|
|
4343
4354
|
this.segmentRecipesAcc.push({
|
|
4344
4355
|
text: t,
|
|
4345
|
-
attributes: this.currentLanguage ? [new
|
|
4356
|
+
attributes: this.currentLanguage ? [new ae(
|
|
4346
4357
|
Ot.LANGUAGE,
|
|
4347
4358
|
this.currentLanguage
|
|
4348
4359
|
)] : [],
|
|
@@ -4353,7 +4364,7 @@ class sn {
|
|
|
4353
4364
|
this.rawTextAcc.length && (this.wholeRawTextAcc = (this.wholeRawTextAcc || "") + this.rawTextAcc, this.elementRawTextAcc += this.rawTextAcc), this.rawTextAcc = "", this.textAcc = "";
|
|
4354
4365
|
}
|
|
4355
4366
|
}
|
|
4356
|
-
class
|
|
4367
|
+
class At {
|
|
4357
4368
|
/**
|
|
4358
4369
|
* Creates a [LocatorMetadata].
|
|
4359
4370
|
*/
|
|
@@ -4366,9 +4377,9 @@ class vt {
|
|
|
4366
4377
|
static deserialize(t) {
|
|
4367
4378
|
if (!t) return;
|
|
4368
4379
|
const e = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set(["title", "numberOfItems"]);
|
|
4369
|
-
return Object.entries(t).forEach(([
|
|
4370
|
-
i.has(
|
|
4371
|
-
}), new
|
|
4380
|
+
return Object.entries(t).forEach(([r, n]) => {
|
|
4381
|
+
i.has(r) || e.set(r, n);
|
|
4382
|
+
}), new At({
|
|
4372
4383
|
title: M.deserialize(t.title),
|
|
4373
4384
|
numberOfItems: K(t.numberOfItems),
|
|
4374
4385
|
otherMetadata: e.size === 0 ? void 0 : e
|
|
@@ -4382,12 +4393,12 @@ class vt {
|
|
|
4382
4393
|
return this.title && (t.title = this.title.serialize()), this.numberOfItems !== void 0 && (t.numberOfItems = this.numberOfItems), this.otherMetadata && this.otherMetadata.forEach((e, i) => t[i] = e), t;
|
|
4383
4394
|
}
|
|
4384
4395
|
}
|
|
4385
|
-
class
|
|
4396
|
+
class De {
|
|
4386
4397
|
/**
|
|
4387
4398
|
* Creates a [LocatorCollection].
|
|
4388
4399
|
*/
|
|
4389
4400
|
constructor(t) {
|
|
4390
|
-
this.metadata = t.metadata ?? new
|
|
4401
|
+
this.metadata = t.metadata ?? new At({}), this.links = t.links ?? new O([]), this.locators = t.locators ?? [];
|
|
4391
4402
|
}
|
|
4392
4403
|
/**
|
|
4393
4404
|
* Parses a [LocatorCollection] from its RWPM JSON representation.
|
|
@@ -4395,8 +4406,8 @@ class Pe {
|
|
|
4395
4406
|
static deserialize(t) {
|
|
4396
4407
|
if (!t) return;
|
|
4397
4408
|
let e, i = t.locators;
|
|
4398
|
-
return i && Array.isArray(i) && (e = i.map((
|
|
4399
|
-
metadata:
|
|
4409
|
+
return i && Array.isArray(i) && (e = i.map((r) => k.deserialize(r)).filter((r) => r !== void 0)), new De({
|
|
4410
|
+
metadata: At.deserialize(t.metadata),
|
|
4400
4411
|
links: O.deserialize(t.links),
|
|
4401
4412
|
locators: e
|
|
4402
4413
|
});
|
|
@@ -4425,20 +4436,20 @@ class W {
|
|
|
4425
4436
|
*/
|
|
4426
4437
|
static deserialize(t) {
|
|
4427
4438
|
if (!t) return;
|
|
4428
|
-
let e, i,
|
|
4439
|
+
let e, i, r;
|
|
4429
4440
|
if (Array.isArray(t))
|
|
4430
4441
|
e = O.deserialize(t);
|
|
4431
4442
|
else if (typeof t == "object")
|
|
4432
|
-
e = O.deserialize(t.links), i = /* @__PURE__ */ new Map(), t.metadata && Object.entries(t.metadata).forEach(([
|
|
4433
|
-
i?.set(
|
|
4434
|
-
}),
|
|
4443
|
+
e = O.deserialize(t.links), i = /* @__PURE__ */ new Map(), t.metadata && Object.entries(t.metadata).forEach(([n, a]) => {
|
|
4444
|
+
i?.set(n, a);
|
|
4445
|
+
}), r = W.deserializeCollections(t);
|
|
4435
4446
|
else
|
|
4436
4447
|
return;
|
|
4437
4448
|
if (!(!e || e.items.length === 0))
|
|
4438
4449
|
return new W({
|
|
4439
4450
|
metadata: i?.size ? i : void 0,
|
|
4440
4451
|
links: e,
|
|
4441
|
-
subcollections:
|
|
4452
|
+
subcollections: r?.size ? r : void 0
|
|
4442
4453
|
});
|
|
4443
4454
|
}
|
|
4444
4455
|
/**
|
|
@@ -4448,14 +4459,14 @@ class W {
|
|
|
4448
4459
|
static deserializeCollections(t) {
|
|
4449
4460
|
if (!t) return;
|
|
4450
4461
|
const e = /* @__PURE__ */ new Map();
|
|
4451
|
-
return Object.entries(t).forEach(([i,
|
|
4462
|
+
return Object.entries(t).forEach(([i, r]) => {
|
|
4452
4463
|
if (i !== "links" && i !== "metadata") {
|
|
4453
|
-
const
|
|
4454
|
-
if (
|
|
4464
|
+
const n = W.deserialize(r);
|
|
4465
|
+
if (n) {
|
|
4455
4466
|
const a = new Array();
|
|
4456
|
-
a.push(
|
|
4457
|
-
} else if (Array.isArray(
|
|
4458
|
-
const a =
|
|
4467
|
+
a.push(n), e.set(i, a);
|
|
4468
|
+
} else if (Array.isArray(r)) {
|
|
4469
|
+
const a = r.map(
|
|
4459
4470
|
(o) => W.deserialize(o)
|
|
4460
4471
|
).filter((o) => o !== void 0);
|
|
4461
4472
|
e.set(i, a);
|
|
@@ -4474,13 +4485,13 @@ class W {
|
|
|
4474
4485
|
}
|
|
4475
4486
|
static serializeCollection(t, e) {
|
|
4476
4487
|
e && e.size > 0 && e.forEach(
|
|
4477
|
-
(i,
|
|
4478
|
-
i.length === 1 ? t[
|
|
4488
|
+
(i, r) => {
|
|
4489
|
+
i.length === 1 ? t[r] = i[0].serialize() : t[r] = i.map((n) => n.serialize());
|
|
4479
4490
|
}
|
|
4480
4491
|
);
|
|
4481
4492
|
}
|
|
4482
4493
|
}
|
|
4483
|
-
class
|
|
4494
|
+
class Ue {
|
|
4484
4495
|
constructor(t) {
|
|
4485
4496
|
this.context = t.context, this.metadata = t.metadata, this.links = t.links, this.readingOrder = t.readingOrder, this.resources = t.resources, this.toc = t.toc, this.subcollections = t.subcollections;
|
|
4486
4497
|
}
|
|
@@ -4492,19 +4503,19 @@ class ke {
|
|
|
4492
4503
|
*/
|
|
4493
4504
|
static deserialize(t) {
|
|
4494
4505
|
if (!t) return;
|
|
4495
|
-
const e =
|
|
4506
|
+
const e = ft.deserialize(t.metadata);
|
|
4496
4507
|
if (!e) return;
|
|
4497
4508
|
const i = O.deserialize(t.links);
|
|
4498
4509
|
if (!i) return;
|
|
4499
|
-
const
|
|
4510
|
+
const r = O.deserialize(
|
|
4500
4511
|
t.readingOrder ? t.readingOrder : t.spine
|
|
4501
4512
|
);
|
|
4502
|
-
if (
|
|
4503
|
-
return new
|
|
4513
|
+
if (r)
|
|
4514
|
+
return new Ue({
|
|
4504
4515
|
context: F(t["@context"]),
|
|
4505
4516
|
metadata: e,
|
|
4506
4517
|
links: i,
|
|
4507
|
-
readingOrder:
|
|
4518
|
+
readingOrder: r,
|
|
4508
4519
|
resources: O.deserialize(t.resources),
|
|
4509
4520
|
toc: O.deserialize(t.toc),
|
|
4510
4521
|
subcollections: W.deserializeCollections({
|
|
@@ -4524,30 +4535,30 @@ class ke {
|
|
|
4524
4535
|
const e = new Array();
|
|
4525
4536
|
e.push(this.readingOrder), this.resources && e.push(this.resources), e.push(this.links);
|
|
4526
4537
|
let i;
|
|
4527
|
-
for (const
|
|
4528
|
-
if (i =
|
|
4538
|
+
for (const r of e)
|
|
4539
|
+
if (i = r.findWithRel(t), i !== void 0)
|
|
4529
4540
|
return i;
|
|
4530
4541
|
return i;
|
|
4531
4542
|
}
|
|
4532
4543
|
/** Finds all the links with the given relation in the manifest's links. */
|
|
4533
4544
|
linksWithRel(t) {
|
|
4534
4545
|
const e = [];
|
|
4535
|
-
return e.push(this.readingOrder.filterByRel(t)), this.resources && e.push(this.resources.filterByRel(t)), e.push(this.links.filterByRel(t)), e.reduce((i,
|
|
4546
|
+
return e.push(this.readingOrder.filterByRel(t)), this.resources && e.push(this.resources.filterByRel(t)), e.push(this.links.filterByRel(t)), e.reduce((i, r) => i.concat(r), []);
|
|
4536
4547
|
}
|
|
4537
4548
|
/**
|
|
4538
4549
|
* Creates a new [Locator] object from a [Link] to a resource of this manifest.
|
|
4539
4550
|
* Returns null if the resource is not found in this manifest.
|
|
4540
4551
|
*/
|
|
4541
4552
|
locatorFromLink(t) {
|
|
4542
|
-
const e = t.href.split("#"), i = e.length == 2 ? e[0] : t.href,
|
|
4543
|
-
if (!n) return;
|
|
4544
|
-
const r = n.type;
|
|
4553
|
+
const e = t.href.split("#"), i = e.length == 2 ? e[0] : t.href, r = this.linkWithHref(i);
|
|
4545
4554
|
if (!r) return;
|
|
4555
|
+
const n = r.type;
|
|
4556
|
+
if (!n) return;
|
|
4546
4557
|
const a = e.length == 2 ? e[1] : void 0;
|
|
4547
4558
|
return new k({
|
|
4548
4559
|
href: i,
|
|
4549
|
-
type:
|
|
4550
|
-
title:
|
|
4560
|
+
type: n,
|
|
4561
|
+
title: r.title ?? t.title,
|
|
4551
4562
|
locations: new T({
|
|
4552
4563
|
fragments: a ? [a] : void 0,
|
|
4553
4564
|
progression: a ? void 0 : 0
|
|
@@ -4557,25 +4568,25 @@ class ke {
|
|
|
4557
4568
|
/** Finds the first Link having the given `href` in the publication's links. */
|
|
4558
4569
|
linkWithHref(t) {
|
|
4559
4570
|
const e = (o) => {
|
|
4560
|
-
let
|
|
4561
|
-
for (const
|
|
4562
|
-
if (
|
|
4563
|
-
return
|
|
4571
|
+
let h;
|
|
4572
|
+
for (const p of o)
|
|
4573
|
+
if (h = p.findWithHref(t), h !== void 0)
|
|
4574
|
+
return h;
|
|
4564
4575
|
const m = new Array();
|
|
4565
|
-
return o.forEach((
|
|
4566
|
-
const
|
|
4567
|
-
for (const g of
|
|
4568
|
-
g.alternates &&
|
|
4569
|
-
m.push(...
|
|
4570
|
-
}), m.length > 0 && (
|
|
4576
|
+
return o.forEach((p) => {
|
|
4577
|
+
const u = [];
|
|
4578
|
+
for (const g of p.items)
|
|
4579
|
+
g.alternates && u.push(g.alternates), g.children && u.push(g.children);
|
|
4580
|
+
m.push(...u);
|
|
4581
|
+
}), m.length > 0 && (h = e(m)), h;
|
|
4571
4582
|
}, i = [];
|
|
4572
4583
|
i.push(this.readingOrder), this.resources && i.push(this.resources), i.push(this.links);
|
|
4573
|
-
const
|
|
4574
|
-
if (
|
|
4575
|
-
return
|
|
4576
|
-
const
|
|
4577
|
-
if (
|
|
4578
|
-
const a =
|
|
4584
|
+
const r = e(i);
|
|
4585
|
+
if (r !== void 0)
|
|
4586
|
+
return r;
|
|
4587
|
+
const n = t.split(/[#]/);
|
|
4588
|
+
if (n.length < 2) return;
|
|
4589
|
+
const a = n[0];
|
|
4579
4590
|
return this.linkWithHref(a);
|
|
4580
4591
|
}
|
|
4581
4592
|
/** The URL where this publication is served, computed from the `Link` with `self` relation.
|
|
@@ -4588,8 +4599,8 @@ class ke {
|
|
|
4588
4599
|
if (t) {
|
|
4589
4600
|
let e = t.href;
|
|
4590
4601
|
if (e) {
|
|
4591
|
-
const i = e.lastIndexOf("/"),
|
|
4592
|
-
e = e.replace(new RegExp("/?$query$"), ""), e = e.replace(new RegExp("//$"), ""),
|
|
4602
|
+
const i = e.lastIndexOf("/"), r = i === -1 ? void 0 : e.substring(i + 1);
|
|
4603
|
+
e = e.replace(new RegExp("/?$query$"), ""), e = e.replace(new RegExp("//$"), ""), r && (e = e.replace(new RegExp(r + "$"), ""));
|
|
4593
4604
|
}
|
|
4594
4605
|
return e;
|
|
4595
4606
|
}
|
|
@@ -4610,106 +4621,106 @@ class ke {
|
|
|
4610
4621
|
}
|
|
4611
4622
|
}
|
|
4612
4623
|
export {
|
|
4613
|
-
|
|
4614
|
-
|
|
4615
|
-
|
|
4624
|
+
R as AccessMode,
|
|
4625
|
+
_ as Accessibility,
|
|
4626
|
+
sr as AccessibilityMetadataDisplayGuide,
|
|
4616
4627
|
Tt as AccessibilityProfile,
|
|
4617
4628
|
Ht as AccessibilitySummary,
|
|
4618
4629
|
j as Acquisition,
|
|
4619
4630
|
Mt as AdditionalInformation,
|
|
4620
4631
|
Z as AltIdentifier,
|
|
4621
|
-
|
|
4632
|
+
ae as Attribute,
|
|
4622
4633
|
Ot as AttributeKeys,
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
|
|
4634
|
+
pe as AttributesHolder,
|
|
4635
|
+
Ui as AudioElement,
|
|
4636
|
+
qt as Availability,
|
|
4637
|
+
Di as AvailabilityStatus,
|
|
4638
|
+
q as BelongsTo,
|
|
4639
|
+
Wi as Body,
|
|
4629
4640
|
Pt as Certification,
|
|
4630
4641
|
Gt as Conformance,
|
|
4631
|
-
|
|
4632
|
-
|
|
4633
|
-
|
|
4642
|
+
nr as Content,
|
|
4643
|
+
me as ContentElement,
|
|
4644
|
+
ut as Contributor,
|
|
4634
4645
|
N as Contributors,
|
|
4635
|
-
|
|
4636
|
-
|
|
4646
|
+
Jt as Copies,
|
|
4647
|
+
Ri as DefaultTextContentTokenizer,
|
|
4637
4648
|
Xt as DomRange,
|
|
4638
4649
|
mt as DomRangePoint,
|
|
4639
|
-
|
|
4650
|
+
ti as EmptyFetcher,
|
|
4640
4651
|
Ft as Encryption,
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
|
|
4644
|
-
|
|
4652
|
+
xt as Exemption,
|
|
4653
|
+
A as Feature,
|
|
4654
|
+
Hi as Footnote,
|
|
4655
|
+
$t as GuidedNavigationDocument,
|
|
4645
4656
|
X as GuidedNavigationObject,
|
|
4646
|
-
|
|
4647
|
-
|
|
4657
|
+
pt as GuidedNavigationText,
|
|
4658
|
+
hr as HTMLResourceContentIterator,
|
|
4648
4659
|
P as Hazard,
|
|
4649
|
-
|
|
4660
|
+
ci as HazardType,
|
|
4650
4661
|
Bt as Hazards,
|
|
4651
|
-
|
|
4662
|
+
Gi as Heading,
|
|
4652
4663
|
Zt as Holds,
|
|
4653
|
-
|
|
4654
|
-
|
|
4664
|
+
tr as HttpFetcher,
|
|
4665
|
+
ei as HttpResource,
|
|
4655
4666
|
et as IllegalStateError,
|
|
4656
|
-
|
|
4657
|
-
|
|
4667
|
+
Bi as ImageElement,
|
|
4668
|
+
Ci as IntlTextTokenizer,
|
|
4658
4669
|
Qt as Iterator,
|
|
4659
|
-
|
|
4670
|
+
$ as Layout,
|
|
4660
4671
|
Wt as Legal,
|
|
4661
4672
|
U as Link,
|
|
4662
4673
|
O as Links,
|
|
4663
|
-
|
|
4674
|
+
f as Localization,
|
|
4664
4675
|
M as LocalizedString,
|
|
4665
4676
|
k as Locator,
|
|
4666
|
-
|
|
4667
|
-
|
|
4677
|
+
De as LocatorCollection,
|
|
4678
|
+
At as LocatorCollectionMetadata,
|
|
4668
4679
|
T as LocatorLocations,
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4680
|
+
rt as LocatorText,
|
|
4681
|
+
Ue as Manifest,
|
|
4682
|
+
_t as MediaOverlay,
|
|
4672
4683
|
c as MediaType,
|
|
4673
|
-
|
|
4674
|
-
|
|
4684
|
+
ft as Metadata,
|
|
4685
|
+
Pi as NaiveTextTokenizer,
|
|
4675
4686
|
Dt as Navigation,
|
|
4676
|
-
|
|
4677
|
-
|
|
4687
|
+
ni as NonvisualReading,
|
|
4688
|
+
er as NumberRange,
|
|
4678
4689
|
wt as PDFContentElement,
|
|
4679
4690
|
Nt as Page,
|
|
4680
|
-
|
|
4681
|
-
|
|
4691
|
+
lr as PageContentIteratorPDF,
|
|
4692
|
+
ai as PrerecordedAudio,
|
|
4682
4693
|
Kt as Price,
|
|
4683
|
-
|
|
4684
|
-
|
|
4694
|
+
It as PrimaryAccessMode,
|
|
4695
|
+
J as Profile,
|
|
4685
4696
|
D as Properties,
|
|
4686
|
-
|
|
4697
|
+
V as Publication,
|
|
4687
4698
|
W as PublicationCollection,
|
|
4688
|
-
|
|
4699
|
+
cr as PublicationContentIterator,
|
|
4689
4700
|
H as ReadingProgression,
|
|
4690
|
-
|
|
4701
|
+
ir as Resource,
|
|
4691
4702
|
Ut as RichContent,
|
|
4692
|
-
|
|
4703
|
+
oi as RichContentType,
|
|
4693
4704
|
dt as Subject,
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4705
|
+
Vt as Subjects,
|
|
4706
|
+
Yt as TDM,
|
|
4707
|
+
hi as TDMReservation,
|
|
4708
|
+
ar as TextContentTokenizer,
|
|
4698
4709
|
zt as TextElement,
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4710
|
+
Fi as TextQuote,
|
|
4711
|
+
ge as TextSegment,
|
|
4712
|
+
zi as TextUnit,
|
|
4713
|
+
vt as TextualElement,
|
|
4714
|
+
ht as URITemplate,
|
|
4715
|
+
Mi as VideoElement,
|
|
4716
|
+
ri as VisualAdjustments,
|
|
4706
4717
|
kt as WaysOfReading,
|
|
4707
|
-
|
|
4718
|
+
li as arrayfromJSON,
|
|
4708
4719
|
F as arrayfromJSONorString,
|
|
4709
4720
|
ct as datefromJSON,
|
|
4710
|
-
|
|
4721
|
+
rr as leadingPage,
|
|
4711
4722
|
K as numberfromJSON,
|
|
4712
4723
|
L as positiveNumberfromJSON,
|
|
4713
4724
|
lt as setToArray,
|
|
4714
|
-
|
|
4725
|
+
fe as speakableToken
|
|
4715
4726
|
};
|