{data.book.title}

{tocLabel ?? data.book.authors.join(', ')}

{#if isPdf} { toc = t; ready = true; }} {onrelocate} {onselection} onhighlightclick={openHighlight} {onkey} onloading={(f) => (loading = f)} onerror={(m) => (failure = m)} /> {:else} { toc = t; ready = true; }} {onrelocate} {onselection} onhighlightclick={openHighlight} {onkey} onloading={(f) => (loading = f)} onerror={(m) => (failure = m)} /> {#if ready && settings.flow === 'paginated'} {/if} {/if} {#if failure}

Couldn't open this book

{failure}

back to the book
{:else if !ready}

{loading === null || loading === 0 ? 'Opening…' : `Downloading ${Math.round(loading * 100)}%`}

{/if}
{#if panel} {/if}
{#if selection || active} {/if}
{fmtPercent(percent)} (scrubbing = Number(e.currentTarget.value))} onchange={async (e) => { await engine?.goToPercent(Number(e.currentTarget.value)); scrubbing = null; }} /> {#if location?.page && location.pageCount}{location.page} / {location.pageCount}{:else if saveState === 'saving'}saving…{:else if saveState === 'error'}not saved{:else if saveState === 'saved'}saved{/if}