(function (global, factory) {
    typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/cdk/platform'), require('@angular/common'), require('@angular/core'), require('ng-zorro-antd/core'), require('rxjs'), require('@angular/cdk/layout'), require('rxjs/operators')) :
    typeof define === 'function' && define.amd ? define('ng-zorro-antd/descriptions', ['exports', '@angular/cdk/platform', '@angular/common', '@angular/core', 'ng-zorro-antd/core', 'rxjs', '@angular/cdk/layout', 'rxjs/operators'], factory) :
    (global = global || self, factory((global['ng-zorro-antd'] = global['ng-zorro-antd'] || {}, global['ng-zorro-antd'].descriptions = {}), global.ng.cdk.platform, global.ng.common, global.ng.core, global['ng-zorro-antd'].core, global.rxjs, global.ng.cdk.layout, global.rxjs.operators));
}(this, (function (exports, platform, common, core, core$1, rxjs, layout, operators) { 'use strict';

    /*! *****************************************************************************
    Copyright (c) Microsoft Corporation. All rights reserved.
    Licensed under the Apache License, Version 2.0 (the "License"); you may not use
    this file except in compliance with the License. You may obtain a copy of the
    License at http://www.apache.org/licenses/LICENSE-2.0

    THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
    WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
    MERCHANTABLITY OR NON-INFRINGEMENT.

    See the Apache Version 2.0 License for specific language governing permissions
    and limitations under the License.
    ***************************************************************************** */
    /* global Reflect, Promise */

    var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };

    function __extends(d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    }

    var __assign = function() {
        __assign = Object.assign || function __assign(t) {
            for (var s, i = 1, n = arguments.length; i < n; i++) {
                s = arguments[i];
                for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
            }
            return t;
        };
        return __assign.apply(this, arguments);
    };

    function __rest(s, e) {
        var t = {};
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
            t[p] = s[p];
        if (s != null && typeof Object.getOwnPropertySymbols === "function")
            for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
                if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
                    t[p[i]] = s[p[i]];
            }
        return t;
    }

    function __decorate(decorators, target, key, desc) {
        var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
        if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
        else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }

    function __param(paramIndex, decorator) {
        return function (target, key) { decorator(target, key, paramIndex); }
    }

    function __metadata(metadataKey, metadataValue) {
        if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
    }

    function __awaiter(thisArg, _arguments, P, generator) {
        function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
        return new (P || (P = Promise))(function (resolve, reject) {
            function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
            function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
            function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
            step((generator = generator.apply(thisArg, _arguments || [])).next());
        });
    }

    function __generator(thisArg, body) {
        var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
        return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
        function verb(n) { return function (v) { return step([n, v]); }; }
        function step(op) {
            if (f) throw new TypeError("Generator is already executing.");
            while (_) try {
                if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
                if (y = 0, t) op = [op[0] & 2, t.value];
                switch (op[0]) {
                    case 0: case 1: t = op; break;
                    case 4: _.label++; return { value: op[1], done: false };
                    case 5: _.label++; y = op[1]; op = [0]; continue;
                    case 7: op = _.ops.pop(); _.trys.pop(); continue;
                    default:
                        if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                        if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                        if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                        if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                        if (t[2]) _.ops.pop();
                        _.trys.pop(); continue;
                }
                op = body.call(thisArg, _);
            } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
            if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
        }
    }

    function __exportStar(m, exports) {
        for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
    }

    function __values(o) {
        var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
        if (m) return m.call(o);
        if (o && typeof o.length === "number") return {
            next: function () {
                if (o && i >= o.length) o = void 0;
                return { value: o && o[i++], done: !o };
            }
        };
        throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
    }

    function __read(o, n) {
        var m = typeof Symbol === "function" && o[Symbol.iterator];
        if (!m) return o;
        var i = m.call(o), r, ar = [], e;
        try {
            while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
        }
        catch (error) { e = { error: error }; }
        finally {
            try {
                if (r && !r.done && (m = i["return"])) m.call(i);
            }
            finally { if (e) throw e.error; }
        }
        return ar;
    }

    function __spread() {
        for (var ar = [], i = 0; i < arguments.length; i++)
            ar = ar.concat(__read(arguments[i]));
        return ar;
    }

    function __spreadArrays() {
        for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
        for (var r = Array(s), k = 0, i = 0; i < il; i++)
            for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
                r[k] = a[j];
        return r;
    };

    function __await(v) {
        return this instanceof __await ? (this.v = v, this) : new __await(v);
    }

    function __asyncGenerator(thisArg, _arguments, generator) {
        if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
        var g = generator.apply(thisArg, _arguments || []), i, q = [];
        return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
        function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
        function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
        function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
        function fulfill(value) { resume("next", value); }
        function reject(value) { resume("throw", value); }
        function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
    }

    function __asyncDelegator(o) {
        var i, p;
        return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
        function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
    }

    function __asyncValues(o) {
        if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
        var m = o[Symbol.asyncIterator], i;
        return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
        function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
        function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
    }

    function __makeTemplateObject(cooked, raw) {
        if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
        return cooked;
    };

    function __importStar(mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
        result.default = mod;
        return result;
    }

    function __importDefault(mod) {
        return (mod && mod.__esModule) ? mod : { default: mod };
    }

    function __classPrivateFieldGet(receiver, privateMap) {
        if (!privateMap.has(receiver)) {
            throw new TypeError("attempted to get private field on non-instance");
        }
        return privateMap.get(receiver);
    }

    function __classPrivateFieldSet(receiver, privateMap, value) {
        if (!privateMap.has(receiver)) {
            throw new TypeError("attempted to set private field on non-instance");
        }
        privateMap.set(receiver, value);
        return value;
    }

    function NzDescriptionsItemComponent_ng_template_0_Template(rf, ctx) { if (rf & 1) {
        core["ɵɵprojection"](0);
    } }
    var _c0 = ["*"];
    var NzDescriptionsItemComponent = /** @class */ (function () {
        function NzDescriptionsItemComponent() {
            this.nzSpan = 1;
            this.nzTitle = '';
            this.inputChange$ = new rxjs.Subject();
        }
        NzDescriptionsItemComponent.prototype.ngOnChanges = function () {
            this.inputChange$.next();
        };
        NzDescriptionsItemComponent.prototype.ngOnDestroy = function () {
            this.inputChange$.complete();
        };
        /** @nocollapse */ NzDescriptionsItemComponent.ɵfac = function NzDescriptionsItemComponent_Factory(t) { return new (t || NzDescriptionsItemComponent)(); };
        /** @nocollapse */ NzDescriptionsItemComponent.ɵcmp = core["ɵɵdefineComponent"]({ type: NzDescriptionsItemComponent, selectors: [["nz-descriptions-item"]], viewQuery: function NzDescriptionsItemComponent_Query(rf, ctx) { if (rf & 1) {
                core["ɵɵstaticViewQuery"](core.TemplateRef, true);
            } if (rf & 2) {
                var _t;
                core["ɵɵqueryRefresh"](_t = core["ɵɵloadQuery"]()) && (ctx.content = _t.first);
            } }, inputs: { nzSpan: "nzSpan", nzTitle: "nzTitle" }, exportAs: ["nzDescriptionsItem"], features: [core["ɵɵNgOnChangesFeature"]], ngContentSelectors: _c0, decls: 1, vars: 0, template: function NzDescriptionsItemComponent_Template(rf, ctx) { if (rf & 1) {
                core["ɵɵprojectionDef"]();
                core["ɵɵtemplate"](0, NzDescriptionsItemComponent_ng_template_0_Template, 1, 0, "ng-template");
            } }, encapsulation: 2, changeDetection: 0 });
        __decorate([
            core$1.InputNumber(),
            __metadata("design:type", Object)
        ], NzDescriptionsItemComponent.prototype, "nzSpan", void 0);
        return NzDescriptionsItemComponent;
    }());
    /*@__PURE__*/ (function () { core["ɵsetClassMetadata"](NzDescriptionsItemComponent, [{
            type: core.Component,
            args: [{
                    changeDetection: core.ChangeDetectionStrategy.OnPush,
                    encapsulation: core.ViewEncapsulation.None,
                    selector: 'nz-descriptions-item',
                    template: "\n    <ng-template>\n      <ng-content></ng-content>\n    </ng-template>\n  ",
                    exportAs: 'nzDescriptionsItem',
                    preserveWhitespaces: false
                }]
        }], null, { content: [{
                type: core.ViewChild,
                args: [core.TemplateRef, { static: true }]
            }], nzSpan: [{
                type: core.Input
            }], nzTitle: [{
                type: core.Input
            }] }); })();

    function NzDescriptionsComponent_div_0_ng_container_1_Template(rf, ctx) { if (rf & 1) {
        core["ɵɵelementContainerStart"](0);
        core["ɵɵtext"](1);
        core["ɵɵelementContainerEnd"]();
    } if (rf & 2) {
        var ctx_r223 = core["ɵɵnextContext"](2);
        core["ɵɵadvance"](1);
        core["ɵɵtextInterpolate"](ctx_r223.nzTitle);
    } }
    function NzDescriptionsComponent_div_0_Template(rf, ctx) { if (rf & 1) {
        core["ɵɵelementStart"](0, "div", 3);
        core["ɵɵtemplate"](1, NzDescriptionsComponent_div_0_ng_container_1_Template, 2, 1, "ng-container", 4);
        core["ɵɵelementEnd"]();
    } if (rf & 2) {
        var ctx_r220 = core["ɵɵnextContext"]();
        core["ɵɵadvance"](1);
        core["ɵɵproperty"]("nzStringTemplateOutlet", ctx_r220.nzTitle);
    } }
    function NzDescriptionsComponent_ng_container_4_tr_1_ng_container_1_ng_container_1_ng_template_5_Template(rf, ctx) { }
    function NzDescriptionsComponent_ng_container_4_tr_1_ng_container_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
        core["ɵɵelementContainerStart"](0);
        core["ɵɵelementStart"](1, "td", 8);
        core["ɵɵelementStart"](2, "span", 9);
        core["ɵɵtext"](3);
        core["ɵɵelementEnd"]();
        core["ɵɵelementStart"](4, "span", 10);
        core["ɵɵtemplate"](5, NzDescriptionsComponent_ng_container_4_tr_1_ng_container_1_ng_container_1_ng_template_5_Template, 0, 0, "ng-template", 11);
        core["ɵɵelementEnd"]();
        core["ɵɵelementEnd"]();
        core["ɵɵelementContainerEnd"]();
    } if (rf & 2) {
        var item_r228 = core["ɵɵnextContext"]().$implicit;
        var ctx_r230 = core["ɵɵnextContext"](3);
        core["ɵɵadvance"](1);
        core["ɵɵproperty"]("colSpan", item_r228.span);
        core["ɵɵadvance"](1);
        core["ɵɵclassProp"]("ant-descriptions-item-colon", ctx_r230.nzColon);
        core["ɵɵadvance"](1);
        core["ɵɵtextInterpolate"](item_r228.title);
        core["ɵɵadvance"](2);
        core["ɵɵproperty"]("ngTemplateOutlet", item_r228.content);
    } }
    function NzDescriptionsComponent_ng_container_4_tr_1_ng_container_1_ng_container_2_td_1_Template(rf, ctx) { if (rf & 1) {
        core["ɵɵelementStart"](0, "td", 9);
        core["ɵɵtext"](1);
        core["ɵɵelementEnd"]();
    } if (rf & 2) {
        var item_r228 = core["ɵɵnextContext"](2).$implicit;
        core["ɵɵadvance"](1);
        core["ɵɵtextInterpolate1"](" ", item_r228.title, " ");
    } }
    function NzDescriptionsComponent_ng_container_4_tr_1_ng_container_1_ng_container_2_ng_template_3_Template(rf, ctx) { }
    function NzDescriptionsComponent_ng_container_4_tr_1_ng_container_1_ng_container_2_Template(rf, ctx) { if (rf & 1) {
        core["ɵɵelementContainerStart"](0);
        core["ɵɵtemplate"](1, NzDescriptionsComponent_ng_container_4_tr_1_ng_container_1_ng_container_2_td_1_Template, 2, 1, "td", 12);
        core["ɵɵelementStart"](2, "td", 13);
        core["ɵɵtemplate"](3, NzDescriptionsComponent_ng_container_4_tr_1_ng_container_1_ng_container_2_ng_template_3_Template, 0, 0, "ng-template", 11);
        core["ɵɵelementEnd"]();
        core["ɵɵelementContainerEnd"]();
    } if (rf & 2) {
        var item_r228 = core["ɵɵnextContext"]().$implicit;
        core["ɵɵadvance"](1);
        core["ɵɵproperty"]("nzStringTemplateOutlet", item_r228.title);
        core["ɵɵadvance"](1);
        core["ɵɵproperty"]("colSpan", item_r228.span * 2 - 1);
        core["ɵɵadvance"](1);
        core["ɵɵproperty"]("ngTemplateOutlet", item_r228.content);
    } }
    function NzDescriptionsComponent_ng_container_4_tr_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
        core["ɵɵelementContainerStart"](0);
        core["ɵɵtemplate"](1, NzDescriptionsComponent_ng_container_4_tr_1_ng_container_1_ng_container_1_Template, 6, 5, "ng-container", 2);
        core["ɵɵtemplate"](2, NzDescriptionsComponent_ng_container_4_tr_1_ng_container_1_ng_container_2_Template, 4, 3, "ng-container", 2);
        core["ɵɵelementContainerEnd"]();
    } if (rf & 2) {
        var ctx_r227 = core["ɵɵnextContext"](3);
        core["ɵɵadvance"](1);
        core["ɵɵproperty"]("ngIf", !ctx_r227.nzBordered);
        core["ɵɵadvance"](1);
        core["ɵɵproperty"]("ngIf", ctx_r227.nzBordered);
    } }
    function NzDescriptionsComponent_ng_container_4_tr_1_Template(rf, ctx) { if (rf & 1) {
        core["ɵɵelementStart"](0, "tr", 6);
        core["ɵɵtemplate"](1, NzDescriptionsComponent_ng_container_4_tr_1_ng_container_1_Template, 3, 2, "ng-container", 7);
        core["ɵɵelementEnd"]();
    } if (rf & 2) {
        var row_r225 = ctx.$implicit;
        core["ɵɵadvance"](1);
        core["ɵɵproperty"]("ngForOf", row_r225);
    } }
    function NzDescriptionsComponent_ng_container_4_Template(rf, ctx) { if (rf & 1) {
        core["ɵɵelementContainerStart"](0);
        core["ɵɵtemplate"](1, NzDescriptionsComponent_ng_container_4_tr_1_Template, 2, 1, "tr", 5);
        core["ɵɵelementContainerEnd"]();
    } if (rf & 2) {
        var ctx_r221 = core["ɵɵnextContext"]();
        core["ɵɵadvance"](1);
        core["ɵɵproperty"]("ngForOf", ctx_r221.itemMatrix);
    } }
    function NzDescriptionsComponent_ng_container_5_ng_container_1_ng_container_1_ng_container_2_Template(rf, ctx) { if (rf & 1) {
        core["ɵɵelementContainerStart"](0);
        core["ɵɵelementStart"](1, "td", 8);
        core["ɵɵelementStart"](2, "span", 9);
        core["ɵɵtext"](3);
        core["ɵɵelementEnd"]();
        core["ɵɵelementEnd"]();
        core["ɵɵelementContainerEnd"]();
    } if (rf & 2) {
        var item_r245 = ctx.$implicit;
        var ctx_r243 = core["ɵɵnextContext"](4);
        core["ɵɵadvance"](1);
        core["ɵɵproperty"]("colSpan", item_r245.span);
        core["ɵɵadvance"](1);
        core["ɵɵclassProp"]("ant-descriptions-item-colon", ctx_r243.nzColon);
        core["ɵɵadvance"](1);
        core["ɵɵtextInterpolate"](item_r245.title);
    } }
    function NzDescriptionsComponent_ng_container_5_ng_container_1_ng_container_1_ng_container_4_ng_template_3_Template(rf, ctx) { }
    function NzDescriptionsComponent_ng_container_5_ng_container_1_ng_container_1_ng_container_4_Template(rf, ctx) { if (rf & 1) {
        core["ɵɵelementContainerStart"](0);
        core["ɵɵelementStart"](1, "td", 8);
        core["ɵɵelementStart"](2, "span", 10);
        core["ɵɵtemplate"](3, NzDescriptionsComponent_ng_container_5_ng_container_1_ng_container_1_ng_container_4_ng_template_3_Template, 0, 0, "ng-template", 11);
        core["ɵɵelementEnd"]();
        core["ɵɵelementEnd"]();
        core["ɵɵelementContainerEnd"]();
    } if (rf & 2) {
        var item_r247 = ctx.$implicit;
        core["ɵɵadvance"](1);
        core["ɵɵproperty"]("colSpan", item_r247.span);
        core["ɵɵadvance"](2);
        core["ɵɵproperty"]("ngTemplateOutlet", item_r247.content);
    } }
    function NzDescriptionsComponent_ng_container_5_ng_container_1_ng_container_1_Template(rf, ctx) { if (rf & 1) {
        core["ɵɵelementContainerStart"](0);
        core["ɵɵelementStart"](1, "tr", 6);
        core["ɵɵtemplate"](2, NzDescriptionsComponent_ng_container_5_ng_container_1_ng_container_1_ng_container_2_Template, 4, 4, "ng-container", 7);
        core["ɵɵelementEnd"]();
        core["ɵɵelementStart"](3, "tr", 6);
        core["ɵɵtemplate"](4, NzDescriptionsComponent_ng_container_5_ng_container_1_ng_container_1_ng_container_4_Template, 4, 2, "ng-container", 7);
        core["ɵɵelementEnd"]();
        core["ɵɵelementContainerEnd"]();
    } if (rf & 2) {
        var row_r241 = ctx.$implicit;
        core["ɵɵadvance"](2);
        core["ɵɵproperty"]("ngForOf", row_r241);
        core["ɵɵadvance"](2);
        core["ɵɵproperty"]("ngForOf", row_r241);
    } }
    function NzDescriptionsComponent_ng_container_5_ng_container_1_Template(rf, ctx) { if (rf & 1) {
        core["ɵɵelementContainerStart"](0);
        core["ɵɵtemplate"](1, NzDescriptionsComponent_ng_container_5_ng_container_1_ng_container_1_Template, 5, 2, "ng-container", 7);
        core["ɵɵelementContainerEnd"]();
    } if (rf & 2) {
        var ctx_r238 = core["ɵɵnextContext"](2);
        core["ɵɵadvance"](1);
        core["ɵɵproperty"]("ngForOf", ctx_r238.itemMatrix);
    } }
    function NzDescriptionsComponent_ng_container_5_ng_container_2_ng_container_1_ng_container_2_Template(rf, ctx) { if (rf & 1) {
        core["ɵɵelementContainerStart"](0);
        core["ɵɵelementStart"](1, "td", 14);
        core["ɵɵtext"](2);
        core["ɵɵelementEnd"]();
        core["ɵɵelementContainerEnd"]();
    } if (rf & 2) {
        var item_r255 = ctx.$implicit;
        core["ɵɵadvance"](1);
        core["ɵɵproperty"]("colSpan", item_r255.span);
        core["ɵɵadvance"](1);
        core["ɵɵtextInterpolate1"](" ", item_r255.title, " ");
    } }
    function NzDescriptionsComponent_ng_container_5_ng_container_2_ng_container_1_ng_container_4_ng_template_2_Template(rf, ctx) { }
    function NzDescriptionsComponent_ng_container_5_ng_container_2_ng_container_1_ng_container_4_Template(rf, ctx) { if (rf & 1) {
        core["ɵɵelementContainerStart"](0);
        core["ɵɵelementStart"](1, "td", 13);
        core["ɵɵtemplate"](2, NzDescriptionsComponent_ng_container_5_ng_container_2_ng_container_1_ng_container_4_ng_template_2_Template, 0, 0, "ng-template", 11);
        core["ɵɵelementEnd"]();
        core["ɵɵelementContainerEnd"]();
    } if (rf & 2) {
        var item_r257 = ctx.$implicit;
        core["ɵɵadvance"](1);
        core["ɵɵproperty"]("colSpan", item_r257.span);
        core["ɵɵadvance"](1);
        core["ɵɵproperty"]("ngTemplateOutlet", item_r257.content);
    } }
    function NzDescriptionsComponent_ng_container_5_ng_container_2_ng_container_1_Template(rf, ctx) { if (rf & 1) {
        core["ɵɵelementContainerStart"](0);
        core["ɵɵelementStart"](1, "tr", 6);
        core["ɵɵtemplate"](2, NzDescriptionsComponent_ng_container_5_ng_container_2_ng_container_1_ng_container_2_Template, 3, 2, "ng-container", 7);
        core["ɵɵelementEnd"]();
        core["ɵɵelementStart"](3, "tr", 6);
        core["ɵɵtemplate"](4, NzDescriptionsComponent_ng_container_5_ng_container_2_ng_container_1_ng_container_4_Template, 3, 2, "ng-container", 7);
        core["ɵɵelementEnd"]();
        core["ɵɵelementContainerEnd"]();
    } if (rf & 2) {
        var row_r251 = ctx.$implicit;
        core["ɵɵadvance"](2);
        core["ɵɵproperty"]("ngForOf", row_r251);
        core["ɵɵadvance"](2);
        core["ɵɵproperty"]("ngForOf", row_r251);
    } }
    function NzDescriptionsComponent_ng_container_5_ng_container_2_Template(rf, ctx) { if (rf & 1) {
        core["ɵɵelementContainerStart"](0);
        core["ɵɵtemplate"](1, NzDescriptionsComponent_ng_container_5_ng_container_2_ng_container_1_Template, 5, 2, "ng-container", 7);
        core["ɵɵelementContainerEnd"]();
    } if (rf & 2) {
        var ctx_r239 = core["ɵɵnextContext"](2);
        core["ɵɵadvance"](1);
        core["ɵɵproperty"]("ngForOf", ctx_r239.itemMatrix);
    } }
    function NzDescriptionsComponent_ng_container_5_Template(rf, ctx) { if (rf & 1) {
        core["ɵɵelementContainerStart"](0);
        core["ɵɵtemplate"](1, NzDescriptionsComponent_ng_container_5_ng_container_1_Template, 2, 1, "ng-container", 2);
        core["ɵɵtemplate"](2, NzDescriptionsComponent_ng_container_5_ng_container_2_Template, 2, 1, "ng-container", 2);
        core["ɵɵelementContainerEnd"]();
    } if (rf & 2) {
        var ctx_r222 = core["ɵɵnextContext"]();
        core["ɵɵadvance"](1);
        core["ɵɵproperty"]("ngIf", !ctx_r222.nzBordered);
        core["ɵɵadvance"](1);
        core["ɵɵproperty"]("ngIf", ctx_r222.nzBordered);
    } }
    var NZ_CONFIG_COMPONENT_NAME = 'descriptions';
    var defaultColumnMap = {
        xxl: 3,
        xl: 3,
        lg: 3,
        md: 3,
        sm: 2,
        xs: 1
    };
    var NzDescriptionsComponent = /** @class */ (function () {
        function NzDescriptionsComponent(nzConfigService, cdr, mediaMatcher, platform, nzDomEventService) {
            this.nzConfigService = nzConfigService;
            this.cdr = cdr;
            this.mediaMatcher = mediaMatcher;
            this.platform = platform;
            this.nzDomEventService = nzDomEventService;
            this.nzLayout = 'horizontal';
            this.nzTitle = '';
            this.itemMatrix = [];
            this.realColumn = 3;
            this.destroy$ = new rxjs.Subject();
            this.resize$ = new rxjs.Subject();
        }
        NzDescriptionsComponent.prototype.ngOnChanges = function (changes) {
            if (changes.nzColumn) {
                this.resize$.next();
            }
        };
        NzDescriptionsComponent.prototype.ngAfterContentInit = function () {
            var _this = this;
            var contentChange$ = this.items.changes.pipe(operators.startWith(this.items), operators.takeUntil(this.destroy$));
            rxjs.merge(contentChange$, contentChange$.pipe(operators.switchMap(function () { return rxjs.merge.apply(void 0, __spread(_this.items.map(function (i) { return i.inputChange$; }))).pipe(operators.auditTime(16)); })), this.resize$)
                .pipe(operators.takeUntil(this.destroy$))
                .subscribe(function () {
                _this.prepareMatrix();
                _this.cdr.markForCheck();
            });
            if (this.platform.isBrowser) {
                this.nzDomEventService
                    .registerResizeListener()
                    .pipe(operators.takeUntil(this.destroy$), operators.finalize(function () { return _this.nzDomEventService.unregisterResizeListener(); }))
                    .subscribe(function () { return _this.resize$.next(); });
            }
        };
        NzDescriptionsComponent.prototype.ngOnDestroy = function () {
            this.destroy$.next();
            this.destroy$.complete();
            this.resize$.complete();
        };
        /**
         * Prepare the render matrix according to description items' spans.
         */
        NzDescriptionsComponent.prototype.prepareMatrix = function () {
            var currentRow = [];
            var width = 0;
            var column = (this.realColumn = this.getColumn());
            var items = this.items.toArray();
            var length = items.length;
            var matrix = [];
            var flushRow = function () {
                matrix.push(currentRow);
                currentRow = [];
                width = 0;
            };
            for (var i = 0; i < length; i++) {
                var item = items[i];
                var title = item.nzTitle, content = item.content, span = item.nzSpan;
                width += span;
                // If the last item make the row's length exceeds `nzColumn`, the last
                // item should take all the space left. This logic is implemented in the template.
                // Warn user about that.
                if (width >= column) {
                    if (width > column) {
                        core$1.warn("\"nzColumn\" is " + column + " but we have row length " + width);
                    }
                    currentRow.push({ title: title, content: content, span: column - (width - span) });
                    flushRow();
                }
                else if (i === length - 1) {
                    currentRow.push({ title: title, content: content, span: column - (width - span) });
                    flushRow();
                }
                else {
                    currentRow.push({ title: title, content: content, span: span });
                }
            }
            this.itemMatrix = matrix;
        };
        NzDescriptionsComponent.prototype.matchMedia = function () {
            var _this = this;
            var bp = core$1.NzBreakpointEnum.md;
            Object.keys(core$1.gridResponsiveMap).map(function (breakpoint) {
                var castBP = breakpoint;
                var matchBelow = _this.mediaMatcher.matchMedia(core$1.gridResponsiveMap[castBP]).matches;
                if (matchBelow) {
                    bp = castBP;
                }
            });
            return bp;
        };
        NzDescriptionsComponent.prototype.getColumn = function () {
            if (typeof this.nzColumn !== 'number') {
                return this.nzColumn[this.matchMedia()];
            }
            return this.nzColumn;
        };
        /** @nocollapse */ NzDescriptionsComponent.ɵfac = function NzDescriptionsComponent_Factory(t) { return new (t || NzDescriptionsComponent)(core["ɵɵdirectiveInject"](core$1.NzConfigService), core["ɵɵdirectiveInject"](core.ChangeDetectorRef), core["ɵɵdirectiveInject"](layout.MediaMatcher), core["ɵɵdirectiveInject"](platform.Platform), core["ɵɵdirectiveInject"](core$1.NzDomEventService)); };
        /** @nocollapse */ NzDescriptionsComponent.ɵcmp = core["ɵɵdefineComponent"]({ type: NzDescriptionsComponent, selectors: [["nz-descriptions"]], contentQueries: function NzDescriptionsComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
                core["ɵɵcontentQuery"](dirIndex, NzDescriptionsItemComponent, false);
            } if (rf & 2) {
                var _t;
                core["ɵɵqueryRefresh"](_t = core["ɵɵloadQuery"]()) && (ctx.items = _t);
            } }, hostAttrs: [1, "ant-descriptions"], hostVars: 6, hostBindings: function NzDescriptionsComponent_HostBindings(rf, ctx) { if (rf & 2) {
                core["ɵɵclassProp"]("ant-descriptions-bordered", ctx.nzBordered)("ant-descriptions-middle", ctx.nzSize === "middle")("ant-descriptions-small", ctx.nzSize === "small");
            } }, inputs: { nzBordered: "nzBordered", nzLayout: "nzLayout", nzColumn: "nzColumn", nzSize: "nzSize", nzTitle: "nzTitle", nzColon: "nzColon" }, exportAs: ["nzDescriptions"], features: [core["ɵɵNgOnChangesFeature"]], decls: 6, vars: 3, consts: [["class", "ant-descriptions-title", 4, "ngIf"], [1, "ant-descriptions-view"], [4, "ngIf"], [1, "ant-descriptions-title"], [4, "nzStringTemplateOutlet"], ["class", "ant-descriptions-row", 4, "ngFor", "ngForOf"], [1, "ant-descriptions-row"], [4, "ngFor", "ngForOf"], [1, "ant-descriptions-item", 3, "colSpan"], [1, "ant-descriptions-item-label"], [1, "ant-descriptions-item-content"], [3, "ngTemplateOutlet"], ["class", "ant-descriptions-item-label", 4, "nzStringTemplateOutlet"], [1, "ant-descriptions-item-content", 3, "colSpan"], [1, "ant-descriptions-item-label", 3, "colSpan"]], template: function NzDescriptionsComponent_Template(rf, ctx) { if (rf & 1) {
                core["ɵɵtemplate"](0, NzDescriptionsComponent_div_0_Template, 2, 1, "div", 0);
                core["ɵɵelementStart"](1, "div", 1);
                core["ɵɵelementStart"](2, "table");
                core["ɵɵelementStart"](3, "tbody");
                core["ɵɵtemplate"](4, NzDescriptionsComponent_ng_container_4_Template, 2, 1, "ng-container", 2);
                core["ɵɵtemplate"](5, NzDescriptionsComponent_ng_container_5_Template, 3, 2, "ng-container", 2);
                core["ɵɵelementEnd"]();
                core["ɵɵelementEnd"]();
                core["ɵɵelementEnd"]();
            } if (rf & 2) {
                core["ɵɵproperty"]("ngIf", ctx.nzTitle);
                core["ɵɵadvance"](4);
                core["ɵɵproperty"]("ngIf", ctx.nzLayout === "horizontal");
                core["ɵɵadvance"](1);
                core["ɵɵproperty"]("ngIf", ctx.nzLayout === "vertical");
            } }, directives: [common.NgIf, core$1.NzStringTemplateOutletDirective, common.NgForOf, common.NgTemplateOutlet], styles: ["\n      nz-descriptions {\n        display: block;\n      }\n    "], encapsulation: 2, changeDetection: 0 });
        __decorate([
            core$1.InputBoolean(), core$1.WithConfig(NZ_CONFIG_COMPONENT_NAME, false),
            __metadata("design:type", Boolean)
        ], NzDescriptionsComponent.prototype, "nzBordered", void 0);
        __decorate([
            core$1.WithConfig(NZ_CONFIG_COMPONENT_NAME, defaultColumnMap),
            __metadata("design:type", Object)
        ], NzDescriptionsComponent.prototype, "nzColumn", void 0);
        __decorate([
            core$1.WithConfig(NZ_CONFIG_COMPONENT_NAME, 'default'),
            __metadata("design:type", String)
        ], NzDescriptionsComponent.prototype, "nzSize", void 0);
        __decorate([
            core$1.WithConfig(NZ_CONFIG_COMPONENT_NAME, true), core$1.InputBoolean(),
            __metadata("design:type", Boolean)
        ], NzDescriptionsComponent.prototype, "nzColon", void 0);
        return NzDescriptionsComponent;
    }());
    /*@__PURE__*/ (function () { core["ɵsetClassMetadata"](NzDescriptionsComponent, [{
            type: core.Component,
            args: [{
                    changeDetection: core.ChangeDetectionStrategy.OnPush,
                    encapsulation: core.ViewEncapsulation.None,
                    selector: 'nz-descriptions',
                    exportAs: 'nzDescriptions',
                    preserveWhitespaces: false,
                    template: "\n    <div *ngIf=\"nzTitle\" class=\"ant-descriptions-title\">\n      <ng-container *nzStringTemplateOutlet=\"nzTitle\">{{ nzTitle }}</ng-container>\n    </div>\n    <div class=\"ant-descriptions-view\">\n      <table>\n        <tbody>\n          <ng-container *ngIf=\"nzLayout === 'horizontal'\">\n            <tr class=\"ant-descriptions-row\" *ngFor=\"let row of itemMatrix; let i = index\">\n              <ng-container *ngFor=\"let item of row; let isLast = last\">\n                <!-- Horizontal & NOT Bordered -->\n                <ng-container *ngIf=\"!nzBordered\">\n                  <td class=\"ant-descriptions-item\" [colSpan]=\"item.span\">\n                    <span class=\"ant-descriptions-item-label\" [class.ant-descriptions-item-colon]=\"nzColon\">{{ item.title }}</span>\n                    <span class=\"ant-descriptions-item-content\">\n                      <ng-template [ngTemplateOutlet]=\"item.content\"></ng-template>\n                    </span>\n                  </td>\n                </ng-container>\n                <!-- Horizontal & Bordered -->\n                <ng-container *ngIf=\"nzBordered\">\n                  <td class=\"ant-descriptions-item-label\" *nzStringTemplateOutlet=\"item.title\">\n                    {{ item.title }}\n                  </td>\n                  <td class=\"ant-descriptions-item-content\" [colSpan]=\"item.span * 2 - 1\">\n                    <ng-template [ngTemplateOutlet]=\"item.content\"></ng-template>\n                  </td>\n                </ng-container>\n              </ng-container>\n            </tr>\n          </ng-container>\n\n          <ng-container *ngIf=\"nzLayout === 'vertical'\">\n            <!-- Vertical & NOT Bordered -->\n            <ng-container *ngIf=\"!nzBordered\">\n              <ng-container *ngFor=\"let row of itemMatrix; let i = index\">\n                <tr class=\"ant-descriptions-row\">\n                  <ng-container *ngFor=\"let item of row; let isLast = last\">\n                    <td class=\"ant-descriptions-item\" [colSpan]=\"item.span\">\n                      <span class=\"ant-descriptions-item-label\" [class.ant-descriptions-item-colon]=\"nzColon\">{{ item.title }}</span>\n                    </td>\n                  </ng-container>\n                </tr>\n                <tr class=\"ant-descriptions-row\">\n                  <ng-container *ngFor=\"let item of row; let isLast = last\">\n                    <td class=\"ant-descriptions-item\" [colSpan]=\"item.span\">\n                      <span class=\"ant-descriptions-item-content\">\n                        <ng-template [ngTemplateOutlet]=\"item.content\"></ng-template>\n                      </span>\n                    </td>\n                  </ng-container>\n                </tr>\n              </ng-container>\n            </ng-container>\n            <!-- Vertical & Bordered -->\n            <ng-container *ngIf=\"nzBordered\">\n              <ng-container *ngFor=\"let row of itemMatrix; let i = index\">\n                <tr class=\"ant-descriptions-row\">\n                  <ng-container *ngFor=\"let item of row; let isLast = last\">\n                    <td class=\"ant-descriptions-item-label\" [colSpan]=\"item.span\">\n                      {{ item.title }}\n                    </td>\n                  </ng-container>\n                </tr>\n                <tr class=\"ant-descriptions-row\">\n                  <ng-container *ngFor=\"let item of row; let isLast = last\">\n                    <td class=\"ant-descriptions-item-content\" [colSpan]=\"item.span\">\n                      <ng-template [ngTemplateOutlet]=\"item.content\"></ng-template>\n                    </td>\n                  </ng-container>\n                </tr>\n              </ng-container>\n            </ng-container>\n          </ng-container>\n        </tbody>\n      </table>\n    </div>\n  ",
                    host: {
                        class: 'ant-descriptions',
                        '[class.ant-descriptions-bordered]': 'nzBordered',
                        '[class.ant-descriptions-middle]': 'nzSize === "middle"',
                        '[class.ant-descriptions-small]': 'nzSize === "small"'
                    },
                    styles: [
                        "\n      nz-descriptions {\n        display: block;\n      }\n    "
                    ]
                }]
        }], function () { return [{ type: core$1.NzConfigService }, { type: core.ChangeDetectorRef }, { type: layout.MediaMatcher }, { type: platform.Platform }, { type: core$1.NzDomEventService }]; }, { items: [{
                type: core.ContentChildren,
                args: [NzDescriptionsItemComponent]
            }], nzBordered: [{
                type: core.Input
            }], nzLayout: [{
                type: core.Input
            }], nzColumn: [{
                type: core.Input
            }], nzSize: [{
                type: core.Input
            }], nzTitle: [{
                type: core.Input
            }], nzColon: [{
                type: core.Input
            }] }); })();

    /**
     * @license
     * Copyright Alibaba.com All Rights Reserved.
     *
     * Use of this source code is governed by an MIT-style license that can be
     * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
     */
    var NzDescriptionsModule = /** @class */ (function () {
        function NzDescriptionsModule() {
        }
        /** @nocollapse */ NzDescriptionsModule.ɵmod = core["ɵɵdefineNgModule"]({ type: NzDescriptionsModule });
        /** @nocollapse */ NzDescriptionsModule.ɵinj = core["ɵɵdefineInjector"]({ factory: function NzDescriptionsModule_Factory(t) { return new (t || NzDescriptionsModule)(); }, imports: [[common.CommonModule, core$1.NzOutletModule, platform.PlatformModule]] });
        return NzDescriptionsModule;
    }());
    (function () { (typeof ngJitMode === "undefined" || ngJitMode) && core["ɵɵsetNgModuleScope"](NzDescriptionsModule, { declarations: [NzDescriptionsComponent, NzDescriptionsItemComponent], imports: [common.CommonModule, core$1.NzOutletModule, platform.PlatformModule], exports: [NzDescriptionsComponent, NzDescriptionsItemComponent] }); })();
    /*@__PURE__*/ (function () { core["ɵsetClassMetadata"](NzDescriptionsModule, [{
            type: core.NgModule,
            args: [{
                    imports: [common.CommonModule, core$1.NzOutletModule, platform.PlatformModule],
                    declarations: [NzDescriptionsComponent, NzDescriptionsItemComponent],
                    exports: [NzDescriptionsComponent, NzDescriptionsItemComponent]
                }]
        }], null, null); })();

    exports.NzDescriptionsComponent = NzDescriptionsComponent;
    exports.NzDescriptionsItemComponent = NzDescriptionsItemComponent;
    exports.NzDescriptionsModule = NzDescriptionsModule;

    Object.defineProperty(exports, '__esModule', { value: true });

})));
//# sourceMappingURL=ng-zorro-antd-descriptions.umd.js.map
