@readium/navigator 2.4.0-beta.4 → 2.4.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3622,7 +3622,7 @@ const Ct = class Ct extends bt {
3622
3622
  ), Reflect.defineProperty(t.navigator, "epubReadingSystem", {
3623
3623
  value: {
3624
3624
  name: "readium-ts-toolkit",
3625
- version: "2.4.0-beta.4",
3625
+ version: "2.4.0-beta.5",
3626
3626
  hasFeature: (n, r = "") => {
3627
3627
  switch (n) {
3628
3628
  case "dom-manipulation":
@@ -10083,7 +10083,7 @@ class Be {
10083
10083
  }
10084
10084
  class _s {
10085
10085
  constructor(t) {
10086
- this.audioContext = null, this.sourceNode = null, this.gainNode = null, this.listeners = {}, this.currentPlaybackRate = 1, this.isMutedValue = !1, this.isPlayingValue = !1, this.isPausedValue = !1, this.isLoadingValue = !1, this.isLoadedValue = !1, this.isEndedValue = !1, this.isStoppedValue = !1, this.worklet = null, this.webAudioActive = !1, this.boundOnCanPlayThrough = this.onCanPlayThrough.bind(this), this.boundOnTimeUpdate = this.onTimeUpdate.bind(this), this.boundOnError = this.onError.bind(this), this.boundOnEnded = this.onEnded.bind(this), this.boundOnStalled = this.onStalled.bind(this), this.boundOnEmptied = this.onEmptied.bind(this), this.boundOnSuspend = this.onSuspend.bind(this), this.boundOnWaiting = this.onWaiting.bind(this), this.boundOnLoadedMetadata = this.onLoadedMetadata.bind(this), this.boundOnSeeking = this.onSeeking.bind(this), this.boundOnSeeked = this.onSeeked.bind(this), this.boundOnPlay = this.onPlay.bind(this), this.boundOnPlaying = this.onPlaying.bind(this), this.boundOnPause = this.onPause.bind(this), this.boundOnProgress = this.onProgress.bind(this), this.playback = t.playback, this.mediaElement = document.createElement("audio"), this.setVolume(this.playback.state.volume), this.mediaElement.addEventListener("canplaythrough", this.boundOnCanPlayThrough), this.mediaElement.addEventListener("timeupdate", this.boundOnTimeUpdate), this.mediaElement.addEventListener("error", this.boundOnError), this.mediaElement.addEventListener("ended", this.boundOnEnded), this.mediaElement.addEventListener("stalled", this.boundOnStalled), this.mediaElement.addEventListener("emptied", this.boundOnEmptied), this.mediaElement.addEventListener("suspend", this.boundOnSuspend), this.mediaElement.addEventListener("waiting", this.boundOnWaiting), this.mediaElement.addEventListener("loadedmetadata", this.boundOnLoadedMetadata), this.mediaElement.addEventListener("seeking", this.boundOnSeeking), this.mediaElement.addEventListener("seeked", this.boundOnSeeked), this.mediaElement.addEventListener("play", this.boundOnPlay), this.mediaElement.addEventListener("playing", this.boundOnPlaying), this.mediaElement.addEventListener("pause", this.boundOnPause), this.mediaElement.addEventListener("progress", this.boundOnProgress), this.mediaElement.currentTime = this.playback.state.currentTime;
10086
+ this.audioContext = null, this.sourceNode = null, this.gainNode = null, this.listeners = {}, this.currentVolume = 1, this.currentPlaybackRate = 1, this.isMutedValue = !1, this.isPlayingValue = !1, this.isPausedValue = !1, this.isLoadingValue = !1, this.isLoadedValue = !1, this.isEndedValue = !1, this.isStoppedValue = !1, this.worklet = null, this.webAudioActive = !1, this.boundOnCanPlayThrough = this.onCanPlayThrough.bind(this), this.boundOnTimeUpdate = this.onTimeUpdate.bind(this), this.boundOnError = this.onError.bind(this), this.boundOnEnded = this.onEnded.bind(this), this.boundOnStalled = this.onStalled.bind(this), this.boundOnEmptied = this.onEmptied.bind(this), this.boundOnSuspend = this.onSuspend.bind(this), this.boundOnWaiting = this.onWaiting.bind(this), this.boundOnLoadedMetadata = this.onLoadedMetadata.bind(this), this.boundOnSeeking = this.onSeeking.bind(this), this.boundOnSeeked = this.onSeeked.bind(this), this.boundOnPlay = this.onPlay.bind(this), this.boundOnPlaying = this.onPlaying.bind(this), this.boundOnPause = this.onPause.bind(this), this.boundOnProgress = this.onProgress.bind(this), this.playback = t.playback, this.mediaElement = document.createElement("audio"), this.mediaElement.addEventListener("canplaythrough", this.boundOnCanPlayThrough), this.mediaElement.addEventListener("timeupdate", this.boundOnTimeUpdate), this.mediaElement.addEventListener("error", this.boundOnError), this.mediaElement.addEventListener("ended", this.boundOnEnded), this.mediaElement.addEventListener("stalled", this.boundOnStalled), this.mediaElement.addEventListener("emptied", this.boundOnEmptied), this.mediaElement.addEventListener("suspend", this.boundOnSuspend), this.mediaElement.addEventListener("waiting", this.boundOnWaiting), this.mediaElement.addEventListener("loadedmetadata", this.boundOnLoadedMetadata), this.mediaElement.addEventListener("seeking", this.boundOnSeeking), this.mediaElement.addEventListener("seeked", this.boundOnSeeked), this.mediaElement.addEventListener("play", this.boundOnPlay), this.mediaElement.addEventListener("playing", this.boundOnPlaying), this.mediaElement.addEventListener("pause", this.boundOnPause), this.mediaElement.addEventListener("progress", this.boundOnProgress), this.mediaElement.currentTime = this.playback.state.currentTime;
10087
10087
  }
10088
10088
  /**
10089
10089
  * Adds an event listener to the audio engine.
@@ -10109,15 +10109,15 @@ class _s {
10109
10109
  * */
10110
10110
  loadAudio(t) {
10111
10111
  if (this.isLoadingValue = !0, this.isLoadedValue = !1, this.isPlayingValue = !1, this.isPausedValue = !1, this.webAudioActive) {
10112
- this.mediaElement.crossOrigin = "anonymous", this.mediaElement.src = t, this.mediaElement.load();
10112
+ this.mediaElement.crossOrigin = "anonymous", this.mediaElement.src = t, this.mediaElement.load(), this.mediaElement.playbackRate = this.currentPlaybackRate;
10113
10113
  const e = () => {
10114
10114
  this.mediaElement.removeEventListener("error", i), this.mediaElement.removeEventListener("canplaythrough", n);
10115
10115
  }, i = () => {
10116
- e(), this.deactivateWebAudio(), this.mediaElement.removeAttribute("crossOrigin"), this.mediaElement.src = t, this.mediaElement.load();
10116
+ e(), this.deactivateWebAudio(), this.mediaElement.removeAttribute("crossOrigin"), this.mediaElement.src = t, this.mediaElement.load(), this.mediaElement.playbackRate = this.currentPlaybackRate;
10117
10117
  }, n = () => e();
10118
10118
  this.mediaElement.addEventListener("error", i), this.mediaElement.addEventListener("canplaythrough", n);
10119
10119
  } else
10120
- this.mediaElement.src = t, this.mediaElement.load();
10120
+ this.mediaElement.src = t, this.mediaElement.load(), this.mediaElement.playbackRate = this.currentPlaybackRate;
10121
10121
  }
10122
10122
  deactivateWebAudio() {
10123
10123
  this.worklet && (this.worklet.destroy(), this.worklet = null), this.sourceNode && (this.sourceNode.disconnect(), this.sourceNode = null), this.gainNode && (this.gainNode.disconnect(), this.gainNode = null), this.webAudioActive = !1;
@@ -10127,7 +10127,7 @@ class _s {
10127
10127
  * @param element The HTML audio element to use.
10128
10128
  */
10129
10129
  setMediaElement(t) {
10130
- this.mediaElement.pause(), this.isPlayingValue = !1, this.isPausedValue = !1, this.sourceNode && (this.sourceNode.disconnect(), this.sourceNode = null), this.mediaElement.removeEventListener("canplaythrough", this.boundOnCanPlayThrough), this.mediaElement.removeEventListener("timeupdate", this.boundOnTimeUpdate), this.mediaElement.removeEventListener("error", this.boundOnError), this.mediaElement.removeEventListener("ended", this.boundOnEnded), this.mediaElement.removeEventListener("stalled", this.boundOnStalled), this.mediaElement.removeEventListener("emptied", this.boundOnEmptied), this.mediaElement.removeEventListener("suspend", this.boundOnSuspend), this.mediaElement.removeEventListener("waiting", this.boundOnWaiting), this.mediaElement.removeEventListener("loadedmetadata", this.boundOnLoadedMetadata), this.mediaElement.removeEventListener("seeking", this.boundOnSeeking), this.mediaElement.removeEventListener("seeked", this.boundOnSeeked), this.mediaElement.removeEventListener("play", this.boundOnPlay), this.mediaElement.removeEventListener("playing", this.boundOnPlaying), this.mediaElement.removeEventListener("pause", this.boundOnPause), this.mediaElement.removeEventListener("progress", this.boundOnProgress), this.mediaElement = t, this.mediaElement.addEventListener("canplaythrough", this.boundOnCanPlayThrough), this.mediaElement.addEventListener("timeupdate", this.boundOnTimeUpdate), this.mediaElement.addEventListener("error", this.boundOnError), this.mediaElement.addEventListener("ended", this.boundOnEnded), this.mediaElement.addEventListener("stalled", this.boundOnStalled), this.mediaElement.addEventListener("emptied", this.boundOnEmptied), this.mediaElement.addEventListener("suspend", this.boundOnSuspend), this.mediaElement.addEventListener("waiting", this.boundOnWaiting), this.mediaElement.addEventListener("loadedmetadata", this.boundOnLoadedMetadata), this.mediaElement.addEventListener("seeking", this.boundOnSeeking), this.mediaElement.addEventListener("seeked", this.boundOnSeeked), this.mediaElement.addEventListener("play", this.boundOnPlay), this.mediaElement.addEventListener("playing", this.boundOnPlaying), this.mediaElement.addEventListener("pause", this.boundOnPause), this.mediaElement.addEventListener("progress", this.boundOnProgress), this.mediaElement.volume = this.isMutedValue ? 0 : this.playback.state.volume, this.mediaElement.playbackRate = this.currentPlaybackRate, this.mediaElement.readyState >= 1 && this.onLoadedMetadata(new Event("loadedmetadata")), this.mediaElement.seekable.length > 0 && this.onProgress(), this.mediaElement.readyState >= 4 ? this.onCanPlayThrough() : (this.isLoadingValue = !0, this.isLoadedValue = !1);
10130
+ this.mediaElement.pause(), this.isPlayingValue = !1, this.isPausedValue = !1, this.sourceNode && (this.sourceNode.disconnect(), this.sourceNode = null), this.mediaElement.removeEventListener("canplaythrough", this.boundOnCanPlayThrough), this.mediaElement.removeEventListener("timeupdate", this.boundOnTimeUpdate), this.mediaElement.removeEventListener("error", this.boundOnError), this.mediaElement.removeEventListener("ended", this.boundOnEnded), this.mediaElement.removeEventListener("stalled", this.boundOnStalled), this.mediaElement.removeEventListener("emptied", this.boundOnEmptied), this.mediaElement.removeEventListener("suspend", this.boundOnSuspend), this.mediaElement.removeEventListener("waiting", this.boundOnWaiting), this.mediaElement.removeEventListener("loadedmetadata", this.boundOnLoadedMetadata), this.mediaElement.removeEventListener("seeking", this.boundOnSeeking), this.mediaElement.removeEventListener("seeked", this.boundOnSeeked), this.mediaElement.removeEventListener("play", this.boundOnPlay), this.mediaElement.removeEventListener("playing", this.boundOnPlaying), this.mediaElement.removeEventListener("pause", this.boundOnPause), this.mediaElement.removeEventListener("progress", this.boundOnProgress), this.mediaElement = t, this.mediaElement.addEventListener("canplaythrough", this.boundOnCanPlayThrough), this.mediaElement.addEventListener("timeupdate", this.boundOnTimeUpdate), this.mediaElement.addEventListener("error", this.boundOnError), this.mediaElement.addEventListener("ended", this.boundOnEnded), this.mediaElement.addEventListener("stalled", this.boundOnStalled), this.mediaElement.addEventListener("emptied", this.boundOnEmptied), this.mediaElement.addEventListener("suspend", this.boundOnSuspend), this.mediaElement.addEventListener("waiting", this.boundOnWaiting), this.mediaElement.addEventListener("loadedmetadata", this.boundOnLoadedMetadata), this.mediaElement.addEventListener("seeking", this.boundOnSeeking), this.mediaElement.addEventListener("seeked", this.boundOnSeeked), this.mediaElement.addEventListener("play", this.boundOnPlay), this.mediaElement.addEventListener("playing", this.boundOnPlaying), this.mediaElement.addEventListener("pause", this.boundOnPause), this.mediaElement.addEventListener("progress", this.boundOnProgress), this.mediaElement.volume = this.isMutedValue ? 0 : this.currentVolume, this.mediaElement.playbackRate = this.currentPlaybackRate, this.mediaElement.readyState >= 1 && this.onLoadedMetadata(new Event("loadedmetadata")), this.mediaElement.seekable.length > 0 && this.onProgress(), this.mediaElement.readyState >= 4 ? this.onCanPlayThrough() : (this.isLoadingValue = !0, this.isLoadedValue = !1);
10131
10131
  }
10132
10132
  // Ensure AudioContext is running
10133
10133
  async ensureAudioContextRunning() {
@@ -10219,14 +10219,14 @@ class _s {
10219
10219
  */
10220
10220
  setVolume(t) {
10221
10221
  if (t < 0) {
10222
- this.mediaElement.volume = 0, this.gainNode && (this.gainNode.gain.value = 0), this.isMutedValue = !0, this.playback.state.volume = 0;
10222
+ this.currentVolume = 0, this.mediaElement.volume = 0, this.gainNode && (this.gainNode.gain.value = 0), this.isMutedValue = !0;
10223
10223
  return;
10224
10224
  }
10225
10225
  if (t > 1) {
10226
10226
  this.setVolume(t / 100);
10227
10227
  return;
10228
10228
  }
10229
- this.mediaElement.volume = t, this.gainNode && (this.gainNode.gain.value = t), this.playback.state.volume = t;
10229
+ this.currentVolume = t, this.mediaElement.volume = t, this.gainNode && (this.gainNode.gain.value = t);
10230
10230
  }
10231
10231
  /**
10232
10232
  * Skips [seconds] either forward or backward if [seconds] is negative.
@@ -10641,7 +10641,7 @@ class Os extends hr {
10641
10641
  preferences: {},
10642
10642
  defaults: {}
10643
10643
  }) {
10644
- if (super(), this.positionPollInterval = null, this.navigationId = 0, this._preferencesEditor = null, this._navigatorProtector = null, this._keyboardPeripheralsManager = null, this._suspiciousActivityListener = null, this._keyboardPeripheralListener = null, this.pub = t, this.listeners = Ls(e), this._preferences = new oe(n.preferences), this._defaults = new Ps(n.defaults), this._settings = new Fi(this._preferences, this._defaults), i)
10644
+ if (super(), this.positionPollInterval = null, this.navigationId = 0, this._preferencesEditor = null, this._mediaSessionEnabled = !1, this._navigatorProtector = null, this._keyboardPeripheralsManager = null, this._suspiciousActivityListener = null, this._keyboardPeripheralListener = null, this.pub = t, this.listeners = Ls(e), this._preferences = new oe(n.preferences), this._defaults = new Ps(n.defaults), this._settings = new Fi(this._preferences, this._defaults), i)
10645
10645
  this.currentLocation = this.ensureLocatorLocations(i);
10646
10646
  else {
10647
10647
  const u = this.pub.readingOrder.items[0];
@@ -10661,8 +10661,7 @@ class Os extends hr {
10661
10661
  playback: {
10662
10662
  state: {
10663
10663
  currentTime: a,
10664
- duration: 0,
10665
- volume: this._settings.volume
10664
+ duration: 0
10666
10665
  },
10667
10666
  playWhenReady: !1,
10668
10667
  index: o
@@ -10678,7 +10677,7 @@ class Os extends hr {
10678
10677
  m === "context_menu" ? this.listeners.contextMenu(y) : this.listeners.contentProtection(m, y);
10679
10678
  }, window.addEventListener(st, this._suspiciousActivityListener)), c.length > 0 && (this._keyboardPeripheralsManager = new He({ keyboardPeripherals: c }), this._keyboardPeripheralListener = (u) => {
10680
10679
  this.listeners.peripheral(u.detail);
10681
- }, window.addEventListener(ot, this._keyboardPeripheralListener)), this.setupEventListeners(), this._settings.enableMediaSession && this.setupMediaSession(), this.pool.setCurrentAudio(o, "forward"), this.waitForLoadedAndSeeked(a).then(() => {
10680
+ }, window.addEventListener(ot, this._keyboardPeripheralListener)), this.setupEventListeners(), this.applyPreferences(), this.pool.setCurrentAudio(o, "forward"), this.waitForLoadedAndSeeked(a).then(() => {
10682
10681
  this.listeners.trackLoaded(this.pool.audioEngine.getMediaElement()), this.listeners.positionChanged(this.currentLocator);
10683
10682
  }).catch(() => {
10684
10683
  });
@@ -10693,8 +10692,7 @@ class Os extends hr {
10693
10692
  this._preferences = this._preferences.merging(t), this.applyPreferences();
10694
10693
  }
10695
10694
  applyPreferences() {
10696
- const t = this._settings;
10697
- this._settings = new Fi(this._preferences, this._defaults), this._preferencesEditor !== null && (this._preferencesEditor = new Ni(this._preferences, this.settings)), this.pool.audioEngine.setVolume(this._settings.volume), this.pool.audioEngine.setPlaybackRate(this._settings.playbackRate, this._settings.preservePitch), this._settings.enableMediaSession && !t.enableMediaSession ? this.setupMediaSession() : !this._settings.enableMediaSession && t.enableMediaSession && this.destroyMediaSession();
10695
+ this._settings = new Fi(this._preferences, this._defaults), this._preferencesEditor !== null && (this._preferencesEditor = new Ni(this._preferences, this.settings)), this.pool.audioEngine.setVolume(this._settings.volume), this.pool.audioEngine.setPlaybackRate(this._settings.playbackRate, this._settings.preservePitch), this._settings.enableMediaSession && !this._mediaSessionEnabled ? (this._mediaSessionEnabled = !0, this.setupMediaSession()) : !this._settings.enableMediaSession && this._mediaSessionEnabled && (this._mediaSessionEnabled = !1, this.destroyMediaSession());
10698
10696
  }
10699
10697
  get publication() {
10700
10698
  return this.pub;
@@ -55,7 +55,7 @@
55
55
  body::-webkit-scrollbar {
56
56
  display: none; /* for Chrome, Safari, and Opera */
57
57
  }
58
- `,e.document.head.appendChild(i),this.resizeObserver=new ResizeObserver(()=>{this.resizeDebounce&&this.wnd.clearTimeout(this.resizeDebounce),this.isResizing=!0,this.resizeDebounce=this.wnd.setTimeout(()=>{this.isResizing=!1,this.resizeDebounce=null,this.reportProgress()},50)}),this.resizeObserver.observe(e.document.body),e.addEventListener("scroll",this.handleScroll,{passive:!0}),t.register("force_webkit_recalc",H.moduleName,()=>{Hi(this.wnd);const n=this.doc().scrollTop;n>1?this.doc().scrollTop=n-1:this.doc().scrollTop=n+1,this.doc().scrollTop=n}),t.register("go_progression",H.moduleName,(n,r)=>{const s=n;if(s<0||s>1){t.send("error",{message:"go_progression must be given a position from 0.0 to 1.0"}),r(!1);return}this.wnd.requestAnimationFrame(()=>{this.doc().scrollTop=this.doc().offsetHeight*s,this.reportProgress(),I(this.wnd),r(!0)})}),t.register("go_id",H.moduleName,(n,r)=>{const s=e.document.getElementById(n);if(!s){r(!1);return}this.wnd.requestAnimationFrame(()=>{this.doc().scrollTop=s.getBoundingClientRect().top+e.scrollY-e.innerHeight/2,this.reportProgress(),I(this.wnd),r(!0)})}),t.register("go_text",H.moduleName,(n,r)=>{let s;Array.isArray(n)&&(n.length>1&&(s=n[1]),n=n[0]);const a=oe.deserialize(n),l=Ze(this.wnd.document,new N({href:e.location.href,type:"text/html",text:a,locations:s?new k({otherLocations:new Map([["cssSelector",s]])}):void 0}));if(!l){r(!1);return}this.wnd.requestAnimationFrame(()=>{this.doc().scrollTop=l.getBoundingClientRect().top+e.scrollY-e.innerHeight/2,this.reportProgress(),I(this.wnd),r(!0)})}),t.register("go_start",H.moduleName,(n,r)=>{if(this.doc().scrollTop===0)return r(!1);this.doc().scrollTop=0,this.reportProgress(),r(!0)}),t.register("go_end",H.moduleName,(n,r)=>{if(this.doc().scrollTop===this.doc().scrollHeight-this.doc().offsetHeight)return r(!1);this.doc().scrollTop=this.doc().scrollHeight-this.doc().offsetHeight,this.reportProgress(),r(!0)}),t.register("unfocus",H.moduleName,(n,r)=>{I(this.wnd),r(!0)}),t.register("scroll_protection",H.moduleName,(n,r)=>{this.enableScrollProtection(),r(!0)}),t.register(["go_next","go_prev"],H.moduleName,(n,r)=>r(!1)),t.register("focus",H.moduleName,(n,r)=>{this.reportProgress(),r(!0)}),t.register("first_visible_locator",H.moduleName,(n,r)=>{const s=Rt(e,!0);this.comms.send("first_visible_locator",s.serialize()),r(!0)}),t.log("ScrollSnapper Mounted"),!0}unmount(e,t){return t.unregisterAll(H.moduleName),this.resizeObserver.disconnect(),this.handleScroll&&e.removeEventListener("scroll",this.handleScroll),e.document.getElementById($i)?.remove(),this.patternAnalyzer&&(this.patternAnalyzer.clear(),this.patternAnalyzer=null,this.isScrollProtectionEnabled=!1),t.log("ScrollSnapper Unmounted"),!0}};H.moduleName="scroll_snapper";let Tt=H;const B=class B extends Re{constructor(){super(...arguments),this.patternAnalyzer=null,this.lastScrollTime=0,this.isScrollProtectionEnabled=!1,this.initialScrollHandled=!1,this.isScrolling=!1,this.lastScrollTop=0,this.isResizing=!1,this.resizeDebounce=null,this.handleScroll=e=>{if(this.comms.ready&&!this.isResizing){if(!this.initialScrollHandled){this.lastScrollTop=this.doc().scrollTop,this.initialScrollHandled=!0,this.reportProgress();return}this.isScrolling||(this.isScrolling=!0,this.wnd.requestAnimationFrame(()=>{this.reportProgress();const t=this.doc().scrollTop,i=t-this.lastScrollTop;if(this.lastScrollTop=t,this.isScrollProtectionEnabled&&Math.abs(i)>5){const n=Date.now(),r=n-(this.lastScrollTime||n);if(this.patternAnalyzer&&this.patternAnalyzer.analyze(i>0?"down":"up",Math.abs(i),r)){const a=e.target&&"tagName"in e.target?{tagName:e.target.tagName}:null;this.comms?.send("content_protection",{type:"suspicious_scrolling",timestamp:Date.now(),scrollDelta:i,scrollDirection:i>0?"down":"up",targetElement:a})}this.lastScrollTime=n}this.comms.send("scroll",i),this.isScrolling=!1}))}}}doc(){return this.wnd.document.scrollingElement}reportProgress(){if(!this.comms.ready)return;const e=Math.ceil(this.doc().scrollTop),t=this.doc().scrollHeight,i=this.wnd.innerHeight,n=Math.max(0,Math.min(1,e/t)),r=Math.max(0,Math.min(1,(e+i)/t));this.comms.send("progress",{start:n,end:r})}enableScrollProtection(){this.patternAnalyzer||(this.patternAnalyzer=new At(ji),this.isScrollProtectionEnabled=!0,this.comms?.log("Scroll protection enabled"))}mount(e,t){return this.wnd=e,this.comms=t,this.initialScrollHandled=!1,this.lastScrollTop=0,this.isResizing=!1,this.resizeDebounce&&(this.wnd.clearTimeout(this.resizeDebounce),this.resizeDebounce=null),this.resizeObserver=new ResizeObserver(()=>{this.resizeDebounce&&this.wnd.clearTimeout(this.resizeDebounce),this.isResizing=!0,this.resizeDebounce=this.wnd.setTimeout(()=>{this.isResizing=!1,this.resizeDebounce=null,this.reportProgress()},50)}),this.resizeObserver.observe(e.document.body),e.addEventListener("scroll",this.handleScroll,{passive:!0}),t.register("force_webkit_recalc",B.moduleName,()=>{Hi(this.wnd);const i=this.doc().scrollTop;i>1?this.doc().scrollTop=i-1:this.doc().scrollTop=i+1,this.doc().scrollTop=i}),t.register("go_progression",B.moduleName,(i,n)=>{const r=i;if(r<0||r>1){t.send("error",{message:"go_progression must be given a position from 0.0 to 1.0"}),n(!1);return}this.wnd.requestAnimationFrame(()=>{this.doc().scrollTop=this.doc().offsetHeight*r,this.reportProgress(),I(this.wnd),n(!0)})}),t.register("go_id",B.moduleName,(i,n)=>{const r=e.document.getElementById(i);if(!r){n(!1);return}this.wnd.requestAnimationFrame(()=>{this.doc().scrollTop=r.getBoundingClientRect().top+e.scrollY-e.innerHeight/2,this.reportProgress(),I(this.wnd),n(!0)})}),t.register("go_text",B.moduleName,(i,n)=>{let r;Array.isArray(i)&&(i.length>1&&(r=i[1]),i=i[0]);const s=oe.deserialize(i),a=Ze(this.wnd.document,new N({href:e.location.href,type:"text/html",text:s,locations:r?new k({otherLocations:new Map([["cssSelector",r]])}):void 0}));if(!a){n(!1);return}this.wnd.requestAnimationFrame(()=>{this.doc().scrollTop=a.getBoundingClientRect().top+e.scrollY-e.innerHeight/2,this.reportProgress(),I(this.wnd),n(!0)})}),t.register("go_start",B.moduleName,(i,n)=>{if(this.doc().scrollTop===0)return n(!1);this.doc().scrollTop=0,this.reportProgress(),n(!0)}),t.register("go_end",B.moduleName,(i,n)=>{if(this.doc().scrollTop===this.doc().scrollHeight-this.doc().offsetHeight)return n(!1);this.doc().scrollTop=this.doc().scrollHeight-this.doc().offsetHeight,this.reportProgress(),n(!0)}),t.register("unfocus",B.moduleName,(i,n)=>{I(this.wnd),n(!0)}),t.register("scroll_protection",B.moduleName,(i,n)=>{this.enableScrollProtection(),n(!0)}),t.register(["go_next","go_prev"],B.moduleName,(i,n)=>n(!1)),t.register("focus",B.moduleName,(i,n)=>{this.reportProgress(),n(!0)}),t.register("first_visible_locator",B.moduleName,(i,n)=>{const r=Rt(e,!0);t.send("first_visible_locator",r.serialize()),n(!0)}),t.log("WebPubSnapper Mounted"),!0}unmount(e,t){return t.unregisterAll(B.moduleName),this.resizeObserver.disconnect(),this.handleScroll&&e.removeEventListener("scroll",this.handleScroll),this.patternAnalyzer&&(this.patternAnalyzer.clear(),this.patternAnalyzer=null,this.isScrollProtectionEnabled=!1),t.log("WebPubSnapper Unmounted"),!0}};B.moduleName="webpub_snapper";let zt=B;class Cr{constructor(e,t){this.window=e,this.copyHistory=[],this.lastSelectionLength=0,this.lastSelectionTime=0,this.options=t}cleanupOldHistory(e){this.copyHistory=this.copyHistory.filter(i=>e-i.timestamp<1e4),this.copyHistory.length>this.options.historySize&&(this.copyHistory=this.copyHistory.slice(-this.options.historySize))}isSuspiciousPattern(e){return this.copyHistory.length<3?!1:this.copyHistory.filter(n=>e-n.timestamp<2e3).length>=3?!0:this.copyHistory.slice().sort((n,r)=>n.timestamp-r.timestamp).every((n,r,s)=>r===0?!0:n.length>s[r-1].length*1.5)}shouldAllowCopy(e){if(!this.options.enabled)return!0;const t=this.window.getSelection();if(!t)return!0;const n=t.toString().length,r=this.window.document.body.innerText.length,s=Date.now();if(this.cleanupOldHistory(s),n<this.options.minThreshold)return this.copyHistory.push({timestamp:s,length:n,wasBlocked:!1}),!0;const l=s-this.lastSelectionTime<100&&n>this.lastSelectionLength*1.5,c=Math.min(r*this.options.maxSelectionPercent,this.options.absoluteMaxChars),h=this.isSuspiciousPattern(s),u=n>c||l||h;return this.copyHistory.push({timestamp:s,length:n,wasBlocked:u}),u?(e?.preventDefault(),!1):(this.lastSelectionLength=n,this.lastSelectionTime=s,!0)}destroy(){this.lastSelectionLength=0,this.lastSelectionTime=0,this.copyHistory=[],this.options.enabled=!1}}class xr{constructor(e=Gi){this.options=e,this.events=[],this.selectionStartTime=0,this.lastSelectionTime=0,this.lastSelectionPosition=0,this.selectionPatterns=[],this.lastSelectedText=""}analyze(e){if(!e)return this.clear(),!1;const t=e.toString();if(t.length===0)return this.clear(),!1;if(e.type!=="Range"||!e.rangeCount)return!1;const i=Date.now();if(t.length<=50||t===this.lastSelectedText)return!1;if(this.selectionStartTime===0)return this.selectionStartTime=i,this.lastSelectedText=t,!1;if(i-this.selectionStartTime<500)return!1;i-this.lastSelectionTime>1e3&&(this.lastSelectionTime=i),this.selectionStartTime===0&&(this.selectionStartTime=i),this.lastSelectedText=t;const r=this.analyzeSelectionPattern(e,i);return this.cleanup(i),r}analyzeSelectionPattern(e,t){if(!e.rangeCount)return!1;const i=e.getRangeAt(0),n=i.toString(),r=(t-this.selectionStartTime)/1e3;if(n.length/Math.max(1,r)>this.options.maxSelectionsPerSecond)return!0;const a=i.startOffset,l=Math.abs(a-this.lastSelectionPosition);return this.selectionPatterns.push(l),this.selectionPatterns.length>this.options.historySize&&(this.selectionPatterns.shift(),this.calculateVariance(this.selectionPatterns)<this.options.minVariance)?!0:(this.lastSelectionPosition=a,!1)}calculateVariance(e){if(e.length===0)return 0;const t=e.reduce((i,n)=>i+n,0)/e.length;return e.reduce((i,n)=>i+Math.pow(n-t,2),0)/e.length}cleanup(e){this.events=this.events.filter(t=>e-t.timestamp<=1e3)}clear(){this.events=[],this.selectionStartTime=0,this.lastSelectionTime=0,this.lastSelectionPosition=0,this.selectionPatterns=[],this.lastSelectedText=""}}class qi{match(e,t){for(const i of t){const n=e.keyCode===i.keyCode,r=i.ctrl===void 0||e.ctrlKey===i.ctrl,s=i.shift===void 0||e.shiftKey===i.shift,a=i.alt===void 0||e.altKey===i.alt,l=i.meta===void 0||e.metaKey===i.meta;if(n&&r&&s&&a&&l)return!0}return!1}createKeyHandler(e,t){return i=>{this.match(i,e)&&(i.preventDefault(),i.stopPropagation(),t(i))}}createActivityEvent(e,t,i,n){let r;if(n){const s=n.getSelection(),a=s?.toString()||"",c=(a&&s?.rangeCount?s.getRangeAt(0)?.getClientRects():null)?.[0];c&&a&&(r={text:a,x:c.x,y:c.y,width:c.width,height:c.height})}return{type:t,timestamp:Date.now(),key:e.key,code:e.code,keyCode:e.keyCode,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,metaKey:e.metaKey,targetFrameSrc:i,selectedText:r}}createKeyboardHandlers(e,t,i,n){const r=[];return t.forEach(s=>{r.push(...s.keyCombos.map(a=>({...a,handler:l=>{const c=s.type,h=this.createActivityEvent(l,c,e,n);i(h)}})))}),r}createUnifiedHandler(e,t,i,n){const r=this.createKeyboardHandlers(e,t,i,n);return s=>{for(const a of r)if(this.match(s,[a])){s.preventDefault(),s.stopPropagation(),a.handler(s);return}}}}const ke=class ke extends ge{constructor(){super(...arguments),this.configApplied=!1,this.cleanupCallbacks=[],this.pointerMoved=!1,this.isContextMenuEnabled=!1,this.isDragAndDropEnabled=!1,this.isSelectionMonitoringEnabled=!1,this.isBulkCopyProtectionEnabled=!1,this.selectionAnalyzer=null,this.currentSelection=null,this.bulkCopyProtector=null,this.keyManager=new qi,this.keyDownHandler=null,this.preventBulkCopy=e=>{if(!this.isBulkCopyProtectionEnabled||!this.bulkCopyProtector)return!0;if(!this.bulkCopyProtector.shouldAllowCopy(e)){e.preventDefault();const t=this.wnd.getSelection(),i=t?.toString()||"",r=(i?t?.getRangeAt(0)?.getClientRects():null)?.[0],s={type:"bulk_copy",timestamp:Date.now(),clipboardTypes:e.clipboardData?.types?[...e.clipboardData.types]:[],selectedText:r?{text:i,x:r.x,y:r.y,width:r.width,height:r.height}:void 0,selectionLength:i.length,targetFrameSrc:this.wnd.location.href};return this.comms?.send("content_protection",s),!1}return!0},this.handleSelection=e=>{if(!this.isSelectionMonitoringEnabled||!this.wnd||!this.selectionAnalyzer)return;const t=this.wnd.getSelection();if(t){if(this.currentSelection=t.toString(),this.selectionAnalyzer.analyze(t)&&this.currentSelection){const n=this.wnd.getSelection(),r=n?.toString()||"",a=(r&&n?.rangeCount?n.getRangeAt(0)?.getClientRects():null)?.[0],l={type:"suspicious_selection",timestamp:Date.now(),selectionLength:r.length,selectedText:{text:r,x:a?.x??0,y:a?.y??0,width:a?.width??0,height:a?.height??0},eventType:e?.type||"selectionchange",targetFrameSrc:this.wnd.location.href};this.comms?.send("content_protection",l)}}else this.currentSelection=null},this.onDragStart=e=>{if(this.isDragAndDropEnabled){e.preventDefault();const t={type:"drag_detected",timestamp:Date.now(),dataTransferTypes:e.dataTransfer?.types?[...e.dataTransfer.types]:[],targetFrameSrc:this.wnd.location.href};return this.comms?.send("content_protection",t),!1}else return!0},this.onDrop=e=>{if(this.isDragAndDropEnabled){e.preventDefault();const t=e.dataTransfer,i={type:"drop_detected",timestamp:Date.now(),dataTransferTypes:t?.types?[...t.types]:[],fileCount:t?.files?.length||0,targetFrameSrc:this.wnd.location.href};return this.comms?.send("content_protection",i),!1}else return!0},this.onContext=e=>{if(this.isContextMenuEnabled){e.preventDefault();const t=this.wnd.getSelection(),i=t?.toString()||"",r=(i&&t?.rangeCount?t.getRangeAt(0)?.getClientRects():null)?.[0],s={timestamp:Date.now(),clientX:e.clientX,clientY:e.clientY,...r&&{selectedText:{text:i,x:r.x,y:r.y,width:r.width,height:r.height}},targetFrameSrc:this.wnd.location.href};this.comms?.send("context_menu",s)}},this.onPointerUp=this.onPointUp.bind(this),this.onPointerMove=this.onPointMove.bind(this),this.onPointerDown=this.onPointDown.bind(this),this.onClicker=this.onClick.bind(this)}addContextMenuPrevention(){this.isContextMenuEnabled||!this.wnd||(this.wnd.document.addEventListener("contextmenu",this.onContext),this.isContextMenuEnabled=!0)}removeContextMenuPrevention(){!this.isContextMenuEnabled||!this.wnd||(this.wnd.document.removeEventListener("contextmenu",this.onContext),this.isContextMenuEnabled=!1)}addDragAndDropPrevention(){this.isDragAndDropEnabled||!this.wnd||(this.wnd.document.addEventListener("dragstart",this.onDragStart),this.wnd.document.addEventListener("drop",this.onDrop),this.isDragAndDropEnabled=!0)}removeDragAndDropPrevention(){!this.isDragAndDropEnabled||!this.wnd||(this.wnd.document.removeEventListener("dragstart",this.onDragStart),this.wnd.document.removeEventListener("drop",this.onDrop),this.isDragAndDropEnabled=!1)}enableKeyboardPeripherals(e=[]){this.disableKeyboardPeripherals();const t=i=>{this.comms?.send("keyboard_peripherals",i)};this.keyDownHandler=this.keyManager.createUnifiedHandler(this.wnd.location.href,e,t,this.wnd),this.wnd&&this.wnd.document.addEventListener("keydown",this.keyDownHandler,{capture:!0})}disableKeyboardPeripherals(){this.wnd&&this.keyDownHandler&&(this.wnd.document.removeEventListener("keydown",this.keyDownHandler,{capture:!0}),this.keyDownHandler=null)}addBulkCopyProtection(e={}){if(this.isBulkCopyProtectionEnabled||!this.wnd)return;const t=Er,i=e?{...t,...e}:t;this.bulkCopyProtector=new Cr(this.wnd,i),this.wnd.document.addEventListener("copy",this.preventBulkCopy,!0),this.wnd.document.addEventListener("cut",this.preventBulkCopy,!0),this.isBulkCopyProtectionEnabled=!0}removeBulkCopyProtection(){!this.isBulkCopyProtectionEnabled||!this.wnd||(this.wnd.document.removeEventListener("copy",this.preventBulkCopy,!0),this.wnd.document.removeEventListener("cut",this.preventBulkCopy,!0),this.bulkCopyProtector?.destroy(),this.bulkCopyProtector=null,this.isBulkCopyProtectionEnabled=!1)}addSelectionMonitoring(e){if(this.isSelectionMonitoringEnabled||!this.wnd)return;const t=e||Gi;this.selectionAnalyzer=new xr(t),this.wnd.document.addEventListener("selectionchange",this.handleSelection),this.isSelectionMonitoringEnabled=!0}removeSelectionMonitoring(){!this.isSelectionMonitoringEnabled||!this.wnd||(this.wnd.document.removeEventListener("selectionchange",this.handleSelection),this.selectionAnalyzer?.clear(),this.selectionAnalyzer=null,this.isSelectionMonitoringEnabled=!1)}onPointUp(e){const t=this.wnd.getSelection();if(t&&t.toString()?.length>0){const n=t.getRangeAt(0)?.getClientRects();if(!n||n.length===0)return;const r=n[0],s={text:t.toString(),x:r.x,y:r.y,width:r.width,height:r.height,targetFrameSrc:this.wnd?.location?.href};this.comms.send("text_selected",s)}if(this.pointerMoved){this.pointerMoved=!1;return}if(!t?.isCollapsed||!e.isPrimary)return;const i=this.wnd.devicePixelRatio;e.preventDefault(),this.comms.send(e.pointerType==="touch"?"tap":"click",{defaultPrevented:e.defaultPrevented,x:e.clientX*i,y:e.clientY*i,targetFrameSrc:this.wnd.location.href,targetElement:e.target.outerHTML,interactiveElement:Bi(e.target)?.outerHTML,cssSelector:this.wnd._readium_cssSelectorGenerator.getCssSelector(e.target)}),this.pointerMoved=!1}onPointMove(e){if(e.movementY!==void 0&&e.movementX!==void 0){(Math.abs(e.movementX)>1||Math.abs(e.movementY)>1)&&(this.pointerMoved=!0);return}this.pointerMoved=!0}onPointDown(){this.pointerMoved=!1}onClick(e){if(e.preventDefault(),!e.isTrusted){const t=new PointerEvent("pointerup",{isPrimary:!0,pointerType:"mouse",clientX:e.clientX,clientY:e.clientY});Object.defineProperty(t,"target",{writable:!1,value:e.target}),Object.defineProperty(t,"defaultPrevented",{writable:!1,value:e.defaultPrevented}),this.onPointUp(t)}}registerProtectionHandlers(){this.comms?.register("peripherals_protection",ke.moduleName,(e,t)=>{const i=e;if(!this.configApplied){if(this.configApplied=!0,i.monitorSelection){const n=typeof i.monitorSelection=="boolean"?void 0:i.monitorSelection;this.addSelectionMonitoring(n),this.comms?.log("Selection monitoring enabled")}typeof i.protectCopy=="object"?(this.addBulkCopyProtection({enabled:!0,...i.protectCopy}),this.comms?.log("Copy protection enabled (limited)")):i.protectCopy===!0&&(this.addBulkCopyProtection({enabled:!0,maxSelectionPercent:0,minThreshold:0,absoluteMaxChars:0}),this.comms?.log("Copy protection enabled")),i.disableContextMenu&&(this.addContextMenuPrevention(),this.comms?.log("Context menu protection enabled")),i.disableDragAndDrop&&(this.addDragAndDropPrevention(),this.comms?.log("Drag and drop protection enabled"))}t(!0)}),this.comms?.register("keyboard_peripherals",ke.moduleName,(e,t)=>{const i=e;i&&i.length>0&&(this.enableKeyboardPeripherals(i),this.comms?.log(`Keyboard peripherals enabled: ${i.map(n=>n.type).join(", ")}`)),t(!0)})}mount(e,t){return this.wnd=e,this.comms=t,this.registerProtectionHandlers(),e.document.addEventListener("pointerdown",this.onPointerDown),e.document.addEventListener("pointerup",this.onPointerUp),e.document.addEventListener("pointermove",this.onPointerMove),e.document.addEventListener("click",this.onClicker),t.log("Peripherals Mounted"),!0}unmount(e,t){return this.removeBulkCopyProtection(),this.removeSelectionMonitoring(),this.removeContextMenuPrevention(),this.removeDragAndDropPrevention(),this.disableKeyboardPeripherals(),this.cleanupCallbacks.forEach(i=>i()),this.cleanupCallbacks=[],e.document.removeEventListener("pointerdown",this.onPointerDown),e.document.removeEventListener("pointerup",this.onPointerUp),e.document.removeEventListener("pointermove",this.onPointerMove),e.document.removeEventListener("click",this.onClicker),t.unregisterAll(ke.moduleName),this.configApplied=!1,t.log("Peripherals Unmounted"),!0}};ke.moduleName="peripherals";let Mt=ke;const Ge=class Ge extends ge{constructor(){super(...arguments),this.mediaPlayingCount=0,this.allAnimations=new Set}wndOnErr(e){this.comms?.send("error",{message:e.message,filename:e.filename,lineno:e.lineno,colno:e.colno})}unblock(e){for(e._readium_blockEvents=!1;e._readium_blockedEvents?.length>0;){const t=e._readium_blockedEvents.shift();switch(t[0]){case 0:Reflect.apply(t[1],t[2],t[3]);break;case 1:const i=t[1],n=t[2];e.removeEventListener(i.type,e._readium_eventBlocker,!0);const r=new Event(i.type,{bubbles:i.bubbles,cancelable:i.cancelable});n?n.dispatchEvent(r):e.dispatchEvent(r);break}}}onMediaPlayEvent(){this.mediaPlayingCount++,this.comms?.send("media_play",this.mediaPlayingCount)}onMediaPauseEvent(){this.mediaPlayingCount>0&&this.mediaPlayingCount--,this.comms?.send("media_pause",this.mediaPlayingCount)}pauseAllMedia(e){const t=e.document.querySelectorAll("audio,video");for(let i=0;i<t.length;i++)t[i].pause()}mount(e,t){this.comms=t,e.addEventListener("error",this.wndOnErr,!1),Reflect.defineProperty(e.navigator,"epubReadingSystem",{value:{name:"readium-ts-toolkit",version:"2.4.0-beta.4",hasFeature:(n,r="")=>{switch(n){case"dom-manipulation":return!0;case"layout-changes":return!0;case"touch-events":return!0;case"mouse-events":return!0;case"keyboard-events":return!0;case"spine-scripting":return!0;case"embedded-web-content":return!0;default:return!1}}},writable:!1}),"getAnimations"in e.document&&e.document.getAnimations().forEach(n=>{n.cancel(),this.allAnimations.add(n)}),t.register("activate",Ge.moduleName,(n,r)=>{this.allAnimations.forEach(s=>{s.cancel(),s.play()}),r(!0)}),t.register("unfocus",Ge.moduleName,(n,r)=>{this.pauseAllMedia(e),this.allAnimations.forEach(s=>s.pause()),r(!0)});const i=e.document.querySelectorAll("audio,video");for(let n=0;n<i.length;n++){const r=i[n];r.addEventListener("play",this.onMediaPlayEvent,{passive:!0}),r.addEventListener("pause",this.onMediaPauseEvent,{passive:!0})}return t.log("Setup Mounted"),!0}unmount(e,t){return e.removeEventListener("error",this.wndOnErr),e.removeEventListener("play",this.onMediaPlayEvent),e.removeEventListener("pause",this.onMediaPauseEvent),this.allAnimations.forEach(i=>i.cancel()),this.allAnimations.clear(),t.log("Setup Unmounted"),!0}};Ge.moduleName="setup";let nt=Ge;const Yi="readium-viewport",ee=class ee extends nt{onViewportWidthChanged(e){const t=e.target;xe(t,"--RS__viewportWidth",`${t.innerWidth}px`)}mount(e,t){if(!super.mount(e,t))return!1;const i=e.document.createElement("meta");return i.dataset.readium="true",i.setAttribute("name","viewport"),i.setAttribute("id",Yi),i.setAttribute("content","width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no"),e.document.head.appendChild(i),e.addEventListener("orientationchange",this.onViewportWidthChanged),e.addEventListener("resize",this.onViewportWidthChanged),this.onViewportWidthChanged({target:e}),t.register("get_properties",ee.moduleName,(n,r)=>{_t(e),r(!0)}),t.register("update_properties",ee.moduleName,(n,r)=>{n["--RS__viewportWidth"]=`${e.innerWidth}px`,Ti(e,n),r(!0)}),t.register("set_property",ee.moduleName,(n,r)=>{const s=n;xe(e,s[0],s[1]),r(!0)}),t.register("remove_property",ee.moduleName,(n,r)=>{et(e,n),r(!0)}),t.register("activate",ee.moduleName,(n,r)=>{this.unblock(e),r(!0)}),t.log("ReflowableSetup Mounted"),!0}unmount(e,t){return t.unregisterAll(ee.moduleName),e.document.head.querySelector(`#${Yi}`)?.remove(),e.removeEventListener("orientationchange",this.onViewportWidthChanged),t.log("ReflowableSetup Unmounted"),super.unmount(e,t)}};ee.moduleName="reflowable_setup";let It=ee;const Ki="readium-fixed-style",J=class J extends nt{mount(e,t){if(!super.mount(e,t))return!1;e.navigator.epubReadingSystem&&(e.navigator.epubReadingSystem.layoutStyle="paginated");const i=e.document.createElement("style");return i.id=Ki,i.dataset.readium="true",i.textContent=`
58
+ `,e.document.head.appendChild(i),this.resizeObserver=new ResizeObserver(()=>{this.resizeDebounce&&this.wnd.clearTimeout(this.resizeDebounce),this.isResizing=!0,this.resizeDebounce=this.wnd.setTimeout(()=>{this.isResizing=!1,this.resizeDebounce=null,this.reportProgress()},50)}),this.resizeObserver.observe(e.document.body),e.addEventListener("scroll",this.handleScroll,{passive:!0}),t.register("force_webkit_recalc",H.moduleName,()=>{Hi(this.wnd);const n=this.doc().scrollTop;n>1?this.doc().scrollTop=n-1:this.doc().scrollTop=n+1,this.doc().scrollTop=n}),t.register("go_progression",H.moduleName,(n,r)=>{const s=n;if(s<0||s>1){t.send("error",{message:"go_progression must be given a position from 0.0 to 1.0"}),r(!1);return}this.wnd.requestAnimationFrame(()=>{this.doc().scrollTop=this.doc().offsetHeight*s,this.reportProgress(),I(this.wnd),r(!0)})}),t.register("go_id",H.moduleName,(n,r)=>{const s=e.document.getElementById(n);if(!s){r(!1);return}this.wnd.requestAnimationFrame(()=>{this.doc().scrollTop=s.getBoundingClientRect().top+e.scrollY-e.innerHeight/2,this.reportProgress(),I(this.wnd),r(!0)})}),t.register("go_text",H.moduleName,(n,r)=>{let s;Array.isArray(n)&&(n.length>1&&(s=n[1]),n=n[0]);const a=oe.deserialize(n),l=Ze(this.wnd.document,new N({href:e.location.href,type:"text/html",text:a,locations:s?new k({otherLocations:new Map([["cssSelector",s]])}):void 0}));if(!l){r(!1);return}this.wnd.requestAnimationFrame(()=>{this.doc().scrollTop=l.getBoundingClientRect().top+e.scrollY-e.innerHeight/2,this.reportProgress(),I(this.wnd),r(!0)})}),t.register("go_start",H.moduleName,(n,r)=>{if(this.doc().scrollTop===0)return r(!1);this.doc().scrollTop=0,this.reportProgress(),r(!0)}),t.register("go_end",H.moduleName,(n,r)=>{if(this.doc().scrollTop===this.doc().scrollHeight-this.doc().offsetHeight)return r(!1);this.doc().scrollTop=this.doc().scrollHeight-this.doc().offsetHeight,this.reportProgress(),r(!0)}),t.register("unfocus",H.moduleName,(n,r)=>{I(this.wnd),r(!0)}),t.register("scroll_protection",H.moduleName,(n,r)=>{this.enableScrollProtection(),r(!0)}),t.register(["go_next","go_prev"],H.moduleName,(n,r)=>r(!1)),t.register("focus",H.moduleName,(n,r)=>{this.reportProgress(),r(!0)}),t.register("first_visible_locator",H.moduleName,(n,r)=>{const s=Rt(e,!0);this.comms.send("first_visible_locator",s.serialize()),r(!0)}),t.log("ScrollSnapper Mounted"),!0}unmount(e,t){return t.unregisterAll(H.moduleName),this.resizeObserver.disconnect(),this.handleScroll&&e.removeEventListener("scroll",this.handleScroll),e.document.getElementById($i)?.remove(),this.patternAnalyzer&&(this.patternAnalyzer.clear(),this.patternAnalyzer=null,this.isScrollProtectionEnabled=!1),t.log("ScrollSnapper Unmounted"),!0}};H.moduleName="scroll_snapper";let Tt=H;const B=class B extends Re{constructor(){super(...arguments),this.patternAnalyzer=null,this.lastScrollTime=0,this.isScrollProtectionEnabled=!1,this.initialScrollHandled=!1,this.isScrolling=!1,this.lastScrollTop=0,this.isResizing=!1,this.resizeDebounce=null,this.handleScroll=e=>{if(this.comms.ready&&!this.isResizing){if(!this.initialScrollHandled){this.lastScrollTop=this.doc().scrollTop,this.initialScrollHandled=!0,this.reportProgress();return}this.isScrolling||(this.isScrolling=!0,this.wnd.requestAnimationFrame(()=>{this.reportProgress();const t=this.doc().scrollTop,i=t-this.lastScrollTop;if(this.lastScrollTop=t,this.isScrollProtectionEnabled&&Math.abs(i)>5){const n=Date.now(),r=n-(this.lastScrollTime||n);if(this.patternAnalyzer&&this.patternAnalyzer.analyze(i>0?"down":"up",Math.abs(i),r)){const a=e.target&&"tagName"in e.target?{tagName:e.target.tagName}:null;this.comms?.send("content_protection",{type:"suspicious_scrolling",timestamp:Date.now(),scrollDelta:i,scrollDirection:i>0?"down":"up",targetElement:a})}this.lastScrollTime=n}this.comms.send("scroll",i),this.isScrolling=!1}))}}}doc(){return this.wnd.document.scrollingElement}reportProgress(){if(!this.comms.ready)return;const e=Math.ceil(this.doc().scrollTop),t=this.doc().scrollHeight,i=this.wnd.innerHeight,n=Math.max(0,Math.min(1,e/t)),r=Math.max(0,Math.min(1,(e+i)/t));this.comms.send("progress",{start:n,end:r})}enableScrollProtection(){this.patternAnalyzer||(this.patternAnalyzer=new At(ji),this.isScrollProtectionEnabled=!0,this.comms?.log("Scroll protection enabled"))}mount(e,t){return this.wnd=e,this.comms=t,this.initialScrollHandled=!1,this.lastScrollTop=0,this.isResizing=!1,this.resizeDebounce&&(this.wnd.clearTimeout(this.resizeDebounce),this.resizeDebounce=null),this.resizeObserver=new ResizeObserver(()=>{this.resizeDebounce&&this.wnd.clearTimeout(this.resizeDebounce),this.isResizing=!0,this.resizeDebounce=this.wnd.setTimeout(()=>{this.isResizing=!1,this.resizeDebounce=null,this.reportProgress()},50)}),this.resizeObserver.observe(e.document.body),e.addEventListener("scroll",this.handleScroll,{passive:!0}),t.register("force_webkit_recalc",B.moduleName,()=>{Hi(this.wnd);const i=this.doc().scrollTop;i>1?this.doc().scrollTop=i-1:this.doc().scrollTop=i+1,this.doc().scrollTop=i}),t.register("go_progression",B.moduleName,(i,n)=>{const r=i;if(r<0||r>1){t.send("error",{message:"go_progression must be given a position from 0.0 to 1.0"}),n(!1);return}this.wnd.requestAnimationFrame(()=>{this.doc().scrollTop=this.doc().offsetHeight*r,this.reportProgress(),I(this.wnd),n(!0)})}),t.register("go_id",B.moduleName,(i,n)=>{const r=e.document.getElementById(i);if(!r){n(!1);return}this.wnd.requestAnimationFrame(()=>{this.doc().scrollTop=r.getBoundingClientRect().top+e.scrollY-e.innerHeight/2,this.reportProgress(),I(this.wnd),n(!0)})}),t.register("go_text",B.moduleName,(i,n)=>{let r;Array.isArray(i)&&(i.length>1&&(r=i[1]),i=i[0]);const s=oe.deserialize(i),a=Ze(this.wnd.document,new N({href:e.location.href,type:"text/html",text:s,locations:r?new k({otherLocations:new Map([["cssSelector",r]])}):void 0}));if(!a){n(!1);return}this.wnd.requestAnimationFrame(()=>{this.doc().scrollTop=a.getBoundingClientRect().top+e.scrollY-e.innerHeight/2,this.reportProgress(),I(this.wnd),n(!0)})}),t.register("go_start",B.moduleName,(i,n)=>{if(this.doc().scrollTop===0)return n(!1);this.doc().scrollTop=0,this.reportProgress(),n(!0)}),t.register("go_end",B.moduleName,(i,n)=>{if(this.doc().scrollTop===this.doc().scrollHeight-this.doc().offsetHeight)return n(!1);this.doc().scrollTop=this.doc().scrollHeight-this.doc().offsetHeight,this.reportProgress(),n(!0)}),t.register("unfocus",B.moduleName,(i,n)=>{I(this.wnd),n(!0)}),t.register("scroll_protection",B.moduleName,(i,n)=>{this.enableScrollProtection(),n(!0)}),t.register(["go_next","go_prev"],B.moduleName,(i,n)=>n(!1)),t.register("focus",B.moduleName,(i,n)=>{this.reportProgress(),n(!0)}),t.register("first_visible_locator",B.moduleName,(i,n)=>{const r=Rt(e,!0);t.send("first_visible_locator",r.serialize()),n(!0)}),t.log("WebPubSnapper Mounted"),!0}unmount(e,t){return t.unregisterAll(B.moduleName),this.resizeObserver.disconnect(),this.handleScroll&&e.removeEventListener("scroll",this.handleScroll),this.patternAnalyzer&&(this.patternAnalyzer.clear(),this.patternAnalyzer=null,this.isScrollProtectionEnabled=!1),t.log("WebPubSnapper Unmounted"),!0}};B.moduleName="webpub_snapper";let zt=B;class Cr{constructor(e,t){this.window=e,this.copyHistory=[],this.lastSelectionLength=0,this.lastSelectionTime=0,this.options=t}cleanupOldHistory(e){this.copyHistory=this.copyHistory.filter(i=>e-i.timestamp<1e4),this.copyHistory.length>this.options.historySize&&(this.copyHistory=this.copyHistory.slice(-this.options.historySize))}isSuspiciousPattern(e){return this.copyHistory.length<3?!1:this.copyHistory.filter(n=>e-n.timestamp<2e3).length>=3?!0:this.copyHistory.slice().sort((n,r)=>n.timestamp-r.timestamp).every((n,r,s)=>r===0?!0:n.length>s[r-1].length*1.5)}shouldAllowCopy(e){if(!this.options.enabled)return!0;const t=this.window.getSelection();if(!t)return!0;const n=t.toString().length,r=this.window.document.body.innerText.length,s=Date.now();if(this.cleanupOldHistory(s),n<this.options.minThreshold)return this.copyHistory.push({timestamp:s,length:n,wasBlocked:!1}),!0;const l=s-this.lastSelectionTime<100&&n>this.lastSelectionLength*1.5,c=Math.min(r*this.options.maxSelectionPercent,this.options.absoluteMaxChars),h=this.isSuspiciousPattern(s),u=n>c||l||h;return this.copyHistory.push({timestamp:s,length:n,wasBlocked:u}),u?(e?.preventDefault(),!1):(this.lastSelectionLength=n,this.lastSelectionTime=s,!0)}destroy(){this.lastSelectionLength=0,this.lastSelectionTime=0,this.copyHistory=[],this.options.enabled=!1}}class xr{constructor(e=Gi){this.options=e,this.events=[],this.selectionStartTime=0,this.lastSelectionTime=0,this.lastSelectionPosition=0,this.selectionPatterns=[],this.lastSelectedText=""}analyze(e){if(!e)return this.clear(),!1;const t=e.toString();if(t.length===0)return this.clear(),!1;if(e.type!=="Range"||!e.rangeCount)return!1;const i=Date.now();if(t.length<=50||t===this.lastSelectedText)return!1;if(this.selectionStartTime===0)return this.selectionStartTime=i,this.lastSelectedText=t,!1;if(i-this.selectionStartTime<500)return!1;i-this.lastSelectionTime>1e3&&(this.lastSelectionTime=i),this.selectionStartTime===0&&(this.selectionStartTime=i),this.lastSelectedText=t;const r=this.analyzeSelectionPattern(e,i);return this.cleanup(i),r}analyzeSelectionPattern(e,t){if(!e.rangeCount)return!1;const i=e.getRangeAt(0),n=i.toString(),r=(t-this.selectionStartTime)/1e3;if(n.length/Math.max(1,r)>this.options.maxSelectionsPerSecond)return!0;const a=i.startOffset,l=Math.abs(a-this.lastSelectionPosition);return this.selectionPatterns.push(l),this.selectionPatterns.length>this.options.historySize&&(this.selectionPatterns.shift(),this.calculateVariance(this.selectionPatterns)<this.options.minVariance)?!0:(this.lastSelectionPosition=a,!1)}calculateVariance(e){if(e.length===0)return 0;const t=e.reduce((i,n)=>i+n,0)/e.length;return e.reduce((i,n)=>i+Math.pow(n-t,2),0)/e.length}cleanup(e){this.events=this.events.filter(t=>e-t.timestamp<=1e3)}clear(){this.events=[],this.selectionStartTime=0,this.lastSelectionTime=0,this.lastSelectionPosition=0,this.selectionPatterns=[],this.lastSelectedText=""}}class qi{match(e,t){for(const i of t){const n=e.keyCode===i.keyCode,r=i.ctrl===void 0||e.ctrlKey===i.ctrl,s=i.shift===void 0||e.shiftKey===i.shift,a=i.alt===void 0||e.altKey===i.alt,l=i.meta===void 0||e.metaKey===i.meta;if(n&&r&&s&&a&&l)return!0}return!1}createKeyHandler(e,t){return i=>{this.match(i,e)&&(i.preventDefault(),i.stopPropagation(),t(i))}}createActivityEvent(e,t,i,n){let r;if(n){const s=n.getSelection(),a=s?.toString()||"",c=(a&&s?.rangeCount?s.getRangeAt(0)?.getClientRects():null)?.[0];c&&a&&(r={text:a,x:c.x,y:c.y,width:c.width,height:c.height})}return{type:t,timestamp:Date.now(),key:e.key,code:e.code,keyCode:e.keyCode,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,metaKey:e.metaKey,targetFrameSrc:i,selectedText:r}}createKeyboardHandlers(e,t,i,n){const r=[];return t.forEach(s=>{r.push(...s.keyCombos.map(a=>({...a,handler:l=>{const c=s.type,h=this.createActivityEvent(l,c,e,n);i(h)}})))}),r}createUnifiedHandler(e,t,i,n){const r=this.createKeyboardHandlers(e,t,i,n);return s=>{for(const a of r)if(this.match(s,[a])){s.preventDefault(),s.stopPropagation(),a.handler(s);return}}}}const ke=class ke extends ge{constructor(){super(...arguments),this.configApplied=!1,this.cleanupCallbacks=[],this.pointerMoved=!1,this.isContextMenuEnabled=!1,this.isDragAndDropEnabled=!1,this.isSelectionMonitoringEnabled=!1,this.isBulkCopyProtectionEnabled=!1,this.selectionAnalyzer=null,this.currentSelection=null,this.bulkCopyProtector=null,this.keyManager=new qi,this.keyDownHandler=null,this.preventBulkCopy=e=>{if(!this.isBulkCopyProtectionEnabled||!this.bulkCopyProtector)return!0;if(!this.bulkCopyProtector.shouldAllowCopy(e)){e.preventDefault();const t=this.wnd.getSelection(),i=t?.toString()||"",r=(i?t?.getRangeAt(0)?.getClientRects():null)?.[0],s={type:"bulk_copy",timestamp:Date.now(),clipboardTypes:e.clipboardData?.types?[...e.clipboardData.types]:[],selectedText:r?{text:i,x:r.x,y:r.y,width:r.width,height:r.height}:void 0,selectionLength:i.length,targetFrameSrc:this.wnd.location.href};return this.comms?.send("content_protection",s),!1}return!0},this.handleSelection=e=>{if(!this.isSelectionMonitoringEnabled||!this.wnd||!this.selectionAnalyzer)return;const t=this.wnd.getSelection();if(t){if(this.currentSelection=t.toString(),this.selectionAnalyzer.analyze(t)&&this.currentSelection){const n=this.wnd.getSelection(),r=n?.toString()||"",a=(r&&n?.rangeCount?n.getRangeAt(0)?.getClientRects():null)?.[0],l={type:"suspicious_selection",timestamp:Date.now(),selectionLength:r.length,selectedText:{text:r,x:a?.x??0,y:a?.y??0,width:a?.width??0,height:a?.height??0},eventType:e?.type||"selectionchange",targetFrameSrc:this.wnd.location.href};this.comms?.send("content_protection",l)}}else this.currentSelection=null},this.onDragStart=e=>{if(this.isDragAndDropEnabled){e.preventDefault();const t={type:"drag_detected",timestamp:Date.now(),dataTransferTypes:e.dataTransfer?.types?[...e.dataTransfer.types]:[],targetFrameSrc:this.wnd.location.href};return this.comms?.send("content_protection",t),!1}else return!0},this.onDrop=e=>{if(this.isDragAndDropEnabled){e.preventDefault();const t=e.dataTransfer,i={type:"drop_detected",timestamp:Date.now(),dataTransferTypes:t?.types?[...t.types]:[],fileCount:t?.files?.length||0,targetFrameSrc:this.wnd.location.href};return this.comms?.send("content_protection",i),!1}else return!0},this.onContext=e=>{if(this.isContextMenuEnabled){e.preventDefault();const t=this.wnd.getSelection(),i=t?.toString()||"",r=(i&&t?.rangeCount?t.getRangeAt(0)?.getClientRects():null)?.[0],s={timestamp:Date.now(),clientX:e.clientX,clientY:e.clientY,...r&&{selectedText:{text:i,x:r.x,y:r.y,width:r.width,height:r.height}},targetFrameSrc:this.wnd.location.href};this.comms?.send("context_menu",s)}},this.onPointerUp=this.onPointUp.bind(this),this.onPointerMove=this.onPointMove.bind(this),this.onPointerDown=this.onPointDown.bind(this),this.onClicker=this.onClick.bind(this)}addContextMenuPrevention(){this.isContextMenuEnabled||!this.wnd||(this.wnd.document.addEventListener("contextmenu",this.onContext),this.isContextMenuEnabled=!0)}removeContextMenuPrevention(){!this.isContextMenuEnabled||!this.wnd||(this.wnd.document.removeEventListener("contextmenu",this.onContext),this.isContextMenuEnabled=!1)}addDragAndDropPrevention(){this.isDragAndDropEnabled||!this.wnd||(this.wnd.document.addEventListener("dragstart",this.onDragStart),this.wnd.document.addEventListener("drop",this.onDrop),this.isDragAndDropEnabled=!0)}removeDragAndDropPrevention(){!this.isDragAndDropEnabled||!this.wnd||(this.wnd.document.removeEventListener("dragstart",this.onDragStart),this.wnd.document.removeEventListener("drop",this.onDrop),this.isDragAndDropEnabled=!1)}enableKeyboardPeripherals(e=[]){this.disableKeyboardPeripherals();const t=i=>{this.comms?.send("keyboard_peripherals",i)};this.keyDownHandler=this.keyManager.createUnifiedHandler(this.wnd.location.href,e,t,this.wnd),this.wnd&&this.wnd.document.addEventListener("keydown",this.keyDownHandler,{capture:!0})}disableKeyboardPeripherals(){this.wnd&&this.keyDownHandler&&(this.wnd.document.removeEventListener("keydown",this.keyDownHandler,{capture:!0}),this.keyDownHandler=null)}addBulkCopyProtection(e={}){if(this.isBulkCopyProtectionEnabled||!this.wnd)return;const t=Er,i=e?{...t,...e}:t;this.bulkCopyProtector=new Cr(this.wnd,i),this.wnd.document.addEventListener("copy",this.preventBulkCopy,!0),this.wnd.document.addEventListener("cut",this.preventBulkCopy,!0),this.isBulkCopyProtectionEnabled=!0}removeBulkCopyProtection(){!this.isBulkCopyProtectionEnabled||!this.wnd||(this.wnd.document.removeEventListener("copy",this.preventBulkCopy,!0),this.wnd.document.removeEventListener("cut",this.preventBulkCopy,!0),this.bulkCopyProtector?.destroy(),this.bulkCopyProtector=null,this.isBulkCopyProtectionEnabled=!1)}addSelectionMonitoring(e){if(this.isSelectionMonitoringEnabled||!this.wnd)return;const t=e||Gi;this.selectionAnalyzer=new xr(t),this.wnd.document.addEventListener("selectionchange",this.handleSelection),this.isSelectionMonitoringEnabled=!0}removeSelectionMonitoring(){!this.isSelectionMonitoringEnabled||!this.wnd||(this.wnd.document.removeEventListener("selectionchange",this.handleSelection),this.selectionAnalyzer?.clear(),this.selectionAnalyzer=null,this.isSelectionMonitoringEnabled=!1)}onPointUp(e){const t=this.wnd.getSelection();if(t&&t.toString()?.length>0){const n=t.getRangeAt(0)?.getClientRects();if(!n||n.length===0)return;const r=n[0],s={text:t.toString(),x:r.x,y:r.y,width:r.width,height:r.height,targetFrameSrc:this.wnd?.location?.href};this.comms.send("text_selected",s)}if(this.pointerMoved){this.pointerMoved=!1;return}if(!t?.isCollapsed||!e.isPrimary)return;const i=this.wnd.devicePixelRatio;e.preventDefault(),this.comms.send(e.pointerType==="touch"?"tap":"click",{defaultPrevented:e.defaultPrevented,x:e.clientX*i,y:e.clientY*i,targetFrameSrc:this.wnd.location.href,targetElement:e.target.outerHTML,interactiveElement:Bi(e.target)?.outerHTML,cssSelector:this.wnd._readium_cssSelectorGenerator.getCssSelector(e.target)}),this.pointerMoved=!1}onPointMove(e){if(e.movementY!==void 0&&e.movementX!==void 0){(Math.abs(e.movementX)>1||Math.abs(e.movementY)>1)&&(this.pointerMoved=!0);return}this.pointerMoved=!0}onPointDown(){this.pointerMoved=!1}onClick(e){if(e.preventDefault(),!e.isTrusted){const t=new PointerEvent("pointerup",{isPrimary:!0,pointerType:"mouse",clientX:e.clientX,clientY:e.clientY});Object.defineProperty(t,"target",{writable:!1,value:e.target}),Object.defineProperty(t,"defaultPrevented",{writable:!1,value:e.defaultPrevented}),this.onPointUp(t)}}registerProtectionHandlers(){this.comms?.register("peripherals_protection",ke.moduleName,(e,t)=>{const i=e;if(!this.configApplied){if(this.configApplied=!0,i.monitorSelection){const n=typeof i.monitorSelection=="boolean"?void 0:i.monitorSelection;this.addSelectionMonitoring(n),this.comms?.log("Selection monitoring enabled")}typeof i.protectCopy=="object"?(this.addBulkCopyProtection({enabled:!0,...i.protectCopy}),this.comms?.log("Copy protection enabled (limited)")):i.protectCopy===!0&&(this.addBulkCopyProtection({enabled:!0,maxSelectionPercent:0,minThreshold:0,absoluteMaxChars:0}),this.comms?.log("Copy protection enabled")),i.disableContextMenu&&(this.addContextMenuPrevention(),this.comms?.log("Context menu protection enabled")),i.disableDragAndDrop&&(this.addDragAndDropPrevention(),this.comms?.log("Drag and drop protection enabled"))}t(!0)}),this.comms?.register("keyboard_peripherals",ke.moduleName,(e,t)=>{const i=e;i&&i.length>0&&(this.enableKeyboardPeripherals(i),this.comms?.log(`Keyboard peripherals enabled: ${i.map(n=>n.type).join(", ")}`)),t(!0)})}mount(e,t){return this.wnd=e,this.comms=t,this.registerProtectionHandlers(),e.document.addEventListener("pointerdown",this.onPointerDown),e.document.addEventListener("pointerup",this.onPointerUp),e.document.addEventListener("pointermove",this.onPointerMove),e.document.addEventListener("click",this.onClicker),t.log("Peripherals Mounted"),!0}unmount(e,t){return this.removeBulkCopyProtection(),this.removeSelectionMonitoring(),this.removeContextMenuPrevention(),this.removeDragAndDropPrevention(),this.disableKeyboardPeripherals(),this.cleanupCallbacks.forEach(i=>i()),this.cleanupCallbacks=[],e.document.removeEventListener("pointerdown",this.onPointerDown),e.document.removeEventListener("pointerup",this.onPointerUp),e.document.removeEventListener("pointermove",this.onPointerMove),e.document.removeEventListener("click",this.onClicker),t.unregisterAll(ke.moduleName),this.configApplied=!1,t.log("Peripherals Unmounted"),!0}};ke.moduleName="peripherals";let Mt=ke;const Ge=class Ge extends ge{constructor(){super(...arguments),this.mediaPlayingCount=0,this.allAnimations=new Set}wndOnErr(e){this.comms?.send("error",{message:e.message,filename:e.filename,lineno:e.lineno,colno:e.colno})}unblock(e){for(e._readium_blockEvents=!1;e._readium_blockedEvents?.length>0;){const t=e._readium_blockedEvents.shift();switch(t[0]){case 0:Reflect.apply(t[1],t[2],t[3]);break;case 1:const i=t[1],n=t[2];e.removeEventListener(i.type,e._readium_eventBlocker,!0);const r=new Event(i.type,{bubbles:i.bubbles,cancelable:i.cancelable});n?n.dispatchEvent(r):e.dispatchEvent(r);break}}}onMediaPlayEvent(){this.mediaPlayingCount++,this.comms?.send("media_play",this.mediaPlayingCount)}onMediaPauseEvent(){this.mediaPlayingCount>0&&this.mediaPlayingCount--,this.comms?.send("media_pause",this.mediaPlayingCount)}pauseAllMedia(e){const t=e.document.querySelectorAll("audio,video");for(let i=0;i<t.length;i++)t[i].pause()}mount(e,t){this.comms=t,e.addEventListener("error",this.wndOnErr,!1),Reflect.defineProperty(e.navigator,"epubReadingSystem",{value:{name:"readium-ts-toolkit",version:"2.4.0-beta.5",hasFeature:(n,r="")=>{switch(n){case"dom-manipulation":return!0;case"layout-changes":return!0;case"touch-events":return!0;case"mouse-events":return!0;case"keyboard-events":return!0;case"spine-scripting":return!0;case"embedded-web-content":return!0;default:return!1}}},writable:!1}),"getAnimations"in e.document&&e.document.getAnimations().forEach(n=>{n.cancel(),this.allAnimations.add(n)}),t.register("activate",Ge.moduleName,(n,r)=>{this.allAnimations.forEach(s=>{s.cancel(),s.play()}),r(!0)}),t.register("unfocus",Ge.moduleName,(n,r)=>{this.pauseAllMedia(e),this.allAnimations.forEach(s=>s.pause()),r(!0)});const i=e.document.querySelectorAll("audio,video");for(let n=0;n<i.length;n++){const r=i[n];r.addEventListener("play",this.onMediaPlayEvent,{passive:!0}),r.addEventListener("pause",this.onMediaPauseEvent,{passive:!0})}return t.log("Setup Mounted"),!0}unmount(e,t){return e.removeEventListener("error",this.wndOnErr),e.removeEventListener("play",this.onMediaPlayEvent),e.removeEventListener("pause",this.onMediaPauseEvent),this.allAnimations.forEach(i=>i.cancel()),this.allAnimations.clear(),t.log("Setup Unmounted"),!0}};Ge.moduleName="setup";let nt=Ge;const Yi="readium-viewport",ee=class ee extends nt{onViewportWidthChanged(e){const t=e.target;xe(t,"--RS__viewportWidth",`${t.innerWidth}px`)}mount(e,t){if(!super.mount(e,t))return!1;const i=e.document.createElement("meta");return i.dataset.readium="true",i.setAttribute("name","viewport"),i.setAttribute("id",Yi),i.setAttribute("content","width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no"),e.document.head.appendChild(i),e.addEventListener("orientationchange",this.onViewportWidthChanged),e.addEventListener("resize",this.onViewportWidthChanged),this.onViewportWidthChanged({target:e}),t.register("get_properties",ee.moduleName,(n,r)=>{_t(e),r(!0)}),t.register("update_properties",ee.moduleName,(n,r)=>{n["--RS__viewportWidth"]=`${e.innerWidth}px`,Ti(e,n),r(!0)}),t.register("set_property",ee.moduleName,(n,r)=>{const s=n;xe(e,s[0],s[1]),r(!0)}),t.register("remove_property",ee.moduleName,(n,r)=>{et(e,n),r(!0)}),t.register("activate",ee.moduleName,(n,r)=>{this.unblock(e),r(!0)}),t.log("ReflowableSetup Mounted"),!0}unmount(e,t){return t.unregisterAll(ee.moduleName),e.document.head.querySelector(`#${Yi}`)?.remove(),e.removeEventListener("orientationchange",this.onViewportWidthChanged),t.log("ReflowableSetup Unmounted"),super.unmount(e,t)}};ee.moduleName="reflowable_setup";let It=ee;const Ki="readium-fixed-style",J=class J extends nt{mount(e,t){if(!super.mount(e,t))return!1;e.navigator.epubReadingSystem&&(e.navigator.epubReadingSystem.layoutStyle="paginated");const i=e.document.createElement("style");return i.id=Ki,i.dataset.readium="true",i.textContent=`
59
59
  html, body {
60
60
  text-size-adjust: none;
61
61
  -ms-text-size-adjust: none;
@@ -1783,4 +1783,4 @@ class PreservePitchProcessor extends AudioWorkletProcessor {
1783
1783
  }
1784
1784
 
1785
1785
  registerProcessor('preserve-pitch-processor', PreservePitchProcessor);
1786
- `;class ti{constructor(e){this.mediaElement=null,this.source=null,this.workletNode=null,this.url=null,this.ctx=e}static async createWorklet(e){const{ctx:t,mediaElement:i,pitchFactor:n,modulePath:r}=e,s=new ti(t);try{if(r)await t.audioWorklet.addModule(r);else{const a=new Blob([bo],{type:"text/javascript"});s.url=URL.createObjectURL(a),await t.audioWorklet.addModule(s.url)}}catch(a){throw s.destroy(),new Error(`Error adding module: ${a}`)}try{if(s.workletNode=new AudioWorkletNode(t,"preserve-pitch-processor"),n&&s.updatePitchFactor(n),i){const a=t.createMediaElementSource(i);a.connect(s.workletNode),s.mediaElement=i,s.source=a}}catch(a){throw s.destroy(),new Error(`Error creating worklet node: ${a}`)}return s}updatePitchFactor(e){this.workletNode&&this.workletNode.port.postMessage({type:"setPitchFactor",factor:e})}destroy(){this.workletNode&&(this.workletNode.disconnect(),this.workletNode=null),this.source&&(this.source.disconnect(),this.source=null),this.url&&(URL.revokeObjectURL(this.url),this.url=null)}}class Dn{constructor(e){this.audioContext=null,this.sourceNode=null,this.gainNode=null,this.listeners={},this.currentPlaybackRate=1,this.isMutedValue=!1,this.isPlayingValue=!1,this.isPausedValue=!1,this.isLoadingValue=!1,this.isLoadedValue=!1,this.isEndedValue=!1,this.isStoppedValue=!1,this.worklet=null,this.webAudioActive=!1,this.boundOnCanPlayThrough=this.onCanPlayThrough.bind(this),this.boundOnTimeUpdate=this.onTimeUpdate.bind(this),this.boundOnError=this.onError.bind(this),this.boundOnEnded=this.onEnded.bind(this),this.boundOnStalled=this.onStalled.bind(this),this.boundOnEmptied=this.onEmptied.bind(this),this.boundOnSuspend=this.onSuspend.bind(this),this.boundOnWaiting=this.onWaiting.bind(this),this.boundOnLoadedMetadata=this.onLoadedMetadata.bind(this),this.boundOnSeeking=this.onSeeking.bind(this),this.boundOnSeeked=this.onSeeked.bind(this),this.boundOnPlay=this.onPlay.bind(this),this.boundOnPlaying=this.onPlaying.bind(this),this.boundOnPause=this.onPause.bind(this),this.boundOnProgress=this.onProgress.bind(this),this.playback=e.playback,this.mediaElement=document.createElement("audio"),this.setVolume(this.playback.state.volume),this.mediaElement.addEventListener("canplaythrough",this.boundOnCanPlayThrough),this.mediaElement.addEventListener("timeupdate",this.boundOnTimeUpdate),this.mediaElement.addEventListener("error",this.boundOnError),this.mediaElement.addEventListener("ended",this.boundOnEnded),this.mediaElement.addEventListener("stalled",this.boundOnStalled),this.mediaElement.addEventListener("emptied",this.boundOnEmptied),this.mediaElement.addEventListener("suspend",this.boundOnSuspend),this.mediaElement.addEventListener("waiting",this.boundOnWaiting),this.mediaElement.addEventListener("loadedmetadata",this.boundOnLoadedMetadata),this.mediaElement.addEventListener("seeking",this.boundOnSeeking),this.mediaElement.addEventListener("seeked",this.boundOnSeeked),this.mediaElement.addEventListener("play",this.boundOnPlay),this.mediaElement.addEventListener("playing",this.boundOnPlaying),this.mediaElement.addEventListener("pause",this.boundOnPause),this.mediaElement.addEventListener("progress",this.boundOnProgress),this.mediaElement.currentTime=this.playback.state.currentTime}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}off(e,t){this.listeners[e]&&(this.listeners[e]=this.listeners[e].filter(i=>i!==t))}loadAudio(e){if(this.isLoadingValue=!0,this.isLoadedValue=!1,this.isPlayingValue=!1,this.isPausedValue=!1,this.webAudioActive){this.mediaElement.crossOrigin="anonymous",this.mediaElement.src=e,this.mediaElement.load();const t=()=>{this.mediaElement.removeEventListener("error",i),this.mediaElement.removeEventListener("canplaythrough",n)},i=()=>{t(),this.deactivateWebAudio(),this.mediaElement.removeAttribute("crossOrigin"),this.mediaElement.src=e,this.mediaElement.load()},n=()=>t();this.mediaElement.addEventListener("error",i),this.mediaElement.addEventListener("canplaythrough",n)}else this.mediaElement.src=e,this.mediaElement.load()}deactivateWebAudio(){this.worklet&&(this.worklet.destroy(),this.worklet=null),this.sourceNode&&(this.sourceNode.disconnect(),this.sourceNode=null),this.gainNode&&(this.gainNode.disconnect(),this.gainNode=null),this.webAudioActive=!1}setMediaElement(e){this.mediaElement.pause(),this.isPlayingValue=!1,this.isPausedValue=!1,this.sourceNode&&(this.sourceNode.disconnect(),this.sourceNode=null),this.mediaElement.removeEventListener("canplaythrough",this.boundOnCanPlayThrough),this.mediaElement.removeEventListener("timeupdate",this.boundOnTimeUpdate),this.mediaElement.removeEventListener("error",this.boundOnError),this.mediaElement.removeEventListener("ended",this.boundOnEnded),this.mediaElement.removeEventListener("stalled",this.boundOnStalled),this.mediaElement.removeEventListener("emptied",this.boundOnEmptied),this.mediaElement.removeEventListener("suspend",this.boundOnSuspend),this.mediaElement.removeEventListener("waiting",this.boundOnWaiting),this.mediaElement.removeEventListener("loadedmetadata",this.boundOnLoadedMetadata),this.mediaElement.removeEventListener("seeking",this.boundOnSeeking),this.mediaElement.removeEventListener("seeked",this.boundOnSeeked),this.mediaElement.removeEventListener("play",this.boundOnPlay),this.mediaElement.removeEventListener("playing",this.boundOnPlaying),this.mediaElement.removeEventListener("pause",this.boundOnPause),this.mediaElement.removeEventListener("progress",this.boundOnProgress),this.mediaElement=e,this.mediaElement.addEventListener("canplaythrough",this.boundOnCanPlayThrough),this.mediaElement.addEventListener("timeupdate",this.boundOnTimeUpdate),this.mediaElement.addEventListener("error",this.boundOnError),this.mediaElement.addEventListener("ended",this.boundOnEnded),this.mediaElement.addEventListener("stalled",this.boundOnStalled),this.mediaElement.addEventListener("emptied",this.boundOnEmptied),this.mediaElement.addEventListener("suspend",this.boundOnSuspend),this.mediaElement.addEventListener("waiting",this.boundOnWaiting),this.mediaElement.addEventListener("loadedmetadata",this.boundOnLoadedMetadata),this.mediaElement.addEventListener("seeking",this.boundOnSeeking),this.mediaElement.addEventListener("seeked",this.boundOnSeeked),this.mediaElement.addEventListener("play",this.boundOnPlay),this.mediaElement.addEventListener("playing",this.boundOnPlaying),this.mediaElement.addEventListener("pause",this.boundOnPause),this.mediaElement.addEventListener("progress",this.boundOnProgress),this.mediaElement.volume=this.isMutedValue?0:this.playback.state.volume,this.mediaElement.playbackRate=this.currentPlaybackRate,this.mediaElement.readyState>=1&&this.onLoadedMetadata(new Event("loadedmetadata")),this.mediaElement.seekable.length>0&&this.onProgress(),this.mediaElement.readyState>=4?this.onCanPlayThrough():(this.isLoadingValue=!0,this.isLoadedValue=!1)}async ensureAudioContextRunning(){this.audioContext||(this.audioContext=new AudioContext),this.audioContext.state==="suspended"&&await this.audioContext.resume()}getOrCreateAudioContext(){return this.audioContext||(this.audioContext=new AudioContext),this.audioContext}onTimeUpdate(){this.emit("timeupdate",this.mediaElement.currentTime)}onCanPlayThrough(){this.isLoadingValue=!1,this.isLoadedValue=!0,this.emit("canplaythrough",null)}onError(){console.error("Error loading media element"),this.emit("error",this.mediaElement.error)}onEnded(){this.isPlayingValue=!1,this.isPausedValue=!1,this.isEndedValue=!0,this.emit("ended",null)}onStalled(e){this.emit("stalled",e)}onEmptied(e){this.emit("emptied",e)}onSuspend(e){this.emit("suspend",e)}onWaiting(e){this.emit("waiting",e)}onLoadedMetadata(e){this.emit("loadedmetadata",e)}onSeeking(e){this.emit("seeking",e)}onSeeked(e){this.emit("seeked",e)}onPlay(){this.emit("play",null)}onPlaying(){this.emit("playing",null)}onPause(){this.emit("pause",null)}onProgress(){this.emit("progress",this.mediaElement.seekable)}emit(e,t){this.listeners[e]&&this.listeners[e].forEach(i=>i(t))}async play(){if(!this.isPlayingValue)try{await this.mediaElement.play(),this.isPlayingValue=!0,this.isPausedValue=!1,this.isStoppedValue=!1}catch(e){if(e?.name==="AbortError")return;console.error("error trying to play media element",e),this.emit("error",e)}}pause(){this.mediaElement.pause(),this.isPlayingValue=!1,this.isPausedValue=!0}stop(){this.mediaElement.pause(),this.mediaElement.currentTime=0,this.isPlayingValue=!1,this.isPausedValue=!1,this.isStoppedValue=!0}setVolume(e){if(e<0){this.mediaElement.volume=0,this.gainNode&&(this.gainNode.gain.value=0),this.isMutedValue=!0,this.playback.state.volume=0;return}if(e>1){this.setVolume(e/100);return}this.mediaElement.volume=e,this.gainNode&&(this.gainNode.gain.value=e),this.playback.state.volume=e}skip(e){const t=this.mediaElement.duration;if(!isFinite(t))return;const i=this.mediaElement.currentTime+e;i<0?this.mediaElement.currentTime=0:i>t?this.mediaElement.currentTime=t:this.mediaElement.currentTime=i}currentTime(){return this.mediaElement.currentTime}duration(){return this.mediaElement.duration}isPlaying(){return this.isPlayingValue}isPaused(){return this.isPausedValue}isStopped(){return this.isStoppedValue}isLoading(){return this.isLoadingValue}isLoaded(){return this.isLoadedValue}isEnded(){return this.isEndedValue}isMuted(){return this.isMutedValue}setPlaybackRate(e,t){this.currentPlaybackRate=e,this.mediaElement.playbackRate=e,t?"preservesPitch"in this.mediaElement?this.mediaElement.preservesPitch=!0:this.activateWebAudio().then(()=>{this.worklet?this.worklet.updatePitchFactor(1/e):(this.sourceNode&&(this.sourceNode.disconnect(),this.sourceNode=null),ti.createWorklet({ctx:this.getOrCreateAudioContext(),mediaElement:this.mediaElement,pitchFactor:1}).then(i=>{this.worklet=i,this.worklet.workletNode.connect(this.gainNode),this.worklet.updatePitchFactor(1/e)}).catch(i=>{console.warn("Failed to create preserve pitch worklet",i)}))}).catch(i=>{console.warn("Web Audio unavailable, playing without pitch correction:",i)}):this.worklet&&(this.worklet.destroy(),this.worklet=null,this.webAudioActive&&(this.sourceNode=new MediaElementAudioSourceNode(this.getOrCreateAudioContext(),{mediaElement:this.mediaElement}),this.sourceNode.connect(this.gainNode)))}async activateWebAudio(){if(this.webAudioActive)return;const e=this.mediaElement.src;if(!e)return;const t=this.mediaElement.currentTime,i=this.isPlayingValue;i&&(this.mediaElement.pause(),this.isPlayingValue=!1),this.mediaElement.crossOrigin="anonymous",this.mediaElement.src=e,this.mediaElement.load(),await new Promise((r,s)=>{const a=()=>{this.mediaElement.removeEventListener("canplaythrough",a),this.mediaElement.removeEventListener("error",l),r()},l=()=>{this.mediaElement.removeEventListener("canplaythrough",a),this.mediaElement.removeEventListener("error",l),s(new Error("Audio reload with CORS failed — server may not send Access-Control-Allow-Origin"))};this.mediaElement.addEventListener("canplaythrough",a),this.mediaElement.addEventListener("error",l)}),this.mediaElement.currentTime=t,this.sourceNode=new MediaElementAudioSourceNode(this.getOrCreateAudioContext(),{mediaElement:this.mediaElement});const n=this.getOrCreateAudioContext();this.gainNode=n.createGain(),this.sourceNode.connect(this.gainNode),this.gainNode.connect(n.destination),this.webAudioActive=!0,i&&(await this.ensureAudioContextRunning(),await this.mediaElement.play(),this.isPlayingValue=!0,this.isPausedValue=!1)}get isWebAudioActive(){return this.webAudioActive}getMediaElement(){return this.mediaElement}}class Be{constructor(e={}){this.volume=M(e.volume,Ue.range),this.playbackRate=M(e.playbackRate,De.range),this.preservePitch=E(e.preservePitch),this.skipBackwardInterval=M(e.skipBackwardInterval,Q.range),this.skipForwardInterval=M(e.skipForwardInterval,Q.range),this.pollInterval=w(e.pollInterval),this.autoPlay=E(e.autoPlay),this.enableMediaSession=E(e.enableMediaSession)}merging(e){const t={...this};for(const i of Object.keys(e))e[i]!==void 0&&(t[i]=e[i]);return new Be(t)}}class Wn{constructor(e={}){this.volume=M(e.volume,Ue.range)??1,this.playbackRate=M(e.playbackRate,De.range)??1,this.preservePitch=E(e.preservePitch)??!0,this.skipBackwardInterval=M(e.skipBackwardInterval,Q.range)??10,this.skipForwardInterval=M(e.skipForwardInterval,Q.range)??10,this.pollInterval=w(e.pollInterval)??1e3,this.autoPlay=E(e.autoPlay)??!0,this.enableMediaSession=E(e.enableMediaSession)??!0}}class ii{constructor(e,t){this.volume=e.volume??t.volume,this.playbackRate=e.playbackRate??t.playbackRate,this.preservePitch=e.preservePitch??t.preservePitch,this.skipBackwardInterval=e.skipBackwardInterval??t.skipBackwardInterval,this.skipForwardInterval=e.skipForwardInterval??t.skipForwardInterval,this.pollInterval=e.pollInterval??t.pollInterval,this.autoPlay=e.autoPlay??t.autoPlay,this.enableMediaSession=e.enableMediaSession??t.enableMediaSession}}class ni{constructor(e,t){this.preferences=e,this.settings=t}clear(){this.preferences=new Be}updatePreference(e,t){this.preferences[e]=t}get volume(){return new C({initialValue:this.preferences.volume,effectiveValue:this.settings.volume,isEffective:this.preferences.volume!==null,onChange:e=>{this.updatePreference("volume",e??1)},supportedRange:Ue.range,step:Ue.step})}get playbackRate(){return new C({initialValue:this.preferences.playbackRate,effectiveValue:this.settings.playbackRate,isEffective:this.preferences.playbackRate!==null,onChange:e=>{this.updatePreference("playbackRate",e??1)},supportedRange:De.range,step:De.step})}get preservePitch(){return new O({initialValue:this.preferences.preservePitch,effectiveValue:this.settings.preservePitch,isEffective:this.preferences.preservePitch!==null,onChange:e=>{this.updatePreference("preservePitch",e??!0)}})}get skipBackwardInterval(){return new C({initialValue:this.preferences.skipBackwardInterval,effectiveValue:this.settings.skipBackwardInterval,isEffective:this.preferences.skipBackwardInterval!==null,onChange:e=>{this.updatePreference("skipBackwardInterval",e??10)},supportedRange:Q.range,step:Q.step})}get skipForwardInterval(){return new C({initialValue:this.preferences.skipForwardInterval,effectiveValue:this.settings.skipForwardInterval,isEffective:this.preferences.skipForwardInterval!==null,onChange:e=>{this.updatePreference("skipForwardInterval",e??10)},supportedRange:Q.range,step:Q.step})}get pollInterval(){return new T({initialValue:this.preferences.pollInterval,effectiveValue:this.settings.pollInterval,isEffective:this.preferences.pollInterval!==null,onChange:e=>{this.updatePreference("pollInterval",e??1e3)}})}get autoPlay(){return new O({initialValue:this.preferences.autoPlay,effectiveValue:this.settings.autoPlay,isEffective:this.preferences.autoPlay!==null,onChange:e=>{this.updatePreference("autoPlay",e??!0)}})}get enableMediaSession(){return new O({initialValue:this.preferences.enableMediaSession,effectiveValue:this.settings.enableMediaSession,isEffective:this.preferences.enableMediaSession!==null,onChange:e=>{this.updatePreference("enableMediaSession",e??!0)}})}}class vo{constructor(e,t){this.preloadedElements=new Map,this._audioEngine=e,this._publication=t,this._supportedAudioTypes=this.detectSupportedAudioTypes()}detectSupportedAudioTypes(){const e=document.createElement("audio"),t=new Set;for(const n of this._publication.readingOrder.items){n.type&&t.add(n.type);for(const r of n.alternates?.items??[])r.type&&t.add(r.type)}const i=new Map;for(const n of t){const r=e.canPlayType(n);r!==""&&i.set(n,r)}return i}pickPlayableHref(e){const t=[e,...e.alternates?.items??[]];let i;for(const n of t){if(!n.type)continue;const r=this._supportedAudioTypes.get(n.type);if(r){if(r==="probably")return n.href;i||(i={href:n.href,confidence:r})}}return i?.href??e.href}get audioEngine(){return this._audioEngine}setCurrentAudio(e,t){const i=this.pickPlayableHref(this._publication.readingOrder.items[e]),n=this.audioEngine.isWebAudioActive?void 0:this.get(i);n?(this.audioEngine.setMediaElement(n),this.clear(i)):(this.clear(i),this.audioEngine.loadAudio(i)),this.preloadAdjacent(e,t)}preload(e){if(this.preloadedElements.has(e))return;const t=document.createElement("audio");t.preload="auto",t.src=e,t.load(),this.preloadedElements.set(e,t)}get(e){return this.preloadedElements.get(e)}clear(e){this.preloadedElements.delete(e)}preloadNext(e){const t=e+1;if(t<this._publication.readingOrder.items.length){const i=this._publication.readingOrder.items[t];this.preload(this.pickPlayableHref(i))}}preloadPrevious(e){const t=e-1;if(t>=0){const i=this._publication.readingOrder.items[t];this.preload(this.pickPlayableHref(i))}}preloadAdjacent(e,t="forward"){t==="forward"?(this.preloadNext(e),this.preloadPrevious(e)):(this.preloadPrevious(e),this.preloadNext(e))}destroy(){this.audioEngine.stop(),this.preloadedElements.clear()}}class So{constructor(e={}){this.dragstartHandler=t=>{t.preventDefault(),t.stopPropagation(),e.onDragDetected?.(Array.from(t.dataTransfer?.types??[]))},this.dropHandler=t=>{t.preventDefault(),t.stopPropagation();const i=Array.from(t.dataTransfer?.types??[]),n=t.dataTransfer?.files.length??0;e.onDropDetected?.(i,n)},document.addEventListener("dragstart",this.dragstartHandler,!0),document.addEventListener("drop",this.dropHandler,!0),window.addEventListener("unload",()=>this.destroy())}destroy(){document.removeEventListener("dragstart",this.dragstartHandler,!0),document.removeEventListener("drop",this.dropHandler,!0)}}class wo{constructor(e={}){this.copyHandler=t=>{t.preventDefault(),t.stopPropagation(),e.onCopyBlocked?.()},document.addEventListener("copy",this.copyHandler,!0),window.addEventListener("unload",()=>this.destroy())}destroy(){document.removeEventListener("copy",this.copyHandler,!0)}}class _o extends qt{constructor(e={}){super(e),e.disableDragAndDrop&&(this.dragAndDropProtector=new So({onDragDetected:t=>{this.dispatchSuspiciousActivity("drag_detected",{dataTransferTypes:t,targetFrameSrc:""})},onDropDetected:(t,i)=>{this.dispatchSuspiciousActivity("drop_detected",{dataTransferTypes:t,fileCount:i,targetFrameSrc:""})}})),e.protectCopy&&(this.copyProtector=new wo({onCopyBlocked:()=>{this.dispatchSuspiciousActivity("bulk_copy",{targetFrameSrc:""})}}))}destroy(){super.destroy(),this.dragAndDropProtector?.destroy(),this.copyProtector?.destroy()}}const Po=o=>({trackLoaded:o.trackLoaded??(()=>{}),positionChanged:o.positionChanged??(()=>{}),error:o.error??(()=>{}),trackEnded:o.trackEnded??(()=>{}),play:o.play??(()=>{}),pause:o.pause??(()=>{}),metadataLoaded:o.metadataLoaded??(()=>{}),stalled:o.stalled??(()=>{}),seeking:o.seeking??(()=>{}),seekable:o.seekable??(()=>{}),contentProtection:o.contentProtection??(()=>{}),peripheral:o.peripheral??(()=>{}),contextMenu:o.contextMenu??(()=>{})});class Eo extends Ji{constructor(e,t,i,n={preferences:{},defaults:{}}){if(super(),this.positionPollInterval=null,this.navigationId=0,this._preferencesEditor=null,this._navigatorProtector=null,this._keyboardPeripheralsManager=null,this._suspiciousActivityListener=null,this._keyboardPeripheralListener=null,this.pub=e,this.listeners=Po(t),this._preferences=new Be(n.preferences),this._defaults=new Wn(n.defaults),this._settings=new ii(this._preferences,this._defaults),i)this.currentLocation=this.ensureLocatorLocations(i);else{const u=this.pub.readingOrder.items[0];this.currentLocation=new N({href:u.href,type:u.type||"audio/mpeg",title:u.title,locations:new k({position:0,progression:0,totalProgression:0,fragments:["t=0"]})})}const r=this.currentLocation.href.split("#")[0],s=this.hrefToTrackIndex(r),a=this.currentLocation.locations?.time()||0,l=new Dn({playback:{state:{currentTime:a,duration:0,volume:this._settings.volume},playWhenReady:!1,index:s}});this.pool=new vo(l,e);const c=n.contentProtection||{},h=this.mergeKeyboardPeripherals(c,n.keyboardPeripherals||[]);(c.disableContextMenu||c.checkAutomation||c.checkIFrameEmbedding||c.monitorDevTools||c.protectPrinting?.disable||c.disableDragAndDrop||c.protectCopy)&&(this._navigatorProtector=new _o(c),this._suspiciousActivityListener=u=>{const{type:m,...b}=u.detail;m==="context_menu"?this.listeners.contextMenu(b):this.listeners.contentProtection(m,b)},window.addEventListener(he,this._suspiciousActivityListener)),h.length>0&&(this._keyboardPeripheralsManager=new Yt({keyboardPeripherals:h}),this._keyboardPeripheralListener=u=>{this.listeners.peripheral(u.detail)},window.addEventListener(de,this._keyboardPeripheralListener)),this.setupEventListeners(),this._settings.enableMediaSession&&this.setupMediaSession(),this.pool.setCurrentAudio(s,"forward"),this.waitForLoadedAndSeeked(a).then(()=>{this.listeners.trackLoaded(this.pool.audioEngine.getMediaElement()),this.listeners.positionChanged(this.currentLocator)}).catch(()=>{})}get settings(){return this._settings}get preferencesEditor(){return this._preferencesEditor===null&&(this._preferencesEditor=new ni(this._preferences,this.settings)),this._preferencesEditor}async submitPreferences(e){this._preferences=this._preferences.merging(e),this.applyPreferences()}applyPreferences(){const e=this._settings;this._settings=new ii(this._preferences,this._defaults),this._preferencesEditor!==null&&(this._preferencesEditor=new ni(this._preferences,this.settings)),this.pool.audioEngine.setVolume(this._settings.volume),this.pool.audioEngine.setPlaybackRate(this._settings.playbackRate,this._settings.preservePitch),this._settings.enableMediaSession&&!e.enableMediaSession?this.setupMediaSession():!this._settings.enableMediaSession&&e.enableMediaSession&&this.destroyMediaSession()}get publication(){return this.pub}ensureLocatorLocations(e){return new N({...e,locations:e.locations instanceof k?e.locations:e.locations?new k(e.locations):void 0})}hrefToTrackIndex(e){const t=e.split("#")[0];return this.pub.readingOrder.items.findIndex(i=>i.href===t)}currentTrackIndex(){return this.hrefToTrackIndex(this.currentLocation.href)}get currentLocator(){return this.currentLocation}get isPlaying(){return this.pool.audioEngine.isPlaying()}get isPaused(){return this.pool.audioEngine.isPaused()}get duration(){return this.pool.audioEngine.duration()}get currentTime(){return this.pool.audioEngine.currentTime()}createLocator(e,t){const i=this.pub.readingOrder.items[e];if(!i)throw new Error(`Invalid track index: ${e}`);const n=this.pool.audioEngine.duration();return new N({href:i.href,type:i.type||"audio/mpeg",title:i.title,locations:new k({progression:n>0?t/n:0,position:e,fragments:[`t=${t}`]})})}waitForLoadedAndSeeked(e,t){return new Promise((i,n)=>{const r=()=>{if(t!==void 0&&t!==this.navigationId){i();return}if(e<=0){i();return}const l=()=>{this.pool.audioEngine.off("seeked",l),i()};this.pool.audioEngine.on("seeked",l),this.seek(e)};if(this.pool.audioEngine.isLoaded()){r();return}const s=()=>{this.pool.audioEngine.off("canplaythrough",s),this.pool.audioEngine.off("error",a),r()},a=l=>{this.pool.audioEngine.off("canplaythrough",s),this.pool.audioEngine.off("error",a),n(l)};this.pool.audioEngine.on("canplaythrough",s),this.pool.audioEngine.on("error",a)})}setupEventListeners(){this.pool.audioEngine.on("error",e=>{this.listeners.error(e,this.currentLocator)}),this.pool.audioEngine.on("ended",async()=>{this.stopPositionPolling(),this.currentLocation=this.currentLocation.copyWithLocations(new k({position:this.currentTrackIndex(),progression:1,fragments:[`t=${this.duration}`]})),this.listeners.trackEnded(this.currentLocator),await this.nextTrack(),this._settings.autoPlay&&this.play()}),this.pool.audioEngine.on("play",()=>{this.startPositionPolling(),this.listeners.play(this.currentLocator)}),this.pool.audioEngine.on("playing",()=>{this.listeners.stalled(!1)}),this.pool.audioEngine.on("pause",()=>{this.stopPositionPolling(),this.listeners.pause(this.currentLocator)}),this.pool.audioEngine.on("seeked",()=>{if(this.listeners.seeking(!1),!this.isPlaying){const e=this.currentTime,t=this.duration,i=t>0?e/t:0;this.currentLocation=this.currentLocation.copyWithLocations(new k({position:this.currentTrackIndex(),progression:i,fragments:[`t=${e}`]})),this.listeners.positionChanged(this.currentLocation)}}),this.pool.audioEngine.on("seeking",()=>this.listeners.seeking(!0)),this.pool.audioEngine.on("waiting",()=>this.listeners.seeking(!0)),this.pool.audioEngine.on("stalled",()=>this.listeners.stalled(!0)),this.pool.audioEngine.on("progress",e=>this.listeners.seekable(e)),this.pool.audioEngine.on("loadedmetadata",()=>{this.listeners.metadataLoaded(this.pool.audioEngine.duration())})}setupMediaSession(){"mediaSession"in navigator&&(navigator.mediaSession.setActionHandler("play",()=>this.play()),navigator.mediaSession.setActionHandler("pause",()=>this.pause()),navigator.mediaSession.setActionHandler("previoustrack",()=>this.goBackward(!1,()=>{})),navigator.mediaSession.setActionHandler("nexttrack",()=>this.goForward(!1,()=>{})),navigator.mediaSession.setActionHandler("seekbackward",e=>this.jump(-(e.seekOffset||10))),navigator.mediaSession.setActionHandler("seekforward",e=>this.jump(e.seekOffset||10)),this.updateMediaSessionMetadata())}updateMediaSessionMetadata(){if(!("mediaSession"in navigator))return;const e=this.currentTrackIndex(),t=this.pub.readingOrder.items[e],i=this.pub.getCover();navigator.mediaSession.metadata=new MediaMetadata({title:t?.title||`Track ${e+1}`,artist:this.pub.metadata.authors?this.pub.metadata.authors.items.map(n=>n.name.getTranslation()).join(", "):void 0,album:this.pub.metadata.title.getTranslation(),artwork:i?[{src:i.href,type:i.type}]:void 0})}startPositionPolling(){this.stopPositionPolling(),this.positionPollInterval=setInterval(()=>{const e=this.currentTime,t=this.duration,i=t>0?e/t:0;this.currentLocation=this.currentLocation.copyWithLocations(new k({position:this.currentTrackIndex(),progression:i,fragments:[`t=${e}`]})),this.listeners.positionChanged(this.currentLocation)},this._settings.pollInterval)}stopPositionPolling(){this.positionPollInterval!==null&&(clearInterval(this.positionPollInterval),this.positionPollInterval=null)}async go(e,t,i){try{e=this.ensureLocatorLocations(e);const n=e.href.split("#")[0],r=this.hrefToTrackIndex(n),s=e.locations?.time()||0;if(r===-1){i(!1);return}const a=++this.navigationId,l=r>=this.currentTrackIndex()?"forward":"backward",c=this.isPlaying;if(this.stopPositionPolling(),this.pool.setCurrentAudio(r,l),this.currentLocation=e.copyWithLocations(e.locations),await this.waitForLoadedAndSeeked(s,a),a!==this.navigationId)return;this.listeners.trackLoaded(this.pool.audioEngine.getMediaElement()),this.listeners.positionChanged(this.currentLocator),this._settings.enableMediaSession&&this.updateMediaSessionMetadata(),c&&this.play(),i(!0)}catch(n){console.error("Failed to go to locator:",n),i(!1)}}async goLink(e,t,i){const n=this.hrefToTrackIndex(e.href);if(n===-1){i(!1);return}const r=e.locator.locations?.time()??0,s=this.createLocator(n,r);await this.go(s,t,i)}async goForward(e,t){if(!this.canGoForward){t(!1);return}await this.nextTrack(),t(!0)}async goBackward(e,t){if(!this.canGoBackward){t(!1);return}await this.previousTrack(),t(!0)}play(){this.pool.audioEngine.play()}pause(){this.pool.audioEngine.pause()}stop(){this.pool.audioEngine.stop()}async nextTrack(){if(!this.canGoForward)return;const e=this.createLocator(this.currentTrackIndex()+1,0);await this.go(e,!1,()=>{})}async previousTrack(){if(!this.canGoBackward)return;const e=this.createLocator(this.currentTrackIndex()-1,0);await this.go(e,!1,()=>{})}seek(e){this.pool.audioEngine.skip(e-this.pool.audioEngine.currentTime())}jump(e){this.pool.audioEngine.skip(e)}skipForward(){this.pool.audioEngine.skip(this._settings.skipForwardInterval)}skipBackward(){this.pool.audioEngine.skip(-this._settings.skipBackwardInterval)}get isTrackStart(){return this.currentTrackIndex()===0&&(this.currentLocation.locations?.time()||0)===0}get isTrackEnd(){const e=this.currentTrackIndex();if(e!==this.pub.readingOrder.items.length-1)return!1;const t=this.currentLocation.locations?.progression;if(t!==void 0)return t>=1;const i=this.pub.readingOrder.items[e],n=this.duration||i?.duration||0;return n>0&&(this.currentLocation.locations?.time()??0)>=n}get canGoBackward(){return this.currentTrackIndex()>0}get canGoForward(){return this.currentTrackIndex()<this.pub.readingOrder.items.length-1}destroyMediaSession(){"mediaSession"in navigator&&(navigator.mediaSession.metadata=null,navigator.mediaSession.setActionHandler("play",null),navigator.mediaSession.setActionHandler("pause",null),navigator.mediaSession.setActionHandler("previoustrack",null),navigator.mediaSession.setActionHandler("nexttrack",null),navigator.mediaSession.setActionHandler("seekbackward",null),navigator.mediaSession.setActionHandler("seekforward",null))}destroy(){this.stopPositionPolling(),this.destroyMediaSession(),this._suspiciousActivityListener&&window.removeEventListener(he,this._suspiciousActivityListener),this._keyboardPeripheralListener&&window.removeEventListener(de,this._keyboardPeripheralListener),this._navigatorProtector?.destroy(),this._keyboardPeripheralsManager?.destroy(),this.pool.destroy()}}const Hn=JSON.parse(`{"format":{"audiobook":"Livre audio","audiobookJSON":"Manifeste de livre audio","cbz":"Bande dessinée","divina":"Bande dessinée Divina","divinaJSON":"Manifeste de bande dessinée Divina","epub":"EPUB","lcpa":"Livre audio protégé par LCP","lcpdf":"PDF protégé par LCP","lcpl":"Licence LCP","pdf":"PDF","rwp":"Publication web Readium","rwpm":"Manifeste de publication web Readium","zab":"Livre audio","zip":"Archive ZIP"},"kind":{"audiobook_many":"livres audio","audiobook_one":"livre audio","audiobook_other":"livres audio","book_many":"livres","book_one":"livre","book_other":"livres","comic_many":"bandes dessinées","comic_one":"bande dessinée","comic_other":"bandes dessinées","document_many":"documents","document_one":"document","document_other":"documents"},"metadata":{"accessibility":{"display-guide":{"accessibility-summary":{"no-metadata":"Aucune information disponible","publisher-contact":"Pour plus d'information à propos de l'accessibilité de cette publication, veuillez contacter l'éditeur : ","title":"Informations d'accessibilité supplémentaires fournies par l'éditeur"},"additional-accessibility-information":{"aria":{"compact":"Information enrichie pour les technologies d'assistances","descriptive":"La structure est enrichi de rôles ARIA afin d'optimiser l'organisation et de faciliter la navigation via les technologies d'assistances"},"audio-descriptions":"Description audio","braille":"Braille","color-not-sole-means-of-conveying-information":"La couleur n'est pas la seule manière de communiquer de l'information","dyslexia-readability":"Lisibilité adapté aux publics dys","full-ruby-annotations":"Annotations complètes au format ruby (langues asiatiques)","high-contrast-between-foreground-and-background-audio":"Contraste sonore amélioré entre les différents plans","high-contrast-between-text-and-background":"Contraste élevé entre le texte et l'arrière-plan","large-print":"Grands caractères","page-breaks":{"compact":"Pagination identique à l'imprimé","descriptive":"Contient une pagination identique à la version imprimée"},"ruby-annotations":"Annotations partielles au format ruby (langues asiatiques)","sign-language":"Langue des signes","tactile-graphics":{"compact":"Graphiques tactiles","descriptive":"Des graphiques tactiles ont été intégrés pour faciliter l'accès des personnes aveugles aux éléments visuels"},"tactile-objects":"Objets 3D ou tactiles","text-to-speech-hinting":"Prononciation améliorée pour la synthèse vocale","title":"Informations complémentaires sur l'accessibilité","ultra-high-contrast-between-text-and-background":"Contraste très élevé entre le texte et l'arrière-plan","visible-page-numbering":"Numérotation de page visible","without-background-sounds":"Aucun bruit de fond"},"conformance":{"a":{"compact":"Cette publication répond aux règles minimales d'accessibilité","descriptive":"La publication indique qu'elle respecte les règles d'accessibilité EPUB et WCAG 2 niveau A"},"aa":{"compact":"Cette publication répond aux règles d'accessibilité reconnues","descriptive":"La publication indique qu'elle respecte les règles d'accessibilité EPUB et WCAG 2 niveau AA"},"aaa":{"compact":"Cette publication dépasse les règles d'accessibilité reconnues","descriptive":"La publication indique qu'elle respecte les règles d'accessibilité EPUB et WCAG 2 niveau AAA"},"certifier":"Accessibilité évaluée par ","certifier-credentials":"L'évaluateur est accrédité par ","details":{"certification-info":"Cette publication a été certifié le","certifier-report":"Pour plus d'information, veuillez consulter le rapport de certification","claim":"Cette publication indique respecter","epub-accessibility-1-0":"EPUB Accessibilité 1.0","epub-accessibility-1-1":"EPUB Accessibilité 1.1","level-a":"Niveau A","level-aa":"Niveau AA","level-aaa":"Niveau AAA","wcag-2-0":{"compact":"WCAG 2.0","descriptive":"Règles pour l’accessibilité des contenus Web (WCAG) 2.0"},"wcag-2-1":{"compact":"WCAG 2.1","descriptive":"Règles pour l’accessibilité des contenus Web (WCAG) 2.1"},"wcag-2-2":{"compact":"WCAG 2.2","descriptive":"Règles pour l’accessibilité des contenus Web (WCAG) 2.2"}},"details-title":"Information détaillée","no":"Aucune information disponible","title":"Règles d'accessibilité","unknown-standard":"Aucune indication concernant les normes d'accessibilité"},"hazards":{"flashing":{"compact":"Flashs lumineux","descriptive":"La publication contient des flashs lumineux qui peuvent provoquer des crises d’épilepsie"},"flashing-none":{"compact":"Pas de flashs lumineux","descriptive":"La publication ne contient pas de flashs lumineux susceptibles de provoquer des crises d’épilepsie"},"flashing-unknown":{"compact":"Pas d'information concernant la présence de flashs lumineux","descriptive":"La présence de flashs lumineux susceptibles de provoquer des crises d’épilepsie n'a pas pu être déterminée"},"motion":{"compact":"Sensations de mouvement","descriptive":"La publication contient des images en mouvement qui peuvent provoquer des nausées, des vertiges et des maux de tête"},"motion-none":{"compact":"Pas de sensations de mouvement","descriptive":"La publication ne contient pas d'images en mouvement qui pourraient provoquer des nausées, des vertiges et des maux de tête"},"motion-unknown":{"compact":"Pas d'information concernant la présence d'images en mouvement","descriptive":"La présence d'images en mouvement susceptibles de provoquer des nausées, des vertiges et des maux de tête n'a pas pu être déterminée"},"no-metadata":"Aucune information disponible","none":{"compact":"Aucun points d'attention","descriptive":"La publication ne présente aucun risque lié à la présence de flashs lumineux, de sensations de mouvement ou de sons"},"sound":{"compact":"Sons","descriptive":"La publication contient des sons qui peuvent causer des troubles de la sensibilité"},"sound-none":{"compact":"Pas de risques sonores","descriptive":"La publication ne contient pas de sons susceptibles de provoquer des troubles de la sensibilité"},"sound-unknown":{"compact":"Pas d'information concernant la présence de sons","descriptive":"La présence de sons susceptibles de causer des troubles de sensibilité n'a pas pu être déterminée"},"title":"Points d'attention","unknown":"La présence de risques est inconnue"},"legal-considerations":{"exempt":{"compact":"Déclare être sous le coup d'une exemption dans certaines juridictions","descriptive":"Cette publication dééclare être sous le coup d'une exemption dans certaines juridictions"},"no-metadata":"Aucune information disponible","title":"Considérations légales"},"navigation":{"index":{"compact":"Index","descriptive":"Index comportant des liens vers les entrées référencées"},"no-metadata":"Aucune information disponible","page-navigation":{"compact":"Aller à la page","descriptive":"Permet d'accéder aux pages de la version source imprimée"},"structural":{"compact":"Titres","descriptive":"Contient des titres pour une navigation structurée"},"title":"Points de repère","toc":{"compact":"Table des matières","descriptive":"Table des matières"}},"rich-content":{"accessible-chemistry-as-latex":{"compact":"Formules chimiques en LaTeX","descriptive":"Formules chimiques en format accessible (LaTeX)"},"accessible-chemistry-as-mathml":{"compact":"Formules chimiques en MathML","descriptive":"Formules chimiques en format accessible (MathML)"},"accessible-math-as-latex":{"compact":"Mathématiques en LaTeX","descriptive":"Formules mathématiques en format accessible (LaTeX)"},"accessible-math-described":"Des descriptions textuelles des formules mathématiques sont fournies","closed-captions":{"compact":"Sous-titres disponibles pour les vidéos","descriptive":"Des sous titres sont disponibles pour les vidéos"},"extended-descriptions":"Les images porteuses d'informations complexes sont décrites par des descriptions longues","math-as-mathml":{"compact":"Mathématiques en MathML","descriptive":"Formules mathématiques en format accessible (MathML)"},"open-captions":{"compact":"Sous-titres incrustés","descriptive":"Des sous titres sont incrustés pour les vidéos"},"title":"Contenus spécifiques","transcript":"Transcriptions fournies","unknown":"Aucune information disponible"},"ways-of-reading":{"nonvisual-reading":{"alt-text":{"compact":"Images décrites","descriptive":"Les images sont décrites par un texte"},"no-metadata":"Aucune information pour la lecture en voix de synthèse ou en braille","none":{"compact":"Non lisible en voix de synthèse ou en braille","descriptive":"Le contenu n'est pas lisible en voix de synthèse ou en braille"},"not-fully":{"compact":"Pas entièrement lisible en voix de synthèse ou en braille","descriptive":"Tous les contenus ne pourront pas être lus à haute voix ou en braille"},"readable":{"compact":"Entièrement lisible en voix de synthèse ou en braille","descriptive":"Tous les contenus peuvent être lus en voix de synthèse ou en braille"}},"prerecorded-audio":{"complementary":{"compact":"Clips audio préenregistrés","descriptive":"Des clips audio préenregistrés sont intégrés au contenu"},"no-metadata":"Aucune information sur les enregistrements audio","only":{"compact":"Audio préenregistré uniquement","descriptive":"Livre audio sans texte alternatif"},"synchronized":{"compact":"Audio préenregistré synchronisé avec du texte","descriptive":"Tous les contenus sont disponibles comme audio préenregistrés synchronisés avec le texte"}},"title":"Lisibilité","visual-adjustments":{"modifiable":{"compact":"L'affichage peut être adapté","descriptive":"L'apparence du texte et la mise en page peuvent être modifiées en fonction des capacités du système de lecture (famille et taille des polices, espaces entre les paragraphes, les phrases, les mots et les lettres, ainsi que la couleur de l'arrière-plan et du texte)"},"unknown":"Aucune information sur les possibilités d'adaptation de l'affichage","unmodifiable":{"compact":"L'affichage ne peut pas être adapté","descriptive":"Le texte et la mise en page ne peuvent pas être adaptés étant donné que l'expérience de lecture est proche de celle de la version imprimée, mais l'application de lecture peut tout de même proposer la capacité de zoomer"}}}}},"altIdentifier_many":"","altIdentifier_one":"identifiant alternatif","altIdentifier_other":"identifiants alternatifs","artist_many":"","artist_one":"artiste","artist_other":"artiste","author_many":"","author_one":"auteur","author_other":"auteurs","collection_many":"","collection_one":"collection éditoriale","collection_other":"collections éditoriales","colorist_many":"","colorist_one":"coloriste","colorist_other":"coloristes","contributor_many":"","contributor_one":"contributeur","contributor_other":"contributeurs","description":"description","duration":"durée","editor_many":"","editor_one":"éditeur","editor_other":"éditeurs","identifier_many":"","identifier_one":"identifiant","identifier_other":"identifiants","illustrator_many":"","illustrator_one":"illustrateur","illustrator_other":"illustrateurs","imprint_many":"","imprint_one":"marque éditoriale","imprint_other":"marques éditoriales","inker_many":"","inker_one":"encreur","inker_other":"encreurs","language_many":"","language_one":"langue","language_other":"langues","letterer_many":"","letterer_one":"lettreur","letterer_other":"lettreurs","modified":"date de modification","narrator_many":"","narrator_one":"narrateur","narrator_other":"narrateurs","numberOfPages":"pagination papier","penciler_many":"","penciler_one":"dessinateur","penciler_other":"dessinateurs","published":"date de publication","publisher_many":"","publisher_one":"éditeur","publisher_other":"éditeurs","series_many":"","series_one":"série","series_other":"séries","subject_many":"","subject_one":"catégorie","subject_other":"catégories","subtitle":"sous-titre","title":"titre","translator_many":"","translator_one":"traducteur","translator_other":"traducteurs"}}`),ko=Object.freeze(Object.defineProperty({__proto__:null,default:{publication:Hn},publication:Hn},Symbol.toStringTag,{value:"Module"})),Bn={metadata:{accessibility:{"display-guide":{"accessibility-summary":{"no-metadata":"لا تتوفر أي معلومات","publisher-contact":"لمزيد من المعلومات حول إمكانية الوصول إلى هذا المنتج، يُرجى التواصل مع الناشر: ",title:"ملخص إمكانية الوصول"},"additional-accessibility-information":{aria:{compact:"أدوار ARIA مدرَجة",descriptive:"يتم تعزيز المحتوى باستخدام أدوار ARIA لتحسين التنظيم وتيسير التنقّل"},"audio-descriptions":"الوصف الصوتي",braille:"برايل","color-not-sole-means-of-conveying-information":"اللون ليس الوسيلة الوحيدة لنقل المعلومات","dyslexia-readability":"سهولة القراءة لذوي عُسر القراءة","full-ruby-annotations":"شروح روبي كاملة","high-contrast-between-foreground-and-background-audio":"تباين عالٍ بين الصوت الرئيسي وصوت الخلفية","high-contrast-between-text-and-background":"تباين عالٍ بين النص والخلفية","large-print":"خط كبير","page-breaks":{compact:"فواصل الصفحات متضمَّنة",descriptive:"فواصل الصفحات متضمَّنة من المصدر المطبوع الأصلي"},"ruby-annotations":"بعض شروح الروبي","sign-language":"لغة الإشارة","tactile-graphics":{compact:"الرسوم اللمسية مدرجة",descriptive:"تم دمج الرسوم اللمسية لتيسير الوصول إلى العناصر البصرية للأشخاص المكفوفين"},"tactile-objects":"مجسمات لمسية ثلاثية الأبعاد","text-to-speech-hinting":"إرشادات تحويل النص إلى كلام (TTS)متوفرة",title:"معلومات إضافية عن إمكانية الوصول","ultra-high-contrast-between-text-and-background":"تباين عالٍ جدًا بين النص والخلفية","visible-page-numbering":"ترقيم صفحات مرئي","without-background-sounds":"من دون أصوات في خلفية"},conformance:{a:{compact:"هذا المنشور يفي بالمعايير الدنيا لإمكانية الوصول",descriptive:"يحتوي هذا المنشور على بيان مطابقة يفيد بأنه يفي بمعيار إمكانية الوصول في EPUB وبمستوى A من معيار WCAG 2"},aa:{compact:"هذا المنشور يفي بالمعايير المعتمدة لإمكانية الوصول",descriptive:"يحتوي هذا المنشور على بيان مطابقة يفيد بأنه يفي بمعيار إمكانية الوصول في EPUB وبمستوى AA من معيار WCAG 2"},aaa:{compact:"هذا المنشور يفوق المعايير المقبولة لإمكانية الوصول",descriptive:"يحتوي هذا المنشور على بيان مطابقة يفيد بأنه يفي بمعيار إمكانية الوصول في EPUB وبمستوى AAA من معيار WCAG 2"},certifier:"تم اعتماد هذا المنشور من قبل ","certifier-credentials":"بيانات اعتماد جهة التصديق ",details:{"certification-info":"تم اعتماد هذا المنشور في تاريخ ","certifier-report":"لمزيد من المعلومات، يرجى الرجوع إلى تقرير جهة التصديق",claim:"يدّعي هذا المنشور أنه يستوفي","epub-accessibility-1-0":"معيار إمكانية الوصول لـ EPUB إصدار 1.0","epub-accessibility-1-1":"معيار إمكانية الوصول لـ EPUB إصدار 1.1","level-a":"المستوى A","level-aa":"المستوى AA","level-aaa":"المستوى AAA","wcag-2-0":{compact:"WCAG 2.0",descriptive:"مبادئ النفاذ إلى محتوى الويب (WCAG) 2.0"},"wcag-2-1":{compact:"WCAG 2.1",descriptive:"مبادئ النفاذ إلى محتوى الويب (WCAG) 2.1"},"wcag-2-2":{compact:"WCAG 2.2",descriptive:"مبادئ النفاذ إلى محتوى الويب (WCAG) 2.2"}},"details-title":"معلومات تفصيلية عن مدى المطابقة",no:"لا تتوفر أي معلومات",title:"المطابقة","unknown-standard":"لا يمكن التأكد من مدى مطابقة هذا المنشور للمعايير المقبولة لإمكانية الوصول"},hazards:{flashing:{compact:"محتوى وامض",descriptive:"يحتوي هذا المنشور على محتوى وامض قد يسبب نوبات حساسة للضوء"},"flashing-none":{compact:"لا توجد مخاطر وميض",descriptive:"لا يحتوي هذا المنشور على محتوى وامض قد يسبب نوبات حساسة للضوء"},"flashing-unknown":{compact:"مخاطر الوميض غير معروفة",descriptive:"لم يُمكن التأكد من وجود محتوى وامض قد يسبب نوبات حساسية للضوء"},motion:{compact:"محاكاة الحركة",descriptive:"يحتوي المنشور على محاكاة حركة قد تسبّب دوار الحركة"},"motion-none":{compact:"لا توجد مخاطر محاكاة الحركة",descriptive:"لا يحتوي المنشور على محاكاة حركة قد تسبّب دوار الحركة"},"motion-unknown":{compact:"مخاطر محاكاة الحركة غير معروفة",descriptive:"تعذّر تحديد ما إذا كانت هناك محاكاة للحركة قد تُسبب دوار الحركة"},"no-metadata":"لا تتوفر أي معلومات",none:{compact:"لا توجد مخاطر",descriptive:"لا يحتوي المنشور على أي مخاطر"},sound:{compact:"أصوات",descriptive:"يحتوي المنشور على أصوات قد تؤدي إلى مشاكل حساسية صوتية"},"sound-none":{compact:"لا توجد مخاطر صوتية",descriptive:"لا يحتوي المنشور على أصوات قد تؤدي إلى مشاكل حساسية صوتية"},"sound-unknown":{compact:"مخاطر الصوت غير معروفة",descriptive:"تعذّر تحديد ما إذا كانت هناك أصوات قد تُسبب مشكلات في الحساسية"},title:"مخاطر",unknown:"وجود المخاطر غير معروف"},"legal-considerations":{exempt:{compact:"يُعلن عن استثناء من متطلبات إمكانية الوصول من بعض السلطات القضائية",descriptive:"يُصرّح هذا المنشور بوجود استثناء من متطلبات إمكانية الوصول من بعض السلطات القضائية"},"no-metadata":"لا تتوفر أي معلومات",title:"اعتبارات قانونية"},navigation:{index:{compact:"كشاف",descriptive:"كشاف يحتوي على روابط إلى الإدخالات المشار إليها"},"no-metadata":"لا تتوفر أي معلومات","page-navigation":{compact:"الانتقال إلى صفحة",descriptive:"قائمة الصفحات للانتقال إلى صفحات من النسخة المطبوعة الأصلية"},structural:{compact:"العناوين",descriptive:"عناصر مثل العناوين والجداول وغيرها للتنقل المنظّم"},title:"التنقل",toc:{compact:"جدول المحتويات",descriptive:"جدول المحتويات لكل فصول النص عبر روابط"}},"rich-content":{"accessible-chemistry-as-latex":{compact:"الصيغ الكيميائية بصيغة LaTeX",descriptive:"الصيغ الكيميائية بشكل ميسر (LaTeX)"},"accessible-chemistry-as-mathml":{compact:"الصيغ الكيميائية بصيغة MathML",descriptive:"الصيغ الكيميائية بشكل ميسر (MathML)"},"accessible-math-as-latex":{compact:"الرياضيات بصيغة LaTeX",descriptive:"الصيغ الرياضية بشكل ميسر (LaTeX)"},"accessible-math-described":"تتوفر أوصاف نصية للصيغ الرياضية","closed-captions":{compact:"تحتوي الفيديوهات على شروح مغلقة",descriptive:"الفيديوهات الموجودة في المنشورات تحتوي على شروح مغلقة"},"extended-descriptions":"يتم وصف الصور الغنية بالمعلومات بأوصاف مفصّلة","math-as-mathml":{compact:"الرياضيات بصيغة MathML",descriptive:"الصيغ الرياضية بشكل ميسر(MathML)"},"open-captions":{compact:"تحتوي الفيديوهات على شروح مدمجة",descriptive:"الفيديوهات الموجودة في المنشورات تحتوي على شروح مدمجة"},title:"محتوى غني",transcript:"يتوفر نص(نصوص)",unknown:"لا تتوفر أي معلومات"},"ways-of-reading":{"nonvisual-reading":{"alt-text":{compact:"يحتوي على نص بديل",descriptive:"يحتوي على أوصاف نصية بديلة للصور"},"no-metadata":"لا تتوفر معلومات عن القراءة غير البصرية",none:{compact:"غير قابل للقراءة بصوتٍ عالٍ أو بطريقة برايل الديناميكية",descriptive:"المحتوى غير قابل للقراءة بصوتٍ عالٍ أو بطريقة برايل الديناميكية"},"not-fully":{compact:"غير قابل للقراءة بالكامل بصوتٍ عالٍ أو بطريقة برايل الديناميكية",descriptive:"لن يكون كل المحتوى قابلًا للقراءة بصوتٍ عالٍ أو بطريقة برايل الديناميكية"},readable:{compact:"قابل للقراءة بصوتٍ عالٍ أو بطريقة برايل الديناميكية",descriptive:"يمكن قراءة كل المحتوى بصوتٍ عالٍ أو بطريقة برايل الديناميكية"}},"prerecorded-audio":{complementary:{compact:"مقاطع الصوت المسجّلة مسبقًا",descriptive:"مقاطع الصوت المسجّلة مسبقًا مدمجة في المحتوى"},"no-metadata":"لا توجد معلومات عن الصوت المسجّل مسبقًا",only:{compact:"الصوت المسجّل مسبقًا فقط",descriptive:"كتاب صوتي بدون بديل نصي"},synchronized:{compact:"صوت مسجّل مسبقًا متزامن مع النص",descriptive:"كل المحتوى متوفر كصوت مسجّل مسبقًا متزامن مع النص"}},title:"طرق القراءة","visual-adjustments":{modifiable:{compact:"يمكن تعديل المظهر",descriptive:"يمكن تعديل مظهر النص وتخطيط الصفحة وفقاً لإمكانات نظام القراءة (اسم الخط وحجمه، والمسافات بين الفقرات والجمل والكلمات والأحرف، بالإضافة إلى لون الخلفية والنص)"},unknown:"لا توجد معلومات عن إمكانية تعديل المظهر",unmodifiable:{compact:"لا يمكن تعديل المظهر",descriptive:"لا يمكن تعديل مظهر النص وتخطيط الصفحات لأن تجربة القراءة قريبة من النسخة المطبوعة، ولكن تطبيقات القراءة ما زالت تتيح خيارات التكبير"}}}}},altIdentifier_one:"رمز تعريفي بديل",altIdentifier_other:"رموز تعريفية بديلة",artist_one:"فنان",artist_other:"فنانون",author_one:"مؤلف",author_other:"مؤلفون",collection_one:"سلسلة تحريرية",collection_other:"سلاسل تحريرية",colorist_one:"ملوّن الألوان",colorist_other:"ملوّنو الألوان",contributor_one:"مساهم",contributor_other:"مساهمون",description:"وصف",duration:"مدة",editor_one:"محرر",editor_other:"محررون",identifier_one:"رمز تعريفي",identifier_other:"رموز تعريفية",illustrator_one:"رسًام",illustrator_other:"رسامون",imprint_one:"العلامة التجارية للنشر",imprint_other:"العلامات التجارية للنشر",inker_one:"مُحَبِّر",inker_other:"مُحَبِّرون",language_one:"اللغة",language_other:"اللغات",letterer_one:"خطّاط",letterer_other:"خطّاطون",modified:"تاريخ التعديل",narrator_one:"قارئ صوتي",narrator_other:"قرّاء صوتيون",numberOfPages:"عدد الصفحات في النسخة المطبوعة",penciler_one:"رسّام أولي",penciler_other:"رسّامون أوّليون",published:"تاريخ النشر",publisher_one:"ناشر",publisher_other:"ناشرون",series_one:"سلسلة",series_other:"سلاسل",subject_one:"موضوع",subject_other:"مواضيع",subtitle:"عنوان فرعي",title:"العنوان",translator_one:"مترجم",translator_other:"مترجمون"}},Co=Object.freeze(Object.defineProperty({__proto__:null,default:{publication:Bn},publication:Bn},Symbol.toStringTag,{value:"Module"})),Vn={metadata:{accessibility:{"display-guide":{"accessibility-summary":{"no-metadata":"Ingen information tilgængelig","publisher-contact":"For mere information om tilgængeligheden af denne bog, kontakt venligst udgiveren: ",title:"Tilgængeligheds-oversigt"},"additional-accessibility-information":{aria:{compact:"Indeholder ARIA roller",descriptive:"Indhold forbedres med ARIA-roller for at optimere organisering og gøre navigation lettere"},"audio-descriptions":"Lydbeskrivelser",braille:"Punktskrift (braille)","color-not-sole-means-of-conveying-information":"Information gives ikke udelukkende via farver","dyslexia-readability":"Læsbarhed for ordblinde","full-ruby-annotations":'Indeholder såkalde "ruby" notationer (til asiatiske sprog)',"high-contrast-between-foreground-and-background-audio":"Høj kontrast imellem forgrunds- og baggrunds-lyd","high-contrast-between-text-and-background":"Høj kontrast imellem tekst og baggrunden","large-print":"Forstørret tekst","page-breaks":{compact:"Indeholder sideskift",descriptive:"Indeholder sideskift fra den trykte version af bogen"},"ruby-annotations":'Nogle "ruby" annotationer (til asiatiske sprog)',"sign-language":"Tegnsprog","tactile-graphics":{compact:"Indeholder taktil grafik",descriptive:"Indeholder taktil grafik for at muliggøre adgang til visuel information for blinde"},"tactile-objects":"Taktile 3D objekter","text-to-speech-hinting":"Udtaleforbedringer til syntetisk tale",title:"Yderligere information om tilgængelighed","ultra-high-contrast-between-text-and-background":"Ultra høj kontrast imellem tekst og baggrund","visible-page-numbering":"Synlige sidenumre","without-background-sounds":"Uden baggrundslyd"},conformance:{a:{compact:"Denne bog overholder minimum-tilgængelighedskravene",descriptive:"Denne bog en overensstemmelseserklæring om, at den opfylder EPUB Tilgængelighedskrav og WCAG 2 standarden på niveau A"},aa:{compact:"Denne bog lever op til de accepterede tilgængelighedskrav",descriptive:"Denne bog en overensstemmelseserklæring om, at den opfylder EPUB Tilgængelighedskrav og WCAG 2 standarden på niveau AA"},aaa:{compact:"Denne bog mere end opfylder de accepterede tilgængelighedskrav",descriptive:"Denne bog en overensstemmelseserklæring om, at den opfylder EPUB Tilgængelighedskrav og WCAG 2 standarden på niveau AAA"},certifier:"Denne bog blev certificeret af ","certifier-credentials":"Certificeringsorganets legitimationsoplysninger er ",details:{"certification-info":"Bogen blev certificeret den ","certifier-report":"Se certificeringsorganets rapport for mere information",claim:"Denne bog hævder at opfylde","epub-accessibility-1-0":"EPUB Tilgængelighed 1.0","epub-accessibility-1-1":"EPUB Tilgængelighed 1.1","level-a":"Niveau A","level-aa":"Niveau AA","level-aaa":"Niveau AAA","wcag-2-0":{compact:"WCAG 2.0",descriptive:"Retningslinjer for tilgængeligt webindhold (WCAG) 2.0"},"wcag-2-1":{compact:"WCAG 2.1",descriptive:"Retningslinjer for tilgængeligt webindhold (WCAG) 2.1"},"wcag-2-2":{compact:"WCAG 2.2",descriptive:"Retningslinjer for tilgængeligt webindhold (WCAG) 2.2"}},"details-title":"Detaljeret overholdelses-information",no:"Ingen information tilgængelig",title:"Overholdelse","unknown-standard":"Overholdelse af de accepterede tilgængelighedskrav kan ikke vurderes for denne bog"},hazards:{flashing:{compact:"Blinkende indhold",descriptive:"Bogen indeholder blinkende indhold der kan forårsage epileptiske anfald"},"flashing-none":{compact:"Ingen blinkende indhold",descriptive:"Bogen indeholder ikke noget blinkende indhold, der kunne forårsage epileptiske anfald"},"flashing-unknown":{compact:"Ingen information om bogen har blinkende indhold",descriptive:"Det kunne ikke afgøres om bogen indeholder blinkende indhold der kan lede til epileptiske anfald"},motion:{compact:"Simuleret bevægelse",descriptive:"Bogen indeholder simuleret bevægelse, der kan forårsage en følelse af køresyge"},"motion-none":{compact:"Indeholder ikke simuleret bevægelse",descriptive:"Denne bog indeholder ikke noget indhold med simuleret bevægelse, der kunne lede til en følelse af køresyge"},"motion-unknown":{compact:"Ingen information om simuleret bevægelse",descriptive:"Det kunne ikke vurderes om bogen indeholder simuleret bevægelse, der kan lede til en følelse af køresyge"},"no-metadata":"Ingen information tilgængelig",none:{compact:"Ingen farer",descriptive:"Bogen indeholder ikke noget indhold der kategoriseres som farligt"},sound:{compact:"Lyde",descriptive:"Bogen indeholder lyde der kan være ubehagelige hvis man er sensitiv overfor lyde"},"sound-none":{compact:"Ingen ubehagelige lyde",descriptive:"Bogen indeholder ikke lyde der kunne opleves som ubehagelige hvis man er sensitiv overfor lyde"},"sound-unknown":{compact:"Ingen information om ubehagelige lyde",descriptive:"Det kunne ikke afgøres om bogen indeholder ubehagelige lyde"},title:"Farer",unknown:"Ingen information om farligt indhold"},"legal-considerations":{exempt:{compact:"Gør krav på undtagelser fra tilgængelighedskrav",descriptive:"Denne bog gør krav på en tilgængelighedsundtagelse i en eller flere jurisdiktioner"},"no-metadata":"Ingen information tilgængelig",title:"Juridiske overvejelser"},navigation:{index:{compact:"Indholdsfortegnelse",descriptive:"Indholdsfortegnelse med links til referencer"},"no-metadata":"Ingen information tilgængelig","page-navigation":{compact:"Gå til side",descriptive:"Sideliste for at gå til sider fra den trykte kildeversion"},structural:{compact:"Overskrifter",descriptive:"Elementer så som overskrifter og tabeller til struktureret navigation"},title:"Navigation",toc:{compact:"Indholdsfortegnelse",descriptive:"Indholdsfortegnelse med links til alle kapitler"}},"rich-content":{"accessible-chemistry-as-latex":{compact:"Kemiske formularer i LaTeX",descriptive:"Kemiske formularer i tilgængeligt format (LaTeX)"},"accessible-chemistry-as-mathml":{compact:"Kemiske formularer i MathML notation",descriptive:"Kemiske formularer i tilgængeligt format (MathML)"},"accessible-math-as-latex":{compact:"Matematik som LaTeX",descriptive:"Matematikformler i tilgængeligt format (LaTeX)"},"accessible-math-described":"Tekstbeskrivelser til matematiske formler","closed-captions":{compact:"Videoer har undertekster",descriptive:"Videoer der optræder i bogen har undertekster"},"extended-descriptions":"Informationsrige billeder beskrives med udvidede beskrivelser","math-as-mathml":{compact:"Matematik som MathML",descriptive:"Matematiske formler i tilgængeligt format (MathML)"},"open-captions":{compact:"Videoer har indlejrede undertekster",descriptive:"Videoer der optræder i bogen har indlejrede undertekster"},title:"Komplekst indhold",transcript:"Indeholder transskription(er)",unknown:"Ingen information tilgængelig"},"ways-of-reading":{"nonvisual-reading":{"alt-text":{compact:"Har alternativ tekst",descriptive:"Har billedbeskrivelser"},"no-metadata":"Ingen information omkring ikke-visuel læsning",none:{compact:"Ikke læsbar med oplæsning eller dynamisk punktskrift",descriptive:"Dette indhold er ikke læsbart med oplæsning eller dynamisk punktskrift"},"not-fully":{compact:"Ikke fuldt læsbar med oplæsning eller dynamisk punktskrift",descriptive:"Alt indholdet er ikke fuldt læsbart med oplæsning eller dynamisk punktskrift"},readable:{compact:"Læsbar med oplæsning eller dynamisk punktskrift",descriptive:"Alt indholdet er læsbart med oplæsning eller dynamisk punktskrift"}},"prerecorded-audio":{complementary:{compact:"Indlæste lydklip",descriptive:"Indlæste lydklip er indlejret i indholdet"},"no-metadata":"Ingen information om indlæst lyd",only:{compact:"Kun indlæst lyd",descriptive:"Lydbog uden tekst alternativer"},synchronized:{compact:"Indlæst lyd med synkroniseret tekst",descriptive:"Alt indholdet er tilgængeligt med indlæst lyd og synkroniseret tekst"}},title:"Læseformer","visual-adjustments":{modifiable:{compact:"Udseende kan ændres",descriptive:"Udseende af tekst og sidelayout kan ændres, så vidt muligt i læsesystemet (skrifttype, skriftstørrelse, afstand mellem afsnit, sætninger, ord og bogstaver, samt farven på tekst og baggrund)"},unknown:"Ingen information om mulighed for ændring af udseende",unmodifiable:{compact:"Udseende kan ikke ændres",descriptive:"Tekst og sidelayout kan ikke ændres, da læseoplevelsen afspejler den trykte version af materialet. Læsesystemet kan dog stadig give mulighed for zoom"}}}}},altIdentifier_one:"alternativt ID",altIdentifier_other:"alternative ID'er",artist_one:"kunstner",artist_other:"kunstnere",author_one:"forfatter",author_other:"forfattere",collection_one:"redaktionel samling",collection_other:"redaktionelle samlinger",colorist_one:"farvelægger",colorist_other:"farvelæggere",contributor_one:"bidragsyder",contributor_other:"bidragsydere",description:"beskrivelse",duration:"varighed",editor_one:"redaktør",editor_other:"redaktører",identifier_one:"ID",identifier_other:"ID'er",illustrator_one:"illustrator",illustrator_other:"illustratorer",imprint_one:"trykkeri",imprint_other:"trykkerier",inker_one:"tegner",inker_other:"tegnere",language_one:"sprog",language_other:"sprog",letterer_one:"taleboble-forfatter",letterer_other:"taleboble-forfattere",modified:"rettet dato",narrator_one:"indlæser",narrator_other:"indlæsere",numberOfPages:"printbare sider",penciler_one:"tegneseriekunstner",penciler_other:"tegneseriekunstnere",published:"udgivelsesdato",publisher_one:"udgiver",publisher_other:"udgivere",series_one:"serie",series_other:"serier",subject_one:"emne",subject_other:"emner",subtitle:"undertitel",title:"titel",translator_one:"oversætter",translator_other:"oversættere"}},xo=Object.freeze(Object.defineProperty({__proto__:null,default:{publication:Vn},publication:Vn},Symbol.toStringTag,{value:"Module"})),jn=JSON.parse(`{"format":{"audiobook":"Audiolibro","audiobookJSON":"Audiobook Manifest","cbz":"Comic book archive","divina":"Divina Publication","divinaJSON":"Divina Publication Manifest","epub":"EPUB","lcpa":"Audiolibro protetto con LCP","lcpdf":"PDF protetto con LCP","lcpl":"Licenza LCP","pdf":"PDF","rwp":"Readium Web Publication","rwpm":"Readium Web Publication Manifest","zab":"Audiobook Archive","zip":"ZIP Archive"},"kind":{"audiobook_many":"audiolibri","audiobook_one":"audiolibro","audiobook_other":"audiolibri","book_many":"libri","book_one":"libro","book_other":"libri","comic_many":"fumetti","comic_one":"fumetto","comic_other":"fumetti","document_many":"documenti","document_one":"documento","document_other":"documenti"},"metadata":{"accessibility":{"display-guide":{"accessibility-summary":{"no-metadata":"Nessuna informazione disponibile","publisher-contact":"Per ulteriori informazioni sull'accessibilità di questa risorsa, contattare l'editore: ","title":"Informazioni aggiuntive sull'accessibilità fornite dall'editore"},"additional-accessibility-information":{"aria":{"compact":"Ruoli ARIA inclusi","descriptive":"Il contenuto è semanticamente arricchito con ruoli ARIA per ottimizzare l'organizzazione e facilitare la navigazione"},"audio-descriptions":"Descrizioni audio","braille":"Braille","color-not-sole-means-of-conveying-information":"Il colore non è l'unico mezzo per trasmettere informazioni","dyslexia-readability":"Leggibilità adatta alla dislessia","full-ruby-annotations":"Annotazioni complete in Ruby","high-contrast-between-foreground-and-background-audio":"Elevato contrasto tra audio principale e sottofondo","high-contrast-between-text-and-background":"Contrasto elevato tra testo in primo piano e sfondo","large-print":"Stampa a caratteri ingranditi","page-breaks":{"compact":"Interruzioni di pagina incluse","descriptive":"Interruzioni di pagina identiche alla versione originale a stampa"},"ruby-annotations":"Alcune annotazioni in Ruby","sign-language":"Lingua dei segni","tactile-graphics":{"compact":"Grafica tattile inclusa","descriptive":"La grafica tattile è stata integrata per facilitare l'accesso agli elementi visivi alle persone non vedenti"},"tactile-objects":"Oggetti 3D tattili","text-to-speech-hinting":"Pronuncia migliorata per la sintesi vocale","title":"Ulteriori informazioni sull'accessibilità","ultra-high-contrast-between-text-and-background":"Contrasto molto elevato tra testo e sfondo","visible-page-numbering":"Numerazione delle pagine visibile","without-background-sounds":"Nessun suono in sottofondo"},"conformance":{"a":{"compact":"Questa pubblicazione soddisfa gli standard minimi di accessibilità","descriptive":"La pubblicazione contiene una dichiarazione di conformità che attesta il rispetto degli standard EPUB Accessibility e WCAG 2 Livello A"},"aa":{"compact":"Questa pubblicazione soddisfa gli standard di accessibilità accettati","descriptive":"La pubblicazione contiene una dichiarazione di conformità che attesta il rispetto degli standard EPUB Accessibility e WCAG 2 Livello AAA"},"aaa":{"compact":"Questa pubblicazione supera gli standard di accessibilità","descriptive":"La pubblicazione contiene una dichiarazione di conformità che attesta il rispetto degli standard EPUB Accessibility e WCAG 2 Livello AAA"},"certifier":"La pubblicazione è stata certificata da ","certifier-credentials":"Le credenziali del certificatore sono ","details":{"certification-info":"La pubblicazione è stata certificata il ","certifier-report":"Per ulteriori informazioni, consultare il report di accessibilità del certificatore","claim":"Questa pubblicazione è conforme ai requisiti di","epub-accessibility-1-0":"EPUB Accessibility 1.0","epub-accessibility-1-1":"EPUB Accessibility 1.1","level-a":"Livello A","level-aa":"Livello AA","level-aaa":"Livello AAA","wcag-2-0":{"compact":"WCAG 2.0","descriptive":"Linee guida per l'accessibilità dei contenuti web (WCAG) 2.0"},"wcag-2-1":{"compact":"WCAG 2.1","descriptive":"Linee guida per l'accessibilità dei contenuti web (WCAG) 2.1"},"wcag-2-2":{"compact":"WCAG 2.2","descriptive":"Linee guida per l'accessibilità dei contenuti web (WCAG) 2.2"}},"details-title":"Informazioni dettagliate sulla conformità","no":"Nessuna informazione disponibile","title":"Conformità","unknown-standard":"Nessuna indicazione sugli standard d'accessibilità"},"hazards":{"flashing":{"compact":"Contenuto lampeggiante","descriptive":"La pubblicazione contiene contenuti lampeggianti che possono causare crisi d'epilessia fotosensibile"},"flashing-none":{"compact":"Nessun contenuto lampeggiante","descriptive":"La pubblicazione non presenta contenuti lampeggianti che possono causare crisi d'epilessia fotosensibile"},"flashing-unknown":{"compact":"Nessuna informazione sulla presenza di contenuti lampeggianti","descriptive":"Non è stato possibile determinare la presenza di contenuti lampeggianti che possono causare crisi d'epilessia fotosensibile"},"motion":{"compact":"Simulazione del movimento","descriptive":"La pubblicazione contiene simulazioni di movimento che possono provocare cinetosi"},"motion-none":{"compact":"Nessun rischio di simulazione del movimento","descriptive":"La pubblicazione non contiene simulazioni di movimento che possono causare la malattia di movimento"},"motion-unknown":{"compact":"Nessuna informazione relativa alla presenza di simulazioni di movimento","descriptive":"Non è stato possibile determinare la presenza di contenuti che possono provocare cinetosi"},"no-metadata":"Nessuna informazione disponibile","none":{"compact":"Nessuna problematica","descriptive":"La pubblicazione non presenta contenuti a rischio di simulazione di movimento, di suoni, o di contenuti lampeggianti"},"sound":{"compact":"Suoni","descriptive":"La pubblicazione contiene suoni che possono causare problemi di sensibilità"},"sound-none":{"compact":"Nessun rischio acustico","descriptive":"La pubblicazione non contiene suoni che possono causare problemi di sensibilità"},"sound-unknown":{"compact":"Nessuna informazione sulla presenza di suoni","descriptive":"Non è stato possibile determinare la presenza di suoni che potrebbero causare problemi di sensibilità"},"title":"Problematiche","unknown":"La presenza di rischi è sconosciuta"},"legal-considerations":{"exempt":{"compact":"Dichiara di godere dell'esenzione d'accessibilità in alcune giurisdizioni","descriptive":"Questa risorsa gode dell'esenzione d'accessibilità in alcune giurisdizioni"},"no-metadata":"Nessuna informazione disponibile","title":"Note legali"},"navigation":{"index":{"compact":"Indice analitico interattivo","descriptive":"Indice analitico con link alle voci di riferimento"},"no-metadata":"Nessuna informazione disponibile","page-navigation":{"compact":"Vai alla pagina","descriptive":"Sono presenti i riferimenti ai numeri di pagina della versione a stampa corrispondente"},"structural":{"compact":"Intestazioni","descriptive":"Contiene elementi come titoli, elenchi e tabelle per permettere una navigazione strutturata"},"title":"Navigazione","toc":{"compact":"Indice interattivo","descriptive":"L’indice permette l’accesso diretto a tutti i capitoli tramite link"}},"rich-content":{"accessible-chemistry-as-latex":{"compact":"Formule chimiche in LaTeX","descriptive":"Formule chimiche in formato accessibile (LaTeX)"},"accessible-chemistry-as-mathml":{"compact":"Formule chimiche in MathML","descriptive":"Formule chimiche in formato accessibile (MathML)"},"accessible-math-as-latex":{"compact":"Matematica in LaTeX","descriptive":"Formule matematiche in formato accessibile (LaTeX)"},"accessible-math-described":"Sono disponibili descrizioni testuali per le formule matematiche","closed-captions":{"compact":"Sottotitoli disponibili per i video","descriptive":"Per i video sono disponibili dei sottotitoli"},"extended-descriptions":"Le immagini complesse presentano descrizioni estese","math-as-mathml":{"compact":"Matematica in MathML","descriptive":"Formule matematiche in formato accessibile (MathML)"},"open-captions":{"compact":"I video hanno i sottotitoli","descriptive":"I video inclusi nella pubblicazione hanno i sottotitoli"},"title":"Contenuti arricchiti","transcript":"Trascrizioni fornite","unknown":"Nessuna informazione disponibile"},"ways-of-reading":{"nonvisual-reading":{"alt-text":{"compact":"Immagini descritte","descriptive":"Le immagini sono descritte da un testo"},"no-metadata":"Nessuna informazione sulla lettura non visiva","none":{"compact":"Non leggibile con lettura ad alta voce o in braille","descriptive":"Il contenuto non è leggibile con la lettura ad alta voce o in braille"},"not-fully":{"compact":"Non è interamente leggibile con lettura ad alta voce o in braille","descriptive":"Non tutti i contenuti potranno essere letti con lettura ad alta voce o in braille"},"readable":{"compact":"Interamente leggibile con lettura ad alta voce o in braille","descriptive":"Tutti i contenuti possono essere letti con la lettura ad alta voce o con il display braille"}},"prerecorded-audio":{"complementary":{"compact":"Clip audio preregistrate","descriptive":"Le clip audio preregistrate sono integrate nel contenuto"},"no-metadata":"Non sono disponibili informazioni sull'audio preregistrato","only":{"compact":"Solo audio preregistrato","descriptive":"Audiolibro senza testi alternativi"},"synchronized":{"compact":"Audio preregistrato sincronizzato con il testo","descriptive":"Tutti i contenuti sono disponibili come audio preregistrato sincronizzato con il testo"}},"title":"Leggibilità","visual-adjustments":{"modifiable":{"compact":"La formattazione del testo e il layout della pagina possono essere modificati","descriptive":"La formattazione del testo e il layout della pagina possono essere modificati in base alle funzionalità presenti nella soluzione di lettura (ingrandimento dei caratteri del testo, modifica dei colori e dei contrasti per il testo e lo sfondo, modifica degli spazi tra lettere, parole, frasi e paragrafi)"},"unknown":"Non sono disponibili informazioni sulla possibilità di formattare il testo","unmodifiable":{"compact":"La formattazione del testo e il display della pagina non possono essere modificati","descriptive":"Il layout di testo e pagina non può essere modificato poiché l'esperienza di lettura è vicina a una versione di stampa, ma i sistemi di lettura possono ancora fornire opzioni di zoom"}}}}},"altIdentifier_many":"identificatori alternativi","altIdentifier_one":"identificatore alternativo","altIdentifier_other":"identificatori alternativi","artist_many":"","artist_one":"artista","artist_other":"artisti","author_many":"","author_one":"autore","author_other":"autori","collection_many":"","collection_one":"collana","collection_other":"collane","colorist_many":"","colorist_one":"colorista","colorist_other":"coloristi","contributor_many":"","contributor_one":"contributore","contributor_other":"contributori","description":"descrizione","duration":"durata","editor_many":"","editor_one":"editor","editor_other":"editori","identifier_many":"identificatori","identifier_one":"identificatore","identifier_other":"identificatori","illustrator_many":"","illustrator_one":"illustratore","illustrator_other":"illustratori","imprint_many":"","imprint_one":"marca editoriale","imprint_other":"marche editoriali","inker_many":"","inker_one":"inchiostratore","inker_other":"inchiostratori","language_many":"","language_one":"lingua","language_other":"lingue","letterer_many":"letteristi","letterer_one":"letterista","letterer_other":"letteristi","modified":"Data di modifica","narrator_many":"","narrator_one":"narratore","narrator_other":"narratori","numberOfPages":"impaginazione versione cartacea","penciler_many":"","penciler_one":"disegnatore","penciler_other":"disegnatori","published":"Data di pubblicazione","publisher_many":"","publisher_one":"editore","publisher_other":"editori","series_many":"","series_one":"serie","series_other":"serie","subject_many":"","subject_one":"categoria","subject_other":"categorie","subtitle":"sottotitolo","title":"titolo","translator_many":"","translator_one":"traduttore","translator_other":"traduttori"}}`),Lo=Object.freeze(Object.defineProperty({__proto__:null,default:{publication:jn},publication:jn},Symbol.toStringTag,{value:"Module"})),Gn={metadata:{accessibility:{"display-guide":{"accessibility-summary":{"no-metadata":"Sem informação disponível","publisher-contact":"Para mais informações sobre a acessibilidade deste produto, contacte a editora: ",title:"Resumo de acessibilidade"},"additional-accessibility-information":{aria:{compact:"Inclui funções ARIA",descriptive:"O conteúdo foi otimizado com funções ARIA para melhorar a organização e facilitar a navegação"},"audio-descriptions":"Descrições em áudio",braille:"Braille","color-not-sole-means-of-conveying-information":"A cor não é o único meio de transmitir informação","dyslexia-readability":"Otimizado para dislexia","full-ruby-annotations":"Anotações Ruby completas","high-contrast-between-foreground-and-background-audio":"Alto contraste entre som principal e fundo","high-contrast-between-text-and-background":"Alto contraste entre texto e fundo","large-print":"Impressão ampliada","page-breaks":{compact:"Inclui quebras de página",descriptive:"Inclui quebras de página da fonte impressa original"},"ruby-annotations":"Algumas anotações Ruby","sign-language":"Língua gestual","tactile-graphics":{compact:"Inclui gráficos táteis",descriptive:"Inclui gráficos táteis que facilitam o acesso a elementos visuais para pessoas cegas"},"tactile-objects":"Objetos táteis 3D","text-to-speech-hinting":"Sugestões para leitura em voz alta",title:"Informação adicional de acessibilidade","ultra-high-contrast-between-text-and-background":"Contraste muito elevado entre texto e fundo","visible-page-numbering":"Numeração de páginas visível","without-background-sounds":"Sem sons de fundo"},conformance:{a:{compact:"Cumpre as normas mínimas de acessibilidade",descriptive:"A publicação contém uma declaração de conformidade que indica que cumpre o padrão EPUB Accessibility e WCAG 2 nível A"},aa:{compact:"Cumpre as normas aceites de acessibilidade",descriptive:"A publicação contém uma declaração de conformidade que indica que cumpre o padrão EPUB Accessibility e WCAG 2 nível AA"},aaa:{compact:"Excede as normas aceites de acessibilidade",descriptive:"A publicação contém uma declaração de conformidade que indica que cumpre o padrão EPUB Accessibility e WCAG 2 nível AAA"},certifier:"A publicação foi certificada por ","certifier-credentials":"As credenciais do certificador são ",details:{"certification-info":"A publicação foi certificada em ","certifier-report":"Para mais informações, consulte o relatório do certificador",claim:"Esta publicação declara conformidade com","epub-accessibility-1-0":"EPUB Accessibility 1.0","epub-accessibility-1-1":"EPUB Accessibility 1.1","level-a":"Nível A","level-aa":"Nível AA","level-aaa":"Nível AAA","wcag-2-0":{compact:"WCAG 2.0",descriptive:"Diretrizes de Acessibilidade para Conteúdo Web (WCAG) 2.0"},"wcag-2-1":{compact:"WCAG 2.1",descriptive:"Diretrizes de Acessibilidade para Conteúdo Web (WCAG) 2.1"},"wcag-2-2":{compact:"WCAG 2.2",descriptive:"Diretrizes de Acessibilidade para Conteúdo Web (WCAG) 2.2"}},"details-title":"Detalhes de conformidade",no:"Sem informação disponível",title:"Conformidade","unknown-standard":"Não foi possível determinar a conformidade com as normas de acessibilidade aceites para esta publicação"},hazards:{flashing:{compact:"Conteúdo intermitente",descriptive:"A publicação contém conteúdo intermitente que pode causar crises fotossensíveis"},"flashing-none":{compact:"Sem perigos de intermitência",descriptive:"A publicação não contém conteúdo intermitente que possa causar crises fotossensíveis"},"flashing-unknown":{compact:"Risco de intermitência desconhecido",descriptive:"Não foi possível determinar se existe conteúdo intermitente que possa causar crises fotossensíveis"},motion:{compact:"Simulação de movimento",descriptive:"A publicação contém simulações de movimento que podem causar enjoo"},"motion-none":{compact:"Sem simulação de movimento",descriptive:"A publicação não contém simulações de movimento que possam causar enjoo"},"motion-unknown":{compact:"Risco de movimento desconhecido",descriptive:"Não foi possível determinar se existem simulações de movimento que possam causar enjoo"},"no-metadata":"Sem informação disponível",none:{compact:"Sem perigos",descriptive:"A publicação não contém perigos conhecidos"},sound:{compact:"Sons sensíveis",descriptive:"A publicação contém sons que podem causar sensibilidade auditiva"},"sound-none":{compact:"Sem perigos sonoros",descriptive:"A publicação não contém sons que possam causar sensibilidade auditiva"},"sound-unknown":{compact:"Risco sonoro desconhecido",descriptive:"Não foi possível determinar se a publicação contém sons que possam causar sensibilidade auditiva"},title:"Perigos",unknown:"Presença de perigos não determinada"},"legal-considerations":{exempt:{compact:"Declara isenção de conformidade em algumas jurisdições",descriptive:"Esta publicação declara isenção de conformidade em algumas jurisdições"},"no-metadata":"Sem informação disponível",title:"Considerações legais"},navigation:{index:{compact:"Índice remissivo",descriptive:"Índice com ligações para entradas referenciadas"},"no-metadata":"Sem informação disponível","page-navigation":{compact:"Ir para página",descriptive:"Lista de páginas que permite aceder às páginas da versão impressa original"},structural:{compact:"Títulos e estrutura",descriptive:"Elementos como títulos, tabelas, etc., para navegação estruturada"},title:"Navegação",toc:{compact:"Índice",descriptive:"Índice de conteúdos com ligações para todos os capítulos do texto"}},"rich-content":{"accessible-chemistry-as-latex":{compact:"Fórmulas químicas em LaTeX",descriptive:"Fórmulas químicas em formato acessível (LaTeX)"},"accessible-chemistry-as-mathml":{compact:"Fórmulas químicas em MathML",descriptive:"Fórmulas químicas em formato acessível (MathML)"},"accessible-math-as-latex":{compact:"Matemática em LaTeX",descriptive:"Fórmulas matemáticas em formato acessível (LaTeX)"},"accessible-math-described":"Descrição textual das fórmulas matemáticas","closed-captions":{compact:"Vídeos com legendas ocultas",descriptive:"Os vídeos incluídos na publicação têm legendas ocultas"},"extended-descriptions":"Imagens complexas com descrições detalhadas","math-as-mathml":{compact:"Matemática em MathML",descriptive:"Fórmulas matemáticas em formato acessível (MathML)"},"open-captions":{compact:"Vídeos com legendas abertas",descriptive:"Os vídeos incluídos na publicação têm legendas abertas"},title:"Conteúdo rico",transcript:"Transcrição fornecida",unknown:"Sem informação disponível"},"ways-of-reading":{"nonvisual-reading":{"alt-text":{compact:"Contém texto alternativo",descriptive:"Inclui descrições alternativas de texto para imagens"},"no-metadata":"Sem informação sobre leitura não visual",none:{compact:"Não legível em leitura em voz alta ou braille dinâmico",descriptive:"O conteúdo não é legível em voz alta ou através de braille dinâmico"},"not-fully":{compact:"Parcialmente legível em leitura em voz alta ou braille dinâmico",descriptive:"Nem todo o conteúdo é legível em voz alta ou através de braille dinâmico"},readable:{compact:"Totalmente legível em leitura em voz alta ou braille dinâmico",descriptive:"Todo o conteúdo pode ser lido em voz alta ou através de braille dinâmico"}},"prerecorded-audio":{complementary:{compact:"Contém clipes de áudio pré-gravados",descriptive:"O conteúdo contém clipes de áudio pré-gravados incorporados"},"no-metadata":"Sem informação sobre áudio pré-gravado",only:{compact:"Apenas áudio pré-gravado",descriptive:"A publicação é apenas áudio e não possui alternativa em texto"},synchronized:{compact:"Áudio pré-gravado sincronizado com texto",descriptive:"Todo o conteúdo está disponível como áudio pré-gravado sincronizado com texto"}},title:"Formas de leitura","visual-adjustments":{modifiable:{compact:"Aspeto personalizável",descriptive:"O aspeto do texto e o layout da página podem ser modificados de acordo com as capacidades do sistema de leitura (tipo e tamanho de letra, espaçamento entre parágrafos, frases, palavras e letras, bem como a cor de fundo e do texto)"},unknown:"Sem informação sobre personalização do aspeto",unmodifiable:{compact:"Aspeto não ajustável",descriptive:"O texto e o layout da página não podem ser modificados, uma vez que a experiência de leitura é semelhante à versão impressa, mas os sistemas de leitura ainda podem oferecer opções de ampliação"}}}}},altIdentifier_one:"identificador alternativo",altIdentifier_other:"identificadores alternativos",artist_one:"artista",artist_other:"artistas",author_one:"autor",author_other:"autores",collection_one:"coleção",collection_other:"coleções",colorist_one:"colorista",colorist_other:"coloristas",contributor_one:"colaborador",contributor_other:"colaboradores",description:"descrição",duration:"duração",editor_one:"editor",editor_other:"editores",identifier_one:"identificador",identifier_other:"identificadores",illustrator_one:"ilustrador",illustrator_other:"ilustradores",imprint_one:"selo editorial",imprint_other:"selos editoriais",inker_one:"arte-finalista",inker_other:"arte-finalistas",language_one:"idioma",language_other:"idiomas",letterer_one:"letrista",letterer_other:"letristas",modified:"data de modificação",narrator_one:"narrador",narrator_other:"narradores",numberOfPages:"número de páginas",penciler_one:"desenhador",penciler_other:"desenhadores",published:"data de publicação",publisher_one:"editora",publisher_other:"editoras",series_one:"série",series_other:"séries",subject_one:"tema",subject_other:"temas",subtitle:"subtítulo",title:"título",translator_one:"tradutor",translator_other:"tradutores"}},Ro=Object.freeze(Object.defineProperty({__proto__:null,default:{publication:Gn},publication:Gn},Symbol.toStringTag,{value:"Module"})),Xn={metadata:{accessibility:{"display-guide":{"accessibility-summary":{"no-metadata":"Information saknas","publisher-contact":"För mer information om den här publikationens tillgänglighet, kontakta utgivaren: ",title:"Kompletterande information om tillgänglighet"},"additional-accessibility-information":{aria:{compact:"Innehåller ARIA-roller",descriptive:"Innehållet har försetts med ARIA-roller för att tydliggöra strukturen och underlätta navigering"},"audio-descriptions":"Syntolkning",braille:"Punktskrift","color-not-sole-means-of-conveying-information":"Betydelse uttrycks aldrig enbart med färg","dyslexia-readability":"Förbättrad läsbarhet för personer med dyslexi","full-ruby-annotations":"Fullständig ruby-annotering","high-contrast-between-foreground-and-background-audio":"Hög kontrast mellan förgrundsljud och bakgrundsljud","high-contrast-between-text-and-background":"Hög kontrast mellan text och bakgrund","large-print":"Storstil","page-breaks":{compact:"Innehåller sidnummer",descriptive:"Innehåller sidnummer från tryckt förlaga"},"ruby-annotations":"Viss ruby-annotering","sign-language":"Teckenspråk","tactile-graphics":{compact:"Innehåller taktila bilder",descriptive:"Taktila bilder har lagts till för att tillgängliggöra visuella element för personer med synnedsättning"},"tactile-objects":"Taktila 3D-objekt","text-to-speech-hinting":"Innehåller uttalsinstruktioner för talsyntes",title:"Ytterligare tillgänglighetsinformation","ultra-high-contrast-between-text-and-background":"Extra hög kontrast mellan text och bakgrund","visible-page-numbering":"Synlig sidnumrering","without-background-sounds":"Utan bakgrundsljud"},conformance:{a:{compact:"Publikationen uppfyller tillgänglighetskrav på en grundläggande nivå",descriptive:"Publikationen anger att den uppfyller standarderna EPUB Accessibility och WCAG 2 nivå A"},aa:{compact:"Publikationen uppfyller tillgänglighetskrav på en vedertagen nivå",descriptive:"Publikationen anger att den uppfyller standarderna EPUB Accessibility och WCAG 2 nivå AA"},aaa:{compact:"Publikationen uppfyller tillgänglighetskrav utöver en vedertagen nivå",descriptive:"Publikationen anger att den uppfyller standarderna EPUB Accessibility och WCAG 2 nivå AAA"},certifier:"Publikationen är certifierad av ","certifier-credentials":"Certifierarens märkning är ",details:{"certification-info":"Publikationen certifierades ","certifier-report":"Se certifieringsrapporten för mer information",claim:"Publikationen anger att den uppfyller kraven enligt","epub-accessibility-1-0":"EPUB Accessibility 1.0","epub-accessibility-1-1":"EPUB Accessibility 1.1","level-a":"nivå A","level-aa":"nivå AA","level-aaa":"nivå 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":"Detaljerad information om tillgänglighetskrav",no:"Information saknas",title:"Tillgänglighetskrav","unknown-standard":"Det går inte att avgöra om publikationen uppfyller vedertagna tillgänglighetskrav"},hazards:{flashing:{compact:"Blinkande innehåll",descriptive:"Publikationen har blinkande innehåll som kan vara skadligt för ljuskänsliga personer"},"flashing-none":{compact:"Inget blinkande innehåll",descriptive:"Publikationen har inget blinkande innehåll"},"flashing-unknown":{compact:"Förekomst av blinkande innehåll är okänd",descriptive:"Förekomst av blinkande innehåll är okänd"},motion:{compact:"Rörelsesimulering",descriptive:"Publikationen innehåller rörelsesimulering som skulle kunna orsaka illamående"},"motion-none":{compact:"Ingen rörelsesimulering",descriptive:"Publikationen innehåller ingen rörelsesimulering"},"motion-unknown":{compact:"Förekomst av rörelsesimulering är okänd",descriptive:"Förekomst av rörelsesimulering är okänd"},"no-metadata":"Information saknas",none:{compact:"Inga risker",descriptive:"Publikationen innehåller inga risker"},sound:{compact:"Ljud",descriptive:"Publikationen innehåller ljud som kan orsaka obehag"},"sound-none":{compact:"Inget ljud som kan orsaka obehag",descriptive:"Publikationen innehåller inget ljud som kan orsaka obehag"},"sound-unknown":{compact:"Förekomst av ljud som kan orsaka obehag är okänd",descriptive:"Förekomst av ljud som kan orsaka obehag är okänd"},title:"Risker",unknown:"Förekomst av risker är okänd"},"legal-considerations":{exempt:{compact:"Åberopar ett undantag från vissa lagstadgade tillgänglighetskrav",descriptive:"Publikationen åberopar ett undantag från vissa lagstadgade tillgänglighetskrav"},"no-metadata":"Information saknas",title:"Juridiska aspekter"},navigation:{index:{compact:"Register",descriptive:"Register med länkar till innehållet"},"no-metadata":"Information saknas","page-navigation":{compact:"Gå till sida",descriptive:"Sidindelning för navigering enligt sidnummer i tryckt förlaga"},structural:{compact:"Rubriker",descriptive:"Navigerbara element såsom rubriker eller tabeller"},title:"Navigering",toc:{compact:"Innehållsförteckning",descriptive:"Innehållsförteckning med länkar till alla kapitel"}},"rich-content":{"accessible-chemistry-as-latex":{compact:"Kemiska formler i LaTeX",descriptive:"Kemiska formler i tillgängligt format (LaTeX)"},"accessible-chemistry-as-mathml":{compact:"Kemiska formler i MathML",descriptive:"Kemiska formler i tillgängligt format (MathML)"},"accessible-math-as-latex":{compact:"Matematik som LaTeX",descriptive:"Matematiska formler i tillgängligt format (LaTeX)"},"accessible-math-described":"Innehåller textbeskrivningar av matematik","closed-captions":{compact:"Videoklipp har undertext som kan sättas på/stängas av",descriptive:"Videoklipp som ingår i publikationen har undertext som kan sättas på och stängas av (stängda undertexter)"},"extended-descriptions":"Informationsrika bilder har utökade bildbeskrivningar","math-as-mathml":{compact:"Matematik som MathML",descriptive:"Matematiska formler i tillgängligt format (MathML)"},"open-captions":{compact:"Videoklipp har undertext som inte kan stängas av",descriptive:"Videoklipp som ingår i publikationen har undertext som inte kan stängas av (öppna undertexter)"},title:"Berikat innehåll",transcript:"Innehåller transkriptioner",unknown:"Information saknas"},"ways-of-reading":{"nonvisual-reading":{"alt-text":{compact:"Har textalternativ (alt-texter)",descriptive:"Har textalternativ (alt-texter) till bilder"},"no-metadata":"Information om icke-visuell läsbarhet saknas",none:{compact:"Kan inte läsas med uppläsningsfunktion eller punktskriftsskärm",descriptive:"Innehållet går inte att läsa med uppläsningsfunktion eller punktskriftsskärm"},"not-fully":{compact:"Inte läsbart i sin helhet med uppläsningsfunktion eller punktskriftsskärm",descriptive:"Allt innehåll går inte att läsa med uppläsningsfunktion eller punktskriftsskärm"},readable:{compact:"Kan läsas med uppläsningsfunktion eller punktskriftsskärm",descriptive:"Hela innehållet går att läsa med uppläsningsfunktion eller punktskriftsskärm"}},"prerecorded-audio":{complementary:{compact:"Förinspelade ljudklipp",descriptive:"Innehåller förinspelade ljudklipp"},"no-metadata":"Information om förinspelat ljud saknas",only:{compact:"Endast förinspelat ljud",descriptive:"Bok med ljud utan textalternativ"},synchronized:{compact:"Förinspelat ljud synkroniserat med texten",descriptive:"Hela innehållet finns tillgängligt som förinspelat ljud synkroniserat med texten"}},title:"Olika sätt att läsa","visual-adjustments":{modifiable:{compact:"Utseendet kan justeras",descriptive:"Det går att justera text och layout i den utsträckning som läsprogrammet tillåter, till exempel typsnitt, storlek på text, avstånd mellan rader och stycken samt färg på text och bakgrund"},unknown:"Information om möjlighet att justera utseende saknas",unmodifiable:{compact:"Utseendet kan inte justeras",descriptive:"Text- och sidlayout kan inte justeras eftersom presentationen liknar en tryckt version, men läsprogram kan ha funktioner för att zooma in"}}}}},altIdentifier_one:"alternativ identifierare",altIdentifier_other:"alternativa identifierare",artist_one:"konstnär",artist_other:"konstnärer",author_one:"författare",author_other:"författare",collection_one:"samling",collection_other:"samlingar",colorist_one:"kolorist",colorist_other:"kolorister",contributor_one:"medverkande",contributor_other:"medverkande",description:"beskrivning",duration:"speltid",editor_one:"redaktör",editor_other:"redaktörer",identifier_one:"identifierare",identifier_other:"identifierare",illustrator_one:"illustratör",illustrator_other:"illustratörer",imprint_one:"imprint",imprint_other:"imprint",inker_one:"tuschare",inker_other:"tuschare",language_one:"språk",language_other:"språk",letterer_one:"textare",letterer_other:"textare",modified:"ändringsdatum",narrator_one:"berättarröst",narrator_other:"berättarröster",numberOfPages:"sidantal",penciler_one:"tecknare",penciler_other:"tecknare",published:"publikationsdatum",publisher_one:"förlag",publisher_other:"förlag",series_one:"serie",series_other:"serier",subject_one:"ämne",subject_other:"ämnen",subtitle:"undertitel",title:"titel",translator_one:"översättare",translator_other:"översättare"}},Ao=Object.freeze(Object.defineProperty({__proto__:null,default:{publication:Xn},publication:Xn},Symbol.toStringTag,{value:"Module"}));y.AudioDefaults=Wn,y.AudioNavigator=Eo,y.AudioPreferences=Be,y.AudioPreferencesEditor=ni,y.AudioSettings=ii,y.BooleanPreference=O,y.EnumPreference=jt,y.EpubDefaults=Nn,y.EpubNavigator=ei,y.EpubPreferences=Pe,y.EpubPreferencesEditor=Jt,y.EpubSettings=Zt,y.ExperimentalWebPubNavigator=no,y.FXLCoordinator=Ln,y.FXLFrameManager=kn,y.FXLFramePoolManager=In,y.FXLPeripherals=On,y.FXLSpreader=Tn,y.FrameComms=ve,y.FrameManager=wn,y.FramePoolManager=En,y.HorizontalThird=Cn,y.Injector=Xt,y.LineLengths=Se,y.MediaNavigator=Ji,y.Navigator=Ut,y.Orientation=ht,y.Preference=T,y.Properties=We,y.RSProperties=Fn,y.RangePreference=C,y.ReadiumCSS=Un,y.Spread=dt,y.TextAlignment=K,y.UserProperties=Qt,y.VerticalThird=xn,y.VisualNavigator=Dt,y.WebAudioEngine=Dn,y.WebPubBlobBuilder=Zi,y.WebPubCSS=ln,y.WebPubDefaults=dn,y.WebPubFrameManager=rn,y.WebPubFramePoolManager=on,y.WebPubNavigator=vn,y.WebPubPreferences=we,y.WebPubPreferencesEditor=Gt,y.WebPubSettings=Vt,y.WebRSProperties=an,y.WebUserProperties=Ht,y.ensureBoolean=E,y.ensureEnumValue=He,y.ensureExperiment=Bt,y.ensureFilter=ce,y.ensureLessThanOrEqual=cn,y.ensureMoreThanOrEqual=hn,y.ensureNonNegative=w,y.ensureString=F,y.ensureValueInRange=M,y.experiments=st,y.filterRangeConfig=ae,y.fontSizeRangeConfig=Ae,y.fontWeightRangeConfig=Z,y.fontWidthRangeConfig=Oe,y.letterSpacingRangeConfig=Te,y.lineHeightRangeConfig=ze,y.lineLengthRangeConfig=le,y.paragraphIndentRangeConfig=Me,y.paragraphSpacingRangeConfig=Ie,y.playbackRateRangeConfig=De,y.sML=q,y.sMLWithRequest=A,y.skipIntervalRangeConfig=Q,y.volumeRangeConfig=Ue,y.withFallback=at,y.wordSpacingRangeConfig=Ne,y.zoomRangeConfig=Fe,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"})}));
1786
+ `;class ti{constructor(e){this.mediaElement=null,this.source=null,this.workletNode=null,this.url=null,this.ctx=e}static async createWorklet(e){const{ctx:t,mediaElement:i,pitchFactor:n,modulePath:r}=e,s=new ti(t);try{if(r)await t.audioWorklet.addModule(r);else{const a=new Blob([bo],{type:"text/javascript"});s.url=URL.createObjectURL(a),await t.audioWorklet.addModule(s.url)}}catch(a){throw s.destroy(),new Error(`Error adding module: ${a}`)}try{if(s.workletNode=new AudioWorkletNode(t,"preserve-pitch-processor"),n&&s.updatePitchFactor(n),i){const a=t.createMediaElementSource(i);a.connect(s.workletNode),s.mediaElement=i,s.source=a}}catch(a){throw s.destroy(),new Error(`Error creating worklet node: ${a}`)}return s}updatePitchFactor(e){this.workletNode&&this.workletNode.port.postMessage({type:"setPitchFactor",factor:e})}destroy(){this.workletNode&&(this.workletNode.disconnect(),this.workletNode=null),this.source&&(this.source.disconnect(),this.source=null),this.url&&(URL.revokeObjectURL(this.url),this.url=null)}}class Dn{constructor(e){this.audioContext=null,this.sourceNode=null,this.gainNode=null,this.listeners={},this.currentVolume=1,this.currentPlaybackRate=1,this.isMutedValue=!1,this.isPlayingValue=!1,this.isPausedValue=!1,this.isLoadingValue=!1,this.isLoadedValue=!1,this.isEndedValue=!1,this.isStoppedValue=!1,this.worklet=null,this.webAudioActive=!1,this.boundOnCanPlayThrough=this.onCanPlayThrough.bind(this),this.boundOnTimeUpdate=this.onTimeUpdate.bind(this),this.boundOnError=this.onError.bind(this),this.boundOnEnded=this.onEnded.bind(this),this.boundOnStalled=this.onStalled.bind(this),this.boundOnEmptied=this.onEmptied.bind(this),this.boundOnSuspend=this.onSuspend.bind(this),this.boundOnWaiting=this.onWaiting.bind(this),this.boundOnLoadedMetadata=this.onLoadedMetadata.bind(this),this.boundOnSeeking=this.onSeeking.bind(this),this.boundOnSeeked=this.onSeeked.bind(this),this.boundOnPlay=this.onPlay.bind(this),this.boundOnPlaying=this.onPlaying.bind(this),this.boundOnPause=this.onPause.bind(this),this.boundOnProgress=this.onProgress.bind(this),this.playback=e.playback,this.mediaElement=document.createElement("audio"),this.mediaElement.addEventListener("canplaythrough",this.boundOnCanPlayThrough),this.mediaElement.addEventListener("timeupdate",this.boundOnTimeUpdate),this.mediaElement.addEventListener("error",this.boundOnError),this.mediaElement.addEventListener("ended",this.boundOnEnded),this.mediaElement.addEventListener("stalled",this.boundOnStalled),this.mediaElement.addEventListener("emptied",this.boundOnEmptied),this.mediaElement.addEventListener("suspend",this.boundOnSuspend),this.mediaElement.addEventListener("waiting",this.boundOnWaiting),this.mediaElement.addEventListener("loadedmetadata",this.boundOnLoadedMetadata),this.mediaElement.addEventListener("seeking",this.boundOnSeeking),this.mediaElement.addEventListener("seeked",this.boundOnSeeked),this.mediaElement.addEventListener("play",this.boundOnPlay),this.mediaElement.addEventListener("playing",this.boundOnPlaying),this.mediaElement.addEventListener("pause",this.boundOnPause),this.mediaElement.addEventListener("progress",this.boundOnProgress),this.mediaElement.currentTime=this.playback.state.currentTime}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}off(e,t){this.listeners[e]&&(this.listeners[e]=this.listeners[e].filter(i=>i!==t))}loadAudio(e){if(this.isLoadingValue=!0,this.isLoadedValue=!1,this.isPlayingValue=!1,this.isPausedValue=!1,this.webAudioActive){this.mediaElement.crossOrigin="anonymous",this.mediaElement.src=e,this.mediaElement.load(),this.mediaElement.playbackRate=this.currentPlaybackRate;const t=()=>{this.mediaElement.removeEventListener("error",i),this.mediaElement.removeEventListener("canplaythrough",n)},i=()=>{t(),this.deactivateWebAudio(),this.mediaElement.removeAttribute("crossOrigin"),this.mediaElement.src=e,this.mediaElement.load(),this.mediaElement.playbackRate=this.currentPlaybackRate},n=()=>t();this.mediaElement.addEventListener("error",i),this.mediaElement.addEventListener("canplaythrough",n)}else this.mediaElement.src=e,this.mediaElement.load(),this.mediaElement.playbackRate=this.currentPlaybackRate}deactivateWebAudio(){this.worklet&&(this.worklet.destroy(),this.worklet=null),this.sourceNode&&(this.sourceNode.disconnect(),this.sourceNode=null),this.gainNode&&(this.gainNode.disconnect(),this.gainNode=null),this.webAudioActive=!1}setMediaElement(e){this.mediaElement.pause(),this.isPlayingValue=!1,this.isPausedValue=!1,this.sourceNode&&(this.sourceNode.disconnect(),this.sourceNode=null),this.mediaElement.removeEventListener("canplaythrough",this.boundOnCanPlayThrough),this.mediaElement.removeEventListener("timeupdate",this.boundOnTimeUpdate),this.mediaElement.removeEventListener("error",this.boundOnError),this.mediaElement.removeEventListener("ended",this.boundOnEnded),this.mediaElement.removeEventListener("stalled",this.boundOnStalled),this.mediaElement.removeEventListener("emptied",this.boundOnEmptied),this.mediaElement.removeEventListener("suspend",this.boundOnSuspend),this.mediaElement.removeEventListener("waiting",this.boundOnWaiting),this.mediaElement.removeEventListener("loadedmetadata",this.boundOnLoadedMetadata),this.mediaElement.removeEventListener("seeking",this.boundOnSeeking),this.mediaElement.removeEventListener("seeked",this.boundOnSeeked),this.mediaElement.removeEventListener("play",this.boundOnPlay),this.mediaElement.removeEventListener("playing",this.boundOnPlaying),this.mediaElement.removeEventListener("pause",this.boundOnPause),this.mediaElement.removeEventListener("progress",this.boundOnProgress),this.mediaElement=e,this.mediaElement.addEventListener("canplaythrough",this.boundOnCanPlayThrough),this.mediaElement.addEventListener("timeupdate",this.boundOnTimeUpdate),this.mediaElement.addEventListener("error",this.boundOnError),this.mediaElement.addEventListener("ended",this.boundOnEnded),this.mediaElement.addEventListener("stalled",this.boundOnStalled),this.mediaElement.addEventListener("emptied",this.boundOnEmptied),this.mediaElement.addEventListener("suspend",this.boundOnSuspend),this.mediaElement.addEventListener("waiting",this.boundOnWaiting),this.mediaElement.addEventListener("loadedmetadata",this.boundOnLoadedMetadata),this.mediaElement.addEventListener("seeking",this.boundOnSeeking),this.mediaElement.addEventListener("seeked",this.boundOnSeeked),this.mediaElement.addEventListener("play",this.boundOnPlay),this.mediaElement.addEventListener("playing",this.boundOnPlaying),this.mediaElement.addEventListener("pause",this.boundOnPause),this.mediaElement.addEventListener("progress",this.boundOnProgress),this.mediaElement.volume=this.isMutedValue?0:this.currentVolume,this.mediaElement.playbackRate=this.currentPlaybackRate,this.mediaElement.readyState>=1&&this.onLoadedMetadata(new Event("loadedmetadata")),this.mediaElement.seekable.length>0&&this.onProgress(),this.mediaElement.readyState>=4?this.onCanPlayThrough():(this.isLoadingValue=!0,this.isLoadedValue=!1)}async ensureAudioContextRunning(){this.audioContext||(this.audioContext=new AudioContext),this.audioContext.state==="suspended"&&await this.audioContext.resume()}getOrCreateAudioContext(){return this.audioContext||(this.audioContext=new AudioContext),this.audioContext}onTimeUpdate(){this.emit("timeupdate",this.mediaElement.currentTime)}onCanPlayThrough(){this.isLoadingValue=!1,this.isLoadedValue=!0,this.emit("canplaythrough",null)}onError(){console.error("Error loading media element"),this.emit("error",this.mediaElement.error)}onEnded(){this.isPlayingValue=!1,this.isPausedValue=!1,this.isEndedValue=!0,this.emit("ended",null)}onStalled(e){this.emit("stalled",e)}onEmptied(e){this.emit("emptied",e)}onSuspend(e){this.emit("suspend",e)}onWaiting(e){this.emit("waiting",e)}onLoadedMetadata(e){this.emit("loadedmetadata",e)}onSeeking(e){this.emit("seeking",e)}onSeeked(e){this.emit("seeked",e)}onPlay(){this.emit("play",null)}onPlaying(){this.emit("playing",null)}onPause(){this.emit("pause",null)}onProgress(){this.emit("progress",this.mediaElement.seekable)}emit(e,t){this.listeners[e]&&this.listeners[e].forEach(i=>i(t))}async play(){if(!this.isPlayingValue)try{await this.mediaElement.play(),this.isPlayingValue=!0,this.isPausedValue=!1,this.isStoppedValue=!1}catch(e){if(e?.name==="AbortError")return;console.error("error trying to play media element",e),this.emit("error",e)}}pause(){this.mediaElement.pause(),this.isPlayingValue=!1,this.isPausedValue=!0}stop(){this.mediaElement.pause(),this.mediaElement.currentTime=0,this.isPlayingValue=!1,this.isPausedValue=!1,this.isStoppedValue=!0}setVolume(e){if(e<0){this.currentVolume=0,this.mediaElement.volume=0,this.gainNode&&(this.gainNode.gain.value=0),this.isMutedValue=!0;return}if(e>1){this.setVolume(e/100);return}this.currentVolume=e,this.mediaElement.volume=e,this.gainNode&&(this.gainNode.gain.value=e)}skip(e){const t=this.mediaElement.duration;if(!isFinite(t))return;const i=this.mediaElement.currentTime+e;i<0?this.mediaElement.currentTime=0:i>t?this.mediaElement.currentTime=t:this.mediaElement.currentTime=i}currentTime(){return this.mediaElement.currentTime}duration(){return this.mediaElement.duration}isPlaying(){return this.isPlayingValue}isPaused(){return this.isPausedValue}isStopped(){return this.isStoppedValue}isLoading(){return this.isLoadingValue}isLoaded(){return this.isLoadedValue}isEnded(){return this.isEndedValue}isMuted(){return this.isMutedValue}setPlaybackRate(e,t){this.currentPlaybackRate=e,this.mediaElement.playbackRate=e,t?"preservesPitch"in this.mediaElement?this.mediaElement.preservesPitch=!0:this.activateWebAudio().then(()=>{this.worklet?this.worklet.updatePitchFactor(1/e):(this.sourceNode&&(this.sourceNode.disconnect(),this.sourceNode=null),ti.createWorklet({ctx:this.getOrCreateAudioContext(),mediaElement:this.mediaElement,pitchFactor:1}).then(i=>{this.worklet=i,this.worklet.workletNode.connect(this.gainNode),this.worklet.updatePitchFactor(1/e)}).catch(i=>{console.warn("Failed to create preserve pitch worklet",i)}))}).catch(i=>{console.warn("Web Audio unavailable, playing without pitch correction:",i)}):this.worklet&&(this.worklet.destroy(),this.worklet=null,this.webAudioActive&&(this.sourceNode=new MediaElementAudioSourceNode(this.getOrCreateAudioContext(),{mediaElement:this.mediaElement}),this.sourceNode.connect(this.gainNode)))}async activateWebAudio(){if(this.webAudioActive)return;const e=this.mediaElement.src;if(!e)return;const t=this.mediaElement.currentTime,i=this.isPlayingValue;i&&(this.mediaElement.pause(),this.isPlayingValue=!1),this.mediaElement.crossOrigin="anonymous",this.mediaElement.src=e,this.mediaElement.load(),await new Promise((r,s)=>{const a=()=>{this.mediaElement.removeEventListener("canplaythrough",a),this.mediaElement.removeEventListener("error",l),r()},l=()=>{this.mediaElement.removeEventListener("canplaythrough",a),this.mediaElement.removeEventListener("error",l),s(new Error("Audio reload with CORS failed — server may not send Access-Control-Allow-Origin"))};this.mediaElement.addEventListener("canplaythrough",a),this.mediaElement.addEventListener("error",l)}),this.mediaElement.currentTime=t,this.sourceNode=new MediaElementAudioSourceNode(this.getOrCreateAudioContext(),{mediaElement:this.mediaElement});const n=this.getOrCreateAudioContext();this.gainNode=n.createGain(),this.sourceNode.connect(this.gainNode),this.gainNode.connect(n.destination),this.webAudioActive=!0,i&&(await this.ensureAudioContextRunning(),await this.mediaElement.play(),this.isPlayingValue=!0,this.isPausedValue=!1)}get isWebAudioActive(){return this.webAudioActive}getMediaElement(){return this.mediaElement}}class Be{constructor(e={}){this.volume=M(e.volume,Ue.range),this.playbackRate=M(e.playbackRate,De.range),this.preservePitch=E(e.preservePitch),this.skipBackwardInterval=M(e.skipBackwardInterval,Q.range),this.skipForwardInterval=M(e.skipForwardInterval,Q.range),this.pollInterval=w(e.pollInterval),this.autoPlay=E(e.autoPlay),this.enableMediaSession=E(e.enableMediaSession)}merging(e){const t={...this};for(const i of Object.keys(e))e[i]!==void 0&&(t[i]=e[i]);return new Be(t)}}class Wn{constructor(e={}){this.volume=M(e.volume,Ue.range)??1,this.playbackRate=M(e.playbackRate,De.range)??1,this.preservePitch=E(e.preservePitch)??!0,this.skipBackwardInterval=M(e.skipBackwardInterval,Q.range)??10,this.skipForwardInterval=M(e.skipForwardInterval,Q.range)??10,this.pollInterval=w(e.pollInterval)??1e3,this.autoPlay=E(e.autoPlay)??!0,this.enableMediaSession=E(e.enableMediaSession)??!0}}class ii{constructor(e,t){this.volume=e.volume??t.volume,this.playbackRate=e.playbackRate??t.playbackRate,this.preservePitch=e.preservePitch??t.preservePitch,this.skipBackwardInterval=e.skipBackwardInterval??t.skipBackwardInterval,this.skipForwardInterval=e.skipForwardInterval??t.skipForwardInterval,this.pollInterval=e.pollInterval??t.pollInterval,this.autoPlay=e.autoPlay??t.autoPlay,this.enableMediaSession=e.enableMediaSession??t.enableMediaSession}}class ni{constructor(e,t){this.preferences=e,this.settings=t}clear(){this.preferences=new Be}updatePreference(e,t){this.preferences[e]=t}get volume(){return new C({initialValue:this.preferences.volume,effectiveValue:this.settings.volume,isEffective:this.preferences.volume!==null,onChange:e=>{this.updatePreference("volume",e??1)},supportedRange:Ue.range,step:Ue.step})}get playbackRate(){return new C({initialValue:this.preferences.playbackRate,effectiveValue:this.settings.playbackRate,isEffective:this.preferences.playbackRate!==null,onChange:e=>{this.updatePreference("playbackRate",e??1)},supportedRange:De.range,step:De.step})}get preservePitch(){return new O({initialValue:this.preferences.preservePitch,effectiveValue:this.settings.preservePitch,isEffective:this.preferences.preservePitch!==null,onChange:e=>{this.updatePreference("preservePitch",e??!0)}})}get skipBackwardInterval(){return new C({initialValue:this.preferences.skipBackwardInterval,effectiveValue:this.settings.skipBackwardInterval,isEffective:this.preferences.skipBackwardInterval!==null,onChange:e=>{this.updatePreference("skipBackwardInterval",e??10)},supportedRange:Q.range,step:Q.step})}get skipForwardInterval(){return new C({initialValue:this.preferences.skipForwardInterval,effectiveValue:this.settings.skipForwardInterval,isEffective:this.preferences.skipForwardInterval!==null,onChange:e=>{this.updatePreference("skipForwardInterval",e??10)},supportedRange:Q.range,step:Q.step})}get pollInterval(){return new T({initialValue:this.preferences.pollInterval,effectiveValue:this.settings.pollInterval,isEffective:this.preferences.pollInterval!==null,onChange:e=>{this.updatePreference("pollInterval",e??1e3)}})}get autoPlay(){return new O({initialValue:this.preferences.autoPlay,effectiveValue:this.settings.autoPlay,isEffective:this.preferences.autoPlay!==null,onChange:e=>{this.updatePreference("autoPlay",e??!0)}})}get enableMediaSession(){return new O({initialValue:this.preferences.enableMediaSession,effectiveValue:this.settings.enableMediaSession,isEffective:this.preferences.enableMediaSession!==null,onChange:e=>{this.updatePreference("enableMediaSession",e??!0)}})}}class vo{constructor(e,t){this.preloadedElements=new Map,this._audioEngine=e,this._publication=t,this._supportedAudioTypes=this.detectSupportedAudioTypes()}detectSupportedAudioTypes(){const e=document.createElement("audio"),t=new Set;for(const n of this._publication.readingOrder.items){n.type&&t.add(n.type);for(const r of n.alternates?.items??[])r.type&&t.add(r.type)}const i=new Map;for(const n of t){const r=e.canPlayType(n);r!==""&&i.set(n,r)}return i}pickPlayableHref(e){const t=[e,...e.alternates?.items??[]];let i;for(const n of t){if(!n.type)continue;const r=this._supportedAudioTypes.get(n.type);if(r){if(r==="probably")return n.href;i||(i={href:n.href,confidence:r})}}return i?.href??e.href}get audioEngine(){return this._audioEngine}setCurrentAudio(e,t){const i=this.pickPlayableHref(this._publication.readingOrder.items[e]),n=this.audioEngine.isWebAudioActive?void 0:this.get(i);n?(this.audioEngine.setMediaElement(n),this.clear(i)):(this.clear(i),this.audioEngine.loadAudio(i)),this.preloadAdjacent(e,t)}preload(e){if(this.preloadedElements.has(e))return;const t=document.createElement("audio");t.preload="auto",t.src=e,t.load(),this.preloadedElements.set(e,t)}get(e){return this.preloadedElements.get(e)}clear(e){this.preloadedElements.delete(e)}preloadNext(e){const t=e+1;if(t<this._publication.readingOrder.items.length){const i=this._publication.readingOrder.items[t];this.preload(this.pickPlayableHref(i))}}preloadPrevious(e){const t=e-1;if(t>=0){const i=this._publication.readingOrder.items[t];this.preload(this.pickPlayableHref(i))}}preloadAdjacent(e,t="forward"){t==="forward"?(this.preloadNext(e),this.preloadPrevious(e)):(this.preloadPrevious(e),this.preloadNext(e))}destroy(){this.audioEngine.stop(),this.preloadedElements.clear()}}class So{constructor(e={}){this.dragstartHandler=t=>{t.preventDefault(),t.stopPropagation(),e.onDragDetected?.(Array.from(t.dataTransfer?.types??[]))},this.dropHandler=t=>{t.preventDefault(),t.stopPropagation();const i=Array.from(t.dataTransfer?.types??[]),n=t.dataTransfer?.files.length??0;e.onDropDetected?.(i,n)},document.addEventListener("dragstart",this.dragstartHandler,!0),document.addEventListener("drop",this.dropHandler,!0),window.addEventListener("unload",()=>this.destroy())}destroy(){document.removeEventListener("dragstart",this.dragstartHandler,!0),document.removeEventListener("drop",this.dropHandler,!0)}}class wo{constructor(e={}){this.copyHandler=t=>{t.preventDefault(),t.stopPropagation(),e.onCopyBlocked?.()},document.addEventListener("copy",this.copyHandler,!0),window.addEventListener("unload",()=>this.destroy())}destroy(){document.removeEventListener("copy",this.copyHandler,!0)}}class _o extends qt{constructor(e={}){super(e),e.disableDragAndDrop&&(this.dragAndDropProtector=new So({onDragDetected:t=>{this.dispatchSuspiciousActivity("drag_detected",{dataTransferTypes:t,targetFrameSrc:""})},onDropDetected:(t,i)=>{this.dispatchSuspiciousActivity("drop_detected",{dataTransferTypes:t,fileCount:i,targetFrameSrc:""})}})),e.protectCopy&&(this.copyProtector=new wo({onCopyBlocked:()=>{this.dispatchSuspiciousActivity("bulk_copy",{targetFrameSrc:""})}}))}destroy(){super.destroy(),this.dragAndDropProtector?.destroy(),this.copyProtector?.destroy()}}const Po=o=>({trackLoaded:o.trackLoaded??(()=>{}),positionChanged:o.positionChanged??(()=>{}),error:o.error??(()=>{}),trackEnded:o.trackEnded??(()=>{}),play:o.play??(()=>{}),pause:o.pause??(()=>{}),metadataLoaded:o.metadataLoaded??(()=>{}),stalled:o.stalled??(()=>{}),seeking:o.seeking??(()=>{}),seekable:o.seekable??(()=>{}),contentProtection:o.contentProtection??(()=>{}),peripheral:o.peripheral??(()=>{}),contextMenu:o.contextMenu??(()=>{})});class Eo extends Ji{constructor(e,t,i,n={preferences:{},defaults:{}}){if(super(),this.positionPollInterval=null,this.navigationId=0,this._preferencesEditor=null,this._mediaSessionEnabled=!1,this._navigatorProtector=null,this._keyboardPeripheralsManager=null,this._suspiciousActivityListener=null,this._keyboardPeripheralListener=null,this.pub=e,this.listeners=Po(t),this._preferences=new Be(n.preferences),this._defaults=new Wn(n.defaults),this._settings=new ii(this._preferences,this._defaults),i)this.currentLocation=this.ensureLocatorLocations(i);else{const u=this.pub.readingOrder.items[0];this.currentLocation=new N({href:u.href,type:u.type||"audio/mpeg",title:u.title,locations:new k({position:0,progression:0,totalProgression:0,fragments:["t=0"]})})}const r=this.currentLocation.href.split("#")[0],s=this.hrefToTrackIndex(r),a=this.currentLocation.locations?.time()||0,l=new Dn({playback:{state:{currentTime:a,duration:0},playWhenReady:!1,index:s}});this.pool=new vo(l,e);const c=n.contentProtection||{},h=this.mergeKeyboardPeripherals(c,n.keyboardPeripherals||[]);(c.disableContextMenu||c.checkAutomation||c.checkIFrameEmbedding||c.monitorDevTools||c.protectPrinting?.disable||c.disableDragAndDrop||c.protectCopy)&&(this._navigatorProtector=new _o(c),this._suspiciousActivityListener=u=>{const{type:m,...b}=u.detail;m==="context_menu"?this.listeners.contextMenu(b):this.listeners.contentProtection(m,b)},window.addEventListener(he,this._suspiciousActivityListener)),h.length>0&&(this._keyboardPeripheralsManager=new Yt({keyboardPeripherals:h}),this._keyboardPeripheralListener=u=>{this.listeners.peripheral(u.detail)},window.addEventListener(de,this._keyboardPeripheralListener)),this.setupEventListeners(),this.applyPreferences(),this.pool.setCurrentAudio(s,"forward"),this.waitForLoadedAndSeeked(a).then(()=>{this.listeners.trackLoaded(this.pool.audioEngine.getMediaElement()),this.listeners.positionChanged(this.currentLocator)}).catch(()=>{})}get settings(){return this._settings}get preferencesEditor(){return this._preferencesEditor===null&&(this._preferencesEditor=new ni(this._preferences,this.settings)),this._preferencesEditor}async submitPreferences(e){this._preferences=this._preferences.merging(e),this.applyPreferences()}applyPreferences(){this._settings=new ii(this._preferences,this._defaults),this._preferencesEditor!==null&&(this._preferencesEditor=new ni(this._preferences,this.settings)),this.pool.audioEngine.setVolume(this._settings.volume),this.pool.audioEngine.setPlaybackRate(this._settings.playbackRate,this._settings.preservePitch),this._settings.enableMediaSession&&!this._mediaSessionEnabled?(this._mediaSessionEnabled=!0,this.setupMediaSession()):!this._settings.enableMediaSession&&this._mediaSessionEnabled&&(this._mediaSessionEnabled=!1,this.destroyMediaSession())}get publication(){return this.pub}ensureLocatorLocations(e){return new N({...e,locations:e.locations instanceof k?e.locations:e.locations?new k(e.locations):void 0})}hrefToTrackIndex(e){const t=e.split("#")[0];return this.pub.readingOrder.items.findIndex(i=>i.href===t)}currentTrackIndex(){return this.hrefToTrackIndex(this.currentLocation.href)}get currentLocator(){return this.currentLocation}get isPlaying(){return this.pool.audioEngine.isPlaying()}get isPaused(){return this.pool.audioEngine.isPaused()}get duration(){return this.pool.audioEngine.duration()}get currentTime(){return this.pool.audioEngine.currentTime()}createLocator(e,t){const i=this.pub.readingOrder.items[e];if(!i)throw new Error(`Invalid track index: ${e}`);const n=this.pool.audioEngine.duration();return new N({href:i.href,type:i.type||"audio/mpeg",title:i.title,locations:new k({progression:n>0?t/n:0,position:e,fragments:[`t=${t}`]})})}waitForLoadedAndSeeked(e,t){return new Promise((i,n)=>{const r=()=>{if(t!==void 0&&t!==this.navigationId){i();return}if(e<=0){i();return}const l=()=>{this.pool.audioEngine.off("seeked",l),i()};this.pool.audioEngine.on("seeked",l),this.seek(e)};if(this.pool.audioEngine.isLoaded()){r();return}const s=()=>{this.pool.audioEngine.off("canplaythrough",s),this.pool.audioEngine.off("error",a),r()},a=l=>{this.pool.audioEngine.off("canplaythrough",s),this.pool.audioEngine.off("error",a),n(l)};this.pool.audioEngine.on("canplaythrough",s),this.pool.audioEngine.on("error",a)})}setupEventListeners(){this.pool.audioEngine.on("error",e=>{this.listeners.error(e,this.currentLocator)}),this.pool.audioEngine.on("ended",async()=>{this.stopPositionPolling(),this.currentLocation=this.currentLocation.copyWithLocations(new k({position:this.currentTrackIndex(),progression:1,fragments:[`t=${this.duration}`]})),this.listeners.trackEnded(this.currentLocator),await this.nextTrack(),this._settings.autoPlay&&this.play()}),this.pool.audioEngine.on("play",()=>{this.startPositionPolling(),this.listeners.play(this.currentLocator)}),this.pool.audioEngine.on("playing",()=>{this.listeners.stalled(!1)}),this.pool.audioEngine.on("pause",()=>{this.stopPositionPolling(),this.listeners.pause(this.currentLocator)}),this.pool.audioEngine.on("seeked",()=>{if(this.listeners.seeking(!1),!this.isPlaying){const e=this.currentTime,t=this.duration,i=t>0?e/t:0;this.currentLocation=this.currentLocation.copyWithLocations(new k({position:this.currentTrackIndex(),progression:i,fragments:[`t=${e}`]})),this.listeners.positionChanged(this.currentLocation)}}),this.pool.audioEngine.on("seeking",()=>this.listeners.seeking(!0)),this.pool.audioEngine.on("waiting",()=>this.listeners.seeking(!0)),this.pool.audioEngine.on("stalled",()=>this.listeners.stalled(!0)),this.pool.audioEngine.on("progress",e=>this.listeners.seekable(e)),this.pool.audioEngine.on("loadedmetadata",()=>{this.listeners.metadataLoaded(this.pool.audioEngine.duration())})}setupMediaSession(){"mediaSession"in navigator&&(navigator.mediaSession.setActionHandler("play",()=>this.play()),navigator.mediaSession.setActionHandler("pause",()=>this.pause()),navigator.mediaSession.setActionHandler("previoustrack",()=>this.goBackward(!1,()=>{})),navigator.mediaSession.setActionHandler("nexttrack",()=>this.goForward(!1,()=>{})),navigator.mediaSession.setActionHandler("seekbackward",e=>this.jump(-(e.seekOffset||10))),navigator.mediaSession.setActionHandler("seekforward",e=>this.jump(e.seekOffset||10)),this.updateMediaSessionMetadata())}updateMediaSessionMetadata(){if(!("mediaSession"in navigator))return;const e=this.currentTrackIndex(),t=this.pub.readingOrder.items[e],i=this.pub.getCover();navigator.mediaSession.metadata=new MediaMetadata({title:t?.title||`Track ${e+1}`,artist:this.pub.metadata.authors?this.pub.metadata.authors.items.map(n=>n.name.getTranslation()).join(", "):void 0,album:this.pub.metadata.title.getTranslation(),artwork:i?[{src:i.href,type:i.type}]:void 0})}startPositionPolling(){this.stopPositionPolling(),this.positionPollInterval=setInterval(()=>{const e=this.currentTime,t=this.duration,i=t>0?e/t:0;this.currentLocation=this.currentLocation.copyWithLocations(new k({position:this.currentTrackIndex(),progression:i,fragments:[`t=${e}`]})),this.listeners.positionChanged(this.currentLocation)},this._settings.pollInterval)}stopPositionPolling(){this.positionPollInterval!==null&&(clearInterval(this.positionPollInterval),this.positionPollInterval=null)}async go(e,t,i){try{e=this.ensureLocatorLocations(e);const n=e.href.split("#")[0],r=this.hrefToTrackIndex(n),s=e.locations?.time()||0;if(r===-1){i(!1);return}const a=++this.navigationId,l=r>=this.currentTrackIndex()?"forward":"backward",c=this.isPlaying;if(this.stopPositionPolling(),this.pool.setCurrentAudio(r,l),this.currentLocation=e.copyWithLocations(e.locations),await this.waitForLoadedAndSeeked(s,a),a!==this.navigationId)return;this.listeners.trackLoaded(this.pool.audioEngine.getMediaElement()),this.listeners.positionChanged(this.currentLocator),this._settings.enableMediaSession&&this.updateMediaSessionMetadata(),c&&this.play(),i(!0)}catch(n){console.error("Failed to go to locator:",n),i(!1)}}async goLink(e,t,i){const n=this.hrefToTrackIndex(e.href);if(n===-1){i(!1);return}const r=e.locator.locations?.time()??0,s=this.createLocator(n,r);await this.go(s,t,i)}async goForward(e,t){if(!this.canGoForward){t(!1);return}await this.nextTrack(),t(!0)}async goBackward(e,t){if(!this.canGoBackward){t(!1);return}await this.previousTrack(),t(!0)}play(){this.pool.audioEngine.play()}pause(){this.pool.audioEngine.pause()}stop(){this.pool.audioEngine.stop()}async nextTrack(){if(!this.canGoForward)return;const e=this.createLocator(this.currentTrackIndex()+1,0);await this.go(e,!1,()=>{})}async previousTrack(){if(!this.canGoBackward)return;const e=this.createLocator(this.currentTrackIndex()-1,0);await this.go(e,!1,()=>{})}seek(e){this.pool.audioEngine.skip(e-this.pool.audioEngine.currentTime())}jump(e){this.pool.audioEngine.skip(e)}skipForward(){this.pool.audioEngine.skip(this._settings.skipForwardInterval)}skipBackward(){this.pool.audioEngine.skip(-this._settings.skipBackwardInterval)}get isTrackStart(){return this.currentTrackIndex()===0&&(this.currentLocation.locations?.time()||0)===0}get isTrackEnd(){const e=this.currentTrackIndex();if(e!==this.pub.readingOrder.items.length-1)return!1;const t=this.currentLocation.locations?.progression;if(t!==void 0)return t>=1;const i=this.pub.readingOrder.items[e],n=this.duration||i?.duration||0;return n>0&&(this.currentLocation.locations?.time()??0)>=n}get canGoBackward(){return this.currentTrackIndex()>0}get canGoForward(){return this.currentTrackIndex()<this.pub.readingOrder.items.length-1}destroyMediaSession(){"mediaSession"in navigator&&(navigator.mediaSession.metadata=null,navigator.mediaSession.setActionHandler("play",null),navigator.mediaSession.setActionHandler("pause",null),navigator.mediaSession.setActionHandler("previoustrack",null),navigator.mediaSession.setActionHandler("nexttrack",null),navigator.mediaSession.setActionHandler("seekbackward",null),navigator.mediaSession.setActionHandler("seekforward",null))}destroy(){this.stopPositionPolling(),this.destroyMediaSession(),this._suspiciousActivityListener&&window.removeEventListener(he,this._suspiciousActivityListener),this._keyboardPeripheralListener&&window.removeEventListener(de,this._keyboardPeripheralListener),this._navigatorProtector?.destroy(),this._keyboardPeripheralsManager?.destroy(),this.pool.destroy()}}const Hn=JSON.parse(`{"format":{"audiobook":"Livre audio","audiobookJSON":"Manifeste de livre audio","cbz":"Bande dessinée","divina":"Bande dessinée Divina","divinaJSON":"Manifeste de bande dessinée Divina","epub":"EPUB","lcpa":"Livre audio protégé par LCP","lcpdf":"PDF protégé par LCP","lcpl":"Licence LCP","pdf":"PDF","rwp":"Publication web Readium","rwpm":"Manifeste de publication web Readium","zab":"Livre audio","zip":"Archive ZIP"},"kind":{"audiobook_many":"livres audio","audiobook_one":"livre audio","audiobook_other":"livres audio","book_many":"livres","book_one":"livre","book_other":"livres","comic_many":"bandes dessinées","comic_one":"bande dessinée","comic_other":"bandes dessinées","document_many":"documents","document_one":"document","document_other":"documents"},"metadata":{"accessibility":{"display-guide":{"accessibility-summary":{"no-metadata":"Aucune information disponible","publisher-contact":"Pour plus d'information à propos de l'accessibilité de cette publication, veuillez contacter l'éditeur : ","title":"Informations d'accessibilité supplémentaires fournies par l'éditeur"},"additional-accessibility-information":{"aria":{"compact":"Information enrichie pour les technologies d'assistances","descriptive":"La structure est enrichi de rôles ARIA afin d'optimiser l'organisation et de faciliter la navigation via les technologies d'assistances"},"audio-descriptions":"Description audio","braille":"Braille","color-not-sole-means-of-conveying-information":"La couleur n'est pas la seule manière de communiquer de l'information","dyslexia-readability":"Lisibilité adapté aux publics dys","full-ruby-annotations":"Annotations complètes au format ruby (langues asiatiques)","high-contrast-between-foreground-and-background-audio":"Contraste sonore amélioré entre les différents plans","high-contrast-between-text-and-background":"Contraste élevé entre le texte et l'arrière-plan","large-print":"Grands caractères","page-breaks":{"compact":"Pagination identique à l'imprimé","descriptive":"Contient une pagination identique à la version imprimée"},"ruby-annotations":"Annotations partielles au format ruby (langues asiatiques)","sign-language":"Langue des signes","tactile-graphics":{"compact":"Graphiques tactiles","descriptive":"Des graphiques tactiles ont été intégrés pour faciliter l'accès des personnes aveugles aux éléments visuels"},"tactile-objects":"Objets 3D ou tactiles","text-to-speech-hinting":"Prononciation améliorée pour la synthèse vocale","title":"Informations complémentaires sur l'accessibilité","ultra-high-contrast-between-text-and-background":"Contraste très élevé entre le texte et l'arrière-plan","visible-page-numbering":"Numérotation de page visible","without-background-sounds":"Aucun bruit de fond"},"conformance":{"a":{"compact":"Cette publication répond aux règles minimales d'accessibilité","descriptive":"La publication indique qu'elle respecte les règles d'accessibilité EPUB et WCAG 2 niveau A"},"aa":{"compact":"Cette publication répond aux règles d'accessibilité reconnues","descriptive":"La publication indique qu'elle respecte les règles d'accessibilité EPUB et WCAG 2 niveau AA"},"aaa":{"compact":"Cette publication dépasse les règles d'accessibilité reconnues","descriptive":"La publication indique qu'elle respecte les règles d'accessibilité EPUB et WCAG 2 niveau AAA"},"certifier":"Accessibilité évaluée par ","certifier-credentials":"L'évaluateur est accrédité par ","details":{"certification-info":"Cette publication a été certifié le","certifier-report":"Pour plus d'information, veuillez consulter le rapport de certification","claim":"Cette publication indique respecter","epub-accessibility-1-0":"EPUB Accessibilité 1.0","epub-accessibility-1-1":"EPUB Accessibilité 1.1","level-a":"Niveau A","level-aa":"Niveau AA","level-aaa":"Niveau AAA","wcag-2-0":{"compact":"WCAG 2.0","descriptive":"Règles pour l’accessibilité des contenus Web (WCAG) 2.0"},"wcag-2-1":{"compact":"WCAG 2.1","descriptive":"Règles pour l’accessibilité des contenus Web (WCAG) 2.1"},"wcag-2-2":{"compact":"WCAG 2.2","descriptive":"Règles pour l’accessibilité des contenus Web (WCAG) 2.2"}},"details-title":"Information détaillée","no":"Aucune information disponible","title":"Règles d'accessibilité","unknown-standard":"Aucune indication concernant les normes d'accessibilité"},"hazards":{"flashing":{"compact":"Flashs lumineux","descriptive":"La publication contient des flashs lumineux qui peuvent provoquer des crises d’épilepsie"},"flashing-none":{"compact":"Pas de flashs lumineux","descriptive":"La publication ne contient pas de flashs lumineux susceptibles de provoquer des crises d’épilepsie"},"flashing-unknown":{"compact":"Pas d'information concernant la présence de flashs lumineux","descriptive":"La présence de flashs lumineux susceptibles de provoquer des crises d’épilepsie n'a pas pu être déterminée"},"motion":{"compact":"Sensations de mouvement","descriptive":"La publication contient des images en mouvement qui peuvent provoquer des nausées, des vertiges et des maux de tête"},"motion-none":{"compact":"Pas de sensations de mouvement","descriptive":"La publication ne contient pas d'images en mouvement qui pourraient provoquer des nausées, des vertiges et des maux de tête"},"motion-unknown":{"compact":"Pas d'information concernant la présence d'images en mouvement","descriptive":"La présence d'images en mouvement susceptibles de provoquer des nausées, des vertiges et des maux de tête n'a pas pu être déterminée"},"no-metadata":"Aucune information disponible","none":{"compact":"Aucun points d'attention","descriptive":"La publication ne présente aucun risque lié à la présence de flashs lumineux, de sensations de mouvement ou de sons"},"sound":{"compact":"Sons","descriptive":"La publication contient des sons qui peuvent causer des troubles de la sensibilité"},"sound-none":{"compact":"Pas de risques sonores","descriptive":"La publication ne contient pas de sons susceptibles de provoquer des troubles de la sensibilité"},"sound-unknown":{"compact":"Pas d'information concernant la présence de sons","descriptive":"La présence de sons susceptibles de causer des troubles de sensibilité n'a pas pu être déterminée"},"title":"Points d'attention","unknown":"La présence de risques est inconnue"},"legal-considerations":{"exempt":{"compact":"Déclare être sous le coup d'une exemption dans certaines juridictions","descriptive":"Cette publication dééclare être sous le coup d'une exemption dans certaines juridictions"},"no-metadata":"Aucune information disponible","title":"Considérations légales"},"navigation":{"index":{"compact":"Index","descriptive":"Index comportant des liens vers les entrées référencées"},"no-metadata":"Aucune information disponible","page-navigation":{"compact":"Aller à la page","descriptive":"Permet d'accéder aux pages de la version source imprimée"},"structural":{"compact":"Titres","descriptive":"Contient des titres pour une navigation structurée"},"title":"Points de repère","toc":{"compact":"Table des matières","descriptive":"Table des matières"}},"rich-content":{"accessible-chemistry-as-latex":{"compact":"Formules chimiques en LaTeX","descriptive":"Formules chimiques en format accessible (LaTeX)"},"accessible-chemistry-as-mathml":{"compact":"Formules chimiques en MathML","descriptive":"Formules chimiques en format accessible (MathML)"},"accessible-math-as-latex":{"compact":"Mathématiques en LaTeX","descriptive":"Formules mathématiques en format accessible (LaTeX)"},"accessible-math-described":"Des descriptions textuelles des formules mathématiques sont fournies","closed-captions":{"compact":"Sous-titres disponibles pour les vidéos","descriptive":"Des sous titres sont disponibles pour les vidéos"},"extended-descriptions":"Les images porteuses d'informations complexes sont décrites par des descriptions longues","math-as-mathml":{"compact":"Mathématiques en MathML","descriptive":"Formules mathématiques en format accessible (MathML)"},"open-captions":{"compact":"Sous-titres incrustés","descriptive":"Des sous titres sont incrustés pour les vidéos"},"title":"Contenus spécifiques","transcript":"Transcriptions fournies","unknown":"Aucune information disponible"},"ways-of-reading":{"nonvisual-reading":{"alt-text":{"compact":"Images décrites","descriptive":"Les images sont décrites par un texte"},"no-metadata":"Aucune information pour la lecture en voix de synthèse ou en braille","none":{"compact":"Non lisible en voix de synthèse ou en braille","descriptive":"Le contenu n'est pas lisible en voix de synthèse ou en braille"},"not-fully":{"compact":"Pas entièrement lisible en voix de synthèse ou en braille","descriptive":"Tous les contenus ne pourront pas être lus à haute voix ou en braille"},"readable":{"compact":"Entièrement lisible en voix de synthèse ou en braille","descriptive":"Tous les contenus peuvent être lus en voix de synthèse ou en braille"}},"prerecorded-audio":{"complementary":{"compact":"Clips audio préenregistrés","descriptive":"Des clips audio préenregistrés sont intégrés au contenu"},"no-metadata":"Aucune information sur les enregistrements audio","only":{"compact":"Audio préenregistré uniquement","descriptive":"Livre audio sans texte alternatif"},"synchronized":{"compact":"Audio préenregistré synchronisé avec du texte","descriptive":"Tous les contenus sont disponibles comme audio préenregistrés synchronisés avec le texte"}},"title":"Lisibilité","visual-adjustments":{"modifiable":{"compact":"L'affichage peut être adapté","descriptive":"L'apparence du texte et la mise en page peuvent être modifiées en fonction des capacités du système de lecture (famille et taille des polices, espaces entre les paragraphes, les phrases, les mots et les lettres, ainsi que la couleur de l'arrière-plan et du texte)"},"unknown":"Aucune information sur les possibilités d'adaptation de l'affichage","unmodifiable":{"compact":"L'affichage ne peut pas être adapté","descriptive":"Le texte et la mise en page ne peuvent pas être adaptés étant donné que l'expérience de lecture est proche de celle de la version imprimée, mais l'application de lecture peut tout de même proposer la capacité de zoomer"}}}}},"altIdentifier_many":"","altIdentifier_one":"identifiant alternatif","altIdentifier_other":"identifiants alternatifs","artist_many":"","artist_one":"artiste","artist_other":"artiste","author_many":"","author_one":"auteur","author_other":"auteurs","collection_many":"","collection_one":"collection éditoriale","collection_other":"collections éditoriales","colorist_many":"","colorist_one":"coloriste","colorist_other":"coloristes","contributor_many":"","contributor_one":"contributeur","contributor_other":"contributeurs","description":"description","duration":"durée","editor_many":"","editor_one":"éditeur","editor_other":"éditeurs","identifier_many":"","identifier_one":"identifiant","identifier_other":"identifiants","illustrator_many":"","illustrator_one":"illustrateur","illustrator_other":"illustrateurs","imprint_many":"","imprint_one":"marque éditoriale","imprint_other":"marques éditoriales","inker_many":"","inker_one":"encreur","inker_other":"encreurs","language_many":"","language_one":"langue","language_other":"langues","letterer_many":"","letterer_one":"lettreur","letterer_other":"lettreurs","modified":"date de modification","narrator_many":"","narrator_one":"narrateur","narrator_other":"narrateurs","numberOfPages":"pagination papier","penciler_many":"","penciler_one":"dessinateur","penciler_other":"dessinateurs","published":"date de publication","publisher_many":"","publisher_one":"éditeur","publisher_other":"éditeurs","series_many":"","series_one":"série","series_other":"séries","subject_many":"","subject_one":"catégorie","subject_other":"catégories","subtitle":"sous-titre","title":"titre","translator_many":"","translator_one":"traducteur","translator_other":"traducteurs"}}`),ko=Object.freeze(Object.defineProperty({__proto__:null,default:{publication:Hn},publication:Hn},Symbol.toStringTag,{value:"Module"})),Bn={metadata:{accessibility:{"display-guide":{"accessibility-summary":{"no-metadata":"لا تتوفر أي معلومات","publisher-contact":"لمزيد من المعلومات حول إمكانية الوصول إلى هذا المنتج، يُرجى التواصل مع الناشر: ",title:"ملخص إمكانية الوصول"},"additional-accessibility-information":{aria:{compact:"أدوار ARIA مدرَجة",descriptive:"يتم تعزيز المحتوى باستخدام أدوار ARIA لتحسين التنظيم وتيسير التنقّل"},"audio-descriptions":"الوصف الصوتي",braille:"برايل","color-not-sole-means-of-conveying-information":"اللون ليس الوسيلة الوحيدة لنقل المعلومات","dyslexia-readability":"سهولة القراءة لذوي عُسر القراءة","full-ruby-annotations":"شروح روبي كاملة","high-contrast-between-foreground-and-background-audio":"تباين عالٍ بين الصوت الرئيسي وصوت الخلفية","high-contrast-between-text-and-background":"تباين عالٍ بين النص والخلفية","large-print":"خط كبير","page-breaks":{compact:"فواصل الصفحات متضمَّنة",descriptive:"فواصل الصفحات متضمَّنة من المصدر المطبوع الأصلي"},"ruby-annotations":"بعض شروح الروبي","sign-language":"لغة الإشارة","tactile-graphics":{compact:"الرسوم اللمسية مدرجة",descriptive:"تم دمج الرسوم اللمسية لتيسير الوصول إلى العناصر البصرية للأشخاص المكفوفين"},"tactile-objects":"مجسمات لمسية ثلاثية الأبعاد","text-to-speech-hinting":"إرشادات تحويل النص إلى كلام (TTS)متوفرة",title:"معلومات إضافية عن إمكانية الوصول","ultra-high-contrast-between-text-and-background":"تباين عالٍ جدًا بين النص والخلفية","visible-page-numbering":"ترقيم صفحات مرئي","without-background-sounds":"من دون أصوات في خلفية"},conformance:{a:{compact:"هذا المنشور يفي بالمعايير الدنيا لإمكانية الوصول",descriptive:"يحتوي هذا المنشور على بيان مطابقة يفيد بأنه يفي بمعيار إمكانية الوصول في EPUB وبمستوى A من معيار WCAG 2"},aa:{compact:"هذا المنشور يفي بالمعايير المعتمدة لإمكانية الوصول",descriptive:"يحتوي هذا المنشور على بيان مطابقة يفيد بأنه يفي بمعيار إمكانية الوصول في EPUB وبمستوى AA من معيار WCAG 2"},aaa:{compact:"هذا المنشور يفوق المعايير المقبولة لإمكانية الوصول",descriptive:"يحتوي هذا المنشور على بيان مطابقة يفيد بأنه يفي بمعيار إمكانية الوصول في EPUB وبمستوى AAA من معيار WCAG 2"},certifier:"تم اعتماد هذا المنشور من قبل ","certifier-credentials":"بيانات اعتماد جهة التصديق ",details:{"certification-info":"تم اعتماد هذا المنشور في تاريخ ","certifier-report":"لمزيد من المعلومات، يرجى الرجوع إلى تقرير جهة التصديق",claim:"يدّعي هذا المنشور أنه يستوفي","epub-accessibility-1-0":"معيار إمكانية الوصول لـ EPUB إصدار 1.0","epub-accessibility-1-1":"معيار إمكانية الوصول لـ EPUB إصدار 1.1","level-a":"المستوى A","level-aa":"المستوى AA","level-aaa":"المستوى AAA","wcag-2-0":{compact:"WCAG 2.0",descriptive:"مبادئ النفاذ إلى محتوى الويب (WCAG) 2.0"},"wcag-2-1":{compact:"WCAG 2.1",descriptive:"مبادئ النفاذ إلى محتوى الويب (WCAG) 2.1"},"wcag-2-2":{compact:"WCAG 2.2",descriptive:"مبادئ النفاذ إلى محتوى الويب (WCAG) 2.2"}},"details-title":"معلومات تفصيلية عن مدى المطابقة",no:"لا تتوفر أي معلومات",title:"المطابقة","unknown-standard":"لا يمكن التأكد من مدى مطابقة هذا المنشور للمعايير المقبولة لإمكانية الوصول"},hazards:{flashing:{compact:"محتوى وامض",descriptive:"يحتوي هذا المنشور على محتوى وامض قد يسبب نوبات حساسة للضوء"},"flashing-none":{compact:"لا توجد مخاطر وميض",descriptive:"لا يحتوي هذا المنشور على محتوى وامض قد يسبب نوبات حساسة للضوء"},"flashing-unknown":{compact:"مخاطر الوميض غير معروفة",descriptive:"لم يُمكن التأكد من وجود محتوى وامض قد يسبب نوبات حساسية للضوء"},motion:{compact:"محاكاة الحركة",descriptive:"يحتوي المنشور على محاكاة حركة قد تسبّب دوار الحركة"},"motion-none":{compact:"لا توجد مخاطر محاكاة الحركة",descriptive:"لا يحتوي المنشور على محاكاة حركة قد تسبّب دوار الحركة"},"motion-unknown":{compact:"مخاطر محاكاة الحركة غير معروفة",descriptive:"تعذّر تحديد ما إذا كانت هناك محاكاة للحركة قد تُسبب دوار الحركة"},"no-metadata":"لا تتوفر أي معلومات",none:{compact:"لا توجد مخاطر",descriptive:"لا يحتوي المنشور على أي مخاطر"},sound:{compact:"أصوات",descriptive:"يحتوي المنشور على أصوات قد تؤدي إلى مشاكل حساسية صوتية"},"sound-none":{compact:"لا توجد مخاطر صوتية",descriptive:"لا يحتوي المنشور على أصوات قد تؤدي إلى مشاكل حساسية صوتية"},"sound-unknown":{compact:"مخاطر الصوت غير معروفة",descriptive:"تعذّر تحديد ما إذا كانت هناك أصوات قد تُسبب مشكلات في الحساسية"},title:"مخاطر",unknown:"وجود المخاطر غير معروف"},"legal-considerations":{exempt:{compact:"يُعلن عن استثناء من متطلبات إمكانية الوصول من بعض السلطات القضائية",descriptive:"يُصرّح هذا المنشور بوجود استثناء من متطلبات إمكانية الوصول من بعض السلطات القضائية"},"no-metadata":"لا تتوفر أي معلومات",title:"اعتبارات قانونية"},navigation:{index:{compact:"كشاف",descriptive:"كشاف يحتوي على روابط إلى الإدخالات المشار إليها"},"no-metadata":"لا تتوفر أي معلومات","page-navigation":{compact:"الانتقال إلى صفحة",descriptive:"قائمة الصفحات للانتقال إلى صفحات من النسخة المطبوعة الأصلية"},structural:{compact:"العناوين",descriptive:"عناصر مثل العناوين والجداول وغيرها للتنقل المنظّم"},title:"التنقل",toc:{compact:"جدول المحتويات",descriptive:"جدول المحتويات لكل فصول النص عبر روابط"}},"rich-content":{"accessible-chemistry-as-latex":{compact:"الصيغ الكيميائية بصيغة LaTeX",descriptive:"الصيغ الكيميائية بشكل ميسر (LaTeX)"},"accessible-chemistry-as-mathml":{compact:"الصيغ الكيميائية بصيغة MathML",descriptive:"الصيغ الكيميائية بشكل ميسر (MathML)"},"accessible-math-as-latex":{compact:"الرياضيات بصيغة LaTeX",descriptive:"الصيغ الرياضية بشكل ميسر (LaTeX)"},"accessible-math-described":"تتوفر أوصاف نصية للصيغ الرياضية","closed-captions":{compact:"تحتوي الفيديوهات على شروح مغلقة",descriptive:"الفيديوهات الموجودة في المنشورات تحتوي على شروح مغلقة"},"extended-descriptions":"يتم وصف الصور الغنية بالمعلومات بأوصاف مفصّلة","math-as-mathml":{compact:"الرياضيات بصيغة MathML",descriptive:"الصيغ الرياضية بشكل ميسر(MathML)"},"open-captions":{compact:"تحتوي الفيديوهات على شروح مدمجة",descriptive:"الفيديوهات الموجودة في المنشورات تحتوي على شروح مدمجة"},title:"محتوى غني",transcript:"يتوفر نص(نصوص)",unknown:"لا تتوفر أي معلومات"},"ways-of-reading":{"nonvisual-reading":{"alt-text":{compact:"يحتوي على نص بديل",descriptive:"يحتوي على أوصاف نصية بديلة للصور"},"no-metadata":"لا تتوفر معلومات عن القراءة غير البصرية",none:{compact:"غير قابل للقراءة بصوتٍ عالٍ أو بطريقة برايل الديناميكية",descriptive:"المحتوى غير قابل للقراءة بصوتٍ عالٍ أو بطريقة برايل الديناميكية"},"not-fully":{compact:"غير قابل للقراءة بالكامل بصوتٍ عالٍ أو بطريقة برايل الديناميكية",descriptive:"لن يكون كل المحتوى قابلًا للقراءة بصوتٍ عالٍ أو بطريقة برايل الديناميكية"},readable:{compact:"قابل للقراءة بصوتٍ عالٍ أو بطريقة برايل الديناميكية",descriptive:"يمكن قراءة كل المحتوى بصوتٍ عالٍ أو بطريقة برايل الديناميكية"}},"prerecorded-audio":{complementary:{compact:"مقاطع الصوت المسجّلة مسبقًا",descriptive:"مقاطع الصوت المسجّلة مسبقًا مدمجة في المحتوى"},"no-metadata":"لا توجد معلومات عن الصوت المسجّل مسبقًا",only:{compact:"الصوت المسجّل مسبقًا فقط",descriptive:"كتاب صوتي بدون بديل نصي"},synchronized:{compact:"صوت مسجّل مسبقًا متزامن مع النص",descriptive:"كل المحتوى متوفر كصوت مسجّل مسبقًا متزامن مع النص"}},title:"طرق القراءة","visual-adjustments":{modifiable:{compact:"يمكن تعديل المظهر",descriptive:"يمكن تعديل مظهر النص وتخطيط الصفحة وفقاً لإمكانات نظام القراءة (اسم الخط وحجمه، والمسافات بين الفقرات والجمل والكلمات والأحرف، بالإضافة إلى لون الخلفية والنص)"},unknown:"لا توجد معلومات عن إمكانية تعديل المظهر",unmodifiable:{compact:"لا يمكن تعديل المظهر",descriptive:"لا يمكن تعديل مظهر النص وتخطيط الصفحات لأن تجربة القراءة قريبة من النسخة المطبوعة، ولكن تطبيقات القراءة ما زالت تتيح خيارات التكبير"}}}}},altIdentifier_one:"رمز تعريفي بديل",altIdentifier_other:"رموز تعريفية بديلة",artist_one:"فنان",artist_other:"فنانون",author_one:"مؤلف",author_other:"مؤلفون",collection_one:"سلسلة تحريرية",collection_other:"سلاسل تحريرية",colorist_one:"ملوّن الألوان",colorist_other:"ملوّنو الألوان",contributor_one:"مساهم",contributor_other:"مساهمون",description:"وصف",duration:"مدة",editor_one:"محرر",editor_other:"محررون",identifier_one:"رمز تعريفي",identifier_other:"رموز تعريفية",illustrator_one:"رسًام",illustrator_other:"رسامون",imprint_one:"العلامة التجارية للنشر",imprint_other:"العلامات التجارية للنشر",inker_one:"مُحَبِّر",inker_other:"مُحَبِّرون",language_one:"اللغة",language_other:"اللغات",letterer_one:"خطّاط",letterer_other:"خطّاطون",modified:"تاريخ التعديل",narrator_one:"قارئ صوتي",narrator_other:"قرّاء صوتيون",numberOfPages:"عدد الصفحات في النسخة المطبوعة",penciler_one:"رسّام أولي",penciler_other:"رسّامون أوّليون",published:"تاريخ النشر",publisher_one:"ناشر",publisher_other:"ناشرون",series_one:"سلسلة",series_other:"سلاسل",subject_one:"موضوع",subject_other:"مواضيع",subtitle:"عنوان فرعي",title:"العنوان",translator_one:"مترجم",translator_other:"مترجمون"}},Co=Object.freeze(Object.defineProperty({__proto__:null,default:{publication:Bn},publication:Bn},Symbol.toStringTag,{value:"Module"})),Vn={metadata:{accessibility:{"display-guide":{"accessibility-summary":{"no-metadata":"Ingen information tilgængelig","publisher-contact":"For mere information om tilgængeligheden af denne bog, kontakt venligst udgiveren: ",title:"Tilgængeligheds-oversigt"},"additional-accessibility-information":{aria:{compact:"Indeholder ARIA roller",descriptive:"Indhold forbedres med ARIA-roller for at optimere organisering og gøre navigation lettere"},"audio-descriptions":"Lydbeskrivelser",braille:"Punktskrift (braille)","color-not-sole-means-of-conveying-information":"Information gives ikke udelukkende via farver","dyslexia-readability":"Læsbarhed for ordblinde","full-ruby-annotations":'Indeholder såkalde "ruby" notationer (til asiatiske sprog)',"high-contrast-between-foreground-and-background-audio":"Høj kontrast imellem forgrunds- og baggrunds-lyd","high-contrast-between-text-and-background":"Høj kontrast imellem tekst og baggrunden","large-print":"Forstørret tekst","page-breaks":{compact:"Indeholder sideskift",descriptive:"Indeholder sideskift fra den trykte version af bogen"},"ruby-annotations":'Nogle "ruby" annotationer (til asiatiske sprog)',"sign-language":"Tegnsprog","tactile-graphics":{compact:"Indeholder taktil grafik",descriptive:"Indeholder taktil grafik for at muliggøre adgang til visuel information for blinde"},"tactile-objects":"Taktile 3D objekter","text-to-speech-hinting":"Udtaleforbedringer til syntetisk tale",title:"Yderligere information om tilgængelighed","ultra-high-contrast-between-text-and-background":"Ultra høj kontrast imellem tekst og baggrund","visible-page-numbering":"Synlige sidenumre","without-background-sounds":"Uden baggrundslyd"},conformance:{a:{compact:"Denne bog overholder minimum-tilgængelighedskravene",descriptive:"Denne bog en overensstemmelseserklæring om, at den opfylder EPUB Tilgængelighedskrav og WCAG 2 standarden på niveau A"},aa:{compact:"Denne bog lever op til de accepterede tilgængelighedskrav",descriptive:"Denne bog en overensstemmelseserklæring om, at den opfylder EPUB Tilgængelighedskrav og WCAG 2 standarden på niveau AA"},aaa:{compact:"Denne bog mere end opfylder de accepterede tilgængelighedskrav",descriptive:"Denne bog en overensstemmelseserklæring om, at den opfylder EPUB Tilgængelighedskrav og WCAG 2 standarden på niveau AAA"},certifier:"Denne bog blev certificeret af ","certifier-credentials":"Certificeringsorganets legitimationsoplysninger er ",details:{"certification-info":"Bogen blev certificeret den ","certifier-report":"Se certificeringsorganets rapport for mere information",claim:"Denne bog hævder at opfylde","epub-accessibility-1-0":"EPUB Tilgængelighed 1.0","epub-accessibility-1-1":"EPUB Tilgængelighed 1.1","level-a":"Niveau A","level-aa":"Niveau AA","level-aaa":"Niveau AAA","wcag-2-0":{compact:"WCAG 2.0",descriptive:"Retningslinjer for tilgængeligt webindhold (WCAG) 2.0"},"wcag-2-1":{compact:"WCAG 2.1",descriptive:"Retningslinjer for tilgængeligt webindhold (WCAG) 2.1"},"wcag-2-2":{compact:"WCAG 2.2",descriptive:"Retningslinjer for tilgængeligt webindhold (WCAG) 2.2"}},"details-title":"Detaljeret overholdelses-information",no:"Ingen information tilgængelig",title:"Overholdelse","unknown-standard":"Overholdelse af de accepterede tilgængelighedskrav kan ikke vurderes for denne bog"},hazards:{flashing:{compact:"Blinkende indhold",descriptive:"Bogen indeholder blinkende indhold der kan forårsage epileptiske anfald"},"flashing-none":{compact:"Ingen blinkende indhold",descriptive:"Bogen indeholder ikke noget blinkende indhold, der kunne forårsage epileptiske anfald"},"flashing-unknown":{compact:"Ingen information om bogen har blinkende indhold",descriptive:"Det kunne ikke afgøres om bogen indeholder blinkende indhold der kan lede til epileptiske anfald"},motion:{compact:"Simuleret bevægelse",descriptive:"Bogen indeholder simuleret bevægelse, der kan forårsage en følelse af køresyge"},"motion-none":{compact:"Indeholder ikke simuleret bevægelse",descriptive:"Denne bog indeholder ikke noget indhold med simuleret bevægelse, der kunne lede til en følelse af køresyge"},"motion-unknown":{compact:"Ingen information om simuleret bevægelse",descriptive:"Det kunne ikke vurderes om bogen indeholder simuleret bevægelse, der kan lede til en følelse af køresyge"},"no-metadata":"Ingen information tilgængelig",none:{compact:"Ingen farer",descriptive:"Bogen indeholder ikke noget indhold der kategoriseres som farligt"},sound:{compact:"Lyde",descriptive:"Bogen indeholder lyde der kan være ubehagelige hvis man er sensitiv overfor lyde"},"sound-none":{compact:"Ingen ubehagelige lyde",descriptive:"Bogen indeholder ikke lyde der kunne opleves som ubehagelige hvis man er sensitiv overfor lyde"},"sound-unknown":{compact:"Ingen information om ubehagelige lyde",descriptive:"Det kunne ikke afgøres om bogen indeholder ubehagelige lyde"},title:"Farer",unknown:"Ingen information om farligt indhold"},"legal-considerations":{exempt:{compact:"Gør krav på undtagelser fra tilgængelighedskrav",descriptive:"Denne bog gør krav på en tilgængelighedsundtagelse i en eller flere jurisdiktioner"},"no-metadata":"Ingen information tilgængelig",title:"Juridiske overvejelser"},navigation:{index:{compact:"Indholdsfortegnelse",descriptive:"Indholdsfortegnelse med links til referencer"},"no-metadata":"Ingen information tilgængelig","page-navigation":{compact:"Gå til side",descriptive:"Sideliste for at gå til sider fra den trykte kildeversion"},structural:{compact:"Overskrifter",descriptive:"Elementer så som overskrifter og tabeller til struktureret navigation"},title:"Navigation",toc:{compact:"Indholdsfortegnelse",descriptive:"Indholdsfortegnelse med links til alle kapitler"}},"rich-content":{"accessible-chemistry-as-latex":{compact:"Kemiske formularer i LaTeX",descriptive:"Kemiske formularer i tilgængeligt format (LaTeX)"},"accessible-chemistry-as-mathml":{compact:"Kemiske formularer i MathML notation",descriptive:"Kemiske formularer i tilgængeligt format (MathML)"},"accessible-math-as-latex":{compact:"Matematik som LaTeX",descriptive:"Matematikformler i tilgængeligt format (LaTeX)"},"accessible-math-described":"Tekstbeskrivelser til matematiske formler","closed-captions":{compact:"Videoer har undertekster",descriptive:"Videoer der optræder i bogen har undertekster"},"extended-descriptions":"Informationsrige billeder beskrives med udvidede beskrivelser","math-as-mathml":{compact:"Matematik som MathML",descriptive:"Matematiske formler i tilgængeligt format (MathML)"},"open-captions":{compact:"Videoer har indlejrede undertekster",descriptive:"Videoer der optræder i bogen har indlejrede undertekster"},title:"Komplekst indhold",transcript:"Indeholder transskription(er)",unknown:"Ingen information tilgængelig"},"ways-of-reading":{"nonvisual-reading":{"alt-text":{compact:"Har alternativ tekst",descriptive:"Har billedbeskrivelser"},"no-metadata":"Ingen information omkring ikke-visuel læsning",none:{compact:"Ikke læsbar med oplæsning eller dynamisk punktskrift",descriptive:"Dette indhold er ikke læsbart med oplæsning eller dynamisk punktskrift"},"not-fully":{compact:"Ikke fuldt læsbar med oplæsning eller dynamisk punktskrift",descriptive:"Alt indholdet er ikke fuldt læsbart med oplæsning eller dynamisk punktskrift"},readable:{compact:"Læsbar med oplæsning eller dynamisk punktskrift",descriptive:"Alt indholdet er læsbart med oplæsning eller dynamisk punktskrift"}},"prerecorded-audio":{complementary:{compact:"Indlæste lydklip",descriptive:"Indlæste lydklip er indlejret i indholdet"},"no-metadata":"Ingen information om indlæst lyd",only:{compact:"Kun indlæst lyd",descriptive:"Lydbog uden tekst alternativer"},synchronized:{compact:"Indlæst lyd med synkroniseret tekst",descriptive:"Alt indholdet er tilgængeligt med indlæst lyd og synkroniseret tekst"}},title:"Læseformer","visual-adjustments":{modifiable:{compact:"Udseende kan ændres",descriptive:"Udseende af tekst og sidelayout kan ændres, så vidt muligt i læsesystemet (skrifttype, skriftstørrelse, afstand mellem afsnit, sætninger, ord og bogstaver, samt farven på tekst og baggrund)"},unknown:"Ingen information om mulighed for ændring af udseende",unmodifiable:{compact:"Udseende kan ikke ændres",descriptive:"Tekst og sidelayout kan ikke ændres, da læseoplevelsen afspejler den trykte version af materialet. Læsesystemet kan dog stadig give mulighed for zoom"}}}}},altIdentifier_one:"alternativt ID",altIdentifier_other:"alternative ID'er",artist_one:"kunstner",artist_other:"kunstnere",author_one:"forfatter",author_other:"forfattere",collection_one:"redaktionel samling",collection_other:"redaktionelle samlinger",colorist_one:"farvelægger",colorist_other:"farvelæggere",contributor_one:"bidragsyder",contributor_other:"bidragsydere",description:"beskrivelse",duration:"varighed",editor_one:"redaktør",editor_other:"redaktører",identifier_one:"ID",identifier_other:"ID'er",illustrator_one:"illustrator",illustrator_other:"illustratorer",imprint_one:"trykkeri",imprint_other:"trykkerier",inker_one:"tegner",inker_other:"tegnere",language_one:"sprog",language_other:"sprog",letterer_one:"taleboble-forfatter",letterer_other:"taleboble-forfattere",modified:"rettet dato",narrator_one:"indlæser",narrator_other:"indlæsere",numberOfPages:"printbare sider",penciler_one:"tegneseriekunstner",penciler_other:"tegneseriekunstnere",published:"udgivelsesdato",publisher_one:"udgiver",publisher_other:"udgivere",series_one:"serie",series_other:"serier",subject_one:"emne",subject_other:"emner",subtitle:"undertitel",title:"titel",translator_one:"oversætter",translator_other:"oversættere"}},xo=Object.freeze(Object.defineProperty({__proto__:null,default:{publication:Vn},publication:Vn},Symbol.toStringTag,{value:"Module"})),jn=JSON.parse(`{"format":{"audiobook":"Audiolibro","audiobookJSON":"Audiobook Manifest","cbz":"Comic book archive","divina":"Divina Publication","divinaJSON":"Divina Publication Manifest","epub":"EPUB","lcpa":"Audiolibro protetto con LCP","lcpdf":"PDF protetto con LCP","lcpl":"Licenza LCP","pdf":"PDF","rwp":"Readium Web Publication","rwpm":"Readium Web Publication Manifest","zab":"Audiobook Archive","zip":"ZIP Archive"},"kind":{"audiobook_many":"audiolibri","audiobook_one":"audiolibro","audiobook_other":"audiolibri","book_many":"libri","book_one":"libro","book_other":"libri","comic_many":"fumetti","comic_one":"fumetto","comic_other":"fumetti","document_many":"documenti","document_one":"documento","document_other":"documenti"},"metadata":{"accessibility":{"display-guide":{"accessibility-summary":{"no-metadata":"Nessuna informazione disponibile","publisher-contact":"Per ulteriori informazioni sull'accessibilità di questa risorsa, contattare l'editore: ","title":"Informazioni aggiuntive sull'accessibilità fornite dall'editore"},"additional-accessibility-information":{"aria":{"compact":"Ruoli ARIA inclusi","descriptive":"Il contenuto è semanticamente arricchito con ruoli ARIA per ottimizzare l'organizzazione e facilitare la navigazione"},"audio-descriptions":"Descrizioni audio","braille":"Braille","color-not-sole-means-of-conveying-information":"Il colore non è l'unico mezzo per trasmettere informazioni","dyslexia-readability":"Leggibilità adatta alla dislessia","full-ruby-annotations":"Annotazioni complete in Ruby","high-contrast-between-foreground-and-background-audio":"Elevato contrasto tra audio principale e sottofondo","high-contrast-between-text-and-background":"Contrasto elevato tra testo in primo piano e sfondo","large-print":"Stampa a caratteri ingranditi","page-breaks":{"compact":"Interruzioni di pagina incluse","descriptive":"Interruzioni di pagina identiche alla versione originale a stampa"},"ruby-annotations":"Alcune annotazioni in Ruby","sign-language":"Lingua dei segni","tactile-graphics":{"compact":"Grafica tattile inclusa","descriptive":"La grafica tattile è stata integrata per facilitare l'accesso agli elementi visivi alle persone non vedenti"},"tactile-objects":"Oggetti 3D tattili","text-to-speech-hinting":"Pronuncia migliorata per la sintesi vocale","title":"Ulteriori informazioni sull'accessibilità","ultra-high-contrast-between-text-and-background":"Contrasto molto elevato tra testo e sfondo","visible-page-numbering":"Numerazione delle pagine visibile","without-background-sounds":"Nessun suono in sottofondo"},"conformance":{"a":{"compact":"Questa pubblicazione soddisfa gli standard minimi di accessibilità","descriptive":"La pubblicazione contiene una dichiarazione di conformità che attesta il rispetto degli standard EPUB Accessibility e WCAG 2 Livello A"},"aa":{"compact":"Questa pubblicazione soddisfa gli standard di accessibilità accettati","descriptive":"La pubblicazione contiene una dichiarazione di conformità che attesta il rispetto degli standard EPUB Accessibility e WCAG 2 Livello AAA"},"aaa":{"compact":"Questa pubblicazione supera gli standard di accessibilità","descriptive":"La pubblicazione contiene una dichiarazione di conformità che attesta il rispetto degli standard EPUB Accessibility e WCAG 2 Livello AAA"},"certifier":"La pubblicazione è stata certificata da ","certifier-credentials":"Le credenziali del certificatore sono ","details":{"certification-info":"La pubblicazione è stata certificata il ","certifier-report":"Per ulteriori informazioni, consultare il report di accessibilità del certificatore","claim":"Questa pubblicazione è conforme ai requisiti di","epub-accessibility-1-0":"EPUB Accessibility 1.0","epub-accessibility-1-1":"EPUB Accessibility 1.1","level-a":"Livello A","level-aa":"Livello AA","level-aaa":"Livello AAA","wcag-2-0":{"compact":"WCAG 2.0","descriptive":"Linee guida per l'accessibilità dei contenuti web (WCAG) 2.0"},"wcag-2-1":{"compact":"WCAG 2.1","descriptive":"Linee guida per l'accessibilità dei contenuti web (WCAG) 2.1"},"wcag-2-2":{"compact":"WCAG 2.2","descriptive":"Linee guida per l'accessibilità dei contenuti web (WCAG) 2.2"}},"details-title":"Informazioni dettagliate sulla conformità","no":"Nessuna informazione disponibile","title":"Conformità","unknown-standard":"Nessuna indicazione sugli standard d'accessibilità"},"hazards":{"flashing":{"compact":"Contenuto lampeggiante","descriptive":"La pubblicazione contiene contenuti lampeggianti che possono causare crisi d'epilessia fotosensibile"},"flashing-none":{"compact":"Nessun contenuto lampeggiante","descriptive":"La pubblicazione non presenta contenuti lampeggianti che possono causare crisi d'epilessia fotosensibile"},"flashing-unknown":{"compact":"Nessuna informazione sulla presenza di contenuti lampeggianti","descriptive":"Non è stato possibile determinare la presenza di contenuti lampeggianti che possono causare crisi d'epilessia fotosensibile"},"motion":{"compact":"Simulazione del movimento","descriptive":"La pubblicazione contiene simulazioni di movimento che possono provocare cinetosi"},"motion-none":{"compact":"Nessun rischio di simulazione del movimento","descriptive":"La pubblicazione non contiene simulazioni di movimento che possono causare la malattia di movimento"},"motion-unknown":{"compact":"Nessuna informazione relativa alla presenza di simulazioni di movimento","descriptive":"Non è stato possibile determinare la presenza di contenuti che possono provocare cinetosi"},"no-metadata":"Nessuna informazione disponibile","none":{"compact":"Nessuna problematica","descriptive":"La pubblicazione non presenta contenuti a rischio di simulazione di movimento, di suoni, o di contenuti lampeggianti"},"sound":{"compact":"Suoni","descriptive":"La pubblicazione contiene suoni che possono causare problemi di sensibilità"},"sound-none":{"compact":"Nessun rischio acustico","descriptive":"La pubblicazione non contiene suoni che possono causare problemi di sensibilità"},"sound-unknown":{"compact":"Nessuna informazione sulla presenza di suoni","descriptive":"Non è stato possibile determinare la presenza di suoni che potrebbero causare problemi di sensibilità"},"title":"Problematiche","unknown":"La presenza di rischi è sconosciuta"},"legal-considerations":{"exempt":{"compact":"Dichiara di godere dell'esenzione d'accessibilità in alcune giurisdizioni","descriptive":"Questa risorsa gode dell'esenzione d'accessibilità in alcune giurisdizioni"},"no-metadata":"Nessuna informazione disponibile","title":"Note legali"},"navigation":{"index":{"compact":"Indice analitico interattivo","descriptive":"Indice analitico con link alle voci di riferimento"},"no-metadata":"Nessuna informazione disponibile","page-navigation":{"compact":"Vai alla pagina","descriptive":"Sono presenti i riferimenti ai numeri di pagina della versione a stampa corrispondente"},"structural":{"compact":"Intestazioni","descriptive":"Contiene elementi come titoli, elenchi e tabelle per permettere una navigazione strutturata"},"title":"Navigazione","toc":{"compact":"Indice interattivo","descriptive":"L’indice permette l’accesso diretto a tutti i capitoli tramite link"}},"rich-content":{"accessible-chemistry-as-latex":{"compact":"Formule chimiche in LaTeX","descriptive":"Formule chimiche in formato accessibile (LaTeX)"},"accessible-chemistry-as-mathml":{"compact":"Formule chimiche in MathML","descriptive":"Formule chimiche in formato accessibile (MathML)"},"accessible-math-as-latex":{"compact":"Matematica in LaTeX","descriptive":"Formule matematiche in formato accessibile (LaTeX)"},"accessible-math-described":"Sono disponibili descrizioni testuali per le formule matematiche","closed-captions":{"compact":"Sottotitoli disponibili per i video","descriptive":"Per i video sono disponibili dei sottotitoli"},"extended-descriptions":"Le immagini complesse presentano descrizioni estese","math-as-mathml":{"compact":"Matematica in MathML","descriptive":"Formule matematiche in formato accessibile (MathML)"},"open-captions":{"compact":"I video hanno i sottotitoli","descriptive":"I video inclusi nella pubblicazione hanno i sottotitoli"},"title":"Contenuti arricchiti","transcript":"Trascrizioni fornite","unknown":"Nessuna informazione disponibile"},"ways-of-reading":{"nonvisual-reading":{"alt-text":{"compact":"Immagini descritte","descriptive":"Le immagini sono descritte da un testo"},"no-metadata":"Nessuna informazione sulla lettura non visiva","none":{"compact":"Non leggibile con lettura ad alta voce o in braille","descriptive":"Il contenuto non è leggibile con la lettura ad alta voce o in braille"},"not-fully":{"compact":"Non è interamente leggibile con lettura ad alta voce o in braille","descriptive":"Non tutti i contenuti potranno essere letti con lettura ad alta voce o in braille"},"readable":{"compact":"Interamente leggibile con lettura ad alta voce o in braille","descriptive":"Tutti i contenuti possono essere letti con la lettura ad alta voce o con il display braille"}},"prerecorded-audio":{"complementary":{"compact":"Clip audio preregistrate","descriptive":"Le clip audio preregistrate sono integrate nel contenuto"},"no-metadata":"Non sono disponibili informazioni sull'audio preregistrato","only":{"compact":"Solo audio preregistrato","descriptive":"Audiolibro senza testi alternativi"},"synchronized":{"compact":"Audio preregistrato sincronizzato con il testo","descriptive":"Tutti i contenuti sono disponibili come audio preregistrato sincronizzato con il testo"}},"title":"Leggibilità","visual-adjustments":{"modifiable":{"compact":"La formattazione del testo e il layout della pagina possono essere modificati","descriptive":"La formattazione del testo e il layout della pagina possono essere modificati in base alle funzionalità presenti nella soluzione di lettura (ingrandimento dei caratteri del testo, modifica dei colori e dei contrasti per il testo e lo sfondo, modifica degli spazi tra lettere, parole, frasi e paragrafi)"},"unknown":"Non sono disponibili informazioni sulla possibilità di formattare il testo","unmodifiable":{"compact":"La formattazione del testo e il display della pagina non possono essere modificati","descriptive":"Il layout di testo e pagina non può essere modificato poiché l'esperienza di lettura è vicina a una versione di stampa, ma i sistemi di lettura possono ancora fornire opzioni di zoom"}}}}},"altIdentifier_many":"identificatori alternativi","altIdentifier_one":"identificatore alternativo","altIdentifier_other":"identificatori alternativi","artist_many":"","artist_one":"artista","artist_other":"artisti","author_many":"","author_one":"autore","author_other":"autori","collection_many":"","collection_one":"collana","collection_other":"collane","colorist_many":"","colorist_one":"colorista","colorist_other":"coloristi","contributor_many":"","contributor_one":"contributore","contributor_other":"contributori","description":"descrizione","duration":"durata","editor_many":"","editor_one":"editor","editor_other":"editori","identifier_many":"identificatori","identifier_one":"identificatore","identifier_other":"identificatori","illustrator_many":"","illustrator_one":"illustratore","illustrator_other":"illustratori","imprint_many":"","imprint_one":"marca editoriale","imprint_other":"marche editoriali","inker_many":"","inker_one":"inchiostratore","inker_other":"inchiostratori","language_many":"","language_one":"lingua","language_other":"lingue","letterer_many":"letteristi","letterer_one":"letterista","letterer_other":"letteristi","modified":"Data di modifica","narrator_many":"","narrator_one":"narratore","narrator_other":"narratori","numberOfPages":"impaginazione versione cartacea","penciler_many":"","penciler_one":"disegnatore","penciler_other":"disegnatori","published":"Data di pubblicazione","publisher_many":"","publisher_one":"editore","publisher_other":"editori","series_many":"","series_one":"serie","series_other":"serie","subject_many":"","subject_one":"categoria","subject_other":"categorie","subtitle":"sottotitolo","title":"titolo","translator_many":"","translator_one":"traduttore","translator_other":"traduttori"}}`),Lo=Object.freeze(Object.defineProperty({__proto__:null,default:{publication:jn},publication:jn},Symbol.toStringTag,{value:"Module"})),Gn={metadata:{accessibility:{"display-guide":{"accessibility-summary":{"no-metadata":"Sem informação disponível","publisher-contact":"Para mais informações sobre a acessibilidade deste produto, contacte a editora: ",title:"Resumo de acessibilidade"},"additional-accessibility-information":{aria:{compact:"Inclui funções ARIA",descriptive:"O conteúdo foi otimizado com funções ARIA para melhorar a organização e facilitar a navegação"},"audio-descriptions":"Descrições em áudio",braille:"Braille","color-not-sole-means-of-conveying-information":"A cor não é o único meio de transmitir informação","dyslexia-readability":"Otimizado para dislexia","full-ruby-annotations":"Anotações Ruby completas","high-contrast-between-foreground-and-background-audio":"Alto contraste entre som principal e fundo","high-contrast-between-text-and-background":"Alto contraste entre texto e fundo","large-print":"Impressão ampliada","page-breaks":{compact:"Inclui quebras de página",descriptive:"Inclui quebras de página da fonte impressa original"},"ruby-annotations":"Algumas anotações Ruby","sign-language":"Língua gestual","tactile-graphics":{compact:"Inclui gráficos táteis",descriptive:"Inclui gráficos táteis que facilitam o acesso a elementos visuais para pessoas cegas"},"tactile-objects":"Objetos táteis 3D","text-to-speech-hinting":"Sugestões para leitura em voz alta",title:"Informação adicional de acessibilidade","ultra-high-contrast-between-text-and-background":"Contraste muito elevado entre texto e fundo","visible-page-numbering":"Numeração de páginas visível","without-background-sounds":"Sem sons de fundo"},conformance:{a:{compact:"Cumpre as normas mínimas de acessibilidade",descriptive:"A publicação contém uma declaração de conformidade que indica que cumpre o padrão EPUB Accessibility e WCAG 2 nível A"},aa:{compact:"Cumpre as normas aceites de acessibilidade",descriptive:"A publicação contém uma declaração de conformidade que indica que cumpre o padrão EPUB Accessibility e WCAG 2 nível AA"},aaa:{compact:"Excede as normas aceites de acessibilidade",descriptive:"A publicação contém uma declaração de conformidade que indica que cumpre o padrão EPUB Accessibility e WCAG 2 nível AAA"},certifier:"A publicação foi certificada por ","certifier-credentials":"As credenciais do certificador são ",details:{"certification-info":"A publicação foi certificada em ","certifier-report":"Para mais informações, consulte o relatório do certificador",claim:"Esta publicação declara conformidade com","epub-accessibility-1-0":"EPUB Accessibility 1.0","epub-accessibility-1-1":"EPUB Accessibility 1.1","level-a":"Nível A","level-aa":"Nível AA","level-aaa":"Nível AAA","wcag-2-0":{compact:"WCAG 2.0",descriptive:"Diretrizes de Acessibilidade para Conteúdo Web (WCAG) 2.0"},"wcag-2-1":{compact:"WCAG 2.1",descriptive:"Diretrizes de Acessibilidade para Conteúdo Web (WCAG) 2.1"},"wcag-2-2":{compact:"WCAG 2.2",descriptive:"Diretrizes de Acessibilidade para Conteúdo Web (WCAG) 2.2"}},"details-title":"Detalhes de conformidade",no:"Sem informação disponível",title:"Conformidade","unknown-standard":"Não foi possível determinar a conformidade com as normas de acessibilidade aceites para esta publicação"},hazards:{flashing:{compact:"Conteúdo intermitente",descriptive:"A publicação contém conteúdo intermitente que pode causar crises fotossensíveis"},"flashing-none":{compact:"Sem perigos de intermitência",descriptive:"A publicação não contém conteúdo intermitente que possa causar crises fotossensíveis"},"flashing-unknown":{compact:"Risco de intermitência desconhecido",descriptive:"Não foi possível determinar se existe conteúdo intermitente que possa causar crises fotossensíveis"},motion:{compact:"Simulação de movimento",descriptive:"A publicação contém simulações de movimento que podem causar enjoo"},"motion-none":{compact:"Sem simulação de movimento",descriptive:"A publicação não contém simulações de movimento que possam causar enjoo"},"motion-unknown":{compact:"Risco de movimento desconhecido",descriptive:"Não foi possível determinar se existem simulações de movimento que possam causar enjoo"},"no-metadata":"Sem informação disponível",none:{compact:"Sem perigos",descriptive:"A publicação não contém perigos conhecidos"},sound:{compact:"Sons sensíveis",descriptive:"A publicação contém sons que podem causar sensibilidade auditiva"},"sound-none":{compact:"Sem perigos sonoros",descriptive:"A publicação não contém sons que possam causar sensibilidade auditiva"},"sound-unknown":{compact:"Risco sonoro desconhecido",descriptive:"Não foi possível determinar se a publicação contém sons que possam causar sensibilidade auditiva"},title:"Perigos",unknown:"Presença de perigos não determinada"},"legal-considerations":{exempt:{compact:"Declara isenção de conformidade em algumas jurisdições",descriptive:"Esta publicação declara isenção de conformidade em algumas jurisdições"},"no-metadata":"Sem informação disponível",title:"Considerações legais"},navigation:{index:{compact:"Índice remissivo",descriptive:"Índice com ligações para entradas referenciadas"},"no-metadata":"Sem informação disponível","page-navigation":{compact:"Ir para página",descriptive:"Lista de páginas que permite aceder às páginas da versão impressa original"},structural:{compact:"Títulos e estrutura",descriptive:"Elementos como títulos, tabelas, etc., para navegação estruturada"},title:"Navegação",toc:{compact:"Índice",descriptive:"Índice de conteúdos com ligações para todos os capítulos do texto"}},"rich-content":{"accessible-chemistry-as-latex":{compact:"Fórmulas químicas em LaTeX",descriptive:"Fórmulas químicas em formato acessível (LaTeX)"},"accessible-chemistry-as-mathml":{compact:"Fórmulas químicas em MathML",descriptive:"Fórmulas químicas em formato acessível (MathML)"},"accessible-math-as-latex":{compact:"Matemática em LaTeX",descriptive:"Fórmulas matemáticas em formato acessível (LaTeX)"},"accessible-math-described":"Descrição textual das fórmulas matemáticas","closed-captions":{compact:"Vídeos com legendas ocultas",descriptive:"Os vídeos incluídos na publicação têm legendas ocultas"},"extended-descriptions":"Imagens complexas com descrições detalhadas","math-as-mathml":{compact:"Matemática em MathML",descriptive:"Fórmulas matemáticas em formato acessível (MathML)"},"open-captions":{compact:"Vídeos com legendas abertas",descriptive:"Os vídeos incluídos na publicação têm legendas abertas"},title:"Conteúdo rico",transcript:"Transcrição fornecida",unknown:"Sem informação disponível"},"ways-of-reading":{"nonvisual-reading":{"alt-text":{compact:"Contém texto alternativo",descriptive:"Inclui descrições alternativas de texto para imagens"},"no-metadata":"Sem informação sobre leitura não visual",none:{compact:"Não legível em leitura em voz alta ou braille dinâmico",descriptive:"O conteúdo não é legível em voz alta ou através de braille dinâmico"},"not-fully":{compact:"Parcialmente legível em leitura em voz alta ou braille dinâmico",descriptive:"Nem todo o conteúdo é legível em voz alta ou através de braille dinâmico"},readable:{compact:"Totalmente legível em leitura em voz alta ou braille dinâmico",descriptive:"Todo o conteúdo pode ser lido em voz alta ou através de braille dinâmico"}},"prerecorded-audio":{complementary:{compact:"Contém clipes de áudio pré-gravados",descriptive:"O conteúdo contém clipes de áudio pré-gravados incorporados"},"no-metadata":"Sem informação sobre áudio pré-gravado",only:{compact:"Apenas áudio pré-gravado",descriptive:"A publicação é apenas áudio e não possui alternativa em texto"},synchronized:{compact:"Áudio pré-gravado sincronizado com texto",descriptive:"Todo o conteúdo está disponível como áudio pré-gravado sincronizado com texto"}},title:"Formas de leitura","visual-adjustments":{modifiable:{compact:"Aspeto personalizável",descriptive:"O aspeto do texto e o layout da página podem ser modificados de acordo com as capacidades do sistema de leitura (tipo e tamanho de letra, espaçamento entre parágrafos, frases, palavras e letras, bem como a cor de fundo e do texto)"},unknown:"Sem informação sobre personalização do aspeto",unmodifiable:{compact:"Aspeto não ajustável",descriptive:"O texto e o layout da página não podem ser modificados, uma vez que a experiência de leitura é semelhante à versão impressa, mas os sistemas de leitura ainda podem oferecer opções de ampliação"}}}}},altIdentifier_one:"identificador alternativo",altIdentifier_other:"identificadores alternativos",artist_one:"artista",artist_other:"artistas",author_one:"autor",author_other:"autores",collection_one:"coleção",collection_other:"coleções",colorist_one:"colorista",colorist_other:"coloristas",contributor_one:"colaborador",contributor_other:"colaboradores",description:"descrição",duration:"duração",editor_one:"editor",editor_other:"editores",identifier_one:"identificador",identifier_other:"identificadores",illustrator_one:"ilustrador",illustrator_other:"ilustradores",imprint_one:"selo editorial",imprint_other:"selos editoriais",inker_one:"arte-finalista",inker_other:"arte-finalistas",language_one:"idioma",language_other:"idiomas",letterer_one:"letrista",letterer_other:"letristas",modified:"data de modificação",narrator_one:"narrador",narrator_other:"narradores",numberOfPages:"número de páginas",penciler_one:"desenhador",penciler_other:"desenhadores",published:"data de publicação",publisher_one:"editora",publisher_other:"editoras",series_one:"série",series_other:"séries",subject_one:"tema",subject_other:"temas",subtitle:"subtítulo",title:"título",translator_one:"tradutor",translator_other:"tradutores"}},Ro=Object.freeze(Object.defineProperty({__proto__:null,default:{publication:Gn},publication:Gn},Symbol.toStringTag,{value:"Module"})),Xn={metadata:{accessibility:{"display-guide":{"accessibility-summary":{"no-metadata":"Information saknas","publisher-contact":"För mer information om den här publikationens tillgänglighet, kontakta utgivaren: ",title:"Kompletterande information om tillgänglighet"},"additional-accessibility-information":{aria:{compact:"Innehåller ARIA-roller",descriptive:"Innehållet har försetts med ARIA-roller för att tydliggöra strukturen och underlätta navigering"},"audio-descriptions":"Syntolkning",braille:"Punktskrift","color-not-sole-means-of-conveying-information":"Betydelse uttrycks aldrig enbart med färg","dyslexia-readability":"Förbättrad läsbarhet för personer med dyslexi","full-ruby-annotations":"Fullständig ruby-annotering","high-contrast-between-foreground-and-background-audio":"Hög kontrast mellan förgrundsljud och bakgrundsljud","high-contrast-between-text-and-background":"Hög kontrast mellan text och bakgrund","large-print":"Storstil","page-breaks":{compact:"Innehåller sidnummer",descriptive:"Innehåller sidnummer från tryckt förlaga"},"ruby-annotations":"Viss ruby-annotering","sign-language":"Teckenspråk","tactile-graphics":{compact:"Innehåller taktila bilder",descriptive:"Taktila bilder har lagts till för att tillgängliggöra visuella element för personer med synnedsättning"},"tactile-objects":"Taktila 3D-objekt","text-to-speech-hinting":"Innehåller uttalsinstruktioner för talsyntes",title:"Ytterligare tillgänglighetsinformation","ultra-high-contrast-between-text-and-background":"Extra hög kontrast mellan text och bakgrund","visible-page-numbering":"Synlig sidnumrering","without-background-sounds":"Utan bakgrundsljud"},conformance:{a:{compact:"Publikationen uppfyller tillgänglighetskrav på en grundläggande nivå",descriptive:"Publikationen anger att den uppfyller standarderna EPUB Accessibility och WCAG 2 nivå A"},aa:{compact:"Publikationen uppfyller tillgänglighetskrav på en vedertagen nivå",descriptive:"Publikationen anger att den uppfyller standarderna EPUB Accessibility och WCAG 2 nivå AA"},aaa:{compact:"Publikationen uppfyller tillgänglighetskrav utöver en vedertagen nivå",descriptive:"Publikationen anger att den uppfyller standarderna EPUB Accessibility och WCAG 2 nivå AAA"},certifier:"Publikationen är certifierad av ","certifier-credentials":"Certifierarens märkning är ",details:{"certification-info":"Publikationen certifierades ","certifier-report":"Se certifieringsrapporten för mer information",claim:"Publikationen anger att den uppfyller kraven enligt","epub-accessibility-1-0":"EPUB Accessibility 1.0","epub-accessibility-1-1":"EPUB Accessibility 1.1","level-a":"nivå A","level-aa":"nivå AA","level-aaa":"nivå 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":"Detaljerad information om tillgänglighetskrav",no:"Information saknas",title:"Tillgänglighetskrav","unknown-standard":"Det går inte att avgöra om publikationen uppfyller vedertagna tillgänglighetskrav"},hazards:{flashing:{compact:"Blinkande innehåll",descriptive:"Publikationen har blinkande innehåll som kan vara skadligt för ljuskänsliga personer"},"flashing-none":{compact:"Inget blinkande innehåll",descriptive:"Publikationen har inget blinkande innehåll"},"flashing-unknown":{compact:"Förekomst av blinkande innehåll är okänd",descriptive:"Förekomst av blinkande innehåll är okänd"},motion:{compact:"Rörelsesimulering",descriptive:"Publikationen innehåller rörelsesimulering som skulle kunna orsaka illamående"},"motion-none":{compact:"Ingen rörelsesimulering",descriptive:"Publikationen innehåller ingen rörelsesimulering"},"motion-unknown":{compact:"Förekomst av rörelsesimulering är okänd",descriptive:"Förekomst av rörelsesimulering är okänd"},"no-metadata":"Information saknas",none:{compact:"Inga risker",descriptive:"Publikationen innehåller inga risker"},sound:{compact:"Ljud",descriptive:"Publikationen innehåller ljud som kan orsaka obehag"},"sound-none":{compact:"Inget ljud som kan orsaka obehag",descriptive:"Publikationen innehåller inget ljud som kan orsaka obehag"},"sound-unknown":{compact:"Förekomst av ljud som kan orsaka obehag är okänd",descriptive:"Förekomst av ljud som kan orsaka obehag är okänd"},title:"Risker",unknown:"Förekomst av risker är okänd"},"legal-considerations":{exempt:{compact:"Åberopar ett undantag från vissa lagstadgade tillgänglighetskrav",descriptive:"Publikationen åberopar ett undantag från vissa lagstadgade tillgänglighetskrav"},"no-metadata":"Information saknas",title:"Juridiska aspekter"},navigation:{index:{compact:"Register",descriptive:"Register med länkar till innehållet"},"no-metadata":"Information saknas","page-navigation":{compact:"Gå till sida",descriptive:"Sidindelning för navigering enligt sidnummer i tryckt förlaga"},structural:{compact:"Rubriker",descriptive:"Navigerbara element såsom rubriker eller tabeller"},title:"Navigering",toc:{compact:"Innehållsförteckning",descriptive:"Innehållsförteckning med länkar till alla kapitel"}},"rich-content":{"accessible-chemistry-as-latex":{compact:"Kemiska formler i LaTeX",descriptive:"Kemiska formler i tillgängligt format (LaTeX)"},"accessible-chemistry-as-mathml":{compact:"Kemiska formler i MathML",descriptive:"Kemiska formler i tillgängligt format (MathML)"},"accessible-math-as-latex":{compact:"Matematik som LaTeX",descriptive:"Matematiska formler i tillgängligt format (LaTeX)"},"accessible-math-described":"Innehåller textbeskrivningar av matematik","closed-captions":{compact:"Videoklipp har undertext som kan sättas på/stängas av",descriptive:"Videoklipp som ingår i publikationen har undertext som kan sättas på och stängas av (stängda undertexter)"},"extended-descriptions":"Informationsrika bilder har utökade bildbeskrivningar","math-as-mathml":{compact:"Matematik som MathML",descriptive:"Matematiska formler i tillgängligt format (MathML)"},"open-captions":{compact:"Videoklipp har undertext som inte kan stängas av",descriptive:"Videoklipp som ingår i publikationen har undertext som inte kan stängas av (öppna undertexter)"},title:"Berikat innehåll",transcript:"Innehåller transkriptioner",unknown:"Information saknas"},"ways-of-reading":{"nonvisual-reading":{"alt-text":{compact:"Har textalternativ (alt-texter)",descriptive:"Har textalternativ (alt-texter) till bilder"},"no-metadata":"Information om icke-visuell läsbarhet saknas",none:{compact:"Kan inte läsas med uppläsningsfunktion eller punktskriftsskärm",descriptive:"Innehållet går inte att läsa med uppläsningsfunktion eller punktskriftsskärm"},"not-fully":{compact:"Inte läsbart i sin helhet med uppläsningsfunktion eller punktskriftsskärm",descriptive:"Allt innehåll går inte att läsa med uppläsningsfunktion eller punktskriftsskärm"},readable:{compact:"Kan läsas med uppläsningsfunktion eller punktskriftsskärm",descriptive:"Hela innehållet går att läsa med uppläsningsfunktion eller punktskriftsskärm"}},"prerecorded-audio":{complementary:{compact:"Förinspelade ljudklipp",descriptive:"Innehåller förinspelade ljudklipp"},"no-metadata":"Information om förinspelat ljud saknas",only:{compact:"Endast förinspelat ljud",descriptive:"Bok med ljud utan textalternativ"},synchronized:{compact:"Förinspelat ljud synkroniserat med texten",descriptive:"Hela innehållet finns tillgängligt som förinspelat ljud synkroniserat med texten"}},title:"Olika sätt att läsa","visual-adjustments":{modifiable:{compact:"Utseendet kan justeras",descriptive:"Det går att justera text och layout i den utsträckning som läsprogrammet tillåter, till exempel typsnitt, storlek på text, avstånd mellan rader och stycken samt färg på text och bakgrund"},unknown:"Information om möjlighet att justera utseende saknas",unmodifiable:{compact:"Utseendet kan inte justeras",descriptive:"Text- och sidlayout kan inte justeras eftersom presentationen liknar en tryckt version, men läsprogram kan ha funktioner för att zooma in"}}}}},altIdentifier_one:"alternativ identifierare",altIdentifier_other:"alternativa identifierare",artist_one:"konstnär",artist_other:"konstnärer",author_one:"författare",author_other:"författare",collection_one:"samling",collection_other:"samlingar",colorist_one:"kolorist",colorist_other:"kolorister",contributor_one:"medverkande",contributor_other:"medverkande",description:"beskrivning",duration:"speltid",editor_one:"redaktör",editor_other:"redaktörer",identifier_one:"identifierare",identifier_other:"identifierare",illustrator_one:"illustratör",illustrator_other:"illustratörer",imprint_one:"imprint",imprint_other:"imprint",inker_one:"tuschare",inker_other:"tuschare",language_one:"språk",language_other:"språk",letterer_one:"textare",letterer_other:"textare",modified:"ändringsdatum",narrator_one:"berättarröst",narrator_other:"berättarröster",numberOfPages:"sidantal",penciler_one:"tecknare",penciler_other:"tecknare",published:"publikationsdatum",publisher_one:"förlag",publisher_other:"förlag",series_one:"serie",series_other:"serier",subject_one:"ämne",subject_other:"ämnen",subtitle:"undertitel",title:"titel",translator_one:"översättare",translator_other:"översättare"}},Ao=Object.freeze(Object.defineProperty({__proto__:null,default:{publication:Xn},publication:Xn},Symbol.toStringTag,{value:"Module"}));y.AudioDefaults=Wn,y.AudioNavigator=Eo,y.AudioPreferences=Be,y.AudioPreferencesEditor=ni,y.AudioSettings=ii,y.BooleanPreference=O,y.EnumPreference=jt,y.EpubDefaults=Nn,y.EpubNavigator=ei,y.EpubPreferences=Pe,y.EpubPreferencesEditor=Jt,y.EpubSettings=Zt,y.ExperimentalWebPubNavigator=no,y.FXLCoordinator=Ln,y.FXLFrameManager=kn,y.FXLFramePoolManager=In,y.FXLPeripherals=On,y.FXLSpreader=Tn,y.FrameComms=ve,y.FrameManager=wn,y.FramePoolManager=En,y.HorizontalThird=Cn,y.Injector=Xt,y.LineLengths=Se,y.MediaNavigator=Ji,y.Navigator=Ut,y.Orientation=ht,y.Preference=T,y.Properties=We,y.RSProperties=Fn,y.RangePreference=C,y.ReadiumCSS=Un,y.Spread=dt,y.TextAlignment=K,y.UserProperties=Qt,y.VerticalThird=xn,y.VisualNavigator=Dt,y.WebAudioEngine=Dn,y.WebPubBlobBuilder=Zi,y.WebPubCSS=ln,y.WebPubDefaults=dn,y.WebPubFrameManager=rn,y.WebPubFramePoolManager=on,y.WebPubNavigator=vn,y.WebPubPreferences=we,y.WebPubPreferencesEditor=Gt,y.WebPubSettings=Vt,y.WebRSProperties=an,y.WebUserProperties=Ht,y.ensureBoolean=E,y.ensureEnumValue=He,y.ensureExperiment=Bt,y.ensureFilter=ce,y.ensureLessThanOrEqual=cn,y.ensureMoreThanOrEqual=hn,y.ensureNonNegative=w,y.ensureString=F,y.ensureValueInRange=M,y.experiments=st,y.filterRangeConfig=ae,y.fontSizeRangeConfig=Ae,y.fontWeightRangeConfig=Z,y.fontWidthRangeConfig=Oe,y.letterSpacingRangeConfig=Te,y.lineHeightRangeConfig=ze,y.lineLengthRangeConfig=le,y.paragraphIndentRangeConfig=Me,y.paragraphSpacingRangeConfig=Ie,y.playbackRateRangeConfig=De,y.sML=q,y.sMLWithRequest=A,y.skipIntervalRangeConfig=Q,y.volumeRangeConfig=Ue,y.withFallback=at,y.wordSpacingRangeConfig=Ne,y.zoomRangeConfig=Fe,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@readium/navigator",
3
- "version": "2.4.0-beta.4",
3
+ "version": "2.4.0-beta.5",
4
4
  "type": "module",
5
5
  "description": "Next generation SDK for publications in Web Apps",
6
6
  "author": "readium",
@@ -66,6 +66,7 @@ export class AudioNavigator extends MediaNavigator implements Configurable<Audio
66
66
  private _defaults: AudioDefaults;
67
67
  private _settings: AudioSettings;
68
68
  private _preferencesEditor: AudioPreferencesEditor | null = null;
69
+ private _mediaSessionEnabled: boolean = false;
69
70
  private pool: AudioPoolManager;
70
71
  private readonly _navigatorProtector: AudioNavigatorProtector | null = null;
71
72
  private readonly _keyboardPeripheralsManager: KeyboardPeripherals | null = null;
@@ -110,7 +111,6 @@ export class AudioNavigator extends MediaNavigator implements Configurable<Audio
110
111
  state: {
111
112
  currentTime: initialTime,
112
113
  duration: 0,
113
- volume: this._settings.volume
114
114
  } as PlaybackState,
115
115
  playWhenReady: false,
116
116
  index: trackIndex
@@ -154,10 +154,7 @@ export class AudioNavigator extends MediaNavigator implements Configurable<Audio
154
154
  }
155
155
 
156
156
  this.setupEventListeners();
157
-
158
- if (this._settings.enableMediaSession) {
159
- this.setupMediaSession();
160
- }
157
+ this.applyPreferences();
161
158
 
162
159
  this.pool.setCurrentAudio(trackIndex, "forward");
163
160
 
@@ -190,7 +187,6 @@ export class AudioNavigator extends MediaNavigator implements Configurable<Audio
190
187
  }
191
188
 
192
189
  private applyPreferences(): void {
193
- const oldSettings = this._settings;
194
190
  this._settings = new AudioSettings(this._preferences, this._defaults);
195
191
 
196
192
  if (this._preferencesEditor !== null) {
@@ -200,9 +196,11 @@ export class AudioNavigator extends MediaNavigator implements Configurable<Audio
200
196
  this.pool.audioEngine.setVolume(this._settings.volume);
201
197
  this.pool.audioEngine.setPlaybackRate(this._settings.playbackRate, this._settings.preservePitch);
202
198
 
203
- if (this._settings.enableMediaSession && !oldSettings.enableMediaSession) {
199
+ if (this._settings.enableMediaSession && !this._mediaSessionEnabled) {
200
+ this._mediaSessionEnabled = true;
204
201
  this.setupMediaSession();
205
- } else if (!this._settings.enableMediaSession && oldSettings.enableMediaSession) {
202
+ } else if (!this._settings.enableMediaSession && this._mediaSessionEnabled) {
203
+ this._mediaSessionEnabled = false;
206
204
  this.destroyMediaSession();
207
205
  }
208
206
  }
@@ -11,11 +11,6 @@ export interface PlaybackState {
11
11
  * The duration of the audio resource.
12
12
  */
13
13
  duration: number;
14
-
15
- /**
16
- * The volume of the audio resource.
17
- */
18
- volume: number;
19
14
  }
20
15
 
21
16
  /**
@@ -16,6 +16,7 @@ export class WebAudioEngine implements AudioEngine {
16
16
  private sourceNode: MediaElementAudioSourceNode | null = null;
17
17
  private gainNode: GainNode | null = null;
18
18
  private listeners: { [event: string]: EventCallback[] } = {};
19
+ private currentVolume: number = 1;
19
20
  private currentPlaybackRate: number = 1;
20
21
  private isMutedValue: boolean = false;
21
22
  private isPlayingValue: boolean = false;
@@ -48,7 +49,6 @@ export class WebAudioEngine implements AudioEngine {
48
49
 
49
50
  // crossOrigin is set lazily in activateWebAudio() only when the worklet is needed
50
51
  this.mediaElement = document.createElement("audio");
51
- this.setVolume(this.playback.state.volume);
52
52
 
53
53
  // Event listeners (to report the client app about some async events)
54
54
  this.mediaElement.addEventListener("canplaythrough", this.boundOnCanPlayThrough);
@@ -109,6 +109,7 @@ export class WebAudioEngine implements AudioEngine {
109
109
  this.mediaElement.crossOrigin = "anonymous";
110
110
  this.mediaElement.src = url;
111
111
  this.mediaElement.load();
112
+ this.mediaElement.playbackRate = this.currentPlaybackRate;
112
113
 
113
114
  // If the server doesn't honour the CORS preflight, fall back to a
114
115
  // non-CORS load and tear down the Web Audio graph so the element
@@ -123,6 +124,7 @@ export class WebAudioEngine implements AudioEngine {
123
124
  this.mediaElement.removeAttribute("crossOrigin");
124
125
  this.mediaElement.src = url;
125
126
  this.mediaElement.load();
127
+ this.mediaElement.playbackRate = this.currentPlaybackRate;
126
128
  };
127
129
  const onCORSSuccess = () => cleanup();
128
130
  this.mediaElement.addEventListener("error", onCORSError);
@@ -130,6 +132,7 @@ export class WebAudioEngine implements AudioEngine {
130
132
  } else {
131
133
  this.mediaElement.src = url;
132
134
  this.mediaElement.load();
135
+ this.mediaElement.playbackRate = this.currentPlaybackRate;
133
136
  }
134
137
  }
135
138
 
@@ -203,7 +206,7 @@ export class WebAudioEngine implements AudioEngine {
203
206
  this.mediaElement.addEventListener("progress", this.boundOnProgress);
204
207
 
205
208
  // Re-apply current volume and playback rate to the new element
206
- this.mediaElement.volume = this.isMutedValue ? 0 : this.playback.state.volume;
209
+ this.mediaElement.volume = this.isMutedValue ? 0 : this.currentVolume;
207
210
  this.mediaElement.playbackRate = this.currentPlaybackRate;
208
211
 
209
212
  // Check if metadata is already loaded (common with preloaded elements)
@@ -370,23 +373,23 @@ export class WebAudioEngine implements AudioEngine {
370
373
  */
371
374
  public setVolume(volume: number): void {
372
375
  if (volume < 0) {
376
+ this.currentVolume = 0;
373
377
  this.mediaElement.volume = 0;
374
378
  if (this.gainNode) {
375
379
  this.gainNode.gain.value = 0;
376
380
  }
377
381
  this.isMutedValue = true;
378
- this.playback.state.volume = 0;
379
382
  return;
380
383
  }
381
384
  if (volume > 1) {
382
385
  this.setVolume(volume / 100);
383
386
  return;
384
387
  }
388
+ this.currentVolume = volume;
385
389
  this.mediaElement.volume = volume;
386
390
  if (this.gainNode) {
387
391
  this.gainNode.gain.value = volume;
388
392
  }
389
- this.playback.state.volume = volume;
390
393
  }
391
394
 
392
395
  /**
@@ -34,6 +34,7 @@ export declare class AudioNavigator extends MediaNavigator implements Configurab
34
34
  private _defaults;
35
35
  private _settings;
36
36
  private _preferencesEditor;
37
+ private _mediaSessionEnabled;
37
38
  private pool;
38
39
  private readonly _navigatorProtector;
39
40
  private readonly _keyboardPeripheralsManager;
@@ -10,10 +10,6 @@ export interface PlaybackState {
10
10
  * The duration of the audio resource.
11
11
  */
12
12
  duration: number;
13
- /**
14
- * The volume of the audio resource.
15
- */
16
- volume: number;
17
13
  }
18
14
  /**
19
15
  * Playback interface for an audio engine state
@@ -7,6 +7,7 @@ export declare class WebAudioEngine implements AudioEngine {
7
7
  private sourceNode;
8
8
  private gainNode;
9
9
  private listeners;
10
+ private currentVolume;
10
11
  private currentPlaybackRate;
11
12
  private isMutedValue;
12
13
  private isPlayingValue;