{#each letters as _, i} { cursor = -1; }} onbeforeinput={(event) => { if (event.inputType === "insertText") { event.preventDefault(); let key = event.data ?? ""; if (/^[a-zA-Z]$/.test(key)) { letters[i] = key.toUpperCase(); let nc = cursor; if (nc < 4) { nc++; } else { nc = 0; } inputs[nc].focus(); cursor = nc; } } }} onclick={() => { if (!active) { return; } if (cursor === i) { colors[cursor] = (colors[cursor] + 1) % 3; } else { cursor = i; } }} /> {/each} {#if info_gained_wrapped === null} ↵ {:else} {#await info_gained_wrapped}
{:then i} {i.info_gained.toFixed(2)} bits {:catch e} ! {/await} {/if}