{"version":3,"file":"drag-drop.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/dom/clone-node.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/dom/dom-rect.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/dom/parent-position-tracker.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/dom/root-node.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/dom/styling.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/drag-drop-registry.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/dom/transition-duration.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/preview-ref.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/drag-ref.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/drag-utils.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/sorting/single-axis-sort-strategy.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/sorting/mixed-sort-strategy.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/drop-list-ref.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/drag-drop.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/drag-parent.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/directives/assertions.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/directives/drag-handle.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/directives/config.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/directives/drag.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/directives/drop-list-group.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/directives/drop-list.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/directives/drag-preview.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/directives/drag-placeholder.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk/drag-drop/drag-drop-module.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\n/** Creates a deep clone of an element. */\nexport function deepCloneNode(node: HTMLElement): HTMLElement {\n  const clone = node.cloneNode(true) as HTMLElement;\n  const descendantsWithId = clone.querySelectorAll('[id]');\n  const nodeName = node.nodeName.toLowerCase();\n\n  // Remove the `id` to avoid having multiple elements with the same id on the page.\n  clone.removeAttribute('id');\n\n  for (let i = 0; i < descendantsWithId.length; i++) {\n    descendantsWithId[i].removeAttribute('id');\n  }\n\n  if (nodeName === 'canvas') {\n    transferCanvasData(node as HTMLCanvasElement, clone as HTMLCanvasElement);\n  } else if (nodeName === 'input' || nodeName === 'select' || nodeName === 'textarea') {\n    transferInputData(node as HTMLInputElement, clone as HTMLInputElement);\n  }\n\n  transferData('canvas', node, clone, transferCanvasData);\n  transferData('input, textarea, select', node, clone, transferInputData);\n  return clone;\n}\n\n/** Matches elements between an element and its clone and allows for their data to be cloned. */\nfunction transferData<T extends Element>(\n  selector: string,\n  node: HTMLElement,\n  clone: HTMLElement,\n  callback: (source: T, clone: T) => void,\n) {\n  const descendantElements = node.querySelectorAll<T>(selector);\n\n  if (descendantElements.length) {\n    const cloneElements = clone.querySelectorAll<T>(selector);\n\n    for (let i = 0; i < descendantElements.length; i++) {\n      callback(descendantElements[i], cloneElements[i]);\n    }\n  }\n}\n\n// Counter for unique cloned radio button names.\nlet cloneUniqueId = 0;\n\n/** Transfers the data of one input element to another. */\nfunction transferInputData(\n  source: Element & {value: string},\n  clone: Element & {value: string; name: string; type: string},\n) {\n  // Browsers throw an error when assigning the value of a file input programmatically.\n  if (clone.type !== 'file') {\n    clone.value = source.value;\n  }\n\n  // Radio button `name` attributes must be unique for radio button groups\n  // otherwise original radio buttons can lose their checked state\n  // once the clone is inserted in the DOM.\n  if (clone.type === 'radio' && clone.name) {\n    clone.name = `mat-clone-${clone.name}-${cloneUniqueId++}`;\n  }\n}\n\n/** Transfers the data of one canvas element to another. */\nfunction transferCanvasData(source: HTMLCanvasElement, clone: HTMLCanvasElement) {\n  const context = clone.getContext('2d');\n\n  if (context) {\n    // In some cases `drawImage` can throw (e.g. if the canvas size is 0x0).\n    // We can't do much about it so just ignore the error.\n    try {\n      context.drawImage(source, 0, 0);\n    } catch {}\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/** Gets a mutable version of an element's bounding `DOMRect`. */\nexport function getMutableClientRect(element: Element): DOMRect {\n  const rect = element.getBoundingClientRect();\n\n  // We need to clone the `clientRect` here, because all the values on it are readonly\n  // and we need to be able to update them. Also we can't use a spread here, because\n  // the values on a `DOMRect` aren't own properties. See:\n  // https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect#Notes\n  return {\n    top: rect.top,\n    right: rect.right,\n    bottom: rect.bottom,\n    left: rect.left,\n    width: rect.width,\n    height: rect.height,\n    x: rect.x,\n    y: rect.y,\n  } as DOMRect;\n}\n\n/**\n * Checks whether some coordinates are within a `DOMRect`.\n * @param clientRect DOMRect that is being checked.\n * @param x Coordinates along the X axis.\n * @param y Coordinates along the Y axis.\n */\nexport function isInsideClientRect(clientRect: DOMRect, x: number, y: number) {\n  const {top, bottom, left, right} = clientRect;\n  return y >= top && y <= bottom && x >= left && x <= right;\n}\n\n/**\n * Checks if the child element is overflowing from its parent.\n * @param parentRect - The bounding rect of the parent element.\n * @param childRect - The bounding rect of the child element.\n */\nexport function isOverflowingParent(parentRect: DOMRect, childRect: DOMRect): boolean {\n  // check for horizontal overflow (left and right)\n  const isLeftOverflowing = childRect.left < parentRect.left;\n  const isRightOverflowing = childRect.left + childRect.width > parentRect.right;\n\n  // check for vertical overflow (top and bottom)\n  const isTopOverflowing = childRect.top < parentRect.top;\n  const isBottomOverflowing = childRect.top + childRect.height > parentRect.bottom;\n\n  return isLeftOverflowing || isRightOverflowing || isTopOverflowing || isBottomOverflowing;\n}\n\n/**\n * Updates the top/left positions of a `DOMRect`, as well as their bottom/right counterparts.\n * @param domRect `DOMRect` that should be updated.\n * @param top Amount to add to the `top` position.\n * @param left Amount to add to the `left` position.\n */\nexport function adjustDomRect(\n  domRect: {\n    top: number;\n    bottom: number;\n    left: number;\n    right: number;\n    width: number;\n    height: number;\n  },\n  top: number,\n  left: number,\n) {\n  domRect.top += top;\n  domRect.bottom = domRect.top + domRect.height;\n\n  domRect.left += left;\n  domRect.right = domRect.left + domRect.width;\n}\n\n/**\n * Checks whether the pointer coordinates are close to a DOMRect.\n * @param rect DOMRect to check against.\n * @param threshold Threshold around the DOMRect.\n * @param pointerX Coordinates along the X axis.\n * @param pointerY Coordinates along the Y axis.\n */\nexport function isPointerNearDomRect(\n  rect: DOMRect,\n  threshold: number,\n  pointerX: number,\n  pointerY: number,\n): boolean {\n  const {top, right, bottom, left, width, height} = rect;\n  const xThreshold = width * threshold;\n  const yThreshold = height * threshold;\n\n  return (\n    pointerY > top - yThreshold &&\n    pointerY < bottom + yThreshold &&\n    pointerX > left - xThreshold &&\n    pointerX < right + xThreshold\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 {_getEventTarget} from '../../platform';\nimport {getMutableClientRect, adjustDomRect} from './dom-rect';\n\n/** Object holding the scroll position of something. */\ninterface ScrollPosition {\n  top: number;\n  left: number;\n}\n\n/** Keeps track of the scroll position and dimensions of the parents of an element. */\nexport class ParentPositionTracker {\n  /** Cached positions of the scrollable parent elements. */\n  readonly positions = new Map<\n    Document | HTMLElement,\n    {\n      scrollPosition: ScrollPosition;\n      clientRect?: DOMRect;\n    }\n  >();\n\n  constructor(private _document: Document) {}\n\n  /** Clears the cached positions. */\n  clear() {\n    this.positions.clear();\n  }\n\n  /** Caches the positions. Should be called at the beginning of a drag sequence. */\n  cache(elements: readonly HTMLElement[]) {\n    this.clear();\n    this.positions.set(this._document, {\n      scrollPosition: this.getViewportScrollPosition(),\n    });\n\n    elements.forEach(element => {\n      this.positions.set(element, {\n        scrollPosition: {top: element.scrollTop, left: element.scrollLeft},\n        clientRect: getMutableClientRect(element),\n      });\n    });\n  }\n\n  /** Handles scrolling while a drag is taking place. */\n  handleScroll(event: Event): ScrollPosition | null {\n    const target = _getEventTarget<HTMLElement | Document>(event)!;\n    const cachedPosition = this.positions.get(target);\n\n    if (!cachedPosition) {\n      return null;\n    }\n\n    const scrollPosition = cachedPosition.scrollPosition;\n    let newTop: number;\n    let newLeft: number;\n\n    if (target === this._document) {\n      const viewportScrollPosition = this.getViewportScrollPosition();\n      newTop = viewportScrollPosition.top;\n      newLeft = viewportScrollPosition.left;\n    } else {\n      newTop = (target as HTMLElement).scrollTop;\n      newLeft = (target as HTMLElement).scrollLeft;\n    }\n\n    const topDifference = scrollPosition.top - newTop;\n    const leftDifference = scrollPosition.left - newLeft;\n\n    // Go through and update the cached positions of the scroll\n    // parents that are inside the element that was scrolled.\n    this.positions.forEach((position, node) => {\n      if (position.clientRect && target !== node && target.contains(node)) {\n        adjustDomRect(position.clientRect, topDifference, leftDifference);\n      }\n    });\n\n    scrollPosition.top = newTop;\n    scrollPosition.left = newLeft;\n\n    return {top: topDifference, left: leftDifference};\n  }\n\n  /**\n   * Gets the scroll position of the viewport. Note that we use the scrollX and scrollY directly,\n   * instead of going through the `ViewportRuler`, because the first value the ruler looks at is\n   * the top/left offset of the `document.documentElement` which works for most cases, but breaks\n   * if the element is offset by something like the `BlockScrollStrategy`.\n   */\n  getViewportScrollPosition() {\n    return {top: window.scrollY, left: window.scrollX};\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 {EmbeddedViewRef} from '@angular/core';\n\n/**\n * Gets the root HTML element of an embedded view.\n * If the root is not an HTML element it gets wrapped in one.\n */\nexport function getRootNode(viewRef: EmbeddedViewRef<any>, _document: Document): HTMLElement {\n  const rootNodes: Node[] = viewRef.rootNodes;\n\n  if (rootNodes.length === 1 && rootNodes[0].nodeType === _document.ELEMENT_NODE) {\n    return rootNodes[0] as HTMLElement;\n  }\n\n  const wrapper = _document.createElement('div');\n  rootNodes.forEach(node => wrapper.appendChild(node));\n  return wrapper;\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 * Extended CSSStyleDeclaration that includes a couple of drag-related\n * properties that aren't in the built-in TS typings.\n */\nexport interface DragCSSStyleDeclaration extends CSSStyleDeclaration {\n  msScrollSnapType: string;\n  scrollSnapType: string;\n  webkitTapHighlightColor: string;\n}\n\n/**\n * Shallow-extends a stylesheet object with another stylesheet-like object.\n * Note that the keys in `source` have to be dash-cased.\n * @docs-private\n */\nexport function extendStyles(\n  dest: CSSStyleDeclaration,\n  source: Record<string, string>,\n  importantProperties?: Set<string>,\n) {\n  for (let key in source) {\n    if (source.hasOwnProperty(key)) {\n      const value = source[key];\n\n      if (value) {\n        dest.setProperty(key, value, importantProperties?.has(key) ? 'important' : '');\n      } else {\n        dest.removeProperty(key);\n      }\n    }\n  }\n\n  return dest;\n}\n\n/**\n * Toggles whether the native drag interactions should be enabled for an element.\n * @param element Element on which to toggle the drag interactions.\n * @param enable Whether the drag interactions should be enabled.\n * @docs-private\n */\nexport function toggleNativeDragInteractions(element: HTMLElement, enable: boolean) {\n  const userSelect = enable ? '' : 'none';\n\n  extendStyles(element.style, {\n    'touch-action': enable ? '' : 'none',\n    '-webkit-user-drag': enable ? '' : 'none',\n    '-webkit-tap-highlight-color': enable ? '' : 'transparent',\n    'user-select': userSelect,\n    '-ms-user-select': userSelect,\n    '-webkit-user-select': userSelect,\n    '-moz-user-select': userSelect,\n  });\n}\n\n/**\n * Toggles whether an element is visible while preserving its dimensions.\n * @param element Element whose visibility to toggle\n * @param enable Whether the element should be visible.\n * @param importantProperties Properties to be set as `!important`.\n * @docs-private\n */\nexport function toggleVisibility(\n  element: HTMLElement,\n  enable: boolean,\n  importantProperties?: Set<string>,\n) {\n  extendStyles(\n    element.style,\n    {\n      position: enable ? '' : 'fixed',\n      top: enable ? '' : '0',\n      opacity: enable ? '' : '0',\n      left: enable ? '' : '-999em',\n    },\n    importantProperties,\n  );\n}\n\n/**\n * Combines a transform string with an optional other transform\n * that exited before the base transform was applied.\n */\nexport function combineTransforms(transform: string, initialTransform?: string): string {\n  return initialTransform && initialTransform != 'none'\n    ? transform + ' ' + initialTransform\n    : transform;\n}\n\n/**\n * Matches the target element's size to the source's size.\n * @param target Element that needs to be resized.\n * @param sourceRect Dimensions of the source element.\n */\nexport function matchElementSize(target: HTMLElement, sourceRect: DOMRect): void {\n  target.style.width = `${sourceRect.width}px`;\n  target.style.height = `${sourceRect.height}px`;\n  target.style.transform = getTransform(sourceRect.left, sourceRect.top);\n}\n\n/**\n * Gets a 3d `transform` that can be applied to an element.\n * @param x Desired position of the element along the X axis.\n * @param y Desired position of the element along the Y axis.\n */\nexport function getTransform(x: number, y: number): string {\n  // Round the transforms since some browsers will\n  // blur the elements for sub-pixel transforms.\n  return `translate3d(${Math.round(x)}px, ${Math.round(y)}px, 0)`;\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  Component,\n  Service,\n  ListenerOptions,\n  NgZone,\n  OnDestroy,\n  RendererFactory2,\n  ViewEncapsulation,\n  WritableSignal,\n  inject,\n  signal,\n  DOCUMENT,\n} from '@angular/core';\n\nimport {_CdkPrivateStyleLoader} from '../private';\nimport {Observable, Observer, Subject, merge} from 'rxjs';\nimport type {DropListRef} from './drop-list-ref';\nimport type {DragRef} from './drag-ref';\nimport type {CdkDrag} from './directives/drag';\n\n/** Event options that can be used to bind a capturing event. */\nconst capturingEventOptions = {\n  capture: true,\n};\n\n/** Event options that can be used to bind an active, capturing event. */\nconst activeCapturingEventOptions = {\n  passive: false,\n  capture: true,\n};\n\n/**\n * Component used to load the drag&drop reset styles.\n * @docs-private\n */\n@Component({\n  styleUrl: 'resets.css',\n  encapsulation: ViewEncapsulation.None,\n  template: '',\n  host: {'cdk-drag-resets-container': ''},\n})\nexport class _ResetsLoader {}\n\n/**\n * Service that keeps track of all the drag item and drop container\n * instances, and manages global event listeners on the `document`.\n * @docs-private\n */\n@Service()\nexport class DragDropRegistry implements OnDestroy {\n  private _ngZone = inject(NgZone);\n  private _document = inject(DOCUMENT);\n  private _styleLoader = inject(_CdkPrivateStyleLoader);\n  private _renderer = inject(RendererFactory2).createRenderer(null, null);\n  private _cleanupDocumentTouchmove: (() => void) | undefined;\n  private _scroll: Subject<Event> = new Subject<Event>();\n\n  /** Registered drop container instances. */\n  private _dropInstances = new Set<DropListRef>();\n\n  /** Registered drag item instances. */\n  private _dragInstances = new Set<DragRef>();\n\n  /** Drag item instances that are currently being dragged. */\n  private _activeDragInstances: WritableSignal<DragRef[]> = signal([]);\n\n  /** Keeps track of the event listeners that we've bound to the `document`. */\n  private _globalListeners: (() => void)[] | undefined;\n\n  /**\n   * Predicate function to check if an item is being dragged.  Moved out into a property,\n   * because it'll be called a lot and we don't want to create a new function every time.\n   */\n  private _draggingPredicate = (item: DragRef) => item.isDragging();\n\n  /**\n   * Map tracking DOM nodes and their corresponding drag directives. Note that this is different\n   * from looking through the `_dragInstances` and getting their root node, because the root node\n   * isn't necessarily the node that the directive is set on.\n   */\n  private _domNodesToDirectives: WeakMap<Node, CdkDrag> | null = null;\n\n  /**\n   * Emits the `touchmove` or `mousemove` events that are dispatched\n   * while the user is dragging a drag item instance.\n   */\n  readonly pointerMove: Subject<TouchEvent | MouseEvent> = new Subject<TouchEvent | MouseEvent>();\n\n  /**\n   * Emits the `touchend` or `mouseup` events that are dispatched\n   * while the user is dragging a drag item instance.\n   */\n  readonly pointerUp: Subject<TouchEvent | MouseEvent> = new Subject<TouchEvent | MouseEvent>();\n\n  /** Adds a drop container to the registry. */\n  registerDropContainer(drop: DropListRef) {\n    if (!this._dropInstances.has(drop)) {\n      this._dropInstances.add(drop);\n    }\n  }\n\n  /** Adds a drag item instance to the registry. */\n  registerDragItem(drag: DragRef) {\n    this._dragInstances.add(drag);\n\n    // The `touchmove` event gets bound once, ahead of time, because WebKit\n    // won't preventDefault on a dynamically-added `touchmove` listener.\n    // See https://bugs.webkit.org/show_bug.cgi?id=184250.\n    if (this._dragInstances.size === 1) {\n      this._ngZone.runOutsideAngular(() => {\n        // The event handler has to be explicitly active,\n        // because newer browsers make it passive by default.\n        this._cleanupDocumentTouchmove?.();\n        this._cleanupDocumentTouchmove = this._renderer.listen(\n          this._document,\n          'touchmove',\n          this._persistentTouchmoveListener,\n          activeCapturingEventOptions,\n        );\n      });\n    }\n  }\n\n  /** Removes a drop container from the registry. */\n  removeDropContainer(drop: DropListRef) {\n    this._dropInstances.delete(drop);\n  }\n\n  /** Removes a drag item instance from the registry. */\n  removeDragItem(drag: DragRef) {\n    this._dragInstances.delete(drag);\n    this.stopDragging(drag);\n\n    if (this._dragInstances.size === 0) {\n      this._cleanupDocumentTouchmove?.();\n    }\n  }\n\n  /**\n   * Starts the dragging sequence for a drag instance.\n   * @param drag Drag instance which is being dragged.\n   * @param event Event that initiated the dragging.\n   */\n  startDragging(drag: DragRef, event: TouchEvent | MouseEvent) {\n    // Do not process the same drag twice to avoid memory leaks and redundant listeners\n    if (this._activeDragInstances().indexOf(drag) > -1) {\n      return;\n    }\n\n    this._styleLoader.load(_ResetsLoader);\n    this._activeDragInstances.update(instances => [...instances, drag]);\n\n    if (this._activeDragInstances().length === 1) {\n      // We explicitly bind __active__ listeners here, because newer browsers will default to\n      // passive ones for `mousemove` and `touchmove`. The events need to be active, because we\n      // use `preventDefault` to prevent the page from scrolling while the user is dragging.\n      const isTouchEvent = event.type.startsWith('touch');\n      const endEventHandler = (e: Event) => this.pointerUp.next(e as TouchEvent | MouseEvent);\n\n      const toBind: [name: string, handler: (event: Event) => void, options: ListenerOptions][] = [\n        // Use capturing so that we pick up scroll changes in any scrollable nodes that aren't\n        // the document. See https://github.com/angular/components/issues/17144.\n        ['scroll', (e: Event) => this._scroll.next(e), capturingEventOptions],\n\n        // Preventing the default action on `mousemove` isn't enough to disable text selection\n        // on Safari so we need to prevent the selection event as well. Alternatively this can\n        // be done by setting `user-select: none` on the `body`, however it has causes a style\n        // recalculation which can be expensive on pages with a lot of elements.\n        ['selectstart', this._preventDefaultWhileDragging, activeCapturingEventOptions],\n      ];\n\n      if (isTouchEvent) {\n        toBind.push(\n          ['touchend', endEventHandler, capturingEventOptions],\n          ['touchcancel', endEventHandler, capturingEventOptions],\n        );\n      } else {\n        toBind.push(['mouseup', endEventHandler, capturingEventOptions]);\n      }\n\n      // We don't have to bind a move event for touch drag sequences, because\n      // we already have a persistent global one bound from `registerDragItem`.\n      if (!isTouchEvent) {\n        toBind.push([\n          'mousemove',\n          (e: Event) => this.pointerMove.next(e as MouseEvent),\n          activeCapturingEventOptions,\n        ]);\n      }\n\n      this._ngZone.runOutsideAngular(() => {\n        this._globalListeners = toBind.map(([name, handler, options]) =>\n          this._renderer.listen(this._document, name, handler, options),\n        );\n      });\n    }\n  }\n\n  /** Stops dragging a drag item instance. */\n  stopDragging(drag: DragRef) {\n    this._activeDragInstances.update(instances => {\n      const index = instances.indexOf(drag);\n      if (index > -1) {\n        instances.splice(index, 1);\n        return [...instances];\n      }\n      return instances;\n    });\n\n    if (this._activeDragInstances().length === 0) {\n      this._clearGlobalListeners();\n    }\n  }\n\n  /** Gets whether a drag item instance is currently being dragged. */\n  isDragging(drag: DragRef) {\n    return this._activeDragInstances().indexOf(drag) > -1;\n  }\n\n  /**\n   * Gets a stream that will emit when any element on the page is scrolled while an item is being\n   * dragged.\n   * @param shadowRoot Optional shadow root that the current dragging sequence started from.\n   *   Top-level listeners won't pick up events coming from the shadow DOM so this parameter can\n   *   be used to include an additional top-level listener at the shadow root level.\n   */\n  scrolled(shadowRoot?: DocumentOrShadowRoot | null): Observable<Event> {\n    const streams: Observable<Event>[] = [this._scroll];\n\n    if (shadowRoot && shadowRoot !== this._document) {\n      // Note that this is basically the same as `fromEvent` from rxjs, but we do it ourselves,\n      // because we want to guarantee that the event is bound outside of the `NgZone`. With\n      // `fromEvent` it'll only happen if the subscription is outside the `NgZone`.\n      streams.push(\n        new Observable((observer: Observer<Event>) => {\n          return this._ngZone.runOutsideAngular(() => {\n            const cleanup = this._renderer.listen(\n              shadowRoot as ShadowRoot,\n              'scroll',\n              (event: Event) => {\n                if (this._activeDragInstances().length) {\n                  observer.next(event);\n                }\n              },\n              capturingEventOptions,\n            );\n\n            return () => {\n              cleanup();\n            };\n          });\n        }),\n      );\n    }\n\n    return merge(...streams);\n  }\n\n  /**\n   * Tracks the DOM node which has a draggable directive.\n   * @param node Node to track.\n   * @param dragRef Drag directive set on the node.\n   */\n  registerDirectiveNode(node: Node, dragRef: CdkDrag): void {\n    this._domNodesToDirectives ??= new WeakMap();\n    this._domNodesToDirectives.set(node, dragRef);\n  }\n\n  /**\n   * Stops tracking a draggable directive node.\n   * @param node Node to stop tracking.\n   */\n  removeDirectiveNode(node: Node): void {\n    this._domNodesToDirectives?.delete(node);\n  }\n\n  /**\n   * Gets the drag directive corresponding to a specific DOM node, if any.\n   * @param node Node for which to do the lookup.\n   */\n  getDragDirectiveForNode(node: Node): CdkDrag | null {\n    return this._domNodesToDirectives?.get(node) || null;\n  }\n\n  ngOnDestroy() {\n    this._dragInstances.forEach(instance => this.removeDragItem(instance));\n    this._dropInstances.forEach(instance => this.removeDropContainer(instance));\n    this._domNodesToDirectives = null;\n    this._clearGlobalListeners();\n    this.pointerMove.complete();\n    this.pointerUp.complete();\n  }\n\n  /**\n   * Event listener that will prevent the default browser action while the user is dragging.\n   * @param event Event whose default action should be prevented.\n   */\n  private _preventDefaultWhileDragging = (event: Event) => {\n    if (this._activeDragInstances().length > 0) {\n      event.preventDefault();\n    }\n  };\n\n  /** Event listener for `touchmove` that is bound even if no dragging is happening. */\n  private _persistentTouchmoveListener = (event: TouchEvent) => {\n    if (this._activeDragInstances().length > 0) {\n      // Note that we only want to prevent the default action after dragging has actually started.\n      // Usually this is the same time at which the item is added to the `_activeDragInstances`,\n      // but it could be pushed back if the user has set up a drag delay or threshold.\n      if (this._activeDragInstances().some(this._draggingPredicate)) {\n        event.preventDefault();\n      }\n\n      this.pointerMove.next(event);\n    }\n  };\n\n  /** Clears out the global event listeners from the `document`. */\n  private _clearGlobalListeners() {\n    this._globalListeners?.forEach(cleanup => cleanup());\n    this._globalListeners = undefined;\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/** Parses a CSS time value to milliseconds. */\nfunction parseCssTimeUnitsToMs(value: string): number {\n  // Some browsers will return it in seconds, whereas others will return milliseconds.\n  const multiplier = value.toLowerCase().indexOf('ms') > -1 ? 1 : 1000;\n  return parseFloat(value) * multiplier;\n}\n\n/** Gets the transform transition duration, including the delay, of an element in milliseconds. */\nexport function getTransformTransitionDurationInMs(element: HTMLElement): number {\n  const computedStyle = getComputedStyle(element);\n  const transitionedProperties = parseCssPropertyValue(computedStyle, 'transition-property');\n  const property = transitionedProperties.find(prop => prop === 'transform' || prop === 'all');\n\n  // If there's no transition for `all` or `transform`, we shouldn't do anything.\n  if (!property) {\n    return 0;\n  }\n\n  // Get the index of the property that we're interested in and match\n  // it up to the same index in `transition-delay` and `transition-duration`.\n  const propertyIndex = transitionedProperties.indexOf(property);\n  const rawDurations = parseCssPropertyValue(computedStyle, 'transition-duration');\n  const rawDelays = parseCssPropertyValue(computedStyle, 'transition-delay');\n\n  return (\n    parseCssTimeUnitsToMs(rawDurations[propertyIndex]) +\n    parseCssTimeUnitsToMs(rawDelays[propertyIndex])\n  );\n}\n\n/** Parses out multiple values from a computed style into an array. */\nfunction parseCssPropertyValue(computedStyle: CSSStyleDeclaration, name: string): string[] {\n  const value = computedStyle.getPropertyValue(name);\n  return value.split(',').map(part => part.trim());\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 {EmbeddedViewRef, Renderer2, TemplateRef, ViewContainerRef} from '@angular/core';\nimport {Direction} from '../bidi';\nimport {\n  extendStyles,\n  getTransform,\n  matchElementSize,\n  toggleNativeDragInteractions,\n} from './dom/styling';\nimport {deepCloneNode} from './dom/clone-node';\nimport {getRootNode} from './dom/root-node';\nimport {getTransformTransitionDurationInMs} from './dom/transition-duration';\n\n/** Template that can be used to create a drag preview element. */\nexport interface DragPreviewTemplate<T = any> {\n  matchSize?: boolean;\n  template: TemplateRef<T> | null;\n  viewContainer: ViewContainerRef;\n  context: T;\n}\n\n/** Inline styles to be set as `!important` while dragging. */\nconst importantProperties = new Set([\n  // Needs to be important, because some `mat-table` sets `position: sticky !important`. See #22781.\n  'position',\n]);\n\nexport class PreviewRef {\n  /** Reference to the view of the preview element. */\n  private _previewEmbeddedView: EmbeddedViewRef<any> | null = null;\n\n  /** Reference to the preview element. */\n  private _preview!: HTMLElement;\n\n  get element(): HTMLElement {\n    return this._preview;\n  }\n\n  constructor(\n    private _document: Document,\n    private _rootElement: HTMLElement,\n    private _direction: Direction,\n    private _initialDomRect: DOMRect,\n    private _previewTemplate: DragPreviewTemplate | null,\n    private _previewClass: string | string[] | null,\n    private _pickupPositionOnPage: {\n      x: number;\n      y: number;\n    },\n    private _initialTransform: string | null,\n    private _zIndex: number,\n    private _renderer: Renderer2,\n  ) {}\n\n  attach(parent: HTMLElement): void {\n    this._preview = this._createPreview();\n    parent.appendChild(this._preview);\n\n    // The null check is necessary for browsers that don't support the popover API.\n    // Note that we use a string access for compatibility with Closure.\n    if (supportsPopover(this._preview)) {\n      this._preview['showPopover']();\n    }\n  }\n\n  destroy(): void {\n    this._preview.remove();\n    this._previewEmbeddedView?.destroy();\n    this._preview = this._previewEmbeddedView = null!;\n  }\n\n  setTransform(value: string): void {\n    this._preview.style.transform = value;\n  }\n\n  getBoundingClientRect(): DOMRect {\n    return this._preview.getBoundingClientRect();\n  }\n\n  addClass(className: string): void {\n    this._preview.classList.add(className);\n  }\n\n  getTransitionDuration(): number {\n    return getTransformTransitionDurationInMs(this._preview);\n  }\n\n  addEventListener(name: string, handler: (event: any) => void): () => void {\n    return this._renderer.listen(this._preview, name, handler);\n  }\n\n  private _createPreview(): HTMLElement {\n    const previewConfig = this._previewTemplate;\n    const previewClass = this._previewClass;\n    const previewTemplate = previewConfig ? previewConfig.template : null;\n    let preview: HTMLElement;\n\n    if (previewTemplate && previewConfig) {\n      // Measure the element before we've inserted the preview\n      // since the insertion could throw off the measurement.\n      const rootRect = previewConfig.matchSize ? this._initialDomRect : null;\n      const viewRef = previewConfig.viewContainer.createEmbeddedView(\n        previewTemplate,\n        previewConfig.context,\n      );\n      viewRef.detectChanges();\n      preview = getRootNode(viewRef, this._document);\n      this._previewEmbeddedView = viewRef;\n      if (previewConfig.matchSize) {\n        matchElementSize(preview, rootRect!);\n      } else {\n        preview.style.transform = getTransform(\n          this._pickupPositionOnPage.x,\n          this._pickupPositionOnPage.y,\n        );\n      }\n    } else {\n      preview = deepCloneNode(this._rootElement);\n      matchElementSize(preview, this._initialDomRect!);\n\n      if (this._initialTransform) {\n        preview.style.transform = this._initialTransform;\n      }\n    }\n\n    extendStyles(\n      preview.style,\n      {\n        // It's important that we disable the pointer events on the preview, because\n        // it can throw off the `document.elementFromPoint` calls in the `CdkDropList`.\n        'pointer-events': 'none',\n        // If the preview has a margin, it can throw off our positioning so we reset it. The reset\n        // value for `margin-right` needs to be `auto` when opened as a popover, because our\n        // positioning is always top/left based, but native popover seems to position itself\n        // to the top/right if `<html>` or `<body>` have `dir=\"rtl\"` (see #29604). Setting it\n        // to `auto` pushed it to the top/left corner in RTL and is a noop in LTR.\n        'margin': supportsPopover(preview) ? '0 auto 0 0' : '0',\n        'position': 'fixed',\n        'top': '0',\n        'left': '0',\n        'z-index': this._zIndex + '',\n      },\n      importantProperties,\n    );\n\n    toggleNativeDragInteractions(preview, false);\n    preview.classList.add('cdk-drag-preview');\n    preview.setAttribute('popover', 'manual');\n    preview.setAttribute('dir', this._direction);\n\n    if (previewClass) {\n      if (Array.isArray(previewClass)) {\n        previewClass.forEach(className => preview.classList.add(className));\n      } else {\n        preview.classList.add(previewClass);\n      }\n    }\n\n    return preview;\n  }\n}\n\n/** Checks whether a specific element supports the popover API. */\nfunction supportsPopover(element: HTMLElement): boolean {\n  return 'showPopover' in element;\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 {isFakeMousedownFromScreenReader, isFakeTouchstartFromScreenReader} from '../a11y';\nimport {Direction} from '../bidi';\nimport {coerceElement} from '../coercion';\nimport {_getEventTarget, _getShadowRoot} from '../platform';\nimport {ViewportRuler} from '../scrolling';\nimport {\n  DOCUMENT,\n  ElementRef,\n  EmbeddedViewRef,\n  Injector,\n  NgZone,\n  Renderer2,\n  RendererFactory2,\n  TemplateRef,\n  ViewContainerRef,\n  signal,\n} from '@angular/core';\nimport {Observable, Subject, Subscription} from 'rxjs';\nimport {deepCloneNode} from './dom/clone-node';\nimport {adjustDomRect, getMutableClientRect, isOverflowingParent} from './dom/dom-rect';\nimport {ParentPositionTracker} from './dom/parent-position-tracker';\nimport {getRootNode} from './dom/root-node';\nimport {\n  DragCSSStyleDeclaration,\n  combineTransforms,\n  getTransform,\n  toggleNativeDragInteractions,\n  toggleVisibility,\n} from './dom/styling';\nimport {DragDropRegistry} from './drag-drop-registry';\nimport type {DropListRef} from './drop-list-ref';\nimport {DragPreviewTemplate, PreviewRef} from './preview-ref';\n\n/** Object that can be used to configure the behavior of DragRef. */\nexport interface DragRefConfig {\n  /**\n   * Minimum amount of pixels that the user should\n   * drag, before the CDK initiates a drag sequence.\n   */\n  dragStartThreshold: number;\n\n  /**\n   * Amount the pixels the user should drag before the CDK\n   * considers them to have changed the drag direction.\n   */\n  pointerDirectionChangeThreshold: number;\n\n  /** `z-index` for the absolutely-positioned elements that are created by the drag item. */\n  zIndex?: number;\n\n  /** Ref that the current drag item is nested in. */\n  parentDragRef?: DragRef;\n}\n\n/** Function that can be used to constrain the position of a dragged element. */\nexport type DragConstrainPosition = (\n  userPointerPosition: Point,\n  dragRef: DragRef,\n  dimensions: DOMRect,\n  pickupPositionInElement: Point,\n) => Point;\n\n/** Options that can be used to bind a passive event listener. */\nconst passiveEventListenerOptions = {passive: true};\n\n/** Options that can be used to bind an active event listener. */\nconst activeEventListenerOptions = {passive: false};\n\n/** Event options that can be used to bind an active, capturing event. */\nconst activeCapturingEventOptions = {\n  passive: false,\n  capture: true,\n};\n\n/**\n * Time in milliseconds for which to ignore mouse events, after\n * receiving a touch event. Used to avoid doing double work for\n * touch devices where the browser fires fake mouse events, in\n * addition to touch events.\n */\nconst MOUSE_EVENT_IGNORE_TIME = 800;\n\n/** Class applied to the drag placeholder. */\nconst PLACEHOLDER_CLASS = 'cdk-drag-placeholder';\n\n// TODO(crisbeto): add an API for moving a draggable up/down the\n// list programmatically. Useful for keyboard controls.\n\n/** Template that can be used to create a drag helper element (e.g. a preview or a placeholder). */\ninterface DragHelperTemplate<T = any> {\n  template: TemplateRef<T> | null;\n  viewContainer: ViewContainerRef;\n  context: T;\n}\n\n/** Point on the page or within an element. */\nexport interface Point {\n  x: number;\n  y: number;\n}\n\n/** Inline styles to be set as `!important` while dragging. */\nconst dragImportantProperties = new Set([\n  // Needs to be important, because some `mat-table` sets `position: sticky !important`. See #22781.\n  'position',\n]);\n\n/**\n * Possible places into which the preview of a drag item can be inserted.\n * - `global` - Preview will be inserted at the bottom of the `<body>`. The advantage is that\n * you don't have to worry about `overflow: hidden` or `z-index`, but the item won't retain\n * its inherited styles.\n * - `parent` - Preview will be inserted into the parent of the drag item. The advantage is that\n * inherited styles will be preserved, but it may be clipped by `overflow: hidden` or not be\n * visible due to `z-index`. Furthermore, the preview is going to have an effect over selectors\n * like `:nth-child` and some flexbox configurations.\n * - `ElementRef<HTMLElement> | HTMLElement` - Preview will be inserted into a specific element.\n * Same advantages and disadvantages as `parent`.\n */\nexport type PreviewContainer = 'global' | 'parent' | ElementRef<HTMLElement> | HTMLElement;\n\n/**\n * Creates a `DragRef` for an element, turning it into a draggable item.\n * @param injector Injector used to resolve dependencies.\n * @param element Element to which to attach the dragging functionality.\n * @param config Object used to configure the dragging behavior.\n */\nexport function createDragRef<T = unknown>(\n  injector: Injector,\n  element: ElementRef<HTMLElement> | HTMLElement,\n  config: DragRefConfig = {\n    dragStartThreshold: 5,\n    pointerDirectionChangeThreshold: 5,\n  },\n): DragRef<T> {\n  const renderer =\n    injector.get(Renderer2, null, {optional: true}) ||\n    injector.get(RendererFactory2).createRenderer(null, null);\n\n  return new DragRef(\n    element,\n    config,\n    injector.get(DOCUMENT),\n    injector.get(NgZone),\n    injector.get(ViewportRuler),\n    injector.get(DragDropRegistry),\n    renderer,\n  );\n}\n\n/**\n * Reference to a draggable item. Used to manipulate or dispose of the item.\n */\nexport class DragRef<T = any> {\n  private _rootElementCleanups: (() => void)[] | undefined;\n  private _cleanupShadowRootSelectStart: (() => void) | undefined;\n\n  /** Element displayed next to the user's pointer while the element is dragged. */\n  private _preview: PreviewRef | null = null;\n\n  /** Container into which to insert the preview. */\n  private _previewContainer: PreviewContainer | undefined;\n\n  /** Reference to the view of the placeholder element. */\n  private _placeholderRef: EmbeddedViewRef<any> | null = null;\n\n  /** Element that is rendered instead of the draggable item while it is being sorted. */\n  private _placeholder!: HTMLElement;\n\n  /** Coordinates within the element at which the user picked up the element. */\n  private _pickupPositionInElement!: Point;\n\n  /** Coordinates on the page at which the user picked up the element. */\n  private _pickupPositionOnPage!: Point;\n\n  /**\n   * Marker node used to save the place in the DOM where the element was\n   * picked up so that it can be restored at the end of the drag sequence.\n   */\n  private _marker!: Comment;\n\n  /**\n   * Element indicating the position from which the item was picked up initially.\n   */\n  private _anchor: HTMLElement | null = null;\n\n  /**\n   * CSS `transform` applied to the element when it isn't being dragged. We need a\n   * passive transform in order for the dragged element to retain its new position\n   * after the user has stopped dragging and because we need to know the relative\n   * position in case they start dragging again. This corresponds to `element.style.transform`.\n   */\n  private _passiveTransform: Point = {x: 0, y: 0};\n\n  /** CSS `transform` that is applied to the element while it's being dragged. */\n  private _activeTransform: Point = {x: 0, y: 0};\n\n  /** Inline `transform` value that the element had before the first dragging sequence. */\n  private _initialTransform?: string;\n\n  /**\n   * Whether the dragging sequence has been started. Doesn't\n   * necessarily mean that the element has been moved.\n   */\n  private _hasStartedDragging = signal(false);\n\n  /** Whether the element has moved since the user started dragging it. */\n  private _hasMoved = false;\n\n  /** Drop container in which the DragRef resided when dragging began. */\n  private _initialContainer!: DropListRef;\n\n  /** Index at which the item started in its initial container. */\n  private _initialIndex!: number;\n\n  /** Cached positions of scrollable parent elements. */\n  private _parentPositions: ParentPositionTracker;\n\n  /** Emits when the item is being moved. */\n  private readonly _moveEvents = new Subject<{\n    source: DragRef;\n    pointerPosition: {x: number; y: number};\n    event: MouseEvent | TouchEvent;\n    distance: Point;\n    delta: {x: -1 | 0 | 1; y: -1 | 0 | 1};\n  }>();\n\n  /** Keeps track of the direction in which the user is dragging along each axis. */\n  private _pointerDirectionDelta!: {x: -1 | 0 | 1; y: -1 | 0 | 1};\n\n  /** Pointer position at which the last change in the delta occurred. */\n  private _pointerPositionAtLastDirectionChange!: Point;\n\n  /** Position of the pointer at the last pointer event. */\n  private _lastKnownPointerPosition!: Point;\n\n  /**\n   * Root DOM node of the drag instance. This is the element that will\n   * be moved around as the user is dragging.\n   */\n  private _rootElement!: HTMLElement;\n\n  /**\n   * Nearest ancestor SVG, relative to which coordinates are calculated if dragging SVGElement\n   */\n  private _ownerSVGElement: SVGSVGElement | null = null;\n\n  /**\n   * Inline style value of `-webkit-tap-highlight-color` at the time the\n   * dragging was started. Used to restore the value once we're done dragging.\n   */\n  private _rootElementTapHighlight!: string;\n\n  /** Subscription to pointer movement events. */\n  private _pointerMoveSubscription = Subscription.EMPTY;\n\n  /** Subscription to the event that is dispatched when the user lifts their pointer. */\n  private _pointerUpSubscription = Subscription.EMPTY;\n\n  /** Subscription to the viewport being scrolled. */\n  private _scrollSubscription = Subscription.EMPTY;\n\n  /** Subscription to the viewport being resized. */\n  private _resizeSubscription = Subscription.EMPTY;\n\n  /**\n   * Time at which the last touch event occurred. Used to avoid firing the same\n   * events multiple times on touch devices where the browser will fire a fake\n   * mouse event for each touch event, after a certain time.\n   */\n  private _lastTouchEventTime!: number;\n\n  /** Time at which the last dragging sequence was started. */\n  private _dragStartTime!: number;\n\n  /** Cached reference to the boundary element. */\n  private _boundaryElement: HTMLElement | null = null;\n\n  /** Whether the native dragging interactions have been enabled on the root element. */\n  private _nativeInteractionsEnabled = true;\n\n  /** Client rect of the root element when the dragging sequence has started. */\n  private _initialDomRect?: DOMRect;\n\n  /** Cached dimensions of the preview element. Should be read via `_getPreviewRect`. */\n  private _previewRect?: DOMRect;\n\n  /** Cached dimensions of the boundary element. */\n  private _boundaryRect?: DOMRect;\n\n  /** Element that will be used as a template to create the draggable item's preview. */\n  private _previewTemplate?: DragPreviewTemplate | null;\n\n  /** Template for placeholder element rendered to show where a draggable would be dropped. */\n  private _placeholderTemplate?: DragHelperTemplate | null;\n\n  /** Elements that can be used to drag the draggable item. */\n  private _handles: HTMLElement[] = [];\n\n  /** Registered handles that are currently disabled. */\n  private _disabledHandles = new Set<HTMLElement>();\n\n  /** Droppable container that the draggable is a part of. */\n  private _dropContainer?: DropListRef;\n\n  /** Layout direction of the item. */\n  private _direction: Direction = 'ltr';\n\n  /** Ref that the current drag item is nested in. */\n  private _parentDragRef: DragRef<unknown> | null = null;\n\n  /**\n   * Cached shadow root that the element is placed in. `null` means that the element isn't in\n   * the shadow DOM and `undefined` means that it hasn't been resolved yet. Should be read via\n   * `_getShadowRoot`, not directly.\n   */\n  private _cachedShadowRoot: ShadowRoot | null | undefined;\n\n  /** Axis along which dragging is locked. */\n  lockAxis: 'x' | 'y' | null = null;\n\n  /**\n   * Amount of milliseconds to wait after the user has put their\n   * pointer down before starting to drag the element.\n   */\n  dragStartDelay: number | {touch: number; mouse: number} = 0;\n\n  /** Class to be added to the preview element. */\n  previewClass: string | string[] | undefined;\n\n  /**\n   * If the parent of the dragged element has a `scale` transform, it can throw off the\n   * positioning when the user starts dragging. Use this input to notify the CDK of the scale.\n   */\n  scale: number = 1;\n\n  /** Whether starting to drag this element is disabled. */\n  get disabled(): boolean {\n    return this._disabled || !!(this._dropContainer && this._dropContainer.disabled);\n  }\n  set disabled(value: boolean) {\n    if (value !== this._disabled) {\n      this._disabled = value;\n      this._toggleNativeDragInteractions();\n      this._handles.forEach(handle => toggleNativeDragInteractions(handle, value));\n    }\n  }\n  private _disabled = false;\n\n  /** Emits as the drag sequence is being prepared. */\n  readonly beforeStarted = new Subject<void>();\n\n  /** Emits when the user starts dragging the item. */\n  readonly started = new Subject<{source: DragRef; event: MouseEvent | TouchEvent}>();\n\n  /** Emits when the user has released a drag item, before any animations have started. */\n  readonly released = new Subject<{source: DragRef; event: MouseEvent | TouchEvent}>();\n\n  /** Emits when the user stops dragging an item in the container. */\n  readonly ended = new Subject<{\n    source: DragRef;\n    distance: Point;\n    dropPoint: Point;\n    event: MouseEvent | TouchEvent;\n  }>();\n\n  /** Emits when the user has moved the item into a new container. */\n  readonly entered = new Subject<{container: DropListRef; item: DragRef; currentIndex: number}>();\n\n  /** Emits when the user removes the item its container by dragging it into another container. */\n  readonly exited = new Subject<{container: DropListRef; item: DragRef}>();\n\n  /** Emits when the user drops the item inside a container. */\n  readonly dropped = new Subject<{\n    previousIndex: number;\n    currentIndex: number;\n    item: DragRef;\n    container: DropListRef;\n    previousContainer: DropListRef;\n    distance: Point;\n    dropPoint: Point;\n    isPointerOverContainer: boolean;\n    event: MouseEvent | TouchEvent;\n  }>();\n\n  /**\n   * Emits as the user is dragging the item. Use with caution,\n   * because this event will fire for every pixel that the user has dragged.\n   */\n  readonly moved: Observable<{\n    source: DragRef;\n    pointerPosition: {x: number; y: number};\n    event: MouseEvent | TouchEvent;\n    distance: Point;\n    delta: {x: -1 | 0 | 1; y: -1 | 0 | 1};\n  }> = this._moveEvents;\n\n  /** Arbitrary data that can be attached to the drag item. */\n  data!: T;\n\n  /**\n   * Function that can be used to customize the logic of how the position of the drag item\n   * is limited while it's being dragged. Gets called with a point containing the current position\n   * of the user's pointer on the page, a reference to the item being dragged and its dimensions.\n   * Should return a point describing where the item should be rendered.\n   */\n  constrainPosition?: DragConstrainPosition;\n\n  constructor(\n    element: ElementRef<HTMLElement> | HTMLElement,\n    private _config: DragRefConfig,\n    private _document: Document,\n    private _ngZone: NgZone,\n    private _viewportRuler: ViewportRuler,\n    private _dragDropRegistry: DragDropRegistry,\n    private _renderer: Renderer2,\n  ) {\n    this.withRootElement(element).withParent(_config.parentDragRef || null);\n    this._parentPositions = new ParentPositionTracker(_document);\n    _dragDropRegistry.registerDragItem(this);\n  }\n\n  /**\n   * Returns the element that is being used as a placeholder\n   * while the current element is being dragged.\n   */\n  getPlaceholderElement(): HTMLElement {\n    return this._placeholder;\n  }\n\n  /** Returns the root draggable element. */\n  getRootElement(): HTMLElement {\n    return this._rootElement;\n  }\n\n  /**\n   * Gets the currently-visible element that represents the drag item.\n   * While dragging this is the placeholder, otherwise it's the root element.\n   */\n  getVisibleElement(): HTMLElement {\n    return this.isDragging() ? this.getPlaceholderElement() : this.getRootElement();\n  }\n\n  /** Registers the handles that can be used to drag the element. */\n  withHandles(handles: (HTMLElement | ElementRef<HTMLElement>)[]): this {\n    this._handles = handles.map(handle => coerceElement(handle));\n    this._handles.forEach(handle => toggleNativeDragInteractions(handle, this.disabled));\n    this._toggleNativeDragInteractions();\n\n    // Delete any lingering disabled handles that may have been destroyed. Note that we re-create\n    // the set, rather than iterate over it and filter out the destroyed handles, because while\n    // the ES spec allows for sets to be modified while they're being iterated over, some polyfills\n    // use an array internally which may throw an error.\n    const disabledHandles = new Set<HTMLElement>();\n    this._disabledHandles.forEach(handle => {\n      if (this._handles.indexOf(handle) > -1) {\n        disabledHandles.add(handle);\n      }\n    });\n    this._disabledHandles = disabledHandles;\n    return this;\n  }\n\n  /**\n   * Registers the template that should be used for the drag preview.\n   * @param template Template that from which to stamp out the preview.\n   */\n  withPreviewTemplate(template: DragPreviewTemplate | null): this {\n    this._previewTemplate = template;\n    return this;\n  }\n\n  /**\n   * Registers the template that should be used for the drag placeholder.\n   * @param template Template that from which to stamp out the placeholder.\n   */\n  withPlaceholderTemplate(template: DragHelperTemplate | null): this {\n    this._placeholderTemplate = template;\n    return this;\n  }\n\n  /**\n   * Sets an alternate drag root element. The root element is the element that will be moved as\n   * the user is dragging. Passing an alternate root element is useful when trying to enable\n   * dragging on an element that you might not have access to.\n   */\n  withRootElement(rootElement: ElementRef<HTMLElement> | HTMLElement): this {\n    const element = coerceElement(rootElement);\n\n    if (element !== this._rootElement) {\n      this._removeRootElementListeners();\n      const renderer = this._renderer;\n      this._rootElementCleanups = this._ngZone.runOutsideAngular(() => [\n        renderer.listen(element, 'mousedown', this._pointerDown, activeEventListenerOptions),\n        renderer.listen(element, 'touchstart', this._pointerDown, passiveEventListenerOptions),\n        renderer.listen(element, 'dragstart', this._nativeDragStart, activeEventListenerOptions),\n      ]);\n      this._initialTransform = undefined;\n      this._rootElement = element;\n    }\n\n    if (typeof SVGElement !== 'undefined' && this._rootElement instanceof SVGElement) {\n      this._ownerSVGElement = this._rootElement.ownerSVGElement;\n    }\n\n    return this;\n  }\n\n  /**\n   * Element to which the draggable's position will be constrained.\n   */\n  withBoundaryElement(boundaryElement: ElementRef<HTMLElement> | HTMLElement | null): this {\n    this._boundaryElement = boundaryElement ? coerceElement(boundaryElement) : null;\n    this._resizeSubscription.unsubscribe();\n    if (boundaryElement) {\n      this._resizeSubscription = this._viewportRuler\n        .change(10)\n        .subscribe(() => this._containInsideBoundaryOnResize());\n    }\n    return this;\n  }\n\n  /** Sets the parent ref that the ref is nested in.  */\n  withParent(parent: DragRef<unknown> | null): this {\n    this._parentDragRef = parent;\n    return this;\n  }\n\n  /** Removes the dragging functionality from the DOM element. */\n  dispose() {\n    this._removeRootElementListeners();\n\n    // Do this check before removing from the registry since it'll\n    // stop being considered as dragged once it is removed.\n    if (this.isDragging()) {\n      // Since we move out the element to the end of the body while it's being\n      // dragged, we have to make sure that it's removed if it gets destroyed.\n      this._rootElement?.remove();\n    }\n\n    this._marker?.remove();\n    this._destroyPreview();\n    this._destroyPlaceholder();\n    this._dragDropRegistry.removeDragItem(this);\n    this._removeListeners();\n    this.beforeStarted.complete();\n    this.started.complete();\n    this.released.complete();\n    this.ended.complete();\n    this.entered.complete();\n    this.exited.complete();\n    this.dropped.complete();\n    this._moveEvents.complete();\n    this._handles = [];\n    this._disabledHandles.clear();\n    this._dropContainer = undefined;\n    this._resizeSubscription.unsubscribe();\n    this._parentPositions.clear();\n    this._boundaryElement =\n      this._rootElement =\n      this._ownerSVGElement =\n      this._placeholderTemplate =\n      this._previewTemplate =\n      this._marker =\n      this._parentDragRef =\n        null!;\n  }\n\n  /** Checks whether the element is currently being dragged. */\n  isDragging(): boolean {\n    return this._hasStartedDragging() && this._dragDropRegistry.isDragging(this);\n  }\n\n  /** Resets a standalone drag item to its initial position. */\n  reset(): void {\n    this._rootElement.style.transform = this._initialTransform || '';\n    this._activeTransform = {x: 0, y: 0};\n    this._passiveTransform = {x: 0, y: 0};\n  }\n\n  /** Resets drag item to end of boundary element. */\n  resetToBoundary(): void {\n    if (\n      // can be null if the drag item was never dragged.\n      this._boundaryElement &&\n      this._rootElement &&\n      // check if we are overflowing off our boundary element\n      isOverflowingParent(\n        this._boundaryElement.getBoundingClientRect(),\n        this._rootElement.getBoundingClientRect(),\n      )\n    ) {\n      const parentRect = this._boundaryElement.getBoundingClientRect();\n      const childRect = this._rootElement.getBoundingClientRect();\n\n      let offsetX = 0;\n      let offsetY = 0;\n\n      // check if we are overflowing from left or right\n      if (childRect.left < parentRect.left) {\n        offsetX = parentRect.left - childRect.left;\n      } else if (childRect.right > parentRect.right) {\n        offsetX = parentRect.right - childRect.right;\n      }\n\n      // check if we are overflowing from top or bottom\n      if (childRect.top < parentRect.top) {\n        offsetY = parentRect.top - childRect.top;\n      } else if (childRect.bottom > parentRect.bottom) {\n        offsetY = parentRect.bottom - childRect.bottom;\n      }\n\n      const currentLeft = this._activeTransform.x;\n      const currentTop = this._activeTransform.y;\n\n      let x = currentLeft + offsetX,\n        y = currentTop + offsetY;\n\n      this._rootElement.style.transform = getTransform(x, y);\n      this._activeTransform = {x, y};\n      this._passiveTransform = {x, y};\n    }\n  }\n\n  /**\n   * Sets a handle as disabled. While a handle is disabled, it'll capture and interrupt dragging.\n   * @param handle Handle element that should be disabled.\n   */\n  disableHandle(handle: HTMLElement) {\n    if (!this._disabledHandles.has(handle) && this._handles.indexOf(handle) > -1) {\n      this._disabledHandles.add(handle);\n      toggleNativeDragInteractions(handle, true);\n    }\n  }\n\n  /**\n   * Enables a handle, if it has been disabled.\n   * @param handle Handle element to be enabled.\n   */\n  enableHandle(handle: HTMLElement) {\n    if (this._disabledHandles.has(handle)) {\n      this._disabledHandles.delete(handle);\n      toggleNativeDragInteractions(handle, this.disabled);\n    }\n  }\n\n  /** Sets the layout direction of the draggable item. */\n  withDirection(direction: Direction): this {\n    this._direction = direction;\n    return this;\n  }\n\n  /** Sets the container that the item is part of. */\n  _withDropContainer(container: DropListRef) {\n    this._dropContainer = container;\n  }\n\n  /**\n   * Gets the current position in pixels the draggable outside of a drop container.\n   */\n  getFreeDragPosition(): Readonly<Point> {\n    const position = this.isDragging() ? this._activeTransform : this._passiveTransform;\n    return {x: position.x, y: position.y};\n  }\n\n  /**\n   * Sets the current position in pixels the draggable outside of a drop container.\n   * @param value New position to be set.\n   */\n  setFreeDragPosition(value: Point): this {\n    this._activeTransform = {x: 0, y: 0};\n    this._passiveTransform.x = value.x;\n    this._passiveTransform.y = value.y;\n\n    if (!this._dropContainer) {\n      this._applyRootElementTransform(value.x, value.y);\n    }\n\n    return this;\n  }\n\n  /**\n   * Sets the container into which to insert the preview element.\n   * @param value Container into which to insert the preview.\n   */\n  withPreviewContainer(value: PreviewContainer): this {\n    this._previewContainer = value;\n    return this;\n  }\n\n  /** Updates the item's sort order based on the last-known pointer position. */\n  _sortFromLastPointerPosition() {\n    const position = this._lastKnownPointerPosition;\n\n    if (position && this._dropContainer) {\n      this._updateActiveDropContainer(this._getConstrainedPointerPosition(position), position);\n    }\n  }\n\n  /** Unsubscribes from the global subscriptions. */\n  private _removeListeners() {\n    this._pointerMoveSubscription.unsubscribe();\n    this._pointerUpSubscription.unsubscribe();\n    this._scrollSubscription.unsubscribe();\n    this._cleanupShadowRootSelectStart?.();\n    this._cleanupShadowRootSelectStart = undefined;\n  }\n\n  /** Destroys the preview element and its ViewRef. */\n  private _destroyPreview() {\n    this._preview?.destroy();\n    this._preview = null;\n  }\n\n  /** Destroys the placeholder element and its ViewRef. */\n  private _destroyPlaceholder() {\n    this._anchor?.remove();\n    this._placeholder?.remove();\n    this._placeholderRef?.destroy();\n    this._placeholder = this._anchor = this._placeholderRef = null!;\n  }\n\n  /** Handler for the `mousedown`/`touchstart` events. */\n  private _pointerDown = (event: MouseEvent | TouchEvent) => {\n    this.beforeStarted.next();\n\n    // Delegate the event based on whether it started from a handle or the element itself.\n    if (this._handles.length) {\n      const targetHandle = this._getTargetHandle(event);\n\n      if (targetHandle && !this._disabledHandles.has(targetHandle) && !this.disabled) {\n        this._initializeDragSequence(targetHandle, event);\n      }\n    } else if (!this.disabled) {\n      this._initializeDragSequence(this._rootElement, event);\n    }\n  };\n\n  /** Handler that is invoked when the user moves their pointer after they've initiated a drag. */\n  private _pointerMove = (event: MouseEvent | TouchEvent) => {\n    const pointerPosition = this._getPointerPositionOnPage(event);\n\n    if (!this._hasStartedDragging()) {\n      const distanceX = Math.abs(pointerPosition.x - this._pickupPositionOnPage.x);\n      const distanceY = Math.abs(pointerPosition.y - this._pickupPositionOnPage.y);\n      const isOverThreshold = distanceX + distanceY >= this._config.dragStartThreshold;\n\n      // Only start dragging after the user has moved more than the minimum distance in either\n      // direction. Note that this is preferable over doing something like `skip(minimumDistance)`\n      // in the `pointerMove` subscription, because we're not guaranteed to have one move event\n      // per pixel of movement (e.g. if the user moves their pointer quickly).\n      if (isOverThreshold) {\n        const isDelayElapsed = Date.now() >= this._dragStartTime + this._getDragStartDelay(event);\n        const container = this._dropContainer;\n\n        if (!isDelayElapsed) {\n          this._endDragSequence(event);\n          return;\n        }\n\n        // Prevent other drag sequences from starting while something in the container is still\n        // being dragged. This can happen while we're waiting for the drop animation to finish\n        // and can cause errors, because some elements might still be moving around.\n        if (!container || (!container.isDragging() && !container.isReceiving())) {\n          // Prevent the default action as soon as the dragging sequence is considered as\n          // \"started\" since waiting for the next event can allow the device to begin scrolling.\n          if (event.cancelable) {\n            event.preventDefault();\n          }\n          this._hasStartedDragging.set(true);\n          this._ngZone.run(() => this._startDragSequence(event));\n        }\n      }\n\n      return;\n    }\n\n    // We prevent the default action down here so that we know that dragging has started. This is\n    // important for touch devices where doing this too early can unnecessarily block scrolling,\n    // if there's a dragging delay.\n    if (event.cancelable) {\n      event.preventDefault();\n    }\n\n    const constrainedPointerPosition = this._getConstrainedPointerPosition(pointerPosition);\n    this._hasMoved = true;\n    this._lastKnownPointerPosition = pointerPosition;\n    this._updatePointerDirectionDelta(constrainedPointerPosition);\n\n    if (this._dropContainer) {\n      this._updateActiveDropContainer(constrainedPointerPosition, pointerPosition);\n    } else {\n      // If there's a position constraint function, we want the element's top/left to be at the\n      // specific position on the page. Use the initial position as a reference if that's the case.\n      const offset = this.constrainPosition ? this._initialDomRect! : this._pickupPositionOnPage;\n      const activeTransform = this._activeTransform;\n      activeTransform.x = constrainedPointerPosition.x - offset.x + this._passiveTransform.x;\n      activeTransform.y = constrainedPointerPosition.y - offset.y + this._passiveTransform.y;\n      this._applyRootElementTransform(activeTransform.x, activeTransform.y);\n    }\n\n    // Since this event gets fired for every pixel while dragging, we only\n    // want to fire it if the consumer opted into it. Also we have to\n    // re-enter the zone because we run all of the events on the outside.\n    if (this._moveEvents.observers.length) {\n      this._ngZone.run(() => {\n        this._moveEvents.next({\n          source: this,\n          pointerPosition: constrainedPointerPosition,\n          event,\n          distance: this._getDragDistance(constrainedPointerPosition),\n          delta: this._pointerDirectionDelta,\n        });\n      });\n    }\n  };\n\n  /** Handler that is invoked when the user lifts their pointer up, after initiating a drag. */\n  private _pointerUp = (event: MouseEvent | TouchEvent) => {\n    this._endDragSequence(event);\n  };\n\n  /**\n   * Clears subscriptions and stops the dragging sequence.\n   * @param event Browser event object that ended the sequence.\n   */\n  private _endDragSequence(event: MouseEvent | TouchEvent) {\n    // Note that here we use `isDragging` from the service, rather than from `this`.\n    // The difference is that the one from the service reflects whether a dragging sequence\n    // has been initiated, whereas the one on `this` includes whether the user has passed\n    // the minimum dragging threshold.\n    if (!this._dragDropRegistry.isDragging(this)) {\n      return;\n    }\n\n    this._removeListeners();\n    this._dragDropRegistry.stopDragging(this);\n    this._toggleNativeDragInteractions();\n\n    if (this._handles) {\n      (this._rootElement.style as DragCSSStyleDeclaration).webkitTapHighlightColor =\n        this._rootElementTapHighlight;\n    }\n\n    if (!this._hasStartedDragging()) {\n      return;\n    }\n\n    this.released.next({source: this, event});\n\n    if (this._dropContainer) {\n      // Stop scrolling immediately, instead of waiting for the animation to finish.\n      this._dropContainer._stopScrolling();\n      this._animatePreviewToPlaceholder().then(() => {\n        this._cleanupDragArtifacts(event);\n        this._cleanupCachedDimensions();\n        this._dragDropRegistry.stopDragging(this);\n      });\n    } else {\n      // Convert the active transform into a passive one. This means that next time\n      // the user starts dragging the item, its position will be calculated relatively\n      // to the new passive transform.\n      this._passiveTransform.x = this._activeTransform.x;\n      const pointerPosition = this._getPointerPositionOnPage(event);\n      this._passiveTransform.y = this._activeTransform.y;\n      this._ngZone.run(() => {\n        this.ended.next({\n          source: this,\n          distance: this._getDragDistance(pointerPosition),\n          dropPoint: pointerPosition,\n          event,\n        });\n      });\n      this._cleanupCachedDimensions();\n      this._dragDropRegistry.stopDragging(this);\n    }\n  }\n\n  /** Starts the dragging sequence. */\n  private _startDragSequence(event: MouseEvent | TouchEvent) {\n    if (isTouchEvent(event)) {\n      this._lastTouchEventTime = Date.now();\n    }\n\n    this._toggleNativeDragInteractions();\n\n    // Needs to happen before the root element is moved.\n    const shadowRoot = this._getShadowRoot();\n    const dropContainer = this._dropContainer;\n\n    if (shadowRoot) {\n      // In some browsers the global `selectstart` that we maintain in the `DragDropRegistry`\n      // doesn't cross the shadow boundary so we have to prevent it at the shadow root (see #28792).\n      this._ngZone.runOutsideAngular(() => {\n        this._cleanupShadowRootSelectStart = this._renderer.listen(\n          shadowRoot,\n          'selectstart',\n          shadowDomSelectStart,\n          activeCapturingEventOptions,\n        );\n      });\n    }\n\n    if (dropContainer) {\n      const element = this._rootElement;\n      const parent = element.parentNode as HTMLElement;\n      const placeholder = (this._placeholder = this._createPlaceholderElement());\n      const marker = (this._marker =\n        this._marker ||\n        this._document.createComment(\n          typeof ngDevMode === 'undefined' || ngDevMode ? 'cdk-drag-marker' : '',\n        ));\n\n      // Insert a marker node so that we can restore the element's position in the DOM.\n      parent.insertBefore(marker, element);\n\n      // There's no risk of transforms stacking when inside a drop container so\n      // we can keep the initial transform up to date any time dragging starts.\n      this._initialTransform = element.style.transform || '';\n\n      // Create the preview after the initial transform has\n      // been cached, because it can be affected by the transform.\n      this._preview = new PreviewRef(\n        this._document,\n        this._rootElement,\n        this._direction,\n        this._initialDomRect!,\n        this._previewTemplate || null,\n        this.previewClass || null,\n        this._pickupPositionOnPage,\n        this._initialTransform,\n        this._config.zIndex || 1000,\n        this._renderer,\n      );\n      this._preview.attach(this._getPreviewInsertionPoint(parent, shadowRoot));\n\n      // We move the element out at the end of the body and we make it hidden, because keeping it in\n      // place will throw off the consumer's `:last-child` selectors. We can't remove the element\n      // from the DOM completely, because iOS will stop firing all subsequent events in the chain.\n      toggleVisibility(element, false, dragImportantProperties);\n      this._document.body.appendChild(parent.replaceChild(placeholder, element));\n      this.started.next({source: this, event}); // Emit before notifying the container.\n      dropContainer.start();\n      this._initialContainer = dropContainer;\n      this._initialIndex = dropContainer.getItemIndex(this);\n    } else {\n      this.started.next({source: this, event});\n      this._initialContainer = this._initialIndex = undefined!;\n    }\n\n    // Important to run after we've called `start` on the parent container\n    // so that it has had time to resolve its scrollable parents.\n    this._parentPositions.cache(dropContainer ? dropContainer.getScrollableParents() : []);\n  }\n\n  /**\n   * Sets up the different variables and subscriptions\n   * that will be necessary for the dragging sequence.\n   * @param referenceElement Element that started the drag sequence.\n   * @param event Browser event object that started the sequence.\n   */\n  private _initializeDragSequence(referenceElement: HTMLElement, event: MouseEvent | TouchEvent) {\n    // Stop propagation if the item is inside another\n    // draggable so we don't start multiple drag sequences.\n    if (this._parentDragRef) {\n      event.stopPropagation();\n    }\n\n    const isDragging = this.isDragging();\n    const isTouchSequence = isTouchEvent(event);\n    const isAuxiliaryMouseButton = !isTouchSequence && (event as MouseEvent).button !== 0;\n    const rootElement = this._rootElement;\n    const target = _getEventTarget(event);\n    const isSyntheticEvent =\n      !isTouchSequence &&\n      this._lastTouchEventTime &&\n      this._lastTouchEventTime + MOUSE_EVENT_IGNORE_TIME > Date.now();\n    const isFakeEvent = isTouchSequence\n      ? isFakeTouchstartFromScreenReader(event as TouchEvent)\n      : isFakeMousedownFromScreenReader(event as MouseEvent);\n\n    // If the event started from an element with the native HTML drag&drop, it'll interfere\n    // with our own dragging (e.g. `img` tags do it by default). Prevent the default action\n    // to stop it from happening. Note that preventing on `dragstart` also seems to work, but\n    // it's flaky and it fails if the user drags it away quickly. Also note that we only want\n    // to do this for `mousedown` since doing the same for `touchstart` will stop any `click`\n    // events from firing on touch devices.\n    if (target && (target as HTMLElement).draggable && event.type === 'mousedown') {\n      event.preventDefault();\n    }\n\n    // Abort if the user is already dragging or is using a mouse button other than the primary one.\n    if (isDragging || isAuxiliaryMouseButton || isSyntheticEvent || isFakeEvent) {\n      return;\n    }\n\n    // If we've got handles, we need to disable the tap highlight on the entire root element,\n    // otherwise iOS will still add it, even though all the drag interactions on the handle\n    // are disabled.\n    if (this._handles.length) {\n      const rootStyles = rootElement.style as DragCSSStyleDeclaration;\n      this._rootElementTapHighlight = rootStyles.webkitTapHighlightColor || '';\n      rootStyles.webkitTapHighlightColor = 'transparent';\n    }\n\n    this._hasMoved = false;\n    this._hasStartedDragging.set(this._hasMoved);\n\n    // Avoid multiple subscriptions and memory leaks when multi touch\n    // (isDragging check above isn't enough because of possible temporal and/or dimensional delays)\n    this._removeListeners();\n    this._initialDomRect = this._rootElement.getBoundingClientRect();\n    this._pointerMoveSubscription = this._dragDropRegistry.pointerMove.subscribe(this._pointerMove);\n    this._pointerUpSubscription = this._dragDropRegistry.pointerUp.subscribe(this._pointerUp);\n    this._scrollSubscription = this._dragDropRegistry\n      .scrolled(this._getShadowRoot())\n      .subscribe(scrollEvent => this._updateOnScroll(scrollEvent));\n\n    if (this._boundaryElement) {\n      this._boundaryRect = getMutableClientRect(this._boundaryElement);\n    }\n\n    // If we have a custom preview we can't know ahead of time how large it'll be so we position\n    // it next to the cursor. The exception is when the consumer has opted into making the preview\n    // the same size as the root element, in which case we do know the size.\n    const previewTemplate = this._previewTemplate;\n    this._pickupPositionInElement =\n      previewTemplate && previewTemplate.template && !previewTemplate.matchSize\n        ? {x: 0, y: 0}\n        : this._getPointerPositionInElement(this._initialDomRect, referenceElement, event);\n    const pointerPosition =\n      (this._pickupPositionOnPage =\n      this._lastKnownPointerPosition =\n        this._getPointerPositionOnPage(event));\n    this._pointerDirectionDelta = {x: 0, y: 0};\n    this._pointerPositionAtLastDirectionChange = {x: pointerPosition.x, y: pointerPosition.y};\n    this._dragStartTime = Date.now();\n    this._dragDropRegistry.startDragging(this, event);\n  }\n\n  /** Cleans up the DOM artifacts that were added to facilitate the element being dragged. */\n  private _cleanupDragArtifacts(event: MouseEvent | TouchEvent) {\n    // Restore the element's visibility and insert it at its old position in the DOM.\n    // It's important that we maintain the position, because moving the element around in the DOM\n    // can throw off `NgFor` which does smart diffing and re-creates elements only when necessary,\n    // while moving the existing elements in all other cases.\n    toggleVisibility(this._rootElement, true, dragImportantProperties);\n    this._marker.parentNode!.replaceChild(this._rootElement, this._marker);\n\n    this._destroyPreview();\n    this._destroyPlaceholder();\n    this._initialDomRect =\n      this._boundaryRect =\n      this._previewRect =\n      this._initialTransform =\n        undefined;\n\n    // Re-enter the NgZone since we bound `document` events on the outside.\n    this._ngZone.run(() => {\n      const container = this._dropContainer!;\n      const currentIndex = container.getItemIndex(this);\n      const pointerPosition = this._getPointerPositionOnPage(event);\n      const distance = this._getDragDistance(pointerPosition);\n      const isPointerOverContainer = container._isOverContainer(\n        pointerPosition.x,\n        pointerPosition.y,\n      );\n\n      this.ended.next({source: this, distance, dropPoint: pointerPosition, event});\n      this.dropped.next({\n        item: this,\n        currentIndex,\n        previousIndex: this._initialIndex,\n        container: container,\n        previousContainer: this._initialContainer,\n        isPointerOverContainer,\n        distance,\n        dropPoint: pointerPosition,\n        event,\n      });\n      container.drop(\n        this,\n        currentIndex,\n        this._initialIndex,\n        this._initialContainer,\n        isPointerOverContainer,\n        distance,\n        pointerPosition,\n        event,\n      );\n      this._dropContainer = this._initialContainer;\n    });\n  }\n\n  /**\n   * Updates the item's position in its drop container, or moves it\n   * into a new one, depending on its current drag position.\n   */\n  private _updateActiveDropContainer({x, y}: Point, {x: rawX, y: rawY}: Point) {\n    // Drop container that draggable has been moved into.\n    let newContainer = this._initialContainer._getSiblingContainerFromPosition(this, x, y);\n\n    // If we couldn't find a new container to move the item into, and the item has left its\n    // initial container, check whether the it's over the initial container. This handles the\n    // case where two containers are connected one way and the user tries to undo dragging an\n    // item into a new container.\n    if (\n      !newContainer &&\n      this._dropContainer !== this._initialContainer &&\n      this._initialContainer._isOverContainer(x, y)\n    ) {\n      newContainer = this._initialContainer;\n    }\n\n    if (newContainer && newContainer !== this._dropContainer) {\n      this._ngZone.run(() => {\n        const exitIndex = this._dropContainer!.getItemIndex(this);\n        const nextItemElement =\n          this._dropContainer!.getItemAtIndex(exitIndex + 1)?.getVisibleElement() || null;\n\n        // Notify the old container that the item has left.\n        this.exited.next({item: this, container: this._dropContainer!});\n        this._dropContainer!.exit(this);\n        this._conditionallyInsertAnchor(newContainer, this._dropContainer!, nextItemElement);\n        // Notify the new container that the item has entered.\n        this._dropContainer = newContainer!;\n        this._dropContainer.enter(\n          this,\n          x,\n          y,\n          // If we're re-entering the initial container and sorting is disabled,\n          // put item the into its starting index to begin with.\n          newContainer === this._initialContainer && newContainer.sortingDisabled\n            ? this._initialIndex\n            : undefined,\n        );\n        this.entered.next({\n          item: this,\n          container: newContainer!,\n          currentIndex: newContainer!.getItemIndex(this),\n        });\n      });\n    }\n\n    // Dragging may have been interrupted as a result of the events above.\n    if (this.isDragging()) {\n      this._dropContainer!._startScrollingIfNecessary(rawX, rawY);\n      this._dropContainer!._sortItem(this, x, y, this._pointerDirectionDelta);\n\n      if (this.constrainPosition) {\n        this._applyPreviewTransform(x, y);\n      } else {\n        this._applyPreviewTransform(\n          x - this._pickupPositionInElement.x,\n          y - this._pickupPositionInElement.y,\n        );\n      }\n    }\n  }\n\n  /**\n   * Animates the preview element from its current position to the location of the drop placeholder.\n   * @returns Promise that resolves when the animation completes.\n   */\n  private _animatePreviewToPlaceholder(): Promise<void> {\n    // If the user hasn't moved yet, the transitionend event won't fire.\n    if (!this._hasMoved) {\n      return Promise.resolve();\n    }\n\n    const placeholderRect = this._placeholder.getBoundingClientRect();\n\n    // Apply the class that adds a transition to the preview.\n    this._preview!.addClass('cdk-drag-animating');\n\n    // Move the preview to the placeholder position.\n    this._applyPreviewTransform(placeholderRect.left, placeholderRect.top);\n\n    // If the element doesn't have a `transition`, the `transitionend` event won't fire. Since\n    // we need to trigger a style recalculation in order for the `cdk-drag-animating` class to\n    // apply its style, we take advantage of the available info to figure out whether we need to\n    // bind the event in the first place.\n    const duration = this._preview!.getTransitionDuration();\n\n    if (duration === 0) {\n      return Promise.resolve();\n    }\n\n    return this._ngZone.runOutsideAngular(() => {\n      return new Promise(resolve => {\n        const handler = (event: TransitionEvent) => {\n          if (\n            !event ||\n            (this._preview &&\n              _getEventTarget(event) === this._preview.element &&\n              event.propertyName === 'transform')\n          ) {\n            cleanupListener();\n            resolve();\n            clearTimeout(timeout);\n          }\n        };\n\n        // If a transition is short enough, the browser might not fire the `transitionend` event.\n        // Since we know how long it's supposed to take, add a timeout with a 50% buffer that'll\n        // fire if the transition hasn't completed when it was supposed to.\n        const timeout = setTimeout(handler as Function, duration * 1.5);\n        const cleanupListener = this._preview!.addEventListener('transitionend', handler);\n      });\n    });\n  }\n\n  /** Creates an element that will be shown instead of the current element while dragging. */\n  private _createPlaceholderElement(): HTMLElement {\n    const placeholderConfig = this._placeholderTemplate;\n    const placeholderTemplate = placeholderConfig ? placeholderConfig.template : null;\n    let placeholder: HTMLElement;\n\n    if (placeholderTemplate) {\n      this._placeholderRef = placeholderConfig!.viewContainer.createEmbeddedView(\n        placeholderTemplate,\n        placeholderConfig!.context,\n      );\n      this._placeholderRef.detectChanges();\n      placeholder = getRootNode(this._placeholderRef, this._document);\n    } else {\n      placeholder = deepCloneNode(this._rootElement);\n    }\n\n    // Stop pointer events on the preview so the user can't\n    // interact with it while the preview is animating.\n    placeholder.style.pointerEvents = 'none';\n    placeholder.classList.add(PLACEHOLDER_CLASS);\n    return placeholder;\n  }\n\n  /**\n   * Figures out the coordinates at which an element was picked up.\n   * @param referenceElement Element that initiated the dragging.\n   * @param event Event that initiated the dragging.\n   */\n  private _getPointerPositionInElement(\n    elementRect: DOMRect,\n    referenceElement: HTMLElement,\n    event: MouseEvent | TouchEvent,\n  ): Point {\n    const handleElement = referenceElement === this._rootElement ? null : referenceElement;\n    const referenceRect = handleElement ? handleElement.getBoundingClientRect() : elementRect;\n    const point = isTouchEvent(event) ? event.targetTouches[0] : event;\n    const scrollPosition = this._getViewportScrollPosition();\n    const x = point.pageX - referenceRect.left - scrollPosition.left;\n    const y = point.pageY - referenceRect.top - scrollPosition.top;\n\n    return {\n      x: referenceRect.left - elementRect.left + x,\n      y: referenceRect.top - elementRect.top + y,\n    };\n  }\n\n  /** Determines the point of the page that was touched by the user. */\n  private _getPointerPositionOnPage(event: MouseEvent | TouchEvent): Point {\n    const scrollPosition = this._getViewportScrollPosition();\n    const point = isTouchEvent(event)\n      ? // `touches` will be empty for start/end events so we have to fall back to `changedTouches`.\n        // Also note that on real devices we're guaranteed for either `touches` or `changedTouches`\n        // to have a value, but Firefox in device emulation mode has a bug where both can be empty\n        // for `touchstart` and `touchend` so we fall back to a dummy object in order to avoid\n        // throwing an error. The value returned here will be incorrect, but since this only\n        // breaks inside a developer tool and the value is only used for secondary information,\n        // we can get away with it. See https://bugzilla.mozilla.org/show_bug.cgi?id=1615824.\n        event.touches[0] || event.changedTouches[0] || {pageX: 0, pageY: 0}\n      : event;\n\n    const x = point.pageX - scrollPosition.left;\n    const y = point.pageY - scrollPosition.top;\n\n    // if dragging SVG element, try to convert from the screen coordinate system to the SVG\n    // coordinate system\n    if (this._ownerSVGElement) {\n      const svgMatrix = this._ownerSVGElement.getScreenCTM();\n      if (svgMatrix) {\n        const svgPoint = this._ownerSVGElement.createSVGPoint();\n        svgPoint.x = x;\n        svgPoint.y = y;\n        return svgPoint.matrixTransform(svgMatrix.inverse());\n      }\n    }\n\n    return {x, y};\n  }\n\n  /** Gets the pointer position on the page, accounting for any position constraints. */\n  private _getConstrainedPointerPosition(point: Point): Point {\n    const dropContainerLock = this._dropContainer ? this._dropContainer.lockAxis : null;\n    let {x, y} = this.constrainPosition\n      ? this.constrainPosition(point, this, this._initialDomRect!, this._pickupPositionInElement)\n      : point;\n\n    if (this.lockAxis === 'x' || dropContainerLock === 'x') {\n      y =\n        this._pickupPositionOnPage.y -\n        (this.constrainPosition ? this._pickupPositionInElement.y : 0);\n    } else if (this.lockAxis === 'y' || dropContainerLock === 'y') {\n      x =\n        this._pickupPositionOnPage.x -\n        (this.constrainPosition ? this._pickupPositionInElement.x : 0);\n    }\n\n    if (this._boundaryRect) {\n      // If not using a custom constrain we need to account for the pickup position in the element\n      // otherwise we do not need to do this, as it has already been accounted for\n      const {x: pickupX, y: pickupY} = !this.constrainPosition\n        ? this._pickupPositionInElement\n        : {x: 0, y: 0};\n\n      const boundaryRect = this._boundaryRect;\n      const {width: previewWidth, height: previewHeight} = this._getPreviewRect();\n      const minY = boundaryRect.top + pickupY;\n      const maxY = boundaryRect.bottom - (previewHeight - pickupY);\n      const minX = boundaryRect.left + pickupX;\n      const maxX = boundaryRect.right - (previewWidth - pickupX);\n\n      x = clamp(x, minX, maxX);\n      y = clamp(y, minY, maxY);\n    }\n\n    return {x, y};\n  }\n\n  /** Updates the current drag delta, based on the user's current pointer position on the page. */\n  private _updatePointerDirectionDelta(pointerPositionOnPage: Point) {\n    const {x, y} = pointerPositionOnPage;\n    const delta = this._pointerDirectionDelta;\n    const positionSinceLastChange = this._pointerPositionAtLastDirectionChange;\n\n    // Amount of pixels the user has dragged since the last time the direction changed.\n    const changeX = Math.abs(x - positionSinceLastChange.x);\n    const changeY = Math.abs(y - positionSinceLastChange.y);\n\n    // Because we handle pointer events on a per-pixel basis, we don't want the delta\n    // to change for every pixel, otherwise anything that depends on it can look erratic.\n    // To make the delta more consistent, we track how much the user has moved since the last\n    // delta change and we only update it after it has reached a certain threshold.\n    if (changeX > this._config.pointerDirectionChangeThreshold) {\n      delta.x = x > positionSinceLastChange.x ? 1 : -1;\n      positionSinceLastChange.x = x;\n    }\n\n    if (changeY > this._config.pointerDirectionChangeThreshold) {\n      delta.y = y > positionSinceLastChange.y ? 1 : -1;\n      positionSinceLastChange.y = y;\n    }\n\n    return delta;\n  }\n\n  /** Toggles the native drag interactions, based on how many handles are registered. */\n  private _toggleNativeDragInteractions() {\n    if (!this._rootElement || !this._handles) {\n      return;\n    }\n\n    const shouldEnable = this._handles.length > 0 || !this.isDragging();\n\n    if (shouldEnable !== this._nativeInteractionsEnabled) {\n      this._nativeInteractionsEnabled = shouldEnable;\n      toggleNativeDragInteractions(this._rootElement, shouldEnable);\n    }\n  }\n\n  /** Removes the manually-added event listeners from the root element. */\n  private _removeRootElementListeners() {\n    this._rootElementCleanups?.forEach(cleanup => cleanup());\n    this._rootElementCleanups = undefined;\n  }\n\n  /**\n   * Applies a `transform` to the root element, taking into account any existing transforms on it.\n   * @param x New transform value along the X axis.\n   * @param y New transform value along the Y axis.\n   */\n  private _applyRootElementTransform(x: number, y: number) {\n    const scale = 1 / this.scale;\n    const transform = getTransform(x * scale, y * scale);\n    const styles = this._rootElement.style;\n\n    // Cache the previous transform amount only after the first drag sequence, because\n    // we don't want our own transforms to stack on top of each other.\n    // Should be excluded none because none + translate3d(x, y, x) is invalid css\n    if (this._initialTransform == null) {\n      this._initialTransform =\n        styles.transform && styles.transform != 'none' ? styles.transform : '';\n    }\n\n    // Preserve the previous `transform` value, if there was one. Note that we apply our own\n    // transform before the user's, because things like rotation can affect which direction\n    // the element will be translated towards.\n    styles.transform = combineTransforms(transform, this._initialTransform);\n  }\n\n  /**\n   * Applies a `transform` to the preview, taking into account any existing transforms on it.\n   * @param x New transform value along the X axis.\n   * @param y New transform value along the Y axis.\n   */\n  private _applyPreviewTransform(x: number, y: number) {\n    // Only apply the initial transform if the preview is a clone of the original element, otherwise\n    // it could be completely different and the transform might not make sense anymore.\n    const initialTransform = this._previewTemplate?.template ? undefined : this._initialTransform;\n    const transform = getTransform(x, y);\n    this._preview!.setTransform(combineTransforms(transform, initialTransform));\n  }\n\n  /**\n   * Gets the distance that the user has dragged during the current drag sequence.\n   * @param currentPosition Current position of the user's pointer.\n   */\n  private _getDragDistance(currentPosition: Point): Point {\n    const pickupPosition = this._pickupPositionOnPage;\n\n    if (pickupPosition) {\n      return {x: currentPosition.x - pickupPosition.x, y: currentPosition.y - pickupPosition.y};\n    }\n\n    return {x: 0, y: 0};\n  }\n\n  /** Cleans up any cached element dimensions that we don't need after dragging has stopped. */\n  private _cleanupCachedDimensions() {\n    this._boundaryRect = this._previewRect = undefined;\n    this._parentPositions.clear();\n  }\n\n  /**\n   * Checks whether the element is still inside its boundary after the viewport has been resized.\n   * If not, the position is adjusted so that the element fits again.\n   */\n  private _containInsideBoundaryOnResize() {\n    let {x, y} = this._passiveTransform;\n\n    if ((x === 0 && y === 0) || this.isDragging() || !this._boundaryElement) {\n      return;\n    }\n\n    // Note: don't use `_clientRectAtStart` here, because we want the latest position.\n    const elementRect = this._rootElement.getBoundingClientRect();\n    const boundaryRect = this._boundaryElement.getBoundingClientRect();\n\n    // It's possible that the element got hidden away after dragging (e.g. by switching to a\n    // different tab). Don't do anything in this case so we don't clear the user's position.\n    if (\n      (boundaryRect.width === 0 && boundaryRect.height === 0) ||\n      (elementRect.width === 0 && elementRect.height === 0)\n    ) {\n      return;\n    }\n\n    const leftOverflow = boundaryRect.left - elementRect.left;\n    const rightOverflow = elementRect.right - boundaryRect.right;\n    const topOverflow = boundaryRect.top - elementRect.top;\n    const bottomOverflow = elementRect.bottom - boundaryRect.bottom;\n\n    // If the element has become wider than the boundary, we can't\n    // do much to make it fit so we just anchor it to the left.\n    if (boundaryRect.width > elementRect.width) {\n      if (leftOverflow > 0) {\n        x += leftOverflow;\n      }\n\n      if (rightOverflow > 0) {\n        x -= rightOverflow;\n      }\n    } else {\n      x = 0;\n    }\n\n    // If the element has become taller than the boundary, we can't\n    // do much to make it fit so we just anchor it to the top.\n    if (boundaryRect.height > elementRect.height) {\n      if (topOverflow > 0) {\n        y += topOverflow;\n      }\n\n      if (bottomOverflow > 0) {\n        y -= bottomOverflow;\n      }\n    } else {\n      y = 0;\n    }\n\n    if (x !== this._passiveTransform.x || y !== this._passiveTransform.y) {\n      this.setFreeDragPosition({y, x});\n    }\n  }\n\n  /** Gets the drag start delay, based on the event type. */\n  private _getDragStartDelay(event: MouseEvent | TouchEvent): number {\n    const value = this.dragStartDelay;\n\n    if (typeof value === 'number') {\n      return value;\n    } else if (isTouchEvent(event)) {\n      return value.touch;\n    }\n\n    return value ? value.mouse : 0;\n  }\n\n  /** Updates the internal state of the draggable element when scrolling has occurred. */\n  private _updateOnScroll(event: Event) {\n    const scrollDifference = this._parentPositions.handleScroll(event);\n\n    if (scrollDifference) {\n      const target = _getEventTarget<HTMLElement | Document>(event)!;\n\n      // DOMRect dimensions are based on the scroll position of the page and its parent\n      // node so we have to update the cached boundary DOMRect if the user has scrolled.\n      if (\n        this._boundaryRect &&\n        target !== this._boundaryElement &&\n        target.contains(this._boundaryElement)\n      ) {\n        adjustDomRect(this._boundaryRect, scrollDifference.top, scrollDifference.left);\n      }\n\n      this._pickupPositionOnPage.x += scrollDifference.left;\n      this._pickupPositionOnPage.y += scrollDifference.top;\n\n      // If we're in free drag mode, we have to update the active transform, because\n      // it isn't relative to the viewport like the preview inside a drop list.\n      if (!this._dropContainer) {\n        this._activeTransform.x -= scrollDifference.left;\n        this._activeTransform.y -= scrollDifference.top;\n        this._applyRootElementTransform(this._activeTransform.x, this._activeTransform.y);\n      }\n    }\n  }\n\n  /** Gets the scroll position of the viewport. */\n  private _getViewportScrollPosition() {\n    return (\n      this._parentPositions.positions.get(this._document)?.scrollPosition ||\n      this._parentPositions.getViewportScrollPosition()\n    );\n  }\n\n  /**\n   * Lazily resolves and returns the shadow root of the element. We do this in a function, rather\n   * than saving it in property directly on init, because we want to resolve it as late as possible\n   * in order to ensure that the element has been moved into the shadow DOM. Doing it inside the\n   * constructor might be too early if the element is inside of something like `ngFor` or `ngIf`.\n   */\n  private _getShadowRoot(): ShadowRoot | null {\n    if (this._cachedShadowRoot === undefined) {\n      this._cachedShadowRoot = _getShadowRoot(this._rootElement);\n    }\n\n    return this._cachedShadowRoot;\n  }\n\n  /** Gets the element into which the drag preview should be inserted. */\n  private _getPreviewInsertionPoint(\n    initialParent: HTMLElement,\n    shadowRoot: ShadowRoot | null,\n  ): HTMLElement {\n    const previewContainer = this._previewContainer || 'global';\n\n    if (previewContainer === 'parent') {\n      return initialParent;\n    }\n\n    if (previewContainer === 'global') {\n      const documentRef = this._document;\n\n      // We can't use the body if the user is in fullscreen mode,\n      // because the preview will render under the fullscreen element.\n      // TODO(crisbeto): dedupe this with the `FullscreenOverlayContainer` eventually.\n      return (\n        shadowRoot ||\n        documentRef.fullscreenElement ||\n        (documentRef as any).webkitFullscreenElement ||\n        (documentRef as any).mozFullScreenElement ||\n        (documentRef as any).msFullscreenElement ||\n        documentRef.body\n      );\n    }\n\n    return coerceElement(previewContainer);\n  }\n\n  /** Lazily resolves and returns the dimensions of the preview. */\n  private _getPreviewRect(): DOMRect {\n    // Cache the preview element rect if we haven't cached it already or if\n    // we cached it too early before the element dimensions were computed.\n    if (!this._previewRect || (!this._previewRect.width && !this._previewRect.height)) {\n      this._previewRect = this._preview\n        ? this._preview!.getBoundingClientRect()\n        : this._initialDomRect!;\n    }\n\n    return this._previewRect;\n  }\n\n  /** Handles a native `dragstart` event. */\n  private _nativeDragStart = (event: DragEvent) => {\n    if (this._handles.length) {\n      const targetHandle = this._getTargetHandle(event);\n\n      if (targetHandle && !this._disabledHandles.has(targetHandle) && !this.disabled) {\n        event.preventDefault();\n      }\n    } else if (!this.disabled) {\n      // Usually this isn't necessary since the we prevent the default action in `pointerDown`,\n      // but some cases like dragging of links can slip through (see #24403).\n      event.preventDefault();\n    }\n  };\n\n  /** Gets a handle that is the target of an event. */\n  private _getTargetHandle(event: Event): HTMLElement | undefined {\n    return this._handles.find(handle => {\n      return event.target && (event.target === handle || handle.contains(event.target as Node));\n    });\n  }\n\n  /** Inserts the anchor element, if it's valid. */\n  private _conditionallyInsertAnchor(\n    newContainer: DropListRef,\n    exitContainer: DropListRef,\n    nextItemElement: HTMLElement | null,\n  ) {\n    // Remove the anchor when returning to the initial container.\n    if (newContainer === this._initialContainer) {\n      this._anchor?.remove();\n      this._anchor = null;\n    } else if (exitContainer === this._initialContainer && exitContainer.hasAnchor) {\n      // Insert the anchor when leaving the initial container.\n      const anchor = (this._anchor ??= deepCloneNode(this._placeholder));\n      anchor.classList.remove(PLACEHOLDER_CLASS);\n      anchor.classList.add('cdk-drag-anchor');\n\n      // Clear the transform since the single-axis strategy uses transforms to sort the items.\n      anchor.style.transform = '';\n\n      // When the item leaves the initial container, the container's DOM will be restored to\n      // its original state, except for the dragged item which is removed. Insert the anchor in\n      // the position from which the item left so that the list looks consistent.\n      if (nextItemElement) {\n        nextItemElement.before(anchor);\n      } else {\n        coerceElement(exitContainer.element).appendChild(anchor);\n      }\n    }\n  }\n}\n\n/** Clamps a value between a minimum and a maximum. */\nfunction clamp(value: number, min: number, max: number) {\n  return Math.max(min, Math.min(max, value));\n}\n\n/** Determines whether an event is a touch event. */\nfunction isTouchEvent(event: MouseEvent | TouchEvent): event is TouchEvent {\n  // This function is called for every pixel that the user has dragged so we need it to be\n  // as fast as possible. Since we only bind mouse events and touch events, we can assume\n  // that if the event's name starts with `t`, it's a touch event.\n  return event.type[0] === 't';\n}\n\n/** Callback invoked for `selectstart` events inside the shadow DOM. */\nfunction shadowDomSelectStart(event: Event) {\n  event.preventDefault();\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 * Moves an item one index in an array to another.\n * @param array Array in which to move the item.\n * @param fromIndex Starting index of the item.\n * @param toIndex Index to which the item should be moved.\n */\nexport function moveItemInArray<T = any>(array: T[], fromIndex: number, toIndex: number): void {\n  const from = clamp(fromIndex, array.length - 1);\n  const to = clamp(toIndex, array.length - 1);\n\n  if (from === to) {\n    return;\n  }\n\n  const target = array[from];\n  const delta = to < from ? -1 : 1;\n\n  for (let i = from; i !== to; i += delta) {\n    array[i] = array[i + delta];\n  }\n\n  array[to] = target;\n}\n\n/**\n * Moves an item from one array to another.\n * @param currentArray Array from which to transfer the item.\n * @param targetArray Array into which to put the item.\n * @param currentIndex Index of the item in its current array.\n * @param targetIndex Index at which to insert the item.\n */\nexport function transferArrayItem<T = any>(\n  currentArray: T[],\n  targetArray: T[],\n  currentIndex: number,\n  targetIndex: number,\n): void {\n  const from = clamp(currentIndex, currentArray.length - 1);\n  const to = clamp(targetIndex, targetArray.length);\n\n  if (currentArray.length) {\n    targetArray.splice(to, 0, currentArray.splice(from, 1)[0]);\n  }\n}\n\n/**\n * Copies an item from one array to another, leaving it in its\n * original position in current array.\n * @param currentArray Array from which to copy the item.\n * @param targetArray Array into which is copy the item.\n * @param currentIndex Index of the item in its current array.\n * @param targetIndex Index at which to insert the item.\n *\n */\nexport function copyArrayItem<T = any>(\n  currentArray: T[],\n  targetArray: T[],\n  currentIndex: number,\n  targetIndex: number,\n): void {\n  const to = clamp(targetIndex, targetArray.length);\n\n  if (currentArray.length) {\n    targetArray.splice(to, 0, currentArray[currentIndex]);\n  }\n}\n\n/** Clamps a number between zero and a maximum. */\nfunction clamp(value: number, max: number): number {\n  return Math.max(0, Math.min(max, value));\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} from '../../bidi';\nimport {DragDropRegistry} from '../drag-drop-registry';\nimport {moveItemInArray} from '../drag-utils';\nimport {combineTransforms} from '../dom/styling';\nimport {adjustDomRect, getMutableClientRect, isInsideClientRect} from '../dom/dom-rect';\nimport {DropListSortStrategy, SortPredicate} from './drop-list-sort-strategy';\nimport type {DragRef} from '../drag-ref';\n\n/**\n * Entry in the position cache for draggable items.\n * @docs-private\n */\ninterface CachedItemPosition<T> {\n  /** Instance of the drag item. */\n  drag: T;\n  /** Dimensions of the item. */\n  clientRect: DOMRect;\n  /** Amount by which the item has been moved since dragging started. */\n  offset: number;\n  /** Inline transform that the drag item had when dragging started. */\n  initialTransform: string;\n}\n\n/**\n * Strategy that only supports sorting along a single axis.\n * Items are reordered using CSS transforms which allows for sorting to be animated.\n * @docs-private\n */\nexport class SingleAxisSortStrategy implements DropListSortStrategy {\n  /** Root element container of the drop list. */\n  private _element!: HTMLElement;\n\n  /** Function used to determine if an item can be sorted into a specific index. */\n  private _sortPredicate!: SortPredicate<DragRef>;\n\n  /** Cache of the dimensions of all the items inside the container. */\n  private _itemPositions: CachedItemPosition<DragRef>[] = [];\n\n  /**\n   * Draggable items that are currently active inside the container. Includes the items\n   * that were there at the start of the sequence, as well as any items that have been dragged\n   * in, but haven't been dropped yet.\n   */\n  private _activeDraggables!: DragRef[];\n\n  /** Direction in which the list is oriented. */\n  orientation: 'vertical' | 'horizontal' = 'vertical';\n\n  /** Layout direction of the drop list. */\n  direction: Direction = 'ltr';\n\n  constructor(private _dragDropRegistry: DragDropRegistry) {}\n\n  /**\n   * Keeps track of the item that was last swapped with the dragged item, as well as what direction\n   * the pointer was moving in when the swap occurred and whether the user's pointer continued to\n   * overlap with the swapped item after the swapping occurred.\n   */\n  private _previousSwap = {\n    drag: null as DragRef | null,\n    delta: 0,\n    overlaps: false,\n  };\n\n  /**\n   * To be called when the drag sequence starts.\n   * @param items Items that are currently in the list.\n   */\n  start(items: readonly DragRef[]) {\n    this.withItems(items);\n  }\n\n  /**\n   * To be called when an item is being sorted.\n   * @param item Item to be sorted.\n   * @param pointerX Position of the item along the X axis.\n   * @param pointerY Position of the item along the Y axis.\n   * @param pointerDelta Direction in which the pointer is moving along each axis.\n   */\n  sort(item: DragRef, pointerX: number, pointerY: number, pointerDelta: {x: number; y: number}) {\n    const siblings = this._itemPositions;\n    const newIndex = this._getItemIndexFromPointerPosition(item, pointerX, pointerY, pointerDelta);\n\n    if (newIndex === -1 && siblings.length > 0) {\n      return null;\n    }\n\n    const isHorizontal = this.orientation === 'horizontal';\n    const currentIndex = siblings.findIndex(currentItem => currentItem.drag === item);\n    const siblingAtNewPosition = siblings[newIndex];\n    const currentPosition = siblings[currentIndex].clientRect;\n    const newPosition = siblingAtNewPosition.clientRect;\n    const delta = currentIndex > newIndex ? 1 : -1;\n\n    // How many pixels the item's placeholder should be offset.\n    const itemOffset = this._getItemOffsetPx(currentPosition, newPosition, delta);\n\n    // How many pixels all the other items should be offset.\n    const siblingOffset = this._getSiblingOffsetPx(currentIndex, siblings, delta);\n\n    // Save the previous order of the items before moving the item to its new index.\n    // We use this to check whether an item has been moved as a result of the sorting.\n    const oldOrder = siblings.slice();\n\n    // Shuffle the array in place.\n    moveItemInArray(siblings, currentIndex, newIndex);\n\n    siblings.forEach((sibling, index) => {\n      // Don't do anything if the position hasn't changed.\n      if (oldOrder[index] === sibling) {\n        return;\n      }\n\n      const isDraggedItem = sibling.drag === item;\n      const offset = isDraggedItem ? itemOffset : siblingOffset;\n      const elementToOffset = isDraggedItem\n        ? item.getPlaceholderElement()\n        : sibling.drag.getRootElement();\n\n      // Update the offset to reflect the new position.\n      sibling.offset += offset;\n\n      const transformAmount = Math.round(sibling.offset * (1 / sibling.drag.scale));\n\n      // Since we're moving the items with a `transform`, we need to adjust their cached\n      // client rects to reflect their new position, as well as swap their positions in the cache.\n      // Note that we shouldn't use `getBoundingClientRect` here to update the cache, because the\n      // elements may be mid-animation which will give us a wrong result.\n      if (isHorizontal) {\n        // Round the transforms since some browsers will\n        // blur the elements, for sub-pixel transforms.\n        elementToOffset.style.transform = combineTransforms(\n          `translate3d(${transformAmount}px, 0, 0)`,\n          sibling.initialTransform,\n        );\n        adjustDomRect(sibling.clientRect, 0, offset);\n      } else {\n        elementToOffset.style.transform = combineTransforms(\n          `translate3d(0, ${transformAmount}px, 0)`,\n          sibling.initialTransform,\n        );\n        adjustDomRect(sibling.clientRect, offset, 0);\n      }\n    });\n\n    // Note that it's important that we do this after the client rects have been adjusted.\n    this._previousSwap.overlaps = isInsideClientRect(newPosition, pointerX, pointerY);\n    this._previousSwap.drag = siblingAtNewPosition.drag;\n    this._previousSwap.delta = isHorizontal ? pointerDelta.x : pointerDelta.y;\n\n    return {previousIndex: currentIndex, currentIndex: newIndex};\n  }\n\n  /**\n   * Called when an item is being moved into the container.\n   * @param item Item that was moved into the container.\n   * @param pointerX Position of the item along the X axis.\n   * @param pointerY Position of the item along the Y axis.\n   * @param index Index at which the item entered. If omitted, the container will try to figure it\n   *   out automatically.\n   */\n  enter(item: DragRef, pointerX: number, pointerY: number, index?: number): void {\n    const activeDraggables = this._activeDraggables;\n    const currentIndex = activeDraggables.indexOf(item);\n    const placeholder = item.getPlaceholderElement();\n\n    // Since the item may be in the `activeDraggables` already (e.g. if the user dragged it\n    // into another container and back again), we have to ensure that it isn't duplicated.\n    // Note that we need to run this early so the code further below isn't thrown off.\n    if (currentIndex > -1) {\n      activeDraggables.splice(currentIndex, 1);\n    }\n\n    const newIndex =\n      index == null || index < 0\n        ? // We use the coordinates of where the item entered the drop\n          // zone to figure out at which index it should be inserted.\n          this._getItemIndexFromPointerPosition(item, pointerX, pointerY)\n        : index;\n\n    let newPositionReference: DragRef | undefined = activeDraggables[newIndex];\n\n    // If the item at the new position is the same as the item that is being dragged,\n    // it means that we're trying to restore the item to its initial position. In this\n    // case we should use the next item from the list as the reference.\n    if (newPositionReference === item) {\n      newPositionReference = activeDraggables[newIndex + 1];\n    }\n\n    // If we didn't find a new position reference, it means that either the item didn't start off\n    // in this container, or that the item requested to be inserted at the end of the list.\n    if (\n      !newPositionReference &&\n      (newIndex == null || newIndex === -1 || newIndex < activeDraggables.length - 1) &&\n      this._shouldEnterAsFirstChild(pointerX, pointerY)\n    ) {\n      newPositionReference = activeDraggables[0];\n    }\n\n    // Don't use items that are being dragged as a reference, because\n    // their element has been moved down to the bottom of the body.\n    if (newPositionReference && !this._dragDropRegistry.isDragging(newPositionReference)) {\n      const element = newPositionReference.getRootElement();\n      element.parentElement!.insertBefore(placeholder, element);\n      activeDraggables.splice(newIndex, 0, item);\n    } else {\n      this._element.appendChild(placeholder);\n      activeDraggables.push(item);\n    }\n\n    // The transform needs to be cleared so it doesn't throw off the measurements.\n    placeholder.style.transform = '';\n\n    // Note that usually `start` is called together with `enter` when an item goes into a new\n    // container. This will cache item positions, but we need to refresh them since the amount\n    // of items has changed.\n    this._cacheItemPositions();\n  }\n\n  /** Sets the items that are currently part of the list. */\n  withItems(items: readonly DragRef[]): void {\n    this._activeDraggables = items.slice();\n    this._cacheItemPositions();\n  }\n\n  /** Assigns a sort predicate to the strategy. */\n  withSortPredicate(predicate: SortPredicate<DragRef>): void {\n    this._sortPredicate = predicate;\n  }\n\n  /** Resets the strategy to its initial state before dragging was started. */\n  reset() {\n    // TODO(crisbeto): may have to wait for the animations to finish.\n    this._activeDraggables?.forEach(item => {\n      const rootElement = item.getRootElement();\n\n      if (rootElement) {\n        const initialTransform = this._itemPositions.find(p => p.drag === item)?.initialTransform;\n        rootElement.style.transform = initialTransform || '';\n      }\n    });\n\n    this._itemPositions = [];\n    this._activeDraggables = [];\n    this._previousSwap.drag = null;\n    this._previousSwap.delta = 0;\n    this._previousSwap.overlaps = false;\n  }\n\n  /**\n   * Gets a snapshot of items currently in the list.\n   * Can include items that we dragged in from another list.\n   */\n  getActiveItemsSnapshot(): readonly DragRef[] {\n    return this._activeDraggables;\n  }\n\n  /** Gets the index of a specific item. */\n  getItemIndex(item: DragRef): number {\n    return this._getVisualItemPositions().findIndex(currentItem => currentItem.drag === item);\n  }\n\n  /** Gets the item at a specific index. */\n  getItemAtIndex(index: number): DragRef | null {\n    return this._getVisualItemPositions()[index]?.drag || null;\n  }\n\n  /** Used to notify the strategy that the scroll position has changed. */\n  updateOnScroll(topDifference: number, leftDifference: number) {\n    // Since we know the amount that the user has scrolled we can shift all of the\n    // client rectangles ourselves. This is cheaper than re-measuring everything and\n    // we can avoid inconsistent behavior where we might be measuring the element before\n    // its position has changed.\n    this._itemPositions.forEach(({clientRect}) => {\n      adjustDomRect(clientRect, topDifference, leftDifference);\n    });\n\n    // We need two loops for this, because we want all of the cached\n    // positions to be up-to-date before we re-sort the item.\n    this._itemPositions.forEach(({drag}) => {\n      if (this._dragDropRegistry.isDragging(drag)) {\n        // We need to re-sort the item manually, because the pointer move\n        // events won't be dispatched while the user is scrolling.\n        drag._sortFromLastPointerPosition();\n      }\n    });\n  }\n\n  withElementContainer(container: HTMLElement): void {\n    this._element = container;\n  }\n\n  /** Refreshes the position cache of the items and sibling containers. */\n  private _cacheItemPositions() {\n    const isHorizontal = this.orientation === 'horizontal';\n\n    this._itemPositions = this._activeDraggables\n      .map(drag => {\n        const elementToMeasure = drag.getVisibleElement();\n        return {\n          drag,\n          offset: 0,\n          initialTransform: elementToMeasure.style.transform || '',\n          clientRect: getMutableClientRect(elementToMeasure),\n        };\n      })\n      .sort((a, b) => {\n        return isHorizontal\n          ? a.clientRect.left - b.clientRect.left\n          : a.clientRect.top - b.clientRect.top;\n      });\n  }\n\n  private _getVisualItemPositions() {\n    // Items are sorted always by top/left in the cache, however they flow differently in RTL.\n    // The rest of the logic still stands no matter what orientation we're in, however\n    // we need to invert the array when determining the index.\n    return this.orientation === 'horizontal' && this.direction === 'rtl'\n      ? this._itemPositions.slice().reverse()\n      : this._itemPositions;\n  }\n\n  /**\n   * Gets the offset in pixels by which the item that is being dragged should be moved.\n   * @param currentPosition Current position of the item.\n   * @param newPosition Position of the item where the current item should be moved.\n   * @param delta Direction in which the user is moving.\n   */\n  private _getItemOffsetPx(currentPosition: DOMRect, newPosition: DOMRect, delta: 1 | -1) {\n    const isHorizontal = this.orientation === 'horizontal';\n    let itemOffset = isHorizontal\n      ? newPosition.left - currentPosition.left\n      : newPosition.top - currentPosition.top;\n\n    // Account for differences in the item width/height.\n    if (delta === -1) {\n      itemOffset += isHorizontal\n        ? newPosition.width - currentPosition.width\n        : newPosition.height - currentPosition.height;\n    }\n\n    return itemOffset;\n  }\n\n  /**\n   * Gets the offset in pixels by which the items that aren't being dragged should be moved.\n   * @param currentIndex Index of the item currently being dragged.\n   * @param siblings All of the items in the list.\n   * @param delta Direction in which the user is moving.\n   */\n  private _getSiblingOffsetPx(\n    currentIndex: number,\n    siblings: CachedItemPosition<DragRef>[],\n    delta: 1 | -1,\n  ) {\n    const isHorizontal = this.orientation === 'horizontal';\n    const currentPosition = siblings[currentIndex].clientRect;\n    const immediateSibling = siblings[currentIndex + delta * -1];\n    let siblingOffset = currentPosition[isHorizontal ? 'width' : 'height'] * delta;\n\n    if (immediateSibling) {\n      const start = isHorizontal ? 'left' : 'top';\n      const end = isHorizontal ? 'right' : 'bottom';\n\n      // Get the spacing between the start of the current item and the end of the one immediately\n      // after it in the direction in which the user is dragging, or vice versa. We add it to the\n      // offset in order to push the element to where it will be when it's inline and is influenced\n      // by the `margin` of its siblings.\n      if (delta === -1) {\n        siblingOffset -= immediateSibling.clientRect[start] - currentPosition[end];\n      } else {\n        siblingOffset += currentPosition[start] - immediateSibling.clientRect[end];\n      }\n    }\n\n    return siblingOffset;\n  }\n\n  /**\n   * Checks if pointer is entering in the first position\n   * @param pointerX Position of the user's pointer along the X axis.\n   * @param pointerY Position of the user's pointer along the Y axis.\n   */\n  private _shouldEnterAsFirstChild(pointerX: number, pointerY: number) {\n    if (!this._activeDraggables.length) {\n      return false;\n    }\n\n    const itemPositions = this._itemPositions;\n    const isHorizontal = this.orientation === 'horizontal';\n\n    // `itemPositions` are sorted by position while `activeDraggables` are sorted by child index\n    // check if container is using some sort of \"reverse\" ordering (eg: flex-direction: row-reverse)\n    const reversed = itemPositions[0].drag !== this._activeDraggables[0];\n    if (reversed) {\n      const lastItemRect = itemPositions[itemPositions.length - 1].clientRect;\n      return isHorizontal ? pointerX >= lastItemRect.right : pointerY >= lastItemRect.bottom;\n    } else {\n      const firstItemRect = itemPositions[0].clientRect;\n      return isHorizontal ? pointerX <= firstItemRect.left : pointerY <= firstItemRect.top;\n    }\n  }\n\n  /**\n   * Gets the index of an item in the drop container, based on the position of the user's pointer.\n   * @param item Item that is being sorted.\n   * @param pointerX Position of the user's pointer along the X axis.\n   * @param pointerY Position of the user's pointer along the Y axis.\n   * @param delta Direction in which the user is moving their pointer.\n   */\n  private _getItemIndexFromPointerPosition(\n    item: DragRef,\n    pointerX: number,\n    pointerY: number,\n    delta?: {x: number; y: number},\n  ): number {\n    const isHorizontal = this.orientation === 'horizontal';\n    const index = this._itemPositions.findIndex(({drag, clientRect}) => {\n      // Skip the item itself.\n      if (drag === item) {\n        return false;\n      }\n\n      if (delta) {\n        const direction = isHorizontal ? delta.x : delta.y;\n\n        // If the user is still hovering over the same item as last time, their cursor hasn't left\n        // the item after we made the swap, and they didn't change the direction in which they're\n        // dragging, we don't consider it a direction swap.\n        if (\n          drag === this._previousSwap.drag &&\n          this._previousSwap.overlaps &&\n          direction === this._previousSwap.delta\n        ) {\n          return false;\n        }\n      }\n\n      return isHorizontal\n        ? // Round these down since most browsers report client rects with\n          // sub-pixel precision, whereas the pointer coordinates are rounded to pixels.\n          pointerX >= Math.floor(clientRect.left) && pointerX < Math.floor(clientRect.right)\n        : pointerY >= Math.floor(clientRect.top) && pointerY < Math.floor(clientRect.bottom);\n    });\n\n    return index === -1 || !this._sortPredicate(index, item) ? -1 : index;\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 {_getShadowRoot} from '../../platform';\nimport {moveItemInArray} from '../drag-utils';\nimport {DropListSortStrategy, SortPredicate} from './drop-list-sort-strategy';\nimport {DragDropRegistry} from '../drag-drop-registry';\nimport type {DragRef} from '../drag-ref';\n\n/**\n * Strategy that only supports sorting on a list that might wrap.\n * Items are reordered by moving their DOM nodes around.\n * @docs-private\n */\nexport class MixedSortStrategy implements DropListSortStrategy {\n  /** Root element container of the drop list. */\n  private _element!: HTMLElement;\n\n  /** Function used to determine if an item can be sorted into a specific index. */\n  private _sortPredicate!: SortPredicate<DragRef>;\n\n  /** Lazily-resolved root node containing the list. Use `_getRootNode` to read this. */\n  private _rootNode: DocumentOrShadowRoot | undefined;\n\n  /**\n   * Draggable items that are currently active inside the container. Includes the items\n   * that were there at the start of the sequence, as well as any items that have been dragged\n   * in, but haven't been dropped yet.\n   */\n  private _activeItems!: DragRef[];\n\n  /**\n   * Keeps track of the item that was last swapped with the dragged item, as well as what direction\n   * the pointer was moving in when the swap occurred and whether the user's pointer continued to\n   * overlap with the swapped item after the swapping occurred.\n   */\n  private _previousSwap = {\n    drag: null as DragRef | null,\n    deltaX: 0,\n    deltaY: 0,\n    overlaps: false,\n  };\n\n  /**\n   * Keeps track of the relationship between a node and its next sibling. This information\n   * is used to restore the DOM to the order it was in before dragging started.\n   */\n  private _relatedNodes: [node: Node, nextSibling: Node | null][] = [];\n\n  constructor(\n    private _document: Document,\n    private _dragDropRegistry: DragDropRegistry,\n  ) {}\n\n  /**\n   * To be called when the drag sequence starts.\n   * @param items Items that are currently in the list.\n   */\n  start(items: readonly DragRef[]): void {\n    const childNodes = this._element.childNodes;\n    this._relatedNodes = [];\n\n    for (let i = 0; i < childNodes.length; i++) {\n      const node = childNodes[i];\n      this._relatedNodes.push([node, node.nextSibling]);\n    }\n\n    this.withItems(items);\n  }\n\n  /**\n   * To be called when an item is being sorted.\n   * @param item Item to be sorted.\n   * @param pointerX Position of the item along the X axis.\n   * @param pointerY Position of the item along the Y axis.\n   * @param pointerDelta Direction in which the pointer is moving along each axis.\n   */\n  sort(\n    item: DragRef,\n    pointerX: number,\n    pointerY: number,\n    pointerDelta: {x: number; y: number},\n  ): {previousIndex: number; currentIndex: number} | null {\n    const newIndex = this._getItemIndexFromPointerPosition(item, pointerX, pointerY);\n    const previousSwap = this._previousSwap;\n\n    if (newIndex === -1 || this._activeItems[newIndex] === item) {\n      return null;\n    }\n\n    const toSwapWith = this._activeItems[newIndex];\n\n    // Prevent too many swaps over the same item.\n    if (\n      previousSwap.drag === toSwapWith &&\n      previousSwap.overlaps &&\n      previousSwap.deltaX === pointerDelta.x &&\n      previousSwap.deltaY === pointerDelta.y\n    ) {\n      return null;\n    }\n\n    const previousIndex = this.getItemIndex(item);\n    const current = item.getPlaceholderElement();\n    const overlapElement = toSwapWith.getRootElement();\n\n    if (newIndex > previousIndex) {\n      overlapElement.after(current);\n    } else {\n      overlapElement.before(current);\n    }\n\n    moveItemInArray(this._activeItems, previousIndex, newIndex);\n\n    const newOverlapElement = this._getRootNode().elementFromPoint(pointerX, pointerY);\n    // Note: it's tempting to save the entire `pointerDelta` object here, however that'll\n    // break this functionality, because the same object is passed for all `sort` calls.\n    previousSwap.deltaX = pointerDelta.x;\n    previousSwap.deltaY = pointerDelta.y;\n    previousSwap.drag = toSwapWith;\n    previousSwap.overlaps =\n      overlapElement === newOverlapElement || overlapElement.contains(newOverlapElement);\n\n    return {\n      previousIndex,\n      currentIndex: newIndex,\n    };\n  }\n\n  /**\n   * Called when an item is being moved into the container.\n   * @param item Item that was moved into the container.\n   * @param pointerX Position of the item along the X axis.\n   * @param pointerY Position of the item along the Y axis.\n   * @param index Index at which the item entered. If omitted, the container will try to figure it\n   *   out automatically.\n   */\n  enter(item: DragRef, pointerX: number, pointerY: number, index?: number): void {\n    // Remove the item from current set of items first so that it doesn't throw off the indexes\n    // further down in this method. See https://github.com/angular/components/issues/31505\n    const currentIndex = this._activeItems.indexOf(item);\n\n    if (currentIndex > -1) {\n      this._activeItems.splice(currentIndex, 1);\n    }\n\n    let enterIndex =\n      index == null || index < 0\n        ? this._getItemIndexFromPointerPosition(item, pointerX, pointerY)\n        : index;\n\n    // In some cases (e.g. when the container has padding) we might not be able to figure\n    // out which item to insert the dragged item next to, because the pointer didn't overlap\n    // with anything. In that case we find the item that's closest to the pointer.\n    if (enterIndex === -1) {\n      enterIndex = this._getClosestItemIndexToPointer(item, pointerX, pointerY);\n    }\n\n    const targetItem = this._activeItems[enterIndex] as DragRef | undefined;\n\n    if (targetItem && !this._dragDropRegistry.isDragging(targetItem)) {\n      this._activeItems.splice(enterIndex, 0, item);\n      targetItem.getRootElement().before(item.getPlaceholderElement());\n    } else {\n      this._activeItems.push(item);\n      this._element.appendChild(item.getPlaceholderElement());\n    }\n  }\n\n  /** Sets the items that are currently part of the list. */\n  withItems(items: readonly DragRef[]): void {\n    this._activeItems = items.slice();\n  }\n\n  /** Assigns a sort predicate to the strategy. */\n  withSortPredicate(predicate: SortPredicate<DragRef>): void {\n    this._sortPredicate = predicate;\n  }\n\n  /** Resets the strategy to its initial state before dragging was started. */\n  reset(): void {\n    const root = this._element;\n    const previousSwap = this._previousSwap;\n\n    // Moving elements around in the DOM can break things like the `@for` loop, because it\n    // uses comment nodes to know where to insert elements. To avoid such issues, we restore\n    // the DOM nodes in the list to their original order when the list is reset.\n    // Note that this could be simpler if we just saved all the nodes, cleared the root\n    // and then appended them in the original order. We don't do it, because it can break\n    // down depending on when the snapshot was taken. E.g. we may end up snapshotting the\n    // placeholder element which is removed after dragging.\n    for (let i = this._relatedNodes.length - 1; i > -1; i--) {\n      const [node, nextSibling] = this._relatedNodes[i];\n      if (node.parentNode === root && node.nextSibling !== nextSibling) {\n        if (nextSibling === null) {\n          root.appendChild(node);\n        } else if (nextSibling.parentNode === root) {\n          root.insertBefore(node, nextSibling);\n        }\n      }\n    }\n\n    this._relatedNodes = [];\n    this._activeItems = [];\n    previousSwap.drag = null;\n    previousSwap.deltaX = previousSwap.deltaY = 0;\n    previousSwap.overlaps = false;\n  }\n\n  /**\n   * Gets a snapshot of items currently in the list.\n   * Can include items that we dragged in from another list.\n   */\n  getActiveItemsSnapshot(): readonly DragRef[] {\n    return this._activeItems;\n  }\n\n  /** Gets the index of a specific item. */\n  getItemIndex(item: DragRef): number {\n    return this._activeItems.indexOf(item);\n  }\n\n  /** Gets the item at a specific index. */\n  getItemAtIndex(index: number): DragRef | null {\n    return this._activeItems[index] || null;\n  }\n\n  /** Used to notify the strategy that the scroll position has changed. */\n  updateOnScroll(): void {\n    this._activeItems.forEach(item => {\n      if (this._dragDropRegistry.isDragging(item)) {\n        // We need to re-sort the item manually, because the pointer move\n        // events won't be dispatched while the user is scrolling.\n        item._sortFromLastPointerPosition();\n      }\n    });\n  }\n\n  withElementContainer(container: HTMLElement): void {\n    if (container !== this._element) {\n      this._element = container;\n      this._rootNode = undefined;\n    }\n  }\n\n  /**\n   * Gets the index of an item in the drop container, based on the position of the user's pointer.\n   * @param item Item that is being sorted.\n   * @param pointerX Position of the user's pointer along the X axis.\n   * @param pointerY Position of the user's pointer along the Y axis.\n   * @param delta Direction in which the user is moving their pointer.\n   */\n  private _getItemIndexFromPointerPosition(\n    item: DragRef,\n    pointerX: number,\n    pointerY: number,\n  ): number {\n    const elementAtPoint = this._getRootNode().elementFromPoint(\n      Math.floor(pointerX),\n      Math.floor(pointerY),\n    );\n    const index = elementAtPoint\n      ? this._activeItems.findIndex(item => {\n          const root = item.getRootElement();\n          return elementAtPoint === root || root.contains(elementAtPoint);\n        })\n      : -1;\n    return index === -1 || !this._sortPredicate(index, item) ? -1 : index;\n  }\n\n  /** Lazily resolves the list's root node. */\n  private _getRootNode(): DocumentOrShadowRoot {\n    // Resolve the root node lazily to ensure that the drop list is in its final place in the DOM.\n    if (!this._rootNode) {\n      this._rootNode = _getShadowRoot(this._element) || this._document;\n    }\n    return this._rootNode;\n  }\n\n  /**\n   * Finds the index of the item that's closest to the item being dragged.\n   * @param item Item being dragged.\n   * @param pointerX Position of the user's pointer along the X axis.\n   * @param pointerY Position of the user's pointer along the Y axis.\n   */\n  private _getClosestItemIndexToPointer(item: DragRef, pointerX: number, pointerY: number): number {\n    if (this._activeItems.length === 0) {\n      return -1;\n    }\n\n    if (this._activeItems.length === 1) {\n      return 0;\n    }\n\n    let minDistance = Infinity;\n    let minIndex = -1;\n\n    // Find the Euclidean distance (https://en.wikipedia.org/wiki/Euclidean_distance) between each\n    // item and the pointer, and return the smallest one. Note that this is a bit flawed in that DOM\n    // nodes are rectangles, not points, so we use the top/left coordinates. It should be enough\n    // for our purposes.\n    for (let i = 0; i < this._activeItems.length; i++) {\n      const current = this._activeItems[i];\n      if (current !== item) {\n        const {x, y} = current.getRootElement().getBoundingClientRect();\n        const distance = Math.hypot(pointerX - x, pointerY - y);\n\n        if (distance < minDistance) {\n          minDistance = distance;\n          minIndex = i;\n        }\n      }\n    }\n\n    return minIndex;\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 {DOCUMENT, ElementRef, Injector, NgZone} from '@angular/core';\nimport {Direction} from '../bidi';\nimport {coerceElement} from '../coercion';\nimport {ViewportRuler} from '../scrolling';\nimport {_getShadowRoot} from '../platform';\nimport {Subject, Subscription, interval, animationFrameScheduler} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\nimport {DragDropRegistry} from './drag-drop-registry';\nimport type {DragRef, Point} from './drag-ref';\nimport {isPointerNearDomRect, isInsideClientRect} from './dom/dom-rect';\nimport {ParentPositionTracker} from './dom/parent-position-tracker';\nimport {DragCSSStyleDeclaration} from './dom/styling';\nimport {DropListSortStrategy} from './sorting/drop-list-sort-strategy';\nimport {SingleAxisSortStrategy} from './sorting/single-axis-sort-strategy';\nimport {MixedSortStrategy} from './sorting/mixed-sort-strategy';\nimport {DropListOrientation} from './directives/config';\n\n/**\n * Proximity, as a ratio to width/height, at which a\n * dragged item will affect the drop container.\n */\nconst DROP_PROXIMITY_THRESHOLD = 0.05;\n\n/**\n * Proximity, as a ratio to width/height at which to start auto-scrolling the drop list or the\n * viewport. The value comes from trying it out manually until it feels right.\n */\nconst SCROLL_PROXIMITY_THRESHOLD = 0.05;\n\n/** Vertical direction in which we can auto-scroll. */\nenum AutoScrollVerticalDirection {\n  NONE,\n  UP,\n  DOWN,\n}\n\n/** Horizontal direction in which we can auto-scroll. */\nenum AutoScrollHorizontalDirection {\n  NONE,\n  LEFT,\n  RIGHT,\n}\n\n/**\n * Creates a `DropListRef` for an element, turning it into a drop list.\n * @param injector Injector used to resolve dependencies.\n * @param element Element to which to attach the drop list functionality.\n */\nexport function createDropListRef<T = unknown>(\n  injector: Injector,\n  element: ElementRef<HTMLElement> | HTMLElement,\n): DropListRef<T> {\n  return new DropListRef(\n    element,\n    injector.get(DragDropRegistry),\n    injector.get(DOCUMENT),\n    injector.get(NgZone),\n    injector.get(ViewportRuler),\n  );\n}\n\n/**\n * Reference to a drop list. Used to manipulate or dispose of the container.\n */\nexport class DropListRef<T = any> {\n  /** Element that the drop list is attached to. */\n  element: HTMLElement | ElementRef<HTMLElement>;\n\n  /** Whether starting a dragging sequence from this container is disabled. */\n  disabled: boolean = false;\n\n  /** Whether sorting items within the list is disabled. */\n  sortingDisabled: boolean = false;\n\n  /** Locks the position of the draggable elements inside the container along the specified axis. */\n  lockAxis: 'x' | 'y' | null = null;\n\n  /**\n   * Whether auto-scrolling the view when the user\n   * moves their pointer close to the edges is disabled.\n   */\n  autoScrollDisabled: boolean = false;\n\n  /** Number of pixels to scroll for each frame when auto-scrolling an element. */\n  autoScrollStep: number = 2;\n\n  /**\n   * Whether the items in the list should leave an anchor node when leaving the initial container.\n   */\n  hasAnchor: boolean = false;\n\n  /**\n   * Function that is used to determine whether an item\n   * is allowed to be moved into a drop container.\n   */\n  enterPredicate: (drag: DragRef, drop: DropListRef) => boolean = () => true;\n\n  /** Function that is used to determine whether an item can be sorted into a particular index. */\n  sortPredicate: (index: number, drag: DragRef, drop: DropListRef) => boolean = () => true;\n\n  /** Emits right before dragging has started. */\n  readonly beforeStarted = new Subject<void>();\n\n  /**\n   * Emits when the user has moved a new drag item into this container.\n   */\n  readonly entered = new Subject<{item: DragRef; container: DropListRef; currentIndex: number}>();\n\n  /**\n   * Emits when the user removes an item from the container\n   * by dragging it into another container.\n   */\n  readonly exited = new Subject<{item: DragRef; container: DropListRef}>();\n\n  /** Emits when the user drops an item inside the container. */\n  readonly dropped = new Subject<{\n    item: DragRef;\n    currentIndex: number;\n    previousIndex: number;\n    container: DropListRef;\n    previousContainer: DropListRef;\n    isPointerOverContainer: boolean;\n    distance: Point;\n    dropPoint: Point;\n    event: MouseEvent | TouchEvent;\n  }>();\n\n  /** Emits as the user is swapping items while actively dragging. */\n  readonly sorted = new Subject<{\n    previousIndex: number;\n    currentIndex: number;\n    container: DropListRef;\n    item: DragRef;\n  }>();\n\n  /** Emits when a dragging sequence is started in a list connected to the current one. */\n  readonly receivingStarted = new Subject<{\n    receiver: DropListRef;\n    initiator: DropListRef;\n    items: DragRef[];\n  }>();\n\n  /** Emits when a dragging sequence is stopped from a list connected to the current one. */\n  readonly receivingStopped = new Subject<{\n    receiver: DropListRef;\n    initiator: DropListRef;\n  }>();\n\n  /** Arbitrary data that can be attached to the drop list. */\n  data!: T;\n\n  /** Element that is the direct parent of the drag items. */\n  private _container!: HTMLElement;\n\n  /** Whether an item in the list is being dragged. */\n  private _isDragging = false;\n\n  /** Keeps track of the positions of any parent scrollable elements. */\n  private _parentPositions: ParentPositionTracker;\n\n  /** Strategy being used to sort items within the list. */\n  private _sortStrategy!: DropListSortStrategy;\n\n  /** Cached `DOMRect` of the drop list. */\n  private _domRect: DOMRect | undefined;\n\n  /** Draggable items in the container. */\n  private _draggables: readonly DragRef[] = [];\n\n  /** Drop lists that are connected to the current one. */\n  private _siblings: readonly DropListRef[] = [];\n\n  /** Connected siblings that currently have a dragged item. */\n  private _activeSiblings = new Set<DropListRef>();\n\n  /** Subscription to the window being scrolled. */\n  private _viewportScrollSubscription = Subscription.EMPTY;\n\n  /** Vertical direction in which the list is currently scrolling. */\n  private _verticalScrollDirection = AutoScrollVerticalDirection.NONE;\n\n  /** Horizontal direction in which the list is currently scrolling. */\n  private _horizontalScrollDirection = AutoScrollHorizontalDirection.NONE;\n\n  /** Node that is being auto-scrolled. */\n  private _scrollNode!: HTMLElement | Window;\n\n  /** Used to signal to the current auto-scroll sequence when to stop. */\n  private readonly _stopScrollTimers = new Subject<void>();\n\n  /** Shadow root of the current element. Necessary for `elementFromPoint` to resolve correctly. */\n  private _cachedShadowRoot: DocumentOrShadowRoot | null = null;\n\n  /** Reference to the document. */\n  private _document: Document;\n\n  /** Elements that can be scrolled while the user is dragging. */\n  private _scrollableElements: HTMLElement[] = [];\n\n  /** Initial value for the element's `scroll-snap-type` style. */\n  private _initialScrollSnap!: string;\n\n  /** Direction of the list's layout. */\n  private _direction: Direction = 'ltr';\n\n  constructor(\n    element: ElementRef<HTMLElement> | HTMLElement,\n    private _dragDropRegistry: DragDropRegistry,\n    _document: any,\n    private _ngZone: NgZone,\n    private _viewportRuler: ViewportRuler,\n  ) {\n    const coercedElement = (this.element = coerceElement(element));\n    this._document = _document;\n    this.withOrientation('vertical').withElementContainer(coercedElement);\n    _dragDropRegistry.registerDropContainer(this);\n    this._parentPositions = new ParentPositionTracker(_document);\n  }\n\n  /** Removes the drop list functionality from the DOM element. */\n  dispose() {\n    this._stopScrolling();\n    this._stopScrollTimers.complete();\n    this._viewportScrollSubscription.unsubscribe();\n    this.beforeStarted.complete();\n    this.entered.complete();\n    this.exited.complete();\n    this.dropped.complete();\n    this.sorted.complete();\n    this.receivingStarted.complete();\n    this.receivingStopped.complete();\n    this._activeSiblings.clear();\n    this._scrollNode = null!;\n    this._parentPositions.clear();\n    this._dragDropRegistry.removeDropContainer(this);\n  }\n\n  /** Whether an item from this list is currently being dragged. */\n  isDragging() {\n    return this._isDragging;\n  }\n\n  /** Starts dragging an item. */\n  start(): void {\n    this._draggingStarted();\n    this._notifyReceivingSiblings();\n  }\n\n  /**\n   * Attempts to move an item into the container.\n   * @param item Item that was moved into the container.\n   * @param pointerX Position of the item along the X axis.\n   * @param pointerY Position of the item along the Y axis.\n   * @param index Index at which the item entered. If omitted, the container will try to figure it\n   *   out automatically.\n   */\n  enter(item: DragRef, pointerX: number, pointerY: number, index?: number): void {\n    this._draggingStarted();\n\n    // If sorting is disabled, we want the item to return to its starting\n    // position if the user is returning it to its initial container.\n    if (index == null && this.sortingDisabled) {\n      index = this._draggables.indexOf(item);\n    }\n\n    this._sortStrategy.enter(item, pointerX, pointerY, index);\n\n    // Note that this usually happens inside `_draggingStarted` as well, but the dimensions\n    // can change when the sort strategy moves the item around inside `enter`.\n    this._cacheParentPositions();\n\n    // Notify siblings at the end so that the item has been inserted into the `activeDraggables`.\n    this._notifyReceivingSiblings();\n    this.entered.next({item, container: this, currentIndex: this.getItemIndex(item)});\n  }\n\n  /**\n   * Removes an item from the container after it was dragged into another container by the user.\n   * @param item Item that was dragged out.\n   */\n  exit(item: DragRef): void {\n    this._reset();\n    this.exited.next({item, container: this});\n  }\n\n  /**\n   * Drops an item into this container.\n   * @param item Item being dropped into the container.\n   * @param currentIndex Index at which the item should be inserted.\n   * @param previousIndex Index of the item when dragging started.\n   * @param previousContainer Container from which the item got dragged in.\n   * @param isPointerOverContainer Whether the user's pointer was over the\n   *    container when the item was dropped.\n   * @param distance Distance the user has dragged since the start of the dragging sequence.\n   * @param event Event that triggered the dropping sequence.\n   */\n  drop(\n    item: DragRef,\n    currentIndex: number,\n    previousIndex: number,\n    previousContainer: DropListRef,\n    isPointerOverContainer: boolean,\n    distance: Point,\n    dropPoint: Point,\n    event: MouseEvent | TouchEvent,\n  ): void {\n    this._reset();\n    this.dropped.next({\n      item,\n      currentIndex,\n      previousIndex,\n      container: this,\n      previousContainer,\n      isPointerOverContainer,\n      distance,\n      dropPoint,\n      event,\n    });\n  }\n\n  /**\n   * Sets the draggable items that are a part of this list.\n   * @param items Items that are a part of this list.\n   */\n  withItems(items: DragRef[]): this {\n    const previousItems = this._draggables;\n    this._draggables = items;\n    items.forEach(item => item._withDropContainer(this));\n\n    if (this.isDragging()) {\n      const draggedItems = previousItems.filter(item => item.isDragging());\n\n      // If all of the items being dragged were removed\n      // from the list, abort the current drag sequence.\n      if (draggedItems.every(item => items.indexOf(item) === -1)) {\n        this._reset();\n      } else {\n        this._sortStrategy.withItems(this._draggables);\n      }\n    }\n\n    return this;\n  }\n\n  /** Sets the layout direction of the drop list. */\n  withDirection(direction: Direction): this {\n    this._direction = direction;\n    if (this._sortStrategy instanceof SingleAxisSortStrategy) {\n      this._sortStrategy.direction = direction;\n    }\n    return this;\n  }\n\n  /**\n   * Sets the containers that are connected to this one. When two or more containers are\n   * connected, the user will be allowed to transfer items between them.\n   * @param connectedTo Other containers that the current containers should be connected to.\n   */\n  connectedTo(connectedTo: DropListRef[]): this {\n    this._siblings = connectedTo.slice();\n    return this;\n  }\n\n  /**\n   * Sets the orientation of the container.\n   * @param orientation New orientation for the container.\n   */\n  withOrientation(orientation: DropListOrientation): this {\n    if (orientation === 'mixed') {\n      this._sortStrategy = new MixedSortStrategy(this._document, this._dragDropRegistry);\n    } else {\n      const strategy = new SingleAxisSortStrategy(this._dragDropRegistry);\n      strategy.direction = this._direction;\n      strategy.orientation = orientation;\n      this._sortStrategy = strategy;\n    }\n    this._sortStrategy.withElementContainer(this._container);\n    this._sortStrategy.withSortPredicate((index, item) => this.sortPredicate(index, item, this));\n    return this;\n  }\n\n  /**\n   * Sets which parent elements are can be scrolled while the user is dragging.\n   * @param elements Elements that can be scrolled.\n   */\n  withScrollableParents(elements: HTMLElement[]): this {\n    const element = this._container;\n\n    // We always allow the current element to be scrollable\n    // so we need to ensure that it's in the array.\n    this._scrollableElements =\n      elements.indexOf(element) === -1 ? [element, ...elements] : elements.slice();\n    return this;\n  }\n\n  /**\n   * Configures the drop list so that a different element is used as the container for the\n   * dragged items. This is useful for the cases when one might not have control over the\n   * full DOM that sets up the dragging.\n   * Note that the alternate container needs to be a descendant of the drop list.\n   * @param container New element container to be assigned.\n   */\n  withElementContainer(container: HTMLElement): this {\n    if (container === this._container) {\n      return this;\n    }\n\n    const element = coerceElement(this.element);\n\n    if (\n      (typeof ngDevMode === 'undefined' || ngDevMode) &&\n      container !== element &&\n      !element.contains(container)\n    ) {\n      throw new Error(\n        'Invalid DOM structure for drop list. Alternate container element must be a descendant of the drop list.',\n      );\n    }\n\n    const oldContainerIndex = this._scrollableElements.indexOf(this._container);\n    const newContainerIndex = this._scrollableElements.indexOf(container);\n\n    if (oldContainerIndex > -1) {\n      this._scrollableElements.splice(oldContainerIndex, 1);\n    }\n\n    if (newContainerIndex > -1) {\n      this._scrollableElements.splice(newContainerIndex, 1);\n    }\n\n    if (this._sortStrategy) {\n      this._sortStrategy.withElementContainer(container);\n    }\n\n    this._cachedShadowRoot = null;\n    this._scrollableElements.unshift(container);\n    this._container = container;\n    return this;\n  }\n\n  /** Gets the scrollable parents that are registered with this drop container. */\n  getScrollableParents(): readonly HTMLElement[] {\n    return this._scrollableElements;\n  }\n\n  /**\n   * Figures out the index of an item in the container.\n   * @param item Item whose index should be determined.\n   */\n  getItemIndex(item: DragRef): number {\n    return this._isDragging\n      ? this._sortStrategy.getItemIndex(item)\n      : this._draggables.indexOf(item);\n  }\n\n  /**\n   * Gets the item at a specific index.\n   * @param index Index at which to retrieve the item.\n   */\n  getItemAtIndex(index: number): DragRef | null {\n    return this._isDragging\n      ? this._sortStrategy.getItemAtIndex(index)\n      : this._draggables[index] || null;\n  }\n\n  /**\n   * Whether the list is able to receive the item that\n   * is currently being dragged inside a connected drop list.\n   */\n  isReceiving(): boolean {\n    return this._activeSiblings.size > 0;\n  }\n\n  /**\n   * Sorts an item inside the container based on its position.\n   * @param item Item to be sorted.\n   * @param pointerX Position of the item along the X axis.\n   * @param pointerY Position of the item along the Y axis.\n   * @param pointerDelta Direction in which the pointer is moving along each axis.\n   */\n  _sortItem(\n    item: DragRef,\n    pointerX: number,\n    pointerY: number,\n    pointerDelta: {x: number; y: number},\n  ): void {\n    // Don't sort the item if sorting is disabled or it's out of range.\n    if (\n      this.sortingDisabled ||\n      !this._domRect ||\n      !isPointerNearDomRect(this._domRect, DROP_PROXIMITY_THRESHOLD, pointerX, pointerY)\n    ) {\n      return;\n    }\n\n    const result = this._sortStrategy.sort(item, pointerX, pointerY, pointerDelta);\n\n    if (result) {\n      this.sorted.next({\n        previousIndex: result.previousIndex,\n        currentIndex: result.currentIndex,\n        container: this,\n        item,\n      });\n    }\n  }\n\n  /**\n   * Checks whether the user's pointer is close to the edges of either the\n   * viewport or the drop list and starts the auto-scroll sequence.\n   * @param pointerX User's pointer position along the x axis.\n   * @param pointerY User's pointer position along the y axis.\n   */\n  _startScrollingIfNecessary(pointerX: number, pointerY: number) {\n    if (this.autoScrollDisabled) {\n      return;\n    }\n\n    let scrollNode: HTMLElement | Window | undefined;\n    let verticalScrollDirection = AutoScrollVerticalDirection.NONE;\n    let horizontalScrollDirection = AutoScrollHorizontalDirection.NONE;\n\n    // Check whether we should start scrolling any of the parent containers.\n    this._parentPositions.positions.forEach((position, element) => {\n      // We have special handling for the `document` below. Also this would be\n      // nicer with a  for...of loop, but it requires changing a compiler flag.\n      if (element === this._document || !position.clientRect || scrollNode) {\n        return;\n      }\n\n      if (isPointerNearDomRect(position.clientRect, DROP_PROXIMITY_THRESHOLD, pointerX, pointerY)) {\n        [verticalScrollDirection, horizontalScrollDirection] = getElementScrollDirections(\n          element as HTMLElement,\n          position.clientRect,\n          this._direction,\n          pointerX,\n          pointerY,\n        );\n\n        if (verticalScrollDirection || horizontalScrollDirection) {\n          scrollNode = element as HTMLElement;\n        }\n      }\n    });\n\n    // Otherwise check if we can start scrolling the viewport.\n    if (!verticalScrollDirection && !horizontalScrollDirection) {\n      const {width, height} = this._viewportRuler.getViewportSize();\n      const domRect = {\n        width,\n        height,\n        top: 0,\n        right: width,\n        bottom: height,\n        left: 0,\n      } as DOMRect;\n      verticalScrollDirection = getVerticalScrollDirection(domRect, pointerY);\n      horizontalScrollDirection = getHorizontalScrollDirection(domRect, pointerX);\n      scrollNode = window;\n    }\n\n    if (\n      scrollNode &&\n      (verticalScrollDirection !== this._verticalScrollDirection ||\n        horizontalScrollDirection !== this._horizontalScrollDirection ||\n        scrollNode !== this._scrollNode)\n    ) {\n      this._verticalScrollDirection = verticalScrollDirection;\n      this._horizontalScrollDirection = horizontalScrollDirection;\n      this._scrollNode = scrollNode;\n\n      if ((verticalScrollDirection || horizontalScrollDirection) && scrollNode) {\n        this._ngZone.runOutsideAngular(this._startScrollInterval);\n      } else {\n        this._stopScrolling();\n      }\n    }\n  }\n\n  /** Stops any currently-running auto-scroll sequences. */\n  _stopScrolling() {\n    this._stopScrollTimers.next();\n  }\n\n  /** Starts the dragging sequence within the list. */\n  private _draggingStarted() {\n    const styles = this._container.style as DragCSSStyleDeclaration;\n    this.beforeStarted.next();\n    this._isDragging = true;\n\n    if (\n      (typeof ngDevMode === 'undefined' || ngDevMode) &&\n      // Prevent the check from running on apps not using an alternate container. Ideally we\n      // would always run it, but introducing it at this stage would be a breaking change.\n      this._container !== coerceElement(this.element)\n    ) {\n      for (const drag of this._draggables) {\n        if (!drag.isDragging() && drag.getVisibleElement().parentNode !== this._container) {\n          throw new Error(\n            'Invalid DOM structure for drop list. All items must be placed directly inside of the element container.',\n          );\n        }\n      }\n    }\n\n    // We need to disable scroll snapping while the user is dragging, because it breaks automatic\n    // scrolling. The browser seems to round the value based on the snapping points which means\n    // that we can't increment/decrement the scroll position.\n    this._initialScrollSnap = styles.msScrollSnapType || styles.scrollSnapType || '';\n    styles.scrollSnapType = styles.msScrollSnapType = 'none';\n    this._sortStrategy.start(this._draggables);\n    this._cacheParentPositions();\n    this._viewportScrollSubscription.unsubscribe();\n    this._listenToScrollEvents();\n  }\n\n  /** Caches the positions of the configured scrollable parents. */\n  private _cacheParentPositions() {\n    this._parentPositions.cache(this._scrollableElements);\n\n    // The list element is always in the `scrollableElements`\n    // so we can take advantage of the cached `DOMRect`.\n    this._domRect = this._parentPositions.positions.get(this._container)!.clientRect!;\n  }\n\n  /** Resets the container to its initial state. */\n  private _reset() {\n    this._isDragging = false;\n    const styles = this._container.style as DragCSSStyleDeclaration;\n    styles.scrollSnapType = styles.msScrollSnapType = this._initialScrollSnap;\n\n    this._siblings.forEach(sibling => sibling._stopReceiving(this));\n    this._sortStrategy.reset();\n    this._stopScrolling();\n    this._viewportScrollSubscription.unsubscribe();\n    this._parentPositions.clear();\n  }\n\n  /** Starts the interval that'll auto-scroll the element. */\n  private _startScrollInterval = () => {\n    this._stopScrolling();\n\n    interval(0, animationFrameScheduler)\n      .pipe(takeUntil(this._stopScrollTimers))\n      .subscribe(() => {\n        const node = this._scrollNode;\n        const scrollStep = this.autoScrollStep;\n\n        if (this._verticalScrollDirection === AutoScrollVerticalDirection.UP) {\n          node.scrollBy(0, -scrollStep);\n        } else if (this._verticalScrollDirection === AutoScrollVerticalDirection.DOWN) {\n          node.scrollBy(0, scrollStep);\n        }\n\n        if (this._horizontalScrollDirection === AutoScrollHorizontalDirection.LEFT) {\n          node.scrollBy(-scrollStep, 0);\n        } else if (this._horizontalScrollDirection === AutoScrollHorizontalDirection.RIGHT) {\n          node.scrollBy(scrollStep, 0);\n        }\n      });\n  };\n\n  /**\n   * Checks whether the user's pointer is positioned over the container.\n   * @param x Pointer position along the X axis.\n   * @param y Pointer position along the Y axis.\n   */\n  _isOverContainer(x: number, y: number): boolean {\n    return this._domRect != null && isInsideClientRect(this._domRect, x, y);\n  }\n\n  /**\n   * Figures out whether an item should be moved into a sibling\n   * drop container, based on its current position.\n   * @param item Drag item that is being moved.\n   * @param x Position of the item along the X axis.\n   * @param y Position of the item along the Y axis.\n   */\n  _getSiblingContainerFromPosition(item: DragRef, x: number, y: number): DropListRef | undefined {\n    return this._siblings.find(sibling => sibling._canReceive(item, x, y));\n  }\n\n  /**\n   * Checks whether the drop list can receive the passed-in item.\n   * @param item Item that is being dragged into the list.\n   * @param x Position of the item along the X axis.\n   * @param y Position of the item along the Y axis.\n   */\n  _canReceive(item: DragRef, x: number, y: number): boolean {\n    if (\n      !this._domRect ||\n      !isInsideClientRect(this._domRect, x, y) ||\n      !this.enterPredicate(item, this)\n    ) {\n      return false;\n    }\n\n    const elementFromPoint = this._getShadowRoot().elementFromPoint(x, y) as HTMLElement | null;\n\n    // If there's no element at the pointer position, then\n    // the client rect is probably scrolled out of the view.\n    if (!elementFromPoint) {\n      return false;\n    }\n\n    // The `DOMRect`, that we're using to find the container over which the user is\n    // hovering, doesn't give us any information on whether the element has been scrolled\n    // out of the view or whether it's overlapping with other containers. This means that\n    // we could end up transferring the item into a container that's invisible or is positioned\n    // below another one. We use the result from `elementFromPoint` to get the top-most element\n    // at the pointer position and to find whether it's one of the intersecting drop containers.\n    return elementFromPoint === this._container || this._container.contains(elementFromPoint);\n  }\n\n  /**\n   * Called by one of the connected drop lists when a dragging sequence has started.\n   * @param sibling Sibling in which dragging has started.\n   */\n  _startReceiving(sibling: DropListRef, items: DragRef[]) {\n    const activeSiblings = this._activeSiblings;\n\n    if (\n      !activeSiblings.has(sibling) &&\n      items.every(item => {\n        // Note that we have to add an exception to the `enterPredicate` for items that started off\n        // in this drop list. The drag ref has logic that allows an item to return to its initial\n        // container, if it has left the initial container and none of the connected containers\n        // allow it to enter. See `DragRef._updateActiveDropContainer` for more context.\n        return this.enterPredicate(item, this) || this._draggables.indexOf(item) > -1;\n      })\n    ) {\n      activeSiblings.add(sibling);\n      this._cacheParentPositions();\n      this._listenToScrollEvents();\n      this.receivingStarted.next({\n        initiator: sibling,\n        receiver: this,\n        items,\n      });\n    }\n  }\n\n  /**\n   * Called by a connected drop list when dragging has stopped.\n   * @param sibling Sibling whose dragging has stopped.\n   */\n  _stopReceiving(sibling: DropListRef) {\n    this._activeSiblings.delete(sibling);\n    this._viewportScrollSubscription.unsubscribe();\n    this.receivingStopped.next({initiator: sibling, receiver: this});\n  }\n\n  /**\n   * Starts listening to scroll events on the viewport.\n   * Used for updating the internal state of the list.\n   */\n  private _listenToScrollEvents() {\n    this._viewportScrollSubscription = this._dragDropRegistry\n      .scrolled(this._getShadowRoot())\n      .subscribe(event => {\n        if (this.isDragging()) {\n          const scrollDifference = this._parentPositions.handleScroll(event);\n\n          if (scrollDifference) {\n            this._sortStrategy.updateOnScroll(scrollDifference.top, scrollDifference.left);\n          }\n        } else if (this.isReceiving()) {\n          this._cacheParentPositions();\n        }\n      });\n  }\n\n  /**\n   * Lazily resolves and returns the shadow root of the element. We do this in a function, rather\n   * than saving it in property directly on init, because we want to resolve it as late as possible\n   * in order to ensure that the element has been moved into the shadow DOM. Doing it inside the\n   * constructor might be too early if the element is inside of something like `ngFor` or `ngIf`.\n   */\n  private _getShadowRoot(): DocumentOrShadowRoot {\n    if (!this._cachedShadowRoot) {\n      const shadowRoot = _getShadowRoot(this._container);\n      this._cachedShadowRoot = shadowRoot || this._document;\n    }\n\n    return this._cachedShadowRoot;\n  }\n\n  /** Notifies any siblings that may potentially receive the item. */\n  private _notifyReceivingSiblings() {\n    const draggedItems = this._sortStrategy\n      .getActiveItemsSnapshot()\n      .filter(item => item.isDragging());\n    this._siblings.forEach(sibling => sibling._startReceiving(this, draggedItems));\n  }\n}\n\n/**\n * Gets whether the vertical auto-scroll direction of a node.\n * @param clientRect Dimensions of the node.\n * @param pointerY Position of the user's pointer along the y axis.\n */\nfunction getVerticalScrollDirection(clientRect: DOMRect, pointerY: number) {\n  const {top, bottom, height} = clientRect;\n  const yThreshold = height * SCROLL_PROXIMITY_THRESHOLD;\n\n  if (pointerY >= top - yThreshold && pointerY <= top + yThreshold) {\n    return AutoScrollVerticalDirection.UP;\n  } else if (pointerY >= bottom - yThreshold && pointerY <= bottom + yThreshold) {\n    return AutoScrollVerticalDirection.DOWN;\n  }\n\n  return AutoScrollVerticalDirection.NONE;\n}\n\n/**\n * Gets whether the horizontal auto-scroll direction of a node.\n * @param clientRect Dimensions of the node.\n * @param pointerX Position of the user's pointer along the x axis.\n */\nfunction getHorizontalScrollDirection(clientRect: DOMRect, pointerX: number) {\n  const {left, right, width} = clientRect;\n  const xThreshold = width * SCROLL_PROXIMITY_THRESHOLD;\n\n  if (pointerX >= left - xThreshold && pointerX <= left + xThreshold) {\n    return AutoScrollHorizontalDirection.LEFT;\n  } else if (pointerX >= right - xThreshold && pointerX <= right + xThreshold) {\n    return AutoScrollHorizontalDirection.RIGHT;\n  }\n\n  return AutoScrollHorizontalDirection.NONE;\n}\n\n/**\n * Gets the directions in which an element node should be scrolled,\n * assuming that the user's pointer is already within it scrollable region.\n * @param element Element for which we should calculate the scroll direction.\n * @param clientRect Bounding client rectangle of the element.\n * @param direction Layout direction of the drop list.\n * @param pointerX Position of the user's pointer along the x axis.\n * @param pointerY Position of the user's pointer along the y axis.\n */\nfunction getElementScrollDirections(\n  element: HTMLElement,\n  clientRect: DOMRect,\n  direction: Direction,\n  pointerX: number,\n  pointerY: number,\n): [AutoScrollVerticalDirection, AutoScrollHorizontalDirection] {\n  const computedVertical = getVerticalScrollDirection(clientRect, pointerY);\n  const computedHorizontal = getHorizontalScrollDirection(clientRect, pointerX);\n  let verticalScrollDirection = AutoScrollVerticalDirection.NONE;\n  let horizontalScrollDirection = AutoScrollHorizontalDirection.NONE;\n\n  // Note that we here we do some extra checks for whether the element is actually scrollable in\n  // a certain direction and we only assign the scroll direction if it is. We do this so that we\n  // can allow other elements to be scrolled, if the current element can't be scrolled anymore.\n  // This allows us to handle cases where the scroll regions of two scrollable elements overlap.\n  if (computedVertical) {\n    const scrollTop = element.scrollTop;\n\n    if (computedVertical === AutoScrollVerticalDirection.UP) {\n      if (scrollTop > 0) {\n        verticalScrollDirection = AutoScrollVerticalDirection.UP;\n      }\n    } else if (element.scrollHeight - scrollTop > element.clientHeight) {\n      verticalScrollDirection = AutoScrollVerticalDirection.DOWN;\n    }\n  }\n\n  if (computedHorizontal) {\n    const scrollLeft = element.scrollLeft;\n\n    if (direction === 'rtl') {\n      if (computedHorizontal === AutoScrollHorizontalDirection.RIGHT) {\n        // In RTL `scrollLeft` will be negative when scrolled.\n        if (scrollLeft < 0) {\n          horizontalScrollDirection = AutoScrollHorizontalDirection.RIGHT;\n        }\n      } else if (element.scrollWidth + scrollLeft > element.clientWidth) {\n        horizontalScrollDirection = AutoScrollHorizontalDirection.LEFT;\n      }\n    } else {\n      if (computedHorizontal === AutoScrollHorizontalDirection.LEFT) {\n        if (scrollLeft > 0) {\n          horizontalScrollDirection = AutoScrollHorizontalDirection.LEFT;\n        }\n      } else if (element.scrollWidth - scrollLeft > element.clientWidth) {\n        horizontalScrollDirection = AutoScrollHorizontalDirection.RIGHT;\n      }\n    }\n  }\n\n  return [verticalScrollDirection, horizontalScrollDirection];\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 {Service, ElementRef, inject, Injector} from '@angular/core';\nimport {createDragRef, DragRef, DragRefConfig} from './drag-ref';\nimport {createDropListRef, DropListRef} from './drop-list-ref';\n\n/**\n * Service that allows for drag-and-drop functionality to be attached to DOM elements.\n * @deprecated Use the `createDragRef` or `createDropListRef` function for better tree shaking.\n * Will be removed in v23.\n * @breaking-change 23.0.0\n */\n@Service()\nexport class DragDrop {\n  private _injector = inject(Injector);\n\n  /**\n   * Turns an element into a draggable item.\n   * @param element Element to which to attach the dragging functionality.\n   * @param config Object used to configure the dragging behavior.\n   * @deprecated Use the `createDragRef` function that provides better tree shaking.\n   * @breaking-change 23.0.0\n   */\n  createDrag<T = any>(\n    element: ElementRef<HTMLElement> | HTMLElement,\n    config?: DragRefConfig,\n  ): DragRef<T> {\n    return createDragRef(this._injector, element, config);\n  }\n\n  /**\n   * Turns an element into a drop list.\n   * @param element Element to which to attach the drop list functionality.\n   * @deprecated Use the `createDropListRef` function that provides better tree shaking.\n   * @breaking-change 23.0.0\n   */\n  createDropList<T = any>(element: ElementRef<HTMLElement> | HTMLElement): DropListRef<T> {\n    return createDropListRef(this._injector, element);\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 {InjectionToken} from '@angular/core';\nimport type {CdkDrag} from './directives/drag';\n\n/**\n * Injection token that can be used for a `CdkDrag` to provide itself as a parent to the\n * drag-specific child directive (`CdkDragHandle`, `CdkDragPreview` etc.). Used primarily\n * to avoid circular imports.\n * @docs-private\n */\nexport const CDK_DRAG_PARENT = new InjectionToken<CdkDrag>('CDK_DRAG_PARENT');\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 * Asserts that a particular node is an element.\n * @param node Node to be checked.\n * @param name Name to attach to the error message.\n */\nexport function assertElementNode(node: Node, name: string): asserts node is HTMLElement {\n  if (node.nodeType !== 1) {\n    throw Error(\n      `${name} must be attached to an element node. ` + `Currently attached to \"${node.nodeName}\".`,\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  AfterViewInit,\n  Directive,\n  ElementRef,\n  InjectionToken,\n  Input,\n  OnDestroy,\n  booleanAttribute,\n  inject,\n} from '@angular/core';\nimport {Subject} from 'rxjs';\nimport type {CdkDrag} from './drag';\nimport {CDK_DRAG_PARENT} from '../drag-parent';\nimport {assertElementNode} from './assertions';\nimport {DragDropRegistry} from '../drag-drop-registry';\n\n/**\n * Injection token that can be used to reference instances of `CdkDragHandle`. It serves as\n * alternative token to the actual `CdkDragHandle` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nexport const CDK_DRAG_HANDLE = new InjectionToken<CdkDragHandle>('CdkDragHandle');\n\n/** Handle that can be used to drag a CdkDrag instance. */\n@Directive({\n  selector: '[cdkDragHandle]',\n  host: {\n    'class': 'cdk-drag-handle',\n  },\n  providers: [{provide: CDK_DRAG_HANDLE, useExisting: CdkDragHandle}],\n})\nexport class CdkDragHandle implements AfterViewInit, OnDestroy {\n  element = inject<ElementRef<HTMLElement>>(ElementRef);\n\n  private _parentDrag = inject<CdkDrag>(CDK_DRAG_PARENT, {optional: true, skipSelf: true});\n  private _dragDropRegistry = inject(DragDropRegistry);\n\n  /** Emits when the state of the handle has changed. */\n  readonly _stateChanges = new Subject<CdkDragHandle>();\n\n  /** Whether starting to drag through this handle is disabled. */\n  @Input({alias: 'cdkDragHandleDisabled', transform: booleanAttribute})\n  get disabled(): boolean {\n    return this._disabled;\n  }\n  set disabled(value: boolean) {\n    this._disabled = value;\n    this._stateChanges.next(this);\n  }\n  private _disabled = false;\n\n  constructor() {\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n      assertElementNode(this.element.nativeElement, 'cdkDragHandle');\n    }\n\n    this._parentDrag?._addHandle(this);\n  }\n\n  ngAfterViewInit() {\n    if (!this._parentDrag) {\n      let parent = this.element.nativeElement.parentElement;\n      while (parent) {\n        const ref = this._dragDropRegistry.getDragDirectiveForNode(parent);\n        if (ref) {\n          this._parentDrag = ref;\n          ref._addHandle(this);\n          break;\n        }\n        parent = parent.parentElement;\n      }\n    }\n  }\n\n  ngOnDestroy() {\n    this._parentDrag?._removeHandle(this);\n    this._stateChanges.complete();\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 {InjectionToken} from '@angular/core';\nimport {DragRefConfig, DragConstrainPosition} from '../drag-ref';\n\n/** Possible values that can be used to configure the drag start delay. */\nexport type DragStartDelay = number | {touch: number; mouse: number};\n\n/** Possible axis along which dragging can be locked. */\nexport type DragAxis = 'x' | 'y';\n\n/** Possible orientations for a drop list. */\nexport type DropListOrientation = 'horizontal' | 'vertical' | 'mixed';\n\n/**\n * Injection token that can be used to configure the\n * behavior of the drag&drop-related components.\n */\nexport const CDK_DRAG_CONFIG = new InjectionToken<DragDropConfig>('CDK_DRAG_CONFIG');\n\n/**\n * Object that can be used to configure the drag\n * items and drop lists within a module or a component.\n */\nexport interface DragDropConfig extends Partial<DragRefConfig> {\n  lockAxis?: DragAxis | null;\n  dragStartDelay?: DragStartDelay;\n  constrainPosition?: DragConstrainPosition;\n  previewClass?: string | string[];\n  boundaryElement?: string;\n  rootElementSelector?: string;\n  draggingDisabled?: boolean;\n  sortingDisabled?: boolean;\n  listAutoScrollDisabled?: boolean;\n  listOrientation?: DropListOrientation;\n  zIndex?: number;\n  previewContainer?: 'global' | 'parent';\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 {Directionality} from '../../bidi';\nimport {\n  Directive,\n  ElementRef,\n  EventEmitter,\n  Input,\n  NgZone,\n  OnDestroy,\n  Output,\n  ViewContainerRef,\n  OnChanges,\n  SimpleChanges,\n  ChangeDetectorRef,\n  InjectionToken,\n  booleanAttribute,\n  afterNextRender,\n  AfterViewInit,\n  inject,\n  Injector,\n  numberAttribute,\n} from '@angular/core';\nimport {coerceElement, coerceNumberProperty} from '../../coercion';\nimport {BehaviorSubject, Observable, Observer, Subject, merge} from 'rxjs';\nimport {startWith, take, map, takeUntil, switchMap, tap} from 'rxjs/operators';\nimport type {\n  CdkDragDrop,\n  CdkDragEnd,\n  CdkDragEnter,\n  CdkDragExit,\n  CdkDragMove,\n  CdkDragStart,\n  CdkDragRelease,\n} from '../drag-events';\nimport {CDK_DRAG_HANDLE, CdkDragHandle} from './drag-handle';\nimport {CdkDragPlaceholder} from './drag-placeholder';\nimport {CdkDragPreview} from './drag-preview';\nimport {CDK_DRAG_PARENT} from '../drag-parent';\nimport {DragRef, Point, PreviewContainer, DragConstrainPosition, createDragRef} from '../drag-ref';\nimport type {CdkDropList} from './drop-list';\nimport {CDK_DRAG_CONFIG, DragDropConfig, DragStartDelay, DragAxis} from './config';\nimport {assertElementNode} from './assertions';\nimport {DragDropRegistry} from '../drag-drop-registry';\n\n/**\n * Injection token that can be used to reference instances of `CdkDropList`. It serves as\n * alternative token to the actual `CdkDropList` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nexport const CDK_DROP_LIST = new InjectionToken<CdkDropList>('CdkDropList');\n\n/** Element that can be moved inside a CdkDropList container. */\n@Directive({\n  selector: '[cdkDrag]',\n  exportAs: 'cdkDrag',\n  host: {\n    'class': 'cdk-drag',\n    '[class.cdk-drag-disabled]': 'disabled',\n    '[class.cdk-drag-dragging]': '_dragRef.isDragging()',\n  },\n  providers: [{provide: CDK_DRAG_PARENT, useExisting: CdkDrag}],\n})\nexport class CdkDrag<T = any> implements AfterViewInit, OnChanges, OnDestroy {\n  element = inject<ElementRef<HTMLElement>>(ElementRef);\n  dropContainer = inject<CdkDropList>(CDK_DROP_LIST, {optional: true, skipSelf: true})!;\n  private _ngZone = inject(NgZone);\n  private _viewContainerRef = inject(ViewContainerRef);\n  private _dir = inject(Directionality, {optional: true});\n  private _changeDetectorRef = inject(ChangeDetectorRef);\n  private _selfHandle = inject<CdkDragHandle>(CDK_DRAG_HANDLE, {optional: true, self: true});\n  private _parentDrag = inject<CdkDrag>(CDK_DRAG_PARENT, {optional: true, skipSelf: true});\n  private _dragDropRegistry = inject(DragDropRegistry);\n\n  private readonly _destroyed = new Subject<void>();\n  private _handles = new BehaviorSubject<CdkDragHandle[]>([]);\n  private _previewTemplate: CdkDragPreview | null = null;\n  private _placeholderTemplate: CdkDragPlaceholder | null = null;\n\n  /** Reference to the underlying drag instance. */\n  _dragRef: DragRef<CdkDrag<T>>;\n\n  /** Arbitrary data to attach to this drag instance. */\n  @Input('cdkDragData') data!: T;\n\n  /** Locks the position of the dragged element along the specified axis. */\n  @Input('cdkDragLockAxis') lockAxis: DragAxis | null = null;\n\n  /**\n   * Selector that will be used to determine the root draggable element, starting from\n   * the `cdkDrag` element and going up the DOM. Passing an alternate root element is useful\n   * when trying to enable dragging on an element that you might not have access to.\n   */\n  @Input('cdkDragRootElement') rootElementSelector!: string;\n\n  /**\n   * Node or selector that will be used to determine the element to which the draggable's\n   * position will be constrained. If a string is passed in, it'll be used as a selector that\n   * will be matched starting from the element's parent and going up the DOM until a match\n   * has been found.\n   */\n  @Input('cdkDragBoundary') boundaryElement!: string | ElementRef<HTMLElement> | HTMLElement;\n\n  /**\n   * Amount of milliseconds to wait after the user has put their\n   * pointer down before starting to drag the element.\n   */\n  @Input('cdkDragStartDelay') dragStartDelay!: DragStartDelay;\n\n  /**\n   * Sets the position of a `CdkDrag` that is outside of a drop container.\n   * Can be used to restore the element's position for a returning user.\n   */\n  @Input('cdkDragFreeDragPosition') freeDragPosition!: Point;\n\n  /** Whether starting to drag this element is disabled. */\n  @Input({alias: 'cdkDragDisabled', transform: booleanAttribute})\n  get disabled(): boolean {\n    return this._disabled || !!(this.dropContainer && this.dropContainer.disabled);\n  }\n  set disabled(value: boolean) {\n    this._disabled = value;\n    this._dragRef.disabled = this._disabled;\n  }\n  private _disabled = false;\n\n  /**\n   * Function that can be used to customize the logic of how the position of the drag item\n   * is limited while it's being dragged. Gets called with a point containing the current position\n   * of the user's pointer on the page, a reference to the item being dragged and its dimensions.\n   * Should return a point describing where the item should be rendered.\n   */\n  @Input('cdkDragConstrainPosition') constrainPosition?: DragConstrainPosition;\n\n  /** Class to be added to the preview element. */\n  @Input('cdkDragPreviewClass') previewClass!: string | string[];\n\n  /**\n   * Configures the place into which the preview of the item will be inserted. Can be configured\n   * globally through `CDK_DROP_LIST`. Possible values:\n   * - `global` - Preview will be inserted at the bottom of the `<body>`. The advantage is that\n   * you don't have to worry about `overflow: hidden` or `z-index`, but the item won't retain\n   * its inherited styles.\n   * - `parent` - Preview will be inserted into the parent of the drag item. The advantage is that\n   * inherited styles will be preserved, but it may be clipped by `overflow: hidden` or not be\n   * visible due to `z-index`. Furthermore, the preview is going to have an effect over selectors\n   * like `:nth-child` and some flexbox configurations.\n   * - `ElementRef<HTMLElement> | HTMLElement` - Preview will be inserted into a specific element.\n   * Same advantages and disadvantages as `parent`.\n   */\n  @Input('cdkDragPreviewContainer') previewContainer!: PreviewContainer;\n\n  /**\n   * If the parent of the dragged element has a `scale` transform, it can throw off the\n   * positioning when the user starts dragging. Use this input to notify the CDK of the scale.\n   */\n  @Input({alias: 'cdkDragScale', transform: numberAttribute})\n  scale: number = 1;\n\n  /** Emits when the user starts dragging the item. */\n  @Output('cdkDragStarted') readonly started: EventEmitter<CdkDragStart> =\n    new EventEmitter<CdkDragStart>();\n\n  /** Emits when the user has released a drag item, before any animations have started. */\n  @Output('cdkDragReleased') readonly released: EventEmitter<CdkDragRelease> =\n    new EventEmitter<CdkDragRelease>();\n\n  /** Emits when the user stops dragging an item in the container. */\n  @Output('cdkDragEnded') readonly ended: EventEmitter<CdkDragEnd> = new EventEmitter<CdkDragEnd>();\n\n  /** Emits when the user has moved the item into a new container. */\n  @Output('cdkDragEntered') readonly entered: EventEmitter<CdkDragEnter<any>> = new EventEmitter<\n    CdkDragEnter<any>\n  >();\n\n  /** Emits when the user removes the item its container by dragging it into another container. */\n  @Output('cdkDragExited') readonly exited: EventEmitter<CdkDragExit<any>> = new EventEmitter<\n    CdkDragExit<any>\n  >();\n\n  /** Emits when the user drops the item inside a container. */\n  @Output('cdkDragDropped') readonly dropped: EventEmitter<CdkDragDrop<any>> = new EventEmitter<\n    CdkDragDrop<any>\n  >();\n\n  /**\n   * Emits as the user is dragging the item. Use with caution,\n   * because this event will fire for every pixel that the user has dragged.\n   */\n  @Output('cdkDragMoved')\n  readonly moved: Observable<CdkDragMove<T>> = new Observable(\n    (observer: Observer<CdkDragMove<T>>) => {\n      const subscription = this._dragRef.moved\n        .pipe(\n          map(movedEvent => ({\n            source: this,\n            pointerPosition: movedEvent.pointerPosition,\n            event: movedEvent.event,\n            delta: movedEvent.delta,\n            distance: movedEvent.distance,\n          })),\n        )\n        .subscribe(observer);\n\n      return () => {\n        subscription.unsubscribe();\n      };\n    },\n  );\n\n  private _injector = inject(Injector);\n\n  constructor() {\n    const dropContainer = this.dropContainer;\n    const config = inject<DragDropConfig>(CDK_DRAG_CONFIG, {optional: true});\n\n    this._dragRef = createDragRef(this._injector, this.element, {\n      dragStartThreshold:\n        config && config.dragStartThreshold != null ? config.dragStartThreshold : 5,\n      pointerDirectionChangeThreshold:\n        config && config.pointerDirectionChangeThreshold != null\n          ? config.pointerDirectionChangeThreshold\n          : 5,\n      zIndex: config?.zIndex,\n    });\n    this._dragRef.data = this;\n    this._dragDropRegistry.registerDirectiveNode(this.element.nativeElement, this);\n\n    if (config) {\n      this._assignDefaults(config);\n    }\n\n    // Note that usually the container is assigned when the drop list is picks up the item, but in\n    // some cases (mainly transplanted views with OnPush, see #18341) we may end up in a situation\n    // where there are no items on the first change detection pass, but the items get picked up as\n    // soon as the user triggers another pass by dragging. This is a problem, because the item would\n    // have to switch from standalone mode to drag mode in the middle of the dragging sequence which\n    // is too late since the two modes save different kinds of information. We work around it by\n    // assigning the drop container both from here and the list.\n    if (dropContainer) {\n      dropContainer.addItem(this);\n\n      // The drop container reads this so we need to sync it here.\n      dropContainer._dropListRef.beforeStarted.pipe(takeUntil(this._destroyed)).subscribe(() => {\n        this._dragRef.scale = this.scale;\n      });\n    }\n\n    this._syncInputs(this._dragRef);\n    this._handleEvents(this._dragRef);\n  }\n\n  /**\n   * Returns the element that is being used as a placeholder\n   * while the current element is being dragged.\n   */\n  getPlaceholderElement(): HTMLElement {\n    return this._dragRef.getPlaceholderElement();\n  }\n\n  /** Returns the root draggable element. */\n  getRootElement(): HTMLElement {\n    return this._dragRef.getRootElement();\n  }\n\n  /** Resets a standalone drag item to its initial position. */\n  reset(): void {\n    this._dragRef.reset();\n  }\n\n  /** Resets drag item to end of boundary element. */\n  resetToBoundary() {\n    this._dragRef.resetToBoundary();\n  }\n\n  /**\n   * Gets the pixel coordinates of the draggable outside of a drop container.\n   */\n  getFreeDragPosition(): Readonly<Point> {\n    return this._dragRef.getFreeDragPosition();\n  }\n\n  /**\n   * Sets the current position in pixels the draggable outside of a drop container.\n   * @param value New position to be set.\n   */\n  setFreeDragPosition(value: Point): void {\n    this._dragRef.setFreeDragPosition(value);\n  }\n\n  ngAfterViewInit() {\n    // We need to wait until after render, in order for the reference\n    // element to be in the proper place in the DOM. This is mostly relevant\n    // for draggable elements inside portals since they get stamped out in\n    // their original DOM position, and then they get transferred to the portal.\n    afterNextRender(\n      () => {\n        this._updateRootElement();\n        this._setupHandlesListener();\n        this._dragRef.scale = this.scale;\n\n        if (this.freeDragPosition) {\n          this._dragRef.setFreeDragPosition(this.freeDragPosition);\n        }\n      },\n      {injector: this._injector},\n    );\n  }\n\n  ngOnChanges(changes: SimpleChanges<this>) {\n    const rootSelectorChange = changes['rootElementSelector'];\n    const positionChange = changes['freeDragPosition'];\n\n    // We don't have to react to the first change since it's being\n    // handled in the `afterNextRender` queued up in the constructor.\n    if (rootSelectorChange && !rootSelectorChange.firstChange) {\n      this._updateRootElement();\n    }\n\n    // Scale affects the free drag position so we need to sync it up here.\n    this._dragRef.scale = this.scale;\n\n    // Skip the first change since it's being handled in the `afterNextRender` queued up in the\n    // constructor.\n    if (positionChange && !positionChange.firstChange && this.freeDragPosition) {\n      this._dragRef.setFreeDragPosition(this.freeDragPosition);\n    }\n  }\n\n  ngOnDestroy() {\n    if (this.dropContainer) {\n      this.dropContainer.removeItem(this);\n    }\n\n    this._dragDropRegistry.removeDirectiveNode(this.element.nativeElement);\n\n    // Unnecessary in most cases, but used to avoid extra change detections with `zone-paths-rxjs`.\n    this._ngZone.runOutsideAngular(() => {\n      this._handles.complete();\n      this._destroyed.next();\n      this._destroyed.complete();\n      this._dragRef.dispose();\n    });\n  }\n\n  _addHandle(handle: CdkDragHandle) {\n    const handles = this._handles.getValue();\n    handles.push(handle);\n    this._handles.next(handles);\n  }\n\n  _removeHandle(handle: CdkDragHandle) {\n    const handles = this._handles.getValue();\n    const index = handles.indexOf(handle);\n\n    if (index > -1) {\n      handles.splice(index, 1);\n      this._handles.next(handles);\n    }\n  }\n\n  _setPreviewTemplate(preview: CdkDragPreview) {\n    this._previewTemplate = preview;\n  }\n\n  _resetPreviewTemplate(preview: CdkDragPreview) {\n    if (preview === this._previewTemplate) {\n      this._previewTemplate = null;\n    }\n  }\n\n  _setPlaceholderTemplate(placeholder: CdkDragPlaceholder) {\n    this._placeholderTemplate = placeholder;\n  }\n\n  _resetPlaceholderTemplate(placeholder: CdkDragPlaceholder) {\n    if (placeholder === this._placeholderTemplate) {\n      this._placeholderTemplate = null;\n    }\n  }\n\n  /** Syncs the root element with the `DragRef`. */\n  private _updateRootElement() {\n    const element = this.element.nativeElement as HTMLElement;\n    let rootElement = element;\n    if (this.rootElementSelector) {\n      rootElement =\n        element.closest !== undefined\n          ? (element.closest(this.rootElementSelector) as HTMLElement)\n          : // Comment tag doesn't have closest method, so use parent's one.\n            (element.parentElement?.closest(this.rootElementSelector) as HTMLElement);\n    }\n\n    if (rootElement && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n      assertElementNode(rootElement, 'cdkDrag');\n    }\n\n    this._dragRef.withRootElement(rootElement || element);\n  }\n\n  /** Gets the boundary element, based on the `boundaryElement` value. */\n  private _getBoundaryElement() {\n    const boundary = this.boundaryElement;\n\n    if (!boundary) {\n      return null;\n    }\n\n    if (typeof boundary === 'string') {\n      return this.element.nativeElement.closest<HTMLElement>(boundary);\n    }\n\n    return coerceElement(boundary);\n  }\n\n  /** Syncs the inputs of the CdkDrag with the options of the underlying DragRef. */\n  private _syncInputs(ref: DragRef<CdkDrag<T>>) {\n    ref.beforeStarted.subscribe(() => {\n      if (!ref.isDragging()) {\n        const dir = this._dir;\n        const dragStartDelay = this.dragStartDelay;\n        const placeholder = this._placeholderTemplate\n          ? {\n              template: this._placeholderTemplate.templateRef,\n              context: this._placeholderTemplate.data,\n              viewContainer: this._viewContainerRef,\n            }\n          : null;\n        const preview = this._previewTemplate\n          ? {\n              template: this._previewTemplate.templateRef,\n              context: this._previewTemplate.data,\n              matchSize: this._previewTemplate.matchSize,\n              viewContainer: this._viewContainerRef,\n            }\n          : null;\n\n        ref.disabled = this.disabled;\n        ref.lockAxis = this.lockAxis;\n        ref.scale = this.scale;\n        ref.dragStartDelay =\n          typeof dragStartDelay === 'object' && dragStartDelay\n            ? dragStartDelay\n            : coerceNumberProperty(dragStartDelay);\n        ref.constrainPosition = this.constrainPosition;\n        ref.previewClass = this.previewClass;\n        ref\n          .withBoundaryElement(this._getBoundaryElement())\n          .withPlaceholderTemplate(placeholder)\n          .withPreviewTemplate(preview)\n          .withPreviewContainer(this.previewContainer || 'global');\n\n        if (dir) {\n          ref.withDirection(dir.value);\n        }\n      }\n    });\n\n    // This only needs to be resolved once.\n    ref.beforeStarted.pipe(take(1)).subscribe(() => {\n      // If we managed to resolve a parent through DI, use it.\n      if (this._parentDrag) {\n        ref.withParent(this._parentDrag._dragRef);\n        return;\n      }\n\n      // Otherwise fall back to resolving the parent by looking up the DOM. This can happen if\n      // the item was projected into another item by something like `ngTemplateOutlet`.\n      let parent = this.element.nativeElement.parentElement;\n      while (parent) {\n        const parentDrag = this._dragDropRegistry.getDragDirectiveForNode(parent);\n        if (parentDrag) {\n          ref.withParent(parentDrag._dragRef);\n          break;\n        }\n        parent = parent.parentElement;\n      }\n    });\n  }\n\n  /** Handles the events from the underlying `DragRef`. */\n  private _handleEvents(ref: DragRef<CdkDrag<T>>) {\n    ref.started.subscribe(startEvent => {\n      this.started.emit({source: this, event: startEvent.event});\n\n      // Since all of these events run outside of change detection,\n      // we need to ensure that everything is marked correctly.\n      this._changeDetectorRef.markForCheck();\n    });\n\n    ref.released.subscribe(releaseEvent => {\n      this.released.emit({source: this, event: releaseEvent.event});\n    });\n\n    ref.ended.subscribe(endEvent => {\n      this.ended.emit({\n        source: this,\n        distance: endEvent.distance,\n        dropPoint: endEvent.dropPoint,\n        event: endEvent.event,\n      });\n\n      // Since all of these events run outside of change detection,\n      // we need to ensure that everything is marked correctly.\n      this._changeDetectorRef.markForCheck();\n    });\n\n    ref.entered.subscribe(enterEvent => {\n      this.entered.emit({\n        container: enterEvent.container.data,\n        item: this,\n        currentIndex: enterEvent.currentIndex,\n      });\n    });\n\n    ref.exited.subscribe(exitEvent => {\n      this.exited.emit({\n        container: exitEvent.container.data,\n        item: this,\n      });\n    });\n\n    ref.dropped.subscribe(dropEvent => {\n      this.dropped.emit({\n        previousIndex: dropEvent.previousIndex,\n        currentIndex: dropEvent.currentIndex,\n        previousContainer: dropEvent.previousContainer.data,\n        container: dropEvent.container.data,\n        isPointerOverContainer: dropEvent.isPointerOverContainer,\n        item: this,\n        distance: dropEvent.distance,\n        dropPoint: dropEvent.dropPoint,\n        event: dropEvent.event,\n      });\n    });\n  }\n\n  /** Assigns the default input values based on a provided config object. */\n  private _assignDefaults(config: DragDropConfig) {\n    const {\n      lockAxis,\n      dragStartDelay,\n      constrainPosition,\n      previewClass,\n      boundaryElement,\n      draggingDisabled,\n      rootElementSelector,\n      previewContainer,\n    } = config;\n\n    this.disabled = draggingDisabled == null ? false : draggingDisabled;\n    this.dragStartDelay = dragStartDelay || 0;\n    this.lockAxis = lockAxis || null;\n\n    if (constrainPosition) {\n      this.constrainPosition = constrainPosition;\n    }\n\n    if (previewClass) {\n      this.previewClass = previewClass;\n    }\n\n    if (boundaryElement) {\n      this.boundaryElement = boundaryElement;\n    }\n\n    if (rootElementSelector) {\n      this.rootElementSelector = rootElementSelector;\n    }\n\n    if (previewContainer) {\n      this.previewContainer = previewContainer;\n    }\n  }\n\n  /** Sets up the listener that syncs the handles with the drag ref. */\n  private _setupHandlesListener() {\n    // Listen for any newly-added handles.\n    this._handles\n      .pipe(\n        // Sync the new handles with the DragRef.\n        tap(handles => {\n          const handleElements = handles.map(handle => handle.element);\n\n          // Usually handles are only allowed to be a descendant of the drag element, but if\n          // the consumer defined a different drag root, we should allow the drag element\n          // itself to be a handle too.\n          if (this._selfHandle && this.rootElementSelector) {\n            handleElements.push(this.element);\n          }\n\n          this._dragRef.withHandles(handleElements);\n        }),\n        // Listen if the state of any of the handles changes.\n        switchMap((handles: CdkDragHandle[]) => {\n          return merge(\n            ...handles.map(item => item._stateChanges.pipe(startWith(item))),\n          ) as Observable<CdkDragHandle>;\n        }),\n        takeUntil(this._destroyed),\n      )\n      .subscribe(handleInstance => {\n        // Enabled/disable the handle that changed in the DragRef.\n        const dragRef = this._dragRef;\n        const handle = handleInstance.element.nativeElement;\n        handleInstance.disabled ? dragRef.disableHandle(handle) : dragRef.enableHandle(handle);\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 {Directive, InjectionToken, Input, OnDestroy, booleanAttribute} from '@angular/core';\nimport type {CdkDropList} from './drop-list';\n\n/**\n * Injection token that can be used to reference instances of `CdkDropListGroup`. It serves as\n * alternative token to the actual `CdkDropListGroup` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nexport const CDK_DROP_LIST_GROUP = new InjectionToken<CdkDropListGroup<CdkDropList>>(\n  'CdkDropListGroup',\n);\n\n/**\n * Declaratively connects sibling `cdkDropList` instances together. All of the `cdkDropList`\n * elements that are placed inside a `cdkDropListGroup` will be connected to each other\n * automatically. Can be used as an alternative to the `cdkDropListConnectedTo` input\n * from `cdkDropList`.\n */\n@Directive({\n  selector: '[cdkDropListGroup]',\n  exportAs: 'cdkDropListGroup',\n  providers: [{provide: CDK_DROP_LIST_GROUP, useExisting: CdkDropListGroup}],\n})\nexport class CdkDropListGroup<T> implements OnDestroy {\n  /** Drop lists registered inside the group. */\n  readonly _items = new Set<T>();\n\n  /** Whether starting a dragging sequence from inside this group is disabled. */\n  @Input({alias: 'cdkDropListGroupDisabled', transform: booleanAttribute})\n  disabled: boolean = false;\n\n  ngOnDestroy() {\n    this._items.clear();\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 {NumberInput, coerceArray, coerceNumberProperty} from '../../coercion';\nimport {\n  ElementRef,\n  EventEmitter,\n  Input,\n  OnDestroy,\n  Output,\n  Directive,\n  ChangeDetectorRef,\n  booleanAttribute,\n  inject,\n  Injector,\n} from '@angular/core';\nimport {Directionality} from '../../bidi';\nimport {_IdGenerator} from '../../a11y';\nimport {ScrollDispatcher} from '../../scrolling';\nimport {CDK_DROP_LIST, CdkDrag} from './drag';\nimport {CdkDragDrop, CdkDragEnter, CdkDragExit, CdkDragSortEvent} from '../drag-events';\nimport {CDK_DROP_LIST_GROUP, CdkDropListGroup} from './drop-list-group';\nimport {createDropListRef, DropListRef} from '../drop-list-ref';\nimport {DragRef} from '../drag-ref';\nimport {DropListOrientation, DragAxis, DragDropConfig, CDK_DRAG_CONFIG} from './config';\nimport {merge, Subject} from 'rxjs';\nimport {startWith, takeUntil} from 'rxjs/operators';\nimport {assertElementNode} from './assertions';\n\n/** Container that wraps a set of draggable items. */\n@Directive({\n  selector: '[cdkDropList], cdk-drop-list',\n  exportAs: 'cdkDropList',\n  providers: [\n    // Prevent child drop lists from picking up the same group as their parent.\n    {provide: CDK_DROP_LIST_GROUP, useValue: undefined},\n    {provide: CDK_DROP_LIST, useExisting: CdkDropList},\n  ],\n  host: {\n    'class': 'cdk-drop-list',\n    '[attr.id]': 'id',\n    '[class.cdk-drop-list-disabled]': 'disabled',\n    '[class.cdk-drop-list-dragging]': '_dropListRef.isDragging()',\n    '[class.cdk-drop-list-receiving]': '_dropListRef.isReceiving()',\n  },\n})\nexport class CdkDropList<T = any> implements OnDestroy {\n  element = inject<ElementRef<HTMLElement>>(ElementRef);\n  private _changeDetectorRef = inject(ChangeDetectorRef);\n  private _scrollDispatcher = inject(ScrollDispatcher);\n  private _dir = inject(Directionality, {optional: true});\n  private _group = inject<CdkDropListGroup<CdkDropList>>(CDK_DROP_LIST_GROUP, {\n    optional: true,\n    skipSelf: true,\n  });\n\n  /** Refs that have been synced with the drop ref most recently. */\n  private _latestSortedRefs: DragRef[] | undefined;\n\n  /** Emits when the list has been destroyed. */\n  private readonly _destroyed = new Subject<void>();\n\n  /** Whether the element's scrollable parents have been resolved. */\n  private _scrollableParentsResolved = false;\n\n  /** Keeps track of the drop lists that are currently on the page. */\n  private static _dropLists: CdkDropList[] = [];\n\n  /** Reference to the underlying drop list instance. */\n  _dropListRef: DropListRef<CdkDropList<T>>;\n\n  /**\n   * Other draggable containers that this container is connected to and into which the\n   * container's items can be transferred. Can either be references to other drop containers,\n   * or their unique IDs.\n   */\n  @Input('cdkDropListConnectedTo')\n  connectedTo: (CdkDropList | string)[] | CdkDropList | string = [];\n\n  /** Arbitrary data to attach to this container. */\n  @Input('cdkDropListData') data!: T;\n\n  /** Direction in which the list is oriented. */\n  @Input('cdkDropListOrientation') orientation: DropListOrientation = 'vertical';\n\n  /**\n   * Unique ID for the drop zone. Can be used as a reference\n   * in the `connectedTo` of another `CdkDropList`.\n   */\n  @Input() id: string = inject(_IdGenerator).getId('cdk-drop-list-');\n\n  /** Locks the position of the draggable elements inside the container along the specified axis. */\n  @Input('cdkDropListLockAxis') lockAxis: DragAxis | null = null;\n\n  /** Whether starting a dragging sequence from this container is disabled. */\n  @Input({alias: 'cdkDropListDisabled', transform: booleanAttribute})\n  get disabled(): boolean {\n    return this._disabled || (!!this._group && this._group.disabled);\n  }\n  set disabled(value: boolean) {\n    // Usually we sync the directive and ref state right before dragging starts, in order to have\n    // a single point of failure and to avoid having to use setters for everything. `disabled` is\n    // a special case, because it can prevent the `beforeStarted` event from firing, which can lock\n    // the user in a disabled state, so we also need to sync it as it's being set.\n    this._dropListRef.disabled = this._disabled = value;\n  }\n  private _disabled = false;\n\n  /** Whether sorting within this drop list is disabled. */\n  @Input({alias: 'cdkDropListSortingDisabled', transform: booleanAttribute})\n  sortingDisabled: boolean = false;\n\n  /**\n   * Function that is used to determine whether an item\n   * is allowed to be moved into a drop container.\n   */\n  @Input('cdkDropListEnterPredicate')\n  enterPredicate: (drag: CdkDrag, drop: CdkDropList) => boolean = () => true;\n\n  /** Functions that is used to determine whether an item can be sorted into a particular index. */\n  @Input('cdkDropListSortPredicate')\n  sortPredicate: (index: number, drag: CdkDrag, drop: CdkDropList) => boolean = () => true;\n\n  /** Whether to auto-scroll the view when the user moves their pointer close to the edges. */\n  @Input({alias: 'cdkDropListAutoScrollDisabled', transform: booleanAttribute})\n  autoScrollDisabled: boolean = false;\n\n  /** Number of pixels to scroll for each frame when auto-scrolling an element. */\n  @Input('cdkDropListAutoScrollStep')\n  autoScrollStep: NumberInput;\n\n  /**\n   * Selector that will be used to resolve an alternate element container for the drop list.\n   * Passing an alternate container is useful for the cases where one might not have control\n   * over the parent node of the draggable items within the list (e.g. due to content projection).\n   * This allows for usages like:\n   *\n   * ```\n   * <div cdkDropList cdkDropListElementContainer=\".inner\">\n   *   <div class=\"inner\">\n   *     <div cdkDrag></div>\n   *   </div>\n   * </div>\n   * ```\n   */\n  @Input('cdkDropListElementContainer') elementContainerSelector: string | null = null;\n\n  /**\n   * By default when an item leaves its initial container, its placeholder will be transferred\n   * to the new container. If that's not desirable for your use case, you can enable this option\n   * which will clone the placeholder and leave it inside the original container. If the item is\n   * returned to the initial container, the anchor element will be removed automatically.\n   *\n   * The cloned placeholder can be styled by targeting the `cdk-drag-anchor` class.\n   *\n   * This option is useful in combination with `cdkDropListSortingDisabled` to implement copying\n   * behavior in a drop list.\n   */\n  @Input({alias: 'cdkDropListHasAnchor', transform: booleanAttribute})\n  hasAnchor: boolean = false;\n\n  /** Emits when the user drops an item inside the container. */\n  @Output('cdkDropListDropped')\n  readonly dropped: EventEmitter<CdkDragDrop<T, any>> = new EventEmitter<CdkDragDrop<T, any>>();\n\n  /**\n   * Emits when the user has moved a new drag item into this container.\n   */\n  @Output('cdkDropListEntered')\n  readonly entered: EventEmitter<CdkDragEnter<T>> = new EventEmitter<CdkDragEnter<T>>();\n\n  /**\n   * Emits when the user removes an item from the container\n   * by dragging it into another container.\n   */\n  @Output('cdkDropListExited')\n  readonly exited: EventEmitter<CdkDragExit<T>> = new EventEmitter<CdkDragExit<T>>();\n\n  /** Emits as the user is swapping items while actively dragging. */\n  @Output('cdkDropListSorted')\n  readonly sorted: EventEmitter<CdkDragSortEvent<T>> = new EventEmitter<CdkDragSortEvent<T>>();\n\n  /**\n   * Keeps track of the items that are registered with this container. Historically we used to\n   * do this with a `ContentChildren` query, however queries don't handle transplanted views very\n   * well which means that we can't handle cases like dragging the headers of a `mat-table`\n   * correctly. What we do instead is to have the items register themselves with the container\n   * and then we sort them based on their position in the DOM.\n   */\n  private _unsortedItems = new Set<CdkDrag>();\n\n  constructor() {\n    const config = inject<DragDropConfig>(CDK_DRAG_CONFIG, {optional: true});\n    const injector = inject(Injector);\n\n    if (typeof ngDevMode === 'undefined' || ngDevMode) {\n      assertElementNode(this.element.nativeElement, 'cdkDropList');\n    }\n\n    this._dropListRef = createDropListRef(injector, this.element);\n    this._dropListRef.data = this;\n\n    if (config) {\n      this._assignDefaults(config);\n    }\n\n    this._dropListRef.enterPredicate = (drag: DragRef<CdkDrag>, drop: DropListRef<CdkDropList>) => {\n      return this.enterPredicate(drag.data, drop.data);\n    };\n\n    this._dropListRef.sortPredicate = (\n      index: number,\n      drag: DragRef<CdkDrag>,\n      drop: DropListRef<CdkDropList>,\n    ) => {\n      return this.sortPredicate(index, drag.data, drop.data);\n    };\n\n    this._setupInputSyncSubscription(this._dropListRef);\n    this._handleEvents(this._dropListRef);\n    CdkDropList._dropLists.push(this);\n\n    if (this._group) {\n      this._group._items.add(this);\n    }\n  }\n\n  /** Registers an items with the drop list. */\n  addItem(item: CdkDrag): void {\n    this._unsortedItems.add(item);\n    item._dragRef._withDropContainer(this._dropListRef);\n\n    // Only sync the items while dragging since this method is\n    // called when items are being initialized one-by-one.\n    if (this._dropListRef.isDragging()) {\n      this._syncItemsWithRef(this.getSortedItems().map(item => item._dragRef));\n    }\n  }\n\n  /** Removes an item from the drop list. */\n  removeItem(item: CdkDrag): void {\n    this._unsortedItems.delete(item);\n\n    // This method might be called on destroy so we always want to sync with the ref.\n    // Note that we reuse the last set of synced items, rather than re-sorting the whole\n    // list, because it can slow down re-renders of large lists (see #30737).\n    if (this._latestSortedRefs) {\n      const index = this._latestSortedRefs.indexOf(item._dragRef);\n\n      if (index > -1) {\n        this._latestSortedRefs.splice(index, 1);\n        this._syncItemsWithRef(this._latestSortedRefs);\n      }\n    }\n  }\n\n  /** Gets the registered items in the list, sorted by their position in the DOM. */\n  getSortedItems(): CdkDrag[] {\n    return Array.from(this._unsortedItems).sort((a: CdkDrag, b: CdkDrag) => {\n      const documentPosition = a._dragRef\n        .getVisibleElement()\n        .compareDocumentPosition(b._dragRef.getVisibleElement());\n\n      // `compareDocumentPosition` returns a bitmask so we have to use a bitwise operator.\n      // https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition\n      // tslint:disable-next-line:no-bitwise\n      return documentPosition & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;\n    });\n  }\n\n  ngOnDestroy() {\n    const index = CdkDropList._dropLists.indexOf(this);\n\n    if (index > -1) {\n      CdkDropList._dropLists.splice(index, 1);\n    }\n\n    if (this._group) {\n      this._group._items.delete(this);\n    }\n\n    this._latestSortedRefs = undefined;\n    this._unsortedItems.clear();\n    this._dropListRef.dispose();\n    this._destroyed.next();\n    this._destroyed.complete();\n  }\n\n  /** Syncs the inputs of the CdkDropList with the options of the underlying DropListRef. */\n  private _setupInputSyncSubscription(ref: DropListRef<CdkDropList>) {\n    if (this._dir) {\n      this._dir.change\n        .pipe(startWith(this._dir.value), takeUntil(this._destroyed))\n        .subscribe(value => ref.withDirection(value));\n    }\n\n    ref.beforeStarted.subscribe(() => {\n      const siblings = coerceArray(this.connectedTo).map(drop => {\n        if (typeof drop === 'string') {\n          const correspondingDropList = CdkDropList._dropLists.find(list => list.id === drop);\n\n          if (!correspondingDropList && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n            console.warn(`CdkDropList could not find connected drop list with id \"${drop}\"`);\n          }\n\n          return correspondingDropList!;\n        }\n\n        return drop;\n      });\n\n      if (this._group) {\n        this._group._items.forEach(drop => {\n          if (siblings.indexOf(drop) === -1) {\n            siblings.push(drop);\n          }\n        });\n      }\n\n      // Note that we resolve the scrollable parents here so that we delay the resolution\n      // as long as possible, ensuring that the element is in its final place in the DOM.\n      if (!this._scrollableParentsResolved) {\n        const scrollableParents = this._scrollDispatcher\n          .getAncestorScrollContainers(this.element)\n          .map(scrollable => scrollable.getElementRef().nativeElement);\n        this._dropListRef.withScrollableParents(scrollableParents);\n\n        // Only do this once since it involves traversing the DOM and the parents\n        // shouldn't be able to change without the drop list being destroyed.\n        this._scrollableParentsResolved = true;\n      }\n\n      if (this.elementContainerSelector) {\n        const container = this.element.nativeElement.querySelector(this.elementContainerSelector);\n\n        if (!container && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n          throw new Error(\n            `CdkDropList could not find an element container matching the selector \"${this.elementContainerSelector}\"`,\n          );\n        }\n\n        ref.withElementContainer(container as HTMLElement);\n      }\n\n      ref.disabled = this.disabled;\n      ref.lockAxis = this.lockAxis;\n      ref.sortingDisabled = this.sortingDisabled;\n      ref.autoScrollDisabled = this.autoScrollDisabled;\n      ref.autoScrollStep = coerceNumberProperty(this.autoScrollStep, 2);\n      ref.hasAnchor = this.hasAnchor;\n      ref\n        .connectedTo(siblings.filter(drop => drop && drop !== this).map(list => list._dropListRef))\n        .withOrientation(this.orientation);\n    });\n  }\n\n  /** Handles events from the underlying DropListRef. */\n  private _handleEvents(ref: DropListRef<CdkDropList>) {\n    ref.beforeStarted.subscribe(() => {\n      this._syncItemsWithRef(this.getSortedItems().map(item => item._dragRef));\n      this._changeDetectorRef.markForCheck();\n    });\n\n    ref.entered.subscribe(event => {\n      this.entered.emit({\n        container: this,\n        item: event.item.data,\n        currentIndex: event.currentIndex,\n      });\n    });\n\n    ref.exited.subscribe(event => {\n      this.exited.emit({\n        container: this,\n        item: event.item.data,\n      });\n      this._changeDetectorRef.markForCheck();\n    });\n\n    ref.sorted.subscribe(event => {\n      this.sorted.emit({\n        previousIndex: event.previousIndex,\n        currentIndex: event.currentIndex,\n        container: this,\n        item: event.item.data,\n      });\n    });\n\n    ref.dropped.subscribe(dropEvent => {\n      this.dropped.emit({\n        previousIndex: dropEvent.previousIndex,\n        currentIndex: dropEvent.currentIndex,\n        previousContainer: dropEvent.previousContainer.data,\n        container: dropEvent.container.data,\n        item: dropEvent.item.data,\n        isPointerOverContainer: dropEvent.isPointerOverContainer,\n        distance: dropEvent.distance,\n        dropPoint: dropEvent.dropPoint,\n        event: dropEvent.event,\n      });\n\n      // Mark for check since all of these events run outside of change\n      // detection and we're not guaranteed for something else to have triggered it.\n      this._changeDetectorRef.markForCheck();\n    });\n\n    merge(ref.receivingStarted, ref.receivingStopped).subscribe(() =>\n      this._changeDetectorRef.markForCheck(),\n    );\n  }\n\n  /** Assigns the default input values based on a provided config object. */\n  private _assignDefaults(config: DragDropConfig) {\n    const {lockAxis, draggingDisabled, sortingDisabled, listAutoScrollDisabled, listOrientation} =\n      config;\n\n    this.disabled = draggingDisabled == null ? false : draggingDisabled;\n    this.sortingDisabled = sortingDisabled == null ? false : sortingDisabled;\n    this.autoScrollDisabled = listAutoScrollDisabled == null ? false : listAutoScrollDisabled;\n    this.orientation = listOrientation || 'vertical';\n    this.lockAxis = lockAxis || null;\n  }\n\n  /** Syncs up the registered drag items with underlying drop list ref. */\n  private _syncItemsWithRef(items: DragRef[]) {\n    this._latestSortedRefs = items;\n    this._dropListRef.withItems(items);\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  Directive,\n  InjectionToken,\n  Input,\n  OnDestroy,\n  TemplateRef,\n  booleanAttribute,\n  inject,\n} from '@angular/core';\nimport {CDK_DRAG_PARENT} from '../drag-parent';\n\n/**\n * Injection token that can be used to reference instances of `CdkDragPreview`. It serves as\n * alternative token to the actual `CdkDragPreview` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nexport const CDK_DRAG_PREVIEW = new InjectionToken<CdkDragPreview>('CdkDragPreview');\n\n/**\n * Element that will be used as a template for the preview\n * of a CdkDrag when it is being dragged.\n */\n@Directive({\n  selector: 'ng-template[cdkDragPreview]',\n  providers: [{provide: CDK_DRAG_PREVIEW, useExisting: CdkDragPreview}],\n})\nexport class CdkDragPreview<T = any> implements OnDestroy {\n  templateRef = inject<TemplateRef<T>>(TemplateRef);\n\n  private _drag = inject(CDK_DRAG_PARENT, {optional: true});\n\n  /** Context data to be added to the preview template instance. */\n  @Input() data!: T;\n\n  /** Whether the preview should preserve the same size as the item that is being dragged. */\n  @Input({transform: booleanAttribute}) matchSize: boolean = false;\n\n  constructor() {\n    this._drag?._setPreviewTemplate(this);\n  }\n\n  ngOnDestroy(): void {\n    this._drag?._resetPreviewTemplate(this);\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 {Directive, TemplateRef, Input, InjectionToken, inject, OnDestroy} from '@angular/core';\nimport {CDK_DRAG_PARENT} from '../drag-parent';\n\n/**\n * Injection token that can be used to reference instances of `CdkDragPlaceholder`. It serves as\n * alternative token to the actual `CdkDragPlaceholder` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nexport const CDK_DRAG_PLACEHOLDER = new InjectionToken<CdkDragPlaceholder>('CdkDragPlaceholder');\n\n/**\n * Element that will be used as a template for the placeholder of a CdkDrag when\n * it is being dragged. The placeholder is displayed in place of the element being dragged.\n */\n@Directive({\n  selector: 'ng-template[cdkDragPlaceholder]',\n  providers: [{provide: CDK_DRAG_PLACEHOLDER, useExisting: CdkDragPlaceholder}],\n})\nexport class CdkDragPlaceholder<T = any> implements OnDestroy {\n  templateRef = inject<TemplateRef<T>>(TemplateRef);\n\n  private _drag = inject(CDK_DRAG_PARENT, {optional: true});\n\n  /** Context data to be added to the placeholder template instance. */\n  @Input() data!: T;\n\n  constructor() {\n    this._drag?._setPlaceholderTemplate(this);\n  }\n\n  ngOnDestroy(): void {\n    this._drag?._resetPlaceholderTemplate(this);\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 {CdkScrollableModule} from '../scrolling';\nimport {CdkDropList} from './directives/drop-list';\nimport {CdkDropListGroup} from './directives/drop-list-group';\nimport {CdkDrag} from './directives/drag';\nimport {CdkDragHandle} from './directives/drag-handle';\nimport {CdkDragPreview} from './directives/drag-preview';\nimport {CdkDragPlaceholder} from './directives/drag-placeholder';\nimport {DragDrop} from './drag-drop';\n\nconst DRAG_DROP_DIRECTIVES = [\n  CdkDropList,\n  CdkDropListGroup,\n  CdkDrag,\n  CdkDragHandle,\n  CdkDragPreview,\n  CdkDragPlaceholder,\n];\n\n@NgModule({\n  imports: DRAG_DROP_DIRECTIVES,\n  exports: [CdkScrollableModule, ...DRAG_DROP_DIRECTIVES],\n  providers: [DragDrop],\n})\nexport class DragDropModule {}\n\n// Re-export needed by the Angular compiler.\n// See: https://github.com/angular/components/issues/30663.\n// Note: These exports need to be stable and shouldn't be renamed unnecessarily because\n// consuming libraries might have references to them in their own partial compilation output.\nexport {CdkScrollable as ɵɵCdkScrollable} from '../scrolling';\n"],"names":["activeCapturingEventOptions","clamp"],"mappings":";;;;;;;;;;;;;;;;;;;;AASM,SAAU,aAAa,CAAC,IAAiB,EAAA;AAC7C,EAAA,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAgB;AACjD,EAAA,MAAM,iBAAiB,GAAG,KAAK,CAAC,gBAAgB,CAAC,MAAM,CAAC;EACxD,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE;AAG5C,EAAA,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC;AAE3B,EAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG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