blob: 49c07ebe80549b36bdc869c7f3dcfbc622385fe2 [file] [log] [blame]
{"version":3,"file":"cdk-scrolling.umd.js","sources":["../../src/cdk/scrolling/viewport-ruler.ts","../../src/cdk/scrolling/scrolling-module.ts","../../src/cdk/scrolling/virtual-for-of.ts","../../src/cdk/scrolling/virtual-scroll-viewport.ts","../../src/cdk/scrolling/scrollable.ts","../../src/cdk/scrolling/scroll-dispatcher.ts","../../src/cdk/scrolling/fixed-size-virtual-scroll.ts","../../src/cdk/scrolling/virtual-scroll-strategy.ts","../../node_modules/tslib/tslib.es6.js"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Platform} from '@angular/cdk/platform';\nimport {Injectable, NgZone, OnDestroy, Optional, SkipSelf} from '@angular/core';\nimport {merge, of as observableOf, fromEvent, Observable, Subscription} from 'rxjs';\nimport {auditTime} from 'rxjs/operators';\n\n/** Time in ms to throttle the resize events by default. */\nexport const DEFAULT_RESIZE_TIME = 20;\n\n/** Object that holds the scroll position of the viewport in each direction. */\nexport interface ViewportScrollPosition {\n top: number;\n left: number;\n}\n\n/**\n * Simple utility for getting the bounds of the browser viewport.\n * @docs-private\n */\n@Injectable({providedIn: 'root'})\nexport class ViewportRuler implements OnDestroy {\n /** Cached viewport dimensions. */\n private _viewportSize: {width: number; height: number};\n\n /** Stream of viewport change events. */\n private _change: Observable<Event>;\n\n /** Subscription to streams that invalidate the cached viewport dimensions. */\n private _invalidateCache: Subscription;\n\n constructor(private _platform: Platform, ngZone: NgZone) {\n ngZone.runOutsideAngular(() => {\n this._change = _platform.isBrowser ?\n merge(fromEvent(window, 'resize'), fromEvent(window, 'orientationchange')) :\n observableOf();\n\n // Note that we need to do the subscription inside `runOutsideAngular`\n // since subscribing is what causes the event listener to be added.\n this._invalidateCache = this.change().subscribe(() => this._updateViewportSize());\n });\n }\n\n ngOnDestroy() {\n this._invalidateCache.unsubscribe();\n }\n\n /** Returns the viewport's width and height. */\n getViewportSize(): Readonly<{width: number, height: number}> {\n if (!this._viewportSize) {\n this._updateViewportSize();\n }\n\n const output = {width: this._viewportSize.width, height: this._viewportSize.height};\n\n // If we're not on a browser, don't cache the size since it'll be mocked out anyway.\n if (!this._platform.isBrowser) {\n this._viewportSize = null!;\n }\n\n return output;\n }\n\n /** Gets a ClientRect for the viewport's bounds. */\n getViewportRect(): ClientRect {\n // Use the document element's bounding rect rather than the window scroll properties\n // (e.g. pageYOffset, scrollY) due to in issue in Chrome and IE where window scroll\n // properties and client coordinates (boundingClientRect, clientX/Y, etc.) are in different\n // conceptual viewports. Under most circumstances these viewports are equivalent, but they\n // can disagree when the page is pinch-zoomed (on devices that support touch).\n // See https://bugs.chromium.org/p/chromium/issues/detail?id=489206#c4\n // We use the documentElement instead of the body because, by default (without a css reset)\n // browsers typically give the document body an 8px margin, which is not included in\n // getBoundingClientRect().\n const scrollPosition = this.getViewportScrollPosition();\n const {width, height} = this.getViewportSize();\n\n return {\n top: scrollPosition.top,\n left: scrollPosition.left,\n bottom: scrollPosition.top + height,\n right: scrollPosition.left + width,\n height,\n width,\n };\n }\n\n /** Gets the (top, left) scroll position of the viewport. */\n getViewportScrollPosition(): ViewportScrollPosition {\n // While we can get a reference to the fake document\n // during SSR, it doesn't have getBoundingClientRect.\n if (!this._platform.isBrowser) {\n return {top: 0, left: 0};\n }\n\n // The top-left-corner of the viewport is determined by the scroll position of the document\n // body, normally just (scrollLeft, scrollTop). However, Chrome and Firefox disagree about\n // whether `document.body` or `document.documentElement` is the scrolled element, so reading\n // `scrollTop` and `scrollLeft` is inconsistent. However, using the bounding rect of\n // `document.documentElement` works consistently, where the `top` and `left` values will\n // equal negative the scroll position.\n const documentElement = document.documentElement!;\n const documentRect = documentElement.getBoundingClientRect();\n\n const top = -documentRect.top || document.body.scrollTop || window.scrollY ||\n documentElement.scrollTop || 0;\n\n const left = -documentRect.left || document.body.scrollLeft || window.scrollX ||\n documentElement.scrollLeft || 0;\n\n return {top, left};\n }\n\n /**\n * Returns a stream that emits whenever the size of the viewport changes.\n * @param throttleTime Time in milliseconds to throttle the stream.\n */\n change(throttleTime: number = DEFAULT_RESIZE_TIME): Observable<Event> {\n return throttleTime > 0 ? this._change.pipe(auditTime(throttleTime)) : this._change;\n }\n\n /** Updates the cached viewport size. */\n private _updateViewportSize() {\n this._viewportSize = this._platform.isBrowser ?\n {width: window.innerWidth, height: window.innerHeight} :\n {width: 0, height: 0};\n }\n}\n\n\n/** @docs-private @deprecated @breaking-change 8.0.0 */\nexport function VIEWPORT_RULER_PROVIDER_FACTORY(parentRuler: ViewportRuler,\n platform: Platform,\n ngZone: NgZone) {\n return parentRuler || new ViewportRuler(platform, ngZone);\n}\n\n/** @docs-private @deprecated @breaking-change 8.0.0 */\nexport const VIEWPORT_RULER_PROVIDER = {\n // If there is already a ViewportRuler available, use that. Otherwise, provide a new one.\n provide: ViewportRuler,\n deps: [[new Optional(), new SkipSelf(), ViewportRuler], Platform, NgZone],\n useFactory: VIEWPORT_RULER_PROVIDER_FACTORY\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BidiModule} from '@angular/cdk/bidi';\nimport {PlatformModule} from '@angular/cdk/platform';\nimport {NgModule} from '@angular/core';\nimport {CdkFixedSizeVirtualScroll} from './fixed-size-virtual-scroll';\nimport {CdkScrollable} from './scrollable';\nimport {CdkVirtualForOf} from './virtual-for-of';\nimport {CdkVirtualScrollViewport} from './virtual-scroll-viewport';\n\n@NgModule({\n imports: [BidiModule, PlatformModule],\n exports: [\n BidiModule,\n CdkFixedSizeVirtualScroll,\n CdkScrollable,\n CdkVirtualForOf,\n CdkVirtualScrollViewport,\n ],\n declarations: [\n CdkFixedSizeVirtualScroll,\n CdkScrollable,\n CdkVirtualForOf,\n CdkVirtualScrollViewport,\n ],\n})\nexport class ScrollingModule {}\n\n/**\n * @deprecated ScrollDispatchModule has been renamed to ScrollingModule.\n * @breaking-change 8.0.0 delete this alias\n */\n@NgModule({\n imports: [ScrollingModule],\n exports: [ScrollingModule],\n})\nexport class ScrollDispatchModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n ArrayDataSource,\n CollectionViewer,\n DataSource,\n ListRange,\n isDataSource,\n} from '@angular/cdk/collections';\nimport {\n Directive,\n DoCheck,\n EmbeddedViewRef,\n Input,\n IterableChangeRecord,\n IterableChanges,\n IterableDiffer,\n IterableDiffers,\n NgIterable,\n NgZone,\n OnDestroy,\n SkipSelf,\n TemplateRef,\n TrackByFunction,\n ViewContainerRef,\n} from '@angular/core';\nimport {Observable, Subject, of as observableOf} from 'rxjs';\nimport {pairwise, shareReplay, startWith, switchMap, takeUntil} from 'rxjs/operators';\nimport {CdkVirtualScrollViewport} from './virtual-scroll-viewport';\n\n\n/** The context for an item rendered by `CdkVirtualForOf` */\nexport type CdkVirtualForOfContext<T> = {\n /** The item value. */\n $implicit: T;\n /** The DataSource, Observable, or NgIterable that was passed to *cdkVirtualFor. */\n cdkVirtualForOf: DataSource<T> | Observable<T[]> | NgIterable<T>;\n /** The index of the item in the DataSource. */\n index: number;\n /** The number of items in the DataSource. */\n count: number;\n /** Whether this is the first item in the DataSource. */\n first: boolean;\n /** Whether this is the last item in the DataSource. */\n last: boolean;\n /** Whether the index is even. */\n even: boolean;\n /** Whether the index is odd. */\n odd: boolean;\n};\n\n\n/** Helper to extract size from a DOM Node. */\nfunction getSize(orientation: 'horizontal' | 'vertical', node: Node): number {\n const el = node as Element;\n if (!el.getBoundingClientRect) {\n return 0;\n }\n const rect = el.getBoundingClientRect();\n return orientation == 'horizontal' ? rect.width : rect.height;\n}\n\n\n/**\n * A directive similar to `ngForOf` to be used for rendering data inside a virtual scrolling\n * container.\n */\n@Directive({\n selector: '[cdkVirtualFor][cdkVirtualForOf]',\n})\nexport class CdkVirtualForOf<T> implements CollectionViewer, DoCheck, OnDestroy {\n /** Emits when the rendered view of the data changes. */\n viewChange = new Subject<ListRange>();\n\n /** Subject that emits when a new DataSource instance is given. */\n private _dataSourceChanges = new Subject<DataSource<T>>();\n\n /** The DataSource to display. */\n @Input()\n get cdkVirtualForOf(): DataSource<T> | Observable<T[]> | NgIterable<T> {\n return this._cdkVirtualForOf;\n }\n set cdkVirtualForOf(value: DataSource<T> | Observable<T[]> | NgIterable<T>) {\n this._cdkVirtualForOf = value;\n const ds = isDataSource(value) ? value :\n // Slice the value if its an NgIterable to ensure we're working with an array.\n new ArrayDataSource<T>(\n value instanceof Observable ? value : Array.prototype.slice.call(value || []));\n this._dataSourceChanges.next(ds);\n }\n _cdkVirtualForOf: DataSource<T> | Observable<T[]> | NgIterable<T>;\n\n /**\n * The `TrackByFunction` to use for tracking changes. The `TrackByFunction` takes the index and\n * the item and produces a value to be used as the item's identity when tracking changes.\n */\n @Input()\n get cdkVirtualForTrackBy(): TrackByFunction<T> | undefined {\n return this._cdkVirtualForTrackBy;\n }\n set cdkVirtualForTrackBy(fn: TrackByFunction<T> | undefined) {\n this._needsUpdate = true;\n this._cdkVirtualForTrackBy = fn ?\n (index, item) => fn(index + (this._renderedRange ? this._renderedRange.start : 0), item) :\n undefined;\n }\n private _cdkVirtualForTrackBy: TrackByFunction<T> | undefined;\n\n /** The template used to stamp out new elements. */\n @Input()\n set cdkVirtualForTemplate(value: TemplateRef<CdkVirtualForOfContext<T>>) {\n if (value) {\n this._needsUpdate = true;\n this._template = value;\n }\n }\n\n /**\n * The size of the cache used to store templates that are not being used for re-use later.\n * Setting the cache size to `0` will disable caching. Defaults to 20 templates.\n */\n @Input() cdkVirtualForTemplateCacheSize: number = 20;\n\n /** Emits whenever the data in the current DataSource changes. */\n dataStream: Observable<T[] | ReadonlyArray<T>> = this._dataSourceChanges\n .pipe(\n // Start off with null `DataSource`.\n startWith(null!),\n // Bundle up the previous and current data sources so we can work with both.\n pairwise(),\n // Use `_changeDataSource` to disconnect from the previous data source and connect to the\n // new one, passing back a stream of data changes which we run through `switchMap` to give\n // us a data stream that emits the latest data from whatever the current `DataSource` is.\n switchMap(([prev, cur]) => this._changeDataSource(prev, cur)),\n // Replay the last emitted data when someone subscribes.\n shareReplay(1));\n\n /** The differ used to calculate changes to the data. */\n private _differ: IterableDiffer<T> | null = null;\n\n /** The most recent data emitted from the DataSource. */\n private _data: T[] | ReadonlyArray<T>;\n\n /** The currently rendered items. */\n private _renderedItems: T[];\n\n /** The currently rendered range of indices. */\n private _renderedRange: ListRange;\n\n /**\n * The template cache used to hold on ot template instancess that have been stamped out, but don't\n * currently need to be rendered. These instances will be reused in the future rather than\n * stamping out brand new ones.\n */\n private _templateCache: EmbeddedViewRef<CdkVirtualForOfContext<T>>[] = [];\n\n /** Whether the rendered data should be updated during the next ngDoCheck cycle. */\n private _needsUpdate = false;\n\n private _destroyed = new Subject<void>();\n\n constructor(\n /** The view container to add items to. */\n private _viewContainerRef: ViewContainerRef,\n /** The template to use when stamping out new items. */\n private _template: TemplateRef<CdkVirtualForOfContext<T>>,\n /** The set of available differs. */\n private _differs: IterableDiffers,\n /** The virtual scrolling viewport that these items are being rendered in. */\n @SkipSelf() private _viewport: CdkVirtualScrollViewport,\n ngZone: NgZone) {\n this.dataStream.subscribe(data => {\n this._data = data;\n this._onRenderedDataChange();\n });\n this._viewport.renderedRangeStream.pipe(takeUntil(this._destroyed)).subscribe(range => {\n this._renderedRange = range;\n ngZone.run(() => this.viewChange.next(this._renderedRange));\n this._onRenderedDataChange();\n });\n this._viewport.attach(this);\n }\n\n /**\n * Measures the combined size (width for horizontal orientation, height for vertical) of all items\n * in the specified range. Throws an error if the range includes items that are not currently\n * rendered.\n */\n measureRangeSize(range: ListRange, orientation: 'horizontal' | 'vertical'): number {\n if (range.start >= range.end) {\n return 0;\n }\n if (range.start < this._renderedRange.start || range.end > this._renderedRange.end) {\n throw Error(`Error: attempted to measure an item that isn't rendered.`);\n }\n\n // The index into the list of rendered views for the first item in the range.\n const renderedStartIndex = range.start - this._renderedRange.start;\n // The length of the range we're measuring.\n const rangeLen = range.end - range.start;\n\n // Loop over all root nodes for all items in the range and sum up their size.\n let totalSize = 0;\n let i = rangeLen;\n while (i--) {\n const view = this._viewContainerRef.get(i + renderedStartIndex) as\n EmbeddedViewRef<CdkVirtualForOfContext<T>> | null;\n let j = view ? view.rootNodes.length : 0;\n while (j--) {\n totalSize += getSize(orientation, view!.rootNodes[j]);\n }\n }\n\n return totalSize;\n }\n\n ngDoCheck() {\n if (this._differ && this._needsUpdate) {\n // TODO(mmalerba): We should differentiate needs update due to scrolling and a new portion of\n // this list being rendered (can use simpler algorithm) vs needs update due to data actually\n // changing (need to do this diff).\n const changes = this._differ.diff(this._renderedItems);\n if (!changes) {\n this._updateContext();\n } else {\n this._applyChanges(changes);\n }\n this._needsUpdate = false;\n }\n }\n\n ngOnDestroy() {\n this._viewport.detach();\n\n this._dataSourceChanges.next();\n this._dataSourceChanges.complete();\n this.viewChange.complete();\n\n this._destroyed.next();\n this._destroyed.complete();\n\n for (let view of this._templateCache) {\n view.destroy();\n }\n }\n\n /** React to scroll state changes in the viewport. */\n private _onRenderedDataChange() {\n if (!this._renderedRange) {\n return;\n }\n this._renderedItems = this._data.slice(this._renderedRange.start, this._renderedRange.end);\n if (!this._differ) {\n this._differ = this._differs.find(this._renderedItems).create(this.cdkVirtualForTrackBy);\n }\n this._needsUpdate = true;\n }\n\n /** Swap out one `DataSource` for another. */\n private _changeDataSource(oldDs: DataSource<T> | null, newDs: DataSource<T> | null):\n Observable<T[] | ReadonlyArray<T>> {\n\n if (oldDs) {\n oldDs.disconnect(this);\n }\n\n this._needsUpdate = true;\n return newDs ? newDs.connect(this) : observableOf();\n }\n\n /** Update the `CdkVirtualForOfContext` for all views. */\n private _updateContext() {\n const count = this._data.length;\n let i = this._viewContainerRef.length;\n while (i--) {\n let view = this._viewContainerRef.get(i) as EmbeddedViewRef<CdkVirtualForOfContext<T>>;\n view.context.index = this._renderedRange.start + i;\n view.context.count = count;\n this._updateComputedContextProperties(view.context);\n view.detectChanges();\n }\n }\n\n /** Apply changes to the DOM. */\n private _applyChanges(changes: IterableChanges<T>) {\n // Rearrange the views to put them in the right location.\n changes.forEachOperation((record: IterableChangeRecord<T>,\n adjustedPreviousIndex: number | null,\n currentIndex: number | null) => {\n if (record.previousIndex == null) { // Item added.\n const view = this._insertViewForNewItem(currentIndex!);\n view.context.$implicit = record.item;\n } else if (currentIndex == null) { // Item removed.\n this._cacheView(this._detachView(adjustedPreviousIndex !));\n } else { // Item moved.\n const view = this._viewContainerRef.get(adjustedPreviousIndex!) as\n EmbeddedViewRef<CdkVirtualForOfContext<T>>;\n this._viewContainerRef.move(view, currentIndex);\n view.context.$implicit = record.item;\n }\n });\n\n // Update $implicit for any items that had an identity change.\n changes.forEachIdentityChange((record: IterableChangeRecord<T>) => {\n const view = this._viewContainerRef.get(record.currentIndex!) as\n EmbeddedViewRef<CdkVirtualForOfContext<T>>;\n view.context.$implicit = record.item;\n });\n\n // Update the context variables on all items.\n const count = this._data.length;\n let i = this._viewContainerRef.length;\n while (i--) {\n const view = this._viewContainerRef.get(i) as EmbeddedViewRef<CdkVirtualForOfContext<T>>;\n view.context.index = this._renderedRange.start + i;\n view.context.count = count;\n this._updateComputedContextProperties(view.context);\n }\n }\n\n /** Cache the given detached view. */\n private _cacheView(view: EmbeddedViewRef<CdkVirtualForOfContext<T>>) {\n if (this._templateCache.length < this.cdkVirtualForTemplateCacheSize) {\n this._templateCache.push(view);\n } else {\n const index = this._viewContainerRef.indexOf(view);\n\n // It's very unlikely that the index will ever be -1, but just in case,\n // destroy the view on its own, otherwise destroy it through the\n // container to ensure that all the references are removed.\n if (index === -1) {\n view.destroy();\n } else {\n this._viewContainerRef.remove(index);\n }\n }\n }\n\n /** Inserts a view for a new item, either from the cache or by creating a new one. */\n private _insertViewForNewItem(index: number): EmbeddedViewRef<CdkVirtualForOfContext<T>> {\n return this._insertViewFromCache(index) || this._createEmbeddedViewAt(index);\n }\n\n /** Update the computed properties on the `CdkVirtualForOfContext`. */\n private _updateComputedContextProperties(context: CdkVirtualForOfContext<any>) {\n context.first = context.index === 0;\n context.last = context.index === context.count - 1;\n context.even = context.index % 2 === 0;\n context.odd = !context.even;\n }\n\n /** Creates a new embedded view and moves it to the given index */\n private _createEmbeddedViewAt(index: number): EmbeddedViewRef<CdkVirtualForOfContext<T>> {\n // Note that it's important that we insert the item directly at the proper index,\n // rather than inserting it and the moving it in place, because if there's a directive\n // on the same node that injects the `ViewContainerRef`, Angular will insert another\n // comment node which can throw off the move when it's being repeated for all items.\n return this._viewContainerRef.createEmbeddedView(this._template, {\n $implicit: null!,\n cdkVirtualForOf: this._cdkVirtualForOf,\n index: -1,\n count: -1,\n first: false,\n last: false,\n odd: false,\n even: false\n }, index);\n }\n\n /** Inserts a recycled view from the cache at the given index. */\n private _insertViewFromCache(index: number): EmbeddedViewRef<CdkVirtualForOfContext<T>>|null {\n const cachedView = this._templateCache.pop();\n if (cachedView) {\n this._viewContainerRef.insert(cachedView, index);\n }\n return cachedView || null;\n }\n\n /** Detaches the embedded view at the given index. */\n private _detachView(index: number): EmbeddedViewRef<CdkVirtualForOfContext<T>> {\n return this._viewContainerRef.detach(index) as\n EmbeddedViewRef<CdkVirtualForOfContext<T>>;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directionality} from '@angular/cdk/bidi';\nimport {ListRange} from '@angular/cdk/collections';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n Inject,\n Input,\n NgZone,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {animationFrameScheduler, asapScheduler, Observable, Subject, Observer} from 'rxjs';\nimport {auditTime, startWith, takeUntil} from 'rxjs/operators';\nimport {ScrollDispatcher} from './scroll-dispatcher';\nimport {CdkScrollable, ExtendedScrollToOptions} from './scrollable';\nimport {CdkVirtualForOf} from './virtual-for-of';\nimport {VIRTUAL_SCROLL_STRATEGY, VirtualScrollStrategy} from './virtual-scroll-strategy';\n\n\n/** Checks if the given ranges are equal. */\nfunction rangesEqual(r1: ListRange, r2: ListRange): boolean {\n return r1.start == r2.start && r1.end == r2.end;\n}\n\n/**\n * Scheduler to be used for scroll events. Needs to fall back to\n * something that doesn't rely on requestAnimationFrame on environments\n * that don't support it (e.g. server-side rendering).\n */\nconst SCROLL_SCHEDULER =\n typeof requestAnimationFrame !== 'undefined' ? animationFrameScheduler : asapScheduler;\n\n\n/** A viewport that virtualizes it's scrolling with the help of `CdkVirtualForOf`. */\n@Component({\n moduleId: module.id,\n selector: 'cdk-virtual-scroll-viewport',\n templateUrl: 'virtual-scroll-viewport.html',\n styleUrls: ['virtual-scroll-viewport.css'],\n host: {\n 'class': 'cdk-virtual-scroll-viewport',\n '[class.cdk-virtual-scroll-orientation-horizontal]': 'orientation === \"horizontal\"',\n '[class.cdk-virtual-scroll-orientation-vertical]': 'orientation !== \"horizontal\"',\n },\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{\n provide: CdkScrollable,\n useExisting: CdkVirtualScrollViewport,\n }]\n})\nexport class CdkVirtualScrollViewport extends CdkScrollable implements OnInit, OnDestroy {\n /** Emits when the viewport is detached from a CdkVirtualForOf. */\n private _detachedSubject = new Subject<void>();\n\n /** Emits when the rendered range changes. */\n private _renderedRangeSubject = new Subject<ListRange>();\n\n /** The direction the viewport scrolls. */\n @Input() orientation: 'horizontal' | 'vertical' = 'vertical';\n\n // Note: we don't use the typical EventEmitter here because we need to subscribe to the scroll\n // strategy lazily (i.e. only if the user is actually listening to the events). We do this because\n // depending on how the strategy calculates the scrolled index, it may come at a cost to\n // performance.\n /** Emits when the index of the first element visible in the viewport changes. */\n @Output() scrolledIndexChange: Observable<number> =\n new Observable((observer: Observer<number>) =>\n this._scrollStrategy.scrolledIndexChange.subscribe(index =>\n Promise.resolve().then(() => this.ngZone.run(() => observer.next(index)))));\n\n /** The element that wraps the rendered content. */\n @ViewChild('contentWrapper', {static: true}) _contentWrapper: ElementRef<HTMLElement>;\n\n /** A stream that emits whenever the rendered range changes. */\n renderedRangeStream: Observable<ListRange> = this._renderedRangeSubject.asObservable();\n\n /**\n * The transform used to scale the spacer to the same size as all content, including content that\n * is not currently rendered.\n */\n _totalContentSizeTransform = '';\n\n /**\n * The total size of all content (in pixels), including content that is not currently rendered.\n */\n private _totalContentSize = 0;\n\n /**\n * The CSS transform applied to the rendered subset of items so that they appear within the bounds\n * of the visible viewport.\n */\n private _renderedContentTransform: string;\n\n /** The currently rendered range of indices. */\n private _renderedRange: ListRange = {start: 0, end: 0};\n\n /** The length of the data bound to this viewport (in number of items). */\n private _dataLength = 0;\n\n /** The size of the viewport (in pixels). */\n private _viewportSize = 0;\n\n /** the currently attached CdkVirtualForOf. */\n private _forOf: CdkVirtualForOf<any> | null;\n\n /** The last rendered content offset that was set. */\n private _renderedContentOffset = 0;\n\n /**\n * Whether the last rendered content offset was to the end of the content (and therefore needs to\n * be rewritten as an offset to the start of the content).\n */\n private _renderedContentOffsetNeedsRewrite = false;\n\n /** Whether there is a pending change detection cycle. */\n private _isChangeDetectionPending = false;\n\n /** A list of functions to run after the next change detection cycle. */\n private _runAfterChangeDetection: Function[] = [];\n\n constructor(public elementRef: ElementRef<HTMLElement>,\n private _changeDetectorRef: ChangeDetectorRef,\n ngZone: NgZone,\n @Optional() @Inject(VIRTUAL_SCROLL_STRATEGY)\n private _scrollStrategy: VirtualScrollStrategy,\n @Optional() dir: Directionality,\n scrollDispatcher: ScrollDispatcher) {\n super(elementRef, scrollDispatcher, ngZone, dir);\n\n if (!_scrollStrategy) {\n throw Error('Error: cdk-virtual-scroll-viewport requires the \"itemSize\" property to be set.');\n }\n }\n\n ngOnInit() {\n super.ngOnInit();\n\n // It's still too early to measure the viewport at this point. Deferring with a promise allows\n // the Viewport to be rendered with the correct size before we measure. We run this outside the\n // zone to avoid causing more change detection cycles. We handle the change detection loop\n // ourselves instead.\n this.ngZone.runOutsideAngular(() => Promise.resolve().then(() => {\n this._measureViewportSize();\n this._scrollStrategy.attach(this);\n\n this.elementScrolled()\n .pipe(\n // Start off with a fake scroll event so we properly detect our initial position.\n startWith(null!),\n // Collect multiple events into one until the next animation frame. This way if\n // there are multiple scroll events in the same frame we only need to recheck\n // our layout once.\n auditTime(0, SCROLL_SCHEDULER))\n .subscribe(() => this._scrollStrategy.onContentScrolled());\n\n this._markChangeDetectionNeeded();\n }));\n }\n\n ngOnDestroy() {\n this.detach();\n this._scrollStrategy.detach();\n\n // Complete all subjects\n this._renderedRangeSubject.complete();\n this._detachedSubject.complete();\n\n super.ngOnDestroy();\n }\n\n /** Attaches a `CdkVirtualForOf` to this viewport. */\n attach(forOf: CdkVirtualForOf<any>) {\n if (this._forOf) {\n throw Error('CdkVirtualScrollViewport is already attached.');\n }\n\n // Subscribe to the data stream of the CdkVirtualForOf to keep track of when the data length\n // changes. Run outside the zone to avoid triggering change detection, since we're managing the\n // change detection loop ourselves.\n this.ngZone.runOutsideAngular(() => {\n this._forOf = forOf;\n this._forOf.dataStream.pipe(takeUntil(this._detachedSubject)).subscribe(data => {\n const newLength = data.length;\n if (newLength !== this._dataLength) {\n this._dataLength = newLength;\n this._scrollStrategy.onDataLengthChanged();\n }\n this._doChangeDetection();\n });\n });\n }\n\n /** Detaches the current `CdkVirtualForOf`. */\n detach() {\n this._forOf = null;\n this._detachedSubject.next();\n }\n\n /** Gets the length of the data bound to this viewport (in number of items). */\n getDataLength(): number {\n return this._dataLength;\n }\n\n /** Gets the size of the viewport (in pixels). */\n getViewportSize(): number {\n return this._viewportSize;\n }\n\n // TODO(mmalerba): This is technically out of sync with what's really rendered until a render\n // cycle happens. I'm being careful to only call it after the render cycle is complete and before\n // setting it to something else, but its error prone and should probably be split into\n // `pendingRange` and `renderedRange`, the latter reflecting whats actually in the DOM.\n\n /** Get the current rendered range of items. */\n getRenderedRange(): ListRange {\n return this._renderedRange;\n }\n\n /**\n * Sets the total size of all content (in pixels), including content that is not currently\n * rendered.\n */\n setTotalContentSize(size: number) {\n if (this._totalContentSize !== size) {\n this._totalContentSize = size;\n const axis = this.orientation == 'horizontal' ? 'X' : 'Y';\n this._totalContentSizeTransform = `scale${axis}(${this._totalContentSize})`;\n this._markChangeDetectionNeeded();\n }\n }\n\n /** Sets the currently rendered range of indices. */\n setRenderedRange(range: ListRange) {\n if (!rangesEqual(this._renderedRange, range)) {\n this._renderedRangeSubject.next(this._renderedRange = range);\n this._markChangeDetectionNeeded(() => this._scrollStrategy.onContentRendered());\n }\n }\n\n /**\n * Gets the offset from the start of the viewport to the start of the rendered data (in pixels).\n */\n getOffsetToRenderedContentStart(): number | null {\n return this._renderedContentOffsetNeedsRewrite ? null : this._renderedContentOffset;\n }\n\n /**\n * Sets the offset from the start of the viewport to either the start or end of the rendered data\n * (in pixels).\n */\n setRenderedContentOffset(offset: number, to: 'to-start' | 'to-end' = 'to-start') {\n // For a horizontal viewport in a right-to-left language we need to translate along the x-axis\n // in the negative direction.\n const isRtl = this.dir && this.dir.value == 'rtl';\n const isHorizontal = this.orientation == 'horizontal';\n const axis = isHorizontal ? 'X' : 'Y';\n const axisDirection = isHorizontal && isRtl ? -1 : 1;\n let transform = `translate${axis}(${Number(axisDirection * offset)}px)`;\n this._renderedContentOffset = offset;\n if (to === 'to-end') {\n transform += ` translate${axis}(-100%)`;\n // The viewport should rewrite this as a `to-start` offset on the next render cycle. Otherwise\n // elements will appear to expand in the wrong direction (e.g. `mat-expansion-panel` would\n // expand upward).\n this._renderedContentOffsetNeedsRewrite = true;\n }\n if (this._renderedContentTransform != transform) {\n // We know this value is safe because we parse `offset` with `Number()` before passing it\n // into the string.\n this._renderedContentTransform = transform;\n this._markChangeDetectionNeeded(() => {\n if (this._renderedContentOffsetNeedsRewrite) {\n this._renderedContentOffset -= this.measureRenderedContentSize();\n this._renderedContentOffsetNeedsRewrite = false;\n this.setRenderedContentOffset(this._renderedContentOffset);\n } else {\n this._scrollStrategy.onRenderedOffsetChanged();\n }\n });\n }\n }\n\n /**\n * Scrolls to the given offset from the start of the viewport. Please note that this is not always\n * the same as setting `scrollTop` or `scrollLeft`. In a horizontal viewport with right-to-left\n * direction, this would be the equivalent of setting a fictional `scrollRight` property.\n * @param offset The offset to scroll to.\n * @param behavior The ScrollBehavior to use when scrolling. Default is behavior is `auto`.\n */\n scrollToOffset(offset: number, behavior: ScrollBehavior = 'auto') {\n const options: ExtendedScrollToOptions = {behavior};\n if (this.orientation === 'horizontal') {\n options.start = offset;\n } else {\n options.top = offset;\n }\n this.scrollTo(options);\n }\n\n /**\n * Scrolls to the offset for the given index.\n * @param index The index of the element to scroll to.\n * @param behavior The ScrollBehavior to use when scrolling. Default is behavior is `auto`.\n */\n scrollToIndex(index: number, behavior: ScrollBehavior = 'auto') {\n this._scrollStrategy.scrollToIndex(index, behavior);\n }\n\n /**\n * Gets the current scroll offset from the start of the viewport (in pixels).\n * @param from The edge to measure the offset from. Defaults to 'top' in vertical mode and 'start'\n * in horizontal mode.\n */\n measureScrollOffset(from?: 'top' | 'left' | 'right' | 'bottom' | 'start' | 'end'): number {\n return super.measureScrollOffset(\n from ? from : this.orientation === 'horizontal' ? 'start' : 'top');\n }\n\n /** Measure the combined size of all of the rendered items. */\n measureRenderedContentSize(): number {\n const contentEl = this._contentWrapper.nativeElement;\n return this.orientation === 'horizontal' ? contentEl.offsetWidth : contentEl.offsetHeight;\n }\n\n /**\n * Measure the total combined size of the given range. Throws if the range includes items that are\n * not rendered.\n */\n measureRangeSize(range: ListRange): number {\n if (!this._forOf) {\n return 0;\n }\n return this._forOf.measureRangeSize(range, this.orientation);\n }\n\n /** Update the viewport dimensions and re-render. */\n checkViewportSize() {\n // TODO: Cleanup later when add logic for handling content resize\n this._measureViewportSize();\n this._scrollStrategy.onDataLengthChanged();\n }\n\n /** Measure the viewport size. */\n private _measureViewportSize() {\n const viewportEl = this.elementRef.nativeElement;\n this._viewportSize = this.orientation === 'horizontal' ?\n viewportEl.clientWidth : viewportEl.clientHeight;\n }\n\n /** Queue up change detection to run. */\n private _markChangeDetectionNeeded(runAfter?: Function) {\n if (runAfter) {\n this._runAfterChangeDetection.push(runAfter);\n }\n\n // Use a Promise to batch together calls to `_doChangeDetection`. This way if we set a bunch of\n // properties sequentially we only have to run `_doChangeDetection` once at the end.\n if (!this._isChangeDetectionPending) {\n this._isChangeDetectionPending = true;\n this.ngZone.runOutsideAngular(() => Promise.resolve().then(() => {\n this._doChangeDetection();\n }));\n }\n }\n\n /** Run change detection. */\n private _doChangeDetection() {\n this._isChangeDetectionPending = false;\n\n // Apply changes to Angular bindings. Note: We must call `markForCheck` to run change detection\n // from the root, since the repeated items are content projected in. Calling `detectChanges`\n // instead does not properly check the projected content.\n this.ngZone.run(() => this._changeDetectorRef.markForCheck());\n // Apply the content transform. The transform can't be set via an Angular binding because\n // bypassSecurityTrustStyle is banned in Google. However the value is safe, it's composed of\n // string literals, a variable that can only be 'X' or 'Y', and user input that is run through\n // the `Number` function first to coerce it to a numeric value.\n this._contentWrapper.nativeElement.style.transform = this._renderedContentTransform;\n\n const runAfterChangeDetection = this._runAfterChangeDetection;\n this._runAfterChangeDetection = [];\n for (const fn of runAfterChangeDetection) {\n fn();\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Directionality} from '@angular/cdk/bidi';\nimport {\n getRtlScrollAxisType,\n RtlScrollAxisType,\n supportsScrollBehavior\n} from '@angular/cdk/platform';\nimport {Directive, ElementRef, NgZone, OnDestroy, OnInit, Optional} from '@angular/core';\nimport {fromEvent, Observable, Subject, Observer} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\nimport {ScrollDispatcher} from './scroll-dispatcher';\n\nexport type _Without<T> = {[P in keyof T]?: never};\nexport type _XOR<T, U> = (_Without<T> & U) | (_Without<U> & T);\nexport type _Top = {top?: number};\nexport type _Bottom = {bottom?: number};\nexport type _Left = {left?: number};\nexport type _Right = {right?: number};\nexport type _Start = {start?: number};\nexport type _End = {end?: number};\nexport type _XAxis = _XOR<_XOR<_Left, _Right>, _XOR<_Start, _End>>;\nexport type _YAxis = _XOR<_Top, _Bottom>;\n\n/**\n * An extended version of ScrollToOptions that allows expressing scroll offsets relative to the\n * top, bottom, left, right, start, or end of the viewport rather than just the top and left.\n * Please note: the top and bottom properties are mutually exclusive, as are the left, right,\n * start, and end properties.\n */\nexport type ExtendedScrollToOptions = _XAxis & _YAxis & ScrollOptions;\n\n/**\n * Sends an event when the directive's element is scrolled. Registers itself with the\n * ScrollDispatcher service to include itself as part of its collection of scrolling events that it\n * can be listened to through the service.\n */\n@Directive({\n selector: '[cdk-scrollable], [cdkScrollable]'\n})\nexport class CdkScrollable implements OnInit, OnDestroy {\n private _destroyed = new Subject();\n\n private _elementScrolled: Observable<Event> = new Observable((observer: Observer<Event>) =>\n this.ngZone.runOutsideAngular(() =>\n fromEvent(this.elementRef.nativeElement, 'scroll').pipe(takeUntil(this._destroyed))\n .subscribe(observer)));\n\n constructor(protected elementRef: ElementRef<HTMLElement>,\n protected scrollDispatcher: ScrollDispatcher,\n protected ngZone: NgZone,\n @Optional() protected dir?: Directionality) {}\n\n ngOnInit() {\n this.scrollDispatcher.register(this);\n }\n\n ngOnDestroy() {\n this.scrollDispatcher.deregister(this);\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n /** Returns observable that emits when a scroll event is fired on the host element. */\n elementScrolled(): Observable<Event> {\n return this._elementScrolled;\n }\n\n /** Gets the ElementRef for the viewport. */\n getElementRef(): ElementRef<HTMLElement> {\n return this.elementRef;\n }\n\n /**\n * Scrolls to the specified offsets. This is a normalized version of the browser's native scrollTo\n * method, since browsers are not consistent about what scrollLeft means in RTL. For this method\n * left and right always refer to the left and right side of the scrolling container irrespective\n * of the layout direction. start and end refer to left and right in an LTR context and vice-versa\n * in an RTL context.\n * @param options specified the offsets to scroll to.\n */\n scrollTo(options: ExtendedScrollToOptions): void {\n const el = this.elementRef.nativeElement;\n const isRtl = this.dir && this.dir.value == 'rtl';\n\n // Rewrite start & end offsets as right or left offsets.\n options.left = options.left == null ? (isRtl ? options.end : options.start) : options.left;\n options.right = options.right == null ? (isRtl ? options.start : options.end) : options.right;\n\n // Rewrite the bottom offset as a top offset.\n if (options.bottom != null) {\n (options as _Without<_Bottom> & _Top).top =\n el.scrollHeight - el.clientHeight - options.bottom;\n }\n\n // Rewrite the right offset as a left offset.\n if (isRtl && getRtlScrollAxisType() != RtlScrollAxisType.NORMAL) {\n if (options.left != null) {\n (options as _Without<_Left> & _Right).right =\n el.scrollWidth - el.clientWidth - options.left;\n }\n\n if (getRtlScrollAxisType() == RtlScrollAxisType.INVERTED) {\n options.left = options.right;\n } else if (getRtlScrollAxisType() == RtlScrollAxisType.NEGATED) {\n options.left = options.right ? -options.right : options.right;\n }\n } else {\n if (options.right != null) {\n (options as _Without<_Right> & _Left).left =\n el.scrollWidth - el.clientWidth - options.right;\n }\n }\n\n this._applyScrollToOptions(options);\n }\n\n private _applyScrollToOptions(options: ScrollToOptions): void {\n const el = this.elementRef.nativeElement;\n\n if (supportsScrollBehavior()) {\n el.scrollTo(options);\n } else {\n if (options.top != null) {\n el.scrollTop = options.top;\n }\n if (options.left != null) {\n el.scrollLeft = options.left;\n }\n }\n }\n\n /**\n * Measures the scroll offset relative to the specified edge of the viewport. This method can be\n * used instead of directly checking scrollLeft or scrollTop, since browsers are not consistent\n * about what scrollLeft means in RTL. The values returned by this method are normalized such that\n * left and right always refer to the left and right side of the scrolling container irrespective\n * of the layout direction. start and end refer to left and right in an LTR context and vice-versa\n * in an RTL context.\n * @param from The edge to measure from.\n */\n measureScrollOffset(from: 'top' | 'left' | 'right' | 'bottom' | 'start' | 'end'): number {\n const LEFT = 'left';\n const RIGHT = 'right';\n const el = this.elementRef.nativeElement;\n if (from == 'top') {\n return el.scrollTop;\n }\n if (from == 'bottom') {\n return el.scrollHeight - el.clientHeight - el.scrollTop;\n }\n\n // Rewrite start & end as left or right offsets.\n const isRtl = this.dir && this.dir.value == 'rtl';\n if (from == 'start') {\n from = isRtl ? RIGHT : LEFT;\n } else if (from == 'end') {\n from = isRtl ? LEFT : RIGHT;\n }\n\n if (isRtl && getRtlScrollAxisType() == RtlScrollAxisType.INVERTED) {\n // For INVERTED, scrollLeft is (scrollWidth - clientWidth) when scrolled all the way left and\n // 0 when scrolled all the way right.\n if (from == LEFT) {\n return el.scrollWidth - el.clientWidth - el.scrollLeft;\n } else {\n return el.scrollLeft;\n }\n } else if (isRtl && getRtlScrollAxisType() == RtlScrollAxisType.NEGATED) {\n // For NEGATED, scrollLeft is -(scrollWidth - clientWidth) when scrolled all the way left and\n // 0 when scrolled all the way right.\n if (from == LEFT) {\n return el.scrollLeft + el.scrollWidth - el.clientWidth;\n } else {\n return -el.scrollLeft;\n }\n } else {\n // For NORMAL, as well as non-RTL contexts, scrollLeft is 0 when scrolled all the way left and\n // (scrollWidth - clientWidth) when scrolled all the way right.\n if (from == LEFT) {\n return el.scrollLeft;\n } else {\n return el.scrollWidth - el.clientWidth - el.scrollLeft;\n }\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {Platform} from '@angular/cdk/platform';\nimport {\n ElementRef,\n Injectable,\n NgZone,\n OnDestroy,\n Optional,\n SkipSelf,\n} from '@angular/core';\nimport {fromEvent, of as observableOf, Subject, Subscription, Observable, Observer} from 'rxjs';\nimport {auditTime, filter} from 'rxjs/operators';\nimport {CdkScrollable} from './scrollable';\n\n\n/** Time in ms to throttle the scrolling events by default. */\nexport const DEFAULT_SCROLL_TIME = 20;\n\n/**\n * Service contained all registered Scrollable references and emits an event when any one of the\n * Scrollable references emit a scrolled event.\n */\n@Injectable({providedIn: 'root'})\nexport class ScrollDispatcher implements OnDestroy {\n constructor(private _ngZone: NgZone, private _platform: Platform) { }\n\n /** Subject for notifying that a registered scrollable reference element has been scrolled. */\n private _scrolled = new Subject<CdkScrollable|void>();\n\n /** Keeps track of the global `scroll` and `resize` subscriptions. */\n _globalSubscription: Subscription | null = null;\n\n /** Keeps track of the amount of subscriptions to `scrolled`. Used for cleaning up afterwards. */\n private _scrolledCount = 0;\n\n /**\n * Map of all the scrollable references that are registered with the service and their\n * scroll event subscriptions.\n */\n scrollContainers: Map<CdkScrollable, Subscription> = new Map();\n\n /**\n * Registers a scrollable instance with the service and listens for its scrolled events. When the\n * scrollable is scrolled, the service emits the event to its scrolled observable.\n * @param scrollable Scrollable instance to be registered.\n */\n register(scrollable: CdkScrollable): void {\n if (!this.scrollContainers.has(scrollable)) {\n this.scrollContainers.set(scrollable, scrollable.elementScrolled()\n .subscribe(() => this._scrolled.next(scrollable)));\n }\n }\n\n /**\n * Deregisters a Scrollable reference and unsubscribes from its scroll event observable.\n * @param scrollable Scrollable instance to be deregistered.\n */\n deregister(scrollable: CdkScrollable): void {\n const scrollableReference = this.scrollContainers.get(scrollable);\n\n if (scrollableReference) {\n scrollableReference.unsubscribe();\n this.scrollContainers.delete(scrollable);\n }\n }\n\n /**\n * Returns an observable that emits an event whenever any of the registered Scrollable\n * references (or window, document, or body) fire a scrolled event. Can provide a time in ms\n * to override the default \"throttle\" time.\n *\n * **Note:** in order to avoid hitting change detection for every scroll event,\n * all of the events emitted from this stream will be run outside the Angular zone.\n * If you need to update any data bindings as a result of a scroll event, you have\n * to run the callback using `NgZone.run`.\n */\n scrolled(auditTimeInMs: number = DEFAULT_SCROLL_TIME): Observable<CdkScrollable|void> {\n if (!this._platform.isBrowser) {\n return observableOf<void>();\n }\n\n return new Observable((observer: Observer<CdkScrollable|void>) => {\n if (!this._globalSubscription) {\n this._addGlobalListener();\n }\n\n // In the case of a 0ms delay, use an observable without auditTime\n // since it does add a perceptible delay in processing overhead.\n const subscription = auditTimeInMs > 0 ?\n this._scrolled.pipe(auditTime(auditTimeInMs)).subscribe(observer) :\n this._scrolled.subscribe(observer);\n\n this._scrolledCount++;\n\n return () => {\n subscription.unsubscribe();\n this._scrolledCount--;\n\n if (!this._scrolledCount) {\n this._removeGlobalListener();\n }\n };\n });\n }\n\n ngOnDestroy() {\n this._removeGlobalListener();\n this.scrollContainers.forEach((_, container) => this.deregister(container));\n this._scrolled.complete();\n }\n\n /**\n * Returns an observable that emits whenever any of the\n * scrollable ancestors of an element are scrolled.\n * @param elementRef Element whose ancestors to listen for.\n * @param auditTimeInMs Time to throttle the scroll events.\n */\n ancestorScrolled(elementRef: ElementRef, auditTimeInMs?: number): Observable<CdkScrollable|void> {\n const ancestors = this.getAncestorScrollContainers(elementRef);\n\n return this.scrolled(auditTimeInMs).pipe(filter(target => {\n return !target || ancestors.indexOf(target) > -1;\n }));\n }\n\n /** Returns all registered Scrollables that contain the provided element. */\n getAncestorScrollContainers(elementRef: ElementRef): CdkScrollable[] {\n const scrollingContainers: CdkScrollable[] = [];\n\n this.scrollContainers.forEach((_subscription: Subscription, scrollable: CdkScrollable) => {\n if (this._scrollableContainsElement(scrollable, elementRef)) {\n scrollingContainers.push(scrollable);\n }\n });\n\n return scrollingContainers;\n }\n\n /** Returns true if the element is contained within the provided Scrollable. */\n private _scrollableContainsElement(scrollable: CdkScrollable, elementRef: ElementRef): boolean {\n let element: HTMLElement | null = elementRef.nativeElement;\n let scrollableElement = scrollable.getElementRef().nativeElement;\n\n // Traverse through the element parents until we reach null, checking if any of the elements\n // are the scrollable's element.\n do {\n if (element == scrollableElement) { return true; }\n } while (element = element!.parentElement);\n\n return false;\n }\n\n /** Sets up the global scroll listeners. */\n private _addGlobalListener() {\n this._globalSubscription = this._ngZone.runOutsideAngular(() => {\n return fromEvent(window.document, 'scroll').subscribe(() => this._scrolled.next());\n });\n }\n\n /** Cleans up the global scroll listener. */\n private _removeGlobalListener() {\n if (this._globalSubscription) {\n this._globalSubscription.unsubscribe();\n this._globalSubscription = null;\n }\n }\n}\n\n\n/** @docs-private @deprecated @breaking-change 8.0.0 */\nexport function SCROLL_DISPATCHER_PROVIDER_FACTORY(\n parentDispatcher: ScrollDispatcher, ngZone: NgZone, platform: Platform) {\n return parentDispatcher || new ScrollDispatcher(ngZone, platform);\n}\n\n/** @docs-private @deprecated @breaking-change 8.0.0 */\nexport const SCROLL_DISPATCHER_PROVIDER = {\n // If there is already a ScrollDispatcher available, use that. Otherwise, provide a new one.\n provide: ScrollDispatcher,\n deps: [[new Optional(), new SkipSelf(), ScrollDispatcher], NgZone, Platform],\n useFactory: SCROLL_DISPATCHER_PROVIDER_FACTORY\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {coerceNumberProperty} from '@angular/cdk/coercion';\nimport {Directive, forwardRef, Input, OnChanges} from '@angular/core';\nimport {Observable, Subject} from 'rxjs';\nimport {distinctUntilChanged} from 'rxjs/operators';\nimport {VIRTUAL_SCROLL_STRATEGY, VirtualScrollStrategy} from './virtual-scroll-strategy';\nimport {CdkVirtualScrollViewport} from './virtual-scroll-viewport';\n\n\n/** Virtual scrolling strategy for lists with items of known fixed size. */\nexport class FixedSizeVirtualScrollStrategy implements VirtualScrollStrategy {\n private _scrolledIndexChange = new Subject<number>();\n\n /** @docs-private Implemented as part of VirtualScrollStrategy. */\n scrolledIndexChange: Observable<number> = this._scrolledIndexChange.pipe(distinctUntilChanged());\n\n /** The attached viewport. */\n private _viewport: CdkVirtualScrollViewport | null = null;\n\n /** The size of the items in the virtually scrolling list. */\n private _itemSize: number;\n\n /** The minimum amount of buffer rendered beyond the viewport (in pixels). */\n private _minBufferPx: number;\n\n /** The number of buffer items to render beyond the edge of the viewport (in pixels). */\n private _maxBufferPx: number;\n\n /**\n * @param itemSize The size of the items in the virtually scrolling list.\n * @param minBufferPx The minimum amount of buffer (in pixels) before needing to render more\n * @param maxBufferPx The amount of buffer (in pixels) to render when rendering more.\n */\n constructor(itemSize: number, minBufferPx: number, maxBufferPx: number) {\n this._itemSize = itemSize;\n this._minBufferPx = minBufferPx;\n this._maxBufferPx = maxBufferPx;\n }\n\n /**\n * Attaches this scroll strategy to a viewport.\n * @param viewport The viewport to attach this strategy to.\n */\n attach(viewport: CdkVirtualScrollViewport) {\n this._viewport = viewport;\n this._updateTotalContentSize();\n this._updateRenderedRange();\n }\n\n /** Detaches this scroll strategy from the currently attached viewport. */\n detach() {\n this._scrolledIndexChange.complete();\n this._viewport = null;\n }\n\n /**\n * Update the item size and buffer size.\n * @param itemSize The size of the items in the virtually scrolling list.\n * @param minBufferPx The minimum amount of buffer (in pixels) before needing to render more\n * @param maxBufferPx The amount of buffer (in pixels) to render when rendering more.\n */\n updateItemAndBufferSize(itemSize: number, minBufferPx: number, maxBufferPx: number) {\n if (maxBufferPx < minBufferPx) {\n throw Error('CDK virtual scroll: maxBufferPx must be greater than or equal to minBufferPx');\n }\n this._itemSize = itemSize;\n this._minBufferPx = minBufferPx;\n this._maxBufferPx = maxBufferPx;\n this._updateTotalContentSize();\n this._updateRenderedRange();\n }\n\n /** @docs-private Implemented as part of VirtualScrollStrategy. */\n onContentScrolled() {\n this._updateRenderedRange();\n }\n\n /** @docs-private Implemented as part of VirtualScrollStrategy. */\n onDataLengthChanged() {\n this._updateTotalContentSize();\n this._updateRenderedRange();\n }\n\n /** @docs-private Implemented as part of VirtualScrollStrategy. */\n onContentRendered() { /* no-op */ }\n\n /** @docs-private Implemented as part of VirtualScrollStrategy. */\n onRenderedOffsetChanged() { /* no-op */ }\n\n /**\n * Scroll to the offset for the given index.\n * @param index The index of the element to scroll to.\n * @param behavior The ScrollBehavior to use when scrolling.\n */\n scrollToIndex(index: number, behavior: ScrollBehavior): void {\n if (this._viewport) {\n this._viewport.scrollToOffset(index * this._itemSize, behavior);\n }\n }\n\n /** Update the viewport's total content size. */\n private _updateTotalContentSize() {\n if (!this._viewport) {\n return;\n }\n\n this._viewport.setTotalContentSize(this._viewport.getDataLength() * this._itemSize);\n }\n\n /** Update the viewport's rendered range. */\n private _updateRenderedRange() {\n if (!this._viewport) {\n return;\n }\n\n const scrollOffset = this._viewport.measureScrollOffset();\n const firstVisibleIndex = scrollOffset / this._itemSize;\n const renderedRange = this._viewport.getRenderedRange();\n const newRange = {start: renderedRange.start, end: renderedRange.end};\n const viewportSize = this._viewport.getViewportSize();\n const dataLength = this._viewport.getDataLength();\n\n const startBuffer = scrollOffset - newRange.start * this._itemSize;\n if (startBuffer < this._minBufferPx && newRange.start != 0) {\n const expandStart = Math.ceil((this._maxBufferPx - startBuffer) / this._itemSize);\n newRange.start = Math.max(0, newRange.start - expandStart);\n newRange.end = Math.min(dataLength,\n Math.ceil(firstVisibleIndex + (viewportSize + this._minBufferPx) / this._itemSize));\n } else {\n const endBuffer = newRange.end * this._itemSize - (scrollOffset + viewportSize);\n if (endBuffer < this._minBufferPx && newRange.end != dataLength) {\n const expandEnd = Math.ceil((this._maxBufferPx - endBuffer) / this._itemSize);\n if (expandEnd > 0) {\n newRange.end = Math.min(dataLength, newRange.end + expandEnd);\n newRange.start = Math.max(0,\n Math.floor(firstVisibleIndex - this._minBufferPx / this._itemSize));\n }\n }\n }\n\n this._viewport.setRenderedRange(newRange);\n this._viewport.setRenderedContentOffset(this._itemSize * newRange.start);\n this._scrolledIndexChange.next(Math.floor(firstVisibleIndex));\n }\n}\n\n\n/**\n * Provider factory for `FixedSizeVirtualScrollStrategy` that simply extracts the already created\n * `FixedSizeVirtualScrollStrategy` from the given directive.\n * @param fixedSizeDir The instance of `CdkFixedSizeVirtualScroll` to extract the\n * `FixedSizeVirtualScrollStrategy` from.\n */\nexport function _fixedSizeVirtualScrollStrategyFactory(fixedSizeDir: CdkFixedSizeVirtualScroll) {\n return fixedSizeDir._scrollStrategy;\n}\n\n\n/** A virtual scroll strategy that supports fixed-size items. */\n@Directive({\n selector: 'cdk-virtual-scroll-viewport[itemSize]',\n providers: [{\n provide: VIRTUAL_SCROLL_STRATEGY,\n useFactory: _fixedSizeVirtualScrollStrategyFactory,\n deps: [forwardRef(() => CdkFixedSizeVirtualScroll)],\n }],\n})\nexport class CdkFixedSizeVirtualScroll implements OnChanges {\n /** The size of the items in the list (in pixels). */\n @Input()\n get itemSize(): number { return this._itemSize; }\n set itemSize(value: number) { this._itemSize = coerceNumberProperty(value); }\n _itemSize = 20;\n\n /**\n * The minimum amount of buffer rendered beyond the viewport (in pixels).\n * If the amount of buffer dips below this number, more items will be rendered. Defaults to 100px.\n */\n @Input()\n get minBufferPx(): number { return this._minBufferPx; }\n set minBufferPx(value: number) { this._minBufferPx = coerceNumberProperty(value); }\n _minBufferPx = 100;\n\n /**\n * The number of pixels worth of buffer to render for when rendering new items. Defaults to 200px.\n */\n @Input()\n get maxBufferPx(): number { return this._maxBufferPx; }\n set maxBufferPx(value: number) { this._maxBufferPx = coerceNumberProperty(value); }\n _maxBufferPx = 200;\n\n /** The scroll strategy used by this directive. */\n _scrollStrategy =\n new FixedSizeVirtualScrollStrategy(this.itemSize, this.minBufferPx, this.maxBufferPx);\n\n ngOnChanges() {\n this._scrollStrategy.updateItemAndBufferSize(this.itemSize, this.minBufferPx, this.maxBufferPx);\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {InjectionToken} from '@angular/core';\nimport {Observable} from 'rxjs';\nimport {CdkVirtualScrollViewport} from './virtual-scroll-viewport';\n\n\n/** The injection token used to specify the virtual scrolling strategy. */\nexport const VIRTUAL_SCROLL_STRATEGY =\n new InjectionToken<VirtualScrollStrategy>('VIRTUAL_SCROLL_STRATEGY');\n\n\n/** A strategy that dictates which items should be rendered in the viewport. */\nexport interface VirtualScrollStrategy {\n /** Emits when the index of the first element visible in the viewport changes. */\n scrolledIndexChange: Observable<number>;\n\n /**\n * Attaches this scroll strategy to a viewport.\n * @param viewport The viewport to attach this strategy to.\n */\n attach(viewport: CdkVirtualScrollViewport): void;\n\n /** Detaches this scroll strategy from the currently attached viewport. */\n detach(): void;\n\n /** Called when the viewport is scrolled (debounced using requestAnimationFrame). */\n onContentScrolled(): void;\n\n /** Called when the length of the data changes. */\n onDataLengthChanged(): void;\n\n /** Called when the range of items rendered in the DOM has changed. */\n onContentRendered(): void;\n\n /** Called when the offset of the rendered items changed. */\n onRenderedOffsetChanged(): void;\n\n /**\n * Scroll to the offset for the given index.\n * @param index The index of the element to scroll to.\n * @param behavior The ScrollBehavior to use when scrolling.\n */\n scrollToIndex(index: number, behavior: ScrollBehavior): void;\n}\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n"],"names":["Optional","SkipSelf","Platform","NgZone","platform","Injectable","auditTime","observableOf","merge","fromEvent","NgModule","BidiModule","PlatformModule","Input","IterableDiffers","TemplateRef","ViewContainerRef","Directive","ArrayDataSource","Observable","isDataSource","takeUntil","Subject","shareReplay","switchMap","pairwise","startWith","ViewChild","Directionality","Inject","ChangeDetectionStrategy","ViewEncapsulation","Component","tslib_1.__extends","animationFrameScheduler","asapScheduler","ElementRef","getRtlScrollAxisType","RtlScrollAxisType","supportsScrollBehavior","filter","forwardRef","coerceNumberProperty","distinctUntilChanged","InjectionToken"],"mappings":";;;;;;;;;;;;;AQAA;;;;;;;;;;;;;;;;AAgBA,IAAI,aAAa,GAAG,SAAS,CAAC,EAAE,CAAC,EAAE;IAC/B,aAAa,GAAG,MAAM,CAAC,cAA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