UNPKG

ng-zorro-antd-mobile

Version:

An enterprise-class mobile UI components based on Ant Design and Angular

28,050 lines 918 kB
import { Component, Input, HostBinding, NgModule, ViewEncapsulation, TemplateRef, ElementRef, Renderer2, EventEmitter, forwardRef, ViewChild, Output, InjectionToken, Injectable, Inject, Optional, SkipSelf, ApplicationRef, ComponentFactoryResolver, NgZone, HostListener, Pipe, ContentChildren, ChangeDetectionStrategy, ChangeDetectorRef, Injector, Directive, ViewContainerRef, ɵɵdefineInjectable, ɵɵinject } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule, NG_VALUE_ACCESSOR, ReactiveFormsModule } from '@angular/forms';
import { BehaviorSubject, Subject, merge } from 'rxjs';
import { takeUntil, startWith } from 'rxjs/operators';
import { __values, __assign, __spread, __extends } from 'tslib';
import { trigger, state, style, transition, animate } from '@angular/animations';
import { DomSanitizer } from '@angular/platform-browser';
import { OverlayConfig, Overlay, OverlayModule } from '@angular/cdk/overlay';
import { ComponentPortal } from '@angular/cdk/portal';
import { ObserversModule } from '@angular/cdk/observers';

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var ActivityIndicatorComponent = /** @class */ (function () {
    function ActivityIndicatorComponent() {
        this.prefixCls = 'am-activity-indicator';
        this.spinnerClass = {};
        this._size = 'small';
        this._toast = false;
        this._animating = true;
        this.clsActIndicator = true;
    }
    Object.defineProperty(ActivityIndicatorComponent.prototype, "animating", {
        get: /**
         * @return {?}
         */
        function () {
            return this._animating;
        },
        set: /**
         * @param {?} v
         * @return {?}
         */
        function (v) {
            this._animating = v;
            this.setClass();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ActivityIndicatorComponent.prototype, "size", {
        set: /**
         * @param {?} v
         * @return {?}
         */
        function (v) {
            this._size = v;
            this.setClass();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ActivityIndicatorComponent.prototype, "toast", {
        get: /**
         * @return {?}
         */
        function () {
            return this._toast;
        },
        set: /**
         * @param {?} v
         * @return {?}
         */
        function (v) {
            this._toast = v;
            this.setClass();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ActivityIndicatorComponent.prototype, "text", {
        get: /**
         * @return {?}
         */
        function () {
            return this._text;
        },
        set: /**
         * @param {?} v
         * @return {?}
         */
        function (v) {
            this._text = v;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @return {?}
     */
    ActivityIndicatorComponent.prototype.setClass = /**
     * @return {?}
     */
    function () {
        var _a;
        if (this._animating) {
            this.clsActIndicator = true;
            this.clsActIndicatorToast = !!this._toast;
            this.clsActIndicatorLg = this._size === 'large';
            this.clsActIndicatorSm = this._size === 'small';
            this.spinnerClass = (_a = {},
                _a[this.prefixCls + "-spinner"] = true,
                _a[this.prefixCls + "-spinner-lg"] = !!this._toast || this._size === 'large',
                _a);
        }
        else {
            this.clsActIndicator = false;
            this.clsActIndicatorLg = false;
            this.clsActIndicatorSm = false;
            this.clsActIndicatorToast = false;
        }
    };
    /**
     * @return {?}
     */
    ActivityIndicatorComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        this.setClass();
    };
    ActivityIndicatorComponent.decorators = [
        { type: Component, args: [{
                    selector: 'ActivityIndicator , nzm-ctivity-indicator',
                    template: "<div *ngIf=\"animating && toast && text && text.length > 0\">\n  <div class=\"{{ prefixCls }}-content\">\n    <span [ngClass]=\"spinnerClass\" aria-hidden=\"'true'\"></span>\n    <span class=\"{{ prefixCls }}-toast\">{{ text }}</span>\n  </div>\n</div>\n<div *ngIf=\"animating && toast && !text\">\n  <div class=\"{{ prefixCls }}-content\">\n    <span [ngClass]=\"spinnerClass\" aria-label=\"'Loading'\"></span>\n  </div>\n</div>\n<div *ngIf=\"animating && !toast && text && text.length > 0\">\n  <span [ngClass]=\"spinnerClass\" aria-hidden=\"true\"></span>\n  <span class=\"{{ prefixCls }}-tip\">{{ text }}</span>\n</div>\n<div *ngIf=\"animating && !toast && !text\">\n  <span [ngClass]=\"spinnerClass\" aria-label=\"'loading'\"></span>\n</div>\n"
                }] }
    ];
    /** @nocollapse */
    ActivityIndicatorComponent.ctorParameters = function () { return []; };
    ActivityIndicatorComponent.propDecorators = {
        animating: [{ type: Input }],
        size: [{ type: Input }],
        toast: [{ type: Input }],
        text: [{ type: Input }],
        clsActIndicator: [{ type: HostBinding, args: ['class.am-activity-indicator',] }],
        clsActIndicatorToast: [{ type: HostBinding, args: ['class.am-activity-indicator-toast',] }],
        clsActIndicatorLg: [{ type: HostBinding, args: ['class.am-activity-indicator-lg',] }],
        clsActIndicatorSm: [{ type: HostBinding, args: ['class.am-activity-indicator-sm',] }]
    };
    return ActivityIndicatorComponent;
}());
if (false) {
    /** @type {?} */
    ActivityIndicatorComponent.prototype.prefixCls;
    /** @type {?} */
    ActivityIndicatorComponent.prototype.spinnerClass;
    /**
     * @type {?}
     * @private
     */
    ActivityIndicatorComponent.prototype._text;
    /**
     * @type {?}
     * @private
     */
    ActivityIndicatorComponent.prototype._size;
    /**
     * @type {?}
     * @private
     */
    ActivityIndicatorComponent.prototype._toast;
    /**
     * @type {?}
     * @private
     */
    ActivityIndicatorComponent.prototype._animating;
    /** @type {?} */
    ActivityIndicatorComponent.prototype.clsActIndicator;
    /** @type {?} */
    ActivityIndicatorComponent.prototype.clsActIndicatorToast;
    /** @type {?} */
    ActivityIndicatorComponent.prototype.clsActIndicatorLg;
    /** @type {?} */
    ActivityIndicatorComponent.prototype.clsActIndicatorSm;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var ActivityIndicatorModule = /** @class */ (function () {
    function ActivityIndicatorModule() {
    }
    ActivityIndicatorModule.decorators = [
        { type: NgModule, args: [{
                    exports: [ActivityIndicatorComponent],
                    declarations: [ActivityIndicatorComponent],
                    imports: [CommonModule, FormsModule]
                },] }
    ];
    return ActivityIndicatorModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var CardComponent = /** @class */ (function () {
    function CardComponent() {
        this.full = false;
        this.cardWrapper = true;
    }
    Object.defineProperty(CardComponent.prototype, "cardFull", {
        get: /**
         * @return {?}
         */
        function () {
            return this.full;
        },
        enumerable: true,
        configurable: true
    });
    CardComponent.decorators = [
        { type: Component, args: [{
                    selector: 'Card, nzm-card',
                    template: "<ng-content></ng-content>\n",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    /** @nocollapse */
    CardComponent.ctorParameters = function () { return []; };
    CardComponent.propDecorators = {
        full: [{ type: Input }],
        cardWrapper: [{ type: HostBinding, args: ['class.am-card',] }],
        cardFull: [{ type: HostBinding, args: ['class.am-card-full',] }]
    };
    return CardComponent;
}());
if (false) {
    /** @type {?} */
    CardComponent.prototype.full;
    /** @type {?} */
    CardComponent.prototype.cardWrapper;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var CardHeaderComponent = /** @class */ (function () {
    function CardHeaderComponent() {
        this.prefixCls = 'am-card-header';
        this.thumb = null;
        this.thumbStyle = null;
        this.title = null;
        this.extra = null;
        this.cardBodyWrapper = true;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    CardHeaderComponent.prototype.isTemplateRef = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        return value instanceof TemplateRef;
    };
    CardHeaderComponent.decorators = [
        { type: Component, args: [{
                    selector: 'CardHeader, nzm-card-header',
                    template: "<div class=\"{{ prefixCls }}-content\">\n  <img *ngIf=\"thumb && !isTemplateRef(thumb)\" src=\"{{ thumb }}\" [ngStyle]=\"thumbStyle\" />\n  <ng-container *ngIf=\"thumb && isTemplateRef(thumb)\" [ngTemplateOutlet]=\"thumb\"></ng-container>\n  <ng-container *ngIf=\"!isTemplateRef(title); else titleTemplate\">{{ title }}</ng-container>\n</div>\n<div *ngIf=\"extra\" class=\"{{ prefixCls }}-extra\">\n  <ng-container *ngIf=\"!isTemplateRef(extra); else extraTemplate\">{{ extra }}</ng-container>\n</div>\n<ng-template #titleTemplate>\n  <ng-template [ngTemplateOutlet]=\"title\"></ng-template>\n</ng-template>\n<ng-template #extraTemplate>\n  <ng-template [ngTemplateOutlet]=\"extra\"></ng-template>\n</ng-template>\n",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    /** @nocollapse */
    CardHeaderComponent.ctorParameters = function () { return []; };
    CardHeaderComponent.propDecorators = {
        thumb: [{ type: Input }],
        thumbStyle: [{ type: Input }],
        title: [{ type: Input }],
        extra: [{ type: Input }],
        cardBodyWrapper: [{ type: HostBinding, args: ['class.am-card-header',] }]
    };
    return CardHeaderComponent;
}());
if (false) {
    /** @type {?} */
    CardHeaderComponent.prototype.prefixCls;
    /** @type {?} */
    CardHeaderComponent.prototype.thumb;
    /** @type {?} */
    CardHeaderComponent.prototype.thumbStyle;
    /** @type {?} */
    CardHeaderComponent.prototype.title;
    /** @type {?} */
    CardHeaderComponent.prototype.extra;
    /** @type {?} */
    CardHeaderComponent.prototype.cardBodyWrapper;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var CardBodyComponent = /** @class */ (function () {
    function CardBodyComponent() {
        this.cardBodyWrapper = true;
    }
    CardBodyComponent.decorators = [
        { type: Component, args: [{
                    selector: 'CardBody, nzm-card-body',
                    template: "\n    <ng-content></ng-content>\n  ",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    /** @nocollapse */
    CardBodyComponent.ctorParameters = function () { return []; };
    CardBodyComponent.propDecorators = {
        cardBodyWrapper: [{ type: HostBinding, args: ['class.am-card-body',] }]
    };
    return CardBodyComponent;
}());
if (false) {
    /** @type {?} */
    CardBodyComponent.prototype.cardBodyWrapper;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var CardFooterComponent = /** @class */ (function () {
    function CardFooterComponent() {
        this.prefixCls = 'am-card-footer';
        this.content = null;
        this.extra = null;
        this.cardFooterWrapper = true;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    CardFooterComponent.prototype.isTemplateRef = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        return value instanceof TemplateRef;
    };
    CardFooterComponent.decorators = [
        { type: Component, args: [{
                    selector: 'CardFooter, nzm-card-footer',
                    template: "<div class=\"{{ prefixCls }}-content\">\n  <ng-container *ngIf=\"!isTemplateRef(content); else contentTemplate\">{{ content }}</ng-container>\n</div>\n<div *ngIf=\"extra\" class=\"{{ prefixCls }}-extra\">\n  <ng-container *ngIf=\"!isTemplateRef(extra); else extraTemplate\">{{ extra }}</ng-container>\n</div>\n<ng-template #contentTemplate>\n  <ng-template [ngTemplateOutlet]=\"content\"></ng-template>\n</ng-template>\n<ng-template #extraTemplate>\n  <ng-template [ngTemplateOutlet]=\"extra\"></ng-template>\n</ng-template>\n",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    /** @nocollapse */
    CardFooterComponent.ctorParameters = function () { return []; };
    CardFooterComponent.propDecorators = {
        content: [{ type: Input }],
        extra: [{ type: Input }],
        cardFooterWrapper: [{ type: HostBinding, args: ['class.am-card-footer',] }]
    };
    return CardFooterComponent;
}());
if (false) {
    /** @type {?} */
    CardFooterComponent.prototype.prefixCls;
    /** @type {?} */
    CardFooterComponent.prototype.content;
    /** @type {?} */
    CardFooterComponent.prototype.extra;
    /** @type {?} */
    CardFooterComponent.prototype.cardFooterWrapper;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var CardModule = /** @class */ (function () {
    function CardModule() {
    }
    CardModule.decorators = [
        { type: NgModule, args: [{
                    imports: [CommonModule],
                    declarations: [CardComponent, CardHeaderComponent, CardBodyComponent, CardFooterComponent],
                    exports: [CardComponent, CardHeaderComponent, CardBodyComponent, CardFooterComponent]
                },] }
    ];
    return CardModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var BadgeComponent = /** @class */ (function () {
    function BadgeComponent(_ref, render) {
        this._ref = _ref;
        this.render = render;
        this.prefixCls = 'am-badge';
        this.scrollNumberCls = {};
        this.style = {};
        this._size = 'small';
        this._dot = false;
        this._hot = false;
        this._corner = false;
        this._children = false;
        this._overflowCount = 99;
        this.clsBadge = true;
        this.clsBadgeWrp = !this._children;
        this.clsBadgeCornerWrp = this._corner;
        this.clsBadgeHot = !!this._hot;
        this.clsBadgeCornerWrpLg = this._corner && this._size === 'large';
    }
    Object.defineProperty(BadgeComponent.prototype, "size", {
        set: /**
         * @param {?} v
         * @return {?}
         */
        function (v) {
            this._size = v;
            this.setCls();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BadgeComponent.prototype, "text", {
        get: /**
         * @return {?}
         */
        function () {
            return this._text;
        },
        set: /**
         * @param {?} v
         * @return {?}
         */
        function (v) {
            this._text = v;
            this.setCls();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BadgeComponent.prototype, "corner", {
        set: /**
         * @param {?} v
         * @return {?}
         */
        function (v) {
            this._corner = v;
            this.setCls();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BadgeComponent.prototype, "dot", {
        get: /**
         * @return {?}
         */
        function () {
            return this._dot;
        },
        set: /**
         * @param {?} v
         * @return {?}
         */
        function (v) {
            this._dot = v;
            if (this._dot) {
                this._text = '';
            }
            this.setCls();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BadgeComponent.prototype, "overflowCount", {
        set: /**
         * @param {?} v
         * @return {?}
         */
        function (v) {
            this._overflowCount = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BadgeComponent.prototype, "hot", {
        set: /**
         * @param {?} v
         * @return {?}
         */
        function (v) {
            this._hot = v;
            this.setCls();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BadgeComponent.prototype, "setStyle", {
        set: /**
         * @param {?} v
         * @return {?}
         */
        function (v) {
            this.style = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BadgeComponent.prototype, "className", {
        set: /**
         * @param {?} v
         * @return {?}
         */
        function (v) {
            var _this = this;
            this._setClass = v;
            /** @type {?} */
            var clsArr = this._setClass.split(' ');
            clsArr.forEach((/**
             * @param {?} cls
             * @return {?}
             */
            function (cls) {
                _this.render.addClass(_this._ref.nativeElement, cls);
            }));
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @return {?}
     */
    BadgeComponent.prototype.setCls = /**
     * @return {?}
     */
    function () {
        var _a;
        this.scrollNumberCls = (_a = {},
            _a[this.prefixCls + "-dot"] = this._dot,
            _a[this.prefixCls + "-dot-large"] = this._dot && this._size === 'large',
            _a[this.prefixCls + "-text"] = !this._dot && !this._corner,
            _a[this.prefixCls + "-corner"] = this._corner,
            _a[this.prefixCls + "-corner-large"] = this._corner && this._size === 'large',
            _a);
        this.clsBadgeWrp = !this._children;
        this.clsBadgeCornerWrp = this._corner;
        this.clsBadgeHot = !!this._hot;
        this.clsBadgeCornerWrpLg = this._corner && this._size === 'large';
    };
    /**
     * @return {?}
     */
    BadgeComponent.prototype.ngOnChanges = /**
     * @return {?}
     */
    function () {
        if (typeof this._text === 'number' && this._text > this._overflowCount) {
            this._text = this._overflowCount + '+';
        }
    };
    /**
     * @return {?}
     */
    BadgeComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        this.setCls();
    };
    /**
     * @return {?}
     */
    BadgeComponent.prototype.ngAfterViewInit = /**
     * @return {?}
     */
    function () {
        var _this = this;
        setTimeout((/**
         * @return {?}
         */
        function () {
            if (_this._ref.nativeElement.children.length > 1 ||
                (_this._ref.nativeElement.children.length === 1 && !_this.dot && !_this.text)) {
                _this._children = true;
                _this.setCls();
            }
        }), 10);
    };
    BadgeComponent.decorators = [
        { type: Component, args: [{
                    selector: 'Badge, nzm-badge',
                    template: "<ng-content></ng-content>\n<sup *ngIf=\"dot || text\" [ngClass]=\"scrollNumberCls\" [ngStyle]=\"style\">\n  <span>{{ text }}</span>\n</sup>\n"
                }] }
    ];
    /** @nocollapse */
    BadgeComponent.ctorParameters = function () { return [
        { type: ElementRef },
        { type: Renderer2 }
    ]; };
    BadgeComponent.propDecorators = {
        size: [{ type: Input }],
        text: [{ type: Input }],
        corner: [{ type: Input }],
        dot: [{ type: Input }],
        overflowCount: [{ type: Input }],
        hot: [{ type: Input }],
        setStyle: [{ type: Input }],
        className: [{ type: Input }],
        clsBadge: [{ type: HostBinding, args: ['class.am-badge',] }],
        clsBadgeWrp: [{ type: HostBinding, args: ['class.am-badge-not-a-wrapper',] }],
        clsBadgeCornerWrp: [{ type: HostBinding, args: ['class.am-badge-corner-wrapper',] }],
        clsBadgeHot: [{ type: HostBinding, args: ['class.am-badge-hot',] }],
        clsBadgeCornerWrpLg: [{ type: HostBinding, args: ['class.am-badge-corner-wrapper-large',] }]
    };
    return BadgeComponent;
}());
if (false) {
    /** @type {?} */
    BadgeComponent.prototype.prefixCls;
    /** @type {?} */
    BadgeComponent.prototype.scrollNumberCls;
    /** @type {?} */
    BadgeComponent.prototype.style;
    /**
     * @type {?}
     * @private
     */
    BadgeComponent.prototype._text;
    /**
     * @type {?}
     * @private
     */
    BadgeComponent.prototype._setClass;
    /**
     * @type {?}
     * @private
     */
    BadgeComponent.prototype._size;
    /**
     * @type {?}
     * @private
     */
    BadgeComponent.prototype._dot;
    /**
     * @type {?}
     * @private
     */
    BadgeComponent.prototype._hot;
    /**
     * @type {?}
     * @private
     */
    BadgeComponent.prototype._corner;
    /**
     * @type {?}
     * @private
     */
    BadgeComponent.prototype._children;
    /**
     * @type {?}
     * @private
     */
    BadgeComponent.prototype._overflowCount;
    /** @type {?} */
    BadgeComponent.prototype.clsBadge;
    /** @type {?} */
    BadgeComponent.prototype.clsBadgeWrp;
    /** @type {?} */
    BadgeComponent.prototype.clsBadgeCornerWrp;
    /** @type {?} */
    BadgeComponent.prototype.clsBadgeHot;
    /** @type {?} */
    BadgeComponent.prototype.clsBadgeCornerWrpLg;
    /**
     * @type {?}
     * @private
     */
    BadgeComponent.prototype._ref;
    /**
     * @type {?}
     * @private
     */
    BadgeComponent.prototype.render;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var BadgeModule = /** @class */ (function () {
    function BadgeModule() {
    }
    BadgeModule.decorators = [
        { type: NgModule, args: [{
                    exports: [BadgeComponent],
                    declarations: [BadgeComponent],
                    imports: [CommonModule, FormsModule]
                },] }
    ];
    return BadgeModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
// tslint:disable-next-line:no-any
/**
 * @param {?} value
 * @return {?}
 */
function isTemplateRef(value) {
    return value instanceof TemplateRef;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var InputItemComponent = /** @class */ (function () {
    function InputItemComponent(element, render) {
        this.element = element;
        this.render = render;
        this.prefixCls = 'am-input';
        this.setFocus = {};
        this.pattern = '';
        this.autoFocus = false;
        this.inputType = 'text';
        this.ngTemplate = false;
        this.isTemplateRef = isTemplateRef;
        this._type = 'text';
        this._defaultValue = '';
        this._placeholder = '';
        this._editable = true;
        this._disabled = false;
        this._clear = false;
        this._error = false;
        this._extra = '';
        this._labelNumber = 5;
        this._updatePlaceholder = false;
        this._prefixListCls = 'am-list';
        this._moneyKeyboardAlign = 'right';
        this._focus = false;
        this._isClear = false;
        this._content = '';
        this._inputLock = false;
        this.onChange = new EventEmitter();
        this.onBlur = new EventEmitter();
        this.onFocus = new EventEmitter();
        this.onErrorClick = new EventEmitter();
        this.onExtraClick = new EventEmitter();
        this.clsItem = true;
        this.clsDisabled = this._disabled;
        this.clsError = this._error;
        this.clsFocus = this._focus;
        this.clsAndroid = this._focus;
        this._onChange = (/**
         * @param {?} _
         * @return {?}
         */
        function (_) { });
        this._el = element.nativeElement;
    }
    Object.defineProperty(InputItemComponent.prototype, "type", {
        get: /**
         * @return {?}
         */
        function () {
            return this._type;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (value && value.length > 0) {
                this.inputType = value;
                if (value === 'bankCard' || value === 'phone') {
                    this._type = 'tel';
                }
                else if (value === 'password') {
                    this._type = 'password';
                }
                else if (value === 'digit') {
                    this._type = 'number';
                }
                else if (value !== 'text' && value !== 'number') {
                    this._type = value;
                }
                if (value === 'number') {
                    this.pattern = '[0-9]*';
                }
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(InputItemComponent.prototype, "value", {
        get: /**
         * @return {?}
         */
        function () {
            return this._value;
        },
        set: /**
         * @param {?} v
         * @return {?}
         */
        function (v) {
            if (typeof v === 'undefined' || v === null) {
                this._value = '';
            }
            else {
                this._value = v;
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(InputItemComponent.prototype, "defaultValue", {
        get: /**
         * @return {?}
         */
        function () {
            return this._defaultValue;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._defaultValue = value;
            if (!this._value) {
                this._value = this._defaultValue;
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(InputItemComponent.prototype, "placeholder", {
        get: /**
         * @return {?}
         */
        function () {
            return this._placeholder;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._placeholder = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(InputItemComponent.prototype, "editable", {
        get: /**
         * @return {?}
         */
        function () {
            return this._editable;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._editable = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(InputItemComponent.prototype, "disabled", {
        get: /**
         * @return {?}
         */
        function () {
            return this._disabled;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._disabled = value;
            this.clsDisabled = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(InputItemComponent.prototype, "clear", {
        get: /**
         * @return {?}
         */
        function () {
            return this._clear;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._clear = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(InputItemComponent.prototype, "maxLength", {
        get: /**
         * @return {?}
         */
        function () {
            return this._maxLength;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._maxLength = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(InputItemComponent.prototype, "error", {
        get: /**
         * @return {?}
         */
        function () {
            return this._error;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._error = value;
            this.clsError = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(InputItemComponent.prototype, "extra", {
        get: /**
         * @return {?}
         */
        function () {
            return this._extra;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (value instanceof TemplateRef) {
                this.ngTemplate = true;
            }
            else {
                this.ngTemplate = false;
            }
            this._extra = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(InputItemComponent.prototype, "labelNumber", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._labelNumber = value;
            this.setCls();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(InputItemComponent.prototype, "updatePlaceholder", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._updatePlaceholder = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(InputItemComponent.prototype, "prefixListCls", {
        get: /**
         * @return {?}
         */
        function () {
            return this._prefixListCls;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._prefixListCls = value;
            this.render.addClass(this._el, value + '-item');
            this.render.addClass(this._el, value + '-item-middle');
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(InputItemComponent.prototype, "name", {
        get: /**
         * @return {?}
         */
        function () {
            return this._name;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._name = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(InputItemComponent.prototype, "moneyKeyboardAlign", {
        get: /**
         * @return {?}
         */
        function () {
            return this._moneyKeyboardAlign;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._moneyKeyboardAlign = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(InputItemComponent.prototype, "locale", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._locale = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(InputItemComponent.prototype, "fontColor", {
        get: /**
         * @return {?}
         */
        function () {
            return this._fontColor;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._fontColor = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(InputItemComponent.prototype, "focus", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (value && value.focus) {
                this.autoFocus = value.focus;
                if (this._type === 'money') {
                    this.setFocus = value;
                }
                else if (this.inputElementRef) {
                    this._focus = true;
                    this.inputElementRef.nativeElement.focus();
                    this.inputFocus('');
                }
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(InputItemComponent.prototype, "content", {
        get: /**
         * @return {?}
         */
        function () {
            return this._content;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._content = value;
            this.setCls();
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @return {?}
     */
    InputItemComponent.prototype.setCls = /**
     * @return {?}
     */
    function () {
        var _a, _b;
        if (this.lableRef.nativeElement.children.length > 0 ||
            (this.lableRef.nativeElement && this.lableRef.nativeElement.innerText !== '') ||
            this._content != undefined) {
            this.labelCls = (_a = {},
                _a[this.prefixCls + "-label"] = true,
                _a[this.prefixCls + "-label-2"] = this._labelNumber === 2,
                _a[this.prefixCls + "-label-3"] = this._labelNumber === 3,
                _a[this.prefixCls + "-label-4"] = this._labelNumber === 4,
                _a[this.prefixCls + "-label-5"] = this._labelNumber === 5,
                _a[this.prefixCls + "-label-6"] = this._labelNumber === 6,
                _a[this.prefixCls + "-label-7"] = this._labelNumber === 7,
                _a);
        }
        this.controlCls = (_b = {}, _b[this.prefixCls + "-control"] = true, _b);
    };
    /**
     * @param {?} e
     * @return {?}
     */
    InputItemComponent.prototype.inputChange = /**
     * @param {?} e
     * @return {?}
     */
    function (e) {
        var _this = this;
        setTimeout((/**
         * @return {?}
         */
        function () {
            if (_this._inputLock && _this.inputType === 'text') {
                return;
            }
            /** @type {?} */
            var value = e;
            switch (_this.inputType) {
                case 'text':
                    break;
                case 'bankCard':
                    value = value.replace(/\D/g, '').replace(/(....)(?=.)/g, '$1 ');
                    break;
                case 'phone':
                    value = value.replace(/\D/g, '').substring(0, 11);
                    /** @type {?} */
                    var valueLen = value.length;
                    if (valueLen > 3 && valueLen < 8) {
                        value = value.substr(0, 3) + " " + value.substr(3);
                    }
                    else if (valueLen >= 8) {
                        value = value.substr(0, 3) + " " + value.substr(3, 4) + " " + value.substr(7);
                    }
                    break;
                case 'number':
                    value = value.replace(/\D/g, '');
                    break;
                case 'password':
                    break;
                default:
                    _this._value = value;
                    break;
            }
            _this._value = value;
            _this._onChange(_this._value);
            _this.onChange.emit(_this._value);
        }), 0);
    };
    /**
     * @return {?}
     */
    InputItemComponent.prototype.compositionStart = /**
     * @return {?}
     */
    function () {
        this._inputLock = true;
    };
    /**
     * @return {?}
     */
    InputItemComponent.prototype.compositionEnd = /**
     * @return {?}
     */
    function () {
        this._inputLock = false;
    };
    /**
     * @param {?} value
     * @return {?}
     */
    InputItemComponent.prototype.inputFocus = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        var _this = this;
        if (!this._editable && document.activeElement instanceof HTMLElement) {
            document.activeElement.blur();
        }
        setTimeout((/**
         * @return {?}
         */
        function () {
            _this._focus = true;
            _this.clsFocus = true;
            _this.clsAndroid = true;
        }), 100);
        this.onFocus.emit(value);
    };
    /**
     * @param {?} value
     * @return {?}
     */
    InputItemComponent.prototype.inputBlur = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        var _this = this;
        setTimeout((/**
         * @return {?}
         */
        function () {
            if (!_this._isClear) {
                _this._focus = false;
                _this.clsFocus = false;
                _this.clsAndroid = false;
                _this.onBlur.emit(value);
            }
            _this._isClear = false;
        }), 100);
    };
    /**
     * @return {?}
     */
    InputItemComponent.prototype.clearInput = /**
     * @return {?}
     */
    function () {
        if (this._type !== 'password' && this._updatePlaceholder) {
            this._placeholder = this._value;
        }
        this._value = '';
        this.onChange.emit(this._value);
        this._onChange(this._value);
        this._isClear = true;
        this.inputFocus(this._value);
    };
    /**
     * @param {?} e
     * @return {?}
     */
    InputItemComponent.prototype.errorClick = /**
     * @param {?} e
     * @return {?}
     */
    function (e) {
        if (this.onErrorClick) {
            this.onErrorClick.emit(e);
        }
    };
    /**
     * @param {?} e
     * @return {?}
     */
    InputItemComponent.prototype.extraClick = /**
     * @param {?} e
     * @return {?}
     */
    function (e) {
        if (this.onExtraClick) {
            this.onExtraClick.emit(e);
        }
    };
    /**
     * @param {?} value
     * @return {?}
     */
    InputItemComponent.prototype.writeValue = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        if (typeof value === undefined || value === null) {
            this._value = '';
        }
        else {
            this._value = value;
        }
    };
    /**
     * @param {?} fn
     * @return {?}
     */
    InputItemComponent.prototype.registerOnChange = /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) {
        this._onChange = fn;
    };
    /**
     * @param {?} fn
     * @return {?}
     */
    InputItemComponent.prototype.registerOnTouched = /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) { };
    /**
     * @return {?}
     */
    InputItemComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        this.setCls();
        this.render.addClass(this._el, this._prefixListCls + '-item');
        this.render.addClass(this._el, this._prefixListCls + '-item-middle');
    };
    /**
     * @return {?}
     */
    InputItemComponent.prototype.ngAfterViewInit = /**
     * @return {?}
     */
    function () {
        var _this = this;
        setTimeout((/**
         * @return {?}
         */
        function () {
            _this.setCls();
        }), 0);
    };
    InputItemComponent.decorators = [
        { type: Component, args: [{
                    selector: 'InputItem, nzm-input-item',
                    template: "<div class=\"{{ prefixListCls }}-line\">\n  <div #lableContent [ngClass]=\"labelCls\">\n    <ng-template *ngIf=\"isTemplateRef(content)\" [ngTemplateOutlet]=\"content\"></ng-template>\n    <ng-container *ngIf=\"!isTemplateRef(content)\">{{ content }}</ng-container>\n  </div>\n  <div [ngClass]=\"controlCls\">\n    <CustomInput\n      *ngIf=\"type === 'money'\"\n      [value]=\"value\"\n      [defaultValue]=\"defaultValue\"\n      [placeholder]=\"placeholder\"\n      [disabled]=\"disabled\"\n      [editable]=\"editable\"\n      [fontColor]=\"fontColor\"\n      [moneyKeyboardAlign]=\"moneyKeyboardAlign\"\n      [setFocus]=\"setFocus\"\n      [maxLength]=\"maxLength\"\n      (onChange)=\"inputChange($event)\"\n      (onBlur)=\"inputBlur(value)\"\n      (onFocus)=\"inputFocus(value)\"\n    >\n    </CustomInput>\n    <div *ngIf=\"type !== 'money'\">\n      <input\n        #inputElement\n        [type]=\"type\"\n        [name]=\"name\"\n        [(ngModel)]=\"value\"\n        [defaultValue]=\"defaultValue\"\n        [placeholder]=\"placeholder\"\n        [disabled]=\"disabled\"\n        [readOnly]=\"!editable\"\n        [autofocus]=\"autoFocus\"\n        [maxlength]=\"maxLength\"\n        [pattern]=\"pattern\"\n        [style.color]=\"fontColor\"\n        (ngModelChange)=\"inputChange($event)\"\n        (compositionstart)=\"compositionStart()\"\n        (compositionend)=\"compositionEnd()\"\n        (blur)=\"inputBlur(value)\"\n        (focus)=\"inputFocus(value)\"\n        style=\"outline:none\"\n      />\n    </div>\n  </div>\n  <div\n    *ngIf=\"clear && editable && !disabled && (value && value.length > 0)\"\n    class=\"{{ prefixCls }}-clear\"\n    (click)=\"clearInput()\"\n  ></div>\n  <div *ngIf=\"error\" class=\"{{ prefixCls }}-error-extra\" (click)=\"errorClick($event)\"></div>\n  <div *ngIf=\"extra !== ''\" class=\"{{ prefixCls }}-extra\" (click)=\"extraClick($event)\">\n    <ng-container *ngIf=\"!ngTemplate\">{{ extra }}</ng-container>\n    <ng-template *ngIf=\"ngTemplate\" [ngTemplateOutlet]=\"extra\"></ng-template>\n  </div>\n</div>\n",
                    providers: [
                        {
                            provide: NG_VALUE_ACCESSOR,
                            useExisting: forwardRef((/**
                             * @return {?}
                             */
                            function () { return InputItemComponent; })),
                            multi: true
                        }
                    ]
                }] }
    ];
    /** @nocollapse */
    InputItemComponent.ctorParameters = function () { return [
        { type: ElementRef },
        { type: Renderer2 }
    ]; };
    InputItemComponent.propDecorators = {
        lableRef: [{ type: ViewChild, args: ['lableContent', { static: true },] }],
        inputElementRef: [{ type: ViewChild, args: ['inputElement', { static: false },] }],
        type: [{ type: Input }],
        value: [{ type: Input }],
        defaultValue: [{ type: Input }],
        placeholder: [{ type: Input }],
        editable: [{ type: Input }],
        disabled: [{ type: Input }],
        clear: [{ type: Input }],
        maxLength: [{ type: Input }],
        error: [{ type: Input }],
        extra: [{ type: Input }],
        labelNumber: [{ type: Input }],
        updatePlaceholder: [{ type: Input }],
        prefixListCls: [{ type: Input }],
        name: [{ type: Input }],
        moneyKeyboardAlign: [{ type: Input }],
        locale: [{ type: Input }],
        fontColor: [{ type: Input }],
        focus: [{ type: Input }],
        content: [{ type: Input }],
        onChange: [{ type: Output }],
        onBlur: [{ type: Output }],
        onFocus: [{ type: Output }],
        onErrorClick: [{ type: Output }],
        onExtraClick: [{ type: Output }],
        clsItem: [{ type: HostBinding, args: ['class.am-input-item',] }],
        clsDisabled: [{ type: HostBinding, args: ['class.am-input-disabled',] }],
        clsError: [{ type: HostBinding, args: ['class.am-input-error',] }],
        clsFocus: [{ type: HostBinding, args: ['class.am-input-focus',] }],
        clsAndroid: [{ type: HostBinding, args: ['class.am-input-android,',] }]
    };
    return InputItemComponent;
}());
if (false) {
    /** @type {?} */
    InputItemComponent.prototype.prefixCls;
    /** @type {?} */
    InputItemComponent.prototype.wrapCls;
    /** @type {?} */
    InputItemComponent.prototype.labelCls;
    /** @type {?} */
    InputItemComponent.prototype.controlCls;
    /** @type {?} */
    InputItemComponent.prototype.setFocus;
    /** @type {?} */
    InputItemComponent.prototype.pattern;
    /** @type {?} */
    InputItemComponent.prototype.autoFocus;
    /** @type {?} */
    InputItemComponent.prototype.inputType;
    /** @type {?} */
    InputItemComponent.prototype.ngTemplate;
    /** @type {?} */
    InputItemComponent.prototype.isTemplateRef;
    /**
     * @type {?}
     * @private
     */
    InputItemComponent.prototype._el;
    /**
     * @type {?}
     * @private
     */
    InputItemComponent.prototype._type;
    /**
     * @type {?}
     * @private
     */
    InputItemComponent.prototype._value;
    /**
     * @type {?}
     * @private
     */
    InputItemComponent.prototype._defaultValue;
    /**
     * @type {?}
     * @private
     */
    InputItemComponent.prototype._placeholder;
    /**
     * @type {?}
     * @private
     */
    InputItemComponent.prototype._editable;
    /**
     * @type {?}
     * @private
     */
    InputItemComponent.prototype._disabled;
    /**
     * @type {?}
     * @private
     */
    InputItemComponent.prototype._clear;
    /**
     * @type {?}
     * @private
     */
    InputItemComponent.prototype._maxLength;
    /**
     * @type {?}
     * @private
     */
    InputItemComponent.prototype._error;
    /**
     * @type {?}
     * @private
     */
    InputItemComponent.prototype._extra;
    /**
     * @type {?}
     * @private
     */
    InputItemComponent.prototype._labelNumber;
    /**
     * @type {?}
     * @private
     */
    InputItemComponent.prototype._updatePlaceholder;
    /**
     * @type {?}
     * @private
     */
    InputItemComponent.prototype._prefixListCls;
    /**
     * @type {?}
     * @private
     */
    InputItemComponent.prototype._name;
    /**
     * @type {?}
     * @private
     */
    InputItemComponent.prototype._moneyKeyboardAlign;
    /**
     * @type {?}
     * @private
     */
    InputItemComponent.prototype._locale;
    /**
     * @type {?}
     * @private
     */
    InputItemComponent.prototype._focus;
    /**
     * @type {?}
     * @private
     */
    InputItemComponent.prototype._isClear;
    /**
     * @type {?}
     * @private
     */
    InputItemComponent.prototype._fontColor;
    /**
     * @type {?}
     * @private
     */
    InputItemComponent.prototype._content;
    /**
     * @type {?}
     * @private
     */
    InputItemComponent.prototype._inputLock;
    /** @type {?} */
    InputItemComponent.prototype.lableRef;
    /** @type {?} */
    InputItemComponent.prototype.inputElementRef;
    /** @type {?} */
    InputItemComponent.prototype.onChange;
    /** @type {?} */
    InputItemComponent.prototype.onBlur;
    /** @type {?} */
    InputItemComponent.prototype.onFocus;
    /** @type {?} */
    InputItemComponent.prototype.onErrorClick;
    /** @type {?} */
    InputItemComponent.prototype.onExtraClick;
    /** @type {?} */
    InputItemComponent.prototype.clsItem;
    /** @type {?} */
    InputItemComponent.prototype.clsDisabled;
    /** @type {?} */
    InputItemComponent.prototype.clsError;
    /** @type {?} */
    InputItemComponent.prototype.clsFocus;
    /** @type {?} */
    InputItemComponent.prototype.clsAndroid;
    /** @type {?} */
    InputItemComponent.prototype._onChange;
    /**
     * @type {?}
     * @private
     */
    InputItemComponent.prototype.element;
    /**
     * @type {?}
     * @private
     */
    InputItemComponent.prototype.render;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/** @type {?} */
var LOCAL_PROVIDER_TOKEN = new InjectionToken('locale-provider-token');

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var Picker = {
    okText: '确定',
    dismissText: '取消',
    extra: '请选择'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
// import DatePickerLocale from 'rmc-date-picker/lib/locale/zh_CN';
var DatePicker = {
    errorMessage: '当前时间与设定最大或最小日期格式不一致',
    curTMorethanMax: '当前时间大于设定最大日期',
    curTLessthanMin: '当前时间小于设定最最小日期',
    okText: '确定',
    dismissText: '取消',
    extra: '请选择',
    // DatePickerLocale,
    year: '年',
    month: '月',
    day: '日',
    hour: '时',
    minute: '分',
    am: '上午',
    pm: '下午'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
// import DatePickerLocale from 'rmc-date-picker/lib/locale/zh_CN';
var DatePickerView = {
    okText: '确定',
    dismissText: '取消',
    extra: '请选择',
    // DatePickerLocale,
    year: '年',
    month: '月',
    day: '日',
    hour: '时',
    minute: '分',
    am: '上午',
    pm: '下午'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var Menu = {
    okText: '确定',
    cancelText: '取消'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
// 同步自 'rmc-calendar/lib/locale/zh_CN';
var zhCN = {
    title: '日期选择',
    today: '今天',
    month: '月',
    year: '年',
    am: '上午',
    pm: '下午',
    dateTimeFormat: 'yyyy年MM月dd日 星期w hh:mm',
    dateFormat: 'yyyy年MM月dd日 星期w',
    noChoose: '未选择',
    week: ['日', '一', '二', '三', '四', '五', '六'],
    clear: '清除',
    selectTime: '选择时间',
    selectStartTime: '选择开始时间',
    selectEndTime: '选择结束时间',
    start: '开始',
    end: '结束',
    begin: '起',
    over: '止',
    begin_over: '起/止',
    confirm: '确认',
    monthTitle: 'yyyy年MM月',
    loadPrevMonth: '加载上一个月',
    yesterday: '昨天',
    lastWeek: '近一周',
    lastMonth: '近一个月'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var SearchBar = {
    cancelText: '取消'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var InputItem = {
    confirmLabel: '确定',
    backspaceLabel: '退格',
    cancelKeyboardLabel: '收起键盘'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var Pagination = {
    prevText: '上一页',
    nextText: '下一页'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var PullToRefresh = {
    activateText: '松开立即刷新',
    deactivateText: '下拉可以刷新',
    finishText: '完成刷新'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var ActionSheet = {
    dismissText: '取消'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var zh_CN = {
    locale: 'zh_CN',
    Picker: Picker,
    DatePicker: DatePicker,
    DatePickerView: DatePickerView,
    Menu: Menu,
    Calendar: zhCN,
    SearchBar: SearchBar,
    InputItem: InputItem,
    Pagination: Pagination,
    PullToRefresh: PullToRefresh,
    ActionSheet: ActionSheet
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var LocaleProviderService = /** @class */ (function () {
    function LocaleProviderService(locale) {
        this._change = new BehaviorSubject(this._locale);
        this.setLocale(locale || zh_CN);
    }
    Object.defineProperty(LocaleProviderService.prototype, "localeChange", {
        get: /**
         * @return {?}
         */
        function () {
            return this._change.asObservable();
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @param {?} keyPath
     * @return {?}
     */
    LocaleProviderService.prototype.getLocaleValue = /**
     * @param {?} keyPath
     * @return {?}
     */
    function (keyPath) {
        /** @type {?} */
        var content = (/** @type {?} */ (this._getObjectPath(this._locale, keyPath)));
        if (typeof content === 'string') {
            return content;
        }
        return '';
    };
    /**
     * @param {?} keyPath
     * @return {?}
     */
    LocaleProviderService.prototype.getLocaleSubObj = /**
     * @param {?} keyPath
     * @return {?}
     */
    function (keyPath) {
        /** @type {?} */
        var content = (/** @type {?} */ (this._getObjectPath(this._locale, keyPath)));
        if (typeof content === 'object') {
            return content;
        }
        return null;
    };
    /**
     * @param {?} locale
     * @return {?}
     */
    LocaleProviderService.prototype.setLocale = /**
     * @param {?} locale
     * @return {?}
     */
    function (locale) {
        if (!locale || (this._locale && this._locale.locale === locale.locale)) {
            return;
        }
        this._locale = locale;
        this._change.next(locale);
    };
    /**
     * @return {?}
     */
    LocaleProviderService.prototype.getLocaleId = /**
     * @return {?}
     */
    function () {
        return this._locale && this._locale.locale ? this._locale.locale : '';
    };
    /**
     * @return {?}
     */
    LocaleProviderService.prototype.getLocale = /**
     * @return {?}
     */
    function () {
        return this._locale;
    };
    /**
     * @private
     * @param {?} obj
     * @param {?} path
     * @return {?}
     */
    LocaleProviderService.prototype._getObjectPath = /**
     * @private
     * @param {?} obj
     * @param {?} path
     * @return {?}
     */
    function (obj, path) {
        /** @type {?} */
        var res = obj;
        /** @type {?} */
        var paths = path.split('.');
        /** @type {?} */
        var depth = paths.length;
        /** @type {?} */
        var index = 0;
        while (res && index < depth) {
            res = res[paths[index++]];
        }
        return index === depth ? res : null;
    };
    LocaleProviderService.decorators = [
        { type: Injectable }
    ];
    /** @nocollapse */
    LocaleProviderService.ctorParameters = function () { return [
        { type: undefined, decorators: [{ type: Inject, args: [LOCAL_PROVIDER_TOKEN,] }] }
    ]; };
    return LocaleProviderService;
}());
if (false) {
    /**
     * @type {?}
     * @private
     */
    LocaleProviderService.prototype._locale;
    /**
     * @type {?}
     * @private
     */
    LocaleProviderService.prototype._change;
}
/**
 * @param {?} exist
 * @param {?} locale
 * @return {?}
 */
function LOCALE_PROVIDER_SERVICE_FACTORY(exist, locale) {
    return exist || new LocaleProviderService(locale);
}
/** @type {?} */
var LOCALE_PROVIDER_SERVICE_PROVIDER = {
    provide: LocaleProviderService,
    useFactory: LOCALE_PROVIDER_SERVICE_FACTORY,
    deps: [[new Optional(), new SkipSelf(), LocaleProviderService], LOCAL_PROVIDER_TOKEN]
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var CustomKeyboardComponent = /** @class */ (function () {
    function CustomKeyboardComponent(_localeProvider) {
        this._localeProvider = _localeProvider;
        this.prefixCls = 'am-number-keyboard';
        this.okText = '';
        this._locale = {};
        this._unsubscribe$ = new Subject();
        this.onClick = new EventEmitter();
    }
    /**
     * @param {?} e
     * @return {?}
     */
    CustomKeyboardComponent.prototype.tdClick = /**
     * @param {?} e
     * @return {?}
     */
    function (e) {
        this.onClick.emit(e);
    };
    /**
     * @return {?}
     */
    CustomKeyboardComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        var _a, _b;
        var _this = this;
        this.wrapCls = (_a = {},
            _a[this.prefixCls + "-item"] = true,
            _a);
        this.wrapperCls = (_b = {},
            _b[this.prefixCls + "-wrapper"] = true,
            _b);
        this._localeProvider.localeChange.pipe(takeUntil(this._unsubscribe$)).subscribe((/**
         * @param {?} _
         * @return {?}
         */
        function (_) {
            _this._locale = _this._localeProvider.getLocaleSubObj('InputItem');
            _this.okText = _this._locale.confirmLabel;
        }));
    };
    /**
     * @return {?}
     */
    CustomKeyboardComponent.prototype.ngOnDestroy = /**
     * @return {?}
     */
    function () {
        this._unsubscribe$.next();
        this._unsubscribe$.complete();
    };
    CustomKeyboardComponent.decorators = [
        { type: Component, args: [{
                    selector: 'CustomKeyboard',
                    template: "<div [ngClass]=\"wrapperCls\">\n  <table>\n    <tbody>\n      <tr>\n        <td [ngClass]=\"wrapCls\" (click)=\"tdClick(1)\">1</td>\n        <td [ngClass]=\"wrapCls\" (click)=\"tdClick(2)\">2</td>\n        <td [ngClass]=\"wrapCls\" (click)=\"tdClick(3)\">3</td>\n        <td class=\"keyboard-delete\" [rowSpan]=\"2\" [ngClass]=\"wrapCls\" (click)=\"tdClick('delete')\"></td>\n      </tr>\n      <tr>\n        <td [ngClass]=\"wrapCls\" (click)=\"tdClick(4)\">4</td>\n        <td [ngClass]=\"wrapCls\" (click)=\"tdClick(5)\">5</td>\n        <td [ngClass]=\"wrapCls\" (click)=\"tdClick(6)\">6</td>\n      </tr>\n      <tr>\n        <td [ngClass]=\"wrapCls\" (click)=\"tdClick(7)\">7</td>\n        <td [ngClass]=\"wrapCls\" (click)=\"tdClick(8)\">8</td>\n        <td [ngClass]=\"wrapCls\" (click)=\"tdClick(9)\">9</td>\n        <td class=\"keyboard-confirm\" [rowSpan]=\"2\" [ngClass]=\"wrapCls\" (click)=\"tdClick('confirm')\">{{ okText }}</td>\n      </tr>\n      <tr>\n        <td [ngClass]=\"wrapCls\" (click)=\"tdClick('.')\">.</td>\n        <td [ngClass]=\"wrapCls\" (click)=\"tdClick(0)\">0</td>\n        <td class=\"keyboard-hide\" [ngClass]=\"wrapCls\" (click)=\"tdClick('hide')\"></td>\n      </tr>\n    </tbody>\n  </table>\n</div>\n",
                    encapsulation: ViewEncapsulation.None,
                    providers: [LocaleProviderService]
                }] }
    ];
    /** @nocollapse */
    CustomKeyboardComponent.ctorParameters = function () { return [
        { type: LocaleProviderService }
    ]; };
    CustomKeyboardComponent.propDecorators = {
        onClick: [{ type: Output }]
    };
    return CustomKeyboardComponent;
}());
if (false) {
    /** @type {?} */
    CustomKeyboardComponent.prototype.prefixCls;
    /** @type {?} */
    CustomKeyboardComponent.prototype.wrapCls;
    /** @type {?} */
    CustomKeyboardComponent.prototype.okText;
    /** @type {?} */
    CustomKeyboardComponent.prototype.wrapperCls;
    /**
     * @type {?}
     * @private
     */
    CustomKeyboardComponent.prototype._locale;
    /**
     * @type {?}
     * @private
     */
    CustomKeyboardComponent.prototype._unsubscribe$;
    /** @type {?} */
    CustomKeyboardComponent.prototype.onClick;
    /**
     * @type {?}
     * @private
     */
    CustomKeyboardComponent.prototype._localeProvider;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var CustomInputService = /** @class */ (function () {
    function CustomInputService(_appRef, _cfr) {
        this._appRef = _appRef;
        this._cfr = _cfr;
        CustomInputService.appRef = this._appRef;
        CustomInputService._inputCompFactory = this._cfr.resolveComponentFactory(CustomKeyboardComponent);
    }
    /**
     * @return {?}
     */
    CustomInputService.getShowStatus = /**
     * @return {?}
     */
    function () {
        return CustomInputService.isShow;
    };
    /**
     * @return {?}
     */
    CustomInputService.showKeyboard = /**
     * @return {?}
     */
    function () {
        var _a;
        var _this = this;
        if (!this.isShow) {
            if (this.compRef) {
                this.compRef.instance.wrapperCls = (_a = {},
                    _a["am-number-keyboard-wrapper"] = true,
                    _a);
            }
            else {
                /** @type {?} */
                var container = document.querySelector("#" + this._keyboardPrefixCls + "-container");
                if (!container) {
                    container = document.createElement('div');
                    container.setAttribute('id', this._keyboardPrefixCls + "-container");
                    document.body.appendChild(container);
                    container.appendChild(document.createElement(CustomInputService._inputCompFactory.selector));
                    this.compRef = this.appRef.bootstrap(CustomInputService._inputCompFactory);
                    this.compRef.instance.onClick.subscribe((/**
                     * @param {?} e
                     * @return {?}
                     */
                    function (e) {
                        _this.clickValue = e;
                    }));
                }
            }
            this.isShow = true;
        }
    };
    /**
     * @return {?}
     */
    CustomInputService.hideKeyboard = /**
     * @return {?}
     */
    function () {
        var _a;
        if (this.compRef && this.isShow) {
            this.isShow = false;
            this.compRef.instance.wrapperCls = (_a = {},
                _a["am-number-keyboard-wrapper"] = true,
                _a["am-number-keyboard-wrapper-hide"] = true,
                _a);
        }
    };
    CustomInputService.compRef = null;
    CustomInputService.appRef = null;
    CustomInputService.isShow = false;
    CustomInputService.clickValue = null;
    CustomInputService._inputCompFactory = null;
    CustomInputService._keyboardPrefixCls = 'am-number-keyboard';
    CustomInputService.decorators = [
        { type: Injectable }
    ];
    /** @nocollapse */
    CustomInputService.ctorParameters = function () { return [
        { type: ApplicationRef },
        { type: ComponentFactoryResolver }
    ]; };
    return CustomInputService;
}());
if (false) {
    /** @type {?} */
    CustomInputService.compRef;
    /** @type {?} */
    CustomInputService.appRef;
    /** @type {?} */
    CustomInputService.isShow;
    /** @type {?} */
    CustomInputService.clickValue;
    /** @type {?} */
    CustomInputService._inputCompFactory;
    /** @type {?} */
    CustomInputService._keyboardPrefixCls;
    /**
     * @type {?}
     * @private
     */
    CustomInputService.prototype._appRef;
    /**
     * @type {?}
     * @private
     */
    CustomInputService.prototype._cfr;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var CustomInputComponent = /** @class */ (function () {
    function CustomInputComponent(_ref, _customInputService, _ngZone) {
        var _this = this;
        this._ref = _ref;
        this._customInputService = _customInputService;
        this._ngZone = _ngZone;
        this.keyboardPrefixCls = 'am-number-keyboard';
        this.focus = false;
        this._value = '';
        this._defaultValue = '';
        this._placeholder = '';
        this._editable = true;
        this._disabled = false;
        this._setFocus = false;
        this.onChange = new EventEmitter();
        this.onBlur = new EventEmitter();
        this.onFocus = new EventEmitter();
        this.clsFakeContainer = true;
        this.inputFocus = (/**
         * @return {?}
         */
        function () {
            _this.removeBlurListener();
            /** @type {?} */
            var focus = _this.focus;
            if (!focus || _this._setFocus) {
                _this.onInputFocus();
            }
            setTimeout((/**
             * @return {?}
             */
            function () {
                _this.addBlurListener();
            }), 50);
        });
        this.doBlur = (/**
         * @param {?} ev
         * @return {?}
         */
        function (ev) {
            /** @type {?} */
            var value = _this._value;
            // 点击是否是组件本身
            /** @type {?} */
            var parentFound = false;
            // 点击目标是否是custom-input
            /** @type {?} */
            var isInput = false;
            // 点击目标是否是custom-keyboard
            /** @type {?} */
            var isKeyboard = false;
            /** @type {?} */
            var isClear = false;
            /** @type {?} */
            var target = ev.target;
            while (target && target !== null && !parentFound) {
                if (target === _this._ref.nativeElement) {
                    parentFound = true;
                }
                if (target.localName === 'custominput') {
                    isInput = true;
                }
                if (target.localName === 'customkeyboard') {
                    isKeyboard = true;
                }
                if (target.className.indexOf('am-input-clear') >= 0) {
                    isClear = true;
                }
                target = target.parentElement;
            }
            // 当点击目标是本身的时候,获取焦点、不隐藏keyboard
            // 当点击目标不是本身但是其他的custom-input时,失去焦点、不隐藏keyboard
            // 当点击目标是keyboard时,不失去焦点,不隐藏keyboard
            if (parentFound) {
                _this.focus = true;
            }
            else if (isInput) {
                _this._setFocus = false;
                _this.focus = false;
                _this.onBlur.emit(_this._value);
            }
            if (_this.focus && isKeyboard) {
                _this.focus = true;
                _this.onKeyboardClick(CustomInputService.clickValue);
            }
            if (!parentFound && !isInput && !isKeyboard && !isClear && !_this._setFocus) {
                _this.focus = false;
                _this._setFocus = false;
                _this.onBlur.emit(_this._value);
                CustomInputService.hideKeyboard();
            }
            _this.setFakeInputCls();
        });
        this.removeBlurListener = (/**
         * @return {?}
         */
        function () {
            document.removeEventListener('click', _this.doBlur, false);
        });
        this.addBlurListener = (/**
         * @return {?}
         */
        function () {
            document.addEventListener('click', _this.doBlur, false);
        });
        this.onInputBlur = (/**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            _this.focus = false;
            _this.setFakeInputCls();
            _this.onBlur.emit(_this._value);
            CustomInputService.hideKeyboard();
        });
        this.onInputFocus = (/**
         * @return {?}
         */
        function () {
            _this.onFocus.emit(_this._value);
            _this.focus = true;
            _this._setFocus = false;
            _this.setFakeInputCls();
            setTimeout((/**
             * @return {?}
             */
            function () {
                CustomInputService.showKeyboard();
            }), 100);
        });
        this.setFakeInputCls = (/**
         * @return {?}
         */
        function () {
            var _a;
            _this.fakeInputCls = (_a = {},
                _a["fake-input"] = true,
                _a['fake-input-disabled'] = _this._disabled,
                _a['focus'] = _this.focus,
                _a);
        });
        this.setContainerCls = (/**
         * @return {?}
         */
        function () {
            _this.clsFakeContainerLeft = _this._moneyKeyboardAlign === 'left';
        });
        this.onKeyboardClick = (/**
         * @param {?} keyboardItemValue
         * @return {?}
         */
        function (keyboardItemValue) {
            /** @type {?} */
            var valueAfterChange;
            // 删除键
            if (keyboardItemValue === 'delete') {
                valueAfterChange = _this._value.substring(0, _this._value.length - 1);
                _this.onChange.emit(valueAfterChange);
                // 确认键
            }
            else if (keyboardItemValue === 'confirm') {
                valueAfterChange = _this._value;
                _this.onChange.emit(valueAfterChange);
                _this.onInputBlur(_this._value);
                // 收起键
            }
            else if (keyboardItemValue === 'hide') {
                valueAfterChange = _this._value;
                _this.onInputBlur(valueAfterChange);
            }
            else {
                if (_this._maxLength !== undefined &&
                    +_this._maxLength >= 0 &&
                    (_this._value + keyboardItemValue).length > _this._maxLength) {
                    valueAfterChange = (_this._value + keyboardItemValue).substr(0, _this._maxLength);
                    _this.onChange.emit(valueAfterChange);
                }
                else {
                    valueAfterChange = _this._value + keyboardItemValue;
                    _this.onChange.emit(valueAfterChange);
                }
            }
            _this._ngZone.run((/**
             * @return {?}
             */
            function () {
                _this._value = valueAfterChange;
            }));
        });
    }
    Object.defineProperty(CustomInputComponent.prototype, "value", {
        get: /**
         * @return {?}
         */
        function () {
            return this._value;
        },
        set: /**
         * @param {?} v
         * @return {?}
         */
        function (v) {
            if (typeof v === 'undefined' || v === null) {
                this._value = '';
            }
            else if (this._maxLength !== undefined && this._maxLength >= 0) {
                this._value = v.toString().substr(0, this._maxLength);
            }
            else {
                this._value = v.toString();
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CustomInputComponent.prototype, "defaultValue", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._defaultValue = value;
            if (!this._value) {
                this._value = this._defaultValue.toString();
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CustomInputComponent.prototype, "maxLength", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._maxLength = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CustomInputComponent.prototype, "placeholder", {
        get: /**
         * @return {?}
         */
        function () {
            return this._placeholder;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._placeholder = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CustomInputComponent.prototype, "editable", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._editable = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CustomInputComponent.prototype, "disabled", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._disabled = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CustomInputComponent.prototype, "fontColor", {
        get: /**
         * @return {?}
         */
        function () {
            return this._fontColor;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._fontColor = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CustomInputComponent.prototype, "moneyKeyboardAlign", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._moneyKeyboardAlign = value;
            this.setContainerCls();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CustomInputComponent.prototype, "setFocus", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (value) {
                this._setFocus = value.focus;
                if (this._setFocus) {
                    this.inputFocus();
                }
            }
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @return {?}
     */
    CustomInputComponent.prototype.onFakeInputClick = /**
     * @return {?}
     */
    function () {
        if (this._preventKeyboard) {
            return;
        }
        this.inputFocus();
    };
    /**
     * @return {?}
     */
    CustomInputComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        this._preventKeyboard = this._disabled || !this._editable;
        this.setFakeInputCls();
        this.setContainerCls();
    };
    /**
     * @return {?}
     */
    CustomInputComponent.prototype.ngOnDestroy = /**
     * @return {?}
     */
    function () {
        this.removeBlurListener();
        if (CustomInputService) {
            CustomInputService.hideKeyboard();
            CustomInputService.compRef = null;
        }
        /** @type {?} */
        var container = document.querySelector("#" + this.keyboardPrefixCls + "-container");
        if (container) {
            container.remove();
        }
    };
    CustomInputComponent.decorators = [
        { type: Component, args: [{
                    selector: 'CustomInput',
                    template: "<div *ngIf=\"value === ''\" class=\"fake-input-placeholder\">\n  {{ placeholder }}\n</div>\n<div [ngClass]=\"fakeInputCls\" [style.color]=\"fontColor\" (click)=\"onFakeInputClick()\">\n  {{ value }}\n</div>\n",
                    encapsulation: ViewEncapsulation.None,
                    providers: [CustomInputService]
                }] }
    ];
    /** @nocollapse */
    CustomInputComponent.ctorParameters = function () { return [
        { type: ElementRef },
        { type: CustomInputService },
        { type: NgZone }
    ]; };
    CustomInputComponent.propDecorators = {
        value: [{ type: Input }],
        defaultValue: [{ type: Input }],
        maxLength: [{ type: Input }],
        placeholder: [{ type: Input }],
        editable: [{ type: Input }],
        disabled: [{ type: Input }],
        fontColor: [{ type: Input }],
        moneyKeyboardAlign: [{ type: Input }],
        setFocus: [{ type: Input }],
        onChange: [{ type: Output }],
        onBlur: [{ type: Output }],
        onFocus: [{ type: Output }],
        clsFakeContainer: [{ type: HostBinding, args: ['class.fake-input-container',] }],
        clsFakeContainerLeft: [{ type: HostBinding, args: ['class.fake-input-container-left',] }]
    };
    return CustomInputComponent;
}());
if (false) {
    /** @type {?} */
    CustomInputComponent.prototype.keyboardPrefixCls;
    /** @type {?} */
    CustomInputComponent.prototype.fakeInputCls;
    /** @type {?} */
    CustomInputComponent.prototype.focus;
    /**
     * @type {?}
     * @private
     */
    CustomInputComponent.prototype._value;
    /**
     * @type {?}
     * @private
     */
    CustomInputComponent.prototype._defaultValue;
    /**
     * @type {?}
     * @private
     */
    CustomInputComponent.prototype._placeholder;
    /**
     * @type {?}
     * @private
     */
    CustomInputComponent.prototype._maxLength;
    /**
     * @type {?}
     * @private
     */
    CustomInputComponent.prototype._editable;
    /**
     * @type {?}
     * @private
     */
    CustomInputComponent.prototype._disabled;
    /**
     * @type {?}
     * @private
     */
    CustomInputComponent.prototype._setFocus;
    /**
     * @type {?}
     * @private
     */
    CustomInputComponent.prototype._preventKeyboard;
    /**
     * @type {?}
     * @private
     */
    CustomInputComponent.prototype._moneyKeyboardAlign;
    /**
     * @type {?}
     * @private
     */
    CustomInputComponent.prototype._fontColor;
    /** @type {?} */
    CustomInputComponent.prototype.onChange;
    /** @type {?} */
    CustomInputComponent.prototype.onBlur;
    /** @type {?} */
    CustomInputComponent.prototype.onFocus;
    /** @type {?} */
    CustomInputComponent.prototype.clsFakeContainer;
    /** @type {?} */
    CustomInputComponent.prototype.clsFakeContainerLeft;
    /** @type {?} */
    CustomInputComponent.prototype.inputFocus;
    /** @type {?} */
    CustomInputComponent.prototype.doBlur;
    /** @type {?} */
    CustomInputComponent.prototype.removeBlurListener;
    /** @type {?} */
    CustomInputComponent.prototype.addBlurListener;
    /** @type {?} */
    CustomInputComponent.prototype.onInputBlur;
    /** @type {?} */
    CustomInputComponent.prototype.onInputFocus;
    /** @type {?} */
    CustomInputComponent.prototype.setFakeInputCls;
    /** @type {?} */
    CustomInputComponent.prototype.setContainerCls;
    /** @type {?} */
    CustomInputComponent.prototype.onKeyboardClick;
    /**
     * @type {?}
     * @private
     */
    CustomInputComponent.prototype._ref;
    /**
     * @type {?}
     * @private
     */
    CustomInputComponent.prototype._customInputService;
    /**
     * @type {?}
     * @private
     */
    CustomInputComponent.prototype._ngZone;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var InputItemModule = /** @class */ (function () {
    function InputItemModule() {
    }
    InputItemModule.decorators = [
        { type: NgModule, args: [{
                    exports: [InputItemComponent, CustomKeyboardComponent, CustomInputComponent],
                    declarations: [InputItemComponent, CustomKeyboardComponent, CustomInputComponent],
                    entryComponents: [CustomKeyboardComponent],
                    imports: [CommonModule, FormsModule, ReactiveFormsModule]
                },] }
    ];
    return InputItemModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var ButtonComponent = /** @class */ (function () {
    function ButtonComponent(_elementRef, _render) {
        this._elementRef = _elementRef;
        this._render = _render;
        this.prefixCls = 'am-button';
        this.ngTemplate = false;
        this._className = '';
        this._classList = [];
        this._size = 'large';
        this._loading = false;
        this._active = false;
        this._inline = false;
        this._disabled = false;
        this._icon = '';
        this._userAgent = ((/** @type {?} */ (navigator))).userAgent || ((/** @type {?} */ (navigator))).vendor || ((/** @type {?} */ (window))).opera;
        this.onClick = new EventEmitter();
        this._el = this._elementRef.nativeElement;
        this._render.addClass(this._el, this.prefixCls);
        this._className = this._el.className;
    }
    Object.defineProperty(ButtonComponent.prototype, "type", {
        get: /**
         * @return {?}
         */
        function () {
            return this._type;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._type = value;
            this.setClassMap();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ButtonComponent.prototype, "size", {
        get: /**
         * @return {?}
         */
        function () {
            return this._size;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._size = value;
            this.setClassMap();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ButtonComponent.prototype, "disabled", {
        get: /**
         * @return {?}
         */
        function () {
            return this._disabled;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._disabled = value;
            this.setClassMap();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ButtonComponent.prototype, "loading", {
        get: /**
         * @return {?}
         */
        function () {
            return this._loading;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._loading = value;
            if (this._el.querySelector('icon')) {
                /** @type {?} */
                var icon = (/** @type {?} */ (this._el.querySelector('icon')));
                icon.style.display = value ? '' : 'none';
            }
            this.setClassMap();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ButtonComponent.prototype, "inline", {
        get: /**
         * @return {?}
         */
        function () {
            return this._inline;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._inline = value;
            this.setClassMap();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ButtonComponent.prototype, "icon", {
        get: /**
         * @return {?}
         */
        function () {
            return this._icon;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (value instanceof TemplateRef) {
                this.ngTemplate = true;
                this._icon = value;
            }
            else {
                this.ngTemplate = false;
                this._icon = (/** @type {?} */ (value));
                this.setClassMap();
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ButtonComponent.prototype, "className", {
        set: /**
         * @param {?} v
         * @return {?}
         */
        function (v) {
            this._className = this._className + ' ' + v;
            this.setClassMap();
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @param {?} event
     * @return {?}
     */
    ButtonComponent.prototype.touchStart = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        if (this._disabled) {
            return;
        }
        this._active = true;
        this.setClassMap();
    };
    /**
     * @param {?} event
     * @return {?}
     */
    ButtonComponent.prototype.touchEnd = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        if (this._disabled) {
            return;
        }
        this._active = false;
        this.setClassMap();
    };
    /**
     * @param {?} event
     * @return {?}
     */
    ButtonComponent.prototype.click = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        if (this._disabled) {
            return;
        }
        this.onClick.emit();
    };
    /**
     * @param {?} value
     * @return {?}
     */
    ButtonComponent.prototype.isTemplateRef = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        if (value) {
            return value instanceof TemplateRef;
        }
        return false;
    };
    /**
     * @return {?}
     */
    ButtonComponent.prototype.ngAfterViewInit = /**
     * @return {?}
     */
    function () {
        if (this._el.querySelector('img')) {
            /** @type {?} */
            var amSize = this._size === 'small' ? 'am-icon-xxs' : 'am-icon-md';
            this._el.querySelector('img').setAttribute('class', "am-icon " + this.prefixCls + "-icon " + amSize);
            this._render.addClass(this._el, this.prefixCls + "-icon");
        }
    };
    /**
     * @private
     * @return {?}
     */
    ButtonComponent.prototype.setClassMap = /**
     * @private
     * @return {?}
     */
    function () {
        this.iconType = this._loading ? 'loading' : this._icon;
        this._classList = [
            this._type && this.prefixCls + "-" + this._type,
            this._size === 'small' && this.prefixCls + "-" + this._size,
            this._disabled && this.prefixCls + "-disabled",
            this._loading && this.prefixCls + "-loading",
            this.iconType && this.prefixCls + "-icon",
            this._active && this.prefixCls + "-active",
            this._inline && this.prefixCls + "-inline"
        ].filter((/**
         * @param {?} item
         * @return {?}
         */
        function (item) {
            return !!item;
        }));
        this._el.className = this._className + ' ' + this._classList.join(' ');
    };
    ButtonComponent.decorators = [
        { type: Component, args: [{
                    selector: '[Button], nzm-button',
                    encapsulation: ViewEncapsulation.None,
                    template: "<Icon\n  *ngIf=\"!ngTemplate\"\n  class=\"{{ prefixCls }}-icon\"\n  [type]=\"iconType\"\n  [size]=\"size === 'small' ? 'xxs' : 'md'\"\n></Icon>\n<ng-template *ngIf=\"ngTemplate\" [ngTemplateOutlet]=\"icon\"></ng-template>\n<ng-content select=\"img\"></ng-content>\n<div class=\"{{ prefixCls }}-content\">\n  <span>\n    <ng-content></ng-content>\n  </span>\n</div>\n"
                }] }
    ];
    /** @nocollapse */
    ButtonComponent.ctorParameters = function () { return [
        { type: ElementRef },
        { type: Renderer2 }
    ]; };
    ButtonComponent.propDecorators = {
        type: [{ type: Input }],
        size: [{ type: Input }],
        disabled: [{ type: Input }],
        loading: [{ type: Input }],
        inline: [{ type: Input }],
        icon: [{ type: Input }],
        className: [{ type: Input }],
        onClick: [{ type: Output }],
        touchStart: [{ type: HostListener, args: ['touchstart', ['$event'],] }, { type: HostListener, args: ['mousedown', ['$event'],] }],
        touchEnd: [{ type: HostListener, args: ['touchend', ['$event'],] }, { type: HostListener, args: ['mouseup', ['$event'],] }, { type: HostListener, args: ['touchmove', ['$event'],] }, { type: HostListener, args: ['mousemove', ['$event'],] }, { type: HostListener, args: ['touchcancel', ['$event'],] }],
        click: [{ type: HostListener, args: ['click', ['$event'],] }]
    };
    return ButtonComponent;
}());
if (false) {
    /** @type {?} */
    ButtonComponent.prototype.prefixCls;
    /** @type {?} */
    ButtonComponent.prototype.ngTemplate;
    /** @type {?} */
    ButtonComponent.prototype.iconType;
    /**
     * @type {?}
     * @private
     */
    ButtonComponent.prototype._el;
    /**
     * @type {?}
     * @private
     */
    ButtonComponent.prototype._className;
    /**
     * @type {?}
     * @private
     */
    ButtonComponent.prototype._classList;
    /**
     * @type {?}
     * @private
     */
    ButtonComponent.prototype._type;
    /**
     * @type {?}
     * @private
     */
    ButtonComponent.prototype._size;
    /**
     * @type {?}
     * @private
     */
    ButtonComponent.prototype._loading;
    /**
     * @type {?}
     * @private
     */
    ButtonComponent.prototype._active;
    /**
     * @type {?}
     * @private
     */
    ButtonComponent.prototype._inline;
    /**
     * @type {?}
     * @private
     */
    ButtonComponent.prototype._disabled;
    /**
     * @type {?}
     * @private
     */
    ButtonComponent.prototype._icon;
    /**
     * @type {?}
     * @private
     */
    ButtonComponent.prototype._userAgent;
    /** @type {?} */
    ButtonComponent.prototype.onClick;
    /**
     * @type {?}
     * @private
     */
    ButtonComponent.prototype._elementRef;
    /**
     * @type {?}
     * @private
     */
    ButtonComponent.prototype._render;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/** @type {?} */
var svgSprite = (/**
 * @param {?} contents
 * @return {?}
 */
function (contents) { return "\n<svg\n  xmlns=\"http://www.w3.org/2000/svg\"\n  xmlns:xlink=\"https://www.w3.org/1999/xlink\"\n  id=\"__ANTD_MOBILE_SVG_SPRITE_NODE__\"\n  style=\"position:absolute;width:0;height:0\"\n>\n  <defs>\n    " + contents + "\n  </defs>\n</svg>\n"; });
var ɵ0 = svgSprite;
var IconHandler = /** @class */ (function () {
    function IconHandler() {
        this.contents = [];
        // both minified by https://github.com/svg/svgo
        this.icons = {
            check: '<svg viewBox="0 0 44 44"><path fill-rule="evenodd" d="M34.538 8L38 11.518 17.808 32 8 22.033l3.462-3.518 6.346 6.45z"/></svg>',
            'check-circle': '<svg viewBox="0 0 48 48"><path d="M24 48c13.255 0 24-10.745 24-24S37.255 0 24 0 0 10.745 0 24s10.745 24 24 24zM13.1 23.2l-2.2 2.1 10 9.9L38.1 15l-2.2-2-15.2 17.8-7.6-7.6z" fill-rule="evenodd"/></svg>',
            'check-circle-o': '<svg viewBox="0 0 48 48"><g fill-rule="evenodd"><path d="M24 48c13.255 0 24-10.745 24-24S37.255 0 24 0 0 10.745 0 24s10.745 24 24 24zm0-3c11.598 0 21-9.402 21-21S35.598 3 24 3 3 12.402 3 24s9.402 21 21 21z"/><path d="M12.2 23.2L10 25.3l10 9.9L37.2 15 35 13 19.8 30.8z"/></g></svg>',
            cross: '<svg viewBox="0 0 44 44"><path fill-rule="evenodd" d="M24.008 21.852l8.97-8.968L31.092 11l-8.97 8.968L13.157 11l-1.884 1.884 8.968 8.968-9.24 9.24 1.884 1.885 9.24-9.24 9.24 9.24 1.885-1.884-9.24-9.24z"/></svg>',
            'cross-circle': '<svg viewBox="0 0 48 48"><g fill-rule="evenodd"><path d="M24 48c13.255 0 24-10.745 24-24S37.255 0 24 0 0 10.745 0 24s10.745 24 24 24zm0-3c11.598 0 21-9.402 21-21S35.598 3 24 3 3 12.402 3 24s9.402 21 21 21z"/><path d="M24.34 22.22l-7.775-7.775a1.5 1.5 0 1 0-2.12 2.12l7.773 7.775-7.774 7.775a1.5 1.5 0 1 0 2.12 2.12l7.775-7.773 7.774 7.774a1.5 1.5 0 1 0 2.12-2.12L26.46 24.34l7.774-7.774a1.5 1.5 0 1 0-2.12-2.12l-7.776 7.773z"/></g></svg>',
            'cross-circle-o': '<svg viewBox="0 0 48 48"><path d="M24 48c13.255 0 24-10.745 24-24S37.255 0 24 0 0 10.745 0 24s10.745 24 24 24zm.353-25.77l-7.593-7.593c-.797-.8-1.538-.822-2.263-.207-.724.614-.56 1.617-.124 2.067l7.852 7.847-7.72 7.723c-.727.728-.56 1.646-.066 2.177.493.532 1.553.683 2.31-.174l7.588-7.584 7.644 7.623c.796.798 1.608.724 2.21.145.605-.58.72-1.442-.074-2.24l-7.657-7.67 7.545-7.52c.81-.697.9-1.76.297-2.34-.92-.885-1.85-.338-2.264.078l-7.685 7.667z" fill-rule="evenodd"/></svg>',
            // Todo: simplify direction to 2, use css transform
            left: '<svg viewBox="0 0 44 44"><defs><path id="a" d="M-129-845h24v24h-24z"/></defs><clipPath id="b"><use xlink:href="#a" overflow="visible"/></clipPath><g clip-path="url(#b)"><defs><path id="c" d="M-903-949H947V996H-903z"/></defs></g><path d="M16.247 21.4L28.48 9.165l2.12 2.12-10.117 10.12L30.6 31.524l-2.12 2.12-12.233-12.232.007-.006z"/></svg>',
            right: '<svg viewBox="0 0 44 44"><defs><path id="a" d="M-129-845h24v24h-24z"/></defs><clipPath id="b"><use xlink:href="#a" overflow="visible"/></clipPath><g clip-path="url(#b)"><defs><path id="c" d="M-903-949H947V996H-903z"/></defs></g><path d="M30.6 21.4L18.37 9.165l-2.12 2.12 10.117 10.12-10.118 10.118 2.12 2.12 12.234-12.232-.005-.006z"/></svg>',
            down: '<svg viewBox="0 0 44 44"><path d="M22.355 28.237l-11.483-10.9c-.607-.576-1.714-.396-2.48.41l.674-.71c-.763.802-.73 2.07-.282 2.496l11.37 10.793-.04.04 2.088 2.195L23.3 31.52l12.308-11.682c.447-.425.48-1.694-.282-2.496l.674.71c-.766-.806-1.873-.986-2.48-.41L22.355 28.237z" fill-rule="evenodd"/></svg>',
            up: '<svg viewBox="0 0 44 44"><path fill="none" d="M-1-1h46v46H-1z"/><defs><path id="a" d="M-129-845h24v24h-24z"/></defs><clipPath id="b"><use xlink:href="#a"/></clipPath><g clip-path="url(#b)"><defs><path id="c" d="M-903-949H947V996H-903z"/></defs></g><path d="M23.417 14.23L11.184 26.46l2.12 2.12 10.12-10.117 10.118 10.118 2.12-2.12L23.43 14.228l-.006.005z"/></svg>',
            loading: '<svg viewBox="0 -2 59.75 60.25"><path fill="#ccc" d="M29.69-.527C14.044-.527 1.36 12.158 1.36 27.806S14.043 56.14 29.69 56.14c15.65 0 28.334-12.686 28.334-28.334S45.34-.527 29.69-.527zm.185 53.75c-14.037 0-25.417-11.38-25.417-25.417S15.838 2.39 29.875 2.39s25.417 11.38 25.417 25.417-11.38 25.416-25.417 25.416z"/><path fill="none" stroke="#108ee9" stroke-width="3" stroke-linecap="round" stroke-miterlimit="10" d="M56.587 29.766c.37-7.438-1.658-14.7-6.393-19.552"/></svg>',
            search: '<svg viewBox="0 0 44 44"><path d="M32.98 29.255l8.915 8.293L39.603 40l-8.86-8.242a15.952 15.952 0 0 1-10.753 4.147C11.16 35.905 4 28.763 4 19.952 4 11.142 11.16 4 19.99 4s15.99 7.142 15.99 15.952c0 3.472-1.112 6.685-3 9.303zm.05-9.21c0 7.123-5.7 12.918-12.88 12.918-7.176 0-13.015-5.795-13.015-12.918 0-7.12 5.84-12.917 13.017-12.917 7.178 0 12.88 5.797 12.88 12.917z" fill-rule="evenodd"/></svg>',
            ellipsis: '<svg viewBox="0 0 44 44"><circle cx="21.888" cy="22" r="4.045"/><circle cx="5.913" cy="22" r="4.045"/><circle cx="37.863" cy="22" r="4.045"/></svg>',
            'ellipsis-circle': '<svg viewBox="0 0 44 44"><g fill-rule="evenodd"><path d="M22.13.11C10.05.11.255 9.902.255 21.983S10.05 43.86 22.13 43.86s21.875-9.795 21.875-21.876S34.21.11 22.13.11zm0 40.7c-10.396 0-18.825-8.43-18.825-18.826S11.735 3.16 22.13 3.16c10.396 0 18.825 8.428 18.825 18.824S32.525 40.81 22.13 40.81z"/><circle cx="21.888" cy="22.701" r="2.445"/><circle cx="12.23" cy="22.701" r="2.445"/><circle cx="31.546" cy="22.701" r="2.445"/></g></svg>',
            'exclamation-circle': '<svg viewBox="0 0 64 64"><path d="M59.58 40.89L41.193 9.11C39.135 5.382 35.723 3 31.387 3c-3.11 0-6.52 2.382-8.58 6.11L4.42 40.89c-2.788 4.635-3.126 8.81-1.225 12.22C5.015 56.208 7.572 58 13 58h36.773c5.428 0 9.21-1.792 11.03-4.89 1.9-3.41 1.565-7.583-1.224-12.22zm-2.452 11c-.635 1.694-3.802 2.443-7.354 2.443H13c-3.59 0-5.493-.75-6.13-2.444-1.71-2.41-1.374-5.263 0-8.557l18.387-31.777c2.116-3.168 4.394-4.89 6.13-4.89 2.96 0 5.238 1.722 7.354 4.89l18.387 31.777c1.374 3.294 1.713 6.146 0 8.556zm-25.74-33c-.405 0-1.227.835-1.227 2.443v15.89c0 1.608.823 2.444 1.227 2.444 1.628 0 2.452-.836 2.452-2.445v-15.89c0-1.607-.825-2.443-2.453-2.443zm0 23.22c-.405 0-1.227.79-1.227 1.223v2.445c0 .434.823 1.222 1.227 1.222 1.628 0 2.452-.788 2.452-1.222v-2.445c0-.434-.825-1.222-2.453-1.222z" fill-rule="evenodd"/></svg>',
            'info-circle': '<svg viewBox="0 0 44 44"><circle cx="13.828" cy="19.63" r="1.938"/><circle cx="21.767" cy="19.63" r="1.938"/><circle cx="29.767" cy="19.63" r="1.938"/><path d="M22.102 4.16c-9.918 0-17.958 7.147-17.958 15.962 0 4.935 2.522 9.345 6.48 12.273v5.667l.04.012a2.627 2.627 0 1 0 4.5 1.455h.002l5.026-3.54c.628.06 1.265.094 1.91.094 9.92 0 17.96-7.146 17.96-15.96C40.06 11.306 32.02 4.16 22.1 4.16zm-.04 29.902c-.902 0-1.78-.08-2.642-.207l-5.882 4.234c-.024.024-.055.04-.083.06l-.008.005a.51.51 0 0 1-.284.095.525.525 0 0 1-.525-.525l.005-6.375c-3.91-2.516-6.456-6.544-6.456-11.1 0-7.628 7.107-13.812 15.875-13.812s15.875 6.184 15.875 13.812-7.107 13.812-15.875 13.812z"/></svg>',
            'question-circle': '<svg viewBox="0 0 44 44"><g fill-rule="evenodd"><path d="M21.186 3c-10.853 0-19.36 8.506-19.36 19.358C1.827 32.494 10.334 41 21.187 41c10.133 0 18.64-8.506 18.64-18.642C39.827 11.506 31.32 3 21.187 3m15.64 19c0 8.823-7.178 16-16 16s-16-7.177-16-16 7.178-16 16-16 16 7.177 16 16z"/><path d="M22.827 31.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m4-15.48c0 .957-.203 1.822-.61 2.593-.427.792-1.117 1.612-2.073 2.457-.867.734-1.453 1.435-1.754 2.096-.302.7-.453 1.693-.453 2.98a.828.828 0 0 1-.823.854.828.828 0 0 1-.584-.22.877.877 0 0 1-.24-.635c0-1.305.168-2.38.506-3.227.336-.883.93-1.682 1.78-2.4 1.01-.883 1.71-1.692 2.1-2.428.336-.645.503-1.38.503-2.21-.02-.935-.3-1.7-.85-2.288-.655-.717-1.62-1.075-2.897-1.075-1.506 0-2.596.535-3.27 1.6-.46.754-.688 1.645-.688 2.677a.92.92 0 0 1-.266.66.747.747 0 0 1-.56.25.73.73 0 0 1-.584-.194c-.16-.164-.24-.393-.24-.69 0-1.82.585-3.272 1.755-4.357C18.645 11.486 19.928 11 21.434 11h.293c1.452 0 2.638.414 3.56 1.24 1.028.903 1.54 2.163 1.54 3.78z"/></g></svg>',
            voice: '<svg viewBox="0 0 38 33"><g fill-rule="evenodd"><path d="M17.838 28.8c-.564-.468-1.192-.983-1.836-1.496-4.244-3.385-5.294-3.67-6.006-3.67-.014 0-.027.005-.04.005-.015 0-.028-.006-.042-.006H3.562c-.734 0-.903-.203-.903-.928v-12.62c0-.49.057-.8.66-.8H9.1c.694 0 1.76-.28 6.4-3.63.83-.596 1.638-1.196 2.337-1.722V28.8zM19.682.19c-.463-.22-1.014-.158-1.417.157-.02.016-1.983 1.552-4.152 3.125C10.34 6.21 9.243 6.664 9.02 6.737H3.676c-.027 0-.053.003-.08.004H1.183c-.608 0-1.1.487-1.1 1.086V25.14c0 .598.492 1.084 1.1 1.084h8.71c.22.08 1.257.55 4.605 3.24 1.947 1.562 3.694 3.088 3.712 3.103.25.22.568.333.89.333.186 0 .373-.038.55-.116.48-.213.79-.684.79-1.204V1.38c0-.506-.294-.968-.758-1.19z" mask="url(#mask-2)"/><path d="M31.42 16.475c0-3.363-1.854-6.297-4.606-7.876-.125-.067-.42-.193-.625-.193-.613 0-1.11.488-1.11 1.09 0 .404.22.764.55.952 2.13 1.19 3.566 3.44 3.566 6.024 0 2.627-1.486 4.913-3.677 6.087-.32.19-.53.54-.53.935 0 .602.495 1.09 1.106 1.09.26.002.568-.15.568-.15 2.835-1.556 4.754-4.538 4.754-7.96" mask="url(#mask-4)"/><path d="M30.14 3.057c-.205-.122-.41-.22-.658-.22-.608 0-1.1.485-1.1 1.084 0 .434.26.78.627.978 4.042 2.323 6.76 6.636 6.76 11.578 0 4.938-2.715 9.248-6.754 11.572-.354.19-.66.55-.66.993 0 .6.494 1.085 1.102 1.085.243 0 .438-.092.65-.213 4.692-2.695 7.848-7.7 7.848-13.435 0-5.723-3.142-10.718-7.817-13.418" mask="url(#mask-6)"/></g></svg>',
            plus: '<svg viewBox="0 0 30 30"><path d="M14 14H0v2h14v14h2V16h14v-2H16V0h-2v14z" fill-rule="evenodd"/></svg>',
            minus: '<svg viewBox="0 0 30 2"><path d="M0 0h30v2H0z" fill-rule="evenodd"/></svg>',
            dislike: '<svg viewBox="0 0 72 72"><g fill="none" fill-rule="evenodd"><path d="M36 72c19.882 0 36-16.118 36-36S55.882 0 36 0 0 16.118 0 36s16.118 36 36 36zm0-2c18.778 0 34-15.222 34-34S54.778 2 36 2 2 17.222 2 36s15.222 34 34 34z" fill="#FFF"/><path fill="#FFF" d="M47 22h2v6h-2zm-24 0h2v6h-2z"/><path d="M21 51s4.6-7 15-7 15 7 15 7" stroke="#FFF" stroke-width="2"/></g></svg>',
            fail: '<svg viewBox="0 0 72 72"><g fill="none" fill-rule="evenodd"><path d="M36 72c19.882 0 36-16.118 36-36S55.882 0 36 0 0 16.118 0 36s16.118 36 36 36zm0-2c18.778 0 34-15.222 34-34S54.778 2 36 2 2 17.222 2 36s15.222 34 34 34z" fill="#FFF"/><path d="M22 22l28.304 28.304m-28.304 0L50.304 22" stroke="#FFF" stroke-width="2"/></g></svg>',
            success: '<svg viewBox="0 0 72 72"><g fill="none" fill-rule="evenodd"><path d="M36 72c19.882 0 36-16.118 36-36S55.882 0 36 0 0 16.118 0 36s16.118 36 36 36zm0-2c18.778 0 34-15.222 34-34S54.778 2 36 2 2 17.222 2 36s15.222 34 34 34z" fill="#FFF"/><path stroke="#FFF" stroke-width="2" d="M19 34.54l11.545 11.923L52.815 24"/></g></svg>'
        };
    }
    /**
     * @return {?}
     */
    IconHandler.prototype.renderSvgSprite = /**
     * @return {?}
     */
    function () {
        var _this = this;
        /** @type {?} */
        var symbols = Object.keys(this.icons)
            .map((/**
         * @param {?} iconName
         * @return {?}
         */
        function (iconName) {
            /** @type {?} */
            var svgContent = _this.icons[iconName].split('svg')[1];
            return "<symbol id=" + iconName + svgContent + "symbol>";
        }))
            .join('');
        return svgSprite(symbols);
    };
    /**
     * @return {?}
     */
    IconHandler.prototype.load = /**
     * @return {?}
     */
    function () {
        if (!document) {
            return;
        }
        /** @type {?} */
        var existing = document.getElementById('__ANTD_MOBILE_SVG_SPRITE_NODE__');
        /** @type {?} */
        var mountNode = document.body;
        if (!existing) {
            mountNode.insertAdjacentHTML('afterbegin', this.renderSvgSprite());
        }
    };
    IconHandler.decorators = [
        { type: Injectable }
    ];
    /** @nocollapse */
    IconHandler.ctorParameters = function () { return []; };
    return IconHandler;
}());
if (false) {
    /** @type {?} */
    IconHandler.prototype.contents;
    /** @type {?} */
    IconHandler.prototype.icons;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var IconComponent = /** @class */ (function () {
    function IconComponent(_iconHandler) {
        this._iconHandler = _iconHandler;
        this.clsMap = {};
        this._type = '';
        this._size = 'md';
        this._src = '';
        this.color = '';
        this._iconHandler.load();
    }
    Object.defineProperty(IconComponent.prototype, "type", {
        get: /**
         * @return {?}
         */
        function () {
            return this._type;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._type = value;
            this.setClsMap();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IconComponent.prototype, "src", {
        get: /**
         * @return {?}
         */
        function () {
            return this._src;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._src = value;
            this.setClsMap();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IconComponent.prototype, "size", {
        get: /**
         * @return {?}
         */
        function () {
            return this._size;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._size = value;
            this.setClsMap();
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @return {?}
     */
    IconComponent.prototype.setClsMap = /**
     * @return {?}
     */
    function () {
        var _a;
        this.clsMap = (_a = {},
            _a["am-icon-" + this._type] = true,
            _a["am-icon-" + this._size] = true,
            _a);
    };
    IconComponent.decorators = [
        { type: Component, args: [{
                    selector: 'Icon, nzm-icon',
                    template: "<svg *ngIf=\"type\" class=\"am-icon\" [ngClass]=\"clsMap\" [ngStyle]=\"{ color: color }\">\n  <use xmlns:xlink=\"https://www.w3.org/1999/xlink\" attr.xlink:href=\"#{{ type }}\"></use>\n</svg>\n<img *ngIf=\"src\" src=\"{{ src }}\" class=\"am-icon\" [ngClass]=\"clsMap\" />\n<ng-content></ng-content>\n",
                    encapsulation: ViewEncapsulation.None,
                    providers: [IconHandler]
                }] }
    ];
    /** @nocollapse */
    IconComponent.ctorParameters = function () { return [
        { type: IconHandler }
    ]; };
    IconComponent.propDecorators = {
        color: [{ type: Input }],
        type: [{ type: Input }],
        src: [{ type: Input }],
        size: [{ type: Input }]
    };
    return IconComponent;
}());
if (false) {
    /** @type {?} */
    IconComponent.prototype.clsMap;
    /**
     * @type {?}
     * @private
     */
    IconComponent.prototype._type;
    /**
     * @type {?}
     * @private
     */
    IconComponent.prototype._size;
    /**
     * @type {?}
     * @private
     */
    IconComponent.prototype._src;
    /** @type {?} */
    IconComponent.prototype.color;
    /**
     * @type {?}
     * @private
     */
    IconComponent.prototype._iconHandler;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var IconModule = /** @class */ (function () {
    function IconModule() {
    }
    IconModule.decorators = [
        { type: NgModule, args: [{
                    imports: [CommonModule],
                    exports: [IconComponent],
                    declarations: [IconComponent]
                },] }
    ];
    return IconModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var WingBlankComponent = /** @class */ (function () {
    function WingBlankComponent() {
        this.prefixCls = 'am-wingblank';
        this.size = 'lg';
        this.amWingBlank = true;
    }
    Object.defineProperty(WingBlankComponent.prototype, "amWingBlnkSm", {
        get: /**
         * @return {?}
         */
        function () {
            return this.size === 'sm';
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(WingBlankComponent.prototype, "amWingBlnkMd", {
        get: /**
         * @return {?}
         */
        function () {
            return this.size === 'md';
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(WingBlankComponent.prototype, "amWingBlnkLg", {
        get: /**
         * @return {?}
         */
        function () {
            return this.size === 'lg';
        },
        enumerable: true,
        configurable: true
    });
    WingBlankComponent.decorators = [
        { type: Component, args: [{
                    selector: 'WingBlank, nzm-wingblank',
                    template: "<ng-content></ng-content>\n",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    /** @nocollapse */
    WingBlankComponent.ctorParameters = function () { return []; };
    WingBlankComponent.propDecorators = {
        size: [{ type: Input }],
        amWingBlank: [{ type: HostBinding, args: ['class.am-wingblank',] }],
        amWingBlnkSm: [{ type: HostBinding, args: ['class.am-wingblank-sm',] }],
        amWingBlnkMd: [{ type: HostBinding, args: ['class.am-wingblank-md',] }],
        amWingBlnkLg: [{ type: HostBinding, args: ['class.am-wingblank-lg',] }]
    };
    return WingBlankComponent;
}());
if (false) {
    /** @type {?} */
    WingBlankComponent.prototype.prefixCls;
    /** @type {?} */
    WingBlankComponent.prototype.size;
    /** @type {?} */
    WingBlankComponent.prototype.amWingBlank;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var WingBlankModule = /** @class */ (function () {
    function WingBlankModule() {
    }
    WingBlankModule.decorators = [
        { type: NgModule, args: [{
                    declarations: [WingBlankComponent],
                    exports: [WingBlankComponent],
                    imports: [CommonModule]
                },] }
    ];
    return WingBlankModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var WhiteSpaceComponent = /** @class */ (function () {
    function WhiteSpaceComponent() {
        this.prefixCls = 'am-whitespace';
        this.size = 'md';
        this.amWhiteSpace = true;
    }
    Object.defineProperty(WhiteSpaceComponent.prototype, "amWhitespaceXs", {
        get: /**
         * @return {?}
         */
        function () {
            return this.size === 'xs';
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(WhiteSpaceComponent.prototype, "amWhitespaceSm", {
        get: /**
         * @return {?}
         */
        function () {
            return this.size === 'sm';
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(WhiteSpaceComponent.prototype, "amWhitespaceMd", {
        get: /**
         * @return {?}
         */
        function () {
            return this.size === 'md';
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(WhiteSpaceComponent.prototype, "amWhitespaceLg", {
        get: /**
         * @return {?}
         */
        function () {
            return this.size === 'lg';
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(WhiteSpaceComponent.prototype, "amWhitespaceXl", {
        get: /**
         * @return {?}
         */
        function () {
            return this.size === 'xl';
        },
        enumerable: true,
        configurable: true
    });
    WhiteSpaceComponent.decorators = [
        { type: Component, args: [{
                    selector: 'WhiteSpace, nzm-whitespace',
                    template: ""
                }] }
    ];
    /** @nocollapse */
    WhiteSpaceComponent.ctorParameters = function () { return []; };
    WhiteSpaceComponent.propDecorators = {
        size: [{ type: Input }],
        amWhiteSpace: [{ type: HostBinding, args: ['class.am-whitespace',] }],
        amWhitespaceXs: [{ type: HostBinding, args: ['class.am-whitespace-xs',] }],
        amWhitespaceSm: [{ type: HostBinding, args: ['class.am-whitespace-sm',] }],
        amWhitespaceMd: [{ type: HostBinding, args: ['class.am-whitespace-md',] }],
        amWhitespaceLg: [{ type: HostBinding, args: ['class.am-whitespace-lg',] }],
        amWhitespaceXl: [{ type: HostBinding, args: ['class.am-whitespace-xl',] }]
    };
    return WhiteSpaceComponent;
}());
if (false) {
    /** @type {?} */
    WhiteSpaceComponent.prototype.prefixCls;
    /** @type {?} */
    WhiteSpaceComponent.prototype.size;
    /** @type {?} */
    WhiteSpaceComponent.prototype.amWhiteSpace;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var WhiteSpaceModule = /** @class */ (function () {
    function WhiteSpaceModule() {
    }
    WhiteSpaceModule.decorators = [
        { type: NgModule, args: [{
                    declarations: [WhiteSpaceComponent],
                    exports: [WhiteSpaceComponent],
                    imports: [CommonModule]
                },] }
    ];
    return WhiteSpaceModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var ListComponent = /** @class */ (function () {
    function ListComponent() {
        this.defaultProps = {
            prefixCls: 'am-list'
        };
        this.renderHeaderType = '';
        this.renderFooterType = '';
        this._renderHeader = '';
        this._renderFooter = '';
        this._className = '';
    }
    Object.defineProperty(ListComponent.prototype, "className", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._className = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ListComponent.prototype, "renderHeader", {
        get: /**
         * @return {?}
         */
        function () {
            return this._renderHeader;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (value instanceof TemplateRef) {
                this.renderHeaderType = 'templateRef';
            }
            else {
                this.renderHeaderType = typeof value;
            }
            console.log('this isi rend', this.renderHeaderType);
            this._renderHeader = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ListComponent.prototype, "renderFooter", {
        get: /**
         * @return {?}
         */
        function () {
            return this._renderFooter;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (value instanceof TemplateRef) {
                this.renderFooterType = 'templateRef';
            }
            else {
                this.renderFooterType = typeof value;
            }
            this._renderFooter = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ListComponent.prototype, "hostClassName", {
        get: /**
         * @return {?}
         */
        function () {
            return 'am-list ' + this._className;
        },
        enumerable: true,
        configurable: true
    });
    ListComponent.decorators = [
        { type: Component, args: [{
                    selector: 'List, nzm-list',
                    template: "<div\n  *ngIf=\"renderHeader && renderHeaderType === 'string'\"\n  class=\"{{ defaultProps.prefixCls }}-header\"\n  [innerHTML]=\"renderHeader\"\n></div>\n<div *ngIf=\"renderHeader && renderHeaderType === 'function'\" class=\"{{ defaultProps.prefixCls }}-header\">\n  {{ renderHeader() }}\n</div>\n<ng-template *ngIf=\"renderHeader && renderHeaderType === 'templateRef'\" [ngTemplateOutlet]=\"renderHeader\">\n</ng-template>\n<div class=\"{{ defaultProps.prefixCls }}-body\">\n  <ng-content></ng-content>\n</div>\n<div\n  *ngIf=\"renderFooter && renderFooterType === 'string'\"\n  class=\"{{ defaultProps.prefixCls }}-footer\"\n  [innerHTML]=\"renderFooter\"\n></div>\n<div *ngIf=\"renderFooter && renderFooterType === 'function'\" class=\"{{ defaultProps.prefixCls }}-footer\">\n  {{ renderFooter() }}\n</div>\n<ng-template *ngIf=\"renderFooter && renderFooterType === 'templateRef'\" [ngTemplateOutlet]=\"renderFooter\">\n</ng-template>\n",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    /** @nocollapse */
    ListComponent.ctorParameters = function () { return []; };
    ListComponent.propDecorators = {
        className: [{ type: Input }],
        renderHeader: [{ type: Input }],
        renderFooter: [{ type: Input }],
        hostClassName: [{ type: HostBinding, args: ['class',] }]
    };
    return ListComponent;
}());
if (false) {
    /** @type {?} */
    ListComponent.prototype.defaultProps;
    /** @type {?} */
    ListComponent.prototype.renderHeaderType;
    /** @type {?} */
    ListComponent.prototype.renderFooterType;
    /**
     * @type {?}
     * @private
     */
    ListComponent.prototype._renderHeader;
    /**
     * @type {?}
     * @private
     */
    ListComponent.prototype._renderFooter;
    /**
     * @type {?}
     * @private
     */
    ListComponent.prototype._className;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var ListItemComponent = /** @class */ (function () {
    function ListItemComponent() {
        this.defaultProps = {
            prefixCls: 'am-list',
            align: 'middle',
            error: false,
            multipleLine: false,
            wrap: false,
            platform: 'ios',
            rippleStyle: {}
        };
        this.arrowCls = {};
        this.lineCls = {};
        this.wrapCls = '';
        this.rippleCls = {};
        this.rippleClicked = false;
        this._thumb_component = false;
        this._thumb_src = '';
        this._extra_component = false;
        this._extra_title = '';
        this._arrow = '';
        this._disabled = false;
        this._className = '';
        this._active = false;
        this.onClick = new EventEmitter();
    }
    Object.defineProperty(ListItemComponent.prototype, "extra", {
        get: /**
         * @return {?}
         */
        function () {
            return this._extra;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (value instanceof TemplateRef) {
                this._extra_component = true;
                this._extra = value;
            }
            else {
                this._extra_component = false;
                this._extra_title = (/** @type {?} */ (value));
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ListItemComponent.prototype, "extra_component", {
        get: /**
         * @return {?}
         */
        function () {
            return this._extra_component;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ListItemComponent.prototype, "extra_title", {
        get: /**
         * @return {?}
         */
        function () {
            return this._extra_title;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ListItemComponent.prototype, "className", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._className = value;
            this.setClsMap();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ListItemComponent.prototype, "arrow", {
        get: /**
         * @return {?}
         */
        function () {
            return this._arrow;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._arrow = value;
            this.setClsMap();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ListItemComponent.prototype, "multipleLine", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.defaultProps.multipleLine = value === '' ? true : value;
            this.setClsMap();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ListItemComponent.prototype, "error", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.defaultProps.error = value === '' ? true : value;
            this.setClsMap();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ListItemComponent.prototype, "wrap", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.defaultProps.wrap = value === '' ? true : value;
            this.setClsMap();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ListItemComponent.prototype, "align", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.defaultProps.align = value;
            this.setClsMap();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ListItemComponent.prototype, "platform", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.defaultProps.platform = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ListItemComponent.prototype, "disabled", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (typeof value === 'boolean') {
                this._disabled = value;
            }
            else {
                if (value === 'true') {
                    this._disabled = true;
                }
                else {
                    this._disabled = false;
                }
            }
            this.setClsMap();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ListItemComponent.prototype, "thumb", {
        get: /**
         * @return {?}
         */
        function () {
            return this._thumb;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (value instanceof TemplateRef) {
                this._thumb_component = true;
                this._thumb = value;
            }
            else {
                this._thumb_component = false;
                this._thumb_src = (/** @type {?} */ (value));
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ListItemComponent.prototype, "thumb_component", {
        get: /**
         * @return {?}
         */
        function () {
            return this._thumb_component;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ListItemComponent.prototype, "thumb_src", {
        get: /**
         * @return {?}
         */
        function () {
            return this._thumb_src;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ListItemComponent.prototype, "bingClassName", {
        get: /**
         * @return {?}
         */
        function () {
            return this.wrapCls;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @param {?} event
     * @return {?}
     */
    ListItemComponent.prototype.click = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        this.onItemClick(event);
    };
    /**
     * @return {?}
     */
    ListItemComponent.prototype.start = /**
     * @return {?}
     */
    function () {
        if (!this._disabled && this.onClick.observers.length > 0) {
            this._active = true;
            this.setClsMap();
        }
    };
    /**
     * @return {?}
     */
    ListItemComponent.prototype.move = /**
     * @return {?}
     */
    function () {
        if (!this._disabled && this.onClick.observers.length > 0) {
            this._active = false;
            this.setClsMap();
        }
    };
    /**
     * @return {?}
     */
    ListItemComponent.prototype.end = /**
     * @return {?}
     */
    function () {
        if (!this._disabled && this.onClick.observers.length > 0) {
            this._active = false;
            this.setClsMap();
        }
    };
    /**
     * @return {?}
     */
    ListItemComponent.prototype.mouse_start = /**
     * @return {?}
     */
    function () {
        if (!this._disabled && this.onClick.observers.length > 0) {
            this._active = true;
            this.setClsMap();
        }
    };
    /**
     * @return {?}
     */
    ListItemComponent.prototype.mouse_end = /**
     * @return {?}
     */
    function () {
        if (!this._disabled && this.onClick.observers.length > 0) {
            this._active = false;
            this.setClsMap();
        }
    };
    /**
     * @return {?}
     */
    ListItemComponent.prototype.setClsMap = /**
     * @return {?}
     */
    function () {
        var e_1, _a, _b, _c, _d, _e, _f;
        /** @type {?} */
        var classNameList = this._className.split(' ');
        /** @type {?} */
        var classNameObj = {};
        this.wrapCls = '';
        try {
            for (var classNameList_1 = __values(classNameList), classNameList_1_1 = classNameList_1.next(); !classNameList_1_1.done; classNameList_1_1 = classNameList_1.next()) {
                var value = classNameList_1_1.value;
                if (value) {
                    classNameObj = __assign({}, classNameObj, (_b = {}, _b["" + value] = true, _b));
                }
            }
        }
        catch (e_1_1) { e_1 = { error: e_1_1 }; }
        finally {
            try {
                if (classNameList_1_1 && !classNameList_1_1.done && (_a = classNameList_1.return)) _a.call(classNameList_1);
            }
            finally { if (e_1) throw e_1.error; }
        }
        /** @type {?} */
        var wrapClsObj = __assign((_c = {}, _c[this.defaultProps.prefixCls + "-item"] = true, _c[this.defaultProps.prefixCls + "-item-disabled"] = this._disabled, _c[this.defaultProps.prefixCls + "-item-active"] = this._active, _c[this.defaultProps.prefixCls + "-item-error"] = this.defaultProps.error, _c[this.defaultProps.prefixCls + "-item-top"] = this.defaultProps.align === 'top', _c[this.defaultProps.prefixCls + "-item-middle"] = this.defaultProps.align === 'middle', _c[this.defaultProps.prefixCls + "-item-bottom"] = this.defaultProps.align === 'bottom', _c), classNameObj);
        for (var key in wrapClsObj) {
            if (wrapClsObj[key]) {
                this.wrapCls += " " + key;
            }
        }
        this.rippleCls = (_d = {},
            _d[this.defaultProps.prefixCls + "-ripple"] = true,
            _d[this.defaultProps.prefixCls + "-ripple-animate"] = this.rippleClicked,
            _d);
        this.lineCls = (_e = {},
            _e[this.defaultProps.prefixCls + "-line"] = true,
            _e[this.defaultProps.prefixCls + "-line-multiple"] = this.defaultProps.multipleLine,
            _e[this.defaultProps.prefixCls + "-line-wrap"] = this.defaultProps.wrap,
            _e);
        this.arrowCls = (_f = {},
            _f[this.defaultProps.prefixCls + "-arrow"] = true,
            _f[this.defaultProps.prefixCls + "-arrow-horizontal"] = this._arrow === 'horizontal',
            _f[this.defaultProps.prefixCls + "-arrow-vertical"] = this._arrow === 'down' || this._arrow === 'up',
            _f[this.defaultProps.prefixCls + "-arrow-vertical-up"] = this._arrow === 'up',
            _f);
    };
    /**
     * @param {?} ev
     * @return {?}
     */
    ListItemComponent.prototype.onItemClick = /**
     * @param {?} ev
     * @return {?}
     */
    function (ev) {
        var _this = this;
        /** @type {?} */
        var isAndroid = this.defaultProps.platform === 'android';
        if (isAndroid) {
            if (this.debounceTimeout) {
                clearTimeout(this.debounceTimeout);
                this.debounceTimeout = null;
            }
            /** @type {?} */
            var Item = ev.currentTarget;
            /** @type {?} */
            var RippleWidth = Math.max(Item.offsetHeight, Item.offsetWidth);
            /** @type {?} */
            var ClientRect_1 = ev.currentTarget.getBoundingClientRect();
            /** @type {?} */
            var pointX = ev.clientX - ClientRect_1.left - Item.offsetWidth / 2;
            /** @type {?} */
            var pointY = ev.clientY - ClientRect_1.top - Item.offsetWidth / 2;
            /** @type {?} */
            var coverRippleStyle = {
                width: RippleWidth + "px",
                height: RippleWidth + "px",
                left: pointX + "px",
                top: pointY + "px"
            };
            this.defaultProps.rippleStyle = coverRippleStyle;
            this.rippleClicked = true;
            this.setClsMap();
            this.debounceTimeout = setTimeout((/**
             * @return {?}
             */
            function () {
                _this.rippleClicked = false;
                _this.defaultProps.rippleStyle = { display: 'none' };
                _this.setClsMap();
            }), 1000);
        }
        this.onClick.emit(ev);
    };
    /**
     * @return {?}
     */
    ListItemComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        this.defaultProps.rippleStyle = { display: 'none' };
        this.setClsMap();
    };
    /**
     * @return {?}
     */
    ListItemComponent.prototype.ngOnDestroy = /**
     * @return {?}
     */
    function () {
        if (this.debounceTimeout) {
            clearTimeout(this.debounceTimeout);
            this.debounceTimeout = null;
        }
    };
    ListItemComponent.decorators = [
        { type: Component, args: [{
                    selector: 'ListItem, nzm-list-item',
                    template: "<div *ngIf=\"thumb_src && !thumb_component\" class=\"{{ defaultProps.prefixCls }}-thumb\">\n  <img src=\"{{ thumb_src }}\" />\n</div>\n<div *ngIf=\"thumb && thumb_component\" class=\"{{ defaultProps.prefixCls }}-thumb\">\n  <ng-template [ngTemplateOutlet]=\"thumb\"></ng-template>\n</div>\n<div [ngClass]=\"lineCls\">\n  <div class=\"{{ defaultProps.prefixCls }}-content\">\n    <ng-content></ng-content>\n  </div>\n  <div\n    *ngIf=\"extra_title && !extra_component\"\n    class=\"{{ defaultProps.prefixCls }}-extra\"\n    [innerHTML]=\"extra_title\"\n  ></div>\n  <div *ngIf=\"extra && extra_component\" class=\"{{ defaultProps.prefixCls }}-extra\">\n    <ng-template [ngTemplateOutlet]=\"extra\"></ng-template>\n  </div>\n  <div *ngIf=\"arrow\" [ngClass]=\"arrowCls\" aria-hidden=\"true\"></div>\n</div>\n<div [ngClass]=\"rippleCls\" [ngStyle]=\"defaultProps.rippleStyle\"></div>\n",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    /** @nocollapse */
    ListItemComponent.ctorParameters = function () { return []; };
    ListItemComponent.propDecorators = {
        extra: [{ type: Input }],
        className: [{ type: Input }],
        arrow: [{ type: Input }],
        multipleLine: [{ type: Input }],
        error: [{ type: Input }],
        wrap: [{ type: Input }],
        align: [{ type: Input }],
        platform: [{ type: Input }],
        disabled: [{ type: Input }],
        thumb: [{ type: Input }],
        onClick: [{ type: Output }],
        bingClassName: [{ type: HostBinding, args: ['class',] }],
        click: [{ type: HostListener, args: ['click', ['$event'],] }],
        start: [{ type: HostListener, args: ['touchstart',] }],
        move: [{ type: HostListener, args: ['touchmove',] }],
        end: [{ type: HostListener, args: ['touchend',] }],
        mouse_start: [{ type: HostListener, args: ['mousedown',] }],
        mouse_end: [{ type: HostListener, args: ['mouseup',] }]
    };
    return ListItemComponent;
}());
if (false) {
    /** @type {?} */
    ListItemComponent.prototype.defaultProps;
    /** @type {?} */
    ListItemComponent.prototype.arrowCls;
    /** @type {?} */
    ListItemComponent.prototype.lineCls;
    /** @type {?} */
    ListItemComponent.prototype.wrapCls;
    /** @type {?} */
    ListItemComponent.prototype.rippleCls;
    /** @type {?} */
    ListItemComponent.prototype.rippleClicked;
    /** @type {?} */
    ListItemComponent.prototype.debounceTimeout;
    /**
     * @type {?}
     * @private
     */
    ListItemComponent.prototype._thumb_component;
    /**
     * @type {?}
     * @private
     */
    ListItemComponent.prototype._thumb;
    /**
     * @type {?}
     * @private
     */
    ListItemComponent.prototype._thumb_src;
    /**
     * @type {?}
     * @private
     */
    ListItemComponent.prototype._extra_component;
    /**
     * @type {?}
     * @private
     */
    ListItemComponent.prototype._extra;
    /**
     * @type {?}
     * @private
     */
    ListItemComponent.prototype._extra_title;
    /**
     * @type {?}
     * @private
     */
    ListItemComponent.prototype._arrow;
    /**
     * @type {?}
     * @private
     */
    ListItemComponent.prototype._disabled;
    /**
     * @type {?}
     * @private
     */
    ListItemComponent.prototype._className;
    /**
     * @type {?}
     * @private
     */
    ListItemComponent.prototype._active;
    /** @type {?} */
    ListItemComponent.prototype.onClick;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var BriefComponent = /** @class */ (function () {
    function BriefComponent() {
        this.defaultProps = {
            prefixCls: 'am-list'
        };
    }
    BriefComponent.decorators = [
        { type: Component, args: [{
                    selector: 'Brief, nzm-brief',
                    template: "<div class=\"{{ defaultProps.prefixCls }}-brief\">\n  <ng-content></ng-content>\n</div>\n",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    return BriefComponent;
}());
if (false) {
    /** @type {?} */
    BriefComponent.prototype.defaultProps;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var ListModule = /** @class */ (function () {
    function ListModule() {
    }
    ListModule.decorators = [
        { type: NgModule, args: [{
                    imports: [CommonModule, FormsModule],
                    exports: [ListComponent, ListItemComponent, BriefComponent],
                    declarations: [ListComponent, ListItemComponent, BriefComponent]
                },] }
    ];
    return ListModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/** @type {?} */
var NZ_BUTTON_DIRECTIVES = [ButtonComponent];
var ButtonModule = /** @class */ (function () {
    function ButtonModule() {
    }
    ButtonModule.decorators = [
        { type: NgModule, args: [{
                    declarations: NZ_BUTTON_DIRECTIVES,
                    exports: NZ_BUTTON_DIRECTIVES,
                    imports: [CommonModule, IconModule, WingBlankModule, WhiteSpaceModule, ListModule]
                },] }
    ];
    return ButtonModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var SwitchComponent = /** @class */ (function () {
    function SwitchComponent() {
        this.prefixCls = 'am-switch';
        this.wrapCls = 'am-switch';
        this.checkboxCls = {
            'checkbox-disabled': false,
            'checkbox-active': false,
            'checkbox-inactive': true
        };
        this.colorStyle = {};
        this.switchChecked = false;
        this._color = '';
        this._disabled = false;
        this.onChanged = Function.prototype;
        this.onTouched = Function.prototype;
        this.onChange = new EventEmitter();
        this.onClick = new EventEmitter();
        this.dispaly = true;
    }
    Object.defineProperty(SwitchComponent.prototype, "color", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._color = value;
            this.colorStyle = { background: this._color };
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SwitchComponent.prototype, "platform", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.wrapCls = value === 'android' ? this.prefixCls + "-android" : this.prefixCls;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SwitchComponent.prototype, "checked", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.switchChecked = value;
            this.checkboxCls = {
                'checkbox-disabled': this._disabled,
                'checkbox-active': this.switchChecked,
                'checkbox-inactive': !this.switchChecked
            };
            this.colorStyle = { background: value ? this._color : '' };
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SwitchComponent.prototype, "disabled", {
        get: /**
         * @return {?}
         */
        function () {
            return this._disabled;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._disabled = value;
            this.checkboxCls = {
                'checkbox-disabled': value,
                'checkbox-active': this.switchChecked,
                'checkbox-inactive': !this.switchChecked
            };
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @param {?} checkedValue
     * @return {?}
     */
    SwitchComponent.prototype.changeSwitch = /**
     * @param {?} checkedValue
     * @return {?}
     */
    function (checkedValue) {
        this.onChanged(checkedValue);
        this.switchChecked = checkedValue;
        this.checkboxCls = {
            'checkbox-disabled': this._disabled,
            'checkbox-active': this.switchChecked,
            'checkbox-inactive': !this.switchChecked
        };
        this.colorStyle = { background: checkedValue ? this._color : '' };
        this.onChange.emit(checkedValue);
    };
    /**
     * @return {?}
     */
    SwitchComponent.prototype.click = /**
     * @return {?}
     */
    function () {
        this.onClick.emit(this.switchChecked);
    };
    /**
     * @param {?} value
     * @return {?}
     */
    SwitchComponent.prototype.writeValue = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        this.switchChecked = value;
    };
    /**
     * @param {?} fn
     * @return {?}
     */
    SwitchComponent.prototype.registerOnChange = /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) {
        this.onChanged = fn;
    };
    /**
     * @param {?} fn
     * @return {?}
     */
    SwitchComponent.prototype.registerOnTouched = /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) {
        this.onTouched = fn;
    };
    SwitchComponent.decorators = [
        { type: Component, args: [{
                    selector: 'Switch, nzm-switch',
                    template: "<label class=\"{{ prefixCls }}\" [ngClass]=\"wrapCls\">\n  <input\n    #switchValue\n    type=\"checkbox\"\n    name=\"name\"\n    class=\"{{ prefixCls }}-checkbox\"\n    [checked]=\"switchChecked\"\n    [value]=\"switchChecked\"\n    [disabled]=\"disabled\"\n    (change)=\"changeSwitch(switchValue.checked)\"\n  />\n  <div class=\"checkbox\" [ngClass]=\"checkboxCls\" [ngStyle]=\"colorStyle\" (click)=\"click()\"></div>\n</label>\n",
                    encapsulation: ViewEncapsulation.None,
                    providers: [
                        {
                            provide: NG_VALUE_ACCESSOR,
                            useExisting: forwardRef((/**
                             * @return {?}
                             */
                            function () { return SwitchComponent; })),
                            multi: true
                        }
                    ]
                }] }
    ];
    /** @nocollapse */
    SwitchComponent.ctorParameters = function () { return []; };
    SwitchComponent.propDecorators = {
        color: [{ type: Input }],
        name: [{ type: Input }],
        platform: [{ type: Input }],
        checked: [{ type: Input }],
        disabled: [{ type: Input }],
        onChange: [{ type: Output }],
        onClick: [{ type: Output }],
        dispaly: [{ type: HostBinding, args: ['style.display',] }]
    };
    return SwitchComponent;
}());
if (false) {
    /** @type {?} */
    SwitchComponent.prototype.prefixCls;
    /** @type {?} */
    SwitchComponent.prototype.wrapCls;
    /** @type {?} */
    SwitchComponent.prototype.checkboxCls;
    /** @type {?} */
    SwitchComponent.prototype.colorStyle;
    /** @type {?} */
    SwitchComponent.prototype.switchChecked;
    /**
     * @type {?}
     * @private
     */
    SwitchComponent.prototype._color;
    /**
     * @type {?}
     * @private
     */
    SwitchComponent.prototype._disabled;
    /**
     * @type {?}
     * @private
     */
    SwitchComponent.prototype.onChanged;
    /**
     * @type {?}
     * @private
     */
    SwitchComponent.prototype.onTouched;
    /** @type {?} */
    SwitchComponent.prototype.name;
    /** @type {?} */
    SwitchComponent.prototype.onChange;
    /** @type {?} */
    SwitchComponent.prototype.onClick;
    /** @type {?} */
    SwitchComponent.prototype.dispaly;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var SwitchModule = /** @class */ (function () {
    function SwitchModule() {
    }
    SwitchModule.decorators = [
        { type: NgModule, args: [{
                    exports: [SwitchComponent],
                    declarations: [SwitchComponent],
                    imports: [CommonModule, WingBlankModule]
                },] }
    ];
    return SwitchModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var SearchBarComponent = /** @class */ (function () {
    function SearchBarComponent(_elementRef, _localeProvider) {
        var _a;
        this._elementRef = _elementRef;
        this._localeProvider = _localeProvider;
        this.prefixCls = 'am-search';
        this.cancelCls = (_a = {},
            _a[this.prefixCls + "-cancel"] = true,
            _a);
        this._defaultValue = '';
        this._value = '';
        this._placeholder = '';
        this._showCancelButton = false;
        this._disabled = false;
        this._focus = false;
        this._isSubmit = false;
        this._isCustomText = false;
        this._isClearClicking = false;
        this._blurFromOnClear = false;
        this.locale = {};
        this._unsubscribe$ = new Subject();
        this.onSubmit = new EventEmitter();
        this.onChange = new EventEmitter();
        this.onFocus = new EventEmitter();
        this.onBlur = new EventEmitter();
        this.onCancel = new EventEmitter();
        this.onClear = new EventEmitter();
        this.onChangeFn = (/**
         * @return {?}
         */
        function () { });
        this.onTouchFn = (/**
         * @return {?}
         */
        function () { });
    }
    Object.defineProperty(SearchBarComponent.prototype, "defaultValue", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._defaultValue = value;
            this._value = value;
            this.inputElementRef.nativeElement.value = this._value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SearchBarComponent.prototype, "value", {
        get: /**
         * @return {?}
         */
        function () {
            return this._value;
        },
        set: /**
         * @param {?} v
         * @return {?}
         */
        function (v) {
            this._value = v || '';
            this.inputElementRef.nativeElement.value = this._value;
            this.setClass();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SearchBarComponent.prototype, "placeholder", {
        get: /**
         * @return {?}
         */
        function () {
            return this._placeholder;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._placeholder = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SearchBarComponent.prototype, "showCancelButton", {
        get: /**
         * @return {?}
         */
        function () {
            return this._showCancelButton;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._showCancelButton = value;
            this.setClass();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SearchBarComponent.prototype, "cancelText", {
        get: /**
         * @return {?}
         */
        function () {
            return this._cancelText;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (value !== undefined) {
                this._cancelText = value;
                this._isCustomText = true;
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SearchBarComponent.prototype, "disabled", {
        get: /**
         * @return {?}
         */
        function () {
            return this._disabled;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._disabled = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SearchBarComponent.prototype, "maxLength", {
        get: /**
         * @return {?}
         */
        function () {
            return this._maxLength;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._maxLength = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SearchBarComponent.prototype, "setFocus", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (value) {
                if (value.focusValue) {
                    this._focus = true;
                    this.inputElementRef.nativeElement.focus();
                    this._blurFromOnClear = true;
                    this.onSearchbarFocus();
                }
                else {
                    this._blurFromOnClear = false;
                    this.onSearchbarBlur();
                }
            }
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @return {?}
     */
    SearchBarComponent.prototype.setClass = /**
     * @return {?}
     */
    function () {
        var _a, _b, _c;
        this.wrapCls = (_a = {},
            _a["" + this.prefixCls] = true,
            _a[this.prefixCls + "-start"] = !!(this._focus || (this._value && this._value.length > 0)) && !this._disabled,
            _a);
        this.cancelCls = (_b = {},
            _b[this.prefixCls + "-cancel"] = true,
            _b[this.prefixCls + "-cancel-show"] = this._showCancelButton || this._focus || (this._value && this._value.length > 0),
            _b[this.prefixCls + "-cancel-anim"] = this._focus,
            _b);
        this.clearCls = (_c = {},
            _c[this.prefixCls + "-clear"] = this._value && this._value.length > 0,
            _c[this.prefixCls + "-clear-show"] = this._value && this._value.length > 0 && !this._isSubmit,
            _c[this.prefixCls + "-clear-active"] = this._isClearClicking,
            _c);
    };
    /**
     * @return {?}
     */
    SearchBarComponent.prototype.setStyle = /**
     * @return {?}
     */
    function () {
        if (this._inputContainerRef.className.indexOf(this.prefixCls + "-start") > -1) {
            /** @type {?} */
            var realWidth = this._syntheticPhContainerRef.getBoundingClientRect().width;
            this._syntheticPhRef.style.width = Math.ceil(realWidth) + 'px';
            if (!this._showCancelButton) {
                this._rightBtnRef.style.marginRight = '0';
            }
        }
        else {
            this._syntheticPhRef.style.width = '100%';
            if (!this._showCancelButton) {
                this._rightBtnInitMarginLeft = window.getComputedStyle(this._rightBtnRef)['margin-left'];
                /** @type {?} */
                var btnMarginRight = this._rightBtnRef.offsetWidth + parseInt(this._rightBtnInitMarginLeft, 10);
                this._rightBtnRef.style.marginRight = '-' + btnMarginRight + 'px';
            }
        }
    };
    /**
     * @return {?}
     */
    SearchBarComponent.prototype.onSearchbarBlur = /**
     * @return {?}
     */
    function () {
        /** @type {?} */
        var self = this;
        setTimeout((/**
         * @return {?}
         */
        function () {
            if (!self._blurFromOnClear && self._value === '' && self._focus) {
                self._focus = false;
                self._value = '';
                self.onBlur.emit();
                self.setClass();
            }
            self._blurFromOnClear = false;
        }), 50);
    };
    /**
     * @return {?}
     */
    SearchBarComponent.prototype.onSearchbarFocus = /**
     * @return {?}
     */
    function () {
        this._focus = true;
        this._isSubmit = false;
        this.onFocus.emit();
        this.setClass();
    };
    /**
     * @param {?} e
     * @return {?}
     */
    SearchBarComponent.prototype.onSearchbarChange = /**
     * @param {?} e
     * @return {?}
     */
    function (e) {
        this._focus = true;
        this._value = e;
        this.onChange.emit(e);
        this.onChangeFn(e);
        this.setClass();
    };
    /**
     * @param {?} e
     * @return {?}
     */
    SearchBarComponent.prototype.onSearchSubmit = /**
     * @param {?} e
     * @return {?}
     */
    function (e) {
        e.preventDefault();
        this._value = e.target[0].value;
        this._isSubmit = true;
        this.onSubmit.emit(this._value);
        this.setClass();
        this._blurFromOnClear = true;
    };
    /**
     * @return {?}
     */
    SearchBarComponent.prototype.onSearchbarCancel = /**
     * @return {?}
     */
    function () {
        this._focus = false;
        this._value = '';
        this.onCancel.emit();
        this.setClass();
    };
    /**
     * @return {?}
     */
    SearchBarComponent.prototype.onSearchbarClear = /**
     * @return {?}
     */
    function () {
        var _this = this;
        this._blurFromOnClear = true;
        this._isClearClicking = true;
        this.onSearchbarChange('');
        this.inputElementRef.nativeElement.focus();
        this.onClear.emit(this._value);
        this.setClass();
        setTimeout((/**
         * @return {?}
         */
        function () {
            _this._value = '';
            _this._isClearClicking = false;
            _this._blurFromOnClear = false;
            _this.setClass();
        }), 100);
        this.onSearchbarFocus();
    };
    /**
     * @param {?} value
     * @return {?}
     */
    SearchBarComponent.prototype.writeValue = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        this._value = value || '';
        this.inputElementRef.nativeElement.value = this._value;
        this.setClass();
    };
    /**
     * @param {?} fn
     * @return {?}
     */
    SearchBarComponent.prototype.registerOnChange = /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) {
        this.onChangeFn = fn;
    };
    /**
     * @param {?} fn
     * @return {?}
     */
    SearchBarComponent.prototype.registerOnTouched = /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) {
        this.onTouchFn = fn;
    };
    /**
     * @return {?}
     */
    SearchBarComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        var _this = this;
        this.setClass();
        this._localeProvider.localeChange.pipe(takeUntil(this._unsubscribe$)).subscribe((/**
         * @param {?} _
         * @return {?}
         */
        function (_) {
            _this.locale = _this._localeProvider.getLocaleSubObj('SearchBar');
            _this._cancelText = _this._isCustomText ? _this._cancelText : _this.locale.cancelText;
        }));
    };
    /**
     * @return {?}
     */
    SearchBarComponent.prototype.ngAfterViewInit = /**
     * @return {?}
     */
    function () {
        this._syntheticPhContainerRef = this._elementRef.nativeElement.getElementsByClassName(this.prefixCls + "-synthetic-ph-container")[0];
        this._syntheticPhRef = this._elementRef.nativeElement.getElementsByClassName(this.prefixCls + "-synthetic-ph")[0];
        this._rightBtnRef = this._elementRef.nativeElement.getElementsByClassName('cancel')[0];
        this._inputContainerRef = this._elementRef.nativeElement.getElementsByClassName("" + this.prefixCls)[0];
    };
    /**
     * @return {?}
     */
    SearchBarComponent.prototype.ngAfterViewChecked = /**
     * @return {?}
     */
    function () {
        this.setStyle();
    };
    /**
     * @return {?}
     */
    SearchBarComponent.prototype.ngOnDestroy = /**
     * @return {?}
     */
    function () {
        this._unsubscribe$.next();
        this._unsubscribe$.complete();
    };
    SearchBarComponent.decorators = [
        { type: Component, args: [{
                    selector: 'SearchBar, nzm-search-bar',
                    template: "<form name=\"myForm\" class=\"{{ prefixCls }}\" [ngClass]=\"wrapCls\" action=\"#\" (submit)=\"onSearchSubmit($event)\">\n  <div class=\"{{ prefixCls }}-input\">\n    <div\n      class=\"{{ prefixCls }}-synthetic-ph\"\n      style=\"box-sizing:unset\"\n      [@cancelButtonState]=\"showCancelButton ? 'visible' : 'hidden'\"\n    >\n      <span class=\"{{ prefixCls }}-synthetic-ph-container\">\n        <i class=\"{{ prefixCls }}-synthetic-ph-icon\"></i>\n        <span\n          class=\"{{ prefixCls }}-synthetic-ph-placeholder\"\n          [ngStyle]=\"{ visibility: placeholder && !value ? 'visible' : 'hidden' }\"\n        >\n          {{ placeholder }}\n        </span>\n      </span>\n    </div>\n    <input\n      #search\n      class=\"{{ prefixCls }}-value\"\n      style=\"outline:none;\"\n      [name]=\"'search'\"\n      [type]=\"'search'\"\n      [disabled]=\"disabled\"\n      [maxlength]=\"maxLength\"\n      [placeholder]=\"placeholder\"\n      [ngModel]=\"value\"\n      (blur)=\"onSearchbarBlur()\"\n      (focus)=\"onSearchbarFocus()\"\n      (ngModelChange)=\"onSearchbarChange($event)\"\n    />\n    <a [ngClass]=\"clearCls\" style=\"box-sizing: content-box;transition: 0s\" (click)=\"onSearchbarClear()\"></a>\n  </div>\n  <div class=\"cancel\" [ngClass]=\"cancelCls\" (click)=\"onSearchbarCancel()\">\n    {{ cancelText }}\n  </div>\n</form>\n",
                    encapsulation: ViewEncapsulation.None,
                    providers: [
                        {
                            provide: NG_VALUE_ACCESSOR,
                            useExisting: forwardRef((/**
                             * @return {?}
                             */
                            function () { return SearchBarComponent; })),
                            multi: true
                        }
                    ],
                    animations: [
                        trigger('cancelButtonState', [
                            state('visible', style({ width: '*' })),
                            state('hidden', style({ width: '100%' })),
                            transition('visible =>hidden', [animate(300, style({ width: '100%' }))]),
                            transition('hidden => visible', [animate(300, style({ width: '*' }))])
                        ])
                    ]
                }] }
    ];
    /** @nocollapse */
    SearchBarComponent.ctorParameters = function () { return [
        { type: ElementRef },
        { type: LocaleProviderService }
    ]; };
    SearchBarComponent.propDecorators = {
        inputElementRef: [{ type: ViewChild, args: ['search', { static: true },] }],
        defaultValue: [{ type: Input }],
        value: [{ type: Input }],
        placeholder: [{ type: Input }],
        showCancelButton: [{ type: Input }],
        cancelText: [{ type: Input }],
        disabled: [{ type: Input }],
        maxLength: [{ type: Input }],
        setFocus: [{ type: Input }],
        onSubmit: [{ type: Output }],
        onChange: [{ type: Output }],
        onFocus: [{ type: Output }],
        onBlur: [{ type: Output }],
        onCancel: [{ type: Output }],
        onClear: [{ type: Output }]
    };
    return SearchBarComponent;
}());
if (false) {
    /** @type {?} */
    SearchBarComponent.prototype.prefixCls;
    /** @type {?} */
    SearchBarComponent.prototype.clearCls;
    /** @type {?} */
    SearchBarComponent.prototype.wrapCls;
    /** @type {?} */
    SearchBarComponent.prototype.cancelCls;
    /**
     * @type {?}
     * @private
     */
    SearchBarComponent.prototype._defaultValue;
    /**
     * @type {?}
     * @private
     */
    SearchBarComponent.prototype._value;
    /**
     * @type {?}
     * @private
     */
    SearchBarComponent.prototype._placeholder;
    /**
     * @type {?}
     * @private
     */
    SearchBarComponent.prototype._showCancelButton;
    /**
     * @type {?}
     * @private
     */
    SearchBarComponent.prototype._cancelText;
    /**
     * @type {?}
     * @private
     */
    SearchBarComponent.prototype._disabled;
    /**
     * @type {?}
     * @private
     */
    SearchBarComponent.prototype._maxLength;
    /**
     * @type {?}
     * @private
     */
    SearchBarComponent.prototype._focus;
    /**
     * @type {?}
     * @private
     */
    SearchBarComponent.prototype._isSubmit;
    /**
     * @type {?}
     * @private
     */
    SearchBarComponent.prototype._isCustomText;
    /**
     * @type {?}
     * @private
     */
    SearchBarComponent.prototype._isClearClicking;
    /**
     * @type {?}
     * @private
     */
    SearchBarComponent.prototype._syntheticPhContainerRef;
    /**
     * @type {?}
     * @private
     */
    SearchBarComponent.prototype._syntheticPhRef;
    /**
     * @type {?}
     * @private
     */
    SearchBarComponent.prototype._rightBtnRef;
    /**
     * @type {?}
     * @private
     */
    SearchBarComponent.prototype._inputContainerRef;
    /**
     * @type {?}
     * @private
     */
    SearchBarComponent.prototype._rightBtnInitMarginLeft;
    /**
     * @type {?}
     * @private
     */
    SearchBarComponent.prototype._blurFromOnClear;
    /**
     * @type {?}
     * @private
     */
    SearchBarComponent.prototype.locale;
    /**
     * @type {?}
     * @private
     */
    SearchBarComponent.prototype._unsubscribe$;
    /** @type {?} */
    SearchBarComponent.prototype.inputElementRef;
    /** @type {?} */
    SearchBarComponent.prototype.onSubmit;
    /** @type {?} */
    SearchBarComponent.prototype.onChange;
    /** @type {?} */
    SearchBarComponent.prototype.onFocus;
    /** @type {?} */
    SearchBarComponent.prototype.onBlur;
    /** @type {?} */
    SearchBarComponent.prototype.onCancel;
    /** @type {?} */
    SearchBarComponent.prototype.onClear;
    /**
     * @type {?}
     * @private
     */
    SearchBarComponent.prototype.onChangeFn;
    /**
     * @type {?}
     * @private
     */
    SearchBarComponent.prototype.onTouchFn;
    /**
     * @type {?}
     * @private
     */
    SearchBarComponent.prototype._elementRef;
    /**
     * @type {?}
     * @private
     */
    SearchBarComponent.prototype._localeProvider;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var LocaleProviderPipe = /** @class */ (function () {
    function LocaleProviderPipe(_locale) {
        this._locale = _locale;
    }
    /**
     * @param {?} keyPath
     * @return {?}
     */
    LocaleProviderPipe.prototype.transform = /**
     * @param {?} keyPath
     * @return {?}
     */
    function (keyPath) {
        return this._locale.getLocaleValue(keyPath);
    };
    LocaleProviderPipe.decorators = [
        { type: Pipe, args: [{
                    name: 'localeProvider'
                },] }
    ];
    /** @nocollapse */
    LocaleProviderPipe.ctorParameters = function () { return [
        { type: LocaleProviderService }
    ]; };
    return LocaleProviderPipe;
}());
if (false) {
    /**
     * @type {?}
     * @private
     */
    LocaleProviderPipe.prototype._locale;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var ɵ0$1 = zh_CN;
var LocaleProviderModule = /** @class */ (function () {
    function LocaleProviderModule() {
    }
    LocaleProviderModule.decorators = [
        { type: NgModule, args: [{
                    imports: [],
                    declarations: [LocaleProviderPipe],
                    exports: [LocaleProviderPipe],
                    providers: [{ provide: LOCAL_PROVIDER_TOKEN, useValue: ɵ0$1 }, LOCALE_PROVIDER_SERVICE_PROVIDER]
                },] }
    ];
    return LocaleProviderModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var SearchBarModule = /** @class */ (function () {
    function SearchBarModule() {
    }
    SearchBarModule.decorators = [
        { type: NgModule, args: [{
                    exports: [SearchBarComponent],
                    declarations: [SearchBarComponent],
                    imports: [CommonModule, FormsModule, LocaleProviderModule],
                    providers: [LocaleProviderModule]
                },] }
    ];
    return SearchBarModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var StepperComponent = /** @class */ (function () {
    function StepperComponent() {
        this.prefixCls = 'am-stepper';
        this._max = Infinity;
        this._min = -Infinity;
        this._step = 1;
        this._disabled = false;
        this._readOnly = false;
        this._showNumber = false;
        this._upDisabled = false;
        this._downDisabled = false;
        this._isUpClick = false;
        this._isDownClick = false;
        this.onChange = new EventEmitter();
        this.clsStepper = true;
        this.clsStpDisabled = this._disabled;
        this.clsShowNum = this._showNumber;
        this.onChangeFn = (/**
         * @return {?}
         */
        function () { });
        this.onTouchFn = (/**
         * @return {?}
         */
        function () { });
    }
    Object.defineProperty(StepperComponent.prototype, "max", {
        get: /**
         * @return {?}
         */
        function () {
            return this._max;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._max = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(StepperComponent.prototype, "min", {
        get: /**
         * @return {?}
         */
        function () {
            return this._min;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._min = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(StepperComponent.prototype, "value", {
        get: /**
         * @return {?}
         */
        function () {
            return this._value;
        },
        set: /**
         * @param {?} v
         * @return {?}
         */
        function (v) {
            this._value = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(StepperComponent.prototype, "step", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._step = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(StepperComponent.prototype, "defaultValue", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (value) {
                this._defaultValue = value;
                this._value = value;
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(StepperComponent.prototype, "disabled", {
        get: /**
         * @return {?}
         */
        function () {
            return this._disabled;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (value) {
                this._downDisabled = value;
                this._upDisabled = value;
            }
            this._disabled = value;
            this.clsStpDisabled = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(StepperComponent.prototype, "readOnly", {
        get: /**
         * @return {?}
         */
        function () {
            return this._readOnly;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._readOnly = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(StepperComponent.prototype, "showNumber", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._showNumber = value;
            this.clsShowNum = value;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @return {?}
     */
    StepperComponent.prototype.onIncrease = /**
     * @return {?}
     */
    function () {
        var _this = this;
        if (!this._upDisabled) {
            this._value = this.plus(this._value, this._step);
            this.onChange.emit(this._value);
            this.onChangeFn(this._value);
            if (this.plus(this._value, this._step) > this._max) {
                this._upDisabled = true;
            }
            if (this.minus(this._value, this._step) >= this._min) {
                this._downDisabled = false;
            }
            this._isUpClick = true;
            this.setCls();
            setTimeout((/**
             * @return {?}
             */
            function () {
                _this._isUpClick = false;
                _this.setCls();
            }), 100);
        }
    };
    /**
     * @return {?}
     */
    StepperComponent.prototype.onDecrease = /**
     * @return {?}
     */
    function () {
        var _this = this;
        if (!this._downDisabled) {
            this._value = this.minus(this._value, this._step);
            this.onChange.emit(this._value);
            this.onChangeFn(this._value);
            if (this.minus(this._value, this._step) < this._min) {
                this._downDisabled = true;
            }
            if (this.plus(this._value, this._step) <= this._max) {
                this._upDisabled = false;
            }
            this._isDownClick = true;
            this.setCls();
            setTimeout((/**
             * @return {?}
             */
            function () {
                _this._isDownClick = false;
                _this.setCls();
            }), 100);
        }
    };
    /**
     * @param {?} event
     * @return {?}
     */
    StepperComponent.prototype.inputChange = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        /** @type {?} */
        var value = event;
        this._value = value ? +value : 0;
        if (this._value < this._min) {
            this._value = this._min;
        }
        if (this._value > this._max) {
            this._value = this._max;
        }
        this._upDisabled = this.plus(this._value, this._step) > this._max ? true : false;
        this._downDisabled = this.minus(this._value, this._step) < this._min ? true : false;
        this.setCls();
        this.onChange.emit(this._value);
        this.onChangeFn(this._value);
    };
    /**
     * @return {?}
     */
    StepperComponent.prototype.setCls = /**
     * @return {?}
     */
    function () {
        var _a, _b;
        this.upDisableCls = (_a = {},
            _a[this.prefixCls + "-handler-up-disabled"] = this._upDisabled,
            _a[this.prefixCls + "-handler-active"] = this._isUpClick,
            _a);
        this.downDisableCls = (_b = {},
            _b[this.prefixCls + "-handler-down-disabled"] = this._downDisabled,
            _b[this.prefixCls + "-handler-active"] = this._isDownClick,
            _b);
    };
    /**
     * @return {?}
     */
    StepperComponent.prototype.ngOnChanges = /**
     * @return {?}
     */
    function () {
        if (this._disabled) {
            this._downDisabled = true;
            this._upDisabled = true;
        }
        else {
            this._upDisabled = this.plus(this._value, this._step) > this._max ? true : false;
            this._downDisabled = this.minus(this._value, this._step) < this._min ? true : false;
        }
        this.setCls();
    };
    /**
     * @param {?} value
     * @return {?}
     */
    StepperComponent.prototype.writeValue = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        this._value = value;
        this.ngOnChanges();
    };
    /**
     * @param {?} fn
     * @return {?}
     */
    StepperComponent.prototype.registerOnChange = /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) {
        this.onChangeFn = fn;
    };
    /**
     * @param {?} fn
     * @return {?}
     */
    StepperComponent.prototype.registerOnTouched = /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) {
        this.onTouchFn = fn;
    };
    /**
     * @param {?} num1
     * @param {?} num2
     * @return {?}
     */
    StepperComponent.prototype.plus = /**
     * @param {?} num1
     * @param {?} num2
     * @return {?}
     */
    function (num1, num2) {
        if (num1 === undefined || num1 === null || num2 === undefined || num2 === null) {
            return;
        }
        /** @type {?} */
        var baseNum = Math.pow(10, Math.max(this.digitLength(num1), this.digitLength(num2)));
        return (this.times(num1, baseNum) + this.times(num2, baseNum)) / baseNum;
    };
    /**
     * @param {?} num1
     * @param {?} num2
     * @return {?}
     */
    StepperComponent.prototype.minus = /**
     * @param {?} num1
     * @param {?} num2
     * @return {?}
     */
    function (num1, num2) {
        if (num1 === undefined || num1 === null || num2 === undefined || num2 === null) {
            return;
        }
        /** @type {?} */
        var baseNum = Math.pow(10, Math.max(this.digitLength(num1), this.digitLength(num2)));
        return (this.times(num1, baseNum) - this.times(num2, baseNum)) / baseNum;
    };
    /**
     * @param {?} num
     * @return {?}
     */
    StepperComponent.prototype.digitLength = /**
     * @param {?} num
     * @return {?}
     */
    function (num) {
        /** @type {?} */
        var eSplit = num.toString().split(/[eE]/);
        /** @type {?} */
        var len = (eSplit[0].split('.')[1] || '').length - +(eSplit[1] || 0);
        return len > 0 ? len : 0;
    };
    /**
     * @param {?} num1
     * @param {?} num2
     * @return {?}
     */
    StepperComponent.prototype.times = /**
     * @param {?} num1
     * @param {?} num2
     * @return {?}
     */
    function (num1, num2) {
        /** @type {?} */
        var num1Changed = this.floatToFixed(num1);
        /** @type {?} */
        var num2Changed = this.floatToFixed(num2);
        /** @type {?} */
        var baseNum = this.digitLength(num1) + this.digitLength(num2);
        /** @type {?} */
        var leftValue = num1Changed * num2Changed;
        return leftValue / Math.pow(10, baseNum);
    };
    /**
     * @param {?} num
     * @return {?}
     */
    StepperComponent.prototype.floatToFixed = /**
     * @param {?} num
     * @return {?}
     */
    function (num) {
        if (num.toString().indexOf('e') === -1) {
            return Number(num.toString().replace('.', ''));
        }
        /** @type {?} */
        var dLen = this.digitLength(num);
        return dLen > 0 ? this.strip(num * Math.pow(10, dLen)) : num;
    };
    /**
     * @param {?} num
     * @param {?=} precision
     * @return {?}
     */
    StepperComponent.prototype.strip = /**
     * @param {?} num
     * @param {?=} precision
     * @return {?}
     */
    function (num, precision) {
        if (precision === void 0) { precision = 12; }
        return +parseFloat(num.toPrecision(precision));
    };
    StepperComponent.decorators = [
        { type: Component, args: [{
                    selector: 'Stepper, nzm-stepper',
                    template: "<div class=\"{{ prefixCls }}-handler-wrap\">\n  <span\n    role=\"button\"\n    class=\"{{ prefixCls }}-handler {{ prefixCls }}-handler-up\"\n    style=\"line-height:28px;\"\n    [ngClass]=\"upDisableCls\"\n    (click)=\"onIncrease()\"\n  >\n    <Icon [type]=\"'plus'\" [size]=\"'xxs'\"> </Icon>\n  </span>\n  <span\n    role=\"button\"\n    class=\"{{ prefixCls }}-handler {{ prefixCls }}-handler-down\"\n    style=\"line-height:28px;\"\n    [ngClass]=\"downDisableCls\"\n    (click)=\"onDecrease()\"\n  >\n    <Icon [type]=\"'minus'\" [size]=\"'xxs'\"> </Icon>\n  </span>\n</div>\n<div class=\"{{ prefixCls }}-input-wrap\">\n  <input\n    class=\"{{ prefixCls }}-input\"\n    style=\"outline:none\"\n    [disabled]=\"disabled\"\n    [readonly]=\"readOnly\"\n    [autocomplete]=\"'off'\"\n    [max]=\"max\"\n    [min]=\"min\"\n    [(ngModel)]=\"value\"\n    (ngModelChange)=\"inputChange($event)\"\n  />\n</div>\n",
                    providers: [
                        {
                            provide: NG_VALUE_ACCESSOR,
                            useExisting: forwardRef((/**
                             * @return {?}
                             */
                            function () { return StepperComponent; })),
                            multi: true
                        }
                    ]
                }] }
    ];
    /** @nocollapse */
    StepperComponent.ctorParameters = function () { return []; };
    StepperComponent.propDecorators = {
        max: [{ type: Input }],
        min: [{ type: Input }],
        value: [{ type: Input }],
        step: [{ type: Input }],
        defaultValue: [{ type: Input }],
        disabled: [{ type: Input }],
        readOnly: [{ type: Input }],
        showNumber: [{ type: Input }],
        onChange: [{ type: Output }],
        clsStepper: [{ type: HostBinding, args: ['class.am-stepper',] }],
        clsStpDisabled: [{ type: HostBinding, args: ['class.am-stepper-disabled',] }],
        clsShowNum: [{ type: HostBinding, args: ['class.showNumber',] }]
    };
    return StepperComponent;
}());
if (false) {
    /** @type {?} */
    StepperComponent.prototype.prefixCls;
    /** @type {?} */
    StepperComponent.prototype.upDisableCls;
    /** @type {?} */
    StepperComponent.prototype.downDisableCls;
    /** @type {?} */
    StepperComponent.prototype.stepperCls;
    /**
     * @type {?}
     * @private
     */
    StepperComponent.prototype._max;
    /**
     * @type {?}
     * @private
     */
    StepperComponent.prototype._min;
    /**
     * @type {?}
     * @private
     */
    StepperComponent.prototype._value;
    /**
     * @type {?}
     * @private
     */
    StepperComponent.prototype._step;
    /**
     * @type {?}
     * @private
     */
    StepperComponent.prototype._defaultValue;
    /**
     * @type {?}
     * @private
     */
    StepperComponent.prototype._disabled;
    /**
     * @type {?}
     * @private
     */
    StepperComponent.prototype._readOnly;
    /**
     * @type {?}
     * @private
     */
    StepperComponent.prototype._showNumber;
    /**
     * @type {?}
     * @private
     */
    StepperComponent.prototype._upDisabled;
    /**
     * @type {?}
     * @private
     */
    StepperComponent.prototype._downDisabled;
    /**
     * @type {?}
     * @private
     */
    StepperComponent.prototype._isUpClick;
    /**
     * @type {?}
     * @private
     */
    StepperComponent.prototype._isDownClick;
    /** @type {?} */
    StepperComponent.prototype.onChange;
    /** @type {?} */
    StepperComponent.prototype.clsStepper;
    /** @type {?} */
    StepperComponent.prototype.clsStpDisabled;
    /** @type {?} */
    StepperComponent.prototype.clsShowNum;
    /**
     * @type {?}
     * @private
     */
    StepperComponent.prototype.onChangeFn;
    /**
     * @type {?}
     * @private
     */
    StepperComponent.prototype.onTouchFn;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var StepperModule = /** @class */ (function () {
    function StepperModule() {
    }
    StepperModule.decorators = [
        { type: NgModule, args: [{
                    exports: [StepperComponent],
                    declarations: [StepperComponent],
                    imports: [CommonModule, FormsModule, IconModule]
                },] }
    ];
    return StepperModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var StepComponent = /** @class */ (function () {
    function StepComponent(_el) {
        this._el = _el;
        this.prefixCls = 'am-steps';
        this.stepItemCls = {};
        this.isIconString = true;
        this.clsStepItem = true;
    }
    Object.defineProperty(StepComponent.prototype, "status", {
        get: /**
         * @return {?}
         */
        function () {
            return this._status;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (value) {
                this._status = value;
                this.setClass();
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(StepComponent.prototype, "title", {
        get: /**
         * @return {?}
         */
        function () {
            return this._title;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._title = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(StepComponent.prototype, "description", {
        get: /**
         * @return {?}
         */
        function () {
            return this._description;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._description = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(StepComponent.prototype, "icon", {
        get: /**
         * @return {?}
         */
        function () {
            return this._icon;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (value) {
                if (typeof value !== 'string') {
                    this.isIconString = false;
                }
                this._icon = value;
                this.setClass();
            }
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @return {?}
     */
    StepComponent.prototype.setClass = /**
     * @return {?}
     */
    function () {
        var _a, _b;
        this.iconCls = (_a = {},
            _a[this.prefixCls + "-icon"] = true,
            _a);
        this.stepItemCls = Object.assign(this.stepItemCls, (_b = {},
            _b[this.prefixCls + "-item-" + this.status] = true,
            _b[this.prefixCls + "-item-custom"] = this.icon,
            _b));
    };
    /**
     * @return {?}
     */
    StepComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () { };
    StepComponent.decorators = [
        { type: Component, args: [{
                    selector: 'Step, nzm-step',
                    template: "<div [ngClass]=\"stepItemCls\">\n  <div class=\"{{ prefixCls }}-item-tail\">\n    {{ tailContent }}\n  </div>\n  <div class=\"{{ prefixCls }}-item-icon\">\n    <span *ngIf=\"!isIconString\" [ngClass]=\"iconCls\">\n      <ng-template [ngTemplateOutlet]=\"icon\"></ng-template>\n    </span>\n    <span *ngIf=\"isIconString && (status === 'error' || status === 'finish' || status === 'wait')\" [ngClass]=\"iconCls\">\n      <Icon [type]=\"icon\" [size]=\"iconSize\"> </Icon>\n    </span>\n    <span *ngIf=\"isIconString && !(status === 'error' || status === 'finish' || status === 'wait')\" [ngClass]=\"iconCls\"\n      >{{ stepNumber }}\n    </span>\n  </div>\n  <div class=\"{{ prefixCls }}-item-content\">\n    <div class=\"{{ prefixCls }}-item-title\">\n      {{ title }}\n    </div>\n    <div *ngIf=\"description\" class=\"{{ prefixCls }}-item-description\">{{ description }}</div>\n  </div>\n</div>\n",
                    encapsulation: ViewEncapsulation.None,
                    providers: [
                        {
                            provide: NG_VALUE_ACCESSOR,
                            useExisting: forwardRef((/**
                             * @return {?}
                             */
                            function () { return StepComponent; })),
                            multi: true
                        }
                    ]
                }] }
    ];
    /** @nocollapse */
    StepComponent.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    StepComponent.propDecorators = {
        status: [{ type: Input }],
        title: [{ type: Input }],
        description: [{ type: Input }],
        icon: [{ type: Input }],
        clsStepItem: [{ type: HostBinding, args: ['class.am-steps-item',] }]
    };
    return StepComponent;
}());
if (false) {
    /** @type {?} */
    StepComponent.prototype.prefixCls;
    /** @type {?} */
    StepComponent.prototype.stepItemCls;
    /** @type {?} */
    StepComponent.prototype.iconCls;
    /** @type {?} */
    StepComponent.prototype.tailContent;
    /** @type {?} */
    StepComponent.prototype.stepNumber;
    /** @type {?} */
    StepComponent.prototype.isIconString;
    /** @type {?} */
    StepComponent.prototype.iconSize;
    /**
     * @type {?}
     * @private
     */
    StepComponent.prototype._status;
    /**
     * @type {?}
     * @private
     */
    StepComponent.prototype._title;
    /**
     * @type {?}
     * @private
     */
    StepComponent.prototype._description;
    /**
     * @type {?}
     * @private
     */
    StepComponent.prototype._icon;
    /** @type {?} */
    StepComponent.prototype.clsStepItem;
    /**
     * @type {?}
     * @private
     */
    StepComponent.prototype._el;
}
/** @enum {string} */
var StepStatusEnum = {
    WAIT: 'wait',
    PROCESS: 'process',
    FINISH: 'finish',
    ERROR: 'error',
};
/** @enum {string} */
var StepDirectionEnum = {
    VERTICAL: 'vertical',
    HORIZONTAL: 'horizontal',
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var StepsComponent = /** @class */ (function () {
    function StepsComponent(_elf, _render) {
        this._elf = _elf;
        this._render = _render;
        this.prefixCls = 'am-steps';
        this._current = 0;
        this._status = StepStatusEnum.PROCESS;
        this._direction = StepDirectionEnum.VERTICAL;
        this.clsSteps = true;
    }
    Object.defineProperty(StepsComponent.prototype, "current", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (value >= 0) {
                this._current = value;
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(StepsComponent.prototype, "size", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._size = value;
            this.setCls();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(StepsComponent.prototype, "status", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._status = value;
            if (this.stepItems) {
                this.setStepStyle();
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(StepsComponent.prototype, "direction", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._direction = value;
            this.setCls();
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @return {?}
     */
    StepsComponent.prototype.setStepStyle = /**
     * @return {?}
     */
    function () {
        /** @type {?} */
        var itemCount = this.stepItems.length;
        /** @type {?} */
        var itemArr = this.stepItems['_results'];
        for (var index = 0; index < itemCount; index++) {
            /** @type {?} */
            var step = itemArr[index];
            step.stepNumber = index + 1;
            if (index < itemCount - 1 && itemArr[index + 1].status === StepStatusEnum.ERROR) {
                step.stepItemCls = step.stepItemCls
                    ? Object.assign(step.stepItemCls, { 'error-tail': true })
                    : { 'error-tail': true };
            }
            /** @type {?} */
            var icon = step.icon;
            if (!step.status) {
                if (index === this._current) {
                    step.status = this._status;
                }
                else if (index < this._current) {
                    step.status = StepStatusEnum.FINISH;
                }
                else {
                    step.status = StepStatusEnum.WAIT;
                }
            }
            else if (step.status && !icon) {
                switch (step.status) {
                    case StepStatusEnum.FINISH:
                        icon = 'check-circle-o';
                        break;
                    case StepStatusEnum.ERROR:
                        icon = 'cross-circle-o';
                        break;
                }
            }
            if (!icon && step.status !== StepStatusEnum.PROCESS) {
                if (index < this._current) {
                    icon = 'check-circle-o';
                }
                else if (index > this._current) {
                    icon = 'ellipsis';
                    step.stepItemCls = step.stepItemCls
                        ? Object.assign(step.stepItemCls, { 'ellipsis-item': true })
                        : { 'ellipsis-item': true };
                }
                if ((this._status === StepStatusEnum.ERROR && index === this._current) ||
                    step.status === StepStatusEnum.ERROR) {
                    icon = 'cross-circle-o';
                }
            }
            step.icon = icon;
            step.iconSize = this._size === 'small' ? (this._status === StepStatusEnum.WAIT ? 'xxs' : 'xs') : 'md';
            step.setClass();
        }
    };
    /**
     * @return {?}
     */
    StepsComponent.prototype.setCls = /**
     * @return {?}
     */
    function () {
        if (this._direction === StepDirectionEnum.HORIZONTAL) {
            this.clsStepsLabelVtl = true;
            this.clsStepsHztl = true;
            this.clsStepsVtl = false;
        }
        else if (this._direction === StepDirectionEnum.VERTICAL) {
            this.clsStepsVtl = true;
            this.clsStepsHztl = false;
        }
        if (this._size === 'small') {
            this.clsStepsSmall = true;
        }
        else {
            this.clsStepsSmall = false;
        }
    };
    /**
     * @return {?}
     */
    StepsComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        this.setCls();
    };
    /**
     * @return {?}
     */
    StepsComponent.prototype.ngAfterContentInit = /**
     * @return {?}
     */
    function () {
        var _this = this;
        setTimeout((/**
         * @return {?}
         */
        function () {
            _this.setStepStyle();
        }), 0);
    };
    StepsComponent.decorators = [
        { type: Component, args: [{
                    selector: 'Steps,nzm-steps',
                    template: "<ng-content></ng-content>\n"
                }] }
    ];
    /** @nocollapse */
    StepsComponent.ctorParameters = function () { return [
        { type: ElementRef },
        { type: Renderer2 }
    ]; };
    StepsComponent.propDecorators = {
        stepItems: [{ type: ContentChildren, args: [StepComponent,] }],
        current: [{ type: Input }],
        size: [{ type: Input }],
        status: [{ type: Input }],
        direction: [{ type: Input }],
        clsSteps: [{ type: HostBinding, args: ['class.am-steps',] }],
        clsStepsSmall: [{ type: HostBinding, args: ['class.am-steps-small',] }],
        clsStepsLabelVtl: [{ type: HostBinding, args: ['class.am-steps-label-vertical',] }],
        clsStepsVtl: [{ type: HostBinding, args: ['class.am-steps-vertical',] }],
        clsStepsHztl: [{ type: HostBinding, args: ['class.am-steps-horizontal',] }]
    };
    return StepsComponent;
}());
if (false) {
    /** @type {?} */
    StepsComponent.prototype.prefixCls;
    /**
     * @type {?}
     * @private
     */
    StepsComponent.prototype._current;
    /**
     * @type {?}
     * @private
     */
    StepsComponent.prototype._size;
    /**
     * @type {?}
     * @private
     */
    StepsComponent.prototype._status;
    /**
     * @type {?}
     * @private
     */
    StepsComponent.prototype._direction;
    /**
     * @type {?}
     * @private
     */
    StepsComponent.prototype._stepsCls;
    /** @type {?} */
    StepsComponent.prototype.stepItems;
    /** @type {?} */
    StepsComponent.prototype.clsSteps;
    /** @type {?} */
    StepsComponent.prototype.clsStepsSmall;
    /** @type {?} */
    StepsComponent.prototype.clsStepsLabelVtl;
    /** @type {?} */
    StepsComponent.prototype.clsStepsVtl;
    /** @type {?} */
    StepsComponent.prototype.clsStepsHztl;
    /**
     * @type {?}
     * @private
     */
    StepsComponent.prototype._elf;
    /**
     * @type {?}
     * @private
     */
    StepsComponent.prototype._render;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var StepsModule = /** @class */ (function () {
    function StepsModule() {
    }
    StepsModule.decorators = [
        { type: NgModule, args: [{
                    exports: [StepsComponent, StepComponent],
                    declarations: [StepsComponent, StepComponent],
                    imports: [CommonModule, FormsModule, IconModule]
                },] }
    ];
    return StepsModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var CarouselSlideComponent = /** @class */ (function () {
    function CarouselSlideComponent() {
        this.container = true;
        this.height = 'auto';
        this.overflow = 'hidden';
    }
    CarouselSlideComponent.decorators = [
        { type: Component, args: [{
                    selector: 'CarouselSlide, nzm-carousel-slide',
                    template: "<ng-content></ng-content>\n",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    CarouselSlideComponent.propDecorators = {
        container: [{ type: HostBinding, args: ['class.carousel-container',] }],
        width: [{ type: HostBinding, args: ['style.width.px',] }],
        height: [{ type: HostBinding, args: ['style.height',] }],
        left: [{ type: HostBinding, args: ['style.left.px',] }],
        top: [{ type: HostBinding, args: ['style.top.px',] }],
        margin: [{ type: HostBinding, args: ['style.margin',] }],
        overflow: [{ type: HostBinding, args: ['style.overflow',] }]
    };
    return CarouselSlideComponent;
}());
if (false) {
    /** @type {?} */
    CarouselSlideComponent.prototype.container;
    /** @type {?} */
    CarouselSlideComponent.prototype.width;
    /** @type {?} */
    CarouselSlideComponent.prototype.height;
    /** @type {?} */
    CarouselSlideComponent.prototype.left;
    /** @type {?} */
    CarouselSlideComponent.prototype.top;
    /** @type {?} */
    CarouselSlideComponent.prototype.margin;
    /** @type {?} */
    CarouselSlideComponent.prototype.overflow;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @param {?} event
 * @return {?}
 */
function getEventTarget(event) {
    if (event.type === 'mousedown' ||
        event.type === 'mousemove' ||
        event.type === 'mouseup' ||
        event.type === 'mouseleave') {
        return event;
    }
    else {
        if (event && event.changedTouches && event.changedTouches[0]) {
            return event.changedTouches[0];
        }
    }
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var CarouselComponent = /** @class */ (function () {
    function CarouselComponent(_ele) {
        this._ele = _ele;
        this.style = {
            height: 'auto',
            width: '100%',
            transform: 'translate3d(0px, 0px, 0px)',
            margin: ''
        };
        this.lastIndex = 0;
        this.currentSelectedIndex = 0;
        this._nodeArr = [];
        this._isMouseDown = false;
        this._rationWidth = 0;
        this._currentSlideWidth = 0;
        this._currentSlideHeight = 0;
        this._transition = '';
        this._spaceWidth = 0;
        this._dragging = true;
        this._selectedIndex = 0;
        this.speed = 500;
        this.dots = true;
        this.vertical = false;
        this.autoplay = false;
        this.autoplayInterval = 3000;
        this.infinite = false;
        this.dotStyle = {};
        this.dotActiveStyle = {};
        this.frameOverflow = 'hidden';
        this.cellSpacing = 0;
        this.slideWidth = 1;
        this.swipeSpeed = 12;
        this.dragging = true;
        this.afterChange = new EventEmitter();
        this.beforeChange = new EventEmitter();
        this.carouselWrapper = true;
        this.carouselwrap = true;
    }
    Object.defineProperty(CarouselComponent.prototype, "selectedIndex", {
        get: /**
         * @return {?}
         */
        function () {
            return this._selectedIndex;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._selectedIndex = Math.abs(value);
            if (this._nodeArr.length > 0) {
                this.carousel(1);
            }
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @param {?} event
     * @return {?}
     */
    CarouselComponent.prototype.panstart = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        event.stopPropagation();
        if (!this._dragging) {
            return;
        }
        this.stopTimer();
        this._isMouseDown = true;
        this.touchObject = {
            startX: getEventTarget(event).pageX,
            startY: getEventTarget(event).pageY,
            direction: this.touchObject.direction
        };
    };
    /**
     * @param {?} event
     * @return {?}
     */
    CarouselComponent.prototype.panmove = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        event.stopPropagation();
        if (!this._dragging || !this._isMouseDown) {
            return;
        }
        var direction = this.swipeDirection(this.touchObject.startX, getEventTarget(event).pageX, this.touchObject.startY, getEventTarget(event).pageY).direction;
        if (direction === 0) {
            return;
        }
        /** @type {?} */
        var length = this.vertical
            ? Math.abs(getEventTarget(event).pageY - this.touchObject.startY)
            : Math.abs(getEventTarget(event).pageX - this.touchObject.startX);
        /** @type {?} */
        var offset = -this.touchObject.direction * length - this.currentSelectedIndex * this._rationWidth;
        this.touchObject = {
            startX: this.touchObject.startX,
            startY: this.touchObject.startY,
            endX: getEventTarget(event).pageX,
            endY: getEventTarget(event).pageY,
            length: length,
            direction: direction,
            offset: offset
        };
        if (direction !== 0) {
            this.setSlideStyles(this.currentSelectedIndex, this.touchObject.direction);
        }
        this.getListStyles(offset);
    };
    /**
     * @param {?} event
     * @return {?}
     */
    CarouselComponent.prototype.panend = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        var _this = this;
        event.stopPropagation();
        if (!this._dragging || !this._isMouseDown || !this.touchObject.length || this.touchObject.length === undefined) {
            this._isMouseDown = false;
            return;
        }
        this._isMouseDown = false;
        if (this.touchObject.length > this.swipeSpeed) {
            this.carousel(this.touchObject.direction);
        }
        else {
            this.getListStyles(this.touchObject.direction * this.touchObject.length + this.touchObject.offset);
            this.style['transition'] = this._transition;
        }
        setTimeout((/**
         * @return {?}
         */
        function () {
            _this.startTimer();
        }), this.speed);
    };
    /**
     * @return {?}
     */
    CarouselComponent.prototype.cancel = /**
     * @return {?}
     */
    function () {
        var _this = this;
        setTimeout((/**
         * @return {?}
         */
        function () {
            _this.startTimer();
        }), this.speed);
    };
    /**
     * @return {?}
     */
    CarouselComponent.prototype.resize = /**
     * @return {?}
     */
    function () {
        var _this = this;
        if (this._resizeTimer) {
            clearTimeout(this._resizeTimer);
        }
        this._resizeTimer = setTimeout((/**
         * @return {?}
         */
        function () {
            _this.ngAfterViewInit();
            clearTimeout(_this._resizeTimer);
        }), 200);
    };
    /**
     * @return {?}
     */
    CarouselComponent.prototype.initCarouselSize = /**
     * @return {?}
     */
    function () {
        /** @type {?} */
        var nativeElement = this._ele.nativeElement;
        this.slideHeight = nativeElement.querySelector('carouselslide').clientHeight;
        this._currentSlideHeight = this.slideHeight * this.slideWidth;
        this._currentSlideWidth = nativeElement.clientWidth;
        this._rationWidth = this.vertical ? this._currentSlideHeight : this._currentSlideWidth * this.slideWidth;
        this._spaceWidth = ((this.vertical ? this.slideHeight : this._currentSlideWidth) - this._rationWidth) / 2;
    };
    /**
     * @param {?} items
     * @return {?}
     */
    CarouselComponent.prototype.carouselInit = /**
     * @param {?} items
     * @return {?}
     */
    function (items) {
        var _this = this;
        this.infinite = this.infinite || true;
        this._nodeArr = items['_results'];
        /** @type {?} */
        var shouldDragging = this._nodeArr.length > 1;
        this._dragging = this.dragging && shouldDragging ? true : false;
        if (this._nodeArr.length > 1) {
            this.lastIndex = this._nodeArr.length - 1;
            setTimeout((/**
             * @return {?}
             */
            function () {
                _this._nodeArr.forEach((/**
                 * @param {?} v
                 * @param {?} index
                 * @return {?}
                 */
                function (v, index) {
                    v.width = _this.vertical ? 'auto' : _this._rationWidth - _this.cellSpacing;
                    v.left = _this.vertical ? 0 : index === _this.lastIndex ? -_this._rationWidth : index * _this._rationWidth;
                    v.top = _this.vertical ? (index === _this.lastIndex ? -_this._rationWidth : index * _this._rationWidth) : 0;
                    v.margin = _this.vertical ? _this.cellSpacing / 2 + "px auto" : "auto " + _this.cellSpacing / 2 + "px";
                }));
                _this.startTimer();
            }), 0);
        }
        else if (this._nodeArr.length === 1) {
            setTimeout((/**
             * @return {?}
             */
            function () {
                _this._nodeArr.forEach((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) {
                    v.width = _this.vertical ? 'auto' : _this._rationWidth - _this.cellSpacing;
                    v.left = 0;
                    v.top = 0;
                    v.margin = "auto " + _this.cellSpacing / 2 + "px";
                }));
            }), 0);
        }
    };
    /**
     * @return {?}
     */
    CarouselComponent.prototype.startTimer = /**
     * @return {?}
     */
    function () {
        var _this = this;
        if (!this.autoplay) {
            return;
        }
        this.stopTimer();
        this._timer = this.autoplayInterval
            ? setInterval((/**
             * @return {?}
             */
            function () {
                if (document.getElementsByTagName('carousel').length === 0) {
                    return;
                }
                _this.carousel(1);
            }), this.autoplayInterval)
            : 0;
    };
    /**
     * @return {?}
     */
    CarouselComponent.prototype.stopTimer = /**
     * @return {?}
     */
    function () {
        clearInterval(this._timer);
    };
    /**
     * @param {?} moveDirection
     * @return {?}
     */
    CarouselComponent.prototype.carousel = /**
     * @param {?} moveDirection
     * @return {?}
     */
    function (moveDirection) {
        if (this.vertical) {
            if (moveDirection === 1) {
                this.moveUp();
            }
            else if (moveDirection === -1) {
                this.moveDown();
            }
        }
        else {
            if (moveDirection === 1) {
                this.moveLeft();
            }
            else if (moveDirection === -1) {
                this.moveRight();
            }
        }
        this.style['transition'] = this._transition;
    };
    /**
     * @return {?}
     */
    CarouselComponent.prototype.moveUp = /**
     * @return {?}
     */
    function () {
        this.gotoCarousel(this.getAfterNode(false));
    };
    /**
     * @return {?}
     */
    CarouselComponent.prototype.moveDown = /**
     * @return {?}
     */
    function () {
        this.gotoCarousel(this.getAfterNode(true));
    };
    /**
     * @return {?}
     */
    CarouselComponent.prototype.moveLeft = /**
     * @return {?}
     */
    function () {
        this.gotoCarousel(this.getAfterNode(false));
    };
    /**
     * @return {?}
     */
    CarouselComponent.prototype.moveRight = /**
     * @return {?}
     */
    function () {
        this.gotoCarousel(this.getAfterNode(true));
    };
    /**
     * @param {?} pre
     * @return {?}
     */
    CarouselComponent.prototype.getAfterNode = /**
     * @param {?} pre
     * @return {?}
     */
    function (pre) {
        var _this = this;
        /** @type {?} */
        var nextIndex;
        if (pre) {
            if (this.currentSelectedIndex <= 0) {
                this.getListStyles(this._rationWidth);
                setTimeout((/**
                 * @return {?}
                 */
                function () {
                    _this._nodeArr.forEach((/**
                     * @param {?} v
                     * @param {?} tempIndex
                     * @return {?}
                     */
                    function (v, tempIndex) {
                        if (tempIndex === 0) {
                            v.left = _this.vertical ? 0 : _this._nodeArr.length * _this._rationWidth;
                            v.top = _this.vertical ? _this._nodeArr.length * _this._rationWidth : 0;
                        }
                        else {
                            v.left = _this.vertical ? 0 : tempIndex * _this._rationWidth;
                            v.top = _this.vertical ? tempIndex * _this._rationWidth : 0;
                        }
                    }));
                    _this.getListStyles(-_this._rationWidth * (_this.items.length - 1));
                }), this.speed);
                nextIndex = !this.infinite ? null : this.lastIndex;
                this.beforeChange.emit({ from: this.currentSelectedIndex, to: nextIndex });
                return nextIndex;
            }
            nextIndex = this.currentSelectedIndex - 1;
            this.getListStyles(nextIndex * this._rationWidth * this.touchObject.direction);
            this._nodeArr.forEach((/**
             * @param {?} v
             * @param {?} tempIndex
             * @return {?}
             */
            function (v, tempIndex) {
                if (0 === tempIndex && nextIndex === _this._nodeArr.length - 2) {
                    v.left = 0;
                    v.top = 0;
                }
            }));
            this.beforeChange.emit({ from: this.currentSelectedIndex, to: nextIndex });
            return nextIndex;
        }
        else {
            if (this.currentSelectedIndex >= this.lastIndex) {
                this.setSlideStyles(this.currentSelectedIndex, 1);
                this.getListStyles(-(this.lastIndex + 1) * this._rationWidth);
                nextIndex = !this.infinite ? null : 0;
                this.beforeChange.emit({ from: this.currentSelectedIndex, to: nextIndex });
                return nextIndex;
            }
            nextIndex = this.currentSelectedIndex + 1;
            this.setSlideStyles(this.currentSelectedIndex, 1);
            this.getListStyles(-nextIndex * this._rationWidth);
            this.beforeChange.emit({ from: this.currentSelectedIndex, to: nextIndex });
            return nextIndex;
        }
    };
    /**
     * @return {?}
     */
    CarouselComponent.prototype.caculateDirectionLeftCurrentIndex = /**
     * @return {?}
     */
    function () {
        /** @type {?} */
        var previousIndex = this.currentSelectedIndex;
        this.currentSelectedIndex = (previousIndex + 1) % this.items.length;
    };
    /**
     * @return {?}
     */
    CarouselComponent.prototype.caculateDirectionRightCurrentIndex = /**
     * @return {?}
     */
    function () {
        if (this.currentSelectedIndex === 0) {
            this.currentSelectedIndex = this.items.length;
        }
        /** @type {?} */
        var previousIndex = this.currentSelectedIndex;
        this.currentSelectedIndex = (previousIndex - 1) % this.items.length;
    };
    /**
     * @param {?} afterIndex
     * @return {?}
     */
    CarouselComponent.prototype.gotoCarousel = /**
     * @param {?} afterIndex
     * @return {?}
     */
    function (afterIndex) {
        var _this = this;
        if (afterIndex === null) {
            return;
        }
        this.getCurrentIndex();
        if (afterIndex === 0) {
            setTimeout((/**
             * @return {?}
             */
            function () {
                _this._nodeArr.forEach((/**
                 * @param {?} v
                 * @param {?} index
                 * @return {?}
                 */
                function (v, index) {
                    if (index === _this._nodeArr.length - 1) {
                        v.left = _this.vertical ? 0 : -_this._rationWidth;
                        v.top = _this.vertical ? -_this._rationWidth : 0;
                    }
                    else {
                        v.left = _this.vertical ? 0 : index * _this._rationWidth;
                        v.top = _this.vertical ? index * _this._rationWidth : 0;
                    }
                }));
                _this.startTimer();
                _this.getListStyles(0);
            }), this.speed);
        }
        this.currentSelectedIndex = afterIndex;
        this.afterChange.emit(this.currentSelectedIndex);
    };
    /**
     * @return {?}
     */
    CarouselComponent.prototype.getCurrentIndex = /**
     * @return {?}
     */
    function () {
        if (this.touchObject.direction === 1) {
            this.caculateDirectionLeftCurrentIndex();
        }
        else {
            this.caculateDirectionRightCurrentIndex();
        }
    };
    /**
     * @param {?} index
     * @param {?} direction
     * @param {?=} xDist
     * @return {?}
     */
    CarouselComponent.prototype.setSlideStyles = /**
     * @param {?} index
     * @param {?} direction
     * @param {?=} xDist
     * @return {?}
     */
    function (index, direction, xDist) {
        var _this = this;
        if (xDist === void 0) { xDist = 0; }
        if (direction === 1) {
            this._nodeArr.forEach((/**
             * @param {?} v
             * @param {?} tempIndex
             * @return {?}
             */
            function (v, tempIndex) {
                if (index < _this._nodeArr.length && index - 1 === tempIndex) {
                    if (xDist === 0 || xDist > _this._spaceWidth) {
                        v.left = _this.vertical ? 0 : (_this._nodeArr.length + tempIndex) * _this._rationWidth;
                        v.top = _this.vertical ? (_this._nodeArr.length + tempIndex) * _this._rationWidth : 0;
                    }
                }
                else if (_this._nodeArr.length - 1 === tempIndex && index !== 2) {
                    if (xDist === 0 || xDist > _this._spaceWidth) {
                        v.left = _this.vertical ? 0 : (_this._nodeArr.length - 1) * _this._rationWidth;
                        v.top = _this.vertical ? (_this._nodeArr.length - 1) * _this._rationWidth : 0;
                    }
                }
                else if (index === _this._nodeArr.length - 1 && tempIndex === 1 && _this.autoplay) {
                    v.left = _this.vertical ? 0 : (_this._nodeArr.length + tempIndex) * _this._rationWidth;
                    v.top = _this.vertical ? tempIndex * _this._rationWidth : 0;
                }
                else if (index === _this._nodeArr.length - 1 && tempIndex === 0 && !_this.autoplay) {
                    v.left = _this.vertical ? 0 : (_this._nodeArr.length + tempIndex) * _this._rationWidth;
                    v.top = _this.vertical ? tempIndex * _this._rationWidth : 0;
                }
            }));
        }
        else if (direction === -1) {
            this._nodeArr.forEach((/**
             * @param {?} v
             * @param {?} tempIndex
             * @return {?}
             */
            function (v, tempIndex) {
                if (index === 0 && _this._nodeArr.length - 1 === tempIndex) {
                    v.left = _this.vertical ? 0 : direction * _this._rationWidth;
                    v.top = _this.vertical ? direction * _this._rationWidth : 0;
                }
                else if (index === _this._nodeArr.length - 2 && index + 1 === tempIndex) {
                    v.left = _this.vertical ? 0 : direction * _this._rationWidth;
                    v.top = _this.vertical ? direction * _this._rationWidth : 0;
                }
                else if (index === 1 && 0 === tempIndex) {
                    v.left = _this.vertical ? 0 : direction * _this._rationWidth * tempIndex;
                    v.top = _this.vertical ? direction * _this._rationWidth : 0;
                }
                else if (index > 1) {
                    v.left = _this.vertical ? 0 : tempIndex * _this._rationWidth;
                    v.top = _this.vertical ? tempIndex * _this._rationWidth : 0;
                }
            }));
        }
    };
    /**
     * @param {?=} offset
     * @return {?}
     */
    CarouselComponent.prototype.getListStyles = /**
     * @param {?=} offset
     * @return {?}
     */
    function (offset) {
        if (offset === void 0) { offset = 0; }
        /** @type {?} */
        var positionOffset = offset +
            (this.vertical
                ? (this.slideHeight - this._currentSlideHeight) / 2
                : (this._currentSlideWidth - this._rationWidth) / 2) -
            this.cellSpacing;
        this.style = {
            height: this._currentSlideHeight + 'px',
            width: '100%',
            transform: this.vertical
                ? "translate3d(0px, " + positionOffset + "px, 0px)"
                : "translate3d(" + positionOffset + "px, 0px, 0px)",
            margin: this.vertical ? (this.cellSpacing / 2) * -1 + "px 0px" : "0px " + (this.cellSpacing / 2) * -1 + "px"
        };
    };
    /**
     * @param {?} x1
     * @param {?} x2
     * @param {?} y1
     * @param {?} y2
     * @return {?}
     */
    CarouselComponent.prototype.swipeDirection = /**
     * @param {?} x1
     * @param {?} x2
     * @param {?} y1
     * @param {?} y2
     * @return {?}
     */
    function (x1, x2, y1, y2) {
        /** @type {?} */
        var xDist = x1 - x2;
        /** @type {?} */
        var yDist = y1 - y2;
        /** @type {?} */
        var r = Math.atan2(yDist, xDist);
        /** @type {?} */
        var swipeAngle = Math.round((r * 180) / Math.PI);
        if (swipeAngle < 0) {
            swipeAngle = 360 - Math.abs(swipeAngle);
        }
        if (swipeAngle <= 45 && swipeAngle >= 0) {
            return {
                direction: 1,
                xDist: xDist
            };
        }
        if (swipeAngle <= 360 && swipeAngle >= 315) {
            return {
                direction: 1,
                xDist: xDist
            };
        }
        if (swipeAngle >= 135 && swipeAngle <= 225) {
            return {
                direction: -1,
                xDist: xDist
            };
        }
        if (this.vertical === true) {
            if (swipeAngle >= 35 + 33 && swipeAngle <= 135) {
                return {
                    direction: 1,
                    xDist: xDist
                };
            }
            else {
                return {
                    direction: -1,
                    xDist: xDist
                };
            }
        }
        return {
            direction: 0,
            xDist: xDist
        };
    };
    Object.defineProperty(CarouselComponent.prototype, "page", {
        get: /**
         * @return {?}
         */
        function () {
            return this.dots ? this.currentSelectedIndex : 0;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CarouselComponent.prototype, "pageCount", {
        get: /**
         * @return {?}
         */
        function () {
            return this.dots ? this.items.length : 0;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CarouselComponent.prototype, "dotindicatorStatus", {
        get: /**
         * @return {?}
         */
        function () {
            return this.dots ? this.items.length > 1 : this.dots;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @return {?}
     */
    CarouselComponent.prototype.ngAfterViewInit = /**
     * @return {?}
     */
    function () {
        var _this = this;
        this.touchObject = { direction: 1 };
        this._transition = "transform " + this.speed / 1000 + "s";
        this.items.changes.subscribe((/**
         * @param {?} items
         * @return {?}
         */
        function (items) {
            _this.carouselInit(items);
        }));
        this.initCarouselSize();
        this.selectedIndex = this.items.length - 1 < this.selectedIndex ? 0 : this.selectedIndex;
        /** @type {?} */
        var index = this.items.length > 1 ? (this.items.length - 1 === this.selectedIndex ? -1 : this.selectedIndex) : 0;
        setTimeout((/**
         * @return {?}
         */
        function () {
            _this.currentSelectedIndex = _this.selectedIndex;
        }), 0);
        this.getListStyles(-index * this._rationWidth);
        this.carouselInit(this.items);
        /** @type {?} */
        var nativeElement = this._ele.nativeElement;
        /** @type {?} */
        var targetNode = nativeElement.querySelector('carouselslide');
        /** @type {?} */
        var config = { attributes: true, childList: true, subtree: true };
        /** @type {?} */
        var callback = (/**
         * @param {?} mutationsList
         * @return {?}
         */
        function (mutationsList) {
            var e_1, _a;
            try {
                for (var mutationsList_1 = __values(mutationsList), mutationsList_1_1 = mutationsList_1.next(); !mutationsList_1_1.done; mutationsList_1_1 = mutationsList_1.next()) {
                    var mutation = mutationsList_1_1.value;
                    if (mutation.type == 'attributes') {
                        if (_this.slideHeight !== nativeElement.querySelector('carouselslide').clientHeight) {
                            _this.initCarouselSize();
                            _this.getListStyles(-index * _this._rationWidth);
                            _this.carouselInit(_this.items);
                        }
                    }
                }
            }
            catch (e_1_1) { e_1 = { error: e_1_1 }; }
            finally {
                try {
                    if (mutationsList_1_1 && !mutationsList_1_1.done && (_a = mutationsList_1.return)) _a.call(mutationsList_1);
                }
                finally { if (e_1) throw e_1.error; }
            }
        });
        this._observer = new MutationObserver(callback);
        this._observer.observe(targetNode, config);
    };
    /**
     * @return {?}
     */
    CarouselComponent.prototype.ngOnDestroy = /**
     * @return {?}
     */
    function () {
        this._observer.disconnect();
        this._observer = null;
        this.stopTimer();
    };
    CarouselComponent.decorators = [
        { type: Component, args: [{
                    selector: 'Carousel, nzm-carousel',
                    encapsulation: ViewEncapsulation.None,
                    template: "<div class=\"slider-frame\" [ngStyle]=\"{ overflow: frameOverflow }\">\n  <ul class=\"slider-list\" [ngStyle]=\"style\">\n    <ng-content></ng-content>\n  </ul>\n</div>\n<DotIndicator\n  *ngIf=\"dotindicatorStatus\"\n  class=\"am-carousel-wrap-dot\"\n  [page]=\"page\"\n  [dotStyle]=\"dotStyle\"\n  [pageCount]=\"pageCount\"\n  [dotActiveStyle]=\"dotActiveStyle\"\n></DotIndicator>\n"
                }] }
    ];
    /** @nocollapse */
    CarouselComponent.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    CarouselComponent.propDecorators = {
        items: [{ type: ContentChildren, args: [CarouselSlideComponent,] }],
        speed: [{ type: Input }],
        dots: [{ type: Input }],
        vertical: [{ type: Input }],
        autoplay: [{ type: Input }],
        autoplayInterval: [{ type: Input }],
        infinite: [{ type: Input }],
        dotStyle: [{ type: Input }],
        dotActiveStyle: [{ type: Input }],
        frameOverflow: [{ type: Input }],
        cellSpacing: [{ type: Input }],
        slideWidth: [{ type: Input }],
        swipeSpeed: [{ type: Input }],
        dragging: [{ type: Input }],
        selectedIndex: [{ type: Input }],
        afterChange: [{ type: Output }],
        beforeChange: [{ type: Output }],
        carouselWrapper: [{ type: HostBinding, args: ['class.am-carousel',] }],
        carouselwrap: [{ type: HostBinding, args: ['class.carousel',] }],
        panstart: [{ type: HostListener, args: ['mousedown', ['$event'],] }, { type: HostListener, args: ['touchstart', ['$event'],] }],
        panmove: [{ type: HostListener, args: ['mousemove', ['$event'],] }, { type: HostListener, args: ['touchmove', ['$event'],] }],
        panend: [{ type: HostListener, args: ['mouseleave', ['$event'],] }, { type: HostListener, args: ['mouseup', ['$event'],] }, { type: HostListener, args: ['touchend', ['$event'],] }],
        cancel: [{ type: HostListener, args: ['touchcancel',] }],
        resize: [{ type: HostListener, args: ['window:resize',] }]
    };
    return CarouselComponent;
}());
if (false) {
    /** @type {?} */
    CarouselComponent.prototype.slideHeight;
    /** @type {?} */
    CarouselComponent.prototype.touchObject;
    /** @type {?} */
    CarouselComponent.prototype.style;
    /** @type {?} */
    CarouselComponent.prototype.lastIndex;
    /** @type {?} */
    CarouselComponent.prototype.currentSelectedIndex;
    /**
     * @type {?}
     * @private
     */
    CarouselComponent.prototype._timer;
    /**
     * @type {?}
     * @private
     */
    CarouselComponent.prototype._resizeTimer;
    /**
     * @type {?}
     * @private
     */
    CarouselComponent.prototype._nodeArr;
    /**
     * @type {?}
     * @private
     */
    CarouselComponent.prototype._isMouseDown;
    /**
     * @type {?}
     * @private
     */
    CarouselComponent.prototype._rationWidth;
    /**
     * @type {?}
     * @private
     */
    CarouselComponent.prototype._currentSlideWidth;
    /**
     * @type {?}
     * @private
     */
    CarouselComponent.prototype._currentSlideHeight;
    /**
     * @type {?}
     * @private
     */
    CarouselComponent.prototype._transition;
    /**
     * @type {?}
     * @private
     */
    CarouselComponent.prototype._spaceWidth;
    /**
     * @type {?}
     * @private
     */
    CarouselComponent.prototype._observer;
    /**
     * @type {?}
     * @private
     */
    CarouselComponent.prototype._dragging;
    /**
     * @type {?}
     * @private
     */
    CarouselComponent.prototype._selectedIndex;
    /** @type {?} */
    CarouselComponent.prototype.items;
    /** @type {?} */
    CarouselComponent.prototype.speed;
    /** @type {?} */
    CarouselComponent.prototype.dots;
    /** @type {?} */
    CarouselComponent.prototype.vertical;
    /** @type {?} */
    CarouselComponent.prototype.autoplay;
    /** @type {?} */
    CarouselComponent.prototype.autoplayInterval;
    /** @type {?} */
    CarouselComponent.prototype.infinite;
    /** @type {?} */
    CarouselComponent.prototype.dotStyle;
    /** @type {?} */
    CarouselComponent.prototype.dotActiveStyle;
    /** @type {?} */
    CarouselComponent.prototype.frameOverflow;
    /** @type {?} */
    CarouselComponent.prototype.cellSpacing;
    /** @type {?} */
    CarouselComponent.prototype.slideWidth;
    /** @type {?} */
    CarouselComponent.prototype.swipeSpeed;
    /** @type {?} */
    CarouselComponent.prototype.dragging;
    /** @type {?} */
    CarouselComponent.prototype.afterChange;
    /** @type {?} */
    CarouselComponent.prototype.beforeChange;
    /** @type {?} */
    CarouselComponent.prototype.carouselWrapper;
    /** @type {?} */
    CarouselComponent.prototype.carouselwrap;
    /**
     * @type {?}
     * @private
     */
    CarouselComponent.prototype._ele;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var DotIndicatorComponent = /** @class */ (function () {
    function DotIndicatorComponent() {
        this.items = [];
        this._page = 0;
        this._pageCount = 0;
        this.dotStyle = {};
        this.dotActiveStyle = {};
        this.dotColor = 'white';
        this.dotIndicator = true;
    }
    Object.defineProperty(DotIndicatorComponent.prototype, "page", {
        set: /**
         * @param {?} p
         * @return {?}
         */
        function (p) {
            this._page = p;
            this.updateSelected();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DotIndicatorComponent.prototype, "pageCount", {
        set: /**
         * @param {?} p
         * @return {?}
         */
        function (p) {
            this._pageCount = p || 0;
            this.updateItems();
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @private
     * @return {?}
     */
    DotIndicatorComponent.prototype.updateItems = /**
     * @private
     * @return {?}
     */
    function () {
        this.items = new Array(this._pageCount);
        for (var i = 0; i < this._pageCount; i++) {
            this.items[i] = { active: i == this._page };
        }
    };
    /**
     * @private
     * @return {?}
     */
    DotIndicatorComponent.prototype.updateSelected = /**
     * @private
     * @return {?}
     */
    function () {
        if (this.items.length != this._pageCount) {
            return this.updateItems();
        }
        if (this.items.length == 0) {
            return;
        }
        for (var i = 0; i < this._pageCount; i++) {
            this.items[i].active = false;
        }
        this.items[this._page].active = true;
    };
    DotIndicatorComponent.decorators = [
        { type: Component, args: [{
                    selector: 'DotIndicator, nzm-dot-indicator',
                    template: "<div class=\"am-carousel-wrap\">\n  <div *ngFor=\"let item of items\" class=\"am-carousel-wrap-dot\" [class.am-carousel-wrap-dot-active]=\"item.active\">\n    <span [ngStyle]=\"item.active ? dotActiveStyle : dotStyle\"></span>\n  </div>\n</div>\n",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    DotIndicatorComponent.propDecorators = {
        page: [{ type: Input }],
        pageCount: [{ type: Input }],
        dotStyle: [{ type: Input }],
        dotActiveStyle: [{ type: Input }],
        dotColor: [{ type: Input }],
        dotIndicator: [{ type: HostBinding, args: ['class.dot-indicator',] }]
    };
    return DotIndicatorComponent;
}());
if (false) {
    /** @type {?} */
    DotIndicatorComponent.prototype.items;
    /**
     * @type {?}
     * @private
     */
    DotIndicatorComponent.prototype._page;
    /**
     * @type {?}
     * @private
     */
    DotIndicatorComponent.prototype._pageCount;
    /** @type {?} */
    DotIndicatorComponent.prototype.dotStyle;
    /** @type {?} */
    DotIndicatorComponent.prototype.dotActiveStyle;
    /** @type {?} */
    DotIndicatorComponent.prototype.dotColor;
    /** @type {?} */
    DotIndicatorComponent.prototype.dotIndicator;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var CarouselModule = /** @class */ (function () {
    function CarouselModule() {
    }
    CarouselModule.decorators = [
        { type: NgModule, args: [{
                    imports: [CommonModule],
                    declarations: [CarouselComponent, CarouselSlideComponent, DotIndicatorComponent],
                    exports: [CarouselComponent, CarouselSlideComponent, DotIndicatorComponent]
                },] }
    ];
    return CarouselModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var CheckboxComponent = /** @class */ (function () {
    function CheckboxComponent() {
        var _a;
        this.prefixCls = 'am-checkbox';
        this.classMap = (_a = {},
            _a[this.prefixCls] = true,
            _a[this.prefixCls + "-checked"] = false,
            _a[this.prefixCls + "-disabled"] = false,
            _a);
        this._checked = false;
        this._disabled = false;
        this.onChange = new EventEmitter();
        this.checkBoxWrapper = true;
    }
    Object.defineProperty(CheckboxComponent.prototype, "checked", {
        get: /**
         * @return {?}
         */
        function () {
            return this._checked;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (!this._disabled) {
                this._checked = value;
                this.updateClassMap();
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CheckboxComponent.prototype, "disabled", {
        get: /**
         * @return {?}
         */
        function () {
            return this._disabled;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._disabled = value;
            this.updateClassMap();
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @param {?} event
     * @return {?}
     */
    CheckboxComponent.prototype.onClick = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        event.preventDefault();
        if (!this._disabled) {
            this.updateValue(!this.checked);
        }
    };
    /**
     * @param {?} value
     * @return {?}
     */
    CheckboxComponent.prototype.updateValue = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        this.checked = value;
        this.onChange.emit({
            name: this.name,
            value: this.value,
            checked: value
        });
    };
    /**
     * @return {?}
     */
    CheckboxComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        this.updateClassMap();
    };
    /**
     * @private
     * @return {?}
     */
    CheckboxComponent.prototype.updateClassMap = /**
     * @private
     * @return {?}
     */
    function () {
        var _a;
        this.classMap = (_a = {},
            _a[this.prefixCls] = true,
            _a[this.prefixCls + "-checked"] = this.checked,
            _a[this.prefixCls + "-disabled"] = this.disabled,
            _a);
    };
    CheckboxComponent.decorators = [
        { type: Component, args: [{
                    selector: '[Checkbox], [nzm-checkbox]',
                    template: "<span [ngClass]=\"classMap\">\n  <input\n    type=\"checkbox\"\n    class=\"{{ prefixCls }}-input\"\n    [attr.name]=\"name\"\n    [attr.value]=\"value\"\n    [checked]=\"checked\"\n    [disabled]=\"disabled\"\n  />\n  <span class=\"{{ prefixCls }}-inner\"></span>\n</span>\n<ng-content></ng-content>\n",
                    preserveWhitespaces: false,
                    encapsulation: ViewEncapsulation.None,
                    changeDetection: ChangeDetectionStrategy.OnPush
                }] }
    ];
    /** @nocollapse */
    CheckboxComponent.ctorParameters = function () { return []; };
    CheckboxComponent.propDecorators = {
        name: [{ type: Input }],
        value: [{ type: Input }],
        checked: [{ type: Input }],
        disabled: [{ type: Input }],
        onChange: [{ type: Output }],
        checkBoxWrapper: [{ type: HostBinding, args: ['class.am-checkbox-wrapper',] }],
        onClick: [{ type: HostListener, args: ['click', ['$event'],] }]
    };
    return CheckboxComponent;
}());
if (false) {
    /** @type {?} */
    CheckboxComponent.prototype.prefixCls;
    /** @type {?} */
    CheckboxComponent.prototype.classMap;
    /**
     * @type {?}
     * @private
     */
    CheckboxComponent.prototype._checked;
    /**
     * @type {?}
     * @private
     */
    CheckboxComponent.prototype._disabled;
    /** @type {?} */
    CheckboxComponent.prototype.name;
    /** @type {?} */
    CheckboxComponent.prototype.value;
    /** @type {?} */
    CheckboxComponent.prototype.onChange;
    /** @type {?} */
    CheckboxComponent.prototype.checkBoxWrapper;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var AgreeItemComponent = /** @class */ (function () {
    function AgreeItemComponent(cdr) {
        this.cdr = cdr;
        this.prefixCls = 'am-checkbox';
        this.checked = false;
        this._disabled = false;
        this.onChange = new EventEmitter();
        this.checkboxAgree = true;
    }
    Object.defineProperty(AgreeItemComponent.prototype, "disabled", {
        get: /**
         * @return {?}
         */
        function () {
            return this._disabled;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._disabled = value;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @param {?} event
     * @return {?}
     */
    AgreeItemComponent.prototype.change = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        this.checked = event.checked;
        this._ngModelOnChange(event.checked);
        this.onChange.emit(event);
    };
    /**
     * @param {?} value
     * @return {?}
     */
    AgreeItemComponent.prototype.writeValue = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        this.checked = value;
        this.cdr.markForCheck();
    };
    /**
     * @param {?} fn
     * @return {?}
     */
    AgreeItemComponent.prototype.registerOnChange = /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) {
        this._ngModelOnChange = fn;
    };
    /**
     * @param {?} fn
     * @return {?}
     */
    AgreeItemComponent.prototype.registerOnTouched = /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) {
        this._ngModelOnTouched = fn;
    };
    AgreeItemComponent.decorators = [
        { type: Component, args: [{
                    selector: 'AgreeItem, nzm-agree-item',
                    template: "<label\n  Checkbox\n  class=\"{{ prefixCls }}-agree-label\"\n  [name]=\"name\"\n  [value]=\"value\"\n  [checked]=\"checked\"\n  [disabled]=\"disabled\"\n  (onChange)=\"change($event)\"\n>\n  <ng-content></ng-content>\n</label>\n",
                    encapsulation: ViewEncapsulation.None,
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    providers: [
                        {
                            provide: NG_VALUE_ACCESSOR,
                            useExisting: forwardRef((/**
                             * @return {?}
                             */
                            function () { return AgreeItemComponent; })),
                            multi: true
                        }
                    ]
                }] }
    ];
    /** @nocollapse */
    AgreeItemComponent.ctorParameters = function () { return [
        { type: ChangeDetectorRef }
    ]; };
    AgreeItemComponent.propDecorators = {
        name: [{ type: Input }],
        value: [{ type: Input }],
        disabled: [{ type: Input }],
        onChange: [{ type: Output }],
        checkboxAgree: [{ type: HostBinding, args: ['class.am-checkbox-agree',] }]
    };
    return AgreeItemComponent;
}());
if (false) {
    /** @type {?} */
    AgreeItemComponent.prototype.prefixCls;
    /** @type {?} */
    AgreeItemComponent.prototype.checked;
    /**
     * @type {?}
     * @private
     */
    AgreeItemComponent.prototype._disabled;
    /**
     * @type {?}
     * @private
     */
    AgreeItemComponent.prototype._ngModelOnChange;
    /**
     * @type {?}
     * @private
     */
    AgreeItemComponent.prototype._ngModelOnTouched;
    /** @type {?} */
    AgreeItemComponent.prototype.name;
    /** @type {?} */
    AgreeItemComponent.prototype.value;
    /** @type {?} */
    AgreeItemComponent.prototype.onChange;
    /** @type {?} */
    AgreeItemComponent.prototype.checkboxAgree;
    /**
     * @type {?}
     * @private
     */
    AgreeItemComponent.prototype.cdr;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var CheckboxItemComponent = /** @class */ (function () {
    function CheckboxItemComponent(cdr) {
        this.cdr = cdr;
        this.prefixCls = 'am-checkbox';
        this.checked = false;
        this._disabled = false;
        this.wrap = false;
        this.error = false;
        this.multipleLine = false;
        this.platform = 'ios';
        this.align = 'middle';
        this.onChange = new EventEmitter();
    }
    Object.defineProperty(CheckboxItemComponent.prototype, "disabled", {
        get: /**
         * @return {?}
         */
        function () {
            return this._disabled;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._disabled = value;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @param {?} event
     * @return {?}
     */
    CheckboxItemComponent.prototype.onCheckboxClick = /**
     * @param {?} event
     * @return {?}
     */
    function (event) { };
    /**
     * @param {?} event
     * @return {?}
     */
    CheckboxItemComponent.prototype.change = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        this.checked = event.checked;
        this._ngModelOnChange(event.checked);
        this.onChange.emit(event);
    };
    /**
     * @param {?} value
     * @return {?}
     */
    CheckboxItemComponent.prototype.writeValue = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        this.checked = value;
        this.cdr.markForCheck();
    };
    /**
     * @param {?} fn
     * @return {?}
     */
    CheckboxItemComponent.prototype.registerOnChange = /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) {
        this._ngModelOnChange = fn;
    };
    /**
     * @param {?} fn
     * @return {?}
     */
    CheckboxItemComponent.prototype.registerOnTouched = /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) {
        this._ngModelOnTouched = fn;
    };
    CheckboxItemComponent.decorators = [
        { type: Component, args: [{
                    selector: 'CheckboxItem, nzm-checkbox-item',
                    template: "<ListItem\n  [className]=\"'am-checkbox-item ' + (disabled ? 'am-checkbox-item-disabled' : '')\"\n  [wrap]=\"wrap\"\n  [align]=\"align\"\n  [arrow]=\"arrow\"\n  [error]=\"error\"\n  [extra]=\"extra\"\n  [thumb]=\"checkbox\"\n  [disabled]=\"disabled\"\n  [platform]=\"platform\"\n  [multipleLine]=\"multipleLine\"\n  (onClick)=\"onCheckboxClick($event)\"\n>\n  <ng-content></ng-content>\n</ListItem>\n<ng-template #checkbox>\n  <label Checkbox [name]=\"name\" [value]=\"value\" [checked]=\"checked\" [disabled]=\"disabled\" (onChange)=\"change($event)\">\n  </label>\n</ng-template>\n",
                    encapsulation: ViewEncapsulation.None,
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    providers: [
                        {
                            provide: NG_VALUE_ACCESSOR,
                            useExisting: forwardRef((/**
                             * @return {?}
                             */
                            function () { return CheckboxItemComponent; })),
                            multi: true
                        }
                    ]
                }] }
    ];
    /** @nocollapse */
    CheckboxItemComponent.ctorParameters = function () { return [
        { type: ChangeDetectorRef }
    ]; };
    CheckboxItemComponent.propDecorators = {
        name: [{ type: Input }],
        value: [{ type: Input }],
        arrow: [{ type: Input }],
        extra: [{ type: Input }],
        wrap: [{ type: Input }],
        error: [{ type: Input }],
        multipleLine: [{ type: Input }],
        platform: [{ type: Input }],
        align: [{ type: Input }],
        disabled: [{ type: Input }],
        onChange: [{ type: Output }]
    };
    return CheckboxItemComponent;
}());
if (false) {
    /** @type {?} */
    CheckboxItemComponent.prototype.prefixCls;
    /** @type {?} */
    CheckboxItemComponent.prototype.checked;
    /**
     * @type {?}
     * @private
     */
    CheckboxItemComponent.prototype._disabled;
    /**
     * @type {?}
     * @private
     */
    CheckboxItemComponent.prototype._ngModelOnChange;
    /**
     * @type {?}
     * @private
     */
    CheckboxItemComponent.prototype._ngModelOnTouched;
    /** @type {?} */
    CheckboxItemComponent.prototype.name;
    /** @type {?} */
    CheckboxItemComponent.prototype.value;
    /** @type {?} */
    CheckboxItemComponent.prototype.arrow;
    /** @type {?} */
    CheckboxItemComponent.prototype.extra;
    /** @type {?} */
    CheckboxItemComponent.prototype.wrap;
    /** @type {?} */
    CheckboxItemComponent.prototype.error;
    /** @type {?} */
    CheckboxItemComponent.prototype.multipleLine;
    /** @type {?} */
    CheckboxItemComponent.prototype.platform;
    /** @type {?} */
    CheckboxItemComponent.prototype.align;
    /** @type {?} */
    CheckboxItemComponent.prototype.onChange;
    /**
     * @type {?}
     * @private
     */
    CheckboxItemComponent.prototype.cdr;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var CheckboxModule = /** @class */ (function () {
    function CheckboxModule() {
    }
    CheckboxModule.decorators = [
        { type: NgModule, args: [{
                    imports: [CommonModule, FormsModule, ListModule],
                    declarations: [CheckboxComponent, CheckboxItemComponent, AgreeItemComponent],
                    exports: [CheckboxComponent, CheckboxItemComponent, AgreeItemComponent]
                },] }
    ];
    return CheckboxModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var RadioComponent = /** @class */ (function () {
    function RadioComponent() {
        var _a;
        this.prefixCls = 'am-radio';
        this.classMap = (_a = {},
            _a[this.prefixCls] = true,
            _a[this.prefixCls + "-checked"] = this.checked,
            _a[this.prefixCls + "-disabled"] = this.disabled,
            _a);
        this._checked = false;
        this._disabled = false;
        this.onChange = new EventEmitter();
        this.radioWrapper = true;
    }
    Object.defineProperty(RadioComponent.prototype, "checked", {
        get: /**
         * @return {?}
         */
        function () {
            return this._checked;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._checked = value;
            this.updateClassMap();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(RadioComponent.prototype, "disabled", {
        get: /**
         * @return {?}
         */
        function () {
            return this._disabled;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._disabled = value;
            this.updateClassMap();
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @param {?} event
     * @return {?}
     */
    RadioComponent.prototype.onClick = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        event.preventDefault();
        if (!this._disabled && !this._checked) {
            this.updateValue(true);
        }
    };
    /**
     * @param {?} checkValue
     * @return {?}
     */
    RadioComponent.prototype.updateValue = /**
     * @param {?} checkValue
     * @return {?}
     */
    function (checkValue) {
        this.checked = checkValue;
        this.onChange.emit({
            name: this.name,
            value: this.value
        });
    };
    /**
     * @return {?}
     */
    RadioComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        this.updateClassMap();
    };
    /**
     * @private
     * @return {?}
     */
    RadioComponent.prototype.updateClassMap = /**
     * @private
     * @return {?}
     */
    function () {
        var _a;
        this.classMap = (_a = {},
            _a[this.prefixCls] = true,
            _a[this.prefixCls + "-checked"] = this.checked,
            _a[this.prefixCls + "-disabled"] = this.disabled,
            _a);
    };
    RadioComponent.decorators = [
        { type: Component, args: [{
                    selector: '[Radio], [nzm-radio]',
                    template: "<span [ngClass]=\"classMap\">\n  <input\n    type=\"radio\"\n    class=\"{{ prefixCls }}-input\"\n    [attr.name]=\"name\"\n    [attr.value]=\"value\"\n    [checked]=\"checked\"\n    [disabled]=\"disabled\"\n  />\n  <span class=\"{{ prefixCls }}-inner\"></span>\n</span>\n<ng-content></ng-content>\n",
                    preserveWhitespaces: false,
                    encapsulation: ViewEncapsulation.None,
                    changeDetection: ChangeDetectionStrategy.OnPush
                }] }
    ];
    /** @nocollapse */
    RadioComponent.ctorParameters = function () { return []; };
    RadioComponent.propDecorators = {
        name: [{ type: Input }],
        value: [{ type: Input }],
        checked: [{ type: Input }],
        disabled: [{ type: Input }],
        onChange: [{ type: Output }],
        radioWrapper: [{ type: HostBinding, args: ['class.am-radio-wrapper',] }],
        onClick: [{ type: HostListener, args: ['click', ['$event'],] }]
    };
    return RadioComponent;
}());
if (false) {
    /** @type {?} */
    RadioComponent.prototype.prefixCls;
    /** @type {?} */
    RadioComponent.prototype.classMap;
    /**
     * @type {?}
     * @private
     */
    RadioComponent.prototype._checked;
    /**
     * @type {?}
     * @private
     */
    RadioComponent.prototype._disabled;
    /** @type {?} */
    RadioComponent.prototype.name;
    /** @type {?} */
    RadioComponent.prototype.value;
    /** @type {?} */
    RadioComponent.prototype.onChange;
    /** @type {?} */
    RadioComponent.prototype.radioWrapper;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var RadioItemComponent = /** @class */ (function () {
    function RadioItemComponent(cdr) {
        this.cdr = cdr;
        this.select$ = new Subject();
        this.prefixCls = 'am-radio';
        this._checked = false;
        this._disabled = false;
        this.wrap = false;
        this.error = false;
        this.multipleLine = false;
        this.platform = 'ios';
        this.align = 'middle';
    }
    Object.defineProperty(RadioItemComponent.prototype, "checked", {
        get: /**
         * @return {?}
         */
        function () {
            return this._checked;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._checked = value;
            this.cdr.markForCheck();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(RadioItemComponent.prototype, "disabled", {
        get: /**
         * @return {?}
         */
        function () {
            return this._disabled;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._disabled = value;
            this.cdr.markForCheck();
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @param {?} event
     * @return {?}
     */
    RadioItemComponent.prototype.onRadioItemClick = /**
     * @param {?} event
     * @return {?}
     */
    function (event) { };
    /**
     * @param {?} event
     * @return {?}
     */
    RadioItemComponent.prototype.change = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        if (!this.disabled && !this.checked) {
            this.select$.next(this);
        }
    };
    /**
     * @return {?}
     */
    RadioItemComponent.prototype.markForCheck = /**
     * @return {?}
     */
    function () {
        this.cdr.markForCheck();
    };
    RadioItemComponent.decorators = [
        { type: Component, args: [{
                    selector: 'RadioItem, nzm-radio-item',
                    template: "<ListItem\n  [wrap]=\"wrap\"\n  [align]=\"align\"\n  [arrow]=\"arrow\"\n  [error]=\"error\"\n  [extra]=\"radio\"\n  [thumb]=\"thumb\"\n  [disabled]=\"disabled\"\n  [platform]=\"platform\"\n  [multipleLine]=\"multipleLine\"\n  [className]=\"'am-radio-item ' + (disabled ? 'am-radio-item-disabled' : '')\"\n  (onClick)=\"onRadioItemClick($event)\"\n>\n  <ng-content></ng-content>\n</ListItem>\n<ng-template #radio>\n  <label\n    Radio\n    [name]=\"name\"\n    [value]=\"value\"\n    [checked]=\"checked\"\n    [disabled]=\"disabled\"\n    (onChange)=\"change($event)\"\n  ></label>\n</ng-template>\n",
                    encapsulation: ViewEncapsulation.None,
                    changeDetection: ChangeDetectionStrategy.OnPush
                }] }
    ];
    /** @nocollapse */
    RadioItemComponent.ctorParameters = function () { return [
        { type: ChangeDetectorRef }
    ]; };
    RadioItemComponent.propDecorators = {
        name: [{ type: Input }],
        value: [{ type: Input }],
        arrow: [{ type: Input }],
        thumb: [{ type: Input }],
        wrap: [{ type: Input }],
        error: [{ type: Input }],
        multipleLine: [{ type: Input }],
        platform: [{ type: Input }],
        align: [{ type: Input }],
        disabled: [{ type: Input }]
    };
    return RadioItemComponent;
}());
if (false) {
    /** @type {?} */
    RadioItemComponent.prototype.select$;
    /** @type {?} */
    RadioItemComponent.prototype.prefixCls;
    /**
     * @type {?}
     * @private
     */
    RadioItemComponent.prototype._checked;
    /**
     * @type {?}
     * @private
     */
    RadioItemComponent.prototype._disabled;
    /** @type {?} */
    RadioItemComponent.prototype.name;
    /** @type {?} */
    RadioItemComponent.prototype.value;
    /** @type {?} */
    RadioItemComponent.prototype.arrow;
    /** @type {?} */
    RadioItemComponent.prototype.thumb;
    /** @type {?} */
    RadioItemComponent.prototype.wrap;
    /** @type {?} */
    RadioItemComponent.prototype.error;
    /** @type {?} */
    RadioItemComponent.prototype.multipleLine;
    /** @type {?} */
    RadioItemComponent.prototype.platform;
    /** @type {?} */
    RadioItemComponent.prototype.align;
    /**
     * @type {?}
     * @private
     */
    RadioItemComponent.prototype.cdr;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/** @type {?} */
var RADIO_ITEM_GROUP_VALUE_ACCESSOR = {
    provide: NG_VALUE_ACCESSOR,
    useExisting: forwardRef((/**
     * @return {?}
     */
    function () { return RadioItemGroupComponent; })),
    multi: true
};
var RadioItemGroupComponent = /** @class */ (function () {
    function RadioItemGroupComponent(cdr) {
        this.cdr = cdr;
        this.destroy$ = new Subject();
        this.onChange = new EventEmitter();
    }
    /**
     * @return {?}
     */
    RadioItemGroupComponent.prototype.updateChildrenStatus = /**
     * @return {?}
     */
    function () {
        var _this = this;
        if (this.radioItems && typeof this.selectedValue !== 'undefined' && null !== this.selectedValue) {
            Promise.resolve().then((/**
             * @return {?}
             */
            function () {
                _this.radioItems.forEach((/**
                 * @param {?} radioItem
                 * @return {?}
                 */
                function (radioItem) {
                    radioItem.checked = radioItem.value === _this.selectedValue;
                    radioItem.markForCheck();
                }));
            }));
        }
    };
    /**
     * @return {?}
     */
    RadioItemGroupComponent.prototype.ngAfterContentInit = /**
     * @return {?}
     */
    function () {
        var _this = this;
        this.radioItems.changes
            .pipe(startWith(null), takeUntil(this.destroy$))
            .subscribe((/**
         * @return {?}
         */
        function () {
            _this.updateChildrenStatus();
            if (_this.selectSubscription) {
                _this.selectSubscription.unsubscribe();
            }
            _this.selectSubscription = merge.apply(void 0, __spread(_this.radioItems.map((/**
             * @param {?} radioItem
             * @return {?}
             */
            function (radioItem) { return radioItem.select$; })))).pipe(takeUntil(_this.destroy$))
                .subscribe((/**
             * @param {?} radioItem
             * @return {?}
             */
            function (radioItem) {
                if (typeof _this.selectedValue !== 'undefined' && null !== _this.selectedValue) {
                    _this.selectedValue = radioItem.value;
                    _this._ngModelOnChange(radioItem.value);
                    _this.updateChildrenStatus();
                    if (_this.onChange) {
                        _this.onChange.emit({ name: radioItem.name, value: radioItem.value });
                    }
                }
            }));
        }));
    };
    /**
     * @return {?}
     */
    RadioItemGroupComponent.prototype.ngOnDestroy = /**
     * @return {?}
     */
    function () {
        this.destroy$.next();
        this.destroy$.complete();
    };
    /**
     * @param {?} value
     * @return {?}
     */
    RadioItemGroupComponent.prototype.writeValue = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        if (typeof value !== 'undefined' && null !== value) {
            this.selectedValue = value;
            this.updateChildrenStatus();
            this.cdr.markForCheck();
        }
    };
    /**
     * @param {?} fn
     * @return {?}
     */
    RadioItemGroupComponent.prototype.registerOnChange = /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) {
        this._ngModelOnChange = fn;
    };
    /**
     * @param {?} fn
     * @return {?}
     */
    RadioItemGroupComponent.prototype.registerOnTouched = /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) {
        this._ngModelOnTouched = fn;
    };
    RadioItemGroupComponent.decorators = [
        { type: Component, args: [{
                    selector: 'RadioItemGroup, nzm-radio-item-group',
                    template: "<ng-content></ng-content>\n",
                    encapsulation: ViewEncapsulation.None,
                    changeDetection: ChangeDetectionStrategy.OnPush,
                    providers: [RADIO_ITEM_GROUP_VALUE_ACCESSOR]
                }] }
    ];
    /** @nocollapse */
    RadioItemGroupComponent.ctorParameters = function () { return [
        { type: ChangeDetectorRef }
    ]; };
    RadioItemGroupComponent.propDecorators = {
        radioItems: [{ type: ContentChildren, args: [forwardRef((/**
                     * @return {?}
                     */
                    function () { return RadioItemComponent; })),] }],
        onChange: [{ type: Output }]
    };
    return RadioItemGroupComponent;
}());
if (false) {
    /**
     * @type {?}
     * @private
     */
    RadioItemGroupComponent.prototype.selectedValue;
    /**
     * @type {?}
     * @private
     */
    RadioItemGroupComponent.prototype.destroy$;
    /**
     * @type {?}
     * @private
     */
    RadioItemGroupComponent.prototype.selectSubscription;
    /**
     * @type {?}
     * @private
     */
    RadioItemGroupComponent.prototype._ngModelOnChange;
    /**
     * @type {?}
     * @private
     */
    RadioItemGroupComponent.prototype._ngModelOnTouched;
    /** @type {?} */
    RadioItemGroupComponent.prototype.radioItems;
    /** @type {?} */
    RadioItemGroupComponent.prototype.onChange;
    /**
     * @type {?}
     * @private
     */
    RadioItemGroupComponent.prototype.cdr;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var RadioModule = /** @class */ (function () {
    function RadioModule() {
    }
    RadioModule.decorators = [
        { type: NgModule, args: [{
                    imports: [CommonModule, FormsModule, ListModule],
                    declarations: [RadioComponent, RadioItemComponent, RadioItemGroupComponent],
                    exports: [RadioComponent, RadioItemComponent, RadioItemGroupComponent]
                },] }
    ];
    return RadioModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var ProgressComponent = /** @class */ (function () {
    function ProgressComponent() {
        this.prefixCls = 'am-progress';
        this._percent = 0;
        this._exceedance = false;
        this.unfilled = true;
        this.position = 'fixed';
        this.barStyle = {};
        this.max = 100;
        this.amProgress = true;
        this.outer = true;
    }
    Object.defineProperty(ProgressComponent.prototype, "percent", {
        get: /**
         * @return {?}
         */
        function () {
            return this._percent;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._percent = value;
            if (value > 100) {
                this._exceedance = true;
            }
            else {
                this._exceedance = false;
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ProgressComponent.prototype, "value", {
        get: /**
         * @return {?}
         */
        function () {
            return this.percent;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ProgressComponent.prototype, "fixOuter", {
        get: /**
         * @return {?}
         */
        function () {
            return 'fixed' === this.position;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ProgressComponent.prototype, "hideOuter", {
        get: /**
         * @return {?}
         */
        function () {
            return !this.unfilled && !this._exceedance;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ProgressComponent.prototype, "exceedance", {
        get: /**
         * @return {?}
         */
        function () {
            return this._exceedance;
        },
        enumerable: true,
        configurable: true
    });
    ProgressComponent.decorators = [
        { type: Component, args: [{
                    selector: 'Progress, nzm-progress',
                    template: "<div\n  class=\"{{ prefixCls }}-bar\"\n  [ngStyle]=\"barStyle\"\n  [style.width.%]=\"percent <= 100 ? percent : 10000 / percent\"\n></div>\n",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    /** @nocollapse */
    ProgressComponent.ctorParameters = function () { return []; };
    ProgressComponent.propDecorators = {
        unfilled: [{ type: Input }],
        position: [{ type: Input }],
        barStyle: [{ type: Input }],
        percent: [{ type: Input }],
        max: [{ type: HostBinding, args: ['attr.max',] }],
        value: [{ type: HostBinding, args: ['attr.value',] }],
        amProgress: [{ type: HostBinding, args: ['class.am-progress',] }],
        outer: [{ type: HostBinding, args: ['class.am-progress-outer',] }],
        fixOuter: [{ type: HostBinding, args: ['class.am-progress-fixed-outer',] }],
        hideOuter: [{ type: HostBinding, args: ['class.am-progress-hide-outer',] }],
        exceedance: [{ type: HostBinding, args: ['class.am-progress-exceedance',] }]
    };
    return ProgressComponent;
}());
if (false) {
    /** @type {?} */
    ProgressComponent.prototype.prefixCls;
    /**
     * @type {?}
     * @private
     */
    ProgressComponent.prototype._percent;
    /**
     * @type {?}
     * @private
     */
    ProgressComponent.prototype._exceedance;
    /** @type {?} */
    ProgressComponent.prototype.unfilled;
    /** @type {?} */
    ProgressComponent.prototype.position;
    /** @type {?} */
    ProgressComponent.prototype.barStyle;
    /** @type {?} */
    ProgressComponent.prototype.max;
    /** @type {?} */
    ProgressComponent.prototype.amProgress;
    /** @type {?} */
    ProgressComponent.prototype.outer;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var ProgressModule = /** @class */ (function () {
    function ProgressModule() {
    }
    ProgressModule.decorators = [
        { type: NgModule, args: [{
                    imports: [CommonModule],
                    declarations: [ProgressComponent],
                    exports: [ProgressComponent]
                },] }
    ];
    return ProgressModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var AccordionService = /** @class */ (function () {
    function AccordionService() {
        this.accordion = false;
    }
    /**
     * @param {?} component
     * @return {?}
     */
    AccordionService.prototype.getComponent = /**
     * @param {?} component
     * @return {?}
     */
    function (component) {
        this.accordion = component.accordion;
        this.component = component;
    };
    AccordionService.decorators = [
        { type: Injectable }
    ];
    return AccordionService;
}());
if (false) {
    /** @type {?} */
    AccordionService.prototype.component;
    /** @type {?} */
    AccordionService.prototype.accordion;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var AccordionGroupComponent = /** @class */ (function () {
    function AccordionGroupComponent(_accordionService, _cdr) {
        this._accordionService = _accordionService;
        this._cdr = _cdr;
        this.isShowChild = true;
        this.isOpened = false;
        this.disabled = false;
        this.onOpen = new EventEmitter();
        this.onClose = new EventEmitter();
        this.onChange = new EventEmitter();
        this.isTemplateRef = isTemplateRef;
        this.amItem = true;
        this.isActive = this.isOpened;
        this.addon = true;
    }
    /**
     * @return {?}
     */
    AccordionGroupComponent.prototype.checkAndToggle = /**
     * @return {?}
     */
    function () {
        this.toggle();
    };
    Object.defineProperty(AccordionGroupComponent.prototype, "slide", {
        get: /**
         * @return {?}
         */
        function () {
            return this.isOpened ? 'down' : 'up';
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @return {?}
     */
    AccordionGroupComponent.prototype.toggle = /**
     * @return {?}
     */
    function () {
        if (this.disabled) {
            return;
        }
        this.isShowChild = true;
        /** @type {?} */
        var isOpenedBeforeWeChange = this.isOpened;
        if (this._accordionService.accordion) {
            this._accordionService.component.closeAll();
        }
        this.isOpened = !isOpenedBeforeWeChange;
        if (this.isOpened) {
            this.onOpen.emit();
        }
        else {
            this.onClose.emit();
        }
        this.onChange.emit(this.isOpened);
    };
    /**
     * @return {?}
     */
    AccordionGroupComponent.prototype.openOnInitialization = /**
     * @return {?}
     */
    function () {
        var _this = this;
        setTimeout((/**
         * @return {?}
         */
        function () {
            _this.isOpened = true;
            _this._cdr.detectChanges();
        }), 0);
    };
    /**
     * @param {?} event
     * @return {?}
     */
    AccordionGroupComponent.prototype.slideAnimationDoen = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        if (event.fromState === 'down' && event.toState === 'up') {
            this.isShowChild = false;
        }
    };
    AccordionGroupComponent.decorators = [
        { type: Component, args: [{
                    selector: 'AccordionPanel',
                    template: "<div\n  role=\"tab\"\n  class=\"am-accordion-header\"\n  data-scale=\"true\"\n  [attr.aria-expanded]=\"isOpened\"\n  (click)=\"checkAndToggle()\"\n>\n  <i class=\"arrow\"></i>\n  <div *ngIf=\"!isTemplateRef(header)\" [innerHTML]=\"header | safeHTML\"></div>\n  <ng-template *ngIf=\"isTemplateRef(header)\" [ngTemplateOutlet]=\"header\"></ng-template>\n</div>\n<div\n  role=\"tabpanel\"\n  class=\"am-accordion-content\"\n  [ngClass]=\"{ 'am-accordion-content-active': isOpened }\"\n  [@slide]=\"slide\"\n  (@slide.done)=\"slideAnimationDoen($event)\"\n>\n  <div *ngIf=\"isShowChild\" class=\"am-accordion-content-box\">\n    <ng-content></ng-content>\n  </div>\n</div>\n",
                    encapsulation: ViewEncapsulation.None,
                    animations: [
                        trigger('slide', [
                            state('up', style({ height: 0 })),
                            state('down', style({ height: '*' })),
                            transition('down => up', [animate(200, style({ height: 0 }))]),
                            transition('up => down', [
                                animate(200, style({
                                    height: '*'
                                }))
                            ])
                        ])
                    ]
                }] }
    ];
    /** @nocollapse */
    AccordionGroupComponent.ctorParameters = function () { return [
        { type: AccordionService },
        { type: ChangeDetectorRef }
    ]; };
    AccordionGroupComponent.propDecorators = {
        key: [{ type: Input }],
        header: [{ type: Input }],
        isOpened: [{ type: Input }],
        disabled: [{ type: Input }],
        onOpen: [{ type: Output }],
        onClose: [{ type: Output }],
        onChange: [{ type: Output }],
        amItem: [{ type: HostBinding, args: ['class.am-accordion-item',] }],
        isActive: [{ type: HostBinding, args: ['class.am-accordion-item-active',] }],
        addon: [{ type: HostBinding, args: ['class.addon',] }]
    };
    return AccordionGroupComponent;
}());
if (false) {
    /** @type {?} */
    AccordionGroupComponent.prototype.isShowChild;
    /** @type {?} */
    AccordionGroupComponent.prototype.key;
    /** @type {?} */
    AccordionGroupComponent.prototype.header;
    /** @type {?} */
    AccordionGroupComponent.prototype.isOpened;
    /** @type {?} */
    AccordionGroupComponent.prototype.disabled;
    /** @type {?} */
    AccordionGroupComponent.prototype.onOpen;
    /** @type {?} */
    AccordionGroupComponent.prototype.onClose;
    /** @type {?} */
    AccordionGroupComponent.prototype.onChange;
    /** @type {?} */
    AccordionGroupComponent.prototype.isTemplateRef;
    /** @type {?} */
    AccordionGroupComponent.prototype.amItem;
    /** @type {?} */
    AccordionGroupComponent.prototype.isActive;
    /** @type {?} */
    AccordionGroupComponent.prototype.addon;
    /**
     * @type {?}
     * @private
     */
    AccordionGroupComponent.prototype._accordionService;
    /**
     * @type {?}
     * @private
     */
    AccordionGroupComponent.prototype._cdr;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var AccordionComponent = /** @class */ (function () {
    function AccordionComponent(_accordionService) {
        this._accordionService = _accordionService;
        this.isFirstChange = true;
        this.expandAll = false;
        this.openAnimation = {};
        this.accordion = false;
        this.onChange = new EventEmitter();
        this.amAccordion = true;
        this._accordionService.getComponent(this);
    }
    /**
     * @return {?}
     */
    AccordionComponent.prototype.click = /**
     * @return {?}
     */
    function () {
        var _this = this;
        /** @type {?} */
        var result = [];
        this.groups.toArray().forEach((/**
         * @param {?} group
         * @return {?}
         */
        function (group) {
            if (group.isOpened) {
                if (_this.accordion) {
                    result = group.key;
                }
                else {
                    result.push(group.key);
                }
            }
        }));
        this.onChange.emit(result);
    };
    /**
     * @return {?}
     */
    AccordionComponent.prototype.closeAll = /**
     * @return {?}
     */
    function () {
        this.groups.toArray().forEach((/**
         * @param {?} group
         * @return {?}
         */
        function (group) {
            group.isOpened = false;
        }));
    };
    /**
     * @return {?}
     */
    AccordionComponent.prototype.init = /**
     * @return {?}
     */
    function () {
        var _this = this;
        if (this.expandAll && this.groups && this.groups.length > 0) {
            this._oldGroups = this.groups.toArray();
            this._oldGroups.forEach((/**
             * @param {?} group
             * @return {?}
             */
            function (group) {
                group.openOnInitialization();
            }));
            this._subscription = this.groups.changes.subscribe((/**
             * @param {?} change
             * @return {?}
             */
            function (change) {
                /** @type {?} */
                var newGroups = _this.groups.toArray().filter((/**
                 * @param {?} group
                 * @return {?}
                 */
                function (group) {
                    return _this._oldGroups.indexOf(group) === -1;
                }));
                newGroups.forEach((/**
                 * @param {?} group
                 * @return {?}
                 */
                function (group) {
                    group.openOnInitialization();
                }));
                _this._oldGroups = _this.groups.toArray();
            }));
        }
        /** @type {?} */
        var currentActiveKey = [];
        if (this.activeKey && this.activeKey.length > 0) {
            currentActiveKey = this.toArray(this.activeKey);
            if (this.accordion) {
                currentActiveKey = currentActiveKey.slice(0, 1);
            }
        }
        else if (this.defaultActiveKey) {
            currentActiveKey = [this.defaultActiveKey];
        }
        if (this.groups && this.groups.length > 0) {
            this.groups.forEach((/**
             * @param {?} group
             * @param {?} index
             * @return {?}
             */
            function (group, index) {
                currentActiveKey.forEach((/**
                 * @param {?} key
                 * @return {?}
                 */
                function (key) {
                    if (index === parseInt(key, 0)) {
                        setTimeout((/**
                         * @return {?}
                         */
                        function () {
                            group.isOpened = true;
                            group.openOnInitialization();
                        }), 0);
                    }
                }));
            }));
        }
    };
    /**
     * @param {?} activeKey
     * @return {?}
     */
    AccordionComponent.prototype.toArray = /**
     * @param {?} activeKey
     * @return {?}
     */
    function (activeKey) {
        /** @type {?} */
        var currentActiveKey = activeKey;
        if (!Array.isArray(currentActiveKey)) {
            currentActiveKey = currentActiveKey !== undefined && currentActiveKey !== '' ? [currentActiveKey] : [];
        }
        return currentActiveKey;
    };
    /**
     * @param {?} changes
     * @return {?}
     */
    AccordionComponent.prototype.ngOnChanges = /**
     * @param {?} changes
     * @return {?}
     */
    function (changes) {
        if (changes.accordion) {
            this._accordionService.getComponent(this);
        }
        if (changes.expandAll || changes.accordion) {
            this.init();
        }
    };
    /**
     * @return {?}
     */
    AccordionComponent.prototype.ngAfterContentInit = /**
     * @return {?}
     */
    function () {
        var _this = this;
        if (this.groups && this.groups.length > 0) {
            this.init();
        }
        else {
            this.groupsSubscription = this.groups.changes.subscribe((/**
             * @param {?} group
             * @return {?}
             */
            function (group) {
                if (_this.isFirstChange) {
                    _this.init();
                }
                _this.isFirstChange = false;
            }));
        }
    };
    /**
     * @return {?}
     */
    AccordionComponent.prototype.ngOnDestroy = /**
     * @return {?}
     */
    function () {
        if (this._subscription) {
            this._subscription.unsubscribe();
        }
        if (this.groupsSubscription) {
            this.groupsSubscription.unsubscribe();
        }
    };
    AccordionComponent.decorators = [
        { type: Component, args: [{
                    selector: 'Accordion, nzm-accordion',
                    template: "<ng-content></ng-content>\n",
                    providers: [AccordionService]
                }] }
    ];
    /** @nocollapse */
    AccordionComponent.ctorParameters = function () { return [
        { type: AccordionService }
    ]; };
    AccordionComponent.propDecorators = {
        groups: [{ type: ContentChildren, args: [forwardRef((/**
                     * @return {?}
                     */
                    function () { return AccordionGroupComponent; })),] }],
        expandAll: [{ type: Input }],
        activeKey: [{ type: Input }],
        defaultActiveKey: [{ type: Input }],
        openAnimation: [{ type: Input }],
        accordion: [{ type: Input }],
        onChange: [{ type: Output }],
        amAccordion: [{ type: HostBinding, args: ['class.am-accordion',] }],
        click: [{ type: HostListener, args: ['click',] }]
    };
    return AccordionComponent;
}());
if (false) {
    /**
     * @type {?}
     * @private
     */
    AccordionComponent.prototype._oldGroups;
    /**
     * @type {?}
     * @private
     */
    AccordionComponent.prototype._subscription;
    /**
     * @type {?}
     * @private
     */
    AccordionComponent.prototype.groupsSubscription;
    /**
     * @type {?}
     * @private
     */
    AccordionComponent.prototype.isFirstChange;
    /** @type {?} */
    AccordionComponent.prototype.groups;
    /** @type {?} */
    AccordionComponent.prototype.expandAll;
    /** @type {?} */
    AccordionComponent.prototype.activeKey;
    /** @type {?} */
    AccordionComponent.prototype.defaultActiveKey;
    /** @type {?} */
    AccordionComponent.prototype.openAnimation;
    /** @type {?} */
    AccordionComponent.prototype.accordion;
    /** @type {?} */
    AccordionComponent.prototype.onChange;
    /** @type {?} */
    AccordionComponent.prototype.amAccordion;
    /**
     * @type {?}
     * @private
     */
    AccordionComponent.prototype._accordionService;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var SafeHTMLPipe = /** @class */ (function () {
    function SafeHTMLPipe(_sanitized) {
        this._sanitized = _sanitized;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    SafeHTMLPipe.prototype.transform = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        return this._sanitized.bypassSecurityTrustHtml(value);
    };
    SafeHTMLPipe.decorators = [
        { type: Pipe, args: [{ name: 'safeHTML' },] }
    ];
    /** @nocollapse */
    SafeHTMLPipe.ctorParameters = function () { return [
        { type: DomSanitizer }
    ]; };
    return SafeHTMLPipe;
}());
if (false) {
    /**
     * @type {?}
     * @private
     */
    SafeHTMLPipe.prototype._sanitized;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var NgZorroAntdMobilePipesModule = /** @class */ (function () {
    function NgZorroAntdMobilePipesModule() {
    }
    NgZorroAntdMobilePipesModule.decorators = [
        { type: NgModule, args: [{
                    imports: [],
                    declarations: [SafeHTMLPipe],
                    exports: [SafeHTMLPipe]
                },] }
    ];
    return NgZorroAntdMobilePipesModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var AccordionModule = /** @class */ (function () {
    function AccordionModule() {
    }
    AccordionModule.decorators = [
        { type: NgModule, args: [{
                    imports: [CommonModule, WhiteSpaceModule, NgZorroAntdMobilePipesModule],
                    declarations: [AccordionComponent, AccordionGroupComponent],
                    exports: [AccordionComponent, AccordionGroupComponent]
                },] }
    ];
    return AccordionModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @param {?} rule
 * @param {?} className
 * @return {?}
 */
function insertKeyFrame(rule, className) {
    /** @type {?} */
    var style = document.createElement('style');
    style.setAttribute('class', className);
    style.innerHTML = rule;
    document.body.appendChild(style);
}
/**
 * @param {?} className
 * @return {?}
 */
function deleteKeyFrame(className) {
    /** @type {?} */
    var styleDom = document.getElementsByClassName(className);
    while (styleDom.length > 0) {
        styleDom[0].remove();
    }
}
/**
 * @return {?}
 */
function getWidthHeight() {
    /** @type {?} */
    var w = window;
    /** @type {?} */
    var d = document;
    /** @type {?} */
    var e = d.documentElement;
    /** @type {?} */
    var g = d.getElementsByTagName('body')[0];
    return {
        width: w.innerWidth || e.clientWidth || g.clientWidth,
        height: w.innerHeight || e.clientHeight || g.clientHeight
    };
}
/**
 * @param {?} text
 * @param {?} font
 * @return {?}
 */
function getTextWidth(text, font) {
    /** @type {?} */
    var _dom = document.createElement('div');
    _dom.innerHTML = text;
    _dom.style.position = 'absolute';
    _dom.style.left = '-9999';
    _dom.style.whiteSpace = 'nowrap';
    _dom.style.fontSize = font;
    document.body.appendChild(_dom);
    /** @type {?} */
    var _w = _dom.clientWidth + 10;
    document.body.removeChild(_dom);
    return _w;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var NoticeBarComponent = /** @class */ (function () {
    function NoticeBarComponent(_iconHandler) {
        this._iconHandler = _iconHandler;
        this.visiable = false;
        this.marqueeScroll = 'scrolling';
        this.style = {};
        this._option = {
            mode: '',
            icon: '',
            action: '',
            content: '',
            fontSize: '14px',
            scrolling: true,
            marqueeProps: { loop: true, leading: 500, trailing: 8000, fps: 200, style: {} }
        };
        this.onClick = new EventEmitter();
        this._iconHandler.load();
    }
    Object.defineProperty(NoticeBarComponent.prototype, "option", {
        get: /**
         * @return {?}
         */
        function () {
            return this._option;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            Object.assign(this._option, value);
            this.dataProcess();
            if (this._option.scrolling) {
                this.marqueeScroll = 'scrolling';
            }
            else {
                this.marqueeScroll = 'scrolling-stop';
            }
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @return {?}
     */
    NoticeBarComponent.prototype.click = /**
     * @return {?}
     */
    function () {
        this.onClick.emit(this._option.mode);
        if (this._option.mode === 'closable') {
            this.visiable = false;
        }
    };
    /**
     * @return {?}
     */
    NoticeBarComponent.prototype.dataProcess = /**
     * @return {?}
     */
    function () {
        this.visiable = true;
        this.style = {
            width: '200%'
        };
        this._width = getTextWidth(this._option.content, this._option.fontSize);
        if (getWidthHeight().width < this._width) {
            /** @type {?} */
            var count = this._option.marqueeProps.loop ? 'infinite' : 1;
            /** @type {?} */
            var animationName = "noticebarmarquee_" + this._width;
            this.style = {
                width: this._width * 2 + 'px',
                'animation-name': animationName,
                'animation-delay': this._option.marqueeProps.leading + "ms",
                'animation-duration': (((1 / this._option.marqueeProps.fps) * this._width) / getWidthHeight().width) *
                    1000 + "s",
                'animation-iteration-count': "" + count
            };
            this.marqueeScroll = 'scrolling';
            this.insetKeyframe(animationName);
        }
        else {
            this.marqueeScroll = 'scrolling-stop';
        }
    };
    /**
     * @param {?} animationName
     * @return {?}
     */
    NoticeBarComponent.prototype.insetKeyframe = /**
     * @param {?} animationName
     * @return {?}
     */
    function (animationName) {
        insertKeyFrame("@keyframes " + animationName + " {\n      0% { left: 0px; }\n      100% { left: -" + this._width + "px }\n    }", 'notice_bar_animation_cls');
        insertKeyFrame("@-webkit-keyframes " + animationName + " {\n      0% { left: 0px; }\n      100% { left: -" + this._width + "px }\n    }", 'notice_bar_animation_cls');
        insertKeyFrame("@-moz-keyframes " + animationName + " {\n      0% { left: 0px; }\n      100% { left: -" + this._width + "px }\n    }", 'notice_bar_animation_cls');
        insertKeyFrame("@-o-keyframes " + animationName + " {\n      0% { left: 0px; }\n      100% { left: -" + this._width + "px }\n    }", 'notice_bar_animation_cls');
    };
    /**
     * @return {?}
     */
    NoticeBarComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        var _this = this;
        document.addEventListener('touchstart', (/**
         * @return {?}
         */
        function () {
            _this.marqueeScroll = 'scrolling-stop';
        }));
        document.addEventListener('touchend', (/**
         * @return {?}
         */
        function () {
            _this.marqueeScroll = 'scrolling';
        }));
    };
    /**
     * @return {?}
     */
    NoticeBarComponent.prototype.ngOnDestroy = /**
     * @return {?}
     */
    function () {
        deleteKeyFrame('notice_bar_animation_cls');
    };
    NoticeBarComponent.decorators = [
        { type: Component, args: [{
                    selector: 'NoticeBar, nzm-notice-bar',
                    template: "<div role=\"alert\" *ngIf=\"visiable\" class=\"am-notice-bar\" (click)=\"click()\">\n  <div *ngIf=\"option.icon !== null\" class=\"am-notice-bar-icon\">\n    <ng-template [ngTemplateOutlet]=\"option.icon || voice\"></ng-template>\n  </div>\n  <div class=\"am-notice-bar-content\">\n    <div class=\"marquee\">\n      <div [ngClass]=\"marqueeScroll\" [ngStyle]=\"style\">\n        <span>{{ option.content }}</span>\n        <span>{{ option.content }}</span>\n      </div>\n    </div>\n  </div>\n  <div role=\"button\" *ngIf=\"option.mode && option.action !== null\" class=\"am-notice-bar-operation\">\n    <ng-template *ngIf=\"option.mode === 'closable'\" [ngTemplateOutlet]=\"option.action || cross\"></ng-template>\n    <ng-template *ngIf=\"option.mode === 'link'\" [ngTemplateOutlet]=\"option.action || right\"></ng-template>\n  </div>\n</div>\n\n<ng-template #voice>\n  <Icon [type]=\"'voice'\" [size]=\"'xxs'\"></Icon>\n</ng-template>\n<ng-template #cross>\n  <Icon [type]=\"'cross'\" [size]=\"'md'\"></Icon>\n</ng-template>\n<ng-template #right>\n  <Icon [type]=\"'right'\" [size]=\"'md'\"></Icon>\n</ng-template>\n",
                    providers: [IconHandler]
                }] }
    ];
    /** @nocollapse */
    NoticeBarComponent.ctorParameters = function () { return [
        { type: IconHandler }
    ]; };
    NoticeBarComponent.propDecorators = {
        option: [{ type: Input }],
        onClick: [{ type: Output }]
    };
    return NoticeBarComponent;
}());
if (false) {
    /** @type {?} */
    NoticeBarComponent.prototype.visiable;
    /** @type {?} */
    NoticeBarComponent.prototype.marqueeScroll;
    /** @type {?} */
    NoticeBarComponent.prototype.style;
    /**
     * @type {?}
     * @private
     */
    NoticeBarComponent.prototype._width;
    /**
     * @type {?}
     * @private
     */
    NoticeBarComponent.prototype._option;
    /** @type {?} */
    NoticeBarComponent.prototype.onClick;
    /**
     * @type {?}
     * @private
     */
    NoticeBarComponent.prototype._iconHandler;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var NoticeBarModule = /** @class */ (function () {
    function NoticeBarModule() {
    }
    NoticeBarModule.decorators = [
        { type: NgModule, args: [{
                    imports: [IconModule, CommonModule, FormsModule],
                    declarations: [NoticeBarComponent],
                    exports: [NoticeBarComponent],
                    providers: [],
                    entryComponents: []
                },] }
    ];
    return NoticeBarModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var ToastComponent = /** @class */ (function () {
    function ToastComponent(_zone) {
        this._zone = _zone;
        this.prefixCls = 'am-toast';
        this.isContentString = true;
        this.transitionName = 'am-fade-enter am-fade-enter-active';
        this._iconType = '';
        this._content = '';
        this.mask = true;
        this.position = 'middle';
    }
    Object.defineProperty(ToastComponent.prototype, "content", {
        get: /**
         * @return {?}
         */
        function () {
            return this._content;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            var _this = this;
            if (value instanceof TemplateRef) {
                this.isContentString = false;
            }
            else {
                this.isContentString = true;
            }
            this._zone.run((/**
             * @return {?}
             */
            function () {
                _this._content = value;
            }));
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ToastComponent.prototype, "iconType", {
        get: /**
         * @return {?}
         */
        function () {
            return this._iconType;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            var _this = this;
            this._zone.run((/**
             * @return {?}
             */
            function () {
                _this._iconType = value;
            }));
        },
        enumerable: true,
        configurable: true
    });
    ToastComponent.decorators = [
        { type: Component, args: [{
                    selector: 'Toast',
                    encapsulation: ViewEncapsulation.None,
                    template: "<div class=\"{{ prefixCls }}-notice {{ prefixCls }}-notice-closable {{ transitionName }}\">\n  <div class=\"{{ prefixCls }}-notice-content\">\n    <div role=\"alert\" *ngIf=\"iconType\" class=\"{{ prefixCls }}-text {{ prefixCls }}-text-icon\" aria-live=\"assertive\">\n      <Icon [type]=\"iconType\" [size]=\"'lg'\"></Icon>\n      <div *ngIf=\"isContentString\" class=\"{{ prefixCls }}-text-info\">{{ content }}</div>\n    </div>\n    <div *ngIf=\"!iconType\" class=\"{{ prefixCls }}-text\" role=\"alert\" aria-live=\"assertive\">\n      <div *ngIf=\"isContentString\" class=\"{{ prefixCls }}-text-info\">{{ content }}</div>\n      <ng-template *ngIf=\"!isContentString\" [ngTemplateOutlet]=\"content\"></ng-template>\n    </div>\n  </div>\n  <a class=\"{{ prefixCls }}-notice-close\">\n    <span class=\"{{ prefixCls }}-notice-close-x\"></span>\n  </a>\n</div>\n",
                    host: {
                        '[class.am-toast]': 'true',
                        '[class.am-toast-mask]': 'mask',
                        '[class.am-toast-mask-top]': "mask && position === 'top'",
                        '[class.am-toast-mask-middle]': "mask && position === 'middle'",
                        '[class.am-toast-mask-bottom]': "mask && position === 'bottom'",
                        '[class.am-toast-nomask]': '!mask',
                        '[class.am-toast-nomask-top]': "!mask && position === 'top'",
                        '[class.am-toast-nomask-middle]': "!mask && position === 'middle'",
                        '[class.am-toast-nomask-bottom]': "!mask && position === 'bottom'"
                    }
                }] }
    ];
    /** @nocollapse */
    ToastComponent.ctorParameters = function () { return [
        { type: NgZone }
    ]; };
    ToastComponent.propDecorators = {
        mask: [{ type: Input }],
        content: [{ type: Input }],
        iconType: [{ type: Input }],
        position: [{ type: Input }]
    };
    return ToastComponent;
}());
if (false) {
    /** @type {?} */
    ToastComponent.prototype.prefixCls;
    /** @type {?} */
    ToastComponent.prototype.isContentString;
    /** @type {?} */
    ToastComponent.prototype.maskClassMap;
    /** @type {?} */
    ToastComponent.prototype.transitionName;
    /**
     * @type {?}
     * @private
     */
    ToastComponent.prototype._iconType;
    /**
     * @type {?}
     * @private
     */
    ToastComponent.prototype._content;
    /** @type {?} */
    ToastComponent.prototype.mask;
    /** @type {?} */
    ToastComponent.prototype.position;
    /**
     * @type {?}
     * @private
     */
    ToastComponent.prototype._zone;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var ToastOptions = /** @class */ (function () {
    function ToastOptions() {
    }
    ToastOptions.decorators = [
        { type: Injectable }
    ];
    return ToastOptions;
}());
if (false) {
    /** @type {?} */
    ToastOptions.prototype.content;
    /** @type {?} */
    ToastOptions.prototype.mask;
    /** @type {?} */
    ToastOptions.prototype.iconType;
    /** @type {?} */
    ToastOptions.prototype.position;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @record
 */
function ConfigInterface() { }
if (false) {
    /** @type {?|undefined} */
    ConfigInterface.prototype.content;
    /** @type {?|undefined} */
    ConfigInterface.prototype.iconType;
    /** @type {?|undefined} */
    ConfigInterface.prototype.mask;
}
var ToastService = /** @class */ (function () {
    function ToastService(_appRef, _cfr, _zone) {
        this._appRef = _appRef;
        this._cfr = _cfr;
        this._zone = _zone;
        this.timeout = null;
        this.zone = null;
        this.compRef = null;
        this.toastCompFactory = null;
        this.appRef = null;
        this.zone = this._zone;
        this.appRef = this._appRef;
        this.toastCompFactory = this._cfr.resolveComponentFactory(ToastComponent);
    }
    /**
     * @param {?} config
     * @param {?} options
     * @return {?}
     */
    ToastService.prototype._initConfig = /**
     * @param {?} config
     * @param {?} options
     * @return {?}
     */
    function (config, options) {
        /** @type {?} */
        var props = {};
        /** @type {?} */
        var optionalParams = ['content', 'iconType', 'mask', 'position'];
        config = Object.assign(options, config);
        optionalParams.forEach((/**
         * @param {?} key
         * @return {?}
         */
        function (key) {
            if (config[key] !== undefined) {
                props[key] = config[key];
            }
        }));
        /** @type {?} */
        var iconType = {
            info: '',
            success: 'success',
            fail: 'fail',
            offline: 'dislike',
            loading: 'loading'
        }[options.iconType];
        props['iconType'] = iconType;
        props['mask'] = options.mask;
        props['position'] = options.position;
        return props;
    };
    /**
     * @param {?} config
     * @param {?} type
     * @param {?=} timeInterval
     * @param {?=} onClose
     * @param {?=} mask
     * @param {?=} position
     * @return {?}
     */
    ToastService.prototype.notice = /**
     * @param {?} config
     * @param {?} type
     * @param {?=} timeInterval
     * @param {?=} onClose
     * @param {?=} mask
     * @param {?=} position
     * @return {?}
     */
    function (config, type, timeInterval, onClose, mask, position) {
        var _this = this;
        if (timeInterval === void 0) { timeInterval = 2000; }
        if (mask === void 0) { mask = true; }
        if (position === void 0) { position = 'middle'; }
        // 如果已经存在,在没有遮罩层的情况下,会响应别的toast,需要清除原来的
        if (this.compRef) {
            this.hide();
        }
        /** @type {?} */
        var options = new ToastOptions();
        options.iconType = type;
        options.mask = mask;
        options.position = position;
        /** @type {?} */
        var props = this._initConfig(config, options);
        document.body.insertBefore(document.createElement(this.toastCompFactory.selector), document.body.firstChild);
        /** @type {?} */
        var instance;
        /** @type {?} */
        var subject;
        this.compRef = this._appRef.bootstrap(this.toastCompFactory);
        instance = this.compRef.instance;
        subject = instance.subject;
        if (timeInterval) {
            this.timeout = setTimeout((/**
             * @return {?}
             */
            function () {
                if (onClose) {
                    onClose();
                }
                _this.hide();
            }), timeInterval);
        }
        Object.assign(instance, props);
        return subject;
    };
    /**
     * Open info dialog
     */
    /**
     * Open info dialog
     * @param {?=} content
     * @param {?=} timeInterval
     * @param {?=} onClose
     * @param {?=} mask
     * @param {?=} position
     * @return {?}
     */
    ToastService.prototype.info = /**
     * Open info dialog
     * @param {?=} content
     * @param {?=} timeInterval
     * @param {?=} onClose
     * @param {?=} mask
     * @param {?=} position
     * @return {?}
     */
    function (content, timeInterval, onClose, mask, position) {
        /** @type {?} */
        var config = Object.assign({
            iconType: 'info',
            content: content
        });
        return this.notice(config, 'info', timeInterval, onClose, mask, position);
    };
    /**
     * Open success dialog
     */
    /**
     * Open success dialog
     * @param {?=} content
     * @param {?=} timeInterval
     * @param {?=} onClose
     * @param {?=} mask
     * @param {?=} position
     * @return {?}
     */
    ToastService.prototype.success = /**
     * Open success dialog
     * @param {?=} content
     * @param {?=} timeInterval
     * @param {?=} onClose
     * @param {?=} mask
     * @param {?=} position
     * @return {?}
     */
    function (content, timeInterval, onClose, mask, position) {
        /** @type {?} */
        var config = Object.assign({
            iconType: 'success',
            content: content
        });
        return this.notice(config, 'success', timeInterval, onClose, mask, position);
    };
    /**
     * @param {?=} content
     * @param {?=} timeInterval
     * @param {?=} mask
     * @param {?=} position
     * @return {?}
     */
    ToastService.prototype.show = /**
     * @param {?=} content
     * @param {?=} timeInterval
     * @param {?=} mask
     * @param {?=} position
     * @return {?}
     */
    function (content, timeInterval, mask, position) {
        /** @type {?} */
        var config = Object.assign({
            iconType: 'info',
            content: content
        });
        return this.notice(config, 'info', timeInterval, (/**
         * @return {?}
         */
        function () { }), mask, position);
    };
    /**
     * @param {?=} content
     * @param {?=} timeInterval
     * @param {?=} onClose
     * @param {?=} mask
     * @param {?=} position
     * @return {?}
     */
    ToastService.prototype.fail = /**
     * @param {?=} content
     * @param {?=} timeInterval
     * @param {?=} onClose
     * @param {?=} mask
     * @param {?=} position
     * @return {?}
     */
    function (content, timeInterval, onClose, mask, position) {
        /** @type {?} */
        var config = Object.assign({
            iconType: 'fail',
            content: content
        });
        return this.notice(config, 'fail', timeInterval, onClose, mask, position);
    };
    /**
     * @param {?=} content
     * @param {?=} timeInterval
     * @param {?=} onClose
     * @param {?=} mask
     * @param {?=} position
     * @return {?}
     */
    ToastService.prototype.offline = /**
     * @param {?=} content
     * @param {?=} timeInterval
     * @param {?=} onClose
     * @param {?=} mask
     * @param {?=} position
     * @return {?}
     */
    function (content, timeInterval, onClose, mask, position) {
        /** @type {?} */
        var config = Object.assign({
            iconType: 'offline',
            content: content
        });
        return this.notice(config, 'offline', timeInterval, onClose, mask, position);
    };
    /**
     * @param {?=} content
     * @param {?=} timeInterval
     * @param {?=} onClose
     * @param {?=} mask
     * @param {?=} position
     * @return {?}
     */
    ToastService.prototype.loading = /**
     * @param {?=} content
     * @param {?=} timeInterval
     * @param {?=} onClose
     * @param {?=} mask
     * @param {?=} position
     * @return {?}
     */
    function (content, timeInterval, onClose, mask, position) {
        /** @type {?} */
        var config = Object.assign({
            iconType: 'loading',
            content: content
        });
        return this.notice(config, 'loading', timeInterval, onClose, mask, position);
    };
    /**
     * @return {?}
     */
    ToastService.prototype.hide = /**
     * @return {?}
     */
    function () {
        var _this = this;
        if (this.timeout) {
            clearTimeout(this.timeout);
        }
        if (this.compRef) {
            this._zone.run((/**
             * @return {?}
             */
            function () {
                _this.compRef.destroy();
            }));
            this.compRef = null;
        }
    };
    ToastService.decorators = [
        { type: Injectable, args: [{
                    providedIn: 'root'
                },] },
        { type: Injectable }
    ];
    /** @nocollapse */
    ToastService.ctorParameters = function () { return [
        { type: ApplicationRef },
        { type: ComponentFactoryResolver },
        { type: NgZone }
    ]; };
    return ToastService;
}());
if (false) {
    /** @type {?} */
    ToastService.prototype.timeout;
    /** @type {?} */
    ToastService.prototype.zone;
    /** @type {?} */
    ToastService.prototype.compRef;
    /** @type {?} */
    ToastService.prototype.toastCompFactory;
    /** @type {?} */
    ToastService.prototype.appRef;
    /**
     * @type {?}
     * @private
     */
    ToastService.prototype._appRef;
    /**
     * @type {?}
     * @private
     */
    ToastService.prototype._cfr;
    /**
     * @type {?}
     * @private
     */
    ToastService.prototype._zone;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var ToastModule = /** @class */ (function () {
    function ToastModule() {
    }
    ToastModule.decorators = [
        { type: NgModule, args: [{
                    imports: [CommonModule, IconModule, WingBlankModule],
                    exports: [ToastComponent],
                    declarations: [ToastComponent],
                    entryComponents: [ToastComponent],
                    providers: [ToastService]
                },] }
    ];
    return ToastModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var ModalBaseOptions = /** @class */ (function () {
    function ModalBaseOptions() {
        this.visible = false;
        this.focus = true;
        this.prefixCls = 'am-modal';
        this.animated = true;
        this.closable = false;
        this.maskClosable = true;
        this.transparent = false;
        this.popup = false;
        this.animationType = 'slide-down';
        this.footer = [];
        this.platform = 'ios';
        this.defaultValue = [];
        this.placeholders = [];
        this.transitionName = 'am-zoom';
        this.maskTransitionName = 'am-fade';
    }
    return ModalBaseOptions;
}());
if (false) {
    /** @type {?} */
    ModalBaseOptions.prototype.visible;
    /** @type {?} */
    ModalBaseOptions.prototype.focus;
    /** @type {?} */
    ModalBaseOptions.prototype.prefixCls;
    /** @type {?} */
    ModalBaseOptions.prototype.animated;
    /** @type {?} */
    ModalBaseOptions.prototype.closable;
    /** @type {?} */
    ModalBaseOptions.prototype.maskClosable;
    /** @type {?} */
    ModalBaseOptions.prototype.onClose;
    /** @type {?} */
    ModalBaseOptions.prototype.transparent;
    /** @type {?} */
    ModalBaseOptions.prototype.popup;
    /** @type {?} */
    ModalBaseOptions.prototype.animationType;
    /** @type {?} */
    ModalBaseOptions.prototype.title;
    /** @type {?} */
    ModalBaseOptions.prototype.footer;
    /** @type {?} */
    ModalBaseOptions.prototype.platform;
    /** @type {?} */
    ModalBaseOptions.prototype.className;
    /** @type {?} */
    ModalBaseOptions.prototype.wrapClassName;
    /** @type {?} */
    ModalBaseOptions.prototype.message;
    /** @type {?} */
    ModalBaseOptions.prototype.actions;
    /** @type {?} */
    ModalBaseOptions.prototype.callbackOrActions;
    /** @type {?} */
    ModalBaseOptions.prototype.type;
    /** @type {?} */
    ModalBaseOptions.prototype.defaultValue;
    /** @type {?} */
    ModalBaseOptions.prototype.placeholders;
    /** @type {?} */
    ModalBaseOptions.prototype.operation;
    /** @type {?} */
    ModalBaseOptions.prototype.transitionName;
    /** @type {?} */
    ModalBaseOptions.prototype.maskTransitionName;
    /** @type {?} */
    ModalBaseOptions.prototype.close;
    /** @type {?} */
    ModalBaseOptions.prototype.closeWithAnimation;
}
var ModalOptions = /** @class */ (function (_super) {
    __extends(ModalOptions, _super);
    function ModalOptions() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.transitionName = 'am-fade';
        _this.maskTransitionName = 'am-fade';
        return _this;
    }
    ModalOptions.decorators = [
        { type: Injectable }
    ];
    return ModalOptions;
}(ModalBaseOptions));
if (false) {
    /** @type {?} */
    ModalOptions.prototype.transitionName;
    /** @type {?} */
    ModalOptions.prototype.maskTransitionName;
}
var AlertOptions = /** @class */ (function (_super) {
    __extends(AlertOptions, _super);
    function AlertOptions() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    AlertOptions.decorators = [
        { type: Injectable }
    ];
    return AlertOptions;
}(ModalBaseOptions));
if (false) {
    /** @type {?} */
    AlertOptions.prototype.message;
    /** @type {?} */
    AlertOptions.prototype.actions;
}
var Action = /** @class */ (function () {
    function Action() {
    }
    Action.decorators = [
        { type: Injectable }
    ];
    return Action;
}());
if (false) {
    /** @type {?} */
    Action.prototype.text;
    /** @type {?} */
    Action.prototype.onPress;
    /** @type {?} */
    Action.prototype.style;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @abstract
 * @template T, R
 */
var  /**
 * @abstract
 * @template T, R
 */
ModalRef = /** @class */ (function () {
    function ModalRef() {
    }
    return ModalRef;
}());
if (false) {
    /** @type {?} */
    ModalRef.prototype.afterOpen;
    /** @type {?} */
    ModalRef.prototype.afterClose;
    /**
     * @abstract
     * @param {?=} result
     * @return {?}
     */
    ModalRef.prototype.close = function (result) { };
    /**
     * @abstract
     * @param {?=} result
     * @return {?}
     */
    ModalRef.prototype.destroy = function (result) { };
    /**
     * @abstract
     * @return {?}
     */
    ModalRef.prototype.triggerOk = function () { };
    /**
     * @abstract
     * @return {?}
     */
    ModalRef.prototype.triggerCancel = function () { };
    /**
     * @abstract
     * @return {?}
     */
    ModalRef.prototype.getElement = function () { };
    /**
     * @abstract
     * @return {?}
     */
    ModalRef.prototype.getInstance = function () { };
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @template T, R
 */
var ModalComponent = /** @class */ (function (_super) {
    __extends(ModalComponent, _super);
    function ModalComponent(option, elementRef) {
        var _this = _super.call(this) || this;
        _this.option = option;
        _this.elementRef = elementRef;
        _this.autoFocus = { focus: true, date: new Date() };
        _this.transitionName = '';
        _this.maskTransitionName = '';
        _this.wrapCls = {};
        _this.cls = {};
        _this.btnGroupClass = {};
        _this.data = {
            text: '',
            password: ''
        };
        _this.onClose = new EventEmitter();
        _this.afterOpenEmitter = new EventEmitter();
        _this.afterCloseEmitter = new EventEmitter();
        return _this;
    }
    Object.defineProperty(ModalComponent.prototype, "title", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.option.title = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ModalComponent.prototype, "closable", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.option.closable = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ModalComponent.prototype, "maskClosable", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.option.maskClosable = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ModalComponent.prototype, "popup", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.option.popup = value;
            this.setClassMap();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ModalComponent.prototype, "animationType", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.option.animationType = value;
            this.setClassMap();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ModalComponent.prototype, "transparent", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.option.transparent = value;
            this.setClassMap();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ModalComponent.prototype, "footer", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.option.footer = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ModalComponent.prototype, "platform", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.option.platform = value;
            this.setClassMap();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ModalComponent.prototype, "className", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.option.className = value;
            this.setClassMap();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ModalComponent.prototype, "wrapClassName", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.option.wrapClassName = value;
            this.setClassMap();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ModalComponent.prototype, "actions", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.option.footer = value;
            this.setClassMap();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ModalComponent.prototype, "defaultValue", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.option.defaultValue = value !== undefined ? value : ['', ''];
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ModalComponent.prototype, "type", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.option.type = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ModalComponent.prototype, "placeholders", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.option.placeholders = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ModalComponent.prototype, "operation", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.option.operation = value;
            this.setClassMap();
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @param {?} event
     * @return {?}
     */
    ModalComponent.prototype.panend = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        if (this.option.closable || this.option.maskClosable || this.option.popup) {
            if ((event && event.target && event.target.getAttribute('role') === 'dialog') ||
                event.target.getAttribute('role') === 'close') {
                event.preventDefault();
                event.stopPropagation();
                if (this.option.close) {
                    this.option.close();
                }
                else {
                    this.onClose.emit();
                    this.leaveAnimation();
                }
            }
        }
    };
    /**
     * @param {?} value
     * @return {?}
     */
    ModalComponent.prototype.isTemplateRef = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        return value instanceof TemplateRef;
    };
    /**
     * @param {?} value
     * @return {?}
     */
    ModalComponent.prototype.isNoTitle = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        return value === '' || value === null || value === undefined;
    };
    /**
     * @param {?} visible
     * @return {?}
     */
    ModalComponent.prototype.setTransitionName = /**
     * @param {?} visible
     * @return {?}
     */
    function (visible) {
        if (!visible) {
            this.leaveAnimation();
        }
        else {
            if (this.option.animated) {
                if (this.option.transparent) {
                    if (this.setActiveName(this.option.transitionName)) {
                        this.transitionName = this.setActiveName(this.option.transitionName);
                        this.maskTransitionName = this.setActiveName(this.option.maskTransitionName);
                    }
                    else {
                        this.transitionName = this.maskTransitionName = this.setActiveName('am-fade');
                    }
                }
                else {
                    if (this.setActiveName(this.option.transitionName)) {
                        this.transitionName = this.setActiveName(this.option.transitionName);
                        this.maskTransitionName = this.setActiveName(this.option.maskTransitionName);
                    }
                    else {
                        this.transitionName = this.maskTransitionName = this.setActiveName('am-slide-up');
                    }
                }
                if (this.option.popup) {
                    this.transitionName =
                        this.option.animationType === 'slide-up'
                            ? this.setActiveName('am-slide-up')
                            : this.setActiveName('am-slide-down');
                    this.maskTransitionName = this.setActiveName('am-fade');
                }
            }
            this.setClassMap();
        }
    };
    /**
     * @param {?} name
     * @return {?}
     */
    ModalComponent.prototype.setActiveName = /**
     * @param {?} name
     * @return {?}
     */
    function (name) {
        return name.length > 0 ? name + "-enter " + name + "-enter-active" : null;
    };
    /**
     * @param {?} name
     * @return {?}
     */
    ModalComponent.prototype.setLeaveActiveName = /**
     * @param {?} name
     * @return {?}
     */
    function (name) {
        return name.length > 0 ? name + "-leave " + name + "-leave-active" : null;
    };
    /**
     * @return {?}
     */
    ModalComponent.prototype.setClassMap = /**
     * @return {?}
     */
    function () {
        var _a, _b, _c;
        this.wrapCls = (_a = {},
            _a[this.option.wrapClassName] = true,
            _a[this.option.prefixCls + "-wrap-popup"] = this.option.popup,
            _a);
        this.cls = (_b = {},
            _b[this.option.className] = true,
            _b[this.option.prefixCls + "-transparent"] = this.option.transparent,
            _b[this.option.prefixCls + "-popup"] = this.option.popup,
            _b[this.option.prefixCls + "-popup-" + this.option.animationType] = this.option.popup && this.option.animationType,
            _b[this.option.prefixCls + "-android"] = this.option.platform === 'android',
            _b);
        this.btnGroupClass = (_c = {},
            _c[this.option.prefixCls + "-button-group-" + (this.option.footer.length === 2 && !this.option.operation ? 'h' : 'v')] = true,
            _c[this.option.prefixCls + "-button-group-" + (this.option.operation ? 'operation' : 'normal')] = true,
            _c);
    };
    /**
     * @param {?} type
     * @param {?} value
     * @return {?}
     */
    ModalComponent.prototype.inputChange = /**
     * @param {?} type
     * @param {?} value
     * @return {?}
     */
    function (type, value) {
        this.data[type] = value;
    };
    /**
     * @return {?}
     */
    ModalComponent.prototype.leaveAnimation = /**
     * @return {?}
     */
    function () {
        var _this = this;
        if (this.option.animated) {
            if (this.option.transparent) {
                if (this.setLeaveActiveName(this.option.transitionName)) {
                    this.transitionName = this.setLeaveActiveName(this.option.transitionName);
                    this.maskTransitionName = this.setLeaveActiveName(this.option.maskTransitionName);
                }
                else {
                    this.transitionName = this.maskTransitionName = this.setLeaveActiveName('am-fade');
                }
            }
            else {
                if (this.setLeaveActiveName(this.option.transitionName)) {
                    this.transitionName = this.setLeaveActiveName(this.option.transitionName);
                    this.maskTransitionName = this.setLeaveActiveName(this.option.maskTransitionName);
                }
                else {
                    this.transitionName = this.maskTransitionName = this.setLeaveActiveName('am-slide-up');
                }
            }
            if (this.option.popup) {
                this.transitionName =
                    this.option.animationType === 'slide-up'
                        ? this.setLeaveActiveName('am-slide-up')
                        : this.setLeaveActiveName('am-slide-down');
                this.maskTransitionName = this.setLeaveActiveName('am-fade');
            }
        }
        setTimeout((/**
         * @return {?}
         */
        function () {
            _this.option.visible = false;
            if (_this.onChanged) {
                _this.onChanged(_this.option.visible);
            }
        }), 200);
    };
    /**
     * @param {?} value
     * @return {?}
     */
    ModalComponent.prototype.writeValue = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        if (value) {
            this.option.visible = value;
        }
        this.setTransitionName(value);
    };
    /**
     * @param {?} fn
     * @return {?}
     */
    ModalComponent.prototype.registerOnChange = /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) {
        this.onChanged = fn;
    };
    /**
     * @param {?} fn
     * @return {?}
     */
    ModalComponent.prototype.registerOnTouched = /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) {
        this.onTouched = fn;
    };
    Object.defineProperty(ModalComponent.prototype, "afterOpen", {
        get: /**
         * @return {?}
         */
        function () {
            return this.afterOpenEmitter.asObservable();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ModalComponent.prototype, "afterClose", {
        get: /**
         * @return {?}
         */
        function () {
            return this.afterCloseEmitter.asObservable();
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @return {?}
     */
    ModalComponent.prototype.getInstance = /**
     * @return {?}
     */
    function () {
        return this;
    };
    /**
     * @return {?}
     */
    ModalComponent.prototype.getElement = /**
     * @return {?}
     */
    function () {
        return this.elementRef && this.elementRef.nativeElement;
    };
    /**
     * @return {?}
     */
    ModalComponent.prototype.close = /**
     * @return {?}
     */
    function () {
        if (this.option.closeWithAnimation) {
            this.option.closeWithAnimation();
        }
        else {
            this.onClose.emit();
            this.leaveAnimation();
        }
    };
    /**
     * @return {?}
     */
    ModalComponent.prototype.triggerOk = /**
     * @return {?}
     */
    function () {
        if (this.option.footer.length > 1) {
            /** @type {?} */
            var button = this.option.footer[1];
            button.onPress();
        }
    };
    /**
     * @return {?}
     */
    ModalComponent.prototype.triggerCancel = /**
     * @return {?}
     */
    function () {
        if (this.option.footer.length > 0) {
            /** @type {?} */
            var button = this.option.footer[0];
            button.onPress();
        }
    };
    /**
     * @return {?}
     */
    ModalComponent.prototype.destroy = /**
     * @return {?}
     */
    function () {
        this.close();
    };
    ModalComponent.decorators = [
        { type: Component, args: [{
                    selector: 'Modal',
                    template: "<div *ngIf=\"option.visible\">\n  <div class=\"{{ option.prefixCls }}-mask {{ maskTransitionName }}\"></div>\n  <div role=\"dialog\" class=\"{{ option.prefixCls }}-wrap {{ transitionName }}\" [ngClass]=\"wrapCls\">\n    <div role=\"document\" class=\"{{ option.prefixCls }}\" [ngClass]=\"cls\">\n      <div class=\"{{ option.prefixCls }}-content\">\n        <div *ngIf=\"option.closable\" style=\"width: 100%; height: 21px;\">\n          <div role=\"close\" class=\"{{ option.prefixCls }}-close\">\n            <span role=\"close\" class=\"{{ option.prefixCls }}-close-x\"></span>\n          </div>\n        </div>\n        <div *ngIf=\"!isNoTitle(option.title)\" class=\"{{ option.prefixCls }}-header\">\n          <div *ngIf=\"!isTemplateRef(option.title)\" class=\"{{ option.prefixCls }}-title\">{{ option.title }}</div>\n          <ng-template *ngIf=\"isTemplateRef(option.title)\" [ngTemplateOutlet]=\"option.title\"></ng-template>\n        </div>\n        <div class=\"{{ option.prefixCls }}-body\">\n          <ng-content></ng-content>\n          <div *ngIf=\"!isTemplateRef(option.message)\" class=\"{{ option.prefixCls }}-alert-content\">\n            {{ option.message }}\n          </div>\n          <ng-template *ngIf=\"isTemplateRef(option.message)\" [ngTemplateOutlet]=\"option.message\"></ng-template>\n          <ng-template *ngIf=\"option.type === 'default'\" [ngTemplateOutlet]=\"promptDefault\"></ng-template>\n          <ng-template *ngIf=\"option.type === 'secure-text'\" [ngTemplateOutlet]=\"promptSecure\"></ng-template>\n          <ng-template *ngIf=\"option.type === 'login-password'\" [ngTemplateOutlet]=\"promptPassword\"></ng-template>\n        </div>\n        <div class=\"{{ option.prefixCls }}-footer\">\n          <div [ngClass]=\"btnGroupClass\" role=\"group\">\n            <div\n              Button\n              role=\"button\"\n              *ngFor=\"let button of option.footer\"\n              [className]=\"'am-modal-button'\"\n              [ngStyle]=\"button.style\"\n              (onClick)=\"button.onPress()\"\n            >\n              {{ button.text }}\n            </div>\n          </div>\n        </div>\n      </div>\n    </div>\n  </div>\n</div>\n\n<ng-template #promptPassword>\n  <div class=\"{{ option.prefixCls }}-input-container\">\n    <div class=\"{{ option.prefixCls }}-input\">\n      <input\n        #inputElement\n        autofocus\n        [type]=\"'text'\"\n        [placeholder]=\"option.placeholders[0] || ''\"\n        [(ngModel)]=\"option.defaultValue[0]\"\n        (ngModelChange)=\"inputChange('text', $event)\"\n      />\n    </div>\n    <div className=\"{{ option.prefixCls }}-input\">\n      <input\n        #inputElement\n        [type]=\"'password'\"\n        [placeholder]=\"option.placeholders[1] || ''\"\n        [(ngModel)]=\"option.defaultValue[1]\"\n        (ngModelChange)=\"inputChange('password', $event)\"\n      />\n    </div>\n  </div>\n</ng-template>\n<ng-template #promptSecure>\n  <div className=\"{{ option.prefixCls }}-input-container\">\n    <div className=\"{{ option.prefixCls }}-input\">\n      <input\n        #inputElement\n        autofocus\n        [type]=\"'password'\"\n        [placeholder]=\"option.placeholders[0] || ''\"\n        [(ngModel)]=\"option.defaultValue[0]\"\n        (ngModelChange)=\"inputChange('password', $event)\"\n      />\n    </div>\n  </div>\n</ng-template>\n<ng-template #promptDefault>\n  <div className=\"{{ option.prefixCls }}-input-container\">\n    <div className=\"{{ option.prefixCls }}-input\">\n      <input\n        #inputElement\n        autofocus\n        [type]=\"'text'\"\n        [placeholder]=\"option.placeholders[0] || ''\"\n        [(ngModel)]=\"option.defaultValue[0]\"\n        (ngModelChange)=\"inputChange('text', $event)\"\n      />\n    </div>\n  </div>\n</ng-template>\n",
                    encapsulation: ViewEncapsulation.None,
                    providers: [
                        ModalOptions,
                        {
                            provide: NG_VALUE_ACCESSOR,
                            useExisting: forwardRef((/**
                             * @return {?}
                             */
                            function () { return ModalComponent; })),
                            multi: true
                        }
                    ]
                }] }
    ];
    /** @nocollapse */
    ModalComponent.ctorParameters = function () { return [
        { type: ModalOptions },
        { type: ElementRef }
    ]; };
    ModalComponent.propDecorators = {
        title: [{ type: Input }],
        closable: [{ type: Input }],
        maskClosable: [{ type: Input }],
        popup: [{ type: Input }],
        animationType: [{ type: Input }],
        transparent: [{ type: Input }],
        footer: [{ type: Input }],
        platform: [{ type: Input }],
        className: [{ type: Input }],
        wrapClassName: [{ type: Input }],
        actions: [{ type: Input }],
        defaultValue: [{ type: Input }],
        type: [{ type: Input }],
        placeholders: [{ type: Input }],
        operation: [{ type: Input }],
        onClose: [{ type: Output }],
        afterOpenEmitter: [{ type: Output }],
        afterCloseEmitter: [{ type: Output }],
        panend: [{ type: HostListener, args: ['mouseup', ['$event'],] }, { type: HostListener, args: ['touchend', ['$event'],] }]
    };
    return ModalComponent;
}(ModalRef));
if (false) {
    /** @type {?} */
    ModalComponent.prototype.autoFocus;
    /** @type {?} */
    ModalComponent.prototype.transitionName;
    /** @type {?} */
    ModalComponent.prototype.maskTransitionName;
    /** @type {?} */
    ModalComponent.prototype.wrapCls;
    /** @type {?} */
    ModalComponent.prototype.cls;
    /** @type {?} */
    ModalComponent.prototype.btnGroupClass;
    /** @type {?} */
    ModalComponent.prototype.data;
    /** @type {?} */
    ModalComponent.prototype.onChanged;
    /** @type {?} */
    ModalComponent.prototype.onTouched;
    /** @type {?} */
    ModalComponent.prototype.onClose;
    /** @type {?} */
    ModalComponent.prototype.afterOpenEmitter;
    /** @type {?} */
    ModalComponent.prototype.afterCloseEmitter;
    /** @type {?} */
    ModalComponent.prototype.option;
    /** @type {?} */
    ModalComponent.prototype.elementRef;
}
var ModalServiceComponent = /** @class */ (function (_super) {
    __extends(ModalServiceComponent, _super);
    function ModalServiceComponent(option, elementRef) {
        var _this = _super.call(this, option, elementRef) || this;
        _this.option = option;
        _this.elementRef = elementRef;
        _this.setTransitionName(_this.option.visible);
        return _this;
    }
    ModalServiceComponent.decorators = [
        { type: Component, args: [{
                    selector: 'ModalService',
                    template: "<div *ngIf=\"option.visible\">\n  <div class=\"{{ option.prefixCls }}-mask {{ maskTransitionName }}\"></div>\n  <div role=\"dialog\" class=\"{{ option.prefixCls }}-wrap {{ transitionName }}\" [ngClass]=\"wrapCls\">\n    <div role=\"document\" class=\"{{ option.prefixCls }}\" [ngClass]=\"cls\">\n      <div class=\"{{ option.prefixCls }}-content\">\n        <div *ngIf=\"option.closable\" style=\"width: 100%; height: 21px;\">\n          <div role=\"close\" class=\"{{ option.prefixCls }}-close\">\n            <span role=\"close\" class=\"{{ option.prefixCls }}-close-x\"></span>\n          </div>\n        </div>\n        <div *ngIf=\"!isNoTitle(option.title)\" class=\"{{ option.prefixCls }}-header\">\n          <div *ngIf=\"!isTemplateRef(option.title)\" class=\"{{ option.prefixCls }}-title\">{{ option.title }}</div>\n          <ng-template *ngIf=\"isTemplateRef(option.title)\" [ngTemplateOutlet]=\"option.title\"></ng-template>\n        </div>\n        <div class=\"{{ option.prefixCls }}-body\">\n          <ng-content></ng-content>\n          <div *ngIf=\"!isTemplateRef(option.message)\" class=\"{{ option.prefixCls }}-alert-content\">\n            {{ option.message }}\n          </div>\n          <ng-template *ngIf=\"isTemplateRef(option.message)\" [ngTemplateOutlet]=\"option.message\"></ng-template>\n          <ng-template *ngIf=\"option.type === 'default'\" [ngTemplateOutlet]=\"promptDefault\"></ng-template>\n          <ng-template *ngIf=\"option.type === 'secure-text'\" [ngTemplateOutlet]=\"promptSecure\"></ng-template>\n          <ng-template *ngIf=\"option.type === 'login-password'\" [ngTemplateOutlet]=\"promptPassword\"></ng-template>\n        </div>\n        <div class=\"{{ option.prefixCls }}-footer\">\n          <div [ngClass]=\"btnGroupClass\" role=\"group\">\n            <div\n              Button\n              role=\"button\"\n              *ngFor=\"let button of option.footer\"\n              [className]=\"'am-modal-button'\"\n              [ngStyle]=\"button.style\"\n              (onClick)=\"button.onPress()\"\n            >\n              {{ button.text }}\n            </div>\n          </div>\n        </div>\n      </div>\n    </div>\n  </div>\n</div>\n\n<ng-template #promptPassword>\n  <div class=\"{{ option.prefixCls }}-input-container\">\n    <div class=\"{{ option.prefixCls }}-input\">\n      <input\n        #inputElement\n        autofocus\n        [type]=\"'text'\"\n        [placeholder]=\"option.placeholders[0] || ''\"\n        [(ngModel)]=\"option.defaultValue[0]\"\n        (ngModelChange)=\"inputChange('text', $event)\"\n      />\n    </div>\n    <div className=\"{{ option.prefixCls }}-input\">\n      <input\n        #inputElement\n        [type]=\"'password'\"\n        [placeholder]=\"option.placeholders[1] || ''\"\n        [(ngModel)]=\"option.defaultValue[1]\"\n        (ngModelChange)=\"inputChange('password', $event)\"\n      />\n    </div>\n  </div>\n</ng-template>\n<ng-template #promptSecure>\n  <div className=\"{{ option.prefixCls }}-input-container\">\n    <div className=\"{{ option.prefixCls }}-input\">\n      <input\n        #inputElement\n        autofocus\n        [type]=\"'password'\"\n        [placeholder]=\"option.placeholders[0] || ''\"\n        [(ngModel)]=\"option.defaultValue[0]\"\n        (ngModelChange)=\"inputChange('password', $event)\"\n      />\n    </div>\n  </div>\n</ng-template>\n<ng-template #promptDefault>\n  <div className=\"{{ option.prefixCls }}-input-container\">\n    <div className=\"{{ option.prefixCls }}-input\">\n      <input\n        #inputElement\n        autofocus\n        [type]=\"'text'\"\n        [placeholder]=\"option.placeholders[0] || ''\"\n        [(ngModel)]=\"option.defaultValue[0]\"\n        (ngModelChange)=\"inputChange('text', $event)\"\n      />\n    </div>\n  </div>\n</ng-template>\n",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    /** @nocollapse */
    ModalServiceComponent.ctorParameters = function () { return [
        { type: ModalOptions },
        { type: ElementRef }
    ]; };
    return ModalServiceComponent;
}(ModalComponent));
if (false) {
    /** @type {?} */
    ModalServiceComponent.prototype.option;
    /** @type {?} */
    ModalServiceComponent.prototype.elementRef;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var PopupService = /** @class */ (function () {
    function PopupService(_overlay) {
        this._overlay = _overlay;
        this.overlay = null;
        this.overlayRef = null;
        this.currentServiceName = null;
        this.serviceArray = [];
        this.overlay = this._overlay;
    }
    /**
     * @param {?} component
     * @param {?=} childInjector
     * @param {?=} hasBackdrop
     * @param {?=} positionStrategy
     * @return {?}
     */
    PopupService.prototype.showPopup = /**
     * @param {?} component
     * @param {?=} childInjector
     * @param {?=} hasBackdrop
     * @param {?=} positionStrategy
     * @return {?}
     */
    function (component, childInjector, hasBackdrop, positionStrategy) {
        var _this = this;
        if (positionStrategy === void 0) { positionStrategy = this.overlay
            .position()
            .global()
            .centerVertically()
            .centerHorizontally(); }
        /** @type {?} */
        var overlayConfig = new OverlayConfig();
        overlayConfig.hasBackdrop = hasBackdrop;
        overlayConfig.positionStrategy = positionStrategy;
        this.overlayRef = this.overlay.create(overlayConfig);
        this.overlayRef.backdropClick().subscribe((/**
         * @return {?}
         */
        function () {
            _this.hidePopup();
        }));
        return this.overlayRef.attach(new ComponentPortal(component, undefined, childInjector));
    };
    /**
     * @return {?}
     */
    PopupService.prototype.hidePopup = /**
     * @return {?}
     */
    function () {
        if (this.overlayRef) {
            this.overlayRef.dispose();
        }
    };
    PopupService.decorators = [
        { type: Injectable, args: [{
                    providedIn: 'root'
                },] },
        { type: Injectable }
    ];
    /** @nocollapse */
    PopupService.ctorParameters = function () { return [
        { type: Overlay }
    ]; };
    return PopupService;
}());
if (false) {
    /** @type {?} */
    PopupService.prototype.overlay;
    /** @type {?} */
    PopupService.prototype.overlayRef;
    /** @type {?} */
    PopupService.prototype.currentServiceName;
    /** @type {?} */
    PopupService.prototype.serviceArray;
    /** @type {?} */
    PopupService.prototype._overlay;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var ModalService = /** @class */ (function (_super) {
    __extends(ModalService, _super);
    function ModalService() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.modalRef = null;
        return _this;
    }
    /**
     * @param {?} config
     * @param {?} options
     * @return {?}
     */
    ModalService.prototype._initConfig = /**
     * @param {?} config
     * @param {?} options
     * @return {?}
     */
    function (config, options) {
        /** @type {?} */
        var props = new ModalBaseOptions();
        /** @type {?} */
        var optionalParams = [
            'visible',
            'focus',
            'prefixCls',
            'animated',
            'closable',
            'maskClosable',
            'onClose',
            'transparent',
            'popup',
            'animationType',
            'title',
            'footer',
            'platform',
            'className',
            'wrapClassName',
            'message',
            'actions',
            'callbackOrActions',
            'type',
            'defaultValue',
            'placeholders',
            'operation',
            'transitionName',
            'maskTransitionName',
            'close',
            'closeWithAnimation'
        ];
        /** @type {?} */
        var self = this;
        config = Object.assign(options, config, {
            close: (/**
             * @return {?}
             */
            function () {
                if (config.maskClosable || config.closable) {
                    self.closeWithAnimation();
                }
            })
        }, {
            closeWithAnimation: (/**
             * @return {?}
             */
            function () {
                self.closeWithAnimation();
            })
        });
        optionalParams.forEach((/**
         * @param {?} key
         * @return {?}
         */
        function (key) {
            if (config[key] !== undefined) {
                props[key] = config[key];
            }
        }));
        return props;
    };
    /**
     * @param {?} props
     * @return {?}
     */
    ModalService.prototype._open = /**
     * @param {?} props
     * @return {?}
     */
    function (props) {
        /** @type {?} */
        var childInjector = Injector.create([
            {
                provide: ModalOptions,
                useValue: props
            }
        ]);
        this.modalRef = this.showPopup(ModalServiceComponent, childInjector);
        return this.modalRef && this.modalRef.instance;
    };
    /**
     * @return {?}
     */
    ModalService.prototype.closeWithAnimation = /**
     * @return {?}
     */
    function () {
        var _this = this;
        /** @type {?} */
        var options = new ModalBaseOptions();
        this.modalRef.instance.transitionName = options.transitionName + "-leave " + options.transitionName + "-leave-active";
        this.modalRef.instance.maskTransitionName = options.maskTransitionName + "-leave " + options.maskTransitionName + "-leave-active";
        setTimeout((/**
         * @return {?}
         */
        function () {
            _this.close();
        }), 200);
    };
    /**
     * @param {?=} title
     * @param {?=} message
     * @param {?=} actions
     * @param {?=} platform
     * @return {?}
     */
    ModalService.prototype.alert = /**
     * @param {?=} title
     * @param {?=} message
     * @param {?=} actions
     * @param {?=} platform
     * @return {?}
     */
    function (title, message, actions, platform) {
        /** @type {?} */
        var options = new AlertOptions();
        options.visible = true;
        options.transparent = true;
        options.closable = false;
        options.maskClosable = false;
        options.platform = 'ios';
        /** @type {?} */
        var footer = getFooter.call(this, actions);
        /** @type {?} */
        var config = Object.assign({
            title: title,
            message: message,
            footer: footer,
            actions: footer,
            platform: platform ? platform : 'ios'
        });
        /** @type {?} */
        var props = this._initConfig(config, options);
        return this._open(props);
    };
    /**
     * @param {?=} title
     * @param {?=} message
     * @param {?=} callbackOrActions
     * @param {?=} type
     * @param {?=} defaultValue
     * @param {?=} placeholders
     * @param {?=} platform
     * @return {?}
     */
    ModalService.prototype.prompt = /**
     * @param {?=} title
     * @param {?=} message
     * @param {?=} callbackOrActions
     * @param {?=} type
     * @param {?=} defaultValue
     * @param {?=} placeholders
     * @param {?=} platform
     * @return {?}
     */
    function (title, message, callbackOrActions, type, defaultValue, placeholders, platform) {
        var _this = this;
        /** @type {?} */
        var options = new ModalOptions();
        options.visible = true;
        options.transparent = true;
        options.closable = false;
        options.maskClosable = false;
        options.className = 'am-modal-alert-content';
        options.defaultValue = defaultValue || ['', ''];
        options.placeholders = placeholders;
        (options.type = type ? type : 'default'), (options.platform = platform ? platform : 'ios');
        /**
         * @param {?} self
         * @param {?} func
         * @return {?}
         */
        function getArgs(self, func) {
            /** @type {?} */
            var text;
            /** @type {?} */
            var password;
            if (self.modalRef) {
                text = self.modalRef.instance.data.text || options.defaultValue[0];
                password = self.modalRef.instance.data.password || options.defaultValue[1];
            }
            else {
                text = options.defaultValue[0];
                password = options.defaultValue[1];
            }
            if (type === 'login-password') {
                return func(text, password);
            }
            else if (type === 'secure-text') {
                return func(password);
            }
            return func(text);
        }
        /** @type {?} */
        var actions;
        if (typeof callbackOrActions === 'function') {
            actions = [
                { text: 'Cancel' },
                {
                    text: 'OK',
                    onPress: (/**
                     * @return {?}
                     */
                    function () {
                        getArgs(_this, callbackOrActions);
                    })
                }
            ];
        }
        else {
            actions = callbackOrActions.map((/**
             * @param {?} item
             * @return {?}
             */
            function (item) {
                return {
                    text: item.text,
                    onPress: (/**
                     * @return {?}
                     */
                    function () {
                        if (item.onPress) {
                            return getArgs(_this, item.onPress);
                        }
                    })
                };
            }));
        }
        /** @type {?} */
        var footer = getFooter.call(this, actions);
        /** @type {?} */
        var config = Object.assign({
            title: title,
            message: message,
            type: type ? type : 'default',
            footer: footer,
            actions: footer,
            platform: platform ? platform : 'ios'
        });
        /** @type {?} */
        var props = this._initConfig(config, options);
        return this._open(props);
    };
    /**
     * @param {?=} actions
     * @param {?=} platform
     * @return {?}
     */
    ModalService.prototype.operation = /**
     * @param {?=} actions
     * @param {?=} platform
     * @return {?}
     */
    function (actions, platform) {
        /** @type {?} */
        var options = new ModalOptions();
        options.visible = true;
        options.transparent = true;
        options.closable = false;
        options.maskClosable = false;
        options.operation = true;
        options.className = 'am-modal-operation';
        /** @type {?} */
        var footer = getFooter.call(this, actions);
        /** @type {?} */
        var config = Object.assign({
            footer: footer,
            actions: footer,
            platform: platform ? platform : 'ios'
        });
        /** @type {?} */
        var props = this._initConfig(config, options);
        return this._open(props);
    };
    /**
     * @return {?}
     */
    ModalService.prototype.close = /**
     * @return {?}
     */
    function () {
        this.hidePopup();
    };
    ModalService.decorators = [
        { type: Injectable, args: [{
                    providedIn: 'root'
                },] },
        { type: Injectable }
    ];
    return ModalService;
}(PopupService));
if (false) {
    /** @type {?} */
    ModalService.prototype.modalRef;
}
/**
 * @param {?} actions
 * @return {?}
 */
function getFooter(actions) {
    var _this = this;
    /** @type {?} */
    var action = actions ? actions : [{ text: 'OK', onPress: (/**
             * @return {?}
             */
            function () { }) }];
    return action.map((/**
     * @param {?} button
     * @return {?}
     */
    function (button) {
        /** @type {?} */
        var orginPress = button.onPress || (/**
         * @return {?}
         */
        function () { });
        button.onPress = (/**
         * @return {?}
         */
        function () {
            /** @type {?} */
            var res = orginPress();
            if (res && res.then) {
                res.then((/**
                 * @return {?}
                 */
                function () {
                    _this.closeWithAnimation();
                }));
            }
            else {
                _this.closeWithAnimation();
            }
        });
        return button;
    }));
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var ModalModule = /** @class */ (function () {
    function ModalModule() {
    }
    ModalModule.decorators = [
        { type: NgModule, args: [{
                    imports: [
                        CommonModule,
                        ListModule,
                        WingBlankModule,
                        WhiteSpaceModule,
                        ButtonModule,
                        InputItemModule,
                        FormsModule,
                        ReactiveFormsModule,
                        OverlayModule
                    ],
                    exports: [ModalComponent, ModalServiceComponent],
                    declarations: [ModalComponent, ModalServiceComponent],
                    entryComponents: [ModalServiceComponent],
                    providers: [AlertOptions, ModalService, PopupService]
                },] }
    ];
    return ModalModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @record
 */
function PopoverOptionsInterface() { }
if (false) {
    /** @type {?|undefined} */
    PopoverOptionsInterface.prototype.mask;
    /** @type {?|undefined} */
    PopoverOptionsInterface.prototype.visible;
    /** @type {?|undefined} */
    PopoverOptionsInterface.prototype.placement;
    /** @type {?|undefined} */
    PopoverOptionsInterface.prototype.appendToBody;
    /** @type {?|undefined} */
    PopoverOptionsInterface.prototype.className;
    /** @type {?|undefined} */
    PopoverOptionsInterface.prototype.autoClose;
}
var PopoverOptions = /** @class */ (function () {
    function PopoverOptions() {
        this.showArrow = false;
        this.mask = false;
        this.placement = 'bottom';
        this.appendToBody = false;
        this.className = '';
        this.autoClose = true;
    }
    return PopoverOptions;
}());
if (false) {
    /** @type {?} */
    PopoverOptions.prototype.showArrow;
    /** @type {?} */
    PopoverOptions.prototype.mask;
    /** @type {?} */
    PopoverOptions.prototype.placement;
    /** @type {?} */
    PopoverOptions.prototype.appendToBody;
    /** @type {?} */
    PopoverOptions.prototype.className;
    /** @type {?} */
    PopoverOptions.prototype.autoClose;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var PopoverComponentOptions = /** @class */ (function (_super) {
    __extends(PopoverComponentOptions, _super);
    function PopoverComponentOptions() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    PopoverComponentOptions.decorators = [
        { type: Injectable }
    ];
    return PopoverComponentOptions;
}(PopoverOptions));
if (false) {
    /** @type {?} */
    PopoverComponentOptions.prototype.onAfterViewInit;
    /** @type {?} */
    PopoverComponentOptions.prototype.hidePopover;
    /** @type {?} */
    PopoverComponentOptions.prototype.overlay;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var PopoverComponent = /** @class */ (function () {
    function PopoverComponent(options) {
        this.options = options;
        this.defaultProps = {
            prefixCls: 'am-popover'
        };
        this.maskCls = {};
        this.popoverCls = {};
    }
    /**
     * @return {?}
     */
    PopoverComponent.prototype.setClassMap = /**
     * @return {?}
     */
    function () {
        var _a, _b;
        this.maskCls = (_a = {},
            _a[this.defaultProps.prefixCls + "-mask"] = this.options.mask,
            _a[this.defaultProps.prefixCls + "-mask-hidden"] = !this.options.mask,
            _a);
        this.popoverCls = (_b = {},
            _b["" + this.defaultProps.prefixCls] = true,
            _b[this.defaultProps.prefixCls + "-placement-" + this.options.placement] = true,
            _b[this.defaultProps.prefixCls + "-" + this.options.className] = true,
            _b);
    };
    /**
     * @return {?}
     */
    PopoverComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        this.setClassMap();
    };
    /**
     * @return {?}
     */
    PopoverComponent.prototype.ngAfterViewInit = /**
     * @return {?}
     */
    function () {
        this.options.onAfterViewInit();
    };
    PopoverComponent.decorators = [
        { type: Component, args: [{
                    selector: 'Popover',
                    template: "<ng-content></ng-content>\n<div [ngClass]=\"maskCls\" (click)=\"options.hidePopover()\"></div>\n<div [ngClass]=\"popoverCls\" style=\"color: currentcolor;\">\n  <div class=\"{{ defaultProps.prefixCls }}-content\">\n    <div *ngIf=\"options.showArrow\" class=\"{{ defaultProps.prefixCls }}-arrow\"></div>\n    <div class=\"{{ defaultProps.prefixCls }}-inner\">\n      <div class=\"{{ defaultProps.prefixCls }}-inner-wrapper\">\n        <ng-template [ngTemplateOutlet]=\"options.overlay\" [ngTemplateOutletContext]=\"{ options: options }\">\n        </ng-template>\n      </div>\n    </div>\n  </div>\n</div>\n",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    /** @nocollapse */
    PopoverComponent.ctorParameters = function () { return [
        { type: PopoverComponentOptions }
    ]; };
    return PopoverComponent;
}());
if (false) {
    /** @type {?} */
    PopoverComponent.prototype.defaultProps;
    /** @type {?} */
    PopoverComponent.prototype.maskCls;
    /** @type {?} */
    PopoverComponent.prototype.popoverCls;
    /** @type {?} */
    PopoverComponent.prototype.options;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @param {?} element
 * @return {?}
 */
function getAllStyles(element) {
    return window.getComputedStyle(element);
}
/**
 * @param {?} element
 * @param {?} prop
 * @return {?}
 */
function getStyle(element, prop) {
    return getAllStyles(element)[prop];
}
/**
 * @param {?} element
 * @return {?}
 */
function isStaticPositioned(element) {
    return (getStyle(element, 'position') || 'static') === 'static';
}
/**
 * @param {?} element
 * @return {?}
 */
function getOffsetParent(element) {
    /** @type {?} */
    var offsetParentEl = element.offsetParent || document.documentElement;
    while (offsetParentEl && offsetParentEl !== document.documentElement && isStaticPositioned(offsetParentEl)) {
        offsetParentEl = offsetParentEl.offsetParent;
    }
    return offsetParentEl || document.documentElement;
}
/**
 * @param {?} element
 * @return {?}
 */
function getOffset(element) {
    /** @type {?} */
    var elBcr = element.getBoundingClientRect();
    /** @type {?} */
    var viewportOffset = {
        top: window.pageYOffset - document.documentElement.clientTop,
        left: window.pageXOffset - document.documentElement.clientLeft
    };
    /** @type {?} */
    var elOffset = {
        height: elBcr.height || element.offsetHeight,
        width: elBcr.width || element.offsetWidth,
        top: elBcr.top + viewportOffset.top,
        bottom: elBcr.bottom + viewportOffset.top,
        left: elBcr.left + viewportOffset.left,
        right: elBcr.right + viewportOffset.left
    };
    return elOffset;
}
/**
 * @param {?} element
 * @return {?}
 */
function getPosition(element) {
    /** @type {?} */
    var elPosition;
    /** @type {?} */
    var parentOffset = { width: 0, height: 0, top: 0, bottom: 0, left: 0, right: 0 };
    if (getStyle(element, 'position') === 'fixed') {
        elPosition = element.getBoundingClientRect();
    }
    else {
        /** @type {?} */
        var offsetParentEl = getOffsetParent(element);
        elPosition = getOffset(element);
        if (offsetParentEl !== document.documentElement) {
            parentOffset = getOffset(offsetParentEl);
        }
        parentOffset.top += offsetParentEl.clientTop;
        parentOffset.left += offsetParentEl.clientLeft;
    }
    elPosition.top -= parentOffset.top;
    elPosition.bottom -= parentOffset.top;
    elPosition.left -= parentOffset.left;
    elPosition.right -= parentOffset.left;
    return elPosition;
}
/**
 * @param {?} hostElement
 * @param {?} targetElement
 * @param {?} placement
 * @param {?} appendToBody
 * @return {?}
 */
function getPositionElements(hostElement, targetElement, placement, appendToBody) {
    /** @type {?} */
    var hostElPosition = appendToBody ? getOffset(hostElement) : getPosition(hostElement);
    /** @type {?} */
    var targetElStyles = getAllStyles(targetElement);
    /** @type {?} */
    var targetElBCR = targetElement.getBoundingClientRect();
    /** @type {?} */
    var placementPrimary = placement.split('-')[0] || 'top';
    /** @type {?} */
    var placementSecondary = placement.split('-')[1] || 'center';
    /** @type {?} */
    var targetElPosition = {
        height: targetElBCR.height || targetElement.offsetHeight,
        width: targetElBCR.width || targetElement.offsetWidth,
        top: 0,
        bottom: targetElBCR.height || targetElement.offsetHeight,
        left: 0,
        right: targetElBCR.width || targetElement.offsetWidth
    };
    switch (placementPrimary) {
        case 'top':
            targetElPosition.top =
                hostElPosition.top - (targetElement.offsetHeight + parseFloat(targetElStyles.marginBottom));
            break;
        case 'bottom':
            targetElPosition.top = hostElPosition.top + hostElPosition.height;
            break;
        case 'left':
            targetElPosition.left =
                hostElPosition.left - (targetElement.offsetWidth + parseFloat(targetElStyles.marginRight));
            break;
        case 'right':
            targetElPosition.left = hostElPosition.left + hostElPosition.width;
            break;
    }
    switch (placementSecondary) {
        case 'top':
            targetElPosition.top = hostElPosition.top;
            break;
        case 'bottom':
            targetElPosition.top = hostElPosition.top + hostElPosition.height - targetElement.offsetHeight;
            break;
        case 'left':
            targetElPosition.left = hostElPosition.left;
            break;
        case 'right':
            targetElPosition.left = hostElPosition.left + hostElPosition.width - targetElement.offsetWidth;
            break;
        case 'center':
            if (placementPrimary === 'top' || placementPrimary === 'bottom') {
                targetElPosition.left = hostElPosition.left + hostElPosition.width / 2 - targetElement.offsetWidth / 2;
            }
            else {
                targetElPosition.top = hostElPosition.top + hostElPosition.height / 2 - targetElement.offsetHeight / 2;
            }
            break;
    }
    targetElPosition.top = Math.round(targetElPosition.top);
    targetElPosition.bottom = Math.round(targetElPosition.bottom);
    targetElPosition.left = Math.round(targetElPosition.left);
    targetElPosition.right = Math.round(targetElPosition.right);
    return targetElPosition;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var PopoverDirective = /** @class */ (function () {
    function PopoverDirective(_viewContainerRef, _elm, _defaultOptions, _cfr, _renderer) {
        this._viewContainerRef = _viewContainerRef;
        this._elm = _elm;
        this._defaultOptions = _defaultOptions;
        this._cfr = _cfr;
        this._renderer = _renderer;
        this._eventListeners = [];
        this.onVisibleChange = new EventEmitter(true);
        this.onSelect = new EventEmitter();
    }
    /**
     * @return {?}
     */
    PopoverDirective.prototype.togglePopover = /**
     * @return {?}
     */
    function () {
        if (!this.popover) {
            this.showPopover();
        }
        else {
            this.hidePopover();
        }
    };
    /**
     * @param {?} placement
     * @return {?}
     */
    PopoverDirective.prototype.positionMap = /**
     * @param {?} placement
     * @return {?}
     */
    function (placement) {
        switch (placement) {
            case 'topLeft':
                return 'top-left';
            case 'topRight':
                return 'top-right';
            case 'bottomLeft':
                return 'bottom-left';
            case 'bottomRight':
                return 'bottom-right';
            case 'leftTop':
                return 'left-top';
            case 'leftBottom':
                return 'left-bottom';
            case 'rightTop':
                return 'right-top';
            case 'rightBottom':
                return 'right-bottom';
            case 'fullScreen':
            case 'landScape':
                return 'bottom';
            default:
                return placement;
        }
    };
    /**
     * @return {?}
     */
    PopoverDirective.prototype.ngOnInit = /**
     * @return {?}
     */
    function () { };
    /**
     * @param {?} changes
     * @return {?}
     */
    PopoverDirective.prototype.ngOnChanges = /**
     * @param {?} changes
     * @return {?}
     */
    function (changes) {
        var _this = this;
        if (changes.visible && changes.visible.currentValue) {
            setTimeout((/**
             * @return {?}
             */
            function () {
                _this.showPopover();
            }), 0);
        }
        else {
            setTimeout((/**
             * @return {?}
             */
            function () {
                _this.hidePopover();
            }), 0);
        }
    };
    /**
     * @return {?}
     */
    PopoverDirective.prototype.ngOnDestroy = /**
     * @return {?}
     */
    function () {
        this.hidePopover();
    };
    /**
     * @private
     * @param {?} event
     * @return {?}
     */
    PopoverDirective.prototype.onDocumentClick = /**
     * @private
     * @param {?} event
     * @return {?}
     */
    function (event) {
        if (this.popover &&
            !this._elm.nativeElement.contains(event.target) &&
            !this.popover.location.nativeElement.contains(event.target)) {
            this.hidePopover();
        }
    };
    /**
     * @private
     * @return {?}
     */
    PopoverDirective.prototype.showPopover = /**
     * @private
     * @return {?}
     */
    function () {
        var _this = this;
        if (!this.popover) {
            setTimeout((/**
             * @return {?}
             */
            function () {
                _this._eventListeners = [
                    _this._renderer.listen('document', 'click', (/**
                     * @param {?} event
                     * @return {?}
                     */
                    function (event) { return _this.onDocumentClick(event); })),
                    _this._renderer.listen('document', 'touchend', (/**
                     * @param {?} event
                     * @return {?}
                     */
                    function (event) { return _this.onDocumentClick(event); })),
                    _this._renderer.listen('window', 'resize', (/**
                     * @return {?}
                     */
                    function () { return _this.positionPopover(); }))
                ];
            }));
            /** @type {?} */
            var options_1 = new PopoverComponentOptions();
            options_1.placement = this.placement;
            Object.assign(options_1, this._defaultOptions, {
                hidePopover: (/**
                 * @param {?} event
                 * @return {?}
                 */
                function (event) {
                    _this.hidePopover();
                }),
                onAfterViewInit: (/**
                 * @return {?}
                 */
                function () {
                    _this.positionPopover();
                    /** @type {?} */
                    var children = document.getElementsByClassName('am-popover-inner-wrapper')[0].children;
                    if (children.length > 0) {
                        var _loop_1 = function (i) {
                            children[i].id = "" + i;
                            children[i].addEventListener('click', (/**
                             * @return {?}
                             */
                            function () {
                                if (_this.onSelect) {
                                    _this.onSelect.emit(children[i]);
                                    if (options_1.autoClose) {
                                        _this.hidePopover();
                                    }
                                }
                            }), false);
                        };
                        // 首先我们检查它是否包含子节点
                        for (var i = 0; i < children.length; i++) {
                            _loop_1(i);
                        }
                    }
                })
            });
            /** @type {?} */
            var optionalParams = [
                'mask',
                'showArrow',
                'placement',
                'appendToBody',
                'overlay',
                'className',
                'autoClose'
            ];
            optionalParams.forEach((/**
             * @param {?} param
             * @return {?}
             */
            function (param) {
                if (typeof _this[param] !== 'undefined') {
                    ((/** @type {?} */ (options_1)))[param] = _this[param];
                }
            }));
            /** @type {?} */
            var componentFactory = this._cfr.resolveComponentFactory(PopoverComponent);
            /** @type {?} */
            var childInjector = Injector.create([
                {
                    provide: PopoverComponentOptions,
                    useValue: options_1
                }
            ], this._viewContainerRef.parentInjector);
            this.popover = this._viewContainerRef.createComponent(componentFactory, this._viewContainerRef.length, childInjector);
            if (options_1.appendToBody) {
                document.body.appendChild(this.popover.location.nativeElement);
            }
            this.onVisibleChange.emit(true);
        }
    };
    /**
     * @private
     * @return {?}
     */
    PopoverDirective.prototype.positionPopover = /**
     * @private
     * @return {?}
     */
    function () {
        if (this.popover) {
            /** @type {?} */
            var popoverElement = this.popover.location.nativeElement.children[1];
            /** @type {?} */
            var popoverPosition = getPositionElements(this._elm.nativeElement, popoverElement, this.positionMap(this.placement) || this._defaultOptions.placement, this.appendToBody || this._defaultOptions.appendToBody);
            if (this.placement === 'landScape') {
                this._renderer.setStyle(popoverElement, 'top', popoverPosition.top + "px");
                this._renderer.setStyle(popoverElement, 'left', "0px");
                this._renderer.setStyle(popoverElement, 'width', window.innerWidth + "px");
                this._renderer.setStyle(popoverElement, 'max-height', window.innerHeight - popoverPosition.height + "px");
            }
            else if (this.placement === 'fullScreen') {
                this._renderer.setStyle(popoverElement, 'top', 0 + "px");
                this._renderer.setStyle(popoverElement, 'left', "0px");
                this._renderer.setStyle(popoverElement, 'width', window.innerWidth + "px");
                this._renderer.setStyle(popoverElement, 'max-height', window.innerHeight - popoverPosition.height + "px");
            }
            else {
                this._renderer.setStyle(popoverElement, 'top', popoverPosition.top + "px");
                this._renderer.setStyle(popoverElement, 'left', popoverPosition.left + "px");
            }
        }
    };
    /**
     * @private
     * @return {?}
     */
    PopoverDirective.prototype.hidePopover = /**
     * @private
     * @return {?}
     */
    function () {
        if (this.popover) {
            this.popover.destroy();
            delete this.popover;
            this.onVisibleChange.emit(false);
            this._eventListeners.forEach((/**
             * @param {?} fn
             * @return {?}
             */
            function (fn) { return fn(); }));
            this._eventListeners = [];
        }
    };
    PopoverDirective.decorators = [
        { type: Directive, args: [{
                    selector: '[Popover], [nzm-popover]',
                    providers: [PopoverOptions]
                },] }
    ];
    /** @nocollapse */
    PopoverDirective.ctorParameters = function () { return [
        { type: ViewContainerRef },
        { type: ElementRef },
        { type: PopoverOptions },
        { type: ComponentFactoryResolver },
        { type: Renderer2 }
    ]; };
    PopoverDirective.propDecorators = {
        mask: [{ type: Input }],
        showArrow: [{ type: Input }],
        visible: [{ type: Input }],
        placement: [{ type: Input }],
        overlay: [{ type: Input }],
        onVisibleChange: [{ type: Output }],
        onSelect: [{ type: Output }],
        appendToBody: [{ type: Input }],
        className: [{ type: Input }],
        autoClose: [{ type: Input }],
        togglePopover: [{ type: HostListener, args: ['click',] }]
    };
    return PopoverDirective;
}());
if (false) {
    /** @type {?} */
    PopoverDirective.prototype.popover;
    /**
     * @type {?}
     * @private
     */
    PopoverDirective.prototype._eventListeners;
    /** @type {?} */
    PopoverDirective.prototype.mask;
    /** @type {?} */
    PopoverDirective.prototype.showArrow;
    /** @type {?} */
    PopoverDirective.prototype.visible;
    /** @type {?} */
    PopoverDirective.prototype.placement;
    /** @type {?} */
    PopoverDirective.prototype.overlay;
    /** @type {?} */
    PopoverDirective.prototype.onVisibleChange;
    /** @type {?} */
    PopoverDirective.prototype.onSelect;
    /** @type {?} */
    PopoverDirective.prototype.appendToBody;
    /** @type {?} */
    PopoverDirective.prototype.className;
    /** @type {?} */
    PopoverDirective.prototype.autoClose;
    /**
     * @type {?}
     * @private
     */
    PopoverDirective.prototype._viewContainerRef;
    /**
     * @type {?}
     * @private
     */
    PopoverDirective.prototype._elm;
    /**
     * @type {?}
     * @private
     */
    PopoverDirective.prototype._defaultOptions;
    /**
     * @type {?}
     * @private
     */
    PopoverDirective.prototype._cfr;
    /**
     * @type {?}
     * @private
     */
    PopoverDirective.prototype._renderer;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @param {?} userOptions
 * @return {?}
 */
function PopoverOptionsFactory(userOptions) {
    /** @type {?} */
    var options = new PopoverOptions();
    Object.assign(options, userOptions);
    return options;
}
var PopoverModule = /** @class */ (function () {
    function PopoverModule() {
    }
    PopoverModule.decorators = [
        { type: NgModule, args: [{
                    declarations: [PopoverDirective, PopoverComponent],
                    imports: [CommonModule],
                    exports: [PopoverDirective, PopoverComponent],
                    entryComponents: [PopoverComponent]
                },] }
    ];
    return PopoverModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var NavBarComponent = /** @class */ (function () {
    function NavBarComponent() {
        this.defaultProps = {
            prefixCls: 'am-navbar',
            mode: 'dark',
            onLeftClick: (/**
             * @return {?}
             */
            function () { })
        };
        this.navbarCls = {};
        this.isIconString = true;
        this.isLeftContentString = true;
        this.isRightContentString = true;
        this.onLeftClick = new EventEmitter();
        this.amNavbar = true;
    }
    Object.defineProperty(NavBarComponent.prototype, "mode", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.defaultProps.mode = value;
            this.amNavbarLight = this.defaultProps.mode === 'light';
            this.amNavbardark = this.defaultProps.mode === 'dark';
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(NavBarComponent.prototype, "icon", {
        get: /**
         * @return {?}
         */
        function () {
            return this._icon;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (value instanceof TemplateRef) {
                this.isIconString = false;
            }
            else {
                this.isIconString = true;
            }
            this._icon = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(NavBarComponent.prototype, "leftContent", {
        get: /**
         * @return {?}
         */
        function () {
            return this._leftContent;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (value instanceof TemplateRef) {
                this.isLeftContentString = false;
            }
            else {
                this.isLeftContentString = true;
            }
            this._leftContent = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(NavBarComponent.prototype, "rightContent", {
        get: /**
         * @return {?}
         */
        function () {
            return this._rightContent;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (value instanceof TemplateRef) {
                this.isRightContentString = false;
            }
            else {
                this.isRightContentString = true;
            }
            this._rightContent = value;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @param {?} event
     * @return {?}
     */
    NavBarComponent.prototype.click = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        this.onLeftClick.emit(event);
    };
    NavBarComponent.decorators = [
        { type: Component, args: [{
                    selector: 'Navbar, nzm-nav-bar',
                    template: "<div role=\"button\" class=\"{{ defaultProps.prefixCls }}-left\" (click)=\"click($event)\">\n  <ng-template *ngIf=\"!isLeftContentString\" [ngTemplateOutlet]=\"leftContent\"></ng-template>\n  <span *ngIf=\"icon\" class=\"{{ defaultProps.prefixCls }}-left-icon\" aria-hidden=\"true\">\n    <Icon *ngIf=\"isIconString\" [type]=\"icon\"></Icon>\n    <ng-template *ngIf=\"!isIconString\" [ngTemplateOutlet]=\"icon\"></ng-template>\n  </span>\n  {{ isLeftContentString ? leftContent : null }}\n</div>\n<div class=\"{{ defaultProps.prefixCls }}-title\">\n  <ng-content></ng-content>\n</div>\n<div class=\"{{ defaultProps.prefixCls }}-right\">\n  {{ isRightContentString ? rightContent : null }}\n  <ng-template *ngIf=\"!isRightContentString\" [ngTemplateOutlet]=\"rightContent\"></ng-template>\n</div>\n"
                }] }
    ];
    /** @nocollapse */
    NavBarComponent.ctorParameters = function () { return []; };
    NavBarComponent.propDecorators = {
        mode: [{ type: Input }],
        icon: [{ type: Input }],
        leftContent: [{ type: Input }],
        rightContent: [{ type: Input }],
        onLeftClick: [{ type: Output }],
        amNavbar: [{ type: HostBinding, args: ['class.am-navbar',] }],
        amNavbarLight: [{ type: HostBinding, args: ['class.am-navbar-light',] }],
        amNavbardark: [{ type: HostBinding, args: ['class.am-navbar-dark',] }]
    };
    return NavBarComponent;
}());
if (false) {
    /** @type {?} */
    NavBarComponent.prototype.defaultProps;
    /** @type {?} */
    NavBarComponent.prototype.navbarCls;
    /** @type {?} */
    NavBarComponent.prototype.isIconString;
    /** @type {?} */
    NavBarComponent.prototype.isLeftContentString;
    /** @type {?} */
    NavBarComponent.prototype.isRightContentString;
    /**
     * @type {?}
     * @private
     */
    NavBarComponent.prototype._icon;
    /**
     * @type {?}
     * @private
     */
    NavBarComponent.prototype._leftContent;
    /**
     * @type {?}
     * @private
     */
    NavBarComponent.prototype._rightContent;
    /** @type {?} */
    NavBarComponent.prototype.onLeftClick;
    /** @type {?} */
    NavBarComponent.prototype.amNavbar;
    /** @type {?} */
    NavBarComponent.prototype.amNavbarLight;
    /** @type {?} */
    NavBarComponent.prototype.amNavbardark;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var NavBarModule = /** @class */ (function () {
    function NavBarModule() {
    }
    NavBarModule.decorators = [
        { type: NgModule, args: [{
                    imports: [CommonModule, IconModule],
                    exports: [NavBarComponent],
                    declarations: [NavBarComponent]
                },] }
    ];
    return NavBarModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
// 同步自 'rmc-calendar/lib/locale/en_US';
var Calendar = {
    title: 'Calendar',
    today: 'Today',
    month: 'Month',
    year: 'Year',
    am: 'AM',
    pm: 'PM',
    dateTimeFormat: 'MM/dd/yyyy w hh:mm',
    dateFormat: 'yyyy/MM/dd w',
    noChoose: 'No Choose',
    week: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fir', 'Sat'],
    clear: 'Clear',
    selectTime: 'Select Time',
    selectStartTime: 'Select Start Time',
    selectEndTime: 'Select End Time',
    start: 'Start',
    end: 'End',
    begin: 'Start',
    over: 'End',
    begin_over: 'S/E',
    confirm: 'Confirm',
    monthTitle: 'yyyy/MM',
    loadPrevMonth: 'Load Prev Month',
    yesterday: 'Yesterday',
    lastWeek: 'Last Week',
    lastMonth: 'Last Month'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/** @type {?} */
var mergeDateTime = (/**
 * @param {?=} date
 * @param {?=} time
 * @return {?}
 */
function (date, time) {
    date = date || new Date();
    if (!time) {
        return date;
    }
    return new Date(date.getFullYear(), date.getMonth(), date.getDate(), time.getHours(), time.getMinutes(), time.getSeconds());
});
/** @type {?} */
var formatDate = (/**
 * @param {?} date
 * @param {?} format
 * @param {?=} locale
 * @return {?}
 */
function (date, format, locale) {
    /** @type {?} */
    var week = locale && locale.week;
    /** @type {?} */
    var o = {
        'M+': date.getMonth() + 1,
        'd+': date.getDate(),
        'h+': date.getHours(),
        'm+': date.getMinutes(),
        's+': date.getSeconds(),
        'q+': Math.floor((date.getMonth() + 3) / 3),
        'w+': week && week[date.getDay()],
        S: date.getMilliseconds()
    };
    if (/(y+)/.test(format)) {
        format = format.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
    }
    for (var k in o) {
        if (new RegExp('(' + k + ')').test(format)) {
            format = format.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length));
        }
    }
    return format;
});
/** @type {?} */
var isSameDate = (/**
 * @param {?} day_one
 * @param {?} day_two
 * @return {?}
 */
function (day_one, day_two) {
    if (!day_one || !day_two) {
        console.error('isSameDate function need two params');
        return 'need two params';
    }
    /** @type {?} */
    var compareDate = day_one.getDate() === day_two.getDate();
    /** @type {?} */
    var compareMonth = day_one.getMonth() === day_two.getMonth();
    /** @type {?} */
    var compareYear = day_one.getFullYear() === day_two.getFullYear();
    return compareDate && compareMonth && compareYear;
});

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var DateModels;
(function (DateModels) {
    var SelectType;
    (function (SelectType) {
        SelectType[SelectType["None"] = 0] = "None";
        SelectType[SelectType["Single"] = 1] = "Single";
        SelectType[SelectType["All"] = 2] = "All";
        SelectType[SelectType["Only"] = 3] = "Only";
        SelectType[SelectType["Start"] = 4] = "Start";
        SelectType[SelectType["Middle"] = 5] = "Middle";
        SelectType[SelectType["End"] = 6] = "End";
    })(SelectType = DateModels.SelectType || (DateModels.SelectType = {}));
    /**
     * @record
     */
    function Locale() { }
    DateModels.Locale = Locale;
    if (false) {
        /** @type {?} */
        Locale.prototype.title;
        /** @type {?} */
        Locale.prototype.today;
        /** @type {?} */
        Locale.prototype.month;
        /** @type {?} */
        Locale.prototype.year;
        /** @type {?} */
        Locale.prototype.am;
        /** @type {?} */
        Locale.prototype.pm;
        /** @type {?} */
        Locale.prototype.dateFormat;
        /** @type {?} */
        Locale.prototype.dateTimeFormat;
        /** @type {?} */
        Locale.prototype.noChoose;
        /** @type {?} */
        Locale.prototype.week;
        /** @type {?} */
        Locale.prototype.clear;
        /** @type {?} */
        Locale.prototype.selectTime;
        /** @type {?} */
        Locale.prototype.selectStartTime;
        /** @type {?} */
        Locale.prototype.selectEndTime;
        /** @type {?} */
        Locale.prototype.start;
        /** @type {?} */
        Locale.prototype.end;
        /** @type {?} */
        Locale.prototype.begin;
        /** @type {?} */
        Locale.prototype.over;
        /** @type {?} */
        Locale.prototype.begin_over;
        /** @type {?} */
        Locale.prototype.confirm;
        /** @type {?} */
        Locale.prototype.monthTitle;
        /** @type {?} */
        Locale.prototype.loadPrevMonth;
        /** @type {?} */
        Locale.prototype.yesterday;
        /** @type {?} */
        Locale.prototype.lastWeek;
        /** @type {?} */
        Locale.prototype.lastMonth;
    }
    /**
     * @record
     */
    function CellData() { }
    DateModels.CellData = CellData;
    if (false) {
        /** @type {?} */
        CellData.prototype.tick;
        /** @type {?} */
        CellData.prototype.dayOfMonth;
        /** @type {?} */
        CellData.prototype.selected;
        /** @type {?} */
        CellData.prototype.isFirstOfMonth;
        /** @type {?} */
        CellData.prototype.isLastOfMonth;
        /** @type {?} */
        CellData.prototype.outOfDate;
    }
    /**
     * @record
     */
    function ExtraData() { }
    DateModels.ExtraData = ExtraData;
    if (false) {
        /** @type {?|undefined} */
        ExtraData.prototype.info;
        /** @type {?|undefined} */
        ExtraData.prototype.disable;
        /** @type {?|undefined} */
        ExtraData.prototype.cellCls;
        /** @type {?|undefined} */
        ExtraData.prototype.cellRender;
    }
    /**
     * @record
     */
    function MonthData() { }
    DateModels.MonthData = MonthData;
    if (false) {
        /** @type {?} */
        MonthData.prototype.title;
        /** @type {?} */
        MonthData.prototype.firstDate;
        /** @type {?} */
        MonthData.prototype.lastDate;
        /** @type {?} */
        MonthData.prototype.weeks;
        /** @type {?|undefined} */
        MonthData.prototype.component;
        /** @type {?|undefined} */
        MonthData.prototype.height;
        /** @type {?|undefined} */
        MonthData.prototype.y;
        /** @type {?|undefined} */
        MonthData.prototype.updateLayout;
        /** @type {?|undefined} */
        MonthData.prototype.componentRef;
    }
})(DateModels || (DateModels = {}));

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @record
 */
function DatepickerStateType() { }
if (false) {
    /** @type {?} */
    DatepickerStateType.prototype.months;
}
var CalendarDatePickerBaseComponent = /** @class */ (function () {
    function CalendarDatePickerBaseComponent() {
        var _this = this;
        this.props = (/** @type {?} */ ({
            prefixCls: 'rmc-calendar',
            infinite: false,
            infiniteOpt: false,
            defaultDate: new Date(),
            initalMonths: 6,
            locale: zhCN
        }));
        this.state = {
            months: []
        };
        this.visibleMonth = [];
        this.getDateWithoutTime = (/**
         * @param {?=} date
         * @return {?}
         */
        function (date) {
            if (!date) {
                return 0;
            }
            return +new Date(date.getFullYear(), date.getMonth(), date.getDate());
        });
        this.genWeekData = (/**
         * @param {?} firstDate
         * @return {?}
         */
        function (firstDate) {
            /** @type {?} */
            var minDateTime = _this.getDateWithoutTime(_this.props.minDate);
            /** @type {?} */
            var maxDateTime = _this.getDateWithoutTime(_this.props.maxDate) || Number.POSITIVE_INFINITY;
            /** @type {?} */
            var weeks = [];
            /** @type {?} */
            var nextMonth = _this.getMonthDate(firstDate, 1).firstDate;
            /** @type {?} */
            var currentDay = firstDate;
            /** @type {?} */
            var currentWeek = [];
            weeks.push(currentWeek);
            /** @type {?} */
            var startWeekday = currentDay.getDay();
            if (startWeekday > 0) {
                for (var i = 0; i < startWeekday; i++) {
                    currentWeek.push((/** @type {?} */ ({})));
                }
            }
            while (currentDay < nextMonth) {
                if (currentWeek.length === 7) {
                    currentWeek = [];
                    weeks.push(currentWeek);
                }
                /** @type {?} */
                var dayOfMonth = currentDay.getDate();
                /** @type {?} */
                var tick = +currentDay;
                currentWeek.push({
                    tick: tick,
                    dayOfMonth: dayOfMonth,
                    selected: DateModels.SelectType.None,
                    isFirstOfMonth: dayOfMonth === 1,
                    isLastOfMonth: false,
                    outOfDate: tick < minDateTime || tick > maxDateTime
                });
                currentDay = new Date(currentDay.getTime() + 3600 * 24 * 1000);
            }
            currentWeek[currentWeek.length - 1].isLastOfMonth = true;
            return weeks;
        });
        this.selectDateRange = (/**
         * @param {?} startDate
         * @param {?=} endDate
         * @param {?=} clear
         * @return {?}
         */
        function (startDate, endDate, clear) {
            if (clear === void 0) { clear = false; }
            var _a = _this.props, getDateExtra = _a.getDateExtra, type = _a.type, onSelectHasDisableDate = _a.onSelectHasDisableDate;
            if (type === 'one') {
                endDate = undefined;
            }
            /** @type {?} */
            var time1 = _this.getDateWithoutTime(startDate);
            /** @type {?} */
            var time2 = _this.getDateWithoutTime(endDate);
            /** @type {?} */
            var startDateTick = !time2 || time1 < time2 ? time1 : time2;
            /** @type {?} */
            var endDateTick = time2 && time1 > time2 ? time1 : time2;
            /** @type {?} */
            var startMonthDate = _this.getMonthDate(new Date(startDateTick)).firstDate;
            /** @type {?} */
            var endMonthDate = endDateTick ? new Date(endDateTick) : _this.getMonthDate(new Date(startDateTick)).lastDate;
            /** @type {?} */
            var unuseable = [];
            /** @type {?} */
            var needUpdate = false;
            _this.state.months
                .filter((/**
             * @param {?} m
             * @return {?}
             */
            function (m) {
                return m.firstDate >= startMonthDate && m.firstDate <= endMonthDate;
            }))
                .forEach((/**
             * @param {?} m
             * @return {?}
             */
            function (m) {
                m.weeks.forEach((/**
                 * @param {?} w
                 * @return {?}
                 */
                function (w) {
                    return w
                        .filter((/**
                     * @param {?} d
                     * @return {?}
                     */
                    function (d) {
                        if (!endDateTick) {
                            return d.tick && _this.inDate(startDateTick, d.tick);
                        }
                        else {
                            return d.tick && d.tick >= startDateTick && d.tick <= endDateTick;
                        }
                    }))
                        .forEach((/**
                     * @param {?} d
                     * @return {?}
                     */
                    function (d) {
                        /** @type {?} */
                        var oldValue = d.selected;
                        if (clear) {
                            d.selected = DateModels.SelectType.None;
                        }
                        else {
                            /** @type {?} */
                            var info = (getDateExtra && getDateExtra(new Date(d.tick))) || {};
                            if (d.outOfDate || info.disable) {
                                unuseable.push(d.tick);
                            }
                            if (_this.inDate(startDateTick, d.tick)) {
                                if (type === 'one') {
                                    d.selected = DateModels.SelectType.Single;
                                }
                                else if (!endDateTick) {
                                    d.selected = DateModels.SelectType.Only;
                                }
                                else if (startDateTick !== endDateTick) {
                                    d.selected = DateModels.SelectType.Start;
                                }
                                else {
                                    d.selected = DateModels.SelectType.All;
                                }
                            }
                            else if (_this.inDate(endDateTick, d.tick)) {
                                d.selected = DateModels.SelectType.End;
                            }
                            else {
                                d.selected = DateModels.SelectType.Middle;
                            }
                        }
                        needUpdate = needUpdate || d.selected !== oldValue;
                    }));
                }));
                if (needUpdate && m.componentRef) {
                    m.componentRef.updateWeeks();
                }
            }));
            if (unuseable.length > 0) {
                if (onSelectHasDisableDate) {
                    onSelectHasDisableDate(unuseable.map((/**
                     * @param {?} tick
                     * @return {?}
                     */
                    function (tick) { return new Date(tick); })));
                }
                else {
                    console.warn('Unusable date. You can handle by onSelectHasDisableDate.', unuseable);
                }
            }
        });
        this.computeVisible = (/**
         * @param {?} clientHeight
         * @param {?} scrollTop
         * @return {?}
         */
        function (clientHeight, scrollTop) {
            /** @type {?} */
            var needUpdate = false;
            /** @type {?} */
            var MAX_VIEW_PORT = clientHeight * 2;
            /** @type {?} */
            var MIN_VIEW_PORT = clientHeight;
            // 大缓冲区外过滤规则
            /** @type {?} */
            var filterFunc = (/**
             * @param {?} vm
             * @return {?}
             */
            function (vm) {
                return vm.y &&
                    vm.height &&
                    (vm.y + vm.height > scrollTop - MAX_VIEW_PORT && vm.y < scrollTop + clientHeight + MAX_VIEW_PORT);
            });
            if (_this.props.infiniteOpt && _this.visibleMonth.length > 12) {
                _this.visibleMonth = _this.visibleMonth.filter(filterFunc).sort((/**
                 * @param {?} a
                 * @param {?} b
                 * @return {?}
                 */
                function (a, b) { return +a.firstDate - +b.firstDate; }));
            }
            // 当小缓冲区不满时填充
            if (_this.visibleMonth.length > 0) {
                /** @type {?} */
                var last = _this.visibleMonth[_this.visibleMonth.length - 1];
                if (last.y !== undefined && last.height && last.y + last.height < scrollTop + clientHeight + MIN_VIEW_PORT) {
                    /** @type {?} */
                    var lastIndex = _this.state.months.indexOf(last);
                    for (var i = 1; i <= 2; i++) {
                        /** @type {?} */
                        var index = lastIndex + i;
                        if (index < _this.state.months.length && _this.visibleMonth.indexOf(_this.state.months[index]) < 0) {
                            _this.visibleMonth.push(_this.state.months[index]);
                        }
                        else {
                            if (_this.canLoadNext()) {
                                _this.genMonthData(undefined, 1);
                            }
                        }
                    }
                    needUpdate = true;
                }
                /** @type {?} */
                var first = _this.visibleMonth[0];
                if (first.y !== undefined && first.height && first.y > scrollTop - MIN_VIEW_PORT) {
                    /** @type {?} */
                    var firstIndex = _this.state.months.indexOf(first);
                    for (var i = 1; i <= 2; i++) {
                        /** @type {?} */
                        var index = firstIndex - i;
                        if (index >= 0 && _this.visibleMonth.indexOf(_this.state.months[index]) < 0) {
                            _this.visibleMonth.unshift(_this.state.months[index]);
                            needUpdate = true;
                        }
                    }
                }
            }
            else if (_this.state.months.length > 0) {
                _this.visibleMonth = _this.state.months.filter(filterFunc);
                needUpdate = true;
            }
            return needUpdate;
        });
        this.createOnScroll = (/**
         * @return {?}
         */
        function () {
            // let timer: any;
            /** @type {?} */
            var clientHeight = 0;
            /** @type {?} */
            var scrollTop = 0;
            return (/**
             * @param {?} data
             * @return {?}
             */
            function (data) {
                var client = data.client, top = data.top;
                clientHeight = client;
                scrollTop = top;
                _this.computeVisible(clientHeight, scrollTop);
                // 以上方法目前无问题,如果后续有性能问题,改用如下方法,但以下方法会导致刷新稍微延迟现象
                // if (timer) {
                //   return;
                // }
                //
                // timer = setTimeout(() => {
                //   timer = undefined;
                //
                //   if (this.computeVisible(clientHeight, scrollTop)) {
                //     console.log('update dom');
                //   }
                // }, 50);
            });
        });
        this.baseOnCellClick = (/**
         * @param {?} day
         * @return {?}
         */
        function (day) {
            if (!day.tick) {
                return;
            }
            if (_this.props.onCellClick) {
                _this.props.onCellClick(new Date(day.tick));
            }
        });
    }
    /**
     * @return {?}
     */
    CalendarDatePickerBaseComponent.prototype.init = /**
     * @return {?}
     */
    function () {
        var _a = this.props, _b = _a.initalMonths, initalMonths = _b === void 0 ? 6 : _b, defaultDate = _a.defaultDate;
        for (var i = 0; i < initalMonths; i++) {
            if (this.canLoadNext()) {
                this.genMonthData(defaultDate, i);
            }
        }
        this.visibleMonth = __spread(this.state.months);
    };
    /**
     * @param {?} oldValue
     * @param {?} newValue
     * @return {?}
     */
    CalendarDatePickerBaseComponent.prototype.receiveProps = /**
     * @param {?} oldValue
     * @param {?} newValue
     * @return {?}
     */
    function (oldValue, newValue) {
        if (oldValue && newValue) {
            if (oldValue.startDate !== newValue.startDate || oldValue.endDate !== newValue.endDate) {
                if (oldValue.startDate) {
                    this.selectDateRange(oldValue.startDate, oldValue.endDate, true);
                }
                if (newValue.startDate) {
                    this.selectDateRange(newValue.startDate, newValue.endDate);
                }
            }
        }
    };
    /**
     * @param {?=} date
     * @param {?=} addMonth
     * @return {?}
     */
    CalendarDatePickerBaseComponent.prototype.getMonthDate = /**
     * @param {?=} date
     * @param {?=} addMonth
     * @return {?}
     */
    function (date, addMonth) {
        if (date === void 0) { date = new Date(); }
        if (addMonth === void 0) { addMonth = 0; }
        /** @type {?} */
        var y = date.getFullYear();
        /** @type {?} */
        var m = date.getMonth();
        return {
            firstDate: new Date(y, m + addMonth, 1),
            lastDate: new Date(y, m + 1 + addMonth, 0)
        };
    };
    /**
     * @return {?}
     */
    CalendarDatePickerBaseComponent.prototype.canLoadPrev = /**
     * @return {?}
     */
    function () {
        var minDate = this.props.minDate;
        return (!minDate ||
            this.state.months.length <= 0 ||
            +this.getMonthDate(minDate).firstDate < +this.state.months[0].firstDate);
    };
    /**
     * @return {?}
     */
    CalendarDatePickerBaseComponent.prototype.canLoadNext = /**
     * @return {?}
     */
    function () {
        var maxDate = this.props.maxDate;
        return (!maxDate ||
            this.state.months.length <= 0 ||
            +this.getMonthDate(maxDate).firstDate > +this.state.months[this.state.months.length - 1].firstDate);
    };
    /**
     * @param {?=} date
     * @param {?=} addMonth
     * @return {?}
     */
    CalendarDatePickerBaseComponent.prototype.genMonthData = /**
     * @param {?=} date
     * @param {?=} addMonth
     * @return {?}
     */
    function (date, addMonth) {
        if (addMonth === void 0) { addMonth = 0; }
        if (!date) {
            date = addMonth >= 0 ? this.state.months[this.state.months.length - 1].firstDate : this.state.months[0].firstDate;
        }
        if (!date) {
            date = new Date();
        }
        var locale = this.props.locale;
        var _a = this.getMonthDate(date, addMonth), firstDate = _a.firstDate, lastDate = _a.lastDate;
        /** @type {?} */
        var weeks = this.genWeekData(firstDate);
        /** @type {?} */
        var title = formatDate(firstDate, locale ? locale.monthTitle : 'yyyy/MM', this.props.locale);
        /** @type {?} */
        var data = (/** @type {?} */ ({
            title: title,
            firstDate: firstDate,
            lastDate: lastDate,
            weeks: weeks
        }));
        data.component = this.genMonthComponent(data);
        if (addMonth >= 0) {
            this.state.months.push(data);
        }
        else {
            this.state.months.unshift(data);
        }
        var _b = this.props, startDate = _b.startDate, endDate = _b.endDate;
        if (startDate) {
            this.selectDateRange(startDate, endDate);
        }
        return data;
    };
    /**
     * @param {?} date
     * @param {?} tick
     * @return {?}
     */
    CalendarDatePickerBaseComponent.prototype.inDate = /**
     * @param {?} date
     * @param {?} tick
     * @return {?}
     */
    function (date, tick) {
        return date <= tick && tick < date + 24 * 3600000;
    };
    return CalendarDatePickerBaseComponent;
}());
if (false) {
    /** @type {?} */
    CalendarDatePickerBaseComponent.prototype.props;
    /** @type {?} */
    CalendarDatePickerBaseComponent.prototype.state;
    /** @type {?} */
    CalendarDatePickerBaseComponent.prototype.visibleMonth;
    /** @type {?} */
    CalendarDatePickerBaseComponent.prototype.genMonthComponent;
    /** @type {?} */
    CalendarDatePickerBaseComponent.prototype.getDateWithoutTime;
    /** @type {?} */
    CalendarDatePickerBaseComponent.prototype.genWeekData;
    /** @type {?} */
    CalendarDatePickerBaseComponent.prototype.selectDateRange;
    /** @type {?} */
    CalendarDatePickerBaseComponent.prototype.computeVisible;
    /** @type {?} */
    CalendarDatePickerBaseComponent.prototype.createOnScroll;
    /** @type {?} */
    CalendarDatePickerBaseComponent.prototype.baseOnCellClick;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var CalendarDatePickerComponent = /** @class */ (function (_super) {
    __extends(CalendarDatePickerComponent, _super);
    function CalendarDatePickerComponent() {
        var _this = _super.call(this) || this;
        _this.transform = '';
        _this._initDelta = 0;
        _this._lastY = 0;
        _this._delta = _this._initDelta;
        _this.amCalendar = true;
        _this.datePicker = true;
        _this.genMonthComponent = (/**
         * @param {?=} data
         * @return {?}
         */
        function (data) {
            if (!data) {
                return;
            }
            return {
                monthData: data,
                locale: _this.props.locale,
                rowSize: _this.props.rowSize,
                onCellClick: _this.baseOnCellClick,
                getDateExtra: _this.props.getDateExtra,
                ref: (/**
                 * @param {?} dom
                 * @return {?}
                 */
                function (dom) {
                    data.componentRef = dom || data.componentRef || undefined;
                    data.updateLayout = (/**
                     * @return {?}
                     */
                    function () {
                        _this.computeHeight(data, dom);
                    });
                    data.updateLayout();
                })
            };
        });
        _this.computeHeight = (/**
         * @param {?} data
         * @param {?} singleMonth
         * @return {?}
         */
        function (data, singleMonth) {
            if (singleMonth && singleMonth.wrapperDivDOM) {
                if (!data.height && !singleMonth.wrapperDivDOM.clientHeight) {
                    setTimeout((/**
                     * @return {?}
                     */
                    function () { return _this.computeHeight(data, singleMonth); }), 500);
                    return;
                }
                data.height = singleMonth.wrapperDivDOM.clientHeight || data.height || 0;
                data.y = singleMonth.wrapperDivDOM.offsetTop || data.y || 0;
            }
        });
        _this.setLayout = (/**
         * @param {?} dom
         * @return {?}
         */
        function (dom) {
            if (dom) {
                var onLayout = _this.props.onLayout;
                if (onLayout) {
                    onLayout(dom.clientHeight);
                }
                /** @type {?} */
                var scrollHandler_1 = _this.createOnScroll();
                dom.onscroll = (/**
                 * @param {?} evt
                 * @return {?}
                 */
                function (evt) {
                    scrollHandler_1({
                        client: dom.clientHeight,
                        full: ((/** @type {?} */ (evt.currentTarget))).clientHeight,
                        top: ((/** @type {?} */ (evt.currentTarget))).scrollTop
                    });
                });
            }
        });
        _this.setPanel = (/**
         * @param {?} dom
         * @return {?}
         */
        function (dom) {
            _this._panel = dom;
        });
        return _this;
    }
    Object.defineProperty(CalendarDatePickerComponent.prototype, "onCellClick", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.props.onCellClick = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CalendarDatePickerComponent.prototype, "endDate", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            /** @type {?} */
            var oldProps = Object.assign({}, this.props);
            this.props.endDate = value;
            this.receiveProps(oldProps, this.props);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CalendarDatePickerComponent.prototype, "startDate", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            /** @type {?} */
            var oldProps = Object.assign({}, this.props);
            this.props.startDate = value;
            this.receiveProps(oldProps, this.props);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CalendarDatePickerComponent.prototype, "propsData", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.props = __assign({}, this.props, value);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CalendarDatePickerComponent.prototype, "onSelectHasDisableDate", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.props.onSelectHasDisableDate = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CalendarDatePickerComponent.prototype, "onLayout", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.props.onLayout = value;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @param {?} event
     * @return {?}
     */
    CalendarDatePickerComponent.prototype.onTouchStart = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        this._lastY = event.touches[0].screenY || event.touches[0].pageY;
        this._delta = this._initDelta;
    };
    /**
     * @param {?} event
     * @return {?}
     */
    CalendarDatePickerComponent.prototype.onTouchMove = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        /** @type {?} */
        var ele = event.currentTarget;
        /** @type {?} */
        var isReachTop = ele.scrollTop === 0;
        if (isReachTop) {
            this._delta = (event.touches[0].screenY || event.touches[0].pageY) - this._lastY;
            if (this._delta > 0) {
                event.preventDefault();
                if (this._delta > 80) {
                    this._delta = 80;
                }
            }
            else {
                this._delta = 0;
            }
            this.setTransform(this._panel.style, "translate3d(0," + this._delta + "px,0)");
        }
    };
    /**
     * @param {?} event
     * @return {?}
     */
    CalendarDatePickerComponent.prototype.onTouchEnd = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        this.onFinish();
    };
    /**
     * @return {?}
     */
    CalendarDatePickerComponent.prototype.onFinish = /**
     * @return {?}
     */
    function () {
        var _this = this;
        if (this._delta > 40 && this.canLoadPrev()) {
            this.genMonthData(this.state.months[0].firstDate, -1);
            this.visibleMonth = this.state.months.slice(0, this.props.initalMonths);
            this.state.months.forEach((/**
             * @param {?} m
             * @return {?}
             */
            function (m) {
                if (m.updateLayout) {
                    m.updateLayout();
                }
            }));
        }
        this.setTransform(this._panel.style, "translate3d(0,0,0)");
        this.setTransition(this._panel.style, '.3s');
        setTimeout((/**
         * @return {?}
         */
        function () {
            if (_this._panel) {
                _this.setTransition(_this._panel.style, '');
            }
        }), 300);
    };
    /**
     * @param {?} nodeStyle
     * @param {?} value
     * @return {?}
     */
    CalendarDatePickerComponent.prototype.setTransform = /**
     * @param {?} nodeStyle
     * @param {?} value
     * @return {?}
     */
    function (nodeStyle, value) {
        this.transform = value;
        nodeStyle.transform = value;
        nodeStyle.webkitTransform = value;
    };
    /**
     * @param {?} nodeStyle
     * @param {?} value
     * @return {?}
     */
    CalendarDatePickerComponent.prototype.setTransition = /**
     * @param {?} nodeStyle
     * @param {?} value
     * @return {?}
     */
    function (nodeStyle, value) {
        nodeStyle.transition = value;
        nodeStyle.webkitTransition = value;
    };
    /**
     * @return {?}
     */
    CalendarDatePickerComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        this.init();
        this.setLayout(this.layoutDom.nativeElement);
        this.setPanel(this.panelDom.nativeElement);
    };
    CalendarDatePickerComponent.decorators = [
        { type: Component, args: [{
                    selector: 'CalendarDatePicker, nzm-calendar-date-picker',
                    template: "<CalendarWeekPanel [locale]=\"props.locale\"></CalendarWeekPanel>\n<div\n  #layout\n  class=\"wrapper\"\n  style=\"overflow-x:hidden;overflow-y:visible;-webkit-overflow-scrolling:touch;\"\n  (touchstart)=\"onTouchStart($event)\"\n  (touchmove)=\"onTouchMove($event)\"\n  (touchend)=\"onTouchEnd($event)\"\n>\n  <div #panel [ngStyle]=\"{ transform: transform }\">\n    <div *ngIf=\"canLoadPrev()\" class=\"load-tip\">{{ props.locale.loadPrevMonth }}</div>\n    <div class=\"months\">\n      <CalendarSingleMonth\n        *ngFor=\"let item of visibleMonth; let i = index\"\n        style=\"display: block;\"\n        [data]=\"item.component\"\n      ></CalendarSingleMonth>\n    </div>\n  </div>\n</div>\n",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    /** @nocollapse */
    CalendarDatePickerComponent.ctorParameters = function () { return []; };
    CalendarDatePickerComponent.propDecorators = {
        layoutDom: [{ type: ViewChild, args: ['layout', { static: true },] }],
        panelDom: [{ type: ViewChild, args: ['panel', { static: true },] }],
        onCellClick: [{ type: Input }],
        endDate: [{ type: Input }],
        startDate: [{ type: Input }],
        propsData: [{ type: Input }],
        onSelectHasDisableDate: [{ type: Input }],
        onLayout: [{ type: Input }],
        amCalendar: [{ type: HostBinding, args: ['class.am-calendar',] }],
        datePicker: [{ type: HostBinding, args: ['class.date-picker',] }]
    };
    return CalendarDatePickerComponent;
}(CalendarDatePickerBaseComponent));
if (false) {
    /** @type {?} */
    CalendarDatePickerComponent.prototype.transform;
    /**
     * @type {?}
     * @private
     */
    CalendarDatePickerComponent.prototype._panel;
    /**
     * @type {?}
     * @private
     */
    CalendarDatePickerComponent.prototype._initDelta;
    /**
     * @type {?}
     * @private
     */
    CalendarDatePickerComponent.prototype._lastY;
    /**
     * @type {?}
     * @private
     */
    CalendarDatePickerComponent.prototype._delta;
    /** @type {?} */
    CalendarDatePickerComponent.prototype.layoutDom;
    /** @type {?} */
    CalendarDatePickerComponent.prototype.panelDom;
    /** @type {?} */
    CalendarDatePickerComponent.prototype.amCalendar;
    /** @type {?} */
    CalendarDatePickerComponent.prototype.datePicker;
    /** @type {?} */
    CalendarDatePickerComponent.prototype.genMonthComponent;
    /** @type {?} */
    CalendarDatePickerComponent.prototype.computeHeight;
    /** @type {?} */
    CalendarDatePickerComponent.prototype.setLayout;
    /** @type {?} */
    CalendarDatePickerComponent.prototype.setPanel;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @record
 */
function CalendarStateType() { }
if (false) {
    /** @type {?} */
    CalendarStateType.prototype.showTimePicker;
    /** @type {?|undefined} */
    CalendarStateType.prototype.timePickerTitle;
    /** @type {?|undefined} */
    CalendarStateType.prototype.startDate;
    /** @type {?|undefined} */
    CalendarStateType.prototype.endDate;
    /** @type {?|undefined} */
    CalendarStateType.prototype.disConfirmBtn;
    /** @type {?|undefined} */
    CalendarStateType.prototype.clientHight;
}
var CalendarComponent = /** @class */ (function () {
    function CalendarComponent(_localeProviderService) {
        var _this = this;
        this._localeProviderService = _localeProviderService;
        this.isShow = false;
        this.showClear = false;
        this.isSameDate = isSameDate;
        this.props = (/** @type {?} */ ({
            visible: false,
            showHeader: true,
            locale: zhCN,
            pickTime: false,
            showShortcut: false,
            prefixCls: 'rmc-calendar',
            type: 'range',
            defaultTimeValue: new Date(2000, 0, 1, 8)
        }));
        this.state = (/** @type {?} */ ({
            showTimePicker: false,
            timePickerTitle: '',
            startDate: undefined,
            endDate: undefined,
            disConfirmBtn: true,
            clientHight: 0
        }));
        this._unsubscribe$ = new Subject();
        this._dateModelTime = 0;
        this.onCancel = new EventEmitter();
        this.onConfirm = new EventEmitter();
        this.onSelectHasDisableDate = new EventEmitter();
        this.class = 'am-calendar';
        this.selectDate = (/**
         * @param {?} date
         * @param {?=} useDateTime
         * @param {?=} oldState
         * @param {?=} props
         * @return {?}
         */
        function (date, useDateTime, oldState, props) {
            if (useDateTime === void 0) { useDateTime = false; }
            if (oldState === void 0) { oldState = {}; }
            if (props === void 0) { props = _this.props; }
            if (!date) {
                return (/** @type {?} */ ({}));
            }
            /** @type {?} */
            var newState = (/** @type {?} */ ({}));
            var type = props.type, pickTime = props.pickTime, defaultTimeValue = props.defaultTimeValue, _a = props.locale, locale = _a === void 0 ? (/** @type {?} */ ({})) : _a;
            /** @type {?} */
            var newDate = pickTime && !useDateTime ? mergeDateTime(date, defaultTimeValue) : date;
            var startDate = oldState.startDate, endDate = oldState.endDate;
            switch (type) {
                case 'one':
                    newState = __assign({}, newState, { startDate: newDate, disConfirmBtn: false });
                    if (pickTime) {
                        newState = __assign({}, newState, { timePickerTitle: locale.selectTime, showTimePicker: true });
                    }
                    break;
                case 'range':
                    if (!startDate || endDate) {
                        newState = __assign({}, newState, { startDate: newDate, endDate: undefined, disConfirmBtn: true });
                        if (pickTime) {
                            newState = __assign({}, newState, { timePickerTitle: locale.selectStartTime, showTimePicker: true });
                        }
                    }
                    else {
                        newState = __assign({}, newState, { timePickerTitle: +newDate >= +startDate || _this.isSameDate(startDate, newDate)
                                ? locale.selectEndTime
                                : locale.selectStartTime, disConfirmBtn: false, endDate: pickTime && !useDateTime && (+newDate >= +startDate || _this.isSameDate(startDate, newDate))
                                ? new Date(+mergeDateTime(newDate, startDate) + 3600000)
                                : newDate });
                    }
                    break;
            }
            _this.writeModelData(date);
            return newState;
        });
        this.onSelectedDate = (/**
         * @param {?} date
         * @return {?}
         */
        function (date) {
            var _a = _this.state, startDate = _a.startDate, endDate = _a.endDate;
            var onSelect = _this.props.onSelect;
            if (onSelect) {
                /** @type {?} */
                var value = onSelect(date, [startDate, endDate]);
                if (value) {
                    _this.shortcutSelect(value[0], value[1]);
                    return;
                }
            }
            _this.state = __assign({}, _this.state, _this.selectDate(date, false, { startDate: startDate, endDate: endDate }));
            _this.showClear = !!_this.state.startDate;
        });
        this.triggerSelectHasDisableDate = (/**
         * @param {?} date
         * @return {?}
         */
        function (date) {
            _this.triggerClear();
            if (_this.onSelectHasDisableDate) {
                _this.onSelectHasDisableDate.emit(date);
            }
        });
        this.onClose = (/**
         * @return {?}
         */
        function () {
            _this.state = (/** @type {?} */ ({
                showTimePicker: false,
                timePickerTitle: '',
                startDate: undefined,
                endDate: undefined,
                disConfirmBtn: true,
                clientHight: 0
            }));
            _this.showClear = !!_this.state.startDate;
        });
        this.triggerConfirm = (/**
         * @return {?}
         */
        function () {
            var _a = _this.state, startDate = _a.startDate, endDate = _a.endDate;
            if (startDate && endDate && +startDate > +endDate) {
                _this.onClose();
                return _this.onConfirm && _this.onConfirm.emit({ startDate: endDate, endDate: startDate });
            }
            if (_this.onConfirm) {
                _this.onConfirm.emit({ startDate: startDate, endDate: endDate });
            }
            _this.onClose();
        });
        this.triggerClear = (/**
         * @return {?}
         */
        function () {
            // 清除数据做延迟,否则同步刷新数据导致报错
            setTimeout((/**
             * @return {?}
             */
            function () {
                _this.state = __assign({}, _this.state, { startDate: undefined, endDate: undefined, showTimePicker: false });
                if (_this.props.onClear) {
                    _this.props.onClear();
                }
                _this.showClear = !!_this.state.startDate;
            }), 0);
        });
        this.onTimeChange = (/**
         * @param {?} date
         * @return {?}
         */
        function (date) {
            var _a = _this.state, startDate = _a.startDate, endDate = _a.endDate;
            if (endDate) {
                _this.state.endDate = date;
            }
            else if (startDate) {
                _this.state.startDate = date;
            }
        });
        this.shortcutSelect = (/**
         * @param {?} startDate
         * @param {?} endDate
         * @param {?=} props
         * @return {?}
         */
        function (startDate, endDate, props) {
            if (props === void 0) { props = _this.props; }
            _this.state = __assign({}, _this.state, { startDate: startDate, showTimePicker: false }, _this.selectDate(endDate, true, { startDate: startDate }, props));
            _this.showClear = !!_this.state.startDate;
        });
        this.setClientHeight = (/**
         * @param {?} height
         * @return {?}
         */
        function (height) {
            _this.state.clientHight = height;
        });
        this.onChangeFn = (/**
         * @return {?}
         */
        function () { });
        this.onTouchFn = (/**
         * @return {?}
         */
        function () { });
    }
    Object.defineProperty(CalendarComponent.prototype, "locale", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (value === 'enUS') {
                this.props.locale = Calendar;
            }
            else if (value === 'zhCN') {
                this.props.locale = zhCN;
            }
            this._unsubscribe$.next();
            this._unsubscribe$.complete();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CalendarComponent.prototype, "defaultTimeValue", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (value) {
                this.props.defaultTimeValue = value;
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CalendarComponent.prototype, "prefixCls", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (value) {
                this.props.prefixCls = value;
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CalendarComponent.prototype, "enterDirection", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._enterDirection = value;
            if (this._enterDirection === 'horizontal') {
                this.contentAnimateClass = 'slideH-enter slideH-enter-active';
            }
            else {
                this.contentAnimateClass = 'slideV-enter slideV-enter-active';
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CalendarComponent.prototype, "visible", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            var _this = this;
            this.props.visible = value;
            if (value === true || value === 'true') {
                this.showAnimation();
                this.isShow = true;
            }
            else {
                this.hideAnimation();
                setTimeout((/**
                 * @return {?}
                 */
                function () {
                    _this.isShow = false;
                }), 300);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CalendarComponent.prototype, "getDateExtra", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.props.getDateExtra = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CalendarComponent.prototype, "defaultDate", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.props.defaultDate = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CalendarComponent.prototype, "minDate", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.props.minDate = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CalendarComponent.prototype, "maxDate", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.props.maxDate = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CalendarComponent.prototype, "pickTime", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.props.pickTime = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CalendarComponent.prototype, "type", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.props.type = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CalendarComponent.prototype, "showShortcut", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.props.showShortcut = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CalendarComponent.prototype, "rowSize", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.props.rowSize = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CalendarComponent.prototype, "infinite", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) { },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CalendarComponent.prototype, "defaultValue", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.props.defaultValue = value;
            if (value) {
                this.receiveProps(this.props);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CalendarComponent.prototype, "onSelect", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.props.onSelect = value;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @param {?} value
     * @return {?}
     */
    CalendarComponent.prototype.writeValue = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        this._dateModelType = null;
        if (value && value instanceof Array) {
            if (value.length === 0) {
                console.error('[ng-zorro-antd-mobile]: calendar ngModel array need params!');
                return;
            }
            if (this.props.type === 'one' && value.length >= 2) {
                this._dateModelType = 1;
                console.error('[ng-zorro-antd-mobile]: type is one, but ngmodel has more than one param, just use first one');
                this.onSelectedDate(value[0]);
            }
            else if (value.length === 1) {
                this._dateModelType = 1;
                this.onSelectedDate(value[0]);
            }
            else {
                this._dateModelType = 2;
                this.onSelectedDate(value[0]);
                this.onSelectedDate(value[1]);
            }
        }
        else if (value && value instanceof Date) {
            this._dateModelType = 3;
            this.onSelectedDate(value);
        }
    };
    /**
     * @param {?} fn
     * @return {?}
     */
    CalendarComponent.prototype.registerOnChange = /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) {
        this.onChangeFn = fn;
    };
    /**
     * @param {?} fn
     * @return {?}
     */
    CalendarComponent.prototype.registerOnTouched = /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) {
        this.onTouchFn = fn;
    };
    /**
     * @param {?} nextProps
     * @return {?}
     */
    CalendarComponent.prototype.receiveProps = /**
     * @param {?} nextProps
     * @return {?}
     */
    function (nextProps) {
        if (nextProps.visible && nextProps.defaultValue) {
            this.shortcutSelect(nextProps.defaultValue[0], nextProps.defaultValue[1], nextProps);
        }
    };
    /**
     * @return {?}
     */
    CalendarComponent.prototype.showAnimation = /**
     * @return {?}
     */
    function () {
        if (this._enterDirection === 'horizontal') {
            this.contentAnimateClass = 'slideH-enter slideH-enter-active';
        }
        else {
            this.contentAnimateClass = 'slideV-enter slideV-enter-active';
        }
        this.maskAnimateClass = 'fade-enter fade-enter-active';
    };
    /**
     * @return {?}
     */
    CalendarComponent.prototype.hideAnimation = /**
     * @return {?}
     */
    function () {
        if (this._enterDirection === 'horizontal') {
            this.contentAnimateClass = 'slideH-leave slideH-leave-active';
        }
        else {
            this.contentAnimateClass = 'slideV-leave slideV-leave-active';
        }
        this.maskAnimateClass = 'fade-leave fade-leave-active';
    };
    /**
     * @param {?} date
     * @return {?}
     */
    CalendarComponent.prototype.writeModelData = /**
     * @param {?} date
     * @return {?}
     */
    function (date) {
        if (this._dateModelValue instanceof Array) {
            this._dateModelTime = this._dateModelValue.length;
        }
        else {
            this._dateModelTime = 0;
        }
        switch (this._dateModelType) {
            case 1:
                this._dateModelValue = [date];
                this.onChangeFn(this._dateModelValue);
                break;
            case 2:
                if (this._dateModelTime === 1) {
                    if (+date < +this._dateModelValue[0]) {
                        this._dateModelValue.unshift(date);
                    }
                    else {
                        this._dateModelValue.push(date);
                    }
                    this.onChangeFn(this._dateModelValue);
                }
                else {
                    this._dateModelValue = [];
                    this._dateModelValue.push(date);
                }
                break;
            case 3:
                this._dateModelValue = date;
                this.onChangeFn(this._dateModelValue);
                break;
            default:
                break;
        }
    };
    /**
     * @return {?}
     */
    CalendarComponent.prototype.triggerCancel = /**
     * @return {?}
     */
    function () {
        if (this.props.onCancel) {
            this.props.onCancel();
        }
        this.onClose();
        if (this.onCancel) {
            this.onCancel.emit();
        }
    };
    /**
     * @return {?}
     */
    CalendarComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        var _this = this;
        /** @type {?} */
        var defaultValue = this.props.defaultValue;
        if (defaultValue) {
            this.state = __assign({}, this.state, this.selectDate(defaultValue[1], true, { startDate: defaultValue[0] }, this.props));
        }
        this._localeProviderService.localeChange.pipe(takeUntil(this._unsubscribe$)).subscribe((/**
         * @param {?} _
         * @return {?}
         */
        function (_) {
            _this.props.locale = (/** @type {?} */ (__assign({}, _this._localeProviderService.getLocaleSubObj('Calendar'))));
        }));
    };
    /**
     * @return {?}
     */
    CalendarComponent.prototype.ngOnDestroy = /**
     * @return {?}
     */
    function () {
        this._unsubscribe$.next();
        this._unsubscribe$.complete();
    };
    CalendarComponent.decorators = [
        { type: Component, args: [{
                    selector: 'Calendar, nzm-calendar',
                    template: "<span *ngIf=\"isShow\">\n  <div class=\"{{ 'mask ' + maskAnimateClass }}\"></div>\n</span>\n<span *ngIf=\"isShow\">\n  <div class=\"{{ 'content animate ' + contentAnimateClass }}\">\n    <CalendarHeader\n      [locale]=\"props.locale\"\n      [closeIcon]=\"closeIconHtml\"\n      [showClear]=\"showClear\"\n      (onCancel)=\"triggerCancel()\"\n      (onClear)=\"triggerClear()\"\n    ></CalendarHeader>\n    <CalendarDatePicker\n      [propsData]=\"props\"\n      [endDate]=\"state.endDate\"\n      [startDate]=\"state.startDate\"\n      [onCellClick]=\"onSelectedDate\"\n      [onSelectHasDisableDate]=\"triggerSelectHasDisableDate\"\n      [onLayout]=\"setClientHeight\"\n    ></CalendarDatePicker>\n    <CalendarTimePicker\n      *ngIf=\"state.showTimePicker\"\n      [propsData]=\"props\"\n      [title]=\"state.timePickerTitle\"\n      [clientHeight]=\"state.clientHight\"\n      [prefixCls]=\"props.timePickerPrefixCls\"\n      [defaultValue]=\"props.defaultTimeValue\"\n      [pickerPrefixCls]=\"props.timePickerPickerPrefixCls\"\n      [value]=\"state.endDate ? state.endDate : state.startDate\"\n      [onValueChange]=\"onTimeChange\"\n    ></CalendarTimePicker>\n    <CalendarShortcutPanel\n      *ngIf=\"props.showShortcut && !state.showTimePicker\"\n      [locale]=\"props.locale\"\n      [onSelect]=\"shortcutSelect\"\n    ></CalendarShortcutPanel>\n    <CalendarConfirmPanel\n      *ngIf=\"state.startDate\"\n      [startDateTime]=\"state.startDate\"\n      [endDateTime]=\"state.endDate\"\n      [propsData]=\"props\"\n      [disableBtn]=\"state.disConfirmBtn\"\n      [formatStr]=\"props.pickTime ? props.locale.dateTimeFormat : props.locale.dateFormat\"\n      [onConfirm]=\"triggerConfirm\"\n    ></CalendarConfirmPanel>\n  </div>\n</span>\n<ng-template #closeIconHtml>\n  <Icon [type]=\"'cross'\"></Icon>\n</ng-template>\n",
                    encapsulation: ViewEncapsulation.None,
                    providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef((/**
                             * @return {?}
                             */
                            function () { return CalendarComponent; })), multi: true }]
                }] }
    ];
    /** @nocollapse */
    CalendarComponent.ctorParameters = function () { return [
        { type: LocaleProviderService }
    ]; };
    CalendarComponent.propDecorators = {
        datepicker: [{ type: ViewChild, args: [CalendarDatePickerComponent, { static: false },] }],
        locale: [{ type: Input }],
        defaultTimeValue: [{ type: Input }],
        prefixCls: [{ type: Input }],
        enterDirection: [{ type: Input }],
        visible: [{ type: Input }],
        getDateExtra: [{ type: Input }],
        defaultDate: [{ type: Input }],
        minDate: [{ type: Input }],
        maxDate: [{ type: Input }],
        pickTime: [{ type: Input }],
        type: [{ type: Input }],
        showShortcut: [{ type: Input }],
        rowSize: [{ type: Input }],
        infinite: [{ type: Input }],
        defaultValue: [{ type: Input }],
        onSelect: [{ type: Input }],
        onCancel: [{ type: Output }],
        onConfirm: [{ type: Output }],
        onSelectHasDisableDate: [{ type: Output }],
        class: [{ type: HostBinding, args: ['class',] }]
    };
    return CalendarComponent;
}());
if (false) {
    /** @type {?} */
    CalendarComponent.prototype.isShow;
    /** @type {?} */
    CalendarComponent.prototype.contentAnimateClass;
    /** @type {?} */
    CalendarComponent.prototype.maskAnimateClass;
    /** @type {?} */
    CalendarComponent.prototype.showClear;
    /** @type {?} */
    CalendarComponent.prototype.isSameDate;
    /** @type {?} */
    CalendarComponent.prototype.props;
    /** @type {?} */
    CalendarComponent.prototype.state;
    /**
     * @type {?}
     * @private
     */
    CalendarComponent.prototype._unsubscribe$;
    /**
     * @type {?}
     * @private
     */
    CalendarComponent.prototype._enterDirection;
    /**
     * @type {?}
     * @private
     */
    CalendarComponent.prototype._dateModelType;
    /**
     * @type {?}
     * @private
     */
    CalendarComponent.prototype._dateModelValue;
    /**
     * @type {?}
     * @private
     */
    CalendarComponent.prototype._dateModelTime;
    /** @type {?} */
    CalendarComponent.prototype.datepicker;
    /** @type {?} */
    CalendarComponent.prototype.onCancel;
    /** @type {?} */
    CalendarComponent.prototype.onConfirm;
    /** @type {?} */
    CalendarComponent.prototype.onSelectHasDisableDate;
    /** @type {?} */
    CalendarComponent.prototype.class;
    /** @type {?} */
    CalendarComponent.prototype.selectDate;
    /** @type {?} */
    CalendarComponent.prototype.onSelectedDate;
    /** @type {?} */
    CalendarComponent.prototype.triggerSelectHasDisableDate;
    /** @type {?} */
    CalendarComponent.prototype.onClose;
    /** @type {?} */
    CalendarComponent.prototype.triggerConfirm;
    /** @type {?} */
    CalendarComponent.prototype.triggerClear;
    /** @type {?} */
    CalendarComponent.prototype.onTimeChange;
    /** @type {?} */
    CalendarComponent.prototype.shortcutSelect;
    /** @type {?} */
    CalendarComponent.prototype.setClientHeight;
    /**
     * @type {?}
     * @private
     */
    CalendarComponent.prototype.onChangeFn;
    /**
     * @type {?}
     * @private
     */
    CalendarComponent.prototype.onTouchFn;
    /**
     * @type {?}
     * @private
     */
    CalendarComponent.prototype._localeProviderService;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var CalendarHeaderComponent = /** @class */ (function () {
    function CalendarHeaderComponent() {
        this.closeIcon_component = false;
        this._closeIcon = 'X';
        this.onCancel = new EventEmitter();
        this.onClear = new EventEmitter();
        this.header = true;
    }
    Object.defineProperty(CalendarHeaderComponent.prototype, "locale", {
        get: /**
         * @return {?}
         */
        function () {
            return this._locale;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._locale = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CalendarHeaderComponent.prototype, "closeIcon", {
        get: /**
         * @return {?}
         */
        function () {
            return this._closeIcon;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (value instanceof TemplateRef) {
                this._closeIcon = value;
                this.closeIcon_component = true;
            }
            else {
                this._closeIcon = (/** @type {?} */ (value));
                this.closeIcon_component = false;
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CalendarHeaderComponent.prototype, "showClear", {
        get: /**
         * @return {?}
         */
        function () {
            return this._showClear;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._showClear = value;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @return {?}
     */
    CalendarHeaderComponent.prototype.triggerCancel = /**
     * @return {?}
     */
    function () {
        if (this.onCancel) {
            this.onCancel.emit();
        }
    };
    /**
     * @return {?}
     */
    CalendarHeaderComponent.prototype.triggerClear = /**
     * @return {?}
     */
    function () {
        if (this.onClear) {
            this.onClear.emit();
        }
    };
    CalendarHeaderComponent.decorators = [
        { type: Component, args: [{
                    selector: 'CalendarHeader, nzm-calendar-header',
                    template: "<span *ngIf=\"!closeIcon_component\" class=\"left\" (click)=\"triggerCancel()\" [innerHTML]=\"closeIcon\"></span>\n<span *ngIf=\"closeIcon_component\" class=\"left\" (click)=\"triggerCancel()\">\n  <ng-template [ngTemplateOutlet]=\"closeIcon\"></ng-template>\n</span>\n<span class=\"title\">{{ title || locale.title }}</span>\n<span *ngIf=\"showClear\" class=\"right\" (click)=\"triggerClear()\">{{ clearIcon || locale.clear }}</span>\n",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    /** @nocollapse */
    CalendarHeaderComponent.ctorParameters = function () { return []; };
    CalendarHeaderComponent.propDecorators = {
        locale: [{ type: Input }],
        closeIcon: [{ type: Input }],
        showClear: [{ type: Input }],
        onCancel: [{ type: Output }],
        onClear: [{ type: Output }],
        header: [{ type: HostBinding, args: ['class.header',] }]
    };
    return CalendarHeaderComponent;
}());
if (false) {
    /** @type {?} */
    CalendarHeaderComponent.prototype.title;
    /** @type {?} */
    CalendarHeaderComponent.prototype.closeIcon_component;
    /** @type {?} */
    CalendarHeaderComponent.prototype.clearIcon;
    /**
     * @type {?}
     * @private
     */
    CalendarHeaderComponent.prototype._locale;
    /**
     * @type {?}
     * @private
     */
    CalendarHeaderComponent.prototype._showClear;
    /**
     * @type {?}
     * @private
     */
    CalendarHeaderComponent.prototype._closeIcon;
    /** @type {?} */
    CalendarHeaderComponent.prototype.onCancel;
    /** @type {?} */
    CalendarHeaderComponent.prototype.onClear;
    /** @type {?} */
    CalendarHeaderComponent.prototype.header;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var CalendarWeekPanelComponent = /** @class */ (function () {
    function CalendarWeekPanelComponent() {
        this.week = ['日', '一', '二', '三', '四', '五', '六'];
        this.weekPanel = true;
    }
    Object.defineProperty(CalendarWeekPanelComponent.prototype, "locale", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._locale = value;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @return {?}
     */
    CalendarWeekPanelComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        this.week = this._locale.week;
    };
    CalendarWeekPanelComponent.decorators = [
        { type: Component, args: [{
                    selector: 'CalendarWeekPanel, nzm-calendar-week-panel',
                    template: "<div class=\"cell cell-grey\">{{ week[0] }}</div>\n<div class=\"cell\">{{ week[1] }}</div>\n<div class=\"cell\">{{ week[2] }}</div>\n<div class=\"cell\">{{ week[3] }}</div>\n<div class=\"cell\">{{ week[4] }}</div>\n<div class=\"cell\">{{ week[5] }}</div>\n<div class=\"cell cell-grey\">{{ week[6] }}</div>\n",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    /** @nocollapse */
    CalendarWeekPanelComponent.ctorParameters = function () { return []; };
    CalendarWeekPanelComponent.propDecorators = {
        locale: [{ type: Input }],
        weekPanel: [{ type: HostBinding, args: ['class.week-panel',] }]
    };
    return CalendarWeekPanelComponent;
}());
if (false) {
    /** @type {?} */
    CalendarWeekPanelComponent.prototype.week;
    /**
     * @type {?}
     * @private
     */
    CalendarWeekPanelComponent.prototype._locale;
    /** @type {?} */
    CalendarWeekPanelComponent.prototype.weekPanel;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var Picker$1 = {
    okText: 'Ok',
    dismissText: 'Cancel',
    extra: 'please select'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
// import  DatePickerLocale from 'rmc-date-picker/lib/locale/en_US';
var DatePicker$1 = {
    okText: 'OK',
    dismissText: 'Cancel',
    extra: 'please select',
    // DatePickerLocale,
    year: '',
    month: '',
    day: '',
    hour: '',
    minute: '',
    am: 'AM',
    pm: 'PM'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
// import  DatePickerLocale from 'rmc-date-picker/lib/locale/en_US';
var DatePickerView$1 = {
    okText: 'OK',
    dismissText: 'Cancel',
    extra: 'please select',
    // DatePickerLocale,
    year: '',
    month: '',
    day: '',
    hour: '',
    minute: '',
    am: 'AM',
    pm: 'PM'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var Menu$1 = {
    okText: 'Ok',
    cancelText: 'Cancel'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var SearchBar$1 = {
    cancelText: 'Cancel'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var InputItem$1 = {
    confirmLabel: 'Done',
    backspaceLabel: 'Backspace',
    cancelKeyboardLabel: 'CancelKeyboard'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var Pagination$1 = {
    prevText: 'Prev',
    nextText: 'Next'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var PullToRefresh$1 = {
    activateText: 'Refresh immediately after release',
    deactivateText: 'Pull down to refresh',
    finishText: 'Finish refresh'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var ActionSheet$1 = {
    dismissText: 'Cancel'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var en_US = {
    locale: 'en_US',
    Picker: Picker$1,
    DatePicker: DatePicker$1,
    DatePickerView: DatePickerView$1,
    Menu: Menu$1,
    Calendar: Calendar,
    SearchBar: SearchBar$1,
    InputItem: InputItem$1,
    Pagination: Pagination$1,
    PullToRefresh: PullToRefresh$1,
    ActionSheet: ActionSheet$1
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var Picker$2 = {
    okText: 'Ок',
    dismissText: 'Отмена',
    extra: ''
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
// import DatePickerLocale from 'rmc-date-picker/lib/locale/en_US';
var DatePicker$2 = {
    okText: 'Ок',
    dismissText: 'Отмена',
    extra: '',
    // DatePickerLocale,
    year: '',
    month: '',
    day: '',
    hour: '',
    minute: '',
    am: 'AM',
    pm: 'PM'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
// import DatePickerLocale from 'rmc-date-picker/lib/locale/en_US';
var DatePickerView$2 = {
    okText: 'Ок',
    dismissText: 'Отмена',
    extra: '',
    // DatePickerLocale,
    year: '',
    month: '',
    day: '',
    hour: '',
    minute: '',
    am: 'AM',
    pm: 'PM'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var Menu$2 = {
    okText: 'Ок',
    cancelText: 'Отмена'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var SearchBar$2 = {
    cancelText: 'Отмена'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var InputItem$2 = {
    confirmLabel: 'Ок',
    backspaceLabel: 'возврат на одну позицию',
    cancelKeyboardLabel: 'Отменить клавиатуру'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var Pagination$2 = {
    prevText: 'Назад',
    nextText: 'Вперёд'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var PullToRefresh$2 = {
    activateText: 'Обновить сразу после выпуска',
    deactivateText: 'Потяните вниз, чтобы обновить',
    finishText: 'Завершить обновление'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var ActionSheet$2 = {
    dismissText: 'Отмена'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var ru_RU = {
    locale: 'ru_RU',
    Picker: Picker$2,
    DatePicker: DatePicker$2,
    DatePickerView: DatePickerView$2,
    Menu: Menu$2,
    // Calendar,
    SearchBar: SearchBar$2,
    InputItem: InputItem$2,
    Pagination: Pagination$2,
    PullToRefresh: PullToRefresh$2,
    ActionSheet: ActionSheet$2
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var Picker$3 = {
    okText: 'Ok',
    dismissText: 'Avbryt',
    extra: 'vänligen välj'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
// import DatePickerLocale from 'rmc-date-picker/lib/locale/en_US';
var DatePicker$3 = {
    okText: 'Ok',
    dismissText: 'Avbryt',
    extra: 'vänligen välj',
    // DatePickerLocale,
    year: '',
    month: '',
    day: '',
    hour: '',
    minute: '',
    am: 'AM',
    pm: 'PM'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
// import DatePickerLocale from 'rmc-date-picker/lib/locale/en_US';
var DatePickerView$3 = {
    okText: 'Ok',
    dismissText: 'Avbryt',
    extra: 'vänligen välj',
    // DatePickerLocale,
    year: '',
    month: '',
    day: '',
    hour: '',
    minute: '',
    am: 'AM',
    pm: 'PM'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var Menu$3 = {
    okText: 'Ok',
    cancelText: 'Avbryt'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var SearchBar$3 = {
    cancelText: 'Avbryt'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var InputItem$3 = {
    confirmLabel: 'Ok',
    backspaceLabel: 'Backspace',
    cancelKeyboardLabel: 'CancelKeyboard'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var Pagination$3 = {
    prevText: 'Föreg',
    nextText: 'Nästa'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var PullToRefresh$3 = {
    activateText: 'Uppdatera omedelbart efter utsläpp',
    deactivateText: 'Dra ner för att uppdatera',
    finishText: 'Avsluta uppdateringen'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var ActionSheet$3 = {
    dismissText: 'Avbryt'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var sv_SE = {
    locale: 'sv_SE',
    Picker: Picker$3,
    DatePicker: DatePicker$3,
    DatePickerView: DatePickerView$3,
    Menu: Menu$3,
    // Calendar,
    SearchBar: SearchBar$3,
    InputItem: InputItem$3,
    Pagination: Pagination$3,
    PullToRefresh: PullToRefresh$3,
    ActionSheet: ActionSheet$3
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var Picker$4 = {
    okText: 'Ok',
    dismissText: 'Annuller',
    extra: 'Vælg venligst'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
// import DatePickerLocale from 'rmc-date-picker/lib/locale/en_US';
var DatePicker$4 = {
    okText: 'Ok',
    dismissText: 'Annuller',
    extra: 'Vælg venligst',
    // DatePickerLocale,
    year: '',
    month: '',
    day: '',
    hour: '',
    minute: '',
    am: 'AM',
    pm: 'PM'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
// import DatePickerLocale from 'rmc-date-picker/lib/locale/en_US';
var DatePickerView$4 = {
    okText: 'Ok',
    dismissText: 'Annuller',
    extra: 'Vælg venligst',
    // DatePickerLocale,
    year: '',
    month: '',
    day: '',
    hour: '',
    minute: '',
    am: 'AM',
    pm: 'PM'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var Menu$4 = {
    okText: 'Ok',
    cancelText: 'Annuller'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
// 同步自 'rmc-calendar/lib/locale/en_US';
var Calendar$1 = {
    title: 'Kalender',
    today: 'I dag',
    month: 'Måned',
    year: 'År',
    am: 'AM',
    pm: 'PM',
    dateTimeFormat: 'dd/MM/yyyy w hh:mm',
    dateFormat: 'dd/MM/yyyy w',
    noChoose: 'Intet valgt',
    week: ['Søn', 'Man', 'Tir', 'Ons', 'Tor', 'Fre', 'Lør'],
    clear: 'Fjern',
    selectTime: 'Vælg tidspunkt',
    selectStartTime: 'Vælg starttidspunkt',
    selectEndTime: 'Vælg sluttidspunkt',
    start: 'Start',
    end: 'Slut',
    begin: 'Start',
    over: 'Slut',
    begin_over: 'Start/Stop',
    confirm: 'Bekræft',
    monthTitle: 'MM yyyy',
    loadPrevMonth: 'Indlæs forrige måned',
    yesterday: 'I går',
    lastWeek: 'Sidste uge',
    lastMonth: 'Sidste måned'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var SearchBar$4 = {
    cancelText: 'Annuller'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var InputItem$4 = {
    confirmLabel: 'Ok',
    backspaceLabel: 'Backspace',
    cancelKeyboardLabel: 'CancelKeyboard'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var Pagination$4 = {
    prevText: 'Forrige',
    nextText: 'Næste'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var PullToRefresh$4 = {
    activateText: 'Opdater umiddelbart efter slip',
    deactivateText: 'Træk ned for at opdatere',
    finishText: 'Afslut opdatering'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var ActionSheet$4 = {
    dismissText: 'Annuller'
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var da_DK = {
    locale: 'da_DK',
    Picker: Picker$4,
    DatePicker: DatePicker$4,
    DatePickerView: DatePickerView$4,
    Menu: Menu$4,
    Calendar: Calendar$1,
    SearchBar: SearchBar$4,
    InputItem: InputItem$4,
    Pagination: Pagination$4,
    PullToRefresh: PullToRefresh$4,
    ActionSheet: ActionSheet$4
};

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var CalendarTimePickerComponent = /** @class */ (function () {
    function CalendarTimePickerComponent() {
        var _this = this;
        this.defaultProps = (/** @type {?} */ ({
            minDate: new Date(0, 0, 0, 0, 0),
            maxDate: new Date(9999, 11, 31, 23, 59, 59),
            defaultValue: new Date(2000, 1, 1, 8),
            mode: 'time',
            datePickerViewLocale: zh_CN
        }));
        this.props = (/** @type {?} */ ({
            minDate: new Date(0, 0, 0, 0, 0),
            maxDate: new Date(9999, 11, 31, 23, 59, 59),
            defaultValue: new Date(2000, 1, 1, 8),
            mode: 'time',
            datePickerViewLocale: zh_CN
        }));
        this.timePicker = true;
        this.onDateChange = (/**
         * @param {?} date
         * @return {?}
         */
        function (date) {
            var onValueChange = _this.props.onValueChange;
            if (onValueChange) {
                onValueChange(date.date);
            }
        });
    }
    Object.defineProperty(CalendarTimePickerComponent.prototype, "propsData", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.props = __assign({}, this.props, value);
            if (this.props.locale && this.props.locale.today === 'Today') {
                this.props.datePickerViewLocale = en_US;
            }
            else {
                this.props.datePickerViewLocale = zh_CN;
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CalendarTimePickerComponent.prototype, "title", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.props.title = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CalendarTimePickerComponent.prototype, "value", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.props.value = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CalendarTimePickerComponent.prototype, "prefixCls", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.props.prefixCls = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CalendarTimePickerComponent.prototype, "defaultValue", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.props.defaultValue = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CalendarTimePickerComponent.prototype, "pickerPrefixCls", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.props.pickerPrefixCls = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CalendarTimePickerComponent.prototype, "clientHeight", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.props.clientHeight = value;
            /** @type {?} */
            var height = (value && (value * 3) / 8 - 52) || Number.POSITIVE_INFINITY;
            this.selfHeight = (height > 164 || height < 0 ? 164 : height) + 'px';
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CalendarTimePickerComponent.prototype, "onValueChange", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.props.onValueChange = value;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @param {?=} date
     * @return {?}
     */
    CalendarTimePickerComponent.prototype.getMinTime = /**
     * @param {?=} date
     * @return {?}
     */
    function (date) {
        /** @type {?} */
        var minDate = (/** @type {?} */ (this.props.minDate));
        if (!date ||
            date.getFullYear() > minDate.getFullYear() ||
            date.getMonth() > minDate.getMonth() ||
            date.getDate() > minDate.getDate()) {
            return this.defaultProps.minDate;
        }
        return minDate;
    };
    /**
     * @param {?=} date
     * @return {?}
     */
    CalendarTimePickerComponent.prototype.getMaxTime = /**
     * @param {?=} date
     * @return {?}
     */
    function (date) {
        /** @type {?} */
        var maxDate = (/** @type {?} */ (this.props.maxDate));
        if (!date ||
            date.getFullYear() < maxDate.getFullYear() ||
            date.getMonth() < maxDate.getMonth() ||
            date.getDate() < maxDate.getDate()) {
            return this.defaultProps.maxDate;
        }
        return maxDate;
    };
    CalendarTimePickerComponent.decorators = [
        { type: Component, args: [{
                    selector: 'CalendarTimePicker, nzm-calendar-time-picker',
                    template: "<div class=\"title\">{{ props.title }}</div>\n<DatePickerView\n  [ngStyle]=\"{ height: selfHeight, overflow: 'hidden' }\"\n  [mode]=\"props.mode\"\n  [value]=\"props.value\"\n  [locale]=\"props.datePickerViewLocale\"\n  [minDate]=\"getMinTime(props.value || props.defaultValue || undefined)\"\n  [maxDate]=\"getMaxTime(props.value || props.defaultValue || undefined)\"\n  (onValueChange)=\"onDateChange($event)\"\n></DatePickerView>\n",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    /** @nocollapse */
    CalendarTimePickerComponent.ctorParameters = function () { return []; };
    CalendarTimePickerComponent.propDecorators = {
        propsData: [{ type: Input }],
        title: [{ type: Input }],
        value: [{ type: Input }],
        prefixCls: [{ type: Input }],
        defaultValue: [{ type: Input }],
        pickerPrefixCls: [{ type: Input }],
        clientHeight: [{ type: Input }],
        onValueChange: [{ type: Input }],
        timePicker: [{ type: HostBinding, args: ['class.time-picker',] }]
    };
    return CalendarTimePickerComponent;
}());
if (false) {
    /** @type {?} */
    CalendarTimePickerComponent.prototype.defaultProps;
    /** @type {?} */
    CalendarTimePickerComponent.prototype.props;
    /** @type {?} */
    CalendarTimePickerComponent.prototype.selfHeight;
    /** @type {?} */
    CalendarTimePickerComponent.prototype.timePicker;
    /** @type {?} */
    CalendarTimePickerComponent.prototype.onDateChange;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @record
 */
function DatePickerOptionsInterface() { }
if (false) {
    /** @type {?} */
    DatePickerOptionsInterface.prototype.mode;
    /** @type {?} */
    DatePickerOptionsInterface.prototype.value;
    /** @type {?} */
    DatePickerOptionsInterface.prototype.minDate;
    /** @type {?} */
    DatePickerOptionsInterface.prototype.maxDate;
    /** @type {?} */
    DatePickerOptionsInterface.prototype.use12Hours;
    /** @type {?} */
    DatePickerOptionsInterface.prototype.minuteStep;
    /** @type {?} */
    DatePickerOptionsInterface.prototype.locale;
    /** @type {?} */
    DatePickerOptionsInterface.prototype.disabled;
    /** @type {?} */
    DatePickerOptionsInterface.prototype.mask;
    /** @type {?} */
    DatePickerOptionsInterface.prototype.title;
    /** @type {?} */
    DatePickerOptionsInterface.prototype.okText;
    /** @type {?} */
    DatePickerOptionsInterface.prototype.dismissText;
    /** @type {?} */
    DatePickerOptionsInterface.prototype.appendToBody;
    /** @type {?} */
    DatePickerOptionsInterface.prototype.showErrorToast;
    /** @type {?} */
    DatePickerOptionsInterface.prototype.showErrorToastInterval;
}
var DatePickerOptions = /** @class */ (function () {
    function DatePickerOptions() {
        this.mode = 'date';
        this.value = new Date();
        this.minDate = new Date(2000, 6, 1, 0, 0, 0);
        this.maxDate = new Date(2030, 1, 1, 23, 59, 59);
        this.use12Hours = false;
        this.minuteStep = 1;
        this.data = [];
        this.mask = true;
        this.title = '';
        this.okText = '确定';
        this.dismissText = '取消';
        this.disabled = false;
        this.appendToBody = false;
        this.showErrorToast = true;
        this.showErrorToastInterval = 2000;
        this.onOk = new EventEmitter();
        this.onDismiss = new EventEmitter();
        this.onValueChange = new EventEmitter();
        this.onChange = new EventEmitter();
    }
    return DatePickerOptions;
}());
if (false) {
    /** @type {?} */
    DatePickerOptions.prototype.mode;
    /** @type {?} */
    DatePickerOptions.prototype.value;
    /** @type {?} */
    DatePickerOptions.prototype.minDate;
    /** @type {?} */
    DatePickerOptions.prototype.maxDate;
    /** @type {?} */
    DatePickerOptions.prototype.use12Hours;
    /** @type {?} */
    DatePickerOptions.prototype.minuteStep;
    /** @type {?} */
    DatePickerOptions.prototype.data;
    /** @type {?} */
    DatePickerOptions.prototype.mask;
    /** @type {?} */
    DatePickerOptions.prototype.title;
    /** @type {?} */
    DatePickerOptions.prototype.okText;
    /** @type {?} */
    DatePickerOptions.prototype.dismissText;
    /** @type {?} */
    DatePickerOptions.prototype.disabled;
    /** @type {?} */
    DatePickerOptions.prototype.locale;
    /** @type {?} */
    DatePickerOptions.prototype.appendToBody;
    /** @type {?} */
    DatePickerOptions.prototype.showErrorToast;
    /** @type {?} */
    DatePickerOptions.prototype.showErrorToastInterval;
    /** @type {?} */
    DatePickerOptions.prototype.onOk;
    /** @type {?} */
    DatePickerOptions.prototype.onDismiss;
    /** @type {?} */
    DatePickerOptions.prototype.onValueChange;
    /** @type {?} */
    DatePickerOptions.prototype.onChange;
    /** @type {?} */
    DatePickerOptions.prototype.hidePicker;
    /** @type {?} */
    DatePickerOptions.prototype.updateNgModel;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @return {?}
 */
function getVelocity() {
    return ((/**
     * @param {?=} minInterval
     * @param {?=} maxInterval
     * @return {?}
     */
    function (minInterval, maxInterval) {
        if (minInterval === void 0) { minInterval = 30; }
        if (maxInterval === void 0) { maxInterval = 100; }
        /** @type {?} */
        var _time = 0;
        /** @type {?} */
        var _y = 0;
        /** @type {?} */
        var _velocity = 0;
        /** @type {?} */
        var recorder = {
            record: (/**
             * @param {?} y
             * @return {?}
             */
            function (y) {
                /** @type {?} */
                var now = +new Date();
                _velocity = (y - _y) / (now - _time);
                if (now - _time >= minInterval) {
                    _velocity = now - _time <= maxInterval ? _velocity : 0;
                    _y = y;
                    _time = now;
                }
            }),
            getVelocity: (/**
             * @param {?} y
             * @return {?}
             */
            function (y) {
                if (y !== _y) {
                    recorder.record(y);
                }
                return _velocity;
            })
        };
        return recorder;
    }))();
}

var velocity = /*#__PURE__*/Object.freeze({
    getVelocity: getVelocity
});

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var DatePickerComponent = /** @class */ (function () {
    function DatePickerComponent(elementRef, options, toast, localeProviderService) {
        this.elementRef = elementRef;
        this.options = options;
        this.toast = toast;
        this.localeProviderService = localeProviderService;
        this.transitionName = 'am-slide-up-enter am-slide-up-enter-active';
        this.maskTransitionName = 'am-fade-enter am-fade-enter-active';
        this.modeSwitch = [1, 1, 1, 1, 1, 1];
        this.localMinDate = [];
        this.localMaxDate = [];
        this.currentTime = [];
        this.indexArray = [];
        this.min_date = [];
        this.max_date = [];
        this.current_time = [
            new Date().getFullYear(),
            new Date().getMonth() + 1,
            new Date().getDate(),
            new Date().getHours(),
            new Date().getMinutes()
        ];
        this.clos = 0;
        this.resultArr = [];
        this.data = [];
        this.dataWithStr = [];
        this.startY = 0;
        this.differY = 0;
        this.currentY = 0;
        this.len = 0;
        this.dom = null;
        this.index = 0;
        this.maxY = 0;
        this.lineHeight = 34;
        this.selectedTarget = [];
        this.isMouseDown = false;
        this.localeNew = {};
        this.unsubscribe$ = new Subject();
        this.Velocity = getVelocity();
        this.errorMessage = '';
        this.curTLessThanMin = false;
        this.curTMoreThanMax = false;
    }
    /**
     * @param {?} event
     * @return {?}
     */
    DatePickerComponent.prototype.panstart = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        var _this = this;
        if (!event.target.classList.contains('am-picker-col-mask')) {
            return;
        }
        this.isMouseDown = true;
        event.preventDefault();
        this.dom = event.target.parentElement.children[2];
        this.len = this.dom.children.length;
        this.maxY = -(this.len - 1);
        if (this.dom.style.transform === 'translateY(0px)') {
            this.currentY = 0;
            this.maxY = -(this.len - 1);
        }
        else if (this.selectedTarget.length > 0) {
            this.selectedTarget.forEach((/**
             * @param {?} item
             * @return {?}
             */
            function (item) {
                if (item.targetId === event.target.id) {
                    _this.currentY = item.currentY;
                }
            }));
        }
        /** @type {?} */
        var ev = this.getEventTarget(event);
        this.startY = ev.clientY;
    };
    /**
     * @param {?} event
     * @return {?}
     */
    DatePickerComponent.prototype.panmove = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        if (!event.target.classList.contains('am-picker-col-mask') || !this.isMouseDown) {
            return;
        }
        event.preventDefault();
        /** @type {?} */
        var ev = this.getEventTarget(event);
        this.differY = ev.clientY - this.startY;
        this.Velocity.record(this.differY);
        this.dom.style.transition = 'transform 0s';
        this.dom.style.transform = "translateY(" + (this.currentY * this.lineHeight + this.differY) + "px)";
    };
    /**
     * @param {?} event
     * @return {?}
     */
    DatePickerComponent.prototype.panend = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        var _this = this;
        if (!event.target.classList.contains('am-picker-col-mask') || !this.isMouseDown) {
            return;
        }
        this.isMouseDown = false;
        event.preventDefault();
        /** @type {?} */
        var ev = this.getEventTarget(event);
        this.differY = ev.clientY - this.startY;
        /** @type {?} */
        var time = 0.3;
        /** @type {?} */
        var velocityTemp = this.Velocity.getVelocity(this.differY) * 4;
        if (velocityTemp) {
            this.differY = velocityTemp * 40 + this.differY;
            time = Math.abs(velocityTemp) * 0.1;
        }
        this.dom.style.transition = 'transform ' + (time < 0.3 ? 0.3 : time) + 's';
        if (this.differY <= -this.lineHeight / 2) {
            this.currentY += Math.floor(this.differY / this.lineHeight);
            if (this.currentY <= this.maxY) {
                this.currentY = this.maxY;
            }
        }
        else if (this.differY >= this.lineHeight / 2) {
            this.currentY += Math.floor(this.differY / this.lineHeight);
            if (this.currentY >= 0) {
                this.currentY = 0;
            }
        }
        if (this.selectedTarget.length > 0) {
            /** @type {?} */
            var hasKey_1 = false;
            this.selectedTarget.forEach((/**
             * @param {?} item
             * @return {?}
             */
            function (item) {
                if (item.targetId === event.target.id) {
                    hasKey_1 = true;
                    item.targetId = event.target.id;
                    item.currentY = _this.currentY;
                }
            }));
            if (!hasKey_1) {
                this.selectedTarget.push({ targetId: event.target.id, currentY: this.currentY });
            }
        }
        else {
            this.selectedTarget.push({ targetId: event.target.id, currentY: this.currentY });
        }
        this.dom.style.transform = "translateY(" + this.currentY * this.lineHeight + "px)";
        this.index = Math.floor(Math.abs(this.currentY / 1)); // 记录当前位移在数组中的索引,必须取整,否则会出现浮点数
        this.current_time[this.indexArray[parseInt(event.target.id, 0)]] = this.resultArr[this.indexArray[parseInt(event.target.id, 0)]] = this.data[parseInt(event.target.id, 0)][this.index];
        if (this.judgeTime(this.current_time, this.max_date)) {
            this.currentTime = this.current_time = this.max_date.slice(0, this.indexArray.length);
            this.resultArr = this.current_time;
            this.options.onValueChange.emit({ date: this.handleReslut(), index: event.target.id });
            if (this.options.updateNgModel) {
                this.options.updateNgModel(this.handleReslut());
            }
            if (this.ngModelOnChange) {
                this.ngModelOnChange(this.handleReslut());
            }
            this.init();
        }
        else if (this.judgeTime(this.min_date, this.current_time)) {
            this.currentTime = this.current_time = this.min_date.slice(0, this.indexArray.length);
            this.resultArr = this.currentTime;
            this.options.onValueChange.emit({ date: this.handleReslut(), index: event.target.id });
            if (this.options.updateNgModel) {
                this.options.updateNgModel(this.handleReslut());
            }
            if (this.ngModelOnChange) {
                this.ngModelOnChange(this.handleReslut());
            }
            this.init();
        }
        else {
            this.setCurrentSelected(0, this.differY < 0, this.index);
            this.options.onValueChange.emit({ date: this.handleReslut(), index: event.target.id });
            if (this.options.updateNgModel) {
                this.options.updateNgModel(this.handleReslut());
            }
            if (this.ngModelOnChange) {
                this.ngModelOnChange(this.handleReslut());
            }
        }
    };
    /**
     * @return {?}
     */
    DatePickerComponent.prototype.init = /**
     * @return {?}
     */
    function () {
        var _this = this;
        if (!this.checkTime() && this.options.showErrorToast) {
            setTimeout((/**
             * @return {?}
             */
            function () {
                _this.toast.fail(_this.errorMessage, _this.options.showErrorToastInterval);
            }), 0);
        }
        this.initResult();
        this.initReady();
        this.getInitValueIndex();
    };
    /**
     * @return {?}
     */
    DatePickerComponent.prototype.reloadPicker = /**
     * @return {?}
     */
    function () {
        if (!this.picker || this.picker === undefined) {
            return;
        }
        this.currentPicker = this.picker.element.nativeElement;
        if (this.currentPicker && this.currentPicker.children.length > 0) {
            /** @type {?} */
            var self_1 = this;
            setTimeout((/**
             * @return {?}
             */
            function () {
                self_1.selectedTarget.forEach((/**
                 * @param {?} item
                 * @param {?} i
                 * @return {?}
                 */
                function (item, i) {
                    self_1.currentPicker.children[i].children[2].style.transition = 'transform .3s';
                    /** @type {?} */
                    var index = parseInt(item.currentY, 0);
                    self_1.currentPicker.children[i].children[2].style.transform = "translateY(" + index * self_1.lineHeight + "px)";
                }));
            }), 0);
        }
    };
    /**
     * @return {?}
     */
    DatePickerComponent.prototype.localeProvider = /**
     * @return {?}
     */
    function () {
        /** @type {?} */
        var self = this;
        if (self.options.locale || self.options.locale !== undefined) {
            self.localeProviderService.setLocale(self.options.locale);
        }
        self.localeProviderService.localeChange.pipe(takeUntil(self.unsubscribe$)).subscribe((/**
         * @param {?} _
         * @return {?}
         */
        function (_) {
            self.options.locale = self.localeProviderService.getLocale();
            self.localeNew = self.localeProviderService.getLocaleSubObj('DatePicker');
            self.options.okText = self.localeNew.okText;
            self.options.dismissText = self.localeNew.dismissText;
            self.init();
        }));
    };
    /**
     * @param {?} date
     * @return {?}
     */
    DatePickerComponent.prototype.transformDateFormat = /**
     * @param {?} date
     * @return {?}
     */
    function (date) {
        if (!date) {
            return '';
        }
        else {
            return 'yyyy-mm-dd-HH-MM'
                .replace('yyyy', date.getFullYear() + '')
                .replace('mm', date.getMonth() + 1 + '')
                .replace('dd', date.getDate() + '')
                .replace('HH', date.getHours() + '')
                .replace('MM', date.getMinutes() + '');
        }
    };
    /**
     * @param {?} val
     * @return {?}
     */
    DatePickerComponent.prototype.preZero = /**
     * @param {?} val
     * @return {?}
     */
    function (val) {
        return val < 10 ? '0' + val : val + '';
    };
    /**
     * @return {?}
     */
    DatePickerComponent.prototype.getInitValueIndex = /**
     * @return {?}
     */
    function () {
        var _this = this;
        this.selectedTarget = [];
        this.indexArray.map((/**
         * @param {?} index
         * @param {?} i
         * @return {?}
         */
        function (index, i) {
            _this.data.forEach((/**
             * @param {?} item
             * @param {?} j
             * @return {?}
             */
            function (item, j) {
                item.forEach((/**
                 * @param {?} item1
                 * @param {?} k
                 * @return {?}
                 */
                function (item1, k) {
                    if (_this.currentTime[index] === item1 && i === j) {
                        _this.selectedTarget.push({ targetId: "" + i, currentY: -k });
                    }
                }));
            }));
        }));
        this.reloadPicker();
    };
    /**
     * @param {?} mode
     * @return {?}
     */
    DatePickerComponent.prototype.checkMode = /**
     * @param {?} mode
     * @return {?}
     */
    function (mode) {
        this.modeSwitch = [1, 1, 1, 1, 1, 1];
        switch (mode) {
            case 'date':
                this.modeSwitch = [1, 1, 1, 0, 0, 0];
                break;
            case 'time':
                if (this.options.use12Hours) {
                    this.modeSwitch = [0, 0, 0, 1, 1, 1];
                }
                else {
                    this.modeSwitch = [0, 0, 0, 1, 1, 0];
                }
                break;
            case 'datetime':
                if (this.options.use12Hours) {
                    this.modeSwitch = [1, 1, 1, 1, 1, 1];
                }
                else {
                    this.modeSwitch = [1, 1, 1, 1, 1, 0];
                }
                break;
            case 'year':
                this.modeSwitch = [1, 0, 0, 0, 0];
                break;
            case 'month':
                this.modeSwitch = [1, 1, 0, 0, 0];
                break;
            default:
                break;
        }
        /** @type {?} */
        var tempIndexArray = [];
        for (var i = 0; i < this.modeSwitch.length; i++) {
            if (this.modeSwitch[i] > 0) {
                tempIndexArray.push(i);
            }
        }
        this.clos = tempIndexArray[tempIndexArray.length - 1] - tempIndexArray[0] + 1;
        this.indexArray = tempIndexArray;
    };
    /**
     * @return {?}
     */
    DatePickerComponent.prototype.initResult = /**
     * @return {?}
     */
    function () {
        this.resultArr = [];
        for (var i = 0; i < this.clos; i++) {
            /** @type {?} */
            var res = this.currentTime[i];
            if (this.options.mode === 'time') {
                this.resultArr = this.currentTime;
            }
            else {
                this.resultArr.push(res);
            }
        }
    };
    /**
     * @return {?}
     */
    DatePickerComponent.prototype.checkTime = /**
     * @return {?}
     */
    function () {
        /** @type {?} */
        var min_Date = this.transformDateFormat(this.options.minDate).split('-');
        if (min_Date.length > 0) {
            this.min_date = min_Date.map((/**
             * @param {?} item
             * @return {?}
             */
            function (item) {
                return parseInt(item, 0);
            }));
        }
        /** @type {?} */
        var max_Date = this.transformDateFormat(this.options.maxDate).split('-');
        if (max_Date.length > 0) {
            this.max_date = max_Date.map((/**
             * @param {?} item
             * @return {?}
             */
            function (item) {
                return parseInt(item, 0);
            }));
        }
        /** @type {?} */
        var min_date = this.min_date;
        /** @type {?} */
        var max_date = this.max_date;
        /** @type {?} */
        var current_time = this.currentTime;
        this.localMinDate = [];
        if (this.localMinDate.length === 0) {
            for (var index = 0; index < this.indexArray.length; index++) {
                this.localMinDate.push(min_date[this.indexArray[index]]);
            }
        }
        this.localMaxDate = [];
        if (this.localMaxDate.length === 0) {
            for (var index = 0; index < this.indexArray.length; index++) {
                this.localMaxDate.push(max_date[this.indexArray[index]]);
            }
        }
        if (this.indexArray.length === this.localMinDate.length && this.localMinDate.length === this.localMaxDate.length) {
            /** @type {?} */
            var minT = new Date(min_date[0], min_date[1], min_date[2], min_date[3], min_date[4]).getTime();
            /** @type {?} */
            var maxT = new Date(max_date[0], max_date[1], max_date[2], max_date[3], max_date[4]).getTime();
            /** @type {?} */
            var curT = new Date(current_time[0], current_time[1], current_time[2], current_time[3] || 0, current_time[4] || 0).getTime();
            this.curTLessThanMin = false;
            this.curTMoreThanMax = false;
            if (curT < minT) {
                this.curTLessThanMin = true;
                this.currentTime = this.min_date;
                this.errorMessage = this.localeNew.curTLessthanMin;
            }
            if (curT > maxT) {
                this.curTMoreThanMax = true;
                this.currentTime = this.max_date;
                this.errorMessage = this.localeNew.curTMorethanMax;
            }
            /** @type {?} */
            var _indexArrayIndex = 0;
            for (var i = 0; i < this.modeSwitch.length; i++) {
                if (this.modeSwitch[i] === 0) {
                    switch (i) {
                        case 0:
                            min_date[i] = new Date().getFullYear();
                            max_date[i] = new Date().getFullYear();
                            break;
                        case 1:
                            min_date[i] = new Date().getMonth() + 1;
                            max_date[i] = new Date().getMonth() + 1;
                            break;
                        case 2:
                            min_date[i] = new Date().getDate();
                            max_date[i] = new Date().getDate();
                            break;
                        case 3:
                            min_date[i] = new Date().getHours();
                            max_date[i] = new Date().getHours();
                            break;
                        case 4:
                            min_date[i] = new Date().getMinutes();
                            max_date[i] = new Date().getMinutes();
                            break;
                        case 5:
                            min_date[i] = 0;
                            max_date[i] = 1;
                            break;
                    }
                }
                else {
                    switch (i) {
                        case 0:
                            this.localMinDate[_indexArrayIndex] = min_date[i] =
                                this.localMinDate[_indexArrayIndex] >= 1900
                                    ? this.localMinDate[_indexArrayIndex]
                                    : new Date().getFullYear();
                            this.localMaxDate[_indexArrayIndex] = max_date[i] =
                                this.localMaxDate[_indexArrayIndex] >= 1900
                                    ? this.localMaxDate[_indexArrayIndex]
                                    : new Date().getFullYear() + 1;
                            break;
                        case 1:
                            this.localMinDate[_indexArrayIndex] = min_date[i] =
                                this.localMinDate[_indexArrayIndex] > 0 && this.localMinDate[_indexArrayIndex] <= 12
                                    ? this.localMinDate[_indexArrayIndex]
                                    : 1;
                            this.localMaxDate[_indexArrayIndex] = max_date[i] =
                                this.localMaxDate[_indexArrayIndex] > 0 && this.localMaxDate[_indexArrayIndex] <= 12
                                    ? this.localMaxDate[_indexArrayIndex]
                                    : 12;
                            break;
                        case 2:
                            this.localMinDate[_indexArrayIndex] = min_date[i] =
                                this.localMinDate[_indexArrayIndex] > 0 &&
                                    this.localMinDate[_indexArrayIndex] <= new Date(min_date[0], min_date[1], 0).getDate()
                                    ? this.localMinDate[_indexArrayIndex]
                                    : 1;
                            this.localMaxDate[_indexArrayIndex] = max_date[i] =
                                this.localMaxDate[_indexArrayIndex] > 0 &&
                                    this.localMaxDate[_indexArrayIndex] <= new Date(max_date[0], max_date[1], 0).getDate()
                                    ? this.localMaxDate[_indexArrayIndex]
                                    : new Date(max_date[0], max_date[1], 0).getDate();
                            break;
                        case 3:
                            this.localMinDate[_indexArrayIndex] = min_date[i] =
                                this.localMinDate[_indexArrayIndex] >= 0 && this.localMinDate[_indexArrayIndex] <= 23
                                    ? this.localMinDate[_indexArrayIndex]
                                    : 0;
                            if (this.options.use12Hours) {
                                this.localMaxDate[_indexArrayIndex] = max_date[i] =
                                    this.localMaxDate[_indexArrayIndex] >= 0 && this.localMaxDate[_indexArrayIndex] <= 11
                                        ? this.localMaxDate[_indexArrayIndex]
                                        : 11;
                            }
                            else {
                                this.localMaxDate[_indexArrayIndex] = max_date[i] =
                                    this.localMaxDate[_indexArrayIndex] >= 0 && this.localMaxDate[_indexArrayIndex] <= 23
                                        ? this.localMaxDate[_indexArrayIndex]
                                        : 23;
                            }
                            break;
                        case 4:
                            this.localMinDate[_indexArrayIndex] = min_date[i] =
                                this.localMinDate[_indexArrayIndex] >= 0 && this.localMinDate[_indexArrayIndex] <= 59
                                    ? this.localMinDate[_indexArrayIndex]
                                    : 0;
                            this.localMaxDate[_indexArrayIndex] = max_date[i] =
                                this.localMaxDate[_indexArrayIndex] >= 0 && this.localMaxDate[_indexArrayIndex] <= 59
                                    ? this.localMaxDate[_indexArrayIndex]
                                    : 59;
                            break;
                    }
                }
                _indexArrayIndex++;
            }
            return minT <= curT && curT <= maxT;
        }
        else {
            this.errorMessage = this.localeNew.errorMessage;
            return false;
        }
    };
    /**
     * @param {?} arr1
     * @param {?} arr2
     * @return {?}
     */
    DatePickerComponent.prototype.judgeTime = /**
     * @param {?} arr1
     * @param {?} arr2
     * @return {?}
     */
    function (arr1, arr2) {
        /** @type {?} */
        var date1;
        /** @type {?} */
        var date2;
        date1 = arr1.slice(0, 3).join('-') + ' ' + arr1.slice(3, 5).join(':');
        date2 = arr2.slice(0, 3).join('-') + ' ' + arr2.slice(3, 5).join(':');
        return new Date(date1).getTime() >= new Date(date2).getTime();
    };
    /**
     * @param {?} arr1
     * @param {?} arr2
     * @param {?} length
     * @return {?}
     */
    DatePickerComponent.prototype.judgeEqualArray = /**
     * @param {?} arr1
     * @param {?} arr2
     * @param {?} length
     * @return {?}
     */
    function (arr1, arr2, length) {
        /** @type {?} */
        var status = true;
        for (var i = 0; i < length; i++) {
            if (arr1[i] != arr2[i]) {
                status = false;
            }
        }
        return status;
    };
    /**
     * @return {?}
     */
    DatePickerComponent.prototype.initReady = /**
     * @return {?}
     */
    function () {
        /** @type {?} */
        var realIdx = 0;
        for (var i = 0; i < this.clos; i++) {
            realIdx = this.indexArray[i];
            /** @type {?} */
            var min = 0;
            /** @type {?} */
            var max = 0;
            /** @type {?} */
            var tempArray = [];
            switch (realIdx) {
                case 0:
                    this.initData(tempArray, this.localMinDate[i], this.localMaxDate[i], this.localeNew.year, i);
                    break;
                case 1:
                    min = this.judgeEqualArray(this.min_date, this.current_time, 1) ? this.localMinDate[i] : 1;
                    max = this.judgeEqualArray(this.max_date, this.current_time, 1) ? this.localMaxDate[i] : 12;
                    this.initData(tempArray, min, max, this.localeNew.month, i);
                    break;
                case 2:
                    min = this.judgeEqualArray(this.min_date, this.current_time, 2)
                        ? this.localMinDate[i]
                        : this.curTLessThanMin
                            ? this.localMinDate[i]
                            : 1;
                    max = this.judgeEqualArray(this.max_date, this.current_time, 2)
                        ? this.localMaxDate[i]
                        : new Date(this.current_time[0], this.current_time[1], 0).getDate();
                    this.initData(tempArray, min, max, this.localeNew.day, i);
                    break;
                case 3:
                    min = this.judgeEqualArray(this.min_date, this.current_time, 3)
                        ? this.localMinDate[i]
                        : this.curTLessThanMin
                            ? this.localMinDate[i]
                            : 0;
                    max = this.judgeEqualArray(this.max_date, this.current_time, 3)
                        ? this.localMaxDate[i]
                        : this.curTMoreThanMax
                            ? this.localMaxDate[i]
                            : 23;
                    this.initData(tempArray, min, max, this.localeNew.hour, i);
                    break;
                case 4:
                    min = this.judgeEqualArray(this.min_date, this.current_time, 4)
                        ? this.localMinDate[i]
                        : this.curTLessThanMin
                            ? this.localMinDate[i]
                            : 0;
                    max = this.judgeEqualArray(this.max_date, this.current_time, 4)
                        ? this.localMaxDate[i]
                        : this.curTMoreThanMax
                            ? this.localMaxDate[i]
                            : 59;
                    this.initData(tempArray, min, max, this.localeNew.minute, i);
                    break;
                case 5:
                    min = 0;
                    max = 1;
                    this.initData(tempArray, min, max, 'use12Hours', i);
                    break;
            }
        }
    };
    /**
     * @param {?} tempArr
     * @param {?} min
     * @param {?} max
     * @param {?} str
     * @param {?} idx
     * @return {?}
     */
    DatePickerComponent.prototype.initData = /**
     * @param {?} tempArr
     * @param {?} min
     * @param {?} max
     * @param {?} str
     * @param {?} idx
     * @return {?}
     */
    function (tempArr, min, max, str, idx) {
        /** @type {?} */
        var dataWithStr = [];
        /** @type {?} */
        var increaseValue = str === this.localeNew.minute ? this.options.minuteStep : 1;
        for (min; min < max + 1; min += increaseValue) {
            tempArr.push(min);
            dataWithStr.push(min + str);
        }
        if (this.data.length > this.indexArray.length) {
            this.data = [];
            this.dataWithStr = [];
        }
        if (this.data.length > idx && this.data[idx].toString() !== tempArr.toString()) {
            this.data[idx] = tempArr;
        }
        else if (this.data.length > idx && this.data[idx].toString() === tempArr.toString()) {
            this.data[idx] = tempArr;
        }
        else {
            this.data.push(tempArr);
        }
        if (this.options.locale === undefined || this.options.locale.locale === 'zh_CN') {
            if (this.dataWithStr.length > idx && this.dataWithStr[idx].toString() !== dataWithStr.toString()) {
                this.dataWithStr[idx] = dataWithStr;
            }
            else if (this.dataWithStr.length > idx && this.dataWithStr[idx].toString() === dataWithStr.toString()) {
                this.dataWithStr[idx] = dataWithStr;
            }
            else {
                this.dataWithStr.push(dataWithStr);
            }
        }
        else {
            this.dataWithStr = this.data;
        }
    };
    /**
     * @return {?}
     */
    DatePickerComponent.prototype.ok = /**
     * @return {?}
     */
    function () {
        this.options.onOk.emit(this.handleReslut());
        this.setTransitionName();
    };
    /**
     * @return {?}
     */
    DatePickerComponent.prototype.handleReslut = /**
     * @return {?}
     */
    function () {
        var _this = this;
        /** @type {?} */
        var result = '';
        if (this.options.mode === 'datetime' || this.options.mode === 'time') {
            /** @type {?} */
            var temp = this.resultArr;
            result = temp.slice(0, 3).join('-') + ' ' + temp.slice(3, 5).join(':');
        }
        else {
            if (this.resultArr.length < 3) {
                this.resultArr.push('1');
            }
            result = this.resultArr
                .map((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                return _this.preZero(parseInt(v, 0));
            }))
                .join('-');
        }
        this.resultDate = new Date(result.replace(/-/g, '/'));
        if (this.options.minDate.getTime() > this.resultDate.getTime()) {
            if (this.resultArr.length > 0) {
                for (var index = 0; index < this.resultArr.length; index++) {
                    this.resultArr = this.min_date;
                    this.currentTime = this.resultArr;
                    this.current_time = this.currentTime;
                }
            }
            this.resultDate = this.options.minDate;
        }
        return this.resultDate;
    };
    /**
     * @return {?}
     */
    DatePickerComponent.prototype.cancel = /**
     * @return {?}
     */
    function () {
        this.options.onDismiss.emit();
        this.setTransitionName();
    };
    /**
     * @return {?}
     */
    DatePickerComponent.prototype.setTransitionName = /**
     * @return {?}
     */
    function () {
        var _this = this;
        this.transitionName = 'am-slide-up-leave am-slide-up-leave-active';
        this.maskTransitionName = 'am-fade-leave am-fade-leave-active';
        setTimeout((/**
         * @return {?}
         */
        function () {
            _this.options.hidePicker();
        }), 200);
    };
    /**
     * @param {?} checkIdx
     * @param {?} sta
     * @param {?} indexT
     * @return {?}
     */
    DatePickerComponent.prototype.setCurrentSelected = /**
     * @param {?} checkIdx
     * @param {?} sta
     * @param {?} indexT
     * @return {?}
     */
    function (checkIdx, sta, indexT) {
        if (checkIdx >= this.clos - 1) {
            return;
        }
        /** @type {?} */
        var status = null;
        if (sta) {
            status = this.judgeEqualArray(this.min_date, this.resultArr, checkIdx + 1);
        }
        else {
            status = this.judgeEqualArray(this.max_date, this.resultArr, checkIdx + 1);
        }
        if (!status) {
            /** @type {?} */
            var min = 0;
            /** @type {?} */
            var max = 0;
            /** @type {?} */
            var str = '';
            /** @type {?} */
            var realIdx = this.indexArray[checkIdx];
            switch (realIdx) {
                case 0:
                    min = this.judgeEqualArray(this.min_date, this.current_time, 1) ? this.localMinDate[checkIdx + 1] : 1;
                    max = this.judgeEqualArray(this.max_date, this.current_time, 1) ? this.localMaxDate[checkIdx + 1] : 12;
                    str = '月';
                    break;
                case 1:
                    min = this.judgeEqualArray(this.min_date, this.current_time, 2)
                        ? this.localMinDate[checkIdx + 1]
                        : this.curTLessThanMin
                            ? this.localMinDate[checkIdx + 1]
                            : 1;
                    max = this.judgeEqualArray(this.max_date, this.current_time, 2)
                        ? this.localMaxDate[checkIdx + 1]
                        : new Date(this.current_time[0], this.current_time[1], 0).getDate();
                    str = '日';
                    break;
                case 2:
                    min = this.judgeEqualArray(this.min_date, this.current_time, 3)
                        ? this.localMinDate[checkIdx + 1]
                        : this.curTLessThanMin
                            ? this.localMinDate[checkIdx + 1]
                            : 0;
                    max = this.judgeEqualArray(this.max_date, this.current_time, 3)
                        ? this.localMaxDate[checkIdx + 1]
                        : this.curTMoreThanMax
                            ? this.localMaxDate[checkIdx + 1]
                            : 23;
                    str = '时';
                    break;
                case 3:
                    min = this.judgeEqualArray(this.min_date, this.current_time, 4)
                        ? this.localMinDate[checkIdx + 1]
                        : this.curTLessThanMin
                            ? this.localMinDate[checkIdx + 1]
                            : 0;
                    max = this.judgeEqualArray(this.max_date, this.current_time, 4)
                        ? this.localMaxDate[checkIdx + 1]
                        : this.curTMoreThanMax
                            ? this.localMaxDate[checkIdx + 1]
                            : 59;
                    str = '分';
                    break;
            }
            this.initRangeArr(min, max, indexT, checkIdx + 1, str);
        }
        this.setCurrentSelected(checkIdx + 1, sta, indexT);
    };
    /**
     * @param {?} min
     * @param {?} max
     * @param {?} indexT
     * @param {?} checkIdx
     * @param {?} str
     * @return {?}
     */
    DatePickerComponent.prototype.initRangeArr = /**
     * @param {?} min
     * @param {?} max
     * @param {?} indexT
     * @param {?} checkIdx
     * @param {?} str
     * @return {?}
     */
    function (min, max, indexT, checkIdx, str) {
        var _this = this;
        /** @type {?} */
        var realIdx = this.indexArray[checkIdx];
        /** @type {?} */
        var arr = [];
        /** @type {?} */
        var targetLong = 0;
        /** @type {?} */
        var increaseValue = str === this.localeNew.minute ? this.options.minuteStep : 1;
        for (var index = min; index < max + 1; index += increaseValue) {
            arr.push(index);
        }
        if (arr.indexOf(this.resultArr[checkIdx]) == -1) {
            if (-this.selectedTarget[checkIdx].currentY > max - min) {
                indexT = max - min;
                this.selectedTarget[checkIdx].currentY = -indexT;
            }
            targetLong = -arr.length * this.lineHeight;
        }
        else {
            targetLong = -arr.indexOf(this.resultArr[checkIdx]) * this.lineHeight;
            this.selectedTarget[checkIdx].currentY = -arr.indexOf(this.resultArr[checkIdx]);
        }
        if (this.data[checkIdx].toString() !== arr.toString()) {
            if (checkIdx >= 3) {
                this.current_time[realIdx] = -targetLong / this.lineHeight;
                this.resultArr[checkIdx] = -targetLong / this.lineHeight;
            }
            else {
                this.current_time[realIdx] = -targetLong / this.lineHeight + 1;
                this.resultArr[checkIdx] = -targetLong / this.lineHeight + 1;
            }
            this.data[checkIdx] = arr;
            this.dataWithStr[checkIdx] =
                this.options.locale.locale === 'zh_CN'
                    ? arr.map((/**
                     * @param {?} item
                     * @return {?}
                     */
                    function (item) {
                        return item + str;
                    }))
                    : arr;
            setTimeout((/**
             * @return {?}
             */
            function () {
                _this.selectedTarget.forEach((/**
                 * @param {?} item
                 * @param {?} i
                 * @return {?}
                 */
                function (item, i) {
                    if (i >= checkIdx) {
                        _this.currentPicker.children[i].children[2].style.transition = '';
                        /** @type {?} */
                        var index = parseInt(item.currentY, 0);
                        _this.currentPicker.children[i].children[2].style.transform = "translateY(" + index * _this.lineHeight + "px)";
                    }
                }));
            }), 0);
        }
    };
    /**
     * @param {?} event
     * @return {?}
     */
    DatePickerComponent.prototype.getEventTarget = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        if (event.type === 'mousedown' ||
            event.type === 'mousemove' ||
            event.type === 'mouseup' ||
            event.type === 'mouseleave') {
            return event;
        }
        else {
            if (event && event.changedTouches && event.changedTouches[0]) {
                return event.changedTouches[0];
            }
            return null;
        }
    };
    /**
     * @return {?}
     */
    DatePickerComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        this.checkMode(this.options.mode);
        /** @type {?} */
        var value = this.transformDateFormat(this.options.value).split('-');
        if (value.length > 1) {
            this.current_time = this.currentTime = value.map((/**
             * @param {?} item
             * @return {?}
             */
            function (item) {
                return parseInt(item, 0);
            }));
        }
        else {
            this.currentTime = this.current_time;
        }
        this.localeProvider();
    };
    /**
     * @return {?}
     */
    DatePickerComponent.prototype.ngAfterViewInit = /**
     * @return {?}
     */
    function () {
        this.reloadPicker();
    };
    /**
     * @return {?}
     */
    DatePickerComponent.prototype.ngOnDestroy = /**
     * @return {?}
     */
    function () {
        this.unsubscribe$.next();
        this.unsubscribe$.complete();
    };
    DatePickerComponent.decorators = [
        { type: Component, args: [{
                    selector: 'DatePicker, nzm-date-picker',
                    template: "<div *ngIf=\"options.mask\" class=\"am-picker-popup-mask {{ maskTransitionName }}\" (click)=\"cancel()\"></div>\n<div class=\"am-picker-popup {{ transitionName }}\" style=\"z-index: 1000\">\n  <div class=\"am-picker-popup-content\">\n    <div class=\"am-picker-popup-body\">\n      <div>\n        <div class=\"am-picker-popup-header\">\n          <div class=\"am-picker-popup-item am-picker-popup-header-left\" (click)=\"cancel()\">\n            {{ options.dismissText }}\n          </div>\n          <div class=\"am-picker-popup-item am-picker-popup-title\">{{ options.title }}</div>\n          <div class=\"am-picker-popup-item am-picker-popup-header-right\" (click)=\"ok()\">\n            {{ options.okText }}\n          </div>\n        </div>\n        <div #picker class=\"am-picker\" style=\"flex-direction: row; align-items: center;\">\n          <div *ngFor=\"let item of dataWithStr; let i = index\" class=\"am-picker-col\">\n            <div class=\"am-picker-col-indicator \" style=\"top: 102px;\"></div>\n            <div id=\"{{ i }}\" class=\"am-picker-col-mask\" style=\"background-size: 100% 102px;\"></div>\n            <div class=\"am-picker-col-content\">\n              <div id=\"{{ i }}\" class=\"am-picker-col-item\" *ngFor=\"let val of item; let i = index\">\n                {{ val.label ? val.label : val }}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </div>\n  </div>\n</div>\n",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    /** @nocollapse */
    DatePickerComponent.ctorParameters = function () { return [
        { type: ElementRef },
        { type: DatePickerOptions },
        { type: ToastService },
        { type: LocaleProviderService }
    ]; };
    DatePickerComponent.propDecorators = {
        picker: [{ type: ViewChild, args: ['picker', { static: true, read: ViewContainerRef },] }],
        panstart: [{ type: HostListener, args: ['mousedown', ['$event'],] }, { type: HostListener, args: ['touchstart', ['$event'],] }],
        panmove: [{ type: HostListener, args: ['mousemove', ['$event'],] }, { type: HostListener, args: ['touchmove', ['$event'],] }],
        panend: [{ type: HostListener, args: ['mouseleave', ['$event'],] }, { type: HostListener, args: ['mouseup', ['$event'],] }, { type: HostListener, args: ['touchend', ['$event'],] }]
    };
    return DatePickerComponent;
}());
if (false) {
    /** @type {?} */
    DatePickerComponent.prototype.transitionName;
    /** @type {?} */
    DatePickerComponent.prototype.maskTransitionName;
    /** @type {?} */
    DatePickerComponent.prototype.modeSwitch;
    /** @type {?} */
    DatePickerComponent.prototype.localMinDate;
    /** @type {?} */
    DatePickerComponent.prototype.localMaxDate;
    /** @type {?} */
    DatePickerComponent.prototype.currentTime;
    /** @type {?} */
    DatePickerComponent.prototype.indexArray;
    /** @type {?} */
    DatePickerComponent.prototype.min_date;
    /** @type {?} */
    DatePickerComponent.prototype.max_date;
    /** @type {?} */
    DatePickerComponent.prototype.current_time;
    /** @type {?} */
    DatePickerComponent.prototype.clos;
    /** @type {?} */
    DatePickerComponent.prototype.resultArr;
    /** @type {?} */
    DatePickerComponent.prototype.resultDate;
    /** @type {?} */
    DatePickerComponent.prototype.data;
    /** @type {?} */
    DatePickerComponent.prototype.dataWithStr;
    /** @type {?} */
    DatePickerComponent.prototype.startY;
    /** @type {?} */
    DatePickerComponent.prototype.differY;
    /** @type {?} */
    DatePickerComponent.prototype.currentY;
    /** @type {?} */
    DatePickerComponent.prototype.len;
    /** @type {?} */
    DatePickerComponent.prototype.dom;
    /** @type {?} */
    DatePickerComponent.prototype.index;
    /** @type {?} */
    DatePickerComponent.prototype.maxY;
    /** @type {?} */
    DatePickerComponent.prototype.lineHeight;
    /** @type {?} */
    DatePickerComponent.prototype.selectedTarget;
    /** @type {?} */
    DatePickerComponent.prototype.isMouseDown;
    /** @type {?} */
    DatePickerComponent.prototype.currentPicker;
    /** @type {?} */
    DatePickerComponent.prototype.localeNew;
    /** @type {?} */
    DatePickerComponent.prototype.unsubscribe$;
    /** @type {?} */
    DatePickerComponent.prototype.Velocity;
    /** @type {?} */
    DatePickerComponent.prototype.errorMessage;
    /** @type {?} */
    DatePickerComponent.prototype.curTLessThanMin;
    /** @type {?} */
    DatePickerComponent.prototype.curTMoreThanMax;
    /** @type {?} */
    DatePickerComponent.prototype.ngModelOnChange;
    /** @type {?} */
    DatePickerComponent.prototype.ngModelOnTouched;
    /** @type {?} */
    DatePickerComponent.prototype.picker;
    /** @type {?} */
    DatePickerComponent.prototype.elementRef;
    /** @type {?} */
    DatePickerComponent.prototype.options;
    /** @type {?} */
    DatePickerComponent.prototype.toast;
    /** @type {?} */
    DatePickerComponent.prototype.localeProviderService;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var DatePickerViewComponent = /** @class */ (function (_super) {
    __extends(DatePickerViewComponent, _super);
    function DatePickerViewComponent() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.mode = 'date';
        _this.minDate = new Date(2000, 5, 1, 0, 0, 0);
        _this.maxDate = new Date(2030, 1, 1, 23, 59, 59);
        _this.value = new Date();
        _this.disabled = false;
        _this.indicatorStyle = {};
        _this.showErrorToast = true;
        _this.showErrorToastInterval = 2000;
        _this.onValueChange = new EventEmitter();
        _this.amPicker = true;
        return _this;
    }
    Object.defineProperty(DatePickerViewComponent.prototype, "locale", {
        get: /**
         * @return {?}
         */
        function () {
            return this.options.locale;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.options.locale = value;
            this.unsubscribe$.next();
            this.unsubscribe$.complete();
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @return {?}
     */
    DatePickerViewComponent.prototype.reloadPicker = /**
     * @return {?}
     */
    function () {
        if (this.currentPicker) {
            /** @type {?} */
            var self_1 = this;
            setTimeout((/**
             * @return {?}
             */
            function () {
                self_1.selectedTarget.forEach((/**
                 * @param {?} item
                 * @param {?} i
                 * @return {?}
                 */
                function (item, i) {
                    self_1.currentPicker.children[i].children[2].style.transition = 'transform .3s';
                    /** @type {?} */
                    var index = parseInt(item.currentY, 0);
                    self_1.currentPicker.children[i].children[2].style.transform = "translateY(" + index * self_1.lineHeight + "px)";
                }));
            }), 0);
        }
    };
    /**
     * @param {?} value
     * @return {?}
     */
    DatePickerViewComponent.prototype.writeValue = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        if (value) {
            this.value = value;
            this.optionInit();
            this.init();
        }
    };
    /**
     * @param {?} fn
     * @return {?}
     */
    DatePickerViewComponent.prototype.registerOnChange = /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) {
        this.ngModelOnChange = fn;
    };
    /**
     * @param {?} fn
     * @return {?}
     */
    DatePickerViewComponent.prototype.registerOnTouched = /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) {
        this.ngModelOnTouched = fn;
    };
    /**
     * @param {?} isDisabled
     * @return {?}
     */
    DatePickerViewComponent.prototype.setDisabledState = /**
     * @param {?} isDisabled
     * @return {?}
     */
    function (isDisabled) {
        this.disabled = isDisabled;
    };
    /**
     * @return {?}
     */
    DatePickerViewComponent.prototype.optionInit = /**
     * @return {?}
     */
    function () {
        this.options.mode = this.mode;
        this.options.minDate = this.minDate;
        this.options.maxDate = this.maxDate;
        this.options.disabled = this.disabled;
        this.options.locale = this.locale;
        this.options.value = this.value;
        this.options.showErrorToast = this.showErrorToast;
        this.options.showErrorToastInterval = this.showErrorToastInterval;
        this.options.onValueChange = this.onValueChange;
        this.checkMode(this.options.mode);
        /** @type {?} */
        var value = this.transformDateFormat(this.options.value).split('-');
        if (value.length > 0) {
            this.currentTime = value.map((/**
             * @param {?} item
             * @return {?}
             */
            function (item) {
                return parseInt(item, 0);
            }));
        }
    };
    /**
     * @return {?}
     */
    DatePickerViewComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        this.optionInit();
        this.localeProvider();
    };
    /**
     * @return {?}
     */
    DatePickerViewComponent.prototype.ngAfterViewInit = /**
     * @return {?}
     */
    function () {
        this.currentPicker = this.elementRef.nativeElement;
        this.reloadPicker();
    };
    /**
     * @param {?} changes
     * @return {?}
     */
    DatePickerViewComponent.prototype.ngOnChanges = /**
     * @param {?} changes
     * @return {?}
     */
    function (changes) {
        if (changes.value) {
            this.options.value = changes.value.currentValue;
            /** @type {?} */
            var value = this.transformDateFormat(this.options.value).split('-');
            if (value.length > 0) {
                this.currentTime = value.map((/**
                 * @param {?} item
                 * @return {?}
                 */
                function (item) {
                    return parseInt(item, 0);
                }));
            }
            if (!this.judgeEqualArray(this.currentTime, this.resultArr, this.resultArr.length) ||
                this.judgeEqualArray(this.currentTime, this.min_date, this.currentTime.length) ||
                this.judgeTime(this.currentTime, this.max_date)) {
                this.optionInit();
                this.init();
            }
        }
        if (changes.mode || changes.minDate || changes.maxDate || changes.disabled || changes.locale) {
            this.optionInit();
            this.init();
        }
    };
    DatePickerViewComponent.decorators = [
        { type: Component, args: [{
                    selector: 'DatePickerView, nzm-date-picker-view',
                    template: "<div *ngFor=\"let item of dataWithStr; let i = index\" class=\"am-picker-col\">\n  <div class=\"am-picker-col-indicator \" style=\"top: 102px;\" [ngStyle]=\"indicatorStyle\"></div>\n  <div id=\"{{ i }}\" class=\"am-picker-col-mask\" style=\"background-size: 100% 102px;\"></div>\n  <div class=\"am-picker-col-content\">\n    <div id=\"{{ i }}\" *ngFor=\"let val of item; let i = index\" class=\"am-picker-col-item\">\n      {{ val.label ? val.label : val }}\n    </div>\n  </div>\n</div>\n",
                    encapsulation: ViewEncapsulation.None,
                    providers: [
                        {
                            provide: NG_VALUE_ACCESSOR,
                            useExisting: forwardRef((/**
                             * @return {?}
                             */
                            function () { return DatePickerViewComponent; })),
                            multi: true
                        }
                    ]
                }] }
    ];
    DatePickerViewComponent.propDecorators = {
        mode: [{ type: Input }],
        minDate: [{ type: Input }],
        maxDate: [{ type: Input }],
        value: [{ type: Input }],
        disabled: [{ type: Input }],
        indicatorStyle: [{ type: Input }],
        locale: [{ type: Input }],
        showErrorToast: [{ type: Input }],
        showErrorToastInterval: [{ type: Input }],
        onValueChange: [{ type: Output }],
        amPicker: [{ type: HostBinding, args: ['class.am-picker',] }]
    };
    return DatePickerViewComponent;
}(DatePickerComponent));
if (false) {
    /** @type {?} */
    DatePickerViewComponent.prototype.mode;
    /** @type {?} */
    DatePickerViewComponent.prototype.minDate;
    /** @type {?} */
    DatePickerViewComponent.prototype.maxDate;
    /** @type {?} */
    DatePickerViewComponent.prototype.value;
    /** @type {?} */
    DatePickerViewComponent.prototype.disabled;
    /** @type {?} */
    DatePickerViewComponent.prototype.indicatorStyle;
    /** @type {?} */
    DatePickerViewComponent.prototype.showErrorToast;
    /** @type {?} */
    DatePickerViewComponent.prototype.showErrorToastInterval;
    /** @type {?} */
    DatePickerViewComponent.prototype.onValueChange;
    /** @type {?} */
    DatePickerViewComponent.prototype.amPicker;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var DatePickerDirective = /** @class */ (function () {
    function DatePickerDirective(_viewContainerRef, _defaultOptions, _cfr) {
        this._viewContainerRef = _viewContainerRef;
        this._defaultOptions = _defaultOptions;
        this._cfr = _cfr;
        this._eventListeners = [];
        this.minuteStep = 1;
        this.value = new Date();
        this.onVisibleChange = new EventEmitter(true);
        this.onValueChange = new EventEmitter();
        this.onOk = new EventEmitter();
        this.onDismiss = new EventEmitter();
    }
    /**
     * @return {?}
     */
    DatePickerDirective.prototype.togglePicker = /**
     * @return {?}
     */
    function () {
        if (!this.picker) {
            this.showPicker();
        }
        else {
            this.hidePicker();
        }
    };
    /**
     * @return {?}
     */
    DatePickerDirective.prototype.showPicker = /**
     * @return {?}
     */
    function () {
        var _this = this;
        if (!this.picker && !this.disabled) {
            setTimeout((/**
             * @return {?}
             */
            function () {
                _this._eventListeners = [];
            }));
            /** @type {?} */
            var options_1 = new DatePickerOptions();
            Object.assign(options_1, this._defaultOptions, {
                hidePicker: (/**
                 * @param {?} event
                 * @return {?}
                 */
                function (event) {
                    _this.hidePicker();
                }),
                updateNgModel: (/**
                 * @param {?} value
                 * @return {?}
                 */
                function (value) {
                    if (_this._ngModelOnChange) {
                        _this.value = value;
                        _this._ngModelOnChange(value);
                    }
                })
            });
            /** @type {?} */
            var optionalParams = [
                'mode',
                'minDate',
                'maxDate',
                'minuteStep',
                'value',
                'mask',
                'title',
                'okText',
                'dismissText',
                'disabled',
                'locale',
                'appendToBody',
                'showErrorToast',
                'showErrorToastInterval',
                'onOk',
                'onDismiss',
                'onValueChange'
            ];
            optionalParams.forEach((/**
             * @param {?} param
             * @return {?}
             */
            function (param) {
                if (typeof _this[param] !== 'undefined') {
                    ((/** @type {?} */ (options_1)))[param] = _this[param];
                }
            }));
            /** @type {?} */
            var componentFactory = this._cfr.resolveComponentFactory(DatePickerComponent);
            /** @type {?} */
            var childInjector = Injector.create([
                {
                    provide: DatePickerOptions,
                    useValue: options_1
                }
            ]);
            this.picker = this._viewContainerRef.createComponent(componentFactory, this._viewContainerRef.length, childInjector);
            if (options_1.appendToBody) {
                document.body.appendChild(this.picker.location.nativeElement);
            }
            this.onVisibleChange.emit(true);
        }
    };
    /**
     * @return {?}
     */
    DatePickerDirective.prototype.hidePicker = /**
     * @return {?}
     */
    function () {
        if (this.picker) {
            this.picker.destroy();
            delete this.picker;
            this.onVisibleChange.emit(false);
            this._eventListeners.forEach((/**
             * @param {?} fn
             * @return {?}
             */
            function (fn) { return fn(); }));
            this._eventListeners = [];
        }
    };
    /**
     * @param {?} value
     * @return {?}
     */
    DatePickerDirective.prototype.writeValue = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        this.value = value;
    };
    /**
     * @param {?} fn
     * @return {?}
     */
    DatePickerDirective.prototype.registerOnChange = /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) {
        this._ngModelOnChange = fn;
    };
    /**
     * @param {?} fn
     * @return {?}
     */
    DatePickerDirective.prototype.registerOnTouched = /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) {
        this._ngModelOnTouched = fn;
    };
    /**
     * @param {?} isDisabled
     * @return {?}
     */
    DatePickerDirective.prototype.setDisabledState = /**
     * @param {?} isDisabled
     * @return {?}
     */
    function (isDisabled) {
        this.disabled = isDisabled;
    };
    /**
     * @return {?}
     */
    DatePickerDirective.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        this.onVisibleChange.emit(false);
    };
    /**
     * @param {?} changes
     * @return {?}
     */
    DatePickerDirective.prototype.ngOnChanges = /**
     * @param {?} changes
     * @return {?}
     */
    function (changes) {
        if (changes.isOpen) {
            if (changes.isOpen.currentValue === true) {
                this.showPicker();
            }
            else {
                this.hidePicker();
            }
        }
    };
    /**
     * @return {?}
     */
    DatePickerDirective.prototype.ngOnDestroy = /**
     * @return {?}
     */
    function () {
        this.hidePicker();
    };
    DatePickerDirective.decorators = [
        { type: Directive, args: [{
                    selector: '[DatePicker]',
                    providers: [
                        {
                            provide: NG_VALUE_ACCESSOR,
                            useExisting: forwardRef((/**
                             * @return {?}
                             */
                            function () { return DatePickerDirective; })),
                            multi: true
                        }
                    ]
                },] }
    ];
    /** @nocollapse */
    DatePickerDirective.ctorParameters = function () { return [
        { type: ViewContainerRef },
        { type: DatePickerOptions },
        { type: ComponentFactoryResolver }
    ]; };
    DatePickerDirective.propDecorators = {
        isOpen: [{ type: Input }],
        mode: [{ type: Input }],
        minDate: [{ type: Input }],
        maxDate: [{ type: Input }],
        use12Hours: [{ type: Input }],
        minuteStep: [{ type: Input }],
        value: [{ type: Input }],
        mask: [{ type: Input }],
        title: [{ type: Input }],
        okText: [{ type: Input }],
        dismissText: [{ type: Input }],
        disabled: [{ type: Input }],
        locale: [{ type: Input }],
        appendToBody: [{ type: Input }],
        showErrorToast: [{ type: Input }],
        showErrorToastInterval: [{ type: Input }],
        onVisibleChange: [{ type: Output }],
        onValueChange: [{ type: Output }],
        onOk: [{ type: Output }],
        onDismiss: [{ type: Output }],
        togglePicker: [{ type: HostListener, args: ['click',] }]
    };
    return DatePickerDirective;
}());
if (false) {
    /** @type {?} */
    DatePickerDirective.prototype.picker;
    /**
     * @type {?}
     * @private
     */
    DatePickerDirective.prototype._eventListeners;
    /**
     * @type {?}
     * @private
     */
    DatePickerDirective.prototype._ngModelOnChange;
    /**
     * @type {?}
     * @private
     */
    DatePickerDirective.prototype._ngModelOnTouched;
    /** @type {?} */
    DatePickerDirective.prototype.isOpen;
    /** @type {?} */
    DatePickerDirective.prototype.mode;
    /** @type {?} */
    DatePickerDirective.prototype.minDate;
    /** @type {?} */
    DatePickerDirective.prototype.maxDate;
    /** @type {?} */
    DatePickerDirective.prototype.use12Hours;
    /** @type {?} */
    DatePickerDirective.prototype.minuteStep;
    /** @type {?} */
    DatePickerDirective.prototype.value;
    /** @type {?} */
    DatePickerDirective.prototype.mask;
    /** @type {?} */
    DatePickerDirective.prototype.title;
    /** @type {?} */
    DatePickerDirective.prototype.okText;
    /** @type {?} */
    DatePickerDirective.prototype.dismissText;
    /** @type {?} */
    DatePickerDirective.prototype.disabled;
    /** @type {?} */
    DatePickerDirective.prototype.locale;
    /** @type {?} */
    DatePickerDirective.prototype.appendToBody;
    /** @type {?} */
    DatePickerDirective.prototype.showErrorToast;
    /** @type {?} */
    DatePickerDirective.prototype.showErrorToastInterval;
    /** @type {?} */
    DatePickerDirective.prototype.onVisibleChange;
    /** @type {?} */
    DatePickerDirective.prototype.onValueChange;
    /** @type {?} */
    DatePickerDirective.prototype.onOk;
    /** @type {?} */
    DatePickerDirective.prototype.onDismiss;
    /**
     * @type {?}
     * @private
     */
    DatePickerDirective.prototype._viewContainerRef;
    /**
     * @type {?}
     * @private
     */
    DatePickerDirective.prototype._defaultOptions;
    /**
     * @type {?}
     * @private
     */
    DatePickerDirective.prototype._cfr;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var DatePickerModule = /** @class */ (function () {
    function DatePickerModule() {
    }
    DatePickerModule.decorators = [
        { type: NgModule, args: [{
                    imports: [CommonModule, LocaleProviderModule, ToastModule, FormsModule],
                    exports: [DatePickerComponent, DatePickerDirective],
                    declarations: [DatePickerComponent, DatePickerDirective],
                    entryComponents: [DatePickerComponent],
                    providers: [DatePickerOptions, LocaleProviderModule]
                },] }
    ];
    return DatePickerModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var DatePickerViewModule = /** @class */ (function () {
    function DatePickerViewModule() {
    }
    DatePickerViewModule.decorators = [
        { type: NgModule, args: [{
                    imports: [CommonModule, DatePickerModule, LocaleProviderModule, ToastModule, FormsModule],
                    exports: [DatePickerViewComponent],
                    declarations: [DatePickerViewComponent],
                    providers: [LocaleProviderModule]
                },] }
    ];
    return DatePickerViewModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var CalendarSingleMonthComponent = /** @class */ (function () {
    function CalendarSingleMonthComponent(_elementRef) {
        var _this = this;
        this._elementRef = _elementRef;
        this.props = (/** @type {?} */ ({
            rowSize: 'normal'
        }));
        this.state = {
            weekComponents: []
        };
        this.singleMonth = true;
        this.genWeek = (/**
         * @param {?} weeksData
         * @param {?} index
         * @return {?}
         */
        function (weeksData, index) {
            var _a = _this.props, getDateExtra = _a.getDateExtra, monthData = _a.monthData, onCellClick = _a.onCellClick, locale = _a.locale, rowSize = _a.rowSize;
            /** @type {?} */
            var rowCls = 'row';
            /** @type {?} */
            var weeksDataList = [];
            if (rowSize === 'xl') {
                rowCls += ' row-xl';
            }
            weeksData.forEach((/**
             * @param {?} day
             * @param {?} dayOfWeek
             * @return {?}
             */
            function (day, dayOfWeek) {
                /** @type {?} */
                var extra = (getDateExtra && getDateExtra(new Date(day.tick))) || {};
                /** @type {?} */
                var info = extra.info;
                /** @type {?} */
                var disable = extra.disable || day.outOfDate;
                /** @type {?} */
                var cls = 'date';
                /** @type {?} */
                var lCls = 'left';
                /** @type {?} */
                var rCls = 'right';
                /** @type {?} */
                var infoCls = 'info';
                if (dayOfWeek === 0 || dayOfWeek === 6) {
                    cls += ' grey';
                }
                if (disable) {
                    cls += ' disable';
                }
                else if (info) {
                    cls += ' important';
                }
                if (day.selected) {
                    cls += ' date-selected';
                    /** @type {?} */
                    var styleType = day.selected;
                    switch (styleType) {
                        case DateModels.SelectType.Only:
                            info = locale.begin;
                            infoCls += ' date-selected';
                            break;
                        case DateModels.SelectType.All:
                            info = locale.begin_over;
                            infoCls += ' date-selected';
                            break;
                        case DateModels.SelectType.Start:
                            info = locale.begin;
                            infoCls += ' date-selected';
                            if (dayOfWeek === 6 || day.isLastOfMonth) {
                                styleType = DateModels.SelectType.All;
                            }
                            break;
                        case DateModels.SelectType.Middle:
                            if (dayOfWeek === 0 || day.isFirstOfMonth) {
                                if (day.isLastOfMonth || dayOfWeek === 6) {
                                    styleType = DateModels.SelectType.All;
                                }
                                else {
                                    styleType = DateModels.SelectType.Start;
                                }
                            }
                            else if (dayOfWeek === 6 || day.isLastOfMonth) {
                                styleType = DateModels.SelectType.End;
                            }
                            break;
                        case DateModels.SelectType.End:
                            info = locale.over;
                            infoCls += ' date-selected';
                            if (dayOfWeek === 0 || day.isFirstOfMonth) {
                                styleType = DateModels.SelectType.All;
                            }
                            break;
                    }
                    switch (styleType) {
                        case DateModels.SelectType.Single:
                        case DateModels.SelectType.Only:
                        case DateModels.SelectType.All:
                            cls += ' selected-single';
                            break;
                        case DateModels.SelectType.Start:
                            cls += ' selected-start';
                            rCls += ' date-selected';
                            break;
                        case DateModels.SelectType.Middle:
                            cls += ' selected-middle';
                            lCls += ' date-selected';
                            rCls += ' date-selected';
                            break;
                        case DateModels.SelectType.End:
                            cls += ' selected-end';
                            lCls += ' date-selected';
                            break;
                    }
                }
                weeksDataList[dayOfWeek] = {
                    lCls: lCls,
                    cls: cls,
                    day: day,
                    rCls: rCls,
                    infoCls: infoCls,
                    info: info,
                    extra: extra,
                    disable: disable,
                    onCellClick: onCellClick,
                    monthData: monthData
                };
            }));
            _this.state.weekComponents[index] = {
                index: index,
                rowCls: rowCls,
                weeksDataList: weeksDataList
            };
        });
        this.updateWeeks = (/**
         * @param {?=} monthData
         * @return {?}
         */
        function (monthData) {
            (monthData || _this.props.monthData).weeks.forEach((/**
             * @param {?} week
             * @param {?} index
             * @return {?}
             */
            function (week, index) {
                _this.genWeek(week, index);
            }));
        });
        this.setWarpper = (/**
         * @param {?} dom
         * @return {?}
         */
        function (dom) {
            _this.wrapperDivDOM = dom;
        });
    }
    Object.defineProperty(CalendarSingleMonthComponent.prototype, "data", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.props = __assign({}, this.props, value);
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @param {?} item
     * @return {?}
     */
    CalendarSingleMonthComponent.prototype.onClickCell = /**
     * @param {?} item
     * @return {?}
     */
    function (item) {
        if (!item.disable && item.onCellClick) {
            item.onCellClick(item.day, item.monthData);
        }
    };
    /**
     * @return {?}
     */
    CalendarSingleMonthComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        var _this = this;
        this.setWarpper(this._elementRef.nativeElement);
        this.props.monthData.weeks.forEach((/**
         * @param {?} week
         * @param {?} index
         * @return {?}
         */
        function (week, index) {
            _this.genWeek(week, index);
        }));
    };
    /**
     * @return {?}
     */
    CalendarSingleMonthComponent.prototype.ngAfterViewInit = /**
     * @return {?}
     */
    function () {
        this.ref = this.props.ref;
        this.ref(this);
    };
    CalendarSingleMonthComponent.decorators = [
        { type: Component, args: [{
                    selector: 'CalendarSingleMonth, nzm-single-month',
                    template: "<div class=\"month-title\">\n  {{ props.monthData.title }}\n</div>\n<div class=\"date\">\n  <div *ngFor=\"let row of state.weekComponents; let i = index\" [ngClass]=\"row.rowCls\">\n    <div\n      *ngFor=\"let cell of row.weeksDataList; let j = index\"\n      class=\"{{ 'cell ' + ((row.extra && row.extra.cellCls) || '') }}\"\n      (click)=\"onClickCell(cell)\"\n    >\n      <div *ngIf=\"row.extra && row.extra.cellRender\">test</div>\n      <div *ngIf=\"!row.extra || (row.extra && row.extra.cellRender)\" class=\"date-wrapper\">\n        <span [ngClass]=\"cell.lCls\"></span>\n        <div [ngClass]=\"cell.cls\">\n          {{ (cell.day && cell.day.dayOfMonth) || '' }}\n        </div>\n        <span [ngClass]=\"cell.rCls\"></span>\n      </div>\n      <div *ngIf=\"!row.extra || (row.extra && row.extra.cellRender)\" [ngClass]=\"cell.infoCls\">\n        {{ cell.info }}\n      </div>\n    </div>\n  </div>\n</div>\n",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    /** @nocollapse */
    CalendarSingleMonthComponent.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    CalendarSingleMonthComponent.propDecorators = {
        data: [{ type: Input }],
        singleMonth: [{ type: HostBinding, args: ['class.single-month',] }]
    };
    return CalendarSingleMonthComponent;
}());
if (false) {
    /** @type {?} */
    CalendarSingleMonthComponent.prototype.props;
    /** @type {?} */
    CalendarSingleMonthComponent.prototype.state;
    /** @type {?} */
    CalendarSingleMonthComponent.prototype.ref;
    /** @type {?} */
    CalendarSingleMonthComponent.prototype.wrapperDivDOM;
    /** @type {?} */
    CalendarSingleMonthComponent.prototype.singleMonth;
    /** @type {?} */
    CalendarSingleMonthComponent.prototype.genWeek;
    /** @type {?} */
    CalendarSingleMonthComponent.prototype.updateWeeks;
    /** @type {?} */
    CalendarSingleMonthComponent.prototype.setWarpper;
    /**
     * @type {?}
     * @private
     */
    CalendarSingleMonthComponent.prototype._elementRef;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var CalendarConfirmPanelComponent = /** @class */ (function () {
    function CalendarConfirmPanelComponent() {
        var _this = this;
        this.props = (/** @type {?} */ ({
            formatStr: 'yyyy-MM-dd hh:mm'
        }));
        this.confirmPane = true;
        this.triggerConfirm = (/**
         * @return {?}
         */
        function () {
            var _a = _this.props, onConfirm = _a.onConfirm, disableBtn = _a.disableBtn;
            if (!disableBtn) {
                onConfirm();
            }
        });
    }
    Object.defineProperty(CalendarConfirmPanelComponent.prototype, "propsData", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.props = __assign({}, this.props, value);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CalendarConfirmPanelComponent.prototype, "disableBtn", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.props.disableBtn = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CalendarConfirmPanelComponent.prototype, "formatStr", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.props.formatStr = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CalendarConfirmPanelComponent.prototype, "startDateTime", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.props.startDateTime = value;
            this.formatTime();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CalendarConfirmPanelComponent.prototype, "endDateTime", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.props.endDateTime = value;
            this.formatTime();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CalendarConfirmPanelComponent.prototype, "onConfirm", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.props.onConfirm = value;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @return {?}
     */
    CalendarConfirmPanelComponent.prototype.formatTime = /**
     * @return {?}
     */
    function () {
        var _a = this.props, type = _a.type, locale = _a.locale, disableBtn = _a.disableBtn;
        var _b = this.props, startDateTime = _b.startDateTime, endDateTime = _b.endDateTime;
        if (startDateTime && endDateTime && +startDateTime > +endDateTime) {
            /** @type {?} */
            var tmp = startDateTime;
            startDateTime = endDateTime;
            endDateTime = tmp;
        }
        this.startTimeStr = startDateTime ? this.selfFormatDate(startDateTime) : locale.noChoose;
        this.endTimeStr = endDateTime ? this.selfFormatDate(endDateTime) : locale.noChoose;
        /** @type {?} */
        var btnCls = disableBtn ? 'button button-disable' : 'button';
        if (type === 'one') {
            btnCls += ' button-full';
        }
        this.btnCls = btnCls;
    };
    /**
     * @param {?} date
     * @return {?}
     */
    CalendarConfirmPanelComponent.prototype.selfFormatDate = /**
     * @param {?} date
     * @return {?}
     */
    function (date) {
        var _a = this.props, _b = _a.formatStr, formatStr = _b === void 0 ? '' : _b, locale = _a.locale;
        return formatDate(date, formatStr, locale);
    };
    CalendarConfirmPanelComponent.decorators = [
        { type: Component, args: [{
                    selector: 'CalendarConfirmPanel, nzm-calendar-confirm-panel',
                    template: "<div *ngIf=\"props.type === 'range'\" class=\"info\">\n  <p>\n    {{ props.locale.start }}: <span class=\"{{ !props.startDateTime ? 'grey' : '' }}\">{{ startTimeStr }}</span>\n  </p>\n  <p>\n    {{ props.locale.end }}: <span class=\"{{ !props.endDateTime ? 'grey' : '' }}\">{{ endTimeStr }}</span>\n  </p>\n</div>\n<div [ngClass]=\"btnCls\" (click)=\"triggerConfirm()\">\n  {{ props.locale.confirm }}\n</div>\n",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    /** @nocollapse */
    CalendarConfirmPanelComponent.ctorParameters = function () { return []; };
    CalendarConfirmPanelComponent.propDecorators = {
        propsData: [{ type: Input }],
        disableBtn: [{ type: Input }],
        formatStr: [{ type: Input }],
        startDateTime: [{ type: Input }],
        endDateTime: [{ type: Input }],
        onConfirm: [{ type: Input }],
        confirmPane: [{ type: HostBinding, args: ['class.confirm-panel',] }]
    };
    return CalendarConfirmPanelComponent;
}());
if (false) {
    /** @type {?} */
    CalendarConfirmPanelComponent.prototype.props;
    /** @type {?} */
    CalendarConfirmPanelComponent.prototype.startTimeStr;
    /** @type {?} */
    CalendarConfirmPanelComponent.prototype.endTimeStr;
    /** @type {?} */
    CalendarConfirmPanelComponent.prototype.btnCls;
    /** @type {?} */
    CalendarConfirmPanelComponent.prototype.confirmPane;
    /** @type {?} */
    CalendarConfirmPanelComponent.prototype.triggerConfirm;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var CalendarShortcutPanelComponent = /** @class */ (function () {
    function CalendarShortcutPanelComponent() {
        var _this = this;
        this.props = (/** @type {?} */ ({}));
        this.shortcutPanel = true;
        this.onClick = (/**
         * @param {?} type
         * @return {?}
         */
        function (type) {
            var onSelect = _this.props.onSelect;
            /** @type {?} */
            var today = new Date();
            switch (type) {
                case 'today':
                    onSelect(new Date(today.getFullYear(), today.getMonth(), today.getDate(), 0), new Date(today.getFullYear(), today.getMonth(), today.getDate(), 12));
                    break;
                case 'yesterday':
                    onSelect(new Date(today.getFullYear(), today.getMonth(), today.getDate() - 1, 0), new Date(today.getFullYear(), today.getMonth(), today.getDate() - 1, 12));
                    break;
                case 'lastweek':
                    onSelect(new Date(today.getFullYear(), today.getMonth(), today.getDate() - 6, 0), new Date(today.getFullYear(), today.getMonth(), today.getDate(), 12));
                    break;
                case 'lastmonth':
                    onSelect(new Date(today.getFullYear(), today.getMonth(), today.getDate() - 29, 0), new Date(today.getFullYear(), today.getMonth(), today.getDate(), 12));
                    break;
            }
        });
    }
    Object.defineProperty(CalendarShortcutPanelComponent.prototype, "locale", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.props.locale = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(CalendarShortcutPanelComponent.prototype, "onSelect", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.props.onSelect = value;
        },
        enumerable: true,
        configurable: true
    });
    CalendarShortcutPanelComponent.decorators = [
        { type: Component, args: [{
                    selector: 'CalendarShortcutPanel, nzm-calendar-shortcut-panel',
                    template: "<div class=\"item\" (click)=\"onClick('today')\">{{ props.locale.today }}</div>\n<div class=\"item\" (click)=\"onClick('yesterday')\">{{ props.locale.yesterday }}</div>\n<div class=\"item\" (click)=\"onClick('lastweek')\">{{ props.locale.lastWeek }}</div>\n<div class=\"item\" (click)=\"onClick('lastmonth')\">{{ props.locale.lastMonth }}</div>\n",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    /** @nocollapse */
    CalendarShortcutPanelComponent.ctorParameters = function () { return []; };
    CalendarShortcutPanelComponent.propDecorators = {
        locale: [{ type: Input }],
        onSelect: [{ type: Input }],
        shortcutPanel: [{ type: HostBinding, args: ['class.shortcut-panel',] }]
    };
    return CalendarShortcutPanelComponent;
}());
if (false) {
    /** @type {?} */
    CalendarShortcutPanelComponent.prototype.props;
    /** @type {?} */
    CalendarShortcutPanelComponent.prototype.shortcutPanel;
    /** @type {?} */
    CalendarShortcutPanelComponent.prototype.onClick;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var CalendarModule = /** @class */ (function () {
    function CalendarModule() {
    }
    CalendarModule.decorators = [
        { type: NgModule, args: [{
                    imports: [CommonModule, IconModule, DatePickerViewModule, LocaleProviderModule],
                    declarations: [
                        CalendarComponent,
                        CalendarHeaderComponent,
                        CalendarWeekPanelComponent,
                        CalendarDatePickerComponent,
                        CalendarTimePickerComponent,
                        CalendarSingleMonthComponent,
                        CalendarConfirmPanelComponent,
                        CalendarShortcutPanelComponent
                    ],
                    exports: [
                        CalendarComponent,
                        CalendarHeaderComponent,
                        CalendarWeekPanelComponent,
                        CalendarDatePickerComponent,
                        CalendarTimePickerComponent,
                        CalendarSingleMonthComponent,
                        CalendarConfirmPanelComponent,
                        CalendarShortcutPanelComponent
                    ],
                    providers: [LocaleProviderModule]
                },] }
    ];
    return CalendarModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var PopoverItemComponent = /** @class */ (function () {
    function PopoverItemComponent(_elementRef) {
        this._elementRef = _elementRef;
        this.defaultProps = {
            prefixCls: 'am-popover',
            disabled: false
        };
        this.isActive = false;
        this.select = new EventEmitter();
        this.amPopoverItem = true;
    }
    Object.defineProperty(PopoverItemComponent.prototype, "icon", {
        get: /**
         * @return {?}
         */
        function () {
            return this._icon;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._icon = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PopoverItemComponent.prototype, "style", {
        get: /**
         * @return {?}
         */
        function () {
            return this._style;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._style = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PopoverItemComponent.prototype, "disabled", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.defaultProps.disabled = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PopoverItemComponent.prototype, "amPopoverItemActive", {
        get: /**
         * @return {?}
         */
        function () {
            return this.isActive;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PopoverItemComponent.prototype, "amPopoverItemDisabled", {
        get: /**
         * @return {?}
         */
        function () {
            return this.defaultProps.disabled;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @param {?} e
     * @return {?}
     */
    PopoverItemComponent.prototype.touchStart = /**
     * @param {?} e
     * @return {?}
     */
    function (e) {
        this.select.emit();
        this.isActive = true;
    };
    /**
     * @return {?}
     */
    PopoverItemComponent.prototype.ngAfterContentInit = /**
     * @return {?}
     */
    function () { };
    PopoverItemComponent.decorators = [
        { type: Component, args: [{
                    selector: 'PopoverItem, nzm-popover-item',
                    template: "<div class=\"{{ defaultProps.prefixCls }}-item-container\">\n  <span class=\"{{ defaultProps.prefixCls }}-item-icon\" aria-hidden=\"true\">\n    <ng-template [ngTemplateOutlet]=\"icon\"></ng-template>\n  </span>\n  <span class=\"{{ defaultProps.prefixCls }}-item-content\">\n    <ng-content></ng-content>\n  </span>\n</div>\n",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    /** @nocollapse */
    PopoverItemComponent.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    PopoverItemComponent.propDecorators = {
        icon: [{ type: Input }],
        style: [{ type: Input }],
        disabled: [{ type: Input }],
        select: [{ type: Output }],
        amPopoverItem: [{ type: HostBinding, args: ['class.am-popover-item',] }],
        amPopoverItemActive: [{ type: HostBinding, args: ['class.am-popover-item-active',] }],
        amPopoverItemDisabled: [{ type: HostBinding, args: ['class.am-popover-item-disabled',] }],
        touchStart: [{ type: HostListener, args: ['touchstart', ['$event'],] }, { type: HostListener, args: ['mousedown', ['$event'],] }]
    };
    return PopoverItemComponent;
}());
if (false) {
    /** @type {?} */
    PopoverItemComponent.prototype.defaultProps;
    /** @type {?} */
    PopoverItemComponent.prototype.isActive;
    /**
     * @type {?}
     * @private
     */
    PopoverItemComponent.prototype._style;
    /**
     * @type {?}
     * @private
     */
    PopoverItemComponent.prototype._icon;
    /** @type {?} */
    PopoverItemComponent.prototype.select;
    /** @type {?} */
    PopoverItemComponent.prototype.amPopoverItem;
    /**
     * @type {?}
     * @private
     */
    PopoverItemComponent.prototype._elementRef;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var PopoverItemModule = /** @class */ (function () {
    function PopoverItemModule() {
    }
    PopoverItemModule.decorators = [
        { type: NgModule, args: [{
                    imports: [CommonModule, IconModule],
                    exports: [PopoverItemComponent],
                    declarations: [PopoverItemComponent]
                },] }
    ];
    return PopoverItemModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var FlexComponent = /** @class */ (function () {
    function FlexComponent() {
        this.defaultProps = {
            prefixCls: 'am-flexbox',
            align: 'center'
        };
        // _wrapCls = {};
        this._direction = '';
        this._justify = '';
        this._alignContent = '';
        this.amFlexbox = true;
    }
    Object.defineProperty(FlexComponent.prototype, "direction", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._direction = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FlexComponent.prototype, "wrap", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._wrap = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FlexComponent.prototype, "justify", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._justify = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FlexComponent.prototype, "align", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.defaultProps.align = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FlexComponent.prototype, "alignContent", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._alignContent = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FlexComponent.prototype, "amFlexboxDirRow", {
        get: /**
         * @return {?}
         */
        function () {
            return this._direction === 'row';
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FlexComponent.prototype, "amFlexboxDirRowReverse", {
        get: /**
         * @return {?}
         */
        function () {
            return this._direction === 'row-reverse';
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FlexComponent.prototype, "amFlexboxDirColumn", {
        get: /**
         * @return {?}
         */
        function () {
            return this._direction === 'column';
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FlexComponent.prototype, "amFlexboxDirColumnReverse", {
        get: /**
         * @return {?}
         */
        function () {
            return this._direction === 'column-reverse';
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FlexComponent.prototype, "amFlexboxNowrap", {
        get: /**
         * @return {?}
         */
        function () {
            return this._wrap === 'nowrap';
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FlexComponent.prototype, "amFlexboxWrap", {
        get: /**
         * @return {?}
         */
        function () {
            return this._wrap === 'wrap';
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FlexComponent.prototype, "amFlexboxWrapReverse", {
        get: /**
         * @return {?}
         */
        function () {
            return this._wrap === 'wrap-reverse';
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FlexComponent.prototype, "amFlexboxJustifyStart", {
        get: /**
         * @return {?}
         */
        function () {
            return this._justify === 'start';
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FlexComponent.prototype, "amFlexboxJustifyCenter", {
        get: /**
         * @return {?}
         */
        function () {
            return this._justify === 'center';
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FlexComponent.prototype, "amFlexboxJustifyEnd", {
        get: /**
         * @return {?}
         */
        function () {
            return this._justify === 'end';
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FlexComponent.prototype, "amFlexboxJustifyBetween", {
        get: /**
         * @return {?}
         */
        function () {
            return this._justify === 'between';
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FlexComponent.prototype, "amFlexboxAlignAround", {
        get: /**
         * @return {?}
         */
        function () {
            return this._justify === 'around';
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FlexComponent.prototype, "amFlexboxAlignStart", {
        get: /**
         * @return {?}
         */
        function () {
            return this.defaultProps.align === 'start';
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FlexComponent.prototype, "amFlexboxAlignCenter", {
        get: /**
         * @return {?}
         */
        function () {
            return this.defaultProps.align === 'center';
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FlexComponent.prototype, "amFlexboxAlignEnd", {
        get: /**
         * @return {?}
         */
        function () {
            return this.defaultProps.align === 'end';
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FlexComponent.prototype, "amFlexboxAlignBaseline", {
        get: /**
         * @return {?}
         */
        function () {
            return this.defaultProps.align === 'baseline';
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FlexComponent.prototype, "amFlexboxAlignStretch", {
        get: /**
         * @return {?}
         */
        function () {
            return this.defaultProps.align === 'stretch';
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FlexComponent.prototype, "amFlexboxAlignContentStart", {
        get: /**
         * @return {?}
         */
        function () {
            return this._alignContent === 'start';
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FlexComponent.prototype, "amFlexboxAlignCotentCenter", {
        get: /**
         * @return {?}
         */
        function () {
            return this._alignContent === 'center';
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FlexComponent.prototype, "amFlexboxAlignContentEnd", {
        get: /**
         * @return {?}
         */
        function () {
            return this._alignContent === 'end';
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FlexComponent.prototype, "amFlexboxAlignContentBetween", {
        get: /**
         * @return {?}
         */
        function () {
            return this._alignContent === 'between';
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FlexComponent.prototype, "amFlexboxAlignContentAround", {
        get: /**
         * @return {?}
         */
        function () {
            return this._alignContent === 'around';
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(FlexComponent.prototype, "amFlexboxAlignContentStretch", {
        get: /**
         * @return {?}
         */
        function () {
            return this._alignContent === 'stretch';
        },
        enumerable: true,
        configurable: true
    });
    FlexComponent.decorators = [
        { type: Component, args: [{
                    selector: 'Flex, nzm-flex',
                    template: "<ng-content></ng-content>\n",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    /** @nocollapse */
    FlexComponent.ctorParameters = function () { return []; };
    FlexComponent.propDecorators = {
        direction: [{ type: Input }],
        wrap: [{ type: Input }],
        justify: [{ type: Input }],
        align: [{ type: Input }],
        alignContent: [{ type: Input }],
        amFlexbox: [{ type: HostBinding, args: ['class.am-flexbox',] }],
        amFlexboxDirRow: [{ type: HostBinding, args: ['class.am-flexbox-dir-row',] }],
        amFlexboxDirRowReverse: [{ type: HostBinding, args: ['class.am-flexbox-dir-row-reverse',] }],
        amFlexboxDirColumn: [{ type: HostBinding, args: ['class.am-flexbox-dir-column',] }],
        amFlexboxDirColumnReverse: [{ type: HostBinding, args: ['class.am-flexbox-dir-column-reverse',] }],
        amFlexboxNowrap: [{ type: HostBinding, args: ['class.am-flexbox-nowrap',] }],
        amFlexboxWrap: [{ type: HostBinding, args: ['class.am-flexbox-wrap',] }],
        amFlexboxWrapReverse: [{ type: HostBinding, args: ['class.am-flexbox-wrap-reverse',] }],
        amFlexboxJustifyStart: [{ type: HostBinding, args: ['class.am-flexbox-justify-start',] }],
        amFlexboxJustifyCenter: [{ type: HostBinding, args: ['class.am-flexbox-justify-center',] }],
        amFlexboxJustifyEnd: [{ type: HostBinding, args: ['class.am-flexbox-justify-end',] }],
        amFlexboxJustifyBetween: [{ type: HostBinding, args: ['class.am-flexbox-justify-between',] }],
        amFlexboxAlignAround: [{ type: HostBinding, args: ['class.am-flexbox-justify-around',] }],
        amFlexboxAlignStart: [{ type: HostBinding, args: ['class.am-flexbox-align-start',] }],
        amFlexboxAlignCenter: [{ type: HostBinding, args: ['class.am-flexbox-align-center',] }],
        amFlexboxAlignEnd: [{ type: HostBinding, args: ['class.am-flexbox-align-end',] }],
        amFlexboxAlignBaseline: [{ type: HostBinding, args: ['class.am-flexbox-align-baseline',] }],
        amFlexboxAlignStretch: [{ type: HostBinding, args: ['class.am-flexbox-align-stretch',] }],
        amFlexboxAlignContentStart: [{ type: HostBinding, args: ['class.am-flexbox-align-content-start',] }],
        amFlexboxAlignCotentCenter: [{ type: HostBinding, args: ['class.am-flexbox-align-content-center',] }],
        amFlexboxAlignContentEnd: [{ type: HostBinding, args: ['class.am-flexbox-align-content-end',] }],
        amFlexboxAlignContentBetween: [{ type: HostBinding, args: ['class.am-flexbox-align-content-between',] }],
        amFlexboxAlignContentAround: [{ type: HostBinding, args: ['class.am-flexbox-align-content-around',] }],
        amFlexboxAlignContentStretch: [{ type: HostBinding, args: ['class.am-flexbox-align-content-stretch',] }]
    };
    return FlexComponent;
}());
if (false) {
    /** @type {?} */
    FlexComponent.prototype.defaultProps;
    /**
     * @type {?}
     * @private
     */
    FlexComponent.prototype._direction;
    /**
     * @type {?}
     * @private
     */
    FlexComponent.prototype._wrap;
    /**
     * @type {?}
     * @private
     */
    FlexComponent.prototype._justify;
    /**
     * @type {?}
     * @private
     */
    FlexComponent.prototype._alignContent;
    /** @type {?} */
    FlexComponent.prototype.amFlexbox;
}
var FlexItemComponent = /** @class */ (function () {
    function FlexItemComponent() {
        this.defaultProps = {
            prefixCls: 'am-flexbox',
            align: 'center'
        };
        this.flexboxItem = true;
    }
    FlexItemComponent.decorators = [
        { type: Component, args: [{
                    selector: 'FlexItem, nzm-flex-item',
                    template: "\n    <ng-content></ng-content>\n  ",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    FlexItemComponent.propDecorators = {
        flexboxItem: [{ type: HostBinding, args: ['class.am-flexbox-item',] }]
    };
    return FlexItemComponent;
}());
if (false) {
    /** @type {?} */
    FlexItemComponent.prototype.defaultProps;
    /** @type {?} */
    FlexItemComponent.prototype.flexboxItem;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var FlexModule = /** @class */ (function () {
    function FlexModule() {
    }
    FlexModule.decorators = [
        { type: NgModule, args: [{
                    imports: [CommonModule],
                    exports: [FlexComponent, FlexItemComponent],
                    declarations: [FlexComponent, FlexItemComponent]
                },] }
    ];
    return FlexModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var GridComponent = /** @class */ (function () {
    function GridComponent() {
        this.wrapCls = {};
        this.itemCls = {};
        this.carouselProps = {
            dots: false,
            dragging: false
        };
        this.defaultProps = {
            data: [],
            hasLine: true,
            isCarousel: false,
            columnNum: 4,
            carouselMaxRow: 2,
            prefixCls: 'am-grid',
            square: true,
            itemStyle: {}
        };
        this.carouselData = [];
        this.carouselDataTmp = [];
        this.gridData = [];
        this._data = [];
        this.columnNum = 4;
        this.carouselMaxRow = 2;
        this.itemStyle = {};
        this.square = true;
        this.hasLine = true;
        this.activeStyle = true;
        this.onClick = new EventEmitter();
        this.amGrid = true;
    }
    Object.defineProperty(GridComponent.prototype, "isCarousel", {
        get: /**
         * @return {?}
         */
        function () {
            return this.defaultProps.isCarousel;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.defaultProps.isCarousel = value;
            this.init();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(GridComponent.prototype, "data", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._data = value;
            this.init();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(GridComponent.prototype, "amGridSquare", {
        get: /**
         * @return {?}
         */
        function () {
            return true === this.square;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(GridComponent.prototype, "amGridLine", {
        get: /**
         * @return {?}
         */
        function () {
            return true === this.hasLine;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(GridComponent.prototype, "amGridCarousel", {
        get: /**
         * @return {?}
         */
        function () {
            return true === this.isCarousel;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @param {?} value
     * @return {?}
     */
    GridComponent.prototype.getContentType = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        if ((value.indexOf('http') >= 0 || value.indexOf('assets') >= 0) && value.indexOf('<') < 0) {
            return 'url';
        }
        else if (value.indexOf('<') >= 0) {
            return 'innerHTML';
        }
        else if (value instanceof TemplateRef) {
            return 'TemplateRef';
        }
        else {
            return 'icon';
        }
    };
    /**
     * @return {?}
     */
    GridComponent.prototype.init = /**
     * @return {?}
     */
    function () {
        /** @type {?} */
        var dataLength = (this._data && this._data.length) || 0;
        /** @type {?} */
        var rowCount = Math.ceil(dataLength / this.columnNum);
        /** @type {?} */
        var rowsArr;
        if (this.defaultProps.isCarousel) {
            if (rowCount % this.carouselMaxRow !== 0) {
                rowCount = rowCount + this.carouselMaxRow - (rowCount % this.carouselMaxRow);
            }
            /** @type {?} */
            var pageCount = Math.ceil(rowCount / this.carouselMaxRow);
            rowsArr = this.getRows(rowCount, dataLength);
            if (pageCount <= 1) {
                this.carouselProps = {
                    dots: false,
                    dragging: false
                };
            }
            else {
                this.carouselProps = {
                    dots: true,
                    dragging: true
                };
            }
            this.carouselDataTmp = this.getCarouselData(rowsArr, pageCount, rowCount);
        }
        else {
            this.gridData = this.getRows(rowCount, dataLength);
        }
    };
    /**
     * @param {?} rowsArr
     * @param {?} pageCount
     * @param {?} rowCount
     * @return {?}
     */
    GridComponent.prototype.getCarouselData = /**
     * @param {?} rowsArr
     * @param {?} pageCount
     * @param {?} rowCount
     * @return {?}
     */
    function (rowsArr, pageCount, rowCount) {
        /** @type {?} */
        var pagesArr = [];
        for (var pageIndex = 0; pageIndex < pageCount; pageIndex++) {
            /** @type {?} */
            var pageRows = [];
            for (var ii = 0; ii < this.carouselMaxRow; ii++) {
                /** @type {?} */
                var rowIndex = pageIndex * this.carouselMaxRow + ii;
                if (rowIndex < rowCount) {
                    pageRows.push(rowsArr[rowIndex]);
                }
                else {
                    // 空节点为了确保末尾页的最后未到底的行有底线(样式中last-child会没线)
                    pageRows.push(null);
                }
            }
            pagesArr.push(pageRows);
        }
        return pagesArr;
    };
    /**
     * @param {?} rowCount
     * @param {?} dataLength
     * @return {?}
     */
    GridComponent.prototype.getRows = /**
     * @param {?} rowCount
     * @param {?} dataLength
     * @return {?}
     */
    function (rowCount, dataLength) {
        /** @type {?} */
        var columnNum = this.columnNum;
        /** @type {?} */
        var rowArr = new Array();
        for (var i = 0; i < rowCount; i++) {
            rowArr[i] = new Array();
            for (var j = 0; j < columnNum; j++) {
                /** @type {?} */
                var dataIndex = i * columnNum + j;
                if (dataIndex < dataLength) {
                    rowArr[i][j] = this._data[dataIndex];
                }
                else {
                    rowArr[i][j] = null;
                }
            }
        }
        return rowArr;
    };
    /**
     * @param {?} data
     * @param {?} index
     * @return {?}
     */
    GridComponent.prototype.click = /**
     * @param {?} data
     * @param {?} index
     * @return {?}
     */
    function (data, index) {
        /** @type {?} */
        var outputData = {
            data: data,
            index: index
        };
        this.onClick.emit(outputData);
    };
    /**
     * @return {?}
     */
    GridComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        var _a;
        this.itemCls = (_a = {},
            _a[this.defaultProps.prefixCls + "-item"] = true,
            _a[this.defaultProps.prefixCls + "-active-item"] = false,
            _a);
    };
    GridComponent.decorators = [
        { type: Component, args: [{
                    selector: 'Grid, nzm-grid',
                    template: "<ng-container *ngIf=\"!isCarousel\">\n  <Flex *ngFor=\"let item of gridData; let i = index\" [justify]=\"'center'\" [align]=\"'stretch'\">\n    <FlexItem\n      TouchFeedbackDirective\n      *ngFor=\"let subItem of item; let j = index\"\n      [ngClass]=\"itemCls\"\n      [ngStyle]=\"itemStyle\"\n      [className]=\"['am-grid-item-active']\"\n      [activeStyle]=\"activeStyle\"\n    >\n      <div\n        *ngIf=\"subItem !== null\"\n        class=\"{{ defaultProps.prefixCls }}-item-content\"\n        (click)=\"click(subItem, i * columnNum + j)\"\n      >\n        <div class=\"{{ defaultProps.prefixCls }}-item-inner-content column-num-{{ columnNum }}\">\n          <img\n            *ngIf=\"subItem.icon && getContentType(subItem.icon) === 'url'\"\n            src=\"{{ subItem.icon }}\"\n            class=\"{{ defaultProps.prefixCls }}-icon\"\n          />\n          <Icon\n            *ngIf=\"subItem.icon && getContentType(subItem.icon) === 'icon'\"\n            [type]=\"subItem.icon\"\n            [size]=\"subItem.size\"\n          ></Icon>\n          <div\n            *ngIf=\"subItem.icon && getContentType(subItem.icon) === 'innerHTML'\"\n            [innerHTML]=\"subItem.icon | safeHTML\"\n          ></div>\n          <ng-template\n            *ngIf=\"subItem.icon && getContentType(subItem.icon) === 'TemplateRef'\"\n            [ngTemplateOutlet]=\"subItem.icon\"\n          ></ng-template>\n          <div class=\"{{ defaultProps.prefixCls }}-text\">{{ subItem.text }}</div>\n        </div>\n      </div>\n      <div *ngIf=\"subItem === null\" class=\"{{ defaultProps.prefixCls }}-null-item\"></div>\n    </FlexItem>\n  </Flex>\n  <ng-content></ng-content>\n</ng-container>\n\n<Carousel\n  *ngIf=\"isCarousel && carouselDataTmp.length > 0\"\n  [autoplay]=\"false\"\n  [infinite]=\"true\"\n  [selectedIndex]=\"0\"\n  [autoplayInterval]=\"3000\"\n  [dots]=\"carouselProps.dots\"\n  [dragging]=\"carouselProps.dragging\"\n>\n  <CarouselSlide\n    *ngFor=\"let gridData of carouselDataTmp\"\n    class=\"{{ defaultProps.prefixCls }}-carousel-page\"\n    style=\"display: block;\"\n  >\n    <Flex *ngFor=\"let item of gridData; let i = index\" [justify]=\"'center'\" [align]=\"'stretch'\">\n      <FlexItem\n        TouchFeedbackDirective\n        *ngFor=\"let subItem of item; let j = index\"\n        class=\"{{ defaultProps.prefixCls }}-item\"\n        [ngStyle]=\"itemStyle\"\n        [className]=\"['am-grid-item-active']\"\n      >\n        <div\n          *ngIf=\"subItem !== null\"\n          class=\"{{ defaultProps.prefixCls }}-item-content\"\n          (click)=\"click(subItem, i * columnNum + j)\"\n        >\n          <div class=\"{{ defaultProps.prefixCls }}-item-inner-content column-num-4\">\n            <img class=\"{{ defaultProps.prefixCls }}-icon\" src=\"{{ subItem.icon }}\" />\n            <div class=\"{{ defaultProps.prefixCls }}-text\">{{ subItem.text }}</div>\n          </div>\n        </div>\n        <div *ngIf=\"subItem === null\" class=\"{{ defaultProps.prefixCls }}-null-item\"></div>\n      </FlexItem>\n    </Flex>\n  </CarouselSlide>\n</Carousel>\n"
                }] }
    ];
    /** @nocollapse */
    GridComponent.ctorParameters = function () { return []; };
    GridComponent.propDecorators = {
        columnNum: [{ type: Input }],
        carouselMaxRow: [{ type: Input }],
        itemStyle: [{ type: Input }],
        square: [{ type: Input }],
        hasLine: [{ type: Input }],
        isCarousel: [{ type: Input }],
        activeStyle: [{ type: Input }],
        data: [{ type: Input }],
        onClick: [{ type: Output }],
        amGrid: [{ type: HostBinding, args: ['class.am-grid',] }],
        amGridSquare: [{ type: HostBinding, args: ['class.am-grid-square',] }],
        amGridLine: [{ type: HostBinding, args: ['class.am-grid-line',] }],
        amGridCarousel: [{ type: HostBinding, args: ['class.am-grid-carousel',] }]
    };
    return GridComponent;
}());
if (false) {
    /** @type {?} */
    GridComponent.prototype.wrapCls;
    /** @type {?} */
    GridComponent.prototype.itemCls;
    /** @type {?} */
    GridComponent.prototype.carouselProps;
    /** @type {?} */
    GridComponent.prototype.defaultProps;
    /** @type {?} */
    GridComponent.prototype.carouselData;
    /** @type {?} */
    GridComponent.prototype.carouselDataTmp;
    /** @type {?} */
    GridComponent.prototype.gridData;
    /**
     * @type {?}
     * @private
     */
    GridComponent.prototype._data;
    /** @type {?} */
    GridComponent.prototype.columnNum;
    /** @type {?} */
    GridComponent.prototype.carouselMaxRow;
    /** @type {?} */
    GridComponent.prototype.itemStyle;
    /** @type {?} */
    GridComponent.prototype.square;
    /** @type {?} */
    GridComponent.prototype.hasLine;
    /** @type {?} */
    GridComponent.prototype.activeStyle;
    /** @type {?} */
    GridComponent.prototype.onClick;
    /** @type {?} */
    GridComponent.prototype.amGrid;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/** @type {?} */
var INTERFACE_TOKEN = new InjectionToken('InterfaceToken');
var TouchFeedbackDirective = /** @class */ (function () {
    function TouchFeedbackDirective(_elementRef, _renderer) {
        this._elementRef = _elementRef;
        this._renderer = _renderer;
        this.activeStyle = true;
        this.clickStart = new EventEmitter();
        this.clickEnd = new EventEmitter();
    }
    /**
     * @private
     * @param {?} className
     * @return {?}
     */
    TouchFeedbackDirective.prototype.addClass = /**
     * @private
     * @param {?} className
     * @return {?}
     */
    function (className) {
        this._renderer.addClass(this._elementRef.nativeElement, className);
    };
    /**
     * @private
     * @param {?} className
     * @return {?}
     */
    TouchFeedbackDirective.prototype.removeClass = /**
     * @private
     * @param {?} className
     * @return {?}
     */
    function (className) {
        this._renderer.removeClass(this._elementRef.nativeElement, className);
    };
    /**
     * @return {?}
     */
    TouchFeedbackDirective.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        this._className = this.className;
    };
    /**
     * @return {?}
     */
    TouchFeedbackDirective.prototype.touchStart = /**
     * @return {?}
     */
    function () {
        if (this.activeStyle) {
            this.addClass(this._className);
            this.clickStart.emit();
        }
    };
    /**
     * @return {?}
     */
    TouchFeedbackDirective.prototype.touchEnd = /**
     * @return {?}
     */
    function () {
        if (this.activeStyle) {
            this.removeClass(this._className);
            this.clickEnd.emit();
        }
    };
    TouchFeedbackDirective.decorators = [
        { type: Directive, args: [{
                    selector: '[TouchFeedbackDirective]'
                },] }
    ];
    /** @nocollapse */
    TouchFeedbackDirective.ctorParameters = function () { return [
        { type: ElementRef },
        { type: Renderer2 }
    ]; };
    TouchFeedbackDirective.propDecorators = {
        className: [{ type: Input }],
        activeStyle: [{ type: Input }],
        clickStart: [{ type: Output }],
        clickEnd: [{ type: Output }],
        touchStart: [{ type: HostListener, args: ['touchstart',] }, { type: HostListener, args: ['mousedown',] }],
        touchEnd: [{ type: HostListener, args: ['touchend',] }, { type: HostListener, args: ['mouseup',] }]
    };
    return TouchFeedbackDirective;
}());
if (false) {
    /**
     * @type {?}
     * @private
     */
    TouchFeedbackDirective.prototype._className;
    /** @type {?} */
    TouchFeedbackDirective.prototype.className;
    /** @type {?} */
    TouchFeedbackDirective.prototype.activeStyle;
    /** @type {?} */
    TouchFeedbackDirective.prototype.clickStart;
    /** @type {?} */
    TouchFeedbackDirective.prototype.clickEnd;
    /**
     * @type {?}
     * @private
     */
    TouchFeedbackDirective.prototype._elementRef;
    /**
     * @type {?}
     * @private
     */
    TouchFeedbackDirective.prototype._renderer;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var TouchFeedbackModule = /** @class */ (function () {
    function TouchFeedbackModule() {
    }
    TouchFeedbackModule.decorators = [
        { type: NgModule, args: [{
                    imports: [CommonModule],
                    exports: [TouchFeedbackDirective],
                    declarations: [TouchFeedbackDirective]
                },] }
    ];
    return TouchFeedbackModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var GridModule = /** @class */ (function () {
    function GridModule() {
    }
    GridModule.decorators = [
        { type: NgModule, args: [{
                    imports: [FlexModule, IconModule, CommonModule, CarouselModule, TouchFeedbackModule, NgZorroAntdMobilePipesModule],
                    exports: [GridComponent],
                    declarations: [GridComponent]
                },] }
    ];
    return GridModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @abstract
 * @template T, R
 */
var  /**
 * @abstract
 * @template T, R
 */
ActionSheetRef = /** @class */ (function () {
    function ActionSheetRef() {
    }
    return ActionSheetRef;
}());
if (false) {
    /**
     * @abstract
     * @param {?=} result
     * @return {?}
     */
    ActionSheetRef.prototype.close = function (result) { };
    /**
     * @abstract
     * @param {?=} result
     * @return {?}
     */
    ActionSheetRef.prototype.destroy = function (result) { };
    /**
     * @abstract
     * @return {?}
     */
    ActionSheetRef.prototype.getElement = function () { };
    /**
     * @abstract
     * @return {?}
     */
    ActionSheetRef.prototype.getInstance = function () { };
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @template T, R
 */
var ActionSheetComponent = /** @class */ (function (_super) {
    __extends(ActionSheetComponent, _super);
    function ActionSheetComponent(localeProviderService, elementRef) {
        var _this = _super.call(this) || this;
        _this.localeProviderService = localeProviderService;
        _this.elementRef = elementRef;
        _this.unsubscribe$ = new Subject();
        return _this;
    }
    /**
     * @return {?}
     */
    ActionSheetComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        this.localeProvider();
    };
    /**
     * @return {?}
     */
    ActionSheetComponent.prototype.localeProvider = /**
     * @return {?}
     */
    function () {
        /** @type {?} */
        var self = this;
        if (self.option.locale || self.option.locale !== undefined) {
            self.localeProviderService.setLocale(self.option.locale);
        }
        self.localeProviderService.localeChange.pipe(takeUntil(self.unsubscribe$)).subscribe((/**
         * @param {?} _
         * @return {?}
         */
        function (_) {
            if (self.option.cancelButtonText) {
                self.option.cancelButtonText = self.localeProviderService.getLocaleSubObj('ActionSheet')['dismissText'];
            }
        }));
    };
    /**
     * @param {?} index
     * @param {?=} rowIndex
     * @param {?=} event
     * @return {?}
     */
    ActionSheetComponent.prototype.onPress = /**
     * @param {?} index
     * @param {?=} rowIndex
     * @param {?=} event
     * @return {?}
     */
    function (index, rowIndex, event) {
        if (rowIndex === void 0) { rowIndex = 0; }
    };
    /**
     * @param {?} option
     * @return {?}
     */
    ActionSheetComponent.prototype.showShare = /**
     * @param {?} option
     * @return {?}
     */
    function (option) {
        var _a;
        /** @type {?} */
        var cls = (_a = {}, _a[option.prefixCls + "-share"] = option.flag === 'SHARE', _a);
        return cls;
    };
    /**
     * @param {?} option
     * @param {?} suffix
     * @return {?}
     */
    ActionSheetComponent.prototype.setActiveClassName = /**
     * @param {?} option
     * @param {?} suffix
     * @return {?}
     */
    function (option, suffix) {
        return [option.prefixCls + "-" + suffix + "-active"];
    };
    /**
     * @param {?} value
     * @return {?}
     */
    ActionSheetComponent.prototype.isNoTitle = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        return value === '' || value === null || value === undefined;
    };
    /**
     * @param {?} value
     * @return {?}
     */
    ActionSheetComponent.prototype.isTemplateRef = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        return value instanceof TemplateRef;
    };
    /**
     * @param {?} options
     * @param {?} value
     * @return {?}
     */
    ActionSheetComponent.prototype.isArray = /**
     * @param {?} options
     * @param {?} value
     * @return {?}
     */
    function (options, value) {
        if (options.length > 0 && value) {
            return value instanceof Array;
        }
        return false;
    };
    /**
     * @return {?}
     */
    ActionSheetComponent.prototype.getInstance = /**
     * @return {?}
     */
    function () {
        return this;
    };
    /**
     * @return {?}
     */
    ActionSheetComponent.prototype.getElement = /**
     * @return {?}
     */
    function () {
        return this.elementRef && this.elementRef.nativeElement;
    };
    /**
     * @return {?}
     */
    ActionSheetComponent.prototype.close = /**
     * @return {?}
     */
    function () {
        if (this.option.close) {
            this.option.close();
        }
    };
    /**
     * @return {?}
     */
    ActionSheetComponent.prototype.destroy = /**
     * @return {?}
     */
    function () {
        this.close();
    };
    /**
     * @return {?}
     */
    ActionSheetComponent.prototype.ngOnDestroy = /**
     * @return {?}
     */
    function () {
        this.unsubscribe$.next();
        this.unsubscribe$.complete();
    };
    ActionSheetComponent.decorators = [
        { type: Component, args: [{
                    selector: 'ActionSheet',
                    template: "<div class=\"{{ option.prefixCls }}-mask {{ option.maskTransitionName }}\"></div>\n<div\n  role=\"dialog\"\n  class=\"{{ option.prefixCls }}-wrap {{ option.transitionName }}\"\n  (click)=\"option.maskClose(-1, 0, $event)\"\n>\n  <div role=\"document\" class=\"{{ option.prefixCls }}\" [ngClass]=\"showShare(option)\">\n    <div class=\"{{ option.prefixCls }}-content\">\n      <button aria-label=\"Close\" class=\"{{ option.prefixCls }}-close\">\n        <span class=\"{{ option.prefixCls }}-close-x\"></span>\n      </button>\n      <div class=\"{{ option.prefixCls }}-body\">\n        <div>\n          <ng-container *ngIf=\"!isNoTitle(option.title)\">\n            <ng-template *ngIf=\"isTemplateRef(option.title)\" [ngTemplateOutlet]=\"option.title\"></ng-template>\n            <h3 *ngIf=\"!isTemplateRef(option.title)\" class=\"{{ option.prefixCls }}-title\">{{ option.title }}</h3>\n          </ng-container>\n          <ng-container *ngIf=\"!isNoTitle(option.message)\">\n            <ng-template *ngIf=\"isTemplateRef(option.message)\" [ngTemplateOutlet]=\"option.message\"></ng-template>\n            <div *ngIf=\"!isTemplateRef(option.message)\" class=\"{{ option.prefixCls }}-message\">\n              {{ option.message }}\n            </div>\n          </ng-container>\n          <ng-container [ngSwitch]=\"option.flag\">\n            <div *ngSwitchCase=\"'NORMAL'\" class=\"{{ option.prefixCls }}-button-list\" role=\"group\">\n              <ng-container *ngFor=\"let item of option.options; let i = index\">\n                <div\n                  TouchFeedbackDirective\n                  class=\"{{ option.prefixCls }}-button-list-item\"\n                  [className]=\"setActiveClassName(option, 'button-list-item')\"\n                >\n                  <div\n                    *ngIf=\"option.destructiveButtonIndex !== i && option.cancelButtonIndex !== i\"\n                    class=\"{{ option.prefixCls }}-button-list-item\"\n                    (click)=\"option.onPress(i, 0, $event)\"\n                  >\n                    {{ item }}\n                  </div>\n                  <div\n                    *ngIf=\"option.destructiveButtonIndex === i\"\n                    class=\"{{ option.prefixCls }}-button-list-item {{ option.prefixCls }}-destructive-button\"\n                    (click)=\"option.onPress(i, 0, $event)\"\n                  >\n                    {{ item }}\n                  </div>\n                  <div\n                    *ngIf=\"option.cancelButtonIndex === i\"\n                    class=\"{{ option.prefixCls }}-button-list-item {{ option.prefixCls }}-cancel-button\"\n                    (click)=\"option.onPress(i, 0, $event)\"\n                  >\n                    {{ item }}\n                    <span class=\"{{ option.prefixCls }}-cancel-button-mask\"></span>\n                  </div>\n                </div>\n              </ng-container>\n            </div>\n            <div *ngSwitchCase=\"'SHARE'\" class=\"{{ option.prefixCls }}-share {{ option.prefixCls }}-share-content\">\n              <div *ngIf=\"!isArray(option.options, option.options[0])\" class=\"{{ option.prefixCls }}-share-list\">\n                <ng-container *ngFor=\"let item of option.options; let i = index\">\n                  <div class=\"{{ option.prefixCls }}-share-list-item\" (click)=\"option.onPress(i, 0, $event)\">\n                    <div class=\"{{ option.prefixCls }}-share-list-item-icon\">\n                      <ng-template *ngIf=\"isTemplateRef(item.icon)\" [ngTemplateOutlet]=\"item.icon\"></ng-template>\n                      <div *ngIf=\"!isTemplateRef(item.icon)\" [innerHTML]=\"item.icon | safeHTML\"></div>\n                    </div>\n                    <div class=\"{{ option.prefixCls }}-share-list-item-title\">{{ item.title }}</div>\n                  </div>\n                </ng-container>\n              </div>\n              <ng-container *ngIf=\"isArray(option.options, option.options[0])\">\n                <div\n                  *ngFor=\"let items of option.options; let rowIndex = index\"\n                  class=\"{{ option.prefixCls }}-share-list\"\n                >\n                  <ng-container *ngFor=\"let item of items; let i = index\">\n                    <div class=\"{{ option.prefixCls }}-share-list-item\" (click)=\"option.onPress(i, rowIndex, $event)\">\n                      <div class=\"{{ option.prefixCls }}-share-list-item-icon\">\n                        <ng-template *ngIf=\"isTemplateRef(item.icon)\" [ngTemplateOutlet]=\"item.icon\"></ng-template>\n                        <div *ngIf=\"!isTemplateRef(item.icon)\" [innerHTML]=\"item.icon | safeHTML\"></div>\n                      </div>\n                      <div class=\"{{ option.prefixCls }}-share-list-item-title\">{{ item.title }}</div>\n                    </div>\n                  </ng-container>\n                </div>\n              </ng-container>\n              <div\n                TouchFeedbackDirective\n                [className]=\"setActiveClassName(option, 'share-cancel-button')\"\n                class=\"{{ option.prefixCls }}-share-cancel-button\"\n              >\n                {{ option.cancelButtonText }}\n              </div>\n            </div>\n          </ng-container>\n        </div>\n      </div>\n    </div>\n  </div>\n</div>\n",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    /** @nocollapse */
    ActionSheetComponent.ctorParameters = function () { return [
        { type: LocaleProviderService },
        { type: ElementRef }
    ]; };
    return ActionSheetComponent;
}(ActionSheetRef));
if (false) {
    /** @type {?} */
    ActionSheetComponent.prototype.unsubscribe$;
    /** @type {?} */
    ActionSheetComponent.prototype.option;
    /**
     * @type {?}
     * @private
     */
    ActionSheetComponent.prototype.localeProviderService;
    /** @type {?} */
    ActionSheetComponent.prototype.elementRef;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var ActionSheetOptions = /** @class */ (function () {
    function ActionSheetOptions() {
        this.prefixCls = 'am-action-sheet';
        this.maskClosable = true;
        this.transitionName = 'am-slide-up';
        this.maskTransitionName = 'am-fade';
    }
    ActionSheetOptions.decorators = [
        { type: Injectable }
    ];
    return ActionSheetOptions;
}());
if (false) {
    /** @type {?} */
    ActionSheetOptions.prototype.prefixCls;
    /** @type {?} */
    ActionSheetOptions.prototype.maskClosable;
    /** @type {?} */
    ActionSheetOptions.prototype.cancelButtonIndex;
    /** @type {?} */
    ActionSheetOptions.prototype.destructiveButtonIndex;
    /** @type {?} */
    ActionSheetOptions.prototype.title;
    /** @type {?} */
    ActionSheetOptions.prototype.message;
    /** @type {?} */
    ActionSheetOptions.prototype.className;
    /** @type {?} */
    ActionSheetOptions.prototype.transitionName;
    /** @type {?} */
    ActionSheetOptions.prototype.maskTransitionName;
    /** @type {?} */
    ActionSheetOptions.prototype.locale;
    /** @type {?} */
    ActionSheetOptions.prototype.close;
}
var ShareOption = /** @class */ (function () {
    function ShareOption() {
    }
    ShareOption.decorators = [
        { type: Injectable }
    ];
    return ShareOption;
}());
if (false) {
    /** @type {?} */
    ShareOption.prototype.icon;
    /** @type {?} */
    ShareOption.prototype.title;
}
var ShareActionSheetWithOptions = /** @class */ (function (_super) {
    __extends(ShareActionSheetWithOptions, _super);
    function ShareActionSheetWithOptions() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.cancelButtonText = 'Cancel';
        return _this;
    }
    ShareActionSheetWithOptions.decorators = [
        { type: Injectable }
    ];
    return ShareActionSheetWithOptions;
}(ActionSheetOptions));
if (false) {
    /** @type {?} */
    ShareActionSheetWithOptions.prototype.options;
    /** @type {?} */
    ShareActionSheetWithOptions.prototype.cancelButtonText;
}
var ActionSheetWithOptions = /** @class */ (function (_super) {
    __extends(ActionSheetWithOptions, _super);
    function ActionSheetWithOptions() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    ActionSheetWithOptions.decorators = [
        { type: Injectable }
    ];
    return ActionSheetWithOptions;
}(ActionSheetOptions));
if (false) {
    /** @type {?} */
    ActionSheetWithOptions.prototype.options;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/** @type {?} */
var NORMAL = 'NORMAL';
/** @type {?} */
var SHARE = 'SHARE';
/**
 * @return {?}
 */
function noop() { }
var ActionSheetService = /** @class */ (function (_super) {
    __extends(ActionSheetService$1, _super);
    function ActionSheetService$1() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.compRef = null;
        _this._actionSheetCompFactory = null;
        _this.appRef = null;
        _this.comRef = null;
        _this.instance = null;
        return _this;
    }
    /**
     * @param {?} config
     * @param {?=} options
     * @return {?}
     */
    ActionSheetService$1.prototype._initConfig = /**
     * @param {?} config
     * @param {?=} options
     * @return {?}
     */
    function (config, options) {
        if (options === void 0) { options = {}; }
        /** @type {?} */
        var props = new ActionSheetOptions();
        /** @type {?} */
        var optionalParams = [
            'prefixCls',
            'maskClosable',
            'cancelButtonText',
            'cancelButtonIndex',
            'destructiveButtonIndex',
            'title',
            'message',
            'className',
            'transitionName',
            'maskTransitionName',
            'options',
            'locale',
            'close'
        ];
        /** @type {?} */
        var self = this;
        config = Object.assign(options, config, {
            close: (/**
             * @return {?}
             */
            function () {
                if (config.maskClosable) {
                    self.closeWithAnimation(config.transitionName, config.maskTransitionName);
                }
            })
        });
        optionalParams.forEach((/**
         * @param {?} key
         * @return {?}
         */
        function (key) {
            if (config[key] !== undefined) {
                props[key] = config[key];
            }
        }));
        return props;
    };
    /**
     * @param {?} props
     * @return {?}
     */
    ActionSheetService$1.prototype._open = /**
     * @param {?} props
     * @return {?}
     */
    function (props) {
        this.comRef = this.showPopup(ActionSheetComponent);
        this.comRef.instance.option = props;
        return this.comRef && this.comRef.instance;
    };
    /**
     * @param {?} flag
     * @param {?} config
     * @param {?} callback
     * @return {?}
     */
    ActionSheetService$1.prototype.createActionSheet = /**
     * @param {?} flag
     * @param {?} config
     * @param {?} callback
     * @return {?}
     */
    function (flag, config, callback) {
        /** @type {?} */
        var options = flag === NORMAL ? new ActionSheetOptions() : new ShareActionSheetWithOptions();
        /** @type {?} */
        var transitionName = config.transitionName ? config.transitionName : options.transitionName;
        options.transitionName = transitionName + "-enter " + transitionName + "-enter-active";
        /** @type {?} */
        var maskTransitionName = config.maskTransitionName ? config.maskTransitionName : options.maskTransitionName;
        options.maskTransitionName = maskTransitionName + "-enter " + maskTransitionName + "-enter-active";
        /** @type {?} */
        var props = this._initConfig(config, options);
        Object.assign(props, { onPress: cb }, { flag: flag }, { maskClose: props.maskClosable ? cb : (/**
             * @return {?}
             */
            function () { }) });
        /** @type {?} */
        var self = this;
        /**
         * @param {?} index
         * @param {?=} rowIndex
         * @param {?=} event
         * @return {?}
         */
        function cb(index, rowIndex, event) {
            if (rowIndex === void 0) { rowIndex = 0; }
            event.stopPropagation();
            /** @type {?} */
            var res = callback(index, rowIndex);
            if (res && res.then) {
                res.then((/**
                 * @return {?}
                 */
                function () {
                    self.closeWithAnimation(transitionName, maskTransitionName);
                }));
            }
            else {
                self.closeWithAnimation(transitionName, maskTransitionName);
            }
        }
        return this._open(props);
    };
    /**
     * @param {?} transitionName
     * @param {?} maskTransitionName
     * @return {?}
     */
    ActionSheetService$1.prototype.closeWithAnimation = /**
     * @param {?} transitionName
     * @param {?} maskTransitionName
     * @return {?}
     */
    function (transitionName, maskTransitionName) {
        var _this = this;
        this.comRef.instance.option.transitionName = transitionName + "-leave " + transitionName + "-leave-active";
        this.comRef.instance.option.maskTransitionName = maskTransitionName + "-leave " + maskTransitionName + "-leave-active";
        setTimeout((/**
         * @return {?}
         */
        function () {
            _this.close();
        }), 200);
    };
    /**
     * @param {?} config
     * @param {?=} callback
     * @return {?}
     */
    ActionSheetService$1.prototype.showActionSheetWithOptions = /**
     * @param {?} config
     * @param {?=} callback
     * @return {?}
     */
    function (config, callback) {
        if (callback === void 0) { callback = noop; }
        return this.createActionSheet(NORMAL, config, callback);
    };
    /**
     * @param {?} config
     * @param {?=} callback
     * @return {?}
     */
    ActionSheetService$1.prototype.showShareActionSheetWithOptions = /**
     * @param {?} config
     * @param {?=} callback
     * @return {?}
     */
    function (config, callback) {
        if (callback === void 0) { callback = noop; }
        return this.createActionSheet(SHARE, config, callback);
    };
    /**
     * @return {?}
     */
    ActionSheetService$1.prototype.close = /**
     * @return {?}
     */
    function () {
        this.hidePopup();
    };
    ActionSheetService$1.decorators = [
        { type: Injectable, args: [{
                    providedIn: 'root'
                },] }
    ];
    /** @nocollapse */ ActionSheetService$1.ngInjectableDef = ɵɵdefineInjectable({ factory: function ActionSheetService_Factory() { return new ActionSheetService(ɵɵinject(Overlay)); }, token: ActionSheetService, providedIn: "root" });
    return ActionSheetService$1;
}(PopupService));
if (false) {
    /** @type {?} */
    ActionSheetService.prototype.compRef;
    /** @type {?} */
    ActionSheetService.prototype._actionSheetCompFactory;
    /** @type {?} */
    ActionSheetService.prototype.appRef;
    /** @type {?} */
    ActionSheetService.prototype.comRef;
    /** @type {?} */
    ActionSheetService.prototype.instance;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var ActionSheetModule = /** @class */ (function () {
    function ActionSheetModule() {
    }
    ActionSheetModule.decorators = [
        { type: NgModule, args: [{
                    imports: [
                        CommonModule,
                        OverlayModule,
                        NgZorroAntdMobilePipesModule,
                        ListModule,
                        WhiteSpaceModule,
                        WingBlankModule,
                        LocaleProviderModule
                    ],
                    declarations: [ActionSheetComponent],
                    exports: [ActionSheetComponent],
                    entryComponents: [ActionSheetComponent],
                    providers: [PopupService, ActionSheetService]
                },] }
    ];
    return ActionSheetModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var SegmentedControlComponent = /** @class */ (function () {
    function SegmentedControlComponent() {
        this.prefixCls = 'am-segment';
        this.tintColor = '#2DB7F5';
        this.disabled = false;
        this.selectedIndex = 0;
        this.onChange = new EventEmitter();
        this.role = 'tablist';
        this.amSegment = true;
    }
    Object.defineProperty(SegmentedControlComponent.prototype, "amDisabled", {
        get: /**
         * @return {?}
         */
        function () {
            return this.disabled;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @param {?} index
     * @param {?} value
     * @return {?}
     */
    SegmentedControlComponent.prototype.onClick = /**
     * @param {?} index
     * @param {?} value
     * @return {?}
     */
    function (index, value) {
        if (!this.disabled && index !== this.selectedIndex) {
            this.selectedIndex = index;
            this.onChange.emit({ selectedIndex: index, value: value });
        }
    };
    SegmentedControlComponent.decorators = [
        { type: Component, args: [{
                    selector: 'SegmentedControl, nz-segmented-control',
                    template: "<div\n  role=\"tab\"\n  *ngFor=\"let value of values; let i = index\"\n  class=\"{{ prefixCls }}-item\"\n  [ngClass]=\"{ 'am-segment-item-selected': i === selectedIndex }\"\n  [ngStyle]=\"{\n    'border-color': tintColor,\n    color: i === selectedIndex ? '#fff' : tintColor,\n    'background-color': i === selectedIndex ? tintColor : 'transparent'\n  }\"\n  (click)=\"onClick(i, value)\"\n>\n  <div\n    class=\"{{ prefixCls }}-item-inner\"\n    [ngStyle]=\"{ 'background-color': i === selectedIndex ? tintColor : 'transparent' }\"\n  ></div>\n  {{ value }}\n</div>\n"
                }] }
    ];
    /** @nocollapse */
    SegmentedControlComponent.ctorParameters = function () { return []; };
    SegmentedControlComponent.propDecorators = {
        tintColor: [{ type: Input }],
        disabled: [{ type: Input }],
        selectedIndex: [{ type: Input }],
        values: [{ type: Input }],
        onChange: [{ type: Output }],
        role: [{ type: HostBinding, args: ['attr.role',] }],
        amSegment: [{ type: HostBinding, args: ['class.am-segment',] }],
        amDisabled: [{ type: HostBinding, args: ['class.am-segment-disabled',] }]
    };
    return SegmentedControlComponent;
}());
if (false) {
    /** @type {?} */
    SegmentedControlComponent.prototype.prefixCls;
    /** @type {?} */
    SegmentedControlComponent.prototype.tintColor;
    /** @type {?} */
    SegmentedControlComponent.prototype.disabled;
    /** @type {?} */
    SegmentedControlComponent.prototype.selectedIndex;
    /** @type {?} */
    SegmentedControlComponent.prototype.values;
    /** @type {?} */
    SegmentedControlComponent.prototype.onChange;
    /** @type {?} */
    SegmentedControlComponent.prototype.role;
    /** @type {?} */
    SegmentedControlComponent.prototype.amSegment;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var SegmentedControlModule = /** @class */ (function () {
    function SegmentedControlModule() {
    }
    SegmentedControlModule.decorators = [
        { type: NgModule, args: [{
                    imports: [CommonModule],
                    declarations: [SegmentedControlComponent],
                    exports: [SegmentedControlComponent]
                },] }
    ];
    return SegmentedControlModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var TextareaItemComponent = /** @class */ (function () {
    function TextareaItemComponent(element, render) {
        this.element = element;
        this.render = render;
        this.prefixCls = 'am-textarea';
        this.isTitleString = true;
        this.maxLength = Infinity;
        this._prefixListCls = 'am-list';
        this._defaultValue = '';
        this._placeholder = '';
        this._editable = true;
        this._disabled = false;
        this._clear = false;
        this._rows = 1;
        this._error = false;
        this._labelNumber = 5;
        this._name = '';
        this._focus = false;
        this._autoFocus = false;
        this._isClear = false;
        this._isClickingClear = false;
        this.onChange = new EventEmitter();
        this.onBlur = new EventEmitter();
        this.onFocus = new EventEmitter();
        this.onErrorClick = new EventEmitter();
        this.clsItem = true;
        this._onChange = (/**
         * @param {?} _
         * @return {?}
         */
        function (_) { });
        this._el = element.nativeElement;
    }
    Object.defineProperty(TextareaItemComponent.prototype, "value", {
        get: /**
         * @return {?}
         */
        function () {
            return this._value;
        },
        set: /**
         * @param {?} v
         * @return {?}
         */
        function (v) {
            if (typeof v === 'undefined' || v === null) {
                this._value = '';
            }
            else {
                this._value = v;
            }
            this.textRef.nativeElement.value = this._value;
            this._onChange(this._value);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TextareaItemComponent.prototype, "defaultValue", {
        get: /**
         * @return {?}
         */
        function () {
            return this._defaultValue;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._defaultValue = value;
            this._value = this._defaultValue;
            this.textRef.nativeElement.value = this._value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TextareaItemComponent.prototype, "placeholder", {
        get: /**
         * @return {?}
         */
        function () {
            return this._placeholder;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._placeholder = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TextareaItemComponent.prototype, "editable", {
        get: /**
         * @return {?}
         */
        function () {
            return this._editable;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._editable = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TextareaItemComponent.prototype, "disabled", {
        get: /**
         * @return {?}
         */
        function () {
            return this._disabled;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._disabled = value;
            this.setCls();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TextareaItemComponent.prototype, "clear", {
        get: /**
         * @return {?}
         */
        function () {
            return this._clear;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._clear = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TextareaItemComponent.prototype, "rows", {
        get: /**
         * @return {?}
         */
        function () {
            return this._rows;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._rows = value;
            this.setCls();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TextareaItemComponent.prototype, "error", {
        get: /**
         * @return {?}
         */
        function () {
            return this._error;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._error = value;
            this.setCls();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TextareaItemComponent.prototype, "labelNumber", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._labelNumber = value;
            this.setCls();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TextareaItemComponent.prototype, "count", {
        get: /**
         * @return {?}
         */
        function () {
            return this._count;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._count = value;
            this.setCls();
            this.setCharacterLength();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TextareaItemComponent.prototype, "prefixListCls", {
        get: /**
         * @return {?}
         */
        function () {
            return this._prefixListCls;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._prefixListCls = value;
            this.setCls();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TextareaItemComponent.prototype, "name", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._name = value;
            this.textRef.nativeElement.name = this._name;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TextareaItemComponent.prototype, "autoHeight", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._autoHeight = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TextareaItemComponent.prototype, "title", {
        get: /**
         * @return {?}
         */
        function () {
            return this._title;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._title = value;
            this.isTitleString = true;
            if (typeof value !== 'string') {
                this.isTitleString = false;
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TextareaItemComponent.prototype, "focus", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (value && value.focus) {
                this.textRef.nativeElement.focus();
                this.inputFocus('');
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TextareaItemComponent.prototype, "autoFocus", {
        get: /**
         * @return {?}
         */
        function () {
            return this._autoFocus;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._autoFocus = value;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @return {?}
     */
    TextareaItemComponent.prototype.setCls = /**
     * @return {?}
     */
    function () {
        var _a, _b, _c;
        this.hasCount = this._count > 0 && this._rows > 1;
        this.render.addClass(this._el, this._prefixListCls + '-item');
        this.clsSingleLine = this._rows === 1 && !this._autoHeight;
        this.clsDisabled = this._disabled;
        this.clsError = this._error;
        this.clsFocus = this._focus;
        this.clsHasCount = this.hasCount;
        this.labelCls = (_a = {},
            _a[this.prefixCls + "-label"] = true,
            _a[this.prefixCls + "-label-2"] = this._labelNumber === 2,
            _a[this.prefixCls + "-label-3"] = this._labelNumber === 3,
            _a[this.prefixCls + "-label-4"] = this._labelNumber === 4,
            _a[this.prefixCls + "-label-5"] = this._labelNumber === 5,
            _a[this.prefixCls + "-label-6"] = this._labelNumber === 6,
            _a[this.prefixCls + "-label-7"] = this._labelNumber === 7,
            _a);
        this.controlCls = (_b = {}, _b[this.prefixCls + "-control"] = true, _b);
        this.clearCls = (_c = {},
            _c[this.prefixCls + "-clear-active"] = this._isClickingClear,
            _c);
    };
    /**
     * @return {?}
     */
    TextareaItemComponent.prototype.setCharacterLength = /**
     * @return {?}
     */
    function () {
        this.characterLength = this.countSymbols(this._value);
        if (this._count > 0) {
            this.maxLength = this._count - this.characterLength + (this._value ? this._value.length : 0);
        }
    };
    /**
     * @param {?} e
     * @return {?}
     */
    TextareaItemComponent.prototype.inputChange = /**
     * @param {?} e
     * @return {?}
     */
    function (e) {
        this._value = e;
        this.textRef.nativeElement.value = this._value;
        this.setCharacterLength();
        this._onChange(this._value);
        this.onChange.emit(this._value);
    };
    /**
     * @param {?} value
     * @return {?}
     */
    TextareaItemComponent.prototype.inputFocus = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        this._focus = true;
        this.setCls();
        if (value !== undefined) {
            this.onFocus.emit(value);
        }
    };
    /**
     * @param {?} value
     * @param {?} event
     * @return {?}
     */
    TextareaItemComponent.prototype.inputBlur = /**
     * @param {?} value
     * @param {?} event
     * @return {?}
     */
    function (value, event) {
        var _this = this;
        setTimeout((/**
         * @return {?}
         */
        function () {
            _this._focus = false;
            _this.setCls();
            _this.onBlur.emit(value);
            _this._isClear = false;
        }), 100);
    };
    /**
     * @return {?}
     */
    TextareaItemComponent.prototype.clearInput = /**
     * @return {?}
     */
    function () {
        var _this = this;
        this._isClickingClear = true;
        this.setCls();
        setTimeout((/**
         * @return {?}
         */
        function () {
            _this._value = '';
            _this.inputChange('');
            _this.inputFocus(_this._value);
            _this._isClickingClear = false;
            _this.setCls();
        }), 100);
    };
    /**
     * @param {?} e
     * @return {?}
     */
    TextareaItemComponent.prototype.errorClick = /**
     * @param {?} e
     * @return {?}
     */
    function (e) {
        if (this.onErrorClick) {
            this.onErrorClick.emit(e);
        }
    };
    /**
     * @return {?}
     */
    TextareaItemComponent.prototype.reAlignHeight = /**
     * @return {?}
     */
    function () {
        /** @type {?} */
        var textareaDom = this.textRef.nativeElement;
        textareaDom.style.height = '';
        textareaDom.style.height = textareaDom.scrollHeight + "px";
    };
    /**
     * @param {?=} text
     * @return {?}
     */
    TextareaItemComponent.prototype.countSymbols = /**
     * @param {?=} text
     * @return {?}
     */
    function (text) {
        if (text === void 0) { text = ''; }
        /** @type {?} */
        var regexAstralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]|\n/g;
        return text.replace(regexAstralSymbols, '_').length;
    };
    /**
     * @param {?} value
     * @return {?}
     */
    TextareaItemComponent.prototype.writeValue = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        if (typeof value === 'undefined' || value === null) {
            this._value = '';
        }
        else {
            this._value = value;
        }
    };
    /**
     * @param {?} fn
     * @return {?}
     */
    TextareaItemComponent.prototype.registerOnChange = /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) {
        this._onChange = fn;
    };
    /**
     * @param {?} fn
     * @return {?}
     */
    TextareaItemComponent.prototype.registerOnTouched = /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) { };
    /**
     * @return {?}
     */
    TextareaItemComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        this.textRef.nativeElement.value = this._value;
        this.setCls();
        this.setCharacterLength();
    };
    /**
     * @return {?}
     */
    TextareaItemComponent.prototype.ngAfterContentChecked = /**
     * @return {?}
     */
    function () {
        if (this._autoHeight) {
            this.reAlignHeight();
        }
    };
    TextareaItemComponent.decorators = [
        { type: Component, args: [{
                    selector: 'TextareaItem , nzm-textarea-item',
                    template: "<div *ngIf=\"title && isTitleString\" [ngClass]=\"labelCls\">{{ title }}</div>\n<div *ngIf=\"title && !isTitleString\" [ngClass]=\"labelCls\">\n  <ng-template [ngTemplateOutlet]=\"title\"></ng-template>\n</div>\n<div [ngClass]=\"controlCls\">\n  <textarea\n    #text\n    [rows]=\"rows\"\n    [maxlength]=\"maxLength\"\n    [(ngModel)]=\"value\"\n    [defaultValue]=\"defaultValue\"\n    [placeholder]=\"placeholder\"\n    [disabled]=\"disabled\"\n    [readOnly]=\"!editable\"\n    [autofocus]=\"autoFocus\"\n    (ngModelChange)=\"inputChange($event)\"\n    (blur)=\"inputBlur(value, $event)\"\n    (focus)=\"inputFocus(value)\"\n  ></textarea>\n</div>\n<div\n  *ngIf=\"clear && editable && !disabled && (value && value.length > 0)\"\n  class=\"{{ prefixCls }}-clear\"\n  [ngClass]=\"clearCls\"\n  (click)=\"clearInput()\"\n></div>\n<div *ngIf=\"error\" class=\"{{ prefixCls }}-error-extra\" (click)=\"errorClick($event)\"></div>\n<span *ngIf=\"hasCount\" class=\"{{ prefixCls }}-count\">\n  <span>{{ characterLength }}</span\n  >/{{ count }}\n</span>\n",
                    providers: [
                        {
                            provide: NG_VALUE_ACCESSOR,
                            useExisting: forwardRef((/**
                             * @return {?}
                             */
                            function () { return TextareaItemComponent; })),
                            multi: true
                        }
                    ]
                }] }
    ];
    /** @nocollapse */
    TextareaItemComponent.ctorParameters = function () { return [
        { type: ElementRef },
        { type: Renderer2 }
    ]; };
    TextareaItemComponent.propDecorators = {
        textRef: [{ type: ViewChild, args: ['text', { static: true },] }],
        value: [{ type: Input }],
        defaultValue: [{ type: Input }],
        placeholder: [{ type: Input }],
        editable: [{ type: Input }],
        disabled: [{ type: Input }],
        clear: [{ type: Input }],
        rows: [{ type: Input }],
        error: [{ type: Input }],
        labelNumber: [{ type: Input }],
        count: [{ type: Input }],
        prefixListCls: [{ type: Input }],
        name: [{ type: Input }],
        autoHeight: [{ type: Input }],
        title: [{ type: Input }],
        focus: [{ type: Input }],
        autoFocus: [{ type: Input }],
        onChange: [{ type: Output }],
        onBlur: [{ type: Output }],
        onFocus: [{ type: Output }],
        onErrorClick: [{ type: Output }],
        clsItem: [{ type: HostBinding, args: ['class.am-textarea-item',] }],
        clsDisabled: [{ type: HostBinding, args: ['class.am-textarea-disabled',] }],
        clsError: [{ type: HostBinding, args: ['class.am-textarea-error',] }],
        clsFocus: [{ type: HostBinding, args: ['class.am-textarea-focus',] }],
        clsSingleLine: [{ type: HostBinding, args: ['class.am-textarea-item-single-line',] }],
        clsHasCount: [{ type: HostBinding, args: ['class.am-textarea-has-count',] }]
    };
    return TextareaItemComponent;
}());
if (false) {
    /** @type {?} */
    TextareaItemComponent.prototype.prefixCls;
    /** @type {?} */
    TextareaItemComponent.prototype.wrapCls;
    /** @type {?} */
    TextareaItemComponent.prototype.labelCls;
    /** @type {?} */
    TextareaItemComponent.prototype.controlCls;
    /** @type {?} */
    TextareaItemComponent.prototype.clearCls;
    /** @type {?} */
    TextareaItemComponent.prototype.hasCount;
    /** @type {?} */
    TextareaItemComponent.prototype.characterLength;
    /** @type {?} */
    TextareaItemComponent.prototype.isTitleString;
    /** @type {?} */
    TextareaItemComponent.prototype.maxLength;
    /**
     * @type {?}
     * @private
     */
    TextareaItemComponent.prototype._el;
    /**
     * @type {?}
     * @private
     */
    TextareaItemComponent.prototype._prefixListCls;
    /**
     * @type {?}
     * @private
     */
    TextareaItemComponent.prototype._value;
    /**
     * @type {?}
     * @private
     */
    TextareaItemComponent.prototype._defaultValue;
    /**
     * @type {?}
     * @private
     */
    TextareaItemComponent.prototype._placeholder;
    /**
     * @type {?}
     * @private
     */
    TextareaItemComponent.prototype._editable;
    /**
     * @type {?}
     * @private
     */
    TextareaItemComponent.prototype._disabled;
    /**
     * @type {?}
     * @private
     */
    TextareaItemComponent.prototype._clear;
    /**
     * @type {?}
     * @private
     */
    TextareaItemComponent.prototype._rows;
    /**
     * @type {?}
     * @private
     */
    TextareaItemComponent.prototype._count;
    /**
     * @type {?}
     * @private
     */
    TextareaItemComponent.prototype._autoHeight;
    /**
     * @type {?}
     * @private
     */
    TextareaItemComponent.prototype._error;
    /**
     * @type {?}
     * @private
     */
    TextareaItemComponent.prototype._labelNumber;
    /**
     * @type {?}
     * @private
     */
    TextareaItemComponent.prototype._name;
    /**
     * @type {?}
     * @private
     */
    TextareaItemComponent.prototype._title;
    /**
     * @type {?}
     * @private
     */
    TextareaItemComponent.prototype._focus;
    /**
     * @type {?}
     * @private
     */
    TextareaItemComponent.prototype._autoFocus;
    /**
     * @type {?}
     * @private
     */
    TextareaItemComponent.prototype._isClear;
    /**
     * @type {?}
     * @private
     */
    TextareaItemComponent.prototype._isClickingClear;
    /** @type {?} */
    TextareaItemComponent.prototype.textRef;
    /** @type {?} */
    TextareaItemComponent.prototype.onChange;
    /** @type {?} */
    TextareaItemComponent.prototype.onBlur;
    /** @type {?} */
    TextareaItemComponent.prototype.onFocus;
    /** @type {?} */
    TextareaItemComponent.prototype.onErrorClick;
    /** @type {?} */
    TextareaItemComponent.prototype.clsItem;
    /** @type {?} */
    TextareaItemComponent.prototype.clsDisabled;
    /** @type {?} */
    TextareaItemComponent.prototype.clsError;
    /** @type {?} */
    TextareaItemComponent.prototype.clsFocus;
    /** @type {?} */
    TextareaItemComponent.prototype.clsSingleLine;
    /** @type {?} */
    TextareaItemComponent.prototype.clsHasCount;
    /** @type {?} */
    TextareaItemComponent.prototype._onChange;
    /**
     * @type {?}
     * @private
     */
    TextareaItemComponent.prototype.element;
    /**
     * @type {?}
     * @private
     */
    TextareaItemComponent.prototype.render;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var TextareaItemModule = /** @class */ (function () {
    function TextareaItemModule() {
    }
    TextareaItemModule.decorators = [
        { type: NgModule, args: [{
                    exports: [TextareaItemComponent],
                    declarations: [TextareaItemComponent],
                    imports: [CommonModule, FormsModule]
                },] }
    ];
    return TextareaItemModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var TabPaneComponent = /** @class */ (function () {
    function TabPaneComponent() {
        this.isTitleString = true;
    }
    Object.defineProperty(TabPaneComponent.prototype, "title", {
        get: /**
         * @return {?}
         */
        function () {
            return this._title;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.isTitleString = !(value instanceof TemplateRef);
            this._title = value;
        },
        enumerable: true,
        configurable: true
    });
    TabPaneComponent.decorators = [
        { type: Component, args: [{
                    selector: 'TabPane, nzm-tab-pane',
                    template: "<ng-template #content>\n  <ng-content></ng-content>\n</ng-template>\n"
                }] }
    ];
    /** @nocollapse */
    TabPaneComponent.ctorParameters = function () { return []; };
    TabPaneComponent.propDecorators = {
        content: [{ type: ViewChild, args: ['content', { static: true },] }],
        title: [{ type: Input }]
    };
    return TabPaneComponent;
}());
if (false) {
    /** @type {?} */
    TabPaneComponent.prototype.isTitleString;
    /**
     * @type {?}
     * @private
     */
    TabPaneComponent.prototype._title;
    /** @type {?} */
    TabPaneComponent.prototype.content;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var TabsComponent = /** @class */ (function () {
    function TabsComponent() {
        this.prefixCls = 'am-tabs';
        this.selectedKey = 0;
        this.keyToSelect = 0;
        this.paneMoveStyle = 'translate3d(0, 0, 0)';
        this._startTime = 0;
        this._startPosition = 0;
        this._velocityThreshold = 0.3;
        this._tabDirection = 'horizontal';
        this._tabBarPosition = 'top';
        this.page = 5;
        this.swipeable = true;
        this.useOnPan = true;
        this.animated = true;
        this.distanceToChangeTab = 0.3;
        this.tabTitleSize = 0;
        this.tabBarActiveTextColor = '';
        this.tabBarInactiveTextColor = '';
        this.renderTabBar = null;
        this.tabBarBackgroundColor = '#FFF';
        this.prerenderingSiblingsNumber = -1;
        this.tabBarTextStyle = {};
        /**
         * should be removed when https://github.com/angular/angular/issues/20810 resolved *
         */
        this.tabPanesContent = null;
        this.onChange = new EventEmitter();
        this.onTabClick = new EventEmitter();
        this.amTabs = true;
        this.amTabsTop = true;
        this.amTabsLeft = false;
        this.amTabsRight = false;
        this.amTabsBottom = false;
        this.amTabsVertical = false;
        this.amTabsHorizontal = true;
    }
    Object.defineProperty(TabsComponent.prototype, "activeTab", {
        get: /**
         * @return {?}
         */
        function () {
            return this.selectedKey;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.keyToSelect = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TabsComponent.prototype, "tabBarPosition", {
        get: /**
         * @return {?}
         */
        function () {
            return this._tabBarPosition;
        },
        set: /**
         * @param {?} position
         * @return {?}
         */
        function (position) {
            this._tabBarPosition = position;
            switch (position) {
                case 'top':
                    this.amTabsTop = true;
                    this.amTabsLeft = false;
                    this.amTabsRight = false;
                    this.amTabsBottom = false;
                    break;
                case 'left':
                    this.amTabsTop = false;
                    this.amTabsLeft = true;
                    this.amTabsRight = false;
                    this.amTabsBottom = false;
                    break;
                case 'bottom':
                    this.amTabsTop = false;
                    this.amTabsLeft = false;
                    this.amTabsRight = false;
                    this.amTabsBottom = true;
                    break;
                case 'right':
                    this.amTabsTop = false;
                    this.amTabsLeft = false;
                    this.amTabsRight = true;
                    this.amTabsBottom = false;
                    break;
                default:
                    break;
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TabsComponent.prototype, "tabDirection", {
        get: /**
         * @return {?}
         */
        function () {
            return this._tabDirection;
        },
        set: /**
         * @param {?} direction
         * @return {?}
         */
        function (direction) {
            this._tabDirection = direction;
            switch (direction) {
                case 'horizontal':
                    this.amTabsHorizontal = true;
                    this.amTabsVertical = false;
                    break;
                case 'vertical':
                    this.amTabsHorizontal = false;
                    this.amTabsVertical = true;
                    break;
                default:
                    break;
            }
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @param {?} index
     * @return {?}
     */
    TabsComponent.prototype.clickTab = /**
     * @param {?} index
     * @return {?}
     */
    function (index) {
        if (this.selectedKey !== index) {
            this.keyToSelect = index;
            this.onTabClick.emit({ index: this.keyToSelect });
        }
    };
    /**
     * @return {?}
     */
    TabsComponent.prototype.getCurrentTabPanes = /**
     * @return {?}
     */
    function () {
        return this.tabPanesContent || this.tabPanes;
    };
    /**
     * @param {?} event
     * @return {?}
     */
    TabsComponent.prototype.onTouchStart = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        this._startTime = event.timeStamp;
        if (this.getCurrentTabPanes() && this.getCurrentTabPanes().length > 0) {
            if ('horizontal' === this._tabDirection) {
                this._startPosition =
                    event && event.changedTouches && event.changedTouches[0] && event.changedTouches[0].clientX;
            }
            else if ('vertical' === this._tabDirection) {
                this._startPosition =
                    event && event.changedTouches && event.changedTouches[0] && event.changedTouches[0].clientY;
            }
        }
    };
    /**
     * @param {?} event
     * @return {?}
     */
    TabsComponent.prototype.onTouchMove = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        if (this.getCurrentTabPanes() && this.getCurrentTabPanes().length > 0) {
            if ('horizontal' === this._tabDirection) {
                /** @type {?} */
                var distance = event.changedTouches[0].clientX - this._startPosition;
                if (distance < 0 && this.activeTab === this.getCurrentTabPanes().length - 1) {
                    return;
                }
                else if (distance > 0 && this.activeTab === 0) {
                    return;
                }
                // velocity 小于阈值才认为是pan操作
                if (this.getVelocity(distance, event.timeStamp - this._startTime) <= this._velocityThreshold &&
                    this.useOnPan &&
                    this.swipeable &&
                    this.animated) {
                    this.paneMoveStyle = 'translate3d(calc(-' + this.selectedKey * 100 + '% + ' + distance + 'px), 0, 0 )';
                }
            }
            else if ('vertical' === this._tabDirection) {
                /** @type {?} */
                var distance = event.changedTouches[0].clientY - this._startPosition;
                if (distance < 0 && this.activeTab === this.getCurrentTabPanes().length - 1) {
                    return;
                }
                else if (distance > 0 && this.activeTab === 0) {
                    return;
                }
                if (this.getVelocity(distance, event.timeStamp - this._startTime) <= this._velocityThreshold &&
                    this.useOnPan &&
                    this.swipeable &&
                    this.animated) {
                    this.paneMoveStyle = 'translate3d(0, calc(-' + this.selectedKey * 100 + '% + ' + distance + 'px, 0 )';
                }
            }
        }
    };
    /**
     * @param {?} event
     * @return {?}
     */
    TabsComponent.prototype.onTouchEnd = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        if (this.getCurrentTabPanes() && this.getCurrentTabPanes().length > 0) {
            if ('horizontal' === this._tabDirection) {
                /** @type {?} */
                var distance = event.changedTouches[0].clientX - this._startPosition;
                /** @type {?} */
                var distanceToChangeTabPx = this.tabContent.nativeElement.offsetWidth * this.distanceToChangeTab;
                if ((this.getVelocity(distance, event.timeStamp - this._startTime) <= this._velocityThreshold &&
                    (this.useOnPan && this.swipeable && Math.abs(distance) > distanceToChangeTabPx)) ||
                    (this.getVelocity(distance, event.timeStamp - this._startTime) > this._velocityThreshold &&
                        (this.swipeable && Math.abs(distance) > distanceToChangeTabPx / 2))) {
                    if (distance < 0 && this.activeTab < this.getCurrentTabPanes().length - 1) {
                        this.keyToSelect++;
                    }
                    else if (distance > 0 && this.activeTab > 0) {
                        this.keyToSelect--;
                    }
                }
                this.paneMoveStyle = 'translate3d(-' + this.selectedKey * 100 + '%, 0, 0 )';
            }
            else if ('vertical' === this._tabDirection) {
                /** @type {?} */
                var distance = event.changedTouches[0].clientY - this._startPosition;
                /** @type {?} */
                var distanceToChangeTabPx = this.tabContent.nativeElement.offsetHeight * this.distanceToChangeTab;
                if ((this.getVelocity(distance, event.timeStamp - this._startTime) <= this._velocityThreshold &&
                    (this.useOnPan && this.swipeable && Math.abs(distance) > distanceToChangeTabPx)) ||
                    (this.getVelocity(distance, event.timeStamp - this._startTime) > this._velocityThreshold &&
                        (this.swipeable && Math.abs(distance) > distanceToChangeTabPx / 2))) {
                    if (distance < 0 && this.activeTab < this.getCurrentTabPanes().length - 1) {
                        this.keyToSelect++;
                    }
                    else if (distance > 0 && this.activeTab > 0) {
                        this.keyToSelect--;
                    }
                }
                this.paneMoveStyle = 'translate3d(0, -' + this.selectedKey * 100 + '%, 0 )';
            }
        }
    };
    /**
     * @return {?}
     */
    TabsComponent.prototype.ngAfterContentInit = /**
     * @return {?}
     */
    function () {
        this.selectTabPane(this.keyToSelect);
        this.selectedKey = this.keyToSelect;
    };
    /**
     * @return {?}
     */
    TabsComponent.prototype.ngDoCheck = /**
     * @return {?}
     */
    function () {
        if (this.keyToSelect !== this.selectedKey && this.getCurrentTabPanes() && this.getCurrentTabPanes().length > 0) {
            this.selectTabPane(this.keyToSelect);
            this.selectedKey = this.keyToSelect;
            this.onChange.emit({ index: this.selectedKey });
        }
    };
    /**
     * @private
     * @param {?} index
     * @return {?}
     */
    TabsComponent.prototype.selectTabPane = /**
     * @private
     * @param {?} index
     * @return {?}
     */
    function (index) {
        if (this.getCurrentTabPanes() && this.getCurrentTabPanes().length > 0) {
            /** @type {?} */
            var actualKeyToSelect = Math.min(this.getCurrentTabPanes().length - 1, Math.max(index || 0, 0));
            if ('horizontal' === this._tabDirection) {
                this.paneMoveStyle = 'translate3d(-' + actualKeyToSelect * 100 + '%, 0, 0 )';
            }
            else if ('vertical' === this._tabDirection) {
                this.paneMoveStyle = 'translate3d(0, -' + actualKeyToSelect * 100 + '%, 0 )';
            }
        }
    };
    /**
     * @private
     * @param {?} deltaDistance
     * @param {?} deltaTime
     * @return {?}
     */
    TabsComponent.prototype.getVelocity = /**
     * @private
     * @param {?} deltaDistance
     * @param {?} deltaTime
     * @return {?}
     */
    function (deltaDistance, deltaTime) {
        return Math.abs(deltaDistance / deltaTime);
    };
    TabsComponent.decorators = [
        { type: Component, args: [{
                    selector: 'Tabs, nzm-tabs',
                    template: "<ng-container>\n  <ng-template\n    *ngIf=\"'top' === tabBarPosition || 'left' === tabBarPosition\"\n    [ngTemplateOutlet]=\"renderTabBar || renderDefaultTabBar\"\n  >\n  </ng-template>\n  <div\n    #TabContent\n    class=\"{{ prefixCls }}-content-wrap\"\n    [ngClass]=\"{ 'am-tabs-content-wrap-animated': animated }\"\n    [ngStyle]=\"{ transform: paneMoveStyle, webkitTransform: paneMoveStyle }\"\n    (touchstart)=\"onTouchStart($event)\"\n    (touchmove)=\"onTouchMove($event)\"\n    (touchend)=\"onTouchEnd($event)\"\n  >\n    <div\n      tab-pane-body\n      *ngFor=\"let tabPane of getCurrentTabPanes(); let i = index\"\n      [content]=\"tabPane.content\"\n      [active]=\"i === selectedKey\"\n      [prerender]=\"\n        prerenderingSiblingsNumber < 0 ||\n        (selectedKey - i <= prerenderingSiblingsNumber && selectedKey - i + prerenderingSiblingsNumber >= 0)\n      \"\n    ></div>\n  </div>\n  <ng-template\n    *ngIf=\"'bottom' === tabBarPosition || 'right' === tabBarPosition\"\n    [ngTemplateOutlet]=\"renderTabBar || renderDefaultTabBar\"\n  ></ng-template>\n</ng-container>\n\n<ng-template #renderDefaultTabBar>\n  <DefaultTabBar\n    #DefaultTabBar\n    [page]=\"page\"\n    [animated]=\"animated\"\n    [activeTab]=\"selectedKey\"\n    [tabTitleSize]=\"tabTitleSize\"\n    [tabBarPosition]=\"tabBarPosition\"\n    [tabBarUnderlineStyle]=\"tabBarUnderlineStyle\"\n    [tabBarBackgroundColor]=\"tabBarBackgroundColor\"\n  >\n    <div\n      #TabTitle\n      *ngFor=\"let tabPane of getCurrentTabPanes(); let i = index\"\n      class=\"{{ prefixCls }}-default-bar-tab\"\n      [ngClass]=\"{\n        'am-tabs-default-bar-tab-active': i === selectedKey,\n        'am-tabs-default-bar-tab-disabled': tabPane.disabled\n      }\"\n      [ngStyle]=\"tabBarTextStyle\"\n      [style.color]=\"i === selectedKey ? tabBarActiveTextColor : tabBarInactiveTextColor\"\n      (click)=\"clickTab(i)\"\n    >\n      <ng-container *ngIf=\"tabPane.isTitleString; else titleTemplate\">\n        {{ tabPane.title }}\n      </ng-container>\n      <ng-template #titleTemplate>\n        <ng-template [ngTemplateOutlet]=\"tabPane.title\"></ng-template>\n      </ng-template>\n    </div>\n  </DefaultTabBar>\n</ng-template>\n",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    /** @nocollapse */
    TabsComponent.ctorParameters = function () { return []; };
    TabsComponent.propDecorators = {
        tabPanes: [{ type: ContentChildren, args: [TabPaneComponent, { descendants: false },] }],
        tabContent: [{ type: ViewChild, args: ['TabContent', { static: true },] }],
        defaultTabBar: [{ type: ViewChild, args: ['DefaultTabBar', { static: false },] }],
        page: [{ type: Input }],
        swipeable: [{ type: Input }],
        useOnPan: [{ type: Input }],
        animated: [{ type: Input }],
        tabBarUnderlineStyle: [{ type: Input }],
        distanceToChangeTab: [{ type: Input }],
        tabTitleSize: [{ type: Input }],
        tabBarActiveTextColor: [{ type: Input }],
        tabBarInactiveTextColor: [{ type: Input }],
        renderTabBar: [{ type: Input }],
        tabBarBackgroundColor: [{ type: Input }],
        prerenderingSiblingsNumber: [{ type: Input }],
        tabBarTextStyle: [{ type: Input }],
        tabPanesContent: [{ type: Input }],
        activeTab: [{ type: Input }],
        tabBarPosition: [{ type: Input }],
        tabDirection: [{ type: Input }],
        onChange: [{ type: Output }],
        onTabClick: [{ type: Output }],
        amTabs: [{ type: HostBinding, args: ['class.am-tabs',] }],
        amTabsTop: [{ type: HostBinding, args: ['class.am-tabs-top',] }],
        amTabsLeft: [{ type: HostBinding, args: ['class.am-tabs-left',] }],
        amTabsRight: [{ type: HostBinding, args: ['class.am-tabs-right',] }],
        amTabsBottom: [{ type: HostBinding, args: ['class.am-tabs-bottom',] }],
        amTabsVertical: [{ type: HostBinding, args: ['class.am-tabs-vertical',] }],
        amTabsHorizontal: [{ type: HostBinding, args: ['class.am-tabs-horizontal',] }]
    };
    return TabsComponent;
}());
if (false) {
    /** @type {?} */
    TabsComponent.prototype.prefixCls;
    /** @type {?} */
    TabsComponent.prototype.selectedKey;
    /** @type {?} */
    TabsComponent.prototype.keyToSelect;
    /** @type {?} */
    TabsComponent.prototype.paneMoveStyle;
    /**
     * @type {?}
     * @private
     */
    TabsComponent.prototype._startTime;
    /**
     * @type {?}
     * @private
     */
    TabsComponent.prototype._startPosition;
    /**
     * @type {?}
     * @private
     */
    TabsComponent.prototype._velocityThreshold;
    /**
     * @type {?}
     * @private
     */
    TabsComponent.prototype._tabDirection;
    /**
     * @type {?}
     * @private
     */
    TabsComponent.prototype._tabBarPosition;
    /** @type {?} */
    TabsComponent.prototype.tabPanes;
    /** @type {?} */
    TabsComponent.prototype.tabContent;
    /** @type {?} */
    TabsComponent.prototype.defaultTabBar;
    /** @type {?} */
    TabsComponent.prototype.page;
    /** @type {?} */
    TabsComponent.prototype.swipeable;
    /** @type {?} */
    TabsComponent.prototype.useOnPan;
    /** @type {?} */
    TabsComponent.prototype.animated;
    /** @type {?} */
    TabsComponent.prototype.tabBarUnderlineStyle;
    /** @type {?} */
    TabsComponent.prototype.distanceToChangeTab;
    /** @type {?} */
    TabsComponent.prototype.tabTitleSize;
    /** @type {?} */
    TabsComponent.prototype.tabBarActiveTextColor;
    /** @type {?} */
    TabsComponent.prototype.tabBarInactiveTextColor;
    /** @type {?} */
    TabsComponent.prototype.renderTabBar;
    /** @type {?} */
    TabsComponent.prototype.tabBarBackgroundColor;
    /** @type {?} */
    TabsComponent.prototype.prerenderingSiblingsNumber;
    /** @type {?} */
    TabsComponent.prototype.tabBarTextStyle;
    /**
     * should be removed when https://github.com/angular/angular/issues/20810 resolved *
     * @type {?}
     */
    TabsComponent.prototype.tabPanesContent;
    /** @type {?} */
    TabsComponent.prototype.onChange;
    /** @type {?} */
    TabsComponent.prototype.onTabClick;
    /** @type {?} */
    TabsComponent.prototype.amTabs;
    /** @type {?} */
    TabsComponent.prototype.amTabsTop;
    /** @type {?} */
    TabsComponent.prototype.amTabsLeft;
    /** @type {?} */
    TabsComponent.prototype.amTabsRight;
    /** @type {?} */
    TabsComponent.prototype.amTabsBottom;
    /** @type {?} */
    TabsComponent.prototype.amTabsVertical;
    /** @type {?} */
    TabsComponent.prototype.amTabsHorizontal;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var TabPaneBodyComponent = /** @class */ (function () {
    function TabPaneBodyComponent() {
        this._prerender = false;
        this.active = false;
        this.loaded = false;
        this.paneWrap = true;
    }
    Object.defineProperty(TabPaneBodyComponent.prototype, "prerender", {
        get: /**
         * @return {?}
         */
        function () {
            return this._prerender;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._prerender = value;
            if (value) {
                this.loaded = true;
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TabPaneBodyComponent.prototype, "wrapActive", {
        get: /**
         * @return {?}
         */
        function () {
            return this.active;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TabPaneBodyComponent.prototype, "wrapInactive", {
        get: /**
         * @return {?}
         */
        function () {
            return !this.active;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @return {?}
     */
    TabPaneBodyComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () { };
    TabPaneBodyComponent.decorators = [
        { type: Component, args: [{
                    selector: '[tab-pane-body]',
                    template: "<ng-container *ngIf=\"loaded || prerender\">\n  <ng-template [ngTemplateOutlet]=\"content\"></ng-template>\n</ng-container>\n",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    /** @nocollapse */
    TabPaneBodyComponent.ctorParameters = function () { return []; };
    TabPaneBodyComponent.propDecorators = {
        active: [{ type: Input }],
        loaded: [{ type: Input }],
        content: [{ type: Input }],
        prerender: [{ type: Input }],
        paneWrap: [{ type: HostBinding, args: ['class.am-tabs-pane-wrap',] }],
        wrapActive: [{ type: HostBinding, args: ['class.am-tabs-pane-wrap-active',] }],
        wrapInactive: [{ type: HostBinding, args: ['class.am-tabs-pane-wrap-inactive',] }]
    };
    return TabPaneBodyComponent;
}());
if (false) {
    /**
     * @type {?}
     * @private
     */
    TabPaneBodyComponent.prototype._prerender;
    /** @type {?} */
    TabPaneBodyComponent.prototype.active;
    /** @type {?} */
    TabPaneBodyComponent.prototype.loaded;
    /** @type {?} */
    TabPaneBodyComponent.prototype.content;
    /** @type {?} */
    TabPaneBodyComponent.prototype.paneWrap;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var DefaultTabBarComponent = /** @class */ (function () {
    function DefaultTabBarComponent(_renderer, _ref) {
        this._renderer = _renderer;
        this._ref = _ref;
        this.prefixCls = 'am-tabs-default-bar';
        this.inkBarStyle = {};
        this.tabsBarStyle = {};
        this.showPrev = false;
        this.showNext = false;
        this.selectedKey = 0;
        this.inkBarOffSet = 0;
        this.inkBarLength = 0;
        this.tabBarNavSwipedPosition = 0;
        this.tabBarNavSwipingPosition = 0;
        this._startPosition = 0;
        this.page = 5;
        this.animated = true;
        this.tabBarBackgroundColor = '#FFF';
        this.tabTitleSize = 0;
        this.tabBarPosition = 'top';
        this.tabBarWrap = true;
        this.getTabSize = (/**
         * @param {?} page
         * @param {?} tabLength
         * @return {?}
         */
        function (page, tabLength) { return 100 / Math.min(page, tabLength); });
    }
    Object.defineProperty(DefaultTabBarComponent.prototype, "activeTab", {
        get: /**
         * @return {?}
         */
        function () {
            return this.selectedKey;
        },
        set: /**
         * @param {?} index
         * @return {?}
         */
        function (index) {
            if (index !== this.selectedKey) {
                this.selectedKey = index;
                if (this.tabTitles && this.tabTitles.length > 0) {
                    this.setTabBarStyleCenter();
                    this.setInkBarStatus(this.selectedKey);
                }
            }
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @param {?} event
     * @return {?}
     */
    DefaultTabBarComponent.prototype.onTouchStart = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        if ((this.tabTitleSize > 0 &&
            this.tabTitleSize * this.tabTitles.length >
                ('top' === this.tabBarPosition || 'bottom' === this.tabBarPosition
                    ? this.tabsBarSwipe.nativeElement.offsetWidth
                    : this.tabsBarSwipe.nativeElement.offsetHeight)) ||
            (this.tabTitleSize <= 0 && this.page < this.tabTitles.length)) {
            if ('top' === this.tabBarPosition || 'bottom' === this.tabBarPosition) {
                this._startPosition =
                    event && event.changedTouches && event.changedTouches[0] && event.changedTouches[0].clientX;
            }
            else {
                this._startPosition =
                    event && event.changedTouches && event.changedTouches[0] && event.changedTouches[0].clientY;
            }
        }
    };
    /**
     * @param {?} event
     * @return {?}
     */
    DefaultTabBarComponent.prototype.onTouchMove = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        event.preventDefault();
        event.stopPropagation();
        if ((this.tabTitleSize > 0 &&
            this.tabTitleSize * this.tabTitles.length >
                ('top' === this.tabBarPosition || 'bottom' === this.tabBarPosition
                    ? this.tabsBarSwipe.nativeElement.offsetWidth
                    : this.tabsBarSwipe.nativeElement.offsetHeight)) ||
            (this.tabTitleSize <= 0 && this.page < this.tabTitles.length)) {
            if ('top' === this.tabBarPosition || 'bottom' === this.tabBarPosition) {
                this.setTabBarNavSwipingPosition(event.changedTouches[0].clientX - this._startPosition, this.tabTitles.first.nativeElement.offsetWidth, this.tabsBarSwipe.nativeElement.offsetWidth);
                this.tabsBarStyle = {
                    transition: '0ms',
                    transform: 'translate3d(' + this.tabBarNavSwipingPosition + 'px, 0px, 0px)',
                    webkitTransform: 'translate3d(' + this.tabBarNavSwipingPosition + 'px, 0px, 0px)'
                };
            }
            else {
                this.setTabBarNavSwipingPosition(event.changedTouches[0].clientY - this._startPosition, this.tabTitles.first.nativeElement.offsetHeight, this.tabsBarSwipe.nativeElement.offsetHeight);
                this.tabsBarStyle = {
                    transition: '0ms',
                    transform: 'translate3d(0, ' + this.tabBarNavSwipingPosition + 'px, 0px)',
                    webkitTransform: 'translate3d(0, ' + this.tabBarNavSwipingPosition + 'px, 0px)'
                };
            }
        }
    };
    /**
     * @return {?}
     */
    DefaultTabBarComponent.prototype.onTouchEnd = /**
     * @return {?}
     */
    function () {
        if ((this.tabTitleSize > 0 &&
            this.tabTitleSize * this.tabTitles.length >
                ('top' === this.tabBarPosition || 'bottom' === this.tabBarPosition
                    ? this.tabsBarSwipe.nativeElement.offsetWidth
                    : this.tabsBarSwipe.nativeElement.offsetHeight)) ||
            (this.tabTitleSize <= 0 && this.page < this.tabTitles.length)) {
            this.tabBarNavSwipedPosition = this.tabBarNavSwipingPosition;
        }
    };
    /**
     * @return {?}
     */
    DefaultTabBarComponent.prototype.onContentChange = /**
     * @return {?}
     */
    function () {
        this.setTabsStyle();
        this.setInkBarStatus(this.selectedKey);
    };
    /**
     * @return {?}
     */
    DefaultTabBarComponent.prototype.ngAfterContentInit = /**
     * @return {?}
     */
    function () {
        this.setTabsStyle();
        this.setTabBarStyleCenter();
        this.setInkBarStatus(this.selectedKey);
    };
    /**
     * @private
     * @return {?}
     */
    DefaultTabBarComponent.prototype.setTabsStyle = /**
     * @private
     * @return {?}
     */
    function () {
        var _this = this;
        if (this.tabTitles && this.tabTitles.length > 0) {
            if ('top' === this.tabBarPosition || 'bottom' === this.tabBarPosition) {
                this.tabTitles.forEach((/**
                 * @param {?} tabTitle
                 * @return {?}
                 */
                function (tabTitle) {
                    _this._renderer.setStyle(tabTitle.nativeElement, 'width', _this.tabTitleSize > 0 ? _this.tabTitleSize + 'px' : _this.getTabSize(_this.page, _this.tabTitles.length) + '%');
                }));
            }
            else {
                this.tabTitles.forEach((/**
                 * @param {?} tabTitle
                 * @return {?}
                 */
                function (tabTitle) {
                    _this._renderer.setStyle(tabTitle.nativeElement, 'height', _this.tabTitleSize > 0 ? _this.tabTitleSize + 'px' : _this.getTabSize(_this.page, _this.tabTitles.length) + '%');
                }));
            }
        }
    };
    /**
     * @private
     * @return {?}
     */
    DefaultTabBarComponent.prototype.setTabBarStyleCenter = /**
     * @private
     * @return {?}
     */
    function () {
        if ('top' === this.tabBarPosition || 'bottom' === this.tabBarPosition) {
            this.setTabBarNavSwipedPosition(this.tabTitleSize > 0
                ? this.tabTitleSize
                : this.tabsBarSwipe.nativeElement.offsetWidth / Math.min(this.tabTitles.length, this.page), this.tabsBarSwipe.nativeElement.offsetWidth);
            this.tabsBarStyle = {
                transform: 'translate3d(' + this.tabBarNavSwipedPosition + 'px, 0px, 0px)',
                webkitTransform: 'translate3d(' + this.tabBarNavSwipedPosition + ', 0px, 0px)'
            };
        }
        else {
            this.setTabBarNavSwipedPosition(this.tabTitleSize > 0
                ? this.tabTitleSize
                : this.tabsBarSwipe.nativeElement.offsetHeight / Math.min(this.tabTitles.length, this.page), this.tabsBarSwipe.nativeElement.offsetHeight);
            this.tabsBarStyle = {
                transform: 'translate3d(0, ' + this.tabBarNavSwipedPosition + 'px, 0px)',
                webkitTransform: 'translate3d(0, ' + this.tabBarNavSwipedPosition + 'px, 0px)'
            };
        }
    };
    /**
     * @private
     * @param {?} key
     * @return {?}
     */
    DefaultTabBarComponent.prototype.setInkBarStatus = /**
     * @private
     * @param {?} key
     * @return {?}
     */
    function (key) {
        if (this.tabTitles && this.tabTitles.length > 0) {
            if ('top' === this.tabBarPosition || 'bottom' === this.tabBarPosition) {
                this.inkBarOffSet = this.tabTitles.toArray()[key].nativeElement.offsetLeft;
                this.inkBarLength = this.tabTitles.toArray()[key].nativeElement.style.width;
                this.inkBarStyle = {
                    width: this.inkBarLength,
                    left: this.tabTitleSize > 0
                        ? this.selectedKey * this.tabTitleSize + 'px'
                        : (this.selectedKey * 100) / Math.min(this.tabTitles.length, this.page) + '%'
                };
                Object.assign(this.inkBarStyle, this.tabBarUnderlineStyle);
            }
            else {
                this.inkBarOffSet = this.tabTitles.toArray()[key].nativeElement.offsetTop;
                this.inkBarLength = this.tabTitles.toArray()[key].nativeElement.style.height;
                this.inkBarStyle = {
                    height: this.inkBarLength,
                    top: this.tabTitleSize > 0
                        ? this.selectedKey * this.tabTitleSize + 'px'
                        : (this.selectedKey * 100) / Math.min(this.tabTitles.length, this.page) + '%'
                };
                Object.assign(this.inkBarStyle, this.tabBarUnderlineStyle);
            }
            this._ref.detectChanges();
        }
    };
    /**
     * @private
     * @param {?} swipingDistance
     * @param {?} swipingItemLength
     * @param {?} viewportLength
     * @return {?}
     */
    DefaultTabBarComponent.prototype.setTabBarNavSwipingPosition = /**
     * @private
     * @param {?} swipingDistance
     * @param {?} swipingItemLength
     * @param {?} viewportLength
     * @return {?}
     */
    function (swipingDistance, swipingItemLength, viewportLength) {
        if (this.tabBarNavSwipedPosition + swipingDistance > 0) {
            this.tabBarNavSwipingPosition = 0;
        }
        else if (this.tabBarNavSwipedPosition + swipingDistance <
            viewportLength - swipingItemLength * this.tabTitles.length) {
            this.tabBarNavSwipingPosition = viewportLength - swipingItemLength * this.tabTitles.length;
            this.showNext = false;
        }
        else {
            this.tabBarNavSwipingPosition = this.tabBarNavSwipedPosition + swipingDistance;
            this.showNext = true;
        }
        if (this.tabBarNavSwipingPosition < 0) {
            this.showPrev = true;
        }
        else {
            this.showPrev = false;
        }
    };
    /**
     * @private
     * @param {?} swipingItemLength
     * @param {?} viewportLength
     * @return {?}
     */
    DefaultTabBarComponent.prototype.setTabBarNavSwipedPosition = /**
     * @private
     * @param {?} swipingItemLength
     * @param {?} viewportLength
     * @return {?}
     */
    function (swipingItemLength, viewportLength) {
        if (this.selectedKey * swipingItemLength + this.tabBarNavSwipedPosition <= 0) {
            if (0 === this.selectedKey) {
                this.tabBarNavSwipedPosition = 0;
            }
            else {
                this.tabBarNavSwipedPosition = (1 - this.selectedKey) * swipingItemLength;
            }
        }
        else if ((this.selectedKey + 1) * swipingItemLength >= viewportLength - this.tabBarNavSwipedPosition) {
            if (this.tabTitles.length - 1 === this.selectedKey) {
                this.tabBarNavSwipedPosition = viewportLength - (this.selectedKey + 1) * swipingItemLength;
            }
            else {
                this.tabBarNavSwipedPosition = viewportLength - (this.selectedKey + 2) * swipingItemLength;
            }
        }
        if (this.tabBarNavSwipedPosition < 0) {
            this.showPrev = true;
        }
        else {
            this.showPrev = false;
        }
        if (this.tabBarNavSwipedPosition + swipingItemLength * this.tabTitles.length - viewportLength > 0) {
            this.showNext = true;
        }
        else {
            this.showNext = false;
        }
    };
    DefaultTabBarComponent.decorators = [
        { type: Component, args: [{
                    selector: 'DefaultTabBar, nzm-default-tab-bar',
                    template: "<div\n  class=\"{{ prefixCls }} {{ prefixCls }}-{{ tabBarPosition }}\"\n  [ngClass]=\"{ 'am-tabs-default-bar-animated': animated }\"\n  [ngStyle]=\"{ backgroundColor: tabBarBackgroundColor || '#FFF' }\"\n>\n  <div *ngIf=\"showPrev\" class=\"{{ prefixCls }}-prevpage\"></div>\n  <div\n    #TabsBarSwipe\n    class=\"{{ prefixCls }}-content\"\n    [ngStyle]=\"tabsBarStyle\"\n    (touchstart)=\"onTouchStart($event)\"\n    (touchmove)=\"onTouchMove($event)\"\n    (touchend)=\"onTouchEnd()\"\n    (cdkObserveContent)=\"onContentChange()\"\n  >\n    <ng-content></ng-content>\n    <div class=\"{{ prefixCls }}-underline\" [ngStyle]=\"inkBarStyle\"></div>\n  </div>\n  <div *ngIf=\"showNext\" class=\"{{ prefixCls }}-nextpage\"></div>\n</div>\n"
                }] }
    ];
    /** @nocollapse */
    DefaultTabBarComponent.ctorParameters = function () { return [
        { type: Renderer2 },
        { type: ChangeDetectorRef }
    ]; };
    DefaultTabBarComponent.propDecorators = {
        tabTitles: [{ type: ContentChildren, args: ['TabTitle',] }],
        tabsBarSwipe: [{ type: ViewChild, args: ['TabsBarSwipe', { static: true },] }],
        page: [{ type: Input }],
        animated: [{ type: Input }],
        tabBarUnderlineStyle: [{ type: Input }],
        tabBarBackgroundColor: [{ type: Input }],
        tabTitleSize: [{ type: Input }],
        tabBarPosition: [{ type: Input }],
        activeTab: [{ type: Input }],
        tabBarWrap: [{ type: HostBinding, args: ['class.am-tabs-tab-bar-wrap',] }]
    };
    return DefaultTabBarComponent;
}());
if (false) {
    /** @type {?} */
    DefaultTabBarComponent.prototype.prefixCls;
    /** @type {?} */
    DefaultTabBarComponent.prototype.inkBarStyle;
    /** @type {?} */
    DefaultTabBarComponent.prototype.tabsBarStyle;
    /** @type {?} */
    DefaultTabBarComponent.prototype.showPrev;
    /** @type {?} */
    DefaultTabBarComponent.prototype.showNext;
    /** @type {?} */
    DefaultTabBarComponent.prototype.selectedKey;
    /** @type {?} */
    DefaultTabBarComponent.prototype.inkBarOffSet;
    /** @type {?} */
    DefaultTabBarComponent.prototype.inkBarLength;
    /** @type {?} */
    DefaultTabBarComponent.prototype.tabBarNavSwipedPosition;
    /** @type {?} */
    DefaultTabBarComponent.prototype.tabBarNavSwipingPosition;
    /**
     * @type {?}
     * @private
     */
    DefaultTabBarComponent.prototype._startPosition;
    /** @type {?} */
    DefaultTabBarComponent.prototype.tabTitles;
    /** @type {?} */
    DefaultTabBarComponent.prototype.tabsBarSwipe;
    /** @type {?} */
    DefaultTabBarComponent.prototype.page;
    /** @type {?} */
    DefaultTabBarComponent.prototype.animated;
    /** @type {?} */
    DefaultTabBarComponent.prototype.tabBarUnderlineStyle;
    /** @type {?} */
    DefaultTabBarComponent.prototype.tabBarBackgroundColor;
    /** @type {?} */
    DefaultTabBarComponent.prototype.tabTitleSize;
    /** @type {?} */
    DefaultTabBarComponent.prototype.tabBarPosition;
    /** @type {?} */
    DefaultTabBarComponent.prototype.tabBarWrap;
    /**
     * @type {?}
     * @private
     */
    DefaultTabBarComponent.prototype.getTabSize;
    /**
     * @type {?}
     * @private
     */
    DefaultTabBarComponent.prototype._renderer;
    /**
     * @type {?}
     * @private
     */
    DefaultTabBarComponent.prototype._ref;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var TabsModule = /** @class */ (function () {
    function TabsModule() {
    }
    TabsModule.decorators = [
        { type: NgModule, args: [{
                    imports: [CommonModule, ObserversModule],
                    declarations: [TabPaneComponent, TabsComponent, TabPaneBodyComponent, DefaultTabBarComponent],
                    exports: [TabPaneComponent, TabsComponent, TabPaneBodyComponent, DefaultTabBarComponent],
                    providers: []
                },] }
    ];
    return TabsModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var TabBarItemComponent = /** @class */ (function (_super) {
    __extends(TabBarItemComponent, _super);
    function TabBarItemComponent() {
        var _this = _super.call(this) || this;
        _this.prefixCls = 'am-tab-bar-tab';
        _this.selected = false;
        _this.tintColor = '#108ee9';
        _this.unselectedTintColor = '#888';
        _this.key = '';
        _this.title = '';
        _this.dot = false;
        _this.badge = null;
        _this.icon = null;
        _this.selectedIcon = null;
        return _this;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    TabBarItemComponent.prototype.isTemplateRef = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        return value instanceof TemplateRef;
    };
    TabBarItemComponent.decorators = [
        { type: Component, args: [{
                    selector: 'TabBarItem, nzm-tab-bar-item',
                    template: "<ng-template #content>\n  <ng-content></ng-content>\n</ng-template>\n\n<ng-template #tabBarTab>\n  <div class=\"{{ prefixCls }}-icon\" [style.color]=\"selected ? tintColor : unselectedTintColor\">\n    <Badge *ngIf=\"badge\" className=\"{{ prefixCls }}-badge tab-badge\" [text]=\"badge\">\n      <ng-container *ngIf=\"isTemplateRef(selected ? selectedIcon : icon); then domTemplate; else imgTemplate\">\n      </ng-container>\n    </Badge>\n    <Badge className=\"{{ prefixCls }}-badge tab-badge\" [dot]=\"dot\" *ngIf=\"dot\">\n      <ng-container *ngIf=\"isTemplateRef(selected ? selectedIcon : icon); then domTemplate; else imgTemplate\">\n      </ng-container>\n    </Badge>\n    <ng-container *ngIf=\"!badge && !dot\">\n      <ng-container *ngIf=\"isTemplateRef(selected ? selectedIcon : icon); then domTemplate; else imgTemplate\">\n      </ng-container>\n    </ng-container>\n  </div>\n  <p class=\"{{ prefixCls }}-title\" [style.color]=\"selected ? tintColor : unselectedTintColor\">\n    {{ title }}\n  </p>\n</ng-template>\n\n<ng-template #domTemplate>\n  <ng-template [ngTemplateOutlet]=\"selected ? selectedIcon : icon\"></ng-template>\n</ng-template>\n\n<ng-template #imgTemplate>\n  <img src=\"{{ selected ? selectedIcon : icon }}\" alt=\"{{ title }}\" />\n</ng-template>\n"
                }] }
    ];
    /** @nocollapse */
    TabBarItemComponent.ctorParameters = function () { return []; };
    TabBarItemComponent.propDecorators = {
        tabBarTab: [{ type: ViewChild, args: ['tabBarTab', { static: true },] }],
        key: [{ type: Input }],
        title: [{ type: Input }],
        dot: [{ type: Input }],
        badge: [{ type: Input }],
        icon: [{ type: Input }],
        selectedIcon: [{ type: Input }]
    };
    return TabBarItemComponent;
}(TabPaneComponent));
if (false) {
    /** @type {?} */
    TabBarItemComponent.prototype.prefixCls;
    /** @type {?} */
    TabBarItemComponent.prototype.selected;
    /** @type {?} */
    TabBarItemComponent.prototype.tintColor;
    /** @type {?} */
    TabBarItemComponent.prototype.unselectedTintColor;
    /** @type {?} */
    TabBarItemComponent.prototype.tabBarTab;
    /** @type {?} */
    TabBarItemComponent.prototype.key;
    /** @type {?} */
    TabBarItemComponent.prototype.title;
    /** @type {?} */
    TabBarItemComponent.prototype.dot;
    /** @type {?} */
    TabBarItemComponent.prototype.badge;
    /** @type {?} */
    TabBarItemComponent.prototype.icon;
    /** @type {?} */
    TabBarItemComponent.prototype.selectedIcon;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @record
 */
function TabBarOnPressEvent() { }
if (false) {
    /** @type {?} */
    TabBarOnPressEvent.prototype.index;
    /** @type {?} */
    TabBarOnPressEvent.prototype.title;
    /** @type {?} */
    TabBarOnPressEvent.prototype.key;
}
var TabBarComponent = /** @class */ (function () {
    function TabBarComponent() {
        this.prefixCls = 'am-tab-bar';
        this._activeTab = 0;
        this._tintColor = '#108ee9';
        this._unselectedTintColor = '#888';
        this.hidden = false;
        this.prerenderingSiblingsNumber = -1;
        this.barTintColor = 'white';
        this.tabBarPosition = 'bottom';
        this.onPress = new EventEmitter();
        this.tabBar = true;
    }
    Object.defineProperty(TabBarComponent.prototype, "activeTab", {
        get: /**
         * @return {?}
         */
        function () {
            return this._activeTab;
        },
        set: /**
         * @param {?} tab
         * @return {?}
         */
        function (tab) {
            this._activeTab = tab;
            if (this.tabBarItems && this.tabBarItems.length > 0) {
                this.selectTabBarItem(tab);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TabBarComponent.prototype, "tintColor", {
        get: /**
         * @return {?}
         */
        function () {
            return this._tintColor;
        },
        set: /**
         * @param {?} color
         * @return {?}
         */
        function (color) {
            var _this = this;
            this._tintColor = color;
            if (this.tabBarItems && this.tabBarItems.length > 0) {
                this.tabBarItems.forEach((/**
                 * @param {?} tabBarItem
                 * @return {?}
                 */
                function (tabBarItem) {
                    tabBarItem.tintColor = _this._tintColor;
                }));
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TabBarComponent.prototype, "unselectedTintColor", {
        get: /**
         * @return {?}
         */
        function () {
            return this._unselectedTintColor;
        },
        set: /**
         * @param {?} color
         * @return {?}
         */
        function (color) {
            var _this = this;
            this._unselectedTintColor = color;
            if (this.tabBarItems && this.tabBarItems.length > 0) {
                this.tabBarItems.forEach((/**
                 * @param {?} tabBarItem
                 * @return {?}
                 */
                function (tabBarItem) {
                    tabBarItem.unselectedTintColor = _this._unselectedTintColor;
                }));
            }
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @param {?} index
     * @return {?}
     */
    TabBarComponent.prototype.selectTabBarItem = /**
     * @param {?} index
     * @return {?}
     */
    function (index) {
        if (this.tabBarItems && this.tabBarItems.length > 0) {
            this.tabBarItems.forEach((/**
             * @param {?} tabBarItem
             * @return {?}
             */
            function (tabBarItem) {
                tabBarItem.selected = false;
            }));
            this.tabBarItems.toArray()[index].selected = true;
        }
    };
    /**
     * @param {?} pressParam
     * @return {?}
     */
    TabBarComponent.prototype.tabBarTabOnPress = /**
     * @param {?} pressParam
     * @return {?}
     */
    function (pressParam) {
        this.onPress.emit(pressParam);
    };
    /**
     * @return {?}
     */
    TabBarComponent.prototype.ngAfterContentInit = /**
     * @return {?}
     */
    function () {
        var _this = this;
        if (this.tabBarItems && this.tabBarItems.length > 0) {
            this.tabBarItems.forEach((/**
             * @param {?} tabBarItem
             * @return {?}
             */
            function (tabBarItem) {
                tabBarItem.tintColor = _this._tintColor;
                tabBarItem.unselectedTintColor = _this._unselectedTintColor;
            }));
        }
        this.selectTabBarItem(this.activeTab);
    };
    TabBarComponent.decorators = [
        { type: Component, args: [{
                    selector: 'TabBar, nzm-tab-bar',
                    template: "<Tabs\n  [animated]=\"false\"\n  [useOnPan]=\"false\"\n  [swipeable]=\"false\"\n  [activeTab]=\"activeTab\"\n  [renderTabBar]=\"TabBarBar\"\n  [tabDirection]=\"'horizontal'\"\n  [tabPanesContent]=\"tabBarItems\"\n  [tabBarPosition]=\"tabBarPosition\"\n  [prerenderingSiblingsNumber]=\"prerenderingSiblingsNumber\"\n></Tabs>\n\n<ng-template #TabBarBar>\n  <div class=\"am-tabs-tab-bar-wrap\">\n    <div\n      class=\"{{ prefixCls }}-bar\"\n      [ngClass]=\"{\n        'am-tab-bar-bar-hidden-top': 'top' === tabBarPosition && hidden,\n        'am-tab-bar-bar-hidden-bottom': 'bottom' === tabBarPosition && hidden\n      }\"\n      [style.background-color]=\"barTintColor\"\n    >\n      <div\n        class=\"am-tab-bar-tab\"\n        *ngFor=\"let tabBarItem of tabBarItems; let i = index\"\n        (click)=\"tabBarTabOnPress({ index: i, key: tabBarItem.key, title: tabBarItem.title })\"\n      >\n        <ng-container [ngTemplateOutlet]=\"tabBarItem.tabBarTab\"></ng-container>\n      </div>\n    </div>\n  </div>\n</ng-template>\n"
                }] }
    ];
    /** @nocollapse */
    TabBarComponent.ctorParameters = function () { return []; };
    TabBarComponent.propDecorators = {
        tabBarItems: [{ type: ContentChildren, args: [TabBarItemComponent, { descendants: true },] }],
        hidden: [{ type: Input }],
        prerenderingSiblingsNumber: [{ type: Input }],
        activeTab: [{ type: Input }],
        barTintColor: [{ type: Input }],
        tabBarPosition: [{ type: Input }],
        tintColor: [{ type: Input }],
        unselectedTintColor: [{ type: Input }],
        onPress: [{ type: Output }],
        tabBar: [{ type: HostBinding, args: ['class.am-tab-bar',] }]
    };
    return TabBarComponent;
}());
if (false) {
    /** @type {?} */
    TabBarComponent.prototype.prefixCls;
    /**
     * @type {?}
     * @private
     */
    TabBarComponent.prototype._activeTab;
    /**
     * @type {?}
     * @private
     */
    TabBarComponent.prototype._tintColor;
    /**
     * @type {?}
     * @private
     */
    TabBarComponent.prototype._unselectedTintColor;
    /** @type {?} */
    TabBarComponent.prototype.tabBarItems;
    /** @type {?} */
    TabBarComponent.prototype.hidden;
    /** @type {?} */
    TabBarComponent.prototype.prerenderingSiblingsNumber;
    /** @type {?} */
    TabBarComponent.prototype.barTintColor;
    /** @type {?} */
    TabBarComponent.prototype.tabBarPosition;
    /** @type {?} */
    TabBarComponent.prototype.onPress;
    /** @type {?} */
    TabBarComponent.prototype.tabBar;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var TabBarModule = /** @class */ (function () {
    function TabBarModule() {
    }
    TabBarModule.decorators = [
        { type: NgModule, args: [{
                    imports: [CommonModule, TabsModule, BadgeModule],
                    exports: [TabBarComponent, TabBarItemComponent],
                    declarations: [TabBarComponent, TabBarItemComponent],
                    providers: []
                },] }
    ];
    return TabBarModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @record
 */
function PickerOptionsInterface() { }
if (false) {
    /** @type {?|undefined} */
    PickerOptionsInterface.prototype.data;
    /** @type {?|undefined} */
    PickerOptionsInterface.prototype.cols;
    /** @type {?|undefined} */
    PickerOptionsInterface.prototype.mask;
    /** @type {?|undefined} */
    PickerOptionsInterface.prototype.title;
    /** @type {?|undefined} */
    PickerOptionsInterface.prototype.okText;
    /** @type {?|undefined} */
    PickerOptionsInterface.prototype.dismissText;
    /** @type {?|undefined} */
    PickerOptionsInterface.prototype.disabled;
    /** @type {?|undefined} */
    PickerOptionsInterface.prototype.cascade;
    /** @type {?|undefined} */
    PickerOptionsInterface.prototype.appendToBody;
}
var PickerOptions = /** @class */ (function () {
    function PickerOptions() {
        this.data = [];
        this.value = [];
        this.cols = 3;
        this.mask = true;
        this.title = '';
        this.okText = '确定';
        this.dismissText = '取消';
        this.disabled = false;
        this.cascade = true;
        this.appendToBody = false;
        this.onDismiss = new EventEmitter();
        this.onPickerChange = new EventEmitter();
        this.indicatorStyle = {};
    }
    return PickerOptions;
}());
if (false) {
    /** @type {?} */
    PickerOptions.prototype.data;
    /** @type {?} */
    PickerOptions.prototype.value;
    /** @type {?} */
    PickerOptions.prototype.cols;
    /** @type {?} */
    PickerOptions.prototype.mask;
    /** @type {?} */
    PickerOptions.prototype.title;
    /** @type {?} */
    PickerOptions.prototype.okText;
    /** @type {?} */
    PickerOptions.prototype.dismissText;
    /** @type {?} */
    PickerOptions.prototype.disabled;
    /** @type {?} */
    PickerOptions.prototype.cascade;
    /** @type {?} */
    PickerOptions.prototype.appendToBody;
    /** @type {?} */
    PickerOptions.prototype.onDismiss;
    /** @type {?} */
    PickerOptions.prototype.onPickerChange;
    /** @type {?} */
    PickerOptions.prototype.indicatorStyle;
    /** @type {?} */
    PickerOptions.prototype.hidePicker;
    /** @type {?} */
    PickerOptions.prototype.confirm;
    /** @type {?} */
    PickerOptions.prototype.cancel;
    /** @type {?} */
    PickerOptions.prototype.updateNgModel;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @abstract
 * @template T, R
 */
var  /**
 * @abstract
 * @template T, R
 */
PickerRef = /** @class */ (function () {
    function PickerRef() {
    }
    return PickerRef;
}());
if (false) {
    /**
     * @abstract
     * @param {?=} result
     * @return {?}
     */
    PickerRef.prototype.close = function (result) { };
    /**
     * @abstract
     * @param {?=} result
     * @return {?}
     */
    PickerRef.prototype.destroy = function (result) { };
    /**
     * @abstract
     * @return {?}
     */
    PickerRef.prototype.getElement = function () { };
    /**
     * @abstract
     * @return {?}
     */
    PickerRef.prototype.getInstance = function () { };
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @template T, R
 */
var PickerComponent = /** @class */ (function (_super) {
    __extends(PickerComponent, _super);
    function PickerComponent(elementRef, options, _localeProviderService) {
        var _this = _super.call(this) || this;
        _this.elementRef = elementRef;
        _this.options = options;
        _this._localeProviderService = _localeProviderService;
        _this.transitionName = 'am-slide-up-enter am-slide-up-enter-active';
        _this.maskTransitionName = 'am-fade-enter am-fade-enter-active';
        _this.startY = 0;
        _this.differY = 0;
        _this.currentY = 0;
        _this.len = 0;
        _this.dom = null;
        _this.index = 0;
        _this.maxY = 0;
        _this.lineHeight = 34;
        _this.dataForRender = [];
        _this.selectedTarget = [];
        _this.isMouseDown = false;
        _this.Velocity = getVelocity();
        _this._unsubscribe$ = new Subject();
        _this.onChange = (/**
         * @param {?} _
         * @return {?}
         */
        function (_) { });
        return _this;
    }
    /**
     * @param {?} event
     * @return {?}
     */
    PickerComponent.prototype.panstart = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        var _this = this;
        if (!event.target.classList.contains('am-picker-col-mask') || this.options.disabled) {
            return;
        }
        this.isMouseDown = true;
        event.preventDefault();
        this.dom = getEventTarget(event).target.parentElement.children[2];
        this.len = this.dom.children.length;
        this.maxY = -(this.len - 1);
        if (this.dom.style.transform === 'translateY(0px)') {
            this.currentY = 0;
            this.maxY = -(this.len - 1);
        }
        else if (this.selectedTarget.length > 0) {
            this.selectedTarget.forEach((/**
             * @param {?} item
             * @return {?}
             */
            function (item) {
                if (item.targetId === event.target.id) {
                    _this.currentY = item.currentY;
                }
            }));
        }
        this.startY = getEventTarget(event).clientY;
    };
    /**
     * @param {?} event
     * @return {?}
     */
    PickerComponent.prototype.panmove = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        if (!event.target.classList.contains('am-picker-col-mask') || !this.isMouseDown || this.options.disabled) {
            return;
        }
        event.preventDefault();
        /** @type {?} */
        var ev = getEventTarget(event);
        this.differY = ev.clientY - this.startY;
        this.Velocity.record(this.differY);
        this.dom.style.transition = 'transform 0s';
        this.dom.style.transform = "translateY(" + (this.currentY * this.lineHeight + this.differY) + "px)";
    };
    /**
     * @param {?} event
     * @return {?}
     */
    PickerComponent.prototype.panend = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        var _this = this;
        if (!event.target.classList.contains('am-picker-col-mask') || !this.isMouseDown || this.options.disabled) {
            return;
        }
        this.isMouseDown = false;
        event.preventDefault();
        /** @type {?} */
        var ev = getEventTarget(event);
        this.differY = ev.clientY - this.startY;
        /** @type {?} */
        var time = 0.3;
        /** @type {?} */
        var velocityTemp = this.Velocity.getVelocity(this.differY) * 4;
        if (velocity) {
            this.differY = velocityTemp * 40 + this.differY;
            time = Math.abs(velocityTemp) * 0.1;
        }
        this.dom.style.transition = 'transform ' + (time < 0.3 ? 0.3 : time) + 's';
        if (this.differY <= -this.lineHeight / 2) {
            this.currentY += Math.floor(this.differY / this.lineHeight);
            if (this.currentY <= this.maxY) {
                this.currentY = this.maxY;
            }
        }
        else if (this.differY >= this.lineHeight / 2) {
            this.currentY += Math.floor(this.differY / this.lineHeight);
            if (this.currentY >= 0) {
                this.currentY = 0;
            }
        }
        if (this.selectedTarget.length > 0) {
            /** @type {?} */
            var hasKey_1 = false;
            this.selectedTarget.forEach((/**
             * @param {?} item
             * @return {?}
             */
            function (item) {
                if (item.targetId === event.target.id) {
                    hasKey_1 = true;
                    item.targetId = event.target.id;
                    item.currentY = _this.currentY;
                }
                else if (parseInt(item.targetId, 0) > parseInt(event.target.id, 0) && _this.options.cascade) {
                    item.currentY = 0;
                }
            }));
            if (!hasKey_1) {
                this.selectedTarget.push({ targetId: event.target.id, currentY: this.currentY });
            }
        }
        else {
            this.selectedTarget.push({ targetId: event.target.id, currentY: this.currentY });
        }
        this.dom.style.transform = "translateY(" + this.currentY * this.lineHeight + "px)";
        this.index = Math.floor(Math.abs(this.currentY / 1));
        this.setCurrentSelected(parseInt(event.target.id, 0), this.index);
        if (this.options.value !== this.combineReslut()) {
            this.options.onPickerChange.emit(this.combineReslut());
            this.onChange(this.combineReslut());
        }
    };
    /**
     * @return {?}
     */
    PickerComponent.prototype.init = /**
     * @return {?}
     */
    function () {
        if (this.dataForRender.length === 0 && this.generateArrayData(this.options.data).length > 0) {
            this.dataForRender.push(this.generateArrayData(this.options.data));
        }
        if (this.options.value.length > 0) {
            this.getInitValueIndex(this.dataForRender);
        }
        else {
            this.checkArrayDeep(this.options.data[0]);
            for (var index = 0; index < this.dataForRender.length; index++) {
                this.selectedTarget.push({ targetId: "" + index, currentY: 0 });
            }
        }
    };
    /**
     * @param {?} dataTemp
     * @return {?}
     */
    PickerComponent.prototype.getInitValueIndex = /**
     * @param {?} dataTemp
     * @return {?}
     */
    function (dataTemp) {
        /** @type {?} */
        var self = this;
        self.selectedTarget = [];
        self.options.value.forEach((/**
         * @param {?} element
         * @param {?} i
         * @return {?}
         */
        function (element, i) {
            dataTemp.forEach((/**
             * @param {?} item
             * @param {?} j
             * @return {?}
             */
            function (item, j) {
                item.forEach((/**
                 * @param {?} item1
                 * @param {?} k
                 * @return {?}
                 */
                function (item1, k) {
                    if ((element === item1.label || element === item1.value || element === item1) && i === j) {
                        self.checkArrayDeep(self.dataForRender[i][k], false);
                        self.selectedTarget.push({ targetId: "" + i, currentY: -k });
                    }
                }));
            }));
        }));
    };
    /**
     * @return {?}
     */
    PickerComponent.prototype.reloadPicker = /**
     * @return {?}
     */
    function () {
        if (!this._picker || this._picker === undefined) {
            return;
        }
        this.currentPicker = this._picker.element.nativeElement;
        if (this.currentPicker && this.currentPicker.children.length > 0) {
            /** @type {?} */
            var self_1 = this;
            setTimeout((/**
             * @return {?}
             */
            function () {
                self_1.selectedTarget.forEach((/**
                 * @param {?} item
                 * @param {?} i
                 * @return {?}
                 */
                function (item, i) {
                    self_1.currentPicker.children[i].children[2].style.transition = 'transform .3s';
                    /** @type {?} */
                    var index = parseInt(item.currentY, 0);
                    self_1.currentPicker.children[i].children[2].style.transform = "translateY(" + index * self_1.lineHeight + "px)";
                }));
            }), 0);
        }
    };
    /**
     * @param {?} targetArr
     * @return {?}
     */
    PickerComponent.prototype.generateArrayData = /**
     * @param {?} targetArr
     * @return {?}
     */
    function (targetArr) {
        /** @type {?} */
        var tempArr = [];
        if (targetArr instanceof Array) {
            targetArr.forEach((/**
             * @param {?} item
             * @param {?} i
             * @return {?}
             */
            function (item, i) {
                if (item instanceof Array) {
                    /** @type {?} */
                    var keys = Object.keys(item);
                    /** @type {?} */
                    var element_1 = {};
                    keys.forEach((/**
                     * @param {?} key
                     * @return {?}
                     */
                    function (key) {
                        element_1[key] = targetArr[i][key] || targetArr[i];
                    }));
                    tempArr.push(element_1);
                }
                else {
                    tempArr.push(item);
                }
            }));
            return tempArr;
        }
        return [];
    };
    /**
     * @param {?} parent
     * @param {?=} init
     * @return {?}
     */
    PickerComponent.prototype.checkArrayDeep = /**
     * @param {?} parent
     * @param {?=} init
     * @return {?}
     */
    function (parent, init) {
        if (init === void 0) { init = true; }
        if (parent instanceof Object && parent.children && parent.children.length > 0) {
            if (this.generateArrayData(parent.children).length > 0 && this.dataForRender.length < this.options.cols) {
                /** @type {?} */
                var hasValue_1 = false;
                this.dataForRender.filter((/**
                 * @param {?} item
                 * @param {?} index
                 * @return {?}
                 */
                function (item, index) {
                    if (JSON.stringify(item) === JSON.stringify(parent.children)) {
                        hasValue_1 = true;
                    }
                }));
                if (!hasValue_1) {
                    this.dataForRender.push(this.generateArrayData(parent.children));
                }
                if (init) {
                    this.checkArrayDeep(parent.children[0]);
                }
            }
        }
    };
    /**
     * @return {?}
     */
    PickerComponent.prototype.ok = /**
     * @return {?}
     */
    function () {
        if (this.options.updateNgModel) {
            this.options.updateNgModel(this.combineReslut());
        }
        if (this.options.confirm) {
            this.options.confirm(this.combineReslut());
        }
        this.setTransitionName();
    };
    /**
     * @return {?}
     */
    PickerComponent.prototype.combineReslut = /**
     * @return {?}
     */
    function () {
        /** @type {?} */
        var result = [];
        /** @type {?} */
        var self = this;
        self.selectedTarget.forEach((/**
         * @param {?} item
         * @return {?}
         */
        function (item) {
            if (self.dataForRender.length > 0 && self.dataForRender.length >= parseInt(item.targetId, 0) + 1) {
                /** @type {?} */
                var curItem = self.dataForRender[parseInt(item.targetId, 0)][-item.currentY];
                if (curItem !== undefined) {
                    result.push(curItem);
                }
            }
        }));
        return result;
    };
    /**
     * @return {?}
     */
    PickerComponent.prototype.cancel = /**
     * @return {?}
     */
    function () {
        this.setTransitionName();
        this.options.onDismiss.emit();
        if (this.options.cancel) {
            this.options.cancel();
        }
    };
    /**
     * @return {?}
     */
    PickerComponent.prototype.setTransitionName = /**
     * @return {?}
     */
    function () {
        var _this = this;
        this.transitionName = 'am-slide-up-leave am-slide-up-leave-active';
        this.maskTransitionName = 'am-fade-leave am-fade-leave-active';
        setTimeout((/**
         * @return {?}
         */
        function () {
            _this.options.hidePicker();
        }), 200);
    };
    /**
     * @param {?} target
     * @param {?} index
     * @return {?}
     */
    PickerComponent.prototype.setCurrentSelected = /**
     * @param {?} target
     * @param {?} index
     * @return {?}
     */
    function (target, index) {
        var _this = this;
        if (!this.options.cascade) {
            return;
        }
        /** @type {?} */
        var a = this.dataForRender.slice(0, target + 1);
        this.dataForRender = a;
        this.checkArrayDeep(this.dataForRender[target][index]);
        if (this.selectedTarget.length > 0 && this.selectedTarget.length < this.dataForRender.length) {
            for (var i = 0; i < this.dataForRender.length; i++) {
                if (i > target) {
                    if (i < this.selectedTarget.length) {
                        this.selectedTarget[i] = { targetId: "" + i, currentY: 0 };
                    }
                    else {
                        this.selectedTarget.push({ targetId: "" + i, currentY: 0 });
                    }
                }
            }
        }
        setTimeout((/**
         * @return {?}
         */
        function () {
            _this.dataForRender.forEach((/**
             * @param {?} item
             * @param {?} i
             * @return {?}
             */
            function (item, i) {
                if (target !== "" + i && i > target) {
                    _this._picker.element.nativeElement.children[i].children[2].style.transition = 'transform .3s';
                    _this._picker.element.nativeElement.children[i].children[2].style.transform = 'translateY(0px)';
                }
            }));
        }), 0);
    };
    /**
     * @return {?}
     */
    PickerComponent.prototype.getInstance = /**
     * @return {?}
     */
    function () {
        return this;
    };
    /**
     * @return {?}
     */
    PickerComponent.prototype.getElement = /**
     * @return {?}
     */
    function () {
        return this.elementRef && this.elementRef.nativeElement;
    };
    /**
     * @return {?}
     */
    PickerComponent.prototype.close = /**
     * @return {?}
     */
    function () {
        if (this.options.hidePicker) {
            this.options.hidePicker();
        }
    };
    /**
     * @return {?}
     */
    PickerComponent.prototype.destroy = /**
     * @return {?}
     */
    function () {
        this.close();
    };
    /**
     * @return {?}
     */
    PickerComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        var _this = this;
        this.init();
        this._localeProviderService.localeChange.pipe(takeUntil(this._unsubscribe$)).subscribe((/**
         * @param {?} _
         * @return {?}
         */
        function (_) {
            /** @type {?} */
            var locale = _this._localeProviderService.getLocaleSubObj('Picker');
            _this.options.okText = _this.options.okText === '确定' ? locale.okText : _this.options.okText;
            _this.options.dismissText = _this.options.dismissText === '取消' ? locale.dismissText : _this.options.dismissText;
        }));
    };
    /**
     * @return {?}
     */
    PickerComponent.prototype.ngAfterViewInit = /**
     * @return {?}
     */
    function () {
        this.reloadPicker();
    };
    /**
     * @return {?}
     */
    PickerComponent.prototype.ngOnDestroy = /**
     * @return {?}
     */
    function () {
        this._unsubscribe$.next();
        this._unsubscribe$.complete();
    };
    PickerComponent.decorators = [
        { type: Component, args: [{
                    selector: 'Picker',
                    template: "<div *ngIf=\"options.mask\" class=\"am-picker-popup-mask {{ maskTransitionName }}\" (click)=\"cancel()\"></div>\n<div class=\"am-picker-popup am-picker-popup-wrap {{ transitionName }}\" style=\" min-height: 280px\">\n  <div class=\"am-picker-popup-content\">\n    <div class=\"am-picker-popup-body\">\n      <div>\n        <div class=\"am-picker-popup-header\">\n          <div class=\"am-picker-popup-item am-picker-popup-header-left\" (click)=\"cancel()\">\n            {{ options.dismissText }}\n          </div>\n          <div class=\"am-picker-popup-item am-picker-popup-title\">{{ options.title }}</div>\n          <div class=\"am-picker-popup-item am-picker-popup-header-right\" (click)=\"ok()\">{{ options.okText }}</div>\n        </div>\n        <div class=\"am-picker\" style=\"flex-direction: row; align-items: center;\" #picker>\n          <div *ngFor=\"let item of dataForRender; let i = index\" class=\"am-picker-col\">\n            <div class=\"am-picker-col-indicator \" style=\"top: 102px;\" [ngStyle]=\"options.indicatorStyle\"></div>\n            <div class=\"am-picker-col-mask\" style=\"background-size: 100% 102px;\" id=\"{{ i }}\"></div>\n            <div class=\"am-picker-col-content\">\n              <div *ngFor=\"let val of item; let i = index\" class=\"am-picker-col-item\" id=\"{{ i }}\">\n                {{ val.label ? val.label : val }}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n    </div>\n  </div>\n</div>\n",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    /** @nocollapse */
    PickerComponent.ctorParameters = function () { return [
        { type: ElementRef },
        { type: PickerOptions },
        { type: LocaleProviderService }
    ]; };
    PickerComponent.propDecorators = {
        _picker: [{ type: ViewChild, args: ['picker', { read: ViewContainerRef, static: true },] }],
        panstart: [{ type: HostListener, args: ['mousedown', ['$event'],] }, { type: HostListener, args: ['touchstart', ['$event'],] }],
        panmove: [{ type: HostListener, args: ['mousemove', ['$event'],] }, { type: HostListener, args: ['touchmove', ['$event'],] }],
        panend: [{ type: HostListener, args: ['mouseup', ['$event'],] }, { type: HostListener, args: ['mouseleave', ['$event'],] }, { type: HostListener, args: ['touchend', ['$event'],] }]
    };
    return PickerComponent;
}(PickerRef));
if (false) {
    /** @type {?} */
    PickerComponent.prototype.transitionName;
    /** @type {?} */
    PickerComponent.prototype.maskTransitionName;
    /** @type {?} */
    PickerComponent.prototype.startY;
    /** @type {?} */
    PickerComponent.prototype.differY;
    /** @type {?} */
    PickerComponent.prototype.currentY;
    /** @type {?} */
    PickerComponent.prototype.len;
    /** @type {?} */
    PickerComponent.prototype.dom;
    /** @type {?} */
    PickerComponent.prototype.index;
    /** @type {?} */
    PickerComponent.prototype.maxY;
    /** @type {?} */
    PickerComponent.prototype.lineHeight;
    /** @type {?} */
    PickerComponent.prototype.dataForRender;
    /** @type {?} */
    PickerComponent.prototype.selectedTarget;
    /** @type {?} */
    PickerComponent.prototype.isMouseDown;
    /** @type {?} */
    PickerComponent.prototype.Velocity;
    /** @type {?} */
    PickerComponent.prototype.currentPicker;
    /**
     * @type {?}
     * @private
     */
    PickerComponent.prototype._unsubscribe$;
    /**
     * @type {?}
     * @private
     */
    PickerComponent.prototype._picker;
    /** @type {?} */
    PickerComponent.prototype.onChange;
    /** @type {?} */
    PickerComponent.prototype.elementRef;
    /** @type {?} */
    PickerComponent.prototype.options;
    /**
     * @type {?}
     * @private
     */
    PickerComponent.prototype._localeProviderService;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var PickerDirective = /** @class */ (function () {
    function PickerDirective(_viewContainerRef, _elm, _defaultOptions, _cfr, _renderer, _zone) {
        this._viewContainerRef = _viewContainerRef;
        this._elm = _elm;
        this._defaultOptions = _defaultOptions;
        this._cfr = _cfr;
        this._renderer = _renderer;
        this._zone = _zone;
        this._eventListeners = [];
        this.onVisibleChange = new EventEmitter(true);
        this.onPickerChange = new EventEmitter();
        this.onDismiss = new EventEmitter();
        this.onChange = (/**
         * @return {?}
         */
        function () { return null; });
        this.onTouched = (/**
         * @return {?}
         */
        function () { return null; });
    }
    /**
     * @return {?}
     */
    PickerDirective.prototype.togglePicker = /**
     * @return {?}
     */
    function () {
        if (!this.picker) {
            this.showPicker();
        }
        else {
            this.hidePicker();
        }
    };
    /**
     * @return {?}
     */
    PickerDirective.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        this.onVisibleChange.emit(false);
    };
    /**
     * @param {?} value
     * @return {?}
     */
    PickerDirective.prototype.ngOnChanges = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        if (value.cols && this.picker) {
            this.picker.instance.options.cols = value.cols.currentValue;
        }
        if (value.data && this.picker) {
            this.picker.instance.options.data = value.data.currentValue;
            this.showPicker();
        }
    };
    /**
     * @return {?}
     */
    PickerDirective.prototype.ngOnDestroy = /**
     * @return {?}
     */
    function () {
        this.hidePicker();
    };
    /**
     * @private
     * @param {?} event
     * @return {?}
     */
    PickerDirective.prototype.onDocumentClick = /**
     * @private
     * @param {?} event
     * @return {?}
     */
    function (event) {
        if (this.picker &&
            !this._elm.nativeElement.contains(event.target) &&
            !this.picker.location.nativeElement.contains(event.target)) {
            this.hidePicker();
        }
    };
    /**
     * @private
     * @return {?}
     */
    PickerDirective.prototype.showPicker = /**
     * @private
     * @return {?}
     */
    function () {
        var _this = this;
        if (this.picker) {
            this._zone.run((/**
             * @return {?}
             */
            function () {
                _this.picker.instance.init();
            }));
        }
        else if (!this.picker && !this.disabled) {
            setTimeout((/**
             * @return {?}
             */
            function () {
                _this._eventListeners = [
                    _this._renderer.listen('document', 'click', (/**
                     * @param {?} event
                     * @return {?}
                     */
                    function (event) { return _this.onDocumentClick(event); })),
                    _this._renderer.listen('document', 'touchend', (/**
                     * @param {?} event
                     * @return {?}
                     */
                    function (event) { return _this.onDocumentClick(event); }))
                ];
            }));
            /** @type {?} */
            var options_1 = new PickerOptions();
            Object.assign(options_1, this._defaultOptions, {
                hidePicker: (/**
                 * @param {?} event
                 * @return {?}
                 */
                function (event) {
                    _this.hidePicker();
                }),
                updateNgModel: (/**
                 * @param {?} value
                 * @return {?}
                 */
                function (value) {
                    _this.onChange(value);
                })
            });
            /** @type {?} */
            var optionalParams = [
                'data',
                'value',
                'cols',
                'mask',
                'title',
                'okText',
                'dismissText',
                'disabled',
                'cascade',
                'appendToBody',
                'indicatorStyle',
                'onPickerChange',
                'onVisibleChange',
                'onDismiss'
            ];
            optionalParams.forEach((/**
             * @param {?} param
             * @return {?}
             */
            function (param) {
                if (typeof _this[param] !== 'undefined') {
                    ((/** @type {?} */ (options_1)))[param] = _this[param];
                }
            }));
            /** @type {?} */
            var componentFactory = this._cfr.resolveComponentFactory(PickerComponent);
            /** @type {?} */
            var childInjector = Injector.create([
                {
                    provide: PickerOptions,
                    useValue: options_1
                }
            ]);
            this.picker = this._viewContainerRef.createComponent(componentFactory, this._viewContainerRef.length, childInjector);
            if (options_1.appendToBody) {
                document.body.appendChild(this.picker.location.nativeElement);
            }
            this.onVisibleChange.emit(true);
        }
    };
    /**
     * @private
     * @return {?}
     */
    PickerDirective.prototype.hidePicker = /**
     * @private
     * @return {?}
     */
    function () {
        if (this.picker) {
            this.picker.destroy();
            delete this.picker;
            this.onVisibleChange.emit(false);
            this._eventListeners.forEach((/**
             * @param {?} fn
             * @return {?}
             */
            function (fn) { return fn(); }));
            this._eventListeners = [];
        }
    };
    /**
     * @param {?} value
     * @return {?}
     */
    PickerDirective.prototype.writeValue = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        this.value = Array.isArray(value) ? value : [];
        if (this.picker) {
            this.picker.instance.options.value = this.value;
            this.showPicker();
            this.picker.instance.reloadPicker();
        }
    };
    /**
     * @param {?} fn
     * @return {?}
     */
    PickerDirective.prototype.registerOnChange = /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) {
        this.onChange = fn;
    };
    /**
     * @param {?} fn
     * @return {?}
     */
    PickerDirective.prototype.registerOnTouched = /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) {
        this.onTouched = fn;
    };
    /**
     * @param {?} isDisabled
     * @return {?}
     */
    PickerDirective.prototype.setDisabledState = /**
     * @param {?} isDisabled
     * @return {?}
     */
    function (isDisabled) {
        this.disabled = isDisabled;
    };
    PickerDirective.decorators = [
        { type: Directive, args: [{
                    selector: '[Picker], [nzm-picker]',
                    providers: [
                        {
                            provide: NG_VALUE_ACCESSOR,
                            useExisting: forwardRef((/**
                             * @return {?}
                             */
                            function () { return PickerDirective; })),
                            multi: true
                        }
                    ]
                },] }
    ];
    /** @nocollapse */
    PickerDirective.ctorParameters = function () { return [
        { type: ViewContainerRef },
        { type: ElementRef },
        { type: PickerOptions },
        { type: ComponentFactoryResolver },
        { type: Renderer2 },
        { type: NgZone }
    ]; };
    PickerDirective.propDecorators = {
        data: [{ type: Input }],
        cols: [{ type: Input }],
        mask: [{ type: Input }],
        title: [{ type: Input }],
        visible: [{ type: Input }],
        okText: [{ type: Input }],
        dismissText: [{ type: Input }],
        disabled: [{ type: Input }],
        cascade: [{ type: Input }],
        appendToBody: [{ type: Input }],
        indicatorStyle: [{ type: Input }],
        onVisibleChange: [{ type: Output }],
        onPickerChange: [{ type: Output }],
        onDismiss: [{ type: Output }],
        togglePicker: [{ type: HostListener, args: ['click',] }]
    };
    return PickerDirective;
}());
if (false) {
    /** @type {?} */
    PickerDirective.prototype.picker;
    /** @type {?} */
    PickerDirective.prototype.value;
    /**
     * @type {?}
     * @private
     */
    PickerDirective.prototype._eventListeners;
    /** @type {?} */
    PickerDirective.prototype.data;
    /** @type {?} */
    PickerDirective.prototype.cols;
    /** @type {?} */
    PickerDirective.prototype.mask;
    /** @type {?} */
    PickerDirective.prototype.title;
    /** @type {?} */
    PickerDirective.prototype.visible;
    /** @type {?} */
    PickerDirective.prototype.okText;
    /** @type {?} */
    PickerDirective.prototype.dismissText;
    /** @type {?} */
    PickerDirective.prototype.disabled;
    /** @type {?} */
    PickerDirective.prototype.cascade;
    /** @type {?} */
    PickerDirective.prototype.appendToBody;
    /** @type {?} */
    PickerDirective.prototype.indicatorStyle;
    /** @type {?} */
    PickerDirective.prototype.onVisibleChange;
    /** @type {?} */
    PickerDirective.prototype.onPickerChange;
    /** @type {?} */
    PickerDirective.prototype.onDismiss;
    /** @type {?} */
    PickerDirective.prototype.onChange;
    /** @type {?} */
    PickerDirective.prototype.onTouched;
    /**
     * @type {?}
     * @private
     */
    PickerDirective.prototype._viewContainerRef;
    /**
     * @type {?}
     * @private
     */
    PickerDirective.prototype._elm;
    /**
     * @type {?}
     * @private
     */
    PickerDirective.prototype._defaultOptions;
    /**
     * @type {?}
     * @private
     */
    PickerDirective.prototype._cfr;
    /**
     * @type {?}
     * @private
     */
    PickerDirective.prototype._renderer;
    /**
     * @type {?}
     * @private
     */
    PickerDirective.prototype._zone;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var PickerService = /** @class */ (function (_super) {
    __extends(PickerService, _super);
    function PickerService() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.comRef = null;
        _this.defaultOptions = new PickerOptions();
        return _this;
    }
    /**
     * @param {?=} config
     * @param {?=} confirmCallback
     * @param {?=} cancelCallback
     * @return {?}
     */
    PickerService.prototype.showPicker = /**
     * @param {?=} config
     * @param {?=} confirmCallback
     * @param {?=} cancelCallback
     * @return {?}
     */
    function (config, confirmCallback, cancelCallback) {
        var _this = this;
        if (config === void 0) { config = this.defaultOptions; }
        /** @type {?} */
        var options = new PickerOptions();
        Object.assign(options, config, {
            hidePicker: (/**
             * @param {?} event
             * @return {?}
             */
            function (event) {
                _this.hidePicker();
            }),
            confirm: (/**
             * @param {?} event
             * @return {?}
             */
            function (event) {
                if (confirmCallback) {
                    confirmCallback(event);
                }
            }),
            cancel: (/**
             * @return {?}
             */
            function () {
                if (cancelCallback) {
                    cancelCallback();
                }
            })
        });
        /** @type {?} */
        var childInjector = Injector.create([
            {
                provide: PickerOptions,
                useValue: options
            }
        ]);
        this.comRef = this.showPopup(PickerComponent, childInjector);
        return this.comRef && this.comRef.instance;
    };
    /**
     * @return {?}
     */
    PickerService.prototype.hidePicker = /**
     * @return {?}
     */
    function () {
        this.hidePopup();
    };
    PickerService.decorators = [
        { type: Injectable }
    ];
    return PickerService;
}(PopupService));
if (false) {
    /** @type {?} */
    PickerService.prototype.comRef;
    /** @type {?} */
    PickerService.prototype.defaultOptions;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var PickerModule = /** @class */ (function () {
    function PickerModule() {
    }
    PickerModule.decorators = [
        { type: NgModule, args: [{
                    imports: [CommonModule, OverlayModule],
                    exports: [PickerComponent, PickerDirective],
                    declarations: [PickerComponent, PickerDirective],
                    providers: [PickerOptions, PopupService, PickerService],
                    entryComponents: [PickerComponent]
                },] }
    ];
    return PickerModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var PickerViewComponent = /** @class */ (function (_super) {
    __extends(PickerViewComponent, _super);
    function PickerViewComponent() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.data = [];
        _this.cols = 3;
        _this.indicatorStyle = {};
        _this.itemStyle = {};
        return _this;
    }
    /**
     * @return {?}
     */
    PickerViewComponent.prototype.pickerViewInit = /**
     * @return {?}
     */
    function () {
        this.options.data = this.data;
        this.options.cols = this.cols;
        this.options.cascade = this.cascade;
        this.init();
    };
    /**
     * @return {?}
     */
    PickerViewComponent.prototype.init = /**
     * @return {?}
     */
    function () {
        this.selectedTarget = [];
        if (this.dataForRender.length === 0 && this.generateArrayData(this.options.data).length > 0) {
            this.dataForRender.push(this.generateArrayData(this.options.data));
        }
        if (this.options.value.length > 0) {
            this.getInitValueIndex(this.dataForRender);
        }
        else {
            for (var index = 0; index < this.dataForRender.length; index++) {
                this.selectedTarget.push({ targetId: "" + index, currentY: 0 });
            }
        }
    };
    /**
     * @param {?} value
     * @return {?}
     */
    PickerViewComponent.prototype.writeValue = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        if (value) {
            this.options.value = value;
            this.init();
        }
    };
    /**
     * @param {?} fn
     * @return {?}
     */
    PickerViewComponent.prototype.registerOnChange = /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) {
        this.onChange = fn;
    };
    /**
     * @param {?} fn
     * @return {?}
     */
    PickerViewComponent.prototype.registerOnTouched = /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) { };
    /**
     * @return {?}
     */
    PickerViewComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        this.pickerViewInit();
    };
    /**
     * @return {?}
     */
    PickerViewComponent.prototype.ngAfterViewInit = /**
     * @return {?}
     */
    function () {
        this.currentPicker = this.elementRef.nativeElement;
        this.reloadPicker();
    };
    PickerViewComponent.decorators = [
        { type: Component, args: [{
                    selector: 'PickerView, nzm-picker-view',
                    template: "<div #picker class=\"am-picker\" style=\"flex-direction: row; align-items: center;\">\n  <div *ngFor=\"let item of dataForRender; let i = index\" class=\"am-picker-col\">\n    <div #indicator class=\"am-picker-col-indicator \" [ngStyle]=\"indicatorStyle\"></div>\n    <div id=\"{{ i }}\" class=\"am-picker-col-mask\" style=\"background-size: 100% 102px;\"></div>\n    <div class=\"am-picker-col-content\">\n      <div *ngFor=\"let val of item; let i = index\" id=\"{{ i }}\" class=\"am-picker-col-item\" [ngStyle]=\"itemStyle\">\n        {{ val.label ? val.label : val }}\n      </div>\n    </div>\n  </div>\n</div>\n",
                    encapsulation: ViewEncapsulation.None,
                    providers: [
                        {
                            provide: NG_VALUE_ACCESSOR,
                            useExisting: forwardRef((/**
                             * @return {?}
                             */
                            function () { return PickerViewComponent; })),
                            multi: true
                        }
                    ]
                }] }
    ];
    PickerViewComponent.propDecorators = {
        data: [{ type: Input }],
        cols: [{ type: Input }],
        cascade: [{ type: Input }],
        indicatorStyle: [{ type: Input }],
        itemStyle: [{ type: Input }]
    };
    return PickerViewComponent;
}(PickerComponent));
if (false) {
    /** @type {?} */
    PickerViewComponent.prototype.options;
    /** @type {?} */
    PickerViewComponent.prototype.data;
    /** @type {?} */
    PickerViewComponent.prototype.cols;
    /** @type {?} */
    PickerViewComponent.prototype.cascade;
    /** @type {?} */
    PickerViewComponent.prototype.indicatorStyle;
    /** @type {?} */
    PickerViewComponent.prototype.itemStyle;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var PickerViewModule = /** @class */ (function () {
    function PickerViewModule() {
    }
    PickerViewModule.decorators = [
        { type: NgModule, args: [{
                    imports: [FormsModule, CommonModule, PickerModule, LocaleProviderModule],
                    exports: [PickerViewComponent],
                    declarations: [PickerViewComponent]
                },] }
    ];
    return PickerViewModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @record
 */
function ElementType() { }
if (false) {
    /** @type {?} */
    ElementType.prototype.type;
    /** @type {?} */
    ElementType.prototype.backgroundImage;
    /** @type {?} */
    ElementType.prototype.transform;
}
var ImagePickerComponent = /** @class */ (function () {
    function ImagePickerComponent() {
        this.prefixCls = 'am-image-picker';
        this.flexEl = [];
        this._accept = 'image/*';
        this._count = 4;
        this._selectable = true;
        this._files = [];
        this._multiple = false;
        this.capture = false;
        this.disableDelete = false;
        this.onFail = new EventEmitter();
        this.onChange = new EventEmitter();
        this.onImageClick = new EventEmitter();
        this.onAddImageClick = new EventEmitter();
    }
    Object.defineProperty(ImagePickerComponent.prototype, "files", {
        get: /**
         * @return {?}
         */
        function () {
            return this._files;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._files = value;
            this.sortItem();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ImagePickerComponent.prototype, "accept", {
        get: /**
         * @return {?}
         */
        function () {
            return this._accept;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._accept = value;
            this.sortItem();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ImagePickerComponent.prototype, "length", {
        get: /**
         * @return {?}
         */
        function () {
            return this._count;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (value > 0) {
                this._count = value;
            }
            else {
                this._count = 4;
            }
            this.sortItem();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ImagePickerComponent.prototype, "multiple", {
        get: /**
         * @return {?}
         */
        function () {
            return this._multiple;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._multiple = value;
            this.sortItem();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ImagePickerComponent.prototype, "selectable", {
        get: /**
         * @return {?}
         */
        function () {
            return this._selectable;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._selectable = value;
            this.sortItem();
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @return {?}
     */
    ImagePickerComponent.prototype.sortItem = /**
     * @return {?}
     */
    function () {
        var _this = this;
        if (!this._files) {
            return;
        }
        /** @type {?} */
        var count = parseInt('' + this._count, 10);
        if (count <= 0) {
            count = 4;
        }
        /** @type {?} */
        var allEl = this._files.map((/**
         * @param {?} item
         * @return {?}
         */
        function (item) {
            return {
                type: 'img',
                backgroundImage: 'url(' + item.url + ')',
                transform: 'rotate(' + _this.getRotation(item.orientation) + ')deg'
            };
        }));
        if (this._selectable) {
            allEl.push({
                type: 'select',
                backgroundImage: '',
                transform: ''
            });
        }
        /** @type {?} */
        var length = allEl.length;
        if (length !== 0 && length % count !== 0) {
            /** @type {?} */
            var blankCount = count - (length % count);
            /** @type {?} */
            var fillBlankEl = [];
            for (var i = 0; i < blankCount; i++) {
                fillBlankEl.push({
                    type: 'white',
                    backgroundImage: '',
                    transform: ''
                });
            }
            allEl = allEl.concat(fillBlankEl);
        }
        this.flexEl = [];
        for (var i = 0; i < allEl.length / count; i++) {
            /** @type {?} */
            var rowEl = allEl.slice(i * count, i * count + count);
            this.flexEl.push(rowEl);
        }
    };
    /**
     * @param {?} imgItem
     * @return {?}
     */
    ImagePickerComponent.prototype.addImage = /**
     * @param {?} imgItem
     * @return {?}
     */
    function (imgItem) {
        this._files.push({
            type: 'img',
            url: imgItem.url,
            orientation: imgItem.orientation
        });
        this.sortItem();
        this.onChange.emit({
            files: this._files,
            operationType: 'add',
            index: this._files.length - 1
        });
    };
    /**
     * @param {?} index
     * @return {?}
     */
    ImagePickerComponent.prototype.removeImage = /**
     * @param {?} index
     * @return {?}
     */
    function (index) {
        this._files.splice(index, 1);
        this.sortItem();
        this.onChange.emit({
            files: this._files,
            operationType: 'remove',
            index: index
        });
    };
    /**
     * @param {?} index
     * @return {?}
     */
    ImagePickerComponent.prototype.imageClick = /**
     * @param {?} index
     * @return {?}
     */
    function (index) {
        this.onImageClick.emit({
            index: index,
            files: this._files
        });
    };
    /**
     * @param {?} e
     * @return {?}
     */
    ImagePickerComponent.prototype.addImageClick = /**
     * @param {?} e
     * @return {?}
     */
    function (e) {
        this.onAddImageClick.emit(e);
    };
    /**
     * @param {?} file
     * @param {?} index
     * @return {?}
     */
    ImagePickerComponent.prototype.parseFile = /**
     * @param {?} file
     * @param {?} index
     * @return {?}
     */
    function (file, index) {
        var _this = this;
        /** @type {?} */
        var reader = new FileReader();
        reader.onload = (/**
         * @param {?} e
         * @return {?}
         */
        function (e) {
            /** @type {?} */
            var dataURL = ((/** @type {?} */ (e.target))).result;
            if (!dataURL) {
                _this.onFail.emit("Fail to get the " + index + " image");
                return;
            }
            /** @type {?} */
            var orientation = 1;
            _this.getOrientation(file, (/**
             * @param {?} res
             * @return {?}
             */
            function (res) {
                // -2: not jpeg , -1: not defined
                if (res > 0) {
                    orientation = res;
                }
                _this.addImage({
                    url: dataURL,
                    orientation: orientation,
                    file: file
                });
            }));
        });
        reader.readAsDataURL(file);
    };
    /**
     * @param {?} event
     * @return {?}
     */
    ImagePickerComponent.prototype.fileChange = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        /** @type {?} */
        var fileList = event.target.files;
        if (fileList && fileList.length) {
            for (var i = 0; i < fileList.length; i++) {
                this.parseFile(fileList[i], i);
            }
        }
    };
    /**
     * @param {?=} orientation
     * @return {?}
     */
    ImagePickerComponent.prototype.getRotation = /**
     * @param {?=} orientation
     * @return {?}
     */
    function (orientation) {
        if (orientation === void 0) { orientation = 1; }
        /** @type {?} */
        var imgRotation = 0;
        switch (orientation) {
            case 3:
                imgRotation = 180;
                break;
            case 6:
                imgRotation = 90;
                break;
            case 8:
                imgRotation = 270;
                break;
            default:
        }
        return imgRotation;
    };
    // https://stackoverflow.com/questions/7584794/accessing-jpeg-exif-rotation-data-in-javascript-on-the-client-side
    // https://stackoverflow.com/questions/7584794/accessing-jpeg-exif-rotation-data-in-javascript-on-the-client-side
    /**
     * @param {?} file
     * @param {?} callback
     * @return {?}
     */
    ImagePickerComponent.prototype.getOrientation = 
    // https://stackoverflow.com/questions/7584794/accessing-jpeg-exif-rotation-data-in-javascript-on-the-client-side
    /**
     * @param {?} file
     * @param {?} callback
     * @return {?}
     */
    function (file, callback) {
        /** @type {?} */
        var reader = new FileReader();
        reader.onload = (/**
         * @param {?} e
         * @return {?}
         */
        function (e) {
            /** @type {?} */
            var view = new DataView(((/** @type {?} */ (e.target))).result);
            if (view.getUint16(0, false) !== 0xffd8) {
                return callback(-2);
            }
            /** @type {?} */
            var length = view.byteLength;
            /** @type {?} */
            var offset = 2;
            while (offset < length) {
                /** @type {?} */
                var marker = view.getUint16(offset, false);
                offset += 2;
                if (marker === 0xffe1) {
                    /** @type {?} */
                    var tmp = view.getUint32((offset += 2), false);
                    if (tmp !== 0x45786966) {
                        return callback(-1);
                    }
                    /** @type {?} */
                    var little = view.getUint16((offset += 6), false) === 0x4949;
                    offset += view.getUint32(offset + 4, little);
                    /** @type {?} */
                    var tags = view.getUint16(offset, little);
                    offset += 2;
                    for (var i = 0; i < tags; i++) {
                        if (view.getUint16(offset + i * 12, little) === 0x0112) {
                            return callback(view.getUint16(offset + i * 12 + 8, little));
                        }
                    }
                }
                else if ((marker & 0xff00) !== 0xff00) {
                    break;
                }
                else {
                    offset += view.getUint16(offset, false);
                }
            }
            return callback(-1);
        });
        reader.readAsArrayBuffer(file.slice(0, 64 * 1024));
    };
    ImagePickerComponent.decorators = [
        { type: Component, args: [{
                    selector: 'ImagePicker, nzm-image-picker',
                    template: "<div class=\"{{ prefixCls }}-list\" role=\"group\">\n  <Flex *ngFor=\"let rowItem of flexEl; let i = index\">\n    <FlexItem *ngFor=\"let item of rowItem; let j = index\">\n      <div *ngIf=\"item && 'img' === item.type && item.backgroundImage\" class=\"{{ prefixCls }}-item\">\n        <div\n          role=\"button\"\n          *ngIf=\"!disableDelete\"\n          aria-label=\"Click and Remove this image\"\n          class=\"{{ prefixCls }}-item-remove\"\n          (click)=\"removeImage(i * length + j)\"\n        ></div>\n        <div\n          role=\"button\"\n          aria-label=\"Image can be clicked\"\n          class=\"{{ prefixCls }}-item-content\"\n          [ngStyle]=\"{ 'background-image': item.backgroundImage, transform: item.transform }\"\n          (click)=\"imageClick(i * length + j)\"\n        ></div>\n      </div>\n      <div\n        role=\"button\"\n        aria-label=\"Choose and add image\"\n        *ngIf=\"item && 'select' === item.type\"\n        class=\"{{ prefixCls }}-item {{ prefixCls }}-upload-btn\"\n        (click)=\"addImageClick($event)\"\n      >\n        <input\n          #fileSelectorInput\n          type=\"file\"\n          [accept]=\"accept\"\n          [multiple]=\"multiple\"\n          [attr.capture]=\"capture ? capture : null\"\n          (change)=\"fileChange($event)\"\n        />\n      </div>\n      <div *ngIf=\"item && 'white' === item.type\" class=\"{{ prefixCls }}-item-white\"></div>\n    </FlexItem>\n  </Flex>\n</div>\n"
                }] }
    ];
    /** @nocollapse */
    ImagePickerComponent.ctorParameters = function () { return []; };
    ImagePickerComponent.propDecorators = {
        _fileSelectorInput: [{ type: ViewChild, args: ['fileSelectorInput', { read: ViewContainerRef, static: false },] }],
        capture: [{ type: Input }],
        disableDelete: [{ type: Input }],
        files: [{ type: Input }],
        accept: [{ type: Input }],
        length: [{ type: Input }],
        multiple: [{ type: Input }],
        selectable: [{ type: Input }],
        onFail: [{ type: Output }],
        onChange: [{ type: Output }],
        onImageClick: [{ type: Output }],
        onAddImageClick: [{ type: Output }]
    };
    return ImagePickerComponent;
}());
if (false) {
    /** @type {?} */
    ImagePickerComponent.prototype.prefixCls;
    /** @type {?} */
    ImagePickerComponent.prototype.flexEl;
    /**
     * @type {?}
     * @private
     */
    ImagePickerComponent.prototype._accept;
    /**
     * @type {?}
     * @private
     */
    ImagePickerComponent.prototype._count;
    /**
     * @type {?}
     * @private
     */
    ImagePickerComponent.prototype._selectable;
    /**
     * @type {?}
     * @private
     */
    ImagePickerComponent.prototype._files;
    /**
     * @type {?}
     * @private
     */
    ImagePickerComponent.prototype._multiple;
    /**
     * @type {?}
     * @private
     */
    ImagePickerComponent.prototype._fileSelectorInput;
    /** @type {?} */
    ImagePickerComponent.prototype.capture;
    /** @type {?} */
    ImagePickerComponent.prototype.disableDelete;
    /** @type {?} */
    ImagePickerComponent.prototype.onFail;
    /** @type {?} */
    ImagePickerComponent.prototype.onChange;
    /** @type {?} */
    ImagePickerComponent.prototype.onImageClick;
    /** @type {?} */
    ImagePickerComponent.prototype.onAddImageClick;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var ImagePickerModule = /** @class */ (function () {
    function ImagePickerModule() {
    }
    ImagePickerModule.decorators = [
        { type: NgModule, args: [{
                    declarations: [ImagePickerComponent],
                    exports: [ImagePickerComponent],
                    imports: [CommonModule, FlexModule]
                },] }
    ];
    return ImagePickerModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var ResultComponent = /** @class */ (function () {
    function ResultComponent() {
        this.prefixCls = 'am-result';
        this.isTitleString = true;
        this.isMessageString = true;
        this.onButtonClick = new EventEmitter();
        this.role = 'alert';
        this.amResult = true;
    }
    Object.defineProperty(ResultComponent.prototype, "title", {
        get: /**
         * @return {?}
         */
        function () {
            return this._title;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (this.isTemplateRef(value)) {
                this.isTitleString = false;
            }
            else {
                this.isTitleString = true;
            }
            this._title = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ResultComponent.prototype, "message", {
        get: /**
         * @return {?}
         */
        function () {
            return this._message;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (this.isTemplateRef(value)) {
                this.isMessageString = false;
            }
            else {
                this.isMessageString = true;
            }
            this._message = value;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @param {?} event
     * @return {?}
     */
    ResultComponent.prototype.buttonClick = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        this.onButtonClick.emit(event);
    };
    /**
     * @param {?} value
     * @return {?}
     */
    ResultComponent.prototype.isTemplateRef = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        if (value) {
            return value instanceof TemplateRef;
        }
        return false;
    };
    ResultComponent.decorators = [
        { type: Component, args: [{
                    selector: 'Result, nzm-result',
                    template: "<div *ngIf=\"img\" class=\"{{ prefixCls }}-pic\">\n  <ng-template [ngTemplateOutlet]=\"img\"></ng-template>\n</div>\n<div *ngIf=\"!img && imgUrl\" class=\"{{ prefixCls }}-pic\" [ngStyle]=\"{ backgroundImage: 'url(' + imgUrl + ')' }\"></div>\n<div *ngIf=\"title\" class=\"{{ prefixCls }}-title\">\n  <ng-template *ngIf=\"!isTitleString\" [ngTemplateOutlet]=\"title\"></ng-template>\n  <span *ngIf=\"isTitleString\">{{ title }}</span>\n</div>\n<div [ngClass]=\"prefixCls + '-message'\">\n  <ng-template *ngIf=\"!isMessageString\" [ngTemplateOutlet]=\"message\"></ng-template>\n  <span *ngIf=\"isMessageString\">{{ message }}</span>\n</div>\n<div *ngIf=\"buttonText\" class=\"{{ prefixCls }}-button\">\n  <a Button [type]=\"buttonType\" (click)=\"buttonClick($event)\">\n    {{ buttonText }}\n  </a>\n</div>\n",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    /** @nocollapse */
    ResultComponent.ctorParameters = function () { return []; };
    ResultComponent.propDecorators = {
        title: [{ type: Input }],
        imgUrl: [{ type: Input }],
        buttonText: [{ type: Input }],
        buttonType: [{ type: Input }],
        img: [{ type: Input }],
        message: [{ type: Input }],
        onButtonClick: [{ type: Output }],
        role: [{ type: HostBinding, args: ['attr.role',] }],
        amResult: [{ type: HostBinding, args: ['class.am-result',] }]
    };
    return ResultComponent;
}());
if (false) {
    /** @type {?} */
    ResultComponent.prototype.prefixCls;
    /** @type {?} */
    ResultComponent.prototype.isTitleString;
    /** @type {?} */
    ResultComponent.prototype.isMessageString;
    /**
     * @type {?}
     * @private
     */
    ResultComponent.prototype._title;
    /**
     * @type {?}
     * @private
     */
    ResultComponent.prototype._message;
    /** @type {?} */
    ResultComponent.prototype.imgUrl;
    /** @type {?} */
    ResultComponent.prototype.buttonText;
    /** @type {?} */
    ResultComponent.prototype.buttonType;
    /** @type {?} */
    ResultComponent.prototype.img;
    /** @type {?} */
    ResultComponent.prototype.onButtonClick;
    /** @type {?} */
    ResultComponent.prototype.role;
    /** @type {?} */
    ResultComponent.prototype.amResult;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var ResultModule = /** @class */ (function () {
    function ResultModule() {
    }
    ResultModule.decorators = [
        { type: NgModule, args: [{
                    declarations: [ResultComponent],
                    exports: [ResultComponent],
                    imports: [CommonModule, IconModule]
                },] }
    ];
    return ResultModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var RangeComponent = /** @class */ (function () {
    function RangeComponent(_elf) {
        this._elf = _elf;
        this.prefixCls = 'am-slider';
        this.offset = [];
        this.length = [];
        this._min = 0;
        this._max = 100;
        this._step = 1;
        this._defaultValue = [0, 0, 0];
        this._disabled = false;
        this._marks = {};
        this._dots = false;
        this._included = true;
        this._count = 1;
        this._allowCross = true;
        this._handleStyle = [];
        this._trackStyle = [];
        this.onChange = new EventEmitter();
        this.onAfterChange = new EventEmitter();
        this.amWrapper = true;
        this._ngModelOnChange = (/**
         * @return {?}
         */
        function () { });
        this._ngModelOnTouched = (/**
         * @return {?}
         */
        function () { });
    }
    Object.defineProperty(RangeComponent.prototype, "min", {
        get: /**
         * @return {?}
         */
        function () {
            return this._min;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._min = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(RangeComponent.prototype, "max", {
        get: /**
         * @return {?}
         */
        function () {
            return this._max;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._max = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(RangeComponent.prototype, "step", {
        get: /**
         * @return {?}
         */
        function () {
            return this._step;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._step = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(RangeComponent.prototype, "value", {
        get: /**
         * @return {?}
         */
        function () {
            return this._value;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.setValue(value);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(RangeComponent.prototype, "defaultValue", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._defaultValue = value;
            this._value = this._defaultValue;
            this.setValue(value);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(RangeComponent.prototype, "disabled", {
        get: /**
         * @return {?}
         */
        function () {
            return this._disabled;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._disabled = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(RangeComponent.prototype, "marks", {
        get: /**
         * @return {?}
         */
        function () {
            return this._marks;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._marks = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(RangeComponent.prototype, "dots", {
        get: /**
         * @return {?}
         */
        function () {
            return this._dots;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._dots = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(RangeComponent.prototype, "included", {
        get: /**
         * @return {?}
         */
        function () {
            return this._included;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._included = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(RangeComponent.prototype, "count", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._count = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(RangeComponent.prototype, "allowCross", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._allowCross = value;
            this.setValueBound();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(RangeComponent.prototype, "pushable", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._pushable = value;
            if (this.verifyPushable()) {
                this.setValueBound();
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(RangeComponent.prototype, "handleStyle", {
        get: /**
         * @return {?}
         */
        function () {
            return this._handleStyle;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._handleStyle = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(RangeComponent.prototype, "trackStyle", {
        get: /**
         * @return {?}
         */
        function () {
            return this._trackStyle;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._trackStyle = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(RangeComponent.prototype, "railStyle", {
        get: /**
         * @return {?}
         */
        function () {
            return this._railStyle;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._railStyle = value;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @return {?}
     */
    RangeComponent.prototype.setCls = /**
     * @return {?}
     */
    function () {
        var _a;
        this.sliderCls = (_a = {},
            _a[this.prefixCls + "-disabled"] = this._disabled,
            _a);
    };
    /**
     * @return {?}
     */
    RangeComponent.prototype.initialValue = /**
     * @return {?}
     */
    function () {
        /** @type {?} */
        var minTemp = this._min;
        if (!this.verifyPushable()) {
            this._pushable = 0;
            console.log('pushable设置无效,已大于有些value间隔,被强制设为0');
        }
        /** @type {?} */
        var initialValue = Array.apply(null, Array(this._count + 1)).map((/**
         * @return {?}
         */
        function () {
            return minTemp;
        }));
        this._defaultValue = this._defaultValue !== undefined ? this._defaultValue : initialValue;
        this._value = this._value !== undefined ? this._value : this._defaultValue;
        // 验证count值
        this._count = this._value.length - 1;
        // 验证value区间
        for (var i = 0; i < this._value.length; i++) {
            if (this._value[i] < this._min) {
                this._value[i] = this._min;
            }
            else if (this._value[i] > this._max) {
                this._value[i] = this._max;
            }
        }
        if (this._count > 0) {
            this.upperBound = Math.max.apply(Math, __spread(this._value));
            this.lowerBound = Math.min.apply(Math, __spread(this._value));
        }
    };
    /**
     * @param {?} e
     * @param {?} i
     * @return {?}
     */
    RangeComponent.prototype.handleChange = /**
     * @param {?} e
     * @param {?} i
     * @return {?}
     */
    function (e, i) {
        /** @type {?} */
        var temp = __spread(this._value);
        temp[i] = e;
        this.upperBound = Math.max.apply(Math, __spread(temp));
        this.lowerBound = Math.min.apply(Math, __spread(temp));
        this.setTrackStyle(temp);
        this.onChange.emit(temp);
    };
    /**
     * @param {?} e
     * @param {?} i
     * @return {?}
     */
    RangeComponent.prototype.handleAfterChange = /**
     * @param {?} e
     * @param {?} i
     * @return {?}
     */
    function (e, i) {
        var _this = this;
        setTimeout((/**
         * @return {?}
         */
        function () {
            _this._value[i] = e;
            _this.upperBound = Math.max.apply(Math, __spread(_this._value));
            _this.lowerBound = Math.min.apply(Math, __spread(_this._value));
            _this.setTrackStyle(_this._value);
            _this.onAfterChange.emit(_this._value);
            _this._ngModelOnChange(_this._value);
            _this.setValueBound();
        }), 0);
    };
    /**
     * @param {?} value
     * @return {?}
     */
    RangeComponent.prototype.setTrackStyle = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        if (value && value.length === this._count + 1) {
            value.sort((/**
             * @param {?} a
             * @param {?} b
             * @return {?}
             */
            function (a, b) { return a - b; }));
            for (var i = 0; i < this._count; i++) {
                this.offset[i] = (value[i] * 100) / (this._max - this._min);
                this.length[i] = ((value[i + 1] - value[i]) * 100) / (this._max - this._min);
            }
        }
    };
    /**
     * @return {?}
     */
    RangeComponent.prototype.setValueBound = /**
     * @return {?}
     */
    function () {
        this.maxBound = [];
        this.minBound = [];
        if ((this._allowCross && this._pushable === undefined) || this._handleCount <= 1) {
            for (var i = 0; i < this._handleCount; i++) {
                this.maxBound[i] = this._max;
                this.minBound[i] = this._min;
            }
        }
        else {
            if (this._pushable === undefined) {
                this._pushable = 0;
            }
            for (var i = 0; i < this._handleCount; i++) {
                this.maxBound[i] = i === this._handleCount - 1 ? this._max : this._value[i + 1] - this._pushable;
                this.minBound[i] = i === 0 ? this._min : this._value[i - 1] + this._pushable;
            }
        }
    };
    /**
     * @return {?}
     */
    RangeComponent.prototype.verifyPushable = /**
     * @return {?}
     */
    function () {
        for (var i = 1; i < this._handleCount; i++) {
            /** @type {?} */
            var diff = this._value[i] - this._value[i - 1];
            if (diff < this._pushable) {
                return false;
            }
        }
        return true;
    };
    /**
     * @param {?} value
     * @return {?}
     */
    RangeComponent.prototype.writeValue = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        this.setValue(value, true);
    };
    /**
     * @param {?} value
     * @param {?=} isWriteValue
     * @return {?}
     */
    RangeComponent.prototype.setValue = /**
     * @param {?} value
     * @param {?=} isWriteValue
     * @return {?}
     */
    function (value, isWriteValue) {
        if (isWriteValue === void 0) { isWriteValue = false; }
        if (value) {
            this._value = value;
            this._handleCount = this._value.length + 1;
            this.initialValue();
            this.setValueBound();
            this.setCls();
            this.setTrackStyle(this._value);
            if (isWriteValue) {
                this._ngModelOnChange(this._value);
            }
            else {
                this.onAfterChange.emit(this._value);
            }
        }
    };
    /**
     * @param {?} fn
     * @return {?}
     */
    RangeComponent.prototype.registerOnChange = /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) {
        this._ngModelOnChange = fn;
    };
    /**
     * @param {?} fn
     * @return {?}
     */
    RangeComponent.prototype.registerOnTouched = /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) {
        this._ngModelOnTouched = fn;
    };
    /**
     * @return {?}
     */
    RangeComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        this.initialValue();
        this.setValueBound();
        this._handleCount = this._count + 1;
        this.setCls();
        /** @type {?} */
        var sliderCoords = this._elf.nativeElement.getElementsByClassName('am-slider')[0].getBoundingClientRect();
        this.sliderLength = sliderCoords.width;
        this.sliderStart = sliderCoords.left;
    };
    RangeComponent.decorators = [
        { type: Component, args: [{
                    selector: 'Range , nzm-range',
                    template: "<div class=\"am-slider\" [ngClass]=\"sliderCls\">\n  <div class=\"am-slider-rail\" [ngStyle]=\"railStyle\"></div>\n  <SliderTrack\n    *ngFor=\"let off of offset; let i = index\"\n    [className]=\"'am-slider-track'\"\n    [included]=\"included\"\n    [style]=\"trackStyle[i]\"\n    [offset]=\"off\"\n    [length]=\"length[i]\"\n  ></SliderTrack>\n  <SliderSteps\n    [max]=\"max\"\n    [min]=\"min\"\n    [dots]=\"dots\"\n    [step]=\"step\"\n    [marks]=\"marks\"\n    [upperBound]=\"upperBound\"\n    [lowerBound]=\"lowerBound\"\n  ></SliderSteps>\n  <SliderHandle\n    *ngFor=\"let val of value; let i = index\"\n    [max]=\"max\"\n    [min]=\"min\"\n    [maxBound]=\"maxBound[i]\"\n    [minBound]=\"minBound[i]\"\n    [value]=\"val\"\n    [step]=\"step\"\n    [disabled]=\"disabled\"\n    [sliderLength]=\"sliderLength\"\n    [sliderStart]=\"sliderStart\"\n    [handleStyle]=\"handleStyle[i]\"\n    (onChange)=\"handleChange($event, i)\"\n    (onAfterChange)=\"handleAfterChange($event, i)\"\n  ></SliderHandle>\n  <SliderMarks\n    [max]=\"max\"\n    [min]=\"min\"\n    [marks]=\"marks\"\n    [upperBound]=\"upperBound\"\n    [lowerBound]=\"lowerBound\"\n  ></SliderMarks>\n</div>\n",
                    providers: [
                        {
                            provide: NG_VALUE_ACCESSOR,
                            useExisting: forwardRef((/**
                             * @return {?}
                             */
                            function () { return RangeComponent; })),
                            multi: true
                        }
                    ]
                }] }
    ];
    /** @nocollapse */
    RangeComponent.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    RangeComponent.propDecorators = {
        min: [{ type: Input }],
        max: [{ type: Input }],
        step: [{ type: Input }],
        value: [{ type: Input }],
        defaultValue: [{ type: Input }],
        disabled: [{ type: Input }],
        marks: [{ type: Input }],
        dots: [{ type: Input }],
        included: [{ type: Input }],
        count: [{ type: Input }],
        allowCross: [{ type: Input }],
        pushable: [{ type: Input }],
        handleStyle: [{ type: Input }],
        trackStyle: [{ type: Input }],
        railStyle: [{ type: Input }],
        onChange: [{ type: Output }],
        onAfterChange: [{ type: Output }],
        amWrapper: [{ type: HostBinding, args: ['class.am-slider-wrapper',] }]
    };
    return RangeComponent;
}());
if (false) {
    /** @type {?} */
    RangeComponent.prototype.prefixCls;
    /** @type {?} */
    RangeComponent.prototype.offset;
    /** @type {?} */
    RangeComponent.prototype.length;
    /** @type {?} */
    RangeComponent.prototype.upperBound;
    /** @type {?} */
    RangeComponent.prototype.lowerBound;
    /** @type {?} */
    RangeComponent.prototype.maxBound;
    /** @type {?} */
    RangeComponent.prototype.minBound;
    /** @type {?} */
    RangeComponent.prototype.sliderCls;
    /** @type {?} */
    RangeComponent.prototype.sliderLength;
    /** @type {?} */
    RangeComponent.prototype.sliderStart;
    /**
     * @type {?}
     * @private
     */
    RangeComponent.prototype._min;
    /**
     * @type {?}
     * @private
     */
    RangeComponent.prototype._max;
    /**
     * @type {?}
     * @private
     */
    RangeComponent.prototype._step;
    /**
     * @type {?}
     * @private
     */
    RangeComponent.prototype._value;
    /**
     * @type {?}
     * @private
     */
    RangeComponent.prototype._defaultValue;
    /**
     * @type {?}
     * @private
     */
    RangeComponent.prototype._disabled;
    /**
     * @type {?}
     * @private
     */
    RangeComponent.prototype._marks;
    /**
     * @type {?}
     * @private
     */
    RangeComponent.prototype._dots;
    /**
     * @type {?}
     * @private
     */
    RangeComponent.prototype._included;
    /**
     * @type {?}
     * @private
     */
    RangeComponent.prototype._count;
    /**
     * @type {?}
     * @private
     */
    RangeComponent.prototype._allowCross;
    /**
     * @type {?}
     * @private
     */
    RangeComponent.prototype._pushable;
    /**
     * @type {?}
     * @private
     */
    RangeComponent.prototype._handleStyle;
    /**
     * @type {?}
     * @private
     */
    RangeComponent.prototype._trackStyle;
    /**
     * @type {?}
     * @private
     */
    RangeComponent.prototype._railStyle;
    /**
     * @type {?}
     * @private
     */
    RangeComponent.prototype._handleCount;
    /** @type {?} */
    RangeComponent.prototype.onChange;
    /** @type {?} */
    RangeComponent.prototype.onAfterChange;
    /** @type {?} */
    RangeComponent.prototype.amWrapper;
    /**
     * @type {?}
     * @private
     */
    RangeComponent.prototype._ngModelOnChange;
    /**
     * @type {?}
     * @private
     */
    RangeComponent.prototype._ngModelOnTouched;
    /**
     * @type {?}
     * @private
     */
    RangeComponent.prototype._elf;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var SliderComponent = /** @class */ (function () {
    function SliderComponent(_elf) {
        this._elf = _elf;
        this.prefixCls = 'am-slider';
        this.offset = 0;
        this.length = 0;
        this._min = 0;
        this._max = 100;
        this._step = 1;
        this._defaultValue = 0;
        this._disabled = false;
        this._marks = {};
        this._dots = false;
        this._included = true;
        this._trackStyle = {};
        this.onAfterChange = new EventEmitter();
        this.onChange = new EventEmitter();
        this.amSliderWrapper = true;
        this._ngModelOnChange = (/**
         * @return {?}
         */
        function () { });
        this._ngModelOnTouched = (/**
         * @return {?}
         */
        function () { });
    }
    Object.defineProperty(SliderComponent.prototype, "min", {
        get: /**
         * @return {?}
         */
        function () {
            return this._min;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._min = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderComponent.prototype, "max", {
        get: /**
         * @return {?}
         */
        function () {
            return this._max;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._max = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderComponent.prototype, "step", {
        get: /**
         * @return {?}
         */
        function () {
            return this._step;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._step = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderComponent.prototype, "value", {
        get: /**
         * @return {?}
         */
        function () {
            return this._value;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this.setValue(value);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderComponent.prototype, "defaultValue", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._defaultValue = value;
            this.setValue(value);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderComponent.prototype, "disabled", {
        get: /**
         * @return {?}
         */
        function () {
            return this._disabled;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._disabled = value;
            this.setCls();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderComponent.prototype, "marks", {
        get: /**
         * @return {?}
         */
        function () {
            return this._marks;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._marks = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderComponent.prototype, "dots", {
        get: /**
         * @return {?}
         */
        function () {
            return this._dots;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._dots = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderComponent.prototype, "included", {
        get: /**
         * @return {?}
         */
        function () {
            return this._included;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._included = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderComponent.prototype, "handleStyle", {
        get: /**
         * @return {?}
         */
        function () {
            return this._handleStyle;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._handleStyle = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderComponent.prototype, "trackStyle", {
        get: /**
         * @return {?}
         */
        function () {
            return this._trackStyle;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._trackStyle = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderComponent.prototype, "railStyle", {
        get: /**
         * @return {?}
         */
        function () {
            return this._railStyle;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._railStyle = value;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @return {?}
     */
    SliderComponent.prototype.setCls = /**
     * @return {?}
     */
    function () {
        var _a;
        this.sliderCls = (_a = {},
            _a[this.prefixCls + "-disabled"] = this._disabled,
            _a);
    };
    /**
     * @param {?} e
     * @return {?}
     */
    SliderComponent.prototype.handleChange = /**
     * @param {?} e
     * @return {?}
     */
    function (e) {
        var _this = this;
        setTimeout((/**
         * @return {?}
         */
        function () {
            _this.setTrack(e);
            _this._value = e;
        }), 10);
        this.onChange.emit(e);
        this._ngModelOnChange(e);
    };
    /**
     * @param {?} e
     * @return {?}
     */
    SliderComponent.prototype.handleAfterChange = /**
     * @param {?} e
     * @return {?}
     */
    function (e) {
        var _this = this;
        setTimeout((/**
         * @return {?}
         */
        function () {
            _this.setTrack(e);
            _this._value = e;
        }), 10);
        this.onAfterChange.emit(e);
    };
    /**
     * @return {?}
     */
    SliderComponent.prototype.valueRange = /**
     * @return {?}
     */
    function () {
        if (this._value < this._min) {
            this._value = this._min;
        }
        if (this._value > this._max) {
            this._value = this._max;
        }
    };
    /**
     * @return {?}
     */
    SliderComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        this.setCls();
        this.setValue(this._value);
        /** @type {?} */
        var sliderCoords = this._elf.nativeElement.getElementsByClassName('am-slider')[0].getBoundingClientRect();
        this.sliderLength = sliderCoords.width;
        this.sliderStart = sliderCoords.left;
    };
    /**
     * @param {?} value
     * @return {?}
     */
    SliderComponent.prototype.writeValue = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        this.setValue(value, true);
    };
    /**
     * @param {?} value
     * @param {?=} isWriteValue
     * @return {?}
     */
    SliderComponent.prototype.setValue = /**
     * @param {?} value
     * @param {?=} isWriteValue
     * @return {?}
     */
    function (value, isWriteValue) {
        if (isWriteValue === void 0) { isWriteValue = false; }
        if (value === 0 || value) {
            this._value = value;
        }
        else {
            this._value = this._defaultValue;
        }
        this.valueRange();
        this.setTrack(this._value);
        if (isWriteValue) {
            this._ngModelOnChange(this._value);
        }
        else {
            this.onAfterChange.emit(this._value);
        }
    };
    /**
     * @param {?} e
     * @return {?}
     */
    SliderComponent.prototype.setTrack = /**
     * @param {?} e
     * @return {?}
     */
    function (e) {
        this.offset = 0;
        this.length = ((e - this._min) * 100) / (this._max - this._min);
    };
    /**
     * @param {?} fn
     * @return {?}
     */
    SliderComponent.prototype.registerOnChange = /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) {
        this._ngModelOnChange = fn;
    };
    /**
     * @param {?} fn
     * @return {?}
     */
    SliderComponent.prototype.registerOnTouched = /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) {
        this._ngModelOnTouched = fn;
    };
    SliderComponent.decorators = [
        { type: Component, args: [{
                    selector: 'Slider , nzm-slider',
                    template: "<div class=\"am-slider\" [ngClass]=\"sliderCls\">\n  <div class=\"am-slider-rail\" [ngStyle]=\"railStyle\"></div>\n  <SliderTrack\n    [className]=\"'am-slider-track'\"\n    [style]=\"trackStyle\"\n    [offset]=\"offset\"\n    [length]=\"length\"\n    [included]=\"included\"\n  ></SliderTrack>\n  <SliderSteps\n    [max]=\"max\"\n    [min]=\"min\"\n    [dots]=\"dots\"\n    [step]=\"step\"\n    [marks]=\"marks\"\n    [lowerBound]=\"min\"\n    [upperBound]=\"value\"\n    [included]=\"included\"\n  ></SliderSteps>\n  <SliderHandle\n    [max]=\"max\"\n    [min]=\"min\"\n    [value]=\"value\"\n    [step]=\"step\"\n    [disabled]=\"disabled\"\n    [handleStyle]=\"handleStyle\"\n    [sliderStart]=\"sliderStart\"\n    [sliderLength]=\"sliderLength\"\n    (onChange)=\"handleChange($event)\"\n    (onAfterChange)=\"handleAfterChange($event)\"\n  ></SliderHandle>\n  <SliderMarks\n    [max]=\"max\"\n    [min]=\"min\"\n    [marks]=\"marks\"\n    [lowerBound]=\"min\"\n    [upperBound]=\"value\"\n    [included]=\"included\"\n  ></SliderMarks>\n</div>\n",
                    encapsulation: ViewEncapsulation.None,
                    providers: [
                        {
                            provide: NG_VALUE_ACCESSOR,
                            useExisting: forwardRef((/**
                             * @return {?}
                             */
                            function () { return SliderComponent; })),
                            multi: true
                        }
                    ]
                }] }
    ];
    /** @nocollapse */
    SliderComponent.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    SliderComponent.propDecorators = {
        min: [{ type: Input }],
        max: [{ type: Input }],
        step: [{ type: Input }],
        value: [{ type: Input }],
        defaultValue: [{ type: Input }],
        disabled: [{ type: Input }],
        marks: [{ type: Input }],
        dots: [{ type: Input }],
        included: [{ type: Input }],
        handleStyle: [{ type: Input }],
        trackStyle: [{ type: Input }],
        railStyle: [{ type: Input }],
        onAfterChange: [{ type: Output }],
        onChange: [{ type: Output }],
        amSliderWrapper: [{ type: HostBinding, args: ['class.am-slider-wrapper',] }]
    };
    return SliderComponent;
}());
if (false) {
    /** @type {?} */
    SliderComponent.prototype.prefixCls;
    /** @type {?} */
    SliderComponent.prototype.sliderLength;
    /** @type {?} */
    SliderComponent.prototype.sliderStart;
    /** @type {?} */
    SliderComponent.prototype.sliderCls;
    /** @type {?} */
    SliderComponent.prototype.offset;
    /** @type {?} */
    SliderComponent.prototype.length;
    /**
     * @type {?}
     * @private
     */
    SliderComponent.prototype._min;
    /**
     * @type {?}
     * @private
     */
    SliderComponent.prototype._max;
    /**
     * @type {?}
     * @private
     */
    SliderComponent.prototype._step;
    /**
     * @type {?}
     * @private
     */
    SliderComponent.prototype._value;
    /**
     * @type {?}
     * @private
     */
    SliderComponent.prototype._defaultValue;
    /**
     * @type {?}
     * @private
     */
    SliderComponent.prototype._disabled;
    /**
     * @type {?}
     * @private
     */
    SliderComponent.prototype._marks;
    /**
     * @type {?}
     * @private
     */
    SliderComponent.prototype._dots;
    /**
     * @type {?}
     * @private
     */
    SliderComponent.prototype._included;
    /**
     * @type {?}
     * @private
     */
    SliderComponent.prototype._handleStyle;
    /**
     * @type {?}
     * @private
     */
    SliderComponent.prototype._trackStyle;
    /**
     * @type {?}
     * @private
     */
    SliderComponent.prototype._railStyle;
    /** @type {?} */
    SliderComponent.prototype.onAfterChange;
    /** @type {?} */
    SliderComponent.prototype.onChange;
    /** @type {?} */
    SliderComponent.prototype.amSliderWrapper;
    /**
     * @type {?}
     * @private
     */
    SliderComponent.prototype._ngModelOnChange;
    /**
     * @type {?}
     * @private
     */
    SliderComponent.prototype._ngModelOnTouched;
    /**
     * @type {?}
     * @private
     */
    SliderComponent.prototype._elf;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var SliderHandleComponent = /** @class */ (function () {
    function SliderHandleComponent(_elf, _sanitizer) {
        var _this = this;
        this._elf = _elf;
        this._sanitizer = _sanitizer;
        this._disabled = false;
        this._marks = {};
        this._isDraging = false;
        this.onChange = new EventEmitter();
        this.onAfterChange = new EventEmitter();
        this.mouseDown = (/**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            if (!_this._disabled && _this.isMouseTarget(event)) {
                _this._startX = event.clientX;
                _this._handleStatus = 'start';
                _this._isDraging = true;
                document.addEventListener('mousemove', _this.mouseMove, false);
                document.addEventListener('mouseup', _this.mouseUp, false);
                _this.pauseEvent(event);
            }
        });
        this.mouseMove = (/**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            if (!_this._disabled && _this._isDraging) {
                _this.pauseEvent(event);
                /** @type {?} */
                var pos = event.clientX;
                _this._value = Math.round(_this.calcValueByPos(pos));
                _this.left = _this.calcOffset(_this._value);
                if (_this._oldValue !== _this._value) {
                    _this._oldValue = _this._value;
                    _this.onChange.emit(_this._value);
                }
            }
        });
        this.mouseUp = (/**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            if (!_this._disabled && _this._isDraging) {
                _this._handleStatus = 'end';
                _this._isDraging = false;
                /** @type {?} */
                var pos = event.clientX;
                _this._value = Math.round(_this.calcValueByPos(pos));
                _this.left = _this.calcOffset(_this._value);
                _this.onAfterChange.emit(_this._value);
            }
        });
    }
    Object.defineProperty(SliderHandleComponent.prototype, "min", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._min = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderHandleComponent.prototype, "max", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._max = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderHandleComponent.prototype, "minBound", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._minBound = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderHandleComponent.prototype, "maxBound", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._maxBound = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderHandleComponent.prototype, "step", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._step = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderHandleComponent.prototype, "value", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._value = value;
            if (this._value) {
                this.left = this.calcOffset(this._value);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderHandleComponent.prototype, "disabled", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._disabled = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderHandleComponent.prototype, "sliderLength", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._sliderLength = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderHandleComponent.prototype, "sliderStart", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._sliderStart = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderHandleComponent.prototype, "handleStyle", {
        get: /**
         * @return {?}
         */
        function () {
            return this._handleStyle;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._handleStyle = value;
        },
        enumerable: true,
        configurable: true
    });
    /* 手势操作 */
    /* 手势操作 */
    /**
     * @param {?} event
     * @return {?}
     */
    SliderHandleComponent.prototype.panstart = /* 手势操作 */
    /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        // event.preventDefault();
        if (!this._disabled) {
            this._startX = event && event.changedTouches && event.changedTouches[0] && event.changedTouches[0].clientX;
            this._handleStatus = 'start';
            this._isDraging = true;
        }
    };
    /**
     * @param {?} event
     * @return {?}
     */
    SliderHandleComponent.prototype.panmove = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        event.preventDefault();
        if (!this._disabled && this._isDraging) {
            /** @type {?} */
            var pos = event.changedTouches[0].clientX;
            this._value = Math.round(this.calcValueByPos(pos));
            this.left = this.calcOffset(this._value);
            if (this._oldValue !== this._value) {
                this._oldValue = this._value;
                this.onChange.emit(this._value);
            }
        }
    };
    /**
     * @param {?} event
     * @return {?}
     */
    SliderHandleComponent.prototype.panend = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        event.preventDefault();
        if (!this._disabled && this._isDraging) {
            this._handleStatus = 'end';
            this._isDraging = false;
            /** @type {?} */
            var pos = event.changedTouches[0].clientX;
            this._value = Math.round(this.calcValueByPos(pos));
            this.left = this.calcOffset(this._value);
            this.onAfterChange.emit(this._value);
        }
    };
    /**
     * @param {?} pos
     * @return {?}
     */
    SliderHandleComponent.prototype.calcValueByPos = /**
     * @param {?} pos
     * @return {?}
     */
    function (pos) {
        /** @type {?} */
        var offset = pos - this._sliderStart;
        /** @type {?} */
        var value = this.calcValue(offset);
        if (value <= this._minBound) {
            value = this._minBound;
        }
        if (value >= this._maxBound) {
            value = this._maxBound;
        }
        /** @type {?} */
        var closestPoint = this.getClosestPoint(value);
        return this._step === null ? closestPoint : parseFloat(closestPoint.toFixed(this.getPrecision(this._step)));
    };
    /**
     * @param {?} offset
     * @return {?}
     */
    SliderHandleComponent.prototype.calcValue = /**
     * @param {?} offset
     * @return {?}
     */
    function (offset) {
        /** @type {?} */
        var ratio = Math.abs(Math.max(offset, 0) / this._sliderLength);
        /** @type {?} */
        var value = ratio * (this._max - this._min) + this._min;
        return value;
    };
    /**
     * @param {?} val
     * @return {?}
     */
    SliderHandleComponent.prototype.getClosestPoint = /**
     * @param {?} val
     * @return {?}
     */
    function (val) {
        /** @type {?} */
        var points = Object.keys(this._marks).map(parseFloat);
        if (this._step !== null) {
            /** @type {?} */
            var closestStep = Math.round((val - this._min) / this._step) * this._step + this._min;
            points.push(closestStep);
        }
        /** @type {?} */
        var diffs = points.map((/**
         * @param {?} point
         * @return {?}
         */
        function (point) {
            return Math.abs(val - point);
        }));
        return points[diffs.indexOf(Math.min.apply(Math, this.toConsumableArray(diffs)))];
    };
    /**
     * @param {?} step
     * @return {?}
     */
    SliderHandleComponent.prototype.getPrecision = /**
     * @param {?} step
     * @return {?}
     */
    function (step) {
        /** @type {?} */
        var stepString = step.toString();
        /** @type {?} */
        var precision = 0;
        if (stepString.indexOf('.') >= 0) {
            precision = stepString.length - stepString.indexOf('.') - 1;
        }
        return precision;
    };
    /**
     * @param {?} value
     * @return {?}
     */
    SliderHandleComponent.prototype.calcOffset = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        /** @type {?} */
        var ratio = (value - this._min) / (this._max - this._min);
        return ratio * 100;
    };
    /**
     * @param {?} e
     * @return {?}
     */
    SliderHandleComponent.prototype.pauseEvent = /**
     * @param {?} e
     * @return {?}
     */
    function (e) {
        e.stopPropagation();
        e.preventDefault();
    };
    /**
     * @param {?} event
     * @return {?}
     */
    SliderHandleComponent.prototype.isMouseTarget = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        /** @type {?} */
        var target = event.target;
        /** @type {?} */
        var parentFound = false;
        while (target !== null && !parentFound) {
            if (target === this._elf.nativeElement) {
                parentFound = true;
            }
            target = target.parentElement;
        }
        return parentFound;
    };
    /**
     * @param {?} arr
     * @return {?}
     */
    SliderHandleComponent.prototype.toConsumableArray = /**
     * @param {?} arr
     * @return {?}
     */
    function (arr) {
        if (Array.isArray(arr)) {
            /** @type {?} */
            var arr2 = Array(arr.length);
            for (var i = 0; i < arr.length; i++) {
                arr2[i] = arr[i];
            }
            return arr2;
        }
    };
    /**
     * @return {?}
     */
    SliderHandleComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        /** @type {?} */
        var self = this;
        this._elf.nativeElement.addEventListener('mousedown', this.mouseDown, false);
        this._handleOffsetX = this._elf.nativeElement.getBoundingClientRect().x;
        this.left = this.calcOffset(this._value);
        this._minBound = this._minBound === undefined ? this._min : this._minBound;
        this._maxBound = this._maxBound === undefined ? this._max : this._maxBound;
    };
    /**
     * @return {?}
     */
    SliderHandleComponent.prototype.ngOnDestroy = /**
     * @return {?}
     */
    function () {
        document.removeEventListener('mousemove', this.mouseMove, false);
        document.removeEventListener('mouseup', this.mouseUp, false);
    };
    SliderHandleComponent.decorators = [
        { type: Component, args: [{
                    selector: 'SliderHandle, nzm-slider-handle',
                    template: "<div role=\"slider\" class=\"am-slider-handle\" [ngStyle]=\"handleStyle\" [style.left.%]=\"left\"></div>\n",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    /** @nocollapse */
    SliderHandleComponent.ctorParameters = function () { return [
        { type: ElementRef },
        { type: DomSanitizer }
    ]; };
    SliderHandleComponent.propDecorators = {
        min: [{ type: Input }],
        max: [{ type: Input }],
        minBound: [{ type: Input }],
        maxBound: [{ type: Input }],
        step: [{ type: Input }],
        value: [{ type: Input }],
        disabled: [{ type: Input }],
        sliderLength: [{ type: Input }],
        sliderStart: [{ type: Input }],
        handleStyle: [{ type: Input }],
        onChange: [{ type: Output }],
        onAfterChange: [{ type: Output }],
        panstart: [{ type: HostListener, args: ['touchstart', ['$event'],] }],
        panmove: [{ type: HostListener, args: ['touchmove', ['$event'],] }],
        panend: [{ type: HostListener, args: ['touchend', ['$event'],] }]
    };
    return SliderHandleComponent;
}());
if (false) {
    /** @type {?} */
    SliderHandleComponent.prototype.left;
    /**
     * @type {?}
     * @private
     */
    SliderHandleComponent.prototype._min;
    /**
     * @type {?}
     * @private
     */
    SliderHandleComponent.prototype._max;
    /**
     * @type {?}
     * @private
     */
    SliderHandleComponent.prototype._step;
    /**
     * @type {?}
     * @private
     */
    SliderHandleComponent.prototype._value;
    /**
     * @type {?}
     * @private
     */
    SliderHandleComponent.prototype._disabled;
    /**
     * @type {?}
     * @private
     */
    SliderHandleComponent.prototype._marks;
    /**
     * @type {?}
     * @private
     */
    SliderHandleComponent.prototype._handleStyle;
    /**
     * @type {?}
     * @private
     */
    SliderHandleComponent.prototype._sliderLength;
    /**
     * @type {?}
     * @private
     */
    SliderHandleComponent.prototype._sliderStart;
    /**
     * @type {?}
     * @private
     */
    SliderHandleComponent.prototype._minBound;
    /**
     * @type {?}
     * @private
     */
    SliderHandleComponent.prototype._maxBound;
    /**
     * @type {?}
     * @private
     */
    SliderHandleComponent.prototype._startX;
    /**
     * @type {?}
     * @private
     */
    SliderHandleComponent.prototype._isDraging;
    /**
     * @type {?}
     * @private
     */
    SliderHandleComponent.prototype._handleStatus;
    /**
     * @type {?}
     * @private
     */
    SliderHandleComponent.prototype._handleOffsetX;
    /**
     * @type {?}
     * @private
     */
    SliderHandleComponent.prototype._oldValue;
    /** @type {?} */
    SliderHandleComponent.prototype.onChange;
    /** @type {?} */
    SliderHandleComponent.prototype.onAfterChange;
    /** @type {?} */
    SliderHandleComponent.prototype.mouseDown;
    /** @type {?} */
    SliderHandleComponent.prototype.mouseMove;
    /** @type {?} */
    SliderHandleComponent.prototype.mouseUp;
    /**
     * @type {?}
     * @private
     */
    SliderHandleComponent.prototype._elf;
    /**
     * @type {?}
     * @private
     */
    SliderHandleComponent.prototype._sanitizer;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var SliderMarksComponent = /** @class */ (function () {
    function SliderMarksComponent(_elf) {
        this._elf = _elf;
        this.markArray = [];
        this._min = 0;
        this._max = 100;
        this._marks = {};
        this._included = true;
        this._className = 'am-slider-mark';
        this.onChange = new EventEmitter();
        this.onAfterChange = new EventEmitter();
    }
    Object.defineProperty(SliderMarksComponent.prototype, "min", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (value && value <= this._max) {
                this._min = value;
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderMarksComponent.prototype, "max", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (value && value >= this._min) {
                this._max = value;
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderMarksComponent.prototype, "marks", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._marks = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderMarksComponent.prototype, "included", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._included = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderMarksComponent.prototype, "upperBound", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (value && value !== this._upperBound) {
                this._upperBound = value;
                this.setActiveCls();
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderMarksComponent.prototype, "lowerBound", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (value && value !== this.lowerBound) {
                this._lowerBound = value;
                this.setActiveCls();
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderMarksComponent.prototype, "class", {
        get: /**
         * @return {?}
         */
        function () {
            return this._className;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @param {?} marksKeys
     * @return {?}
     */
    SliderMarksComponent.prototype.getMarks = /**
     * @param {?} marksKeys
     * @return {?}
     */
    function (marksKeys) {
        var _this = this;
        this.markArray = [];
        marksKeys
            .map(parseFloat)
            .sort((/**
         * @param {?} a
         * @param {?} b
         * @return {?}
         */
        function (a, b) { return a - b; }))
            .map((/**
         * @param {?} point
         * @return {?}
         */
        function (point) {
            var _a;
            /** @type {?} */
            var markItem = {
                markLabel: '',
                point: '',
                className: {},
                style: {}
            };
            /** @type {?} */
            var markPoint = _this._marks[point];
            /** @type {?} */
            var markPointIsObject = typeof markPoint === 'object';
            /** @type {?} */
            var markLabel = markPointIsObject ? markPoint.label : markPoint;
            if (!markLabel && markLabel !== 0) {
                return null;
            }
            /** @type {?} */
            var isActive = (!_this._included && point === _this._upperBound) ||
                (_this._included && point <= _this._upperBound && point >= _this._lowerBound);
            /** @type {?} */
            var markClassName = (_a = {},
                _a[_this._className + "-text"] = true,
                _a[_this._className + "-text-active"] = isActive,
                _a);
            /** @type {?} */
            var bottomStyle = {
                marginBottom: '-50%',
                bottom: ((point - _this._min) / _this._range) * 100 + "%"
            };
            /** @type {?} */
            var leftStyle = {
                width: _this._markWidth + "%",
                marginLeft: -_this._markWidth / 2 + "%",
                left: ((point - _this._min) / _this._range) * 100 + "%"
            };
            /** @type {?} */
            var style = leftStyle;
            /** @type {?} */
            var markStyle = markPointIsObject ? __assign({}, style, markPoint.style) : style;
            markItem.markLabel = markLabel;
            markItem.point = point;
            markItem.className = Object.keys(markClassName).join(' ');
            markItem.style = markStyle;
            _this.markArray.push(markItem);
        }));
    };
    /**
     * @return {?}
     */
    SliderMarksComponent.prototype.setActiveCls = /**
     * @return {?}
     */
    function () {
        var _a;
        for (var i = 0; i < this.markArray.length; i++) {
            /** @type {?} */
            var point = this.markArray[i].point;
            /** @type {?} */
            var isActive = (!this._included && point === this._upperBound) ||
                (this._included && point <= this._upperBound && point >= this._lowerBound);
            this.markArray[i].className = (_a = {},
                _a[this._className + "-text"] = true,
                _a[this._className + "-text-active"] = isActive,
                _a);
        }
    };
    /**
     * @return {?}
     */
    SliderMarksComponent.prototype.setMarksLable = /**
     * @return {?}
     */
    function () {
        for (var i = 0; i < this.markArray.length; i++) {
            /** @type {?} */
            var markEle = this._elf.nativeElement.getElementsByClassName(this._className + '-text')[i];
            markEle.innerHTML = this.markArray[i].markLabel;
        }
    };
    /**
     * @return {?}
     */
    SliderMarksComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        /** @type {?} */
        var marksKeys = Object.keys(this._marks);
        /** @type {?} */
        var marksCount = marksKeys.length;
        /** @type {?} */
        var unit = marksCount > 1 ? 100 / (marksCount - 1) : 100;
        this._markWidth = unit * 0.9;
        this._range = this._max - this._min;
        this.getMarks(marksKeys);
    };
    /**
     * @return {?}
     */
    SliderMarksComponent.prototype.ngAfterViewInit = /**
     * @return {?}
     */
    function () {
        this.setMarksLable();
    };
    SliderMarksComponent.decorators = [
        { type: Component, args: [{
                    selector: 'SliderMarks, nzm-slider-marks',
                    template: "<span *ngFor=\"let item of markArray\" [ngClass]=\"item.className\" [ngStyle]=\"item.style\"> </span>\n",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    /** @nocollapse */
    SliderMarksComponent.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    SliderMarksComponent.propDecorators = {
        min: [{ type: Input }],
        max: [{ type: Input }],
        marks: [{ type: Input }],
        included: [{ type: Input }],
        upperBound: [{ type: Input }],
        lowerBound: [{ type: Input }],
        onChange: [{ type: Output }],
        onAfterChange: [{ type: Output }],
        class: [{ type: HostBinding }]
    };
    return SliderMarksComponent;
}());
if (false) {
    /** @type {?} */
    SliderMarksComponent.prototype.markArray;
    /**
     * @type {?}
     * @private
     */
    SliderMarksComponent.prototype._min;
    /**
     * @type {?}
     * @private
     */
    SliderMarksComponent.prototype._max;
    /**
     * @type {?}
     * @private
     */
    SliderMarksComponent.prototype._marks;
    /**
     * @type {?}
     * @private
     */
    SliderMarksComponent.prototype._included;
    /**
     * @type {?}
     * @private
     */
    SliderMarksComponent.prototype._className;
    /**
     * @type {?}
     * @private
     */
    SliderMarksComponent.prototype._upperBound;
    /**
     * @type {?}
     * @private
     */
    SliderMarksComponent.prototype._lowerBound;
    /**
     * @type {?}
     * @private
     */
    SliderMarksComponent.prototype._range;
    /**
     * @type {?}
     * @private
     */
    SliderMarksComponent.prototype._markWidth;
    /** @type {?} */
    SliderMarksComponent.prototype.onChange;
    /** @type {?} */
    SliderMarksComponent.prototype.onAfterChange;
    /**
     * @type {?}
     * @private
     */
    SliderMarksComponent.prototype._elf;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var SliderStepsComponent = /** @class */ (function () {
    function SliderStepsComponent(_elf) {
        this._elf = _elf;
        this.prefixCls = 'am-slider';
        this.stepArray = [];
        this._min = 0;
        this._max = 100;
        this._marks = {};
        this._included = true;
        this._dots = false;
    }
    Object.defineProperty(SliderStepsComponent.prototype, "min", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (value && value <= this._max) {
                this._min = value;
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderStepsComponent.prototype, "max", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (value && value >= this._min) {
                this._max = value;
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderStepsComponent.prototype, "marks", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._marks = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderStepsComponent.prototype, "step", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._step = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderStepsComponent.prototype, "included", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._included = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderStepsComponent.prototype, "dots", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._dots = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderStepsComponent.prototype, "upperBound", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (value !== undefined && value !== this._upperBound) {
                this._upperBound = value;
                this.setActiveCls();
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderStepsComponent.prototype, "lowerBound", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            if (value !== undefined && value !== this.lowerBound) {
                this._lowerBound = value;
                this.setActiveCls();
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderStepsComponent.prototype, "class", {
        get: /**
         * @return {?}
         */
        function () {
            return 'am-slider-step';
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @return {?}
     */
    SliderStepsComponent.prototype.calPoints = /**
     * @return {?}
     */
    function () {
        /** @type {?} */
        var points = Object.keys(this._marks).map(parseFloat);
        if (this._dots) {
            for (var i = this._min; i <= this._max; i = i + this._step) {
                if (points.indexOf(i) < 0) {
                    points.push(i);
                }
            }
        }
        return points;
    };
    /**
     * @param {?} points
     * @return {?}
     */
    SliderStepsComponent.prototype.getSteps = /**
     * @param {?} points
     * @return {?}
     */
    function (points) {
        var _this = this;
        /** @type {?} */
        var range = this._max - this._min;
        this.stepArray = [];
        points.map((/**
         * @param {?} point
         * @return {?}
         */
        function (point) {
            var _a;
            /** @type {?} */
            var stepItem = {
                stepStyle: {},
                stepClass: {},
                point: null
            };
            /** @type {?} */
            var offset = (Math.abs(point - _this._min) / range) * 100 + "%";
            /** @type {?} */
            var isActived = (!_this._included && point === _this._upperBound) ||
                (_this._included && point <= _this._upperBound && point >= _this._lowerBound);
            /** @type {?} */
            var style = __assign({ left: offset }, _this._dotStyle);
            if (isActived) {
                style = __assign({}, style, _this._activeDotStyle);
            }
            /** @type {?} */
            var pointClassName = (_a = {},
                _a[_this.prefixCls + "-dot"] = true,
                _a[_this.prefixCls + "-dot-active"] = isActived,
                _a);
            stepItem.point = point;
            stepItem.stepStyle = style;
            stepItem.stepClass = pointClassName;
            _this.stepArray.push(stepItem);
        }));
    };
    /**
     * @return {?}
     */
    SliderStepsComponent.prototype.setActiveCls = /**
     * @return {?}
     */
    function () {
        var _a;
        for (var i = 0; i < this.stepArray.length; i++) {
            /** @type {?} */
            var point = this.stepArray[i].point;
            /** @type {?} */
            var isActived = (!this._included && point === this._upperBound) ||
                (this._included && point <= this._upperBound && point >= this._lowerBound);
            this.stepArray[i].stepClass = (_a = {},
                _a[this.prefixCls + "-dot"] = true,
                _a[this.prefixCls + "-dot-active"] = isActived,
                _a);
        }
    };
    /**
     * @return {?}
     */
    SliderStepsComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        /** @type {?} */
        var points = this.calPoints();
        this.getSteps(points);
    };
    SliderStepsComponent.decorators = [
        { type: Component, args: [{
                    selector: 'SliderSteps, nzm-slider-steps',
                    template: "<span *ngFor=\"let item of stepArray\" [ngClass]=\"item.stepClass\" [ngStyle]=\"item.stepStyle\"> </span>\n",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    /** @nocollapse */
    SliderStepsComponent.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    SliderStepsComponent.propDecorators = {
        min: [{ type: Input }],
        max: [{ type: Input }],
        marks: [{ type: Input }],
        step: [{ type: Input }],
        included: [{ type: Input }],
        dots: [{ type: Input }],
        upperBound: [{ type: Input }],
        lowerBound: [{ type: Input }],
        class: [{ type: HostBinding }]
    };
    return SliderStepsComponent;
}());
if (false) {
    /** @type {?} */
    SliderStepsComponent.prototype.prefixCls;
    /** @type {?} */
    SliderStepsComponent.prototype.stepArray;
    /**
     * @type {?}
     * @private
     */
    SliderStepsComponent.prototype._min;
    /**
     * @type {?}
     * @private
     */
    SliderStepsComponent.prototype._max;
    /**
     * @type {?}
     * @private
     */
    SliderStepsComponent.prototype._step;
    /**
     * @type {?}
     * @private
     */
    SliderStepsComponent.prototype._marks;
    /**
     * @type {?}
     * @private
     */
    SliderStepsComponent.prototype._included;
    /**
     * @type {?}
     * @private
     */
    SliderStepsComponent.prototype._upperBound;
    /**
     * @type {?}
     * @private
     */
    SliderStepsComponent.prototype._lowerBound;
    /**
     * @type {?}
     * @private
     */
    SliderStepsComponent.prototype._dots;
    /**
     * @type {?}
     * @private
     */
    SliderStepsComponent.prototype._dotStyle;
    /**
     * @type {?}
     * @private
     */
    SliderStepsComponent.prototype._activeDotStyle;
    /**
     * @type {?}
     * @private
     */
    SliderStepsComponent.prototype._elf;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var SliderTrackComponent = /** @class */ (function () {
    function SliderTrackComponent(_elf, _sanitizer) {
        this._elf = _elf;
        this._sanitizer = _sanitizer;
        this.prefixCls = 'am-slider';
        this._included = true;
    }
    Object.defineProperty(SliderTrackComponent.prototype, "className", {
        get: /**
         * @return {?}
         */
        function () {
            return this._className;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._className = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderTrackComponent.prototype, "included", {
        get: /**
         * @return {?}
         */
        function () {
            return this._included;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._included = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderTrackComponent.prototype, "offset", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._offset = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderTrackComponent.prototype, "length", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._length = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SliderTrackComponent.prototype, "style", {
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._style = value;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @return {?}
     */
    SliderTrackComponent.prototype.ngOnChanges = /**
     * @return {?}
     */
    function () {
        /** @type {?} */
        var positonStyle = {
            left: this._offset + "%",
            width: this._length + "%"
        };
        this.elStyle = __assign({}, this._style, positonStyle);
    };
    SliderTrackComponent.decorators = [
        { type: Component, args: [{
                    selector: 'SliderTrack, nzm-slider-track',
                    template: "<div *ngIf=\"included\" [ngClass]=\"className\" [ngStyle]=\"elStyle\"></div>\n",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    /** @nocollapse */
    SliderTrackComponent.ctorParameters = function () { return [
        { type: ElementRef },
        { type: DomSanitizer }
    ]; };
    SliderTrackComponent.propDecorators = {
        className: [{ type: Input }],
        included: [{ type: Input }],
        offset: [{ type: Input }],
        length: [{ type: Input }],
        style: [{ type: Input }]
    };
    return SliderTrackComponent;
}());
if (false) {
    /** @type {?} */
    SliderTrackComponent.prototype.prefixCls;
    /** @type {?} */
    SliderTrackComponent.prototype.elStyle;
    /**
     * @type {?}
     * @private
     */
    SliderTrackComponent.prototype._className;
    /**
     * @type {?}
     * @private
     */
    SliderTrackComponent.prototype._included;
    /**
     * @type {?}
     * @private
     */
    SliderTrackComponent.prototype._offset;
    /**
     * @type {?}
     * @private
     */
    SliderTrackComponent.prototype._length;
    /**
     * @type {?}
     * @private
     */
    SliderTrackComponent.prototype._style;
    /**
     * @type {?}
     * @private
     */
    SliderTrackComponent.prototype._elf;
    /**
     * @type {?}
     * @private
     */
    SliderTrackComponent.prototype._sanitizer;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var SliderModule = /** @class */ (function () {
    function SliderModule() {
    }
    SliderModule.decorators = [
        { type: NgModule, args: [{
                    exports: [SliderComponent, SliderHandleComponent, SliderMarksComponent, SliderStepsComponent, SliderTrackComponent],
                    declarations: [
                        SliderComponent,
                        SliderHandleComponent,
                        SliderMarksComponent,
                        SliderStepsComponent,
                        SliderTrackComponent
                    ],
                    imports: [CommonModule]
                },] }
    ];
    return SliderModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var RangeModule = /** @class */ (function () {
    function RangeModule() {
    }
    RangeModule.decorators = [
        { type: NgModule, args: [{
                    exports: [RangeComponent],
                    declarations: [RangeComponent],
                    imports: [CommonModule, SliderModule]
                },] }
    ];
    return RangeModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @record
 */
function LocaleValue() { }
if (false) {
    /** @type {?} */
    LocaleValue.prototype.prevText;
    /** @type {?} */
    LocaleValue.prototype.nextText;
}
var PaginationComponent = /** @class */ (function () {
    function PaginationComponent(_localeProviderService) {
        this._localeProviderService = _localeProviderService;
        this.prefixCls = 'am-pagination';
        this._locale = {
            prevText: '',
            nextText: ''
        };
        this._unsubscribe$ = new Subject();
        this.mode = 'button';
        this.current = 1;
        this.total = 0;
        this.simple = false;
        this.disabled = false;
        this.onChange = new EventEmitter();
    }
    Object.defineProperty(PaginationComponent.prototype, "locale", {
        get: /**
         * @return {?}
         */
        function () {
            return this._locale;
        },
        set: /**
         * @param {?} v
         * @return {?}
         */
        function (v) {
            this._locale = v;
            this._unsubscribe$.next();
            this._unsubscribe$.complete();
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @param {?} key
     * @return {?}
     */
    PaginationComponent.prototype.isTemplateRef = /**
     * @param {?} key
     * @return {?}
     */
    function (key) {
        return (/** @type {?} */ (key)) instanceof TemplateRef;
    };
    /**
     * @param {?} p
     * @return {?}
     */
    PaginationComponent.prototype.onClick = /**
     * @param {?} p
     * @return {?}
     */
    function (p) {
        this.current = p;
        this.onChange.emit(p);
    };
    /**
     * @param {?} p
     * @return {?}
     */
    PaginationComponent.prototype.getNumber = /**
     * @param {?} p
     * @return {?}
     */
    function (p) {
        return new Array(p);
    };
    /**
     * @return {?}
     */
    PaginationComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        var _this = this;
        this._localeProviderService.localeChange.pipe(takeUntil(this._unsubscribe$)).subscribe((/**
         * @param {?} _
         * @return {?}
         */
        function (_) {
            _this._locale = (/** @type {?} */ (_this._localeProviderService.getLocaleSubObj('Pagination')));
        }));
    };
    /**
     * @return {?}
     */
    PaginationComponent.prototype.ngOnDestroy = /**
     * @return {?}
     */
    function () {
        this._unsubscribe$.next();
        this._unsubscribe$.complete();
    };
    PaginationComponent.decorators = [
        { type: Component, args: [{
                    selector: 'Pagination, nzm-pagination',
                    template: "<div class=\"{{ prefixCls }} {{ prefixCls }}-align-center\">\n  <Flex *ngIf=\"mode === 'button'\">\n    <FlexItem class=\"{{ prefixCls }}-wrap-btn {{ prefixCls }}-wrap-btn-prev\">\n      <a Button [inline]=\"true\" [disabled]=\"current <= 1\" (onClick)=\"onClick(current - 1)\">\n        <ng-container *ngIf=\"!isTemplateRef(locale.prevText)\">\n          {{ locale.prevText }}\n        </ng-container>\n        <ng-template *ngIf=\"isTemplateRef(locale.prevText)\" [ngTemplateOutlet]=\"locale.prevText\"></ng-template>\n      </a>\n    </FlexItem>\n    <FlexItem class=\"{{ prefixCls }}-wrap\" aria-live=\"assertive\" *ngIf=\"!simple\">\n      <span class=\"active\">{{ current }}</span\n      >/\n      <span>{{ total }}</span>\n    </FlexItem>\n    <FlexItem class=\"{{ prefixCls }}-wrap-btn {{ prefixCls }}-wrap-btn-next\">\n      <a Button [inline]=\"true\" [disabled]=\"current >= total\" (onClick)=\"onClick(current + 1)\">\n        <ng-container *ngIf=\"!isTemplateRef(locale.nextText)\">\n          {{ locale.nextText }}\n        </ng-container>\n        <ng-template *ngIf=\"isTemplateRef(locale.nextText)\" [ngTemplateOutlet]=\"locale.nextText\"></ng-template>\n      </a>\n    </FlexItem>\n  </Flex>\n\n  <div class=\"{{ prefixCls }}-wrap\" *ngIf=\"mode === 'number'\">\n    <span class=\"active\">{{ current }}</span\n    >/<span>{{ total }}</span>\n  </div>\n\n  <div class=\"{{ prefixCls }}-wrap\" *ngIf=\"mode === 'pointer'\">\n    <div\n      *ngFor=\"let number of getNumber(total); let i = index\"\n      class=\"{{ prefixCls }}-wrap-dot {{ current === i + 1 ? prefixCls + '-wrap-dot-active' : '' }}\"\n    >\n      <span></span>\n    </div>\n  </div>\n</div>\n",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    /** @nocollapse */
    PaginationComponent.ctorParameters = function () { return [
        { type: LocaleProviderService }
    ]; };
    PaginationComponent.propDecorators = {
        mode: [{ type: Input }],
        current: [{ type: Input }],
        total: [{ type: Input }],
        simple: [{ type: Input }],
        disabled: [{ type: Input }],
        locale: [{ type: Input }],
        onChange: [{ type: Output }]
    };
    return PaginationComponent;
}());
if (false) {
    /** @type {?} */
    PaginationComponent.prototype.prefixCls;
    /**
     * @type {?}
     * @private
     */
    PaginationComponent.prototype._locale;
    /**
     * @type {?}
     * @private
     */
    PaginationComponent.prototype._unsubscribe$;
    /** @type {?} */
    PaginationComponent.prototype.mode;
    /** @type {?} */
    PaginationComponent.prototype.current;
    /** @type {?} */
    PaginationComponent.prototype.total;
    /** @type {?} */
    PaginationComponent.prototype.simple;
    /** @type {?} */
    PaginationComponent.prototype.disabled;
    /** @type {?} */
    PaginationComponent.prototype.onChange;
    /**
     * @type {?}
     * @private
     */
    PaginationComponent.prototype._localeProviderService;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var PaginationModule = /** @class */ (function () {
    function PaginationModule() {
    }
    PaginationModule.decorators = [
        { type: NgModule, args: [{
                    imports: [CommonModule, ButtonModule, FlexModule, IconModule, LocaleProviderModule],
                    declarations: [PaginationComponent],
                    exports: [PaginationComponent],
                    providers: [LocaleProviderModule]
                },] }
    ];
    return PaginationModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var TagComponent = /** @class */ (function () {
    function TagComponent() {
        this.prefixCls = 'am-tag';
        this.closed = false;
        this.wrapCls = {};
        this._small = false;
        this._closable = false;
        this._selected = false;
        this._disabled = false;
        this.onChange = new EventEmitter();
        this.onClose = new EventEmitter();
        this.afterClose = new EventEmitter();
    }
    Object.defineProperty(TagComponent.prototype, "small", {
        get: /**
         * @return {?}
         */
        function () {
            return this._small;
        },
        set: /**
         * @param {?} v
         * @return {?}
         */
        function (v) {
            this._small = v;
            this.setClassMap();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TagComponent.prototype, "closable", {
        get: /**
         * @return {?}
         */
        function () {
            return this._closable;
        },
        set: /**
         * @param {?} v
         * @return {?}
         */
        function (v) {
            this._closable = v;
            this.setClassMap();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TagComponent.prototype, "selected", {
        set: /**
         * @param {?} v
         * @return {?}
         */
        function (v) {
            this._selected = v;
            this.setClassMap();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(TagComponent.prototype, "disabled", {
        get: /**
         * @return {?}
         */
        function () {
            return this._disabled;
        },
        set: /**
         * @param {?} v
         * @return {?}
         */
        function (v) {
            this._disabled = v;
            this.setClassMap();
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @return {?}
     */
    TagComponent.prototype.onClick = /**
     * @return {?}
     */
    function () {
        if (this._disabled) {
            return;
        }
        this._selected = !this._selected;
        this.onChange.emit(this._selected);
        this.setClassMap();
    };
    /**
     * @return {?}
     */
    TagComponent.prototype.onTagClose = /**
     * @return {?}
     */
    function () {
        this.onClose.emit();
        this.closed = true;
        this.afterClose.emit();
    };
    /**
     * @return {?}
     */
    TagComponent.prototype.setClassMap = /**
     * @return {?}
     */
    function () {
        var _a;
        this.wrapCls = (_a = {},
            _a[this.prefixCls] = true,
            _a[this.prefixCls + "-normal"] = !this._disabled && (!this._selected || this._small || this._closable),
            _a[this.prefixCls + "-small"] = this._small,
            _a[this.prefixCls + "-active"] = this._selected && !this._disabled && !this._small && !this._closable,
            _a[this.prefixCls + "-disabled"] = this._disabled,
            _a[this.prefixCls + "-closable"] = this._closable,
            _a);
    };
    /**
     * @return {?}
     */
    TagComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        this.setClassMap();
    };
    TagComponent.decorators = [
        { type: Component, args: [{
                    selector: 'Tag, nzm-tag',
                    template: "<div *ngIf=\"!closed\" [ngClass]=\"wrapCls\" (click)=\"onClick()\">\n  <div class=\"{{ prefixCls }}-text\">\n    <ng-content></ng-content>\n  </div>\n  <div\n    *ngIf=\"closable && !disabled && !small\"\n    role=\"button\"\n    class=\"{{ prefixCls }}-close\"\n    aria-label=\"remove tag\"\n    (click)=\"onTagClose()\"\n  >\n    <Icon aria-hidden=\"true\" [type]=\"'cross-circle'\" [size]=\"'xs'\"></Icon>\n  </div>\n</div>\n",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    /** @nocollapse */
    TagComponent.ctorParameters = function () { return []; };
    TagComponent.propDecorators = {
        small: [{ type: Input }],
        closable: [{ type: Input }],
        selected: [{ type: Input }],
        disabled: [{ type: Input }],
        onChange: [{ type: Output }],
        onClose: [{ type: Output }],
        afterClose: [{ type: Output }]
    };
    return TagComponent;
}());
if (false) {
    /** @type {?} */
    TagComponent.prototype.prefixCls;
    /** @type {?} */
    TagComponent.prototype.closed;
    /** @type {?} */
    TagComponent.prototype.wrapCls;
    /**
     * @type {?}
     * @private
     */
    TagComponent.prototype._small;
    /**
     * @type {?}
     * @private
     */
    TagComponent.prototype._closable;
    /**
     * @type {?}
     * @private
     */
    TagComponent.prototype._selected;
    /**
     * @type {?}
     * @private
     */
    TagComponent.prototype._disabled;
    /** @type {?} */
    TagComponent.prototype.onChange;
    /** @type {?} */
    TagComponent.prototype.onClose;
    /** @type {?} */
    TagComponent.prototype.afterClose;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var TagModule = /** @class */ (function () {
    function TagModule() {
    }
    TagModule.decorators = [
        { type: NgModule, args: [{
                    imports: [CommonModule, IconModule],
                    declarations: [TagComponent],
                    exports: [TagComponent]
                },] }
    ];
    return TagModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @record
 */
function LocaleValue$1() { }
if (false) {
    /** @type {?} */
    LocaleValue$1.prototype.okText;
    /** @type {?} */
    LocaleValue$1.prototype.cancelText;
}
var MenuComponent = /** @class */ (function () {
    function MenuComponent(_localeProviderService) {
        this._localeProviderService = _localeProviderService;
        this.prefixCls = 'am-menu';
        this.subMenuPrefixCls = 'am-sub-menu';
        this.radioPrefixCls = 'am-radio';
        this.multiSelectMenuBtnsCls = 'am-multi-select-btns';
        this.menuSelectContanerPrefixCls = 'am-menu-select-container';
        this.locale = {
            okText: '',
            cancelText: ''
        };
        this._data = [];
        this._unsubscribe$ = new Subject();
        this.level = 2;
        this.value = [];
        this.height = document.documentElement.clientHeight / 2;
        this.multiSelect = false;
        this.onChange = new EventEmitter();
        this.onOk = new EventEmitter();
        this.onCancel = new EventEmitter();
    }
    Object.defineProperty(MenuComponent.prototype, "data", {
        get: /**
         * @return {?}
         */
        function () {
            return this._data;
        },
        set: /**
         * @param {?} v
         * @return {?}
         */
        function (v) {
            this._data = v;
            this.initData();
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @return {?}
     */
    MenuComponent.prototype.onMenuOk = /**
     * @return {?}
     */
    function () {
        this.onOk.emit(this.value);
    };
    /**
     * @return {?}
     */
    MenuComponent.prototype.onMenuCancel = /**
     * @return {?}
     */
    function () {
        this.onCancel.emit();
    };
    /**
     * @return {?}
     */
    MenuComponent.prototype.getNewFsv = /**
     * @return {?}
     */
    function () {
        /** @type {?} */
        var firstValue = '';
        if (this.value && this.value.length) {
            firstValue = (/** @type {?} */ (this.value[0]));
        }
        else if (this._data && this._data.length && !this._data[0].isLeaf) {
            firstValue = this._data[0].value;
        }
        return firstValue;
    };
    /**
     * @param {?} dataItem
     * @return {?}
     */
    MenuComponent.prototype.onClickFirstLevelItem = /**
     * @param {?} dataItem
     * @return {?}
     */
    function (dataItem) {
        this.firstLevelSelectValue = dataItem.value;
        if (dataItem.isLeaf && this.onChange) {
            this.onChange.emit([dataItem.value]);
        }
        this.initData();
    };
    /**
     * @param {?} dataItem
     * @return {?}
     */
    MenuComponent.prototype.onClickSubMenuItem = /**
     * @param {?} dataItem
     * @return {?}
     */
    function (dataItem) {
        var _this = this;
        this.value = this.getSelectValue(dataItem);
        this.initData();
        setTimeout((/**
         * @return {?}
         */
        function () {
            _this.onChange.emit(_this.value);
        }), 300);
    };
    /**
     * @param {?} dataItem
     * @return {?}
     */
    MenuComponent.prototype.getSelectValue = /**
     * @param {?} dataItem
     * @return {?}
     */
    function (dataItem) {
        if (this.multiSelect) {
            if (this.value && this.value.length > 0) {
                if (this.level === 2 && this.value[0] !== this.firstLevelSelectValue) {
                    return [this.firstLevelSelectValue, [dataItem.value]];
                }
                else {
                    if (this.level == 1) {
                        /** @type {?} */
                        var chosenValues = Array.from(this.value);
                        /** @type {?} */
                        var existIndex = chosenValues.indexOf(dataItem.value);
                        if (existIndex === -1) {
                            chosenValues.push(dataItem.value);
                        }
                        else {
                            chosenValues.splice(existIndex, 1);
                        }
                        return chosenValues;
                    }
                    else {
                        /** @type {?} */
                        var chosenValues = Array.from(this.value[1]);
                        /** @type {?} */
                        var existIndex = chosenValues.indexOf(dataItem.value);
                        if (existIndex === -1) {
                            chosenValues.push(dataItem.value);
                        }
                        else {
                            chosenValues.splice(existIndex, 1);
                        }
                        return [this.firstLevelSelectValue, chosenValues];
                    }
                }
            }
            else {
                return this.level === 2 ? [this.firstLevelSelectValue, [dataItem.value]] : [dataItem.value];
            }
        }
        return this.level === 2 ? [this.firstLevelSelectValue, dataItem.value] : [dataItem.value];
    };
    /**
     * @return {?}
     */
    MenuComponent.prototype.initData = /**
     * @return {?}
     */
    function () {
        var _this = this;
        this.subMenuData = this._data;
        if (this.level === 2) {
            /** @type {?} */
            var parent_1 = this._data;
            if (this.firstLevelSelectValue && this.firstLevelSelectValue !== '') {
                parent_1 = this._data.filter((/**
                 * @param {?} dataItem
                 * @return {?}
                 */
                function (dataItem) { return dataItem.value === _this.firstLevelSelectValue; }));
            }
            if (parent_1[0] && parent_1[0].children && parent_1[0].isLeaf !== true) {
                this.subMenuData = parent_1[0].children;
            }
            else {
                this.subMenuData = [];
            }
        }
        /** @type {?} */
        var subValue = (this.value && this.value.length > 0 && __spread(this.value)) || [];
        if (this.level === 2 && subValue.length > 1) {
            subValue.shift();
            if (this.multiSelect) {
                subValue = (/** @type {?} */ (subValue[0]));
            }
        }
        this.subSelInitItem = this.subMenuData
            .filter((/**
         * @param {?} dataItem
         * @return {?}
         */
        function (dataItem) { return subValue.indexOf(dataItem.value) !== -1; }))
            .map((/**
         * @param {?} item
         * @return {?}
         */
        function (item) {
            return item.value;
        }));
        /** @type {?} */
        var parentValue = this.value && this.value.length > 1 && this.level === 2 ? this.value[0] : null;
        this.showSelect = true;
        if (this.level === 2 && parentValue !== this.firstLevelSelectValue) {
            this.showSelect = false;
        }
    };
    /**
     * @param {?} dataItem
     * @return {?}
     */
    MenuComponent.prototype.getClass = /**
     * @param {?} dataItem
     * @return {?}
     */
    function (dataItem) {
        return this.dataItemSelected(dataItem) ? this.prefixCls + '-selected' : '';
    };
    /**
     * @param {?} dataItem
     * @return {?}
     */
    MenuComponent.prototype.dataItemSelected = /**
     * @param {?} dataItem
     * @return {?}
     */
    function (dataItem) {
        return dataItem.value === this.firstLevelSelectValue;
    };
    /**
     * @return {?}
     */
    MenuComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        var _this = this;
        this._localeProviderService.localeChange.pipe(takeUntil(this._unsubscribe$)).subscribe((/**
         * @param {?} _
         * @return {?}
         */
        function (_) {
            _this.locale = (/** @type {?} */ (_this._localeProviderService.getLocaleSubObj('Menu')));
        }));
        this.firstLevelSelectValue = this.getNewFsv();
        this.heightStyle = {
            height: this.height + 'px'
        };
        this.initData();
    };
    /**
     * @return {?}
     */
    MenuComponent.prototype.ngOnDestroy = /**
     * @return {?}
     */
    function () {
        this._unsubscribe$.next();
        this._unsubscribe$.complete();
    };
    MenuComponent.decorators = [
        { type: Component, args: [{
                    selector: 'Menu, nzm-menu',
                    template: "<Flex class=\"{{ prefixCls }}\" [ngStyle]=\"heightStyle\" [direction]=\"'column'\" [align]=\"'stretch'\">\n  <Flex class=\"{{ menuSelectContanerPrefixCls }}\" [align]=\"'start'\">\n    <FlexItem *ngIf=\"level == 2\">\n      <List role=\"tablist\">\n        <ListItem\n          role=\"tab\"\n          *ngFor=\"let dataItem of data; let i = index\"\n          [className]=\"getClass(dataItem)\"\n          (click)=\"onClickFirstLevelItem(dataItem)\"\n        >\n          {{ dataItem.label }}\n        </ListItem>\n      </List>\n    </FlexItem>\n\n    <FlexItem role=\"tabpanel\" aria-hidden=\"false\" class=\"{{ menuSelectContanerPrefixCls }}-submenu\">\n      <SubMenu\n        [subMenuPrefixCls]=\"subMenuPrefixCls\"\n        [radioPrefixCls]=\"radioPrefixCls\"\n        [subMenuData]=\"subMenuData\"\n        [selItem]=\"subSelInitItem\"\n        [showSelect]=\"showSelect\"\n        [multiSelect]=\"multiSelect\"\n        (onSel)=\"onClickSubMenuItem($event)\"\n      >\n      </SubMenu>\n    </FlexItem>\n  </Flex>\n\n  <div *ngIf=\"multiSelect\" class=\"{{ multiSelectMenuBtnsCls }}\">\n    <a Button [className]=\"'am-multi-select-btns-btn'\" [inline]=\"true\" (onClick)=\"onMenuCancel()\">\n      {{ locale.cancelText }}\n    </a>\n    <a Button [className]=\"'am-multi-select-btns-btn'\" [inline]=\"true\" [type]=\"'primary'\" (onClick)=\"onMenuOk()\">\n      {{ locale.okText }}\n    </a>\n  </div>\n</Flex>\n",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    /** @nocollapse */
    MenuComponent.ctorParameters = function () { return [
        { type: LocaleProviderService }
    ]; };
    MenuComponent.propDecorators = {
        data: [{ type: Input }],
        level: [{ type: Input }],
        value: [{ type: Input }],
        height: [{ type: Input }],
        multiSelect: [{ type: Input }],
        onChange: [{ type: Output }],
        onOk: [{ type: Output }],
        onCancel: [{ type: Output }]
    };
    return MenuComponent;
}());
if (false) {
    /** @type {?} */
    MenuComponent.prototype.prefixCls;
    /** @type {?} */
    MenuComponent.prototype.subMenuPrefixCls;
    /** @type {?} */
    MenuComponent.prototype.radioPrefixCls;
    /** @type {?} */
    MenuComponent.prototype.multiSelectMenuBtnsCls;
    /** @type {?} */
    MenuComponent.prototype.menuSelectContanerPrefixCls;
    /** @type {?} */
    MenuComponent.prototype.firstLevelSelectValue;
    /** @type {?} */
    MenuComponent.prototype.heightStyle;
    /** @type {?} */
    MenuComponent.prototype.subMenuData;
    /** @type {?} */
    MenuComponent.prototype.showSelect;
    /** @type {?} */
    MenuComponent.prototype.subSelInitItem;
    /** @type {?} */
    MenuComponent.prototype.locale;
    /**
     * @type {?}
     * @private
     */
    MenuComponent.prototype._data;
    /**
     * @type {?}
     * @private
     */
    MenuComponent.prototype._unsubscribe$;
    /** @type {?} */
    MenuComponent.prototype.level;
    /** @type {?} */
    MenuComponent.prototype.value;
    /** @type {?} */
    MenuComponent.prototype.height;
    /** @type {?} */
    MenuComponent.prototype.multiSelect;
    /** @type {?} */
    MenuComponent.prototype.onChange;
    /** @type {?} */
    MenuComponent.prototype.onOk;
    /** @type {?} */
    MenuComponent.prototype.onCancel;
    /**
     * @type {?}
     * @private
     */
    MenuComponent.prototype._localeProviderService;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var SubMenuComponent = /** @class */ (function () {
    function SubMenuComponent() {
        this.prefixCls = 'am-sub-menu';
        this.onSel = new EventEmitter();
    }
    Object.defineProperty(SubMenuComponent.prototype, "subMenuPrefixCls", {
        get: /**
         * @return {?}
         */
        function () {
            return this._subMenuPrefixCls;
        },
        set: /**
         * @param {?} v
         * @return {?}
         */
        function (v) {
            this._subMenuPrefixCls = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SubMenuComponent.prototype, "subMenuData", {
        get: /**
         * @return {?}
         */
        function () {
            return this._subMenuData;
        },
        set: /**
         * @param {?} v
         * @return {?}
         */
        function (v) {
            this._subMenuData = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SubMenuComponent.prototype, "multiSelect", {
        get: /**
         * @return {?}
         */
        function () {
            return this._multiSelect;
        },
        set: /**
         * @param {?} v
         * @return {?}
         */
        function (v) {
            this._multiSelect = v;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @param {?} dataItem
     * @return {?}
     */
    SubMenuComponent.prototype.onClick = /**
     * @param {?} dataItem
     * @return {?}
     */
    function (dataItem) {
        this.onSel.emit(dataItem);
    };
    /**
     * @param {?} dataItem
     * @return {?}
     */
    SubMenuComponent.prototype.selected = /**
     * @param {?} dataItem
     * @return {?}
     */
    function (dataItem) {
        return this.showSelect && (this.selItem.length > 0 && this.selItem.indexOf(dataItem.value) !== -1);
    };
    /**
     * @param {?} dataItem
     * @return {?}
     */
    SubMenuComponent.prototype.getClass = /**
     * @param {?} dataItem
     * @return {?}
     */
    function (dataItem) {
        /** @type {?} */
        var name = this.radioPrefixCls + '-item ';
        name += this.selected(dataItem) ? this._subMenuPrefixCls + '-item-selected' : '';
        name += dataItem.disabled ? this._subMenuPrefixCls + '-item-disabled' : '';
        return name;
    };
    /**
     * @param {?} changes
     * @return {?}
     */
    SubMenuComponent.prototype.ngOnChanges = /**
     * @param {?} changes
     * @return {?}
     */
    function (changes) {
        var _this = this;
        this._subMenuData.map((/**
         * @param {?} item
         * @return {?}
         */
        function (item) {
            item.checked = _this.selected(item);
        }));
    };
    SubMenuComponent.decorators = [
        { type: Component, args: [{
                    selector: 'SubMenu, nzm-sub-menu',
                    template: "<List class=\"{{ subMenuPrefixCls }}\" style=\"padding: 0\">\n  <ListItem\n    *ngFor=\"let dataItem of subMenuData; let i = index\"\n    key=\"i\"\n    [className]=\"getClass(dataItem)\"\n    [extra]=\"extra\"\n  >\n    {{ dataItem.label }}\n\n    <ng-template #extra>\n      <label\n        Radio\n        *ngIf=\"!multiSelect\"\n        [checked]=\"dataItem.checked\"\n        [disabled]=\"dataItem.disabled\"\n        (onChange)=\"onClick(dataItem)\"\n      >\n      </label>\n      <label\n        Checkbox\n        *ngIf=\"multiSelect\"\n        [checked]=\"dataItem.checked\"\n        [disabled]=\"dataItem.disabled\"\n        (onChange)=\"onClick(dataItem)\"\n      >\n      </label>\n    </ng-template>\n  </ListItem>\n</List>\n",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    /** @nocollapse */
    SubMenuComponent.ctorParameters = function () { return []; };
    SubMenuComponent.propDecorators = {
        onSel: [{ type: Output }],
        radioPrefixCls: [{ type: Input }],
        showSelect: [{ type: Input }],
        selItem: [{ type: Input }],
        subMenuPrefixCls: [{ type: Input }],
        subMenuData: [{ type: Input }],
        multiSelect: [{ type: Input }]
    };
    return SubMenuComponent;
}());
if (false) {
    /** @type {?} */
    SubMenuComponent.prototype.prefixCls;
    /**
     * @type {?}
     * @private
     */
    SubMenuComponent.prototype._subMenuPrefixCls;
    /**
     * @type {?}
     * @private
     */
    SubMenuComponent.prototype._subMenuData;
    /**
     * @type {?}
     * @private
     */
    SubMenuComponent.prototype._multiSelect;
    /** @type {?} */
    SubMenuComponent.prototype.onSel;
    /** @type {?} */
    SubMenuComponent.prototype.radioPrefixCls;
    /** @type {?} */
    SubMenuComponent.prototype.showSelect;
    /** @type {?} */
    SubMenuComponent.prototype.selItem;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var MenuModule = /** @class */ (function () {
    function MenuModule() {
    }
    MenuModule.decorators = [
        { type: NgModule, args: [{
                    imports: [
                        CommonModule,
                        FlexModule,
                        ListModule,
                        RadioModule,
                        CheckboxModule,
                        ButtonModule,
                        LocaleProviderModule,
                        FormsModule
                    ],
                    exports: [MenuComponent, SubMenuComponent],
                    declarations: [MenuComponent, SubMenuComponent],
                    providers: [LocaleProviderModule]
                },] }
    ];
    return MenuModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var DrawerComponent = /** @class */ (function () {
    function DrawerComponent(_el) {
        this._el = _el;
        this.prefixCls = 'am-drawer';
        this.sidebarStyleFinal = {};
        this.contentStyleFinal = {};
        this.overlayStyleFinal = {};
        this.sidebarWidth = 0;
        this.sidebarHeight = 0;
        this.sidebarTop = 0;
        this.dragHandleTop = 0;
        this.touchIdentifier = null;
        this.touchStartX = null;
        this.touchStartY = null;
        this.touchCurrentX = null;
        this.touchCurrentY = null;
        this.touchSupported = typeof window === 'object' && 'ontouchstart' in window;
        this._docked = false;
        this._open = false;
        this._position = 'left';
        this.sidebarStyle = {};
        this.contentStyle = {};
        this.overlayStyle = {};
        this.dragHandleStyle = {};
        this.transitions = true;
        this.touch = true;
        this.enableDragHandle = false;
        this.dragToggleDistance = 30;
        this.onOpenChange = new EventEmitter();
        this.am = true;
        this.left = this._position === 'left';
        this.right = this._position === 'right';
        this.top = this._position == 'top';
        this.bottom = this._position == 'bottom';
        this.dockedCls = this._docked;
        this.openCls = this._open;
    }
    Object.defineProperty(DrawerComponent.prototype, "docked", {
        get: /**
         * @return {?}
         */
        function () {
            return this._docked;
        },
        set: /**
         * @param {?} v
         * @return {?}
         */
        function (v) {
            this._docked = v;
            this.dockedCls = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DrawerComponent.prototype, "open", {
        get: /**
         * @return {?}
         */
        function () {
            return this._open;
        },
        set: /**
         * @param {?} v
         * @return {?}
         */
        function (v) {
            this._open = v;
            this.openCls = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(DrawerComponent.prototype, "position", {
        set: /**
         * @param {?} v
         * @return {?}
         */
        function (v) {
            this._position = v;
            this.right = false;
            this.left = false;
            this.top = false;
            this.bottom = false;
            switch (v) {
                case 'right':
                    this.right = true;
                    break;
                case 'left':
                    this.left = true;
                    break;
                case 'top':
                    this.top = true;
                    break;
                case 'bottom':
                    this.bottom = true;
                    break;
            }
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @return {?}
     */
    DrawerComponent.prototype.onOverlayClicked = /**
     * @return {?}
     */
    function () {
        if (this._open) {
            this.onOpenChange.emit(true);
        }
    };
    /**
     * @return {?}
     */
    DrawerComponent.prototype.isTouching = /**
     * @return {?}
     */
    function () {
        return this.touchIdentifier !== null;
    };
    /**
     * @param {?} event
     * @return {?}
     */
    DrawerComponent.prototype.onTouchStart = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        /** @type {?} */
        var touch = event.changedTouches[0];
        this.touchIdentifier = touch.identifier;
        this.touchStartX = touch.clientX;
        this.touchStartY = touch.clientY;
        this.touchCurrentX = touch.clientX;
        this.touchCurrentY = touch.clientY;
    };
    /**
     * @param {?} ev
     * @return {?}
     */
    DrawerComponent.prototype.onTouchMove = /**
     * @param {?} ev
     * @return {?}
     */
    function (ev) {
        for (var ind = 0; ind < ev.changedTouches.length; ind++) {
            if (ev.changedTouches[ind].identifier === this.touchIdentifier) {
                this.touchCurrentX = ev.changedTouches[ind].clientX;
                this.touchCurrentY = ev.changedTouches[ind].clientY;
                break;
            }
        }
        this.update();
    };
    /**
     * @return {?}
     */
    DrawerComponent.prototype.onTouchEnd = /**
     * @return {?}
     */
    function () {
        /** @type {?} */
        var touchWidth = this.touchSidebarWidth();
        if (!this._open && touchWidth > this.dragToggleDistance) {
            this.onOpenChange.emit(!this._open);
        }
        /** @type {?} */
        var touchHeight = this.touchSidebarHeight();
        if (!this._open && touchHeight > this.dragToggleDistance) {
            this.onOpenChange.emit(!this._open);
        }
        this.touchIdentifier = null;
        this.touchStartX = null;
        this.touchStartY = null;
        this.touchCurrentX = null;
        this.touchCurrentY = null;
        this.update();
    };
    /**
     * @return {?}
     */
    DrawerComponent.prototype.saveSidebarSize = /**
     * @return {?}
     */
    function () {
        /** @type {?} */
        var sidebar = this._el.nativeElement.querySelector('#sidebar');
        /** @type {?} */
        var dragHandle = this._el.nativeElement.querySelector('#dragHandle');
        /** @type {?} */
        var width = sidebar.offsetWidth;
        /** @type {?} */
        var height = sidebar.offsetHeight;
        /** @type {?} */
        var sidebarTop = this.getOffset(sidebar).top;
        /** @type {?} */
        var dragHandleTop = this.getOffset(dragHandle).top;
        if (width !== this.sidebarWidth) {
            this.sidebarWidth = width;
        }
        if (height !== this.sidebarHeight) {
            this.sidebarHeight = height;
        }
        if (sidebarTop !== this.sidebarTop) {
            this.sidebarTop = sidebarTop;
        }
        if (dragHandleTop !== this.dragHandleTop) {
            this.dragHandleTop = dragHandleTop;
        }
    };
    /**
     * @return {?}
     */
    DrawerComponent.prototype.touchSidebarWidth = /**
     * @return {?}
     */
    function () {
        if (this._position === 'right') {
            return Math.min(window.innerWidth - this.touchCurrentX, this.sidebarWidth);
        }
        if (this._position === 'left') {
            return Math.min(this.touchCurrentX, this.sidebarWidth);
        }
    };
    /**
     * @return {?}
     */
    DrawerComponent.prototype.touchSidebarHeight = /**
     * @return {?}
     */
    function () {
        if (this._position === 'bottom') {
            return Math.min(this._el.nativeElement.offsetHeight - this.touchCurrentY + this._el.nativeElement.offsetTop, this.sidebarHeight);
        }
        if (this._position === 'top') {
            return Math.min(this.touchCurrentY - this.dragHandleTop, this.sidebarHeight);
        }
    };
    /**
     * @param {?} __0
     * @return {?}
     */
    DrawerComponent.prototype.renderStyle = /**
     * @param {?} __0
     * @return {?}
     */
    function (_a) {
        var sidebarStyle = _a.sidebarStyle, isTouching = _a.isTouching, overlayStyle = _a.overlayStyle, contentStyle = _a.contentStyle;
        if (this._position === 'right' || this._position === 'left') {
            sidebarStyle.transform = "translateX(0%)";
            sidebarStyle.WebkitTransform = "translateX(0%)";
            if (isTouching) {
                /** @type {?} */
                var percentage = this.touchSidebarWidth() / this.sidebarWidth;
                // slide open to what we dragged
                if (this._position === 'right') {
                    sidebarStyle.transform = "translateX(" + (1 - percentage) * 100 + "%)";
                    sidebarStyle.WebkitTransform = "translateX(" + (1 - percentage) * 100 + "%)";
                }
                if (this._position === 'left') {
                    sidebarStyle.transform = "translateX(-" + (1 - percentage) * 100 + "%)";
                    sidebarStyle.WebkitTransform = "translateX(-" + (1 - percentage) * 100 + "%)";
                }
                overlayStyle.opacity = percentage;
                overlayStyle.visibility = 'visible';
            }
            if (contentStyle) {
                contentStyle[this._position] = this.sidebarWidth + "px";
            }
        }
        if (this._position === 'top' || this._position === 'bottom') {
            sidebarStyle.transform = "translateY(0%)";
            sidebarStyle.WebkitTransform = "translateY(0%)";
            if (isTouching) {
                /** @type {?} */
                var percentage = this.touchSidebarHeight() / this.sidebarHeight;
                if (this._position === 'bottom') {
                    sidebarStyle.transform = "translateY(" + (1 - percentage) * 100 + "%)";
                    sidebarStyle.WebkitTransform = "translateY(" + (1 - percentage) * 100 + "%)";
                }
                if (this._position === 'top') {
                    sidebarStyle.transform = "translateY(-" + (1 - percentage) * 100 + "%)";
                    sidebarStyle.WebkitTransform = "translateY(-" + (1 - percentage) * 100 + "%)";
                }
                overlayStyle.opacity = percentage;
                overlayStyle.visibility = 'visible';
            }
            if (contentStyle) {
                contentStyle[this._position] = this.sidebarHeight + "px";
            }
        }
    };
    /**
     * @return {?}
     */
    DrawerComponent.prototype.update = /**
     * @return {?}
     */
    function () {
        /** @type {?} */
        var sidebarStyle = __assign({}, this.sidebarStyle);
        /** @type {?} */
        var contentStyle = __assign({}, this.contentStyle);
        /** @type {?} */
        var overlayStyle = __assign({}, this.overlayStyle);
        if (this.isTouching()) {
            this.renderStyle({
                sidebarStyle: sidebarStyle,
                isTouching: true,
                contentStyle: undefined,
                overlayStyle: overlayStyle
            });
        }
        else if (this._docked) {
            this.dockedCls = true;
            this.renderStyle({
                sidebarStyle: sidebarStyle,
                isTouching: undefined,
                contentStyle: contentStyle,
                overlayStyle: undefined
            });
        }
        else if (this._open) {
            this.openCls = true;
            this.renderStyle({
                sidebarStyle: sidebarStyle,
                isTouching: undefined,
                contentStyle: undefined,
                overlayStyle: undefined
            });
            overlayStyle.opacity = 1;
            overlayStyle.visibility = 'visible';
        }
        if (this.isTouching() || !this.transitions) {
            sidebarStyle.transition = 'none';
            sidebarStyle.WebkitTransition = 'none';
            contentStyle.transition = 'none';
            overlayStyle.transition = 'none';
        }
        this.sidebarStyleFinal = sidebarStyle;
        this.contentStyleFinal = contentStyle;
        this.overlayStyleFinal = overlayStyle;
    };
    /**
     * @param {?} ele
     * @return {?}
     */
    DrawerComponent.prototype.getOffset = /**
     * @param {?} ele
     * @return {?}
     */
    function (ele) {
        /** @type {?} */
        var el = ele;
        /** @type {?} */
        var _x = 0;
        /** @type {?} */
        var _y = 0;
        while (el && !isNaN(el.offsetLeft) && !isNaN(el.offsetTop)) {
            _x += el.offsetLeft - el.scrollLeft;
            _y += el.offsetTop - el.scrollTop;
            el = el.offsetParent;
        }
        return { top: _y, left: _x };
    };
    /**
     * @return {?}
     */
    DrawerComponent.prototype.ngAfterViewChecked = /**
     * @return {?}
     */
    function () {
        if (!this.isTouching()) {
            this.saveSidebarSize();
        }
    };
    /**
     * @return {?}
     */
    DrawerComponent.prototype.ngOnChanges = /**
     * @return {?}
     */
    function () {
        this.update();
    };
    DrawerComponent.decorators = [
        { type: Component, args: [{
                    selector: 'Drawer, nzm-drawer',
                    template: "<div class=\"{{ prefixCls }}-sidebar\" [ngStyle]=\"sidebarStyleFinal\" id=\"sidebar\">\n  <ng-template [ngTemplateOutlet]=\"sidebar\"></ng-template>\n</div>\n<div\n  class=\"{{ prefixCls }}-overlay\"\n  [ngStyle]=\"overlayStyleFinal\"\n  role=\"presentation\"\n  ref=\"overlay\"\n  (click)=\"onOverlayClicked()\"\n></div>\n<div class=\"{{ prefixCls }}-content\" [ngStyle]=\"contentStyleFinal\" ref=\"content\">\n  <div\n    *ngIf=\"touch && touchSupported && !open && !docked && enableDragHandle\"\n    id=\"dragHandle\"\n    class=\"{{ prefixCls }}-draghandle\"\n    [ngStyle]=\"dragHandleStyle\"\n    (touchstart)=\"onTouchStart($event)\"\n    (touchmove)=\"onTouchMove($event)\"\n    (touchend)=\"onTouchEnd()\"\n    (touchcancle)=\"onTouchEnd()\"\n  ></div>\n  <ng-content></ng-content>\n</div>\n",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    /** @nocollapse */
    DrawerComponent.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    DrawerComponent.propDecorators = {
        sidebar: [{ type: Input }],
        sidebarStyle: [{ type: Input }],
        contentStyle: [{ type: Input }],
        overlayStyle: [{ type: Input }],
        dragHandleStyle: [{ type: Input }],
        transitions: [{ type: Input }],
        touch: [{ type: Input }],
        enableDragHandle: [{ type: Input }],
        dragToggleDistance: [{ type: Input }],
        docked: [{ type: Input }],
        open: [{ type: Input }],
        position: [{ type: Input }],
        onOpenChange: [{ type: Output }],
        am: [{ type: HostBinding, args: ['class.am-drawer',] }],
        left: [{ type: HostBinding, args: ['class.am-drawer-left',] }],
        right: [{ type: HostBinding, args: ['class.am-drawer-right',] }],
        top: [{ type: HostBinding, args: ['class.am-drawer-top',] }],
        bottom: [{ type: HostBinding, args: ['class.am-drawer-bottom',] }],
        dockedCls: [{ type: HostBinding, args: ['class.am-drawer-docked',] }],
        openCls: [{ type: HostBinding, args: ['class.am-drawer-open',] }]
    };
    return DrawerComponent;
}());
if (false) {
    /** @type {?} */
    DrawerComponent.prototype.prefixCls;
    /** @type {?} */
    DrawerComponent.prototype.sidebarStyleFinal;
    /** @type {?} */
    DrawerComponent.prototype.contentStyleFinal;
    /** @type {?} */
    DrawerComponent.prototype.overlayStyleFinal;
    /** @type {?} */
    DrawerComponent.prototype.sidebarWidth;
    /** @type {?} */
    DrawerComponent.prototype.sidebarHeight;
    /** @type {?} */
    DrawerComponent.prototype.sidebarTop;
    /** @type {?} */
    DrawerComponent.prototype.dragHandleTop;
    /** @type {?} */
    DrawerComponent.prototype.touchIdentifier;
    /** @type {?} */
    DrawerComponent.prototype.touchStartX;
    /** @type {?} */
    DrawerComponent.prototype.touchStartY;
    /** @type {?} */
    DrawerComponent.prototype.touchCurrentX;
    /** @type {?} */
    DrawerComponent.prototype.touchCurrentY;
    /** @type {?} */
    DrawerComponent.prototype.touchSupported;
    /**
     * @type {?}
     * @private
     */
    DrawerComponent.prototype._docked;
    /**
     * @type {?}
     * @private
     */
    DrawerComponent.prototype._open;
    /**
     * @type {?}
     * @private
     */
    DrawerComponent.prototype._position;
    /** @type {?} */
    DrawerComponent.prototype.sidebar;
    /** @type {?} */
    DrawerComponent.prototype.sidebarStyle;
    /** @type {?} */
    DrawerComponent.prototype.contentStyle;
    /** @type {?} */
    DrawerComponent.prototype.overlayStyle;
    /** @type {?} */
    DrawerComponent.prototype.dragHandleStyle;
    /** @type {?} */
    DrawerComponent.prototype.transitions;
    /** @type {?} */
    DrawerComponent.prototype.touch;
    /** @type {?} */
    DrawerComponent.prototype.enableDragHandle;
    /** @type {?} */
    DrawerComponent.prototype.dragToggleDistance;
    /** @type {?} */
    DrawerComponent.prototype.onOpenChange;
    /** @type {?} */
    DrawerComponent.prototype.am;
    /** @type {?} */
    DrawerComponent.prototype.left;
    /** @type {?} */
    DrawerComponent.prototype.right;
    /** @type {?} */
    DrawerComponent.prototype.top;
    /** @type {?} */
    DrawerComponent.prototype.bottom;
    /** @type {?} */
    DrawerComponent.prototype.dockedCls;
    /** @type {?} */
    DrawerComponent.prototype.openCls;
    /**
     * @type {?}
     * @private
     */
    DrawerComponent.prototype._el;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var DrawerModule = /** @class */ (function () {
    function DrawerModule() {
    }
    DrawerModule.decorators = [
        { type: NgModule, args: [{
                    imports: [CommonModule],
                    declarations: [DrawerComponent],
                    exports: [DrawerComponent]
                },] }
    ];
    return DrawerModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var SwipeActionComponent = /** @class */ (function () {
    function SwipeActionComponent() {
        var _this = this;
        this.prefixCls = 'am-swipe';
        this.wrapCls = {};
        this._swiping = false;
        this._openedLeft = false;
        this._openedRight = false;
        this.left = [];
        this.right = [];
        this.autoClose = false;
        this.disabled = false;
        this.onOpen = new EventEmitter();
        this.onClose = new EventEmitter();
        this.onCloseSwipe = (/**
         * @param {?} ev
         * @return {?}
         */
        function (ev) {
            if (!(_this._openedLeft || _this._openedRight)) {
                return;
            }
            /** @type {?} */
            var pNode = ev.target.closest("." + _this.prefixCls + "-actions");
            if (!pNode) {
                _this.close();
            }
        });
    }
    /**
     * @return {?}
     */
    SwipeActionComponent.prototype.setClassMap = /**
     * @return {?}
     */
    function () {
        var _a;
        this.wrapCls = (_a = {},
            _a[this.prefixCls] = true,
            _a[this.prefixCls + "-swiping"] = this._swiping,
            _a);
    };
    /**
     * @return {?}
     */
    SwipeActionComponent.prototype.close = /**
     * @return {?}
     */
    function () {
        if (this._openedLeft || this._openedRight) {
            this.onClose.emit();
        }
        this.setBtnStyle(0);
        this._openedLeft = false;
        this._openedRight = false;
    };
    /**
     * @param {?} value
     * @return {?}
     */
    SwipeActionComponent.prototype.setBtnStyle = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        if (this._btnsLeftWidth === 0 || this._btnsRightWidth === 0) {
            this._btnsLeftWidth = this.leftBtnRef ? this.leftBtnRef.nativeElement.offsetWidth : 0;
            this._btnsRightWidth = this.rightBtnRef ? this.rightBtnRef.nativeElement.offsetWidth : 0;
        }
        /** @type {?} */
        var limit = value > 0 ? this._btnsLeftWidth : -this._btnsRightWidth;
        /** @type {?} */
        var contentLeft = this.getContentEasing(value, limit);
        this.content.nativeElement.style.left = contentLeft + "px";
        this.cover.nativeElement.style.display = Math.abs(value) > 0 ? 'block' : 'none';
        this.cover.nativeElement.style.left = contentLeft + "px";
    };
    /**
     * @param {?} value
     * @param {?} limit
     * @return {?}
     */
    SwipeActionComponent.prototype.getContentEasing = /**
     * @param {?} value
     * @param {?} limit
     * @return {?}
     */
    function (value, limit) {
        return Math.abs(value) - Math.abs(limit) > 0 ? limit : value;
    };
    /**
     * @param {?} e
     * @return {?}
     */
    SwipeActionComponent.prototype.onTouchStart = /**
     * @param {?} e
     * @return {?}
     */
    function (e) {
        this._startX = e.changedTouches[0].clientX;
        this._swiping = true;
    };
    /**
     * @param {?} e
     * @return {?}
     */
    SwipeActionComponent.prototype.onTouchMove = /**
     * @param {?} e
     * @return {?}
     */
    function (e) {
        /** @type {?} */
        var deltaX = e.changedTouches[0].clientX - this._startX;
        this._needShowRight = deltaX < -5 && this.right.length > 0;
        this._needShowLeft = deltaX > 5 && this.left.length > 0;
        if (this.leftBtnRef) {
            this.leftBtnRef.nativeElement.style.visibility = this._needShowRight ? 'hidden' : 'visible';
        }
        if (this.rightBtnRef) {
            this.rightBtnRef.nativeElement.style.visibility = this._needShowLeft ? 'hidden' : 'visible';
        }
        this.setBtnStyle(deltaX);
    };
    /**
     * @param {?} e
     * @return {?}
     */
    SwipeActionComponent.prototype.onTouchEnd = /**
     * @param {?} e
     * @return {?}
     */
    function (e) {
        /** @type {?} */
        var deltaX = e.changedTouches[0].clientX - this._startX;
        /** @type {?} */
        var needOpenRight = this._needShowRight && Math.abs(deltaX) > this._btnsRightWidth / 2;
        /** @type {?} */
        var needOpenLeft = this._needShowLeft && Math.abs(deltaX) > this._btnsLeftWidth / 2;
        if (needOpenRight) {
            this.doOpenRight();
        }
        else if (needOpenLeft) {
            this.doOpenLeft();
        }
        else {
            this.close();
        }
        this._swiping = false;
        this._needShowLeft = false;
        this._needShowRight = false;
    };
    /**
     * @return {?}
     */
    SwipeActionComponent.prototype.doOpenLeft = /**
     * @return {?}
     */
    function () {
        this.open(this._btnsLeftWidth, true, false);
    };
    /**
     * @return {?}
     */
    SwipeActionComponent.prototype.doOpenRight = /**
     * @return {?}
     */
    function () {
        this.open(-this._btnsRightWidth, false, true);
    };
    /**
     * @param {?} ev
     * @param {?} btn
     * @return {?}
     */
    SwipeActionComponent.prototype.onBtnClick = /**
     * @param {?} ev
     * @param {?} btn
     * @return {?}
     */
    function (ev, btn) {
        /** @type {?} */
        var onPress = btn.onPress;
        if (onPress) {
            onPress(ev);
        }
        if (this.autoClose) {
            this.close();
        }
    };
    /**
     * @param {?} value
     * @param {?} openedLeft
     * @param {?} openedRight
     * @return {?}
     */
    SwipeActionComponent.prototype.open = /**
     * @param {?} value
     * @param {?} openedLeft
     * @param {?} openedRight
     * @return {?}
     */
    function (value, openedLeft, openedRight) {
        this.onOpen.emit();
        this._openedLeft = openedLeft;
        this._openedRight = openedRight;
        this.setBtnStyle(value);
    };
    /**
     * @return {?}
     */
    SwipeActionComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        this.setClassMap();
    };
    /**
     * @return {?}
     */
    SwipeActionComponent.prototype.ngAfterViewInit = /**
     * @return {?}
     */
    function () {
        this._btnsLeftWidth = this.leftBtnRef ? this.leftBtnRef.nativeElement.offsetWidth : 0;
        this._btnsRightWidth = this.rightBtnRef ? this.rightBtnRef.nativeElement.offsetWidth : 0;
        document.body.addEventListener('touchstart', this.onCloseSwipe, true);
    };
    /**
     * @return {?}
     */
    SwipeActionComponent.prototype.ngOnDestroy = /**
     * @return {?}
     */
    function () {
        document.body.removeEventListener('touchstart', this.onCloseSwipe, true);
    };
    SwipeActionComponent.decorators = [
        { type: Component, args: [{
                    selector: 'SwipeAction, nzm-swipe-action',
                    template: "<div *ngIf=\"(left.length != 0 || right.length != 0) && !disabled\" [ngClass]=\"wrapCls\">\n  <div class=\"{{ prefixCls }}-cover\" #coverRef></div>\n  <div *ngIf=\"left && left.length > 0\" class=\"{{ prefixCls }}-actions {{ prefixCls }}-actions-left\" #leftBtnRef>\n    <div\n      *ngFor=\"let btn of left\"\n      class=\"{{ prefixCls }}-btn {{ btn.className }}\"\n      [ngStyle]=\"btn.style\"\n      role=\"button\"\n      (click)=\"onBtnClick($event, btn)\"\n    >\n      <div class=\"{{ prefixCls }}-btn-text\">\n        {{ btn.text || 'Click' }}\n      </div>\n    </div>\n  </div>\n  <div *ngIf=\"right && right.length > 0\" class=\"{{ prefixCls }}-actions {{ prefixCls }}-actions-right\" #rightBtnRef>\n    <div\n      *ngFor=\"let btn of right\"\n      class=\"{{ prefixCls }}-btn {{ btn.className }}\"\n      [ngStyle]=\"btn.style\"\n      role=\"button\"\n      (click)=\"onBtnClick($event, btn)\"\n    >\n      <div class=\"{{ prefixCls }}-btn-text\">\n        {{ btn.text || 'Click' }}\n      </div>\n    </div>\n  </div>\n  <div\n    class=\"{{ prefixCls }}-content\"\n    #contentRef\n    (touchstart)=\"onTouchStart($event)\"\n    (touchmove)=\"onTouchMove($event)\"\n    (touchend)=\"onTouchEnd($event)\"\n  >\n    <ng-template [ngTemplateOutlet]=\"content\"></ng-template>\n  </div>\n</div>\n<div *ngIf=\"!((left.length != 0 || right.length != 0) && !disabled)\" class=\"{{ prefixCls }}-content\" #contentRef>\n  <ng-template [ngTemplateOutlet]=\"content\"></ng-template>\n</div>\n\n<ng-template #content>\n  <ng-content></ng-content>\n</ng-template>\n",
                    encapsulation: ViewEncapsulation.None
                }] }
    ];
    /** @nocollapse */
    SwipeActionComponent.ctorParameters = function () { return []; };
    SwipeActionComponent.propDecorators = {
        leftBtnRef: [{ type: ViewChild, args: ['leftBtnRef', { static: false },] }],
        rightBtnRef: [{ type: ViewChild, args: ['rightBtnRef', { static: false },] }],
        content: [{ type: ViewChild, args: ['contentRef', { static: false },] }],
        cover: [{ type: ViewChild, args: ['coverRef', { static: false },] }],
        left: [{ type: Input }],
        right: [{ type: Input }],
        autoClose: [{ type: Input }],
        disabled: [{ type: Input }],
        onOpen: [{ type: Output }],
        onClose: [{ type: Output }]
    };
    return SwipeActionComponent;
}());
if (false) {
    /** @type {?} */
    SwipeActionComponent.prototype.prefixCls;
    /** @type {?} */
    SwipeActionComponent.prototype.wrapCls;
    /**
     * @type {?}
     * @private
     */
    SwipeActionComponent.prototype._swiping;
    /**
     * @type {?}
     * @private
     */
    SwipeActionComponent.prototype._openedLeft;
    /**
     * @type {?}
     * @private
     */
    SwipeActionComponent.prototype._openedRight;
    /**
     * @type {?}
     * @private
     */
    SwipeActionComponent.prototype._btnsLeftWidth;
    /**
     * @type {?}
     * @private
     */
    SwipeActionComponent.prototype._btnsRightWidth;
    /**
     * @type {?}
     * @private
     */
    SwipeActionComponent.prototype._needShowLeft;
    /**
     * @type {?}
     * @private
     */
    SwipeActionComponent.prototype._needShowRight;
    /**
     * @type {?}
     * @private
     */
    SwipeActionComponent.prototype._startX;
    /** @type {?} */
    SwipeActionComponent.prototype.leftBtnRef;
    /** @type {?} */
    SwipeActionComponent.prototype.rightBtnRef;
    /** @type {?} */
    SwipeActionComponent.prototype.content;
    /** @type {?} */
    SwipeActionComponent.prototype.cover;
    /** @type {?} */
    SwipeActionComponent.prototype.left;
    /** @type {?} */
    SwipeActionComponent.prototype.right;
    /** @type {?} */
    SwipeActionComponent.prototype.autoClose;
    /** @type {?} */
    SwipeActionComponent.prototype.disabled;
    /** @type {?} */
    SwipeActionComponent.prototype.onOpen;
    /** @type {?} */
    SwipeActionComponent.prototype.onClose;
    /** @type {?} */
    SwipeActionComponent.prototype.onCloseSwipe;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var SwipeActionModule = /** @class */ (function () {
    function SwipeActionModule() {
    }
    SwipeActionModule.decorators = [
        { type: NgModule, args: [{
                    imports: [CommonModule],
                    exports: [SwipeActionComponent],
                    declarations: [SwipeActionComponent],
                    providers: []
                },] }
    ];
    return SwipeActionModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
/**
 * @record
 */
function Indicator() { }
if (false) {
    /** @type {?|undefined} */
    Indicator.prototype.activate;
    /** @type {?|undefined} */
    Indicator.prototype.deactivate;
    /** @type {?|undefined} */
    Indicator.prototype.release;
    /** @type {?|undefined} */
    Indicator.prototype.finish;
}
var PullToRefreshComponent = /** @class */ (function () {
    function PullToRefreshComponent(ele) {
        this.ele = ele;
        this.transtionCls = {};
        this.style = {
            '-webkit-transform': 'translate3d( 0, 0, 0 )',
            transform: 'translate3d( 0, 0, 0 )'
        };
        this.state = {
            currentState: 'deactivate',
            drag: false
        };
        this._headerIndicator = {
            activate: '松开立即刷新',
            deactivate: '下拉可以刷新',
            release: '刷新中。。。',
            finish: '完成刷新'
        };
        this._footerIndicator = {
            activate: '松开立即刷新',
            deactivate: '上拉可以刷新',
            release: '刷新中。。。',
            finish: '完成刷新'
        };
        this._startTime = 0;
        this._endTime = 0;
        this._endReach = false;
        this._direction = '';
        this._clientHeight = 0;
        this._currentContentHeight = 0;
        this._lastContentOffset = 0;
        this.distanceToRefresh = 25; //触发刷新距离
        //触发刷新距离
        this.damping = 100; // 下拉的最大距离
        // 下拉的最大距离
        this.endReachedRefresh = false;
        this.refreshing = false;
        this.onRefresh = new EventEmitter();
        this.refresh = true;
        this.container = true;
        this.refreshUp = this._direction === 'up' || this._direction === '';
        this.refreshDown = this._direction === 'down' || this._direction === '';
    }
    Object.defineProperty(PullToRefreshComponent.prototype, "direction", {
        get: /**
         * @return {?}
         */
        function () {
            return this._direction;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            this._direction = value;
            this.refreshUp = this._direction === 'up' || this._direction === '';
            this.refreshDown = this._direction === 'down' || this._direction === '';
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PullToRefreshComponent.prototype, "headerIndicator", {
        get: /**
         * @return {?}
         */
        function () {
            return this._headerIndicator;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            Object.assign(this._headerIndicator, value);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(PullToRefreshComponent.prototype, "footerIndicator", {
        get: /**
         * @return {?}
         */
        function () {
            return this._footerIndicator;
        },
        set: /**
         * @param {?} value
         * @return {?}
         */
        function (value) {
            Object.assign(this._footerIndicator, value);
        },
        enumerable: true,
        configurable: true
    });
    /**
     * @param {?} e
     * @return {?}
     */
    PullToRefreshComponent.prototype.touchstart = /**
     * @param {?} e
     * @return {?}
     */
    function (e) {
        this._startTime = Date.now();
        if (this._direction === 'down' || (this._direction === '' && !this._endReach)) {
            if (this.ele.nativeElement.scrollTop > 0) {
                this.startY = undefined;
                return;
            }
            this.startY = e && e.changedTouches && e.changedTouches[0] && e.changedTouches[0].clientY;
            this.state.drag = undefined;
        }
        else {
            this.startY = e && e.changedTouches && e.changedTouches[0] && e.changedTouches[0].clientY;
            this._clientHeight = this._pullToRefresh.element.nativeElement.clientHeight;
            this._currentContentHeight = document.getElementsByTagName('pulltorefresh')[0].clientHeight;
        }
        this.transtionCls = '';
    };
    /**
     * @param {?} e
     * @return {?}
     */
    PullToRefreshComponent.prototype.touchmove = /**
     * @param {?} e
     * @return {?}
     */
    function (e) {
        if (this._direction === 'down' || (this._direction === '' && !this._endReach)) {
            if (this.ele.nativeElement.scrollTop > 0) {
                return;
            }
            /** @type {?} */
            var distanceY = e.changedTouches[0].clientY - this.startY;
            this.state.drag = distanceY >= 0;
            if (this.state.drag) {
                // 禁止滚动
                if (e.cancelable) {
                    e.preventDefault();
                }
            }
            else {
                return;
            }
            if (distanceY > this.damping) {
                //当超过设定阈值是,缓慢增加
                distanceY = (distanceY / (distanceY + this.damping)) * this.damping * 2;
            }
            else if (distanceY < 0) {
                distanceY = 0;
            }
            if (distanceY > this.distanceToRefresh) {
                this.state.currentState = 'activate';
                if (this._ngModelOnChange) {
                    this._ngModelOnChange(this.state);
                }
            }
            this.style = {
                '-webkit-transform': 'translate3d( 0, ' + distanceY + 'px, 0 )',
                transform: 'translate3d( 0, ' + distanceY + 'px, 0 )'
            };
        }
        else {
            /** @type {?} */
            var distanceY = e.changedTouches[0].clientY - this.startY;
            //向上拉动的时候,如果当前窗口内容没有滚到最后,则不实现拖动的动作;向下滚动不实现拖动动作
            if (Math.abs(this._lastContentOffset) < this._clientHeight - this._currentContentHeight - this.distanceToRefresh ||
                distanceY > 0) {
                // 滚动
                this.state.drag = false;
            }
            else {
                // 上拉
                this.state.drag = true;
            }
            if (this.state.drag) {
                // 禁止滚动
                if (e.cancelable) {
                    e.preventDefault();
                }
            }
            else {
                return;
            }
            //如果滑动到底部了,滑动距离随着拉动的距离增加缓慢增加
            distanceY = -(distanceY / (distanceY - this.damping)) * this.damping;
            if (Math.abs(distanceY) > this.distanceToRefresh) {
                this.state.currentState = 'activate';
                if (this._ngModelOnChange) {
                    this._ngModelOnChange(this.state);
                }
            }
            this.style = {
                '-webkit-transform': 'translate3d( 0, ' + distanceY + 'px, 0 )',
                transform: 'translate3d( 0, ' + distanceY + 'px, 0 )'
            };
        }
    };
    /**
     * @param {?} e
     * @return {?}
     */
    PullToRefreshComponent.prototype.touchend = /**
     * @param {?} e
     * @return {?}
     */
    function (e) {
        var _this = this;
        if (!this.startY || this.state.drag === false) {
            return;
        }
        /** @type {?} */
        var distanceY = e.changedTouches[0].clientY - this.startY;
        if (Math.abs(distanceY) >= this.distanceToRefresh) {
            this.state.currentState = 'release';
            if (this._direction === 'down' || (this._direction === '' && !this._endReach)) {
                this.translateY(this.distanceToRefresh + 1);
            }
            else {
                this.translateY(-this.distanceToRefresh - 1);
            }
            if (this._ngModelOnChange) {
                this._ngModelOnChange(this.state);
            }
            setTimeout((/**
             * @return {?}
             */
            function () {
                _this.state.currentState = 'finish';
                if (_this._ngModelOnChange) {
                    _this._ngModelOnChange(_this.state);
                }
                if (_this._direction === 'down' || (_this._direction === '' && !_this._endReach)) {
                    _this.onRefresh.emit('down');
                }
                else {
                    _this.translateY(-_this.distanceToRefresh - 1);
                    _this.onRefresh.emit('up');
                }
                setTimeout((/**
                 * @return {?}
                 */
                function () {
                    _this.state.currentState = 'deactivate';
                    if (_this._ngModelOnChange) {
                        _this._ngModelOnChange(_this.state);
                    }
                    _this.translateY(0);
                }), 0);
            }), 500);
        }
        else {
            this.translateY(0);
        }
    };
    /**
     * @return {?}
     */
    PullToRefreshComponent.prototype.touchcancel = /**
     * @return {?}
     */
    function () {
        this.translateY(0);
    };
    /**
     * @param {?} evt
     * @return {?}
     */
    PullToRefreshComponent.prototype.scroll = /**
     * @param {?} evt
     * @return {?}
     */
    function (evt) {
        var _this = this;
        this._endTime = Date.now();
        /** @type {?} */
        var contentOffset = evt.target.scrollTop;
        this._lastContentOffset = contentOffset;
        if (this._direction === '') {
            if (contentOffset > 0 &&
                evt.target.scrollTop + this.ele.nativeElement.clientHeight === evt.target.scrollHeight) {
                setTimeout((/**
                 * @return {?}
                 */
                function () {
                    _this._endReach = true;
                }), 100);
            }
            else {
                this._endReach = false;
            }
        }
        if (!this.endReachedRefresh || this._direction !== 'down') {
            return;
        }
        if (contentOffset > 0 &&
            evt.target.scrollTop + this.ele.nativeElement.clientHeight > evt.target.scrollHeight - this.distanceToRefresh &&
            this._endTime - this._startTime >= 100) {
            this._startTime = this._endTime;
            if (this.refreshing) {
                this.state.currentState = 'release';
                if (this._ngModelOnChange) {
                    this._ngModelOnChange(this.state);
                }
            }
            setTimeout((/**
             * @return {?}
             */
            function () {
                if (_this.endReachedRefresh) {
                    _this.onRefresh.emit('endReachedRefresh');
                }
                if (_this.refreshing) {
                    _this.state.currentState = 'finish';
                    if (_this._ngModelOnChange) {
                        _this._ngModelOnChange(_this.state);
                    }
                }
            }), 500);
        }
        else {
            setTimeout((/**
             * @return {?}
             */
            function () {
                if (_this.refreshing) {
                    _this.state.currentState = 'finish';
                    if (_this._ngModelOnChange) {
                        _this._ngModelOnChange(_this.state);
                    }
                }
            }), 500);
        }
    };
    /**
     * @param {?} value
     * @return {?}
     */
    PullToRefreshComponent.prototype.isTemplateRef = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        return value instanceof TemplateRef;
    };
    /**
     * @param {?} distanceY
     * @return {?}
     */
    PullToRefreshComponent.prototype.translateY = /**
     * @param {?} distanceY
     * @return {?}
     */
    function (distanceY) {
        this.transtionCls = 'am-pull-to-refresh-transition';
        this.style = {
            '-webkit-transform': 'translate3d( 0, ' + distanceY + 'px, 0 )',
            transform: 'translate3d( 0, ' + distanceY + 'px, 0 )'
        };
    };
    /**
     * @param {?} value
     * @return {?}
     */
    PullToRefreshComponent.prototype.writeValue = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        if (value !== null) {
            this.state = value;
        }
    };
    /**
     * @param {?} fn
     * @return {?}
     */
    PullToRefreshComponent.prototype.registerOnChange = /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) {
        this._ngModelOnChange = fn;
    };
    /**
     * @param {?} fn
     * @return {?}
     */
    PullToRefreshComponent.prototype.registerOnTouched = /**
     * @param {?} fn
     * @return {?}
     */
    function (fn) {
        this._ngModelOnTouched = fn;
    };
    PullToRefreshComponent.decorators = [
        { type: Component, args: [{
                    selector: 'PullToRefresh, nzm-pull-to-refresh',
                    template: "<div class=\"am-pull-to-refresh-content-wrapper\">\n  <div class=\"am-pull-to-refresh-content\" [ngClass]=\"transtionCls\" [ngStyle]=\"style\">\n    <div\n      *ngIf=\"refreshDown\"\n      class=\"am-pull-to-refresh-indicator am-pull-to-refresh-header-indicator\"\n    >\n      <ng-template\n        *ngIf=\"isTemplateRef(headerIndicator[state.currentState])\"\n        [ngTemplateOutlet]=\"headerIndicator[state.currentState]\"\n      ></ng-template>\n      <ng-container *ngIf=\"!isTemplateRef(headerIndicator[state.currentState])\">{{\n        headerIndicator[state.currentState]\n      }}</ng-container>\n    </div>\n    <div #pullToRefresh>\n      <ng-content></ng-content>\n      <div\n        *ngIf=\"direction === 'down' && endReachedRefresh\"\n        class=\"am-pull-to-refresh-indicator am-pull-to-refresh-footer-indicator\"\n      >\n        <ng-template\n          *ngIf=\"isTemplateRef(footerIndicator[state.currentState])\"\n          [ngTemplateOutlet]=\"footerIndicator[state.currentState]\"\n        ></ng-template>\n        <ng-container *ngIf=\"!isTemplateRef(footerIndicator[state.currentState])\">{{\n          footerIndicator[state.currentState]\n        }}</ng-container>\n      </div>\n    </div>\n    <div\n      *ngIf=\"refreshUp\"\n      class=\"am-pull-to-refresh-indicator am-pull-to-refresh-footer-indicator\"\n    >\n      <ng-template\n        *ngIf=\"isTemplateRef(footerIndicator[state.currentState])\"\n        [ngTemplateOutlet]=\"footerIndicator[state.currentState]\"\n      ></ng-template>\n      <ng-container *ngIf=\"!isTemplateRef(footerIndicator[state.currentState])\">{{\n        footerIndicator[state.currentState]\n      }}</ng-container>\n    </div>\n  </div>\n</div>\n",
                    encapsulation: ViewEncapsulation.None,
                    providers: [
                        {
                            provide: NG_VALUE_ACCESSOR,
                            useExisting: forwardRef((/**
                             * @return {?}
                             */
                            function () { return PullToRefreshComponent; })),
                            multi: true
                        }
                    ]
                }] }
    ];
    /** @nocollapse */
    PullToRefreshComponent.ctorParameters = function () { return [
        { type: ElementRef }
    ]; };
    PullToRefreshComponent.propDecorators = {
        _pullToRefresh: [{ type: ViewChild, args: ['pullToRefresh', { read: ViewContainerRef, static: true },] }],
        distanceToRefresh: [{ type: Input }],
        damping: [{ type: Input }],
        endReachedRefresh: [{ type: Input }],
        refreshing: [{ type: Input }],
        direction: [{ type: Input }],
        headerIndicator: [{ type: Input }],
        footerIndicator: [{ type: Input }],
        onRefresh: [{ type: Output }],
        refresh: [{ type: HostBinding, args: ['class.am-pull-to-refresh',] }],
        container: [{ type: HostBinding, args: ['class.super-container',] }],
        refreshUp: [{ type: HostBinding, args: ['class.am-pull-to-refresh-up',] }],
        refreshDown: [{ type: HostBinding, args: ['class.am-pull-to-refresh-down',] }],
        touchstart: [{ type: HostListener, args: ['touchstart', ['$event'],] }],
        touchmove: [{ type: HostListener, args: ['touchmove', ['$event'],] }],
        touchend: [{ type: HostListener, args: ['touchend', ['$event'],] }],
        touchcancel: [{ type: HostListener, args: ['touchcancel',] }],
        scroll: [{ type: HostListener, args: ['scroll', ['$event'],] }]
    };
    return PullToRefreshComponent;
}());
if (false) {
    /** @type {?} */
    PullToRefreshComponent.prototype.transtionCls;
    /** @type {?} */
    PullToRefreshComponent.prototype.style;
    /** @type {?} */
    PullToRefreshComponent.prototype.startY;
    /** @type {?} */
    PullToRefreshComponent.prototype.state;
    /**
     * @type {?}
     * @private
     */
    PullToRefreshComponent.prototype._headerIndicator;
    /**
     * @type {?}
     * @private
     */
    PullToRefreshComponent.prototype._footerIndicator;
    /**
     * @type {?}
     * @private
     */
    PullToRefreshComponent.prototype._startTime;
    /**
     * @type {?}
     * @private
     */
    PullToRefreshComponent.prototype._endTime;
    /**
     * @type {?}
     * @private
     */
    PullToRefreshComponent.prototype._endReach;
    /**
     * @type {?}
     * @private
     */
    PullToRefreshComponent.prototype._direction;
    /**
     * @type {?}
     * @private
     */
    PullToRefreshComponent.prototype._clientHeight;
    /**
     * @type {?}
     * @private
     */
    PullToRefreshComponent.prototype._currentContentHeight;
    /**
     * @type {?}
     * @private
     */
    PullToRefreshComponent.prototype._lastContentOffset;
    /**
     * @type {?}
     * @private
     */
    PullToRefreshComponent.prototype._ngModelOnChange;
    /**
     * @type {?}
     * @private
     */
    PullToRefreshComponent.prototype._ngModelOnTouched;
    /**
     * @type {?}
     * @private
     */
    PullToRefreshComponent.prototype._pullToRefresh;
    /** @type {?} */
    PullToRefreshComponent.prototype.distanceToRefresh;
    /** @type {?} */
    PullToRefreshComponent.prototype.damping;
    /** @type {?} */
    PullToRefreshComponent.prototype.endReachedRefresh;
    /** @type {?} */
    PullToRefreshComponent.prototype.refreshing;
    /** @type {?} */
    PullToRefreshComponent.prototype.onRefresh;
    /** @type {?} */
    PullToRefreshComponent.prototype.refresh;
    /** @type {?} */
    PullToRefreshComponent.prototype.container;
    /** @type {?} */
    PullToRefreshComponent.prototype.refreshUp;
    /** @type {?} */
    PullToRefreshComponent.prototype.refreshDown;
    /**
     * @type {?}
     * @private
     */
    PullToRefreshComponent.prototype.ele;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var PullToRefreshModule = /** @class */ (function () {
    function PullToRefreshModule() {
    }
    PullToRefreshModule.decorators = [
        { type: NgModule, args: [{
                    imports: [CommonModule, IconModule, FormsModule, ReactiveFormsModule],
                    exports: [PullToRefreshComponent],
                    declarations: [PullToRefreshComponent]
                },] }
    ];
    return PullToRefreshModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
var NgZorroAntdMobileModule = /** @class */ (function () {
    function NgZorroAntdMobileModule() {
    }
    /**
     * @return {?}
     */
    NgZorroAntdMobileModule.forRoot = /**
     * @return {?}
     */
    function () {
        return {
            ngModule: NgZorroAntdMobileModule
        };
    };
    NgZorroAntdMobileModule.decorators = [
        { type: NgModule, args: [{
                    providers: [],
                    exports: [
                        ActivityIndicatorModule,
                        CardModule,
                        TabsModule,
                        TabBarModule,
                        ButtonModule,
                        SwitchModule,
                        SearchBarModule,
                        StepperModule,
                        StepsModule,
                        CheckboxModule,
                        ProgressModule,
                        SegmentedControlModule,
                        BadgeModule,
                        CarouselModule,
                        ActionSheetModule,
                        AccordionModule,
                        NoticeBarModule,
                        IconModule,
                        ToastModule,
                        RadioModule,
                        ModalModule,
                        PopoverModule,
                        PopoverItemModule,
                        NavBarModule,
                        ListModule,
                        CalendarModule,
                        InputItemModule,
                        FlexModule,
                        GridModule,
                        RangeModule,
                        SliderModule,
                        TextareaItemModule,
                        NgZorroAntdMobilePipesModule,
                        PickerModule,
                        PickerViewModule,
                        ImagePickerModule,
                        ResultModule,
                        WhiteSpaceModule,
                        WingBlankModule,
                        LocaleProviderModule,
                        NgZorroAntdMobilePipesModule,
                        PaginationModule,
                        TagModule,
                        MenuModule,
                        DatePickerModule,
                        DatePickerViewModule,
                        DrawerModule,
                        PullToRefreshModule,
                        SwipeActionModule
                    ]
                },] }
    ];
    return NgZorroAntdMobileModule;
}());

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

export { AccordionComponent, AccordionGroupComponent, AccordionModule, AccordionService, Action, ActionSheetService as ActionSheet, ActionSheetComponent, ActionSheetModule, ActionSheetOptions, ActionSheetRef, ActionSheetService, ActionSheetWithOptions, ActivityIndicatorComponent, ActivityIndicatorModule, AgreeItemComponent, AlertOptions, BadgeComponent, BadgeModule, BriefComponent, ButtonComponent, ButtonModule, CalendarComponent, CalendarConfirmPanelComponent, CalendarDatePickerComponent, CalendarHeaderComponent, CalendarModule, CalendarShortcutPanelComponent, CalendarSingleMonthComponent, CalendarTimePickerComponent, CalendarWeekPanelComponent, CardBodyComponent, CardComponent, CardFooterComponent, CardHeaderComponent, CardModule, CarouselComponent, CarouselModule, CarouselSlideComponent, CheckboxComponent, CheckboxItemComponent, CheckboxModule, CustomInputComponent, CustomInputService, CustomKeyboardComponent, DateModels, DatePickerComponent, DatePickerDirective, DatePickerModule, DatePickerOptions, DatePickerViewComponent, DatePickerViewModule, DefaultTabBarComponent, DotIndicatorComponent, DrawerComponent, DrawerModule, FlexComponent, FlexItemComponent, FlexModule, GridComponent, GridModule, IconComponent, IconModule, ImagePickerComponent, ImagePickerModule, InputItemComponent, InputItemModule, LOCAL_PROVIDER_TOKEN, ListComponent, ListItemComponent, ListModule, LocaleProviderModule, LocaleProviderPipe, LocaleProviderService, MenuComponent, MenuModule, ModalService as Modal, ModalBaseOptions, ModalComponent, ModalModule, ModalOptions, ModalRef, ModalService, ModalServiceComponent, NavBarComponent, NavBarModule, NgZorroAntdMobileModule, NgZorroAntdMobilePipesModule, NoticeBarComponent, NoticeBarModule, PaginationComponent, PaginationModule, PickerService as Picker, PickerComponent, PickerDirective, PickerModule, PickerOptions, PickerRef, PickerService, PickerViewComponent, PickerViewModule, PopoverComponent, PopoverComponentOptions, PopoverDirective, PopoverItemComponent, PopoverItemModule, PopoverModule, PopoverOptions, PopoverOptionsFactory, ProgressComponent, ProgressModule, PullToRefreshComponent, PullToRefreshModule, RadioComponent, RadioItemComponent, RadioItemGroupComponent, RadioModule, RangeComponent, RangeModule, ResultComponent, ResultModule, SafeHTMLPipe, SearchBarComponent, SearchBarModule, SegmentedControlComponent, SegmentedControlModule, ShareActionSheetWithOptions, ShareOption, SliderComponent, SliderHandleComponent, SliderMarksComponent, SliderModule, SliderStepsComponent, SliderTrackComponent, StepComponent, StepDirectionEnum, StepStatusEnum, StepperComponent, StepperModule, StepsComponent, StepsModule, SubMenuComponent, SwipeActionComponent, SwipeActionModule, SwitchComponent, SwitchModule, TabBarComponent, TabBarItemComponent, TabBarModule, TabPaneBodyComponent, TabPaneComponent, TabsComponent, TabsModule, TagComponent, TagModule, TextareaItemComponent, TextareaItemModule, ToastService as Toast, ToastComponent, ToastModule, ToastOptions, ToastService, WhiteSpaceComponent, WhiteSpaceModule, WingBlankComponent, WingBlankModule, da_DK, en_US, formatDate, mergeDateTime, ru_RU, sv_SE, zh_CN, RADIO_ITEM_GROUP_VALUE_ACCESSOR as ɵa, NZ_BUTTON_DIRECTIVES as ɵb, LOCALE_PROVIDER_SERVICE_FACTORY as ɵc, LOCALE_PROVIDER_SERVICE_PROVIDER as ɵd, IconHandler as ɵe, PopupService as ɵf, CalendarDatePickerBaseComponent as ɵg, TouchFeedbackModule as ɵh, TouchFeedbackDirective as ɵi };
//# sourceMappingURL=ng-zorro-antd-mobile.js.map