{ if (e.target === e.currentTarget) { selection.clear() } }} onkeydown={(e) => { scroll_container_keydown(e) if (check_shortcut(e, 'Backspace') && selection.items.size >= 1) { e.preventDefault() remove_from_queue() } else { selection.handle_keydown(e) } }} > {#if $queue.past.length || $queue.current}
{#if show_history} item.qId} item_height={entry_height} scroll_container={queue_element} > {#snippet children({ item, i: qi })}
selection.handle_mousedown(e, qi)} oncontextmenu={(e) => selection.handle_contextmenu(e, qi)} onclick={(e) => selection.handle_click(e, qi)} draggable="true" ondragstart={on_drag_start} ondragover={(e) => on_drag_over(e, qi)} ondrop={drop_handler} ondragleave={drag_end_handler} ondragend={drag_end_handler} >
{/snippet}
{#if $queue.current} {@const qi = current_index}
selection.handle_mousedown(e, qi)} oncontextmenu={(e) => selection.handle_contextmenu(e, qi)} onclick={(e) => selection.handle_click(e, qi)} draggable="true" ondragstart={on_drag_start} ondragover={(e) => on_drag_over(e, qi)} ondrop={drop_handler} ondragleave={drag_end_handler} ondragend={drag_end_handler} >
{/if} {/if}
{/if} {#if $queue.user_queue.length || queue.getQueueLength() === 0}

{ if (e.target === e.currentTarget) { selection.clear() } }} > Up Next {#if $queue.user_queue.length > 0} {/if}

item.qId} item_height={entry_height} scroll_container={queue_element} > {#snippet children({ item, i })} {@const qi = i + up_next_index}
selection.handle_mousedown(e, qi - first_visible_index)} oncontextmenu={(e) => selection.handle_contextmenu(e, qi - first_visible_index)} onclick={(e) => selection.handle_click(e, qi - first_visible_index)} draggable="true" ondragstart={on_drag_start} ondragover={(e) => on_drag_over(e, qi)} ondrop={drop_handler} ondragleave={drag_end_handler} ondragend={drag_end_handler} >
{/snippet}
{/if} {#if $queue.auto_queue.length}

selection.clear()} > Autoplay

item.qId} item_height={entry_height} scroll_container={queue_element} > {#snippet children({ item, i })} {@const qi = i + autoplay_index}
selection.handle_mousedown(e, qi - first_visible_index)} oncontextmenu={(e) => selection.handle_contextmenu(e, qi - first_visible_index)} onclick={(e) => selection.handle_click(e, qi - first_visible_index)} draggable="true" ondragstart={on_drag_start} ondragover={(e) => on_drag_over(e, qi)} ondrop={drop_handler} ondragleave={drag_end_handler} ondragend={drag_end_handler} >
{/snippet}
{/if}