{#each [['all', 'range_all'], ['year', 'range_year'], ['month', 'range_month'], ['30', 'range_30']] as const as [r, label]}
(range = r)}>{t(label)}
{/each}
{t('total_spent')}
{money(st.total, base)}
{#if mine}
{t('my_spending')}
{money(mine.consumed, base)}
{/if}
{#if st.total === 0}
{t('no_data')}
{:else}
{t('by_category')}
{#each st.byCategory as c (c.category)}
{CATEGORY_ICONS[c.category]}
{t(`cat_${c.category}` as MsgKey)}
{money(c.amount, base)}
{/each}
{#if st.byMonth.length > 1}
{t('by_month')}
{#if shownMonth}
{fmtMonth(shownMonth.month)}:
{money(shownMonth.amount, base)}
{/if}
{#each st.byMonth as m, i (m.month)}
(hoverMonth = m.month)} onmouseleave={() => (hoverMonth = null)} onfocus={() => (hoverMonth = m.month)} onblur={() => (hoverMonth = null)} >
{i % labelEvery === 0 ? fmtMonth(m.month) : ''}
{/each}
{/if} {#if members.length}
{t('per_member')}
{t('legend_paid')}
{t('legend_share')}
{#each members as p (p.member)}
{session.memberName(p.member)}
{money(p.paid, base)}
{money(p.consumed, base)}
{/each}
{/if} {/if}