{selectedBook ? `${selectedBook.title} · ` : currentSeries ? `${currentSeries.title} · ` : ''}Shelf Goblin
{#if view !== 'series'}

{view === 'similar' ? 'Similar series' : view === 'releases' ? 'Audiobook releases' : view === 'library' ? 'My library' : view === 'settings' ? 'Settings' : 'Series index'}

{#if view === 'library'}{account.status}
{#if account.user}{/if}
{/if}
{/if} {#if storageWarning}

{storageWarning}

{/if} {#if account.canImport}
You have a library saved in this browser.
{/if} {#if account.user && (account.status.includes('paused') || account.status.includes('Could not') || account.needsLogin)}

{account.status}

{/if} {#if view === 'settings'} {@render settingsPage()} {:else if error} {:else if loading}

Loading catalog…

{:else if view === 'series'} {#if currentSeries} {#key currentSeries.id} navigate('index')} onfollow={toggleFollow} onmarkall={markAll} onwork={setWorkRead} onthrough={markThrough} onopenbook={openBook} onlike={findSimilar}/> {/key} {:else}

That series isn’t in the catalog.

{/if} {:else if view === 'similar'}
{similarSeries.length} series · {semanticCount} matched by reading traits{@render layoutControls()}{@render filterButton()}
{@render preferences()} {#if similarSeries.length}
{#each similarSeries as match (match.series.id)}{@render seriesTile(match.series, `${match.method === 'taste' ? 'Shared traits' : 'Shared genres'}: ${match.reasons.join(', ')}`, match.book)}{/each}
{:else}

No matches with these filters.

{/if}
{:else if view === 'releases'}
{#each [{ id: 'upcoming', label: 'Upcoming' }, { id: 'year', label: 'By year' }, { id: 'unknown', label: 'Date unknown' }] as mode (mode.id)}{/each}
{#if releaseMode === 'year'}{/if} {@render filterButton()}
{@render preferences()}
{releaseBooks.length.toLocaleString()} audiobook editions{query ? ` matching “${query}”` : ''}US Audible · {@render freshness()}
{#if releaseBooks.length}{@render listHeading()}
{#each releaseBooks.slice(0, visibleCount) as book (book.id)}{/each}
{#if releaseBooks.length > visibleCount}{/if} {:else}

No releases found. The source snapshot may be out of date.

{/if} {:else} {@const list = view === 'library' ? librarySeries : indexSeries} {#if view === 'library'}
{#each Object.entries(stateLabels) as [key, label] (key)}{/each}
{/if} {#if view === 'library' && libraryState === 'up-next'}
{upNext.length} audiobook{upNext.length === 1 ? '' : 's'} waiting across {followedCount} series
{#if upNext.length}
{#each upNext.slice(0, visibleCount) as item (item.series.id)} setWorkRead(s, w, true)} onopenbook={openBook}/>{/each}
{#if upNext.length > visibleCount}{/if} {:else}

{followedCount ? 'Nothing waiting. You’re current on every series you follow.' : 'Follow a series and the next audiobook to listen to shows up here.'}

{/if} {:else}
{#if view === 'index'}{#if adultOn}{/if}{@render filterButton()}{/if}
{@render preferences()} {#if list.length || !searchFallback.length}
{list.length.toLocaleString()} series{query ? ` matching “${query}”` : ''}
{@render layoutControls()}
{/if} {#if list.length} {#if bookLayout === 'list'}{@render seriesHeading()}{/if}
{#each list.slice(0, visibleCount) as series (series.id)}{@render seriesTile(series)}{/each}
{#if list.length > visibleCount}{/if} {:else if searchFallback.length}
No series match “{query}”, but {searchFallback.length} matching audiobook{searchFallback.length === 1 ? '' : 's'} did.Individual editions, not series starts
{@render listHeading()}
{#each searchFallback as book (book.id)}{/each}
{:else}

{view === 'library' ? (followedCount ? 'No series with this status.' : 'You aren’t following any series yet. Use “Follow” on a series to start.') : query ? `Nothing matches “${query}” with your current filters.` : 'No series match your filters.'}

{/if} {/if} {/if}
{#snippet seriesTile(series: CatalogSeries, reason = '', cover: CatalogBook | undefined = undefined)} {/snippet} {#snippet layoutControls()}
{/snippet} {#snippet filterButton()}{/snippet} {#snippet listHeading()}{/snippet} {#snippet seriesHeading()}{/snippet} {#snippet preferences()} {#if filtersOpen && view !== 'library'}
{#each filterOptions as option (option.key)}{/each}
Filters change what you see here. Your library and reading progress stay complete.
{/if} {/snippet} {#snippet settingsPage()}

Account

{#if account.user && !account.needsLogin}

Signed in as @{account.user.username}. Your library syncs across your devices.

{:else}

Not signed in. Your library is saved in this browser only.

{/if} {#if account.status}

{account.status}

{/if}

Your library

A backup is a plain JSON file. Importing merges into what you already have rather than replacing it.{#if loading} Loading the catalog before an import can be matched up…{/if}

Date of birth

{#if !consent.birthDate || editingBirthDate}
{#if consent.birthDate}{/if}

Optional. Signing in with GitHub does not tell us your age, so this is your own word for it. It is kept only to check your age, never shown to anyone else, and never included in a library export.

{:else}
{displayDate(consent.birthDate)}
{/if} {#if consentError}{/if} {#if account.ready && !account.user}

Saved in this browser only. Sign in to keep it across your devices.

{/if}
{#if verifiedAdult}

Adult content

Off unless you turn it on. Turning it on adds sexual-content filters to the Filters panel so you can set them yourself.

{/if}
{/snippet} {#snippet freshness()}{#if catalog?.sourceSnapshotAt}Source snapshot: {displayDate(catalog.sourceSnapshotAt.slice(0, 10))}{/if}{/snippet} {#if selectedBook}{#key selectedBook.id}{/key}{/if}
{toast}