{#each chords as { input, id, deviation }, i (id)} {@const a = getPercent(deviation[0], input.length, 10, 25)} {@const b = getPercent(deviation[1], input.length, 10, 18)} {@const max = Math.max(a, b)}
{#if max === 1} Close {:else if max > 0.5} Okay {:else if max > 0} Good {:else} Perfect {/if}
{#each input as token} {KBD_ICONS.get(token.code)} {/each}
{/each}