{#if isShowDeleteConfirmation} (isShowDeleteConfirmation = false)} on:confirm={() => handlePromiseError(trashOrDelete(true))} /> {/if} {#if showShortcuts} (showShortcuts = !showShortcuts)} /> {/if}
((viewport.width = width), (viewport.height = height))} bind:this={element} on:scroll={() => ((assetStore.lastScrollTime = Date.now()), handleTimelineScroll())} >
((topSectionHeight = height), (topSectionOffset = target.offsetTop))} class:invisible={showSkeleton} > {#if isEmpty} {/if}
{#each $assetStore.buckets as bucket (bucket.bucketDate)} {@const isPremeasure = preMeasure.includes(bucket)} {@const display = bucket.intersecting || bucket === $assetStore.pendingScrollBucket || isPremeasure}
intersectedHandler(bucket), onSeparate: () => seperatedHandler(bucket), top: BUCKET_INTERSECTION_ROOT_TOP, bottom: BUCKET_INTERSECTION_ROOT_BOTTOM, root: element, }} data-bucket-display={bucket.intersecting} data-bucket-date={bucket.bucketDate} style:height={bucket.bucketHeight + 'px'} > {#if display && !bucket.measured} (preMeasure = preMeasure.filter((b) => b !== bucket))} > {/if} {#if !display || !bucket.measured} {/if} {#if display && bucket.measured} handleGroupSelect(group.title, group.assets)} on:selectAssetCandidates={({ detail: asset }) => handleSelectAssetCandidates(asset)} on:selectAssets={({ detail: asset }) => handleSelectAssets(asset)} /> {/if}
{/each}
{#if $showAssetViewer} {#await import('../asset-viewer/asset-viewer.svelte') then { default: AssetViewer }} {/await} {/if}