<commit_before>import {
  Component,
  HostBinding,
  ChangeDetectorRef,
  ChangeDetectionStrategy,
  OnDestroy,
  Input
} from '@angular/core';

// TODO(josephperrott): Benchpress tests.

/** A single degree in radians. */
const DEGREE_IN_RADIANS = Math.PI / 180;
/** Duration of the indeterminate animation. */
const DURATION_INDETERMINATE = 667;
/** Duration of the indeterminate animation. */
const DURATION_DETERMINATE = 225;
/** Start animation value of the indeterminate animation */
const startIndeterminate = 3;
/** End animation value of the indeterminate animation */
const endIndeterminate = 80;


export type ProgressCircleMode = 'determinate' | 'indeterminate';

type EasingFn = (currentTime: number, startValue: number,
                 changeInValue: number, duration: number) => number


/**
 * <md-progress-circle> component.
 */
@Component({
  moduleId: module.id,
  selector: 'md-progress-circle',
  host: {
    'role': 'progressbar',
    '[attr.aria-valuemin]': '_ariaValueMin',
    '[attr.aria-valuemax]': '_ariaValueMax',
  },
  templateUrl: 'progress-circle.html',
  styleUrls: ['progress-circle.css'],
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class MdProgressCircle implements OnDestroy {
  /** The id of the last requested animation. */
  private _lastAnimationId: number = 0;

  /** The id of the indeterminate interval. */
  private _interdeterminateInterval: number;

  /**
   * Values for aria max and min are only defined as numbers when in a determinate mode.  We do this
   * because voiceover does not report the progress indicator as indeterminate if the aria min
   * and/or max value are number values.
   */
  get _ariaValueMin() {
    return this.mode == 'determinate' ? 0 : null;
  }

  get _ariaValueMax() {
    return this.mode == 'determinate' ? 100 : null;
  }

  /** TODO: internal */
  get interdeterminateInterval() {
    return this._interdeterminateInterval;
  }
  /** TODO: internal */
  set interdeterminateInterval(interval: number) {
    clearInterval(this._interdeterminateInterval);
    this._interdeterminateInterval = interval;
  }

  /** The current path value, representing the progres circle. */
  private _currentPath: string;

  /** TODO: internal */
  get currentPath() {
    return this._currentPath;
  }
  set currentPath(path: string) {
    this._currentPath = path;
    // Mark for check as our ChangeDetectionStrategy is OnPush, when changes come from within the
    // component, change detection must be called for.
    this._changeDetectorRef.markForCheck();
  }

  /** Clean up any animations that were running. */<commit_msg>docs: fix typo (#917)<commit_after>import {
  Component,
  HostBinding,
  ChangeDetectorRef,
  ChangeDetectionStrategy,
  OnDestroy,
  Input
} from '@angular/core';

// TODO(josephperrott): Benchpress tests.

/** A single degree in radians. */
const DEGREE_IN_RADIANS = Math.PI / 180;
/** Duration of the indeterminate animation. */
const DURATION_INDETERMINATE = 667;
/** Duration of the indeterminate animation. */
const DURATION_DETERMINATE = 225;
/** Start animation value of the indeterminate animation */
const startIndeterminate = 3;
/** End animation value of the indeterminate animation */
const endIndeterminate = 80;


export type ProgressCircleMode = 'determinate' | 'indeterminate';

type EasingFn = (currentTime: number, startValue: number,
                 changeInValue: number, duration: number) => number


/**
 * <md-progress-circle> component.
 */
@Component({
  moduleId: module.id,
  selector: 'md-progress-circle',
  host: {
    'role': 'progressbar',
    '[attr.aria-valuemin]': '_ariaValueMin',
    '[attr.aria-valuemax]': '_ariaValueMax',
  },
  templateUrl: 'progress-circle.html',
  styleUrls: ['progress-circle.css'],
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class MdProgressCircle implements OnDestroy {
  /** The id of the last requested animation. */
  private _lastAnimationId: number = 0;

  /** The id of the indeterminate interval. */
  private _interdeterminateInterval: number;

  /**
   * Values for aria max and min are only defined as numbers when in a determinate mode.  We do this
   * because voiceover does not report the progress indicator as indeterminate if the aria min
   * and/or max value are number values.
   */
  get _ariaValueMin() {
    return this.mode == 'determinate' ? 0 : null;
  }

  get _ariaValueMax() {
    return this.mode == 'determinate' ? 100 : null;
  }

  /** TODO: internal */
  get interdeterminateInterval() {
    return this._interdeterminateInterval;
  }
  /** TODO: internal */
  set interdeterminateInterval(interval: number) {
    clearInterval(this._interdeterminateInterval);
    this._interdeterminateInterval = interval;
  }

  /** The current path value, representing the progress circle. */
  private _currentPath: string;

  /** TODO: internal */
  get currentPath() {
    return this._currentPath;
  }
  set currentPath(path: string) {
    this._currentPath = path;
    // Mark for check as our ChangeDetectionStrategy is OnPush, when changes come from within the
    // component, change detection must be called for.
    this._changeDetectorRef.markForCheck();
  }

  /** Clean up any animations that were running. */
{'fraction_non_alphanumeric': 0.10829361296472831, 'fraction_numerical': 0.007054337464251668, 'mean_word_length': 3.7518115942028984, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3625375', 'n_tokens_mistral': 1620, 'n_tokens_neox': 1504, 'n_words': 475}