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GAAAuH,aAAA,CAA0sqBC,MAAYC,OAAA,0lqBAAAC,cAAA,EAAAC,gBAAA,IAC/gwB,OAlDKvI,CAAW,KAwGXwI,EAAmC,MAAzC,MAAMA,EAAoC5J,SAC7BnC,KAAKiJ,UAAI,SAAA7G,GAAA,WAAAA,GAAwF2J,EAAmC,EAAkD5J,SACtLnC,KAAKgM,UAtJkF9C,MAAE,CAAAE,KAsJS2C,IAA6H5J,SAC/NnC,KAAKiM,UAvJkF/C,MAAE,IAwJrG,OAJK6C,CAAmC,KAYnCG,EAAiB,MAAvB,MAAMA,EAAkB/J,SACXnC,KAAKiJ,UAAI,SAAA7G,GAAA,WAAAA,GAAwF8J,EAAiB,EAAkD/J,SACpKnC,KAAKgM,UAlKkF9C,MAAE,CAAAE,KAkKS8C,IAAiN/J,SACnTnC,KAAKiM,UAnKkF/C,MAAE,CAAAiD,QAAA,CAmKsCC,KAAiBC,KAAiBN,EAAqCK,KAAiBL,KACnO,OAJKG,CAAiB","names":["FormStepAbstract","constructor","this","isError","isFirstWrite","errorStateMatcher","isErrorState","ctrl","invalid","dirty","touched","onChange","onTouched","ngOnInit","valueChangeSub","form","valueChanges","subscribe","getFormData","ngOnDestroy","unsubscribe","registerOnChange","fn","registerOnTouched","setDisabledState","isDisabled","disable","enable","writeValue","obj","reset","patchValue","validate","control","valid","error","getRawValue","static","t","_angular_core__WEBPACK_IMPORTED_MODULE_0__","lG2","inputs","_c0","_c1","_c2","MAT_CHECKBOX_DEFAULT_OPTIONS","InjectionToken","providedIn","factory","MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY","color","clickAction","MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR","provide","NG_VALUE_ACCESSOR","useExisting","forwardRef","MatCheckbox","multi","MatCheckboxChange","nextUniqueId","defaults","_MatCheckboxMixinBase","mixinTabIndex","mixinColor","mixinDisableRipple","mixinDisabled","_elementRef","_MatCheckboxBase","inputId","id","_uniqueId","required","_required","value","coerceBooleanProperty","idPrefix","elementRef","_changeDetectorRef","_ngZone","tabIndex","_animationMode","_options","super","ariaLabel","ariaLabelledby","labelPosition","name","change","EventEmitter","indeterminateChange","_onTouched","_currentAnimationClass","_currentCheckState","_controlValueAccessorChangeFn","_checked","_disabled","_indeterminate","defaultColor","parseInt","ngAfterViewInit","_syncIndeterminate","checked","markForCheck","disabled","newValue","indeterminate","changed","_transitionCheckState","emit","_isRippleDisabled","disableRipple","_onLabelTextChange","detectChanges","newState","oldState","element","_getAnimationTargetElement","classList","remove","_getAnimationClassForCheckStateTransition","length","add","animationClass","runOutsideAngular","setTimeout","_emitChangeEvent","_createChangeEvent","_inputElement","nativeElement","toggle","_handleInputClick","Promise","resolve","then","_onInteractionEvent","event","stopPropagation","_onBlur","_animationClasses","uncheckedToChecked","checkedToIndeterminate","uncheckedToIndeterminate","checkedToUnchecked","indeterminateToChecked","indeterminateToUnchecked","nativeCheckbox","ɵfac","i0","ɵdir","type","viewQuery","rf","ctx","MatRipple","_t","first","_labelElement","ripple","ariaDescribedby","outputs","features","changeDetectorRef","ngZone","animationMode","options","focus","isChecked","source","_onInputClick","_onTouchTargetClick","_preventBubblingFromLabel","target","contains","ANIMATION_MODULE_TYPE","ɵcmp","selectors","hostAttrs","hostVars","hostBindings","exportAs","ngContentSelectors","decls","vars","consts","template","$event","_r0","dependencies","i1","styles","encapsulation","changeDetection","_MatCheckboxRequiredValidatorModule","ɵmod","ɵinj","MatCheckboxModule","imports","MatCommonModule","MatRippleModule"],"sourceRoot":"webpack:///","sources":["./src/app/shared/components/abstract/form-step.abstract.ts","./node_modules/@angular/material/fesm2022/checkbox.mjs"],"sourcesContent":["import { Directive, Input, OnDestroy, OnInit } from '@angular/core';\nimport {\n AbstractControl,\n ControlValueAccessor,\n FormControl,\n FormGroup,\n ValidationErrors,\n Validator\n} from '@angular/forms';\nimport { ErrorStateMatcher } from '@angular/material/core';\nimport { Subscription } from 'rxjs';\n\n@Directive()\nexport abstract class FormStepAbstract implements ControlValueAccessor, Validator, OnInit, OnDestroy {\n @Input() isError: boolean = false;\n\n form: FormGroup | FormControl;\n valueChangeSub: Subscription;\n\n private isFirstWrite: boolean = true;\n\n public errorStateMatcher: ErrorStateMatcher = {\n isErrorState: (ctrl): boolean => {\n if(!ctrl) {return false}\n\n return ctrl.invalid && (ctrl.dirty || ctrl.touched || this.isError);\n }\n };\n\n ngOnInit(): void {\n this.valueChangeSub = this.form.valueChanges.subscribe(() => {\n this.onChange(this.getFormData());\n });\n }\n\n ngOnDestroy(): void {\n this.valueChangeSub?.unsubscribe();\n }\n\n onChange: any = () => {};\n onTouched: any = () => {};\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n this.onChange(this.getFormData());\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n isDisabled ? this.form.disable() : this.form.enable();\n }\n\n writeValue(obj: any): void {\n if (obj === null && !this.isFirstWrite) {\n this.form.reset();\n }\n this.isFirstWrite = false;\n\n if(obj) {\n this.form.patchValue(obj);\n }\n\n this.isFirstWrite = false;\n }\n\n validate(control: AbstractControl): ValidationErrors | null {\n return this.form.valid ? null : {error: 'error'};\n }\n\n protected getFormData(): any {\n return this.form.getRawValue();\n }\n}\n","import * as i0 from '@angular/core';\nimport { InjectionToken, forwardRef, EventEmitter, Directive, Input, Output, ViewChild, Component, ViewEncapsulation, ChangeDetectionStrategy, Attribute, Optional, Inject, NgModule } from '@angular/core';\nimport { NG_VALUE_ACCESSOR, NG_VALIDATORS, CheckboxRequiredValidator } from '@angular/forms';\nimport * as i1 from '@angular/material/core';\nimport { mixinTabIndex, mixinColor, mixinDisableRipple, mixinDisabled, MatRipple, MatCommonModule, MatRippleModule } from '@angular/material/core';\nimport { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\n\n/** Injection token to be used to override the default options for `mat-checkbox`. */\nconst MAT_CHECKBOX_DEFAULT_OPTIONS = new InjectionToken('mat-checkbox-default-options', {\n providedIn: 'root',\n factory: MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY,\n});\n/** @docs-private */\nfunction MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY() {\n return {\n color: 'accent',\n clickAction: 'check-indeterminate',\n };\n}\n\nconst MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatCheckbox),\n multi: true,\n};\n/** Change event object emitted by checkbox. */\nclass MatCheckboxChange {\n}\n// Increasing integer for generating unique ids for checkbox components.\nlet nextUniqueId = 0;\n// Default checkbox configuration.\nconst defaults = MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY();\n// Boilerplate for applying mixins to MatCheckbox.\n/** @docs-private */\nconst _MatCheckboxMixinBase = mixinTabIndex(mixinColor(mixinDisableRipple(mixinDisabled(class {\n constructor(_elementRef) {\n this._elementRef = _elementRef;\n }\n}))));\nclass _MatCheckboxBase extends _MatCheckboxMixinBase {\n /** Returns the unique id for the visual hidden input. */\n get inputId() {\n return `${this.id || this._uniqueId}-input`;\n }\n /** Whether the checkbox is required. */\n get required() {\n return this._required;\n }\n set required(value) {\n this._required = coerceBooleanProperty(value);\n }\n constructor(idPrefix, elementRef, _changeDetectorRef, _ngZone, tabIndex, _animationMode, _options) {\n super(elementRef);\n this._changeDetectorRef = _changeDetectorRef;\n this._ngZone = _ngZone;\n this._animationMode = _animationMode;\n this._options = _options;\n /**\n * Attached to the aria-label attribute of the host element. In most cases, aria-labelledby will\n * take precedence so this may be omitted.\n */\n this.ariaLabel = '';\n /**\n * Users can specify the `aria-labelledby` attribute which will be forwarded to the input element\n */\n this.ariaLabelledby = null;\n /** Whether the label should appear after or before the checkbox. Defaults to 'after' */\n this.labelPosition = 'after';\n /** Name value will be applied to the input element if present */\n this.name = null;\n /** Event emitted when the checkbox's `checked` value changes. */\n this.change = new EventEmitter();\n /** Event emitted when the checkbox's `indeterminate` value changes. */\n this.indeterminateChange = new EventEmitter();\n /**\n * Called when the checkbox is blurred. Needed to properly implement ControlValueAccessor.\n * @docs-private\n */\n this._onTouched = () => { };\n this._currentAnimationClass = '';\n this._currentCheckState = 0 /* TransitionCheckState.Init */;\n this._controlValueAccessorChangeFn = () => { };\n this._checked = false;\n this._disabled = false;\n this._indeterminate = false;\n this._options = this._options || defaults;\n this.color = this.defaultColor = this._options.color || defaults.color;\n this.tabIndex = parseInt(tabIndex) || 0;\n this.id = this._uniqueId = `${idPrefix}${++nextUniqueId}`;\n }\n ngAfterViewInit() {\n this._syncIndeterminate(this._indeterminate);\n }\n /** Whether the checkbox is checked. */\n get checked() {\n return this._checked;\n }\n set checked(value) {\n const checked = coerceBooleanProperty(value);\n if (checked != this.checked) {\n this._checked = checked;\n this._changeDetectorRef.markForCheck();\n }\n }\n /**\n * Whether the checkbox is disabled. This fully overrides the implementation provided by\n * mixinDisabled, but the mixin is still required because mixinTabIndex requires it.\n */\n get disabled() {\n return this._disabled;\n }\n set disabled(value) {\n const newValue = coerceBooleanProperty(value);\n if (newValue !== this.disabled) {\n this._disabled = newValue;\n this._changeDetectorRef.markForCheck();\n }\n }\n /**\n * Whether the checkbox is indeterminate. This is also known as \"mixed\" mode and can be used to\n * represent a checkbox with three states, e.g. a checkbox that represents a nested list of\n * checkable items. Note that whenever checkbox is manually clicked, indeterminate is immediately\n * set to false.\n */\n get indeterminate() {\n return this._indeterminate;\n }\n set indeterminate(value) {\n const changed = value != this._indeterminate;\n this._indeterminate = coerceBooleanProperty(value);\n if (changed) {\n if (this._indeterminate) {\n this._transitionCheckState(3 /* TransitionCheckState.Indeterminate */);\n }\n else {\n this._transitionCheckState(this.checked ? 1 /* TransitionCheckState.Checked */ : 2 /* TransitionCheckState.Unchecked */);\n }\n this.indeterminateChange.emit(this._indeterminate);\n }\n this._syncIndeterminate(this._indeterminate);\n }\n _isRippleDisabled() {\n return this.disableRipple || this.disabled;\n }\n /** Method being called whenever the label text changes. */\n _onLabelTextChange() {\n // Since the event of the `cdkObserveContent` directive runs outside of the zone, the checkbox\n // component will be only marked for check, but no actual change detection runs automatically.\n // Instead of going back into the zone in order to trigger a change detection which causes\n // *all* components to be checked (if explicitly marked or not using OnPush), we only trigger\n // an explicit change detection for the checkbox view and its children.\n this._changeDetectorRef.detectChanges();\n }\n // Implemented as part of ControlValueAccessor.\n writeValue(value) {\n this.checked = !!value;\n }\n // Implemented as part of ControlValueAccessor.\n registerOnChange(fn) {\n this._controlValueAccessorChangeFn = fn;\n }\n // Implemented as part of ControlValueAccessor.\n registerOnTouched(fn) {\n this._onTouched = fn;\n }\n // Implemented as part of ControlValueAccessor.\n setDisabledState(isDisabled) {\n this.disabled = isDisabled;\n }\n _transitionCheckState(newState) {\n let oldState = this._currentCheckState;\n let element = this._getAnimationTargetElement();\n if (oldState === newState || !element) {\n return;\n }\n if (this._currentAnimationClass) {\n element.classList.remove(this._currentAnimationClass);\n }\n this._currentAnimationClass = this._getAnimationClassForCheckStateTransition(oldState, newState);\n this._currentCheckState = newState;\n if (this._currentAnimationClass.length > 0) {\n element.classList.add(this._currentAnimationClass);\n // Remove the animation class to avoid animation when the checkbox is moved between containers\n const animationClass = this._currentAnimationClass;\n this._ngZone.runOutsideAngular(() => {\n setTimeout(() => {\n element.classList.remove(animationClass);\n }, 1000);\n });\n }\n }\n _emitChangeEvent() {\n this._controlValueAccessorChangeFn(this.checked);\n this.change.emit(this._createChangeEvent(this.checked));\n // Assigning the value again here is redundant, but we have to do it in case it was\n // changed inside the `change` listener which will cause the input to be out of sync.\n if (this._inputElement) {\n this._inputElement.nativeElement.checked = this.checked;\n }\n }\n /** Toggles the `checked` state of the checkbox. */\n toggle() {\n this.checked = !this.checked;\n this._controlValueAccessorChangeFn(this.checked);\n }\n _handleInputClick() {\n const clickAction = this._options?.clickAction;\n // If resetIndeterminate is false, and the current state is indeterminate, do nothing on click\n if (!this.disabled && clickAction !== 'noop') {\n // When user manually click on the checkbox, `indeterminate` is set to false.\n if (this.indeterminate && clickAction !== 'check') {\n Promise.resolve().then(() => {\n this._indeterminate = false;\n this.indeterminateChange.emit(this._indeterminate);\n });\n }\n this._checked = !this._checked;\n this._transitionCheckState(this._checked ? 1 /* TransitionCheckState.Checked */ : 2 /* TransitionCheckState.Unchecked */);\n // Emit our custom change event if the native input emitted one.\n // It is important to only emit it, if the native input triggered one, because\n // we don't want to trigger a change event, when the `checked` variable changes for example.\n this._emitChangeEvent();\n }\n else if (!this.disabled && clickAction === 'noop') {\n // Reset native input when clicked with noop. The native checkbox becomes checked after\n // click, reset it to be align with `checked` value of `mat-checkbox`.\n this._inputElement.nativeElement.checked = this.checked;\n this._inputElement.nativeElement.indeterminate = this.indeterminate;\n }\n }\n _onInteractionEvent(event) {\n // We always have to stop propagation on the change event.\n // Otherwise the change event, from the input element, will bubble up and\n // emit its event object to the `change` output.\n event.stopPropagation();\n }\n _onBlur() {\n // When a focused element becomes disabled, the browser *immediately* fires a blur event.\n // Angular does not expect events to be raised during change detection, so any state change\n // (such as a form control's 'ng-touched') will cause a changed-after-checked error.\n // See https://github.com/angular/angular/issues/17793. To work around this, we defer\n // telling the form control it has been touched until the next tick.\n Promise.resolve().then(() => {\n this._onTouched();\n this._changeDetectorRef.markForCheck();\n });\n }\n _getAnimationClassForCheckStateTransition(oldState, newState) {\n // Don't transition if animations are disabled.\n if (this._animationMode === 'NoopAnimations') {\n return '';\n }\n switch (oldState) {\n case 0 /* TransitionCheckState.Init */:\n // Handle edge case where user interacts with checkbox that does not have [(ngModel)] or\n // [checked] bound to it.\n if (newState === 1 /* TransitionCheckState.Checked */) {\n return this._animationClasses.uncheckedToChecked;\n }\n else if (newState == 3 /* TransitionCheckState.Indeterminate */) {\n return this._checked\n ? this._animationClasses.checkedToIndeterminate\n : this._animationClasses.uncheckedToIndeterminate;\n }\n break;\n case 2 /* TransitionCheckState.Unchecked */:\n return newState === 1 /* TransitionCheckState.Checked */\n ? this._animationClasses.uncheckedToChecked\n : this._animationClasses.uncheckedToIndeterminate;\n case 1 /* TransitionCheckState.Checked */:\n return newState === 2 /* TransitionCheckState.Unchecked */\n ? this._animationClasses.checkedToUnchecked\n : this._animationClasses.checkedToIndeterminate;\n case 3 /* TransitionCheckState.Indeterminate */:\n return newState === 1 /* TransitionCheckState.Checked */\n ? this._animationClasses.indeterminateToChecked\n : this._animationClasses.indeterminateToUnchecked;\n }\n return '';\n }\n /**\n * Syncs the indeterminate value with the checkbox DOM node.\n *\n * We sync `indeterminate` directly on the DOM node, because in Ivy the check for whether a\n * property is supported on an element boils down to `if (propName in element)`. Domino's\n * HTMLInputElement doesn't have an `indeterminate` property so Ivy will warn during\n * server-side rendering.\n */\n _syncIndeterminate(value) {\n const nativeCheckbox = this._inputElement;\n if (nativeCheckbox) {\n nativeCheckbox.nativeElement.indeterminate = value;\n }\n }\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"16.1.1\", ngImport: i0, type: _MatCheckboxBase, deps: \"invalid\", target: i0.ɵɵFactoryTarget.Directive }); }\n static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"16.1.1\", type: _MatCheckboxBase, inputs: { ariaLabel: [\"aria-label\", \"ariaLabel\"], ariaLabelledby: [\"aria-labelledby\", \"ariaLabelledby\"], ariaDescribedby: [\"aria-describedby\", \"ariaDescribedby\"], id: \"id\", required: \"required\", labelPosition: \"labelPosition\", name: \"name\", value: \"value\", checked: \"checked\", disabled: \"disabled\", indeterminate: \"indeterminate\" }, outputs: { change: \"change\", indeterminateChange: \"indeterminateChange\" }, viewQueries: [{ propertyName: \"_inputElement\", first: true, predicate: [\"input\"], descendants: true }, { propertyName: \"_labelElement\", first: true, predicate: [\"label\"], descendants: true }, { propertyName: \"ripple\", first: true, predicate: MatRipple, descendants: true }], usesInheritance: true, ngImport: i0 }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"16.1.1\", ngImport: i0, type: _MatCheckboxBase, decorators: [{\n type: Directive\n }], ctorParameters: function () { return [{ type: undefined }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: undefined }, { type: undefined }, { type: undefined }]; }, propDecorators: { ariaLabel: [{\n type: Input,\n args: ['aria-label']\n }], ariaLabelledby: [{\n type: Input,\n args: ['aria-labelledby']\n }], ariaDescribedby: [{\n type: Input,\n args: ['aria-describedby']\n }], id: [{\n type: Input\n }], required: [{\n type: Input\n }], labelPosition: [{\n type: Input\n }], name: [{\n type: Input\n }], change: [{\n type: Output\n }], indeterminateChange: [{\n type: Output\n }], value: [{\n type: Input\n }], _inputElement: [{\n type: ViewChild,\n args: ['input']\n }], _labelElement: [{\n type: ViewChild,\n args: ['label']\n }], ripple: [{\n type: ViewChild,\n args: [MatRipple]\n }], checked: [{\n type: Input\n }], disabled: [{\n type: Input\n }], indeterminate: [{\n type: Input\n }] } });\nclass MatCheckbox extends _MatCheckboxBase {\n constructor(elementRef, changeDetectorRef, ngZone, tabIndex, animationMode, options) {\n super('mat-mdc-checkbox-', elementRef, changeDetectorRef, ngZone, tabIndex, animationMode, options);\n this._animationClasses = {\n uncheckedToChecked: 'mdc-checkbox--anim-unchecked-checked',\n uncheckedToIndeterminate: 'mdc-checkbox--anim-unchecked-indeterminate',\n checkedToUnchecked: 'mdc-checkbox--anim-checked-unchecked',\n checkedToIndeterminate: 'mdc-checkbox--anim-checked-indeterminate',\n indeterminateToChecked: 'mdc-checkbox--anim-indeterminate-checked',\n indeterminateToUnchecked: 'mdc-checkbox--anim-indeterminate-unchecked',\n };\n }\n /** Focuses the checkbox. */\n focus() {\n this._inputElement.nativeElement.focus();\n }\n _createChangeEvent(isChecked) {\n const event = new MatCheckboxChange();\n event.source = this;\n event.checked = isChecked;\n return event;\n }\n _getAnimationTargetElement() {\n return this._inputElement?.nativeElement;\n }\n _onInputClick() {\n super._handleInputClick();\n }\n _onTouchTargetClick() {\n super._handleInputClick();\n if (!this.disabled) {\n // Normally the input should be focused already, but if the click\n // comes from the touch target, then we might have to focus it ourselves.\n this._inputElement.nativeElement.focus();\n }\n }\n /**\n * Prevent click events that come from the `