@readium/shared 2.1.2 → 2.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- class je {
1
+ class Qe {
2
2
  close() {
3
3
  }
4
4
  links() {
@@ -8,7 +8,7 @@ class je {
8
8
  throw Error("This is an empty fetcher");
9
9
  }
10
10
  }
11
- class en {
11
+ class nn {
12
12
  constructor(t, e) {
13
13
  this.client = t || window.fetch.bind(window), this.baseUrl = e;
14
14
  }
@@ -19,12 +19,12 @@ class en {
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 ti(this.client, t, e);
22
+ return new je(this.client, t, e);
23
23
  }
24
24
  close() {
25
25
  }
26
26
  }
27
- class ti {
27
+ class je {
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 ti {
88
88
  );
89
89
  }
90
90
  }
91
- class sn {
91
+ class rn {
92
92
  constructor(t, e) {
93
93
  this.start = t, this.endInclusive = e;
94
94
  }
95
95
  }
96
- class nn {
96
+ class an {
97
97
  readAsString() {
98
98
  return this.read().then((t) => t === void 0 ? t : new TextDecoder().decode(t));
99
99
  }
@@ -115,14 +115,14 @@ class V {
115
115
  if (!t || typeof t != "object") return;
116
116
  const e = t;
117
117
  return new V({
118
- conformsTo: e.conformsTo ? e.conformsTo.map((i) => Et.deserialize(i)).filter((i) => i !== void 0) : void 0,
119
- certification: e.certification ? Rt.deserialize(e.certification) : void 0,
118
+ conformsTo: e.conformsTo ? e.conformsTo.map((i) => Tt.deserialize(i)).filter((i) => i !== void 0) : void 0,
119
+ certification: e.certification ? Pt.deserialize(e.certification) : void 0,
120
120
  summary: e.summary,
121
121
  accessMode: e.accessMode ? e.accessMode.map((i) => C.deserialize(i)).filter((i) => i !== void 0) : void 0,
122
- accessModeSufficient: e.accessModeSufficient ? e.accessModeSufficient.map((i) => Tt.deserialize(i)).filter((i) => i !== void 0) : void 0,
122
+ accessModeSufficient: e.accessModeSufficient ? e.accessModeSufficient.map((i) => xt.deserialize(i)).filter((i) => i !== void 0) : void 0,
123
123
  feature: e.feature ? e.feature.map((i) => v.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) => xt.deserialize(i)).filter((i) => i !== void 0) : void 0
125
+ exemption: e.exemption ? e.exemption.map((i) => It.deserialize(i)).filter((i) => i !== void 0) : void 0
126
126
  });
127
127
  }
128
128
  /**
@@ -170,8 +170,8 @@ const b = class b {
170
170
  }
171
171
  };
172
172
  b.EPUB_A11Y_10_WCAG_20_A = new b("http://www.idpf.org/epub/a11y/accessibility-20170105.html#wcag-a"), b.EPUB_A11Y_10_WCAG_20_AA = new b("http://www.idpf.org/epub/a11y/accessibility-20170105.html#wcag-aa"), b.EPUB_A11Y_10_WCAG_20_AAA = new b("http://www.idpf.org/epub/a11y/accessibility-20170105.html#wcag-aaa"), b.EPUB_A11Y_11_WCAG_20_A = new b("https://www.w3.org/TR/epub-a11y-11#wcag-2.0-a"), b.EPUB_A11Y_11_WCAG_20_AA = new b("https://www.w3.org/TR/epub-a11y-11#wcag-2.0-aa"), b.EPUB_A11Y_11_WCAG_20_AAA = new b("https://www.w3.org/TR/epub-a11y-11#wcag-2.0-aaa"), b.EPUB_A11Y_11_WCAG_21_A = new b("https://www.w3.org/TR/epub-a11y-11#wcag-2.1-a"), b.EPUB_A11Y_11_WCAG_21_AA = new b("https://www.w3.org/TR/epub-a11y-11#wcag-2.1-aa"), b.EPUB_A11Y_11_WCAG_21_AAA = new b("https://www.w3.org/TR/epub-a11y-11#wcag-2.1-aaa"), b.EPUB_A11Y_11_WCAG_22_A = new b("https://www.w3.org/TR/epub-a11y-11#wcag-2.2-a"), b.EPUB_A11Y_11_WCAG_22_AA = new b("https://www.w3.org/TR/epub-a11y-11#wcag-2.2-aa"), b.EPUB_A11Y_11_WCAG_22_AAA = new b("https://www.w3.org/TR/epub-a11y-11#wcag-2.2-aaa");
173
- let Et = b;
174
- class Rt {
173
+ let Tt = b;
174
+ class Pt {
175
175
  constructor(t = null, e = null, i = null) {
176
176
  this.certifiedBy = t, this.credential = e, this.report = i;
177
177
  }
@@ -180,7 +180,7 @@ class Rt {
180
180
  */
181
181
  static deserialize(t) {
182
182
  if (!(!t || typeof t != "object"))
183
- return new Rt(
183
+ return new Pt(
184
184
  t.certifiedBy,
185
185
  t.credential,
186
186
  t.report
@@ -194,7 +194,7 @@ class Rt {
194
194
  return this.certifiedBy && (t.certifiedBy = this.certifiedBy), this.credential && (t.credential = this.credential), this.report && (t.report = this.report), t;
195
195
  }
196
196
  }
197
- const w = class w {
197
+ const y = class y {
198
198
  constructor(t) {
199
199
  this.value = t;
200
200
  }
@@ -203,7 +203,7 @@ const w = class w {
203
203
  */
204
204
  static deserialize(t) {
205
205
  if (!(!t || typeof t != "string"))
206
- return new w(t);
206
+ return new y(t);
207
207
  }
208
208
  /**
209
209
  * Serializes an [AccessMode] to its RWPM JSON representation.
@@ -212,8 +212,8 @@ const w = class w {
212
212
  return this.value;
213
213
  }
214
214
  };
215
- w.AUDITORY = new w("auditory"), w.CHART_ON_VISUAL = new w("chartOnVisual"), w.CHEM_ON_VISUAL = new w("chemOnVisual"), w.COLOR_DEPENDENT = new w("colorDependent"), w.DIAGRAM_ON_VISUAL = new w("diagramOnVisual"), w.MATH_ON_VISUAL = new w("mathOnVisual"), w.MUSIC_ON_VISUAL = new w("musicOnVisual"), w.TACTILE = new w("tactile"), w.TEXT_ON_VISUAL = new w("textOnVisual"), w.TEXTUAL = new w("textual"), w.VISUAL = new w("visual");
216
- let C = w;
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 C = y;
217
217
  const I = class I {
218
218
  constructor(t) {
219
219
  if (typeof t == "string") {
@@ -249,7 +249,7 @@ const I = class I {
249
249
  }
250
250
  };
251
251
  I.VALID_MODES = /* @__PURE__ */ new Set(["auditory", "tactile", "textual", "visual"]), I.AUDITORY = new I("auditory"), I.TACTILE = new I("tactile"), I.TEXTUAL = new I("textual"), I.VISUAL = new I("visual");
252
- let Tt = I;
252
+ let xt = I;
253
253
  const l = class l {
254
254
  constructor(t) {
255
255
  this.value = t;
@@ -270,7 +270,7 @@ const l = class l {
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
272
  let v = l;
273
- const y = class y {
273
+ const w = class w {
274
274
  constructor(t) {
275
275
  this.value = t;
276
276
  }
@@ -279,7 +279,7 @@ const y = class y {
279
279
  */
280
280
  static deserialize(t) {
281
281
  if (!(!t || typeof t != "string"))
282
- return new y(t);
282
+ return new w(t);
283
283
  }
284
284
  /**
285
285
  * Serializes a [Hazard] to its RWPM JSON representation.
@@ -288,8 +288,8 @@ const y = class y {
288
288
  return this.value;
289
289
  }
290
290
  };
291
- y.FLASHING = new y("flashing"), y.NO_FLASHING_HAZARD = new y("noFlashingHazard"), y.UNKNOWN_FLASHING_HAZARD = new y("unknownFlashingHazard"), y.MOTION_SIMULATION = new y("motionSimulation"), y.NO_MOTION_SIMULATION_HAZARD = new y("noMotionSimulationHazard"), y.UNKNOWN_MOTION_SIMULATION_HAZARD = new y("unknownMotionSimulationHazard"), y.SOUND = new y("sound"), y.NO_SOUND_HAZARD = new y("noSoundHazard"), y.UNKNOWN_SOUND_HAZARD = new y("unknownSoundHazard"), y.UNKNOWN = new y("unknown"), y.NONE = new y("none");
292
- let P = y;
291
+ w.FLASHING = new w("flashing"), w.NO_FLASHING_HAZARD = new w("noFlashingHazard"), w.UNKNOWN_FLASHING_HAZARD = new w("unknownFlashingHazard"), w.MOTION_SIMULATION = new w("motionSimulation"), w.NO_MOTION_SIMULATION_HAZARD = new w("noMotionSimulationHazard"), w.UNKNOWN_MOTION_SIMULATION_HAZARD = new w("unknownMotionSimulationHazard"), w.SOUND = new w("sound"), w.NO_SOUND_HAZARD = new w("noSoundHazard"), w.UNKNOWN_SOUND_HAZARD = new w("unknownSoundHazard"), w.UNKNOWN = new w("unknown"), w.NONE = new w("none");
292
+ let P = w;
293
293
  const S = class S {
294
294
  constructor(t) {
295
295
  this.value = t;
@@ -309,22 +309,22 @@ 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 xt = S;
313
- const ei = { 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" } } }, ii = { 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" } }, si = { 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 = {
312
+ let It = S;
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
314
  "ways-of-reading": { title: "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" } }, "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" } } },
315
- conformance: ei,
316
- navigation: ii,
315
+ conformance: ti,
316
+ navigation: ei,
317
317
  "rich-content": { title: "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)" }, "math-as-mathml": { compact: "Math as MathML", descriptive: "Math formulas in accessible format (MathML)" }, "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", "open-captions": { compact: "Videos have open captions", descriptive: "Videos included in publications have open captions" }, transcript: "Transcript(s) provided", unknown: "No information is available" },
318
- hazards: si,
318
+ hazards: ii,
319
319
  "accessibility-summary": { title: "Accessibility summary", "no-metadata": "No information is available", "publisher-contact": "For more information about the accessibility of this product, please contact the publisher: " },
320
320
  "legal-considerations": { title: "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" },
321
321
  "additional-accessibility-information": { title: "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", "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" }
322
- }, ni = { title: "Règles d'accessibilité", "details-title": "Information détaillée", a: { compact: "Cette publication répond aux règles minimales d'accessibilité", descriptive: "La publication indique qu'elle respecte les règles d'accessibilité EPUB et WCAG 2 niveau A" }, aa: { compact: "Cette publication répond aux règles d'accessibilité reconnues", descriptive: "La publication indique qu'elle respecte les règles d'accessibilité EPUB et WCAG 2 niveau AA" }, aaa: { compact: "Cette publication dépasse les règles d'accessibilité reconnues", descriptive: "La publication indique qu'elle respecte les règles d'accessibilité EPUB et WCAG 2 niveau AAA" }, no: "Aucune information disponible", "unknown-standard": "Aucune indication concernant les normes d'accessibilité", certifier: "Accessibilité évaluée par ", "certifier-credentials": "L'évaluateur est accrédité par ", details: { "certification-info": "Cette publication a été certifié le", "certifier-report": "Pour plus d'information, veuillez consulter le rapport de certification", claim: "Cette publication indique respecter", "epub-accessibility-1-0": "EPUB Accessibilité 1.0", "epub-accessibility-1-1": "EPUB Accessibilité 1.1", "level-a": "Niveau A", "level-aa": "Niveau AA", "level-aaa": "Niveau AAA", "wcag-2-0": { compact: "WCAG 2.0", descriptive: "Règles pour l’accessibilité des contenus Web (WCAG) 2.0" }, "wcag-2-1": { compact: "WCAG 2.1", descriptive: "Règles pour l’accessibilité des contenus Web (WCAG) 2.1" }, "wcag-2-2": { compact: "WCAG 2.2", descriptive: "Règles pour l’accessibilité des contenus Web (WCAG) 2.2" } } }, ri = { title: "Points de repère", index: { compact: "Index", descriptive: "Index comportant des liens vers les entrées référencées" }, "no-metadata": "Aucune information disponible", "page-navigation": { compact: "Aller à la page", descriptive: "Permet d'accéder aux pages de la version source imprimée" }, structural: { compact: "Titres", descriptive: "Contient des titres pour une navigation structurée" }, toc: { compact: "Table des matières", descriptive: "Table des matières" } }, ai = { title: "Points d'attention", flashing: { compact: "Flashs lumineux", descriptive: "La publication contient des flashs lumineux qui peuvent provoquer des crises d’épilepsie" }, "flashing-none": { compact: "Pas de flashs lumineux", descriptive: "La publication ne contient pas de flashs lumineux susceptibles de provoquer des crises d’épilepsie" }, "flashing-unknown": { compact: "Pas d'information concernant la présence de flashs lumineux", descriptive: "La présence de flashs lumineux susceptibles de provoquer des crises d’épilepsie n'a pas pu être déterminée" }, motion: { compact: "Sensations de mouvement", descriptive: "La publication contient des images en mouvement qui peuvent provoquer des nausées, des vertiges et des maux de tête" }, "motion-none": { compact: "Pas de sensations de mouvement", descriptive: "La publication ne contient pas d'images en mouvement qui pourraient provoquer des nausées, des vertiges et des maux de tête" }, "motion-unknown": { compact: "Pas d'information concernant la présence d'images en mouvement", descriptive: "La présence d'images en mouvement susceptibles de provoquer des nausées, des vertiges et des maux de tête n'a pas pu être déterminée" }, "no-metadata": "Aucune information disponible", none: { compact: "Aucun points d'attention", descriptive: "La publication ne présente aucun risque lié à la présence de flashs lumineux, de sensations de mouvement ou de sons" }, sound: { compact: "Sons", descriptive: "La publication contient des sons qui peuvent causer des troubles de la sensibilité" }, "sound-none": { compact: "Pas de risques sonores", descriptive: "La publication ne contient pas de sons susceptibles de provoquer des troubles de la sensibilité" }, "sound-unknown": { compact: "Pas d'information concernant la présence de sons", descriptive: "La présence de sons susceptibles de causer des troubles de sensibilité n'a pas pu être déterminée" }, unknown: "La présence de risques est inconnue" }, oi = {
322
+ }, si = { title: "Règles d'accessibilité", "details-title": "Information détaillée", a: { compact: "Cette publication répond aux règles minimales d'accessibilité", descriptive: "La publication indique qu'elle respecte les règles d'accessibilité EPUB et WCAG 2 niveau A" }, aa: { compact: "Cette publication répond aux règles d'accessibilité reconnues", descriptive: "La publication indique qu'elle respecte les règles d'accessibilité EPUB et WCAG 2 niveau AA" }, aaa: { compact: "Cette publication dépasse les règles d'accessibilité reconnues", descriptive: "La publication indique qu'elle respecte les règles d'accessibilité EPUB et WCAG 2 niveau AAA" }, no: "Aucune information disponible", "unknown-standard": "Aucune indication concernant les normes d'accessibilité", certifier: "Accessibilité évaluée par ", "certifier-credentials": "L'évaluateur est accrédité par ", details: { "certification-info": "Cette publication a été certifié le", "certifier-report": "Pour plus d'information, veuillez consulter le rapport de certification", claim: "Cette publication indique respecter", "epub-accessibility-1-0": "EPUB Accessibilité 1.0", "epub-accessibility-1-1": "EPUB Accessibilité 1.1", "level-a": "Niveau A", "level-aa": "Niveau AA", "level-aaa": "Niveau AAA", "wcag-2-0": { compact: "WCAG 2.0", descriptive: "Règles pour l’accessibilité des contenus Web (WCAG) 2.0" }, "wcag-2-1": { compact: "WCAG 2.1", descriptive: "Règles pour l’accessibilité des contenus Web (WCAG) 2.1" }, "wcag-2-2": { compact: "WCAG 2.2", descriptive: "Règles pour l’accessibilité des contenus Web (WCAG) 2.2" } } }, ni = { title: "Points de repère", index: { compact: "Index", descriptive: "Index comportant des liens vers les entrées référencées" }, "no-metadata": "Aucune information disponible", "page-navigation": { compact: "Aller à la page", descriptive: "Permet d'accéder aux pages de la version source imprimée" }, structural: { compact: "Titres", descriptive: "Contient des titres pour une navigation structurée" }, toc: { compact: "Table des matières", descriptive: "Table des matières" } }, ri = { title: "Points d'attention", flashing: { compact: "Flashs lumineux", descriptive: "La publication contient des flashs lumineux qui peuvent provoquer des crises d’épilepsie" }, "flashing-none": { compact: "Pas de flashs lumineux", descriptive: "La publication ne contient pas de flashs lumineux susceptibles de provoquer des crises d’épilepsie" }, "flashing-unknown": { compact: "Pas d'information concernant la présence de flashs lumineux", descriptive: "La présence de flashs lumineux susceptibles de provoquer des crises d’épilepsie n'a pas pu être déterminée" }, motion: { compact: "Sensations de mouvement", descriptive: "La publication contient des images en mouvement qui peuvent provoquer des nausées, des vertiges et des maux de tête" }, "motion-none": { compact: "Pas de sensations de mouvement", descriptive: "La publication ne contient pas d'images en mouvement qui pourraient provoquer des nausées, des vertiges et des maux de tête" }, "motion-unknown": { compact: "Pas d'information concernant la présence d'images en mouvement", descriptive: "La présence d'images en mouvement susceptibles de provoquer des nausées, des vertiges et des maux de tête n'a pas pu être déterminée" }, "no-metadata": "Aucune information disponible", none: { compact: "Aucun points d'attention", descriptive: "La publication ne présente aucun risque lié à la présence de flashs lumineux, de sensations de mouvement ou de sons" }, sound: { compact: "Sons", descriptive: "La publication contient des sons qui peuvent causer des troubles de la sensibilité" }, "sound-none": { compact: "Pas de risques sonores", descriptive: "La publication ne contient pas de sons susceptibles de provoquer des troubles de la sensibilité" }, "sound-unknown": { compact: "Pas d'information concernant la présence de sons", descriptive: "La présence de sons susceptibles de causer des troubles de sensibilité n'a pas pu être déterminée" }, unknown: "La présence de risques est inconnue" }, ai = {
323
323
  "ways-of-reading": { title: "Lisibilité", "nonvisual-reading": { "alt-text": { compact: "Images décrites", descriptive: "Les images sont décrites par un texte" }, "no-metadata": "Aucune information pour la lecture en voix de synthèse ou en braille", none: { compact: "Non lisible en voix de synthèse ou en braille", descriptive: "Le contenu n'est pas lisible en voix de synthèse ou en braille" }, "not-fully": { compact: "Pas entièrement lisible en voix de synthèse ou en braille", descriptive: "Tous les contenus ne pourront pas être lus à haute voix ou en braille" }, readable: { compact: "Entièrement lisible en voix de synthèse ou en braille", descriptive: "Tous les contenus peuvent être lus en voix de synthèse ou en braille" } }, "prerecorded-audio": { complementary: { compact: "Clips audio préenregistrés", descriptive: "Des clips audio préenregistrés sont intégrés au contenu" }, "no-metadata": "Aucune information sur les enregistrements audio", only: { compact: "Audio préenregistré uniquement", descriptive: "Livre audio sans texte alternatif" }, synchronized: { compact: "Audio préenregistré synchronisé avec du texte", descriptive: "Tous les contenus sont disponibles comme audio préenregistrés synchronisés avec le texte" } }, "visual-adjustments": { modifiable: { compact: "L'affichage peut être adapté", descriptive: "L'apparence du texte et la mise en page peuvent être modifiées en fonction des capacités du système de lecture (famille et taille des polices, espaces entre les paragraphes, les phrases, les mots et les lettres, ainsi que la couleur de l'arrière-plan et du texte)" }, unknown: "Aucune information sur les possibilités d'adaptation de l'affichage", unmodifiable: { compact: "L'affichage ne peut pas être adapté", descriptive: "Le texte et la mise en page ne peuvent pas être adaptés étant donné que l'expérience de lecture est proche de celle de la version imprimée, mais l'application de lecture peut tout de même proposer la capacité de zoomer" } } },
324
- conformance: ni,
325
- navigation: ri,
324
+ conformance: si,
325
+ navigation: ni,
326
326
  "rich-content": { title: "Contenus spécifiques", "accessible-chemistry-as-latex": { compact: "Formules chimiques en LaTeX", descriptive: "Formules chimiques en format accessible (LaTeX)" }, "accessible-chemistry-as-mathml": { compact: "Formules chimiques en MathML", descriptive: "Formules chimiques en format accessible (MathML)" }, "accessible-math-as-latex": { compact: "Mathématiques en LaTeX", descriptive: "Formules mathématiques en format accessible (LaTeX)" }, "math-as-mathml": { compact: "Mathématiques en MathML", descriptive: "Formules mathématiques en format accessible (MathML)" }, "accessible-math-described": "Des descriptions textuelles des formules mathématiques sont fournies", "closed-captions": { compact: "Sous-titres disponibles pour les vidéos", descriptive: "Des sous titres sont disponibles pour les vidéos" }, "extended-descriptions": "Les images porteuses d'informations complexes sont décrites par des descriptions longues", "open-captions": { compact: "Sous-titres incrustés", descriptive: "Des sous titres sont incrustés pour les vidéos" }, transcript: "Transcriptions fournies", unknown: "Aucune information disponible" },
327
- hazards: ai,
327
+ hazards: ri,
328
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
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
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" }
@@ -333,7 +333,7 @@ class $ {
333
333
  constructor() {
334
334
  this.currentLocaleCode = "en", this.locale = ee, this.availableLocales = {
335
335
  en: ee,
336
- fr: oi
336
+ fr: ai
337
337
  };
338
338
  }
339
339
  static getInstance() {
@@ -390,8 +390,8 @@ class $ {
390
390
  }
391
391
  }
392
392
  const p = $.getInstance();
393
- var q = /* @__PURE__ */ ((s) => (s.reflowable = "reflowable", s.fixed = "fixed", s.scrolled = "scrolled", s))(q || {}), ci = /* @__PURE__ */ ((s) => (s.Unknown = "unknown", s.Modifiable = "modifiable", s.Unmodifiable = "unmodifiable", s))(ci || {}), li = /* @__PURE__ */ ((s) => (s.NoMetadata = "noMetadata", s.Readable = "readable", s.NotFully = "notFully", s.Unreadable = "unreadable", s))(li || {}), ui = /* @__PURE__ */ ((s) => (s.NoMetadata = "noMetadata", s.Synchronized = "synchronized", s.AudioOnly = "audioOnly", s.AudioComplementary = "audioComplementary", s))(ui || {});
394
- class Pt {
393
+ var q = /* @__PURE__ */ ((s) => (s.reflowable = "reflowable", s.fixed = "fixed", s.scrolled = "scrolled", s))(q || {}), oi = /* @__PURE__ */ ((s) => (s.Unknown = "unknown", s.Modifiable = "modifiable", s.Unmodifiable = "unmodifiable", s))(oi || {}), ci = /* @__PURE__ */ ((s) => (s.NoMetadata = "noMetadata", s.Readable = "readable", s.NotFully = "notFully", s.Unreadable = "unreadable", s))(ci || {}), li = /* @__PURE__ */ ((s) => (s.NoMetadata = "noMetadata", s.Synchronized = "synchronized", s.AudioOnly = "audioOnly", s.AudioComplementary = "audioComplementary", s))(li || {});
394
+ class kt {
395
395
  constructor(t = "unknown", e = "noMetadata", i = !1, n = "noMetadata") {
396
396
  this.id = "ways-of-reading.title", this.visualAdjustments = t, this.nonvisualReading = e, this.nonvisualReadingAltText = i, this.prerecordedAudio = n, this.shouldDisplay = !0;
397
397
  const r = p.getString(this.id);
@@ -402,13 +402,13 @@ class Pt {
402
402
  compactString: o.compact,
403
403
  descriptiveString: o.descriptive
404
404
  });
405
- let h = "";
406
- 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");
407
- const f = p.getString(h);
405
+ let u = "";
406
+ e === "readable" ? u = "ways-of-reading.nonvisual-reading.readable" : e === "notFully" ? u = "ways-of-reading.nonvisual-reading.not-fully" : e === "unreadable" ? u = "ways-of-reading.nonvisual-reading.none" : e === "noMetadata" && (u = "ways-of-reading.nonvisual-reading.no-metadata");
407
+ const m = p.getString(u);
408
408
  if (this.statements.push({
409
- id: h,
410
- compactString: f.compact,
411
- descriptiveString: f.descriptive
409
+ id: u,
410
+ compactString: m.compact,
411
+ descriptiveString: m.descriptive
412
412
  }), i) {
413
413
  const g = p.getString("ways-of-reading.nonvisual-reading.alt-text");
414
414
  this.statements.push({
@@ -417,35 +417,35 @@ class Pt {
417
417
  descriptiveString: g.descriptive
418
418
  });
419
419
  }
420
- let m = "";
421
- n === "synchronized" ? m = "ways-of-reading.prerecorded-audio.synchronized" : n === "audioOnly" ? m = "ways-of-reading.prerecorded-audio.only" : n === "audioComplementary" ? m = "ways-of-reading.prerecorded-audio.complementary" : n === "noMetadata" && (m = "ways-of-reading.prerecorded-audio.no-metadata");
422
- const u = p.getString(m);
420
+ let f = "";
421
+ n === "synchronized" ? f = "ways-of-reading.prerecorded-audio.synchronized" : n === "audioOnly" ? f = "ways-of-reading.prerecorded-audio.only" : n === "audioComplementary" ? f = "ways-of-reading.prerecorded-audio.complementary" : n === "noMetadata" && (f = "ways-of-reading.prerecorded-audio.no-metadata");
422
+ const h = p.getString(f);
423
423
  this.statements.push({
424
- id: m,
425
- compactString: u.compact,
426
- descriptiveString: u.descriptive
424
+ id: f,
425
+ compactString: h.compact,
426
+ descriptiveString: h.descriptive
427
427
  });
428
428
  }
429
429
  static fromPublication(t) {
430
- const e = t.metadata.accessibility ?? new V(), i = e.feature ?? [], n = t.metadata.layout === q.fixed, r = i.some((d) => d.value === v.DISPLAY_TRANSFORMABILITY.value) ? "modifiable" : n ? "unmodifiable" : "unknown", a = e.accessMode ?? [], o = e.accessModeSufficient ?? [], h = a.length > 0 && a.every((d) => d.value === C.TEXTUAL.value) || o.some((d) => {
430
+ const e = t.metadata.accessibility ?? new V(), i = e.feature ?? [], n = t.metadata.layout === q.fixed, r = i.some((d) => d.value === v.DISPLAY_TRANSFORMABILITY.value) ? "modifiable" : n ? "unmodifiable" : "unknown", a = e.accessMode ?? [], o = e.accessModeSufficient ?? [], u = a.length > 0 && a.every((d) => d.value === C.TEXTUAL.value) || o.some((d) => {
431
431
  const x = d.value;
432
432
  return Array.isArray(x) ? x.every((B) => B === C.TEXTUAL.value) : x === C.TEXTUAL.value;
433
- }), f = a.some((d) => d.value === C.TEXTUAL.value) || o.some((d) => {
433
+ }), m = a.some((d) => d.value === C.TEXTUAL.value) || o.some((d) => {
434
434
  const x = d.value;
435
435
  return Array.isArray(x) ? x.some((B) => B === C.TEXTUAL.value) : x === C.TEXTUAL.value;
436
- }), m = !(a.length === 0 && o.length === 0) && !a.some((d) => d.value === C.TEXTUAL.value) && !o.some((d) => {
436
+ }), f = !(a.length === 0 && o.length === 0) && !a.some((d) => d.value === C.TEXTUAL.value) && !o.some((d) => {
437
437
  const x = d.value;
438
438
  return Array.isArray(x) ? x.some((B) => B === C.TEXTUAL.value) : x === C.TEXTUAL.value;
439
- }), u = i.some((d) => [
439
+ }), h = i.some((d) => [
440
440
  v.LONG_DESCRIPTION.value,
441
441
  v.ALTERNATIVE_TEXT.value,
442
442
  v.DESCRIBED_MATH.value,
443
443
  v.TRANSCRIPT.value
444
- ].includes(d.value)), g = h ? "readable" : f || u ? "notFully" : m ? "unreadable" : "noMetadata", A = u, R = i.some((d) => d.value === v.SYNCHRONIZED_AUDIO_TEXT.value) ? "synchronized" : o.some((d) => {
444
+ ].includes(d.value)), g = u ? "readable" : m || h ? "notFully" : f ? "unreadable" : "noMetadata", A = h, R = i.some((d) => d.value === v.SYNCHRONIZED_AUDIO_TEXT.value) ? "synchronized" : o.some((d) => {
445
445
  const x = d.value;
446
446
  return Array.isArray(x) ? x.some((B) => B === C.AUDITORY.value) : x === C.AUDITORY.value;
447
447
  }) ? "audioOnly" : a.some((d) => d.value === C.AUDITORY.value) ? "audioComplementary" : "noMetadata";
448
- return new Pt(
448
+ return new kt(
449
449
  r,
450
450
  g,
451
451
  A,
@@ -453,7 +453,7 @@ class Pt {
453
453
  );
454
454
  }
455
455
  }
456
- class kt {
456
+ class Dt {
457
457
  constructor(t = !1, e = !1, i = !1, n = !1) {
458
458
  this.id = "navigation.title", this.tableOfContents = t, this.index = e, this.headings = i, this.page = n, this.noMetadata = !t && !e && !i && !n;
459
459
  const r = p.getString(this.id);
@@ -500,7 +500,7 @@ class kt {
500
500
  }
501
501
  static fromPublication(t) {
502
502
  const i = (t.metadata.accessibility ?? new V()).feature ?? [];
503
- return new kt(
503
+ return new Dt(
504
504
  i.some((n) => n.value === v.TABLE_OF_CONTENTS.value),
505
505
  i.some((n) => n.value === v.INDEX.value),
506
506
  i.some((n) => n.value === v.STRUCTURAL_NAVIGATION.value),
@@ -508,95 +508,95 @@ class kt {
508
508
  );
509
509
  }
510
510
  }
511
- var hi = /* @__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))(hi || {});
512
- class Dt {
513
- constructor(t = !1, e = !1, i = !1, n = !1, r = !1, a = !1, o = !1, h = !1, f = !1) {
514
- this.id = "rich-content.title", this.extendedAltTextDescriptions = t, this.mathFormula = e, this.mathFormulaAsMathML = i, this.mathFormulaAsLaTeX = n, this.chemicalFormulaAsMathML = r, this.chemicalFormulaAsLaTeX = a, this.closedCaptions = o, this.openCaptions = h, this.transcript = f, this.noMetadata = !t && !e && !i && !n && !r && !a && !o && !h && !f, this.shouldDisplay = !this.noMetadata;
515
- const m = p.getString(this.id);
516
- if (this.title = m.compact, this.statements = [], t) {
517
- const u = p.getString("rich-content.extended-descriptions");
511
+ var ui = /* @__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))(ui || {});
512
+ class Ut {
513
+ constructor(t = !1, e = !1, i = !1, n = !1, r = !1, a = !1, o = !1, u = !1, m = !1) {
514
+ this.id = "rich-content.title", this.extendedAltTextDescriptions = t, this.mathFormula = e, this.mathFormulaAsMathML = i, this.mathFormulaAsLaTeX = n, this.chemicalFormulaAsMathML = r, this.chemicalFormulaAsLaTeX = a, this.closedCaptions = o, this.openCaptions = u, this.transcript = m, this.noMetadata = !t && !e && !i && !n && !r && !a && !o && !u && !m, this.shouldDisplay = !this.noMetadata;
515
+ const f = p.getString(this.id);
516
+ if (this.title = f.compact, this.statements = [], t) {
517
+ const h = p.getString("rich-content.extended-descriptions");
518
518
  this.statements.push({
519
519
  id: "rich-content.extended-descriptions",
520
- compactString: u.compact,
521
- descriptiveString: u.descriptive
520
+ compactString: h.compact,
521
+ descriptiveString: h.descriptive
522
522
  });
523
523
  }
524
524
  if (e) {
525
- const u = p.getString("rich-content.accessible-math-described");
525
+ const h = p.getString("rich-content.accessible-math-described");
526
526
  this.statements.push({
527
527
  id: "rich-content.accessible-math-described",
528
- compactString: u.compact,
529
- descriptiveString: u.descriptive
528
+ compactString: h.compact,
529
+ descriptiveString: h.descriptive
530
530
  });
531
531
  }
532
532
  if (i) {
533
- const u = p.getString("rich-content.math-as-mathml");
533
+ const h = p.getString("rich-content.math-as-mathml");
534
534
  this.statements.push({
535
535
  id: "rich-content.math-as-mathml",
536
- compactString: u.compact,
537
- descriptiveString: u.descriptive
536
+ compactString: h.compact,
537
+ descriptiveString: h.descriptive
538
538
  });
539
539
  }
540
540
  if (n) {
541
- const u = p.getString("rich-content.accessible-math-as-latex");
541
+ const h = p.getString("rich-content.accessible-math-as-latex");
542
542
  this.statements.push({
543
543
  id: "rich-content.accessible-math-as-latex",
544
- compactString: u.compact,
545
- descriptiveString: u.descriptive
544
+ compactString: h.compact,
545
+ descriptiveString: h.descriptive
546
546
  });
547
547
  }
548
548
  if (r) {
549
- const u = p.getString("rich-content.accessible-chemistry-as-mathml");
549
+ const h = p.getString("rich-content.accessible-chemistry-as-mathml");
550
550
  this.statements.push({
551
551
  id: "rich-content.accessible-chemistry-as-mathml",
552
- compactString: u.compact,
553
- descriptiveString: u.descriptive
552
+ compactString: h.compact,
553
+ descriptiveString: h.descriptive
554
554
  });
555
555
  }
556
556
  if (a) {
557
- const u = p.getString("rich-content.accessible-chemistry-as-latex");
557
+ const h = p.getString("rich-content.accessible-chemistry-as-latex");
558
558
  this.statements.push({
559
559
  id: "rich-content.accessible-chemistry-as-latex",
560
- compactString: u.compact,
561
- descriptiveString: u.descriptive
560
+ compactString: h.compact,
561
+ descriptiveString: h.descriptive
562
562
  });
563
563
  }
564
564
  if (o) {
565
- const u = p.getString("rich-content.closed-captions");
565
+ const h = p.getString("rich-content.closed-captions");
566
566
  this.statements.push({
567
567
  id: "rich-content.closed-captions",
568
- compactString: u.compact,
569
- descriptiveString: u.descriptive
568
+ compactString: h.compact,
569
+ descriptiveString: h.descriptive
570
570
  });
571
571
  }
572
- if (h) {
573
- const u = p.getString("rich-content.open-captions");
572
+ if (u) {
573
+ const h = p.getString("rich-content.open-captions");
574
574
  this.statements.push({
575
575
  id: "rich-content.open-captions",
576
- compactString: u.compact,
577
- descriptiveString: u.descriptive
576
+ compactString: h.compact,
577
+ descriptiveString: h.descriptive
578
578
  });
579
579
  }
580
- if (f) {
581
- const u = p.getString("rich-content.transcript");
580
+ if (m) {
581
+ const h = p.getString("rich-content.transcript");
582
582
  this.statements.push({
583
583
  id: "rich-content.transcript",
584
- compactString: u.compact,
585
- descriptiveString: u.descriptive
584
+ compactString: h.compact,
585
+ descriptiveString: h.descriptive
586
586
  });
587
587
  }
588
588
  if (this.statements.length === 0) {
589
- const u = p.getString("rich-content.unknown");
589
+ const h = p.getString("rich-content.unknown");
590
590
  this.statements.push({
591
591
  id: "rich-content.unknown",
592
- compactString: u.compact,
593
- descriptiveString: u.descriptive
592
+ compactString: h.compact,
593
+ descriptiveString: h.descriptive
594
594
  });
595
595
  }
596
596
  }
597
597
  static fromPublication(t) {
598
598
  const i = (t.metadata.accessibility ?? new V()).feature ?? [];
599
- return new Dt(
599
+ return new Ut(
600
600
  i.some((n) => n.value === v.LONG_DESCRIPTION.value),
601
601
  i.some((n) => n.value === v.DESCRIBED_MATH.value),
602
602
  i.some((n) => n.value === v.MATH_ML.value),
@@ -609,9 +609,9 @@ class Dt {
609
609
  );
610
610
  }
611
611
  }
612
- class Ut {
613
- constructor(t = !1, e = !1, i = !1, n = !1, r = !1, a = !1, o = !1, h = !1, f = !1, m = !1, u = !1, g = !1, A = !1) {
614
- this.id = "additional-accessibility-information.title", this.pageBreakMarkers = t, this.aria = e, this.audioDescriptions = i, this.braille = n, this.rubyAnnotations = r, this.fullRubyAnnotations = a, this.highAudioContrast = o, this.highDisplayContrast = h, this.largePrint = f, this.signLanguage = m, this.tactileGraphics = u, this.tactileObjects = g, this.textToSpeechHinting = A, this.noMetadata = !t && !e && !i && !n && !r && !a && !o && !h && !f && !m && !u && !g && !A, this.shouldDisplay = !this.noMetadata;
612
+ class Mt {
613
+ constructor(t = !1, e = !1, i = !1, n = !1, r = !1, a = !1, o = !1, u = !1, m = !1, f = !1, h = !1, g = !1, A = !1) {
614
+ this.id = "additional-accessibility-information.title", this.pageBreakMarkers = t, this.aria = e, this.audioDescriptions = i, this.braille = n, this.rubyAnnotations = r, this.fullRubyAnnotations = a, this.highAudioContrast = o, this.highDisplayContrast = u, this.largePrint = m, this.signLanguage = f, this.tactileGraphics = h, this.tactileObjects = g, this.textToSpeechHinting = A, this.noMetadata = !t && !e && !i && !n && !r && !a && !o && !u && !m && !f && !h && !g && !A, this.shouldDisplay = !this.noMetadata;
615
615
  const R = p.getString(this.id);
616
616
  if (this.title = R.compact, this.statements = [], t) {
617
617
  const d = p.getString("additional-accessibility-information.page-breaks");
@@ -669,7 +669,7 @@ class Ut {
669
669
  descriptiveString: d.descriptive
670
670
  });
671
671
  }
672
- if (h) {
672
+ if (u) {
673
673
  const d = p.getString("additional-accessibility-information.high-contrast-between-text-and-background");
674
674
  this.statements.push({
675
675
  id: "additional-accessibility-information.high-contrast-between-text-and-background",
@@ -677,7 +677,7 @@ class Ut {
677
677
  descriptiveString: d.descriptive
678
678
  });
679
679
  }
680
- if (f) {
680
+ if (m) {
681
681
  const d = p.getString("additional-accessibility-information.large-print");
682
682
  this.statements.push({
683
683
  id: "additional-accessibility-information.large-print",
@@ -685,7 +685,7 @@ class Ut {
685
685
  descriptiveString: d.descriptive
686
686
  });
687
687
  }
688
- if (m) {
688
+ if (f) {
689
689
  const d = p.getString("additional-accessibility-information.sign-language");
690
690
  this.statements.push({
691
691
  id: "additional-accessibility-information.sign-language",
@@ -693,7 +693,7 @@ class Ut {
693
693
  descriptiveString: d.descriptive
694
694
  });
695
695
  }
696
- if (u) {
696
+ if (h) {
697
697
  const d = p.getString("additional-accessibility-information.tactile-graphics");
698
698
  this.statements.push({
699
699
  id: "additional-accessibility-information.tactile-graphics",
@@ -720,7 +720,7 @@ class Ut {
720
720
  }
721
721
  static fromPublication(t) {
722
722
  const i = (t.metadata.accessibility ?? new V()).feature ?? [];
723
- return new Ut(
723
+ return new Mt(
724
724
  i.some((n) => n.value === v.PAGE_BREAK_MARKERS.value || n.value === v.PRINT_PAGE_NUMBERS.value),
725
725
  i.some((n) => n.value === v.ARIA.value),
726
726
  i.some((n) => n.value === v.AUDIO_DESCRIPTION.value),
@@ -737,8 +737,8 @@ class Ut {
737
737
  );
738
738
  }
739
739
  }
740
- var di = /* @__PURE__ */ ((s) => (s.yes = "yes", s.no = "no", s.unknown = "unknown", s.noMetadata = "noMetadata", s))(di || {});
741
- class Mt {
740
+ var hi = /* @__PURE__ */ ((s) => (s.yes = "yes", s.no = "no", s.unknown = "unknown", s.noMetadata = "noMetadata", s))(hi || {});
741
+ class Bt {
742
742
  constructor(t = "unknown", e = "unknown", i = "unknown") {
743
743
  this.id = "hazards.title", this.flashing = t, this.motion = e, this.sound = i;
744
744
  const n = p.getString(this.id);
@@ -841,10 +841,10 @@ class Mt {
841
841
  let r;
842
842
  e.some((o) => o.value === P.MOTION_SIMULATION.value) ? r = "yes" : e.some((o) => o.value === P.NO_MOTION_SIMULATION_HAZARD.value) ? r = "no" : e.some((o) => o.value === P.UNKNOWN_MOTION_SIMULATION_HAZARD.value) ? r = "unknown" : r = i;
843
843
  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 Mt(n, r, 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(n, r, a);
845
845
  }
846
846
  }
847
- class Bt {
847
+ class Gt {
848
848
  constructor(t = []) {
849
849
  this.id = "conformance.title", this.profiles = t, this.shouldDisplay = !0;
850
850
  const e = p.getString(this.id);
@@ -889,7 +889,7 @@ class Bt {
889
889
  }
890
890
  static fromPublication(t) {
891
891
  const e = t.metadata.accessibility?.conformsTo ?? [];
892
- return new Bt(e);
892
+ return new Gt(e);
893
893
  }
894
894
  }
895
895
  class Wt {
@@ -917,7 +917,7 @@ class Wt {
917
917
  return new Wt(i);
918
918
  }
919
919
  }
920
- class Gt {
920
+ class Ht {
921
921
  constructor(t) {
922
922
  this.id = "accessibility-summary.title", this.shouldDisplay = !0;
923
923
  const e = p.getString(this.id);
@@ -939,12 +939,12 @@ class Gt {
939
939
  }
940
940
  }
941
941
  static fromPublication(t) {
942
- return new Gt(t);
942
+ return new Ht(t);
943
943
  }
944
944
  }
945
- class rn {
945
+ class on {
946
946
  constructor(t) {
947
- this.waysOfReading = Pt.fromPublication(t), this.navigation = kt.fromPublication(t), this.richContent = Dt.fromPublication(t), this.additionalInformation = Ut.fromPublication(t), this.hazards = Mt.fromPublication(t), this.conformance = Bt.fromPublication(t), this.legal = Wt.fromPublication(t), this.accessibilitySummary = Gt.fromPublication(t), this.fields = [
947
+ 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
948
  this.waysOfReading,
949
949
  this.navigation,
950
950
  this.richContent,
@@ -956,7 +956,7 @@ class rn {
956
956
  ];
957
957
  }
958
958
  }
959
- class Ht {
959
+ class Ft {
960
960
  /**
961
961
  * Creates a [Encryption].
962
962
  */
@@ -968,7 +968,7 @@ class Ht {
968
968
  */
969
969
  static deserialize(t) {
970
970
  if (t && t.algorithm)
971
- return new Ht({
971
+ return new Ft({
972
972
  algorithm: t.algorithm,
973
973
  compression: t.compression,
974
974
  originalLength: t.originalLength,
@@ -984,7 +984,7 @@ class Ht {
984
984
  return this.compression !== void 0 && (t.compression = this.compression), this.originalLength !== void 0 && (t.originalLength = this.originalLength), this.profile !== void 0 && (t.profile = this.profile), this.scheme !== void 0 && (t.scheme = this.scheme), t;
985
985
  }
986
986
  }
987
- var It = /* @__PURE__ */ ((s) => (s.left = "left", s.right = "right", s.center = "center", s))(It || {});
987
+ var Nt = /* @__PURE__ */ ((s) => (s.left = "left", s.right = "right", s.center = "center", s))(Nt || {});
988
988
  class D {
989
989
  constructor(t) {
990
990
  this.otherProperties = t;
@@ -1017,10 +1017,10 @@ class D {
1017
1017
  }
1018
1018
  Object.defineProperty(D.prototype, "encryption", {
1019
1019
  get: function() {
1020
- return Ht.deserialize(this.otherProperties.encrypted);
1020
+ return Ft.deserialize(this.otherProperties.encrypted);
1021
1021
  }
1022
1022
  });
1023
- class Ft {
1023
+ class Vt {
1024
1024
  /** Creates a MediaOverlay object */
1025
1025
  constructor(t) {
1026
1026
  this.activeClass = t.activeClass, this.playbackActiveClass = t.playbackActiveClass;
@@ -1030,7 +1030,7 @@ class Ft {
1030
1030
  */
1031
1031
  static deserialize(t) {
1032
1032
  if (t)
1033
- return new Ft({
1033
+ return new Vt({
1034
1034
  activeClass: t.activeClass,
1035
1035
  playbackActiveClass: t.playbackActiveClass
1036
1036
  });
@@ -1043,11 +1043,11 @@ class Ft {
1043
1043
  return this.activeClass && (t.activeClass = this.activeClass), this.playbackActiveClass && (t.playbackActiveClass = this.playbackActiveClass), t;
1044
1044
  }
1045
1045
  }
1046
- function pi(s) {
1046
+ function di(s) {
1047
1047
  return s && Array.isArray(s) ? s : void 0;
1048
1048
  }
1049
1049
  function F(s) {
1050
- return s && typeof s == "string" ? [s] : pi(s);
1050
+ return s && typeof s == "string" ? [s] : di(s);
1051
1051
  }
1052
1052
  function ct(s) {
1053
1053
  return typeof s == "string" ? new Date(s) : void 0;
@@ -1109,15 +1109,15 @@ class c {
1109
1109
  a[R] = d;
1110
1110
  }
1111
1111
  }
1112
- const o = {}, h = Object.keys(a);
1113
- h.sort((g, A) => g.localeCompare(A)), h.forEach((g) => o[g] = a[g]);
1114
- let f = "";
1112
+ const o = {}, u = Object.keys(a);
1113
+ u.sort((g, A) => g.localeCompare(A)), u.forEach((g) => o[g] = a[g]);
1114
+ let m = "";
1115
1115
  for (const g in o) {
1116
1116
  const A = o[g];
1117
- f += `;${g}=${A}`;
1117
+ m += `;${g}=${A}`;
1118
1118
  }
1119
- const m = `${e}/${i}${f}`, u = o.encoding;
1120
- this.string = m, this.type = e, this.subtype = i, this.parameters = o, this.encoding = u, this.name = t.name, this.fileExtension = t.fileExtension;
1119
+ const f = `${e}/${i}${m}`, h = o.encoding;
1120
+ this.string = f, this.type = e, this.subtype = i, this.parameters = o, this.encoding = h, this.name = t.name, this.fileExtension = t.fileExtension;
1121
1121
  }
1122
1122
  static parse(t) {
1123
1123
  return new c(t);
@@ -1593,8 +1593,8 @@ class T {
1593
1593
  "totalProgression",
1594
1594
  "position"
1595
1595
  ]);
1596
- return Object.entries(t).forEach(([o, h]) => {
1597
- a.has(o) || r.set(o, h);
1596
+ return Object.entries(t).forEach(([o, u]) => {
1597
+ a.has(o) || r.set(o, u);
1598
1598
  }), new T({
1599
1599
  fragments: F(t.fragments || t.fragment),
1600
1600
  progression: e !== void 0 && e >= 0 && e <= 1 ? e : void 0,
@@ -1855,13 +1855,13 @@ class O {
1855
1855
  return this.items.filter((t) => t.type);
1856
1856
  }
1857
1857
  }
1858
- const W = class W {
1858
+ const G = class G {
1859
1859
  /**
1860
1860
  * translations can be a string or a collection of language/translation pairs,
1861
1861
  * for a single string the language is assumed to be undefined
1862
1862
  */
1863
1863
  constructor(t) {
1864
- this.translations = typeof t == "string" ? { [W.UNDEFINED_LANGUAGE]: t } : t;
1864
+ this.translations = typeof t == "string" ? { [G.UNDEFINED_LANGUAGE]: t } : t;
1865
1865
  }
1866
1866
  /**
1867
1867
  * Parses a [LocalizedString] from its RWPM JSON representation.
@@ -1885,7 +1885,7 @@ const W = class W {
1885
1885
  */
1886
1886
  static deserialize(t) {
1887
1887
  if (t && (typeof t == "string" || t.constructor === Object))
1888
- return new W(t);
1888
+ return new G(t);
1889
1889
  }
1890
1890
  serialize() {
1891
1891
  return this.translations;
@@ -1899,11 +1899,11 @@ const W = class W {
1899
1899
  * 4. returns empty string
1900
1900
  */
1901
1901
  getTranslation(t) {
1902
- return this.translations[t || W.UNDEFINED_LANGUAGE] || this.translations[W.UNDEFINED_LANGUAGE] || this.translations[W.LANGUAGE_EN] || (Object.values(this.translations).length === 0 ? "" : Object.values(this.translations)[0]);
1902
+ return this.translations[t || G.UNDEFINED_LANGUAGE] || this.translations[G.UNDEFINED_LANGUAGE] || this.translations[G.LANGUAGE_EN] || (Object.values(this.translations).length === 0 ? "" : Object.values(this.translations)[0]);
1903
1903
  }
1904
1904
  };
1905
- W.UNDEFINED_LANGUAGE = "undefined", W.LANGUAGE_EN = "en";
1906
- let M = W;
1905
+ G.UNDEFINED_LANGUAGE = "und", G.LANGUAGE_EN = "en";
1906
+ let M = G;
1907
1907
  class ht {
1908
1908
  /**
1909
1909
  * Creates a [Contributor] object.
@@ -1963,7 +1963,7 @@ class N {
1963
1963
  return this.items.map((t) => t.serialize());
1964
1964
  }
1965
1965
  }
1966
- class _ {
1966
+ class J {
1967
1967
  /** Creates an Array of [Subject]. */
1968
1968
  constructor(t) {
1969
1969
  this.items = t && t.items ? t.items : /* @__PURE__ */ new Map();
@@ -1977,7 +1977,7 @@ class _ {
1977
1977
  return Object.entries(t).forEach(([i, n]) => {
1978
1978
  const r = N.deserialize(n);
1979
1979
  r && r.items.length > 0 && e.set(i, r);
1980
- }), new _({ items: e });
1980
+ }), new J({ items: e });
1981
1981
  }
1982
1982
  /**
1983
1983
  * Serializes a [BelongsTo] to its RWPM JSON representation.
@@ -1989,9 +1989,9 @@ class _ {
1989
1989
  ), t;
1990
1990
  }
1991
1991
  }
1992
- 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 || {});
1993
- function an(s) {
1994
- return s === "rtl" ? It.right : It.left;
1992
+ var _ = /* @__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))(_ || {}), H = /* @__PURE__ */ ((s) => (s.ltr = "ltr", s.rtl = "rtl", s))(H || {});
1993
+ function cn(s) {
1994
+ return s === "rtl" ? Nt.right : Nt.left;
1995
1995
  }
1996
1996
  class dt {
1997
1997
  /** Creates a [Subject]. */
@@ -2023,7 +2023,7 @@ class dt {
2023
2023
  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
2024
  }
2025
2025
  }
2026
- class Vt {
2026
+ class Yt {
2027
2027
  /** Creates an Array of [Subject]. */
2028
2028
  constructor(t) {
2029
2029
  this.items = t;
@@ -2034,7 +2034,7 @@ class Vt {
2034
2034
  static deserialize(t) {
2035
2035
  if (!t) return;
2036
2036
  const e = Array.isArray(t) ? t : [t];
2037
- return new Vt(
2037
+ return new Yt(
2038
2038
  e.map((i) => dt.deserialize(i)).filter((i) => i !== void 0)
2039
2039
  );
2040
2040
  }
@@ -2045,8 +2045,8 @@ class Vt {
2045
2045
  return this.items.map((t) => t.serialize());
2046
2046
  }
2047
2047
  }
2048
- var fi = /* @__PURE__ */ ((s) => (s.all = "all", s.none = "none", s))(fi || {});
2049
- class Yt {
2048
+ var pi = /* @__PURE__ */ ((s) => (s.all = "all", s.none = "none", s))(pi || {});
2049
+ class $t {
2050
2050
  /** Creates a [TDM] object */
2051
2051
  constructor(t) {
2052
2052
  this.reservation = t.reservation, this.policy = t.policy;
@@ -2056,7 +2056,7 @@ class Yt {
2056
2056
  */
2057
2057
  static deserialize(t) {
2058
2058
  if (t)
2059
- return new Yt({
2059
+ return new $t({
2060
2060
  reservation: t.reservation,
2061
2061
  policy: t.policy
2062
2062
  });
@@ -2072,7 +2072,7 @@ class Yt {
2072
2072
  const tt = class tt {
2073
2073
  /** Creates [Metadata] object */
2074
2074
  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 _()), this.belongsTo.items.set("collection", this.belongsToCollections)), this.belongsToSeries && this.belongsToSeries.items.length > 0 && (this.belongsTo || (this.belongsTo = new _()), 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;
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 J()), this.belongsTo.items.set("collection", this.belongsToCollections)), this.belongsToSeries && this.belongsToSeries.items.length > 0 && (this.belongsTo || (this.belongsTo = new J()), 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
2076
  }
2077
2077
  /**
2078
2078
  * Parses a [Metadata] from its RWPM JSON representation.
@@ -2081,40 +2081,40 @@ const tt = class tt {
2081
2081
  */
2082
2082
  static deserialize(t) {
2083
2083
  if (!(t && t.title)) return;
2084
- const e = M.deserialize(t.title), i = t["@type"], n = F(t.conformsTo), r = t.identifier, a = Z.deserialize(t.altIdentifier), o = M.deserialize(t.subtitle), h = M.deserialize(t.sortAs), f = N.deserialize(t.artist), m = N.deserialize(t.author), u = N.deserialize(t.colorist), g = N.deserialize(t.contributor), A = N.deserialize(t.editor), R = N.deserialize(t.illustrator), d = N.deserialize(t.inker), x = N.deserialize(t.letterer), B = N.deserialize(t.narrator), Ue = N.deserialize(t.penciler), Me = N.deserialize(t.translator), Be = F(t.language), We = t.description, Ge = N.deserialize(t.publisher), He = N.deserialize(t.imprint), Fe = ct(t.published), Ve = ct(t.modified), Ye = Vt.deserialize(t.subject), $e = _.deserialize(t.belongsTo), qe = V.deserialize(t.accessibility), Xe = t.layout, Ke = t.readingProgression, Ze = L(t.duration), Je = L(t.numberOfPages), _e = Yt.deserialize(t.tdm);
2084
+ const e = M.deserialize(t.title), i = t["@type"], n = F(t.conformsTo), r = t.identifier, a = Z.deserialize(t.altIdentifier), o = M.deserialize(t.subtitle), u = M.deserialize(t.sortAs), m = N.deserialize(t.artist), f = N.deserialize(t.author), h = N.deserialize(t.colorist), g = N.deserialize(t.contributor), A = N.deserialize(t.editor), R = N.deserialize(t.illustrator), d = N.deserialize(t.inker), x = N.deserialize(t.letterer), B = N.deserialize(t.narrator), De = N.deserialize(t.penciler), Ue = N.deserialize(t.translator), Me = F(t.language), Be = t.description, Ge = N.deserialize(t.publisher), We = N.deserialize(t.imprint), He = ct(t.published), Fe = ct(t.modified), Ve = Yt.deserialize(t.subject), Ye = J.deserialize(t.belongsTo), $e = V.deserialize(t.accessibility), qe = t.layout, Xe = t.readingProgression, Ke = L(t.duration), Ze = L(t.numberOfPages), _e = $t.deserialize(t.tdm);
2085
2085
  let at = Object.assign({}, t);
2086
- return tt.mappedProperties.forEach((Qe) => delete at[Qe]), Object.keys(at).length === 0 && (at = void 0), new tt({
2086
+ return tt.mappedProperties.forEach((Je) => delete at[Je]), Object.keys(at).length === 0 && (at = void 0), new tt({
2087
2087
  title: e,
2088
2088
  typeUri: i,
2089
2089
  conformsTo: n,
2090
2090
  identifier: r,
2091
2091
  altIdentifier: a,
2092
2092
  subtitle: o,
2093
- sortAs: h,
2094
- artists: f,
2095
- authors: m,
2096
- colorists: u,
2093
+ sortAs: u,
2094
+ artists: m,
2095
+ authors: f,
2096
+ colorists: h,
2097
2097
  contributors: g,
2098
2098
  editors: A,
2099
2099
  illustrators: R,
2100
2100
  inkers: d,
2101
2101
  letterers: x,
2102
2102
  narrators: B,
2103
- pencilers: Ue,
2104
- translators: Me,
2105
- languages: Be,
2106
- description: We,
2103
+ pencilers: De,
2104
+ translators: Ue,
2105
+ languages: Me,
2106
+ description: Be,
2107
2107
  publishers: Ge,
2108
- imprints: He,
2109
- published: Fe,
2110
- modified: Ve,
2111
- subjects: Ye,
2112
- belongsTo: $e,
2113
- layout: Xe,
2114
- readingProgression: Ke,
2115
- duration: Ze,
2116
- numberOfPages: Je,
2117
- accessibility: qe,
2108
+ imprints: We,
2109
+ published: He,
2110
+ modified: Fe,
2111
+ subjects: Ve,
2112
+ belongsTo: Ye,
2113
+ layout: qe,
2114
+ readingProgression: Xe,
2115
+ duration: Ke,
2116
+ numberOfPages: Ze,
2117
+ accessibility: $e,
2118
2118
  tdm: _e,
2119
2119
  otherMetadata: at
2120
2120
  });
@@ -2146,12 +2146,12 @@ const tt = class tt {
2146
2146
  return null;
2147
2147
  for (const t of this.conformsTo)
2148
2148
  switch (t) {
2149
- case J.EPUB:
2149
+ case _.EPUB:
2150
2150
  return this.layout || q.reflowable;
2151
- case J.DIVINA:
2151
+ case _.DIVINA:
2152
2152
  return this.layout === q.reflowable ? q.fixed : this.layout || q.fixed;
2153
- case J.AUDIOBOOK:
2154
- case J.PDF:
2153
+ case _.AUDIOBOOK:
2154
+ case _.PDF:
2155
2155
  return null;
2156
2156
  }
2157
2157
  return null;
@@ -2219,18 +2219,18 @@ let pt = tt;
2219
2219
  pt.prototype.getMediaOverlay = function() {
2220
2220
  const s = this.otherMetadata?.mediaOverlay;
2221
2221
  if (s)
2222
- return Ft.deserialize(s);
2222
+ return Vt.deserialize(s);
2223
2223
  };
2224
2224
  D.prototype.getContains = function() {
2225
2225
  return new Set(this.otherProperties.contains || []);
2226
2226
  };
2227
- class $t {
2227
+ class qt {
2228
2228
  constructor(t) {
2229
2229
  this.links = t.links, this.guided = t.guided;
2230
2230
  }
2231
2231
  static deserialize(t) {
2232
2232
  if (t)
2233
- return new $t({
2233
+ return new qt({
2234
2234
  links: O.deserialize(t.links),
2235
2235
  guided: X.deserializeArray(t.guided)
2236
2236
  });
@@ -2358,16 +2358,16 @@ class X {
2358
2358
  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
2359
  }
2360
2360
  }
2361
- function mi(s, t) {
2361
+ function fi(s, t) {
2362
2362
  return t.length > 1 ? t.indexOf(s.slice(-1)) > -1 : s.slice(-1) === t;
2363
2363
  }
2364
- function gi(s, t) {
2364
+ function mi(s, t) {
2365
2365
  return s.slice(s.length - t.length) === t;
2366
2366
  }
2367
- const wt = {
2368
- endsWith: gi,
2369
- endsWithChar: mi
2370
- }, bi = [
2367
+ const yt = {
2368
+ endsWith: mi,
2369
+ endsWithChar: fi
2370
+ }, gi = [
2371
2371
  "ie",
2372
2372
  "eg",
2373
2373
  "ext",
@@ -2459,16 +2459,16 @@ const wt = {
2459
2459
  "Fri",
2460
2460
  "Sat"
2461
2461
  ];
2462
- function he(s) {
2463
- return /^[A-Z][a-z].*/.test(s) || Nt(s);
2462
+ function ue(s) {
2463
+ return /^[A-Z][a-z].*/.test(s) || Lt(s);
2464
2464
  }
2465
- function vi(s) {
2466
- return he(s) || /``|"|'/.test(s.substring(0, 2));
2465
+ function bi(s) {
2466
+ return ue(s) || /``|"|'/.test(s.substring(0, 2));
2467
2467
  }
2468
- function Ai(s) {
2469
- return ~bi.indexOf(s.replace(/\W+/g, ""));
2468
+ function vi(s) {
2469
+ return ~gi.indexOf(s.replace(/\W+/g, ""));
2470
2470
  }
2471
- function wi(s, t) {
2471
+ function Ai(s, t) {
2472
2472
  if (s === "a.m." || s === "p.m.") {
2473
2473
  var e = t.replace(/\W+/g, "").slice(-3).toLowerCase();
2474
2474
  if (e === "day")
@@ -2481,18 +2481,18 @@ function ie(s) {
2481
2481
  return t && t[0].length > 0;
2482
2482
  }
2483
2483
  function se(s) {
2484
- return s.length <= 3 ? !0 : he(s);
2484
+ return s.length <= 3 ? !0 : ue(s);
2485
2485
  }
2486
- function Nt(s, t) {
2486
+ function Lt(s, t) {
2487
2487
  return t && (s = s.slice(t - 1, t + 2)), !isNaN(Number(s));
2488
2488
  }
2489
2489
  function yi(s) {
2490
2490
  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
2491
  }
2492
- function Si(s) {
2492
+ function wi(s) {
2493
2493
  return s.match(/[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/);
2494
2494
  }
2495
- function Ei(s) {
2495
+ function Si(s) {
2496
2496
  var t = 0;
2497
2497
  if ((t = s.indexOf(".")) > -1 || (t = s.indexOf("!")) > -1 || (t = s.indexOf("?")) > -1) {
2498
2498
  var e = s.charAt(t + 1);
@@ -2501,10 +2501,10 @@ function Ei(s) {
2501
2501
  }
2502
2502
  return !1;
2503
2503
  }
2504
- function Ti(s) {
2504
+ function Ei(s) {
2505
2505
  return s === "." || s === "!" || s === "?";
2506
2506
  }
2507
- function xi(s, t) {
2507
+ function Ti(s, t) {
2508
2508
  t = Object.assign(t || {}, {
2509
2509
  newlineBoundary: t && t.newlineBoundary || !0
2510
2510
  });
@@ -2513,31 +2513,31 @@ function xi(s, t) {
2513
2513
  // Split into words
2514
2514
  s.re(e, { split: !0 }),
2515
2515
  // Merge words as sentences
2516
- s.splitAndMerge(function(i, n, r, a, o, h) {
2517
- var f, m = [i, null], u = i, g = h.slice(o + 1).find(function(R) {
2516
+ s.splitAndMerge(function(i, n, r, a, o, u) {
2517
+ var m, f = [i, null], h = i, g = u.slice(o + 1).find(function(R) {
2518
2518
  return !e.test(R.value);
2519
2519
  });
2520
2520
  if (i === `
2521
- ` && t.newlineBoundary || Ti(i) || wt.endsWithChar(i, "?!"))
2522
- return m;
2523
- if (wt.endsWithChar(i, ".")) {
2521
+ ` && t.newlineBoundary || Ei(i) || yt.endsWithChar(i, "?!"))
2522
+ return f;
2523
+ if (yt.endsWithChar(i, ".")) {
2524
2524
  if (g) {
2525
- if (i.length === 2 && isNaN(i.charAt(0)) && i.match(/[a-zA-Z]/) || Ai(i))
2526
- return u;
2527
- if (vi(g.value)) {
2528
- if (wi(i, g.value) || Nt(g.value) && se(i))
2529
- return u;
2530
- } else if (wt.endsWith(i, "..") || ie(i) || se(i))
2531
- return u;
2525
+ if (i.length === 2 && isNaN(i.charAt(0)) && i.match(/[a-zA-Z]/) || vi(i))
2526
+ return h;
2527
+ if (bi(g.value)) {
2528
+ if (Ai(i, g.value) || Lt(g.value) && se(i))
2529
+ return h;
2530
+ } else if (yt.endsWith(i, "..") || ie(i) || se(i))
2531
+ return h;
2532
2532
  }
2533
- return m;
2533
+ return f;
2534
2534
  }
2535
2535
  let A;
2536
- return (A = i.indexOf(".")) > -1 && (Nt(i, A) || ie(i) || Si(i) || yi(i)) ? u : (f = Ei(i)) ? [
2537
- f[0] + f[1],
2536
+ return (A = i.indexOf(".")) > -1 && (Lt(i, A) || ie(i) || wi(i) || yi(i)) ? h : (m = Si(i)) ? [
2537
+ m[0] + m[1],
2538
2538
  null,
2539
- f[2]
2540
- ] : u;
2539
+ m[2]
2540
+ ] : h;
2541
2541
  }),
2542
2542
  // Filter empty sentences
2543
2543
  s.filter(function(i) {
@@ -2545,13 +2545,13 @@ function xi(s, t) {
2545
2545
  })
2546
2546
  );
2547
2547
  }
2548
- const Ii = (s, ...t) => (...e) => s(...t, ...e);
2549
- function Ni(s) {
2548
+ const xi = (s, ...t) => (...e) => s(...t, ...e);
2549
+ function Ii(s) {
2550
2550
  return {
2551
- sentences: Ii(xi, s)
2551
+ sentences: xi(Ti, s)
2552
2552
  };
2553
2553
  }
2554
- function Li(s, t) {
2554
+ function Ni(s, t) {
2555
2555
  return t ? s.reduce(function(e, i) {
2556
2556
  var n = [
2557
2557
  i.index,
@@ -2561,11 +2561,11 @@ function Li(s, t) {
2561
2561
  return [e, n].join(":");
2562
2562
  }, t) : null;
2563
2563
  }
2564
- function Oi(s) {
2564
+ function Li(s) {
2565
2565
  const { index: t, offset: e, value: i, ...n } = s;
2566
2566
  return n;
2567
2567
  }
2568
- function zi(s, t) {
2568
+ function Oi(s, t) {
2569
2569
  var e = 0;
2570
2570
  return Array.isArray(t) || (t = [t]), t.map(function(i) {
2571
2571
  return i === null ? null : (typeof i == "string" && (i = {
@@ -2575,16 +2575,16 @@ function zi(s, t) {
2575
2575
  }), 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
2576
  });
2577
2577
  }
2578
- function Ci(s, t) {
2578
+ function zi(s, t) {
2579
2579
  if (s.length == 0) return null;
2580
2580
  var e = "", i = 0, n = s[0]?.index;
2581
2581
  return s.forEach(function(r, a) {
2582
2582
  var o = s[a - 1];
2583
2583
  s[a + 1];
2584
- var h = o ? r.index + 1 - (o.index + o.offset) : 0;
2585
- e = e + new Array(h).join(t) + r.value;
2586
- var f = r.index - n + r.offset;
2587
- f > i && (i = f);
2584
+ var u = o ? r.index + 1 - (o.index + o.offset) : 0;
2585
+ e = e + new Array(u).join(t) + r.value;
2586
+ var m = r.index - n + r.offset;
2587
+ m > i && (i = m);
2588
2588
  }), {
2589
2589
  // Index equal is the one from the first token
2590
2590
  index: n,
@@ -2593,13 +2593,13 @@ function Ci(s, t) {
2593
2593
  };
2594
2594
  }
2595
2595
  const Q = {
2596
- tokensId: Li,
2597
- normalize: zi,
2598
- properties: Oi,
2599
- merge: Ci
2596
+ tokensId: Ni,
2597
+ normalize: Oi,
2598
+ properties: Li,
2599
+ merge: zi
2600
2600
  };
2601
- var Ri = ' \r\n  !"#$%&()*+,-.\\/:;<=>?@[\\]^_`{|}~', Pi = new RegExp(
2602
- "([^" + Ri + "]+)"
2601
+ var Ci = ' \r\n  !"#$%&()*+,-.\\/:;<=>?@[\\]^_`{|}~', Ri = new RegExp(
2602
+ "([^" + Ci + "]+)"
2603
2603
  );
2604
2604
  function z(s) {
2605
2605
  if (!(this instanceof z)) return new z(s);
@@ -2615,56 +2615,56 @@ z.prototype.split = function(t, e = {}) {
2615
2615
  var i = this;
2616
2616
  return e = Object.assign({ preserveProperties: !0, cache: () => null }, e), function(n, r) {
2617
2617
  if (arguments.length === 6) return t.apply(null, arguments);
2618
- var a, o, h;
2618
+ var a, o, u;
2619
2619
  if (n === void 0) return [];
2620
2620
  if (typeof n == "string" ? n = [{
2621
2621
  value: n,
2622
2622
  index: 0,
2623
2623
  offset: n.length
2624
- }] : Array.isArray(n) || (n = [n]), o = Q.tokensId(n, e.cache()), o && (h = i.opts.cacheGet(o), h))
2625
- return h;
2626
- var f = n.map(function(m, u) {
2627
- var g = n[u + 1], A = t(
2628
- m.value,
2629
- Object.assign({}, m),
2624
+ }] : Array.isArray(n) || (n = [n]), o = Q.tokensId(n, e.cache()), o && (u = i.opts.cacheGet(o), u))
2625
+ return u;
2626
+ var m = n.map(function(f, h) {
2627
+ var g = n[h + 1], A = t(
2628
+ f.value,
2629
+ Object.assign({}, f),
2630
2630
  a ? Object.assign({}, a) : null,
2631
2631
  g ? Object.assign({}, g) : null,
2632
- u,
2632
+ h,
2633
2633
  n
2634
2634
  ) || [];
2635
- if (A = Q.normalize(m, A), e.preserveProperties) {
2636
- var R = Q.properties(m);
2635
+ if (A = Q.normalize(f, A), e.preserveProperties) {
2636
+ var R = Q.properties(f);
2637
2637
  A = A.map(function(d) {
2638
2638
  return Object.assign({}, d, R);
2639
2639
  });
2640
2640
  }
2641
- return a = m, A;
2641
+ return a = f, A;
2642
2642
  }).filter(Boolean).flat();
2643
- return o && i.opts.cacheSet(o, f), f;
2643
+ return o && i.opts.cacheSet(o, m), m;
2644
2644
  };
2645
2645
  };
2646
2646
  z.prototype.re = function(t, e = {}) {
2647
2647
  return e = Object.assign({ split: !1 }, e), this.split(function(i, n) {
2648
- for (var r = i, a = [], o, h = 0; o = t.exec(i); ) {
2649
- var f = o.index, m = h + f, u = o[0] || "", g = u.length;
2650
- if (e.split && h < m) {
2651
- var A = r.slice(h, m);
2648
+ for (var r = i, a = [], o, u = 0; o = t.exec(i); ) {
2649
+ var m = o.index, f = u + m, h = o[0] || "", g = h.length;
2650
+ if (e.split && u < f) {
2651
+ var A = r.slice(u, f);
2652
2652
  a.push({
2653
2653
  value: A,
2654
- index: h,
2654
+ index: u,
2655
2655
  offset: A.length
2656
2656
  });
2657
2657
  }
2658
2658
  a.push({
2659
- value: u,
2660
- index: m,
2659
+ value: h,
2660
+ index: f,
2661
2661
  offset: g,
2662
2662
  match: o
2663
- }), i = i.slice(f + g), h = m + g;
2663
+ }), i = i.slice(m + g), u = f + g;
2664
2664
  }
2665
2665
  return e.split && i && a.push({
2666
2666
  value: i,
2667
- index: h,
2667
+ index: u,
2668
2668
  offset: i.length
2669
2669
  }), a;
2670
2670
  }, {
@@ -2679,14 +2679,14 @@ z.prototype.splitAndMerge = function(t, e = {}) {
2679
2679
  var r = [], a = [];
2680
2680
  function o() {
2681
2681
  if (a.length != 0) {
2682
- var h = Q.merge(a, e.mergeWith);
2683
- r.push(h), a = [];
2682
+ var u = Q.merge(a, e.mergeWith);
2683
+ r.push(u), a = [];
2684
2684
  }
2685
2685
  }
2686
- return i.split(function(h, f) {
2687
- var m = t.apply(null, arguments);
2688
- m = Q.normalize(f, m), m.forEach(function(u) {
2689
- u === null ? o() : a.push(u);
2686
+ return i.split(function(u, m) {
2687
+ var f = t.apply(null, arguments);
2688
+ f = Q.normalize(m, f), f.forEach(function(h) {
2689
+ h === null ? o() : a.push(h);
2690
2690
  });
2691
2691
  })(n), o(), r;
2692
2692
  };
@@ -2740,14 +2740,14 @@ z.prototype.sections = function() {
2740
2740
  return this.re(/([^\n\.,;!?]+)/i, { split: !1 });
2741
2741
  };
2742
2742
  z.prototype.words = function() {
2743
- return this.re(Pi);
2743
+ return this.re(Ri);
2744
2744
  };
2745
2745
  z.prototype.characters = function() {
2746
2746
  return this.re(/[^\s]/);
2747
2747
  };
2748
- var ki = /* @__PURE__ */ ((s) => (s.Word = "word", s.Sentence = "sentence", s.Paragraph = "paragraph", s))(ki || {});
2749
- const Di = (s, t) => "Segmenter" in Intl ? new Ui(s, t) : new Mi(s, t);
2750
- class Ui {
2748
+ var Pi = /* @__PURE__ */ ((s) => (s.Word = "word", s.Sentence = "sentence", s.Paragraph = "paragraph", s))(Pi || {});
2749
+ const ki = (s, t) => "Segmenter" in Intl ? new Di(s, t) : new Ui(s, t);
2750
+ class Di {
2751
2751
  constructor(t, e) {
2752
2752
  if (this.unit = e, t = t ?? navigator?.language, !("Segmenter" in Intl)) throw new Error("Intl.Segmenter is not supported in this environment");
2753
2753
  if (e === "paragraph") throw new Error("IntlTextTokenizer does not handle TextUnit.Paragraph");
@@ -2759,13 +2759,13 @@ class Ui {
2759
2759
  const e = this.segmenter.segment(t), i = [];
2760
2760
  for (let n of e) {
2761
2761
  if (this.unit === "word" && n.isWordLike === !1) continue;
2762
- const r = de(n.segment);
2762
+ const r = he(n.segment);
2763
2763
  r !== null && i.push([n.index, n.index + r.length]);
2764
2764
  }
2765
2765
  return i;
2766
2766
  }
2767
2767
  }
2768
- class Mi {
2768
+ class Ui {
2769
2769
  constructor(t, e) {
2770
2770
  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
2771
  this.tokenizer = new z();
@@ -2777,7 +2777,7 @@ class Mi {
2777
2777
  e = this.tokenizer.words()(t);
2778
2778
  break;
2779
2779
  case "sentence":
2780
- this.isEnglish ? e = Ni(this.tokenizer).sentences()(t) : e = this.tokenizer.sections()(t);
2780
+ this.isEnglish ? e = Ii(this.tokenizer).sentences()(t) : e = this.tokenizer.sections()(t);
2781
2781
  break;
2782
2782
  default:
2783
2783
  e = [];
@@ -2786,18 +2786,18 @@ class Mi {
2786
2786
  const i = [];
2787
2787
  return e.forEach((n) => {
2788
2788
  if (n.value.length === 0) return;
2789
- const r = de(n.value);
2789
+ const r = he(n.value);
2790
2790
  r !== null && i.push([n.index, n.index + r.length]);
2791
2791
  }), i;
2792
2792
  }
2793
2793
  }
2794
- const Bi = new RegExp("[\\p{L}\\p{N}]+", "u"), de = (s) => {
2794
+ const Mi = new RegExp("[\\p{L}\\p{N}]+", "u"), he = (s) => {
2795
2795
  const t = s.trimEnd();
2796
- return t.length === 0 || t.match(Bi) === null ? null : t;
2796
+ return t.length === 0 || t.match(Mi) === null ? null : t;
2797
2797
  };
2798
2798
  class Y {
2799
2799
  constructor(t) {
2800
- this.fetcher = new je(), 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;
2800
+ this.fetcher = new Qe(), 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
2801
  }
2802
2802
  /** The URL where this publication is served, computed from the `Link` with `self` relation.
2803
2803
  * e.g. https://provider.com/pub1293/manifest.json gives https://provider.com/pub1293/
@@ -2857,7 +2857,7 @@ class Y {
2857
2857
  const r = await this.get(new U({
2858
2858
  href: n
2859
2859
  })).readAsJSON();
2860
- return $t.deserialize(r);
2860
+ return qt.deserialize(r);
2861
2861
  }
2862
2862
  /**
2863
2863
  * Returns the resource targeted by the given non-templated [link].
@@ -2916,7 +2916,7 @@ class mt {
2916
2916
  return this.charOffset !== void 0 && (t.charOffset = this.charOffset), t;
2917
2917
  }
2918
2918
  }
2919
- class qt {
2919
+ class Xt {
2920
2920
  /**
2921
2921
  * Creates a [DomRange].
2922
2922
  */
@@ -2930,7 +2930,7 @@ class qt {
2930
2930
  if (!t) return;
2931
2931
  let e = mt.deserialize(t.start);
2932
2932
  if (e)
2933
- return new qt({
2933
+ return new Xt({
2934
2934
  start: e,
2935
2935
  end: mt.deserialize(t.end)
2936
2936
  });
@@ -2950,7 +2950,7 @@ T.prototype.getPartialCfi = function() {
2950
2950
  return this.otherLocations?.get("partialCfi");
2951
2951
  };
2952
2952
  T.prototype.getDomRange = function() {
2953
- return qt.deserialize(this.otherLocations?.get("domRange"));
2953
+ return Xt.deserialize(this.otherLocations?.get("domRange"));
2954
2954
  };
2955
2955
  T.prototype.fragmentParameters = function() {
2956
2956
  return new Map(
@@ -2984,7 +2984,7 @@ T.prototype.space = function() {
2984
2984
  if (t.length === 4 && !t.some(isNaN))
2985
2985
  return t;
2986
2986
  };
2987
- class Xt {
2987
+ class Kt {
2988
2988
  /** Creates a [Price]. */
2989
2989
  constructor(t) {
2990
2990
  this.currency = t.currency, this.value = t.value;
@@ -2999,7 +2999,7 @@ class Xt {
2999
2999
  return;
3000
3000
  let i = L(t.value);
3001
3001
  if (i !== void 0)
3002
- return new Xt({ currency: e, value: i });
3002
+ return new Kt({ currency: e, value: i });
3003
3003
  }
3004
3004
  /**
3005
3005
  * Serializes a [Price] to its RWPM JSON representation.
@@ -3035,7 +3035,7 @@ class j {
3035
3035
  return this.children && (t.children = this.children.map((e) => e.serialize())), t;
3036
3036
  }
3037
3037
  }
3038
- class Kt {
3038
+ class Zt {
3039
3039
  /** Creates a [Price]. */
3040
3040
  constructor(t) {
3041
3041
  this.total = t.total, this.position = t.position;
@@ -3045,7 +3045,7 @@ class Kt {
3045
3045
  */
3046
3046
  static deserialize(t) {
3047
3047
  if (t)
3048
- return new Kt({
3048
+ return new Zt({
3049
3049
  total: L(t.total),
3050
3050
  position: L(t.position)
3051
3051
  });
@@ -3058,7 +3058,7 @@ class Kt {
3058
3058
  return this.total !== void 0 && (t.total = this.total), this.position !== void 0 && (t.position = this.position), t;
3059
3059
  }
3060
3060
  }
3061
- class Zt {
3061
+ class _t {
3062
3062
  /** Creates a [Copies]. */
3063
3063
  constructor(t) {
3064
3064
  this.total = t.total, this.available = t.available;
@@ -3068,7 +3068,7 @@ class Zt {
3068
3068
  */
3069
3069
  static deserialize(t) {
3070
3070
  if (t)
3071
- return new Zt({
3071
+ return new _t({
3072
3072
  total: L(t.total),
3073
3073
  available: L(t.available)
3074
3074
  });
@@ -3081,7 +3081,7 @@ class Zt {
3081
3081
  return this.total !== void 0 && (t.total = this.total), this.available !== void 0 && (t.available = this.available), t;
3082
3082
  }
3083
3083
  }
3084
- var Wi = /* @__PURE__ */ ((s) => (s.available = "available", s.reserved = "reserved", s.ready = "ready", s))(Wi || {});
3084
+ var Bi = /* @__PURE__ */ ((s) => (s.available = "available", s.reserved = "reserved", s.ready = "ready", s))(Bi || {});
3085
3085
  class Jt {
3086
3086
  /** Creates a [Availability]. */
3087
3087
  constructor(t) {
@@ -3110,7 +3110,7 @@ D.prototype.getNumberOfItems = function() {
3110
3110
  return L(this.otherProperties.numberOfItems);
3111
3111
  };
3112
3112
  D.prototype.getPrice = function() {
3113
- return Xt.deserialize(this.otherProperties.price);
3113
+ return Kt.deserialize(this.otherProperties.price);
3114
3114
  };
3115
3115
  D.prototype.getIndirectAcquisitions = function() {
3116
3116
  const s = this.otherProperties.indirectAcquisition;
@@ -3118,10 +3118,10 @@ D.prototype.getIndirectAcquisitions = function() {
3118
3118
  return s.map((t) => j.deserialize(t)).filter((t) => t !== void 0);
3119
3119
  };
3120
3120
  D.prototype.getHolds = function() {
3121
- return Kt.deserialize(this.otherProperties.holds);
3121
+ return Zt.deserialize(this.otherProperties.holds);
3122
3122
  };
3123
3123
  D.prototype.getCopies = function() {
3124
- return Zt.deserialize(this.otherProperties.copies);
3124
+ return _t.deserialize(this.otherProperties.copies);
3125
3125
  };
3126
3126
  D.prototype.getAvailability = function() {
3127
3127
  return Jt.deserialize(this.otherProperties.availability);
@@ -3132,7 +3132,7 @@ D.prototype.getAuthenticate = function() {
3132
3132
  Y.prototype.getImages = function() {
3133
3133
  return this.linksWithRole("images");
3134
3134
  };
3135
- class on {
3135
+ class ln {
3136
3136
  /**
3137
3137
  * Extracts the full raw text, or returns null if no text content can be found.
3138
3138
  * @param separator Separator to use between individual elements. Defaults to newline.
@@ -3156,8 +3156,8 @@ class ne {
3156
3156
  this.key = t, this.value = e;
3157
3157
  }
3158
3158
  }
3159
- var Lt = /* @__PURE__ */ ((s) => (s.ACCESSIBILITY_LABEL = "accessibilityLabel", s.LANGUAGE = "language", s))(Lt || {});
3160
- class pe {
3159
+ var Ot = /* @__PURE__ */ ((s) => (s.ACCESSIBILITY_LABEL = "accessibilityLabel", s.LANGUAGE = "language", s))(Ot || {});
3160
+ class de {
3161
3161
  constructor(t = []) {
3162
3162
  this._attributes = t;
3163
3163
  }
@@ -3186,12 +3186,12 @@ class pe {
3186
3186
  return this._attributes.filter((e) => e.key === t).map((e) => e.value);
3187
3187
  }
3188
3188
  }
3189
- class fe extends pe {
3189
+ class pe extends de {
3190
3190
  constructor(t, e = []) {
3191
3191
  super(e), this.locator = t;
3192
3192
  }
3193
3193
  }
3194
- class At extends fe {
3194
+ class At extends pe {
3195
3195
  /**
3196
3196
  * Human-readable text representation for this element.
3197
3197
  */
@@ -3204,12 +3204,12 @@ class Gi extends At {
3204
3204
  super(t, i), this.embeddedLink = e;
3205
3205
  }
3206
3206
  }
3207
- class Hi extends At {
3207
+ class Wi extends At {
3208
3208
  constructor(t, e, i = []) {
3209
3209
  super(t, i), this.embeddedLink = e;
3210
3210
  }
3211
3211
  }
3212
- class Fi extends At {
3212
+ class Hi extends At {
3213
3213
  constructor(t, e, i, n = []) {
3214
3214
  super(t, n), this.embeddedLink = e, this.caption = i;
3215
3215
  }
@@ -3217,12 +3217,12 @@ class Fi extends At {
3217
3217
  return (this.caption?.length || 0) > 0 ? this.caption : super.text;
3218
3218
  }
3219
3219
  }
3220
- class me extends pe {
3220
+ class fe extends de {
3221
3221
  constructor(t, e, i = []) {
3222
3222
  super(i), this.locator = t, this.text = e;
3223
3223
  }
3224
3224
  }
3225
- class Ot extends At {
3225
+ class zt extends At {
3226
3226
  constructor(t, e, i, n = []) {
3227
3227
  super(t, n), this.role = e, this.segments = i;
3228
3228
  }
@@ -3230,7 +3230,7 @@ class Ot extends At {
3230
3230
  return this.segments.map((t) => t.text).join("");
3231
3231
  }
3232
3232
  }
3233
- class Vi {
3233
+ class Fi {
3234
3234
  constructor(t) {
3235
3235
  this.level = t;
3236
3236
  }
@@ -3238,17 +3238,17 @@ class Vi {
3238
3238
  return `heading-${this.level}`;
3239
3239
  }
3240
3240
  }
3241
- const Yi = {
3241
+ const Vi = {
3242
3242
  role: "body"
3243
- }, $i = {
3243
+ }, Yi = {
3244
3244
  role: "footnote"
3245
3245
  };
3246
- class qi {
3246
+ class $i {
3247
3247
  constructor(t, e) {
3248
3248
  this.referenceUrl = t, this.referenceTitle = e, this.role = "quote";
3249
3249
  }
3250
3250
  }
3251
- class cn {
3251
+ class un {
3252
3252
  /**
3253
3253
  *
3254
3254
  * @param defaultLanguage The default assumed language
@@ -3256,12 +3256,12 @@ class cn {
3256
3256
  * @param contextSnippetLength Length of `before` and `after` snippets in the produced [Locator]s.
3257
3257
  * @param textTokenizerFactory Factory to create a [TextTokenizer] from, using the specified language and unit.
3258
3258
  */
3259
- constructor(t, e, i = 50, n = (r) => Di(r, e)) {
3259
+ constructor(t, e, i = 50, n = (r) => ki(r, e)) {
3260
3260
  this.defaultLanguage = t, this.contextSnippetLength = i, this.textTokenizerFactory = n;
3261
3261
  }
3262
3262
  tokenize(t) {
3263
- return t instanceof Ot ? [
3264
- new Ot(
3263
+ return t instanceof zt ? [
3264
+ new zt(
3265
3265
  t.locator,
3266
3266
  t.role,
3267
3267
  t.segments.map((e) => this.tokenizeSegment(e)).flat()
@@ -3269,7 +3269,7 @@ class cn {
3269
3269
  ] : [t];
3270
3270
  }
3271
3271
  tokenizeSegment(t) {
3272
- return this.textTokenizerFactory(t.language ?? this.defaultLanguage).tokenize(t.text).map((e) => new me(
3272
+ return this.textTokenizerFactory(t.language ?? this.defaultLanguage).tokenize(t.text).map((e) => new fe(
3273
3273
  new k({
3274
3274
  href: t.locator.href,
3275
3275
  type: t.locator.type,
@@ -3295,7 +3295,7 @@ class et extends Error {
3295
3295
  super(t);
3296
3296
  }
3297
3297
  }
3298
- class _t {
3298
+ class Qt {
3299
3299
  /**
3300
3300
  * Advances to the next item and returns it, or null if we reached the end.
3301
3301
  */
@@ -3309,12 +3309,12 @@ class _t {
3309
3309
  return await this.hasPrevious() ? this.previous() : null;
3310
3310
  }
3311
3311
  }
3312
- let Xi = class {
3312
+ let qi = class {
3313
3313
  constructor(t, e) {
3314
3314
  this.element = t, this.direction = e;
3315
3315
  }
3316
3316
  };
3317
- class un extends _t {
3317
+ class dn extends Qt {
3318
3318
  constructor(t, e, i) {
3319
3319
  super(), this.publication = t, this.startLocator = e, this.resourceContentIteratorFactories = i, this._currentIterator = null, this.currentElement = null;
3320
3320
  }
@@ -3346,7 +3346,7 @@ class un extends _t {
3346
3346
  const n = this.nextIteratorIn(t, e.index);
3347
3347
  return n ? (this._currentIterator = n, this.nextIn(t)) : null;
3348
3348
  }
3349
- return new Xi(i, t);
3349
+ return new qi(i, t);
3350
3350
  }
3351
3351
  /**
3352
3352
  * Returns the [Iterator] for the current [Resource] in the reading order.
@@ -3385,7 +3385,7 @@ class un extends _t {
3385
3385
  return null;
3386
3386
  }
3387
3387
  }
3388
- class yt extends fe {
3388
+ class wt extends pe {
3389
3389
  constructor(t, e, i = []) {
3390
3390
  super(t, i), this.element = e;
3391
3391
  }
@@ -3398,13 +3398,13 @@ class re {
3398
3398
  this.element = t, this.direction = e;
3399
3399
  }
3400
3400
  }
3401
- class hn extends _t {
3401
+ class pn extends Qt {
3402
3402
  constructor(t, e) {
3403
3403
  super(), this.pageContent = t, this.startLocator = e, this.pageContentFiltered = [], this.currentElement = null, this.currentProgression = 0, this.currentElementIndex = 0;
3404
3404
  const i = this.pageContent.filter(
3405
3405
  (n) => n?.str !== " " && n?.str !== ""
3406
3406
  );
3407
- if (this.pageContentFiltered = i.map((n) => new yt(n.locator, {
3407
+ if (this.pageContentFiltered = i.map((n) => new wt(n.locator, {
3408
3408
  index: i.indexOf(n),
3409
3409
  text: n.str,
3410
3410
  readingDirection: n.dir
@@ -3436,7 +3436,7 @@ class hn extends _t {
3436
3436
  const t = this.currentElementIndex - 1;
3437
3437
  this.currentProgression = t / this.pageContentFiltered.length * 100, this.currentElementIndex = t;
3438
3438
  }
3439
- return this.currentElement ? this.currentElement.element : new yt(new k({ href: "", type: "" }), { index: -1, text: "" });
3439
+ return this.currentElement ? this.currentElement.element : new wt(new k({ href: "", type: "" }), { index: -1, text: "" });
3440
3440
  }
3441
3441
  async hasNext() {
3442
3442
  return this.currentElement?.direction, this.nextIn(
@@ -3454,7 +3454,7 @@ class hn extends _t {
3454
3454
  const e = t + 1;
3455
3455
  this.currentProgression = e / this.pageContentFiltered.length * 100, this.currentElementIndex = e;
3456
3456
  }
3457
- return this.currentElement ? this.currentElement.element : new yt(new k({ href: "", type: "" }), { index: -1, text: "" });
3457
+ return this.currentElement ? this.currentElement.element : new wt(new k({ href: "", type: "" }), { index: -1, text: "" });
3458
3458
  }
3459
3459
  nextIn(t) {
3460
3460
  const e = this.currentElementIndex;
@@ -3470,7 +3470,7 @@ class hn extends _t {
3470
3470
  return this.currentProgression === 0 ? 0 : this.currentProgression < 0 || this.currentProgression >= 100 ? null : Math.floor(this.currentProgression * this.pageContentFiltered.length / 100);
3471
3471
  }
3472
3472
  }
3473
- const Ki = [
3473
+ const Xi = [
3474
3474
  "OBJECT",
3475
3475
  "BASE",
3476
3476
  "FONT",
@@ -3539,7 +3539,7 @@ const Ki = [
3539
3539
  "RB"
3540
3540
  ];
3541
3541
  function ae(s) {
3542
- return Ki.includes(s.nodeName.toUpperCase());
3542
+ return Xi.includes(s.nodeName.toUpperCase());
3543
3543
  }
3544
3544
  function St(s, t) {
3545
3545
  const e = s.getAttribute("src");
@@ -3550,15 +3550,15 @@ function St(s, t) {
3550
3550
  return e;
3551
3551
  }
3552
3552
  }
3553
- const it = "[\\s\\u0085\\u00A0\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000]", Zi = new RegExp(`^${it}+$`, "g"), Ji = new RegExp(`^${it}+|${it}+$/g`, "g"), ge = new RegExp(`^${it}+`, "g"), be = new RegExp(`${it}+$`, "g"), ot = (s) => (
3553
+ const it = "[\\s\\u0085\\u00A0\\u2000-\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000]", Ki = new RegExp(`^${it}+$`, "g"), Zi = new RegExp(`^${it}+|${it}+$/g`, "g"), me = new RegExp(`^${it}+`, "g"), ge = new RegExp(`${it}+$`, "g"), ot = (s) => (
3554
3554
  // 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 ? Zi.test(s) : !0
3556
- ), ve = (s) => s.replace(Ji, ""), _i = (s) => s.replace(ge, ""), Qi = (s) => s.replace(be, ""), oe = (s, t = "") => new nt({
3557
- before: t + (ge.exec(s)?.[0] ?? ""),
3558
- highlight: ve(s),
3559
- after: be.exec(s)?.[0] ?? ""
3555
+ s?.length ? Ki.test(s) : !0
3556
+ ), be = (s) => s.replace(Zi, ""), _i = (s) => s.replace(me, ""), Ji = (s) => s.replace(ge, ""), oe = (s, t = "") => new nt({
3557
+ before: t + (me.exec(s)?.[0] ?? ""),
3558
+ highlight: be(s),
3559
+ after: ge.exec(s)?.[0] ?? ""
3560
3560
  });
3561
- function ji(s) {
3561
+ function Qi(s) {
3562
3562
  for (; s; ) {
3563
3563
  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
3564
  if (t) return t;
@@ -3566,7 +3566,7 @@ function ji(s) {
3566
3566
  }
3567
3567
  return null;
3568
3568
  }
3569
- function ts(s, t) {
3569
+ function ji(s, t) {
3570
3570
  const e = s.length > 0 && s[s.length - 1] === " ";
3571
3571
  let i = !1, n = !1;
3572
3572
  for (let r = 0; r < t.length; r++)
@@ -3580,7 +3580,7 @@ function ts(s, t) {
3580
3580
  }
3581
3581
  return s;
3582
3582
  }
3583
- function Qt(s) {
3583
+ function ve(s) {
3584
3584
  return typeof s == "object" && s !== null && s.nodeType === Node.ELEMENT_NODE;
3585
3585
  }
3586
3586
  const gt = {
@@ -3595,14 +3595,14 @@ const gt = {
3595
3595
  nthchild: "nthchild",
3596
3596
  nthoftype: "nthoftype"
3597
3597
  };
3598
- function es(s, t) {
3598
+ function ts(s, t) {
3599
3599
  return Object.values(s).includes(t);
3600
3600
  }
3601
- const is = "CssSelectorGenerator";
3601
+ const es = "CssSelectorGenerator";
3602
3602
  function bt(s = "unknown problem", ...t) {
3603
- console.warn(`${is}: ${s}`, ...t);
3603
+ console.warn(`${es}: ${s}`, ...t);
3604
3604
  }
3605
- const ss = {
3605
+ const is = {
3606
3606
  selectors: [
3607
3607
  E.id,
3608
3608
  E.class,
@@ -3617,21 +3617,22 @@ const ss = {
3617
3617
  combineBetweenSelectors: !0,
3618
3618
  root: null,
3619
3619
  maxCombinations: Number.POSITIVE_INFINITY,
3620
- maxCandidates: Number.POSITIVE_INFINITY
3620
+ maxCandidates: Number.POSITIVE_INFINITY,
3621
+ useScope: !1
3621
3622
  };
3622
- function ns(s) {
3623
- return Array.isArray(s) ? s.filter((t) => es(E, t)) : [];
3623
+ function ss(s) {
3624
+ return Array.isArray(s) ? s.filter((t) => ts(E, t)) : [];
3624
3625
  }
3625
3626
  function Ae(s) {
3626
3627
  return s instanceof RegExp;
3627
3628
  }
3628
- function rs(s) {
3629
+ function ns(s) {
3629
3630
  return ["string", "function"].includes(typeof s) || Ae(s);
3630
3631
  }
3631
3632
  function ce(s) {
3632
- return Array.isArray(s) ? s.filter(rs) : [];
3633
+ return Array.isArray(s) ? s.filter(ns) : [];
3633
3634
  }
3634
- function as(s) {
3635
+ function rs(s) {
3635
3636
  return s instanceof Node;
3636
3637
  }
3637
3638
  function le(s) {
@@ -3641,42 +3642,44 @@ function le(s) {
3641
3642
  // this includes Shadow DOM root
3642
3643
  Node.ELEMENT_NODE
3643
3644
  ];
3644
- return as(s) && t.includes(s.nodeType);
3645
+ return rs(s) && t.includes(s.nodeType);
3645
3646
  }
3646
- function we(s, t) {
3647
+ function ye(s, t) {
3647
3648
  if (le(s))
3648
3649
  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;
3649
3650
  const e = t.getRootNode({ composed: !1 });
3650
3651
  return le(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);
3651
3652
  }
3652
- function ue(s) {
3653
+ function Et(s) {
3653
3654
  return typeof s == "number" ? s : Number.POSITIVE_INFINITY;
3654
3655
  }
3655
- function os(s, t = {}) {
3656
- const e = Object.assign(Object.assign({}, ss), t);
3656
+ function as(s, t = {}) {
3657
+ const e = Object.assign(Object.assign({}, is), t);
3657
3658
  return {
3658
- selectors: ns(e.selectors),
3659
+ selectors: ss(e.selectors),
3659
3660
  whitelist: ce(e.whitelist),
3660
3661
  blacklist: ce(e.blacklist),
3661
- root: we(e.root, s),
3662
+ root: ye(e.root, s),
3662
3663
  combineWithinSelector: !!e.combineWithinSelector,
3663
3664
  combineBetweenSelectors: !!e.combineBetweenSelectors,
3664
3665
  includeTag: !!e.includeTag,
3665
- maxCombinations: ue(e.maxCombinations),
3666
- maxCandidates: ue(e.maxCandidates)
3666
+ maxCombinations: Et(e.maxCombinations),
3667
+ maxCandidates: Et(e.maxCandidates),
3668
+ useScope: !!e.useScope,
3669
+ maxResults: Et(e.maxResults)
3667
3670
  };
3668
3671
  }
3669
3672
  function rt(s = []) {
3670
3673
  const [t = [], ...e] = s;
3671
3674
  return e.length === 0 ? t : e.reduce((i, n) => i.filter((r) => n.includes(r)), t);
3672
3675
  }
3673
- function ye(s) {
3676
+ function os(s) {
3674
3677
  return [].concat(...s);
3675
3678
  }
3676
3679
  function cs(s) {
3677
3680
  return s.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".+");
3678
3681
  }
3679
- function zt(s) {
3682
+ function Ct(s) {
3680
3683
  const t = s.map((e) => {
3681
3684
  if (Ae(e))
3682
3685
  return (i) => e.test(i);
@@ -3694,24 +3697,24 @@ function zt(s) {
3694
3697
  return (e) => t.some((i) => i(e));
3695
3698
  }
3696
3699
  function jt(s, t, e) {
3697
- const i = Array.from(we(e, s[0]).querySelectorAll(t));
3700
+ const i = Array.from(ye(e, s[0]).querySelectorAll(t));
3698
3701
  return i.length === s.length && s.every((n) => i.includes(n));
3699
3702
  }
3700
- function Se(s, t) {
3703
+ function we(s, t) {
3701
3704
  t = t ?? te(s);
3702
3705
  const e = [];
3703
3706
  let i = s;
3704
- for (; Qt(i) && i !== t; )
3707
+ for (; ve(i) && i !== t; )
3705
3708
  e.push(i), i = i.parentElement;
3706
3709
  return e;
3707
3710
  }
3708
3711
  function ls(s, t) {
3709
- return rt(s.map((e) => Se(e, t)));
3712
+ return rt(s.map((e) => we(e, t)));
3710
3713
  }
3711
3714
  function te(s) {
3712
3715
  return s.ownerDocument.querySelector(":root");
3713
3716
  }
3714
- const Ee = ", ", us = new RegExp([
3717
+ const Se = ", ", us = new RegExp([
3715
3718
  "^$",
3716
3719
  // empty or not set
3717
3720
  "\\s"
@@ -3719,14 +3722,14 @@ const Ee = ", ", us = new RegExp([
3719
3722
  ].join("|")), hs = new RegExp([
3720
3723
  "^$"
3721
3724
  // empty or not set
3722
- ].join("|")), Te = [
3725
+ ].join("|")), Ee = [
3723
3726
  E.nthoftype,
3724
3727
  E.tag,
3725
3728
  E.id,
3726
3729
  E.class,
3727
3730
  E.attribute,
3728
3731
  E.nthchild
3729
- ], ds = zt([
3732
+ ], ds = Ct([
3730
3733
  "class",
3731
3734
  "id",
3732
3735
  // Angular attributes
@@ -3748,7 +3751,7 @@ function gs({ nodeName: s, nodeValue: t }) {
3748
3751
  value: st(t ?? void 0)
3749
3752
  };
3750
3753
  }
3751
- function xe(s) {
3754
+ function Te(s) {
3752
3755
  const t = Array.from(s.attributes).filter((e) => ms(e, s)).map(gs);
3753
3756
  return [
3754
3757
  ...t.map(ps),
@@ -3756,52 +3759,51 @@ function xe(s) {
3756
3759
  ];
3757
3760
  }
3758
3761
  function bs(s) {
3759
- const t = s.map(xe);
3762
+ const t = s.map(Te);
3760
3763
  return rt(t);
3761
3764
  }
3762
- function Ie(s) {
3765
+ function xe(s) {
3763
3766
  var t;
3764
3767
  return ((t = s.getAttribute("class")) !== null && t !== void 0 ? t : "").trim().split(/\s+/).filter((e) => !hs.test(e)).map((e) => `.${st(e)}`);
3765
3768
  }
3766
3769
  function vs(s) {
3767
- const t = s.map(Ie);
3770
+ const t = s.map(xe);
3768
3771
  return rt(t);
3769
3772
  }
3770
- function Ne(s) {
3773
+ function Ie(s) {
3771
3774
  var t;
3772
3775
  const e = (t = s.getAttribute("id")) !== null && t !== void 0 ? t : "", i = `#${st(e)}`, n = s.getRootNode({ composed: !1 });
3773
3776
  return !us.test(e) && jt([s], i, n) ? [i] : [];
3774
3777
  }
3775
3778
  function As(s) {
3776
- return s.length === 0 || s.length > 1 ? [] : Ne(s[0]);
3779
+ return s.length === 0 || s.length > 1 ? [] : Ie(s[0]);
3777
3780
  }
3778
- function Le(s) {
3779
- const t = s.parentNode;
3780
- if (t) {
3781
- const i = Array.from(t.childNodes).filter(Qt).indexOf(s);
3782
- if (i > -1)
3783
- return [
3784
- `:nth-child(${String(i + 1)})`
3785
- ];
3781
+ function Ne(s) {
3782
+ var t;
3783
+ const e = (t = s.parentElement) === null || t === void 0 ? void 0 : t.children;
3784
+ if (e) {
3785
+ for (let i = 0; i < e.length; i++)
3786
+ if (e[i] === s)
3787
+ return [`:nth-child(${String(i + 1)})`];
3786
3788
  }
3787
3789
  return [];
3788
3790
  }
3789
- function ws(s) {
3790
- return rt(s.map(Le));
3791
+ function ys(s) {
3792
+ return rt(s.map(Ne));
3791
3793
  }
3792
- function Oe(s) {
3794
+ function Le(s) {
3793
3795
  return [
3794
3796
  st(s.tagName.toLowerCase())
3795
3797
  ];
3796
3798
  }
3797
- function ze(s) {
3799
+ function Oe(s) {
3798
3800
  const t = [
3799
- ...new Set(ye(s.map(Oe)))
3801
+ ...new Set(os(s.map(Le)))
3800
3802
  ];
3801
3803
  return t.length === 0 || t.length > 1 ? [] : [t[0]];
3802
3804
  }
3803
- function Ce(s) {
3804
- const t = ze([s])[0], e = s.parentElement;
3805
+ function ze(s) {
3806
+ const t = Oe([s])[0], e = s.parentElement;
3805
3807
  if (e) {
3806
3808
  const n = Array.from(e.children).filter((r) => r.tagName.toLowerCase() === t).indexOf(s);
3807
3809
  if (n > -1)
@@ -3811,16 +3813,16 @@ function Ce(s) {
3811
3813
  }
3812
3814
  return [];
3813
3815
  }
3814
- function ys(s) {
3815
- return rt(s.map(Ce));
3816
+ function ws(s) {
3817
+ return rt(s.map(ze));
3816
3818
  }
3817
- function* Ss(s = [], { maxResults: t = Number.POSITIVE_INFINITY } = {}) {
3818
- let e = 0, i = Ct(1);
3819
+ function* Ce(s = [], { maxResults: t = Number.POSITIVE_INFINITY } = {}) {
3820
+ let e = 0, i = Rt(1);
3819
3821
  for (; i.length <= s.length && e < t; )
3820
3822
  e += 1, yield i.map((r) => s[r]), i = Es(i, s.length - 1);
3821
3823
  }
3822
- function Re(s = [], { maxResults: t = Number.POSITIVE_INFINITY } = {}) {
3823
- return Array.from(Ss(s, { maxResults: t }));
3824
+ function Ss(s = [], { maxResults: t = Number.POSITIVE_INFINITY } = {}) {
3825
+ return Array.from(Ce(s, { maxResults: t }));
3824
3826
  }
3825
3827
  function Es(s = [], t = 0) {
3826
3828
  const e = s.length;
@@ -3831,19 +3833,37 @@ function Es(s = [], t = 0) {
3831
3833
  for (let n = e - 1; n >= 0; n--)
3832
3834
  if (i[n] > t) {
3833
3835
  if (n === 0)
3834
- return Ct(e + 1);
3836
+ return Rt(e + 1);
3835
3837
  i[n - 1]++, i[n] = i[n - 1] + 1;
3836
3838
  }
3837
- return i[e - 1] > t ? Ct(e + 1) : i;
3839
+ return i[e - 1] > t ? Rt(e + 1) : i;
3838
3840
  }
3839
- function Ct(s = 1) {
3841
+ function Rt(s = 1) {
3840
3842
  return Array.from(Array(s).keys());
3841
3843
  }
3842
- function Ts(s = {}) {
3843
- let t = [];
3844
- return Object.entries(s).forEach(([e, i]) => {
3845
- t = i.flatMap((n) => t.length === 0 ? [{ [e]: n }] : t.map((r) => Object.assign(Object.assign({}, r), { [e]: n })));
3846
- }), t;
3844
+ function* Ts(s = {}) {
3845
+ const t = Object.entries(s);
3846
+ if (t.length === 0)
3847
+ return;
3848
+ const e = [
3849
+ { index: t.length - 1, partial: {} }
3850
+ ];
3851
+ for (; e.length > 0; ) {
3852
+ const i = e.pop();
3853
+ if (!i)
3854
+ break;
3855
+ const { index: n, partial: r } = i;
3856
+ if (n < 0) {
3857
+ yield r;
3858
+ continue;
3859
+ }
3860
+ const [a, o] = t[n];
3861
+ for (let u = o.length - 1; u >= 0; u--)
3862
+ e.push({
3863
+ index: n - 1,
3864
+ partial: Object.assign(Object.assign({}, r), { [a]: o[u] })
3865
+ });
3866
+ }
3847
3867
  }
3848
3868
  const xs = "3a".toUpperCase(), Is = /[ !"#$%&'()\[\]{|}<>*+,./;=?@^`~\\]/;
3849
3869
  function st(s = "") {
@@ -3853,19 +3873,19 @@ function Ns(s = "") {
3853
3873
  return s.split("").map((t) => t === ":" ? `\\${xs} ` : Is.test(t) ? `\\${t}` : escape(t).replace(/%/g, "\\")).join("");
3854
3874
  }
3855
3875
  const Ls = {
3856
- tag: ze,
3876
+ tag: Oe,
3857
3877
  id: As,
3858
3878
  class: vs,
3859
3879
  attribute: bs,
3860
- nthchild: ws,
3861
- nthoftype: ys
3880
+ nthchild: ys,
3881
+ nthoftype: ws
3862
3882
  }, Os = {
3863
- tag: Oe,
3864
- id: Ne,
3865
- class: Ie,
3866
- attribute: xe,
3867
- nthchild: Le,
3868
- nthoftype: Ce
3883
+ tag: Le,
3884
+ id: Ie,
3885
+ class: xe,
3886
+ attribute: Te,
3887
+ nthchild: Ne,
3888
+ nthoftype: ze
3869
3889
  };
3870
3890
  function zs(s, t) {
3871
3891
  return Os[t](s);
@@ -3883,16 +3903,17 @@ function Ps(s = [], t) {
3883
3903
  return n && !r ? -1 : !n && r ? 1 : 0;
3884
3904
  });
3885
3905
  }
3886
- function ks(s, t, e) {
3887
- const i = Ds(s, e), n = Ws(i, e), r = ye(n);
3888
- return [...new Set(r)];
3906
+ function* ks(s, t) {
3907
+ const e = /* @__PURE__ */ new Set(), i = Ds(s, t);
3908
+ for (const n of Gs(i, t))
3909
+ e.has(n) || (e.add(n), yield n);
3889
3910
  }
3890
3911
  function Ds(s, t) {
3891
- const { blacklist: e, whitelist: i, combineWithinSelector: n, maxCombinations: r } = t, a = zt(e), o = zt(i), h = (f, m) => {
3892
- const u = Cs(s, m), g = Rs(u, a, o), A = Ps(g, o);
3893
- return f[m] = n ? Re(A, { maxResults: r }) : A.map((R) => [R]), f;
3912
+ const { blacklist: e, whitelist: i, combineWithinSelector: n, maxCombinations: r } = t, a = Ct(e), o = Ct(i), u = (m, f) => {
3913
+ const h = Cs(s, f), g = Rs(h, a, o), A = Ps(g, o);
3914
+ return m[f] = n ? Array.from(Ce(A, { maxResults: r })) : A.map((R) => [R]), m;
3894
3915
  };
3895
- return Us(t).reduce(h, {});
3916
+ return Us(t).reduce(u, {});
3896
3917
  }
3897
3918
  function Us(s) {
3898
3919
  const { selectors: t, includeTag: e } = s, i = [...t];
@@ -3902,24 +3923,27 @@ function Ms(s) {
3902
3923
  return s.includes(E.tag) || s.includes(E.nthoftype) ? [...s] : [...s, E.tag];
3903
3924
  }
3904
3925
  function Bs(s) {
3905
- const { selectors: t, combineBetweenSelectors: e, includeTag: i, maxCandidates: n } = s, r = e ? Re(t, { maxResults: n }) : t.map((a) => [a]);
3926
+ const { selectors: t, combineBetweenSelectors: e, includeTag: i, maxCandidates: n } = s, r = e ? Ss(t, { maxResults: n }) : t.map((a) => [a]);
3906
3927
  return i ? r.map(Ms) : r;
3907
3928
  }
3908
- function Ws(s, t) {
3909
- return Bs(t).map((e) => Gs(e, s)).filter((e) => e.length > 0);
3929
+ function* Gs(s, t) {
3930
+ for (const e of Bs(t))
3931
+ yield* Ws(e, s);
3910
3932
  }
3911
- function Gs(s, t) {
3933
+ function* Ws(s, t) {
3912
3934
  const e = {};
3913
- return s.forEach((n) => {
3914
- const r = t[n];
3915
- r && r.length > 0 && (e[n] = r);
3916
- }), Ts(e).map(Fs);
3935
+ for (const i of s) {
3936
+ const n = t[i];
3937
+ n && n.length > 0 && (e[i] = n);
3938
+ }
3939
+ for (const i of Ts(e))
3940
+ yield Fs(i);
3917
3941
  }
3918
3942
  function Hs(s, t) {
3919
3943
  return t[s] ? t[s].join("") : "";
3920
3944
  }
3921
3945
  function Fs(s = {}) {
3922
- const t = [...Te];
3946
+ const t = [...Ee];
3923
3947
  return s[E.tag] && s[E.nthoftype] && t.splice(t.indexOf(E.tag), 1), t.map((e) => Hs(e, s)).join("");
3924
3948
  }
3925
3949
  function Vs(s, t) {
@@ -3928,48 +3952,63 @@ function Vs(s, t) {
3928
3952
  ...s.map((e) => t + gt.CHILD + e)
3929
3953
  ];
3930
3954
  }
3931
- function Ys(s, t) {
3932
- return t === "" ? s : Vs(s, t);
3955
+ function* Ys(s, t) {
3956
+ if (t === "")
3957
+ yield* s;
3958
+ else
3959
+ for (const e of s)
3960
+ yield* Vs([e], t);
3933
3961
  }
3934
- function $s(s, t, e = "", i) {
3935
- const n = ks(s, t, i), r = Ys(n, e);
3936
- for (const a of r)
3937
- if (jt(s, a, t))
3938
- return a;
3939
- return null;
3962
+ function* $s(s, t, e = "", i) {
3963
+ const n = ks(s, i);
3964
+ for (const r of Ys(n, e))
3965
+ jt(s, r, t) && (yield r);
3940
3966
  }
3941
- function qs(s, t, e = "", i) {
3967
+ function* qs(s, t, e = "", i) {
3942
3968
  if (s.length === 0)
3943
3969
  return null;
3944
3970
  const n = [
3945
3971
  s.length > 1 ? s : [],
3946
3972
  ...ls(s, t).map((r) => [r])
3947
3973
  ];
3948
- for (const r of n) {
3949
- const a = $s(r, t, e, i);
3950
- if (a)
3951
- return {
3974
+ for (const r of n)
3975
+ for (const a of $s(r, t, e, i))
3976
+ yield {
3952
3977
  foundElements: r,
3953
3978
  selector: a
3954
3979
  };
3980
+ }
3981
+ function* Xs({ elements: s, root: t, rootSelector: e = "", options: i }) {
3982
+ let n = t, r = e, a = !0;
3983
+ for (; a; ) {
3984
+ let o = !1;
3985
+ for (const u of qs(s, n, r, i)) {
3986
+ const { foundElements: m, selector: f } = u;
3987
+ if (o = !0, jt(s, f, t))
3988
+ yield f;
3989
+ else {
3990
+ n = m[0], r = f;
3991
+ break;
3992
+ }
3993
+ }
3994
+ o || (a = !1);
3955
3995
  }
3956
- return null;
3957
3996
  }
3958
- function Xs(s) {
3997
+ function Ks(s) {
3959
3998
  (s instanceof NodeList || s instanceof HTMLCollection) && (s = Array.from(s));
3960
- const t = (Array.isArray(s) ? s : [s]).filter(Qt);
3999
+ const t = (Array.isArray(s) ? s : [s]).filter(ve);
3961
4000
  return [...new Set(t)];
3962
4001
  }
3963
- function Ks(s) {
4002
+ function Zs(s) {
3964
4003
  return {
3965
4004
  value: s,
3966
4005
  include: !1
3967
4006
  };
3968
4007
  }
3969
- function Zs(s, t, e = gt.NONE) {
4008
+ function _s(s, t, e = gt.NONE) {
3970
4009
  const i = {};
3971
4010
  return t.forEach((n) => {
3972
- Reflect.set(i, n, zs(s, n).map(Ks));
4011
+ Reflect.set(i, n, zs(s, n).map(Zs));
3973
4012
  }), {
3974
4013
  element: s,
3975
4014
  operator: e,
@@ -3977,44 +4016,51 @@ function Zs(s, t, e = gt.NONE) {
3977
4016
  };
3978
4017
  }
3979
4018
  function Js({ selectors: s, operator: t }) {
3980
- let e = [...Te];
4019
+ let e = [...Ee];
3981
4020
  s[E.tag] && s[E.nthoftype] && (e = e.filter((n) => n !== E.tag));
3982
4021
  let i = "";
3983
4022
  return e.forEach((n) => {
3984
4023
  var r;
3985
- ((r = s[n]) !== null && r !== void 0 ? r : []).forEach(({ value: o, include: h }) => {
3986
- h && (i += o);
4024
+ ((r = s[n]) !== null && r !== void 0 ? r : []).forEach(({ value: o, include: u }) => {
4025
+ u && (i += o);
3987
4026
  });
3988
4027
  }), t + i;
3989
4028
  }
3990
- function _s(s) {
3991
- return [":root", ...Se(s).reverse().map((i) => {
3992
- const n = Zs(i, [E.nthchild], gt.CHILD);
3993
- return n.selectors.nthchild.forEach((r) => {
3994
- r.include = !0;
3995
- }), n;
3996
- }).map(Js)].join("");
4029
+ function Qs(s, t) {
4030
+ const i = we(s, t).reverse().map((n) => {
4031
+ var r;
4032
+ const a = _s(n, [E.nthchild], gt.CHILD);
4033
+ return ((r = a.selectors.nthchild) !== null && r !== void 0 ? r : []).forEach((o) => {
4034
+ o.include = !0;
4035
+ }), a;
4036
+ });
4037
+ return [
4038
+ t ? ":scope" : ":root",
4039
+ ...i.map(Js)
4040
+ ].join("");
3997
4041
  }
3998
- function Qs(s) {
3999
- return s.map(_s).join(Ee);
4042
+ function js(s, t) {
4043
+ return s.map((e) => Qs(e, t)).join(Se);
4044
+ }
4045
+ function Re(s, t = {}) {
4046
+ const e = Object.assign(Object.assign({}, t), { maxResults: 1 });
4047
+ return tn(s, e).next().value;
4000
4048
  }
4001
- function Pe(s, t = {}) {
4049
+ function* tn(s, t = {}) {
4002
4050
  var e;
4003
- const i = Xs(s), n = os(i[0], t), r = (e = n.root) !== null && e !== void 0 ? e : te(i[0]);
4004
- let a = "", o = r;
4005
- function h() {
4006
- return qs(i, o, a, n);
4007
- }
4008
- let f = h();
4009
- for (; f; ) {
4010
- const { foundElements: m, selector: u } = f;
4011
- if (jt(i, u, r))
4012
- return u;
4013
- o = m[0], a = u, f = h();
4014
- }
4015
- return i.length > 1 ? i.map((m) => Pe(m, n)).join(Ee) : Qs(i);
4051
+ const i = Ks(s), n = as(i[0], t), r = (e = n.root) !== null && e !== void 0 ? e : te(i[0]);
4052
+ let a = 0;
4053
+ for (const o of Xs({
4054
+ elements: i,
4055
+ options: n,
4056
+ root: r,
4057
+ rootSelector: ""
4058
+ }))
4059
+ if (yield o, a++, a >= n.maxResults)
4060
+ return;
4061
+ i.length > 1 && (yield i.map((o) => Re(o, n)).join(Se), a++, a >= n.maxResults) || (yield js(i, n.useScope ? r : void 0));
4016
4062
  }
4017
- class dn extends _t {
4063
+ class fn extends Qt {
4018
4064
  constructor(t, e, i = 50) {
4019
4065
  super(), this.resource = t, this.locator = e, this.beforeMaxLength = i, this.currentElement = null, this.currentIndex = null, this.parsedElementRecipes = null, this.parser = null;
4020
4066
  }
@@ -4049,15 +4095,15 @@ class dn extends _t {
4049
4095
  }
4050
4096
  async parseElements() {
4051
4097
  const t = await this.resource.readAsString(), e = new DOMParser().parseFromString(t, this.locator.type);
4052
- return this.parser = new tn(
4098
+ return this.parser = new sn(
4053
4099
  e,
4054
4100
  this.locator,
4055
4101
  this.locator.locations.getCssSelector() ? e.querySelector(this.locator.locations.getCssSelector()) : null,
4056
4102
  this.beforeMaxLength
4057
- ), js(this.parser, e.body), this.parser.result();
4103
+ ), en(this.parser, e.body), this.parser.result();
4058
4104
  }
4059
4105
  }
4060
- function js(s, t) {
4106
+ function en(s, t) {
4061
4107
  let e = t, i = 0;
4062
4108
  for (; e != null; )
4063
4109
  if (s.head(e, i), e.firstChild != null)
@@ -4070,7 +4116,7 @@ function js(s, t) {
4070
4116
  e = e?.nextSibling || null;
4071
4117
  }
4072
4118
  }
4073
- class tn {
4119
+ class sn {
4074
4120
  constructor(t, e, i, n) {
4075
4121
  this.doc = t, this.baseLocator = e, this.startElement = i, this.beforeMaxLength = n, 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();
4076
4122
  }
@@ -4084,7 +4130,7 @@ class tn {
4084
4130
  const e = t.recipe.cssSelectorNode ? this.cssSelector(t.recipe.cssSelectorNode) : null;
4085
4131
  if (t.type === 1) {
4086
4132
  const i = t.recipe;
4087
- return new Fi(
4133
+ return new Hi(
4088
4134
  new k({
4089
4135
  href: this.baseLocator.href,
4090
4136
  type: this.baseLocator.type,
@@ -4112,7 +4158,7 @@ class tn {
4112
4158
  ])
4113
4159
  } : {})
4114
4160
  }), n = t.recipe;
4115
- return t.type === 3 ? new Hi(
4161
+ return t.type === 3 ? new Wi(
4116
4162
  i,
4117
4163
  n.link
4118
4164
  ) : new Gi(
@@ -4122,7 +4168,7 @@ class tn {
4122
4168
  } else if (t.type === 0) {
4123
4169
  const i = t.recipe, n = i.segments.map((r) => {
4124
4170
  const a = r.cssSelectorNode ? this.cssSelector(r.cssSelectorNode) : null;
4125
- return new me(
4171
+ return new fe(
4126
4172
  new k({
4127
4173
  href: this.baseLocator.href,
4128
4174
  type: this.baseLocator.type,
@@ -4138,7 +4184,7 @@ class tn {
4138
4184
  r.attributes
4139
4185
  );
4140
4186
  });
4141
- return new Ot(
4187
+ return new zt(
4142
4188
  new k({
4143
4189
  href: this.baseLocator.href,
4144
4190
  type: this.baseLocator.type,
@@ -4163,15 +4209,15 @@ class tn {
4163
4209
  let r = e;
4164
4210
  for (; r && r !== this.doc.body; ) {
4165
4211
  for (let o = 0; o < r.attributes.length; o++) {
4166
- const h = r.attributes[o];
4167
- h.prefix && (n.has(r) ? n.set(r, n.get(r).concat([h])) : n.set(r, [h]), r.attributes.removeNamedItem(h.name));
4212
+ const u = r.attributes[o];
4213
+ u.prefix && (n.has(r) ? n.set(r, n.get(r).concat([u])) : n.set(r, [u]), r.attributes.removeNamedItem(u.name));
4168
4214
  }
4169
4215
  r = r.parentElement;
4170
4216
  }
4171
- const a = Pe(e, {
4217
+ const a = Re(e, {
4172
4218
  root: this.doc
4173
4219
  });
4174
- return n.forEach((o, h) => o.forEach((f) => h.attributes.setNamedItem(f))), this.recipeCssSelectorCache.set(e, a), a;
4220
+ return n.forEach((o, u) => o.forEach((m) => u.attributes.setNamedItem(m))), this.recipeCssSelectorCache.set(e, a), a;
4175
4221
  }
4176
4222
  // Implements NodeTraversor
4177
4223
  head(t, e) {
@@ -4193,7 +4239,7 @@ class tn {
4193
4239
  // FIXME: Get the caption from figcaption
4194
4240
  cssSelectorNode: t,
4195
4241
  attributes: o?.length ? [new ne(
4196
- Lt.ACCESSIBILITY_LABEL,
4242
+ Ot.ACCESSIBILITY_LABEL,
4197
4243
  o
4198
4244
  )] : []
4199
4245
  }
@@ -4206,17 +4252,17 @@ class tn {
4206
4252
  href: a
4207
4253
  });
4208
4254
  else {
4209
- const h = [...r.getElementsByTagName("source")].map((f) => {
4210
- const m = St(f, this.baseLocator.href);
4211
- return m ? new U({
4212
- href: m,
4213
- type: f.getAttribute("type") || void 0
4255
+ const u = [...r.getElementsByTagName("source")].map((m) => {
4256
+ const f = St(m, this.baseLocator.href);
4257
+ return f ? new U({
4258
+ href: f,
4259
+ type: m.getAttribute("type") || void 0
4214
4260
  }) : null;
4215
- }).filter((f) => !!f);
4216
- h.length > 0 && (o = new U({
4217
- href: h[0].href,
4218
- type: h[0].type,
4219
- alternates: h.length > 1 ? new O(h.slice(1)) : void 0
4261
+ }).filter((m) => !!m);
4262
+ u.length > 0 && (o = new U({
4263
+ href: u[0].href,
4264
+ type: u[0].type,
4265
+ alternates: u.length > 1 ? new O(u.slice(1)) : void 0
4220
4266
  }));
4221
4267
  }
4222
4268
  o && (n === "AUDIO" ? this.elementRecipes.push({
@@ -4239,8 +4285,8 @@ class tn {
4239
4285
  // Implements NodeTraversor
4240
4286
  tail(t, e) {
4241
4287
  if (t.nodeType === Node.TEXT_NODE && !ot(t.textContent)) {
4242
- const i = ji(t.parentElement);
4243
- this.currentLanguage !== i && (this.flushSegment(), this.currentLanguage = i), this.rawTextAcc += t.textContent, this.textAcc = ts(this.textAcc, t.textContent);
4288
+ const i = Qi(t.parentElement);
4289
+ this.currentLanguage !== i && (this.flushSegment(), this.currentLanguage = i), this.rawTextAcc += t.textContent, this.textAcc = ji(this.textAcc, t.textContent);
4244
4290
  } else if (t.nodeType === Node.ELEMENT_NODE && !ae(t)) {
4245
4291
  if (!this.breadcrumbs.length || this.breadcrumbs.at(-1) !== t) throw new Error("HTMLContentIterator: breadcrumbs mismatch");
4246
4292
  this.flushText(), this.breadcrumbs.pop();
@@ -4248,14 +4294,14 @@ class tn {
4248
4294
  }
4249
4295
  flushText() {
4250
4296
  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;
4251
- this.segmentRecipesAcc[this.segmentRecipesAcc.length - 1].text = Qi(
4297
+ this.segmentRecipesAcc[this.segmentRecipesAcc.length - 1].text = Ji(
4252
4298
  this.segmentRecipesAcc[this.segmentRecipesAcc.length - 1].text
4253
4299
  );
4254
- let t = Yi;
4300
+ let t = Vi;
4255
4301
  if (this.breadcrumbs.length > 0) {
4256
4302
  const e = this.breadcrumbs.at(-1);
4257
4303
  if (e.getAttributeNS("http://www.idpf.org/2007/ops", "type") === "footnote")
4258
- t = $i;
4304
+ t = Yi;
4259
4305
  else
4260
4306
  switch (e.nodeName.toUpperCase()) {
4261
4307
  case "H1":
@@ -4264,11 +4310,11 @@ class tn {
4264
4310
  case "H4":
4265
4311
  case "H5":
4266
4312
  case "H6":
4267
- t = new Vi(parseInt(e.nodeName[1]));
4313
+ t = new Fi(parseInt(e.nodeName[1]));
4268
4314
  break;
4269
4315
  case "BLOCKQUOTE":
4270
4316
  case "Q":
4271
- t = new qi(
4317
+ t = new $i(
4272
4318
  e.getAttribute("cite")?.length ? new URL(e.getAttribute("cite")) : void 0,
4273
4319
  e.getAttribute("title") || void 0
4274
4320
  );
@@ -4287,7 +4333,7 @@ class tn {
4287
4333
  }
4288
4334
  flushSegment() {
4289
4335
  let t = this.textAcc;
4290
- const e = ve(t);
4336
+ const e = be(t);
4291
4337
  if (!ot(e)) {
4292
4338
  if (!this.segmentRecipesAcc.length) {
4293
4339
  t = _i(t);
@@ -4297,7 +4343,7 @@ class tn {
4297
4343
  this.segmentRecipesAcc.push({
4298
4344
  text: t,
4299
4345
  attributes: this.currentLanguage ? [new ne(
4300
- Lt.LANGUAGE,
4346
+ Ot.LANGUAGE,
4301
4347
  this.currentLanguage
4302
4348
  )] : [],
4303
4349
  beforeRange: this.wholeRawTextAcc ? [this.wholeRawTextAcc.length - this.beforeMaxLength, this.wholeRawTextAcc.length] : [0, 0],
@@ -4336,7 +4382,7 @@ class vt {
4336
4382
  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;
4337
4383
  }
4338
4384
  }
4339
- class ke {
4385
+ class Pe {
4340
4386
  /**
4341
4387
  * Creates a [LocatorCollection].
4342
4388
  */
@@ -4349,7 +4395,7 @@ class ke {
4349
4395
  static deserialize(t) {
4350
4396
  if (!t) return;
4351
4397
  let e, i = t.locators;
4352
- return i && Array.isArray(i) && (e = i.map((n) => k.deserialize(n)).filter((n) => n !== void 0)), new ke({
4398
+ return i && Array.isArray(i) && (e = i.map((n) => k.deserialize(n)).filter((n) => n !== void 0)), new Pe({
4353
4399
  metadata: vt.deserialize(t.metadata),
4354
4400
  links: O.deserialize(t.links),
4355
4401
  locators: e
@@ -4367,7 +4413,7 @@ class ke {
4367
4413
  return this.links && this.links.items.length > 0 && (t.links = this.links.serialize()), this.locators && (t.locators = this.locators.map((e) => e.serialize())), t;
4368
4414
  }
4369
4415
  }
4370
- class G {
4416
+ class W {
4371
4417
  /**
4372
4418
  * Creates a [PublicationCollection].
4373
4419
  */
@@ -4385,11 +4431,11 @@ class G {
4385
4431
  else if (typeof t == "object")
4386
4432
  e = O.deserialize(t.links), i = /* @__PURE__ */ new Map(), t.metadata && Object.entries(t.metadata).forEach(([r, a]) => {
4387
4433
  i?.set(r, a);
4388
- }), n = G.deserializeCollections(t);
4434
+ }), n = W.deserializeCollections(t);
4389
4435
  else
4390
4436
  return;
4391
4437
  if (!(!e || e.items.length === 0))
4392
- return new G({
4438
+ return new W({
4393
4439
  metadata: i?.size ? i : void 0,
4394
4440
  links: e,
4395
4441
  subcollections: n?.size ? n : void 0
@@ -4404,13 +4450,13 @@ class G {
4404
4450
  const e = /* @__PURE__ */ new Map();
4405
4451
  return Object.entries(t).forEach(([i, n]) => {
4406
4452
  if (i !== "links" && i !== "metadata") {
4407
- const r = G.deserialize(n);
4453
+ const r = W.deserialize(n);
4408
4454
  if (r) {
4409
4455
  const a = new Array();
4410
4456
  a.push(r), e.set(i, a);
4411
4457
  } else if (Array.isArray(n)) {
4412
4458
  const a = n.map(
4413
- (o) => G.deserialize(o)
4459
+ (o) => W.deserialize(o)
4414
4460
  ).filter((o) => o !== void 0);
4415
4461
  e.set(i, a);
4416
4462
  }
@@ -4424,7 +4470,7 @@ class G {
4424
4470
  const t = {};
4425
4471
  return this.metadata && (t.metadata = {}, this.metadata.forEach(
4426
4472
  (e, i) => t.metadata[i] = e
4427
- )), this.links.items.length && (t.links = this.links.serialize()), G.serializeCollection(t, this.subcollections), t;
4473
+ )), this.links.items.length && (t.links = this.links.serialize()), W.serializeCollection(t, this.subcollections), t;
4428
4474
  }
4429
4475
  static serializeCollection(t, e) {
4430
4476
  e && e.size > 0 && e.forEach(
@@ -4434,7 +4480,7 @@ class G {
4434
4480
  );
4435
4481
  }
4436
4482
  }
4437
- class De {
4483
+ class ke {
4438
4484
  constructor(t) {
4439
4485
  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;
4440
4486
  }
@@ -4454,14 +4500,14 @@ class De {
4454
4500
  t.readingOrder ? t.readingOrder : t.spine
4455
4501
  );
4456
4502
  if (n)
4457
- return new De({
4503
+ return new ke({
4458
4504
  context: F(t["@context"]),
4459
4505
  metadata: e,
4460
4506
  links: i,
4461
4507
  readingOrder: n,
4462
4508
  resources: O.deserialize(t.resources),
4463
4509
  toc: O.deserialize(t.toc),
4464
- subcollections: G.deserializeCollections({
4510
+ subcollections: W.deserializeCollections({
4465
4511
  sub: t.sub
4466
4512
  })
4467
4513
  });
@@ -4471,7 +4517,7 @@ class De {
4471
4517
  */
4472
4518
  serialize() {
4473
4519
  const t = {};
4474
- return this.context !== void 0 && (t["@context"] = this.context), t.metadata = this.metadata.serialize(), t.links = this.links.serialize(), t.readingOrder = this.readingOrder.serialize(), this.resources && (t.resources = this.resources.serialize()), this.toc && (t.toc = this.toc.serialize()), G.serializeCollection(t, this.subcollections), t;
4520
+ return this.context !== void 0 && (t["@context"] = this.context), t.metadata = this.metadata.serialize(), t.links = this.links.serialize(), t.readingOrder = this.readingOrder.serialize(), this.resources && (t.resources = this.resources.serialize()), this.toc && (t.toc = this.toc.serialize()), W.serializeCollection(t, this.subcollections), t;
4475
4521
  }
4476
4522
  /** Finds the first link with the given relation in the manifest's links. */
4477
4523
  linkWithRel(t) {
@@ -4511,17 +4557,17 @@ class De {
4511
4557
  /** Finds the first Link having the given `href` in the publication's links. */
4512
4558
  linkWithHref(t) {
4513
4559
  const e = (o) => {
4514
- let h;
4515
- for (const m of o)
4516
- if (h = m.findWithHref(t), h !== void 0)
4517
- return h;
4518
- const f = new Array();
4519
- return o.forEach((m) => {
4520
- const u = [];
4521
- for (const g of m.items)
4522
- g.alternates && u.push(g.alternates), g.children && u.push(g.children);
4523
- f.push(...u);
4524
- }), f.length > 0 && (h = e(f)), h;
4560
+ let u;
4561
+ for (const f of o)
4562
+ if (u = f.findWithHref(t), u !== void 0)
4563
+ return u;
4564
+ const m = new Array();
4565
+ return o.forEach((f) => {
4566
+ const h = [];
4567
+ for (const g of f.items)
4568
+ g.alternates && h.push(g.alternates), g.children && h.push(g.children);
4569
+ m.push(...h);
4570
+ }), m.length > 0 && (u = e(m)), u;
4525
4571
  }, i = [];
4526
4572
  i.push(this.readingOrder), this.resources && i.push(this.resources), i.push(this.links);
4527
4573
  const n = e(i);
@@ -4566,50 +4612,50 @@ class De {
4566
4612
  export {
4567
4613
  C as AccessMode,
4568
4614
  V as Accessibility,
4569
- rn as AccessibilityMetadataDisplayGuide,
4570
- Et as AccessibilityProfile,
4571
- Gt as AccessibilitySummary,
4615
+ on as AccessibilityMetadataDisplayGuide,
4616
+ Tt as AccessibilityProfile,
4617
+ Ht as AccessibilitySummary,
4572
4618
  j as Acquisition,
4573
- Ut as AdditionalInformation,
4619
+ Mt as AdditionalInformation,
4574
4620
  Z as AltIdentifier,
4575
4621
  ne as Attribute,
4576
- Lt as AttributeKeys,
4577
- pe as AttributesHolder,
4622
+ Ot as AttributeKeys,
4623
+ de as AttributesHolder,
4578
4624
  Gi as AudioElement,
4579
4625
  Jt as Availability,
4580
- Wi as AvailabilityStatus,
4581
- _ as BelongsTo,
4582
- Yi as Body,
4583
- Rt as Certification,
4584
- Bt as Conformance,
4585
- on as Content,
4586
- fe as ContentElement,
4626
+ Bi as AvailabilityStatus,
4627
+ J as BelongsTo,
4628
+ Vi as Body,
4629
+ Pt as Certification,
4630
+ Gt as Conformance,
4631
+ ln as Content,
4632
+ pe as ContentElement,
4587
4633
  ht as Contributor,
4588
4634
  N as Contributors,
4589
- Zt as Copies,
4590
- Di as DefaultTextContentTokenizer,
4591
- qt as DomRange,
4635
+ _t as Copies,
4636
+ ki as DefaultTextContentTokenizer,
4637
+ Xt as DomRange,
4592
4638
  mt as DomRangePoint,
4593
- je as EmptyFetcher,
4594
- Ht as Encryption,
4595
- xt as Exemption,
4639
+ Qe as EmptyFetcher,
4640
+ Ft as Encryption,
4641
+ It as Exemption,
4596
4642
  v as Feature,
4597
- $i as Footnote,
4598
- $t as GuidedNavigationDocument,
4643
+ Yi as Footnote,
4644
+ qt as GuidedNavigationDocument,
4599
4645
  X as GuidedNavigationObject,
4600
4646
  ft as GuidedNavigationText,
4601
- dn as HTMLResourceContentIterator,
4647
+ fn as HTMLResourceContentIterator,
4602
4648
  P as Hazard,
4603
- di as HazardType,
4604
- Mt as Hazards,
4605
- Vi as Heading,
4606
- Kt as Holds,
4607
- en as HttpFetcher,
4608
- ti as HttpResource,
4649
+ hi as HazardType,
4650
+ Bt as Hazards,
4651
+ Fi as Heading,
4652
+ Zt as Holds,
4653
+ nn as HttpFetcher,
4654
+ je as HttpResource,
4609
4655
  et as IllegalStateError,
4610
- Fi as ImageElement,
4611
- Ui as IntlTextTokenizer,
4612
- _t as Iterator,
4656
+ Hi as ImageElement,
4657
+ Di as IntlTextTokenizer,
4658
+ Qt as Iterator,
4613
4659
  q as Layout,
4614
4660
  Wt as Legal,
4615
4661
  U as Link,
@@ -4617,53 +4663,53 @@ export {
4617
4663
  p as Localization,
4618
4664
  M as LocalizedString,
4619
4665
  k as Locator,
4620
- ke as LocatorCollection,
4666
+ Pe as LocatorCollection,
4621
4667
  vt as LocatorCollectionMetadata,
4622
4668
  T as LocatorLocations,
4623
4669
  nt as LocatorText,
4624
- De as Manifest,
4625
- Ft as MediaOverlay,
4670
+ ke as Manifest,
4671
+ Vt as MediaOverlay,
4626
4672
  c as MediaType,
4627
4673
  pt as Metadata,
4628
- Mi as NaiveTextTokenizer,
4629
- kt as Navigation,
4630
- li as NonvisualReading,
4631
- sn as NumberRange,
4632
- yt as PDFContentElement,
4633
- It as Page,
4634
- hn as PageContentIteratorPDF,
4635
- ui as PrerecordedAudio,
4636
- Xt as Price,
4637
- Tt as PrimaryAccessMode,
4638
- J as Profile,
4674
+ Ui as NaiveTextTokenizer,
4675
+ Dt as Navigation,
4676
+ ci as NonvisualReading,
4677
+ rn as NumberRange,
4678
+ wt as PDFContentElement,
4679
+ Nt as Page,
4680
+ pn as PageContentIteratorPDF,
4681
+ li as PrerecordedAudio,
4682
+ Kt as Price,
4683
+ xt as PrimaryAccessMode,
4684
+ _ as Profile,
4639
4685
  D as Properties,
4640
4686
  Y as Publication,
4641
- G as PublicationCollection,
4642
- un as PublicationContentIterator,
4687
+ W as PublicationCollection,
4688
+ dn as PublicationContentIterator,
4643
4689
  H as ReadingProgression,
4644
- nn as Resource,
4645
- Dt as RichContent,
4646
- hi as RichContentType,
4690
+ an as Resource,
4691
+ Ut as RichContent,
4692
+ ui as RichContentType,
4647
4693
  dt as Subject,
4648
- Vt as Subjects,
4649
- Yt as TDM,
4650
- fi as TDMReservation,
4651
- cn as TextContentTokenizer,
4652
- Ot as TextElement,
4653
- qi as TextQuote,
4654
- me as TextSegment,
4655
- ki as TextUnit,
4694
+ Yt as Subjects,
4695
+ $t as TDM,
4696
+ pi as TDMReservation,
4697
+ un as TextContentTokenizer,
4698
+ zt as TextElement,
4699
+ $i as TextQuote,
4700
+ fe as TextSegment,
4701
+ Pi as TextUnit,
4656
4702
  At as TextualElement,
4657
4703
  ut as URITemplate,
4658
- Hi as VideoElement,
4659
- ci as VisualAdjustments,
4660
- Pt as WaysOfReading,
4661
- pi as arrayfromJSON,
4704
+ Wi as VideoElement,
4705
+ oi as VisualAdjustments,
4706
+ kt as WaysOfReading,
4707
+ di as arrayfromJSON,
4662
4708
  F as arrayfromJSONorString,
4663
4709
  ct as datefromJSON,
4664
- an as leadingPage,
4710
+ cn as leadingPage,
4665
4711
  K as numberfromJSON,
4666
4712
  L as positiveNumberfromJSON,
4667
4713
  lt as setToArray,
4668
- de as speakableToken
4714
+ he as speakableToken
4669
4715
  };