@ptsecurity/mosaic 8.5.6 → 8.5.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,8 +14,8 @@ type:t.Component,args:[{selector:"mc-modal",template:'<ng-template #tplOriginCon
14
14
  var t=i.coerceBooleanProperty(e);this._mcVisible!==t&&(this._mcVisible=t,this.updateCompValue("mcVisible",t),t?this.show():this.hide())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this.isPopoverOpen},enumerable:!0,configurable:!0}),e.prototype.createOverlay=function(){var e=this;this.overlayRef&&this.overlayRef.dispose();var t=this.overlay.position().flexibleConnectedTo(this.elementRef).withTransformOriginOn(".mc-popover").withFlexibleDimensions(!1).withViewportMargin(8).withPositions(Ye.slice()),n=this.scrollDispatcher.getAncestorScrollContainers(this.elementRef);return t.withScrollableContainers(n),t.positionChanges.pipe(m.takeUntil(this.destroyed)).subscribe(function(t){e.popover&&(e.onPositionChange(t),t.scrollableViewProperties.isOverlayClipped&&e.popover.mcVisible&&e.ngZone.run(function(){return e.hide()}))}),this.overlayRef=this.overlay.create({direction:this.direction,positionStrategy:t,panelClass:"mc-popover__panel",scrollStrategy:this.scrollStrategy(),hasBackdrop:this.mcTrigger===lo.Click,backdropClass:"no-class"}),this.updateOverlayBackdropClick(),this.updatePosition(),this.overlayRef.detachments().pipe(m.takeUntil(this.destroyed)).subscribe(function(){return e.detach()}),this.overlayRef},e.prototype.detach=function(){this.overlayRef&&this.overlayRef.hasAttached()&&this.overlayRef.detach(),this.popover=null},e.prototype.onPositionChange=function(e){var t=this,n=this.mcPlacement;Object.keys(this.availablePositions).some(function(i){return e.connectionPair.originX===t.availablePositions[i].originX&&e.connectionPair.originY===t.availablePositions[i].originY&&e.connectionPair.overlayX===t.availablePositions[i].overlayX&&e.connectionPair.overlayY===t.availablePositions[i].overlayY&&(n=i,!0)}),this.updateCompValue("mcPlacement",n),this.mcPositionStrategyPlacementChange.emit(n),this.popover&&(this.updateCompValue("classList",this.classList),this.popover.markForCheck()),this.defaultPositionsMap[n]||this.handlePositionUpdate(n)},e.prototype.handlePositionUpdate=function(e){this.overlayRef||(this.overlayRef=this.createOverlay());var t=this.overlayRef.overlayElement.style,n=this.hostView.element.nativeElement.clientHeight,i=this.hostView.element.nativeElement.clientWidth,o=Math.floor(n/2),r=Math.floor(i/2-6),a={top:o,bottom:o,right:r,left:r},s=e.split(/(?=[A-Z])/)[1].toLowerCase();("top"===s||"bottom"===s)&&n>44||("left"===s||"right"===s)&&i>44||(this.overlayRef.overlayElement.style[s]||(this.overlayRef.overlayElement.style[s]="0px"),this.overlayRef.overlayElement.style[s]=parseInt(t[s].split("px")[0],10)+a[s]-20+"px")},e.prototype.updateCompValue=function(e,t){this.isDynamicPopover&&t&&this.popover&&(this.popover[e]=t)},e.prototype.ngOnInit=function(){this.initElementRefListeners()},e.prototype.ngOnDestroy=function(){var e=this;this.overlayRef&&this.overlayRef.dispose(),this.manualListeners.forEach(function(t,n){e.elementRef.nativeElement.removeEventListener(n,t)}),this.manualListeners.clear(),this.$unsubscribe.next(),this.$unsubscribe.complete()},e.prototype.handleKeydown=function(e){this.isOpen&&e.keyCode===a.ESCAPE&&this.hide()},e.prototype.handleTouchend=function(){this.hide()},e.prototype.initElementRefListeners=function(){var e=this;this.mcTrigger===lo.Click?this.manualListeners.set("click",function(){return e.show()}).forEach(function(t,n){e.elementRef.nativeElement.addEventListener(n,t)}):this.mcTrigger===lo.Hover?this.manualListeners.set("mouseenter",function(){return e.show()}).set("mouseleave",function(){return e.hide()}).forEach(function(t,n){e.elementRef.nativeElement.addEventListener(n,t)}):this.mcTrigger===lo.Focus&&this.manualListeners.set("focus",function(){return e.show()}).set("blur",function(){return e.hide()}).forEach(function(t,n){e.elementRef.nativeElement.addEventListener(n,t)})},e.prototype.registerResizeHandler=function(){var e=this;this.ngZone.runOutsideAngular(function(){window.addEventListener("resize",e.resizeListener)})},e.prototype.deregisterResizeHandler=function(){window.removeEventListener("resize",this.resizeListener)},e.prototype.resetListeners=function(){var e=this;this.manualListeners.size&&(this.manualListeners.forEach(function(t,n){e.elementRef.nativeElement.removeEventListener(n,t)}),this.manualListeners.clear(),this.initElementRefListeners())},e.prototype.show=function(){var e=this;if(!this.disabled){if(!this.popover){this.detach();var t=this.createOverlay();this.portal=this.portal||new d.ComponentPortal(uo,this.hostView),this.popover=t.attach(this.portal).instance,this.popover.afterHidden().pipe(m.takeUntil(this.destroyed)).subscribe(function(){return e.detach()}),this.isDynamicPopover=!0;["mcPlacement","mcPopoverSize","mcTrigger","mcMouseEnterDelay","mcMouseLeaveDelay","classList","mcVisible","mcHeader","mcContent","mcFooter"].forEach(function(t){return e.updateCompValue(t,e[t])}),this.popover.mcVisibleChange.pipe(m.takeUntil(this.$unsubscribe),m.distinctUntilChanged()).subscribe(function(t){e.mcVisible=t,e.mcVisibleChange.emit(t),e.isPopoverOpen=t})}this.popover.show()}},e.prototype.hide=function(){this.popover&&this.popover.hide()},e.prototype.updateOverlayBackdropClick=function(){var e=this;this.mcTrigger===lo.Click&&this.overlayRef?this.backDropSubscription=this.overlayRef.backdropClick().subscribe(function(){e.popover&&e.popover.hide()}):this.backDropSubscription&&this.overlayRef&&(this.backDropSubscription.unsubscribe(),this.overlayRef.detachBackdrop())},e.prototype.updatePosition=function(e){void 0===e&&(e=!1),this.overlayRef||(this.overlayRef=this.createOverlay());var t=this.overlayRef.getConfig().positionStrategy;t.withPositions(this.getPrioritizedPositions()).withPush(!0),e&&setTimeout(function(){t.reapplyLastPosition()})},e.prototype.getPriorityPlacementStrategy=function(e){var t=this,n=[],i=Object.keys(this.availablePositions);return Array.isArray(e)?e.forEach(function(e){i.indexOf(e)>-1&&n.push(t.availablePositions[e])}):i.indexOf(e)>-1&&n.push(this.availablePositions[e]),n},e.prototype.getPrioritizedPositions=function(){return this.mcPlacementPriority?this.getPriorityPlacementStrategy(this.mcPlacementPriority):nt[this.mcPlacement]},e.decorators=[{type:t.Directive,args:[{selector:"[mcPopover]",exportAs:"mcPopover",host:{"(keydown)":"handleKeydown($event)","(touchend)":"handleTouchend()","[class.mc-popover_open]":"isOpen"}}]}],e.ctorParameters=function(){return[{type:c.Overlay},{type:t.ElementRef},{type:t.NgZone},{type:c.ScrollDispatcher},{type:t.ViewContainerRef},{type:void 0,decorators:[{type:t.Inject,args:[ho]}]},{type:n.Directionality,decorators:[{type:t.Optional}]}]},e.propDecorators={mcVisibleChange:[{type:t.Output,args:["mcPopoverVisibleChange"]}],mcPositionStrategyPlacementChange:[{type:t.Output,args:["mcPopoverPositionStrategyPlacementChange"]}],mcHeader:[{type:t.Input,args:["mcPopoverHeader"]}],mcContent:[{type:t.Input,args:["mcPopoverContent"]}],mcFooter:[{type:t.Input,args:["mcPopoverFooter"]}],disabled:[{type:t.Input,args:["mcPopoverDisabled"]}],mcMouseEnterDelay:[{type:t.Input,args:["mcPopoverMouseEnterDelay"]}],mcMouseLeaveDelay:[{type:t.Input,args:["mcPopoverMouseLeaveDelay"]}],mcTrigger:[{type:t.Input,args:["mcPopoverTrigger"]}],mcPopoverSize:[{type:t.Input,args:["mcPopoverSize"]}],mcPlacementPriority:[{type:t.Input,args:["mcPopoverPlacementPriority"]}],mcPlacement:[{type:t.Input,args:["mcPopoverPlacement"]}],classList:[{type:t.Input,args:["mcPopoverClass"]}],mcVisible:[{type:t.Input,args:["mcPopoverVisible"]}]},e}(),fo=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{declarations:[uo,go],exports:[y.A11yModule,uo,go],imports:[r.CommonModule,c.OverlayModule],providers:[mo],entryComponents:[uo]}]}],e}(),yo=0,bo=function(){function e(e){this._elementRef=e}return e}(),vo=O(bo),Co=function(e){function n(t){var n=e.call(this,t)||this;return n.id="mc-progress-bar-"+yo++,n.value=0,n.mode="determinate",n.color=ve.Primary,n}return v(n,e),Object.defineProperty(n.prototype,"percentage",{get:function(){return Math.max(0,Math.min(100,this.value))/100},enumerable:!0,configurable:!0}),n.decorators=[{type:t.Component,args:[{selector:"mc-progress-bar",template:'<div class="mc-progress-bar__inner" [ngSwitch]="mode" [id]="id"><div *ngSwitchCase="\'indeterminate\'" class="mc-progress-bar__line mc-progress-bar__line--indeterminate"></div><div *ngSwitchDefault class="mc-progress-bar__line mc-progress-bar__line--determinate" [ngStyle]="{transform: \'scaleX(\' + percentage + \')\'}"></div></div>',styles:["@keyframes mc-progress-bar-indeterminate{0%{transform:scaleX(.25) translateX(-150%)}100%{transform:scaleX(.4) translateX(250%)}}.mc-progress-bar{display:block;height:4px;overflow:hidden}.mc-progress-bar__inner{height:100%}.mc-progress-bar__line{height:100%;transform-origin:top left}.mc-progress-bar__line--determinate{transition:transform .3s}.mc-progress-bar__line--indeterminate{animation:mc-progress-bar-indeterminate 2.1s cubic-bezier(.455,.03,.515,.955) infinite}"],changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,host:{class:"mc-progress-bar","[attr.id]":"id"}}]}],n.ctorParameters=function(){return[{type:t.ElementRef}]},n.propDecorators={id:[{type:t.Input}],value:[{type:t.Input}],mode:[{type:t.Input}],color:[{type:t.Input}]},n}(vo),_o=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,h.PlatformModule],exports:[Co],declarations:[Co]}]}],e}(),xo=0,wo=function(){function e(e){this._elementRef=e}return e}(),Oo=O(wo),ko=function(e){function n(t){var n=e.call(this,t)||this;return n.id="mc-progress-spinner-"+xo++,n.value=0,n.mode="determinate",n.color=ve.Primary,n}return v(n,e),Object.defineProperty(n.prototype,"percentage",{get:function(){return Math.max(0,Math.min(100,this.value))/100},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"dashOffsetPercent",{get:function(){return 273-273*this.percentage+"%"},enumerable:!0,configurable:!0}),n.decorators=[{type:t.Component,args:[{selector:"mc-progress-spinner",template:'<div class="mc-progress-spinner__inner" [ngClass]="{\'mc-progress-spinner__inner--indeterminate\': mode === \'indeterminate\'}"><svg focusable="false" preserveAspectRatio="xMidYMid meet" viewBox="0 0 100 100" class="mc-progress-spinner__svg"><circle cx="50%" cy="50%" r="42.5%" class="mc-progress-spinner__circle" [ngStyle]="{\'stroke-dashoffset\': mode === \'determinate\' ? dashOffsetPercent : null}"></circle></svg></div>',styles:["@keyframes mc-progress-spinner-indeterminate{100%{transform:rotateZ(270deg)}}.mc-progress-spinner{display:inline-block;width:16px;height:16px;overflow:hidden}.mc-progress-spinner__inner{width:100%;height:100%;transform:rotateZ(-90deg)}.mc-progress-spinner__inner--indeterminate{animation:mc-progress-spinner-indeterminate 1.5s cubic-bezier(.455,.03,.515,.955) infinite}.mc-progress-spinner__inner--indeterminate .mc-progress-spinner__circle{stroke-dashoffset:80%}.mc-progress-spinner__svg{width:100%;height:100%}.mc-progress-spinner__circle{fill:none;stroke:#000;stroke-dasharray:273%;stroke-width:13%;transition:stroke-dashoffset .3s;transform-origin:center center}"],changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,host:{class:"mc-progress-spinner","[attr.id]":"id"}}]}],n.ctorParameters=function(){return[{type:t.ElementRef}]},n.propDecorators={id:[{type:t.Input}],value:[{type:t.Input}],mode:[{type:t.Input}],color:[{type:t.Input}]},n}(Oo),Io=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,h.PlatformModule],exports:[ko],declarations:[ko]}]}],e}(),So=0,Do=function(){function e(e,t){this.source=e,this.value=t}return e}(),Eo=function(){function e(){}return e}(),Po=w(Eo),Mo={provide:l.NG_VALUE_ACCESSOR,useExisting:t.forwardRef(function(){return To}),multi:!0},To=function(e){function n(n){var i=e.call(this)||this;return i._changeDetector=n,i.change=new t.EventEmitter,i._value=null,i._name="mc-radio-group-"+So++,i._selected=null,i.isInitialized=!1,i._labelPosition="after",i._disabled=!1,i._required=!1,i.controlValueAccessorChangeFn=function(){},i.onTouched=function(){},i}return v(n,e),Object.defineProperty(n.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e,this.updateRadioButtonNames()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"labelPosition",{get:function(){return this._labelPosition},set:function(e){this._labelPosition="before"===e?"before":"after",this.markRadiosForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._value},set:function(e){this._value!==e&&(this._value=e,this.updateSelectedRadioFromValue(),this.checkSelectedRadioButton())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"selected",{get:function(){return this._selected},set:function(e){this._selected=e,this.value=e?e.value:null,this.checkSelectedRadioButton()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"disabled",{get:function(){return this._disabled},set:function(e){this._disabled=_(e),this.markRadiosForCheck()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"required",{get:function(){return this._required},set:function(e){this._required=_(e),this.markRadiosForCheck()},enumerable:!0,configurable:!0}),n.prototype.checkSelectedRadioButton=function(){this._selected&&!this._selected.checked&&(this._selected.checked=!0)},n.prototype.ngAfterContentInit=function(){this.isInitialized=!0},n.prototype.touch=function(){this.onTouched&&this.onTouched()},n.prototype.emitChangeEvent=function(){this.isInitialized&&this.change.emit(new Do(this._selected,this._value))},n.prototype.markRadiosForCheck=function(){this.radios&&this.radios.forEach(function(e){return e.markForCheck()})},n.prototype.writeValue=function(e){this.value=e,this._changeDetector.markForCheck()},n.prototype.registerOnChange=function(e){this.controlValueAccessorChangeFn=e},n.prototype.registerOnTouched=function(e){this.onTouched=e},n.prototype.setDisabledState=function(e){this.disabled=e,this._changeDetector.markForCheck()},n.prototype.updateRadioButtonNames=function(){var e=this;this.radios&&this.radios.forEach(function(t){t.name=e.name})},n.prototype.updateSelectedRadioFromValue=function(){var e=this,t=null!==this._selected&&this._selected.value===this._value;null==this.radios||t||(this._selected=null,this.radios.forEach(function(t){t.checked=e.value===t.value,t.checked&&(e._selected=t)}))},n.decorators=[{type:t.Directive,args:[{selector:"mc-radio-group",exportAs:"mcRadioGroup",providers:[Mo],host:{role:"radiogroup",class:"mc-radio-group"},inputs:["disabled"]}]}],n.ctorParameters=function(){return[{type:t.ChangeDetectorRef}]},n.propDecorators={name:[{type:t.Input}],labelPosition:[{type:t.Input}],value:[{type:t.Input}],selected:[{type:t.Input}],disabled:[{type:t.Input}],required:[{type:t.Input}],change:[{type:t.Output}],radios:[{type:t.ContentChildren,args:[t.forwardRef(function(){return Vo}),{descendants:!0}]}]},n}(Po),Ao=function(){function e(e){this._elementRef=e}return e}(),Ro=O(k(Ao)),Vo=function(e){function n(n,i,o,r,a){var s=e.call(this,i)||this;return s._changeDetector=o,s.focusMonitor=r,s._radioDispatcher=a,s.change=new t.EventEmitter,s.isFocused=!1,s.uniqueId="mc-radio-"+ ++So,s._checked=!1,s._value=null,s.removeUniqueSelectionListener=function(){},s.id=s.uniqueId,s.radioGroup=n,s.removeUniqueSelectionListener=a.listen(function(e,t){e!==s.id&&t===s.name&&(s.checked=!1)}),s}return v(n,e),Object.defineProperty(n.prototype,"checked",{get:function(){return this._checked},set:function(e){var t=_(e);this._checked!==t&&(this._checked=t,t&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!t&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),t&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._value},set:function(e){this._value!==e&&(this._value=e,null!=this.radioGroup&&(this.checked||(this.checked=this.radioGroup.value===e),this.checked&&(this.radioGroup.selected=this)))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"disabled",{get:function(){return this._disabled||null!=this.radioGroup&&this.radioGroup.disabled},set:function(e){var t=_(e);this._disabled!==t&&(this._disabled=t,this._changeDetector.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"required",{get:function(){return this._required||this.radioGroup&&this.radioGroup.required},set:function(e){this._required=_(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"labelPosition",{get:function(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"},set:function(e){this._labelPosition=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"inputId",{get:function(){return(this.id||this.uniqueId)+"-input"},enumerable:!0,configurable:!0}),n.prototype.ngOnInit=function(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.name=this.radioGroup.name)},n.prototype.ngAfterViewInit=function(){var e=this;this.focusMonitor.monitor(this._elementRef,!0).subscribe(function(t){!t&&e.radioGroup&&e.radioGroup.touch()})},n.prototype.ngOnDestroy=function(){this.focusMonitor.stopMonitoring(this._elementRef),this.removeUniqueSelectionListener()},n.prototype.focus=function(){this.inputElement.nativeElement.focus()},n.prototype.markForCheck=function(){this._changeDetector.markForCheck()},n.prototype.onInputClick=function(e){e.stopPropagation()},n.prototype.onInputChange=function(e){e.stopPropagation();var t=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this.emitChangeEvent(),this.radioGroup&&(this.radioGroup.controlValueAccessorChangeFn(this.value),this.radioGroup.touch(),t&&this.radioGroup.emitChangeEvent())},n.prototype.emitChangeEvent=function(){this.change.emit(new Do(this,this._value))},n.decorators=[{type:t.Component,args:[{selector:"mc-radio-button",template:'<label class="mc-radio-label" [attr.for]="inputId" #label><input type="radio" class="mc-radio-input cdk-visually-hidden" #input [id]="inputId" [checked]="checked" [disabled]="disabled" [tabIndex]="tabIndex" [attr.name]="name" [required]="required" [attr.aria-label]="ariaLabel" [attr.aria-labelledby]="ariaLabelledby" [attr.aria-describedby]="ariaDescribedby" (change)="onInputChange($event)" (click)="onInputClick($event)"><div class="mc-radio-label-content" [class.mc-radio-label-before]="labelPosition == \'before\'"><div class="mc-radio-button__outer-circle"></div><div class="mc-radio-button__inner-circle"></div><ng-content></ng-content></div></label>',styles:[".mc-radio-button{display:inline-block}.mc-radio-label{display:inline-flex;align-items:center;vertical-align:middle;cursor:pointer;white-space:nowrap;width:100%}.mc-radio-label-content{display:inline-block;position:relative;order:0;line-height:inherit;padding-left:26px;padding-right:0}.mc-radio-label-content .mc-radio-button__inner-circle,.mc-radio-label-content .mc-radio-button__outer-circle{box-sizing:content-box;position:absolute;content:'';border-style:solid;border-radius:50%}.mc-radio-label-content .mc-radio-button__outer-circle{left:0;top:calc(50% - 8px);width:14px;height:14px;border-width:1px}.mc-radio-label-content .mc-radio-button__inner-circle{display:none;left:1px;top:calc(50% - 7px);width:6px;height:6px;border-width:4px;border-color:transparent}[dir=rtl] .mc-radio-label-content{padding-right:26px;padding-left:0}.mc-radio-input{position:absolute;outline:0;opacity:0}"],inputs:["color","tabIndex"],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,exportAs:"mcRadioButton",host:{class:"mc-radio-button","[attr.id]":"id","[class.mc-checked]":"checked","[class.mc-disabled]":"disabled"}}]}],n.ctorParameters=function(){return[{type:To,decorators:[{type:t.Optional}]},{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:y.FocusMonitor},{type:g.UniqueSelectionDispatcher}]},n.propDecorators={checked:[{type:t.Input}],value:[{type:t.Input}],disabled:[{type:t.Input}],required:[{type:t.Input}],labelPosition:[{type:t.Input}],name:[{type:t.Input}],ariaLabel:[{type:t.Input,args:["aria-label"]}],ariaLabelledby:[{type:t.Input,args:["aria-labelledby"]}],ariaDescribedby:[{type:t.Input,args:["aria-describedby"]}],inputElement:[{type:t.ViewChild,args:["input",{static:!1}]}],change:[{type:t.Output}],isFocused:[{type:t.Input}],id:[{type:t.Input}]},n}(Ro),Fo=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,p.A11yModule,be],exports:[To,Vo],declarations:[To,Vo]}]}],e}(),Lo=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return v(n,e),n.decorators=[{type:t.Directive,args:[{selector:"[mcTreeNodeDef]",inputs:["when: mcTreeNodeDefWhen"],providers:[{provide:b.CdkTreeNodeDef,useExisting:n}]}]}],n.propDecorators={data:[{type:t.Input,args:["mcTreeNode"]}]},n}(b.CdkTreeNodeDef),No=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.baseLeftPadding=12,t._indent=20,t.iconWidth=20,t}return v(n,e),Object.defineProperty(n.prototype,"leftPadding",{get:function(){return(this.withIcon?0:this.iconWidth)+this.baseLeftPadding},enumerable:!0,configurable:!0}),n.prototype.paddingIndent=function(){var e=this.treeNode.data&&this.tree.treeControl.getLevel?this.tree.treeControl.getLevel(this.treeNode.data):0,t=this.level||e;return t>0?t*this._indent+this.leftPadding+"px":this.leftPadding+"px"},n.prototype.ngOnInit=function(){this.withIcon=this.tree.treeControl.isExpandable(this.treeNode.data),this.setPadding()},n.decorators=[{type:t.Directive,args:[{selector:"[mcTreeNodePadding]",providers:[{provide:b.CdkTreeNodePadding,useExisting:n}]}]}],n.propDecorators={level:[{type:t.Input,args:["mcTreeNodePadding"]}],indent:[{type:t.Input,args:["mcTreeNodePaddingIndent"]}]},n}(b.CdkTreeNodePadding),jo=function(e){function n(t,n){var i=e.call(this,t,n)||this;return i.disabled=!1,i.tree.treeControl.filterValue.pipe(m.map(function(e){return e.length>0})).subscribe(function(e){return i.disabled=e}),i}return v(n,e),Object.defineProperty(n.prototype,"iconState",{get:function(){return this.disabled||this.tree.treeControl.isExpanded(this.node)},enumerable:!0,configurable:!0}),n.decorators=[{type:t.Component,args:[{selector:"mc-tree-node-toggle",template:'\n <i class="mc mc-icon mc-angle-down-S_16"></i>\n ',host:{class:"mc-tree-node-toggle","(click)":"toggle($event)","[class.mc-disabled]":"disabled","[class.mc-opened]":"iconState"},encapsulation:t.ViewEncapsulation.None,providers:[{provide:b.CdkTreeNodeToggle,useExisting:n}]}]}],n.ctorParameters=function(){return[{type:b.CdkTree},{type:b.CdkTreeNode}]},n.propDecorators={node:[{type:t.Input}]},n}(b.CdkTreeNodeToggle),Bo=function(e){function n(t,n){var i=e.call(this,t,n)||this;return i.disabled=!1,i.tree.treeControl.filterValue.pipe(m.map(function(e){return e.length>0})).subscribe(function(e){return i.disabled=e}),i}return v(n,e),n.decorators=[{type:t.Directive,args:[{selector:"[mcTreeNodeToggle]",host:{"(click)":"toggle($event)","[class.mc-disabled]":"disabled"},providers:[{provide:b.CdkTreeNodeToggle,useExisting:n}]}]}],n.ctorParameters=function(){return[{type:b.CdkTree},{type:b.CdkTreeNode}]},n}(b.CdkTreeNodeToggle),zo=new t.InjectionToken("MC_TREE_OPTION_PARENT_COMPONENT"),Wo=function(){function e(e,t){void 0===t&&(t=!1),this.source=e,this.isUserInput=t}return e}(),Yo=0,Ho=function(e){function n(n,i,r,a){var s=e.call(this,n,a)||this;return s.changeDetectorRef=i,s.ngZone=r,s.tree=a,s.onFocus=new o.Subject,s.onBlur=new o.Subject,s._disabled=!1,s.onSelectionChange=new t.EventEmitter,s._selected=!1,s._id="mc-tree-option-"+Yo++,s.hasFocus=!1,s}return v(n,e),Object.defineProperty(n.prototype,"value",{get:function(){return this._value},set:function(e){this._value=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"disabled",{get:function(){return this._disabled||this.tree&&this.tree.disabled},set:function(e){var t=i.coerceBooleanProperty(e);t!==this._disabled&&(this._disabled=t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"showCheckbox",{get:function(){return void 0!==this._showCheckbox?this._showCheckbox:this.tree.showCheckbox},set:function(e){this._showCheckbox=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"selected",{get:function(){return this._selected},set:function(e){var t=i.coerceBooleanProperty(e);t!==this._selected&&this.setSelected(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"multiple",{get:function(){return this.tree.multiple},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"viewValue",{get:function(){return(this.getHostElement().textContent||"").trim()},enumerable:!0,configurable:!0}),n.prototype.ngAfterContentInit=function(){this.value=this.tree.treeControl.getValue(this.data)},n.prototype.toggle=function(){this.selected=!this.selected},n.prototype.setSelected=function(e){this._selected!==e&&this.tree.selectionModel&&(this._selected=e,e?this.tree.selectionModel.select(this.data):this.tree.selectionModel.deselect(this.data),this.changeDetectorRef.markForCheck())},n.prototype.focus=function(e){var t=this;"program"!==e&&(this.disabled||this.hasFocus||(this.elementRef.nativeElement.focus(),this.onFocus.next({option:this}),Promise.resolve().then(function(){t.hasFocus=!0,t.changeDetectorRef.markForCheck()})))},n.prototype.blur=function(){var e=this;this.ngZone.onStable.asObservable().pipe(m.take(1)).subscribe(function(){e.ngZone.run(function(){e.hasFocus=!1,e.onBlur.next({option:e})})})},n.prototype.getHeight=function(){var e=this.elementRef.nativeElement.getClientRects();return e.length?e[0].height:0},n.prototype.select=function(){this._selected||(this._selected=!0,this.changeDetectorRef.markForCheck(),this.emitSelectionChangeEvent())},n.prototype.deselect=function(){this._selected&&(this._selected=!1,this.changeDetectorRef.markForCheck())},n.prototype.selectViaInteraction=function(e){if(!this.disabled){this.changeDetectorRef.markForCheck(),this.emitSelectionChangeEvent(!0);var t=!!e&&a.hasModifierKey(e,"shiftKey"),n=!!e&&a.hasModifierKey(e,"ctrlKey");this.tree.setSelectedOptionsByClick(this,t,n)}},n.prototype.emitSelectionChangeEvent=function(e){void 0===e&&(e=!1),this.onSelectionChange.emit(new Wo(this,e))},n.prototype.getHostElement=function(){return this.elementRef.nativeElement},n.prototype.markForCheck=function(){this.changeDetectorRef.markForCheck()},n.decorators=[{type:t.Component,args:[{selector:"mc-tree-option",exportAs:"mcTreeOption",template:'<ng-content select="[mc-icon]"></ng-content><ng-content select="mc-tree-node-toggle"></ng-content><mc-pseudo-checkbox *ngIf="showCheckbox" [state]="selected ? \'checked\' : \'unchecked\'" [disabled]="disabled"></mc-pseudo-checkbox><span class="mc-option-text mc-no-select"><ng-content></ng-content></span><div class="mc-option-overlay"></div>',host:{"[attr.id]":"id","[attr.tabindex]":"-1","[attr.disabled]":"disabled || null",class:"mc-tree-option","[class.mc-selected]":"selected","[class.mc-focused]":"hasFocus","(focus)":"focus()","(blur)":"blur()","(click)":"selectViaInteraction($event)"},changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,providers:[{provide:b.CdkTreeNode,useExisting:n}]}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:t.NgZone},{type:void 0,decorators:[{type:t.Inject,args:[zo]}]}]},n.propDecorators={disabled:[{type:t.Input}],showCheckbox:[{type:t.Input}],onSelectionChange:[{type:t.Output}]},n}(b.CdkTreeNode),Ko={provide:l.NG_VALUE_ACCESSOR,useExisting:t.forwardRef(function(){return Xo}),multi:!0},Uo=function(){function e(e,t){this.source=e,this.option=t}return e}(),Go=function(){function e(e,t){this.source=e,this.option=t}return e}(),Xo=function(e){function n(n,i,r,a,s){var c=e.call(this,i,r)||this;return c.elementRef=n,c.resetFocusedItemOnBlur=!0,c.navigationChange=new t.EventEmitter,c.selectionChange=new t.EventEmitter,c.multipleMode=null,c.userTabIndex=null,c._autoSelect=!0,c._noUnselectLast=!0,c._disabled=!1,c._tabIndex=0,c.destroy=new o.Subject,c.onChange=function(){},c.onTouched=function(){},c.tabIndex=parseInt(a)||0,s===Ie.CHECKBOX||s===Ie.KEYBOARD?c.multipleMode=s:null!==s&&(c.multipleMode=Ie.CHECKBOX),c.multipleMode===Ie.CHECKBOX&&(c.autoSelect=!1,c.noUnselectLast=!1),c.selectionModel=new g.SelectionModel(c.multiple),c}return v(n,e),Object.defineProperty(n.prototype,"optionFocusChanges",{get:function(){return o.merge.apply(void 0,this.renderedOptions.map(function(e){return e.onFocus}))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"optionBlurChanges",{get:function(){return o.merge.apply(void 0,this.renderedOptions.map(function(e){return e.onBlur}))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"multiple",{get:function(){return!!this.multipleMode},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"autoSelect",{get:function(){return this._autoSelect},set:function(e){this._autoSelect=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"noUnselectLast",{get:function(){return this._noUnselectLast},set:function(e){this._noUnselectLast=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"disabled",{get:function(){return this._disabled},set:function(e){var t=i.coerceBooleanProperty(e);this._disabled!==t&&(this._disabled=t,this.markOptionsForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"tabIndex",{get:function(){return this._tabIndex},set:function(e){this._tabIndex=e,this.userTabIndex=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"showCheckbox",{get:function(){return this.multipleMode===Ie.CHECKBOX},enumerable:!0,configurable:!0}),n.prototype.ngAfterContentInit=function(){var e=this;this.keyManager=new p.FocusKeyManager(this.renderedOptions).withVerticalOrientation(!0).withHorizontalOrientation(null),this.keyManager.change.pipe(m.takeUntil(this.destroy)).subscribe(function(){e.keyManager.activeItem&&(e.emitNavigationEvent(e.keyManager.activeItem),e.autoSelect&&!e.keyManager.activeItem.disabled&&e.updateOptionsFocus())}),this.keyManager.tabOut.pipe(m.takeUntil(this.destroy)).subscribe(function(){return e.allowFocusEscape()}),this.selectionModel.changed.pipe(m.takeUntil(this.destroy)).subscribe(function(){e.onChange(e.getSelectedValues()),e.renderedOptions.notifyOnChanges()}),this.renderedOptions.changes.pipe(m.takeUntil(this.destroy)).subscribe(function(t){e.resetOptions(),e.updateTabIndex(),t.forEach(function(t){t.deselect(),e.getSelectedValues().forEach(function(e){t.value===e&&t.select()})})})},n.prototype.ngOnDestroy=function(){this.destroy.next(),this.destroy.complete()},n.prototype.focus=function(e){0===this.renderedOptions.length||this.isFocusReceivedFromNestedOption(e)||this.keyManager.setFirstItemActive()},n.prototype.blur=function(){!this.hasFocusedOption()&&this.resetFocusedItemOnBlur&&this.keyManager.setActiveItem(-1),this.onTouched(),this.changeDetectorRef.markForCheck()},n.prototype.onKeyDown=function(e){switch(this.keyManager.setFocusOrigin("keyboard"),e.keyCode){case a.DOWN_ARROW:this.keyManager.setNextItemActive();break;case a.UP_ARROW:this.keyManager.setPreviousItemActive();break;case a.LEFT_ARROW:return this.keyManager.activeItem&&this.treeControl.collapse(this.keyManager.activeItem.data),void e.preventDefault();case a.RIGHT_ARROW:return this.keyManager.activeItem&&this.treeControl.expand(this.keyManager.activeItem.data),void e.preventDefault();case a.SPACE:case a.ENTER:this.toggleFocusedOption(),e.preventDefault();break
15
15
  ;case a.HOME:this.keyManager.setFirstItemActive(),e.preventDefault();break;case a.END:this.keyManager.setLastItemActive(),e.preventDefault();break;case a.PAGE_UP:this.keyManager.setPreviousPageItemActive(),e.preventDefault();break;case a.PAGE_DOWN:this.keyManager.setNextPageItemActive(),e.preventDefault();break;default:return}this.keyManager.activeItem&&this.setSelectedOptionsByKey(this.keyManager.activeItem,a.hasModifierKey(e,"shiftKey"),a.hasModifierKey(e,"ctrlKey"))},n.prototype.updateScrollSize=function(){this.renderedOptions.first&&this.keyManager.withScrollSize(Math.floor(this.getHeight()/this.renderedOptions.first.getHeight()))},n.prototype.setSelectedOptionsByKey=function(e,t,n){if(t&&this.multiple)this.setSelectedOptions(e);else if(n){if(!this.canDeselectLast(e))return}else this.autoSelect&&(this.selectionModel.clear(),this.selectionModel.toggle(e.data));this.emitChangeEvent(e)},n.prototype.setSelectedOptionsByClick=function(e,t,n){if(t||n||this.keyManager.setActiveItem(e),t&&this.multiple)this.setSelectedOptions(e);else if(n){if(!this.canDeselectLast(e))return;this.selectionModel.toggle(e.data)}else this.autoSelect?(this.selectionModel.clear(),this.selectionModel.toggle(e.data)):this.selectionModel.toggle(e.data);this.emitChangeEvent(e)},n.prototype.setSelectedOptions=function(e){var t,n=this,i=e.selected,o=this.keyManager.previousActiveItemIndex,r=this.keyManager.previousActiveItemIndex=this.keyManager.activeItemIndex;r!==o&&(o>r&&(t=[r,o],o=t[0],r=t[1]),this.renderedOptions.toArray().slice(o,r+1).filter(function(e){return!e.disabled}).forEach(function(e){e===n.keyManager.activeItem&&e.selected&&n.noUnselectLast||e.setSelected(!i)}))},n.prototype.setFocusedOption=function(e){this.keyManager.setActiveItem(e)},n.prototype.toggleFocusedOption=function(){var e=this.keyManager.activeItem;!e||e.selected&&!this.canDeselectLast(e)||(e.toggle(),this.emitChangeEvent(e))},n.prototype.renderNodeChanges=function(t,n,i,o){void 0===n&&(n=this.dataDiffer),void 0===i&&(i=this.nodeOutlet.viewContainer),e.prototype.renderNodeChanges.call(this,t,n,i,o);var r=[],a=[];i._embeddedViews.forEach(function(e){var t=e.def;t.nodes.forEach(function(n){if(t.nodeMatchedQueries===n.matchedQueryIds){var i=e.nodes[n.nodeIndex];r.push(i.instance),a.push(i.instance.changeDetectorRef)}})}),setTimeout(function(){a.forEach(function(e){e.destroyed||e.detectChanges()})}),this.renderedOptions&&(this.renderedOptions.reset(r),this.renderedOptions.notifyOnChanges()),this.updateScrollSize(),this.nodeOutlet.changeDetectorRef.detectChanges()},n.prototype.getHeight=function(){var e=this.elementRef.nativeElement.getClientRects();return e.length?e[0].height:0},n.prototype.getItemHeight=function(){return this.renderedOptions.first?this.renderedOptions.first.getHeight():0},n.prototype.emitNavigationEvent=function(e){this.navigationChange.emit(new Uo(this,e))},n.prototype.emitChangeEvent=function(e){this.selectionChange.emit(new Uo(this,e))},n.prototype.writeValue=function(e){if(this.multiple&&e&&!Array.isArray(e))throw A();this.renderedOptions&&this.setOptionsFromValues(this.multiple?e:[e])},n.prototype.registerOnChange=function(e){this.onChange=e},n.prototype.registerOnTouched=function(e){this.onTouched=e},n.prototype.setDisabledState=function(e){this._disabled=e,this.changeDetectorRef.markForCheck()},n.prototype.setOptionsFromValues=function(e){var t,n=this;this.selectionModel.clear();var i=e.reduce(function(e,t){return n.treeControl.hasValue(t)?e.concat([n.treeControl.hasValue(t)]):e.slice()},[]);(t=this.selectionModel).select.apply(t,i)},n.prototype.getSelectedValues=function(){var e=this;return this.selectionModel.selected.map(function(t){return e.treeControl.getValue(t)})},n.prototype.updateTabIndex=function(){this._tabIndex=0===this.renderedOptions.length?-1:0},n.prototype.allowFocusEscape=function(){var e=this;-1!==this._tabIndex&&(this._tabIndex=-1,setTimeout(function(){e._tabIndex=e.userTabIndex||0,e.changeDetectorRef.markForCheck()}))},n.prototype.resetOptions=function(){this.dropSubscriptions(),this.listenToOptionsFocus()},n.prototype.dropSubscriptions=function(){this.optionFocusSubscription&&(this.optionFocusSubscription.unsubscribe(),this.optionFocusSubscription=null),this.optionBlurSubscription&&(this.optionBlurSubscription.unsubscribe(),this.optionBlurSubscription=null)},n.prototype.listenToOptionsFocus=function(){var e=this;this.optionFocusSubscription=this.optionFocusChanges.subscribe(function(t){var n=e.renderedOptions.toArray().indexOf(t.option);e.renderedOptions.filter(function(e){return e.hasFocus}).forEach(function(e){return e.hasFocus=!1}),e.isValidIndex(n)&&e.keyManager.updateActiveItem(n)}),this.optionBlurSubscription=this.optionBlurChanges.subscribe(function(){return e.blur()})},n.prototype.isValidIndex=function(e){return e>=0&&e<this.renderedOptions.length},n.prototype.hasFocusedOption=function(){return this.renderedOptions.some(function(e){return e.hasFocus})},n.prototype.markOptionsForCheck=function(){this.renderedOptions&&this.renderedOptions.forEach(function(e){return e.markForCheck()})},n.prototype.updateOptionsFocus=function(){this.renderedOptions.filter(function(e){return e.hasFocus}).forEach(function(e){return e.hasFocus=!1})},n.prototype.canDeselectLast=function(e){return!(this.noUnselectLast&&1===this.selectionModel.selected.length&&e.selected)},n.prototype.isFocusReceivedFromNestedOption=function(e){return!(!e||!e.relatedTarget)&&e.relatedTarget.classList.contains("mc-tree-option")},n.decorators=[{type:t.Component,args:[{selector:"mc-tree-selection",exportAs:"mcTreeSelection",template:"<ng-container cdkTreeNodeOutlet></ng-container>",host:{class:"mc-tree-selection","[attr.tabindex]":"tabIndex","(blur)":"blur()","(focus)":"focus($event)","(keydown)":"onKeyDown($event)","(window:resize)":"updateScrollSize()"},styles:[".mc-tree-selection{display:block}.mc-tree-option{display:flex;align-items:center;height:28px;word-wrap:break-word;border:2px solid transparent}.mc-tree-option>.mc-icon{margin-right:4px;cursor:pointer}.mc-tree-option:focus{outline:0}.mc-tree-option:not([disabled]){cursor:pointer}.mc-tree-option .mc-pseudo-checkbox{margin-right:8px}.mc-tree-node-toggle{margin-right:4px}.mc-tree-node-toggle .mc-icon{transform:rotate(-90deg)}.mc-tree-node-toggle.mc-opened .mc-icon{transform:rotate(0)}.mc-tree-node-toggle.mc-disabled{cursor:default}"],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,providers:[Ko,{provide:zo,useExisting:n},{provide:b.CdkTree,useExisting:n}]}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:t.IterableDiffers},{type:t.ChangeDetectorRef},{type:String,decorators:[{type:t.Attribute,args:["tabindex"]}]},{type:String,decorators:[{type:t.Attribute,args:["multiple"]}]}]},n.propDecorators={nodeOutlet:[{type:t.ViewChild,args:[b.CdkTreeNodeOutlet,{static:!0}]}],renderedOptions:[{type:t.ContentChildren,args:[Ho]}],treeControl:[{type:t.Input}],navigationChange:[{type:t.Output}],selectionChange:[{type:t.Output}],autoSelect:[{type:t.Input}],noUnselectLast:[{type:t.Input}],disabled:[{type:t.Input}],tabIndex:[{type:t.Input}]},n}(b.CdkTree),qo=[Xo,Ho,Lo,No,jo,Bo],$o=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,b.CdkTreeModule,Se],exports:qo,declarations:qo}]}],e}(),Zo=function(){function e(e,t,n,i){this.transformFunction=e,this.getLevel=t,this.isExpandable=n,this.getChildren=i}return e.prototype.flattenNode=function(e,t,n,i){var o=this,r=this.transformFunction(e,t,i);if(n.push(r),this.isExpandable(r)){var a=this.getChildren(e);a&&(Array.isArray(a)?this.flattenChildren(a,t,n,r):a.pipe(m.take(1)).subscribe(function(e){o.flattenChildren(e,t,n,r)}))}return n},e.prototype.flattenChildren=function(e,t,n,i){var o=this;e.forEach(function(e){o.flattenNode(e,t+1,n,i)})},e.prototype.flattenNodes=function(e){var t=this,n=[];return e.forEach(function(e){return t.flattenNode(e,0,n,null)}),n},e.prototype.expandFlattenedNodes=function(e,t){var n=this,i=[],o=[];return o[0]=!0,e.forEach(function(e){for(var r=!0,a=0;a<=n.getLevel(e);a++)r=r&&o[a];r&&i.push(e),n.isExpandable(e)&&(o[n.getLevel(e)+1]=t.isExpanded(e))}),i},e}(),Qo={Expansion:"expansion",Filter:"filter"},Jo=function(e){function t(t,n,i){void 0===i&&(i=[]);var r=e.call(this)||this;return r.treeControl=t,r.treeFlattener=n,r.flattenedData=new o.BehaviorSubject([]),r.expandedData=new o.BehaviorSubject([]),r.filteredData=new o.BehaviorSubject([]),r._data=new o.BehaviorSubject(i),r}return v(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return this._data.value},set:function(e){this._data.next(e),this.flattenedData.next(this.treeFlattener.flattenNodes(this.data)),this.treeControl.dataNodes=this.flattenedData.value},enumerable:!0,configurable:!0}),t.prototype.connect=function(e){var t=this;return o.merge(e.viewChange,this.treeControl.expansionModel.changed.pipe(m.map(function(e){return{type:Qo.Expansion,value:e}})),this.treeControl.filterValue.pipe(m.map(function(e){return{type:Qo.Filter,value:e}})),this.flattenedData).pipe(m.map(function(e){return e.type===Qo.Filter&&e.value&&e.value.length>0?t.filterHandler():t.expansionHandler()}))},t.prototype.filterHandler=function(){return this.filteredData.next(this.treeControl.filterModel.selected),this.filteredData.value},t.prototype.expansionHandler=function(){var e=this.treeFlattener.expandFlattenedNodes(this.flattenedData.value,this.treeControl);return this.expandedData.next(e),this.expandedData.value},t.prototype.disconnect=function(){},t}(g.DataSource),er=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._data=new o.BehaviorSubject([]),t}return v(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return this._data.value},set:function(e){this._data.next(e)},enumerable:!0,configurable:!0}),t.prototype.connect=function(e){var t=this;return o.merge.apply(void 0,[e.viewChange,this._data]).pipe(m.map(function(){return t.data}))},t.prototype.disconnect=function(){},t}(g.DataSource),tr=function(){function e(e){this.template=e}return e.decorators=[{type:t.Directive,args:[{selector:"[mcTabContent]"}]}],e.ctorParameters=function(){return[{type:t.TemplateRef}]},e}(),nr=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return v(n,e),n.decorators=[{type:t.Directive,args:[{selector:"[mc-tab-label], [mcTabLabel]"}]}],n}(d.CdkPortal);nr.ctorParameters=function(){return d.CdkPortal.ctorParameters};var ir,or=function(){function e(){}return e}(),rr=w(or),ar=function(e){function n(t){var n=e.call(this)||this;return n.viewContainerRef=t,n.textLabel="",n.stateChanges=new o.Subject,n.position=null,n.origin=null,n.isActive=!1,n.contentPortal=null,n}return v(n,e),Object.defineProperty(n.prototype,"content",{get:function(){return this.contentPortal},enumerable:!0,configurable:!0}),n.prototype.ngOnChanges=function(e){(e.hasOwnProperty("textLabel")||e.hasOwnProperty("disabled"))&&this.stateChanges.next()},n.prototype.ngOnDestroy=function(){this.stateChanges.complete()},n.prototype.ngOnInit=function(){this.contentPortal=new d.TemplatePortal(this.explicitContent||this.implicitContent,this.viewContainerRef)},n.decorators=[{type:t.Component,args:[{selector:"mc-tab",template:"<ng-template><ng-content></ng-content></ng-template>",inputs:["disabled"],changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,exportAs:"mcTab"}]}],n.ctorParameters=function(){return[{type:t.ViewContainerRef}]},n.propDecorators={templateLabel:[{type:t.ContentChild,args:[nr,{static:!1}]}],explicitContent:[{type:t.ContentChild,args:[tr,{read:t.TemplateRef,static:!0}]}],implicitContent:[{type:t.ViewChild,args:[t.TemplateRef,{static:!0}]}],textLabel:[{type:t.Input,args:["label"]}],tabId:[{type:t.Input,args:["tabId"]}],ariaLabel:[{type:t.Input,args:["aria-label"]}],ariaLabelledby:[{type:t.Input,args:["aria-labelledby"]}]},n}(rr),sr={translateTab:s.trigger("translateTab",[s.state("center, void, left-origin-center, right-origin-center",s.style({transform:"none"})),s.state("left",s.style({transform:"translate3d(-100%, 0, 0)",minHeight:"1px"})),s.state("right",s.style({transform:"translate3d(100%, 0, 0)",minHeight:"1px"})),s.transition("* => left, * => right, left => center, right => center",s.animate("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")),s.transition("void => left-origin-center",[s.style({transform:"translate3d(-100%, 0, 0)"}),s.animate("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")]),s.transition("void => right-origin-center",[s.style({transform:"translate3d(100%, 0, 0)"}),s.animate("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")])])},cr=function(){function e(e,n,i){var r=this;this.elementRef=e,this.dir=n,this.onCentering=new t.EventEmitter,this.beforeCentering=new t.EventEmitter,this.afterLeavingCenter=new t.EventEmitter,this.onCentered=new t.EventEmitter(!0),this.animationDuration="0ms",this.dirChangeSubscription=o.Subscription.EMPTY,this.dir&&i&&(this.dirChangeSubscription=this.dir.change.subscribe(function(e){r.computePositionAnimationState(e),i.markForCheck()}))}return Object.defineProperty(e.prototype,"position",{set:function(e){this.positionIndex=e,this.computePositionAnimationState()},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){"center"===this.bodyPosition&&null!=this.origin&&(this.bodyPosition=this.computePositionFromOrigin())},e.prototype.ngOnDestroy=function(){this.dirChangeSubscription.unsubscribe()},e.prototype.onTranslateTabStarted=function(e){var t=this.isCenterPosition(e.toState);this.beforeCentering.emit(t),t&&this.onCentering.emit(this.elementRef.nativeElement.clientHeight)},e.prototype.onTranslateTabComplete=function(e){this.isCenterPosition(e.toState)&&this.isCenterPosition(this.bodyPosition)&&this.onCentered.emit(),this.isCenterPosition(e.fromState)&&!this.isCenterPosition(this.bodyPosition)&&this.afterLeavingCenter.emit()},e.prototype.getLayoutDirection=function(){return this.dir&&"rtl"===this.dir.value?"rtl":"ltr"},e.prototype.isCenterPosition=function(e){return"center"===e||"left-origin-center"===e||"right-origin-center"===e},e.prototype.computePositionAnimationState=function(e){void 0===e&&(e=this.getLayoutDirection()),this.positionIndex<0?this.bodyPosition="ltr"===e?"left":"right":this.positionIndex>0?this.bodyPosition="ltr"===e?"right":"left":this.bodyPosition="center"},e.prototype.computePositionFromOrigin=function(){var e=this.getLayoutDirection();return"ltr"===e&&this.origin<=0||"rtl"===e&&this.origin>0?"left-origin-center":"right-origin-center"},e.decorators=[{type:t.Component,args:[{selector:"mc-tab-body",template:'<div class="mc-tab-body__content" #content [@translateTab]="{ value: bodyPosition, params: {animationDuration: animationDuration} }" (@translateTab.start)="onTranslateTabStarted($event)" (@translateTab.done)="onTranslateTabComplete($event)"><ng-template mcTabBodyHost></ng-template></div>',styles:[".mc-tab-body__content{height:100%;overflow:auto}.mc-tab-body__content .mc-tab-group_dynamic-height{overflow:hidden}"],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,animations:[sr.translateTab],host:{class:"mc-tab-body"}}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:n.Directionality,decorators:[{type:t.Optional}]},{type:t.ChangeDetectorRef}]},e.propDecorators={position:[{type:t.Input}],onCentering:[{type:t.Output}],beforeCentering:[{type:t.Output}],afterLeavingCenter:[{type:t.Output}],onCentered:[{type:t.Output}],portalHost:[{type:t.ViewChild,args:[d.CdkPortalOutlet,{static:!1}]}],content:[{type:t.Input,args:["content"]}],origin:[{type:t.Input}],animationDuration:[{type:t.Input}]},e}(),lr=function(e){function n(t,n,i){var r=e.call(this,t,n)||this;return r.host=i,r.centeringSub=o.Subscription.EMPTY,r.leavingSub=o.Subscription.EMPTY,r}return v(n,e),n.prototype.ngOnInit=function(){var t=this;e.prototype.ngOnInit.call(this),this.centeringSub=this.host.beforeCentering.pipe(m.startWith(this.host.isCenterPosition(this.host.bodyPosition))).subscribe(function(e){e&&!t.hasAttached()&&t.attach(t.host.content)}),this.leavingSub=this.host.afterLeavingCenter.subscribe(function(){t.detach()})},n.prototype.ngOnDestroy=function(){e.prototype.ngOnDestroy.call(this),this.centeringSub.unsubscribe(),this.leavingSub.unsubscribe()},n.decorators=[{type:t.Directive,args:[{selector:"[mcTabBodyHost]"}]}],n.ctorParameters=function(){return[{type:t.ComponentFactoryResolver},{type:t.ViewContainerRef},{type:cr,decorators:[{type:t.Inject,args:[t.forwardRef(function(){return cr})]}]}]},n}(d.CdkPortalOutlet),pr=function(){function e(){}return e}(),dr=w(pr),ur=function(e){function n(t){var n=e.call(this)||this;return n.elementRef=t,n}return v(n,e),n.prototype.focus=function(){this.elementRef.nativeElement.focus()},n.prototype.getOffsetLeft=function(){return this.elementRef.nativeElement.offsetLeft},n.prototype.getOffsetWidth=function(){return this.elementRef.nativeElement.offsetWidth},n.decorators=[{type:t.Directive,args:[{selector:"[mcTabLabelWrapper]",inputs:["disabled"],host:{"[class.mc-disabled]":"disabled","[attr.aria-disabled]":"!!disabled"}}]}],n.ctorParameters=function(){return[{type:t.ElementRef}]},n}(dr),hr=function(){function e(){}return e}(),mr=function(e){function r(n,i,r,a,s){var c=e.call(this)||this;return c.elementRef=n,c.changeDetectorRef=i,c.viewportRuler=r,c.dir=a,c.ngZone=s,c.showPaginationControls=!1,c.disableScrollAfter=!0,c.disableScrollBefore=!0,c.selectFocusedIndex=new t.EventEmitter,c.indexFocused=new t.EventEmitter,c._scrollDistance=0,c.selectedIndexChanged=!1,c.destroyed=new o.Subject,c._selectedIndex=0,c}return v(r,e),Object.defineProperty(r.prototype,"selectedIndex",{get:function(){return this._selectedIndex},set:function(e){var t=i.coerceNumberProperty(e);this.selectedIndexChanged=this._selectedIndex!==t,this._selectedIndex=t,this.keyManager&&this.keyManager.updateActiveItem(t)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"focusIndex",{get:function(){return this.keyManager?this.keyManager.activeItemIndex:0},set:function(e){this.isValidIndex(e)&&this.focusIndex!==e&&this.keyManager&&this.keyManager.setActiveItem(e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"scrollDistance",{get:function(){return this._scrollDistance},set:function(e){this._scrollDistance=Math.max(0,Math.min(this.getMaxScrollDistance(),e)),this.scrollDistanceChanged=!0,this.checkScrollingControls()},enumerable:!0,configurable:!0}),r.prototype.ngAfterContentChecked=function(){this.tabLabelCount!==this.labelWrappers.length&&(this.updatePagination(),this.tabLabelCount=this.labelWrappers.length,this.changeDetectorRef.markForCheck()),this.selectedIndexChanged&&(this.scrollToLabel(this._selectedIndex),this.checkScrollingControls(),this.selectedIndexChanged=!1,this.changeDetectorRef.markForCheck()),this.scrollDistanceChanged&&(this.updateTabScrollPosition(),this.scrollDistanceChanged=!1,this.changeDetectorRef.markForCheck())},r.prototype.handleKeydown=function(e){switch(e.keyCode){case a.HOME:this.keyManager.setFirstItemActive(),e.preventDefault();break;case a.END:this.keyManager.setLastItemActive(),e.preventDefault();break;case a.ENTER:case a.SPACE:this.selectFocusedIndex.emit(this.focusIndex),e.preventDefault();break;default:this.keyManager.onKeydown(e)}},r.prototype.ngAfterContentInit=function(){var e=this,t=this.dir?this.dir.change:o.of(null),n=this.viewportRuler.change(150),i=function(){e.updatePagination()};this.keyManager=new p.FocusKeyManager(this.labelWrappers).withHorizontalOrientation(this.getLayoutDirection()).withWrap(),this.keyManager.updateActiveItem(0),void 0===typeof requestAnimationFrame?i():requestAnimationFrame(i),o.merge(t,n).pipe(m.takeUntil(this.destroyed)).subscribe(function(){i(),e.keyManager.withHorizontalOrientation(e.getLayoutDirection())}),this.keyManager.change.pipe(m.takeUntil(this.destroyed)).subscribe(function(t){e.indexFocused.emit(t),e.setTabFocus(t)})},r.prototype.ngOnDestroy=function(){this.destroyed.next(),this.destroyed.complete()},r.prototype.onContentChanges=function(){var e=this,t=this.elementRef.nativeElement.textContent;if(t!==this.currentTextContent){this.currentTextContent=t;var n=function(){e.updatePagination(),e.changeDetectorRef.markForCheck()};this.ngZone?this.ngZone.run(n):n()}},r.prototype.updatePagination=function(){this.checkPaginationEnabled(),this.checkScrollingControls(),this.updateTabScrollPosition()},r.prototype.isValidIndex=function(e){if(!this.labelWrappers)return!0;var t=this.labelWrappers?this.labelWrappers.toArray()[e]:null;return!!t&&!t.disabled},r.prototype.setTabFocus=function(e){if(this.showPaginationControls&&this.scrollToLabel(e),this.labelWrappers&&this.labelWrappers.length){this.labelWrappers.toArray()[e].focus();var t=this.tabListContainer.nativeElement,n=this.getLayoutDirection();t.scrollLeft="ltr"===n?0:t.scrollWidth-t.offsetWidth}},r.prototype.getLayoutDirection=function(){return this.dir&&"rtl"===this.dir.value?"rtl":"ltr"},r.prototype.updateTabScrollPosition=function(){var e=this.scrollDistance,t="ltr"===this.getLayoutDirection()?-e:e;this.tabList.nativeElement.style.transform="translateX("+Math.round(t)+"px)",this.tabList.nativeElement.scrollLeft=0},r.prototype.scrollHeader=function(e){var t=this.tabListContainer.nativeElement.offsetWidth;this.scrollDistance+=("before"===e?-1:1)*t/3},r.prototype.scrollToLabel=function(e){var t=this.labelWrappers?this.labelWrappers.toArray()[e]:null;if(t){var n,i,o=this.tabListContainer.nativeElement.offsetWidth;"ltr"===this.getLayoutDirection()?(n=t.getOffsetLeft(),i=n+t.getOffsetWidth()):(i=this.tabList.nativeElement.offsetWidth-t.getOffsetLeft(),n=i-t.getOffsetWidth());var r=this.scrollDistance,a=this.scrollDistance+o;n<r?this.scrollDistance-=r-n+60:i>a&&(this.scrollDistance+=i-a+60)}},r.prototype.checkPaginationEnabled=function(){var e=this.tabList.nativeElement.scrollWidth>this.elementRef.nativeElement.offsetWidth;e||(this.scrollDistance=0),e!==this.showPaginationControls&&this.changeDetectorRef.markForCheck(),this.showPaginationControls=e},r.prototype.checkScrollingControls=function(){this.disableScrollBefore=0===this.scrollDistance,this.disableScrollAfter=this.scrollDistance===this.getMaxScrollDistance(),this.changeDetectorRef.markForCheck()},r.prototype.getMaxScrollDistance=function(){return this.tabList.nativeElement.scrollWidth-this.tabListContainer.nativeElement.offsetWidth||0},r.decorators=[{type:t.Component,args:[{selector:"mc-tab-header",template:'<div class="mc-tab-header__pagination mc-tab-header__pagination_before mc-elevation-z4" aria-hidden="true" [class.mc-tab-header_disabled]="disableScrollBefore" (click)="scrollHeader(\'before\')"><div class="mc-tab-header__pagination-chevron"></div></div><div class="mc-tab-header__content" #tabListContainer (keydown)="handleKeydown($event)"><div class="mc-tab-list" #tabList role="tablist" (cdkObserveContent)="onContentChanges()"><div class="mc-tab-list__content"><ng-content></ng-content></div></div></div><div class="mc-tab-header__pagination mc-tab-header__pagination_after mc-elevation-z4" aria-hidden="true" [class.mc-tab-header_disabled]="disableScrollAfter" (click)="scrollHeader(\'after\')"><div class="mc-tab-header__pagination-chevron"></div></div>',styles:['.mc-tab-header{display:flex}.mc-tab-header__pagination{position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2}.mc-tab-header__pagination .mc-tab-header__pagination-controls_enabled{display:flex}.mc-tab-header__pagination-chevron{border-style:solid;border-width:2px 2px 0 0;content:"";height:8px;width:8px}.mc-tab-header__pagination_after,.mc-tab-header_rtl .mc-tab-header__pagination_before{padding-right:4px}.mc-tab-header__pagination_after .mc-tab-header__pagination-chevron,.mc-tab-header_rtl .mc-tab-header__pagination_before .mc-tab-header__pagination-chevron{transform:rotate(45deg)}.mc-tab-header__pagination_before,.mc-tab-header_rtl .mc-tab-header__pagination_after{padding-left:4px}.mc-tab-header__pagination_before .mc-tab-header__pagination-chevron,.mc-tab-header_rtl .mc-tab-header__pagination_after .mc-tab-header__pagination-chevron{transform:rotate(-135deg)}.mc-tab-header_disabled{box-shadow:none;cursor:default}.mc-tab-header__content{display:flex;flex-grow:1;overflow:hidden;z-index:1}.mc-tab-list{flex-grow:1;position:relative;transition:transform .5s cubic-bezier(.35,0,.25,1)}.mc-tab-list__content{display:flex}.mc-tab-group_align-labels-center .mc-tab-list__content{justify-content:center}.mc-tab-group_align-labels-end .mc-tab-list__content{justify-content:flex-end}.mc-tab-group_stretch-labels .mc-tab-label,.mc-tab-group_stretch-labels .mc-tab-light-label{flex-basis:0;flex-grow:1}'],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,host:{class:"mc-tab-header","[class.mc-tab-header__pagination-controls_enabled]":"showPaginationControls","[class.mc-tab-header_rtl]":"getLayoutDirection() == 'rtl'"}}]}],r.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:u.ViewportRuler},{type:n.Directionality,decorators:[{type:t.Optional}]},{type:t.NgZone}]},r.propDecorators={selectedIndex:[{type:t.Input}],labelWrappers:[{type:t.ContentChildren,args:[ur]}],tabListContainer:[{type:t.ViewChild,args:["tabListContainer",{static:!0}]}],tabList:[{type:t.ViewChild,args:["tabList",{static:!0}]}],selectFocusedIndex:[{type:t.Output}],indexFocused:[{type:t.Output}]},r}(hr),gr=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-tab-group[mc-light-tabs], [mc-tab-nav-bar][mc-light-tabs]",host:{class:"mc-tab-group_light"}}]}],e}(),fr=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-tab-group[mc-align-tabs-center], [mc-tab-nav-bar][mc-align-tabs-center]",host:{class:"mc-tab-group_align-labels-center"}}]}],e}(),yr=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-tab-group[mc-align-tabs-end], [mc-tab-nav-bar][mc-align-tabs-end]",host:{class:"mc-tab-group_align-labels-end"}}]}],e}(),br=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-tab-group[mc-stretch-tabs], [mc-tab-nav-bar][mc-stretch-tabs]",host:{class:"mc-tab-group_stretch-labels"}}]}],e}(),vr=0,Cr=function(){function e(){}return e}(),_r=new t.InjectionToken("MC_TABS_CONFIG"),xr=function(){function e(e){this._elementRef=e}return e}(),wr=O(w(xr)),Or=function(e){function n(n,r,a,s){var c=e.call(this,n)||this;return c.changeDetectorRef=r,c.headerPosition="above",c.selectedIndexChange=new t.EventEmitter,c.focusChange=new t.EventEmitter,c.animationDone=new t.EventEmitter,c.selectedTabChange=new t.EventEmitter(!0),c.indexToSelect=0,c.tabBodyWrapperHeight=0,c.tabsSubscription=o.Subscription.EMPTY,c.tabLabelSubscription=o.Subscription.EMPTY,c._dynamicHeight=!1,c._selectedIndex=null,c.lightTab=i.coerceBooleanProperty(a),c.groupId=vr++,c.animationDuration=s&&s.animationDuration?s.animationDuration:"0ms",c}return v(n,e),Object.defineProperty(n.prototype,"dynamicHeight",{get:function(){return this._dynamicHeight},set:function(e){this._dynamicHeight=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"selectedIndex",{get:function(){return this._selectedIndex},set:function(e){this.indexToSelect=i.coerceNumberProperty(e,null)},enumerable:!0,configurable:!0}),n.prototype.ngAfterContentChecked=function(){var e=this,t=this.indexToSelect=this.clampTabIndex(this.indexToSelect);if(this._selectedIndex!==t){var n=null==this._selectedIndex;n||this.selectedTabChange.emit(this.createChangeEvent(t)),Promise.resolve().then(function(){e.tabs.forEach(function(e,n){return e.isActive=n===t}),n||e.selectedIndexChange.emit(t)})}this.tabs.forEach(function(n,i){n.position=i-t,null==e._selectedIndex||0!==n.position||n.origin||(n.origin=t-e._selectedIndex)}),this._selectedIndex!==t&&(this._selectedIndex=t,this.changeDetectorRef.markForCheck())},n.prototype.ngAfterContentInit=function(){var e=this;this.subscribeToTabLabels(),this.tabsSubscription=this.tabs.changes.subscribe(function(){if(e.clampTabIndex(e.indexToSelect)===e._selectedIndex)for(var t=e.tabs.toArray(),n=0;n<t.length;n++)if(t[n].isActive){e.indexToSelect=e._selectedIndex=n;break}e.subscribeToTabLabels(),e.changeDetectorRef.markForCheck()})},n.prototype.ngOnDestroy=function(){this.tabsSubscription.unsubscribe(),this.tabLabelSubscription.unsubscribe()},n.prototype.focusChanged=function(e){this.focusChange.emit(this.createChangeEvent(e))},n.prototype.getTabLabelId=function(e){return"mc-tab-label-"+this.groupId+"-"+e},n.prototype.getTabContentId=function(e){return"mc-tab-content-"+this.groupId+"-"+e},n.prototype.setTabBodyWrapperHeight=function(e){if(this._dynamicHeight&&this.tabBodyWrapperHeight){var t=this.tabBodyWrapper.nativeElement;t.style.height=this.tabBodyWrapperHeight+"px",this.tabBodyWrapper.nativeElement.offsetHeight&&(t.style.height=e+"px")}},n.prototype.removeTabBodyWrapperHeight=function(){this.tabBodyWrapperHeight=this.tabBodyWrapper.nativeElement.clientHeight,this.tabBodyWrapper.nativeElement.style.height="",this.animationDone.emit()},n.prototype.handleClick=function(e,t,n){e.disabled||(this.selectedIndex=t.focusIndex=n)},n.prototype.getTabIndex=function(e,t){return e.disabled?null:this.selectedIndex===t?0:-1},n.prototype.createChangeEvent=function(e){var t=new Cr;return t.index=e,this.tabs&&this.tabs.length&&(t.tab=this.tabs.toArray()[e]),t},n.prototype.subscribeToTabLabels=function(){var e=this;this.tabLabelSubscription&&this.tabLabelSubscription.unsubscribe(),this.tabLabelSubscription=o.merge.apply(void 0,this.tabs.map(function(e){return e.stateChanges})).subscribe(function(){return e.changeDetectorRef.markForCheck()})},n.prototype.clampTabIndex=function(e){return Math.min(this.tabs.length-1,Math.max(e||0,0))},n.decorators=[{type:t.Component,args:[{selector:"mc-tab-group",exportAs:"mcTabGroup",template:'<mc-tab-header #tabHeader [selectedIndex]="selectedIndex" (indexFocused)="focusChanged($event)" (selectFocusedIndex)="selectedIndex = $event"><div role="tab" mcTabLabelWrapper cdkMonitorElementFocus [class.mc-tab-label]="!lightTab" [class.mc-tab-light-label]="lightTab" *ngFor="let tab of tabs; let i = index" [id]="getTabLabelId(i)" [attr.tabIndex]="getTabIndex(tab, i)" [attr.aria-posinset]="i + 1" [attr.aria-setsize]="tabs.length" [attr.aria-controls]="getTabContentId(i)" [attr.aria-selected]="selectedIndex == i" [attr.aria-label]="tab.ariaLabel || null" [attr.aria-labelledby]="(!tab.ariaLabel && tab.ariaLabelledby) ? tab.ariaLabelledby : null" [class.mc-active]="selectedIndex == i" [disabled]="tab.disabled" (click)="handleClick(tab, tabHeader, i)"><div class="mc-tab-label__content"><ng-template [ngIf]="tab.templateLabel"><ng-template [cdkPortalOutlet]="tab.templateLabel"></ng-template></ng-template><ng-template [ngIf]="!tab.templateLabel">{{tab.textLabel}}</ng-template></div><div class="mc-tab-overlay"></div></div></mc-tab-header><div class="mc-tab-body__wrapper" #tabBodyWrapper><mc-tab-body role="tabpanel" *ngFor="let tab of tabs; let i = index" [id]="getTabContentId(i)" [attr.aria-labelledby]="getTabLabelId(i)" [class.mc-tab-body__active]="selectedIndex == i" [content]="tab.content" [position]="tab.position" [origin]="tab.origin" [animationDuration]="animationDuration" (onCentered)="removeTabBodyWrapperHeight()" (onCentering)="setTabBodyWrapperHeight($event)"></mc-tab-body></div>',
16
16
  styles:['.mc-tab-label.cdk-keyboard-focused:after,.mc-tab-light-label.cdk-keyboard-focused:after,.mc-tab-light-label.mc-active:before,.mc-tab-light-label:hover:before{display:block;position:absolute;content:""}.mc-tab-light-label.mc-active:before,.mc-tab-light-label:hover:before{bottom:-1px;left:0;height:4px;right:0}.mc-tab-group{display:flex;flex-direction:column;box-sizing:border-box;text-align:center;white-space:nowrap}.mc-tab-group.mc-tab-group_inverted-header{flex-direction:column-reverse}.mc-tab-label{position:relative;box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;height:40px;text-align:center;white-space:nowrap;cursor:pointer;padding-right:16px;padding-left:16px;outline:0;border-bottom-width:1px;border-bottom-style:solid;border-top-width:1px;border-top-style:solid;border-top-left-radius:3px;border-top-right-radius:3px}.mc-tab-label.cdk-keyboard-focused{z-index:1}.mc-tab-label.cdk-keyboard-focused:after{top:-2px;right:-1px;bottom:-1px;left:-1px;border-width:2px;border-style:solid;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom:none}.mc-tab-label.mc-disabled{pointer-events:none}.mc-tab-label .mc-tab-overlay{position:absolute;top:-1px;left:0;right:0;bottom:0;pointer-events:none}.mc-tab-label.mc-active{padding-right:15px;padding-left:15px;border-width:1px;border-style:solid}.mc-tab-label.mc-active.cdk-keyboard-focused:after{z-index:1;right:-2px;left:-2px}.mc-tab-label .mc-tab-overlay{border-top-width:1px;border-top-style:solid;border-top-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px}.mc-tab-light-label{position:relative;box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;height:40px;text-align:center;white-space:nowrap;cursor:pointer;padding-right:16px;padding-left:16px;outline:0;border-bottom-width:1px;border-bottom-style:solid}.mc-tab-light-label.cdk-keyboard-focused{z-index:1}.mc-tab-light-label.cdk-keyboard-focused:after{top:-2px;right:-1px;bottom:-1px;left:-1px;border-width:2px;border-style:solid;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom:none}.mc-tab-light-label.mc-disabled{pointer-events:none}.mc-tab-light-label .mc-tab-overlay{position:absolute;top:-1px;left:0;right:0;bottom:0;pointer-events:none}.mc-tab-light-label.cdk-keyboard-focused+:hover:before{left:1px}.mc-tab-light-label.cdk-keyboard-focused:after{top:-1px}.mc-tab-light-label .mc-tab-overlay{position:absolute;top:0}.mc-tab-header__content{padding:1px 1px 0 1px}.mc-tab-body__wrapper{display:flex;overflow:hidden;position:relative}.mc-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;flex-basis:100%}.mc-tab-body.mc-tab-body__active{overflow-x:hidden;overflow-y:auto;position:relative;z-index:1;flex-grow:1}.mc-tab-group.mc-tab-group_dynamic-height .mc-tab-body.mc-tab-body__active{overflow-y:hidden}'],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,inputs:["color"],host:{class:"mc-tab-group","[class.mc-tab-group_dynamic-height]":"dynamicHeight","[class.mc-tab-group_inverted-header]":'headerPosition === "below"'}}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:String,decorators:[{type:t.Attribute,args:["mc-light-tabs"]}]},{type:void 0,decorators:[{type:t.Inject,args:[_r]},{type:t.Optional}]}]},n.propDecorators={dynamicHeight:[{type:t.Input}],selectedIndex:[{type:t.Input}],tabs:[{type:t.ContentChildren,args:[ar]}],tabBodyWrapper:[{type:t.ViewChild,args:["tabBodyWrapper",{static:!1}]}],tabHeader:[{type:t.ViewChild,args:["tabHeader",{static:!1}]}],headerPosition:[{type:t.Input}],animationDuration:[{type:t.Input}],selectedIndexChange:[{type:t.Output}],focusChange:[{type:t.Output}],animationDone:[{type:t.Output}],selectedTabChange:[{type:t.Output}]},n}(wr),kr=function(){function e(e){this._elementRef=e}return e}(),Ir=O(kr),Sr=function(e){function n(t){return e.call(this,t)||this}return v(n,e),n.decorators=[{type:t.Component,args:[{selector:"[mc-tab-nav-bar]",exportAs:"mcTabNavBar, mcTabNav",inputs:["color"],template:'<div class="mc-tab-links"><ng-content></ng-content></div>',styles:['.mc-tab-nav-bar.mc-tab-group_light .mc-tab-link.cdk-keyboard-focused:after,.mc-tab-nav-bar.mc-tab-group_light .mc-tab-link.mc-active:before,.mc-tab-nav-bar.mc-tab-group_light .mc-tab-link:hover:before,.mc-tab-nav-bar:not(.mc-tab-group_light) .mc-tab-link.cdk-keyboard-focused:after{display:block;position:absolute;content:""}.mc-tab-nav-bar.mc-tab-group_light .mc-tab-link.mc-active:before,.mc-tab-nav-bar.mc-tab-group_light .mc-tab-link:hover:before{bottom:-1px;left:0;height:4px;right:0}.mc-tab-link{vertical-align:top;text-decoration:none;-webkit-tap-highlight-color:transparent}.mc-tab-group_stretch-labels .mc-tab-link{flex-basis:0;flex-grow:1}.mc-tab-link.mc-disabled{pointer-events:none}.mc-tab-nav-bar{display:flex}.mc-tab-nav-bar:not(.mc-tab-group_light) .mc-tab-link{position:relative;box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;height:40px;text-align:center;white-space:nowrap;cursor:pointer;padding-right:16px;padding-left:16px;outline:0;border-bottom-width:1px;border-bottom-style:solid;border-top-width:1px;border-top-style:solid;border-top-left-radius:3px;border-top-right-radius:3px}.mc-tab-nav-bar:not(.mc-tab-group_light) .mc-tab-link.cdk-keyboard-focused{z-index:1}.mc-tab-nav-bar:not(.mc-tab-group_light) .mc-tab-link.cdk-keyboard-focused:after{top:-2px;right:-1px;bottom:-1px;left:-1px;border-width:2px;border-style:solid;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom:none}.mc-tab-nav-bar:not(.mc-tab-group_light) .mc-tab-link.mc-disabled{pointer-events:none}.mc-tab-nav-bar:not(.mc-tab-group_light) .mc-tab-link .mc-tab-overlay{position:absolute;top:-1px;left:0;right:0;bottom:0;pointer-events:none}.mc-tab-nav-bar:not(.mc-tab-group_light) .mc-tab-link.mc-active{padding-right:15px;padding-left:15px;border-width:1px;border-style:solid}.mc-tab-nav-bar:not(.mc-tab-group_light) .mc-tab-link.mc-active.cdk-keyboard-focused:after{z-index:1;right:-2px;left:-2px}.mc-tab-nav-bar:not(.mc-tab-group_light) .mc-tab-link .mc-tab-overlay{border-top-width:1px;border-top-style:solid;border-top-color:transparent;border-top-left-radius:3px;border-top-right-radius:3px}.mc-tab-nav-bar.mc-tab-group_light .mc-tab-link{position:relative;box-sizing:border-box;display:inline-flex;justify-content:center;align-items:center;height:40px;text-align:center;white-space:nowrap;cursor:pointer;padding-right:16px;padding-left:16px;outline:0;border-bottom-width:1px;border-bottom-style:solid}.mc-tab-nav-bar.mc-tab-group_light .mc-tab-link.cdk-keyboard-focused{z-index:1}.mc-tab-nav-bar.mc-tab-group_light .mc-tab-link.cdk-keyboard-focused:after{top:-2px;right:-1px;bottom:-1px;left:-1px;border-width:2px;border-style:solid;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom:none}.mc-tab-nav-bar.mc-tab-group_light .mc-tab-link.mc-disabled{pointer-events:none}.mc-tab-nav-bar.mc-tab-group_light .mc-tab-link .mc-tab-overlay{position:absolute;top:-1px;left:0;right:0;bottom:0;pointer-events:none}.mc-tab-nav-bar.mc-tab-group_light .mc-tab-link.cdk-keyboard-focused+:hover:before{left:1px}.mc-tab-nav-bar.mc-tab-group_light .mc-tab-link.cdk-keyboard-focused:after{top:-1px}.mc-tab-nav-bar.mc-tab-group_light .mc-tab-link .mc-tab-overlay{position:absolute;top:0}.mc-tab-links{display:flex;position:relative;padding:1px 1px 0 1px;flex-grow:1}.mc-tab-links .mc-tab-group_align-labels-center{justify-content:center}.mc-tab-links .mc-tab-group_align-labels-end{justify-content:flex-end}'],host:{class:"mc-tab-nav-bar"},encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush}]}],n.ctorParameters=function(){return[{type:t.ElementRef}]},n}(Ir),Dr=function(){function e(){}return e}(),Er=k(w(Dr)),Pr=function(e){function n(t,n,i){var o=e.call(this)||this;return o.elementRef=t,o.focusMonitor=i,o.isActive=!1,o.tabIndex=parseInt(n)||0,o.focusMonitor.monitor(o.elementRef.nativeElement),o}return v(n,e),Object.defineProperty(n.prototype,"active",{get:function(){return this.isActive},set:function(e){e!==this.isActive&&(this.isActive=e)},enumerable:!0,configurable:!0}),n.prototype.ngOnDestroy=function(){this.focusMonitor.stopMonitoring(this.elementRef.nativeElement)},n.decorators=[{type:t.Directive,args:[{selector:"[mc-tab-link], [mcTabLink]",exportAs:"mcTabLink",inputs:["disabled","tabIndex"],host:{class:"mc-tab-link","[attr.aria-current]":"active","[attr.aria-disabled]":"disabled.toString()","[attr.tabIndex]":"tabIndex","[class.mc-disabled]":"disabled","[class.mc-active]":"active"}}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:String,decorators:[{type:t.Attribute,args:["tabindex"]}]},{type:p.FocusMonitor}]},n.propDecorators={active:[{type:t.Input}]},n}(Er),Mr=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,be,d.PortalModule,p.A11yModule],exports:[be,Or,nr,ar,Sr,Pr,tr,gr,fr,yr,br],declarations:[Or,nr,ar,ur,Sr,Pr,cr,lr,mr,tr,gr,fr,yr,br]}]}],e}(),Tr=new t.InjectionToken("mc-tags-default-options"),Ar=function(){function e(e,t,n){void 0===n&&(n=!1),this.source=e,this.selected=t,this.isUserInput=n}return e}(),Rr=["mc-basic-tag"],Vr=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-tag-avatar, [mcTagAvatar]",host:{class:"mc-tag-avatar"}}]}],e}(),Fr=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-tag-trailing-icon, [mcTagTrailingIcon]",host:{class:"mc-tag-trailing-icon"}}]}],e}(),Lr=function(){function e(e){this._elementRef=e}return e}(),Nr=O(w(Lr)),jr=function(e){function n(n,i,r){var a=e.call(this,n)||this;return a.elementRef=n,a.changeDetectorRef=i,a._ngZone=r,a.onFocus=new o.Subject,a.onBlur=new o.Subject,a.hasFocus=!1,a.tagListSelectable=!0,a.selectionChange=new t.EventEmitter,a.destroyed=new t.EventEmitter,a.removed=new t.EventEmitter,a._selected=!1,a._selectable=!0,a._removable=!0,a._disabled=!1,a.addHostClassName(),a.nativeElement=n.nativeElement,a}return v(n,e),Object.defineProperty(n.prototype,"selected",{get:function(){return this._selected},set:function(e){var t=i.coerceBooleanProperty(e);t!==this._selected&&(this._selected=t,this.dispatchSelectionChange())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return void 0!==this._value?this._value:this.elementRef.nativeElement.textContent},set:function(e){this._value=e},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"selectable",{get:function(){return this._selectable&&this.tagListSelectable},set:function(e){this._selectable=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"removable",{get:function(){return this._removable},set:function(e){this._removable=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"tabindex",{get:function(){return this.selectable?this.disabled?null:-1:null},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"disabled",{get:function(){return this._disabled},set:function(e){e!==this.disabled&&(this._disabled=e)},enumerable:!0,configurable:!0}),n.prototype.ngAfterContentInit=function(){this.addClassModificatorForIcons()},n.prototype.addClassModificatorForIcons=function(){var e=this.contentChildren.map(function(e){return e._elementRef.nativeElement});if(1===e.length){var t=e[0];t.previousElementSibling||t.nextElementSibling||(t.nextSibling&&(t.classList.add("mc-icon_left"),this.nativeElement.classList.add("mc-left-icon")),t.previousSibling&&(t.classList.add("mc-icon_right"),this.nativeElement.classList.add("mc-right-icon")))}else if(e.length>1){var n=e[0],i=e[1];n.classList.add("mc-icon_left"),i.classList.add("mc-icon_right")}},n.prototype.addHostClassName=function(){for(var e=0,t=Rr;e<t.length;e++){var n=t[e];if(this.elementRef.nativeElement.hasAttribute(n)||this.elementRef.nativeElement.tagName.toLowerCase()===n)return void this.elementRef.nativeElement.classList.add(n)}this.elementRef.nativeElement.classList.add("mc-standard-tag")},n.prototype.ngOnDestroy=function(){this.destroyed.emit({tag:this})},n.prototype.select=function(){this._selected||(this._selected=!0,this.dispatchSelectionChange())},n.prototype.deselect=function(){this._selected&&(this._selected=!1,this.dispatchSelectionChange())},n.prototype.selectViaInteraction=function(){this._selected||(this._selected=!0,this.dispatchSelectionChange(!0))},n.prototype.toggleSelected=function(e){return void 0===e&&(e=!1),this._selected=!this.selected,this.dispatchSelectionChange(e),this.selected},n.prototype.focus=function(){var e=this;this.selectable&&(this.hasFocus||(this.elementRef.nativeElement.focus(),this.onFocus.next({tag:this}),Promise.resolve().then(function(){e.hasFocus=!0,e.changeDetectorRef.markForCheck()})))},n.prototype.remove=function(){this.removable&&this.removed.emit({tag:this})},n.prototype.handleClick=function(e){this.disabled?e.preventDefault():e.stopPropagation()},n.prototype.handleKeydown=function(e){if(!this.disabled)switch(e.keyCode){case a.DELETE:case a.BACKSPACE:this.remove(),e.preventDefault();break;case a.SPACE:this.selectable&&this.toggleSelected(!0),e.preventDefault()}},n.prototype.blur=function(){var e=this;this._ngZone.onStable.asObservable().pipe(m.take(1)).subscribe(function(){e._ngZone.run(function(){e.hasFocus=!1,e.onBlur.next({tag:e})})})},n.prototype.dispatchSelectionChange=function(e){void 0===e&&(e=!1),this.selectionChange.emit({source:this,isUserInput:e,selected:this._selected})},n.decorators=[{type:t.Component,args:[{selector:"mc-tag, [mc-tag], mc-basic-tag, [mc-basic-tag]",exportAs:"mcTag",template:'<div class="mc-tag__wrapper"><span class="mc-tag__text"><ng-content></ng-content></span><ng-content select="[mc-icon]"></ng-content><div class="mc-tag-overlay"></div></div>',styles:[".mc-tag{position:relative;display:inline-block;overflow:hidden;margin:2px;height:24px;border-width:1px;border-style:solid;border-radius:4px;cursor:default;outline:0;box-sizing:border-box}.mc-tag.mc-left-icon{padding-left:3px}.mc-tag.mc-right-icon{padding-right:3px}.mc-tag__wrapper{display:flex;align-items:center;height:100%;flex:1 1 100%}.mc-tag__wrapper .mc-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:24px;height:24px}.mc-tag__wrapper .mc-icon_left{margin-right:3px}.mc-tag__wrapper .mc-icon_right{margin-left:3px}.mc-tag-overlay{position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;pointer-events:none;border-radius:inherit}.mc-tag__text{margin-left:7px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}"],inputs:["color","disabled"],host:{class:"mc-tag","[attr.tabindex]":"tabindex","[attr.disabled]":"disabled || null","[class.mc-selected]":"selected","[class.mc-focused]":"hasFocus","[class.mc-tag-with-avatar]":"avatar","[class.mc-tag-with-trailing-icon]":"trailingIcon || removeIcon","[class.mc-tag-disabled]":"disabled","[class.mc-disabled]":"disabled","(click)":"handleClick($event)","(keydown)":"handleKeydown($event)","(focus)":"focus()","(blur)":"blur()"},changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:t.NgZone}]},n.propDecorators={contentChildren:[{type:t.ContentChildren,args:[xt]}],avatar:[{type:t.ContentChild,args:[Vr,{static:!1}]}],trailingIcon:[{type:t.ContentChild,args:[Fr,{static:!1}]}],removeIcon:[{type:t.ContentChild,args:[t.forwardRef(function(){return Br}),{static:!1}]}],selectionChange:[{type:t.Output}],destroyed:[{type:t.Output}],removed:[{type:t.Output}],selected:[{type:t.Input}],value:[{type:t.Input}],selectable:[{type:t.Input}],removable:[{type:t.Input}]},n}(Nr),Br=function(){function e(e){this.parentTag=e}return e.prototype.focus=function(e){e.stopPropagation()},e.prototype.handleClick=function(e){this.parentTag.removable&&this.parentTag.remove(),e.stopPropagation()},e.decorators=[{type:t.Directive,args:[{selector:"[mcTagRemove]",host:{class:"mc-tag-remove mc-tag-trailing-icon","[attr.tabindex]":"-1","(click)":"handleClick($event)","(focus)":"focus($event)"}}]}],e.ctorParameters=function(){return[{type:jr}]},e}(),zr=function(){function e(e,t,n,i){this.defaultErrorStateMatcher=e,this.parentForm=t,this.parentFormGroup=n,this.ngControl=i}return e}(),Wr=I(zr),Yr=0,Hr=function(){function e(e,t){this.source=e,this.value=t}return e}(),Kr=function(e){function r(n,i,r,a,s,c,l,p,d,u,h){var m=e.call(this,r,l,p,d)||this;return m.elementRef=n,m.changeDetectorRef=i,m.rawValidators=a,m.mcValidation=s,m.dir=c,m.ngModel=u,m.formControlName=h,m.controlType="mc-tag-list",m.valueChange=new t.EventEmitter,m.uid="mc-tag-list-"+Yr++,m.userTabIndex=null,m.tagChanges=new t.EventEmitter,m.orientation="horizontal",m.change=new t.EventEmitter,m._tabIndex=0,m._required=!1,m._disabled=!1,m._selectable=!0,m._multiple=!1,m.lastDestroyedTagIndex=null,m.destroyed=new o.Subject,m.onTouched=function(){},m.onChange=function(){},m._compareWith=function(e,t){return e===t},m.ngControl&&(m.ngControl.valueAccessor=m),m}return v(r,e),Object.defineProperty(r.prototype,"tagSelectionChanges",{get:function(){return o.merge.apply(void 0,this.tags.map(function(e){return e.selectionChange}))},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"tagFocusChanges",{get:function(){return o.merge.apply(void 0,this.tags.map(function(e){return e.onFocus}))},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"tagBlurChanges",{get:function(){return o.merge.apply(void 0,this.tags.map(function(e){return e.onBlur}))},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"tagRemoveChanges",{get:function(){return o.merge.apply(void 0,this.tags.map(function(e){return e.destroyed}))},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"selected",{get:function(){return this.multiple?this.selectionModel.selected:this.selectionModel.selected[0]},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"canShowCleaner",{get:function(){return this.cleaner&&this.tags.length>0},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"multiple",{get:function(){return this._multiple},set:function(e){this._multiple=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"compareWith",{get:function(){return this._compareWith},set:function(e){this._compareWith=e,this.selectionModel&&this.initializeSelection()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"value",{get:function(){return this._value},set:function(e){this.writeValue(e),this._value=e},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"id",{get:function(){return this.tagInput?this.tagInput.id:this.uid},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"required",{get:function(){return this._required},set:function(e){this._required=i.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"placeholder",{get:function(){return this.tagInput?this.tagInput.placeholder:this._placeholder},set:function(e){this._placeholder=e,this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"focused",{get:function(){return this.tagInput&&this.tagInput.focused||this.hasFocusedTag()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"empty",{get:function(){return(!this.tagInput||this.tagInput.empty)&&0===this.tags.length},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"shouldLabelFloat",{get:function(){return!this.empty||this.focused},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"disabled",{get:function(){return this.ngControl?!!this.ngControl.disabled:this._disabled},set:function(e){this._disabled=i.coerceBooleanProperty(e),this.syncTagsDisabledState()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"selectable",{get:function(){return this._selectable},set:function(e){var t=this;this._selectable=i.coerceBooleanProperty(e),this.tags&&this.tags.forEach(function(e){return e.tagListSelectable=t._selectable})},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"tabIndex",{set:function(e){this.userTabIndex=e,this._tabIndex=e},enumerable:!0,configurable:!0}),r.prototype.ngAfterContentInit=function(){var e=this;this.mcValidation.useValidation&&B(this),this.keyManager=new p.FocusKeyManager(this.tags).withVerticalOrientation().withHorizontalOrientation(this.dir?this.dir.value:"ltr"),this.dir&&this.dir.change.pipe(m.takeUntil(this.destroyed)).subscribe(function(t){return e.keyManager.withHorizontalOrientation(t)}),this.keyManager.tabOut.pipe(m.takeUntil(this.destroyed)).subscribe(function(){e._tabIndex=-1,setTimeout(function(){e._tabIndex=e.userTabIndex||0,e.changeDetectorRef.markForCheck()})}),this.tags.changes.pipe(m.startWith(null),m.takeUntil(this.destroyed)).subscribe(function(){e.disabled&&Promise.resolve().then(function(){e.syncTagsDisabledState()}),e.resetTags(),e.initializeSelection(),e.updateTabIndex(),e.updateFocusForDestroyedTags(),Promise.resolve().then(function(){e.tagChanges.emit(e.tags.toArray()),e.stateChanges.next(),e.propagateTagsChanges()})})},r.prototype.ngOnInit=function(){this.selectionModel=new g.SelectionModel(this.multiple,void 0,!1),this.stateChanges.next()},r.prototype.ngDoCheck=function(){this.ngControl&&this.updateErrorState()},r.prototype.ngOnDestroy=function(){this.destroyed.next(),this.destroyed.complete(),this.stateChanges.complete(),this.dropSubscriptions()},r.prototype.registerInput=function(e){var t=this;this.tagInput=e,this.ngControl&&e.ngControl&&e.ngControl.statusChanges.subscribe(function(){return t.ngControl.control.setErrors(e.ngControl.errors)})},r.prototype.writeValue=function(e){this.tags&&this.setSelectionByValue(e,!1)},r.prototype.registerOnChange=function(e){this.onChange=e},r.prototype.registerOnTouched=function(e){this.onTouched=e},r.prototype.setDisabledState=function(e){this.disabled=e,this.stateChanges.next()},r.prototype.onContainerClick=function(e){this.originatesFromTag(e)||this.focus()},r.prototype.focus=function(){this.disabled||this.tagInput&&this.tagInput.focused||(this.tags.length>0?(this.keyManager.setFirstItemActive(),this.stateChanges.next()):(this.focusInput(),this.stateChanges.next()))},r.prototype.focusInput=function(){this.tagInput&&this.tagInput.focus()},r.prototype.keydown=function(e){var t=e.target;e.keyCode===a.BACKSPACE&&this.isInputEmpty(t)?(this.keyManager.setLastItemActive(),e.preventDefault()):t&&t.classList.contains("mc-tag")&&(e.keyCode===a.HOME?(this.keyManager.setFirstItemActive(),e.preventDefault()):e.keyCode===a.END?(this.keyManager.setLastItemActive(),e.preventDefault()):this.keyManager.onKeydown(e),this.stateChanges.next())},r.prototype.setSelectionByValue=function(e,t){var n=this;if(void 0===t&&(t=!0),this.clearSelection(),this.tags.forEach(function(e){return e.deselect()}),Array.isArray(e))e.forEach(function(e){return n.selectValue(e,t)}),this.sortValues();else{var i=this.selectValue(e,t);i&&t&&this.keyManager.setActiveItem(i)}},r.prototype.blur=function(){var e=this;this.hasFocusedTag()||this.keyManager.setActiveItem(-1),this.disabled||(this.tagInput?setTimeout(function(){e.focused||e.markAsTouched()}):this.markAsTouched())},r.prototype.markAsTouched=function(){this.onTouched(),this.changeDetectorRef.markForCheck(),this.stateChanges.next()},r.prototype.updateTabIndex=function(){this._tabIndex=this.userTabIndex||(0===this.tags.length?-1:0)},r.prototype.updateFocusForDestroyedTags=function(){if(null!=this.lastDestroyedTagIndex)if(this.tags.length){var e=Math.min(this.lastDestroyedTagIndex,this.tags.length-1);this.keyManager.setActiveItem(e)}else this.focusInput();this.lastDestroyedTagIndex=null},r.prototype.isValidIndex=function(e){return e>=0&&e<this.tags.length},r.prototype.isInputEmpty=function(e){if(e&&"input"===e.nodeName.toLowerCase()){return!e.value}return!1},r.prototype.selectValue=function(e,t){var n=this;void 0===t&&(t=!0);var i=this.tags.find(function(t){return null!=t.value&&n._compareWith(t.value,e)});return i&&(t?i.selectViaInteraction():i.select(),this.selectionModel.select(i)),i},r.prototype.initializeSelection=function(){var e=this;Promise.resolve().then(function(){(e.ngControl||e._value)&&(e.setSelectionByValue(e.ngControl?e.ngControl.value:e._value,!1),e.stateChanges.next())})},r.prototype.clearSelection=function(e){this.selectionModel.clear(),this.tags.forEach(function(t){t!==e&&t.deselect()}),this.stateChanges.next()},r.prototype.sortValues=function(){var e=this;this._multiple&&(this.selectionModel.clear(),this.tags.forEach(function(t){t.selected&&e.selectionModel.select(t)}),this.stateChanges.next())},r.prototype.propagateChanges=function(e){var t=null;t=Array.isArray(this.selected)?this.selected.map(function(e){return e.value}):this.selected?this.selected.value:e,this._value=t,this.change.emit(new Hr(this,t)),this.valueChange.emit(t),this.onChange(t),this.changeDetectorRef.markForCheck()},r.prototype.propagateTagsChanges=function(){var e=this.tags.map(function(e){return e.value});this._value=e,this.change.emit(new Hr(this,e)),this.valueChange.emit(e),this.onChange(e),this.changeDetectorRef.markForCheck()},r.prototype.resetTags=function(){this.dropSubscriptions(),this.listenToTagsFocus(),this.listenToTagsSelection(),this.listenToTagsRemoved()},r.prototype.dropSubscriptions=function(){this.tagFocusSubscription&&(this.tagFocusSubscription.unsubscribe(),this.tagFocusSubscription=null),this.tagBlurSubscription&&(this.tagBlurSubscription.unsubscribe(),this.tagBlurSubscription=null),this.tagSelectionSubscription&&(this.tagSelectionSubscription.unsubscribe(),this.tagSelectionSubscription=null),this.tagRemoveSubscription&&(this.tagRemoveSubscription.unsubscribe(),this.tagRemoveSubscription=null)},r.prototype.listenToTagsSelection=function(){var e=this;this.tagSelectionSubscription=this.tagSelectionChanges.subscribe(function(t){t.source.selected?e.selectionModel.select(t.source):e.selectionModel.deselect(t.source),e.multiple||e.tags.forEach(function(t){!e.selectionModel.isSelected(t)&&t.selected&&t.deselect()}),t.isUserInput&&e.propagateChanges()})},r.prototype.listenToTagsFocus=function(){var e=this;this.tagFocusSubscription=this.tagFocusChanges.subscribe(function(t){var n=e.tags.toArray().indexOf(t.tag);e.isValidIndex(n)&&e.keyManager.updateActiveItem(n),e.stateChanges.next()}),this.tagBlurSubscription=this.tagBlurChanges.subscribe(function(){e.blur(),e.stateChanges.next()})},r.prototype.listenToTagsRemoved=function(){var e=this;this.tagRemoveSubscription=this.tagRemoveChanges.subscribe(function(t){var n=t.tag,i=e.tags.toArray().indexOf(t.tag);e.isValidIndex(i)&&n.hasFocus?e.lastDestroyedTagIndex=i:e.isValidIndex(i)&&!n.hasFocus&&e.focusInput()})},r.prototype.originatesFromTag=function(e){for(var t=e.target;t&&t!==this.elementRef.nativeElement;){if(t.classList.contains("mc-tag"))return!0;t=t.parentElement}return!1},r.prototype.hasFocusedTag=function(){return this.tags.some(function(e){return e.hasFocus})},r.prototype.syncTagsDisabledState=function(){var e=this;this.tags&&this.tags.forEach(function(t){t.disabled=e._disabled})},r.decorators=[{type:t.Component,args:[{selector:"mc-tag-list",exportAs:"mcTagList",template:'<div class="mc-tags-list__list-container"><ng-content></ng-content></div><div class="mc-tags-list__cleaner" *ngIf="canShowCleaner"><ng-content select="mc-cleaner"></ng-content></div>',host:{class:"mc-tag-list","[attr.tabindex]":"disabled ? null : _tabIndex","[class.mc-disabled]":"disabled","[class.mc-invalid]":"errorState","[class.mc-required]":"required","(focus)":"focus()","(blur)":"blur()","(keydown)":"keydown($event)","[id]":"uid"},providers:[{provide:kt,useExisting:r}],styles:[".mc-tag-list{display:flex;flex-direction:row}.mc-tags-list__list-container{display:flex;flex-wrap:wrap;flex:1 1 100%;min-width:0;min-height:28px;padding:2px 6px}.mc-tags-list__list-container .mc-tag-input{max-width:100%;flex:1 1 auto;height:22px;margin:2px 4px}.mc-tags-list__cleaner .mc-cleaner{height:32px}.mc-tag-input{border:none;outline:0;background:0 0}"],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush}]}],r.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:Oe},{type:Array,decorators:[{type:t.Optional},{type:t.Inject,args:[l.NG_VALIDATORS]}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[bt]}]},{type:n.Directionality,decorators:[{type:t.Optional}]},{type:l.NgForm,decorators:[{type:t.Optional}]},{type:l.FormGroupDirective,decorators:[{type:t.Optional}]},{type:l.NgControl,decorators:[{type:t.Optional},{type:t.Self}]},{type:l.NgModel,decorators:[{type:t.Optional},{type:t.Self}]},{type:l.FormControlName,decorators:[{type:t.Optional},{type:t.Self}]}]},r.propDecorators={multiple:[{type:t.Input}],compareWith:[{type:t.Input}],value:[{type:t.Input}],required:[{type:t.Input}],placeholder:[{type:t.Input}],disabled:[{type:t.Input}],selectable:[{type:t.Input}],tabIndex:[{type:t.Input}],valueChange:[{type:t.Output}],errorStateMatcher:[{type:t.Input}],orientation:[{type:t.Input,args:["orientation"]}],change:[{type:t.Output}],cleaner:[{type:t.ContentChild,args:["mcTagListCleaner",{static:!0}]}],tags:[{type:t.ContentChildren,args:[jr,{descendants:!0}]}]},r}(Wr),Ur=0,Gr=function(){function e(e,n,i,o){this.elementRef=e,this.renderer=n,this.defaultOptions=i,this.ngControl=o,this.focused=!1,this.separatorKeyCodes=this.defaultOptions.separatorKeyCodes,this.tagEnd=new t.EventEmitter,this.placeholder="",this.id="mc-tag-list-input-"+Ur++,this._addOnBlur=!0,this._disabled=!1,this.countOfSymbolsForUpdateWidth=3,this.inputElement=this.elementRef.nativeElement,this.setDefaultInputWidth()}return Object.defineProperty(e.prototype,"tagList",{set:function(e){e&&(this._tagList=e,this._tagList.registerInput(this))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"addOnBlur",{get:function(){return this._addOnBlur},set:function(e){this._addOnBlur=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled||this._tagList&&this._tagList.disabled},set:function(e){this._disabled=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return!this.inputElement.value},enumerable:!0,configurable:!0}),e.prototype.ngOnChanges=function(){this._tagList.stateChanges.next()},e.prototype.onKeydown=function(e){this.inputElement.value||this._tagList.keydown(e),this.isSeparatorKey(e)&&(this.emitTagEnd(),e.preventDefault())},e.prototype.blur=function(){this.focused=!1,this._tagList.focused||(this.triggerValidation(),this._tagList.blur()),this.addOnBlur&&this.emitTagEnd(),this._tagList.stateChanges.next()},e.prototype.triggerValidation=function(){this.hasControl()&&this.ngControl.statusChanges.emit(this.ngControl.status)},e.prototype.emitTagEnd=function(){(!this.hasControl()||this.hasControl()&&!this.ngControl.invalid)&&(this.tagEnd.emit({input:this.inputElement,value:this.inputElement.value}),this.updateInputWidth())},e.prototype.onInput=function(){this.updateInputWidth(),this._tagList.stateChanges.next()},e.prototype.onPaste=function(e){var t=this;if(e.clipboardData){var n=e.clipboardData.getData("text");if(!n||0!==n.length){for(var i=[],o=0,r=this.separatorKeyCodes;o<r.length;o++){var a=r[o],s=this.separatorKeyToSymbol(a);if(n.search(s)>-1){i.push.apply(i,n.split(s));break}}0===i.length&&i.push(n),i.forEach(function(e){return t.tagEnd.emit({input:t.inputElement,value:e})}),this.updateInputWidth(),e.preventDefault(),e.stopPropagation()}}},e.prototype.updateInputWidth=function(){var e=this.inputElement.value.length;this.renderer.setStyle(this.inputElement,"max-width",0),this.oneSymbolWidth=this.inputElement.scrollWidth/e,
17
- this.renderer.setStyle(this.inputElement,"max-width",""),e>this.countOfSymbolsForUpdateWidth?this.renderer.setStyle(this.inputElement,"width",e*this.oneSymbolWidth+"px"):this.setDefaultInputWidth()},e.prototype.onFocus=function(){this.focused=!0,this._tagList.stateChanges.next()},e.prototype.focus=function(){this.inputElement.focus()},e.prototype.separatorKeyToSymbol=function(e){var t,n=(t={},t[a.ENTER]=/\r?\n/,t[a.TAB]=/\t/,t[a.SPACE]=/ /,t[a.COMMA]=/,/,t)[e];return n||e},e.prototype.hasControl=function(){return!!this.ngControl},e.prototype.setDefaultInputWidth=function(){this.renderer.setStyle(this.inputElement,"width","30px")},e.prototype.isSeparatorKey=function(e){return!a.hasModifierKey(e)&&this.separatorKeyCodes.indexOf(e.keyCode)>-1},e.decorators=[{type:t.Directive,args:[{selector:"input[mcTagInputFor]",exportAs:"mcTagInput, mcTagInputFor",host:{class:"mc-tag-input mc-input-element","[id]":"id","[attr.disabled]":"disabled || null","[attr.placeholder]":"placeholder || null","(keydown)":"onKeydown($event)","(blur)":"blur()","(focus)":"onFocus()","(input)":"onInput()","(paste)":"onPaste($event)"}}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2},{type:void 0,decorators:[{type:t.Inject,args:[Tr]}]},{type:l.NgControl,decorators:[{type:t.Optional},{type:t.Self}]}]},e.propDecorators={separatorKeyCodes:[{type:t.Input,args:["mcTagInputSeparatorKeyCodes"]}],tagEnd:[{type:t.Output,args:["mcTagInputTokenEnd"]}],placeholder:[{type:t.Input}],id:[{type:t.Input}],tagList:[{type:t.Input,args:["mcTagInputFor"]}],addOnBlur:[{type:t.Input,args:["mcTagInputAddOnBlur"]}],disabled:[{type:t.Input}]},e}(),Xr={separatorKeyCodes:[a.ENTER]},qr=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,h.PlatformModule],exports:[Kr,jr,Gr,Fr,Vr,Br],declarations:[Kr,jr,Gr,Fr,Vr,Br],providers:[{provide:Tr,useValue:Xr}]}]}],e}(),$r=0,Zr=function(){function e(e,t){this.source=e,this.value=t}return e}(),Qr=function(){function e(e,t,n,i,o){this.elementRef=e,this.defaultErrorStateMatcher=t,this.parentForm=n,this.parentFormGroup=i,this.ngControl=o}return e}(),Jr=k(w(I(Qr))),ea=function(){function e(e){this.searchChangesSubscription=new o.Subscription,this.isSearchChanged=!1,e.canCleanerClearByEsc=!1}return e.prototype.focus=function(){this.input.focus()},e.prototype.reset=function(){this.input.ngControl.reset()},e.prototype.ngAfterContentInit=function(){var e=this;if(!this.input)throw Error("McSelectSearch does not work without mcInput");if(!this.input.ngControl)throw Error("McSelectSearch does not work without ngControl");Promise.resolve().then(function(){e.searchChangesSubscription=e.input.ngControl.valueChanges.subscribe(function(){e.isSearchChanged=!0})})},e.prototype.ngOnDestroy=function(){this.searchChangesSubscription.unsubscribe()},e.prototype.handleKeydown=function(e){e.keyCode===a.ESCAPE&&this.input.value&&(this.reset(),e.stopPropagation())},e.decorators=[{type:t.Directive,args:[{selector:"[mcSelectSearch]",exportAs:"mcSelectSearch",host:{"(keydown)":"handleKeydown($event)"}}]}],e.ctorParameters=function(){return[{type:Rt}]},e.propDecorators={input:[{type:t.ContentChild,args:[In,{static:!1}]}]},e}(),ta=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"[mc-select-search-empty-result]",exportAs:"mcSelectSearchEmptyResult"}]}],e}(),na=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-select-trigger"}]}],e}(),ia=function(e){function r(n,i,r,a,s,c,l,p,d,u,h,g,f,y,b,v,C){var _=e.call(this,c,s,d,u,g)||this;return _._viewportRuler=n,_._changeDetectorRef=i,_._ngZone=r,_._renderer=a,_.rawValidators=l,_._dir=p,_._parentFormField=h,_.ngModel=f,_.formControlName=y,_._scrollStrategyFactory=v,_.mcValidation=C,_.controlType="mc-select",_.hiddenItems=0,_.triggerFontSize=0,_.previousSelectionModelSelected=[],_.transformOrigin="top",_.panelDoneAnimating=!1,_.panelDoneAnimatingStream=new o.Subject,_.scrollStrategy=_._scrollStrategyFactory(),_.offsetY=0,_.positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"}],_.hiddenItemsText="...ещё",_.optionSelectionChanges=o.defer(function(){return _.options?o.merge.apply(void 0,_.options.map(function(e){return e.onSelectionChange}).concat(_.selectionModel.selected.map(function(e){return e.onSelectionChange}))):_._ngZone.onStable.asObservable().pipe(m.take(1),m.switchMap(function(){return _.optionSelectionChanges}))}),_.openedChange=new t.EventEmitter,_.openedStream=_.openedChange.pipe(m.filter(function(e){return e}),m.map(function(){})),_.closedStream=_.openedChange.pipe(m.filter(function(e){return!e}),m.map(function(){})),_.selectionChange=new t.EventEmitter,_.valueChange=new t.EventEmitter,_._required=!1,_._multiple=!1,_._focused=!1,_._panelOpen=!1,_.scrollTop=0,_.uid="mc-select-"+$r++,_.destroy=new o.Subject,_.onChange=function(){},_.onTouched=function(){},_._compareWith=function(e,t){return e===t},_.ngControl&&(_.ngControl.valueAccessor=_),_.tabIndex=parseInt(b)||0,_.id=_.id,_}return v(r,e),Object.defineProperty(r.prototype,"placeholder",{get:function(){return this._placeholder},set:function(e){this._placeholder=e,this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"required",{get:function(){return this._required},set:function(e){this._required=i.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"multiple",{get:function(){return this._multiple},set:function(e){if(this.selectionModel)throw T();this._multiple=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"compareWith",{get:function(){return this._compareWith},set:function(e){if("function"!=typeof e)throw R();this._compareWith=e,this.selectionModel&&this.initializeSelection()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"value",{get:function(){return this._value},set:function(e){e!==this._value&&(this.writeValue(e),this._value=e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"id",{get:function(){return this._id},set:function(e){this._id=e||this.uid,this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"focused",{get:function(){return this._focused||this._panelOpen},set:function(e){this._focused=e},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"panelOpen",{get:function(){return this._panelOpen},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isEmptySearchResult",{get:function(){return this.search&&0===this.options.length&&!!this.search.input.value},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"canShowCleaner",{get:function(){return this.cleaner&&this.selectionModel.hasValue()},enumerable:!0,configurable:!0}),r.prototype.ngOnInit=function(){var e=this;this.selectionModel=new g.SelectionModel(this.multiple),this.stateChanges.next(),this.panelDoneAnimatingStream.pipe(m.distinctUntilChanged(),m.takeUntil(this.destroy)).subscribe(function(){e.panelOpen?(e.scrollTop=0,e.openedChange.emit(!0)):(e.openedChange.emit(!1),e.panelDoneAnimating=!1,e.overlayDir.offsetX=0,e._changeDetectorRef.markForCheck())})},r.prototype.ngAfterContentInit=function(){var e=this;this.mcValidation.useValidation&&B(this),this.initKeyManager(),this.selectionModel.changed.pipe(m.takeUntil(this.destroy)).subscribe(function(e){e.added.forEach(function(e){return e.select()}),e.removed.forEach(function(e){return e.deselect()})}),this.options.changes.pipe(m.startWith(null),m.takeUntil(this.destroy)).subscribe(function(){e.resetOptions(),e.initializeSelection()})},r.prototype.ngAfterViewInit=function(){var e=this;this.tags.changes.subscribe(function(){setTimeout(function(){return e.calculateHiddenItems()},0)})},r.prototype.ngDoCheck=function(){this.ngControl&&this.updateErrorState()},r.prototype.ngOnChanges=function(e){e.disabled&&this.stateChanges.next()},r.prototype.ngOnDestroy=function(){this.destroy.next(),this.destroy.complete(),this.stateChanges.complete()},r.prototype.hiddenItemsTextFormatter=function(e,t){return e+" "+t},r.prototype.clearValue=function(e){e.stopPropagation(),this.selectionModel.clear(),this.keyManager.setActiveItem(-1),this.propagateChanges()},r.prototype.resetSearch=function(){this.search&&(this.search.reset(),this.search.isSearchChanged=!1)},r.prototype.toggle=function(){this.panelOpen?this.close():this.open()},r.prototype.open=function(){var e=this;!this.disabled&&this.options&&this.options.length&&!this._panelOpen&&(this.triggerRect=this.trigger.nativeElement.getBoundingClientRect(),this.triggerFontSize=parseInt(getComputedStyle(this.trigger.nativeElement)["font-size"]),this._panelOpen=!0,this.keyManager.withHorizontalOrientation(null),this.highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this._ngZone.onStable.asObservable().pipe(m.take(1)).subscribe(function(){e.triggerFontSize&&e.overlayDir.overlayRef&&e.overlayDir.overlayRef.overlayElement&&(e.overlayDir.overlayRef.overlayElement.style.fontSize=e.triggerFontSize+"px")}))},r.prototype.close=function(){this._panelOpen&&(this.resetSearch(),this._panelOpen=!1,this.keyManager.withHorizontalOrientation(this.isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this.onTouched())},r.prototype.writeValue=function(e){this.options&&this.setSelectionByValue(e)},r.prototype.registerOnChange=function(e){this.onChange=e},r.prototype.registerOnTouched=function(e){this.onTouched=e},r.prototype.setDisabledState=function(e){this.disabled=e,this._changeDetectorRef.markForCheck(),this.stateChanges.next()},Object.defineProperty(r.prototype,"selected",{get:function(){return this.multiple?this.selectionModel.selected:this.selectionModel.selected[0]},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"triggerValue",{get:function(){return this.empty?"":this.selectionModel.selected[0].viewValue},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"triggerValues",{get:function(){if(this.empty)return[];var e=this.selectionModel.selected;return this.isRtl()&&e.reverse(),e},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"empty",{get:function(){return!this.selectionModel||this.selectionModel.isEmpty()},enumerable:!0,configurable:!0}),r.prototype.isRtl=function(){return!!this._dir&&"rtl"===this._dir.value},r.prototype.handleKeydown=function(e){this.disabled||(this.panelOpen?this.handleOpenKeydown(e):this.handleClosedKeydown(e))},r.prototype.onFadeInDone=function(){this.panelDoneAnimating=this.panelOpen,this._changeDetectorRef.markForCheck(),this.search&&this._panelOpen&&this.search.focus()},r.prototype.onFocus=function(){this.disabled||(this._focused=!0,this.stateChanges.next())},r.prototype.onBlur=function(){this._focused=!1,this.disabled||this.panelOpen||(this.onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())},r.prototype.onAttached=function(){var e=this;this.overlayDir.positionChange.pipe(m.take(1)).subscribe(function(){e._changeDetectorRef.detectChanges(),e.calculateOverlayOffsetX(),e.optionsContainer.nativeElement.scrollTop=e.scrollTop,e.updateScrollSize()})},r.prototype.getPanelTheme=function(){return this._parentFormField?"mc-"+this._parentFormField.color:""},r.prototype.focus=function(){this.elementRef.nativeElement.focus()},r.prototype.onContainerClick=function(){this.focus(),this.open()},r.prototype.onRemoveMatcherItem=function(e,t){t.stopPropagation(),e.deselect()},r.prototype.calculateHiddenItems=function(){var e=this;if(!this.customTrigger&&!this.empty&&this.multiple){var t=0,n=this.getTotalItemsWidthInMatcher(),i=0;if(this.tags.forEach(function(n){n.nativeElement.offsetTop<n.nativeElement.offsetHeight&&(i+=e.getItemWidth(n.nativeElement),t++)}),this.hiddenItems=this.selected.length-t,this.hiddenItems){var o=this.trigger.nativeElement.querySelector(".mc-select__match-hidden-text"),r=this.trigger.nativeElement.querySelector(".mc-select__match-list"),a=o.offsetTop<o.offsetHeight,s=r.getBoundingClientRect().width,c=s+86;if(a&&n<c&&(this.hiddenItems=0),i===s||i+86<s)return void this._changeDetectorRef.markForCheck();!a&&n+86>c&&this.hiddenItems++}this._changeDetectorRef.markForCheck()}},r.prototype.getItemHeight=function(){return this.options.first?this.options.first.getHeight():0},r.prototype.getHeightOfOptionsContainer=function(){return this.optionsContainer.nativeElement.getClientRects()[0].height},r.prototype.updateScrollSize=function(){this.options.first&&this.keyManager.withScrollSize(Math.floor(this.getHeightOfOptionsContainer()/this.options.first.getHeight()))},r.prototype.getTotalItemsWidthInMatcher=function(){var e=this,t=this.trigger.nativeElement.cloneNode(!0);t.querySelector(".mc-select__match-hidden-text").remove(),this._renderer.setStyle(t,"position","absolute"),this._renderer.setStyle(t,"visibility","hidden"),this._renderer.setStyle(t,"top","-100%"),this._renderer.setStyle(t,"left","0"),this._renderer.appendChild(this.trigger.nativeElement,t);var n=0;return t.querySelectorAll("mc-tag").forEach(function(t){n+=e.getItemWidth(t)}),t.remove(),n},r.prototype.getItemWidth=function(e){var t=window.getComputedStyle(e);return parseInt(t.width)+parseInt(t.marginLeft)+parseInt(t.marginRight)},r.prototype.handleClosedKeydown=function(e){var t=e.keyCode,n=t===a.DOWN_ARROW||t===a.UP_ARROW||t===a.LEFT_ARROW||t===a.RIGHT_ARROW;t===a.ENTER||t===a.SPACE||(this.multiple||e.altKey)&&n?(e.preventDefault(),this.open()):this.multiple||this.keyManager.onKeydown(e)},r.prototype.handleOpenKeydown=function(e){var t=e.keyCode,n=t===a.DOWN_ARROW||t===a.UP_ARROW,i=this.keyManager;if(n&&e.altKey)e.preventDefault(),this.close();else if(t===a.HOME)e.preventDefault(),i.setFirstItemActive();else if(t===a.END)e.preventDefault(),i.setLastItemActive();else if(t===a.PAGE_UP)e.preventDefault(),i.setPreviousPageItemActive();else if(t===a.PAGE_DOWN)e.preventDefault(),i.setNextPageItemActive();else if(t!==a.ENTER&&t!==a.SPACE||!i.activeItem)if(this._multiple&&t===a.A&&e.ctrlKey){e.preventDefault();var o=this.options.some(function(e){return!e.selected});this.options.forEach(function(e){o&&!e.disabled?e.select():e.deselect()})}else{var r=i.activeItemIndex;i.onKeydown(e),this._multiple&&n&&e.shiftKey&&i.activeItem&&i.activeItemIndex!==r&&i.activeItem.selectViaInteraction()}else e.preventDefault(),i.activeItem.selectViaInteraction()},r.prototype.initializeSelection=function(){var e=this;Promise.resolve().then(function(){e.setSelectionByValue(e.ngControl?e.ngControl.value:e._value)})},r.prototype.setSelectionByValue=function(e){var t=this;if(this.previousSelectionModelSelected=this.selectionModel.selected,this.multiple&&e){if(!Array.isArray(e))throw A();this.selectionModel.clear(),e.forEach(function(e){return t.selectValue(e)}),this.sortValues()}else{this.selectionModel.clear();var n=this.selectValue(e);n&&this.keyManager.setActiveItem(n)}this._changeDetectorRef.markForCheck()},r.prototype.getCorrespondOption=function(e){var n=this;return this.options.toArray().concat(this.previousSelectionModelSelected).find(function(i){try{return null!=i.value&&n.compareWith(i.value,e)}catch(e){return t.isDevMode()&&console.warn(e),!1}})},r.prototype.selectValue=function(e){var t=this.getCorrespondOption(e);return t&&this.selectionModel.select(t),t},r.prototype.initKeyManager=function(){var e=this;this.keyManager=new p.ActiveDescendantKeyManager(this.options).withTypeAhead(200,this.search?-1:0).withVerticalOrientation().withHorizontalOrientation(this.isRtl()?"rtl":"ltr"),this.keyManager.tabOut.pipe(m.takeUntil(this.destroy)).subscribe(function(){e.focus(),e.close()}),this.keyManager.change.pipe(m.takeUntil(this.destroy)).subscribe(function(){e._panelOpen&&e.panel?e.scrollActiveOptionIntoView():e._panelOpen||e.multiple||!e.keyManager.activeItem||e.keyManager.activeItem.selectViaInteraction()})},r.prototype.resetOptions=function(){var e=this,t=o.merge(this.options.changes,this.destroy);this.optionSelectionChanges.pipe(m.takeUntil(t)).subscribe(function(t){e.onSelect(t.source,t.isUserInput),e.search&&e.search.isSearchChanged&&(Promise.resolve().then(function(){return e.keyManager.updateActiveItem(0)}),e.search.isSearchChanged=!1),t.isUserInput&&!e.multiple&&e._panelOpen&&(e.close(),e.focus())}),o.merge.apply(void 0,this.options.map(function(e){return e.stateChanges})).pipe(m.takeUntil(t)).subscribe(function(){e._changeDetectorRef.markForCheck(),e.stateChanges.next()})},r.prototype.onSelect=function(e,t){var n=this.selectionModel.isSelected(e);null!=e.value||this._multiple?(e.selected?this.selectionModel.select(e):this.selectionModel.deselect(e),t&&this.keyManager.setActiveItem(e),this.multiple&&(this.sortValues(),t&&(this.search?this.search.focus():this.focus()))):(e.deselect(),this.selectionModel.clear(),this.propagateChanges(e.value)),n!==this.selectionModel.isSelected(e)&&this.propagateChanges(),this.stateChanges.next()},r.prototype.sortValues=function(){var e=this;if(this.multiple){var t=this.options.toArray();this.selectionModel.sort(function(n,i){return e.sortComparator?e.sortComparator(n,i,t):t.indexOf(n)-t.indexOf(i)}),this.stateChanges.next()}},r.prototype.propagateChanges=function(e){var t=null;t=this.multiple?this.selected.map(function(e){return e.value}):this.selected?this.selected.value:e,this._value=t,this.valueChange.emit(t),this.onChange(t),this.selectionChange.emit(new Zr(this,t)),this._changeDetectorRef.markForCheck()},r.prototype.highlightCorrectOption=function(){this.keyManager&&(this.empty?this.keyManager.setFirstItemActive():this.keyManager.setActiveItem(this.selectionModel.selected[0]))},r.prototype.scrollActiveOptionIntoView=function(){var e=this.keyManager.activeItemIndex||0,t=S(e,this.options,this.optionGroups);this.optionsContainer.nativeElement.scrollTop=D(e+t,this.getItemHeight(),this.optionsContainer.nativeElement.scrollTop,224)},r.prototype.calculateOverlayOffsetX=function(){var e,t=this.overlayDir.overlayRef.overlayElement.getBoundingClientRect(),n=this._viewportRuler.getViewportSize(),i=this.isRtl(),o=this.selectionModel.selected[0]||this.options.first;e=o&&o.group?2:1,i||(e*=-1);var r=0-(t.left+e-(i?2:0)),a=t.right+e-n.width+(i?0:2);r>0?e+=r+8:a>0&&(e-=a+8),this.overlayDir.offsetX=Math.round(e),this.overlayDir.overlayRef.updatePosition()},r.decorators=[{type:t.Component,args:[{selector:"mc-select",exportAs:"mcSelect",template:'<div cdk-overlay-origin class="mc-select__trigger" (click)="toggle()" [class.mc-select__trigger_multiple]="multiple" #origin="cdkOverlayOrigin" #trigger><div class="mc-select__matcher" [ngSwitch]="empty"><span class="mc-select__placeholder" *ngSwitchCase="true">{{ placeholder || \' \' }}</span> <span *ngSwitchCase="false" [ngSwitch]="!!customTrigger"><div *ngSwitchDefault [ngSwitch]="multiple" class="mc-select__match-container"><span *ngSwitchCase="false" class="mc-select__matcher-text">{{ triggerValue }}</span><div *ngSwitchCase="true" class="mc-select__match-list"><mc-tag *ngFor="let option of triggerValues" [disabled]="disabled" [selectable]="false" [class.mc-error]="errorState">{{ option.viewValue }} <i mc-icon="mc-close-S_16" (click)="onRemoveMatcherItem(option, $event)"></i></mc-tag></div><div class="mc-select__match-hidden-text" [style.display]="hiddenItems > 0 ? \'block\' : \'none\'">{{ hiddenItemsTextFormatter(hiddenItemsText, hiddenItems) }}</div></div><ng-content select="mc-select-trigger" *ngSwitchCase="true"></ng-content></span></div><div class="mc-select__cleaner" *ngIf="canShowCleaner" (click)="clearValue($event)"><ng-content select="mc-cleaner"></ng-content></div><div class="mc-select__arrow-wrapper"><i class="mc-select__arrow" mc-icon="mc-angle-down-L_16" color="second"></i></div></div><ng-template cdk-connected-overlay cdkConnectedOverlayLockPosition cdkConnectedOverlayHasBackdrop cdkConnectedOverlayBackdropClass="cdk-overlay-transparent-backdrop" [cdkConnectedOverlayScrollStrategy]="scrollStrategy" [cdkConnectedOverlayOrigin]="origin" [cdkConnectedOverlayOpen]="panelOpen" [cdkConnectedOverlayPositions]="positions" [cdkConnectedOverlayMinWidth]="triggerRect?.width" [cdkConnectedOverlayOffsetY]="offsetY" (backdropClick)="close()" (attach)="onAttached()" (detach)="close()"><div #panel class="mc-select__panel {{ getPanelTheme() }}" [ngClass]="panelClass" (@transformPanel.done)="panelDoneAnimatingStream.next($event.toState)" [style.transformOrigin]="transformOrigin" [class.mc-select-panel-done-animcing]="panelDoneAnimating" [style.font-size.px]="triggerFontSize" (keydown)="handleKeydown($event)"><div *ngIf="search" class="mc-select__search-container"><ng-content select="[mcSelectSearch]"></ng-content></div><div #optionsContainer class="mc-select__content" [@fadeInContent]="\'showing\'" (@fadeInContent.done)="onFadeInDone()"><div *ngIf="isEmptySearchResult" class="mc-select__no-options-message"><ng-content select="[mc-select-search-empty-result]"></ng-content></div><ng-content select="mc-option,mc-optgroup"></ng-content></div></div></ng-template>',styles:[".mc-divider{display:block;margin:0;border-top-width:1px;border-top-style:solid}.mc-divider.mc-divider-vertical{border-top:0;border-right-width:1px;border-right-style:solid}.mc-divider.mc-divider-inset{margin-left:80px}[dir=rtl] .mc-divider.mc-divider-inset{margin-left:auto;margin-right:80px}.mc-select{box-sizing:border-box;display:inline-block;vertical-align:top;width:100%;outline:0}.mc-select.mc-disabled .mc-select__trigger{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mc-select__no-options-message{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;position:relative;max-width:100%;height:32px;cursor:default;outline:0;padding:0 16px}.mc-select__trigger{display:flex;box-sizing:border-box;position:relative;height:30px;cursor:pointer;padding-right:7px;padding-left:15px}.mc-select__trigger.mc-select__trigger_multiple{padding-left:7px}.mc-select__matcher{display:flex;align-items:center;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mc-select__matcher>span{width:100%}.mc-select__match-list{display:flex;flex-wrap:wrap;overflow:hidden;max-height:28px;margin:0;padding-left:0}.mc-select__match-list .mc-tag{margin-right:4px}.mc-select__match-container{display:flex;flex-direction:row;justify-content:space-between;width:100%}.mc-select__match-container .mc-select__match-hidden-text{flex:0 0 70px;align-self:center;padding:0 8px;text-align:right}.mc-select__match-item{display:flex;border:1px solid transparent;border-radius:3px;padding-left:7px;margin-right:4px;max-width:100%}.mc-select__arrow-wrapper{align-self:center}.mc-form-field-appearance-fill .mc-select__arrow-wrapper,.mc-form-field-appearance-standard .mc-select__arrow-wrapper{transform:translateY(-50%)}.mc-form-field-appearance-outline .mc-select__arrow-wrapper{transform:translateY(-25%)}.mc-select__panel{min-width:100%;overflow:hidden;border-width:1px;border-style:solid;border-bottom-left-radius:3px;border-bottom-right-radius:3px;padding:4px 0}.mc-select__content{max-height:224px;overflow:auto}.mc-select__panel .mc-optgroup-label,.mc-select__panel .mc-option{font-size:inherit;line-height:32px;height:32px}.mc-form-field-type-mc-select:not(.mc-disabled) .mc-form-field-flex{cursor:pointer}.mc-form-field-type-mc-select .mc-form-field-label{width:calc(100% - 18px)}"],inputs:["disabled"],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,host:{"[attr.id]":"id","[tabindex]":"tabIndex",class:"mc-select","[class.mc-disabled]":"disabled","[class.mc-select-invalid]":"errorState","(keydown)":"handleKeydown($event)","(focus)":"onFocus()","(blur)":"onBlur()","(window:resize)":"calculateHiddenItems()"},animations:[st.transformPanel,st.fadeInContent],providers:[{provide:kt,useExisting:r},{provide:Ve,useExisting:r}]}]}],r.ctorParameters=function(){return[{type:c.ViewportRuler},{type:t.ChangeDetectorRef},{type:t.NgZone},{type:t.Renderer2},{type:Oe},{type:t.ElementRef},{type:Array,decorators:[{type:t.Optional},{type:t.Inject,args:[l.NG_VALIDATORS]}]},{type:n.Directionality,decorators:[{type:t.Optional}]},{type:l.NgForm,decorators:[{type:t.Optional}]},{type:l.FormGroupDirective,decorators:[{type:t.Optional}]},{type:Rt,decorators:[{type:t.Optional}]},{type:l.NgControl,decorators:[{type:t.Self},{type:t.Optional}]},{type:l.NgModel,decorators:[{type:t.Optional},{type:t.Self}]},{type:l.FormControlName,decorators:[{type:t.Optional},{type:t.Self}]},{type:String,decorators:[{type:t.Attribute,args:["tabindex"]}]},{type:void 0,decorators:[{type:t.Inject,args:[rt]}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[bt]}]}]},r.propDecorators={trigger:[{type:t.ViewChild,args:["trigger",{static:!1}]}],panel:[{type:t.ViewChild,args:["panel",{static:!1}]}],optionsContainer:[{type:t.ViewChild,args:["optionsContainer",{static:!1}]}],overlayDir:[{type:t.ViewChild,args:[c.CdkConnectedOverlay,{static:!1}]}],tags:[{type:t.ViewChildren,args:[jr]}],customTrigger:[{type:t.ContentChild,args:[na,{static:!1}]}],cleaner:[{type:t.ContentChild,args:["mcSelectCleaner",{static:!0}]}],options:[{type:t.ContentChildren,args:[Fe,{descendants:!0}]}],optionGroups:[{type:t.ContentChildren,args:[Te]}],search:[{type:t.ContentChild,args:[ea,{static:!1}]}],hiddenItemsText:[{type:t.Input}],panelClass:[{type:t.Input}],errorStateMatcher:[{type:t.Input}],sortComparator:[{type:t.Input}],openedChange:[{type:t.Output}],openedStream:[{type:t.Output,args:["opened"]}],closedStream:[{type:t.Output,args:["closed"]}],selectionChange:[{type:t.Output}],valueChange:[{type:t.Output}],placeholder:[{type:t.Input}],required:[{type:t.Input}],multiple:[{type:t.Input}],compareWith:[{type:t.Input}],value:[{type:t.Input}],id:[{type:t.Input}],hiddenItemsTextFormatter:[{type:t.Input}]},r}(Jr),oa=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,c.OverlayModule,Le,wt,qr],exports:[Ft,ia,ea,ta,na,Le,r.CommonModule],declarations:[ia,ea,ta,na],providers:[at]}]}],e}(),ra=0,aa=function(){function e(e,t,n){void 0===n&&(n=!1),this.source=e,this.value=t,this.isUserInput=n}return e}(),sa=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-tree-select-trigger"}]}],e}(),ca=function(){function e(e,t,n,i,o){this.elementRef=e,this.defaultErrorStateMatcher=t,this.parentForm=n,this.parentFormGroup=i,this.ngControl=o}return e}(),la=k(w(I(ca))),pa=function(e){function r(n,i,r,a,s,c,l,p,d,u,h,g,f,y,b,v,C){var _=e.call(this,n,c,g,f,b)||this;return _.changeDetectorRef=i,_.viewportRuler=r,_.ngZone=a,_.renderer=s,_.scrollStrategyFactory=p,_.rawValidators=d,_.mcValidation=u,_.dir=h,_.parentFormField=y,_.ngModel=v,_.formControlName=C,_.controlType="mc-select",_.hiddenItems=0,_.triggerFontSize=0,_.transformOrigin="top",_.panelDoneAnimating=!1,_.panelDoneAnimatingStream=new o.Subject,_.scrollStrategy=_.scrollStrategyFactory(),_.offsetY=0,_.positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"}],_.hiddenItemsText="...ещё",_.openedChange=new t.EventEmitter,_.openedStream=_.openedChange.pipe(m.filter(function(e){return e}),m.map(function(){})),_.closedStream=_.openedChange.pipe(m.filter(function(e){return!e}),m.map(function(){})),_.selectionChange=new t.EventEmitter,_.valueChange=new t.EventEmitter,_.optionSelectionChanges=o.defer(function(){return _.options?o.merge.apply(void 0,_.options.map(function(e){return e.onSelectionChange})):_.ngZone.onStable.asObservable().pipe(m.take(1),m.switchMap(function(){return _.optionSelectionChanges}))}),_._required=!1,_._multiple=!1,_._autoSelect=!0,_._value=null,_._focused=!1,_._panelOpen=!1,_.scrollTop=0,_.uid="mc-select-"+ra++,_.destroy=new o.Subject,_.onChange=function(){},_.onTouched=function(){},_._compareWith=function(e,t){return e===t},_.ngControl&&(_.ngControl.valueAccessor=_),_.tabIndex=parseInt(l)||0,_.id=_.id,_}return v(r,e),Object.defineProperty(r.prototype,"placeholder",{get:function(){return this._placeholder},set:function(e){this._placeholder=e,this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"required",{get:function(){return this._required},set:function(e){this._required=i.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"multiple",{get:function(){return this._multiple},set:function(e){if(this.selectionModel)throw T();this._multiple=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"autoSelect",{get:function(){return!this.multiple&&this._autoSelect},set:function(e){this._autoSelect=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"compareWith",{get:function(){return this._compareWith},set:function(e){if("function"!=typeof e)throw R();this._compareWith=e,this.selectionModel&&this.initializeSelection()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"value",{get:function(){return this.multiple?this.tree.getSelectedValues():this.tree.getSelectedValues()[0]},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"id",{get:function(){return this._id},set:function(e){this._id=e||this.uid,this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"focused",{get:function(){return this._focused||this._panelOpen},set:function(e){this._focused=e},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"panelOpen",{get:function(){return this._panelOpen},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"canShowCleaner",{get:function(){return this.cleaner&&this.selectionModel.hasValue()},enumerable:!0,configurable:!0}),r.prototype.ngOnInit=function(){var e=this;this.stateChanges.next(),this.panelDoneAnimatingStream.pipe(m.distinctUntilChanged(),m.takeUntil(this.destroy)).subscribe(function(){e.panelOpen?(e.scrollTop=0,e.openedChange.emit(!0)):(e.openedChange.emit(!1),e.panelDoneAnimating=!1,e.overlayDir.offsetX=0,e.changeDetectorRef.markForCheck())})},r.prototype.ngAfterContentInit=function(){var e=this;this.tree&&(this.mcValidation.useValidation&&B(this),this.tree.resetFocusedItemOnBlur=!1,this.selectionModel=this.tree.selectionModel=new g.SelectionModel(this.multiple),this.tree.ngAfterContentInit(),this.initKeyManager(),this.options=this.tree.renderedOptions,this.tree.autoSelect=this.autoSelect,null===this.tree.multipleMode&&(this.tree.multipleMode=this.multiple?Ie.CHECKBOX:null),this.multiple&&(this.tree.noUnselectLast=!1),this.tempValues&&(this.setSelectionByValue(this.tempValues),this.tempValues=null),this.optionSelectionChanges.pipe(m.takeUntil(this.destroy)).subscribe(function(t){!e.multiple&&e.panelOpen&&t.isUserInput&&e.close()}),this.tree.selectionChange.pipe(m.takeUntil(this.destroy)).subscribe(function(t){e.onChange(e.selectedValues),e.selectionChange.emit(new aa(e,t.option))}),this.selectionModel.changed.pipe(m.takeUntil(this.destroy)).subscribe(function(t){t.added.length&&(e.tree.keyManager.setFocusOrigin("program"),e.tree.keyManager.setActiveItem(e.options.find(function(e){return e.data===t.added[0]})))}))},r.prototype.ngAfterViewInit=function(){var e=this;this.tree&&(this.tags.changes.subscribe(function(){setTimeout(function(){return e.calculateHiddenItems()},0)}),setTimeout(function(){return e.calculateHiddenItems()},0))},r.prototype.ngDoCheck=function(){this.ngControl&&this.updateErrorState()},r.prototype.ngOnChanges=function(e){e.disabled&&this.stateChanges.next()},r.prototype.ngOnDestroy=function(){this.destroy.next(),this.destroy.complete(),this.stateChanges.complete()},r.prototype.hiddenItemsTextFormatter=function(e,t){return e+" "+t},r.prototype.clearValue=function(e){e.stopPropagation(),this.selectionModel.clear(),this.tree.keyManager.setActiveItem(-1),this.setSelectionByValue([]),this.onChange(this.selectedValues)},r.prototype.toggle=function(){
18
- this.panelOpen?this.close():this.open()},r.prototype.open=function(){var e=this;!this.disabled&&this.options&&this.options.length&&!this._panelOpen&&(this.triggerRect=this.trigger.nativeElement.getBoundingClientRect(),this.triggerFontSize=parseInt(getComputedStyle(this.trigger.nativeElement)["font-size"]),this._panelOpen=!0,setTimeout(function(){return e.highlightCorrectOption()}),this.changeDetectorRef.markForCheck(),this.ngZone.onStable.asObservable().pipe(m.take(1)).subscribe(function(){e.triggerFontSize&&e.overlayDir.overlayRef&&e.overlayDir.overlayRef.overlayElement&&(e.overlayDir.overlayRef.overlayElement.style.fontSize=e.triggerFontSize+"px")}))},r.prototype.close=function(){var e=this;this._panelOpen&&(this._panelOpen=!1,this.changeDetectorRef.markForCheck(),this.onTouched(),setTimeout(function(){return e.focus()},0))},r.prototype.writeValue=function(e){this.tree?this.setSelectionByValue(e):this.tempValues=e},r.prototype.registerOnChange=function(e){this.onChange=e},r.prototype.registerOnTouched=function(e){this.onTouched=e},r.prototype.setDisabledState=function(e){this.disabled=e,this.changeDetectorRef.markForCheck(),this.stateChanges.next()},Object.defineProperty(r.prototype,"selected",{get:function(){return this.multiple?this.selectionModel.selected:this.selectionModel.selected[0]},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"selectedValues",{get:function(){var e=this,t=this.selectionModel.selected.map(function(t){return e.tree.treeControl.getValue(t)});return this.multiple?t:t[0]},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"triggerValue",{get:function(){return this.empty?"":this.tree.treeControl.getViewValue(this.selected)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"triggerValues",{get:function(){return this.empty?[]:this.selected},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"empty",{get:function(){return!this.selectionModel||this.selectionModel.isEmpty()},enumerable:!0,configurable:!0}),r.prototype.isRtl=function(){return!!this.dir&&"rtl"===this.dir.value},r.prototype.handleKeydown=function(e){this.disabled||(this.panelOpen?this.handleOpenKeydown(e):this.handleClosedKeydown(e))},r.prototype.onFadeInDone=function(){this.panelDoneAnimating=this.panelOpen,this.changeDetectorRef.markForCheck()},r.prototype.onFocus=function(){this.disabled||(this._focused=!0,this.stateChanges.next())},r.prototype.onBlur=function(){this._focused=!1,this.disabled||this.panelOpen||(this.onTouched(),this.changeDetectorRef.markForCheck(),this.stateChanges.next())},r.prototype.onAttached=function(){var e=this;this.overlayDir.positionChange.pipe(m.take(1)).subscribe(function(){e.changeDetectorRef.detectChanges(),e.calculateOverlayOffsetX(),e.panel.nativeElement.scrollTop=e.scrollTop,e.tree.updateScrollSize()})},r.prototype.getPanelTheme=function(){return this.parentFormField?"mc-"+this.parentFormField.color:""},r.prototype.focus=function(){this.elementRef.nativeElement.focus()},r.prototype.onContainerClick=function(){this.focus()},r.prototype.onRemoveSelectedOption=function(e,t){t.stopPropagation(),this.disabled||(this.selectionModel.deselect(e),this.onChange(this.selectedValues))},r.prototype.calculateHiddenItems=function(){var e=this;if(!this.customTrigger&&!this.empty&&this.multiple){var t=0,n=this.getTotalItemsWidthInMatcher(),i=0;if(this.tags.forEach(function(n){n.nativeElement.offsetTop<n.nativeElement.offsetHeight&&(i+=e.getItemWidth(n.nativeElement),t++)}),this.hiddenItems=this.selectionModel.selected.length-t,this.hiddenItems){var o=this.trigger.nativeElement.querySelector(".mc-tree-select__match-hidden-text"),r=this.trigger.nativeElement.querySelector(".mc-tree-select__match-list"),a=o.offsetTop<o.offsetHeight,s=r.getBoundingClientRect().width,c=s+86;if(a&&n<c&&(this.hiddenItems=0),i===s||i+86<s)return void this.changeDetectorRef.markForCheck();!a&&n+86>c&&this.hiddenItems++}this.changeDetectorRef.markForCheck()}},r.prototype.getTotalItemsWidthInMatcher=function(){var e=this,t=this.trigger.nativeElement.cloneNode(!0);t.querySelector(".mc-tree-select__match-hidden-text").remove(),this.renderer.setStyle(t,"position","absolute"),this.renderer.setStyle(t,"visibility","hidden"),this.renderer.setStyle(t,"top","-100%"),this.renderer.setStyle(t,"left","0"),this.renderer.appendChild(this.trigger.nativeElement,t);var n=0;return t.querySelectorAll("mc-tag").forEach(function(t){n+=e.getItemWidth(t)}),t.remove(),n},r.prototype.getItemWidth=function(e){var t=window.getComputedStyle(e);return parseInt(t.width)+parseInt(t.marginLeft)+parseInt(t.marginRight)},r.prototype.handleClosedKeydown=function(e){var t=e.keyCode,n=t===a.DOWN_ARROW||t===a.UP_ARROW||t===a.LEFT_ARROW||t===a.RIGHT_ARROW;t===a.ENTER||t===a.SPACE||(this.multiple||e.altKey)&&n?(e.preventDefault(),this.open()):!this.multiple&&this.tree.keyManager&&this.tree.keyManager.onKeydown&&this.tree.keyManager.onKeydown(e)},r.prototype.handleOpenKeydown=function(e){var t=e.keyCode,n=t===a.DOWN_ARROW||t===a.UP_ARROW;if(n&&e.altKey)e.preventDefault(),this.close();else{if(t===a.LEFT_ARROW||t===a.RIGHT_ARROW)return this.originalOnKeyDown.call(this.tree,e);if(t===a.HOME)e.preventDefault(),this.tree.keyManager.setFirstItemActive();else if(t===a.END)e.preventDefault(),this.tree.keyManager.setLastItemActive();else if(t===a.PAGE_UP)e.preventDefault(),this.tree.keyManager.setPreviousPageItemActive();else if(t===a.PAGE_DOWN)e.preventDefault(),this.tree.keyManager.setNextPageItemActive();else if(t!==a.ENTER&&t!==a.SPACE||!this.tree.keyManager.activeItem)if(this.multiple&&t===a.A&&e.ctrlKey){e.preventDefault();var i=this.options.some(function(e){return!e.selected});this.options.forEach(function(e){i&&!e.disabled?e.select():e.deselect()})}else{var o=this.tree.keyManager.activeItemIndex;this.tree.keyManager.setFocusOrigin("keyboard"),this.tree.keyManager.onKeydown(e),this.multiple&&n&&e.shiftKey&&this.tree.keyManager.activeItem&&this.tree.keyManager.activeItemIndex!==o&&this.tree.keyManager.activeItem.selectViaInteraction(e),this.autoSelect&&this.tree.keyManager.activeItem&&this.tree.setSelectedOptionsByKey(this.tree.keyManager.activeItem,a.hasModifierKey(e,"shiftKey"),a.hasModifierKey(e,"ctrlKey"))}else e.preventDefault(),this.autoSelect?this.close():this.selectionModel.toggle(this.tree.keyManager.activeItem.data)}},r.prototype.initializeSelection=function(){var e=this;Promise.resolve().then(function(){e.setSelectionByValue(e.ngControl?e.ngControl.value:e._value)})},r.prototype.setSelectionByValue=function(e){if(this.multiple&&e){if(!Array.isArray(e))throw A();this.tree.setOptionsFromValues(e),this.sortValues()}else this.tree.setOptionsFromValues([e]);this.changeDetectorRef.detectChanges()},r.prototype.initKeyManager=function(){var e=this;this.originalOnKeyDown=this.tree.onKeyDown,this.tree.onKeyDown=function(){},this.tree.keyManager.tabOut.pipe(m.takeUntil(this.destroy)).subscribe(function(){e.focus(),e.close()}),this.tree.keyManager.change.pipe(m.takeUntil(this.destroy)).subscribe(function(){e._panelOpen&&e.panel?e.scrollActiveOptionIntoView():e._panelOpen||e.multiple||!e.tree.keyManager.activeItem||e.tree.keyManager.activeItem.selectViaInteraction()})},r.prototype.sortValues=function(){var e=this;if(this.multiple){var t=this.options.toArray();this.selectionModel.sort(function(n,i){return e.sortComparator?e.sortComparator(n,i,t):t.indexOf(n)-t.indexOf(i)}),this.stateChanges.next()}},r.prototype.highlightCorrectOption=function(){if(!this.empty&&this.tree.keyManager){var e=this.multiple?this.selectedValues[0]:this.selectedValues,t=this.options.find(function(t){return t.value===e});t&&this.tree.keyManager.setActiveItem(t)}},r.prototype.scrollActiveOptionIntoView=function(){var e=this.tree.keyManager.activeItemIndex||0;this.panel.nativeElement.scrollTop=D(e,this.tree.getItemHeight(),this.panel.nativeElement.scrollTop,224)},r.prototype.calculateOverlayOffsetX=function(){var e=this.overlayDir.overlayRef.overlayElement.getBoundingClientRect(),t=this.viewportRuler.getViewportSize(),n=this.isRtl(),i=1;n||(i*=-1);var o=0-(e.left+i-(n?2:0)),r=e.right+i-t.width+(n?0:2);o>0?i+=o+8:r>0&&(i-=r+8),this.overlayDir.offsetX=Math.round(i),this.overlayDir.overlayRef.updatePosition()},r.decorators=[{type:t.Component,args:[{selector:"mc-tree-select",exportAs:"mcTreeSelect",template:'<div cdk-overlay-origin class="mc-tree-select__trigger" [class.mc-tree-select__trigger_multiple]="multiple" #origin="cdkOverlayOrigin" #trigger><div class="mc-tree-select__matcher" [ngSwitch]="empty"><span class="mc-tree-select__placeholder" *ngSwitchCase="true">{{ placeholder || \' \' }}</span> <span *ngSwitchCase="false" [ngSwitch]="!!customTrigger"><div *ngSwitchDefault [ngSwitch]="multiple" class="mc-tree-select__match-container"><span *ngSwitchCase="false" class="mc-tree-select__matcher-text">{{ triggerValue }}</span><div *ngSwitchCase="true" class="mc-tree-select__multiple-matcher"><div class="mc-tree-select__match-list"><mc-tag *ngFor="let option of triggerValues" [selectable]="false" [disabled]="disabled" [class.mc-error]="errorState">{{ tree.treeControl.getViewValue(option) }} <i mc-icon="mc-close-S_16" (click)="onRemoveSelectedOption(option, $event)"></i></mc-tag></div><div class="mc-tree-select__match-hidden-text" [style.display]="hiddenItems > 0 ? \'block\' : \'none\'" #hiddenItemsCounter>{{ hiddenItemsTextFormatter(hiddenItemsText, hiddenItems) }}</div></div></div><ng-content select="mc-tree-select-trigger" *ngSwitchCase="true"></ng-content></span></div><div class="mc-select__cleaner" *ngIf="canShowCleaner" (click)="clearValue($event)"><ng-content select="mc-cleaner"></ng-content></div><div class="mc-tree-select__arrow-wrapper"><i class="mc-tree-select__arrow" mc-icon="mc-angle-down-L_16" color="second"></i></div></div><ng-template cdk-connected-overlay cdkConnectedOverlayLockPosition cdkConnectedOverlayHasBackdrop cdkConnectedOverlayBackdropClass="cdk-overlay-transparent-backdrop" [cdkConnectedOverlayScrollStrategy]="scrollStrategy" [cdkConnectedOverlayOrigin]="origin" [cdkConnectedOverlayOpen]="panelOpen" [cdkConnectedOverlayPositions]="positions" [cdkConnectedOverlayMinWidth]="triggerRect?.width" [cdkConnectedOverlayOffsetY]="offsetY" (backdropClick)="close()" (attach)="onAttached()" (detach)="close()"><div #panel class="mc-tree-select__panel {{ getPanelTheme() }}" [ngClass]="panelClass" (@transformPanel.done)="panelDoneAnimatingStream.next($event.toState)" [style.transformOrigin]="transformOrigin" [class.mc-select-panel-done-animcing]="panelDoneAnimating" [style.font-size.px]="triggerFontSize" (keydown)="handleKeydown($event)"><div #optionsContainer class="mc-tree-select__content" [@fadeInContent]="\'showing\'" (@fadeInContent.done)="onFadeInDone()"><ng-content select="mc-tree-selection"></ng-content></div></div></ng-template>',styles:[".mc-divider{display:block;margin:0;border-top-width:1px;border-top-style:solid}.mc-divider.mc-divider-vertical{border-top:0;border-right-width:1px;border-right-style:solid}.mc-divider.mc-divider-inset{margin-left:80px}[dir=rtl] .mc-divider.mc-divider-inset{margin-left:auto;margin-right:80px}.mc-tree-selection{display:block}.mc-tree-option{display:flex;align-items:center;height:28px;word-wrap:break-word;border:2px solid transparent}.mc-tree-option>.mc-icon{margin-right:4px;cursor:pointer}.mc-tree-option:focus{outline:0}.mc-tree-option:not([disabled]){cursor:pointer}.mc-tree-option .mc-pseudo-checkbox{margin-right:8px}.mc-tree-node-toggle{margin-right:4px}.mc-tree-node-toggle .mc-icon{transform:rotate(-90deg)}.mc-tree-node-toggle.mc-opened .mc-icon{transform:rotate(0)}.mc-tree-node-toggle.mc-disabled{cursor:default}.mc-tree-select{box-sizing:border-box;display:inline-block;vertical-align:top;width:100%;outline:0}.mc-tree-select.mc-disabled .mc-tree-select__trigger{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mc-tree-select__trigger{display:flex;box-sizing:border-box;position:relative;height:30px;cursor:pointer;padding-right:7px;padding-left:15px}.mc-tree-select__trigger.mc-tree-select__trigger_multiple{padding-left:7px}.mc-tree-select__trigger.mc-tree-select__trigger_multiple .mc-tree-select__placeholder{margin-left:8px}.mc-tree-select__matcher{display:flex;align-items:center;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mc-tree-select__matcher>span{width:100%}.mc-tree-select__multiple-matcher{display:flex;width:100%}.mc-tree-select__match-list{display:flex;flex-wrap:wrap;overflow:hidden;max-height:28px;margin:0;padding-left:0}.mc-tree-select__match-list .mc-tag{margin-right:4px}.mc-tree-select__match-container{display:flex;flex-direction:row;justify-content:space-between;width:100%}.mc-tree-select__match-container .mc-tree-select__match-hidden-text{flex:0 0 70px;align-self:center;padding:0 8px;text-align:right}.mc-tree-select__match-item{display:flex;border:1px solid transparent;border-radius:3px;padding-left:7px;margin-right:4px;max-width:100%}.mc-tree-select__arrow-wrapper{align-self:center}.mc-form-field-appearance-fill .mc-tree-select__arrow-wrapper,.mc-form-field-appearance-standard .mc-tree-select__arrow-wrapper{transform:translateY(-50%)}.mc-form-field-appearance-outline .mc-tree-select__arrow-wrapper{transform:translateY(-25%)}.mc-tree-select__panel{max-height:224px;min-width:100%;overflow:auto;border-width:1px;border-style:solid;border-bottom-left-radius:3px;border-bottom-right-radius:3px;padding:4px 0}.mc-tree-select__content{height:100%}.mc-tree-select__content .mc-tree-selection{height:100%}.mc-tree-select__panel .mc-optgroup-label,.mc-tree-select__panel .mc-tree-select-option{font-size:inherit;line-height:32px;height:32px}.mc-form-field-type-mc-select:not(.mc-disabled) .mc-form-field-flex{cursor:pointer}.mc-form-field-type-mc-select .mc-form-field-label{width:calc(100% - 18px)}"],inputs:["disabled"],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,host:{"[attr.id]":"id","[attr.tabindex]":"tabIndex",class:"mc-tree-select","[class.mc-disabled]":"disabled","[class.mc-select-invalid]":"errorState","(click)":"toggle()","(keydown)":"handleKeydown($event)","(focus)":"onFocus()","(blur)":"onBlur()","(window:resize)":"calculateHiddenItems()"},animations:[st.transformPanel,st.fadeInContent],providers:[{provide:kt,useExisting:r},{provide:b.CdkTree,useExisting:r}]}]}],r.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:c.ViewportRuler},{type:t.NgZone},{type:t.Renderer2},{type:Oe},{type:String,decorators:[{type:t.Attribute,args:["tabindex"]}]},{type:void 0,decorators:[{type:t.Inject,args:[rt]}]},{type:Array,decorators:[{type:t.Optional},{type:t.Inject,args:[l.NG_VALIDATORS]}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[bt]}]},{type:n.Directionality,decorators:[{type:t.Optional}]},{type:l.NgForm,decorators:[{type:t.Optional}]},{type:l.FormGroupDirective,decorators:[{type:t.Optional}]},{type:Rt,decorators:[{type:t.Optional}]},{type:l.NgControl,decorators:[{type:t.Optional},{type:t.Self}]},{type:l.NgModel,decorators:[{type:t.Optional},{type:t.Self}]},{type:l.FormControlName,decorators:[{type:t.Optional},{type:t.Self}]}]},r.propDecorators={trigger:[{type:t.ViewChild,args:["trigger",{static:!1}]}],panel:[{type:t.ViewChild,args:["panel",{static:!1}]}],overlayDir:[{type:t.ViewChild,args:[c.CdkConnectedOverlay,{static:!1}]}],hiddenItemsCounter:[{type:t.ViewChild,args:["hiddenItemsCounter",{static:!1}]}],tags:[{type:t.ViewChildren,args:[jr]}],cleaner:[{type:t.ContentChild,args:["mcSelectCleaner",{static:!0}]}],customTrigger:[{type:t.ContentChild,args:[sa,{static:!1}]}],tree:[{type:t.ContentChild,args:[Xo,{static:!1}]}],hiddenItemsText:[{type:t.Input}],openedChange:[{type:t.Output}],openedStream:[{type:t.Output,args:["opened"]}],closedStream:[{type:t.Output,args:["closed"]}],selectionChange:[{type:t.Output}],valueChange:[{type:t.Output}],panelClass:[{type:t.Input}],errorStateMatcher:[{type:t.Input}],sortComparator:[{type:t.Input}],placeholder:[{type:t.Input}],required:[{type:t.Input}],multiple:[{type:t.Input}],autoSelect:[{type:t.Input}],compareWith:[{type:t.Input}],id:[{type:t.Input}],hiddenItemsTextFormatter:[{type:t.Input}]},r}(la),da=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,c.OverlayModule,b.CdkTreeModule,$o,wt,qr,Se],exports:[pa,sa,r.CommonModule],declarations:[pa,sa],providers:[at]}]}],e}(),ua=new t.InjectionToken("MC_TEXTAREA_VALUE_ACCESSOR"),ha=0,ma=function(){function e(e,t,n,i){this.defaultErrorStateMatcher=e,this.parentForm=t,this.parentFormGroup=n,this.ngControl=i}return e}(),ga=I(ma),fa=function(e){function n(t,n,i,r,a,s,c){var l=e.call(this,a,i,r,n)||this;l.elementRef=t,l.ngControl=n,l.ngZone=c,l.canGrow=!0,l.focused=!1,l.stateChanges=new o.Subject,l.controlType="mc-textarea",l.uid="mc-textsrea-"+ha++,l._disabled=!1,l._required=!1,l.lineHeight=0,l.freeRowsHeight=0,l.minHeight=0,l.valueAccessor=s||l.elementRef.nativeElement,l.previousNativeValue=l.value,l.id=l.id;var p=o.fromEvent(t.nativeElement,"input");return l.growSubscription=p.subscribe(l.grow.bind(l)),l}return v(n,e),Object.defineProperty(n.prototype,"disabled",{get:function(){return this.ngControl&&null!==this.ngControl.disabled?this.ngControl.disabled:this._disabled},set:function(e){this._disabled=i.coerceBooleanProperty(e),this.focused&&(this.focused=!1,this.stateChanges.next())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"id",{get:function(){return this._id},set:function(e){this._id=e||this.uid},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"required",{get:function(){return this._required},set:function(e){this._required=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this.valueAccessor.value},set:function(e){e!==this.value&&(this.valueAccessor.value=e,this.stateChanges.next())},enumerable:!0,configurable:!0}),n.prototype.ngOnInit=function(){var e=this;setTimeout(function(){return e.grow()},0),this.lineHeight=parseInt(getComputedStyle(this.elementRef.nativeElement).lineHeight,10);var t=parseInt(getComputedStyle(this.elementRef.nativeElement).paddingTop,10),n=parseInt(getComputedStyle(this.elementRef.nativeElement).paddingBottom,10);this.minHeight=2*this.lineHeight+t+n,this.freeRowsHeight=this.lineHeight},n.prototype.ngOnChanges=function(){this.stateChanges.next()},n.prototype.ngOnDestroy=function(){this.stateChanges.complete(),this.growSubscription.unsubscribe()},n.prototype.ngDoCheck=function(){this.ngControl&&this.updateErrorState(),this.dirtyCheckNativeValue()},n.prototype.grow=function(){var e=this;this.canGrow&&this.ngZone.runOutsideAngular(function(){var t=e.elementRef.nativeElement,n=parseInt(window.getComputedStyle(t).height,10),i=n-t.clientHeight;t.style.minHeight=0;var o=Math.max(e.minHeight,+t.scrollHeight+i+e.freeRowsHeight);t.style.minHeight=o+"px"})},n.prototype.focus=function(){this.elementRef.nativeElement.focus()},n.prototype.focusChanged=function(e){e!==this.focused&&(this.focused=e,this.stateChanges.next())},Object.defineProperty(n.prototype,"empty",{get:function(){return!this.elementRef.nativeElement.value&&!this.isBadInput()},enumerable:!0,configurable:!0}),n.prototype.onContainerClick=function(){this.focus()},n.prototype.dirtyCheckNativeValue=function(){var e=this.value;this.previousNativeValue!==e&&(this.previousNativeValue=e,this.stateChanges.next())},n.prototype.isBadInput=function(){var e=this.elementRef.nativeElement.validity;return e&&e.badInput},n.prototype.getGrowHeight=function(){var e=this.elementRef.nativeElement,t=parseInt(window.getComputedStyle(e).height.toString(),10),n=t-e.clientHeight;return Math.max(this.minHeight,+e.scrollHeight+n)},n.decorators=[{type:t.Directive,args:[{selector:"textarea[mcTextarea]",exportAs:"mcTextarea",host:{class:"mc-textarea","[class.mc-textarea-resizable]":"!canGrow","[attr.id]":"id","[attr.placeholder]":"placeholder","[attr.aria-invalid]":"errorState","[disabled]":"disabled","[required]":"required","(blur)":"focusChanged(false)","(focus)":"focusChanged(true)"},providers:[{provide:kt,useExisting:n}]}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:l.NgControl,decorators:[{type:t.Optional},{type:t.Self}]},{type:l.NgForm,decorators:[{type:t.Optional}]},{type:l.FormGroupDirective,decorators:[{type:t.Optional}]},{type:Oe},{type:void 0,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[ua]}]},{type:t.NgZone}]},n.propDecorators={canGrow:[{type:t.Input}],errorStateMatcher:[{type:t.Input}],disabled:[{type:t.Input}],id:[{type:t.Input}],placeholder:[{type:t.Input}],required:[{type:t.Input}],value:[{type:t.Input}]},n}(ga),ya=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,p.A11yModule,be,l.FormsModule],exports:[fa],declarations:[fa]}]}],e}(),ba={hours:0,minutes:1,seconds:2};ba[ba.hours]="hours",ba[ba.minutes]="minutes",ba[ba.seconds]="seconds";var va={HHmmss:"HH:mm:ss",HHmm:"HH:mm"},Ca=(ir={},ir[va.HHmmss]=" : : ",ir[va.HHmm]=" : ",ir),_a=va.HHmm,xa=new RegExp(/^([0-9]|0[0-9]|1[0-9]|2[0-3]):([0-5][0-9]|[0-9]):([0-5][0-9]|[0-9])?$/),wa=/^([0-9]|0[0-9]|1[0-9]|2[0-3]):([0-5][0-9]|[0-9])?$/,Oa=/^([0-9]|0[0-9]|1[0-9]|2[0-3]):?$/,ka=0,Ia=function(){function e(e,t,n,i){this.defaultErrorStateMatcher=e,this.parentForm=t,this.parentFormGroup=n,this.ngControl=i}return e}(),Sa=I(Ia),Da=function(e){function n(t,n,i,r,a,s,c,l){var p=e.call(this,a,i,r,n)||this;if(p.elementRef=t,p.ngControl=n,p.renderer=c,p.dateAdapter=l,p.stateChanges=new o.Subject,p.focused=!1,p.controlType="mc-timepicker",p._minTime=null,p._maxTime=null,p.uid="mc-timepicker-"+ka++,!p.dateAdapter)throw Error("McTimepicker: No provider found for DateAdapter. You must import one of the existing modules at your application root or provide a custom implementation or use exists ones.");if(p.inputValueAccessor=s||p.elementRef.nativeElement,p.previousNativeValue=p.value,p.onChange=o.noop,p.id=p.id,p.placeholder=Ca[_a],p.ngControl){p.ngControl.valueAccessor=p;var d=p.ngControl.control,u=[function(){return p.minTimeValidator()},function(){return p.maxTimeValidator()}],h=d.validator?[d.validator].concat(u):u;d.setValidators(h),d.updateValueAndValidity()}return p}return v(n,e),Object.defineProperty(n.prototype,"disabled",{get:function(){return this.ngControl&&null!==this.ngControl.disabled?this.ngControl.disabled:this._disabled},set:function(e){this._disabled=i.coerceBooleanProperty(e),this.focused&&(this.focused=!1),this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"id",{get:function(){return this._id},set:function(e){this._id=e||this.uid},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"required",{get:function(){return this._required},set:function(e){this._required=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this.inputValueAccessor.value},set:function(e){e!==this.value&&(this.inputValueAccessor.value=e,this.applyInputChanges())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"timeFormat",{get:function(){return this._timeFormat},set:function(e){var t=this;this._timeFormat=Object.keys(va).map(function(e){return va[e]}).indexOf(e)>-1?e:_a,this.placeholder=Ca[this._timeFormat],setTimeout(function(){return t.applyInputChanges({doTimestringReformat:!0})})},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"minTime",{get:function(){return this._minTime},set:function(e){this._minTime=e,this.ngControl.control.updateValueAndValidity()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"maxTime",{get:function(){return this._maxTime},set:function(e){this._maxTime=e,this.ngControl.control.updateValueAndValidity()},enumerable:!0,configurable:!0}),n.prototype.ngOnDestroy=function(){this.stateChanges.complete()},n.prototype.ngDoCheck=function(){this.ngControl&&this.updateErrorState(),this.dirtyCheckNativeValue()},n.prototype.focus=function(){this.elementRef.nativeElement.focus()},n.prototype.focusChanged=function(e){e!==this.focused&&(this.focused=e,this.onTouched(),this.stateChanges.next())},n.prototype.onBlur=function(){this.applyInputChanges(),this.focusChanged(!1)},n.prototype.onPaste=function(e){e.preventDefault();var t=e.clipboardData.getData("text");void 0!==this.getDateFromTimeString(t)&&(this.elementRef.nativeElement.value=t,this.onInput())},n.prototype.onInput=function(){var e=this.elementRef.nativeElement.selectionStart,t=this.elementRef.nativeElement.selectionEnd,n=!1,i=this.getParsedTimeParts(this.elementRef.nativeElement.value),o=i.hoursOnly,r=i.hoursAndMinutes,a=i.hoursAndMinutesAndSeconds;o&&o[1]&&2===o[1].length?n=!0:r&&1===r[1].length&&r[2]&&2===r[2].length?n=!0:a&&2===a[1].length&&2===a[2].length&&a[3]&&2===a[3].length&&(n=!0),this.applyInputChanges({doTimestringReformat:n}),this.elementRef.nativeElement.selectionStart=e,this.elementRef.nativeElement.selectionEnd=t,n&&null===this.ngControl.errors&&this.createSelectionOfTimeComponentInInput(e+1)},Object.defineProperty(n.prototype,"empty",{get:function(){return!this.elementRef.nativeElement.value&&!this.isBadInput()},enumerable:!0,configurable:!0}),n.prototype.onContainerClick=function(){this.focus()},n.prototype.writeValue=function(e){null!==e&&(this.saveOriginalValue(e),this.renderer.setProperty(this.elementRef.nativeElement,"value",this.getTimeStringFromDate(e,this.timeFormat)),this.applyInputChanges())},n.prototype.onKeyDown=function(e){var t=this.getKeyCode(e);"ArrowUp"!==t&&"ArrowDown"!==t||this.upDownTimeByArrowKeys(e),"ArrowLeft"!==t&&"ArrowRight"!==t||this.switchSelectionBetweenTimeparts(e)},n.prototype.registerOnChange=function(e){this.onChange=e},n.prototype.registerOnTouched=function(e){this.onTouched=e},n.prototype.saveOriginalValue=function(e){this.dateAdapter.isValid(e)&&(this.originalValue=e)},n.prototype.dirtyCheckNativeValue=function(){var e=this.value;this.previousNativeValue!==e&&(this.previousNativeValue=e,this.stateChanges.next())},n.prototype.isBadInput=function(){var e=this.elementRef.nativeElement.validity;return e&&e.badInput},n.prototype.applyInputChanges=function(e){void 0===e&&(e={});var t=e.changedTime,n=e.doTimestringReformat,i=void 0===n||n,o=t||this.getDateFromTimeString(this.elementRef.nativeElement.value);if(this.currentDateTimeInput=o,i&&void 0!==o){var r=this.elementRef.nativeElement.selectionStart,a=this.elementRef.nativeElement.selectionEnd;this.renderer.setProperty(this.elementRef.nativeElement,"value",this.getTimeStringFromDate(o,this.timeFormat)),this.elementRef.nativeElement.selectionStart=r,this.elementRef.nativeElement.selectionEnd=a}this.ngControl.control.updateValueAndValidity();var s=null===this.ngControl.errors&&void 0!==o?o:null;this.onChange(s),this.stateChanges.next()},n.prototype.upDownTimeByArrowKeys=function(e){e.preventDefault();var t=this.currentDateTimeInput;if(void 0!==t){var n=this.elementRef.nativeElement.selectionStart,i=this.getTimeEditMetrics(n).modifiedTimePart,o=this.getKeyCode(e);"ArrowUp"===o&&(t=this.incrementTime(t,i)),"ArrowDown"===o&&(t=this.decrementTime(t,i)),this.applyInputChanges({changedTime:t}),this.createSelectionOfTimeComponentInInput(n)}},n.prototype.switchSelectionBetweenTimeparts=function(e){var t=this.currentDateTimeInput,n=this.getKeyCode(e);if(void 0!==t){var i=this.elementRef.nativeElement.selectionStart;"ArrowLeft"===n?i=this.getCursorPositionOfPrevTimePartStart(i,this.elementRef.nativeElement.value):"ArrowRight"===n&&(i=this.getCursorPositionOfNextTimePartStart(i,this.elementRef.nativeElement.value)),this.createSelectionOfTimeComponentInInput(i)}},n.prototype.getKeyCode=function(e){return e.code||e.key},n.prototype.createSelectionOfTimeComponentInInput=function(e){var t=this;setTimeout(function(){var n=t.getTimeEditMetrics(e);t.elementRef.nativeElement.selectionStart=n.cursorStartPosition,t.elementRef.nativeElement.selectionEnd=n.cursorEndPosition})},n.prototype.incrementTime=function(e,t){void 0===t&&(t=ba.seconds);var n=this.getTimeDigitsFromDate(e),i=n.hours,o=n.minutes,r=n.seconds;switch(t){case ba.hours:i++;break;case ba.minutes:o++;break;case ba.seconds:r++}return r>59&&(r=0),o>59&&(o=0),i>23&&(i=0),this.getDateFromTimeDigits(i,o,r)},n.prototype.decrementTime=function(e,t){void 0===t&&(t=ba.seconds);var n=this.getTimeDigitsFromDate(e),i=n.hours,o=n.minutes,r=n.seconds;switch(t){case ba.hours:i--;break;case ba.minutes:o--;break;case ba.seconds:r--}return r<0&&(r=59),o<0&&(o=59),i<0&&(i=23),this.getDateFromTimeDigits(i,o,r)},n.prototype.getCursorPositionOfPrevTimePartStart=function(e,t){return 0===e?t.length:e-1},n.prototype.getCursorPositionOfNextTimePartStart=function(e,t,n){void 0===n&&(n=":");var i=t.indexOf(n,e);return void 0!==i?i+1:0},n.prototype.getTimeEditMetrics=function(e){var t,n,i,o=this.elementRef.nativeElement.value,r=o.indexOf(":",1),a=-1!==r?o.indexOf(":",r+1):-1;return-1!==a&&e>a?(t=ba.seconds,n=a+1,i=o.length):-1!==r&&e>r?(t=ba.minutes,n=r+1,i=a>-1?a:o.length):(t=ba.hours,n=0,i=-1!==r?r:o.length),{modifiedTimePart:t,cursorStartPosition:n,cursorEndPosition:i}},n.prototype.getTimeStringFromDate=function(e,t){return void 0===t&&(t=_a),void 0===e||null===e?"":this.dateAdapter.format(e,t)},n.prototype.getParsedTimeParts=function(e){var t=this.dateAdapter.parse(e,["h:m a","h:m:s a","H:m","H:m:s"]),n=null!==t?t.format("H:m:s"):"",i=n.match(xa),o=n.match(wa);return{hoursOnly:n.match(Oa),hoursAndMinutes:o,hoursAndMinutesAndSeconds:i}},n.prototype.getDateFromTimeDigits=function(e,t,n){return void 0===n&&(n=0),this.getDateFromTimeString(e+":"+t+":"+n)},n.prototype.getDateFromTimeString=function(e){if(void 0!==e){var t=this.getParsedTimeParts(e),n=t.hoursOnly,i=t.hoursAndMinutes,o=t.hoursAndMinutesAndSeconds;if(0!==e.trim().length&&(null!==n||null!==i||null!==o)){var r=0,a=0,s=0;n?r=Number(n[1]):i?(r=Number(i[1]),a=Number(i[2])):o&&(r=Number(o[1]),a=Number(o[2]),s=Number(o[3]));var c=this.dateAdapter.createDateTime(this.dateAdapter.getYear(this.originalValue),this.dateAdapter.getMonth(this.originalValue),this.dateAdapter.getDate(this.originalValue),r,a,s,0);return this.dateAdapter.isValid(c)?c:void 0}}},n.prototype.getTimeDigitsFromDate=function(e){return{hours:this.dateAdapter.getHours(e),minutes:this.dateAdapter.getMinutes(e),seconds:this.dateAdapter.getSeconds(e)}},n.prototype.minTimeValidator=function(){return this.minTime&&void 0!==this.currentDateTimeInput&&this.isTimeLowerThenMin(this.currentDateTimeInput)?{mcTimepickerLowerThenMintime:{text:this.elementRef.nativeElement.value}}:null},n.prototype.maxTimeValidator=function(){return this.maxTime&&void 0!==this.currentDateTimeInput&&this.isTimeGreaterThenMax(this.currentDateTimeInput)?{mcTimepickerHigherThenMaxtime:{text:this.elementRef.nativeElement.value}}:null},n.prototype.isTimeLowerThenMin=function(e){return void 0!==e&&null!==e&&null!==this.minTime&&this.dateAdapter.compareDateTime(e,this.getDateFromTimeString(this.minTime))<0},n.prototype.isTimeGreaterThenMax=function(e){return void 0!==e&&null!==e&&null!==this.maxTime&&this.dateAdapter.compareDateTime(e,this.getDateFromTimeString(this.maxTime))>=0},n.decorators=[{type:t.Directive,args:[{selector:"input[mcTimepicker]",exportAs:"mcTimepickerInput",host:{class:"mc-timepicker mc-input","[attr.id]":"id","[attr.placeholder]":"placeholder","[disabled]":"disabled","[required]":"required","[attr.time-format]":"timeFormat","[attr.min-time]":"minTime","[attr.max-time]":"maxTime","[attr.value]":"value","[attr.aria-invalid]":"errorState","(blur)":"onBlur()","(focus)":"focusChanged(true)","(input)":"onInput()","(paste)":"onPaste($event)","(keydown)":"onKeyDown($event)"},providers:[{provide:kt,useExisting:t.forwardRef(function(){return n})}]}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:l.NgControl,decorators:[{type:t.Optional},{type:t.Self}]},{type:l.NgForm,decorators:[{type:t.Optional}]},{type:l.FormGroupDirective,decorators:[{
19
- type:t.Optional}]},{type:Oe},{type:void 0,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[_n]}]},{type:t.Renderer2},{type:f.DateAdapter,decorators:[{type:t.Optional}]}]},n.propDecorators={errorStateMatcher:[{type:t.Input}],placeholder:[{type:t.Input}],disabled:[{type:t.Input}],id:[{type:t.Input}],required:[{type:t.Input}],value:[{type:t.Input}],timeFormat:[{type:t.Input,args:["time-format"]}],minTime:[{type:t.Input,args:["min-time"]}],maxTime:[{type:t.Input,args:["max-time"]}]},n}(Sa),Ea=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,p.A11yModule,h.PlatformModule,l.FormsModule],declarations:[Da],exports:[Da]}]}],e}(),Pa={Opened:"opened",Closed:"closed"},Ma={sidebarState:s.trigger("state",[s.state("opened",s.style({minWidth:"{{ openedStateMinWidth }}",width:"{{ openedStateWidth }}",maxWidth:"{{ openedStateMaxWidth }}"}),{params:{openedStateMinWidth:"",openedStateWidth:"",openedStateMaxWidth:""}}),s.state("closed",s.style({minWidth:"{{ closedStateWidth }}",width:"{{ closedStateWidth }}",maxWidth:"{{ closedStateWidth }}"}),{params:{closedStateWidth:""}}),s.transition("opened => closed",[s.animate("0.1s")]),s.transition("closed => opened",[s.animate("0.2s")])])},Ta={Left:"left",Right:"right"},Aa=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"[mc-sidebar-opened]",exportAs:"mcSidebarOpened"}]}],e.propDecorators={minWidth:[{type:t.Input}],width:[{type:t.Input}],maxWidth:[{type:t.Input}]},e}(),Ra=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"[mc-sidebar-closed]",exportAs:"mcSidebarClosed"}]}],e.propDecorators={width:[{type:t.Input}]},e}(),Va=function(){function e(e,n){this.ngZone=e,this.elementRef=n,this._opened=!0,this.params={openedStateWidth:"inherit",openedStateMinWidth:"inherit",openedStateMaxWidth:"inherit",closedStateWidth:"32px"},this.stateChanged=new t.EventEmitter,this.internalState=!0}return Object.defineProperty(e.prototype,"opened",{get:function(){return this._opened},set:function(e){this._opened&&this.saveWidth(),this._opened=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"animationState",{get:function(){return this._opened?Pa.Opened:Pa.Closed},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.position!==Ta.Left&&this.position!==Ta.Right||this.registerKeydownListener()},e.prototype.ngOnDestroy=function(){this.position!==Ta.Left&&this.position!==Ta.Right||this.unRegisterKeydownListener()},e.prototype.toggle=function(){this.opened=!this.opened},e.prototype.onAnimationStart=function(){this._opened&&(this.internalState=this._opened)},e.prototype.onAnimationDone=function(){this.internalState=this._opened,this.stateChanged.emit(this._opened)},e.prototype.ngAfterContentInit=function(){this.params={openedStateWidth:this.openedContent.width||"inherit",openedStateMinWidth:this.openedContent.minWidth||"inherit",openedStateMaxWidth:this.openedContent.maxWidth||"inherit",closedStateWidth:this.closedContent.width||"32px"}},e.prototype.registerKeydownListener=function(){var e=this;this.documentKeydownListener=function(t){a.isControl(t)||a.isInput(t)||(e.position===Ta.Left&&a.isLeftBracket(t)||e.position===Ta.Right&&a.isRightBracket(t))&&e.ngZone.run(function(){return e._opened=!e._opened})},this.ngZone.runOutsideAngular(function(){document.addEventListener("keypress",e.documentKeydownListener,!0)})},e.prototype.unRegisterKeydownListener=function(){document.removeEventListener("keypress",this.documentKeydownListener,!0)},e.prototype.saveWidth=function(){this.params.openedStateWidth=this.elementRef.nativeElement.offsetWidth+"px"},e.decorators=[{type:t.Component,args:[{selector:"mc-sidebar",exportAs:"mcSidebar",template:'<ng-container [ngSwitch]="internalState"><ng-container *ngSwitchCase="true"><ng-content select="[mc-sidebar-opened]"></ng-content></ng-container><ng-container *ngSwitchCase="false"><ng-content select="[mc-sidebar-closed]"></ng-content></ng-container></ng-container>',styles:[".mc-sidebar{display:inline-block;height:100%;overflow:hidden}.mc-sidebar-closed,.mc-sidebar-opened{height:100%}"],host:{class:"mc-sidebar","[@state]":"{\n value: animationState,\n params: params\n }","(@state.start)":"onAnimationStart()","(@state.done)":"onAnimationDone()"},animations:[Ma.sidebarState],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:t.NgZone},{type:t.ElementRef}]},e.propDecorators={opened:[{type:t.Input}],position:[{type:t.Input}],stateChanged:[{type:t.Output}],openedContent:[{type:t.ContentChild,args:[Aa,{static:!1}]}],closedContent:[{type:t.ContentChild,args:[Ra,{static:!1}]}]},e}(),Fa=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule],declarations:[Ra,Aa,Va],exports:[Ra,Aa,Va]}]}],e}(),La=new t.InjectionToken("McSidepanelData"),Na={Right:"right",Left:"left",Top:"top",Bottom:"bottom"},ja=function(){function e(){this.data=null,this.position=Na.Right,this.hasBackdrop=!0,this.requiredBackdrop=!1,this.disableClose=!1,this.overlayPanelClass=""}return e}(),Ba={Void:"void",Visible:"visible",Hidden:"hidden"},za={right:{in:"translateX(100%)",out:"translateX(0%)"},left:{in:"translateX(-100%)",out:"translateX(0%)"},top:{in:"translateY(-100%)",out:"translateY(0%)"},bottom:{in:"translateY(100%)",out:"translateY(0%)"}},Wa={sidepanelState:s.trigger("state",[s.state("hidden",s.style({transform:"{{transformIn}}"}),{params:{transformIn:za[Na.Right].in}}),s.state("visible",s.style({transform:"{{transformOut}}"}),{params:{transformOut:za[Na.Right].out}}),s.transition("visible => void, visible => hidden",s.animate("200ms "+Be.AccelerationCurve)),s.transition("void => visible",s.animate("200ms "+Be.DecelerationCurve))])},Ya=new t.InjectionToken("mc-sidepanel-with-indent"),Ha=new t.InjectionToken("mc-sidepanel-with-shadow"),Ka=function(e){function n(n,i,o,r,a){var s=e.call(this)||this;return s.elementRef=n,s.changeDetectorRef=i,s.sidepanelConfig=o,s.withIndent=r,s.withShadow=a,s.animationState=Ba.Void,s.animationStateChanged=new t.EventEmitter,s}return v(n,e),n.prototype.ngOnDestroy=function(){this.destroyed=!0},n.prototype.attachComponentPortal=function(e){return this.validatePortalAttached(),this.setAnimation(),this.setPanelClass(),this.portalOutlet.attachComponentPortal(e)},n.prototype.attachTemplatePortal=function(e){return this.validatePortalAttached(),this.setAnimation(),this.setPanelClass(),this.portalOutlet.attachTemplatePortal(e)},n.prototype.enter=function(){this.destroyed||(this.animationState=Ba.Visible,this.changeDetectorRef.detectChanges())},n.prototype.exit=function(){this.destroyed||(this.animationState=Ba.Hidden,this.changeDetectorRef.markForCheck())},n.prototype.onAnimation=function(e){this.animationStateChanged.emit(e)},n.prototype.setAnimation=function(){var e=this.sidepanelConfig.position;this.animationTransform={transformIn:za[e].in,transformOut:za[e].out}},n.prototype.setPanelClass=function(){var e=this.elementRef.nativeElement,t=this.sidepanelConfig.position;e.classList.add("mc-sidepanel-container_"+t),this.withShadow&&e.classList.add("mc-sidepanel-container_shadowed")},n.prototype.validatePortalAttached=function(){if(this.portalOutlet.hasAttached())throw Error("Attempting to attach sidepanel content after content is already attached")},n.decorators=[{type:t.Component,args:[{selector:"mc-sidepanel-container",template:'<div class="mc-sidepanel-wrapper"><div class="mc-sidepanel-indent" *ngIf="withIndent"><button mcSidepanelClose></button></div><div class="mc-sidepanel-content"><ng-template cdkPortalOutlet></ng-template></div></div>',styles:[".mc-no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mc-sidepanel-container{outline:0;display:flex;flex:1;position:fixed;min-height:0}.mc-sidepanel-container .flex{min-height:0}.mc-sidepanel-container_left,.mc-sidepanel-container_right{width:33%;min-width:400px;height:100%;top:0}.mc-sidepanel-container_left .mc-sidepanel-indent,.mc-sidepanel-container_right .mc-sidepanel-indent{width:16px;height:100%}.mc-sidepanel-container_right{right:0;transform:translateX(100%)}.mc-sidepanel-container_right .mc-sidepanel-wrapper{flex-direction:row}.mc-sidepanel-container_left{left:0;transform:translateX(-100%)}.mc-sidepanel-container_left .mc-sidepanel-wrapper{flex-direction:row-reverse}.mc-sidepanel-container_bottom,.mc-sidepanel-container_top{flex-direction:column;height:33%;min-height:400px;width:100%;left:0}.mc-sidepanel-container_bottom .mc-sidepanel-indent,.mc-sidepanel-container_top .mc-sidepanel-indent{height:16px;width:100%}.mc-sidepanel-container_top{top:0;transform:translateY(-100%)}.mc-sidepanel-container_top .mc-sidepanel-wrapper{flex-direction:column-reverse}.mc-sidepanel-container_bottom{bottom:0;transform:translateY(100%)}.mc-sidepanel-container_bottom .mc-sidepanel-wrapper{flex-direction:column}.mc-sidepanel-wrapper{display:flex;flex:1;min-height:0;width:100%}.mc-sidepanel-indent{display:flex;flex:0 0 auto}.mc-sidepanel-indent .mc-sidepanel-close{width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;background:0 0;padding:0}.mc-sidepanel-content{display:flex;flex-direction:column;flex:1;min-height:0;width:100%}.mc-sidepanel-header{padding:14px 16px;display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:center;flex:0 0 auto}.mc-sidepanel-header .mc-sidepanel-close{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;background:0 0;padding:0 0 0 8px}.mc-sidepanel-title{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mc-sidepanel-body{overflow-y:auto;display:flex;flex:1;flex-direction:column;min-height:0}.mc-sidepanel-footer{padding:16px;display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:center;flex:0 0 auto}.mc-sidepanel-footer .mc-sidepanel-actions{display:flex;align-items:center;flex-direction:row;flex:1}.mc-sidepanel-footer .mc-sidepanel-actions[align=left]{justify-content:start}.mc-sidepanel-footer .mc-sidepanel-actions[align=right]{justify-content:flex-end}.mc-sidepanel-footer button+button{margin-left:16px}"],changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,animations:[Wa.sidepanelState],host:{class:"mc-sidepanel-container",tabindex:"-1",role:"dialog","aria-modal":"true","[attr.id]":"id","[@state]":"{\n value: animationState,\n params: animationTransform\n }","(@state.start)":"onAnimation($event)","(@state.done)":"onAnimation($event)"}}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:ja},{type:Boolean,decorators:[{type:t.Inject,args:[Ya]}]},{type:Boolean,decorators:[{type:t.Inject,args:[Ha]}]}]},n.propDecorators={portalOutlet:[{type:t.ViewChild,args:[d.CdkPortalOutlet,{static:!0}]}]},n}(d.BasePortalOutlet),Ua=0,Ga=function(){function e(e,t,n){var i=this;this.containerInstance=e,this.overlayRef=t,this.config=n,this.afterClosed$=new o.Subject,this.afterOpened$=new o.Subject,this.id=this.config.id||"mc-sidepanel-"+Ua++,this.containerInstance.id=this.id,e.animationStateChanged.pipe(m.filter(function(e){return"done"===e.phaseName&&e.toState===Ba.Visible}),m.take(1)).subscribe(function(){i.afterOpened$.next(),i.afterOpened$.complete()}),e.animationStateChanged.pipe(m.filter(function(e){return"done"===e.phaseName&&e.toState===Ba.Hidden}),m.take(1)).subscribe(function(){t.dispose(),i.afterClosed$.next(i.result),i.afterClosed$.complete()}),e.sidepanelConfig.disableClose||o.merge(t.backdropClick(),t.keydownEvents().pipe(m.filter(function(e){return e.keyCode===a.ESCAPE}))).subscribe(function(){return i.close()})}return e.prototype.close=function(e){var t=this;this.afterClosed$.closed||(this.containerInstance.animationStateChanged.pipe(m.filter(function(e){return"done"===e.phaseName}),m.take(1)).subscribe(function(){return t.overlayRef.detachBackdrop()}),this.result=e,this.containerInstance.exit())},e.prototype.afterClosed=function(){return this.afterClosed$.asObservable()},e.prototype.afterOpened=function(){return this.afterOpened$.asObservable()},e}(),Xa=new t.InjectionToken("mc-sidepanel-default-options"),qa=function(){function e(e,t,n,i){this.overlay=e,this.injector=t,this.defaultOptions=n,this.parentSidepanelService=i,this.openedSidepanelsAtThisLevel=[]}return Object.defineProperty(e.prototype,"openedSidepanels",{get:function(){return this.parentSidepanelService?this.parentSidepanelService.openedSidepanels:this.openedSidepanelsAtThisLevel},enumerable:!0,configurable:!0}),e.prototype.ngOnDestroy=function(){this.closeSidepanels(this.openedSidepanelsAtThisLevel)},e.prototype.open=function(e,n){var i=this,o=fe({},this.defaultOptions||new ja,n);if(o.id&&this.getSidepanelById(o.id))throw Error('Sidepanel with id "'+o.id+'" exists already. The sidepanel id must be unique.');var r=this.createOverlay(o),a=this.attachContainer(r,o),s=new Ga(a,r,o);if(e instanceof t.TemplateRef)a.attachTemplatePortal(new d.TemplatePortal(e,null,{$implicit:o.data,sidepanelRef:s}));else{var c=this.createInjector(o,s,a),l=new d.ComponentPortal(e,void 0,c),p=a.attachComponentPortal(l);s.instance=p.instance}return this.openedSidepanels.push(s),s.afterClosed().subscribe(function(){return i.removeOpenSidepanel(s)}),a.enter(),s},e.prototype.closeAll=function(){this.closeSidepanels(this.openedSidepanels)},e.prototype.getSidepanelById=function(e){return this.openedSidepanels.find(function(t){return t.id===e})},e.prototype.attachContainer=function(e,t){var n=this.getOpenedSidepanelsWithSamePosition(t),i=new d.PortalInjector(this.injector,new WeakMap([[ja,t],[Ya,n.length>=1],[Ha,n.length<2]])),o=new d.ComponentPortal(Ka,void 0,i);return e.attach(o).instance},e.prototype.createInjector=function(e,t,n){var i=new WeakMap([[Ka,n],[La,e.data],[Ga,t]]);return new d.PortalInjector(this.injector,i)},e.prototype.createOverlay=function(e){var t=new c.OverlayConfig({hasBackdrop:e.hasBackdrop,backdropClass:this.getBackdropClass(e),maxWidth:"100%",panelClass:e.overlayPanelClass,scrollStrategy:this.overlay.scrollStrategies.block(),positionStrategy:this.overlay.position().global()});return this.overlay.create(t)},e.prototype.closeSidepanels=function(e){e.reverse().slice().forEach(function(e){e.close()})},e.prototype.getBackdropClass=function(e){var t=this.openedSidepanels.some(function(e){return e.config.hasBackdrop});return e.requiredBackdrop||!t?"cdk-overlay-dark-backdrop":"cdk-overlay-transparent-backdrop"},e.prototype.getOpenedSidepanelsWithSamePosition=function(e){return this.openedSidepanels.filter(function(t){return t.config.position===e.position})},e.prototype.removeOpenSidepanel=function(e){var t=this.openedSidepanels.indexOf(e);t>-1&&this.openedSidepanels.splice(t,1)},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:c.Overlay},{type:t.Injector},{type:ja,decorators:[{type:t.Optional},{type:t.Inject,args:[Xa]}]},{type:e,decorators:[{type:t.Optional},{type:t.SkipSelf}]}]},e}(),$a=function(){function e(e,t,n){this.sidepanelRef=e,this.elementRef=t,this.sidepanelService=n}return e.prototype.ngOnInit=function(){var e=this;this.sidepanelRef||setTimeout(function(){e.sidepanelRef=de(e.elementRef,e.sidepanelService.openedSidepanels)})},e.prototype.ngOnChanges=function(e){var t=e.mcSidepanelClose||e.sidepanelResult;t&&(this.sidepanelResult=t.currentValue)},e.decorators=[{type:t.Directive,args:[{selector:"button[mc-sidepanel-close], button[mcSidepanelClose]",host:{"(click)":"sidepanelRef.close(sidepanelResult)",class:"mc-sidepanel-close",type:"button"}}]}],e.ctorParameters=function(){return[{type:Ga,decorators:[{type:t.Optional}]},{type:t.ElementRef},{type:qa}]},e.propDecorators={sidepanelResult:[{type:t.Input,args:["mc-sidepanel-close"]}],mcSidepanelClose:[{type:t.Input,args:["mcSidepanelClose"]}]},e}(),Za=function(){function e(){}return e.decorators=[{type:t.Component,args:[{selector:"mc-sidepanel-header",template:'\n <div class="mc-sidepanel-title">\n <ng-content></ng-content>\n </div>\n <button *ngIf="closeable" mc-sidepanel-close>\n <span class="mc-sidepanel-close-x">\n <i mc-icon="mc-close-L_16" class="mc-icon mc-icon_light" color="second"></i>\n </span>\n </button>\n ',host:{class:"mc-sidepanel-header"}}]}],e.propDecorators={closeable:[{type:t.Input}]},e}(),Qa=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-sidepanel-body, [mc-sidepanel-body], mcSidepanelBody",host:{class:"mc-sidepanel-body"}}]}],e}(),Ja=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-sidepanel-footer, [mc-sidepanel-footer], mcSidepanelFooter",host:{class:"mc-sidepanel-footer"}}]}],e}(),es=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-sidepanel-actions, [mc-sidepanel-actions], mcSidepanelActions",host:{class:"mc-sidepanel-actions"}}]}],e}(),ts=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,c.OverlayModule,d.PortalModule,be,wt],providers:[qa],declarations:[Ka,$a,Za,Qa,Ja,es],entryComponents:[Ka],exports:[Ka,$a,Za,Qa,Ja,es]}]}],e}(),ns={Horizontal:"horizontal",Vertical:"vertical"},is=function(){function e(e,t){this.elementRef=e,this.renderer=t,this._direction=ns.Vertical,this._order=0,this._size=6,this.dragged=!1}return Object.defineProperty(e.prototype,"direction",{get:function(){return this._direction},set:function(e){this._direction=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"order",{get:function(){return this._order},set:function(e){this._order=i.coerceNumberProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this._size},set:function(e){this._size=i.coerceNumberProperty(e)},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.setStyle("flex-basis",i.coerceCssPixelValue(this.size)),this.setStyle(this.isVertical()?"height":"width",i.coerceCssPixelValue(this.size)),this.setStyle("order",this.order),this.isVertical()||this.setStyle("height","100%"),this.setStyle("flex-direction",this.isVertical()?"row":"column")},e.prototype.isVertical=function(){return this.direction===ns.Vertical},e.prototype.setStyle=function(e,t){this.renderer.setStyle(this.elementRef.nativeElement,e,t)},e.decorators=[{type:t.Directive,args:[{selector:"mc-gutter",host:{class:"mc-gutter","[class.mc-gutter_vertical]":"isVertical()","[class.mc-gutter_dragged]":"dragged","(mousedown)":"dragged = true"}}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2}]},e.propDecorators={direction:[{type:t.Input}],order:[{type:t.Input}],size:[{type:t.Input}]},e}(),os=function(){function e(e,t,n,i){this.elementRef=e,this.changeDetectorRef=t,this.ngZone=n,this.renderer=i,this.areas=[],this.isDragging=!1,this.areaPositionDivider=2,this.listeners=[],this._hideGutters=!1,this._disabled=!1,this._gutterSize=6}return Object.defineProperty(e.prototype,"hideGutters",{get:function(){return this._hideGutters},set:function(e){this._hideGutters=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"direction",{get:function(){return this._direction},set:function(e){this._direction=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(e){this._disabled=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gutterSize",{get:function(){return this._gutterSize},set:function(e){var t=i.coerceNumberProperty(e);this._gutterSize=t>0?t:this.gutterSize},enumerable:!0,configurable:!0}),e.prototype.addArea=function(e){var t=this.areas.length,n=t*this.areaPositionDivider,i=e.getSize();e.setOrder(n),this.areas.push({area:e,index:t,order:n,initialSize:i})},e.prototype.ngOnInit=function(){this.direction||(this.direction=ns.Horizontal),this.setStyle("flex-direction",this.isVertical()?"column":"row")},e.prototype.onMouseDown=function(e,t,n){var i=this;if(!this.disabled){e.preventDefault();var o=this.areas[t],r=this.areas[n],a={x:e.screenX,y:e.screenY};o.initialSize=o.area.getSize(),r.initialSize=r.area.getSize(),this.areas.forEach(function(e){var t=e.area.getSize();e.area.disableFlex(),e.area.setSize(t)}),this.ngZone.runOutsideAngular(function(){i.listeners.push(i.renderer.listen("document","mouseup",function(){return i.onMouseUp()}))}),this.ngZone.runOutsideAngular(function(){i.listeners.push(i.renderer.listen("document","mousemove",function(e){return i.onMouseMove(e,a,o,r)}))}),this.isDragging=!0}},e.prototype.removeArea=function(e){var t=-1;this.areas.some(function(n,i){return n.area===e&&(t=i,!0)}),-1!==t&&this.areas.splice(t,1)},e.prototype.isVertical=function(){return this.direction===ns.Vertical},e.prototype.updateGutter=function(){var e=this;this.gutters.forEach(function(t){t.dragged&&(t.dragged=!1,e.changeDetectorRef.detectChanges())})},e.prototype.onMouseMove=function(e,t,n,i){if(this.isDragging&&!this.disabled){var o={x:e.screenX,y:e.screenY},r=this.isVertical()?t.y-o.y:t.x-o.x,a=n.initialSize-r,s=i.initialSize+r,c=n.area.getMinSize(),l=i.area.getMinSize();a<=c||s<=l||(a<=0?(n.area.setSize(0),i.area.setSize(i.initialSize+n.initialSize)):s<=0?(n.area.setSize(i.initialSize+n.initialSize),i.area.setSize(0)):(n.area.setSize(a),i.area.setSize(s)))}},e.prototype.onMouseUp=function(){for(;this.listeners.length>0;){var e=this.listeners.pop();e&&e()}this.isDragging=!1,this.updateGutter()},e.prototype.setStyle=function(e,t){this.renderer.setStyle(this.elementRef.nativeElement,e,t)},e.decorators=[{type:t.Component,args:[{selector:"mc-splitter",exportAs:"mcSplitter",host:{class:"mc-splitter"},preserveWhitespaces:!1,styles:[".mc-splitter{display:flex;flex-wrap:nowrap;align-items:stretch;overflow:hidden}.mc-splitter .mc-splitter-area{overflow:hidden}.mc-gutter{display:flex;flex-grow:0;flex-shrink:0;justify-content:center;align-items:center;overflow:hidden}.mc-gutter.mc-gutter_vertical>.mc-icon{transform:rotate(90deg)}"],template:'<ng-content></ng-content><ng-template ngFor let-area [ngForOf]="areas" let-index="index" let-last="last"><mc-gutter *ngIf="last === false" [direction]="direction" [attr.disabled]="disabled || null" [style.display]="hideGutters ? \'none\' : \'flex\'" [size]="gutterSize" [order]="index * 2 + 1" (mousedown)="onMouseDown($event, index, index + 1)"></mc-gutter></ng-template>',encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:t.NgZone},{type:t.Renderer2}]},e.propDecorators={gutters:[{type:t.ViewChildren,args:[is]}],hideGutters:[{type:t.Input}],direction:[{type:t.Input}],disabled:[{type:t.Input}],gutterSize:[{type:t.Input}]},e}(),rs=function(){function e(e,t,n){this.elementRef=e,this.renderer=t,this.splitter=n}return e.prototype.disableFlex=function(){this.renderer.removeStyle(this.elementRef.nativeElement,"flex")},e.prototype.ngOnInit=function(){this.splitter.addArea(this),this.removeStyle("max-width"),this.splitter.direction===ns.Vertical?(this.setStyle("width","100%"),this.removeStyle("height")):(this.setStyle("height","100%"),this.removeStyle("width"))},e.prototype.ngOnDestroy=function(){this.splitter.removeArea(this)},e.prototype.setOrder=function(e){this.setStyle("order",e)},e.prototype.setSize=function(e){if(e){var t=i.coerceNumberProperty(e);this.setStyle(this.getSizeProperty(),i.coerceCssPixelValue(t))}},e.prototype.getSize=function(){return this.elementRef.nativeElement[this.getOffsetSizeProperty()]},e.prototype.getMinSize=function(){var e=getComputedStyle(this.elementRef.nativeElement);return parseFloat(e[this.getMinSizeProperty()])},e.prototype.isVertical=function(){return this.splitter.direction===ns.Vertical},e.prototype.getMinSizeProperty=function(){return this.isVertical()?"min-height":"minWidth"},e.prototype.getOffsetSizeProperty=function(){return this.isVertical()?"offsetHeight":"offsetWidth"},e.prototype.getSizeProperty=function(){return this.isVertical()?"height":"width"},e.prototype.setStyle=function(e,t){this.renderer.setStyle(this.elementRef.nativeElement,e,t)},e.prototype.removeStyle=function(e){this.renderer.removeStyle(this.elementRef.nativeElement,e)},e.decorators=[{type:t.Directive,args:[{selector:"[mc-splitter-area]",host:{class:"mc-splitter-area"}}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2},{type:os}]},e}(),as=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,wt],exports:[is,rs,os],declarations:[is,rs,os]}]}],e}(),ss=0,cs=function(){function e(e){this._elementRef=e}return e}(),ls=k(O(w(cs),ve.Primary)),ps=function(){function e(){}return e}(),ds=function(e){function n(n,i,o,r){var a=e.call(this,n)||this;return a._elementRef=n,a._focusMonitor=i,a._changeDetectorRef=o,a.labelPosition="right",a.ariaLabel="",a.ariaLabelledby=null,a.name=null,a._disabled=!1,a._checked=!1,a.change=new t.EventEmitter,a.uniqueId="mc-toggle-"+ ++ss,a.onTouchedCallback=function(){},a.onChangeCallback=function(e){},a.id=a.uniqueId,a.tabIndex=parseInt(r)||0,a._focusMonitor.monitor(a._elementRef.nativeElement,!0),a}return v(n,e),Object.defineProperty(n.prototype,"inputId",{get:function(){return(this.id||this.uniqueId)+"-input"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"disabled",{get:function(){return this._disabled},set:function(e){e!==this._disabled&&(this._disabled=e,this._changeDetectorRef.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"checked",{get:function(){return this._checked},set:function(e){e!==this._checked&&(this._checked=e,this._changeDetectorRef.markForCheck())},enumerable:!0,configurable:!0}),n.prototype.ngOnDestroy=function(){this._focusMonitor.stopMonitoring(this._elementRef.nativeElement)},n.prototype.focus=function(){this._focusMonitor.focusVia(this.inputElement.nativeElement,"keyboard")},n.prototype.getAriaChecked=function(){return this.checked},n.prototype.onChangeEvent=function(e){e.stopPropagation(),this.updateModelValue(),this.emitChangeEvent()},n.prototype.onLabelTextChange=function(){this._changeDetectorRef.markForCheck()},n.prototype.onInputClick=function(e){e.stopPropagation()},n.prototype.writeValue=function(e){this.checked=!!e},n.prototype.registerOnChange=function(e){this.onChangeCallback=e},n.prototype.registerOnTouched=function(e){this.onTouchedCallback=e},n.prototype.setDisabledState=function(e){this.disabled=e},n.prototype.updateModelValue=function(){this._checked=!this.checked,this.onTouchedCallback()},n.prototype.emitChangeEvent=function(){var e=new ps;e.source=this,e.checked=this.checked,this.onChangeCallback(this.checked),this.change.emit(e)},n.decorators=[{type:t.Component,args:[{selector:"mc-toggle",exportAs:"mcToggle",template:'<label [attr.for]="inputId" class="mc-toggle-layout"><div class="mc-toggle__container" [class.left]="labelPosition === \'left\'"><input #input type="checkbox" role="switch" class="mc-toggle-input cdk-visually-hidden" [id]="inputId" [checked]="checked" [attr.value]="value" [disabled]="disabled" [attr.name]="name" [tabIndex]="tabIndex" [attr.aria-label]="ariaLabel || null" [attr.aria-labelledby]="ariaLabelledby" [attr.aria-checked]="getAriaChecked()" (click)="onInputClick($event)" (change)="onChangeEvent($event)"><div class="mc-toggle-bar-container"><div class="mc-toggle__focus-frame"></div><div class="mc-toggle-bar"><div class="mc-toggle__circle" [@switch]="checked"></div></div></div><div class="mc-toggle__content" [class.left]="labelPosition === \'left\'" [class.right]="labelPosition === \'right\'"><span class="mc-toggle-label" (cdkObserveContent)="onLabelTextChange()"><ng-content></ng-content></span></div></div></label>',styles:[".mc-toggle{display:inline-block}.mc-toggle .mc-toggle-layout{cursor:inherit;align-items:baseline;vertical-align:middle;display:inline-flex;white-space:nowrap}.mc-toggle .mc-toggle-bar{position:relative;border-width:1px;border-style:solid}.mc-toggle .mc-toggle-bar.mc-toggle-label-position-left{order:1}.mc-toggle .mc-toggle-bar-container{position:relative}.mc-toggle__container{display:flex;align-items:center;position:relative}.mc-toggle__container.left{flex-direction:row-reverse}.mc-toggle__content.left{margin-right:8px}.mc-toggle__content.right{margin-left:8px}.mc-toggle__circle{position:absolute;border-width:1px;border-style:solid;border-radius:100%;margin-top:-1px;margin-left:-1px;transform:translateX(-1px)}.mc-toggle__focus-frame{position:absolute;top:0;left:0;z-index:1}.mc-toggle:not(.mc-toggle_small) .mc-toggle-bar{height:16px;width:28px;border-radius:9px}.mc-toggle:not(.mc-toggle_small) .mc-toggle__focus-frame{border-radius:9px;height:16px;width:28px}.mc-toggle:not(.mc-toggle_small) .mc-toggle__circle{height:16px;width:16px}.mc-toggle.mc-toggle_small .mc-toggle-bar{height:14px;width:24px;border-radius:8px}.mc-toggle.mc-toggle_small .mc-toggle__focus-frame{border-radius:8px;height:14px;width:24px}.mc-toggle.mc-toggle_small .mc-toggle__circle{height:14px;width:14px}.mc-toggle:not(.mc-disabled){cursor:pointer}"],providers:[{provide:l.NG_VALUE_ACCESSOR,useExisting:t.forwardRef(function(){return n}),multi:!0}],changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,inputs:["disabled","color","tabIndex"],host:{class:"mc-toggle","[id]":"id","[attr.id]":"id","[class.mc-disabled]":"disabled","[class.mc-toggle_off]":"!checked"},animations:[s.trigger("switch",[s.state("true",s.style({left:"50%"})),s.state("false",s.style({left:"1px"})),s.transition("true <=> false",s.animate("150ms"))])]}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:p.FocusMonitor},{type:t.ChangeDetectorRef},{type:String,decorators:[{type:t.Attribute,args:["tabindex"]}]}]},n.propDecorators={inputElement:[{type:t.ViewChild,args:["input",{static:!1}]}],labelPosition:[{type:t.Input}],ariaLabel:[{type:t.Input,args:["aria-label"]}],ariaLabelledby:[{type:t.Input,args:["aria-labelledby"]}],id:[{type:t.Input}],name:[{type:t.Input}],value:[{type:t.Input}],disabled:[{type:t.Input}],checked:[{type:t.Input}],change:[{type:t.Output}]},n}(ls),us=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,p.A11yModule,be],exports:[ds],declarations:[ds]}]}],e}(),hs=function(){function e(e){this.cdr=e,this.prefix="mc-tooltip_placement",this.positions=We.slice(),this.classMap={},this.mcVisibleChange=new t.EventEmitter,this.mcMouseEnterDelay=400,this.mcMouseLeaveDelay=0,this._mcTrigger="hover",this._mcPlacement="top",this._mcVisible=new o.BehaviorSubject(!1),this.onHideSubject=new o.Subject,this.closeOnInteraction=!1,this.availablePositions=ze,this.$visible=this._mcVisible.asObservable()}return Object.defineProperty(e.prototype,"mcTitle",{get:function(){return this._mcTitle},set:function(e){this.isTitleString=!(e instanceof t.TemplateRef),this.isTitleString&&(this._mcTitle=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcTrigger",{get:function(){return this._mcTrigger},set:function(e){this._mcTrigger=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcPlacement",{get:function(){return this._mcPlacement},set:function(e){e!==this._mcPlacement?(this._mcPlacement=e,this.positions.unshift(ze[this.mcPlacement])):e||(this._mcPlacement="top")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcVisible",{get:function(){return this._mcVisible.value},set:function(e){var t=i.coerceBooleanProperty(e);t&&this._mcVisible.value!==t?this.show():this.hide()},enumerable:!0,configurable:!0}),e.prototype.show=function(){var e=this;this.hideTid&&clearTimeout(this.hideTid),
20
- this.isContentEmpty()||("manual"!==this.mcTrigger&&(this.closeOnInteraction=!0),this.showTid=setTimeout(function(){e._mcVisible.next(!0),e.mcVisibleChange.emit(!0),e.markForCheck()},this.mcMouseEnterDelay))},e.prototype.hide=function(){var e=this;this.showTid&&clearTimeout(this.showTid),this.hideTid=setTimeout(function(){e._mcVisible.next(!1),e.mcVisibleChange.emit(!1),e.onHideSubject.next(),e.markForCheck()},this.mcMouseLeaveDelay)},e.prototype.setClassMap=function(){this.classMap=this.prefix+"-"+this.mcPlacement},e.prototype.isContentEmpty=function(){return!!this.isTitleString&&(""===this.mcTitle||!this.mcTitle)},e.prototype.afterHidden=function(){return this.onHideSubject.asObservable()},e.prototype.markForCheck=function(){this.cdr.markForCheck()},e.prototype.handleBodyInteraction=function(){this.closeOnInteraction&&this.hide()},e.decorators=[{type:t.Component,args:[{selector:"mc-tooltip-component",inputs:["mcMouseEnterDelay","mcMouseLeaveDelay","mcTitle","mcVisible","mcTrigger","mcPlacement"],outputs:["mcVisibleChange"],animations:[je],template:'<div class="mc-tooltip" [ngClass]="classMap" [@fadeAnimation]="\'\'+($visible | async)"><div class="mc-tooltip-content"><div class="mc-tooltip-arrow"></div><div class="mc-tooltip-inner"><ng-container>{{ mcTitle }}</ng-container></div></div></div>',preserveWhitespaces:!1,styles:["@keyframes mc-progress{from{background-position:0 0}to{background-position:29px 0}}.mc-progress{position:relative}.mc-progress:after{content:'';position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;background:linear-gradient(135deg,rgba(0,0,0,.05) 10px,transparent 10px,transparent 20px,rgba(0,0,0,.05) 20px,rgba(0,0,0,.05) 30px,transparent 30px) repeat;background-size:29px 29px;animation:mc-progress 1s linear infinite}.cdk-overlay-container{pointer-events:none;top:0;left:0;height:100%;width:100%;position:fixed;z-index:1000;box-sizing:border-box;margin:0;padding:0}.cdk-overlay-backdrop{top:0;bottom:0;left:0;right:0;-webkit-tap-highlight-color:transparent;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0;position:absolute;pointer-events:auto;z-index:1000;box-sizing:border-box;margin:0;padding:0}.cdk-overlay-pane{box-sizing:border-box;position:absolute;pointer-events:auto;margin:0;padding:0;z-index:1000;max-width:100%;max-height:100%}.cdk-overlay-connected-position-bounding-box{box-sizing:border-box;position:absolute;z-index:1000;display:flex;flex-direction:column;margin:0;padding:0;min-width:1px;min-height:1px}.mc-tooltip{display:block;box-sizing:border-box;visibility:visible;position:relative;margin:0;padding:0;z-index:1060;max-width:240px;list-style:none;white-space:pre-line}.mc-tooltip_placement-top{padding-bottom:9px}.mc-tooltip_placement-right{padding-left:9px}.mc-tooltip_placement-bottom{padding-top:9px}.mc-tooltip_placement-left{padding-right:9px}.mc-tooltip-inner{padding:8px 16px;text-align:left;text-decoration:none;border-radius:3px;min-height:16px;height:fit-content;vertical-align:center}.mc-tooltip-arrow{position:absolute;width:12px;height:12px;transform:rotate(45deg)}.mc-tooltip_placement-top .mc-tooltip-arrow{bottom:4px;left:50%;margin-left:-5px}.mc-tooltip_placement-right .mc-tooltip-arrow{left:4px;top:16px;margin-top:-5px}.mc-tooltip_placement-left .mc-tooltip-arrow{right:4px;top:16px;margin-top:-5px}.mc-tooltip_placement-bottom .mc-tooltip-arrow{top:4px;left:50%;margin-left:-5px}"],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,host:{"(body:click)":"this.handleBodyInteraction()"}}]}],e.ctorParameters=function(){return[{type:t.ChangeDetectorRef}]},e.propDecorators={mcVisibleChange:[{type:t.Output}],mcMouseEnterDelay:[{type:t.Input}],mcMouseLeaveDelay:[{type:t.Input}],mcTitle:[{type:t.Input}],mcTrigger:[{type:t.Input}],mcPlacement:[{type:t.Input}],mcVisible:[{type:t.Input}]},e}(),ms=new t.InjectionToken("mc-tooltip-scroll-strategy"),gs={provide:ms,deps:[c.Overlay],useFactory:ue},fs=function(){function e(e,n,i,r,a,s,c){this.overlay=e,this.elementRef=n,this.ngZone=i,this.scrollDispatcher=r,this.hostView=a,this.scrollStrategy=s,this.direction=c,this.isTooltipOpen=!1,this.isDynamicTooltip=!1,this.parentDisabled=!1,this.mcVisibleChange=new t.EventEmitter,this.$unsubscribe=new o.Subject,this._disabled=!1,this._mcTrigger="hover",this._mcPlacement="top",this.manualListeners=new Map,this.destroyed=new o.Subject,this.availablePositions=ze}return Object.defineProperty(e.prototype,"mcTitle",{get:function(){return this._mcTitle},set:function(e){this._mcTitle=e,this.updateCompValue("mcTitle",e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"setTitle",{set:function(e){this.mcTitle=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(e){this._disabled=i.coerceBooleanProperty(e),this.updateCompValue("mcTooltipDisabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcMouseEnterDelay",{get:function(){return this._mcMouseEnterDelay},set:function(e){this._mcMouseEnterDelay=e,this.updateCompValue("mcMouseEnterDelay",e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcMouseLeaveDelay",{get:function(){return this._mcMouseLeaveDelay},set:function(e){this._mcMouseLeaveDelay=e,this.updateCompValue("mcMouseLeaveDelay",e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcTrigger",{get:function(){return this._mcTrigger},set:function(e){e?(this._mcTrigger=e,this.updateCompValue("mcTrigger",e)):this._mcTrigger="hover"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcPlacement",{get:function(){return this._mcPlacement},set:function(e){e?(this._mcPlacement=e,this.updateCompValue("mcPlacement",e)):this._mcPlacement="top"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcTooltipClass",{get:function(){return this._mcTooltipClass},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mсTooltipClass",{set:function(e){this._mcTooltipClass=e,this.tooltip&&this.tooltip.setClassMap()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcVisible",{get:function(){return this._mcVisible},set:function(e){var t=i.coerceBooleanProperty(e);this._mcVisible!==t&&(this._mcVisible=t,this.updateCompValue("mcVisible",t),t?this.show():this.hide())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this.isTooltipOpen},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isParentDisabled",{get:function(){return this.parentDisabled},enumerable:!0,configurable:!0}),e.prototype.createOverlay=function(){var e=this;if(this.overlayRef)return this.overlayRef;var t=this.overlay.position().flexibleConnectedTo(this.elementRef).withTransformOriginOn(".mc-tooltip").withFlexibleDimensions(!1).withViewportMargin(8).withPositions(We.slice()),n=this.scrollDispatcher.getAncestorScrollContainers(this.elementRef);return t.withScrollableContainers(n),t.positionChanges.pipe(m.takeUntil(this.destroyed)).subscribe(function(t){e.tooltip&&(e.onPositionChange(t),t.scrollableViewProperties.isOverlayClipped&&e.tooltip.mcVisible&&e.ngZone.run(function(){return e.hide()}))}),this.overlayRef=this.overlay.create({direction:this.direction,positionStrategy:t,panelClass:"mc-tooltip-panel",scrollStrategy:this.scrollStrategy()}),this.updatePosition(),this.overlayRef.detachments().pipe(m.takeUntil(this.destroyed)).subscribe(function(){return e.detach()}),this.overlayRef},e.prototype.detach=function(){this.overlayRef&&this.overlayRef.hasAttached()&&this.overlayRef.detach(),this.tooltip=null},e.prototype.onPositionChange=function(e){var t=this,n=this.mcPlacement;Object.keys(this.availablePositions).some(function(i){return e.connectionPair.originX===t.availablePositions[i].originX&&e.connectionPair.originY===t.availablePositions[i].originY&&e.connectionPair.overlayX===t.availablePositions[i].overlayX&&e.connectionPair.overlayY===t.availablePositions[i].overlayY&&(n=i,!0)}),this.updateCompValue("mcPlacement",n),this.tooltip&&(this.tooltip.setClassMap(),this.tooltip.markForCheck()),this.handlePositioningUpdate()},e.prototype.handlePositioningUpdate=function(){if(this.overlayRef||(this.overlayRef=this.createOverlay()),"right"===this.mcPlacement||"left"===this.mcPlacement){var e=(this.overlayRef.overlayElement.clientHeight-this.hostView.element.nativeElement.clientHeight)/2,t=this.overlayRef.overlayElement.style.top||"0px";this.overlayRef.overlayElement.style.top=parseInt(t.split("px")[0],10)+e-1+"px"}},e.prototype.updateCompValue=function(e,t){this.isDynamicTooltip&&t&&this.tooltip&&(this.tooltip[e]=t)},e.prototype.ngOnInit=function(){this.initElementRefListeners()},e.prototype.ngOnDestroy=function(){var e=this;this.overlayRef&&this.overlayRef.dispose(),this.manualListeners.forEach(function(t,n){return e.elementRef.nativeElement.removeEventListener(n,t)}),this.manualListeners.clear(),this.$unsubscribe.next(),this.$unsubscribe.complete()},e.prototype.handleKeydown=function(e){this.isTooltipOpen&&e.keyCode===a.ESCAPE&&this.hide()},e.prototype.handleTouchend=function(){this.hide()},e.prototype.initElementRefListeners=function(){var e=this;"hover"===this.mcTrigger&&this.manualListeners.set("mouseenter",function(){return e.show()}).set("mouseleave",function(){return e.hide()}).forEach(function(t,n){return e.elementRef.nativeElement.addEventListener(n,t)}),"focus"===this.mcTrigger&&this.manualListeners.set("focus",function(){return e.show()}).set("blur",function(){return e.hide()}).forEach(function(t,n){return e.elementRef.nativeElement.addEventListener(n,t)})},e.prototype.show=function(){var e=this;if(!this.disabled){if(!this.tooltip){var t=this.createOverlay();this.detach(),this.portal=this.portal||new d.ComponentPortal(hs,this.hostView),this.tooltip=t.attach(this.portal).instance,this.tooltip.afterHidden().pipe(m.takeUntil(this.destroyed)).subscribe(function(){return e.detach()}),this.isDynamicTooltip=!0;["mcTitle","mcPlacement","mcTrigger","mcTooltipDisabled","mcMouseEnterDelay","mcMouseLeaveDelay","mсTooltipClass"].forEach(function(t){return e.updateCompValue(t,e[t])}),this.tooltip.mcVisibleChange.pipe(m.takeUntil(this.$unsubscribe),m.distinctUntilChanged()).subscribe(function(t){e.mcVisible=t,e.mcVisibleChange.emit(t),e.isTooltipOpen=t})}this.updatePosition(),this.tooltip.show()}},e.prototype.hide=function(){this.tooltip&&this.tooltip.hide()},e.prototype.updatePosition=function(){this.overlayRef||(this.overlayRef=this.createOverlay());var e=this.overlayRef.getConfig().positionStrategy,t=this.getOrigin(),n=this.getOverlayPosition();e.withPositions([fe({},t.main,n.main),fe({},t.fallback,n.fallback)])},e.prototype.getOrigin=function(){var e,t=this.mcPlacement,n=!this.direction||"ltr"===this.direction.value;if("top"===t||"bottom"===t)e={originX:"center",originY:"top"===t?"top":"bottom"};else if("top"===t||"left"===t&&n||"right"===t&&!n)e={originX:"start",originY:"center"};else{if(!("bottom"===t||"right"===t&&n||"left"===t&&!n))throw he(t);e={originX:"end",originY:"center"}}var i=this.invertPosition(e.originX,e.originY);return{main:e,fallback:{originX:i.x,originY:i.y}}},e.prototype.getOverlayPosition=function(){var e,t=this.mcPlacement,n=!this.direction||"ltr"===this.direction.value;if("top"===t)e={overlayX:"center",overlayY:"bottom"};else if("bottom"===t)e={overlayX:"center",overlayY:"top"};else if("top"===t||"left"===t&&n||"right"===t&&!n)e={overlayX:"end",overlayY:"center"};else{if(!("bottom"===t||"right"===t&&n||"left"===t&&!n))throw he(t);e={overlayX:"start",overlayY:"center"}}var i=this.invertPosition(e.overlayX,e.overlayY);return{main:e,fallback:{overlayX:i.x,overlayY:i.y}}},e.prototype.invertPosition=function(e,t){var n=e,i=t;return"top"===this.mcPlacement||"bottom"===this.mcPlacement?"top"===t?i="bottom":"bottom"===t&&(i="top"):"end"===e?n="start":"start"===e&&(n="end"),{x:n,y:i}},e.decorators=[{type:t.Directive,args:[{selector:'[mcTooltip], [attribute^="mcTooltip"]',exportAs:"mcTooltip",host:{"(keydown)":"handleKeydown($event)","(touchend)":"handleTouchend()"}}]}],e.ctorParameters=function(){return[{type:c.Overlay},{type:t.ElementRef},{type:t.NgZone},{type:c.ScrollDispatcher},{type:t.ViewContainerRef},{type:void 0,decorators:[{type:t.Inject,args:[ms]}]},{type:n.Directionality,decorators:[{type:t.Optional}]}]},e.propDecorators={mcVisibleChange:[{type:t.Output}],mcTitle:[{type:t.Input,args:["mcTooltip"]}],setTitle:[{type:t.Input,args:["mcTitle"]}],disabled:[{type:t.Input,args:["mcTooltipDisabled"]}],mcMouseEnterDelay:[{type:t.Input,args:["mcMouseEnterDelay"]}],mcMouseLeaveDelay:[{type:t.Input,args:["mcMouseLeaveDelay"]}],mcTrigger:[{type:t.Input,args:["mcTrigger"]}],mcPlacement:[{type:t.Input,args:["mcPlacement"]}],mcTooltipClass:[{type:t.Input,args:["mcTooltipClass"]}],mcVisible:[{type:t.Input,args:["mcVisible"]}],isOpen:[{type:t.HostBinding,args:["class.mc-tooltip-open"]}],isParentDisabled:[{type:t.HostBinding,args:["class.disabled"]}]},e}(),ys=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{declarations:[hs,fs],exports:[hs,fs],imports:[r.CommonModule,c.OverlayModule],providers:[gs],entryComponents:[hs]}]}],e}(),bs=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-vertical-navbar-item-icon",host:{class:"mc-vertical-navbar__item-icon"}}]}],e}(),vs=function(){function e(){}return e.decorators=[{type:t.Component,args:[{selector:"mc-vertical-navbar-badge",template:'\n <span class="mc-badge mc-badge_light">\n <ng-content></ng-content>\n </span>\n ',host:{class:"mc-vertical-navbar__badge"}}]}],e}(),Cs=function(){function e(e){this._elementRef=e}return e}(),_s=w(Cs),xs=function(e){function n(t,n,i){var o=e.call(this,t)||this;return o.element=t,o.focusMonitor=n,o.trigger=i,o.tabIndex=0,o.focusMonitor.monitor(o.element.nativeElement).subscribe(),o}return v(n,e),Object.defineProperty(n.prototype,"hasDropdownAttached",{get:function(){return!!this.trigger},enumerable:!0,configurable:!0}),n.prototype.ngOnDestroy=function(){this.focusMonitor.stopMonitoring(this.element.nativeElement)},n.decorators=[{type:t.Component,args:[{selector:"a[mc-vertical-navbar-item], mc-vertical-navbar-item",template:'<div class="mc-vertical-navbar__item"><ng-content></ng-content><i *ngIf="hasDropdownAttached" mc-icon="mc-angle-right-M_16" class="mc-vertical-navbar__item-dropdown-icon"></i></div>',encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".mc-vertical-navbar__badge{position:absolute;width:64px;top:0;left:0}.mc-vertical-navbar__badge .mc-badge{position:absolute;right:4px;top:4px}.mc-vertical-navbar__item-icon{margin-right:16px}.mc-vertical-navbar__item-icon .mc-icon{font-size:32px}.mc-vertical-navbar__title{white-space:nowrap}.mc-vertical-navbar__item-dropdown-icon{margin-left:auto;padding-left:16px}a[mc-vertical-navbar-item],mc-vertical-navbar-item{height:64px;margin:1px 0;width:100%;position:relative;display:flex;align-items:center;box-sizing:border-box;cursor:pointer;text-decoration:none}a[mc-vertical-navbar-item] .mc-vertical-navbar__item,mc-vertical-navbar-item .mc-vertical-navbar__item{padding-left:16px;padding-right:16px;display:flex;align-items:center;width:100%;height:100%}a[mc-vertical-navbar-item].mc-progress,mc-vertical-navbar-item.mc-progress{cursor:pointer}a[mc-vertical-navbar-item].mc-vertical-navbar__item_active,mc-vertical-navbar-item.mc-vertical-navbar__item_active{cursor:default}a[mc-vertical-navbar-item][disabled],mc-vertical-navbar-item[disabled]{cursor:default;pointer-events:none}"],inputs:["disabled"],host:{"[attr.disabled]":"disabled || null","[attr.tabindex]":"disabled ? -1 : 0"}}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:p.FocusMonitor},{type:yi,decorators:[{type:t.Optional},{type:t.Self}]}]},n.propDecorators={tabIndex:[{type:t.Input}]},n}(_s),ws=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-vertical-navbar-header, a[mc-vertical-navbar-header]",host:{class:"mc-vertical-navbar__header"}}]}],e}(),Os=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-vertical-navbar-title",host:{class:"mc-vertical-navbar__title"}}]}],e}(),ks=function(){function e(e){this.cd=e,this.expanded=!1}return e.prototype.toggle=function(){this.expanded=!this.expanded,this.cd.markForCheck()},e.decorators=[{type:t.Component,args:[{selector:"mc-vertical-navbar",changeDetection:t.ChangeDetectionStrategy.OnPush,template:'<nav class="mc-vertical-navbar" [@toggle]="expanded"><div class="mc-vertical-navbar__header-area"><div cdkMonitorElementFocus tabindex="0" class="mc-vertical-navbar__toggle-button" (click)="toggle()" (keydown.space)="toggle()" (keydown.enter)="toggle()"><i mc-icon="mc-hamburger_32" *ngIf="!expanded"></i> <i mc-icon="mc-close-L_32" *ngIf="expanded"></i></div><div cdkMonitorSubtreeFocus *ngIf="expanded"><ng-content select="mc-vertical-navbar-header, a[mc-vertical-navbar-header]"></ng-content></div></div><ng-content></ng-content></nav>',styles:[".mc-vertical-navbar{height:100%;position:fixed;left:0;top:0;z-index:100;display:flex;flex-direction:column;align-items:flex-start;min-height:100%;overflow:hidden}.mc-vertical-navbar .mc-vertical-navbar__header-area{display:flex;width:100%;align-items:stretch;box-sizing:border-box;min-height:64px}.mc-vertical-navbar .mc-vertical-navbar__header-area .mc-vertical-navbar__header{display:flex;height:100%;justify-content:stretch;text-decoration:none;align-self:stretch;align-items:center}.mc-vertical-navbar .mc-vertical-navbar__header-area .mc-vertical-navbar__toggle-button{cursor:pointer;display:flex;flex:0 0 auto;justify-content:center;align-items:center;align-self:stretch;width:64px}.mc-vertical-navbar .mc-vertical-navbar__header-area .mc-vertical-navbar__title{padding:0 16px}"],encapsulation:t.ViewEncapsulation.None,animations:[me()]}]}],e.ctorParameters=function(){return[{type:t.ChangeDetectorRef}]},e.propDecorators={expanded:[{type:t.Input}]},e}(),Is=[ks,Os,xs,bs,vs,ws],Ss=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,p.A11yModule,h.PlatformModule,wt],exports:Is,declarations:Is}]}],e}(),Ds=new t.Version("8.5.6");e.ARROW_DOWN_KEYCODE="ArrowDown",e.ARROW_LEFT_KEYCODE="ArrowLeft",e.ARROW_RIGHT_KEYCODE="ArrowRight",e.ARROW_UP_KEYCODE="ArrowUp",e.AUTOCOMPLETE_BORDER_WIDTH=2,e.AUTOCOMPLETE_OPTION_HEIGHT=32,e.AUTOCOMPLETE_PANEL_HEIGHT=256,e.AnimationCurves=Be,e.BIG_STEP=bn,e.BOTTOM_LEFT_POSITION_PRIORITY=tt,e.BOTTOM_POSITION_PRIORITY=Ke,e.BOTTOM_RIGHT_POSITION_PRIORITY=et,e.DEFAULT_4_POSITIONS=We,e.DEFAULT_4_POSITIONS_TO_CSS_MAP=ot,e.DEFAULT_MC_LOCALE_ID="ru",e.DEFAULT_TIME_FORMAT=_a,e.Direction=ns,e.EXTENDED_OVERLAY_POSITIONS=Ye,e.ErrorStateMatcher=Oe,e.HOURS_MINUTES_REGEXP=wa,e.HOURS_MINUTES_SECONDS_REGEXP=xa,e.HOURS_ONLY_REGEXP=Oa,e.HOURS_PER_DAY=23,e.LEFT_BOTTOM_POSITION_PRIORITY=Ze,e.LEFT_POSITION_PRIORITY=Ge,e.LEFT_TOP_POSITION_PRIORITY=$e,e.MAT_AUTOCOMPLETE_VALUE_ACCESSOR=Ht,e.MC_AUTOCOMPLETE_DEFAULT_OPTIONS=jt,e.MC_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY=K,e.MC_AUTOCOMPLETE_SCROLL_STRATEGY=Wt,e.MC_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY=U,e.MC_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER=Yt,e.MC_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR=Jt,e.MC_CHECKBOX_CLICK_ACTION=sn,e.MC_CHECKBOX_CONTROL_VALUE_ACCESSOR=ln,e.MC_CHECKBOX_REQUIRED_VALIDATOR=gn,e.MC_DATEPICKER_SCROLL_STRATEGY=Yn,e.MC_DATEPICKER_SCROLL_STRATEGY_FACTORY=ne,e.MC_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER=Hn,e.MC_DATEPICKER_VALIDATORS=$n,e.MC_DATEPICKER_VALUE_ACCESSOR=qn,e.MC_DROPDOWN_DEFAULT_OPTIONS=ui,e.MC_DROPDOWN_DEFAULT_OPTIONS_FACTORY=ae,e.MC_DROPDOWN_PANEL=ri,e.MC_DROPDOWN_SCROLL_STRATEGY=mi,e.MC_DROPDOWN_SCROLL_STRATEGY_FACTORY=se,e.MC_DROPDOWN_SCROLL_STRATEGY_FACTORY_PROVIDER=gi,e.MC_INPUT_VALUE_ACCESSOR=_n,e.MC_LABEL_GLOBAL_OPTIONS=Ne,e.MC_LOCALE_ID=pt,e.MC_OPTION_PARENT_COMPONENT=Ve,e.MC_POPOVER_SCROLL_STRATEGY=ho,e.MC_POPOVER_SCROLL_STRATEGY_FACTORY_PROVIDER=mo,e.MC_RADIO_GROUP_CONTROL_VALUE_ACCESSOR=Mo,e.MC_SANITY_CHECKS=ye,e.MC_SELECTION_LIST_VALUE_ACCESSOR=Ci,e.MC_SELECTION_TREE_VALUE_ACCESSOR=Ko,e.MC_SELECT_SCROLL_STRATEGY=rt,e.MC_SELECT_SCROLL_STRATEGY_PROVIDER=at,e.MC_SIDEPANEL_DATA=La,e.MC_SIDEPANEL_DEFAULT_OPTIONS=Xa,e.MC_SIDEPANEL_WITH_INDENT=Ya,e.MC_SIDEPANEL_WITH_SHADOW=Ha,e.MC_TABS_CONFIG=_r,e.MC_TAGS_DEFAULT_OPTIONS=Tr,e.MC_TEXTAREA_VALUE_ACCESSOR=ua,e.MC_TOOLTIP_SCROLL_STRATEGY=ms,e.MC_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER=gs,e.MC_TREE_OPTION_PARENT_COMPONENT=zo,e.MC_VALIDATION=bt,e.MINUTES_PER_HOUR=59,e.McAlignTabsCenterCssStyler=fr,e.McAlignTabsEndCssStyler=yr,e.McAnchor=Zt,e.McAutocomplete=Bt,e.McAutocompleteModule=Ut,e.McAutocompleteOrigin=zt,e.McAutocompleteSelectedEvent=Nt,e.McAutocompleteTrigger=Kt,e.McButton=$t,e.McButtonBase=Xt,e.McButtonCssStyler=Gt,e.McButtonMixinBase=qt,e.McButtonModule=Qt,e.McButtonToggle=nn,e.McButtonToggleChange=en,e.McButtonToggleGroup=tn,e.McButtonToggleModule=on,e.McCalendar=Bn,e.McCalendarBody=Vn,e.McCalendarCell=Rn,e.McCalendarHeader=jn,e.McCard=rn,e.McCardModule=an,e.McCheckbox=mn,e.McCheckboxBase=un,e.McCheckboxChange=dn,e.McCheckboxMixinBase=hn,e.McCheckboxModule=yn,e.McCheckboxRequiredValidator=fn,e.McCleaner=Ot,e.McCommonModule=be,e.McDatepicker=Xn,e.McDatepickerContent=Gn,e.McDatepickerContentBase=Kn,e.McDatepickerContentMixinBase=Un,e.McDatepickerInput=Qn,e.McDatepickerInputEvent=Zn,e.McDatepickerIntl=An,e.McDatepickerModule=ti,e.McDatepickerToggle=ei,e.McDatepickerToggleIcon=Jn,e.McDecimalPipe=ft,e.McDivider=ni,e.McDividerModule=ii,e.McDropdown=hi,e.McDropdownContent=oi,e.McDropdownItem=ci,e.McDropdownItemBase=ai,e.McDropdownItemMixinBase=si,e.McDropdownModule=bi,e.McDropdownTrigger=yi,e.McFormField=Rt,e.McFormFieldBase=Tt,e.McFormFieldControl=kt,e.McFormFieldMixinBase=At,e.McFormFieldModule=Ft,e.McFormFieldWithoutBorders=Vt,e.McFormattersModule=yt,e.McGutterDirective=is,e.McHighlightModule=lt,e.McHighlightPipe=ct,e.McHint=St,e.McIcon=xt,e.McIconBase=Ct,e.McIconCSSStyler=vt,e.McIconMixinBase=_t,e.McIconModule=wt,e.McInput=In,e.McInputBase=On,e.McInputMixinBase=kn,e.McInputModule=Tn,e.McInputMono=Sn,e.McLightTabsCssStyler=gr,e.McLine=Ce,e.McLineModule=xe,e.McLineSetter=_e,e.McLink=Ai,e.McLinkBase=Mi,e.McLinkMixinBase=Ti,e.McLinkModule=Ri,e.McList=Ii,e.McListBase=ki,e.McListItem=Ei,e.McListItemBase=Di,e.McListModule=Pi,e.McListOption=vi,e.McListSelection=Oi,e.McListSelectionBase=xi,e.McListSelectionChange=_i,e.McListSelectionMixinBase=wi,e.McListSubheaderCssStyler=Si,e.McMeasureScrollbarService=De,e.McModalComponent=ji,e.McModalModule=Ui,e.McModalRef=Fi,e.McModalService=Ki,e.McMonthView=Fn,e.McMultiYearView=Ln,e.McNavbar=ao,e.McNavbarBrand=Qi,e.McNavbarContainer=io,e.McNavbarItem=no,e.McNavbarItemBase=eo,e.McNavbarLogo=Zi,e.McNavbarMixinBase=to,e.McNavbarModule=so,e.McNavbarTitle=Ji,e.McNumberInput=Cn,e.McOptgroup=Te,e.McOptgroupBase=Ee,e.McOptgroupMixinBase=Pe,e.McOption=Fe,e.McOptionModule=Le,e.McOptionSelectionChange=Re,e.McPopover=go,e.McPopoverComponent=uo,e.McPopoverModule=fo,e.McPrefix=Dt,e.McProgressBar=Co,e.McProgressBarBase=bo,e.McProgressBarMixinBase=vo,e.McProgressBarModule=_o,e.McProgressSpinner=ko,e.McProgressSpinnerBase=wo,e.McProgressSpinnerMixinBase=Oo,e.McProgressSpinnerModule=Io,e.McPseudoCheckbox=ke,e.McPseudoCheckboxModule=Se,e.McRadioButton=Vo;e.McRadioButtonBase=Ao,e.McRadioButtonMixinBase=Ro,e.McRadioChange=Do,e.McRadioGroup=To,e.McRadioGroupBase=Eo,e.McRadioGroupMixinBase=Po,e.McRadioModule=Fo,e.McSelect=ia,e.McSelectBase=Qr,e.McSelectChange=Zr,e.McSelectModule=oa,e.McSelectSearch=ea,e.McSelectSearchEmptyResult=ta,e.McSelectTrigger=na,e.McSidebar=Va,e.McSidebarClosed=Ra,e.McSidebarModule=Fa,e.McSidebarOpened=Aa,e.McSidepanelConfig=ja,e.McSidepanelContainerComponent=Ka,e.McSidepanelModule=ts,e.McSidepanelPosition=Na,e.McSidepanelRef=Ga,e.McSidepanelService=qa,e.McSplitterAreaDirective=rs,e.McSplitterComponent=os,e.McSplitterModule=as,e.McStepper=Et,e.McStretchTabsCssStyler=br,e.McSuffix=Pt,e.McTab=ar,e.McTabBody=cr,e.McTabBodyPortal=lr,e.McTabChangeEvent=Cr,e.McTabContent=tr,e.McTabGroup=Or,e.McTabGroupBase=xr,e.McTabGroupMixinBase=wr,e.McTabHeader=mr,e.McTabLabel=nr,e.McTabLabelWrapper=ur,e.McTabLink=Pr,e.McTabNav=Sr,e.McTabsModule=Mr,e.McTag=jr,e.McTagAvatar=Vr,e.McTagBase=Lr,e.McTagInput=Gr,e.McTagList=Kr,e.McTagListBase=zr,e.McTagListChange=Hr,e.McTagListMixinBase=Wr,e.McTagMixinBase=Nr,e.McTagRemove=Br,e.McTagSelectionChange=Ar,e.McTagTrailingIcon=Fr,e.McTagsModule=qr,e.McTextarea=fa,e.McTextareaBase=ma,e.McTextareaMixinBase=ga,e.McTextareaModule=ya,e.McTimepicker=Da,e.McTimepickerBase=Ia,e.McTimepickerMixinBase=Sa,e.McTimepickerModule=Ea,e.McToggleBase=cs,e.McToggleChange=ps,e.McToggleComponent=ds,e.McToggleMixinBase=ls,e.McToggleModule=us,e.McToolTipModule=ys,e.McTooltip=fs,e.McTooltipComponent=hs,e.McTreeFlatDataSource=Jo,e.McTreeFlattener=Zo,e.McTreeModule=$o,e.McTreeNavigationChange=Uo,e.McTreeNestedDataSource=er,e.McTreeNodeDef=Lo,e.McTreeNodePadding=No,e.McTreeNodeToggleComponent=jo,e.McTreeNodeToggleDirective=Bo,e.McTreeOption=Ho,e.McTreeOptionChange=Wo,e.McTreeSelect=pa,e.McTreeSelectChange=aa,e.McTreeSelectModule=da,e.McTreeSelectTrigger=sa,e.McTreeSelection=Xo,e.McTreeSelectionChange=Go,e.McVerticalNavbar=ks,e.McVerticalNavbarHeader=ws,e.McVerticalNavbarItem=xs,e.McVerticalNavbarItemBadge=vs,e.McVerticalNavbarItemIcon=bs,e.McVerticalNavbarMixinBase=_s,e.McVerticalNavbarModule=Ss,e.McVerticalNavbarTitle=Os,e.McYearView=Nn,e.MultipleMode=Ie,e.NESTED_PANEL_TOP_PADDING=2,e.NUMBER_FORMAT_REGEXP=dt,e.POSITION_MAP=ze,e.POSITION_PRIORITY_STRATEGY=nt,e.POSITION_TO_CSS_MAP=it,e.PopoverVisibility=po,e.RIGHT_BOTTOM_POSITION_PRIORITY=qe,e.RIGHT_POSITION_PRIORITY=Ue,e.RIGHT_TOP_POSITION_PRIORITY=Xe,e.SECONDS_PER_MINUTE=59,e.SELECT_PANEL_INDENT_PADDING_X=2,e.SELECT_PANEL_MAX_HEIGHT=224,e.SELECT_PANEL_PADDING_X=1,e.SELECT_PANEL_VIEWPORT_PADDING=8,e.SMALL_STEP=vn,e.ShowOnDirtyErrorStateMatcher=we,e.SidebarPositions=Ta,e.TIMEFORMAT_PLACEHOLDERS=Ca,e.TOP_LEFT_POSITION_PRIORITY=Qe,e.TOP_POSITION_PRIORITY=He,e.TOP_RIGHT_POSITION_PRIORITY=Je,e.ThemePalette=ve,e.TimeFormats=va,e.TimeParts=ba,e.TransitionCheckState=pn,e.VERSION=Ds,e.add=ee,e.countGroupLabelsBeforeOption=S,e.fadeAnimation=je,e.fadeInItems=pi,e.getMcAutocompleteMissingPanelError=G,e.getMcFormFieldMissingControlError=Y,e.getMcFormFieldYouCanNotUseCleanerInNumberInputError=H,e.getMcPopoverInvalidPositionError=pe,e.getMcSelectDynamicMultipleError=T,e.getMcSelectNonArrayValueError=A,e.getMcSelectNonFunctionValueError=R,e.getMcTooltipInvalidPositionError=he,e.getOptionScrollPosition=D,e.getPrecision=J,e.isBoolean=C,e.isDigit=Q,e.isFloat=$,e.isInt=Z,e.mcDatepickerAnimations=zn,e.mcDropdownAnimations=li,e.mcPopoverAnimations=co,e.mcPopoverScrollStrategyFactory=le,e.mcSelectAnimations=st,e.mcSelectScrollStrategyProviderFactory=V,e.mcTabsAnimations=sr,e.mcTooltipScrollStrategyFactory=ue,e.mixinColor=O,e.mixinDisabled=w,e.mixinErrorState=I,e.mixinTabIndex=k,e.normalizeSplitter=q,e.selectEvents="selectEvents",e.setMosaicValidation=B,e.setMosaicValidationForFormControl=W,e.setMosaicValidationForModelControl=z,e.throwMcDropdownInvalidPositionX=oe,e.throwMcDropdownInvalidPositionY=re,e.throwMcDropdownMissingError=ie,e.toBoolean=_,e.transformDropdown=di,e.yearsPerPage=24,e.yearsPerRow=4,e.ɵa15=hr,e.ɵa2=Ma,e.ɵa20=za,e.ɵa22=me,e.ɵa25=Dn,e.ɵa28=Vi,e.ɵa3=x,e.ɵb15=pr,e.ɵb20=Wa,e.ɵb25=En,e.ɵb28=zi,e.ɵc15=dr,e.ɵc20=$a,e.ɵc25=Pn,e.ɵc28=Wi,e.ɵd15=or,e.ɵd20=Za,e.ɵd25=Mn,e.ɵd28=Yi,e.ɵe15=rr,e.ɵe20=Qa,e.ɵe28=Bi,e.ɵf15=kr,e.ɵf20=Ja,e.ɵg15=Ir,e.ɵg20=es,e.ɵh15=Dr,e.ɵi15=Er,Object.defineProperty(e,"__esModule",{value:!0})});
17
+ this.renderer.setStyle(this.inputElement,"max-width",""),e>this.countOfSymbolsForUpdateWidth?this.renderer.setStyle(this.inputElement,"width",e*this.oneSymbolWidth+"px"):this.setDefaultInputWidth()},e.prototype.onFocus=function(){this.focused=!0,this._tagList.stateChanges.next()},e.prototype.focus=function(){this.inputElement.focus()},e.prototype.separatorKeyToSymbol=function(e){var t,n=(t={},t[a.ENTER]=/\r?\n/,t[a.TAB]=/\t/,t[a.SPACE]=/ /,t[a.COMMA]=/,/,t)[e];return n||e},e.prototype.hasControl=function(){return!!this.ngControl},e.prototype.setDefaultInputWidth=function(){this.renderer.setStyle(this.inputElement,"width","30px")},e.prototype.isSeparatorKey=function(e){return!a.hasModifierKey(e)&&this.separatorKeyCodes.indexOf(e.keyCode)>-1},e.decorators=[{type:t.Directive,args:[{selector:"input[mcTagInputFor]",exportAs:"mcTagInput, mcTagInputFor",host:{class:"mc-tag-input mc-input-element","[id]":"id","[attr.disabled]":"disabled || null","[attr.placeholder]":"placeholder || null","(keydown)":"onKeydown($event)","(blur)":"blur()","(focus)":"onFocus()","(input)":"onInput()","(paste)":"onPaste($event)"}}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2},{type:void 0,decorators:[{type:t.Inject,args:[Tr]}]},{type:l.NgControl,decorators:[{type:t.Optional},{type:t.Self}]}]},e.propDecorators={separatorKeyCodes:[{type:t.Input,args:["mcTagInputSeparatorKeyCodes"]}],tagEnd:[{type:t.Output,args:["mcTagInputTokenEnd"]}],placeholder:[{type:t.Input}],id:[{type:t.Input}],tagList:[{type:t.Input,args:["mcTagInputFor"]}],addOnBlur:[{type:t.Input,args:["mcTagInputAddOnBlur"]}],disabled:[{type:t.Input}]},e}(),Xr={separatorKeyCodes:[a.ENTER]},qr=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,h.PlatformModule],exports:[Kr,jr,Gr,Fr,Vr,Br],declarations:[Kr,jr,Gr,Fr,Vr,Br],providers:[{provide:Tr,useValue:Xr}]}]}],e}(),$r=0,Zr=function(){function e(e,t){this.source=e,this.value=t}return e}(),Qr=function(){function e(e,t,n,i,o){this.elementRef=e,this.defaultErrorStateMatcher=t,this.parentForm=n,this.parentFormGroup=i,this.ngControl=o}return e}(),Jr=k(w(I(Qr))),ea=function(){function e(e){this.searchChangesSubscription=new o.Subscription,this.isSearchChanged=!1,e.canCleanerClearByEsc=!1}return e.prototype.focus=function(){this.input.focus()},e.prototype.reset=function(){this.input.ngControl.reset()},e.prototype.ngAfterContentInit=function(){var e=this;if(!this.input)throw Error("McSelectSearch does not work without mcInput");if(!this.input.ngControl)throw Error("McSelectSearch does not work without ngControl");Promise.resolve().then(function(){e.searchChangesSubscription=e.input.ngControl.valueChanges.subscribe(function(){e.isSearchChanged=!0})})},e.prototype.ngOnDestroy=function(){this.searchChangesSubscription.unsubscribe()},e.prototype.handleKeydown=function(e){e.keyCode===a.ESCAPE&&this.input.value&&(this.reset(),e.stopPropagation()),[a.SPACE,a.HOME,a.END].some(function(t){return t===e.keyCode})&&e.stopPropagation()},e.decorators=[{type:t.Directive,args:[{selector:"[mcSelectSearch]",exportAs:"mcSelectSearch",host:{"(keydown)":"handleKeydown($event)"}}]}],e.ctorParameters=function(){return[{type:Rt}]},e.propDecorators={input:[{type:t.ContentChild,args:[In,{static:!1}]}]},e}(),ta=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"[mc-select-search-empty-result]",exportAs:"mcSelectSearchEmptyResult"}]}],e}(),na=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-select-trigger"}]}],e}(),ia=function(e){function r(n,i,r,a,s,c,l,p,d,u,h,g,f,y,b,v,C){var _=e.call(this,c,s,d,u,g)||this;return _._viewportRuler=n,_._changeDetectorRef=i,_._ngZone=r,_._renderer=a,_.rawValidators=l,_._dir=p,_._parentFormField=h,_.ngModel=f,_.formControlName=y,_._scrollStrategyFactory=v,_.mcValidation=C,_.controlType="mc-select",_.hiddenItems=0,_.triggerFontSize=0,_.previousSelectionModelSelected=[],_.transformOrigin="top",_.panelDoneAnimating=!1,_.panelDoneAnimatingStream=new o.Subject,_.scrollStrategy=_._scrollStrategyFactory(),_.offsetY=0,_.positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"}],_.hiddenItemsText="...ещё",_.optionSelectionChanges=o.defer(function(){return _.options?o.merge.apply(void 0,_.options.map(function(e){return e.onSelectionChange}).concat(_.selectionModel.selected.map(function(e){return e.onSelectionChange}))):_._ngZone.onStable.asObservable().pipe(m.take(1),m.switchMap(function(){return _.optionSelectionChanges}))}),_.openedChange=new t.EventEmitter,_.openedStream=_.openedChange.pipe(m.filter(function(e){return e}),m.map(function(){})),_.closedStream=_.openedChange.pipe(m.filter(function(e){return!e}),m.map(function(){})),_.selectionChange=new t.EventEmitter,_.valueChange=new t.EventEmitter,_._required=!1,_._multiple=!1,_._focused=!1,_._panelOpen=!1,_.scrollTop=0,_.uid="mc-select-"+$r++,_.destroy=new o.Subject,_.onChange=function(){},_.onTouched=function(){},_._compareWith=function(e,t){return e===t},_.ngControl&&(_.ngControl.valueAccessor=_),_.tabIndex=parseInt(b)||0,_.id=_.id,_}return v(r,e),Object.defineProperty(r.prototype,"placeholder",{get:function(){return this._placeholder},set:function(e){this._placeholder=e,this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"required",{get:function(){return this._required},set:function(e){this._required=i.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"multiple",{get:function(){return this._multiple},set:function(e){if(this.selectionModel)throw T();this._multiple=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"compareWith",{get:function(){return this._compareWith},set:function(e){if("function"!=typeof e)throw R();this._compareWith=e,this.selectionModel&&this.initializeSelection()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"value",{get:function(){return this._value},set:function(e){e!==this._value&&(this.writeValue(e),this._value=e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"id",{get:function(){return this._id},set:function(e){this._id=e||this.uid,this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"focused",{get:function(){return this._focused||this._panelOpen},set:function(e){this._focused=e},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"panelOpen",{get:function(){return this._panelOpen},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isEmptySearchResult",{get:function(){return this.search&&0===this.options.length&&!!this.search.input.value},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"canShowCleaner",{get:function(){return this.cleaner&&this.selectionModel.hasValue()},enumerable:!0,configurable:!0}),r.prototype.ngOnInit=function(){var e=this;this.selectionModel=new g.SelectionModel(this.multiple),this.stateChanges.next(),this.panelDoneAnimatingStream.pipe(m.distinctUntilChanged(),m.takeUntil(this.destroy)).subscribe(function(){e.panelOpen?(e.scrollTop=0,e.openedChange.emit(!0)):(e.openedChange.emit(!1),e.panelDoneAnimating=!1,e.overlayDir.offsetX=0,e._changeDetectorRef.markForCheck())})},r.prototype.ngAfterContentInit=function(){var e=this;this.mcValidation.useValidation&&B(this),this.initKeyManager(),this.selectionModel.changed.pipe(m.takeUntil(this.destroy)).subscribe(function(e){e.added.forEach(function(e){return e.select()}),e.removed.forEach(function(e){return e.deselect()})}),this.options.changes.pipe(m.startWith(null),m.takeUntil(this.destroy)).subscribe(function(){e.resetOptions(),e.initializeSelection()})},r.prototype.ngAfterViewInit=function(){var e=this;this.tags.changes.subscribe(function(){setTimeout(function(){return e.calculateHiddenItems()},0)})},r.prototype.ngDoCheck=function(){this.ngControl&&this.updateErrorState()},r.prototype.ngOnChanges=function(e){e.disabled&&this.stateChanges.next()},r.prototype.ngOnDestroy=function(){this.destroy.next(),this.destroy.complete(),this.stateChanges.complete()},r.prototype.hiddenItemsTextFormatter=function(e,t){return e+" "+t},r.prototype.clearValue=function(e){e.stopPropagation(),this.selectionModel.clear(),this.keyManager.setActiveItem(-1),this.propagateChanges()},r.prototype.resetSearch=function(){this.search&&(this.search.reset(),this.search.isSearchChanged=!1)},r.prototype.toggle=function(){this.panelOpen?this.close():this.open()},r.prototype.open=function(){var e=this;!this.disabled&&this.options&&this.options.length&&!this._panelOpen&&(this.triggerRect=this.trigger.nativeElement.getBoundingClientRect(),this.triggerFontSize=parseInt(getComputedStyle(this.trigger.nativeElement)["font-size"]),this._panelOpen=!0,this.keyManager.withHorizontalOrientation(null),this.highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this._ngZone.onStable.asObservable().pipe(m.take(1)).subscribe(function(){e.triggerFontSize&&e.overlayDir.overlayRef&&e.overlayDir.overlayRef.overlayElement&&(e.overlayDir.overlayRef.overlayElement.style.fontSize=e.triggerFontSize+"px")}))},r.prototype.close=function(){this._panelOpen&&(this.resetSearch(),this._panelOpen=!1,this.keyManager.withHorizontalOrientation(this.isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this.onTouched())},r.prototype.writeValue=function(e){this.options&&this.setSelectionByValue(e)},r.prototype.registerOnChange=function(e){this.onChange=e},r.prototype.registerOnTouched=function(e){this.onTouched=e},r.prototype.setDisabledState=function(e){this.disabled=e,this._changeDetectorRef.markForCheck(),this.stateChanges.next()},Object.defineProperty(r.prototype,"selected",{get:function(){return this.multiple?this.selectionModel.selected:this.selectionModel.selected[0]},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"triggerValue",{get:function(){return this.empty?"":this.selectionModel.selected[0].viewValue},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"triggerValues",{get:function(){if(this.empty)return[];var e=this.selectionModel.selected;return this.isRtl()&&e.reverse(),e},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"empty",{get:function(){return!this.selectionModel||this.selectionModel.isEmpty()},enumerable:!0,configurable:!0}),r.prototype.isRtl=function(){return!!this._dir&&"rtl"===this._dir.value},r.prototype.handleKeydown=function(e){this.disabled||(this.panelOpen?this.handleOpenKeydown(e):this.handleClosedKeydown(e))},r.prototype.onFadeInDone=function(){this.panelDoneAnimating=this.panelOpen,this._changeDetectorRef.markForCheck(),this.search&&this._panelOpen&&this.search.focus()},r.prototype.onFocus=function(){this.disabled||(this._focused=!0,this.stateChanges.next())},r.prototype.onBlur=function(){this._focused=!1,this.disabled||this.panelOpen||(this.onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())},r.prototype.onAttached=function(){var e=this;this.overlayDir.positionChange.pipe(m.take(1)).subscribe(function(){e._changeDetectorRef.detectChanges(),e.calculateOverlayOffsetX(),e.optionsContainer.nativeElement.scrollTop=e.scrollTop,e.updateScrollSize()})},r.prototype.getPanelTheme=function(){return this._parentFormField?"mc-"+this._parentFormField.color:""},r.prototype.focus=function(){this.elementRef.nativeElement.focus()},r.prototype.onContainerClick=function(){this.focus(),this.open()},r.prototype.onRemoveMatcherItem=function(e,t){t.stopPropagation(),e.deselect()},r.prototype.calculateHiddenItems=function(){var e=this;if(!this.customTrigger&&!this.empty&&this.multiple){var t=0,n=this.getTotalItemsWidthInMatcher(),i=0;if(this.tags.forEach(function(n){n.nativeElement.offsetTop<n.nativeElement.offsetHeight&&(i+=e.getItemWidth(n.nativeElement),t++)}),this.hiddenItems=this.selected.length-t,this.hiddenItems){var o=this.trigger.nativeElement.querySelector(".mc-select__match-hidden-text"),r=this.trigger.nativeElement.querySelector(".mc-select__match-list"),a=o.offsetTop<o.offsetHeight,s=r.getBoundingClientRect().width,c=s+86;if(a&&n<c&&(this.hiddenItems=0),i===s||i+86<s)return void this._changeDetectorRef.markForCheck();!a&&n+86>c&&this.hiddenItems++}this._changeDetectorRef.markForCheck()}},r.prototype.getItemHeight=function(){return this.options.first?this.options.first.getHeight():0},r.prototype.getHeightOfOptionsContainer=function(){return this.optionsContainer.nativeElement.getClientRects()[0].height},r.prototype.updateScrollSize=function(){this.options.first&&this.keyManager.withScrollSize(Math.floor(this.getHeightOfOptionsContainer()/this.options.first.getHeight()))},r.prototype.getTotalItemsWidthInMatcher=function(){var e=this,t=this.trigger.nativeElement.cloneNode(!0);t.querySelector(".mc-select__match-hidden-text").remove(),this._renderer.setStyle(t,"position","absolute"),this._renderer.setStyle(t,"visibility","hidden"),this._renderer.setStyle(t,"top","-100%"),this._renderer.setStyle(t,"left","0"),this._renderer.appendChild(this.trigger.nativeElement,t);var n=0;return t.querySelectorAll("mc-tag").forEach(function(t){n+=e.getItemWidth(t)}),t.remove(),n},r.prototype.getItemWidth=function(e){var t=window.getComputedStyle(e);return parseInt(t.width)+parseInt(t.marginLeft)+parseInt(t.marginRight)},r.prototype.handleClosedKeydown=function(e){var t=e.keyCode,n=t===a.DOWN_ARROW||t===a.UP_ARROW||t===a.LEFT_ARROW||t===a.RIGHT_ARROW;t===a.ENTER||t===a.SPACE||(this.multiple||e.altKey)&&n?(e.preventDefault(),this.open()):this.multiple||this.keyManager.onKeydown(e)},r.prototype.handleOpenKeydown=function(e){var t=e.keyCode,n=t===a.DOWN_ARROW||t===a.UP_ARROW,i=this.keyManager;if(n&&e.altKey)e.preventDefault(),this.close();else if(t===a.HOME)e.preventDefault(),i.setFirstItemActive();else if(t===a.END)e.preventDefault(),i.setLastItemActive();else if(t===a.PAGE_UP)e.preventDefault(),i.setPreviousPageItemActive();else if(t===a.PAGE_DOWN)e.preventDefault(),i.setNextPageItemActive();else if(t!==a.ENTER&&t!==a.SPACE||!i.activeItem)if(this._multiple&&t===a.A&&e.ctrlKey){e.preventDefault();var o=this.options.some(function(e){return!e.selected});this.options.forEach(function(e){o&&!e.disabled?e.select():e.deselect()})}else{var r=i.activeItemIndex;i.onKeydown(e),this._multiple&&n&&e.shiftKey&&i.activeItem&&i.activeItemIndex!==r&&i.activeItem.selectViaInteraction(),this.search&&this.search.focus()}else e.preventDefault(),i.activeItem.selectViaInteraction()},r.prototype.initializeSelection=function(){var e=this;Promise.resolve().then(function(){e.setSelectionByValue(e.ngControl?e.ngControl.value:e._value)})},r.prototype.setSelectionByValue=function(e){var t=this;if(this.previousSelectionModelSelected=this.selectionModel.selected,this.multiple&&e){if(!Array.isArray(e))throw A();this.selectionModel.clear(),e.forEach(function(e){return t.selectValue(e)}),this.sortValues()}else{this.selectionModel.clear();var n=this.selectValue(e);n&&this.keyManager.setActiveItem(n)}this._changeDetectorRef.markForCheck()},r.prototype.getCorrespondOption=function(e){var n=this;return this.options.toArray().concat(this.previousSelectionModelSelected).find(function(i){try{return null!=i.value&&n.compareWith(i.value,e)}catch(e){return t.isDevMode()&&console.warn(e),!1}})},r.prototype.selectValue=function(e){var t=this.getCorrespondOption(e);return t&&this.selectionModel.select(t),t},r.prototype.initKeyManager=function(){var e=this;this.keyManager=new p.ActiveDescendantKeyManager(this.options).withTypeAhead(200,this.search?-1:0).withVerticalOrientation().withHorizontalOrientation(this.isRtl()?"rtl":"ltr"),this.keyManager.tabOut.pipe(m.takeUntil(this.destroy)).subscribe(function(){e.focus(),e.close()}),this.keyManager.change.pipe(m.takeUntil(this.destroy)).subscribe(function(){e._panelOpen&&e.panel?e.scrollActiveOptionIntoView():e._panelOpen||e.multiple||!e.keyManager.activeItem||e.keyManager.activeItem.selectViaInteraction()})},r.prototype.resetOptions=function(){var e=this,t=o.merge(this.options.changes,this.destroy);this.optionSelectionChanges.pipe(m.takeUntil(t)).subscribe(function(t){e.onSelect(t.source,t.isUserInput),e.search&&e.search.isSearchChanged&&(Promise.resolve().then(function(){return e.keyManager.updateActiveItem(0)}),e.search.isSearchChanged=!1),t.isUserInput&&!e.multiple&&e._panelOpen&&(e.close(),e.focus())}),o.merge.apply(void 0,this.options.map(function(e){return e.stateChanges})).pipe(m.takeUntil(t)).subscribe(function(){e._changeDetectorRef.markForCheck(),e.stateChanges.next()})},r.prototype.onSelect=function(e,t){var n=this.selectionModel.isSelected(e);null!=e.value||this._multiple?(e.selected?this.selectionModel.select(e):this.selectionModel.deselect(e),t&&this.keyManager.setActiveItem(e),this.multiple&&(this.sortValues(),t&&(this.search?this.search.focus():this.focus()))):(e.deselect(),this.selectionModel.clear(),this.propagateChanges(e.value)),n!==this.selectionModel.isSelected(e)&&this.propagateChanges(),this.stateChanges.next()},r.prototype.sortValues=function(){var e=this;if(this.multiple){var t=this.options.toArray();this.selectionModel.sort(function(n,i){return e.sortComparator?e.sortComparator(n,i,t):t.indexOf(n)-t.indexOf(i)}),this.stateChanges.next()}},r.prototype.propagateChanges=function(e){var t=null;t=this.multiple?this.selected.map(function(e){return e.value}):this.selected?this.selected.value:e,this._value=t,this.valueChange.emit(t),this.onChange(t),this.selectionChange.emit(new Zr(this,t)),this._changeDetectorRef.markForCheck()},r.prototype.highlightCorrectOption=function(){this.keyManager&&(this.empty?this.keyManager.setFirstItemActive():this.keyManager.setActiveItem(this.selectionModel.selected[0]))},r.prototype.scrollActiveOptionIntoView=function(){var e=this.keyManager.activeItemIndex||0,t=S(e,this.options,this.optionGroups);this.optionsContainer.nativeElement.scrollTop=D(e+t,this.getItemHeight(),this.optionsContainer.nativeElement.scrollTop,224)},r.prototype.calculateOverlayOffsetX=function(){var e,t=this.overlayDir.overlayRef.overlayElement.getBoundingClientRect(),n=this._viewportRuler.getViewportSize(),i=this.isRtl(),o=this.selectionModel.selected[0]||this.options.first;e=o&&o.group?2:1,i||(e*=-1);var r=0-(t.left+e-(i?2:0)),a=t.right+e-n.width+(i?0:2);r>0?e+=r+8:a>0&&(e-=a+8),this.overlayDir.offsetX=Math.round(e),this.overlayDir.overlayRef.updatePosition()},r.decorators=[{type:t.Component,args:[{selector:"mc-select",exportAs:"mcSelect",template:'<div cdk-overlay-origin class="mc-select__trigger" (click)="toggle()" [class.mc-select__trigger_multiple]="multiple" #origin="cdkOverlayOrigin" #trigger><div class="mc-select__matcher" [ngSwitch]="empty"><span class="mc-select__placeholder" *ngSwitchCase="true">{{ placeholder || \' \' }}</span> <span *ngSwitchCase="false" [ngSwitch]="!!customTrigger"><div *ngSwitchDefault [ngSwitch]="multiple" class="mc-select__match-container"><span *ngSwitchCase="false" class="mc-select__matcher-text">{{ triggerValue }}</span><div *ngSwitchCase="true" class="mc-select__match-list"><mc-tag *ngFor="let option of triggerValues" [disabled]="disabled" [selectable]="false" [class.mc-error]="errorState">{{ option.viewValue }} <i mc-icon="mc-close-S_16" (click)="onRemoveMatcherItem(option, $event)"></i></mc-tag></div><div class="mc-select__match-hidden-text" [style.display]="hiddenItems > 0 ? \'block\' : \'none\'">{{ hiddenItemsTextFormatter(hiddenItemsText, hiddenItems) }}</div></div><ng-content select="mc-select-trigger" *ngSwitchCase="true"></ng-content></span></div><div class="mc-select__cleaner" *ngIf="canShowCleaner" (click)="clearValue($event)"><ng-content select="mc-cleaner"></ng-content></div><div class="mc-select__arrow-wrapper"><i class="mc-select__arrow" mc-icon="mc-angle-down-L_16" color="second"></i></div></div><ng-template cdk-connected-overlay cdkConnectedOverlayLockPosition cdkConnectedOverlayHasBackdrop cdkConnectedOverlayBackdropClass="cdk-overlay-transparent-backdrop" [cdkConnectedOverlayScrollStrategy]="scrollStrategy" [cdkConnectedOverlayOrigin]="origin" [cdkConnectedOverlayOpen]="panelOpen" [cdkConnectedOverlayPositions]="positions" [cdkConnectedOverlayMinWidth]="triggerRect?.width" [cdkConnectedOverlayOffsetY]="offsetY" (backdropClick)="close()" (attach)="onAttached()" (detach)="close()"><div #panel class="mc-select__panel {{ getPanelTheme() }}" [ngClass]="panelClass" (@transformPanel.done)="panelDoneAnimatingStream.next($event.toState)" [style.transformOrigin]="transformOrigin" [class.mc-select-panel-done-animcing]="panelDoneAnimating" [style.font-size.px]="triggerFontSize" (keydown)="handleKeydown($event)"><div *ngIf="search" class="mc-select__search-container"><ng-content select="[mcSelectSearch]"></ng-content></div><div #optionsContainer class="mc-select__content" [@fadeInContent]="\'showing\'" (@fadeInContent.done)="onFadeInDone()"><div *ngIf="isEmptySearchResult" class="mc-select__no-options-message"><ng-content select="[mc-select-search-empty-result]"></ng-content></div><ng-content select="mc-option,mc-optgroup"></ng-content></div></div></ng-template>',styles:[".mc-divider{display:block;margin:0;border-top-width:1px;border-top-style:solid}.mc-divider.mc-divider-vertical{border-top:0;border-right-width:1px;border-right-style:solid}.mc-divider.mc-divider-inset{margin-left:80px}[dir=rtl] .mc-divider.mc-divider-inset{margin-left:auto;margin-right:80px}.mc-select{box-sizing:border-box;display:inline-block;vertical-align:top;width:100%;outline:0}.mc-select.mc-disabled .mc-select__trigger{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mc-select__no-options-message{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;position:relative;max-width:100%;height:32px;cursor:default;outline:0;padding:0 16px}.mc-select__trigger{display:flex;box-sizing:border-box;position:relative;height:30px;cursor:pointer;padding-right:7px;padding-left:15px}.mc-select__trigger.mc-select__trigger_multiple{padding-left:7px}.mc-select__matcher{display:flex;align-items:center;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mc-select__matcher>span{width:100%}.mc-select__match-list{display:flex;flex-wrap:wrap;overflow:hidden;max-height:28px;margin:0;padding-left:0}.mc-select__match-list .mc-tag{margin-right:4px}.mc-select__match-container{display:flex;flex-direction:row;justify-content:space-between;width:100%}.mc-select__match-container .mc-select__match-hidden-text{flex:0 0 70px;align-self:center;padding:0 8px;text-align:right}.mc-select__match-item{display:flex;border:1px solid transparent;border-radius:3px;padding-left:7px;margin-right:4px;max-width:100%}.mc-select__arrow-wrapper{align-self:center}.mc-form-field-appearance-fill .mc-select__arrow-wrapper,.mc-form-field-appearance-standard .mc-select__arrow-wrapper{transform:translateY(-50%)}.mc-form-field-appearance-outline .mc-select__arrow-wrapper{transform:translateY(-25%)}.mc-select__panel{min-width:100%;overflow:hidden;border-width:1px;border-style:solid;border-bottom-left-radius:3px;border-bottom-right-radius:3px;padding:4px 0}.mc-select__content{max-height:224px;overflow:auto}.mc-select__panel .mc-optgroup-label,.mc-select__panel .mc-option{font-size:inherit;line-height:32px;height:32px}.mc-form-field-type-mc-select:not(.mc-disabled) .mc-form-field-flex{cursor:pointer}.mc-form-field-type-mc-select .mc-form-field-label{width:calc(100% - 18px)}"],inputs:["disabled"],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,host:{"[attr.id]":"id","[tabindex]":"tabIndex",class:"mc-select","[class.mc-disabled]":"disabled","[class.mc-select-invalid]":"errorState","(keydown)":"handleKeydown($event)","(focus)":"onFocus()","(blur)":"onBlur()","(window:resize)":"calculateHiddenItems()"},animations:[st.transformPanel,st.fadeInContent],providers:[{provide:kt,useExisting:r},{provide:Ve,useExisting:r}]}]}],r.ctorParameters=function(){return[{type:c.ViewportRuler},{type:t.ChangeDetectorRef},{type:t.NgZone},{type:t.Renderer2},{type:Oe},{type:t.ElementRef},{type:Array,decorators:[{type:t.Optional},{type:t.Inject,args:[l.NG_VALIDATORS]}]},{type:n.Directionality,decorators:[{type:t.Optional}]},{type:l.NgForm,decorators:[{type:t.Optional}]},{type:l.FormGroupDirective,decorators:[{type:t.Optional}]},{type:Rt,decorators:[{type:t.Optional}]},{type:l.NgControl,decorators:[{type:t.Self},{type:t.Optional}]},{type:l.NgModel,decorators:[{type:t.Optional},{type:t.Self}]},{type:l.FormControlName,decorators:[{type:t.Optional},{type:t.Self}]},{type:String,decorators:[{type:t.Attribute,args:["tabindex"]}]},{type:void 0,decorators:[{type:t.Inject,args:[rt]}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[bt]}]}]},r.propDecorators={trigger:[{type:t.ViewChild,args:["trigger",{static:!1}]}],panel:[{type:t.ViewChild,args:["panel",{static:!1}]}],optionsContainer:[{type:t.ViewChild,args:["optionsContainer",{static:!1}]}],overlayDir:[{type:t.ViewChild,args:[c.CdkConnectedOverlay,{static:!1}]}],tags:[{type:t.ViewChildren,args:[jr]}],customTrigger:[{type:t.ContentChild,args:[na,{static:!1}]}],cleaner:[{type:t.ContentChild,args:["mcSelectCleaner",{static:!0}]}],options:[{type:t.ContentChildren,args:[Fe,{descendants:!0}]}],optionGroups:[{type:t.ContentChildren,args:[Te]}],search:[{type:t.ContentChild,args:[ea,{static:!1}]}],hiddenItemsText:[{type:t.Input}],panelClass:[{type:t.Input}],errorStateMatcher:[{type:t.Input}],sortComparator:[{type:t.Input}],openedChange:[{type:t.Output}],openedStream:[{type:t.Output,args:["opened"]}],closedStream:[{type:t.Output,args:["closed"]}],selectionChange:[{type:t.Output}],valueChange:[{type:t.Output}],placeholder:[{type:t.Input}],required:[{type:t.Input}],multiple:[{type:t.Input}],compareWith:[{type:t.Input}],value:[{type:t.Input}],id:[{type:t.Input}],hiddenItemsTextFormatter:[{type:t.Input}]},r}(Jr),oa=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,c.OverlayModule,Le,wt,qr],exports:[Ft,ia,ea,ta,na,Le,r.CommonModule],declarations:[ia,ea,ta,na],providers:[at]}]}],e}(),ra=0,aa=function(){function e(e,t,n){void 0===n&&(n=!1),this.source=e,this.value=t,this.isUserInput=n}return e}(),sa=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-tree-select-trigger"}]}],e}(),ca=function(){function e(e,t,n,i,o){this.elementRef=e,this.defaultErrorStateMatcher=t,this.parentForm=n,this.parentFormGroup=i,this.ngControl=o}return e}(),la=k(w(I(ca))),pa=function(e){function r(n,i,r,a,s,c,l,p,d,u,h,g,f,y,b,v,C){var _=e.call(this,n,c,g,f,b)||this;return _.changeDetectorRef=i,_.viewportRuler=r,_.ngZone=a,_.renderer=s,_.scrollStrategyFactory=p,_.rawValidators=d,_.mcValidation=u,_.dir=h,_.parentFormField=y,_.ngModel=v,_.formControlName=C,_.controlType="mc-select",_.hiddenItems=0,_.triggerFontSize=0,_.transformOrigin="top",_.panelDoneAnimating=!1,_.panelDoneAnimatingStream=new o.Subject,_.scrollStrategy=_.scrollStrategyFactory(),_.offsetY=0,_.positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"}],_.hiddenItemsText="...ещё",_.openedChange=new t.EventEmitter,_.openedStream=_.openedChange.pipe(m.filter(function(e){return e}),m.map(function(){})),_.closedStream=_.openedChange.pipe(m.filter(function(e){return!e}),m.map(function(){})),_.selectionChange=new t.EventEmitter,_.valueChange=new t.EventEmitter,_.optionSelectionChanges=o.defer(function(){return _.options?o.merge.apply(void 0,_.options.map(function(e){return e.onSelectionChange})):_.ngZone.onStable.asObservable().pipe(m.take(1),m.switchMap(function(){return _.optionSelectionChanges}))}),_._required=!1,_._multiple=!1,_._autoSelect=!0,_._value=null,_._focused=!1,_._panelOpen=!1,_.scrollTop=0,_.uid="mc-select-"+ra++,_.destroy=new o.Subject,_.onChange=function(){},_.onTouched=function(){},_._compareWith=function(e,t){return e===t},_.ngControl&&(_.ngControl.valueAccessor=_),_.tabIndex=parseInt(l)||0,_.id=_.id,_}return v(r,e),Object.defineProperty(r.prototype,"placeholder",{get:function(){return this._placeholder},set:function(e){this._placeholder=e,this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"required",{get:function(){return this._required},set:function(e){this._required=i.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"multiple",{get:function(){return this._multiple},set:function(e){if(this.selectionModel)throw T();this._multiple=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"autoSelect",{get:function(){return!this.multiple&&this._autoSelect},set:function(e){this._autoSelect=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"compareWith",{get:function(){return this._compareWith},set:function(e){if("function"!=typeof e)throw R();this._compareWith=e,this.selectionModel&&this.initializeSelection()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"value",{get:function(){return this.multiple?this.tree.getSelectedValues():this.tree.getSelectedValues()[0]},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"id",{get:function(){return this._id},set:function(e){this._id=e||this.uid,this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"focused",{get:function(){return this._focused||this._panelOpen},set:function(e){this._focused=e},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"panelOpen",{get:function(){return this._panelOpen},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"canShowCleaner",{get:function(){return this.cleaner&&this.selectionModel.hasValue()},enumerable:!0,configurable:!0}),r.prototype.ngOnInit=function(){var e=this;this.stateChanges.next(),this.panelDoneAnimatingStream.pipe(m.distinctUntilChanged(),m.takeUntil(this.destroy)).subscribe(function(){e.panelOpen?(e.scrollTop=0,e.openedChange.emit(!0)):(e.openedChange.emit(!1),e.panelDoneAnimating=!1,e.overlayDir.offsetX=0,e.changeDetectorRef.markForCheck())})},r.prototype.ngAfterContentInit=function(){var e=this;this.tree&&(this.mcValidation.useValidation&&B(this),this.tree.resetFocusedItemOnBlur=!1,this.selectionModel=this.tree.selectionModel=new g.SelectionModel(this.multiple),this.tree.ngAfterContentInit(),this.initKeyManager(),this.options=this.tree.renderedOptions,this.tree.autoSelect=this.autoSelect,null===this.tree.multipleMode&&(this.tree.multipleMode=this.multiple?Ie.CHECKBOX:null),this.multiple&&(this.tree.noUnselectLast=!1),this.tempValues&&(this.setSelectionByValue(this.tempValues),this.tempValues=null),this.optionSelectionChanges.pipe(m.takeUntil(this.destroy)).subscribe(function(t){!e.multiple&&e.panelOpen&&t.isUserInput&&e.close()}),this.tree.selectionChange.pipe(m.takeUntil(this.destroy)).subscribe(function(t){e.onChange(e.selectedValues),e.selectionChange.emit(new aa(e,t.option))}),this.selectionModel.changed.pipe(m.takeUntil(this.destroy)).subscribe(function(t){t.added.length&&(e.tree.keyManager.setFocusOrigin("program"),e.tree.keyManager.setActiveItem(e.options.find(function(e){return e.data===t.added[0]})))}))},r.prototype.ngAfterViewInit=function(){var e=this;this.tree&&(this.tags.changes.subscribe(function(){setTimeout(function(){return e.calculateHiddenItems()},0)}),setTimeout(function(){return e.calculateHiddenItems()},0))},r.prototype.ngDoCheck=function(){this.ngControl&&this.updateErrorState()},r.prototype.ngOnChanges=function(e){e.disabled&&this.stateChanges.next()},r.prototype.ngOnDestroy=function(){this.destroy.next(),this.destroy.complete(),this.stateChanges.complete()},r.prototype.hiddenItemsTextFormatter=function(e,t){return e+" "+t},r.prototype.clearValue=function(e){e.stopPropagation(),this.selectionModel.clear(),
18
+ this.tree.keyManager.setActiveItem(-1),this.setSelectionByValue([]),this.onChange(this.selectedValues)},r.prototype.toggle=function(){this.panelOpen?this.close():this.open()},r.prototype.open=function(){var e=this;!this.disabled&&this.options&&this.options.length&&!this._panelOpen&&(this.triggerRect=this.trigger.nativeElement.getBoundingClientRect(),this.triggerFontSize=parseInt(getComputedStyle(this.trigger.nativeElement)["font-size"]),this._panelOpen=!0,setTimeout(function(){return e.highlightCorrectOption()}),this.changeDetectorRef.markForCheck(),this.ngZone.onStable.asObservable().pipe(m.take(1)).subscribe(function(){e.triggerFontSize&&e.overlayDir.overlayRef&&e.overlayDir.overlayRef.overlayElement&&(e.overlayDir.overlayRef.overlayElement.style.fontSize=e.triggerFontSize+"px")}))},r.prototype.close=function(){var e=this;this._panelOpen&&(this._panelOpen=!1,this.changeDetectorRef.markForCheck(),this.onTouched(),setTimeout(function(){return e.focus()},0))},r.prototype.writeValue=function(e){this.tree?this.setSelectionByValue(e):this.tempValues=e},r.prototype.registerOnChange=function(e){this.onChange=e},r.prototype.registerOnTouched=function(e){this.onTouched=e},r.prototype.setDisabledState=function(e){this.disabled=e,this.changeDetectorRef.markForCheck(),this.stateChanges.next()},Object.defineProperty(r.prototype,"selected",{get:function(){return this.multiple?this.selectionModel.selected:this.selectionModel.selected[0]},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"selectedValues",{get:function(){var e=this,t=this.selectionModel.selected.map(function(t){return e.tree.treeControl.getValue(t)});return this.multiple?t:t[0]},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"triggerValue",{get:function(){return this.empty?"":this.tree.treeControl.getViewValue(this.selected)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"triggerValues",{get:function(){return this.empty?[]:this.selected},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"empty",{get:function(){return!this.selectionModel||this.selectionModel.isEmpty()},enumerable:!0,configurable:!0}),r.prototype.isRtl=function(){return!!this.dir&&"rtl"===this.dir.value},r.prototype.handleKeydown=function(e){this.disabled||(this.panelOpen?this.handleOpenKeydown(e):this.handleClosedKeydown(e))},r.prototype.onFadeInDone=function(){this.panelDoneAnimating=this.panelOpen,this.changeDetectorRef.markForCheck()},r.prototype.onFocus=function(){this.disabled||(this._focused=!0,this.stateChanges.next())},r.prototype.onBlur=function(){this._focused=!1,this.disabled||this.panelOpen||(this.onTouched(),this.changeDetectorRef.markForCheck(),this.stateChanges.next())},r.prototype.onAttached=function(){var e=this;this.overlayDir.positionChange.pipe(m.take(1)).subscribe(function(){e.changeDetectorRef.detectChanges(),e.calculateOverlayOffsetX(),e.panel.nativeElement.scrollTop=e.scrollTop,e.tree.updateScrollSize()})},r.prototype.getPanelTheme=function(){return this.parentFormField?"mc-"+this.parentFormField.color:""},r.prototype.focus=function(){this.elementRef.nativeElement.focus()},r.prototype.onContainerClick=function(){this.focus()},r.prototype.onRemoveSelectedOption=function(e,t){t.stopPropagation(),this.disabled||(this.selectionModel.deselect(e),this.onChange(this.selectedValues))},r.prototype.calculateHiddenItems=function(){var e=this;if(!this.customTrigger&&!this.empty&&this.multiple){var t=0,n=this.getTotalItemsWidthInMatcher(),i=0;if(this.tags.forEach(function(n){n.nativeElement.offsetTop<n.nativeElement.offsetHeight&&(i+=e.getItemWidth(n.nativeElement),t++)}),this.hiddenItems=this.selectionModel.selected.length-t,this.hiddenItems){var o=this.trigger.nativeElement.querySelector(".mc-tree-select__match-hidden-text"),r=this.trigger.nativeElement.querySelector(".mc-tree-select__match-list"),a=o.offsetTop<o.offsetHeight,s=r.getBoundingClientRect().width,c=s+86;if(a&&n<c&&(this.hiddenItems=0),i===s||i+86<s)return void this.changeDetectorRef.markForCheck();!a&&n+86>c&&this.hiddenItems++}this.changeDetectorRef.markForCheck()}},r.prototype.getTotalItemsWidthInMatcher=function(){var e=this,t=this.trigger.nativeElement.cloneNode(!0);t.querySelector(".mc-tree-select__match-hidden-text").remove(),this.renderer.setStyle(t,"position","absolute"),this.renderer.setStyle(t,"visibility","hidden"),this.renderer.setStyle(t,"top","-100%"),this.renderer.setStyle(t,"left","0"),this.renderer.appendChild(this.trigger.nativeElement,t);var n=0;return t.querySelectorAll("mc-tag").forEach(function(t){n+=e.getItemWidth(t)}),t.remove(),n},r.prototype.getItemWidth=function(e){var t=window.getComputedStyle(e);return parseInt(t.width)+parseInt(t.marginLeft)+parseInt(t.marginRight)},r.prototype.handleClosedKeydown=function(e){var t=e.keyCode,n=t===a.DOWN_ARROW||t===a.UP_ARROW||t===a.LEFT_ARROW||t===a.RIGHT_ARROW;t===a.ENTER||t===a.SPACE||(this.multiple||e.altKey)&&n?(e.preventDefault(),this.open()):!this.multiple&&this.tree.keyManager&&this.tree.keyManager.onKeydown&&this.tree.keyManager.onKeydown(e)},r.prototype.handleOpenKeydown=function(e){var t=e.keyCode,n=t===a.DOWN_ARROW||t===a.UP_ARROW;if(n&&e.altKey)e.preventDefault(),this.close();else{if(t===a.LEFT_ARROW||t===a.RIGHT_ARROW)return this.originalOnKeyDown.call(this.tree,e);if(t===a.HOME)e.preventDefault(),this.tree.keyManager.setFirstItemActive();else if(t===a.END)e.preventDefault(),this.tree.keyManager.setLastItemActive();else if(t===a.PAGE_UP)e.preventDefault(),this.tree.keyManager.setPreviousPageItemActive();else if(t===a.PAGE_DOWN)e.preventDefault(),this.tree.keyManager.setNextPageItemActive();else if(t!==a.ENTER&&t!==a.SPACE||!this.tree.keyManager.activeItem)if(this.multiple&&t===a.A&&e.ctrlKey){e.preventDefault();var i=this.options.some(function(e){return!e.selected});this.options.forEach(function(e){i&&!e.disabled?e.select():e.deselect()})}else{var o=this.tree.keyManager.activeItemIndex;this.tree.keyManager.setFocusOrigin("keyboard"),this.tree.keyManager.onKeydown(e),this.multiple&&n&&e.shiftKey&&this.tree.keyManager.activeItem&&this.tree.keyManager.activeItemIndex!==o&&this.tree.keyManager.activeItem.selectViaInteraction(e),this.autoSelect&&this.tree.keyManager.activeItem&&this.tree.setSelectedOptionsByKey(this.tree.keyManager.activeItem,a.hasModifierKey(e,"shiftKey"),a.hasModifierKey(e,"ctrlKey"))}else e.preventDefault(),this.autoSelect?this.close():this.selectionModel.toggle(this.tree.keyManager.activeItem.data)}},r.prototype.initializeSelection=function(){var e=this;Promise.resolve().then(function(){e.setSelectionByValue(e.ngControl?e.ngControl.value:e._value)})},r.prototype.setSelectionByValue=function(e){if(this.multiple&&e){if(!Array.isArray(e))throw A();this.tree.setOptionsFromValues(e),this.sortValues()}else this.tree.setOptionsFromValues([e]);this.changeDetectorRef.detectChanges()},r.prototype.initKeyManager=function(){var e=this;this.originalOnKeyDown=this.tree.onKeyDown,this.tree.onKeyDown=function(){},this.tree.keyManager.tabOut.pipe(m.takeUntil(this.destroy)).subscribe(function(){e.focus(),e.close()}),this.tree.keyManager.change.pipe(m.takeUntil(this.destroy)).subscribe(function(){e._panelOpen&&e.panel?e.scrollActiveOptionIntoView():e._panelOpen||e.multiple||!e.tree.keyManager.activeItem||e.tree.keyManager.activeItem.selectViaInteraction()})},r.prototype.sortValues=function(){var e=this;if(this.multiple){var t=this.options.toArray();this.selectionModel.sort(function(n,i){return e.sortComparator?e.sortComparator(n,i,t):t.indexOf(n)-t.indexOf(i)}),this.stateChanges.next()}},r.prototype.highlightCorrectOption=function(){if(!this.empty&&this.tree.keyManager){var e=this.multiple?this.selectedValues[0]:this.selectedValues,t=this.options.find(function(t){return t.value===e});t&&this.tree.keyManager.setActiveItem(t)}},r.prototype.scrollActiveOptionIntoView=function(){var e=this.tree.keyManager.activeItemIndex||0;this.panel.nativeElement.scrollTop=D(e,this.tree.getItemHeight(),this.panel.nativeElement.scrollTop,224)},r.prototype.calculateOverlayOffsetX=function(){var e=this.overlayDir.overlayRef.overlayElement.getBoundingClientRect(),t=this.viewportRuler.getViewportSize(),n=this.isRtl(),i=1;n||(i*=-1);var o=0-(e.left+i-(n?2:0)),r=e.right+i-t.width+(n?0:2);o>0?i+=o+8:r>0&&(i-=r+8),this.overlayDir.offsetX=Math.round(i),this.overlayDir.overlayRef.updatePosition()},r.decorators=[{type:t.Component,args:[{selector:"mc-tree-select",exportAs:"mcTreeSelect",template:'<div cdk-overlay-origin class="mc-tree-select__trigger" [class.mc-tree-select__trigger_multiple]="multiple" #origin="cdkOverlayOrigin" #trigger><div class="mc-tree-select__matcher" [ngSwitch]="empty"><span class="mc-tree-select__placeholder" *ngSwitchCase="true">{{ placeholder || \' \' }}</span> <span *ngSwitchCase="false" [ngSwitch]="!!customTrigger"><div *ngSwitchDefault [ngSwitch]="multiple" class="mc-tree-select__match-container"><span *ngSwitchCase="false" class="mc-tree-select__matcher-text">{{ triggerValue }}</span><div *ngSwitchCase="true" class="mc-tree-select__multiple-matcher"><div class="mc-tree-select__match-list"><mc-tag *ngFor="let option of triggerValues" [selectable]="false" [disabled]="disabled" [class.mc-error]="errorState">{{ tree.treeControl.getViewValue(option) }} <i mc-icon="mc-close-S_16" (click)="onRemoveSelectedOption(option, $event)"></i></mc-tag></div><div class="mc-tree-select__match-hidden-text" [style.display]="hiddenItems > 0 ? \'block\' : \'none\'" #hiddenItemsCounter>{{ hiddenItemsTextFormatter(hiddenItemsText, hiddenItems) }}</div></div></div><ng-content select="mc-tree-select-trigger" *ngSwitchCase="true"></ng-content></span></div><div class="mc-select__cleaner" *ngIf="canShowCleaner" (click)="clearValue($event)"><ng-content select="mc-cleaner"></ng-content></div><div class="mc-tree-select__arrow-wrapper"><i class="mc-tree-select__arrow" mc-icon="mc-angle-down-L_16" color="second"></i></div></div><ng-template cdk-connected-overlay cdkConnectedOverlayLockPosition cdkConnectedOverlayHasBackdrop cdkConnectedOverlayBackdropClass="cdk-overlay-transparent-backdrop" [cdkConnectedOverlayScrollStrategy]="scrollStrategy" [cdkConnectedOverlayOrigin]="origin" [cdkConnectedOverlayOpen]="panelOpen" [cdkConnectedOverlayPositions]="positions" [cdkConnectedOverlayMinWidth]="triggerRect?.width" [cdkConnectedOverlayOffsetY]="offsetY" (backdropClick)="close()" (attach)="onAttached()" (detach)="close()"><div #panel class="mc-tree-select__panel {{ getPanelTheme() }}" [ngClass]="panelClass" (@transformPanel.done)="panelDoneAnimatingStream.next($event.toState)" [style.transformOrigin]="transformOrigin" [class.mc-select-panel-done-animcing]="panelDoneAnimating" [style.font-size.px]="triggerFontSize" (keydown)="handleKeydown($event)"><div #optionsContainer class="mc-tree-select__content" [@fadeInContent]="\'showing\'" (@fadeInContent.done)="onFadeInDone()"><ng-content select="mc-tree-selection"></ng-content></div></div></ng-template>',styles:[".mc-divider{display:block;margin:0;border-top-width:1px;border-top-style:solid}.mc-divider.mc-divider-vertical{border-top:0;border-right-width:1px;border-right-style:solid}.mc-divider.mc-divider-inset{margin-left:80px}[dir=rtl] .mc-divider.mc-divider-inset{margin-left:auto;margin-right:80px}.mc-tree-selection{display:block}.mc-tree-option{display:flex;align-items:center;height:28px;word-wrap:break-word;border:2px solid transparent}.mc-tree-option>.mc-icon{margin-right:4px;cursor:pointer}.mc-tree-option:focus{outline:0}.mc-tree-option:not([disabled]){cursor:pointer}.mc-tree-option .mc-pseudo-checkbox{margin-right:8px}.mc-tree-node-toggle{margin-right:4px}.mc-tree-node-toggle .mc-icon{transform:rotate(-90deg)}.mc-tree-node-toggle.mc-opened .mc-icon{transform:rotate(0)}.mc-tree-node-toggle.mc-disabled{cursor:default}.mc-tree-select{box-sizing:border-box;display:inline-block;vertical-align:top;width:100%;outline:0}.mc-tree-select.mc-disabled .mc-tree-select__trigger{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mc-tree-select__trigger{display:flex;box-sizing:border-box;position:relative;height:30px;cursor:pointer;padding-right:7px;padding-left:15px}.mc-tree-select__trigger.mc-tree-select__trigger_multiple{padding-left:7px}.mc-tree-select__trigger.mc-tree-select__trigger_multiple .mc-tree-select__placeholder{margin-left:8px}.mc-tree-select__matcher{display:flex;align-items:center;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mc-tree-select__matcher>span{width:100%}.mc-tree-select__multiple-matcher{display:flex;width:100%}.mc-tree-select__match-list{display:flex;flex-wrap:wrap;overflow:hidden;max-height:28px;margin:0;padding-left:0}.mc-tree-select__match-list .mc-tag{margin-right:4px}.mc-tree-select__match-container{display:flex;flex-direction:row;justify-content:space-between;width:100%}.mc-tree-select__match-container .mc-tree-select__match-hidden-text{flex:0 0 70px;align-self:center;padding:0 8px;text-align:right}.mc-tree-select__match-item{display:flex;border:1px solid transparent;border-radius:3px;padding-left:7px;margin-right:4px;max-width:100%}.mc-tree-select__arrow-wrapper{align-self:center}.mc-form-field-appearance-fill .mc-tree-select__arrow-wrapper,.mc-form-field-appearance-standard .mc-tree-select__arrow-wrapper{transform:translateY(-50%)}.mc-form-field-appearance-outline .mc-tree-select__arrow-wrapper{transform:translateY(-25%)}.mc-tree-select__panel{max-height:224px;min-width:100%;overflow:auto;border-width:1px;border-style:solid;border-bottom-left-radius:3px;border-bottom-right-radius:3px;padding:4px 0}.mc-tree-select__content{height:100%}.mc-tree-select__content .mc-tree-selection{height:100%}.mc-tree-select__panel .mc-optgroup-label,.mc-tree-select__panel .mc-tree-select-option{font-size:inherit;line-height:32px;height:32px}.mc-form-field-type-mc-select:not(.mc-disabled) .mc-form-field-flex{cursor:pointer}.mc-form-field-type-mc-select .mc-form-field-label{width:calc(100% - 18px)}"],inputs:["disabled"],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,host:{"[attr.id]":"id","[attr.tabindex]":"tabIndex",class:"mc-tree-select","[class.mc-disabled]":"disabled","[class.mc-select-invalid]":"errorState","(click)":"toggle()","(keydown)":"handleKeydown($event)","(focus)":"onFocus()","(blur)":"onBlur()","(window:resize)":"calculateHiddenItems()"},animations:[st.transformPanel,st.fadeInContent],providers:[{provide:kt,useExisting:r},{provide:b.CdkTree,useExisting:r}]}]}],r.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:c.ViewportRuler},{type:t.NgZone},{type:t.Renderer2},{type:Oe},{type:String,decorators:[{type:t.Attribute,args:["tabindex"]}]},{type:void 0,decorators:[{type:t.Inject,args:[rt]}]},{type:Array,decorators:[{type:t.Optional},{type:t.Inject,args:[l.NG_VALIDATORS]}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[bt]}]},{type:n.Directionality,decorators:[{type:t.Optional}]},{type:l.NgForm,decorators:[{type:t.Optional}]},{type:l.FormGroupDirective,decorators:[{type:t.Optional}]},{type:Rt,decorators:[{type:t.Optional}]},{type:l.NgControl,decorators:[{type:t.Optional},{type:t.Self}]},{type:l.NgModel,decorators:[{type:t.Optional},{type:t.Self}]},{type:l.FormControlName,decorators:[{type:t.Optional},{type:t.Self}]}]},r.propDecorators={trigger:[{type:t.ViewChild,args:["trigger",{static:!1}]}],panel:[{type:t.ViewChild,args:["panel",{static:!1}]}],overlayDir:[{type:t.ViewChild,args:[c.CdkConnectedOverlay,{static:!1}]}],hiddenItemsCounter:[{type:t.ViewChild,args:["hiddenItemsCounter",{static:!1}]}],tags:[{type:t.ViewChildren,args:[jr]}],cleaner:[{type:t.ContentChild,args:["mcSelectCleaner",{static:!0}]}],customTrigger:[{type:t.ContentChild,args:[sa,{static:!1}]}],tree:[{type:t.ContentChild,args:[Xo,{static:!1}]}],hiddenItemsText:[{type:t.Input}],openedChange:[{type:t.Output}],openedStream:[{type:t.Output,args:["opened"]}],closedStream:[{type:t.Output,args:["closed"]}],selectionChange:[{type:t.Output}],valueChange:[{type:t.Output}],panelClass:[{type:t.Input}],errorStateMatcher:[{type:t.Input}],sortComparator:[{type:t.Input}],placeholder:[{type:t.Input}],required:[{type:t.Input}],multiple:[{type:t.Input}],autoSelect:[{type:t.Input}],compareWith:[{type:t.Input}],id:[{type:t.Input}],hiddenItemsTextFormatter:[{type:t.Input}]},r}(la),da=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,c.OverlayModule,b.CdkTreeModule,$o,wt,qr,Se],exports:[pa,sa,r.CommonModule],declarations:[pa,sa],providers:[at]}]}],e}(),ua=new t.InjectionToken("MC_TEXTAREA_VALUE_ACCESSOR"),ha=0,ma=function(){function e(e,t,n,i){this.defaultErrorStateMatcher=e,this.parentForm=t,this.parentFormGroup=n,this.ngControl=i}return e}(),ga=I(ma),fa=function(e){function n(t,n,i,r,a,s,c){var l=e.call(this,a,i,r,n)||this;l.elementRef=t,l.ngControl=n,l.ngZone=c,l.canGrow=!0,l.focused=!1,l.stateChanges=new o.Subject,l.controlType="mc-textarea",l.uid="mc-textsrea-"+ha++,l._disabled=!1,l._required=!1,l.lineHeight=0,l.freeRowsHeight=0,l.minHeight=0,l.valueAccessor=s||l.elementRef.nativeElement,l.previousNativeValue=l.value,l.id=l.id;var p=o.fromEvent(t.nativeElement,"input");return l.growSubscription=p.subscribe(l.grow.bind(l)),l}return v(n,e),Object.defineProperty(n.prototype,"disabled",{get:function(){return this.ngControl&&null!==this.ngControl.disabled?this.ngControl.disabled:this._disabled},set:function(e){this._disabled=i.coerceBooleanProperty(e),this.focused&&(this.focused=!1,this.stateChanges.next())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"id",{get:function(){return this._id},set:function(e){this._id=e||this.uid},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"required",{get:function(){return this._required},set:function(e){this._required=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this.valueAccessor.value},set:function(e){e!==this.value&&(this.valueAccessor.value=e,this.stateChanges.next())},enumerable:!0,configurable:!0}),n.prototype.ngOnInit=function(){var e=this;setTimeout(function(){return e.grow()},0),this.lineHeight=parseInt(getComputedStyle(this.elementRef.nativeElement).lineHeight,10);var t=parseInt(getComputedStyle(this.elementRef.nativeElement).paddingTop,10),n=parseInt(getComputedStyle(this.elementRef.nativeElement).paddingBottom,10);this.minHeight=2*this.lineHeight+t+n,this.freeRowsHeight=this.lineHeight},n.prototype.ngOnChanges=function(){this.stateChanges.next()},n.prototype.ngOnDestroy=function(){this.stateChanges.complete(),this.growSubscription.unsubscribe()},n.prototype.ngDoCheck=function(){this.ngControl&&this.updateErrorState(),this.dirtyCheckNativeValue()},n.prototype.grow=function(){var e=this;this.canGrow&&this.ngZone.runOutsideAngular(function(){var t=e.elementRef.nativeElement,n=parseInt(window.getComputedStyle(t).height,10),i=n-t.clientHeight;t.style.minHeight=0;var o=Math.max(e.minHeight,+t.scrollHeight+i+e.freeRowsHeight);t.style.minHeight=o+"px"})},n.prototype.focus=function(){this.elementRef.nativeElement.focus()},n.prototype.focusChanged=function(e){e!==this.focused&&(this.focused=e,this.stateChanges.next())},Object.defineProperty(n.prototype,"empty",{get:function(){return!this.elementRef.nativeElement.value&&!this.isBadInput()},enumerable:!0,configurable:!0}),n.prototype.onContainerClick=function(){this.focus()},n.prototype.dirtyCheckNativeValue=function(){var e=this.value;this.previousNativeValue!==e&&(this.previousNativeValue=e,this.stateChanges.next())},n.prototype.isBadInput=function(){var e=this.elementRef.nativeElement.validity;return e&&e.badInput},n.prototype.getGrowHeight=function(){var e=this.elementRef.nativeElement,t=parseInt(window.getComputedStyle(e).height.toString(),10),n=t-e.clientHeight;return Math.max(this.minHeight,+e.scrollHeight+n)},n.decorators=[{type:t.Directive,args:[{selector:"textarea[mcTextarea]",exportAs:"mcTextarea",host:{class:"mc-textarea","[class.mc-textarea-resizable]":"!canGrow","[attr.id]":"id","[attr.placeholder]":"placeholder","[attr.aria-invalid]":"errorState","[disabled]":"disabled","[required]":"required","(blur)":"focusChanged(false)","(focus)":"focusChanged(true)"},providers:[{provide:kt,useExisting:n}]}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:l.NgControl,decorators:[{type:t.Optional},{type:t.Self}]},{type:l.NgForm,decorators:[{type:t.Optional}]},{type:l.FormGroupDirective,decorators:[{type:t.Optional}]},{type:Oe},{type:void 0,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[ua]}]},{type:t.NgZone}]},n.propDecorators={canGrow:[{type:t.Input}],errorStateMatcher:[{type:t.Input}],disabled:[{type:t.Input}],id:[{type:t.Input}],placeholder:[{type:t.Input}],required:[{type:t.Input}],value:[{type:t.Input}]},n}(ga),ya=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,p.A11yModule,be,l.FormsModule],exports:[fa],declarations:[fa]}]}],e}(),ba={hours:0,minutes:1,seconds:2};ba[ba.hours]="hours",ba[ba.minutes]="minutes",ba[ba.seconds]="seconds";var va={HHmmss:"HH:mm:ss",HHmm:"HH:mm"},Ca=(ir={},ir[va.HHmmss]=" : : ",ir[va.HHmm]=" : ",ir),_a=va.HHmm,xa=new RegExp(/^([0-9]|0[0-9]|1[0-9]|2[0-3]):([0-5][0-9]|[0-9]):([0-5][0-9]|[0-9])?$/),wa=/^([0-9]|0[0-9]|1[0-9]|2[0-3]):([0-5][0-9]|[0-9])?$/,Oa=/^([0-9]|0[0-9]|1[0-9]|2[0-3]):?$/,ka=0,Ia=function(){function e(e,t,n,i){this.defaultErrorStateMatcher=e,this.parentForm=t,this.parentFormGroup=n,this.ngControl=i}return e}(),Sa=I(Ia),Da=function(e){function n(t,n,i,r,a,s,c,l){var p=e.call(this,a,i,r,n)||this;if(p.elementRef=t,p.ngControl=n,p.renderer=c,p.dateAdapter=l,p.stateChanges=new o.Subject,p.focused=!1,p.controlType="mc-timepicker",p._minTime=null,p._maxTime=null,p.uid="mc-timepicker-"+ka++,!p.dateAdapter)throw Error("McTimepicker: No provider found for DateAdapter. You must import one of the existing modules at your application root or provide a custom implementation or use exists ones.");if(p.inputValueAccessor=s||p.elementRef.nativeElement,p.previousNativeValue=p.value,p.onChange=o.noop,p.id=p.id,p.placeholder=Ca[_a],p.ngControl){p.ngControl.valueAccessor=p;var d=p.ngControl.control,u=[function(){return p.minTimeValidator()},function(){return p.maxTimeValidator()}],h=d.validator?[d.validator].concat(u):u;d.setValidators(h),d.updateValueAndValidity()}return p}return v(n,e),Object.defineProperty(n.prototype,"disabled",{get:function(){return this.ngControl&&null!==this.ngControl.disabled?this.ngControl.disabled:this._disabled},set:function(e){this._disabled=i.coerceBooleanProperty(e),this.focused&&(this.focused=!1),this.stateChanges.next()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"id",{get:function(){return this._id},set:function(e){this._id=e||this.uid},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"required",{get:function(){return this._required},set:function(e){this._required=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this.inputValueAccessor.value},set:function(e){e!==this.value&&(this.inputValueAccessor.value=e,this.applyInputChanges())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"timeFormat",{get:function(){return this._timeFormat},set:function(e){var t=this;this._timeFormat=Object.keys(va).map(function(e){return va[e]}).indexOf(e)>-1?e:_a,this.placeholder=Ca[this._timeFormat],setTimeout(function(){return t.applyInputChanges({doTimestringReformat:!0})})},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"minTime",{get:function(){return this._minTime},set:function(e){this._minTime=e,this.ngControl.control.updateValueAndValidity()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"maxTime",{get:function(){return this._maxTime},set:function(e){this._maxTime=e,this.ngControl.control.updateValueAndValidity()},enumerable:!0,configurable:!0}),n.prototype.ngOnDestroy=function(){this.stateChanges.complete()},n.prototype.ngDoCheck=function(){this.ngControl&&this.updateErrorState(),this.dirtyCheckNativeValue()},n.prototype.focus=function(){this.elementRef.nativeElement.focus()},n.prototype.focusChanged=function(e){e!==this.focused&&(this.focused=e,this.onTouched(),this.stateChanges.next())},n.prototype.onBlur=function(){this.applyInputChanges(),this.focusChanged(!1)},n.prototype.onPaste=function(e){e.preventDefault();var t=e.clipboardData.getData("text");void 0!==this.getDateFromTimeString(t)&&(this.elementRef.nativeElement.value=t,this.onInput())},n.prototype.onInput=function(){var e=this.elementRef.nativeElement.selectionStart,t=this.elementRef.nativeElement.selectionEnd,n=!1,i=this.getParsedTimeParts(this.elementRef.nativeElement.value),o=i.hoursOnly,r=i.hoursAndMinutes,a=i.hoursAndMinutesAndSeconds;o&&o[1]&&2===o[1].length?n=!0:r&&1===r[1].length&&r[2]&&2===r[2].length?n=!0:a&&2===a[1].length&&2===a[2].length&&a[3]&&2===a[3].length&&(n=!0),this.applyInputChanges({doTimestringReformat:n}),this.elementRef.nativeElement.selectionStart=e,this.elementRef.nativeElement.selectionEnd=t,n&&null===this.ngControl.errors&&this.createSelectionOfTimeComponentInInput(e+1)},Object.defineProperty(n.prototype,"empty",{get:function(){return!this.elementRef.nativeElement.value&&!this.isBadInput()},enumerable:!0,configurable:!0}),n.prototype.onContainerClick=function(){this.focus()},n.prototype.writeValue=function(e){null!==e&&(this.saveOriginalValue(e),this.renderer.setProperty(this.elementRef.nativeElement,"value",this.getTimeStringFromDate(e,this.timeFormat)),this.applyInputChanges())},n.prototype.onKeyDown=function(e){var t=this.getKeyCode(e);"ArrowUp"!==t&&"ArrowDown"!==t||this.upDownTimeByArrowKeys(e),"ArrowLeft"!==t&&"ArrowRight"!==t||this.switchSelectionBetweenTimeparts(e)},n.prototype.registerOnChange=function(e){this.onChange=e},n.prototype.registerOnTouched=function(e){this.onTouched=e},n.prototype.saveOriginalValue=function(e){this.dateAdapter.isValid(e)&&(this.originalValue=e)},n.prototype.dirtyCheckNativeValue=function(){var e=this.value;this.previousNativeValue!==e&&(this.previousNativeValue=e,this.stateChanges.next())},n.prototype.isBadInput=function(){var e=this.elementRef.nativeElement.validity;return e&&e.badInput},n.prototype.applyInputChanges=function(e){void 0===e&&(e={});var t=e.changedTime,n=e.doTimestringReformat,i=void 0===n||n,o=t||this.getDateFromTimeString(this.elementRef.nativeElement.value);if(this.currentDateTimeInput=o,i&&void 0!==o){var r=this.elementRef.nativeElement.selectionStart,a=this.elementRef.nativeElement.selectionEnd;this.renderer.setProperty(this.elementRef.nativeElement,"value",this.getTimeStringFromDate(o,this.timeFormat)),this.elementRef.nativeElement.selectionStart=r,this.elementRef.nativeElement.selectionEnd=a}this.ngControl.control.updateValueAndValidity();var s=null===this.ngControl.errors&&void 0!==o?o:null;this.onChange(s),this.stateChanges.next()},n.prototype.upDownTimeByArrowKeys=function(e){e.preventDefault();var t=this.currentDateTimeInput;if(void 0!==t){var n=this.elementRef.nativeElement.selectionStart,i=this.getTimeEditMetrics(n).modifiedTimePart,o=this.getKeyCode(e);"ArrowUp"===o&&(t=this.incrementTime(t,i)),"ArrowDown"===o&&(t=this.decrementTime(t,i)),this.applyInputChanges({changedTime:t}),this.createSelectionOfTimeComponentInInput(n)}},n.prototype.switchSelectionBetweenTimeparts=function(e){var t=this.currentDateTimeInput,n=this.getKeyCode(e);if(void 0!==t){var i=this.elementRef.nativeElement.selectionStart;"ArrowLeft"===n?i=this.getCursorPositionOfPrevTimePartStart(i,this.elementRef.nativeElement.value):"ArrowRight"===n&&(i=this.getCursorPositionOfNextTimePartStart(i,this.elementRef.nativeElement.value)),this.createSelectionOfTimeComponentInInput(i)}},n.prototype.getKeyCode=function(e){return e.code||e.key},n.prototype.createSelectionOfTimeComponentInInput=function(e){var t=this;setTimeout(function(){var n=t.getTimeEditMetrics(e);t.elementRef.nativeElement.selectionStart=n.cursorStartPosition,t.elementRef.nativeElement.selectionEnd=n.cursorEndPosition})},n.prototype.incrementTime=function(e,t){void 0===t&&(t=ba.seconds);var n=this.getTimeDigitsFromDate(e),i=n.hours,o=n.minutes,r=n.seconds;switch(t){case ba.hours:i++;break;case ba.minutes:o++;break;case ba.seconds:r++}return r>59&&(r=0),o>59&&(o=0),i>23&&(i=0),this.getDateFromTimeDigits(i,o,r)},n.prototype.decrementTime=function(e,t){void 0===t&&(t=ba.seconds);var n=this.getTimeDigitsFromDate(e),i=n.hours,o=n.minutes,r=n.seconds;switch(t){case ba.hours:i--;break;case ba.minutes:o--;break;case ba.seconds:r--}return r<0&&(r=59),o<0&&(o=59),i<0&&(i=23),this.getDateFromTimeDigits(i,o,r)},n.prototype.getCursorPositionOfPrevTimePartStart=function(e,t){return 0===e?t.length:e-1},n.prototype.getCursorPositionOfNextTimePartStart=function(e,t,n){void 0===n&&(n=":");var i=t.indexOf(n,e);return void 0!==i?i+1:0},n.prototype.getTimeEditMetrics=function(e){var t,n,i,o=this.elementRef.nativeElement.value,r=o.indexOf(":",1),a=-1!==r?o.indexOf(":",r+1):-1;return-1!==a&&e>a?(t=ba.seconds,n=a+1,i=o.length):-1!==r&&e>r?(t=ba.minutes,n=r+1,i=a>-1?a:o.length):(t=ba.hours,n=0,i=-1!==r?r:o.length),{modifiedTimePart:t,cursorStartPosition:n,cursorEndPosition:i}},n.prototype.getTimeStringFromDate=function(e,t){return void 0===t&&(t=_a),void 0===e||null===e?"":this.dateAdapter.format(e,t)},n.prototype.getParsedTimeParts=function(e){var t=this.dateAdapter.parse(e,["h:m a","h:m:s a","H:m","H:m:s"]),n=null!==t?t.format("H:m:s"):"",i=n.match(xa),o=n.match(wa);return{hoursOnly:n.match(Oa),hoursAndMinutes:o,hoursAndMinutesAndSeconds:i}},n.prototype.getDateFromTimeDigits=function(e,t,n){return void 0===n&&(n=0),this.getDateFromTimeString(e+":"+t+":"+n)},n.prototype.getDateFromTimeString=function(e){if(void 0!==e){var t=this.getParsedTimeParts(e),n=t.hoursOnly,i=t.hoursAndMinutes,o=t.hoursAndMinutesAndSeconds;if(0!==e.trim().length&&(null!==n||null!==i||null!==o)){var r=0,a=0,s=0;n?r=Number(n[1]):i?(r=Number(i[1]),a=Number(i[2])):o&&(r=Number(o[1]),a=Number(o[2]),s=Number(o[3]));var c=this.dateAdapter.createDateTime(this.dateAdapter.getYear(this.originalValue),this.dateAdapter.getMonth(this.originalValue),this.dateAdapter.getDate(this.originalValue),r,a,s,0);return this.dateAdapter.isValid(c)?c:void 0}}},n.prototype.getTimeDigitsFromDate=function(e){return{hours:this.dateAdapter.getHours(e),minutes:this.dateAdapter.getMinutes(e),seconds:this.dateAdapter.getSeconds(e)}},n.prototype.minTimeValidator=function(){return this.minTime&&void 0!==this.currentDateTimeInput&&this.isTimeLowerThenMin(this.currentDateTimeInput)?{mcTimepickerLowerThenMintime:{text:this.elementRef.nativeElement.value}}:null},n.prototype.maxTimeValidator=function(){return this.maxTime&&void 0!==this.currentDateTimeInput&&this.isTimeGreaterThenMax(this.currentDateTimeInput)?{mcTimepickerHigherThenMaxtime:{text:this.elementRef.nativeElement.value}}:null},n.prototype.isTimeLowerThenMin=function(e){return void 0!==e&&null!==e&&null!==this.minTime&&this.dateAdapter.compareDateTime(e,this.getDateFromTimeString(this.minTime))<0},n.prototype.isTimeGreaterThenMax=function(e){return void 0!==e&&null!==e&&null!==this.maxTime&&this.dateAdapter.compareDateTime(e,this.getDateFromTimeString(this.maxTime))>=0},n.decorators=[{type:t.Directive,args:[{selector:"input[mcTimepicker]",exportAs:"mcTimepickerInput",host:{class:"mc-timepicker mc-input","[attr.id]":"id","[attr.placeholder]":"placeholder","[disabled]":"disabled","[required]":"required","[attr.time-format]":"timeFormat","[attr.min-time]":"minTime","[attr.max-time]":"maxTime","[attr.value]":"value","[attr.aria-invalid]":"errorState","(blur)":"onBlur()","(focus)":"focusChanged(true)","(input)":"onInput()","(paste)":"onPaste($event)","(keydown)":"onKeyDown($event)"},providers:[{provide:kt,useExisting:t.forwardRef(function(){return n})}]}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{
19
+ type:l.NgControl,decorators:[{type:t.Optional},{type:t.Self}]},{type:l.NgForm,decorators:[{type:t.Optional}]},{type:l.FormGroupDirective,decorators:[{type:t.Optional}]},{type:Oe},{type:void 0,decorators:[{type:t.Optional},{type:t.Self},{type:t.Inject,args:[_n]}]},{type:t.Renderer2},{type:f.DateAdapter,decorators:[{type:t.Optional}]}]},n.propDecorators={errorStateMatcher:[{type:t.Input}],placeholder:[{type:t.Input}],disabled:[{type:t.Input}],id:[{type:t.Input}],required:[{type:t.Input}],value:[{type:t.Input}],timeFormat:[{type:t.Input,args:["time-format"]}],minTime:[{type:t.Input,args:["min-time"]}],maxTime:[{type:t.Input,args:["max-time"]}]},n}(Sa),Ea=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,p.A11yModule,h.PlatformModule,l.FormsModule],declarations:[Da],exports:[Da]}]}],e}(),Pa={Opened:"opened",Closed:"closed"},Ma={sidebarState:s.trigger("state",[s.state("opened",s.style({minWidth:"{{ openedStateMinWidth }}",width:"{{ openedStateWidth }}",maxWidth:"{{ openedStateMaxWidth }}"}),{params:{openedStateMinWidth:"",openedStateWidth:"",openedStateMaxWidth:""}}),s.state("closed",s.style({minWidth:"{{ closedStateWidth }}",width:"{{ closedStateWidth }}",maxWidth:"{{ closedStateWidth }}"}),{params:{closedStateWidth:""}}),s.transition("opened => closed",[s.animate("0.1s")]),s.transition("closed => opened",[s.animate("0.2s")])])},Ta={Left:"left",Right:"right"},Aa=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"[mc-sidebar-opened]",exportAs:"mcSidebarOpened"}]}],e.propDecorators={minWidth:[{type:t.Input}],width:[{type:t.Input}],maxWidth:[{type:t.Input}]},e}(),Ra=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"[mc-sidebar-closed]",exportAs:"mcSidebarClosed"}]}],e.propDecorators={width:[{type:t.Input}]},e}(),Va=function(){function e(e,n){this.ngZone=e,this.elementRef=n,this._opened=!0,this.params={openedStateWidth:"inherit",openedStateMinWidth:"inherit",openedStateMaxWidth:"inherit",closedStateWidth:"32px"},this.stateChanged=new t.EventEmitter,this.internalState=!0}return Object.defineProperty(e.prototype,"opened",{get:function(){return this._opened},set:function(e){this._opened&&this.saveWidth(),this._opened=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"animationState",{get:function(){return this._opened?Pa.Opened:Pa.Closed},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.position!==Ta.Left&&this.position!==Ta.Right||this.registerKeydownListener()},e.prototype.ngOnDestroy=function(){this.position!==Ta.Left&&this.position!==Ta.Right||this.unRegisterKeydownListener()},e.prototype.toggle=function(){this.opened=!this.opened},e.prototype.onAnimationStart=function(){this._opened&&(this.internalState=this._opened)},e.prototype.onAnimationDone=function(){this.internalState=this._opened,this.stateChanged.emit(this._opened)},e.prototype.ngAfterContentInit=function(){this.params={openedStateWidth:this.openedContent.width||"inherit",openedStateMinWidth:this.openedContent.minWidth||"inherit",openedStateMaxWidth:this.openedContent.maxWidth||"inherit",closedStateWidth:this.closedContent.width||"32px"}},e.prototype.registerKeydownListener=function(){var e=this;this.documentKeydownListener=function(t){a.isControl(t)||a.isInput(t)||(e.position===Ta.Left&&a.isLeftBracket(t)||e.position===Ta.Right&&a.isRightBracket(t))&&e.ngZone.run(function(){return e._opened=!e._opened})},this.ngZone.runOutsideAngular(function(){document.addEventListener("keypress",e.documentKeydownListener,!0)})},e.prototype.unRegisterKeydownListener=function(){document.removeEventListener("keypress",this.documentKeydownListener,!0)},e.prototype.saveWidth=function(){this.params.openedStateWidth=this.elementRef.nativeElement.offsetWidth+"px"},e.decorators=[{type:t.Component,args:[{selector:"mc-sidebar",exportAs:"mcSidebar",template:'<ng-container [ngSwitch]="internalState"><ng-container *ngSwitchCase="true"><ng-content select="[mc-sidebar-opened]"></ng-content></ng-container><ng-container *ngSwitchCase="false"><ng-content select="[mc-sidebar-closed]"></ng-content></ng-container></ng-container>',styles:[".mc-sidebar{display:inline-block;height:100%;overflow:hidden}.mc-sidebar-closed,.mc-sidebar-opened{height:100%}"],host:{class:"mc-sidebar","[@state]":"{\n value: animationState,\n params: params\n }","(@state.start)":"onAnimationStart()","(@state.done)":"onAnimationDone()"},animations:[Ma.sidebarState],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:t.NgZone},{type:t.ElementRef}]},e.propDecorators={opened:[{type:t.Input}],position:[{type:t.Input}],stateChanged:[{type:t.Output}],openedContent:[{type:t.ContentChild,args:[Aa,{static:!1}]}],closedContent:[{type:t.ContentChild,args:[Ra,{static:!1}]}]},e}(),Fa=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule],declarations:[Ra,Aa,Va],exports:[Ra,Aa,Va]}]}],e}(),La=new t.InjectionToken("McSidepanelData"),Na={Right:"right",Left:"left",Top:"top",Bottom:"bottom"},ja=function(){function e(){this.data=null,this.position=Na.Right,this.hasBackdrop=!0,this.requiredBackdrop=!1,this.disableClose=!1,this.overlayPanelClass=""}return e}(),Ba={Void:"void",Visible:"visible",Hidden:"hidden"},za={right:{in:"translateX(100%)",out:"translateX(0%)"},left:{in:"translateX(-100%)",out:"translateX(0%)"},top:{in:"translateY(-100%)",out:"translateY(0%)"},bottom:{in:"translateY(100%)",out:"translateY(0%)"}},Wa={sidepanelState:s.trigger("state",[s.state("hidden",s.style({transform:"{{transformIn}}"}),{params:{transformIn:za[Na.Right].in}}),s.state("visible",s.style({transform:"{{transformOut}}"}),{params:{transformOut:za[Na.Right].out}}),s.transition("visible => void, visible => hidden",s.animate("200ms "+Be.AccelerationCurve)),s.transition("void => visible",s.animate("200ms "+Be.DecelerationCurve))])},Ya=new t.InjectionToken("mc-sidepanel-with-indent"),Ha=new t.InjectionToken("mc-sidepanel-with-shadow"),Ka=function(e){function n(n,i,o,r,a){var s=e.call(this)||this;return s.elementRef=n,s.changeDetectorRef=i,s.sidepanelConfig=o,s.withIndent=r,s.withShadow=a,s.animationState=Ba.Void,s.animationStateChanged=new t.EventEmitter,s}return v(n,e),n.prototype.ngOnDestroy=function(){this.destroyed=!0},n.prototype.attachComponentPortal=function(e){return this.validatePortalAttached(),this.setAnimation(),this.setPanelClass(),this.portalOutlet.attachComponentPortal(e)},n.prototype.attachTemplatePortal=function(e){return this.validatePortalAttached(),this.setAnimation(),this.setPanelClass(),this.portalOutlet.attachTemplatePortal(e)},n.prototype.enter=function(){this.destroyed||(this.animationState=Ba.Visible,this.changeDetectorRef.detectChanges())},n.prototype.exit=function(){this.destroyed||(this.animationState=Ba.Hidden,this.changeDetectorRef.markForCheck())},n.prototype.onAnimation=function(e){this.animationStateChanged.emit(e)},n.prototype.setAnimation=function(){var e=this.sidepanelConfig.position;this.animationTransform={transformIn:za[e].in,transformOut:za[e].out}},n.prototype.setPanelClass=function(){var e=this.elementRef.nativeElement,t=this.sidepanelConfig.position;e.classList.add("mc-sidepanel-container_"+t),this.withShadow&&e.classList.add("mc-sidepanel-container_shadowed")},n.prototype.validatePortalAttached=function(){if(this.portalOutlet.hasAttached())throw Error("Attempting to attach sidepanel content after content is already attached")},n.decorators=[{type:t.Component,args:[{selector:"mc-sidepanel-container",template:'<div class="mc-sidepanel-wrapper"><div class="mc-sidepanel-indent" *ngIf="withIndent"><button mcSidepanelClose></button></div><div class="mc-sidepanel-content"><ng-template cdkPortalOutlet></ng-template></div></div>',styles:[".mc-no-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mc-sidepanel-container{outline:0;display:flex;flex:1;position:fixed;min-height:0}.mc-sidepanel-container .flex{min-height:0}.mc-sidepanel-container_left,.mc-sidepanel-container_right{width:33%;min-width:400px;height:100%;top:0}.mc-sidepanel-container_left .mc-sidepanel-indent,.mc-sidepanel-container_right .mc-sidepanel-indent{width:16px;height:100%}.mc-sidepanel-container_right{right:0;transform:translateX(100%)}.mc-sidepanel-container_right .mc-sidepanel-wrapper{flex-direction:row}.mc-sidepanel-container_left{left:0;transform:translateX(-100%)}.mc-sidepanel-container_left .mc-sidepanel-wrapper{flex-direction:row-reverse}.mc-sidepanel-container_bottom,.mc-sidepanel-container_top{flex-direction:column;height:33%;min-height:400px;width:100%;left:0}.mc-sidepanel-container_bottom .mc-sidepanel-indent,.mc-sidepanel-container_top .mc-sidepanel-indent{height:16px;width:100%}.mc-sidepanel-container_top{top:0;transform:translateY(-100%)}.mc-sidepanel-container_top .mc-sidepanel-wrapper{flex-direction:column-reverse}.mc-sidepanel-container_bottom{bottom:0;transform:translateY(100%)}.mc-sidepanel-container_bottom .mc-sidepanel-wrapper{flex-direction:column}.mc-sidepanel-wrapper{display:flex;flex:1;min-height:0;width:100%}.mc-sidepanel-indent{display:flex;flex:0 0 auto}.mc-sidepanel-indent .mc-sidepanel-close{width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;background:0 0;padding:0}.mc-sidepanel-content{display:flex;flex-direction:column;flex:1;min-height:0;width:100%}.mc-sidepanel-header{padding:14px 16px;display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:center;flex:0 0 auto}.mc-sidepanel-header .mc-sidepanel-close{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;background:0 0;padding:0 0 0 8px}.mc-sidepanel-title{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mc-sidepanel-body{overflow-y:auto;display:flex;flex:1;flex-direction:column;min-height:0}.mc-sidepanel-footer{padding:16px;display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:center;flex:0 0 auto}.mc-sidepanel-footer .mc-sidepanel-actions{display:flex;align-items:center;flex-direction:row;flex:1}.mc-sidepanel-footer .mc-sidepanel-actions[align=left]{justify-content:start}.mc-sidepanel-footer .mc-sidepanel-actions[align=right]{justify-content:flex-end}.mc-sidepanel-footer button+button{margin-left:16px}"],changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,animations:[Wa.sidepanelState],host:{class:"mc-sidepanel-container",tabindex:"-1",role:"dialog","aria-modal":"true","[attr.id]":"id","[@state]":"{\n value: animationState,\n params: animationTransform\n }","(@state.start)":"onAnimation($event)","(@state.done)":"onAnimation($event)"}}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:ja},{type:Boolean,decorators:[{type:t.Inject,args:[Ya]}]},{type:Boolean,decorators:[{type:t.Inject,args:[Ha]}]}]},n.propDecorators={portalOutlet:[{type:t.ViewChild,args:[d.CdkPortalOutlet,{static:!0}]}]},n}(d.BasePortalOutlet),Ua=0,Ga=function(){function e(e,t,n){var i=this;this.containerInstance=e,this.overlayRef=t,this.config=n,this.afterClosed$=new o.Subject,this.afterOpened$=new o.Subject,this.id=this.config.id||"mc-sidepanel-"+Ua++,this.containerInstance.id=this.id,e.animationStateChanged.pipe(m.filter(function(e){return"done"===e.phaseName&&e.toState===Ba.Visible}),m.take(1)).subscribe(function(){i.afterOpened$.next(),i.afterOpened$.complete()}),e.animationStateChanged.pipe(m.filter(function(e){return"done"===e.phaseName&&e.toState===Ba.Hidden}),m.take(1)).subscribe(function(){t.dispose(),i.afterClosed$.next(i.result),i.afterClosed$.complete()}),e.sidepanelConfig.disableClose||o.merge(t.backdropClick(),t.keydownEvents().pipe(m.filter(function(e){return e.keyCode===a.ESCAPE}))).subscribe(function(){return i.close()})}return e.prototype.close=function(e){var t=this;this.afterClosed$.closed||(this.containerInstance.animationStateChanged.pipe(m.filter(function(e){return"done"===e.phaseName}),m.take(1)).subscribe(function(){return t.overlayRef.detachBackdrop()}),this.result=e,this.containerInstance.exit())},e.prototype.afterClosed=function(){return this.afterClosed$.asObservable()},e.prototype.afterOpened=function(){return this.afterOpened$.asObservable()},e}(),Xa=new t.InjectionToken("mc-sidepanel-default-options"),qa=function(){function e(e,t,n,i){this.overlay=e,this.injector=t,this.defaultOptions=n,this.parentSidepanelService=i,this.openedSidepanelsAtThisLevel=[]}return Object.defineProperty(e.prototype,"openedSidepanels",{get:function(){return this.parentSidepanelService?this.parentSidepanelService.openedSidepanels:this.openedSidepanelsAtThisLevel},enumerable:!0,configurable:!0}),e.prototype.ngOnDestroy=function(){this.closeSidepanels(this.openedSidepanelsAtThisLevel)},e.prototype.open=function(e,n){var i=this,o=fe({},this.defaultOptions||new ja,n);if(o.id&&this.getSidepanelById(o.id))throw Error('Sidepanel with id "'+o.id+'" exists already. The sidepanel id must be unique.');var r=this.createOverlay(o),a=this.attachContainer(r,o),s=new Ga(a,r,o);if(e instanceof t.TemplateRef)a.attachTemplatePortal(new d.TemplatePortal(e,null,{$implicit:o.data,sidepanelRef:s}));else{var c=this.createInjector(o,s,a),l=new d.ComponentPortal(e,void 0,c),p=a.attachComponentPortal(l);s.instance=p.instance}return this.openedSidepanels.push(s),s.afterClosed().subscribe(function(){return i.removeOpenSidepanel(s)}),a.enter(),s},e.prototype.closeAll=function(){this.closeSidepanels(this.openedSidepanels)},e.prototype.getSidepanelById=function(e){return this.openedSidepanels.find(function(t){return t.id===e})},e.prototype.attachContainer=function(e,t){var n=this.getOpenedSidepanelsWithSamePosition(t),i=new d.PortalInjector(this.injector,new WeakMap([[ja,t],[Ya,n.length>=1],[Ha,n.length<2]])),o=new d.ComponentPortal(Ka,void 0,i);return e.attach(o).instance},e.prototype.createInjector=function(e,t,n){var i=new WeakMap([[Ka,n],[La,e.data],[Ga,t]]);return new d.PortalInjector(this.injector,i)},e.prototype.createOverlay=function(e){var t=new c.OverlayConfig({hasBackdrop:e.hasBackdrop,backdropClass:this.getBackdropClass(e),maxWidth:"100%",panelClass:e.overlayPanelClass,scrollStrategy:this.overlay.scrollStrategies.block(),positionStrategy:this.overlay.position().global()});return this.overlay.create(t)},e.prototype.closeSidepanels=function(e){e.reverse().slice().forEach(function(e){e.close()})},e.prototype.getBackdropClass=function(e){var t=this.openedSidepanels.some(function(e){return e.config.hasBackdrop});return e.requiredBackdrop||!t?"cdk-overlay-dark-backdrop":"cdk-overlay-transparent-backdrop"},e.prototype.getOpenedSidepanelsWithSamePosition=function(e){return this.openedSidepanels.filter(function(t){return t.config.position===e.position})},e.prototype.removeOpenSidepanel=function(e){var t=this.openedSidepanels.indexOf(e);t>-1&&this.openedSidepanels.splice(t,1)},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:c.Overlay},{type:t.Injector},{type:ja,decorators:[{type:t.Optional},{type:t.Inject,args:[Xa]}]},{type:e,decorators:[{type:t.Optional},{type:t.SkipSelf}]}]},e}(),$a=function(){function e(e,t,n){this.sidepanelRef=e,this.elementRef=t,this.sidepanelService=n}return e.prototype.ngOnInit=function(){var e=this;this.sidepanelRef||setTimeout(function(){e.sidepanelRef=de(e.elementRef,e.sidepanelService.openedSidepanels)})},e.prototype.ngOnChanges=function(e){var t=e.mcSidepanelClose||e.sidepanelResult;t&&(this.sidepanelResult=t.currentValue)},e.decorators=[{type:t.Directive,args:[{selector:"button[mc-sidepanel-close], button[mcSidepanelClose]",host:{"(click)":"sidepanelRef.close(sidepanelResult)",class:"mc-sidepanel-close",type:"button"}}]}],e.ctorParameters=function(){return[{type:Ga,decorators:[{type:t.Optional}]},{type:t.ElementRef},{type:qa}]},e.propDecorators={sidepanelResult:[{type:t.Input,args:["mc-sidepanel-close"]}],mcSidepanelClose:[{type:t.Input,args:["mcSidepanelClose"]}]},e}(),Za=function(){function e(){}return e.decorators=[{type:t.Component,args:[{selector:"mc-sidepanel-header",template:'\n <div class="mc-sidepanel-title">\n <ng-content></ng-content>\n </div>\n <button *ngIf="closeable" mc-sidepanel-close>\n <span class="mc-sidepanel-close-x">\n <i mc-icon="mc-close-L_16" class="mc-icon mc-icon_light" color="second"></i>\n </span>\n </button>\n ',host:{class:"mc-sidepanel-header"}}]}],e.propDecorators={closeable:[{type:t.Input}]},e}(),Qa=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-sidepanel-body, [mc-sidepanel-body], mcSidepanelBody",host:{class:"mc-sidepanel-body"}}]}],e}(),Ja=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-sidepanel-footer, [mc-sidepanel-footer], mcSidepanelFooter",host:{class:"mc-sidepanel-footer"}}]}],e}(),es=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-sidepanel-actions, [mc-sidepanel-actions], mcSidepanelActions",host:{class:"mc-sidepanel-actions"}}]}],e}(),ts=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,c.OverlayModule,d.PortalModule,be,wt],providers:[qa],declarations:[Ka,$a,Za,Qa,Ja,es],entryComponents:[Ka],exports:[Ka,$a,Za,Qa,Ja,es]}]}],e}(),ns={Horizontal:"horizontal",Vertical:"vertical"},is=function(){function e(e,t){this.elementRef=e,this.renderer=t,this._direction=ns.Vertical,this._order=0,this._size=6,this.dragged=!1}return Object.defineProperty(e.prototype,"direction",{get:function(){return this._direction},set:function(e){this._direction=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"order",{get:function(){return this._order},set:function(e){this._order=i.coerceNumberProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this._size},set:function(e){this._size=i.coerceNumberProperty(e)},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.setStyle("flex-basis",i.coerceCssPixelValue(this.size)),this.setStyle(this.isVertical()?"height":"width",i.coerceCssPixelValue(this.size)),this.setStyle("order",this.order),this.isVertical()||this.setStyle("height","100%"),this.setStyle("flex-direction",this.isVertical()?"row":"column")},e.prototype.isVertical=function(){return this.direction===ns.Vertical},e.prototype.setStyle=function(e,t){this.renderer.setStyle(this.elementRef.nativeElement,e,t)},e.decorators=[{type:t.Directive,args:[{selector:"mc-gutter",host:{class:"mc-gutter","[class.mc-gutter_vertical]":"isVertical()","[class.mc-gutter_dragged]":"dragged","(mousedown)":"dragged = true"}}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2}]},e.propDecorators={direction:[{type:t.Input}],order:[{type:t.Input}],size:[{type:t.Input}]},e}(),os=function(){function e(e,t,n,i){this.elementRef=e,this.changeDetectorRef=t,this.ngZone=n,this.renderer=i,this.areas=[],this.isDragging=!1,this.areaPositionDivider=2,this.listeners=[],this._hideGutters=!1,this._disabled=!1,this._gutterSize=6}return Object.defineProperty(e.prototype,"hideGutters",{get:function(){return this._hideGutters},set:function(e){this._hideGutters=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"direction",{get:function(){return this._direction},set:function(e){this._direction=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(e){this._disabled=i.coerceBooleanProperty(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gutterSize",{get:function(){return this._gutterSize},set:function(e){var t=i.coerceNumberProperty(e);this._gutterSize=t>0?t:this.gutterSize},enumerable:!0,configurable:!0}),e.prototype.addArea=function(e){var t=this.areas.length,n=t*this.areaPositionDivider,i=e.getSize();e.setOrder(n),this.areas.push({area:e,index:t,order:n,initialSize:i})},e.prototype.ngOnInit=function(){this.direction||(this.direction=ns.Horizontal),this.setStyle("flex-direction",this.isVertical()?"column":"row")},e.prototype.onMouseDown=function(e,t,n){var i=this;if(!this.disabled){e.preventDefault();var o=this.areas[t],r=this.areas[n],a={x:e.screenX,y:e.screenY};o.initialSize=o.area.getSize(),r.initialSize=r.area.getSize(),this.areas.forEach(function(e){var t=e.area.getSize();e.area.disableFlex(),e.area.setSize(t)}),this.ngZone.runOutsideAngular(function(){i.listeners.push(i.renderer.listen("document","mouseup",function(){return i.onMouseUp()}))}),this.ngZone.runOutsideAngular(function(){i.listeners.push(i.renderer.listen("document","mousemove",function(e){return i.onMouseMove(e,a,o,r)}))}),this.isDragging=!0}},e.prototype.removeArea=function(e){var t=-1;this.areas.some(function(n,i){return n.area===e&&(t=i,!0)}),-1!==t&&this.areas.splice(t,1)},e.prototype.isVertical=function(){return this.direction===ns.Vertical},e.prototype.updateGutter=function(){var e=this;this.gutters.forEach(function(t){t.dragged&&(t.dragged=!1,e.changeDetectorRef.detectChanges())})},e.prototype.onMouseMove=function(e,t,n,i){if(this.isDragging&&!this.disabled){var o={x:e.screenX,y:e.screenY},r=this.isVertical()?t.y-o.y:t.x-o.x,a=n.initialSize-r,s=i.initialSize+r,c=n.area.getMinSize(),l=i.area.getMinSize();a<=c||s<=l||(a<=0?(n.area.setSize(0),i.area.setSize(i.initialSize+n.initialSize)):s<=0?(n.area.setSize(i.initialSize+n.initialSize),i.area.setSize(0)):(n.area.setSize(a),i.area.setSize(s)))}},e.prototype.onMouseUp=function(){for(;this.listeners.length>0;){var e=this.listeners.pop();e&&e()}this.isDragging=!1,this.updateGutter()},e.prototype.setStyle=function(e,t){this.renderer.setStyle(this.elementRef.nativeElement,e,t)},e.decorators=[{type:t.Component,args:[{selector:"mc-splitter",exportAs:"mcSplitter",host:{class:"mc-splitter"},preserveWhitespaces:!1,styles:[".mc-splitter{display:flex;flex-wrap:nowrap;align-items:stretch;overflow:hidden}.mc-splitter .mc-splitter-area{overflow:hidden}.mc-gutter{display:flex;flex-grow:0;flex-shrink:0;justify-content:center;align-items:center;overflow:hidden}.mc-gutter.mc-gutter_vertical>.mc-icon{transform:rotate(90deg)}"],template:'<ng-content></ng-content><ng-template ngFor let-area [ngForOf]="areas" let-index="index" let-last="last"><mc-gutter *ngIf="last === false" [direction]="direction" [attr.disabled]="disabled || null" [style.display]="hideGutters ? \'none\' : \'flex\'" [size]="gutterSize" [order]="index * 2 + 1" (mousedown)="onMouseDown($event, index, index + 1)"></mc-gutter></ng-template>',encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.ChangeDetectorRef},{type:t.NgZone},{type:t.Renderer2}]},e.propDecorators={gutters:[{type:t.ViewChildren,args:[is]}],hideGutters:[{type:t.Input}],direction:[{type:t.Input}],disabled:[{type:t.Input}],gutterSize:[{type:t.Input}]},e}(),rs=function(){function e(e,t,n){this.elementRef=e,this.renderer=t,this.splitter=n}return e.prototype.disableFlex=function(){this.renderer.removeStyle(this.elementRef.nativeElement,"flex")},e.prototype.ngOnInit=function(){this.splitter.addArea(this),this.removeStyle("max-width"),this.splitter.direction===ns.Vertical?(this.setStyle("width","100%"),this.removeStyle("height")):(this.setStyle("height","100%"),this.removeStyle("width"))},e.prototype.ngOnDestroy=function(){this.splitter.removeArea(this)},e.prototype.setOrder=function(e){this.setStyle("order",e)},e.prototype.setSize=function(e){if(e){var t=i.coerceNumberProperty(e);this.setStyle(this.getSizeProperty(),i.coerceCssPixelValue(t))}},e.prototype.getSize=function(){return this.elementRef.nativeElement[this.getOffsetSizeProperty()]},e.prototype.getMinSize=function(){var e=getComputedStyle(this.elementRef.nativeElement);return parseFloat(e[this.getMinSizeProperty()])},e.prototype.isVertical=function(){return this.splitter.direction===ns.Vertical},e.prototype.getMinSizeProperty=function(){return this.isVertical()?"min-height":"minWidth"},e.prototype.getOffsetSizeProperty=function(){return this.isVertical()?"offsetHeight":"offsetWidth"},e.prototype.getSizeProperty=function(){return this.isVertical()?"height":"width"},e.prototype.setStyle=function(e,t){this.renderer.setStyle(this.elementRef.nativeElement,e,t)},e.prototype.removeStyle=function(e){this.renderer.removeStyle(this.elementRef.nativeElement,e)},e.decorators=[{type:t.Directive,args:[{selector:"[mc-splitter-area]",host:{class:"mc-splitter-area"}}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:t.Renderer2},{type:os}]},e}(),as=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,wt],exports:[is,rs,os],declarations:[is,rs,os]}]}],e}(),ss=0,cs=function(){function e(e){this._elementRef=e}return e}(),ls=k(O(w(cs),ve.Primary)),ps=function(){function e(){}return e}(),ds=function(e){function n(n,i,o,r){var a=e.call(this,n)||this;return a._elementRef=n,a._focusMonitor=i,a._changeDetectorRef=o,a.labelPosition="right",a.ariaLabel="",a.ariaLabelledby=null,a.name=null,a._disabled=!1,a._checked=!1,a.change=new t.EventEmitter,a.uniqueId="mc-toggle-"+ ++ss,a.onTouchedCallback=function(){},a.onChangeCallback=function(e){},a.id=a.uniqueId,a.tabIndex=parseInt(r)||0,a._focusMonitor.monitor(a._elementRef.nativeElement,!0),a}return v(n,e),Object.defineProperty(n.prototype,"inputId",{get:function(){return(this.id||this.uniqueId)+"-input"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"disabled",{get:function(){return this._disabled},set:function(e){e!==this._disabled&&(this._disabled=e,this._changeDetectorRef.markForCheck())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"checked",{get:function(){return this._checked},set:function(e){e!==this._checked&&(this._checked=e,this._changeDetectorRef.markForCheck())},enumerable:!0,configurable:!0}),n.prototype.ngOnDestroy=function(){this._focusMonitor.stopMonitoring(this._elementRef.nativeElement)},n.prototype.focus=function(){this._focusMonitor.focusVia(this.inputElement.nativeElement,"keyboard")},n.prototype.getAriaChecked=function(){return this.checked},n.prototype.onChangeEvent=function(e){e.stopPropagation(),this.updateModelValue(),this.emitChangeEvent()},n.prototype.onLabelTextChange=function(){this._changeDetectorRef.markForCheck()},n.prototype.onInputClick=function(e){e.stopPropagation()},n.prototype.writeValue=function(e){this.checked=!!e},n.prototype.registerOnChange=function(e){this.onChangeCallback=e},n.prototype.registerOnTouched=function(e){this.onTouchedCallback=e},n.prototype.setDisabledState=function(e){this.disabled=e},n.prototype.updateModelValue=function(){this._checked=!this.checked,this.onTouchedCallback()},n.prototype.emitChangeEvent=function(){var e=new ps;e.source=this,e.checked=this.checked,this.onChangeCallback(this.checked),this.change.emit(e)},n.decorators=[{type:t.Component,args:[{selector:"mc-toggle",exportAs:"mcToggle",template:'<label [attr.for]="inputId" class="mc-toggle-layout"><div class="mc-toggle__container" [class.left]="labelPosition === \'left\'"><input #input type="checkbox" role="switch" class="mc-toggle-input cdk-visually-hidden" [id]="inputId" [checked]="checked" [attr.value]="value" [disabled]="disabled" [attr.name]="name" [tabIndex]="tabIndex" [attr.aria-label]="ariaLabel || null" [attr.aria-labelledby]="ariaLabelledby" [attr.aria-checked]="getAriaChecked()" (click)="onInputClick($event)" (change)="onChangeEvent($event)"><div class="mc-toggle-bar-container"><div class="mc-toggle__focus-frame"></div><div class="mc-toggle-bar"><div class="mc-toggle__circle" [@switch]="checked"></div></div></div><div class="mc-toggle__content" [class.left]="labelPosition === \'left\'" [class.right]="labelPosition === \'right\'"><span class="mc-toggle-label" (cdkObserveContent)="onLabelTextChange()"><ng-content></ng-content></span></div></div></label>',styles:[".mc-toggle{display:inline-block}.mc-toggle .mc-toggle-layout{cursor:inherit;align-items:baseline;vertical-align:middle;display:inline-flex;white-space:nowrap}.mc-toggle .mc-toggle-bar{position:relative;border-width:1px;border-style:solid}.mc-toggle .mc-toggle-bar.mc-toggle-label-position-left{order:1}.mc-toggle .mc-toggle-bar-container{position:relative}.mc-toggle__container{display:flex;align-items:center;position:relative}.mc-toggle__container.left{flex-direction:row-reverse}.mc-toggle__content.left{margin-right:8px}.mc-toggle__content.right{margin-left:8px}.mc-toggle__circle{position:absolute;border-width:1px;border-style:solid;border-radius:100%;margin-top:-1px;margin-left:-1px;transform:translateX(-1px)}.mc-toggle__focus-frame{position:absolute;top:0;left:0;z-index:1}.mc-toggle:not(.mc-toggle_small) .mc-toggle-bar{height:16px;width:28px;border-radius:9px}.mc-toggle:not(.mc-toggle_small) .mc-toggle__focus-frame{border-radius:9px;height:16px;width:28px}.mc-toggle:not(.mc-toggle_small) .mc-toggle__circle{height:16px;width:16px}.mc-toggle.mc-toggle_small .mc-toggle-bar{height:14px;width:24px;border-radius:8px}.mc-toggle.mc-toggle_small .mc-toggle__focus-frame{border-radius:8px;height:14px;width:24px}.mc-toggle.mc-toggle_small .mc-toggle__circle{height:14px;width:14px}.mc-toggle:not(.mc-disabled){cursor:pointer}"],providers:[{provide:l.NG_VALUE_ACCESSOR,useExisting:t.forwardRef(function(){return n}),multi:!0}],changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None,inputs:["disabled","color","tabIndex"],host:{class:"mc-toggle","[id]":"id","[attr.id]":"id","[class.mc-disabled]":"disabled","[class.mc-toggle_off]":"!checked"},animations:[s.trigger("switch",[s.state("true",s.style({left:"50%"})),s.state("false",s.style({left:"1px"})),s.transition("true <=> false",s.animate("150ms"))])]}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:p.FocusMonitor},{type:t.ChangeDetectorRef},{type:String,decorators:[{type:t.Attribute,args:["tabindex"]}]}]},n.propDecorators={inputElement:[{type:t.ViewChild,args:["input",{static:!1}]}],labelPosition:[{type:t.Input}],ariaLabel:[{type:t.Input,args:["aria-label"]}],ariaLabelledby:[{type:t.Input,args:["aria-labelledby"]}],id:[{type:t.Input}],name:[{type:t.Input}],value:[{type:t.Input}],disabled:[{type:t.Input}],checked:[{type:t.Input}],change:[{type:t.Output}]},n}(ls),us=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,p.A11yModule,be],exports:[ds],declarations:[ds]}]}],e}(),hs=function(){function e(e){this.cdr=e,this.prefix="mc-tooltip_placement",this.positions=We.slice(),this.classMap={},this.mcVisibleChange=new t.EventEmitter,this.mcMouseEnterDelay=400,this.mcMouseLeaveDelay=0,this._mcTrigger="hover",this._mcPlacement="top",this._mcVisible=new o.BehaviorSubject(!1),this.onHideSubject=new o.Subject,this.closeOnInteraction=!1,this.availablePositions=ze,this.$visible=this._mcVisible.asObservable()}return Object.defineProperty(e.prototype,"mcTitle",{get:function(){return this._mcTitle},set:function(e){this.isTitleString=!(e instanceof t.TemplateRef),this.isTitleString&&(this._mcTitle=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcTrigger",{get:function(){return this._mcTrigger},set:function(e){this._mcTrigger=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcPlacement",{get:function(){return this._mcPlacement},set:function(e){e!==this._mcPlacement?(this._mcPlacement=e,this.positions.unshift(ze[this.mcPlacement])):e||(this._mcPlacement="top")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcVisible",{get:function(){return this._mcVisible.value},set:function(e){var t=i.coerceBooleanProperty(e);t&&this._mcVisible.value!==t?this.show():this.hide()},
20
+ enumerable:!0,configurable:!0}),e.prototype.show=function(){var e=this;this.hideTid&&clearTimeout(this.hideTid),this.isContentEmpty()||("manual"!==this.mcTrigger&&(this.closeOnInteraction=!0),this.showTid=setTimeout(function(){e._mcVisible.next(!0),e.mcVisibleChange.emit(!0),e.markForCheck()},this.mcMouseEnterDelay))},e.prototype.hide=function(){var e=this;this.showTid&&clearTimeout(this.showTid),this.hideTid=setTimeout(function(){e._mcVisible.next(!1),e.mcVisibleChange.emit(!1),e.onHideSubject.next(),e.markForCheck()},this.mcMouseLeaveDelay)},e.prototype.setClassMap=function(){this.classMap=this.prefix+"-"+this.mcPlacement},e.prototype.isContentEmpty=function(){return!!this.isTitleString&&(""===this.mcTitle||!this.mcTitle)},e.prototype.afterHidden=function(){return this.onHideSubject.asObservable()},e.prototype.markForCheck=function(){this.cdr.markForCheck()},e.prototype.handleBodyInteraction=function(){this.closeOnInteraction&&this.hide()},e.decorators=[{type:t.Component,args:[{selector:"mc-tooltip-component",inputs:["mcMouseEnterDelay","mcMouseLeaveDelay","mcTitle","mcVisible","mcTrigger","mcPlacement"],outputs:["mcVisibleChange"],animations:[je],template:'<div class="mc-tooltip" [ngClass]="classMap" [@fadeAnimation]="\'\'+($visible | async)"><div class="mc-tooltip-content"><div class="mc-tooltip-arrow"></div><div class="mc-tooltip-inner"><ng-container>{{ mcTitle }}</ng-container></div></div></div>',preserveWhitespaces:!1,styles:["@keyframes mc-progress{from{background-position:0 0}to{background-position:29px 0}}.mc-progress{position:relative}.mc-progress:after{content:'';position:absolute;border-radius:inherit;top:0;right:0;bottom:0;left:0;background:linear-gradient(135deg,rgba(0,0,0,.05) 10px,transparent 10px,transparent 20px,rgba(0,0,0,.05) 20px,rgba(0,0,0,.05) 30px,transparent 30px) repeat;background-size:29px 29px;animation:mc-progress 1s linear infinite}.cdk-overlay-container{pointer-events:none;top:0;left:0;height:100%;width:100%;position:fixed;z-index:1000;box-sizing:border-box;margin:0;padding:0}.cdk-overlay-backdrop{top:0;bottom:0;left:0;right:0;-webkit-tap-highlight-color:transparent;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0;position:absolute;pointer-events:auto;z-index:1000;box-sizing:border-box;margin:0;padding:0}.cdk-overlay-pane{box-sizing:border-box;position:absolute;pointer-events:auto;margin:0;padding:0;z-index:1000;max-width:100%;max-height:100%}.cdk-overlay-connected-position-bounding-box{box-sizing:border-box;position:absolute;z-index:1000;display:flex;flex-direction:column;margin:0;padding:0;min-width:1px;min-height:1px}.mc-tooltip{display:block;box-sizing:border-box;visibility:visible;position:relative;margin:0;padding:0;z-index:1060;max-width:240px;list-style:none;white-space:pre-line}.mc-tooltip_placement-top{padding-bottom:9px}.mc-tooltip_placement-right{padding-left:9px}.mc-tooltip_placement-bottom{padding-top:9px}.mc-tooltip_placement-left{padding-right:9px}.mc-tooltip-inner{padding:8px 16px;text-align:left;text-decoration:none;border-radius:3px;min-height:16px;height:fit-content;vertical-align:center}.mc-tooltip-arrow{position:absolute;width:12px;height:12px;transform:rotate(45deg)}.mc-tooltip_placement-top .mc-tooltip-arrow{bottom:4px;left:50%;margin-left:-5px}.mc-tooltip_placement-right .mc-tooltip-arrow{left:4px;top:16px;margin-top:-5px}.mc-tooltip_placement-left .mc-tooltip-arrow{right:4px;top:16px;margin-top:-5px}.mc-tooltip_placement-bottom .mc-tooltip-arrow{top:4px;left:50%;margin-left:-5px}"],encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,host:{"(body:click)":"this.handleBodyInteraction()"}}]}],e.ctorParameters=function(){return[{type:t.ChangeDetectorRef}]},e.propDecorators={mcVisibleChange:[{type:t.Output}],mcMouseEnterDelay:[{type:t.Input}],mcMouseLeaveDelay:[{type:t.Input}],mcTitle:[{type:t.Input}],mcTrigger:[{type:t.Input}],mcPlacement:[{type:t.Input}],mcVisible:[{type:t.Input}]},e}(),ms=new t.InjectionToken("mc-tooltip-scroll-strategy"),gs={provide:ms,deps:[c.Overlay],useFactory:ue},fs=function(){function e(e,n,i,r,a,s,c){this.overlay=e,this.elementRef=n,this.ngZone=i,this.scrollDispatcher=r,this.hostView=a,this.scrollStrategy=s,this.direction=c,this.isTooltipOpen=!1,this.isDynamicTooltip=!1,this.parentDisabled=!1,this.mcVisibleChange=new t.EventEmitter,this.$unsubscribe=new o.Subject,this._disabled=!1,this._mcTrigger="hover",this._mcPlacement="top",this.manualListeners=new Map,this.destroyed=new o.Subject,this.availablePositions=ze}return Object.defineProperty(e.prototype,"mcTitle",{get:function(){return this._mcTitle},set:function(e){this._mcTitle=e,this.updateCompValue("mcTitle",e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"setTitle",{set:function(e){this.mcTitle=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this._disabled},set:function(e){this._disabled=i.coerceBooleanProperty(e),this.updateCompValue("mcTooltipDisabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcMouseEnterDelay",{get:function(){return this._mcMouseEnterDelay},set:function(e){this._mcMouseEnterDelay=e,this.updateCompValue("mcMouseEnterDelay",e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcMouseLeaveDelay",{get:function(){return this._mcMouseLeaveDelay},set:function(e){this._mcMouseLeaveDelay=e,this.updateCompValue("mcMouseLeaveDelay",e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcTrigger",{get:function(){return this._mcTrigger},set:function(e){e?(this._mcTrigger=e,this.updateCompValue("mcTrigger",e)):this._mcTrigger="hover"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcPlacement",{get:function(){return this._mcPlacement},set:function(e){e?(this._mcPlacement=e,this.updateCompValue("mcPlacement",e)):this._mcPlacement="top"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcTooltipClass",{get:function(){return this._mcTooltipClass},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mсTooltipClass",{set:function(e){this._mcTooltipClass=e,this.tooltip&&this.tooltip.setClassMap()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"mcVisible",{get:function(){return this._mcVisible},set:function(e){var t=i.coerceBooleanProperty(e);this._mcVisible!==t&&(this._mcVisible=t,this.updateCompValue("mcVisible",t),t?this.show():this.hide())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this.isTooltipOpen},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isParentDisabled",{get:function(){return this.parentDisabled},enumerable:!0,configurable:!0}),e.prototype.createOverlay=function(){var e=this;if(this.overlayRef)return this.overlayRef;var t=this.overlay.position().flexibleConnectedTo(this.elementRef).withTransformOriginOn(".mc-tooltip").withFlexibleDimensions(!1).withViewportMargin(8).withPositions(We.slice()),n=this.scrollDispatcher.getAncestorScrollContainers(this.elementRef);return t.withScrollableContainers(n),t.positionChanges.pipe(m.takeUntil(this.destroyed)).subscribe(function(t){e.tooltip&&(e.onPositionChange(t),t.scrollableViewProperties.isOverlayClipped&&e.tooltip.mcVisible&&e.ngZone.run(function(){return e.hide()}))}),this.overlayRef=this.overlay.create({direction:this.direction,positionStrategy:t,panelClass:"mc-tooltip-panel",scrollStrategy:this.scrollStrategy()}),this.updatePosition(),this.overlayRef.detachments().pipe(m.takeUntil(this.destroyed)).subscribe(function(){return e.detach()}),this.overlayRef},e.prototype.detach=function(){this.overlayRef&&this.overlayRef.hasAttached()&&this.overlayRef.detach(),this.tooltip=null},e.prototype.onPositionChange=function(e){var t=this,n=this.mcPlacement;Object.keys(this.availablePositions).some(function(i){return e.connectionPair.originX===t.availablePositions[i].originX&&e.connectionPair.originY===t.availablePositions[i].originY&&e.connectionPair.overlayX===t.availablePositions[i].overlayX&&e.connectionPair.overlayY===t.availablePositions[i].overlayY&&(n=i,!0)}),this.updateCompValue("mcPlacement",n),this.tooltip&&(this.tooltip.setClassMap(),this.tooltip.markForCheck()),this.handlePositioningUpdate()},e.prototype.handlePositioningUpdate=function(){if(this.overlayRef||(this.overlayRef=this.createOverlay()),"right"===this.mcPlacement||"left"===this.mcPlacement){var e=(this.overlayRef.overlayElement.clientHeight-this.hostView.element.nativeElement.clientHeight)/2,t=this.overlayRef.overlayElement.style.top||"0px";this.overlayRef.overlayElement.style.top=parseInt(t.split("px")[0],10)+e-1+"px"}},e.prototype.updateCompValue=function(e,t){this.isDynamicTooltip&&t&&this.tooltip&&(this.tooltip[e]=t)},e.prototype.ngOnInit=function(){this.initElementRefListeners()},e.prototype.ngOnDestroy=function(){var e=this;this.overlayRef&&this.overlayRef.dispose(),this.manualListeners.forEach(function(t,n){return e.elementRef.nativeElement.removeEventListener(n,t)}),this.manualListeners.clear(),this.$unsubscribe.next(),this.$unsubscribe.complete()},e.prototype.handleKeydown=function(e){this.isTooltipOpen&&e.keyCode===a.ESCAPE&&this.hide()},e.prototype.handleTouchend=function(){this.hide()},e.prototype.initElementRefListeners=function(){var e=this;"hover"===this.mcTrigger&&this.manualListeners.set("mouseenter",function(){return e.show()}).set("mouseleave",function(){return e.hide()}).forEach(function(t,n){return e.elementRef.nativeElement.addEventListener(n,t)}),"focus"===this.mcTrigger&&this.manualListeners.set("focus",function(){return e.show()}).set("blur",function(){return e.hide()}).forEach(function(t,n){return e.elementRef.nativeElement.addEventListener(n,t)})},e.prototype.show=function(){var e=this;if(!this.disabled){if(!this.tooltip){var t=this.createOverlay();this.detach(),this.portal=this.portal||new d.ComponentPortal(hs,this.hostView),this.tooltip=t.attach(this.portal).instance,this.tooltip.afterHidden().pipe(m.takeUntil(this.destroyed)).subscribe(function(){return e.detach()}),this.isDynamicTooltip=!0;["mcTitle","mcPlacement","mcTrigger","mcTooltipDisabled","mcMouseEnterDelay","mcMouseLeaveDelay","mсTooltipClass"].forEach(function(t){return e.updateCompValue(t,e[t])}),this.tooltip.mcVisibleChange.pipe(m.takeUntil(this.$unsubscribe),m.distinctUntilChanged()).subscribe(function(t){e.mcVisible=t,e.mcVisibleChange.emit(t),e.isTooltipOpen=t})}this.updatePosition(),this.tooltip.show()}},e.prototype.hide=function(){this.tooltip&&this.tooltip.hide()},e.prototype.updatePosition=function(){this.overlayRef||(this.overlayRef=this.createOverlay());var e=this.overlayRef.getConfig().positionStrategy,t=this.getOrigin(),n=this.getOverlayPosition();e.withPositions([fe({},t.main,n.main),fe({},t.fallback,n.fallback)])},e.prototype.getOrigin=function(){var e,t=this.mcPlacement,n=!this.direction||"ltr"===this.direction.value;if("top"===t||"bottom"===t)e={originX:"center",originY:"top"===t?"top":"bottom"};else if("top"===t||"left"===t&&n||"right"===t&&!n)e={originX:"start",originY:"center"};else{if(!("bottom"===t||"right"===t&&n||"left"===t&&!n))throw he(t);e={originX:"end",originY:"center"}}var i=this.invertPosition(e.originX,e.originY);return{main:e,fallback:{originX:i.x,originY:i.y}}},e.prototype.getOverlayPosition=function(){var e,t=this.mcPlacement,n=!this.direction||"ltr"===this.direction.value;if("top"===t)e={overlayX:"center",overlayY:"bottom"};else if("bottom"===t)e={overlayX:"center",overlayY:"top"};else if("top"===t||"left"===t&&n||"right"===t&&!n)e={overlayX:"end",overlayY:"center"};else{if(!("bottom"===t||"right"===t&&n||"left"===t&&!n))throw he(t);e={overlayX:"start",overlayY:"center"}}var i=this.invertPosition(e.overlayX,e.overlayY);return{main:e,fallback:{overlayX:i.x,overlayY:i.y}}},e.prototype.invertPosition=function(e,t){var n=e,i=t;return"top"===this.mcPlacement||"bottom"===this.mcPlacement?"top"===t?i="bottom":"bottom"===t&&(i="top"):"end"===e?n="start":"start"===e&&(n="end"),{x:n,y:i}},e.decorators=[{type:t.Directive,args:[{selector:'[mcTooltip], [attribute^="mcTooltip"]',exportAs:"mcTooltip",host:{"(keydown)":"handleKeydown($event)","(touchend)":"handleTouchend()"}}]}],e.ctorParameters=function(){return[{type:c.Overlay},{type:t.ElementRef},{type:t.NgZone},{type:c.ScrollDispatcher},{type:t.ViewContainerRef},{type:void 0,decorators:[{type:t.Inject,args:[ms]}]},{type:n.Directionality,decorators:[{type:t.Optional}]}]},e.propDecorators={mcVisibleChange:[{type:t.Output}],mcTitle:[{type:t.Input,args:["mcTooltip"]}],setTitle:[{type:t.Input,args:["mcTitle"]}],disabled:[{type:t.Input,args:["mcTooltipDisabled"]}],mcMouseEnterDelay:[{type:t.Input,args:["mcMouseEnterDelay"]}],mcMouseLeaveDelay:[{type:t.Input,args:["mcMouseLeaveDelay"]}],mcTrigger:[{type:t.Input,args:["mcTrigger"]}],mcPlacement:[{type:t.Input,args:["mcPlacement"]}],mcTooltipClass:[{type:t.Input,args:["mcTooltipClass"]}],mcVisible:[{type:t.Input,args:["mcVisible"]}],isOpen:[{type:t.HostBinding,args:["class.mc-tooltip-open"]}],isParentDisabled:[{type:t.HostBinding,args:["class.disabled"]}]},e}(),ys=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{declarations:[hs,fs],exports:[hs,fs],imports:[r.CommonModule,c.OverlayModule],providers:[gs],entryComponents:[hs]}]}],e}(),bs=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-vertical-navbar-item-icon",host:{class:"mc-vertical-navbar__item-icon"}}]}],e}(),vs=function(){function e(){}return e.decorators=[{type:t.Component,args:[{selector:"mc-vertical-navbar-badge",template:'\n <span class="mc-badge mc-badge_light">\n <ng-content></ng-content>\n </span>\n ',host:{class:"mc-vertical-navbar__badge"}}]}],e}(),Cs=function(){function e(e){this._elementRef=e}return e}(),_s=w(Cs),xs=function(e){function n(t,n,i){var o=e.call(this,t)||this;return o.element=t,o.focusMonitor=n,o.trigger=i,o.tabIndex=0,o.focusMonitor.monitor(o.element.nativeElement).subscribe(),o}return v(n,e),Object.defineProperty(n.prototype,"hasDropdownAttached",{get:function(){return!!this.trigger},enumerable:!0,configurable:!0}),n.prototype.ngOnDestroy=function(){this.focusMonitor.stopMonitoring(this.element.nativeElement)},n.decorators=[{type:t.Component,args:[{selector:"a[mc-vertical-navbar-item], mc-vertical-navbar-item",template:'<div class="mc-vertical-navbar__item"><ng-content></ng-content><i *ngIf="hasDropdownAttached" mc-icon="mc-angle-right-M_16" class="mc-vertical-navbar__item-dropdown-icon"></i></div>',encapsulation:t.ViewEncapsulation.None,changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".mc-vertical-navbar__badge{position:absolute;width:64px;top:0;left:0}.mc-vertical-navbar__badge .mc-badge{position:absolute;right:4px;top:4px}.mc-vertical-navbar__item-icon{margin-right:16px}.mc-vertical-navbar__item-icon .mc-icon{font-size:32px}.mc-vertical-navbar__title{white-space:nowrap}.mc-vertical-navbar__item-dropdown-icon{margin-left:auto;padding-left:16px}a[mc-vertical-navbar-item],mc-vertical-navbar-item{height:64px;margin:1px 0;width:100%;position:relative;display:flex;align-items:center;box-sizing:border-box;cursor:pointer;text-decoration:none}a[mc-vertical-navbar-item] .mc-vertical-navbar__item,mc-vertical-navbar-item .mc-vertical-navbar__item{padding-left:16px;padding-right:16px;display:flex;align-items:center;width:100%;height:100%}a[mc-vertical-navbar-item].mc-progress,mc-vertical-navbar-item.mc-progress{cursor:pointer}a[mc-vertical-navbar-item].mc-vertical-navbar__item_active,mc-vertical-navbar-item.mc-vertical-navbar__item_active{cursor:default}a[mc-vertical-navbar-item][disabled],mc-vertical-navbar-item[disabled]{cursor:default;pointer-events:none}"],inputs:["disabled"],host:{"[attr.disabled]":"disabled || null","[attr.tabindex]":"disabled ? -1 : 0"}}]}],n.ctorParameters=function(){return[{type:t.ElementRef},{type:p.FocusMonitor},{type:yi,decorators:[{type:t.Optional},{type:t.Self}]}]},n.propDecorators={tabIndex:[{type:t.Input}]},n}(_s),ws=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-vertical-navbar-header, a[mc-vertical-navbar-header]",host:{class:"mc-vertical-navbar__header"}}]}],e}(),Os=function(){function e(){}return e.decorators=[{type:t.Directive,args:[{selector:"mc-vertical-navbar-title",host:{class:"mc-vertical-navbar__title"}}]}],e}(),ks=function(){function e(e){this.cd=e,this.expanded=!1}return e.prototype.toggle=function(){this.expanded=!this.expanded,this.cd.markForCheck()},e.decorators=[{type:t.Component,args:[{selector:"mc-vertical-navbar",changeDetection:t.ChangeDetectionStrategy.OnPush,template:'<nav class="mc-vertical-navbar" [@toggle]="expanded"><div class="mc-vertical-navbar__header-area"><div cdkMonitorElementFocus tabindex="0" class="mc-vertical-navbar__toggle-button" (click)="toggle()" (keydown.space)="toggle()" (keydown.enter)="toggle()"><i mc-icon="mc-hamburger_32" *ngIf="!expanded"></i> <i mc-icon="mc-close-L_32" *ngIf="expanded"></i></div><div cdkMonitorSubtreeFocus *ngIf="expanded"><ng-content select="mc-vertical-navbar-header, a[mc-vertical-navbar-header]"></ng-content></div></div><ng-content></ng-content></nav>',styles:[".mc-vertical-navbar{height:100%;position:fixed;left:0;top:0;z-index:100;display:flex;flex-direction:column;align-items:flex-start;min-height:100%;overflow:hidden}.mc-vertical-navbar .mc-vertical-navbar__header-area{display:flex;width:100%;align-items:stretch;box-sizing:border-box;min-height:64px}.mc-vertical-navbar .mc-vertical-navbar__header-area .mc-vertical-navbar__header{display:flex;height:100%;justify-content:stretch;text-decoration:none;align-self:stretch;align-items:center}.mc-vertical-navbar .mc-vertical-navbar__header-area .mc-vertical-navbar__toggle-button{cursor:pointer;display:flex;flex:0 0 auto;justify-content:center;align-items:center;align-self:stretch;width:64px}.mc-vertical-navbar .mc-vertical-navbar__header-area .mc-vertical-navbar__title{padding:0 16px}"],encapsulation:t.ViewEncapsulation.None,animations:[me()]}]}],e.ctorParameters=function(){return[{type:t.ChangeDetectorRef}]},e.propDecorators={expanded:[{type:t.Input}]},e}(),Is=[ks,Os,xs,bs,vs,ws],Ss=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,p.A11yModule,h.PlatformModule,wt],exports:Is,declarations:Is}]}],e}(),Ds=new t.Version("8.5.7");e.ARROW_DOWN_KEYCODE="ArrowDown",e.ARROW_LEFT_KEYCODE="ArrowLeft",e.ARROW_RIGHT_KEYCODE="ArrowRight",e.ARROW_UP_KEYCODE="ArrowUp",e.AUTOCOMPLETE_BORDER_WIDTH=2,e.AUTOCOMPLETE_OPTION_HEIGHT=32,e.AUTOCOMPLETE_PANEL_HEIGHT=256,e.AnimationCurves=Be,e.BIG_STEP=bn,e.BOTTOM_LEFT_POSITION_PRIORITY=tt,e.BOTTOM_POSITION_PRIORITY=Ke,e.BOTTOM_RIGHT_POSITION_PRIORITY=et,e.DEFAULT_4_POSITIONS=We,e.DEFAULT_4_POSITIONS_TO_CSS_MAP=ot,e.DEFAULT_MC_LOCALE_ID="ru",e.DEFAULT_TIME_FORMAT=_a,e.Direction=ns,e.EXTENDED_OVERLAY_POSITIONS=Ye,e.ErrorStateMatcher=Oe,e.HOURS_MINUTES_REGEXP=wa,e.HOURS_MINUTES_SECONDS_REGEXP=xa,e.HOURS_ONLY_REGEXP=Oa,e.HOURS_PER_DAY=23,e.LEFT_BOTTOM_POSITION_PRIORITY=Ze,e.LEFT_POSITION_PRIORITY=Ge,e.LEFT_TOP_POSITION_PRIORITY=$e,e.MAT_AUTOCOMPLETE_VALUE_ACCESSOR=Ht,e.MC_AUTOCOMPLETE_DEFAULT_OPTIONS=jt,e.MC_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY=K,e.MC_AUTOCOMPLETE_SCROLL_STRATEGY=Wt,e.MC_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY=U,e.MC_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER=Yt,e.MC_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR=Jt,e.MC_CHECKBOX_CLICK_ACTION=sn,e.MC_CHECKBOX_CONTROL_VALUE_ACCESSOR=ln,e.MC_CHECKBOX_REQUIRED_VALIDATOR=gn,e.MC_DATEPICKER_SCROLL_STRATEGY=Yn,e.MC_DATEPICKER_SCROLL_STRATEGY_FACTORY=ne,e.MC_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER=Hn,e.MC_DATEPICKER_VALIDATORS=$n,e.MC_DATEPICKER_VALUE_ACCESSOR=qn,e.MC_DROPDOWN_DEFAULT_OPTIONS=ui,e.MC_DROPDOWN_DEFAULT_OPTIONS_FACTORY=ae,e.MC_DROPDOWN_PANEL=ri,e.MC_DROPDOWN_SCROLL_STRATEGY=mi,e.MC_DROPDOWN_SCROLL_STRATEGY_FACTORY=se,e.MC_DROPDOWN_SCROLL_STRATEGY_FACTORY_PROVIDER=gi,e.MC_INPUT_VALUE_ACCESSOR=_n,e.MC_LABEL_GLOBAL_OPTIONS=Ne,e.MC_LOCALE_ID=pt,e.MC_OPTION_PARENT_COMPONENT=Ve,e.MC_POPOVER_SCROLL_STRATEGY=ho,e.MC_POPOVER_SCROLL_STRATEGY_FACTORY_PROVIDER=mo,e.MC_RADIO_GROUP_CONTROL_VALUE_ACCESSOR=Mo,e.MC_SANITY_CHECKS=ye,e.MC_SELECTION_LIST_VALUE_ACCESSOR=Ci,e.MC_SELECTION_TREE_VALUE_ACCESSOR=Ko,e.MC_SELECT_SCROLL_STRATEGY=rt,e.MC_SELECT_SCROLL_STRATEGY_PROVIDER=at,e.MC_SIDEPANEL_DATA=La,e.MC_SIDEPANEL_DEFAULT_OPTIONS=Xa,e.MC_SIDEPANEL_WITH_INDENT=Ya,e.MC_SIDEPANEL_WITH_SHADOW=Ha,e.MC_TABS_CONFIG=_r,e.MC_TAGS_DEFAULT_OPTIONS=Tr,e.MC_TEXTAREA_VALUE_ACCESSOR=ua,e.MC_TOOLTIP_SCROLL_STRATEGY=ms,e.MC_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER=gs,e.MC_TREE_OPTION_PARENT_COMPONENT=zo,e.MC_VALIDATION=bt,e.MINUTES_PER_HOUR=59,e.McAlignTabsCenterCssStyler=fr,e.McAlignTabsEndCssStyler=yr,e.McAnchor=Zt,e.McAutocomplete=Bt,e.McAutocompleteModule=Ut,e.McAutocompleteOrigin=zt,e.McAutocompleteSelectedEvent=Nt,e.McAutocompleteTrigger=Kt,e.McButton=$t,e.McButtonBase=Xt,e.McButtonCssStyler=Gt,e.McButtonMixinBase=qt,e.McButtonModule=Qt,e.McButtonToggle=nn,e.McButtonToggleChange=en,e.McButtonToggleGroup=tn,e.McButtonToggleModule=on,e.McCalendar=Bn,e.McCalendarBody=Vn,e.McCalendarCell=Rn,e.McCalendarHeader=jn,e.McCard=rn,e.McCardModule=an,e.McCheckbox=mn,e.McCheckboxBase=un,e.McCheckboxChange=dn,e.McCheckboxMixinBase=hn,e.McCheckboxModule=yn,e.McCheckboxRequiredValidator=fn,e.McCleaner=Ot,e.McCommonModule=be,e.McDatepicker=Xn,e.McDatepickerContent=Gn,e.McDatepickerContentBase=Kn,e.McDatepickerContentMixinBase=Un,e.McDatepickerInput=Qn,e.McDatepickerInputEvent=Zn,e.McDatepickerIntl=An,e.McDatepickerModule=ti,e.McDatepickerToggle=ei,e.McDatepickerToggleIcon=Jn,e.McDecimalPipe=ft,e.McDivider=ni,e.McDividerModule=ii,e.McDropdown=hi,e.McDropdownContent=oi,e.McDropdownItem=ci,e.McDropdownItemBase=ai,e.McDropdownItemMixinBase=si,e.McDropdownModule=bi,e.McDropdownTrigger=yi,e.McFormField=Rt,e.McFormFieldBase=Tt,e.McFormFieldControl=kt,e.McFormFieldMixinBase=At,e.McFormFieldModule=Ft,e.McFormFieldWithoutBorders=Vt,e.McFormattersModule=yt,e.McGutterDirective=is,e.McHighlightModule=lt,e.McHighlightPipe=ct,e.McHint=St,e.McIcon=xt,e.McIconBase=Ct,e.McIconCSSStyler=vt,e.McIconMixinBase=_t,e.McIconModule=wt,e.McInput=In,e.McInputBase=On,e.McInputMixinBase=kn,e.McInputModule=Tn,e.McInputMono=Sn,e.McLightTabsCssStyler=gr,e.McLine=Ce,e.McLineModule=xe,e.McLineSetter=_e,e.McLink=Ai,e.McLinkBase=Mi,e.McLinkMixinBase=Ti,e.McLinkModule=Ri,e.McList=Ii,e.McListBase=ki,e.McListItem=Ei,e.McListItemBase=Di,e.McListModule=Pi,e.McListOption=vi,e.McListSelection=Oi,e.McListSelectionBase=xi,e.McListSelectionChange=_i,e.McListSelectionMixinBase=wi,e.McListSubheaderCssStyler=Si,e.McMeasureScrollbarService=De,e.McModalComponent=ji,e.McModalModule=Ui,e.McModalRef=Fi,e.McModalService=Ki,e.McMonthView=Fn,e.McMultiYearView=Ln,e.McNavbar=ao,e.McNavbarBrand=Qi,e.McNavbarContainer=io,e.McNavbarItem=no,e.McNavbarItemBase=eo,e.McNavbarLogo=Zi,e.McNavbarMixinBase=to,e.McNavbarModule=so,e.McNavbarTitle=Ji,e.McNumberInput=Cn,e.McOptgroup=Te,e.McOptgroupBase=Ee,e.McOptgroupMixinBase=Pe,e.McOption=Fe,e.McOptionModule=Le,e.McOptionSelectionChange=Re,e.McPopover=go,e.McPopoverComponent=uo,e.McPopoverModule=fo,e.McPrefix=Dt,e.McProgressBar=Co,e.McProgressBarBase=bo,e.McProgressBarMixinBase=vo,e.McProgressBarModule=_o,e.McProgressSpinner=ko,e.McProgressSpinnerBase=wo,e.McProgressSpinnerMixinBase=Oo,e.McProgressSpinnerModule=Io,e.McPseudoCheckbox=ke,e.McPseudoCheckboxModule=Se,e.McRadioButton=Vo;e.McRadioButtonBase=Ao,e.McRadioButtonMixinBase=Ro,e.McRadioChange=Do,e.McRadioGroup=To,e.McRadioGroupBase=Eo,e.McRadioGroupMixinBase=Po,e.McRadioModule=Fo,e.McSelect=ia,e.McSelectBase=Qr,e.McSelectChange=Zr,e.McSelectModule=oa,e.McSelectSearch=ea,e.McSelectSearchEmptyResult=ta,e.McSelectTrigger=na,e.McSidebar=Va,e.McSidebarClosed=Ra,e.McSidebarModule=Fa,e.McSidebarOpened=Aa,e.McSidepanelConfig=ja,e.McSidepanelContainerComponent=Ka,e.McSidepanelModule=ts,e.McSidepanelPosition=Na,e.McSidepanelRef=Ga,e.McSidepanelService=qa,e.McSplitterAreaDirective=rs,e.McSplitterComponent=os,e.McSplitterModule=as,e.McStepper=Et,e.McStretchTabsCssStyler=br,e.McSuffix=Pt,e.McTab=ar,e.McTabBody=cr,e.McTabBodyPortal=lr,e.McTabChangeEvent=Cr,e.McTabContent=tr,e.McTabGroup=Or,e.McTabGroupBase=xr,e.McTabGroupMixinBase=wr,e.McTabHeader=mr,e.McTabLabel=nr,e.McTabLabelWrapper=ur,e.McTabLink=Pr,e.McTabNav=Sr,e.McTabsModule=Mr,e.McTag=jr,e.McTagAvatar=Vr,e.McTagBase=Lr,e.McTagInput=Gr,e.McTagList=Kr,e.McTagListBase=zr,e.McTagListChange=Hr,e.McTagListMixinBase=Wr,e.McTagMixinBase=Nr,e.McTagRemove=Br,e.McTagSelectionChange=Ar,e.McTagTrailingIcon=Fr,e.McTagsModule=qr,e.McTextarea=fa,e.McTextareaBase=ma,e.McTextareaMixinBase=ga,e.McTextareaModule=ya,e.McTimepicker=Da,e.McTimepickerBase=Ia,e.McTimepickerMixinBase=Sa,e.McTimepickerModule=Ea,e.McToggleBase=cs,e.McToggleChange=ps,e.McToggleComponent=ds,e.McToggleMixinBase=ls,e.McToggleModule=us,e.McToolTipModule=ys,e.McTooltip=fs,e.McTooltipComponent=hs,e.McTreeFlatDataSource=Jo,e.McTreeFlattener=Zo,e.McTreeModule=$o,e.McTreeNavigationChange=Uo,e.McTreeNestedDataSource=er,e.McTreeNodeDef=Lo,e.McTreeNodePadding=No,e.McTreeNodeToggleComponent=jo,e.McTreeNodeToggleDirective=Bo,e.McTreeOption=Ho,e.McTreeOptionChange=Wo,e.McTreeSelect=pa,e.McTreeSelectChange=aa,e.McTreeSelectModule=da,e.McTreeSelectTrigger=sa,e.McTreeSelection=Xo,e.McTreeSelectionChange=Go,e.McVerticalNavbar=ks,e.McVerticalNavbarHeader=ws,e.McVerticalNavbarItem=xs,e.McVerticalNavbarItemBadge=vs,e.McVerticalNavbarItemIcon=bs,e.McVerticalNavbarMixinBase=_s,e.McVerticalNavbarModule=Ss,e.McVerticalNavbarTitle=Os,e.McYearView=Nn,e.MultipleMode=Ie,e.NESTED_PANEL_TOP_PADDING=2,e.NUMBER_FORMAT_REGEXP=dt,e.POSITION_MAP=ze,e.POSITION_PRIORITY_STRATEGY=nt,e.POSITION_TO_CSS_MAP=it,e.PopoverVisibility=po,e.RIGHT_BOTTOM_POSITION_PRIORITY=qe,e.RIGHT_POSITION_PRIORITY=Ue,e.RIGHT_TOP_POSITION_PRIORITY=Xe,e.SECONDS_PER_MINUTE=59,e.SELECT_PANEL_INDENT_PADDING_X=2,e.SELECT_PANEL_MAX_HEIGHT=224,e.SELECT_PANEL_PADDING_X=1,e.SELECT_PANEL_VIEWPORT_PADDING=8,e.SMALL_STEP=vn,e.ShowOnDirtyErrorStateMatcher=we,e.SidebarPositions=Ta,e.TIMEFORMAT_PLACEHOLDERS=Ca,e.TOP_LEFT_POSITION_PRIORITY=Qe,e.TOP_POSITION_PRIORITY=He,e.TOP_RIGHT_POSITION_PRIORITY=Je,e.ThemePalette=ve,e.TimeFormats=va,e.TimeParts=ba,e.TransitionCheckState=pn,e.VERSION=Ds,e.add=ee,e.countGroupLabelsBeforeOption=S,e.fadeAnimation=je,e.fadeInItems=pi,e.getMcAutocompleteMissingPanelError=G,e.getMcFormFieldMissingControlError=Y,e.getMcFormFieldYouCanNotUseCleanerInNumberInputError=H,e.getMcPopoverInvalidPositionError=pe,e.getMcSelectDynamicMultipleError=T,e.getMcSelectNonArrayValueError=A,e.getMcSelectNonFunctionValueError=R,e.getMcTooltipInvalidPositionError=he,e.getOptionScrollPosition=D,e.getPrecision=J,e.isBoolean=C,e.isDigit=Q,e.isFloat=$,e.isInt=Z,e.mcDatepickerAnimations=zn,e.mcDropdownAnimations=li,e.mcPopoverAnimations=co,e.mcPopoverScrollStrategyFactory=le,e.mcSelectAnimations=st,e.mcSelectScrollStrategyProviderFactory=V,e.mcTabsAnimations=sr,e.mcTooltipScrollStrategyFactory=ue,e.mixinColor=O,e.mixinDisabled=w,e.mixinErrorState=I,e.mixinTabIndex=k,e.normalizeSplitter=q,e.selectEvents="selectEvents",e.setMosaicValidation=B,e.setMosaicValidationForFormControl=W,e.setMosaicValidationForModelControl=z,e.throwMcDropdownInvalidPositionX=oe,e.throwMcDropdownInvalidPositionY=re,e.throwMcDropdownMissingError=ie,e.toBoolean=_,e.transformDropdown=di,e.yearsPerPage=24,e.yearsPerRow=4,e.ɵa15=hr,e.ɵa2=Ma,e.ɵa20=za,e.ɵa22=me,e.ɵa25=Dn,e.ɵa28=Vi,e.ɵa3=x,e.ɵb15=pr,e.ɵb20=Wa,e.ɵb25=En,e.ɵb28=zi,e.ɵc15=dr,e.ɵc20=$a,e.ɵc25=Pn,e.ɵc28=Wi,e.ɵd15=or,e.ɵd20=Za,e.ɵd25=Mn,e.ɵd28=Yi,e.ɵe15=rr,e.ɵe20=Qa,e.ɵe28=Bi,e.ɵf15=kr,e.ɵf20=Ja,e.ɵg15=Ir,e.ɵg20=es,e.ɵh15=Dr,e.ɵi15=Er,Object.defineProperty(e,"__esModule",{value:!0})});
21
21
  //# sourceMappingURL=mosaic.umd.min.js.map