text: !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("@angular/core"),require("@angular/forms"),require("@angular/material-experimental/mdc-form-field"),require("@angular/material/icon"),require("@angular/cdk/a11y"),require("@angular/cdk/coercion"),require("rxjs")):"function"==typeof define&&define.amd?define("@angular/components-examples/material-experimental/mdc-form-field",["exports","@angular/common","@angular/core","@angular/forms","@angular/material-experimental/mdc-form-field","@angular/material/icon","@angular/cdk/a11y","@angular/cdk/coercion","rxjs"],t):t(((e=e||self).ng=e.ng||{},e.ng.componentsExamples=e.ng.componentsExamples||{},e.ng.componentsExamples.materialExperimental=e.ng.componentsExamples.materialExperimental||{},e.ng.componentsExamples.materialExperimental.mdcFormField={}),e.ng.common,e.ng.core,e.ng.forms,e.ng.materialExperimental.mdcFormField,e.ng.material.icon,e.ng.cdk.a11y,e.ng.cdk.coercion,e.rxjs)}(this,(function(e,t,n,r,o,i,a,l,s){"use strict";
  /*! *****************************************************************************
      Copyright (c) Microsoft Corporation.
  
      Permission to use, copy, modify, and/or distribute this software for any
      purpose with or without fee is hereby granted.
  
      THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
      REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
      AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
      INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
      LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
      OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
      PERFORMANCE OF THIS SOFTWARE.
      ***************************************************************************** */var u=function(){function e(){}return e.ɵfac=function t(n){return new(n||e)},e.ɵcmp=n.ɵɵdefineComponent({type:e,selectors:[["mdc-form-field-custom-control-example"]],decls:8,vars:0,consts:[["required",""],["matSuffix",""]],template:function e(t,r){1&t&&(n.ɵɵelementStart(0,"mat-form-field"),n.ɵɵelementStart(1,"mat-label"),n.ɵɵtext(2,"Phone number"),n.ɵɵelementEnd(),n.ɵɵelement(3,"example-tel-input",0),n.ɵɵelementStart(4,"mat-icon",1),n.ɵɵtext(5,"phone"),n.ɵɵelementEnd(),n.ɵɵelementStart(6,"mat-hint"),n.ɵɵtext(7,"Include area code"),n.ɵɵelementEnd(),n.ɵɵelementEnd())},directives:function(){return[o.MatFormField,o.MatLabel,d,i.MatIcon,o.MatSuffix,o.MatHint]},encapsulation:2}),e}(),c=function c(e,t,n){this.area=e,this.exchange=t,this.subscriber=n},d=function(){function e(t,n,o,i){var a=this;this._focusMonitor=n,this._elementRef=o,this.ngControl=i,this.stateChanges=new s.Subject,this.focused=!1,this.errorState=!1,this.controlType="example-tel-input",this.id="example-tel-input-"+e.nextId++,this.describedBy="",this.onChange=function(e){},this.onTouched=function(){},this._required=!1,this._disabled=!1,this.parts=t.group({area:[null,[r.Validators.required,r.Validators.minLength(3),r.Validators.maxLength(3)]],exchange:[null,[r.Validators.required,r.Validators.minLength(3),r.Validators.maxLength(3)]],subscriber:[null,[r.Validators.required,r.Validators.minLength(4),r.Validators.maxLength(4)]]}),n.monitor(o,!0).subscribe((function(e){a.focused&&!e&&a.onTouched(),a.focused=!!e,a.stateChanges.next()})),null!=this.ngControl&&(this.ngControl.valueAccessor=this)}return Object.defineProperty(e.prototype,"empty",{get:function(){var e=this.parts.value;return!e.area&&!e.exchange&&!e.subscriber},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shouldLabelFloat",{get:function(){return this.focused||!this.empty},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"placeholder",{get:function(){return this._placeholder},set:function(e){this._placeholder=e,this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return this._required},set:function(e){this._required=l.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(e){this._disabled=l.coerceBooleanProperty(e),this._disabled?this.parts.disable():this.parts.enable(),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){if(this.parts.valid){var e=this.parts.value;return new c(e.area,e.exchange,e.subscriber)}return null},set:function(e){var t=e||new c("","","");this.parts.setValue({area:t.area,exchange:t.exchange,subscriber:t.subscriber}),this.stateChanges.next()},enumerable:!1,configurable:!0}),e.prototype.ngOnDestroy=function(){this.stateChanges.complete(),this._focusMonitor.stopMonitoring(this._elementRef)},e.prototype.setDescribedByIds=function(e){this.describedBy=e.join(" ")},e.prototype.onContainerClick=function(e){"input"!=e.target.tagName.toLowerCase()&&this._elementRef.nativeElement.querySelector("input").focus()},e.prototype.writeValue=function(e){this.value=e},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype._handleInput=function(){this.onChange(this.value)},e.nextId=0,e.ɵfac=function t(o){return new(o||e)(n.ɵɵdirectiveInject(r.FormBuilder),n.ɵɵdirectiveInject(a.FocusMonitor),n.ɵɵdirectiveInject(n.ElementRef),n.ɵɵdirectiveInject(r.NgControl,10))},e.ɵcmp=n.ɵɵdefineComponent({type:e,selectors:[["example-tel-input"]],hostVars:4,hostBindings:function e(t,r){2&t&&(n.ɵɵhostProperty("id",r.id),n.ɵɵattribute("aria-describedby",r.describedBy),n.ɵɵclassProp("example-floating",r.shouldLabelFloat))},inputs:{placeholder:"placeholder",required:"required",disabled:"disabled",value:"value"},features:[n.ɵɵProvidersFeature([{provide:o.MatFormFieldControl,useExisting:e}])],decls:8,vars:1,consts:[[1,"example-tel-input-container",3,"formGroup"],["formControlName","area","size","3","aria-label","Area code",1,"example-tel-input-element",3,"input"],[1,"example-tel-input-spacer"],["formControlName","exchange","size","3","aria-label","Exchange code",1,"example-tel-input-element",3,"input"],["formControlName","subscriber","size","4","aria-label","Subscriber number",1,"example-tel-input-element",3,"input"]],template:function e(t,r){1&t&&(n.ɵɵelementStart(0,"div",0),n.ɵɵelementStart(1,"input",1),n.ɵɵlistener("input",(function e(){return r._handleInput()})),n.ɵɵelementEnd(),n.ɵɵelementStart(2,"span",2),n.ɵɵtext(3,"–"),n.ɵɵelementEnd(),n.ɵɵelementStart(4,"input",3),n.ɵɵlistener("input",(function e(){return r._handleInput()})),n.ɵɵelementEnd(),n.ɵɵelementStart(5,"span",2),n.ɵɵtext(6,"–"),n.ɵɵelementEnd(),n.ɵɵelementStart(7,"input",4),n.ɵɵlistener("input",(function e(){return r._handleInput()})),n.ɵɵelementEnd(),n.ɵɵelementEnd()),2&t&&n.ɵɵproperty("formGroup",r.parts)},directives:[r.NgControlStatusGroup,r.FormGroupDirective,r.DefaultValueAccessor,r.NgControlStatus,r.FormControlName],styles:[".example-tel-input-container[_ngcontent-%COMP%] {\n  display: flex;\n}\n\n.example-tel-input-element[_ngcontent-%COMP%] {\n  border: none;\n  background: none;\n  padding: 0;\n  outline: none;\n  font: inherit;\n  text-align: center;\n}\n\n.example-tel-input-spacer[_ngcontent-%COMP%] {\n  opacity: 0;\n  transition: opacity 200ms;\n}\n\n.example-floating[_nghost-%COMP%]   .example-tel-input-spacer[_ngcontent-%COMP%] {\n  opacity: 1;\n}"]}),e}(),p=function(){function e(){}return e.ɵmod=n.ɵɵdefineNgModule({type:e}),e.ɵinj=n.ɵɵdefineInjector({factory:function t(n){return new(n||e)},imports:[[t.CommonModule,o.MatFormFieldModule,i.MatIconModule,r.ReactiveFormsModule]]}),e}();("undefined"==typeof ngJitMode||ngJitMode)&&n.ɵɵsetNgModuleScope(p,{declarations:[u,d],imports:[t.CommonModule,o.MatFormFieldModule,i.MatIconModule,r.ReactiveFormsModule],exports:[u,d]}),e.MdcFormFieldCustomControlExample=u,e.MdcFormFieldExamplesModule=p,e.MyTelInput=d,Object.defineProperty(e,"__esModule",{value:!0})}));