@readium/shared
Version:
Shared models to be used across other Readium projects and implementations in Typescript
946 lines • 164 kB
JavaScript
class ti {
close() {
}
links() {
return [];
}
get(t) {
throw Error("This is an empty fetcher");
}
}
class tr {
constructor(t, e) {
this.client = t || window.fetch.bind(window), this.baseUrl = e;
}
links() {
return [];
}
get(t) {
const e = t.toURL(this.baseUrl);
if (e === void 0)
throw Error(`Invalid HREF: ${t.href}`);
return new ei(this.client, t, e);
}
close() {
}
}
class ei {
constructor(t, e, i) {
this.client = t || window.fetch.bind(window), this._link = e, this.url = i;
}
/** Cached HEAD response to get the expected content length and other metadata. */
async headResponse() {
if (this._headResponse) return this._headResponse;
const t = await this.client(this.url, {
method: "HEAD"
});
if (!t.ok)
throw new Error(
`http HEAD request for ${this.url} failed with HTTP status code ${t.status}`
);
return this._headResponse = t, t;
}
close() {
}
async link() {
return this._link;
}
async read(t) {
if (t) throw new Error("http read range not implemented!");
const e = await this.client(this.url);
if (!e.ok)
throw new Error(
`http GET request for ${this.url} failed with HTTP status code ${e.status}`
);
return new Uint8Array(await e.arrayBuffer());
}
async length() {
const e = (await this.headResponse()).headers.get("content-length");
if (e === null || e === "")
throw new Error("length for resource unavailable");
return parseInt(e);
}
async readAsJSON() {
const t = await this.client(this.url);
if (!t.ok)
throw new Error(
`http GET request for ${this.url} failed with HTTP status code ${t.status}`
);
return await t.json();
}
async readAsString() {
const t = await this.client(this.url);
if (!t.ok)
throw new Error(
`http GET request for ${this.url} failed with HTTP status code ${t.status}`
);
return await t.text();
}
async readAsXML() {
const t = await this.client(this.url);
if (!t.ok)
throw new Error(
`http GET request for ${this.url} failed with HTTP status code ${t.status}`
);
return new DOMParser().parseFromString(
await t.text(),
"application/xml"
);
}
}
class er {
constructor(t, e) {
this.start = t, this.endInclusive = e;
}
}
class ir {
readAsString() {
return this.read().then((t) => t === void 0 ? t : new TextDecoder().decode(t));
}
readAsJSON() {
return this.readAsString().then((t) => t === void 0 ? t : JSON.parse(t));
}
readAsXML() {
return this.readAsString().then((t) => t === void 0 ? t : new DOMParser().parseFromString(t, "text/xml"));
}
}
class _ {
constructor(t = {}) {
this.conformsTo = t.conformsTo ?? [], this.certification = t.certification ?? null, this.summary = t.summary ?? null, this.accessMode = t.accessMode ?? [], this.accessModeSufficient = t.accessModeSufficient ?? [], this.feature = t.feature ?? [], this.hazard = t.hazard ?? [], this.exemption = t.exemption ?? [];
}
/**
* Parses an [Accessibility] from its RWPM JSON representation.
*/
static deserialize(t) {
if (!t || typeof t != "object") return;
const e = t;
return new _({
conformsTo: e.conformsTo ? e.conformsTo.map((i) => Tt.deserialize(i)).filter((i) => i !== void 0) : void 0,
certification: e.certification ? Pt.deserialize(e.certification) : void 0,
summary: e.summary,
accessMode: e.accessMode ? e.accessMode.map((i) => R.deserialize(i)).filter((i) => i !== void 0) : void 0,
accessModeSufficient: e.accessModeSufficient ? e.accessModeSufficient.map((i) => It.deserialize(i)).filter((i) => i !== void 0) : void 0,
feature: e.feature ? e.feature.map((i) => A.deserialize(i)).filter((i) => i !== void 0) : void 0,
hazard: e.hazard ? e.hazard.map((i) => P.deserialize(i)).filter((i) => i !== void 0) : void 0,
exemption: e.exemption ? e.exemption.map((i) => xt.deserialize(i)).filter((i) => i !== void 0) : void 0
});
}
/**
* Serializes an [Accessibility] to its RWPM JSON representation.
*/
serialize() {
const t = {};
return this.conformsTo?.length > 0 && (t.conformsTo = this.conformsTo.map((e) => e.serialize())), this.certification !== void 0 && this.certification !== null && (t.certification = this.certification.serialize()), this.summary !== void 0 && this.summary !== null && (t.summary = this.summary), this.accessMode?.length > 0 && (t.accessMode = this.accessMode.map((e) => e.serialize())), this.accessModeSufficient?.length > 0 && (t.accessModeSufficient = this.accessModeSufficient.map((e) => e.serialize())), this.feature?.length > 0 && (t.feature = this.feature.map((e) => e.serialize())), this.hazard?.length > 0 && (t.hazard = this.hazard.map((e) => e.serialize())), this.exemption?.length > 0 && (t.exemption = this.exemption.map((e) => e.serialize())), t;
}
}
const b = class b {
constructor(t) {
this.uri = t;
}
/**
* Parses an [AccessibilityProfile] from its RWPM JSON representation.
*/
static deserialize(t) {
if (!(!t || typeof t != "string"))
return new b(t);
}
/**
* Serializes an [AccessibilityProfile] to its RWPM JSON representation.
*/
serialize() {
return this.uri;
}
/**
* Returns true if the profile is a WCAG Level A profile.
*/
get isWCAGLevelA() {
return this === b.EPUB_A11Y_10_WCAG_20_A || this === b.EPUB_A11Y_11_WCAG_20_A || this === b.EPUB_A11Y_11_WCAG_21_A || this === b.EPUB_A11Y_11_WCAG_22_A;
}
/**
* Returns true if the profile is a WCAG Level AA profile.
*/
get isWCAGLevelAA() {
return this === b.EPUB_A11Y_10_WCAG_20_AA || this === b.EPUB_A11Y_11_WCAG_20_AA || this === b.EPUB_A11Y_11_WCAG_21_AA || this === b.EPUB_A11Y_11_WCAG_22_AA;
}
/**
* Returns true if the profile is a WCAG Level AAA profile.
*/
get isWCAGLevelAAA() {
return this === b.EPUB_A11Y_10_WCAG_20_AAA || this === b.EPUB_A11Y_11_WCAG_20_AAA || this === b.EPUB_A11Y_11_WCAG_21_AAA || this === b.EPUB_A11Y_11_WCAG_22_AAA;
}
};
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");
let Tt = b;
class Pt {
constructor(t = null, e = null, i = null) {
this.certifiedBy = t, this.credential = e, this.report = i;
}
/**
* Parses a [Certification] from its RWPM JSON representation.
*/
static deserialize(t) {
if (!(!t || typeof t != "object"))
return new Pt(
t.certifiedBy,
t.credential,
t.report
);
}
/**
* Serializes a [Certification] to its RWPM JSON representation.
*/
serialize() {
const t = {};
return this.certifiedBy && (t.certifiedBy = this.certifiedBy), this.credential && (t.credential = this.credential), this.report && (t.report = this.report), t;
}
}
const y = class y {
constructor(t) {
this.value = t;
}
/**
* Parses an [AccessMode] from its RWPM JSON representation.
*/
static deserialize(t) {
if (!(!t || typeof t != "string"))
return new y(t);
}
/**
* Serializes an [AccessMode] to its RWPM JSON representation.
*/
serialize() {
return this.value;
}
};
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");
let R = y;
const x = class x {
constructor(t) {
if (typeof t == "string") {
if (!x.VALID_MODES.has(t.toLowerCase()))
return;
this.value = t.toLowerCase();
} else {
const e = t.filter(
(i) => x.VALID_MODES.has(i.toLowerCase())
);
if (e.length === 0)
return;
this.value = Array.from(new Set(e));
}
}
/**
* Parses a [PrimaryAccessMode] from its RWPM JSON representation.
*/
static deserialize(t) {
if (!t) return;
if (typeof t == "string")
return new x(t);
if (!Array.isArray(t)) return;
const e = t.filter((i) => i ? x.VALID_MODES.has(i.toLowerCase()) : !1);
if (e.length !== 0)
return new x(e);
}
/**
* Serializes a [PrimaryAccessMode] to its RWPM JSON representation.
*/
serialize() {
return this.value;
}
};
x.VALID_MODES = /* @__PURE__ */ new Set(["auditory", "tactile", "textual", "visual"]), x.AUDITORY = new x("auditory"), x.TACTILE = new x("tactile"), x.TEXTUAL = new x("textual"), x.VISUAL = new x("visual");
let It = x;
const l = class l {
constructor(t) {
this.value = t;
}
/**
* Parses a [Feature] from its RWPM JSON representation.
*/
static deserialize(t) {
if (!(!t || typeof t != "string"))
return new l(t);
}
/**
* Serializes a [Feature] to its RWPM JSON representation.
*/
serialize() {
return this.value;
}
};
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");
let A = l;
const w = class w {
constructor(t) {
this.value = t;
}
/**
* Parses a [Hazard] from its RWPM JSON representation.
*/
static deserialize(t) {
if (!(!t || typeof t != "string"))
return new w(t);
}
/**
* Serializes a [Hazard] to its RWPM JSON representation.
*/
serialize() {
return this.value;
}
};
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");
let P = w;
const S = class S {
constructor(t) {
this.value = t;
}
/**
* Parses an [Exemption] from its RWPM JSON representation.
*/
static deserialize(t) {
if (!(!t || typeof t != "string"))
return new S(t);
}
/**
* Serializes an [Exemption] to its RWPM JSON representation.
*/
serialize() {
return this.value;
}
};
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");
let xt = S;
const ee = ["en", "ar", "da", "fr", "it", "pt_PT", "sv"], ii = /* @__PURE__ */ JSON.parse(`{"format":{"audiobook":"Audiobook","audiobookJSON":"Audiobook Manifest","cbz":"Comic Book Archive","divina":"Divina Publication","divinaJSON":"Divina Publication Manifest","epub":"EPUB","lcpa":"LCP Protected Audiobook","lcpdf":"LCP Protected PDF","lcpl":"LCP License Document","pdf":"PDF","rwp":"Readium Web Publication","rwpm":"Readium Web Publication Manifest","zab":"Audiobook Archive","zip":"ZIP Archive"},"kind":{"audiobook_one":"audiobook","audiobook_other":"audiobooks","book_one":"book","book_other":"books","comic_one":"comic","comic_other":"comics","document_one":"document","document_other":"documents"},"metadata":{"accessibility":{"display-guide":{"accessibility-summary":{"no-metadata":"No information is available","publisher-contact":"For more information about the accessibility of this product, please contact the publisher: ","title":"Accessibility summary"},"additional-accessibility-information":{"aria":{"compact":"ARIA roles included","descriptive":"Content is enhanced with ARIA roles to optimize organization and facilitate navigation"},"audio-descriptions":"Audio descriptions","braille":"Braille","color-not-sole-means-of-conveying-information":"Color is not the sole means of conveying information","dyslexia-readability":"Dyslexia readability","full-ruby-annotations":"Full ruby annotations","high-contrast-between-foreground-and-background-audio":"High contrast between foreground and background audio","high-contrast-between-text-and-background":"High contrast between foreground text and background","large-print":"Large print","page-breaks":{"compact":"Page breaks included","descriptive":"Page breaks included from the original print source"},"ruby-annotations":"Some Ruby annotations","sign-language":"Sign language","tactile-graphics":{"compact":"Tactile graphics included","descriptive":"Tactile graphics have been integrated to facilitate access to visual elements for blind people"},"tactile-objects":"Tactile 3D objects","text-to-speech-hinting":"Text-to-speech hinting provided","title":"Additional accessibility information","ultra-high-contrast-between-text-and-background":"Ultra high contrast between text and background","visible-page-numbering":"Visible page numbering","without-background-sounds":"Without background sounds"},"conformance":{"a":{"compact":"This publication meets minimum accessibility standards","descriptive":"The publication contains a conformance statement that it meets the EPUB Accessibility and WCAG 2 Level A standard"},"aa":{"compact":"This publication meets accepted accessibility standards","descriptive":"The publication contains a conformance statement that it meets the EPUB Accessibility and WCAG 2 Level AA standard"},"aaa":{"compact":"This publication exceeds accepted accessibility standards","descriptive":"The publication contains a conformance statement that it meets the EPUB Accessibility and WCAG 2 Level AAA standard"},"certifier":"The publication was certified by ","certifier-credentials":"The certifier's credential is ","details":{"certification-info":"The publication was certified on ","certifier-report":"For more information refer to the certifier's report","claim":"This publication claims to meet","epub-accessibility-1-0":"EPUB Accessibility 1.0","epub-accessibility-1-1":"EPUB Accessibility 1.1","level-a":"Level A","level-aa":"Level AA","level-aaa":"Level AAA","wcag-2-0":{"compact":"WCAG 2.0","descriptive":"Web Content Accessibility Guidelines (WCAG) 2.0"},"wcag-2-1":{"compact":"WCAG 2.1","descriptive":"Web Content Accessibility Guidelines (WCAG) 2.1"},"wcag-2-2":{"compact":"WCAG 2.2","descriptive":"Web Content Accessibility Guidelines (WCAG) 2.2"}},"details-title":"Detailed conformance information","no":"No information is available","title":"Conformance","unknown-standard":"Conformance to accepted standards for accessibility of this publication cannot be determined"},"hazards":{"flashing":{"compact":"Flashing content","descriptive":"The publication contains flashing content that can cause photosensitive seizures"},"flashing-none":{"compact":"No flashing hazards","descriptive":"The publication does not contain flashing content that can cause photosensitive seizures"},"flashing-unknown":{"compact":"Flashing hazards not known","descriptive":"The presence of flashing content that can cause photosensitive seizures could not be determined"},"motion":{"compact":"Motion simulation","descriptive":"The publication contains motion simulations that can cause motion sickness"},"motion-none":{"compact":"No motion simulation hazards","descriptive":"The publication does not contain motion simulations that can cause motion sickness"},"motion-unknown":{"compact":"Motion simulation hazards not known","descriptive":"The presence of motion simulations that can cause motion sickness could not be determined"},"no-metadata":"No information is available","none":{"compact":"No hazards","descriptive":"The publication contains no hazards"},"sound":{"compact":"Sounds","descriptive":"The publication contains sounds that can cause sensitivity issues"},"sound-none":{"compact":"No sound hazards","descriptive":"The publication does not contain sounds that can cause sensitivity issues"},"sound-unknown":{"compact":"Sound hazards not known","descriptive":"The presence of sounds that can cause sensitivity issues could not be determined"},"title":"Hazards","unknown":"The presence of hazards is unknown"},"legal-considerations":{"exempt":{"compact":"Claims an accessibility exemption in some jurisdictions","descriptive":"This publication claims an accessibility exemption in some jurisdictions"},"no-metadata":"No information is available","title":"Legal considerations"},"navigation":{"index":{"compact":"Index","descriptive":"Index with links to referenced entries"},"no-metadata":"No information is available","page-navigation":{"compact":"Go to page","descriptive":"Page list to go to pages from the print source version"},"structural":{"compact":"Headings","descriptive":"Elements such as headings, tables, etc for structured navigation"},"title":"Navigation","toc":{"compact":"Table of contents","descriptive":"Table of contents to all chapters of the text via links"}},"rich-content":{"accessible-chemistry-as-latex":{"compact":"Chemical formulas in LaTeX","descriptive":"Chemical formulas in accessible format (LaTeX)"},"accessible-chemistry-as-mathml":{"compact":"Chemical formulas in MathML","descriptive":"Chemical formulas in accessible format (MathML)"},"accessible-math-as-latex":{"compact":"Math as LaTeX","descriptive":"Math formulas in accessible format (LaTeX)"},"accessible-math-described":"Text descriptions of math are provided","closed-captions":{"compact":"Videos have closed captions","descriptive":"Videos included in publications have closed captions"},"extended-descriptions":"Information-rich images are described by extended descriptions","math-as-mathml":{"compact":"Math as MathML","descriptive":"Math formulas in accessible format (MathML)"},"open-captions":{"compact":"Videos have open captions","descriptive":"Videos included in publications have open captions"},"title":"Rich content","transcript":"Transcript(s) provided","unknown":"No information is available"},"ways-of-reading":{"nonvisual-reading":{"alt-text":{"compact":"Has alternative text","descriptive":"Has alternative text descriptions for images"},"no-metadata":"No information about nonvisual reading is available","none":{"compact":"Not readable in read aloud or dynamic braille","descriptive":"The content is not readable as read aloud speech or dynamic braille"},"not-fully":{"compact":"Not fully readable in read aloud or dynamic braille","descriptive":"Not all of the content will be readable as read aloud speech or dynamic braille"},"readable":{"compact":"Readable in read aloud or dynamic braille","descriptive":"All content can be read as read aloud speech or dynamic braille"}},"prerecorded-audio":{"complementary":{"compact":"Prerecorded audio clips","descriptive":"Prerecorded audio clips are embedded in the content"},"no-metadata":"No information about prerecorded audio is available","only":{"compact":"Prerecorded audio only","descriptive":"Audiobook with no text alternative"},"synchronized":{"compact":"Prerecorded audio synchronized with text","descriptive":"All the content is available as prerecorded audio synchronized with text"}},"title":"Ways of reading","visual-adjustments":{"modifiable":{"compact":"Appearance can be modified","descriptive":"Appearance of the text and page layout can be modified according to the capabilities of the reading system (font family and font size, spaces between paragraphs, sentences, words, and letters, as well as color of background and text)"},"unknown":"No information about appearance modifiability is available","unmodifiable":{"compact":"Appearance cannot be modified","descriptive":"Text and page layout cannot be modified as the reading experience is close to a print version, but reading systems can still provide zooming options"}}}}},"altIdentifier_one":"alternate identifier","altIdentifier_other":"alternate identifiers","artist_one":"artist","artist_other":"artists","author_one":"author","author_other":"authors","collection_one":"editorial collection","collection_other":"editorial collections","colorist_one":"colorist","colorist_other":"colorists","contributor_one":"contributor","contributor_other":"contributors","description":"description","duration":"duration","editor_one":"editor","editor_other":"editors","identifier_one":"identifier","identifier_other":"identifiers","illustrator_one":"illustrator","illustrator_other":"illustrators","imprint_one":"imprint","imprint_other":"imprints","inker_one":"inker","inker_other":"inkers","language_one":"language","language_other":"languages","letterer_one":"letterer","letterer_other":"letterers","modified":"modification date","narrator_one":"narrator","narrator_other":"narrators","numberOfPages":"print length","penciler_one":"penciler","penciler_other":"pencilers","published":"publication date","publisher_one":"publisher","publisher_other":"publishers","series_one":"series","series_other":"series","subject_one":"subject","subject_other":"subjects","subtitle":"subtitle","title":"title","translator_one":"translator","translator_other":"translators"}}`), si = {
publication: ii
}, ie = {
fr: () => import("./fr-C5HEel98.js"),
ar: () => import("./ar-DyHX_uy2.js"),
da: () => import("./da-Dct0PS3E.js"),
// 'el': () => import('@edrlab/thorium-locales/publication-metadata/el.json'),
// 'et': () => import('@edrlab/thorium-locales/publication-metadata/et.json'),
it: () => import("./it-DFOBoXGy.js"),
pt_PT: () => import("./pt_PT-Di3sVjze.js"),
sv: () => import("./sv-BfzAFsVN.js")
// 'tr': () => import('@edrlab/thorium-locales/publication-metadata/tr.json'),
// 'uk': () => import('@edrlab/thorium-locales/publication-metadata/uk.json')
}, se = si?.publication?.metadata?.accessibility?.["display-guide"] || {};
class Y {
constructor() {
this.currentLocaleCode = "en", this.locale = se, this.loadedLocales = {}, this.loadedLocales.en = se;
}
static getInstance() {
return Y.instance || (Y.instance = new Y()), Y.instance;
}
/**
* Loads a locale dynamically
* @param localeCode BCP 47 language code (e.g., 'en', 'fr')
* @returns Promise indicating if the locale was loaded successfully
*/
async loadLocale(t) {
if (!ee.includes(t))
return console.warn(`Locale '${t}' is not enabled`), !1;
if (t in this.loadedLocales)
return !0;
try {
if (!(t in ie))
return console.warn(`Locale file not found for: ${t}`), !1;
const r = (await ie[t]()).default?.publication?.metadata?.accessibility?.["display-guide"];
return r ? (this.loadedLocales[t] = r, !0) : (console.warn(`No accessibility strings found in locale ${t}`), !1);
} catch (e) {
return console.warn(`Failed to load locale ${t}:`, e), !1;
}
}
/**
* Registers a new locale or updates an existing one
* @param localeCode BCP 47 language code (e.g., 'en', 'fr-FR')
* @param localeData The locale data to register
*/
registerLocale(t, e) {
if (!t || typeof t != "string")
throw new Error("Locale code must be a non-empty string");
this.loadedLocales[t] = e;
}
/**
* Sets the current locale by language code, loading it dynamically if needed
* @param localeCode BCP 47 language code (e.g., 'en', 'fr')
* @returns Promise indicating if the locale was set successfully
*/
async setLocale(t) {
return t in this.loadedLocales || await this.loadLocale(t), t in this.loadedLocales ? (this.locale = this.loadedLocales[t], this.currentLocaleCode = t, !0) : (console.warn(`Locale '${t}' is not available`), !1);
}
/**
* Gets the current locale code (BCP 47)
*/
getCurrentLocale() {
return this.currentLocaleCode;
}
/**
* Gets a list of available locale codes
*/
getAvailableLocales() {
return ee;
}
getNestedValue(t, e) {
const i = e.split(".");
let r = t;
for (const n of i) {
if (r == null)
return;
r = r[n];
}
return r;
}
/**
* Gets a localized string by key
* @param key The key for the string to retrieve
* @returns The localized string as a [L10nString], or an empty string if not found
*/
getString(t) {
let e = this.getNestedValue(this.locale, t);
return e === void 0 && this.currentLocaleCode !== "en" && (e = this.getNestedValue(this.loadedLocales.en, t)), e !== void 0 ? typeof e == "string" ? { compact: e, descriptive: e } : e : (console.warn(`Missing localization for key: ${t}`), { compact: "", descriptive: "" });
}
}
const f = Y.getInstance();
var $ = /* @__PURE__ */ ((s) => (s.reflowable = "reflowable", s.fixed = "fixed", s.scrolled = "scrolled", s))($ || {}), ri = /* @__PURE__ */ ((s) => (s.Unknown = "unknown", s.Modifiable = "modifiable", s.Unmodifiable = "unmodifiable", s))(ri || {}), ni = /* @__PURE__ */ ((s) => (s.NoMetadata = "noMetadata", s.Readable = "readable", s.NotFully = "notFully", s.Unreadable = "unreadable", s))(ni || {}), ai = /* @__PURE__ */ ((s) => (s.NoMetadata = "noMetadata", s.Synchronized = "synchronized", s.AudioOnly = "audioOnly", s.AudioComplementary = "audioComplementary", s))(ai || {});
class kt {
constructor(t = "unknown", e = "noMetadata", i = !1, r = "noMetadata") {
this.id = "ways-of-reading.title", this.visualAdjustments = t, this.nonvisualReading = e, this.nonvisualReadingAltText = i, this.prerecordedAudio = r, this.shouldDisplay = !0;
const n = f.getString(this.id);
this.title = n.compact, this.statements = [];
const a = t === "modifiable" ? "ways-of-reading.visual-adjustments.modifiable" : t === "unmodifiable" ? "ways-of-reading.visual-adjustments.unmodifiable" : "ways-of-reading.visual-adjustments.unknown", o = f.getString(a);
this.statements.push({
id: a,
compactString: o.compact,
descriptiveString: o.descriptive
});
let h = "";
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");
const m = f.getString(h);
if (this.statements.push({
id: h,
compactString: m.compact,
descriptiveString: m.descriptive
}), i) {
const g = f.getString("ways-of-reading.nonvisual-reading.alt-text");
this.statements.push({
id: "ways-of-reading.nonvisual-reading.alt-text",
compactString: g.compact,
descriptiveString: g.descriptive
});
}
let p = "";
r === "synchronized" ? p = "ways-of-reading.prerecorded-audio.synchronized" : r === "audioOnly" ? p = "ways-of-reading.prerecorded-audio.only" : r === "audioComplementary" ? p = "ways-of-reading.prerecorded-audio.complementary" : r === "noMetadata" && (p = "ways-of-reading.prerecorded-audio.no-metadata");
const u = f.getString(p);
this.statements.push({
id: p,
compactString: u.compact,
descriptiveString: u.descriptive
});
}
static fromPublication(t) {
const e = t.metadata.accessibility ?? new _(), i = e.feature ?? [], r = t.metadata.layout === $.fixed, n = i.some((d) => d.value === A.DISPLAY_TRANSFORMABILITY.value) ? "modifiable" : r ? "unmodifiable" : "unknown", a = e.accessMode ?? [], o = e.accessModeSufficient ?? [], h = a.length > 0 && a.every((d) => d.value === R.TEXTUAL.value) || o.some((d) => {
const I = d.value;
return Array.isArray(I) ? I.every((B) => B === R.TEXTUAL.value) : I === R.TEXTUAL.value;
}), m = a.some((d) => d.value === R.TEXTUAL.value) || o.some((d) => {
const I = d.value;
return Array.isArray(I) ? I.some((B) => B === R.TEXTUAL.value) : I === R.TEXTUAL.value;
}), p = !(a.length === 0 && o.length === 0) && !a.some((d) => d.value === R.TEXTUAL.value) && !o.some((d) => {
const I = d.value;
return Array.isArray(I) ? I.some((B) => B === R.TEXTUAL.value) : I === R.TEXTUAL.value;
}), u = i.some((d) => [
A.LONG_DESCRIPTION.value,
A.ALTERNATIVE_TEXT.value,
A.DESCRIBED_MATH.value,
A.TRANSCRIPT.value
].includes(d.value)), g = h ? "readable" : m || u ? "notFully" : p ? "unreadable" : "noMetadata", v = u, C = i.some((d) => d.value === A.SYNCHRONIZED_AUDIO_TEXT.value) ? "synchronized" : o.some((d) => {
const I = d.value;
return Array.isArray(I) ? I.some((B) => B === R.AUDITORY.value) : I === R.AUDITORY.value;
}) ? "audioOnly" : a.some((d) => d.value === R.AUDITORY.value) ? "audioComplementary" : "noMetadata";
return new kt(
n,
g,
v,
C
);
}
}
class Dt {
constructor(t = !1, e = !1, i = !1, r = !1) {
this.id = "navigation.title", this.tableOfContents = t, this.index = e, this.headings = i, this.page = r, this.noMetadata = !t && !e && !i && !r;
const n = f.getString(this.id);
if (this.title = n.compact, this.shouldDisplay = !this.noMetadata, this.statements = [], t) {
const a = f.getString("navigation.toc");
this.statements.push({
id: "navigation.toc",
compactString: a.compact,
descriptiveString: a.descriptive
});
}
if (e) {
const a = f.getString("navigation.index");
this.statements.push({
id: "navigation.index",
compactString: a.compact,
descriptiveString: a.descriptive
});
}
if (i) {
const a = f.getString("navigation.structural");
this.statements.push({
id: "navigation.structural",
compactString: a.compact,
descriptiveString: a.descriptive
});
}
if (r) {
const a = f.getString("navigation.page-navigation");
this.statements.push({
id: "navigation.page-navigation",
compactString: a.compact,
descriptiveString: a.descriptive
});
}
if (this.statements.length === 0) {
const a = f.getString("navigation.no-metadata");
this.statements.push({
id: "navigation.no-metadata",
compactString: a.compact,
descriptiveString: a.descriptive
});
}
}
static fromPublication(t) {
const i = (t.metadata.accessibility ?? new _()).feature ?? [];
return new Dt(
i.some((r) => r.value === A.TABLE_OF_CONTENTS.value),
i.some((r) => r.value === A.INDEX.value),
i.some((r) => r.value === A.STRUCTURAL_NAVIGATION.value),
i.some((r) => r.value === A.PAGE_NAVIGATION.value)
);
}
}
var oi = /* @__PURE__ */ ((s) => (s.Math = "math", s.Chemistry = "chemistry", s.Music = "music", s.Diagram = "diagram", s.Chart = "chart", s.Graph = "graph", s.Table = "table", s.Image = "image", s))(oi || {});
class Ut {
constructor(t = !1, e = !1, i = !1, r = !1, n = !1, a = !1, o = !1, h = !1, m = !1) {
this.id = "rich-content.title", this.extendedAltTextDescriptions = t, this.mathFormula = e, this.mathFormulaAsMathML = i, this.mathFormulaAsLaTeX = r, this.chemicalFormulaAsMathML = n, this.chemicalFormulaAsLaTeX = a, this.closedCaptions = o, this.openCaptions = h, this.transcript = m, this.noMetadata = !t && !e && !i && !r && !n && !a && !o && !h && !m, this.shouldDisplay = !this.noMetadata;
const p = f.getString(this.id);
if (this.title = p.compact, this.statements = [], t) {
const u = f.getString("rich-content.extended-descriptions");
this.statements.push({
id: "rich-content.extended-descriptions",
compactString: u.compact,
descriptiveString: u.descriptive
});
}
if (e) {
const u = f.getString("rich-content.accessible-math-described");
this.statements.push({
id: "rich-content.accessible-math-described",
compactString: u.compact,
descriptiveString: u.descriptive
});
}
if (i) {
const u = f.getString("rich-content.math-as-mathml");
this.statements.push({
id: "rich-content.math-as-mathml",
compactString: u.compact,
descriptiveString: u.descriptive
});
}
if (r) {
const u = f.getString("rich-content.accessible-math-as-latex");
this.statements.push({
id: "rich-content.accessible-math-as-latex",
compactString: u.compact,
descriptiveString: u.descriptive
});
}
if (n) {
const u = f.getString("rich-content.accessible-chemistry-as-mathml");
this.statements.push({
id: "rich-content.accessible-chemistry-as-mathml",
compactString: u.compact,
descriptiveString: u.descriptive
});
}
if (a) {
const u = f.getString("rich-content.accessible-chemistry-as-latex");
this.statements.push({
id: "rich-content.accessible-chemistry-as-latex",
compactString: u.compact,
descriptiveString: u.descriptive
});
}
if (o) {
const u = f.getString("rich-content.closed-captions");
this.statements.push({
id: "rich-content.closed-captions",
compactString: u.compact,
descriptiveString: u.descriptive
});
}
if (h) {
const u = f.getString("rich-content.open-captions");
this.statements.push({
id: "rich-content.open-captions",
compactString: u.compact,
descriptiveString: u.descriptive
});
}
if (m) {
const u = f.getString("rich-content.transcript");
this.statements.push({
id: "rich-content.transcript",
compactString: u.compact,
descriptiveString: u.descriptive
});
}
if (this.statements.length === 0) {
const u = f.getString("rich-content.unknown");
this.statements.push({
id: "rich-content.unknown",
compactString: u.compact,
descriptiveString: u.descriptive
});
}
}
static fromPublication(t) {
const i = (t.metadata.accessibility ?? new _()).feature ?? [];
return new Ut(
i.some((r) => r.value === A.LONG_DESCRIPTION.value),
i.some((r) => r.value === A.DESCRIBED_MATH.value),
i.some((r) => r.value === A.MATH_ML.value),
i.some((r) => r.value === A.LATEX.value),
i.some((r) => r.value === A.MATH_ML_CHEMISTRY.value),
i.some((r) => r.value === A.LATEX_CHEMISTRY.value),
i.some((r) => r.value === A.CLOSED_CAPTIONS.value),
i.some((r) => r.value === A.OPEN_CAPTIONS.value),
i.some((r) => r.value === A.TRANSCRIPT.value)
);
}
}
class Mt {
constructor(t = !1, e = !1, i = !1, r = !1, n = !1, a = !1, o = !1, h = !1, m = !1, p = !1, u = !1, g = !1, v = !1) {
this.id = "additional-accessibility-information.title", this.pageBreakMarkers = t, this.aria = e, this.audioDescriptions = i, this.braille = r, this.rubyAnnotations = n, this.fullRubyAnnotations = a, this.highAudioContrast = o, this.highDisplayContrast = h, this.largePrint = m, this.signLanguage = p, this.tactileGraphics = u, this.tactileObjects = g, this.textToSpeechHinting = v, this.noMetadata = !t && !e && !i && !r && !n && !a && !o && !h && !m && !p && !u && !g && !v, this.shouldDisplay = !this.noMetadata;
const C = f.getString(this.id);
if (this.title = C.compact, this.statements = [], t) {
const d = f.getString("additional-accessibility-information.page-breaks");
this.statements.push({
id: "additional-accessibility-information.page-breaks",
compactString: d.compact,
descriptiveString: d.descriptive
});
}
if (e) {
const d = f.getString("additional-accessibility-information.aria");
this.statements.push({
id: "additional-accessibility-information.aria",
compactString: d.compact,
descriptiveString: d.descriptive
});
}
if (i) {
const d = f.getString("additional-accessibility-information.audio-descriptions");
this.statements.push({
id: "additional-accessibility-information.audio-descriptions",
compactString: d.compact,
descriptiveString: d.descriptive
});
}
if (r) {
const d = f.getString("additional-accessibility-information.braille");
this.statements.push({
id: "additional-accessibility-information.braille",
compactString: d.compact,
descriptiveString: d.descriptive
});
}
if (n) {
const d = f.getString("additional-accessibility-information.ruby-annotations");
this.statements.push({
id: "additional-accessibility-information.ruby-annotations",
compactString: d.compact,
descriptiveString: d.descriptive
});
}
if (a) {
const d = f.getString("additional-accessibility-information.full-ruby-annotations");
this.statements.push({
id: "additional-accessibility-information.full-ruby-annotations",
compactString: d.compact,
descriptiveString: d.descriptive
});
}
if (o) {
const d = f.getString("additional-accessibility-information.high-contrast-between-foreground-and-background-audio");
this.statements.push({
id: "additional-accessibility-information.high-contrast-between-foreground-and-background-audio",
compactString: d.compact,
descriptiveString: d.descriptive
});
}
if (h) {
const d = f.getString("additional-accessibility-information.high-contrast-between-text-and-background");
this.statements.push({
id: "additional-accessibility-information.high-contrast-between-text-and-background",
compactString: d.compact,
descriptiveString: d.descriptive
});
}
if (m) {
const d = f.getString("additional-accessibility-information.large-print");
this.statements.push({
id: "additional-accessibility-information.large-print",
compactString: d.compact,
descriptiveString: d.descriptive
});
}
if (p) {
const d = f.getString("additional-accessibility-information.sign-language");
this.statements.push({
id: "additional-accessibility-information.sign-language",
compactString: d.compact,
descriptiveString: d.descriptive
});
}
if (u) {
const d = f.getString("additional-accessibility-information.tactile-graphics");
this.statements.push({
id: "additional-accessibility-information.tactile-graphics",
compactString: d.compact,
descriptiveString: d.descriptive
});
}
if (g) {
const d = f.getString("additional-accessibility-information.tactile-objects");
this.statements.push({
id: "additional-accessibility-information.tactile-objects",
compactString: d.compact,
descriptiveString: d.descriptive
});
}
if (v) {
const d = f.getString("additional-accessibility-information.text-to-speech-hinting");
this.statements.push({
id: "additional-accessibility-information.text-to-speech-hinting",
compactString: d.compact,
descriptiveString: d.descriptive
});
}
}
static fromPublication(t) {
const i = (t.metadata.accessibility ?? new _()).feature ?? [];
return new Mt(
i.some((r) => r.value === A.PAGE_BREAK_MARKERS.value || r.value === A.PRINT_PAGE_NUMBERS.value),
i.some((r) => r.value === A.ARIA.value),
i.some((r) => r.value === A.AUDIO_DESCRIPTION.value),
i.some((r) => r.value === A.BRAILLE.value),
i.some((r) => r.value === A.RUBY_ANNOTATIONS.value),
i.some((r) => r.value === A.FULL_RUBY_ANNOTATIONS.value),
i.some((r) => r.value === A.HIGH_CONTRAST_AUDIO.value),
i.some((r) => r.value === A.HIGH_CONTRAST_DISPLAY.value),
i.some((r) => r.value === A.LARGE_PRINT.value),
i.some((r) => r.value === A.SIGN_LANGUAGE.value),
i.some((r) => r.value === A.TACTILE_GRAPHIC.value),
i.some((r) => r.value === A.TACTILE_OBJECT.value),
i.some((r) => r.value === A.TTS_MARKUP.value)
);
}
}
var ci = /* @__PURE__ */ ((s) => (s.yes = "yes", s.no = "no", s.unknown = "unknown", s.noMetadata = "noMetadata", s))(ci || {});
class Bt {
constructor(t = "unknown", e = "unknown", i = "unknown") {
this.id = "hazards.title", this.flashing = t, this.motion = e, this.sound = i;
const r = f.getString(this.id);
if (this.title = r.compact, this.noMetadata = t === "noMetadata" && e === "noMetadata" && i === "noMetadata", this.noHazards = t === "no" && e === "no" && i === "no", this.unknown = t === "unknown" && e === "unknown" && i === "unknown", this.shouldDisplay = !this.noMetadata, this.statements = [], this.noHazards) {
const n = f.getString("hazards.none");
this.statements.push({
id: "hazards.none",
compactString: n.compact,
descriptiveString: n.descriptive
});
} else if (this.unknown) {
const n = f.getString("hazards.unknown");
this.statements.push({
id: "hazards.unknown",
compactString: n.compact,
descriptiveString: n.descriptive
});
} else if (this.noMetadata) {
const n = f.getString("hazards.no-metadata");
this.statements.push({
id: "hazards.no-metadata",
compactString: n.compact,
descriptiveString: n.descriptive
});
} else {
if (t === "yes") {
const n = f.getString("hazards.flashing");
this.statements.push({
id: "hazards.flashing",
compactString: n.compact,
descriptiveString: n.descriptive
});
} else if (t === "unknown") {
const n = f.getString("hazards.flashing-unknown");
this.statements.push({
id: "hazards.flashing-unknown",
compactString: n.compact,
descriptiveString: n.descriptive
});
} else if (t === "no") {
const n = f.getString("hazards.flashing-none");
this.statements.push({
id: "hazards.flashing-none",
compactString: n.compact,
descriptiveString: n.descriptive
});
}
if (e === "yes") {
const n = f.getString("hazards.motion");
this.statements.push({
id: "hazards.motion",
compactString: n.compact,
descriptiveString: n.descriptive
});
} else if (e === "unknown") {
const n = f.getString("hazards.motion-unknown");
this.statements.push({
id: "hazards.motion-unknown",
compactString: n.compact,
descriptiveString: n.descriptive
});
} else if (e === "no") {
const n = f.getString("hazards.motion-none");
this.statements.push({
id: "hazards.motion-none",
compactString: n.compact,
descriptiveString: n.descriptive
});
}
if (i === "yes") {
const n = f.getString("hazards.sound");
this.statements.push({
id: "hazards.sound",
compactString: n.compact,
descriptiveString: n.descriptive
});
} else if (i === "unknown") {
const n = f.getString("hazards.sound-unknown");
this.statements.push({
id: "hazards.sound-unknown",
compactString: n.compact,
descriptiveString: n.descriptive
});
} else if (i === "no") {
const n = f.getString("hazards.sound-none");
this.statements.push({
id: "hazards.sound-none",
compactString: n.compact,
descriptiveString: n.descriptive
});
}
}
}
static fromPublication(t) {
const e = t.metadata.accessibility?.hazard ?? [];
let i;
e.some((o) => o.value === P.NONE.value) ? i = "no" : e.some((o) => o.value === P.UNKNOWN.value) ? i = "unknown" : i = "noMetadata";
let r;
e.some((o) => o.value === P.FLASHING.value) ? r = "yes" : e.some((o) => o.value === P.NO_FLASHING_HAZARD.value) ? r = "no" : e.some((o) => o.value === P.UNKNOWN_FLASHING_HAZARD.value) ? r = "unknown" : r = i;
let n;
e.some((o) => o.value === P.MOTION_SIMULATION.value) ? n = "yes" : e.some((o) => o.value === P.NO_MOTION_SIMULATION_HAZARD.value) ? n = "no" : e.some((o) => o.value === P.UNKNOWN_MOTION_SIMULATION_HAZARD.value) ? n = "unknown" : n = i;
let a;
return e.some((o) => o.value === P.SOUND.value) ? a = "yes" : e.some((o) => o.value === P.NO_SOUND_HAZARD.value) ? a = "no" : e.some((o) => o.value === P.UNKNOWN_SOUND_HAZARD.value) ? a = "unknown" : a = i, new Bt(r, n, a);
}
}
class Gt {
constructor(t = []) {
this.id = "conformance.title", this.profiles = t, this.shouldDisplay = !0;
const e = f.getString(this.id);
if (this.title = e.compact, this.statements = [], t.length === 0) {
const i = f.getString("conformance.no");
this.statements.push({
id: "conformance.no",
compactString: i.compact,
descriptiveString: i.descriptive
});
return;
}
if (t.some((i) => i.isWCAGLevelAAA)) {
const i = f.getString("conformance.aaa");
this.statements.push({
id: "conformance.aaa",
compactString: i.compact,
descriptiveString: i.descriptive
});
} else if (t.some((i) => i.isWCAGLevelAA)) {
const i = f.getString("conformance.aa");
this.statements.push({
id: "conformance.aa",
compactString: i.compact,
descriptiveString: i.descriptive
});
} else if (t.some((i) => i.isWCAGLevelA)) {
const i = f.getString("conformance.a");
this.statements.push({
id: "conformance.a",
compactString: i.compact,
descriptiveString: i.descriptive
});
} else {
const i = f.getString("conformance.unknown-standard");
this.statements.push({
id: "conformance.unknown-standard",
compactString: i.compact,
descriptiveString: i.descriptive
});
}
}
static fromPublication(t) {
const e = t.metadata.accessibility?.conformsTo ?? [];
return new Gt(e);
}
}
class Wt {
constructor(t = !1) {
this.id = "legal-considerations.title", this.exemption = t, this.shouldDisplay = this.exemption;
const e = f.getString(this.id);
if (this.title = e.compact, this.statements = [], t) {
const i = f.getString("legal-considerations.exempt");
this.statements.push({
id: "legal-considerations.exempt",
compactString: i.compact,
descriptiveString: i.descriptive
});
} else {
const i = f.getString("legal-considerations.no-metadata");
this.statements.push({
id: "legal-considerations.no-metadata",
compactString: i.compact,
descriptiveString: i.descriptive
});
}
}
static fromPublication(t) {
const i = (t.metadata.accessibility?.exemption ?? []).length > 0;
return new Wt(i);
}
}
class Ht {
constructor(t) {
this.id = "accessibility-summary.title", this.shouldDisplay = !0;
const e = f.getString(this.id);
this.title = e.compact;
const i = t.metadata.accessibility?.summary;
if (this.statements = [], this.shouldDisplay && i)
this.statements.push({
id: "accessibility-summary.summary",
compactString: i,
descriptiveString: i
});
else {
const r = f.getString("accessibility-summary.no-metadata");
this.statements.push({
id: "ac