r2-navigator-js
Version:
Readium 2 'navigator' for NodeJS (TypeScript)
90 lines • 56.1 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TTS_POPUP_DIALOG_CLASS = exports.TTS_ID_SPEAKING_DOC_ELEMENT = exports.TTS_NAV_BUTTON_CLASS = exports.TTS_ID_CONTAINER = exports.TTS_CLASS_UTTERANCE_HEADING5 = exports.TTS_CLASS_UTTERANCE_HEADING4 = exports.TTS_CLASS_UTTERANCE_HEADING3 = exports.TTS_CLASS_UTTERANCE_HEADING2 = exports.TTS_CLASS_UTTERANCE_HEADING1 = exports.TTS_CLASS_UTTERANCE = exports.TTS_ID_ACTIVE_UTTERANCE = exports.TTS_ID_ACTIVE_WORD = exports.TTS_ID_SLIDER = exports.TTS_ID_NEXT = exports.TTS_ID_PREVIOUS = exports.TTS_CLASS_STOPPED = exports.TTS_CLASS_PLAYING = exports.TTS_CLASS_PAUSED = exports.TTS_CLASS_IS_ACTIVE = exports.TTS_CLASS_THEME1 = exports.mediaOverlaysCssStyles = exports.R2_MO_CLASS_STOPPED = exports.R2_MO_CLASS_PAUSED = exports.R2_MO_CLASS_PLAYING = exports.R2_MO_CLASS_ACTIVE_PLAYBACK = exports.R2_MO_CLASS_ACTIVE = exports.footnotesCssStyles = exports.CSS_CLASS_NO_FOCUS_OUTLINE = exports.ROOT_CLASS_KEYBOARD_INTERACT = exports.POPUP_DIALOG_CLASS_COLLAPSE = exports.POPUP_DIALOG_CLASS = exports.POPOUTIMAGE_RESET_ID = exports.POPOUTIMAGE_PLUS_ID = exports.POPOUTIMAGE_MINUS_ID = exports.POPOUTIMAGE_CONTROLS_ID = exports.POPOUTIMAGE_CLOSE_ID = exports.POPOUTIMAGE_CONTAINER_ID = exports.FOOTNOTE_FORCE_SHOW = exports.FOOTNOTES_CLOSE_BUTTON_CLASS = exports.FOOTNOTES_CONTAINER_CLASS = exports.ROOT_CLASS_NO_FOOTNOTES = exports.ROOT_CLASS_FIXED_LAYOUT = exports.ROOT_CLASS_MATHJAX = exports.ROOT_CLASS_REDUCE_MOTION = exports.LINK_TARGET_CLASS = exports.SKIP_LINK_ID = exports.ZERO_TRANSFORM_CLASS = exports.HIDE_CURSOR_CLASS = exports.CLASS_PAGINATED = exports.WebViewSlotEnum = void 0;
exports.audioCssStyles = exports.AUDIO_FORWARD_ID = exports.AUDIO_REWIND_ID = exports.AUDIO_NEXT_ID = exports.AUDIO_PREVIOUS_ID = exports.AUDIO_PLAYPAUSE_ID = exports.AUDIO_RATE_ID = exports.AUDIO_PERCENT_ID = exports.AUDIO_TIME_ID = exports.AUDIO_SLIDER_ID = exports.AUDIO_TITLE_ID = exports.AUDIO_COVER_ID = exports.AUDIO_CONTROLS_ID = exports.AUDIO_SECTION_ID = exports.AUDIO_BODY_ID = exports.AUDIO_ID = exports.AUDIO_PROGRESS_CLASS = exports.AUDIO_BUFFER_CANVAS_ID = exports.readPosCssStyles = exports.readPosCssStylesAttr4 = exports.readPosCssStylesAttr3 = exports.readPosCssStylesAttr2 = exports.readPosCssStylesAttr1 = exports.scrollBarCssStyles = exports.selectionCssStyles = exports.targetCssStyles = exports.focusCssStyles = exports.visibilityMaskCssStyles = exports.ROOT_CLASS_INVISIBLE_MASK_REMOVED = exports.ROOT_CLASS_INVISIBLE_MASK = exports.ttsCssStyles = void 0;
var WebViewSlotEnum;
(function (WebViewSlotEnum) {
WebViewSlotEnum["center"] = "center";
WebViewSlotEnum["left"] = "left";
WebViewSlotEnum["right"] = "right";
})(WebViewSlotEnum || (exports.WebViewSlotEnum = WebViewSlotEnum = {}));
exports.CLASS_PAGINATED = "r2-css-paginated";
exports.HIDE_CURSOR_CLASS = "r2-hideCursor";
exports.ZERO_TRANSFORM_CLASS = "r2-zeroTransform";
exports.SKIP_LINK_ID = "r2-skip-link";
exports.LINK_TARGET_CLASS = "r2-link-target";
exports.ROOT_CLASS_REDUCE_MOTION = "r2-reduce-motion";
exports.ROOT_CLASS_MATHJAX = "r2-mathjax";
exports.ROOT_CLASS_FIXED_LAYOUT = "r2-fixed-layout";
exports.ROOT_CLASS_NO_FOOTNOTES = "r2-no-popup-foonotes";
exports.FOOTNOTES_CONTAINER_CLASS = "r2-footnote-container";
exports.FOOTNOTES_CLOSE_BUTTON_CLASS = "r2-footnote-close";
exports.FOOTNOTE_FORCE_SHOW = "r2-footnote-force-show";
exports.POPOUTIMAGE_CONTAINER_ID = "r2-popoutimage-container-id";
exports.POPOUTIMAGE_CLOSE_ID = "r2-popoutimage-close-id";
exports.POPOUTIMAGE_CONTROLS_ID = "r2-popoutimage-controls-id";
exports.POPOUTIMAGE_MINUS_ID = "r2-popoutimage-minus-id";
exports.POPOUTIMAGE_PLUS_ID = "r2-popoutimage-plus-id";
exports.POPOUTIMAGE_RESET_ID = "r2-popoutimage-reset-id";
exports.POPUP_DIALOG_CLASS = "r2-popup-dialog";
exports.POPUP_DIALOG_CLASS_COLLAPSE = "r2-popup-dialog-collapse";
exports.ROOT_CLASS_KEYBOARD_INTERACT = "r2-keyboard-interact";
exports.CSS_CLASS_NO_FOCUS_OUTLINE = "r2-no-focus-outline";
exports.footnotesCssStyles = "\n@namespace epub \"http://www.idpf.org/2007/ops\";\n\n:root:not(.".concat(exports.ROOT_CLASS_NO_FOOTNOTES, ") aside[epub|type~=\"footnote\"]:not(.").concat(exports.FOOTNOTE_FORCE_SHOW, "),\n:root:not(.").concat(exports.ROOT_CLASS_NO_FOOTNOTES, ") aside[epub|type~=\"note\"]:not(.").concat(exports.FOOTNOTE_FORCE_SHOW, "),\n:root:not(.").concat(exports.ROOT_CLASS_NO_FOOTNOTES, ") aside[epub|type~=\"endnote\"]:not(.").concat(exports.FOOTNOTE_FORCE_SHOW, "),\n:root:not(.").concat(exports.ROOT_CLASS_NO_FOOTNOTES, ") aside[epub|type~=\"rearnote\"]:not(.").concat(exports.FOOTNOTE_FORCE_SHOW, ") {\n display: none;\n}\n\n/*\n:root.").concat(exports.POPUP_DIALOG_CLASS, " {\n overflow: hidden !important;\n}\n*/\n\n:root[style] dialog#").concat(exports.POPUP_DIALOG_CLASS, ":not(.").concat(exports.POPUP_DIALOG_CLASS_COLLAPSE, ")::backdrop,\n:root dialog#").concat(exports.POPUP_DIALOG_CLASS, ":not(.").concat(exports.POPUP_DIALOG_CLASS_COLLAPSE, ")::backdrop {\n background: rgba(0, 0, 0, 0.3) !important;\n}\n:root[style*=\"readium-night-on\"] dialog#").concat(exports.POPUP_DIALOG_CLASS, ":not(.").concat(exports.POPUP_DIALOG_CLASS_COLLAPSE, ")::backdrop {\n background: rgba(0, 0, 0, 0.65) !important;\n}\n:root[style] dialog#").concat(exports.POPUP_DIALOG_CLASS, ".").concat(exports.POPUP_DIALOG_CLASS_COLLAPSE, "::backdrop,\n:root dialog#").concat(exports.POPUP_DIALOG_CLASS, ".").concat(exports.POPUP_DIALOG_CLASS_COLLAPSE, "::backdrop {\n background: transparent !important;\n}\n\n:root[style] dialog#").concat(exports.POPUP_DIALOG_CLASS, ",\n:root dialog#").concat(exports.POPUP_DIALOG_CLASS, " {\n -webkit-writing-mode: horizontal-tb;\n\n z-index: 3;\n\n position: fixed;\n\n width: 90%;\n max-width: 40em;\n\n top: auto;\n bottom: 1em;\n height: 7em;\n\n margin: 0 auto;\n padding: 0;\n\n border-radius: 0.3em;\n border-width: 1px;\n\n background: white !important;\n border-color: black !important;\n\n box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);\n\n display: grid;\n grid-column-gap: 0px;\n grid-row-gap: 0px;\n\n grid-template-columns: 1.5em auto 1.5em;\n grid-template-rows: auto 1.5em;\n}\n:root[style*=\"readium-night-on\"] dialog#").concat(exports.POPUP_DIALOG_CLASS, " {\n background: #333333 !important;\n border-color: white !important;\n}\n:root[style*=\"readium-sepia-on\"] dialog#").concat(exports.POPUP_DIALOG_CLASS, " {\n background: var(--RS__backgroundColor) !important;\n}\n:root[style*=\"--USER__backgroundColor\"] dialog#").concat(exports.POPUP_DIALOG_CLASS, " {\n background: var(--USER__backgroundColor) !important;\n}\n\n:root[style] dialog#").concat(exports.POPUP_DIALOG_CLASS, ".").concat(exports.POPUP_DIALOG_CLASS_COLLAPSE, ",\n:root dialog#").concat(exports.POPUP_DIALOG_CLASS, ".").concat(exports.POPUP_DIALOG_CLASS_COLLAPSE, " {\n top: auto;\n height: 1px;\n}\n\n:root[style] div#").concat(exports.POPOUTIMAGE_CONTAINER_ID, ",\n:root div#").concat(exports.POPOUTIMAGE_CONTAINER_ID, ",\n:root[style].").concat(exports.ROOT_CLASS_KEYBOARD_INTERACT, " div#").concat(exports.POPOUTIMAGE_CONTAINER_ID, ",\n:root.").concat(exports.ROOT_CLASS_KEYBOARD_INTERACT, " div#").concat(exports.POPOUTIMAGE_CONTAINER_ID, " {\n grid-column-start: 1;\n grid-column-end: 4;\n grid-row-start: 1;\n grid-row-end: 3;\n\n /*\n outline-color: magenta !important;\n outline-style: dotted !important;\n outline-width: 4px !important;\n outline-offset: -4px !important;\n */\n\n padding: 0;\n margin: 0;\n\n box-sizing: border-box;\n\n cursor: pointer;\n\n /* position: relative; */\n\n display: flex;\n /* no need for vertical / horizontal control, as we use margin:auto\n justify-content: center;\n align-items: center;\n */\n\n /* FXL, just in case the top-level transform scale isn't applied */\n overflow-y: auto;\n overflow-x: auto;\n}\n\n@keyframes readium2ElectronAnimation_IMG_OUTLINE {\n 0% {\n outline-offset: -0.4em;\n }\n 25% {\n outline-offset: 0em;\n }\n 50% {\n outline-offset: 0.8em;\n }\n 75% {\n outline-offset: 0em;\n }\n 100% {\n outline-offset: -0.4em;\n }\n}\n\n/*\n:root[style].").concat(exports.ROOT_CLASS_KEYBOARD_INTERACT, " img[data-").concat(exports.POPOUTIMAGE_CONTAINER_ID, "],\n:root.").concat(exports.ROOT_CLASS_KEYBOARD_INTERACT, " img[data-").concat(exports.POPOUTIMAGE_CONTAINER_ID, "],\n:root[style].").concat(exports.ROOT_CLASS_KEYBOARD_INTERACT, " image[data-").concat(exports.POPOUTIMAGE_CONTAINER_ID, "],\n:root.").concat(exports.ROOT_CLASS_KEYBOARD_INTERACT, " image[data-").concat(exports.POPOUTIMAGE_CONTAINER_ID, "],\n:root[style].").concat(exports.ROOT_CLASS_KEYBOARD_INTERACT, " svg[data-").concat(exports.POPOUTIMAGE_CONTAINER_ID, "],\n:root.").concat(exports.ROOT_CLASS_KEYBOARD_INTERACT, " svg[data-").concat(exports.POPOUTIMAGE_CONTAINER_ID, "]\n*/\n\n:root[style] img[data-").concat(exports.POPOUTIMAGE_CONTAINER_ID, "],\n:root img[data-").concat(exports.POPOUTIMAGE_CONTAINER_ID, "],\n:root[style] image[data-").concat(exports.POPOUTIMAGE_CONTAINER_ID, "],\n:root image[data-").concat(exports.POPOUTIMAGE_CONTAINER_ID, "],\n:root[style] svg[data-").concat(exports.POPOUTIMAGE_CONTAINER_ID, "],\n:root svg[data-").concat(exports.POPOUTIMAGE_CONTAINER_ID, "]\n{\n outline-color: magenta !important;\n outline-style: solid !important;\n outline-width: 0.2em !important;\n /* outline-offset: 2px !important; */\n\n cursor: pointer !important;\n\n animation-name: readium2ElectronAnimation_IMG_OUTLINE;\n animation-iteration-count: infinite;\n animation-duration: 1s;\n animation-delay: 0s;\n animation-fill-mode: forwards;\n animation-timing-function: linear;\n}\n\n/*\n:root[style*=\"readium-night-on\"]\n*/\n:root[style] div#").concat(exports.POPOUTIMAGE_CONTAINER_ID, " #").concat(exports.POPOUTIMAGE_CONTROLS_ID, ",\n:root div#").concat(exports.POPOUTIMAGE_CONTAINER_ID, " #").concat(exports.POPOUTIMAGE_CONTROLS_ID, " {\n border: 1px solid var(--RS__backgroundColor) !important;\n background: transparent !important;\n color: var(--RS__textColor) !important;\n padding: 4px;\n margin: 0;\n border-radius: 16px;\n position: absolute;\n top: 8px;\n left: 8px;\n width: auto;\n height: auto;\n}\n:root[style]:not([style*=\"--USER__\"]) div#").concat(exports.POPOUTIMAGE_CONTAINER_ID, " #").concat(exports.POPOUTIMAGE_CONTROLS_ID, ",\n:root:not([style]) div#").concat(exports.POPOUTIMAGE_CONTAINER_ID, " #").concat(exports.POPOUTIMAGE_CONTROLS_ID, " {\n border: 1px solid black !important;\n background: white !important;\n color: black !important;\n}\n\n:root[style] div#").concat(exports.POPOUTIMAGE_CONTAINER_ID, " #").concat(exports.POPOUTIMAGE_CLOSE_ID, ",\n:root div#").concat(exports.POPOUTIMAGE_CONTAINER_ID, " #").concat(exports.POPOUTIMAGE_CLOSE_ID, " {\n position: absolute;\n top: 8px;\n right: 8px;\n}\n:root[style] div#").concat(exports.POPOUTIMAGE_CONTAINER_ID, " button,\n:root div#").concat(exports.POPOUTIMAGE_CONTAINER_ID, " button {\n border: 2px solid var(--RS__textColor) !important;\n background: var(--RS__backgroundColor) !important;\n color: var(--RS__textColor) !important;\n font-family: Arial !important;\n font-size: 20px !important;\n font-weight: bold;\n user-select: none;\n padding: 8px;\n margin: 0;\n border-radius: 16px;\n width: 36px;\n display: inline-block;\n cursor: pointer !important;\n}\n:root[style]:not([style*=\"--USER__\"]) div#").concat(exports.POPOUTIMAGE_CONTAINER_ID, " button,\n:root:not([style]) div#").concat(exports.POPOUTIMAGE_CONTAINER_ID, " button {\n border: 2px solid black !important;\n background: white !important;\n color: black !important;\n}\n\n:root[style] div#").concat(exports.POPOUTIMAGE_CONTAINER_ID, " > img,\n:root div#").concat(exports.POPOUTIMAGE_CONTAINER_ID, " > img {\n\n /*\n outline-color: red !important;\n outline-style: dashed !important;\n outline-width: 2px !important;\n outline-offset: -2px !important;\n */\n\n transform-origin: 0px 0px;\n\n box-sizing: border-box;\n /* border: 2px solid #333333; */\n\n cursor: move !important;\n\n margin: 0 !important;\n object-fit: contain !important;\n position: relative !important;\n max-height: 100% !important;\n max-width: 100% !important;\n width: 100% !important;\n height: 100% !important;\n\n /*\n margin: auto !important;\n object-fit: cover !important;\n position: relative !important;\n max-height: 100% !important;\n max-width: 100% !important;\n width: auto !important;\n height: auto !important;\n */\n\n /* vertical centering breaks image height\n margin: auto !important;\n position: absolute !important;\n max-height: none !important;\n max-width: 100% !important;\n width: 100% !important;\n height: auto !important;\n\n top: 0 !important;\n bottom: 0 !important;\n */\n\n /* this works with position:relative in the parent (no need for flex)\n max-height: 100% !important;\n max-width: 100% !important;\n width: auto !important;\n height: auto !important;\n\n position: absolute !important;\n top: 0 !important;\n bottom: 0 !important;\n left: 0 !important;\n right: 0 !important;\n margin: auto !important;\n */\n}\n\n:root[style] .").concat(exports.FOOTNOTES_CONTAINER_CLASS, ",\n:root .").concat(exports.FOOTNOTES_CONTAINER_CLASS, " {\n overflow: auto;\n\n grid-column-start: 1;\n grid-column-end: 4;\n grid-row-start: 1;\n grid-row-end: 3;\n\n padding: 0.3em;\n margin: 0.2em;\n}\n\n:root[style] .").concat(exports.FOOTNOTES_CONTAINER_CLASS, " > *,\n:root .").concat(exports.FOOTNOTES_CONTAINER_CLASS, " > * {\n margin: 0 !important;\n padding: 0 !important;\n width: 100%;\n}\n\n/*\n:root[style] .").concat(exports.FOOTNOTES_CLOSE_BUTTON_CLASS, ",\n:root .").concat(exports.FOOTNOTES_CLOSE_BUTTON_CLASS, " {\n border: 1px solid black;\n background: white !important;\n color: black !important;\n\n border-radius: 0.8em;\n position: absolute;\n top: -0.9em;\n left: -0.9em;\n width: 1.8em;\n height: 1.8em;\n font-size: 1em !important;\n font-family: Arial !important;\n cursor: pointer;\n}\n:root[style*=\"readium-night-on\"] .").concat(exports.FOOTNOTES_CLOSE_BUTTON_CLASS, " {\n border: 1px solid white !important;\n background: black !important;\n color: white !important;\n}\n*/\n");
exports.R2_MO_CLASS_ACTIVE = "r2-mo-active";
exports.R2_MO_CLASS_ACTIVE_PLAYBACK = "r2-mo-active-playback";
exports.R2_MO_CLASS_PLAYING = "r2-mo-playing";
exports.R2_MO_CLASS_PAUSED = "r2-mo-paused";
exports.R2_MO_CLASS_STOPPED = "r2-mo-stopped";
exports.mediaOverlaysCssStyles = "\n:root[style] .".concat(exports.R2_MO_CLASS_ACTIVE, ",\n:root .").concat(exports.R2_MO_CLASS_ACTIVE, " {\n background-color: yellow !important;\n color: black !important;\n}\n:root[style*=\"readium-night-on\"] .").concat(exports.R2_MO_CLASS_ACTIVE, " {\n background-color: #333333 !important;\n color: white !important;\n}\n:root[style*=\"readium-sepia-on\"] .").concat(exports.R2_MO_CLASS_ACTIVE, " {\n background-color: silver !important;\n color: black !important;\n}\n");
exports.TTS_CLASS_THEME1 = "r2-tts-theme1";
exports.TTS_CLASS_IS_ACTIVE = "r2-tts-isPlaying";
exports.TTS_CLASS_PAUSED = "r2-tts-paused";
exports.TTS_CLASS_PLAYING = "r2-tts-playing";
exports.TTS_CLASS_STOPPED = "r2-tts-stopped";
exports.TTS_ID_PREVIOUS = "r2-tts-previous";
exports.TTS_ID_NEXT = "r2-tts-next";
exports.TTS_ID_SLIDER = "r2-tts-slider";
exports.TTS_ID_ACTIVE_WORD = "r2-tts-active-word";
exports.TTS_ID_ACTIVE_UTTERANCE = "r2-tts-active-utterance";
exports.TTS_CLASS_UTTERANCE = "r2-tts-utterance";
exports.TTS_CLASS_UTTERANCE_HEADING1 = "r2-tts-utterance-h1";
exports.TTS_CLASS_UTTERANCE_HEADING2 = "r2-tts-utterance-h2";
exports.TTS_CLASS_UTTERANCE_HEADING3 = "r2-tts-utterance-h3";
exports.TTS_CLASS_UTTERANCE_HEADING4 = "r2-tts-utterance-h4";
exports.TTS_CLASS_UTTERANCE_HEADING5 = "r2-tts-utterance-h5";
exports.TTS_ID_CONTAINER = "r2-tts-txt";
exports.TTS_NAV_BUTTON_CLASS = "r2-tts-button";
exports.TTS_ID_SPEAKING_DOC_ELEMENT = "r2-tts-speaking-el";
exports.TTS_POPUP_DIALOG_CLASS = "r2-tts-popup-dialog";
exports.ttsCssStyles = "\n\n:root[style] dialog#".concat(exports.POPUP_DIALOG_CLASS, ".").concat(exports.TTS_POPUP_DIALOG_CLASS, ",\n:root dialog#").concat(exports.POPUP_DIALOG_CLASS, ".").concat(exports.TTS_POPUP_DIALOG_CLASS, " {\n width: auto;\n max-width: 100%;\n\n height: auto;\n max-height: 100%;\n\n top: 0px;\n bottom: 0px;\n left: 0px;\n right: 0px;\n\n margin: 0;\n padding: 0;\n\n box-shadow: none;\n\n border-radius: 0;\n border-style: solid;\n border-width: 1px;\n border-color: #777777 !important;\n border-left: 0;\n border-right: 0;\n border-top: 0;\n}\n\n:root[style] div#").concat(exports.TTS_ID_CONTAINER, ",\n:root div#").concat(exports.TTS_ID_CONTAINER, " {\n overflow: auto;\n overflow-x: hidden;\n\n grid-column-start: 1;\n grid-column-end: 4;\n grid-row-start: 1;\n grid-row-end: 2;\n\n padding: 0;\n margin: 0;\n\n max-width: 800px;\n margin-right: auto;\n margin-left: auto;\n\n hyphens: none !important;\n word-break: keep-all !important;\n word-wrap: break-word !important;\n\n line-height: initial !important;\n\n color: #444444 !important;\n\n border-radius: 0;\n border-style: solid;\n border-width: 1px;\n border-color: #777777 !important;\n border-left: 0;\n border-right: 0;\n border-top: 0;\n}\n\n:root[style] div#").concat(exports.TTS_ID_CONTAINER, " > div,\n:root div#").concat(exports.TTS_ID_CONTAINER, " > div {\n font-size: 1.2rem !important;\n}\n:root[style] div#").concat(exports.TTS_ID_CONTAINER, " > img,\n:root div#").concat(exports.TTS_ID_CONTAINER, " > img,\n:root[style] div#").concat(exports.TTS_ID_CONTAINER, " > svg,\n:root div#").concat(exports.TTS_ID_CONTAINER, " > svg {\n display: block;\n border: 3px solid transparent;\n max-width: 50%;\n margin-left: auto;\n margin-right: auto;\n}\n:root[style] div#").concat(exports.TTS_ID_CONTAINER, " > img + div,\n:root div#").concat(exports.TTS_ID_CONTAINER, " > img + div,\n:root[style] div#").concat(exports.TTS_ID_CONTAINER, " > svg + div,\n:root div#").concat(exports.TTS_ID_CONTAINER, " > svg + div {\n text-align: center;\n text-decoration: underline;\n}\n\n:root[style*=\"--USER__lineHeight\"] div#").concat(exports.TTS_ID_CONTAINER, " {\n line-height: calc(var(--USER__lineHeight) * 1) !important;\n}\n:root[style*=\"readium-night-on\"] div#").concat(exports.TTS_ID_CONTAINER, " {\n color: #bbbbbb !important;\n}\n:root[style*=\"readium-sepia-on\"] div#").concat(exports.TTS_ID_CONTAINER, " {\n background: var(--RS__backgroundColor) !important;\n color: var(--RS__textColor) !important;\n}\n:root[style*=\"--USER__backgroundColor\"] div#").concat(exports.TTS_ID_CONTAINER, " {\n background: var(--USER__backgroundColor) !important;\n}\n:root[style*=\"--USER__textColor\"] div#").concat(exports.TTS_ID_CONTAINER, " {\n color: var(--USER__textColor) !important;\n}\n\n:root[style] #").concat(exports.TTS_ID_SLIDER, ",\n:root #").concat(exports.TTS_ID_SLIDER, " {\n padding: 0;\n margin: 0;\n margin-left: 6px;\n margin-right: 6px;\n margin-top: 6px;\n margin-bottom: 6px;\n\n grid-column-start: 2;\n grid-column-end: 3;\n grid-row-start: 2;\n grid-row-end: 3;\n\n cursor: pointer;\n -webkit-appearance: none;\n\n background: transparent !important;\n}\n:root #").concat(exports.TTS_ID_SLIDER, "::-webkit-slider-runnable-track {\n cursor: pointer;\n\n width: 100%;\n height: 0.5em;\n\n background: #999999;\n\n padding: 0;\n margin: 0;\n}\n:root[style*=\"readium-night-on\"] #").concat(exports.TTS_ID_SLIDER, "::-webkit-slider-runnable-track {\n background: #545454;\n}\n:root #").concat(exports.TTS_ID_SLIDER, "::-webkit-slider-thumb {\n -webkit-appearance: none;\n\n cursor: pointer;\n\n width: 0.8em;\n height: 1.5em;\n\n padding: 0;\n margin: 0;\n margin-top: -0.5em;\n\n border: none;\n border-radius: 0.2em;\n\n background: #333333;\n}\n:root[style*=\"readium-night-on\"] #").concat(exports.TTS_ID_SLIDER, "::-webkit-slider-thumb {\n background: white;\n}\n:root[style] button.").concat(exports.TTS_NAV_BUTTON_CLASS, " > span,\n:root button.").concat(exports.TTS_NAV_BUTTON_CLASS, " > span {\n vertical-align: baseline;\n}\n:root[style] button.").concat(exports.TTS_NAV_BUTTON_CLASS, ",\n:root button.").concat(exports.TTS_NAV_BUTTON_CLASS, " {\n border: none;\n\n font-size: 100% !important;\n font-family: Arial !important;\n cursor: pointer;\n\n padding: 0;\n margin-top: 0.2em;\n margin-bottom: 0.2em;\n\n background: transparent !important;\n color: black !important;\n}\n:root[style*=\"readium-night-on\"] button.").concat(exports.TTS_NAV_BUTTON_CLASS, " {\n color: white !important;\n}\n/*\n:root[style*=\"readium-sepia-on\"] button.").concat(exports.TTS_NAV_BUTTON_CLASS, " {\n background: var(--RS__backgroundColor) !important;\n}\n:root[style*=\"--USER__backgroundColor\"] button.").concat(exports.TTS_NAV_BUTTON_CLASS, " {\n background: var(--USER__backgroundColor) !important;\n}\n*/\n:root[style] #").concat(exports.TTS_ID_PREVIOUS, ",\n:root #").concat(exports.TTS_ID_PREVIOUS, " {\n margin-left: 0.2em;\n\n grid-column-start: 1;\n grid-column-end: 2;\n grid-row-start: 2;\n grid-row-end: 3;\n}\n:root[style] #").concat(exports.TTS_ID_NEXT, ",\n:root #").concat(exports.TTS_ID_NEXT, " {\n margin-right: 0.2em;\n\n grid-column-start: 3;\n grid-column-end: 4;\n grid-row-start: 2;\n grid-row-end: 3;\n}\n\n:root[style] .").concat(exports.TTS_ID_SPEAKING_DOC_ELEMENT, ",\n:root .").concat(exports.TTS_ID_SPEAKING_DOC_ELEMENT, " {\n outline-color: magenta;\n outline-style: solid;\n outline-width: 2px;\n outline-offset: 1px;\n}\n\n:root[style] .").concat(exports.TTS_CLASS_UTTERANCE, ",\n:root .").concat(exports.TTS_CLASS_UTTERANCE, " {\n margin-bottom: 0.1em;\n padding-top: 0.3em;\n padding-bottom: 0.3em;\n padding-left: 1em;\n padding-right: 1em;\n display: block;\n\n box-sizing: border-box;\n border: 1px solid transparent !important;\n\n line-height: 1.5 !important;\n}\n\n:root[style] div#").concat(exports.TTS_ID_CONTAINER, " .").concat(exports.TTS_CLASS_UTTERANCE_HEADING1, ",\n:root div#").concat(exports.TTS_ID_CONTAINER, " .").concat(exports.TTS_CLASS_UTTERANCE_HEADING1, " {\n font-weight: bolder !important;\n font-size: 1.5rem !important;\n}\n:root[style] div#").concat(exports.TTS_ID_CONTAINER, " .").concat(exports.TTS_CLASS_UTTERANCE_HEADING2, ",\n:root div#").concat(exports.TTS_ID_CONTAINER, " .").concat(exports.TTS_CLASS_UTTERANCE_HEADING2, " {\n font-weight: bolder !important;\n font-size: 1.4rem !important;\n}\n:root[style] div#").concat(exports.TTS_ID_CONTAINER, " .").concat(exports.TTS_CLASS_UTTERANCE_HEADING3, ",\n:root div#").concat(exports.TTS_ID_CONTAINER, " .").concat(exports.TTS_CLASS_UTTERANCE_HEADING3, " {\n font-weight: bold !important;\n font-size: 1.3rem !important;\n}\n:root[style] div#").concat(exports.TTS_ID_CONTAINER, " .").concat(exports.TTS_CLASS_UTTERANCE_HEADING4, ",\n:root div#").concat(exports.TTS_ID_CONTAINER, " .").concat(exports.TTS_CLASS_UTTERANCE_HEADING4, " {\n font-weight: bold !important;\n font-size: 1.2rem !important;\n}\n:root[style] div#").concat(exports.TTS_ID_CONTAINER, " .").concat(exports.TTS_CLASS_UTTERANCE_HEADING5, ",\n:root div#").concat(exports.TTS_ID_CONTAINER, " .").concat(exports.TTS_CLASS_UTTERANCE_HEADING5, " {\n font-weight: bold !important;\n font-size: 1.1rem !important;\n}\n\n:root[style] div#").concat(exports.TTS_ID_ACTIVE_UTTERANCE, ",\n:root div#").concat(exports.TTS_ID_ACTIVE_UTTERANCE, " {\n /* background-color: yellow !important; */\n\n border: 1px solid #777777 !important;\n border-radius: 0.4em !important;\n\n color: black !important;\n}\n:root[style*=\"readium-night-on\"] div#").concat(exports.TTS_ID_ACTIVE_UTTERANCE, " {\n color: white !important;\n}\n:root[style*=\"readium-sepia-on\"] div#").concat(exports.TTS_ID_ACTIVE_UTTERANCE, " {\n color: black !important;\n}\n:root[style*=\"--USER__textColor\"] div#").concat(exports.TTS_ID_ACTIVE_UTTERANCE, " {\n color: var(--USER__textColor) !important;\n}\n\n:root[style] span#").concat(exports.TTS_ID_ACTIVE_WORD, ",\n:root span#").concat(exports.TTS_ID_ACTIVE_WORD, " {\n color: black !important;\n\n text-decoration: underline;\n text-decoration-color: #777777 !important;\n text-underline-position: under;\n /*\n outline-color: #777777;\n outline-offset: 2px;\n outline-style: solid;\n outline-width: 1px;\n */\n\n padding: 0;\n margin: 0;\n}\n:root[style*=\"readium-night-on\"] span#").concat(exports.TTS_ID_ACTIVE_WORD, " {\n color: white !important;\n outline-color: white;\n}\n:root[style*=\"readium-sepia-on\"] span#").concat(exports.TTS_ID_ACTIVE_WORD, " {\n color: black !important;\n outline-color: black;\n}\n:root[style*=\"--USER__textColor\"] span#").concat(exports.TTS_ID_ACTIVE_WORD, " {\n color: var(--USER__textColor) !important;\n outline-color: var(--USER__textColor);\n}\n\n:root div#").concat(exports.TTS_ID_CONTAINER, ".").concat(exports.TTS_CLASS_THEME1, ",\n:root[style] div#").concat(exports.TTS_ID_CONTAINER, ".").concat(exports.TTS_CLASS_THEME1, " {\n\n background-color: #f7f9f9 !important;\n color: #333333 !important;\n}\n:root[style*=\"readium-night-on\"] div#").concat(exports.TTS_ID_CONTAINER, ".").concat(exports.TTS_CLASS_THEME1, " {\n background: #111111 !important;\n color: #888888 !important;\n}\n:root[style*=\"readium-sepia-on\"] div#").concat(exports.TTS_ID_CONTAINER, ".").concat(exports.TTS_CLASS_THEME1, " {\n background: #fdf2e9 !important;\n color: #333333 !important;\n}\n\n:root[style] div#").concat(exports.TTS_ID_CONTAINER, ".").concat(exports.TTS_CLASS_THEME1, " .").concat(exports.TTS_CLASS_UTTERANCE, ",\n:root div#").concat(exports.TTS_ID_CONTAINER, ".").concat(exports.TTS_CLASS_THEME1, " .").concat(exports.TTS_CLASS_UTTERANCE, " {\n background-color: transparent !important;\n}\n\n:root[style] div#").concat(exports.TTS_ID_CONTAINER, ".").concat(exports.TTS_CLASS_THEME1, " div#").concat(exports.TTS_ID_ACTIVE_UTTERANCE, ",\n:root div#").concat(exports.TTS_ID_CONTAINER, ".").concat(exports.TTS_CLASS_THEME1, " div#").concat(exports.TTS_ID_ACTIVE_UTTERANCE, " {\n\n border: 0 !important;\n border-radius: 0px !important;\n\n background-color: #ecf0f1 !important;\n color: black !important;\n\n /* box-shadow: 0px 0px 10px 0px #f2f3f4; */\n}\n:root[style*=\"readium-night-on\"] div#").concat(exports.TTS_ID_CONTAINER, ".").concat(exports.TTS_CLASS_THEME1, " div#").concat(exports.TTS_ID_ACTIVE_UTTERANCE, " {\n background-color: #222222 !important;\n color: white !important;\n /* box-shadow: 0px 0px 10px 0px #111100; */\n}\n:root[style*=\"readium-sepia-on\"] div#").concat(exports.TTS_ID_CONTAINER, ".").concat(exports.TTS_CLASS_THEME1, " div#").concat(exports.TTS_ID_ACTIVE_UTTERANCE, " {\n background-color: #fef9e7 !important;\n color: black !important;\n /* box-shadow: 0px 0px 10px 0px #fdebd0; */\n}\n\n:root[style] div#").concat(exports.TTS_ID_CONTAINER, ".").concat(exports.TTS_CLASS_THEME1, " div#").concat(exports.TTS_ID_ACTIVE_UTTERANCE, " span#").concat(exports.TTS_ID_ACTIVE_WORD, ",\n:root div#").concat(exports.TTS_ID_CONTAINER, ".").concat(exports.TTS_CLASS_THEME1, " div#").concat(exports.TTS_ID_ACTIVE_UTTERANCE, " span#").concat(exports.TTS_ID_ACTIVE_WORD, " {\n background-color: #f7dc6f !important;\n color: black !important;\n\n outline-color: #f7dc6f;\n outline-style: solid;\n outline-offset: unset;\n outline-width: 4px;\n\n text-decoration: none;\n}\n:root[style*=\"readium-night-on\"] div#").concat(exports.TTS_ID_CONTAINER, ".").concat(exports.TTS_CLASS_THEME1, " div#").concat(exports.TTS_ID_ACTIVE_UTTERANCE, " span#").concat(exports.TTS_ID_ACTIVE_WORD, " {\n background-color: #d4ac0d !important;\n color: black !important;\n\n outline-color: #d4ac0d;\n}\n:root[style*=\"readium-sepia-on\"] div#").concat(exports.TTS_ID_CONTAINER, ".").concat(exports.TTS_CLASS_THEME1, " div#").concat(exports.TTS_ID_ACTIVE_UTTERANCE, " span#").concat(exports.TTS_ID_ACTIVE_WORD, " {\n background-color: #f9e79f !important;\n color: black !important;\n\n outline-color: #f9e79f;\n}\n");
exports.ROOT_CLASS_INVISIBLE_MASK = "r2-visibility-mask-class";
exports.ROOT_CLASS_INVISIBLE_MASK_REMOVED = "r2-visibility-mask-removed-class";
exports.visibilityMaskCssStyles = "\n\n/*\nbugfix: for some reason, \"inherit\" does not work in Chromium, so we patch ReadiumCSS here :(\n(was \"text-align: var(--USER__textAlign);\" on HTML root and \"text-align: inherit !important;\" on body etc.)\n*/\n:root[style*=\"readium-advanced-on\"][style*=\"--USER__textAlign\"] {\ntext-align: var(--USER__textAlign) !important;\n}\n:root[style*=\"readium-advanced-on\"][style*=\"--USER__textAlign\"] body,\n:root[style*=\"readium-advanced-on\"][style*=\"--USER__textAlign\"] *:not(blockquote):not(figcaption) p,\n:root[style*=\"readium-advanced-on\"][style*=\"--USER__textAlign\"] li {\ntext-align: var(--USER__textAlign) !important;\n}\n\n/*\nhttps://github.com/readium/readium-css/issues/117\nno new stacking context, otherwise massive performance degradation with CSS Columns in large HTML documents\n(web inspector profiler shows long paint times, some layout recalc triggers too)\n*/\n:root {\n -webkit-perspective: none !important;\n perspective: none !important;\n}\n\n:root[style].".concat(exports.CLASS_PAGINATED, ":not(.").concat(exports.ROOT_CLASS_FIXED_LAYOUT, "),\n:root.").concat(exports.CLASS_PAGINATED, ":not(.").concat(exports.ROOT_CLASS_FIXED_LAYOUT, ") {\n overflow: visible !important;\n}\n:root[style].").concat(exports.CLASS_PAGINATED, ":not(.").concat(exports.ROOT_CLASS_FIXED_LAYOUT, ") > body,\n:root.").concat(exports.CLASS_PAGINATED, ":not(.").concat(exports.ROOT_CLASS_FIXED_LAYOUT, ") > body {\n /*\n Electron v19 --> v21 breaking change :(\n (\"hidden\" is now \"clip\")\n overflow-x: hidden !important;\n overflow-y: visible !important;\n */\n overflow-x: clip !important;\n overflow-y: visible !important;\n}\n\n/*\nThis only visually hides the scrollbars,\nthis does not prevent user-scrolling with keyboard arrows, space, drag on character selection, mouse wheel, etc.\nWe cannot completely disable \"scroll\" event (prevent default) because we need to detect when user keyboard-tabs through hyperlinks, in order to reset the correct scroll offset programmatically (page alignment on CSS column boundaries).\n...so we continue to use \"clip\" for \"overflow-x\" (see above)\n\n:root[style].").concat(exports.CLASS_PAGINATED, ":not(.").concat(exports.ROOT_CLASS_FIXED_LAYOUT, ") > body::-webkit-scrollbar,\n:root.").concat(exports.CLASS_PAGINATED, ":not(.").concat(exports.ROOT_CLASS_FIXED_LAYOUT, ") > body::-webkit-scrollbar {\n display: none;\n}\n*/\n\n:root[style].").concat(exports.ROOT_CLASS_FIXED_LAYOUT, ",\n:root.").concat(exports.ROOT_CLASS_FIXED_LAYOUT, " {\n overflow: hidden !important;\n}\n:root[style].").concat(exports.ROOT_CLASS_FIXED_LAYOUT, " > body,\n:root.").concat(exports.ROOT_CLASS_FIXED_LAYOUT, " > body {\n overflow: hidden !important;\n margin: 0 !important;\n}\n\n:root.").concat(exports.CLASS_PAGINATED, " > body,\n:root:not(.").concat(exports.CLASS_PAGINATED, ") > body,\n:root.").concat(exports.ROOT_CLASS_FIXED_LAYOUT, " > body,\n:root:not(.").concat(exports.ROOT_CLASS_FIXED_LAYOUT, ") > body,\n:root[style].").concat(exports.CLASS_PAGINATED, " > body,\n:root[style]:not(.").concat(exports.CLASS_PAGINATED, ") > body,\n:root[style].").concat(exports.ROOT_CLASS_FIXED_LAYOUT, " > body,\n:root[style]:not(.").concat(exports.ROOT_CLASS_FIXED_LAYOUT, ") > body {\n /* see ensureHighlightsContainer() */\n position: relative !important;\n /* display: block; */\n}\n\n:root[style]:not(.").concat(exports.CLASS_PAGINATED, "):not(.").concat(exports.ROOT_CLASS_FIXED_LAYOUT, "),\n:root:not(.").concat(exports.CLASS_PAGINATED, "):not(.").concat(exports.ROOT_CLASS_FIXED_LAYOUT, ") {\n height: 100vh !important;\n}\n\n:root[style].").concat(exports.CLASS_PAGINATED, ":not(.").concat(exports.ROOT_CLASS_FIXED_LAYOUT, "),\n:root.").concat(exports.CLASS_PAGINATED, ":not(.").concat(exports.ROOT_CLASS_FIXED_LAYOUT, ") {\n /* display: block; */\n /*\n Chrome Electron 19 - Chrome v102 CSS regression bug!\n display: flex; ... then transition to block or flow-root\n See SKIP_LINK_ID rules below :(\n (hacky, but works without regressions or layout shift)\n */\n}\n:root[style]:not(.").concat(exports.ROOT_CLASS_FIXED_LAYOUT, ") > body,\n:root:not(.").concat(exports.ROOT_CLASS_FIXED_LAYOUT, ") > body {\n min-height: inherit;\n}\n:root[style]:not(.").concat(exports.CLASS_PAGINATED, "):not(.").concat(exports.ROOT_CLASS_FIXED_LAYOUT, ") > body,\n:root:not(.").concat(exports.CLASS_PAGINATED, "):not(.").concat(exports.ROOT_CLASS_FIXED_LAYOUT, ") > body {\n height: inherit;\n}\n\n/*\n// This workaround fixes the issue of \"bleeding\" body background color due to scale+translate CSS 2D transform\n// https://github.com/edrlab/thorium-reader/issues/1529#issuecomment-900166745\nbackground: unset !important;\nbackground-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=) !important;\n*/\n\n:root.").concat(exports.ROOT_CLASS_INVISIBLE_MASK, "[style] > body,\n:root.").concat(exports.ROOT_CLASS_INVISIBLE_MASK, " > body {\n /* visibility: hidden !important; */\n opacity: 0;\n}\n:root.").concat(exports.ROOT_CLASS_INVISIBLE_MASK_REMOVED, "[style] > body,\n:root.").concat(exports.ROOT_CLASS_INVISIBLE_MASK_REMOVED, " > body {\n opacity: 1;\n /*\n animation-name: readium2ElectronAnimation_INVISIBLE_MASK;\n animation-duration: 0.5s;\n animation-delay: 0s;\n animation-timing-function: linear;\n */\n /* animation-fill-mode: forwards; */\n}\n@keyframes readium2ElectronAnimation_INVISIBLE_MASK {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n");
exports.focusCssStyles = "\n\n#".concat(exports.SKIP_LINK_ID, " {\n display: flex !important;\n overflow: hidden !important;\n visibility: visible !important;\n opacity: 1 !important;\n position: absolute !important;\n left: 0px !important;\n top: 0px !important;\n width: 1px !important;\n height: 1px !important;\n background-color: transparent !important;\n color: transparent !important;\n padding: 0 !important;\n margin: 0 !important;\n border: 0 !important;\n outline: 0 !important;\n}\n/*\n#").concat(exports.SKIP_LINK_ID, ":focus {\n width: auto;\n height: auto;\n}\n*/\n:root[style] *:focus,\n:root *:focus {\n outline: none;\n}\n:root[style].").concat(exports.ROOT_CLASS_KEYBOARD_INTERACT, " *.").concat(exports.CSS_CLASS_NO_FOCUS_OUTLINE, ":focus:not(:target):not(.").concat(exports.LINK_TARGET_CLASS, "):not([data-").concat(exports.POPOUTIMAGE_CONTAINER_ID, "]),\n:root.").concat(exports.ROOT_CLASS_KEYBOARD_INTERACT, " *.").concat(exports.CSS_CLASS_NO_FOCUS_OUTLINE, ":focus:not(:target):not(.").concat(exports.LINK_TARGET_CLASS, "):not([data-").concat(exports.POPOUTIMAGE_CONTAINER_ID, "]) {\n outline: none !important;\n}\n:root[style].").concat(exports.ROOT_CLASS_KEYBOARD_INTERACT, " *:focus:not(:target):not(.").concat(exports.LINK_TARGET_CLASS, "),\n:root.").concat(exports.ROOT_CLASS_KEYBOARD_INTERACT, " *:focus:not(:target):not(.").concat(exports.LINK_TARGET_CLASS, ") {\n outline-color: blue !important;\n outline-style: solid !important;\n outline-width: 2px !important;\n outline-offset: 2px !important;\n}\n/*\n@keyframes readium2ElectronAnimation_FOCUS {\n 0% {\n }\n 100% {\n outline: inherit !important;\n }\n}\n:root[style]:not(.").concat(exports.ROOT_CLASS_KEYBOARD_INTERACT, ") *:focus,\n:root:not(.").concat(exports.ROOT_CLASS_KEYBOARD_INTERACT, ") *:focus {\n animation-name: readium2ElectronAnimation_FOCUS;\n animation-duration: 3s;\n animation-delay: 1s;\n animation-fill-mode: forwards;\n animation-timing-function: linear;\n}\n*/\n");
exports.targetCssStyles = "\n/*\n@keyframes readium2ElectronAnimation_TARGET {\n 0% {\n }\n 100% {\n outline: inherit !important;\n }\n}\n:root[style] *:target,\n:root *:target,\n*/\n:root[style] *.".concat(exports.LINK_TARGET_CLASS, ",\n:root *.").concat(exports.LINK_TARGET_CLASS, "\n{\n outline-color: green !important;\n outline-style: solid !important;\n outline-width: 2px !important;\n outline-offset: 2px !important;\n\n /*\n animation-name: readium2ElectronAnimation_TARGET;\n animation-duration: 3s;\n animation-delay: 1s;\n animation-fill-mode: forwards;\n animation-timing-function: linear;\n */\n}\n/*\n:root[style] *.r2-no-target-outline:target,\n:root *.r2-no-target-outline:target,\n*/\n:root[style] *.r2-no-target-outline.").concat(exports.LINK_TARGET_CLASS, ",\n:root *.r2-no-target-outline.").concat(exports.LINK_TARGET_CLASS, " {\n outline: inherit !important;\n}\n");
exports.selectionCssStyles = "\n\n:root[style].".concat(exports.HIDE_CURSOR_CLASS, ",\n:root.").concat(exports.HIDE_CURSOR_CLASS, ",\n:root[style].").concat(exports.HIDE_CURSOR_CLASS, " *,\n:root.").concat(exports.HIDE_CURSOR_CLASS, " * {\n cursor: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=), none !important;\n}\n\n.").concat(exports.ZERO_TRANSFORM_CLASS, " {\n will-change: scroll-position;\n transform: translateX(0px);\n}\n\n:root[style] ::selection,\n:root ::selection {\nbackground: rgb(155, 179, 240) !important;\ncolor: black !important;\n}\n\n:root[style*=\"readium-night-on\"] ::selection {\nbackground: rgb(100, 122, 177) !important;\ncolor: white !important;\n}\n");
exports.scrollBarCssStyles = "\n::-webkit-scrollbar-button {\nheight: 0px !important;\nwidth: 0px !important;\n}\n\n::-webkit-scrollbar-corner {\nbackground: transparent !important;\n}\n\n/*::-webkit-scrollbar-track-piece {\nbackground: red;\n} */\n\n::-webkit-scrollbar {\nwidth: 14px;\nheight: 14px;\n}\n\nhtml.".concat(exports.POPUP_DIALOG_CLASS, ".").concat(exports.TTS_CLASS_IS_ACTIVE, " ::-webkit-scrollbar {\n display: none;\n /* visibility: hidden; */\n}\n\n::-webkit-scrollbar-thumb {\nbackground: #727272;\nbackground-clip: padding-box !important;\nborder: 3px solid transparent !important;\nborder-radius: 30px;\n}\n\n::-webkit-scrollbar-thumb:hover {\nbackground: #4d4d4d;\n}\n\n::-webkit-scrollbar-track {\nbox-shadow: inset 0 0 3px rgba(40, 40, 40, 0.2);\nbackground: #dddddd;\nbox-sizing: content-box;\n}\n\n::-webkit-scrollbar-track:horizontal {\nborder-top: 1px solid silver;\n}\n::-webkit-scrollbar-track:vertical {\nborder-left: 1px solid silver;\n}\n\n:root[style*=\"readium-night-on\"] ::-webkit-scrollbar-thumb {\nbackground: #a4a4a4;\nborder: 3px solid #545454;\n}\n\n:root[style*=\"readium-night-on\"] ::-webkit-scrollbar-thumb:hover {\nbackground: #dedede;\n}\n\n:root[style*=\"readium-night-on\"] ::-webkit-scrollbar-track {\nbackground: #545454;\n}\n\n:root[style*=\"readium-night-on\"] ::-webkit-scrollbar-track:horizontal {\nborder-top: 1px solid black;\n}\n:root[style*=\"readium-night-on\"] ::-webkit-scrollbar-track:vertical {\nborder-left: 1px solid black;\n}");
exports.readPosCssStylesAttr1 = "data-readium2-read-pos1";
exports.readPosCssStylesAttr2 = "data-readium2-read-pos2";
exports.readPosCssStylesAttr3 = "data-readium2-read-pos3";
exports.readPosCssStylesAttr4 = "data-readium2-read-pos4";
exports.readPosCssStyles = "\n:root[style*=\"readium-sepia-on\"] *[".concat(exports.readPosCssStylesAttr1, "],\n:root[style*=\"readium-night-on\"] *[").concat(exports.readPosCssStylesAttr1, "],\n:root[style] *[").concat(exports.readPosCssStylesAttr1, "],\n:root *[").concat(exports.readPosCssStylesAttr1, "] {\n color: black !important;\n background: magenta !important;\n\n outline-color: magenta !important;\n outline-style: solid !important;\n outline-width: 6px !important;\n outline-offset: 0px !important;\n}\n:root[style*=\"readium-sepia-on\"] *[").concat(exports.readPosCssStylesAttr2, "],\n:root[style*=\"readium-night-on\"] *[").concat(exports.readPosCssStylesAttr2, "],\n:root[style] *[").concat(exports.readPosCssStylesAttr2, "],\n:root *[").concat(exports.readPosCssStylesAttr2, "] {\n color: black !important;\n background: yellow !important;\n\n outline-color: yellow !important;\n outline-style: solid !important;\n outline-width: 4px !important;\n outline-offset: 0px !important;\n}\n:root[style*=\"readium-sepia-on\"] *[").concat(exports.readPosCssStylesAttr3, "],\n:root[style*=\"readium-night-on\"] *[").concat(exports.readPosCssStylesAttr3, "],\n:root[style] *[").concat(exports.readPosCssStylesAttr3, "],\n:root *[").concat(exports.readPosCssStylesAttr3, "] {\n color: black !important;\n background: green !important;\n\n outline-color: green !important;\n outline-style: solid !important;\n outline-width: 2px !important;\n outline-offset: 0px !important;\n}\n:root[style*=\"readium-sepia-on\"] *[").concat(exports.readPosCssStylesAttr4, "],\n:root[style*=\"readium-night-on\"] *[").concat(exports.readPosCssStylesAttr4, "],\n:root[style] *[").concat(exports.readPosCssStylesAttr4, "],\n:root *[").concat(exports.readPosCssStylesAttr4, "] {\n color: black !important;\n background: silver !important;\n\n outline-color: silver !important;\n outline-style: solid !important;\n outline-width: 1px !important;\n outline-offset: 0px !important;\n}");
exports.AUDIO_BUFFER_CANVAS_ID = "r2-audio-buffer-canvas";
exports.AUDIO_PROGRESS_CLASS = "r2-audio-progress";
exports.AUDIO_ID = "r2-audio";
exports.AUDIO_BODY_ID = "r2-audio-body";
exports.AUDIO_SECTION_ID = "r2-audio-section";
exports.AUDIO_CONTROLS_ID = "r2-audio-controls";
exports.AUDIO_COVER_ID = "r2-audio-cover";
exports.AUDIO_TITLE_ID = "r2-audio-title";
exports.AUDIO_SLIDER_ID = "r2-audio-slider";
exports.AUDIO_TIME_ID = "r2-audio-time";
exports.AUDIO_PERCENT_ID = "r2-audio-percent";
exports.AUDIO_RATE_ID = "r2-audio-rate";
exports.AUDIO_PLAYPAUSE_ID = "r2-audio-playPause";
exports.AUDIO_PREVIOUS_ID = "r2-audio-previous";
exports.AUDIO_NEXT_ID = "r2-audio-next";
exports.AUDIO_REWIND_ID = "r2-audio-rewind";
exports.AUDIO_FORWARD_ID = "r2-audio-forward";
exports.audioCssStyles = "\n\n#".concat(exports.AUDIO_CONTROLS_ID, " select#").concat(exports.AUDIO_RATE_ID, " option {\n color: var(--RS__textColor) !important;\n background: var(--RS__backgroundColor) !important;\n}\n\n#").concat(exports.AUDIO_BODY_ID, " {\n padding: 0 !important;\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n height: 100vh !important;\n display: flex !important;\n align-items: center;\n justify-content: center;\n user-select: none;\n}\n\n#").concat(exports.AUDIO_SECTION_ID, " {\n margin: 0;\n padding: 0;\n min-width: 500px;\n}\n\n#").concat(exports.AUDIO_TITLE_ID, " {\n margin-top: 1em;\n margin-bottom: 0;\n display: block;\n margin-left: auto;\n margin-right: auto;\n max-width: 800px;\n width: 80%;\n text-align: center;\n}\n\n#").concat(exports.AUDIO_COVER_ID, " {\n display: block;\n margin-left: auto;\n margin-right: auto;\n max-width: 500px !important;\n max-height: 250px !important;\n margin-top: 0.4em;\n margin-bottom: 0.6em;\n cursor: pointer;\n}\n\n:root.").concat(exports.AUDIO_PROGRESS_CLASS, " #").concat(exports.AUDIO_COVER_ID, " {\n cursor: wait;\n}\n\n#").concat(exports.AUDIO_BUFFER_CANVAS_ID, " {\n width: 500px;\n height: 20px;\n\n margin-left: auto;\n margin-right: auto;\n\n margin-bottom: 1em;\n\n display: block;\n}\n\n#").concat(exports.AUDIO_ID, " {\n display: block;\n margin-left: auto;\n margin-right: auto;\n max-width: 800px;\n height: 2.5em;\n width: 80%;\n}\n\n#").concat(exports.AUDIO_CONTROLS_ID, " {\n display: block;\n padding: 0;\n margin: 0;\n margin-left: auto;\n margin-right: auto;\n\n max-width: 500px;\n min-width: 500px;\n width: 500px;\n height: auto;\n\n display: grid;\n grid-column-gap: 0px;\n grid-row-gap: 0px;\n\n grid-template-columns: auto 3em 7em 3em auto;\n grid-template-rows: auto 1.5em auto;\n}\n\n#").concat(exports.AUDIO_CONTROLS_ID, " button {\n border: 0 !important;\n background-color: transparent !important;\n background: transparent !important;\n text-align: center;\n padding: 0;\n margin: 0;\n display: block;\n cursor: pointer;\n position: relative;\n}\n\n#").concat(exports.AUDIO_CONTROLS_ID, " #").concat(exports.AUDIO_PLAYPAUSE_ID, " {\n grid-column-start: 3;\n grid-column-end: 4;\n grid-row-start: 1;\n grid-row-end: 2;\n\n box-sizing: border-box;\n\n justify-self: center;\n\n width: 60px;\n height: 60px;\n}\n\n:root #").concat(exports.AUDIO_CONTROLS_ID, " svg,\n:root[style] #").concat(exports.AUDIO_CONTROLS_ID, " svg {\n fill: #202020;\n}\n:root[style*=\"readium-night-on\"] #").concat(exports.AUDIO_CONTROLS_ID, " svg {\n fill: #999999;\n}\n\n:root:not(.").concat(exports.AUDIO_PROGRESS_CLASS, ") #").concat(exports.AUDIO_CONTROLS_ID, " #").concat(exports.AUDIO_PLAYPAUSE_ID, " #").concat(exports.AUDIO_PLAYPAUSE_ID, "_0,\n:root[style]:not(.").concat(exports.AUDIO_PROGRESS_CLASS, ") #").concat(exports.AUDIO_CONTROLS_ID, " #").concat(exports.AUDIO_PLAYPAUSE_ID, " #").concat(exports.AUDIO_PLAYPAUSE_ID, "_0 {\n\n display: none;\n}\n\n:root:not(.").concat(exports.AUDIO_PROGRESS_CLASS, ") #").concat(exports.AUDIO_CONTROLS_ID, " #").concat(exports.AUDIO_PLAYPAUSE_ID, ".pause #").concat(exports.AUDIO_PLAYPAUSE_ID, "_1 {\n display: none;\n}\n\n:root:not(.").concat(exports.AUDIO_PROGRESS_CLASS, ") #").concat(exports.AUDIO_CONTROLS_ID, " #").concat(exports.AUDIO_PLAYPAUSE_ID, ".pause #").concat(exports.AUDIO_PLAYPAUSE_ID, "_0 {\n display: block;\n}\n\n:root.").concat(exports.AUDIO_PROGRESS_CLASS, " #").concat(exports.AUDIO_CONTROLS_ID, " #").concat(exports.AUDIO_PLAYPAUSE_ID, " svg {\n display: none;\n}\n:root.").concat(exports.AUDIO_PROGRESS_CLASS, " #").concat(exports.AUDIO_CONTROLS_ID, " #").concat(exports.AUDIO_PLAYPAUSE_ID, " {\n cursor: wait;\n}\n:root[style].").concat(exports.AUDIO_PROGRESS_CLASS, " #").concat(exports.AUDIO_CONTROLS_ID, " #").concat(exports.AUDIO_PLAYPAUSE_ID, ":after {\n content: \"\";\n border-radius: 50%;\n\n position: absolute;\n width: 60px;\n height: 60px;\n left: 0px;\n top: 0px;\n\n transform: translateZ(0);\n animation: readium2ElectronAnimation_audioLoad-spin 1.1s infinite linear;\n\n border-top: 3px solid #999999;\n border-right: 3px solid #999999;\n border-bottom: 3px solid #999999;\n border-left: 3px solid #333333;\n}\n:root[style*=\"readium-night-on\"].").concat(exports.AUDIO_PROGRESS_CLASS, " #").concat(exports.AUDIO_CONTROLS_ID, " #").concat(exports.AUDIO_PLAYPAUSE_ID, ":after {\n\n border-top: 3px solid #202020;\n border-right: 3px solid #202020;\n border-bottom: 3px solid #202020;\n border-left: 3px solid white;\n}\n@keyframes readium2ElectronAnimation_audioLoad-spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n\n#").concat(exports.AUDIO_CONTROLS_ID, " #").concat(exports.AUDIO_NEXT_ID, ",\n#").concat(exports.AUDIO_CONTROLS_ID, " #").concat(exports.AUDIO_PREVIOUS_ID, ",\n#").concat(exports.AUDIO_CONTROLS_ID, " #").concat(exports.AUDIO_REWIND_ID, ",\n#").concat(exports.AUDIO_CONTROLS_ID, " #").concat(exports.AUDIO_FORWARD_ID, " {\n width: 48px;\n height: 48px;\n position: relative;\n align-self: center;\n}\n\n#").concat(exports.AUDIO_CONTROLS_ID, " #").concat(exports.AUDIO_PREVIOUS_ID, " {\n grid-column-start: 1;\n grid-column-end: 2;\n grid-row-start: 1;\n grid-row-end: 2;\n\n justify-self: left;\n}\n\n#").concat(exports.AUDIO_CONTROLS_ID, " #").concat(exports.AUDIO_NEXT_ID, " {\n grid-column-start: 5;\n grid-column-end: 6;\n grid-row-start: 1;\n grid-row-end: 2;\n\n justify-self: right;\n}\n#").concat(exports.AUDIO_CONTROLS_ID, " #").concat(exports.AUDIO_REWIND_ID, " {\n grid-column-start: 2;\n grid-column-end: 3;\n grid-row-start: 1;\n grid-row-end: 2;\n\n justify-self: right;\n}\n#").concat(exports.AUDIO_CONTROLS_ID, " #").concat(exports.AUDIO_FORWARD_ID, " {\n grid-column-start: 4;\n grid-column-end: 5;\n grid-row-start: 1;\n grid-row-end: 2;\n\n justify-self: left;\n}\n:root.").concat(exports.AUDIO_PROGRESS_CLASS, " #").concat(exports.AUDIO_FORWARD_ID, ",\n:root.").concat(exports.AUDIO_PROGRESS_CLASS, " #").concat(exports.AUDIO_REWIND_ID, " {\n display: none;\n}\n\n#").concat(exports.AUDIO_PERCENT_ID, ", #").concat(exports.AUDIO_TIME_ID, ", #").concat(exports.AUDIO_RATE_ID, " {\n font-size: 0.9em !important;\n font-family: sans-serif !important;\n}\n#").concat(exports.AUDIO_PERCENT_ID, ", #").concat(exports.AUDIO_TIME_ID, " {\n margin-top: -0.5em;\n}\n#").concat(exports.AUDIO_RATE_ID, " {\n grid-column-start: 3;\n grid-column-end: 4;\n grid-row-start: 3;\n grid-row-end: 4;\n\n font-size: 0.8em !important;\n width: 4em;\n\n justify-self: center;\n\n text-align: center !important;\n\n mar