{"version":3,"file":"clr-angular-data-tree-view.mjs","sources":["../../../projects/angular/data/tree-view/models/selected-state.enum.ts","../../../projects/angular/data/tree-view/tree-features.service.ts","../../../projects/angular/data/tree-view/tree-focus-manager.service.ts","../../../projects/angular/data/tree-view/models/tree-node.model.ts","../../../projects/angular/data/tree-view/models/declarative-tree-node.model.ts","../../../projects/angular/data/tree-view/tree-node-link.ts","../../../projects/angular/data/tree-view/recursive-children.ts","../../../projects/angular/data/tree-view/tree-node.ts","../../../projects/angular/data/tree-view/tree-node.html","../../../projects/angular/data/tree-view/tree.ts","../../../projects/angular/data/tree-view/models/async-array.ts","../../../projects/angular/data/tree-view/models/recursive-tree-node.model.ts","../../../projects/angular/data/tree-view/recursive-for-of.ts","../../../projects/angular/data/tree-view/tree-view.module.ts","../../../projects/angular/data/tree-view/index.ts","../../../projects/angular/data/tree-view/clr-angular-data-tree-view.ts"],"sourcesContent":["/*\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\n * This software is released under MIT license.\n * The full license information can be found in LICENSE in the root directory of this project.\n */\n\n// TODO: I'd like this to be a CheckedState enum for the checkboxes in the future.\nexport enum ClrSelectedState {\n  // WARNING! Unselected has the value 0,\n  // so it's actually the only one that will evaluate to false if cast to a boolean.\n  // Don't mess with the order!\n  UNSELECTED = 0,\n  SELECTED,\n  INDETERMINATE,\n}\n","/*\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\n * This software is released under MIT license.\n * The full license information can be found in LICENSE in the root directory of this project.\n */\n\nimport { Injectable, Optional, SkipSelf, TemplateRef } from '@angular/core';\nimport { Subject } from 'rxjs';\n\nimport { RecursiveTreeNodeModel } from './models/recursive-tree-node.model';\nimport { ClrRecursiveForOfContext } from './recursive-for-of';\n\n@Injectable()\nexport class TreeFeaturesService<T> {\n  selectable = false;\n  eager = true;\n  recursion: {\n    template: TemplateRef<ClrRecursiveForOfContext<T>>;\n    root: RecursiveTreeNodeModel<T>[];\n  };\n  childrenFetched = new Subject<void>();\n}\n\nexport function treeFeaturesFactory<T>(existing: TreeFeaturesService<T>) {\n  return existing || new TreeFeaturesService();\n}\n\nexport const TREE_FEATURES_PROVIDER = {\n  provide: TreeFeaturesService,\n  useFactory: treeFeaturesFactory,\n  /*\n   * The Optional + SkipSelf pattern ensures that in case of nested components, only the root one will\n   * instantiate a new service and all its children will reuse the root's instance.\n   * If there are several roots (in this case, several independent trees on a page), each root will instantiate\n   * its own service so they won't interfere with one another.\n   *\n   * TL;DR - Optional + SkipSelf = 1 instance of TreeFeaturesService per tree.\n   */\n  deps: [[new Optional(), new SkipSelf(), TreeFeaturesService]],\n};\n","/*\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\n * This software is released under MIT license.\n * The full license information can be found in LICENSE in the root directory of this project.\n */\n\nimport { Injectable } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\n\nimport { TreeNodeModel } from './models/tree-node.model';\n\n@Injectable()\nexport class TreeFocusManagerService<T> {\n  rootNodeModels: TreeNodeModel<T>[];\n\n  private focusedNodeId: string;\n  private _focusRequest = new Subject<string>();\n  private _focusChange = new Subject<string>();\n\n  get focusRequest(): Observable<string> {\n    return this._focusRequest.asObservable();\n  }\n\n  get focusChange(): Observable<string> {\n    return this._focusChange.asObservable();\n  }\n\n  focusNode(model: TreeNodeModel<T>): void {\n    if (model) {\n      this._focusRequest.next(model.nodeId);\n    }\n  }\n\n  broadcastFocusedNode(nodeId: string): void {\n    if (this.focusedNodeId !== nodeId) {\n      this.focusedNodeId = nodeId;\n      this._focusChange.next(nodeId);\n    }\n  }\n\n  focusParent(model: TreeNodeModel<T>): void {\n    if (model) {\n      this.focusNode(model.parent);\n    }\n  }\n\n  focusFirstVisibleNode(): void {\n    const focusModel = this.rootNodeModels && this.rootNodeModels[0];\n    this.focusNode(focusModel);\n  }\n\n  focusLastVisibleNode(): void {\n    this.focusNode(this.findLastVisibleInTree());\n  }\n\n  focusNodeAbove(model: TreeNodeModel<T>): void {\n    this.focusNode(this.findNodeAbove(model));\n  }\n\n  focusNodeBelow(model: TreeNodeModel<T>): void {\n    this.focusNode(this.findNodeBelow(model));\n  }\n\n  focusNodeStartsWith(searchString: string, model: TreeNodeModel<T>): void {\n    this.focusNode(this.findClosestNodeStartsWith(searchString, model));\n  }\n\n  private findSiblings(model: TreeNodeModel<T>): TreeNodeModel<T>[] {\n    // the method will return not only sibling models but also itself among them\n    if (model.parent) {\n      return model.parent.children;\n    } else {\n      return this.rootNodeModels;\n    }\n  }\n\n  private findLastVisibleInNode(model: TreeNodeModel<T>): TreeNodeModel<T> {\n    // the method will traverse through until it finds the last visible node from the given node\n    if (!model) {\n      return null;\n    }\n    if (model.expanded && model.children.length > 0) {\n      const children = model.children;\n      const lastChild = children[children.length - 1];\n      return this.findLastVisibleInNode(lastChild);\n    } else {\n      return model;\n    }\n  }\n\n  private findNextFocusable(model: TreeNodeModel<T>): TreeNodeModel<T> {\n    if (!model) {\n      return null;\n    }\n\n    const siblings = this.findSiblings(model);\n    const selfIndex = siblings.indexOf(model);\n\n    if (selfIndex < siblings.length - 1) {\n      return siblings[selfIndex + 1];\n    } else if (selfIndex === siblings.length - 1) {\n      return this.findNextFocusable(model.parent);\n    }\n    return null;\n  }\n\n  private findLastVisibleInTree(): TreeNodeModel<T> {\n    const lastRootNode =\n      this.rootNodeModels && this.rootNodeModels.length && this.rootNodeModels[this.rootNodeModels.length - 1];\n    return this.findLastVisibleInNode(lastRootNode);\n  }\n\n  private findNodeAbove(model: TreeNodeModel<T>): TreeNodeModel<T> {\n    if (!model) {\n      return null;\n    }\n\n    const siblings = this.findSiblings(model);\n    const selfIndex = siblings.indexOf(model);\n\n    if (selfIndex === 0) {\n      return model.parent;\n    } else if (selfIndex > 0) {\n      return this.findLastVisibleInNode(siblings[selfIndex - 1]);\n    }\n    return null;\n  }\n\n  private findNodeBelow(model: TreeNodeModel<T>): TreeNodeModel<T> {\n    if (!model) {\n      return null;\n    }\n\n    if (model.expanded && model.children.length > 0) {\n      return model.children[0];\n    } else {\n      return this.findNextFocusable(model);\n    }\n  }\n\n  private findDescendentNodeStartsWith(searchString: string, model: TreeNodeModel<T>): TreeNodeModel<T> {\n    if (model.expanded && model.children.length > 0) {\n      for (const childModel of model.children) {\n        const found = this.findNodeStartsWith(searchString, childModel);\n        if (found) {\n          return found;\n        }\n      }\n    }\n    return null;\n  }\n\n  private findSiblingNodeStartsWith(searchString: string, model: TreeNodeModel<T>): TreeNodeModel<T> {\n    const siblings = this.findSiblings(model);\n    const selfIndex = siblings.indexOf(model);\n\n    // Look from sibling nodes\n    for (let i = selfIndex + 1; i < siblings.length; i++) {\n      const siblingModel = siblings[i];\n      const found = this.findNodeStartsWith(searchString, siblingModel);\n      if (found) {\n        return found;\n      }\n    }\n    return null;\n  }\n\n  private findRootNodeStartsWith(searchString: string, model: TreeNodeModel<T>): TreeNodeModel<T> {\n    for (const rootModel of this.rootNodeModels) {\n      // Don't look from a parent yet\n      if (model.parent && model.parent === rootModel) {\n        continue;\n      }\n\n      const found = this.findNodeStartsWith(searchString, rootModel);\n      if (found) {\n        return found;\n      }\n    }\n    return null;\n  }\n\n  private findNodeStartsWith(searchString: string, model: TreeNodeModel<T>): TreeNodeModel<T> {\n    if (!model) {\n      return null;\n    }\n\n    if (model.textContent.startsWith(searchString)) {\n      return model;\n    }\n\n    return this.findDescendentNodeStartsWith(searchString, model);\n  }\n\n  private findClosestNodeStartsWith(searchString: string, model: TreeNodeModel<T>): TreeNodeModel<T> {\n    if (!model) {\n      return null;\n    }\n\n    const foundFromDescendents = this.findDescendentNodeStartsWith(searchString, model);\n\n    if (foundFromDescendents) {\n      return foundFromDescendents;\n    }\n\n    const foundFromSiblings = this.findSiblingNodeStartsWith(searchString, model);\n\n    if (foundFromSiblings) {\n      return foundFromSiblings;\n    }\n\n    const foundFromRootNodes = this.findRootNodeStartsWith(searchString, model);\n\n    if (foundFromRootNodes) {\n      return foundFromRootNodes;\n    }\n    // Now look from its own direct parent\n    return this.findNodeStartsWith(searchString, model.parent);\n  }\n}\n","/*\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\n * This software is released under MIT license.\n * The full license information can be found in LICENSE in the root directory of this project.\n */\n\nimport { BehaviorSubject } from 'rxjs';\n\nimport { ClrSelectedState } from './selected-state.enum';\n\nexport abstract class TreeNodeModel<T> {\n  nodeId: string;\n  expanded: boolean;\n  model: T | null;\n  textContent: string;\n  loading$ = new BehaviorSubject(false);\n  selected = new BehaviorSubject(ClrSelectedState.UNSELECTED);\n\n  /*\n   * Being able to push this down to the RecursiveTreeNodeModel would require too much work on the angular components\n   * right now for them to know which kind of model they are using. So I'm lifting the public properties to this\n   * abstract parent class for now and we can revisit it later, when we're not facing such a close deadline.\n   */\n  private _loading = false;\n  private _disabled: boolean;\n\n  /*\n   * Ideally, I would like to use a polymorphic this type here to ensure homogeneity of the tree, something like:\n   * abstract parent: this<T> | null;\n   * abstract children: this<T>[];\n   * But I'm hitting limitations on typescript not allowing that type in constructors or static methods.\n   * So I'm resorting to forcing override with more precise types by marking these abstract.\n   */\n  abstract parent: TreeNodeModel<T> | null;\n  abstract children: TreeNodeModel<T>[];\n\n  get loading() {\n    return this._loading;\n  }\n  set loading(isLoading: boolean) {\n    this._loading = isLoading;\n    this.loading$.next(isLoading);\n  }\n\n  get disabled() {\n    // when both parameters are undefined, double negative is needed to cast to false, otherwise will return undefined.\n    return !!(this._disabled || this.parent?.disabled);\n  }\n  set disabled(value: boolean) {\n    this._disabled = value;\n  }\n\n  destroy() {\n    // Just to be safe\n    this.selected.complete();\n  }\n\n  // Propagate by default when eager, don't propagate in the lazy-loaded tree.\n  setSelected(state: ClrSelectedState, propagateUp: boolean, propagateDown: boolean) {\n    if (state === this.selected.value) {\n      return;\n    }\n    this.selected.next(state);\n    if (propagateDown && state !== ClrSelectedState.INDETERMINATE && this.children) {\n      this.children.forEach(child => {\n        if (!child.disabled) {\n          child.setSelected(state, false, true);\n        }\n      });\n    }\n    if (propagateUp && this.parent) {\n      this.parent._updateSelectionFromChildren();\n    }\n  }\n\n  toggleSelection(propagate: boolean) {\n    if (this.disabled) {\n      return;\n    }\n\n    // Both unselected and indeterminate toggle to selected\n    const newState =\n      this.selected.value === ClrSelectedState.SELECTED ? ClrSelectedState.UNSELECTED : ClrSelectedState.SELECTED;\n    // NOTE: we always propagate selection up in this method because it is only called when the user takes an action.\n    // It should never be called from lifecycle hooks or app-provided inputs.\n    this.setSelected(newState, true, propagate);\n  }\n\n  /*\n   * Internal, but needs to be called by other nodes\n   */\n  _updateSelectionFromChildren() {\n    const newState = this.computeSelectionStateFromChildren();\n    if (newState === this.selected.value) {\n      return;\n    }\n    this.selected.next(newState);\n    if (this.parent) {\n      this.parent._updateSelectionFromChildren();\n    }\n  }\n\n  private computeSelectionStateFromChildren() {\n    let oneSelected = false;\n    let oneUnselected = false;\n    // Using a good old for loop to exit as soon as we can tell, for better performance on large trees.\n    for (const child of this.children) {\n      switch (child.selected.value) {\n        case ClrSelectedState.INDETERMINATE:\n          if (child.disabled) {\n            continue;\n          }\n          return ClrSelectedState.INDETERMINATE;\n        case ClrSelectedState.SELECTED:\n          oneSelected = true;\n          if (oneUnselected) {\n            return ClrSelectedState.INDETERMINATE;\n          }\n          break;\n        case ClrSelectedState.UNSELECTED:\n        default:\n          // Default is the same as unselected, in case an undefined somehow made it all the way here.\n          oneUnselected = true;\n          if (oneSelected) {\n            return ClrSelectedState.INDETERMINATE;\n          }\n          break;\n      }\n    }\n    if (!oneSelected) {\n      return ClrSelectedState.UNSELECTED;\n    } else if (!oneUnselected) {\n      return ClrSelectedState.SELECTED;\n    } else {\n      return ClrSelectedState.UNSELECTED;\n    }\n  }\n}\n","/*\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\n * This software is released under MIT license.\n * The full license information can be found in LICENSE in the root directory of this project.\n */\n\nimport { TreeNodeModel } from './tree-node.model';\n\n/*\n * A declarative model is built by traversing the Angular component tree.\n * Declarative = Tree node components dictate the model\n */\nexport class DeclarativeTreeNodeModel<T> extends TreeNodeModel<T> {\n  // Override for a more precise type\n  parent: DeclarativeTreeNodeModel<T> | null;\n  children: DeclarativeTreeNodeModel<T>[];\n\n  constructor(parent: DeclarativeTreeNodeModel<T> | null) {\n    super();\n    this.parent = parent;\n    if (parent) {\n      parent._addChild(this);\n    }\n    this.children = [];\n  }\n\n  override destroy() {\n    if (this.parent) {\n      this.parent._removeChild(this);\n    }\n    super.destroy();\n  }\n\n  _addChild(child: DeclarativeTreeNodeModel<T>) {\n    this.children.push(child);\n  }\n\n  _removeChild(child: DeclarativeTreeNodeModel<T>) {\n    const index = this.children.indexOf(child);\n    if (index > -1) {\n      this.children.splice(index, 1);\n    }\n  }\n}\n","/*\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\n * This software is released under MIT license.\n * The full license information can be found in LICENSE in the root directory of this project.\n */\n\nimport { Directive, ElementRef } from '@angular/core';\n\n@Directive({\n  selector: '.clr-treenode-link',\n  standalone: false,\n})\nexport class ClrTreeNodeLink {\n  constructor(private el: ElementRef<HTMLElement>) {}\n\n  get active() {\n    return this.el.nativeElement.classList.contains('active');\n  }\n\n  activate() {\n    if (this.el.nativeElement && this.el.nativeElement.click) {\n      this.el.nativeElement.click();\n    }\n  }\n}\n","/*\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\n * This software is released under MIT license.\n * The full license information can be found in LICENSE in the root directory of this project.\n */\n\nimport { Component, Input, Optional } from '@angular/core';\nimport { IfExpandService } from '@clr/angular/utils';\nimport { Subscription } from 'rxjs';\n\nimport { RecursiveTreeNodeModel } from './models/recursive-tree-node.model';\nimport { TreeNodeModel } from './models/tree-node.model';\nimport { ClrRecursiveForOfContext } from './recursive-for-of';\nimport { TreeFeaturesService } from './tree-features.service';\n\n@Component({\n  selector: 'clr-recursive-children',\n  template: `\n    @if (shouldRender()) {\n      @for (child of parent?.children || children; track child) {\n        <ng-container *ngTemplateOutlet=\"featuresService.recursion.template; context: getContext(child)\"></ng-container>\n      }\n    }\n  `,\n  host: {\n    '[attr.role]': 'role', // Safari + VO needs direct relationship between treeitem and group; no element should exist between them\n  },\n  standalone: false,\n})\n/**\n * Internal component, do not export!\n * This is part of the hack to get around https://github.com/angular/angular/issues/15998\n */\nexport class RecursiveChildren<T> {\n  // Offering the option to either give the parent node to recurse potentially lazily,\n  // or directly the list of children to display.\n  @Input('parent') parent: TreeNodeModel<T>;\n  @Input('children') children: TreeNodeModel<T>[];\n\n  subscription: Subscription;\n  role: string;\n\n  constructor(\n    public featuresService: TreeFeaturesService<T>,\n    @Optional() private expandService: IfExpandService\n  ) {\n    if (expandService) {\n      this.subscription = expandService.expandChange.subscribe(value => {\n        if (!value && this.parent && !featuresService.eager && featuresService.recursion) {\n          // In the case of lazy-loading recursive trees, we clear the children on collapse.\n          // This is better in case they change between two user interaction, and that way\n          // the app itself can decide whether to cache them or not.\n          (this.parent as RecursiveTreeNodeModel<T>).clearChildren();\n        }\n      });\n    }\n  }\n\n  ngAfterContentInit() {\n    this.setAriaRoles();\n  }\n\n  shouldRender() {\n    return (\n      this.featuresService.recursion &&\n      // In the smart case, we eagerly render all the recursive children\n      // to make sure two-way bindings for selection are available.\n      // They will be hidden with CSS by the parent.\n      (this.featuresService.eager || !this.expandService || this.expandService.expanded)\n    );\n  }\n\n  getContext(node: TreeNodeModel<T>): ClrRecursiveForOfContext<T> {\n    return {\n      $implicit: node.model,\n      clrModel: node,\n    };\n  }\n\n  ngOnDestroy() {\n    if (this.subscription) {\n      this.subscription.unsubscribe();\n    }\n  }\n\n  private setAriaRoles() {\n    this.role = this.parent ? 'group' : null;\n  }\n}\n","/*\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\n * This software is released under MIT license.\n * The full license information can be found in LICENSE in the root directory of this project.\n */\n\nimport { animate, state, style, transition, trigger } from '@angular/animations';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n  AfterContentInit,\n  AfterViewInit,\n  Component,\n  ContentChildren,\n  ElementRef,\n  EventEmitter,\n  Inject,\n  Injector,\n  Input,\n  OnDestroy,\n  OnInit,\n  Optional,\n  Output,\n  PLATFORM_ID,\n  QueryList,\n  SkipSelf,\n  ViewChild,\n} from '@angular/core';\nimport {\n  ClrCommonStringsService,\n  IfExpandService,\n  isKeyEitherLetterOrNumber,\n  Keys,\n  LoadingListener,\n  preventArrowKeyScroll,\n  uniqueIdFactory,\n} from '@clr/angular/utils';\nimport { Subject, Subscription } from 'rxjs';\nimport { debounceTime, filter } from 'rxjs/operators';\n\nimport { DeclarativeTreeNodeModel } from './models/declarative-tree-node.model';\nimport { ClrSelectedState } from './models/selected-state.enum';\nimport { TreeNodeModel } from './models/tree-node.model';\nimport { TREE_FEATURES_PROVIDER, TreeFeaturesService } from './tree-features.service';\nimport { TreeFocusManagerService } from './tree-focus-manager.service';\nimport { ClrTreeNodeLink } from './tree-node-link';\n\nconst LVIEW_CONTEXT_INDEX = 8;\n\n// If the user types multiple keys without allowing 200ms to pass between them,\n// then those keys are sent together in one request.\nconst TREE_TYPE_AHEAD_TIMEOUT = 200;\n\n@Component({\n  selector: 'clr-tree-node',\n  templateUrl: './tree-node.html',\n  providers: [TREE_FEATURES_PROVIDER, IfExpandService, { provide: LoadingListener, useExisting: IfExpandService }],\n  animations: [\n    trigger('toggleChildrenAnim', [\n      transition('collapsed => expanded', [style({ height: 0 }), animate(200, style({ height: '*' }))]),\n      transition('expanded => collapsed', [style({ height: '*' }), animate(200, style({ height: 0 }))]),\n      state('expanded', style({ height: '*', 'overflow-y': 'visible' })),\n      state('collapsed', style({ height: 0 })),\n    ]),\n  ],\n  host: {\n    '[class.clr-tree-node]': 'true',\n    '[class.disabled]': 'this._model.disabled',\n  },\n  standalone: false,\n})\nexport class ClrTreeNode<T> implements OnInit, AfterContentInit, AfterViewInit, OnDestroy {\n  // Allows the consumer to override our logic deciding if a node is expandable.\n  // Useful for recursive trees that don't want to pre-load one level ahead just to know which nodes are expandable.\n  @Input('clrExpandable') expandable: boolean | undefined;\n\n  @Output('clrSelectedChange') selectedChange = new EventEmitter<ClrSelectedState>(false);\n  @Output('clrExpandedChange') expandedChange = new EventEmitter<boolean>();\n\n  STATES = ClrSelectedState;\n  isModelLoading = false;\n  nodeId = uniqueIdFactory();\n  contentContainerTabindex = -1;\n  _model: TreeNodeModel<T>;\n\n  private skipEmitChange = false;\n  private typeAheadKeyBuffer = '';\n  private typeAheadKeyEvent = new Subject<string>();\n  private subscriptions: Subscription[] = [];\n\n  @ViewChild('contentContainer', { read: ElementRef, static: true }) private contentContainer: ElementRef<HTMLElement>;\n\n  // @ContentChild would have been more succinct\n  // but it doesn't offer a way to query only an immediate child\n  @ContentChildren(ClrTreeNodeLink, { descendants: false }) private treeNodeLinkList: QueryList<ClrTreeNodeLink>;\n\n  constructor(\n    @Inject(PLATFORM_ID) private platformId: any,\n    @Optional()\n    @SkipSelf()\n    parent: ClrTreeNode<T>,\n    public featuresService: TreeFeaturesService<T>,\n    public expandService: IfExpandService,\n    public commonStrings: ClrCommonStringsService,\n    private focusManager: TreeFocusManagerService<T>,\n    private elementRef: ElementRef<HTMLElement>,\n    injector: Injector\n  ) {\n    if (featuresService.recursion) {\n      // I'm completely stuck, we have to hack into private properties until either\n      // https://github.com/angular/angular/issues/14935 or https://github.com/angular/angular/issues/15998\n      // are fixed\n      // This is for non-ivy implementations\n      if ((injector as any).view) {\n        this._model = (injector as any).view.context.clrModel;\n      } else {\n        // Ivy puts this on a specific index of a _lView property\n        this._model = (injector as any)._lView[LVIEW_CONTEXT_INDEX].clrModel;\n      }\n    } else {\n      // Force cast for now, not sure how to tie the correct type here to featuresService.recursion\n      this._model = new DeclarativeTreeNodeModel(parent ? (parent._model as DeclarativeTreeNodeModel<T>) : null);\n    }\n    this._model.nodeId = this.nodeId;\n  }\n\n  @Input('clrDisabled')\n  get disabled(): boolean {\n    return this._model.disabled;\n  }\n  set disabled(value: boolean) {\n    this._model.disabled = value;\n  }\n\n  @Input('clrSelected')\n  get selected(): ClrSelectedState | boolean {\n    return this._model.selected.value;\n  }\n  set selected(value: ClrSelectedState | boolean) {\n    this.featuresService.selectable = true;\n    // Gracefully handle falsy states like null or undefined because it's just easier than answering questions.\n    // This shouldn't happen with strict typing on the app's side, but it's not up to us.\n    if (value === null || typeof value === 'undefined') {\n      value = ClrSelectedState.UNSELECTED;\n    }\n    // We match booleans to the corresponding ClrSelectedState\n    if (typeof value === 'boolean') {\n      value = value ? ClrSelectedState.SELECTED : ClrSelectedState.UNSELECTED;\n    }\n    // We propagate only if the tree is in smart mode, and skip emitting the output when we set the input\n    // See https://github.com/vmware/clarity/issues/3073\n    this.skipEmitChange = true;\n    this._model.setSelected(value, this.featuresService.eager, this.featuresService.eager);\n    this.skipEmitChange = false;\n  }\n\n  // I'm caving on this, for tree nodes I think we can tolerate having a two-way binding on the component\n  // rather than enforce the clrIfExpanded structural directive for dynamic cases. Mostly because for the smart\n  // case, you can't use a structural directive, it would need to go on an ng-container.\n  @Input('clrExpanded')\n  get expanded(): boolean {\n    return this.expandService.expanded;\n  }\n  set expanded(value: boolean) {\n    this.expandService.expanded = value;\n  }\n\n  @Input('clrForTypeAhead')\n  set clrForTypeAhead(value: string) {\n    this._model.textContent = trimAndLowerCase(value || this.elementRef.nativeElement.textContent);\n  }\n\n  get ariaSelected(): boolean {\n    if (this.isSelectable()) {\n      return this._model.selected.value === ClrSelectedState.SELECTED;\n    } else if (this.treeNodeLink?.active) {\n      return true;\n    } else {\n      return null;\n    }\n  }\n\n  get treeNodeLink() {\n    return this.treeNodeLinkList && this.treeNodeLinkList.first;\n  }\n\n  private get isParent() {\n    return this._model.children && this._model.children.length > 0;\n  }\n\n  ngOnInit() {\n    this._model.expanded = this.expanded;\n    this._model.disabled = this.disabled;\n    this.subscriptions.push(\n      this._model.selected.pipe(filter(() => !this.skipEmitChange)).subscribe(value => {\n        this.selectedChange.emit(value);\n      })\n    );\n    this.subscriptions.push(\n      this.expandService.expandChange.subscribe(value => {\n        this.expandedChange.emit(value);\n        this._model.expanded = value;\n      })\n    );\n    this.subscriptions.push(\n      this.focusManager.focusRequest.subscribe(nodeId => {\n        if (this.nodeId === nodeId) {\n          this.focusTreeNode();\n        }\n      }),\n      this.focusManager.focusChange.subscribe(nodeId => {\n        this.checkTabIndex(nodeId);\n      })\n    );\n\n    this.subscriptions.push(\n      this._model.loading$.pipe(debounceTime(0)).subscribe(isLoading => (this.isModelLoading = isLoading))\n    );\n  }\n\n  ngAfterContentInit() {\n    this.subscriptions.push(\n      this.typeAheadKeyEvent.pipe(debounceTime(TREE_TYPE_AHEAD_TIMEOUT)).subscribe((bufferedKeys: string) => {\n        this.focusManager.focusNodeStartsWith(bufferedKeys, this._model);\n        // reset once bufferedKeys are used\n        this.typeAheadKeyBuffer = '';\n      })\n    );\n  }\n\n  ngAfterViewInit() {\n    if (!this._model.textContent) {\n      this._model.textContent = trimAndLowerCase(this.elementRef.nativeElement.textContent);\n    }\n  }\n\n  ngOnDestroy() {\n    this._model.destroy();\n    this.subscriptions.forEach(sub => sub.unsubscribe());\n  }\n\n  isExpandable() {\n    if (typeof this.expandable !== 'undefined') {\n      return this.expandable;\n    }\n    return !!this.expandService.expandable || this.isParent;\n  }\n\n  isSelectable() {\n    return this.featuresService.selectable;\n  }\n\n  focusTreeNode(): void {\n    const containerEl = this.contentContainer.nativeElement;\n    if (isPlatformBrowser(this.platformId) && document.activeElement !== containerEl) {\n      this.setTabIndex(0);\n      containerEl.focus();\n      containerEl.scrollIntoView({ block: 'nearest', inline: 'nearest' });\n    }\n  }\n\n  broadcastFocusOnContainer() {\n    this.focusManager.broadcastFocusedNode(this.nodeId);\n  }\n\n  onKeyDown(event: KeyboardEvent) {\n    // Two reasons to prevent default behavior:\n    // 1. to prevent scrolling on arrow keys\n    // 2. Assistive Technology focus differs from Keyboard focus behavior.\n    //    By default, pressing arrow key makes AT focus go into the nested content of the item.\n    preventArrowKeyScroll(event);\n\n    // https://www.w3.org/TR/wai-aria-practices-1.1/#keyboard-interaction-22\n    switch (event.key) {\n      case Keys.ArrowUp:\n        this.focusManager.focusNodeAbove(this._model);\n        break;\n      case Keys.ArrowDown:\n        this.focusManager.focusNodeBelow(this._model);\n        break;\n      case Keys.ArrowRight:\n        this.expandOrFocusFirstChild();\n        break;\n      case Keys.ArrowLeft:\n        this.collapseOrFocusParent();\n        break;\n      case Keys.Home:\n        event.preventDefault();\n        this.focusManager.focusFirstVisibleNode();\n        break;\n      case Keys.End:\n        event.preventDefault();\n        this.focusManager.focusLastVisibleNode();\n        break;\n      case Keys.Enter:\n        this.toggleExpandOrTriggerDefault();\n        break;\n      case Keys.Space:\n      case Keys.Spacebar:\n        // to prevent scrolling on space key in this specific case\n        event.preventDefault();\n        this.toggleExpandOrTriggerDefault();\n        break;\n      default:\n        if (this._model.textContent && isKeyEitherLetterOrNumber(event)) {\n          this.typeAheadKeyBuffer += event.key;\n          this.typeAheadKeyEvent.next(this.typeAheadKeyBuffer);\n          return;\n        }\n        break;\n    }\n\n    // if non-letter keys are pressed, do reset.\n    this.typeAheadKeyBuffer = '';\n  }\n\n  private setTabIndex(value: number) {\n    this.contentContainerTabindex = value;\n    this.contentContainer.nativeElement.setAttribute('tabindex', value.toString());\n  }\n\n  private checkTabIndex(nodeId: string): void {\n    if (isPlatformBrowser(this.platformId) && this.nodeId !== nodeId && this.contentContainerTabindex !== -1) {\n      this.setTabIndex(-1);\n    }\n  }\n\n  private toggleExpandOrTriggerDefault() {\n    if (this.disabled) {\n      return;\n    }\n\n    if (this.isExpandable() && !this.isSelectable()) {\n      this.expandService.expanded = !this.expanded;\n    } else {\n      this.triggerDefaultAction();\n    }\n  }\n\n  private expandOrFocusFirstChild() {\n    if (this.disabled) {\n      return;\n    }\n\n    if (this.expanded) {\n      // if the node is already expanded and has children, focus its very first child\n      if (this.isParent) {\n        this.focusManager.focusNodeBelow(this._model);\n      }\n    } else {\n      // we must check if the node is expandable, in order to set .expanded to true from false\n      // because we shouldn't set .expanded to true if it's not expandable node\n      if (this.isExpandable()) {\n        this.expandService.expanded = true;\n      }\n    }\n  }\n\n  private collapseOrFocusParent() {\n    if (this.disabled) {\n      return;\n    }\n\n    if (this.expanded) {\n      this.expandService.expanded = false;\n    } else {\n      this.focusManager.focusParent(this._model);\n    }\n  }\n\n  private triggerDefaultAction() {\n    if (this.treeNodeLink) {\n      this.treeNodeLink.activate();\n    } else {\n      if (this.isSelectable()) {\n        this._model.toggleSelection(this.featuresService.eager);\n      }\n    }\n  }\n}\n\nfunction trimAndLowerCase(value: string) {\n  return value.toLocaleLowerCase().trim();\n}\n","<!--\n  ~ Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\n  ~ The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\n  ~ This software is released under MIT license.\n  ~ The full license information can be found in LICENSE in the root directory of this project.\n  -->\n\n<div\n  #contentContainer\n  role=\"treeitem\"\n  class=\"clr-tree-node-content-container\"\n  tabindex=\"-1\"\n  [class.clr-form-control-disabled]=\"disabled\"\n  [attr.aria-disabled]=\"disabled\"\n  [attr.aria-expanded]=\"isExpandable() ? expanded : null\"\n  [attr.aria-selected]=\"ariaSelected\"\n  (keydown)=\"onKeyDown($event)\"\n  (focus)=\"broadcastFocusOnContainer()\"\n>\n  @if (isExpandable() && !isModelLoading && !expandService.loading) {\n  <button\n    aria-hidden=\"true\"\n    type=\"button\"\n    tabindex=\"-1\"\n    class=\"clr-treenode-caret\"\n    (click)=\"expandService.toggle();\"\n    (focus)=\"focusTreeNode()\"\n    [disabled]=\"disabled\"\n  >\n    <cds-icon\n      class=\"clr-treenode-caret-icon\"\n      shape=\"angle\"\n      [direction]=\"expandService.expanded ? 'down' : 'right'\"\n    ></cds-icon>\n  </button>\n  } @if (expandService.loading || isModelLoading) {\n  <div class=\"clr-treenode-spinner-container\">\n    <span class=\"clr-treenode-spinner spinner\"></span>\n  </div>\n  } @if (featuresService.selectable) {\n  <div class=\"clr-checkbox-wrapper clr-treenode-checkbox\">\n    <input\n      aria-hidden=\"true\"\n      type=\"checkbox\"\n      [id]=\"nodeId + '-check'\"\n      class=\"clr-checkbox\"\n      [disabled]=\"disabled\"\n      [checked]=\"_model.selected.value === STATES.SELECTED\"\n      [indeterminate]=\"_model.selected.value === STATES.INDETERMINATE\"\n      (change)=\"_model.toggleSelection(featuresService.eager)\"\n      (focus)=\"focusTreeNode()\"\n      tabindex=\"-1\"\n    />\n    <label [for]=\"nodeId + '-check'\" class=\"clr-control-label\">\n      <ng-container [ngTemplateOutlet]=\"treenodeContent\"></ng-container>\n    </label>\n  </div>\n  } @if (!featuresService.selectable) {\n  <div class=\"clr-treenode-content\" (mouseup)=\"focusTreeNode()\">\n    <ng-container [ngTemplateOutlet]=\"treenodeContent\"></ng-container>\n  </div>\n  }\n\n  <ng-template #treenodeContent>\n    <ng-content></ng-content>\n    @if (featuresService.selectable || ariaSelected) {\n    <div class=\"clr-sr-only\">\n      <span> {{ariaSelected ? commonStrings.keys.selectedTreeNode : commonStrings.keys.unselectedTreeNode}}</span>\n    </div>\n    }\n  </ng-template>\n</div>\n<div\n  class=\"clr-treenode-children\"\n  [@toggleChildrenAnim]=\"expandService.expanded ? 'expanded' : 'collapsed'\"\n  [attr.role]=\"isExpandable() && !featuresService.recursion ? 'group' : null\"\n>\n  <ng-content select=\"clr-tree-node\"></ng-content>\n  <ng-content select=\"[clrIfExpanded]\"></ng-content>\n  <clr-recursive-children [parent]=\"_model\"></clr-recursive-children>\n</div>\n","/*\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\n * This software is released under MIT license.\n * The full license information can be found in LICENSE in the root directory of this project.\n */\n\nimport {\n  AfterContentInit,\n  Component,\n  ContentChildren,\n  ElementRef,\n  Input,\n  NgZone,\n  OnDestroy,\n  QueryList,\n  Renderer2,\n} from '@angular/core';\nimport { fromEvent, Subscription } from 'rxjs';\n\nimport { TREE_FEATURES_PROVIDER, TreeFeaturesService } from './tree-features.service';\nimport { TreeFocusManagerService } from './tree-focus-manager.service';\nimport { ClrTreeNode } from './tree-node';\n\n@Component({\n  selector: 'clr-tree',\n  template: `\n    <ng-content></ng-content>\n    @if (featuresService.recursion) {\n      <clr-recursive-children [children]=\"featuresService.recursion.root\"></clr-recursive-children>\n    }\n  `,\n  providers: [TREE_FEATURES_PROVIDER, TreeFocusManagerService],\n  host: {\n    tabindex: '0',\n    '[attr.role]': '\"tree\"',\n  },\n  standalone: false,\n})\nexport class ClrTree<T> implements AfterContentInit, OnDestroy {\n  @ContentChildren(ClrTreeNode) private rootNodes: QueryList<ClrTreeNode<T>>;\n\n  private subscriptions: Subscription[] = [];\n  private _isMultiSelectable = false;\n\n  constructor(\n    public featuresService: TreeFeaturesService<T>,\n    private focusManagerService: TreeFocusManagerService<T>,\n    private renderer: Renderer2,\n    private el: ElementRef<HTMLElement>,\n    ngZone: NgZone\n  ) {\n    const subscription = ngZone.runOutsideAngular(() =>\n      fromEvent(el.nativeElement, 'focusin').subscribe((event: FocusEvent) => {\n        if (event.target === el.nativeElement) {\n          // After discussing with the team, I've made it so that when the tree receives focus, the first visible node will be focused.\n          // This will prevent from the page scrolling abruptly to the first selected node if it exist in a deeply nested tree.\n          focusManagerService.focusFirstVisibleNode();\n          // when the first child gets focus,\n          // tree should no longer have tabindex of 0.\n          renderer.removeAttribute(el.nativeElement, 'tabindex');\n        }\n      })\n    );\n\n    this.subscriptions.push(subscription);\n  }\n\n  @Input('clrLazy')\n  set lazy(value: boolean) {\n    this.featuresService.eager = !value;\n  }\n\n  get isMultiSelectable() {\n    return this._isMultiSelectable;\n  }\n\n  ngAfterContentInit() {\n    this.setRootNodes();\n    this.subscriptions.push(\n      this.rootNodes.changes.subscribe(() => {\n        this.setMultiSelectable();\n\n        this.setRootNodes();\n      })\n    );\n  }\n\n  ngOnDestroy() {\n    this.subscriptions.forEach(sub => sub.unsubscribe());\n  }\n\n  private setMultiSelectable() {\n    if (this.featuresService.selectable && this.rootNodes.length > 0) {\n      this._isMultiSelectable = true;\n      this.renderer.setAttribute(this.el.nativeElement, 'aria-multiselectable', 'true');\n    } else {\n      this._isMultiSelectable = false;\n      this.renderer.removeAttribute(this.el.nativeElement, 'aria-multiselectable');\n    }\n  }\n\n  private setRootNodes(): void {\n    // if node has no parent, it's a root node\n    // for recursive tree, this.rootNodes registers also nested children\n    // so we have to use filter to extract the ones that are truly root nodes\n    this.focusManagerService.rootNodeModels = this.rootNodes.map(node => node._model).filter(node => !node.parent);\n  }\n}\n","/*\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\n * This software is released under MIT license.\n * The full license information can be found in LICENSE in the root directory of this project.\n */\n\n// We need to make sure people can give us null or undefined children even if they run strict type checking.\nimport { Observable } from 'rxjs';\n\nexport type AsyncArray<T> =\n  | T[]\n  | null\n  | undefined\n  | Promise<T[] | null | undefined>\n  | Observable<T[] | null | undefined>;\n\nexport function isPromise<T>(o: AsyncArray<T>): o is Promise<T[]> {\n  // Shamelessly copied from every open-source project out there.\n  return o && typeof (o as any).then === 'function';\n}\n","/*\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\n * This software is released under MIT license.\n * The full license information can be found in LICENSE in the root directory of this project.\n */\n\nimport { isObservable, Subscription } from 'rxjs';\n\nimport { TreeFeaturesService } from '../tree-features.service';\nimport { AsyncArray, isPromise } from './async-array';\nimport { TreeNodeModel } from './tree-node.model';\n\n/*\n * A recursive model is built received from the app and traversed to create the corresponding components.\n * Recursive = Model dictates the tree node components\n */\nexport class RecursiveTreeNodeModel<T> extends TreeNodeModel<T> {\n  parent: RecursiveTreeNodeModel<T> | null;\n\n  private subscription: Subscription;\n  private childrenFetched = false;\n  private _children: RecursiveTreeNodeModel<T>[] = [];\n\n  constructor(\n    model: T,\n    parent: RecursiveTreeNodeModel<T> | null,\n    private getChildren: (node: T) => AsyncArray<T> | undefined,\n    private featuresService: TreeFeaturesService<T> | undefined\n  ) {\n    super();\n    this.model = model;\n    this.parent = parent;\n  }\n\n  get children(): RecursiveTreeNodeModel<T>[] {\n    this.fetchChildren();\n    return this._children;\n  }\n  set children(value: RecursiveTreeNodeModel<T>[]) {\n    this._children = value;\n  }\n\n  override destroy() {\n    if (this.subscription) {\n      this.subscription.unsubscribe();\n    }\n    super.destroy();\n  }\n\n  clearChildren() {\n    this._children.forEach(child => child.destroy());\n    delete this._children;\n    this.childrenFetched = false;\n  }\n\n  fetchChildren() {\n    if (this.childrenFetched) {\n      return;\n    }\n\n    const asyncChildren = this.getChildren(this.model);\n    if (isPromise(asyncChildren)) {\n      this.loading = true;\n      asyncChildren.then(raw => {\n        this._children = this.wrapChildren(raw);\n        this.loading = false;\n      });\n    } else if (isObservable(asyncChildren)) {\n      this.loading = true;\n      this.subscription = asyncChildren.subscribe(raw => {\n        this._children = this.wrapChildren(raw);\n        this.loading = false;\n      });\n    } else if (asyncChildren) {\n      // Synchronous case\n      this._children = this.wrapChildren(asyncChildren);\n    } else {\n      this._children = [];\n    }\n    this.childrenFetched = true;\n    if (this.featuresService) {\n      this.featuresService.childrenFetched.next();\n    }\n  }\n\n  private wrapChildren(rawModels: T[]) {\n    return rawModels.map(m => new RecursiveTreeNodeModel(m, this, this.getChildren, this.featuresService));\n  }\n}\n","/*\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\n * This software is released under MIT license.\n * The full license information can be found in LICENSE in the root directory of this project.\n */\n\nimport { ChangeDetectorRef, Directive, Input, OnChanges, OnDestroy, TemplateRef } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { debounceTime } from 'rxjs/operators';\n\nimport { AsyncArray } from './models/async-array';\nimport { RecursiveTreeNodeModel } from './models/recursive-tree-node.model';\nimport { TreeNodeModel } from './models/tree-node.model';\nimport { TreeFeaturesService } from './tree-features.service';\n\nexport interface ClrRecursiveForOfContext<T> {\n  $implicit: T;\n  clrModel: TreeNodeModel<T>;\n}\n\n@Directive({\n  selector: '[clrRecursiveFor][clrRecursiveForOf]',\n  standalone: false,\n})\nexport class ClrRecursiveForOf<T> implements OnChanges, OnDestroy {\n  // TODO: accept NgIterable<T>\n  @Input('clrRecursiveForOf') nodes: T | T[];\n\n  // TODO: accept NgIterable<T> return type\n  @Input('clrRecursiveForGetChildren') getChildren: (node: T) => AsyncArray<T>;\n\n  private childrenFetchSubscription: Subscription;\n\n  constructor(\n    private template: TemplateRef<ClrRecursiveForOfContext<T>>,\n    private featuresService: TreeFeaturesService<T>,\n    private cdr: ChangeDetectorRef\n  ) {}\n\n  // I'm using OnChanges instead of OnInit to easily keep up to date with dynamic trees. Maybe optimizable later.\n  ngOnChanges() {\n    let wrapped: RecursiveTreeNodeModel<T>[];\n    if (Array.isArray(this.nodes)) {\n      wrapped = this.nodes.map(node => new RecursiveTreeNodeModel(node, null, this.getChildren, this.featuresService));\n    } else {\n      wrapped = [new RecursiveTreeNodeModel(this.nodes, null, this.getChildren, this.featuresService)];\n    }\n    if (!this.childrenFetchSubscription) {\n      this.childrenFetchSubscription = this.featuresService.childrenFetched.pipe(debounceTime(0)).subscribe(() => {\n        this.cdr.detectChanges();\n      });\n    }\n\n    this.featuresService.recursion = {\n      template: this.template,\n      root: wrapped,\n    };\n  }\n\n  ngOnDestroy() {\n    if (this.childrenFetchSubscription) {\n      this.childrenFetchSubscription.unsubscribe();\n    }\n  }\n}\n","/*\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\n * This software is released under MIT license.\n * The full license information can be found in LICENSE in the root directory of this project.\n */\n\nimport { CommonModule } from '@angular/common';\nimport { NgModule, Type } from '@angular/core';\nimport { angleIcon, ClarityIcons, ClrIcon } from '@clr/angular/icon';\nimport { ClrLoadingModule } from '@clr/angular/utils';\n\nimport { RecursiveChildren } from './recursive-children';\nimport { ClrRecursiveForOf } from './recursive-for-of';\nimport { ClrTree } from './tree';\nimport { ClrTreeNode } from './tree-node';\nimport { ClrTreeNodeLink } from './tree-node-link';\n\nexport const CLR_TREE_VIEW_DIRECTIVES: Type<any>[] = [ClrTree, ClrTreeNode, ClrRecursiveForOf, ClrTreeNodeLink];\n\n@NgModule({\n  imports: [CommonModule, ClrIcon, ClrLoadingModule],\n  declarations: [CLR_TREE_VIEW_DIRECTIVES, RecursiveChildren],\n  exports: [CLR_TREE_VIEW_DIRECTIVES],\n})\nexport class ClrTreeViewModule {\n  constructor() {\n    ClarityIcons.addIcons(angleIcon);\n  }\n}\n","/*\n * Copyright (c) 2016-2026 Broadcom. All Rights Reserved.\n * The term \"Broadcom\" refers to Broadcom Inc. and/or its subsidiaries.\n * This software is released under MIT license.\n * The full license information can be found in LICENSE in the root directory of this project.\n */\n\nexport * from './models/selected-state.enum';\nexport * from './tree';\nexport * from './tree-node';\nexport * from './recursive-for-of';\nexport * from './tree-view.module';\nexport * from './tree-node-link';\nexport * from './models/tree-node.model';\nexport * from './models/declarative-tree-node.model';\nexport * from './models/recursive-tree-node.model';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.TreeFeaturesService","i3.TreeFocusManagerService","i4","i6.RecursiveChildren","i2.TreeFocusManagerService","i3.RecursiveChildren"],"mappings":";;;;;;;;;;;;AAAA;;;;;AAKG;AAEH;IACY;AAAZ,CAAA,UAAY,gBAAgB,EAAA;;;;AAI1B,IAAA,gBAAA,CAAA,gBAAA,CAAA,YAAA,CAAA,GAAA,C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