{"version":3,"file":"table.mjs","sources":["../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk/table/tokens.ts","../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk/table/cell.ts","../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk/table/coalesced-style-scheduler.ts","../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk/table/row.ts","../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk/table/sticky-styler.ts","../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk/table/table-errors.ts","../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk/table/sticky-position-listener.ts","../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk/table/table.ts","../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk/table/text-column.ts","../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk/table/table-module.ts","../../../../../k8-fastbuild-ST-46c76129e412/bin/src/cdk/table/can-stick.ts"],"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.dev/license\n */\n\nimport {InjectionToken} from '@angular/core';\n\n/**\n * Used to provide a table to some of the sub-components without causing a circular dependency.\n * @docs-private\n */\nexport const CDK_TABLE = new InjectionToken<any>('CDK_TABLE');\n\n/** Configurable options for `CdkTextColumn`. */\nexport interface TextColumnOptions<T> {\n  /**\n   * Default function that provides the header text based on the column name if a header\n   * text is not provided.\n   */\n  defaultHeaderTextTransform?: (name: string) => string;\n\n  /** Default data accessor to use if one is not provided. */\n  defaultDataAccessor?: (data: T, name: string) => string;\n}\n\n/** Injection token that can be used to specify the text column options. */\nexport const TEXT_COLUMN_OPTIONS = new InjectionToken<TextColumnOptions<any>>(\n  'text-column-options',\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.dev/license\n */\n\nimport {\n  ContentChild,\n  Directive,\n  ElementRef,\n  Input,\n  TemplateRef,\n  booleanAttribute,\n  inject,\n} from '@angular/core';\nimport {CanStick} from './can-stick';\nimport {CDK_TABLE} from './tokens';\n\n/** Base interface for a cell definition. Captures a column's cell template definition. */\nexport interface CellDef {\n  template: TemplateRef<any>;\n}\n\n/**\n * Cell definition for a CDK table.\n * Captures the template of a column's data row cell as well as cell-specific properties.\n */\n@Directive({\n  selector: '[cdkCellDef]',\n})\nexport class CdkCellDef implements CellDef {\n  /** @docs-private */\n  template = inject<TemplateRef<any>>(TemplateRef);\n\n  constructor(...args: unknown[]);\n  constructor() {}\n}\n\n/**\n * Header cell definition for a CDK table.\n * Captures the template of a column's header cell and as well as cell-specific properties.\n */\n@Directive({\n  selector: '[cdkHeaderCellDef]',\n})\nexport class CdkHeaderCellDef implements CellDef {\n  /** @docs-private */\n  template = inject<TemplateRef<any>>(TemplateRef);\n\n  constructor(...args: unknown[]);\n  constructor() {}\n}\n\n/**\n * Footer cell definition for a CDK table.\n * Captures the template of a column's footer cell and as well as cell-specific properties.\n */\n@Directive({\n  selector: '[cdkFooterCellDef]',\n})\nexport class CdkFooterCellDef implements CellDef {\n  /** @docs-private */\n  template = inject<TemplateRef<any>>(TemplateRef);\n\n  constructor(...args: unknown[]);\n  constructor() {}\n}\n\n/**\n * Column definition for the CDK table.\n * Defines a set of cells available for a table column.\n */\n@Directive({\n  selector: '[cdkColumnDef]',\n  providers: [{provide: 'MAT_SORT_HEADER_COLUMN_DEF', useExisting: CdkColumnDef}],\n})\nexport class CdkColumnDef implements CanStick {\n  _table? = inject(CDK_TABLE, {optional: true});\n\n  private _hasStickyChanged = false;\n\n  /** Unique name for this column. */\n  @Input('cdkColumnDef')\n  get name(): string {\n    return this._name;\n  }\n  set name(name: string) {\n    this._setNameInput(name);\n  }\n  protected _name: string;\n\n  /** Whether the cell is sticky. */\n  @Input({transform: booleanAttribute})\n  get sticky(): boolean {\n    return this._sticky;\n  }\n  set sticky(value: boolean) {\n    if (value !== this._sticky) {\n      this._sticky = value;\n      this._hasStickyChanged = true;\n    }\n  }\n  private _sticky = false;\n\n  /**\n   * Whether this column should be sticky positioned on the end of the row. Should make sure\n   * that it mimics the `CanStick` mixin such that `_hasStickyChanged` is set to true if the value\n   * has been changed.\n   */\n  @Input({transform: booleanAttribute})\n  get stickyEnd(): boolean {\n    return this._stickyEnd;\n  }\n  set stickyEnd(value: boolean) {\n    if (value !== this._stickyEnd) {\n      this._stickyEnd = value;\n      this._hasStickyChanged = true;\n    }\n  }\n  _stickyEnd: boolean = false;\n\n  /** @docs-private */\n  @ContentChild(CdkCellDef) cell: CdkCellDef;\n\n  /** @docs-private */\n  @ContentChild(CdkHeaderCellDef) headerCell: CdkHeaderCellDef;\n\n  /** @docs-private */\n  @ContentChild(CdkFooterCellDef) footerCell: CdkFooterCellDef;\n\n  /**\n   * Transformed version of the column name that can be used as part of a CSS classname. Excludes\n   * all non-alphanumeric characters and the special characters '-' and '_'. Any characters that\n   * do not match are replaced by the '-' character.\n   */\n  cssClassFriendlyName: string;\n\n  /**\n   * Class name for cells in this column.\n   * @docs-private\n   */\n  _columnCssClassName: string[];\n\n  constructor(...args: unknown[]);\n  constructor() {}\n\n  /** Whether the sticky state has changed. */\n  hasStickyChanged(): boolean {\n    const hasStickyChanged = this._hasStickyChanged;\n    this.resetStickyChanged();\n    return hasStickyChanged;\n  }\n\n  /** Resets the sticky changed state. */\n  resetStickyChanged(): void {\n    this._hasStickyChanged = false;\n  }\n\n  /**\n   * Overridable method that sets the css classes that will be added to every cell in this\n   * column.\n   * In the future, columnCssClassName will change from type string[] to string and this\n   * will set a single string value.\n   * @docs-private\n   */\n  protected _updateColumnCssClassName() {\n    this._columnCssClassName = [`cdk-column-${this.cssClassFriendlyName}`];\n  }\n\n  /**\n   * This has been extracted to a util because of TS 4 and VE.\n   * View Engine doesn't support property rename inheritance.\n   * TS 4.0 doesn't allow properties to override accessors or vice-versa.\n   * @docs-private\n   */\n  protected _setNameInput(value: string) {\n    // If the directive is set without a name (updated programmatically), then this setter will\n    // trigger with an empty string and should not overwrite the programmatically set value.\n    if (value) {\n      this._name = value;\n      this.cssClassFriendlyName = value.replace(/[^a-z0-9_-]/gi, '-');\n      this._updateColumnCssClassName();\n    }\n  }\n}\n\n/** Base class for the cells. Adds a CSS classname that identifies the column it renders in. */\nexport class BaseCdkCell {\n  constructor(columnDef: CdkColumnDef, elementRef: ElementRef) {\n    elementRef.nativeElement.classList.add(...columnDef._columnCssClassName);\n  }\n}\n\n/** Header cell template container that adds the right classes and role. */\n@Directive({\n  selector: 'cdk-header-cell, th[cdk-header-cell]',\n  host: {\n    'class': 'cdk-header-cell',\n    'role': 'columnheader',\n  },\n})\nexport class CdkHeaderCell extends BaseCdkCell {\n  constructor(...args: unknown[]);\n\n  constructor() {\n    super(inject(CdkColumnDef), inject(ElementRef));\n  }\n}\n\n/** Footer cell template container that adds the right classes and role. */\n@Directive({\n  selector: 'cdk-footer-cell, td[cdk-footer-cell]',\n  host: {\n    'class': 'cdk-footer-cell',\n  },\n})\nexport class CdkFooterCell extends BaseCdkCell {\n  constructor(...args: unknown[]);\n\n  constructor() {\n    const columnDef = inject(CdkColumnDef);\n    const elementRef = inject(ElementRef);\n\n    super(columnDef, elementRef);\n\n    const role = columnDef._table?._getCellRole();\n    if (role) {\n      elementRef.nativeElement.setAttribute('role', role);\n    }\n  }\n}\n\n/** Cell template container that adds the right classes and role. */\n@Directive({\n  selector: 'cdk-cell, td[cdk-cell]',\n  host: {\n    'class': 'cdk-cell',\n  },\n})\nexport class CdkCell extends BaseCdkCell {\n  constructor(...args: unknown[]);\n\n  constructor() {\n    const columnDef = inject(CdkColumnDef);\n    const elementRef = inject(ElementRef);\n\n    super(columnDef, elementRef);\n\n    const role = columnDef._table?._getCellRole();\n    if (role) {\n      elementRef.nativeElement.setAttribute('role', role);\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.dev/license\n */\n\nimport {Injectable, InjectionToken, NgZone, inject} from '@angular/core';\n\n/**\n * @docs-private\n */\nexport class _Schedule {\n  tasks: (() => unknown)[] = [];\n  endTasks: (() => unknown)[] = [];\n}\n\n/** Injection token used to provide a coalesced style scheduler. */\nexport const _COALESCED_STYLE_SCHEDULER = new InjectionToken<_CoalescedStyleScheduler>(\n  '_COALESCED_STYLE_SCHEDULER',\n);\n\n/**\n * Allows grouping up CSSDom mutations after the current execution context.\n * This can significantly improve performance when separate consecutive functions are\n * reading from the CSSDom and then mutating it.\n *\n * @docs-private\n */\n@Injectable()\nexport class _CoalescedStyleScheduler {\n  private _currentSchedule: _Schedule | null = null;\n  private _ngZone = inject(NgZone);\n\n  constructor(...args: unknown[]);\n  constructor() {}\n\n  /**\n   * Schedules the specified task to run at the end of the current VM turn.\n   */\n  schedule(task: () => unknown): void {\n    this._createScheduleIfNeeded();\n\n    this._currentSchedule!.tasks.push(task);\n  }\n\n  /**\n   * Schedules the specified task to run after other scheduled tasks at the end of the current\n   * VM turn.\n   */\n  scheduleEnd(task: () => unknown): void {\n    this._createScheduleIfNeeded();\n\n    this._currentSchedule!.endTasks.push(task);\n  }\n\n  private _createScheduleIfNeeded() {\n    if (this._currentSchedule) {\n      return;\n    }\n\n    this._currentSchedule = new _Schedule();\n\n    this._ngZone.runOutsideAngular(() =>\n      // TODO(mmalerba): Scheduling this using something that runs less frequently\n      //  (e.g. requestAnimationFrame, setTimeout, etc.) causes noticeable jank with the column\n      //  resizer. We should audit the usages of schedule / scheduleEnd in that component and see\n      //  if we can refactor it so that we don't need to flush the tasks quite so frequently.\n      queueMicrotask(() => {\n        while (this._currentSchedule!.tasks.length || this._currentSchedule!.endTasks.length) {\n          const schedule = this._currentSchedule!;\n\n          // Capture new tasks scheduled by the current set of tasks.\n          this._currentSchedule = new _Schedule();\n\n          for (const task of schedule.tasks) {\n            task();\n          }\n\n          for (const task of schedule.endTasks) {\n            task();\n          }\n        }\n\n        this._currentSchedule = null;\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.dev/license\n */\n\nimport {\n  ChangeDetectionStrategy,\n  Component,\n  Directive,\n  IterableChanges,\n  IterableDiffer,\n  IterableDiffers,\n  OnChanges,\n  OnDestroy,\n  SimpleChanges,\n  TemplateRef,\n  ViewContainerRef,\n  ViewEncapsulation,\n  Input,\n  booleanAttribute,\n  inject,\n} from '@angular/core';\nimport {CanStick} from './can-stick';\nimport {CdkCellDef, CdkColumnDef} from './cell';\nimport {CDK_TABLE} from './tokens';\n\n/**\n * The row template that can be used by the mat-table. Should not be used outside of the\n * material library.\n */\nexport const CDK_ROW_TEMPLATE = `<ng-container cdkCellOutlet></ng-container>`;\n\n/**\n * Base class for the CdkHeaderRowDef and CdkRowDef that handles checking their columns inputs\n * for changes and notifying the table.\n */\n@Directive()\nexport abstract class BaseRowDef implements OnChanges {\n  template = inject<TemplateRef<any>>(TemplateRef);\n  protected _differs = inject(IterableDiffers);\n\n  /** The columns to be displayed on this row. */\n  columns: Iterable<string>;\n\n  /** Differ used to check if any changes were made to the columns. */\n  protected _columnsDiffer: IterableDiffer<any>;\n\n  constructor(...args: unknown[]);\n  constructor() {}\n\n  ngOnChanges(changes: SimpleChanges): void {\n    // Create a new columns differ if one does not yet exist. Initialize it based on initial value\n    // of the columns property or an empty array if none is provided.\n    if (!this._columnsDiffer) {\n      const columns = (changes['columns'] && changes['columns'].currentValue) || [];\n      this._columnsDiffer = this._differs.find(columns).create();\n      this._columnsDiffer.diff(columns);\n    }\n  }\n\n  /**\n   * Returns the difference between the current columns and the columns from the last diff, or null\n   * if there is no difference.\n   */\n  getColumnsDiff(): IterableChanges<any> | null {\n    return this._columnsDiffer.diff(this.columns);\n  }\n\n  /** Gets this row def's relevant cell template from the provided column def. */\n  extractCellTemplate(column: CdkColumnDef): TemplateRef<any> {\n    if (this instanceof CdkHeaderRowDef) {\n      return column.headerCell.template;\n    }\n    if (this instanceof CdkFooterRowDef) {\n      return column.footerCell.template;\n    } else {\n      return column.cell.template;\n    }\n  }\n}\n\n/**\n * Header row definition for the CDK table.\n * Captures the header row's template and other header properties such as the columns to display.\n */\n@Directive({\n  selector: '[cdkHeaderRowDef]',\n  inputs: [{name: 'columns', alias: 'cdkHeaderRowDef'}],\n})\nexport class CdkHeaderRowDef extends BaseRowDef implements CanStick, OnChanges {\n  _table? = inject(CDK_TABLE, {optional: true});\n\n  private _hasStickyChanged = false;\n\n  /** Whether the row is sticky. */\n  @Input({alias: 'cdkHeaderRowDefSticky', transform: booleanAttribute})\n  get sticky(): boolean {\n    return this._sticky;\n  }\n  set sticky(value: boolean) {\n    if (value !== this._sticky) {\n      this._sticky = value;\n      this._hasStickyChanged = true;\n    }\n  }\n  private _sticky = false;\n\n  constructor(...args: unknown[]);\n\n  constructor() {\n    super(inject<TemplateRef<any>>(TemplateRef), inject(IterableDiffers));\n  }\n\n  // Prerender fails to recognize that ngOnChanges in a part of this class through inheritance.\n  // Explicitly define it so that the method is called as part of the Angular lifecycle.\n  override ngOnChanges(changes: SimpleChanges): void {\n    super.ngOnChanges(changes);\n  }\n\n  /** Whether the sticky state has changed. */\n  hasStickyChanged(): boolean {\n    const hasStickyChanged = this._hasStickyChanged;\n    this.resetStickyChanged();\n    return hasStickyChanged;\n  }\n\n  /** Resets the sticky changed state. */\n  resetStickyChanged(): void {\n    this._hasStickyChanged = false;\n  }\n}\n\n/**\n * Footer row definition for the CDK table.\n * Captures the footer row's template and other footer properties such as the columns to display.\n */\n@Directive({\n  selector: '[cdkFooterRowDef]',\n  inputs: [{name: 'columns', alias: 'cdkFooterRowDef'}],\n})\nexport class CdkFooterRowDef extends BaseRowDef implements CanStick, OnChanges {\n  _table? = inject(CDK_TABLE, {optional: true});\n\n  private _hasStickyChanged = false;\n\n  /** Whether the row is sticky. */\n  @Input({alias: 'cdkFooterRowDefSticky', transform: booleanAttribute})\n  get sticky(): boolean {\n    return this._sticky;\n  }\n  set sticky(value: boolean) {\n    if (value !== this._sticky) {\n      this._sticky = value;\n      this._hasStickyChanged = true;\n    }\n  }\n  private _sticky = false;\n\n  constructor(...args: unknown[]);\n\n  constructor() {\n    super(inject<TemplateRef<any>>(TemplateRef), inject(IterableDiffers));\n  }\n\n  // Prerender fails to recognize that ngOnChanges in a part of this class through inheritance.\n  // Explicitly define it so that the method is called as part of the Angular lifecycle.\n  override ngOnChanges(changes: SimpleChanges): void {\n    super.ngOnChanges(changes);\n  }\n\n  /** Whether the sticky state has changed. */\n  hasStickyChanged(): boolean {\n    const hasStickyChanged = this._hasStickyChanged;\n    this.resetStickyChanged();\n    return hasStickyChanged;\n  }\n\n  /** Resets the sticky changed state. */\n  resetStickyChanged(): void {\n    this._hasStickyChanged = false;\n  }\n}\n\n/**\n * Data row definition for the CDK table.\n * Captures the header row's template and other row properties such as the columns to display and\n * a when predicate that describes when this row should be used.\n */\n@Directive({\n  selector: '[cdkRowDef]',\n  inputs: [\n    {name: 'columns', alias: 'cdkRowDefColumns'},\n    {name: 'when', alias: 'cdkRowDefWhen'},\n  ],\n})\nexport class CdkRowDef<T> extends BaseRowDef {\n  _table? = inject(CDK_TABLE, {optional: true});\n\n  /**\n   * Function that should return true if this row template should be used for the provided index\n   * and row data. If left undefined, this row will be considered the default row template to use\n   * when no other when functions return true for the data.\n   * For every row, there must be at least one when function that passes or an undefined to default.\n   */\n  when: (index: number, rowData: T) => boolean;\n\n  constructor(...args: unknown[]);\n\n  constructor() {\n    // TODO(andrewseguin): Add an input for providing a switch function to determine\n    //   if this template should be used.\n    super(inject<TemplateRef<any>>(TemplateRef), inject(IterableDiffers));\n  }\n}\n\n/** Context provided to the row cells when `multiTemplateDataRows` is false */\nexport interface CdkCellOutletRowContext<T> {\n  /** Data for the row that this cell is located within. */\n  $implicit?: T;\n\n  /** Index of the data object in the provided data array. */\n  index?: number;\n\n  /** Length of the number of total rows. */\n  count?: number;\n\n  /** True if this cell is contained in the first row. */\n  first?: boolean;\n\n  /** True if this cell is contained in the last row. */\n  last?: boolean;\n\n  /** True if this cell is contained in a row with an even-numbered index. */\n  even?: boolean;\n\n  /** True if this cell is contained in a row with an odd-numbered index. */\n  odd?: boolean;\n}\n\n/**\n * Context provided to the row cells when `multiTemplateDataRows` is true. This context is the same\n * as CdkCellOutletRowContext except that the single `index` value is replaced by `dataIndex` and\n * `renderIndex`.\n */\nexport interface CdkCellOutletMultiRowContext<T> {\n  /** Data for the row that this cell is located within. */\n  $implicit?: T;\n\n  /** Index of the data object in the provided data array. */\n  dataIndex?: number;\n\n  /** Index location of the rendered row that this cell is located within. */\n  renderIndex?: number;\n\n  /** Length of the number of total rows. */\n  count?: number;\n\n  /** True if this cell is contained in the first row. */\n  first?: boolean;\n\n  /** True if this cell is contained in the last row. */\n  last?: boolean;\n\n  /** True if this cell is contained in a row with an even-numbered index. */\n  even?: boolean;\n\n  /** True if this cell is contained in a row with an odd-numbered index. */\n  odd?: boolean;\n}\n\n/**\n * Outlet for rendering cells inside of a row or header row.\n * @docs-private\n */\n@Directive({\n  selector: '[cdkCellOutlet]',\n})\nexport class CdkCellOutlet implements OnDestroy {\n  _viewContainer = inject(ViewContainerRef);\n\n  /** The ordered list of cells to render within this outlet's view container */\n  cells: CdkCellDef[];\n\n  /** The data context to be provided to each cell */\n  context: any;\n\n  /**\n   * Static property containing the latest constructed instance of this class.\n   * Used by the CDK table when each CdkHeaderRow and CdkRow component is created using\n   * createEmbeddedView. After one of these components are created, this property will provide\n   * a handle to provide that component's cells and context. After init, the CdkCellOutlet will\n   * construct the cells with the provided context.\n   */\n  static mostRecentCellOutlet: CdkCellOutlet | null = null;\n\n  constructor(...args: unknown[]);\n\n  constructor() {\n    CdkCellOutlet.mostRecentCellOutlet = this;\n  }\n\n  ngOnDestroy() {\n    // If this was the last outlet being rendered in the view, remove the reference\n    // from the static property after it has been destroyed to avoid leaking memory.\n    if (CdkCellOutlet.mostRecentCellOutlet === this) {\n      CdkCellOutlet.mostRecentCellOutlet = null;\n    }\n  }\n}\n\n/** Header template container that contains the cell outlet. Adds the right class and role. */\n@Component({\n  selector: 'cdk-header-row, tr[cdk-header-row]',\n  template: CDK_ROW_TEMPLATE,\n  host: {\n    'class': 'cdk-header-row',\n    'role': 'row',\n  },\n  // See note on CdkTable for explanation on why this uses the default change detection strategy.\n  // tslint:disable-next-line:validate-decorators\n  changeDetection: ChangeDetectionStrategy.Default,\n  encapsulation: ViewEncapsulation.None,\n  imports: [CdkCellOutlet],\n})\nexport class CdkHeaderRow {}\n\n/** Footer template container that contains the cell outlet. Adds the right class and role. */\n@Component({\n  selector: 'cdk-footer-row, tr[cdk-footer-row]',\n  template: CDK_ROW_TEMPLATE,\n  host: {\n    'class': 'cdk-footer-row',\n    'role': 'row',\n  },\n  // See note on CdkTable for explanation on why this uses the default change detection strategy.\n  // tslint:disable-next-line:validate-decorators\n  changeDetection: ChangeDetectionStrategy.Default,\n  encapsulation: ViewEncapsulation.None,\n  imports: [CdkCellOutlet],\n})\nexport class CdkFooterRow {}\n\n/** Data row template container that contains the cell outlet. Adds the right class and role. */\n@Component({\n  selector: 'cdk-row, tr[cdk-row]',\n  template: CDK_ROW_TEMPLATE,\n  host: {\n    'class': 'cdk-row',\n    'role': 'row',\n  },\n  // See note on CdkTable for explanation on why this uses the default change detection strategy.\n  // tslint:disable-next-line:validate-decorators\n  changeDetection: ChangeDetectionStrategy.Default,\n  encapsulation: ViewEncapsulation.None,\n  imports: [CdkCellOutlet],\n})\nexport class CdkRow {}\n\n/** Row that can be used to display a message when no data is shown in the table. */\n@Directive({\n  selector: 'ng-template[cdkNoDataRow]',\n})\nexport class CdkNoDataRow {\n  templateRef = inject<TemplateRef<any>>(TemplateRef);\n\n  _contentClassName = 'cdk-no-data-row';\n\n  constructor(...args: unknown[]);\n  constructor() {}\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.dev/license\n */\n\n/**\n * Directions that can be used when setting sticky positioning.\n * @docs-private\n */\nimport {afterNextRender, Injector} from '@angular/core';\nimport {Direction} from '../bidi';\nimport {_CoalescedStyleScheduler} from './coalesced-style-scheduler';\nimport {StickyPositioningListener} from './sticky-position-listener';\n\nexport type StickyDirection = 'top' | 'bottom' | 'left' | 'right';\n\ninterface UpdateStickyColumnsParams {\n  rows: HTMLElement[];\n  stickyStartStates: boolean[];\n  stickyEndStates: boolean[];\n}\n\n/**\n * List of all possible directions that can be used for sticky positioning.\n * @docs-private\n */\nexport const STICKY_DIRECTIONS: StickyDirection[] = ['top', 'bottom', 'left', 'right'];\n\n/**\n * Applies and removes sticky positioning styles to the `CdkTable` rows and columns cells.\n * @docs-private\n */\nexport class StickyStyler {\n  private _elemSizeCache = new WeakMap<HTMLElement, {width: number; height: number}>();\n  private _resizeObserver = globalThis?.ResizeObserver\n    ? new globalThis.ResizeObserver(entries => this._updateCachedSizes(entries))\n    : null;\n  private _updatedStickyColumnsParamsToReplay: UpdateStickyColumnsParams[] = [];\n  private _stickyColumnsReplayTimeout: ReturnType<typeof setTimeout> | null = null;\n  private _cachedCellWidths: number[] = [];\n  private readonly _borderCellCss: Readonly<{[d in StickyDirection]: string}>;\n  private _destroyed = false;\n\n  /**\n   * @param _isNativeHtmlTable Whether the sticky logic should be based on a table\n   *     that uses the native `<table>` element.\n   * @param _stickCellCss The CSS class that will be applied to every row/cell that has\n   *     sticky positioning applied.\n   * @param direction The directionality context of the table (ltr/rtl); affects column positioning\n   *     by reversing left/right positions.\n   * @param _isBrowser Whether the table is currently being rendered on the server or the client.\n   * @param _needsPositionStickyOnElement Whether we need to specify position: sticky on cells\n   *     using inline styles. If false, it is assumed that position: sticky is included in\n   *     the component stylesheet for _stickCellCss.\n   * @param _positionListener A listener that is notified of changes to sticky rows/columns\n   *     and their dimensions.\n   * @param _tableInjector The table's Injector.\n   */\n  constructor(\n    private _isNativeHtmlTable: boolean,\n    private _stickCellCss: string,\n    public direction: Direction,\n    private _coalescedStyleScheduler: _CoalescedStyleScheduler,\n    private _isBrowser = true,\n    private readonly _needsPositionStickyOnElement = true,\n    private readonly _positionListener?: StickyPositioningListener,\n    private readonly _tableInjector?: Injector,\n  ) {\n    this._borderCellCss = {\n      'top': `${_stickCellCss}-border-elem-top`,\n      'bottom': `${_stickCellCss}-border-elem-bottom`,\n      'left': `${_stickCellCss}-border-elem-left`,\n      'right': `${_stickCellCss}-border-elem-right`,\n    };\n  }\n\n  /**\n   * Clears the sticky positioning styles from the row and its cells by resetting the `position`\n   * style, setting the zIndex to 0, and unsetting each provided sticky direction.\n   * @param rows The list of rows that should be cleared from sticking in the provided directions\n   * @param stickyDirections The directions that should no longer be set as sticky on the rows.\n   */\n  clearStickyPositioning(rows: HTMLElement[], stickyDirections: StickyDirection[]) {\n    if (stickyDirections.includes('left') || stickyDirections.includes('right')) {\n      this._removeFromStickyColumnReplayQueue(rows);\n    }\n\n    const elementsToClear: HTMLElement[] = [];\n    for (const row of rows) {\n      // If the row isn't an element (e.g. if it's an `ng-container`),\n      // it won't have inline styles or `children` so we skip it.\n      if (row.nodeType !== row.ELEMENT_NODE) {\n        continue;\n      }\n\n      elementsToClear.push(row, ...(Array.from(row.children) as HTMLElement[]));\n    }\n\n    // Coalesce with sticky row/column updates (and potentially other changes like column resize).\n    this._afterNextRender({\n      write: () => {\n        for (const element of elementsToClear) {\n          this._removeStickyStyle(element, stickyDirections);\n        }\n      },\n    });\n  }\n\n  /**\n   * Applies sticky left and right positions to the cells of each row according to the sticky\n   * states of the rendered column definitions.\n   * @param rows The rows that should have its set of cells stuck according to the sticky states.\n   * @param stickyStartStates A list of boolean states where each state represents whether the cell\n   *     in this index position should be stuck to the start of the row.\n   * @param stickyEndStates A list of boolean states where each state represents whether the cell\n   *     in this index position should be stuck to the end of the row.\n   * @param recalculateCellWidths Whether the sticky styler should recalculate the width of each\n   *     column cell. If `false` cached widths will be used instead.\n   * @param replay Whether to enqueue this call for replay after a ResizeObserver update.\n   */\n  updateStickyColumns(\n    rows: HTMLElement[],\n    stickyStartStates: boolean[],\n    stickyEndStates: boolean[],\n    recalculateCellWidths = true,\n    replay = true,\n  ) {\n    // Don't cache any state if none of the columns are sticky.\n    if (\n      !rows.length ||\n      !this._isBrowser ||\n      !(stickyStartStates.some(state => state) || stickyEndStates.some(state => state))\n    ) {\n      this._positionListener?.stickyColumnsUpdated({sizes: []});\n      this._positionListener?.stickyEndColumnsUpdated({sizes: []});\n      return;\n    }\n\n    // Coalesce with sticky row updates (and potentially other changes like column resize).\n    const firstRow = rows[0];\n    const numCells = firstRow.children.length;\n\n    const isRtl = this.direction === 'rtl';\n    const start = isRtl ? 'right' : 'left';\n    const end = isRtl ? 'left' : 'right';\n\n    const lastStickyStart = stickyStartStates.lastIndexOf(true);\n    const firstStickyEnd = stickyEndStates.indexOf(true);\n\n    let cellWidths: number[];\n    let startPositions: number[];\n    let endPositions: number[];\n\n    if (replay) {\n      this._updateStickyColumnReplayQueue({\n        rows: [...rows],\n        stickyStartStates: [...stickyStartStates],\n        stickyEndStates: [...stickyEndStates],\n      });\n    }\n\n    this._afterNextRender({\n      earlyRead: () => {\n        cellWidths = this._getCellWidths(firstRow, recalculateCellWidths);\n\n        startPositions = this._getStickyStartColumnPositions(cellWidths, stickyStartStates);\n        endPositions = this._getStickyEndColumnPositions(cellWidths, stickyEndStates);\n      },\n      write: () => {\n        for (const row of rows) {\n          for (let i = 0; i < numCells; i++) {\n            const cell = row.children[i] as HTMLElement;\n            if (stickyStartStates[i]) {\n              this._addStickyStyle(cell, start, startPositions[i], i === lastStickyStart);\n            }\n\n            if (stickyEndStates[i]) {\n              this._addStickyStyle(cell, end, endPositions[i], i === firstStickyEnd);\n            }\n          }\n        }\n\n        if (this._positionListener && cellWidths.some(w => !!w)) {\n          this._positionListener.stickyColumnsUpdated({\n            sizes:\n              lastStickyStart === -1\n                ? []\n                : cellWidths\n                    .slice(0, lastStickyStart + 1)\n                    .map((width, index) => (stickyStartStates[index] ? width : null)),\n          });\n          this._positionListener.stickyEndColumnsUpdated({\n            sizes:\n              firstStickyEnd === -1\n                ? []\n                : cellWidths\n                    .slice(firstStickyEnd)\n                    .map((width, index) => (stickyEndStates[index + firstStickyEnd] ? width : null))\n                    .reverse(),\n          });\n        }\n      },\n    });\n  }\n\n  /**\n   * Applies sticky positioning to the row's cells if using the native table layout, and to the\n   * row itself otherwise.\n   * @param rowsToStick The list of rows that should be stuck according to their corresponding\n   *     sticky state and to the provided top or bottom position.\n   * @param stickyStates A list of boolean states where each state represents whether the row\n   *     should be stuck in the particular top or bottom position.\n   * @param position The position direction in which the row should be stuck if that row should be\n   *     sticky.\n   *\n   */\n  stickRows(rowsToStick: HTMLElement[], stickyStates: boolean[], position: 'top' | 'bottom') {\n    // Since we can't measure the rows on the server, we can't stick the rows properly.\n    if (!this._isBrowser) {\n      return;\n    }\n\n    // If positioning the rows to the bottom, reverse their order when evaluating the sticky\n    // position such that the last row stuck will be \"bottom: 0px\" and so on. Note that the\n    // sticky states need to be reversed as well.\n    const rows = position === 'bottom' ? rowsToStick.slice().reverse() : rowsToStick;\n    const states = position === 'bottom' ? stickyStates.slice().reverse() : stickyStates;\n\n    // Measure row heights all at once before adding sticky styles to reduce layout thrashing.\n    const stickyOffsets: number[] = [];\n    const stickyCellHeights: (number | undefined)[] = [];\n    const elementsToStick: HTMLElement[][] = [];\n\n    // Coalesce with other sticky row updates (top/bottom), sticky columns updates\n    // (and potentially other changes like column resize).\n    this._afterNextRender({\n      earlyRead: () => {\n        for (let rowIndex = 0, stickyOffset = 0; rowIndex < rows.length; rowIndex++) {\n          if (!states[rowIndex]) {\n            continue;\n          }\n\n          stickyOffsets[rowIndex] = stickyOffset;\n          const row = rows[rowIndex];\n          elementsToStick[rowIndex] = this._isNativeHtmlTable\n            ? (Array.from(row.children) as HTMLElement[])\n            : [row];\n\n          const height = this._retrieveElementSize(row).height;\n          stickyOffset += height;\n          stickyCellHeights[rowIndex] = height;\n        }\n      },\n      write: () => {\n        const borderedRowIndex = states.lastIndexOf(true);\n\n        for (let rowIndex = 0; rowIndex < rows.length; rowIndex++) {\n          if (!states[rowIndex]) {\n            continue;\n          }\n\n          const offset = stickyOffsets[rowIndex];\n          const isBorderedRowIndex = rowIndex === borderedRowIndex;\n          for (const element of elementsToStick[rowIndex]) {\n            this._addStickyStyle(element, position, offset, isBorderedRowIndex);\n          }\n        }\n\n        if (position === 'top') {\n          this._positionListener?.stickyHeaderRowsUpdated({\n            sizes: stickyCellHeights,\n            offsets: stickyOffsets,\n            elements: elementsToStick,\n          });\n        } else {\n          this._positionListener?.stickyFooterRowsUpdated({\n            sizes: stickyCellHeights,\n            offsets: stickyOffsets,\n            elements: elementsToStick,\n          });\n        }\n      },\n    });\n  }\n\n  /**\n   * When using the native table in Safari, sticky footer cells do not stick. The only way to stick\n   * footer rows is to apply sticky styling to the tfoot container. This should only be done if\n   * all footer rows are sticky. If not all footer rows are sticky, remove sticky positioning from\n   * the tfoot element.\n   */\n  updateStickyFooterContainer(tableElement: Element, stickyStates: boolean[]) {\n    if (!this._isNativeHtmlTable) {\n      return;\n    }\n\n    // Coalesce with other sticky updates (and potentially other changes like column resize).\n    this._afterNextRender({\n      write: () => {\n        const tfoot = tableElement.querySelector('tfoot')!;\n\n        if (tfoot) {\n          if (stickyStates.some(state => !state)) {\n            this._removeStickyStyle(tfoot, ['bottom']);\n          } else {\n            this._addStickyStyle(tfoot, 'bottom', 0, false);\n          }\n        }\n      },\n    });\n  }\n\n  /** Triggered by the table's OnDestroy hook. */\n  destroy() {\n    if (this._stickyColumnsReplayTimeout) {\n      clearTimeout(this._stickyColumnsReplayTimeout);\n    }\n\n    this._resizeObserver?.disconnect();\n    this._destroyed = true;\n  }\n\n  /**\n   * Removes the sticky style on the element by removing the sticky cell CSS class, re-evaluating\n   * the zIndex, removing each of the provided sticky directions, and removing the\n   * sticky position if there are no more directions.\n   */\n  _removeStickyStyle(element: HTMLElement, stickyDirections: StickyDirection[]) {\n    if (!element.classList.contains(this._stickCellCss)) {\n      return;\n    }\n\n    for (const dir of stickyDirections) {\n      element.style[dir] = '';\n      element.classList.remove(this._borderCellCss[dir]);\n    }\n\n    // If the element no longer has any more sticky directions, remove sticky positioning and\n    // the sticky CSS class.\n    // Short-circuit checking element.style[dir] for stickyDirections as they\n    // were already removed above.\n    const hasDirection = STICKY_DIRECTIONS.some(\n      dir => stickyDirections.indexOf(dir) === -1 && element.style[dir],\n    );\n    if (hasDirection) {\n      element.style.zIndex = this._getCalculatedZIndex(element);\n    } else {\n      // When not hasDirection, _getCalculatedZIndex will always return ''.\n      element.style.zIndex = '';\n      if (this._needsPositionStickyOnElement) {\n        element.style.position = '';\n      }\n      element.classList.remove(this._stickCellCss);\n    }\n  }\n\n  /**\n   * Adds the sticky styling to the element by adding the sticky style class, changing position\n   * to be sticky (and -webkit-sticky), setting the appropriate zIndex, and adding a sticky\n   * direction and value.\n   */\n  _addStickyStyle(\n    element: HTMLElement,\n    dir: StickyDirection,\n    dirValue: number,\n    isBorderElement: boolean,\n  ) {\n    element.classList.add(this._stickCellCss);\n    if (isBorderElement) {\n      element.classList.add(this._borderCellCss[dir]);\n    }\n    element.style[dir] = `${dirValue}px`;\n    element.style.zIndex = this._getCalculatedZIndex(element);\n    if (this._needsPositionStickyOnElement) {\n      element.style.cssText += 'position: -webkit-sticky; position: sticky; ';\n    }\n  }\n\n  /**\n   * Calculate what the z-index should be for the element, depending on what directions (top,\n   * bottom, left, right) have been set. It should be true that elements with a top direction\n   * should have the highest index since these are elements like a table header. If any of those\n   * elements are also sticky in another direction, then they should appear above other elements\n   * that are only sticky top (e.g. a sticky column on a sticky header). Bottom-sticky elements\n   * (e.g. footer rows) should then be next in the ordering such that they are below the header\n   * but above any non-sticky elements. Finally, left/right sticky elements (e.g. sticky columns)\n   * should minimally increment so that they are above non-sticky elements but below top and bottom\n   * elements.\n   */\n  _getCalculatedZIndex(element: HTMLElement): string {\n    const zIndexIncrements = {\n      top: 100,\n      bottom: 10,\n      left: 1,\n      right: 1,\n    };\n\n    let zIndex = 0;\n    // Use `Iterable` instead of `Array` because TypeScript, as of 3.6.3,\n    // loses the array generic type in the `for of`. But we *also* have to use `Array` because\n    // typescript won't iterate over an `Iterable` unless you compile with `--downlevelIteration`\n    for (const dir of STICKY_DIRECTIONS as Iterable<StickyDirection> & StickyDirection[]) {\n      if (element.style[dir]) {\n        zIndex += zIndexIncrements[dir];\n      }\n    }\n\n    return zIndex ? `${zIndex}` : '';\n  }\n\n  /** Gets the widths for each cell in the provided row. */\n  _getCellWidths(row: HTMLElement, recalculateCellWidths = true): number[] {\n    if (!recalculateCellWidths && this._cachedCellWidths.length) {\n      return this._cachedCellWidths;\n    }\n\n    const cellWidths: number[] = [];\n    const firstRowCells = row.children;\n    for (let i = 0; i < firstRowCells.length; i++) {\n      const cell = firstRowCells[i] as HTMLElement;\n      cellWidths.push(this._retrieveElementSize(cell).width);\n    }\n\n    this._cachedCellWidths = cellWidths;\n    return cellWidths;\n  }\n\n  /**\n   * Determines the left and right positions of each sticky column cell, which will be the\n   * accumulation of all sticky column cell widths to the left and right, respectively.\n   * Non-sticky cells do not need to have a value set since their positions will not be applied.\n   */\n  _getStickyStartColumnPositions(widths: number[], stickyStates: boolean[]): number[] {\n    const positions: number[] = [];\n    let nextPosition = 0;\n\n    for (let i = 0; i < widths.length; i++) {\n      if (stickyStates[i]) {\n        positions[i] = nextPosition;\n        nextPosition += widths[i];\n      }\n    }\n\n    return positions;\n  }\n\n  /**\n   * Determines the left and right positions of each sticky column cell, which will be the\n   * accumulation of all sticky column cell widths to the left and right, respectively.\n   * Non-sticky cells do not need to have a value set since their positions will not be applied.\n   */\n  _getStickyEndColumnPositions(widths: number[], stickyStates: boolean[]): number[] {\n    const positions: number[] = [];\n    let nextPosition = 0;\n\n    for (let i = widths.length; i > 0; i--) {\n      if (stickyStates[i]) {\n        positions[i] = nextPosition;\n        nextPosition += widths[i];\n      }\n    }\n\n    return positions;\n  }\n\n  /**\n   * Retreives the most recently observed size of the specified element from the cache, or\n   * meaures it directly if not yet cached.\n   */\n  private _retrieveElementSize(element: HTMLElement): {width: number; height: number} {\n    const cachedSize = this._elemSizeCache.get(element);\n    if (cachedSize) {\n      return cachedSize;\n    }\n\n    const clientRect = element.getBoundingClientRect();\n    const size = {width: clientRect.width, height: clientRect.height};\n\n    if (!this._resizeObserver) {\n      return size;\n    }\n\n    this._elemSizeCache.set(element, size);\n    this._resizeObserver.observe(element, {box: 'border-box'});\n    return size;\n  }\n\n  /**\n   * Conditionally enqueue the requested sticky update and clear previously queued updates\n   * for the same rows.\n   */\n  private _updateStickyColumnReplayQueue(params: UpdateStickyColumnsParams) {\n    this._removeFromStickyColumnReplayQueue(params.rows);\n\n    // No need to replay if a flush is pending.\n    if (!this._stickyColumnsReplayTimeout) {\n      this._updatedStickyColumnsParamsToReplay.push(params);\n    }\n  }\n\n  /** Remove updates for the specified rows from the queue. */\n  private _removeFromStickyColumnReplayQueue(rows: HTMLElement[]) {\n    const rowsSet = new Set(rows);\n    for (const update of this._updatedStickyColumnsParamsToReplay) {\n      update.rows = update.rows.filter(row => !rowsSet.has(row));\n    }\n    this._updatedStickyColumnsParamsToReplay = this._updatedStickyColumnsParamsToReplay.filter(\n      update => !!update.rows.length,\n    );\n  }\n\n  /** Update _elemSizeCache with the observed sizes. */\n  private _updateCachedSizes(entries: ResizeObserverEntry[]) {\n    let needsColumnUpdate = false;\n    for (const entry of entries) {\n      const newEntry = entry.borderBoxSize?.length\n        ? {\n            width: entry.borderBoxSize[0].inlineSize,\n            height: entry.borderBoxSize[0].blockSize,\n          }\n        : {\n            width: entry.contentRect.width,\n            height: entry.contentRect.height,\n          };\n\n      if (\n        newEntry.width !== this._elemSizeCache.get(entry.target as HTMLElement)?.width &&\n        isCell(entry.target)\n      ) {\n        needsColumnUpdate = true;\n      }\n\n      this._elemSizeCache.set(entry.target as HTMLElement, newEntry);\n    }\n\n    if (needsColumnUpdate && this._updatedStickyColumnsParamsToReplay.length) {\n      if (this._stickyColumnsReplayTimeout) {\n        clearTimeout(this._stickyColumnsReplayTimeout);\n      }\n\n      this._stickyColumnsReplayTimeout = setTimeout(() => {\n        if (this._destroyed) {\n          return;\n        }\n\n        for (const update of this._updatedStickyColumnsParamsToReplay) {\n          this.updateStickyColumns(\n            update.rows,\n            update.stickyStartStates,\n            update.stickyEndStates,\n            true,\n            false,\n          );\n        }\n        this._updatedStickyColumnsParamsToReplay = [];\n        this._stickyColumnsReplayTimeout = null;\n      }, 0);\n    }\n  }\n\n  /**\n   * Invoke afterNextRender with the table's injector, falling back to CoalescedStyleScheduler\n   * if the injector was not provided.\n   */\n  private _afterNextRender(spec: {earlyRead?: () => void; write: () => void}) {\n    if (this._tableInjector) {\n      afterNextRender(spec, {injector: this._tableInjector});\n    } else {\n      this._coalescedStyleScheduler.schedule(() => {\n        spec.earlyRead?.();\n        spec.write();\n      });\n    }\n  }\n}\n\nfunction isCell(element: Element) {\n  return ['cdk-cell', 'cdk-header-cell', 'cdk-footer-cell'].some(klass =>\n    element.classList.contains(klass),\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.dev/license\n */\n\n/**\n * Returns an error to be thrown when attempting to find an nonexistent column.\n * @param id Id whose lookup failed.\n * @docs-private\n */\nexport function getTableUnknownColumnError(id: string) {\n  return Error(`Could not find column with id \"${id}\".`);\n}\n\n/**\n * Returns an error to be thrown when two column definitions have the same name.\n * @docs-private\n */\nexport function getTableDuplicateColumnNameError(name: string) {\n  return Error(`Duplicate column definition name provided: \"${name}\".`);\n}\n\n/**\n * Returns an error to be thrown when there are multiple rows that are missing a when function.\n * @docs-private\n */\nexport function getTableMultipleDefaultRowDefsError() {\n  return Error(`There can only be one default row without a when predicate function.`);\n}\n\n/**\n * Returns an error to be thrown when there are no matching row defs for a particular set of data.\n * @docs-private\n */\nexport function getTableMissingMatchingRowDefError(data: any) {\n  return Error(\n    `Could not find a matching row definition for the` +\n      `provided row data: ${JSON.stringify(data)}`,\n  );\n}\n\n/**\n * Returns an error to be thrown when there is no row definitions present in the content.\n * @docs-private\n */\nexport function getTableMissingRowDefsError() {\n  return Error(\n    'Missing definitions for header, footer, and row; ' +\n      'cannot determine which columns should be rendered.',\n  );\n}\n\n/**\n * Returns an error to be thrown when the data source does not match the compatible types.\n * @docs-private\n */\nexport function getTableUnknownDataSourceError() {\n  return Error(`Provided data source did not match an array, Observable, or DataSource`);\n}\n\n/**\n * Returns an error to be thrown when the text column cannot find a parent table to inject.\n * @docs-private\n */\nexport function getTableTextColumnMissingParentTableError() {\n  return Error(`Text column could not find a parent table for registration.`);\n}\n\n/**\n * Returns an error to be thrown when a table text column doesn't have a name.\n * @docs-private\n */\nexport function getTableTextColumnMissingNameError() {\n  return Error(`Table text column must have a name.`);\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.dev/license\n */\n\nimport {InjectionToken} from '@angular/core';\n\n/** The injection token used to specify the StickyPositioningListener. */\nexport const STICKY_POSITIONING_LISTENER = new InjectionToken<StickyPositioningListener>('CDK_SPL');\n\nexport type StickySize = number | null | undefined;\nexport type StickyOffset = number | null | undefined;\n\nexport interface StickyUpdate {\n  elements?: readonly (HTMLElement[] | undefined)[];\n  offsets?: StickyOffset[];\n  sizes: StickySize[];\n}\n\n/**\n * If provided, CdkTable will call the methods below when it updates the size/\n * position/etc of its sticky rows and columns.\n */\nexport interface StickyPositioningListener {\n  /** Called when CdkTable updates its sticky start columns. */\n  stickyColumnsUpdated(update: StickyUpdate): void;\n\n  /** Called when CdkTable updates its sticky end columns. */\n  stickyEndColumnsUpdated(update: StickyUpdate): void;\n\n  /** Called when CdkTable updates its sticky header rows. */\n  stickyHeaderRowsUpdated(update: StickyUpdate): void;\n\n  /** Called when CdkTable updates its sticky footer rows. */\n  stickyFooterRowsUpdated(update: StickyUpdate): void;\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.dev/license\n */\n\nimport {Direction, Directionality} from '../bidi';\nimport {\n  CollectionViewer,\n  DataSource,\n  _DisposeViewRepeaterStrategy,\n  _RecycleViewRepeaterStrategy,\n  isDataSource,\n  _VIEW_REPEATER_STRATEGY,\n  _ViewRepeater,\n  _ViewRepeaterItemChange,\n  _ViewRepeaterItemInsertArgs,\n  _ViewRepeaterOperation,\n} from '../collections';\nimport {Platform} from '../platform';\nimport {ViewportRuler} from '../scrolling';\nimport {DOCUMENT} from '@angular/common';\nimport {\n  AfterContentChecked,\n  AfterContentInit,\n  ChangeDetectionStrategy,\n  ChangeDetectorRef,\n  Component,\n  ContentChild,\n  ContentChildren,\n  Directive,\n  ElementRef,\n  EmbeddedViewRef,\n  EventEmitter,\n  Input,\n  IterableChangeRecord,\n  IterableDiffer,\n  IterableDiffers,\n  OnDestroy,\n  OnInit,\n  Output,\n  QueryList,\n  TemplateRef,\n  TrackByFunction,\n  ViewContainerRef,\n  ViewEncapsulation,\n  booleanAttribute,\n  inject,\n  Injector,\n  HostAttributeToken,\n} from '@angular/core';\nimport {\n  BehaviorSubject,\n  isObservable,\n  Observable,\n  of as observableOf,\n  Subject,\n  Subscription,\n} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\nimport {CdkColumnDef} from './cell';\nimport {_CoalescedStyleScheduler, _COALESCED_STYLE_SCHEDULER} from './coalesced-style-scheduler';\nimport {\n  BaseRowDef,\n  CdkCellOutlet,\n  CdkCellOutletMultiRowContext,\n  CdkCellOutletRowContext,\n  CdkFooterRowDef,\n  CdkHeaderRowDef,\n  CdkNoDataRow,\n  CdkRowDef,\n} from './row';\nimport {StickyStyler} from './sticky-styler';\nimport {\n  getTableDuplicateColumnNameError,\n  getTableMissingMatchingRowDefError,\n  getTableMissingRowDefsError,\n  getTableMultipleDefaultRowDefsError,\n  getTableUnknownColumnError,\n  getTableUnknownDataSourceError,\n} from './table-errors';\nimport {STICKY_POSITIONING_LISTENER, StickyPositioningListener} from './sticky-position-listener';\nimport {CDK_TABLE} from './tokens';\n\n/**\n * Enables the recycle view repeater strategy, which reduces rendering latency. Not compatible with\n * tables that animate rows.\n */\n@Directive({\n  selector: 'cdk-table[recycleRows], table[cdk-table][recycleRows]',\n  providers: [{provide: _VIEW_REPEATER_STRATEGY, useClass: _RecycleViewRepeaterStrategy}],\n})\nexport class CdkRecycleRows {}\n\n/** Interface used to provide an outlet for rows to be inserted into. */\nexport interface RowOutlet {\n  viewContainer: ViewContainerRef;\n}\n\n/** Possible types that can be set as the data source for a `CdkTable`. */\nexport type CdkTableDataSourceInput<T> = readonly T[] | DataSource<T> | Observable<readonly T[]>;\n\n/**\n * Provides a handle for the table to grab the view container's ng-container to insert data rows.\n * @docs-private\n */\n@Directive({\n  selector: '[rowOutlet]',\n})\nexport class DataRowOutlet implements RowOutlet {\n  viewContainer = inject(ViewContainerRef);\n  elementRef = inject(ElementRef);\n\n  constructor(...args: unknown[]);\n\n  constructor() {\n    const table = inject<CdkTable<unknown>>(CDK_TABLE);\n    table._rowOutlet = this;\n    table._outletAssigned();\n  }\n}\n\n/**\n * Provides a handle for the table to grab the view container's ng-container to insert the header.\n * @docs-private\n */\n@Directive({\n  selector: '[headerRowOutlet]',\n})\nexport class HeaderRowOutlet implements RowOutlet {\n  viewContainer = inject(ViewContainerRef);\n  elementRef = inject(ElementRef);\n\n  constructor(...args: unknown[]);\n\n  constructor() {\n    const table = inject<CdkTable<unknown>>(CDK_TABLE);\n    table._headerRowOutlet = this;\n    table._outletAssigned();\n  }\n}\n\n/**\n * Provides a handle for the table to grab the view container's ng-container to insert the footer.\n * @docs-private\n */\n@Directive({\n  selector: '[footerRowOutlet]',\n})\nexport class FooterRowOutlet implements RowOutlet {\n  viewContainer = inject(ViewContainerRef);\n  elementRef = inject(ElementRef);\n\n  constructor(...args: unknown[]);\n\n  constructor() {\n    const table = inject<CdkTable<unknown>>(CDK_TABLE);\n    table._footerRowOutlet = this;\n    table._outletAssigned();\n  }\n}\n\n/**\n * Provides a handle for the table to grab the view\n * container's ng-container to insert the no data row.\n * @docs-private\n */\n@Directive({\n  selector: '[noDataRowOutlet]',\n})\nexport class NoDataRowOutlet implements RowOutlet {\n  viewContainer = inject(ViewContainerRef);\n  elementRef = inject(ElementRef);\n\n  constructor(...args: unknown[]);\n\n  constructor() {\n    const table = inject<CdkTable<unknown>>(CDK_TABLE);\n    table._noDataRowOutlet = this;\n    table._outletAssigned();\n  }\n}\n\n/**\n * The table template that can be used by the mat-table. Should not be used outside of the\n * material library.\n * @docs-private\n */\nexport const CDK_TABLE_TEMPLATE =\n  // Note that according to MDN, the `caption` element has to be projected as the **first**\n  // element in the table. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption\n  `\n  <ng-content select=\"caption\"/>\n  <ng-content select=\"colgroup, col\"/>\n\n  <!--\n    Unprojected content throws a hydration error so we need this to capture it.\n    It gets removed on the client so it doesn't affect the layout.\n  -->\n  @if (_isServer) {\n    <ng-content/>\n  }\n\n  @if (_isNativeHtmlTable) {\n    <thead role=\"rowgroup\">\n      <ng-container headerRowOutlet/>\n    </thead>\n    <tbody role=\"rowgroup\">\n      <ng-container rowOutlet/>\n      <ng-container noDataRowOutlet/>\n    </tbody>\n    <tfoot role=\"rowgroup\">\n      <ng-container footerRowOutlet/>\n    </tfoot>\n  } @else {\n    <ng-container headerRowOutlet/>\n    <ng-container rowOutlet/>\n    <ng-container noDataRowOutlet/>\n    <ng-container footerRowOutlet/>\n  }\n`;\n\n/**\n * Interface used to conveniently type the possible context interfaces for the render row.\n * @docs-private\n */\nexport interface RowContext<T>\n  extends CdkCellOutletMultiRowContext<T>,\n    CdkCellOutletRowContext<T> {}\n\n/**\n * Class used to conveniently type the embedded view ref for rows with a context.\n * @docs-private\n */\nabstract class RowViewRef<T> extends EmbeddedViewRef<RowContext<T>> {}\n\n/**\n * Set of properties that represents the identity of a single rendered row.\n *\n * When the table needs to determine the list of rows to render, it will do so by iterating through\n * each data object and evaluating its list of row templates to display (when multiTemplateDataRows\n * is false, there is only one template per data object). For each pair of data object and row\n * template, a `RenderRow` is added to the list of rows to render. If the data object and row\n * template pair has already been rendered, the previously used `RenderRow` is added; else a new\n * `RenderRow` is * created. Once the list is complete and all data objects have been iterated\n * through, a diff is performed to determine the changes that need to be made to the rendered rows.\n *\n * @docs-private\n */\nexport interface RenderRow<T> {\n  data: T;\n  dataIndex: number;\n  rowDef: CdkRowDef<T>;\n}\n\n/**\n * A data table that can render a header row, data rows, and a footer row.\n * Uses the dataSource input to determine the data to be rendered. The data can be provided either\n * as a data array, an Observable stream that emits the data array to render, or a DataSource with a\n * connect function that will return an Observable stream that emits the data array to render.\n */\n@Component({\n  selector: 'cdk-table, table[cdk-table]',\n  exportAs: 'cdkTable',\n  template: CDK_TABLE_TEMPLATE,\n  styleUrl: 'table.css',\n  host: {\n    'class': 'cdk-table',\n    '[class.cdk-table-fixed-layout]': 'fixedLayout',\n  },\n  encapsulation: ViewEncapsulation.None,\n  // The \"OnPush\" status for the `MatTable` component is effectively a noop, so we are removing it.\n  // The view for `MatTable` consists entirely of templates declared in other views. As they are\n  // declared elsewhere, they are checked when their declaration points are checked.\n  // tslint:disable-next-line:validate-decorators\n  changeDetection: ChangeDetectionStrategy.Default,\n  providers: [\n    {provide: CDK_TABLE, useExisting: CdkTable},\n    {provide: _VIEW_REPEATER_STRATEGY, useClass: _DisposeViewRepeaterStrategy},\n    {provide: _COALESCED_STYLE_SCHEDULER, useClass: _CoalescedStyleScheduler},\n    // Prevent nested tables from seeing this table's StickyPositioningListener.\n    {provide: STICKY_POSITIONING_LISTENER, useValue: null},\n  ],\n  imports: [HeaderRowOutlet, DataRowOutlet, NoDataRowOutlet, FooterRowOutlet],\n})\nexport class CdkTable<T>\n  implements AfterContentInit, AfterContentChecked, CollectionViewer, OnDestroy, OnInit\n{\n  protected readonly _differs = inject(IterableDiffers);\n  protected readonly _changeDetectorRef = inject(ChangeDetectorRef);\n  protected readonly _elementRef = inject(ElementRef);\n  protected readonly _dir = inject(Directionality, {optional: true});\n  private _platform = inject(Platform);\n  protected readonly _viewRepeater =\n    inject<_ViewRepeater<T, RenderRow<T>, RowContext<T>>>(_VIEW_REPEATER_STRATEGY);\n  protected readonly _coalescedStyleScheduler = inject<_CoalescedStyleScheduler>(\n    _COALESCED_STYLE_SCHEDULER,\n  );\n  private readonly _viewportRuler = inject(ViewportRuler);\n  protected readonly _stickyPositioningListener = inject<StickyPositioningListener>(\n    STICKY_POSITIONING_LISTENER,\n    {optional: true, skipSelf: true},\n  )!;\n\n  private _document = inject(DOCUMENT);\n\n  /** Latest data provided by the data source. */\n  protected _data: readonly T[];\n\n  /** Subject that emits when the component has been destroyed. */\n  private readonly _onDestroy = new Subject<void>();\n\n  /** List of the rendered rows as identified by their `RenderRow` object. */\n  private _renderRows: RenderRow<T>[];\n\n  /** Subscription that listens for the data provided by the data source. */\n  private _renderChangeSubscription: Subscription | null;\n\n  /**\n   * Map of all the user's defined columns (header, data, and footer cell template) identified by\n   * name. Collection populated by the column definitions gathered by `ContentChildren` as well as\n   * any custom column definitions added to `_customColumnDefs`.\n   */\n  private _columnDefsByName = new Map<string, CdkColumnDef>();\n\n  /**\n   * Set of all row definitions that can be used by this table. Populated by the rows gathered by\n   * using `ContentChildren` as well as any custom row definitions added to `_customRowDefs`.\n   */\n  private _rowDefs: CdkRowDef<T>[];\n\n  /**\n   * Set of all header row definitions that can be used by this table. Populated by the rows\n   * gathered by using `ContentChildren` as well as any custom row definitions added to\n   * `_customHeaderRowDefs`.\n   */\n  private _headerRowDefs: CdkHeaderRowDef[];\n\n  /**\n   * Set of all row definitions that can be used by this table. Populated by the rows gathered by\n   * using `ContentChildren` as well as any custom row definitions added to\n   * `_customFooterRowDefs`.\n   */\n  private _footerRowDefs: CdkFooterRowDef[];\n\n  /** Differ used to find the changes in the data provided by the data source. */\n  private _dataDiffer: IterableDiffer<RenderRow<T>>;\n\n  /** Stores the row definition that does not have a when predicate. */\n  private _defaultRowDef: CdkRowDef<T> | null;\n\n  /**\n   * Column definitions that were defined outside of the direct content children of the table.\n   * These will be defined when, e.g., creating a wrapper around the cdkTable that has\n   * column definitions as *its* content child.\n   */\n  private _customColumnDefs = new Set<CdkColumnDef>();\n\n  /**\n   * Data row definitions that were defined outside of the direct content children of the table.\n   * These will be defined when, e.g., creating a wrapper around the cdkTable that has\n   * built-in data rows as *its* content child.\n   */\n  private _customRowDefs = new Set<CdkRowDef<T>>();\n\n  /**\n   * Header row definitions that were defined outside of the direct content children of the table.\n   * These will be defined when, e.g., creating a wrapper around the cdkTable that has\n   * built-in header rows as *its* content child.\n   */\n  private _customHeaderRowDefs = new Set<CdkHeaderRowDef>();\n\n  /**\n   * Footer row definitions that were defined outside of the direct content children of the table.\n   * These will be defined when, e.g., creating a wrapper around the cdkTable that has a\n   * built-in footer row as *its* content child.\n   */\n  private _customFooterRowDefs = new Set<CdkFooterRowDef>();\n\n  /** No data row that was defined outside of the direct content children of the table. */\n  private _customNoDataRow: CdkNoDataRow | null;\n\n  /**\n   * Whether the header row definition has been changed. Triggers an update to the header row after\n   * content is checked. Initialized as true so that the table renders the initial set of rows.\n   */\n  private _headerRowDefChanged = true;\n\n  /**\n   * Whether the footer row definition has been changed. Triggers an update to the footer row after\n   * content is checked. Initialized as true so that the table renders the initial set of rows.\n   */\n  private _footerRowDefChanged = true;\n\n  /**\n   * Whether the sticky column styles need to be updated. Set to `true` when the visible columns\n   * change.\n   */\n  private _stickyColumnStylesNeedReset = true;\n\n  /**\n   * Whether the sticky styler should recalculate cell widths when applying sticky styles. If\n   * `false`, cached values will be used instead. This is only applicable to tables with\n   * {@link fixedLayout} enabled. For other tables, cell widths will always be recalculated.\n   */\n  private _forceRecalculateCellWidths = true;\n\n  /**\n   * Cache of the latest rendered `RenderRow` objects as a map for easy retrieval when constructing\n   * a new list of `RenderRow` objects for rendering rows. Since the new list is constructed with\n   * the cached `RenderRow` objects when possible, the row identity is preserved when the data\n   * and row template matches, which allows the `IterableDiffer` to check rows by reference\n   * and understand which rows are added/moved/removed.\n   *\n   * Implemented as a map of maps where the first key is the `data: T` object and the second is the\n   * `CdkRowDef<T>` object. With the two keys, the cache points to a `RenderRow<T>` object that\n   * contains an array of created pairs. The array is necessary to handle cases where the data\n   * array contains multiple duplicate data objects and each instantiated `RenderRow` must be\n   * stored.\n   */\n  private _cachedRenderRowsMap = new Map<T, WeakMap<CdkRowDef<T>, RenderRow<T>[]>>();\n\n  /** Whether the table is applied to a native `<table>`. */\n  protected _isNativeHtmlTable: boolean;\n\n  /**\n   * Utility class that is responsible for applying the appropriate sticky positioning styles to\n   * the table's rows and cells.\n   */\n  private _stickyStyler: StickyStyler;\n\n  /**\n   * CSS class added to any row or cell that has sticky positioning applied. May be overridden by\n   * table subclasses.\n   */\n  protected stickyCssClass: string = 'cdk-table-sticky';\n\n  /**\n   * Whether to manually add position: sticky to all sticky cell elements. Not needed if\n   * the position is set in a selector associated with the value of stickyCssClass. May be\n   * overridden by table subclasses\n   */\n  protected needsPositionStickyOnElement = true;\n\n  /** Whether the component is being rendered on the server. */\n  protected _isServer: boolean;\n\n  /** Whether the no data row is currently showing anything. */\n  private _isShowingNoDataRow = false;\n\n  /** Whether the table has rendered out all the outlets for the first time. */\n  private _hasAllOutlets = false;\n\n  /** Whether the table is done initializing. */\n  private _hasInitialized = false;\n\n  /** Aria role to apply to the table's cells based on the table's own role. */\n  _getCellRole(): string | null {\n    // Perform this lazily in case the table's role was updated by a directive after construction.\n    if (this._cellRoleInternal === undefined) {\n      // Note that we set `role=\"cell\"` even on native `td` elements,\n      // because some browsers seem to require it. See #29784.\n      const tableRole = this._elementRef.nativeElement.getAttribute('role');\n      return tableRole === 'grid' || tableRole === 'treegrid' ? 'gridcell' : 'cell';\n    }\n\n    return this._cellRoleInternal;\n  }\n  private _cellRoleInternal: string | null | undefined = undefined;\n\n  /**\n   * Tracking function that will be used to check the differences in data changes. Used similarly\n   * to `ngFor` `trackBy` function. Optimize row operations by identifying a row based on its data\n   * relative to the function to know if a row should be added/removed/moved.\n   * Accepts a function that takes two parameters, `index` and `item`.\n   */\n  @Input()\n  get trackBy(): TrackByFunction<T> {\n    return this._trackByFn;\n  }\n  set trackBy(fn: TrackByFunction<T>) {\n    if ((typeof ngDevMode === 'undefined' || ngDevMode) && fn != null && typeof fn !== 'function') {\n      console.warn(`trackBy must be a function, but received ${JSON.stringify(fn)}.`);\n    }\n    this._trackByFn = fn;\n  }\n  private _trackByFn: TrackByFunction<T>;\n\n  /**\n   * The table's source of data, which can be provided in three ways (in order of complexity):\n   *   - Simple data array (each object represents one table row)\n   *   - Stream that emits a data array each time the array changes\n   *   - `DataSource` object that implements the connect/disconnect interface.\n   *\n   * If a data array is provided, the table must be notified when the array's objects are\n   * added, removed, or moved. This can be done by calling the `renderRows()` function which will\n   * render the diff since the last table render. If the data array reference is changed, the table\n   * will automatically trigger an update to the rows.\n   *\n   * When providing an Observable stream, the table will trigger an update automatically when the\n   * stream emits a new array of data.\n   *\n   * Finally, when providing a `DataSource` object, the table will use the Observable stream\n   * provided by the connect function and trigger updates when that stream emits new data array\n   * values. During the table's ngOnDestroy or when the data source is removed from the table, the\n   * table will call the DataSource's `disconnect` function (may be useful for cleaning up any\n   * subscriptions registered during the connect process).\n   */\n  @Input()\n  get dataSource(): CdkTableDataSourceInput<T> {\n    return this._dataSource;\n  }\n  set dataSource(dataSource: CdkTableDataSourceInput<T>) {\n    if (this._dataSource !== dataSource) {\n      this._switchDataSource(dataSource);\n    }\n  }\n  private _dataSource: CdkTableDataSourceInput<T>;\n\n  /**\n   * Whether to allow multiple rows per data object by evaluating which rows evaluate their 'when'\n   * predicate to true. If `multiTemplateDataRows` is false, which is the default value, then each\n   * dataobject will render the first row that evaluates its when predicate to true, in the order\n   * defined in the table, or otherwise the default row which does not have a when predicate.\n   */\n  @Input({transform: booleanAttribute})\n  get multiTemplateDataRows(): boolean {\n    return this._multiTemplateDataRows;\n  }\n  set multiTemplateDataRows(value: boolean) {\n    this._multiTemplateDataRows = value;\n\n    // In Ivy if this value is set via a static attribute (e.g. <table multiTemplateDataRows>),\n    // this setter will be invoked before the row outlet has been defined hence the null check.\n    if (this._rowOutlet && this._rowOutlet.viewContainer.length) {\n      this._forceRenderDataRows();\n      this.updateStickyColumnStyles();\n    }\n  }\n  _multiTemplateDataRows: boolean = false;\n\n  /**\n   * Whether to use a fixed table layout. Enabling this option will enforce consistent column widths\n   * and optimize rendering sticky styles for native tables. No-op for flex tables.\n   */\n  @Input({transform: booleanAttribute})\n  get fixedLayout(): boolean {\n    return this._fixedLayout;\n  }\n  set fixedLayout(value: boolean) {\n    this._fixedLayout = value;\n\n    // Toggling `fixedLayout` may change column widths. Sticky column styles should be recalculated.\n    this._forceRecalculateCellWidths = true;\n    this._stickyColumnStylesNeedReset = true;\n  }\n  private _fixedLayout: boolean = false;\n\n  /**\n   * Emits when the table completes rendering a set of data rows based on the latest data from the\n   * data source, even if the set of rows is empty.\n   */\n  @Output()\n  readonly contentChanged = new EventEmitter<void>();\n\n  // TODO(andrewseguin): Remove max value as the end index\n  //   and instead calculate the view on init and scroll.\n  /**\n   * Stream containing the latest information on what rows are being displayed on screen.\n   * Can be used by the data source to as a heuristic of what data should be provided.\n   *\n   * @docs-private\n   */\n  readonly viewChange = new BehaviorSubject<{start: number; end: number}>({\n    start: 0,\n    end: Number.MAX_VALUE,\n  });\n\n  // Outlets in the table's template where the header, data rows, and footer will be inserted.\n  _rowOutlet: DataRowOutlet;\n  _headerRowOutlet: HeaderRowOutlet;\n  _footerRowOutlet: FooterRowOutlet;\n  _noDataRowOutlet: NoDataRowOutlet;\n\n  /**\n   * The column definitions provided by the user that contain what the header, data, and footer\n   * cells should render for each column.\n   */\n  @ContentChildren(CdkColumnDef, {descendants: true}) _contentColumnDefs: QueryList<CdkColumnDef>;\n\n  /** Set of data row definitions that were provided to the table as content children. */\n  @ContentChildren(CdkRowDef, {descendants: true}) _contentRowDefs: QueryList<CdkRowDef<T>>;\n\n  /** Set of header row definitions that were provided to the table as content children. */\n  @ContentChildren(CdkHeaderRowDef, {\n    descendants: true,\n  })\n  _contentHeaderRowDefs: QueryList<CdkHeaderRowDef>;\n\n  /** Set of footer row definitions that were provided to the table as content children. */\n  @ContentChildren(CdkFooterRowDef, {\n    descendants: true,\n  })\n  _contentFooterRowDefs: QueryList<CdkFooterRowDef>;\n\n  /** Row definition that will only be rendered if there's no data in the table. */\n  @ContentChild(CdkNoDataRow) _noDataRow: CdkNoDataRow;\n\n  private _injector = inject(Injector);\n\n  constructor(...args: unknown[]);\n\n  constructor() {\n    const role = inject(new HostAttributeToken('role'), {optional: true});\n\n    if (!role) {\n      this._elementRef.nativeElement.setAttribute('role', 'table');\n    }\n\n    this._isServer = !this._platform.isBrowser;\n    this._isNativeHtmlTable = this._elementRef.nativeElement.nodeName === 'TABLE';\n  }\n\n  ngOnInit() {\n    this._setupStickyStyler();\n\n    // Set up the trackBy function so that it uses the `RenderRow` as its identity by default. If\n    // the user has provided a custom trackBy, return the result of that function as evaluated\n    // with the values of the `RenderRow`'s data and index.\n    this._dataDiffer = this._differs.find([]).create((_i: number, dataRow: RenderRow<T>) => {\n      return this.trackBy ? this.trackBy(dataRow.dataIndex, dataRow.data) : dataRow;\n    });\n\n    this._viewportRuler\n      .change()\n      .pipe(takeUntil(this._onDestroy))\n      .subscribe(() => {\n        this._forceRecalculateCellWidths = true;\n      });\n  }\n\n  ngAfterContentInit() {\n    this._hasInitialized = true;\n  }\n\n  ngAfterContentChecked() {\n    // Only start re-rendering in `ngAfterContentChecked` after the first render.\n    if (this._canRender()) {\n      this._render();\n    }\n  }\n\n  ngOnDestroy() {\n    this._stickyStyler?.destroy();\n\n    [\n      this._rowOutlet?.viewContainer,\n      this._headerRowOutlet?.viewContainer,\n      this._footerRowOutlet?.viewContainer,\n      this._cachedRenderRowsMap,\n      this._customColumnDefs,\n      this._customRowDefs,\n      this._customHeaderRowDefs,\n      this._customFooterRowDefs,\n      this._columnDefsByName,\n    ].forEach((def: ViewContainerRef | Set<unknown> | Map<unknown, unknown> | undefined) => {\n      def?.clear();\n    });\n\n    this._headerRowDefs = [];\n    this._footerRowDefs = [];\n    this._defaultRowDef = null;\n    this._onDestroy.next();\n    this._onDestroy.complete();\n\n    if (isDataSource(this.dataSource)) {\n      this.dataSource.disconnect(this);\n    }\n  }\n\n  /**\n   * Renders rows based on the table's latest set of data, which was either provided directly as an\n   * input or retrieved through an Observable stream (directly or from a DataSource).\n   * Checks for differences in the data since the last diff to perform only the necessary\n   * changes (add/remove/move rows).\n   *\n   * If the table's data source is a DataSource or Observable, this will be invoked automatically\n   * each time the provided Observable stream emits a new data array. Otherwise if your data is\n   * an array, this function will need to be called to render any changes.\n   */\n  renderRows() {\n    this._renderRows = this._getAllRenderRows();\n    const changes = this._dataDiffer.diff(this._renderRows);\n    if (!changes) {\n      this._updateNoDataRow();\n      this.contentChanged.next();\n      return;\n    }\n    const viewContainer = this._rowOutlet.viewContainer;\n\n    this._viewRepeater.applyChanges(\n      changes,\n      viewContainer,\n      (\n        record: IterableChangeRecord<RenderRow<T>>,\n        _adjustedPreviousIndex: number | null,\n        currentIndex: number | null,\n      ) => this._getEmbeddedViewArgs(record.item, currentIndex!),\n      record => record.item.data,\n      (change: _ViewRepeaterItemChange<RenderRow<T>, RowContext<T>>) => {\n        if (change.operation === _ViewRepeaterOperation.INSERTED && change.context) {\n          this._renderCellTemplateForItem(change.record.item.rowDef, change.context);\n        }\n      },\n    );\n\n    // Update the meta context of a row's context data (index, count, first, last, ...)\n    this._updateRowIndexContext();\n\n    // Update rows that did not get added/removed/moved but may have had their identity changed,\n    // e.g. if trackBy matched data on some property but the actual data reference changed.\n    changes.forEachIdentityChange((record: IterableChangeRecord<RenderRow<T>>) => {\n      const rowView = <RowViewRef<T>>viewContainer.get(record.currentIndex!);\n      rowView.context.$implicit = record.item.data;\n    });\n\n    this._updateNoDataRow();\n\n    this.contentChanged.next();\n    this.updateStickyColumnStyles();\n  }\n\n  /** Adds a column definition that was not included as part of the content children. */\n  addColumnDef(columnDef: CdkColumnDef) {\n    this._customColumnDefs.add(columnDef);\n  }\n\n  /** Removes a column definition that was not included as part of the content children. */\n  removeColumnDef(columnDef: CdkColumnDef) {\n    this._customColumnDefs.delete(columnDef);\n  }\n\n  /** Adds a row definition that was not included as part of the content children. */\n  addRowDef(rowDef: CdkRowDef<T>) {\n    this._customRowDefs.add(rowDef);\n  }\n\n  /** Removes a row definition that was not included as part of the content children. */\n  removeRowDef(rowDef: CdkRowDef<T>) {\n    this._customRowDefs.delete(rowDef);\n  }\n\n  /** Adds a header row definition that was not included as part of the content children. */\n  addHeaderRowDef(headerRowDef: CdkHeaderRowDef) {\n    this._customHeaderRowDefs.add(headerRowDef);\n    this._headerRowDefChanged = true;\n  }\n\n  /** Removes a header row definition that was not included as part of the content children. */\n  removeHeaderRowDef(headerRowDef: CdkHeaderRowDef) {\n    this._customHeaderRowDefs.delete(headerRowDef);\n    this._headerRowDefChanged = true;\n  }\n\n  /** Adds a footer row definition that was not included as part of the content children. */\n  addFooterRowDef(footerRowDef: CdkFooterRowDef) {\n    this._customFooterRowDefs.add(footerRowDef);\n    this._footerRowDefChanged = true;\n  }\n\n  /** Removes a footer row definition that was not included as part of the content children. */\n  removeFooterRowDef(footerRowDef: CdkFooterRowDef) {\n    this._customFooterRowDefs.delete(footerRowDef);\n    this._footerRowDefChanged = true;\n  }\n\n  /** Sets a no data row definition that was not included as a part of the content children. */\n  setNoDataRow(noDataRow: CdkNoDataRow | null) {\n    this._customNoDataRow = noDataRow;\n  }\n\n  /**\n   * Updates the header sticky styles. First resets all applied styles with respect to the cells\n   * sticking to the top. Then, evaluating which cells need to be stuck to the top. This is\n   * automatically called when the header row changes its displayed set of columns, or if its\n   * sticky input changes. May be called manually for cases where the cell content changes outside\n   * of these events.\n   */\n  updateStickyHeaderRowStyles(): void {\n    const headerRows = this._getRenderedRows(this._headerRowOutlet);\n\n    // Hide the thead element if there are no header rows. This is necessary to satisfy\n    // overzealous a11y checkers that fail because the `rowgroup` element does not contain\n    // required child `row`.\n    if (this._isNativeHtmlTable) {\n      const thead = closestTableSection(this._headerRowOutlet, 'thead');\n      if (thead) {\n        thead.style.display = headerRows.length ? '' : 'none';\n      }\n    }\n\n    const stickyStates = this._headerRowDefs.map(def => def.sticky);\n    this._stickyStyler.clearStickyPositioning(headerRows, ['top']);\n    this._stickyStyler.stickRows(headerRows, stickyStates, 'top');\n\n    // Reset the dirty state of the sticky input change since it has been used.\n    this._headerRowDefs.forEach(def => def.resetStickyChanged());\n  }\n\n  /**\n   * Updates the footer sticky styles. First resets all applied styles with respect to the cells\n   * sticking to the bottom. Then, evaluating which cells need to be stuck to the bottom. This is\n   * automatically called when the footer row changes its displayed set of columns, or if its\n   * sticky input changes. May be called manually for cases where the cell content changes outside\n   * of these events.\n   */\n  updateStickyFooterRowStyles(): void {\n    const footerRows = this._getRenderedRows(this._footerRowOutlet);\n\n    // Hide the tfoot element if there are no footer rows. This is necessary to satisfy\n    // overzealous a11y checkers that fail because the `rowgroup` element does not contain\n    // required child `row`.\n    if (this._isNativeHtmlTable) {\n      const tfoot = closestTableSection(this._footerRowOutlet, 'tfoot');\n      if (tfoot) {\n        tfoot.style.display = footerRows.length ? '' : 'none';\n      }\n    }\n\n    const stickyStates = this._footerRowDefs.map(def => def.sticky);\n    this._stickyStyler.clearStickyPositioning(footerRows, ['bottom']);\n    this._stickyStyler.stickRows(footerRows, stickyStates, 'bottom');\n    this._stickyStyler.updateStickyFooterContainer(this._elementRef.nativeElement, stickyStates);\n\n    // Reset the dirty state of the sticky input change since it has been used.\n    this._footerRowDefs.forEach(def => def.resetStickyChanged());\n  }\n\n  /**\n   * Updates the column sticky styles. First resets all applied styles with respect to the cells\n   * sticking to the left and right. Then sticky styles are added for the left and right according\n   * to the column definitions for each cell in each row. This is automatically called when\n   * the data source provides a new set of data or when a column definition changes its sticky\n   * input. May be called manually for cases where the cell content changes outside of these events.\n   */\n  updateStickyColumnStyles() {\n    const headerRows = this._getRenderedRows(this._headerRowOutlet);\n    const dataRows = this._getRenderedRows(this._rowOutlet);\n    const footerRows = this._getRenderedRows(this._footerRowOutlet);\n\n    // For tables not using a fixed layout, the column widths may change when new rows are rendered.\n    // In a table using a fixed layout, row content won't affect column width, so sticky styles\n    // don't need to be cleared unless either the sticky column config changes or one of the row\n    // defs change.\n    if ((this._isNativeHtmlTable && !this._fixedLayout) || this._stickyColumnStylesNeedReset) {\n      // Clear the left and right positioning from all columns in the table across all rows since\n      // sticky columns span across all table sections (header, data, footer)\n      this._stickyStyler.clearStickyPositioning(\n        [...headerRows, ...dataRows, ...footerRows],\n        ['left', 'right'],\n      );\n      this._stickyColumnStylesNeedReset = false;\n    }\n\n    // Update the sticky styles for each header row depending on the def's sticky state\n    headerRows.forEach((headerRow, i) => {\n      this._addStickyColumnStyles([headerRow], this._headerRowDefs[i]);\n    });\n\n    // Update the sticky styles for each data row depending on its def's sticky state\n    this._rowDefs.forEach(rowDef => {\n      // Collect all the rows rendered with this row definition.\n      const rows: HTMLElement[] = [];\n      for (let i = 0; i < dataRows.length; i++) {\n        if (this._renderRows[i].rowDef === rowDef) {\n          rows.push(dataRows[i]);\n        }\n      }\n\n      this._addStickyColumnStyles(rows, rowDef);\n    });\n\n    // Update the sticky styles for each footer row depending on the def's sticky state\n    footerRows.forEach((footerRow, i) => {\n      this._addStickyColumnStyles([footerRow], this._footerRowDefs[i]);\n    });\n\n    // Reset the dirty state of the sticky input change since it has been used.\n    Array.from(this._columnDefsByName.values()).forEach(def => def.resetStickyChanged());\n  }\n\n  /** Invoked whenever an outlet is created and has been assigned to the table. */\n  _outletAssigned(): void {\n    // Trigger the first render once all outlets have been assigned. We do it this way, as\n    // opposed to waiting for the next `ngAfterContentChecked`, because we don't know when\n    // the next change detection will happen.\n    // Also we can't use queries to resolve the outlets, because they're wrapped in a\n    // conditional, so we have to rely on them being assigned via DI.\n    if (\n      !this._hasAllOutlets &&\n      this._rowOutlet &&\n      this._headerRowOutlet &&\n      this._footerRowOutlet &&\n      this._noDataRowOutlet\n    ) {\n      this._hasAllOutlets = true;\n\n      // In some setups this may fire before `ngAfterContentInit`\n      // so we need a check here. See #28538.\n      if (this._canRender()) {\n        this._render();\n      }\n    }\n  }\n\n  /** Whether the table has all the information to start rendering. */\n  private _canRender(): boolean {\n    return this._hasAllOutlets && this._hasInitialized;\n  }\n\n  /** Renders the table if its state has changed. */\n  private _render(): void {\n    // Cache the row and column definitions gathered by ContentChildren and programmatic injection.\n    this._cacheRowDefs();\n    this._cacheColumnDefs();\n\n    // Make sure that the user has at least added header, footer, or data row def.\n    if (\n      !this._headerRowDefs.length &&\n      !this._footerRowDefs.length &&\n      !this._rowDefs.length &&\n      (typeof ngDevMode === 'undefined' || ngDevMode)\n    ) {\n      throw getTableMissingRowDefsError();\n    }\n\n    // Render updates if the list of columns have been changed for the header, row, or footer defs.\n    const columnsChanged = this._renderUpdatedColumns();\n    const rowDefsChanged = columnsChanged || this._headerRowDefChanged || this._footerRowDefChanged;\n    // Ensure sticky column styles are reset if set to `true` elsewhere.\n    this._stickyColumnStylesNeedReset = this._stickyColumnStylesNeedReset || rowDefsChanged;\n    this._forceRecalculateCellWidths = rowDefsChanged;\n\n    // If the header row definition has been changed, trigger a render to the header row.\n    if (this._headerRowDefChanged) {\n      this._forceRenderHeaderRows();\n      this._headerRowDefChanged = false;\n    }\n\n    // If the footer row definition has been changed, trigger a render to the footer row.\n    if (this._footerRowDefChanged) {\n      this._forceRenderFooterRows();\n      this._footerRowDefChanged = false;\n    }\n\n    // If there is a data source and row definitions, connect to the data source unless a\n    // connection has already been made.\n    if (this.dataSource && this._rowDefs.length > 0 && !this._renderChangeSubscription) {\n      this._observeRenderChanges();\n    } else if (this._stickyColumnStylesNeedReset) {\n      // In the above case, _observeRenderChanges will result in updateStickyColumnStyles being\n      // called when it row data arrives. Otherwise, we need to call it proactively.\n      this.updateStickyColumnStyles();\n    }\n\n    this._checkStickyStates();\n  }\n\n  /**\n   * Get the list of RenderRow objects to render according to the current list of data and defined\n   * row definitions. If the previous list already contained a particular pair, it should be reused\n   * so that the differ equates their references.\n   */\n  private _getAllRenderRows(): RenderRow<T>[] {\n    const renderRows: RenderRow<T>[] = [];\n\n    // Store the cache and create a new one. Any re-used RenderRow objects will be moved into the\n    // new cache while unused ones can be picked up by garbage collection.\n    const prevCachedRenderRows = this._cachedRenderRowsMap;\n    this._cachedRenderRowsMap = new Map();\n\n    // For each data object, get the list of rows that should be rendered, represented by the\n    // respective `RenderRow` object which is the pair of `data` and `CdkRowDef`.\n    for (let i = 0; i < this._data.length; i++) {\n      let data = this._data[i];\n      const renderRowsForData = this._getRenderRowsForData(data, i, prevCachedRenderRows.get(data));\n\n      if (!this._cachedRenderRowsMap.has(data)) {\n        this._cachedRenderRowsMap.set(data, new WeakMap());\n      }\n\n      for (let j = 0; j < renderRowsForData.length; j++) {\n        let renderRow = renderRowsForData[j];\n\n        const cache = this._cachedRenderRowsMap.get(renderRow.data)!;\n        if (cache.has(renderRow.rowDef)) {\n          cache.get(renderRow.rowDef)!.push(renderRow);\n        } else {\n          cache.set(renderRow.rowDef, [renderRow]);\n        }\n        renderRows.push(renderRow);\n      }\n    }\n\n    return renderRows;\n  }\n\n  /**\n   * Gets a list of `RenderRow<T>` for the provided data object and any `CdkRowDef` objects that\n   * should be rendered for this data. Reuses the cached RenderRow objects if they match the same\n   * `(T, CdkRowDef)` pair.\n   */\n  private _getRenderRowsForData(\n    data: T,\n    dataIndex: number,\n    cache?: WeakMap<CdkRowDef<T>, RenderRow<T>[]>,\n  ): RenderRow<T>[] {\n    const rowDefs = this._getRowDefs(data, dataIndex);\n\n    return rowDefs.map(rowDef => {\n      const cachedRenderRows = cache && cache.has(rowDef) ? cache.get(rowDef)! : [];\n      if (cachedRenderRows.length) {\n        const dataRow = cachedRenderRows.shift()!;\n        dataRow.dataIndex = dataIndex;\n        return dataRow;\n      } else {\n        return {data, rowDef, dataIndex};\n      }\n    });\n  }\n\n  /** Update the map containing the content's column definitions. */\n  private _cacheColumnDefs() {\n    this._columnDefsByName.clear();\n\n    const columnDefs = mergeArrayAndSet(\n      this._getOwnDefs(this._contentColumnDefs),\n      this._customColumnDefs,\n    );\n    columnDefs.forEach(columnDef => {\n      if (\n        this._columnDefsByName.has(columnDef.name) &&\n        (typeof ngDevMode === 'undefined' || ngDevMode)\n      ) {\n        throw getTableDuplicateColumnNameError(columnDef.name);\n      }\n      this._columnDefsByName.set(columnDef.name, columnDef);\n    });\n  }\n\n  /** Update the list of all available row definitions that can be used. */\n  private _cacheRowDefs() {\n    this._headerRowDefs = mergeArrayAndSet(\n      this._getOwnDefs(this._contentHeaderRowDefs),\n      this._customHeaderRowDefs,\n    );\n    this._footerRowDefs = mergeArrayAndSet(\n      this._getOwnDefs(this._contentFooterRowDefs),\n      this._customFooterRowDefs,\n    );\n    this._rowDefs = mergeArrayAndSet(this._getOwnDefs(this._contentRowDefs), this._customRowDefs);\n\n    // After all row definitions are determined, find the row definition to be considered default.\n    const defaultRowDefs = this._rowDefs.filter(def => !def.when);\n    if (\n      !this.multiTemplateDataRows &&\n      defaultRowDefs.length > 1 &&\n      (typeof ngDevMode === 'undefined' || ngDevMode)\n    ) {\n      throw getTableMultipleDefaultRowDefsError();\n    }\n    this._defaultRowDef = defaultRowDefs[0];\n  }\n\n  /**\n   * Check if the header, data, or footer rows have changed what columns they want to display or\n   * whether the sticky states have changed for the header or footer. If there is a diff, then\n   * re-render that section.\n   */\n  private _renderUpdatedColumns(): boolean {\n    const columnsDiffReducer = (acc: boolean, def: BaseRowDef) => {\n      // The differ should be run for every column, even if `acc` is already\n      // true (see #29922)\n      const diff = !!def.getColumnsDiff();\n      return acc || diff;\n    };\n\n    // Force re-render data rows if the list of column definitions have changed.\n    const dataColumnsChanged = this._rowDefs.reduce(columnsDiffReducer, false);\n    if (dataColumnsChanged) {\n      this._forceRenderDataRows();\n    }\n\n    // Force re-render header/footer rows if the list of column definitions have changed.\n    const headerColumnsChanged = this._headerRowDefs.reduce(columnsDiffReducer, false);\n    if (headerColumnsChanged) {\n      this._forceRenderHeaderRows();\n    }\n\n    const footerColumnsChanged = this._footerRowDefs.reduce(columnsDiffReducer, false);\n    if (footerColumnsChanged) {\n      this._forceRenderFooterRows();\n    }\n\n    return dataColumnsChanged || headerColumnsChanged || footerColumnsChanged;\n  }\n\n  /**\n   * Switch to the provided data source by resetting the data and unsubscribing from the current\n   * render change subscription if one exists. If the data source is null, interpret this by\n   * clearing the row outlet. Otherwise start listening for new data.\n   */\n  private _switchDataSource(dataSource: CdkTableDataSourceInput<T>) {\n    this._data = [];\n\n    if (isDataSource(this.dataSource)) {\n      this.dataSource.disconnect(this);\n    }\n\n    // Stop listening for data from the previous data source.\n    if (this._renderChangeSubscription) {\n      this._renderChangeSubscription.unsubscribe();\n      this._renderChangeSubscription = null;\n    }\n\n    if (!dataSource) {\n      if (this._dataDiffer) {\n        this._dataDiffer.diff([]);\n      }\n      if (this._rowOutlet) {\n        this._rowOutlet.viewContainer.clear();\n      }\n    }\n\n    this._dataSource = dataSource;\n  }\n\n  /** Set up a subscription for the data provided by the data source. */\n  private _observeRenderChanges() {\n    // If no data source has been set, there is nothing to observe for changes.\n    if (!this.dataSource) {\n      return;\n    }\n\n    let dataStream: Observable<readonly T[]> | undefined;\n\n    if (isDataSource(this.dataSource)) {\n      dataStream = this.dataSource.connect(this);\n    } else if (isObservable(this.dataSource)) {\n      dataStream = this.dataSource;\n    } else if (Array.isArray(this.dataSource)) {\n      dataStream = observableOf(this.dataSource);\n    }\n\n    if (dataStream === undefined && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n      throw getTableUnknownDataSourceError();\n    }\n\n    this._renderChangeSubscription = dataStream!\n      .pipe(takeUntil(this._onDestroy))\n      .subscribe(data => {\n        this._data = data || [];\n        this.renderRows();\n      });\n  }\n\n  /**\n   * Clears any existing content in the header row outlet and creates a new embedded view\n   * in the outlet using the header row definition.\n   */\n  private _forceRenderHeaderRows() {\n    // Clear the header row outlet if any content exists.\n    if (this._headerRowOutlet.viewContainer.length > 0) {\n      this._headerRowOutlet.viewContainer.clear();\n    }\n\n    this._headerRowDefs.forEach((def, i) => this._renderRow(this._headerRowOutlet, def, i));\n    this.updateStickyHeaderRowStyles();\n  }\n\n  /**\n   * Clears any existing content in the footer row outlet and creates a new embedded view\n   * in the outlet using the footer row definition.\n   */\n  private _forceRenderFooterRows() {\n    // Clear the footer row outlet if any content exists.\n    if (this._footerRowOutlet.viewContainer.length > 0) {\n      this._footerRowOutlet.viewContainer.clear();\n    }\n\n    this._footerRowDefs.forEach((def, i) => this._renderRow(this._footerRowOutlet, def, i));\n    this.updateStickyFooterRowStyles();\n  }\n\n  /** Adds the sticky column styles for the rows according to the columns' stick states. */\n  private _addStickyColumnStyles(rows: HTMLElement[], rowDef: BaseRowDef) {\n    const columnDefs = Array.from(rowDef?.columns || []).map(columnName => {\n      const columnDef = this._columnDefsByName.get(columnName);\n      if (!columnDef && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n        throw getTableUnknownColumnError(columnName);\n      }\n      return columnDef!;\n    });\n    const stickyStartStates = columnDefs.map(columnDef => columnDef.sticky);\n    const stickyEndStates = columnDefs.map(columnDef => columnDef.stickyEnd);\n    this._stickyStyler.updateStickyColumns(\n      rows,\n      stickyStartStates,\n      stickyEndStates,\n      !this._fixedLayout || this._forceRecalculateCellWidths,\n    );\n  }\n\n  /** Gets the list of rows that have been rendered in the row outlet. */\n  _getRenderedRows(rowOutlet: RowOutlet): HTMLElement[] {\n    const renderedRows: HTMLElement[] = [];\n\n    for (let i = 0; i < rowOutlet.viewContainer.length; i++) {\n      const viewRef = rowOutlet.viewContainer.get(i)! as EmbeddedViewRef<any>;\n      renderedRows.push(viewRef.rootNodes[0]);\n    }\n\n    return renderedRows;\n  }\n\n  /**\n   * Get the matching row definitions that should be used for this row data. If there is only\n   * one row definition, it is returned. Otherwise, find the row definitions that has a when\n   * predicate that returns true with the data. If none return true, return the default row\n   * definition.\n   */\n  _getRowDefs(data: T, dataIndex: number): CdkRowDef<T>[] {\n    if (this._rowDefs.length == 1) {\n      return [this._rowDefs[0]];\n    }\n\n    let rowDefs: CdkRowDef<T>[] = [];\n    if (this.multiTemplateDataRows) {\n      rowDefs = this._rowDefs.filter(def => !def.when || def.when(dataIndex, data));\n    } else {\n      let rowDef =\n        this._rowDefs.find(def => def.when && def.when(dataIndex, data)) || this._defaultRowDef;\n      if (rowDef) {\n        rowDefs.push(rowDef);\n      }\n    }\n\n    if (!rowDefs.length && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n      throw getTableMissingMatchingRowDefError(data);\n    }\n\n    return rowDefs;\n  }\n\n  private _getEmbeddedViewArgs(\n    renderRow: RenderRow<T>,\n    index: number,\n  ): _ViewRepeaterItemInsertArgs<RowContext<T>> {\n    const rowDef = renderRow.rowDef;\n    const context: RowContext<T> = {$implicit: renderRow.data};\n    return {\n      templateRef: rowDef.template,\n      context,\n      index,\n    };\n  }\n\n  /**\n   * Creates a new row template in the outlet and fills it with the set of cell templates.\n   * Optionally takes a context to provide to the row and cells, as well as an optional index\n   * of where to place the new row template in the outlet.\n   */\n  private _renderRow(\n    outlet: RowOutlet,\n    rowDef: BaseRowDef,\n    index: number,\n    context: RowContext<T> = {},\n  ): EmbeddedViewRef<RowContext<T>> {\n    // TODO(andrewseguin): enforce that one outlet was instantiated from createEmbeddedView\n    const view = outlet.viewContainer.createEmbeddedView(rowDef.template, context, index);\n    this._renderCellTemplateForItem(rowDef, context);\n    return view;\n  }\n\n  private _renderCellTemplateForItem(rowDef: BaseRowDef, context: RowContext<T>) {\n    for (let cellTemplate of this._getCellTemplates(rowDef)) {\n      if (CdkCellOutlet.mostRecentCellOutlet) {\n        CdkCellOutlet.mostRecentCellOutlet._viewContainer.createEmbeddedView(cellTemplate, context);\n      }\n    }\n\n    this._changeDetectorRef.markForCheck();\n  }\n\n  /**\n   * Updates the index-related context for each row to reflect any changes in the index of the rows,\n   * e.g. first/last/even/odd.\n   */\n  private _updateRowIndexContext() {\n    const viewContainer = this._rowOutlet.viewContainer;\n    for (let renderIndex = 0, count = viewContainer.length; renderIndex < count; renderIndex++) {\n      const viewRef = viewContainer.get(renderIndex) as RowViewRef<T>;\n      const context = viewRef.context as RowContext<T>;\n      context.count = count;\n      context.first = renderIndex === 0;\n      context.last = renderIndex === count - 1;\n      context.even = renderIndex % 2 === 0;\n      context.odd = !context.even;\n\n      if (this.multiTemplateDataRows) {\n        context.dataIndex = this._renderRows[renderIndex].dataIndex;\n        context.renderIndex = renderIndex;\n      } else {\n        context.index = this._renderRows[renderIndex].dataIndex;\n      }\n    }\n  }\n\n  /** Gets the column definitions for the provided row def. */\n  private _getCellTemplates(rowDef: BaseRowDef): TemplateRef<any>[] {\n    if (!rowDef || !rowDef.columns) {\n      return [];\n    }\n    return Array.from(rowDef.columns, columnId => {\n      const column = this._columnDefsByName.get(columnId);\n\n      if (!column && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n        throw getTableUnknownColumnError(columnId);\n      }\n\n      return rowDef.extractCellTemplate(column!);\n    });\n  }\n\n  /**\n   * Forces a re-render of the data rows. Should be called in cases where there has been an input\n   * change that affects the evaluation of which rows should be rendered, e.g. toggling\n   * `multiTemplateDataRows` or adding/removing row definitions.\n   */\n  private _forceRenderDataRows() {\n    this._dataDiffer.diff([]);\n    this._rowOutlet.viewContainer.clear();\n    this.renderRows();\n  }\n\n  /**\n   * Checks if there has been a change in sticky states since last check and applies the correct\n   * sticky styles. Since checking resets the \"dirty\" state, this should only be performed once\n   * during a change detection and after the inputs are settled (after content check).\n   */\n  private _checkStickyStates() {\n    const stickyCheckReducer = (\n      acc: boolean,\n      d: CdkHeaderRowDef | CdkFooterRowDef | CdkColumnDef,\n    ) => {\n      return acc || d.hasStickyChanged();\n    };\n\n    // Note that the check needs to occur for every definition since it notifies the definition\n    // that it can reset its dirty state. Using another operator like `some` may short-circuit\n    // remaining definitions and leave them in an unchecked state.\n\n    if (this._headerRowDefs.reduce(stickyCheckReducer, false)) {\n      this.updateStickyHeaderRowStyles();\n    }\n\n    if (this._footerRowDefs.reduce(stickyCheckReducer, false)) {\n      this.updateStickyFooterRowStyles();\n    }\n\n    if (Array.from(this._columnDefsByName.values()).reduce(stickyCheckReducer, false)) {\n      this._stickyColumnStylesNeedReset = true;\n      this.updateStickyColumnStyles();\n    }\n  }\n\n  /**\n   * Creates the sticky styler that will be used for sticky rows and columns. Listens\n   * for directionality changes and provides the latest direction to the styler. Re-applies column\n   * stickiness when directionality changes.\n   */\n  private _setupStickyStyler() {\n    const direction: Direction = this._dir ? this._dir.value : 'ltr';\n    this._stickyStyler = new StickyStyler(\n      this._isNativeHtmlTable,\n      this.stickyCssClass,\n      direction,\n      this._coalescedStyleScheduler,\n      this._platform.isBrowser,\n      this.needsPositionStickyOnElement,\n      this._stickyPositioningListener,\n      this._injector,\n    );\n    (this._dir ? this._dir.change : observableOf<Direction>())\n      .pipe(takeUntil(this._onDestroy))\n      .subscribe(value => {\n        this._stickyStyler.direction = value;\n        this.updateStickyColumnStyles();\n      });\n  }\n\n  /** Filters definitions that belong to this table from a QueryList. */\n  private _getOwnDefs<I extends {_table?: any}>(items: QueryList<I>): I[] {\n    return items.filter(item => !item._table || item._table === this);\n  }\n\n  /** Creates or removes the no data row, depending on whether any data is being shown. */\n  private _updateNoDataRow() {\n    const noDataRow = this._customNoDataRow || this._noDataRow;\n\n    if (!noDataRow) {\n      return;\n    }\n\n    const shouldShow = this._rowOutlet.viewContainer.length === 0;\n\n    if (shouldShow === this._isShowingNoDataRow) {\n      return;\n    }\n\n    const container = this._noDataRowOutlet.viewContainer;\n\n    if (shouldShow) {\n      const view = container.createEmbeddedView(noDataRow.templateRef);\n      const rootNode: HTMLElement | undefined = view.rootNodes[0];\n\n      // Only add the attributes if we have a single root node since it's hard\n      // to figure out which one to add it to when there are multiple.\n      if (view.rootNodes.length === 1 && rootNode?.nodeType === this._document.ELEMENT_NODE) {\n        rootNode.setAttribute('role', 'row');\n        rootNode.classList.add(noDataRow._contentClassName);\n      }\n    } else {\n      container.clear();\n    }\n\n    this._isShowingNoDataRow = shouldShow;\n\n    this._changeDetectorRef.markForCheck();\n  }\n}\n\n/** Utility function that gets a merged list of the entries in an array and values of a Set. */\nfunction mergeArrayAndSet<T>(array: T[], set: Set<T>): T[] {\n  return array.concat(Array.from(set));\n}\n\n/**\n * Finds the closest table section to an outlet. We can't use `HTMLElement.closest` for this,\n * because the node representing the outlet is a comment.\n */\nfunction closestTableSection(outlet: RowOutlet, section: string): HTMLElement | null {\n  const uppercaseSection = section.toUpperCase();\n  let current: Node | null = outlet.viewContainer.element.nativeElement;\n\n  while (current) {\n    // 1 is an element node.\n    const nodeName = current.nodeType === 1 ? (current as HTMLElement).nodeName : null;\n    if (nodeName === uppercaseSection) {\n      return current as HTMLElement;\n    } else if (nodeName === 'TABLE') {\n      // Stop traversing past the `table` node.\n      break;\n    }\n    current = current.parentNode;\n  }\n\n  return null;\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.dev/license\n */\n\nimport {\n  ChangeDetectionStrategy,\n  Component,\n  Input,\n  OnDestroy,\n  OnInit,\n  ViewChild,\n  ViewEncapsulation,\n  inject,\n} from '@angular/core';\nimport {CdkCellDef, CdkColumnDef, CdkHeaderCellDef, CdkHeaderCell, CdkCell} from './cell';\nimport {CdkTable} from './table';\nimport {\n  getTableTextColumnMissingParentTableError,\n  getTableTextColumnMissingNameError,\n} from './table-errors';\nimport {TEXT_COLUMN_OPTIONS, TextColumnOptions} from './tokens';\n\n/**\n * Column that simply shows text content for the header and row cells. Assumes that the table\n * is using the native table implementation (`<table>`).\n *\n * By default, the name of this column will be the header text and data property accessor.\n * The header text can be overridden with the `headerText` input. Cell values can be overridden with\n * the `dataAccessor` input. Change the text justification to the start or end using the `justify`\n * input.\n */\n@Component({\n  selector: 'cdk-text-column',\n  template: `\n    <ng-container cdkColumnDef>\n      <th cdk-header-cell *cdkHeaderCellDef [style.text-align]=\"justify\">\n        {{headerText}}\n      </th>\n      <td cdk-cell *cdkCellDef=\"let data\" [style.text-align]=\"justify\">\n        {{dataAccessor(data, name)}}\n      </td>\n    </ng-container>\n  `,\n  encapsulation: ViewEncapsulation.None,\n  // Change detection is intentionally not set to OnPush. This component's template will be provided\n  // to the table to be inserted into its view. This is problematic when change detection runs since\n  // the bindings in this template will be evaluated _after_ the table's view is evaluated, which\n  // mean's the template in the table's view will not have the updated value (and in fact will cause\n  // an ExpressionChangedAfterItHasBeenCheckedError).\n  // tslint:disable-next-line:validate-decorators\n  changeDetection: ChangeDetectionStrategy.Default,\n  imports: [CdkColumnDef, CdkHeaderCellDef, CdkHeaderCell, CdkCellDef, CdkCell],\n})\nexport class CdkTextColumn<T> implements OnDestroy, OnInit {\n  private _table = inject<CdkTable<T>>(CdkTable, {optional: true});\n  private _options = inject<TextColumnOptions<T>>(TEXT_COLUMN_OPTIONS, {optional: true})!;\n\n  /** Column name that should be used to reference this column. */\n  @Input()\n  get name(): string {\n    return this._name;\n  }\n  set name(name: string) {\n    this._name = name;\n\n    // With Ivy, inputs can be initialized before static query results are\n    // available. In that case, we defer the synchronization until \"ngOnInit\" fires.\n    this._syncColumnDefName();\n  }\n  _name: string;\n\n  /**\n   * Text label that should be used for the column header. If this property is not\n   * set, the header text will default to the column name with its first letter capitalized.\n   */\n  @Input() headerText: string;\n\n  /**\n   * Accessor function to retrieve the data rendered for each cell. If this\n   * property is not set, the data cells will render the value found in the data's property matching\n   * the column's name. For example, if the column is named `id`, then the rendered value will be\n   * value defined by the data's `id` property.\n   */\n  @Input() dataAccessor: (data: T, name: string) => string;\n\n  /** Alignment of the cell values. */\n  @Input() justify: 'start' | 'end' | 'center' = 'start';\n\n  /** @docs-private */\n  @ViewChild(CdkColumnDef, {static: true}) columnDef: CdkColumnDef;\n\n  /**\n   * The column cell is provided to the column during `ngOnInit` with a static query.\n   * Normally, this will be retrieved by the column using `ContentChild`, but that assumes the\n   * column definition was provided in the same view as the table, which is not the case with this\n   * component.\n   * @docs-private\n   */\n  @ViewChild(CdkCellDef, {static: true}) cell: CdkCellDef;\n\n  /**\n   * The column headerCell is provided to the column during `ngOnInit` with a static query.\n   * Normally, this will be retrieved by the column using `ContentChild`, but that assumes the\n   * column definition was provided in the same view as the table, which is not the case with this\n   * component.\n   * @docs-private\n   */\n  @ViewChild(CdkHeaderCellDef, {static: true}) headerCell: CdkHeaderCellDef;\n\n  constructor(...args: unknown[]);\n\n  constructor() {\n    this._options = this._options || {};\n  }\n\n  ngOnInit() {\n    this._syncColumnDefName();\n\n    if (this.headerText === undefined) {\n      this.headerText = this._createDefaultHeaderText();\n    }\n\n    if (!this.dataAccessor) {\n      this.dataAccessor =\n        this._options.defaultDataAccessor || ((data: T, name: string) => (data as any)[name]);\n    }\n\n    if (this._table) {\n      // Provide the cell and headerCell directly to the table with the static `ViewChild` query,\n      // since the columnDef will not pick up its content by the time the table finishes checking\n      // its content and initializing the rows.\n      this.columnDef.cell = this.cell;\n      this.columnDef.headerCell = this.headerCell;\n      this._table.addColumnDef(this.columnDef);\n    } else if (typeof ngDevMode === 'undefined' || ngDevMode) {\n      throw getTableTextColumnMissingParentTableError();\n    }\n  }\n\n  ngOnDestroy() {\n    if (this._table) {\n      this._table.removeColumnDef(this.columnDef);\n    }\n  }\n\n  /**\n   * Creates a default header text. Use the options' header text transformation function if one\n   * has been provided. Otherwise simply capitalize the column name.\n   */\n  _createDefaultHeaderText() {\n    const name = this.name;\n\n    if (!name && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n      throw getTableTextColumnMissingNameError();\n    }\n\n    if (this._options && this._options.defaultHeaderTextTransform) {\n      return this._options.defaultHeaderTextTransform(name);\n    }\n\n    return name[0].toUpperCase() + name.slice(1);\n  }\n\n  /** Synchronizes the column definition name with the text column name. */\n  private _syncColumnDefName() {\n    if (this.columnDef) {\n      this.columnDef.name = this.name;\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.dev/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {\n  HeaderRowOutlet,\n  DataRowOutlet,\n  CdkTable,\n  CdkRecycleRows,\n  FooterRowOutlet,\n  NoDataRowOutlet,\n} from './table';\nimport {\n  CdkCellOutlet,\n  CdkFooterRow,\n  CdkFooterRowDef,\n  CdkHeaderRow,\n  CdkHeaderRowDef,\n  CdkRow,\n  CdkRowDef,\n  CdkNoDataRow,\n} from './row';\nimport {\n  CdkColumnDef,\n  CdkHeaderCellDef,\n  CdkHeaderCell,\n  CdkCell,\n  CdkCellDef,\n  CdkFooterCellDef,\n  CdkFooterCell,\n} from './cell';\nimport {CdkTextColumn} from './text-column';\nimport {ScrollingModule} from '../scrolling';\n\nconst EXPORTED_DECLARATIONS = [\n  CdkTable,\n  CdkRowDef,\n  CdkCellDef,\n  CdkCellOutlet,\n  CdkHeaderCellDef,\n  CdkFooterCellDef,\n  CdkColumnDef,\n  CdkCell,\n  CdkRow,\n  CdkHeaderCell,\n  CdkFooterCell,\n  CdkHeaderRow,\n  CdkHeaderRowDef,\n  CdkFooterRow,\n  CdkFooterRowDef,\n  DataRowOutlet,\n  HeaderRowOutlet,\n  FooterRowOutlet,\n  CdkTextColumn,\n  CdkNoDataRow,\n  CdkRecycleRows,\n  NoDataRowOutlet,\n];\n\n@NgModule({\n  exports: EXPORTED_DECLARATIONS,\n  imports: [ScrollingModule, ...EXPORTED_DECLARATIONS],\n})\nexport class CdkTableModule {}\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.dev/license\n */\n\nimport {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\n\n/** @docs-private */\nexport type Constructor<T> = new (...args: any[]) => T;\n\n/**\n * Interface for a mixin to provide a directive with a function that checks if the sticky input has\n * been changed since the last time the function was called. Essentially adds a dirty-check to the\n * sticky value.\n * @docs-private\n */\nexport interface CanStick {\n  /** Whether sticky positioning should be applied. */\n  sticky: boolean;\n\n  /** Whether the sticky value has changed since this was last called. */\n  hasStickyChanged(): boolean;\n\n  /** Resets the dirty check for cases where the sticky state has been used without checking. */\n  resetStickyChanged(): void;\n}\n\n/** @docs-private */\nexport type CanStickCtor = Constructor<CanStick>;\n\n/**\n * Mixin to provide a directive with a function that checks if the sticky input has been\n * changed since the last time the function was called. Essentially adds a dirty-check to the\n * sticky value.\n * @docs-private\n * @deprecated Implement the `CanStick` interface instead.\n * @breaking-change 19.0.0\n */\nexport function mixinHasStickyInput<T extends Constructor<{}>>(base: T): CanStickCtor & T {\n  return class extends base {\n    /** Whether sticky positioning should be applied. */\n    get sticky(): boolean {\n      return this._sticky;\n    }\n    set sticky(v: BooleanInput) {\n      const prevValue = this._sticky;\n      this._sticky = coerceBooleanProperty(v);\n      this._hasStickyChanged = prevValue !== this._sticky;\n    }\n    _sticky: boolean = false;\n\n    /** Whether the sticky input has changed since it was last checked. */\n    _hasStickyChanged: boolean = false;\n\n    /** Whether the sticky value has changed since this was last called. */\n    hasStickyChanged(): boolean {\n      const hasStickyChanged = this._hasStickyChanged;\n      this._hasStickyChanged = false;\n      return hasStickyChanged;\n    }\n\n    /** Resets the dirty check for cases where the sticky state has been used without checking. */\n    resetStickyChanged() {\n      this._hasStickyChanged = false;\n    }\n\n    constructor(...args: any[]) {\n      super(...args);\n    }\n  };\n}\n"],"names":["observableOf"],"mappings":";;;;;;;;;;;;;;;;;AAUA;;;AAGG;MACU,SAAS,GAAG,IAAI,cAAc,CAAM,WAAW,EAAC;AAc7D;MACa,mBAAmB,GAAG,IAAI,cAAc,CACnD,qBAAqB;;ACLvB;;;AAGG;MAIU,UAAU,CAAA;;AAErB,IAAA,QAAQ,GAAG,MAAM,CAAmB,WAAW,CAAC,CAAA;AAGhD,IAAA,WAAA,GAAA,GAAe;uGALJ,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,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