{"version":3,"file":"forms.umd.min.js","sources":["../../../../packages/forms/src/form_providers.ts","../../../../packages/forms/src/directives.ts","../../../../packages/forms/src/directives/ng_no_validate_directive.ts","../../../../packages/forms/src/form_builder.ts","../../../../packages/forms/src/directives/validators.ts","../../../../packages/forms/src/directives/reactive_directives/form_control_name.ts","../../../../packages/forms/src/directives/reactive_directives/form_group_name.ts","../../../../packages/forms/src/directives/reactive_directives/form_group_directive.ts","../../../../packages/forms/src/directives/reactive_errors.ts","../../../../packages/forms/src/directives/reactive_directives/form_control_directive.ts","../../../../packages/forms/src/directives/ng_model.ts","../../../../packages/forms/src/directives/error_examples.ts","../../../../packages/forms/src/directives/template_driven_errors.ts","../../../../packages/forms/src/directives/ng_model_group.ts","../../../../packages/forms/src/model.ts","../../../../packages/forms/src/directives/ng_form.ts","../../../../packages/forms/src/directives/select_multiple_control_value_accessor.ts","../../../../packages/forms/src/directives/shared.ts","../../../../packages/forms/src/directives/abstract_form_group_directive.ts","../../../../packages/forms/src/directives/ng_control_status.ts","../../../../packages/forms/src/directives/select_control_value_accessor.ts","../../../../packages/forms/src/directives/range_value_accessor.ts","../../../../packages/forms/src/directives/number_value_accessor.ts","../../../../packages/forms/src/directives/ng_control.ts","../../../../packages/forms/src/directives/radio_control_value_accessor.ts","../../../../packages/forms/src/directives/default_value_accessor.ts","../../../../node_modules/tslib/tslib.es6.js","../../../../packages/forms/src/directives/control_container.ts","../../../../packages/forms/src/validators.ts","../../../../packages/forms/src/directives/checkbox_value_accessor.ts","../../../../packages/forms/src/directives/normalize_validator.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {NgModule} from '@angular/core';\n\nimport {InternalFormsSharedModule, REACTIVE_DRIVEN_DIRECTIVES, TEMPLATE_DRIVEN_DIRECTIVES} from './directives';\nimport {RadioControlRegistry} from './directives/radio_control_value_accessor';\nimport {FormBuilder} from './form_builder';\n/**\n * The ng module for forms.\n * \\@stable\n */\nexport class FormsModule {\nstatic decorators: DecoratorInvocation[] = [\n{ type: NgModule, args: [{\n declarations: TEMPLATE_DRIVEN_DIRECTIVES,\n providers: [RadioControlRegistry],\n exports: [InternalFormsSharedModule, TEMPLATE_DRIVEN_DIRECTIVES]\n}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\nfunction FormsModule_tsickle_Closure_declarations() {\n/** @type {?} */\nFormsModule.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nFormsModule.ctorParameters;\n}\n\n/**\n * The ng module for reactive forms.\n * \\@stable\n */\nexport class ReactiveFormsModule {\nstatic decorators: DecoratorInvocation[] = [\n{ type: NgModule, args: [{\n declarations: [REACTIVE_DRIVEN_DIRECTIVES],\n providers: [FormBuilder, RadioControlRegistry],\n exports: [InternalFormsSharedModule, REACTIVE_DRIVEN_DIRECTIVES]\n}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\nfunction ReactiveFormsModule_tsickle_Closure_declarations() {\n/** @type {?} */\nReactiveFormsModule.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nReactiveFormsModule.ctorParameters;\n}\n\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {NgModule, Type} from '@angular/core';\n\nimport {CheckboxControlValueAccessor} from './directives/checkbox_value_accessor';\nimport {DefaultValueAccessor} from './directives/default_value_accessor';\nimport {NgControlStatus, NgControlStatusGroup} from './directives/ng_control_status';\nimport {NgForm} from './directives/ng_form';\nimport {NgModel} from './directives/ng_model';\nimport {NgModelGroup} from './directives/ng_model_group';\nimport {NgNoValidate} from './directives/ng_no_validate_directive';\nimport {NumberValueAccessor} from './directives/number_value_accessor';\nimport {RadioControlValueAccessor} from './directives/radio_control_value_accessor';\nimport {RangeValueAccessor} from './directives/range_value_accessor';\nimport {FormControlDirective} from './directives/reactive_directives/form_control_directive';\nimport {FormControlName} from './directives/reactive_directives/form_control_name';\nimport {FormGroupDirective} from './directives/reactive_directives/form_group_directive';\nimport {FormArrayName, FormGroupName} from './directives/reactive_directives/form_group_name';\nimport {NgSelectOption, SelectControlValueAccessor} from './directives/select_control_value_accessor';\nimport {NgSelectMultipleOption, SelectMultipleControlValueAccessor} from './directives/select_multiple_control_value_accessor';\nimport {CheckboxRequiredValidator, EmailValidator, MaxLengthValidator, MinLengthValidator, PatternValidator, RequiredValidator} from './directives/validators';\n\nexport {CheckboxControlValueAccessor} from './directives/checkbox_value_accessor';\nexport {ControlValueAccessor} from './directives/control_value_accessor';\nexport {DefaultValueAccessor} from './directives/default_value_accessor';\nexport {NgControl} from './directives/ng_control';\nexport {NgControlStatus, NgControlStatusGroup} from './directives/ng_control_status';\nexport {NgForm} from './directives/ng_form';\nexport {NgModel} from './directives/ng_model';\nexport {NgModelGroup} from './directives/ng_model_group';\nexport {NumberValueAccessor} from './directives/number_value_accessor';\nexport {RadioControlValueAccessor} from './directives/radio_control_value_accessor';\nexport {RangeValueAccessor} from './directives/range_value_accessor';\nexport {FormControlDirective} from './directives/reactive_directives/form_control_directive';\nexport {FormControlName} from './directives/reactive_directives/form_control_name';\nexport {FormGroupDirective} from './directives/reactive_directives/form_group_directive';\nexport {FormArrayName, FormGroupName} from './directives/reactive_directives/form_group_name';\nexport {NgSelectOption, SelectControlValueAccessor} from './directives/select_control_value_accessor';\nexport {NgSelectMultipleOption, SelectMultipleControlValueAccessor} from './directives/select_multiple_control_value_accessor';\n\nexport const /** @type {?} */ SHARED_FORM_DIRECTIVES: Type[] = [\n NgNoValidate,\n NgSelectOption,\n NgSelectMultipleOption,\n DefaultValueAccessor,\n NumberValueAccessor,\n RangeValueAccessor,\n CheckboxControlValueAccessor,\n SelectControlValueAccessor,\n SelectMultipleControlValueAccessor,\n RadioControlValueAccessor,\n NgControlStatus,\n NgControlStatusGroup,\n RequiredValidator,\n MinLengthValidator,\n MaxLengthValidator,\n PatternValidator,\n CheckboxRequiredValidator,\n EmailValidator,\n];\n\nexport const /** @type {?} */ TEMPLATE_DRIVEN_DIRECTIVES: Type[] = [NgModel, NgModelGroup, NgForm];\n\nexport const /** @type {?} */ REACTIVE_DRIVEN_DIRECTIVES: Type[] =\n [FormControlDirective, FormGroupDirective, FormControlName, FormGroupName, FormArrayName];\n/**\n * Internal module used for sharing directives between FormsModule and ReactiveFormsModule\n */\nexport class InternalFormsSharedModule {\nstatic decorators: DecoratorInvocation[] = [\n{ type: NgModule, args: [{\n declarations: SHARED_FORM_DIRECTIVES,\n exports: SHARED_FORM_DIRECTIVES,\n}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\nfunction InternalFormsSharedModule_tsickle_Closure_declarations() {\n/** @type {?} */\nInternalFormsSharedModule.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nInternalFormsSharedModule.ctorParameters;\n}\n\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {Directive} from '@angular/core';\n/**\n * \\@whatItDoes Adds `novalidate` attribute to all forms by default.\n * \n * `novalidate` is used to disable browser's native form validation.\n * \n * If you want to use native validation with Angular forms, just add `ngNativeValidate` attribute:\n * \n * ```\n *
\n * ```\n * \n * \\@experimental\n */\nexport class NgNoValidate {\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{\n selector: 'form:not([ngNoForm]):not([ngNativeValidate])',\n host: {'novalidate': ''},\n}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\nfunction NgNoValidate_tsickle_Closure_declarations() {\n/** @type {?} */\nNgNoValidate.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nNgNoValidate.ctorParameters;\n}\n\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {Injectable} from '@angular/core';\n\nimport {AsyncValidatorFn, ValidatorFn} from './directives/validators';\nimport {AbstractControl, FormArray, FormControl, FormGroup} from './model';\n/**\n * \\@whatItDoes Creates an {\\@link AbstractControl} from a user-specified configuration.\n * \n * It is essentially syntactic sugar that shortens the `new FormGroup()`,\n * `new FormControl()`, and `new FormArray()` boilerplate that can build up in larger\n * forms.\n * \n * \\@howToUse \n * \n * To use, inject `FormBuilder` into your component class. You can then call its methods\n * directly.\n * \n * {\\@example forms/ts/formBuilder/form_builder_example.ts region='Component'}\n * \n * * **npm package**: `\\@angular/forms`\n * \n * * **NgModule**: {\\@link ReactiveFormsModule}\n * \n * \\@stable\n */\nexport class FormBuilder {\n/**\n * Construct a new {\\@link FormGroup} with the given map of configuration.\n * Valid keys for the `extra` parameter map are `validator` and `asyncValidator`.\n * \n * See the {\\@link FormGroup} constructor for more details.\n * @param {?} controlsConfig\n * @param {?=} extra\n * @return {?}\n */\ngroup(controlsConfig: {[key: string]: any}, extra: {[key: string]: any}|null = null): FormGroup {\n const /** @type {?} */ controls = this._reduceControls(controlsConfig);\n const /** @type {?} */ validator: ValidatorFn = extra != null ? extra['validator'] : null;\n const /** @type {?} */ asyncValidator: AsyncValidatorFn = extra != null ? extra['asyncValidator'] : null;\n return new FormGroup(controls, validator, asyncValidator);\n }\n/**\n * Construct a new {\\@link FormControl} with the given `formState`,`validator`, and\n * `asyncValidator`.\n * \n * `formState` can either be a standalone value for the form control or an object\n * that contains both a value and a disabled status.\n * \n * @param {?} formState\n * @param {?=} validator\n * @param {?=} asyncValidator\n * @return {?}\n */\ncontrol(\n formState: Object, validator?: ValidatorFn|ValidatorFn[]|null,\n asyncValidator?: AsyncValidatorFn|AsyncValidatorFn[]|null): FormControl {\n return new FormControl(formState, validator, asyncValidator);\n }\n/**\n * Construct a {\\@link FormArray} from the given `controlsConfig` array of\n * configuration, with the given optional `validator` and `asyncValidator`.\n * @param {?} controlsConfig\n * @param {?=} validator\n * @param {?=} asyncValidator\n * @return {?}\n */\narray(\n controlsConfig: any[], validator?: ValidatorFn|null,\n asyncValidator?: AsyncValidatorFn|null): FormArray {\n const /** @type {?} */ controls = controlsConfig.map(c => this._createControl(c));\n return new FormArray(controls, validator, asyncValidator);\n }\n/**\n * \\@internal\n * @param {?} controlsConfig\n * @return {?}\n */\n_reduceControls(controlsConfig: {[k: string]: any}): {[key: string]: AbstractControl} {\n const /** @type {?} */ controls: {[key: string]: AbstractControl} = {};\n Object.keys(controlsConfig).forEach(controlName => {\n controls[controlName] = this._createControl(controlsConfig[controlName]);\n });\n return controls;\n }\n/**\n * \\@internal\n * @param {?} controlConfig\n * @return {?}\n */\n_createControl(controlConfig: any): AbstractControl {\n if (controlConfig instanceof FormControl || controlConfig instanceof FormGroup ||\n controlConfig instanceof FormArray) {\n return controlConfig;\n\n } else if (Array.isArray(controlConfig)) {\n const /** @type {?} */ value = controlConfig[0];\n const /** @type {?} */ validator: ValidatorFn = controlConfig.length > 1 ? controlConfig[1] : null;\n const /** @type {?} */ asyncValidator: AsyncValidatorFn = controlConfig.length > 2 ? controlConfig[2] : null;\n return this.control(value, validator, asyncValidator);\n\n } else {\n return this.control(controlConfig);\n }\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\nfunction FormBuilder_tsickle_Closure_declarations() {\n/** @type {?} */\nFormBuilder.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nFormBuilder.ctorParameters;\n}\n\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {Directive, Input, OnChanges, Provider, SimpleChanges, forwardRef} from '@angular/core';\nimport {Observable} from 'rxjs/Observable';\nimport {AbstractControl} from '../model';\nimport {NG_VALIDATORS, Validators} from '../validators';\n\n/** @experimental */\nexport type ValidationErrors = {\n [key: string]: any\n};\n\n/**\n * An interface that can be implemented by classes that can act as validators.\n *\n * ## Usage\n *\n * ```typescript\n * @Directive({\n * selector: '[custom-validator]',\n * providers: [{provide: NG_VALIDATORS, useExisting: CustomValidatorDirective, multi: true}]\n * })\n * class CustomValidatorDirective implements Validator {\n * validate(c: Control): {[key: string]: any} {\n * return {\"custom\": true};\n * }\n * }\n * ```\n *\n * @stable\n */\nexport interface Validator {\n validate(c: AbstractControl): ValidationErrors|null;\n registerOnValidatorChange?(fn: () => void): void;\n}\n\n/** @experimental */\nexport interface AsyncValidator extends Validator {\n validate(c: AbstractControl): Promise|Observable;\n}\n\nexport const /** @type {?} */ REQUIRED_VALIDATOR: Provider = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => RequiredValidator),\n multi: true\n};\n\nexport const /** @type {?} */ CHECKBOX_REQUIRED_VALIDATOR: Provider = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => CheckboxRequiredValidator),\n multi: true\n};\n/**\n * A Directive that adds the `required` validator to any controls marked with the\n * `required` attribute, via the {\\@link NG_VALIDATORS} binding.\n * \n * ### Example\n * \n * ```\n * \n * ```\n * \n * \\@stable\n */\nexport class RequiredValidator implements Validator {\nprivate _required: boolean;\nprivate _onChange: () => void;\n/**\n * @return {?}\n */\nget required(): boolean|string { return this._required; }\n/**\n * @param {?} value\n * @return {?}\n */\nset required(value: boolean|string) {\n this._required = value != null && value !== false && `${value}` !== 'false';\n if (this._onChange) this._onChange();\n }\n/**\n * @param {?} c\n * @return {?}\n */\nvalidate(c: AbstractControl): ValidationErrors|null {\n return this.required ? Validators.required(c) : null;\n }\n/**\n * @param {?} fn\n * @return {?}\n */\nregisterOnValidatorChange(fn: () => void): void { this._onChange = fn; }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{\n selector:\n ':not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]',\n providers: [REQUIRED_VALIDATOR],\n host: {'[attr.required]': 'required ? \"\" : null'}\n}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\nstatic propDecorators: {[key: string]: DecoratorInvocation[]} = {\n'required': [{ type: Input },],\n};\n}\n\nfunction RequiredValidator_tsickle_Closure_declarations() {\n/** @type {?} */\nRequiredValidator.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nRequiredValidator.ctorParameters;\n/** @type {?} */\nRequiredValidator.propDecorators;\n/** @type {?} */\nRequiredValidator.prototype._required;\n/** @type {?} */\nRequiredValidator.prototype._onChange;\n}\n\n/**\n * A Directive that adds the `required` validator to checkbox controls marked with the\n * `required` attribute, via the {\\@link NG_VALIDATORS} binding.\n * \n * ### Example\n * \n * ```\n * \n * ```\n * \n * \\@experimental\n */\nexport class CheckboxRequiredValidator extends RequiredValidator {\n/**\n * @param {?} c\n * @return {?}\n */\nvalidate(c: AbstractControl): ValidationErrors|null {\n return this.required ? Validators.requiredTrue(c) : null;\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{\n selector:\n 'input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]',\n providers: [CHECKBOX_REQUIRED_VALIDATOR],\n host: {'[attr.required]': 'required ? \"\" : null'}\n}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\nfunction CheckboxRequiredValidator_tsickle_Closure_declarations() {\n/** @type {?} */\nCheckboxRequiredValidator.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nCheckboxRequiredValidator.ctorParameters;\n}\n\n/**\n * Provider which adds {\\@link EmailValidator} to {\\@link NG_VALIDATORS}.\n */\nexport const EMAIL_VALIDATOR: any = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => EmailValidator),\n multi: true\n};\n/**\n * A Directive that adds the `email` validator to controls marked with the\n * `email` attribute, via the {\\@link NG_VALIDATORS} binding.\n * \n * ### Example\n * \n * ```\n * \n * \n * \n * ```\n * \n * \\@experimental\n */\nexport class EmailValidator implements Validator {\nprivate _enabled: boolean;\nprivate _onChange: () => void;\n/**\n * @param {?} value\n * @return {?}\n */\nset email(value: boolean|string) {\n this._enabled = value === '' || value === true || value === 'true';\n if (this._onChange) this._onChange();\n }\n/**\n * @param {?} c\n * @return {?}\n */\nvalidate(c: AbstractControl): ValidationErrors|null {\n return this._enabled ? Validators.email(c) : null;\n }\n/**\n * @param {?} fn\n * @return {?}\n */\nregisterOnValidatorChange(fn: () => void): void { this._onChange = fn; }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{\n selector: '[email][formControlName],[email][formControl],[email][ngModel]',\n providers: [EMAIL_VALIDATOR]\n}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\nstatic propDecorators: {[key: string]: DecoratorInvocation[]} = {\n'email': [{ type: Input },],\n};\n}\n\nfunction EmailValidator_tsickle_Closure_declarations() {\n/** @type {?} */\nEmailValidator.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nEmailValidator.ctorParameters;\n/** @type {?} */\nEmailValidator.propDecorators;\n/** @type {?} */\nEmailValidator.prototype._enabled;\n/** @type {?} */\nEmailValidator.prototype._onChange;\n}\n\n\n/**\n * @stable\n */\nexport interface ValidatorFn { (c: AbstractControl): ValidationErrors|null; }\n\n/**\n * @stable\n */\nexport interface AsyncValidatorFn {\n (c: AbstractControl): Promise|Observable;\n}\n/**\n * Provider which adds {\\@link MinLengthValidator} to {\\@link NG_VALIDATORS}.\n * \n * ## Example:\n * \n * {\\@example common/forms/ts/validators/validators.ts region='min'}\n */\nexport const MIN_LENGTH_VALIDATOR: any = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MinLengthValidator),\n multi: true\n};\n/**\n * A directive which installs the {\\@link MinLengthValidator} for any `formControlName`,\n * `formControl`, or control with `ngModel` that also has a `minlength` attribute.\n * \n * \\@stable\n */\nexport class MinLengthValidator implements Validator,\n OnChanges {\nprivate _validator: ValidatorFn;\nprivate _onChange: () => void;\n\n minlength: string;\n/**\n * @param {?} changes\n * @return {?}\n */\nngOnChanges(changes: SimpleChanges): void {\n if ('minlength' in changes) {\n this._createValidator();\n if (this._onChange) this._onChange();\n }\n }\n/**\n * @param {?} c\n * @return {?}\n */\nvalidate(c: AbstractControl): ValidationErrors|null {\n return this.minlength == null ? null : this._validator(c);\n }\n/**\n * @param {?} fn\n * @return {?}\n */\nregisterOnValidatorChange(fn: () => void): void { this._onChange = fn; }\n/**\n * @return {?}\n */\nprivate _createValidator(): void {\n this._validator = Validators.minLength(parseInt(this.minlength, 10));\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{\n selector: '[minlength][formControlName],[minlength][formControl],[minlength][ngModel]',\n providers: [MIN_LENGTH_VALIDATOR],\n host: {'[attr.minlength]': 'minlength ? minlength : null'}\n}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\nstatic propDecorators: {[key: string]: DecoratorInvocation[]} = {\n'minlength': [{ type: Input },],\n};\n}\n\nfunction MinLengthValidator_tsickle_Closure_declarations() {\n/** @type {?} */\nMinLengthValidator.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nMinLengthValidator.ctorParameters;\n/** @type {?} */\nMinLengthValidator.propDecorators;\n/** @type {?} */\nMinLengthValidator.prototype._validator;\n/** @type {?} */\nMinLengthValidator.prototype._onChange;\n/** @type {?} */\nMinLengthValidator.prototype.minlength;\n}\n\n/**\n * Provider which adds {\\@link MaxLengthValidator} to {\\@link NG_VALIDATORS}.\n * \n * ## Example:\n * \n * {\\@example common/forms/ts/validators/validators.ts region='max'}\n */\nexport const MAX_LENGTH_VALIDATOR: any = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MaxLengthValidator),\n multi: true\n};\n/**\n * A directive which installs the {\\@link MaxLengthValidator} for any `formControlName,\n * `formControl`,\n * or control with `ngModel` that also has a `maxlength` attribute.\n * \n * \\@stable\n */\nexport class MaxLengthValidator implements Validator,\n OnChanges {\nprivate _validator: ValidatorFn;\nprivate _onChange: () => void;\n\n maxlength: string;\n/**\n * @param {?} changes\n * @return {?}\n */\nngOnChanges(changes: SimpleChanges): void {\n if ('maxlength' in changes) {\n this._createValidator();\n if (this._onChange) this._onChange();\n }\n }\n/**\n * @param {?} c\n * @return {?}\n */\nvalidate(c: AbstractControl): ValidationErrors|null {\n return this.maxlength != null ? this._validator(c) : null;\n }\n/**\n * @param {?} fn\n * @return {?}\n */\nregisterOnValidatorChange(fn: () => void): void { this._onChange = fn; }\n/**\n * @return {?}\n */\nprivate _createValidator(): void {\n this._validator = Validators.maxLength(parseInt(this.maxlength, 10));\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{\n selector: '[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]',\n providers: [MAX_LENGTH_VALIDATOR],\n host: {'[attr.maxlength]': 'maxlength ? maxlength : null'}\n}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\nstatic propDecorators: {[key: string]: DecoratorInvocation[]} = {\n'maxlength': [{ type: Input },],\n};\n}\n\nfunction MaxLengthValidator_tsickle_Closure_declarations() {\n/** @type {?} */\nMaxLengthValidator.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nMaxLengthValidator.ctorParameters;\n/** @type {?} */\nMaxLengthValidator.propDecorators;\n/** @type {?} */\nMaxLengthValidator.prototype._validator;\n/** @type {?} */\nMaxLengthValidator.prototype._onChange;\n/** @type {?} */\nMaxLengthValidator.prototype.maxlength;\n}\n\n\n\nexport const /** @type {?} */ PATTERN_VALIDATOR: any = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => PatternValidator),\n multi: true\n};\n/**\n * A Directive that adds the `pattern` validator to any controls marked with the\n * `pattern` attribute, via the {\\@link NG_VALIDATORS} binding. Uses attribute value\n * as the regex to validate Control value against. Follows pattern attribute\n * semantics; i.e. regex must match entire Control value.\n * \n * ### Example\n * \n * ```\n * \n * ```\n * \\@stable\n */\nexport class PatternValidator implements Validator,\n OnChanges {\nprivate _validator: ValidatorFn;\nprivate _onChange: () => void;\n\n pattern: string|RegExp;\n/**\n * @param {?} changes\n * @return {?}\n */\nngOnChanges(changes: SimpleChanges): void {\n if ('pattern' in changes) {\n this._createValidator();\n if (this._onChange) this._onChange();\n }\n }\n/**\n * @param {?} c\n * @return {?}\n */\nvalidate(c: AbstractControl): ValidationErrors|null { return this._validator(c); }\n/**\n * @param {?} fn\n * @return {?}\n */\nregisterOnValidatorChange(fn: () => void): void { this._onChange = fn; }\n/**\n * @return {?}\n */\nprivate _createValidator(): void { this._validator = Validators.pattern(this.pattern); }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{\n selector: '[pattern][formControlName],[pattern][formControl],[pattern][ngModel]',\n providers: [PATTERN_VALIDATOR],\n host: {'[attr.pattern]': 'pattern ? pattern : null'}\n}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\nstatic propDecorators: {[key: string]: DecoratorInvocation[]} = {\n'pattern': [{ type: Input },],\n};\n}\n\nfunction PatternValidator_tsickle_Closure_declarations() {\n/** @type {?} */\nPatternValidator.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nPatternValidator.ctorParameters;\n/** @type {?} */\nPatternValidator.propDecorators;\n/** @type {?} */\nPatternValidator.prototype._validator;\n/** @type {?} */\nPatternValidator.prototype._onChange;\n/** @type {?} */\nPatternValidator.prototype.pattern;\n}\n\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {Directive, EventEmitter, Host, Inject, Input, OnChanges, OnDestroy, Optional, Output, Self, SimpleChanges, SkipSelf, forwardRef} from '@angular/core';\n\nimport {FormControl} from '../../model';\nimport {NG_ASYNC_VALIDATORS, NG_VALIDATORS} from '../../validators';\nimport {AbstractFormGroupDirective} from '../abstract_form_group_directive';\nimport {ControlContainer} from '../control_container';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '../control_value_accessor';\nimport {NgControl} from '../ng_control';\nimport {ReactiveErrors} from '../reactive_errors';\nimport {composeAsyncValidators, composeValidators, controlPath, isPropertyUpdated, selectValueAccessor} from '../shared';\nimport {AsyncValidator, AsyncValidatorFn, Validator, ValidatorFn} from '../validators';\n\nimport {FormGroupDirective} from './form_group_directive';\nimport {FormArrayName, FormGroupName} from './form_group_name';\n\nexport const /** @type {?} */ controlNameBinding: any = {\n provide: NgControl,\n useExisting: forwardRef(() => FormControlName)\n};\n/**\n * \\@whatItDoes Syncs a {\\@link FormControl} in an existing {\\@link FormGroup} to a form control\n * element by name.\n * \n * In other words, this directive ensures that any values written to the {\\@link FormControl}\n * instance programmatically will be written to the DOM element (model -> view). Conversely,\n * any values written to the DOM element through user input will be reflected in the\n * {\\@link FormControl} instance (view -> model).\n * \n * \\@howToUse \n * \n * This directive is designed to be used with a parent {\\@link FormGroupDirective} (selector:\n * `[formGroup]`).\n * \n * It accepts the string name of the {\\@link FormControl} instance you want to\n * link, and will look for a {\\@link FormControl} registered with that name in the\n * closest {\\@link FormGroup} or {\\@link FormArray} above it.\n * \n * **Access the control**: You can access the {\\@link FormControl} associated with\n * this directive by using the {\\@link AbstractControl#get get} method.\n * Ex: `this.form.get('first');`\n * \n * **Get value**: the `value` property is always synced and available on the {\\@link FormControl}.\n * See a full list of available properties in {\\@link AbstractControl}.\n * \n * **Set value**: You can set an initial value for the control when instantiating the\n * {\\@link FormControl}, or you can set it programmatically later using\n * {\\@link AbstractControl#setValue setValue} or {\\@link AbstractControl#patchValue patchValue}.\n * \n * **Listen to value**: If you want to listen to changes in the value of the control, you can\n * subscribe to the {\\@link AbstractControl#valueChanges valueChanges} event. You can also listen to\n * {\\@link AbstractControl#statusChanges statusChanges} to be notified when the validation status is\n * re-calculated.\n * \n * ### Example\n * \n * In this example, we create form controls for first name and last name.\n * \n * {\\@example forms/ts/simpleFormGroup/simple_form_group_example.ts region='Component'}\n * \n * To see `formControlName` examples with different form control types, see:\n * \n * * Radio buttons: {\\@link RadioControlValueAccessor}\n * * Selects: {\\@link SelectControlValueAccessor}\n * \n * **npm package**: `\\@angular/forms`\n * \n * **NgModule**: {\\@link ReactiveFormsModule}\n * \n * \\@stable\n */\nexport class FormControlName extends NgControl implements OnChanges, OnDestroy {\nprivate _added = false;\n/**\n * \\@internal\n */\nviewModel: any;\n/**\n * \\@internal\n */\n_control: FormControl;\n\n name: string;\n\n // TODO(kara): Replace ngModel with reactive API\n model: any;\n update = new EventEmitter();\n/**\n * @param {?} isDisabled\n * @return {?}\n */\nset isDisabled(isDisabled: boolean) { ReactiveErrors.disabledAttrWarning(); }\n/**\n * @param {?} parent\n * @param {?} validators\n * @param {?} asyncValidators\n * @param {?} valueAccessors\n */\nconstructor(\n parent: ControlContainer,\n validators: Array,\n asyncValidators:\n Array,\n valueAccessors: ControlValueAccessor[]) {\n super();\n this._parent = parent;\n this._rawValidators = validators || [];\n this._rawAsyncValidators = asyncValidators || [];\n this.valueAccessor = selectValueAccessor(this, valueAccessors);\n }\n/**\n * @param {?} changes\n * @return {?}\n */\nngOnChanges(changes: SimpleChanges) {\n if (!this._added) this._setUpControl();\n if (isPropertyUpdated(changes, this.viewModel)) {\n this.viewModel = this.model;\n this.formDirective.updateModel(this, this.model);\n }\n }\n/**\n * @return {?}\n */\nngOnDestroy(): void {\n if (this.formDirective) {\n this.formDirective.removeControl(this);\n }\n }\n/**\n * @param {?} newValue\n * @return {?}\n */\nviewToModelUpdate(newValue: any): void {\n this.viewModel = newValue;\n this.update.emit(newValue);\n }\n/**\n * @return {?}\n */\nget path(): string[] { return controlPath(this.name, /** @type {?} */(( this._parent))); }\n/**\n * @return {?}\n */\nget formDirective(): any { return this._parent ? this._parent.formDirective : null; }\n/**\n * @return {?}\n */\nget validator(): ValidatorFn|null { return composeValidators(this._rawValidators); }\n/**\n * @return {?}\n */\nget asyncValidator(): AsyncValidatorFn {\n return /** @type {?} */(( composeAsyncValidators(this._rawAsyncValidators)));\n }\n/**\n * @return {?}\n */\nget control(): FormControl { return this._control; }\n/**\n * @return {?}\n */\nprivate _checkParentType(): void {\n if (!(this._parent instanceof FormGroupName) &&\n this._parent instanceof AbstractFormGroupDirective) {\n ReactiveErrors.ngModelGroupException();\n } else if (\n !(this._parent instanceof FormGroupName) && !(this._parent instanceof FormGroupDirective) &&\n !(this._parent instanceof FormArrayName)) {\n ReactiveErrors.controlParentException();\n }\n }\n/**\n * @return {?}\n */\nprivate _setUpControl() {\n this._checkParentType();\n this._control = this.formDirective.addControl(this);\n if (this.control.disabled && /** @type {?} */(( this.valueAccessor)).setDisabledState) { /** @type {?} */(( /** @type {?} */((\n this.valueAccessor)).setDisabledState))(true);\n }\n this._added = true;\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{selector: '[formControlName]', providers: [controlNameBinding]}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: ControlContainer, decorators: [{ type: Optional }, { type: Host }, { type: SkipSelf }, ]},\n{type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALIDATORS, ] }, ]},\n{type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_ASYNC_VALIDATORS, ] }, ]},\n{type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALUE_ACCESSOR, ] }, ]},\n];\nstatic propDecorators: {[key: string]: DecoratorInvocation[]} = {\n'name': [{ type: Input, args: ['formControlName', ] },],\n'model': [{ type: Input, args: ['ngModel', ] },],\n'update': [{ type: Output, args: ['ngModelChange', ] },],\n'isDisabled': [{ type: Input, args: ['disabled', ] },],\n};\n}\n\nfunction FormControlName_tsickle_Closure_declarations() {\n/** @type {?} */\nFormControlName.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nFormControlName.ctorParameters;\n/** @type {?} */\nFormControlName.propDecorators;\n/** @type {?} */\nFormControlName.prototype._added;\n/**\n * \\@internal\n * @type {?}\n */\nFormControlName.prototype.viewModel;\n/**\n * \\@internal\n * @type {?}\n */\nFormControlName.prototype._control;\n/** @type {?} */\nFormControlName.prototype.name;\n/** @type {?} */\nFormControlName.prototype.model;\n/** @type {?} */\nFormControlName.prototype.update;\n}\n\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {Directive, Host, Inject, Input, OnDestroy, OnInit, Optional, Self, SkipSelf, forwardRef} from '@angular/core';\n\nimport {FormArray} from '../../model';\nimport {NG_ASYNC_VALIDATORS, NG_VALIDATORS} from '../../validators';\nimport {AbstractFormGroupDirective} from '../abstract_form_group_directive';\nimport {ControlContainer} from '../control_container';\nimport {ReactiveErrors} from '../reactive_errors';\nimport {composeAsyncValidators, composeValidators, controlPath} from '../shared';\nimport {AsyncValidatorFn, ValidatorFn} from '../validators';\n\nimport {FormGroupDirective} from './form_group_directive';\n\nexport const /** @type {?} */ formGroupNameProvider: any = {\n provide: ControlContainer,\n useExisting: forwardRef(() => FormGroupName)\n};\n/**\n * \\@whatItDoes Syncs a nested {\\@link FormGroup} to a DOM element.\n * \n * \\@howToUse \n * \n * This directive can only be used with a parent {\\@link FormGroupDirective} (selector:\n * `[formGroup]`).\n * \n * It accepts the string name of the nested {\\@link FormGroup} you want to link, and\n * will look for a {\\@link FormGroup} registered with that name in the parent\n * {\\@link FormGroup} instance you passed into {\\@link FormGroupDirective}.\n * \n * Nested form groups can come in handy when you want to validate a sub-group of a\n * form separately from the rest or when you'd like to group the values of certain\n * controls into their own nested object.\n * \n * **Access the group**: You can access the associated {\\@link FormGroup} using the\n * {\\@link AbstractControl#get} method. Ex: `this.form.get('name')`.\n * \n * You can also access individual controls within the group using dot syntax.\n * Ex: `this.form.get('name.first')`\n * \n * **Get the value**: the `value` property is always synced and available on the\n * {\\@link FormGroup}. See a full list of available properties in {\\@link AbstractControl}.\n * \n * **Set the value**: You can set an initial value for each child control when instantiating\n * the {\\@link FormGroup}, or you can set it programmatically later using\n * {\\@link AbstractControl#setValue setValue} or {\\@link AbstractControl#patchValue patchValue}.\n * \n * **Listen to value**: If you want to listen to changes in the value of the group, you can\n * subscribe to the {\\@link AbstractControl#valueChanges valueChanges} event. You can also listen to\n * {\\@link AbstractControl#statusChanges statusChanges} to be notified when the validation status is\n * re-calculated.\n * \n * ### Example\n * \n * {\\@example forms/ts/nestedFormGroup/nested_form_group_example.ts region='Component'}\n * \n * * **npm package**: `\\@angular/forms`\n * \n * * **NgModule**: `ReactiveFormsModule`\n * \n * \\@stable\n */\nexport class FormGroupName extends AbstractFormGroupDirective implements OnInit, OnDestroy {\n name: string;\n/**\n * @param {?} parent\n * @param {?} validators\n * @param {?} asyncValidators\n */\nconstructor(\n parent: ControlContainer,\n validators: any[],\n asyncValidators: any[]) {\n super();\n this._parent = parent;\n this._validators = validators;\n this._asyncValidators = asyncValidators;\n }\n/**\n * \\@internal\n * @return {?}\n */\n_checkParentType(): void {\n if (_hasInvalidParent(this._parent)) {\n ReactiveErrors.groupParentException();\n }\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{selector: '[formGroupName]', providers: [formGroupNameProvider]}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: ControlContainer, decorators: [{ type: Optional }, { type: Host }, { type: SkipSelf }, ]},\n{type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALIDATORS, ] }, ]},\n{type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_ASYNC_VALIDATORS, ] }, ]},\n];\nstatic propDecorators: {[key: string]: DecoratorInvocation[]} = {\n'name': [{ type: Input, args: ['formGroupName', ] },],\n};\n}\n\nfunction FormGroupName_tsickle_Closure_declarations() {\n/** @type {?} */\nFormGroupName.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nFormGroupName.ctorParameters;\n/** @type {?} */\nFormGroupName.propDecorators;\n/** @type {?} */\nFormGroupName.prototype.name;\n}\n\n\nexport const /** @type {?} */ formArrayNameProvider: any = {\n provide: ControlContainer,\n useExisting: forwardRef(() => FormArrayName)\n};\n/**\n * \\@whatItDoes Syncs a nested {\\@link FormArray} to a DOM element.\n * \n * \\@howToUse \n * \n * This directive is designed to be used with a parent {\\@link FormGroupDirective} (selector:\n * `[formGroup]`).\n * \n * It accepts the string name of the nested {\\@link FormArray} you want to link, and\n * will look for a {\\@link FormArray} registered with that name in the parent\n * {\\@link FormGroup} instance you passed into {\\@link FormGroupDirective}.\n * \n * Nested form arrays can come in handy when you have a group of form controls but\n * you're not sure how many there will be. Form arrays allow you to create new\n * form controls dynamically.\n * \n * **Access the array**: You can access the associated {\\@link FormArray} using the\n * {\\@link AbstractControl#get} method on the parent {\\@link FormGroup}.\n * Ex: `this.form.get('cities')`.\n * \n * **Get the value**: the `value` property is always synced and available on the\n * {\\@link FormArray}. See a full list of available properties in {\\@link AbstractControl}.\n * \n * **Set the value**: You can set an initial value for each child control when instantiating\n * the {\\@link FormArray}, or you can set the value programmatically later using the\n * {\\@link FormArray}'s {\\@link AbstractControl#setValue} or {\\@link AbstractControl#patchValue}\n * methods.\n * \n * **Listen to value**: If you want to listen to changes in the value of the array, you can\n * subscribe to the {\\@link FormArray}'s {\\@link AbstractControl#valueChanges} event. You can also\n * listen to its {\\@link AbstractControl#statusChanges} event to be notified when the validation\n * status is re-calculated.\n * \n * **Add new controls**: You can add new controls to the {\\@link FormArray} dynamically by\n * calling its {\\@link FormArray#push} method.\n * Ex: `this.form.get('cities').push(new FormControl());`\n * \n * ### Example\n * \n * {\\@example forms/ts/nestedFormArray/nested_form_array_example.ts region='Component'}\n * \n * * **npm package**: `\\@angular/forms`\n * \n * * **NgModule**: `ReactiveFormsModule`\n * \n * \\@stable\n */\nexport class FormArrayName extends ControlContainer implements OnInit, OnDestroy {\n/**\n * \\@internal\n */\n_parent: ControlContainer;\n/**\n * \\@internal\n */\n_validators: any[];\n/**\n * \\@internal\n */\n_asyncValidators: any[];\n\n name: string;\n/**\n * @param {?} parent\n * @param {?} validators\n * @param {?} asyncValidators\n */\nconstructor(\n parent: ControlContainer,\n validators: any[],\n asyncValidators: any[]) {\n super();\n this._parent = parent;\n this._validators = validators;\n this._asyncValidators = asyncValidators;\n }\n/**\n * @return {?}\n */\nngOnInit(): void {\n this._checkParentType(); /** @type {?} */((\n this.formDirective)).addFormArray(this);\n }\n/**\n * @return {?}\n */\nngOnDestroy(): void {\n if (this.formDirective) {\n this.formDirective.removeFormArray(this);\n }\n }\n/**\n * @return {?}\n */\nget control(): FormArray { return /** @type {?} */(( this.formDirective)).getFormArray(this); }\n/**\n * @return {?}\n */\nget formDirective(): FormGroupDirective|null {\n return this._parent ? /** @type {?} */(( this._parent.formDirective)) : null;\n }\n/**\n * @return {?}\n */\nget path(): string[] { return controlPath(this.name, this._parent); }\n/**\n * @return {?}\n */\nget validator(): ValidatorFn|null { return composeValidators(this._validators); }\n/**\n * @return {?}\n */\nget asyncValidator(): AsyncValidatorFn|null {\n return composeAsyncValidators(this._asyncValidators);\n }\n/**\n * @return {?}\n */\nprivate _checkParentType(): void {\n if (_hasInvalidParent(this._parent)) {\n ReactiveErrors.arrayParentException();\n }\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{selector: '[formArrayName]', providers: [formArrayNameProvider]}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: ControlContainer, decorators: [{ type: Optional }, { type: Host }, { type: SkipSelf }, ]},\n{type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALIDATORS, ] }, ]},\n{type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_ASYNC_VALIDATORS, ] }, ]},\n];\nstatic propDecorators: {[key: string]: DecoratorInvocation[]} = {\n'name': [{ type: Input, args: ['formArrayName', ] },],\n};\n}\n\nfunction FormArrayName_tsickle_Closure_declarations() {\n/** @type {?} */\nFormArrayName.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nFormArrayName.ctorParameters;\n/** @type {?} */\nFormArrayName.propDecorators;\n/**\n * \\@internal\n * @type {?}\n */\nFormArrayName.prototype._parent;\n/**\n * \\@internal\n * @type {?}\n */\nFormArrayName.prototype._validators;\n/**\n * \\@internal\n * @type {?}\n */\nFormArrayName.prototype._asyncValidators;\n/** @type {?} */\nFormArrayName.prototype.name;\n}\n\n/**\n * @param {?} parent\n * @return {?}\n */\nfunction _hasInvalidParent(parent: ControlContainer): boolean {\n return !(parent instanceof FormGroupName) && !(parent instanceof FormGroupDirective) &&\n !(parent instanceof FormArrayName);\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {Directive, EventEmitter, Inject, Input, OnChanges, Optional, Output, Self, SimpleChanges, forwardRef} from '@angular/core';\nimport {FormArray, FormControl, FormGroup} from '../../model';\nimport {NG_ASYNC_VALIDATORS, NG_VALIDATORS, Validators} from '../../validators';\nimport {ControlContainer} from '../control_container';\nimport {Form} from '../form_interface';\nimport {ReactiveErrors} from '../reactive_errors';\nimport {cleanUpControl, composeAsyncValidators, composeValidators, setUpControl, setUpFormContainer} from '../shared';\n\nimport {FormControlName} from './form_control_name';\nimport {FormArrayName, FormGroupName} from './form_group_name';\n\nexport const /** @type {?} */ formDirectiveProvider: any = {\n provide: ControlContainer,\n useExisting: forwardRef(() => FormGroupDirective)\n};\n/**\n * \\@whatItDoes Binds an existing {\\@link FormGroup} to a DOM element.\n * \n * \\@howToUse \n * \n * This directive accepts an existing {\\@link FormGroup} instance. It will then use this\n * {\\@link FormGroup} instance to match any child {\\@link FormControl}, {\\@link FormGroup},\n * and {\\@link FormArray} instances to child {\\@link FormControlName}, {\\@link FormGroupName},\n * and {\\@link FormArrayName} directives.\n * \n * **Set value**: You can set the form's initial value when instantiating the\n * {\\@link FormGroup}, or you can set it programmatically later using the {\\@link FormGroup}'s\n * {\\@link AbstractControl#setValue setValue} or {\\@link AbstractControl#patchValue patchValue}\n * methods.\n * \n * **Listen to value**: If you want to listen to changes in the value of the form, you can subscribe\n * to the {\\@link FormGroup}'s {\\@link AbstractControl#valueChanges valueChanges} event. You can also\n * listen to its {\\@link AbstractControl#statusChanges statusChanges} event to be notified when the\n * validation status is re-calculated.\n * \n * Furthermore, you can listen to the directive's `ngSubmit` event to be notified when the user has\n * triggered a form submission. The `ngSubmit` event will be emitted with the original form\n * submission event.\n * \n * ### Example\n * \n * In this example, we create form controls for first name and last name.\n * \n * {\\@example forms/ts/simpleFormGroup/simple_form_group_example.ts region='Component'}\n * \n * **npm package**: `\\@angular/forms`\n * \n * **NgModule**: {\\@link ReactiveFormsModule}\n * \n * \\@stable\n */\nexport class FormGroupDirective extends ControlContainer implements Form,\n OnChanges {\nprivate _submitted: boolean = false;\nprivate _oldForm: FormGroup;\n directives: FormControlName[] = [];\n\n form: FormGroup = /** @type {?} */(( null));\n ngSubmit = new EventEmitter();\n/**\n * @param {?} _validators\n * @param {?} _asyncValidators\n */\nconstructor(\nprivate _validators: any[],\nprivate _asyncValidators: any[]) {\n super();\n }\n/**\n * @param {?} changes\n * @return {?}\n */\nngOnChanges(changes: SimpleChanges): void {\n this._checkFormPresent();\n if (changes.hasOwnProperty('form')) {\n this._updateValidators();\n this._updateDomValue();\n this._updateRegistrations();\n }\n }\n/**\n * @return {?}\n */\nget submitted(): boolean { return this._submitted; }\n/**\n * @return {?}\n */\nget formDirective(): Form { return this; }\n/**\n * @return {?}\n */\nget control(): FormGroup { return this.form; }\n/**\n * @return {?}\n */\nget path(): string[] { return []; }\n/**\n * @param {?} dir\n * @return {?}\n */\naddControl(dir: FormControlName): FormControl {\n const /** @type {?} */ ctrl: any = this.form.get(dir.path);\n setUpControl(ctrl, dir);\n ctrl.updateValueAndValidity({emitEvent: false});\n this.directives.push(dir);\n return ctrl;\n }\n/**\n * @param {?} dir\n * @return {?}\n */\ngetControl(dir: FormControlName): FormControl { return /** @type {?} */(( this.form.get(dir.path))); }\n/**\n * @param {?} dir\n * @return {?}\n */\nremoveControl(dir: FormControlName): void { remove(this.directives, dir); }\n/**\n * @param {?} dir\n * @return {?}\n */\naddFormGroup(dir: FormGroupName): void {\n const /** @type {?} */ ctrl: any = this.form.get(dir.path);\n setUpFormContainer(ctrl, dir);\n ctrl.updateValueAndValidity({emitEvent: false});\n }\n/**\n * @param {?} dir\n * @return {?}\n */\nremoveFormGroup(dir: FormGroupName): void {}\n/**\n * @param {?} dir\n * @return {?}\n */\ngetFormGroup(dir: FormGroupName): FormGroup { return /** @type {?} */(( this.form.get(dir.path))); }\n/**\n * @param {?} dir\n * @return {?}\n */\naddFormArray(dir: FormArrayName): void {\n const /** @type {?} */ ctrl: any = this.form.get(dir.path);\n setUpFormContainer(ctrl, dir);\n ctrl.updateValueAndValidity({emitEvent: false});\n }\n/**\n * @param {?} dir\n * @return {?}\n */\nremoveFormArray(dir: FormArrayName): void {}\n/**\n * @param {?} dir\n * @return {?}\n */\ngetFormArray(dir: FormArrayName): FormArray { return /** @type {?} */(( this.form.get(dir.path))); }\n/**\n * @param {?} dir\n * @param {?} value\n * @return {?}\n */\nupdateModel(dir: FormControlName, value: any): void {\n const /** @type {?} */ ctrl  = /** @type {?} */(( this.form.get(dir.path)));\n ctrl.setValue(value);\n }\n/**\n * @param {?} $event\n * @return {?}\n */\nonSubmit($event: Event): boolean {\n this._submitted = true;\n this.ngSubmit.emit($event);\n return false;\n }\n/**\n * @return {?}\n */\nonReset(): void { this.resetForm(); }\n/**\n * @param {?=} value\n * @return {?}\n */\nresetForm(value: any = undefined): void {\n this.form.reset(value);\n this._submitted = false;\n }\n/**\n * \\@internal\n * @return {?}\n */\n_updateDomValue() {\n this.directives.forEach(dir => {\n const /** @type {?} */ newCtrl: any = this.form.get(dir.path);\n if (dir._control !== newCtrl) {\n cleanUpControl(dir._control, dir);\n if (newCtrl) setUpControl(newCtrl, dir);\n dir._control = newCtrl;\n }\n });\n\n this.form._updateTreeValidity({emitEvent: false});\n }\n/**\n * @return {?}\n */\nprivate _updateRegistrations() {\n this.form._registerOnCollectionChange(() => this._updateDomValue());\n if (this._oldForm) this._oldForm._registerOnCollectionChange(() => {});\n this._oldForm = this.form;\n }\n/**\n * @return {?}\n */\nprivate _updateValidators() {\n const /** @type {?} */ sync = composeValidators(this._validators);\n this.form.validator = Validators.compose([ /** @type {?} */((this.form.validator)), /** @type {?} */(( sync))]);\n\n const /** @type {?} */ async = composeAsyncValidators(this._asyncValidators);\n this.form.asyncValidator = Validators.composeAsync([ /** @type {?} */((this.form.asyncValidator)), /** @type {?} */(( async))]);\n }\n/**\n * @return {?}\n */\nprivate _checkFormPresent() {\n if (!this.form) {\n ReactiveErrors.missingFormException();\n }\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{\n selector: '[formGroup]',\n providers: [formDirectiveProvider],\n host: {'(submit)': 'onSubmit($event)', '(reset)': 'onReset()'},\n exportAs: 'ngForm'\n}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALIDATORS, ] }, ]},\n{type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_ASYNC_VALIDATORS, ] }, ]},\n];\nstatic propDecorators: {[key: string]: DecoratorInvocation[]} = {\n'form': [{ type: Input, args: ['formGroup', ] },],\n'ngSubmit': [{ type: Output },],\n};\n}\n\nfunction FormGroupDirective_tsickle_Closure_declarations() {\n/** @type {?} */\nFormGroupDirective.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nFormGroupDirective.ctorParameters;\n/** @type {?} */\nFormGroupDirective.propDecorators;\n/** @type {?} */\nFormGroupDirective.prototype._submitted;\n/** @type {?} */\nFormGroupDirective.prototype._oldForm;\n/** @type {?} */\nFormGroupDirective.prototype.directives;\n/** @type {?} */\nFormGroupDirective.prototype.form;\n/** @type {?} */\nFormGroupDirective.prototype.ngSubmit;\n/** @type {?} */\nFormGroupDirective.prototype._validators;\n/** @type {?} */\nFormGroupDirective.prototype._asyncValidators;\n}\n\n/**\n * @template T\n * @param {?} list\n * @param {?} el\n * @return {?}\n */\nfunction remove(list: T[], el: T): void {\n const /** @type {?} */ index = list.indexOf(el);\n if (index > -1) {\n list.splice(index, 1);\n }\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\n\nimport {FormErrorExamples as Examples} from './error_examples';\nexport class ReactiveErrors {\n/**\n * @return {?}\n */\nstatic controlParentException(): void {\n throw new Error(\n `formControlName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n ${Examples.formControlName}`);\n }\n/**\n * @return {?}\n */\nstatic ngModelGroupException(): void {\n throw new Error(\n `formControlName cannot be used with an ngModelGroup parent. It is only compatible with parents\n that also have a \"form\" prefix: formGroupName, formArrayName, or formGroup.\n\n Option 1: Update the parent to be formGroupName (reactive form strategy)\n\n ${Examples.formGroupName}\n\n Option 2: Use ngModel instead of formControlName (template-driven strategy)\n\n ${Examples.ngModelGroup}`);\n }\n/**\n * @return {?}\n */\nstatic missingFormException(): void {\n throw new Error(`formGroup expects a FormGroup instance. Please pass one in.\n\n Example:\n\n ${Examples.formControlName}`);\n }\n/**\n * @return {?}\n */\nstatic groupParentException(): void {\n throw new Error(\n `formGroupName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n ${Examples.formGroupName}`);\n }\n/**\n * @return {?}\n */\nstatic arrayParentException(): void {\n throw new Error(\n `formArrayName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n ${Examples.formArrayName}`);\n }\n/**\n * @return {?}\n */\nstatic disabledAttrWarning(): void {\n console.warn(`\n It looks like you're using the disabled attribute with a reactive form directive. If you set disabled to true\n when you set up this control in your component class, the disabled attribute will actually be set in the DOM for\n you. We recommend using this approach to avoid 'changed after checked' errors.\n \n Example: \n form = new FormGroup({\n first: new FormControl({value: 'Nancy', disabled: true}, Validators.required),\n last: new FormControl('Drew', Validators.required)\n });\n `);\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {Directive, EventEmitter, Inject, Input, OnChanges, Optional, Output, Self, SimpleChanges, forwardRef} from '@angular/core';\n\nimport {FormControl} from '../../model';\nimport {NG_ASYNC_VALIDATORS, NG_VALIDATORS} from '../../validators';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '../control_value_accessor';\nimport {NgControl} from '../ng_control';\nimport {ReactiveErrors} from '../reactive_errors';\nimport {composeAsyncValidators, composeValidators, isPropertyUpdated, selectValueAccessor, setUpControl} from '../shared';\nimport {AsyncValidator, AsyncValidatorFn, Validator, ValidatorFn} from '../validators';\n\nexport const /** @type {?} */ formControlBinding: any = {\n provide: NgControl,\n useExisting: forwardRef(() => FormControlDirective)\n};\n/**\n * \\@whatItDoes Syncs a standalone {\\@link FormControl} instance to a form control element.\n * \n * In other words, this directive ensures that any values written to the {\\@link FormControl}\n * instance programmatically will be written to the DOM element (model -> view). Conversely,\n * any values written to the DOM element through user input will be reflected in the\n * {\\@link FormControl} instance (view -> model).\n * \n * \\@howToUse \n * \n * Use this directive if you'd like to create and manage a {\\@link FormControl} instance directly.\n * Simply create a {\\@link FormControl}, save it to your component class, and pass it into the\n * {\\@link FormControlDirective}.\n * \n * This directive is designed to be used as a standalone control. Unlike {\\@link FormControlName},\n * it does not require that your {\\@link FormControl} instance be part of any parent\n * {\\@link FormGroup}, and it won't be registered to any {\\@link FormGroupDirective} that\n * exists above it.\n * \n * **Get the value**: the `value` property is always synced and available on the\n * {\\@link FormControl} instance. See a full list of available properties in\n * {\\@link AbstractControl}.\n * \n * **Set the value**: You can pass in an initial value when instantiating the {\\@link FormControl},\n * or you can set it programmatically later using {\\@link AbstractControl#setValue setValue} or\n * {\\@link AbstractControl#patchValue patchValue}.\n * \n * **Listen to value**: If you want to listen to changes in the value of the control, you can\n * subscribe to the {\\@link AbstractControl#valueChanges valueChanges} event. You can also listen to\n * {\\@link AbstractControl#statusChanges statusChanges} to be notified when the validation status is\n * re-calculated.\n * \n * ### Example\n * \n * {\\@example forms/ts/simpleFormControl/simple_form_control_example.ts region='Component'}\n * \n * * **npm package**: `\\@angular/forms`\n * \n * * **NgModule**: `ReactiveFormsModule`\n * \n * \\@stable\n */\nexport class FormControlDirective extends NgControl implements OnChanges {\n viewModel: any;\n\n form: FormControl;\n model: any;\n update = new EventEmitter();\n/**\n * @param {?} isDisabled\n * @return {?}\n */\nset isDisabled(isDisabled: boolean) { ReactiveErrors.disabledAttrWarning(); }\n/**\n * @param {?} validators\n * @param {?} asyncValidators\n * @param {?} valueAccessors\n */\nconstructor( validators: Array,\n asyncValidators: Array,\n \n valueAccessors: ControlValueAccessor[]) {\n super();\n this._rawValidators = validators || [];\n this._rawAsyncValidators = asyncValidators || [];\n this.valueAccessor = selectValueAccessor(this, valueAccessors);\n }\n/**\n * @param {?} changes\n * @return {?}\n */\nngOnChanges(changes: SimpleChanges): void {\n if (this._isControlChanged(changes)) {\n setUpControl(this.form, this);\n if (this.control.disabled && /** @type {?} */(( this.valueAccessor)).setDisabledState) { /** @type {?} */(( /** @type {?} */((\n this.valueAccessor)).setDisabledState))(true);\n }\n this.form.updateValueAndValidity({emitEvent: false});\n }\n if (isPropertyUpdated(changes, this.viewModel)) {\n this.form.setValue(this.model);\n this.viewModel = this.model;\n }\n }\n/**\n * @return {?}\n */\nget path(): string[] { return []; }\n/**\n * @return {?}\n */\nget validator(): ValidatorFn|null { return composeValidators(this._rawValidators); }\n/**\n * @return {?}\n */\nget asyncValidator(): AsyncValidatorFn|null {\n return composeAsyncValidators(this._rawAsyncValidators);\n }\n/**\n * @return {?}\n */\nget control(): FormControl { return this.form; }\n/**\n * @param {?} newValue\n * @return {?}\n */\nviewToModelUpdate(newValue: any): void {\n this.viewModel = newValue;\n this.update.emit(newValue);\n }\n/**\n * @param {?} changes\n * @return {?}\n */\nprivate _isControlChanged(changes: {[key: string]: any}): boolean {\n return changes.hasOwnProperty('form');\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{selector: '[formControl]', providers: [formControlBinding], exportAs: 'ngForm'}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALIDATORS, ] }, ]},\n{type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_ASYNC_VALIDATORS, ] }, ]},\n{type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALUE_ACCESSOR, ] }, ]},\n];\nstatic propDecorators: {[key: string]: DecoratorInvocation[]} = {\n'form': [{ type: Input, args: ['formControl', ] },],\n'model': [{ type: Input, args: ['ngModel', ] },],\n'update': [{ type: Output, args: ['ngModelChange', ] },],\n'isDisabled': [{ type: Input, args: ['disabled', ] },],\n};\n}\n\nfunction FormControlDirective_tsickle_Closure_declarations() {\n/** @type {?} */\nFormControlDirective.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nFormControlDirective.ctorParameters;\n/** @type {?} */\nFormControlDirective.propDecorators;\n/** @type {?} */\nFormControlDirective.prototype.viewModel;\n/** @type {?} */\nFormControlDirective.prototype.form;\n/** @type {?} */\nFormControlDirective.prototype.model;\n/** @type {?} */\nFormControlDirective.prototype.update;\n}\n\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {Directive, EventEmitter, Host, Inject, Input, OnChanges, OnDestroy, Optional, Output, Self, SimpleChanges, forwardRef} from '@angular/core';\n\nimport {FormControl} from '../model';\nimport {NG_ASYNC_VALIDATORS, NG_VALIDATORS} from '../validators';\n\nimport {AbstractFormGroupDirective} from './abstract_form_group_directive';\nimport {ControlContainer} from './control_container';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor';\nimport {NgControl} from './ng_control';\nimport {NgForm} from './ng_form';\nimport {NgModelGroup} from './ng_model_group';\nimport {composeAsyncValidators, composeValidators, controlPath, isPropertyUpdated, selectValueAccessor, setUpControl} from './shared';\nimport {TemplateDrivenErrors} from './template_driven_errors';\nimport {AsyncValidator, AsyncValidatorFn, Validator, ValidatorFn} from './validators';\n\nexport const /** @type {?} */ formControlBinding: any = {\n provide: NgControl,\n useExisting: forwardRef(() => NgModel)\n};\n/**\n * `ngModel` forces an additional change detection run when its inputs change:\n * E.g.:\n * ```\n *
{{myModel.valid}}
\n * \n * ```\n * I.e. `ngModel` can export itself on the element and then be used in the template.\n * Normally, this would result in expressions before the `input` that use the exported directive\n * to have and old value as they have been\n * dirty checked before. As this is a very common case for `ngModel`, we added this second change\n * detection run.\n * \n * Notes:\n * - this is just one extra run no matter how many `ngModel` have been changed.\n * - this is a general problem when using `exportAs` for directives!\n */\nconst resolvedPromise = Promise.resolve(null);\n/**\n * \\@whatItDoes Creates a {\\@link FormControl} instance from a domain model and binds it\n * to a form control element.\n * \n * The {\\@link FormControl} instance will track the value, user interaction, and\n * validation status of the control and keep the view synced with the model. If used\n * within a parent form, the directive will also register itself with the form as a child\n * control.\n * \n * \\@howToUse \n * \n * This directive can be used by itself or as part of a larger form. All you need is the\n * `ngModel` selector to activate it.\n * \n * It accepts a domain model as an optional {\\@link Input}. If you have a one-way binding\n * to `ngModel` with `[]` syntax, changing the value of the domain model in the component\n * class will set the value in the view. If you have a two-way binding with `[()]` syntax\n * (also known as 'banana-box syntax'), the value in the UI will always be synced back to\n * the domain model in your class as well.\n * \n * If you wish to inspect the properties of the associated {\\@link FormControl} (like\n * validity state), you can also export the directive into a local template variable using\n * `ngModel` as the key (ex: `#myVar=\"ngModel\"`). You can then access the control using the\n * directive's `control` property, but most properties you'll need (like `valid` and `dirty`)\n * will fall through to the control anyway, so you can access them directly. You can see a\n * full list of properties directly available in {\\@link AbstractControlDirective}.\n * \n * The following is an example of a simple standalone control using `ngModel`:\n * \n * {\\@example forms/ts/simpleNgModel/simple_ng_model_example.ts region='Component'}\n * \n * When using the `ngModel` within `
` tags, you'll also need to supply a `name` attribute\n * so that the control can be registered with the parent form under that name.\n * \n * It's worth noting that in the context of a parent form, you often can skip one-way or\n * two-way binding because the parent form will sync the value for you. You can access\n * its properties by exporting it into a local template variable using `ngForm` (ex:\n * `#f=\"ngForm\"`). Then you can pass it where it needs to go on submit.\n * \n * If you do need to populate initial values into your form, using a one-way binding for\n * `ngModel` tends to be sufficient as long as you use the exported form's value rather\n * than the domain model's value on submit.\n * \n * Take a look at an example of using `ngModel` within a form:\n * \n * {\\@example forms/ts/simpleForm/simple_form_example.ts region='Component'}\n * \n * To see `ngModel` examples with different form control types, see:\n * \n * * Radio buttons: {\\@link RadioControlValueAccessor}\n * * Selects: {\\@link SelectControlValueAccessor}\n * \n * **npm package**: `\\@angular/forms`\n * \n * **NgModule**: `FormsModule`\n * \n * \\@stable\n */\nexport class NgModel extends NgControl implements OnChanges,\n OnDestroy {\n/**\n * \\@internal\n */\n_control = new FormControl();\n/**\n * \\@internal\n */\n_registered = false;\n viewModel: any;\n\n name: string;\n isDisabled: boolean;\n model: any;\n options: {name?: string, standalone?: boolean};\n\n update = new EventEmitter();\n/**\n * @param {?} parent\n * @param {?} validators\n * @param {?} asyncValidators\n * @param {?} valueAccessors\n */\nconstructor( parent: ControlContainer,\n validators: Array,\n asyncValidators: Array,\n \n valueAccessors: ControlValueAccessor[]) {\n super();\n this._parent = parent;\n this._rawValidators = validators || [];\n this._rawAsyncValidators = asyncValidators || [];\n this.valueAccessor = selectValueAccessor(this, valueAccessors);\n }\n/**\n * @param {?} changes\n * @return {?}\n */\nngOnChanges(changes: SimpleChanges) {\n this._checkForErrors();\n if (!this._registered) this._setUpControl();\n if ('isDisabled' in changes) {\n this._updateDisabled(changes);\n }\n\n if (isPropertyUpdated(changes, this.viewModel)) {\n this._updateValue(this.model);\n this.viewModel = this.model;\n }\n }\n/**\n * @return {?}\n */\nngOnDestroy(): void { this.formDirective && this.formDirective.removeControl(this); }\n/**\n * @return {?}\n */\nget control(): FormControl { return this._control; }\n/**\n * @return {?}\n */\nget path(): string[] {\n return this._parent ? controlPath(this.name, this._parent) : [this.name];\n }\n/**\n * @return {?}\n */\nget formDirective(): any { return this._parent ? this._parent.formDirective : null; }\n/**\n * @return {?}\n */\nget validator(): ValidatorFn|null { return composeValidators(this._rawValidators); }\n/**\n * @return {?}\n */\nget asyncValidator(): AsyncValidatorFn|null {\n return composeAsyncValidators(this._rawAsyncValidators);\n }\n/**\n * @param {?} newValue\n * @return {?}\n */\nviewToModelUpdate(newValue: any): void {\n this.viewModel = newValue;\n this.update.emit(newValue);\n }\n/**\n * @return {?}\n */\nprivate _setUpControl(): void {\n this._isStandalone() ? this._setUpStandalone() :\n this.formDirective.addControl(this);\n this._registered = true;\n }\n/**\n * @return {?}\n */\nprivate _isStandalone(): boolean {\n return !this._parent || !!(this.options && this.options.standalone);\n }\n/**\n * @return {?}\n */\nprivate _setUpStandalone(): void {\n setUpControl(this._control, this);\n this._control.updateValueAndValidity({emitEvent: false});\n }\n/**\n * @return {?}\n */\nprivate _checkForErrors(): void {\n if (!this._isStandalone()) {\n this._checkParentType();\n }\n this._checkName();\n }\n/**\n * @return {?}\n */\nprivate _checkParentType(): void {\n if (!(this._parent instanceof NgModelGroup) &&\n this._parent instanceof AbstractFormGroupDirective) {\n TemplateDrivenErrors.formGroupNameException();\n } else if (\n !(this._parent instanceof NgModelGroup) && !(this._parent instanceof NgForm)) {\n TemplateDrivenErrors.modelParentException();\n }\n }\n/**\n * @return {?}\n */\nprivate _checkName(): void {\n if (this.options && this.options.name) this.name = this.options.name;\n\n if (!this._isStandalone() && !this.name) {\n TemplateDrivenErrors.missingNameException();\n }\n }\n/**\n * @param {?} value\n * @return {?}\n */\nprivate _updateValue(value: any): void {\n resolvedPromise.then(\n () => { this.control.setValue(value, {emitViewToModelChange: false}); });\n }\n/**\n * @param {?} changes\n * @return {?}\n */\nprivate _updateDisabled(changes: SimpleChanges) {\n const /** @type {?} */ disabledValue = changes['isDisabled'].currentValue;\n\n const /** @type {?} */ isDisabled =\n disabledValue === '' || (disabledValue && disabledValue !== 'false');\n\n resolvedPromise.then(() => {\n if (isDisabled && !this.control.disabled) {\n this.control.disable();\n } else if (!isDisabled && this.control.disabled) {\n this.control.enable();\n }\n });\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{\n selector: '[ngModel]:not([formControlName]):not([formControl])',\n providers: [formControlBinding],\n exportAs: 'ngModel'\n}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: ControlContainer, decorators: [{ type: Optional }, { type: Host }, ]},\n{type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALIDATORS, ] }, ]},\n{type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_ASYNC_VALIDATORS, ] }, ]},\n{type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALUE_ACCESSOR, ] }, ]},\n];\nstatic propDecorators: {[key: string]: DecoratorInvocation[]} = {\n'name': [{ type: Input },],\n'isDisabled': [{ type: Input, args: ['disabled', ] },],\n'model': [{ type: Input, args: ['ngModel', ] },],\n'options': [{ type: Input, args: ['ngModelOptions', ] },],\n'update': [{ type: Output, args: ['ngModelChange', ] },],\n};\n}\n\nfunction NgModel_tsickle_Closure_declarations() {\n/** @type {?} */\nNgModel.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nNgModel.ctorParameters;\n/** @type {?} */\nNgModel.propDecorators;\n/**\n * \\@internal\n * @type {?}\n */\nNgModel.prototype._control;\n/**\n * \\@internal\n * @type {?}\n */\nNgModel.prototype._registered;\n/** @type {?} */\nNgModel.prototype.viewModel;\n/** @type {?} */\nNgModel.prototype.name;\n/** @type {?} */\nNgModel.prototype.isDisabled;\n/** @type {?} */\nNgModel.prototype.model;\n/** @type {?} */\nNgModel.prototype.options;\n/** @type {?} */\nNgModel.prototype.update;\n}\n\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n","\n/**\n * @license \n * Copyright Google Inc. All Rights Reserved.\n * \n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nexport const FormErrorExamples = {\n formControlName: `\n
\n \n
\n\n In your class:\n\n this.myGroup = new FormGroup({\n firstName: new FormControl()\n });`,\n\n formGroupName: `\n
\n
\n \n
\n
\n\n In your class:\n\n this.myGroup = new FormGroup({\n person: new FormGroup({ firstName: new FormControl() })\n });`,\n\n formArrayName: `\n
\n
\n
\n \n
\n
\n
\n\n In your class:\n\n this.cityArray = new FormArray([new FormControl('SF')]);\n this.myGroup = new FormGroup({\n cities: this.cityArray\n });`,\n\n ngModelGroup: `\n \n
\n \n
\n `,\n\n ngModelWithFormGroup: `\n
\n \n \n
\n `\n};\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {FormErrorExamples as Examples} from './error_examples';\nexport class TemplateDrivenErrors {\n/**\n * @return {?}\n */\nstatic modelParentException(): void {\n throw new Error(`\n ngModel cannot be used to register form controls with a parent formGroup directive. Try using\n formGroup's partner directive \"formControlName\" instead. Example:\n\n ${Examples.formControlName}\n\n Or, if you'd like to avoid registering this form control, indicate that it's standalone in ngModelOptions:\n\n Example:\n\n ${Examples.ngModelWithFormGroup}`);\n }\n/**\n * @return {?}\n */\nstatic formGroupNameException(): void {\n throw new Error(`\n ngModel cannot be used to register form controls with a parent formGroupName or formArrayName directive.\n\n Option 1: Use formControlName instead of ngModel (reactive strategy):\n\n ${Examples.formGroupName}\n\n Option 2: Update ngModel's parent be ngModelGroup (template-driven strategy):\n\n ${Examples.ngModelGroup}`);\n }\n/**\n * @return {?}\n */\nstatic missingNameException() {\n throw new Error(\n `If ngModel is used within a form tag, either the name attribute must be set or the form\n control must be defined as 'standalone' in ngModelOptions.\n\n Example 1: \n Example 2: `);\n }\n/**\n * @return {?}\n */\nstatic modelGroupParentException() {\n throw new Error(`\n ngModelGroup cannot be used with a parent formGroup directive.\n\n Option 1: Use formGroupName instead of ngModelGroup (reactive strategy):\n\n ${Examples.formGroupName}\n\n Option 2: Use a regular form tag instead of the formGroup directive (template-driven strategy):\n\n ${Examples.ngModelGroup}`);\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {Directive, Host, Inject, Input, OnDestroy, OnInit, Optional, Self, SkipSelf, forwardRef} from '@angular/core';\n\nimport {NG_ASYNC_VALIDATORS, NG_VALIDATORS} from '../validators';\n\nimport {AbstractFormGroupDirective} from './abstract_form_group_directive';\nimport {ControlContainer} from './control_container';\nimport {NgForm} from './ng_form';\nimport {TemplateDrivenErrors} from './template_driven_errors';\n\nexport const /** @type {?} */ modelGroupProvider: any = {\n provide: ControlContainer,\n useExisting: forwardRef(() => NgModelGroup)\n};\n/**\n * \\@whatItDoes Creates and binds a {\\@link FormGroup} instance to a DOM element.\n * \n * \\@howToUse \n * \n * This directive can only be used as a child of {\\@link NgForm} (or in other words,\n * within `
` tags).\n * \n * Use this directive if you'd like to create a sub-group within a form. This can\n * come in handy if you want to validate a sub-group of your form separately from\n * the rest of your form, or if some values in your domain model make more sense to\n * consume together in a nested object.\n * \n * Pass in the name you'd like this sub-group to have and it will become the key\n * for the sub-group in the form's full value. You can also export the directive into\n * a local template variable using `ngModelGroup` (ex: `#myGroup=\"ngModelGroup\"`).\n * \n * {\\@example forms/ts/ngModelGroup/ng_model_group_example.ts region='Component'}\n * \n * * **npm package**: `\\@angular/forms`\n * \n * * **NgModule**: `FormsModule`\n * \n * \\@stable\n */\nexport class NgModelGroup extends AbstractFormGroupDirective implements OnInit, OnDestroy {\n name: string;\n/**\n * @param {?} parent\n * @param {?} validators\n * @param {?} asyncValidators\n */\nconstructor(\n parent: ControlContainer,\n validators: any[],\n asyncValidators: any[]) {\n super();\n this._parent = parent;\n this._validators = validators;\n this._asyncValidators = asyncValidators;\n }\n/**\n * \\@internal\n * @return {?}\n */\n_checkParentType(): void {\n if (!(this._parent instanceof NgModelGroup) && !(this._parent instanceof NgForm)) {\n TemplateDrivenErrors.modelGroupParentException();\n }\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{selector: '[ngModelGroup]', providers: [modelGroupProvider], exportAs: 'ngModelGroup'}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: ControlContainer, decorators: [{ type: Host }, { type: SkipSelf }, ]},\n{type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALIDATORS, ] }, ]},\n{type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_ASYNC_VALIDATORS, ] }, ]},\n];\nstatic propDecorators: {[key: string]: DecoratorInvocation[]} = {\n'name': [{ type: Input, args: ['ngModelGroup', ] },],\n};\n}\n\nfunction NgModelGroup_tsickle_Closure_declarations() {\n/** @type {?} */\nNgModelGroup.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nNgModelGroup.ctorParameters;\n/** @type {?} */\nNgModelGroup.propDecorators;\n/** @type {?} */\nNgModelGroup.prototype.name;\n}\n\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {EventEmitter} from '@angular/core';\nimport {Observable} from 'rxjs/Observable';\nimport {composeAsyncValidators, composeValidators} from './directives/shared';\nimport {AsyncValidatorFn, ValidationErrors, ValidatorFn} from './directives/validators';\nimport {toObservable} from './validators';\n/**\n * Indicates that a FormControl is valid, i.e. that no errors exist in the input value.\n */\nexport const VALID = 'VALID';\n/**\n * Indicates that a FormControl is invalid, i.e. that an error exists in the input value.\n */\nexport const INVALID = 'INVALID';\n/**\n * Indicates that a FormControl is pending, i.e. that async validation is occurring and\n * errors are not yet available for the input value.\n */\nexport const PENDING = 'PENDING';\n/**\n * Indicates that a FormControl is disabled, i.e. that the control is exempt from ancestor\n * calculations of validity or value.\n */\nexport const DISABLED = 'DISABLED';\n/**\n * @param {?} control\n * @param {?} path\n * @param {?} delimiter\n * @return {?}\n */\nfunction _find(control: AbstractControl, path: Array| string, delimiter: string) {\n if (path == null) return null;\n\n if (!(path instanceof Array)) {\n path = ( /** @type {?} */((path))).split(delimiter);\n }\n if (path instanceof Array && (path.length === 0)) return null;\n\n return ( /** @type {?} */((>path))).reduce((v: AbstractControl, name) => {\n if (v instanceof FormGroup) {\n return v.controls[name] || null;\n }\n\n if (v instanceof FormArray) {\n return v.at( /** @type {?} */((name))) || null;\n }\n\n return null;\n }, control);\n}\n/**\n * @param {?=} validator\n * @return {?}\n */\nfunction coerceToValidator(validator?: ValidatorFn | ValidatorFn[] | null): ValidatorFn|null {\n return Array.isArray(validator) ? composeValidators(validator) : validator || null;\n}\n/**\n * @param {?=} asyncValidator\n * @return {?}\n */\nfunction coerceToAsyncValidator(asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null):\n AsyncValidatorFn|null {\n return Array.isArray(asyncValidator) ? composeAsyncValidators(asyncValidator) :\n asyncValidator || null;\n}\n/**\n * \\@whatItDoes This is the base class for {\\@link FormControl}, {\\@link FormGroup}, and\n * {\\@link FormArray}.\n * \n * It provides some of the shared behavior that all controls and groups of controls have, like\n * running validators, calculating status, and resetting state. It also defines the properties\n * that are shared between all sub-classes, like `value`, `valid`, and `dirty`. It shouldn't be\n * instantiated directly.\n * \n * \\@stable\n * @abstract\n */\nexport abstract class AbstractControl {\n/**\n * \\@internal\n */\n_value: any;\n/**\n * \\@internal\n */\n_onCollectionChange = () => {};\nprivate _valueChanges: EventEmitter;\nprivate _statusChanges: EventEmitter;\nprivate _status: string;\nprivate _errors: ValidationErrors|null;\nprivate _pristine: boolean = true;\nprivate _touched: boolean = false;\nprivate _parent: FormGroup|FormArray;\nprivate _asyncValidationSubscription: any;\n/**\n * @param {?} validator\n * @param {?} asyncValidator\n */\nconstructor(public validator: ValidatorFn|null,\npublic asyncValidator: AsyncValidatorFn|null) {}\n/**\n * The value of the control.\n * @return {?}\n */\nget value(): any { return this._value; }\n/**\n * The parent control.\n * @return {?}\n */\nget parent(): FormGroup|FormArray { return this._parent; }\n/**\n * The validation status of the control. There are four possible\n * validation statuses:\n * \n * * **VALID**: control has passed all validation checks\n * * **INVALID**: control has failed at least one validation check\n * * **PENDING**: control is in the midst of conducting a validation check\n * * **DISABLED**: control is exempt from validation checks\n * \n * These statuses are mutually exclusive, so a control cannot be\n * both valid AND invalid or invalid AND disabled.\n * @return {?}\n */\nget status(): string { return this._status; }\n/**\n * A control is `valid` when its `status === VALID`.\n * \n * In order to have this status, the control must have passed all its\n * validation checks.\n * @return {?}\n */\nget valid(): boolean { return this._status === VALID; }\n/**\n * A control is `invalid` when its `status === INVALID`.\n * \n * In order to have this status, the control must have failed\n * at least one of its validation checks.\n * @return {?}\n */\nget invalid(): boolean { return this._status === INVALID; }\n/**\n * A control is `pending` when its `status === PENDING`.\n * \n * In order to have this status, the control must be in the\n * middle of conducting a validation check.\n * @return {?}\n */\nget pending(): boolean { return this._status == PENDING; }\n/**\n * A control is `disabled` when its `status === DISABLED`.\n * \n * Disabled controls are exempt from validation checks and\n * are not included in the aggregate value of their ancestor\n * controls.\n * @return {?}\n */\nget disabled(): boolean { return this._status === DISABLED; }\n/**\n * A control is `enabled` as long as its `status !== DISABLED`.\n * \n * In other words, it has a status of `VALID`, `INVALID`, or\n * `PENDING`.\n * @return {?}\n */\nget enabled(): boolean { return this._status !== DISABLED; }\n/**\n * Returns any errors generated by failing validation. If there\n * are no errors, it will return null.\n * @return {?}\n */\nget errors(): ValidationErrors|null { return this._errors; }\n/**\n * A control is `pristine` if the user has not yet changed\n * the value in the UI.\n * \n * Note that programmatic changes to a control's value will\n * *not* mark it dirty.\n * @return {?}\n */\nget pristine(): boolean { return this._pristine; }\n/**\n * A control is `dirty` if the user has changed the value\n * in the UI.\n * \n * Note that programmatic changes to a control's value will\n * *not* mark it dirty.\n * @return {?}\n */\nget dirty(): boolean { return !this.pristine; }\n/**\n * A control is marked `touched` once the user has triggered\n * a `blur` event on it.\n * @return {?}\n */\nget touched(): boolean { return this._touched; }\n/**\n * A control is `untouched` if the user has not yet triggered\n * a `blur` event on it.\n * @return {?}\n */\nget untouched(): boolean { return !this._touched; }\n/**\n * Emits an event every time the value of the control changes, in\n * the UI or programmatically.\n * @return {?}\n */\nget valueChanges(): Observable { return this._valueChanges; }\n/**\n * Emits an event every time the validation status of the control\n * is re-calculated.\n * @return {?}\n */\nget statusChanges(): Observable { return this._statusChanges; }\n/**\n * Sets the synchronous validators that are active on this control. Calling\n * this will overwrite any existing sync validators.\n * @param {?} newValidator\n * @return {?}\n */\nsetValidators(newValidator: ValidatorFn|ValidatorFn[]|null): void {\n this.validator = coerceToValidator(newValidator);\n }\n/**\n * Sets the async validators that are active on this control. Calling this\n * will overwrite any existing async validators.\n * @param {?} newValidator\n * @return {?}\n */\nsetAsyncValidators(newValidator: AsyncValidatorFn|AsyncValidatorFn[]): void {\n this.asyncValidator = coerceToAsyncValidator(newValidator);\n }\n/**\n * Empties out the sync validator list.\n * @return {?}\n */\nclearValidators(): void { this.validator = null; }\n/**\n * Empties out the async validator list.\n * @return {?}\n */\nclearAsyncValidators(): void { this.asyncValidator = null; }\n/**\n * Marks the control as `touched`.\n * \n * This will also mark all direct ancestors as `touched` to maintain\n * the model.\n * @param {?=} opts\n * @return {?}\n */\nmarkAsTouched(opts: {onlySelf?: boolean} = {}): void {\n this._touched = true;\n\n if (this._parent && !opts.onlySelf) {\n this._parent.markAsTouched(opts);\n }\n }\n/**\n * Marks the control as `untouched`.\n * \n * If the control has any children, it will also mark all children as `untouched`\n * to maintain the model, and re-calculate the `touched` status of all parent\n * controls.\n * @param {?=} opts\n * @return {?}\n */\nmarkAsUntouched(opts: {onlySelf?: boolean} = {}): void {\n this._touched = false;\n\n this._forEachChild(\n (control: AbstractControl) => { control.markAsUntouched({onlySelf: true}); });\n\n if (this._parent && !opts.onlySelf) {\n this._parent._updateTouched(opts);\n }\n }\n/**\n * Marks the control as `dirty`.\n * \n * This will also mark all direct ancestors as `dirty` to maintain\n * the model.\n * @param {?=} opts\n * @return {?}\n */\nmarkAsDirty(opts: {onlySelf?: boolean} = {}): void {\n this._pristine = false;\n\n if (this._parent && !opts.onlySelf) {\n this._parent.markAsDirty(opts);\n }\n }\n/**\n * Marks the control as `pristine`.\n * \n * If the control has any children, it will also mark all children as `pristine`\n * to maintain the model, and re-calculate the `pristine` status of all parent\n * controls.\n * @param {?=} opts\n * @return {?}\n */\nmarkAsPristine(opts: {onlySelf?: boolean} = {}): void {\n this._pristine = true;\n\n this._forEachChild((control: AbstractControl) => { control.markAsPristine({onlySelf: true}); });\n\n if (this._parent && !opts.onlySelf) {\n this._parent._updatePristine(opts);\n }\n }\n/**\n * Marks the control as `pending`.\n * @param {?=} opts\n * @return {?}\n */\nmarkAsPending(opts: {onlySelf?: boolean} = {}): void {\n this._status = PENDING;\n\n if (this._parent && !opts.onlySelf) {\n this._parent.markAsPending(opts);\n }\n }\n/**\n * Disables the control. This means the control will be exempt from validation checks and\n * excluded from the aggregate value of any parent. Its status is `DISABLED`.\n * \n * If the control has children, all children will be disabled to maintain the model.\n * @param {?=} opts\n * @return {?}\n */\ndisable(opts: {onlySelf?: boolean, emitEvent?: boolean} = {}): void {\n this._status = DISABLED;\n this._errors = null;\n this._forEachChild((control: AbstractControl) => { control.disable({onlySelf: true}); });\n this._updateValue();\n\n if (opts.emitEvent !== false) {\n this._valueChanges.emit(this._value);\n this._statusChanges.emit(this._status);\n }\n\n this._updateAncestors(!!opts.onlySelf);\n this._onDisabledChange.forEach((changeFn) => changeFn(true));\n }\n/**\n * Enables the control. This means the control will be included in validation checks and\n * the aggregate value of its parent. Its status is re-calculated based on its value and\n * its validators.\n * \n * If the control has children, all children will be enabled.\n * @param {?=} opts\n * @return {?}\n */\nenable(opts: {onlySelf?: boolean, emitEvent?: boolean} = {}): void {\n this._status = VALID;\n this._forEachChild((control: AbstractControl) => { control.enable({onlySelf: true}); });\n this.updateValueAndValidity({onlySelf: true, emitEvent: opts.emitEvent});\n\n this._updateAncestors(!!opts.onlySelf);\n this._onDisabledChange.forEach((changeFn) => changeFn(false));\n }\n/**\n * @param {?} onlySelf\n * @return {?}\n */\nprivate _updateAncestors(onlySelf: boolean) {\n if (this._parent && !onlySelf) {\n this._parent.updateValueAndValidity();\n this._parent._updatePristine();\n this._parent._updateTouched();\n }\n }\n/**\n * @param {?} parent\n * @return {?}\n */\nsetParent(parent: FormGroup|FormArray): void { this._parent = parent; }\n/**\n * Sets the value of the control. Abstract method (implemented in sub-classes).\n * @abstract\n * @param {?} value\n * @param {?=} options\n * @return {?}\n */\nsetValue(value: any, options?: Object) {}\n/**\n * Patches the value of the control. Abstract method (implemented in sub-classes).\n * @abstract\n * @param {?} value\n * @param {?=} options\n * @return {?}\n */\npatchValue(value: any, options?: Object) {}\n/**\n * Resets the control. Abstract method (implemented in sub-classes).\n * @abstract\n * @param {?=} value\n * @param {?=} options\n * @return {?}\n */\nreset(value?: any, options?: Object) {}\n/**\n * Re-calculates the value and validation status of the control.\n * \n * By default, it will also update the value and validity of its ancestors.\n * @param {?=} opts\n * @return {?}\n */\nupdateValueAndValidity(opts: {onlySelf?: boolean, emitEvent?: boolean} = {}): void {\n this._setInitialStatus();\n this._updateValue();\n\n if (this.enabled) {\n this._cancelExistingSubscription();\n this._errors = this._runValidator();\n this._status = this._calculateStatus();\n\n if (this._status === VALID || this._status === PENDING) {\n this._runAsyncValidator(opts.emitEvent);\n }\n }\n\n if (opts.emitEvent !== false) {\n this._valueChanges.emit(this._value);\n this._statusChanges.emit(this._status);\n }\n\n if (this._parent && !opts.onlySelf) {\n this._parent.updateValueAndValidity(opts);\n }\n }\n/**\n * \\@internal\n * @param {?=} opts\n * @return {?}\n */\n_updateTreeValidity(opts: {emitEvent?: boolean} = {emitEvent: true}) {\n this._forEachChild((ctrl: AbstractControl) => ctrl._updateTreeValidity(opts));\n this.updateValueAndValidity({onlySelf: true, emitEvent: opts.emitEvent});\n }\n/**\n * @return {?}\n */\nprivate _setInitialStatus() { this._status = this._allControlsDisabled() ? DISABLED : VALID; }\n/**\n * @return {?}\n */\nprivate _runValidator(): ValidationErrors|null {\n return this.validator ? this.validator(this) : null;\n }\n/**\n * @param {?=} emitEvent\n * @return {?}\n */\nprivate _runAsyncValidator(emitEvent?: boolean): void {\n if (this.asyncValidator) {\n this._status = PENDING;\n const /** @type {?} */ obs = toObservable(this.asyncValidator(this));\n this._asyncValidationSubscription =\n obs.subscribe((errors: ValidationErrors | null) => this.setErrors(errors, {emitEvent}));\n }\n }\n/**\n * @return {?}\n */\nprivate _cancelExistingSubscription(): void {\n if (this._asyncValidationSubscription) {\n this._asyncValidationSubscription.unsubscribe();\n }\n }\n/**\n * Sets errors on a form control.\n * \n * This is used when validations are run manually by the user, rather than automatically.\n * \n * Calling `setErrors` will also update the validity of the parent control.\n * \n * ### Example\n * \n * ```\n * const login = new FormControl(\"someLogin\");\n * login.setErrors({\n * \"notUnique\": true\n * });\n * \n * expect(login.valid).toEqual(false);\n * expect(login.errors).toEqual({\"notUnique\": true});\n * \n * login.setValue(\"someOtherLogin\");\n * \n * expect(login.valid).toEqual(true);\n * ```\n * @param {?} errors\n * @param {?=} opts\n * @return {?}\n */\nsetErrors(errors: ValidationErrors|null, opts: {emitEvent?: boolean} = {}): void {\n this._errors = errors;\n this._updateControlsErrors(opts.emitEvent !== false);\n }\n/**\n * Retrieves a child control given the control's name or path.\n * \n * Paths can be passed in as an array or a string delimited by a dot.\n * \n * To get a control nested within a `person` sub-group:\n * \n * * `this.form.get('person.name');`\n * \n * -OR-\n * \n * * `this.form.get(['person', 'name']);`\n * @param {?} path\n * @return {?}\n */\nget(path: Array|string): AbstractControl|null { return _find(this, path, '.'); }\n/**\n * Returns error data if the control with the given path has the error specified. Otherwise\n * returns null or undefined.\n * \n * If no path is given, it checks for the error on the present control.\n * @param {?} errorCode\n * @param {?=} path\n * @return {?}\n */\ngetError(errorCode: string, path?: string[]): any {\n const /** @type {?} */ control = path ? this.get(path) : this;\n return control && control._errors ? control._errors[errorCode] : null;\n }\n/**\n * Returns true if the control with the given path has the error specified. Otherwise\n * returns false.\n * \n * If no path is given, it checks for the error on the present control.\n * @param {?} errorCode\n * @param {?=} path\n * @return {?}\n */\nhasError(errorCode: string, path?: string[]): boolean { return !!this.getError(errorCode, path); }\n/**\n * Retrieves the top-level ancestor of this control.\n * @return {?}\n */\nget root(): AbstractControl {\n let /** @type {?} */ x: AbstractControl = this;\n\n while (x._parent) {\n x = x._parent;\n }\n\n return x;\n }\n/**\n * \\@internal\n * @param {?} emitEvent\n * @return {?}\n */\n_updateControlsErrors(emitEvent: boolean): void {\n this._status = this._calculateStatus();\n\n if (emitEvent) {\n this._statusChanges.emit(this._status);\n }\n\n if (this._parent) {\n this._parent._updateControlsErrors(emitEvent);\n }\n }\n/**\n * \\@internal\n * @return {?}\n */\n_initObservables() {\n this._valueChanges = new EventEmitter();\n this._statusChanges = new EventEmitter();\n }\n/**\n * @return {?}\n */\nprivate _calculateStatus(): string {\n if (this._allControlsDisabled()) return DISABLED;\n if (this._errors) return INVALID;\n if (this._anyControlsHaveStatus(PENDING)) return PENDING;\n if (this._anyControlsHaveStatus(INVALID)) return INVALID;\n return VALID;\n }\n/**\n * \\@internal\n * @abstract\n * @return {?}\n */\n_updateValue() {}\n/**\n * \\@internal\n * @abstract\n * @param {?} cb\n * @return {?}\n */\n_forEachChild(cb: Function) {}\n/**\n * \\@internal\n * @abstract\n * @param {?} condition\n * @return {?}\n */\n_anyControls(condition: Function) {}\n/**\n * \\@internal\n * @abstract\n * @return {?}\n */\n_allControlsDisabled() {}\n/**\n * \\@internal\n * @param {?} status\n * @return {?}\n */\n_anyControlsHaveStatus(status: string): boolean {\n return this._anyControls((control: AbstractControl) => control.status === status);\n }\n/**\n * \\@internal\n * @return {?}\n */\n_anyControlsDirty(): boolean {\n return this._anyControls((control: AbstractControl) => control.dirty);\n }\n/**\n * \\@internal\n * @return {?}\n */\n_anyControlsTouched(): boolean {\n return this._anyControls((control: AbstractControl) => control.touched);\n }\n/**\n * \\@internal\n * @param {?=} opts\n * @return {?}\n */\n_updatePristine(opts: {onlySelf?: boolean} = {}): void {\n this._pristine = !this._anyControlsDirty();\n\n if (this._parent && !opts.onlySelf) {\n this._parent._updatePristine(opts);\n }\n }\n/**\n * \\@internal\n * @param {?=} opts\n * @return {?}\n */\n_updateTouched(opts: {onlySelf?: boolean} = {}): void {\n this._touched = this._anyControlsTouched();\n\n if (this._parent && !opts.onlySelf) {\n this._parent._updateTouched(opts);\n }\n }\n/**\n * \\@internal\n */\n_onDisabledChange: Function[] = [];\n/**\n * \\@internal\n * @param {?} formState\n * @return {?}\n */\n_isBoxedValue(formState: any): boolean {\n return typeof formState === 'object' && formState !== null &&\n Object.keys(formState).length === 2 && 'value' in formState && 'disabled' in formState;\n }\n/**\n * \\@internal\n * @param {?} fn\n * @return {?}\n */\n_registerOnCollectionChange(fn: () => void): void { this._onCollectionChange = fn; }\n}\n\nfunction AbstractControl_tsickle_Closure_declarations() {\n/**\n * \\@internal\n * @type {?}\n */\nAbstractControl.prototype._value;\n/**\n * \\@internal\n * @type {?}\n */\nAbstractControl.prototype._onCollectionChange;\n/** @type {?} */\nAbstractControl.prototype._valueChanges;\n/** @type {?} */\nAbstractControl.prototype._statusChanges;\n/** @type {?} */\nAbstractControl.prototype._status;\n/** @type {?} */\nAbstractControl.prototype._errors;\n/** @type {?} */\nAbstractControl.prototype._pristine;\n/** @type {?} */\nAbstractControl.prototype._touched;\n/** @type {?} */\nAbstractControl.prototype._parent;\n/** @type {?} */\nAbstractControl.prototype._asyncValidationSubscription;\n/**\n * \\@internal\n * @type {?}\n */\nAbstractControl.prototype._onDisabledChange;\n/** @type {?} */\nAbstractControl.prototype.validator;\n/** @type {?} */\nAbstractControl.prototype.asyncValidator;\n}\n\n/**\n * \\@whatItDoes Tracks the value and validation status of an individual form control.\n * \n * It is one of the three fundamental building blocks of Angular forms, along with\n * {\\@link FormGroup} and {\\@link FormArray}.\n * \n * \\@howToUse \n * \n * When instantiating a {\\@link FormControl}, you can pass in an initial value as the\n * first argument. Example:\n * \n * ```ts\n * const ctrl = new FormControl('some value');\n * console.log(ctrl.value); // 'some value'\n * ```\n * \n * You can also initialize the control with a form state object on instantiation,\n * which includes both the value and whether or not the control is disabled.\n * You can't use the value key without the disabled key; both are required\n * to use this way of initialization.\n * \n * ```ts\n * const ctrl = new FormControl({value: 'n/a', disabled: true});\n * console.log(ctrl.value); // 'n/a'\n * console.log(ctrl.status); // 'DISABLED'\n * ```\n * \n * To include a sync validator (or an array of sync validators) with the control,\n * pass it in as the second argument. Async validators are also supported, but\n * have to be passed in separately as the third arg.\n * \n * ```ts\n * const ctrl = new FormControl('', Validators.required);\n * console.log(ctrl.value); // ''\n * console.log(ctrl.status); // 'INVALID'\n * ```\n * \n * See its superclass, {\\@link AbstractControl}, for more properties and methods.\n * \n * * **npm package**: `\\@angular/forms`\n * \n * \\@stable\n */\nexport class FormControl extends AbstractControl {\n/**\n * \\@internal\n */\n_onChange: Function[] = [];\n/**\n * @param {?=} formState\n * @param {?=} validator\n * @param {?=} asyncValidator\n */\nconstructor(\n formState: any = null, validator?: ValidatorFn|ValidatorFn[]|null,\n asyncValidator?: AsyncValidatorFn|AsyncValidatorFn[]|null) {\n super(coerceToValidator(validator), coerceToAsyncValidator(asyncValidator));\n this._applyFormState(formState);\n this.updateValueAndValidity({onlySelf: true, emitEvent: false});\n this._initObservables();\n }\n/**\n * Set the value of the form control to `value`.\n * \n * If `onlySelf` is `true`, this change will only affect the validation of this `FormControl`\n * and not its parent component. This defaults to false.\n * \n * If `emitEvent` is `true`, this\n * change will cause a `valueChanges` event on the `FormControl` to be emitted. This defaults\n * to true (as it falls through to `updateValueAndValidity`).\n * \n * If `emitModelToViewChange` is `true`, the view will be notified about the new value\n * via an `onChange` event. This is the default behavior if `emitModelToViewChange` is not\n * specified.\n * \n * If `emitViewToModelChange` is `true`, an ngModelChange event will be fired to update the\n * model. This is the default behavior if `emitViewToModelChange` is not specified.\n * @param {?} value\n * @param {?=} options\n * @return {?}\n */\nsetValue(value: any, options: {\n onlySelf?: boolean,\n emitEvent?: boolean,\n emitModelToViewChange?: boolean,\n emitViewToModelChange?: boolean\n } = {}): void {\n this._value = value;\n if (this._onChange.length && options.emitModelToViewChange !== false) {\n this._onChange.forEach(\n (changeFn) => changeFn(this._value, options.emitViewToModelChange !== false));\n }\n this.updateValueAndValidity(options);\n }\n/**\n * Patches the value of a control.\n * \n * This function is functionally the same as {\\@link FormControl#setValue} at this level.\n * It exists for symmetry with {\\@link FormGroup#patchValue} on `FormGroups` and `FormArrays`,\n * where it does behave differently.\n * @param {?} value\n * @param {?=} options\n * @return {?}\n */\npatchValue(value: any, options: {\n onlySelf?: boolean,\n emitEvent?: boolean,\n emitModelToViewChange?: boolean,\n emitViewToModelChange?: boolean\n } = {}): void {\n this.setValue(value, options);\n }\n/**\n * Resets the form control. This means by default:\n * \n * * it is marked as `pristine`\n * * it is marked as `untouched`\n * * value is set to null\n * \n * You can also reset to a specific form state by passing through a standalone\n * value or a form state object that contains both a value and a disabled state\n * (these are the only two properties that cannot be calculated).\n * \n * Ex:\n * \n * ```ts\n * this.control.reset('Nancy');\n * \n * console.log(this.control.value); // 'Nancy'\n * ```\n * \n * OR\n * \n * ```\n * this.control.reset({value: 'Nancy', disabled: true});\n * \n * console.log(this.control.value); // 'Nancy'\n * console.log(this.control.status); // 'DISABLED'\n * ```\n * @param {?=} formState\n * @param {?=} options\n * @return {?}\n */\nreset(formState: any = null, options: {onlySelf?: boolean, emitEvent?: boolean} = {}): void {\n this._applyFormState(formState);\n this.markAsPristine(options);\n this.markAsUntouched(options);\n this.setValue(this._value, options);\n }\n/**\n * \\@internal\n * @return {?}\n */\n_updateValue() {}\n/**\n * \\@internal\n * @param {?} condition\n * @return {?}\n */\n_anyControls(condition: Function): boolean { return false; }\n/**\n * \\@internal\n * @return {?}\n */\n_allControlsDisabled(): boolean { return this.disabled; }\n/**\n * Register a listener for change events.\n * @param {?} fn\n * @return {?}\n */\nregisterOnChange(fn: Function): void { this._onChange.push(fn); }\n/**\n * \\@internal\n * @return {?}\n */\n_clearChangeFns(): void {\n this._onChange = [];\n this._onDisabledChange = [];\n this._onCollectionChange = () => {};\n }\n/**\n * Register a listener for disabled events.\n * @param {?} fn\n * @return {?}\n */\nregisterOnDisabledChange(fn: (isDisabled: boolean) => void): void {\n this._onDisabledChange.push(fn);\n }\n/**\n * \\@internal\n * @param {?} cb\n * @return {?}\n */\n_forEachChild(cb: Function): void {}\n/**\n * @param {?} formState\n * @return {?}\n */\nprivate _applyFormState(formState: any) {\n if (this._isBoxedValue(formState)) {\n this._value = formState.value;\n formState.disabled ? this.disable({onlySelf: true, emitEvent: false}) :\n this.enable({onlySelf: true, emitEvent: false});\n } else {\n this._value = formState;\n }\n }\n}\n\nfunction FormControl_tsickle_Closure_declarations() {\n/**\n * \\@internal\n * @type {?}\n */\nFormControl.prototype._onChange;\n}\n\n/**\n * \\@whatItDoes Tracks the value and validity state of a group of {\\@link FormControl}\n * instances.\n * \n * A `FormGroup` aggregates the values of each child {\\@link FormControl} into one object,\n * with each control name as the key. It calculates its status by reducing the statuses\n * of its children. For example, if one of the controls in a group is invalid, the entire\n * group becomes invalid.\n * \n * `FormGroup` is one of the three fundamental building blocks used to define forms in Angular,\n * along with {\\@link FormControl} and {\\@link FormArray}.\n * \n * \\@howToUse \n * \n * When instantiating a {\\@link FormGroup}, pass in a collection of child controls as the first\n * argument. The key for each child will be the name under which it is registered.\n * \n * ### Example\n * \n * ```\n * const form = new FormGroup({\n * first: new FormControl('Nancy', Validators.minLength(2)),\n * last: new FormControl('Drew'),\n * });\n * \n * console.log(form.value); // {first: 'Nancy', last; 'Drew'}\n * console.log(form.status); // 'VALID'\n * ```\n * \n * You can also include group-level validators as the second arg, or group-level async\n * validators as the third arg. These come in handy when you want to perform validation\n * that considers the value of more than one child control.\n * \n * ### Example\n * \n * ```\n * const form = new FormGroup({\n * password: new FormControl('', Validators.minLength(2)),\n * passwordConfirm: new FormControl('', Validators.minLength(2)),\n * }, passwordMatchValidator);\n * \n * \n * function passwordMatchValidator(g: FormGroup) {\n * return g.get('password').value === g.get('passwordConfirm').value\n * ? null : {'mismatch': true};\n * }\n * ```\n * \n * * **npm package**: `\\@angular/forms`\n * \n * \\@stable\n */\nexport class FormGroup extends AbstractControl {\n/**\n * @param {?} controls\n * @param {?=} validator\n * @param {?=} asyncValidator\n */\nconstructor(\npublic controls: {[key: string]: AbstractControl}, validator?: ValidatorFn|null,\n asyncValidator?: AsyncValidatorFn|null) {\n super(validator || null, asyncValidator || null);\n this._initObservables();\n this._setUpControls();\n this.updateValueAndValidity({onlySelf: true, emitEvent: false});\n }\n/**\n * Registers a control with the group's list of controls.\n * \n * This method does not update value or validity of the control, so for\n * most cases you'll want to use {\\@link FormGroup#addControl} instead.\n * @param {?} name\n * @param {?} control\n * @return {?}\n */\nregisterControl(name: string, control: AbstractControl): AbstractControl {\n if (this.controls[name]) return this.controls[name];\n this.controls[name] = control;\n control.setParent(this);\n control._registerOnCollectionChange(this._onCollectionChange);\n return control;\n }\n/**\n * Add a control to this group.\n * @param {?} name\n * @param {?} control\n * @return {?}\n */\naddControl(name: string, control: AbstractControl): void {\n this.registerControl(name, control);\n this.updateValueAndValidity();\n this._onCollectionChange();\n }\n/**\n * Remove a control from this group.\n * @param {?} name\n * @return {?}\n */\nremoveControl(name: string): void {\n if (this.controls[name]) this.controls[name]._registerOnCollectionChange(() => {});\n delete (this.controls[name]);\n this.updateValueAndValidity();\n this._onCollectionChange();\n }\n/**\n * Replace an existing control.\n * @param {?} name\n * @param {?} control\n * @return {?}\n */\nsetControl(name: string, control: AbstractControl): void {\n if (this.controls[name]) this.controls[name]._registerOnCollectionChange(() => {});\n delete (this.controls[name]);\n if (control) this.registerControl(name, control);\n this.updateValueAndValidity();\n this._onCollectionChange();\n }\n/**\n * Check whether there is an enabled control with the given name in the group.\n * \n * It will return false for disabled controls. If you'd like to check for\n * existence in the group only, use {\\@link AbstractControl#get} instead.\n * @param {?} controlName\n * @return {?}\n */\ncontains(controlName: string): boolean {\n return this.controls.hasOwnProperty(controlName) && this.controls[controlName].enabled;\n }\n/**\n * Sets the value of the {\\@link FormGroup}. It accepts an object that matches\n * the structure of the group, with control names as keys.\n * \n * This method performs strict checks, so it will throw an error if you try\n * to set the value of a control that doesn't exist or if you exclude the\n * value of a control.\n * \n * ### Example\n * \n * ```\n * const form = new FormGroup({\n * first: new FormControl(),\n * last: new FormControl()\n * });\n * console.log(form.value); // {first: null, last: null}\n * \n * form.setValue({first: 'Nancy', last: 'Drew'});\n * console.log(form.value); // {first: 'Nancy', last: 'Drew'}\n * \n * ```\n * @param {?} value\n * @param {?=} options\n * @return {?}\n */\nsetValue(value: {[key: string]: any}, options: {onlySelf?: boolean, emitEvent?: boolean} = {}):\n void {\n this._checkAllValuesPresent(value);\n Object.keys(value).forEach(name => {\n this._throwIfControlMissing(name);\n this.controls[name].setValue(value[name], {onlySelf: true, emitEvent: options.emitEvent});\n });\n this.updateValueAndValidity(options);\n }\n/**\n * Patches the value of the {\\@link FormGroup}. It accepts an object with control\n * names as keys, and will do its best to match the values to the correct controls\n * in the group.\n * \n * It accepts both super-sets and sub-sets of the group without throwing an error.\n * \n * ### Example\n * \n * ```\n * const form = new FormGroup({\n * first: new FormControl(),\n * last: new FormControl()\n * });\n * console.log(form.value); // {first: null, last: null}\n * \n * form.patchValue({first: 'Nancy'});\n * console.log(form.value); // {first: 'Nancy', last: null}\n * \n * ```\n * @param {?} value\n * @param {?=} options\n * @return {?}\n */\npatchValue(value: {[key: string]: any}, options: {onlySelf?: boolean, emitEvent?: boolean} = {}):\n void {\n Object.keys(value).forEach(name => {\n if (this.controls[name]) {\n this.controls[name].patchValue(value[name], {onlySelf: true, emitEvent: options.emitEvent});\n }\n });\n this.updateValueAndValidity(options);\n }\n/**\n * Resets the {\\@link FormGroup}. This means by default:\n * \n * * The group and all descendants are marked `pristine`\n * * The group and all descendants are marked `untouched`\n * * The value of all descendants will be null or null maps\n * \n * You can also reset to a specific form state by passing in a map of states\n * that matches the structure of your form, with control names as keys. The state\n * can be a standalone value or a form state object with both a value and a disabled\n * status.\n * \n * ### Example\n * \n * ```ts\n * this.form.reset({first: 'name', last: 'last name'});\n * \n * console.log(this.form.value); // {first: 'name', last: 'last name'}\n * ```\n * \n * - OR -\n * \n * ```\n * this.form.reset({\n * first: {value: 'name', disabled: true},\n * last: 'last'\n * });\n * \n * console.log(this.form.value); // {first: 'name', last: 'last name'}\n * console.log(this.form.get('first').status); // 'DISABLED'\n * ```\n * @param {?=} value\n * @param {?=} options\n * @return {?}\n */\nreset(value: any = {}, options: {onlySelf?: boolean, emitEvent?: boolean} = {}): void {\n this._forEachChild((control: AbstractControl, name: string) => {\n control.reset(value[name], {onlySelf: true, emitEvent: options.emitEvent});\n });\n this.updateValueAndValidity(options);\n this._updatePristine(options);\n this._updateTouched(options);\n }\n/**\n * The aggregate value of the {\\@link FormGroup}, including any disabled controls.\n * \n * If you'd like to include all values regardless of disabled status, use this method.\n * Otherwise, the `value` property is the best way to get the value of the group.\n * @return {?}\n */\ngetRawValue(): any {\n return this._reduceChildren(\n {}, (acc: {[k: string]: AbstractControl}, control: AbstractControl, name: string) => {\n acc[name] = control instanceof FormControl ? control.value : ( /** @type {?} */((control))).getRawValue();\n return acc;\n });\n }\n/**\n * \\@internal\n * @param {?} name\n * @return {?}\n */\n_throwIfControlMissing(name: string): void {\n if (!Object.keys(this.controls).length) {\n throw new Error(`\n There are no form controls registered with this group yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n `);\n }\n if (!this.controls[name]) {\n throw new Error(`Cannot find form control with name: ${name}.`);\n }\n }\n/**\n * \\@internal\n * @param {?} cb\n * @return {?}\n */\n_forEachChild(cb: (v: any, k: string) => void): void {\n Object.keys(this.controls).forEach(k => cb(this.controls[k], k));\n }\n/**\n * \\@internal\n * @return {?}\n */\n_setUpControls(): void {\n this._forEachChild((control: AbstractControl) => {\n control.setParent(this);\n control._registerOnCollectionChange(this._onCollectionChange);\n });\n }\n/**\n * \\@internal\n * @return {?}\n */\n_updateValue(): void { this._value = this._reduceValue(); }\n/**\n * \\@internal\n * @param {?} condition\n * @return {?}\n */\n_anyControls(condition: Function): boolean {\n let /** @type {?} */ res = false;\n this._forEachChild((control: AbstractControl, name: string) => {\n res = res || (this.contains(name) && condition(control));\n });\n return res;\n }\n/**\n * \\@internal\n * @return {?}\n */\n_reduceValue() {\n return this._reduceChildren(\n {}, (acc: {[k: string]: AbstractControl}, control: AbstractControl, name: string) => {\n if (control.enabled || this.disabled) {\n acc[name] = control.value;\n }\n return acc;\n });\n }\n/**\n * \\@internal\n * @param {?} initValue\n * @param {?} fn\n * @return {?}\n */\n_reduceChildren(initValue: any, fn: Function) {\n let /** @type {?} */ res = initValue;\n this._forEachChild(\n (control: AbstractControl, name: string) => { res = fn(res, control, name); });\n return res;\n }\n/**\n * \\@internal\n * @return {?}\n */\n_allControlsDisabled(): boolean {\n for (const /** @type {?} */ controlName of Object.keys(this.controls)) {\n if (this.controls[controlName].enabled) {\n return false;\n }\n }\n return Object.keys(this.controls).length > 0 || this.disabled;\n }\n/**\n * \\@internal\n * @param {?} value\n * @return {?}\n */\n_checkAllValuesPresent(value: any): void {\n this._forEachChild((control: AbstractControl, name: string) => {\n if (value[name] === undefined) {\n throw new Error(`Must supply a value for form control with name: '${name}'.`);\n }\n });\n }\n}\n\nfunction FormGroup_tsickle_Closure_declarations() {\n/** @type {?} */\nFormGroup.prototype.controls;\n}\n\n/**\n * \\@whatItDoes Tracks the value and validity state of an array of {\\@link FormControl},\n * {\\@link FormGroup} or {\\@link FormArray} instances.\n * \n * A `FormArray` aggregates the values of each child {\\@link FormControl} into an array.\n * It calculates its status by reducing the statuses of its children. For example, if one of\n * the controls in a `FormArray` is invalid, the entire array becomes invalid.\n * \n * `FormArray` is one of the three fundamental building blocks used to define forms in Angular,\n * along with {\\@link FormControl} and {\\@link FormGroup}.\n * \n * \\@howToUse \n * \n * When instantiating a {\\@link FormArray}, pass in an array of child controls as the first\n * argument.\n * \n * ### Example\n * \n * ```\n * const arr = new FormArray([\n * new FormControl('Nancy', Validators.minLength(2)),\n * new FormControl('Drew'),\n * ]);\n * \n * console.log(arr.value); // ['Nancy', 'Drew']\n * console.log(arr.status); // 'VALID'\n * ```\n * \n * You can also include array-level validators as the second arg, or array-level async\n * validators as the third arg. These come in handy when you want to perform validation\n * that considers the value of more than one child control.\n * \n * ### Adding or removing controls\n * \n * To change the controls in the array, use the `push`, `insert`, or `removeAt` methods\n * in `FormArray` itself. These methods ensure the controls are properly tracked in the\n * form's hierarchy. Do not modify the array of `AbstractControl`s used to instantiate\n * the `FormArray` directly, as that will result in strange and unexpected behavior such\n * as broken change detection.\n * \n * * **npm package**: `\\@angular/forms`\n * \n * \\@stable\n */\nexport class FormArray extends AbstractControl {\n/**\n * @param {?} controls\n * @param {?=} validator\n * @param {?=} asyncValidator\n */\nconstructor(\npublic controls: AbstractControl[], validator?: ValidatorFn|null,\n asyncValidator?: AsyncValidatorFn|null) {\n super(validator || null, asyncValidator || null);\n this._initObservables();\n this._setUpControls();\n this.updateValueAndValidity({onlySelf: true, emitEvent: false});\n }\n/**\n * Get the {\\@link AbstractControl} at the given `index` in the array.\n * @param {?} index\n * @return {?}\n */\nat(index: number): AbstractControl { return this.controls[index]; }\n/**\n * Insert a new {\\@link AbstractControl} at the end of the array.\n * @param {?} control\n * @return {?}\n */\npush(control: AbstractControl): void {\n this.controls.push(control);\n this._registerControl(control);\n this.updateValueAndValidity();\n this._onCollectionChange();\n }\n/**\n * Insert a new {\\@link AbstractControl} at the given `index` in the array.\n * @param {?} index\n * @param {?} control\n * @return {?}\n */\ninsert(index: number, control: AbstractControl): void {\n this.controls.splice(index, 0, control);\n\n this._registerControl(control);\n this.updateValueAndValidity();\n this._onCollectionChange();\n }\n/**\n * Remove the control at the given `index` in the array.\n * @param {?} index\n * @return {?}\n */\nremoveAt(index: number): void {\n if (this.controls[index]) this.controls[index]._registerOnCollectionChange(() => {});\n this.controls.splice(index, 1);\n this.updateValueAndValidity();\n this._onCollectionChange();\n }\n/**\n * Replace an existing control.\n * @param {?} index\n * @param {?} control\n * @return {?}\n */\nsetControl(index: number, control: AbstractControl): void {\n if (this.controls[index]) this.controls[index]._registerOnCollectionChange(() => {});\n this.controls.splice(index, 1);\n\n if (control) {\n this.controls.splice(index, 0, control);\n this._registerControl(control);\n }\n\n this.updateValueAndValidity();\n this._onCollectionChange();\n }\n/**\n * Length of the control array.\n * @return {?}\n */\nget length(): number { return this.controls.length; }\n/**\n * Sets the value of the {\\@link FormArray}. It accepts an array that matches\n * the structure of the control.\n * \n * This method performs strict checks, so it will throw an error if you try\n * to set the value of a control that doesn't exist or if you exclude the\n * value of a control.\n * \n * ### Example\n * \n * ```\n * const arr = new FormArray([\n * new FormControl(),\n * new FormControl()\n * ]);\n * console.log(arr.value); // [null, null]\n * \n * arr.setValue(['Nancy', 'Drew']);\n * console.log(arr.value); // ['Nancy', 'Drew']\n * ```\n * @param {?} value\n * @param {?=} options\n * @return {?}\n */\nsetValue(value: any[], options: {onlySelf?: boolean, emitEvent?: boolean} = {}): void {\n this._checkAllValuesPresent(value);\n value.forEach((newValue: any, index: number) => {\n this._throwIfControlMissing(index);\n this.at(index).setValue(newValue, {onlySelf: true, emitEvent: options.emitEvent});\n });\n this.updateValueAndValidity(options);\n }\n/**\n * Patches the value of the {\\@link FormArray}. It accepts an array that matches the\n * structure of the control, and will do its best to match the values to the correct\n * controls in the group.\n * \n * It accepts both super-sets and sub-sets of the array without throwing an error.\n * \n * ### Example\n * \n * ```\n * const arr = new FormArray([\n * new FormControl(),\n * new FormControl()\n * ]);\n * console.log(arr.value); // [null, null]\n * \n * arr.patchValue(['Nancy']);\n * console.log(arr.value); // ['Nancy', null]\n * ```\n * @param {?} value\n * @param {?=} options\n * @return {?}\n */\npatchValue(value: any[], options: {onlySelf?: boolean, emitEvent?: boolean} = {}): void {\n value.forEach((newValue: any, index: number) => {\n if (this.at(index)) {\n this.at(index).patchValue(newValue, {onlySelf: true, emitEvent: options.emitEvent});\n }\n });\n this.updateValueAndValidity(options);\n }\n/**\n * Resets the {\\@link FormArray}. This means by default:\n * \n * * The array and all descendants are marked `pristine`\n * * The array and all descendants are marked `untouched`\n * * The value of all descendants will be null or null maps\n * \n * You can also reset to a specific form state by passing in an array of states\n * that matches the structure of the control. The state can be a standalone value\n * or a form state object with both a value and a disabled status.\n * \n * ### Example\n * \n * ```ts\n * this.arr.reset(['name', 'last name']);\n * \n * console.log(this.arr.value); // ['name', 'last name']\n * ```\n * \n * - OR -\n * \n * ```\n * this.arr.reset([\n * {value: 'name', disabled: true},\n * 'last'\n * ]);\n * \n * console.log(this.arr.value); // ['name', 'last name']\n * console.log(this.arr.get(0).status); // 'DISABLED'\n * ```\n * @param {?=} value\n * @param {?=} options\n * @return {?}\n */\nreset(value: any = [], options: {onlySelf?: boolean, emitEvent?: boolean} = {}): void {\n this._forEachChild((control: AbstractControl, index: number) => {\n control.reset(value[index], {onlySelf: true, emitEvent: options.emitEvent});\n });\n this.updateValueAndValidity(options);\n this._updatePristine(options);\n this._updateTouched(options);\n }\n/**\n * The aggregate value of the array, including any disabled controls.\n * \n * If you'd like to include all values regardless of disabled status, use this method.\n * Otherwise, the `value` property is the best way to get the value of the array.\n * @return {?}\n */\ngetRawValue(): any[] {\n return this.controls.map((control: AbstractControl) => {\n return control instanceof FormControl ? control.value : ( /** @type {?} */((control))).getRawValue();\n });\n }\n/**\n * \\@internal\n * @param {?} index\n * @return {?}\n */\n_throwIfControlMissing(index: number): void {\n if (!this.controls.length) {\n throw new Error(`\n There are no form controls registered with this array yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n `);\n }\n if (!this.at(index)) {\n throw new Error(`Cannot find form control at index ${index}`);\n }\n }\n/**\n * \\@internal\n * @param {?} cb\n * @return {?}\n */\n_forEachChild(cb: Function): void {\n this.controls.forEach((control: AbstractControl, index: number) => { cb(control, index); });\n }\n/**\n * \\@internal\n * @return {?}\n */\n_updateValue(): void {\n this._value = this.controls.filter((control) => control.enabled || this.disabled)\n .map((control) => control.value);\n }\n/**\n * \\@internal\n * @param {?} condition\n * @return {?}\n */\n_anyControls(condition: Function): boolean {\n return this.controls.some((control: AbstractControl) => control.enabled && condition(control));\n }\n/**\n * \\@internal\n * @return {?}\n */\n_setUpControls(): void {\n this._forEachChild((control: AbstractControl) => this._registerControl(control));\n }\n/**\n * \\@internal\n * @param {?} value\n * @return {?}\n */\n_checkAllValuesPresent(value: any): void {\n this._forEachChild((control: AbstractControl, i: number) => {\n if (value[i] === undefined) {\n throw new Error(`Must supply a value for form control at index: ${i}.`);\n }\n });\n }\n/**\n * \\@internal\n * @return {?}\n */\n_allControlsDisabled(): boolean {\n for (const /** @type {?} */ control of this.controls) {\n if (control.enabled) return false;\n }\n return this.controls.length > 0 || this.disabled;\n }\n/**\n * @param {?} control\n * @return {?}\n */\nprivate _registerControl(control: AbstractControl) {\n control.setParent(this);\n control._registerOnCollectionChange(this._onCollectionChange);\n }\n}\n\nfunction FormArray_tsickle_Closure_declarations() {\n/** @type {?} */\nFormArray.prototype.controls;\n}\n\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {Directive, EventEmitter, Inject, Optional, Self, forwardRef} from '@angular/core';\n\nimport {AbstractControl, FormControl, FormGroup} from '../model';\nimport {NG_ASYNC_VALIDATORS, NG_VALIDATORS} from '../validators';\n\nimport {ControlContainer} from './control_container';\nimport {Form} from './form_interface';\nimport {NgControl} from './ng_control';\nimport {NgModel} from './ng_model';\nimport {NgModelGroup} from './ng_model_group';\nimport {composeAsyncValidators, composeValidators, setUpControl, setUpFormContainer} from './shared';\n\nexport const /** @type {?} */ formDirectiveProvider: any = {\n provide: ControlContainer,\n useExisting: forwardRef(() => NgForm)\n};\n\nconst /** @type {?} */ resolvedPromise = Promise.resolve(null);\n/**\n * \\@whatItDoes Creates a top-level {\\@link FormGroup} instance and binds it to a form\n * to track aggregate form value and validation status.\n * \n * \\@howToUse \n * \n * As soon as you import the `FormsModule`, this directive becomes active by default on\n * all `` tags. You don't need to add a special selector.\n * \n * You can export the directive into a local template variable using `ngForm` as the key\n * (ex: `#myForm=\"ngForm\"`). This is optional, but useful. Many properties from the underlying\n * {\\@link FormGroup} instance are duplicated on the directive itself, so a reference to it\n * will give you access to the aggregate value and validity status of the form, as well as\n * user interaction properties like `dirty` and `touched`.\n * \n * To register child controls with the form, you'll want to use {\\@link NgModel} with a\n * `name` attribute. You can also use {\\@link NgModelGroup} if you'd like to create\n * sub-groups within the form.\n * \n * You can listen to the directive's `ngSubmit` event to be notified when the user has\n * triggered a form submission. The `ngSubmit` event will be emitted with the original form\n * submission event.\n * \n * In template driven forms, all `` tags are automatically tagged as `NgForm`.\n * If you want to import the `FormsModule` but skip its usage in some forms,\n * for example, to use native HTML5 validation, you can add `ngNoForm` and the ``\n * tags won't create an `NgForm` directive. In reactive forms, using `ngNoForm` is\n * unnecessary because the `` tags are inert. In that case, you would\n * refrain from using the `formGroup` directive.\n * \n * {\\@example forms/ts/simpleForm/simple_form_example.ts region='Component'}\n * \n * * **npm package**: `\\@angular/forms`\n * \n * * **NgModule**: `FormsModule`\n * \n * \\@stable\n */\nexport class NgForm extends ControlContainer implements Form {\nprivate _submitted: boolean = false;\n\n form: FormGroup;\n ngSubmit = new EventEmitter();\n/**\n * @param {?} validators\n * @param {?} asyncValidators\n */\nconstructor(\n validators: any[],\n asyncValidators: any[]) {\n super();\n this.form =\n new FormGroup({}, composeValidators(validators), composeAsyncValidators(asyncValidators));\n }\n/**\n * @return {?}\n */\nget submitted(): boolean { return this._submitted; }\n/**\n * @return {?}\n */\nget formDirective(): Form { return this; }\n/**\n * @return {?}\n */\nget control(): FormGroup { return this.form; }\n/**\n * @return {?}\n */\nget path(): string[] { return []; }\n/**\n * @return {?}\n */\nget controls(): {[key: string]: AbstractControl} { return this.form.controls; }\n/**\n * @param {?} dir\n * @return {?}\n */\naddControl(dir: NgModel): void {\n resolvedPromise.then(() => {\n const /** @type {?} */ container = this._findContainer(dir.path);\n dir._control = /** @type {?} */(( container.registerControl(dir.name, dir.control)));\n setUpControl(dir.control, dir);\n dir.control.updateValueAndValidity({emitEvent: false});\n });\n }\n/**\n * @param {?} dir\n * @return {?}\n */\ngetControl(dir: NgModel): FormControl { return /** @type {?} */(( this.form.get(dir.path))); }\n/**\n * @param {?} dir\n * @return {?}\n */\nremoveControl(dir: NgModel): void {\n resolvedPromise.then(() => {\n const /** @type {?} */ container = this._findContainer(dir.path);\n if (container) {\n container.removeControl(dir.name);\n }\n });\n }\n/**\n * @param {?} dir\n * @return {?}\n */\naddFormGroup(dir: NgModelGroup): void {\n resolvedPromise.then(() => {\n const /** @type {?} */ container = this._findContainer(dir.path);\n const /** @type {?} */ group = new FormGroup({});\n setUpFormContainer(group, dir);\n container.registerControl(dir.name, group);\n group.updateValueAndValidity({emitEvent: false});\n });\n }\n/**\n * @param {?} dir\n * @return {?}\n */\nremoveFormGroup(dir: NgModelGroup): void {\n resolvedPromise.then(() => {\n const /** @type {?} */ container = this._findContainer(dir.path);\n if (container) {\n container.removeControl(dir.name);\n }\n });\n }\n/**\n * @param {?} dir\n * @return {?}\n */\ngetFormGroup(dir: NgModelGroup): FormGroup { return /** @type {?} */(( this.form.get(dir.path))); }\n/**\n * @param {?} dir\n * @param {?} value\n * @return {?}\n */\nupdateModel(dir: NgControl, value: any): void {\n resolvedPromise.then(() => {\n const /** @type {?} */ ctrl = /** @type {?} */(( this.form.get( /** @type {?} */((dir.path)))));\n ctrl.setValue(value);\n });\n }\n/**\n * @param {?} value\n * @return {?}\n */\nsetValue(value: {[key: string]: any}): void { this.control.setValue(value); }\n/**\n * @param {?} $event\n * @return {?}\n */\nonSubmit($event: Event): boolean {\n this._submitted = true;\n this.ngSubmit.emit($event);\n return false;\n }\n/**\n * @return {?}\n */\nonReset(): void { this.resetForm(); }\n/**\n * @param {?=} value\n * @return {?}\n */\nresetForm(value: any = undefined): void {\n this.form.reset(value);\n this._submitted = false;\n }\n/**\n * \\@internal\n * @param {?} path\n * @return {?}\n */\n_findContainer(path: string[]): FormGroup {\n path.pop();\n return path.length ? /** @type {?} */(( this.form.get(path))) : this.form;\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{\n selector: 'form:not([ngNoForm]):not([formGroup]),ngForm,[ngForm]',\n providers: [formDirectiveProvider],\n host: {'(submit)': 'onSubmit($event)', '(reset)': 'onReset()'},\n outputs: ['ngSubmit'],\n exportAs: 'ngForm'\n}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALIDATORS, ] }, ]},\n{type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_ASYNC_VALIDATORS, ] }, ]},\n];\n}\n\nfunction NgForm_tsickle_Closure_declarations() {\n/** @type {?} */\nNgForm.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nNgForm.ctorParameters;\n/** @type {?} */\nNgForm.prototype._submitted;\n/** @type {?} */\nNgForm.prototype.form;\n/** @type {?} */\nNgForm.prototype.ngSubmit;\n}\n\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n\nimport {Directive, ElementRef, Host, Input, OnDestroy, Optional, Provider, Renderer2, forwardRef, ɵlooseIdentical as looseIdentical} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from './control_value_accessor';\n\nexport const /** @type {?} */ SELECT_MULTIPLE_VALUE_ACCESSOR: Provider = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SelectMultipleControlValueAccessor),\n multi: true\n};\n/**\n * @param {?} id\n * @param {?} value\n * @return {?}\n */\nfunction _buildValueString(id: string, value: any): string {\n if (id == null) return `${value}`;\n if (typeof value === 'string') value = `'${value}'`;\n if (value && typeof value === 'object') value = 'Object';\n return `${id}: ${value}`.slice(0, 50);\n}\n/**\n * @param {?} valueString\n * @return {?}\n */\nfunction _extractId(valueString: string): string {\n return valueString.split(':')[0];\n}\n\n/** Mock interface for HTML Options */\ninterface HTMLOption {\n value: string;\n selected: boolean;\n}\n/**\n * Mock interface for HTMLCollection\n * @abstract\n */\nabstract class HTMLCollection {\n length: number;\n/**\n * @abstract\n * @param {?} _\n * @return {?}\n */\nitem(_: number) {}\n}\n\nfunction HTMLCollection_tsickle_Closure_declarations() {\n/** @type {?} */\nHTMLCollection.prototype.length;\n}\n\n/**\n * The accessor for writing a value and listening to changes on a select element.\n * \n * ### Caveat: Options selection\n * \n * Angular uses object identity to select options. It's possible for the identities of items\n * to change while the data does not. This can happen, for example, if the items are produced\n * from an RPC to the server, and that RPC is re-run. Even if the data hasn't changed, the\n * second response will produce objects with different identities.\n * \n * To customize the default option comparison algorithm, `\n * \n * \n * \n * compareFn(c1: Country, c2: Country): boolean {\n * return c1 && c2 ? c1.id === c2.id : c1 === c2;\n * }\n * ```\n * \n * \\@stable\n */\nexport class SelectMultipleControlValueAccessor implements ControlValueAccessor {\n value: any;\n/**\n * \\@internal\n */\n_optionMap: Map = new Map();\n/**\n * \\@internal\n */\n_idCounter: number = 0;\n\n onChange = (_: any) => {};\n onTouched = () => {};\n/**\n * @param {?} fn\n * @return {?}\n */\nset compareWith(fn: (o1: any, o2: any) => boolean) {\n if (typeof fn !== 'function') {\n throw new Error(`compareWith must be a function, but received ${JSON.stringify(fn)}`);\n }\n this._compareWith = fn;\n }\nprivate _compareWith: (o1: any, o2: any) => boolean = looseIdentical;\n/**\n * @param {?} _renderer\n * @param {?} _elementRef\n */\nconstructor(private _renderer: Renderer2,\nprivate _elementRef: ElementRef) {}\n/**\n * @param {?} value\n * @return {?}\n */\nwriteValue(value: any): void {\n this.value = value;\n let /** @type {?} */ optionSelectedStateSetter: (opt: NgSelectMultipleOption, o: any) => void;\n if (Array.isArray(value)) {\n // convert values to ids\n const /** @type {?} */ ids = value.map((v) => this._getOptionId(v));\n optionSelectedStateSetter = (opt, o) => { opt._setSelected(ids.indexOf(o.toString()) > -1); };\n } else {\n optionSelectedStateSetter = (opt, o) => { opt._setSelected(false); };\n }\n this._optionMap.forEach(optionSelectedStateSetter);\n }\n/**\n * @param {?} fn\n * @return {?}\n */\nregisterOnChange(fn: (value: any) => any): void {\n this.onChange = (_: any) => {\n const /** @type {?} */ selected: Array = [];\n if (_.hasOwnProperty('selectedOptions')) {\n const /** @type {?} */ options: HTMLCollection = _.selectedOptions;\n for (let /** @type {?} */ i = 0; i < options.length; i++) {\n const /** @type {?} */ opt: any = options.item(i);\n const /** @type {?} */ val: any = this._getOptionValue(opt.value);\n selected.push(val);\n }\n }\n // Degrade on IE\n else {\n const /** @type {?} */ options: HTMLCollection = /** @type {?} */(( _.options));\n for (let /** @type {?} */ i = 0; i < options.length; i++) {\n const /** @type {?} */ opt: HTMLOption = options.item(i);\n if (opt.selected) {\n const /** @type {?} */ val: any = this._getOptionValue(opt.value);\n selected.push(val);\n }\n }\n }\n this.value = selected;\n fn(selected);\n };\n }\n/**\n * @param {?} fn\n * @return {?}\n */\nregisterOnTouched(fn: () => any): void { this.onTouched = fn; }\n/**\n * @param {?} isDisabled\n * @return {?}\n */\nsetDisabledState(isDisabled: boolean): void {\n this._renderer.setProperty(this._elementRef.nativeElement, 'disabled', isDisabled);\n }\n/**\n * \\@internal\n * @param {?} value\n * @return {?}\n */\n_registerOption(value: NgSelectMultipleOption): string {\n const /** @type {?} */ id: string = (this._idCounter++).toString();\n this._optionMap.set(id, value);\n return id;\n }\n/**\n * \\@internal\n * @param {?} value\n * @return {?}\n */\n_getOptionId(value: any): string|null {\n for (const /** @type {?} */ id of Array.from(this._optionMap.keys())) {\n if (this._compareWith( /** @type {?} */((this._optionMap.get(id)))._value, value)) return id;\n }\n return null;\n }\n/**\n * \\@internal\n * @param {?} valueString\n * @return {?}\n */\n_getOptionValue(valueString: string): any {\n const /** @type {?} */ id: string = _extractId(valueString);\n return this._optionMap.has(id) ? /** @type {?} */(( this._optionMap.get(id)))._value : valueString;\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Directive, args: [{\n selector:\n 'select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]',\n host: {'(change)': 'onChange($event.target)', '(blur)': 'onTouched()'},\n providers: [SELECT_MULTIPLE_VALUE_ACCESSOR]\n}, ] },\n];\n/**\n * @nocollapse\n */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: Renderer2, },\n{type: ElementRef, },\n];\nstatic propDecorators: {[key: string]: DecoratorInvocation[]} = {\n'compareWith': [{ type: Input },],\n};\n}\n\nfunction SelectMultipleControlValueAccessor_tsickle_Closure_declarations() {\n/** @type {?} */\nSelectMultipleControlValueAccessor.decorators;\n/**\n * @nocollapse\n * @type {?}\n */\nSelectMultipleControlValueAccessor.ctorParameters;\n/** @type {?} */\nSelectMultipleControlValueAccessor.propDecorators;\n/** @type {?} */\nSelectMultipleControlValueAccessor.prototype.value;\n/**\n * \\@internal\n * @type {?}\n */\nSelectMultipleControlValueAccessor.prototype._optionMap;\n/**\n * \\@internal\n * @type {?}\n */\nSelectMultipleControlValueAccessor.prototype._idCounter;\n/** @type {?} */\nSelectMultipleControlValueAccessor.prototype.onChange;\n/** @type {?} */\nSelectMultipleControlValueAccessor.prototype.onTouched;\n/** @type {?} */\nSelectMultipleControlValueAccessor.prototype._compareWith;\n/** @type {?} */\nSelectMultipleControlValueAccessor.prototype._renderer;\n/** @type {?} */\nSelectMultipleControlValueAccessor.prototype._elementRef;\n}\n\n/**\n * Marks `