UNPKG

dbweb-common

Version:

用`yarn add dbweb-common`安装,不要忘记修改`angular.json`里的 `architect\build\options\assets`,加上

24,907 lines 1.24 MB
(function (global, factory) {
    typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('dbweb-core'), require('@angular/material'), require('@angular/cdk/drag-drop'), require('@angular/forms'), require('@angular/material/badge'), require('@angular/material/button'), require('@angular/material/core'), require('@angular/material/dialog'), require('@angular/material/divider'), require('@angular/material/icon'), require('@angular/material/menu'), require('@angular/material/sidenav'), require('@angular/material/tabs'), require('@angular/material/toolbar'), require('@angular/material/tree'), require('@angular/platform-browser'), require('@angular/platform-browser/animations'), require('@angular/router'), require('ngx-clipboard'), require('@angular/animations'), require('rxjs/operators'), require('rxjs'), require('@angular/cdk/tree'), require('@angular/material/input'), require('@angular/material/form-field'), require('@angular/common/locales/zh-Hans'), require('pinyin'), require('ng2-ace-editor'), require('uuid'), require('ace-builds'), require('@angular/common/http'), require('@angular/cdk/overlay'), require('ng5-slider'), require('@angular/material/checkbox'), require('@angular/material/expansion'), require('@angular/material/progress-bar'), require('@angular/material/select'), require('@angular/material/stepper'), require('@angular/material/table'), require('angular-calendar'), require('angular-calendar/date-adapters/date-fns'), require('@angular/material/card'), require('@angular/material/chips'), require('@angular/material/grid-list'), require('@angular/material/tooltip'), require('@angular/cdk/collections'), require('@angular/material/sort'), require('@angular/material/radio'), require('@angular/material/snack-bar'), require('ts-md5')) :
    typeof define === 'function' && define.amd ? define('dbweb-common', ['exports', '@angular/common', '@angular/core', 'dbweb-core', '@angular/material', '@angular/cdk/drag-drop', '@angular/forms', '@angular/material/badge', '@angular/material/button', '@angular/material/core', '@angular/material/dialog', '@angular/material/divider', '@angular/material/icon', '@angular/material/menu', '@angular/material/sidenav', '@angular/material/tabs', '@angular/material/toolbar', '@angular/material/tree', '@angular/platform-browser', '@angular/platform-browser/animations', '@angular/router', 'ngx-clipboard', '@angular/animations', 'rxjs/operators', 'rxjs', '@angular/cdk/tree', '@angular/material/input', '@angular/material/form-field', '@angular/common/locales/zh-Hans', 'pinyin', 'ng2-ace-editor', 'uuid', 'ace-builds', '@angular/common/http', '@angular/cdk/overlay', 'ng5-slider', '@angular/material/checkbox', '@angular/material/expansion', '@angular/material/progress-bar', '@angular/material/select', '@angular/material/stepper', '@angular/material/table', 'angular-calendar', 'angular-calendar/date-adapters/date-fns', '@angular/material/card', '@angular/material/chips', '@angular/material/grid-list', '@angular/material/tooltip', '@angular/cdk/collections', '@angular/material/sort', '@angular/material/radio', '@angular/material/snack-bar', 'ts-md5'], factory) :
    (global = global || self, factory(global['dbweb-common'] = {}, global.ng.common, global.ng.core, global['dbweb-core'], global.ng.material, global.ng.cdk['drag-drop'], global.ng.forms, global.ng.material.badge, global.ng.material.button, global.ng.material.core, global.ng.material.dialog, global.ng.material.divider, global.ng.material.icon, global.ng.material.menu, global.ng.material.sidenav, global.ng.material.tabs, global.ng.material.toolbar, global.ng.material.tree, global.ng.platformBrowser, global.ng.platformBrowser.animations, global.ng.router, global.ngxClipboard, global.ng.animations, global.rxjs.operators, global.rxjs, global.ng.cdk.tree, global.ng.material.input, global.ng.material['form-field'], global.ng.common.locales['zh-Hans'], global.pinyin_, global.ng2AceEditor, global.uuid, global.ace, global.ng.common.http, global.ng.cdk.overlay, global.ng5Slider, global.ng.material.checkbox, global.ng.material.expansion, global.ng.material['progress-bar'], global.ng.material.select, global.ng.material.stepper, global.ng.material.table, global.angularCalendar, global.dateFns, global.ng.material.card, global.ng.material.chips, global.ng.material['grid-list'], global.ng.material.tooltip, global.ng.cdk.collections, global.ng.material.sort, global.ng.material.radio, global.ng.material['snack-bar'], global['ts-md5']));
}(this, function (exports, common, core, dbwebCore, material, dragDrop, forms, badge, button, core$1, dialog, divider, icon, menu, sidenav, tabs, toolbar, tree, platformBrowser, animations, router, ngxClipboard, animations$1, operators, rxjs, tree$1, input, formField, localeZh, pinyin_, ng2AceEditor, uuid, ace, http, overlay, ng5Slider, checkbox, expansion, progressBar, select, stepper, table, angularCalendar, dateFns, card, chips, gridList, tooltip, collections, sort, radio, snackBar, tsMd5) { 'use strict';

    localeZh = localeZh && localeZh.hasOwnProperty('default') ? localeZh['default'] : localeZh;
    var pinyin___default = 'default' in pinyin_ ? pinyin_['default'] : pinyin_;
    ace = ace && ace.hasOwnProperty('default') ? ace['default'] : ace;

    /*! *****************************************************************************
    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) {
        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) : new P(function (resolve) { resolve(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 m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
        if (m) return m.call(o);
        return {
            next: function () {
                if (o && i >= o.length) o = void 0;
                return { value: o && o[i++], done: !o };
            }
        };
    }

    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 };
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ConfirmDialogComponent = /** @class */ (function () {
        function ConfirmDialogComponent(dialogRef, data) {
            this.dialogRef = dialogRef;
            this.data = data;
            this.hostClass = true;
        }
        /**
         * @return {?}
         */
        ConfirmDialogComponent.prototype.onNoClick = /**
         * @return {?}
         */
        function () {
            this.dialogRef.close();
        };
        /**
         * @return {?}
         */
        ConfirmDialogComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            this.removeView.nativeElement.parentElement.parentElement.style = 'padding:0px';
        };
        ConfirmDialogComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-confirm-dialog',
                        template: "<div #removeView class=\"\u5220\u9664\">\r\n\t<div class=\"tit\">\r\n\t\t\t<b >{{ data }}</b>\r\n\t</div>\r\n\t<div class=\"\u529F\u80FD\u6309\u94AE\">\r\n\t\t<button class=\"false-icon\" mat-button [mat-dialog-close]=\"false\">\u53D6\u6D88</button>\r\n\t\t<button class=\"true-icon\" color=\"primary\" mat-button  [mat-dialog-close]=\"true\">\u786E\u5B9A</button>\r\n\t</div>\r\n</div>\r\n",
                        styles: ["@charset \"UTF-8\";.\u5220\u9664{position:relative;display:flex;justify-content:space-between;flex-direction:column;width:100%;height:100%;box-sizing:border-box;padding:24px 24px 16px}.\u5220\u9664 b{font-size:20px}.tit{display:flex;align-items:center;box-sizing:border-box;width:100%;height:104px}.\u529F\u80FD\u6309\u94AE{width:100%;box-sizing:border-box;text-align:right}.\u529F\u80FD\u6309\u94AE .mat-button{width:64px;height:32px}.\u529F\u80FD\u6309\u94AE .true-icon{margin-left:8px}"]
                    }] }
        ];
        /** @nocollapse */
        ConfirmDialogComponent.ctorParameters = function () { return [
            { type: material.MatDialogRef },
            { type: String, decorators: [{ type: core.Inject, args: [material.MAT_DIALOG_DATA,] }] }
        ]; };
        ConfirmDialogComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.confirm-dialog-theme',] }],
            removeView: [{ type: core.ViewChild, args: ['removeView', { static: true },] }]
        };
        return ConfirmDialogComponent;
    }());
    if (false) {
        /** @type {?} */
        ConfirmDialogComponent.prototype.hostClass;
        /** @type {?} */
        ConfirmDialogComponent.prototype.removeView;
        /** @type {?} */
        ConfirmDialogComponent.prototype.dialogRef;
        /** @type {?} */
        ConfirmDialogComponent.prototype.data;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ConfirmDialogModule = /** @class */ (function () {
        function ConfirmDialogModule() {
        }
        ConfirmDialogModule.decorators = [
            { type: core.NgModule, args: [{
                        declarations: [ConfirmDialogComponent],
                        imports: [common.CommonModule, material.MatDialogModule, material.MatButtonModule],
                        exports: [ConfirmDialogComponent],
                        entryComponents: [ConfirmDialogComponent]
                    },] }
        ];
        return ConfirmDialogModule;
    }());

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /** @type {?} */
    var CTRL_RECORDVIEW = 'recordview';
    /** @type {?} */
    var CTRL_INDEX = 'index';
    /** @type {?} */
    var CTRL_EXPORT = 'export';
    /** @type {?} */
    var CTRL_LOGIN = 'login';
    /** @type {?} */
    var CTRL_ELEMENT = 'element';
    /** @type {?} */
    var CTRL_VERSION = 'version';
    /** @type {?} */
    var CTRL_TASK = 'task';
    /** @type {?} */
    var CTRL_IMPORT = 'import';
    /** @type {?} */
    var CTRL_USERINFO = 'userinfo';
    /** @type {?} */
    var CTRL_UPDATE = 'update';
    /** @type {?} */
    var CTRL_ROLE = 'role';
    /** @type {?} */
    var CTRL_USER = 'user';
    /** @type {?} */
    var CTRL_NOTICE = 'notice';
    /** @type {?} */
    var CTRL_REMOVESEL = 'removesel';
    /** @type {?} */
    var CTRL_DUMP_INSTITUTION = 'dumpInstitution';
    /** @type {?} */
    var portraitDefault = '/front/assets/userinfo/portrait_default.png';

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /**
     * @param {?} e
     * @return {?}
     */
    function label(e) {
        if (e.Label) {
            return dbwebCore.clearText(e.Label);
        }
        return dbwebCore.clearText(e.Name);
    }
    var HomeTabfunctionService = /** @class */ (function () {
        function HomeTabfunctionService(eles) {
            this.eles = eles;
        }
        Object.defineProperty(HomeTabfunctionService.prototype, "category", {
            get: /**
             * @return {?}
             */
            function () {
                return this.eles.currentElementListen.pipe(operators.map((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) { return (v ? dbwebCore.clearCategory(v.element.Category).replace('/', '>') + '>' + label(v.element) : null); })));
            },
            enumerable: true,
            configurable: true
        });
        HomeTabfunctionService.decorators = [
            { type: core.Injectable, args: [{
                        providedIn: 'root'
                    },] }
        ];
        /** @nocollapse */
        HomeTabfunctionService.ctorParameters = function () { return [
            { type: dbwebCore.RouteElementService }
        ]; };
        /** @nocollapse */ HomeTabfunctionService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function HomeTabfunctionService_Factory() { return new HomeTabfunctionService(core.ɵɵinject(dbwebCore.RouteElementService)); }, token: HomeTabfunctionService, providedIn: "root" });
        return HomeTabfunctionService;
    }());
    if (false) {
        /** @type {?} */
        HomeTabfunctionService.prototype.eles;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var Tab = /** @class */ (function () {
        function Tab(state) {
            var e_1, _a;
            try {
                for (var _b = __values(Object.keys(state)), _c = _b.next(); !_c.done; _c = _b.next()) {
                    var key = _c.value;
                    this[key] = state[key];
                }
            }
            catch (e_1_1) { e_1 = { error: e_1_1 }; }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
                }
                finally { if (e_1) throw e_1.error; }
            }
            this.titleObservable = new rxjs.BehaviorSubject(state.title);
        }
        /**
         * @return {?}
         */
        Tab.prototype.data = /**
         * @return {?}
         */
        function () {
            return {
                url: this.url,
                key: this.key,
                title: this.title
            };
        };
        return Tab;
    }());
    if (false) {
        /** @type {?} */
        Tab.prototype.url;
        /** @type {?} */
        Tab.prototype.key;
        /** @type {?} */
        Tab.prototype.title;
        /** @type {?} */
        Tab.prototype.titleObservable;
    }
    var TabsService = /** @class */ (function () {
        function TabsService(router, eles) {
            this.router = router;
            this.eles = eles;
            this.tabs = [];
        }
        // 激活一个tab,如果不存在,则新增并激活
        // 激活一个tab,如果不存在,则新增并激活
        /**
         * @param {?} data
         * @return {?}
         */
        TabsService.prototype.activeTab = 
        // 激活一个tab,如果不存在,则新增并激活
        /**
         * @param {?} data
         * @return {?}
         */
        function (data) {
            /** @type {?} */
            var find = this.tabs.findIndex((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.key === data.key; }));
            if (find === -1) {
                this.tabs.push(new Tab(data));
                this._activeIndex = this.tabs.length - 1;
            }
            else {
                this._activeIndex = find;
                // 同时需要更新url和title
                this.tabs[this._activeIndex].url = data.url;
                this.tabs[this._activeIndex].title = data.title;
            }
        };
        // 删除指定序号的tab,并切换激活的tab,如果只有一个tab,则不能被删除
        // 返回true指示激活页已经切换
        // 删除指定序号的tab,并切换激活的tab,如果只有一个tab,则不能被删除
        // 返回true指示激活页已经切换
        /**
         * @param {?} index
         * @return {?}
         */
        TabsService.prototype.removeTab = 
        // 删除指定序号的tab,并切换激活的tab,如果只有一个tab,则不能被删除
        // 返回true指示激活页已经切换
        /**
         * @param {?} index
         * @return {?}
         */
        function (index) {
            if (this.tabs.length === 1) {
                return false;
            }
            /** @type {?} */
            var deleteURL = this.tabs[index].url.toString();
            // 如果是关闭当前页面,则会引起路由变化,所以需要在导航结束事件中删除,因为导航过程中还会进行保存
            if (index === this._activeIndex) {
                /** @type {?} */
                var sub_1 = this.router.events.subscribe((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) {
                    if (v instanceof router.NavigationEnd) {
                        dbwebCore.SimpleReuseStrategy.deleteRouteSnapshot(deleteURL);
                        sub_1.unsubscribe();
                    }
                }));
            }
            else {
                dbwebCore.SimpleReuseStrategy.deleteRouteSnapshot(deleteURL);
            }
            this.tabs.splice(index, 1);
            if (this._activeIndex === index) {
                this._activeIndex = Math.min(this.tabs.length - 1, index);
                return true;
            }
            if (this._activeIndex > index) {
                this._activeIndex--;
            }
            return false;
        };
        // 删除所有的页,一般是logout
        // 删除所有的页,一般是logout
        /**
         * @return {?}
         */
        TabsService.prototype.clear = 
        // 删除所有的页,一般是logout
        /**
         * @return {?}
         */
        function () {
            this.tabs.splice(0);
            this._activeIndex = undefined;
            dbwebCore.SimpleReuseStrategy.clearRouteSnapshot();
        };
        // 关闭当前页,并自动导航到新的页
        // 关闭当前页,并自动导航到新的页
        /**
         * @return {?}
         */
        TabsService.prototype.close = 
        // 关闭当前页,并自动导航到新的页
        /**
         * @return {?}
         */
        function () {
            var _this = this;
            if (this.activeIndex >= 0) {
                /** @type {?} */
                var idx_1 = this.activeIndex;
                if (this.tabs.length === 1) {
                    this.router.navigateByUrl(this.eles.frontElementURL(this.eles.indexElementName)).then((/**
                     * @return {?}
                     */
                    function () {
                        _this.removeTab(idx_1);
                    }));
                }
                if (this.removeTab(idx_1)) {
                    this.router.navigateByUrl(this.active.url, {
                        state: this.active.data()
                    });
                }
            }
        };
        Object.defineProperty(TabsService.prototype, "active", {
            get: /**
             * @return {?}
             */
            function () {
                if (this._activeIndex >= 0) {
                    return this.tabs[this._activeIndex];
                }
                return undefined;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(TabsService.prototype, "activeIndex", {
            get: /**
             * @return {?}
             */
            function () {
                return this._activeIndex;
            },
            set: /**
             * @param {?} val
             * @return {?}
             */
            function (val) {
                this._activeIndex = val;
            },
            enumerable: true,
            configurable: true
        });
        TabsService.decorators = [
            { type: core.Injectable, args: [{
                        providedIn: 'root'
                    },] }
        ];
        /** @nocollapse */
        TabsService.ctorParameters = function () { return [
            { type: router.Router },
            { type: dbwebCore.ElementsService }
        ]; };
        /** @nocollapse */ TabsService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function TabsService_Factory() { return new TabsService(core.ɵɵinject(router.Router), core.ɵɵinject(dbwebCore.ElementsService)); }, token: TabsService, providedIn: "root" });
        return TabsService;
    }());
    if (false) {
        /** @type {?} */
        TabsService.prototype.tabs;
        /** @type {?} */
        TabsService.prototype._activeIndex;
        /**
         * @type {?}
         * @private
         */
        TabsService.prototype.router;
        /**
         * @type {?}
         * @private
         */
        TabsService.prototype.eles;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var HomeComponent = /** @class */ (function () {
        function HomeComponent(routerEle, eles, tabFun, tabs) {
            var _this = this;
            this.routerEle = routerEle;
            this.eles = eles;
            this.tabFun = tabFun;
            this.tabs = tabs;
            this.hostClass = true;
            this.subs = [];
            this.copystate = false;
            this.subs.push(this.routerEle.currentElementListen
                .pipe(operators.filter((/**
             * @param {?} ele
             * @return {?}
             */
            function (ele) { return ele && ele.element && ele.element.Controller !== CTRL_LOGIN; })))
                .subscribe((/**
             * @param {?} ele
             * @return {?}
             */
            function (ele) {
                /** @type {?} */
                var state = (/** @type {?} */ (ele.state));
                if (!state) {
                    /** @type {?} */
                    var key = ele.url;
                    /** @type {?} */
                    var arr = key.split('/');
                    // 功能类的,需要去除子路由作为key,防止出现多余的tab
                    if (!ele.element.Bill && arr.length > 5) {
                        key = arr.slice(0, 5).join('/');
                        // 需要处理query
                        /** @type {?} */
                        var queryArr = arr[arr.length - 1].split('?');
                        if (queryArr.length > 1) {
                            key += '?' + queryArr[1];
                        }
                    }
                    state = {
                        url: ele.urlObj,
                        key: key,
                        title: ele.element.title()
                    };
                }
                _this.tabs.activeTab(state);
            })));
            this.category = this.tabFun.category;
        }
        /**
         * @return {?}
         */
        HomeComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        /**
         * @return {?}
         */
        HomeComponent.prototype.ngOnDestroy = /**
         * @return {?}
         */
        function () {
            this.subs.forEach((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.unsubscribe(); }));
        };
        HomeComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-home',
                        template: "<div class=\"home-container-nav\">\r\n\t<common-home-nav></common-home-nav>\r\n</div>\r\n<div class=\"home-container-content\">\r\n\t<div class=\"tab-all\">\r\n\t\t<app-router-tab #tabNav class=\"tabNav\">\r\n\t\t\t<app-router-tab-item\r\n\t\t\t\t*ngFor=\"let tab of tabs.tabs; let index = index\"\r\n\t\t\t\t[routerLink]=\"tab.url\" class=\"tabA\"\r\n\t\t\t\tlabel=\"{{ tab.titleObservable | async }}\">\r\n\t\t\t</app-router-tab-item>\r\n\t\t</app-router-tab>\r\n\t\t<div class=\"tab-nav-right\">\r\n\t\t\t<button mat-icon-button ngxClipboard [cbContent]=\"category | async\"\r\n\t\t\t\t(mousemove)=\"copystate = true\" (mouseout)=\"copystate = false\">\r\n\t\t\t\t<mat-icon class=\"\u590D\u5236\u56FE\u6807\" [class.\u590D\u5236\u60AC\u6D6E]=\"copystate\"\r\n\t\t\t\t\taria-label=\"\u590D\u5236\u7C7B\u522B\" svgIcon=\"content_copy\"></mat-icon>\r\n\t\t\t</button>\r\n\t\t\t<button mat-stroked-button class=\"\u8BED\u8A00\">Eng</button>\r\n\t\t</div>\r\n\t\t<div class=\"\u590D\u5236\u8DEF\u5F84\" [class.\u590D\u5236\u60AC\u6D6E\u72B6\u6001]=\"!copystate\">\r\n\t\t\t<span class=\"\u7C7B\u522B\">{{ category | async }}</span>\r\n\t\t</div>\r\n\t</div>\r\n\r\n\t<div class=\"content-home\" [@routerTransition]=\"tabs.activeIndex\">\r\n\t\t<core-router-outlet #outlet=\"coreRouterOutlet\"></core-router-outlet>\r\n\t</div>\r\n</div>",
                        animations: [
                            animations$1.trigger('routerTransition', [
                                animations$1.transition(':enter, * => -1', []),
                                animations$1.transition(':increment', [
                                    animations$1.style({ position: 'relative', overflow: 'hidden' }),
                                    animations$1.query(':enter, :leave', animations$1.style({ position: 'absolute', width: '100%', height: '100%' }), {
                                        optional: true
                                    }),
                                    animations$1.group([
                                        animations$1.query(':enter', [
                                            animations$1.style({ transform: 'translateX(-100%)' }),
                                            animations$1.animate('0.5s ease-in-out', animations$1.style({ transform: 'translateX(0%)' }))
                                        ], { optional: true }),
                                        animations$1.query(':leave', [
                                            animations$1.style({ transform: 'translateX(0%)' }),
                                            animations$1.animate('0.5s ease-in-out', animations$1.style({ transform: 'translateX(100%)' }))
                                        ], { optional: true })
                                    ])
                                ]),
                                animations$1.transition(':decrement', [
                                    animations$1.style({ position: 'relative', overflow: 'hidden' }),
                                    animations$1.query(':enter, :leave', animations$1.style({ position: 'absolute', width: '100%', height: '100%' }), {
                                        optional: true
                                    }),
                                    animations$1.group([
                                        animations$1.query(':enter', [
                                            animations$1.style({ transform: 'translateX(100%)' }),
                                            animations$1.animate('0.5s ease-in-out', animations$1.style({ transform: 'translateX(0%)' }))
                                        ], { optional: true }),
                                        animations$1.query(':leave', [
                                            animations$1.style({ transform: 'translateX(0%)' }),
                                            animations$1.animate('0.5s ease-in-out', animations$1.style({ transform: 'translateX(-100%)' }))
                                        ], { optional: true })
                                    ])
                                ])
                            ])
                        ],
                        styles: ["@charset \"UTF-8\";:host{width:100%;height:100%;padding:0;margin:0;display:flex;align-items:stretch}.home-container-nav{flex-shrink:0;z-index:10}.home-container-content{height:100%;display:flex;flex-direction:column;width:10%;flex-grow:1;flex-shrink:1}.home-container-content .tab-all{display:flex;height:30px}.home-container-content .tab-all .tabNav{width:10%;flex-grow:1;flex-shrink:1}.home-container-content .tab-all .tab-nav-right{height:30px;line-height:30px;font-size:12px;position:relative;display:block}.home-container-content .tab-all .tab-nav-right button{width:24px;height:24px;line-height:24px}.home-container-content .tab-all .tab-nav-right button .\u590D\u5236\u56FE\u6807{width:16px;height:16px;margin-bottom:6px}.home-container-content .tab-all .tab-nav-right .\u8BED\u8A00{font-size:12px;height:24px;width:64px;margin:0 8px;padding:0;line-height:20px;text-align:center}.home-container-content .\u590D\u5236\u8DEF\u5F84{height:32px;position:absolute;right:0;top:30px;font-size:12px;color:#fff;line-height:32px;border-radius:4px;padding:0 8px;z-index:9;text-align:center;background-color:rgba(0,0,0,.6);box-shadow:0 4px 8px 0 rgba(0,0,0,.14)}.home-container-content .\u590D\u5236\u60AC\u6D6E\u72B6\u6001{display:none}.home-container-content .content-home{width:100%;height:10%;box-sizing:border-box;flex-grow:1;flex-shrink:1}"]
                    }] }
        ];
        /** @nocollapse */
        HomeComponent.ctorParameters = function () { return [
            { type: dbwebCore.RouteElementService },
            { type: dbwebCore.RouteElementService },
            { type: HomeTabfunctionService },
            { type: TabsService }
        ]; };
        HomeComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.c-home',] }],
            tabNavs: [{ type: core.ViewChild, args: ['tabNav', { static: true },] }]
        };
        return HomeComponent;
    }());
    if (false) {
        /** @type {?} */
        HomeComponent.prototype.hostClass;
        /** @type {?} */
        HomeComponent.prototype.subs;
        /** @type {?} */
        HomeComponent.prototype.tabNavs;
        /** @type {?} */
        HomeComponent.prototype.category;
        /** @type {?} */
        HomeComponent.prototype.copystate;
        /**
         * @type {?}
         * @private
         */
        HomeComponent.prototype.routerEle;
        /** @type {?} */
        HomeComponent.prototype.eles;
        /**
         * @type {?}
         * @private
         */
        HomeComponent.prototype.tabFun;
        /** @type {?} */
        HomeComponent.prototype.tabs;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /**
     * @param {?} val
     * @return {?}
     */
    function convertBoolean(val) {
        return val === 'true';
    }
    var MainNavService = /** @class */ (function () {
        function MainNavService() {
            this._navMin = new rxjs.BehaviorSubject(convertBoolean(localStorage.getItem('main-nav-min')));
            this.navMin = this._navMin.pipe(operators.tap((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                localStorage.setItem('main-nav-min', v ? 'true' : 'false');
            })));
        }
        /**
         * @param {?} val
         * @return {?}
         */
        MainNavService.prototype.setNavMin = /**
         * @param {?} val
         * @return {?}
         */
        function (val) {
            this._navMin.next(val);
        };
        /**
         * @return {?}
         */
        MainNavService.prototype.getCurrent = /**
         * @return {?}
         */
        function () {
            return this._navMin.getValue();
        };
        MainNavService.decorators = [
            { type: core.Injectable, args: [{
                        providedIn: 'root'
                    },] }
        ];
        /** @nocollapse */ MainNavService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function MainNavService_Factory() { return new MainNavService(); }, token: MainNavService, providedIn: "root" });
        return MainNavService;
    }());
    if (false) {
        /**
         * @type {?}
         * @private
         */
        MainNavService.prototype._navMin;
        /** @type {?} */
        MainNavService.prototype.navMin;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var NavtreeService = /** @class */ (function () {
        // get data(): NavItem[] {
        // 	console.log(this.dataChange.value);
        // 	return this.dataChange.value;
        // }
        function NavtreeService(eles, project) {
            this.eles = eles;
            this.project = project;
            this.root = { children: [] };
            // dataChange = new BehaviorSubject<NavItem[]>([]);
            this.icons = ['security', 'dns', 'gamepad']; // 图标
            // this.initialize();
            this.init();
            for (var i = 0; i < Math.min(this.root.children.length, this.icons.length); i++) {
                this.root.children[i].iconName = this.icons[i];
            }
        }
        /**
         * @return {?}
         */
        NavtreeService.prototype.init = /**
         * @return {?}
         */
        function () {
            var _this = this;
            // 设置项目图标
            if (this.project.categoryIcons && this.project.categoryIcons.length > 0) {
                this.icons = this.project.categoryIcons;
            }
            // 如果已经初始化过,则跳出
            if (this.root.children.length > 0) {
                return;
            }
            this.eles.getElesAsArray().forEach((/**
             * @param {?} element
             * @return {?}
             */
            function (element) {
                // 后端api或者子级工作元素的,不需要加入到node列表中
                if (!element.NotMenu) {
                    _this.addElement(element, _this.root, element.Category.split('/'), 0, null, element.Icon);
                }
            }));
            // console.log(this.root.children[0].iconName);
            // console.log(this.root);
        };
        /**
         * @private
         * @param {?} str
         * @return {?}
         */
        NavtreeService.prototype.clearText = /**
         * @private
         * @param {?} str
         * @return {?}
         */
        function (str) {
            if (str.search(/[0-9]{2}\./) > -1) {
                return str.substr(3);
            }
            return str;
        };
        // 采用插入排序方法逐条插入
        // 采用插入排序方法逐条插入
        /**
         * @private
         * @param {?} ele
         * @param {?} parent
         * @param {?} paths
         * @param {?} level
         * @param {?} parents
         * @param {?} iconName
         * @return {?}
         */
        NavtreeService.prototype.addElement = 
        // 采用插入排序方法逐条插入
        /**
         * @private
         * @param {?} ele
         * @param {?} parent
         * @param {?} paths
         * @param {?} level
         * @param {?} parents
         * @param {?} iconName
         * @return {?}
         */
        function (ele, parent, paths, level, parents, iconName) {
            if (paths.length === 0) {
                // 实际插入的菜单项,也需要排序
                /** @type {?} */
                var idx = parent.children.findIndex((/**
                 * @param {?} item
                 * @return {?}
                 */
                function (item) { return (ele.Label || ele.Name).localeCompare(item.fullTitle || item.name) <= 0; }));
                /** @type {?} */
                var node = {
                    name: ele.Name,
                    fullTitle: ele.Label,
                    title: this.clearText(ele.Label || ele.Name),
                    url: this.eles.frontElementURL(ele.Name, decodeURI(ele.URL)),
                    level: level,
                    parent: parents,
                    iconName: iconName
                };
                if (idx === -1) {
                    parent.children.push(node);
                }
                else {
                    parent.children.splice(idx, 0, node);
                }
                return;
            }
            /** @type {?} */
            var findIdx = parent.children.findIndex((/**
             * @param {?} item
             * @return {?}
             */
            function (item) { return paths[0].localeCompare(item.name) <= 0; }));
            /** @type {?} */
            var categoryNode;
            if (findIdx !== -1 && parent.children[findIdx].name === paths[0]) {
                categoryNode = parent.children[findIdx];
            }
            else {
                categoryNode = {
                    name: paths[0],
                    fullTitle: paths[0],
                    title: this.clearText(paths[0]),
                    level: level,
                    parent: parents,
                    iconName: iconName,
                    children: []
                };
                // 如果找不到,则说明比里面任何一个都大,则是追加到最后一个
                if (findIdx === -1) {
                    parent.children.push(categoryNode);
                }
                else {
                    parent.children.splice(findIdx, 0, categoryNode);
                }
            }
            this.addElement(ele, categoryNode, paths.slice(1), level + 1, categoryNode, iconName);
        };
        NavtreeService.decorators = [
            { type: core.Injectable }
        ];
        /** @nocollapse */
        NavtreeService.ctorParameters = function () { return [
            { type: dbwebCore.ElementsService },
            { type: dbwebCore.ProjectService }
        ]; };
        return NavtreeService;
    }());
    if (false) {
        /** @type {?} */
        NavtreeService.prototype.root;
        /** @type {?} */
        NavtreeService.prototype.icons;
        /**
         * @type {?}
         * @private
         */
        NavtreeService.prototype.eles;
        /**
         * @type {?}
         * @private
         */
        NavtreeService.prototype.project;
    }
    var NavHome = /** @class */ (function () {
        function NavHome(current, database, prj) {
            this.current = current;
            this.database = database;
            this.prj = prj;
            this.chatMessages = [];
            this.unread = null; // 未读信息数
            // 未读信息数
            this.openNodeCurrent = [];
            this.activeNode = [];
            this.subs = [];
        }
        /**
         * @param {?} node
         * @return {?}
         */
        NavHome.prototype.recursionFun = /**
         * @param {?} node
         * @return {?}
         */
        function (node) {
            if (node.level <= 0) {
                return this.openNodeCurrent.push(node);
            }
            if (node.level >= 1) {
                this.openNodeCurrent.push(node);
                this.recursionFun(node.parent);
            }
        };
        /**
         * @param {?} node
         * @return {?}
         */
        NavHome.prototype.recursionFuns = /**
         * @param {?} node
         * @return {?}
         */
        function (node) {
            if (node.level <= 0) {
                return this.activeNode.push(node);
            }
            if (node.level >= 1) {
                this.activeNode.push(node);
                this.recursionFuns(node.parent);
            }
        };
        /**
         * @param {?} node
         * @return {?}
         */
        NavHome.prototype.gradually = /**
         * @param {?} node
         * @return {?}
         */
        function (node) {
            if (this.activeNode.length !== 0) {
                this.activeNode.splice(0, this.activeNode.length);
            }
            this.recursionFuns(node);
        };
        /**
         * @param {?} node
         * @return {?}
         */
        NavHome.prototype.openNode = /**
         * @param {?} node
         * @return {?}
         */
        function (node) {
            /** @type {?} */
            var openboolean = this.openNodeCurrent.includes(node);
            if (this.openNodeCurrent.length !== 0) {
                this.openNodeCurrent.splice(0, this.openNodeCurrent.length);
            }
            if (openboolean) {
                if (node.level >= 1) {
                    this.recursionFun(node.parent);
                }
                if (node.level === 0) {
                    this.recursionFun(this.database.root);
                }
            }
            else {
                this.recursionFun(node);
            }
        };
        /**
         * @return {?}
         */
        NavHome.prototype.messages = /**
         * @return {?}
         */
        function () {
            var _this = this;
            /** @type {?} */
            var chatData = JSON.parse(this.prj.loadData('chatdata'));
            if (chatData == null) {
                this.prj.saveData('chatdata', JSON.stringify(this.chatMessages));
            }
            this.subs.push(this.current.wsChat.observable.subscribe((/**
             * @param {?} n
             * @return {?}
             */
            function (n) {
                _this.chatMessages.push(n);
                _this.prj.saveData('chatdata', JSON.stringify(_this.chatMessages));
                if (n != null) {
                    _this.unread = _this.unread + 1;
                }
                // console.log(JSON.parse(localStorage.getItem('chatdata')));
            }), (/**
             * @param {?} err
             * @return {?}
             */
            function (err) { return console.log(err); }), (/**
             * @return {?}
             */
            function () { return console.log('component'); })));
            this.chatMessages = chatData;
        };
        /**
         * @param {?} item
         * @return {?}
         */
        NavHome.prototype.fromChildFunc = /**
         * @param {?} item
         * @return {?}
         */
        function (item) {
            if (this.activeNode.length !== 0) {
                this.activeNode.splice(0, this.activeNode.length);
            }
            this.recursionFuns(item);
            if (this.openNodeCurrent.length !== 0) {
                this.openNodeCurrent.splice(0, this.openNodeCurrent.length);
            }
            this.recursionFun(item);
        };
        NavHome.decorators = [
            { type: core.Injectable }
        ];
        /** @nocollapse */
        NavHome.ctorParameters = function () { return [
            { type: dbwebCore.CurrentService },
            { type: NavtreeService },
            { type: dbwebCore.ProjectService }
        ]; };
        return NavHome;
    }());
    if (false) {
        /** @type {?} */
        NavHome.prototype.portraitURL;
        /** @type {?} */
        NavHome.prototype.chatMessages;
        /** @type {?} */
        NavHome.prototype.messageBody;
        /** @type {?} */
        NavHome.prototype.unread;
        /** @type {?} */
        NavHome.prototype.openNodeCurrent;
        /** @type {?} */
        NavHome.prototype.activeNode;
        /** @type {?} */
        NavHome.prototype.subs;
        /**
         * @type {?}
         * @private
         */
        NavHome.prototype.current;
        /**
         * @type {?}
         * @private
         */
        NavHome.prototype.database;
        /**
         * @type {?}
         * @private
         */
        NavHome.prototype.prj;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var FileFlatNode = /** @class */ (function () {
        function FileFlatNode(expandable, filename, level, type) {
            this.expandable = expandable;
            this.filename = filename;
            this.level = level;
            this.type = type;
        }
        return FileFlatNode;
    }());
    if (false) {
        /** @type {?} */
        FileFlatNode.prototype.expandable;
        /** @type {?} */
        FileFlatNode.prototype.filename;
        /** @type {?} */
        FileFlatNode.prototype.level;
        /** @type {?} */
        FileFlatNode.prototype.type;
    }
    var HomeNavComponent = /** @class */ (function () {
        function HomeNavComponent(nav, current, eles, database, auth, routeEle, prj, navMain, router, tabs) {
            var _this = this;
            this.nav = nav;
            this.current = current;
            this.eles = eles;
            this.database = database;
            this.auth = auth;
            this.routeEle = routeEle;
            this.prj = prj;
            this.navMain = navMain;
            this.router = router;
            this.tabs = tabs;
            // 是正常导航还是简略导航
            this.isMinNav = true;
            // 是否打开对话框
            this.isOpenDialog = false;
            this.navItems = [];
            this._getChildren = (/**
             * @param {?} node
             * @return {?}
             */
            function (node) { return node.children; });
            this.isMinNav = this.navMain.getCurrent();
            this.navMain.navMin.subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.switchNavToMin(v);
            }));
            this.current.change$.subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                if (v && v.HeadPortrait) {
                    _this.nav.portraitURL = v.portraitURL;
                }
                else {
                    _this.nav.portraitURL = portraitDefault;
                }
            }));
        }
        /**
         * @param {?} v
         * @return {?}
         */
        HomeNavComponent.prototype.switchNavToMin = /**
         * @param {?} v
         * @return {?}
         */
        function (v) {
            var _this = this;
            if (v === this.isMinNav) {
                return;
            }
            setTimeout((/**
             * @return {?}
             */
            function () {
                _this.isMinNav = v;
            }), 300);
            if (v) {
                this.maxNavContainer.nativeElement.style.width = '80px';
                this.maxNavContainer.nativeElement.style.transition = 'all 0.3s';
            }
            else {
                this.minNavContainer.nativeElement.style.width = '240px';
                this.minNavContainer.nativeElement.style.transition = 'all 0.3s';
            }
        };
        /**
         * @return {?}
         */
        HomeNavComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.nestedTreeControl = new tree$1.NestedTreeControl(this._getChildren);
            this.nestedDataSource = new tree.MatTreeNestedDataSource();
            this.nestedDataSource.data = this.database.root.children;
            // this.buttonHight();
            this.navItems = this.nestedDataSource.data;
            this.nav.subs.push(this.routeEle.currentElementListen.subscribe((/**
             * @param {?} e
             * @return {?}
             */
            function (e) {
                // 偶尔会出现e未null的情况,原因未探查,等有时间再改造
                if (e && e.element) {
                    _this.currentNode = null;
                    _this.obtainNode(e.element.Name, _this.navItems);
                    if (_this.nav.activeNode.length !== 0 && _this.currentNode !== null) {
                        _this.nav.activeNode.splice(0, _this.nav.activeNode.length);
                    }
                    if (_this.nav.openNodeCurrent.length !== 0 && _this.currentNode !== null) {
                        _this.nav.openNodeCurrent.splice(0, _this.nav.openNodeCurrent.length);
                    }
                    if (_this.currentNode !== null) {
                        _this.nav.recursionFuns(_this.currentNode);
                        _this.nav.recursionFun(_this.currentNode);
                    }
                }
            })));
            this.nav.messages();
        };
        /**
         * @return {?}
         */
        HomeNavComponent.prototype.ngOnDestroy = /**
         * @return {?}
         */
        function () {
            this.nav.subs.forEach((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.unsubscribe(); }));
        };
        /**
         * @return {?}
         */
        HomeNavComponent.prototype.logout = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.router
                .navigateByUrl('/login' + '/' + this.prj.apiNav()[0] + '/' + this.prj.apiNav()[1] + '/login')
                .then((/**
             * @return {?}
             */
            function () {
                // 必须要在路由切换之后,因为只有切换后,才会在reuse中存在,才能clear
                _this.tabs.clear(); // 一定要先清除所有的tab页面,用于取消订阅curr的变化
                _this.auth.logoutDefault().subscribe();
            }));
        };
        /**
         * @param {?} _
         * @param {?} nodeData
         * @return {?}
         */
        HomeNavComponent.prototype.hasNestedChild = /**
         * @param {?} _
         * @param {?} nodeData
         * @return {?}
         */
        function (_, nodeData) {
            return !!nodeData.children && nodeData.children.length > 0;
        };
        // 对话框显示
        // 对话框显示
        /**
         * @return {?}
         */
        HomeNavComponent.prototype.openDialog = 
        // 对话框显示
        /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.isOpenDialog = true;
            // this.unread = null;
            setTimeout((/**
             * @return {?}
             */
            function () {
                _this.dialogScrolls();
            }), 0);
        };
        /**
         * @return {?}
         */
        HomeNavComponent.prototype.closeDialog = /**
         * @return {?}
         */
        function () {
            this.isOpenDialog = false;
        };
        // 获取当前节点的node
        // 获取当前节点的node
        /**
         * @param {?} title
         * @param {?} navItems
         * @return {?}
         */
        HomeNavComponent.prototype.obtainNode = 
        // 获取当前节点的node
        /**
         * @param {?} title
         * @param {?} navItems
         * @return {?}
         */
        function (title, navItems) {
            for (var i = 0; i <= navItems.length - 1; i++) {
                if (navItems[i].name === title) {
                    this.currentNode = navItems[i];
                }
                if (navItems[i].children !== undefined && this.currentNode == null) {
                    this.obtainNode(title, navItems[i].children);
                }
            }
        };
        /**
         * @return {?}
         */
        HomeNavComponent.prototype.sendMessage = /**
         * @return {?}
         */
        function () {
            var _this = this;
            if (this.nav.messageBody) {
                this.current.wsChat.next({
                    Creator: this.prj.Creator(),
                    Project: this.prj.Name(),
                    From: this.current.data.UserName,
                    Addr: '',
                    Time: null,
                    Data: this.nav.messageBody
                });
                this.nav.messageBody = '';
            }
            setTimeout((/**
             * @return {?}
             */
            function () {
                _this.dialogScrolls();
            }), 0);
        };
        // 输入框的回车事件
        // 输入框的回车事件
        /**
         * @param {?} e
         * @return {?}
         */
        HomeNavComponent.prototype.keyDown = 
        // 输入框的回车事件
        /**
         * @param {?} e
         * @return {?}
         */
        function (e) {
            /** @type {?} */
            var ev = window.event || e;
            // 13是键盘上面固定的回车键
            if (ev.keyCode === 13) {
                // 你要执行的方法
                this.sendMessage();
            }
        };
        // 将聊天窗口滚动条滚至最下方
        // 将聊天窗口滚动条滚至最下方
        /**
         * @return {?}
         */
        HomeNavComponent.prototype.dialogScrolls = 
        // 将聊天窗口滚动条滚至最下方
        /**
         * @return {?}
         */
        function () {
            if (this.dialogScroll == null) {
                return;
            }
            this.nav.unread = null;
            this.dialogScroll.nativeElement.scrollTop = this.dialogScroll.nativeElement.scrollHeight;
        };
        // 判断是否已阅读最新消息
        // 判断是否已阅读最新消息
        /**
         * @return {?}
         */
        HomeNavComponent.prototype.isNews = 
        // 判断是否已阅读最新消息
        /**
         * @return {?}
         */
        function () {
            /** @type {?} */
            var isScrolledToBottom = this.dialogScroll.nativeElement.scrollHeight - this.dialogScroll.nativeElement.clientHeight <=
                this.dialogScroll.nativeElement.scrollTop + 1;
            if (isScrolledToBottom) {
                this.nav.unread = null;
            }
        };
        HomeNavComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-home-nav',
                        template: "<div *ngIf=\"!isMinNav\" #maxNavContainer class=\"max-nav-container nav-container\">\r\n\t<div class=\"nav-top\">\r\n\t\t<div class=\"nav-title\">\r\n\t\t\t<div class=\"nav-title-logo\"><img [src]=\"prj.logoImageURL()\" /></div>\r\n\t\t\t<div class=\"nav-title-name\">\r\n\t\t\t\t<p\r\n\t\t\t\t\t[ngClass]=\"{'projectLabelMin': prj.projectLabelForShort.length>6}\">\r\n\t\t\t\t\t{{ prj.projectLabelForShort }}</p>\r\n\t\t\t\t<common-nav-selection-dept [isMinNav]=\"isMinNav\">\r\n\t\t\t\t</common-nav-selection-dept>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div (click)=\"switchNavToMin(!isMinNav)\" class=\"nav-switch\">\r\n\t\t\t<mat-icon svgIcon=\"chevron_left\"></mat-icon>\r\n\t\t</div>\r\n\t</div>\r\n\t<mat-divider class=\"nav-divider\"></mat-divider>\r\n\t<div class=\"\u5BFC\u822A\u6811\">\r\n\t\t<div class=\"slider slider-color\"></div>\r\n\t\t<mat-tree [dataSource]=\"nestedDataSource\" [treeControl]=\"nestedTreeControl\" class=\"example-tree\">\r\n\t\t\t<mat-tree-node *matTreeNodeDef=\"let node; index as i\" matTreeNodeToggle>\r\n\t\t\t\t<li (click)=\"nav.gradually(node)\" class=\"mat-tree-node\">\r\n\t\t\t\t\t<button [class.collapsed]=\"nav.activeNode.includes(node)\" [routerLink]=\"[node.url]\" mat-button\r\n\t\t\t\t\t\tclass=\"\u5BFC\u822A\u6309\u94AE\u60AC\u6D6E\u8272\">\r\n\t\t\t\t\t\t<mat-icon *ngIf=\"node.iconName\" class=\"menu-icon\" [svgIcon]=\"node.iconName\"></mat-icon>\r\n\t\t\t\t\t\t{{ node.title }}\r\n\t\t\t\t\t</button>\r\n\t\t\t\t</li>\r\n\t\t\t</mat-tree-node>\r\n\t\t\t<mat-nested-tree-node *matTreeNodeDef=\"let node; when: hasNestedChild; let i = index\" matTreeNodePadding>\r\n\t\t\t\t<div class=\"max-menu\" [class.\u5206\u652F\u80CC\u666F]=\"nav.openNodeCurrent.includes(node)\">\r\n\t\t\t\t\t<div *ngIf=\"node.level == 0\" [ngClass]=\"{\r\n\t\t\t\t\t\t\t'slider-color': nav.activeNode.includes(node),\r\n\t\t\t\t\t\t\t'max-left-slider': nav.activeNode.includes(node)\r\n\t\t\t\t\t\t}\"></div>\r\n\t\t\t\t\t<div class=\"mat-tree-node\">\r\n\t\t\t\t\t\t<button [class.collapsed]=\"nav.activeNode.includes(node)\" mat-button matTreeNodeToggle\r\n\t\t\t\t\t\t\t[attr.aria-label]=\"'toggle ' + node.title\" (click)=\"nav.openNode(node)\" class=\"\u5BFC\u822A\u6309\u94AE\u60AC\u6D6E\u8272\">\r\n\t\t\t\t\t\t\t<mat-icon *ngIf=\"node.level == 0\" svgIcon=\"{{ node.iconName }}\">\r\n\t\t\t\t\t\t\t</mat-icon>\r\n\t\t\t\t\t\t\t{{ node.title }}\r\n\t\t\t\t\t\t\t<mat-icon *ngIf=\"node.level != 0\" class=\"mat-icon-rtl-mirror\" svgIcon=\"{{\r\n\t\t\t\t\t\t\t\t\tnav.openNodeCurrent.includes(node)\r\n\t\t\t\t\t\t\t\t\t\t? 'expand_more'\r\n\t\t\t\t\t\t\t\t\t\t: 'chevron_right'\r\n\t\t\t\t\t\t\t\t}}\">\r\n\t\t\t\t\t\t\t</mat-icon>\r\n\t\t\t\t\t\t</button>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<ul [class.example-tree-invisible]=\"\r\n\t\t\t\t\t\t\t!nav.openNodeCurrent.includes(node)\r\n\t\t\t\t\t\t\">\r\n\t\t\t\t\t\t<ng-container matTreeNodeOutlet></ng-container>\r\n\t\t\t\t\t</ul>\r\n\t\t\t\t</div>\r\n\t\t\t</mat-nested-tree-node>\r\n\t\t</mat-tree>\r\n\t</div>\r\n\t<div class=\"nav-bottom\">\r\n\t\t<mat-divider class=\"nav-divider\"></mat-divider>\r\n\t\t<a class=\"nav-bottom-photo\" [routerLink]=\"eles.frontElementURL('userinfo')\">\r\n\t\t\t<div><img [src]=\"nav.portraitURL\" /></div>\r\n\t\t\t<p class=\"\u6635\u79F0\">{{ current.data.NickName || current.data.UserName}}</p>\r\n\t\t</a>\r\n\t\t<div class=\"nav-bottom-icon\">\r\n\t\t\t<div (click)=\"openDialog()\">\r\n\t\t\t\t<mat-icon matBadge=\"{{ nav.unread }}\" matBadgeColor=\"warn\" matBadgeSize=\"medium\" svgIcon=\"mail\">\r\n\t\t\t\t</mat-icon>\r\n\t\t\t\t<p>\u6D88\u606F</p>\r\n\t\t\t</div>\r\n\t\t\t<div (click)=\"logout()\">\r\n\t\t\t\t<mat-icon svgIcon=\"forward\"></mat-icon>\r\n\t\t\t\t<p>\u9000\u51FA</p>\r\n\t\t\t</div>\r\n\t\t\t<div>\r\n\t\t\t\t<mat-icon svgIcon=\"help\"></mat-icon>\r\n\t\t\t\t<p>\u5E2E\u52A9</p>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\t<div *ngIf=\"isOpenDialog\" class=\"\u5BF9\u8BDD\u6846\">\r\n\t\t<div class=\"\u5BF9\u8BDD\u6846\u4E0A\u90E8\">\r\n\t\t\t<mat-icon (click)=\"closeDialog()\" svgIcon=\"expand_more\"></mat-icon>\r\n\t\t</div>\r\n\t\t<div #dialogScroll class=\"\u5BF9\u8BDD\u6846\u5185\u5BB9\">\r\n\t\t\t<p class=\"\u663E\u793A\u5BF9\u8BDD\" *ngFor=\"let message of nav.chatMessages\">\r\n\t\t\t\t[<span class=\"\u540D\u5B57\">{{ message.From }}</span>]\r\n\t\t\t\t<span class=\"\u65F6\u95F4\">{{\r\n\t\t\t\t\tmessage.Time | date: \"yyyy-MM-dd HH:mm:ss\"\r\n\t\t\t\t}}</span>\r\n\t\t\t\t<span class=\"\u5185\u5BB9\">{{ message.Data }}</span>\r\n\t\t\t</p>\r\n\t\t</div>\r\n\t\t<div class=\"\u5BF9\u8BDD\u6846\u5E95\u90E8\">\r\n\t\t\t<input mat-input class=\"\u8F93\u5165\u6846\" [(ngModel)]=\"nav.messageBody\" (keydown)=\"keyDown($event)\"\r\n\t\t\t\tplaceholder=\"\u8F93\u5165\u5185\u5BB9,\u56DE\u8F66\u53D1\u9001\" />\r\n\t\t\t<mat-icon (click)=\"sendMessage()\" svgIcon=\"send\"></mat-icon>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n<div *ngIf=\"isMinNav\" #minNavContainer class=\"min-nav-container nav-container\">\r\n\t<div class=\"min-logo\"><img [src]=\"prj.logoImageURL()\" /></div>\r\n\t<div>\r\n\t\t<common-nav-selection-dept [isMinNav]=\"isMinNav\">\r\n\t\t</common-nav-selection-dept>\r\n\t\t<mat-divider class=\"nav-divider\"></mat-divider>\r\n\t</div>\r\n\t<div class=\"\u5BFC\u822A\u6811\u5C0F\">\r\n\t\t<div class=\"min-slider slider-color\"></div>\r\n\t\t<div class=\"\u83DC\u5355\u9879\" *ngFor=\"let item of navItems; index as i\" [class.\u5F53\u524D\u83DC\u5355\u9879]=\"nav.activeNode.includes(item)\">\r\n\t\t\t<div [ngClass]=\"{\r\n\t\t\t\t\t'slider-color': nav.activeNode.includes(item),\r\n\t\t\t\t\t'left-slider': nav.activeNode.includes(item)\r\n\t\t\t\t}\"></div>\r\n\t\t\t<!-- Handle branch node buttons here -->\r\n\t\t\t<div *ngIf=\"item.children && item.children.length > 0\">\r\n\t\t\t\t<button mat-button class=\"\u5BFC\u822A\u6309\u94AE\u60AC\u6D6E\u8272\" [class.collapsed]=\"nav.activeNode.includes(item)\"\r\n\t\t\t\t\t[matMenuTriggerFor]=\"menu.childMenu\">\r\n\t\t\t\t\t<mat-icon svgIcon=\"{{ item.iconName }}\"></mat-icon>\r\n\t\t\t\t\t{{ item.title }}\r\n\t\t\t\t</button>\r\n\t\t\t\t<common-menu [class.treebranch]=\"true\" #menu [items]=\"item.children\" [activeNode]=\"nav.activeNode\"\r\n\t\t\t\t\t(fromChild)=\"nav.fromChildFunc($event)\"></common-menu>\r\n\t\t\t</div>\r\n\t\t\t<!-- Leaf node buttons here -->\r\n\t\t\t<div *ngIf=\"!item.children || item.children.length === 0\">\r\n\t\t\t\t<button mat-button class=\"\u5BFC\u822A\u6309\u94AE\u60AC\u6D6E\u8272\">\r\n\t\t\t\t\t<mat-icon svgIcon=\"{{ item.iconName }}\"></mat-icon>\r\n\t\t\t\t\t{{ item.title }}\r\n\t\t\t\t</button>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class=\"\u5BFC\u822A\u5E95\u90E8\u5C0F\">\r\n\t\t<mat-divider class=\"nav-divider\"></mat-divider>\r\n\t\t<button (click)=\"switchNavToMin(!isMinNav)\" mat-button>\r\n\t\t\t<mat-icon svgIcon=\"chevron_right\"></mat-icon>\u5C55\u5F00\r\n\t\t</button>\r\n\t\t<a class=\"nav-bottom-photo\" [routerLink]=\"eles.frontElementURL('userinfo')\">\r\n\t\t\t<div class=\"nav-bottom-photo-img\"><img [src]=\"nav.portraitURL\" /></div>\r\n\t\t\t<p class=\"\u6635\u79F0\">{{ current.data.NickName||current.data.UserName }}</p>\r\n\t\t</a>\r\n\t</div>\r\n</div>",
                        providers: [NavtreeService, NavHome],
                        styles: ["@charset \"UTF-8\";.max-nav-container{width:240px;height:100%;margin:0;padding:0;display:flex;flex-direction:column}.nav-top{width:100%;height:72px;display:flex;align-items:center;position:relative}.nav-top .nav-title{width:216px;height:48px;padding:0 8px 0 16px;display:flex}.nav-top .nav-title-logo{width:48px;height:48px}.nav-top .nav-title-logo img{width:100%;height:100%}.nav-top .nav-title-name{flex-grow:1;vertical-align:top;margin-left:8px;letter-spacing:1px}.nav-top .nav-title-name p{font-size:18px;width:100%;font-weight:700;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.nav-top .nav-title-name .projectLabelMin{font-size:14px}.nav-top .nav-switch{width:32px;height:32px;border-radius:16px 0 0 16px;background-color:rgba(255,255,255,.2);position:absolute;right:0;bottom:4px}.nav-top .nav-switch .mat-icon{margin:4px;cursor:pointer}.nav-divider{z-index:2}.nav-menu-item{font-size:14px;height:32px;line-height:32px}.nav-bottom{margin:0;width:100%;height:98px}.nav-bottom .nav-bottom-photo{margin:16px 8px 0 12px}.nav-bottom .nav-bottom-icon{float:right;width:116px;height:46px;margin:28px 19px 0 0;display:flex;flex-direction:row;justify-content:space-between}.nav-bottom .nav-bottom-icon div{height:100%;cursor:pointer}.nav-bottom .nav-bottom-icon div p{margin:0;font-size:12px;line-height:18px;opacity:.6}.nav-bottom-photo{width:80px;display:inline-block;text-align:center}.nav-bottom-photo div{width:40px;height:40px;border-radius:50%;margin:0 auto;background:url(/front/assets/home/portrait_default.png);overflow:hidden}.nav-bottom-photo div img{width:100%;height:100%}.nav-bottom-photo p{font-size:12px;margin-top:5px;text-align:center;color:#fff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.example-tree-invisible{display:none}.\u5BFC\u822A\u6811{flex-grow:1;overflow:auto;font-size:20px}.\u5BFC\u822A\u6811 .slider{width:2px;height:48px;display:none}.\u5BFC\u822A\u6811::-webkit-scrollbar-track{background-color:rgba(255,255,255,.06)}.\u5BFC\u822A\u6811::-webkit-scrollbar-track:hover{background-color:rgba(255,255,255,.12)}.\u5BFC\u822A\u6811::-webkit-scrollbar-thumb{background-color:#5e5e5e}.\u5BFC\u822A\u6811::-webkit-scrollbar-thumb:hover{background-color:silver}.\u5BFC\u822A\u6811 .example-tree li,.\u5BFC\u822A\u6811 .example-tree ul{margin-top:0;margin-bottom:0;list-style-type:none}.\u5BFC\u822A\u6811 .example-tree ul{padding-left:20px}.\u5BFC\u822A\u6811 .max-left-slider{width:2px;height:48px;float:left}.\u5BFC\u822A\u6811 .mat-tree-node button{font-size:16px}.\u5BFC\u822A\u6811 .\u7B2C\u4E09\u7EA7\u6ED1\u5757{width:2px;height:48px;background-color:rgba(255,255,255,.6);float:left}.\u5BFC\u822A\u6811 .mat-icon-rtl-mirror{float:right;margin:8px}.\u5BF9\u8BDD\u6846{width:240px;height:328px;background-color:#121212;position:absolute;left:0;bottom:2px;z-index:2;display:flex;flex-direction:column}.\u5BF9\u8BDD\u6846 .mat-icon{float:right;cursor:pointer}.\u5BF9\u8BDD\u6846\u5E95\u90E8 .\u8F93\u5165\u6846{width:184px;height:32px;box-sizing:border-box;border-radius:16px;padding:0 15px;margin:0 8px;line-height:30px;background-color:rgba(255,255,255,.36);border:0;outline:0;color:rgba(0,0,0,.87)}.\u5BF9\u8BDD\u6846\u5E95\u90E8 .\u8F93\u5165\u6846::-webkit-input-placeholder{color:rgba(0,0,0,.38)}.\u5BF9\u8BDD\u6846\u5E95\u90E8 .mat-icon{margin:4px 8px 4px 0;color:#ff9f1c}.\u5BF9\u8BDD\u6846\u5185\u5BB9{flex-grow:1;overflow-y:auto}.\u5BF9\u8BDD\u6846\u5185\u5BB9::-webkit-scrollbar{width:4px;height:4px;border-radius:2px}.\u5BF9\u8BDD\u6846\u5185\u5BB9::-webkit-scrollbar-track{border-radius:2px;background-color:rgba(255,255,255,.12)}.\u5BF9\u8BDD\u6846\u5185\u5BB9::-webkit-scrollbar-thumb{border-radius:2px;box-shadow:inset 0 2px 6px rgba(0,0,0,.3);background-color:#919191}.\u5BF9\u8BDD\u6846\u5185\u5BB9 .\u663E\u793A\u5BF9\u8BDD{width:90%;padding:0 5%;font-size:12px;color:#7ed321}.\u5BF9\u8BDD\u6846\u5185\u5BB9 .\u663E\u793A\u5BF9\u8BDD .\u65F6\u95F4{font-size:12px;color:rgba(255,255,255,.38);float:right;vertical-align:bottom}.\u5BF9\u8BDD\u6846\u5185\u5BB9 .\u663E\u793A\u5BF9\u8BDD .\u540D\u5B57{display:inline-block;max-width:108px;font-size:12px;color:#7ed321;vertical-align:bottom;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.\u5BF9\u8BDD\u6846\u5185\u5BB9 .\u663E\u793A\u5BF9\u8BDD .\u5185\u5BB9{display:block;font-size:12px;color:#fff;flex-grow:1;letter-spacing:.75px}.min-nav-container{width:80px;height:100%;margin:0;padding:12px 0 0;box-sizing:border-box;display:flex;flex-direction:column}.min-logo{width:40px;height:40px;margin:0 auto}.min-logo img{width:100%;height:100%}.\u5BFC\u822A\u6811\u5C0F{flex-grow:1;overflow-y:auto;overflow-x:hidden}.\u5BFC\u822A\u6811\u5C0F .min-slider{width:2px;height:80px;display:none}.\u5BFC\u822A\u6811\u5C0F .left-slider{width:2px;height:80px;position:absolute;left:0;top:0;z-index:99}.\u5BFC\u822A\u6811\u5C0F .mat-button{width:78px;text-align:center;padding:10px 0 10px 2px;margin:0}.\u5BFC\u822A\u6811\u5C0F .mat-icon{margin:0 auto;text-align:center;display:block}.\u5BFC\u822A\u6811\u5C0F .\u83DC\u5355\u9879{margin:4px 0;padding:0;height:80px;position:relative}.\u5BFC\u822A\u6811\u5C0F .\u5F53\u524D\u83DC\u5355\u9879{background-color:#252525}.\u5BFC\u822A\u5E95\u90E8\u5C0F{width:80px;flex-shrink:0;text-align:center;font-size:12px}.\u5BFC\u822A\u5E95\u90E8\u5C0F p{margin:8px 0}.\u5BFC\u822A\u5E95\u90E8\u5C0F .mat-icon{display:block;text-align:center;margin:0 auto;color:#fff}.\u5BFC\u822A\u5E95\u90E8\u5C0F button{width:80px;margin:8px 0 24px;font-size:12px;color:rgba(255,255,255,.6)}.\u5BFC\u822A\u5E95\u90E8\u5C0F .nav-bottom-photo-img{width:24px;height:24px}.treebranch{width:0}.\u5BFC\u822A\u6309\u94AE\u60AC\u6D6E\u8272::ng-deep .mat-button-focus-overlay{background-color:#fff}"]
                    }] }
        ];
        /** @nocollapse */
        HomeNavComponent.ctorParameters = function () { return [
            { type: NavHome },
            { type: dbwebCore.CurrentService },
            { type: dbwebCore.ElementsService },
            { type: NavtreeService },
            { type: dbwebCore.AuthloginService },
            { type: dbwebCore.RouteElementService },
            { type: dbwebCore.ProjectService },
            { type: MainNavService },
            { type: router.Router },
            { type: TabsService }
        ]; };
        HomeNavComponent.propDecorators = {
            dialogScroll: [{ type: core.ViewChild, args: ['dialogScroll', { static: false },] }],
            maxNavContainer: [{ type: core.ViewChild, args: ['maxNavContainer', { static: false },] }],
            minNavContainer: [{ type: core.ViewChild, args: ['minNavContainer', { static: false },] }]
        };
        return HomeNavComponent;
    }());
    if (false) {
        /** @type {?} */
        HomeNavComponent.prototype.dialogScroll;
        /** @type {?} */
        HomeNavComponent.prototype.maxNavContainer;
        /** @type {?} */
        HomeNavComponent.prototype.minNavContainer;
        /** @type {?} */
        HomeNavComponent.prototype.isMinNav;
        /** @type {?} */
        HomeNavComponent.prototype.isOpenDialog;
        /** @type {?} */
        HomeNavComponent.prototype.nestedTreeControl;
        /** @type {?} */
        HomeNavComponent.prototype.nestedDataSource;
        /** @type {?} */
        HomeNavComponent.prototype.treeControl;
        /** @type {?} */
        HomeNavComponent.prototype.treeFlattener;
        /** @type {?} */
        HomeNavComponent.prototype.dataSource;
        /** @type {?} */
        HomeNavComponent.prototype.currentNode;
        /** @type {?} */
        HomeNavComponent.prototype.navItems;
        /** @type {?} */
        HomeNavComponent.prototype.chatObservable;
        /** @type {?} */
        HomeNavComponent.prototype._getChildren;
        /** @type {?} */
        HomeNavComponent.prototype.nav;
        /** @type {?} */
        HomeNavComponent.prototype.current;
        /** @type {?} */
        HomeNavComponent.prototype.eles;
        /** @type {?} */
        HomeNavComponent.prototype.database;
        /**
         * @type {?}
         * @private
         */
        HomeNavComponent.prototype.auth;
        /**
         * @type {?}
         * @private
         */
        HomeNavComponent.prototype.routeEle;
        /** @type {?} */
        HomeNavComponent.prototype.prj;
        /** @type {?} */
        HomeNavComponent.prototype.navMain;
        /**
         * @type {?}
         * @private
         */
        HomeNavComponent.prototype.router;
        /**
         * @type {?}
         * @private
         */
        HomeNavComponent.prototype.tabs;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var MenuComponent = /** @class */ (function () {
        function MenuComponent() {
            this.fromChild = new core.EventEmitter();
        }
        /**
         * @return {?}
         */
        MenuComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        /**
         * @param {?} i
         * @param {?} node
         * @return {?}
         */
        MenuComponent.prototype.subscripts = /**
         * @param {?} i
         * @param {?} node
         * @return {?}
         */
        function (i, node) {
            this.fromChild.emit(node);
        };
        /**
         * @param {?} item
         * @return {?}
         */
        MenuComponent.prototype.fromChildFunc = /**
         * @param {?} item
         * @return {?}
         */
        function (item) {
            this.fromChild.emit(item);
        };
        MenuComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-menu',
                        template: "<mat-menu #childMenu=\"matMenu\" [overlapTrigger]=\"false\">\r\n\t<span *ngFor=\"let child of items; let i = index\">\r\n\t\t<!-- Handle branch node menu items -->\r\n\t\t<span *ngIf=\"child.children && child.children.length > 0\">\r\n\t\t\t<button mat-menu-item [matMenuTriggerFor]=\"menu.childMenu\"\r\n\t\t\t\t[class.collapsed]=\"activeNode.includes(child)\">\r\n\t\t\t\t<span>{{ child.title }}</span>\r\n\t\t\t</button>\r\n\t\t\t<common-menu #menu [items]=\"child.children\"\r\n\t\t\t\t[activeNode]=\"activeNode\" (fromChild)=\"fromChildFunc($event)\">\r\n\t\t\t</common-menu>\r\n\t\t</span>\r\n\t\t<!-- Handle leaf node menu items -->\r\n\t\t<span *ngIf=\"!child.children || child.children.length === 0\"\r\n\t\t\t(click)=\"subscripts(i, child)\">\r\n\t\t\t<button mat-menu-item routerLink=\"{{ child.url }}\"\r\n\t\t\t\t[class.collapsed]=\"activeNode.includes(child)\">\r\n\t\t\t\t<mat-icon *ngIf=\"child.iconName\" [svgIcon]=\"child.iconName\">\r\n\t\t\t\t</mat-icon> <span>{{ child.title }}</span>\r\n\t\t\t</button>\r\n\t\t</span>\r\n\t</span>\r\n</mat-menu>",
                        styles: [""]
                    }] }
        ];
        /** @nocollapse */
        MenuComponent.ctorParameters = function () { return []; };
        MenuComponent.propDecorators = {
            items: [{ type: core.Input }],
            activeNode: [{ type: core.Input }],
            fromChild: [{ type: core.Output }],
            childMenu: [{ type: core.ViewChild, args: ['childMenu', { static: true },] }]
        };
        return MenuComponent;
    }());
    if (false) {
        /** @type {?} */
        MenuComponent.prototype.items;
        /** @type {?} */
        MenuComponent.prototype.activeNode;
        /** @type {?} */
        MenuComponent.prototype.fromChild;
        /** @type {?} */
        MenuComponent.prototype.childMenu;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /** @type {?} */
    var eleSetDept = 'setdept';
    var SetDeptService = /** @class */ (function () {
        function SetDeptService(api, eles) {
            this.api = api;
            this.eles = eles;
        }
        /**
         * @param {?} code
         * @return {?}
         */
        SetDeptService.prototype.codeExists = /**
         * @param {?} code
         * @return {?}
         */
        function (code) {
            return this.api.get(this.eles.get(eleSetDept).URL, 'code-exists', this.eles.get(eleSetDept).SignStr, code);
        };
        SetDeptService.decorators = [
            { type: core.Injectable, args: [{
                        providedIn: 'root'
                    },] }
        ];
        /** @nocollapse */
        SetDeptService.ctorParameters = function () { return [
            { type: dbwebCore.ApiService },
            { type: dbwebCore.ElementsService }
        ]; };
        /** @nocollapse */ SetDeptService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function SetDeptService_Factory() { return new SetDeptService(core.ɵɵinject(dbwebCore.ApiService), core.ɵɵinject(dbwebCore.ElementsService)); }, token: SetDeptService, providedIn: "root" });
        return SetDeptService;
    }());
    if (false) {
        /**
         * @type {?}
         * @private
         */
        SetDeptService.prototype.api;
        /**
         * @type {?}
         * @private
         */
        SetDeptService.prototype.eles;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var SetDeptComponent = /** @class */ (function () {
        function SetDeptComponent(dialogRef, current, eles, setDeptService) {
            this.dialogRef = dialogRef;
            this.current = current;
            this.eles = eles;
            this.setDeptService = setDeptService;
            /** @type {?} */
            var This = this;
            this.newCode = new forms.FormControl(this.current.data.Dept.Code, [
                forms.Validators.required,
                (/**
                 * @param {?} control
                 * @return {?}
                 */
                function (control) {
                    if (!control.value.startsWith(This.current.data.UserDept.Code)) {
                        return { owner: true };
                    }
                    return null;
                })
            ], (/**
             * @param {?} control
             * @return {?}
             */
            function (control) {
                return setDeptService.codeExists(control.value).pipe(operators.map((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) { return (v ? null : { exists: true }); })));
            }));
            this.newCode.markAsTouched();
        }
        /**
         * @return {?}
         */
        SetDeptComponent.prototype.getErrorMessage = /**
         * @return {?}
         */
        function () {
            return this.newCode.hasError('required')
                ? '你必须录入一个代码'
                : this.newCode.hasError('owner')
                    ? "\u5FC5\u987B\u4EE5 " + this.current.data.UserDept.Code + " \u5F00\u5934"
                    : this.newCode.hasError('exists')
                        ? "\u4EE3\u7801 " + this.newCode.value + " \u4E0D\u5B58\u5728"
                        : '';
        };
        /**
         * @return {?}
         */
        SetDeptComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        /**
         * @return {?}
         */
        SetDeptComponent.prototype.clickOk = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.current
                .switchDept(this.newCode.value, this.eles.get(dbwebCore.eleSwitchDept).SignStr)
                .subscribe((/**
             * @return {?}
             */
            function () { return _this.dialogRef.close(); }));
        };
        /**
         * @return {?}
         */
        SetDeptComponent.prototype.codeEnter = /**
         * @return {?}
         */
        function () {
            if (!this.newCode.invalid) {
                this.clickOk();
            }
        };
        SetDeptComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-set-dept',
                        template: "<h1 mat-dialog-title>\u8BBE\u7F6E\u90E8\u95E8\u4EE3\u7801</h1>\n<div mat-dialog-content>\n  <mat-form-field>\n    <input matInput placeholder=\"\u8BF7\u5F55\u5165\u65B0\u7684\u90E8\u95E8\u4EE3\u7801\" [formControl]=\"newCode\" required (keyup.enter)=\"codeEnter()\" />\n    <mat-error *ngIf=\"newCode.invalid\">{{ getErrorMessage() }}</mat-error>\n  </mat-form-field>\n</div>\n<mat-dialog-actions align=\"end\">\n  <button mat-button mat-stroked-button (click)=\"clickOk()\" [disabled]=\"newCode.invalid\">\u786E\u5B9A</button>\n</mat-dialog-actions>\n",
                        styles: [""]
                    }] }
        ];
        /** @nocollapse */
        SetDeptComponent.ctorParameters = function () { return [
            { type: dialog.MatDialogRef },
            { type: dbwebCore.CurrentService },
            { type: dbwebCore.ElementsService },
            { type: SetDeptService }
        ]; };
        return SetDeptComponent;
    }());
    if (false) {
        /** @type {?} */
        SetDeptComponent.prototype.newCode;
        /** @type {?} */
        SetDeptComponent.prototype.dialogRef;
        /** @type {?} */
        SetDeptComponent.prototype.current;
        /**
         * @type {?}
         * @private
         */
        SetDeptComponent.prototype.eles;
        /**
         * @type {?}
         * @private
         */
        SetDeptComponent.prototype.setDeptService;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var NavSelectionDeptComponent = /** @class */ (function () {
        function NavSelectionDeptComponent(dialog, eles, current) {
            this.dialog = dialog;
            this.eles = eles;
            this.current = current;
        }
        /**
         * @return {?}
         */
        NavSelectionDeptComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        /**
         * @return {?}
         */
        NavSelectionDeptComponent.prototype.customDept = /**
         * @return {?}
         */
        function () {
            /** @type {?} */
            var dialogRef = this.dialog.open(SetDeptComponent, {
                width: '250px'
            });
            dialogRef.afterClosed().subscribe((/**
             * @return {?}
             */
            function () {
                console.log('The dialog was closed');
            }));
        };
        /**
         * @param {?} code
         * @return {?}
         */
        NavSelectionDeptComponent.prototype.switchDept = /**
         * @param {?} code
         * @return {?}
         */
        function (code) {
            // 必须调用subscribe,否则不会运行
            this.current.switchDept(code, this.eles.get(dbwebCore.eleSwitchDept).SignStr).subscribe();
        };
        NavSelectionDeptComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-nav-selection-dept',
                        template: "<button\r\n\tmat-button\r\n\tclass=\"max-top-menu \u5BFC\u822A\u6309\u94AE\u60AC\u6D6E\u8272\"\r\n\t[ngClass]=\"{\r\n\t\t'max-top-menu': !isMinNav,\r\n\t\t'min-top-menu': isMinNav\r\n\t}\"\r\n\t[matMenuTriggerFor]=\"menu\"\r\n>\r\n\t<span>{{\r\n\t\t(current.change$ | async)?.UserName +\r\n\t\t\t' ' +\r\n\t\t\t(current.change$ | async)?.Dept.Code +\r\n\t\t\t'.' +\r\n\t\t\t(current.change$ | async)?.Dept.Name\r\n\t}}</span>\r\n\t<mat-icon svgIcon=\"arrow_drop_down\"></mat-icon>\r\n</button>\r\n<mat-menu class=\"nav-menu\" #menu=\"matMenu\">\r\n\t<button mat-menu-item class=\"nav-menu-item\" (click)=\"customDept()\"><span>\u6307\u5B9A\u5904\u7406\u5730</span></button>\r\n\t<mat-divider *ngIf=\"(current.change$ | async)?.ToRootDept.length > 0\"> </mat-divider>\r\n\t<button\r\n\t\tmat-menu-item\r\n\t\tclass=\"nav-menu-item\"\r\n\t\t*ngFor=\"let oneDept of (current.change$ | async)?.ToRootDept\"\r\n\t\t(click)=\"switchDept(oneDept.Code)\"\r\n\t>\r\n\t\t<span>{{ oneDept.Code }}.{{ oneDept.Name }}</span>\r\n\t</button>\r\n\t<mat-divider *ngIf=\"(current.change$ | async)?.NextLevelDept.length > 0\"> </mat-divider>\r\n\t<button\r\n\t\tmat-menu-item\r\n\t\tclass=\"nav-menu-item\"\r\n\t\t*ngFor=\"let oneDept of (current.change$ | async)?.NextLevelDept\"\r\n\t\t(click)=\"switchDept(oneDept.Code)\"\r\n\t>\r\n\t\t<span>{{ oneDept.Code }}.{{ oneDept.Name }}</span>\r\n\t</button>\r\n</mat-menu>\r\n",
                        styles: [".nav-menu-item{font-size:14px;height:32px;line-height:32px}.max-top-menu{margin:0;height:24px;line-height:24px;padding-left:0}.max-top-menu span{width:104px;padding:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.min-top-menu{width:80px;padding:0;text-align:center;overflow:hidden}.min-top-menu span{display:inline-block;width:60px;padding:0;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}"]
                    }] }
        ];
        /** @nocollapse */
        NavSelectionDeptComponent.ctorParameters = function () { return [
            { type: material.MatDialog },
            { type: dbwebCore.ElementsService },
            { type: dbwebCore.CurrentService }
        ]; };
        NavSelectionDeptComponent.propDecorators = {
            isMinNav: [{ type: core.Input }]
        };
        return NavSelectionDeptComponent;
    }());
    if (false) {
        /** @type {?} */
        NavSelectionDeptComponent.prototype.isMinNav;
        /** @type {?} */
        NavSelectionDeptComponent.prototype.dialog;
        /** @type {?} */
        NavSelectionDeptComponent.prototype.eles;
        /** @type {?} */
        NavSelectionDeptComponent.prototype.current;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    // Directive to retrieve mat-tab options from router-tab.component.html
    var RouterTab = /** @class */ (function () {
        function RouterTab(tab, routerLink) {
            this.tab = tab;
            this.routerLink = routerLink;
        }
        RouterTab.decorators = [
            { type: core.Directive, args: [{
                        // tslint:disable-next-line:directive-selector
                        selector: 'mat-tab[routerLink]'
                    },] }
        ];
        /** @nocollapse */
        RouterTab.ctorParameters = function () { return [
            { type: tabs.MatTab },
            { type: router.RouterLink }
        ]; };
        RouterTab.propDecorators = {
            routerLinkActiveOptions: [{ type: core.Input }]
        };
        return RouterTab;
    }());
    if (false) {
        /** @type {?} */
        RouterTab.prototype.routerLinkActiveOptions;
        /** @type {?} */
        RouterTab.prototype.tab;
        /** @type {?} */
        RouterTab.prototype.routerLink;
    }
    // Directive to set tabs within app-router-tab
    // tslint:disable-next-line:directive-selector
    var RouterTabItem = /** @class */ (function () {
        function RouterTabItem() {
        }
        RouterTabItem.decorators = [
            { type: core.Directive, args: [{ selector: 'app-router-tab-item' },] }
        ];
        RouterTabItem.propDecorators = {
            routerLink: [{ type: core.Input }],
            routerLinkActiveOptions: [{ type: core.Input }],
            actives: [{ type: core.Input }],
            disabled: [{ type: core.Input, args: ['disabled',] }],
            label: [{ type: core.Input }]
        };
        return RouterTabItem;
    }());
    if (false) {
        /** @type {?} */
        RouterTabItem.prototype.routerLink;
        /** @type {?} */
        RouterTabItem.prototype.routerLinkActiveOptions;
        /** @type {?} */
        RouterTabItem.prototype.actives;
        /** @type {?} */
        RouterTabItem.prototype.disabled;
        /** @type {?} */
        RouterTabItem.prototype.label;
    }
    // RouterTab component with the same behavior than mat-tab-nav-bar
    var RouterTabComponent = /** @class */ (function () {
        function RouterTabComponent(router, tabs) {
            this.router = router;
            this.tabs = tabs;
            this.subscription = new rxjs.Subscription();
        }
        /**
         * @param {?} event
         * @param {?} index
         * @return {?}
         */
        RouterTabComponent.prototype.dragStart = /**
         * @param {?} event
         * @param {?} index
         * @return {?}
         */
        function (event, index) {
            this.tabBool = index;
            this.oldTab = this.tabs.active;
        };
        /**
         * @param {?} event
         * @return {?}
         */
        RouterTabComponent.prototype.dragEnded = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            this.tabBool = null;
        };
        /**
         * @param {?} event
         * @return {?}
         */
        RouterTabComponent.prototype.drop = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            var _this = this;
            // tslint:disable-next-line:radix
            /** @type {?} */
            var previousIndex = parseInt(event.previousContainer.id.replace('list-', ''));
            // tslint:disable-next-line:radix
            /** @type {?} */
            var currentIndex = parseInt(event.container.id.replace('list-', ''));
            if (previousIndex !== NaN &&
                currentIndex !== NaN &&
                previousIndex !== undefined &&
                currentIndex !== undefined &&
                previousIndex !== currentIndex) {
                // Do stuff
                // this.tabBool = null;
                // END Stuff
                dragDrop.moveItemInArray(this.tabs.tabs, previousIndex, currentIndex);
            }
            this.tabs.activeIndex = this.tabs.tabs.findIndex((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v === _this.oldTab; }));
        };
        /**
         * @param {?} index
         * @return {?}
         */
        RouterTabComponent.prototype.getAllListConnections = /**
         * @param {?} index
         * @return {?}
         */
        function (index) {
            /** @type {?} */
            var connections = [];
            for (var i = 0; i < this.tabs.tabs.length; i++) {
                if (i !== index) {
                    connections.push('list-' + i);
                }
            }
            return connections;
        };
        /**
         * @return {?}
         */
        RouterTabComponent.prototype.ngAfterViewInit = /**
         * @return {?}
         */
        function () {
            // Remove tab click event
            this.matTabGroup._handleClick = (/**
             * @return {?}
             */
            function () { });
            // Select current tab depending on url
            this.setIndex();
            // Subscription to navigation change
            // this.subscription.add(
            // 	this.router.events.subscribe(e => {
            // 		if (e instanceof NavigationEnd) {
            // 			setTimeout(() => this.setIndex(), 0);
            // 		}
            // 	})
            // );
        };
        /**
         * @return {?}
         */
        RouterTabComponent.prototype.ngOnDestroy = /**
         * @return {?}
         */
        function () {
            this.subscription.unsubscribe();
        };
        /**
         * @param {?} u
         * @return {?}
         */
        RouterTabComponent.prototype.getURLPath = /**
         * @param {?} u
         * @return {?}
         */
        function (u) {
            return __spread(['/'], u.root.children['primary'].segments.map((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.path; })));
        };
        /**
         * @param {?} event
         * @param {?} index
         * @return {?}
         */
        RouterTabComponent.prototype.onTabsClick = /**
         * @param {?} event
         * @param {?} index
         * @return {?}
         */
        function (event, index) {
            if (this.tabs.activeIndex !== index) {
                this.router.navigateByUrl(this.tabs.tabs[index].url, {
                    state: this.tabs.tabs[index].data()
                });
            }
        };
        /**
         * @param {?} e
         * @param {?} index
         * @return {?}
         */
        RouterTabComponent.prototype.removeClick = /**
         * @param {?} e
         * @param {?} index
         * @return {?}
         */
        function (e, index) {
            if (this.tabs.removeTab(index)) {
                this.router.navigateByUrl(this.tabs.active.url, {
                    state: this.tabs.active.data()
                });
            }
            if (e && e.stopPropagation) {
                // 因此它支持W3C的stopPropagation()方法
                e.stopPropagation();
            }
            else {
                // 否则,我们需要使用IE的方式来取消事件冒泡
                window.event.cancelBubble = true;
            }
            return false;
        };
        // Set current selected tab depending on navigation
        // Set current selected tab depending on navigation
        /**
         * @private
         * @return {?}
         */
        RouterTabComponent.prototype.setIndex = 
        // Set current selected tab depending on navigation
        /**
         * @private
         * @return {?}
         */
        function () {
            var _this = this;
            this.routerTabs.find((/**
             * @param {?} tab
             * @param {?} i
             * @return {?}
             */
            function (tab, i) {
                if (!_this.router.isActive(tab.routerLink.urlTree, tab.routerLinkActiveOptions ? tab.routerLinkActiveOptions.exact : false)) {
                    return false;
                }
                // tab.tab.isActive = true;
                _this.tabs.activeIndex = i;
                // this.matTabGroup.selectedIndex = i;
                return true;
            }));
        };
        RouterTabComponent.decorators = [
            { type: core.Component, args: [{
                        // tslint:disable-next-line:component-selector
                        selector: 'app-router-tab',
                        template: "<mat-tab-group #matTabGroup class=\"hide-tab-wrapper\" [selectedIndex]=\"tabs.activeIndex\">\r\n\t<mat-tab\r\n\t\t*ngFor=\"let tab of tabs.tabs; let index = index\"\r\n\t\t[routerLink]=\"getURLPath(tab.url)\"\r\n\t\t[queryParams]=\"tab.url.queryParams\"\r\n\t>\r\n\t\t<ng-template mat-tab-label>\r\n\t\t\t<div\r\n\t\t\t\t[id]=\"'list-' + index\"\r\n\t\t\t\tclass=\"example-list router-tab-link\"\r\n\t\t\t\tcdkDropList\r\n\t\t\t\t(cdkDropListDropped)=\"drop($event)\"\r\n\t\t\t\t[cdkDropListConnectedTo]=\"getAllListConnections(index)\"\r\n\t\t\t>\r\n\t\t\t\t<a\r\n\t\t\t\t\tclass=\"example-box\"\r\n\t\t\t\t\t(click)=\"onTabsClick($event, index)\"\r\n\t\t\t\t\t(cdkDragStarted)=\"dragStart($event, index)\"\r\n\t\t\t\t\t(cdkDragEnded)=\"dragEnded($event)\"\r\n\t\t\t\t\tcdkDrag\r\n\t\t\t\t>\r\n\t\t\t\t\t<span class=\"example-custom-placeholder\" *cdkDragPlaceholder></span>\r\n\t\t\t\t\t<span [class.hide-tab]=\"index === matTabGroup.selectedIndex\" class=\"tabspan\">{{\r\n\t\t\t\t\t\ttab.titleObservable | async\r\n\t\t\t\t\t}}</span>\r\n\t\t\t\t\t<button (click)=\"removeClick($event, index)\" mat-icon-button class=\"tabButton\">\r\n\t\t\t\t\t\t<mat-icon\r\n\t\t\t\t\t\t\tsvgIcon=\"close\"\r\n\t\t\t\t\t\t\t[class.hide-tab]=\"index === matTabGroup.selectedIndex\"\r\n\t\t\t\t\t\t\tclass=\"example-tab-icon\"\r\n\t\t\t\t\t\t></mat-icon>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t</a>\r\n\t\t\t\t<a *ngIf=\"tabBool === index\" class=\"example-box drag-source\" cdkDrag>\r\n\t\t\t\t\t<span class=\"example-custom-placeholder\" *cdkDragPlaceholder></span>\r\n\t\t\t\t\t<span [class.hide-tab]=\"index === matTabGroup.selectedIndex\" class=\"tabspan\">{{ tab.titleObservable | async }}</span>\r\n\t\t\t\t\t<button mat-icon-button class=\"tabButton\">\r\n\t\t\t\t\t\t<mat-icon\r\n\t\t\t\t\t\t\tsvgIcon=\"close\"\r\n\t\t\t\t\t\t\t(click)=\"removeClick($event, index)\"\r\n\t\t\t\t\t\t\tclass=\"example-tab-icon\"\r\n\t\t\t\t\t\t></mat-icon>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t</a>\r\n\t\t\t</div>\r\n\t\t</ng-template>\r\n\t</mat-tab>\r\n</mat-tab-group>\r\n",
                        encapsulation: core.ViewEncapsulation.None,
                        styles: [".hide-tab-wrapper .mat-tab-body-wrapper{display:none!important}.mat-tab-label{height:30px!important;min-width:160px!important;line-height:30px;text-align:left;font-size:12px;display:block;opacity:1!important;padding:0!important;position:relative}.mat-tab-label .tabButton{position:absolute;right:0;top:-3px;height:30px;width:30px;line-height:30px}.mat-tab-label .tabButton .example-tab-icon{width:16px;height:16px}.router-tab-link{height:30px;min-width:160px}.example-list{background:#fff;border-radius:4px;overflow:hidden;display:block}.example-box{min-width:160px;height:30px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;box-sizing:content-box}.drag-source{opacity:.5}.cdk-drag-preview{width:100%;box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);opacity:.5;font-size:12px}.cdk-drag-preview .mat-button-wrapper{width:16px!important;height:16px!important}.cdk-drag-preview .mat-button-wrapper .example-tab-icon{width:16px;height:16px}.cdk-drag-placeholder{opacity:0}.tabspan{padding:0 30px 0 6px}.cdk-drag-animating{transition:transform 250ms cubic-bezier(0,0,.2,1);transition:transform 250ms cubic-bezier(0,0,.2,1),-webkit-transform 250ms cubic-bezier(0,0,.2,1)}.cdk-drop-list-dragging a{-webkit-transform:translate3d(0,0,0)!important;transform:translate3d(0,0,0)!important}.example-custom-placeholder{width:100%;height:100%;-webkit-transform:translateX(-100%);transform:translateX(-100%);transition:transform 250ms cubic-bezier(0,0,.2,1);transition:transform 250ms cubic-bezier(0,0,.2,1),-webkit-transform 250ms cubic-bezier(0,0,.2,1)}"]
                    }] }
        ];
        /** @nocollapse */
        RouterTabComponent.ctorParameters = function () { return [
            { type: router.Router },
            { type: TabsService }
        ]; };
        RouterTabComponent.propDecorators = {
            matTabGroup: [{ type: core.ViewChild, args: ['matTabGroup', { static: true },] }],
            routerTabItems: [{ type: core.ContentChildren, args: [RouterTabItem,] }],
            routerTabs: [{ type: core.ViewChildren, args: [RouterTab,] }],
            active: [{ type: core.Input }]
        };
        return RouterTabComponent;
    }());
    if (false) {
        /** @type {?} */
        RouterTabComponent.prototype.matTabGroup;
        /** @type {?} */
        RouterTabComponent.prototype.routerTabItems;
        /** @type {?} */
        RouterTabComponent.prototype.routerTabs;
        /** @type {?} */
        RouterTabComponent.prototype.tabpaixu;
        /** @type {?} */
        RouterTabComponent.prototype.tabBool;
        /** @type {?} */
        RouterTabComponent.prototype.oldTab;
        /** @type {?} */
        RouterTabComponent.prototype.active;
        /**
         * @type {?}
         * @private
         */
        RouterTabComponent.prototype.subscription;
        /**
         * @type {?}
         * @private
         */
        RouterTabComponent.prototype.router;
        /** @type {?} */
        RouterTabComponent.prototype.tabs;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var SetDeptModule = /** @class */ (function () {
        function SetDeptModule() {
        }
        SetDeptModule.decorators = [
            { type: core.NgModule, args: [{
                        imports: [
                            common.CommonModule,
                            forms.FormsModule,
                            forms.ReactiveFormsModule,
                            dialog.MatDialogModule,
                            input.MatInputModule,
                            formField.MatFormFieldModule,
                            button.MatButtonModule
                        ],
                        declarations: [SetDeptComponent],
                        entryComponents: [SetDeptComponent]
                    },] }
        ];
        return SetDeptModule;
    }());

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var HomeModule = /** @class */ (function () {
        function HomeModule() {
        }
        HomeModule.decorators = [
            { type: core.NgModule, args: [{
                        imports: [
                            common.CommonModule,
                            platformBrowser.BrowserModule,
                            ngxClipboard.ClipboardModule,
                            router.RouterModule,
                            icon.MatIconModule,
                            toolbar.MatToolbarModule,
                            sidenav.MatSidenavModule,
                            button.MatButtonModule,
                            menu.MatMenuModule,
                            divider.MatDividerModule,
                            tree.MatTreeModule,
                            badge.MatBadgeModule,
                            forms.FormsModule,
                            tabs.MatTabsModule,
                            dbwebCore.CoreModule,
                            core$1.MatRippleModule,
                            animations.BrowserAnimationsModule,
                            dragDrop.DragDropModule,
                            dialog.MatDialogModule,
                            SetDeptModule
                        ],
                        declarations: [
                            HomeComponent,
                            HomeNavComponent,
                            MenuComponent,
                            RouterTabComponent,
                            RouterTabItem,
                            RouterTab,
                            NavSelectionDeptComponent
                        ],
                        exports: [HomeComponent, RouterTabComponent, RouterTabItem, RouterTab],
                        entryComponents: [HomeNavComponent]
                    },] }
        ];
        return HomeModule;
    }());

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var PageNotFoundComponent = /** @class */ (function () {
        function PageNotFoundComponent(rele) {
            this.rele = rele;
        }
        /**
         * @return {?}
         */
        PageNotFoundComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.rele.currentElement.subscribe((/**
             * @param {?} ele
             * @return {?}
             */
            function (ele) { return (_this.element = ele.element); }));
        };
        PageNotFoundComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-page-not-found',
                        template: "<p>{{ element?.Controller }} not found.</p>\r\n",
                        styles: [""]
                    }] }
        ];
        /** @nocollapse */
        PageNotFoundComponent.ctorParameters = function () { return [
            { type: dbwebCore.RouteElementService }
        ]; };
        return PageNotFoundComponent;
    }());
    if (false) {
        /** @type {?} */
        PageNotFoundComponent.prototype.element;
        /**
         * @type {?}
         * @private
         */
        PageNotFoundComponent.prototype.rele;
    }

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

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /**
     * @record
     */
    function PromptDialogData() { }
    if (false) {
        /** @type {?} */
        PromptDialogData.prototype.title;
        /** @type {?} */
        PromptDialogData.prototype.prompt;
        /** @type {?} */
        PromptDialogData.prototype.value;
    }
    var PromptDialogComponent = /** @class */ (function () {
        function PromptDialogComponent(dialogRef, data) {
            this.dialogRef = dialogRef;
            this.data = data;
            this.hostClass = true;
        }
        /**
         * @return {?}
         */
        PromptDialogComponent.prototype.onNoClick = /**
         * @return {?}
         */
        function () {
            this.dialogRef.close();
        };
        /**
         * @return {?}
         */
        PromptDialogComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        PromptDialogComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-prompt-dialog',
                        template: "{{data.title}}\n<mat-dialog-content>\n\t{{data.prompt}}\n\n\t<mat-form-field>\n\t\t<input matInput cdkFocusInitial [(ngModel)]=\"data.value\">\n\t</mat-form-field>\n</mat-dialog-content>\n<mat-dialog-actions>\n\t<button mat-button (click)=\"onNoClick()\">No Thanks</button>\n\t<button mat-button [mat-dialog-close]=\"data.value\"\n\t\tcdkFocusInitial>Ok</button>\n</mat-dialog-actions>",
                        styles: [""]
                    }] }
        ];
        /** @nocollapse */
        PromptDialogComponent.ctorParameters = function () { return [
            { type: material.MatDialogRef },
            { type: undefined, decorators: [{ type: core.Inject, args: [material.MAT_DIALOG_DATA,] }] }
        ]; };
        PromptDialogComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.c-prompt-dialog',] }]
        };
        return PromptDialogComponent;
    }());
    if (false) {
        /** @type {?} */
        PromptDialogComponent.prototype.hostClass;
        /** @type {?} */
        PromptDialogComponent.prototype.inputString;
        /** @type {?} */
        PromptDialogComponent.prototype.dialogRef;
        /** @type {?} */
        PromptDialogComponent.prototype.data;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var PromptDialogModule = /** @class */ (function () {
        function PromptDialogModule() {
        }
        PromptDialogModule.decorators = [
            { type: core.NgModule, args: [{
                        declarations: [PromptDialogComponent],
                        imports: [common.CommonModule, material.MatDialogModule, material.MatButtonModule, material.MatFormFieldModule, material.MatInputModule, forms.FormsModule],
                        entryComponents: [PromptDialogComponent]
                    },] }
        ];
        return PromptDialogModule;
    }());

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    common.registerLocaleData(localeZh);
    var DBWebCommonModule = /** @class */ (function () {
        function DBWebCommonModule(ctrl) {
            /** @type {?} */
            var ctrlNameList = [CTRL_ELEMENT, CTRL_TASK, CTRL_ROLE, CTRL_USER, CTRL_NOTICE];
            ctrlNameList.forEach((/**
             * @param {?} ctrlName
             * @return {?}
             */
            function (ctrlName) {
                ctrl.register(ctrlName);
            }));
        }
        DBWebCommonModule.decorators = [
            { type: core.NgModule, args: [{
                        imports: [common.CommonModule, dbwebCore.CoreModule, HomeModule, PageNotFoundModule, ConfirmDialogModule, PromptDialogModule],
                        providers: [{ provide: core.LOCALE_ID, useValue: 'zh-Hans' }]
                    },] }
        ];
        /** @nocollapse */
        DBWebCommonModule.ctorParameters = function () { return [
            { type: dbwebCore.BillControllerService }
        ]; };
        return DBWebCommonModule;
    }());

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /** @type {?} */
    var iconList = [
        {
            nameSpace: '',
            list: [
                'filled/action/3d_rotation.svg',
                'filled/action/accessibility.svg',
                'filled/action/accessible.svg',
                'filled/action/account_balance.svg',
                'filled/action/account_balance_wallet.svg',
                'filled/action/account_box.svg',
                'filled/action/account_circle.svg',
                'filled/action/add_shopping_cart.svg',
                'filled/action/alarm.svg',
                'filled/action/alarm_add.svg',
                'filled/action/alarm_off.svg',
                'filled/action/alarm_on.svg',
                'filled/action/all_out.svg',
                'filled/action/android.svg',
                'filled/action/announcement.svg',
                'filled/action/aspect_ratio.svg',
                'filled/action/assessment.svg',
                'filled/action/assignment.svg',
                'filled/action/assignment_ind.svg',
                'filled/action/assignment_late.svg',
                'filled/action/assignment_return.svg',
                'filled/action/assignment_returned.svg',
                'filled/action/assignment_turned_in.svg',
                'filled/action/autorenew.svg',
                'filled/action/backup.svg',
                'filled/action/book.svg',
                'filled/action/bookmark.svg',
                'filled/action/bookmark_border.svg',
                'filled/action/bug_report.svg',
                'filled/action/build.svg',
                'filled/action/cached.svg',
                'filled/action/camera_enhance.svg',
                'filled/action/card_giftcard.svg',
                'filled/action/card_membership.svg',
                'filled/action/card_travel.svg',
                'filled/action/change_history.svg',
                'filled/action/check_circle.svg',
                'filled/action/chrome_reader_mode.svg',
                'filled/action/class.svg',
                'filled/action/code.svg',
                'filled/action/compare_arrows.svg',
                'filled/action/copyright.svg',
                'filled/action/credit_card.svg',
                'filled/action/dashboard.svg',
                'filled/action/date_range.svg',
                'filled/action/delete.svg',
                'filled/action/delete_forever.svg',
                'filled/action/delete_outline.svg',
                'filled/action/description.svg',
                'filled/action/dns.svg',
                'filled/action/done.svg',
                'filled/action/done_all.svg',
                'filled/action/donut_large.svg',
                'filled/action/donut_small.svg',
                'filled/action/eject.svg',
                'filled/action/euro_symbol.svg',
                'filled/action/event.svg',
                'filled/action/event_seat.svg',
                'filled/action/exit_to_app.svg',
                'filled/action/explore.svg',
                'filled/action/extension.svg',
                'filled/action/face.svg',
                'filled/action/favorite.svg',
                'filled/action/favorite_border.svg',
                'filled/action/feedback.svg',
                'filled/action/find_in_page.svg',
                'filled/action/find_replace.svg',
                'filled/action/fingerprint.svg',
                'filled/action/flight_land.svg',
                'filled/action/flight_takeoff.svg',
                'filled/action/flip_to_back.svg',
                'filled/action/flip_to_front.svg',
                'filled/action/gavel.svg',
                'filled/action/get_app.svg',
                'filled/action/gif.svg',
                'filled/action/grade.svg',
                'filled/action/group_work.svg',
                'filled/action/g_translate.svg',
                'filled/action/help.svg',
                'filled/action/help_outline.svg',
                'filled/action/highlight_off.svg',
                'filled/action/history.svg',
                'filled/action/home.svg',
                'filled/action/hourglass_empty.svg',
                'filled/action/hourglass_full.svg',
                'filled/action/http.svg',
                'filled/action/https.svg',
                'filled/action/important_devices.svg',
                'filled/action/info.svg',
                'filled/action/info_outline.svg',
                'filled/action/input.svg',
                'filled/action/invert_colors.svg',
                'filled/action/label.svg',
                'filled/action/label_outline.svg',
                'filled/action/language.svg',
                'filled/action/launch.svg',
                'filled/action/lightbulb_outline.svg',
                'filled/action/line_style.svg',
                'filled/action/line_weight.svg',
                'filled/action/list.svg',
                'filled/action/lock.svg',
                'filled/action/lock_open.svg',
                'filled/action/lock_outline.svg',
                'filled/action/loyalty.svg',
                'filled/action/markunread_mailbox.svg',
                'filled/action/motorcycle.svg',
                'filled/action/note_add.svg',
                'filled/action/offline_pin.svg',
                'filled/action/opacity.svg',
                'filled/action/open_in_browser.svg',
                'filled/action/open_in_new.svg',
                'filled/action/open_with.svg',
                'filled/action/pageview.svg',
                'filled/action/pan_tool.svg',
                'filled/action/payment.svg',
                'filled/action/perm_camera_m24px.svg',
                'filled/action/perm_contact_calendar.svg',
                'filled/action/perm_data_setting.svg',
                'filled/action/perm_device_information.svg',
                'filled/action/perm_identity.svg',
                'filled/action/perm_media.svg',
                'filled/action/perm_phone_msg.svg',
                'filled/action/perm_scan_wifi.svg',
                'filled/action/pets.svg',
                'filled/action/picture_in_picture.svg',
                'filled/action/picture_in_picture_alt.svg',
                'filled/action/play_for_work.svg',
                'filled/action/polymer.svg',
                'filled/action/power_settings_new.svg',
                'filled/action/pregnant_woman.svg',
                'filled/action/print.svg',
                'filled/action/query_builder.svg',
                'filled/action/question_answer.svg',
                'filled/action/receipt.svg',
                'filled/action/record_voice_over.svg',
                'filled/action/redeem.svg',
                'filled/action/remove_shopping_cart.svg',
                'filled/action/reorder.svg',
                'filled/action/report_problem.svg',
                'filled/action/restore.svg',
                'filled/action/restore_page.svg',
                'filled/action/room.svg',
                'filled/action/rounded_corner.svg',
                'filled/action/rowing.svg',
                'filled/action/schedule.svg',
                'filled/action/search.svg',
                'filled/action/settings.svg',
                'filled/action/settings_applications.svg',
                'filled/action/settings_backup_restore.svg',
                'filled/action/settings_bluetooth.svg',
                'filled/action/settings_brightness.svg',
                'filled/action/settings_cell.svg',
                'filled/action/settings_ethernet.svg',
                'filled/action/settings_input_antenna.svg',
                'filled/action/settings_input_component.svg',
                'filled/action/settings_input_composite.svg',
                'filled/action/settings_input_hdmi.svg',
                'filled/action/settings_input_svideo.svg',
                'filled/action/settings_overscan.svg',
                'filled/action/settings_phone.svg',
                'filled/action/settings_power.svg',
                'filled/action/settings_remote.svg',
                'filled/action/settings_voice.svg',
                'filled/action/shop.svg',
                'filled/action/shopping_basket.svg',
                'filled/action/shopping_cart.svg',
                'filled/action/shop_two.svg',
                'filled/action/speaker_notes.svg',
                'filled/action/speaker_notes_off.svg',
                'filled/action/spellcheck.svg',
                'filled/action/stars.svg',
                'filled/action/store.svg',
                'filled/action/subject.svg',
                'filled/action/supervisor_account.svg',
                'filled/action/swap_horiz.svg',
                'filled/action/swap_vert.svg',
                'filled/action/swap_vertical_circle.svg',
                'filled/action/system_update_alt.svg',
                'filled/action/tab.svg',
                'filled/action/tab_unselected.svg',
                'filled/action/theaters.svg',
                'filled/action/thumbs_up_down.svg',
                'filled/action/thumb_down.svg',
                'filled/action/thumb_up.svg',
                'filled/action/timeline.svg',
                'filled/action/toc.svg',
                'filled/action/today.svg',
                'filled/action/toll.svg',
                'filled/action/touch_app.svg',
                'filled/action/track_changes.svg',
                'filled/action/translate.svg',
                'filled/action/trending_down.svg',
                'filled/action/trending_flat.svg',
                'filled/action/trending_up.svg',
                'filled/action/turned_in.svg',
                'filled/action/turned_in_not.svg',
                'filled/action/update.svg',
                'filled/action/verified_user.svg',
                'filled/action/view_agenda.svg',
                'filled/action/view_array.svg',
                'filled/action/view_carousel.svg',
                'filled/action/view_column.svg',
                'filled/action/view_day.svg',
                'filled/action/view_headline.svg',
                'filled/action/view_list.svg',
                'filled/action/view_module.svg',
                'filled/action/view_quilt.svg',
                'filled/action/view_stream.svg',
                'filled/action/view_week.svg',
                'filled/action/visibility.svg',
                'filled/action/visibility_off.svg',
                'filled/action/watch_later.svg',
                'filled/action/work.svg',
                'filled/action/youtube_searched_for.svg',
                'filled/action/zoom_in.svg',
                'filled/action/zoom_out.svg',
                'filled/alert/add_alert.svg',
                'filled/alert/error.svg',
                'filled/alert/error_outline.svg',
                'filled/alert/warning.svg',
                'filled/av/add_to_queue.svg',
                'filled/av/airplay.svg',
                'filled/av/album.svg',
                'filled/av/art_track.svg',
                'filled/av/av_timer.svg',
                'filled/av/branding_watermark.svg',
                'filled/av/call_to_action.svg',
                'filled/av/closed_caption.svg',
                'filled/av/equalizer.svg',
                'filled/av/explicit.svg',
                'filled/av/fast_forward.svg',
                'filled/av/fast_rewind.svg',
                'filled/av/featured_play_list.svg',
                'filled/av/featured_video.svg',
                'filled/av/fiber_dvr.svg',
                'filled/av/fiber_manual_record.svg',
                'filled/av/fiber_new.svg',
                'filled/av/fiber_pin.svg',
                'filled/av/fiber_smart_record.svg',
                'filled/av/forward_10.svg',
                'filled/av/forward_30.svg',
                'filled/av/forward_5.svg',
                'filled/av/games.svg',
                'filled/av/hd.svg',
                'filled/av/hearing.svg',
                'filled/av/high_quality.svg',
                'filled/av/library_add.svg',
                'filled/av/library_books.svg',
                'filled/av/library_mus24px.svg',
                'filled/av/loop.svg',
                'filled/av/m24px.svg',
                'filled/av/mnone.svg',
                'filled/av/moff.svg',
                'filled/av/movie.svg',
                'filled/av/musvideo.svg',
                'filled/av/new_releases.svg',
                'filled/av/note.svg',
                'filled/av/not_interested.svg',
                'filled/av/pause.svg',
                'filled/av/pause_circle_filled.svg',
                'filled/av/pause_circle_outline.svg',
                'filled/av/playlist_add.svg',
                'filled/av/playlist_add_check.svg',
                'filled/av/playlist_play.svg',
                'filled/av/play_arrow.svg',
                'filled/av/play_circle_filled.svg',
                'filled/av/play_circle_outline.svg',
                'filled/av/queue.svg',
                'filled/av/queue_mus24px.svg',
                'filled/av/queue_play_next.svg',
                'filled/av/radio.svg',
                'filled/av/recent_actors.svg',
                'filled/av/remove_from_queue.svg',
                'filled/av/repeat.svg',
                'filled/av/repeat_one.svg',
                'filled/av/replay.svg',
                'filled/av/replay_10.svg',
                'filled/av/replay_30.svg',
                'filled/av/replay_5.svg',
                'filled/av/shuffle.svg',
                'filled/av/skip_next.svg',
                'filled/av/skip_previous.svg',
                'filled/av/slow_motion_video.svg',
                'filled/av/snooze.svg',
                'filled/av/sort_by_alpha.svg',
                'filled/av/stop.svg',
                'filled/av/subscriptions.svg',
                'filled/av/subtitles.svg',
                'filled/av/surround_sound.svg',
                'filled/av/videocam.svg',
                'filled/av/videocam_off.svg',
                'filled/av/video_call.svg',
                'filled/av/video_label.svg',
                'filled/av/video_library.svg',
                'filled/av/volume_down.svg',
                'filled/av/volume_mute.svg',
                'filled/av/volume_off.svg',
                'filled/av/volume_up.svg',
                'filled/av/web.svg',
                'filled/av/web_asset.svg',
                'filled/communication/business.svg',
                'filled/communication/call.svg',
                'filled/communication/call_end.svg',
                'filled/communication/call_made.svg',
                'filled/communication/call_merge.svg',
                'filled/communication/call_missed.svg',
                'filled/communication/call_missed_outgoing.svg',
                'filled/communication/call_received.svg',
                'filled/communication/call_split.svg',
                'filled/communication/chat.svg',
                'filled/communication/chat_bubble.svg',
                'filled/communication/chat_bubble_outline.svg',
                'filled/communication/clear_all.svg',
                'filled/communication/comment.svg',
                'filled/communication/contacts.svg',
                'filled/communication/contact_mail.svg',
                'filled/communication/contact_phone.svg',
                'filled/communication/dialer_sip.svg',
                'filled/communication/dialpad.svg',
                'filled/communication/email.svg',
                'filled/communication/forum.svg',
                'filled/communication/import_contacts.svg',
                'filled/communication/import_export.svg',
                'filled/communication/invert_colors_off.svg',
                'filled/communication/live_help.svg',
                'filled/communication/location_off.svg',
                'filled/communication/location_on.svg',
                'filled/communication/mail_outline.svg',
                'filled/communication/message.svg',
                'filled/communication/no_sim.svg',
                'filled/communication/phone.svg',
                'filled/communication/phonelink_erase.svg',
                'filled/communication/phonelink_lock.svg',
                'filled/communication/phonelink_ring.svg',
                'filled/communication/phonelink_setup.svg',
                'filled/communication/portable_wifi_off.svg',
                'filled/communication/present_to_all.svg',
                'filled/communication/ring_volume.svg',
                'filled/communication/rss_feed.svg',
                'filled/communication/screen_share.svg',
                'filled/communication/speaker_phone.svg',
                'filled/communication/stay_current_landscape.svg',
                'filled/communication/stay_current_portrait.svg',
                'filled/communication/stay_primary_landscape.svg',
                'filled/communication/stay_primary_portrait.svg',
                'filled/communication/stop_screen_share.svg',
                'filled/communication/swap_calls.svg',
                'filled/communication/textsms.svg',
                'filled/communication/voicemail.svg',
                'filled/communication/vpn_key.svg',
                'filled/content/add.svg',
                'filled/content/add_box.svg',
                'filled/content/add_circle.svg',
                'filled/content/add_circle_outline.svg',
                'filled/content/archive.svg',
                'filled/content/backspace.svg',
                'filled/content/block.svg',
                'filled/content/clear.svg',
                'filled/content/content_copy.svg',
                'filled/content/content_cut.svg',
                'filled/content/content_paste.svg',
                'filled/content/create.svg',
                'filled/content/delete_sweep.svg',
                'filled/content/drafts.svg',
                'filled/content/filter_list.svg',
                'filled/content/flag.svg',
                'filled/content/font_download.svg',
                'filled/content/forward.svg',
                'filled/content/gesture.svg',
                'filled/content/inbox.svg',
                'filled/content/link.svg',
                'filled/content/low_priority.svg',
                'filled/content/mail.svg',
                'filled/content/markunread.svg',
                'filled/content/move_to_inbox.svg',
                'filled/content/next_week.svg',
                'filled/content/redo.svg',
                'filled/content/remove.svg',
                'filled/content/remove_circle.svg',
                'filled/content/remove_circle_outline.svg',
                'filled/content/reply.svg',
                'filled/content/reply_all.svg',
                'filled/content/report.svg',
                'filled/content/save.svg',
                'filled/content/save_alt.svg',
                'filled/content/select_all.svg',
                'filled/content/send.svg',
                'filled/content/sort.svg',
                'filled/content/text_format.svg',
                'filled/content/unarchive.svg',
                'filled/content/undo.svg',
                'filled/content/weekend.svg',
                'filled/device/access_alarm.svg',
                'filled/device/access_alarms.svg',
                'filled/device/access_time.svg',
                'filled/device/add_alarm.svg',
                'filled/device/airplanemode_active.svg',
                'filled/device/airplanemode_inactive.svg',
                'filled/device/battery_20.svg',
                'filled/device/battery_30.svg',
                'filled/device/battery_50.svg',
                'filled/device/battery_60.svg',
                'filled/device/battery_80.svg',
                'filled/device/battery_90.svg',
                'filled/device/battery_alert.svg',
                'filled/device/battery_charging_20.svg',
                'filled/device/battery_charging_30.svg',
                'filled/device/battery_charging_50.svg',
                'filled/device/battery_charging_60.svg',
                'filled/device/battery_charging_80.svg',
                'filled/device/battery_charging_90.svg',
                'filled/device/battery_charging_full.svg',
                'filled/device/battery_full.svg',
                'filled/device/battery_std.svg',
                'filled/device/battery_unknown.svg',
                'filled/device/bluetooth.svg',
                'filled/device/bluetooth_connected.svg',
                'filled/device/bluetooth_disabled.svg',
                'filled/device/bluetooth_searching.svg',
                'filled/device/brightness_auto.svg',
                'filled/device/brightness_high.svg',
                'filled/device/brightness_low.svg',
                'filled/device/brightness_medium.svg',
                'filled/device/data_usage.svg',
                'filled/device/developer_mode.svg',
                'filled/device/devices.svg',
                'filled/device/dvr.svg',
                'filled/device/gps_fixed.svg',
                'filled/device/gps_not_fixed.svg',
                'filled/device/gps_off.svg',
                'filled/device/grapheq.svg',
                'filled/device/location_disabled.svg',
                'filled/device/location_searching.svg',
                'filled/device/network_cell.svg',
                'filled/device/network_wifi.svg',
                'filled/device/nfc.svg',
                'filled/device/screen_lock_landscape.svg',
                'filled/device/screen_lock_portrait.svg',
                'filled/device/screen_lock_rotation.svg',
                'filled/device/screen_rotation.svg',
                'filled/device/sd_storage.svg',
                'filled/device/settings_system_daydream.svg',
                'filled/device/signal_cellular_0_bar.svg',
                'filled/device/signal_cellular_1_bar.svg',
                'filled/device/signal_cellular_2_bar.svg',
                'filled/device/signal_cellular_3_bar.svg',
                'filled/device/signal_cellular_4_bar.svg',
                'filled/device/signal_cellular_connected_no_internet_0_bar.svg',
                'filled/device/signal_cellular_connected_no_internet_1_bar.svg',
                'filled/device/signal_cellular_connected_no_internet_2_bar.svg',
                'filled/device/signal_cellular_connected_no_internet_3_bar.svg',
                'filled/device/signal_cellular_connected_no_internet_4_bar.svg',
                'filled/device/signal_cellular_no_sim.svg',
                'filled/device/signal_cellular_null.svg',
                'filled/device/signal_cellular_off.svg',
                'filled/device/signal_wifi_0_bar.svg',
                'filled/device/signal_wifi_1_bar.svg',
                'filled/device/signal_wifi_1_bar_lock.svg',
                'filled/device/signal_wifi_2_bar.svg',
                'filled/device/signal_wifi_2_bar_lock.svg',
                'filled/device/signal_wifi_3_bar.svg',
                'filled/device/signal_wifi_3_bar_lock.svg',
                'filled/device/signal_wifi_4_bar.svg',
                'filled/device/signal_wifi_4_bar_lock.svg',
                'filled/device/signal_wifi_off.svg',
                'filled/device/storage.svg',
                'filled/device/usb.svg',
                'filled/device/wallpaper.svg',
                'filled/device/widgets.svg',
                'filled/device/wifi_lock.svg',
                'filled/device/wifi_tethering.svg',
                'filled/editor/attach_file.svg',
                'filled/editor/attach_money.svg',
                'filled/editor/border_all.svg',
                'filled/editor/border_bottom.svg',
                'filled/editor/border_clear.svg',
                'filled/editor/border_color.svg',
                'filled/editor/border_horizontal.svg',
                'filled/editor/border_inner.svg',
                'filled/editor/border_left.svg',
                'filled/editor/border_outer.svg',
                'filled/editor/border_right.svg',
                'filled/editor/border_style.svg',
                'filled/editor/border_top.svg',
                'filled/editor/border_vertical.svg',
                'filled/editor/bubble_chart.svg',
                'filled/editor/drag_handle.svg',
                'filled/editor/format_align_center.svg',
                'filled/editor/format_align_justify.svg',
                'filled/editor/format_align_left.svg',
                'filled/editor/format_align_right.svg',
                'filled/editor/format_bold.svg',
                'filled/editor/format_clear.svg',
                'filled/editor/format_color_fill.svg',
                'filled/editor/format_color_reset.svg',
                'filled/editor/format_color_text.svg',
                'filled/editor/format_indent_decrease.svg',
                'filled/editor/format_indent_increase.svg',
                'filled/editor/format_ital24px.svg',
                'filled/editor/format_line_spacing.svg',
                'filled/editor/format_list_bulleted.svg',
                'filled/editor/format_list_numbered.svg',
                'filled/editor/format_paint.svg',
                'filled/editor/format_quote.svg',
                'filled/editor/format_shapes.svg',
                'filled/editor/format_size.svg',
                'filled/editor/format_strikethrough.svg',
                'filled/editor/format_textdirection_l_to_r.svg',
                'filled/editor/format_textdirection_r_to_l.svg',
                'filled/editor/format_underlined.svg',
                'filled/editor/functions.svg',
                'filled/editor/highlight.svg',
                'filled/editor/insert_chart.svg',
                'filled/editor/insert_comment.svg',
                'filled/editor/insert_drive_file.svg',
                'filled/editor/insert_emoticon.svg',
                'filled/editor/insert_invitation.svg',
                'filled/editor/insert_link.svg',
                'filled/editor/insert_photo.svg',
                'filled/editor/linear_scale.svg',
                'filled/editor/merge_type.svg',
                'filled/editor/mode_comment.svg',
                'filled/editor/mode_edit.svg',
                'filled/editor/monetization_on.svg',
                'filled/editor/money_off.svg',
                'filled/editor/multiline_chart.svg',
                'filled/editor/pie_chart.svg',
                'filled/editor/pie_chart_outlined.svg',
                'filled/editor/publish.svg',
                'filled/editor/short_text.svg',
                'filled/editor/show_chart.svg',
                'filled/editor/space_bar.svg',
                'filled/editor/strikethrough_s.svg',
                'filled/editor/text_fields.svg',
                'filled/editor/title.svg',
                'filled/editor/vertical_align_bottom.svg',
                'filled/editor/vertical_align_center.svg',
                'filled/editor/vertical_align_top.svg',
                'filled/editor/wrap_text.svg',
                'filled/fill/attachment.svg',
                'filled/fill/cloud.svg',
                'filled/fill/cloud_circle.svg',
                'filled/fill/cloud_done.svg',
                'filled/fill/cloud_download.svg',
                'filled/fill/cloud_off.svg',
                'filled/fill/cloud_queue.svg',
                'filled/fill/cloud_upload.svg',
                'filled/fill/create_new_folder.svg',
                'filled/fill/file_download.svg',
                'filled/fill/file_upload.svg',
                'filled/fill/folder.svg',
                'filled/fill/folder_open.svg',
                'filled/fill/folder_shared.svg',
                'filled/hardware/cast.svg',
                'filled/hardware/cast_connected.svg',
                'filled/hardware/computer.svg',
                'filled/hardware/desktop_mac.svg',
                'filled/hardware/desktop_windows.svg',
                'filled/hardware/developer_board.svg',
                'filled/hardware/devices_other.svg',
                'filled/hardware/device_hub.svg',
                'filled/hardware/dock.svg',
                'filled/hardware/gamepad.svg',
                'filled/hardware/headset.svg',
                'filled/hardware/headset_m24px.svg',
                'filled/hardware/keyboard.svg',
                'filled/hardware/keyboard_arrow_down.svg',
                'filled/hardware/keyboard_arrow_left.svg',
                'filled/hardware/keyboard_arrow_right.svg',
                'filled/hardware/keyboard_arrow_up.svg',
                'filled/hardware/keyboard_backspace.svg',
                'filled/hardware/keyboard_capslock.svg',
                'filled/hardware/keyboard_hide.svg',
                'filled/hardware/keyboard_return.svg',
                'filled/hardware/keyboard_tab.svg',
                'filled/hardware/keyboard_voice.svg',
                'filled/hardware/laptop.svg',
                'filled/hardware/laptop_chromebook.svg',
                'filled/hardware/laptop_mac.svg',
                'filled/hardware/laptop_windows.svg',
                'filled/hardware/memory.svg',
                'filled/hardware/mouse.svg',
                'filled/hardware/phonelink.svg',
                'filled/hardware/phonelink_off.svg',
                'filled/hardware/phone_android.svg',
                'filled/hardware/phone_iphone.svg',
                'filled/hardware/power_input.svg',
                'filled/hardware/router.svg',
                'filled/hardware/scanner.svg',
                'filled/hardware/security.svg',
                'filled/hardware/sim_card.svg',
                'filled/hardware/smartphone.svg',
                'filled/hardware/speaker.svg',
                'filled/hardware/speaker_group.svg',
                'filled/hardware/tablet.svg',
                'filled/hardware/tablet_android.svg',
                'filled/hardware/tablet_mac.svg',
                'filled/hardware/toys.svg',
                'filled/hardware/tv.svg',
                'filled/hardware/videogame_asset.svg',
                'filled/hardware/watch.svg',
                'filled/image/add_a_photo.svg',
                'filled/image/add_to_photos.svg',
                'filled/image/adjust.svg',
                'filled/image/assistant.svg',
                'filled/image/assistant_photo.svg',
                'filled/image/audiotrack.svg',
                'filled/image/blur_circular.svg',
                'filled/image/blur_linear.svg',
                'filled/image/blur_off.svg',
                'filled/image/blur_on.svg',
                'filled/image/brightness_1.svg',
                'filled/image/brightness_2.svg',
                'filled/image/brightness_3.svg',
                'filled/image/brightness_4.svg',
                'filled/image/brightness_5.svg',
                'filled/image/brightness_6.svg',
                'filled/image/brightness_7.svg',
                'filled/image/broken_image.svg',
                'filled/image/brush.svg',
                'filled/image/burst_mode.svg',
                'filled/image/camera.svg',
                'filled/image/camera_alt.svg',
                'filled/image/camera_front.svg',
                'filled/image/camera_rear.svg',
                'filled/image/camera_roll.svg',
                'filled/image/center_focus_strong.svg',
                'filled/image/center_focus_weak.svg',
                'filled/image/collections.svg',
                'filled/image/collections_bookmark.svg',
                'filled/image/colorize.svg',
                'filled/image/color_lens.svg',
                'filled/image/compare.svg',
                'filled/image/control_point.svg',
                'filled/image/control_point_duplicate.svg',
                'filled/image/crop.svg',
                'filled/image/crop_16_9.svg',
                'filled/image/crop_3_2.svg',
                'filled/image/crop_5_4.svg',
                'filled/image/crop_7_5.svg',
                'filled/image/crop_din.svg',
                'filled/image/crop_free.svg',
                'filled/image/crop_landscape.svg',
                'filled/image/crop_original.svg',
                'filled/image/crop_portrait.svg',
                'filled/image/crop_rotate.svg',
                'filled/image/crop_square.svg',
                'filled/image/dehaze.svg',
                'filled/image/details.svg',
                'filled/image/edit.svg',
                'filled/image/exposure.svg',
                'filled/image/exposure_neg_1.svg',
                'filled/image/exposure_neg_2.svg',
                'filled/image/exposure_plus_1.svg',
                'filled/image/exposure_plus_2.svg',
                'filled/image/exposure_zero.svg',
                'filled/image/filter.svg',
                'filled/image/filter_1.svg',
                'filled/image/filter_2.svg',
                'filled/image/filter_3.svg',
                'filled/image/filter_4.svg',
                'filled/image/filter_5.svg',
                'filled/image/filter_6.svg',
                'filled/image/filter_7.svg',
                'filled/image/filter_8.svg',
                'filled/image/filter_9.svg',
                'filled/image/filter_9_plus.svg',
                'filled/image/filter_b_and_w.svg',
                'filled/image/filter_center_focus.svg',
                'filled/image/filter_drama.svg',
                'filled/image/filter_frames.svg',
                'filled/image/filter_hdr.svg',
                'filled/image/filter_none.svg',
                'filled/image/filter_tilt_shift.svg',
                'filled/image/filter_vintage.svg',
                'filled/image/flare.svg',
                'filled/image/flash_auto.svg',
                'filled/image/flash_off.svg',
                'filled/image/flash_on.svg',
                'filled/image/flip.svg',
                'filled/image/gradient.svg',
                'filled/image/grain.svg',
                'filled/image/grid_off.svg',
                'filled/image/grid_on.svg',
                'filled/image/hdr_off.svg',
                'filled/image/hdr_on.svg',
                'filled/image/hdr_strong.svg',
                'filled/image/hdr_weak.svg',
                'filled/image/healing.svg',
                'filled/image/image.svg',
                'filled/image/image_aspect_ratio.svg',
                'filled/image/iso.svg',
                'filled/image/landscape.svg',
                'filled/image/leak_add.svg',
                'filled/image/leak_remove.svg',
                'filled/image/lens.svg',
                'filled/image/linked_camera.svg',
                'filled/image/looks.svg',
                'filled/image/looks_3.svg',
                'filled/image/looks_4.svg',
                'filled/image/looks_5.svg',
                'filled/image/looks_6.svg',
                'filled/image/looks_one.svg',
                'filled/image/looks_two.svg',
                'filled/image/loupe.svg',
                'filled/image/monochrome_photos.svg',
                'filled/image/movie_creation.svg',
                'filled/image/movie_filter.svg',
                'filled/image/musnote.svg',
                'filled/image/nature.svg',
                'filled/image/nature_people.svg',
                'filled/image/navigate_before.svg',
                'filled/image/navigate_next.svg',
                'filled/image/palette.svg',
                'filled/image/panorama.svg',
                'filled/image/panorama_fish_eye.svg',
                'filled/image/panorama_horizontal.svg',
                'filled/image/panorama_vertical.svg',
                'filled/image/panorama_wide_angle.svg',
                'filled/image/photo.svg',
                'filled/image/photo_album.svg',
                'filled/image/photo_camera.svg',
                'filled/image/photo_filter.svg',
                'filled/image/photo_library.svg',
                'filled/image/photo_size_select_actual.svg',
                'filled/image/photo_size_select_large.svg',
                'filled/image/photo_size_select_small.svg',
                'filled/image/picture_as_pdf.svg',
                'filled/image/portrait.svg',
                'filled/image/remove_red_eye.svg',
                'filled/image/rotate_90_degrees_ccw.svg',
                'filled/image/rotate_left.svg',
                'filled/image/rotate_right.svg',
                'filled/image/slideshow.svg',
                'filled/image/straighten.svg',
                'filled/image/style.svg',
                'filled/image/switch_camera.svg',
                'filled/image/switch_video.svg',
                'filled/image/tag_faces.svg',
                'filled/image/texture.svg',
                'filled/image/timelapse.svg',
                'filled/image/timer.svg',
                'filled/image/timer_10.svg',
                'filled/image/timer_3.svg',
                'filled/image/timer_off.svg',
                'filled/image/tonality.svg',
                'filled/image/transform.svg',
                'filled/image/tune.svg',
                'filled/image/view_comfy.svg',
                'filled/image/view_compact.svg',
                'filled/image/vignette.svg',
                'filled/image/wb_auto.svg',
                'filled/image/wb_cloudy.svg',
                'filled/image/wb_incandescent.svg',
                'filled/image/wb_iridescent.svg',
                'filled/image/wb_sunny.svg',
                'filled/maps/add_location.svg',
                'filled/maps/beenhere.svg',
                'filled/maps/directions.svg',
                'filled/maps/directions_bike.svg',
                'filled/maps/directions_boat.svg',
                'filled/maps/directions_bus.svg',
                'filled/maps/directions_car.svg',
                'filled/maps/directions_railway.svg',
                'filled/maps/directions_run.svg',
                'filled/maps/directions_subway.svg',
                'filled/maps/directions_transit.svg',
                'filled/maps/directions_walk.svg',
                'filled/maps/edit_location.svg',
                'filled/maps/ev_station.svg',
                'filled/maps/flight.svg',
                'filled/maps/hotel.svg',
                'filled/maps/layers.svg',
                'filled/maps/layers_clear.svg',
                'filled/maps/local_activity.svg',
                'filled/maps/local_airport.svg',
                'filled/maps/local_atm.svg',
                'filled/maps/local_bar.svg',
                'filled/maps/local_cafe.svg',
                'filled/maps/local_car_wash.svg',
                'filled/maps/local_convenience_store.svg',
                'filled/maps/local_dining.svg',
                'filled/maps/local_drink.svg',
                'filled/maps/local_florist.svg',
                'filled/maps/local_gas_station.svg',
                'filled/maps/local_grocery_store.svg',
                'filled/maps/local_hospital.svg',
                'filled/maps/local_hotel.svg',
                'filled/maps/local_laundry_service.svg',
                'filled/maps/local_library.svg',
                'filled/maps/local_mall.svg',
                'filled/maps/local_movies.svg',
                'filled/maps/local_offer.svg',
                'filled/maps/local_parking.svg',
                'filled/maps/local_pharmacy.svg',
                'filled/maps/local_phone.svg',
                'filled/maps/local_pizza.svg',
                'filled/maps/local_play.svg',
                'filled/maps/local_post_office.svg',
                'filled/maps/local_printshop.svg',
                'filled/maps/local_see.svg',
                'filled/maps/local_shipping.svg',
                'filled/maps/local_taxi.svg',
                'filled/maps/map.svg',
                'filled/maps/my_location.svg',
                'filled/maps/navigation.svg',
                'filled/maps/near_me.svg',
                'filled/maps/person_pin.svg',
                'filled/maps/person_pin_circle.svg',
                'filled/maps/pin_drop.svg',
                'filled/maps/place.svg',
                'filled/maps/rate_review.svg',
                'filled/maps/restaurant.svg',
                'filled/maps/restaurant_menu.svg',
                'filled/maps/satellite.svg',
                'filled/maps/store_mall_directory.svg',
                'filled/maps/streetview.svg',
                'filled/maps/subway.svg',
                'filled/maps/terrain.svg',
                'filled/maps/traffsvg.svg',
                'filled/maps/train.svg',
                'filled/maps/tram.svg',
                'filled/maps/transfer_within_a_station.svg',
                'filled/maps/zoom_out_map.svg',
                'filled/navigation/apps.svg',
                'filled/navigation/arrow_back.svg',
                'filled/navigation/arrow_downward.svg',
                'filled/navigation/arrow_drop_down.svg',
                'filled/navigation/arrow_drop_down_circle.svg',
                'filled/navigation/arrow_drop_up.svg',
                'filled/navigation/arrow_forward.svg',
                'filled/navigation/arrow_upward.svg',
                'filled/navigation/cancel.svg',
                'filled/navigation/check.svg',
                'filled/navigation/chevron_left.svg',
                'filled/navigation/chevron_right.svg',
                'filled/navigation/close.svg',
                'filled/navigation/expand_less.svg',
                'filled/navigation/expand_more.svg',
                'filled/navigation/first_page.svg',
                'filled/navigation/fullscreen.svg',
                'filled/navigation/fullscreen_exit.svg',
                'filled/navigation/last_page.svg',
                'filled/navigation/menu.svg',
                'filled/navigation/more_horiz.svg',
                'filled/navigation/more_vert.svg',
                'filled/navigation/refresh.svg',
                'filled/navigation/subdirectory_arrow_left.svg',
                'filled/navigation/subdirectory_arrow_right.svg',
                'filled/navigation/unfold_less.svg',
                'filled/navigation/unfold_more.svg',
                'filled/notification/adb.svg',
                'filled/notification/airline_seat_flat.svg',
                'filled/notification/airline_seat_flat_angled.svg',
                'filled/notification/airline_seat_individual_suite.svg',
                'filled/notification/airline_seat_legroom_extra.svg',
                'filled/notification/airline_seat_legroom_normal.svg',
                'filled/notification/airline_seat_legroom_reduced.svg',
                'filled/notification/airline_seat_recline_extra.svg',
                'filled/notification/airline_seat_recline_normal.svg',
                'filled/notification/bluetooth_audio.svg',
                'filled/notification/confirmation_number.svg',
                'filled/notification/disc_full.svg',
                'filled/notification/do_not_disturb.svg',
                'filled/notification/do_not_disturb_alt.svg',
                'filled/notification/do_not_disturb_off.svg',
                'filled/notification/do_not_disturb_on.svg',
                'filled/notification/drive_eta.svg',
                'filled/notification/enhanced_encryption.svg',
                'filled/notification/event_available.svg',
                'filled/notification/event_busy.svg',
                'filled/notification/event_note.svg',
                'filled/notification/folder_special.svg',
                'filled/notification/live_tv.svg',
                'filled/notification/mms.svg',
                'filled/notification/more.svg',
                'filled/notification/network_check.svg',
                'filled/notification/network_locked.svg',
                'filled/notification/no_encryption.svg',
                'filled/notification/ondemand_video.svg',
                'filled/notification/personal_video.svg',
                'filled/notification/phone_bluetooth_speaker.svg',
                'filled/notification/phone_forwarded.svg',
                'filled/notification/phone_in_talk.svg',
                'filled/notification/phone_locked.svg',
                'filled/notification/phone_missed.svg',
                'filled/notification/phone_paused.svg',
                'filled/notification/power.svg',
                'filled/notification/priority_high.svg',
                'filled/notification/rv_hookup.svg',
                'filled/notification/sd_card.svg',
                'filled/notification/sim_card_alert.svg',
                'filled/notification/sms.svg',
                'filled/notification/sms_failed.svg',
                'filled/notification/sync.svg',
                'filled/notification/sync_disabled.svg',
                'filled/notification/sync_problem.svg',
                'filled/notification/system_update.svg',
                'filled/notification/tap_and_play.svg',
                'filled/notification/time_to_leave.svg',
                'filled/notification/vibration.svg',
                'filled/notification/voice_chat.svg',
                'filled/notification/vpn_lock.svg',
                'filled/notification/wc.svg',
                'filled/notification/wifi.svg',
                'filled/places/ac_unit.svg',
                'filled/places/airport_shuttle.svg',
                'filled/places/all_inclusive.svg',
                'filled/places/beach_access.svg',
                'filled/places/business_center.svg',
                'filled/places/casino.svg',
                'filled/places/child_care.svg',
                'filled/places/child_friendly.svg',
                'filled/places/fitness_center.svg',
                'filled/places/free_breakfast.svg',
                'filled/places/golf_course.svg',
                'filled/places/hot_tub.svg',
                'filled/places/kitchen.svg',
                'filled/places/pool.svg',
                'filled/places/room_service.svg',
                'filled/places/rv_hookup.svg',
                'filled/places/smoke_free.svg',
                'filled/places/smoking_rooms.svg',
                'filled/places/spa.svg',
                'filled/social/cake.svg',
                'filled/social/domain.svg',
                'filled/social/group.svg',
                'filled/social/group_add.svg',
                'filled/social/location_city.svg',
                'filled/social/mood.svg',
                'filled/social/mood_bad.svg',
                'filled/social/notifications.svg',
                'filled/social/notifications_active.svg',
                'filled/social/notifications_none.svg',
                'filled/social/notifications_off.svg',
                'filled/social/notifications_paused.svg',
                'filled/social/pages.svg',
                'filled/social/party_mode.svg',
                'filled/social/people.svg',
                'filled/social/people_outline.svg',
                'filled/social/person.svg',
                'filled/social/person_add.svg',
                'filled/social/person_outline.svg',
                'filled/social/plus_one.svg',
                'filled/social/poll.svg',
                'filled/social/publ24px.svg',
                'filled/social/school.svg',
                'filled/social/sentiment_dissatisfied.svg',
                'filled/social/sentiment_neutral.svg',
                'filled/social/sentiment_satisfied.svg',
                'filled/social/sentiment_very_dissatisfied.svg',
                'filled/social/sentiment_very_satisfied.svg',
                'filled/social/share.svg',
                'filled/social/whatshot.svg',
                'filled/toggle/check_box.svg',
                'filled/toggle/check_box_outline_blank.svg',
                'filled/toggle/indeterminate_check_box.svg',
                'filled/toggle/radio_button_checked.svg',
                'filled/toggle/radio_button_unchecked.svg',
                'filled/toggle/star.svg',
                'filled/toggle/star_border.svg',
                'filled/toggle/star_half.svg'
            ]
        },
        {
            nameSpace: 'outlined',
            list: [
                'outlined/action/3d_rotation.svg',
                'outlined/action/accessibility.svg',
                'outlined/action/accessibility_new.svg',
                'outlined/action/accessible.svg',
                'outlined/action/accessible_forward.svg',
                'outlined/action/account_balance.svg',
                'outlined/action/account_balance_wallet.svg',
                'outlined/action/account_box.svg',
                'outlined/action/account_circle.svg',
                'outlined/action/add_shopping_cart.svg',
                'outlined/action/alarm.svg',
                'outlined/action/alarm_add.svg',
                'outlined/action/alarm_off.svg',
                'outlined/action/alarm_on.svg',
                'outlined/action/all_inbox.svg',
                'outlined/action/all_out.svg',
                'outlined/action/announcement.svg',
                'outlined/action/arrow_right_alt.svg',
                'outlined/action/aspect_ratio.svg',
                'outlined/action/assessment.svg',
                'outlined/action/assignment.svg',
                'outlined/action/assignment_ind.svg',
                'outlined/action/assignment_late.svg',
                'outlined/action/assignment_return.svg',
                'outlined/action/assignment_returned.svg',
                'outlined/action/assignment_turned_in.svg',
                'outlined/action/autorenew.svg',
                'outlined/action/backup.svg',
                'outlined/action/book.svg',
                'outlined/action/bookmarks.svg',
                'outlined/action/bookmark_border.svg',
                'outlined/action/bug_report.svg',
                'outlined/action/build.svg',
                'outlined/action/cached.svg',
                'outlined/action/calendar_today.svg',
                'outlined/action/calendar_view_day.svg',
                'outlined/action/camera_enhance.svg',
                'outlined/action/card_giftcard.svg',
                'outlined/action/card_membership.svg',
                'outlined/action/card_travel.svg',
                'outlined/action/change_history.svg',
                'outlined/action/check_circle.svg',
                'outlined/action/check_circle_outline.svg',
                'outlined/action/chrome_reader_mode.svg',
                'outlined/action/class.svg',
                'outlined/action/code.svg',
                'outlined/action/commute.svg',
                'outlined/action/compare_arrows.svg',
                'outlined/action/contact_support.svg',
                'outlined/action/copyright.svg',
                'outlined/action/credit_card.svg',
                'outlined/action/dashboard.svg',
                'outlined/action/date_range.svg',
                'outlined/action/delete.svg',
                'outlined/action/delete_forever.svg',
                'outlined/action/delete_outline.svg',
                'outlined/action/description.svg',
                'outlined/action/dns.svg',
                'outlined/action/done.svg',
                'outlined/action/done_all.svg',
                'outlined/action/done_outline.svg',
                'outlined/action/donut_large.svg',
                'outlined/action/donut_small.svg',
                'outlined/action/drag_indicator.svg',
                'outlined/action/eject.svg',
                'outlined/action/euro_symbol.svg',
                'outlined/action/event.svg',
                'outlined/action/event_seat.svg',
                'outlined/action/exit_to_app.svg',
                'outlined/action/explore.svg',
                'outlined/action/explore_off (1).svg',
                'outlined/action/explore_off.svg',
                'outlined/action/extension (1).svg',
                'outlined/action/extension.svg',
                'outlined/action/face (1).svg',
                'outlined/action/face.svg',
                'outlined/action/favorite.svg',
                'outlined/action/favorite_border.svg',
                'outlined/action/flip_to_front.svg',
                'outlined/action/gavel.svg',
                'outlined/action/get_app.svg',
                'outlined/action/gif.svg',
                'outlined/action/grade.svg',
                'outlined/action/group_work.svg',
                'outlined/action/g_translate.svg',
                'outlined/action/help_outline.svg',
                'outlined/action/highlight_off.svg',
                'outlined/action/history.svg',
                'outlined/action/home.svg',
                'outlined/action/horizontal_split.svg',
                'outlined/action/hourglass_empty.svg',
                'outlined/action/hourglass_full.svg',
                'outlined/action/http.svg',
                'outlined/action/https.svg',
                'outlined/action/important_devices.svg',
                'outlined/action/info.svg',
                'outlined/action/input.svg',
                'outlined/action/invert_colors.svg',
                'outlined/action/label.svg',
                'outlined/action/label_important.svg',
                'outlined/action/label_off.svg',
                'outlined/action/language.svg',
                'outlined/action/note_add.svg',
                'outlined/action/offline_bolt.svg',
                'outlined/action/offline_pin.svg',
                'outlined/action/opacity.svg',
                'outlined/action/open_in_browser.svg',
                'outlined/action/open_in_new.svg',
                'outlined/action/open_with.svg',
                'outlined/action/pageview.svg',
                'outlined/action/pan_tool.svg',
                'outlined/action/payment.svg',
                'outlined/action/perm_camera_mic.svg',
                'outlined/action/perm_contact_calendar.svg',
                'outlined/action/perm_data_setting.svg',
                'outlined/action/perm_device_information.svg',
                'outlined/action/perm_identity.svg',
                'outlined/action/perm_media.svg',
                'outlined/action/perm_phone_msg.svg',
                'outlined/action/perm_scan_wifi.svg',
                'outlined/action/pets.svg',
                'outlined/action/picture_in_picture.svg',
                'outlined/action/picture_in_picture_alt.svg',
                'outlined/action/play_for_work.svg',
                'outlined/action/polymer.svg',
                'outlined/action/power_settings_new.svg',
                'outlined/action/pregnant_woman.svg',
                'outlined/action/print.svg',
                'outlined/action/query_builder.svg',
                'outlined/action/question_answer.svg',
                'outlined/action/receipt.svg',
                'outlined/action/record_voice_over.svg',
                'outlined/action/redeem.svg',
                'outlined/action/remove_shopping_cart.svg',
                'outlined/action/reorder.svg',
                'outlined/action/report_problem.svg',
                'outlined/action/restore.svg',
                'outlined/action/restore_from_trash.svg',
                'outlined/action/restore_page.svg',
                'outlined/action/room.svg',
                'outlined/action/rounded_corner.svg',
                'outlined/action/rowing.svg',
                'outlined/action/schedule.svg',
                'outlined/action/search.svg',
                'outlined/action/settings.svg',
                'outlined/action/settings_applications.svg',
                'outlined/action/settings_backup_restore.svg',
                'outlined/action/settings_bluetooth.svg',
                'outlined/action/settings_brightness.svg',
                'outlined/action/settings_cell.svg',
                'outlined/action/settings_ethernet.svg',
                'outlined/action/settings_input_antenna.svg',
                'outlined/action/settings_input_component.svg',
                'outlined/action/settings_input_composite.svg',
                'outlined/action/settings_input_hdmi.svg',
                'outlined/action/settings_input_svideo.svg',
                'outlined/action/settings_overscan.svg',
                'outlined/action/settings_phone.svg',
                'outlined/action/settings_power.svg',
                'outlined/action/settings_remote.svg',
                'outlined/action/settings_voice.svg',
                'outlined/action/shop.svg',
                'outlined/action/shopping_basket.svg',
                'outlined/action/shopping_cart.svg',
                'outlined/action/shop_two.svg',
                'outlined/action/speaker_notes.svg',
                'outlined/action/speaker_notes_off.svg',
                'outlined/action/spellcheck.svg',
                'outlined/action/stars.svg',
                'outlined/action/star_rate-18px.svg',
                'outlined/action/store.svg',
                'outlined/action/subject.svg',
                'outlined/action/supervised_user_circle.svg',
                'outlined/action/supervisor_account.svg',
                'outlined/action/swap_horiz.svg',
                'outlined/action/swap_horizontal_circle.svg',
                'outlined/action/swap_vert.svg',
                'outlined/action/swap_vertical_circle.svg',
                'outlined/action/tab.svg',
                'outlined/action/tab_unselected.svg',
                'outlined/action/text_rotate_up.svg',
                'outlined/action/text_rotate_vertical.svg',
                'outlined/action/text_rotation_down.svg',
                'outlined/action/text_rotation_none.svg',
                'outlined/action/theaters.svg',
                'outlined/action/thumbs_up_down.svg',
                'outlined/action/thumb_down.svg',
                'outlined/action/thumb_up.svg',
                'outlined/action/timeline.svg',
                'outlined/action/toc.svg',
                'outlined/action/today.svg',
                'outlined/action/toll.svg',
                'outlined/action/touch_app.svg',
                'outlined/action/track_changes.svg',
                'outlined/action/translate.svg',
                'outlined/action/trending_down.svg',
                'outlined/action/trending_flat.svg',
                'outlined/action/trending_up.svg',
                'outlined/action/turned_in.svg',
                'outlined/action/turned_in_not.svg',
                'outlined/action/update.svg',
                'outlined/action/verified_user.svg',
                'outlined/action/vertical_split.svg',
                'outlined/action/view_agenda.svg',
                'outlined/action/view_array.svg',
                'outlined/action/view_carousel.svg',
                'outlined/action/view_column.svg',
                'outlined/action/view_day.svg',
                'outlined/action/view_headline.svg',
                'outlined/action/view_list.svg',
                'outlined/action/view_module.svg',
                'outlined/action/view_quilt.svg',
                'outlined/action/view_stream.svg',
                'outlined/action/view_week.svg',
                'outlined/action/visibility.svg',
                'outlined/action/visibility_off.svg',
                'outlined/action/voice_over_off.svg',
                'outlined/action/watch_later.svg',
                'outlined/action/work.svg',
                'outlined/action/work_off.svg',
                'outlined/action/work_outline.svg',
                'outlined/action/youtube_searched_for.svg',
                'outlined/action/zoom_in.svg',
                'outlined/action/zoom_out.svg',
                'outlined/alert/add_alert.svg',
                'outlined/alert/error_outline.svg',
                'outlined/alert/notification_important.svg',
                'outlined/av/4k.svg',
                'outlined/av/add_to_queue.svg',
                'outlined/av/airplay.svg',
                'outlined/av/album.svg',
                'outlined/av/art_track.svg',
                'outlined/av/av_timer.svg',
                'outlined/av/branding_watermark.svg',
                'outlined/av/call_to_action.svg',
                'outlined/av/closed_caption.svg',
                'outlined/av/control_camera.svg',
                'outlined/av/equalizer.svg',
                'outlined/av/explicit.svg',
                'outlined/av/fast_forward.svg',
                'outlined/av/fast_rewind.svg',
                'outlined/av/featured_play_list.svg',
                'outlined/av/featured_video.svg',
                'outlined/av/fiber_dvr.svg',
                'outlined/av/fiber_manual_record.svg',
                'outlined/av/fiber_new.svg',
                'outlined/av/fiber_pin.svg',
                'outlined/av/fiber_smart_record.svg',
                'outlined/av/forward_10.svg',
                'outlined/av/forward_30.svg',
                'outlined/av/forward_5.svg',
                'outlined/av/games.svg',
                'outlined/av/hd.svg',
                'outlined/av/hearing.svg',
                'outlined/av/high_quality.svg',
                'outlined/av/library_add.svg',
                'outlined/av/library_books.svg',
                'outlined/av/library_music.svg',
                'outlined/av/loop.svg',
                'outlined/av/mic.svg',
                'outlined/av/mic_none.svg',
                'outlined/av/mic_off.svg',
                'outlined/av/missed_video_call.svg',
                'outlined/av/movie.svg',
                'outlined/av/music_video.svg',
                'outlined/av/new_releases.svg',
                'outlined/av/note.svg',
                'outlined/av/not_interested.svg',
                'outlined/av/pause.svg',
                'outlined/av/pause_circle_filled.svg',
                'outlined/av/pause_circle_outline.svg',
                'outlined/av/playlist_add.svg',
                'outlined/av/playlist_add_check.svg',
                'outlined/av/playlist_play.svg',
                'outlined/av/play_arrow.svg',
                'outlined/av/play_circle_filled.svg',
                'outlined/av/play_circle_filled_white.svg',
                'outlined/av/play_circle_outline.svg',
                'outlined/av/queue.svg',
                'outlined/av/queue_music.svg',
                'outlined/av/queue_play_next.svg',
                'outlined/av/radio.svg',
                'outlined/av/recent_actors.svg',
                'outlined/av/remove_from_queue.svg',
                'outlined/av/repeat.svg',
                'outlined/av/repeat_one.svg',
                'outlined/av/replay.svg',
                'outlined/av/replay_10.svg',
                'outlined/av/replay_30.svg',
                'outlined/av/replay_5.svg',
                'outlined/av/shuffle.svg',
                'outlined/av/skip_next.svg',
                'outlined/av/skip_previous.svg',
                'outlined/av/slow_motion_video.svg',
                'outlined/av/snooze.svg',
                'outlined/av/sort_by_alpha.svg',
                'outlined/av/stop.svg',
                'outlined/av/subscriptions.svg',
                'outlined/av/subtitles.svg',
                'outlined/av/surround_sound.svg',
                'outlined/av/videocam.svg',
                'outlined/av/videocam_off.svg',
                'outlined/av/video_call.svg',
                'outlined/av/video_label.svg',
                'outlined/av/video_library.svg',
                'outlined/av/volume_down.svg',
                'outlined/av/volume_mute.svg',
                'outlined/av/volume_off.svg',
                'outlined/av/volume_up.svg',
                'outlined/av/web.svg',
                'outlined/av/web_asset.svg',
                'outlined/communication/alternate_email.svg',
                'outlined/communication/business.svg',
                'outlined/communication/call.svg',
                'outlined/communication/call_end.svg',
                'outlined/communication/call_made.svg',
                'outlined/communication/call_merge.svg',
                'outlined/communication/call_missed.svg',
                'outlined/communication/call_missed_outgoing.svg',
                'outlined/communication/call_received.svg',
                'outlined/communication/call_split.svg',
                'outlined/communication/cancel_presentation.svg',
                'outlined/communication/cell_wifi.svg',
                'outlined/communication/chat.svg',
                'outlined/communication/chat_bubble.svg',
                'outlined/communication/chat_bubble_outline.svg',
                'outlined/communication/clear_all.svg',
                'outlined/communication/comment.svg',
                'outlined/communication/contacts.svg',
                'outlined/communication/contact_mail.svg',
                'outlined/communication/contact_phone.svg',
                'outlined/communication/desktop_access_disabled.svg',
                'outlined/communication/dialer_sip.svg',
                'outlined/communication/dialpad.svg',
                'outlined/communication/domain_disabled.svg',
                'outlined/communication/duo.svg',
                'outlined/communication/email.svg',
                'outlined/communication/forum.svg',
                'outlined/communication/import_contacts.svg',
                'outlined/communication/import_export.svg',
                'outlined/communication/invert_colors_off.svg',
                'outlined/communication/list_alt.svg',
                'outlined/communication/live_help.svg',
                'outlined/communication/location_off.svg',
                'outlined/communication/location_on.svg',
                'outlined/communication/mail_outline.svg',
                'outlined/communication/message.svg',
                'outlined/communication/mobile_screen_share.svg',
                'outlined/communication/no_sim.svg',
                'outlined/communication/pause_presentation.svg',
                'outlined/communication/person_add_disabled.svg',
                'outlined/communication/phone.svg',
                'outlined/communication/phonelink_erase.svg',
                'outlined/communication/phonelink_lock.svg',
                'outlined/communication/phonelink_ring.svg',
                'outlined/communication/phonelink_setup.svg',
                'outlined/communication/portable_wifi_off.svg',
                'outlined/communication/present_to_all.svg',
                'outlined/communication/print_disabled.svg',
                'outlined/communication/ring_volume.svg',
                'outlined/communication/rss_feed.svg',
                'outlined/communication/screen_share.svg',
                'outlined/communication/sentiment_satisfied_alt.svg',
                'outlined/communication/speaker_phone.svg',
                'outlined/communication/stay_current_landscape.svg',
                'outlined/communication/stay_current_portrait.svg',
                'outlined/communication/stay_primary_landscape.svg',
                'outlined/communication/stay_primary_portrait.svg',
                'outlined/communication/stop_screen_share.svg',
                'outlined/communication/swap_calls.svg',
                'outlined/communication/textsms.svg',
                'outlined/communication/unsubscribe.svg',
                'outlined/communication/voicemail.svg',
                'outlined/communication/vpn_key.svg',
                'outlined/content/add.svg',
                'outlined/content/add_box.svg',
                'outlined/content/add_circle.svg',
                'outlined/content/add_circle_outline.svg',
                'outlined/content/archive.svg',
                'outlined/content/backspace.svg',
                'outlined/content/ballot.svg',
                'outlined/content/block.svg',
                'outlined/content/clear.svg',
                'outlined/content/create.svg',
                'outlined/content/delete_sweep.svg',
                'outlined/content/drafts.svg',
                'outlined/content/file_copy.svg',
                'outlined/content/filter_list.svg',
                'outlined/content/flag.svg',
                'outlined/content/font_download.svg',
                'outlined/content/forward.svg',
                'outlined/content/gesture.svg',
                'outlined/content/how_to_reg.svg',
                'outlined/content/how_to_vote.svg',
                'outlined/content/inbox.svg',
                'outlined/content/link.svg',
                'outlined/content/link_off.svg',
                'outlined/content/low_priority.svg',
                'outlined/content/mail.svg',
                'outlined/content/markunread.svg',
                'outlined/content/move_to_inbox.svg',
                'outlined/content/next_week.svg',
                'outlined/content/outlined_flag.svg',
                'outlined/content/redo.svg',
                'outlined/content/remove.svg',
                'outlined/content/remove_circle.svg',
                'outlined/content/remove_circle_outline.svg',
                'outlined/content/reply.svg',
                'outlined/content/reply_all.svg',
                'outlined/content/report.svg',
                'outlined/content/report_off.svg',
                'outlined/content/save.svg',
                'outlined/content/save_alt.svg',
                'outlined/content/select_all.svg',
                'outlined/content/send.svg',
                'outlined/content/sort.svg',
                'outlined/content/text_format.svg',
                'outlined/content/unarchive.svg',
                'outlined/content/undo.svg',
                'outlined/content/waves.svg',
                'outlined/content/weekend.svg',
                'outlined/content/where_to_vote.svg',
                'outlined/device/access_alarm.svg',
                'outlined/device/access_alarms.svg',
                'outlined/device/access_time.svg',
                'outlined/device/add_alarm.svg',
                'outlined/device/add_to_home_screen.svg',
                'outlined/device/airplanemode_active.svg',
                'outlined/device/airplanemode_inactive.svg',
                'outlined/device/battery_20.svg',
                'outlined/device/battery_30.svg',
                'outlined/device/battery_50.svg',
                'outlined/device/battery_60.svg',
                'outlined/device/battery_80.svg',
                'outlined/device/battery_90.svg',
                'outlined/device/battery_alert.svg',
                'outlined/device/battery_charging_20.svg',
                'outlined/device/battery_charging_30.svg',
                'outlined/device/battery_charging_50.svg',
                'outlined/device/battery_charging_60.svg',
                'outlined/device/battery_charging_80.svg',
                'outlined/device/battery_charging_90.svg',
                'outlined/device/battery_charging_full.svg',
                'outlined/device/battery_full.svg',
                'outlined/device/battery_std.svg',
                'outlined/device/battery_unknown.svg',
                'outlined/device/bluetooth.svg',
                'outlined/device/bluetooth_connected.svg',
                'outlined/device/bluetooth_disabled.svg',
                'outlined/device/bluetooth_searching.svg',
                'outlined/device/brightness_auto.svg',
                'outlined/device/brightness_high.svg',
                'outlined/device/brightness_low.svg',
                'outlined/device/brightness_medium.svg',
                'outlined/device/data_usage.svg',
                'outlined/device/developer_mode.svg',
                'outlined/device/devices.svg',
                'outlined/device/dvr.svg',
                'outlined/device/gps_fixed.svg',
                'outlined/device/gps_not_fixed.svg',
                'outlined/device/gps_off.svg',
                'outlined/device/graphic_eq.svg',
                'outlined/device/location_disabled.svg',
                'outlined/device/location_searching.svg',
                'outlined/device/mobile_friendly.svg',
                'outlined/device/mobile_off.svg',
                'outlined/device/network_cell.svg',
                'outlined/device/network_wifi.svg',
                'outlined/device/nfc.svg',
                'outlined/device/screen_lock_landscape.svg',
                'outlined/device/screen_lock_portrait.svg',
                'outlined/device/screen_lock_rotation.svg',
                'outlined/device/screen_rotation.svg',
                'outlined/device/sd_storage.svg',
                'outlined/device/settings_system_daydream.svg',
                'outlined/device/signal_cellular_0_bar.svg',
                'outlined/device/signal_cellular_1_bar.svg',
                'outlined/device/signal_cellular_2_bar.svg',
                'outlined/device/signal_cellular_3_bar.svg',
                'outlined/device/signal_cellular_4_bar.svg',
                'outlined/device/signal_cellular_alt.svg',
                'outlined/device/signal_cellular_connected_no_internet_0_bar.svg',
                'outlined/device/signal_cellular_connected_no_internet_1_bar.svg',
                'outlined/device/signal_cellular_connected_no_internet_2_bar.svg',
                'outlined/device/signal_cellular_connected_no_internet_3_bar.svg',
                'outlined/device/signal_cellular_connected_no_internet_4_bar.svg',
                'outlined/device/signal_cellular_no_sim.svg',
                'outlined/device/signal_cellular_null.svg',
                'outlined/device/signal_cellular_off.svg',
                'outlined/device/signal_wifi_0_bar.svg',
                'outlined/device/signal_wifi_1_bar.svg',
                'outlined/device/signal_wifi_1_bar_lock.svg',
                'outlined/device/signal_wifi_2_bar.svg',
                'outlined/device/signal_wifi_2_bar_lock.svg',
                'outlined/device/signal_wifi_3_bar.svg',
                'outlined/device/signal_wifi_3_bar_lock.svg',
                'outlined/device/signal_wifi_4_bar.svg',
                'outlined/device/signal_wifi_4_bar_lock.svg',
                'outlined/device/signal_wifi_off.svg',
                'outlined/device/storage.svg',
                'outlined/device/usb.svg',
                'outlined/device/wallpaper.svg',
                'outlined/device/widgets.svg',
                'outlined/device/wifi_lock.svg',
                'outlined/device/wifi_tethering.svg',
                'outlined/editor/add_comment.svg',
                'outlined/editor/attach_file.svg',
                'outlined/editor/attach_money.svg',
                'outlined/editor/bar_chart.svg',
                'outlined/editor/border_all.svg',
                'outlined/editor/border_bottom.svg',
                'outlined/editor/border_clear.svg',
                'outlined/editor/border_color.svg',
                'outlined/editor/border_horizontal.svg',
                'outlined/editor/border_inner.svg',
                'outlined/editor/border_left.svg',
                'outlined/editor/border_outer.svg',
                'outlined/editor/border_right.svg',
                'outlined/editor/border_style.svg',
                'outlined/editor/border_top.svg',
                'outlined/editor/border_vertical.svg',
                'outlined/editor/bubble_chart.svg',
                'outlined/editor/drag_handle.svg',
                'outlined/editor/format_align_center.svg',
                'outlined/editor/format_align_justify.svg',
                'outlined/editor/format_align_left.svg',
                'outlined/editor/format_align_right.svg',
                'outlined/editor/format_bold.svg',
                'outlined/editor/format_clear.svg',
                'outlined/editor/format_color_fill.svg',
                'outlined/editor/format_color_reset.svg',
                'outlined/editor/format_color_text.svg',
                'outlined/editor/format_indent_decrease.svg',
                'outlined/editor/format_indent_increase.svg',
                'outlined/editor/format_italic.svg',
                'outlined/editor/format_line_spacing.svg',
                'outlined/editor/format_list_bulleted.svg',
                'outlined/editor/format_list_numbered.svg',
                'outlined/editor/format_list_numbered_rtl.svg',
                'outlined/editor/format_paint.svg',
                'outlined/editor/format_quote.svg',
                'outlined/editor/format_shapes.svg',
                'outlined/editor/format_size.svg',
                'outlined/editor/format_strikethrough.svg',
                'outlined/editor/format_textdirection_l_to_r.svg',
                'outlined/editor/format_textdirection_r_to_l.svg',
                'outlined/editor/format_underlined.svg',
                'outlined/editor/functions.svg',
                'outlined/editor/highlight.svg',
                'outlined/editor/insert_chart.svg',
                'outlined/editor/insert_chart_outlined.svg',
                'outlined/editor/insert_comment.svg',
                'outlined/editor/insert_drive_file.svg',
                'outlined/editor/insert_emoticon.svg',
                'outlined/editor/insert_invitation.svg',
                'outlined/editor/insert_link.svg',
                'outlined/editor/insert_photo.svg',
                'outlined/editor/linear_scale.svg',
                'outlined/editor/merge_type.svg',
                'outlined/editor/mode_comment.svg',
                'outlined/editor/monetization_on.svg',
                'outlined/editor/money_off.svg',
                'outlined/editor/multiline_chart.svg',
                'outlined/editor/notes.svg',
                'outlined/editor/pie_chart.svg',
                'outlined/editor/publish.svg',
                'outlined/editor/scatter_plot.svg',
                'outlined/editor/score.svg',
                'outlined/editor/short_text.svg',
                'outlined/editor/show_chart.svg',
                'outlined/editor/space_bar.svg',
                'outlined/editor/strikethrough_s.svg',
                'outlined/editor/table_chart.svg',
                'outlined/editor/text_fields.svg',
                'outlined/editor/title.svg',
                'outlined/editor/vertical_align_bottom.svg',
                'outlined/editor/vertical_align_center.svg',
                'outlined/editor/vertical_align_top.svg',
                'outlined/editor/wrap_text.svg',
                'outlined/fill/attachment.svg',
                'outlined/fill/cloud.svg',
                'outlined/fill/cloud_circle.svg',
                'outlined/fill/cloud_done.svg',
                'outlined/fill/cloud_download.svg',
                'outlined/fill/cloud_off.svg',
                'outlined/fill/cloud_queue.svg',
                'outlined/fill/cloud_upload.svg',
                'outlined/fill/create_new_folder.svg',
                'outlined/fill/folder.svg',
                'outlined/fill/folder_open.svg',
                'outlined/fill/folder_shared.svg',
                'outlined/hardware/cast.svg',
                'outlined/hardware/cast_connected.svg',
                'outlined/hardware/cast_for_education.svg',
                'outlined/hardware/computer.svg',
                'outlined/hardware/desktop_mac.svg',
                'outlined/hardware/desktop_windows.svg',
                'outlined/hardware/developer_board.svg',
                'outlined/hardware/devices_other.svg',
                'outlined/hardware/device_hub.svg',
                'outlined/hardware/device_unknown.svg',
                'outlined/hardware/dock.svg',
                'outlined/hardware/gamepad.svg',
                'outlined/hardware/headset.svg',
                'outlined/hardware/headset_mic.svg',
                'outlined/hardware/keyboard.svg',
                'outlined/hardware/keyboard_arrow_down.svg',
                'outlined/hardware/keyboard_arrow_left.svg',
                'outlined/hardware/keyboard_arrow_right.svg',
                'outlined/hardware/keyboard_arrow_up.svg',
                'outlined/hardware/keyboard_backspace.svg',
                'outlined/hardware/keyboard_capslock.svg',
                'outlined/hardware/keyboard_hide.svg',
                'outlined/hardware/keyboard_return.svg',
                'outlined/hardware/keyboard_tab.svg',
                'outlined/hardware/keyboard_voice.svg',
                'outlined/hardware/laptop.svg',
                'outlined/hardware/laptop_chromebook.svg',
                'outlined/hardware/laptop_mac.svg',
                'outlined/hardware/laptop_windows.svg',
                'outlined/hardware/memory.svg',
                'outlined/hardware/mouse.svg',
                'outlined/hardware/phonelink.svg',
                'outlined/hardware/phonelink_off.svg',
                'outlined/hardware/phone_android.svg',
                'outlined/hardware/phone_iphone.svg',
                'outlined/hardware/power_input.svg',
                'outlined/hardware/router.svg',
                'outlined/hardware/scanner.svg',
                'outlined/hardware/security.svg',
                'outlined/hardware/sim_card.svg',
                'outlined/hardware/smartphone.svg',
                'outlined/hardware/speaker.svg',
                'outlined/hardware/speaker_group.svg',
                'outlined/hardware/tablet.svg',
                'outlined/hardware/tablet_android.svg',
                'outlined/hardware/tablet_mac.svg',
                'outlined/hardware/toys.svg',
                'outlined/hardware/tv.svg',
                'outlined/hardware/videogame_asset.svg',
                'outlined/hardware/watch.svg',
                'outlined/image/add_a_photo.svg',
                'outlined/image/add_photo_alternate.svg',
                'outlined/image/add_to_photos.svg',
                'outlined/image/adjust.svg',
                'outlined/image/assistant.svg',
                'outlined/image/assistant_photo.svg',
                'outlined/image/audiotrack.svg',
                'outlined/image/blur_circular.svg',
                'outlined/image/blur_linear.svg',
                'outlined/image/blur_off.svg',
                'outlined/image/blur_on.svg',
                'outlined/image/brightness_1.svg',
                'outlined/image/brightness_2.svg',
                'outlined/image/brightness_3.svg',
                'outlined/image/brightness_4.svg',
                'outlined/image/brightness_5.svg',
                'outlined/image/brightness_6.svg',
                'outlined/image/brightness_7.svg',
                'outlined/image/broken_image.svg',
                'outlined/image/brush.svg',
                'outlined/image/burst_mode.svg',
                'outlined/image/camera.svg',
                'outlined/image/camera_alt.svg',
                'outlined/image/camera_front.svg',
                'outlined/image/camera_rear.svg',
                'outlined/image/camera_roll.svg',
                'outlined/image/center_focus_strong.svg',
                'outlined/image/center_focus_weak.svg',
                'outlined/image/collections.svg',
                'outlined/image/collections_bookmark.svg',
                'outlined/image/colorize.svg',
                'outlined/image/color_lens.svg',
                'outlined/image/compare.svg',
                'outlined/image/control_point.svg',
                'outlined/image/control_point_duplicate.svg',
                'outlined/image/crop.svg',
                'outlined/image/crop_16_9.svg',
                'outlined/image/crop_3_2.svg',
                'outlined/image/crop_5_4.svg',
                'outlined/image/crop_7_5.svg',
                'outlined/image/crop_din.svg',
                'outlined/image/crop_free.svg',
                'outlined/image/crop_landscape.svg',
                'outlined/image/crop_original.svg',
                'outlined/image/crop_portrait.svg',
                'outlined/image/crop_rotate.svg',
                'outlined/image/crop_square.svg',
                'outlined/image/details.svg',
                'outlined/image/edit.svg',
                'outlined/image/exposure.svg',
                'outlined/image/exposure_neg_1.svg',
                'outlined/image/exposure_neg_2.svg',
                'outlined/image/exposure_plus_1.svg',
                'outlined/image/exposure_plus_2.svg',
                'outlined/image/exposure_zero.svg',
                'outlined/image/filter.svg',
                'outlined/image/filter_1.svg',
                'outlined/image/filter_2.svg',
                'outlined/image/filter_3.svg',
                'outlined/image/filter_4.svg',
                'outlined/image/filter_5.svg',
                'outlined/image/filter_6.svg',
                'outlined/image/filter_7.svg',
                'outlined/image/filter_8.svg',
                'outlined/image/filter_9.svg',
                'outlined/image/filter_9_plus.svg',
                'outlined/image/filter_b_and_w.svg',
                'outlined/image/filter_center_focus.svg',
                'outlined/image/filter_drama.svg',
                'outlined/image/filter_frames.svg',
                'outlined/image/filter_hdr.svg',
                'outlined/image/filter_none.svg',
                'outlined/image/filter_tilt_shift.svg',
                'outlined/image/filter_vintage.svg',
                'outlined/image/flare.svg',
                'outlined/image/flash_auto.svg',
                'outlined/image/flash_off.svg',
                'outlined/image/flash_on.svg',
                'outlined/image/flip.svg',
                'outlined/image/gradient.svg',
                'outlined/image/grain.svg',
                'outlined/image/grid_off.svg',
                'outlined/image/grid_on.svg',
                'outlined/image/hdr_off.svg',
                'outlined/image/hdr_on.svg',
                'outlined/image/hdr_strong.svg',
                'outlined/image/hdr_weak.svg',
                'outlined/image/healing.svg',
                'outlined/image/image.svg',
                'outlined/image/image_aspect_ratio.svg',
                'outlined/image/image_search.svg',
                'outlined/image/iso.svg',
                'outlined/image/landscape.svg',
                'outlined/image/leak_add.svg',
                'outlined/image/leak_remove.svg',
                'outlined/image/lens.svg',
                'outlined/image/linked_camera.svg',
                'outlined/image/looks.svg',
                'outlined/image/looks_3.svg',
                'outlined/image/looks_4.svg',
                'outlined/image/looks_5.svg',
                'outlined/image/looks_6.svg',
                'outlined/image/looks_one.svg',
                'outlined/image/looks_two.svg',
                'outlined/image/loupe.svg',
                'outlined/image/monochrome_photos.svg',
                'outlined/image/movie_creation.svg',
                'outlined/image/movie_filter.svg',
                'outlined/image/music_note.svg',
                'outlined/image/music_off.svg',
                'outlined/image/nature.svg',
                'outlined/image/nature_people.svg',
                'outlined/image/navigate_before.svg',
                'outlined/image/navigate_next.svg',
                'outlined/image/palette.svg',
                'outlined/image/panorama.svg',
                'outlined/image/panorama_fish_eye.svg',
                'outlined/image/panorama_horizontal.svg',
                'outlined/image/panorama_vertical.svg',
                'outlined/image/panorama_wide_angle.svg',
                'outlined/image/photo.svg',
                'outlined/image/photo_album.svg',
                'outlined/image/photo_camera.svg',
                'outlined/image/photo_filter.svg',
                'outlined/image/photo_library.svg',
                'outlined/image/photo_size_select_actual.svg',
                'outlined/image/photo_size_select_large.svg',
                'outlined/image/photo_size_select_small.svg',
                'outlined/image/picture_as_pdf.svg',
                'outlined/image/portrait.svg',
                'outlined/image/remove_red_eye.svg',
                'outlined/image/rotate_90_degrees_ccw.svg',
                'outlined/image/rotate_left.svg',
                'outlined/image/rotate_right.svg',
                'outlined/image/shutter_speed.svg',
                'outlined/image/slideshow.svg',
                'outlined/image/straighten.svg',
                'outlined/image/style.svg',
                'outlined/image/switch_camera.svg',
                'outlined/image/switch_video.svg',
                'outlined/image/tag_faces.svg',
                'outlined/image/texture.svg',
                'outlined/image/timelapse.svg',
                'outlined/image/timer.svg',
                'outlined/image/timer_10.svg',
                'outlined/image/timer_3.svg',
                'outlined/image/timer_off.svg',
                'outlined/image/tonality.svg',
                'outlined/image/transform.svg',
                'outlined/image/tune.svg',
                'outlined/image/view_comfy.svg',
                'outlined/image/view_compact.svg',
                'outlined/image/vignette.svg',
                'outlined/image/wb_auto.svg',
                'outlined/image/wb_cloudy.svg',
                'outlined/image/wb_incandescent.svg',
                'outlined/image/wb_iridescent.svg',
                'outlined/image/wb_sunny.svg',
                'outlined/maps/directions_railway.svg',
                'outlined/maps/directions_run.svg',
                'outlined/maps/directions_subway.svg',
                'outlined/maps/directions_transit.svg',
                'outlined/maps/directions_walk.svg',
                'outlined/maps/edit_attributes.svg',
                'outlined/maps/edit_location.svg',
                'outlined/maps/ev_station.svg',
                'outlined/maps/fastfood.svg',
                'outlined/maps/flight.svg',
                'outlined/maps/hotel.svg',
                'outlined/maps/layers.svg',
                'outlined/maps/layers_clear.svg',
                'outlined/maps/local_activity.svg',
                'outlined/maps/local_airport.svg',
                'outlined/maps/local_atm.svg',
                'outlined/maps/local_bar.svg',
                'outlined/maps/local_cafe.svg',
                'outlined/maps/local_car_wash.svg',
                'outlined/maps/local_convenience_store.svg',
                'outlined/maps/local_dining.svg',
                'outlined/maps/local_drink.svg',
                'outlined/maps/local_florist.svg',
                'outlined/maps/local_gas_station.svg',
                'outlined/maps/local_grocery_store.svg',
                'outlined/maps/local_hospital.svg',
                'outlined/maps/local_hotel.svg',
                'outlined/maps/local_laundry_service.svg',
                'outlined/maps/local_library.svg',
                'outlined/maps/local_mall.svg',
                'outlined/maps/local_movies.svg',
                'outlined/maps/local_offer.svg',
                'outlined/maps/local_parking.svg',
                'outlined/maps/local_pharmacy.svg',
                'outlined/maps/local_phone.svg',
                'outlined/maps/local_pizza.svg',
                'outlined/maps/local_play.svg',
                'outlined/maps/local_post_office.svg',
                'outlined/maps/local_printshop.svg',
                'outlined/maps/local_see.svg',
                'outlined/maps/local_shipping.svg',
                'outlined/maps/local_taxi.svg',
                'outlined/maps/map.svg',
                'outlined/maps/money.svg',
                'outlined/maps/my_location.svg',
                'outlined/maps/navigation.svg',
                'outlined/maps/near_me.svg',
                'outlined/maps/not_listed_location.svg',
                'outlined/maps/person_pin.svg',
                'outlined/maps/person_pin_circle.svg',
                'outlined/maps/pin_drop.svg',
                'outlined/maps/place.svg',
                'outlined/maps/rate_review.svg',
                'outlined/maps/restaurant.svg',
                'outlined/maps/restaurant_menu.svg',
                'outlined/maps/satellite.svg',
                'outlined/maps/store_mall_directory.svg',
                'outlined/maps/streetview.svg',
                'outlined/maps/subway.svg',
                'outlined/maps/terrain.svg',
                'outlined/maps/traffic.svg',
                'outlined/maps/train.svg',
                'outlined/maps/tram.svg',
                'outlined/maps/transfer_within_a_station.svg',
                'outlined/maps/transit_enterexit.svg',
                'outlined/maps/trip_origin.svg',
                'outlined/maps/zoom_out_map.svg',
                'outlined/navigation/apps.svg',
                'outlined/navigation/arrow_back.svg',
                'outlined/navigation/arrow_back_ios.svg',
                'outlined/navigation/arrow_downward.svg',
                'outlined/navigation/arrow_drop_down.svg',
                'outlined/navigation/arrow_drop_down_circle.svg',
                'outlined/navigation/arrow_drop_up.svg',
                'outlined/navigation/arrow_forward.svg',
                'outlined/navigation/arrow_forward_ios.svg',
                'outlined/navigation/arrow_left.svg',
                'outlined/navigation/arrow_right.svg',
                'outlined/navigation/arrow_upward.svg',
                'outlined/navigation/cancel.svg',
                'outlined/navigation/check.svg',
                'outlined/navigation/chevron_left.svg',
                'outlined/navigation/chevron_right.svg',
                'outlined/navigation/close.svg',
                'outlined/navigation/expand_less.svg',
                'outlined/navigation/expand_more.svg',
                'outlined/navigation/first_page.svg',
                'outlined/navigation/fullscreen.svg',
                'outlined/navigation/fullscreen_exit.svg',
                'outlined/navigation/last_page.svg',
                'outlined/navigation/menu.svg',
                'outlined/navigation/more_horiz.svg',
                'outlined/navigation/more_vert.svg',
                'outlined/navigation/refresh.svg',
                'outlined/navigation/subdirectory_arrow_left.svg',
                'outlined/navigation/subdirectory_arrow_right.svg',
                'outlined/navigation/unfold_less.svg',
                'outlined/navigation/unfold_more.svg',
                'outlined/notification/adb.svg',
                'outlined/notification/airline_seat_flat.svg',
                'outlined/notification/airline_seat_flat_angled.svg',
                'outlined/notification/airline_seat_individual_suite.svg',
                'outlined/notification/airline_seat_legroom_extra.svg',
                'outlined/notification/airline_seat_legroom_normal.svg',
                'outlined/notification/airline_seat_legroom_reduced.svg',
                'outlined/notification/airline_seat_recline_extra.svg',
                'outlined/notification/airline_seat_recline_normal.svg',
                'outlined/notification/bluetooth_audio.svg',
                'outlined/notification/confirmation_number.svg',
                'outlined/notification/disc_full.svg',
                'outlined/notification/drive_eta.svg',
                'outlined/notification/enhanced_encryption.svg',
                'outlined/notification/event_available.svg',
                'outlined/notification/event_busy.svg',
                'outlined/notification/event_note.svg',
                'outlined/notification/folder_special.svg',
                'outlined/notification/live_tv.svg',
                'outlined/notification/mms.svg',
                'outlined/notification/more.svg',
                'outlined/notification/network_check.svg',
                'outlined/notification/network_locked.svg',
                'outlined/notification/no_encryption.svg',
                'outlined/notification/ondemand_video.svg',
                'outlined/notification/personal_video.svg',
                'outlined/notification/phone_bluetooth_speaker.svg',
                'outlined/notification/phone_callback.svg',
                'outlined/notification/phone_forwarded.svg',
                'outlined/notification/phone_in_talk.svg',
                'outlined/notification/phone_locked.svg',
                'outlined/notification/phone_missed.svg',
                'outlined/notification/phone_paused.svg',
                'outlined/notification/power.svg',
                'outlined/notification/power_off.svg',
                'outlined/notification/priority_high.svg',
                'outlined/notification/sd_card.svg',
                'outlined/notification/sms.svg',
                'outlined/notification/sms_failed.svg',
                'outlined/notification/sync.svg',
                'outlined/notification/sync_disabled.svg',
                'outlined/notification/sync_problem.svg',
                'outlined/notification/system_update.svg',
                'outlined/notification/tap_and_play.svg',
                'outlined/notification/time_to_leave.svg',
                'outlined/notification/tv_off.svg',
                'outlined/notification/vibration.svg',
                'outlined/notification/voice_chat.svg',
                'outlined/notification/vpn_lock.svg',
                'outlined/notification/wc.svg',
                'outlined/notification/wifi.svg',
                'outlined/notification/wifi_off.svg',
                'outlined/places/ac_unit.svg',
                'outlined/places/airport_shuttle.svg',
                'outlined/places/all_inclusive.svg',
                'outlined/places/beach_access.svg',
                'outlined/places/business_center.svg',
                'outlined/places/casino.svg',
                'outlined/places/child_care.svg',
                'outlined/places/child_friendly.svg',
                'outlined/places/fitness_center.svg',
                'outlined/places/free_breakfast.svg',
                'outlined/places/golf_course.svg',
                'outlined/places/hot_tub.svg',
                'outlined/places/kitchen.svg',
                'outlined/places/meeting_room.svg',
                'outlined/places/no_meeting_room.svg',
                'outlined/places/pool.svg',
                'outlined/places/room_service.svg',
                'outlined/places/rv_hookup.svg',
                'outlined/places/smoke_free.svg',
                'outlined/places/smoking_rooms.svg',
                'outlined/places/spa.svg',
                'outlined/social/cake.svg',
                'outlined/social/domain.svg',
                'outlined/social/group.svg',
                'outlined/social/group_add.svg',
                'outlined/social/location_city.svg',
                'outlined/social/mood.svg',
                'outlined/social/mood_bad.svg',
                'outlined/social/notifications.svg',
                'outlined/social/notifications_active.svg',
                'outlined/social/notifications_none.svg',
                'outlined/social/notifications_off.svg',
                'outlined/social/notifications_paused.svg',
                'outlined/social/pages.svg',
                'outlined/social/party_mode.svg',
                'outlined/social/people.svg',
                'outlined/social/people_outline.svg',
                'outlined/social/person.svg',
                'outlined/social/person_add.svg',
                'outlined/social/person_outline.svg',
                'outlined/social/plus_one.svg',
                'outlined/social/poll.svg',
                'outlined/social/public.svg',
                'outlined/social/school.svg',
                'outlined/social/sentiment_dissatisfied.svg',
                'outlined/social/sentiment_satisfied.svg',
                'outlined/social/sentiment_very_dissatisfied.svg',
                'outlined/social/sentiment_very_satisfied.svg',
                'outlined/social/share.svg',
                'outlined/social/thumb_down_alt.svg',
                'outlined/social/thumb_up_alt.svg',
                'outlined/social/whatshot.svg',
                'outlined/toggle/check_box.svg',
                'outlined/toggle/check_box_outline_blank.svg',
                'outlined/toggle/indeterminate_check_box.svg',
                'outlined/toggle/radio_button_checked.svg',
                'outlined/toggle/radio_button_unchecked.svg',
                'outlined/toggle/star.svg',
                'outlined/toggle/star_border.svg',
                'outlined/toggle/star_half.svg',
                'outlined/toggle/toggle_off.svg',
                'outlined/toggle/toggle_on.svg'
            ]
        }
    ];
    /** @type {?} */
    var ChineseIconCategory = [
        ['action', '动作类'],
        ['alert', '警示类'],
        ['av', '音视频类'],
        ['communication', '通信类'],
        ['content', '内容类'],
        ['device', '装置类'],
        ['editor', '编辑类'],
        ['fill', '填充类'],
        ['hardware', '硬件类'],
        ['image', '形象类'],
        ['maps', '类'],
        ['navigation', '导航类'],
        ['notification', '告示类'],
        ['places', '位置类'],
        ['social', '社会'],
        ['toggle', '开关']
    ];
    var IconCategory = /** @class */ (function () {
        function IconCategory() {
        }
        return IconCategory;
    }());
    if (false) {
        /** @type {?} */
        IconCategory.prototype.category;
        /** @type {?} */
        IconCategory.prototype.categoryCN;
        /** @type {?} */
        IconCategory.prototype.icons;
    }
    var Icon = /** @class */ (function () {
        function Icon(data) {
            this.name = data.name;
            this.fs = data.fs;
        }
        return Icon;
    }());
    if (false) {
        /** @type {?} */
        Icon.prototype.name;
        /** @type {?} */
        Icon.prototype.fs;
    }
    var IconList = /** @class */ (function () {
        function IconList() {
            var _this = this;
            this.icons = {};
            iconList.forEach((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                /** @type {?} */
                var groupCategory = {};
                /** @type {?} */
                var categoryOrder = [];
                v.list.forEach((/**
                 * @param {?} vv
                 * @return {?}
                 */
                function (vv) {
                    /** @type {?} */
                    var key = vv.split(/(\\|\/)/g)[2];
                    if (!groupCategory[key]) {
                        /** @type {?} */
                        var c = new IconCategory();
                        c.category = key;
                        /** @type {?} */
                        var findArr = ChineseIconCategory.find((/**
                         * @param {?} cnArr
                         * @return {?}
                         */
                        function (cnArr) { return cnArr[0] === key; }));
                        if (findArr) {
                            c.categoryCN = findArr[1];
                        }
                        else {
                            c.categoryCN = c.category;
                        }
                        c.icons = [new Icon({ name: withoutExt(vv), fs: vv })];
                        groupCategory[key] = c;
                        categoryOrder.push(c);
                    }
                    else {
                        groupCategory[key].icons.push(new Icon({ name: withoutExt(vv), fs: vv }));
                    }
                }));
                _this.icons[v.nameSpace] = categoryOrder;
            }));
        }
        IconList.decorators = [
            { type: core.Injectable, args: [{
                        providedIn: 'root'
                    },] }
        ];
        /** @nocollapse */
        IconList.ctorParameters = function () { return []; };
        /** @nocollapse */ IconList.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function IconList_Factory() { return new IconList(); }, token: IconList, providedIn: "root" });
        return IconList;
    }());
    if (false) {
        /** @type {?} */
        IconList.prototype.icons;
    }
    /**
     * @param {?} fsName
     * @return {?}
     */
    function withoutExt(fsName) {
        return fsName
            .split(/(\\|\/)/g)
            .pop()
            .split('.')[0];
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var AppLoadService = /** @class */ (function () {
        function AppLoadService(injector, eles, project, title, iconRegistry, sanitizer, iconList // private snackBar: MatSnackBar
        ) {
            var _this = this;
            this.injector = injector;
            this.eles = eles;
            this.project = project;
            this.title = title;
            this.iconList = iconList;
            // this.goRoute = this.goRoute.bind(this);
            Object.keys(this.iconList.icons).forEach((/**
             * @param {?} ns
             * @return {?}
             */
            function (ns) {
                _this.iconList.icons[ns].forEach((/**
                 * @param {?} cate
                 * @return {?}
                 */
                function (cate) {
                    cate.icons.forEach((/**
                     * @param {?} icon
                     * @return {?}
                     */
                    function (icon) {
                        iconRegistry.addSvgIconInNamespace(ns, icon.name, sanitizer.bypassSecurityTrustResourceUrl('assets/icon/' + icon.fs));
                    }));
                }));
            }));
        }
        /**
         * @return {?}
         */
        AppLoadService.prototype.initializeApp = /**
         * @return {?}
         */
        function () {
            var _this = this;
            /** @type {?} */
            var This = this;
            window.onbeforeunload = (/**
             * @return {?}
             */
            function () {
                if (This.store) {
                    This.store.save();
                }
            });
            this.project.applicationStatus = 'start-init';
            return new Promise((/**
             * @param {?} resolve
             * @param {?} reject
             * @return {?}
             */
            function (resolve, reject) {
                setTimeout((/**
                 * @return {?}
                 */
                function () {
                    // 获取Project前缀
                    /** @type {?} */
                    var projectName;
                    /** @type {?} */
                    var creator;
                    This.router = _this.injector.get(router.Router);
                    /** @type {?} */
                    var subscribeRouter = This.router.events.subscribe((/**
                     * @param {?} event
                     * @return {?}
                     */
                    function (event) {
                        if (event instanceof router.RoutesRecognized) {
                            subscribeRouter.unsubscribe();
                            // 防止根目录跳转到login,url取到的是根目录
                            /** @type {?} */
                            var paths = event.urlAfterRedirects.split('/');
                            creator = decodeURIComponent(decodeURI(paths[2]));
                            projectName = decodeURIComponent(decodeURI(paths[3]));
                            /** @type {?} */
                            var eleName_1 = decodeURIComponent(decodeURI(paths[4]));
                            _this.project.setProject(projectName, creator);
                            // 这里不能自动注入authservice,因为其用到了router,会出现undefine
                            This.auth = _this.injector.get(dbwebCore.AuthService);
                            This.auth.serverIsLogged().subscribe((/**
                             * @param {?} v
                             * @return {?}
                             */
                            function (v) {
                                This.project.getProjectInfo().subscribe((/**
                                 * @param {?} state
                                 * @return {?}
                                 */
                                function (state) {
                                    _this.title.setTitle(_this.project.projectLabel);
                                    _this.eles.setPub(_this.project.publicElements);
                                    if (v) {
                                        _this.store = _this.injector.get(dbwebCore.StoreService);
                                        _this.store.load();
                                    }
                                    else {
                                        // 判断是否是公共的菜单项,公共的菜单项不需要重新路由
                                        if (!_this.eles.getPubEles()[eleName_1]) {
                                            // 如果没有登录,则路由到默认页
                                            _this.router.navigate(['']);
                                        }
                                    }
                                    resolve();
                                    return;
                                }));
                            }), (/**
                             * @param {?} err
                             * @return {?}
                             */
                            function (err) {
                                // this.snackBar.open(err.message, '确定', { verticalPosition: 'top' });
                                reject();
                            }));
                        }
                    }));
                }));
            })).then((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.project.applicationStatus = 'init-done';
                dbwebCore.ApplicationInited.next(v);
            }), (/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.project.applicationStatus = 'init-error';
                // 路由到默认页面,要防止当前url是具体内部的业务功能,没有针对init-error的处理呈现
                // 默认页面一般是login页面,有对这种情况的呈现处理
                _this.router.navigate(['']);
            }));
        };
        AppLoadService.decorators = [
            { type: core.Injectable, args: [{
                        providedIn: 'root'
                    },] }
        ];
        /** @nocollapse */
        AppLoadService.ctorParameters = function () { return [
            { type: core.Injector },
            { type: dbwebCore.ElementsService },
            { type: dbwebCore.ProjectService },
            { type: platformBrowser.Title },
            { type: icon.MatIconRegistry },
            { type: platformBrowser.DomSanitizer },
            { type: IconList }
        ]; };
        /** @nocollapse */ AppLoadService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function AppLoadService_Factory() { return new AppLoadService(core.ɵɵinject(core.INJECTOR), core.ɵɵinject(dbwebCore.ElementsService), core.ɵɵinject(dbwebCore.ProjectService), core.ɵɵinject(platformBrowser.Title), core.ɵɵinject(icon.MatIconRegistry), core.ɵɵinject(platformBrowser.DomSanitizer), core.ɵɵinject(IconList)); }, token: AppLoadService, providedIn: "root" });
        return AppLoadService;
    }());
    if (false) {
        /**
         * @type {?}
         * @private
         */
        AppLoadService.prototype.auth;
        /**
         * @type {?}
         * @private
         */
        AppLoadService.prototype.store;
        /**
         * @type {?}
         * @private
         */
        AppLoadService.prototype.router;
        /**
         * @type {?}
         * @private
         */
        AppLoadService.prototype.injector;
        /**
         * @type {?}
         * @private
         */
        AppLoadService.prototype.eles;
        /**
         * @type {?}
         * @private
         */
        AppLoadService.prototype.project;
        /**
         * @type {?}
         * @private
         */
        AppLoadService.prototype.title;
        /**
         * @type {?}
         * @private
         */
        AppLoadService.prototype.iconList;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ThemeService = /** @class */ (function () {
        function ThemeService() {
            this._theme = new rxjs.BehaviorSubject(localStorage.getItem('theme'));
            this.theme = this._theme.pipe(operators.tap((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                localStorage.setItem('theme', v);
            })), operators.map((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                switch (v) {
                    case 'blue-light-theme':
                        return {
                            name: v,
                            color: 'blue',
                            model: 'light'
                        };
                    case 'blue-dark-theme':
                        return {
                            name: v,
                            color: 'blue',
                            model: 'dark'
                        };
                    case 'deep-purple-light-theme':
                        return {
                            name: v,
                            color: 'deep-purple',
                            model: 'light'
                        };
                    case 'deep-purple-dark-theme':
                        return {
                            name: v,
                            color: 'deep-purple',
                            model: 'dark'
                        };
                    case 'pink-light-theme':
                        return {
                            name: v,
                            color: 'pink',
                            model: 'light'
                        };
                    case 'pink-dark-theme':
                        return {
                            name: v,
                            color: 'pink',
                            model: 'dark'
                        };
                    case 'orange-light-theme':
                        return {
                            name: v,
                            color: 'orange',
                            model: 'light'
                        };
                    case 'orange-dark-theme':
                        return {
                            name: v,
                            color: 'orange',
                            model: 'dark'
                        };
                    case 'green-light-theme':
                        return {
                            name: v,
                            color: 'green',
                            model: 'light'
                        };
                    case 'green-dark-theme':
                        return {
                            name: v,
                            color: 'green',
                            model: 'dark'
                        };
                    default:
                        return {
                            name: v,
                            color: 'blue',
                            model: 'light'
                        };
                }
            })));
        }
        /**
         * @param {?} val
         * @return {?}
         */
        ThemeService.prototype.setTheme = /**
         * @param {?} val
         * @return {?}
         */
        function (val) {
            this._theme.next(val);
        };
        ThemeService.decorators = [
            { type: core.Injectable, args: [{
                        providedIn: 'root'
                    },] }
        ];
        /** @nocollapse */ ThemeService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function ThemeService_Factory() { return new ThemeService(); }, token: ThemeService, providedIn: "root" });
        return ThemeService;
    }());
    if (false) {
        /**
         * @type {?}
         * @private
         */
        ThemeService.prototype._theme;
        /** @type {?} */
        ThemeService.prototype.theme;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /** @type {?} */
    var ElementBillClone = 'billclone';
    /**
     * @record
     */
    function GetClonePKParam() { }
    if (false) {
        /** @type {?} */
        GetClonePKParam.prototype.OldSignPK;
        /** @type {?} */
        GetClonePKParam.prototype.EleName;
    }
    /**
     * @record
     */
    function BillCloneParam() { }
    if (false) {
        /** @type {?} */
        BillCloneParam.prototype.EleName;
        /** @type {?} */
        BillCloneParam.prototype.OldSignPK;
        /** @type {?} */
        BillCloneParam.prototype.NewPK;
    }
    /**
     * @record
     */
    function BillCloneResult() { }
    if (false) {
        /** @type {?} */
        BillCloneResult.prototype.Ok;
        /** @type {?} */
        BillCloneResult.prototype.Error;
    }
    var BillCloneBackfaceService = /** @class */ (function () {
        function BillCloneBackfaceService(api) {
            this.api = api;
        }
        /**
         * @param {?} param
         * @return {?}
         */
        BillCloneBackfaceService.prototype.getClonePK = /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            return this.api.get(ElementBillClone, 'get-clone-pk', param);
        };
        /**
         * @param {?} param
         * @return {?}
         */
        BillCloneBackfaceService.prototype.billClone = /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            return this.api.post(ElementBillClone, 'bill-clone', param);
        };
        BillCloneBackfaceService.decorators = [
            { type: core.Injectable, args: [{
                        providedIn: 'root'
                    },] }
        ];
        /** @nocollapse */
        BillCloneBackfaceService.ctorParameters = function () { return [
            { type: dbwebCore.ElementApiService }
        ]; };
        /** @nocollapse */ BillCloneBackfaceService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function BillCloneBackfaceService_Factory() { return new BillCloneBackfaceService(core.ɵɵinject(dbwebCore.ElementApiService)); }, token: BillCloneBackfaceService, providedIn: "root" });
        return BillCloneBackfaceService;
    }());
    if (false) {
        /**
         * @type {?}
         * @private
         */
        BillCloneBackfaceService.prototype.api;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var CloneComponent = /** @class */ (function () {
        function CloneComponent(dialogRef, data) {
            this.dialogRef = dialogRef;
            this.data = data;
            this.hostClass = true;
        }
        /**
         * @return {?}
         */
        CloneComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            this.clone.nativeElement.parentElement.parentElement.style = 'padding:0px;';
        };
        /**
         * @return {?}
         */
        CloneComponent.prototype.ok = /**
         * @return {?}
         */
        function () {
            /** @type {?} */
            var rev = {};
            this.data.forEach((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                rev[v.Name] = v.Fill;
            }));
            this.dialogRef.close(rev);
        };
        /**
         * @return {?}
         */
        CloneComponent.prototype.close = /**
         * @return {?}
         */
        function () {
            this.dialogRef.close();
        };
        CloneComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-clone',
                        template: "<div #clone class=\"clone-all\">\r\n\t<div class=\"clone-title\" >\u514B\u9686\u5F53\u524D\u8BB0\u5F55</div>\r\n\t<div class=\"clone-tips\">\u8BF7\u8F93\u5165\u65B0\u4E3B\u952E\u503C</div>\r\n\t<div class=\"clone-content\" mat-dialog-content>\r\n\t\t<div class=\"clone-field\" *ngFor=\"let field of data\">\r\n\t\t\t<div class=\"clone-field-name\">{{ field.Name }}</div>\r\n\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t<input matInput [(ngModel)]=\"field.Fill\" />\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class=\"clone-warn\">\u514B\u9686\u7684\u662F\u5DF2\u7ECF\u4FDD\u5B58\u5230\u6570\u636E\u5E93\u7684\u503C,\u800C\u4E0D\u662F\u754C\u9762\u4E0A\u672A\u4FDD\u5B58\u7684\u6570\u636E</div>\r\n\t<div class=\"clone-actions\" mat-dialog-actions>\r\n\t\t<button mat-button (click)=\"close()\">\u53D6\u6D88</button>\r\n\t\t<button class=\"clone-confirm\" mat-button color='primary' (click)=\"ok()\">\u514B\u9686</button>\r\n\t</div>\r\n</div>\r\n",
                        styles: [".clone-all{width:368px;max-height:calc(100% - 240px);padding:24px 0 16px;display:flex;flex-direction:column}.clone-title{font-size:20px;font-weight:700;padding-left:24px}.clone-tips{font-size:14px;padding:8px 0 24px 24px}.clone-content{flex-grow:1;overflow-y:auto}.clone-content .clone-field{width:100%;padding:0 24px 0 8px;box-sizing:border-box;display:flex;align-items:center}.clone-content .clone-field .clone-field-name{font-size:16px;width:80px;margin-right:8px;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.clone-content .clone-field .mat-form-field{flex-grow:1;font-size:16px}.clone-content .clone-field .mat-form-field ::ng-deep .mat-form-field-infix{border:0;height:16px;padding:12px 0}.clone-content .clone-field .mat-form-field ::ng-deep .mat-form-field-wrapper{padding-bottom:0!important}.clone-warn{padding:8px 10px 24px 24px;box-sizing:border-box;font-size:12px}.clone-actions{text-align:right;padding-right:10px}.clone-actions button{font-size:16px}.clone-actions .clone-confirm{margin-left:8px;font-weight:700}"]
                    }] }
        ];
        /** @nocollapse */
        CloneComponent.ctorParameters = function () { return [
            { type: material.MatDialogRef },
            { type: Array, decorators: [{ type: core.Inject, args: [material.MAT_DIALOG_DATA,] }] }
        ]; };
        CloneComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.c-bill-colone',] }],
            clone: [{ type: core.ViewChild, args: ['clone', { static: true },] }]
        };
        return CloneComponent;
    }());
    if (false) {
        /** @type {?} */
        CloneComponent.prototype.hostClass;
        /** @type {?} */
        CloneComponent.prototype.clone;
        /** @type {?} */
        CloneComponent.prototype.fillValues;
        /** @type {?} */
        CloneComponent.prototype.dialogRef;
        /** @type {?} */
        CloneComponent.prototype.data;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /**
     * @record
     */
    function DialogData() { }
    if (false) {
        /** @type {?} */
        DialogData.prototype.message;
    }
    var ErrorMessageComponent = /** @class */ (function () {
        function ErrorMessageComponent(dialogRef, data) {
            this.dialogRef = dialogRef;
            this.data = data;
            this.hostClass = true;
        }
        /**
         * @return {?}
         */
        ErrorMessageComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        /**
         * @return {?}
         */
        ErrorMessageComponent.prototype.onNoClick = /**
         * @return {?}
         */
        function () {
            this.dialogRef.close();
        };
        ErrorMessageComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-error-message',
                        template: "<h1 mat-dialog-title>\u9519\u8BEF\u63D0\u793A</h1>\n<div mat-dialog-content>\n  <p>{{data.message}}</p>\n</div>\n<div mat-dialog-actions>\n  <button mat-button (click)=\"onNoClick()\">\u5173\u95ED</button>\n</div>",
                        styles: [""]
                    }] }
        ];
        /** @nocollapse */
        ErrorMessageComponent.ctorParameters = function () { return [
            { type: material.MatDialogRef },
            { type: undefined, decorators: [{ type: core.Inject, args: [material.MAT_DIALOG_DATA,] }] }
        ]; };
        ErrorMessageComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.c-bill-error-message',] }]
        };
        return ErrorMessageComponent;
    }());
    if (false) {
        /** @type {?} */
        ErrorMessageComponent.prototype.hostClass;
        /** @type {?} */
        ErrorMessageComponent.prototype.dialogRef;
        /** @type {?} */
        ErrorMessageComponent.prototype.data;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /**
     * @record
     */
    function Record() { }
    if (false) {
        /** @type {?} */
        Record.prototype.Main;
        /** @type {?|undefined} */
        Record.prototype.Child;
    }
    /**
     * @record
     */
    function BeforeSaveParam() { }
    if (false) {
        /** @type {?} */
        BeforeSaveParam.prototype.record;
        /** @type {?|undefined} */
        BeforeSaveParam.prototype.tag;
    }
    var BillComponent = /** @class */ (function () {
        function BillComponent(rele, billBackface, tabs, dialog, billCloneService, snackBar) {
            var _this = this;
            this.rele = rele;
            this.billBackface = billBackface;
            this.tabs = tabs;
            this.dialog = dialog;
            this.billCloneService = billCloneService;
            this.snackBar = snackBar;
            this.init = new core.EventEmitter();
            // 这里的Name依据typestruct来
            this.useTypeRecord = false;
            this.typeRecord = {};
            this.rele.currentElement.subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.element = v;
                _this.billBackface.get(v).subscribe((/**
                 * @param {?} vv
                 * @return {?}
                 */
                function (vv) {
                    _this.checkResults = vv.CheckResults;
                    _this.oldData = vv.EncodeData;
                    _this.operate = vv.Operate;
                    _this.allowClone = vv.AllowClone;
                    _this.fields = vv.Fields;
                    _this.typeRecord = vv.TypeRecord;
                    _this.record = vv.Record;
                    _this.signKeyValues = vv.SignKeyValues;
                    _this.useTypeRecord = vv.TypeRecord !== undefined && vv.TypeRecord !== null;
                    // 对主表字段的映射
                    _this.fieldMap = vv.Fields.reduce((/**
                     * @param {?} result
                     * @param {?} item
                     * @return {?}
                     */
                    function (result, item) {
                        result[item.Name] = item;
                        return result;
                    }), {});
                    // 只建立主表的formgroup
                    if (_this.useTypeRecord) {
                        _this.formGroup = new forms.FormGroup(_this.fields.reduce((/**
                         * @param {?} result
                         * @param {?} fld
                         * @return {?}
                         */
                        function (result, fld) {
                            if (fld.Type === dbwebCore.BillFieldDataType.DATE && _this.typeRecord[fld.Name]) {
                                result[fld.Name] = new forms.FormControl({
                                    value: _this.fixShowDate((/** @type {?} */ (_this.typeRecord[fld.Name]))),
                                    // 去掉时区
                                    disabled: fld.Readonly
                                });
                            }
                            else {
                                result[fld.Name] = new forms.FormControl({
                                    value: _this.typeRecord[fld.Name],
                                    disabled: fld.Readonly
                                });
                            }
                            return result;
                        }), {}));
                    }
                    else {
                        _this.formGroup = new forms.FormGroup(_this.fields.reduce((/**
                         * @param {?} result
                         * @param {?} fld
                         * @return {?}
                         */
                        function (result, fld) {
                            if (fld.Type === dbwebCore.BillFieldDataType.DATE && _this.record.Main[fld.Name]) {
                                result[fld.Name] = new forms.FormControl({
                                    value: _this.fixShowDate((/** @type {?} */ (_this.record.Main[fld.Name]))),
                                    // 去掉时区
                                    disabled: fld.Readonly
                                });
                            }
                            else {
                                result[fld.Name] = new forms.FormControl({
                                    value: _this.record.Main[fld.Name],
                                    disabled: fld.Readonly
                                });
                            }
                            return result;
                        }), {}));
                    }
                    _this.init.emit();
                }), (/**
                 * @param {?} err
                 * @return {?}
                 */
                function (err) {
                    _this.error = err.error.Error;
                }));
            }));
        }
        /**
         * @private
         * @param {?} d
         * @return {?}
         */
        BillComponent.prototype.fixShowDate = /**
         * @private
         * @param {?} d
         * @return {?}
         */
        function (d) {
            if (d) {
                return d.substr(0, 16);
            }
            return d;
        };
        /**
         * @return {?}
         */
        BillComponent.prototype.ngAfterContentInit = /**
         * @return {?}
         */
        function () { };
        /**
         * @param {?} mes
         * @return {?}
         */
        BillComponent.prototype.showErrorMessage = /**
         * @param {?} mes
         * @return {?}
         */
        function (mes) {
            this.dialog.open(ErrorMessageComponent, {
                // width: '450px',
                data: { message: mes },
                autoFocus: false
            });
            // dialogRef.afterClosed().subscribe(result => {
            // 	console.log('The dialog was closed');
            // });
        };
        /**
         * @return {?}
         */
        BillComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        /**
         * @return {?}
         */
        BillComponent.prototype.isAdd = /**
         * @return {?}
         */
        function () {
            return this.operate === dbwebCore.BillOperate.Add;
        };
        /**
         * @return {?}
         */
        BillComponent.prototype.isEdit = /**
         * @return {?}
         */
        function () {
            return this.operate === dbwebCore.BillOperate.Edit;
        };
        /**
         * @return {?}
         */
        BillComponent.prototype.isDelete = /**
         * @return {?}
         */
        function () {
            return this.operate === dbwebCore.BillOperate.Delete;
        };
        /**
         * @return {?}
         */
        BillComponent.prototype.isBrowse = /**
         * @return {?}
         */
        function () {
            return this.operate === dbwebCore.BillOperate.Browse;
        };
        /**
         * @return {?}
         */
        BillComponent.prototype.close = /**
         * @return {?}
         */
        function () {
            this.tabs.close();
        };
        /**
         * @private
         * @param {?} d
         * @return {?}
         */
        BillComponent.prototype.fixDate = /**
         * @private
         * @param {?} d
         * @return {?}
         */
        function (d) {
            /** @type {?} */
            var timezoneOffsetInHours = -(d.getTimezoneOffset() / 60);
            // UTC minus local time
            /** @type {?} */
            var sign = timezoneOffsetInHours >= 0 ? '+' : '-';
            /** @type {?} */
            var leadingZero = Math.abs(timezoneOffsetInHours) < 10 ? '0' : '';
            // It's a bit unfortunate that we need to construct a new Date instance
            // (we don't want _this_ Date instance to be modified)
            /** @type {?} */
            var correctedDate = new Date(d.getFullYear(), d.getMonth(), d.getDate(), d.getHours(), d.getMinutes(), d.getSeconds(), d.getMilliseconds());
            correctedDate.setHours(d.getHours() + timezoneOffsetInHours);
            /** @type {?} */
            var iso = correctedDate.toISOString().replace('Z', '');
            return iso + sign + leadingZero + Math.abs(timezoneOffsetInHours).toString() + ':00';
        };
        // 返回formgroup的转换好类型的值
        // 返回formgroup的转换好类型的值
        /**
         * @return {?}
         */
        BillComponent.prototype.getFormGroupValueAsType = 
        // 返回formgroup的转换好类型的值
        /**
         * @return {?}
         */
        function () {
            var _this = this;
            /** @type {?} */
            var rev = {};
            this.fields.forEach((/**
             * @param {?} fld
             * @return {?}
             */
            function (fld) {
                switch (fld.Type) {
                    case dbwebCore.BillFieldDataType.FLOAT:
                        rev[fld.Name] = parseFloat(_this.formGroup.get(fld.Name).value);
                        break;
                    case dbwebCore.BillFieldDataType.INT:
                        rev[fld.Name] = parseInt(_this.formGroup.get(fld.Name).value, 10);
                        break;
                    case dbwebCore.BillFieldDataType.DATE:
                        if (_this.formGroup.get(fld.Name).value) {
                            rev[fld.Name] = _this.fixDate(new Date(_this.formGroup.get(fld.Name).value));
                        }
                        else {
                            rev[fld.Name] = null;
                        }
                        break;
                    default:
                        rev[fld.Name] = _this.formGroup.get(fld.Name).value;
                        break;
                }
            }));
            return rev;
        };
        /**
         * @return {?}
         */
        BillComponent.prototype.save = /**
         * @return {?}
         */
        function () {
            var _this = this;
            // 合并修改的数据
            if (this.useTypeRecord) {
                this.typeRecord = __assign({}, this.typeRecord, this.getFormGroupValueAsType());
            }
            else {
                this.record = {
                    Main: __assign({}, this.record.Main, this.getFormGroupValueAsType()),
                    Child: __assign({}, this.record.Child)
                };
            }
            /** @type {?} */
            var process = (/**
             * @param {?} data
             * @return {?}
             */
            function (data) {
                // 合并修改的数据
                if (_this.useTypeRecord) {
                    _this.typeRecord = __assign({}, _this.typeRecord, data ? data.record : null);
                }
                else {
                    if (data && data.record) {
                        _this.record.Main = __assign({}, _this.record.Main, data.record.Main);
                        _this.record.Child = data.record.Child;
                    }
                }
                _this.billBackface
                    .post(_this.element, (/** @type {?} */ ({
                    CheckOnly: false,
                    OldData: _this.oldData,
                    Tag: data ? data.tag : null,
                    NewTypeRecord: _this.typeRecord,
                    NewRecord: _this.record
                })))
                    .subscribe((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) {
                    if (v.Ok) {
                        _this.tabs.close();
                        return;
                    }
                    _this.showErrorMessage(v.Error);
                }));
            });
            if (this.onBeforeSave) {
                this.onBeforeSave(this).subscribe((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) {
                    process(v);
                }));
            }
            else {
                process(null);
            }
        };
        /**
         * @return {?}
         */
        BillComponent.prototype.delete = /**
         * @return {?}
         */
        function () {
            var _this = this;
            return this.billBackface.delete(this.element, this.oldData).subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                if (v.Ok) {
                    _this.tabs.close();
                    return;
                }
                _this.showErrorMessage(v.Error);
            }));
        };
        /**
         * @return {?}
         */
        BillComponent.prototype.clone = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.billCloneService
                .getClonePK({ OldSignPK: this.signKeyValues, EleName: this.element.element.Name })
                .subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                /** @type {?} */
                var dialogRef = _this.dialog.open(CloneComponent, {
                    // width: '450px',
                    data: v
                });
                dialogRef.afterClosed().subscribe((/**
                 * @param {?} result
                 * @return {?}
                 */
                function (result) {
                    if (result) {
                        _this.billCloneService
                            .billClone({
                            EleName: _this.element.element.Name,
                            OldSignPK: _this.signKeyValues,
                            NewPK: result
                        })
                            .subscribe((/**
                         * @param {?} apirev
                         * @return {?}
                         */
                        function (apirev) {
                            if (apirev.Ok) {
                                _this.snackBar.open('成功完成克隆', '关闭', {
                                    horizontalPosition: 'right',
                                    verticalPosition: 'bottom',
                                    duration: 5000
                                });
                            }
                            else {
                                _this.snackBar.open(apirev.Error, '关闭', {
                                    horizontalPosition: 'right',
                                    verticalPosition: 'bottom'
                                });
                            }
                        }));
                    }
                }));
            }));
        };
        BillComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-bill',
                        template: "<div *ngIf=\"error;else noErr\">{{error}}</div>\r\n<ng-template #noErr>\r\n\t<div class=\"bill\">\r\n\t\t<div class=\"content\">\r\n\t\t\t<ng-content></ng-content>\r\n\t\t</div>\r\n\t\t<div class=\"footer\">\r\n\t\t\t<div class=\"clone\">\r\n\t\t\t\t<button mat-button class=\"\u529F\u80FD\u6309\u94AE\" (click)=\"clone()\"\r\n\t\t\t\t\t*ngIf=\"allowClone\">\r\n\t\t\t\t\t<mat-icon svgIcon=\"compare_arrows\"></mat-icon>\u514B\u9686\r\n\t\t\t\t</button>\r\n\t\t\t</div>\r\n\t\t\t<button mat-button class=\"\u529F\u80FD\u6309\u94AE\"\r\n\t\t\t\t*ngIf=\"checkResults&&checkResults.length>0\">\r\n\t\t\t\t<mat-icon svgIcon=\"spellcheck\"></mat-icon>\u5BA1\u6838\u5907\u6CE8\r\n\t\t\t</button>\r\n\t\t\t<div class=\"\u5206\u5272\u7EBF\"\r\n\t\t\t\t*ngIf=\"allowClone || (checkResults && checkResults.length>0)\">\r\n\t\t\t</div>\r\n\t\t\t<!-- <button mat-button class=\"\u529F\u80FD\u6309\u94AE\" (click)=\"close()\">\r\n\t\t\t\t<mat-icon svgIcon=\"outlined:book\"></mat-icon>\u65E5\u5FD7\r\n\t\t\t</button> -->\r\n\t\t\t<button mat-button class=\"\u529F\u80FD\u6309\u94AE\" (click)=\"close()\"\r\n\t\t\t\t*ngIf=\"isAdd() || isEdit() || isDelete()\">\r\n\t\t\t\t<mat-icon svgIcon=\"close\"></mat-icon>\u53D6\u6D88\r\n\t\t\t</button>\r\n\t\t\t<button mat-button class=\"\u529F\u80FD\u6309\u94AE\" (click)=\"close()\"\r\n\t\t\t\t*ngIf=\"isBrowse()\">\r\n\t\t\t\t<mat-icon svgIcon=\"close\"></mat-icon>\u5173\u95ED\r\n\t\t\t</button>\r\n\t\t\t<button mat-button class=\"\u529F\u80FD\u6309\u94AE\" (click)=\"save()\" *ngIf=\"isAdd()\">\r\n\t\t\t\t<mat-icon svgIcon=\"add\"></mat-icon>\u65B0\u589E\r\n\t\t\t</button>\r\n\t\t\t<button mat-button class=\"\u529F\u80FD\u6309\u94AE \u4FDD\u5B58\u6309\u94AE\" (click)=\"save()\"\r\n\t\t\t\t*ngIf=\"isEdit()\">\r\n\t\t\t\t<mat-icon svgIcon=\"outlined:save\"></mat-icon>\u4FDD\u5B58\r\n\t\t\t</button>\r\n\t\t\t<button mat-button class=\"\u529F\u80FD\u6309\u94AE\" (click)=\"delete()\"\r\n\t\t\t\t*ngIf=\"isDelete()\">\r\n\t\t\t\t<mat-icon svgIcon=\"delete\"></mat-icon>\u5220\u9664\r\n\t\t\t</button>\r\n\t\t</div>\r\n\t</div>\r\n</ng-template>",
                        styles: ["@charset \"UTF-8\";.bill{width:100%;height:100%;display:flex;flex-direction:column;align-items:stretch}.content{width:100%;flex:1;overflow:auto;padding:16px 8px;box-sizing:border-box}.footer{width:100%;height:48px;display:flex;justify-content:flex-end;align-items:center;padding-right:16px;box-sizing:border-box}.clone{text-align:left}.\u529F\u80FD\u6309\u94AE{height:32px;text-align:center;max-height:32px;line-height:32px;font-size:14px;cursor:pointer}.\u529F\u80FD\u6309\u94AE .mat-icon{width:16px;height:16px;line-height:16px;margin-right:4px;vertical-align:middle}.\u4FDD\u5B58\u6309\u94AE{display:inline-block;margin-left:8px}.\u5206\u5272\u7EBF{width:1px;height:50%;margin:0 24px}"]
                    }] }
        ];
        /** @nocollapse */
        BillComponent.ctorParameters = function () { return [
            { type: dbwebCore.RouteElementService },
            { type: dbwebCore.BillBackfaceService },
            { type: TabsService },
            { type: material.MatDialog },
            { type: BillCloneBackfaceService },
            { type: material.MatSnackBar }
        ]; };
        BillComponent.propDecorators = {
            onBeforeSave: [{ type: core.Input }],
            init: [{ type: core.Output }]
        };
        return BillComponent;
    }());
    if (false) {
        /** @type {?} */
        BillComponent.prototype.onBeforeSave;
        /** @type {?} */
        BillComponent.prototype.init;
        /** @type {?} */
        BillComponent.prototype.element;
        /**
         * @type {?}
         * @private
         */
        BillComponent.prototype.oldData;
        /**
         * @type {?}
         * @private
         */
        BillComponent.prototype.operate;
        /** @type {?} */
        BillComponent.prototype.allowClone;
        /** @type {?} */
        BillComponent.prototype.checkResults;
        /** @type {?} */
        BillComponent.prototype.fieldMap;
        /** @type {?} */
        BillComponent.prototype.fields;
        /**
         * @type {?}
         * @private
         */
        BillComponent.prototype.useTypeRecord;
        /**
         * @type {?}
         * @private
         */
        BillComponent.prototype.signKeyValues;
        /** @type {?} */
        BillComponent.prototype.formGroup;
        /** @type {?} */
        BillComponent.prototype.typeRecord;
        /** @type {?} */
        BillComponent.prototype.record;
        /** @type {?} */
        BillComponent.prototype.error;
        /** @type {?} */
        BillComponent.prototype.rele;
        /**
         * @type {?}
         * @private
         */
        BillComponent.prototype.billBackface;
        /**
         * @type {?}
         * @private
         */
        BillComponent.prototype.tabs;
        /** @type {?} */
        BillComponent.prototype.dialog;
        /**
         * @type {?}
         * @private
         */
        BillComponent.prototype.billCloneService;
        /**
         * @type {?}
         * @private
         */
        BillComponent.prototype.snackBar;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /**
     * @record
     */
    function DialogData$1() { }
    if (false) {
        /** @type {?} */
        DialogData$1.prototype.icon;
        /** @type {?} */
        DialogData$1.prototype.color;
    }
    var IconSelectComponent = /** @class */ (function () {
        function IconSelectComponent(iconList, dialogRef, data) {
            this.iconList = iconList;
            this.dialogRef = dialogRef;
            this.data = data;
            this.hostClass = true;
            this.iconCategoryCN = '编辑类';
            this.icon(this.data.icon);
        }
        /**
         * @return {?}
         */
        IconSelectComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            this.图标选择.nativeElement.parentElement.parentElement.style = 'padding:0px;';
        };
        /**
         * @param {?} event
         * @return {?}
         */
        IconSelectComponent.prototype.check = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            if (event.checked) {
                this.nameSpace = 'outlined';
            }
            else {
                this.nameSpace = '';
            }
        };
        /**
         * @return {?}
         */
        IconSelectComponent.prototype.categories = /**
         * @return {?}
         */
        function () {
            return this.iconList.icons[this.nameSpace];
        };
        /**
         * @return {?}
         */
        IconSelectComponent.prototype.ok = /**
         * @return {?}
         */
        function () {
            return {
                icon: this.nameSpace ? this.nameSpace + ':' + this.iconName : this.iconName,
                color: this.data.color
            };
        };
        /**
         * @param {?} val
         * @return {?}
         */
        IconSelectComponent.prototype.icon = /**
         * @param {?} val
         * @return {?}
         */
        function (val) {
            console.log(val);
            if (val) {
                /** @type {?} */
                var ns = val.split(':');
                if (ns.length > 1) {
                    this.nameSpace = ns[0];
                    this.iconName = ns[1];
                }
                else {
                    this.nameSpace = '';
                    this.iconName = ns[0];
                }
            }
            else {
                this.nameSpace = '';
            }
        };
        IconSelectComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-icon-select',
                        template: "<div #\u56FE\u6807\u9009\u62E9 class=\"icon-dialog\">\r\n\t<div class=\"title \u5B57\u4F53\u989C\u8272\">\u56FE\u6807\u9009\u62E9</div>\r\n\t<div>\r\n\t\t<div class=\"color-select\">\r\n\t\t\t<div class=\"one-color\">\r\n\t\t\t\t<div class=\"color-div default\" (click)=\"data.color = 'default'\">\r\n\t\t\t\t\t<mat-icon svgIcon=\"done\" *ngIf=\"data.color == 'default'\"></mat-icon>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"color-name\">\u9ED8\u8BA4</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"one-color\">\r\n\t\t\t\t<div class=\"color-div primary\" (click)=\"data.color = 'primary'\">\r\n\t\t\t\t\t<mat-icon svgIcon=\"done\" *ngIf=\"data.color == 'primary'\"></mat-icon>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"color-name\">\u4E3B\u9898\u8272</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"one-color\">\r\n\t\t\t\t<div class=\"color-div warn\" (click)=\"data.color = 'warn'\">\r\n\t\t\t\t\t<mat-icon svgIcon=\"done\" *ngIf=\"data.color == 'warn'\"></mat-icon>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"color-name\">\u8B66\u544A</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"one-color\">\r\n\t\t\t\t<div class=\"color-div accent\" (click)=\"data.color = 'accent'\">\r\n\t\t\t\t\t<mat-icon svgIcon=\"done\" *ngIf=\"data.color == 'accent'\"></mat-icon>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"color-name\">\u63D0\u9192</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"one-color\">\r\n\t\t\t\t<div class=\"color-div safe\" (click)=\"data.color = 'safe'\">\r\n\t\t\t\t\t<mat-icon svgIcon=\"done\" *ngIf=\"data.color == 'safe'\"></mat-icon>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"color-name\">\u5B89\u5168</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div class=\"sample\">\r\n\t\t\t<span class=\"\u5B57\u4F53\u989C\u8272\">\u6548\u679C\u9884\u89C8</span>\r\n\t\t\t<div class=\"\u9884\u89C8\u6846 \">\r\n\t\t\t\t<mat-icon\r\n\t\t\t\t\t[svgIcon]=\"nameSpace ? nameSpace + ':' + iconName : iconName\"\r\n\t\t\t\t\t[ngClass]=\"this.data.color\"\r\n\t\t\t\t></mat-icon>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class=\"icon-select-area\">\r\n\t\t<div class=\"icon-select-title\">\r\n\t\t\t<mat-form-field class=\"\u9009\u62E9\u6846 \u5B57\u4F53\u989C\u8272\" appearance=\"outline\">\r\n\t\t\t\t<mat-select [(value)]=\"iconCategoryCN\">\r\n\t\t\t\t\t<mat-option *ngFor=\"let ele of categories()\" [value]=\"ele.categoryCN\">\r\n\t\t\t\t\t\t{{ ele.categoryCN }}</mat-option\r\n\t\t\t\t\t>\r\n\t\t\t\t</mat-select>\r\n\t\t\t</mat-form-field>\r\n\t\t\t<div>\r\n\t\t\t\t<mat-button-toggle-group\r\n\t\t\t\t\tclass=\"\u56FE\u6807\u7C7B\u578B\"\r\n\t\t\t\t\t#group=\"matButtonToggleGroup\"\r\n\t\t\t\t\t(change)=\"nameSpace = group.value\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<mat-button-toggle\r\n\t\t\t\t\t\t[ngClass]=\"{ '\u56FE\u6807\u7C7B\u578B-\u9009\u4E2D': nameSpace === '' }\"\r\n\t\t\t\t\t\tclass=\"\u56FE\u6807\u7C7B\u578B-\u6837\u5F0F \u7EBF\u6027\"\r\n\t\t\t\t\t\tvalue=\"\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t\u7EBF\u6027\r\n\t\t\t\t\t</mat-button-toggle>\r\n\t\t\t\t\t<mat-button-toggle\r\n\t\t\t\t\t\t[ngClass]=\"{ '\u56FE\u6807\u7C7B\u578B-\u9009\u4E2D': nameSpace === 'outlined' }\"\r\n\t\t\t\t\t\tclass=\"\u56FE\u6807\u7C7B\u578B-\u6837\u5F0F \u586B\u5145\"\r\n\t\t\t\t\t\tvalue=\"outlined\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t\u586B\u5145\r\n\t\t\t\t\t</mat-button-toggle>\r\n\t\t\t\t</mat-button-toggle-group>\r\n\t\t\t\t<!-- <mat-slide-toggle [checked]=\"nameSpace == 'outlined'\" (change)=\"check($event)\"\r\n\t\t\t\t>{{ nameSpace == 'outlined' ? '\u7EBF\u6027' : '\u586B\u5145' }}\r\n\t\t\t</mat-slide-toggle> -->\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div class=\"icon-select-content\">\r\n\t\t\t<div *ngFor=\"let icons of categories()\">\r\n\t\t\t\t<div class=\"\u56FE\u6807\u5E93\" *ngIf=\"icons.categoryCN == iconCategoryCN\">\r\n\t\t\t\t\t<div\r\n\t\t\t\t\t\tclass=\"\u56FE\u6807\u8FB9\u6846 \u5B57\u4F53\u989C\u8272\"\r\n\t\t\t\t\t\t*ngFor=\"let i of icons.icons\"\r\n\t\t\t\t\t\t(click)=\"iconName = i.name\"\r\n\t\t\t\t\t\t[ngClass]=\"{ 'icon-selected': i.name === iconName }\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<mat-icon [svgIcon]=\"nameSpace ? nameSpace + ':' + i.name : i.name\"> </mat-icon>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class=\"\u5E95\u90E8\u529F\u80FD\u6309\u94AE\">\r\n\t\t<button color=\"primary\" mat-button (click)=\"iconName = ''\">\u6E05\u7A7A</button>\r\n\t\t<span>\r\n\t\t\t<button mat-button (click)=\"dialogRef.close()\">\u53D6\u6D88</button>\r\n\t\t\t<button class=\"\u786E\u5B9A\" mat-button [mat-dialog-close]=\"ok()\">\u786E\u5B9A</button>\r\n\t\t</span>\r\n\t</div>\r\n</div>\r\n",
                        styles: ["@charset \"UTF-8\";.icon-dialog{width:100%;height:100%;display:flex;flex-direction:column;padding:16px 0 64px 20px;box-sizing:border-box;position:relative}.title{font-size:18px;font-weight:700;margin-bottom:24px}.color-div{width:24px;height:24px;cursor:pointer}.color-div .mat-icon{color:#fff}.color-select{display:flex}.color-select .one-color{margin-right:24px;display:flex;flex-direction:column;align-items:center}.color-select .one-color .color-name{margin-top:8px;font-size:14px}.sample{position:absolute;right:16px;top:16px}.sample span{font-size:14px}.sample .\u9884\u89C8\u6846{width:80px;height:80px;border-radius:4px;overflow:hidden;position:relative}.sample .\u9884\u89C8\u6846 .mat-icon{width:32px;height:32px;line-height:32px;position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.icon-select-area{height:50px;flex-grow:1;display:flex;flex-direction:column}.icon-select-area .icon-select-title{margin-top:24px;display:flex;justify-content:space-between}.icon-select-area .icon-select-title .\u9009\u62E9\u6846{width:160px;font-size:14px}.icon-select-area .icon-select-title .\u9009\u62E9\u6846 ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:10px}.icon-select-area .icon-select-title .\u9009\u62E9\u6846 ::ng-deep .mat-form-field-infix{border:0;padding:8px 0}.icon-select-area .icon-select-title .\u9009\u62E9\u6846 ::ng-deep .mat-select-arrow-wrapper{display:block}.icon-select-area .icon-select-title .\u56FE\u6807\u7C7B\u578B{width:90px;height:24px;margin-right:16px;border-radius:12px;display:flex;justify-content:space-between}.icon-select-area .icon-select-title .\u56FE\u6807\u7C7B\u578B .\u56FE\u6807\u7C7B\u578B-\u6837\u5F0F{width:48px;height:24px;border-radius:12px;font-size:12px;z-index:99;border:0}.icon-select-area .icon-select-title .\u56FE\u6807\u7C7B\u578B .\u56FE\u6807\u7C7B\u578B-\u6837\u5F0F ::ng-deep .mat-button-toggle-label-content{text-align:center;padding:0;line-height:24px!important}.icon-select-area .icon-select-title .\u56FE\u6807\u7C7B\u578B .\u586B\u5145{margin-right:-3px}.icon-select-area .icon-select-title .\u56FE\u6807\u7C7B\u578B .\u7EBF\u6027{margin-left:-3px}.icon-select-area .icon-select-title .\u56FE\u6807\u7C7B\u578B .\u56FE\u6807\u7C7B\u578B-\u9009\u4E2D{color:#fff}.icon-select-area .icon-select-content{flex-grow:1;overflow-y:auto}.icon-select-area .icon-select-content .\u56FE\u6807\u5E93{display:flex;flex-wrap:wrap}.icon-select-area .icon-select-content .\u56FE\u6807\u5E93 .\u56FE\u6807\u8FB9\u6846{width:40px;height:40px;margin:0 16px 24px 0;display:flex;justify-content:center;align-items:center;border-radius:2px;cursor:pointer;box-sizing:border-box}.\u5E95\u90E8\u529F\u80FD\u6309\u94AE{position:absolute;bottom:0;left:0;width:100%;height:64px;display:flex;justify-content:space-between;align-items:center}.\u5E95\u90E8\u529F\u80FD\u6309\u94AE .\u786E\u5B9A{margin:0 16px;color:#fff}"]
                    }] }
        ];
        /** @nocollapse */
        IconSelectComponent.ctorParameters = function () { return [
            { type: IconList },
            { type: material.MatDialogRef },
            { type: undefined, decorators: [{ type: core.Inject, args: [material.MAT_DIALOG_DATA,] }] }
        ]; };
        IconSelectComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.icon-select',] }],
            图标选择: [{ type: core.ViewChild, args: ['图标选择', { static: true },] }]
        };
        return IconSelectComponent;
    }());
    if (false) {
        /** @type {?} */
        IconSelectComponent.prototype.hostClass;
        /** @type {?} */
        IconSelectComponent.prototype.图标选择;
        /** @type {?} */
        IconSelectComponent.prototype.nameSpace;
        /** @type {?} */
        IconSelectComponent.prototype.iconName;
        /** @type {?} */
        IconSelectComponent.prototype.iconCategoryCN;
        /** @type {?} */
        IconSelectComponent.prototype.iconList;
        /** @type {?} */
        IconSelectComponent.prototype.dialogRef;
        /** @type {?} */
        IconSelectComponent.prototype.data;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /**
     * @record
     */
    function IColumnType() { }
    if (false) {
        /** @type {?} */
        IColumnType.prototype.Name;
        /** @type {?} */
        IColumnType.prototype.Type;
    }
    /**
     * @record
     */
    function ICategory() { }
    if (false) {
        /** @type {?} */
        ICategory.prototype.ID;
        /** @type {?} */
        ICategory.prototype.Name;
        /** @type {?} */
        ICategory.prototype.OwnerBy;
        /** @type {?} */
        ICategory.prototype.Owner;
        /** @type {?} */
        ICategory.prototype.Position;
        /** @type {?|undefined} */
        ICategory.prototype.Labels;
    }
    /**
     * @record
     */
    function ILabelKey() { }
    if (false) {
        /** @type {?} */
        ILabelKey.prototype.CategoryID;
        /** @type {?} */
        ILabelKey.prototype.ID;
    }
    /**
     * @record
     */
    function ILabel() { }
    if (false) {
        /** @type {?} */
        ILabel.prototype.Name;
    }
    // 当ownerby 为E时,owner字段固定的值
    /** @type {?} */
    var ownerElement = 'ele';
    /** @enum {string} */
    var OwnerByEnum = {
        unknow: '',
        // ownerByUser 属于用户的标签、列集,加数字是便于排序
        ownerByUser: '1U',
        // ownerByDept 属于部门的标签、列集
        ownerByDept: '2D',
        // ownerByEle 属于工作元素的标签、列集
        ownerByEle: '3E',
    };
    /** @enum {string} */
    var NodeTypeEnum = {
        unknow: '',
        NodeAnd: 'AND',
        NodeOr: 'OR',
        NodeCondition: 'CONDITION',
        NodePlain: 'PLAIN',
    };
    /**
     * @record
     */
    function INode() { }
    if (false) {
        /** @type {?} */
        INode.prototype.NodeType;
        /** @type {?|undefined} */
        INode.prototype.Field;
        /** @type {?|undefined} */
        INode.prototype.Operate;
        /** @type {?|undefined} */
        INode.prototype.Value;
        /** @type {?|undefined} */
        INode.prototype.PlainText;
        /** @type {?|undefined} */
        INode.prototype.Children;
    }
    /**
     * @record
     */
    function IElementHisLog() { }
    if (false) {
        /** @type {?} */
        IElementHisLog.prototype.Operate;
        /** @type {?} */
        IElementHisLog.prototype.CategoryName;
        /** @type {?} */
        IElementHisLog.prototype.LabelName;
        /** @type {?} */
        IElementHisLog.prototype.User;
    }
    /**
     * @record
     */
    function IElementHis() { }
    if (false) {
        /** @type {?} */
        IElementHis.prototype.Day;
        /** @type {?} */
        IElementHis.prototype.Logs;
    }
    /**
     * @record
     */
    function ILabelHisItem() { }
    if (false) {
        /** @type {?} */
        ILabelHisItem.prototype.Version;
        /** @type {?} */
        ILabelHisItem.prototype.WriteTime;
    }
    /**
     * @record
     */
    function ILabelHisKey() { }
    if (false) {
        /** @type {?} */
        ILabelHisKey.prototype.CategoryID;
        /** @type {?} */
        ILabelHisKey.prototype.ID;
        /** @type {?} */
        ILabelHisKey.prototype.Version;
    }
    /**
     * @record
     */
    function ColumnsWithLetter() { }
    if (false) {
        /** @type {?} */
        ColumnsWithLetter.prototype.Letter;
        /** @type {?} */
        ColumnsWithLetter.prototype.Columns;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /**
     * @record
     */
    function Controller() { }
    if (false) {
        /** @type {?} */
        Controller.prototype.Name;
        /** @type {?} */
        Controller.prototype.Bill;
    }
    /**
     * @record
     */
    function IFetchElementInitDataResult() { }
    if (false) {
        /** @type {?} */
        IFetchElementInitDataResult.prototype.Controllers;
        /** @type {?} */
        IFetchElementInitDataResult.prototype.Categories;
        /** @type {?} */
        IFetchElementInitDataResult.prototype.CategoriesEN;
        /** @type {?} */
        IFetchElementInitDataResult.prototype.Roles;
        /** @type {?} */
        IFetchElementInitDataResult.prototype.CanSelectRoles;
    }
    /**
     * @record
     */
    function MainColumn() { }
    if (false) {
        /** @type {?} */
        MainColumn.prototype.Name;
        /** @type {?} */
        MainColumn.prototype.Type;
        /** @type {?} */
        MainColumn.prototype.PrimaryKey;
        /** @type {?} */
        MainColumn.prototype.MaxLength;
        /** @type {?} */
        MainColumn.prototype.Null;
    }
    var ElementBackFace = /** @class */ (function () {
        function ElementBackFace(api, eles) {
            this.api = api;
            this.eles = eles;
        }
        /**
         * @private
         * @template T
         * @param {?} method
         * @param {?=} param
         * @return {?}
         */
        ElementBackFace.prototype.get = /**
         * @private
         * @template T
         * @param {?} method
         * @param {?=} param
         * @return {?}
         */
        function (method, param) {
            return this.api.get(this.element.apiURL(), method, this.eles.getURLSign(this.element.apiURL()), param);
        };
        /**
         * @private
         * @template T
         * @param {?} method
         * @param {?=} param
         * @return {?}
         */
        ElementBackFace.prototype.post = /**
         * @private
         * @template T
         * @param {?} method
         * @param {?=} param
         * @return {?}
         */
        function (method, param) {
            return this.api.post(this.element.apiURL(), method, this.eles.getURLSign(this.element.apiURL()), param);
        };
        /**
         * @param {?} name
         * @return {?}
         */
        ElementBackFace.prototype.fetchElementInitData = /**
         * @param {?} name
         * @return {?}
         */
        function (name) {
            return this.get('fetch-element-init-data', name);
        };
        /**
         * @return {?}
         */
        ElementBackFace.prototype.fetchElementNames = /**
         * @return {?}
         */
        function () {
            return this.get('fetch-element-names');
        };
        /**
         * @param {?} cname
         * @return {?}
         */
        ElementBackFace.prototype.fetchBillMainColumns = /**
         * @param {?} cname
         * @return {?}
         */
        function (cname) {
            return this.get('fetch-bill-main-columns', cname);
        };
        /**
         * @param {?} db
         * @return {?}
         */
        ElementBackFace.prototype.fetchTables = /**
         * @param {?} db
         * @return {?}
         */
        function (db) {
            return this.get('fetch-tables', db);
        };
        /**
         * @return {?}
         */
        ElementBackFace.prototype.fetchDB = /**
         * @return {?}
         */
        function () {
            return this.get('fetch-db');
        };
        /**
         * @param {?} param
         * @return {?}
         */
        ElementBackFace.prototype.checkSQL = /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            return this.post('check-sql', param);
        };
        /**
         * @param {?} table
         * @return {?}
         */
        ElementBackFace.prototype.fetchTableColumns = /**
         * @param {?} table
         * @return {?}
         */
        function (table) {
            return this.get('fetch-table-columns', table);
        };
        ElementBackFace.decorators = [
            { type: core.Injectable }
        ];
        /** @nocollapse */
        ElementBackFace.ctorParameters = function () { return [
            { type: dbwebCore.ApiService },
            { type: dbwebCore.ElementsService }
        ]; };
        return ElementBackFace;
    }());
    if (false) {
        /** @type {?} */
        ElementBackFace.prototype.element;
        /**
         * @type {?}
         * @private
         */
        ElementBackFace.prototype.api;
        /**
         * @type {?}
         * @private
         */
        ElementBackFace.prototype.eles;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /** @type {?} */
    var pinyin = pinyin_;
    /**
     * @param {?} v
     * @return {?}
     */
    function map2WithLetter(v) {
        /** @type {?} */
        var mapList = new Map();
        v.forEach((/**
         * @param {?} vv
         * @return {?}
         */
        function (vv) {
            /** @type {?} */
            var headerLetter;
            // 增加对英文字段的支持
            if (vv.match('^[a-zA-Z].*')) {
                headerLetter = vv[0].toUpperCase();
            }
            else {
                headerLetter = pinyin(vv, { style: pinyin.STYLE_FIRST_LETTER }).map((/**
                 * @param {?} s
                 * @return {?}
                 */
                function (s) { return s[0]; }))[0];
            }
            if (mapList.has(headerLetter)) {
                mapList.get(headerLetter).push(vv);
            }
            else {
                mapList.set(headerLetter, [vv]);
            }
        }));
        // 排序
        /** @type {?} */
        var rev = (/** @type {?} */ ([]));
        mapList.forEach((/**
         * @param {?} columns
         * @param {?} letter
         * @return {?}
         */
        function (columns, letter) {
            rev.push((/** @type {?} */ ({ Letter: letter, Columns: columns })));
        }));
        return rev.sort((/**
         * @param {?} a
         * @param {?} b
         * @return {?}
         */
        function (a, b) { return a.Letter.localeCompare(b.Letter); }));
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /** @enum {number} */
    var FillAt = {
        SkipFill: 0,
        FillAtOpen: 1,
        FillAtSave: 2,
    };
    FillAt[FillAt.SkipFill] = 'SkipFill';
    FillAt[FillAt.FillAtOpen] = 'FillAtOpen';
    FillAt[FillAt.FillAtSave] = 'FillAtSave';
    /**
     * @record
     */
    function BillParam() { }
    if (false) {
        /** @type {?} */
        BillParam.prototype.Operate;
        /** @type {?} */
        BillParam.prototype.AllowClone;
        /** @type {?} */
        BillParam.prototype.ClonePrimaryKeySettings;
        /** @type {?} */
        BillParam.prototype.FieldSettings;
        /** @type {?} */
        BillParam.prototype.Tag;
    }
    /**
     * @record
     */
    function FieldSetting() { }
    if (false) {
        /** @type {?} */
        FieldSetting.prototype.Name;
        /** @type {?} */
        FieldSetting.prototype.Fill;
        /** @type {?} */
        FieldSetting.prototype.FillAt;
        /** @type {?} */
        FieldSetting.prototype.Visibility;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /** @enum {string} */
    var ImportStyle = {
        Normal: 'NORMAL',
        Must: 'MUST',
        Fill: 'FILL',
        Skip: 'SKIP',
    };
    /**
     * @record
     */
    function ImportParam() { }
    if (false) {
        /** @type {?} */
        ImportParam.prototype.After;
        /** @type {?} */
        ImportParam.prototype.Before;
        /** @type {?} */
        ImportParam.prototype.DB;
        /** @type {?} */
        ImportParam.prototype.Fields;
        /** @type {?} */
        ImportParam.prototype.Table;
        /** @type {?} */
        ImportParam.prototype.Where;
        /** @type {?} */
        ImportParam.prototype.NullIden;
    }
    /**
     * @record
     */
    function ImportField() { }
    if (false) {
        /** @type {?} */
        ImportField.prototype.Name;
        /** @type {?} */
        ImportField.prototype.Alias;
        /** @type {?} */
        ImportField.prototype.Remark;
        /** @type {?} */
        ImportField.prototype.Style;
        /** @type {?} */
        ImportField.prototype.Value;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /**
     * @record
     */
    function IElementData() { }
    if (false) {
        /** @type {?} */
        IElementData.prototype.Tabs;
        /** @type {?} */
        IElementData.prototype.parent;
    }
    /**
     * @record
     */
    function IProcess() { }
    if (false) {
        /** @type {?} */
        IProcess.prototype.Name;
        /** @type {?|undefined} */
        IProcess.prototype.Icon;
        /** @type {?|undefined} */
        IProcess.prototype.Color;
        /** @type {?|undefined} */
        IProcess.prototype.ElementName;
        /** @type {?} */
        IProcess.prototype.BindRecord;
        /** @type {?|undefined} */
        IProcess.prototype.TransPath;
        /** @type {?|undefined} */
        IProcess.prototype.TransQuery;
        /** @type {?|undefined} */
        IProcess.prototype.WithSql;
        /** @type {?|undefined} */
        IProcess.prototype.Visable;
        /** @type {?|undefined} */
        IProcess.prototype.MoreStr;
    }
    var ElementDataRecordView = /** @class */ (function () {
        function ElementDataRecordView(parent) {
            this.parent = parent;
            this.Tabs = ['取数SQL', '默认显示列', '处理列表', '标签', '条件模板'];
            this.inited = new core.EventEmitter();
            this.currentProcess = new rxjs.BehaviorSubject(null);
        }
        Object.defineProperty(ElementDataRecordView.prototype, "Params", {
            get: /**
             * @return {?}
             */
            function () {
                return (/** @type {?} */ (this.parent.Params));
            },
            enumerable: true,
            configurable: true
        });
        /**
         * @return {?}
         */
        ElementDataRecordView.prototype.init = /**
         * @return {?}
         */
        function () {
            var _this = this;
            rxjs.forkJoin([
                this.parent.back.fetchDB(),
                this.parent.back.fetchElementNames(),
                this.parent.back.fetchTables(this.Params.DB)
            ]).subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.DBList = v[0];
                _this.allElementNames = v[1];
                _this.Tables = v[2];
                _this.refreshProcesses();
                if (_this.bindRecordProcesses && _this.bindRecordProcesses.length > 0) {
                    _this.currentProcess.next(_this.bindRecordProcesses[0]);
                }
                else if (_this.notBindRecordProcesses && _this.notBindRecordProcesses.length > 0) {
                    _this.currentProcess.next(_this.notBindRecordProcesses[0]);
                }
                if (_this.Params.ConditionalTemplates && _this.Params.ConditionalTemplates.length > 0) {
                    _this.currentConditionTemplate = _this.Params.ConditionalTemplates[0];
                }
                _this.checkSQL().subscribe();
                _this.inited.emit();
            }));
        };
        /**
         * @return {?}
         */
        ElementDataRecordView.prototype.refreshTables = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.parent.back.fetchTables(this.Params.DB).subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return (_this.Tables = v); }));
        };
        /**
         * @return {?}
         */
        ElementDataRecordView.prototype.refreshProcesses = /**
         * @return {?}
         */
        function () {
            this.bindRecordProcesses = (this.Params.Processes || []).filter((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.BindRecord; }));
            this.notBindRecordProcesses = (this.Params.Processes || []).filter((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return !v.BindRecord; }));
        };
        // 将分开的处理列表合并成一个
        // 将分开的处理列表合并成一个
        /**
         * @return {?}
         */
        ElementDataRecordView.prototype.collectionProcesses = 
        // 将分开的处理列表合并成一个
        /**
         * @return {?}
         */
        function () {
            this.Params.Processes = __spread(this.bindRecordProcesses, this.notBindRecordProcesses);
        };
        /**
         * @return {?}
         */
        ElementDataRecordView.prototype.checkSQL = /**
         * @return {?}
         */
        function () {
            var _this = this;
            return this.parent.back
                .checkSQL({
                DB: this.Params.DB,
                Table: this.Params.TableName,
                ManualPage: this.Params.ManualPage,
                SQL: this.Params.Sql
            })
                .pipe(operators.tap((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.SQLCheckError = v.Error;
                if (!_this.SQLCheckError) {
                    // 要把旧的类型复制过来
                    _this.Params.AllColumns = v.Columns.map((/**
                     * @param {?} col
                     * @return {?}
                     */
                    function (col) {
                        /** @type {?} */
                        var t = col.Type;
                        if (_this.Params.AllColumns) {
                            /** @type {?} */
                            var oldCol = _this.Params.AllColumns.find((/**
                             * @param {?} fv
                             * @return {?}
                             */
                            function (fv) { return fv.Name === col.Name; }));
                            if (oldCol) {
                                t = oldCol.Type;
                            }
                        }
                        return {
                            Name: col.Name,
                            Type: t
                        };
                    }));
                    _this.allColumnNames = _this.Params.AllColumns.map((/**
                     * @param {?} vv
                     * @return {?}
                     */
                    function (vv) { return vv.Name; }));
                    _this.allColumnWithLetter = map2WithLetter(_this.allColumnNames);
                    // 删除不存在的列
                    if (_this.Params.Columns) {
                        _this.Params.Columns = _this.Params.Columns.filter((/**
                         * @param {?} col
                         * @return {?}
                         */
                        function (col) {
                            return _this.allColumnNames.includes(col.Name);
                        }));
                    }
                }
            })));
        };
        return ElementDataRecordView;
    }());
    if (false) {
        /** @type {?} */
        ElementDataRecordView.prototype.labelCategories;
        /** @type {?} */
        ElementDataRecordView.prototype.Tabs;
        /** @type {?} */
        ElementDataRecordView.prototype.DBList;
        /** @type {?} */
        ElementDataRecordView.prototype.Tables;
        /** @type {?} */
        ElementDataRecordView.prototype.allElementNames;
        /** @type {?} */
        ElementDataRecordView.prototype.SQLCheckError;
        /** @type {?} */
        ElementDataRecordView.prototype.allColumnNames;
        /** @type {?} */
        ElementDataRecordView.prototype.allColumnWithLetter;
        /** @type {?} */
        ElementDataRecordView.prototype.bindRecordProcesses;
        /** @type {?} */
        ElementDataRecordView.prototype.notBindRecordProcesses;
        /** @type {?} */
        ElementDataRecordView.prototype.inited;
        /** @type {?} */
        ElementDataRecordView.prototype.currentProcess;
        /** @type {?} */
        ElementDataRecordView.prototype.currentConditionTemplate;
        /** @type {?} */
        ElementDataRecordView.prototype.parent;
    }
    var ElementDataImport = /** @class */ (function () {
        function ElementDataImport(parent) {
            this.parent = parent;
            this.Tabs = ['字段设置', '属性'];
        }
        Object.defineProperty(ElementDataImport.prototype, "Params", {
            get: /**
             * @return {?}
             */
            function () {
                return (/** @type {?} */ (this.parent.Params));
            },
            enumerable: true,
            configurable: true
        });
        /**
         * @return {?}
         */
        ElementDataImport.prototype.init = /**
         * @return {?}
         */
        function () {
            var _this = this;
            return rxjs.forkJoin([this.parent.back.fetchDB(), this.parent.back.fetchTables(this.Params.DB)]).pipe(operators.tap((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.DBList = v[0];
                _this.Tables = v[1];
                _this.syncTableColumn();
            })));
        };
        // 根据表名,同步最新的字段清单
        // 根据表名,同步最新的字段清单
        /**
         * @return {?}
         */
        ElementDataImport.prototype.syncTableColumn = 
        // 根据表名,同步最新的字段清单
        /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.parent.back.fetchTableColumns(this.Params.Table).subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.Params.Fields = v.map((/**
                 * @param {?} one
                 * @return {?}
                 */
                function (one) {
                    /** @type {?} */
                    var found = _this.Params.Fields.find((/**
                     * @param {?} sv
                     * @return {?}
                     */
                    function (sv) { return sv.Name === one; }));
                    if (found) {
                        return found;
                    }
                    return (/** @type {?} */ ({
                        Name: one,
                        Style: ImportStyle.Normal
                    }));
                }));
            }));
        };
        /**
         * @return {?}
         */
        ElementDataImport.prototype.refreshTables = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.parent.back.fetchTables(this.Params.DB).subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.Tables = v;
            }));
        };
        return ElementDataImport;
    }());
    if (false) {
        /** @type {?} */
        ElementDataImport.prototype.Tabs;
        /** @type {?} */
        ElementDataImport.prototype.DBList;
        /** @type {?} */
        ElementDataImport.prototype.Tables;
        /** @type {?} */
        ElementDataImport.prototype.parent;
    }
    var ElementDataUpdate = /** @class */ (function () {
        function ElementDataUpdate(parent) {
            this.parent = parent;
            this.Tabs = ['设置'];
        }
        Object.defineProperty(ElementDataUpdate.prototype, "Params", {
            get: /**
             * @return {?}
             */
            function () {
                return (/** @type {?} */ (this.parent.Params));
            },
            enumerable: true,
            configurable: true
        });
        /**
         * @return {?}
         */
        ElementDataUpdate.prototype.isAllSelected = /**
         * @return {?}
         */
        function () {
            return this.Params.Fields && this.Params.Fields.find((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return !v.selected; })) === undefined;
        };
        /**
         * @return {?}
         */
        ElementDataUpdate.prototype.hasSelected = /**
         * @return {?}
         */
        function () {
            return this.Params.Fields && this.Params.Fields.find((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.selected; })) !== undefined;
        };
        /**
         * @return {?}
         */
        ElementDataUpdate.prototype.init = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.parent.back.fetchDB().subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return (_this.DBList = v); }));
            this.refreshTables();
        };
        /**
         * @return {?}
         */
        ElementDataUpdate.prototype.refreshTables = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.parent.back.fetchTables(this.Params.DB).subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return (_this.Tables = v); }));
        };
        return ElementDataUpdate;
    }());
    if (false) {
        /** @type {?} */
        ElementDataUpdate.prototype.Tabs;
        /** @type {?} */
        ElementDataUpdate.prototype.DBList;
        /** @type {?} */
        ElementDataUpdate.prototype.Tables;
        /** @type {?} */
        ElementDataUpdate.prototype.parent;
    }
    var ElementDataBill = /** @class */ (function () {
        function ElementDataBill(parent) {
            var _this = this;
            this.parent = parent;
            this.Tabs = ['设置'];
            this.parent.init.subscribe((/**
             * @return {?}
             */
            function () {
                _this.parent.bill.formGroup
                    .get('Controller')
                    .valueChanges.pipe(operators.startWith(_this.parent.bill.formGroup.get('Controller').value))
                    .subscribe((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) {
                    // 如果是单据,则需要修复填充列的设置
                    /** @type {?} */
                    var ctrl = _this.parent.Controllers.find((/**
                     * @param {?} c
                     * @return {?}
                     */
                    function (c) { return c.Name === v; }));
                    if (ctrl && ctrl.Bill) {
                        _this.parent.back.fetchBillMainColumns(v).subscribe((/**
                         * @param {?} cols
                         * @return {?}
                         */
                        function (cols) {
                            _this.MainColumns = cols;
                            _this.fixFieldSettings(cols.map((/**
                             * @param {?} c
                             * @return {?}
                             */
                            function (c) { return c.Name; })));
                            _this.fixCloneSettings();
                        }));
                    }
                }));
            }));
        }
        Object.defineProperty(ElementDataBill.prototype, "Param", {
            get: /**
             * @return {?}
             */
            function () {
                return (/** @type {?} */ (this.parent.Params));
            },
            enumerable: true,
            configurable: true
        });
        /**
         * @param {?} cols
         * @return {?}
         */
        ElementDataBill.prototype.fixFieldSettings = /**
         * @param {?} cols
         * @return {?}
         */
        function (cols) {
            var _this = this;
            this.Param.FieldSettings = cols.map((/**
             * @param {?} col
             * @return {?}
             */
            function (col) {
                /** @type {?} */
                var foundField;
                if (_this.Param && _this.Param.FieldSettings) {
                    foundField = _this.Param.FieldSettings.find((/**
                     * @param {?} fld
                     * @return {?}
                     */
                    function (fld) { return fld.Name === col; }));
                }
                if (foundField) {
                    return foundField;
                }
                return (/** @type {?} */ ({
                    Name: col,
                    Fill: '',
                    FillAt: FillAt.SkipFill,
                    Visibility: ''
                }));
            }));
        };
        /**
         * @return {?}
         */
        ElementDataBill.prototype.fixCloneSettings = /**
         * @return {?}
         */
        function () {
            /** @type {?} */
            var old = __spread((this.Param.ClonePrimaryKeySettings || []));
            if (this.Param.AllowClone) {
                this.Param.ClonePrimaryKeySettings = this.MainColumns.filter((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) { return v.PrimaryKey; })).map((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) {
                    /** @type {?} */
                    var oldField = old.find((/**
                     * @param {?} o
                     * @return {?}
                     */
                    function (o) { return o.Name === v.Name; }));
                    return (/** @type {?} */ ({
                        Name: v.Name,
                        Fill: oldField ? oldField.Fill : '{{.SRC}}',
                        Visibility: oldField ? oldField.Visibility : ''
                    }));
                }));
                console.log(this.Param.ClonePrimaryKeySettings);
            }
            else {
                this.Param.ClonePrimaryKeySettings = null;
            }
        };
        return ElementDataBill;
    }());
    if (false) {
        /** @type {?} */
        ElementDataBill.prototype.Tabs;
        /** @type {?} */
        ElementDataBill.prototype.MainColumns;
        /** @type {?} */
        ElementDataBill.prototype.parent;
    }
    var ElementService = /** @class */ (function () {
        function ElementService(back) {
            this.back = back;
            this.init = new core.EventEmitter();
            this.BaseActive = true;
            this.data = {
                recordview: new ElementDataRecordView(this),
                import: new ElementDataImport(this),
                update: new ElementDataUpdate(this),
                bill: new ElementDataBill(this)
            };
        }
        /**
         * @param {?} ele
         * @return {?}
         */
        ElementService.prototype.onInit = /**
         * @param {?} ele
         * @return {?}
         */
        function (ele) {
            var _this = this;
            this.back.element = ele;
            this.back.fetchElementInitData(this.bill.typeRecord.Name).subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.Controllers = v.Controllers;
                _this.Categories = v.Categories;
                _this.CategoriesEN = v.CategoriesEN;
                if (v.CanSelectRoles) {
                    _this.Roles = v.CanSelectRoles.map((/**
                     * @param {?} sv
                     * @return {?}
                     */
                    function (sv) { return ({
                        Name: sv,
                        OldChecked: v.Roles && v.Roles.find((/**
                         * @param {?} vv
                         * @return {?}
                         */
                        function (vv) { return vv === sv; })) !== undefined,
                        Checked: false,
                        Modify: false
                    }); }));
                    _this.Roles.forEach((/**
                     * @param {?} role
                     * @return {?}
                     */
                    function (role) { return (role.Checked = role.OldChecked); }));
                }
                _this.init.emit();
            }));
        };
        ElementService.decorators = [
            { type: core.Injectable }
        ];
        /** @nocollapse */
        ElementService.ctorParameters = function () { return [
            { type: ElementBackFace }
        ]; };
        return ElementService;
    }());
    if (false) {
        /** @type {?} */
        ElementService.prototype.bill;
        /** @type {?} */
        ElementService.prototype.init;
        /** @type {?} */
        ElementService.prototype.Controllers;
        /** @type {?} */
        ElementService.prototype.Categories;
        /** @type {?} */
        ElementService.prototype.CategoriesEN;
        /** @type {?} */
        ElementService.prototype.BaseActive;
        /** @type {?} */
        ElementService.prototype.ActiveTab;
        /** @type {?} */
        ElementService.prototype.Roles;
        /** @type {?} */
        ElementService.prototype.Params;
        /** @type {?} */
        ElementService.prototype.data;
        /** @type {?} */
        ElementService.prototype.back;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /** @type {?} */
    var RecordViewControllerName = 'recordview';
    /**
     * @record
     */
    function ElementPostTag() { }
    if (false) {
        /** @type {?} */
        ElementPostTag.prototype.Roles;
        /** @type {?} */
        ElementPostTag.prototype.Other;
    }
    /**
     * @record
     */
    function ElementRecordViewPostTagOther() { }
    if (false) {
        /** @type {?} */
        ElementRecordViewPostTagOther.prototype.EleName;
        /** @type {?} */
        ElementRecordViewPostTagOther.prototype.OwnerBy;
        /** @type {?} */
        ElementRecordViewPostTagOther.prototype.Owner;
        /** @type {?} */
        ElementRecordViewPostTagOther.prototype.Data;
    }
    var ElementComponent = /** @class */ (function () {
        function ElementComponent(iconRegistry, sanitizer, svr, dialog) {
            this.svr = svr;
            this.dialog = dialog;
            // ElementOwnerNormal 正常的工作元素
            this.ElementOwnerNormal = 0;
            // ElementOwnerAutoCreate 自动创建的工作元素
            this.ElementOwnerAutoCreate = 1;
            this.hostClass = true;
            this.onBeforeSave = this.onBeforeSave.bind(this);
            /** @type {?} */
            var icons = [
                'all_chosen',
                'cancel_chosen',
                'return_chosen',
                'single_chosen',
                'double_down',
                'drag_indicator',
                'arrow_collapse',
                'arrow_expand',
                'sorting_arrows',
                'color_add',
                'file_copy'
            ];
            icons.forEach((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                iconRegistry.addSvgIcon(v, sanitizer.bypassSecurityTrustResourceUrl('assets/record-view/icon/' + v + '.svg'));
            }));
        }
        /**
         * @return {?}
         */
        ElementComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.bill.init.subscribe((/**
             * @return {?}
             */
            function () {
                _this.svr.bill = _this.bill;
                /** @type {?} */
                var val = _this.bill.formGroup.get('Params').value;
                if (val) {
                    _this.svr.Params = JSON.parse(val);
                }
                else {
                    _this.svr.Params = {};
                }
                _this.svr.onInit(_this.bill.element);
                _this.svr.init.subscribe((/**
                 * @return {?}
                 */
                function () {
                    _this.filteredCategories = _this.bill.formGroup.get('Category').valueChanges.pipe(operators.startWith(''), operators.map((/**
                     * @param {?} cate
                     * @return {?}
                     */
                    function (cate) {
                        return _this.svr.Categories.filter((/**
                         * @param {?} str
                         * @return {?}
                         */
                        function (str) { return str.includes(cate); }));
                    })));
                    _this.filteredCategoriesEN = _this.bill.formGroup.get('CategoryEN').valueChanges.pipe(operators.startWith(''), operators.map((/**
                     * @param {?} cate
                     * @return {?}
                     */
                    function (cate) {
                        return _this.svr.CategoriesEN.filter((/**
                         * @param {?} str
                         * @return {?}
                         */
                        function (str) { return str.includes(cate); }));
                    })));
                    _this.filteredControllers = _this.bill.formGroup.get('Controller').valueChanges.pipe(operators.startWith(''), operators.map((/**
                     * @param {?} ctr
                     * @return {?}
                     */
                    function (ctr) {
                        return _this.svr.Controllers.filter((/**
                         * @param {?} c
                         * @return {?}
                         */
                        function (c) { return c.Name.toLowerCase().includes(ctr.toLowerCase()); }));
                    })));
                }));
            }));
        };
        /**
         * @return {?}
         */
        ElementComponent.prototype.baseActive = /**
         * @return {?}
         */
        function () {
            this.svr.BaseActive = true;
            this.slider.nativeElement.style.top = '16px';
            this.slider.nativeElement.style.transition = 'all 0.5s';
        };
        /**
         * @param {?} tab
         * @param {?} event
         * @return {?}
         */
        ElementComponent.prototype.tabActive = /**
         * @param {?} tab
         * @param {?} event
         * @return {?}
         */
        function (tab, event) {
            this.svr.ActiveTab = tab;
            this.svr.BaseActive = false;
            this.slider.nativeElement.style.top = ((/** @type {?} */ (event.target))).offsetTop + 'px';
            this.slider.nativeElement.style.transition = 'all 0.5s';
        };
        /**
         * @param {?} self
         * @return {?}
         */
        ElementComponent.prototype.onBeforeSave = /**
         * @param {?} self
         * @return {?}
         */
        function (self) {
            // 需要把最新修改的角色传递到后端
            /** @type {?} */
            var tag = (/** @type {?} */ ({
                Roles: this.svr.Roles.filter((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) { return v.Checked !== v.OldChecked; })) // 只需要传递变动的角色
            }));
            // 只需要考虑最新的模块是recordview的情况,不需要考虑之前是recordview,现在不是的情况,这些情况
            // 已经在后端进行了处理
            if (this.bill.formGroup.get('Controller').value === RecordViewControllerName) {
                /** @type {?} */
                var recviewSvr = (/** @type {?} */ (this.svr.data.recordview));
                /** @type {?} */
                var eleName_1 = this.bill.typeRecord.Name;
                // 新增recordview的菜单项的话,需要把elename设置成最新的
                if (this.bill.isAdd()) {
                    eleName_1 = this.bill.formGroup.get('Name').value;
                    /** @type {?} */
                    var rec = recviewSvr.labelCategories || [];
                    rec.forEach((/**
                     * @param {?} v
                     * @return {?}
                     */
                    function (v) { return (v.EleName = eleName_1); }));
                }
                if (this.bill.isAdd() || this.bill.isEdit()) {
                    tag.Other = (/** @type {?} */ ({
                        EleName: eleName_1,
                        OwnerBy: OwnerByEnum.ownerByEle,
                        Owner: ownerElement,
                        Data: recviewSvr.labelCategories
                    }));
                }
            }
            return rxjs.of((/** @type {?} */ ({ record: { Params: JSON.stringify(this.svr.Params) }, tag: tag })));
        };
        /**
         * @return {?}
         */
        ElementComponent.prototype.isBillController = /**
         * @return {?}
         */
        function () {
            var _this = this;
            if (this.svr.Controllers && this.bill && this.bill.formGroup && this.bill.formGroup.get('Controller').value) {
                /** @type {?} */
                var found = this.svr.Controllers.find((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) { return v.Name === _this.bill.formGroup.get('Controller').value; }));
                return found && found.Bill;
            }
            return false;
        };
        /**
         * @return {?}
         */
        ElementComponent.prototype.tabs = /**
         * @return {?}
         */
        function () {
            if (this.bill && this.bill.formGroup && this.bill.formGroup.get('Controller').value) {
                if (this.isBillController()) {
                    return this.svr.data.bill.Tabs;
                }
                if (this.svr.data[this.bill.formGroup.get('Controller').value]) {
                    return this.svr.data[this.bill.formGroup.get('Controller').value].Tabs || [];
                }
            }
            return [];
        };
        /**
         * @return {?}
         */
        ElementComponent.prototype.selectIcon = /**
         * @return {?}
         */
        function () {
            var _this = this;
            // 查看或者删除状态下,不能修改图标
            if (this.bill.isBrowse() || this.bill.isDelete()) {
                return;
            }
            /** @type {?} */
            var v = {
                icon: this.bill.formGroup.get('Icon').value,
                color: this.bill.formGroup.get('Color').value
            };
            /** @type {?} */
            var dialogRef = this.dialog.open(IconSelectComponent, {
                width: '384px',
                height: '100%',
                data: v,
                position: {
                    top: '0px',
                    right: '0px'
                }
            });
            dialogRef.afterClosed().subscribe((/**
             * @param {?} result
             * @return {?}
             */
            function (result) {
                if (result) {
                    _this.bill.formGroup.get('Icon').setValue(result.icon);
                    _this.bill.formGroup.get('Color').setValue(result.color);
                }
            }));
        };
        ElementComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-element',
                        template: "<common-bill #bill [onBeforeSave]=\"onBeforeSave\">\r\n\t<div class=\"\u83DC\u5355\u9879\u5B9A\u4E49\u680F mat-elevation-z2\">\r\n\t\t<div class=\"\u83DC\u5355\u9879\u5B9A\u4E49\u5BFC\u822A\u680F\">\r\n\t\t\t<div class=\"\u5BFC\u822A\u6ED1\u5757\" #slider></div>\r\n\t\t\t<div class=\"\u5BFC\u822A\u6837\u5F0F \u5B57\u4F53\u989C\u8272\" [class.\u5F53\u524D\u5BFC\u822A\u6837\u5F0F]=\"svr.BaseActive\" (click)=\"baseActive()\">\r\n\t\t\t\t\u57FA\u7840\u8BBE\u7F6E\r\n\t\t\t</div>\r\n\t\t\t<div *ngFor=\"let tab of tabs(); let index = index\" class=\"\u5BFC\u822A\u6837\u5F0F \u5B57\u4F53\u989C\u8272\"\r\n\t\t\t\t[class.\u5F53\u524D\u5BFC\u822A\u6837\u5F0F]=\"tab === svr.ActiveTab && !svr.BaseActive\" (click)=\"tabActive(tab, $event)\">\r\n\t\t\t\t{{ tab }}\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div *ngIf=\"svr.BaseActive; else propertySetting\" class=\"\u57FA\u7840\u5C5E\u6027\u680F \u6A21\u5757\">\r\n\t\t\t<div [formGroup]=\"bill.formGroup\" class=\"main \u5B57\u4F53\u989C\u8272\" *ngIf=\"bill.formGroup\">\r\n\t\t\t\t<div class=\"\u4E00\u7EA7\u6807\u9898\">\u57FA\u672C\u4FE1\u606F</div>\r\n\t\t\t\t<div class=\"\u540D\u79F0\">\r\n\t\t\t\t\t<div class=\"\u4E8C\u7EA7\u6807\u9898\">\u540D\u79F0</div>\r\n\t\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t\t<input matInput formControlName=\"Name\" commonBillField />\r\n\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t<div class=\"\u56FE\u6807 mat-elevation-z4\" (click)=\"selectIcon()\">\r\n\t\t\t\t\t\t<mat-icon [svgIcon]=\"bill.formGroup.get('Icon').value\"\r\n\t\t\t\t\t\t\t[ngClass]=\"bill.formGroup.get('Color').value\">\r\n\t\t\t\t\t\t</mat-icon>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"\u4E2D\u82F1\u6587\u663E\u793A\">\r\n\t\t\t\t\t<div class=\"\u4E2D\u6587\">\r\n\t\t\t\t\t\t<span class=\"\u4E8C\u7EA7\u6807\u9898\">\u663E\u793A\u540D\u79F0</span>\r\n\t\t\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t\t\t<input matInput formControlName=\"Label\" commonBillField />\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"\u82F1\u6587\">\r\n\t\t\t\t\t\t<span class=\"\u4E8C\u7EA7\u6807\u9898\">\u663E\u793A\u540D\u79F0(\u82F1\u6587)</span>\r\n\t\t\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t\t\t<input matInput formControlName=\"LabelEN\" commonBillField />\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<span class=\"\u4E8C\u7EA7\u6807\u9898\">\u7C7B\u522B</span>\r\n\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t<input matInput [matAutocomplete]=\"auto\" formControlName=\"Category\" commonBillField />\r\n\t\t\t\t\t<mat-autocomplete #auto=\"matAutocomplete\">\r\n\t\t\t\t\t\t<mat-option *ngFor=\"let item of filteredCategories|async\" [value]=\"item\">{{item}}</mat-option>\r\n\t\t\t\t\t</mat-autocomplete>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t\t<span class=\"\u4E8C\u7EA7\u6807\u9898\">\u7C7B\u522B(\u82F1\u6587)</span>\r\n\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t<input matInput formControlName=\"CategoryEN\" [matAutocomplete]=\"auto_en\" commonBillField />\r\n\t\t\t\t\t<mat-autocomplete #auto_en=\"matAutocomplete\">\r\n\t\t\t\t\t\t<mat-option *ngFor=\"let item of filteredCategoriesEN|async\" [value]=\"item\">{{item}}</mat-option>\r\n\t\t\t\t\t</mat-autocomplete>\r\n\t\t\t\t</mat-form-field>\r\n\r\n\t\t\t\t<span class=\"\u4E8C\u7EA7\u6807\u9898\">\u6A21\u5757</span>\r\n\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t<input type=\"text\" matInput formControlName=\"Controller\" commonBillField\r\n\t\t\t\t\t\t[matAutocomplete]=\"auto_ctrl\">\r\n\t\t\t\t</mat-form-field>\r\n\r\n\t\t\t\t<mat-autocomplete #auto_ctrl=\"matAutocomplete\">\r\n\t\t\t\t\t<mat-option *ngFor=\"let module of filteredControllers|async\" [value]=\"module.Name\">{{module.Name}}\r\n\t\t\t\t\t</mat-option>\r\n\t\t\t\t</mat-autocomplete>\r\n\r\n\t\t\t\t<span class=\"\u4E8C\u7EA7\u6807\u9898\">\u521B\u5EFA\u7528\u6237</span>\r\n\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t<input matInput formControlName=\"UserName\" commonBillField />\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t\t<span class=\"\u4E8C\u7EA7\u6807\u9898\">\u90E8\u95E8</span>\r\n\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t<input matInput formControlName=\"Dept\" commonBillField />\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t\t<span class=\"\u4E8C\u7EA7\u6807\u9898\">\u5F52\u5C5E\u65B9\u5F0F</span>\r\n\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t<mat-select formControlName=\"Owner\" commonBillField>\r\n\t\t\t\t\t\t<mat-option [value]=\"ElementOwnerNormal\">\r\n\t\t\t\t\t\t\t\u6B63\u5E38\r\n\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t<mat-option [value]=\"ElementOwnerAutoCreate\">\r\n\t\t\t\t\t\t\t\u81EA\u52A8\u521B\u5EFA\r\n\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t</mat-select>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t\t<div class=\"checkbox\">\r\n\t\t\t\t\t<mat-checkbox [checked]=\"bill.formGroup.get('Pub').value===1\"\r\n\t\t\t\t\t\t(change)=\"bill.formGroup.get('Pub').patchValue($event.checked?1:0)\" commonBillField>\u516C\u5171\r\n\t\t\t\t\t</mat-checkbox>\r\n\t\t\t\t\t<mat-checkbox [checked]=\"bill.formGroup.get('NewWindow').value===1\"\r\n\t\t\t\t\t\t(change)=\"bill.formGroup.get('NewWindow').patchValue($event.checked?1:0)\" commonBillField>\r\n\t\t\t\t\t\t\u65B0\u7A97\u53E3\r\n\t\t\t\t\t</mat-checkbox>\r\n\t\t\t\t\t<mat-checkbox [checked]=\"bill.formGroup.get('IsAPI').value===1\"\r\n\t\t\t\t\t\t(change)=\"bill.formGroup.get('IsAPI').patchValue($event.checked?1:0)\" commonBillField>\u63A5\u53E3\r\n\t\t\t\t\t</mat-checkbox>\r\n\t\t\t\t</div>\r\n\t\t\t\t<span class=\"\u4E8C\u7EA7\u6807\u9898\">\u5E2E\u52A9\u6587\u6848</span>\r\n\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t<textarea matInput formControlName=\"HelpText\" commonBillField></textarea>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t\t<span class=\"\u4E8C\u7EA7\u6807\u9898\">\u5E2E\u52A9\u6587\u6848(\u82F1\u6587)</span>\r\n\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t<textarea matInput formControlName=\"HelpTextEN\" commonBillField></textarea>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t\t<div class=\"checkbox\">\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"\u5206\u5272\u7EBF\"></div>\r\n\t\t\t<div class=\"\u57FA\u7840\u5C5E\u6027-\u96B6\u5C5E\u89D2\u8272\u680F\">\r\n\t\t\t\t<div class=\"\u4E00\u7EA7\u6807\u9898 \u5B57\u4F53\u989C\u8272\">\u96B6\u5C5E\u89D2\u8272</div>\r\n\t\t\t\t<div class=\"\u57FA\u7840\u5C5E\u6027-\u96B6\u5C5E\u89D2\u8272-\u590D\u9009\u6846\" *ngFor=\"let role of svr.Roles\">\r\n\t\t\t\t\t<mat-checkbox [(ngModel)]=\"role.Checked\" (change)=\"role.Modify = true\">\r\n\t\t\t\t\t\t<span class=\"\u590D\u9009\u6846\u5185\u5BB9 \u4E8C\u7EA7\u6807\u9898\">{{ role.Name }}</span>\r\n\t\t\t\t\t</mat-checkbox>\r\n\t\t\t\t\t<ng-container *ngIf=\"role.Checked !== role.OldChecked\">*\r\n\t\t\t\t\t</ng-container>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<ng-template #propertySetting>\r\n\t\t\t<common-set-property-bill *ngIf=\"isBillController();else controllerPropertySetting\">\r\n\t\t\t</common-set-property-bill>\r\n\t\t\t<ng-template #controllerPropertySetting>\r\n\t\t\t\t<ng-container [ngSwitch]=\"bill.formGroup?.get('Controller').value\">\r\n\t\t\t\t\t<common-set-property-recordview *ngSwitchCase=\"'recordview'\">\r\n\t\t\t\t\t</common-set-property-recordview>\r\n\t\t\t\t\t<common-set-property-import *ngSwitchCase=\"'import'\">\r\n\t\t\t\t\t</common-set-property-import>\r\n\t\t\t\t\t<common-set-property-update *ngSwitchCase=\"'update'\">\r\n\t\t\t\t\t</common-set-property-update>\r\n\t\t\t\t</ng-container>\r\n\t\t\t</ng-template>\r\n\t\t</ng-template>\r\n\t</div>\r\n</common-bill>",
                        providers: [ElementService, ElementBackFace],
                        styles: ["@charset \"UTF-8\";.\u83DC\u5355\u9879\u5B9A\u4E49\u680F{display:flex;justify-content:space-between;width:100%;max-width:960px;height:100%;box-sizing:border-box;margin:0 auto;border-radius:4px}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u83DC\u5355\u9879\u5B9A\u4E49\u5BFC\u822A\u680F{width:152px;height:100%;flex-shrink:0;position:relative}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u83DC\u5355\u9879\u5B9A\u4E49\u5BFC\u822A\u680F .\u5BFC\u822A\u6837\u5F0F{width:100%;height:32px;line-height:32px;padding-left:24px;box-sizing:border-box;margin:16px 0;font-size:16px;font-weight:700;cursor:pointer}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u83DC\u5355\u9879\u5B9A\u4E49\u5BFC\u822A\u680F .\u5F53\u524D\u5BFC\u822A\u6837\u5F0F{font-size:20px}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u83DC\u5355\u9879\u5B9A\u4E49\u5BFC\u822A\u680F .\u5BFC\u822A\u6ED1\u5757{width:8px;height:32px;position:absolute;left:0;top:16px}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u83DC\u5355\u9879\u5B9A\u4E49\u5BFC\u822A\u680F .\u4E8C\u7EA7\u83DC\u5355{width:100%;position:absolute;top:118px;left:0}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u83DC\u5355\u9879\u5B9A\u4E49\u5BFC\u822A\u680F .\u4E8C\u7EA7\u83DC\u5355 button{width:100%;font-size:16px;padding-left:32px;text-align:left}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F{padding:16px 0;box-sizing:border-box;display:flex;overflow-y:auto}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .main{width:471px;height:100%;padding:8px 48px;box-sizing:border-box;display:flex;flex-direction:column;font-size:14px}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .main ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:10px}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .main ::ng-deep .mat-form-field-infix{border:0;padding:8px 0}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .main ::ng-deep .mat-select-arrow-wrapper{display:block}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .main .\u540D\u79F0{width:100%;position:relative}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .main .\u540D\u79F0 .mat-form-field{width:300px}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .main .\u540D\u79F0 .\u56FE\u6807{position:absolute;right:0;bottom:10px;width:56px;height:56px;border-radius:2px;display:flex;justify-content:center;align-items:center}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .main .\u4E2D\u82F1\u6587\u663E\u793A{display:flex}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .main .\u4E2D\u82F1\u6587\u663E\u793A .\u4E2D\u6587{flex-grow:1}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .main .\u4E2D\u82F1\u6587\u663E\u793A .\u82F1\u6587{flex-grow:1;margin-left:8px}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .main .\u4E2D\u82F1\u6587\u663E\u793A ::ng-deep .mat-form-field-wrapper{width:184px}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .main .checkbox{display:flex;margin-bottom:8px}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .main .checkbox .mat-checkbox{margin-right:8px}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .\u5206\u5272\u7EBF{width:1px;height:100%}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .\u57FA\u7840\u5C5E\u6027-\u96B6\u5C5E\u89D2\u8272\u680F{width:336px;height:100%;padding:8px 16px;box-sizing:border-box}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .\u57FA\u7840\u5C5E\u6027-\u96B6\u5C5E\u89D2\u8272\u680F .\u57FA\u7840\u5C5E\u6027-\u96B6\u5C5E\u89D2\u8272-\u590D\u9009\u6846{width:148px;height:47px;margin-bottom:8px;display:inline-block;font-size:14px;line-height:20px;vertical-align:top}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .\u57FA\u7840\u5C5E\u6027-\u96B6\u5C5E\u89D2\u8272\u680F .\u57FA\u7840\u5C5E\u6027-\u96B6\u5C5E\u89D2\u8272-\u590D\u9009\u6846 .\u590D\u9009\u6846\u5185\u5BB9{vertical-align:top}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .\u57FA\u7840\u5C5E\u6027-\u96B6\u5C5E\u89D2\u8272\u680F .\u57FA\u7840\u5C5E\u6027-\u96B6\u5C5E\u89D2\u8272-\u590D\u9009\u6846 ::ng-deep .mat-checkbox-layout{line-height:20px;height:47px;white-space:pre-wrap}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u57FA\u7840\u5C5E\u6027\u680F .\u57FA\u7840\u5C5E\u6027-\u96B6\u5C5E\u89D2\u8272\u680F .\u57FA\u7840\u5C5E\u6027-\u96B6\u5C5E\u89D2\u8272-\u590D\u9009\u6846 ::ng-deep .mat-checkbox-inner-container{margin:auto 8px 24px 0}.\u83DC\u5355\u9879\u5B9A\u4E49\u680F .\u6A21\u5757{width:808px;height:100%}.\u4E00\u7EA7\u6807\u9898{font-size:16px;font-weight:700;margin-bottom:16px}.\u4E8C\u7EA7\u6807\u9898{font-size:12px;margin-bottom:8px}"]
                    }] }
        ];
        /** @nocollapse */
        ElementComponent.ctorParameters = function () { return [
            { type: material.MatIconRegistry },
            { type: platformBrowser.DomSanitizer },
            { type: ElementService },
            { type: material.MatDialog }
        ]; };
        ElementComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.element',] }],
            slider: [{ type: core.ViewChild, args: ['slider', { static: false },] }],
            bill: [{ type: core.ViewChild, args: ['bill', { static: true },] }]
        };
        return ElementComponent;
    }());
    if (false) {
        /** @type {?} */
        ElementComponent.prototype.ElementOwnerNormal;
        /** @type {?} */
        ElementComponent.prototype.ElementOwnerAutoCreate;
        /** @type {?} */
        ElementComponent.prototype.hostClass;
        /** @type {?} */
        ElementComponent.prototype.slider;
        /** @type {?} */
        ElementComponent.prototype.bill;
        /** @type {?} */
        ElementComponent.prototype.filteredCategories;
        /** @type {?} */
        ElementComponent.prototype.filteredCategoriesEN;
        /** @type {?} */
        ElementComponent.prototype.filteredControllers;
        /** @type {?} */
        ElementComponent.prototype.svr;
        /**
         * @type {?}
         * @private
         */
        ElementComponent.prototype.dialog;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ErrorMessageModule = /** @class */ (function () {
        function ErrorMessageModule() {
        }
        ErrorMessageModule.decorators = [
            { type: core.NgModule, args: [{
                        declarations: [ErrorMessageComponent],
                        entryComponents: [ErrorMessageComponent],
                        imports: [common.CommonModule, material.MatDialogModule]
                    },] }
        ];
        return ErrorMessageModule;
    }());

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var BillFieldDirective = /** @class */ (function () {
        function BillFieldDirective(control, bill, matField, matCheckBox) {
            this.control = control;
            this.bill = bill;
            this.matField = matField;
            this.matCheckBox = matCheckBox;
        }
        /**
         * @return {?}
         */
        BillFieldDirective.prototype.ngAfterContentInit = /**
         * @return {?}
         */
        function () {
            if (this.bill.fieldMap[this.control.name].Hidden) {
                if (this.matField) {
                    this.matField._elementRef.nativeElement.style.display = 'none';
                }
                else if (this.matCheckBox) {
                    this.matCheckBox._elementRef.nativeElement.style.display = 'none';
                }
            }
        };
        BillFieldDirective.decorators = [
            { type: core.Directive, args: [{
                        selector: '[formControlName][commonBillField]'
                    },] }
        ];
        /** @nocollapse */
        BillFieldDirective.ctorParameters = function () { return [
            { type: forms.NgControl },
            { type: BillComponent },
            { type: material.MatFormField, decorators: [{ type: core.Optional }] },
            { type: material.MatCheckbox, decorators: [{ type: core.Optional }] }
        ]; };
        return BillFieldDirective;
    }());
    if (false) {
        /**
         * @type {?}
         * @private
         */
        BillFieldDirective.prototype.control;
        /**
         * @type {?}
         * @private
         */
        BillFieldDirective.prototype.bill;
        /**
         * @type {?}
         * @private
         */
        BillFieldDirective.prototype.matField;
        /**
         * @type {?}
         * @private
         */
        BillFieldDirective.prototype.matCheckBox;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var TrueFalseValueDirective = /** @class */ (function () {
        function TrueFalseValueDirective(control, matCheckBox) {
            this.control = control;
            this.matCheckBox = matCheckBox;
            // tslint:disable-next-line: no-input-rename
            this.falseValue = false;
            this.trueValue = true;
            this.subs = [];
        }
        /**
         * @return {?}
         */
        TrueFalseValueDirective.prototype.ngOnDestroy = /**
         * @return {?}
         */
        function () {
            this.subs.forEach((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.unsubscribe(); }));
        };
        /**
         * @return {?}
         */
        TrueFalseValueDirective.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.matCheckBox.checked = this.trueValue === this.control.value ? true : false;
            this.subs.push(this.matCheckBox.change.subscribe((/**
             * @param {?} event
             * @return {?}
             */
            function (event) {
                // patchValue 会引起checkbox的checked属性改变,这个问题以后解决
                _this.control.control.patchValue(event.checked ? _this.trueValue : _this.falseValue);
                _this.matCheckBox.checked = event.checked;
            })));
        };
        TrueFalseValueDirective.decorators = [
            { type: core.Directive, args: [{
                        // tslint:disable-next-line: directive-selector
                        selector: 'mat-checkbox[trueFalseValue][formControlName]'
                    },] }
        ];
        /** @nocollapse */
        TrueFalseValueDirective.ctorParameters = function () { return [
            { type: forms.FormControlName },
            { type: material.MatCheckbox }
        ]; };
        TrueFalseValueDirective.propDecorators = {
            falseValue: [{ type: core.Input }],
            trueValue: [{ type: core.Input }]
        };
        return TrueFalseValueDirective;
    }());
    if (false) {
        /** @type {?} */
        TrueFalseValueDirective.prototype.falseValue;
        /** @type {?} */
        TrueFalseValueDirective.prototype.trueValue;
        /** @type {?} */
        TrueFalseValueDirective.prototype.subs;
        /**
         * @type {?}
         * @private
         */
        TrueFalseValueDirective.prototype.control;
        /**
         * @type {?}
         * @private
         */
        TrueFalseValueDirective.prototype.matCheckBox;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var BillModule = /** @class */ (function () {
        function BillModule() {
        }
        BillModule.decorators = [
            { type: core.NgModule, args: [{
                        declarations: [BillComponent, BillFieldDirective, CloneComponent, TrueFalseValueDirective],
                        imports: [
                            common.CommonModule,
                            material.MatButtonModule,
                            material.MatIconModule,
                            material.MatFormFieldModule,
                            material.MatInputModule,
                            forms.ReactiveFormsModule,
                            material.MatSnackBarModule,
                            forms.FormsModule,
                            ErrorMessageModule
                        ],
                        exports: [BillComponent, BillFieldDirective, TrueFalseValueDirective, forms.ReactiveFormsModule],
                        entryComponents: [CloneComponent]
                    },] }
        ];
        return BillModule;
    }());

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /**
     * @record
     */
    function ColumnsWithLetter$1() { }
    if (false) {
        /** @type {?} */
        ColumnsWithLetter$1.prototype.Letter;
        /** @type {?} */
        ColumnsWithLetter$1.prototype.Columns;
    }
    /**
     * @record
     */
    function IDisplayColumn() { }
    if (false) {
        /** @type {?} */
        IDisplayColumn.prototype.Name;
        /** @type {?} */
        IDisplayColumn.prototype.Hidden;
        /** @type {?} */
        IDisplayColumn.prototype.Order;
    }
    /** @enum {string} */
    var Order = {
        // OrderAsc 升序
        OrderAsc: '+',
        // OrderDesc 降序
        OrderDesc: '-',
        // OrderNone 无排序
        OrderNone: '',
    };
    /**
     * @record
     */
    function IColumnType$1() { }
    if (false) {
        /** @type {?} */
        IColumnType$1.prototype.Name;
        /** @type {?} */
        IColumnType$1.prototype.Type;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /** @type {?} */
    var pinyin$1 = pinyin_;
    var ViewDefineComponent = /** @class */ (function () {
        function ViewDefineComponent(iconRegistry, sanitizer) {
            this.hostClass = true;
            this.ModifyEvent = new core.EventEmitter();
            this.checkColumns = new Map();
            this.orderAsc = Order.OrderAsc;
            this.orderDesc = Order.OrderDesc;
            this.orderNone = Order.OrderNone;
            /** @type {?} */
            var icons = [
                'all_chosen',
                'cancel_chosen',
                'return_chosen',
                'single_chosen',
                'double_down',
                'drag_indicator',
                'arrow_collapse',
                'arrow_expand',
                'sorting_arrows',
                'color_add',
                'file_copy',
                'bg_bottom_out'
            ];
            icons.forEach((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                iconRegistry.addSvgIcon(v, sanitizer.bypassSecurityTrustResourceUrl('assets/record-view/icon/' + v + '.svg'));
            }));
        }
        Object.defineProperty(ViewDefineComponent.prototype, "AllColumns", {
            set: /**
             * @param {?} val
             * @return {?}
             */
            function (val) {
                this._allColumns = val;
                this.refreshSelectedColumns(this._selectedColumns);
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(ViewDefineComponent.prototype, "SelectedColumns", {
            set: /**
             * @param {?} val
             * @return {?}
             */
            function (val) {
                this.refreshSelectedColumns(val);
            },
            enumerable: true,
            configurable: true
        });
        /**
         * @return {?}
         */
        ViewDefineComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        /**
         * @private
         * @return {?}
         */
        ViewDefineComponent.prototype.refreshCanSelectColumns = /**
         * @private
         * @return {?}
         */
        function () {
            var _this = this;
            if (this._allColumns) {
                this.CanSelectColumns = map2WithLetter$1(this._allColumns.filter((/**
                 * @param {?} col
                 * @return {?}
                 */
                function (col) { return !_this._selectedColumns || !_this._selectedColumns.find((/**
                 * @param {?} sel
                 * @return {?}
                 */
                function (sel) { return sel.Name === col; })); })));
            }
        };
        /**
         * @private
         * @param {?=} cols
         * @return {?}
         */
        ViewDefineComponent.prototype.refreshSelectedColumns = /**
         * @private
         * @param {?=} cols
         * @return {?}
         */
        function (cols) {
            this.checkColumns.clear();
            this._selectedColumns = cols;
            this.refreshCanSelectColumns();
        };
        /**
         * @param {?} event
         * @return {?}
         */
        ViewDefineComponent.prototype.drop = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            if (event.container === this.rightList) {
                // 右边内部移动
                if (event.previousContainer === event.container) {
                    dragDrop.moveItemInArray(event.container.data, event.previousIndex, event.currentIndex);
                }
                else {
                    // 从左边拖到右边
                    this._selectedColumns = this._selectedColumns || [];
                    this._selectedColumns.splice(event.currentIndex, 0, (/** @type {?} */ ({
                        Name: event.item.data,
                        Hidden: false,
                        Order: Order.OrderNone
                    })));
                    this.refreshCanSelectColumns();
                }
            }
            else if (event.previousContainer !== event.container) {
                // 从右边拖动到左边
                event.previousContainer.data.splice(event.previousIndex, 1);
                this.refreshCanSelectColumns();
            }
            this.emitModify();
        };
        /**
         * @param {?} event
         * @return {?}
         */
        ViewDefineComponent.prototype.chkSelectChange = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            if (event.checked) {
                this.checkColumns.set(event.source.value, true);
            }
            else {
                this.checkColumns.delete(event.source.value);
            }
        };
        /**
         * @param {?} colName
         * @return {?}
         */
        ViewDefineComponent.prototype.toRight = /**
         * @param {?} colName
         * @return {?}
         */
        function (colName) {
            this._selectedColumns = this._selectedColumns || [];
            this._selectedColumns.push((/** @type {?} */ ({
                Name: colName,
                Hidden: false,
                Order: Order.OrderNone
            })));
            this.refreshCanSelectColumns();
            this.emitModify();
        };
        /**
         * @param {?} idx
         * @return {?}
         */
        ViewDefineComponent.prototype.toLeft = /**
         * @param {?} idx
         * @return {?}
         */
        function (idx) {
            this._selectedColumns.splice(idx, 1);
            this.refreshCanSelectColumns();
            this.emitModify();
        };
        /**
         * @param {?} event
         * @return {?}
         */
        ViewDefineComponent.prototype.checkAll = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            var _this = this;
            if (event.checked) {
                this.checkColumns.clear();
                this.CanSelectColumns.forEach((/**
                 * @param {?} item
                 * @return {?}
                 */
                function (item) {
                    item.Columns.forEach((/**
                     * @param {?} node
                     * @return {?}
                     */
                    function (node) {
                        _this.checkColumns.set(node, true);
                        // console.log(this.checkColumns.get(node));
                    }));
                }));
            }
            else {
                this.checkColumns.clear();
            }
        };
        /**
         * @return {?}
         */
        ViewDefineComponent.prototype.toRightAll = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this._selectedColumns = this._selectedColumns || [];
            this.CanSelectColumns.forEach((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                v.Columns.forEach((/**
                 * @param {?} col
                 * @return {?}
                 */
                function (col) {
                    if (_this.checkColumns.has(col)) {
                        _this._selectedColumns.push((/** @type {?} */ ({
                            Name: col,
                            Hidden: false,
                            Order: Order.OrderNone
                        })));
                    }
                }));
            }));
            this.refreshCanSelectColumns();
            this.emitModify();
        };
        /**
         * @param {?} letter
         * @return {?}
         */
        ViewDefineComponent.prototype.acronymFun = /**
         * @param {?} letter
         * @return {?}
         */
        function (letter) {
            document.querySelector('#' + letter).scrollIntoView(true);
        };
        /**
         * @return {?}
         */
        ViewDefineComponent.prototype.emitModify = /**
         * @return {?}
         */
        function () {
            this.ModifyEvent.emit(this._selectedColumns);
        };
        ViewDefineComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-view-define',
                        template: "<div class=\"main\">\r\n\t<div\r\n\t\t[class.\u9690\u85CF]=\"readonly\"\r\n\t\tclass=\"left-columns column-padding\"\r\n\t\tcdkDropList\r\n\t\t#leftList=\"cdkDropList\"\r\n\t\t[cdkDropListData]=\"CanSelectColumns\"\r\n\t\t[cdkDropListSortingDisabled]=\"true\"\r\n\t\t[cdkDropListConnectedTo]=\"[rightList]\"\r\n\t\t(cdkDropListDropped)=\"drop($event)\"\r\n\t>\r\n\t\t<div class=\"column-title\">\u5176\u4ED6\u5217</div>\r\n\t\t<div class=\"column-list\">\r\n\t\t\t<div *ngFor=\"let list of CanSelectColumns\">\r\n\t\t\t\t<div class=\"letter-color \u6307\u6807\u9996\u5B57\u6BCD\" id=\"{{ list.Letter }}\">\r\n\t\t\t\t\t{{ list.Letter | uppercase }}\r\n\t\t\t\t</div>\r\n\t\t\t\t<span\r\n\t\t\t\t\tmat-button\r\n\t\t\t\t\tclass=\"\u5217 \u5217\u5BBD\"\r\n\t\t\t\t\t*ngFor=\"let column of list.Columns; let index = index\"\r\n\t\t\t\t\tcdkDrag\r\n\t\t\t\t\t[cdkDragData]=\"column\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<mat-checkbox\r\n\t\t\t\t\t\tclass=\"checkbox\"\r\n\t\t\t\t\t\t[value]=\"column\"\r\n\t\t\t\t\t\t[checked]=\"checkColumns.get(column)\"\r\n\t\t\t\t\t\t(change)=\"chkSelectChange($event)\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<span>{{ column }}</span>\r\n\t\t\t\t\t</mat-checkbox>\r\n\r\n\t\t\t\t\t<mat-icon class=\"\u663E\u793A\u5217\u524D\u6807\u7B7E \u6D6E\u52A8\u663E\u793A \u56FE\u6807\u5927\u5C0F\" svgIcon=\"drag_indicator\" cdkDragHandle></mat-icon>\r\n\t\t\t\t\t<div class=\"\u8981\u663E\u793A\u5217-\u529F\u80FD\u56FE\u6807 \u6D6E\u52A8\u663E\u793A\">\r\n\t\t\t\t\t\t<button mat-icon-button class=\"\u56FE\u6807\u6D9F\u6F2A\" (click)=\"toRight(column)\">\r\n\t\t\t\t\t\t\t<mat-icon class=\"\u4EAE\u8272\u5B57\u4F53 \u56FE\u6807\u5927\u5C0F\" svgIcon=\"last_page\"> </mat-icon>\r\n\t\t\t\t\t\t</button>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</span>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div class=\"letter-list\">\r\n\t\t\t<div *ngFor=\"let list of CanSelectColumns\">\r\n\t\t\t\t<div class=\"letter-color \u5C45\u4E2D\" (click)=\"acronymFun(list.Letter)\">\r\n\t\t\t\t\t{{ list.Letter | uppercase }}\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div class=\"\u5168\u9009\">\r\n\t\t\t<mat-checkbox (change)=\"checkAll($event)\">\r\n\t\t\t\t<span>\u5168\u9009</span>\r\n\t\t\t</mat-checkbox>\r\n\t\t\t<mat-icon class=\"\u5168\u9009\u56FE\u6807\" (click)=\"toRightAll()\" svgIcon=\"last_page\"> </mat-icon>\r\n\t\t</div>\r\n\t</div>\r\n\t<div\r\n\t\tclass=\"right column-padding\"\r\n\t\tcdkDropList\r\n\t\t#rightList=\"cdkDropList\"\r\n\t\t[cdkDropListData]=\"_selectedColumns\"\r\n\t\t[cdkDropListConnectedTo]=\"[leftList]\"\r\n\t\t(cdkDropListDropped)=\"drop($event)\"\r\n\t>\r\n\t\t<div class=\"column-title\">\u663E\u793A\u7684\u5217</div>\r\n\t\t<div\r\n\t\t\t*ngFor=\"let column of _selectedColumns; let index = index\"\r\n\t\t\tclass=\"\u5217\"\r\n\t\t\t[class.\u900F\u660E\u5EA6]=\"column.Hidden == true\"\r\n\t\t\t[cdkDragDisabled]=\"readonly\"\r\n\t\t\tcdkDrag\r\n\t\t>\r\n\t\t\t{{ index + 1 }} {{ column.Name }}\r\n\t\t\t<mat-icon class=\"\u663E\u793A\u5217\u524D\u6807\u7B7E \u6D6E\u52A8\u663E\u793A \u56FE\u6807\u5927\u5C0F\" svgIcon=\"drag_indicator\" cdkDragHandle></mat-icon>\r\n\t\t\t<mat-icon\r\n\t\t\t\t*ngIf=\"column.Order === orderDesc\"\r\n\t\t\t\tclass=\"\u663E\u793A\u5217\u524D\u6807\u7B7E \u6392\u5E8F \u56FE\u6807\u5927\u5C0F\"\r\n\t\t\t\tsvgIcon=\"arrow_downward\"\r\n\t\t\t></mat-icon>\r\n\t\t\t<mat-icon\r\n\t\t\t\t*ngIf=\"column.Order === orderAsc\"\r\n\t\t\t\tclass=\"\u663E\u793A\u5217\u524D\u6807\u7B7E \u6392\u5E8F \u56FE\u6807\u5927\u5C0F\"\r\n\t\t\t\tsvgIcon=\"arrow_upward\"\r\n\t\t\t></mat-icon>\r\n\t\t\t<div *ngIf=\"!readonly\" class=\"\u8981\u663E\u793A\u5217-\u529F\u80FD\u56FE\u6807 \u6D6E\u52A8\u663E\u793A\">\r\n\t\t\t\t<button mat-icon-button class=\"\u56FE\u6807\u6D9F\u6F2A\" (click)=\"column.Hidden = !column.Hidden; emitModify();\">\r\n\t\t\t\t\t<mat-icon class=\"\u56FE\u6807\u5927\u5C0F\" [svgIcon]=\"column.Hidden ? 'visibility_off' : 'visibility'\"> </mat-icon>\r\n\t\t\t\t</button>\r\n\r\n\t\t\t\t<ng-container [ngSwitch]=\"column.Order\">\r\n\t\t\t\t\t<button\r\n\t\t\t\t\t\tmat-icon-button\r\n\t\t\t\t\t\tclass=\"\u56FE\u6807\u6D9F\u6F2A\"\r\n\t\t\t\t\t\t*ngSwitchCase=\"orderAsc\"\r\n\t\t\t\t\t\t(click)=\"column.Order = orderNone;emitModify();\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<mat-icon class=\"\u56FE\u6807\u5927\u5C0F\" svgIcon=\"arrow_upward\"> </mat-icon>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t\t<button\r\n\t\t\t\t\t\tmat-icon-button\r\n\t\t\t\t\t\tclass=\"\u56FE\u6807\u6D9F\u6F2A\"\r\n\t\t\t\t\t\t*ngSwitchCase=\"orderDesc\"\r\n\t\t\t\t\t\t(click)=\"column.Order = orderAsc; emitModify();\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<mat-icon class=\"\u56FE\u6807\u5927\u5C0F\" svgIcon=\"arrow_downward\"> </mat-icon>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t\t<button\r\n\t\t\t\t\t\tmat-icon-button\r\n\t\t\t\t\t\tclass=\"\u56FE\u6807\u6D9F\u6F2A\"\r\n\t\t\t\t\t\t*ngSwitchDefault\r\n\t\t\t\t\t\t(click)=\"column.Order = orderDesc;emitModify();\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<mat-icon class=\"\u56FE\u6807\u5927\u5C0F\" svgIcon=\"sorting_arrows\"> </mat-icon>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t</ng-container>\r\n\t\t\t\t<button mat-icon-button class=\"\u56FE\u6807\u6D9F\u6F2A\" (click)=\"toLeft(index)\">\r\n\t\t\t\t\t<mat-icon class=\"\u4EAE\u8272\u5B57\u4F53 \u56FE\u6807\u5927\u5C0F \u65CB\u8F6C\" svgIcon=\"last_page\"> </mat-icon>\r\n\t\t\t\t</button>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n",
                        styles: ["@charset \"UTF-8\";.main{width:100%;height:100%;display:flex;flex-direction:row}.main .left-columns{max-width:248px;min-width:170px;flex-grow:1;height:100%;position:relative}.main .left-columns .column-list{height:calc(100% - 48px);max-height:100%;margin:0;overflow-y:auto}.main .left-columns .letter-list{height:calc(100% - 34px);position:absolute;top:34px;right:0;z-index:1;overflow-y:auto}.main .left-columns .\u5168\u9009{width:128px;height:32px;line-height:24px;border-radius:16px;position:absolute;left:0;bottom:8px;font-size:16px;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2)}.main .left-columns .\u5168\u9009 .mat-checkbox{padding-left:16px;vertical-align:top!important;margin:0}.main .left-columns .\u5168\u9009 .\u5168\u9009\u56FE\u6807{position:absolute;top:4px;right:16px;width:24px;height:24px;font-size:24px;line-height:16px;cursor:pointer}.main .left-columns .letter-color{width:20px;font-size:12px;text-align:center}.main .left-columns .\u6307\u6807\u9996\u5B57\u6BCD{margin:8px 8px 4px}.main .left-columns .\u5C45\u4E2D{text-align:center;cursor:pointer}.main .right{flex-grow:2;min-width:200px;height:100%;position:relative}.main .column-padding{display:block;padding-top:32px;box-sizing:border-box}.main .column-padding .column-title{height:16px;border-left:4px solid #000;padding-left:12px;font-size:14px;position:absolute;top:8px;left:0}.main .\u65CB\u8F6C{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.main .\u900F\u660E\u5EA6{opacity:.5}.main .\u9690\u85CF{display:none}.\u5217{display:block;height:32px;line-height:32px;padding:0 24px;box-sizing:border-box;text-align:left;font-size:14px;cursor:pointer;position:relative}.\u5217 .\u6D6E\u52A8\u663E\u793A{display:none}.\u5217 .\u663E\u793A\u5217\u524D\u6807\u7B7E{position:absolute;top:50%;left:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.\u5217 .\u6392\u5E8F{display:block}.\u5217 .\u8981\u663E\u793A\u5217-\u529F\u80FD\u56FE\u6807{height:32px;line-height:32px;position:absolute;right:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.\u5217 .\u56FE\u6807\u5927\u5C0F{width:16px;height:16px;line-height:16px}.\u5217 .\u56FE\u6807\u6D9F\u6F2A{width:32px;height:32px;text-align:center;line-height:32px;vertical-align:top}.\u5217:hover{box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);z-index:5}.\u5217:hover .\u6D6E\u52A8\u663E\u793A{display:block}.\u5217:hover .\u6392\u5E8F{display:none}.\u5217\u5BBD{width:calc(100% - 24px)}"]
                    }] }
        ];
        /** @nocollapse */
        ViewDefineComponent.ctorParameters = function () { return [
            { type: material.MatIconRegistry },
            { type: platformBrowser.DomSanitizer }
        ]; };
        ViewDefineComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.view-define',] }],
            readonly: [{ type: core.Input }],
            AllColumns: [{ type: core.Input }],
            ModifyEvent: [{ type: core.Output }],
            leftList: [{ type: core.ViewChild, args: ['leftList', { static: false },] }],
            rightList: [{ type: core.ViewChild, args: ['rightList', { static: false },] }],
            SelectedColumns: [{ type: core.Input }]
        };
        return ViewDefineComponent;
    }());
    if (false) {
        /** @type {?} */
        ViewDefineComponent.prototype.hostClass;
        /** @type {?} */
        ViewDefineComponent.prototype.readonly;
        /** @type {?} */
        ViewDefineComponent.prototype.ModifyEvent;
        /** @type {?} */
        ViewDefineComponent.prototype._allColumns;
        /** @type {?} */
        ViewDefineComponent.prototype.leftList;
        /** @type {?} */
        ViewDefineComponent.prototype.rightList;
        /** @type {?} */
        ViewDefineComponent.prototype.CanSelectColumns;
        /** @type {?} */
        ViewDefineComponent.prototype._selectedColumns;
        /** @type {?} */
        ViewDefineComponent.prototype.checkColumns;
        /** @type {?} */
        ViewDefineComponent.prototype.orderAsc;
        /** @type {?} */
        ViewDefineComponent.prototype.orderDesc;
        /** @type {?} */
        ViewDefineComponent.prototype.orderNone;
    }
    /**
     * @param {?} v
     * @return {?}
     */
    function map2WithLetter$1(v) {
        /** @type {?} */
        var mapList = new Map();
        v.forEach((/**
         * @param {?} vv
         * @return {?}
         */
        function (vv) {
            /** @type {?} */
            var headerLetter = pinyin$1(vv, { style: pinyin$1.STYLE_FIRST_LETTER }).map((/**
             * @param {?} s
             * @return {?}
             */
            function (s) { return s[0]; }))[0];
            if (headerLetter.length > 1) {
                headerLetter = headerLetter[0];
            }
            if (mapList.has(headerLetter)) {
                mapList.get(headerLetter).push(vv);
            }
            else {
                mapList.set(headerLetter, [vv]);
            }
        }));
        // 排序
        /** @type {?} */
        var rev = (/** @type {?} */ ([]));
        mapList.forEach((/**
         * @param {?} columns
         * @param {?} letter
         * @return {?}
         */
        function (columns, letter) {
            rev.push((/** @type {?} */ ({ Letter: letter, Columns: columns })));
        }));
        return rev.sort((/**
         * @param {?} a
         * @param {?} b
         * @return {?}
         */
        function (a, b) { return a.Letter.localeCompare(b.Letter); }));
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var Label = /** @class */ (function () {
        function Label() {
        }
        /**
         * @param {?} data
         * @return {?}
         */
        Label.fromInterface = /**
         * @param {?} data
         * @return {?}
         */
        function (data) {
            /** @type {?} */
            var rev = new Label();
            Object.assign(rev, data);
            return rev;
        };
        /**
         * @return {?}
         */
        Label.prototype.displayLabel = /**
         * @return {?}
         */
        function () {
            return this.Name;
        };
        /**
         * @param {?} data
         * @return {?}
         */
        Label.prototype.equal = /**
         * @param {?} data
         * @return {?}
         */
        function (data) {
            return this.CategoryID === data.CategoryID && this.ID === data.ID && this.Name === data.Name;
        };
        return Label;
    }());
    if (false) {
        /** @type {?} */
        Label.prototype.CategoryID;
        /** @type {?} */
        Label.prototype.ID;
        /** @type {?} */
        Label.prototype.Name;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var Category = /** @class */ (function () {
        function Category() {
        }
        /**
         * @param {?} data
         * @return {?}
         */
        Category.fromInterface = /**
         * @param {?} data
         * @return {?}
         */
        function (data) {
            /** @type {?} */
            var rev = new Category();
            rev.ID = data.ID;
            rev.Name = data.Name;
            rev.OwnerBy = data.OwnerBy;
            rev.Owner = data.Owner;
            rev.Position = data.Position;
            if (data.Labels) {
                rev.Labels = data.Labels.map((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) { return Label.fromInterface(__assign({ CategoryID: data.ID }, v)); }));
            }
            return rev;
        };
        /**
         * @return {?}
         */
        Category.prototype.displayLabel = /**
         * @return {?}
         */
        function () {
            return this.Position + "." + this.Name + "(" + this.Owner + ")";
        };
        /**
         * @param {?} ids
         * @return {?}
         */
        Category.prototype.setLabelsPosition = /**
         * @param {?} ids
         * @return {?}
         */
        function (ids) {
            var _a;
            /** @type {?} */
            var oldArray = __spread(this.Labels);
            (_a = this.Labels).splice.apply(_a, __spread([0, oldArray.length], ids.map((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return oldArray.find((/**
             * @param {?} vv
             * @return {?}
             */
            function (vv) { return vv.ID === v; })); }))));
        };
        return Category;
    }());
    if (false) {
        /** @type {?} */
        Category.prototype.ID;
        /** @type {?} */
        Category.prototype.Name;
        /** @type {?} */
        Category.prototype.OwnerBy;
        /** @type {?} */
        Category.prototype.Owner;
        /** @type {?} */
        Category.prototype.Position;
        /** @type {?} */
        Category.prototype.Labels;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /**
     * @record
     */
    function ModelElementCategory() { }
    if (false) {
        /** @type {?} */
        ModelElementCategory.prototype.ID;
        /** @type {?} */
        ModelElementCategory.prototype.EleName;
        /** @type {?} */
        ModelElementCategory.prototype.OwnerBy;
        /** @type {?} */
        ModelElementCategory.prototype.Owner;
        /** @type {?} */
        ModelElementCategory.prototype.Name;
        /** @type {?} */
        ModelElementCategory.prototype.Position;
        /** @type {?} */
        ModelElementCategory.prototype.Labels;
    }
    /**
     * @record
     */
    function ModelElementLabel() { }
    if (false) {
        /** @type {?} */
        ModelElementLabel.prototype.CategoryID;
        /** @type {?} */
        ModelElementLabel.prototype.ID;
        /** @type {?} */
        ModelElementLabel.prototype.Name;
        /** @type {?} */
        ModelElementLabel.prototype.Position;
        /** @type {?} */
        ModelElementLabel.prototype.LastWriteTime;
        /** @type {?} */
        ModelElementLabel.prototype.LastWriteUser;
        /** @type {?} */
        ModelElementLabel.prototype.Conts;
        /** @type {?} */
        ModelElementLabel.prototype.PlainText;
    }
    /**
     * @record
     */
    function AddCategoryParam() { }
    if (false) {
        /** @type {?} */
        AddCategoryParam.prototype.EleName;
        /** @type {?} */
        AddCategoryParam.prototype.Name;
        /** @type {?} */
        AddCategoryParam.prototype.OwnerBy;
        /** @type {?|undefined} */
        AddCategoryParam.prototype.BeforeAtID;
    }
    /**
     * @record
     */
    function SetCategoryPositionParam() { }
    if (false) {
        /** @type {?} */
        SetCategoryPositionParam.prototype.ID;
        /** @type {?} */
        SetCategoryPositionParam.prototype.Position;
    }
    /**
     * @record
     */
    function SetCategoryPositionResult() { }
    if (false) {
        /** @type {?} */
        SetCategoryPositionResult.prototype.ID;
        /** @type {?} */
        SetCategoryPositionResult.prototype.Position;
    }
    /**
     * @record
     */
    function UpdateCategoryParam() { }
    if (false) {
        /** @type {?} */
        UpdateCategoryParam.prototype.ID;
        /** @type {?} */
        UpdateCategoryParam.prototype.Name;
        /** @type {?} */
        UpdateCategoryParam.prototype.OwnerBy;
    }
    /**
     * @record
     */
    function AddLabelParam() { }
    if (false) {
        /** @type {?} */
        AddLabelParam.prototype.CategoryID;
        /** @type {?} */
        AddLabelParam.prototype.Name;
        /** @type {?} */
        AddLabelParam.prototype.Conts;
        /** @type {?} */
        AddLabelParam.prototype.PlainText;
    }
    /**
     * @record
     */
    function SetLabelPositionParam() { }
    if (false) {
        /** @type {?} */
        SetLabelPositionParam.prototype.CategoryID;
        /** @type {?} */
        SetLabelPositionParam.prototype.ID;
        /** @type {?} */
        SetLabelPositionParam.prototype.Position;
    }
    /**
     * @record
     */
    function SetLabelPositionResult() { }
    if (false) {
        /** @type {?} */
        SetLabelPositionResult.prototype.ID;
        /** @type {?} */
        SetLabelPositionResult.prototype.Position;
    }
    /**
     * @record
     */
    function UpdateLabelParam() { }
    if (false) {
        /** @type {?} */
        UpdateLabelParam.prototype.CategoryID;
        /** @type {?} */
        UpdateLabelParam.prototype.ID;
        /** @type {?} */
        UpdateLabelParam.prototype.Name;
        /** @type {?} */
        UpdateLabelParam.prototype.Conts;
        /** @type {?} */
        UpdateLabelParam.prototype.PlainText;
    }
    /**
     * @record
     */
    function IFetchElementAllCategoriesResult() { }
    if (false) {
        /** @type {?} */
        IFetchElementAllCategoriesResult.prototype.OwnerBy;
        /** @type {?} */
        IFetchElementAllCategoriesResult.prototype.Owner;
        /** @type {?} */
        IFetchElementAllCategoriesResult.prototype.DeptName;
    }
    var FetchElementAllCategoriesResult = /** @class */ (function () {
        function FetchElementAllCategoriesResult() {
        }
        /**
         * @param {?} data
         * @return {?}
         */
        FetchElementAllCategoriesResult.fromInterface = /**
         * @param {?} data
         * @return {?}
         */
        function (data) {
            /** @type {?} */
            var rev = new FetchElementAllCategoriesResult();
            Object.assign(rev, __assign({}, data));
            return rev;
        };
        /**
         * @return {?}
         */
        FetchElementAllCategoriesResult.prototype.categoryDisplayLabel = /**
         * @return {?}
         */
        function () {
            switch (this.OwnerBy) {
                case OwnerByEnum.ownerByEle:
                    return '缺省';
                case OwnerByEnum.ownerByDept:
                    return this.Owner + "." + this.DeptName;
                case OwnerByEnum.ownerByUser:
                    return '私有';
            }
        };
        return FetchElementAllCategoriesResult;
    }());
    if (false) {
        /** @type {?} */
        FetchElementAllCategoriesResult.prototype.OwnerBy;
        /** @type {?} */
        FetchElementAllCategoriesResult.prototype.Owner;
        /** @type {?} */
        FetchElementAllCategoriesResult.prototype.DeptName;
    }
    /**
     * @record
     */
    function FetchLabelResult() { }
    if (false) {
        /** @type {?} */
        FetchLabelResult.prototype.Name;
        /** @type {?} */
        FetchLabelResult.prototype.Position;
        /** @type {?} */
        FetchLabelResult.prototype.LastWriteTime;
        /** @type {?} */
        FetchLabelResult.prototype.LastWriteUser;
        /** @type {?} */
        FetchLabelResult.prototype.Conts;
        /** @type {?} */
        FetchLabelResult.prototype.PlainText;
    }
    var EleViewBackFaceService = /** @class */ (function () {
        function EleViewBackFaceService(api) {
            this.api = api;
            this.ele = 'eleview';
        }
        /**
         * @param {?} param
         * @return {?}
         */
        EleViewBackFaceService.prototype.addCategory = /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            return this.api
                .post(this.ele, 'add-category', param)
                .pipe(operators.map((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return (v ? Category.fromInterface(v) : null); })));
        };
        /**
         * @param {?} id
         * @return {?}
         */
        EleViewBackFaceService.prototype.removeCategory = /**
         * @param {?} id
         * @return {?}
         */
        function (id) {
            return this.api.post(this.ele, 'remove-category', id);
        };
        /**
         * @param {?} param
         * @return {?}
         */
        EleViewBackFaceService.prototype.setCategoryPosition = /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            return this.api.post(this.ele, 'set-category-position', param);
        };
        /**
         * @param {?} param
         * @return {?}
         */
        EleViewBackFaceService.prototype.updateCategory = /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            return this.api.post(this.ele, 'update-category', param);
        };
        /**
         * @param {?} param
         * @return {?}
         */
        EleViewBackFaceService.prototype.fetchCategories = /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            return this.api
                .get(this.ele, 'fetch-categories', param)
                .pipe(operators.map((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return (v ? v.map((/**
             * @param {?} vv
             * @return {?}
             */
            function (vv) { return Category.fromInterface(vv); })) : null); })));
        };
        /**
         * @param {?} eleName
         * @return {?}
         */
        EleViewBackFaceService.prototype.fetchElementAllCategories = /**
         * @param {?} eleName
         * @return {?}
         */
        function (eleName) {
            return this.api.get(this.ele, 'fetch-element-all-categories', eleName).pipe(operators.map((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                return v.map((/**
                 * @param {?} vv
                 * @return {?}
                 */
                function (vv) { return FetchElementAllCategoriesResult.fromInterface(vv); }));
            })));
        };
        // 获取菜单项所有标签的日志
        // 获取菜单项所有标签的日志
        /**
         * @param {?} param
         * @return {?}
         */
        EleViewBackFaceService.prototype.fetchCategoryLabelHis = 
        // 获取菜单项所有标签的日志
        /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            return this.api.get(this.ele, 'fetch-category-label-his', param);
        };
        // 获取标签的日志列表
        // 获取标签的日志列表
        /**
         * @param {?} param
         * @return {?}
         */
        EleViewBackFaceService.prototype.fetchLabelHisList = 
        // 获取标签的日志列表
        /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            return this.api.get(this.ele, 'fetch-label-his-list', param);
        };
        // 根据时间获取label的内容
        // 根据时间获取label的内容
        /**
         * @param {?} param
         * @return {?}
         */
        EleViewBackFaceService.prototype.fetchLabelHis = 
        // 根据时间获取label的内容
        /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            return this.api.get(this.ele, 'fetch-label-his', param);
        };
        /**
         * @param {?} param
         * @return {?}
         */
        EleViewBackFaceService.prototype.addLabel = /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            return this.api.post(this.ele, 'add-label', param);
        };
        /**
         * @param {?} param
         * @return {?}
         */
        EleViewBackFaceService.prototype.removeLabel = /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            return this.api.post(this.ele, 'remove-label', param);
        };
        /**
         * @param {?} param
         * @return {?}
         */
        EleViewBackFaceService.prototype.nodeToString = /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            if (param) {
                return this.api.post(this.ele, 'node-to-string', param);
            }
            else {
                return rxjs.of('');
            }
        };
        /**
         * @param {?} param
         * @return {?}
         */
        EleViewBackFaceService.prototype.stringToNode = /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            if (param) {
                return this.api.post(this.ele, 'string-to-node', param);
            }
            else {
                return rxjs.of(null);
            }
        };
        /**
         * @param {?} param
         * @return {?}
         */
        EleViewBackFaceService.prototype.setLabelPosition = /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            return this.api.post(this.ele, 'set-label-position', param);
        };
        /**
         * @param {?} param
         * @return {?}
         */
        EleViewBackFaceService.prototype.updateLabel = /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            return this.api.post(this.ele, 'update-label', param);
        };
        /**
         * @param {?} param
         * @return {?}
         */
        EleViewBackFaceService.prototype.fetchLabel = /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            return this.api.get(this.ele, 'fetch-label', param);
        };
        /**
         * @param {?} param
         * @return {?}
         */
        EleViewBackFaceService.prototype.fetchFullCategories = /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            return this.api.get(this.ele, 'fetch-full-categories', param);
        };
        EleViewBackFaceService.decorators = [
            { type: core.Injectable, args: [{
                        providedIn: 'root'
                    },] }
        ];
        /** @nocollapse */
        EleViewBackFaceService.ctorParameters = function () { return [
            { type: dbwebCore.ElementApiService }
        ]; };
        /** @nocollapse */ EleViewBackFaceService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function EleViewBackFaceService_Factory() { return new EleViewBackFaceService(core.ɵɵinject(dbwebCore.ElementApiService)); }, token: EleViewBackFaceService, providedIn: "root" });
        return EleViewBackFaceService;
    }());
    if (false) {
        /** @type {?} */
        EleViewBackFaceService.prototype.ele;
        /**
         * @type {?}
         * @private
         */
        EleViewBackFaceService.prototype.api;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /**
     * @return {?}
     */
    function newID() {
        /** @type {?} */
        var buf = uuid.v1(null, []);
        /** @type {?} */
        var TYPED_ARRAY = new Uint8Array(buf);
        /** @type {?} */
        var STRING_CHAR = TYPED_ARRAY.reduce((/**
         * @param {?} data
         * @param {?} byte
         * @return {?}
         */
        function (data, byte) {
            return data + String.fromCharCode(byte);
        }), '');
        /** @type {?} */
        var base64String = btoa(STRING_CHAR);
        return base64String;
    }
    var LabelMockBackfaceService = /** @class */ (function () {
        function LabelMockBackfaceService(backface, curr) {
            this.backface = backface;
            this.curr = curr;
        }
        /**
         * @param {?} param
         * @return {?}
         */
        LabelMockBackfaceService.prototype.addCategory = /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            if (!param.Name) {
                return rxjs.throwError('名称为空');
            }
            if (this.recordViewData.labelCategories.find((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.Name === param.Name; }))) {
                return rxjs.throwError('名称重复');
            }
            /** @type {?} */
            var newCate = (/** @type {?} */ ({
                ID: newID(),
                EleName: param.EleName,
                OwnerBy: param.OwnerBy,
                Owner: ownerElement,
                Name: param.Name
            }));
            if (param.BeforeAtID) {
                this.recordViewData.labelCategories.splice(this.recordViewData.labelCategories.findIndex((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) { return v.ID === param.BeforeAtID; })), 0, newCate);
            }
            else {
                this.recordViewData.labelCategories.push(newCate);
            }
            this.recordViewData.labelCategories.forEach((/**
             * @param {?} v
             * @param {?} i
             * @return {?}
             */
            function (v, i) { return (v.Position = i + 1); }));
            /** @type {?} */
            var rev = new Category();
            rev.ID = newCate.ID;
            rev.Name = newCate.Name;
            rev.Owner = newCate.Owner;
            rev.OwnerBy = newCate.OwnerBy;
            rev.Position = newCate.Position;
            return rxjs.of(rev);
        };
        /**
         * @param {?} id
         * @return {?}
         */
        LabelMockBackfaceService.prototype.removeCategory = /**
         * @param {?} id
         * @return {?}
         */
        function (id) {
            this.recordViewData.labelCategories
                .splice(this.recordViewData.labelCategories.findIndex((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.ID === id; })), 1)
                .forEach((/**
             * @param {?} v
             * @param {?} i
             * @return {?}
             */
            function (v, i) { return (v.Position = i + 1); }));
            return rxjs.of(true);
        };
        /**
         * @param {?} param
         * @return {?}
         */
        LabelMockBackfaceService.prototype.setCategoryPosition = /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            dragDrop.moveItemInArray(this.recordViewData.labelCategories, this.recordViewData.labelCategories.findIndex((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.ID === param.ID; })), param.Position - 1);
            this.recordViewData.labelCategories.forEach((/**
             * @param {?} v
             * @param {?} i
             * @return {?}
             */
            function (v, i) { return (v.Position = i + 1); }));
            return rxjs.of(this.recordViewData.labelCategories.map((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return ({ ID: v.ID, Position: v.Position }); })));
        };
        /**
         * @param {?} param
         * @return {?}
         */
        LabelMockBackfaceService.prototype.updateCategory = /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            /** @type {?} */
            var c = this.recordViewData.labelCategories.find((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.ID === param.ID; }));
            c.Name = param.Name;
            return rxjs.of(true);
        };
        /**
         * @param {?} param
         * @return {?}
         */
        LabelMockBackfaceService.prototype.fetchCategories = /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            var _this = this;
            // 新增状态下,不能去取数据,因为有可能会取到已存在的记录数据,造成泄密
            if (this.isAdd) {
                return rxjs.of([]);
            }
            return this.backface
                .fetchFullCategories({ EleName: param.EleName, OwnerBy: param.OwnerBy, Owner: param.Owner })
                .pipe(operators.map((/**
             * @param {?} cates
             * @return {?}
             */
            function (cates) {
                _this.recordViewData.labelCategories = cates;
                return _this.recordViewData.labelCategories.map((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) {
                    /** @type {?} */
                    var lbls;
                    if (v.Labels) {
                        lbls = v.Labels.map((/**
                         * @param {?} lbl
                         * @return {?}
                         */
                        function (lbl) { return ({
                            ID: lbl.ID,
                            Name: lbl.Name
                        }); }));
                    }
                    return Category.fromInterface({
                        ID: v.ID,
                        Name: v.Name,
                        Owner: v.Owner,
                        OwnerBy: v.OwnerBy,
                        Position: v.Position,
                        Labels: lbls
                    });
                }));
            })));
        };
        // 获取菜单项所有标签的日志
        // 获取菜单项所有标签的日志
        /**
         * @param {?} param
         * @return {?}
         */
        LabelMockBackfaceService.prototype.fetchCategoryLabelHis = 
        // 获取菜单项所有标签的日志
        /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            if (this.isAdd) {
                return rxjs.of([]);
            }
            return this.backface.fetchCategoryLabelHis(param);
        };
        // 获取标签的日志列表
        // 获取标签的日志列表
        /**
         * @param {?} param
         * @return {?}
         */
        LabelMockBackfaceService.prototype.fetchLabelHisList = 
        // 获取标签的日志列表
        /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            if (this.isAdd) {
                return rxjs.of([]);
            }
            return this.backface.fetchLabelHisList(param);
        };
        // 根据时间获取label的内容
        // 根据时间获取label的内容
        /**
         * @param {?} param
         * @return {?}
         */
        LabelMockBackfaceService.prototype.fetchLabelHis = 
        // 根据时间获取label的内容
        /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            return this.backface.fetchLabelHis(param);
        };
        /**
         * @param {?} param
         * @return {?}
         */
        LabelMockBackfaceService.prototype.addLabel = /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            /** @type {?} */
            var c = this.recordViewData.labelCategories.find((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.ID === param.CategoryID; }));
            c.Labels = c.Labels || [];
            if (c.Labels.find((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.Name === param.Name; }))) {
                return rxjs.throwError('重复的名称');
            }
            /** @type {?} */
            var lbl = (/** @type {?} */ ({
                CategoryID: param.CategoryID,
                ID: newID(),
                Name: param.Name,
                LastWriteTime: new Date(),
                LastWriteUser: this.curr.data.UserName,
                Conts: param.Conts,
                PlainText: param.PlainText
            }));
            c.Labels.push(lbl);
            c.Labels.forEach((/**
             * @param {?} v
             * @param {?} i
             * @return {?}
             */
            function (v, i) { return (v.Position = i + 1); }));
            return rxjs.of(lbl);
        };
        /**
         * @param {?} param
         * @return {?}
         */
        LabelMockBackfaceService.prototype.removeLabel = /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            /** @type {?} */
            var lbls = this.recordViewData.labelCategories.find((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.ID === param.CategoryID; })).Labels;
            lbls.splice(lbls.findIndex((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.ID === param.ID; })), 1);
            return rxjs.of(true);
        };
        /**
         * @param {?} param
         * @return {?}
         */
        LabelMockBackfaceService.prototype.nodeToString = /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            return this.backface.nodeToString(param);
        };
        /**
         * @param {?} param
         * @return {?}
         */
        LabelMockBackfaceService.prototype.stringToNode = /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            return this.backface.stringToNode(param);
        };
        /**
         * @param {?} param
         * @return {?}
         */
        LabelMockBackfaceService.prototype.setLabelPosition = /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            /** @type {?} */
            var lbls = this.recordViewData.labelCategories.find((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.ID === param.CategoryID; })).Labels;
            dragDrop.moveItemInArray(lbls, lbls.findIndex((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.ID === param.ID; })), param.Position - 1);
            lbls.forEach((/**
             * @param {?} v
             * @param {?} i
             * @return {?}
             */
            function (v, i) { return (v.Position = i + 1); }));
            return rxjs.of(lbls.map((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return ({ ID: v.ID, Position: v.Position }); })));
        };
        /**
         * @param {?} param
         * @return {?}
         */
        LabelMockBackfaceService.prototype.updateLabel = /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            /** @type {?} */
            var lbl = this.recordViewData.labelCategories
                .find((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.ID === param.CategoryID; }))
                .Labels.find((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.ID === param.ID; }));
            lbl.Name = param.Name;
            lbl.Conts = param.Conts;
            lbl.PlainText = param.PlainText;
            lbl.LastWriteTime = new Date();
            return rxjs.of(lbl);
        };
        /**
         * @param {?} param
         * @return {?}
         */
        LabelMockBackfaceService.prototype.fetchLabel = /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            return rxjs.of(this.recordViewData.labelCategories.find((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.ID === param.CategoryID; })).Labels.find((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.ID === param.ID; })));
        };
        LabelMockBackfaceService.decorators = [
            { type: core.Injectable }
        ];
        /** @nocollapse */
        LabelMockBackfaceService.ctorParameters = function () { return [
            { type: EleViewBackFaceService },
            { type: dbwebCore.CurrentService }
        ]; };
        return LabelMockBackfaceService;
    }());
    if (false) {
        /** @type {?} */
        LabelMockBackfaceService.prototype.isAdd;
        /** @type {?} */
        LabelMockBackfaceService.prototype.recordViewData;
        /**
         * @type {?}
         * @private
         */
        LabelMockBackfaceService.prototype.backface;
        /**
         * @type {?}
         * @private
         */
        LabelMockBackfaceService.prototype.curr;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var SetPropertyRecordviewComponent = /** @class */ (function () {
        function SetPropertyRecordviewComponent(elementSvr, backface) {
            this.elementSvr = elementSvr;
            this.backface = backface;
            this.hostClass = true;
            this.ownerByEle = OwnerByEnum.ownerByEle;
            this.ownerElement = ownerElement;
            this.svr = (/** @type {?} */ (this.elementSvr.data.recordview));
            this.backface.isAdd = this.elementSvr.bill.isAdd();
            this.backface.recordViewData = this.svr;
        }
        /**
         * @return {?}
         */
        SetPropertyRecordviewComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            this.svr.init();
        };
        /**
         * @param {?} event
         * @return {?}
         */
        SetPropertyRecordviewComponent.prototype.viewModify = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            this.svr.Params.Columns = event;
        };
        SetPropertyRecordviewComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-set-property-recordview',
                        template: "<div class=\"\u5C5E\u6027\u6837\u5F0F\" [ngSwitch]=\"elementSvr.ActiveTab\">\r\n\t<common-params-recordview-fetch-sql *ngSwitchCase=\"'\u53D6\u6570SQL'\"> </common-params-recordview-fetch-sql>\r\n\t<common-view-define\r\n\t\t#viewDefine\r\n\t\t*ngSwitchCase=\"'\u9ED8\u8BA4\u663E\u793A\u5217'\"\r\n\t\t[AllColumns]=\"svr.allColumnNames\"\r\n\t\t[SelectedColumns]=\"svr.Params.Columns\"\r\n\t\t(ModifyEvent)=\"viewModify($event)\"\r\n\t></common-view-define>\r\n\t<common-conditional-template *ngSwitchCase=\"'\u6761\u4EF6\u6A21\u677F'\"> </common-conditional-template>\r\n\t<common-processing-lists *ngSwitchCase=\"'\u5904\u7406\u5217\u8868'\"> </common-processing-lists>\r\n\t<div class=\"\u6807\u7B7E\u754C\u9762\" *ngSwitchCase=\"'\u6807\u7B7E'\">\r\n\t\t<common-label-manager\r\n\t\t\t[eleName]=\"elementSvr.bill.typeRecord['Name']\"\r\n\t\t\t[ownerBy]=\"ownerByEle\"\r\n\t\t\t[owner]=\"ownerElement\"\r\n\t\t\t[backface]=\"backface\"\r\n\t\t\t[title]=\"'\u7F3A\u7701'\"\r\n\t\t\t[allColumnsWithLetter]=\"svr.allColumnWithLetter\"\r\n\t\t\t[hasClose]=\"false\"\r\n\t\t>\r\n\t\t</common-label-manager>\r\n\t</div>\r\n</div>\r\n",
                        providers: [LabelMockBackfaceService],
                        styles: ["@charset \"UTF-8\";:host{width:100%;display:block}.\u5C5E\u6027\u6837\u5F0F{width:100%;height:100%;box-sizing:border-box}.\u5C5E\u6027\u6837\u5F0F .\u6807\u7B7E\u754C\u9762{width:100%;height:100%;padding:0 40px;box-sizing:border-box}"]
                    }] }
        ];
        /** @nocollapse */
        SetPropertyRecordviewComponent.ctorParameters = function () { return [
            { type: ElementService },
            { type: LabelMockBackfaceService }
        ]; };
        SetPropertyRecordviewComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.set-property-recordview',] }],
            viewDefine: [{ type: core.ViewChild, args: ['viewDefine', { static: false },] }]
        };
        return SetPropertyRecordviewComponent;
    }());
    if (false) {
        /** @type {?} */
        SetPropertyRecordviewComponent.prototype.hostClass;
        /** @type {?} */
        SetPropertyRecordviewComponent.prototype.viewDefine;
        /** @type {?} */
        SetPropertyRecordviewComponent.prototype.ownerByEle;
        /** @type {?} */
        SetPropertyRecordviewComponent.prototype.ownerElement;
        /** @type {?} */
        SetPropertyRecordviewComponent.prototype.svr;
        /** @type {?} */
        SetPropertyRecordviewComponent.prototype.elementSvr;
        /** @type {?} */
        SetPropertyRecordviewComponent.prototype.backface;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ParamsRecordviewFetchSQLComponent = /** @class */ (function () {
        function ParamsRecordviewFetchSQLComponent(elementSvr, theme) {
            this.elementSvr = elementSvr;
            this.theme = theme;
            this.hostClass = true;
            this.svr = (/** @type {?} */ (this.elementSvr.data.recordview));
            this.options = { maxLines: 12, printMargin: false };
            this.dataColumns = true;
            this.startCheck = false;
            this.messageShow = false;
        }
        /**
         * @return {?}
         */
        ParamsRecordviewFetchSQLComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            ace.config.set('basePath', '/front/assets/ace-builds/src-min-noconflict');
        };
        /**
         * @return {?}
         */
        ParamsRecordviewFetchSQLComponent.prototype.genSQL = /**
         * @return {?}
         */
        function () {
            this.svr.Params.Sql = "<<if eq \"oci8\" .Driver>>\n\t\t<<if ge .Limit 0>>\n\t\tSELECT * FROM(\n\t\t<<end>>\n\t\t\tSELECT <<if .Columns>><<.Columns>><<else>>*<<end>>\n\t\t\tFROM " + this.svr.Params.TableName + "\n\t\t\t<<if .Where>>WHERE <<.Where>><<end>>\n\t\t\t<<if .OrderBy>>ORDER BY <<.OrderBy>><<end>>\n\t\t<<if ge .Limit 0>>\n\t\t)WHERE ROWNUM<=<<.Limit>>\n\t\t<<end>>\n\t<<else>>\n\t\tSELECT <<if .Columns>><<.Columns>><<else>>*<<end>>\n\t\tFROM  " + this.svr.Params.TableName + "\n\t\t<<if .Where>>WHERE <<.Where>><<end>>\n\t\t<<if .OrderBy>>ORDER BY <<.OrderBy>><<end>>\n\t\t<<if ge .Limit 0>>LIMIT <<.Limit>><<end>>\n\t<<end>>";
        };
        /**
         * @return {?}
         */
        ParamsRecordviewFetchSQLComponent.prototype.rebuildColumns = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.elementSvr.back
                .checkSQL({
                DB: this.svr.Params.DB,
                Table: this.svr.Params.TableName,
                ManualPage: this.svr.Params.ManualPage,
                SQL: this.svr.Params.Sql
            })
                .subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.svr.SQLCheckError = v.Error;
                if (!_this.svr.SQLCheckError) {
                    _this.svr.Params.AllColumns = v.Columns;
                }
            }));
        };
        /**
         * @param {?} event
         * @return {?}
         */
        ParamsRecordviewFetchSQLComponent.prototype.drop = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            var _this = this;
            dragDrop.moveItemInArray(this.svr.Params.AllColumns, event.previousIndex, event.currentIndex);
            /** @type {?} */
            var FieldChange = [];
            this.svr.Params.AllColumns.forEach((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                if (_this.svr.Params.UniqueField.includes(v.Name)) {
                    FieldChange.push(v.Name);
                }
            }));
            this.svr.Params.UniqueField = FieldChange;
        };
        /**
         * @return {?}
         */
        ParamsRecordviewFetchSQLComponent.prototype.checkSQL = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.startCheck = true;
            this.svr.checkSQL().subscribe((/**
             * @return {?}
             */
            function () {
                _this.startCheck = false;
                _this.messageShow = true;
            }));
        };
        ParamsRecordviewFetchSQLComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-params-recordview-fetch-sql',
                        template: "<div class=\"\u53D6\u6570SQl\">\r\n\t<div class=\"\u4E00\u7EA7\u6807\u9898 \u5B57\u4F53\u989C\u8272\">\u53D6\u6570SQL</div>\r\n\t<div class=\"\u6570\u636E\u5E93\">\r\n\t\t<div class=\"\u4E8C\u7EA7\u6807\u9898\">\u6570\u636E\u5E93</div>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<mat-select [(ngModel)]=\"svr.Params.DB\"\r\n\t\t\t\t(valueChange)=\"svr.refreshTables()\">\r\n\t\t\t\t<mat-option [value]=\"\"> (\u5F53\u524D\u6570\u636E\u5E93) </mat-option>\r\n\t\t\t\t<mat-option *ngFor=\"let db of svr.DBList\" [value]=\"db\">\r\n\t\t\t\t\t{{ db }}\r\n\t\t\t\t</mat-option>\r\n\t\t\t</mat-select>\r\n\t\t</mat-form-field>\r\n\t</div>\r\n\t<div class=\"\u8868\">\r\n\t\t<div class=\"\u4E8C\u7EA7\u6807\u9898\">\u8868</div>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<mat-select [(ngModel)]=\"svr.Params.TableName\"\r\n\t\t\t\t(selectionChange)=\"checkSQL()\">\r\n\t\t\t\t<mat-option [value]=\"\">(\u7A7A) </mat-option>\r\n\t\t\t\t<mat-option *ngFor=\"let tab of svr.Tables\"\r\n\t\t\t\t\t[value]=\"tab|uppercase\">\r\n\t\t\t\t\t{{ tab|uppercase }}\r\n\t\t\t\t</mat-option>\r\n\t\t\t</mat-select>\r\n\t\t</mat-form-field>\r\n\t</div>\r\n\t<div class=\"\u4E8C\u7EA7\u6807\u9898\">\u4E3B\u952E</div>\r\n\t<mat-form-field appearance=\"outline\">\r\n\t\t<mat-select [(ngModel)]=\"svr.Params.UniqueField\" multiple>\r\n\t\t\t<div cdkDropList (cdkDropListDropped)=\"drop($event)\">\r\n\t\t\t\t<span *ngFor=\"let col of svr.Params.AllColumns\" cdkDrag>\r\n\t\t\t\t\t<mat-option [value]=\"col.Name\">\r\n\t\t\t\t\t\t{{ col.Name }}\r\n\t\t\t\t\t</mat-option>\r\n\t\t\t\t</span>\r\n\t\t\t</div>\r\n\t\t</mat-select>\r\n\t</mat-form-field>\r\n\t<div class=\"SQL\u8BBE\u7F6E\">\r\n\t\t<div class=\"SQL\u8BBE\u7F6E-\u6807\u9898 \u5B57\u4F53\u989C\u8272\">\r\n\t\t\t<span>SQL</span>\r\n\t\t\t<button class=\"\u6D6E\u52A8 \u751F\u6210SQL\" mat-raised-button\r\n\t\t\t\t(click)=\"genSQL()\">\u751F\u6210SQL</button>\r\n\t\t\t<mat-checkbox class=\"\u6D6E\u52A8\" [(ngModel)]=\"svr.Params.ManualPage\">\u624B\u5DE5\u5206\u9875\r\n\t\t\t</mat-checkbox>\r\n\t\t</div>\r\n\t\t<div class=\" SQL\u8BBE\u7F6E-\u5185\u5BB9 SQL\u8BBE\u7F6E-\u8FB9\u6846\">\r\n\t\t\t<div ace-editor [(text)]=\"svr.Params.Sql\" mode=\"sql\"\r\n\t\t\t\t[theme]=\"(theme.theme|async).model==='dark'?'tomorrow_night': 'eclipse'\"\r\n\t\t\t\t[options]=\"options\" [autoUpdateContent]=\"true\"\r\n\t\t\t\t[durationBeforeCallback]=\"1000\"\r\n\t\t\t\tstyle=\"min-height: 192px; width:100%; overflow: auto;\"></div>\r\n\t\t</div>\r\n\t\t<div class=\"check-toolbar\">\r\n\t\t\t<button class=\"\u9A8C\u8BC1SQL\" mat-stroked-button [disabled]=\"startCheck\"\r\n\t\t\t\t(click)=\"checkSQL()\">\r\n\t\t\t\t\u9A8C\u8BC1SQL\r\n\t\t\t</button>\r\n\t\t\t<div *ngIf=\"dataColumns\" class=\"\u6570\u636E\u5217\">\r\n\t\t\t\t<span class=\"\u663E\u793A\u6570\u636E\u5217\u6309\u94AE\" (click)=\"dataColumns = !dataColumns\">\r\n\t\t\t\t\t\u7ED3\u679C\u53CA\u6570\u636E\u5217\r\n\t\t\t\t\t<mat-icon svgIcon=\"expand_more\"></mat-icon>\r\n\t\t\t\t</span>\r\n\t\t\t</div>\r\n\t\t\t<div *ngIf=\"!dataColumns\" class=\"\u6570\u636E\u5217\">\r\n\t\t\t\t<button class=\"\u91CD\u7F6E\" mat-button (click)=\"rebuildColumns()\">\r\n\t\t\t\t\t\u590D\u4F4D\r\n\t\t\t\t</button>\r\n\t\t\t\t<span class=\"\u663E\u793A\u6570\u636E\u5217\u6309\u94AE\" (click)=\"dataColumns = !dataColumns\">\r\n\t\t\t\t\t\u6536\u8D77\r\n\t\t\t\t\t<mat-icon svgIcon=\"expand_less\"></mat-icon>\r\n\t\t\t\t</span>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div *ngIf=\"!dataColumns\" class=\"\u4E3B\u952E\">\r\n\t\t\t<div class=\"\u4E3B\u952E\u7C7B\u578B\" *ngFor=\"let col of svr.Params.AllColumns\">\r\n\t\t\t\t<div class=\"\u4E8C\u7EA7\u6807\u9898 \u4E3B\u952E\u6807\u9898\">{{ col.Name }}</div>\r\n\t\t\t\t<mat-form-field class=\"\u9009\u62E9\u7C7B\u578B \u5B57\u4F53\u989C\u8272\" appearance=\"outline\">\r\n\t\t\t\t\t<mat-select [(ngModel)]=\"col.Type\">\r\n\t\t\t\t\t\t<mat-option value=\"STR\">\u5B57\u7B26\u4E32</mat-option>\r\n\t\t\t\t\t\t<mat-option value=\"FLOAT\">\u6570\u503C</mat-option>\r\n\t\t\t\t\t\t<mat-option value=\"INT\">\u6574\u578B</mat-option>\r\n\t\t\t\t\t\t<mat-option value=\"DATE\">\u65E5\u671F</mat-option>\r\n\t\t\t\t\t\t<mat-option value=\"BYTEA\">\u4E8C\u8FDB\u5236</mat-option>\r\n\t\t\t\t\t</mat-select>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<ng-template #noError>\r\n\t\t\t<div *ngIf=\"messageShow\" class=\"\u6821\u9A8C\u6210\u529F\">\r\n\t\t\t\t<span>\r\n\t\t\t\t\t<mat-icon svgIcon=\"check_circle\"></mat-icon>SQL\u6821\u9A8C\u6210\u529F\r\n\t\t\t\t</span>\r\n\t\t\t\t<mat-icon class=\"\u5220\u9664\" svgIcon=\"cancel\"\r\n\t\t\t\t\t(click)=\"messageShow=false\"></mat-icon>\r\n\t\t\t</div>\r\n\t\t</ng-template>\r\n\t\t<div *ngIf=\"svr.SQLCheckError && messageShow;else noError\"\r\n\t\t\tclass=\"SQL\u8BBE\u7F6E-\u68C0\u9A8C\u5185\u5BB9 SQL\u8BBE\u7F6E-\u80CC\u666F\">\r\n\t\t\t<div class=\"\u6821\u9A8C\u5931\u8D25\">\r\n\t\t\t\t<mat-icon svgIcon=\"warning\"></mat-icon>\u4EE3\u7801\u62A5\u9519\uFF1A\r\n\t\t\t\t<mat-icon class=\"\u5220\u9664\" svgIcon=\"cancel\"\r\n\t\t\t\t\t(click)=\"messageShow=false\"></mat-icon>\r\n\t\t\t</div>\r\n\t\t\t<pre>\r\n\t\t\t{{ svr.SQLCheckError }}\r\n\t\t\t</pre>\r\n\t\t</div>\r\n\t</div>\r\n</div>",
                        styles: ["@charset \"UTF-8\";.\u53D6\u6570SQl{max-width:808px;height:100%;padding:24px 24px 24px 48px;overflow-y:auto;box-sizing:border-box}.\u53D6\u6570SQl .\u6570\u636E\u5E93{display:inline-block;margin-right:48px}.\u53D6\u6570SQl .\u8868{display:inline-block}.\u53D6\u6570SQl .\u91CD\u7F6E{min-width:56px;height:24px;line-height:24px;color:#fff;font-size:12px}.\u53D6\u6570SQl ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:10px}.\u53D6\u6570SQl ::ng-deep .mat-form-field-infix{border:0;padding:8px 0}.\u53D6\u6570SQl ::ng-deep .mat-select-arrow-wrapper{display:block}.\u53D6\u6570SQl .mat-form-field{width:340px;font-size:14px}.\u53D6\u6570SQl .SQL\u8BBE\u7F6E-\u6807\u9898{height:48px;line-height:48px;font-size:14px}.\u53D6\u6570SQl .\u751F\u6210SQL{color:#fff;margin:6px 0 6px 16px}.\u53D6\u6570SQl .\u9A8C\u8BC1SQL{margin:16px 0}.\u53D6\u6570SQl .SQL\u8BBE\u7F6E-\u5185\u5BB9{height:192px;border-radius:4px;box-sizing:border-box;vertical-align:top;overflow:hidden}.\u53D6\u6570SQl .SQL\u8BBE\u7F6E-\u68C0\u9A8C\u5185\u5BB9{border-radius:4px;padding:8px;box-sizing:border-box;overflow:auto;font-size:12px}.\u53D6\u6570SQl .\u6821\u9A8C\u6210\u529F{height:36px;line-height:20px;border-radius:4px;padding:8px;box-sizing:border-box;font-size:14px;font-weight:700;background-color:rgba(126,211,33,.1);color:#7ed321}.\u53D6\u6570SQl .\u6821\u9A8C\u6210\u529F .mat-icon{width:16px;height:16px;line-height:16px;vertical-align:middle;margin:2px 8px 2px 0}.\u53D6\u6570SQl .\u6821\u9A8C\u6210\u529F .\u5220\u9664{float:right;margin:2px 8px 2px 0}.\u53D6\u6570SQl .\u6821\u9A8C\u5931\u8D25{height:36px;line-height:20px;padding:0 0 8px 16px;box-sizing:border-box;font-size:14px;font-weight:700}.\u53D6\u6570SQl .\u6821\u9A8C\u5931\u8D25 .mat-icon{width:16px;height:16px;line-height:16px;vertical-align:middle;margin:2px 8px 2px 0}.\u53D6\u6570SQl .\u6821\u9A8C\u5931\u8D25 .\u5220\u9664{float:right;margin:2px 0}.\u53D6\u6570SQl .\u6570\u636E\u5217{height:32px;line-height:32px;font-size:14px;margin:18px 0}.\u53D6\u6570SQl .\u6570\u636E\u5217 .mat-icon{width:24px;height:24px;line-height:24px;vertical-align:middle}.\u53D6\u6570SQl .\u6570\u636E\u5217 .\u663E\u793A\u6570\u636E\u5217\u6309\u94AE{cursor:pointer}.\u53D6\u6570SQl .\u6D6E\u52A8{float:right;font-size:14px}.\u53D6\u6570SQl .\u4E3B\u952E{width:100%;display:flex;flex-wrap:wrap;justify-content:flex-start}.\u53D6\u6570SQl .\u4E3B\u952E .\u4E3B\u952E\u7C7B\u578B{margin-right:20px;margin-bottom:14px;position:relative}.\u53D6\u6570SQl .\u4E3B\u952E .\u4E3B\u952E\u7C7B\u578B .\u9009\u62E9{position:absolute;left:0;bottom:15px}.\u53D6\u6570SQl .\u4E3B\u952E .\u9009\u62E9\u7C7B\u578B{width:140px;font-size:14px}.\u53D6\u6570SQl .\u4E3B\u952E .\u4E3B\u952E\u6807\u9898{font-weight:700}.check-toolbar{display:flex;justify-content:space-between}.\u4E00\u7EA7\u6807\u9898{font-size:16px;font-weight:700;margin-bottom:16px}.\u4E8C\u7EA7\u6807\u9898{font-size:12px;margin-bottom:8px}"]
                    }] }
        ];
        /** @nocollapse */
        ParamsRecordviewFetchSQLComponent.ctorParameters = function () { return [
            { type: ElementService },
            { type: ThemeService }
        ]; };
        ParamsRecordviewFetchSQLComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.recordview-fetchSQL',] }]
        };
        return ParamsRecordviewFetchSQLComponent;
    }());
    if (false) {
        /** @type {?} */
        ParamsRecordviewFetchSQLComponent.prototype.hostClass;
        /** @type {?} */
        ParamsRecordviewFetchSQLComponent.prototype.svr;
        /** @type {?} */
        ParamsRecordviewFetchSQLComponent.prototype.options;
        /** @type {?} */
        ParamsRecordviewFetchSQLComponent.prototype.dataColumns;
        /** @type {?} */
        ParamsRecordviewFetchSQLComponent.prototype.startCheck;
        /** @type {?} */
        ParamsRecordviewFetchSQLComponent.prototype.messageShow;
        /** @type {?} */
        ParamsRecordviewFetchSQLComponent.prototype.elementSvr;
        /** @type {?} */
        ParamsRecordviewFetchSQLComponent.prototype.theme;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var SetPropertyImportComponent = /** @class */ (function () {
        function SetPropertyImportComponent(elementSvr) {
            this.elementSvr = elementSvr;
            this.hostClass = true;
            this.svr = (/** @type {?} */ (this.elementSvr.data.import));
        }
        /**
         * @return {?}
         */
        SetPropertyImportComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        SetPropertyImportComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-set-property-import',
                        template: "\r\n<div [ngSwitch]=\"elementSvr.ActiveTab\">\r\n\t<common-import-field *ngSwitchCase=\"'\u5B57\u6BB5\u8BBE\u7F6E'\"></common-import-field>\r\n\t\r\n\t<common-import-set *ngSwitchCase=\"'\u5C5E\u6027'\"></common-import-set>\r\n</div>\r\n",
                        styles: [":host{width:100%;height:100%;padding:24px 24px 24px 48px;overflow-y:auto;box-sizing:border-box}"]
                    }] }
        ];
        /** @nocollapse */
        SetPropertyImportComponent.ctorParameters = function () { return [
            { type: ElementService }
        ]; };
        SetPropertyImportComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.set-property-import',] }]
        };
        return SetPropertyImportComponent;
    }());
    if (false) {
        /** @type {?} */
        SetPropertyImportComponent.prototype.hostClass;
        /** @type {?} */
        SetPropertyImportComponent.prototype.svr;
        /** @type {?} */
        SetPropertyImportComponent.prototype.elementSvr;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ProcessingListsComponent = /** @class */ (function () {
        function ProcessingListsComponent(elementSvr, eles, dialog) {
            this.elementSvr = elementSvr;
            this.eles = eles;
            this.dialog = dialog;
            this.hostClass = true;
            this.svr = (/** @type {?} */ (this.elementSvr.data.recordview));
            this.ctrlElementName = new forms.FormControl();
            this.subs = [];
        }
        /**
         * @return {?}
         */
        ProcessingListsComponent.prototype.ngOnDestroy = /**
         * @return {?}
         */
        function () {
            this.subs.forEach((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.unsubscribe(); }));
        };
        /**
         * @return {?}
         */
        ProcessingListsComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.subs.push(this.svr.currentProcess.subscribe((/**
             * @param {?} pro
             * @return {?}
             */
            function (pro) { return _this.ctrlElementName.patchValue(pro ? pro.ElementName : null); })), this.svr.inited.subscribe((/**
             * @return {?}
             */
            function () {
                _this.subs.push(_this.ctrlElementName.valueChanges.pipe(operators.startWith('')).subscribe((/**
                 * @param {?} val
                 * @return {?}
                 */
                function (val) {
                    _this.filterElemets = _this.svr.allElementNames
                        .filter((/**
                     * @param {?} v
                     * @return {?}
                     */
                    function (v) { return v.includes(val); }))
                        .sort((/**
                     * @param {?} a
                     * @param {?} b
                     * @return {?}
                     */
                    function (a, b) { return a.localeCompare(b); }));
                })), _this.ctrlElementName.valueChanges.subscribe((/**
                 * @param {?} val
                 * @return {?}
                 */
                function (val) {
                    if (_this.svr.currentProcess.value) {
                        _this.svr.currentProcess.value.ElementName = val;
                    }
                })));
            })));
        };
        /**
         * @param {?} event
         * @return {?}
         */
        ProcessingListsComponent.prototype.dropBind = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            dragDrop.moveItemInArray(this.svr.bindRecordProcesses, event.previousIndex, event.currentIndex);
            this.svr.collectionProcesses();
        };
        /**
         * @param {?} event
         * @return {?}
         */
        ProcessingListsComponent.prototype.dropNotBind = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            dragDrop.moveItemInArray(this.svr.notBindRecordProcesses, event.previousIndex, event.currentIndex);
            this.svr.collectionProcesses();
        };
        /**
         * @param {?} pro
         * @return {?}
         */
        ProcessingListsComponent.prototype.selectProcess = /**
         * @param {?} pro
         * @return {?}
         */
        function (pro) {
            this.svr.currentProcess.next(pro);
        };
        /**
         * @return {?}
         */
        ProcessingListsComponent.prototype.add = /**
         * @return {?}
         */
        function () {
            /** @type {?} */
            var pro = this.svr.currentProcess.value;
            if (pro && pro.BindRecord) {
                this.svr.bindRecordProcesses = this.svr.bindRecordProcesses || [];
                this.svr.bindRecordProcesses.push({
                    Name: '新的处理',
                    BindRecord: true
                });
            }
            else {
                this.svr.notBindRecordProcesses = this.svr.notBindRecordProcesses || [];
                this.svr.notBindRecordProcesses.push({
                    Name: '新的处理',
                    BindRecord: false
                });
            }
            this.svr.collectionProcesses();
        };
        /**
         * @return {?}
         */
        ProcessingListsComponent.prototype.delete = /**
         * @return {?}
         */
        function () {
            var _this = this;
            if (this.svr.currentProcess.value) {
                this.svr.Params.Processes.splice(this.svr.Params.Processes.findIndex((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) { return v === _this.svr.currentProcess.value; })), 1);
                if (this.svr.Params.Processes.length > 0) {
                    this.svr.currentProcess.next(this.svr.Params.Processes[0]);
                }
                this.svr.refreshProcesses();
            }
        };
        /**
         * @return {?}
         */
        ProcessingListsComponent.prototype.openIconDialog = /**
         * @return {?}
         */
        function () {
            /** @type {?} */
            var pro = this.svr.currentProcess.value;
            if (!pro) {
                return;
            }
            /** @type {?} */
            var v = { icon: pro.Icon, color: pro.Color };
            /** @type {?} */
            var dialogRef = this.dialog.open(IconSelectComponent, {
                width: '384px',
                height: '100%',
                data: v,
                position: {
                    top: '0px',
                    right: '0px'
                }
            });
            dialogRef.afterClosed().subscribe((/**
             * @param {?} result
             * @return {?}
             */
            function (result) {
                if (result) {
                    pro.Icon = result.icon;
                    pro.Color = result.color;
                }
            }));
        };
        ProcessingListsComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-processing-lists',
                        template: "<div class=\"content\">\r\n\t<div class=\"left\">\r\n\t\t<div class=\"title\">\r\n\t\t\t<div class=\"list-\u4E00\u7EA7\u6807\u9898 \u5B57\u4F53\u989C\u8272\">\u5904\u7406\u5217\u8868</div>\r\n\t\t\t<div class=\"\u65B0\u589E\" (click)=\"add()\">\r\n\t\t\t\t<mat-icon svgIcon=\"add\"></mat-icon>\r\n\t\t\t\t<span>\u65B0\u589E\u5904\u7406\u5217</span>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div class=\"\u8BB0\u5F55\u6807\u9898\">\u7ED1\u5B9A\u8BB0\u5F55</div>\r\n\t\t<div cdkDropList class=\"pro-list\"\r\n\t\t\t(cdkDropListDropped)=\"dropBind($event)\">\r\n\t\t\t<div *ngFor=\"let pro of svr.bindRecordProcesses\" class=\"process\"\r\n\t\t\t\t[class.\u9009\u4E2D]=\"(svr.currentProcess|async).Name == pro.Name\"\r\n\t\t\t\t(click)=\"selectProcess(pro)\" cdkDrag>\r\n\t\t\t\t<mat-icon class=\"\u62D6\u62FD\u56FE\u6807\" svgIcon=\"drag_indicator\" cdkDragHandle>\r\n\t\t\t\t</mat-icon>\r\n\t\t\t\t<mat-icon class=\"\u5904\u7406\u5217\u56FE\u6807\" [svgIcon]=\"pro.Icon\"\r\n\t\t\t\t\t[ngClass]=\"pro.Color\"></mat-icon>\r\n\t\t\t\t<span>{{ pro.Name }}</span>\r\n\t\t\t\t<mat-icon *ngIf=\"(svr.currentProcess|async).Name == pro.Name\"\r\n\t\t\t\t\tclass=\"\u53F3\u6307\u793A\u7BAD\u5934\" svgIcon=\"keyboard_arrow_right\"></mat-icon>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div class=\"\u8BB0\u5F55\u6807\u9898\">\u672A\u7ED1\u5B9A\u8BB0\u5F55</div>\r\n\t\t<div cdkDropList class=\"pro-list\"\r\n\t\t\t(cdkDropListDropped)=\"dropNotBind($event)\">\r\n\t\t\t<div class=\"process\" *ngFor=\"let pro of svr.notBindRecordProcesses\"\r\n\t\t\t\t[class.\u9009\u4E2D]=\"(svr.currentProcess|async)?.Name == pro.Name\"\r\n\t\t\t\t(click)=\"selectProcess(pro)\" cdkDrag>\r\n\t\t\t\t<mat-icon class=\"\u62D6\u62FD\u56FE\u6807\" svgIcon=\"drag_indicator\" cdkDragHandle>\r\n\t\t\t\t</mat-icon>\r\n\t\t\t\t<mat-icon class=\"\u5904\u7406\u5217\u56FE\u6807\" [svgIcon]=\"pro.Icon\"\r\n\t\t\t\t\t[ngClass]=\"pro.Color\"></mat-icon>\r\n\t\t\t\t<span>{{ pro.Name }}</span>\r\n\t\t\t\t<mat-icon *ngIf=\"(svr.currentProcess|async)?.Name == pro.Name\"\r\n\t\t\t\t\tclass=\"\u53F3\u6307\u793A\u7BAD\u5934\" svgIcon=\"keyboard_arrow_right\"></mat-icon>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class=\"right\" *ngIf=\"svr.currentProcess|async\">\r\n\t\t<div class=\"list-\u4E00\u7EA7\u6807\u9898 \u5B57\u4F53\u989C\u8272\">\u5C5E\u6027\u8BBE\u7F6E</div>\r\n\t\t<div class=\"\u5220\u9664\">\r\n\t\t\t<mat-icon svgIcon=\"outlined:delete\" (click)=\"delete()\"\r\n\t\t\t\t*ngIf=\"svr.currentProcess\"></mat-icon>\r\n\t\t</div>\r\n\t\t<div class=\"\u5217\u4FE1\u606F\">\r\n\t\t\t<div class=\"\u56FE\u6807 mat-elevation-z4\" (click)=\"openIconDialog()\">\r\n\t\t\t\t<mat-icon [svgIcon]=\"(svr.currentProcess|async).Icon\"\r\n\t\t\t\t\t[ngClass]=\"(svr.currentProcess|async).Color\"></mat-icon>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"\u540D\u79F0\">\r\n\t\t\t\t<div class=\"list-\u4E8C\u7EA7\u6807\u9898\">\u540D\u79F0</div>\r\n\t\t\t\t<mat-form-field class=\"\u9009\u62E9\u6846\" appearance=\"outline\">\r\n\t\t\t\t\t<input matInput [(ngModel)]=\"svr.currentProcess.value.Name\"/>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t</div>\r\n\t\t\t<mat-checkbox class=\"checkbox\"\r\n\t\t\t\t[(ngModel)]=\"svr.currentProcess.value.WithSql\">\r\n\t\t\t\t<span>\u4F20\u9001SQL</span>\r\n\t\t\t</mat-checkbox>\r\n\t\t\t<mat-checkbox class=\"checkbox\"\r\n\t\t\t\t[(ngModel)]=\"svr.currentProcess.value.BindRecord\"\r\n\t\t\t\t(change)=\"svr.refreshProcesses()\">\r\n\t\t\t\t<span>\u7ED1\u5B9A\u8BB0\u5F55</span>\r\n\t\t\t</mat-checkbox>\r\n\t\t</div>\r\n\t\t<div class=\"\u83DC\u5355\u9879\">\r\n\t\t\t<div class=\"list-\u4E8C\u7EA7\u6807\u9898\">\u83DC\u5355\u9879</div>\r\n\t\t\t<mat-form-field class=\"\u9009\u62E9\u6846\" appearance=\"outline\">\r\n\t\t\t\t<input matInput [formControl]=\"ctrlElementName\"\r\n\t\t\t\t\t[matAutocomplete]=\"autoElements\" />\r\n\t\t\t</mat-form-field>\r\n\t\t\t<mat-autocomplete #autoElements=\"matAutocomplete\">\r\n\t\t\t\t<mat-option *ngFor=\"let ele of filterElemets\"\r\n\t\t\t\t\t[value]=\"ele\"> {{ ele }}</mat-option>\r\n\t\t\t</mat-autocomplete>\r\n\t\t</div>\r\n\t\t<div class=\"\u4E3B\u952E\">\r\n\t\t\t<div class=\"list-\u4E8C\u7EA7\u6807\u9898\">\u4E3B\u952E</div>\r\n\t\t\t<mat-form-field class=\"\u9009\u62E9\u6846\" appearance=\"outline\">\r\n\t\t\t\t<mat-select [(ngModel)]=\"svr.currentProcess.value.TransPath\" multiple>\r\n\t\t\t\t\t<mat-option *ngFor=\"let col of svr.allColumnNames\"\r\n\t\t\t\t\t\t[value]=\"col\">{{ col }}</mat-option>\r\n\t\t\t\t</mat-select>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t\t<div class=\"\u53C2\u6570\">\r\n\t\t\t<div class=\"list-\u4E8C\u7EA7\u6807\u9898\">Query\u53C2\u6570</div>\r\n\t\t\t<mat-form-field class=\"\u9009\u62E9\u6846\" appearance=\"outline\">\r\n\t\t\t\t<textarea matInput\r\n\t\t\t\t\t[(ngModel)]=\"svr.currentProcess.value.TransQuery\"></textarea>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t\t<div class=\"\u53C2\u6570\">\r\n\t\t\t<div class=\"list-\u4E8C\u7EA7\u6807\u9898\">\u663E\u793A\u6761\u4EF6</div>\r\n\t\t\t<mat-form-field class=\"\u9009\u62E9\u6846\" appearance=\"outline\">\r\n\t\t\t\t<textarea matInput\r\n\t\t\t\t\t[(ngModel)]=\"svr.currentProcess.value.Visable\"></textarea>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t\t<div class=\"\u53C2\u6570\">\r\n\t\t\t<div class=\"list-\u4E8C\u7EA7\u6807\u9898\">MoreStr</div>\r\n\t\t\t<mat-form-field class=\"\u9009\u62E9\u6846\" appearance=\"outline\">\r\n\t\t\t\t<textarea matInput\r\n\t\t\t\t\t[(ngModel)]=\"svr.currentProcess.value.MoreStr\"></textarea>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t</div>\r\n</div>",
                        styles: ["@charset \"UTF-8\";:host{width:100%;height:100%}.content{height:100%;display:flex;padding:16px 0;box-sizing:border-box}.left{flex-grow:1;max-width:272px;min-width:172px;padding:8px;box-sizing:border-box;display:flex;flex-direction:column;overflow-y:auto}.left .title{display:flex;justify-content:space-between;margin-bottom:8px}.left .title .\u65B0\u589E{font-size:14px;cursor:pointer}.left .title .\u65B0\u589E span{display:inline-block;height:24px;line-height:24px;vertical-align:top}.left .\u8BB0\u5F55\u6807\u9898{font-size:14px;margin:16px 24px}.left .\u5904\u7406\u5217\u56FE\u6807{margin:8px 0;vertical-align:top}.process{height:40px;line-height:40px;font-size:14px;padding:0 24px;margin-bottom:8px;box-sizing:border-box;position:relative;cursor:pointer}.process span{vertical-align:top;margin-left:16px}.process .\u62D6\u62FD\u56FE\u6807{width:16px;height:16px;line-height:16px;position:absolute;left:0;top:12px;display:none}.process .\u53F3\u6307\u793A\u7BAD\u5934{position:absolute;right:0;top:8px}.process:hover{padding:0 24px 0 32px;box-shadow:0 2px 4px 0 rgba(0,0,0,.14)}.process:hover .\u62D6\u62FD\u56FE\u6807{display:block}.right{max-width:536px;flex-grow:2;height:100%;padding:8px 0 8px 8px;box-sizing:border-box;position:relative;display:flex;flex-wrap:wrap;align-content:flex-start;overflow-y:auto}.right ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:10px}.right ::ng-deep .mat-form-field-infix{border:0;padding:8px 0}.right ::ng-deep .mat-select-arrow-wrapper{display:block}.right .\u5217\u4FE1\u606F{width:100%;height:136px;padding:16px 0 24px 32px;box-sizing:border-box}.right .\u5217\u4FE1\u606F .\u56FE\u6807{display:inline-block;width:80px;height:80px;border-radius:4px;overflow:hidden;position:relative;cursor:pointer}.right .\u5217\u4FE1\u606F .\u56FE\u6807 .mat-icon{width:24px;height:24px;position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.right .\u5217\u4FE1\u606F .\u540D\u79F0{display:inline-block;width:200px;margin-left:16px;vertical-align:bottom}.right .\u5217\u4FE1\u606F .checkbox{float:right;margin-right:12px;font-size:14px}.right .\u5220\u9664{cursor:pointer;position:absolute;right:24px;top:8px}.right .\u9009\u62E9\u6846{font-size:14px}.right .\u4E3B\u952E,.right .\u83DC\u5355\u9879{width:216px;margin-left:32px}.right .\u4E3B\u952E .\u9009\u62E9\u6846,.right .\u83DC\u5355\u9879 .\u9009\u62E9\u6846{width:216px}.right .\u53C2\u6570{margin-left:32px}.right .\u53C2\u6570 .\u9009\u62E9\u6846{width:462px}.right .\u53C2\u6570 .\u9009\u62E9\u6846 .mat-form-field-autofill-control{height:144px;resize:none}.list-\u4E00\u7EA7\u6807\u9898{font-size:16px;font-weight:700;margin-bottom:16px}.list-\u4E8C\u7EA7\u6807\u9898{margin:4px 0;display:block;font-size:12px}"]
                    }] }
        ];
        /** @nocollapse */
        ProcessingListsComponent.ctorParameters = function () { return [
            { type: ElementService },
            { type: dbwebCore.ElementsService },
            { type: material.MatDialog }
        ]; };
        ProcessingListsComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.processing-lists',] }]
        };
        return ProcessingListsComponent;
    }());
    if (false) {
        /** @type {?} */
        ProcessingListsComponent.prototype.hostClass;
        /** @type {?} */
        ProcessingListsComponent.prototype.svr;
        /** @type {?} */
        ProcessingListsComponent.prototype.ctrlElementName;
        /** @type {?} */
        ProcessingListsComponent.prototype.filterElemets;
        /**
         * @type {?}
         * @private
         */
        ProcessingListsComponent.prototype.subs;
        /** @type {?} */
        ProcessingListsComponent.prototype.elementSvr;
        /** @type {?} */
        ProcessingListsComponent.prototype.eles;
        /** @type {?} */
        ProcessingListsComponent.prototype.dialog;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ViewDefineModule = /** @class */ (function () {
        function ViewDefineModule() {
        }
        ViewDefineModule.decorators = [
            { type: core.NgModule, args: [{
                        declarations: [ViewDefineComponent],
                        imports: [
                            common.CommonModule,
                            dragDrop.DragDropModule,
                            material.MatFormFieldModule,
                            material.MatInputModule,
                            material.MatButtonModule,
                            material.MatCheckboxModule,
                            material.MatSelectModule,
                            material.MatRadioModule,
                            material.MatIconModule,
                            material.MatTableModule
                        ],
                        exports: [ViewDefineComponent]
                    },] }
        ];
        return ViewDefineModule;
    }());

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var IconSelectModule = /** @class */ (function () {
        function IconSelectModule() {
        }
        IconSelectModule.decorators = [
            { type: core.NgModule, args: [{
                        declarations: [IconSelectComponent],
                        imports: [
                            common.CommonModule,
                            material.MatIconModule,
                            material.MatSlideToggleModule,
                            material.MatFormFieldModule,
                            material.MatSelectModule,
                            material.MatDialogModule,
                            material.MatButtonToggleModule,
                            material.MatButtonModule
                        ],
                        exports: [IconSelectComponent],
                        entryComponents: [IconSelectComponent]
                    },] }
        ];
        return IconSelectModule;
    }());

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ShowHistoryDialogComponent = /** @class */ (function () {
        function ShowHistoryDialogComponent(dialogRef, data) {
            this.dialogRef = dialogRef;
            this.data = data;
            this.hostClass = true;
        }
        /**
         * @return {?}
         */
        ShowHistoryDialogComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        /**
         * @return {?}
         */
        ShowHistoryDialogComponent.prototype.close = /**
         * @return {?}
         */
        function () {
            this.dialogRef.close();
        };
        ShowHistoryDialogComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-show-history-dialog',
                        template: "<div class=\"\u6240\u6709\u65E5\u5FD7\">\r\n\t<div class=\"\u65E5\u5FD7\" *ngFor=\"let his of data; let index = index\">\r\n\t\t<div class=\"\u65F6\u95F4\">{{ his.Day | date: 'yy-MM-dd' }}</div>\r\n\t\t<div class=\"\u5185\u5BB9\" *ngFor=\"let log of his.Logs\">\r\n\t\t\t<span class=\"\u64CD\u4F5C\">{{ log.Operate }}</span\r\n\t\t\t>{{ log.CategoryName }}; {{ log.LabelName }};\r\n\t\t\t{{ log.User }}\r\n\t\t</div>\r\n\t\t<mat-divider class=\"\u5206\u5272\u7EBF\" *ngIf=\"data && data.length !== index + 1\"></mat-divider>\r\n\t</div>\r\n</div>\r\n<mat-icon (click)=\"close()\" class=\"\u53D6\u6D88\u7BAD\u5934\" svgIcon=\"double_down\"></mat-icon>\r\n",
                        styles: ["@charset \"UTF-8\";:host{width:320px;display:block;box-sizing:border-box;position:relative}.\u6240\u6709\u65E5\u5FD7{width:100%;box-sizing:border-box;max-height:400px;overflow-y:auto}.\u53D6\u6D88\u7BAD\u5934{width:16px;height:16px;-webkit-transform:rotate(180deg);transform:rotate(180deg);position:absolute;right:-13px;top:-19px}.\u65E5\u5FD7{width:100%;margin:8px 0}.\u65E5\u5FD7 .\u65F6\u95F4{font-size:14px;margin-bottom:4px}.\u65E5\u5FD7 .\u5185\u5BB9{width:100%;margin:4px 0;font-size:12px}.\u65E5\u5FD7 .\u5185\u5BB9 .\u64CD\u4F5C{display:inline-block;margin-right:24px}.\u65E5\u5FD7 .\u5206\u5272\u7EBF{margin-top:8px}"]
                    }] }
        ];
        /** @nocollapse */
        ShowHistoryDialogComponent.ctorParameters = function () { return [
            { type: material.MatDialogRef },
            { type: Array, decorators: [{ type: core.Inject, args: [material.MAT_DIALOG_DATA,] }] }
        ]; };
        ShowHistoryDialogComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.show-history-dialog',] }]
        };
        return ShowHistoryDialogComponent;
    }());
    if (false) {
        /** @type {?} */
        ShowHistoryDialogComponent.prototype.hostClass;
        /** @type {?} */
        ShowHistoryDialogComponent.prototype.dialogRef;
        /** @type {?} */
        ShowHistoryDialogComponent.prototype.data;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ShowHistoryDialogModule = /** @class */ (function () {
        function ShowHistoryDialogModule() {
        }
        ShowHistoryDialogModule.decorators = [
            { type: core.NgModule, args: [{
                        declarations: [ShowHistoryDialogComponent],
                        imports: [common.CommonModule, material.MatIconModule, material.MatDividerModule],
                        entryComponents: [ShowHistoryDialogComponent],
                        exports: [ShowHistoryDialogComponent]
                    },] }
        ];
        return ShowHistoryDialogModule;
    }());

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /**
     * @record
     */
    function DialogData$2() { }
    if (false) {
        /** @type {?} */
        DialogData$2.prototype.name;
        /** @type {?} */
        DialogData$2.prototype.title;
    }
    var EditCategoryDialogComponent = /** @class */ (function () {
        function EditCategoryDialogComponent(dialogRef, data) {
            this.dialogRef = dialogRef;
            this.data = data;
            this.hostClass = true;
        }
        /**
         * @return {?}
         */
        EditCategoryDialogComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        /**
         * @return {?}
         */
        EditCategoryDialogComponent.prototype.cancel = /**
         * @return {?}
         */
        function () {
            this.dialogRef.close();
        };
        EditCategoryDialogComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-edit-category-dialog',
                        template: "<div class=\"\u6807\u9898\" mat-dialog-title>{{ data.title }}</div>\r\n<div class=\"\u8F93\u5165\" mat-dialog-content>\r\n\t<!-- <div class=\"\u6DFB\u52A0\u7C7B\u522B-\u6807\u9898\">\u8F93\u5165\u7C7B\u522B\u540D\u79F0</div> -->\r\n\t<mat-form-field>\r\n\t\t<input matInput [(ngModel)]=\"data.name\" maxlength=\"20\" cdkFocusInitial />\r\n\t\t<mat-hint>\u8F93\u5165\u4E0D\u80FD\u8D85\u8FC720\u4E2A\u5B57\u7B26</mat-hint>\r\n\t</mat-form-field>\r\n</div>\r\n<div class=\"\u529F\u80FD\u6309\u94AE\" mat-dialog-actions>\r\n\t<button mat-button (click)=\"cancel()\">\u53D6\u6D88</button>\r\n\t<button class=\"\u786E\u8BA4\u6309\u94AE\" mat-button [mat-dialog-close]=\"data\">\u786E\u5B9A</button>\r\n</div>\r\n",
                        styles: ["@charset \"UTF-8\";.\u6807\u9898{font-size:20px;font-weight:700;letter-spacing:.25px;text-align:left}.\u8F93\u5165{margin:16px 0;padding:0}.\u6DFB\u52A0\u7C7B\u522B-\u6807\u9898{font-size:14px;opacity:.6;margin:16px 0 0;font-weight:700}.mat-form-field{font-size:14px;width:100%}.mat-form-field ::ng-deep .mat-form-field-infix{border:0}.mat-radio-group{font-size:14px}.mat-dialog-title{margin:0}.\u529F\u80FD\u6309\u94AE{height:32px;float:right;font-size:16px}.\u529F\u80FD\u6309\u94AE .\u786E\u8BA4\u6309\u94AE{font-weight:700}"]
                    }] }
        ];
        /** @nocollapse */
        EditCategoryDialogComponent.ctorParameters = function () { return [
            { type: material.MatDialogRef },
            { type: undefined, decorators: [{ type: core.Inject, args: [material.MAT_DIALOG_DATA,] }] }
        ]; };
        EditCategoryDialogComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.edit-category-dialog',] }]
        };
        return EditCategoryDialogComponent;
    }());
    if (false) {
        /** @type {?} */
        EditCategoryDialogComponent.prototype.hostClass;
        /** @type {?} */
        EditCategoryDialogComponent.prototype.dialogRef;
        /** @type {?} */
        EditCategoryDialogComponent.prototype.data;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var Node = /** @class */ (function () {
        function Node() {
        }
        /**
         * @param {?} data
         * @return {?}
         */
        Node.fromInterface = /**
         * @param {?} data
         * @return {?}
         */
        function (data) {
            /** @type {?} */
            var rev = new Node();
            rev.NodeType = NodeTypeEnum.unknow;
            if (data) {
                rev.NodeType = data.NodeType;
                rev.Field = data.Field;
                rev.Operate = data.Operate;
                rev.Value = data.Value;
                rev.PlainText = data.PlainText;
                if (data.Children) {
                    rev.Children = data.Children.map((/**
                     * @param {?} v
                     * @return {?}
                     */
                    function (v) {
                        /** @type {?} */
                        var n = Node.fromInterface(v);
                        n.parent = rev;
                        return n;
                    }));
                }
            }
            return rev;
        };
        /**
         * @param {?} src
         * @return {?}
         */
        Node.prototype.assign = /**
         * @param {?} src
         * @return {?}
         */
        function (src) {
            var _this = this;
            this.NodeType = src.NodeType;
            this.Field = src.Field;
            this.Operate = src.Operate;
            this.Value = src.Value;
            this.PlainText = src.PlainText;
            if (src.Children) {
                this.Children = src.Children.map((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) {
                    /** @type {?} */
                    var rev = Node.fromInterface(v);
                    rev.parent = _this;
                    return rev;
                }));
            }
        };
        /**
         * @return {?}
         */
        Node.prototype.toInterface = /**
         * @return {?}
         */
        function () {
            // empty node
            if (this.NodeType === NodeTypeEnum.unknow) {
                return null;
            }
            /** @type {?} */
            var rev = {
                NodeType: this.NodeType,
                Field: this.Field,
                Operate: this.Operate,
                Value: this.Value,
                PlainText: this.PlainText
            };
            if (this.Children) {
                rev.Children = this.Children.map((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) { return v.toInterface(); }));
            }
            return rev;
        };
        /**
         * @param {?} index
         * @param {?} node
         * @return {?}
         */
        Node.prototype.insertChild = /**
         * @param {?} index
         * @param {?} node
         * @return {?}
         */
        function (index, node) {
            this.Children = this.Children || [];
            /** @type {?} */
            var n = Node.fromInterface(node);
            n.parent = this;
            if (index >= this.Children.length) {
                this.Children.push(n);
            }
            else {
                this.Children.splice(index, 0, n);
            }
        };
        /**
         * @param {?} node
         * @param {?} newNode
         * @return {?}
         */
        Node.prototype.replaceChild = /**
         * @param {?} node
         * @param {?} newNode
         * @return {?}
         */
        function (node, newNode) {
            newNode.parent = this;
            this.Children.splice(this.Children.findIndex((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v === node; })), 1, newNode);
        };
        // 添加兄弟,在当前节点之上
        // 添加兄弟,在当前节点之上
        /**
         * @param {?} node
         * @return {?}
         */
        Node.prototype.addTopSibling = 
        // 添加兄弟,在当前节点之上
        /**
         * @param {?} node
         * @return {?}
         */
        function (node) {
            var _this = this;
            if (!this.parent) {
                this.addChildSibling(node);
                return;
            }
            this.parent.insertChild(this.parent.Children.findIndex((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v === _this; })), node);
        };
        // 添加兄弟,在当前节点之下
        // 添加兄弟,在当前节点之下
        /**
         * @param {?} node
         * @return {?}
         */
        Node.prototype.addBottomSibling = 
        // 添加兄弟,在当前节点之下
        /**
         * @param {?} node
         * @return {?}
         */
        function (node) {
            var _this = this;
            if (!this.parent) {
                this.addChildSibling(node);
                return;
            }
            this.parent.insertChild(this.parent.Children.findIndex((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v === _this; })) + 1, node);
        };
        // 当前节点和该节点形成一个新的and节点,取代当前节点的位置
        // 当前节点和该节点形成一个新的and节点,取代当前节点的位置
        /**
         * @param {?} node
         * @return {?}
         */
        Node.prototype.addChildSibling = 
        // 当前节点和该节点形成一个新的and节点,取代当前节点的位置
        /**
         * @param {?} node
         * @return {?}
         */
        function (node) {
            if (this.parent) {
                /** @type {?} */
                var andNode = Node.fromInterface({ NodeType: NodeTypeEnum.NodeAnd });
                andNode.insertChild(0, node);
                this.parent.replaceChild(this, andNode);
                andNode.insertChild(0, this);
            }
            else {
                // 如果只有一个条件节点,则需要对内容进行替换,因为组件引用用到是指针
                /** @type {?} */
                var newThis = Node.fromInterface({
                    NodeType: this.NodeType,
                    Field: this.Field,
                    Operate: this.Operate,
                    Value: this.Value,
                    PlainText: this.PlainText
                });
                newThis.parent = this;
                this.NodeType = NodeTypeEnum.NodeAnd;
                this.Field = undefined;
                this.Operate = undefined;
                this.Value = undefined;
                this.PlainText = undefined;
                this.Children = [newThis];
                this.insertChild(1, node);
            }
        };
        // 返回扁平化后的总体高度,每个子节点算1
        // 返回扁平化后的总体高度,每个子节点算1
        /**
         * @return {?}
         */
        Node.prototype.flatHeight = 
        // 返回扁平化后的总体高度,每个子节点算1
        /**
         * @return {?}
         */
        function () {
            if (NodeTypeEnum.NodeCondition === this.NodeType || NodeTypeEnum.NodePlain === this.NodeType) {
                return 1;
            }
            /** @type {?} */
            var rev = 0;
            if (this.Children) {
                this.Children.forEach((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) { return (rev += v.flatHeight()); }));
            }
            return rev;
        };
        // 收集单节点,提升到上级
        // 收集单节点,提升到上级
        /**
         * @return {?}
         */
        Node.prototype.collection = 
        // 收集单节点,提升到上级
        /**
         * @return {?}
         */
        function () {
            if (!this.Children) {
                return;
            }
            if (this.Children.length === 1) {
                this.NodeType = this.Children[0].NodeType;
                this.Field = this.Children[0].Field;
                this.Operate = this.Children[0].Operate;
                this.Value = this.Children[0].Value;
                this.PlainText = this.Children[0].PlainText;
                this.Children = this.Children[0].Children;
                this.collection();
            }
            else {
                this.Children.forEach((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) { return v.collection(); }));
            }
        };
        /**
         * @return {?}
         */
        Node.prototype.findRoot = /**
         * @return {?}
         */
        function () {
            /** @type {?} */
            var find;
            for (find = this; find.parent; find = find.parent) { }
            return find;
        };
        /**
         * @param {?} node
         * @return {?}
         */
        Node.prototype.removeChild = /**
         * @param {?} node
         * @return {?}
         */
        function (node) {
            if (this.Children.length > 1) {
                this.Children.splice(this.Children.findIndex((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) { return v === node; })), 1);
                // root开始检查,提取到上级
                this.findRoot().collection();
            }
            else {
                if (this.parent) {
                    this.parent.removeChild(this);
                }
                else {
                    this.NodeType = NodeTypeEnum.unknow;
                    this.Field = undefined;
                    this.Operate = undefined;
                    this.Value = undefined;
                    this.PlainText = undefined;
                    this.Children = undefined;
                }
            }
        };
        /**
         * @return {?}
         */
        Node.prototype.remove = /**
         * @return {?}
         */
        function () {
            if (this.parent) {
                this.parent.removeChild(this);
            }
            else {
                this.NodeType = NodeTypeEnum.unknow;
                this.Field = undefined;
                this.Operate = undefined;
                this.Value = undefined;
                this.PlainText = undefined;
                this.Children = undefined;
            }
        };
        return Node;
    }());
    if (false) {
        /** @type {?} */
        Node.prototype.parent;
        /** @type {?} */
        Node.prototype.NodeType;
        /** @type {?} */
        Node.prototype.Field;
        /** @type {?} */
        Node.prototype.Operate;
        /** @type {?} */
        Node.prototype.Value;
        /** @type {?} */
        Node.prototype.Children;
        /** @type {?} */
        Node.prototype.PlainText;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var EditLabel = /** @class */ (function () {
        function EditLabel(svr, snackBar) {
            this.svr = svr;
            this.snackBar = snackBar;
            this.titleInput = true;
            this.isAdd = true;
            this.modify = false;
        }
        /**
         * @param {?} categoryID
         * @return {?}
         */
        EditLabel.prototype.add = /**
         * @param {?} categoryID
         * @return {?}
         */
        function (categoryID) {
            this.isAdd = true;
            this.titleInput = true;
            this.CategoryID = categoryID;
            this.Name = '新的标签';
            this.title = this.Name;
            this.Conts = Node.fromInterface({ NodeType: NodeTypeEnum.unknow });
        };
        /**
         * @return {?}
         */
        EditLabel.prototype.done = /**
         * @return {?}
         */
        function () {
            if (!this.title || this.title.length === 0) {
                alert('不能输入空的名称');
                return false;
            }
            if (!this.isAdd && this.title !== this.Name) {
                this.modify = true;
            }
            this.Name = this.title;
            this.titleInput = false;
            return true;
        };
        /**
         * @return {?}
         */
        EditLabel.prototype.edit = /**
         * @return {?}
         */
        function () {
            this.title = this.Name;
            this.titleInput = true;
        };
        /**
         * @return {?}
         */
        EditLabel.prototype.editCancel = /**
         * @return {?}
         */
        function () {
            this.titleInput = false;
        };
        /**
         * @private
         * @param {?} whereString
         * @return {?}
         */
        EditLabel.prototype.processSave = /**
         * @private
         * @param {?} whereString
         * @return {?}
         */
        function (whereString) {
            var _this = this;
            if (this.isAdd) {
                return this.svr.backface
                    .addLabel({
                    CategoryID: this.CategoryID,
                    Name: this.Name,
                    Conts: whereString,
                    PlainText: this.PlainText
                })
                    .pipe(operators.map((/**
                 * @param {?} lbl
                 * @return {?}
                 */
                function (lbl) {
                    /** @type {?} */
                    var rev = Label.fromInterface(lbl);
                    /** @type {?} */
                    var category = _this.svr.categorys.find((/**
                     * @param {?} v
                     * @return {?}
                     */
                    function (v) { return v.ID === lbl.CategoryID; }));
                    if (!category.Labels) {
                        category.Labels = [];
                    }
                    category.Labels.push(rev);
                    return true;
                })), operators.catchError((/**
                 * @param {?} err
                 * @param {?} caught
                 * @return {?}
                 */
                function (err, caught) {
                    if (err instanceof http.HttpErrorResponse) {
                        /** @type {?} */
                        var derr = dbwebCore.IsDuplicatePKError(err.error);
                        if (derr.Yes) {
                            _this.snackBar.open('名称重复', '关闭', { duration: 5000 });
                        }
                        else {
                            _this.snackBar.open(err.error, '关闭', { duration: 5000 });
                        }
                    }
                    else {
                        _this.snackBar.open(err, '关闭', { duration: 5000 });
                    }
                    return rxjs.of(false);
                })));
            }
            else {
                return this.svr.backface
                    .updateLabel({
                    CategoryID: this.CategoryID,
                    ID: this.LabelID,
                    Name: this.Name,
                    Conts: whereString,
                    PlainText: this.PlainText
                })
                    .pipe(operators.map((/**
                 * @param {?} lbl
                 * @return {?}
                 */
                function (lbl) {
                    /** @type {?} */
                    var rev = _this.svr.categorys
                        .find((/**
                     * @param {?} v
                     * @return {?}
                     */
                    function (v) { return v.ID === lbl.CategoryID; }))
                        .Labels.find((/**
                     * @param {?} vv
                     * @return {?}
                     */
                    function (vv) { return vv.ID === lbl.ID; }));
                    rev.Name = lbl.Name;
                    return true;
                })));
            }
        };
        /**
         * @return {?}
         */
        EditLabel.prototype.save = /**
         * @return {?}
         */
        function () {
            var _this = this;
            // 如果正在修改名称,则自动进行确认,如果确认失败,则退出处理
            if (this.titleInput) {
                if (!this.done()) {
                    return rxjs.of(false);
                }
            }
            /** @type {?} */
            var rev = new rxjs.Subject();
            // 转换node-->string
            if (this.Conts && this.Conts.NodeType !== NodeTypeEnum.unknow) {
                this.svr.backface.nodeToString(this.Conts.toInterface()).subscribe((/**
                 * @param {?} whereString
                 * @return {?}
                 */
                function (whereString) {
                    _this.processSave(whereString).subscribe((/**
                     * @param {?} v
                     * @return {?}
                     */
                    function (v) {
                        rev.next(v);
                    }));
                }));
            }
            else {
                return this.processSave('');
            }
            return rev;
        };
        return EditLabel;
    }());
    if (false) {
        /** @type {?} */
        EditLabel.prototype.CategoryID;
        /** @type {?} */
        EditLabel.prototype.LabelID;
        /** @type {?} */
        EditLabel.prototype.Name;
        /** @type {?} */
        EditLabel.prototype.Conts;
        /** @type {?} */
        EditLabel.prototype.PlainText;
        /** @type {?} */
        EditLabel.prototype.titleInput;
        /** @type {?} */
        EditLabel.prototype.isAdd;
        /** @type {?} */
        EditLabel.prototype.title;
        /** @type {?} */
        EditLabel.prototype.readonly;
        /** @type {?} */
        EditLabel.prototype.modify;
        /**
         * @type {?}
         * @private
         */
        EditLabel.prototype.svr;
        /**
         * @type {?}
         * @private
         */
        EditLabel.prototype.snackBar;
    }
    var LabelManagerService = /** @class */ (function () {
        function LabelManagerService(snackBar) {
            this.snackBar = snackBar;
            this.editLabel = new EditLabel(this, this.snackBar);
        }
        /**
         * @param {?} CategoryID
         * @param {?} LabelID
         * @return {?}
         */
        LabelManagerService.prototype.removeLabel = /**
         * @param {?} CategoryID
         * @param {?} LabelID
         * @return {?}
         */
        function (CategoryID, LabelID) {
            var _this = this;
            return this.backface.removeLabel({ CategoryID: CategoryID, ID: LabelID }).pipe(operators.tap((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                if (v) {
                    /** @type {?} */
                    var labels = _this.categorys.find((/**
                     * @param {?} vv
                     * @return {?}
                     */
                    function (vv) { return vv.ID === CategoryID; })).Labels;
                    labels.splice(labels.findIndex((/**
                     * @param {?} vv
                     * @return {?}
                     */
                    function (vv) { return vv.ID === LabelID; })), 1);
                }
            })));
        };
        /**
         * @param {?} id
         * @return {?}
         */
        LabelManagerService.prototype.removeCategory = /**
         * @param {?} id
         * @return {?}
         */
        function (id) {
            var _this = this;
            return this.backface.removeCategory(id).pipe(operators.tap((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                if (v) {
                    _this.categorys.splice(_this.categorys.findIndex((/**
                     * @param {?} vv
                     * @return {?}
                     */
                    function (vv) { return vv.ID === id; })), 1);
                    _this.categorys.forEach((/**
                     * @param {?} vv
                     * @param {?} idx
                     * @return {?}
                     */
                    function (vv, idx) { return (vv.Position = idx + 1); }));
                }
            })));
        };
        /**
         * @param {?} param
         * @return {?}
         */
        LabelManagerService.prototype.addCategory = /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            var _this = this;
            return this.backface
                .addCategory({
                EleName: this.eleName,
                Name: param.name,
                OwnerBy: this.ownerBy,
                BeforeAtID: param.beforeAtID
            })
                .pipe(operators.tap((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                // 调整位置并插入
                if (param.beforeAtID) {
                    /** @type {?} */
                    var idx = _this.categorys.findIndex((/**
                     * @param {?} vv
                     * @return {?}
                     */
                    function (vv) { return vv.ID === param.beforeAtID; }));
                    _this.categorys.splice(idx, 0, v);
                }
                else {
                    _this.categorys.push(v);
                }
                _this.categorys.forEach((/**
                 * @param {?} vv
                 * @param {?} idx
                 * @return {?}
                 */
                function (vv, idx) { return (vv.Position = idx + 1); }));
            })));
        };
        /**
         * @param {?} param
         * @return {?}
         */
        LabelManagerService.prototype.editCategory = /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            var _this = this;
            return this.backface
                .updateCategory({
                ID: param.id,
                Name: param.name,
                OwnerBy: this.ownerBy
            })
                .pipe(operators.tap((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.categorys.find((/**
                 * @param {?} vv
                 * @return {?}
                 */
                function (vv) { return vv.ID === param.id; })).Name = param.name;
            })));
        };
        /**
         * @return {?}
         */
        LabelManagerService.prototype.fetchCategoryLabelHis = /**
         * @return {?}
         */
        function () {
            return this.backface.fetchCategoryLabelHis({
                EleName: this.eleName,
                OwnerBy: this.ownerBy,
                Owner: [this.owner]
            });
        };
        /**
         * @return {?}
         */
        LabelManagerService.prototype.fetchCategories = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.backface
                .fetchCategories({ EleName: this.eleName, OwnerBy: this.ownerBy, Owner: this.owner })
                .subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.categorys = v;
            }));
        };
        /**
         * @param {?} cate
         * @param {?} idx
         * @return {?}
         */
        LabelManagerService.prototype.setCategoryPosition = /**
         * @param {?} cate
         * @param {?} idx
         * @return {?}
         */
        function (cate, idx) {
            var _this = this;
            this.backface.setCategoryPosition({ ID: cate.ID, Position: idx }).subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                // 先赋值position
                v.forEach((/**
                 * @param {?} vv
                 * @return {?}
                 */
                function (vv) {
                    /** @type {?} */
                    var findc = _this.categorys.find((/**
                     * @param {?} c
                     * @return {?}
                     */
                    function (c) { return c.ID === vv.ID; }));
                    if (findc) {
                        findc.Position = vv.Position;
                    }
                }));
                // 再排序
                _this.categorys.sort((/**
                 * @param {?} a
                 * @param {?} b
                 * @return {?}
                 */
                function (a, b) { return a.Position - b.Position; }));
            }));
        };
        LabelManagerService.decorators = [
            { type: core.Injectable }
        ];
        /** @nocollapse */
        LabelManagerService.ctorParameters = function () { return [
            { type: material.MatSnackBar }
        ]; };
        return LabelManagerService;
    }());
    if (false) {
        /** @type {?} */
        LabelManagerService.prototype.eleName;
        /** @type {?} */
        LabelManagerService.prototype.ownerBy;
        /** @type {?} */
        LabelManagerService.prototype.owner;
        /** @type {?} */
        LabelManagerService.prototype.categorys;
        /** @type {?} */
        LabelManagerService.prototype.editLabel;
        /** @type {?} */
        LabelManagerService.prototype.allColumnsWithLetter;
        /** @type {?} */
        LabelManagerService.prototype.backface;
        /**
         * @type {?}
         * @private
         */
        LabelManagerService.prototype.snackBar;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /**
     * @record
     */
    function DragData() { }
    if (false) {
        /** @type {?} */
        DragData.prototype.Type;
        /** @type {?} */
        DragData.prototype.Data;
    }
    var EditLabelService = /** @class */ (function () {
        function EditLabelService() {
            this.onNodeChange = new core.EventEmitter();
        }
        /**
         * @return {?}
         */
        EditLabelService.prototype.buildDragedNode = /**
         * @return {?}
         */
        function () {
            /** @type {?} */
            var node;
            switch (this.dragData.Type) {
                case 'column':
                    node = {
                        NodeType: NodeTypeEnum.NodeCondition,
                        Field: (/** @type {?} */ (this.dragData.Data)),
                        Operate: '='
                    };
                    break;
                case 'node':
                    node = ((/** @type {?} */ (this.dragData.Data))).toInterface();
                    break;
            }
            return node;
        };
        return EditLabelService;
    }());
    if (false) {
        /** @type {?} */
        EditLabelService.prototype.dragData;
        /** @type {?} */
        EditLabelService.prototype.prevNodeEle;
        /** @type {?} */
        EditLabelService.prototype.dragOverNode;
        /** @type {?} */
        EditLabelService.prototype.dragOverArea;
        /** @type {?} */
        EditLabelService.prototype.onNodeChange;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /**
     * @record
     */
    function LabelHistoryDialogData() { }
    if (false) {
        /** @type {?} */
        LabelHistoryDialogData.prototype.svr;
        /** @type {?} */
        LabelHistoryDialogData.prototype.data;
    }
    var LabelHistoryComponent = /** @class */ (function () {
        function LabelHistoryComponent(dialogRef, data) {
            this.dialogRef = dialogRef;
            this.data = data;
            this.hostClass = true;
        }
        /**
         * @return {?}
         */
        LabelHistoryComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.data.svr.backface.fetchLabelHisList(this.data.data).subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.labelHisList = v || [];
                if (_this.labelHisList.length > 0) {
                    _this.selectedItem = _this.labelHisList[0];
                    _this.fetchData(_this.labelHisList[0]);
                }
            }));
            this.dislogLabel.nativeElement.parentElement.parentElement.style = 'padding:0';
        };
        /**
         * @private
         * @param {?} key
         * @return {?}
         */
        LabelHistoryComponent.prototype.fetchData = /**
         * @private
         * @param {?} key
         * @return {?}
         */
        function (key) {
            var _this = this;
            this.data.svr.backface
                .fetchLabelHis({
                CategoryID: this.data.data.CategoryID,
                ID: this.data.data.ID,
                Version: key.Version
            })
                .subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.whereString = v.Conts;
                _this.plainText = v.PlainText;
            }));
        };
        /**
         * @param {?} event
         * @return {?}
         */
        LabelHistoryComponent.prototype.selectChange = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            this.fetchData((/** @type {?} */ (event.value)));
            this.selectedItem = (/** @type {?} */ (event.value));
        };
        /**
         * @return {?}
         */
        LabelHistoryComponent.prototype.close = /**
         * @return {?}
         */
        function () {
            this.dialogRef.close();
        };
        LabelHistoryComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-label-history',
                        template: "<div #dialogLabel class=\"label-main\">\r\n\t\t<ng-container *ngIf=\"labelHisList && labelHisList.length>0;else empty\">\r\n\t\t\t\t<div class=\"label-top\">\r\n\t\t\t\t\t\t<div class=\"top-left\">\r\n\t\t\t\t\t\t\t<mat-icon class=\"open-with\" svgIcon=\"open_with\"></mat-icon>\r\n\t\t\t\t\t\t\t<mat-form-field class=\"select-input\">\r\n\t\t\t\t\t\t\t\t<mat-select  (selectionChange)=\"selectChange($event)\" [value]=\"selectedItem\">\r\n\t\t\t\t\t\t\t\t\t<mat-option *ngFor=\"let item of labelHisList\" [value]=\"item\">\r\n\t\t\t\t\t\t\t\t\t\t\t{{item.Version}}.{{item.WriteTime}}\r\n\t\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"top-right\">\r\n\t\t\t\t\t\t\t<mat-icon svgIcon=\"library_books\"></mat-icon>\r\n\t\t\t\t\t\t\t<mat-icon class=\"cancel\" svgIcon=\"cancel\" (click)=\"close()\"></mat-icon>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"label-box-sql\">\r\n\t\t\t\t\t\t<mat-form-field class=\"sql-textarea\">\r\n\t\t\t\t\t\t\t<textarea matInput readonly=\"true\" matTextareaAutosize readonly=\"true\" [value]=\"whereString\"></textarea>\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"label-box-condition\">\r\n\t\t\t\t\t\t<div class=\"box-title\">\u9644\u52A0\u9AD8\u7EA7\u6761\u4EF6</div>\r\n\t\t\t\t\t\t<mat-form-field class=\"condition-textarea\">\r\n\t\t\t\t\t\t\t<textarea matInput rreadonly=\"true\" [value]=\"plainText\" matTextareaAutosize></textarea>\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</div>\r\n\t\t</ng-container>\r\n\t\t<ng-template #empty>\u6CA1\u6709\u6570\u636E</ng-template>\r\n</div>\r\n\r\n",
                        styles: [".label-main{width:100%;height:100%;box-sizing:border-box;padding:16px 8px 8px;border-radius:4px}.label-top{display:flex;justify-content:space-between;width:100%;height:20px;box-sizing:border-box}.label-top .select-input{margin-top:5px}.top-left{display:flex;align-items:center;box-sizing:border-box;font-size:14px}.top-left .open-with{margin-right:8px}.top-right{display:flex;align-items:center}.top-right .cancel{margin-left:8px}.label-box-condition,.label-box-sql{width:100%;box-sizing:border-box;overflow:auto;font-size:12px}.label-box-sql{height:172px;margin-top:16px}.label-box-sql .sql-textarea{width:100%;box-sizing:border-box;padding-left:12px;padding-right:12px}.label-box-condition{height:147px;box-sizing:border-box;padding-top:12px;padding-left:4px;padding-right:12px}.label-box-condition .condition-textarea{width:100%;box-sizing:border-box;padding-left:8px}"]
                    }] }
        ];
        /** @nocollapse */
        LabelHistoryComponent.ctorParameters = function () { return [
            { type: material.MatDialogRef },
            { type: undefined, decorators: [{ type: core.Inject, args: [material.MAT_DIALOG_DATA,] }] }
        ]; };
        LabelHistoryComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.label-history',] }],
            dislogLabel: [{ type: core.ViewChild, args: ['dialogLabel', { static: true },] }]
        };
        return LabelHistoryComponent;
    }());
    if (false) {
        /** @type {?} */
        LabelHistoryComponent.prototype.hostClass;
        /** @type {?} */
        LabelHistoryComponent.prototype.labelHisList;
        /** @type {?} */
        LabelHistoryComponent.prototype.selectedItem;
        /** @type {?} */
        LabelHistoryComponent.prototype.whereString;
        /** @type {?} */
        LabelHistoryComponent.prototype.plainText;
        /** @type {?} */
        LabelHistoryComponent.prototype.dislogLabel;
        /** @type {?} */
        LabelHistoryComponent.prototype.dialogRef;
        /** @type {?} */
        LabelHistoryComponent.prototype.data;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var EditLabelComponent = /** @class */ (function () {
        function EditLabelComponent(theme, dialog, lblSvr, dialogRef, svr) {
            var _this = this;
            this.theme = theme;
            this.dialog = dialog;
            this.lblSvr = lblSvr;
            this.dialogRef = dialogRef;
            this.svr = svr;
            this.hostClass = true;
            this.nodeTypeCondition = NodeTypeEnum.NodeCondition;
            this.nodeTypeAnd = NodeTypeEnum.NodeAnd;
            this.nodeTypeOr = NodeTypeEnum.NodeOr;
            this.nodeTypeUnknow = NodeTypeEnum.unknow;
            this.nodeTypePlain = NodeTypeEnum.NodePlain;
            this.AdditionalSQL = true;
            this.AdditionalSQLDisplay = true;
            this.options = { maxLines: 12, printMargin: false };
            this.theme.theme.subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.themeModel = v.model;
            }));
        }
        /**
         * @return {?}
         */
        EditLabelComponent.prototype.ngAfterViewInit = /**
         * @return {?}
         */
        function () {
            this.labelNode.nativeElement.ondragover = (/**
             * @param {?} event
             * @return {?}
             */
            function (event) {
                // 把labelNode变成一个容器,能拖入条件
                event.preventDefault();
                // console.log(event);
                event.stopPropagation();
            });
        };
        /**
         * @return {?}
         */
        EditLabelComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            var _this = this;
            ace.config.set('basePath', '/front/assets/ace-builds/src-min-noconflict');
            this.lblSvr.onNodeChange.subscribe((/**
             * @return {?}
             */
            function () {
                if (_this.svr.editLabel.Conts && _this.svr.editLabel.Conts.NodeType !== NodeTypeEnum.unknow) {
                    _this.svr.backface
                        .nodeToString(_this.svr.editLabel.Conts.toInterface())
                        .subscribe((/**
                     * @param {?} str
                     * @return {?}
                     */
                    function (str) { return (_this.whereString = str); }));
                }
                else {
                    _this.whereString = '';
                }
            }));
            this.lblSvr.onNodeChange.emit();
            this.标签定义.nativeElement.parentElement.parentElement.style = 'padding:0px;';
        };
        /**
         * @param {?} event
         * @return {?}
         */
        EditLabelComponent.prototype.labelDrop = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            if (this.svr.editLabel.Conts.NodeType === this.nodeTypeUnknow) {
                this.svr.editLabel.Conts.assign(this.lblSvr.buildDragedNode());
                this.lblSvr.onNodeChange.emit();
            }
            else if (this.svr.editLabel.Conts.NodeType === this.nodeTypeAnd ||
                this.svr.editLabel.Conts.NodeType === this.nodeTypeOr) {
                this.svr.editLabel.Conts.Children[this.svr.editLabel.Conts.Children.length - 1].addBottomSibling(this.lblSvr.buildDragedNode());
                if (this.lblSvr.dragData.Type === 'node') {
                    ((/** @type {?} */ (this.lblSvr.dragData.Data))).remove();
                }
                this.lblSvr.onNodeChange.emit();
            }
            else if (this.svr.editLabel.Conts.NodeType === this.nodeTypeCondition ||
                this.svr.editLabel.Conts.NodeType === this.nodeTypePlain) {
                this.svr.editLabel.Conts.addChildSibling(this.lblSvr.buildDragedNode());
                if (this.lblSvr.dragData.Type === 'node') {
                    ((/** @type {?} */ (this.lblSvr.dragData.Data))).remove();
                }
                this.lblSvr.onNodeChange.emit();
            }
            event.stopPropagation();
        };
        /**
         * @param {?} event
         * @param {?} column
         * @return {?}
         */
        EditLabelComponent.prototype.colDragStart = /**
         * @param {?} event
         * @param {?} column
         * @return {?}
         */
        function (event, column) {
            this.lblSvr.dragData = { Type: 'column', Data: column };
        };
        /**
         * @return {?}
         */
        EditLabelComponent.prototype.openHis = /**
         * @return {?}
         */
        function () {
            this.dialog.open(LabelHistoryComponent, {
                width: '296px',
                height: '384px',
                data: (/** @type {?} */ ({
                    svr: this.svr,
                    data: { CategoryID: this.svr.editLabel.CategoryID, ID: this.svr.editLabel.LabelID }
                })),
                autoFocus: false
            });
        };
        /**
         * @param {?} letter
         * @return {?}
         */
        EditLabelComponent.prototype.acronymScroll = /**
         * @param {?} letter
         * @return {?}
         */
        function (letter) {
            document.querySelector('#' + letter).scrollIntoView(true);
        };
        /**
         * @return {?}
         */
        EditLabelComponent.prototype.save = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.svr.editLabel.save().subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                if (v) {
                    _this.dialogRef.close();
                }
            }));
        };
        EditLabelComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-edit-label',
                        template: "<div #\u6807\u7B7E\u5B9A\u4E49 class=\"\u6807\u7B7E\u5B9A\u4E49\u5185\u5BB9\" cdkDropListGroup>\r\n\t<div class=\"\u6807\u7B7E\u5B9A\u4E49\u5DE6\">\r\n\t\t<div *ngIf=\"!svr.editLabel.titleInput\" class=\"\u6807\u7B7E\u540D\u79F0\" [matTooltip]=\"svr.editLabel.Name\">\r\n\t\t\t{{ svr.editLabel.Name }}\r\n\t\t</div>\r\n\t\t<mat-form-field *ngIf=\"svr.editLabel.titleInput\" class=\"\u540D\u79F0\u7F16\u8F91\">\r\n\t\t\t<input type=\"text\" matInput [(ngModel)]=\"svr.editLabel.title\" />\r\n\t\t</mat-form-field>\r\n\t\t<div class=\"\u6307\u6807\u529F\u80FD\u56FE\u6807\">\r\n\t\t\t<mat-icon *ngIf=\"svr.editLabel.titleInput\" (click)=\"svr.editLabel.editCancel()\" class=\"edit-cancel close\"\r\n\t\t\t\tsvgIcon=\"close\"></mat-icon>\r\n\t\t\t<mat-icon *ngIf=\"svr.editLabel.titleInput\" (click)=\"svr.editLabel.done()\" class=\"done\" svgIcon=\"done\">\r\n\t\t\t</mat-icon>\r\n\t\t\t<mat-icon *ngIf=\"!svr.editLabel.titleInput\" (click)=\"svr.editLabel.edit()\" class=\"edit\" svgIcon=\"edit\">\r\n\t\t\t</mat-icon>\r\n\t\t\t<mat-icon svgIcon=\"alarm_on\" (click)=\"openHis()\"></mat-icon>\r\n\t\t</div>\r\n\t\t<div class=\"left-columns\">\r\n\t\t\t<div class=\"column-list\">\r\n\t\t\t\t<div *ngFor=\"let list of svr.allColumnsWithLetter\">\r\n\t\t\t\t\t<div class=\"letter-color \u6307\u6807\u9996\u5B57\u6BCD\" id=\"{{ list.Letter }}\">\r\n\t\t\t\t\t\t{{ list.Letter | uppercase }}\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div mat-button class=\"\u6307\u6807\" (dragstart)=\"colDragStart($event, column)\"\r\n\t\t\t\t\t\t*ngFor=\"let column of list.Columns\" [draggable]=\"true\">\r\n\t\t\t\t\t\t{{ column }}\r\n\t\t\t\t\t\t<mat-icon class=\"\u62D6\u52A8\" svgIcon=\"drag_indicator\" [cdkDragHandle]=\"true\"> </mat-icon>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"letter-list\">\r\n\t\t\t\t<div *ngFor=\"let list of svr.allColumnsWithLetter\">\r\n\t\t\t\t\t<div class=\"letter-color \u5C45\u4E2D\" (click)=\"acronymScroll(list.Letter)\">\r\n\t\t\t\t\t\t{{ list.Letter | uppercase }}\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class=\"\u6807\u7B7E\u5B9A\u4E49\u53F3\">\r\n\t\t<div #labelNode class=\"node-content\" (drop)=\"labelDrop($event)\" onselectstart=\"return false;\">\r\n\t\t\t<common-node class=\"node\" [data]=\"svr.editLabel.Conts\"\r\n\t\t\t\t[ngClass]=\"{ empty: svr.editLabel.Conts.NodeType === '' }\">\r\n\t\t\t</common-node>\r\n\t\t</div>\r\n\t\t<div class=\"\u9644\u52A0\u529F\u80FD\">\r\n\t\t\t<div class=\"\u9644\u52A0\u529F\u80FD\u5BFC\u822A\">\r\n\t\t\t\t<span [class.\u9009\u4E2D\u7684\u9644\u52A0\u5BFC\u822A]=\"AdditionalSQL\" (click)=\"AdditionalSQL = true\">SQL\u4EE3\u7801\u663E\u793A</span><span\r\n\t\t\t\t\t[class.\u9009\u4E2D\u7684\u9644\u52A0\u5BFC\u822A]=\"!AdditionalSQL\" (click)=\"AdditionalSQL = false\">\u9644\u52A0\u9AD8\u7EA7\u6761\u4EF6</span>\r\n\t\t\t\t<mat-icon (click)=\"AdditionalSQLDisplay = !AdditionalSQLDisplay\"\r\n\t\t\t\t\tsvgIcon=\"{{ AdditionalSQLDisplay ? 'expand_more' : 'expand_less' }}\">\r\n\t\t\t\t</mat-icon>\r\n\t\t\t</div>\r\n\t\t\t<div *ngIf=\"AdditionalSQLDisplay\" class=\"\u9644\u52A0\u529F\u80FD\u5185\u5BB9\">\r\n\t\t\t\t<div ace-editor class=\"where-string\" *ngIf=\"AdditionalSQL\" [readOnly]=\"true\" [text]=\"whereString\" mode=\"text\"\r\n\t\t\t\t\t[theme]=\"themeModel === 'dark' ? 'tomorrow_night' : 'eclipse'\" [options]=\"options\" [autoUpdateContent]=\"true\"\r\n\t\t\t\t\t[durationBeforeCallback]=\"1000\" style=\"min-height: 172px; width:100%; overflow: auto;\">\r\n\t\t\t\t</div>\r\n\t\t\t\t<div ace-editor class=\"where-string\" *ngIf=\"!AdditionalSQL\" [text]=\"svr.editLabel.PlainText\" mode=\"text\"\r\n\t\t\t\t\t[theme]=\"themeModel === 'dark' ? 'tomorrow_night' : 'eclipse'\" [options]=\"options\" [autoUpdateContent]=\"true\"\r\n\t\t\t\t\t[durationBeforeCallback]=\"1000\" style=\"min-height: 172px; width:100%; overflow: auto;\">\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n\r\n<div class=\"\u6807\u7B7E\u5B9A\u4E49\u5E95\u90E8\">\r\n\t<button mat-button (click)=\"dialogRef.close()\">\u53D6\u6D88</button>\r\n\t<button mat-button class=\"\u786E\u5B9A\" (click)=\"save()\">\u786E\u5B9A</button>\r\n</div>",
                        providers: [EditLabelService],
                        styles: ["@charset \"UTF-8\";:host{width:800px;height:100%;padding:0;display:flex;box-sizing:border-box;flex-direction:column}.\u6807\u7B7E\u5B9A\u4E49\u5185\u5BB9{height:calc(100% - 40px);width:100%;flex-grow:1;display:flex}.\u6807\u7B7E\u5B9A\u4E49\u5DE6{width:232px;height:100%;box-sizing:border-box;position:relative}.\u6807\u7B7E\u5B9A\u4E49\u5DE6 .\u6807\u7B7E\u540D\u79F0{padding-left:16px;font-weight:700;width:110px;height:24px;margin:9px 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block}.\u6807\u7B7E\u5B9A\u4E49\u5DE6 .\u540D\u79F0\u7F16\u8F91{padding-left:16px;font-weight:700;width:110px;height:40px}.\u6807\u7B7E\u5B9A\u4E49\u5DE6 .\u540D\u79F0\u7F16\u8F91 ::ng-deep .mat-form-field-wrapper{padding:0 0 12px}.\u6807\u7B7E\u5B9A\u4E49\u5DE6 .\u540D\u79F0\u7F16\u8F91 ::ng-deep .mat-form-field-infix{border:0;padding:12px 0}.\u6807\u7B7E\u5B9A\u4E49\u5DE6 .\u6307\u6807\u529F\u80FD\u56FE\u6807{height:24px;position:absolute;right:8px;top:12px}.\u6807\u7B7E\u5B9A\u4E49\u5DE6 .\u6307\u6807\u529F\u80FD\u56FE\u6807 .mat-icon{width:24px;height:24px;margin-right:4px;vertical-align:middle;cursor:pointer}.\u6807\u7B7E\u5B9A\u4E49\u5DE6 .left-columns{width:100%;height:calc(100% - 60px);position:relative}.\u6807\u7B7E\u5B9A\u4E49\u5DE6 .left-columns .column-list{width:100%;height:100%;box-sizing:border-box;overflow-y:auto}.\u6807\u7B7E\u5B9A\u4E49\u5DE6 .left-columns .letter-list{height:100%;position:absolute;top:0;right:0;overflow-y:auto}.\u6807\u7B7E\u5B9A\u4E49\u5DE6 .left-columns .letter-color{width:20px;font-size:12px;text-align:center}.\u6807\u7B7E\u5B9A\u4E49\u5DE6 .left-columns .\u6307\u6807{width:calc(100% - 20px);height:32px;line-height:32px;padding:0 24px;font-size:14px;box-sizing:border-box;text-align:left;position:relative}.\u6807\u7B7E\u5B9A\u4E49\u5DE6 .left-columns .\u6307\u6807 .\u62D6\u52A8{width:16px;height:16px;line-height:16px;cursor:pointer;position:absolute;top:50%;left:0;-webkit-transform:translateY(-50%);transform:translateY(-50%);display:none}.\u6807\u7B7E\u5B9A\u4E49\u5DE6 .left-columns .\u6307\u6807:hover{box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2)}.\u6807\u7B7E\u5B9A\u4E49\u5DE6 .left-columns .\u6307\u6807:hover .\u62D6\u52A8{display:block}.\u6807\u7B7E\u5B9A\u4E49\u5DE6 .left-columns .\u6307\u6807\u9996\u5B57\u6BCD{margin:8px 8px 4px}.\u6807\u7B7E\u5B9A\u4E49\u5DE6 .left-columns .\u5C45\u4E2D{text-align:center;cursor:pointer}.\u6807\u7B7E\u5B9A\u4E49\u5E95\u90E8{width:100%;height:40px;line-height:40px;text-align:right;position:relative}.\u6807\u7B7E\u5B9A\u4E49\u5E95\u90E8 button{margin-right:16px}.\u6807\u7B7E\u5B9A\u4E49\u53F3{width:0;flex-grow:1;height:100%;display:flex;flex-direction:column}.node-content{width:100%;height:0;flex-grow:1;padding:16px 16px 0;box-sizing:border-box}.node-content .node{width:100%;height:100%;overflow-x:auto;overflow-y:auto;display:block}.node-drag{display:flex;width:104px;height:36px;border-radius:4px;font-size:14px;color:#2679a0;background:#7fc3e2;align-items:center;justify-content:center}.empty{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.\u9644\u52A0\u529F\u80FD{width:100%}.\u9644\u52A0\u529F\u80FD .\u9644\u52A0\u529F\u80FD\u5BFC\u822A{width:100%;height:32px;font-size:14px;line-height:32px}.\u9644\u52A0\u529F\u80FD .\u9644\u52A0\u529F\u80FD\u5BFC\u822A span{line-height:32px;margin:0 12px 0 4px;cursor:pointer}.\u9644\u52A0\u529F\u80FD .\u9644\u52A0\u529F\u80FD\u5BFC\u822A .mat-icon{float:right;margin:4px;cursor:pointer}.\u9644\u52A0\u529F\u80FD .\u9644\u52A0\u529F\u80FD\u5185\u5BB9{width:100%;height:204px;padding:16px 8px;box-sizing:border-box}.where-string{border-radius:4px}"]
                    }] }
        ];
        /** @nocollapse */
        EditLabelComponent.ctorParameters = function () { return [
            { type: ThemeService },
            { type: material.MatDialog },
            { type: EditLabelService },
            { type: material.MatDialogRef },
            { type: LabelManagerService, decorators: [{ type: core.Inject, args: [material.MAT_DIALOG_DATA,] }] }
        ]; };
        EditLabelComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.edit-label',] }],
            标签定义: [{ type: core.ViewChild, args: ['标签定义', { static: true },] }],
            labelNode: [{ type: core.ViewChild, args: ['labelNode', { static: false },] }]
        };
        return EditLabelComponent;
    }());
    if (false) {
        /** @type {?} */
        EditLabelComponent.prototype.hostClass;
        /** @type {?} */
        EditLabelComponent.prototype.nodeTypeCondition;
        /** @type {?} */
        EditLabelComponent.prototype.nodeTypeAnd;
        /** @type {?} */
        EditLabelComponent.prototype.nodeTypeOr;
        /** @type {?} */
        EditLabelComponent.prototype.nodeTypeUnknow;
        /** @type {?} */
        EditLabelComponent.prototype.nodeTypePlain;
        /** @type {?} */
        EditLabelComponent.prototype.AdditionalSQL;
        /** @type {?} */
        EditLabelComponent.prototype.AdditionalSQLDisplay;
        /** @type {?} */
        EditLabelComponent.prototype.whereString;
        /** @type {?} */
        EditLabelComponent.prototype.options;
        /** @type {?} */
        EditLabelComponent.prototype.themeModel;
        /** @type {?} */
        EditLabelComponent.prototype.标签定义;
        /** @type {?} */
        EditLabelComponent.prototype.labelNode;
        /**
         * @type {?}
         * @private
         */
        EditLabelComponent.prototype.theme;
        /** @type {?} */
        EditLabelComponent.prototype.dialog;
        /**
         * @type {?}
         * @private
         */
        EditLabelComponent.prototype.lblSvr;
        /** @type {?} */
        EditLabelComponent.prototype.dialogRef;
        /** @type {?} */
        EditLabelComponent.prototype.svr;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var NodeComponent = /** @class */ (function () {
        function NodeComponent(lblSvr, ref) {
            this.lblSvr = lblSvr;
            this.ref = ref;
            this.nodeTypeCondition = NodeTypeEnum.NodeCondition;
            this.nodeTypeAnd = NodeTypeEnum.NodeAnd;
            this.nodeTypeOr = NodeTypeEnum.NodeOr;
            this.nodeTypeUnknow = NodeTypeEnum.unknow;
            this.nodeTypePlain = NodeTypeEnum.NodePlain;
            this.hostClass = true;
        }
        /**
         * @return {?}
         */
        NodeComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        /**
         * @return {?}
         */
        NodeComponent.prototype.svgHeight = /**
         * @return {?}
         */
        function () {
            return this.data.flatHeight() * 50;
        };
        /**
         * @param {?} event
         * @return {?}
         */
        NodeComponent.prototype.nodeDragover = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            // 判断如果是节点
            if (this.data.NodeType === this.nodeTypeAnd || this.data.NodeType === this.nodeTypeOr) {
                event.preventDefault();
                /** @type {?} */
                var rect = ((/** @type {?} */ (this.ref.nativeElement))).getBoundingClientRect();
                /** @type {?} */
                var offsetY = event.pageY - rect.top;
                /** @type {?} */
                var clientHeight = rect.height;
                if (this.lblSvr.dragOverNode !== this.data && this.lblSvr.prevNodeEle) {
                    /** @type {?} */
                    var ref = (/** @type {?} */ (this.lblSvr.prevNodeEle.nativeElement));
                    ref.style.borderTop = '4px solid transparent';
                    ref.style.borderBottom = '4px solid transparent';
                    ref.style.backgroundColor = null;
                }
                // Handle drag area
                /** @type {?} */
                var percentageY = offsetY / clientHeight;
                if (percentageY < 0.5) {
                    ((/** @type {?} */ (this.nodeMain.nativeElement))).style.borderTop = '4px solid #67c204';
                    ((/** @type {?} */ (this.nodeMain.nativeElement))).style.borderBottom = '4px solid transparent';
                    this.lblSvr.dragOverArea = 'above';
                }
                else if (percentageY >= 0.5) {
                    ((/** @type {?} */ (this.nodeMain.nativeElement))).style.borderTop = '4px solid transparent';
                    ((/** @type {?} */ (this.nodeMain.nativeElement))).style.borderBottom = '4px solid #67c204';
                    this.lblSvr.dragOverArea = 'below';
                }
                this.lblSvr.dragOverNode = this.data;
                this.lblSvr.prevNodeEle = this.nodeMain;
            }
            event.stopPropagation();
        };
        // 把拖动的node放到节点上边
        // 把拖动的node放到节点上边
        /**
         * @param {?} event
         * @return {?}
         */
        NodeComponent.prototype.dropTop = 
        // 把拖动的node放到节点上边
        /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            if (this.data.parent) {
                this.data.addTopSibling(this.lblSvr.buildDragedNode());
                if (this.lblSvr.dragData.Type === 'node') {
                    ((/** @type {?} */ (this.lblSvr.dragData.Data))).remove();
                }
            }
            else {
                this.data.Children[0].addTopSibling(this.lblSvr.buildDragedNode());
                if (this.lblSvr.dragData.Type === 'node') {
                    ((/** @type {?} */ (this.lblSvr.dragData.Data))).remove();
                }
            }
        };
        // 把拖动的node放到节点下边
        // 把拖动的node放到节点下边
        /**
         * @param {?} event
         * @return {?}
         */
        NodeComponent.prototype.dropBottom = 
        // 把拖动的node放到节点下边
        /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            this.data.addBottomSibling(this.lblSvr.buildDragedNode());
            if (this.lblSvr.dragData.Type === 'node') {
                ((/** @type {?} */ (this.lblSvr.dragData.Data))).remove();
            }
        };
        /**
         * @param {?} event
         * @return {?}
         */
        NodeComponent.prototype.nodeDrop = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            if (this.data.NodeType === this.nodeTypeAnd || this.data.NodeType === this.nodeTypeOr) {
                switch (this.lblSvr.dragOverArea) {
                    case 'above':
                        this.dropTop(event);
                        break;
                    case 'below':
                        this.dropBottom(event);
                        break;
                }
                this.lblSvr.onNodeChange.emit();
                this.lblSvr.dragOverNode = null;
                if (this.lblSvr.prevNodeEle) {
                    /** @type {?} */
                    var ref = (/** @type {?} */ (this.lblSvr.prevNodeEle.nativeElement));
                    ref.style.borderTop = '4px solid transparent';
                    ref.style.borderBottom = '4px solid transparent';
                    ref.style.backgroundColor = null;
                }
            }
            event.stopPropagation();
        };
        /**
         * @param {?} event
         * @return {?}
         */
        NodeComponent.prototype.drop = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            if (this.data.NodeType === this.nodeTypeUnknow) {
                this.data.assign(this.lblSvr.buildDragedNode());
                this.lblSvr.onNodeChange.emit();
            }
        };
        /**
         * @return {?}
         */
        NodeComponent.prototype.logicClick = /**
         * @return {?}
         */
        function () {
            if (this.data.NodeType === NodeTypeEnum.NodeAnd) {
                this.data.NodeType = NodeTypeEnum.NodeOr;
            }
            else {
                this.data.NodeType = NodeTypeEnum.NodeAnd;
            }
            this.lblSvr.onNodeChange.emit();
        };
        NodeComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-node',
                        template: "<div #nodeMain class=\"node-main\" (drop)=\"nodeDrop($event)\" onselectstart=\"return false;\">\r\n\t<ng-container *ngIf=\"data.NodeType !== nodeTypeUnknow; else else_content\">\r\n\t\t<common-condition-node\r\n\t\t\t*ngIf=\"data.NodeType === nodeTypeCondition || data.NodeType === nodeTypePlain; else parentNode\"\r\n\t\t\t[data]=\"data\">\r\n\t\t</common-condition-node>\r\n\t\t<ng-template #parentNode>\r\n\t\t\t<div class=\"main\" *ngIf=\"data.NodeType !== nodeTypeCondition\" onselectstart=\"return false;\">\r\n\t\t\t\t<div class=\"node-left\" (dragover)=\"nodeDragover($event)\">\r\n\t\t\t\t\t<div class=\"logic\" >\r\n\t\t\t\t\t\t<div class=\"\u903B\u8F91 mat-elevation-z4\" (click)=\"logicClick()\" *ngIf=\"data.NodeType === nodeTypeAnd\">\u548C\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"\u903B\u8F91 mat-elevation-z4\" (click)=\"logicClick()\" *ngIf=\"data.NodeType === nodeTypeOr\">\u6216\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"line\"></div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"child-node\">\r\n\t\t\t\t\t<common-node *ngFor=\"let node of data.Children\" [data]=\"node\"> </common-node>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</ng-template>\r\n\t</ng-container>\r\n\t<ng-template #else_content>\r\n\t\t<div class=\"empty\" (drop)=\"drop($event)\" (dragover)=\"$event.preventDefault()\">\r\n\t\t\t<p>\u7A7A\u5185\u5BB9</p>\r\n\t\t</div>\r\n\t</ng-template>\r\n</div>",
                        styles: ["@charset \"UTF-8\";.node-main{border-top:4px solid transparent;border-bottom:4px solid transparent;margin:-2px 0}.main{display:flex;justify-content:flex-start;align-items:stretch;margin:3px 0}.node-left{display:flex;justify-content:flex-start;align-items:stretch}.child-node{display:flex;flex-direction:column}.empty{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.logic{display:flex;align-items:center}.logic .\u903B\u8F91{width:24px;height:24px;border-radius:4px;font-size:14px;text-align:center;line-height:24px;color:#fff;cursor:pointer}.line{width:15px;flex-shrink:0;border-top:1px solid #ccc;border-left:1px solid #ccc;border-bottom:1px solid #ccc;margin-left:4px;box-sizing:border-box}"]
                    }] }
        ];
        /** @nocollapse */
        NodeComponent.ctorParameters = function () { return [
            { type: EditLabelService },
            { type: core.ElementRef }
        ]; };
        NodeComponent.propDecorators = {
            data: [{ type: core.Input }],
            hostClass: [{ type: core.HostBinding, args: ['class.node',] }],
            nodeMain: [{ type: core.ViewChild, args: ['nodeMain', { static: true },] }]
        };
        return NodeComponent;
    }());
    if (false) {
        /** @type {?} */
        NodeComponent.prototype.nodeTypeCondition;
        /** @type {?} */
        NodeComponent.prototype.nodeTypeAnd;
        /** @type {?} */
        NodeComponent.prototype.nodeTypeOr;
        /** @type {?} */
        NodeComponent.prototype.nodeTypeUnknow;
        /** @type {?} */
        NodeComponent.prototype.nodeTypePlain;
        /** @type {?} */
        NodeComponent.prototype.data;
        /** @type {?} */
        NodeComponent.prototype.hostClass;
        /** @type {?} */
        NodeComponent.prototype.nodeMain;
        /**
         * @type {?}
         * @private
         */
        NodeComponent.prototype.lblSvr;
        /**
         * @type {?}
         * @private
         */
        NodeComponent.prototype.ref;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /** @enum {number} */
    var DataType = {
        STR: 0,
        INT: 1,
        DATE: 2,
        BYTEA: 3,
        FLOAT: 4,
    };
    DataType[DataType.STR] = 'STR';
    DataType[DataType.INT] = 'INT';
    DataType[DataType.DATE] = 'DATE';
    DataType[DataType.BYTEA] = 'BYTEA';
    DataType[DataType.FLOAT] = 'FLOAT';
    /** @type {?} */
    var STR = DataType.STR;
    /** @type {?} */
    var INT = DataType.INT;
    /** @type {?} */
    var DATE = DataType.DATE;
    /** @type {?} */
    var BYTEA = DataType.BYTEA;
    /** @type {?} */
    var FLOAT = DataType.FLOAT;
    /**
     * @record
     */
    function Operate() { }
    if (false) {
        /** @type {?} */
        Operate.prototype.Name;
        /** @type {?} */
        Operate.prototype.Label;
        /** @type {?} */
        Operate.prototype.AllowTypes;
    }
    // 各种数据类型允许使用的运算符
    /** @type {?} */
    var Operates = [
        { Name: '=', Label: '等于', AllowTypes: [STR, INT, DATE, BYTEA, FLOAT] },
        { Name: '?', Label: '包含', AllowTypes: [STR, BYTEA] },
        { Name: '?>', Label: '前缀', AllowTypes: [STR, DATE, BYTEA] },
        { Name: 'e', Label: '为空', AllowTypes: [STR, INT, DATE, BYTEA, FLOAT] },
        { Name: '!=', Label: '不等于', AllowTypes: [STR, INT, DATE, BYTEA, FLOAT] },
        { Name: '>', Label: '大于', AllowTypes: [STR, INT, DATE, BYTEA, FLOAT] },
        { Name: '>=', Label: '大于等于', AllowTypes: [STR, INT, DATE, BYTEA, FLOAT] },
        { Name: '<', Label: '小于', AllowTypes: [STR, INT, DATE, BYTEA, FLOAT] },
        { Name: '<=', Label: '小于等于', AllowTypes: [STR, INT, DATE, BYTEA, FLOAT] },
        { Name: '!?', Label: '不包含', AllowTypes: [STR, BYTEA] },
        { Name: '!?>', Label: '非前缀', AllowTypes: [STR, DATE, BYTEA] },
        { Name: '<?', Label: '后缀', AllowTypes: [STR, DATE, BYTEA] },
        { Name: '!<?', Label: '非后缀', AllowTypes: [STR, DATE, BYTEA] },
        { Name: 'in', Label: '在列表', AllowTypes: [STR, INT, DATE, BYTEA, FLOAT] },
        { Name: '!in', Label: '不在列表', AllowTypes: [STR, INT, DATE, BYTEA, FLOAT] },
        { Name: '~', Label: '正则', AllowTypes: [STR] },
        { Name: '!~', Label: '非正则', AllowTypes: [STR] },
        { Name: '!e', Label: '非空', AllowTypes: [STR, INT, DATE, BYTEA, FLOAT] },
        { Name: '_', Label: '长度等于', AllowTypes: [STR, BYTEA] },
        { Name: '!_', Label: '长度不等于', AllowTypes: [STR, BYTEA] },
        { Name: '_>', Label: '长度大于', AllowTypes: [STR, BYTEA] },
        { Name: '_<', Label: '长度小于', AllowTypes: [STR, BYTEA] }
    ];

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ConditionNodeComponent = /** @class */ (function () {
        function ConditionNodeComponent(lblSvr, ref) {
            this.lblSvr = lblSvr;
            this.ref = ref;
            this.Operates = Operates;
            this.nodeTypeCondition = NodeTypeEnum.NodeCondition;
            this.hostClass = true;
        }
        /**
         * @return {?}
         */
        ConditionNodeComponent.prototype.ngAfterViewInit = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.dvMain.nativeElement.ondragover = (/**
             * @param {?} event
             * @return {?}
             */
            function (event) {
                // 不能自己拖到自己
                if (_this.lblSvr.dragData &&
                    _this.lblSvr.dragData.Type === 'node' &&
                    ((/** @type {?} */ (_this.lblSvr.dragData.Data))) === _this.data) {
                    return;
                }
                event.preventDefault();
                /** @type {?} */
                var rect = ((/** @type {?} */ (_this.ref.nativeElement))).getBoundingClientRect();
                /** @type {?} */
                var offsetY = event.pageY - rect.top;
                // const clientHeight = rect.height;
                if (_this.lblSvr.dragOverNode !== _this.data && _this.lblSvr.prevNodeEle) {
                    /** @type {?} */
                    var ref = (/** @type {?} */ (_this.lblSvr.prevNodeEle.nativeElement));
                    ref.style.borderTop = '4px solid transparent';
                    ref.style.borderBottom = '4px solid transparent';
                    ref.style.backgroundColor = null;
                }
                // Handle drag area
                if (offsetY < 4) {
                    ((/** @type {?} */ (_this.dvMain.nativeElement))).style.borderTop = '4px solid #67c204';
                    ((/** @type {?} */ (_this.dvMain.nativeElement))).style.borderBottom = '4px solid transparent';
                    ((/** @type {?} */ (_this.dvMain.nativeElement.childNodes[0]))).style.backgroundColor = null;
                    _this.lblSvr.dragOverArea = 'above';
                }
                else if (offsetY > 40) {
                    ((/** @type {?} */ (_this.dvMain.nativeElement))).style.borderTop = '4px solid transparent';
                    ((/** @type {?} */ (_this.dvMain.nativeElement.childNodes[0]))).style.backgroundColor = null;
                    ((/** @type {?} */ (_this.dvMain.nativeElement))).style.borderBottom = '4px solid #67c204';
                    _this.lblSvr.dragOverArea = 'below';
                }
                else {
                    ((/** @type {?} */ (_this.dvMain.nativeElement))).style.borderTop = '4px solid transparent';
                    ((/** @type {?} */ (_this.dvMain.nativeElement))).style.borderBottom = '4px solid transparent';
                    ((/** @type {?} */ (_this.dvMain.nativeElement.childNodes[0]))).style.backgroundColor = '#67c204';
                    _this.lblSvr.dragOverArea = 'center';
                }
                _this.lblSvr.dragOverNode = _this.data;
                _this.lblSvr.prevNodeEle = _this.dvMain;
                event.stopPropagation();
            });
        };
        /**
         * @return {?}
         */
        ConditionNodeComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        /**
         * @param {?} event
         * @return {?}
         */
        ConditionNodeComponent.prototype.dropTop = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            this.data.addTopSibling(this.lblSvr.buildDragedNode());
            if (this.lblSvr.dragData.Type === 'node') {
                ((/** @type {?} */ (this.lblSvr.dragData.Data))).remove();
            }
        };
        /**
         * @param {?} event
         * @return {?}
         */
        ConditionNodeComponent.prototype.dropBottom = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            this.data.addBottomSibling(this.lblSvr.buildDragedNode());
            if (this.lblSvr.dragData.Type === 'node') {
                ((/** @type {?} */ (this.lblSvr.dragData.Data))).remove();
            }
        };
        /**
         * @param {?} event
         * @return {?}
         */
        ConditionNodeComponent.prototype.dropRight = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            this.data.addChildSibling(this.lblSvr.buildDragedNode());
            if (this.lblSvr.dragData.Type === 'node') {
                ((/** @type {?} */ (this.lblSvr.dragData.Data))).remove();
            }
        };
        /**
         * @param {?} event
         * @return {?}
         */
        ConditionNodeComponent.prototype.drop = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            switch (this.lblSvr.dragOverArea) {
                case 'above':
                    this.dropTop(event);
                    break;
                case 'below':
                    this.dropBottom(event);
                    break;
                case 'center':
                    this.dropRight(event);
                    break;
            }
            this.lblSvr.onNodeChange.emit();
            this.lblSvr.dragOverNode = null;
            if (this.lblSvr.prevNodeEle) {
                /** @type {?} */
                var ref = (/** @type {?} */ (this.lblSvr.prevNodeEle.nativeElement));
                ref.style.borderTop = '4px solid transparent';
                ref.style.borderBottom = '4px solid transparent';
                ref.style.backgroundColor = null;
            }
            event.stopPropagation();
        };
        /**
         * @param {?} event
         * @return {?}
         */
        ConditionNodeComponent.prototype.dragStart = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            this.lblSvr.dragData = { Type: 'node', Data: this.data };
        };
        /**
         * @param {?} event
         * @return {?}
         */
        ConditionNodeComponent.prototype.dragover = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            // console.log('dragend');
            this.dvMain.nativeElement.style.borderTop = '4px solid transparent';
            this.dvMain.nativeElement.style.borderBottom = '4px solid transparent';
            this.dvMain.nativeElement.childNodes[0].style.backgroundColor = null;
        };
        /**
         * @param {?} event
         * @return {?}
         */
        ConditionNodeComponent.prototype.delete = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            this.data.remove();
            this.lblSvr.onNodeChange.emit();
        };
        ConditionNodeComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-condition-node',
                        template: "<div class=\"condition-main\" #main (drop)=\"drop($event)\" (dragstart)=\"dragStart($event)\" (dragleave)=\"dragover($event)\">\r\n\t<div class=\"main\" draggable=\"true\">\r\n\t\t<ng-container *ngIf=\"data.NodeType === nodeTypeCondition; else plaintext\">\r\n\t\t\t<div class=\"field\">\r\n\t\t\t\t{{ data.Field }}\r\n\t\t\t</div>\r\n\t\t\t<mat-form-field class=\"operate\" appearance=\"outline\">\r\n\t\t\t\t<mat-select [(value)]=\"data.Operate\" (valueChange)=\"lblSvr.onNodeChange.emit()\">\r\n\t\t\t\t\t<mat-option *ngFor=\"let ope of Operates\" [value]=\"ope.Name\">\r\n\t\t\t\t\t\t{{ ope.Label }}\r\n\t\t\t\t\t</mat-option>\r\n\t\t\t\t</mat-select>\r\n\t\t\t</mat-form-field>\r\n\t\t\t<mat-form-field class=\"value\" appearance=\"outline\">\r\n\t\t\t\t<input matInput placeholder=\"value\" [(ngModel)]=\"data.Value\" (change)=\"lblSvr.onNodeChange.emit()\" />\r\n\t\t\t</mat-form-field>\r\n\t\t\t<button class=\"\u5220\u9664\" mat-icon-button (click)=\"delete($event)\">\r\n\t\t\t\t<mat-icon svgIcon=\"outlined:delete\"></mat-icon>\r\n\t\t\t</button>\r\n\t\t</ng-container>\r\n\t\t<ng-template #plaintext>\r\n\t\t\t<mat-form-field class=\"plaintext\" appearance=\"outline\">\r\n\t\t\t\t<textarea matInput placeholder=\"plaintext\" (change)=\"lblSvr.onNodeChange.emit()\"\r\n\t\t\t\t\t[(ngModel)]=\"data.PlainText\">\r\n\t\t\t</textarea>\r\n\t\t\t</mat-form-field>\r\n\t\t</ng-template>\r\n\t</div>\r\n</div>",
                        styles: ["@charset \"UTF-8\";.condition-main{width:440px;border-top:4px solid transparent;border-bottom:4px solid transparent;margin:-4px 0}.main{display:flex;width:408px;height:40px;border-radius:4px;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2);margin:4px 32px 4px 4px}.main .\u5220\u9664{width:32px;height:40px;line-height:40px;text-align:left;display:none}.main:hover{width:440px;margin:4px 0 4px 4px}.main:hover .\u5220\u9664{display:block}.field{width:152px;height:40px;line-height:40px;box-sizing:border-box;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 8px}.operate,.plaintext,.value{font-size:14px}.operate ::ng-deep .mat-form-field-wrapper,.plaintext ::ng-deep .mat-form-field-wrapper,.value ::ng-deep .mat-form-field-wrapper{padding:0}.operate ::ng-deep .mat-form-field-infix,.plaintext ::ng-deep .mat-form-field-infix,.value ::ng-deep .mat-form-field-infix{border:0;padding:11px 0}.operate ::ng-deep .mat-select-arrow-wrapper,.plaintext ::ng-deep .mat-select-arrow-wrapper,.value ::ng-deep .mat-select-arrow-wrapper{-webkit-transform:translateY(0);transform:translateY(0)}.operate{width:96px}.value{width:160px;margin:0 8px}.plaintext{width:100%}.drop-above{border-top:1px solid red}.drop-below{border-bottom:1px solid red}.drop-center{background-color:#ddd}"]
                    }] }
        ];
        /** @nocollapse */
        ConditionNodeComponent.ctorParameters = function () { return [
            { type: EditLabelService },
            { type: core.ElementRef }
        ]; };
        ConditionNodeComponent.propDecorators = {
            dvMain: [{ type: core.ViewChild, args: ['main', { static: false },] }],
            data: [{ type: core.Input }],
            hostClass: [{ type: core.HostBinding, args: ['class.condition-node',] }]
        };
        return ConditionNodeComponent;
    }());
    if (false) {
        /** @type {?} */
        ConditionNodeComponent.prototype.Operates;
        /** @type {?} */
        ConditionNodeComponent.prototype.nodeTypeCondition;
        /** @type {?} */
        ConditionNodeComponent.prototype.dvMain;
        /** @type {?} */
        ConditionNodeComponent.prototype.data;
        /** @type {?} */
        ConditionNodeComponent.prototype.hostClass;
        /** @type {?} */
        ConditionNodeComponent.prototype.lblSvr;
        /**
         * @type {?}
         * @private
         */
        ConditionNodeComponent.prototype.ref;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var NodeModule = /** @class */ (function () {
        function NodeModule() {
        }
        NodeModule.decorators = [
            { type: core.NgModule, args: [{
                        imports: [
                            common.CommonModule,
                            material.MatFormFieldModule,
                            material.MatSelectModule,
                            material.MatInputModule,
                            dragDrop.DragDropModule,
                            forms.FormsModule,
                            material.MatButtonModule,
                            material.MatIconModule
                        ],
                        exports: [NodeComponent],
                        declarations: [NodeComponent, ConditionNodeComponent],
                        schemas: [core.NO_ERRORS_SCHEMA]
                    },] }
        ];
        return NodeModule;
    }());

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /**
     * @record
     */
    function Item() { }
    if (false) {
        /** @type {?} */
        Item.prototype.CategoryID;
        /** @type {?} */
        Item.prototype.ID;
        /** @type {?} */
        Item.prototype.Name;
    }
    var CategoryComponent = /** @class */ (function () {
        function CategoryComponent(svr, dialog, snackBar, viewportRuler, cd) {
            var _this = this;
            this.svr = svr;
            this.dialog = dialog;
            this.snackBar = snackBar;
            this.viewportRuler = viewportRuler;
            this.cd = cd;
            this.hostClass = true;
            this.source = null;
            this.dropListEnterPredicate = (/**
             * @param {?} drag
             * @param {?} drop
             * @return {?}
             */
            function (drag, drop) {
                if (drop === _this.placeholder) {
                    return true;
                }
                if (drop !== _this.activeContainer) {
                    return false;
                }
                /** @type {?} */
                var phElement = _this.placeholder.element.nativeElement;
                /** @type {?} */
                var sourceElement = drag.dropContainer.element.nativeElement;
                /** @type {?} */
                var dropElement = drop.element.nativeElement;
                /** @type {?} */
                var dragIndex = _this.indexOfNum(dropElement.parentElement.children, _this.source ? phElement : sourceElement);
                /** @type {?} */
                var dropIndex = _this.indexOfNum(dropElement.parentElement.children, dropElement);
                if (!_this.source) {
                    _this.sourceIndex = dragIndex;
                    _this.source = drag.dropContainer;
                    phElement.style.width = sourceElement.clientWidth + 'px';
                    phElement.style.height = sourceElement.clientHeight + 'px';
                    sourceElement.parentElement.removeChild(sourceElement);
                }
                _this.targetIndex = dropIndex;
                _this.target = drop;
                phElement.style.display = '';
                dropElement.parentElement.insertBefore(phElement, dropIndex > dragIndex ? dropElement.nextSibling : dropElement);
                _this.placeholder.enter(drag, drag.element.nativeElement.offsetLeft, drag.element.nativeElement.offsetTop);
                return false;
                // tslint:disable-next-line:semicolon
            });
        }
        /**
         * @return {?}
         */
        CategoryComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        /**
         * @return {?}
         */
        CategoryComponent.prototype.ngAfterViewInit = /**
         * @return {?}
         */
        function () {
            /** @type {?} */
            var phElement = this.placeholder.element.nativeElement;
            phElement.style.display = 'none';
            phElement.parentElement.removeChild(phElement);
        };
        /**
         * @return {?}
         */
        CategoryComponent.prototype.add = /**
         * @return {?}
         */
        function () {
            this.svr.editLabel.add(this.category.ID);
            this.dialog.open(EditLabelComponent, {
                width: '800px',
                height: '100%',
                minWidth: '800px',
                data: this.svr,
                position: {
                    top: '0px',
                    right: '0px'
                }
            });
        };
        /**
         * @return {?}
         */
        CategoryComponent.prototype.addCategoryClick = /**
         * @return {?}
         */
        function () {
            var _this = this;
            /** @type {?} */
            var dialogRef = this.dialog.open(EditCategoryDialogComponent, {
                width: '360px',
                height: '224px',
                data: {
                    name: '新的类别',
                    title: '增加新的类别'
                }
            });
            dialogRef.afterClosed().subscribe((/**
             * @param {?} result
             * @return {?}
             */
            function (result) {
                if (result) {
                    _this.svr
                        .addCategory({ name: result.name, beforeAtID: _this.category.ID })
                        .subscribe((/**
                     * @return {?}
                     */
                    function () { }), _this.errProcess());
                }
            }));
        };
        /**
         * @private
         * @return {?}
         */
        CategoryComponent.prototype.errProcess = /**
         * @private
         * @return {?}
         */
        function () {
            var _this = this;
            return (/**
             * @param {?} err
             * @return {?}
             */
            function (err) {
                if (err instanceof http.HttpErrorResponse) {
                    /** @type {?} */
                    var derr = dbwebCore.IsDuplicatePKError(err.error);
                    if (derr.Yes) {
                        _this.snackBar.open('名称重复', '关闭', { duration: 5000 });
                    }
                    else {
                        _this.snackBar.open(err.error, '关闭', { duration: 5000 });
                    }
                }
                else {
                    _this.snackBar.open(err, '关闭', { duration: 5000 });
                }
            });
        };
        /**
         * @return {?}
         */
        CategoryComponent.prototype.editCategoryClick = /**
         * @return {?}
         */
        function () {
            var _this = this;
            /** @type {?} */
            var dialogRef = this.dialog.open(EditCategoryDialogComponent, {
                width: '360px',
                height: '224px',
                data: {
                    name: this.category.Name,
                    title: '修改类别'
                }
            });
            dialogRef.afterClosed().subscribe((/**
             * @param {?} result
             * @return {?}
             */
            function (result) {
                if (result) {
                    _this.svr
                        .editCategory({ name: result.name, id: _this.category.ID })
                        .subscribe((/**
                     * @return {?}
                     */
                    function () { }), _this.errProcess());
                }
            }));
        };
        /**
         * @return {?}
         */
        CategoryComponent.prototype.up = /**
         * @return {?}
         */
        function () {
            this.svr.setCategoryPosition(this.category, this.category.Position - 1);
        };
        /**
         * @return {?}
         */
        CategoryComponent.prototype.down = /**
         * @return {?}
         */
        function () {
            this.svr.setCategoryPosition(this.category, this.category.Position + 1);
        };
        /**
         * @return {?}
         */
        CategoryComponent.prototype.delete = /**
         * @return {?}
         */
        function () {
            var _this = this;
            /** @type {?} */
            var dialogRef = this.dialog.open(ConfirmDialogComponent, {
                width: '360px',
                height: '224px',
                data: "\u786E\u5B9A\u8981\u5220\u9664\u7C7B\u522B[" + this.category.Name + "]\u53CA\u5176\u6240\u6709\u7684\u6807\u7B7E\u5417\uFF1F"
            });
            dialogRef.afterClosed().subscribe((/**
             * @param {?} result
             * @return {?}
             */
            function (result) {
                if (result) {
                    _this.svr.removeCategory(_this.category.ID).subscribe((/**
                     * @return {?}
                     */
                    function () { }), _this.errProcess());
                }
            }));
        };
        /**
         * @param {?} e
         * @return {?}
         */
        CategoryComponent.prototype.dragMoved = /**
         * @param {?} e
         * @return {?}
         */
        function (e) {
            var _this = this;
            /** @type {?} */
            var point = this.getPointerPositionOnPage(e.event);
            this.listGroup._items.forEach((/**
             * @param {?} dropList
             * @return {?}
             */
            function (dropList) {
                if (__isInsideDropListClientRect(dropList, point.x, point.y)) {
                    _this.activeContainer = dropList;
                    return;
                }
            }));
        };
        /**
         * @param {?} event
         * @return {?}
         */
        CategoryComponent.prototype.dropListDropped = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            var _this = this;
            if (!this.target) {
                return;
            }
            /** @type {?} */
            var phElement = this.placeholder.element.nativeElement;
            /** @type {?} */
            var parent = phElement.parentElement;
            phElement.style.display = 'none';
            parent.removeChild(phElement);
            parent.appendChild(phElement);
            parent.insertBefore(this.source.element.nativeElement, parent.children[this.sourceIndex]);
            this.target = null;
            this.source = null;
            if (this.sourceIndex !== this.targetIndex && this.category.Labels) {
                this.cd.detach();
                // moveItemInArray(this.category.Labels, this.sourceIndex, this.targetIndex);
                this.svr.backface
                    .setLabelPosition({
                    CategoryID: this.category.ID,
                    ID: this.category.Labels[this.sourceIndex].ID,
                    Position: this.targetIndex
                })
                    .subscribe((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) {
                    _this.category.setLabelsPosition(v.map((/**
                     * @param {?} vv
                     * @return {?}
                     */
                    function (vv) { return vv.ID; })));
                    _this.cd.reattach();
                }), this.errProcess());
            }
        };
        /**
         * @param {?} event
         * @return {?}
         */
        CategoryComponent.prototype.getPointerPositionOnPage = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            // `touches` will be empty for start/end events so we have to fall back to `changedTouches`.
            /** @type {?} */
            var point = __isTouchEvent(event) ? event.touches[0] || event.changedTouches[0] : event;
            /** @type {?} */
            var scrollPosition = this.viewportRuler.getViewportScrollPosition();
            return {
                x: point.pageX - scrollPosition.left,
                y: point.pageY - scrollPosition.top
            };
        };
        /**
         * @param {?} collection
         * @param {?} node
         * @return {?}
         */
        CategoryComponent.prototype.indexOfNum = /**
         * @param {?} collection
         * @param {?} node
         * @return {?}
         */
        function (collection, node) {
            return Array.prototype.indexOf.call(collection, node);
        };
        CategoryComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-label-category',
                        template: "<div class=\"title\">\r\n\t<ng-content></ng-content>\r\n\t<span>\r\n\t\t<span class=\"title-name\">{{ category?.displayLabel() }}</span></span\r\n\t>\r\n\t<span>\r\n\t\t<button mat-icon-button (click)=\"editCategoryClick()\">\r\n\t\t\t<mat-icon class=\"\u7C7B\u522B\u529F\u80FD\u56FE\u6807\" svgIcon=\"outlined:edit\"></mat-icon>\r\n\t\t</button>\r\n\t\t<button mat-icon-button (click)=\"delete()\">\r\n\t\t\t<mat-icon class=\"\u7C7B\u522B\u529F\u80FD\u56FE\u6807\" svgIcon=\"outlined:delete\"></mat-icon>\r\n\t\t</button>\r\n\t\t<div class=\"\u5206\u5272\u7EBF\"></div>\r\n\t\t<button mat-icon-button (click)=\"up()\" *ngIf=\"category.Position > 1\">\r\n\t\t\t<mat-icon class=\"\u7C7B\u522B\u529F\u80FD\u56FE\u6807 \u7C7B\u522B\u529F\u80FD\u9AD8\u4EAE\u56FE\u6807\" svgIcon=\"arrow_upward\"></mat-icon>\r\n\t\t</button>\r\n\t\t<button mat-icon-button (click)=\"down()\" *ngIf=\"svr.categorys[svr.categorys.length - 1] !== category\">\r\n\t\t\t<mat-icon class=\"\u7C7B\u522B\u529F\u80FD\u56FE\u6807 \u7C7B\u522B\u529F\u80FD\u9AD8\u4EAE\u56FE\u6807\" svgIcon=\"arrow_downward\"></mat-icon>\r\n\t\t</button>\r\n\r\n\t\t<button mat-icon-button (click)=\"addCategoryClick()\">\r\n\t\t\t<mat-icon class=\"\u7C7B\u522B\u529F\u80FD\u56FE\u6807 \u7C7B\u522B\u529F\u80FD\u9AD8\u4EAE\u56FE\u6807\" svgIcon=\"outlined:add\"></mat-icon>\r\n\t\t</button>\r\n\t</span>\r\n</div>\r\n<div class=\"example-container\" cdkDropListGroup>\r\n\t<div\r\n\t\tcdkDropList\r\n\t\t[cdkDropListEnterPredicate]=\"dropListEnterPredicate\"\r\n\t\t(cdkDropListDropped)=\"dropListDropped($event)\"\r\n\t></div>\r\n\t<div\r\n\t\tcdkDropList\r\n\t\t*ngFor=\"let label of category?.Labels\"\r\n\t\t[cdkDropListEnterPredicate]=\"dropListEnterPredicate\"\r\n\t\t(cdkDropListDropped)=\"dropListDropped($event)\"\r\n\t>\r\n\t\t<common-label-for-edit\r\n\t\t\t[label]=\"label\"\r\n\t\t\t[categoryID]=\"category?.ID\"\r\n\t\t\tcdkDrag\r\n\t\t\tclass=\"example-box \u5355\u4E2A\u6807\u7B7E\"\r\n\t\t\t(cdkDragMoved)=\"dragMoved($event)\"\r\n\t\t>\r\n\t\t\t<mat-icon cdkDragHandle class=\"\u62D6\u52A8\u56FE\u6807\" svgIcon=\"drag_indicator\"> </mat-icon>\r\n\t\t</common-label-for-edit>\r\n\t</div>\r\n\t<span class=\"\u6807\u7B7E \u6DFB\u52A0\u6807\u7B7E\" (click)=\"add()\">\r\n\t\t<mat-icon class=\"\u6DFB\u52A0\u56FE\u6807\" svgIcon=\"add\"></mat-icon>\r\n\t</span>\r\n</div>\r\n",
                        styles: ["@charset \"UTF-8\";:host:hover .title{padding-left:32px;box-sizing:border-box}:host:hover .title .title-name{font-size:14px;font-weight:700}:host:hover .title .\u5206\u5272\u7EBF,:host:hover .title .\u7C7B\u522B\u529F\u80FD\u56FE\u6807{display:inline-block}.title{height:64px;padding:16px 0 16px 8px;box-sizing:border-box;display:flex;justify-content:space-between;align-items:center}.title .title-name{font-size:12px}.title button{width:32px;height:32px;line-height:32px}.title .\u7C7B\u522B\u529F\u80FD\u56FE\u6807{width:24px;height:24px;line-height:24px;cursor:pointer;display:none}.title .\u5206\u5272\u7EBF{width:1px;height:24px;vertical-align:middle;display:none}.\u6807\u7B7E{font-size:14px;display:inline-block;margin:0 16px 8px 0;height:34px;padding:0 24px;border-radius:4px;line-height:34px;cursor:pointer;position:relative}.\u6807\u7B7E:hover .\u67E5\u770B\u6309\u94AE{display:block}.\u5355\u4E2A\u6807\u7B7E{height:34px;border-radius:4px;line-height:34px;margin:0 16px 16px 0;cursor:pointer}.\u5355\u4E2A\u6807\u7B7E .\u62D6\u52A8\u56FE\u6807{width:16px;height:16px;line-height:16px;position:absolute;left:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);display:none}.\u5355\u4E2A\u6807\u7B7E:hover .\u62D6\u52A8\u56FE\u6807{display:block}.\u6DFB\u52A0\u6807\u7B7E{width:40px;padding:0 8px;text-align:center;vertical-align:top}.\u6DFB\u52A0\u56FE\u6807{padding:5px 0;width:24px;height:24px;line-height:24px}.\u67E5\u770B\u6309\u94AE{width:16px;height:16px;line-height:16px;position:absolute;right:0;top:0;display:none}.example-container{padding-left:24px;display:flex;flex-wrap:wrap}.example-box{min-width:50px;position:relative;z-index:1;box-shadow:none}.example-box:last-child{border:0}.cdk-drop-list{display:flex}.cdk-drag-preview{box-sizing:border-box;border-radius:4px}.cdk-drag-placeholder{opacity:.3}.cdk-drag-animating{transition:transform 250ms cubic-bezier(0,0,.2,1);transition:transform 250ms cubic-bezier(0,0,.2,1),-webkit-transform 250ms cubic-bezier(0,0,.2,1)}"]
                    }] }
        ];
        /** @nocollapse */
        CategoryComponent.ctorParameters = function () { return [
            { type: LabelManagerService },
            { type: material.MatDialog },
            { type: material.MatSnackBar },
            { type: overlay.ViewportRuler },
            { type: core.ChangeDetectorRef }
        ]; };
        CategoryComponent.propDecorators = {
            category: [{ type: core.Input }],
            hostClass: [{ type: core.HostBinding, args: ['class.label-category',] }],
            listGroup: [{ type: core.ViewChild, args: [dragDrop.CdkDropListGroup, { static: true },] }],
            placeholder: [{ type: core.ViewChild, args: [dragDrop.CdkDropList, { static: true },] }]
        };
        return CategoryComponent;
    }());
    if (false) {
        /** @type {?} */
        CategoryComponent.prototype.category;
        /** @type {?} */
        CategoryComponent.prototype.hostClass;
        /** @type {?} */
        CategoryComponent.prototype.listGroup;
        /** @type {?} */
        CategoryComponent.prototype.placeholder;
        /** @type {?} */
        CategoryComponent.prototype.target;
        /** @type {?} */
        CategoryComponent.prototype.targetIndex;
        /** @type {?} */
        CategoryComponent.prototype.source;
        /** @type {?} */
        CategoryComponent.prototype.sourceIndex;
        /** @type {?} */
        CategoryComponent.prototype.dragIndex;
        /** @type {?} */
        CategoryComponent.prototype.activeContainer;
        /** @type {?} */
        CategoryComponent.prototype.dropListEnterPredicate;
        /** @type {?} */
        CategoryComponent.prototype.svr;
        /** @type {?} */
        CategoryComponent.prototype.dialog;
        /**
         * @type {?}
         * @private
         */
        CategoryComponent.prototype.snackBar;
        /**
         * @type {?}
         * @private
         */
        CategoryComponent.prototype.viewportRuler;
        /**
         * @type {?}
         * @private
         */
        CategoryComponent.prototype.cd;
    }
    /**
     * Determines whether an event is a touch event.
     * @param {?} event
     * @return {?}
     */
    function __isTouchEvent(event) {
        return event.type.startsWith('touch');
    }
    /**
     * @param {?} dropList
     * @param {?} x
     * @param {?} y
     * @return {?}
     */
    function __isInsideDropListClientRect(dropList, x, y) {
        var _a = dropList.element.nativeElement.getBoundingClientRect(), top = _a.top, bottom = _a.bottom, left = _a.left, right = _a.right;
        return y >= top && y <= bottom && x >= left && x <= right;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var LabelForEditComponent = /** @class */ (function () {
        function LabelForEditComponent(svr, dialog) {
            this.svr = svr;
            this.dialog = dialog;
            this.hostClass = true;
            this.removeConfirm = false;
        }
        /**
         * @return {?}
         */
        LabelForEditComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        /**
         * @return {?}
         */
        LabelForEditComponent.prototype.edit = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.svr.backface.fetchLabel({ CategoryID: this.categoryID, ID: this.label.ID }).subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.svr.backface.stringToNode(v.Conts).subscribe((/**
                 * @param {?} conts
                 * @return {?}
                 */
                function (conts) {
                    _this.svr.editLabel.titleInput = false;
                    _this.svr.editLabel.CategoryID = _this.categoryID;
                    _this.svr.editLabel.LabelID = _this.label.ID;
                    _this.svr.editLabel.isAdd = false;
                    _this.svr.editLabel.Name = v.Name;
                    _this.svr.editLabel.Conts = Node.fromInterface(conts);
                    _this.svr.editLabel.PlainText = v.PlainText;
                    _this.dialog.open(EditLabelComponent, {
                        width: '800px',
                        height: '100%',
                        minWidth: '800px',
                        disableClose: true,
                        data: _this.svr,
                        position: {
                            top: '0px',
                            right: '0px'
                        }
                    });
                }));
            }));
        };
        /**
         * @return {?}
         */
        LabelForEditComponent.prototype.remove = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.svr.removeLabel(this.categoryID, this.label.ID).subscribe((/**
             * @return {?}
             */
            function () { return (_this.removeConfirm = false); }));
        };
        LabelForEditComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-label-for-edit',
                        template: "<div class=\"\u6807\u7B7E\">\r\n\t<span class=\"label-text\">\r\n\t\t{{ label?.displayLabel() }}\r\n\t</span>\r\n\t<mat-icon class=\"\u7F16\u8F91\u56FE\u6807 \u56FE\u6807\" svgIcon=\"outlined:edit\" (click)=\"edit()\"></mat-icon>\r\n\t<ng-content></ng-content>\r\n\r\n\t<mat-icon *ngIf=\"!removeConfirm\" (click)=\"removeConfirm = true\" class=\"\u5220\u9664\u6807\u7B7E \u56FE\u6807\" svgIcon=\"outlined:delete\">\r\n\t</mat-icon>\r\n\t<div *ngIf=\"removeConfirm\" class=\"\u4E8C\u6B21\u786E\u8BA4\">\r\n\t\t<span class=\"\u4E8C\u6B21\u786E\u8BA4-\u786E\u5B9A\" (click)=\"remove()\">\u786E\u5B9A</span>\r\n\t\t<span class=\"\u4E8C\u6B21\u786E\u8BA4-\u53D6\u6D88\" (click)=\"removeConfirm = false\">\u53D6\u6D88</span>\r\n\t</div>\r\n</div>\r\n",
                        styles: ["@charset \"UTF-8\";.\u6807\u7B7E{font-size:14px;display:inline-block;height:34px;padding:0 24px;border-radius:4px;line-height:34px;cursor:pointer;position:relative}.\u6807\u7B7E .\u7F16\u8F91\u56FE\u6807{position:absolute;right:0;top:0}.\u6807\u7B7E .\u62D6\u52A8\u56FE\u6807{position:absolute;left:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.\u6807\u7B7E .\u5220\u9664\u6807\u7B7E{position:absolute;right:0;bottom:0}.\u6807\u7B7E .\u56FE\u6807{width:16px;height:16px;line-height:16px;display:none}.\u6807\u7B7E .\u4E8C\u6B21\u786E\u8BA4{width:100%;height:100%;position:absolute;top:0;left:0;font-size:12px}.\u6807\u7B7E .\u4E8C\u6B21\u786E\u8BA4 .\u4E8C\u6B21\u786E\u8BA4-\u53D6\u6D88,.\u6807\u7B7E .\u4E8C\u6B21\u786E\u8BA4 .\u4E8C\u6B21\u786E\u8BA4-\u786E\u5B9A{text-align:center;display:inline-block;width:50%;height:100%}.\u6807\u7B7E:hover .\u56FE\u6807{display:block}.label-text{border:1px solid transparent}"]
                    }] }
        ];
        /** @nocollapse */
        LabelForEditComponent.ctorParameters = function () { return [
            { type: LabelManagerService },
            { type: material.MatDialog }
        ]; };
        LabelForEditComponent.propDecorators = {
            label: [{ type: core.Input }],
            categoryID: [{ type: core.Input }],
            hostClass: [{ type: core.HostBinding, args: ['class.label-for-edit',] }]
        };
        return LabelForEditComponent;
    }());
    if (false) {
        /** @type {?} */
        LabelForEditComponent.prototype.label;
        /** @type {?} */
        LabelForEditComponent.prototype.categoryID;
        /** @type {?} */
        LabelForEditComponent.prototype.hostClass;
        /** @type {?} */
        LabelForEditComponent.prototype.removeConfirm;
        /** @type {?} */
        LabelForEditComponent.prototype.svr;
        /**
         * @type {?}
         * @private
         */
        LabelForEditComponent.prototype.dialog;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var LabelManagerComponent = /** @class */ (function () {
        function LabelManagerComponent(svr, dialog, snackBar) {
            this.svr = svr;
            this.dialog = dialog;
            this.snackBar = snackBar;
            this.hostClass = true;
            this.hasClose = true;
            this.close = new core.EventEmitter();
        }
        Object.defineProperty(LabelManagerComponent.prototype, "eleName", {
            set: /**
             * @param {?} val
             * @return {?}
             */
            function (val) {
                this.svr.eleName = val;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(LabelManagerComponent.prototype, "ownerBy", {
            set: /**
             * @param {?} val
             * @return {?}
             */
            function (val) {
                this.svr.ownerBy = val;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(LabelManagerComponent.prototype, "owner", {
            set: /**
             * @param {?} val
             * @return {?}
             */
            function (val) {
                this.svr.owner = val;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(LabelManagerComponent.prototype, "allColumnsWithLetter", {
            set: /**
             * @param {?} val
             * @return {?}
             */
            function (val) {
                this.svr.allColumnsWithLetter = val;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(LabelManagerComponent.prototype, "backface", {
            set: /**
             * @param {?} val
             * @return {?}
             */
            function (val) {
                this.svr.backface = val;
            },
            enumerable: true,
            configurable: true
        });
        /**
         * @return {?}
         */
        LabelManagerComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            this.svr.fetchCategories();
        };
        /**
         * @return {?}
         */
        LabelManagerComponent.prototype.addCategoryClick = /**
         * @return {?}
         */
        function () {
            var _this = this;
            /** @type {?} */
            var dialogRef = this.dialog.open(EditCategoryDialogComponent, {
                width: '360px',
                height: '224px',
                data: {
                    name: '新的类别',
                    title: '增加新的类别'
                }
            });
            dialogRef.afterClosed().subscribe((/**
             * @param {?} result
             * @return {?}
             */
            function (result) {
                if (result) {
                    _this.svr.addCategory({ name: result.name }).subscribe((/**
                     * @return {?}
                     */
                    function () { }), (/**
                     * @param {?} err
                     * @return {?}
                     */
                    function (err) {
                        _this.snackBar.open(err, '确定', { duration: 5000 });
                    }));
                }
            }));
        };
        /**
         * @return {?}
         */
        LabelManagerComponent.prototype.openHisDialog = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.svr.fetchCategoryLabelHis().subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.dialog.open(ShowHistoryDialogComponent, {
                    width: '360px',
                    data: v,
                    position: {
                        top: '46px',
                        right: '16px'
                    }
                });
            }));
        };
        /**
         * @param {?} event
         * @return {?}
         */
        LabelManagerComponent.prototype.drop = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            this.svr.setCategoryPosition(this.svr.categorys[event.previousIndex], event.currentIndex + 1);
        };
        /**
         * @return {?}
         */
        LabelManagerComponent.prototype.categoryDisplayTitle = /**
         * @return {?}
         */
        function () {
            switch (this.svr.ownerBy) {
                case OwnerByEnum.ownerByEle:
                    return '缺省';
                case OwnerByEnum.ownerByDept:
                    return "" + this.svr.owner;
                case OwnerByEnum.ownerByUser:
                    return '私有';
            }
        };
        LabelManagerComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-label-manager',
                        template: "<!-- <ng-container *ngIf=\"svr.editLabel.showEditLabel; else editList\"> -->\r\n<!-- <common-edit-label #labelEditUI *ngIf=\"!svr.editLabel.showEditLabel\"> </common-edit-label> -->\r\n<!-- </ng-container> -->\r\n<ng-container>\r\n\t<div class=\"content\">\r\n\t\t<div class=\"title\">\r\n\t\t\t<div class=\"title-name\">{{ title }}\u6807\u7B7E\u7F16\u8F91</div>\r\n\t\t\t<button class=\"\u65E5\u5FD7\" mat-button (click)=\"openHisDialog()\">\r\n\t\t\t\t<mat-icon svgIcon=\"photo_album\"></mat-icon>\r\n\t\t\t\t\u65E5\u5FD7 <mat-icon svgIcon=\"double_down\" class=\"\u5411\u4E0B\u53CC\u7BAD\u5934\"></mat-icon>\r\n\t\t\t</button>\r\n\t\t</div>\r\n\t\t<div\r\n\t\t\tclass=\"edit-list\"\r\n\t\t\t*ngIf=\"svr.categorys?.length > 0; else empty\"\r\n\t\t\tcdkDropList\r\n\t\t\t(cdkDropListDropped)=\"drop($event)\"\r\n\t\t>\r\n\t\t\t<common-label-category *ngFor=\"let category of svr.categorys\" class=\"\u7C7B\u522B\" [category]=\"category\" cdkDrag>\r\n\t\t\t\t<mat-icon cdkDragHandle class=\"\u62D6\u52A8\" svgIcon=\"drag_indicator\"></mat-icon>\r\n\t\t\t</common-label-category>\r\n\t\t</div>\r\n\t\t<ng-template #empty>\r\n\t\t\t<div class=\"\u521B\u5EFA\">\r\n\t\t\t\t<div class=\"\u521B\u5EFA-\u6807\u9898\">\u6682\u65E0\u4EFB\u4F55\u6807\u7B7E</div>\r\n\t\t\t\t<div class=\"\u521B\u5EFA-\u63D0\u793A\">\u70B9\u51FB\u521B\u5EFA\u6309\u94AE\u521B\u5EFA\u7C7B\u522B\u540E\u5373\u53EF\u65B0\u589E\u6807\u7B7E</div>\r\n\t\t\t\t<button mat-stroked-button (click)=\"addCategoryClick()\">\r\n\t\t\t\t\t<mat-icon svgIcon=\"add\"></mat-icon> \u521B\u5EFA\r\n\t\t\t\t</button>\r\n\t\t\t</div>\r\n\t\t</ng-template>\r\n\t\t<div class=\"footer\" *ngIf=\"hasClose\">\r\n\t\t\t<button mat-button (click)=\"close.emit()\" mat-flat-button color=\"primary\">\u5173\u95ED</button>\r\n\t\t</div>\r\n\t</div>\r\n</ng-container>\r\n",
                        providers: [LabelManagerService],
                        styles: ["@charset \"UTF-8\";:host{width:100%;height:100%}.content{width:100%;height:100%;display:flex;flex-direction:column}.title{display:flex;padding:8px 16px 8px 24px;justify-content:space-between}.title .title-name{font-size:16px;font-weight:700}.\u521B\u5EFA{flex-grow:1;display:flex;flex-direction:column;justify-content:center;align-items:center}.\u521B\u5EFA .\u521B\u5EFA-\u6807\u9898{text-align:center;font-size:18;font-weight:700}.\u521B\u5EFA .\u521B\u5EFA-\u63D0\u793A{margin:8px 0 24px;font-size:12px}.\u521B\u5EFA button{width:88px;height:32px;line-height:32px}.edit-list{width:100%;flex-grow:1;overflow-y:auto;box-sizing:border-box}.\u7C7B\u522B{position:relative}.\u7C7B\u522B .\u62D6\u52A8{position:absolute;top:24px;left:0;width:16px;height:16px;line-height:16px;vertical-align:middle;cursor:pointer;display:none}.\u7C7B\u522B:hover .\u62D6\u52A8{display:inline-block}.footer{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;padding:16px;height:64px;box-sizing:border-box}.\u65E5\u5FD7{height:24px;line-height:24px;padding:0 8px;font-size:12px}.\u65E5\u5FD7 .mat-icon{width:16px;height:16px;line-height:16px}.\u65E5\u5FD7 .\u5411\u4E0B\u53CC\u7BAD\u5934{width:12px;height:12px;line-height:12px}"]
                    }] }
        ];
        /** @nocollapse */
        LabelManagerComponent.ctorParameters = function () { return [
            { type: LabelManagerService },
            { type: material.MatDialog },
            { type: material.MatSnackBar }
        ]; };
        LabelManagerComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.label-manager',] }],
            title: [{ type: core.Input }],
            eleName: [{ type: core.Input }],
            ownerBy: [{ type: core.Input }],
            owner: [{ type: core.Input }],
            allColumnsWithLetter: [{ type: core.Input }],
            backface: [{ type: core.Input }],
            hasClose: [{ type: core.Input }],
            close: [{ type: core.Output }]
        };
        return LabelManagerComponent;
    }());
    if (false) {
        /** @type {?} */
        LabelManagerComponent.prototype.hostClass;
        /** @type {?} */
        LabelManagerComponent.prototype.title;
        /** @type {?} */
        LabelManagerComponent.prototype.hasClose;
        /** @type {?} */
        LabelManagerComponent.prototype.close;
        /** @type {?} */
        LabelManagerComponent.prototype.svr;
        /** @type {?} */
        LabelManagerComponent.prototype.dialog;
        /**
         * @type {?}
         * @private
         */
        LabelManagerComponent.prototype.snackBar;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var LabelManagerModule = /** @class */ (function () {
        function LabelManagerModule() {
        }
        LabelManagerModule.decorators = [
            { type: core.NgModule, args: [{
                        declarations: [
                            LabelManagerComponent,
                            CategoryComponent,
                            LabelForEditComponent,
                            EditCategoryDialogComponent,
                            EditLabelComponent,
                            LabelHistoryComponent
                        ],
                        imports: [
                            common.CommonModule,
                            forms.FormsModule,
                            material.MatIconModule,
                            material.MatInputModule,
                            material.MatDividerModule,
                            material.MatSnackBarModule,
                            material.MatButtonModule,
                            material.MatDialogModule,
                            material.MatTooltipModule,
                            material.MatFormFieldModule,
                            material.MatSelectModule,
                            ng2AceEditor.AceEditorModule,
                            ConfirmDialogModule,
                            dragDrop.DragDropModule,
                            NodeModule,
                            ShowHistoryDialogModule
                        ],
                        exports: [LabelManagerComponent],
                        entryComponents: [EditCategoryDialogComponent, LabelHistoryComponent, EditLabelComponent],
                        schemas: [core.NO_ERRORS_SCHEMA]
                    },] }
        ];
        return LabelManagerModule;
    }());

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /** @enum {string} */
    var CTType = {
        // CTTypeInput 录入
        Input: 'I',
        // CTTypeSelect 单选
        Select: 'S',
        // CTTypeSlider 范围选择
        Slider: 'SL',
        // CTTypeMultiSelect 多选
        MultiSelect: 'MS',
        // CTTypeRangeInput 范围录入
        RangeInput: 'RI',
    };
    /**
     * @record
     */
    function RecordViewParam() { }
    if (false) {
        /** @type {?} */
        RecordViewParam.prototype.DB;
        /** @type {?} */
        RecordViewParam.prototype.Sql;
        /** @type {?} */
        RecordViewParam.prototype.ManualPage;
        /** @type {?} */
        RecordViewParam.prototype.TableName;
        /** @type {?} */
        RecordViewParam.prototype.UniqueField;
        /** @type {?} */
        RecordViewParam.prototype.Columns;
        /** @type {?} */
        RecordViewParam.prototype.Processes;
        /** @type {?} */
        RecordViewParam.prototype.AllColumns;
        /** @type {?} */
        RecordViewParam.prototype.ConditionalTemplates;
    }
    /**
     * @record
     */
    function ConditionalTemplate() { }
    if (false) {
        /** @type {?} */
        ConditionalTemplate.prototype.Type;
        /** @type {?} */
        ConditionalTemplate.prototype.Field;
        /** @type {?} */
        ConditionalTemplate.prototype.Setting;
    }
    /**
     * @record
     */
    function Option() { }
    if (false) {
        /** @type {?} */
        Option.prototype.Text;
        /** @type {?} */
        Option.prototype.Value;
    }
    /**
     * @record
     */
    function CTSelectSetting() { }
    if (false) {
        /** @type {?} */
        CTSelectSetting.prototype.Options;
        /** @type {?} */
        CTSelectSetting.prototype.OtherOption;
    }
    /**
     * @record
     */
    function CTSilderSetting() { }
    if (false) {
        /** @type {?} */
        CTSilderSetting.prototype.Min;
        /** @type {?} */
        CTSilderSetting.prototype.Max;
        /** @type {?|undefined} */
        CTSilderSetting.prototype.Step;
        /** @type {?} */
        CTSilderSetting.prototype.EnforceStep;
        /** @type {?} */
        CTSilderSetting.prototype.PositiveInfinity;
        /** @type {?} */
        CTSilderSetting.prototype.NegativeInfinity;
        /** @type {?} */
        CTSilderSetting.prototype.LabelTemplate;
        /** @type {?} */
        CTSilderSetting.prototype.Ratio;
    }
    var SilderSetting = /** @class */ (function () {
        function SilderSetting(data) {
            this.data = data;
            this.translate = this.translate.bind(this);
        }
        /**
         * @return {?}
         */
        SilderSetting.defaultOptions = /**
         * @return {?}
         */
        function () {
            return {
                floor: 0,
                ceil: 100,
                draggableRange: true
            };
        };
        /**
         * @param {?} val
         * @return {?}
         */
        SilderSetting.prototype.translate = /**
         * @param {?} val
         * @return {?}
         */
        function (val) {
            if (this.data.PositiveInfinity && this.data.Max === val) {
                return '∞';
            }
            if (this.data.NegativeInfinity && this.data.Min === val) {
                return '-∞';
            }
            if (this.data.LabelTemplate) {
                return this.data.LabelTemplate.replace('${val}', "" + val);
            }
            return "" + val;
        };
        /**
         * @return {?}
         */
        SilderSetting.prototype.toOptions = /**
         * @return {?}
         */
        function () {
            /** @type {?} */
            var rev = (/** @type {?} */ ({
                floor: this.data.Min ? this.data.Min : 0,
                ceil: this.data.Max ? this.data.Max : 100,
                draggableRange: true,
                translate: this.translate
            }));
            if (this.data.Step) {
                if (this.data.EnforceStep) {
                    rev.step = this.data.Step;
                }
                else {
                    rev.tickStep = this.data.Step;
                }
                rev.showTicks = true;
            }
            return rev;
        };
        return SilderSetting;
    }());
    if (false) {
        /** @type {?} */
        SilderSetting.prototype.data;
    }
    /**
     * @record
     */
    function CTMultiSelectSetting() { }
    if (false) {
        /** @type {?} */
        CTMultiSelectSetting.prototype.Options;
        /** @type {?} */
        CTMultiSelectSetting.prototype.OtherOption;
    }
    /**
     * @record
     */
    function CTRangeInputSetting() { }
    if (false) {
        /** @type {?} */
        CTRangeInputSetting.prototype.LowLabel;
        /** @type {?} */
        CTRangeInputSetting.prototype.HighLabel;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ConditionalTemplateComponent = /** @class */ (function () {
        function ConditionalTemplateComponent(elementSvr) {
            this.elementSvr = elementSvr;
            this.hostClass = true;
            this.optionType = '区间选择';
            this.optionIndicator = '联系地址';
            this.Input = CTType.Input;
            this.Select = CTType.Select;
            this.Slider = CTType.Slider;
            this.MultiSelect = CTType.MultiSelect;
            this.RangeInput = CTType.RangeInput;
            this.svr = (/** @type {?} */ (this.elementSvr.data.recordview));
        }
        /**
         * @return {?}
         */
        ConditionalTemplateComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        /**
         * @param {?} event
         * @return {?}
         */
        ConditionalTemplateComponent.prototype.drop = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            dragDrop.moveItemInArray(this.svr.Params.ConditionalTemplates, event.previousIndex, event.currentIndex);
        };
        /**
         * @return {?}
         */
        ConditionalTemplateComponent.prototype.addCondition = /**
         * @return {?}
         */
        function () {
            this.svr.Params.ConditionalTemplates = this.svr.Params.ConditionalTemplates || [];
            /** @type {?} */
            var c = (/** @type {?} */ ({
                Type: CTType.Input,
                Field: this.svr.Params.AllColumns.length > 0 ? this.svr.Params.AllColumns[0].Name : undefined,
                Setting: {}
            }));
            this.svr.Params.ConditionalTemplates.push(c);
            this.svr.currentConditionTemplate = c;
        };
        /**
         * @param {?} data
         * @return {?}
         */
        ConditionalTemplateComponent.prototype.SelectCondition = /**
         * @param {?} data
         * @return {?}
         */
        function (data) {
            data.Setting = data.Setting || {};
            this.svr.currentConditionTemplate = data;
        };
        /**
         * @return {?}
         */
        ConditionalTemplateComponent.prototype.remove = /**
         * @return {?}
         */
        function () {
            var _this = this;
            /** @type {?} */
            var idx = this.svr.Params.ConditionalTemplates.findIndex((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v === _this.svr.currentConditionTemplate; }));
            this.svr.Params.ConditionalTemplates.splice(idx, 1);
            if (this.svr.Params.ConditionalTemplates.length > 0) {
                this.svr.currentConditionTemplate = this.svr.Params.ConditionalTemplates[Math.min(idx, this.svr.Params.ConditionalTemplates.length - 1)];
            }
            else {
                this.svr.currentConditionTemplate = undefined;
            }
        };
        /**
         * @return {?}
         */
        ConditionalTemplateComponent.prototype.typeChange = /**
         * @return {?}
         */
        function () {
            switch (this.svr.currentConditionTemplate.Type) {
                case CTType.Input:
                    this.svr.currentConditionTemplate.Setting = {};
                    break;
                case CTType.Select:
                    this.svr.currentConditionTemplate.Setting = (/** @type {?} */ (this.svr.currentConditionTemplate
                        .Setting));
                    break;
                case CTType.MultiSelect:
                    this.svr.currentConditionTemplate.Setting = (/** @type {?} */ (this.svr.currentConditionTemplate
                        .Setting));
                    break;
                case CTType.RangeInput:
                    this.svr.currentConditionTemplate.Setting = (/** @type {?} */ (this.svr.currentConditionTemplate
                        .Setting));
                    break;
                case CTType.Slider:
                    this.svr.currentConditionTemplate.Setting = (/** @type {?} */ (this.svr.currentConditionTemplate
                        .Setting));
                    break;
            }
        };
        /**
         * @param {?} ty
         * @return {?}
         */
        ConditionalTemplateComponent.prototype.typeName = /**
         * @param {?} ty
         * @return {?}
         */
        function (ty) {
            switch (ty) {
                case CTType.Input:
                    return '录入';
                case CTType.Select:
                    return '单选';
                case CTType.MultiSelect:
                    return '多选';
                case CTType.RangeInput:
                    return '范围录入';
                case CTType.Slider:
                    return '范围选择';
            }
        };
        ConditionalTemplateComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-conditional-template',
                        template: "<div class=\"\u6761\u4EF6\u5217\u8868\">\r\n\t<div class=\"\u6761\u4EF6\u6807\u9898 \u5B57\u4F53\u989C\u8272\">\r\n\t\t<span>\u6761\u4EF6\u5217\u8868</span>\r\n\t\t<span class=\"\u65B0\u589E\u6761\u4EF6 \u5B57\u4F53\u989C\u8272\" (click)=\"addCondition()\">\r\n\t\t\t<mat-icon svgIcon=\"add_circle\"></mat-icon>\r\n\t\t\t<span>\u65B0\u589E\u6761\u4EF6</span>\r\n\t\t</span>\r\n\t</div>\r\n\t<div cdkDropList class=\"example-list\" (cdkDropListDropped)=\"drop($event)\">\r\n\t\t<div\r\n\t\t\tclass=\"example-box\"\r\n\t\t\t*ngFor=\"let condition of svr.Params.ConditionalTemplates\"\r\n\t\t\tcdkDrag\r\n\t\t\t(click)=\"SelectCondition(condition)\"\r\n\t\t\t[ngClass]=\"{ active: condition == svr.currentConditionTemplate }\"\r\n\t\t>\r\n\t\t\t<mat-icon cdkDragHandle class=\"\u62D6\u52A8 \u56FE\u6807\" svgIcon=\"drag_indicator\"> </mat-icon>\r\n\t\t\t{{ condition.Field }}-{{ typeName(condition.Type) }}\r\n\t\t\t<mat-icon\r\n\t\t\t\tclass=\"\u6307\u793A\u7BAD\u5934\"\r\n\t\t\t\t*ngIf=\"condition == svr.currentConditionTemplate\"\r\n\t\t\t\tsvgIcon=\"chevron_right\"\r\n\t\t\t></mat-icon>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n<div class=\"\u5206\u5272\u7EBF \u5206\u5272\u7EBF\u8272\u503C\"></div>\r\n<ng-template #emptyUI>\r\n\t<div class=\"\u6761\u4EF6\u8BBE\u7F6E\">\r\n\t\t<div class=\"\u6761\u4EF6\u6807\u9898 \u5B57\u4F53\u989C\u8272\">\r\n\t\t\t<span>\u6761\u4EF6\u8BBE\u7F6E</span>\r\n\t\t</div>\r\n\t\t<div class=\"\u65E0\u6761\u4EF6\u7F16\u8F91\">\r\n\t\t\t<div>\u65E0\u53EF\u7F16\u8F91\u5185\u5BB9</div>\r\n\t\t\t<div class=\"\u9009\u62E9\u63D0\u793A\">\u70B9\u51FB\u5DE6\u4FA7\u67D0\u4E00\u6761\u4EF6\u5217\u5BF9\u5176\u8FDB\u884C\u7F16\u8F91</div>\r\n\t\t</div>\r\n\t</div>\r\n</ng-template>\r\n\r\n<div class=\"\u6761\u4EF6\u8BBE\u7F6E\" *ngIf=\"svr.currentConditionTemplate; else emptyUI\">\r\n\t<div class=\"\u6761\u4EF6\u6807\u9898 \u5B57\u4F53\u989C\u8272\">\r\n\t\t<span>\u6761\u4EF6\u8BBE\u7F6E</span>\r\n\t\t<button mat-icon-button (click)=\"remove()\">\r\n\t\t\t<mat-icon class=\"\u5220\u9664\" svgIcon=\"outlined:delete\" title=\"\u5220\u9664\"> </mat-icon>\r\n\t\t</button>\r\n\t</div>\r\n\t<div class=\"\u591A\u6761\u4EF6-\u4E8C\u7EA7\u6807\u9898\">\u6307\u6807\u540D\u79F0</div>\r\n\t<mat-form-field class=\"\u9009\u62E9\u6846\" appearance=\"outline\">\r\n\t\t<mat-select [(value)]=\"svr.currentConditionTemplate.Field\">\r\n\t\t\t<mat-option *ngFor=\"let col of svr.Params.AllColumns\" [value]=\"col.Name\">{{ col.Name }}</mat-option>\r\n\t\t</mat-select>\r\n\t</mat-form-field>\r\n\t<div class=\"\u591A\u6761\u4EF6-\u4E8C\u7EA7\u6807\u9898\">\u7C7B\u578B</div>\r\n\t<mat-form-field class=\"\u9009\u62E9\u6846\" appearance=\"outline\">\r\n\t\t<mat-select [(value)]=\"svr.currentConditionTemplate.Type\" (valueChange)=\"typeChange()\">\r\n\t\t\t<mat-option [value]=\"Input\">{{ typeName(Input) }}</mat-option>\r\n\t\t\t<mat-option [value]=\"Select\">{{ typeName(Select) }}</mat-option>\r\n\t\t\t<mat-option [value]=\"MultiSelect\">{{ typeName(MultiSelect) }} </mat-option>\r\n\t\t\t<mat-option [value]=\"RangeInput\">{{ typeName(RangeInput) }} </mat-option>\r\n\t\t\t<mat-option [value]=\"Slider\">{{ typeName(Slider) }}</mat-option>\r\n\t\t</mat-select>\r\n\t</mat-form-field>\r\n\t<div class=\"\u6837\u5F0F\u8BBE\u7F6E\" [ngSwitch]=\"true\">\r\n\t\t<common-select-setting\r\n\t\t\t*ngSwitchCase=\"\r\n\t\t\t\tsvr.currentConditionTemplate.Type == Select || svr.currentConditionTemplate.Type == MultiSelect\r\n\t\t\t\"\r\n\t\t\t[data]=\"svr.currentConditionTemplate.Setting\"\r\n\t\t>\r\n\t\t</common-select-setting>\r\n\t\t<common-range-input-setting\r\n\t\t\t*ngSwitchCase=\"svr.currentConditionTemplate.Type == RangeInput\"\r\n\t\t\t[data]=\"svr.currentConditionTemplate.Setting\"\r\n\t\t>\r\n\t\t</common-range-input-setting>\r\n\t\t<common-slider-setting\r\n\t\t\t*ngSwitchCase=\"svr.currentConditionTemplate.Type == Slider\"\r\n\t\t\t[inData]=\"svr.currentConditionTemplate.Setting\"\r\n\t\t>\r\n\t\t</common-slider-setting>\r\n\t</div>\r\n</div>\r\n",
                        styles: ["@charset \"UTF-8\";:host{width:100%;height:100%;padding:16px 0;box-sizing:border-box;display:flex}.\u6761\u4EF6\u8BBE\u7F6E{min-width:240px;flex-grow:2;height:100%;overflow-y:auto;padding:0 24px;box-sizing:border-box;position:relative;display:flex;flex-direction:column}.\u6761\u4EF6\u8BBE\u7F6E .\u9009\u62E9\u6846{width:100%;max-width:384px}.\u6761\u4EF6\u8BBE\u7F6E .\u9009\u62E9\u6846 ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:10px;vertical-align:bottom;-webkit-transform:translateY(0);transform:translateY(0)}.\u6761\u4EF6\u8BBE\u7F6E .\u9009\u62E9\u6846 ::ng-deep .mat-form-field-infix{border:0;font-size:14px;padding:10px 0;box-sizing:border-box}.\u6761\u4EF6\u8BBE\u7F6E .\u9009\u62E9\u6846 ::ng-deep .mat-select-arrow-wrapper{display:block}.\u6761\u4EF6\u8BBE\u7F6E .\u9009\u62E9\u6846 ::ng-deep .mat-form-field.mat-focused .mat-form-field-label{color:#50d0fb!important}.\u6761\u4EF6\u8BBE\u7F6E .\u6837\u5F0F\u8BBE\u7F6E{margin-top:40px;width:100%;height:0;flex-grow:1}.\u6761\u4EF6\u8BBE\u7F6E .\u65E0\u6761\u4EF6\u7F16\u8F91{position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);text-align:center;font-size:18px;font-weight:700}.\u6761\u4EF6\u8BBE\u7F6E .\u65E0\u6761\u4EF6\u7F16\u8F91 .\u9009\u62E9\u63D0\u793A{margin-top:8;font-size:12px;font-weight:inherit}.\u5206\u5272\u7EBF{height:100%;width:1px}.\u6761\u4EF6\u5217\u8868{max-width:272px;min-width:200px;flex-grow:1;height:100%;padding:8px 16px;box-sizing:border-box;display:flex;flex-direction:column}.example-list{width:100%;flex-grow:1;display:block;overflow-y:auto;box-shadow:none!important}.example-box{padding:20px;box-shadow:none;box-sizing:border-box;cursor:pointer;font-size:14px;position:relative}.example-box:hover{z-index:99;box-shadow:0 4px 5px 0 rgba(0,0,0,.14)}.example-box:hover .\u56FE\u6807{display:block}.example-box .\u6307\u793A\u7BAD\u5934{width:24px;height:24px;position:absolute;right:8px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.example-box .\u56FE\u6807{width:16px;height:16px;display:none}.example-box .\u62D6\u52A8{position:absolute;top:50%;left:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.\u6761\u4EF6\u6807\u9898{width:100%;margin-bottom:16px;line-height:40px;font-weight:700;display:flex;justify-content:space-between}.\u6761\u4EF6\u6807\u9898 .\u65B0\u589E\u6761\u4EF6{cursor:pointer;font-size:14px}.\u6761\u4EF6\u6807\u9898 .\u65B0\u589E\u6761\u4EF6 .mat-icon{width:24px;height:24px;line-height:24px;margin-right:8px;vertical-align:middle}.\u591A\u6761\u4EF6-\u4E8C\u7EA7\u6807\u9898{display:block;font-size:12px;margin-bottom:8px}.example-box:last-child{border:none}"]
                    }] }
        ];
        /** @nocollapse */
        ConditionalTemplateComponent.ctorParameters = function () { return [
            { type: ElementService }
        ]; };
        ConditionalTemplateComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.conditional-template',] }]
        };
        return ConditionalTemplateComponent;
    }());
    if (false) {
        /** @type {?} */
        ConditionalTemplateComponent.prototype.hostClass;
        /** @type {?} */
        ConditionalTemplateComponent.prototype.optionType;
        /** @type {?} */
        ConditionalTemplateComponent.prototype.optionIndicator;
        /** @type {?} */
        ConditionalTemplateComponent.prototype.Input;
        /** @type {?} */
        ConditionalTemplateComponent.prototype.Select;
        /** @type {?} */
        ConditionalTemplateComponent.prototype.Slider;
        /** @type {?} */
        ConditionalTemplateComponent.prototype.MultiSelect;
        /** @type {?} */
        ConditionalTemplateComponent.prototype.RangeInput;
        /** @type {?} */
        ConditionalTemplateComponent.prototype.svr;
        /** @type {?} */
        ConditionalTemplateComponent.prototype.elementSvr;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var SelectSettingComponent = /** @class */ (function () {
        function SelectSettingComponent() {
            this.hostClass = true;
        }
        /**
         * @return {?}
         */
        SelectSettingComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            this.data.Options = this.data.Options || [];
            if (this.data.Options.length === 0) {
                this.data.Options.push((/** @type {?} */ ({ Text: '新的选项', Value: 'val' })));
            }
        };
        /**
         * @param {?} idx
         * @return {?}
         */
        SelectSettingComponent.prototype.add = /**
         * @param {?} idx
         * @return {?}
         */
        function (idx) {
            this.data.Options.splice(idx + 1, 0, (/** @type {?} */ ({ Text: '新的选项', Value: 'val' })));
        };
        /**
         * @param {?} idx
         * @return {?}
         */
        SelectSettingComponent.prototype.remove = /**
         * @param {?} idx
         * @return {?}
         */
        function (idx) {
            this.data.Options.splice(idx, 1);
        };
        SelectSettingComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-select-setting',
                        template: "<div class=\"\u95F4\u8DDD title\">\u6837\u5F0F\u8BBE\u7F6E</div>\r\n<div class=\"\u591A\u9879\u9009\u62E9\">\r\n\t<div class=\"\u95F4\u8DDD\" *ngFor=\"let item of data.Options; let idx = index\">\r\n\t\t<div class=\"title\">\u9009\u9879{{ idx + 1 }}</div>\r\n\t\t<div class=\"\u9009\u9879\">\r\n\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t<input matInput [(ngModel)]=\"item.Value\" placeholder=\"\u8BF7\u8F93\u5165\u540D\u79F0\" />\r\n\t\t\t</mat-form-field>\r\n\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t<input matInput [(ngModel)]=\"item.Text\" placeholder=\"\u8BF7\u8F93\u5165\u503C\" />\r\n\t\t\t</mat-form-field>\r\n\t\t\t<mat-icon class=\"\u6DFB\u52A0\" (click)=\"add(idx)\" svgIcon=\"add_circle\"> </mat-icon>\r\n\t\t\t<mat-icon class=\"\u5220\u9664\" (click)=\"remove(idx)\" *ngIf=\"data.Options.length > 1\" svgIcon=\"remove_circle\">\r\n\t\t\t</mat-icon>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class=\"\u5176\u4ED6\u9009\u9879\">\r\n\t\t<span class=\"\u5176\u4ED6\u9879\u6807\u9898 title\">\u5176\u4ED6\u9879\u4E3A</span>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<mat-select [(ngModel)]=\"data.OtherOption\">\r\n\t\t\t\t<mat-option value=\"\">(\u65E0)</mat-option>\r\n\t\t\t\t<mat-option *ngFor=\"let item of data.Options\" [value]=\"item.Value\">\r\n\t\t\t\t\t{{ item.Value }}({{ item.Text }})\r\n\t\t\t\t</mat-option>\r\n\t\t\t</mat-select>\r\n\t\t</mat-form-field>\r\n\t</div>\r\n</div>\r\n",
                        styles: ["@charset \"UTF-8\";:host{height:100%;display:flex;flex-direction:column;overflow-y:auto}.title{font-size:14px}.\u95F4\u8DDD{margin-bottom:16px}.\u591A\u9879\u9009\u62E9{width:100%;flex-grow:1;overflow-y:auto}.\u9009\u9879{margin-top:4px;display:flex;justify-content:flex-start;align-items:center}.\u9009\u9879 .mat-form-field{width:144px;font-size:12px;margin-right:16px}.\u9009\u9879 .mat-form-field ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:0;vertical-align:bottom;-webkit-transform:translateY(0);transform:translateY(0)}.\u9009\u9879 .mat-form-field ::ng-deep .mat-form-field-infix{border:0;font-size:14px;padding:10px 0;box-sizing:border-box}.\u9009\u9879 .mat-icon{margin-right:8px;cursor:pointer}.\u5176\u4ED6\u9009\u9879{display:flex;justify-content:flex-start;align-items:center}.\u5176\u4ED6\u9009\u9879 .\u5176\u4ED6\u9879\u6807\u9898{margin-right:16px}.\u5176\u4ED6\u9009\u9879 .mat-form-field{width:180px;font-size:12px}.\u5176\u4ED6\u9009\u9879 ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:0}.\u5176\u4ED6\u9009\u9879 ::ng-deep .mat-form-field-infix{border:0;padding:8px 0}.\u5176\u4ED6\u9009\u9879 ::ng-deep .mat-select-arrow-wrapper{display:block}"]
                    }] }
        ];
        /** @nocollapse */
        SelectSettingComponent.ctorParameters = function () { return []; };
        SelectSettingComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.select-setting',] }],
            data: [{ type: core.Input }]
        };
        return SelectSettingComponent;
    }());
    if (false) {
        /** @type {?} */
        SelectSettingComponent.prototype.hostClass;
        /** @type {?} */
        SelectSettingComponent.prototype.data;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var SliderSettingComponent = /** @class */ (function () {
        function SliderSettingComponent() {
            this.hostClass = true;
            this.upValue = 1;
            this.downValue = 50;
            this.options = SilderSetting.defaultOptions();
        }
        Object.defineProperty(SliderSettingComponent.prototype, "inData", {
            set: /**
             * @param {?} val
             * @return {?}
             */
            function (val) {
                this.data = new SilderSetting(val);
                this.options = this.data.toOptions();
            },
            enumerable: true,
            configurable: true
        });
        /**
         * @return {?}
         */
        SliderSettingComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        SliderSettingComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-slider-setting',
                        template: "<div class=\"\u95F4\u8DDD title\">\u6837\u5F0F\u8BBE\u7F6E</div>\r\n<div class=\"\u6ED1\u5757\u9009\u62E9\">\r\n\t<ng5-slider [(value)]=\"downValue\" [(highValue)]=\"upValue\" [options]=\"options\"> </ng5-slider>\r\n</div>\r\n<div class=\"\u8303\u56F4\u8BBE\u7F6E\">\r\n\t<div class=\"\u8303\u56F4\u503C\">\r\n\t\t<span class=\"\u540D\u79F0\">\u8D77\u59CB\u503C</span>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<input matInput [(ngModel)]=\"downValue\" />\r\n\t\t</mat-form-field>\r\n\t</div>\r\n\t<div class=\"\u8303\u56F4\u503C\">\r\n\t\t<span class=\"\u540D\u79F0\">\u7ED3\u675F\u503C</span>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<input matInput [(ngModel)]=\"upValue\" />\r\n\t\t</mat-form-field>\r\n\t</div>\r\n</div>\r\n<!-- \u4E0A\u9650:<input /> \u4E0B\u9650:<input /> -->\r\n<div class=\"\u6ED1\u5757\u503C\">\r\n\t<div class=\"\u8F93\u5165\u6846\">\r\n\t\t<div class=\"\u540D\u79F0\">\u6700\u5C0F\u503C</div>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<input\r\n\t\t\t\tmatInput\r\n\t\t\t\t#min\r\n\t\t\t\t[(ngModel)]=\"data.data.Min\"\r\n\t\t\t\t(ngModelChange)=\"data.data.Min = +data.data.Min; options = data.toOptions()\"\r\n\t\t\t/>\r\n\t\t</mat-form-field>\r\n\t</div>\r\n\t<div class=\"\u8F93\u5165\u6846\">\r\n\t\t<div class=\"\u540D\u79F0\">\u6700\u5927\u503C</div>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<input\r\n\t\t\t\tmatInput\r\n\t\t\t\t#max\r\n\t\t\t\t[(ngModel)]=\"data.data.Max\"\r\n\t\t\t\t(ngModelChange)=\"data.data.Max = +data.data.Max; options = data.toOptions()\"\r\n\t\t\t/>\r\n\t\t</mat-form-field>\r\n\t</div>\r\n\t<div class=\"\u8F93\u5165\u6846\">\r\n\t\t<div class=\"\u540D\u79F0\">\u6B65\u957F</div>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<input\r\n\t\t\t\tmatInput\r\n\t\t\t\t#step\r\n\t\t\t\t[(ngModel)]=\"data.data.Step\"\r\n\t\t\t\t(ngModelChange)=\"\r\n\t\t\t\t\tdata.data.Step = data.data.Step ? +data.data.Step : data.data.Step; options = data.toOptions()\r\n\t\t\t\t\"\r\n\t\t\t/>\r\n\t\t</mat-form-field>\r\n\t</div>\r\n\t<div class=\"\u6807\u6CE8\u6A21\u677F\">\r\n\t\t<span class=\"\u540D\u79F0\">\u6807\u6CE8\u6A21\u677F</span>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<input\r\n\t\t\t\tmatInput\r\n\t\t\t\tmatInput\r\n\t\t\t\t[(ngModel)]=\"data.data.LabelTemplate\"\r\n\t\t\t\t(ngModelChange)=\"options = data.toOptions()\"\r\n\t\t\t/>\r\n\t\t</mat-form-field>\r\n\t\t<span class=\"\u8BF4\u660E\u6587\u5B57\">\u6B64\u5904\u7528\u4E8E\u8BF4\u660E\u6587\u5B57</span>\r\n\t</div>\r\n\t<div class=\"\u6362\u7B97\u7CFB\u6570\">\r\n\t\t<span class=\"\u540D\u79F0\">\u6362\u7B97\u7CFB\u6570</span>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<input\r\n\t\t\t\tmatInput\r\n\t\t\t\t#ratio\r\n\t\t\t\t[(ngModel)]=\"data.data.Ratio\"\r\n\t\t\t\t(ngModelChange)=\"data.data.Ratio = data.data.Ratio ? +data.data.Ratio : data.data.Ratio\"\r\n\t\t\t/>\r\n\t\t</mat-form-field>\r\n\t</div>\r\n</div>\r\n\r\n<div class=\"\u6ED1\u5757\u6837\u5F0F\u9009\u62E9 title\">\r\n\t<mat-checkbox class=\"\u6355\u6349\u6807\u6CE8\u70B9\" [(ngModel)]=\"data.data.EnforceStep\" (ngModelChange)=\"options = data.toOptions()\"\r\n\t\t>\u6355\u6349\u6807\u6CE8\u70B9</mat-checkbox\r\n\t>\r\n\t<mat-checkbox [(ngModel)]=\"data.data.PositiveInfinity\" (ngModelChange)=\"options = data.toOptions()\"\r\n\t\t>\u6700\u5927\u503C\u4E3A+\u221E</mat-checkbox\r\n\t>\r\n\t<mat-checkbox [(ngModel)]=\"data.data.NegativeInfinity\" (ngModelChange)=\"options = data.toOptions()\"\r\n\t\t>\u6700\u5C0F\u503C\u4E3A-\u221E</mat-checkbox\r\n\t>\r\n</div>\r\n",
                        styles: ["@charset \"UTF-8\";:host{width:100%}.\u6ED1\u5757\u9009\u62E9{max-width:386px;width:100%}::ng-deep .\u6ED1\u5757\u9009\u62E9 .ng5-slider .ng5-slider-bar{height:4px!important}::ng-deep .\u6ED1\u5757\u9009\u62E9 .ng5-slider .ng5-slider-selection{height:6px!important;-webkit-transform:translate(9px,-1px);transform:translate(9px,-1px)}::ng-deep .\u6ED1\u5757\u9009\u62E9 .ng5-slider .ng5-slider-pointer{width:14px;height:14px;top:-5px;border-radius:50%!important;-webkit-transform:translateX(9px);transform:translateX(9px)}::ng-deep .\u6ED1\u5757\u9009\u62E9 .ng5-slider .ng5-slider-pointer:after{width:12px;height:12px;top:1px;left:1px;border-radius:50%!important}::ng-deep .\u6ED1\u5757\u9009\u62E9 .ng5-slider .ng5-slider-pointer.ng5-slider-active:after{background-color:#fff}::ng-deep .\u6ED1\u5757\u9009\u62E9 .ng5-slider .ng5-slider-span{font-size:12px}::ng-deep .\u6ED1\u5757\u9009\u62E9 .ng5-slider .ng5-slider-model-high,::ng-deep .\u6ED1\u5757\u9009\u62E9 .ng5-slider .ng5-slider-model-value{-webkit-transform:translateX(9px);transform:translateX(9px)}.title{font-size:14px}.\u95F4\u8DDD{margin-bottom:16px}.\u8303\u56F4\u8BBE\u7F6E{margin:8px 0 0;max-width:386px;width:100%;display:flex;flex-wrap:wrap;justify-content:flex-start}.\u8303\u56F4\u8BBE\u7F6E .\u8303\u56F4\u503C{width:110px;margin:0 32px 0 0;display:flex}.\u8303\u56F4\u8BBE\u7F6E .\u8303\u56F4\u503C .\u540D\u79F0{font-size:12px;line-height:32px;margin-right:8px}.\u8303\u56F4\u8BBE\u7F6E .\u8303\u56F4\u503C .mat-form-field{max-width:64px;flex-grow:1}.\u6ED1\u5757\u503C{margin:24px 0 0;display:flex;flex-wrap:wrap}.\u6ED1\u5757\u503C .\u8F93\u5165\u6846{width:80px;margin-right:24px}.\u6ED1\u5757\u503C .\u8F93\u5165\u6846 .\u540D\u79F0{font-size:12px;margin-bottom:4px}.\u6ED1\u5757\u503C .\u6807\u6CE8\u6A21\u677F{max-width:240px;margin:10px 32px 0 0;display:flex;flex-wrap:wrap}.\u6ED1\u5757\u503C .\u6807\u6CE8\u6A21\u677F .\u540D\u79F0{font-size:12px;line-height:32px;margin-right:4px}.\u6ED1\u5757\u503C .\u6807\u6CE8\u6A21\u677F .\u8BF4\u660E\u6587\u5B57{font-size:12px;margin:8px 0 0}.\u6ED1\u5757\u503C .\u6807\u6CE8\u6A21\u677F .mat-form-field{max-width:176px;flex-grow:1}.\u6ED1\u5757\u503C .\u6362\u7B97\u7CFB\u6570{width:140px;margin:10px 0 0;display:flex}.\u6ED1\u5757\u503C .\u6362\u7B97\u7CFB\u6570 .\u540D\u79F0{font-size:12px;line-height:32px;margin-right:4px}.\u6ED1\u5757\u503C .\u6362\u7B97\u7CFB\u6570 .mat-form-field{max-width:88px;flex-grow:1}.mat-form-field{width:100%;font-size:12px}.mat-form-field ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:0;vertical-align:bottom;-webkit-transform:translateY(0);transform:translateY(0)}.mat-form-field ::ng-deep .mat-form-field-infix{border:0;font-size:14px;padding:10px 0;box-sizing:border-box}.\u6ED1\u5757\u6837\u5F0F\u9009\u62E9{margin:16px 0 0}.\u6ED1\u5757\u6837\u5F0F\u9009\u62E9 .mat-checkbox{margin-right:32px}.\u6ED1\u5757\u6837\u5F0F\u9009\u62E9 .\u6355\u6349\u6807\u6CE8\u70B9{display:block;margin:0 0 16px}"]
                    }] }
        ];
        /** @nocollapse */
        SliderSettingComponent.ctorParameters = function () { return []; };
        SliderSettingComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.slider-setting',] }],
            inData: [{ type: core.Input }]
        };
        return SliderSettingComponent;
    }());
    if (false) {
        /** @type {?} */
        SliderSettingComponent.prototype.hostClass;
        /** @type {?} */
        SliderSettingComponent.prototype.upValue;
        /** @type {?} */
        SliderSettingComponent.prototype.downValue;
        /** @type {?} */
        SliderSettingComponent.prototype.data;
        /** @type {?} */
        SliderSettingComponent.prototype.options;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var RangeInputSettingComponent = /** @class */ (function () {
        function RangeInputSettingComponent() {
            this.hostClass = true;
        }
        /**
         * @return {?}
         */
        RangeInputSettingComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        RangeInputSettingComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-range-input-setting',
                        template: "<div class=\"title\">\u6837\u5F0F\u8BBE\u7F6E</div>\r\n<div class=\"\u663E\u793A\u6587\u672C\">\r\n\t<div class=\"\u6587\u672C\">\r\n\t\t<div class=\"\u6587\u672C\u6846\"></div>\r\n\t\t<div class=\"\u6587\u672C\u8BF4\u660E\">\u8BF4\u660E\u6587\u672C1</div>\r\n\t</div>\r\n\t<div class=\"\u8FC7\u5EA6\u7EBF\"></div>\r\n\t<div class=\"\u6587\u672C\">\r\n\t\t<div class=\"\u6587\u672C\u6846\"></div>\r\n\t\t<div class=\"\u6587\u672C\u8BF4\u660E\">\u8BF4\u660E\u6587\u672C2</div>\r\n\t</div>\r\n</div>\r\n<div class=\"\u6587\u672C\u8F93\u5165\">\r\n\t<div class=\"\u6587\u672C\u8F93\u5165\u8BF4\u660E title\">\u8BF4\u660E\u6587\u672C1</div>\r\n\t<mat-form-field appearance=\"outline\">\r\n\t\t<input matInput [(ngModel)]=\"data.LowLabel\" placeholder=\"\u53EF\u4E0D\u5199\" />\r\n\t</mat-form-field>\r\n\t<div class=\"\u6587\u672C\u8F93\u5165\u8BF4\u660E title\">\u6587\u672C\u8BF4\u660E2</div>\r\n\t<mat-form-field appearance=\"outline\">\r\n\t\t<input matInput [(ngModel)]=\"data.HighLabel\" placeholder=\"\u53EF\u4E0D\u5199\" />\r\n\t</mat-form-field>\r\n</div>\r\n",
                        styles: ["@charset \"UTF-8\";.title{font-size:14px}.\u663E\u793A\u6587\u672C{width:100%;margin:16px 0;display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:flex-start}.\u663E\u793A\u6587\u672C .\u6587\u672C{width:128px}.\u663E\u793A\u6587\u672C .\u6587\u672C .\u6587\u672C\u6846{width:128px;height:32px;margin-bottom:8px}.\u663E\u793A\u6587\u672C .\u6587\u672C .\u6587\u672C\u8BF4\u660E{font-size:12px}.\u663E\u793A\u6587\u672C .\u8FC7\u5EA6\u7EBF{width:14px;height:1px;margin:16px 14px 0}.\u6587\u672C\u8F93\u5165 .\u6587\u672C\u8F93\u5165\u8BF4\u660E{margin-bottom:4px}.mat-form-field{max-width:384px;width:100%;font-size:12px}.mat-form-field ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:10px;vertical-align:bottom;-webkit-transform:translateY(0);transform:translateY(0)}.mat-form-field ::ng-deep .mat-form-field-infix{border:0;font-size:14px;padding:10px 0;box-sizing:border-box}"]
                    }] }
        ];
        /** @nocollapse */
        RangeInputSettingComponent.ctorParameters = function () { return []; };
        RangeInputSettingComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.range-input-setting',] }],
            data: [{ type: core.Input }]
        };
        return RangeInputSettingComponent;
    }());
    if (false) {
        /** @type {?} */
        RangeInputSettingComponent.prototype.hostClass;
        /** @type {?} */
        RangeInputSettingComponent.prototype.data;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var SetPropertyBillComponent = /** @class */ (function () {
        function SetPropertyBillComponent(elementSvr, theme) {
            this.elementSvr = elementSvr;
            this.theme = theme;
            this.hostClass = true;
            this.edtOption = { maxLines: 12, printMargin: false };
            this.svr = (/** @type {?} */ (this.elementSvr.data.bill));
            this.isReadonly = this.svr.parent.bill.isDelete() || this.svr.parent.bill.isBrowse();
            this.SkipFill = FillAt.SkipFill;
            this.FillAtOpen = FillAt.FillAtOpen;
            this.FillAtSave = FillAt.FillAtSave;
            this.options = [
                {
                    Name: '用户名',
                    Value: '{{.User.Name}}'
                },
                {
                    Name: '部门代码',
                    Value: '{{.User.Dept.Code}}'
                },
                {
                    Name: '部门名称',
                    Value: '{{.User.Dept.Name}}'
                },
                {
                    Name: '当前时间',
                    Value: '{{datetime}}'
                },
                {
                    Name: '当前日期',
                    Value: '{{date}}'
                },
                {
                    Name: '唯一编号',
                    Value: '{{guid64}}'
                }
            ];
            this.primaryKeyFillOptions = __spread(this.options, [
                {
                    Name: '原值',
                    Value: '{{.SRC}}'
                }
            ]);
        }
        /**
         * @return {?}
         */
        SetPropertyBillComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            ace.config.set('basePath', '/front/assets/ace-builds/src-min-noconflict');
        };
        // 可操作/只读/不可见
        // 可操作/只读/不可见
        /**
         * @param {?} e
         * @return {?}
         */
        SetPropertyBillComponent.prototype.selectShow = 
        // 可操作/只读/不可见
        /**
         * @param {?} e
         * @return {?}
         */
        function (e) {
            this.svr.Param.FieldSettings.forEach((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                v.Visibility = e;
            }));
        };
        // 不填充/打开时/保存时
        // 不填充/打开时/保存时
        /**
         * @param {?} e
         * @return {?}
         */
        SetPropertyBillComponent.prototype.selectSave = 
        // 不填充/打开时/保存时
        /**
         * @param {?} e
         * @return {?}
         */
        function (e) {
            this.svr.Param.FieldSettings.forEach((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                v.FillAt = e;
            }));
        };
        // 可操作/只读/不可见
        // 可操作/只读/不可见
        /**
         * @param {?} e
         * @return {?}
         */
        SetPropertyBillComponent.prototype.selectCloneShow = 
        // 可操作/只读/不可见
        /**
         * @param {?} e
         * @return {?}
         */
        function (e) {
            this.svr.Param.ClonePrimaryKeySettings.forEach((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                v.Visibility = e;
            }));
        };
        SetPropertyBillComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-set-property-bill',
                        template: "<div class=\"main\">\r\n\t<!-- 1. \u8BBE\u7F6E\u6807\u9898 \u2193\u2193\u2193  -->\r\n\t<header class=\"set-title\">\u8BBE\u7F6E</header>\r\n\t<!-- 1. \u8BBE\u7F6E \u7ED3\u675F \u2191\u2191\u2191 -->\r\n\t<!-- 2. \u64CD\u4F5C\u7C7B\u578B \u2193\u2193\u2193  -->\r\n\t<div class=\"types-title\">\u64CD\u4F5C\u7C7B\u578B</div>\r\n\t<section class=\"set-types\">\r\n\t\t<div class=\"types-left\">\r\n\t\t\t<mat-radio-group [(ngModel)]=\"svr.Param.Operate\" [disabled]=\"isReadonly\">\r\n\t\t\t\t<mat-radio-button value=\"add\">\u65B0\u589E</mat-radio-button>\r\n\t\t\t\t<mat-radio-button value=\"edit\">\u4FEE\u6539</mat-radio-button>\r\n\t\t\t\t<mat-radio-button value=\"delete\">\u5220\u9664</mat-radio-button>\r\n\t\t\t\t<mat-radio-button value=\"browse\">\u67E5\u770B</mat-radio-button>\r\n\t\t\t</mat-radio-group>\r\n\t\t</div>\r\n\t\t<div class=\"types-right\">\r\n\t\t\t<mat-checkbox [(ngModel)]=\"svr.Param.AllowClone\" [disabled]=\"isReadonly\" (change)=\"svr.fixCloneSettings()\">\r\n\t\t\t\t\u5141\u8BB8\u514B\u9686\r\n\t\t\t</mat-checkbox>\r\n\t\t</div>\r\n\t</section>\r\n\t<!-- 2. \u64CD\u4F5C\u7C7B\u578B \u7ED3\u675F \u2191\u2191\u2191 -->\r\n\t<!-- 3. \u514B\u9686\u4E3B\u952E\u8BBE\u7F6E \u2193\u2193\u2193  -->\r\n\t<section class=\"set-content\" *ngIf=\"svr.Param.AllowClone\">\r\n\t\t<div class=\"content-title\">\u514B\u9686\u4E3B\u952E\u8BBE\u7F6E</div>\r\n\t\t<div class=\"table-wrapper\">\r\n\t\t\t<table class=\"set-table\" mat-table [dataSource]=\"svr.Param.ClonePrimaryKeySettings\">\r\n\r\n\t\t\t\t<ng-container matColumnDef=\"no\">\r\n\t\t\t\t\t<th mat-header-cell *matHeaderCellDef> \u5E8F\u53F7 </th>\r\n\t\t\t\t\t<td mat-cell *matCellDef=\"let element,index as i\"> {{i}}\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</ng-container>\r\n\r\n\t\t\t\t<ng-container matColumnDef=\"name\">\r\n\t\t\t\t\t<th mat-header-cell *matHeaderCellDef> \u540D\u79F0 </th>\r\n\t\t\t\t\t<td mat-cell *matCellDef=\"let element\"> {{element.Name}}\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</ng-container>\r\n\r\n\t\t\t\t<ng-container matColumnDef=\"visibility\">\r\n\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\r\n\t\t\t\t\t\t<mat-form-field class=\"th-common-click\">\r\n\t\t\t\t\t\t\t\u6743\u9650\r\n\t\t\t\t\t\t\t<mat-select class=\"select-position\" [disabled]=\"isReadonly\"\r\n\t\t\t\t\t\t\t\t(selectionChange)=\"selectCloneShow($event.value)\">\r\n\t\t\t\t\t\t\t\t<mat-option value=\"\">\u53EF\u64CD\u4F5C</mat-option>\r\n\t\t\t\t\t\t\t\t<mat-option value=\"readonly\">\u53EA\u8BFB</mat-option>\r\n\t\t\t\t\t\t\t\t<mat-option value=\"hidden\">\u4E0D\u53EF\u89C1</mat-option>\r\n\t\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t<!-- </div> -->\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">\r\n\t\t\t\t\t\t<div class=\"filed-adjust\">\r\n\t\t\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t\t\t<mat-select [(ngModel)]=\"element.Visibility\" [disabled]=\"isReadonly\">\r\n\t\t\t\t\t\t\t\t\t<mat-option value=\"\">\u53EF\u64CD\u4F5C</mat-option>\r\n\t\t\t\t\t\t\t\t\t<mat-option value=\"readonly\">\u53EA\u8BFB</mat-option>\r\n\t\t\t\t\t\t\t\t\t<mat-option value=\"hidden\">\u4E0D\u53EF\u89C1</mat-option>\r\n\t\t\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</ng-container>\r\n\r\n\t\t\t\t<ng-container matColumnDef=\"fill\">\r\n\t\t\t\t\t<th mat-header-cell *matHeaderCellDef> \u586B\u5145\u503C </th>\r\n\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">\r\n\r\n\t\t\t\t\t\t<div class=\"filed-adjust\">\r\n\t\t\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t\t\t<div class=\"fill-input\">\r\n\t\t\t\t\t\t\t\t\t<input type=\"text\" matInput [disabled]=\"isReadonly\" [(ngModel)]=\"element.Fill\"\r\n\t\t\t\t\t\t\t\t\t\t[matAutocomplete]=\"auto\" placeholder=\"\u70B9\u51FB\u8F93\u5165\">\r\n\t\t\t\t\t\t\t\t\t<span class=\"fill-input-text\">\u5E38\u7528</span>\r\n\t\t\t\t\t\t\t\t\t<mat-icon class=\"arrow\" svgIcon=\"arrow_drop_down\">\r\n\t\t\t\t\t\t\t\t\t</mat-icon>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<mat-autocomplete #auto=\"matAutocomplete\">\r\n\t\t\t\t\t\t\t<mat-option *ngFor=\"let option of primaryKeyFillOptions\" [value]=\"option.Value\">\r\n\t\t\t\t\t\t\t\t{{option.Name}}</mat-option>\r\n\t\t\t\t\t\t</mat-autocomplete>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</ng-container>\r\n\r\n\t\t\t\t<tr mat-header-row *matHeaderRowDef=\"['no','name','visibility','fill']\"></tr>\r\n\t\t\t\t<tr mat-row *matRowDef=\"let row;columns:['no','name','visibility','fill']\">\r\n\t\t\t\t</tr>\r\n\t\t\t</table>\r\n\r\n\t\t</div>\r\n\t</section>\r\n\t<!-- 3. \u5185\u5BB9\u8BBE\u7F6E \u7ED3\u675F \u2191\u2191\u2191 -->\r\n\t<!-- 4. \u5185\u5BB9\u8BBE\u7F6E \u2193\u2193\u2193  -->\r\n\t<section class=\"set-content\">\r\n\t\t<div class=\"content-title\">\u5185\u5BB9\u8BBE\u7F6E</div>\r\n\t\t<div class=\"table-wrapper\">\r\n\t\t\t<table class=\"set-table\" mat-table [dataSource]=\"svr.Param.FieldSettings\">\r\n\r\n\t\t\t\t<ng-container matColumnDef=\"no\">\r\n\t\t\t\t\t<th mat-header-cell *matHeaderCellDef> \u5E8F\u53F7 </th>\r\n\t\t\t\t\t<td mat-cell *matCellDef=\"let element,index as i\"> {{i}}\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</ng-container>\r\n\r\n\t\t\t\t<ng-container matColumnDef=\"name\">\r\n\t\t\t\t\t<th mat-header-cell *matHeaderCellDef> \u540D\u79F0 </th>\r\n\t\t\t\t\t<td mat-cell *matCellDef=\"let element\"> {{element.Name}}\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</ng-container>\r\n\r\n\t\t\t\t<ng-container matColumnDef=\"visibility\">\r\n\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\r\n\t\t\t\t\t\t<mat-form-field class=\"th-common-click\">\r\n\t\t\t\t\t\t\t\u6743\u9650\r\n\t\t\t\t\t\t\t<mat-select class=\"select-position\" [disabled]=\"isReadonly\"\r\n\t\t\t\t\t\t\t\t(selectionChange)=\"selectShow($event.value)\">\r\n\t\t\t\t\t\t\t\t<mat-option value=\"\">\u53EF\u64CD\u4F5C</mat-option>\r\n\t\t\t\t\t\t\t\t<mat-option value=\"readonly\">\u53EA\u8BFB</mat-option>\r\n\t\t\t\t\t\t\t\t<mat-option value=\"hidden\">\u4E0D\u53EF\u89C1</mat-option>\r\n\t\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t<!-- </div> -->\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">\r\n\t\t\t\t\t\t<div class=\"filed-adjust\">\r\n\t\t\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t\t\t<mat-select [(ngModel)]=\"element.Visibility\" [disabled]=\"isReadonly\">\r\n\t\t\t\t\t\t\t\t\t<mat-option value=\"\">\u53EF\u64CD\u4F5C</mat-option>\r\n\t\t\t\t\t\t\t\t\t<mat-option value=\"readonly\">\u53EA\u8BFB</mat-option>\r\n\t\t\t\t\t\t\t\t\t<mat-option value=\"hidden\">\u4E0D\u53EF\u89C1</mat-option>\r\n\t\t\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</ng-container>\r\n\t\t\t\t<ng-container matColumnDef=\"fillat\">\r\n\t\t\t\t\t<th class=\"th-common-click\" mat-header-cell *matHeaderCellDef>\r\n\t\t\t\t\t\t<mat-form-field class=\"th-click\">\r\n\t\t\t\t\t\t\t\u586B\u5145\u65F6\u673A\r\n\t\t\t\t\t\t\t<mat-select class=\"select2-position\" [disabled]=\"isReadonly\"\r\n\t\t\t\t\t\t\t\t(selectionChange)=\"selectSave($event.value)\">\r\n\t\t\t\t\t\t\t\t<mat-option [value]=\"SkipFill\">\u4E0D\u586B\u5145</mat-option>\r\n\t\t\t\t\t\t\t\t<mat-option [value]=\"FillAtOpen\">\u6253\u5F00\u65F6\r\n\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t\t<mat-option [value]=\"FillAtSave\">\u4FDD\u5B58\u65F6\r\n\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">\r\n\t\t\t\t\t\t<div class=\"filed-adjust\">\r\n\t\t\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t\t\t<mat-select [(ngModel)]=\"element.FillAt\" [disabled]=\"isReadonly\">\r\n\t\t\t\t\t\t\t\t\t<mat-option [value]=\"SkipFill\">\u4E0D\u586B\u5145\r\n\t\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t\t\t<mat-option [value]=\"FillAtOpen\">\u6253\u5F00\u65F6\r\n\t\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t\t\t<mat-option [value]=\"FillAtSave\">\u4FDD\u5B58\u65F6\r\n\t\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</ng-container>\r\n\r\n\t\t\t\t<ng-container matColumnDef=\"fill\">\r\n\t\t\t\t\t<th mat-header-cell *matHeaderCellDef> \u586B\u5145\u503C </th>\r\n\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">\r\n\r\n\t\t\t\t\t\t<div class=\"filed-adjust\">\r\n\t\t\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t\t\t<div class=\"fill-input\">\r\n\t\t\t\t\t\t\t\t\t<input type=\"text\" matInput [disabled]=\"isReadonly\" [(ngModel)]=\"element.Fill\"\r\n\t\t\t\t\t\t\t\t\t\t[matAutocomplete]=\"auto\" placeholder=\"\u70B9\u51FB\u8F93\u5165\">\r\n\t\t\t\t\t\t\t\t\t<span class=\"fill-input-text\">\u5E38\u7528</span>\r\n\t\t\t\t\t\t\t\t\t<mat-icon class=\"arrow\" svgIcon=\"arrow_drop_down\">\r\n\t\t\t\t\t\t\t\t\t</mat-icon>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<mat-autocomplete #auto=\"matAutocomplete\">\r\n\t\t\t\t\t\t\t<mat-option *ngFor=\"let option of options\" [value]=\"option.Value\">\r\n\t\t\t\t\t\t\t\t{{option.Name}}</mat-option>\r\n\t\t\t\t\t\t</mat-autocomplete>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</ng-container>\r\n\r\n\t\t\t\t<tr mat-header-row *matHeaderRowDef=\"['no','name','visibility','fillat','fill']\">\r\n\t\t\t\t</tr>\r\n\t\t\t\t<tr mat-row *matRowDef=\"let row;columns:['no','name','visibility','fillat','fill']\">\r\n\t\t\t\t</tr>\r\n\t\t\t</table>\r\n\r\n\t\t</div>\r\n\t</section>\r\n\t<!-- 4. \u5185\u5BB9\u8BBE\u7F6E \u7ED3\u675F \u2191\u2191\u2191 -->\r\n\t<!-- 5. \u9644\u52A0\u53C2\u6570 \u2193\u2193\u2193  -->\r\n\t<section class=\"set-arguments\">\r\n\t\t<div class=\"arg-title\">\u9644\u52A0\u4FE1\u606F</div>\r\n\t\t<div class=\"arg-area\" ace-editor [readOnly]=\"isReadonly\" [(text)]=\"svr.Param.Tag\" mode=\"sql\"\r\n\t\t\t[theme]=\"(theme.theme|async).model==='dark'?'tomorrow_night': 'eclipse'\" [options]=\"edtOption\"\r\n\t\t\t[autoUpdateContent]=\"true\" [durationBeforeCallback]=\"1000\"\r\n\t\t\tstyle=\"min-height: 124px; width:100%; overflow: auto;\">\r\n\r\n\t\t</div>\r\n\t</section>\r\n\t<!-- 5. \u9644\u52A0\u53C2\u6570 \u7ED3\u675F \u2191\u2191\u2191 -->\r\n\r\n</div>",
                        styles: ["@charset \"UTF-8\";.main{width:808px;height:100%;padding:16px 48px;box-sizing:border-box;overflow:auto}.arg-title,.content-title,.set-title,.type-title,.types-title{margin-bottom:16px}.set-arguments,.set-content,.set-types{width:100%}.set-title{font-size:18px}.arg-title,.content-title,.types-title{font-size:12px}.set-table,.set-types{font-size:14px}.set-content,.set-types{margin-bottom:24px}.set-types{display:flex;justify-content:space-between;box-sizing:border-box}.set-table,.table-wrapper{width:100%}.set-table .th-click,.set-table .th-common-click{display:flex;justify-content:space-between;align-items:center;width:100%}.set-table .th-click ::ng-deep .mat-select-value,.set-table .th-common-click ::ng-deep .mat-select-value{width:0!important}.set-table .th-click ::ng-deep .mat-select-arrow-wrapper,.set-table .th-common-click ::ng-deep .mat-select-arrow-wrapper{padding-left:60px;padding-bottom:0}.set-table .th-click ::ng-deep .mat-form-field-wrapper,.set-table .th-common-click ::ng-deep .mat-form-field-wrapper{padding-bottom:0}.set-table .th-click .select-position,.set-table .th-common-click .select-position{margin-left:-30px}.set-table .th-click .th-click ::ng-deep .mat-select-arrow-wrapper,.set-table .th-common-click .th-click ::ng-deep .mat-select-arrow-wrapper{padding-left:68px;padding-bottom:0}.set-table .th-click .select2-position,.set-table .th-common-click .select2-position{margin-left:-54px}.set-table ::ng-deep .mat-form-field-infix{padding:0;margin-top:-10px}.set-table ::ng-deep .mat-form-field-appearance-legacy .mat-form-field-infix{padding:0}.set-table .filed-adjust ::ng-deep .mat-input-placeholder-wrapper{top:-10px}.set-table .filed-adjust .mat-form-field{width:100%}.set-table .filed-adjust .mat-form-field ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:0;vertical-align:bottom}.set-table .filed-adjust .mat-form-field ::ng-deep .mat-form-field-infix{border:0;padding-bottom:0;box-sizing:border-box}.set-table .filed-adjust .mat-form-field ::ng-deep .mat-form-field-appearance-legacy .mat-form-field-infix{padding:none}.adjust-position{display:flex;justify-content:space-between}.fill-input{display:flex;justify-content:space-between;align-items:center;box-sizing:border-box}.fill-input .arrow{width:24px;height:24px}.arg-area{width:100%;height:192px;border-radius:4px}"]
                    }] }
        ];
        /** @nocollapse */
        SetPropertyBillComponent.ctorParameters = function () { return [
            { type: ElementService },
            { type: ThemeService }
        ]; };
        SetPropertyBillComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.set-property-bill',] }]
        };
        return SetPropertyBillComponent;
    }());
    if (false) {
        /** @type {?} */
        SetPropertyBillComponent.prototype.hostClass;
        /** @type {?} */
        SetPropertyBillComponent.prototype.edtOption;
        /** @type {?} */
        SetPropertyBillComponent.prototype.svr;
        /** @type {?} */
        SetPropertyBillComponent.prototype.isReadonly;
        /** @type {?} */
        SetPropertyBillComponent.prototype.SkipFill;
        /** @type {?} */
        SetPropertyBillComponent.prototype.FillAtOpen;
        /** @type {?} */
        SetPropertyBillComponent.prototype.FillAtSave;
        /** @type {?} */
        SetPropertyBillComponent.prototype.options;
        /** @type {?} */
        SetPropertyBillComponent.prototype.primaryKeyFillOptions;
        /** @type {?} */
        SetPropertyBillComponent.prototype.elementSvr;
        /** @type {?} */
        SetPropertyBillComponent.prototype.theme;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var SetParamsComponent = /** @class */ (function () {
        function SetParamsComponent(dialogRef, set) {
            this.dialogRef = dialogRef;
            this.set = set;
            this.options = { maxLines: 12, printMargin: false };
        }
        /**
         * @return {?}
         */
        SetParamsComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        SetParamsComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-set-params',
                        template: "<div>\r\n\t<span>\u81EA\u5B9A\u4E49set</span>\r\n\t<div>\r\n\t\t<span>\u9644\u52A0\u7684set\u5B50\u53E5</span>\r\n\t\t<div\r\n\t\t\tace-editor\r\n\t\t\t[(text)]=\"set.AdditionSet\"\r\n\t\t\tmode=\"sql\"\r\n\t\t\t[theme]=\"'eclipse'\"\r\n\t\t\t[options]=\"options\" \r\n\t\t\t[autoUpdateContent]=\"true\"\r\n\t\t\t[durationBeforeCallback]=\"1000\"\r\n\t\t\tstyle=\"min-height: 124px; width:100%; overflow: auto;\"\r\n\t\t></div>\r\n\t</div>\r\n\t<div>\r\n\t\t<span>\u9644\u52A0\u6267\u884C\u7684SQL(\u7528DataSQL\u5F15\u7528\u4F20\u5165\u7684\u6570\u636E\u8303\u56F4SQL)</span>\r\n\t\t<div\r\n\t\t\tace-editor\r\n\t\t\t[(text)]=\"set.BeforeSQL\"\r\n\t\t\tmode=\"sql\"\r\n\t\t\t[theme]=\"'eclipse'\"\r\n\t\t\t[options]=\"options\" \r\n\t\t\t[autoUpdateContent]=\"true\"\r\n\t\t\t[durationBeforeCallback]=\"1000\"\r\n\t\t\tstyle=\"min-height: 124px; width:100%; overflow: auto;\"\r\n\t\t></div>\r\n\t</div>\r\n\t<div>\r\n\t\t<span>\u6570\u636E\u8303\u56F4</span>\r\n\t\t<div\r\n\t\t\tace-editor\r\n\t\t\t[(text)]=\"set.AdditionWhere\"\r\n\t\t\tmode=\"sql\"\r\n\t\t\t[theme]=\"'eclipse'\"\r\n\t\t\t[options]=\"options\" \r\n\t\t\t[autoUpdateContent]=\"true\"\r\n\t\t\t[durationBeforeCallback]=\"1000\"\r\n\t\t\tstyle=\"min-height: 124px; width:100%; overflow: auto;\"\r\n\t\t></div>\r\n\t</div>\r\n\t<div>\r\n\t\t<button mat-button [mat-dialog-close]=\"set\">\u5B8C\u6210</button>\r\n\t</div>\r\n</div>",
                        styles: [""]
                    }] }
        ];
        /** @nocollapse */
        SetParamsComponent.ctorParameters = function () { return [
            { type: material.MatDialogRef },
            { type: undefined, decorators: [{ type: core.Inject, args: [material.MAT_DIALOG_DATA,] }] }
        ]; };
        return SetParamsComponent;
    }());
    if (false) {
        /** @type {?} */
        SetParamsComponent.prototype.options;
        /** @type {?} */
        SetParamsComponent.prototype.dialogRef;
        /** @type {?} */
        SetParamsComponent.prototype.set;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ListParamsComponent = /** @class */ (function () {
        function ListParamsComponent(dialogRef, lists) {
            var _this = this;
            this.dialogRef = dialogRef;
            this.lists = lists;
            this.hostClass = true;
            this.type = 'list';
            this.listTxt = '';
            if (!lists) {
                return;
            }
            this.lists.forEach((/**
             * @param {?} list
             * @param {?} index
             * @return {?}
             */
            function (list, index) {
                if (_this.lists.length === index + 1) {
                    _this.listTxt += list.Value + '=' + list.Label;
                }
                else {
                    _this.listTxt += list.Value + '=' + list.Label + ',';
                }
            }));
        }
        /**
         * @return {?}
         */
        ListParamsComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            this.列表设置.nativeElement.parentElement.parentElement.style = 'padding:16px 16px 16px 24px;';
        };
        ListParamsComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-list-params',
                        template: "<div #\u5217\u8868\u8BBE\u7F6E class=\"\u5217\u8868\u8BBE\u7F6E\">\r\n\t<div class=\"\u5217\u8868\u8BBE\u7F6E-\u9009\u62E9\u6837\u5F0F\">\r\n\t\t<span>\u8BBE\u7F6E</span>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<mat-select [(ngModel)]=\"type\">\r\n\t\t\t\t<mat-option [value]=\"'list'\">\u5217\u8868\u6837\u5F0F</mat-option>\r\n\t\t\t\t<mat-option [value]=\"'input'\">\u8F93\u5165\u6846\u5F0F</mat-option>\r\n\t\t\t</mat-select>\r\n\t\t</mat-form-field>\r\n\t</div>\r\n\t<ng-container [ngSwitch]=\"type\">\r\n\t\t<div class=\"\u5217\u8868\u8BBE\u7F6E-\u5217\u8868\u6837\u5F0F\" *ngSwitchCase=\"'list'\">\r\n\t\t\t<div class=\"\u5217\u8868\u8BBE\u7F6E-\u5355\u4E2A\u6837\u5F0F\" *ngFor=\"let list of lists\">\r\n\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t<input matInput placeholder=\"\u8BF7\u8F93\u5165\u540D\u79F0\" [(ngModel)]=\"list.Label\" />\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t\t<span>=</span>\r\n\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t<input matInput placeholder=\"\u8BF7\u8F93\u5165\u8868\u8FBE\u5F0F\" [(ngModel)]=\"list.Value\" />\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"\u5217\u8868\u8BBE\u7F6E-\u5355\u4E2A\u6837\u5F0F\">\r\n\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t<input matInput placeholder=\"\u8BF7\u8F93\u5165\u540D\u79F0\" value=\"\" />\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t\t<span>=</span>\r\n\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t<input matInput placeholder=\"\u8BF7\u8F93\u5165\u8868\u8FBE\u5F0F\" value=\"\" />\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div class=\"\u5217\u8868\u8BBE\u7F6E-\u5217\u8868\u6837\u5F0F\" *ngSwitchCase=\"'input'\">\r\n\t\t\t<span>\u8BF4\u660E:\u7528\u9017\u53F7\u5206\u9694\u5404\u9879,\u7B49\u53F7\u5206\u9694\u503C\u548C\u6807\u7B7E,\u8868\u8FBE\u5F0F\u7528``\u5305\u62EC</span>\r\n\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t<textarea matInput [(ngModel)]=\"listTxt\"></textarea>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t</ng-container>\r\n\t<div>\r\n\t\t<button mat-button [mat-dialog-close]=\"lists\">\u5B8C\u6210</button>\r\n\t</div>\r\n</div>\r\n",
                        styles: ["@charset \"UTF-8\";.\u5217\u8868\u8BBE\u7F6E{width:100%;height:100%;display:flex;flex-direction:column;justify-content:space-between}.\u5217\u8868\u8BBE\u7F6E .\u5217\u8868\u8BBE\u7F6E-\u9009\u62E9\u6837\u5F0F{display:flex;justify-content:space-between;margin-bottom:24px}.\u5217\u8868\u8BBE\u7F6E .\u5217\u8868\u8BBE\u7F6E-\u9009\u62E9\u6837\u5F0F .mat-form-field{width:160px}.\u5217\u8868\u8BBE\u7F6E .\u5217\u8868\u8BBE\u7F6E-\u9009\u62E9\u6837\u5F0F .mat-form-field ::ng-deep .mat-form-field-infix{border:0;padding:8px 0!important}.\u5217\u8868\u8BBE\u7F6E .\u5217\u8868\u8BBE\u7F6E-\u9009\u62E9\u6837\u5F0F span{font-size:18px;font-weight:700}.\u5217\u8868\u8BBE\u7F6E .\u5217\u8868\u8BBE\u7F6E-\u5217\u8868\u6837\u5F0F{flex-grow:1}.\u5217\u8868\u8BBE\u7F6E .\u5217\u8868\u8BBE\u7F6E-\u5217\u8868\u6837\u5F0F .\u5217\u8868\u8BBE\u7F6E-\u5355\u4E2A\u6837\u5F0F{display:flex;justify-content:space-around;margin:0 0 8px}.\u5217\u8868\u8BBE\u7F6E .\u5217\u8868\u8BBE\u7F6E-\u5217\u8868\u6837\u5F0F .\u5217\u8868\u8BBE\u7F6E-\u5355\u4E2A\u6837\u5F0F .mat-form-field{width:120px}.\u5217\u8868\u8BBE\u7F6E .mat-form-field{font-size:14px}.\u5217\u8868\u8BBE\u7F6E .mat-form-field ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:0}.\u5217\u8868\u8BBE\u7F6E .mat-form-field ::ng-deep .mat-form-field-infix{border:0;padding:10px 0}.\u5217\u8868\u8BBE\u7F6E .mat-form-field ::ng-deep .mat-select-arrow-wrapper{-webkit-transform:translateY(0);transform:translateY(0)}"]
                    }] }
        ];
        /** @nocollapse */
        ListParamsComponent.ctorParameters = function () { return [
            { type: material.MatDialogRef },
            { type: Array, decorators: [{ type: core.Inject, args: [material.MAT_DIALOG_DATA,] }] }
        ]; };
        ListParamsComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.list-params',] }],
            列表设置: [{ type: core.ViewChild, args: ['列表设置', { static: true },] }]
        };
        return ListParamsComponent;
    }());
    if (false) {
        /** @type {?} */
        ListParamsComponent.prototype.hostClass;
        /** @type {?} */
        ListParamsComponent.prototype.列表设置;
        /** @type {?} */
        ListParamsComponent.prototype.type;
        /** @type {?} */
        ListParamsComponent.prototype.listTxt;
        /** @type {?} */
        ListParamsComponent.prototype.dialogRef;
        /** @type {?} */
        ListParamsComponent.prototype.lists;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /**
     * @record
     */
    function List() { }
    if (false) {
        /** @type {?} */
        List.prototype.Value;
        /** @type {?} */
        List.prototype.Label;
    }
    /**
     * @record
     */
    function Sets() { }
    if (false) {
        /** @type {?|undefined} */
        Sets.prototype.AdditionSet;
        /** @type {?|undefined} */
        Sets.prototype.AdditionWhere;
        /** @type {?|undefined} */
        Sets.prototype.BeforeSQL;
    }
    var SetPropertyUpdateComponent = /** @class */ (function () {
        function SetPropertyUpdateComponent(elementSvr, dialog) {
            this.elementSvr = elementSvr;
            this.dialog = dialog;
            this.hostClass = true;
            this.svr = (/** @type {?} */ (this.elementSvr.data.update));
        }
        /**
         * @param {?} event
         * @return {?}
         */
        SetPropertyUpdateComponent.prototype.selectChecked = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            this.svr.Params.Fields.forEach((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return (v.selected = event.checked); }));
        };
        /**
         * @return {?}
         */
        SetPropertyUpdateComponent.prototype.openSetDialog = /**
         * @return {?}
         */
        function () {
            var _this = this;
            /** @type {?} */
            var setValue = {
                AdditionSet: this.svr.Params.AdditionSet,
                AdditionWhere: this.svr.Params.AdditionWhere,
                BeforeSQL: this.svr.Params.BeforeSQL
            };
            /** @type {?} */
            var setRef = this.dialog.open(SetParamsComponent, {
                width: '380px',
                height: '100%',
                data: setValue
            });
            setRef.afterClosed().subscribe((/**
             * @param {?} result
             * @return {?}
             */
            function (result) {
                // console.log('The setDialog was closed');
                _this.svr.Params.AdditionSet = setValue.AdditionSet;
                _this.svr.Params.AdditionWhere = setValue.AdditionWhere;
                _this.svr.Params.BeforeSQL = setValue.BeforeSQL;
            }));
        };
        /**
         * @param {?} selected
         * @param {?=} list
         * @return {?}
         */
        SetPropertyUpdateComponent.prototype.openListDialog = /**
         * @param {?} selected
         * @param {?=} list
         * @return {?}
         */
        function (selected, list) {
            if (selected) {
                /** @type {?} */
                var listRef = this.dialog.open(ListParamsComponent, {
                    width: '384px',
                    height: 'calc(100% - 0px)',
                    data: list,
                    position: {
                        right: '0',
                        bottom: '0'
                    }
                });
                listRef.afterClosed().subscribe((/**
                 * @param {?} result
                 * @return {?}
                 */
                function (result) {
                    console.log('The listDialog was closed');
                }));
            }
        };
        /**
         * @return {?}
         */
        SetPropertyUpdateComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            this.svr.init();
        };
        SetPropertyUpdateComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-set-property-update',
                        template: "<div>\r\n\t<div>\r\n\t\t<div class=\"\u8BBE\u7F6E-\u5934\u90E8\">\r\n\t\t\t<div class=\"\u5934\u90E8-\u8F93\u5165\u6846\">\r\n\t\t\t\t<span>\u6570\u636E\u5E93</span>\r\n\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t<mat-select [(ngModel)]=\"svr.Params.DB\" (valueChange)=\"svr.refreshTables()\">\r\n\t\t\t\t\t\t<mat-option [value]=\"''\"> (\u5F53\u524D\u6570\u636E\u5E93) </mat-option>\r\n\t\t\t\t\t\t<mat-option *ngFor=\"let db of svr.DBList\" [value]=\"db\">\r\n\t\t\t\t\t\t\t{{ db }}\r\n\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t</mat-select>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"\u5934\u90E8-\u8F93\u5165\u6846\">\r\n\t\t\t\t<span>\u8868</span>\r\n\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t<input type=\"text\" matInput [(ngModel)]=\"svr.Params.TableName\" [matAutocomplete]=\"auto\" />\r\n\t\t\t\t\t<mat-autocomplete #auto=\"matAutocomplete\">\r\n\t\t\t\t\t\t<mat-option *ngFor=\"let tab of svr.Tables\" [value]=\"tab | uppercase\">\r\n\t\t\t\t\t\t\t{{ tab | uppercase }}\r\n\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t</mat-autocomplete>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"\u81EA\u5B9A\u4E49set\">\r\n\t\t\t\t<span (click)=\"openSetDialog()\">\u81EA\u5B9A\u4E49set</span>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div class=\"\u8868\u683C\">\r\n\t\t\t<table mat-table [dataSource]=\"svr.Params.Fields\">\r\n\t\t\t\t<!-- \u9009\u62E9\u6846 \u663E\u793A -->\r\n\t\t\t\t<ng-container matColumnDef=\"select\">\r\n\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\r\n\t\t\t\t\t\t<mat-checkbox\r\n\t\t\t\t\t\t\t(change)=\"selectChecked($event)\"\r\n\t\t\t\t\t\t\t[checked]=\"svr.isAllSelected()\"\r\n\t\t\t\t\t\t\t[indeterminate]=\"svr.hasSelected() && !svr.isAllSelected()\"\r\n\t\t\t\t\t\t\t>\u663E\u793A\r\n\t\t\t\t\t\t</mat-checkbox>\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<td mat-cell *matCellDef=\"let row\">\r\n\t\t\t\t\t\t<mat-checkbox [(ngModel)]=\"row.selected\"> </mat-checkbox>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</ng-container>\r\n\t\t\t\t<!-- \u9009\u62E9\u6846 \u5FC5\u586B -->\r\n\t\t\t\t<ng-container matColumnDef=\"must\">\r\n\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\r\n\t\t\t\t\t\t<mat-checkbox>\u5FC5\u586B </mat-checkbox>\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<td mat-cell *matCellDef=\"let element; let index = index\">\r\n\t\t\t\t\t\t<!-- <mat-checkbox [(ngModel)]=\"row.selected\">\r\n\t\t\t\t\t\t</mat-checkbox> -->\r\n\t\t\t\t\t\t<mat-slide-toggle\r\n\t\t\t\t\t\t\t[disabled]=\"!svr.Params.Fields[index].selected\"\r\n\t\t\t\t\t\t\t[(ngModel)]=\"element.Must\"\r\n\t\t\t\t\t\t></mat-slide-toggle>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</ng-container>\r\n\t\t\t\t<!-- \u540D\u79F0 -->\r\n\t\t\t\t<ng-container matColumnDef=\"name\">\r\n\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\r\n\t\t\t\t\t\t\u540D\u79F0\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<td\r\n\t\t\t\t\t\tmat-cell\r\n\t\t\t\t\t\t*matCellDef=\"let element; let index = index\"\r\n\t\t\t\t\t\t[ngClass]=\"{ selectedState: !svr.Params.Fields[index].selected }\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t{{ element.Name }}\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</ng-container>\r\n\t\t\t\t<!-- \u6807\u7B7E -->\r\n\t\t\t\t<ng-container matColumnDef=\"label\">\r\n\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\r\n\t\t\t\t\t\t\u6807\u7B7E\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<td mat-cell *matCellDef=\"let element; let index = index\">\r\n\t\t\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\tmatInput\r\n\t\t\t\t\t\t\t\t[disabled]=\"!svr.Params.Fields[index].selected\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"element.Label\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</ng-container>\r\n\t\t\t\t<!-- \u63D0\u793A -->\r\n\t\t\t\t<ng-container matColumnDef=\"tooltip\">\r\n\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\r\n\t\t\t\t\t\t\u63D0\u793A\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<td mat-cell *matCellDef=\"let element; let index = index\">\r\n\t\t\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t\t\t<input\r\n\t\t\t\t\t\t\t\tmatInput\r\n\t\t\t\t\t\t\t\t[disabled]=\"!svr.Params.Fields[index].selected\"\r\n\t\t\t\t\t\t\t\t[(ngModel)]=\"element.Tooltip\"\r\n\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</ng-container>\r\n\t\t\t\t<!-- \u81EA\u7531\u5F55\u5165 -->\r\n\t\t\t\t<ng-container matColumnDef=\"freeentry\">\r\n\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\r\n\t\t\t\t\t\t<mat-checkbox>\u81EA\u7531\u5F55\u5165</mat-checkbox>\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<td mat-cell *matCellDef=\"let element; let index = index\">\r\n\t\t\t\t\t\t<mat-checkbox [disabled]=\"!svr.Params.Fields[index].selected\">\u542F\u7528</mat-checkbox>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</ng-container>\r\n\t\t\t\t<!-- \u5FEB\u901F\u64CD\u4F5C\u8BBE\u7F6E -->\r\n\t\t\t\t<ng-container matColumnDef=\"listnum\">\r\n\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\r\n\t\t\t\t\t\t\u5FEB\u901F\u64CD\u4F5C\u8BBE\u7F6E\r\n\t\t\t\t\t</th>\r\n\t\t\t\t\t<td\r\n\t\t\t\t\t\tmat-cell\r\n\t\t\t\t\t\t*matCellDef=\"let element; let index = index\"\r\n\t\t\t\t\t\t[ngClass]=\"{ selectedState: !svr.Params.Fields[index].selected }\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t{{ element.List ? element.List.length : 0 }}\r\n\r\n\t\t\t\t\t\t<button mat-icon-button [disabled]=\"!svr.Params.Fields[index].selected\">\r\n\t\t\t\t\t\t\t<mat-icon\r\n\t\t\t\t\t\t\t\tsvgIcon=\"outlined:edit\"\r\n\t\t\t\t\t\t\t\t(click)=\"openListDialog(svr.Params.Fields[index].selected, element.List)\"\r\n\t\t\t\t\t\t\t></mat-icon>\r\n\t\t\t\t\t\t</button>\r\n\t\t\t\t\t</td>\r\n\t\t\t\t</ng-container>\r\n\t\t\t\t<!-- \u8868\u5934\u8BBE\u7F6E -->\r\n\t\t\t\t<tr\r\n\t\t\t\t\tmat-header-row\r\n\t\t\t\t\t*matHeaderRowDef=\"['select', 'must', 'name', 'label', 'tooltip', 'freeentry', 'listnum']\"\r\n\t\t\t\t></tr>\r\n\t\t\t\t<tr\r\n\t\t\t\t\tmat-row\r\n\t\t\t\t\t*matRowDef=\"\r\n\t\t\t\t\t\tlet row;\r\n\t\t\t\t\t\tcolumns: ['select', 'must', 'name', 'label', 'tooltip', 'freeentry', 'listnum']\r\n\t\t\t\t\t\"\r\n\t\t\t\t></tr>\r\n\t\t\t</table>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n",
                        styles: ["@charset \"UTF-8\";:host{width:100%;padding:0 16px;box-sizing:border-box}:host .mat-form-field ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:0}:host .mat-form-field ::ng-deep .mat-form-field-infix{border:0;padding:10px 0}:host .mat-form-field ::ng-deep .mat-select-arrow-wrapper{-webkit-transform:translateY(0);transform:translateY(0)}:host .\u8BBE\u7F6E-\u5934\u90E8{width:100%;display:flex;justify-content:flex-end;align-items:center;margin:16px 0 24px;font-size:14px}:host .\u8BBE\u7F6E-\u5934\u90E8 .\u5934\u90E8-\u8F93\u5165\u6846{margin-right:16px}:host .\u8BBE\u7F6E-\u5934\u90E8 .\u5934\u90E8-\u8F93\u5165\u6846 span{margin-right:8px}:host .\u8BBE\u7F6E-\u5934\u90E8 .\u5934\u90E8-\u8F93\u5165\u6846 .mat-form-field{width:125px}:host .\u8BBE\u7F6E-\u5934\u90E8 .\u81EA\u5B9A\u4E49set{margin-right:8px;cursor:pointer}:host .\u8868\u683C{width:100%}:host .\u8868\u683C th{font-size:14px;font-weight:700}:host .\u8868\u683C td{font-size:14px}:host .\u8868\u683C td.mat-cell:first-of-type,:host .\u8868\u683C th.mat-header-cell:first-of-type{padding-left:8px;min-width:48px;width:48px}:host .\u8868\u683C td.mat-column-listnum{text-align:right}:host .\u8868\u683C td.mat-cell,:host .\u8868\u683C th.mat-header-cell{min-width:72px;padding:0 8px}:host .\u8868\u683C .mat-form-field{width:104px}"]
                    }] }
        ];
        /** @nocollapse */
        SetPropertyUpdateComponent.ctorParameters = function () { return [
            { type: ElementService },
            { type: material.MatDialog }
        ]; };
        SetPropertyUpdateComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.set-property-update',] }]
        };
        return SetPropertyUpdateComponent;
    }());
    if (false) {
        /** @type {?} */
        SetPropertyUpdateComponent.prototype.hostClass;
        /** @type {?} */
        SetPropertyUpdateComponent.prototype.svr;
        /** @type {?} */
        SetPropertyUpdateComponent.prototype.elementSvr;
        /** @type {?} */
        SetPropertyUpdateComponent.prototype.dialog;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ImportFieldComponent = /** @class */ (function () {
        function ImportFieldComponent(elementSvr) {
            this.elementSvr = elementSvr;
            this.hostClass = true;
            this.svr = (/** @type {?} */ (this.elementSvr.data.import));
            this.titles = ['序号', '名称', '别名', '类别', '值', '备注'];
        }
        /**
         * @param {?} event
         * @return {?}
         */
        ImportFieldComponent.prototype.drop = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            dragDrop.moveItemInArray(this.svr.Params.Fields, event.previousIndex, event.currentIndex);
        };
        /**
         * @return {?}
         */
        ImportFieldComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            // console.log(this.svr.Params.Fields);
        };
        ImportFieldComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-import-field',
                        template: "<span class=\"\u5BFC\u5165-\u4E00\u7EA7\u6807\u9898 \u5B57\u4F53\u989C\u8272\">\u5B57\u6BB5\u8BBE\u7F6E</span>\r\n<div class=\"import-title\">\r\n\t<div class=\"tit-{{i+1}}\" *ngFor=\"let tit of titles;let i =index\">{{tit}}</div>\r\n</div>\r\n<div class=\"\u5BFC\u5165-\u5B57\u6BB5\u8BBE\u7F6E\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\r\n\t<div class=\"\u5BFC\u5165-\u5355\u4E2A\u5B57\u6BB5\" *ngFor=\"let field of svr.Params.Fields; let i = index\"\r\n\t\tcdkDrag>\r\n\t\t<mat-icon class=\"check-icon\" svgIcon=\"drag_indicator\" cdkDragHandle></mat-icon>\r\n\t\t<span class=\"\u7D22\u5F15\" class=\"field-list-1\">{{ i+1 }}</span>\r\n\t\t<span class=\"\u540D\u79F0\" class=\"field-list-2\">{{ field.Name }}</span>\r\n\t\t<mat-form-field class=\"field-list-3\" appearance=\"outline\">\r\n\t\t\t<input matInput [(ngModel)]=\"field.Alias\" />\r\n\t\t</mat-form-field>\r\n\t\t<mat-form-field class=\"field-list-4\" appearance=\"outline\">\r\n\t\t\t<mat-select [(ngModel)]=\"field.Style\">\r\n\t\t\t\t<mat-option [value]=\"'NORMAL'\">\u6B63\u5E38\u5BFC\u5165\u5B57\u6BB5</mat-option>\r\n\t\t\t\t<mat-option [value]=\"'MUST'\">\u5FC5\u987B\u5BFC\u5165\u7684\u5B57\u6BB5</mat-option>\r\n\t\t\t\t<mat-option [value]=\"'FILL'\">\u81EA\u52A8\u586B\u5145\u7684\u5B57\u6BB5</mat-option>\r\n\t\t\t\t<mat-option [value]=\"'SKIP'\">\u5FFD\u7565\u7684\u5B57\u6BB5</mat-option>\r\n\t\t\t</mat-select>\r\n\t\t</mat-form-field>\r\n\t\t<mat-form-field class=\"field-list-5\" appearance=\"outline\">\r\n\t\t\t<input matInput placeholder=\"\u503C\" [(ngModel)]=\"field.Value\" />\r\n\t\t</mat-form-field>\r\n\t\t<mat-form-field class=\"field-list-6\" appearance=\"outline\">\r\n\t\t\t<input matInput placeholder=\"\u5907\u6CE8\" [(ngModel)]=\"field.Remark\" />\r\n\t\t</mat-form-field>\r\n\t\t<!-- <mat-divider *ngIf=\"svr.Params.Fields.length - 1 > i\"> </mat-divider> -->\r\n\t</div>\r\n</div>",
                        styles: ["@charset \"UTF-8\";.\u5BFC\u5165-\u4E00\u7EA7\u6807\u9898{font-size:16px;font-weight:700;margin-bottom:16px}.\u5BFC\u5165-\u5B57\u6BB5\u8BBE\u7F6E{margin:16px 0 0}.\u5BFC\u5165-\u5355\u4E2A\u5B57\u6BB5{position:relative;display:flex;align-items:center;width:100%;height:56px;font-size:14px}.\u5BFC\u5165-\u5355\u4E2A\u5B57\u6BB5 .mat-form-field{max-width:160px;min-width:80px;margin:0 8px 0 0}.\u5BFC\u5165-\u5355\u4E2A\u5B57\u6BB5 .mat-form-field ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:0}.\u5BFC\u5165-\u5355\u4E2A\u5B57\u6BB5 .mat-form-field ::ng-deep .mat-form-field-infix{border:0;padding:10px 0}.\u5BFC\u5165-\u5355\u4E2A\u5B57\u6BB5 .mat-form-field ::ng-deep .mat-select-arrow-wrapper{-webkit-transform:translateY(0);transform:translateY(0)}.\u5BFC\u5165-\u5355\u4E2A\u5B57\u6BB5 .mat-icon{flex-shrink:0;width:16px;height:16px;line-height:16px;cursor:pointer;opacity:0}.\u5BFC\u5165-\u5355\u4E2A\u5B57\u6BB5 .\u7D22\u5F15{width:32px;padding:0 8px}.\u5BFC\u5165-\u5355\u4E2A\u5B57\u6BB5 .\u540D\u79F0{width:128px;padding:0 8px}.\u5BFC\u5165-\u5355\u4E2A\u5B57\u6BB5 .mat-divider{width:100%;position:absolute;bottom:0;left:0}.\u5BFC\u5165-\u5355\u4E2A\u5B57\u6BB5:hover{box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.12),0 1px 5px 0 rgba(0,0,0,.2);border-radius:4px}.\u5BFC\u5165-\u5355\u4E2A\u5B57\u6BB5:hover .mat-icon{opacity:1}.import-title{display:flex;flex-wrap:nowrap;width:100%;box-sizing:border-box;margin-top:24px;font:14px bold}.tit-1{width:calc(10% + 12px);min-width:58px;max-width:84px}.check-icon{width:16px}.field-list-1{width:10%;min-width:42px}.tit-2{width:calc(25% - 12px);min-width:80px;max-width:168px}.field-list-2{width:25%;min-width:80px}.tit-3{width:15%;min-width:88px;max-width:108px}.field-list-3{width:15%}.tit-4{width:20%;min-width:88px;max-width:144px}.field-list-4{width:20%}.tit-5{width:20%;min-width:88px;max-width:144px}.field-list-5{width:20%}.tit-6{width:10%;min-width:80px}.field-list-6{width:10%}"]
                    }] }
        ];
        /** @nocollapse */
        ImportFieldComponent.ctorParameters = function () { return [
            { type: ElementService }
        ]; };
        ImportFieldComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.c-import-field',] }]
        };
        return ImportFieldComponent;
    }());
    if (false) {
        /** @type {?} */
        ImportFieldComponent.prototype.hostClass;
        /** @type {?} */
        ImportFieldComponent.prototype.svr;
        /** @type {?} */
        ImportFieldComponent.prototype.titles;
        /** @type {?} */
        ImportFieldComponent.prototype.elementSvr;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ImportSetComponent = /** @class */ (function () {
        function ImportSetComponent(elementSvr, theme) {
            var _this = this;
            this.elementSvr = elementSvr;
            this.theme = theme;
            this.hostClass = true;
            this.svr = (/** @type {?} */ (this.elementSvr.data.import));
            this.tableControl = new forms.FormControl();
            this.options = { maxLines: 12, printMargin: false };
            this.subs = [];
            this.subs.push(this.theme.theme.subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.themeModel = v.model;
            })));
        }
        /**
         * @return {?}
         */
        ImportSetComponent.prototype.ngOnDestroy = /**
         * @return {?}
         */
        function () {
            this.subs.forEach((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.unsubscribe(); }));
        };
        /**
         * @return {?}
         */
        ImportSetComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            var _this = this;
            ace.config.set('basePath', '/front/assets/ace-builds/src-min-noconflict');
            this.subs.push(this.svr.init().subscribe((/**
             * @return {?}
             */
            function () {
                _this.tableControl.patchValue(_this.svr.Params.Table);
                _this.subs.push(
                // 后一句用了startWith '' ,所以必须另外订阅。否则会每次都清空
                _this.tableControl.valueChanges.subscribe((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) {
                    _this.svr.Params.Table = v;
                    _this.svr.syncTableColumn();
                })), _this.tableControl.valueChanges.pipe(operators.startWith('')).subscribe((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) {
                    _this.tables = _this.svr.Tables.filter((/**
                     * @param {?} sv
                     * @return {?}
                     */
                    function (sv) { return sv.toUpperCase().includes(v.toUpperCase()); }));
                })));
            })));
        };
        ImportSetComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-import-set',
                        template: "<div class=\"set-import-main\">\r\n\t<!-- \u2193\u2193 1. \u5927\u6807\u9898 \u2193\u2193 -->\r\n\t<header class=\"set-title\">\u57FA\u672C\u4FE1\u606F</header>\r\n\t<!-- \u2193\u2193 2. \u6570\u636E\u5E93 \u2193\u2193 -->\r\n\t<section class=\"title-box\">\r\n\t\t<div class=\"first\">\r\n\t\t\t<div class=\"second-title\">\u6570\u636E\u5E93</div>\r\n\t\t\t<mat-form-field class=\"select-box\" appearance=\"outline\">\r\n\t\t\t\t<mat-select [(ngModel)]=\"svr.Params.DB\"\r\n\t\t\t\t\t(valueChange)=\"svr.refreshTables()\">\r\n\t\t\t\t\t<mat-option [value]=\"''\"> (\u5F53\u524D\u6570\u636E\u5E93) </mat-option>\r\n\t\t\t\t\t<mat-option *ngFor=\"let db of svr.DBList\" [value]=\"db\">\r\n\t\t\t\t\t\t{{ db }}\r\n\t\t\t\t\t</mat-option>\r\n\t\t\t\t</mat-select>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t\t<div class=\"second\">\r\n\t\t\t<div class=\"second-title\">\u8868</div>\r\n\t\t\t<mat-form-field class=\"select-box\" appearance=\"outline\">\r\n\t\t\t\t<input type=\"text\" matInput [formControl]=\"tableControl\" [matAutocomplete]=\"auto\">\r\n\t\t\t\t\r\n\t\t\t\t<mat-autocomplete #auto=\"matAutocomplete\" >\r\n\t\t\t\t\t<mat-option *ngFor=\"let tab of tables\" [value]=\"tab|uppercase\">\r\n\t\t\t\t\t\t{{tab|uppercase}}\r\n\t\t\t\t\t</mat-option>\r\n\t\t\t\t</mat-autocomplete>\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t\t<div class=\"third\">\r\n\t\t\t<div class=\"second-title\">Null\u503C\u8BC6\u522B\u7801</div>\r\n\t\t\t<mat-form-field class=\"select-box\" appearance=\"outline\">\r\n\t\t\t\t<input type=\"text\" matInput [(ngModel)]=\"svr.Params.NullIden\">\r\n\t\t\t</mat-form-field>\r\n\t\t</div>\r\n\t</section>\r\n\t<section class=\"sql-statement\">\r\n\t\t<div class=\"second-title\">where</div>\r\n\t\t<div class=\"sql-box\">\r\n\t\t\t<div class=\"sql-wrapper\" ace-editor [(text)]=\"svr.Params.Where\"\r\n\t\t\t\tmode=\"sql\" [theme]=\"themeModel === 'dark'?'tomorrow_night':'eclipse'\"  [options]=\"options\"\r\n\t\t\t\t[autoUpdateContent]=\"true\" [durationBeforeCallback]=\"1000\"></div>\r\n\t\t</div>\r\n\t</section>\r\n\t<section class=\"sql-statement\">\r\n\t\t<div class=\"second-title\">before\uFF08\u7528ImportTempTable\u5F15\u7528\u4E34\u65F6\u8868\uFF09</div>\r\n\t\t<div class=\"sql-wrapper\" ace-editor [(text)]=\"svr.Params.Before\" mode=\"sql\"\r\n\t\t\t[theme]=\"themeModel === 'dark'?'tomorrow_night':'eclipse'\" [options]=\"options\" [autoUpdateContent]=\"true\"\r\n\t\t\t[durationBeforeCallback]=\"1000\"></div>\r\n\t</section>\r\n\t<section class=\"sql-statement\">\r\n\t\t<div class=\"second-title\">after</div>\r\n\t\t<div class=\"sql-wrapper\" ace-editor [(text)]=\"svr.Params.After\" mode=\"sql\"\r\n\t\t[theme]=\"themeModel === 'dark'?'tomorrow_night':'eclipse'\"  [options]=\"options\" [autoUpdateContent]=\"true\"\r\n\t\t\t[durationBeforeCallback]=\"1000\"></div>\r\n\t</section>\r\n</div>\r\n\r\n<!-- \r\n<div class=\"\u5BFC\u5165-\u4E00\u7EA7\u6807\u9898 \u5B57\u4F53\u989C\u8272\">\u57FA\u7840\u5C5E\u6027</div>\r\n<div class=\"\u5BFC\u5165-\u4E8C\u7EA7\u6807\u9898 \u4E8C\u7EA7\u5B57\u4F53\u989C\u8272\">\u6570\u636E\u5E93</div>\r\n<mat-form-field class=\"\u9009\u62E9\u6846\" appearance=\"outline\">\r\n\t<mat-select [(ngModel)]=\"svr.Params.DB\" (valueChange)=\"svr.refreshTables()\">\r\n\t\t<mat-option [value]=\"''\"> (\u5F53\u524D\u6570\u636E\u5E93) </mat-option>\r\n\t\t<mat-option *ngFor=\"let db of svr.DBList\" [value]=\"db\">\r\n\t\t\t{{ db }}\r\n\t\t</mat-option>\r\n\t</mat-select>\r\n</mat-form-field>\r\n<div class=\"\u5BFC\u5165-\u4E8C\u7EA7\u6807\u9898 \u4E8C\u7EA7\u5B57\u4F53\u989C\u8272\">\u8868</div>\r\n<mat-form-field class=\"\u9009\u62E9\u6846\" appearance=\"outline\">\r\n\t<input type=\"text\" matInput [(ngModel)]=\"svr.Params.Table\" [matAutocomplete]=\"auto\">\r\n\t\r\n\t<mat-autocomplete #auto=\"matAutocomplete\" >\r\n\t\t<mat-option *ngFor=\"let tab of svr.Tables\" [value]=\"tab|uppercase\">\r\n\t\t\t{{tab|uppercase}}\r\n\t\t</mat-option>\r\n\t</mat-autocomplete>\r\n</mat-form-field>\r\n<div class=\"\u5BFC\u5165-\u4E8C\u7EA7\u6807\u9898 \u4E8C\u7EA7\u5B57\u4F53\u989C\u8272\">Null\u503C\u8BC6\u522B\u7801</div>\r\n<mat-form-field class=\"\u9009\u62E9\u6846\" appearance=\"outline\">\r\n\t<input type=\"text\" matInput [(ngModel)]=\"svr.Params.NullIden\" >\r\n</mat-form-field>\r\n<div class=\"\u5BFC\u5165-\u4E8C\u7EA7\u6807\u9898 \u4E8C\u7EA7\u5B57\u4F53\u989C\u8272\">where</div>\r\n<div class=\"SQL\u8BED\u53E5 \u8FB9\u6846\"\r\n\tace-editor\r\n\t[(text)]=\"svr.Params.Where\"\r\n\tmode=\"sql\"\r\n\t[theme]=\"'eclipse'\"\r\n\t[options]=\"options\" \r\n\t[autoUpdateContent]=\"true\"\r\n\t[durationBeforeCallback]=\"1000\"\r\n\tstyle=\"min-height: 124px; width:100%; overflow: auto;\"\r\n></div>\r\n<div class=\"\u5BFC\u5165-\u4E8C\u7EA7\u6807\u9898 \u4E8C\u7EA7\u5B57\u4F53\u989C\u8272\">before\uFF08\u7528ImportTempTable\u5F15\u7528\u4E34\u65F6\u8868\uFF09</div>\r\n<div class=\"SQL\u8BED\u53E5 \u8FB9\u6846\"\r\n\tace-editor\r\n\t[(text)]=\"svr.Params.Before\"\r\n\tmode=\"sql\"\r\n\t[theme]=\"'eclipse'\"\r\n\t[options]=\"options\" \r\n\t[autoUpdateContent]=\"true\"\r\n\t[durationBeforeCallback]=\"1000\"\r\n\tstyle=\"min-height: 124px; width:100%; overflow: auto;\"\r\n></div>\r\n<div class=\"\u5BFC\u5165-\u4E8C\u7EA7\u6807\u9898 \u4E8C\u7EA7\u5B57\u4F53\u989C\u8272\">after</div>\r\n<div class=\"SQL\u8BED\u53E5 \u8FB9\u6846\"\r\n\tace-editor\r\n\t[(text)]=\"svr.Params.After\"\r\n\tmode=\"sql\"\r\n\t[theme]=\"'eclipse'\"\r\n\t[options]=\"options\" \r\n\t[autoUpdateContent]=\"true\"\r\n\t[durationBeforeCallback]=\"1000\"\r\n\tstyle=\"min-height: 124px; width:100%; overflow: auto;\"\r\n></div> -->",
                        styles: [".set-import-main{width:100%;box-sizing:border-box}.set-title{width:100%;font:16px bold;margin-bottom:16px}.title-box{display:flex;justify-content:space-between;width:100%;box-sizing:border-box;margin-bottom:8px}.title-box .second-title{font-size:12px;margin-bottom:8px}.title-box .select-box{font-size:14px}.first,.second,.third{flex:1}.second{margin-left:24px;margin-right:24px}.second .select-box{max-width:220px}.second-title{white-space:nowrap;box-sizing:border-box;margin-bottom:4px}.sql-statement{width:100%;box-sizing:border-box;margin-top:16px}.sql-statement .second-title{font-size:14px}.sql-wrapper{width:100%;min-height:124px;border-radius:4px;overflow:auto}"]
                    }] }
        ];
        /** @nocollapse */
        ImportSetComponent.ctorParameters = function () { return [
            { type: ElementService },
            { type: ThemeService }
        ]; };
        ImportSetComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.c-import-set',] }]
        };
        return ImportSetComponent;
    }());
    if (false) {
        /** @type {?} */
        ImportSetComponent.prototype.hostClass;
        /** @type {?} */
        ImportSetComponent.prototype.themeModel;
        /** @type {?} */
        ImportSetComponent.prototype.svr;
        /** @type {?} */
        ImportSetComponent.prototype.tableControl;
        /** @type {?} */
        ImportSetComponent.prototype.options;
        /** @type {?} */
        ImportSetComponent.prototype.tables;
        /** @type {?} */
        ImportSetComponent.prototype.subs;
        /** @type {?} */
        ImportSetComponent.prototype.elementSvr;
        /**
         * @type {?}
         * @private
         */
        ImportSetComponent.prototype.theme;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ɵ0 = dbwebCore.SaveStateData;
    var ElementModule = /** @class */ (function () {
        function ElementModule() {
        }
        ElementModule.decorators = [
            { type: core.NgModule, args: [{
                        declarations: [
                            ElementComponent,
                            SetPropertyRecordviewComponent,
                            ParamsRecordviewFetchSQLComponent,
                            SetPropertyImportComponent,
                            ConditionalTemplateComponent,
                            ProcessingListsComponent,
                            SelectSettingComponent,
                            SliderSettingComponent,
                            RangeInputSettingComponent,
                            SetPropertyBillComponent,
                            SetPropertyUpdateComponent,
                            SetParamsComponent,
                            ListParamsComponent,
                            ImportFieldComponent,
                            ImportSetComponent
                        ],
                        imports: [
                            BillModule,
                            common.CommonModule,
                            material.MatFormFieldModule,
                            material.MatCheckboxModule,
                            material.MatSelectModule,
                            forms.FormsModule,
                            material.MatInputModule,
                            material.MatButtonModule,
                            material.MatIconModule,
                            dragDrop.DragDropModule,
                            material.MatTableModule,
                            material.MatRadioModule,
                            material.MatTooltipModule,
                            material.MatAutocompleteModule,
                            material.MatSlideToggleModule,
                            material.MatDialogModule,
                            ng2AceEditor.AceEditorModule,
                            material.MatSidenavModule,
                            ViewDefineModule,
                            IconSelectModule,
                            LabelManagerModule,
                            material.MatDividerModule,
                            ng5Slider.Ng5SliderModule,
                            router.RouterModule.forChild([
                                {
                                    path: '**',
                                    component: ElementComponent,
                                    data: ɵ0
                                }
                            ])
                        ],
                        entryComponents: [SetParamsComponent, ListParamsComponent]
                    },] }
        ];
        return ElementModule;
    }());

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /** @type {?} */
    var exportAnimation = animations$1.trigger('exportAnimations', [
        animations$1.state('changing', animations$1.style({
            position: 'absolute',
            top: '16px',
            width: '960px',
            height: '160px',
            left: '50%',
            marginLeft: '-480px'
        })),
        animations$1.state('changed', animations$1.style({
            position: 'relative',
            width: '560px',
            height: '100px',
            margin: 'auto',
            paddingTop: '16px',
            borderRadius: '4px',
            opacity: 0.5,
            display: 'none'
        })),
        animations$1.state('changing_', animations$1.style({
            position: 'absolute !important',
            top: '192px !important',
            bottom: '56px',
            width: '960px',
            height: 'auto !important',
            overflow: 'auto',
            left: '50%',
            marginLeft: '-480px'
        })),
        animations$1.state('changed_', animations$1.style({
            position: 'relative',
            width: '560px',
            height: '100px',
            margin: 'auto',
            paddingTop: '16px',
            borderRadius: '4px',
            opacity: 0.5,
            display: 'none'
        })),
        animations$1.transition('*=>*', [animations$1.animate('0.2s')])
    ]);

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /**
     * @record
     */
    function DoExportParam() { }
    if (false) {
        /** @type {?} */
        DoExportParam.prototype.Format;
        /** @type {?} */
        DoExportParam.prototype.DB;
        /** @type {?} */
        DoExportParam.prototype.TableName;
        /** @type {?} */
        DoExportParam.prototype.Encoding;
        /** @type {?} */
        DoExportParam.prototype.Columns;
    }
    /**
     * @record
     */
    function ExportInfo() { }
    if (false) {
        /** @type {?} */
        ExportInfo.prototype.FromElement;
        /** @type {?} */
        ExportInfo.prototype.Timeout;
        /** @type {?} */
        ExportInfo.prototype.RowCount;
        /** @type {?} */
        ExportInfo.prototype.Columns;
        /** @type {?} */
        ExportInfo.prototype.DBNames;
        /** @type {?} */
        ExportInfo.prototype.DefaultTableName;
    }
    /**
     * @record
     */
    function DoExportResult() { }
    if (false) {
        /** @type {?} */
        DoExportResult.prototype.TaskID;
        /** @type {?} */
        DoExportResult.prototype.Timeout;
        /** @type {?} */
        DoExportResult.prototype.ZipFileSignURL;
        /** @type {?} */
        DoExportResult.prototype.TaskInfoURL;
        /** @type {?} */
        DoExportResult.prototype.TaskInfoSign;
        /** @type {?} */
        DoExportResult.prototype.ResultURL;
        /** @type {?} */
        DoExportResult.prototype.BrowseTaskElement;
    }
    /**
     * @record
     */
    function Column() { }
    if (false) {
        /** @type {?|undefined} */
        Column.prototype.selected;
        /** @type {?} */
        Column.prototype.Name;
        /** @type {?} */
        Column.prototype.Type;
        /** @type {?} */
        Column.prototype.MaxLength;
    }
    /**
     * @record
     */
    function ExportTaskWSMessage() { }
    if (false) {
        /** @type {?} */
        ExportTaskWSMessage.prototype.Data;
    }
    var ExportService = /** @class */ (function () {
        function ExportService(eles, api) {
            this.eles = eles;
            this.api = api;
            this.step = 'toPrepare';
            this.format = 'csv';
            this.encoding = 'utf8';
        }
        /**
         * @return {?}
         */
        ExportService.prototype.isAllSelected = /**
         * @return {?}
         */
        function () {
            return this.columns && this.columns.find((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return !v.selected; })) === undefined;
        };
        /**
         * @return {?}
         */
        ExportService.prototype.hasSelected = /**
         * @return {?}
         */
        function () {
            return this.columns && this.columns.find((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.selected; })) !== undefined;
        };
        /**
         * @return {?}
         */
        ExportService.prototype.init = /**
         * @return {?}
         */
        function () {
            var _this = this;
            return this.api.get('get-export-info').subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.srcElementTitle = v.FromElement;
                _this.rowCount = v.RowCount;
                _this.columns = v.Columns;
                // this.columns = [...v.Columns, ...v.Columns, ...v.Columns]; //测试长数据时使用
                _this.columns.forEach((/**
                 * @param {?} c
                 * @return {?}
                 */
                function (c) { return (c.selected = true); }));
                _this.dbNames = v.DBNames;
                _this.dbName = '';
                _this.tableName = v.DefaultTableName;
            }));
        };
        /**
         * @param {?} param
         * @return {?}
         */
        ExportService.prototype.doExport = /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            var _this = this;
            // console.log('进入post请求');
            return this.api.post('do-export', param).pipe(operators.tap((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                // 注册查看任务明细的url
                _this.eles.addElement(v.BrowseTaskElement);
                _this.eles.setURLSign(v.TaskInfoURL, v.TaskInfoSign);
            })));
        };
        ExportService.decorators = [
            { type: core.Injectable }
        ];
        /** @nocollapse */
        ExportService.ctorParameters = function () { return [
            { type: dbwebCore.ElementsService },
            { type: dbwebCore.CurrentApiService }
        ]; };
        return ExportService;
    }());
    if (false) {
        /** @type {?} */
        ExportService.prototype.step;
        /** @type {?} */
        ExportService.prototype.srcElementTitle;
        /** @type {?} */
        ExportService.prototype.rowCount;
        /** @type {?} */
        ExportService.prototype.format;
        /** @type {?} */
        ExportService.prototype.encoding;
        /** @type {?} */
        ExportService.prototype.dbName;
        /** @type {?} */
        ExportService.prototype.tableName;
        /** @type {?} */
        ExportService.prototype.columns;
        /** @type {?} */
        ExportService.prototype.dbNames;
        /** @type {?} */
        ExportService.prototype.timeRemaining;
        /** @type {?} */
        ExportService.prototype.exportProgress;
        /** @type {?} */
        ExportService.prototype.zipFileURL;
        /** @type {?} */
        ExportService.prototype.taskInfoURL;
        /**
         * @type {?}
         * @private
         */
        ExportService.prototype.eles;
        /**
         * @type {?}
         * @private
         */
        ExportService.prototype.api;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ExportComponent = /** @class */ (function () {
        function ExportComponent(svr, prj, eles, cur) {
            this.svr = svr;
            this.prj = prj;
            this.eles = eles;
            this.cur = cur;
            this.hostClass = true;
            this.subs = [];
        }
        /**
         * @return {?}
         */
        ExportComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            this.svr.init();
        };
        /**
         * @return {?}
         */
        ExportComponent.prototype.ngOnDestroy = /**
         * @return {?}
         */
        function () {
            this.subs.forEach((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.unsubscribe(); }));
        };
        /**
         * @param {?} event
         * @return {?}
         */
        ExportComponent.prototype.selectChecked = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            this.svr.columns.forEach((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return (v.selected = event.checked); }));
        };
        /**
         * @return {?}
         */
        ExportComponent.prototype.doExport = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.svr
                .doExport({
                Format: this.svr.format,
                DB: this.svr.dbName,
                TableName: this.svr.tableName,
                Encoding: this.svr.encoding,
                Columns: this.svr.columns.filter((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) { return v.selected; })).map((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) { return v.Name; }))
            })
                .subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.svr.step = 'inTheExpord';
                /** @type {?} */
                var startTime = new Date();
                _this.svr.taskInfoURL = _this.prj.frontURL('task', v.TaskInfoURL);
                _this.svr.zipFileURL = dbwebCore.fullApiPath(v.ZipFileSignURL);
                _this.subs.push(_this.cur.wsCtrl.observable.subscribe((/**
                 * @param {?} mes
                 * @return {?}
                 */
                function (mes) {
                    if (mes.Data.TaskID === v.TaskID) {
                        if (!mes.Data.Completed) {
                            /** @type {?} */
                            var g = mes.Data.Data / _this.svr.rowCount;
                            _this.svr.exportProgress = g * 100;
                            /** @type {?} */
                            var d = new Date().getTime() - startTime.getTime();
                            _this.svr.timeRemaining = (d / g) * (1 - g);
                        }
                        else {
                            _this.svr.exportProgress = 100;
                            _this.svr.step = 'complete';
                        }
                    }
                })));
            }));
        };
        /**
         * @param {?} type
         * @return {?}
         */
        ExportComponent.prototype.chineseString = /**
         * @param {?} type
         * @return {?}
         */
        function (type) {
            if (type === 'STR') {
                return '字符串';
            }
            else if (type === 'INT') {
                return '整型';
            }
            else if (type === 'DATE') {
                return '日期';
            }
            else if (type === 'FLOAT') {
                return '浮点';
            }
            else if (type === 'BYTEA') {
                return '二进制';
            }
        };
        ExportComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-export',
                        template: "<ng-container [ngSwitch]=\"svr.step\">\r\n\t\t<!-- **** \u6570\u636E\u5BFC\u51FA\u8868\u603B **** -->\r\n\t\t<div class=\"export-data\" *ngSwitchCase=\"'toPrepare'\">\r\n\t\t\t\t<!-- **** \u6570\u636E\u5BFC\u51FA\u8868\uFF08\u4E0A\uFF09 **** -->\r\n\t\t\t\t<div class=\"data-wrapper\">\r\n\t\t\t\t\t<!-- ** \u6570\u636E\u5BFC\u51FA\u5927\u6807\u9898 ** -->\r\n\t\t\t\t\t<header class=\"data-title\">\u6570\u636E\u5BFC\u51FA</header>\r\n\t\t\t\t\t<!-- ** \u6570\u636E\u5BFC\u51FA\u6B63\u8868 ** -->\r\n\t\t\t\t\t<section class=\"export-table\">\r\n\t\t\t\t\t\t<table>\r\n\t\t\t\t\t\t\t<!-- * \u8868\u5934 * -->\r\n\t\t\t\t\t\t\t<thead>\r\n\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t<th>\u6765\u6E90</th>\r\n\t\t\t\t\t\t\t\t\t<th>\u8BB0\u5F55\u6570</th>\r\n\t\t\t\t\t\t\t\t\t<th>\u683C\u5F0F</th>\r\n\t\t\t\t\t\t\t\t\t<th>\u7F16\u7801</th>\r\n\t\t\t\t\t\t\t\t\t<th>\u76EE\u6807\u6570\u636E\u5E93</th>\r\n\t\t\t\t\t\t\t\t\t<th>\u76EE\u6807\u8868</th>\r\n\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t</thead>\r\n\t\t\t\t\t\t\t<!-- * \u8868\u5355\u6B63\u4F53 * -->\r\n\t\t\t\t\t\t\t<tbody>\r\n\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t<!-- \u6765\u6E90 -->\r\n\t\t\t\t\t\t\t\t\t<td>{{svr.srcElementTitle}}</td>\r\n\t\t\t\t\t\t\t\t\t<!-- \u8BB0\u5F55\u6570 -->\r\n\t\t\t\t\t\t\t\t\t<td>{{svr.rowCount}}</td>\r\n\t\t\t\t\t\t\t\t\t<!-- \u683C\u5F0F -->\r\n\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t\t\t\t\t\t<mat-select class=\"export-slt\" [(ngModel)]=\"svr.format\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<mat-option value=\"csv\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tCSV(\u9017\u53F7\u5206\u9694\u6587\u672C)\r\n\t\t\t\t\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<mat-option value=\"txt\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tTXT(TAB\u5206\u9694\u6587\u672C)\r\n\t\t\t\t\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<mat-option value=\"json\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tJSON\r\n\t\t\t\t\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<mat-option value=\"excel\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tXLS(Excel\u683C\u5F0F\u6587\u4EF6)\r\n\t\t\t\t\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<mat-option value=\"sqlite3\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tSQLITE3\r\n\t\t\t\t\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<mat-option value=\"mytable\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\u6570\u636E\u5E93\u8868\r\n\t\t\t\t\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t<!-- \u7F16\u7801 -->\r\n\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t\t\t\t\t\t<mat-select [(ngModel)]=\"svr.encoding\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<mat-option value=\"utf8\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tUTF-8\r\n\t\t\t\t\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<mat-option value=\"gbk\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tGBK\r\n\t\t\t\t\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t<!-- \u76EE\u6807\u6570\u636E\u5E93 -->\r\n\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t\t\t\t\t\t<mat-select [(ngModel)]=\"svr.dbName\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t[disabled]=\"svr.format!=='mytable'\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<mat-option value=\"\">(\u7A7A)</mat-option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<mat-option *ngFor=\"let item of svr.dbNames\" [value]=\"item\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{{item}}\r\n\t\t\t\t\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t<!-- \u76EE\u6807\u8868 -->\r\n\t\t\t\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t\t\t\t\t\t<input matInput [(ngModel)]=\"svr.tableName\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t[disabled]=\"svr.format!=='mytable'\">\r\n\t\t\t\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t</tbody>\r\n\t\t\t\t\t\t</table>\r\n\t\t\t\t\t</section>\r\n\t\t\t\t</div>\r\n\t\t\r\n\t\t\t\t<!-- *** \u6307\u6807\u9009\u62E9\u8868\u5355\uFF08\u4E0B\uFF09 *** -->\r\n\t\t\t\t<div class=\"select-wrapper\">\r\n\t\t\t\t\t<!-- ** \u9009\u62E9\u8868\u5927\u6807\u9898 ** -->\r\n\t\t\t\t\t<header class=\"select-title\">\u6307\u6807\u9009\u62E9</header>\r\n\t\t\t\t\t<!-- ** \u9009\u62E9\u8868\u6B63\u8868 ** -->\r\n\t\t\t\t\t<section class=\"select-table\">\r\n\t\t\t\t\t\t<!-- * \u9009\u62E9\u8868 * -->\r\n\t\t\t\t\t\t<table mat-table [dataSource]=\"svr.columns\">\r\n\t\t\t\t\t\t\t<!-- \u9009\u62E9\u6846 -->\r\n\t\t\t\t\t\t\t<ng-container class=\"slt-checkbox\" matColumnDef=\"select\">\r\n\t\t\t\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\r\n\t\t\t\t\t\t\t\t\t<mat-checkbox (change)=\"selectChecked($event)\"\r\n\t\t\t\t\t\t\t\t\t\t[checked]=\"svr.isAllSelected()\"\r\n\t\t\t\t\t\t\t\t\t\t[indeterminate]=\"svr.hasSelected() && !svr.isAllSelected()\">\r\n\t\t\t\t\t\t\t\t\t</mat-checkbox>\r\n\t\t\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t\t\t<td mat-cell *matCellDef=\"let row\">\r\n\t\t\t\t\t\t\t\t\t<mat-checkbox [(ngModel)]=\"row.selected\">\r\n\t\t\t\t\t\t\t\t\t</mat-checkbox>\r\n\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t<!-- \u5E8F\u53F7 -->\r\n\t\t\t\t\t\t\t<ng-container matColumnDef=\"position\">\r\n\t\t\t\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\r\n\t\t\t\t\t\t\t\t\t\u5E8F\u53F7</th>\r\n\t\t\t\t\t\t\t\t<td mat-cell *matCellDef=\"let element,index as i\">\r\n\t\t\t\t\t\t\t\t\t{{ i+1 }}\r\n\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t<!-- \u540D\u79F0 -->\r\n\t\t\t\t\t\t\t<ng-container matColumnDef=\"name\">\r\n\t\t\t\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\r\n\t\t\t\t\t\t\t\t\t\u540D\u79F0</th>\r\n\t\t\t\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">\r\n\t\t\t\t\t\t\t\t\t{{ element.Name }}\r\n\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t<!-- \u5B57\u6BB5\u7C7B\u578B -->\r\n\t\t\t\t\t\t\t<ng-container matColumnDef=\"type\">\r\n\t\t\t\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\r\n\t\t\t\t\t\t\t\t\t\u5B57\u6BB5\u7C7B\u578B\r\n\t\t\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">\r\n\t\t\t\t\t\t\t\t\t{{ chineseString(element.Type) }}\r\n\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t<!-- \u957F\u5EA6 -->\r\n\t\t\t\t\t\t\t<ng-container matColumnDef=\"maxlength\">\r\n\t\t\t\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\r\n\t\t\t\t\t\t\t\t\t\u957F\u5EA6\r\n\t\t\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">\r\n\t\t\t\t\t\t\t\t\t{{ element.MaxLength }}\r\n\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t<!-- \u8868\u5934\u8BBE\u7F6E -->\r\n\t\t\t\t\t\t\t<tr mat-header-row\r\n\t\t\t\t\t\t\t\t*matHeaderRowDef=\"['select','position','name','type','maxlength']; sticky: true\">\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t<tr mat-row\r\n\t\t\t\t\t\t\t\t*matRowDef=\"let row; columns: ['select','name','position','type','maxlength']\">\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t</table>\r\n\t\t\t\t\t</section>\r\n\t\t\t\t\t<footer class=\"btn\">\r\n\t\t\t\t\t\t\t<button class=\"export-btn\" mat-button type=\"button\" (click)=\"doExport()\">\u5BFC\u51FA</button>\r\n\t\t\t\t\t</footer>\r\n\t\t\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\r\n\t<!-- \u76EE\u524D\u4E0D\u4E00\u5B9A\u9700\u8981 -->\r\n <div class=\"expording\" *ngSwitchCase=\"'inTheExpord'\">\r\n\r\n\t\t<div class=\"expording-wrapper\">\r\n\t\t\t<div class=\"expording-title\">\r\n\t\t\t\t\u6570\u636E\u6B63\u5728\u5BFC\u51FA\uFF0C\u5269\u4F59\r\n\t\t\t\t<span class=\"expording-num\">{{ svr.timeRemaining }}</span>\r\n\t\t\t\t\u79D2\r\n\t\t\t</div>\r\n\t\t\t<div class=\"expording-text\">\r\n\t\t\t\t\u540E\u53F0\u6B63\u5728\u5BFC\u51FA\u6570\u636E\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85\uFF0C\u7ED3\u675F\u540E\u5373\u53EF\u4E0B\u8F7D\uFF1B\u672C\u9875\u9762\u5173\u95ED\u540E\u53EF\u5728<u class=\"text-check\">\u4EFB\u52A1\u67E5\u8BE2</u>\u4E2D\u67E5\u770B\u8FDB\u5EA6\r\n\t\t\t</div>\r\n\t\t\t<div>\r\n\t\t\t\t<mat-progress-bar color=\"accent\" mode=\"determinate\"\r\n\t\t\t\t\t[value]=\"svr.exportProgress\"> </mat-progress-bar>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\r\n\t<div class=\"prepare\" *ngSwitchCase=\"'complete'\">\r\n\t\t<div class=\"prepare-wrapper\">\r\n\t\t\t<div class=\"prepare-title\">\u6587\u4EF6\u5DF2\u7ECF\u51C6\u5907\u5B8C\u6BD5</div>\r\n\t\t\t<div class=\"prepare-text\">\r\n\t\t\t\t\u53EF\u67E5\u770B\u4E0B\u8F7D\u6587\u4EF6\u7684\u5185\u5BB9\u6216\u76F4\u63A5\u8FDB\u884C\u4E0B\u8F7D\uFF1B\u672C\u9875\u9762\u5173\u95ED\u540E\u53EF\u5728<u class=\"text-check\"><a\r\n\t\t\t\t\t\t[routerLink]=\"svr.taskInfoURL\">\u4EFB\u52A1\u660E\u7EC6</a></u>\u9875\u9762\u4E2D\u67E5\u770B\u8FDB\u5EA6\r\n\t\t\t</div>\r\n\t\t\t<div class=\"btn\">\r\n\t\t\t\t<a mat-button [href]=\"svr.zipFileURL\"\r\n\t\t\t\t\t*ngIf=\"svr.format !=='mytable'\">\u4E0B\u8F7D</a>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</ng-container>\r\n\r\n",
                        animations: [exportAnimation],
                        providers: [ExportService],
                        styles: ["a{text-decoration:none}.export-data .data-wrapper,.export-data .select-wrapper{max-width:960px;min-width:688px;margin:0 auto;box-sizing:border-box;border-radius:4px;padding:16px 24px;box-shadow:0 5px 13px 0 rgba(0,0,0,.14)}.export-data .data-title,.export-data .select-title{margin-bottom:16px}.export-data .export-table,.export-data .select-table{width:100%}.export-data .data-wrapper{height:160px}.export-data .data-wrapper .data-title{font:20px bold}.export-data .data-wrapper .export-table{font-size:14px}.export-data .data-wrapper .export-table table{width:100%;border-collapse:collapse;box-sizing:border-box}.export-data .data-wrapper .export-table td,.export-data .data-wrapper .export-table th{height:40px;padding:0 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box}.export-data .data-wrapper .export-table th{text-align:left}.export-data .select-wrapper{height:auto;margin-top:16px}.export-data .select-wrapper .select-title{font:16px bold}.export-data .select-wrapper .select-table{width:100%;max-height:535px;overflow:auto;box-shadow:0 5px 13px 0 rgba(0,0,0,.14)}.export-data .select-wrapper table{width:100%;box-sizing:border-box}.export-data .select-wrapper .slt-checkbox{width:50px}.export-data .select-wrapper td,.export-data .select-wrapper th{height:32px;box-sizing:border-box}.export-data .select-wrapper .btn{width:100%;text-align:right;margin-top:16px}.export-data .select-wrapper .btn .export-btn{width:80px;height:32px;line-height:32px;color:#fff;font-size:14px}.expording{display:flex;justify-content:center;align-items:center;width:100%;height:calc(100vh - 30px)}.expording .expording-wrapper{width:624px;height:456px;margin-top:-60px;background:url(/front/assets/export/prepare.png) top center/300px 300px no-repeat;box-shadow:0 2px 5px 0 rgba(0,0,0,.14);box-sizing:border-box}.expording .expording-wrapper .expording-text,.expording .expording-wrapper .expording-title{width:100%;box-sizing:border-box}.expording .expording-wrapper .expording-title{padding:271px 128px 0;font-size:24px}.expording .expording-wrapper .expording-text{padding:16px 128px 88px;font-size:16px}.expording .expording-wrapper .expording-text .text-check{font-weight:700}.prepare{display:flex;justify-content:center;align-items:center;width:100%;height:calc(100vh - 30px)}.prepare .prepare-wrapper{width:624px;height:456px;margin-top:-60px;background:url(/front/assets/export/done.png) top center/300px 300px no-repeat;box-shadow:0 2px 5px 0 rgba(0,0,0,.14);box-sizing:border-box}.prepare .prepare-wrapper .expording-text,.prepare .prepare-wrapper .expording-title{width:100%;box-sizing:border-box}.prepare .prepare-wrapper .prepare-title{padding:271px 128px 0;font-size:24px}.prepare .prepare-wrapper .prepare-text{padding:16px 128px 0;font-size:16px}.prepare .prepare-wrapper .prepare-text .text-check{font-weight:700}.prepare .prepare-wrapper .btn{width:100%;text-align:right;padding:35px 32px 25px 0;box-sizing:border-box}.prepare .prepare-wrapper .btn a{width:80px;height:32px;line-height:32px;color:#fff;font-size:14px}"]
                    }] }
        ];
        /** @nocollapse */
        ExportComponent.ctorParameters = function () { return [
            { type: ExportService },
            { type: dbwebCore.ProjectService },
            { type: dbwebCore.ElementsService },
            { type: dbwebCore.CurrentService }
        ]; };
        ExportComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.export',] }]
        };
        return ExportComponent;
    }());
    if (false) {
        /** @type {?} */
        ExportComponent.prototype.hostClass;
        /** @type {?} */
        ExportComponent.prototype.subs;
        /** @type {?} */
        ExportComponent.prototype.svr;
        /** @type {?} */
        ExportComponent.prototype.prj;
        /**
         * @type {?}
         * @private
         */
        ExportComponent.prototype.eles;
        /**
         * @type {?}
         * @private
         */
        ExportComponent.prototype.cur;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ɵ0$1 = dbwebCore.SaveStateData;
    var ExportModule = /** @class */ (function () {
        function ExportModule() {
        }
        ExportModule.decorators = [
            { type: core.NgModule, args: [{
                        declarations: [ExportComponent],
                        imports: [
                            select.MatSelectModule,
                            expansion.MatExpansionModule,
                            icon.MatIconModule,
                            input.MatInputModule,
                            forms.FormsModule,
                            common.CommonModule,
                            button.MatButtonModule,
                            table.MatTableModule,
                            checkbox.MatCheckboxModule,
                            progressBar.MatProgressBarModule,
                            stepper.MatStepperModule,
                            formField.MatFormFieldModule,
                            router.RouterModule.forChild([{ path: '**', data: ɵ0$1, component: ExportComponent }])
                        ]
                    },] }
        ];
        return ExportModule;
    }());

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ElementViewDigest = /** @class */ (function () {
        function ElementViewDigest() {
        }
        /**
         * @param {?} data
         * @return {?}
         */
        ElementViewDigest.fromInterface = /**
         * @param {?} data
         * @return {?}
         */
        function (data) {
            /** @type {?} */
            var rev = new ElementViewDigest();
            Object.assign(rev, data);
            return rev;
        };
        /**
         * @return {?}
         */
        ElementViewDigest.prototype.displayLabel = /**
         * @return {?}
         */
        function () {
            if (this.OwnerBy === OwnerByEnum.ownerByEle) {
                return '缺省显示列';
            }
            if (this.OwnerBy === OwnerByEnum.unknow) {
                return '标签合并列';
            }
            return this.Name;
        };
        /**
         * @param {?} userName
         * @param {?} deptCode
         * @return {?}
         */
        ElementViewDigest.prototype.canModify = /**
         * @param {?} userName
         * @param {?} deptCode
         * @return {?}
         */
        function (userName, deptCode) {
            return ((this.OwnerBy === OwnerByEnum.ownerByDept && this.Owner === deptCode) ||
                (this.OwnerBy === OwnerByEnum.ownerByUser && this.Owner === userName));
        };
        return ElementViewDigest;
    }());
    if (false) {
        /** @type {?} */
        ElementViewDigest.prototype.OwnerBy;
        /** @type {?} */
        ElementViewDigest.prototype.Owner;
        /** @type {?} */
        ElementViewDigest.prototype.Name;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /**
     * @record
     */
    function TableColumnType() { }
    if (false) {
        /**
         * 附加的属性,用于客户端
         * @type {?}
         */
        TableColumnType.prototype.index;
        /** @type {?} */
        TableColumnType.prototype.sticky;
        /** @type {?} */
        TableColumnType.prototype.stickyEnd;
        /** @type {?} */
        TableColumnType.prototype.showToolbar;
    }
    /** @enum {string} */
    var Order$1 = {
        // OrderAsc 升序
        OrderAsc: '+',
        // OrderDesc 降序
        OrderDesc: '-',
        // OrderNone 无排序
        OrderNone: '',
    };
    /** @enum {string} */
    var SelectType = {
        Selected: 's',
        Unselected: 'ns',
    };
    /**
     * @record
     */
    function ConditionalValue() { }
    if (false) {
        /** @type {?} */
        ConditionalValue.prototype.Type;
        /** @type {?} */
        ConditionalValue.prototype.Field;
        /** @type {?} */
        ConditionalValue.prototype.Value;
    }
    /**
     * @record
     */
    function RangeInputConditionalValue() { }
    if (false) {
        /** @type {?} */
        RangeInputConditionalValue.prototype.LowValue;
        /** @type {?} */
        RangeInputConditionalValue.prototype.HighValue;
    }
    /**
     * @record
     */
    function SelectConditionalValue() { }
    if (false) {
        /** @type {?} */
        SelectConditionalValue.prototype.Value;
        /** @type {?} */
        SelectConditionalValue.prototype.OtherOption;
        /** @type {?} */
        SelectConditionalValue.prototype.Options;
    }
    /**
     * @record
     */
    function MultiSelectConditionalValue() { }
    if (false) {
        /** @type {?} */
        MultiSelectConditionalValue.prototype.Value;
        /** @type {?} */
        MultiSelectConditionalValue.prototype.OtherOption;
        /** @type {?} */
        MultiSelectConditionalValue.prototype.Options;
    }
    /**
     * @record
     */
    function SliderConditionalValue() { }
    if (false) {
        /** @type {?} */
        SliderConditionalValue.prototype.LowValue;
        /** @type {?} */
        SliderConditionalValue.prototype.HighValue;
        /** @type {?} */
        SliderConditionalValue.prototype.PositiveInfinity;
        /** @type {?} */
        SliderConditionalValue.prototype.NegativeInfinity;
        /** @type {?} */
        SliderConditionalValue.prototype.Ratio;
    }
    /**
     * @record
     */
    function IFetchDataParam() { }
    if (false) {
        /**
         * 分隔行的主键值
         * @type {?|undefined}
         */
        IFetchDataParam.prototype.Divide;
        /**
         * 排序的字段,升序只填字段名,降序字段名前加-(减号)
         * @type {?|undefined}
         */
        IFetchDataParam.prototype.Order;
        /**
         * 字段
         * @type {?|undefined}
         */
        IFetchDataParam.prototype.Field;
        /**
         * 运算符
         * @type {?|undefined}
         */
        IFetchDataParam.prototype.Opt;
        /**
         * 值
         * @type {?|undefined}
         */
        IFetchDataParam.prototype.Value;
        /**
         * 选择类型
         * @type {?|undefined}
         */
        IFetchDataParam.prototype.SelType;
        /**
         * 选择的主键
         * @type {?|undefined}
         */
        IFetchDataParam.prototype.SelKeys;
        /**
         * 每页最多行数
         * @type {?|undefined}
         */
        IFetchDataParam.prototype.Limit;
        /**
         * 开始行号
         * @type {?|undefined}
         */
        IFetchDataParam.prototype.DivideRowNum;
        /** @type {?|undefined} */
        IFetchDataParam.prototype.Labels;
        /** @type {?|undefined} */
        IFetchDataParam.prototype.View;
        /** @type {?|undefined} */
        IFetchDataParam.prototype.ConditionalTemplate;
    }
    /**
     * @record
     */
    function IFetchRowCountResult() { }
    if (false) {
        /** @type {?} */
        IFetchRowCountResult.prototype.RowCount;
    }
    /**
     * @record
     */
    function IFetchDataResultType() { }
    if (false) {
        /** @type {?} */
        IFetchDataResultType.prototype.Error;
        /** @type {?} */
        IFetchDataResultType.prototype.FData;
    }
    /**
     * @record
     */
    function IFetchDataResult() { }
    if (false) {
        /** @type {?} */
        IFetchDataResult.prototype.Title;
        /** @type {?} */
        IFetchDataResult.prototype.Rows;
        /** @type {?} */
        IFetchDataResult.prototype.Columns;
        /** @type {?} */
        IFetchDataResult.prototype.DisplayColumns;
        /**
         * 一般为0,除非最后一页,通过最后的序号得出总数
         * @type {?}
         */
        IFetchDataResult.prototype.RowCount;
        /**
         * 下一页用到的起始序号
         * @type {?}
         */
        IFetchDataResult.prototype.DownRowNum;
        /**
         * 下一页用到的起始分界值
         * @type {?}
         */
        IFetchDataResult.prototype.DownDivide;
        /**
         * 非绑定记录的处理按钮的可用性
         * @type {?}
         */
        IFetchDataResult.prototype.Processes;
    }
    /**
     * @record
     */
    function IRenderProcess() { }
    if (false) {
        /** @type {?} */
        IRenderProcess.prototype.URL;
        /** @type {?} */
        IRenderProcess.prototype.Sign;
        /** @type {?} */
        IRenderProcess.prototype.Enabled;
    }
    /**
     * @record
     */
    function IRenderRow() { }
    if (false) {
        /** @type {?} */
        IRenderRow.prototype.RowNum;
        /**
         * 是否被选中
         * @type {?}
         */
        IRenderRow.prototype.Checked;
        /**
         * 该行关联的主键值,多字段用csv格式组合
         * @type {?}
         */
        IRenderRow.prototype.Key;
        /** @type {?} */
        IRenderRow.prototype.Data;
        /**
         * 绑定记录的处理按钮的可用性
         * @type {?}
         */
        IRenderRow.prototype.Processes;
    }
    /**
     * 菜单项定义中的处理按钮的参数
     * @record
     */
    function IRecordViewProcess() { }
    if (false) {
        /** @type {?} */
        IRecordViewProcess.prototype.Name;
        /**
         * [namespace]:[name] 的方式
         * @type {?}
         */
        IRecordViewProcess.prototype.Icon;
        /**
         * 图标的颜色
         * @type {?}
         */
        IRecordViewProcess.prototype.Color;
        /** @type {?} */
        IRecordViewProcess.prototype.ElementName;
        /** @type {?} */
        IRecordViewProcess.prototype.Element;
        /** @type {?} */
        IRecordViewProcess.prototype.BindRecord;
        /**
         * 传递到下一个工作元素的路径上,一般用来传递主键,如果为空则自动传递表的主键
         * @type {?}
         */
        IRecordViewProcess.prototype.TransPath;
        /**
         * 传递到下一个工作元素的参数,用模板来完成,
         * 一般是用来传递到另一个RecordView的附加条件及标题
         * @type {?}
         */
        IRecordViewProcess.prototype.TransQuery;
        /**
         * 是否传递sql
         * @type {?}
         */
        IRecordViewProcess.prototype.WithSql;
        /**
         * 非空的话计算可见性,用templater的语法
         * @type {?}
         */
        IRecordViewProcess.prototype.Visable;
        /**
         * 动态传入的more参数,从recordview的query中提取
         * @type {?}
         */
        IRecordViewProcess.prototype.MoreStr;
    }
    /**
     * @record
     */
    function IFetchParamResult() { }
    if (false) {
        /** @type {?} */
        IFetchParamResult.prototype.UniqueField;
        /** @type {?} */
        IFetchParamResult.prototype.Processes;
        /** @type {?} */
        IFetchParamResult.prototype.ConditionalTemplates;
    }
    /**
     * @record
     */
    function IDisplayColumn$1() { }
    if (false) {
        /** @type {?} */
        IDisplayColumn$1.prototype.Name;
        /** @type {?} */
        IDisplayColumn$1.prototype.Hidden;
        /** @type {?} */
        IDisplayColumn$1.prototype.Order;
    }
    /**
     * @record
     */
    function IElementViewDigest() { }
    if (false) {
        /** @type {?} */
        IElementViewDigest.prototype.OwnerBy;
        /** @type {?} */
        IElementViewDigest.prototype.Owner;
        /** @type {?} */
        IElementViewDigest.prototype.Name;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /** @enum {number} */
    var DataType$1 = {
        STR: 0,
        INT: 1,
        DATE: 2,
        BYTEA: 3,
        FLOAT: 4,
    };
    DataType$1[DataType$1.STR] = 'STR';
    DataType$1[DataType$1.INT] = 'INT';
    DataType$1[DataType$1.DATE] = 'DATE';
    DataType$1[DataType$1.BYTEA] = 'BYTEA';
    DataType$1[DataType$1.FLOAT] = 'FLOAT';
    /** @type {?} */
    var STR$1 = DataType$1.STR;
    /** @type {?} */
    var INT$1 = DataType$1.INT;
    /** @type {?} */
    var DATE$1 = DataType$1.DATE;
    /** @type {?} */
    var BYTEA$1 = DataType$1.BYTEA;
    /** @type {?} */
    var FLOAT$1 = DataType$1.FLOAT;
    /**
     * @record
     */
    function Operate$1() { }
    if (false) {
        /** @type {?} */
        Operate$1.prototype.Name;
        /** @type {?} */
        Operate$1.prototype.Label;
        /** @type {?} */
        Operate$1.prototype.AllowTypes;
    }
    // 各种数据类型允许使用的运算符
    /** @type {?} */
    var Operates$1 = [
        { Name: '=', Label: '等于', AllowTypes: [STR$1, INT$1, DATE$1, BYTEA$1, FLOAT$1] },
        { Name: '?', Label: '包含', AllowTypes: [STR$1, BYTEA$1] },
        { Name: '?>', Label: '前缀', AllowTypes: [STR$1, DATE$1, BYTEA$1] },
        { Name: 'e', Label: '为空', AllowTypes: [STR$1, INT$1, DATE$1, BYTEA$1, FLOAT$1] },
        { Name: '!=', Label: '不等于', AllowTypes: [STR$1, INT$1, DATE$1, BYTEA$1, FLOAT$1] },
        { Name: '>', Label: '大于', AllowTypes: [STR$1, INT$1, DATE$1, BYTEA$1, FLOAT$1] },
        { Name: '>=', Label: '大于等于', AllowTypes: [STR$1, INT$1, DATE$1, BYTEA$1, FLOAT$1] },
        { Name: '<', Label: '小于', AllowTypes: [STR$1, INT$1, DATE$1, BYTEA$1, FLOAT$1] },
        { Name: '<=', Label: '小于等于', AllowTypes: [STR$1, INT$1, DATE$1, BYTEA$1, FLOAT$1] },
        { Name: '!?', Label: '不包含', AllowTypes: [STR$1, BYTEA$1] },
        { Name: '!?>', Label: '非前缀', AllowTypes: [STR$1, DATE$1, BYTEA$1] },
        { Name: '<?', Label: '后缀', AllowTypes: [STR$1, DATE$1, BYTEA$1] },
        { Name: '!<?', Label: '非后缀', AllowTypes: [STR$1, DATE$1, BYTEA$1] },
        { Name: 'in', Label: '在列表', AllowTypes: [STR$1, INT$1, DATE$1, BYTEA$1, FLOAT$1] },
        { Name: '!in', Label: '不在列表', AllowTypes: [STR$1, INT$1, DATE$1, BYTEA$1, FLOAT$1] },
        { Name: '~', Label: '正则', AllowTypes: [STR$1] },
        { Name: '!~', Label: '非正则', AllowTypes: [STR$1] },
        { Name: '!e', Label: '非空', AllowTypes: [STR$1, INT$1, DATE$1, BYTEA$1, FLOAT$1] },
        { Name: '_', Label: '长度等于', AllowTypes: [STR$1, BYTEA$1] },
        { Name: '!_', Label: '长度不等于', AllowTypes: [STR$1, BYTEA$1] },
        { Name: '_>', Label: '长度大于', AllowTypes: [STR$1, BYTEA$1] },
        { Name: '_<', Label: '长度小于', AllowTypes: [STR$1, BYTEA$1] }
    ];

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /**
     * @record
     */
    function CacheFetchParam() { }
    if (false) {
        /** @type {?} */
        CacheFetchParam.prototype.timeOutTime;
        /** @type {?} */
        CacheFetchParam.prototype.data;
    }
    /**
     * @record
     */
    function UpdateViewParam() { }
    if (false) {
        /** @type {?} */
        UpdateViewParam.prototype.Name;
        /** @type {?} */
        UpdateViewParam.prototype.OwnerBy;
        /** @type {?} */
        UpdateViewParam.prototype.Owner;
        /** @type {?} */
        UpdateViewParam.prototype.Columns;
    }
    /**
     * @record
     */
    function UpdateViewNameParam() { }
    if (false) {
        /** @type {?} */
        UpdateViewNameParam.prototype.OldName;
        /** @type {?} */
        UpdateViewNameParam.prototype.Name;
        /** @type {?} */
        UpdateViewNameParam.prototype.OwnerBy;
        /** @type {?} */
        UpdateViewNameParam.prototype.Owner;
    }
    /**
     * @record
     */
    function BuildRecordViewURLParam() { }
    if (false) {
        /** @type {?} */
        BuildRecordViewURLParam.prototype.Title;
        /** @type {?} */
        BuildRecordViewURLParam.prototype.Condition;
        /** @type {?|undefined} */
        BuildRecordViewURLParam.prototype.More;
    }
    var BackFaceService = /** @class */ (function () {
        function BackFaceService(eleApi, api, eles) {
            this.eleApi = eleApi;
            this.api = api;
            this.eles = eles;
            this.paramCache = new Map();
        }
        /**
         * @param {?} param
         * @return {?}
         */
        BackFaceService.prototype.buildRecordViewURL = /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            return this.eleApi.get(this.eleName, 'build-record-view-url', param);
        };
        /**
         * @private
         * @template T
         * @param {?} method
         * @param {?=} param
         * @return {?}
         */
        BackFaceService.prototype.apiGet = /**
         * @private
         * @template T
         * @param {?} method
         * @param {?=} param
         * @return {?}
         */
        function (method, param) {
            return this.api.get(this.url, method, this.eles.getURLSign(this.url), param);
        };
        /**
         * @private
         * @template T
         * @param {?} method
         * @param {?=} param
         * @return {?}
         */
        BackFaceService.prototype.apiPost = /**
         * @private
         * @template T
         * @param {?} method
         * @param {?=} param
         * @return {?}
         */
        function (method, param) {
            return this.api.post(this.url, method, this.eles.getURLSign(this.url), param);
        };
        /**
         * @param {?} param
         * @return {?}
         */
        BackFaceService.prototype.fetchRowCount = /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            return this.apiPost('fetch-row-count', param);
        };
        /**
         * @param {?} param
         * @return {?}
         */
        BackFaceService.prototype.fetchData = /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            /** @type {?} */
            var startTime = new Date().getTime();
            return this.apiPost('fetch-data', param).pipe(operators.map((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return (__assign({}, v, { TimeConsuming: (new Date().getTime() - startTime) / 1000 })); })));
        };
        /**
         * @return {?}
         */
        BackFaceService.prototype.fetParamCache = /**
         * @return {?}
         */
        function () {
            var _this = this;
            if (this.paramCache.has(this.eleName)) {
                /** @type {?} */
                var data = this.paramCache.get(this.eleName);
                // 如果没有超时则返回
                if (data.timeOutTime > new Date()) {
                    return rxjs.from([data.data]);
                }
            }
            // console.log('fetch', eleName, 'param');
            return this.apiGet('fetch-param').pipe(operators.tap((/**
             * @param {?} val
             * @return {?}
             */
            function (val) {
                /** @type {?} */
                var date = new Date();
                date.setTime(date.getTime() + 5 * 1000 * 60); // 5分钟超时
                _this.paramCache.set(_this.eleName, { timeOutTime: date, data: val });
            })));
        };
        /**
         * @return {?}
         */
        BackFaceService.prototype.fetchAllColumns = /**
         * @return {?}
         */
        function () {
            return this.apiGet('fetch-all-columns');
        };
        // 获取视图清单
        // 获取视图清单
        /**
         * @return {?}
         */
        BackFaceService.prototype.fetchElementViewList = 
        // 获取视图清单
        /**
         * @return {?}
         */
        function () {
            return this.apiGet('fetch-element-view-list', this.eleName).pipe(operators.map((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.map((/**
             * @param {?} vv
             * @return {?}
             */
            function (vv) { return ElementViewDigest.fromInterface(vv); })); })));
        };
        /**
         * @param {?} param
         * @return {?}
         */
        BackFaceService.prototype.getViewColumns = /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            return this.apiGet('get-view-columns', param);
        };
        // 新增视图,只有名称,没有内容
        // 新增视图,只有名称,没有内容
        /**
         * @param {?} param
         * @return {?}
         */
        BackFaceService.prototype.addView = 
        // 新增视图,只有名称,没有内容
        /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            return this.apiPost('add-view', param);
        };
        // 更新视图
        // 更新视图
        /**
         * @param {?} param
         * @return {?}
         */
        BackFaceService.prototype.updateView = 
        // 更新视图
        /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            return this.apiPost('update-view', param);
        };
        // 更新视图名称
        // 更新视图名称
        /**
         * @param {?} param
         * @return {?}
         */
        BackFaceService.prototype.updateViewName = 
        // 更新视图名称
        /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            return this.apiPost('update-view-name', param);
        };
        // 删除视图
        // 删除视图
        /**
         * @param {?} param
         * @return {?}
         */
        BackFaceService.prototype.removeView = 
        // 删除视图
        /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            return this.apiPost('remove-view', param);
        };
        // 返回多个标签的涉及列
        // 返回多个标签的涉及列
        /**
         * @return {?}
         */
        BackFaceService.prototype.comboLabelsView = 
        // 返回多个标签的涉及列
        /**
         * @return {?}
         */
        function () {
            return this.apiGet('combo-labels-view');
        };
        BackFaceService.decorators = [
            { type: core.Injectable }
        ];
        /** @nocollapse */
        BackFaceService.ctorParameters = function () { return [
            { type: dbwebCore.ElementApiService },
            { type: dbwebCore.ApiService },
            { type: dbwebCore.ElementsService }
        ]; };
        return BackFaceService;
    }());
    if (false) {
        /** @type {?} */
        BackFaceService.prototype.eleName;
        /** @type {?} */
        BackFaceService.prototype.url;
        /** @type {?} */
        BackFaceService.prototype.paramCache;
        /**
         * @type {?}
         * @private
         */
        BackFaceService.prototype.eleApi;
        /**
         * @type {?}
         * @private
         */
        BackFaceService.prototype.api;
        /**
         * @type {?}
         * @private
         */
        BackFaceService.prototype.eles;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /** @type {?} */
    var defaultColumnsItem = ElementViewDigest.fromInterface({
        Name: '(缺省显示列)',
        Owner: ownerElement,
        OwnerBy: OwnerByEnum.ownerByEle
    });
    /** @type {?} */
    var combLabelColumnsItem = ElementViewDigest.fromInterface({
        Name: '(所有标签并集)',
        Owner: '',
        OwnerBy: OwnerByEnum.unknow
    });
    var ConditionalTemplateRunner = /** @class */ (function () {
        function ConditionalTemplateRunner() {
        }
        /**
         * @param {?} data
         * @return {?}
         */
        ConditionalTemplateRunner.fromInterface = /**
         * @param {?} data
         * @return {?}
         */
        function (data) {
            /** @type {?} */
            var rev = new ConditionalTemplateRunner();
            Object.assign(rev, data);
            rev.Data = {
                Field: data.Field,
                Type: data.Type,
                Value: null
            };
            return rev;
        };
        return ConditionalTemplateRunner;
    }());
    if (false) {
        /** @type {?} */
        ConditionalTemplateRunner.prototype.Type;
        /** @type {?} */
        ConditionalTemplateRunner.prototype.Field;
        /** @type {?} */
        ConditionalTemplateRunner.prototype.Setting;
        /** @type {?} */
        ConditionalTemplateRunner.prototype.Data;
        /** @type {?} */
        ConditionalTemplateRunner.prototype.enable;
    }
    var ServiceData = /** @class */ (function () {
        function ServiceData() {
            // 条件模板的用户数据
            this.rowProcesses = [];
            // 不跟随数据行,下方工具栏的处理列表
            this.toolbarProcesses = [];
            // 选中的标签
            this.selectedLabels = [];
            // 上一页按钮可用性
            this.prevPageDisable = true;
            // 下一页按钮可用性
            this.nextPageDisable = true;
            // 保存的上一页的取值参数
            this.upRowNum = [];
            this.upDivide = [];
            // 和当前数据对应的取数参数
            this.prevFetchRowNum = null;
            this.prevFetchDivide = null;
            // 界面上的各种设置直接映射到该参数结构中
            this.fetchParam = { Limit: 50 };
            // 记录总数
            this.rowCount = -1;
            // 打开哪一个抽屉
            this.showLabelDrawer = true;
            // 耗时
            this.timeConsuming = 0;
            // 静态的视图
            this.constViewItems = [defaultColumnsItem, combLabelColumnsItem];
            this.tableRowSelection = new collections.SelectionModel(true, []);
        }
        ServiceData.decorators = [
            { type: core.Injectable }
        ];
        return ServiceData;
    }());
    if (false) {
        /** @type {?} */
        ServiceData.prototype.conditionalTemplates;
        /** @type {?} */
        ServiceData.prototype.rowProcesses;
        /** @type {?} */
        ServiceData.prototype.toolbarProcesses;
        /** @type {?} */
        ServiceData.prototype.uniqueFields;
        /** @type {?} */
        ServiceData.prototype.allColumns;
        /** @type {?} */
        ServiceData.prototype.allColumnNames;
        /** @type {?} */
        ServiceData.prototype.allColumnsWithLetter;
        /** @type {?} */
        ServiceData.prototype.categories;
        /** @type {?} */
        ServiceData.prototype.selectedLabels;
        /** @type {?} */
        ServiceData.prototype.prevPageDisable;
        /** @type {?} */
        ServiceData.prototype.nextPageDisable;
        /** @type {?} */
        ServiceData.prototype.upRowNum;
        /** @type {?} */
        ServiceData.prototype.upDivide;
        /** @type {?} */
        ServiceData.prototype.prevFetchRowNum;
        /** @type {?} */
        ServiceData.prototype.prevFetchDivide;
        /** @type {?} */
        ServiceData.prototype.fetchParam;
        /** @type {?} */
        ServiceData.prototype.rowCount;
        /** @type {?} */
        ServiceData.prototype.tableData;
        /** @type {?} */
        ServiceData.prototype.showLabelDrawer;
        /** @type {?} */
        ServiceData.prototype.viewList;
        /** @type {?} */
        ServiceData.prototype.Operates;
        /** @type {?} */
        ServiceData.prototype.timeConsuming;
        /** @type {?} */
        ServiceData.prototype.constViewItems;
        /** @type {?} */
        ServiceData.prototype.selectedView;
        /** @type {?} */
        ServiceData.prototype.tableRowSelection;
        /** @type {?} */
        ServiceData.prototype.refreshDataProgress;
        /** @type {?} */
        ServiceData.prototype.refreshRowCountProgress;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var EditView = /** @class */ (function () {
        function EditView(svr) {
            this.svr = svr;
            this.titleInput = true;
            this.isAdd = true;
            this.addOwnerBy = OwnerByEnum.ownerByUser; // 仅新增时用到
            this.modify = false; // current是否被修改过
            // current是否被修改过
            this.currentChange = new core.EventEmitter();
        }
        Object.defineProperty(EditView.prototype, "current", {
            get: /**
             * @return {?}
             */
            function () {
                return this._current;
            },
            set: /**
             * @param {?} val
             * @return {?}
             */
            function (val) {
                var _this = this;
                /** @type {?} */
                var process = (/**
                 * @return {?}
                 */
                function () {
                    _this._current = val;
                    _this.Readonly = !_this._current.canModify(_this.svr.current.data.UserName, _this.svr.current.data.Dept.Code);
                    _this.currentChange.emit();
                });
                if (val === combLabelColumnsItem) {
                    this.svr.backface.comboLabelsView().subscribe((/**
                     * @param {?} cols
                     * @return {?}
                     */
                    function (cols) {
                        _this.SelectedColumns = cols.map((/**
                         * @param {?} col
                         * @return {?}
                         */
                        function (col) { return ({
                            Name: col,
                            Hidden: false,
                            Order: Order$1.OrderNone
                        }); }));
                    }));
                    process();
                }
                else {
                    this.svr.backface.getViewColumns(val).subscribe((/**
                     * @param {?} cols
                     * @return {?}
                     */
                    function (cols) {
                        _this.SelectedColumns = cols;
                        process();
                    }));
                }
            },
            enumerable: true,
            configurable: true
        });
        /**
         * @return {?}
         */
        EditView.prototype.done = /**
         * @return {?}
         */
        function () {
            var _this = this;
            if (this.isAdd) {
                /** @type {?} */
                var view_1 = {
                    Name: this.title,
                    OwnerBy: this.addOwnerBy,
                    Owner: this.addOwnerBy === OwnerByEnum.ownerByDept
                        ? this.svr.current.data.Dept.Code
                        : this.svr.current.data.UserName
                };
                return this.svr.backface.addView(view_1).pipe(operators.map((/**
                 * @return {?}
                 */
                function () {
                    /** @type {?} */
                    var dView = ElementViewDigest.fromInterface(view_1);
                    _this.svr.data.viewList.push(dView);
                    _this.current = dView;
                    _this.titleInput = false;
                    return true;
                })));
            }
            else {
                return this.svr.backface
                    .updateViewName({
                    OldName: this.current.Name,
                    Name: this.title,
                    OwnerBy: this.current.OwnerBy,
                    Owner: this.current.Owner
                })
                    .pipe(operators.map((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) {
                    _this.current.Name = _this.title;
                    _this.titleInput = false;
                    return true;
                })));
            }
        };
        /**
         * @return {?}
         */
        EditView.prototype.remove = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.svr.backface.removeView(this.current).subscribe((/**
             * @return {?}
             */
            function () {
                /** @type {?} */
                var num = _this.svr.data.viewList.findIndex((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) { return v === _this.current; }));
                _this.svr.data.viewList.splice(num, 1);
                if (_this.svr.data.viewList.length > 0) {
                    if (num < _this.svr.data.viewList.length) {
                        _this.current = _this.svr.data.viewList[num];
                    }
                    else {
                        _this.current = _this.svr.data.viewList[_this.svr.data.viewList.length - 1];
                    }
                }
                else {
                    _this.current = _this.svr.data.constViewItems[0];
                }
            }));
        };
        /**
         * @return {?}
         */
        EditView.prototype.add = /**
         * @return {?}
         */
        function () {
            this.title = '新的视图';
            this.isAdd = true;
            this.titleInput = true;
        };
        /**
         * @return {?}
         */
        EditView.prototype.edit = /**
         * @return {?}
         */
        function () {
            this.title = this._current.Name;
            this.isAdd = false;
            this.titleInput = true;
        };
        /**
         * @return {?}
         */
        EditView.prototype.cancel = /**
         * @return {?}
         */
        function () {
            this.titleInput = false;
            if (!this.current) {
                if (this.svr.data.viewList && this.svr.data.viewList.length > 0) {
                    this.current = this.svr.data.viewList[0];
                }
                else {
                    this.current = this.svr.data.constViewItems[0];
                }
            }
        };
        /**
         * @return {?}
         */
        EditView.prototype.save = /**
         * @return {?}
         */
        function () {
            var _this = this;
            return this.svr.backface
                .updateView({
                Name: this.current.Name,
                OwnerBy: this.current.OwnerBy,
                Owner: this.current.Owner,
                Columns: this.SelectedColumns
            })
                .pipe(operators.tap((/**
             * @return {?}
             */
            function () {
                _this.modify = false;
            })));
        };
        return EditView;
    }());
    if (false) {
        /** @type {?} */
        EditView.prototype.titleInput;
        /** @type {?} */
        EditView.prototype.isAdd;
        /** @type {?} */
        EditView.prototype.addOwnerBy;
        /** @type {?} */
        EditView.prototype.title;
        /**
         * @type {?}
         * @private
         */
        EditView.prototype._current;
        /** @type {?} */
        EditView.prototype.Readonly;
        /** @type {?} */
        EditView.prototype.SelectedColumns;
        /** @type {?} */
        EditView.prototype.modify;
        /** @type {?} */
        EditView.prototype.currentChange;
        /**
         * @type {?}
         * @private
         */
        EditView.prototype.svr;
    }
    /**
     * @record
     */
    function RefreshDataConfig() { }
    if (false) {
        /** @type {?|undefined} */
        RefreshDataConfig.prototype.keepDivide;
        /** @type {?|undefined} */
        RefreshDataConfig.prototype.keepRowCount;
    }
    var ServiceService = /** @class */ (function () {
        function ServiceService(data, prj, backface, tabs, eles, current, eleview, snackBar, curr) {
            this.data = data;
            this.prj = prj;
            this.backface = backface;
            this.tabs = tabs;
            this.eles = eles;
            this.current = current;
            this.eleview = eleview;
            this.snackBar = snackBar;
            this.curr = curr;
            this.subscribe = [];
            this.editView = new EditView(this);
            this.paramsChange = new rxjs.Subject(); // 参数发生变化,一般是初始化时一次,切换处理地一次
            // 参数发生变化,一般是初始化时一次,切换处理地一次
            // 标签定义界面的数据
            this.refreshDataEvent = new core.EventEmitter();
        }
        /**
         * @return {?}
         */
        ServiceService.prototype.ngOnDestroy = /**
         * @return {?}
         */
        function () {
            this.subscribe.forEach((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.unsubscribe(); }));
        };
        /**
         * @param {?} element
         * @param {?} title
         * @param {?} condition
         * @return {?}
         */
        ServiceService.prototype.initByCondition = /**
         * @param {?} element
         * @param {?} title
         * @param {?} condition
         * @return {?}
         */
        function (element, title, condition) {
            var _this = this;
            this.backface.eleName = element.Name;
            // 如果没有条件,则直接初始化
            if (!title && !condition) {
                this.init(element, this.prj.apiURL(element.Name));
            }
            else {
                this.backface
                    .buildRecordViewURL({
                    Title: title,
                    Condition: condition
                })
                    .subscribe((/**
                 * @param {?} str
                 * @return {?}
                 */
                function (str) {
                    _this.init(element, str);
                }));
            }
        };
        /**
         * @param {?} element
         * @param {?} url
         * @return {?}
         */
        ServiceService.prototype.init = /**
         * @param {?} element
         * @param {?} url
         * @return {?}
         */
        function (element, url) {
            var _this = this;
            this.element = element;
            this.backface.eleName = element.Name;
            this.backface.url = url;
            this.subscribe.push(this.curr.change$.subscribe((/**
             * @return {?}
             */
            function () {
                // tslint:disable-next-line: deprecation
                rxjs.forkJoin(_this.backface.fetParamCache(), _this.eleview.fetchElementAllCategories(element.Name), _this.backface.fetchElementViewList(), _this.backface.fetchAllColumns()).subscribe((/**
                 * @param {?} __0
                 * @return {?}
                 */
                function (_a) {
                    var _b = __read(_a, 4), param = _b[0], categories = _b[1], columnsList = _b[2], allColumns = _b[3];
                    if (param.Processes) {
                        // 注册相关的element,必须是第一时间注册,后面会引用到
                        param.Processes.forEach((/**
                         * @param {?} v
                         * @return {?}
                         */
                        function (v) {
                            _this.eles.addElement(__assign({}, v.Element, { NotMenu: true }));
                        }));
                        _this.data.rowProcesses = _this.withDefaultIconProcess(param.Processes.filter((/**
                         * @param {?} one
                         * @return {?}
                         */
                        function (one) { return one.BindRecord; })));
                        _this.data.toolbarProcesses = _this.withDefaultIconProcess(param.Processes.filter((/**
                         * @param {?} one
                         * @return {?}
                         */
                        function (one) { return !one.BindRecord; })));
                    }
                    else {
                        _this.data.rowProcesses = [];
                        _this.data.toolbarProcesses = [];
                    }
                    _this.data.uniqueFields = param.UniqueField;
                    if (param.ConditionalTemplates) {
                        _this.data.conditionalTemplates = param.ConditionalTemplates.map((/**
                         * @param {?} v
                         * @return {?}
                         */
                        function (v) {
                            return ConditionalTemplateRunner.fromInterface(v);
                        }));
                    }
                    _this.data.categories = categories;
                    _this.data.viewList = columnsList;
                    _this.data.selectedView = defaultColumnsItem;
                    _this.data.allColumns = allColumns;
                    _this.data.allColumnNames = allColumns.map((/**
                     * @param {?} v
                     * @return {?}
                     */
                    function (v) { return v.Name; }));
                    _this.data.allColumnsWithLetter = map2WithLetter(_this.data.allColumnNames);
                    _this.paramsChange.next();
                    _this.refreshData().subscribe();
                }), (/**
                 * @param {?} err
                 * @return {?}
                 */
                function (err) {
                    console.log(err);
                    if (err.error.Err.Message) {
                        _this.snackBar.open(err.error.Err.Message, '确定', { horizontalPosition: 'right' });
                    }
                }));
            })));
        };
        /**
         * @param {?} process
         * @return {?}
         */
        ServiceService.prototype.withDefaultIconProcess = /**
         * @param {?} process
         * @return {?}
         */
        function (process) {
            var _this = this;
            return process.map((/**
             * @param {?} pro
             * @return {?}
             */
            function (pro) {
                /** @type {?} */
                var rev = pro;
                if (!pro.Icon) {
                    /** @type {?} */
                    var ele = _this.eles.get(pro.ElementName);
                    if (ele.Bill) {
                        switch (pro.Element.BillOperate) {
                            case dbwebCore.BillOperate.Add:
                                rev.Icon = 'add';
                                break;
                            case dbwebCore.BillOperate.Edit:
                                rev.Icon = 'outlined:create';
                                break;
                            case dbwebCore.BillOperate.Browse:
                                rev.Icon = 'outlined:visibility';
                                break;
                            case dbwebCore.BillOperate.Delete:
                                rev.Icon = 'outlined:delete';
                                rev.Color = 'warn';
                                break;
                        }
                    }
                    else {
                        rev.Icon = '';
                    }
                }
                return rev;
            }));
        };
        /**
         * @return {?}
         */
        ServiceService.prototype.refreshRowCount = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.data.fetchParam.View = this.data.selectedView;
            this.data.fetchParam.Labels = this.data.selectedLabels;
            this.data.fetchParam.SelKeys = this.data.tableRowSelection.selected;
            this.data.refreshRowCountProgress = true;
            if (this.data.conditionalTemplates) {
                this.data.fetchParam.ConditionalTemplate = this.data.conditionalTemplates
                    .filter((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) { return v.enable; }))
                    .map((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) { return v.Data; }));
            }
            return this.backface.fetchRowCount(this.data.fetchParam).pipe(operators.map((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.data.rowCount = v.RowCount;
                _this.data.refreshRowCountProgress = false;
                return true;
            })));
        };
        // seek 指明是不是没有动过条件,仅仅翻页
        // seek 指明是不是没有动过条件,仅仅翻页
        /**
         * @param {?=} config
         * @return {?}
         */
        ServiceService.prototype.refreshData = 
        // seek 指明是不是没有动过条件,仅仅翻页
        /**
         * @param {?=} config
         * @return {?}
         */
        function (config) {
            var _this = this;
            if (config && config.keepDivide) {
                this.data.prevFetchDivide = this.data.fetchParam.Divide;
                this.data.prevFetchRowNum = this.data.fetchParam.DivideRowNum;
            }
            else {
                this.data.prevFetchDivide = undefined;
                this.data.prevFetchRowNum = undefined;
                this.data.fetchParam.Divide = undefined;
                this.data.fetchParam.DivideRowNum = undefined;
                this.data.upDivide = undefined;
                this.data.upRowNum = undefined;
            }
            this.data.fetchParam.View = this.data.selectedView;
            this.data.fetchParam.Labels = this.data.selectedLabels;
            this.data.fetchParam.SelKeys = this.data.tableRowSelection.selected;
            this.data.refreshDataProgress = true;
            if (this.data.conditionalTemplates) {
                this.data.fetchParam.ConditionalTemplate = this.data.conditionalTemplates
                    .filter((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) { return v.enable; }))
                    .map((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) { return v.Data; }));
            }
            return this.backface.fetchData(this.data.fetchParam).pipe(operators.map((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                if (v.Error) {
                    _this.snackBar.open(v.Error, '确定', { duration: 5000 });
                    _this.data.refreshDataProgress = false;
                    return { ok: false, error: v.Error };
                }
                // console.log('=======:', v.FData);
                _this.data.tableData = v.FData;
                _this.data.timeConsuming = v.TimeConsuming;
                _this.data.nextPageDisable =
                    (v.FData.RowCount === 0 && v.FData.Rows.length === 0) || v.FData.RowCount > 0;
                _this.data.prevPageDisable =
                    (v.FData.RowCount === 0 && v.FData.Rows.length === 0) || v.FData.Rows[0].RowNum === 1;
                _this.registerURLS();
                if (v.FData.RowCount >= 0) {
                    _this.data.rowCount = v.FData.RowCount;
                }
                else {
                    if (!config || !config.keepRowCount) {
                        _this.data.rowCount = -1; // 放这里可以防止界面无必要刷新
                    }
                }
                // 如果后端返回title,则说明是需要动态改变title值
                if (v.FData.Title) {
                    _this.tabs.active.titleObservable.next(v.FData.Title);
                }
                _this.refreshDataEvent.emit(config);
                _this.data.refreshDataProgress = false;
                return { ok: true };
            })));
        };
        // 注册相关的url的签名
        // 注册相关的url的签名
        /**
         * @return {?}
         */
        ServiceService.prototype.registerURLS = 
        // 注册相关的url的签名
        /**
         * @return {?}
         */
        function () {
            var _this = this;
            Object.keys(this.data.tableData.Processes).forEach((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.eles.setURLSign(_this.data.tableData.Processes[v].URL, _this.data.tableData.Processes[v].Sign);
            }));
            this.data.tableData.Rows.forEach((/**
             * @param {?} row
             * @return {?}
             */
            function (row) {
                Object.keys(row.Processes).forEach((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) {
                    _this.eles.setURLSign(row.Processes[v].URL, row.Processes[v].Sign);
                }));
            }));
        };
        // 获取指定列允许使用的运算符
        // 获取指定列允许使用的运算符
        /**
         * @private
         * @param {?} col
         * @return {?}
         */
        ServiceService.prototype.getOperates = 
        // 获取指定列允许使用的运算符
        /**
         * @private
         * @param {?} col
         * @return {?}
         */
        function (col) {
            if (!col) {
                return [];
            }
            /** @type {?} */
            var colType = DataType$1[this.data.tableData.Columns.find((/**
             * @param {?} c
             * @return {?}
             */
            function (c) { return c.Name === col; })).Type];
            return __spread([
                (/** @type {?} */ ({
                    Name: '',
                    Label: '(无)'
                }))
            ], Operates$1.filter((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.AllowTypes.includes(colType); })));
        };
        /**
         * @param {?} colName
         * @return {?}
         */
        ServiceService.prototype.onColumnChange = /**
         * @param {?} colName
         * @return {?}
         */
        function (colName) {
            var _this = this;
            this.data.Operates = this.getOperates(colName);
            // 如果之前的运算符已经不在列表中,则默认为 无
            if (this.data.fetchParam.Opt && !this.data.Operates.find((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.Name === _this.data.fetchParam.Opt; }))) {
                this.data.fetchParam.Opt = null;
            }
        };
        ServiceService.decorators = [
            { type: core.Injectable }
        ];
        /** @nocollapse */
        ServiceService.ctorParameters = function () { return [
            { type: ServiceData },
            { type: dbwebCore.ProjectService },
            { type: BackFaceService },
            { type: TabsService },
            { type: dbwebCore.ElementsService },
            { type: dbwebCore.CurrentService },
            { type: EleViewBackFaceService },
            { type: material.MatSnackBar },
            { type: dbwebCore.CurrentService }
        ]; };
        return ServiceService;
    }());
    if (false) {
        /**
         * @type {?}
         * @private
         */
        ServiceService.prototype.subscribe;
        /** @type {?} */
        ServiceService.prototype.element;
        /** @type {?} */
        ServiceService.prototype.editView;
        /** @type {?} */
        ServiceService.prototype.paramsChange;
        /** @type {?} */
        ServiceService.prototype.refreshDataEvent;
        /** @type {?} */
        ServiceService.prototype.data;
        /**
         * @type {?}
         * @private
         */
        ServiceService.prototype.prj;
        /** @type {?} */
        ServiceService.prototype.backface;
        /**
         * @type {?}
         * @private
         */
        ServiceService.prototype.tabs;
        /**
         * @type {?}
         * @private
         */
        ServiceService.prototype.eles;
        /** @type {?} */
        ServiceService.prototype.current;
        /**
         * @type {?}
         * @private
         */
        ServiceService.prototype.eleview;
        /**
         * @type {?}
         * @private
         */
        ServiceService.prototype.snackBar;
        /**
         * @type {?}
         * @private
         */
        ServiceService.prototype.curr;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var FooterToolbarComponent = /** @class */ (function () {
        function FooterToolbarComponent(svr, eles) {
            this.svr = svr;
            this.eles = eles;
            this.refreshDisable = false;
            this.nextPageDisable = false;
            this.PrevPageDisable = false;
            this.processClick = new core.EventEmitter();
            this.rowCountClick = new core.EventEmitter();
            this.prevPageClick = new core.EventEmitter();
            this.nextPageClick = new core.EventEmitter();
            this.Math = Math;
        }
        /**
         * @return {?}
         */
        FooterToolbarComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        /**
         * @return {?}
         */
        FooterToolbarComponent.prototype.pageText = /**
         * @return {?}
         */
        function () {
            // 小于0,则是不知道记录总数
            if (this.rowCount > 0) {
                return Math.ceil(this.startRowNo / this.pageSize) + "/" + Math.ceil(this.rowCount / this.pageSize) + "\u9875";
            }
            return "\u7B2C" + Math.ceil(this.startRowNo / this.pageSize) + "\u9875";
        };
        /**
         * @return {?}
         */
        FooterToolbarComponent.prototype.rowCountText = /**
         * @return {?}
         */
        function () {
            if (this.rowCount >= 0) {
                return "" + this.rowCount.toString();
            }
            return '/';
        };
        /**
         * @return {?}
         */
        FooterToolbarComponent.prototype.responseTimeText = /**
         * @return {?}
         */
        function () {
            if (this.responseTime > 1) {
                return this.responseTime.toFixed(2) + ' s';
            }
            else {
                return (this.responseTime * 1000).toFixed(0) + ' ms';
            }
        };
        FooterToolbarComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-footer-toolbar',
                        template: "<div class=\"\u5E95\u90E8\u5DE5\u5177\u6761\">\r\n\t<div class=\"\u64CD\u4F5C\u5F00\u5173\">\r\n\t\t<mat-icon class=\"\u8865\u5145\" svgIcon=\"bg_bottom_out\"></mat-icon>\r\n\t\t<!-- <div class=\"\u7FC5\u8180\u56FE\u6807\"></div> -->\r\n\t\t<img class=\"\u7FC5\u8180\u56FE\u6807\" (mouseover)=\"wingAnimation = true\" (mouseout)=\"wingAnimation = false\"\r\n\t\t\tsrc=\"{{ wingAnimation ? 'assets/record-view/\u4FEE\u6539\u7FBD\u6BDB.gif' : 'assets/record-view/\u4FEE\u6539\u7FBD\u6BDB.png' }}\"\r\n\t\t\t[matMenuTriggerFor]=\"openMenu\" alt=\"\" />\r\n\t</div>\r\n\t<mat-menu #openMenu=\"matMenu\" overlapTrigger=\"true\">\r\n\t\t<div class=\"\u5E95\u90E8\u5DE5\u5177\">\r\n\t\t\t<div *ngFor=\"let pro of process\" class=\"process\" (click)=\"processClick.emit(pro)\">\r\n\t\t\t\t<mat-icon class=\"page-icon\" [svgIcon]=\"pro.Icon? pro.Icon : 'default'\" [color]=\"pro.Color\"> </mat-icon>\r\n\t\t\t\t<p class=\"text\">{{ pro.Name }}</p>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</mat-menu>\r\n\t<div class=\"\u7FFB\u9875\u529F\u80FD\">\r\n\t\t<div class=\"\u9875\u7801\">\r\n\t\t\t\u8BB0\u5F55\u603B\u6570 <span class=\"\u603B\u6570 \u663E\u773C\">{{ rowCountText() }}</span>\r\n\t\t</div>\r\n\t\t<div class=\"\u5237\u65B0\" [class.\u5237\u65B0\u52A8\u753B]=\"!svr.data.refreshRowCountProgress\" (click)=\"rowCountClick.emit($event)\">\r\n\t\t\t<mat-icon class=\"\u5237\u65B0\u56FE\u6807 \u663E\u773C\" [class.\u5237\u65B0\u56FE\u6807\u52A8\u753B]=\"svr.data.refreshRowCountProgress\" svgIcon=\"cached\">\r\n\t\t\t</mat-icon>\r\n\t\t</div>\r\n\t\t<div class=\"\u54CD\u5E94\u65F6\u95F4\">\r\n\t\t\t\u54CD\u5E94\u65F6\u95F4\r\n\t\t\t<span *ngIf=\"!svr.data.refreshDataProgress\" class=\"\u603B\u6570 \u663E\u773C\">{{ responseTimeText() }}</span>\r\n\t\t\t<div class=\"\u8FDB\u5EA6\u6761\" [ngClass]=\"{ hide: !svr.data.refreshDataProgress }\">\r\n\t\t\t\t<img src=\"assets/record-view/tip.png\" alt=\"\u8FDB\u5EA6\u6761\" />\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n\t\t<button class=\"bottoms\" mat-icon-button (click)=\"prevPageClick.emit($event)\" [disabled]=\"PrevPageDisable\">\r\n\t\t\t<mat-icon svgIcon=\"chevron_left\"> </mat-icon>\r\n\t\t</button>\r\n\t\t<div class=\"\u9875\u7801 \u663E\u773C\" *ngIf=\"rowCount > 0; else pageElse\">\r\n\t\t\t{{ Math.ceil(this.startRowNo / this.pageSize) }}/{{ Math.ceil(this.rowCount / this.pageSize) }}\u9875\r\n\t\t</div>\r\n\t\t<ng-template #pageElse>\r\n\t\t\t<div class=\"\u9875\u7801 \u663E\u773C\">\u7B2C{{ Math.ceil(this.startRowNo / this.pageSize) }}\u9875</div>\r\n\t\t</ng-template>\r\n\t\t<button class=\"bottoms\" mat-icon-button (click)=\"nextPageClick.emit($event)\" [disabled]=\"nextPageDisable\">\r\n\t\t\t<mat-icon svgIcon=\"chevron_right\"> </mat-icon>\r\n\t\t</button>\r\n\t</div>\r\n</div>",
                        styles: ["@charset \"UTF-8\";:host{width:100%;height:24px;box-sizing:border-box;z-index:999;position:absolute;bottom:0;left:0}.\u5E95\u90E8\u5DE5\u5177\u6761{width:100%;height:100%;position:relative}.\u5E95\u90E8\u5DE5\u5177\u6761 .\u64CD\u4F5C\u5F00\u5173{width:98px;height:53px;position:absolute;left:0;bottom:0;text-align:center}.\u5E95\u90E8\u5DE5\u5177\u6761 .\u64CD\u4F5C\u5F00\u5173 .\u8865\u5145{width:98px;position:absolute;left:0;bottom:23px}.\u5E95\u90E8\u5DE5\u5177\u6761 .\u64CD\u4F5C\u5F00\u5173 .\u7FC5\u8180\u56FE\u6807{cursor:pointer;position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:32px;height:32px}.\u5E95\u90E8\u5DE5\u5177\u6761 .\u7FFB\u9875\u529F\u80FD{height:24px;position:absolute;top:0;right:24px;line-height:24px;font-size:12px;display:flex;justify-content:flex-start;align-items:center}.\u5E95\u90E8\u5DE5\u5177\u6761 .\u7FFB\u9875\u529F\u80FD .\u9875\u7801{line-height:24px;vertical-align:top}.\u5E95\u90E8\u5DE5\u5177\u6761 .\u7FFB\u9875\u529F\u80FD .\u9875\u7801 .\u603B\u6570{text-align:center;display:inline-block;min-width:15px;margin-left:8px}.\u5E95\u90E8\u5DE5\u5177\u6761 .\u7FFB\u9875\u529F\u80FD .\u663E\u773C{color:#fff}.\u5E95\u90E8\u5DE5\u5177\u6761 .\u7FFB\u9875\u529F\u80FD .\u54CD\u5E94\u65F6\u95F4{display:inline-block;vertical-align:top;height:24px}.\u5E95\u90E8\u5DE5\u5177\u6761 .\u7FFB\u9875\u529F\u80FD .\u54CD\u5E94\u65F6\u95F4 .\u603B\u6570{text-align:left;display:inline-block;width:45px;height:24px;margin-left:8px;margin-right:32px;vertical-align:top}.\u5E95\u90E8\u5DE5\u5177\u6761 .\u7FFB\u9875\u529F\u80FD .\u54CD\u5E94\u65F6\u95F4 .\u8FDB\u5EA6\u6761{width:64px;height:8px;line-height:8px;border-radius:4px;margin-right:13px;margin-left:8px;display:inline-block;overflow:hidden}.\u5E95\u90E8\u5DE5\u5177\u6761 .\u7FFB\u9875\u529F\u80FD .\u54CD\u5E94\u65F6\u95F4 .\u8FDB\u5EA6\u6761 img{-webkit-animation:2s linear infinite progressBar;animation:2s linear infinite progressBar}@-webkit-keyframes progressBar{from{-webkit-transform:translateX(-60px);transform:translateX(-60px)}to{-webkit-transform:translateX(-5px);transform:translateX(-5px)}}@keyframes progressBar{from{-webkit-transform:translateX(-60px);transform:translateX(-60px)}to{-webkit-transform:translateX(-5px);transform:translateX(-5px)}}.\u5E95\u90E8\u5DE5\u5177\u6761 .\u7FFB\u9875\u529F\u80FD .bottoms{margin:0 8px;padding:0;width:24px;height:24px;line-height:19px}.\u5E95\u90E8\u5DE5\u5177\u6761 .\u7FFB\u9875\u529F\u80FD .\u5237\u65B0{width:24px;height:24px;text-align:center;display:inline-block;margin:0 24px 0 8px;padding:4px;box-sizing:border-box}.\u5E95\u90E8\u5DE5\u5177\u6761 .\u7FFB\u9875\u529F\u80FD .\u5237\u65B0 .\u5237\u65B0\u56FE\u6807{width:16px;height:16px;line-height:16px}.\u5E95\u90E8\u5DE5\u5177\u6761 .\u7FFB\u9875\u529F\u80FD .\u5237\u65B0 .\u5237\u65B0\u56FE\u6807\u52A8\u753B{-webkit-animation:1s linear infinite refresh;animation:1s linear infinite refresh}@-webkit-keyframes refresh{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(-360deg);transform:rotate(-360deg)}}@keyframes refresh{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(-360deg);transform:rotate(-360deg)}}::ng-deep .mat-menu-panel{max-width:none!important}.\u5E95\u90E8\u5DE5\u5177{width:328px;padding:16px 16px 8px;box-sizing:border-box;display:flex;align-items:stretch;flex-wrap:wrap;justify-content:flex-start}.\u5E95\u90E8\u5DE5\u5177 .process{width:64px;padding:8px 0;text-align:center;margin:0 4px;cursor:pointer}.\u5E95\u90E8\u5DE5\u5177 .text{width:64px;font-size:14px;margin:0}.hide{display:none!important}"]
                    }] }
        ];
        /** @nocollapse */
        FooterToolbarComponent.ctorParameters = function () { return [
            { type: ServiceService },
            { type: dbwebCore.ElementsService }
        ]; };
        FooterToolbarComponent.propDecorators = {
            class: [{ type: core.Input }],
            process: [{ type: core.Input }],
            pageSize: [{ type: core.Input }],
            startRowNo: [{ type: core.Input }],
            rowCount: [{ type: core.Input }],
            responseTime: [{ type: core.Input }],
            refreshDisable: [{ type: core.Input }],
            nextPageDisable: [{ type: core.Input }],
            PrevPageDisable: [{ type: core.Input }],
            processClick: [{ type: core.Output }],
            rowCountClick: [{ type: core.Output }],
            prevPageClick: [{ type: core.Output }],
            nextPageClick: [{ type: core.Output }]
        };
        return FooterToolbarComponent;
    }());
    if (false) {
        /** @type {?} */
        FooterToolbarComponent.prototype.class;
        /** @type {?} */
        FooterToolbarComponent.prototype.process;
        /** @type {?} */
        FooterToolbarComponent.prototype.pageSize;
        /** @type {?} */
        FooterToolbarComponent.prototype.startRowNo;
        /** @type {?} */
        FooterToolbarComponent.prototype.rowCount;
        /** @type {?} */
        FooterToolbarComponent.prototype.responseTime;
        /** @type {?} */
        FooterToolbarComponent.prototype.refreshDisable;
        /** @type {?} */
        FooterToolbarComponent.prototype.nextPageDisable;
        /** @type {?} */
        FooterToolbarComponent.prototype.PrevPageDisable;
        /** @type {?} */
        FooterToolbarComponent.prototype.processClick;
        /** @type {?} */
        FooterToolbarComponent.prototype.rowCountClick;
        /** @type {?} */
        FooterToolbarComponent.prototype.prevPageClick;
        /** @type {?} */
        FooterToolbarComponent.prototype.nextPageClick;
        /** @type {?} */
        FooterToolbarComponent.prototype.Math;
        /** @type {?} */
        FooterToolbarComponent.prototype.wingAnimation;
        /** @type {?} */
        FooterToolbarComponent.prototype.svr;
        /**
         * @type {?}
         * @private
         */
        FooterToolbarComponent.prototype.eles;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var LabelDrawerForEditComponent = /** @class */ (function () {
        function LabelDrawerForEditComponent(svr, dialog, eleviewBackFace) {
            this.svr = svr;
            this.dialog = dialog;
            this.eleviewBackFace = eleviewBackFace;
            this.hostClass = true;
            this.back = new core.EventEmitter();
        }
        /**
         * @return {?}
         */
        LabelDrawerForEditComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        LabelDrawerForEditComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-label-drawer-for-edit',
                        template: "<div class=\"content\">\r\n\t<common-label-manager\r\n\t\t[eleName]=\"svr.element.Name\"\r\n\t\t[ownerBy]=\"category.OwnerBy\"\r\n\t\t[owner]=\"this.category.Owner\"\r\n\t\t[title]=\"this.category.categoryDisplayLabel()\"\r\n\t\t[allColumnsWithLetter]=\"svr.data.allColumnsWithLetter\"\r\n\t\t[backface]=\"eleviewBackFace\"\r\n\t\t(close)=\"back.emit()\"\r\n\t>\r\n\t</common-label-manager>\r\n</div>\r\n",
                        styles: [":host{width:618px;height:100%;box-sizing:border-box}.edit-list{width:618px;height:100%;box-sizing:border-box;display:flex;flex-direction:column}.content{width:618px;height:100%;overflow-y:auto;box-sizing:border-box}"]
                    }] }
        ];
        /** @nocollapse */
        LabelDrawerForEditComponent.ctorParameters = function () { return [
            { type: ServiceService },
            { type: material.MatDialog },
            { type: EleViewBackFaceService }
        ]; };
        LabelDrawerForEditComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.label-drawer-for-edit',] }],
            back: [{ type: core.Output }],
            category: [{ type: core.Input }]
        };
        return LabelDrawerForEditComponent;
    }());
    if (false) {
        /** @type {?} */
        LabelDrawerForEditComponent.prototype.hostClass;
        /** @type {?} */
        LabelDrawerForEditComponent.prototype.back;
        /** @type {?} */
        LabelDrawerForEditComponent.prototype.category;
        /** @type {?} */
        LabelDrawerForEditComponent.prototype.svr;
        /** @type {?} */
        LabelDrawerForEditComponent.prototype.dialog;
        /** @type {?} */
        LabelDrawerForEditComponent.prototype.eleviewBackFace;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var LabelDrawerForSelectComponent = /** @class */ (function () {
        function LabelDrawerForSelectComponent(svr) {
            this.svr = svr;
            this.edit = new core.EventEmitter();
            this.close = new core.EventEmitter();
            this.hostClass = true;
            this.panelActiveIndex = 0;
            this.panelOpenState = {};
            this.subject = [];
        }
        /**
         * @return {?}
         */
        LabelDrawerForSelectComponent.prototype.ngOnDestroy = /**
         * @return {?}
         */
        function () {
            this.subject.forEach((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.unsubscribe(); }));
        };
        /**
         * @return {?}
         */
        LabelDrawerForSelectComponent.prototype.ngAfterViewInit = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.subject.push(this.svr.paramsChange.subscribe((/**
             * @return {?}
             */
            function () {
                _this.panelActiveIndex = 0;
                _this.panelOpenState = [];
            })));
        };
        /**
         * @param {?} index
         * @return {?}
         */
        LabelDrawerForSelectComponent.prototype.removeLabel = /**
         * @param {?} index
         * @return {?}
         */
        function (index) {
            this.selectedLabels.splice(index, 1);
        };
        /**
         * @return {?}
         */
        LabelDrawerForSelectComponent.prototype.ok = /**
         * @return {?}
         */
        function () {
            var _a;
            var _this = this;
            /** @type {?} */
            var old = __spread(this.svr.data.selectedLabels);
            (_a = this.svr.data.selectedLabels).splice.apply(_a, __spread([0, this.svr.data.selectedLabels.length], this.selectedLabels));
            this.subject.push(this.svr.refreshData().subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                var _a;
                if (v.ok) {
                    _this.close.emit();
                }
                else {
                    (_a = _this.svr.data.selectedLabels).splice.apply(_a, __spread([0, _this.svr.data.selectedLabels.length], old));
                    alert(v.error);
                }
            })));
        };
        /**
         * @param {?} index
         * @return {?}
         */
        LabelDrawerForSelectComponent.prototype.panelOpened = /**
         * @param {?} index
         * @return {?}
         */
        function (index) {
            this.panelActiveIndex = index;
            this.panelOpenState[index] = true;
        };
        /**
         * @param {?} index
         * @return {?}
         */
        LabelDrawerForSelectComponent.prototype.panelClosed = /**
         * @param {?} index
         * @return {?}
         */
        function (index) {
            this.panelOpenState[index] = false;
        };
        LabelDrawerForSelectComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-label-drawer-for-select',
                        template: "<div class=\"title\">\r\n\t<span class=\"title-label\">\r\n\t\t\u6807\u7B7E (<span\r\n\t\t\t[class.\u9009\u4E2D\u7684\u6570\u503C]=\"selectedLabels?.length > 0\">{{ selectedLabels?.length }}</span>)\r\n\t</span>\r\n</div>\r\n<mat-chip-list class=\"\u6807\u7B7E\u82AF\u7247\" *ngIf=\"selectedLabels.length > 0\">\r\n\t<mat-chip *ngFor=\"let selectedLabel of selectedLabels; let index = index\"\r\n\t\t[matTooltip]=\"selectedLabel?.Name\">\r\n\t\t<span class=\"\u6807\u7B7E\">{{ selectedLabel?.Name }}</span>\r\n\t\t<mat-icon class=\"\u5220\u9664\u6807\u7B7E\" (click)=\"removeLabel(index)\" svgIcon=\"close\">\r\n\t\t</mat-icon>\r\n\t</mat-chip>\r\n</mat-chip-list>\r\n<mat-accordion class=\"content\">\r\n\t<mat-expansion-panel\r\n\t\t*ngFor=\"let category of svr.data.categories; let index = index;first as isFirst\"\r\n\t\t[expanded]=\"isFirst\" (opened)=\"panelOpened(index)\"\r\n\t\t(closed)=\"panelClosed(index)\" [class.\u5C55\u5F00\u533A\u80CC\u666F]=\"panelOpenState[index]\"\r\n\t\t[class.\u5E95\u8FB9\u6846]=\"svr.data.categories.length == index + 1\">\r\n\t\t<mat-expansion-panel-header [class.\u5C55\u5F00]=\"panelOpenState[index]\"\r\n\t\t\t[collapsedHeight]=\"'40px'\" [expandedHeight]=\"'40px'\">\r\n\t\t\t<!-- <mat-divider class=\"divider-top\"></mat-divider> -->\r\n\t\t\t<div class=\"\u6ED1\u5757\" *ngIf=\"panelActiveIndex === index\"></div>\r\n\t\t\t<mat-panel-title [ngClass]=\"{ openItem: panelOpenState[index] }\">\r\n\t\t\t\t{{category.categoryDisplayLabel()}}</mat-panel-title>\r\n\t\t\t<mat-panel-description *ngIf=\"panelOpenState[index]\">\r\n\t\t\t\t<button mat-icon-button (click)=\"edit.emit(category)\">\r\n\t\t\t\t\t<mat-icon svgIcon=\"edit\"></mat-icon>\r\n\t\t\t\t</button>\r\n\t\t\t</mat-panel-description>\r\n\t\t</mat-expansion-panel-header>\r\n\t\t<common-label-select [selectedLabels]=\"selectedLabels\"\r\n\t\t\t[eleName]=\"svr.element.Name\" [ownerBy]=\"category.OwnerBy\"\r\n\t\t\t[owner]=\"category.Owner\">\r\n\t\t</common-label-select>\r\n\t</mat-expansion-panel>\r\n</mat-accordion>\r\n<div class=\"footer\">\r\n\t<div class=\"button-bar\">\r\n\t\t<button (click)=\"close.emit()\" mat-button>\u53D6\u6D88</button>\r\n\t\t<button (click)=\"ok()\" mat-flat-button color=\"primary\"\r\n\t\t\tmat-button>\u5B8C\u6210</button>\r\n\t</div>\r\n</div>",
                        styles: ["@charset \"UTF-8\";:host{display:flex;flex-direction:column;width:618px;height:100%;box-sizing:border-box}.title{display:flex;padding:16px 16px 8px 24px;justify-content:space-between}.title-label{font-size:18px;font-weight:700}.\u6807\u7B7E\u82AF\u7247{max-width:100%;padding:8px}.\u6807\u7B7E\u82AF\u7247 .mat-chip{width:108px;padding-right:24px;margin:4px;border-radius:4px;position:relative}.\u6807\u7B7E\u82AF\u7247 .mat-chip .\u6807\u7B7E{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block}.\u6807\u7B7E\u82AF\u7247 .mat-chip .\u5220\u9664\u6807\u7B7E{position:absolute;right:8px;top:8px}.\u6807\u7B7E\u82AF\u7247 .mat-icon{width:16px;height:16px}.\u9690\u85CF{display:none}.footer{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;padding:16px}.footer .footer-search{display:inline-block;height:24px;width:152px;line-height:24px;padding:0 24px 0 8px;border-radius:4px;font-size:12px;position:relative}.footer .footer-search input{height:24px}.footer .footer-search .mat-icon{position:absolute;top:0;right:0;margin:0}.content{flex-grow:1;overflow-y:auto;box-sizing:border-box}.content .mat-expansion-panel{box-shadow:none;margin:0;padding:8px 0 0;position:relative}.content .mat-expansion-panel-header-title{font-size:18px;font-weight:700;line-height:40px}.content .mat-expansion-panel-header-description{flex-grow:0}.content .mat-expansion-panel-header{height:40px!important;padding:0 16px;position:relative}.content .mat-expansion-panel-spacing{margin:0}.content .\u6ED1\u5757{width:8px;height:32px;position:absolute;left:0;top:4px}.content .divider-top{width:100%;height:1px;position:absolute;left:0;top:0}.content .divider-bottom{width:100%;height:1px;position:absolute;left:0;bottom:0}.content .\u5C55\u5F00 ::ng-deep .mat-expansion-indicator{display:inline-block;margin:10px 0 0}"]
                    }] }
        ];
        /** @nocollapse */
        LabelDrawerForSelectComponent.ctorParameters = function () { return [
            { type: ServiceService }
        ]; };
        LabelDrawerForSelectComponent.propDecorators = {
            selectedLabels: [{ type: core.Input }],
            edit: [{ type: core.Output }],
            close: [{ type: core.Output }],
            hostClass: [{ type: core.HostBinding, args: ['class.label-drawer-for-select',] }],
            accordionPanel: [{ type: core.ViewChildren, args: ['accordionPanel',] }]
        };
        return LabelDrawerForSelectComponent;
    }());
    if (false) {
        /** @type {?} */
        LabelDrawerForSelectComponent.prototype.selectedLabels;
        /** @type {?} */
        LabelDrawerForSelectComponent.prototype.edit;
        /** @type {?} */
        LabelDrawerForSelectComponent.prototype.close;
        /** @type {?} */
        LabelDrawerForSelectComponent.prototype.hostClass;
        /** @type {?} */
        LabelDrawerForSelectComponent.prototype.accordionPanel;
        /** @type {?} */
        LabelDrawerForSelectComponent.prototype.panelActiveIndex;
        /** @type {?} */
        LabelDrawerForSelectComponent.prototype.panelOpenState;
        /**
         * @type {?}
         * @private
         */
        LabelDrawerForSelectComponent.prototype.subject;
        /** @type {?} */
        LabelDrawerForSelectComponent.prototype.svr;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var LabelDrawerComponent = /** @class */ (function () {
        function LabelDrawerComponent() {
            this.editModel = false;
            this.selectedLabels = [];
            this.hostClass = true;
            this.close = new core.EventEmitter();
        }
        /**
         * @return {?}
         */
        LabelDrawerComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            console.log('start', this.editModel);
        };
        /**
         * @param {?} event
         * @return {?}
         */
        LabelDrawerComponent.prototype.editClick = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            this.editCategory = event;
            this.editModel = true;
        };
        LabelDrawerComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-label-drawer',
                        template: "<common-label-drawer-for-select (close)=\"close.emit($event)\"\r\n\t[selectedLabels]=\"selectedLabels\" *ngIf=\"!editModel\"\r\n\t(edit)=\"editClick($event)\">\r\n</common-label-drawer-for-select>\r\n<common-label-drawer-for-edit *ngIf=\"editModel\" (back)=\"editModel=false\"\r\n\t[category]=\"editCategory\">\r\n</common-label-drawer-for-edit>",
                        styles: [":host{height:618px}"]
                    }] }
        ];
        /** @nocollapse */
        LabelDrawerComponent.ctorParameters = function () { return []; };
        LabelDrawerComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.label-drawer',] }],
            close: [{ type: core.Output }]
        };
        return LabelDrawerComponent;
    }());
    if (false) {
        /** @type {?} */
        LabelDrawerComponent.prototype.editModel;
        /** @type {?} */
        LabelDrawerComponent.prototype.selectedLabels;
        /** @type {?} */
        LabelDrawerComponent.prototype.editCategory;
        /** @type {?} */
        LabelDrawerComponent.prototype.hostClass;
        /** @type {?} */
        LabelDrawerComponent.prototype.close;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var LabelSelectorComponent = /** @class */ (function () {
        function LabelSelectorComponent(svr) {
            this.svr = svr;
            this.chipListShow = true;
            this.open = new core.EventEmitter();
            this.hostClass = true;
        }
        /**
         * @return {?}
         */
        LabelSelectorComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        /**
         * @param {?} index
         * @return {?}
         */
        LabelSelectorComponent.prototype.deleteLabel = /**
         * @param {?} index
         * @return {?}
         */
        function (index) {
            this.svr.data.selectedLabels.splice(index, 1);
            this.svr.refreshData().subscribe();
        };
        LabelSelectorComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-label-selector',
                        template: "<mat-chip-list *ngIf=\"chipListShow\" class=\"\u6807\u7B7E\u82AF\u7247\">\r\n\t<mat-chip\r\n\t\t*ngFor=\"let selectedLabel of svr.data.selectedLabels.slice(0, 3); let index = index\"\r\n\t\t[matTooltip]=\"selectedLabel?.Name\"\r\n\t>\r\n\t\t<span class=\"\u6807\u7B7E\">{{ selectedLabel?.Name }}</span>\r\n\t\t<mat-icon class=\"\u5220\u9664\u6807\u7B7E\" (click)=\"deleteLabel(index)\" svgIcon=\"close\"> </mat-icon>\r\n\t</mat-chip>\r\n</mat-chip-list>\r\n<mat-icon\r\n\t*ngIf=\"svr.data.selectedLabels?.length > 3\"\r\n\t(click)=\"chipListShow = false\"\r\n\tsvgIcon=\"double_down\"\r\n\t[matMenuTriggerFor]=\"beforeMenu\"\r\n\tclass=\"\u5411\u4E0B\u53CC\u7BAD\u5934\"\r\n>\r\n</mat-icon>\r\n<mat-menu #beforeMenu=\"matMenu\" xPosition=\"before\" overlapTrigger=\"true\" (closed)=\"chipListShow = true\">\r\n\t<div class=\"\u6807\u7B7E\u83DC\u5355\">\r\n\t\t<mat-icon class=\"\u5411\u4E0A\u6807\u7B7E\u7BAD\u5934\" svgIcon=\"double_down\"></mat-icon>\r\n\t\t<mat-chip-list>\r\n\t\t\t<mat-chip\r\n\t\t\t\t*ngFor=\"let selectedLabel of svr.data.selectedLabels; let index\"\r\n\t\t\t\tmatTooltip=\"{{ selectedLabel.Name }}\"\r\n\t\t\t>\r\n\t\t\t\t<span class=\"\u9650\u5236\u6807\u7B7E\">{{ selectedLabel.Name }}</span>\r\n\t\t\t\t<mat-icon class=\"\u5220\u9664\u6807\u7B7E\" (click)=\"deleteLabel(index)\" svgIcon=\"close\"></mat-icon>\r\n\t\t\t</mat-chip>\r\n\t\t</mat-chip-list>\r\n\t</div>\r\n</mat-menu>\r\n<button mat-flat-button class=\"\u6807\u7B7E\u6309\u94AE\" (click)=\"open.emit()\">\r\n\t\u6A21\u677F <mat-icon class=\"\u6A21\u677F\u56FE\u6807\" svgIcon=\"device_hub\"></mat-icon>\r\n</button>\r\n",
                        styles: ["@charset \"UTF-8\";:host{line-height:32px}.mat-chip{width:96px;padding:0 24px 0 8px;border-radius:4px;position:relative}.mat-chip .\u5220\u9664\u6807\u7B7E{line-height:16px;position:absolute;right:8px;top:8px}.mat-chip .\u6807\u7B7E{font-size:12px;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block}.\u6807\u7B7E\u82AF\u7247{display:inline-block}.\u6807\u7B7E\u82AF\u7247 ::ng-deep .mat-chip-list-wrapper{margin:0}.\u6807\u7B7E\u82AF\u7247 .mat-chip{margin:0 4px}.\u6807\u7B7E\u6309\u94AE{height:32px;width:96px;line-height:32px;margin:0 16px;color:#fff;border-radius:16px}.\u6807\u7B7E\u6309\u94AE .\u6A21\u677F\u56FE\u6807{line-height:16px;margin-left:4px;vertical-align:middle}.mat-menu-item{padding:0 4px}.mat-menu-item .mat-icon{margin-right:4px}.mat-icon{width:16px;height:16px}.\u6807\u7B7E\u83DC\u5355{display:inline-block;width:200px;padding:24px 8px;position:relative;box-sizing:border-box}.\u6807\u7B7E\u83DC\u5355 .mat-chip{margin:4px 0 4px 4px}.\u6807\u7B7E\u83DC\u5355 .\u5411\u4E0A\u6807\u7B7E\u7BAD\u5934{position:absolute;top:0;right:8px;-webkit-transform:rotate(180deg);transform:rotate(180deg)}"]
                    }] }
        ];
        /** @nocollapse */
        LabelSelectorComponent.ctorParameters = function () { return [
            { type: ServiceService }
        ]; };
        LabelSelectorComponent.propDecorators = {
            open: [{ type: core.Output }],
            hostClass: [{ type: core.HostBinding, args: ['class.label-selector',] }]
        };
        return LabelSelectorComponent;
    }());
    if (false) {
        /** @type {?} */
        LabelSelectorComponent.prototype.chipListShow;
        /** @type {?} */
        LabelSelectorComponent.prototype.open;
        /** @type {?} */
        LabelSelectorComponent.prototype.hostClass;
        /** @type {?} */
        LabelSelectorComponent.prototype.svr;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var LabelSelectorModule = /** @class */ (function () {
        function LabelSelectorModule() {
        }
        LabelSelectorModule.decorators = [
            { type: core.NgModule, args: [{
                        declarations: [LabelSelectorComponent],
                        imports: [
                            common.CommonModule,
                            material.MatChipsModule,
                            material.MatIconModule,
                            material.MatMenuModule,
                            material.MatTooltipModule,
                            material.MatDividerModule,
                            material.MatButtonModule
                        ],
                        exports: [LabelSelectorComponent]
                    },] }
        ];
        return LabelSelectorModule;
    }());

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ContextMenu = /** @class */ (function () {
        function ContextMenu() {
            this.contextMenuPosition = { x: '0px', y: '0px' };
        }
        /**
         * @param {?} colIndex
         * @param {?} rowIndex
         * @return {?}
         */
        ContextMenu.prototype.cellSelector = /**
         * @param {?} colIndex
         * @param {?} rowIndex
         * @return {?}
         */
        function (colIndex, rowIndex) {
            return false;
        };
        /**
         * @param {?} event
         * @param {?} col
         * @param {?} row
         * @return {?}
         */
        ContextMenu.prototype.openContextMenu = /**
         * @param {?} event
         * @param {?} col
         * @param {?} row
         * @return {?}
         */
        function (event, col, row) {
            var _this = this;
            if (this.cellSelector(col, row)) {
                event.preventDefault(); // Suppress the browser's context menu
                this.contextMenuPosition = { x: event.clientX + 'px', y: event.clientY + 'px' };
                this.contextMenu.openMenu(); // Open your custom context menu instead
                document
                    .getElementsByClassName('cdk-overlay-backdrop')[0]
                    .addEventListener('contextmenu', (/**
                 * @param {?} offEvent
                 * @return {?}
                 */
                function (offEvent) {
                    offEvent.preventDefault();
                    _this.contextMenu.closeMenu();
                }));
            }
        };
        /**
         * @param {?} hasTitle
         * @return {?}
         */
        ContextMenu.prototype.onSelCopyClick = /**
         * @param {?} hasTitle
         * @return {?}
         */
        function (hasTitle) {
            // 注意有反向选择
            /** @type {?} */
            var x = Math.min(this.selector.startX, this.selector.endX);
            /** @type {?} */
            var x1 = Math.max(this.selector.startX, this.selector.endX);
            /** @type {?} */
            var y = Math.min(this.selector.startY, this.selector.endY);
            /** @type {?} */
            var y1 = Math.max(this.selector.startY, this.selector.endY);
            /** @type {?} */
            var text = [];
            if (hasTitle) {
                /** @type {?} */
                var line = [];
                for (var ix = x; ix <= x1; ix++) {
                    line.push(this.tabData.nativeElement.rows[0].cells[ix].innerText.trim()); // 发现有换行,需要去除
                }
                text.push(line.join('\t'));
            }
            for (var iy = y; iy <= y1; iy++) {
                /** @type {?} */
                var line = [];
                for (var ix = x; ix <= x1; ix++) {
                    line.push(this.tabData.nativeElement.rows[iy + 1].cells[ix].innerText.trim());
                }
                text.push(line.join('\t'));
            }
            this._clipboardService.copyFromContent(text.join('\n'));
        };
        /**
         * @param {?} event
         * @return {?}
         */
        ContextMenu.prototype.onSelLineMenuClick = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            var _a;
            /** @type {?} */
            var y = Math.min(this.selector.startY, this.selector.endY);
            /** @type {?} */
            var y1 = Math.max(this.selector.startY, this.selector.endY);
            (_a = this.svr.data.tableRowSelection).select.apply(_a, __spread(this.dataSource.slice(y, y1 + 1).map((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.Key; }))));
        };
        /**
         * @return {?}
         */
        ContextMenu.prototype.onSelCancelLineMenuClick = /**
         * @return {?}
         */
        function () {
            var _a;
            /** @type {?} */
            var y = Math.min(this.selector.startY, this.selector.endY);
            /** @type {?} */
            var y1 = Math.max(this.selector.startY, this.selector.endY);
            (_a = this.svr.data.tableRowSelection).deselect.apply(_a, __spread(this.dataSource.slice(y, y1 + 1).map((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.Key; }))));
        };
        /**
         * @return {?}
         */
        ContextMenu.prototype.onSelAllMenuClick = /**
         * @return {?}
         */
        function () {
            if (this.dataSource.length > 0) {
                this.selector.startX = 1;
                this.selector.startY = 0;
                this.selector.endX = this.columns.length + 1; // 加个序号列
                this.selector.endY = this.dataSource.length - 1;
            }
        };
        return ContextMenu;
    }());
    if (false) {
        /** @type {?} */
        ContextMenu.prototype.contextMenu;
        /** @type {?} */
        ContextMenu.prototype.contextMenuPosition;
        /** @type {?} */
        ContextMenu.prototype.svr;
        /** @type {?} */
        ContextMenu.prototype.selector;
        /** @type {?} */
        ContextMenu.prototype.tabData;
        /** @type {?} */
        ContextMenu.prototype._clipboardService;
        /** @type {?} */
        ContextMenu.prototype.dataSource;
        /** @type {?} */
        ContextMenu.prototype.columns;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /** @type {?} */
    var toolbarShowDelay = 300;
    var Header = /** @class */ (function () {
        function Header() {
        }
        /**
         * @param {?} col
         * @param {?} event
         * @return {?}
         */
        Header.prototype.headerMouseenter = /**
         * @param {?} col
         * @param {?} event
         * @return {?}
         */
        function (col, event) {
            this.current.x = ((/** @type {?} */ (event.target))).cellIndex;
            this.headerToolbarShowTimer = setTimeout((/**
             * @return {?}
             */
            function () {
                col.showToolbar = true;
            }), toolbarShowDelay);
        };
        /**
         * @param {?} col
         * @return {?}
         */
        Header.prototype.headerMouseleave = /**
         * @param {?} col
         * @return {?}
         */
        function (col) {
            if (this.headerToolbarShowTimer) {
                clearTimeout(this.headerToolbarShowTimer);
                this.headerToolbarShowTimer = undefined;
            }
            col.showToolbar = false;
        };
        /**
         * @param {?} event
         * @param {?} col
         * @return {?}
         */
        Header.prototype.lockButtonClick = /**
         * @param {?} event
         * @param {?} col
         * @return {?}
         */
        function (event, col) {
            col.sticky = true;
            col.showToolbar = false;
            this.syncColumn();
            event.stopPropagation();
            event.preventDefault();
        };
        /**
         * @param {?} event
         * @param {?} col
         * @return {?}
         */
        Header.prototype.unlockButtonClick = /**
         * @param {?} event
         * @param {?} col
         * @return {?}
         */
        function (event, col) {
            col.sticky = false;
            col.showToolbar = false;
            this.syncColumn();
            event.stopPropagation();
            event.preventDefault();
        };
        /**
         * @param {?} event
         * @param {?} col
         * @return {?}
         */
        Header.prototype.toLeftButtonClick = /**
         * @param {?} event
         * @param {?} col
         * @return {?}
         */
        function (event, col) {
            /** @type {?} */
            var realIndex = col.index;
            /** @type {?} */
            var tmp = this.columns[realIndex];
            tmp.showToolbar = false;
            this.columns[realIndex] = this.columns[realIndex - 1];
            this.columns[realIndex - 1] = tmp;
            this.syncColumn();
            event.stopPropagation();
            event.preventDefault();
        };
        /**
         * @param {?} event
         * @param {?} col
         * @return {?}
         */
        Header.prototype.toRightButtonClick = /**
         * @param {?} event
         * @param {?} col
         * @return {?}
         */
        function (event, col) {
            /** @type {?} */
            var realIndex = col.index;
            /** @type {?} */
            var tmp = this.columns[realIndex];
            tmp.showToolbar = false;
            this.columns[realIndex] = this.columns[realIndex + 1];
            this.columns[realIndex + 1] = tmp;
            this.syncColumn();
            event.stopPropagation();
            event.preventDefault();
        };
        /**返回一个列是不是固定列的最右边列 */
        /**
         * 返回一个列是不是固定列的最右边列
         * @param {?} colIndex
         * @return {?}
         */
        Header.prototype.stickyColumnRight = /**
         * 返回一个列是不是固定列的最右边列
         * @param {?} colIndex
         * @return {?}
         */
        function (colIndex) {
            return (colIndex < this._tableColumns.length - 1 &&
                this._tableColumns[colIndex].sticky &&
                !this._tableColumns[colIndex + 1].sticky);
        };
        // 同步列的设置,主要是重新根据固定列排定顺序
        // 同步列的设置,主要是重新根据固定列排定顺序
        /**
         * @return {?}
         */
        Header.prototype.syncColumn = 
        // 同步列的设置,主要是重新根据固定列排定顺序
        /**
         * @return {?}
         */
        function () {
            var _this = this;
            /**
             * 先把上次存在的列照样输出,注意保留原有的顺序
             * @type {?}
             */
            var cols = (this.columns || []).filter((/**
             * @param {?} col
             * @return {?}
             */
            function (col) { return _this.displayColumns.find((/**
             * @param {?} vv
             * @return {?}
             */
            function (vv) { return vv.Name === col.Name; })) !== undefined; }));
            /**
             * 再输出剩下的列
             * @type {?}
             */
            var cc = (this.displayColumns || []).filter((/**
             * @param {?} col
             * @return {?}
             */
            function (col) { return cols.find((/**
             * @param {?} vv
             * @return {?}
             */
            function (vv) { return vv.Name === col.Name; })) === undefined; }));
            cols = cols.concat(cc);
            // 把固定列提升到最前面
            cols = cols.filter((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.sticky; })).concat(cols.filter((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return !v.sticky; })));
            cols.forEach((/**
             * @param {?} v1
             * @param {?} idx
             * @return {?}
             */
            function (v1, idx) { return (v1.index = idx); }));
            this.columns = cols;
            this._tableColumns = __spread(this.fixStartColumns).concat(
            /**固定的列排在前面 */
            this.columns, this.fixEndColumns);
            this.displayColumnNames = this._tableColumns.map((/**
             * @param {?} vv
             * @return {?}
             */
            function (vv) { return vv.Name; }));
            /**妈蛋,列内容变化,宽度还是算上一次的,造成列宽计算不对,只有变通的延后调用一次强制更新 */
            setTimeout((/**
             * @return {?}
             */
            function () {
                _this.tabDataOrg.updateStickyColumnStyles();
            }), 10);
        };
        return Header;
    }());
    if (false) {
        /** @type {?} */
        Header.prototype.current;
        /** @type {?} */
        Header.prototype.columns;
        /** @type {?} */
        Header.prototype._tableColumns;
        /** @type {?} */
        Header.prototype.displayColumns;
        /** @type {?} */
        Header.prototype.displayColumnNames;
        /** @type {?} */
        Header.prototype.headerToolbarShowTimer;
        /** @type {?} */
        Header.prototype.tabDataOrg;
        /** @type {?} */
        Header.prototype.fixStartColumns;
        /** @type {?} */
        Header.prototype.fixEndColumns;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /**
     * @record
     */
    function ISelector() { }
    if (false) {
        /** @type {?} */
        ISelector.prototype.show;
        /** @type {?} */
        ISelector.prototype.startX;
        /** @type {?} */
        ISelector.prototype.startY;
        /** @type {?} */
        ISelector.prototype.endX;
        /** @type {?} */
        ISelector.prototype.endY;
    }
    /**
     * @record
     */
    function IPoint() { }
    if (false) {
        /** @type {?} */
        IPoint.prototype.x;
        /** @type {?} */
        IPoint.prototype.y;
    }
    /** @type {?} */
    var noneSelector = { show: false, startX: -1, startY: -1, endX: -1, endY: -1 };
    /** @type {?} */
    var nonePoint = { x: -1, y: -1 };
    var Selector = /** @class */ (function () {
        function Selector() {
        }
        /**
         * @param {?} colIndex
         * @param {?} rowIndex
         * @return {?}
         */
        Selector.prototype.cellSelector = /**
         * @param {?} colIndex
         * @param {?} rowIndex
         * @return {?}
         */
        function (colIndex, rowIndex) {
            if (!this.selector.show) {
                return false;
            }
            // 注意有反向选择
            /** @type {?} */
            var x = Math.max(1, Math.min(this.selector.startX, this.selector.endX));
            /** @type {?} */
            var x1 = Math.min(this.tabData.nativeElement.rows[0].cells.length - 1, Math.max(this.selector.startX, this.selector.endX));
            /** @type {?} */
            var y = Math.min(this.selector.startY, this.selector.endY);
            /** @type {?} */
            var y1 = Math.max(this.selector.startY, this.selector.endY);
            return colIndex >= x && colIndex <= x1 && rowIndex >= y && rowIndex <= y1;
        };
        // 是否左边
        // 是否左边
        /**
         * @param {?} col
         * @param {?} row
         * @return {?}
         */
        Selector.prototype.cellSelectorLeft = 
        // 是否左边
        /**
         * @param {?} col
         * @param {?} row
         * @return {?}
         */
        function (col, row) {
            if (!this.selector.show) {
                return false;
            }
            /** @type {?} */
            var x = Math.min(this.selector.startX, this.selector.endX);
            /** @type {?} */
            var y = Math.min(this.selector.startY, this.selector.endY);
            /** @type {?} */
            var y1 = Math.max(this.selector.startY, this.selector.endY);
            return col === x && row >= y && row <= y1;
        };
        // 是否下边
        // 是否下边
        /**
         * @param {?} col
         * @param {?} row
         * @return {?}
         */
        Selector.prototype.cellSelectorBottom = 
        // 是否下边
        /**
         * @param {?} col
         * @param {?} row
         * @return {?}
         */
        function (col, row) {
            if (!this.selector.show) {
                return false;
            }
            /** @type {?} */
            var x = Math.min(this.selector.startX, this.selector.endX);
            /** @type {?} */
            var x1 = Math.max(this.selector.startX, this.selector.endX);
            /** @type {?} */
            var y1 = Math.max(this.selector.startY, this.selector.endY);
            return col >= x && col <= x1 && row === y1;
        };
        // 是否右边
        // 是否右边
        /**
         * @param {?} col
         * @param {?} row
         * @return {?}
         */
        Selector.prototype.cellSelectorRight = 
        // 是否右边
        /**
         * @param {?} col
         * @param {?} row
         * @return {?}
         */
        function (col, row) {
            if (!this.selector.show) {
                return false;
            }
            /** @type {?} */
            var x1 = Math.max(this.selector.startX, this.selector.endX);
            /** @type {?} */
            var y = Math.min(this.selector.startY, this.selector.endY);
            /** @type {?} */
            var y1 = Math.max(this.selector.startY, this.selector.endY);
            return col === x1 && row >= y && row <= y1;
        };
        // 是否上边
        // 是否上边
        /**
         * @param {?} col
         * @param {?} row
         * @return {?}
         */
        Selector.prototype.cellSelectorTop = 
        // 是否上边
        /**
         * @param {?} col
         * @param {?} row
         * @return {?}
         */
        function (col, row) {
            if (!this.selector.show) {
                return false;
            }
            /** @type {?} */
            var x = Math.min(this.selector.startX, this.selector.endX);
            /** @type {?} */
            var x1 = Math.max(this.selector.startX, this.selector.endX);
            /** @type {?} */
            var y = Math.min(this.selector.startY, this.selector.endY);
            return row === y && col >= x && col <= x1;
        };
        /**
         * @param {?} event
         * @param {?} colIndex
         * @param {?} rowIndex
         * @return {?}
         */
        Selector.prototype.cellMouseDown = /**
         * @param {?} event
         * @param {?} colIndex
         * @param {?} rowIndex
         * @return {?}
         */
        function (event, colIndex, rowIndex) {
            var _this = this;
            if (event.button !== 0) {
                return;
            }
            this.leftPressed = true;
            this.selector.show = true;
            this.selector.startX = colIndex;
            this.selector.startY = rowIndex;
            this.selector.endX = colIndex;
            this.selector.endY = rowIndex;
            // Add listeners
            this.closeMouseDownListern = this.renderer.listen('window', 'mousemove', this.onMouseMove);
            this.timer = setInterval((/**
             * @return {?}
             */
            function () {
                if (_this.leftPressed) {
                    _this.scrollTable();
                }
            }), 20);
            // event.preventDefault();
            // event.stopPropagation();
        };
        /**
         * @param {?} event
         * @return {?}
         */
        Selector.prototype.mouseUp = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            if (event.button === 0) {
                this.leftPressed = false;
                if (this.closeMouseDownListern) {
                    this.closeMouseDownListern();
                }
                if (this.timer) {
                    clearInterval(this.timer);
                    this.timer = null;
                }
                // event.preventDefault();
                // event.stopPropagation();
            }
        };
        /**
         * @param {?} event
         * @return {?}
         */
        Selector.prototype.cellMouseEnter = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            this.current.x = ((/** @type {?} */ (event.target))).cellIndex;
            this.current.y = ((/** @type {?} */ (((/** @type {?} */ (event.target))).parentElement))).rowIndex;
        };
        /**
         * @param {?} event
         * @return {?}
         */
        Selector.prototype.onMouseMove = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            this.x = event.x;
            this.y = event.y;
            if (this.leftPressed) {
                /** @type {?} */
                var cell = cellFromPosition(this.tabData.nativeElement, event.x, event.y);
                // 需要去掉第一列和最后一列
                if (cell.columnIndex === 0) {
                    cell.columnIndex = 1;
                }
                if (cell.columnIndex === this.tabData.nativeElement.rows[0].cells.length - 1) {
                    cell.columnIndex = cell.columnIndex - 1;
                }
                // 需要去掉第一行
                if (cell.rowIndex === 0) {
                    cell.rowIndex = 1;
                }
                if (cell) {
                    this.selector.endX = cell.columnIndex;
                    this.selector.endY = cell.rowIndex - 1; // 需要去掉标题行
                }
                this.scrollTable();
            }
        };
        /**
         * @return {?}
         */
        Selector.prototype.scrollTable = /**
         * @return {?}
         */
        function () {
            // 元素在文档的位置x,y
            var _a = this.elRef.nativeElement.getBoundingClientRect(), xLeft = _a.left, yTop = _a.top, xRight = _a.right, yBottom = _a.bottom;
            // 判断鼠标是否到元素边界
            if (this.y <= yTop) {
                // 滚动条的位置
                this.elRef.nativeElement.scrollTop -= yTop - this.y;
            }
            else if (this.y >= yBottom - 20) {
                this.elRef.nativeElement.scrollTop += this.y - yBottom + 20;
            }
            if (this.x <= xLeft) {
                this.elRef.nativeElement.scrollLeft -= xLeft - this.x;
            }
            else if (this.x >= xRight) {
                this.elRef.nativeElement.scrollLeft += this.x - xRight;
            }
        };
        return Selector;
    }());
    if (false) {
        /** @type {?} */
        Selector.prototype.renderer;
        /** @type {?} */
        Selector.prototype.closeMouseDownListern;
        /** @type {?} */
        Selector.prototype.selector;
        /** @type {?} */
        Selector.prototype.leftPressed;
        /** @type {?} */
        Selector.prototype.x;
        /** @type {?} */
        Selector.prototype.y;
        /** @type {?} */
        Selector.prototype.current;
        /** @type {?} */
        Selector.prototype.timer;
        /** @type {?} */
        Selector.prototype.elRef;
        /** @type {?} */
        Selector.prototype.tabData;
    }
    /**
     * @record
     */
    function CellPosition() { }
    if (false) {
        /** @type {?} */
        CellPosition.prototype.columnIndex;
        /** @type {?} */
        CellPosition.prototype.rowIndex;
        /** @type {?} */
        CellPosition.prototype.outter;
    }
    // 根据鼠标位置,返回一个单元格坐标,总是返回一个坐标,超出可视区域范围的,返回边界上的坐标
    /**
     * @param {?} ele
     * @param {?} ox
     * @param {?} oy
     * @return {?}
     */
    function cellFromPosition(ele, ox, oy) {
        if (!ele || ele.rows.length === 0) {
            return null;
        }
        var _a = ele.getBoundingClientRect(), left = _a.left, top = _a.top, bottom = _a.bottom, right = _a.right;
        /** @type {?} */
        var outter = false;
        var _b = __read([ox, oy], 2), x = _b[0], y = _b[1];
        // 超出可视区域,用边界代替
        if (ox < left) {
            outter = true;
            x = left;
        }
        else if (ox > right) {
            outter = true;
            x = right;
        }
        if (oy < top) {
            outter = true;
            y = top;
        }
        else if (oy > bottom) {
            outter = true;
            y = bottom;
        }
        /** @type {?} */
        var colIndex = ele.rows[0].cells.length - 1;
        /** @type {?} */
        var rowIndex = ele.rows.length - 1;
        /** @type {?} */
        var totalLeft = left;
        /** @type {?} */
        var totalTop = top;
        // 表格必定会有一行,先确定列位置
        for (var i = 0; i < ele.rows[0].cells.length; i++) {
            totalLeft += ele.rows[0].cells[i].offsetWidth;
            if (x < totalLeft) {
                colIndex = i;
                break;
            }
        }
        for (var i = 0; i < ele.rows.length; i++) {
            // 不用offsetheight,防止四舍五入引起累计偏差
            /** @type {?} */
            var rect = ele.rows[i].getBoundingClientRect();
            totalTop += rect.height;
            if (y < totalTop) {
                rowIndex = i;
                break;
            }
        }
        return { columnIndex: colIndex, rowIndex: rowIndex, outter: outter };
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var TableComponent = /** @class */ (function () {
        function TableComponent(svr, _clipboardService, elRef, renderer) {
            this.svr = svr;
            this._clipboardService = _clipboardService;
            this.elRef = elRef;
            this.renderer = renderer;
            this.hostClass = 'content mat-elevation-z1';
            this.dataSource = [];
            // 跟随数据行的处理列表,初始值为空数组,防止出现不能访问.length的错误
            this._processes = [];
            this.sortChange = new core.EventEmitter();
            this.processClick = new core.EventEmitter();
            this._tableColumns = [];
            // 处理按钮是否是展开的
            this.processExpand = true;
            this.displayColumnNames = [];
            this.fixStartColumns = [
                { index: 0, Name: '_select', Type: '', sticky: true, stickyEnd: false, showToolbar: false },
                { index: 1, Name: '_序号', Type: 'STR', sticky: true, stickyEnd: false, showToolbar: false }
            ];
            this.fixEndColumns = [];
            this.contextMenuPosition = { x: '0px', y: '0px' };
            // 要用复制的方式,否则会修改掉nonePoint
            this.current = __assign({}, nonePoint);
            // 选择用到的属性、函数
            this.selector = __assign({}, noneSelector);
            this.cellSelector = Selector.prototype.cellSelector;
            this.cellSelectorLeft = Selector.prototype.cellSelectorLeft;
            this.cellSelectorBottom = Selector.prototype.cellSelectorBottom;
            this.cellSelectorRight = Selector.prototype.cellSelectorRight;
            this.cellSelectorTop = Selector.prototype.cellSelectorTop;
            this.cellMouseDown = Selector.prototype.cellMouseDown;
            this.cellMouseEnter = Selector.prototype.cellMouseEnter;
            this.mouseUp = Selector.prototype.mouseUp;
            this.onMouseMove = Selector.prototype.onMouseMove.bind(this);
            this.scrollTable = Selector.prototype.scrollTable;
            this.openContextMenu = ContextMenu.prototype.openContextMenu;
            this.onSelCopyClick = ContextMenu.prototype.onSelCopyClick;
            this.onSelLineMenuClick = ContextMenu.prototype.onSelLineMenuClick;
            this.onSelCancelLineMenuClick = ContextMenu.prototype.onSelCancelLineMenuClick;
            this.onSelAllMenuClick = ContextMenu.prototype.onSelAllMenuClick;
            // 列头功能
            this.headerMouseenter = Header.prototype.headerMouseenter;
            this.headerMouseleave = Header.prototype.headerMouseleave;
            this.lockButtonClick = Header.prototype.lockButtonClick;
            this.stickyColumnRight = Header.prototype.stickyColumnRight;
            this.syncColumn = Header.prototype.syncColumn;
            this.unlockButtonClick = Header.prototype.unlockButtonClick;
            this.toLeftButtonClick = Header.prototype.toLeftButtonClick;
            this.toRightButtonClick = Header.prototype.toRightButtonClick;
            this.scrollLeft = 0;
            this.scrollTop = 0;
        }
        Object.defineProperty(TableComponent.prototype, "processes", {
            get: /**
             * @return {?}
             */
            function () {
                return this._processes;
            },
            set: /**
             * @param {?} val
             * @return {?}
             */
            function (val) {
                if (val.length > 0) {
                    if (this.fixEndColumns.length === 0) {
                        this.fixEndColumns.push({
                            index: -1,
                            Name: '_操作',
                            Type: '',
                            sticky: false,
                            stickyEnd: true,
                            showToolbar: false
                        });
                    }
                }
                else {
                    this.fixEndColumns.splice(0);
                }
                this._processes = val;
            },
            enumerable: true,
            configurable: true
        });
        //  keepSequence是否保留列的顺序
        //  keepSequence是否保留列的顺序
        /**
         * @param {?} val
         * @param {?} dispCols
         * @param {?} keepSequence
         * @return {?}
         */
        TableComponent.prototype.setDataSource = 
        //  keepSequence是否保留列的顺序
        /**
         * @param {?} val
         * @param {?} dispCols
         * @param {?} keepSequence
         * @return {?}
         */
        function (val, dispCols, keepSequence) {
            var _this = this;
            // 要复制,不能赋值,否则会修改掉noneSelector的值
            Object.assign(this.selector, noneSelector);
            this.dataSource = val;
            this.displayColumns = dispCols;
            if (!keepSequence) {
                // 清除之前的列顺序定义
                this.columns = [];
            }
            // 同步列信息
            this.syncColumn();
            // 一定要延后更新,否则没有效果
            setTimeout((/**
             * @return {?}
             */
            function () {
                _this.updateTableHasScrollbar();
            }), 20);
        };
        /**
         * @return {?}
         */
        TableComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        /**
         * @return {?}
         */
        TableComponent.prototype.ngAfterViewInit = /**
         * @return {?}
         */
        function () {
            var _this = this;
            // 不使用setTimeout会引起错误
            setTimeout((/**
             * @return {?}
             */
            function () {
                _this.tableHasScrollbar = _this.elRef.nativeElement.scrollWidth > _this.elRef.nativeElement.clientWidth;
            }), 100);
        };
        /**
         * @param {?} event
         * @return {?}
         */
        TableComponent.prototype.onResize = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            this.updateTableHasScrollbar();
        };
        /**
         * @private
         * @return {?}
         */
        TableComponent.prototype.updateTableHasScrollbar = /**
         * @private
         * @return {?}
         */
        function () {
            this.tableHasScrollbar = this.elRef.nativeElement.scrollWidth > this.elRef.nativeElement.clientWidth;
        };
        /**
         * @return {?}
         */
        TableComponent.prototype.onDetach = /**
         * @return {?}
         */
        function () {
            this.scrollLeft = this.elRef.nativeElement.scrollLeft;
            this.scrollTop = this.elRef.nativeElement.scrollTop;
        };
        /**
         * @param {?} ref
         * @param {?} activatedRoute
         * @return {?}
         */
        TableComponent.prototype.onAttach = /**
         * @param {?} ref
         * @param {?} activatedRoute
         * @return {?}
         */
        function (ref, activatedRoute) {
            this.elRef.nativeElement.scrollLeft = this.scrollLeft;
            this.elRef.nativeElement.scrollTop = this.scrollTop;
        };
        /** Selects all rows if they are not all selected; otherwise clear selection. */
        /**
         * Selects all rows if they are not all selected; otherwise clear selection.
         * @return {?}
         */
        TableComponent.prototype.masterToggle = /**
         * Selects all rows if they are not all selected; otherwise clear selection.
         * @return {?}
         */
        function () {
            var _a, _b;
            this.isPageSelected()
                ? (_a = this.svr.data.tableRowSelection).deselect.apply(_a, __spread(this.dataSource.map((/**
                 * @param {?} row
                 * @return {?}
                 */
                function (row) { return row.Key; })))) : (_b = this.svr.data.tableRowSelection).select.apply(_b, __spread(this.dataSource.map((/**
             * @param {?} row
             * @return {?}
             */
            function (row) { return row.Key; }))));
        };
        /** Whether the number of selected elements matches the total number of rows. */
        /**
         * Whether the number of selected elements matches the total number of rows.
         * @return {?}
         */
        TableComponent.prototype.isPageSelected = /**
         * Whether the number of selected elements matches the total number of rows.
         * @return {?}
         */
        function () {
            var _this = this;
            return this.dataSource.find((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return !_this.svr.data.tableRowSelection.isSelected(v.Key); })) === undefined;
        };
        /**
         * @param {?} i
         * @param {?} col
         * @return {?}
         */
        TableComponent.prototype.trackByName = /**
         * @param {?} i
         * @param {?} col
         * @return {?}
         */
        function (i, col) {
            return col.Name;
        };
        TableComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-table',
                        template: "<div\r\n\tstyle=\"position: fixed\"\r\n\t[style.left]=\"contextMenuPosition.x\"\r\n\t[style.top]=\"contextMenuPosition.y\"\r\n\t[matMenuTriggerFor]=\"contextMenu\"\r\n></div>\r\n<mat-menu #contextMenu=\"matMenu\">\r\n\t<button mat-menu-item (click)=\"onSelCopyClick(true)\"><mat-icon svgIcon=\"content_copy\"></mat-icon>\u590D\u5236</button>\r\n\t<button mat-menu-item (click)=\"onSelCopyClick(false)\"><mat-icon></mat-icon>\u590D\u5236(\u65E0\u6807\u9898)</button>\r\n\t<!-- <mat-divider></mat-divider> -->\r\n\t<button mat-menu-item (click)=\"onSelLineMenuClick($event)\">\r\n\t\t<mat-icon svgIcon=\"single_chosen\"></mat-icon>\u9009\u4E2D\u884C\r\n\t</button>\r\n\t<button mat-menu-item (click)=\"onSelCancelLineMenuClick()\">\r\n\t\t<mat-icon svgIcon=\"cancel_chosen\"></mat-icon>\u53D6\u6D88\u9009\u4E2D\r\n\t</button>\r\n\t<button mat-menu-item (click)=\"onSelAllMenuClick()\"><mat-icon svgIcon=\"return_chosen\"></mat-icon>\u5168\u9009</button>\r\n</mat-menu>\r\n<table\r\n\tmat-table\r\n\t[dataSource]=\"dataSource\"\r\n\tmatSort\r\n\tmatSortStart=\"desc\"\r\n\t(matSortChange)=\"sortChange.emit($event)\"\r\n\t#tabData\r\n>\r\n\t<ng-container matColumnDef=\"_select\" sticky>\r\n\t\t<th mat-header-cell *matHeaderCellDef>\r\n\t\t\t<!--labelPosition=\"before\" \u4E00\u5B9A\u8981\u8FD9\u6837\u8BBE\u7F6E\uFF0C\u5426\u5219\u4F1A\u51FA\u73B0\u7A7A\u9699-->\r\n\t\t\t<mat-checkbox\r\n\t\t\t\t(change)=\"$event ? masterToggle() : null\"\r\n\t\t\t\t[checked]=\"svr.data.tableRowSelection.hasValue() && isPageSelected()\"\r\n\t\t\t\t[indeterminate]=\"svr.data.tableRowSelection.hasValue() && !isPageSelected()\"\r\n\t\t\t\tlabelPosition=\"before\"\r\n\t\t\t>\r\n\t\t\t</mat-checkbox>\r\n\t\t</th>\r\n\t\t<td\r\n\t\t\tmat-cell\r\n\t\t\t*matCellDef=\"let row; let rowIndex = index\"\r\n\t\t\t[ngClass]=\"{ 'current-row': current.y === rowIndex + 1 }\"\r\n\t\t>\r\n\t\t\t<mat-checkbox\r\n\t\t\t\t(click)=\"$event.stopPropagation()\"\r\n\t\t\t\t(change)=\"$event ? svr.data.tableRowSelection.toggle(row.Key) : null\"\r\n\t\t\t\t[checked]=\"svr.data.tableRowSelection.isSelected(row.Key)\"\r\n\t\t\t\tlabelPosition=\"before\"\r\n\t\t\t>\r\n\t\t\t</mat-checkbox>\r\n\t\t</td>\r\n\t</ng-container>\r\n\t<ng-container matColumnDef=\"_\u5E8F\u53F7\" sticky>\r\n\t\t<th\r\n\t\t\tmat-header-cell\r\n\t\t\t*matHeaderCellDef\r\n\t\t\tclass=\"number-cell\"\r\n\t\t\t[ngClass]=\"{\r\n\t\t\t\t'current-col': current.x === 1,\r\n\t\t\t\t'sticky-right': tableHasScrollbar && stickyColumnRight(1)\r\n\t\t\t}\"\r\n\t\t>\r\n\t\t\t\u5E8F\u53F7\r\n\t\t</th>\r\n\t\t<td\r\n\t\t\tmat-cell\r\n\t\t\t*matCellDef=\"let row; let rowIndex = index\"\r\n\t\t\tclass=\"number-cell\"\r\n\t\t\t(contextmenu)=\"openContextMenu($event, 1, rowIndex)\"\r\n\t\t\t[ngClass]=\"{\r\n\t\t\t\tselector: cellSelector(1, rowIndex),\r\n\t\t\t\t'sel-left': cellSelectorLeft(1, rowIndex),\r\n\t\t\t\t'sel-bottom': cellSelectorBottom(1, rowIndex),\r\n\t\t\t\t'sel-right': cellSelectorRight(1, rowIndex),\r\n\t\t\t\t'sel-top': cellSelectorTop(1, rowIndex),\r\n\t\t\t\t'current-row': current.y === rowIndex + 1,\r\n\t\t\t\t'sticky-right': tableHasScrollbar && stickyColumnRight(1)\r\n\t\t\t}\"\r\n\t\t\t(mousedown)=\"cellMouseDown($event, 1, rowIndex)\"\r\n\t\t>\r\n\t\t\t{{ row.RowNum }}\r\n\t\t</td>\r\n\t</ng-container>\r\n\t<ng-container *ngFor=\"let col of columns; trackBy: trackByName\" matColumnDef=\"{{ col.Name }}\" [sticky]=\"col.sticky\">\r\n\t\t<th\r\n\t\t\tmat-header-cell\r\n\t\t\t[arrowPosition]=\"col.Type !== 'INT' && col.Type !== 'FLOAT' ? 'after' : 'before'\"\r\n\t\t\t*matHeaderCellDef\r\n\t\t\tmat-sort-header\r\n\t\t\t[ngClass]=\"{\r\n\t\t\t\t'current-col': current.x === col.index + 2,\r\n\t\t\t\t'sticky-right': tableHasScrollbar && stickyColumnRight(col.index + 2),\r\n\t\t\t\t'number-cell': col.Type === 'INT' || col.Type === 'FLOAT'\r\n\t\t\t}\"\r\n\t\t\t(mouseenter)=\"headerMouseenter(col, $event)\"\r\n\t\t\t(mouseleave)=\"headerMouseleave(col)\"\r\n\t\t>\r\n\t\t\t<div *ngIf=\"col.showToolbar\" class=\"col-toolbar\">\r\n\t\t\t\t<mat-icon\r\n\t\t\t\t\tmatRipple\r\n\t\t\t\t\tmatRippleRadius=\"8\"\r\n\t\t\t\t\tmatRippleCentered=\"true\"\r\n\t\t\t\t\tmatTooltip=\"\u9501\u5B9A\u5217\u5230\u5DE6\u8FB9\"\r\n\t\t\t\t\t*ngIf=\"!col.sticky\"\r\n\t\t\t\t\tsvgIcon=\"lock\"\r\n\t\t\t\t\t(click)=\"lockButtonClick($event, col)\"\r\n\t\t\t\t></mat-icon>\r\n\t\t\t\t<mat-icon\r\n\t\t\t\t\tmatRipple\r\n\t\t\t\t\tmatRippleRadius=\"8\"\r\n\t\t\t\t\tmatRippleCentered=\"true\"\r\n\t\t\t\t\tmatTooltip=\"\u79FB\u9664\u9501\u5B9A\"\r\n\t\t\t\t\t*ngIf=\"col.sticky\"\r\n\t\t\t\t\tsvgIcon=\"lock_open\"\r\n\t\t\t\t\t(click)=\"unlockButtonClick($event, col)\"\r\n\t\t\t\t></mat-icon>\r\n\t\t\t\t<mat-icon\r\n\t\t\t\t\tmatRipple\r\n\t\t\t\t\tmatRippleRadius=\"8\"\r\n\t\t\t\t\tmatRippleCentered=\"true\"\r\n\t\t\t\t\tmatTooltip=\"\u5DE6\u79FB\"\r\n\t\t\t\t\t*ngIf=\"col.sticky && col.index > 0\"\r\n\t\t\t\t\tsvgIcon=\"arrow_back\"\r\n\t\t\t\t\t(click)=\"toLeftButtonClick($event, col)\"\r\n\t\t\t\t></mat-icon>\r\n\t\t\t\t<mat-icon\r\n\t\t\t\t\tmatRipple\r\n\t\t\t\t\tmatRippleRadius=\"8\"\r\n\t\t\t\t\tmatRippleCentered=\"true\"\r\n\t\t\t\t\tmatTooltip=\"\u53F3\u79FB\"\r\n\t\t\t\t\t*ngIf=\"col.sticky && !stickyColumnRight(col.index + 2)\"\r\n\t\t\t\t\tsvgIcon=\"arrow_forward\"\r\n\t\t\t\t\t(click)=\"toRightButtonClick($event, col)\"\r\n\t\t\t\t></mat-icon>\r\n\t\t\t</div>\r\n\t\t\t{{ col.Name }}\r\n\t\t</th>\r\n\t\t<td\r\n\t\t\tmat-cell\r\n\t\t\t*matCellDef=\"let row; let rowIndex = index\"\r\n\t\t\t(contextmenu)=\"openContextMenu($event, col.index + 2, rowIndex)\"\r\n\t\t\t[ngClass]=\"{\r\n\t\t\t\tselector: cellSelector(col.index + 2, rowIndex),\r\n\t\t\t\t'sel-left': cellSelectorLeft(col.index + 2, rowIndex),\r\n\t\t\t\t'sel-bottom': cellSelectorBottom(col.index + 2, rowIndex),\r\n\t\t\t\t'sel-right': cellSelectorRight(col.index + 2, rowIndex),\r\n\t\t\t\t'sel-top': cellSelectorTop(col.index + 2, rowIndex),\r\n\t\t\t\t'current-row': current.y === rowIndex + 1,\r\n\t\t\t\t'sticky-right': tableHasScrollbar && stickyColumnRight(col.index + 2),\r\n\t\t\t\t'number-cell': col.Type === 'INT' || col.Type === 'FLOAT'\r\n\t\t\t}\"\r\n\t\t\t(mouseenter)=\"cellMouseEnter($event)\"\r\n\t\t\t(mousedown)=\"cellMouseDown($event, col.index + 2, rowIndex)\"\r\n\t\t>\r\n\t\t\t<span class=\"line-breaker\" *ngIf=\"col.Type === 'DATE'\">\r\n\t\t\t\t{{ row.Data[col.Name] | date: 'yyyy-MM-dd hh:mm:ss' }}\r\n\t\t\t</span>\r\n\t\t\t<span class=\"line-breaker\" *ngIf=\"col.Type !== 'DATE'\">\r\n\t\t\t\t{{ row.Data[col.Name] }}\r\n\t\t\t</span>\r\n\t\t</td>\r\n\t</ng-container>\r\n\r\n\t<ng-container matColumnDef=\"_\u64CD\u4F5C\" stickyEnd *ngIf=\"processes.length > 0\">\r\n\t\t<th mat-header-cell *matHeaderCellDef [ngClass]=\"{ 'sticky-left': tableHasScrollbar }\" class=\"col-\u64CD\u4F5C\">\r\n\t\t\t<span>\r\n\t\t\t\t<span *ngIf=\"processExpand\">\u64CD\u4F5C</span\r\n\t\t\t\t><button mat-icon-button (click)=\"processExpand = !processExpand\">\r\n\t\t\t\t\t<mat-icon\r\n\t\t\t\t\t\t[matTooltip]=\"processExpand ? '\u6536\u7F29' : '\u5C55\u5F00'\"\r\n\t\t\t\t\t\t[svgIcon]=\"processExpand ? 'first_page' : 'last_page'\"\r\n\t\t\t\t\t></mat-icon>\r\n\t\t\t\t</button>\r\n\t\t\t</span>\r\n\t\t</th>\r\n\t\t<td\r\n\t\t\tmat-cell\r\n\t\t\tclass=\"cell-\u64CD\u4F5C\"\r\n\t\t\t*matCellDef=\"let row; let rowIndex = index\"\r\n\t\t\t[ngClass]=\"{ 'current-row': current.y === rowIndex + 1, 'sticky-left': tableHasScrollbar }\"\r\n\t\t>\r\n\t\t\t<common-process\r\n\t\t\t\t[processes]=\"processes\"\r\n\t\t\t\t[processStatus]=\"row.Processes\"\r\n\t\t\t\t[buttonShowNum]=\"processExpand ? 3 : 0\"\r\n\t\t\t\t(processClick)=\"processClick.emit({ pro: $event, row: row })\"\r\n\t\t\t></common-process>\r\n\t\t</td>\r\n\t</ng-container>\r\n\r\n\t<tr mat-header-row *matHeaderRowDef=\"displayColumnNames; sticky: true\" class=\"table-header\"></tr>\r\n\t<tr mat-row *matRowDef=\"let myRowData; let rowIndex = index; columns: displayColumnNames\"></tr>\r\n</table>\r\n",
                        styles: ["@charset \"UTF-8\";.content{height:100%;width:100%;overflow:auto;flex-grow:1}.line-breaker{white-space:pre}table{margin-bottom:24px;white-space:nowrap}table .col-toolbar{position:absolute;border-radius:2px;left:0;top:0;height:18px;background-color:rgba(0,0,0,.4)}table .col-toolbar .common-icon-button,table .col-toolbar .mat-icon{color:#fff;padding-top:2px;width:16px;height:16px}table .number-cell{text-align:right}table .mat-cell{font-size:14px;line-height:20px;min-height:auto;padding-left:8px;padding-right:16px;cursor:default}table .mat-row{height:40px}table .mat-row.mat-table-sticky:last{border-right:1px solid #e0e0e0!important}table .table-header{padding-right:0!important;padding-left:0!important;height:40px}table .table-header ::ng-deep .number-cell .mat-sort-header-container{justify-content:flex-end}table .table-header .col-\u64CD\u4F5C{padding-right:0!important;padding-left:0!important}table .table-header .col-\u64CD\u4F5C span{display:flex;justify-content:center;align-items:center}table .table-header .col-\u64CD\u4F5C span button{margin-bottom:3px}table .table-header .mat-header-cell{font-size:14px;line-height:20px;min-height:auto;padding-left:8px;padding-right:16px}table .cell-\u64CD\u4F5C{padding:0;text-align:center}"]
                    }] }
        ];
        /** @nocollapse */
        TableComponent.ctorParameters = function () { return [
            { type: ServiceService },
            { type: ngxClipboard.ClipboardService },
            { type: core.ElementRef },
            { type: core.Renderer2 }
        ]; };
        TableComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class',] }],
            processes: [{ type: core.Input }],
            sortChange: [{ type: core.Output }],
            processClick: [{ type: core.Output }],
            tabData: [{ type: core.ViewChild, args: ['tabData', { read: core.ElementRef, static: true },] }],
            tabDataOrg: [{ type: core.ViewChild, args: ['tabData', { static: true },] }],
            contextMenu: [{ type: core.ViewChild, args: [menu.MatMenuTrigger, { static: true },] }],
            mouseUp: [{ type: core.HostListener, args: ['window:mouseup', ['$event'],] }],
            onResize: [{ type: core.HostListener, args: ['window:resize', ['$event'],] }]
        };
        return TableComponent;
    }());
    if (false) {
        /** @type {?} */
        TableComponent.prototype.hostClass;
        /** @type {?} */
        TableComponent.prototype.displayColumns;
        /** @type {?} */
        TableComponent.prototype.dataSource;
        /**
         * @type {?}
         * @private
         */
        TableComponent.prototype._processes;
        /** @type {?} */
        TableComponent.prototype.sortChange;
        /** @type {?} */
        TableComponent.prototype.processClick;
        /** @type {?} */
        TableComponent.prototype._tableColumns;
        /** @type {?} */
        TableComponent.prototype.tabData;
        /** @type {?} */
        TableComponent.prototype.tabDataOrg;
        /** @type {?} */
        TableComponent.prototype.contextMenu;
        /** @type {?} */
        TableComponent.prototype.columns;
        /** @type {?} */
        TableComponent.prototype.processExpand;
        /** @type {?} */
        TableComponent.prototype.displayColumnNames;
        /** @type {?} */
        TableComponent.prototype.timer;
        /** @type {?} */
        TableComponent.prototype.leftPressed;
        /** @type {?} */
        TableComponent.prototype.x;
        /** @type {?} */
        TableComponent.prototype.y;
        /** @type {?} */
        TableComponent.prototype.fixStartColumns;
        /** @type {?} */
        TableComponent.prototype.fixEndColumns;
        /** @type {?} */
        TableComponent.prototype.contextMenuPosition;
        /** @type {?} */
        TableComponent.prototype.current;
        /** @type {?} */
        TableComponent.prototype.selector;
        /** @type {?} */
        TableComponent.prototype.cellSelector;
        /** @type {?} */
        TableComponent.prototype.cellSelectorLeft;
        /** @type {?} */
        TableComponent.prototype.cellSelectorBottom;
        /** @type {?} */
        TableComponent.prototype.cellSelectorRight;
        /** @type {?} */
        TableComponent.prototype.cellSelectorTop;
        /** @type {?} */
        TableComponent.prototype.cellMouseDown;
        /** @type {?} */
        TableComponent.prototype.cellMouseEnter;
        /** @type {?} */
        TableComponent.prototype.mouseUp;
        /** @type {?} */
        TableComponent.prototype.closeMouseDownListern;
        /** @type {?} */
        TableComponent.prototype.onMouseMove;
        /** @type {?} */
        TableComponent.prototype.scrollTable;
        /** @type {?} */
        TableComponent.prototype.openContextMenu;
        /** @type {?} */
        TableComponent.prototype.onSelCopyClick;
        /** @type {?} */
        TableComponent.prototype.onSelLineMenuClick;
        /** @type {?} */
        TableComponent.prototype.onSelCancelLineMenuClick;
        /** @type {?} */
        TableComponent.prototype.onSelAllMenuClick;
        /** @type {?} */
        TableComponent.prototype.headerMouseenter;
        /** @type {?} */
        TableComponent.prototype.headerMouseleave;
        /** @type {?} */
        TableComponent.prototype.lockButtonClick;
        /** @type {?} */
        TableComponent.prototype.stickyColumnRight;
        /** @type {?} */
        TableComponent.prototype.syncColumn;
        /** @type {?} */
        TableComponent.prototype.unlockButtonClick;
        /** @type {?} */
        TableComponent.prototype.toLeftButtonClick;
        /** @type {?} */
        TableComponent.prototype.toRightButtonClick;
        /** @type {?} */
        TableComponent.prototype.tableHasScrollbar;
        /** @type {?} */
        TableComponent.prototype.headerToolbarShowTimer;
        /**
         * @type {?}
         * @private
         */
        TableComponent.prototype.scrollLeft;
        /**
         * @type {?}
         * @private
         */
        TableComponent.prototype.scrollTop;
        /** @type {?} */
        TableComponent.prototype.svr;
        /** @type {?} */
        TableComponent.prototype._clipboardService;
        /** @type {?} */
        TableComponent.prototype.elRef;
        /** @type {?} */
        TableComponent.prototype.renderer;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ViewDrawerComponent = /** @class */ (function () {
        function ViewDrawerComponent(svr, curr, dialog, snackBar) {
            this.svr = svr;
            this.curr = curr;
            this.dialog = dialog;
            this.snackBar = snackBar;
            this.ownerByUser = OwnerByEnum.ownerByUser;
            this.ownerByDept = OwnerByEnum.ownerByDept;
            this.hostClass = true;
            this.close = new core.EventEmitter();
            this.subscribes = [];
        }
        /**
         * @return {?}
         */
        ViewDrawerComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            // this.subscribes.push(
            // 	this.svr.editView.currentChange.subscribe(
            // 		() => (this.viewDefine.SelectedColumns = this.svr.editView.SelectedColumns)
            // 	)
            // );
        };
        /**
         * @return {?}
         */
        ViewDrawerComponent.prototype.ngOnDestroy = /**
         * @return {?}
         */
        function () {
            this.subscribes.forEach((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.unsubscribe(); }));
        };
        /**
         * @return {?}
         */
        ViewDrawerComponent.prototype.canModify = /**
         * @return {?}
         */
        function () {
            return (!this.svr.editView.titleInput &&
                this.svr.editView.current &&
                this.svr.editView.current.canModify(this.curr.data.UserName, this.curr.data.Dept.Code));
        };
        /**
         * @return {?}
         */
        ViewDrawerComponent.prototype.ok = /**
         * @return {?}
         */
        function () {
            var _this = this;
            /** @type {?} */
            var process = (/**
             * @return {?}
             */
            function () {
                _this.svr.data.selectedView = _this.svr.editView.current;
                _this.svr.refreshData().subscribe((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) {
                    if (v.ok) {
                        _this.close.emit();
                    }
                    else {
                        _this.snackBar.open(v.error, '确定', { duration: 5000 });
                    }
                }));
            });
            if (this.svr.editView.modify) {
                this.svr.editView.save().subscribe((/**
                 * @return {?}
                 */
                function () {
                    process();
                }));
            }
            else {
                process();
            }
        };
        /**
         * @return {?}
         */
        ViewDrawerComponent.prototype.remove = /**
         * @return {?}
         */
        function () {
            var _this = this;
            /** @type {?} */
            var dialogRef = this.dialog.open(ConfirmDialogComponent, {
                width: '360px',
                height: '184px',
                data: '确定要删除视图[' + this.svr.editView.current.Name + '] 吗?',
                autoFocus: false
            });
            dialogRef.afterClosed().subscribe((/**
             * @param {?} result
             * @return {?}
             */
            function (result) {
                if (result) {
                    _this.svr.editView.remove();
                }
            }));
        };
        /**
         * @return {?}
         */
        ViewDrawerComponent.prototype.editDone = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.svr.editView.done().subscribe((/**
             * @return {?}
             */
            function () { }), (/**
             * @param {?} err
             * @return {?}
             */
            function (err) {
                /** @type {?} */
                var derr = dbwebCore.IsDuplicatePKError(err.error);
                if (derr.Yes) {
                    _this.snackBar.open('名称重复', '确定', { duration: 5000 });
                }
                else {
                    _this.snackBar.open(err.error, '确定', { duration: 5000 });
                }
            }));
        };
        ViewDrawerComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-view-drawer',
                        template: "<div class=\"title\">\r\n\t<mat-select *ngIf=\"!svr.editView.titleInput\"\r\n\t\t[(ngModel)]=\"svr.editView.current\">\r\n\t\t<mat-option *ngFor=\"let view of svr.data.constViewItems\" [value]=\"view\">\r\n\t\t\t{{ view.Name }}\r\n\t\t</mat-option>\r\n\t\t<mat-option *ngFor=\"let view of svr.data.viewList\" [value]=\"view\">\r\n\t\t\t{{ view.Name }}\r\n\t\t</mat-option>\r\n\t</mat-select>\r\n\t<div class=\"\u661F\u661F\" *ngIf=\"!svr.editView.titleInput && svr.editView.modify\">*\r\n\t</div>\r\n\t<ng-container *ngIf=\"!svr.editView.titleInput\">\r\n\t\t<span *ngIf=\"svr.editView.current?.OwnerBy === ownerByUser\">\u7528\u6237\u7EA7</span>\r\n\t\t<span *ngIf=\"svr.editView.current?.OwnerBy === ownerByDept\">\u90E8\u95E8\u7EA7</span>\r\n\t</ng-container>\r\n\t<mat-form-field *ngIf=\"svr.editView.titleInput\" class=\"\u663E\u793A\u5217\u6807\u9898\u8F93\u5165\">\r\n\t\t<input matInput [(ngModel)]=\"svr.editView.title\" />\r\n\t</mat-form-field>\r\n\r\n\t<mat-radio-group class=\"\u9009\u62E9\u7EA7\u522B\"\r\n\t\t*ngIf=\"svr.editView.titleInput && svr.editView.isAdd\"\r\n\t\taria-label=\"Select an option\" [(ngModel)]=\"svr.editView.addOwnerBy\">\r\n\t\t<mat-radio-button [value]=\"ownerByUser\">\u7528\u6237\u7EA7</mat-radio-button>\r\n\t\t<mat-radio-button [value]=\"ownerByDept\">\u90E8\u95E8\u7EA7</mat-radio-button>\r\n\t</mat-radio-group>\r\n\t<div class=\"\u663E\u793A\u5217\u6807\u9898\u56FE\u6807\">\r\n\t\t<button mat-icon-button (click)=\"svr.editView.cancel()\"\r\n\t\t\t*ngIf=\"svr.editView.titleInput\">\r\n\t\t\t<mat-icon svgIcon=\"close\"> </mat-icon>\r\n\t\t</button>\r\n\t\t<button mat-icon-button class=\"\u4EAE\u8272\u5B57\u4F53\" (click)=\"editDone()\"\r\n\t\t\t*ngIf=\"svr.editView.titleInput\">\r\n\t\t\t<mat-icon class=\"columnTitleDone\" svgIcon=\"done\"> </mat-icon>\r\n\t\t</button>\r\n\t\t<button mat-icon-button (click)=\"svr.editView.edit()\"\r\n\t\t\t*ngIf=\"canModify()\">\r\n\t\t\t<mat-icon svgIcon=\"edit\"> </mat-icon>\r\n\t\t</button>\r\n\t\t<button mat-icon-button (click)=\"svr.editView.add()\"\r\n\t\t\t*ngIf=\"!svr.editView.titleInput\">\r\n\t\t\t<mat-icon svgIcon=\"add_circle\"></mat-icon>\r\n\t\t</button>\r\n\t\t<button mat-icon-button (click)=\"remove()\" *ngIf=\"canModify()\">\r\n\t\t\t<mat-icon svgIcon=\"delete\"></mat-icon>\r\n\t\t</button>\r\n\t</div>\r\n</div>\r\n\r\n<common-view-define #viewDefine class=\"main\" [readonly]=\"svr.editView.Readonly\"\r\n\t[AllColumns]=\"svr.data.allColumnNames\" [SelectedColumns]=\"svr.editView.SelectedColumns\" (ModifyEvent)=\"svr.editView.modify=true\">\r\n</common-view-define>\r\n<div class=\"bottom-function\">\r\n\t<button mat-button (click)=\"close.emit()\">\r\n\t\t\u53D6\u6D88\r\n\t</button>\r\n\t<button mat-button class=\"\u786E\u5B9A\u6309\u94AE\" (click)=\"ok()\"\r\n\t\t*ngIf=\"!this.svr.editView.Readonly && !this.svr.editView.titleInput\">\r\n\t\t\u786E\u5B9A\r\n\t</button>\r\n</div>\r\n<div class=\"\u906E\u7F69\" *ngIf=\"svr.editView.titleInput && svr.editView.isAdd\"></div>",
                        styles: ["@charset \"UTF-8\";:host{width:618px;height:100%;display:flex;align-items:stretch;flex-direction:column}.\u906E\u7F69{width:100%;height:calc(100% - 40px);position:absolute;bottom:0;left:0}.title{height:40px;line-height:40px;padding-left:24px}.title .mat-select{display:inline-block;width:160px;font-size:18px;font-weight:600}.title .\u661F\u661F{position:absolute;left:200px;top:0;font-size:18px;display:inline-block;-webkit-transform:translateX(-50px);transform:translateX(-50px)}.title .\u663E\u793A\u5217\u6807\u9898\u8F93\u5165{display:inline-block;width:282px;height:30px}.title .\u663E\u793A\u5217\u6807\u9898\u8F93\u5165 ::ng-deep .mat-form-field-infix{border:none}.title .\u9009\u62E9\u7EA7\u522B{font-size:14px}.title .\u663E\u793A\u5217\u6807\u9898\u56FE\u6807{float:right;height:40px;line-height:40px}.title .\u663E\u793A\u5217\u6807\u9898\u56FE\u6807 .mat-icon{vertical-align:middle;cursor:pointer}.main{flex-grow:1}.bottom-function{height:56px;line-height:56px;text-align:right}.bottom-function .\u786E\u5B9A\u6309\u94AE{margin:0 16px;color:#fff}"]
                    }] }
        ];
        /** @nocollapse */
        ViewDrawerComponent.ctorParameters = function () { return [
            { type: ServiceService },
            { type: dbwebCore.CurrentService },
            { type: material.MatDialog },
            { type: material.MatSnackBar }
        ]; };
        ViewDrawerComponent.propDecorators = {
            viewDefine: [{ type: core.ViewChild, args: ['viewDefine', { static: true, read: ViewDefineComponent },] }],
            hostClass: [{ type: core.HostBinding, args: ['class.view-drawer',] }],
            close: [{ type: core.Output }]
        };
        return ViewDrawerComponent;
    }());
    if (false) {
        /** @type {?} */
        ViewDrawerComponent.prototype.ownerByUser;
        /** @type {?} */
        ViewDrawerComponent.prototype.ownerByDept;
        /** @type {?} */
        ViewDrawerComponent.prototype.viewDefine;
        /** @type {?} */
        ViewDrawerComponent.prototype.hostClass;
        /** @type {?} */
        ViewDrawerComponent.prototype.close;
        /** @type {?} */
        ViewDrawerComponent.prototype.subscribes;
        /** @type {?} */
        ViewDrawerComponent.prototype.svr;
        /** @type {?} */
        ViewDrawerComponent.prototype.curr;
        /**
         * @type {?}
         * @private
         */
        ViewDrawerComponent.prototype.dialog;
        /**
         * @type {?}
         * @private
         */
        ViewDrawerComponent.prototype.snackBar;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var RecordViewComponent = /** @class */ (function () {
        function RecordViewComponent(svr, ele, prj, _clipboardService, iconRegistry, sanitizer, router, eles) {
            this.svr = svr;
            this.ele = ele;
            this.prj = prj;
            this._clipboardService = _clipboardService;
            this.router = router;
            this.eles = eles;
            this.SelectTypeSelected = SelectType.Selected;
            this.SelectTypeUnselected = SelectType.Unselected;
            this.showConditionalTemplateRunner = false;
            this.editLabelModel = false;
            this.subscribe = [];
            /** @type {?} */
            var icons = [
                'all_chosen',
                'cancel_chosen',
                'return_chosen',
                'single_chosen',
                'double_down',
                'drag_indicator',
                'arrow_collapse',
                'arrow_expand',
                'sorting_arrows',
                'color_add',
                'file_copy',
                'bg_bottom_out',
                'default'
            ];
            icons.forEach((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                iconRegistry.addSvgIcon(v, sanitizer.bypassSecurityTrustResourceUrl('assets/record-view/icon/' + v + '.svg'));
            }));
        }
        /**
         * @return {?}
         */
        RecordViewComponent.prototype.ngOnDestroy = /**
         * @return {?}
         */
        function () {
            this.subscribe.forEach((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.unsubscribe(); }));
        };
        /**
         * @return {?}
         */
        RecordViewComponent.prototype.onDetach = /**
         * @return {?}
         */
        function () {
            this.dataTable.onDetach();
        };
        /**
         * @param {?} ref
         * @param {?} activatedRoute
         * @return {?}
         */
        RecordViewComponent.prototype.onAttach = /**
         * @param {?} ref
         * @param {?} activatedRoute
         * @return {?}
         */
        function (ref, activatedRoute) {
            this.dataTable.onAttach(ref, activatedRoute);
        };
        /**
         * @return {?}
         */
        RecordViewComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.subscribe.push(this.svr.refreshDataEvent.subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.dataTable.setDataSource(_this.svr.data.tableData.Rows, _this.svr.data.tableData.DisplayColumns.map((/**
                 * @param {?} vv
                 * @return {?}
                 */
                function (vv) { return ((/** @type {?} */ (__assign({}, vv)))); })), (v && v.keepDivide) || (v && v.keepRowCount));
            })));
            // 如果是组件方式调用
            if (this.eleName !== undefined) {
                this.svr.initByCondition(this.eles.get(this.eleName), this.title, this.condition);
            }
            else {
                // init param
                this.ele.currentElement.pipe(operators.take(1)).subscribe((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) {
                    _this.svr.init(v.element, _this.prj.frontToApiURL(v.url));
                }));
            }
        };
        /**
         * @return {?}
         */
        RecordViewComponent.prototype.selectedRowText = /**
         * @return {?}
         */
        function () {
            var _this = this;
            /** @type {?} */
            var total = this.svr.data.tableRowSelection.selected.length;
            /** @type {?} */
            var current = 0;
            if (this.svr.data.tableData && this.svr.data.tableData.Rows) {
                current = this.svr.data.tableData.Rows.filter((/**
                 * @param {?} row
                 * @return {?}
                 */
                function (row) { return _this.svr.data.tableRowSelection.isSelected(row.Key); }))
                    .length;
            }
            if (total === current) {
                return "\u5DF2\u9009" + total + "\u6761";
            }
            else {
                return current + "/" + total;
            }
        };
        /**
         * @param {?} sortInfo
         * @return {?}
         */
        RecordViewComponent.prototype.onTableSort = /**
         * @param {?} sortInfo
         * @return {?}
         */
        function (sortInfo) {
            switch (sortInfo.direction) {
                case '':
                    this.svr.data.fetchParam.Order = null;
                    break;
                case 'asc':
                    this.svr.data.fetchParam.Order = [sortInfo.active];
                    break;
                case 'desc':
                    this.svr.data.fetchParam.Order = ["-" + sortInfo.active];
            }
            this.svr.refreshData({ keepRowCount: true }).subscribe();
        };
        /**
         * @return {?}
         */
        RecordViewComponent.prototype.searchClick = /**
         * @return {?}
         */
        function () {
            this.showConditionalTemplateRunner = false;
            this.svr.refreshData().subscribe();
        };
        /**
         * @param {?} event
         * @return {?}
         */
        RecordViewComponent.prototype.onRecordProcessClick = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            /** @type {?} */
            var fields = this.svr.data.uniqueFields;
            if (event.pro.TransPath && event.pro.TransPath.length > 0) {
                fields = event.pro.TransPath;
            }
            /** @type {?} */
            var keyValues = fields.map((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return "[" + event.row.Data[v] + "]"; })).join(' ');
            /** @type {?} */
            var ustr = this.eles.frontElementURL(this.svr.data.rowProcesses.find((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.Name === event.pro.Name; })).ElementName, event.row.Processes[event.pro.Name].URL);
            this.router.navigateByUrl(ustr, {
                state: (/** @type {?} */ ({
                    // 因为route自动会进行encode,所以需要把服务端的url解开,但是服务端又不能不编码,因为斜杠需要正确处理
                    url: this.router.parseUrl(ustr),
                    key: ustr,
                    title: event.pro.Name + " - " + keyValues
                }))
            });
        };
        /**
         * @param {?} pro
         * @return {?}
         */
        RecordViewComponent.prototype.onToolbarProcessClick = /**
         * @param {?} pro
         * @return {?}
         */
        function (pro) {
            /** @type {?} */
            var ustr = this.eles.frontElementURL(pro.ElementName, this.svr.data.tableData.Processes[pro.Name].URL);
            this.router.navigateByUrl(ustr, {
                state: (/** @type {?} */ ({
                    url: this.router.parseUrl(ustr),
                    key: ustr,
                    title: pro.Name
                }))
            });
        };
        /**
         * @param {?} event
         * @return {?}
         */
        RecordViewComponent.prototype.onNextPageClick = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            this.svr.data.fetchParam.Divide = this.svr.data.tableData.DownDivide;
            this.svr.data.fetchParam.DivideRowNum = this.svr.data.tableData.DownRowNum;
            if (this.svr.data.prevFetchDivide) {
                this.svr.data.upDivide = this.svr.data.upDivide || [];
                this.svr.data.upRowNum = this.svr.data.upRowNum || [];
                this.svr.data.upDivide.push(this.svr.data.prevFetchDivide);
                this.svr.data.upRowNum.push(this.svr.data.prevFetchRowNum);
            }
            this.svr.refreshData({ keepDivide: true, keepRowCount: true }).subscribe();
        };
        /**
         * @param {?} event
         * @return {?}
         */
        RecordViewComponent.prototype.onPrevPageClick = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            if (this.svr.data.upDivide) {
                this.svr.data.fetchParam.Divide = this.svr.data.upDivide.pop();
            }
            else {
                this.svr.data.fetchParam.Divide = undefined;
            }
            if (this.svr.data.upRowNum) {
                this.svr.data.fetchParam.DivideRowNum = this.svr.data.upRowNum.pop();
            }
            else {
                this.svr.data.fetchParam.DivideRowNum = undefined;
            }
            this.svr.refreshData({ keepDivide: true, keepRowCount: true }).subscribe();
        };
        /**
         * @param {?} event
         * @return {?}
         */
        RecordViewComponent.prototype.onFooterRowCountClick = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            this.svr.refreshRowCount().subscribe();
        };
        /**
         * @return {?}
         */
        RecordViewComponent.prototype.startRowNo = /**
         * @return {?}
         */
        function () {
            if (this.svr.data && this.svr.data.tableData && this.svr.data.tableData.Rows.length > 0) {
                return this.svr.data.tableData.Rows[0].RowNum + 1;
            }
            return 0;
        };
        /**
         * @return {?}
         */
        RecordViewComponent.prototype.openLabelDrawer = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.svr.data.showLabelDrawer = true;
            setTimeout((/**
             * @return {?}
             */
            function () {
                // 复制,因为对话框内部会改变值
                _this.labelDrawer.selectedLabels = __spread(_this.svr.data.selectedLabels);
                // 点击模板打开抽屉
                _this.drawer.toggle();
            }), 0);
        };
        /**
         * @return {?}
         */
        RecordViewComponent.prototype.openColumnsDrawer = /**
         * @return {?}
         */
        function () {
            this.svr.data.showLabelDrawer = false;
            if (!this.svr.data.viewList || this.svr.data.viewList.length === 0) {
                this.svr.editView.add();
            }
            else {
                this.svr.editView.titleInput = false;
                this.svr.editView.current = this.svr.data.viewList[0];
            }
            // 点击模板打开抽屉
            this.drawer.toggle();
        };
        /**
         * @return {?}
         */
        RecordViewComponent.prototype.hasConditionalTemplate = /**
         * @return {?}
         */
        function () {
            return !!this.svr.data.conditionalTemplates.find((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.enable; }));
        };
        /**
         * @return {?}
         */
        RecordViewComponent.prototype.closeDrawer = /**
         * @return {?}
         */
        function () {
            // this.labelDrawer.editModel = false;
            this.editLabelModel = false;
            console.log('close', this.editLabelModel, this.labelDrawer.editModel);
        };
        RecordViewComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-recview',
                        template: "<div class=\"record-view main\">\r\n\t<mat-drawer-container class=\"container\">\r\n\t\t<mat-drawer #drawer mode=\"over\" position=\"end\" autoFocus=\"false\" (closedStart)=\"labelDrawer.editModel=false;\">\r\n\t\t\t<common-label-drawer #labelDrawer *ngIf=\"svr.data.showLabelDrawer\" [IsEditModel]=\"editLabelModel\"\r\n\t\t\t\t(close)=\"drawer.toggle()\">\r\n\t\t\t</common-label-drawer>\r\n\t\t\t<common-view-drawer #columnsDrawer *ngIf=\"!svr.data.showLabelDrawer\" (close)=\"drawer.toggle()\">\r\n\t\t\t</common-view-drawer>\r\n\t\t</mat-drawer>\r\n\t\t<mat-drawer-content>\r\n\t\t\t<div class=\"rec-body\" (click)=\"showConditionalTemplateRunner = false\">\r\n\t\t\t\t<div class=\"toolbar-panel\">\r\n\t\t\t\t\t<div>\r\n\t\t\t\t\t\t<div class=\"toolbar \u9009\u62E9\u5DE5\u5177\u680F my-elevation-z5\">\r\n\t\t\t\t\t\t\t<span class=\"\u9009\u62E9\u63D0\u793A \u5DF2\u9009\u62E9\">{{ selectedRowText() }}</span>\r\n\t\t\t\t\t\t\t<mat-form-field class=\"sel\u9009\u62E9\">\r\n\t\t\t\t\t\t\t\t<mat-select [(ngModel)]=\"svr.data.fetchParam.SelType\">\r\n\t\t\t\t\t\t\t\t\t<mat-option value=\"\"> \u6240\u6709 </mat-option>\r\n\t\t\t\t\t\t\t\t\t<mat-option [value]=\"SelectTypeSelected\">\r\n\t\t\t\t\t\t\t\t\t\t\u4EC5\u9009\u4E2D </mat-option>\r\n\t\t\t\t\t\t\t\t\t<mat-option [value]=\"SelectTypeUnselected\">\r\n\t\t\t\t\t\t\t\t\t\t\u672A\u9009\u4E2D </mat-option>\r\n\t\t\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"toolbar \u5355\u6307\u6807\u6761\u4EF6\u5DE5\u5177\u680F my-elevation-z5\">\r\n\t\t\t\t\t\t\t<mat-form-field class=\"sel\u6307\u6807\">\r\n\t\t\t\t\t\t\t\t<mat-select [(ngModel)]=\"svr.data.fetchParam.Field\"\r\n\t\t\t\t\t\t\t\t\t(ngModelChange)=\"svr.onColumnChange($event)\">\r\n\t\t\t\t\t\t\t\t\t<mat-option value=\"\"> </mat-option>\r\n\t\t\t\t\t\t\t\t\t<mat-option *ngFor=\"let col of svr.data?.tableData?.Columns\" [value]=\"col.Name\">\r\n\t\t\t\t\t\t\t\t\t\t{{ col.Name }}\r\n\t\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t\t<mat-form-field class=\"sel\u89C4\u5219\" floatLabel=\"never\">\r\n\t\t\t\t\t\t\t\t<mat-select [(ngModel)]=\"svr.data.fetchParam.Opt\" placeholder=\"(\u65E0)\">\r\n\t\t\t\t\t\t\t\t\t<mat-option *ngFor=\"let ope of svr.data.Operates\" [value]=\"ope.Name\">{{\r\n\t\t\t\t\t\t\t\t\t\tope.Label\r\n\t\t\t\t\t\t\t\t\t}}</mat-option>\r\n\t\t\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t\t<mat-divider [vertical]=\"true\"></mat-divider>\r\n\t\t\t\t\t\t\t<mat-form-field class=\"inp\u503C\" appearance=\"standard\">\r\n\t\t\t\t\t\t\t\t<input matInput [(ngModel)]=\"svr.data.fetchParam.Value\" (keyup.enter)=\"searchClick()\" />\r\n\t\t\t\t\t\t\t\t<button mat-icon-button matSuffix\r\n\t\t\t\t\t\t\t\t\t*ngIf=\"svr.data.fetchParam?.Opt == 'in' || svr.data.fetchParam?.Opt == '!in'\">\r\n\t\t\t\t\t\t\t\t\t<mat-icon svgIcon=\"more_vert\"></mat-icon>\r\n\t\t\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"toolbar\">\r\n\t\t\t\t\t\t\t<div class=\"condition-button\">\r\n\t\t\t\t\t\t\t\t<button mat-raised-button class=\"my-elevation-z5 \u67E5\u8BE2\u6309\u94AE\">\r\n\t\t\t\t\t\t\t\t\t<mat-icon svgIcon=\"search\" (click)=\"searchClick()\"></mat-icon>\r\n\t\t\t\t\t\t\t\t\t<span *ngIf=\"svr.data.conditionalTemplates\" class=\"\u5206\u5272\u7EBF\"></span>\r\n\t\t\t\t\t\t\t\t\t<ng-container *ngIf=\"svr.data.conditionalTemplates\">\r\n\t\t\t\t\t\t\t\t\t\t<mat-icon svgIcon=\"view_list\"\r\n\t\t\t\t\t\t\t\t\t\t\t[class.openConditionalTemplate]=\"showConditionalTemplateRunner\"\r\n\t\t\t\t\t\t\t\t\t\t\t[class.revised]=\"hasConditionalTemplate() && !showConditionalTemplateRunner\"\r\n\t\t\t\t\t\t\t\t\t\t\t(click)=\"showConditionalTemplateRunner = !showConditionalTemplateRunner;$event.stopPropagation();\">\r\n\t\t\t\t\t\t\t\t\t\t</mat-icon>\r\n\t\t\t\t\t\t\t\t\t\t<span *ngIf=\"hasConditionalTemplate()\" class=\"revised-star\">*</span>\r\n\t\t\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t\t\t<!-- <button mat-raised-button class=\"my-elevation-z5 \u67E5\u8BE2\u6309\u94AE\"></button> -->\r\n\t\t\t\t\t\t\t\t<mat-icon *ngIf=\"showConditionalTemplateRunner\" class=\"condition-triangle\">\r\n\t\t\t\t\t\t\t\t\t<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"24px\" height=\"24px\">\r\n\t\t\t\t\t\t\t\t\t\t<path name=\"\u4E09\u89D2\u5F62\" d=\"M0 15 L12 0 L24 15  Z\" />\r\n\t\t\t\t\t\t\t\t\t</svg>\r\n\t\t\t\t\t\t\t\t</mat-icon>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"right-top-area\">\r\n\t\t\t\t\t\t<common-label-selector (open)=\"openLabelDrawer()\">\r\n\t\t\t\t\t\t</common-label-selector>\r\n\t\t\t\t\t\t<common-view-selector (managerClick)=\"openColumnsDrawer()\">\r\n\t\t\t\t\t\t</common-view-selector>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"condition-parent\">\r\n\t\t\t\t\t<div class=\"condition-card my-elevation-z8\" *ngIf=\"showConditionalTemplateRunner\">\r\n\t\t\t\t\t\t<common-conditional-template-runner (click)=\"$event.stopPropagation();\"\r\n\t\t\t\t\t\t\t(enterPress)=\"showConditionalTemplateRunner=false;searchClick();\">\r\n\t\t\t\t\t\t</common-conditional-template-runner>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"condition-mask\" *ngIf=\"showConditionalTemplateRunner\"></div>\r\n\t\t\t\t\t<common-table #dataTable [processes]=\"svr.data?.rowProcesses\" (sortChange)=\"onTableSort($event)\"\r\n\t\t\t\t\t\t(processClick)=\"onRecordProcessClick($event)\">\r\n\t\t\t\t\t</common-table>\r\n\t\t\t\t</div>\r\n\t\t\t\t<common-footer-toolbar class=\"\u64CD\u4F5C\u5DE5\u5177\u680F my-elevation-z5\" [process]=\"svr.data.toolbarProcesses\"\r\n\t\t\t\t\t[rowCount]=\"svr.data.rowCount\" [pageSize]=\"svr.data.fetchParam.Limit\" [startRowNo]=\"startRowNo()\"\r\n\t\t\t\t\t[responseTime]=\"svr.data.timeConsuming\" [nextPageDisable]=\"svr.data.nextPageDisable\"\r\n\t\t\t\t\t[PrevPageDisable]=\"svr.data.prevPageDisable\" (processClick)=\"onToolbarProcessClick($event)\"\r\n\t\t\t\t\t(nextPageClick)=\"onNextPageClick($event)\" (prevPageClick)=\"onPrevPageClick($event)\"\r\n\t\t\t\t\t(rowCountClick)=\"onFooterRowCountClick($event)\">\r\n\t\t\t\t</common-footer-toolbar>\r\n\t\t\t</div>\r\n\t\t</mat-drawer-content>\r\n\t</mat-drawer-container>\r\n</div>",
                        providers: [ServiceService, BackFaceService, ServiceData],
                        styles: ["@charset \"UTF-8\";.record-view{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;-o-user-select:none;position:relative;display:flex;box-sizing:border-box;flex-direction:column;height:100%;width:100%}.record-view .header{font-size:12px;position:relative;z-index:1;display:inline-flex;justify-content:space-between;align-items:center;height:32px}.record-view .header .left{display:inline-flex;justify-content:space-between;align-items:center;height:32px;line-height:32px}.record-view .header .left .\u4F4D\u7F6E{margin-right:4px}.record-view .header .left .\u7C7B\u522B{margin-right:8px}.record-view .header .left button{width:24px;height:24px;line-height:24px}.record-view .header .left button .\u590D\u5236\u56FE\u6807{width:16px;height:16px;margin-bottom:6px}.record-view .header .left .\u7B49\u5F85\u56FE\u6807{width:16px;height:16px}.record-view .header .left .span\u7B49\u5F85\u56FE\u6807{margin-left:16px;padding-top:8px}.record-view .header .\u8BED\u8A00{font-size:12px;height:24px;line-height:20px}.record-view .toolbar-panel{padding-top:8px;padding-bottom:16px;display:inline-flex;justify-content:space-between}.record-view .toolbar-panel .toolbar{display:inline-flex;align-items:center;border-radius:16px;height:32px}.record-view .toolbar-panel .toolbar ::ng-deep .mat-form-field-underline{display:none}.record-view .toolbar-panel .toolbar .mat-form-field-type-mat-select{padding-top:6px}.record-view .toolbar-panel .toolbar .mat-divider{height:16px}.record-view .toolbar-panel .toolbar.\u9009\u62E9\u5DE5\u5177\u680F{vertical-align:top;box-sizing:border-box;width:152px;padding-left:16px;padding-right:8px;margin-right:24px}.record-view .toolbar-panel .toolbar.\u9009\u62E9\u5DE5\u5177\u680F .\u9009\u62E9\u63D0\u793A{font-size:12px;line-height:18px;width:72px}.record-view .toolbar-panel .toolbar.\u9009\u62E9\u5DE5\u5177\u680F .sel\u9009\u62E9{font-size:14px;width:72px}.record-view .toolbar-panel .toolbar.\u5355\u6307\u6807\u6761\u4EF6\u5DE5\u5177\u680F{vertical-align:top;box-sizing:border-box;width:360px;padding-left:16px;padding-right:8px;margin-right:8px}.record-view .toolbar-panel .toolbar.\u5355\u6307\u6807\u6761\u4EF6\u5DE5\u5177\u680F .sel\u6307\u6807{width:80px;font-size:14px;line-height:20px;margin-right:8px}.record-view .toolbar-panel .toolbar.\u5355\u6307\u6807\u6761\u4EF6\u5DE5\u5177\u680F .sel\u89C4\u5219{width:88px;font-size:14px;line-height:20px;margin-right:8px}.record-view .toolbar-panel .toolbar.\u5355\u6307\u6807\u6761\u4EF6\u5DE5\u5177\u680F .inp\u503C{margin-left:4px;width:156px}.record-view .toolbar-panel .toolbar.\u5355\u6307\u6807\u6761\u4EF6\u5DE5\u5177\u680F .inp\u503C button{position:relative;top:4px;width:24px;height:24px;line-height:24px}.record-view .toolbar-panel .toolbar.\u6A21\u677F\u5DE5\u5177\u680F{vertical-align:top;box-sizing:border-box;width:112px;padding-left:16px;padding-right:8px}.record-view .toolbar-panel .toolbar.\u6A21\u677F\u5DE5\u5177\u680F .sel{width:88px;font-size:14px;line-height:20px}.record-view .toolbar-panel .toolbar.\u516C\u7528\u6A21\u677F{margin-right:24px}.record-view .toolbar-panel .\u6A21\u677F\u6587\u5B57{font-size:14px;line-height:32px;margin-right:8px}.record-view .toolbar-panel .\u67E5\u8BE2\u6309\u94AE{min-width:56px;border-radius:16px;height:32px;padding-left:12px;padding-right:14px}.record-view .toolbar-panel .\u67E5\u8BE2\u6309\u94AE .mat-icon{position:relative;top:-3px}.record-view .toolbar-panel .\u67E5\u8BE2\u6309\u94AE .\u5206\u5272\u7EBF{display:inline-block;width:1px;height:16px;margin:-3px 4px 3px;vertical-align:middle}.record-view .my-elevation-z5{box-shadow:0 5px 13px 0 rgba(0,0,0,.14)}.record-view .container{width:100%;height:100%}.record-view .container .rec-body{width:100%;height:100%;display:flex;box-sizing:border-box;flex-direction:column;padding-left:8px;padding-bottom:24px}.record-view .container .rec-body .condition-parent{width:100%;height:0;position:relative;flex-grow:1;display:flex;flex-direction:column}.record-view .container .rec-body .condition-button{position:relative}.record-view .container .rec-body .revised-star{position:absolute;top:-8px;right:8px}.record-view .container .rec-body .condition-card{position:absolute;z-index:201;left:0;top:-10px;right:8px;border-radius:4px}.record-view .container .rec-body .condition-mask{position:absolute;z-index:200;left:-8px;top:0;right:0;bottom:0}.record-view .container .rec-body .condition-triangle{position:absolute;z-index:202;top:30px;left:45px;right:0}.record-view .container .rec-body .content{height:100%;width:100%;overflow:auto;flex-grow:1}.record-view .container .rec-body .content .emp-last{height:90px}.record-view .container .rec-body .mat-elevation-z1{box-shadow:none}.record-view .container .rec-body .content::-webkit-scrollbar-button:horizontal:start{height:4px;width:80px}.record-view .container .rec-body .\u64CD\u4F5C\u5DE5\u5177\u680F{height:24px;width:100%}.record-view .container .mat-drawer-content{overflow:hidden}"]
                    }] }
        ];
        /** @nocollapse */
        RecordViewComponent.ctorParameters = function () { return [
            { type: ServiceService },
            { type: dbwebCore.RouteElementService },
            { type: dbwebCore.ProjectService },
            { type: ngxClipboard.ClipboardService },
            { type: icon.MatIconRegistry },
            { type: platformBrowser.DomSanitizer },
            { type: router.Router },
            { type: dbwebCore.ElementsService }
        ]; };
        RecordViewComponent.propDecorators = {
            eleName: [{ type: core.Input }],
            title: [{ type: core.Input }],
            condition: [{ type: core.Input }],
            dataTable: [{ type: core.ViewChild, args: ['dataTable', { static: true },] }],
            labelDrawer: [{ type: core.ViewChild, args: ['labelDrawer', { static: false },] }],
            columnsDrawer: [{ type: core.ViewChild, args: ['columnsDrawer', { static: false },] }],
            drawer: [{ type: core.ViewChild, args: ['drawer', { static: true },] }]
        };
        return RecordViewComponent;
    }());
    if (false) {
        /** @type {?} */
        RecordViewComponent.prototype.eleName;
        /** @type {?} */
        RecordViewComponent.prototype.title;
        /** @type {?} */
        RecordViewComponent.prototype.condition;
        /** @type {?} */
        RecordViewComponent.prototype.dataTable;
        /** @type {?} */
        RecordViewComponent.prototype.labelDrawer;
        /** @type {?} */
        RecordViewComponent.prototype.columnsDrawer;
        /** @type {?} */
        RecordViewComponent.prototype.element;
        /** @type {?} */
        RecordViewComponent.prototype.drawer;
        /** @type {?} */
        RecordViewComponent.prototype.SelectTypeSelected;
        /** @type {?} */
        RecordViewComponent.prototype.SelectTypeUnselected;
        /** @type {?} */
        RecordViewComponent.prototype.showConditionalTemplateRunner;
        /** @type {?} */
        RecordViewComponent.prototype.editLabelModel;
        /**
         * @type {?}
         * @private
         */
        RecordViewComponent.prototype.subscribe;
        /** @type {?} */
        RecordViewComponent.prototype.svr;
        /** @type {?} */
        RecordViewComponent.prototype.ele;
        /**
         * @type {?}
         * @private
         */
        RecordViewComponent.prototype.prj;
        /** @type {?} */
        RecordViewComponent.prototype._clipboardService;
        /**
         * @type {?}
         * @private
         */
        RecordViewComponent.prototype.router;
        /**
         * @type {?}
         * @private
         */
        RecordViewComponent.prototype.eles;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ProcessComponent = /** @class */ (function () {
        function ProcessComponent() {
            this.buttonShowNum = 3;
            this.processClick = new core.EventEmitter();
        }
        /**
         * @return {?}
         */
        ProcessComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        ProcessComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-process',
                        template: "<button\n\t*ngFor=\"let pro of processes.slice(0, buttonShowNum)\"\n\tmat-icon-button\n\t[disabled]=\"!processStatus[pro.Name].Enabled\"\n\t[matTooltip]=\"pro.Name\"\n\t[color]=\"pro.Color\"\n\t(click)=\"processClick.emit(pro)\"\n>\n\t<mat-icon [svgIcon]=\"pro.Icon != '' ? pro.Icon : 'bookmark_border'\"> </mat-icon>\n</button>\n<button *ngIf=\"processes.length > buttonShowNum\" mat-icon-button [matMenuTriggerFor]=\"menuProcessMore\">\n\t<mat-icon svgIcon=\"more_vert\"> </mat-icon>\n</button>\n<mat-menu #menuProcessMore=\"matMenu\">\n\t<button\n\t\tmat-menu-item\n\t\t*ngFor=\"let pro of processes.slice(buttonShowNum)\"\n\t\t[disabled]=\"!processStatus[pro.Name].Enabled\"\n\t\t(click)=\"processClick.emit(pro)\"\n\t>\n\t\t<mat-icon [svgIcon]=\"pro.Icon != '' ? pro.Icon : 'bookmark_border'\"> </mat-icon>\n\t\t<span>{{ pro.Name }}</span>\n\t</button>\n</mat-menu>\n",
                        styles: [":host{padding:0;display:flex;align-content:center;justify-content:center;align-items:center}:host button{width:40px}"]
                    }] }
        ];
        /** @nocollapse */
        ProcessComponent.ctorParameters = function () { return []; };
        ProcessComponent.propDecorators = {
            buttonShowNum: [{ type: core.Input }],
            processes: [{ type: core.Input }],
            processStatus: [{ type: core.Input }],
            processClick: [{ type: core.Output }]
        };
        return ProcessComponent;
    }());
    if (false) {
        /** @type {?} */
        ProcessComponent.prototype.buttonShowNum;
        /** @type {?} */
        ProcessComponent.prototype.processes;
        /** @type {?} */
        ProcessComponent.prototype.processStatus;
        /** @type {?} */
        ProcessComponent.prototype.processClick;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var TableModule = /** @class */ (function () {
        function TableModule() {
        }
        TableModule.decorators = [
            { type: core.NgModule, args: [{
                        imports: [
                            common.CommonModule,
                            tooltip.MatTooltipModule,
                            menu.MatMenuModule,
                            sort.MatSortModule,
                            table.MatTableModule,
                            icon.MatIconModule,
                            button.MatButtonModule,
                            ngxClipboard.ClipboardModule,
                            select.MatSelectModule,
                            divider.MatDividerModule,
                            checkbox.MatCheckboxModule,
                            core$1.MatRippleModule
                        ],
                        exports: [TableComponent],
                        declarations: [TableComponent, ProcessComponent]
                    },] }
        ];
        return TableModule;
    }());

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ViewSelectorComponent = /** @class */ (function () {
        function ViewSelectorComponent(svr) {
            this.svr = svr;
            this.managerClick = new core.EventEmitter();
        }
        /**
         * @return {?}
         */
        ViewSelectorComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        /**
         * @param {?} val
         * @return {?}
         */
        ViewSelectorComponent.prototype.menuClick = /**
         * @param {?} val
         * @return {?}
         */
        function (val) {
            this.svr.data.selectedView = val;
            this.svr.refreshData().subscribe();
        };
        ViewSelectorComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-view-selector',
                        template: "<button mat-button [matMenuTriggerFor]=\"templateMenu\">\r\n\t<span class=\"\u663E\u793A\u5217\u6587\u5B57\" *ngIf=\"svr.data.selectedView; else viewElse\">{{ svr.data.selectedView.Name }}</span>\r\n\t<ng-template #viewElse>\r\n\t\t<span class=\"\u663E\u793A\u5217\u6587\u5B57\">\u663E\u793A\u5217</span>\r\n\t</ng-template>\r\n\t<mat-icon class=\"\u663E\u793A\u5217\u56FE\u6807\" svgIcon=\"view_module\"></mat-icon>\r\n</button>\r\n<mat-menu #templateMenu=\"matMenu\" overlapTrigger=\"true\">\r\n\t<button mat-menu-item *ngFor=\"let item of svr.data.constViewItems\" (click)=\"menuClick(item)\">\r\n\t\t<mat-icon *ngIf=\"svr.data.selectedView === item\" svgIcon=\"done\"> </mat-icon>\r\n\t\t{{ item.displayLabel() }}\r\n\t</button>\r\n\t<mat-divider></mat-divider>\r\n\t<div class=\"\u79C1\u6709\u83DC\u5355\u9879\">\r\n\t\t<button mat-menu-item *ngFor=\"let item of svr.data.viewList\" (click)=\"menuClick(item)\">\r\n\t\t\t<mat-icon *ngIf=\"svr.data.selectedView === item\" svgIcon=\"done\"> </mat-icon>\r\n\t\t\t{{ item.Name }}\r\n\t\t</button>\r\n\t</div>\r\n\t<mat-divider *ngIf=\"svr.data.viewList && svr.data.viewList.length > 0\"> </mat-divider>\r\n\t<button mat-menu-item (click)=\"managerClick.emit()\"><mat-icon svgIcon=\"settings\"></mat-icon>\u7BA1\u7406\u663E\u793A\u5217</button>\r\n</mat-menu>\r\n",
                        styles: ["@charset \"UTF-8\";.\u79C1\u6709\u83DC\u5355\u9879{max-height:200px;overflow-y:auto}.mat-menu-item{min-width:136px;height:40px;line-height:40px;padding:0 24px}.mat-menu-item .mat-icon{position:absolute;left:4px;top:12px}.mat-icon{width:16px;height:16px}.\u663E\u793A\u5217\u56FE\u6807{line-height:16px;vertical-align:middle;margin-left:8px}"]
                    }] }
        ];
        /** @nocollapse */
        ViewSelectorComponent.ctorParameters = function () { return [
            { type: ServiceService }
        ]; };
        ViewSelectorComponent.propDecorators = {
            managerClick: [{ type: core.Output }],
            selectedValue: [{ type: core.Input }],
            menuItems: [{ type: core.Input }]
        };
        return ViewSelectorComponent;
    }());
    if (false) {
        /** @type {?} */
        ViewSelectorComponent.prototype.managerClick;
        /** @type {?} */
        ViewSelectorComponent.prototype.selectedValue;
        /** @type {?} */
        ViewSelectorComponent.prototype.menuItems;
        /** @type {?} */
        ViewSelectorComponent.prototype.svr;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ViewSelectorModule = /** @class */ (function () {
        function ViewSelectorModule() {
        }
        ViewSelectorModule.decorators = [
            { type: core.NgModule, args: [{
                        declarations: [ViewSelectorComponent],
                        imports: [
                            material.MatChipsModule,
                            material.MatIconModule,
                            material.MatMenuModule,
                            material.MatTooltipModule,
                            material.MatDividerModule,
                            material.MatButtonModule,
                            common.CommonModule
                        ],
                        exports: [ViewSelectorComponent]
                    },] }
        ];
        return ViewSelectorModule;
    }());

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /**
     * @record
     */
    function IMovePosition() { }
    if (false) {
        /** @type {?} */
        IMovePosition.prototype.category;
        /** @type {?} */
        IMovePosition.prototype.label;
        /** @type {?} */
        IMovePosition.prototype.previousIndex;
        /** @type {?} */
        IMovePosition.prototype.currentIndex;
    }
    var CategoryForSelectComponent = /** @class */ (function () {
        function CategoryForSelectComponent(svr) {
            this.svr = svr;
            this.labelDisplay = false;
            this.hostClass = true;
        }
        /**
         * @return {?}
         */
        CategoryForSelectComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        /**
         * @param {?} label
         * @return {?}
         */
        CategoryForSelectComponent.prototype.click = /**
         * @param {?} label
         * @return {?}
         */
        function (label) {
            /** @type {?} */
            var idx = this.selectedLabels.findIndex((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.equal(label); }));
            if (idx > -1) {
                this.selectedLabels.splice(idx);
            }
            else {
                this.selectedLabels.push(label);
            }
        };
        /**
         * @param {?} event
         * @return {?}
         */
        CategoryForSelectComponent.prototype.drop = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            var _this = this;
            this.svr
                .setLabelPosition({
                CategoryID: this.category.ID,
                ID: this.category.Labels[event.previousIndex].ID,
                Position: event.currentIndex
            })
                .subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.category.setLabelsPosition(v.map((/**
                 * @param {?} vv
                 * @return {?}
                 */
                function (vv) { return vv.ID; })));
            }));
        };
        /**
         * @param {?} data
         * @return {?}
         */
        CategoryForSelectComponent.prototype.isSelected = /**
         * @param {?} data
         * @return {?}
         */
        function (data) {
            return this.selectedLabels.find((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.equal(data); })) !== undefined;
        };
        CategoryForSelectComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-category-for-select',
                        template: "<div class=\"title\">\r\n\t{{ category?.displayLabel() }}\r\n\t<mat-icon\r\n\t\t(click)=\"labelDisplay = !labelDisplay\"\r\n\t\tclass=\"\u663E\u793A\u9690\u85CF\u56FE\u6807\"\r\n\t\tsvgIcon=\"{{ labelDisplay ? 'expand_more' : 'expand_less' }}\"\r\n\t></mat-icon>\r\n</div>\r\n<div cdkDropList cdkDropListOrientation=\"horizontal\" [class.\u9690\u85CF]=\"labelDisplay\" (cdkDropListDropped)=\"drop($event)\">\r\n\t<div\r\n\t\t*ngFor=\"let label of category?.Labels\"\r\n\t\tclass=\"\u6807\u7B7E\"\r\n\t\tcdkDrag\r\n\t\t[class.selected]=\"isSelected(label)\"\r\n\t\t(click)=\"click(label)\"\r\n\t>\r\n\t\t{{ label?.displayLabel() }}\r\n\t\t<div *ngIf=\"isSelected(label)\" class=\"\u4E09\u89D2\u5F62\"></div>\r\n\t\t<mat-icon *ngIf=\"isSelected(label)\" class=\"\u9009\u4E2D\u6807\u7B7E\" svgIcon=\"done\"></mat-icon>\r\n\t</div>\r\n</div>\r\n",
                        styles: ["@charset \"UTF-8\";.title{font-size:12px;margin:8px 0 16px;display:flex;justify-content:space-between;align-items:center}.title .\u663E\u793A\u9690\u85CF\u56FE\u6807{cursor:pointer}.\u6807\u7B7E{font-size:14px;display:inline-block;margin:0 16px 16px 0;height:34px;padding:0 24px;border-radius:4px;line-height:34px;position:relative;cursor:pointer}.\u6807\u7B7E .\u4E09\u89D2\u5F62{position:absolute;bottom:0;right:0}.\u6807\u7B7E .\u9009\u4E2D\u6807\u7B7E{width:16px;height:16px;line-height:16px;color:#fff;position:absolute;bottom:0;right:0}.\u9690\u85CF{display:none}"]
                    }] }
        ];
        /** @nocollapse */
        CategoryForSelectComponent.ctorParameters = function () { return [
            { type: EleViewBackFaceService }
        ]; };
        CategoryForSelectComponent.propDecorators = {
            category: [{ type: core.Input }],
            selectedLabels: [{ type: core.Input }],
            hostClass: [{ type: core.HostBinding, args: ['class.category-for-select',] }]
        };
        return CategoryForSelectComponent;
    }());
    if (false) {
        /** @type {?} */
        CategoryForSelectComponent.prototype.category;
        /** @type {?} */
        CategoryForSelectComponent.prototype.selectedLabels;
        /** @type {?} */
        CategoryForSelectComponent.prototype.labelDisplay;
        /** @type {?} */
        CategoryForSelectComponent.prototype.hostClass;
        /**
         * @type {?}
         * @private
         */
        CategoryForSelectComponent.prototype.svr;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var LabelSelectComponent = /** @class */ (function () {
        function LabelSelectComponent(svr) {
            this.svr = svr;
            this.hostClass = true;
        }
        /**
         * @return {?}
         */
        LabelSelectComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.svr.fetchCategories({ EleName: this.eleName, OwnerBy: this.ownerBy, Owner: this.owner }).subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.categories = v;
            }));
        };
        LabelSelectComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-label-select',
                        template: "<div class=\"content\">\r\n\t<common-category-for-select *ngFor=\"let category of categories\"\r\n\t\t[category]=\"category\" [selectedLabels]=\"selectedLabels\">\r\n\t</common-category-for-select>\r\n</div>\r\n",
                        styles: ["@charset \"UTF-8\";:host{display:flex;flex-direction:column;width:618px;height:100%;box-sizing:border-box}.title{display:flex;padding:16px 16px 0 24px;justify-content:space-between}.title .edit{cursor:pointer}.title-label{font-size:18px;font-weight:700}.\u6807\u7B7E\u82AF\u7247{max-width:100%;padding:8px}.\u6807\u7B7E\u82AF\u7247 .mat-chip{width:90px;padding-right:24px;margin:4px;border-radius:4px;position:relative}.\u6807\u7B7E\u82AF\u7247 .mat-chip .\u6807\u7B7E{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block}.\u6807\u7B7E\u82AF\u7247 .mat-chip .\u5220\u9664\u6807\u7B7E{position:absolute;right:8px;top:8px}.\u6807\u7B7E\u82AF\u7247 .mat-icon{width:16px;height:16px}.footer{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:16px}.footer .footer-search{display:inline-block;height:24px;width:152px;line-height:24px;padding:0 24px 0 8px;border-radius:4px;font-size:12px;position:relative}.footer .footer-search input{height:24px}.footer .footer-search .mat-icon{position:absolute;top:0;right:0;margin:0}.content{flex-grow:1;overflow-y:auto;box-sizing:border-box}"]
                    }] }
        ];
        /** @nocollapse */
        LabelSelectComponent.ctorParameters = function () { return [
            { type: EleViewBackFaceService }
        ]; };
        LabelSelectComponent.propDecorators = {
            selectedLabels: [{ type: core.Input }],
            eleName: [{ type: core.Input }],
            ownerBy: [{ type: core.Input }],
            owner: [{ type: core.Input }],
            hostClass: [{ type: core.HostBinding, args: ['class.label-select',] }]
        };
        return LabelSelectComponent;
    }());
    if (false) {
        /** @type {?} */
        LabelSelectComponent.prototype.selectedLabels;
        /** @type {?} */
        LabelSelectComponent.prototype.eleName;
        /** @type {?} */
        LabelSelectComponent.prototype.ownerBy;
        /** @type {?} */
        LabelSelectComponent.prototype.owner;
        /** @type {?} */
        LabelSelectComponent.prototype.categories;
        /** @type {?} */
        LabelSelectComponent.prototype.hostClass;
        /**
         * @type {?}
         * @private
         */
        LabelSelectComponent.prototype.svr;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var LabelSelectModule = /** @class */ (function () {
        function LabelSelectModule() {
        }
        LabelSelectModule.decorators = [
            { type: core.NgModule, args: [{
                        declarations: [LabelSelectComponent, CategoryForSelectComponent],
                        imports: [common.CommonModule, material.MatIconModule],
                        exports: [LabelSelectComponent]
                    },] }
        ];
        return LabelSelectModule;
    }());

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ConditionalTemplateRunnerComponent = /** @class */ (function () {
        function ConditionalTemplateRunnerComponent(svr) {
            this.svr = svr;
            // 不起名conditional-template的原因是element中的设置界面,已经用了该名称
            this.hostClass = true;
            this.enterPress = new core.EventEmitter();
            this.typeInput = CTType.Input;
            this.typeSelect = CTType.Select;
            this.typeRangeInput = CTType.RangeInput;
            this.typeMultiSelect = CTType.MultiSelect;
            this.typeSilder = CTType.Slider;
        }
        /**
         * @return {?}
         */
        ConditionalTemplateRunnerComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        /**
         * @return {?}
         */
        ConditionalTemplateRunnerComponent.prototype.reset = /**
         * @return {?}
         */
        function () {
            this.svr.data.conditionalTemplates.forEach((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                v.Data.Value = undefined;
                v.enable = false;
            }));
        };
        ConditionalTemplateRunnerComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-conditional-template-runner',
                        template: "<div class=\"\u591A\u6761\u4EF6\u7B5B\u9009\">\r\n\t<div class=\"\u7B5B\u9009\u6761\u4EF6\"\r\n\t\t*ngFor=\"let item of svr.data.conditionalTemplates; let index = index\"\r\n\t\t[class.\u7B2C\u4E00\u4E2A\u6761\u4EF6]=\"index == 0\">\r\n\t\t<div class=\"\u6307\u6807\u540D\u79F0\">{{ item.Field }} <mat-icon svgIcon=\"undo\"\r\n\t\t\t\t*ngIf=\"item.enable\"\r\n\t\t\t\t(click)=\"item.Data.Value=undefined;item.enable=false\">\r\n\t\t\t</mat-icon>\r\n\t\t</div>\r\n\t\t<ng-container [ngSwitch]=\"item.Type\">\r\n\t\t\t<common-ct-runner-input *ngSwitchCase=\"typeInput\" [data]=\"item\"\r\n\t\t\t\t(enterPress)=\"enterPress.emit()\">\r\n\t\t\t</common-ct-runner-input>\r\n\t\t\t<common-ct-runner-range-input *ngSwitchCase=\"typeRangeInput\"\r\n\t\t\t\t[data]=\"item\"></common-ct-runner-range-input>\r\n\t\t\t<common-ct-runner-select *ngSwitchCase=\"typeSelect\" [data]=\"item\">\r\n\t\t\t</common-ct-runner-select>\r\n\t\t\t<common-ct-runner-multi-select *ngSwitchCase=\"typeMultiSelect\"\r\n\t\t\t\t[data]=\"item\"></common-ct-runner-multi-select>\r\n\t\t\t<common-ct-runner-silder *ngSwitchCase=\"typeSilder\" [data]=\"item\">\r\n\t\t\t</common-ct-runner-silder>\r\n\t\t</ng-container>\r\n\t</div>\r\n</div>\r\n<button class=\"\u91CD\u7F6E\" mat-stroked-button (click)=\"reset()\">\u91CD\u7F6E</button>",
                        styles: ["@charset \"UTF-8\";:host{display:block;width:100%;padding:24px 0 16px}.\u591A\u6761\u4EF6\u7B5B\u9009{max-height:360px;overflow-y:auto}.\u7B5B\u9009\u6761\u4EF6{width:100%;margin-top:24px;display:flex;align-items:center}.\u7B5B\u9009\u6761\u4EF6 .\u6307\u6807\u540D\u79F0{width:150px;text-align:left;padding:0 28px 0 32px;box-sizing:border-box;font-size:14px;display:-webkit-box;-webkit-line-clamp:2;overflow:hidden;position:relative}.\u7B5B\u9009\u6761\u4EF6 .\u6307\u6807\u540D\u79F0 .mat-icon{width:16px;height:16px;line-height:16px;position:absolute;right:8px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.\u7B2C\u4E00\u4E2A\u6761\u4EF6{margin-top:0}.\u91CD\u7F6E{width:48px;height:24px;line-height:24px;font-size:14px;margin:8px 32px 0}"]
                    }] }
        ];
        /** @nocollapse */
        ConditionalTemplateRunnerComponent.ctorParameters = function () { return [
            { type: ServiceService }
        ]; };
        ConditionalTemplateRunnerComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.conditional-template-runner',] }],
            enterPress: [{ type: core.Output }]
        };
        return ConditionalTemplateRunnerComponent;
    }());
    if (false) {
        /** @type {?} */
        ConditionalTemplateRunnerComponent.prototype.hostClass;
        /** @type {?} */
        ConditionalTemplateRunnerComponent.prototype.enterPress;
        /** @type {?} */
        ConditionalTemplateRunnerComponent.prototype.typeInput;
        /** @type {?} */
        ConditionalTemplateRunnerComponent.prototype.typeSelect;
        /** @type {?} */
        ConditionalTemplateRunnerComponent.prototype.typeRangeInput;
        /** @type {?} */
        ConditionalTemplateRunnerComponent.prototype.typeMultiSelect;
        /** @type {?} */
        ConditionalTemplateRunnerComponent.prototype.typeSilder;
        /** @type {?} */
        ConditionalTemplateRunnerComponent.prototype.svr;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var CtRunnerInputComponent = /** @class */ (function () {
        function CtRunnerInputComponent() {
            this.hostClass = true;
            this.enterPress = new core.EventEmitter();
        }
        /**
         * @return {?}
         */
        CtRunnerInputComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        CtRunnerInputComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-ct-runner-input',
                        template: "<mat-form-field appearance=\"outline\" *ngIf=\"data.Data\">\r\n\t<input matInput [(ngModel)]=\"data.Data.Value\"\r\n\t\t(ngModelChange)=\"data.enable = !!this.data.Data.Value\"\r\n\t\t(keyup.enter)=\"enterPress.emit()\" />\r\n</mat-form-field>",
                        styles: [".mat-form-field{max-width:336px;width:100%;font-size:12px}.mat-form-field ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:0;vertical-align:bottom;-webkit-transform:translateY(0);transform:translateY(0)}.mat-form-field ::ng-deep .mat-form-field-infix{border:0;font-size:14px;padding:10px 0;box-sizing:border-box}"]
                    }] }
        ];
        /** @nocollapse */
        CtRunnerInputComponent.ctorParameters = function () { return []; };
        CtRunnerInputComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.ct-runner-input',] }],
            data: [{ type: core.Input }],
            enterPress: [{ type: core.Output }]
        };
        return CtRunnerInputComponent;
    }());
    if (false) {
        /** @type {?} */
        CtRunnerInputComponent.prototype.hostClass;
        /** @type {?} */
        CtRunnerInputComponent.prototype.data;
        /** @type {?} */
        CtRunnerInputComponent.prototype.enterPress;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var CtRunnerSelectComponent = /** @class */ (function () {
        function CtRunnerSelectComponent() {
            this.hostClass = true;
        }
        Object.defineProperty(CtRunnerSelectComponent.prototype, "setting", {
            get: /**
             * @return {?}
             */
            function () {
                if (this.data) {
                    return (/** @type {?} */ (this.data.Setting));
                }
                return undefined;
            },
            enumerable: true,
            configurable: true
        });
        /**
         * @return {?}
         */
        CtRunnerSelectComponent.prototype.getValue = /**
         * @return {?}
         */
        function () {
            /** @type {?} */
            var v = (/** @type {?} */ (this.data.Data.Value));
            if (v) {
                return v.Value;
            }
            return undefined;
        };
        /**
         * @param {?} val
         * @return {?}
         */
        CtRunnerSelectComponent.prototype.setValue = /**
         * @param {?} val
         * @return {?}
         */
        function (val) {
            var _this = this;
            /** @type {?} */
            var mval = (/** @type {?} */ (this.data.Data.Value));
            if (!mval) {
                mval = (/** @type {?} */ ({}));
                this.data.Data.Value = mval;
            }
            mval.OtherOption = this.setting.OtherOption;
            mval.Options = this.setting.Options.filter((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.Value !== _this.setting.OtherOption; })).map((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.Value; }));
            mval.Value = val.value;
            this.data.enable = !!val.value;
        };
        /**
         * @return {?}
         */
        CtRunnerSelectComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        CtRunnerSelectComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-ct-runner-select',
                        template: "<mat-radio-group aria-label=\"Select an option\" [value]=\"getValue()\"\r\n\t(change)=\"setValue($event)\">\r\n\t<mat-radio-button *ngFor=\"let item of setting?.Options\" class=\"\u5355\u9009\"\r\n\t\t[class.\u9009\u4E2D]=\"data?.Data.Value == item.Value\" [value]=\"item.Value\">\r\n\t\t{{ item.Text }}</mat-radio-button>\r\n</mat-radio-group>",
                        styles: ["@charset \"UTF-8\";.\u5355\u9009{font-size:14px;margin-right:24px;line-height:24px}"]
                    }] }
        ];
        /** @nocollapse */
        CtRunnerSelectComponent.ctorParameters = function () { return []; };
        CtRunnerSelectComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.ct-runner-select',] }],
            data: [{ type: core.Input }]
        };
        return CtRunnerSelectComponent;
    }());
    if (false) {
        /** @type {?} */
        CtRunnerSelectComponent.prototype.hostClass;
        /** @type {?} */
        CtRunnerSelectComponent.prototype.data;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var CtRunnerMultiSelectComponent = /** @class */ (function () {
        function CtRunnerMultiSelectComponent() {
            this.hostClass = true;
        }
        Object.defineProperty(CtRunnerMultiSelectComponent.prototype, "setting", {
            get: /**
             * @return {?}
             */
            function () {
                if (this.data) {
                    return (/** @type {?} */ (this.data.Setting));
                }
                return undefined;
            },
            enumerable: true,
            configurable: true
        });
        /**
         * @param {?} val
         * @return {?}
         */
        CtRunnerMultiSelectComponent.prototype.getOptionCheck = /**
         * @param {?} val
         * @return {?}
         */
        function (val) {
            /** @type {?} */
            var mval = (/** @type {?} */ (this.data.Data.Value));
            if (mval && mval.Value) {
                return mval.Value.indexOf(val) > -1;
            }
            return false;
        };
        /**
         * @param {?} val
         * @param {?} check
         * @return {?}
         */
        CtRunnerMultiSelectComponent.prototype.setOptionCheck = /**
         * @param {?} val
         * @param {?} check
         * @return {?}
         */
        function (val, check) {
            var _this = this;
            /** @type {?} */
            var mval = (/** @type {?} */ (this.data.Data.Value));
            if (!mval) {
                mval = (/** @type {?} */ ({ Value: [] }));
                this.data.Data.Value = mval;
            }
            mval.OtherOption = this.setting.OtherOption;
            mval.Options = this.setting.Options.filter((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.Value !== _this.setting.OtherOption; })).map((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.Value; }));
            /** @type {?} */
            var arr = mval.Value;
            if (!arr) {
                arr = [];
                mval.Value = arr;
            }
            /** @type {?} */
            var idx = arr.indexOf(val);
            if (check && idx === -1) {
                arr.push(val);
            }
            if (!check && idx > -1) {
                arr.splice(idx, 1);
            }
            this.data.enable = arr && arr.length > 0;
        };
        /**
         * @return {?}
         */
        CtRunnerMultiSelectComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        CtRunnerMultiSelectComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-ct-runner-multi-select',
                        template: "<section>\r\n\t<mat-checkbox\r\n\t\tclass=\"\u591A\u9009\"\r\n\t\t[class.\u9009\u4E2D]=\"getOptionCheck(item.Value)\"\r\n\t\t*ngFor=\"let item of setting?.Options\"\r\n\t\t[checked]=\"getOptionCheck(item.Value)\"\r\n\t\t(change)=\"setOptionCheck(item.Value, $event.checked)\"\r\n\t\t>{{ item.Text }}\r\n\t</mat-checkbox>\r\n</section>\r\n",
                        styles: ["@charset \"UTF-8\";.\u591A\u9009{font-size:14px;margin-right:24px;line-height:24px}"]
                    }] }
        ];
        /** @nocollapse */
        CtRunnerMultiSelectComponent.ctorParameters = function () { return []; };
        CtRunnerMultiSelectComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.ct-runner-multi-select',] }],
            data: [{ type: core.Input }]
        };
        return CtRunnerMultiSelectComponent;
    }());
    if (false) {
        /** @type {?} */
        CtRunnerMultiSelectComponent.prototype.hostClass;
        /** @type {?} */
        CtRunnerMultiSelectComponent.prototype.data;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var CtRunnerRangeInputComponent = /** @class */ (function () {
        function CtRunnerRangeInputComponent() {
            this.hostClass = true;
        }
        /**
         * @return {?}
         */
        CtRunnerRangeInputComponent.prototype.getLowValue = /**
         * @return {?}
         */
        function () {
            /** @type {?} */
            var d = (/** @type {?} */ (this.data.Data.Value));
            if (d && d.LowValue) {
                return d.LowValue;
            }
            return '';
        };
        /**
         * @return {?}
         */
        CtRunnerRangeInputComponent.prototype.getHighValue = /**
         * @return {?}
         */
        function () {
            /** @type {?} */
            var d = (/** @type {?} */ (this.data.Data.Value));
            if (d && d.HighValue) {
                return d.HighValue;
            }
            return '';
        };
        /**
         * @param {?} val
         * @return {?}
         */
        CtRunnerRangeInputComponent.prototype.setLowValue = /**
         * @param {?} val
         * @return {?}
         */
        function (val) {
            /** @type {?} */
            var d = (/** @type {?} */ (this.data.Data.Value));
            if (!d) {
                d = (/** @type {?} */ ({}));
                this.data.Data.Value = d;
            }
            d.LowValue = val;
            this.data.enable = !!d.LowValue || !!d.HighValue;
        };
        /**
         * @param {?} val
         * @return {?}
         */
        CtRunnerRangeInputComponent.prototype.setHighValue = /**
         * @param {?} val
         * @return {?}
         */
        function (val) {
            /** @type {?} */
            var d = (/** @type {?} */ (this.data.Data.Value));
            if (!d) {
                d = (/** @type {?} */ ({}));
                this.data.Data.Value = d;
            }
            d.HighValue = val;
            this.data.enable = !!d.LowValue || !!d.HighValue;
        };
        /**
         * @return {?}
         */
        CtRunnerRangeInputComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        CtRunnerRangeInputComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-ct-runner-range-input',
                        template: "<mat-form-field appearance=\"outline\">\r\n\t<input matInput #lowValue [value]=\"getLowValue()\" (change)=\"setLowValue(lowValue.value)\" />\r\n</mat-form-field>\r\n-\r\n<mat-form-field appearance=\"outline\">\r\n\t<input matInput #highValue [value]=\"getHighValue()\" (change)=\"setHighValue(highValue.value)\" />\r\n</mat-form-field>\r\n<!-- <input #lowValue [value]=\"getLowValue()\" (change)=\"setLowValue(lowValue.value)\" />\r\n\r\n<input #highValue [value]=\"getHighValue()\" (change)=\"setHighValue(highValue.value)\" /> -->\r\n",
                        styles: [".mat-form-field{max-width:128px;width:100%;font-size:12px}.mat-form-field ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:0;vertical-align:bottom;-webkit-transform:translateY(0);transform:translateY(0)}.mat-form-field ::ng-deep .mat-form-field-infix{border:0;font-size:14px;padding:10px 0;box-sizing:border-box}"]
                    }] }
        ];
        /** @nocollapse */
        CtRunnerRangeInputComponent.ctorParameters = function () { return []; };
        CtRunnerRangeInputComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.ct-runner-range-input',] }],
            data: [{ type: core.Input }]
        };
        return CtRunnerRangeInputComponent;
    }());
    if (false) {
        /** @type {?} */
        CtRunnerRangeInputComponent.prototype.hostClass;
        /** @type {?} */
        CtRunnerRangeInputComponent.prototype.data;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var CtRunnerSilderComponent = /** @class */ (function () {
        function CtRunnerSilderComponent() {
            this.hostClass = true;
            this.options = SilderSetting.defaultOptions();
        }
        Object.defineProperty(CtRunnerSilderComponent.prototype, "data", {
            get: /**
             * @return {?}
             */
            function () {
                return this._data;
            },
            set: /**
             * @param {?} val
             * @return {?}
             */
            function (val) {
                this._data = val;
                this.options = new SilderSetting(this.setting).toOptions();
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(CtRunnerSilderComponent.prototype, "setting", {
            get: /**
             * @return {?}
             */
            function () {
                if (this.data) {
                    return (/** @type {?} */ (this.data.Setting));
                }
                return undefined;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(CtRunnerSilderComponent.prototype, "lowValue", {
            get: /**
             * @return {?}
             */
            function () {
                /** @type {?} */
                var r = (/** @type {?} */ (this.data.Data.Value));
                if (r) {
                    return r.LowValue;
                }
                return this.setting.Min;
            },
            set: /**
             * @param {?} val
             * @return {?}
             */
            function (val) {
                /** @type {?} */
                var r = (/** @type {?} */ (this.data.Data.Value));
                if (!r) {
                    r = (/** @type {?} */ ({}));
                    this.data.Data.Value = r;
                }
                if (this.setting.NegativeInfinity) {
                    r.NegativeInfinity = val === this.setting.Min;
                }
                if (!r.Ratio) {
                    r.Ratio = this.setting.Ratio;
                }
                r.LowValue = val;
                this.data.enable = r.LowValue !== this.setting.Min || r.HighValue !== this.setting.Min;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(CtRunnerSilderComponent.prototype, "highValue", {
            get: /**
             * @return {?}
             */
            function () {
                /** @type {?} */
                var r = (/** @type {?} */ (this.data.Data.Value));
                if (r) {
                    return r.HighValue;
                }
                return this.setting.Min;
            },
            set: /**
             * @param {?} val
             * @return {?}
             */
            function (val) {
                /** @type {?} */
                var r = (/** @type {?} */ (this.data.Data.Value));
                if (!r) {
                    r = (/** @type {?} */ ({}));
                    this.data.Data.Value = r;
                }
                if (this.setting.PositiveInfinity) {
                    r.PositiveInfinity = val === this.setting.Max;
                }
                if (!r.Ratio) {
                    r.Ratio = this.setting.Ratio;
                }
                // 这一句必须在最后,否则执行后会跳出函数,原因未知
                r.HighValue = val;
                this.data.enable = r.LowValue !== this.setting.Min || r.HighValue !== this.setting.Min;
            },
            enumerable: true,
            configurable: true
        });
        /**
         * @return {?}
         */
        CtRunnerSilderComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        CtRunnerSilderComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-ct-runner-silder',
                        template: "<div class=\"\u6ED1\u5757\u9009\u62E9\">\r\n\t<ng5-slider [(value)]=\"lowValue\" [(highValue)]=\"highValue\" [options]=\"options\"> </ng5-slider>\r\n</div>\r\n<div class=\"\u8303\u56F4\u8BBE\u7F6E\">\r\n\t<div class=\"\u8303\u56F4\u503C\">\r\n\t\t<span class=\"\u540D\u79F0\">\u8D77\u59CB\u503C</span>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<input matInput [(ngModel)]=\"lowValue\" />\r\n\t\t</mat-form-field>\r\n\t</div>\r\n\t<div class=\"\u8303\u56F4\u503C\">\r\n\t\t<span class=\"\u540D\u79F0\">\u7ED3\u675F\u503C</span>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<input matInput [(ngModel)]=\"highValue\" />\r\n\t\t</mat-form-field>\r\n\t</div>\r\n</div>\r\n<!-- \u4E0A\u9650:<input [(ngModel)]=\"lowValue\">\r\n\u4E0B\u9650:<input [(ngModel)]=\"highValue\"> -->\r\n",
                        styles: ["@charset \"UTF-8\";.\u6ED1\u5757\u9009\u62E9{max-width:338px;width:100%}::ng-deep .\u6ED1\u5757\u9009\u62E9 .ng5-slider .ng5-slider-bar{height:4px!important}::ng-deep .\u6ED1\u5757\u9009\u62E9 .ng5-slider .ng5-slider-selection{height:6px!important;-webkit-transform:translate(9px,-1px);transform:translate(9px,-1px)}::ng-deep .\u6ED1\u5757\u9009\u62E9 .ng5-slider .ng5-slider-pointer{width:14px;height:14px;top:-4px;border-radius:50%!important;-webkit-transform:translateX(9px);transform:translateX(9px)}::ng-deep .\u6ED1\u5757\u9009\u62E9 .ng5-slider .ng5-slider-pointer:after{width:12px;height:12px;top:1px;left:1px;border-radius:50%!important}::ng-deep .\u6ED1\u5757\u9009\u62E9 .ng5-slider .ng5-slider-pointer.ng5-slider-active:after{background-color:#fff}::ng-deep .\u6ED1\u5757\u9009\u62E9 .ng5-slider .ng5-slider-span{font-size:12px}::ng-deep .\u6ED1\u5757\u9009\u62E9 .ng5-slider .ng5-slider-model-high,::ng-deep .\u6ED1\u5757\u9009\u62E9 .ng5-slider .ng5-slider-model-value{-webkit-transform:translateX(9px);transform:translateX(9px)}.\u8303\u56F4\u8BBE\u7F6E{max-width:386px;width:100%;display:flex;justify-content:flex-start}.\u8303\u56F4\u8BBE\u7F6E .\u8303\u56F4\u503C{width:110px;margin:0 32px 0 0;display:flex}.\u8303\u56F4\u8BBE\u7F6E .\u8303\u56F4\u503C .\u540D\u79F0{font-size:12px;line-height:24px;margin-right:8px}.\u8303\u56F4\u8BBE\u7F6E .\u8303\u56F4\u503C .mat-form-field{max-width:64px;flex-grow:1}.\u8303\u56F4\u8BBE\u7F6E .\u8303\u56F4\u503C .mat-form-field ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:0;vertical-align:bottom;-webkit-transform:translateY(0);transform:translateY(0)}.\u8303\u56F4\u8BBE\u7F6E .\u8303\u56F4\u503C .mat-form-field ::ng-deep .mat-form-field-infix{border:0;font-size:14px;padding:8px 0;box-sizing:border-box}"]
                    }] }
        ];
        /** @nocollapse */
        CtRunnerSilderComponent.ctorParameters = function () { return []; };
        CtRunnerSilderComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.ct-runner-silder',] }],
            data: [{ type: core.Input }]
        };
        return CtRunnerSilderComponent;
    }());
    if (false) {
        /** @type {?} */
        CtRunnerSilderComponent.prototype.hostClass;
        /** @type {?} */
        CtRunnerSilderComponent.prototype._data;
        /** @type {?} */
        CtRunnerSilderComponent.prototype.options;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    // registerLoadedConfigEvent(CTRL_RECORDVIEW, () => getControllerRoutes(CTRL_RECORDVIEW, RecordViewComponent));
    var RecordViewInnerModule = /** @class */ (function () {
        function RecordViewInnerModule() {
        }
        RecordViewInnerModule.decorators = [
            { type: core.NgModule, args: [{
                        imports: [
                            common.CommonModule,
                            tooltip.MatTooltipModule,
                            menu.MatMenuModule,
                            icon.MatIconModule,
                            ngxClipboard.ClipboardModule,
                            button.MatButtonModule,
                            formField.MatFormFieldModule,
                            select.MatSelectModule,
                            divider.MatDividerModule,
                            input.MatInputModule,
                            checkbox.MatCheckboxModule,
                            core$1.MatRippleModule,
                            sidenav.MatSidenavModule,
                            chips.MatChipsModule,
                            tabs.MatTabsModule,
                            dialog.MatDialogModule,
                            dragDrop.DragDropModule,
                            forms.FormsModule,
                            TableModule,
                            card.MatCardModule,
                            gridList.MatGridListModule,
                            material.MatRadioModule,
                            LabelSelectorModule,
                            material.MatExpansionModule,
                            ViewSelectorModule,
                            material.MatSnackBarModule,
                            ViewDefineModule,
                            LabelSelectModule,
                            LabelManagerModule,
                            ng5Slider.Ng5SliderModule
                        ],
                        exports: [common.CommonModule, RecordViewComponent],
                        declarations: [
                            RecordViewComponent,
                            FooterToolbarComponent,
                            LabelDrawerComponent,
                            LabelDrawerForSelectComponent,
                            LabelDrawerForEditComponent,
                            ViewDrawerComponent,
                            ConditionalTemplateRunnerComponent,
                            CtRunnerInputComponent,
                            CtRunnerSelectComponent,
                            CtRunnerMultiSelectComponent,
                            CtRunnerRangeInputComponent,
                            CtRunnerSilderComponent
                        ],
                        schemas: [core.NO_ERRORS_SCHEMA]
                    },] }
        ];
        return RecordViewInnerModule;
    }());

    var _a;
    /** @type {?} */
    var indexElementName = 'index';
    /** @enum {string} */
    var CardType = {
        navigation: 'navigation',
        calendar: 'calendar',
        notice: 'notice',
        datalist: 'datalist',
        chart: 'chart',
    };
    /** @type {?} */
    var defaultCardSize = (_a = {},
        _a[CardType.navigation] = 'sm',
        _a[CardType.calendar] = 'sm',
        _a[CardType.notice] = 'sm',
        _a[CardType.datalist] = 'md',
        _a[CardType.chart] = 'sm',
        _a);
    /**
     * @record
     */
    function UserIndexCard() { }
    if (false) {
        /** @type {?} */
        UserIndexCard.prototype.Type;
        /** @type {?} */
        UserIndexCard.prototype.Size;
        /** @type {?} */
        UserIndexCard.prototype.Setting;
    }
    /**
     * @record
     */
    function UserIndexSetting() { }
    if (false) {
        /** @type {?} */
        UserIndexSetting.prototype.Layout;
        /** @type {?} */
        UserIndexSetting.prototype.Cards;
        /** @type {?} */
        UserIndexSetting.prototype.NavigationElements;
    }
    /**
     * @record
     */
    function BannerSetting() { }
    if (false) {
        /** @type {?} */
        BannerSetting.prototype.DefaultBannerImage;
        /** @type {?} */
        BannerSetting.prototype.Banners;
    }
    /**
     * @record
     */
    function UserDiary() { }
    if (false) {
        /** @type {?} */
        UserDiary.prototype.Day;
        /** @type {?} */
        UserDiary.prototype.Content;
    }
    /**
     * @record
     */
    function UserNotice() { }
    if (false) {
        /** @type {?} */
        UserNotice.prototype.ID;
        /** @type {?} */
        UserNotice.prototype.Title;
        /** @type {?} */
        UserNotice.prototype.Time;
        /** @type {?} */
        UserNotice.prototype.IsReaded;
        /** @type {?} */
        UserNotice.prototype.URL;
        /** @type {?} */
        UserNotice.prototype.Sign;
        /** @type {?} */
        UserNotice.prototype.FrontURL;
    }
    /**
     * @record
     */
    function FetchMyNoticeResult() { }
    if (false) {
        /** @type {?} */
        FetchMyNoticeResult.prototype.ElementForBrowseNotice;
        /** @type {?} */
        FetchMyNoticeResult.prototype.Data;
    }
    var IndexService = /** @class */ (function () {
        function IndexService(api, eles) {
            this.api = api;
            this.eles = eles;
            this.userSetting = (/** @type {?} */ ({}));
            this.inited = false; // 是否已经初始化完毕
        }
        /**
         * @private
         * @return {?}
         */
        IndexService.prototype.fetchIndexSetting = /**
         * @private
         * @return {?}
         */
        function () {
            return this.api.get(indexElementName, 'fetch-index-setting');
        };
        /**
         * @private
         * @param {?} param
         * @return {?}
         */
        IndexService.prototype.updateIndexSetting = /**
         * @private
         * @param {?} param
         * @return {?}
         */
        function (param) {
            return this.api.post(indexElementName, 'update-index-setting', param);
        };
        /**
         * @private
         * @return {?}
         */
        IndexService.prototype.fetchBanner = /**
         * @private
         * @return {?}
         */
        function () {
            return this.api.get(indexElementName, 'fetch-banner');
        };
        /**
         * @private
         * @return {?}
         */
        IndexService.prototype.fetchIndexUserDiary = /**
         * @private
         * @return {?}
         */
        function () {
            // 需要将后端传递过来的字符串转换成date类型
            return this.api.get(indexElementName, 'fetch-index-user-diary').pipe(operators.map((/**
             * @param {?} vals
             * @return {?}
             */
            function (vals) {
                return vals
                    ? vals.map((/**
                     * @param {?} v
                     * @return {?}
                     */
                    function (v) { return ({
                        Day: new Date(v.Day),
                        Content: v.Content
                        // tslint:disable-next-line: indent
                    }); }))
                    : [];
            })));
        };
        /**
         * @private
         * @param {?} day
         * @return {?}
         */
        IndexService.prototype.removeIndexUserDiary = /**
         * @private
         * @param {?} day
         * @return {?}
         */
        function (day) {
            return this.api.post(indexElementName, 'remove-index-user-diary', day);
        };
        /**
         * @private
         * @param {?} param
         * @return {?}
         */
        IndexService.prototype.updateIndexUserDiary = /**
         * @private
         * @param {?} param
         * @return {?}
         */
        function (param) {
            return this.api.post(indexElementName, 'update-index-user-diary', param);
        };
        /**
         * @private
         * @return {?}
         */
        IndexService.prototype.fetchMyNotice = /**
         * @private
         * @return {?}
         */
        function () {
            /**
             * @record
             */
            function IUserNotice() { }
            if (false) {
                /** @type {?} */
                IUserNotice.prototype.ID;
                /** @type {?} */
                IUserNotice.prototype.Title;
                /** @type {?} */
                IUserNotice.prototype.Time;
                /** @type {?} */
                IUserNotice.prototype.IsReaded;
                /** @type {?} */
                IUserNotice.prototype.URL;
                /** @type {?} */
                IUserNotice.prototype.Sign;
            }
            /**
             * @record
             */
            function IFetchMyNoticeResult() { }
            if (false) {
                /** @type {?} */
                IFetchMyNoticeResult.prototype.ElementForBrowseNotice;
                /** @type {?} */
                IFetchMyNoticeResult.prototype.Data;
            }
            return this.api.get(indexElementName, 'fetch-my-notice').pipe(operators.map((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                return ((/** @type {?} */ ({
                    ElementForBrowseNotice: v.ElementForBrowseNotice,
                    Data: v.Data.map((/**
                     * @param {?} sv
                     * @return {?}
                     */
                    function (sv) {
                        return ((/** @type {?} */ ({
                            ID: sv.ID,
                            Title: sv.Title,
                            Time: new Date(sv.Time),
                            IsReaded: sv.IsReaded,
                            URL: sv.URL,
                            Sign: sv.Sign
                        })));
                    }))
                })));
            })));
        };
        /**
         * @return {?}
         */
        IndexService.prototype.init = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.fetchIndexSetting().subscribe((/**
             * @param {?} data
             * @return {?}
             */
            function (data) {
                _this.userSetting = data || ((/** @type {?} */ ({})));
                // console.log('======', this.userSetting);
                _this.userSetting.Cards = _this.userSetting.Cards || [];
                _this.userSetting.Layout = _this.userSetting.Layout || 'auto';
                // console.log('------', this.userSetting.Layout);
                _this.userSetting.NavigationElements = _this.userSetting.NavigationElements || [];
                // 找不到的菜单项,或者是没有权限,需要去除
                _this.userSetting.NavigationElements = _this.userSetting.NavigationElements.filter((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) { return _this.eles.get(v); }));
                _this.inited = true;
            }));
            this.fetchBanner().subscribe((/**
             * @param {?} val
             * @return {?}
             */
            function (val) {
                _this.banner = val;
                _this.banner.DefaultBannerImage = dbwebCore.fullApiPath(_this.banner.DefaultBannerImage);
            }));
        };
        /**
         * @return {?}
         */
        IndexService.prototype.initCalendar = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.fetchIndexUserDiary().subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.userDiary = v;
            }));
        };
        /**
         * @return {?}
         */
        IndexService.prototype.initNotice = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.fetchMyNotice().subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.notice = v.Data;
                _this.eles.addElement(v.ElementForBrowseNotice);
                v.Data.forEach((/**
                 * @param {?} one
                 * @return {?}
                 */
                function (one) { return _this.eles.setURLSign(one.URL, one.Sign); }));
                // 然后才能计算前端url
                _this.notice.forEach((/**
                 * @param {?} one
                 * @return {?}
                 */
                function (one) {
                    one.FrontURL = _this.eles.frontElementURL(v.ElementForBrowseNotice.Name, one.URL);
                }));
            }));
        };
        /**
         * @param {?} day
         * @param {?} content
         * @return {?}
         */
        IndexService.prototype.updateUserDiary = /**
         * @param {?} day
         * @param {?} content
         * @return {?}
         */
        function (day, content) {
            var _this = this;
            return this.updateIndexUserDiary({ Day: day, Content: content }).pipe(operators.tap((/**
             * @return {?}
             */
            function () {
                /** @type {?} */
                var found = _this.userDiary.find((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) { return v.Day.getTime() === day.getTime(); }));
                if (found) {
                    found.Content = content;
                }
                else {
                    _this.userDiary.push({ Day: day, Content: content });
                    _this.userDiary.sort((/**
                     * @param {?} a
                     * @param {?} b
                     * @return {?}
                     */
                    function (a, b) {
                        return a.Day.getTime() - b.Day.getTime();
                    }));
                }
            })));
        };
        /**
         * @param {?} day
         * @return {?}
         */
        IndexService.prototype.removeUserDiary = /**
         * @param {?} day
         * @return {?}
         */
        function (day) {
            var _this = this;
            return this.removeIndexUserDiary(day).pipe(operators.tap((/**
             * @return {?}
             */
            function () {
                _this.userDiary.splice(_this.userDiary.findIndex((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) { return v.Day.getTime() === day.getTime(); })), 1);
            })));
        };
        /**
         * @return {?}
         */
        IndexService.prototype.updateSetting = /**
         * @return {?}
         */
        function () {
            return this.updateIndexSetting(this.userSetting);
        };
        IndexService.decorators = [
            { type: core.Injectable, args: [{ providedIn: 'root' },] }
        ];
        /** @nocollapse */
        IndexService.ctorParameters = function () { return [
            { type: dbwebCore.ElementApiService },
            { type: dbwebCore.ElementsService }
        ]; };
        /** @nocollapse */ IndexService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function IndexService_Factory() { return new IndexService(core.ɵɵinject(dbwebCore.ElementApiService), core.ɵɵinject(dbwebCore.ElementsService)); }, token: IndexService, providedIn: "root" });
        return IndexService;
    }());
    if (false) {
        /** @type {?} */
        IndexService.prototype.userSetting;
        /** @type {?} */
        IndexService.prototype.banner;
        /** @type {?} */
        IndexService.prototype.userDiary;
        /** @type {?} */
        IndexService.prototype.notice;
        /** @type {?} */
        IndexService.prototype.inited;
        /**
         * @type {?}
         * @private
         */
        IndexService.prototype.api;
        /**
         * @type {?}
         * @private
         */
        IndexService.prototype.eles;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var BannerComponent = /** @class */ (function () {
        function BannerComponent(svr) {
            this.svr = svr;
            this.hostClass = true;
        }
        /**
         * @return {?}
         */
        BannerComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        BannerComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-banner',
                        template: "<div class=\"banner-all\">\r\n\t<ng-container *ngIf=\"svr.banner?.Banners?.length > 0; else default\">\r\n\t\t<a class=\"\u94FE\u63A5\" *ngFor=\"let b of svr.banner.Banners\" [href]=\"b.NavigationURL\" target=\"_blank\"\r\n\t\t\t><img [src]=\"b.ImageURL\"\r\n\t\t/></a>\r\n\t</ng-container>\r\n\t<ng-template #default>\r\n\t\t<img class=\"banner-img \" [src]=\"svr.banner?.DefaultBannerImage\" *ngIf=\"svr.banner?.DefaultBannerImage\" />\r\n\t</ng-template>\r\n</div>\r\n",
                        styles: ["@charset \"UTF-8\";.banner-all{height:100%;overflow:hidden;position:relative;border-radius:4px;box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}.banner-img{height:100%;position:absolute;left:50%;top:0;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.\u94FE\u63A5{width:100%;height:100%;position:relative}.\u94FE\u63A5 img{height:100%;position:absolute;left:50%;top:0;-webkit-transform:translateX(-50%);transform:translateX(-50%)}"]
                    }] }
        ];
        /** @nocollapse */
        BannerComponent.ctorParameters = function () { return [
            { type: IndexService }
        ]; };
        BannerComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.c-index-banner',] }]
        };
        return BannerComponent;
    }());
    if (false) {
        /** @type {?} */
        BannerComponent.prototype.hostClass;
        /** @type {?} */
        BannerComponent.prototype.svr;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var CustomDateFormatter = /** @class */ (function (_super) {
        __extends(CustomDateFormatter, _super);
        function CustomDateFormatter() {
            return _super !== null && _super.apply(this, arguments) || this;
        }
        /**
         * @param {?} __0
         * @return {?}
         */
        CustomDateFormatter.prototype.monthViewColumnHeader = /**
         * @param {?} __0
         * @return {?}
         */
        function (_a) {
            var date = _a.date, locale = _a.locale;
            // console.log(formatDate(date, 'EEEEE', locale));
            // switch (date.getDay()) {
            // 	case 0:
            // 		return 'S';
            // 		break;
            // 	case 1:
            // 		return 'M';
            // 		break;
            // 	case 2:
            // 		return 'T';
            // 		break;
            // 	case 3:
            // 		return 'W';
            // 		break;
            // 	case 4:
            // 		return 'T';
            // 		break;
            // 	case 5:
            // 		return 'F';
            // 		break;
            // 	case 6:
            // 		return 'S';
            // 		break;
            // }
            return common.formatDate(date, 'EEEEE', locale); // use short week days
        };
        return CustomDateFormatter;
    }(angularCalendar.CalendarDateFormatter));
    var CalendarComponent = /** @class */ (function () {
        function CalendarComponent(svr) {
            var _this = this;
            this.svr = svr;
            this.hostClass = true;
            this.navName = 'calendar';
            this.view = angularCalendar.CalendarView.Month;
            this.viewDate = new Date();
            this.isEdit = false;
            this.activeDayIsOpen = true;
            this.showDayHint = false;
            this.navSize = this.svr.userSetting.Cards.find((/**
             * @param {?} x
             * @return {?}
             */
            function (x) { return x.Type === _this.navName; })).Size;
            // console.log(this.navSize);
        }
        /**
         * @return {?}
         */
        CalendarComponent.prototype.closeShowDayHint = /**
         * @return {?}
         */
        function () {
            this.showDayHint = false;
        };
        Object.defineProperty(CalendarComponent.prototype, "events", {
            get: /**
             * @return {?}
             */
            function () {
                if (this.svr.userDiary) {
                    return this.svr.userDiary.map((/**
                     * @param {?} v
                     * @return {?}
                     */
                    function (v) { return ({
                        start: new Date(v.Day),
                        title: v.Content
                    }); }));
                }
                return [];
            },
            enumerable: true,
            configurable: true
        });
        /**
         * @param {?} action
         * @param {?} event
         * @return {?}
         */
        CalendarComponent.prototype.handleEvent = /**
         * @param {?} action
         * @param {?} event
         * @return {?}
         */
        function (action, event) {
            // 111;
            console.log(action, event);
        };
        /**
         * @return {?}
         */
        CalendarComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            this.svr.initCalendar();
        };
        // ↓单击日期时
        // ↓单击日期时
        /**
         * @param {?} event
         * @return {?}
         */
        CalendarComponent.prototype.dayClick = 
        // ↓单击日期时
        /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            // console.log((event.sourceEvent.target as HTMLElement).getBoundingClientRect());
            this.showDay = event.day;
            this.isEdit = !this.showDay.isPast && this.showDay.events.length === 0;
            this.showDayHint = true; // 日期备注是否显示
            // 日期备注是否显示
            // ↓ 获取备注信息栏的坐标(即 点击元素在屏幕中的位置)
            /** @type {?} */
            var posCircle = ((/** @type {?} */ (event.sourceEvent.target))).getBoundingClientRect();
            /** @type {?} */
            var distanceWidth = posCircle.width;
            /** @type {?} */
            var distanceRight = posCircle.right;
            // 如果右侧距离不够,则往选择左侧显示
            if (window.innerWidth - distanceRight < 320) {
                this.disX = posCircle.left - 320 + 32;
            }
            else {
                this.disX = posCircle.left + distanceWidth - 32;
            }
            this.disY = posCircle.bottom;
            if (event.day.events && event.day.events.length > 0) {
                this.editText = event.day.events[0].title;
            }
            else {
                this.editText = '';
            }
            // console.log((this.innerWidth = window.innerWidth));
            // console.log('showDay:', this.showDay);
            // console.log('---');
            // console.log('showDay:', this.showDay.isPast);
        };
        /**
         * @return {?}
         */
        CalendarComponent.prototype.editOk = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.svr.updateUserDiary(this.showDay.date, this.editText).subscribe((/**
             * @return {?}
             */
            function () {
                _this.showDayHint = false;
            }));
        };
        /**
         * @return {?}
         */
        CalendarComponent.prototype.editCancel = /**
         * @return {?}
         */
        function () {
            this.editText === '' ? (this.showDayHint = false) : (this.isEdit = false);
        };
        /**
         * @return {?}
         */
        CalendarComponent.prototype.removeEvents = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.svr.removeUserDiary(this.showDay.date).subscribe((/**
             * @return {?}
             */
            function () {
                _this.showDayHint = false;
            }));
        };
        CalendarComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-calendar',
                        template: "<div class=\"calendar-main mat-elevation-z2\">\r\n\t<div class=\"main-title\">\r\n\t\t<div class=\"title-left\">\r\n\t\t\t<mat-icon svgIcon=\"date_range\"></mat-icon>\r\n\t\t\t<span>\u65E5\u7A0B\u5B89\u6392</span>\r\n\t\t</div>\r\n\r\n\t\t<div class=\"title-right\">\r\n\t\t\t<common-more-vert [typeName]=\"navName\" [theNavSize]=\"navSize\">\r\n\t\t\t</common-more-vert>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class=\"cal-title\">\r\n\t\t<button mat-button color=\"primary\" class=\"btn btn-primary\"\r\n\t\t\tmwlCalendarPreviousView [view]=\"view\" [(viewDate)]=\"viewDate\">\r\n\t\t\t<mat-icon svgIcon=\"keyboard_arrow_left\"></mat-icon>\r\n\t\t</button>\r\n\t\t<div class=\"title-text\">\r\n\t\t\t{{ this.viewDate|date:'yyyy\u5E74MM\u6708'}}\r\n\t\t\t<!-- {{ viewDate | calendarDate:(view + 'ViewTitle'):'en' }} -->\r\n\t\t</div>\r\n\t\t<button mat-button color=\"primary\" class=\"btn btn-primary\"\r\n\t\t\tmwlCalendarNextView [view]=\"view\" [(viewDate)]=\"viewDate\">\r\n\t\t\t<mat-icon svgIcon=\"keyboard_arrow_right\"></mat-icon>\r\n\t\t</button>\r\n\t</div>\r\n\t<div class=\"dateCal\">\r\n\t\t<mwl-calendar-month-view [viewDate]=\"viewDate\" [events]=\"events\"\r\n\t\t\t[cellTemplate]=\"customCellTemplate\" (dayClicked)=\"dayClick($event)\">\r\n\t\t</mwl-calendar-month-view>\r\n\t</div>\r\n\t<ng-template #customCellTemplate let-day=\"day\" let-locale=\"locale\">\r\n\t\t<div class=\"per-day\">\r\n\t\t\t<div class=\"per-day-cricle\"\r\n\t\t\t\t[ngClass]=\"{'active':showDay?.date?.getTime() === day.date.getTime()}\">\r\n\t\t\t\t{{ day.date | calendarDate:'monthViewDayNumber':locale }}\r\n\t\t\t\t<mat-icon class=\"icon-circle\" svgIcon=\"fiber_manual_record\"\r\n\t\t\t\t\t*ngIf=\"day.badgeTotal>0\"></mat-icon>\r\n\t\t\t\t<!-- \u7B49\u4F1A\u63D2\u5165 -->\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n\t</ng-template>\r\n\r\n\r\n\t<div class=\"show-day mat-elevation-z2\"\r\n\t\t[ngStyle]=\"{'left.px': disX, 'top.px': disY}\" *ngIf=\"showDayHint\"\r\n\t\t(click)=\"$event.stopPropagation()\">\r\n\t\t<div *ngIf=\"isEdit;else readonly\" class=\"is-edit\">\r\n\t\t\t<div class=\"edit-title\">\r\n\t\t\t\t<b class=\"edit-left\">\r\n\t\t\t\t\t{{showDay.date|date:'yyyy.MM.dd'}}\r\n\t\t\t\t</b>\r\n\t\t\t\t<div class=\"edit-right\">\r\n\t\t\t\t\t<button mat-button>\r\n\t\t\t\t\t\t<mat-icon svgIcon=\"clear\" (click)=\"editCancel()\">\r\n\t\t\t\t\t\t</mat-icon>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t\t<button color=\"primary\" mat-button>\r\n\t\t\t\t\t\t<mat-icon svgIcon=\"check\" (click)=\"editOk()\"></mat-icon>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<textarea class=\"area\" matInput [(ngModel)]=\"editText\"></textarea>\r\n\t\t</div>\r\n\t\t<ng-template #readonly>\r\n\t\t\t<div class=\"is-read-only\">\r\n\t\t\t\t<div class=\"edit-title\">\r\n\t\t\t\t\t<b class=\"read-only-left\">\r\n\t\t\t\t\t\t{{showDay.date|date:'yyyy.MM.dd'}}\r\n\t\t\t\t\t</b>\r\n\t\t\t\t\t<div class=\"read-only-right\">\r\n\t\t\t\t\t\t<button mat-button (click)=\"removeEvents()\">\r\n\t\t\t\t\t\t\t<mat-icon svgIcon=\"delete_outline\"></mat-icon>\r\n\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t<button color=\"primary\" [disabled]=\"showDay.isPast\"\r\n\t\t\t\t\t\t\tmat-button (click)=\"isEdit=true\">\r\n\t\t\t\t\t\t\t<mat-icon svgIcon=\"create\"></mat-icon>\r\n\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t<button mat-button (click)=\"showDayHint=false\">\r\n\t\t\t\t\t\t\t<mat-icon svgIcon=\"cancel\"></mat-icon>\r\n\t\t\t\t\t\t</button>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"area\">{{showDay?.events[0]?.title}}</div>\r\n\t\t\t</div>\r\n\t\t</ng-template>\r\n\t</div>\r\n\r\n\r\n</div>",
                        providers: [
                            {
                                provide: angularCalendar.CalendarDateFormatter,
                                useClass: CustomDateFormatter
                            }
                        ],
                        styles: [".calendar-main{width:100%;height:100%;box-sizing:border-box;padding:8px;border-radius:4px}.main-title{display:flex;justify-content:space-between;align-items:center;width:100%;height:24px;box-sizing:border-box;margin-bottom:4px;color:#72aac9}.main-title .title-left,.main-title .title-right{align-items:center}.main-title .title-left{display:flex;align-items:center}.main-title .title-left span{margin-left:8px}.main-title .title-right{display:none}.calendar-main:hover .title-right{display:flex}.cal-title{display:flex;justify-content:space-between;width:100%;height:34px;line-height:34px;box-sizing:border-box}.cal-title .btn{display:flex;align-items:center;height:34px;line-height:34px}.dateCal{width:100%;height:195px;box-sizing:border-box;padding-left:8px;padding-right:8px;font-size:12px;overflow:auto}.per-day{position:relative;display:flex;justify-content:center;height:30px;line-height:30px;cursor:pointer}.per-day-cricle{position:relative;width:100%;max-width:30px;min-width:22px;height:30px;line-height:30px;box-sizing:border-box;border-radius:17px}.icon-circle{position:absolute;right:0;top:0;margin-top:-12px;width:8px;height:8px}.show-day{position:absolute;width:320px;height:184px;box-sizing:border-box;padding:0 8px 8px 12px;border-radius:4px;z-index:999}.active .show-day{display:block}.edit-title{display:flex;justify-content:space-between;align-items:center;flex-wrap:nowrap;width:100%;height:40px;font-size:18px}.edit-title button{width:40px;height:40px}.area{width:100%;height:136px;box-sizing:border-box}"]
                    }] }
        ];
        /** @nocollapse */
        CalendarComponent.ctorParameters = function () { return [
            { type: IndexService }
        ]; };
        CalendarComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.c-index-calendar',] }],
            closeShowDayHint: [{ type: core.HostListener, args: ['document:click',] }]
        };
        return CalendarComponent;
    }());
    if (false) {
        /** @type {?} */
        CalendarComponent.prototype.hostClass;
        /** @type {?} */
        CalendarComponent.prototype.navName;
        /** @type {?} */
        CalendarComponent.prototype.navSize;
        /** @type {?} */
        CalendarComponent.prototype.view;
        /** @type {?} */
        CalendarComponent.prototype.viewDate;
        /** @type {?} */
        CalendarComponent.prototype.innerWidth;
        /** @type {?} */
        CalendarComponent.prototype.modalData;
        /** @type {?} */
        CalendarComponent.prototype.showDay;
        /** @type {?} */
        CalendarComponent.prototype.isEdit;
        /** @type {?} */
        CalendarComponent.prototype.activeDayIsOpen;
        /** @type {?} */
        CalendarComponent.prototype.editText;
        /** @type {?} */
        CalendarComponent.prototype.disX;
        /** @type {?} */
        CalendarComponent.prototype.disY;
        /** @type {?} */
        CalendarComponent.prototype.showDayHint;
        /** @type {?} */
        CalendarComponent.prototype.isEventsEmpty;
        /** @type {?} */
        CalendarComponent.prototype.svr;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ChartComponent = /** @class */ (function () {
        function ChartComponent(svr) {
            var _this = this;
            this.svr = svr;
            this.navName = 'chart';
            this.navSize = this.svr.userSetting.Cards.find((/**
             * @param {?} x
             * @return {?}
             */
            function (x) { return x.Type === _this.navName; })).Size;
            console.log(this.navSize);
        }
        /**
         * @return {?}
         */
        ChartComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        ChartComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-chart',
                        template: "<p>chart works!</p>\r\n\r\n\r\n",
                        styles: [""]
                    }] }
        ];
        /** @nocollapse */
        ChartComponent.ctorParameters = function () { return [
            { type: IndexService }
        ]; };
        return ChartComponent;
    }());
    if (false) {
        /** @type {?} */
        ChartComponent.prototype.navSize;
        /** @type {?} */
        ChartComponent.prototype.navName;
        /** @type {?} */
        ChartComponent.prototype.svr;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /**
     * @record
     */
    function PeriodicElement() { }
    if (false) {
        /** @type {?} */
        PeriodicElement.prototype.uid;
        /** @type {?} */
        PeriodicElement.prototype.name;
        /** @type {?} */
        PeriodicElement.prototype.portrait;
        /** @type {?} */
        PeriodicElement.prototype.address;
        /** @type {?} */
        PeriodicElement.prototype.code;
        /** @type {?} */
        PeriodicElement.prototype.phone;
        /** @type {?} */
        PeriodicElement.prototype.duty;
        /** @type {?} */
        PeriodicElement.prototype.remark;
    }
    /** @type {?} */
    var ELEMENT_DATA = [
        {
            uid: 1,
            name: 'Jon',
            portrait: '/front/assets/userinfo/portrait_default.png',
            address: '杭州西湖区杭州西湖区杭州西湖区杭州西湖区杭州西湖区杭州西湖区',
            code: 'G2H636W',
            phone: 25692615,
            duty: '部长',
            remark: '111111111'
        },
        {
            uid: 2,
            name: 'TUDM',
            portrait: '/front/assets/userinfo/portrait_default.png',
            address: '杭州余杭区杭州余杭区杭州余杭区',
            code: 'G2H636W',
            phone: 25692615,
            duty: '组长',
            remark: '555555'
        },
        {
            uid: 3,
            name: 'MMMM',
            portrait: '/front/assets/userinfo/portrait_default.png',
            address: '杭州余杭区杭州余杭区杭州余杭区',
            code: 'G2H636W',
            phone: 25692625,
            duty: '组长',
            remark: '备注'
        },
        {
            uid: 1,
            name: 'Jon',
            portrait: '/front/assets/userinfo/portrait_default.png',
            address: '杭州西湖区杭州西湖区杭州西湖区',
            code: 'G2H636W',
            phone: 25692615,
            duty: '部长',
            remark: '备注'
        },
        {
            uid: 2,
            name: 'TUDM',
            portrait: '/front/assets/userinfo/portrait_default.png',
            address: '杭州余杭区杭州余杭区杭州余杭区',
            code: 'G2H636W',
            phone: 25692615,
            duty: '组长',
            remark: '备注'
        },
        {
            uid: 3,
            name: 'MMMM',
            portrait: '/front/assets/userinfo/portrait_default.png',
            address: '杭州余杭区杭州余杭区杭州余杭区',
            code: 'G2H636W',
            phone: 25692625,
            duty: '组长',
            remark: '备注'
        }
    ];
    var DataListComponent = /** @class */ (function () {
        function DataListComponent(svr) {
            var _this = this;
            this.svr = svr;
            this.hostClass = true;
            this.navName = 'datalist';
            this.displayedColumns = ['id', 'name', 'portrait', 'address', 'code', 'phone', 'duty', 'remark'];
            this.dataSource = ELEMENT_DATA;
            this.navSize = this.svr.userSetting.Cards.find((/**
             * @param {?} x
             * @return {?}
             */
            function (x) { return x.Type === _this.navName; })).Size;
        }
        /**
         * @return {?}
         */
        DataListComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        DataListComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-data-list',
                        template: "<section class=\"index-data-main mat-elevation-z2\">\r\n\t<header class=\"data-title\">\r\n\t\t<div class=\"title-left\">\r\n\t\t\t<mat-icon svgIcon=\"dns\"></mat-icon>\r\n\t\t\t<span>\u5FEB\u901F\u67E5\u770B</span>\r\n\t\t</div>\r\n\t\t<div class=\"title-right\">\r\n\t\t\t<common-more-vert [typeName]=\"navName\" [theNavSize]=\"navSize\">\r\n\t\t\t</common-more-vert>\r\n\t\t</div>\r\n\t</header>\r\n\t<section class=\"data-box\">\r\n\t\t<table mat-table [dataSource]=\"dataSource\">\r\n\t\t\t<ng-container matColumnDef=\"id\">\r\n\t\t\t\t<th mat-header-cell *matHeaderCellDef>ID</th>\r\n\t\t\t\t<td mat-cell *matCellDef=\"let i = index\">{{i+1}}</td>\r\n\t\t\t</ng-container>\r\n\t\t\t<ng-container matColumnDef=\"name\">\r\n\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u6635\u79F0</th>\r\n\t\t\t\t<td mat-cell *matCellDef=\"let element\">{{element.name}}</td>\r\n\t\t\t</ng-container>\r\n\t\t\t<ng-container matColumnDef=\"portrait\">\r\n\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u5934\u50CF</th>\r\n\t\t\t\t<td mat-cell *matCellDef=\"let element\">\r\n\t\t\t\t\t<div class=\"head-image\"><img [src]=\"element.portrait\" alt=\"\"></div>\r\n\t\t\t\t</td>\r\n\t\t\t</ng-container>\r\n\t\t\t<ng-container matColumnDef=\"address\">\r\n\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u8BE6\u7EC6\u5730\u5740</th>\r\n\t\t\t\t<td mat-cell *matCellDef=\"let element\">{{element.address}}</td>\r\n\t\t\t</ng-container>\r\n\t\t\t<ng-container matColumnDef=\"code\">\r\n\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u8054\u7CFB\u4EE3\u7801</th>\r\n\t\t\t\t<td mat-cell *matCellDef=\"let element\">{{element.code }}</td>\r\n\t\t\t</ng-container>\r\n\t\t\t<ng-container matColumnDef=\"phone\">\r\n\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u7535\u8BDD</th>\r\n\t\t\t\t<td mat-cell *matCellDef=\"let element\">{{element.phone}}</td>\r\n\t\t\t</ng-container>\r\n\t\t\t<ng-container matColumnDef=\"duty\">\r\n\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u804C\u52A1</th>\r\n\t\t\t\t<td mat-cell *matCellDef=\"let element\">{{element.duty}}</td>\r\n\t\t\t</ng-container>\r\n\t\t\t<ng-container matColumnDef=\"remark\">\r\n\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u5907\u6CE8</th>\r\n\t\t\t\t<td mat-cell *matCellDef=\"let element\">{{element.remark}}</td>\r\n\t\t\t</ng-container>\r\n\t\t\t<tr mat-header-row *matHeaderRowDef=\"displayedColumns;sticky:true\"></tr>\r\n\t\t\t<tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\r\n\t\t</table>\r\n\t</section>\r\n</section>",
                        styles: [".index-data-main{position:relative;width:100%;height:100%;box-sizing:border-box;padding:8px;border-radius:4px}.data-title{display:flex;justify-content:space-between;align-items:center;width:100%;height:24px;box-sizing:border-box;margin-bottom:16px;color:#9d66c6}.data-title span{padding-left:8px;font:16px bold}.title-left{display:flex;align-items:center}.title-right{display:none}.index-data-main:hover .title-right{display:flex}.data-box{width:100%;height:220px;box-sizing:border-box;padding-left:8px;padding-right:8px;overflow:auto;flex-grow:1;overflow-y:auto}.data-box table{width:100%;white-space:nowrap}.head-image{width:40px;height:40px;box-sizing:border-box;padding:4px}.head-image img{width:100%;height:100%;border-radius:20px}"]
                    }] }
        ];
        /** @nocollapse */
        DataListComponent.ctorParameters = function () { return [
            { type: IndexService }
        ]; };
        DataListComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.c-index-data-list',] }]
        };
        return DataListComponent;
    }());
    if (false) {
        /** @type {?} */
        DataListComponent.prototype.hostClass;
        /** @type {?} */
        DataListComponent.prototype.navName;
        /** @type {?} */
        DataListComponent.prototype.navSize;
        /** @type {?} */
        DataListComponent.prototype.displayedColumns;
        /** @type {?} */
        DataListComponent.prototype.dataSource;
        /** @type {?} */
        DataListComponent.prototype.svr;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var IndexComponent = /** @class */ (function () {
        function IndexComponent(svr, iconRegistry, sanitizer) {
            this.svr = svr;
            this.iconRegistry = iconRegistry;
            this.sanitizer = sanitizer;
            // class前加c-,防止重名
            this.hostClass = true;
            this.svr.init();
            /** @type {?} */
            var icons = ['arrow_expand'];
            icons.forEach((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                iconRegistry.addSvgIcon(v, sanitizer.bypassSecurityTrustResourceUrl('assets/index/icon/' + v + '.svg'));
            }));
        }
        /**
         * @return {?}
         */
        IndexComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        /**
         * @return {?}
         */
        IndexComponent.prototype.test = /**
         * @return {?}
         */
        function () {
            console.log(this.svr.userSetting.Layout);
        };
        IndexComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-index',
                        template: "<div class=\"index-main\" *ngIf=\"svr.inited\">\r\n\t<div class=\"main-wrapper\" [ngClass]=\"'layout-'+svr.userSetting.Layout\">\r\n\t\t<!-- \u25BD 1. \u7B2C\u4E00\u884C\u9ED8\u8BA4\u884C welcome && banner \u25BD -->\r\n\t\t<div class=\"list-1 default-row\">\r\n\t\t\t<common-welcome></common-welcome>\r\n\t\t</div>\r\n\t\t<div class=\"list-2 default-row\">\r\n\t\t\t<common-banner></common-banner>\r\n\t\t</div>\r\n\t\t<!-- \u25BD 2. \u81EA\u5B9A\u4E49\u5E03\u5C40\u90E8\u5206 \u25BD -->\r\n\t\t<ng-container *ngFor=\"let card of svr.userSetting.Cards\"\r\n\t\t\t[ngSwitch]=\"card.Type\">\r\n\t\t\t<div class=\"defined-row\"\r\n\t\t\t\t[ngClass]=\"card.Size === 'lg' ? 'list-3' : (card.Size === 'md' ? 'list-2' : 'list-1')\"\r\n\t\t\t\t*ngSwitchCase=\"'navigation'\">\r\n\t\t\t\t<common-navigation></common-navigation>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"list-1 defined-row\"\r\n\t\t\t\t[ngClass]=\"card.Size === 'lg' ? 'list-3' : (card.Size === 'md' ? 'list-2' : 'list-1')\"\r\n\t\t\t\t*ngSwitchCase=\"'calendar'\">\r\n\t\t\t\t<common-calendar></common-calendar>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"list-1 defined-row\"\r\n\t\t\t\t[ngClass]=\"card.Size === 'lg' ? 'list-3' : (card.Size === 'md' ? 'list-2' : 'list-1')\"\r\n\t\t\t\t*ngSwitchCase=\"'notice'\">\r\n\t\t\t\t<common-notice></common-notice>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"list-2 defined-row\"\r\n\t\t\t\t[ngClass]=\"card.Size === 'lg' ? 'list-3' : 'list-2-2'\"\r\n\t\t\t\t*ngSwitchCase=\"'datalist'\">\r\n\t\t\t\t<common-data-list></common-data-list>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"list-1 defined-row\"\r\n\t\t\t\t[ngClass]=\"card.Size === 'lg' ? 'list-3' : (card.Size === 'md' ? 'list-2' : 'list-1')\"\r\n\t\t\t\t*ngSwitchCase=\"'chart'\">\r\n\t\t\t\t<common-chart></common-chart>\r\n\t\t\t</div>\r\n\t\t</ng-container>\r\n\t</div>\r\n</div>",
                        styles: ["@media (max-width:767px){.list-1,.list-2,.list-3{width:calc(100% - 8px)}}@media (max-width:1199px) and (min-width:768px){.list-1,.list-2{width:calc((100% - 16px)/ 2)}.list-2-2,.list-3{width:calc(100% - 8px)}}@media (min-width:1200px){.list-1{width:calc((100% - 24px)/ 3)}.list-2{width:calc((100% - 24px)/ 3 * 2 + 8px)}.list-3{width:calc(100% - 8px)}}.index-main{width:100%;height:calc(100vh - 30px);box-sizing:border-box;padding:24px 16px 0 24px;overflow:auto}.main-wrapper{display:flex;flex-wrap:wrap;min-width:280px;box-sizing:border-box;margin:0 auto}.list-1,.list-2,.list-3{box-sizing:border-box;padding:0 4px 4px;margin-bottom:16px;margin-right:8px}.default-row{height:240px}.defined-row{height:280px}.index-box{width:100%;height:100%}.layout-auto{width:100%}.layout-simple{max-width:960px!important}"]
                    }] }
        ];
        /** @nocollapse */
        IndexComponent.ctorParameters = function () { return [
            { type: IndexService },
            { type: icon.MatIconRegistry },
            { type: platformBrowser.DomSanitizer }
        ]; };
        IndexComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.c-index',] }]
        };
        return IndexComponent;
    }());
    if (false) {
        /** @type {?} */
        IndexComponent.prototype.hostClass;
        /** @type {?} */
        IndexComponent.prototype.svr;
        /**
         * @type {?}
         * @private
         */
        IndexComponent.prototype.iconRegistry;
        /**
         * @type {?}
         * @private
         */
        IndexComponent.prototype.sanitizer;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var MoreVertComponent = /** @class */ (function () {
        function MoreVertComponent(svr) {
            this.svr = svr;
            this.hostClass = true;
            // typeName: CardType;
            // theNavSize: CardSize;
            this.subMenuClick = new core.EventEmitter();
            this._disShow = false;
        }
        Object.defineProperty(MoreVertComponent.prototype, "typeName", {
            get: /**
             * @return {?}
             */
            function () {
                return this._typeName;
            },
            set: /**
             * @param {?} val
             * @return {?}
             */
            function (val) {
                this._typeName = val;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(MoreVertComponent.prototype, "theNavSize", {
            get: /**
             * @return {?}
             */
            function () {
                return this._theNavSize;
            },
            set: /**
             * @param {?} val
             * @return {?}
             */
            function (val) {
                this._theNavSize = val;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(MoreVertComponent.prototype, "disElements", {
            get: /**
             * @return {?}
             */
            function () {
                return this._disElements;
            },
            set: /**
             * @param {?} val
             * @return {?}
             */
            function (val) {
                this._disElements = val;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(MoreVertComponent.prototype, "disShow", {
            get: /**
             * @return {?}
             */
            function () {
                return this._disShow;
            },
            set: /**
             * @param {?} val
             * @return {?}
             */
            function (val) {
                this._disShow = val;
            },
            enumerable: true,
            configurable: true
        });
        /**
         * @return {?}
         */
        MoreVertComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        /**
         * @param {?} sz
         * @return {?}
         */
        MoreVertComponent.prototype.changeSize = /**
         * @param {?} sz
         * @return {?}
         */
        function (sz) {
            var _this = this;
            this.theNavSize = sz;
            this.svr.userSetting.Cards.find((/**
             * @param {?} x
             * @return {?}
             */
            function (x) { return x.Type === _this.typeName; })).Size = this.theNavSize;
            this.svr.updateSetting().subscribe((/**
             * @return {?}
             */
            function () {
                console.log(_this.svr.userSetting.Cards);
            }));
        };
        /**
         * @param {?} cardName
         * @return {?}
         */
        MoreVertComponent.prototype.removeCard = /**
         * @param {?} cardName
         * @return {?}
         */
        function (cardName) {
            /** @type {?} */
            var arr = this.svr.userSetting.Cards;
            this.svr.userSetting.Cards = arr.filter((/**
             * @param {?} item
             * @return {?}
             */
            function (item) { return item.Type !== cardName; }));
        };
        /**
         * @param {?} i
         * @return {?}
         */
        MoreVertComponent.prototype.removeEle = /**
         * @param {?} i
         * @return {?}
         */
        function (i) {
            this.subMenuClick.emit(i);
        };
        MoreVertComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-more-vert',
                        template: "<div class=\"dot\">\r\n\t<button mat-button [matMenuTriggerFor]=\"dot\">\r\n\t\t<mat-icon svgIcon=\"more_vert\"></mat-icon>\r\n\t</button>\r\n</div>\r\n\r\n<mat-menu #dot=\"matMenu\" class=\"dotDot\">\r\n\t<button mat-menu-item [matMenuTriggerFor]=\"optionSelect\" *ngIf=\"disShow\">\r\n\t\t<mat-icon svgIcon=\"spellcheck\"></mat-icon>\u9009\u62E9\u6E90\r\n\t</button>\r\n\t<button mat-menu-item [matMenuTriggerFor]=\"optionSize\">\r\n\t\t<mat-icon svgIcon=\"arrow_expand\"></mat-icon>\u5C3A\u5BF8\r\n\t</button>\r\n\t<button mat-menu-item (click)=\"removeCard(typeName)\">\r\n\t\t<mat-icon svgIcon=\"delete_outline\"></mat-icon>\u79FB\u9664\u6A21\u5757\r\n\t</button>\r\n\r\n</mat-menu>\r\n\r\n<mat-menu #optionSelect=\"matMenu\">\r\n\t<button mat-menu-item *ngFor=\"let ele of disElements;let i = index\"\r\n\t\t(click)=\"removeEle(i)\">\r\n\t\t<mat-icon color=\"warn\" class=\"remove-circle\" svgIcon=\"remove_circle\">\r\n\t\t</mat-icon>\r\n\t\t<span>{{ele.title()}}</span>\r\n\t</button>\r\n</mat-menu>\r\n\r\n<mat-menu #optionSize=\"matMenu\" class=\"dotDot\">\r\n\t<button mat-menu-item [ngClass]=\"theNavSize === 'lg' ? 'pitched' : ''\"\r\n\t\t(click)=\"changeSize('lg')\">\r\n\t\t<mat-icon [svgIcon]=\"theNavSize==='lg'?'done':''\">\r\n\t\t</mat-icon>\r\n\t\t<span>100%\u5BBD</span>\r\n\t</button>\r\n\t<button mat-menu-item [ngClass]=\"theNavSize === 'md' ? 'pitched' : ''\"\r\n\t\t(click)=\"changeSize('md')\">\r\n\t\t<mat-icon [svgIcon]=\"theNavSize==='md'?'done':''\">\r\n\t\t</mat-icon>\r\n\t\t<span>2/3\u5BBD</span>\r\n\t</button>\r\n\t<button mat-menu-item [ngClass]=\"theNavSize === 'sm' ? 'pitched' : ''\"\r\n\t\t(click)=\"changeSize('sm')\">\r\n\t\t<mat-icon [svgIcon]=\"theNavSize==='sm'?'done':''\">\r\n\t\t</mat-icon>\r\n\t\t<span>1/3\u5BBD</span>\r\n\t</button>\r\n</mat-menu>",
                        styles: [".dot{width:100%;height:100%}"]
                    }] }
        ];
        /** @nocollapse */
        MoreVertComponent.ctorParameters = function () { return [
            { type: IndexService }
        ]; };
        MoreVertComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.c-index-more-vert',] }],
            subMenuClick: [{ type: core.Output }],
            typeName: [{ type: core.Input }],
            theNavSize: [{ type: core.Input }],
            disElements: [{ type: core.Input }],
            disShow: [{ type: core.Input }]
        };
        return MoreVertComponent;
    }());
    if (false) {
        /** @type {?} */
        MoreVertComponent.prototype.hostClass;
        /** @type {?} */
        MoreVertComponent.prototype.subMenuClick;
        /**
         * @type {?}
         * @private
         */
        MoreVertComponent.prototype._typeName;
        /**
         * @type {?}
         * @private
         */
        MoreVertComponent.prototype._theNavSize;
        /**
         * @type {?}
         * @private
         */
        MoreVertComponent.prototype._disElements;
        /**
         * @type {?}
         * @private
         */
        MoreVertComponent.prototype._disShow;
        /** @type {?} */
        MoreVertComponent.prototype.svr;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var NavigationComponent = /** @class */ (function () {
        function NavigationComponent(svr, eles, router, eRef) {
            var _this = this;
            this.svr = svr;
            this.eles = eles;
            this.router = router;
            this.eRef = eRef;
            this.hostClass = true;
            this.formControl = new forms.FormControl();
            this.validElement = false;
            this.displayElements = [];
            this.MaxElementNumber = 8;
            this.handleNav = false;
            this.navName = 'navigation';
            this.navSize = this.svr.userSetting.Cards.find((/**
             * @param {?} x
             * @return {?}
             */
            function (x) { return x.Type === _this.navName; })).Size;
            // console.log(this.navSize);
        }
        /**
         * @return {?}
         */
        NavigationComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.allEles = Object.values(this.eles.getEles()).filter((/**
             * @param {?} e
             * @return {?}
             */
            function (e) { return !e.NotMenu; }));
            this.filterElements = this.formControl.valueChanges.pipe(operators.startWith(''), operators.map((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                /** @type {?} */
                var arr = _this.allEles.filter((/**
                 * @param {?} e
                 * @return {?}
                 */
                function (e) {
                    return _this.formatElementDisplayLabel(e).toLowerCase().includes(v.toLowerCase());
                }));
                return arr.sort((/**
                 * @param {?} a
                 * @param {?} b
                 * @return {?}
                 */
                function (a, b) { return a.title().localeCompare(b.title()); }));
            })));
            this.formControl.valueChanges.subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.validElement = !!_this.allEles.find((/**
                 * @param {?} e
                 * @return {?}
                 */
                function (e) { return _this.formatElementDisplayLabel(e) === v; }));
            }));
            this.refreshDisplayElements();
        };
        /**
         * @param {?} ele
         * @return {?}
         */
        NavigationComponent.prototype.formatElementDisplayLabel = /**
         * @param {?} ele
         * @return {?}
         */
        function (ele) {
            return ele.title() + "(" + ele.Name + ")";
        };
        /**
         * @return {?}
         */
        NavigationComponent.prototype.refreshDisplayElements = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.displayElements = this.svr.userSetting.NavigationElements
                .filter((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return _this.eles.get(v); }))
                .map((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return _this.eles.get(v); }));
            // console.log('----', this.displayElements);
        };
        /**
         * @param {?} val
         * @return {?}
         */
        NavigationComponent.prototype.change = /**
         * @param {?} val
         * @return {?}
         */
        function (val) {
            console.log(val);
        };
        /**
         * @return {?}
         */
        NavigationComponent.prototype.add = /**
         * @return {?}
         */
        function () {
            var _this = this;
            /** @type {?} */
            var ele = this.allEles.find((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return _this.formatElementDisplayLabel(v) === _this.formControl.value; }));
            // console.log(ele);
            if (!this.svr.userSetting.NavigationElements.includes(ele.Name)) {
                this.svr.userSetting.NavigationElements.push(ele.Name);
                this.svr.updateSetting().subscribe((/**
                 * @return {?}
                 */
                function () {
                    _this.refreshDisplayElements();
                }));
            }
        };
        /**
         * @return {?}
         */
        NavigationComponent.prototype.execute = /**
         * @return {?}
         */
        function () {
            var _this = this;
            /** @type {?} */
            var ele = this.allEles.find((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return _this.formatElementDisplayLabel(v) === _this.formControl.value; }));
            this.router.navigateByUrl(this.eles.frontElementURL(ele.Name, decodeURI(ele.URL)));
        };
        /**
         * @param {?} ele
         * @return {?}
         */
        NavigationComponent.prototype.routerLink = /**
         * @param {?} ele
         * @return {?}
         */
        function (ele) {
            return this.eles.frontElementURL(ele.Name, decodeURI(ele.URL));
        };
        // ↓ 浮窗删除选择源元素
        // ↓ 浮窗删除选择源元素
        /**
         * @param {?} i
         * @return {?}
         */
        NavigationComponent.prototype.removeEle = 
        // ↓ 浮窗删除选择源元素
        /**
         * @param {?} i
         * @return {?}
         */
        function (i) {
            var _this = this;
            this.svr.userSetting.NavigationElements.splice(i, 1);
            this.svr.updateSetting().subscribe((/**
             * @return {?}
             */
            function () {
                _this.refreshDisplayElements();
            }));
        };
        /**
         * @param {?} cardName
         * @return {?}
         */
        NavigationComponent.prototype.removeCard = /**
         * @param {?} cardName
         * @return {?}
         */
        function (cardName) {
            /** @type {?} */
            var arr = this.svr.userSetting.Cards;
            this.svr.userSetting.Cards = arr.filter((/**
             * @param {?} item
             * @return {?}
             */
            function (item) { return item.Type !== cardName; }));
        };
        /**
         * @return {?}
         */
        NavigationComponent.prototype.hasEles = /**
         * @return {?}
         */
        function () {
            var _this = this;
            /** @type {?} */
            var ele = this.allEles.find((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return _this.formatElementDisplayLabel(v) === _this.formControl.value; }));
            return this.svr.userSetting.NavigationElements.includes(ele.Name);
        };
        /**
         * @param {?} sz
         * @return {?}
         */
        NavigationComponent.prototype.changeSize = /**
         * @param {?} sz
         * @return {?}
         */
        function (sz) {
            var _this = this;
            this.navSize = sz;
            this.svr.userSetting.Cards.find((/**
             * @param {?} x
             * @return {?}
             */
            function (x) { return x.Type === 'navigation'; })).Size = this.navSize;
            this.svr.updateSetting().subscribe((/**
             * @return {?}
             */
            function () {
                console.log(_this.svr.userSetting.Cards);
            }));
        };
        NavigationComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-navigation',
                        template: "<div class=\"nav-main\">\r\n\t<!-- 1. \u4E0A\u534A\u90E8\u5206 -->\r\n\t<div class=\"part-A mat-elevation-z2\">\r\n\t\t<div class=\"a-title\">\r\n\t\t\t<div class=\"title-left\">\r\n\t\t\t\t<mat-icon class=\"apps\" svgIcon=\"apps\"></mat-icon>\r\n\t\t\t\t<span>\u5FEB\u901F\u64CD\u4F5C\u680F</span>\r\n\t\t\t</div>\r\n\r\n\t\t\t<div class=\"title-right\">\r\n\t\t\t\t<common-more-vert disShow=\"true\" [disElements]=\"displayElements\" [typeName]=\"navName\" [theNavSize]=\"navSize\" (subMenuClick)=\"removeEle($event)\">\r\n\t\t\t\t</common-more-vert>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div class=\"a-main\">\r\n\t\t\t<div class=\"ele-icon\" *ngFor=\"let ele of displayElements\"\r\n\t\t\t\t[routerLink]=\"routerLink(ele)\" matTooltip=\"{{ ele.title() }}\">\r\n\t\t\t\t<div class=\"icon\">\r\n\t\t\t\t\t<mat-icon class=\"mini-icon\" [svgIcon]=\"ele.Icon || 'dns'\">\r\n\t\t\t\t\t</mat-icon>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"icon-text\">\r\n\t\t\t\t\t{{ ele.title() }}\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\r\n\t<!-- 2. \u4E0B\u534A\u90E8\u5206 -->\r\n\t<div class=\"part-B mat-elevation-z2\">\r\n\t\t<!-- 2.1 \u5DE6\u4FA7input -->\r\n\t\t<div class=\"b-left\">\r\n\t\t\t<input #inputHaveLength class=\"b-input\" type=\"text\"\r\n\t\t\t\t[matAutocomplete]=\"auto\" [formControl]=\"formControl\"\r\n\t\t\t\tplaceholder=\"\u641C\u7D22\u83DC\u5355\u9879\" />\r\n\t\t\t<mat-autocomplete #auto=\"matAutocomplete\">\r\n\t\t\t\t<mat-option class=\"option-title\"\r\n\t\t\t\t\t*ngFor=\"let ele of filterElements | async\"\r\n\t\t\t\t\t[value]=\"formatElementDisplayLabel(ele)\">\r\n\t\t\t\t\t{{ ele.title() }}\r\n\t\t\t\t\t<span class=\"option-text\">({{ ele.Name }})</span>\r\n\t\t\t\t</mat-option>\r\n\t\t\t</mat-autocomplete>\r\n\t\t</div>\r\n\r\n\t\t<!-- 2.2 \u53F3\u4FA7\u56FE\u6807 -->\r\n\t\t<div class=\"b-right\">\r\n\t\t\t<div *ngIf=\"!inputHaveLength.value.length\">\r\n\t\t\t\t<button mat-button disabled>\r\n\t\t\t\t\t<mat-icon svgIcon=\"search\"></mat-icon>\r\n\t\t\t\t</button>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"inputLength\" *ngIf=\"inputHaveLength.value.length\">\r\n\t\t\t\t<div matTooltip=\"\u589E\u52A0\">\r\n\t\t\t\t\t<button mat-button color=\"primary\"\r\n\t\t\t\t\t\t[disabled]=\"hasEles() || !validElement || svr.userSetting.NavigationElements.length >= MaxElementNumber\"\r\n\t\t\t\t\t\t(click)=\"add()\">\r\n\t\t\t\t\t\t<mat-icon svgIcon=\"add_circle\"></mat-icon>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t</div>\r\n\t\t\t\t<button color=\"primary\" mat-button matTooltip=\"\u6267\u884C\"\r\n\t\t\t\t\t[disabled]=\"!validElement\" (click)=\"execute()\">\r\n\t\t\t\t\t<!-- \u5224\u65AD\u6267\u884C\u7ED3\u679C\uFF0C\u8FD9\u884C\u5E2E\u6211\u7559\u7740\u5427 -->\r\n\t\t\t\t\t<!-- {{validElement}} -->\r\n\t\t\t\t\t<mat-icon svgIcon=\"keyboard_arrow_right\"></mat-icon>\r\n\t\t\t\t</button>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\r\n\t<!-- <mat-menu #dot=\"matMenu\" class=\"dotDot\">\r\n\t\t<button mat-menu-item [matMenuTriggerFor]=\"optionSelect\">\r\n\t\t\t<mat-icon svgIcon=\"spellcheck\"></mat-icon>\u9009\u62E9\u6E90\r\n\t\t</button>\r\n\t\t<button mat-menu-item [matMenuTriggerFor]=\"optionSize\">\r\n\t\t\t<mat-icon svgIcon=\"arrow_expand\"></mat-icon>\u5C3A\u5BF8\r\n\t\t</button>\r\n\t\t<button mat-menu-item (click)=\"removeCard('navigation')\">\r\n\t\t\t<mat-icon svgIcon=\"delete_outline\"></mat-icon>\u79FB\u9664\u6A21\u5757\r\n\t\t</button>\r\n\r\n\t</mat-menu>\r\n\r\n\t<mat-menu #optionSelect=\"matMenu\">\r\n\t\t<button mat-menu-item *ngFor=\"let ele of displayElements;let i = index\">\r\n\t\t\t<mat-icon color=\"warn\" class=\"remove-circle\" svgIcon=\"remove_circle\"\r\n\t\t\t\t(click)=\"removeEle(i)\">\r\n\t\t\t</mat-icon>\r\n\t\t\t<span>{{ele.title()}}</span>\r\n\t\t</button>\r\n\t</mat-menu>\r\n\r\n\t<mat-menu #optionSize=\"matMenu\">\r\n\t\t<button mat-menu-item [ngClass]=\"navSize === 'lg' ? 'pitched' : ''\"\r\n\t\t\t(click)=\"changeSize('lg')\">\r\n\t\t\t<mat-icon [svgIcon]=\"navSize === 'lg' ? 'done' : ''\">\r\n\t\t\t</mat-icon>\r\n\t\t\t<span>100%\u5BBD</span>\r\n\t\t</button>\r\n\t\t<button mat-menu-item\r\n\t\t\t[ngClass]=\"navSize === 'md' ? 'pitched' : ''\"\r\n\t\t\t(click)=\"changeSize('md')\">\r\n\t\t\t<mat-icon [svgIcon]=\"navSize === 'md' ? 'done' : ''\">\r\n\t\t\t</mat-icon>\r\n\t\t\t<span>2/3\u5BBD</span>\r\n\t\t</button>\r\n\t\t<button mat-menu-item\r\n\t\t\t[ngClass]=\"navSize === 'sm' ? 'pitched' : ''\"\r\n\t\t\t(click)=\"changeSize('sm')\">\r\n\t\t\t<mat-icon [svgIcon]=\"navSize === 'sm' ? 'done' : ''\">\r\n\t\t\t</mat-icon>\r\n\t\t\t<span>1/3\u5BBD</span>\r\n\t\t</button>\r\n\t</mat-menu>  -->\r\n\r\n\r\n</div>",
                        styles: ["@charset \"UTF-8\";.nav-main{position:relative;width:100%;height:100%}.part-A{width:100%;height:200px;box-sizing:border-box;padding:8px 8px 0;border-radius:4px;overflow:hidden}.a-title{display:flex;justify-content:space-between;align-items:center;width:100%;height:24px;box-sizing:border-box;margin-bottom:20px;color:#61ccc4}.a-title .title-left,.a-title .title-right{align-items:center}.a-title .title-left{display:flex}.a-title .title-right{display:none}.a-title span{padding-left:8px;font:16px bold}.nav-main:hover .title-right{display:flex;justify-content:center;width:40px}.a-main{display:flex;flex-wrap:wrap;width:100%;height:144px;box-sizing:border-box;padding-left:4px;padding-right:4px;overflow:auto}.ele-icon{min-width:72px;height:56px;box-sizing:border-box;margin-left:4px;margin-right:4px;margin-bottom:16px;text-align:center;cursor:pointer}.icon{display:flex;justify-content:center;width:24px;height:24px;margin:0 auto 8px}.mini-icon{width:24px;height:24px}.icon-text{max-width:80px;margin:0 auto;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px}.part-B{display:flex;justify-content:space-between;position:relative;align-items:center;width:100%;height:64px;box-sizing:border-box;margin-top:13px;border-radius:4px}.b-left{width:100%;height:40px}.b-input{width:100%;height:40px;line-height:40px;box-sizing:border-box;border:none;padding:0 24px;outline:0;font-size:14px;background-color:transparent}.option-title{box-sizing:border-box;padding-left:24px;padding-right:24px;font-size:14px}.option-text{font-size:12px}.b-right{position:absolute;right:24px;text-align:right;width:80px;height:40px}.b-right button{min-width:40px;height:40px;padding-left:0;padding-right:0}.b-right ::ng-deep .mat-button{background-color:none;min-width:0}.b-right ::ng-deep .mat-button-focus-overlay{background-color:transparent}.b-right ::ng-deep .mat-button-active-overlay{background-color:transparent}.inputLength{display:flex;justify-content:space-between}"]
                    }] }
        ];
        /** @nocollapse */
        NavigationComponent.ctorParameters = function () { return [
            { type: IndexService },
            { type: dbwebCore.ElementsService },
            { type: router.Router },
            { type: core.ElementRef }
        ]; };
        NavigationComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.c-index-navigation',] }]
        };
        return NavigationComponent;
    }());
    if (false) {
        /** @type {?} */
        NavigationComponent.prototype.hostClass;
        /** @type {?} */
        NavigationComponent.prototype.filterElements;
        /** @type {?} */
        NavigationComponent.prototype.formControl;
        /** @type {?} */
        NavigationComponent.prototype.validElement;
        /** @type {?} */
        NavigationComponent.prototype.allEles;
        /** @type {?} */
        NavigationComponent.prototype.displayElements;
        /** @type {?} */
        NavigationComponent.prototype.MaxElementNumber;
        /** @type {?} */
        NavigationComponent.prototype.handleNav;
        /** @type {?} */
        NavigationComponent.prototype.navSize;
        /** @type {?} */
        NavigationComponent.prototype.navName;
        /** @type {?} */
        NavigationComponent.prototype.svr;
        /** @type {?} */
        NavigationComponent.prototype.eles;
        /**
         * @type {?}
         * @private
         */
        NavigationComponent.prototype.router;
        /**
         * @type {?}
         * @private
         */
        NavigationComponent.prototype.eRef;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var NoticeComponent = /** @class */ (function () {
        function NoticeComponent(svr, eles) {
            var _this = this;
            this.svr = svr;
            this.eles = eles;
            this.hostClass = true;
            this.navName = 'notice';
            this.navSize = this.svr.userSetting.Cards.find((/**
             * @param {?} x
             * @return {?}
             */
            function (x) { return x.Type === _this.navName; })).Size;
        }
        /**
         * @return {?}
         */
        NoticeComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            this.svr.initNotice();
        };
        Object.defineProperty(NoticeComponent.prototype, "hasNotReadNoticeCount", {
            get: /**
             * @return {?}
             */
            function () {
                if (this.svr.notice) {
                    return this.svr.notice.filter((/**
                     * @param {?} v
                     * @return {?}
                     */
                    function (v) { return !v.IsReaded; })).length;
                }
                return 0;
            },
            enumerable: true,
            configurable: true
        });
        NoticeComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-notice',
                        template: "<section class=\"notice-main mat-elevation-z2\">\r\n\t<!-- \u2193 \u6807\u9898 \u2193 -->\r\n\t<div class=\"notice-title\">\r\n\t\t<div class=\"title-left\">\r\n\t\t\t<mat-icon class=\"apps\" svgIcon=\"notifications\"></mat-icon>\r\n\t\t\t<span>\u6D88\u606F\u901F\u89C8</span>\r\n\t\t\t<div class=\"unRead\" *ngIf=\"hasNotReadNoticeCount>0\">\r\n\t\t\t\t<div class=\"unRead-circle\">\r\n\t\t\t\t\t{{hasNotReadNoticeCount}}\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div class=\"title-right\">\r\n\t\t\t<common-more-vert [typeName]=\"navName\" [theNavSize]=\"navSize\">\r\n\t\t\t</common-more-vert>\r\n\t\t</div>\r\n\r\n\t</div>\r\n\t<!-- \u2193 \u6D88\u606F\u660E\u7EC6 \u2193 -->\r\n\t<div class=\"notice-wrapper\">\r\n\t\t<a class=\"per-notice\" *ngFor=\"let item of svr.notice\" [routerLink]=\"item.FrontURL\">\r\n\t\t\t<div class=\"notice-left\">\r\n\t\t\t\t<div class=\"notice-left-icon\">\r\n\t\t\t\t\t<mat-icon class=\"warn-circle\" color=\"warn\" svgIcon=\"fiber_manual_record\" *ngIf=\"!item.IsReaded\">\r\n\t\t\t\t\t</mat-icon>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"left-text\">{{item.Title}}</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"notice-right\">{{item.Time|date:'MM/dd'}}</div>\r\n\t\t</a>\r\n\t</div>\r\n\t<div class=\"shape\">\r\n\t</div>\r\n\t<a class=\"more\" [routerLink]=\"eles.frontElementURL('list-my-notice')\">\u67E5\u770B\u66F4\u591A\r\n\t\t<mat-icon svgIcon=\"navigate_next\"></mat-icon>\r\n\t</a>\r\n\r\n</section>",
                        styles: [".notice-main{position:relative;width:100%;height:100%;box-sizing:border-box;padding:8px;border-radius:4px}.notice-title{display:flex;justify-content:space-between;align-items:center;width:100%;height:24px;box-sizing:border-box;margin-bottom:16px;color:#c57a56}.notice-title .title-left{display:flex;align-items:center}.notice-title span{padding-left:8px;padding-right:8px;font:16px bold}.notice-title .unRead-circle{width:24px;height:20px;line-height:20px;border-radius:10px;text-align:center;font-size:14px;color:#fff}.notice-title .title-right{display:none}.notice-main:hover .title-right{display:flex}.notice-wrapper{width:100%;height:224px;box-sizing:border-box;padding-left:16px;padding-right:16px;font-size:14px;overflow:hidden}.per-notice{text-decoration:none;width:100%;display:flex;justify-content:space-between;align-items:center;height:24px;box-sizing:border-box;margin-bottom:16px;cursor:pointer}.notice-left{display:flex;width:calc(100% - 30px - 16px - 8px);height:24px;box-sizing:border-box}.notice-left .notice-left-icon{width:8px;margin-right:8px}.notice-left .left-text{box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.notice-right{width:30px;height:24px;text-align:right;box-sizing:border-box}.warn-circle{width:8px;height:8px}.more{cursor:pointer;position:absolute;right:0;bottom:4px;display:flex;align-items:center;height:12px;line-height:12px;margin-bottom:4px;text-decoration:none;font-size:12px}.shape{position:absolute;bottom:0;right:0;width:100%;height:32px;border-radius:4px}"]
                    }] }
        ];
        /** @nocollapse */
        NoticeComponent.ctorParameters = function () { return [
            { type: IndexService },
            { type: dbwebCore.ElementsService }
        ]; };
        NoticeComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.c-index-notice',] }]
        };
        return NoticeComponent;
    }());
    if (false) {
        /** @type {?} */
        NoticeComponent.prototype.hostClass;
        /** @type {?} */
        NoticeComponent.prototype.navName;
        /** @type {?} */
        NoticeComponent.prototype.navSize;
        /** @type {?} */
        NoticeComponent.prototype.svr;
        /** @type {?} */
        NoticeComponent.prototype.eles;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /**
     * @record
     */
    function SettingCard() { }
    if (false) {
        /** @type {?} */
        SettingCard.prototype.Type;
        /** @type {?} */
        SettingCard.prototype.Name;
        /** @type {?} */
        SettingCard.prototype.Enabled;
    }
    var SettingDialogComponent = /** @class */ (function () {
        function SettingDialogComponent(svr, elementRef, dialogRef) {
            this.svr = svr;
            this.elementRef = elementRef;
            this.dialogRef = dialogRef;
            this.hostClass = true;
            this.cards = [
                {
                    Type: CardType.navigation,
                    Name: '快速导航',
                    Enabled: false
                },
                {
                    Type: CardType.calendar,
                    Name: '日历',
                    Enabled: false
                },
                {
                    Type: CardType.notice,
                    Name: '布告栏',
                    Enabled: false
                },
                {
                    Type: CardType.datalist,
                    Name: '数据表格',
                    Enabled: false
                },
                {
                    Type: CardType.chart,
                    Name: '分析图',
                    Enabled: false
                }
            ];
        }
        /**
         * @return {?}
         */
        SettingDialogComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.elementRef.nativeElement.parentElement.style = 'padding:0px;';
            this.layout = this.svr.userSetting.Layout;
            this.svr.userSetting.Cards.forEach((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                /** @type {?} */
                var found = _this.cards.find((/**
                 * @param {?} c
                 * @return {?}
                 */
                function (c) { return c.Type === v.Type; }));
                if (found) {
                    found.Enabled = true;
                }
            }));
        };
        /**
         * @return {?}
         */
        SettingDialogComponent.prototype.ok = /**
         * @return {?}
         */
        function () {
            var _this = this;
            /** @type {?} */
            var arr = this.cards.filter((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.Enabled; })).map((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                /** @type {?} */
                var found = _this.svr.userSetting.Cards.find((/**
                 * @param {?} c
                 * @return {?}
                 */
                function (c) { return c.Type === v.Type; }));
                if (found) {
                    return found;
                }
                return (/** @type {?} */ ({
                    Type: v.Type,
                    Size: defaultCardSize[v.Type],
                    Setting: null
                }));
            }));
            this.svr.userSetting.Cards = arr;
            this.svr.userSetting.Layout = this.layout;
            this.svr.updateSetting().subscribe();
            this.dialogRef.close(true);
        };
        SettingDialogComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-setting-dialog',
                        template: "<div class=\"set-title\">\u8BBE\u7F6E</div>\r\n<div class=\"set-sub-title\">\u5E03\u5C40\u5927\u5C0F</div>\r\n<mat-radio-group class=\"set-redio set-sub-title\"\r\n\t[(ngModel)]=\"layout\">\r\n\t<mat-radio-button value=\"auto\">\u81EA\u9002\u5E94</mat-radio-button>\r\n\t<mat-radio-button value=\"simple\">\u7B80\u6D01</mat-radio-button>\r\n</mat-radio-group>\r\n<div class=\"set-sub-title\">\u6A21\u5757\u9009\u62E9</div>\r\n<div class=\"\u5168\u90E8\u6A21\u5757\">\r\n\t<div class=\"\u6A21\u5757\" *ngFor=\"let card of cards\" [class.\u9009\u4E2D]=\"card.Enabled\">\r\n\t\t{{ card.Name }}\r\n\t\t<mat-icon class=\"\u529F\u80FD\u6309\u94AE\" svgIcon=\"remove_circle\" color=\"primary\"\r\n\t\t\t*ngIf=\"card.Enabled\" (click)=\"card.Enabled = false\">\u53BB\u9664</mat-icon>\r\n\t\t<mat-icon class=\"\u529F\u80FD\u6309\u94AE\" svgIcon=\"add_circle\" color=\"warn\"\r\n\t\t\t*ngIf=\"!card.Enabled\" (click)=\"card.Enabled = true\"></mat-icon>\r\n\t</div>\r\n</div>\r\n<div class=\"set-bottom\">\r\n\t<button class=\"\u8BBE\u7F6E-\u53D6\u6D88\u6309\u94AE \" mat-button (click)=\"dialogRef.close()\">\u53D6\u6D88</button>\r\n\t<button class=\"\u8BBE\u7F6E-\u786E\u5B9A\u6309\u94AE\" mat-raised-button (click)=\"ok()\">\u786E\u5B9A</button>\r\n</div>",
                        styles: ["@charset \"UTF-8\";:host{height:100%;padding:24px 16px 16px 24px;box-sizing:border-box;display:flex;flex-direction:column}.set-title{font-size:18px;font-weight:700;margin-bottom:24px}.set-sub-title{font-size:14px}.set-redio{display:block;font-weight:700;margin:24px 0 32px}.set-redio .mat-radio-button{margin-right:64px}.\u5168\u90E8\u6A21\u5757{width:100%;flex-grow:1;display:flex;flex-wrap:wrap}.\u5168\u90E8\u6A21\u5757 .\u6A21\u5757{width:96px;height:56px;font-size:14px;text-align:center;line-height:56px;border-radius:4px;margin:16px 16px 0 0;position:relative}.\u5168\u90E8\u6A21\u5757 .\u6A21\u5757 .\u529F\u80FD\u6309\u94AE{position:absolute;right:0;bottom:0;line-height:24px;cursor:pointer}.set-bottom{width:100%;height:32px;text-align:right}.set-bottom .\u8BBE\u7F6E-\u53D6\u6D88\u6309\u94AE{font-size:16px;font-weight:700}.set-bottom .\u8BBE\u7F6E-\u786E\u5B9A\u6309\u94AE{font-size:16px;font-weight:700;color:#fff}"]
                    }] }
        ];
        /** @nocollapse */
        SettingDialogComponent.ctorParameters = function () { return [
            { type: IndexService },
            { type: core.ElementRef },
            { type: material.MatDialogRef }
        ]; };
        SettingDialogComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.c-index-setting-dialog',] }]
        };
        return SettingDialogComponent;
    }());
    if (false) {
        /** @type {?} */
        SettingDialogComponent.prototype.hostClass;
        /** @type {?} */
        SettingDialogComponent.prototype.layout;
        /** @type {?} */
        SettingDialogComponent.prototype.cards;
        /** @type {?} */
        SettingDialogComponent.prototype.svr;
        /**
         * @type {?}
         * @private
         */
        SettingDialogComponent.prototype.elementRef;
        /** @type {?} */
        SettingDialogComponent.prototype.dialogRef;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var WelcomeComponent = /** @class */ (function () {
        function WelcomeComponent(prj, cur, dialog) {
            this.prj = prj;
            this.cur = cur;
            this.dialog = dialog;
            this.hostClass = true;
            this.isWrap = false;
        }
        /**
         * @return {?}
         */
        WelcomeComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            /** @type {?} */
            var titleWidth = this.prj.projectLabel.length * 24;
            /** @type {?} */
            var welcomeWidth = this.mainDiv.nativeElement.getBoundingClientRect().width - 16;
            if (titleWidth > welcomeWidth) {
                this.isWrap = true;
            }
            else {
                this.isWrap = false;
            }
        };
        /**
         * @return {?}
         */
        WelcomeComponent.prototype.onResize = /**
         * @return {?}
         */
        function () {
            // event.target.innerWidth;
            /** @type {?} */
            var titleWidth = this.prj.projectLabel.length * 24;
            /** @type {?} */
            var welcomeWidth = this.mainDiv.nativeElement.getBoundingClientRect().width - 16;
            if (titleWidth > welcomeWidth) {
                this.isWrap = true;
            }
            else {
                this.isWrap = false;
            }
        };
        /**
         * @return {?}
         */
        WelcomeComponent.prototype.openSetting = /**
         * @return {?}
         */
        function () {
            this.dialog.open(SettingDialogComponent, {
                width: '720px',
                height: '436px',
                autoFocus: false
            });
        };
        WelcomeComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-welcome',
                        template: "<div class=\"welcome-main mat-elevation-z2\" #main>\r\n\t<header class=\"main-top\">\r\n\t\t<span class=\"top-left\">{{ cur.data.UserName }}\uFF0C\u6B22\u8FCE\u8BBF\u95EE</span>\r\n\t\t<span class=\"top-right\">v{{ prj.version }}</span>\r\n\t</header>\r\n\t<section class=\"main-box\">\r\n\t\t<img class=\"logo\" [src]=\"prj.logoImageURL()\" />\r\n\t\t<div [class]=\"!isWrap ? 'box-title':'box-title-2'\"><b>{{ prj.projectLabel }}</b></div>\r\n\t</section>\r\n\t<footer class=\"main-footer\">\r\n\t\t<div>\r\n\t\t\t<span class=\"welcome-owner\">{{ prj.projectOwner }}</span>\r\n\t\t</div>\r\n\t\t<div class=\"welcome-icon\">\r\n\t\t\t<mat-icon svgIcon=\"help\"></mat-icon>\r\n\t\t\t<mat-icon svgIcon=\"settings\" (click)=\"openSetting()\"></mat-icon>\r\n\t\t</div>\r\n\t</footer>\r\n</div>\r\n",
                        styles: [".welcome-main{display:flex;flex-direction:column;justify-content:space-between;width:100%;height:236px;box-sizing:border-box;padding:8px;border-radius:4px;background:0 0/100% auto #666}.main-top{display:flex;justify-content:space-between;width:100%}.main-top .top-right{font-size:12px}.main-box{flex:1;display:flex;flex-direction:column;align-items:center;width:100%}.main-box .logo{width:80px;height:80px;margin-top:16px;margin-bottom:16px}.main-box .box-title{text-align:center;font-size:24px}.main-box .box-title-2{text-align:left;font-size:18px}.main-footer{display:flex;justify-content:space-between;width:100%;box-sizing:border-box}.main-footer .welcome-owner{font-size:12px}.main-footer .welcome-icon{flex-shrink:0}.main-footer .welcome-icon .mat-icon{margin-left:8px;cursor:pointer}.welcome-all{width:100%;height:100%;border-radius:4px;display:flex;flex-direction:column;justify-content:space-between;align-items:center;background:url(/front/assets/login/bg_logo.jpg) center bottom/100% auto no-repeat}.welcome-top{width:100%;display:flex;flex-direction:column;align-items:center}.welcome-top .honorific{width:100%;padding:8px 0 16px 8px;box-sizing:border-box;display:block;text-align:left;font-size:18px}.welcome-top .logo{width:80px;height:80px;margin-bottom:16px}.welcome-top .labelName{font-size:24px;font-weight:700;position:relative}.welcome-top .labelName .edition{display:block;width:40px;height:16px;border-radius:8px;line-height:16px;text-align:center;font-size:10px;font-weight:500;position:absolute;top:0;right:-44px}.welcome-bottom{width:100%;padding:0 8px 8px;box-sizing:border-box;display:flex;justify-content:space-between;align-items:flex-end}.welcome-bottom .welcome-owner{font-size:12px}.welcome-bottom .welcome-icon{flex-shrink:0}.welcome-bottom .welcome-icon .mat-icon{margin-left:8px;cursor:pointer}"]
                    }] }
        ];
        /** @nocollapse */
        WelcomeComponent.ctorParameters = function () { return [
            { type: dbwebCore.ProjectService },
            { type: dbwebCore.CurrentService },
            { type: material.MatDialog }
        ]; };
        WelcomeComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.c-index-welcome',] }],
            mainDiv: [{ type: core.ViewChild, args: ['main', { static: true },] }],
            onResize: [{ type: core.HostListener, args: ['window:resize',] }]
        };
        return WelcomeComponent;
    }());
    if (false) {
        /** @type {?} */
        WelcomeComponent.prototype.hostClass;
        /** @type {?} */
        WelcomeComponent.prototype.mainDiv;
        /** @type {?} */
        WelcomeComponent.prototype.isWrap;
        /** @type {?} */
        WelcomeComponent.prototype.prj;
        /** @type {?} */
        WelcomeComponent.prototype.cur;
        /**
         * @type {?}
         * @private
         */
        WelcomeComponent.prototype.dialog;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ɵ0$2 = dateFns.adapterFactory, ɵ1 = dbwebCore.SaveStateData;
    var IndexModule = /** @class */ (function () {
        function IndexModule() {
        }
        IndexModule.decorators = [
            { type: core.NgModule, args: [{
                        imports: [
                            common.CommonModule,
                            router.RouterModule,
                            material.MatMenuModule,
                            material.MatDialogModule,
                            material.MatRadioModule,
                            material.MatIconModule,
                            material.MatInputModule,
                            material.MatButtonModule,
                            material.MatTooltipModule,
                            material.MatTableModule,
                            forms.FormsModule,
                            forms.ReactiveFormsModule,
                            material.MatAutocompleteModule,
                            RecordViewInnerModule,
                            angularCalendar.CalendarModule.forRoot({
                                provide: angularCalendar.DateAdapter,
                                useFactory: ɵ0$2
                            }),
                            router.RouterModule.forChild([
                                {
                                    path: '**',
                                    component: IndexComponent,
                                    data: ɵ1
                                }
                            ])
                        ],
                        declarations: [
                            IndexComponent,
                            WelcomeComponent,
                            BannerComponent,
                            NavigationComponent,
                            DataListComponent,
                            ChartComponent,
                            SettingDialogComponent,
                            CalendarComponent,
                            NoticeComponent,
                            MoreVertComponent
                        ],
                        entryComponents: [SettingDialogComponent],
                        schemas: [core.CUSTOM_ELEMENTS_SCHEMA]
                    },] }
        ];
        return IndexModule;
    }());

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ɵ0$3 = dbwebCore.SaveStateData;
    // registerLoadedConfigEvent(CTRL_RECORDVIEW, () => getControllerRoutes(CTRL_RECORDVIEW, RecordViewComponent));
    var RecordViewModule = /** @class */ (function () {
        function RecordViewModule() {
        }
        RecordViewModule.decorators = [
            { type: core.NgModule, args: [{
                        imports: [
                            RecordViewInnerModule,
                            router.RouterModule.forChild([{ path: '**', data: ɵ0$3, component: RecordViewComponent }])
                        ],
                        exports: [RecordViewComponent]
                    },] }
        ];
        return RecordViewModule;
    }());

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /** @type {?} */
    var MUST = 'MUST';
    /**
     * @record
     */
    function ImportField$1() { }
    if (false) {
        /** @type {?} */
        ImportField$1.prototype.Name;
        /** @type {?} */
        ImportField$1.prototype.Alias;
        /** @type {?} */
        ImportField$1.prototype.Type;
        /** @type {?} */
        ImportField$1.prototype.MaxLength;
        /** @type {?} */
        ImportField$1.prototype.Style;
        /** @type {?} */
        ImportField$1.prototype.PrimaryKey;
        /** @type {?} */
        ImportField$1.prototype.Remark;
    }
    /**
     * @record
     */
    function MapField() { }
    if (false) {
        /** @type {?} */
        MapField.prototype.Name;
        /** @type {?} */
        MapField.prototype.Style;
        /** @type {?} */
        MapField.prototype.MapName;
        /** @type {?} */
        MapField.prototype.Value;
        /** @type {?} */
        MapField.prototype.Remark;
    }
    /**
     * @record
     */
    function RefreshPreviewParam() { }
    if (false) {
        /** @type {?} */
        RefreshPreviewParam.prototype.FileName;
        /** @type {?} */
        RefreshPreviewParam.prototype.Format;
        /** @type {?} */
        RefreshPreviewParam.prototype.Encoding;
        /** @type {?} */
        RefreshPreviewParam.prototype.FirstHead;
    }
    /**
     * @record
     */
    function RefreshPreviewResult() { }
    if (false) {
        /** @type {?} */
        RefreshPreviewResult.prototype.Title;
        /** @type {?} */
        RefreshPreviewResult.prototype.Rows;
        /** @type {?} */
        RefreshPreviewResult.prototype.Error;
    }
    /**
     * @record
     */
    function DoImportParam() { }
    if (false) {
        /** @type {?} */
        DoImportParam.prototype.FileName;
        /** @type {?} */
        DoImportParam.prototype.FirstHead;
        /** @type {?} */
        DoImportParam.prototype.Encoding;
        /** @type {?} */
        DoImportParam.prototype.Format;
        /** @type {?} */
        DoImportParam.prototype.Fields;
    }
    /**
     * @record
     */
    function DoImportResult() { }
    if (false) {
        /** @type {?} */
        DoImportResult.prototype.TaskInfoURL;
        /** @type {?} */
        DoImportResult.prototype.TaskInfoSign;
        /** @type {?} */
        DoImportResult.prototype.BrowseTaskElement;
    }
    /**
     * @record
     */
    function ImportInfo() { }
    if (false) {
        /** @type {?} */
        ImportInfo.prototype.TableName;
        /** @type {?} */
        ImportInfo.prototype.TableTotal;
        /** @type {?} */
        ImportInfo.prototype.TableCanRemove;
        /** @type {?} */
        ImportInfo.prototype.Fields;
        /** @type {?} */
        ImportInfo.prototype.NullIden;
    }
    /**
     * @record
     */
    function RemoveTableDataResult() { }
    if (false) {
        /** @type {?} */
        RemoveTableDataResult.prototype.Total;
        /** @type {?} */
        RemoveTableDataResult.prototype.CanRemove;
    }
    var ImportService = /** @class */ (function () {
        function ImportService(api, prj, eles, snackBar) {
            this.api = api;
            this.prj = prj;
            this.eles = eles;
            this.snackBar = snackBar;
            this.step = 'select-file';
            // 服务端唯一的临时文件名
            this.firstHead = true; // 是否是首行的标识
            // 是否是首行的标识
            this.format = 'CSV';
            this.encoding = 'UTF8';
            this.previewData = { Have: false, Title: null, Rows: null, Error: '' };
        }
        /**
         * @return {?}
         */
        ImportService.prototype.init = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.GetImportInfo().subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.tableName = v.TableName;
                _this.tableTotal = v.TableTotal;
                _this.tableCanRemove = v.TableCanRemove;
                _this.fields = v.Fields;
                _this.nullIden = v.NullIden;
                _this.mapFields = v.Fields.map((/**
                 * @param {?} fld
                 * @return {?}
                 */
                function (fld) { return ({
                    Name: fld.Name,
                    Style: fld.Style,
                    MapName: '',
                    Value: '',
                    Remark: fld.Remark
                }); }));
            }));
        };
        /**
         * @return {?}
         */
        ImportService.prototype.GetImportInfo = /**
         * @return {?}
         */
        function () {
            return this.api.get('get-import-info');
        };
        /**
         * @return {?}
         */
        ImportService.prototype.mustFields = /**
         * @return {?}
         */
        function () {
            if (this.fields) {
                return this.fields.filter((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) { return v.Style === MUST; })).map((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) { return v.Name; }));
            }
            else {
                return [];
            }
        };
        /**
         * @return {?}
         */
        ImportService.prototype.primaryKeyFields = /**
         * @return {?}
         */
        function () {
            if (this.fields) {
                return this.fields.filter((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) { return v.PrimaryKey; })).map((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) { return v.Name; }));
            }
            else {
                return [];
            }
        };
        /**
         * @return {?}
         */
        ImportService.prototype.fileType = /**
         * @return {?}
         */
        function () {
            if (this.file) {
                /** @type {?} */
                var list = this.file.name.split('.');
                if (list.length > 1) {
                    return '.' + list[1];
                }
            }
            return '';
        };
        // 上传文件使用了返回的路由,所以需要自己调用原生的http请求
        // 上传文件使用了返回的路由,所以需要自己调用原生的http请求
        /**
         * @return {?}
         */
        ImportService.prototype.upload = 
        // 上传文件使用了返回的路由,所以需要自己调用原生的http请求
        /**
         * @return {?}
         */
        function () {
            var _this = this;
            /** @type {?} */
            var sentBegin;
            this.api.upload(this.file, 'content', 'upload-import-file').subscribe((/**
             * @param {?} event
             * @return {?}
             */
            function (event) {
                switch (event.type) {
                    case http.HttpEventType.Sent:
                        // 小于500毫秒的上传,不显示中间的上传进度界面,防止界面闪烁
                        sentBegin = setTimeout((/**
                         * @return {?}
                         */
                        function () {
                            _this.step = 'upload';
                            sentBegin = null;
                        }), 500);
                        break;
                    case http.HttpEventType.UploadProgress:
                        _this.uploadProgress = Math.round(event.loaded / event.total * 100);
                        break;
                    case http.HttpEventType.Response:
                        if (sentBegin) {
                            clearTimeout(sentBegin);
                            sentBegin = null;
                        }
                        _this.step = 'setting';
                        _this.serverTempFileName = event.body;
                        _this.previewData.Error = '';
                        _this.previewData.Have = false;
                        break;
                    default:
                        console.log(event);
                        break;
                }
            }));
        };
        /**
         * @return {?}
         */
        ImportService.prototype.refreshPreview = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.api
                .post('refresh-preview', (/** @type {?} */ ({
                FileName: this.serverTempFileName,
                Format: this.format,
                Encoding: this.encoding,
                FirstHead: this.firstHead
            })))
                .subscribe((/**
             * @param {?} rev
             * @return {?}
             */
            function (rev) {
                _this.previewData.Have = true;
                _this.previewData.Title = rev.Title;
                _this.previewData.Rows = rev.Rows;
                _this.previewData.Error = rev.Error;
                _this.mapFields.forEach((/**
                 * @param {?} v
                 * @param {?} index
                 * @return {?}
                 */
                function (v, index) {
                    if (_this.firstHead) {
                        v.MapName = _this.previewData.Title.find((/**
                         * @param {?} str
                         * @return {?}
                         */
                        function (str) { return str.toLowerCase() === v.Name.toLowerCase(); }));
                        if (!v.MapName) {
                            // 根据别名再找一遍
                            /** @type {?} */
                            var alias_1 = _this.fields.find((/**
                             * @param {?} afield
                             * @return {?}
                             */
                            function (afield) { return afield.Name === v.Name; })).Alias;
                            v.MapName = _this.previewData.Title.find((/**
                             * @param {?} str
                             * @return {?}
                             */
                            function (str) { return str.toLowerCase() === alias_1.toLowerCase(); }));
                        }
                    }
                    else {
                        v.MapName = _this.previewData.Title[index];
                    }
                    if (v.MapName === undefined) {
                        v.MapName = '(SKIP)';
                    }
                }));
                console.log('------', _this.previewData.Have || _this.previewData.Error);
            }));
        };
        /**
         * @return {?}
         */
        ImportService.prototype.doImport = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.api
                .post('do-import', (/** @type {?} */ ({
                FileName: this.serverTempFileName,
                FirstHead: this.firstHead,
                Encoding: this.encoding,
                Format: this.format,
                Fields: this.mapFields.map((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) { return ({
                    Name: v.Name,
                    MapName: v.MapName,
                    Value: v.Value
                }); })),
                NullIden: this.nullIden
            })))
                .subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.step = 'done';
                _this.taskInfoURL = _this.prj.frontURL('task', v.TaskInfoURL);
                _this.eles.addElement(v.BrowseTaskElement);
                _this.eles.setURLSign(v.TaskInfoURL, v.TaskInfoSign);
            }));
        };
        /**
         * @return {?}
         */
        ImportService.prototype.removeTableData = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.api.post('remove-table-data').subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.tableTotal = v.Total;
                _this.tableCanRemove = v.CanRemove;
                _this.snackBar.open('成功删除数据', '关闭', { duration: 5000 });
            }));
        };
        ImportService.decorators = [
            { type: core.Injectable }
        ];
        /** @nocollapse */
        ImportService.ctorParameters = function () { return [
            { type: dbwebCore.CurrentApiService },
            { type: dbwebCore.ProjectService },
            { type: dbwebCore.ElementsService },
            { type: material.MatSnackBar }
        ]; };
        return ImportService;
    }());
    if (false) {
        /** @type {?} */
        ImportService.prototype.step;
        /** @type {?} */
        ImportService.prototype.tableName;
        /** @type {?} */
        ImportService.prototype.tableTotal;
        /** @type {?} */
        ImportService.prototype.tableCanRemove;
        /** @type {?} */
        ImportService.prototype.fields;
        /** @type {?} */
        ImportService.prototype.file;
        /** @type {?} */
        ImportService.prototype.uploadProgress;
        /** @type {?} */
        ImportService.prototype.serverTempFileName;
        /** @type {?} */
        ImportService.prototype.firstHead;
        /** @type {?} */
        ImportService.prototype.format;
        /** @type {?} */
        ImportService.prototype.encoding;
        /** @type {?} */
        ImportService.prototype.nullIden;
        /** @type {?} */
        ImportService.prototype.previewData;
        /** @type {?} */
        ImportService.prototype.mapFields;
        /** @type {?} */
        ImportService.prototype.taskInfoURL;
        /**
         * @type {?}
         * @private
         */
        ImportService.prototype.api;
        /**
         * @type {?}
         * @private
         */
        ImportService.prototype.prj;
        /**
         * @type {?}
         * @private
         */
        ImportService.prototype.eles;
        /**
         * @type {?}
         * @private
         */
        ImportService.prototype.snackBar;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ImportComponent = /** @class */ (function () {
        // selected = '(SKIP)';
        function ImportComponent(svr, dialog, tabs) {
            this.svr = svr;
            this.dialog = dialog;
            this.tabs = tabs;
            this.hostClass = true;
            // @ViewChild('fileInput', { static: true }) fileInput: any; 先留着让我学习
            this.exp = true;
            this.isDisplay0 = true;
            this.isDisplayflex = true;
            this.isInfo = false;
            this.isHidden = false;
            this.isShowSpan = false;
        }
        /**
         * @return {?}
         */
        ImportComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            this.svr.init();
        };
        // 选择文件时触发文件提交
        // 选择文件时触发文件提交
        /**
         * @param {?} files
         * @return {?}
         */
        ImportComponent.prototype.uploadFile = 
        // 选择文件时触发文件提交
        /**
         * @param {?} files
         * @return {?}
         */
        function (files) {
            this.svr.file = files[0];
        };
        /**
         * @param {?} e
         * @return {?}
         */
        ImportComponent.prototype.dragoverFile = /**
         * @param {?} e
         * @return {?}
         */
        function (e) {
            e.preventDefault();
        };
        /**
         * @param {?} e
         * @return {?}
         */
        ImportComponent.prototype.drop = /**
         * @param {?} e
         * @return {?}
         */
        function (e) {
            this.svr.file = e.dataTransfer.files[0];
            e.preventDefault();
        };
        // ↓↓↓ 侧边栏  信息显示11
        // ↓↓↓ 侧边栏  信息显示11
        /**
         * @return {?}
         */
        ImportComponent.prototype.hiddenNav = 
        // ↓↓↓ 侧边栏  信息显示11
        /**
         * @return {?}
         */
        function () {
            this.isDisplay0 = !this.isDisplay0;
            this.isDisplayflex = !this.isDisplayflex;
            this.isInfo = !this.isInfo;
        };
        /**
         * @return {?}
         */
        ImportComponent.prototype.changeNullIden = /**
         * @return {?}
         */
        function () {
            var _this = this;
            /** @type {?} */
            var dialogRef = this.dialog.open(PromptDialogComponent, {
                width: '250px',
                data: (/** @type {?} */ ({
                    title: 'NULL值识别码',
                    prompt: '导入的数据中出现识别码的内容将被转换为NULL值',
                    value: this.svr.nullIden
                }))
            });
            dialogRef.afterClosed().subscribe((/**
             * @param {?} result
             * @return {?}
             */
            function (result) {
                if (result !== undefined) {
                    _this.svr.nullIden = result;
                }
            }));
        };
        /**
         * @return {?}
         */
        ImportComponent.prototype.clearDialog = /**
         * @return {?}
         */
        function () {
            var _this = this;
            /** @type {?} */
            var dialogRef = this.dialog.open(ConfirmDialogComponent, {
                width: '360px',
                height: '180px',
                data: "\u786E\u5B9A\u8981\u6E05\u9664\u6570\u636E?"
            });
            dialogRef.afterClosed().subscribe((/**
             * @param {?} result
             * @return {?}
             */
            function (result) {
                if (result) {
                    _this.svr.removeTableData();
                }
            }));
        };
        ImportComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-import',
                        template: "<div class=\"main main-left\" [class.main-left]=\"!isDisplay0\">\r\n\t<!-- \b*** \u5BFC\u5165\u4E3B\u4F53 *** -->\r\n\t<section class=\"section-wrapper\">\r\n\r\n\t\t<!-- \u2193\u2193\u2193 \u6CE8\u610F\u56FE\u6807 \u2193\u2193\u2193 -->\r\n\t\t<mat-icon class=\"nav-icon\" [svgIcon]=\"isDisplay0 ? 'info' : 'cancel'\"\r\n\t\t\t(click)=\"hiddenNav()\" *ngIf=\"svr.step != 'done'\">\r\n\t\t</mat-icon>\r\n\t\t<!-- \b*** \u6CE8\u610F\u4E8B\u9879 *** -->\r\n\t\t<nav class=\"nav-notice\" [class.display0]=\"isDisplay0\">\r\n\t\t\t<!-- ** \u6587\u672C\u6846 ** -->\r\n\t\t\t<section class=\"notice-wrapper\">\r\n\t\t\t\t<div class=\"notice-title\">\u6CE8\u610F\u4E8B\u9879</div>\r\n\t\t\t\t<div class=\"notice-text\">\r\n\t\t\t\t\t<!-- \u7B2C1\u53E5 -->\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t\t1.\u7A7A\u884C\u88AB\u5FFD\u7565\uFF0C\u5E76\u4E0D\u8BA1\u5165\u884C\u53F7\r\n\t\t\t\t\t</p>\r\n\t\t\t\t\t<!-- \u7B2C2\u53E5 -->\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t\t2.<span *ngFor=\"let fld of svr.mustFields()\">[{{fld}}]</span>\u4E3A\u7A7A\u7684\u5C06\u88AB\u5FFD\u7565\r\n\t\t\t\t\t</p>\r\n\t\t\t\t\t<!-- \u7B2C3\u53E5 -->\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t\t3.<span\r\n\t\t\t\t\t\t\t*ngFor=\"let fld of svr.primaryKeyFields()\">[{{fld}}]</span>\u91CD\u590D\u7684\u884C,\u4EE5\u6700\u540E\u4E00\u884C\u4E3A\u51C6\r\n\t\t\t\t\t</p>\r\n\t\t\t\t\t<!-- \u7B2C4\u53E5 -->\r\n\t\t\t\t\t<p>\r\n\t\t\t\t\t\t4.\u6307\u6807\u7684\u524D\u540E\u7A7A\u767D\u5B57\u7B26,\u5305\u62EC\u5168\u534A\u89D2\u7A7A\u683C\u3001\u56DE\u8F66\u6362\u884C\u3001\u5236\u8868\u7B26\u7B49\u5C06\u88AB\u6E05\u9664\r\n\t\t\t\t\t</p>\r\n\t\t\t\t</div>\r\n\t\t\t</section>\r\n\r\n\t\t</nav>\r\n\r\n\t\t<ng-container [ngSwitch]=\"svr.step\">\r\n\t\t\t<!-- \u2193\u2193\u2193 \u9009\u62E9\u6587\u4EF6\u6B65\u9AA4 \u2193\u2193\u2193 -->\r\n\r\n\t\t\t<div *ngSwitchCase=\"'select-file'\" class=\"import-wrapper add-margin\">\r\n\t\t\t\t<!-- ** \u4E3B\u4F53\u6807\u9898 ** -->\r\n\t\t\t\t<header>1/2\u9009\u62E9\u6587\u4EF6</header>\r\n\t\t\t\t<!-- ** \u70B9\u51FB\u56FE\u6807\u90E8\u5206 ** click \u5E94\u8BE5\u653E\u5728\u8FD9\u4E2A\u56FE\u5C42-->\r\n\t\t\t\t<section class=\"select-wrapper\">\r\n\t\t\t\t\t<!-- * \u6CA1\u6709\u9009\u53D6\u4E0A\u4F20\u6587\u4EF6\u65F6 *-->\r\n\t\t\t\t\t<!-- <ng-template> -->\r\n\t\t\t\t\t<!-- \u56FE\u6807\u90E8\u5206 -->\r\n\t\t\t\t\t<div class=\"select-main\" (click)=\"fileInput.click()\"\r\n\t\t\t\t\t\t(dragover)=\"dragoverFile($event)\" (dragenter)=\"dragoverFile($event)\"\r\n\t\t\t\t\t\t(drop)=\"drop($event)\">\r\n\t\t\t\t\t\t<mat-icon class=\"icon\"\r\n\t\t\t\t\t\t\t[svgIcon]=\"this.svr.file ? 'insert_drive_file' : 'backup'\">\r\n\t\t\t\t\t\t</mat-icon>\r\n\t\t\t\t\t\t<div *ngIf=\"!this.svr.file\" class=\"icon-text\">\u70B9\u51FB\u6DFB\u52A0<br>\u6216\u5C06\u6587\u4EF6\u62D6\u5230\u6B64\u5904</div>\r\n\t\t\t\t\t\t<div *ngIf=\"this.svr.file\" class=\"icon-text\">\r\n\t\t\t\t\t\t\t<mat-icon svgIcon=\"replay\"></mat-icon>\u91CD\u65B0\u4E0A\u4F20\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<input hidden type=\"file\" #fileInput\r\n\t\t\t\t\t\t(change)=\"uploadFile($event.target.files)\" />\r\n\t\t\t\t\t<!-- \u6587\u5B57\u90E8\u5206 -->\r\n\t\t\t\t\t<div *ngIf=\"!this.svr.file\" class=\"select-text\">*\u4EC5\u652F\u6301\u4E0A\u4F20CSV\u3001TXT\u683C\u5F0F\u6587\u4EF6\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div *ngIf=\"this.svr.file\" class=\"select-text\">\r\n\t\t\t\t\t\t{{ this.svr.file.name }}</div>\r\n\t\t\t\t\t<!-- </ng-template> -->\r\n\t\t\t\t</section>\r\n\r\n\t\t\t\t<!-- ** \u8868\u683C\u90E8\u5206 ** -->\r\n\t\t\t\t<section class=\"table-wrapper\">\r\n\t\t\t\t\t<!-- * \u6587\u4EF6\u683C\u5F0F\u8BF4\u660E\u90E8\u5206 * -->\r\n\t\t\t\t\t<header>\r\n\t\t\t\t\t\t<div class=\"layout-title\">\u6587\u4EF6\u683C\u5F0F\u8BF4\u660E</div>\r\n\t\t\t\t\t\t<div class=\"layout-text\">\r\n\t\t\t\t\t\t\t<div class=\"text-left\">\r\n\t\t\t\t\t\t\t\t\u6570\u636E\u9700\u8981\u6309\u7167\u5982\u4E0B\u7684\u683C\u5F0F\u63D0\u4F9B\uFF0C\u53EF\u4EE5\u662FCSV\u6587\u4EF6\u6216\u8005TAB\u5206\u9694\u7684\u6587\u672C\u6587\u4EF6\uFF0C\u5B57\u7B26\u96C6\u9ED8\u8BA4\u4E3AUTF8</div>\r\n\r\n\t\t\t\t\t\t\t<span>\r\n\t\t\t\t\t\t\t\t<!-- <a (click)=\"svr.removeTableData()\">\u6E05\u7A7A\u6570\u636E</a> -->\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t<button mat-button (click)=\"clearDialog()\">\u6E05\u7A7A\u6570\u636E</button>\r\n\t\t\t\t\t\t\t\t<!-- \u2193\u2193\u2193 \u6D6E\u7A97 \u2193\u2193\u2193 -->\r\n\t\t\t\t\t\t\t\t<div class=\"float-table-info\">\r\n\t\t\t\t\t\t\t\t\t<div><span>\u8868\u540D:</span><span>{{svr.tableName}}</span></div>\r\n\t\t\t\t\t\t\t\t\t<div><span>\u8BB0\u5F55\u603B\u6570:</span><span>{{svr.tableTotal}}</span></div>\r\n\t\t\t\t\t\t\t\t\t<div><span>\u53EF\u64CD\u4F5C\u8BB0\u5F55:</span><span>{{svr.tableCanRemove}}</span>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t\t\t\t<!-- \u2191\u2191\u2191 \u6D6E\u7A97 \u2191\u2191\u2191 -->\r\n\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</header>\r\n\t\t\t\t\t<!-- * \u8868\u683C\u6B63\u4F53 * -->\r\n\t\t\t\t\t<section class=\"import-table\">\r\n\t\t\t\t\t\t<div class=\"table-box\">\r\n\t\t\t\t\t\t\t<table mat-table [dataSource]=\"svr.fields\">\r\n\t\t\t\t\t\t\t\t<ng-container matColumnDef=\"no\">\r\n\t\t\t\t\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u5E8F\u53F7</th>\r\n\t\t\t\t\t\t\t\t\t<td mat-cell *matCellDef=\"let element;let i = index\">{{i}}\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t\t<ng-container matColumnDef=\"name\">\r\n\t\t\t\t\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u540D\u79F0</th>\r\n\t\t\t\t\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">{{ element.Name }}\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t\t<ng-container matColumnDef=\"alias\">\r\n\t\t\t\t\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u522B\u540D</th>\r\n\t\t\t\t\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">{{ element.Alias }}\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t\t<ng-container matColumnDef=\"type\">\r\n\t\t\t\t\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u6570\u636E\u7C7B\u578B</th>\r\n\t\t\t\t\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">{{ element.Type }}\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t\t<ng-container matColumnDef=\"length\">\r\n\t\t\t\t\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u957F\u5EA6</th>\r\n\t\t\t\t\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">\r\n\t\t\t\t\t\t\t\t\t\t{{ element.MaxLength }}\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t\t<ng-container matColumnDef=\"style\">\r\n\t\t\t\t\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u7C7B\u522B</th>\r\n\t\t\t\t\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">{{ element.Style }}\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t\t<ng-container matColumnDef=\"comment\">\r\n\t\t\t\t\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u5907\u6CE8</th>\r\n\t\t\t\t\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">{{ element.Remark }}\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t\t<tr mat-header-row\r\n\t\t\t\t\t\t\t\t\t*matHeaderRowDef=\"['no','name','alias', 'type', 'length', 'style', 'comment'];sticky: true\">\r\n\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t<tr mat-row\r\n\t\t\t\t\t\t\t\t\t*matRowDef=\"let row; columns: ['no','name','alias', 'type', 'length', 'style', 'comment']\">\r\n\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t</table>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</section>\r\n\t\t\t\t</section>\r\n\t\t\t\t<!-- ** \u6309\u94AE ** -->\r\n\t\t\t\t<footer class=\"next-step\">\r\n\t\t\t\t\t<button [disabled]=\"!this.svr.file\" mat-flat-button\r\n\t\t\t\t\t\t(click)=\"svr.upload()\">\u4E0B\u4E00\u6B65</button>\r\n\t\t\t\t</footer>\r\n\t\t\t\t<div class=\"clear-tip\">\r\n\t\t\t\t\t<div class=\"tip-wrapper\">\r\n\t\t\t\t\t\t<div class=\"tip-left\">\u6210\u529F\u5220\u9664\u6570\u636E</div>\r\n\t\t\t\t\t\t<div class=\"tip-right\">\u5173\u95ED</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<!-- \u2193\u2193\u2193 \u8FD9\u4E2A/div\u7559\u7ED9ngSwitchCase -->\r\n\t\t\t</div>\r\n\r\n\t\t\t<!-- \u2191\u2191\u2191 \u9009\u62E9\u6587\u4EF6\u6B65\u9AA4 \u2191\u2191\u2191 -->\r\n\r\n\t\t\t<!-- \u2193\u2193\u2193 \u6587\u4EF6\u4E0A\u4F20\u4E2D\u6B65\u9AA4 \u2193\u2193\u2193 -->\r\n\t\t\t<div class=\"upload\" *ngSwitchCase=\"'upload'\">\r\n\t\t\t\t<div class=\"upload-wrapper\">\r\n\t\t\t\t\t<div class=\"upload-title\">\r\n\t\t\t\t\t\t\u6587\u4EF6\u6B63\u5728\u4E0A\u4F20\u4E2D\u00B7\u00B7\u00B7\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"upload-text\">\r\n\t\t\t\t\t\t{{svr.uploadProgress}}%\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div>\r\n\t\t\t\t\t\t<mat-progress-bar mode=\"determinate\" [value]=\"svr.uploadProgress\">\r\n\t\t\t\t\t\t</mat-progress-bar>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<!-- \u2191\u2191\u2191 \u6587\u4EF6\u4E0A\u4F20\u4E2D\u6B65\u9AA4 \u2191\u2191\u2191 -->\r\n\r\n\t\t\t<!-- \u2193\u2193\u2193 \u6587\u4EF6\u8BBE\u7F6E\u6B65\u9AA4 \u2193\u2193\u2193 -->\r\n\r\n\t\t\t<div class=\"setting-wrapper add-margin\" *ngSwitchCase=\"'setting'\" #exp>\r\n\r\n\t\t\t\t<header class=\"set-title\">2/2\u6587\u4EF6\u8BBE\u7F6E</header>\r\n\t\t\t\t<!-- * \u2193\u2193 \u6587\u4EF6\u9009\u62E9 \u2193\u2193 * -->\r\n\t\t\t\t<section class=\"set-select\">\r\n\t\t\t\t\t<div class=\"select-1\">\r\n\t\t\t\t\t\t<mat-checkbox [(ngModel)]=\"svr.firstHead\">\u9996\u884C\u662F\u6807\u9898\u884C</mat-checkbox>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<div class=\"select-2\">\r\n\t\t\t\t\t\t\u683C\u5F0F:\r\n\t\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t\t<mat-select [(ngModel)]=\"svr.format\">\r\n\t\t\t\t\t\t\t\t<mat-option value=\"CSV\">\r\n\t\t\t\t\t\t\t\t\tCSV(\u9017\u53F7\u5206\u9694\u6587\u672C)\r\n\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t\t<mat-option value=\"TXT\">\r\n\t\t\t\t\t\t\t\t\tTXT(TAB\u5206\u9694\u6587\u672C)\r\n\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<div class=\"select-3\">\r\n\t\t\t\t\t\t\u5B57\u7B26\u96C6:\r\n\t\t\t\t\t\t<mat-radio-group [(ngModel)]=\"svr.encoding\">\r\n\t\t\t\t\t\t\t<mat-radio-button value=\"UTF8\" checked>\r\n\t\t\t\t\t\t\t\tUTF-8\r\n\t\t\t\t\t\t\t</mat-radio-button>\r\n\t\t\t\t\t\t\t<mat-radio-button value=\"GBK\">\r\n\t\t\t\t\t\t\t\tGBK\r\n\t\t\t\t\t\t\t</mat-radio-button>\r\n\t\t\t\t\t\t</mat-radio-group>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t<div class=\"select-4\">\r\n\t\t\t\t\t\t<button mat-button (click)=\"svr.refreshPreview()\">\r\n\t\t\t\t\t\t\t<mat-icon class=\"icon-done\" svgIcon=\"done\"></mat-icon>\r\n\t\t\t\t\t\t\t\u751F\u6210\u9884\u89C8\r\n\t\t\t\t\t\t</button>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</section>\r\n\t\t\t\t<!-- * \u2191\u2191 \u6587\u4EF6\u9009\u62E9\u7ED3\u675F \u2191\u2191 * -->\r\n\t\t\t\t<!-- * \u2193\u2193 \u6587\u4EF6\u8BBE\u7F6E \u2193\u2193 * -->\r\n\t\t\t\t<section class=\"set-data\">\r\n\t\t\t\t\t<!-- * \u2193\u2193 \u6570\u636E\u9884\u89C8\u72B6\u6001 \u2193\u2193 * -->\r\n\t\t\t\t\t<div class=\"preview-data\"\r\n\t\t\t\t\t\t*ngIf=\"svr.previewData.Have; else previewDataEmpty\">\r\n\t\t\t\t\t\t<!-- * \u2193 \u6587\u4EF6\u9519\u8BEF \u2193 * -->\r\n\t\t\t\t\t\t<div class=\"error-wrapper\"\r\n\t\t\t\t\t\t\t*ngIf=\"svr.previewData.Error;else previewDataNoError\">\r\n\t\t\t\t\t\t\t<div class=\"error-title\">\r\n\t\t\t\t\t\t\t\t<mat-icon class=\"report-problem\" svgIcon=\"report_problem\">\r\n\t\t\t\t\t\t\t\t</mat-icon>\r\n\t\t\t\t\t\t\t\t\u751F\u6210\u5185\u5BB9\u51FA\u9519\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div class=\"error-text\">{{svr.previewData.Error}}</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<!-- * \u2191 \u6587\u4EF6\u9519\u8BEF \u2191 * -->\r\n\t\t\t\t\t\t<!-- * \u2193 \u6570\u636E\u6B63\u786E\u663E\u793A \u2193 * -->\r\n\t\t\t\t\t\t<ng-template #previewDataNoError>\r\n\t\t\t\t\t\t\t<!-- \u2193 100\u884C\u6570\u636E \u2193 -->\r\n\t\t\t\t\t\t\t<section class=\"row100\">\r\n\t\t\t\t\t\t\t\t<header>\u4EE5\u4E0B\u662F\u8BC6\u522B\u51FA\u6765\u7684\u524D100\u884C\u6570\u636E</header>\r\n\t\t\t\t\t\t\t\t<section class=\"row100-data\">\r\n\t\t\t\t\t\t\t\t\t<table>\r\n\t\t\t\t\t\t\t\t\t\t<thead>\r\n\t\t\t\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<th *ngFor=\"let col of svr.previewData.Title\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{{col}}\r\n\t\t\t\t\t\t\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t</thead>\r\n\t\t\t\t\t\t\t\t\t\t<tbody>\r\n\t\t\t\t\t\t\t\t\t\t\t<tr *ngFor=\"let row of svr.previewData.Rows\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<td *ngFor=\"let col of row\">{{col}}</td>\r\n\t\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t</tbody>\r\n\t\t\t\t\t\t\t\t\t</table>\r\n\t\t\t\t\t\t\t\t</section>\r\n\t\t\t\t\t\t\t</section>\r\n\t\t\t\t\t\t\t<!-- \u2191 100\u884C\u6570\u636E \u2191 -->\r\n\t\t\t\t\t\t\t<!-- \u2193 \u6307\u6807\u8BBE\u7F6E  \u2193 -->\r\n\t\t\t\t\t\t\t<section class=\"set-index\">\r\n\t\t\t\t\t\t\t\t<header>\r\n\t\t\t\t\t\t\t\t\t<div class=\"title\">\u6307\u6807\u8BBE\u7F6E</div>\r\n\t\t\t\t\t\t\t\t\t<div class=\"text\">\r\n\t\t\t\t\t\t\t\t\t\t<div>\u4EE5\u4E0B\u662F\u6307\u6807\u5BF9\u7167\u8BBE\u7F6E\uFF0C\u53EF\u4EE5\u8BBE\u7F6E\u5BFC\u5165\u6570\u636E\u5217\u4E0E\u6570\u636E\u5E93\u5217\u7684\u6620\u5C04\u5173\u7CFB\uFF0C\u5E76\u53EF\u4EE5\u6307\u5B9A\u503C</div>\r\n\t\t\t\t\t\t\t\t\t\t<div *ngIf=\"svr.nullIden;else noNullIden\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\u5F53\u524DNull\u503C\u8BC6\u522B\u7801\u4E3A\r\n\t\t\t\t\t\t\t\t\t\t\t\t<span>{{svr.nullIden}}</span>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<button mat-button (click)=\"changeNullIden()\">\u4FEE\u6539</button>\r\n\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t<ng-template #noNullIden>\r\n\t\t\t\t\t\t\t\t\t\t\t<div>\u5F53\u524DNull\u503C\u8BC6\u522B\u7801\u672A\u8BBE\u7F6E\r\n\t\t\t\t\t\t\t\t\t\t\t\t<button mat-button (click)=\"changeNullIden()\">\u70B9\u51FB\u8BBE\u7F6E</button>\r\n\t\t\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</header>\r\n\r\n\t\t\t\t\t\t\t\t<section class=\"index-data\">\r\n\t\t\t\t\t\t\t\t\t<!-- \u8868 -->\r\n\t\t\t\t\t\t\t\t\t<table mat-table [dataSource]=\"svr.mapFields\">\r\n\t\t\t\t\t\t\t\t\t\t<!-- \u5E8F\u53F7 -->\r\n\t\t\t\t\t\t\t\t\t\t<ng-container matColumnDef=\"no\">\r\n\t\t\t\t\t\t\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u5E8F\u53F7</th>\r\n\t\t\t\t\t\t\t\t\t\t\t<td mat-cell *matCellDef=\"let element;let i = index\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t{{i}}\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t\t\t\t\t<!-- \u6570\u636E\u5E93 -->\r\n\t\t\t\t\t\t\t\t\t\t<ng-container matColumnDef=\"name\">\r\n\t\t\t\t\t\t\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u6570\u636E\u5E93\u6307\u6807</th>\r\n\t\t\t\t\t\t\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t{{ element.Name }}\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t\t\t\t\t<!-- \u7C7B\u522B -->\r\n\t\t\t\t\t\t\t\t\t\t<ng-container matColumnDef=\"type\">\r\n\t\t\t\t\t\t\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u7C7B\u522B</th>\r\n\t\t\t\t\t\t\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t{{ element.Style==='MUST'?'\u5FC5\u987B':'\u6B63\u5E38' }}\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t\t\t\t<!-- \u6620\u5C04\u5217 -->\r\n\t\t\t\t\t\t\t\t\t\t<ng-container matColumnDef=\"mapName\" class=\"map-name\">\r\n\t\t\t\t\t\t\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u6620\u5C04\u5217</th>\r\n\t\t\t\t\t\t\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<mat-select [(ngModel)]=\"element.MapName\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<mat-option value=\"(SKIP)\">(\u5FFD\u7565)</mat-option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<mat-option\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t*ngFor=\"let val of svr.previewData.Title\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[value]=\"val\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{{val}}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<mat-option value=\"(CUSTOM)\">(\u5B9A\u503C)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t\t\t\t<!-- \u503C -->\r\n\t\t\t\t\t\t\t\t\t\t<ng-container matColumnDef=\"value\">\r\n\t\t\t\t\t\t\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u503C</th>\r\n\t\t\t\t\t\t\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<input matInput [(ngModel)]=\"element.Value\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t[disabled]=\"element.MapName !=='(CUSTOM)'\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t\t\t\t<!-- \u5907\u6CE8 -->\r\n\t\t\t\t\t\t\t\t\t\t<ng-container matColumnDef=\"comment\">\r\n\t\t\t\t\t\t\t\t\t\t\t<th mat-header-cell *matHeaderCellDef>\u5907\u6CE8</th>\r\n\t\t\t\t\t\t\t\t\t\t\t<td mat-cell *matCellDef=\"let element\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t{{ element.Remark }}\r\n\t\t\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t\t\t\t\t<tr mat-header-row\r\n\t\t\t\t\t\t\t\t\t\t\t*matHeaderRowDef=\"['no','name', 'type', 'mapName', 'value', 'comment'];sticky: true\">\r\n\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t<tr mat-row\r\n\t\t\t\t\t\t\t\t\t\t\t*matRowDef=\"let row; columns: ['no','name', 'type', 'mapName', 'value', 'comment']\">\r\n\t\t\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t</table>\r\n\t\t\t\t\t\t\t\t</section>\r\n\t\t\t\t\t\t\t</section>\r\n\t\t\t\t\t\t\t<!-- \u2191 \u6307\u6807\u8BBE\u7F6E \u2191 -->\r\n\t\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t\t<!-- * \u2191 \u6570\u636E\u6B63\u786E\u663E\u793A\u7ED3\u675F \u2191 * -->\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<!-- * \u2191\u2191 \u6570\u636E\u9884\u89C8\u72B6\u6001 \u2191\u2191 * -->\r\n\t\t\t\t\t<!-- * \u2193\u2193 \u7A7A\u6570\u636E\u72B6\u6001 \u2193\u2193 * -->\r\n\t\t\t\t\t<ng-template class=\"data-empty\" #previewDataEmpty>\r\n\t\t\t\t\t\t<div class=\"data-empty\">\r\n\t\t\t\t\t\t\t<div class=\"empty-wrapper\">\r\n\t\t\t\t\t\t\t\t<div class=\"empty-title\">\u6682\u65E0\u5185\u5BB9</div>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<div class=\"empty-text\">\u8BF7\u8BBE\u7F6E\u5BFC\u5165\u53C2\u6570\uFF0C\u70B9\u51FB\u751F\u6210\u9884\u89C8\u6309\u94AE\u67E5\u770B</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t<!-- * \u2191\u2191 \u7A7A\u6570\u636E\u72B6\u6001\u7ED3\u675F \u2191\u2191 * -->\r\n\t\t\t\t</section>\r\n\t\t\t\t<!-- * \u2191\u2191 \u6587\u4EF6\u8BBE\u7F6E\u7ED3\u675F \u2191\u2191 * -->\r\n\t\t\t\t<footer class=\"set-button\">\r\n\t\t\t\t\t<button mat-button (click)=\"svr.step='select-file'\">\u4E0A\u4E00\u6B65</button>\r\n\t\t\t\t\t<button class=\"import-btn\" mat-flat-button\r\n\t\t\t\t\t\t[disabled]=\"!svr.previewData.Have || svr.previewData.Error !== ''\"\r\n\t\t\t\t\t\t(click)=\"svr.doImport()\">\u5BFC\u5165</button>\r\n\t\t\t\t</footer>\r\n\r\n\t\t\t</div>\r\n\r\n\t\t\t<!-- \u2191\u2191\u2191 \u6587\u4EF6\u8BBE\u7F6E\u6B65\u9AA4 \u2191\u2191\u2191 -->\r\n\t\t\t<!-- \u2193\u2193\u2193 \u5BFC\u5165\u5B8C\u6210 \u2193\u2193\u2193 -->\r\n\t\t\t<div *ngSwitchCase=\"'done'\">\r\n\t\t\t\t<div class=\"done\">\r\n\t\t\t\t\t<div class=\"done-wrapper\">\r\n\t\t\t\t\t\t<div class=\"done-title\">\r\n\t\t\t\t\t\t\t<span>\u6587\u4EF6\u5BFC\u5165\u5B8C\u6210</span>\r\n\t\t\t\t\t\t\t<div class=\"done-text\">\r\n\t\t\t\t\t\t\t\t\u672C\u9875\u9762\u5173\u95ED\u540E\u53EF\u5728<a class=\"text-check\"\r\n\t\t\t\t\t\t\t\t\t[routerLink]=\"svr.taskInfoURL\">\u4EFB\u52A1\u67E5\u8BE2</a>\u9875\u9762\u4E2D\u67E5\u770B\u6587\u4EF6\u3002\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\r\n\r\n\t\t\t\t\t\t<div class=\"btn\">\r\n\t\t\t\t\t\t\t<button mat-flat-button (click)=\"tabs.close()\">\u5173\u95ED</button>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\r\n\r\n\t\t\t</div>\r\n\t\t\t<!-- \u2191\u2191\u2191 \u5BFC\u5165\u5B8C\u6210 \u2191\u2191\u2191 -->\r\n\r\n\t\t</ng-container>\r\n\r\n\r\n\t</section>\r\n\r\n</div>\r\n\r\n",
                        providers: [ImportService],
                        styles: ["@charset \"UTF-8\";.main{width:100%;padding:8px 30px;box-sizing:border-box}@media (max-width:1460px){.main-left{padding-left:176px;padding-right:12px}}.display0{display:none}.nav-icon{position:absolute;top:8px;left:-28px;width:16px;height:16px;z-index:99}.nav-notice{position:absolute;top:0;left:-172px;width:168px;padding-left:4px;padding-right:4px;box-sizing:border-box}.notice-wrapper{width:160px;box-sizing:border-box;margin-left:4px;margin-right:4px;padding:8px;border-radius:4px;box-shadow:0 2px 5px rgba(0,0,0,.14)}.notice-text,.notice-title{font-size:14px}.notice-title{font-weight:700}.section-wrapper{position:relative;width:100%;max-width:960px;max-height:calc(100vh - 16px - 48px);margin:0 auto;box-sizing:border-box}.import-wrapper,.setting-wrapper{width:100%;max-width:960px;height:100%;margin-bottom:4px;padding:24px 24px 16px;box-sizing:border-box;border-radius:4px;box-shadow:0 2px 5px rgba(0,0,0,.14)}.import-wrapper header,.setting-wrapper header{font:20px bold;white-space:nowrap}.import-wrapper .icon-text,.import-wrapper .select-text,.setting-wrapper .icon-text,.setting-wrapper .select-text{margin-top:8px;font-size:14px;white-space:nowrap}.import-wrapper .select-wrapper,.import-wrapper .table-wrapper,.setting-wrapper .select-wrapper,.setting-wrapper .table-wrapper{margin-top:24px}.import-wrapper .select-wrapper,.setting-wrapper .select-wrapper{text-align:center;box-sizing:border-box}.import-wrapper .select-wrapper .select-main,.setting-wrapper .select-wrapper .select-main{display:flex;flex-direction:column;justify-content:center;align-items:center;width:240px;height:240px;box-sizing:border-box;border-radius:4px;box-shadow:0 2px 5px rgba(0,0,0,.14);margin:0 auto;cursor:pointer}.import-wrapper .select-wrapper .select-main .icon,.setting-wrapper .select-wrapper .select-main .icon{width:120px;height:120px}.import-wrapper .select-wrapper .select-main .icon-text,.setting-wrapper .select-wrapper .select-main .icon-text{display:flex;justify-content:center;align-items:center}.table-wrapper{width:100%}.table-wrapper header .layout-title{font:18px bold}.table-wrapper header .layout-text{position:relative;display:flex;justify-content:space-between;align-items:center;font-size:12px}.table-wrapper header .layout-text .text-left{overflow:hidden}.table-wrapper header .layout-text .float-table-info{position:absolute;top:-100px;right:0;width:160px;height:88px;box-sizing:border-box;padding:8px;box-shadow:0 2px 5px rgba(0,0,0,.14)}.table-wrapper header .layout-text .float-table-info div{display:flex;justify-content:space-between;width:100%;height:24px;line-height:24px}.table-wrapper header .layout-text span{flex-grow:160px}.table-wrapper header .layout-text span .float-table-info{display:none}.table-wrapper header .layout-text span:hover .float-table-info{display:block}.table-wrapper .import-table{height:calc(100vh - 560px);max-height:calc(100vh - 430px);min-height:80px;margin-top:16px;overflow:hidden}.table-wrapper .import-table .table-box{width:100%;max-height:356px;overflow:auto}.table-wrapper .import-table table{width:100%;box-sizing:border-box}.table-wrapper .import-table td,.table-wrapper .import-table th{height:32px;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.next-step{display:flex;justify-content:flex-end;margin-top:24px}.upload{display:flex;justify-content:center;align-items:center;width:100%;height:calc(100vh - 30px - 32px)}.upload .upload-wrapper{width:624px;height:456px;margin-top:-60px;background:url(/front/assets/export/prepare.png) top center/300px 300px no-repeat;box-shadow:0 2px 5px 0 rgba(0,0,0,.14);box-sizing:border-box;text-align:center}.upload .upload-wrapper .upload-text,.upload .upload-wrapper .upload-title{width:100%;box-sizing:border-box}.upload .upload-wrapper .upload-title{padding:271px 128px 0;font-size:24px}.upload .upload-wrapper .upload-text{padding:116px 128px 16px;font-size:12px}.setting-wrapper .set-title{font:20px bold}.setting-wrapper .set-select{display:flex;justify-content:space-between;box-sizing:border-box;width:100%;height:60px;line-height:60px;font-size:14px}.setting-wrapper .set-select .select-1,.setting-wrapper .set-select .select-2,.setting-wrapper .set-select .select-3,.setting-wrapper .set-select .select-4{overflow:hidden}.setting-wrapper .set-select .select-1{padding-right:40px}.setting-wrapper .set-select .select-2{display:flex;flex-wrap:nowrap;align-items:center;white-space:nowrap}.setting-wrapper .set-select .select-2 ::ng-deep .mat-form-field{width:100%}.setting-wrapper .set-select .select-4{display:flex;align-items:center;padding-left:8px}.setting-wrapper .set-select .select-4 button{display:flex;justify-content:center;width:96px;height:40px}.setting-wrapper .set-select .select-4 button .icon-done{width:24px;height:24px}.setting-wrapper .set-data .preview-data .error-wrapper{width:100%;margin-top:32px;margin-bottom:8px;padding:8px 16px;box-sizing:border-box;border-radius:4px}.setting-wrapper .set-data .preview-data .error-wrapper .error-title{display:flex;align-items:center;margin-bottom:8px;font:14px bold}.setting-wrapper .set-data .preview-data .error-wrapper .error-title .report-problem{width:16px;height:16px;margin-right:8px}.setting-wrapper .set-data .preview-data .error-wrapper .error-text{font-size:12px}.setting-wrapper .set-data .preview-data .row100 header{margin-top:16px;margin-bottom:8px;font-size:12px;display:flex;align-content:space-between}.setting-wrapper .set-data .preview-data .row100 section.row100-data{width:100%;max-height:200px;overflow:auto}.setting-wrapper .set-data .preview-data .row100 section.row100-data table{width:100%;border-collapse:collapse;box-sizing:border-box;font-size:14px}.setting-wrapper .set-data .preview-data .row100 section.row100-data td,.setting-wrapper .set-data .preview-data .row100 section.row100-data th{height:40px;padding:0 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box}.setting-wrapper .set-data .preview-data .row100 section.row100-data th{text-align:left}.setting-wrapper .set-data .preview-data .set-index{width:100%;padding-top:32px}.setting-wrapper .set-data .preview-data .set-index .title{font:16px bold}.setting-wrapper .set-data .preview-data .set-index .text{padding-top:16px;padding-bottom:16px;font-size:12px;overflow:hidden}.setting-wrapper .set-data .preview-data .set-index .index-data{width:100%;height:calc(100vh - 550px);max-height:310px;min-height:80px;overflow:auto}.setting-wrapper .set-data .preview-data .set-index .index-data table{width:100%;box-sizing:border-box}.setting-wrapper .set-data .preview-data .set-index .index-data td,.setting-wrapper .set-data .preview-data .set-index .index-data th{height:40px;padding-right:8px;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.setting-wrapper .set-data .preview-data .set-index .index-data .mat-column-mapName{width:200px}.setting-wrapper .set-data .data-empty{width:100%;height:336px;margin-bottom:24px;box-sizing:border-box;text-align:center}.setting-wrapper .set-data .data-empty .empty-wrapper{width:336px;margin:0 auto;padding-top:282px;padding-bottom:8px;background:url(/front/assets/import/nocontent.png) top center/300px 300px no-repeat;text-align:center}.setting-wrapper .set-data .data-empty .empty-wrapper .empty-title{font:24px bold}.setting-wrapper .set-data .data-empty .empty-text{font-size:14px}.setting-wrapper footer.set-button{text-align:right;margin-top:24px}.setting-wrapper footer.set-button .import-btn{margin-left:16px}.done{display:flex;justify-content:center;align-items:center;width:100%;height:calc(100vh - 30px - 32px)}.done .done-wrapper{width:624px;height:456px;margin-top:-60px;background:url(/front/assets/import/done.png) top center/300px 300px no-repeat;box-shadow:0 2px 5px 0 rgba(0,0,0,.14);box-sizing:border-box}.done .done-wrapper .done-text,.done .done-wrapper .done-title{width:100%;box-sizing:border-box}.done .done-wrapper .done-title{padding:290px 128px 0}.done .done-wrapper .done-title span{font-size:24px}.done .done-wrapper .done-text{padding-top:16px;font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.done .done-wrapper .done-text .text-check{font-weight:700}.done .done-wrapper .btn{width:100%;text-align:right;padding:44px 24px 16px 0;box-sizing:border-box}.clear-tip{position:absolute;display:none;bottom:0;width:100%;box-sizing:border-box}.tip-wrapper{display:flex;justify-content:space-between;align-items:center;width:340px;height:50px;font:14px bold;margin:0 auto;padding:0 16px;border-radius:4px;border:1px solid #333}.clear-tip-show{display:block}"]
                    }] }
        ];
        /** @nocollapse */
        ImportComponent.ctorParameters = function () { return [
            { type: ImportService },
            { type: dialog.MatDialog },
            { type: TabsService }
        ]; };
        ImportComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.import',] }],
            exp: [{ type: core.ViewChild, args: ['exp', { static: true },] }]
        };
        return ImportComponent;
    }());
    if (false) {
        /** @type {?} */
        ImportComponent.prototype.hostClass;
        /** @type {?} */
        ImportComponent.prototype.exp;
        /** @type {?} */
        ImportComponent.prototype.isDisplay0;
        /** @type {?} */
        ImportComponent.prototype.isDisplayflex;
        /** @type {?} */
        ImportComponent.prototype.isInfo;
        /** @type {?} */
        ImportComponent.prototype.isHidden;
        /** @type {?} */
        ImportComponent.prototype.isShowSpan;
        /** @type {?} */
        ImportComponent.prototype.svr;
        /** @type {?} */
        ImportComponent.prototype.dialog;
        /** @type {?} */
        ImportComponent.prototype.tabs;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ɵ0$4 = dbwebCore.SaveStateData;
    var ImportModule = /** @class */ (function () {
        function ImportModule() {
        }
        ImportModule.decorators = [
            { type: core.NgModule, args: [{
                        declarations: [ImportComponent],
                        imports: [
                            icon.MatIconModule,
                            button.MatButtonModule,
                            common.CommonModule,
                            dialog.MatDialogModule,
                            checkbox.MatCheckboxModule,
                            radio.MatRadioModule,
                            input.MatInputModule,
                            forms.FormsModule,
                            progressBar.MatProgressBarModule,
                            table.MatTableModule,
                            material.MatSnackBarModule,
                            select.MatSelectModule,
                            router.RouterModule.forChild([
                                {
                                    path: '**',
                                    component: ImportComponent,
                                    data: ɵ0$4
                                }
                            ])
                        ]
                    },] }
        ];
        return ImportModule;
    }());

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var LoginComponent = /** @class */ (function () {
        function LoginComponent(auth, project, snackBar, authLogin) {
            this.auth = auth;
            this.project = project;
            this.snackBar = snackBar;
            this.authLogin = authLogin;
            this.hide = true;
            this.eyehide = true;
            this.hostClass = true;
            this.logging = false;
        }
        /**
         * @return {?}
         */
        LoginComponent.prototype.userNameEnter = /**
         * @return {?}
         */
        function () {
            this.pwd.nativeElement.focus();
        };
        /**
         * @return {?}
         */
        LoginComponent.prototype.passwordEnter = /**
         * @return {?}
         */
        function () {
            this.btnOk.nativeElement.click();
        };
        /**
         * @return {?}
         */
        LoginComponent.prototype.btnOkClick = /**
         * @return {?}
         */
        function () {
            var _this = this;
            if (this.snack) {
                this.snack.dismiss();
            }
            if (!this.password || !this.userName) {
                this.snack = this.snackBar.open('用户名或密码不能为空', '确定', {
                    verticalPosition: 'top',
                    duration: 5000
                });
                return;
            }
            this.logging = true;
            this.auth.login({ UserName: this.userName, Md5Password: (/** @type {?} */ (tsMd5.Md5.hashStr(this.password))) }).subscribe((/**
             * @param {?} n
             * @return {?}
             */
            function (n) {
                _this.authLogin.loginDefault(n);
                _this.logging = false;
            }), (/**
             * @param {?} err
             * @return {?}
             */
            function (err) {
                console.log(err);
                _this.logging = false;
                _this.snack = _this.snackBar.open('用户名或密码错误', '确定', { verticalPosition: 'top' });
            }));
        };
        /**
         * @return {?}
         */
        LoginComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        /**
         * @return {?}
         */
        LoginComponent.prototype.refresh = /**
         * @return {?}
         */
        function () {
            window.location.reload();
        };
        LoginComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-app-login',
                        template: "<ng-container [ngSwitch]=\"project.applicationStatus\">\r\n\t<!-- \u9690\u85CF\u5185\u5BB9 -->\r\n\t<div *ngSwitchCase=\"'start-init'\" class=\"flash-div\">\r\n\t\t<div class=\"\u8FDE\u63A5\u670D\u52A1\">\r\n\t\t\t<img src=\"/front/assets/login/\u8FDE\u63A5\u4E2D.png\" alt=\"\u8FDE\u63A5\u4E2D...\" />\r\n\t\t</div>\r\n\t</div>\r\n\t<div *ngSwitchCase=\"'init-error'\" class=\"flash-div\">\r\n\t\t<div class=\"\u8FDE\u63A5\u670D\u52A1\">\r\n\t\t\t<img src=\"/front/assets/login/\u670D\u52A1\u5668\u6545\u969C.png\" alt=\"\u670D\u52A1\u5668\u6545\u969C\" />\r\n\t\t\t<button class=\"\u5237\u65B0\u6309\u94AE\" mat-stroked-button (click)=\"refresh()\">\r\n\t\t\t\t\u5237\u65B0\u8BD5\u8BD5\r\n\t\t\t</button>\r\n\t\t</div>\r\n\t</div>\r\n\r\n\t<!-- *** \u4E3B\u4F53 *** -->\r\n\t<div class=\"login-main\" *ngSwitchCase=\"'init-done'\">\r\n\r\n\t\t<!-- ** \u767B\u5F55\u7A97\u53E3 ** -->\r\n\t\t<div class=\"login-container\">\r\n\t\t\t<!-- * \u6CE8\u518C\u6587\u5B57\u7A97\u53E3\u6846\u67B6 * -->\r\n\t\t\t<div class=\"login-wrapper\">\r\n\r\n\t\t\t\t<!-- \u767B\u5F55\u6587\u672C -->\r\n\t\t\t\t<div class=\"log-tit\">\u767B\u5F55</div>\r\n\r\n\t\t\t\t<!-- \u7528\u6237\u540D -->\r\n\t\t\t\t<div class=\"input-wrapper\">\r\n\t\t\t\t\t<mat-form-field class=\"user-input\">\r\n\t\t\t\t\t\t<input matInput #username autofocus placeholder=\"\u7528\u6237\u540D\" maxlength=\"30\"\r\n\t\t\t\t\t\t\t[(ngModel)]=\"userName\" (keyup.enter)=\"userNameEnter()\" [disabled]=\"logging\">\r\n\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t<!-- \u5BC6\u7801 -->\r\n\t\t\t\t<div class=\"input-wrapper\">\r\n\t\t\t\t\t<mat-form-field class=\"pwd-input\">\r\n\t\t\t\t\t\t<!-- left -->\r\n\t\t\t\t\t\t<input matInput #edtPassword placeholder=\"\u5BC6\u7801\" [(ngModel)]=\"password\"\r\n\t\t\t\t\t\t\t[type]=\"hide ? 'password' : 'text'\" maxlength=\"30\" [disabled]=\"logging\"\r\n\t\t\t\t\t\t\t(keyup.enter)=\"passwordEnter()\">\r\n\t\t\t\t\t\t<!-- right icon -->\r\n\t\t\t\t\t\t<mat-icon class=\"eye-icon\" matSuffix\r\n\t\t\t\t\t\t\t[svgIcon]=\"hide ? 'visibility' : 'visibility_off'\"\r\n\t\t\t\t\t\t\t(click)=\"hide = !hide\">\r\n\t\t\t\t\t\t</mat-icon>\r\n\t\t\t\t\t</mat-form-field>\r\n\r\n\t\t\t\t</div>\r\n\r\n\t\t\t\t<!-- \u767B\u5F55\u6309\u94AE -->\r\n\t\t\t\t<div class=\"login-btn-wrapper\">\r\n\t\t\t\t\t<button class=\"login-button\" #btnOk mat-button (click)=\"btnOkClick()\" [disabled]=\"logging\">\r\n\t\t\t\t\t\t<ng-container *ngIf=\"logging;else notlogging\">\r\n\t\t\t\t\t\t\t<mat-spinner diameter=\"40\"></mat-spinner>\r\n\t\t\t\t\t\t</ng-container>\r\n\t\t\t\t\t\t<ng-template #notlogging>\r\n\t\t\t\t\t\t\t\u767B\u5F55\r\n\t\t\t\t\t\t</ng-template>\r\n\t\t\t\t\t</button>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\t<!-- ** \u5DE6\u4E0A\u89D2\u7CFB\u7EDF\u540D\u79F0 ** -->\r\n\t<div class=\"login-title\">{{project.projectLabel}}</div>\r\n\r\n</ng-container>\r\n",
                        styles: ["@charset \"UTF-8\";.login-main{display:-moz-flex;display:-ms-flex;display:flex;justify-content:center;align-items:center;width:100%;height:100%;background-image:url(/front/assets/login/bg.svg);background-size:cover}.login-main .login-container{display:flex;justify-content:flex-end;align-items:center;width:640px;height:448px;background-image:url(/front/assets/login/bg_login.png);background-size:cover;border-radius:8px;box-shadow:0 5px 13px 0 rgba(0,0,0,.14)}.login-main .login-container .login-wrapper{display:flex;flex-direction:column;justify-content:space-around;width:370px;height:390px;padding:0 45px;box-sizing:border-box}.login-main .login-container .login-wrapper .log-tit{font-size:36px;font-weight:700}.login-main .login-container .login-wrapper .pwd-input,.login-main .login-container .login-wrapper .user-input{width:100%;height:30px}.login-main .login-container .login-wrapper .pwd-input{margin-top:6px}.login-main .login-container .login-wrapper .pwd-input input{width:90%}.login-main .login-container .login-wrapper .pwd-input .eye-icon{position:absolute;right:0;top:-18px;font-size:16px}.login-main .login-container .login-wrapper .login-btn-wrapper{display:flex;justify-content:flex-end}.login-main .login-container .login-wrapper .login-btn-wrapper .mat-spinner circle,.login-main .login-container .login-wrapper .login-btn-wrapper ::ng-deep .mat-progress-spinner circle{stroke:#fff}.login-main .login-container .login-wrapper .login-btn-wrapper .login-button{display:flex;justify-content:center;font-size:24px;color:#fff;background-color:#2196f3;width:168px;height:56px;box-shadow:rgba(33,150,243,.5) 0 5px 13px 2px;margin-top:80px}.login-title{position:absolute;top:20px;left:20px;color:rgba(0,0,0,.6)}.flash-div{width:100%;height:100%;display:-moz-flex;display:-ms-flex;display:flex;justify-content:center;align-items:center;overflow-y:auto}.\u8FDE\u63A5\u670D\u52A1{max-width:560px;width:100%;text-align:center}.\u8FDE\u63A5\u670D\u52A1 img{width:100%;height:auto}.\u5237\u65B0\u6309\u94AE{border:1px solid #2196f3;color:#2196f3;width:120px;height:40px;font-size:16px;font-weight:700}"]
                    }] }
        ];
        /** @nocollapse */
        LoginComponent.ctorParameters = function () { return [
            { type: dbwebCore.AuthService },
            { type: dbwebCore.ProjectService },
            { type: snackBar.MatSnackBar },
            { type: dbwebCore.AuthloginService }
        ]; };
        LoginComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.login',] }],
            username: [{ type: core.ViewChild, args: ['username', { static: false },] }],
            pwd: [{ type: core.ViewChild, args: ['edtPassword', { static: false },] }],
            btnOk: [{ type: core.ViewChild, args: ['btnOk', { read: core.ElementRef, static: false },] }]
        };
        return LoginComponent;
    }());
    if (false) {
        /** @type {?} */
        LoginComponent.prototype.userName;
        /** @type {?} */
        LoginComponent.prototype.password;
        /** @type {?} */
        LoginComponent.prototype.hide;
        /** @type {?} */
        LoginComponent.prototype.eyehide;
        /** @type {?} */
        LoginComponent.prototype.hostClass;
        /** @type {?} */
        LoginComponent.prototype.username;
        /** @type {?} */
        LoginComponent.prototype.pwd;
        /** @type {?} */
        LoginComponent.prototype.btnOk;
        /** @type {?} */
        LoginComponent.prototype.snack;
        /** @type {?} */
        LoginComponent.prototype.logging;
        /** @type {?} */
        LoginComponent.prototype.auth;
        /** @type {?} */
        LoginComponent.prototype.project;
        /** @type {?} */
        LoginComponent.prototype.snackBar;
        /** @type {?} */
        LoginComponent.prototype.authLogin;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ɵ0$5 = dbwebCore.SaveStateData;
    var LoginModule = /** @class */ (function () {
        function LoginModule() {
        }
        LoginModule.decorators = [
            { type: core.NgModule, args: [{
                        imports: [
                            common.CommonModule,
                            button.MatButtonModule,
                            formField.MatFormFieldModule,
                            card.MatCardModule,
                            input.MatInputModule,
                            forms.FormsModule,
                            material.MatProgressSpinnerModule,
                            snackBar.MatSnackBarModule,
                            icon.MatIconModule,
                            router.RouterModule.forChild([
                                {
                                    path: '',
                                    pathMatch: 'full',
                                    redirectTo: 'default/project/login'
                                },
                                {
                                    path: '**',
                                    component: LoginComponent,
                                    data: ɵ0$5
                                }
                            ])
                        ],
                        declarations: [LoginComponent],
                        exports: [LoginComponent]
                    },] }
        ];
        return LoginModule;
    }());

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /**
     * @record
     */
    function TaslResultType() { }
    if (false) {
        /** @type {?} */
        TaslResultType.prototype.ZipFileSize;
        /** @type {?} */
        TaslResultType.prototype.ZipFileURL;
        /** @type {?} */
        TaslResultType.prototype.MoreProgressURL;
        /** @type {?} */
        TaslResultType.prototype.MoreProgressURLSign;
        /** @type {?} */
        TaslResultType.prototype.PROGRESS;
        /** @type {?} */
        TaslResultType.prototype.Message;
    }
    /**
     * @record
     */
    function ResultArray() { }
    if (false) {
        /** @type {?} */
        ResultArray.prototype.LOGTIME;
        /** @type {?} */
        ResultArray.prototype.ROWNO;
        /** @type {?} */
        ResultArray.prototype.TASKID;
    }
    var TaskState = /** @class */ (function () {
        function TaskState() {
            // 任务完成
            this.complete = 'completed';
            // 任务进行中
            this.running = 'running';
            // 任务出错
            this.error = 'error';
        }
        return TaskState;
    }());
    if (false) {
        /** @type {?} */
        TaskState.prototype.complete;
        /** @type {?} */
        TaskState.prototype.running;
        /** @type {?} */
        TaskState.prototype.error;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var TaskService = /** @class */ (function () {
        function TaskService(taskhttp) {
            this.taskhttp = taskhttp;
        }
        /**
         * @return {?}
         */
        TaskService.prototype.GetTaskMessage = /**
         * @return {?}
         */
        function () {
            return this.taskhttp.get('taskinfo');
        };
        TaskService.decorators = [
            { type: core.Injectable, args: [{
                        providedIn: 'root'
                    },] }
        ];
        /** @nocollapse */
        TaskService.ctorParameters = function () { return [
            { type: dbwebCore.CurrentApiService }
        ]; };
        /** @nocollapse */ TaskService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function TaskService_Factory() { return new TaskService(core.ɵɵinject(dbwebCore.CurrentApiService)); }, token: TaskService, providedIn: "root" });
        return TaskService;
    }());
    if (false) {
        /**
         * @type {?}
         * @private
         */
        TaskService.prototype.taskhttp;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var TaskComponent = /** @class */ (function () {
        function TaskComponent(theme, tservice, eles, router, taskState) {
            var _this = this;
            this.theme = theme;
            this.tservice = tservice;
            this.eles = eles;
            this.router = router;
            this.taskState = taskState;
            this.hostClass = true;
            this.detailMode = false;
            this.IsMoreProgressUrl = false;
            this.options = { maxLines: 20, printMargin: false };
            this.subs = [];
            this.subs.push(this.theme.theme.subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.themeModel = v.model;
            })));
        }
        /**
         * @return {?}
         */
        TaskComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            var _this = this;
            ace.config.set('basePath', '/front/assets/ace-builds/src-min-noconflict');
            this.tservice.GetTaskMessage().subscribe((/**
             * @param {?} n
             * @return {?}
             */
            function (n) {
                _this.resultInfo = n;
                if (_this.resultInfo.MoreProgressURL !== '') {
                    _this.eles.setURLSign(_this.resultInfo.MoreProgressURL, _this.resultInfo.MoreProgressURLSign);
                    _this.IsMoreProgressUrl = true;
                }
                if (_this.resultInfo.ZipFileURL !== '') {
                    _this.resultInfo.ZipFileURL = dbwebCore.fullApiPath(_this.resultInfo.ZipFileURL);
                }
            }));
        };
        /**
         * @return {?}
         */
        TaskComponent.prototype.ngOnDestroy = /**
         * @return {?}
         */
        function () {
            this.subs.forEach((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.unsubscribe(); }));
        };
        /**
         * @param {?} event
         * @return {?}
         */
        TaskComponent.prototype.moreProgressClick = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            this.router.navigateByUrl(this.resultInfo.MoreProgressURL);
        };
        TaskComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-task',
                        template: "<common-bill #bill>\r\n\t<div class=\"backgroundstyle\" [formGroup]=\"bill.formGroup\"\r\n\t\t*ngIf=\"bill.formGroup\">\r\n\t\t<div *ngIf=\"detailMode\" class=\"Task-public Task-open  mat-elevation-z2\">\r\n\t\t\t<!-- <ng-template matStepLabel>\u4E0B\u8F7D</ng-template> -->\r\n\t\t\t<div class=\"title\">\u67E5\u770B\u4EFB\u52A1</div>\r\n\t\t\t<div class=\"task-content\">\r\n\t\t\t\t<div class=\"\u67E5\u770B\u4EFB\u52A1\">\r\n\t\t\t\t\t<div class=\"tabbletr\">\r\n\t\t\t\t\t\t<mat-icon svgIcon=\"link\"></mat-icon>\r\n\t\t\t\t\t\t<div class=\"\u4EFB\u52A1\u6807\u9898\">\u540D\u79F0</div>\r\n\t\t\t\t\t\t<div class=\"\u4EFB\u52A1\u53C2\u6570\">\r\n\t\t\t\t\t\t\t<span>{{ bill.formGroup.get('Name').value }}</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"tabbletr\">\r\n\t\t\t\t\t\t<mat-icon svgIcon=\"picture_in_picture_alt\"></mat-icon>\r\n\t\t\t\t\t\t<div class=\"\u4EFB\u52A1\u6807\u9898\">\u6D41\u6C34\u53F7</div>\r\n\t\t\t\t\t\t<div class=\"\u4EFB\u52A1\u53C2\u6570\">\r\n\t\t\t\t\t\t\t<span>{{ bill.formGroup.get('ID').value }}</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"tabbletr\">\r\n\t\t\t\t\t\t<mat-icon svgIcon=\"outlined:person\"></mat-icon>\r\n\t\t\t\t\t\t<div class=\"\u4EFB\u52A1\u6807\u9898\">\u6267\u884C\u4EBA</div>\r\n\t\t\t\t\t\t<div class=\"\u4EFB\u52A1\u53C2\u6570\">\r\n\t\t\t\t\t\t\t<span>{{ bill.formGroup.get('Executor').value }}</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"tabbletr\">\r\n\t\t\t\t\t\t<mat-icon svgIcon=\"domain\"></mat-icon>\r\n\t\t\t\t\t\t<div class=\"\u4EFB\u52A1\u6807\u9898\">\u6240\u5C5E\u90E8\u95E8</div>\r\n\t\t\t\t\t\t<div class=\"\u4EFB\u52A1\u53C2\u6570\">\r\n\t\t\t\t\t\t\t<span>{{ bill.formGroup.get('ExeDept').value }}</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"tabbletr\">\r\n\t\t\t\t\t\t<mat-icon svgIcon=\"outlined:router\"></mat-icon>\r\n\t\t\t\t\t\t<div class=\"\u4EFB\u52A1\u6807\u9898\">IP\u5730\u5740</div>\r\n\t\t\t\t\t\t<div class=\"\u4EFB\u52A1\u53C2\u6570\">\r\n\t\t\t\t\t\t\t<span>{{ bill.formGroup.get('ExeIP').value }}</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"tabbletr\">\r\n\t\t\t\t\t\t<mat-icon svgIcon=\"schedule\"></mat-icon>\r\n\t\t\t\t\t\t<div class=\"\u4EFB\u52A1\u6807\u9898\">\u5F00\u59CB\u65F6\u95F4</div>\r\n\t\t\t\t\t\t<div class=\"\u4EFB\u52A1\u53C2\u6570\">\r\n\t\t\t\t\t\t\t<span>{{ bill.formGroup.get('ExeTime').value | date: 'yyyy-MM-dd HH:mm:ss' }}</span>\r\n\t\t\t\t\t\t\t<span>{{ bill.formGroup.get('CompletedTime').value | date: 'yyyy-MM-dd HH:mm:ss' }}</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"tabbletr\">\r\n\t\t\t\t\t\t<mat-icon svgIcon=\"outlined:flag\"></mat-icon>\r\n\t\t\t\t\t\t<div class=\"\u4EFB\u52A1\u6807\u9898\">\u72B6\u6001</div>\r\n\t\t\t\t\t\t<div class=\"\u4EFB\u52A1\u53C2\u6570\">\r\n\t\t\t\t\t\t\t<span>{{ bill.formGroup.get('Status').value }}</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"\u5206\u5272\u7EBF\"></div>\r\n\t\t\t\t<div class=\"\u8BE6\u60C5\">\r\n\t\t\t\t\t<div class=\"\u8FDB\u5EA6\u62A5\u544A\">\r\n\t\t\t\t\t\t<div class=\"detailsTitle\">\r\n\t\t\t\t\t\t\t\u8FDB\u5EA6\u62A5\u544A\r\n\t\t\t\t\t\t\t<span *ngIf=\"IsMoreProgressUrl\"\r\n\t\t\t\t\t\t\t\t(click)=\"moreProgressClick($event)\">\u67E5\u770B\u6240\u6709\u8FDB\u5EA6\r\n\t\t\t\t\t\t\t\t<mat-icon svgIcon=\"chevron_right\"></mat-icon>\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div class=\"prTable\">\r\n\t\t\t\t\t\t\t<tr *ngFor=\"let res of resultInfo?.PROGRESS; let index = index\"\r\n\t\t\t\t\t\t\t\tclass=\"prStrip\">\r\n\t\t\t\t\t\t\t\t<td class=\"prtableID\">{{ index + 1 }}</td>\r\n\t\t\t\t\t\t\t\t<td class=\"prtableTime\">\r\n\t\t\t\t\t\t\t\t\t{{ res.LOGTIME | date: 'yyyy-MM-dd HH:mm:ss' }}\r\n\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t<td class=\"prtableContent\">{{ res.CONTENT }}\r\n\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"\u53C2\u6570\">\r\n\t\t\t\t\t\t<div class=\"detailsTitle\">\u53C2\u6570</div>\r\n\t\t\t\t\t\t<div class=\"parameterbox\">\r\n\t\t\t\t\t\t\t<div ace-editor\r\n\t\t\t\t\t\t\t\t[text]=\"bill.formGroup.get('Params').value\"\r\n\t\t\t\t\t\t\t\tmode=\"yaml\" [theme]=\"themeModel === 'dark' ? 'tomorrow_night' : 'eclipse'\"\r\n\t\t\t\t\t\t\t\t[options]=\"options\" [autoUpdateContent]=\"true\"\r\n\t\t\t\t\t\t\t\t[durationBeforeCallback]=\"1000\"\r\n\t\t\t\t\t\t\t\tstyle=\"min-height: 124px; width:100%; overflow: auto;\">\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"\u7ED3\u679C\">\r\n\t\t\t\t\t\t<div class=\"detailsTitle\">\u7ED3\u679C</div>\r\n\t\t\t\t\t\t<div *ngIf=\"bill.formGroup.get('Status').value == taskState.complete\"\r\n\t\t\t\t\t\t\tclass=\"complete state-content\">\r\n\t\t\t\t\t\t\t<mat-icon svgIcon=\"check_circle\"></mat-icon>\r\n\t\t\t\t\t\t\t<div [innerHtml]=\"resultInfo?.Message|newline\"></div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div *ngIf=\"bill.formGroup.get('Status').value == taskState.running\"\r\n\t\t\t\t\t\t\tclass=\"running state-content\">\r\n\t\t\t\t\t\t\t<mat-icon svgIcon=\"info\"></mat-icon>\r\n\t\t\t\t\t\t\t<div [innerHtml]=\"resultInfo?.Message|newline\"></div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div *ngIf=\"bill.formGroup.get('Status').value == taskState.error\"\r\n\t\t\t\t\t\t\tclass=\"error state-content \u62A5\u9519\u8BE6\u7EC6\">\r\n\t\t\t\t\t\t\t<mat-icon svgIcon=\"warning\"></mat-icon>\r\n\t\t\t\t\t\t\t\u62A5\u9519\u8BE6\u60C5\uFF1A<div [innerHtml]=\"resultInfo?.Message|newline\"></div>\r\n\t\t\t\t\t\t\t<div class=\"\u5168\u90E8\u4FE1\u606F\"\r\n\t\t\t\t\t\t\t\t[innerHtml]=\"bill.formGroup.get('Result').value|newline\">\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"download\">\r\n\t\t\t\t<a *ngIf=\"resultInfo?.ZipFileURL\"\r\n\t\t\t\t\t[href]=\"resultInfo?.ZipFileURL\">\r\n\t\t\t\t\t<mat-icon svgIcon=\"save_alt\"></mat-icon>\r\n\t\t\t\t\t\u4E0B\u8F7D\u7ED3\u679C&nbsp;({{ resultInfo?.ZipFileSize | number }}K)\r\n\t\t\t\t</a>\r\n\t\t\t\t<div class=\"\u5C55\u5F00\u6309\u94AE\" (click)=\"detailMode = false\">\r\n\t\t\t\t\t\u6536\u8D77\u8BE6\u7EC6\u4FE1\u606F<mat-icon svgIcon=\"expand_less\"></mat-icon>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div *ngIf=\"!detailMode\"\r\n\t\t\tclass=\"Task-narrow Task-public mat-elevation-z2\">\r\n\t\t\t<div class=\"title\">\u67E5\u770B\u4EFB\u52A1</div>\r\n\t\t\t<div *ngIf=\"bill.formGroup.get('Status').value == taskState.complete\"\r\n\t\t\t\tclass=\"complete state-content\">\r\n\t\t\t\t<mat-icon svgIcon=\"check_circle\"></mat-icon>\r\n\t\t\t\t<div [innerHtml]=\"resultInfo?.Message|newline\"></div>\r\n\t\t\t</div>\r\n\t\t\t<div *ngIf=\"bill.formGroup.get('Status').value == taskState.running\"\r\n\t\t\t\tclass=\"running state-content\">\r\n\t\t\t\t<mat-icon svgIcon=\"info\"></mat-icon>\r\n\t\t\t\t<div [innerHtml]=\"resultInfo?.Message|newline\"></div>\r\n\t\t\t</div>\r\n\t\t\t<div *ngIf=\"bill.formGroup.get('Status').value == taskState.error\"\r\n\t\t\t\tclass=\"error state-content\">\r\n\t\t\t\t<mat-icon svgIcon=\"warning\"></mat-icon>\r\n\t\t\t\t\u62A5\u9519\u8BE6\u60C5\uFF1A<div [innerHtml]=\"resultInfo?.Message|newline\"></div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"download\">\r\n\t\t\t\t<a *ngIf=\"resultInfo?.ZipFileURL\"\r\n\t\t\t\t\thref=\"{{ resultInfo?.ZipFileURL }}\">\r\n\t\t\t\t\t<mat-icon svgIcon=\"save_alt\"></mat-icon>\r\n\t\t\t\t\t\u4E0B\u8F7D\u7ED3\u679C&nbsp;({{ resultInfo?.ZipFileSize | number }}K)\r\n\t\t\t\t</a>\r\n\t\t\t\t<div class=\"\u5C55\u5F00\u6309\u94AE\" (click)=\"detailMode = true\">\r\n\t\t\t\t\t\u5C55\u5F00\u8BE6\u7EC6\u4FE1\u606F<mat-icon svgIcon=\"expand_more\"></mat-icon>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</common-bill>",
                        providers: [TaskState],
                        styles: ["@charset \"UTF-8\";.backgroundstyle{width:100%;height:100%;padding:24px 0;box-sizing:border-box;overflow-y:auto}.backgroundstyle .Task-open{width:100%;height:100%;display:flex;flex-direction:column}.backgroundstyle .Task-open .task-content{flex-grow:1;width:100%;display:flex;align-items:center;overflow-y:auto}.backgroundstyle .Task-open .task-content .\u67E5\u770B\u4EFB\u52A1{width:284px;height:100%;flex-shrink:0}.backgroundstyle .Task-open .task-content .\u67E5\u770B\u4EFB\u52A1 .tabbletr{width:100%;padding-left:56px;box-sizing:border-box;margin:24px 0 0;position:relative}.backgroundstyle .Task-open .task-content .\u67E5\u770B\u4EFB\u52A1 .tabbletr .mat-icon{position:absolute;left:8px;top:8px;width:32px;height:32px;line-height:32px}.backgroundstyle .Task-open .task-content .\u67E5\u770B\u4EFB\u52A1 .tabbletr .\u4EFB\u52A1\u6807\u9898{font-size:14px;padding:8px 0}.backgroundstyle .Task-open .task-content .\u67E5\u770B\u4EFB\u52A1 .tabbletr .\u4EFB\u52A1\u53C2\u6570 span{font-size:16px;padding:0 0 8px;display:block}.backgroundstyle .Task-open .task-content .\u5206\u5272\u7EBF{width:1px;flex-shrink:0;height:calc(100% - 110px);margin:0 16px}.backgroundstyle .Task-open .task-content .\u8BE6\u60C5{width:0;flex-grow:1;height:100%}.backgroundstyle .Task-open .task-content .\u8BE6\u60C5 .\u8FDB\u5EA6\u62A5\u544A{width:100%;overflow:auto}.backgroundstyle .Task-open .task-content .\u8BE6\u60C5 .\u8FDB\u5EA6\u62A5\u544A .prTable{width:100%;overflow-x:auto;margin:16px 0 24px;max-height:176px;min-height:96px;padding:8px;box-sizing:border-box;border-radius:2px}.backgroundstyle .Task-open .task-content .\u8BE6\u60C5 .\u8FDB\u5EA6\u62A5\u544A .prTable .prStrip{height:32px;line-height:32px;font-size:16px;display:flex}.backgroundstyle .Task-open .task-content .\u8BE6\u60C5 .\u8FDB\u5EA6\u62A5\u544A .prTable .prStrip .prtableID{width:48px;padding-left:8px;box-sizing:border-box;flex-shrink:0}.backgroundstyle .Task-open .task-content .\u8BE6\u60C5 .\u8FDB\u5EA6\u62A5\u544A .prTable .prStrip .prtableTime{width:200px;flex-shrink:0}.backgroundstyle .Task-open .task-content .\u8BE6\u60C5 .\u8FDB\u5EA6\u62A5\u544A .prTable .prStrip .prtableContent{flex-grow:1;flex-shrink:0;padding-right:8px}.backgroundstyle .Task-open .task-content .\u8BE6\u60C5 .\u53C2\u6570{min-height:124px}.backgroundstyle .Task-open .task-content .\u8BE6\u60C5 .\u53C2\u6570 .parameterbox{max-height:300px;margin:16px 0 24px;min-height:124px;border-radius:4px;box-sizing:border-box;vertical-align:top;overflow:hidden}.backgroundstyle .Task-open .task-content .\u8BE6\u60C5 .\u7ED3\u679C{min-height:80px;max-height:28%}.backgroundstyle .Task-open .task-content .\u8BE6\u60C5 .detailsTitle{width:100%;font-size:14px}.backgroundstyle .Task-open .task-content .\u8BE6\u60C5 .detailsTitle span{float:right}.backgroundstyle .Task-open .task-content .\u8BE6\u60C5 .detailsTitle span .mat-icon{vertical-align:middle;width:22px;height:22px}.backgroundstyle .Task-narrow{height:auto}.backgroundstyle .Task-public{max-width:960px;width:100%;margin:0 auto;overflow-y:auto;padding:24px;box-sizing:border-box;border-radius:4px}.backgroundstyle .Task-public .title{font-size:20px;font-weight:700}.backgroundstyle .Task-public .state-content{margin:16px 0 24px;padding:16px 0 16px 24px;font-size:16px}.backgroundstyle .Task-public .state-content .mat-icon{margin-right:16px;vertical-align:middle}.backgroundstyle .Task-public .state-content div{display:inline-block}.backgroundstyle .Task-public .\u62A5\u9519\u8BE6\u7EC6{padding:16px 0 16px 24px;height:156px;overflow-y:auto}.backgroundstyle .Task-public .\u62A5\u9519\u8BE6\u7EC6 .\u5168\u90E8\u4FE1\u606F{font-size:12px;margin-top:8px}.backgroundstyle .Task-public .download{text-align:right;height:24px;line-height:24px}.backgroundstyle .Task-public .download a{height:24px;font-size:14px;text-decoration:none}.backgroundstyle .Task-public .download a .mat-icon{vertical-align:middle;margin-right:4px}.backgroundstyle .Task-public .download .\u5C55\u5F00\u6309\u94AE{cursor:pointer;display:inline-block;height:24px;font-size:14px;margin-left:32px}.backgroundstyle .Task-public .download .\u5C55\u5F00\u6309\u94AE .mat-icon{vertical-align:middle;margin-left:4px}"]
                    }] }
        ];
        /** @nocollapse */
        TaskComponent.ctorParameters = function () { return [
            { type: ThemeService },
            { type: TaskService },
            { type: dbwebCore.ElementsService },
            { type: router.Router },
            { type: TaskState }
        ]; };
        TaskComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.task',] }]
        };
        return TaskComponent;
    }());
    if (false) {
        /** @type {?} */
        TaskComponent.prototype.hostClass;
        /** @type {?} */
        TaskComponent.prototype.detailMode;
        /** @type {?} */
        TaskComponent.prototype.IsMoreProgressUrl;
        /** @type {?} */
        TaskComponent.prototype.moreEle;
        /** @type {?} */
        TaskComponent.prototype.resultInfo;
        /** @type {?} */
        TaskComponent.prototype.themeModel;
        /** @type {?} */
        TaskComponent.prototype.options;
        /** @type {?} */
        TaskComponent.prototype.subs;
        /**
         * @type {?}
         * @private
         */
        TaskComponent.prototype.theme;
        /**
         * @type {?}
         * @private
         */
        TaskComponent.prototype.tservice;
        /**
         * @type {?}
         * @private
         */
        TaskComponent.prototype.eles;
        /**
         * @type {?}
         * @private
         */
        TaskComponent.prototype.router;
        /** @type {?} */
        TaskComponent.prototype.taskState;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /*
     * Converts newlines into html breaks
    */
    var NewlinePipe = /** @class */ (function () {
        function NewlinePipe() {
        }
        /**
         * @param {?} value
         * @param {?=} args
         * @return {?}
         */
        NewlinePipe.prototype.transform = /**
         * @param {?} value
         * @param {?=} args
         * @return {?}
         */
        function (value, args) {
            if (value) {
                return value.replace(/(?:\r\n|\r|\n)/g, '<br />');
            }
            return value;
        };
        NewlinePipe.decorators = [
            { type: core.Pipe, args: [{ name: 'newline' },] }
        ];
        return NewlinePipe;
    }());

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ɵ0$6 = dbwebCore.SaveStateData;
    var TaskModule = /** @class */ (function () {
        function TaskModule() {
        }
        TaskModule.decorators = [
            { type: core.NgModule, args: [{
                        declarations: [TaskComponent, NewlinePipe],
                        imports: [
                            common.CommonModule,
                            BillModule,
                            expansion.MatExpansionModule,
                            icon.MatIconModule,
                            material.MatInputModule,
                            material.MatFormFieldModule,
                            ng2AceEditor.AceEditorModule,
                            router.RouterModule,
                            router.RouterModule.forChild([
                                {
                                    path: '**',
                                    component: TaskComponent,
                                    data: ɵ0$6
                                }
                            ])
                        ]
                    },] }
        ];
        return TaskModule;
    }());

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var VersionComponent = /** @class */ (function () {
        function VersionComponent() {
        }
        /**
         * @return {?}
         */
        VersionComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
        };
        VersionComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-version',
                        template: "<p>\n  version works!\n</p>\n",
                        styles: [""]
                    }] }
        ];
        /** @nocollapse */
        VersionComponent.ctorParameters = function () { return []; };
        return VersionComponent;
    }());

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ɵ0$7 = dbwebCore.SaveStateData;
    var VersionModule = /** @class */ (function () {
        function VersionModule() {
        }
        VersionModule.decorators = [
            { type: core.NgModule, args: [{
                        declarations: [VersionComponent],
                        imports: [
                            common.CommonModule,
                            router.RouterModule.forChild([
                                {
                                    path: '**',
                                    component: VersionComponent,
                                    data: ɵ0$7
                                }
                            ])
                        ]
                    },] }
        ];
        return VersionModule;
    }());

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /**
     * @record
     */
    function Point() { }
    if (false) {
        /** @type {?} */
        Point.prototype.x;
        /** @type {?} */
        Point.prototype.y;
    }
    /**
     * @param {?} x
     * @param {?} y
     * @param {?} m
     * @param {?} n
     * @param {?} r
     * @return {?}
     */
    function pointInCicle(x, y, m, n, r) {
        return distance(x, y, m, n) <= r;
    }
    /**
     * @param {?} x1
     * @param {?} y1
     * @param {?} x2
     * @param {?} y2
     * @return {?}
     */
    function distance(x1, y1, x2, y2) {
        /** @type {?} */
        var a = x1 - x2;
        /** @type {?} */
        var b = y1 - y2;
        return Math.sqrt(a * a + b * b);
    }
    /**
     * 求二元一次方程的系数
     * y1 = k * x1 + b => k = (y1 - b) / x1
     * y2 = k * x2 + b => y2 = ((y1 - b) / x1) * x2 + b
     * @param {?} x1
     * @param {?} y1
     * @param {?} x2
     * @param {?} y2
     * @return {?}
     */
    function binaryEquationGetKB(x1, y1, x2, y2) {
        /** @type {?} */
        var k = (y1 - y2) / (x1 - x2);
        /** @type {?} */
        var b = (x1 * y2 - x2 * y1) / (x1 - x2);
        return [k, b];
    }
    /**
     * 一元二次方程求根
     * ax² + bx + c = 0
     * @param {?} a
     * @param {?} b
     * @param {?} c
     * @return {?}
     */
    function quadEquationGetX(a, b, c) {
        /** @type {?} */
        var xArr = [];
        /** @type {?} */
        var result = Math.pow(b, 2) - 4 * a * c;
        if (result > 0) {
            xArr.push((-b + Math.sqrt(result)) / (2 * a));
            xArr.push((-b - Math.sqrt(result)) / (2 * a));
        }
        else if (result === 0) {
            xArr.push(-b / (2 * a));
        }
        return xArr;
    }
    /**
     * 求圆和直线之间的交点
     * 直线方程:y = kx + b
     * 圆的方程:(x - m)² + (x - n)² = r²
     * x1, y1 = 线坐标1, x2, y2 = 线坐标2, m, n = 圆坐标, r = 半径
     * @param {?} x1
     * @param {?} y1
     * @param {?} x2
     * @param {?} y2
     * @param {?} m
     * @param {?} n
     * @param {?} r
     * @return {?}
     */
    function getInsertPointBetweenCircleAndLine(x1, y1, x2, y2, m, n, r) {
        // 垂直的没有斜率,要特殊判断
        if (x1 === x2) {
            /** @type {?} */
            var arr = [];
            arr.push({ x: x1, y: n + r });
            arr.push({ x: x1, y: n - r });
            return arr;
        }
        // console.log(x1, y1, x2, y2, m, n, r)
        /** @type {?} */
        var kbArr = binaryEquationGetKB(x1, y1, x2, y2);
        /** @type {?} */
        var k = kbArr[0];
        /** @type {?} */
        var b = kbArr[1];
        /** @type {?} */
        var aX = 1 + k * k;
        /** @type {?} */
        var bX = 2 * k * (b - n) - 2 * m;
        /** @type {?} */
        var cX = m * m + (b - n) * (b - n) - r * r;
        /** @type {?} */
        var insertPoints = [];
        /** @type {?} */
        var xArr = quadEquationGetX(aX, bX, cX);
        xArr.forEach((/**
         * @param {?} x
         * @return {?}
         */
        function (x) {
            /** @type {?} */
            var y = k * x + b;
            insertPoints.push({ x: x, y: y });
        }));
        return insertPoints;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /**
     * @record
     */
    function MoveEvent() { }
    if (false) {
        /** @type {?} */
        MoveEvent.prototype.startDragPoint;
    }
    var PortraitMaskComponent = /** @class */ (function () {
        function PortraitMaskComponent(elRef) {
            this.elRef = elRef;
            this.hostClass = true;
            this.cx = 100;
            this.cy = 100;
            this.r = 50;
            this.handleX = 150;
            this.handleY = 100;
            this.handleR = 6;
            this.cursor = 'grab';
            this.startDrag = new core.EventEmitter();
            this.dragging = new core.EventEmitter();
            this.maskChange = new core.EventEmitter();
            this.mouseDown = this.mouseDown.bind(this);
            this.mouseUp = this.mouseUp.bind(this);
            this.move = this.move.bind(this);
        }
        /**
         * @param {?} x
         * @param {?} y
         * @return {?}
         */
        PortraitMaskComponent.prototype.toScreenPoint = /**
         * @param {?} x
         * @param {?} y
         * @return {?}
         */
        function (x, y) {
            /** @type {?} */
            var pt = this.svg.nativeElement.createSVGPoint();
            pt.x = x;
            pt.y = y;
            return pt.matrixTransform(this.svg.nativeElement.getScreenCTM());
        };
        // 将一个距离转换成屏幕尺寸
        // 将一个距离转换成屏幕尺寸
        /**
         * @param {?} val
         * @return {?}
         */
        PortraitMaskComponent.prototype.toScreenDistance = 
        // 将一个距离转换成屏幕尺寸
        /**
         * @param {?} val
         * @return {?}
         */
        function (val) {
            /** @type {?} */
            var p1 = this.toScreenPoint(0, 0);
            /** @type {?} */
            var p2 = this.toScreenPoint(val, 0);
            return p2.x - p1.x;
        };
        /**
         * @param {?} x
         * @param {?} y
         * @return {?}
         */
        PortraitMaskComponent.prototype.toSVGPoint = /**
         * @param {?} x
         * @param {?} y
         * @return {?}
         */
        function (x, y) {
            /** @type {?} */
            var pt = this.svg.nativeElement.createSVGPoint();
            pt.x = x;
            pt.y = y;
            return pt.matrixTransform(this.svg.nativeElement.getScreenCTM().inverse());
        };
        // 获取handle的受限的圆心坐标 svg
        // 获取handle的受限的圆心坐标 svg
        /**
         * @param {?} mousePoint
         * @return {?}
         */
        PortraitMaskComponent.prototype.getLimitHandleCenterPostion = 
        // 获取handle的受限的圆心坐标 svg
        /**
         * @param {?} mousePoint
         * @return {?}
         */
        function (mousePoint) {
            // 根据mouse point拿到对应的圆心位置
            /** @type {?} */
            var point = { x: mousePoint.x - this.handleDistanceOffset.x, y: mousePoint.y - this.handleDistanceOffset.y };
            // Create an SVGPoint for future math
            /** @type {?} */
            var r = distance(point.x, point.y, this.cx, this.cy);
            if (r <= this.maxR) {
                return point;
            }
            r = this.maxR;
            /** @type {?} */
            var arr = getInsertPointBetweenCircleAndLine(this.cx, this.cy, point.x, point.y, this.cx, this.cy, r);
            /** @type {?} */
            var d1 = distance(point.x, point.y, arr[0].x, arr[0].y);
            /** @type {?} */
            var d2 = distance(point.x, point.y, arr[1].x, arr[1].y);
            if (d1 < d2) {
                return arr[0];
            }
            else {
                return arr[1];
            }
        };
        // tslint:disable-next-line: quotemark
        // tslint:disable-next-line: quotemark
        /**
         * @param {?} event
         * @return {?}
         */
        PortraitMaskComponent.prototype.mouseDown = 
        // tslint:disable-next-line: quotemark
        /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            if (event.button !== 0) {
                return;
            }
            /** @type {?} */
            var p = this.toSVGPoint(event.x, event.y);
            this.handleDistanceOffset = { x: p.x - this.handleX, y: p.y - this.handleY };
            this.maskDistanceOffset = { x: p.x - this.cx, y: p.y - this.cy };
            this.startDragPoint = { x: event.x, y: event.y };
            if (pointInCicle(p.x, p.y, this.handleX, this.handleY, this.handleR)) {
                this.dragType = 'handle';
            }
            else if (pointInCicle(p.x, p.y, this.cx, this.cy, this.r)) {
                this.dragType = 'mask';
            }
            else {
                this.dragType = 'outside';
                this.startDrag.emit(event);
            }
            window.addEventListener('mousemove', this.move, false);
            window.addEventListener('mouseup', this.mouseUp, false);
            event.stopPropagation();
        };
        /**
         * @return {?}
         */
        PortraitMaskComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            this.calcSize();
        };
        /**
         * @return {?}
         */
        PortraitMaskComponent.prototype.emitMaskRect = /**
         * @return {?}
         */
        function () {
            /** @type {?} */
            var p1 = this.toScreenPoint(this.cx - this.r, this.cy - this.r);
            /** @type {?} */
            var p2 = this.toScreenPoint(this.cx + this.r, this.cy + this.r);
            this.maskChange.emit({
                left: p1.x,
                top: p1.y,
                right: p2.x,
                bottom: p2.y,
                width: p2.x - p1.x,
                height: p2.y - p1.y
            });
        };
        /**
         * @return {?}
         */
        PortraitMaskComponent.prototype.ngAfterViewInit = /**
         * @return {?}
         */
        function () {
            this.emitMaskRect();
        };
        /**
         * @param {?} event
         * @return {?}
         */
        PortraitMaskComponent.prototype.move = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            switch (this.dragType) {
                case 'handle': {
                    /** @type {?} */
                    var p = this.getLimitHandleCenterPostion(this.toSVGPoint(event.x, event.y));
                    this.handleX = p.x;
                    this.handleY = p.y;
                    this.r = distance(this.handleX, this.handleY, this.cx, this.cy);
                    this.emitMaskRect();
                    break;
                }
                case 'mask':
                    {
                        /** @type {?} */
                        var p = this.toSVGPoint(event.x, event.y);
                        p.x = Math.max(0, Math.min(this.svgWidth, p.x));
                        p.y = Math.max(0, Math.min(this.svgHeight, p.y));
                        this.cx = p.x - this.maskDistanceOffset.x;
                        this.cy = p.y - this.maskDistanceOffset.y;
                        this.handleX = p.x - this.handleDistanceOffset.x;
                        this.handleY = p.y - this.handleDistanceOffset.y;
                        this.emitMaskRect();
                    }
                    break;
                case 'outside':
                    this.dragging.emit({ x: event.x, y: event.y });
                    break;
                default:
                    break;
            }
            event.stopPropagation();
            event.preventDefault();
        };
        /**
         * @param {?} event
         * @return {?}
         */
        PortraitMaskComponent.prototype.mouseUp = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            window.removeEventListener('mousemove', this.move, false);
            window.removeEventListener('mouseup', this.mouseUp, false);
        };
        // 重置到中心点,半径为最大
        // 重置到中心点,半径为最大
        /**
         * @return {?}
         */
        PortraitMaskComponent.prototype.reset = 
        // 重置到中心点,半径为最大
        /**
         * @return {?}
         */
        function () {
            this.calcSize();
            this.emitMaskRect();
        };
        /**
         * @private
         * @return {?}
         */
        PortraitMaskComponent.prototype.calcSize = /**
         * @private
         * @return {?}
         */
        function () {
            /** @type {?} */
            var rect = this.elRef.nativeElement.getBoundingClientRect();
            /** @type {?} */
            var p = this.toSVGPoint(rect.left + rect.width / 2, rect.top + rect.height / 2);
            /** @type {?} */
            var p1 = this.toSVGPoint(rect.left, rect.top);
            /** @type {?} */
            var p2 = this.toSVGPoint(rect.right, rect.bottom);
            this.cx = p.x;
            this.cy = p.y;
            this.maxR = this.r = (p2.x - p1.x) / 2;
            this.svgWidth = p2.x - p1.x;
            this.svgHeight = p2.y - p1.y;
            this.handleX = this.cx + this.r;
            this.handleY = this.cy;
        };
        PortraitMaskComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-portrait-mask',
                        template: "<svg version=\"1.1\" width=\"100%\" height=\"100%\" xmlns=\"http://www.w3.org/2000/svg\"\r\n\txmlns:xlink=\"http://www.w3.org/1999/xlink\" #svg>\r\n\t<style>\r\n\t\t.handle {\r\n\t\t\tcursor: grab;\r\n\t\t}\r\n\t</style>\r\n\t<defs>\r\n\t\t<mask id=\"Mask\">\r\n\t\t\t<rect x=\"0\" y=\"0\" width=\"100%\" height=\"100%\" fill=\"white\" />\r\n\t\t\t<circle [attr.cx]=\"cx\" [attr.cy]=\"cy\" [attr.r]=\"r\" />\r\n\t\t</mask>\r\n\t</defs>\r\n\r\n\t<rect x=\"0\" y=\"0\" width=\"100%\" height=\"100%\" opacity=\"0.4\"\r\n\t\tmask=\"url(#Mask)\" />\r\n\t<circle [attr.cx]=\"cx\" [attr.cy]=\"cy\" [attr.r]=\"r\" stroke-width=\"2\" #maskCicle\r\n\t\tclass=\"border-cicle\"/>\r\n\t<circle [attr.cx]=\"handleX\" [attr.cy]=\"handleY\" [attr.r]=\"handleR\" class=\"handle\"/>\r\n</svg>",
                        styles: [":host{width:100%;height:100%;display:block;position:relative}.handle{cursor:hand}"]
                    }] }
        ];
        /** @nocollapse */
        PortraitMaskComponent.ctorParameters = function () { return [
            { type: core.ElementRef }
        ]; };
        PortraitMaskComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.portrait-mask',] }],
            startDrag: [{ type: core.Output }],
            dragging: [{ type: core.Output }],
            maskChange: [{ type: core.Output }],
            svg: [{ type: core.ViewChild, args: ['svg', { static: true },] }],
            handle: [{ type: core.ViewChild, args: ['handle', { static: true },] }],
            maskCicle: [{ type: core.ViewChild, args: ['maskCicle', { static: true },] }],
            mouseDown: [{ type: core.HostListener, args: ['mousedown', ['$event'],] }]
        };
        return PortraitMaskComponent;
    }());
    if (false) {
        /** @type {?} */
        PortraitMaskComponent.prototype.hostClass;
        /** @type {?} */
        PortraitMaskComponent.prototype.cx;
        /** @type {?} */
        PortraitMaskComponent.prototype.cy;
        /** @type {?} */
        PortraitMaskComponent.prototype.r;
        /** @type {?} */
        PortraitMaskComponent.prototype.maxR;
        /** @type {?} */
        PortraitMaskComponent.prototype.svgWidth;
        /** @type {?} */
        PortraitMaskComponent.prototype.svgHeight;
        /** @type {?} */
        PortraitMaskComponent.prototype.handleX;
        /** @type {?} */
        PortraitMaskComponent.prototype.handleY;
        /** @type {?} */
        PortraitMaskComponent.prototype.handleR;
        /** @type {?} */
        PortraitMaskComponent.prototype.cursor;
        /** @type {?} */
        PortraitMaskComponent.prototype.maskDistanceOffset;
        /** @type {?} */
        PortraitMaskComponent.prototype.handleDistanceOffset;
        /** @type {?} */
        PortraitMaskComponent.prototype.startDragPoint;
        /** @type {?} */
        PortraitMaskComponent.prototype.dragType;
        /** @type {?} */
        PortraitMaskComponent.prototype.startDrag;
        /** @type {?} */
        PortraitMaskComponent.prototype.dragging;
        /** @type {?} */
        PortraitMaskComponent.prototype.maskChange;
        /** @type {?} */
        PortraitMaskComponent.prototype.svg;
        /** @type {?} */
        PortraitMaskComponent.prototype.handle;
        /** @type {?} */
        PortraitMaskComponent.prototype.maskCicle;
        /**
         * @type {?}
         * @private
         */
        PortraitMaskComponent.prototype.elRef;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /**
     * @record
     */
    function PortraitEditComponentData() { }
    if (false) {
        /** @type {?} */
        PortraitEditComponentData.prototype.img;
        /** @type {?} */
        PortraitEditComponentData.prototype.default;
    }
    /**
     * @record
     */
    function PortraitEditComponentResultData() { }
    if (false) {
        /** @type {?} */
        PortraitEditComponentResultData.prototype.ok;
        /** @type {?} */
        PortraitEditComponentResultData.prototype.data;
    }
    /** @type {?} */
    var ImageMaxWidth = 224;
    /** @type {?} */
    var ImageMaxHeight = 224;
    /** @type {?} */
    var PortraitSize = 224;
    // 112;
    var PortraitEditComponent = /** @class */ (function () {
        function PortraitEditComponent(dialogRef, data, _sanitizer, curr) {
            this.dialogRef = dialogRef;
            this.data = data;
            this._sanitizer = _sanitizer;
            this.curr = curr;
            this.hostClass = true;
            this.translateX = 0;
            this.translateY = 0;
            this.rotateScope = 0;
            this.modified = false;
            this.afterInit = false;
            this.default = false; // 是否是缺省的图片,缺省图片不需要保存
        }
        /**
         * @return {?}
         */
        PortraitEditComponent.prototype.ngAfterViewInit = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.srcImage.nativeElement.onload = (/**
             * @return {?}
             */
            function () {
                _this.realImageWidth = _this.srcImage.nativeElement.width;
                _this.realImageHeight = _this.srcImage.nativeElement.height;
                /** @type {?} */
                var w = _this.srcImage.nativeElement.width;
                /** @type {?} */
                var h = _this.srcImage.nativeElement.height;
                _this.minZoomFactor = _this.zoomFactor = 1;
                if (w < h && h > ImageMaxHeight) {
                    _this.minZoomFactor = _this.zoomFactor = ImageMaxHeight / h;
                    w = w * _this.zoomFactor;
                    h = ImageMaxHeight;
                }
                else if (w > h && w > ImageMaxHeight) {
                    _this.minZoomFactor = _this.zoomFactor = ImageMaxWidth / w;
                    h = h * _this.zoomFactor;
                    w = ImageMaxWidth;
                }
                _this.portraitImage.nativeElement.width = w;
                _this.portraitImage.nativeElement.height = h;
                _this.translateX = Math.round((ImageMaxWidth - w) / 2);
                _this.translateY = Math.round((ImageMaxHeight - h) / 2);
                _this.rebuildImage();
            });
            this.srcImage.nativeElement.src = this.data.img.src;
            this.default = this.data.default;
            this.afterInit = true;
        };
        /**
         * @return {?}
         */
        PortraitEditComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        /**
         * @return {?}
         */
        PortraitEditComponent.prototype.rebuildImage = /**
         * @return {?}
         */
        function () {
            var _this = this;
            /** @type {?} */
            var c = document.createElement('canvas');
            if (this.rotateScope === 0 || this.rotateScope === 0.5) {
                c.width = this.srcImage.nativeElement.width;
                c.height = this.srcImage.nativeElement.height;
            }
            else {
                c.width = this.srcImage.nativeElement.height;
                c.height = this.srcImage.nativeElement.width;
            }
            /** @type {?} */
            var ctx = c.getContext('2d');
            ctx.clearRect(0, 0, c.width, c.height);
            // move to the center of the canvas
            ctx.translate(c.width / 2, c.height / 2);
            // rotate the canvas to the specified degrees
            ctx.rotate(this.rotateScope * 2 * Math.PI);
            // draw the image
            // since the context is rotated, the image will be rotated also
            ctx.drawImage(this.srcImage.nativeElement, -this.srcImage.nativeElement.width / 2, -this.srcImage.nativeElement.height / 2);
            this.portraitImage.nativeElement.src = c.toDataURL();
            setTimeout((/**
             * @return {?}
             */
            function () {
                _this.drawPreview();
            }), 150);
        };
        /**
         * @return {?}
         */
        PortraitEditComponent.prototype.pimgLoad = /**
         * @return {?}
         */
        function () {
            /** @type {?} */
            var offset = this.correctionOffset((this.portraitImage.nativeElement.width - this.realImageWidth * this.zoomFactor) / 2, (this.portraitImage.nativeElement.height - this.realImageHeight * this.zoomFactor) / 2, this.portraitImage.nativeElement.getBoundingClientRect());
            this.translateX += offset.x;
            this.translateY += offset.y;
        };
        /**
         * @param {?} event
         * @return {?}
         */
        PortraitEditComponent.prototype.startDragImage = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            this.dragStartPoint = { x: event.x, y: event.y };
            this.dragStartTransformPosition = { x: this.translateX, y: this.translateY };
            this.dragStartImageRound = this.portraitImage.nativeElement.getBoundingClientRect();
        };
        // 给定一个偏移,返回校正的结果
        // 给定一个偏移,返回校正的结果
        /**
         * @param {?} dx
         * @param {?} dy
         * @param {?} imageRect
         * @return {?}
         */
        PortraitEditComponent.prototype.correctionOffset = 
        // 给定一个偏移,返回校正的结果
        /**
         * @param {?} dx
         * @param {?} dy
         * @param {?} imageRect
         * @return {?}
         */
        function (dx, dy, imageRect) {
            /** @type {?} */
            var containerRect = this.dragContainer.nativeElement.getBoundingClientRect();
            /** @type {?} */
            var lx;
            /** @type {?} */
            var hx;
            /** @type {?} */
            var ly;
            /** @type {?} */
            var hy;
            // 如果图片宽度小于容器,则是左边框左移不能过容器左边框
            if (containerRect.width > imageRect.width) {
                lx = containerRect.left - imageRect.left;
                hx = containerRect.right - imageRect.right;
            }
            else {
                // 否则是右边框左移不能离开容器右边框
                lx = containerRect.right - imageRect.right;
                hx = containerRect.left - imageRect.left;
            }
            if (containerRect.height > imageRect.height) {
                ly = containerRect.top - imageRect.top;
                hy = containerRect.bottom - imageRect.bottom;
            }
            else {
                ly = containerRect.bottom - imageRect.bottom;
                hy = containerRect.top - imageRect.top;
            }
            return { x: Math.max(lx, Math.min(hx, dx)), y: Math.max(ly, Math.min(hy, dy)) };
        };
        /**
         * @param {?} event
         * @return {?}
         */
        PortraitEditComponent.prototype.draggingImage = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            /** @type {?} */
            var offset = this.correctionOffset(event.x - this.dragStartPoint.x, event.y - this.dragStartPoint.y, this.dragStartImageRound);
            this.translateX = this.dragStartTransformPosition.x + offset.x;
            this.translateY = this.dragStartTransformPosition.y + offset.y;
            this.drawPreview();
            this.modified = true;
            this.default = false;
        };
        /**
         * @param {?} event
         * @return {?}
         */
        PortraitEditComponent.prototype.zoomIn = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            // 放大10%
            this.zoomFactor = Math.min(1, this.zoomFactor * 1.1);
            if (this.rotateScope === 0 || this.rotateScope === 0.5) {
                this.portraitImage.nativeElement.width = this.realImageWidth * this.zoomFactor;
                this.portraitImage.nativeElement.height = this.realImageHeight * this.zoomFactor;
            }
            else {
                this.portraitImage.nativeElement.width = this.realImageHeight * this.zoomFactor;
                this.portraitImage.nativeElement.height = this.realImageWidth * this.zoomFactor;
            }
            /** @type {?} */
            var offset = this.correctionOffset(-(this.realImageWidth * this.zoomFactor - this.portraitImage.nativeElement.width) / 2, -(this.realImageHeight * this.zoomFactor - this.portraitImage.nativeElement.height) / 2, this.portraitImage.nativeElement.getBoundingClientRect());
            this.translateX += offset.x;
            this.translateY += offset.y;
            this.modified = true;
            this.default = false;
            this.drawPreview();
        };
        /**
         * @param {?} event
         * @return {?}
         */
        PortraitEditComponent.prototype.zoomOut = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            // 缩小10%
            this.zoomFactor = Math.max(this.minZoomFactor, this.zoomFactor * 0.9);
            if (this.rotateScope === 0 || this.rotateScope === 0.5) {
                this.portraitImage.nativeElement.width = this.realImageWidth * this.zoomFactor;
                this.portraitImage.nativeElement.height = this.realImageHeight * this.zoomFactor;
            }
            else {
                this.portraitImage.nativeElement.width = this.realImageHeight * this.zoomFactor;
                this.portraitImage.nativeElement.height = this.realImageWidth * this.zoomFactor;
            }
            /** @type {?} */
            var offset = this.correctionOffset((this.portraitImage.nativeElement.width - this.realImageWidth * this.zoomFactor) / 2, (this.portraitImage.nativeElement.height - this.realImageHeight * this.zoomFactor) / 2, this.portraitImage.nativeElement.getBoundingClientRect());
            this.translateX += offset.x;
            this.translateY += offset.y;
            this.modified = true;
            this.default = false;
            this.drawPreview();
        };
        /**
         * @return {?}
         */
        PortraitEditComponent.prototype.drawPreview = /**
         * @return {?}
         */
        function () {
            /** @type {?} */
            var imageRect = this.portraitImage.nativeElement.getBoundingClientRect();
            // 交集
            /** @type {?} */
            var r = {
                left: Math.max(imageRect.left, this.maskRect.left),
                top: Math.max(imageRect.top, this.maskRect.top),
                right: Math.min(imageRect.right, this.maskRect.right),
                bottom: Math.min(imageRect.bottom, this.maskRect.bottom)
            };
            // 相对图片左上角的偏移
            r.left = r.left - imageRect.left;
            r.top = r.top - imageRect.top;
            r.right = r.right - imageRect.left;
            r.bottom = r.bottom - imageRect.top;
            /** @type {?} */
            var drawX = this.maskRect.left < imageRect.left ? (imageRect.left - this.maskRect.left) / this.zoomFactor : 0;
            /** @type {?} */
            var drawY = this.maskRect.top < imageRect.top ? (imageRect.top - this.maskRect.top) / this.zoomFactor : 0;
            /** @type {?} */
            var realWidth = ((r.right - r.left) / this.maskRect.width) * PortraitSize;
            /** @type {?} */
            var realHeight = ((r.bottom - r.top) / this.maskRect.height) * PortraitSize;
            // 再缩放到实际图片中
            r.left /= this.zoomFactor;
            r.top /= this.zoomFactor;
            r.right /= this.zoomFactor;
            r.bottom /= this.zoomFactor;
            /** @type {?} */
            var ctx = this.preview.nativeElement.getContext('2d');
            if (realWidth < PortraitSize || realHeight < PortraitSize) {
                ctx.fillStyle = 'white';
                ctx.fillRect(0, 0, this.preview.nativeElement.width, this.preview.nativeElement.height);
            }
            ctx.save();
            /** @type {?} */
            var sc = PortraitSize / (this.maskRect.width / this.zoomFactor);
            ctx.scale(sc, sc);
            ctx.drawImage(this.portraitImage.nativeElement, r.left, r.top, r.right - r.left, r.bottom - r.top, drawX, drawY, r.right - r.left, r.bottom - r.top);
            ctx.restore();
        };
        /**
         * @param {?} rect
         * @return {?}
         */
        PortraitEditComponent.prototype.maskChange = /**
         * @param {?} rect
         * @return {?}
         */
        function (rect) {
            this.maskRect = rect;
            // 因为最开始就会触发一次,需要初始化过后才翻转状态
            if (this.afterInit) {
                this.default = false;
                this.modified = true;
            }
            this.drawPreview();
        };
        /**
         * @param {?} event
         * @return {?}
         */
        PortraitEditComponent.prototype.rotate = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            if (this.rotateScope === 0) {
                this.rotateScope = 0.75;
            }
            else {
                this.rotateScope -= 0.25;
            }
            /** @type {?} */
            var tmp = this.portraitImage.nativeElement.width;
            this.portraitImage.nativeElement.width = this.portraitImage.nativeElement.height;
            this.portraitImage.nativeElement.height = tmp;
            this.modified = true;
            this.default = false;
            this.rebuildImage();
        };
        Object.defineProperty(PortraitEditComponent.prototype, "imageStyle", {
            get: /**
             * @return {?}
             */
            function () {
                return this._sanitizer.bypassSecurityTrustStyle('translate(' + this.translateX + 'px, ' + this.translateY + 'px)');
            },
            enumerable: true,
            configurable: true
        });
        /**
         * @param {?} event
         * @return {?}
         */
        PortraitEditComponent.prototype.fileChange = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            /** @type {?} */
            var reader = new FileReader();
            /** @type {?} */
            var self = this;
            reader.onload = (/**
             * @param {?} oFREvent
             * @return {?}
             */
            function (oFREvent) {
                self.srcImage.nativeElement.src = (/** @type {?} */ (oFREvent.target.result));
            });
            this.modified = true;
            this.default = false;
            reader.readAsDataURL(event[0]);
        };
        /**
         * @return {?}
         */
        PortraitEditComponent.prototype.ok = /**
         * @return {?}
         */
        function () {
            this.dialogRef.close((/** @type {?} */ ({
                ok: true,
                data: this.default ? null : this.preview.nativeElement.toDataURL('image/jpeg')
            })));
        };
        /**
         * @return {?}
         */
        PortraitEditComponent.prototype.restoreDefault = /**
         * @return {?}
         */
        function () {
            this.modified = true;
            this.mask.reset();
            this.srcImage.nativeElement.src = portraitDefault;
            this.default = true;
        };
        PortraitEditComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-portrait-edit',
                        template: "<div class=\"main\">\r\n\t<div class=\"left\">\r\n\t\t<div class=\"picture-select\" #dragContainer>\r\n\t\t\t<img #srcImage class=\"hide\" crossOrigin=\"Anonymous\" />\r\n\t\t\t<img #portraitImage class=\"image\" [style.transform]=\"imageStyle\" (load)=\"pimgLoad()\" />\r\n\t\t\t<common-portrait-mask #mask\r\n\t\t\t\tclass=\"mask\"\r\n\t\t\t\t(startDrag)=\"startDragImage($event)\"\r\n\t\t\t\t(maskChange)=\"maskChange($event)\"\r\n\t\t\t\t(dragging)=\"draggingImage($event)\"\r\n\t\t\t></common-portrait-mask>\r\n\t\t</div>\r\n\t\t<div class=\"small-button\">\r\n\t\t\t<button mat-icon-button (click)=\"rotate($event)\">\r\n\t\t\t\t<mat-icon svgIcon=\"rotate_90_degrees_ccw\"></mat-icon>\r\n\t\t\t</button>\r\n\t\t\t<span>\r\n\t\t\t\t<button mat-icon-button (click)=\"zoomIn($event)\" [disabled]=\"zoomFactor >= 1\">\r\n\t\t\t\t\t<mat-icon svgIcon=\"add_circle\"></mat-icon>\r\n\t\t\t\t</button>\r\n\t\t\t\t<button mat-icon-button (click)=\"zoomOut($event)\" [disabled]=\"zoomFactor <= minZoomFactor\">\r\n\t\t\t\t\t<mat-icon svgIcon=\"remove_circle\"></mat-icon>\r\n\t\t\t\t</button>\r\n\t\t\t</span>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class=\"right\">\r\n\t\t<div>\r\n\t\t\t<div class=\"\u9884\u89C8\u6807\u9898\">\u9884\u89C8</div>\r\n\t\t\t<div class=\"\u9884\u89C8\u56FE\u7247\">\r\n\t\t\t\t<canvas class=\"preview\" width=\"224\" height=\"224\" #preview></canvas>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"\u6062\u590D\u9ED8\u8BA4\u56FE\u50CF\" (click)=\"restoreDefault()\">\u6062\u590D\u9ED8\u8BA4\u56FE\u50CF</div>\r\n\t\t</div>\r\n\t\t<div class=\"button-bottom\">\r\n\t\t\t<div class=\"upload-file\">\r\n\t\t\t\t<input type=\"file\" id=\"file\" name=\"file\" (change)=\"fileChange($event.target.files)\" />\r\n\t\t\t\t<span>\u9009\u62E9\u56FE\u7247</span>\r\n\t\t\t</div>\r\n\t\t\t<button\r\n\t\t\t\tclass=\"\u786E\u8BA4\u56FE\u7247\"\r\n\t\t\t\tmat-raised-button\r\n\t\t\t\tcolor=\"primary\"\r\n\t\t\t\t(click)=\"ok()\"\r\n\t\t\t\t[disabled]=\"!modified\"\t\t\t\t\r\n\t\t\t>\r\n\t\t\t\t\u786E\u5B9A\r\n\t\t\t</button>\r\n\t\t</div>\r\n\t</div>\r\n\t<mat-icon (click)=\"dialogRef.close()\" class=\"\u5173\u95ED\" svgIcon=\"close\"></mat-icon>\r\n</div>\r\n",
                        styles: ["@charset \"UTF-8\";.main{display:flex;height:100%;position:relative}.main .left{display:flex;flex-direction:column}.main .left .picture-select{width:224px;height:224px;background:url(/front/assets/userinfo/bg_picselect.png) 0 0/100% 100% no-repeat;overflow:hidden;position:relative}.main .left .picture-select .mask{width:100%;height:100%;position:absolute;left:0;top:0}.main .left .small-button{margin-top:8px;display:flex;justify-content:space-between}.main .right{flex-grow:1;height:247px;display:flex;flex-direction:column;justify-content:space-between}.main .right .\u9884\u89C8\u6807\u9898{margin-left:56px;font-size:12px}.main .right .\u9884\u89C8\u56FE\u7247{text-align:center;margin:8px 0 16px}.main .right .preview{width:112px;height:112px;border-radius:56px}.main .right .\u6062\u590D\u9ED8\u8BA4\u56FE\u50CF{font-size:12px;margin-top:16px;text-align:center;cursor:pointer}.main .right .button-bottom{margin-left:24px;height:32px}.main .right .button-bottom .upload-file{display:inline-block;width:80px;height:32px;position:relative;margin-right:8px;font-size:16px;text-align:center;line-height:32px;border-radius:4px;overflow:hidden;vertical-align:bottom}.main .right .button-bottom .upload-file #file{opacity:0;height:100%;position:absolute;left:0;top:0}.main .right .button-bottom .\u786E\u8BA4\u56FE\u7247{width:80px;height:32px;font-size:16px;line-height:32px}.hide{display:none}.\u5173\u95ED{position:absolute;right:-16px;top:-16px;cursor:pointer}"]
                    }] }
        ];
        /** @nocollapse */
        PortraitEditComponent.ctorParameters = function () { return [
            { type: material.MatDialogRef },
            { type: undefined, decorators: [{ type: core.Inject, args: [material.MAT_DIALOG_DATA,] }] },
            { type: platformBrowser.DomSanitizer },
            { type: dbwebCore.CurrentService }
        ]; };
        PortraitEditComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.portrait-edit',] }],
            portraitImage: [{ type: core.ViewChild, args: ['portraitImage', { static: true },] }],
            srcImage: [{ type: core.ViewChild, args: ['srcImage', { static: true },] }],
            dragContainer: [{ type: core.ViewChild, args: ['dragContainer', { static: true },] }],
            preview: [{ type: core.ViewChild, args: ['preview', { static: true },] }],
            mask: [{ type: core.ViewChild, args: ['mask', { static: true },] }]
        };
        return PortraitEditComponent;
    }());
    if (false) {
        /** @type {?} */
        PortraitEditComponent.prototype.hostClass;
        /** @type {?} */
        PortraitEditComponent.prototype.portraitImage;
        /** @type {?} */
        PortraitEditComponent.prototype.srcImage;
        /** @type {?} */
        PortraitEditComponent.prototype.dragContainer;
        /** @type {?} */
        PortraitEditComponent.prototype.preview;
        /** @type {?} */
        PortraitEditComponent.prototype.mask;
        /** @type {?} */
        PortraitEditComponent.prototype.dragStartPoint;
        /** @type {?} */
        PortraitEditComponent.prototype.dragStartTransformPosition;
        /** @type {?} */
        PortraitEditComponent.prototype.dragStartImageRound;
        /** @type {?} */
        PortraitEditComponent.prototype.realImageWidth;
        /** @type {?} */
        PortraitEditComponent.prototype.realImageHeight;
        /** @type {?} */
        PortraitEditComponent.prototype.zoomFactor;
        /** @type {?} */
        PortraitEditComponent.prototype.minZoomFactor;
        /** @type {?} */
        PortraitEditComponent.prototype.maskRect;
        /** @type {?} */
        PortraitEditComponent.prototype.translateX;
        /** @type {?} */
        PortraitEditComponent.prototype.translateY;
        /** @type {?} */
        PortraitEditComponent.prototype.rotateScope;
        /** @type {?} */
        PortraitEditComponent.prototype.modified;
        /** @type {?} */
        PortraitEditComponent.prototype.afterInit;
        /** @type {?} */
        PortraitEditComponent.prototype.default;
        /** @type {?} */
        PortraitEditComponent.prototype.dialogRef;
        /** @type {?} */
        PortraitEditComponent.prototype.data;
        /**
         * @type {?}
         * @private
         */
        PortraitEditComponent.prototype._sanitizer;
        /** @type {?} */
        PortraitEditComponent.prototype.curr;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var UserinfoComponent = /** @class */ (function () {
        function UserinfoComponent(overlayContainer, curr, httpClient, api, theme, dialog, mainNav) {
            var _this = this;
            this.overlayContainer = overlayContainer;
            this.curr = curr;
            this.httpClient = httpClient;
            this.api = api;
            this.theme = theme;
            this.dialog = dialog;
            this.mainNav = mainNav;
            this.hostClass = true;
            this.num = 0;
            this.isEditNickName = false;
            this.nickName = '';
            this.subject = [];
            this.subject.push(this.mainNav.navMin.subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                if (v) {
                    _this.mainNavStyle = 'min';
                }
                else {
                    _this.mainNavStyle = 'full';
                }
            })), this.curr.change$.subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                if (v && v.HeadPortrait) {
                    _this.portraitURL = v.portraitURL;
                }
                else {
                    _this.portraitURL = portraitDefault;
                }
            })));
        }
        /**
         * @return {?}
         */
        UserinfoComponent.prototype.ngOnDestroy = /**
         * @return {?}
         */
        function () {
            this.subject.forEach((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.unsubscribe(); }));
        };
        /**
         * @return {?}
         */
        UserinfoComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.subject.push(this.theme.theme.subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.themeColor = v.color;
                _this.themeModel = v.model;
            })), this.api.get('get-user-portrait-url').subscribe((/**
             * @param {?} u
             * @return {?}
             */
            function (u) {
                _this.uploadURL = dbwebCore.fullApiPath(u);
            })));
        };
        /**
         * @return {?}
         */
        UserinfoComponent.prototype.setTheme = /**
         * @return {?}
         */
        function () {
            this.theme.setTheme(this.themeColor + '-' + this.themeModel + '-theme');
        };
        /**
         * @param {?} fileToUpload
         * @return {?}
         */
        UserinfoComponent.prototype.postFile = /**
         * @param {?} fileToUpload
         * @return {?}
         */
        function (fileToUpload) {
            var _this = this;
            /** @type {?} */
            var formData = new FormData();
            formData.append('portrait', fileToUpload, fileToUpload.name);
            return this.httpClient.post(this.uploadURL, formData, { withCredentials: true }).subscribe((/**
             * @return {?}
             */
            function () {
                _this.curr.setPortrait(true);
                _this.num++;
            }), (/**
             * @param {?} error
             * @return {?}
             */
            function (error) {
                console.log(error);
            }));
        };
        /**
         * @return {?}
         */
        UserinfoComponent.prototype.editNickName = /**
         * @return {?}
         */
        function () {
            this.nickName = this.curr.data.NickName;
            this.isEditNickName = true;
        };
        /**
         * @return {?}
         */
        UserinfoComponent.prototype.editDone = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.api.post('change-user-nickname', this.nickName).subscribe((/**
             * @return {?}
             */
            function () {
                _this.curr.setNickName(_this.nickName);
                _this.isEditNickName = false;
            }));
        };
        /**
         * @return {?}
         */
        UserinfoComponent.prototype.showPortraitEdit = /**
         * @return {?}
         */
        function () {
            var _this = this;
            /** @type {?} */
            var dialogRef = this.dialog.open(PortraitEditComponent, {
                width: '480px',
                data: (/** @type {?} */ ({
                    img: this.portraitImage.nativeElement,
                    default: this.portraitURL === portraitDefault
                }))
            });
            dialogRef.afterClosed().subscribe((/**
             * @param {?} result
             * @return {?}
             */
            function (result) {
                if (result && result.ok) {
                    if (result.data) {
                        _this.postFile(dataURLtoFile(result.data, 'portrait.jpg'));
                    }
                    else {
                        _this.api.post('clear-user-portrait').subscribe((/**
                         * @return {?}
                         */
                        function () {
                            _this.curr.setPortrait(false);
                        }));
                    }
                }
            }));
        };
        /**
         * @param {?} event
         * @return {?}
         */
        UserinfoComponent.prototype.navStyleChange = /**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            this.mainNav.setNavMin(event.value === 'min');
        };
        UserinfoComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-userinfo',
                        template: "<div class=\"main\">\r\n\t<div class=\"top\">\r\n\t\t<div class=\"head-portrait mat-elevation-z2\">\r\n\t\t\t<div class=\"picture\">\r\n\t\t\t\t<img class=\"\u5934\u50CF\u56FE\u7247\" #portraitImage [src]=\"portraitURL\" />\r\n\t\t\t\t<div class=\"\u5934\u50CF\u7F16\u8F91\" (click)=\"showPortraitEdit()\">\r\n\t\t\t\t\t<mat-icon svgIcon=\"photo_camera\"></mat-icon>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"\u4FEE\u6539\u6635\u79F0\" *ngIf=\"isEditNickName; else nickNameTxt\">\r\n\t\t\t\t<mat-form-field>\r\n\t\t\t\t\t<input class=\" \u8F93\u5165\u6635\u79F0 \u4E00\u7EA7\u6807\u9898\u8272\u503C\" matInput [(ngModel)]=\"nickName\" />\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t\t<mat-icon class=\"close\" svgIcon=\"close\" (click)=\"isEditNickName = false\"></mat-icon>\r\n\t\t\t\t<mat-icon color=\"primary\" svgIcon=\"done\" (click)=\"editDone()\"> </mat-icon>\r\n\t\t\t\t<!-- <button mat-stroked-button class=\" \u53D6\u6D88\" color=\"primary\" mat-button>\r\n\t\t\t\t\t\u53D6\u6D88\r\n\t\t\t\t</button>\r\n\t\t\t\t<button mat-raised-button class=\"\" color=\"primary\">\u786E\u5B9A</button> -->\r\n\t\t\t</div>\r\n\r\n\t\t\t<ng-template #nickNameTxt>\r\n\t\t\t\t<div class=\"\u6635\u79F0\">\r\n\t\t\t\t\t<span class=\" \u4E00\u7EA7\u6807\u9898\u8272\u503C\">{{ curr.data.NickName }}</span>\r\n\t\t\t\t\t<mat-icon class=\"\u7F16\u8F91\" (click)=\"editNickName()\" svgIcon=\"edit\"></mat-icon>\r\n\t\t\t\t</div>\r\n\t\t\t</ng-template>\r\n\t\t</div>\r\n\t\t<div class=\"theme mat-elevation-z2\">\r\n\t\t\t<p class=\"title \u4E00\u7EA7\u6807\u9898\u8272\u503C\">\u4E3B\u9898\u989C\u8272</p>\r\n\t\t\t<div class=\"colors\">\r\n\t\t\t\t<div class=\"theme-button\">\r\n\t\t\t\t\t<div class=\"cicle deep-purple\" (click)=\"themeColor = 'deep-purple'; setTheme()\">\r\n\t\t\t\t\t\t<mat-icon svgIcon=\"done\" *ngIf=\"themeColor == 'deep-purple'\"></mat-icon>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"text\">\u6D6A\u6F2B\u7D2B</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"theme-button\">\r\n\t\t\t\t\t<div class=\"cicle blue\" (click)=\"themeColor = 'blue'; setTheme()\">\r\n\t\t\t\t\t\t<mat-icon svgIcon=\"done\" *ngIf=\"themeColor == 'blue'\"> </mat-icon>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"text\">\u9ED8\u8BA4</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"theme-button\">\r\n\t\t\t\t\t<div class=\"cicle pink\" (click)=\"themeColor = 'pink'; setTheme()\">\r\n\t\t\t\t\t\t<mat-icon svgIcon=\"done\" *ngIf=\"themeColor == 'pink'\"> </mat-icon>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"text\">\u6E29\u60C5\u7C89</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"theme-button\">\r\n\t\t\t\t\t<div class=\"cicle orange\" (click)=\"themeColor = 'orange'; setTheme()\">\r\n\t\t\t\t\t\t<mat-icon svgIcon=\"done\" *ngIf=\"themeColor == 'orange'\"> </mat-icon>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"text\">\u6D3B\u529B\u6A59</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"theme-button\">\r\n\t\t\t\t\t<div class=\"cicle green\" (click)=\"themeColor = 'green'; setTheme()\">\r\n\t\t\t\t\t\t<mat-icon svgIcon=\"done\" *ngIf=\"themeColor == 'green'\"> </mat-icon>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"text\">\u6E05\u65B0\u7EFF</div>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"title \u4E00\u7EA7\u6807\u9898\u8272\u503C\">\u6A21\u5F0F</div>\r\n\t\t\t<div class=\"select-model\">\r\n\t\t\t\t<div\r\n\t\t\t\t\tclass=\"color-model\"\r\n\t\t\t\t\t[ngClass]=\"{ selected: themeModel === 'light' }\"\r\n\t\t\t\t\t(click)=\"themeModel = 'light'; setTheme()\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<mat-icon svgIcon=\"brightness_7\"></mat-icon>\r\n\t\t\t\t\t<span>\u6D45\u8272\u6A21\u5F0F</span>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div\r\n\t\t\t\t\tclass=\"color-model\"\r\n\t\t\t\t\t[ngClass]=\"{ selected: themeModel === 'dark' }\"\r\n\t\t\t\t\t(click)=\"themeModel = 'dark'; setTheme()\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<mat-icon svgIcon=\"brightness_2\"></mat-icon>\r\n\t\t\t\t\t<span>\u6DF1\u8272\u6A21\u5F0F</span>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\t<div class=\"setting mat-elevation-z2\">\r\n\t\t<div class=\"\u504F\u597D\u8BBE\u7F6E \u4E00\u7EA7\u6807\u9898\u8272\u503C\">\u504F\u597D\u8BBE\u7F6E</div>\r\n\t\t<div class=\"one-setting\">\r\n\t\t\t<div class=\"default\">\u9ED8\u8BA4\u5BFC\u822A\u6837\u5F0F</div>\r\n\t\t\t<div class=\"default-radio\">\r\n\t\t\t\t<mat-radio-group aria-label=\"Select an option\" [value]=\"mainNavStyle\" (change)=\"navStyleChange($event)\">\r\n\t\t\t\t\t<mat-radio-button [class.selected]=\"mainNavStyle == 'full'\" value=\"full\">\u5B8C\u6574\u6A21\u5F0F</mat-radio-button>\r\n\t\t\t\t\t<mat-radio-button [class.selected]=\"mainNavStyle == 'min'\" value=\"min\">\u7B80\u6D01\u6A21\u5F0F</mat-radio-button>\r\n\t\t\t\t</mat-radio-group>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</div>\r\n",
                        styles: ["@charset \"UTF-8\";.main{display:flex;flex-direction:column;height:100%;max-width:960px;margin:0 auto;width:100%}.main .top{margin-top:24px;display:flex}.main .top .head-portrait{display:flex;flex-direction:column;align-items:center;position:relative;width:256px;height:256px;border-radius:2px}.main .top .head-portrait .picture{width:112px;height:112px;margin:32px 0 16px;border-radius:128px;overflow:hidden;position:relative}.main .top .head-portrait .picture .\u5934\u50CF\u56FE\u7247{width:100%;height:100%}.main .top .head-portrait .picture .\u5934\u50CF\u7F16\u8F91{width:100%;height:100%;position:absolute;left:0;top:0;background-color:rgba(0,0,0,.4);display:none;cursor:pointer}.main .top .head-portrait .picture .\u5934\u50CF\u7F16\u8F91 .mat-icon{color:#fff;margin:44px}.main .top .head-portrait .picture:hover .\u5934\u50CF\u7F16\u8F91{display:block}.main .top .head-portrait .\u7F16\u8F91{cursor:pointer;display:inline-block;vertical-align:top;margin-left:4px;opacity:0}.main .top .head-portrait .\u6635\u79F0{width:232px;font-size:20px;height:24px;line-height:24px;font-weight:700;text-align:center;-webkit-transform:translateX(12px);transform:translateX(12px)}.main .top .head-portrait .\u6635\u79F0 span{display:inline-block;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.main .top .head-portrait .\u6635\u79F0:hover .\u7F16\u8F91{opacity:1}.main .top .head-portrait .\u4FEE\u6539\u6635\u79F0{padding:0 8px;box-sizing:border-box;display:flex;align-items:center}.main .top .head-portrait .\u4FEE\u6539\u6635\u79F0 .mat-icon{cursor:pointer;line-height:24px}.main .top .head-portrait .\u4FEE\u6539\u6635\u79F0 .\u8F93\u5165\u6635\u79F0{font-weight:700;font-size:14px}.main .top .head-portrait .\u4FEE\u6539\u6635\u79F0 .close{margin:0 8px 0 12px}.main .top .head-portrait .mat-form-field{width:172px}.main .top .head-portrait .mat-form-field ::ng-deep .mat-form-field-infix{border:0;height:16px}.main .top .theme{flex-grow:1;margin-left:24px;display:flex;flex-direction:column;border-radius:4px}.main .top .theme .title{font-size:20px;font-weight:700;margin:16px 0 16px 24px}.main .top .theme .colors{display:flex;margin:4px 0}.main .top .theme .colors .theme-button{margin:0 5px 0 40px}.main .top .theme .colors .cicle{width:40px;height:40px;cursor:pointer;border-radius:20px;display:flex;justify-content:center;align-items:center;color:#fff}.main .top .theme .colors .text{text-align:center;margin:16px 0 0;font-size:14px}.main .top .theme .select-model{display:flex}.main .top .theme .select-model .color-model{cursor:pointer;display:flex;margin-left:32px}.main .top .theme .select-model .color-model span{font-size:14px;margin-left:8px}.main .setting{border-radius:4px;flex-grow:1;flex-flow:1;margin:24px 0 64px}.main .setting .\u504F\u597D\u8BBE\u7F6E{font-size:20px;font-weight:700;margin:16px}.main .setting .one-setting{display:flex}.main .setting .one-setting .default{margin-left:32px;font-size:16px}.main .setting .one-setting .default-radio{margin-left:256px;font-size:14px}.main .setting .one-setting .default-radio .mat-radio-button{margin-left:8px}"]
                    }] }
        ];
        /** @nocollapse */
        UserinfoComponent.ctorParameters = function () { return [
            { type: overlay.OverlayContainer },
            { type: dbwebCore.CurrentService },
            { type: http.HttpClient },
            { type: dbwebCore.CurrentApiService },
            { type: ThemeService },
            { type: material.MatDialog },
            { type: MainNavService }
        ]; };
        UserinfoComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.user-info',] }],
            portraitImage: [{ type: core.ViewChild, args: ['portraitImage', { static: false },] }]
        };
        return UserinfoComponent;
    }());
    if (false) {
        /** @type {?} */
        UserinfoComponent.prototype.hostClass;
        /** @type {?} */
        UserinfoComponent.prototype.portraitImage;
        /** @type {?} */
        UserinfoComponent.prototype.uploadURL;
        /** @type {?} */
        UserinfoComponent.prototype.num;
        /** @type {?} */
        UserinfoComponent.prototype.isEditNickName;
        /** @type {?} */
        UserinfoComponent.prototype.nickName;
        /** @type {?} */
        UserinfoComponent.prototype.themeColor;
        /** @type {?} */
        UserinfoComponent.prototype.themeModel;
        /** @type {?} */
        UserinfoComponent.prototype.mainNavStyle;
        /** @type {?} */
        UserinfoComponent.prototype.portraitURL;
        /**
         * @type {?}
         * @private
         */
        UserinfoComponent.prototype.subject;
        /** @type {?} */
        UserinfoComponent.prototype.overlayContainer;
        /** @type {?} */
        UserinfoComponent.prototype.curr;
        /**
         * @type {?}
         * @private
         */
        UserinfoComponent.prototype.httpClient;
        /**
         * @type {?}
         * @private
         */
        UserinfoComponent.prototype.api;
        /**
         * @type {?}
         * @private
         */
        UserinfoComponent.prototype.theme;
        /** @type {?} */
        UserinfoComponent.prototype.dialog;
        /** @type {?} */
        UserinfoComponent.prototype.mainNav;
    }
    /**
     * @param {?} dataurl
     * @param {?} filename
     * @return {?}
     */
    function dataURLtoFile(dataurl, filename) {
        /** @type {?} */
        var arr = dataurl.split(',');
        /** @type {?} */
        var mime = arr[0].match(/:(.*?);/)[1];
        /** @type {?} */
        var bstr = atob(arr[1]);
        /** @type {?} */
        var n = bstr.length;
        /** @type {?} */
        var u8arr = new Uint8Array(n);
        while (n--) {
            u8arr[n] = bstr.charCodeAt(n);
        }
        return new File([u8arr], filename, { type: mime });
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ɵ0$8 = dbwebCore.SaveStateData;
    var UserinfoModule = /** @class */ (function () {
        function UserinfoModule() {
        }
        UserinfoModule.decorators = [
            { type: core.NgModule, args: [{
                        declarations: [UserinfoComponent, PortraitEditComponent, PortraitMaskComponent],
                        imports: [
                            common.CommonModule,
                            forms.FormsModule,
                            radio.MatRadioModule,
                            button.MatButtonModule,
                            material.MatDialogModule,
                            material.MatInputModule,
                            material.MatFormFieldModule,
                            dragDrop.DragDropModule,
                            icon.MatIconModule,
                            router.RouterModule.forChild([{ path: '**', data: ɵ0$8, component: UserinfoComponent }])
                        ],
                        entryComponents: [PortraitEditComponent]
                    },] }
        ];
        return UserinfoModule;
    }());

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /**
     * @record
     */
    function UpdateData() { }
    if (false) {
        /** @type {?} */
        UpdateData.prototype.FromEle;
        /** @type {?} */
        UpdateData.prototype.CountNum;
        /** @type {?} */
        UpdateData.prototype.Fields;
    }
    /**
     * @record
     */
    function UpdateFieldSetting() { }
    if (false) {
        /** @type {?|undefined} */
        UpdateFieldSetting.prototype.selected;
        /** @type {?|undefined} */
        UpdateFieldSetting.prototype.setValue;
        /** @type {?} */
        UpdateFieldSetting.prototype.Name;
        /** @type {?} */
        UpdateFieldSetting.prototype.Label;
        /** @type {?} */
        UpdateFieldSetting.prototype.Tooltip;
        /** @type {?} */
        UpdateFieldSetting.prototype.Freeentry;
        /** @type {?} */
        UpdateFieldSetting.prototype.Must;
        /** @type {?} */
        UpdateFieldSetting.prototype.List;
    }
    /**
     * @record
     */
    function SetData() { }
    if (false) {
        /** @type {?} */
        SetData.prototype.Column;
        /** @type {?} */
        SetData.prototype.Value;
    }
    /**
     * @record
     */
    function DoUpdateParam() { }
    if (false) {
        /** @type {?} */
        DoUpdateParam.prototype.Sets;
    }
    /**
     * @record
     */
    function DoUpdateResult() { }
    if (false) {
        /** @type {?} */
        DoUpdateResult.prototype.TaskID;
        /** @type {?} */
        DoUpdateResult.prototype.Timeout;
        /** @type {?} */
        DoUpdateResult.prototype.TaskInfoURL;
        /** @type {?} */
        DoUpdateResult.prototype.TaskInfoSign;
    }
    var UpdateService = /** @class */ (function () {
        function UpdateService(eles, api) {
            this.eles = eles;
            this.api = api;
            this.step = '';
        }
        /**
         * @return {?}
         */
        UpdateService.prototype.init = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.step = 'prepare';
            return this.api.get('get-update-data').subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.eleName = v.FromEle;
                _this.num = v.CountNum;
                _this.fields = v.Fields;
            }));
        };
        /**
         * @param {?} param
         * @return {?}
         */
        UpdateService.prototype.doUpdate = /**
         * @param {?} param
         * @return {?}
         */
        function (param) {
            var _this = this;
            return this.api.post('do-update', param).pipe(operators.tap((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                // 注册查看任务明细的url
                _this.eles.setURLSign(v.TaskInfoURL, v.TaskInfoSign);
            })));
        };
        UpdateService.decorators = [
            { type: core.Injectable, args: [{
                        providedIn: 'root'
                    },] }
        ];
        /** @nocollapse */
        UpdateService.ctorParameters = function () { return [
            { type: dbwebCore.ElementsService },
            { type: dbwebCore.CurrentApiService }
        ]; };
        /** @nocollapse */ UpdateService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function UpdateService_Factory() { return new UpdateService(core.ɵɵinject(dbwebCore.ElementsService), core.ɵɵinject(dbwebCore.CurrentApiService)); }, token: UpdateService, providedIn: "root" });
        return UpdateService;
    }());
    if (false) {
        /** @type {?} */
        UpdateService.prototype.num;
        /** @type {?} */
        UpdateService.prototype.eleName;
        /** @type {?} */
        UpdateService.prototype.fields;
        /** @type {?} */
        UpdateService.prototype.taskInfoURL;
        /** @type {?} */
        UpdateService.prototype.step;
        /**
         * @type {?}
         * @private
         */
        UpdateService.prototype.eles;
        /**
         * @type {?}
         * @private
         */
        UpdateService.prototype.api;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var UpdateComponent = /** @class */ (function () {
        function UpdateComponent(srv, tabs, prj) {
            this.srv = srv;
            this.tabs = tabs;
            this.prj = prj;
            this.hostClass = true;
            this.subs = [];
        }
        /**
         * @return {?}
         */
        UpdateComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            this.srv.init();
        };
        /**
         * @return {?}
         */
        UpdateComponent.prototype.doUpdate = /**
         * @return {?}
         */
        function () {
            var _this = this;
            /** @type {?} */
            var sets = this.srv.fields
                .filter((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.selected; }))
                .map((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return ({ Column: v.Name, Value: v.setValue }); }));
            this.srv.doUpdate({ Sets: sets }).subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.srv.step = 'complete';
                _this.srv.taskInfoURL = _this.prj.frontURL('task', v.TaskInfoURL);
            }));
        };
        /**
         * @return {?}
         */
        UpdateComponent.prototype.close = /**
         * @return {?}
         */
        function () {
            this.tabs.close();
        };
        /**
         * @return {?}
         */
        UpdateComponent.prototype.quantityToReplace = /**
         * @return {?}
         */
        function () {
            /** @type {?} */
            var num = 0;
            if (this.srv.fields) {
                this.srv.fields.forEach((/**
                 * @param {?} item
                 * @return {?}
                 */
                function (item) {
                    if (item.selected || item.Must) {
                        num++;
                    }
                }));
            }
            return num;
        };
        UpdateComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-update',
                        template: "<ng-container [ngSwitch]=\"srv.step\">\r\n\t<div class=\"update-all\" *ngSwitchCase=\"'prepare'\">\r\n\t\t<div class=\"update-top\">\r\n\t\t\t<span class=\"top-title\">\r\n\t\t\t\t<span class=\"\u6807\u9898\">\u6210\u6279\u66FF\u6362\u2014\u2014{{ srv.eleName }}</span\r\n\t\t\t\t>({{ srv.num }}\u6761\u8BB0\u5F55)</span\r\n\t\t\t>\r\n\t\t\t<span *ngIf=\"quantityToReplace() == 0\" class=\"top-tips \u63D0\u793A\">\u4EA4\u66FF\u66FF\u6362\u540E,\u6240\u6709\u8BB0\u5F55\u90FD\u5C06\u66F4\u65B0,\u8BF7\u614E\u91CD\u64CD\u4F5C</span>\r\n\t\t\t<span *ngIf=\"quantityToReplace() > 0\" class=\"top-tips \u9009\u62E9\u6570\u91CF\"\r\n\t\t\t\t>\u5DF2\u9009\u62E9 <span>{{ quantityToReplace() }}</span> \u9879\u64CD\u4F5C\u6267\u884C</span\r\n\t\t\t>\r\n\t\t</div>\r\n\t\t<div class=\"update-body\">\r\n\t\t\t<div\r\n\t\t\t\tclass=\"update-field\"\r\n\t\t\t\t*ngFor=\"let field of srv.fields; let index = index\"\r\n\t\t\t\t[ngClass]=\"{\r\n\t\t\t\t\t'activation-style': field.selected || field.Must,\r\n\t\t\t\t\t'mat-elevation-z4': field.selected || field.Must\r\n\t\t\t\t}\"\r\n\t\t\t>\r\n\t\t\t\t<span class=\"\u540D\u79F0\" [class.\u900F\u660E]=\"!field.selected && !field.Must\"\r\n\t\t\t\t\t>{{ index + 1 }}.{{ field.Label }} ({{ field.Name }})\r\n\t\t\t\t\t<mat-icon *ngIf=\"field.Tooltip\" svgIcon=\"info\" matTooltip=\"{{ field.Tooltip }}\"></mat-icon\r\n\t\t\t\t></span>\r\n\t\t\t\t<mat-checkbox [(ngModel)]=\"field.selected\" *ngIf=\"!field.Must\"> </mat-checkbox>\r\n\t\t\t\t<div *ngIf=\"field.selected || field.Must\" class=\"\u64CD\u4F5C\">\r\n\t\t\t\t\t<div class=\"\u9009\u62E9\" *ngIf=\"field.Freeentry\">\r\n\t\t\t\t\t\t<mat-select placeholder=\"\u9009\u62E9\" [(value)]=\"field.setValue\">\r\n\t\t\t\t\t\t\t<mat-option *ngFor=\"let list of field.List\" [value]=\"list.Value\">\r\n\t\t\t\t\t\t\t\t{{ list.Label }}\r\n\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"\u8F93\u5165\" *ngIf=\"field.Freeentry\">\r\n\t\t\t\t\t\t<mat-form-field class=\"example-full-width\">\r\n\t\t\t\t\t\t\t<input matInput [(ngModel)]=\"field.setValue\" />\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"\u5355\u9009\" *ngIf=\"!field.Freeentry\">\r\n\t\t\t\t\t\t<mat-radio-group>\r\n\t\t\t\t\t\t\t<mat-radio-button *ngFor=\"let list of field.List\" [value]=\"list.Value\">{{\r\n\t\t\t\t\t\t\t\tlist.Label\r\n\t\t\t\t\t\t\t}}</mat-radio-button>\r\n\t\t\t\t\t\t</mat-radio-group>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div *ngIf=\"!field.selected && !field.Must\" class=\"\u672A\u6FC0\u6D3B\">\r\n\t\t\t\t\t<span *ngIf=\"!field.setValue || field.setValue == ''\">\u6682\u65E0\u4FEE\u6539\u503C</span>\r\n\t\t\t\t\t<span *ngIf=\"field.setValue && field.setValue != ''\">\u66FF\u6362\u5185\u5BB9</span>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div class=\"update-footer\">\r\n\t\t\t<button class=\"\u529F\u80FD\u6309\u94AE\" mat-button (click)=\"close()\"><mat-icon svgIcon=\"close\"></mat-icon> \u53D6\u6D88</button>\r\n\t\t\t<button class=\"\u6267\u884C\u6309\u94AE\" mat-button (click)=\"doUpdate()\">\r\n\t\t\t\t<mat-icon svgIcon=\"check_circle\"></mat-icon> \u6267\u884C\r\n\t\t\t</button>\r\n\t\t</div>\r\n\t</div>\r\n\t<div *ngSwitchCase=\"'runing'\">\r\n\t\t\u6B63\u5728\u6210\u6279\u66FF\u6362\u3002\u3002\u3002\r\n\t</div>\r\n\t<div class=\"replace\" *ngSwitchCase=\"'complete'\">\r\n\t\t<div class=\"replace-wrapper\">\r\n\t\t\t<div class=\"replace-title\">\u6B63\u5728\u8FDB\u884C\u4E2D...</div>\r\n\t\t\t<div class=\"replace-text\">\r\n\t\t\t\t\u6210\u6279\u66FF\u6362\u5DF2\u63D0\u4EA4\uFF0C\u53EF\u5230 <a class=\"text-check\" [routerLink]=\"srv.taskInfoURL\">\u4EFB\u52A1\u660E\u7EC6</a>\r\n\t\t\t\t\u4E2D\u67E5\u770B\uFF01\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</ng-container>\r\n",
                        styles: ["@charset \"UTF-8\";.update-all{width:100%;height:100%;display:flex;flex-direction:column}.update-all .update-top{margin:24px 48px}.update-all .update-top .top-title{font-size:20px}.update-all .update-top .top-title .\u6807\u9898{font-weight:700}.update-all .update-top .top-tips{font-size:14px;display:block;margin-top:8px}.update-all .update-top .top-tips span{font-size:18px}.update-all .update-body{flex-grow:1;width:100%;display:flex;flex-wrap:wrap;align-content:flex-start;padding:0 32px 0 48px;box-sizing:border-box}.update-all .update-body .update-field{width:280px;height:120px;padding:16px 8px 14px 16px;box-sizing:border-box;margin:0 16px 24px 0;position:relative;border-radius:4px;display:flex;flex-direction:column;justify-content:space-between}.update-all .update-body .update-field .\u540D\u79F0{font-size:18px;font-weight:700}.update-all .update-body .update-field .\u540D\u79F0 .mat-icon{width:16px;height:16px;line-height:16px}.update-all .update-body .update-field .mat-checkbox{position:absolute;top:12px;right:8px}.update-all .update-body .update-field .\u64CD\u4F5C{display:flex;align-items:center}.update-all .update-body .update-field .\u64CD\u4F5C .\u9009\u62E9{width:72px;margin-right:8px}.update-all .update-body .update-field .\u64CD\u4F5C .\u8F93\u5165{flex-grow:1}.update-all .update-body .update-field .\u64CD\u4F5C .\u8F93\u5165 .mat-form-field{width:100%;font-size:12px}.update-all .update-body .update-field .\u64CD\u4F5C .\u8F93\u5165 .mat-form-field ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:10px;vertical-align:bottom;-webkit-transform:translateY(0);transform:translateY(0)}.update-all .update-body .update-field .\u64CD\u4F5C .\u8F93\u5165 .mat-form-field ::ng-deep .mat-form-field-infix{border:0;font-size:14px;padding:10px 0;box-sizing:border-box}.update-all .update-body .update-field .\u64CD\u4F5C .\u5355\u9009{margin-left:15px}.update-all .update-body .update-field .\u64CD\u4F5C .\u5355\u9009 .mat-radio-button{margin-right:8px;font-size:14px}.update-all .update-body .update-field .\u672A\u6FC0\u6D3B{font-size:14px}.update-all .update-body .update-field .\u900F\u660E{opacity:.6}.update-all .update-footer{width:100%;height:48px;display:flex;justify-content:center;align-items:center;padding-right:16px;box-sizing:border-box}.update-all .update-footer .\u529F\u80FD\u6309\u94AE{margin-right:8px}.update-all .update-footer .\u6267\u884C\u6309\u94AE .mat-icon{margin-right:4px;vertical-align:middle}.replace{display:flex;justify-content:center;align-items:center;width:100%;height:calc(100vh - 30px)}.replace .replace-wrapper{width:624px;height:456px;margin-top:-60px;background:url(/front/assets/export/prepare.png) top center/300px 300px no-repeat;box-shadow:0 2px 5px 0 rgba(0,0,0,.14);box-sizing:border-box}.replace .replace-wrapper .replace-title{padding:271px 128px 0;font-size:24px}.replace .replace-wrapper .replace-text{padding:16px 128px 0;font-size:16px}.replace .replace-wrapper .replace-text .text-check{font-weight:700}"]
                    }] }
        ];
        /** @nocollapse */
        UpdateComponent.ctorParameters = function () { return [
            { type: UpdateService },
            { type: TabsService },
            { type: dbwebCore.ProjectService }
        ]; };
        UpdateComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.update',] }]
        };
        return UpdateComponent;
    }());
    if (false) {
        /** @type {?} */
        UpdateComponent.prototype.hostClass;
        /** @type {?} */
        UpdateComponent.prototype.subs;
        /** @type {?} */
        UpdateComponent.prototype.srv;
        /**
         * @type {?}
         * @private
         */
        UpdateComponent.prototype.tabs;
        /** @type {?} */
        UpdateComponent.prototype.prj;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ɵ0$9 = dbwebCore.SaveStateData;
    var UpdateModule = /** @class */ (function () {
        function UpdateModule() {
        }
        UpdateModule.decorators = [
            { type: core.NgModule, args: [{
                        declarations: [UpdateComponent],
                        imports: [
                            common.CommonModule,
                            material.MatInputModule,
                            material.MatSelectModule,
                            material.MatButtonModule,
                            material.MatRadioModule,
                            material.MatCheckboxModule,
                            material.MatIconModule,
                            material.MatTooltipModule,
                            forms.FormsModule,
                            router.RouterModule.forChild([{ path: '**', data: ɵ0$9, component: UpdateComponent }])
                        ]
                    },] }
        ];
        return UpdateModule;
    }());

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var CommonBillComponent = /** @class */ (function () {
        function CommonBillComponent() {
            this.hostClass = true;
        }
        /**
         * @return {?}
         */
        CommonBillComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        /**
         * @param {?} fld
         * @return {?}
         */
        CommonBillComponent.prototype.inputType = /**
         * @param {?} fld
         * @return {?}
         */
        function (fld) {
            switch (fld.Type) {
                default:
                    return 'text';
                case dbwebCore.BillFieldDataType.DATE:
                    return 'datetime-local';
                case dbwebCore.BillFieldDataType.FLOAT:
                case dbwebCore.BillFieldDataType.INT:
                    return 'number';
            }
        };
        CommonBillComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-common-bill',
                        template: "<common-bill #bill>\r\n\t<!-- \u2193\u2193\u2193 0. \u603B\u5916\u6846 \u2193\u2193\u2193 -->\r\n\t<div class=\"bill-main\">\r\n\t\t<!-- \u2193\u2193 1. \u8868\u5355\u5916\u6846 \u2193\u2193 -->\r\n\t\t<div class=\"bill-wrapper mat-elevation-z2\" [formGroup]=\"bill.formGroup\"\r\n\t\t\t*ngIf=\"bill.formGroup\">\r\n\t\t\t<div class=\"bill-title\">{{bill.element.element.title()}}</div>\r\n\t\t\t<!-- \u2193 2.\u5FAA\u73AF\u6BCF\u884C \u2193 -->\r\n\t\t\t<div *ngFor=\"let field of bill.fields\">\r\n\t\t\t\t<!-- 3. \u6BCF\u884C \u2193 -->\r\n\t\t\t\t<div class=\"bill-row\">\r\n\t\t\t\t\t<!-- 3.1 \u6BCF\u884C\u5DE6\u8FB9 \u2193 -->\r\n\t\t\t\t\t<div class=\"row-left\">\r\n\t\t\t\t\t\t{{field.Name}}\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<!-- 3.2 \u6BCF\u884C\u53F3\u8FB9 \u2193 -->\r\n\t\t\t\t\t<div class=\"row-right\">\r\n\t\t\t\t\t\t<div class=\"form-wrapper\">\r\n\t\t\t\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t\t\t\t<input class=\"outline-input\" matInput\r\n\t\t\t\t\t\t\t\t\t[type]=\"inputType(field)\"\r\n\t\t\t\t\t\t\t\t\t[formControlName]=\"field.Name\"\r\n\t\t\t\t\t\t\t\t\t[readOnly]=\"field.Readonly\"\r\n\t\t\t\t\t\t\t\t\t[ngStyle]=\"{'visibility':field.Hidden?'hidden':''}\"\r\n\t\t\t\t\t\t\t\t\tcommonBillField>\r\n\t\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t</div>\r\n\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</common-bill>",
                        styles: ["@charset \"UTF-8\";.bill-main,.bill-row,.bill-wrapper,.row-left,.row-right{box-sizing:border-box}.bill-main{display:flex;justify-content:center;align-items:center;width:100%;height:calc(100vh - 116px)}.bill-title{font:24px bold;margin-left:16px;margin-bottom:16px}.bill-wrapper{width:560px;max-height:calc(100vh - 116px - 48px);padding:16px 0;border-radius:4px;overflow:auto}.bill-row{display:flex;justify-content:space-between;align-items:center;width:100%;height:40px;line-height:40px;margin-bottom:16px;font-size:14px}.row-left{width:calc(152px - 24px);text-align:right}.row-right{display:flex;align-items:center;width:408px;box-sizing:border-box}.row-right .outline-input{width:330px;box-sizing:border-box;padding-left:8px}"]
                    }] }
        ];
        /** @nocollapse */
        CommonBillComponent.ctorParameters = function () { return []; };
        CommonBillComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.common-bill',] }]
        };
        return CommonBillComponent;
    }());
    if (false) {
        /** @type {?} */
        CommonBillComponent.prototype.hostClass;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ɵ0$a = dbwebCore.SaveStateData;
    var CommonBillModule = /** @class */ (function () {
        function CommonBillModule() {
        }
        CommonBillModule.decorators = [
            { type: core.NgModule, args: [{
                        declarations: [CommonBillComponent],
                        imports: [
                            common.CommonModule,
                            BillModule,
                            material.MatInputModule,
                            material.MatFormFieldModule,
                            router.RouterModule.forChild([
                                {
                                    path: '**',
                                    component: CommonBillComponent,
                                    data: ɵ0$a
                                }
                            ])
                        ]
                    },] }
        ];
        return CommonBillModule;
    }());

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /**
     * @record
     */
    function RoleEle() { }
    if (false) {
        /** @type {?} */
        RoleEle.prototype.RoleName;
        /** @type {?} */
        RoleEle.prototype.EleName;
    }
    /**
     * @record
     */
    function RoleValidElement() { }
    if (false) {
        /** @type {?} */
        RoleValidElement.prototype.Name;
        /** @type {?} */
        RoleValidElement.prototype.Controller;
        /** @type {?} */
        RoleValidElement.prototype.Label;
        /** @type {?} */
        RoleValidElement.prototype.LabelEN;
        /** @type {?} */
        RoleValidElement.prototype.Icon;
        /** @type {?} */
        RoleValidElement.prototype.Color;
        /** @type {?} */
        RoleValidElement.prototype.Category;
        /** @type {?} */
        RoleValidElement.prototype.CategoryEN;
        /** @type {?} */
        RoleValidElement.prototype.Dept;
        /** @type {?} */
        RoleValidElement.prototype.Bill;
        /** @type {?} */
        RoleValidElement.prototype.BillOperate;
    }
    var RoleBack = /** @class */ (function () {
        function RoleBack(api) {
            this.api = api;
        }
        /**
         * @return {?}
         */
        RoleBack.prototype.fetchEles = /**
         * @return {?}
         */
        function () {
            return this.api.get('fetch-eles');
        };
        /**
         * @return {?}
         */
        RoleBack.prototype.fetchHasRoleDepts = /**
         * @return {?}
         */
        function () {
            return this.api.get('fetch-has-role-depts');
        };
        RoleBack.decorators = [
            { type: core.Injectable }
        ];
        /** @nocollapse */
        RoleBack.ctorParameters = function () { return [
            { type: dbwebCore.CurrentApiService }
        ]; };
        return RoleBack;
    }());
    if (false) {
        /**
         * @type {?}
         * @private
         */
        RoleBack.prototype.api;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var TreeNode = /** @class */ (function () {
        function TreeNode(name, parent) {
            this.name = name;
            this.parent = parent;
            this.children = [];
        }
        /**
         * @return {?}
         */
        TreeNode.prototype.title = /**
         * @return {?}
         */
        function () {
            if (this.ele) {
                return this.ele.title();
            }
            if (this.name.search(/[0-9]{2}\./) > -1) {
                return this.name.substr(3);
            }
            return this.name;
        };
        // 强制创建一个节点,路径上的父节点如果不存在则创建,返回最终的节点
        // 强制创建一个节点,路径上的父节点如果不存在则创建,返回最终的节点
        /**
         * @param {?} paths
         * @param {?} ele
         * @return {?}
         */
        TreeNode.prototype.forceCreate = 
        // 强制创建一个节点,路径上的父节点如果不存在则创建,返回最终的节点
        /**
         * @param {?} paths
         * @param {?} ele
         * @return {?}
         */
        function (paths, ele) {
            if (paths.length === 0) {
                return null;
            }
            /** @type {?} */
            var val = paths.shift();
            // 需要排序
            /** @type {?} */
            var idx = this.children.findIndex((/**
             * @param {?} item
             * @return {?}
             */
            function (item) { return val.localeCompare(item.name) <= 0; }));
            /** @type {?} */
            var node = new TreeNode(val, this);
            if (idx === -1) {
                this.children.push(node);
            }
            else if (this.children[idx].name === val) {
                node = this.children[idx];
            }
            else {
                this.children.splice(idx, 0, node);
            }
            if (paths.length === 0) {
                node.ele = ele;
                return node;
            }
            else {
                return node.forceCreate(paths, ele);
            }
        };
        return TreeNode;
    }());
    if (false) {
        /** @type {?} */
        TreeNode.prototype.iconName;
        /** @type {?} */
        TreeNode.prototype.color;
        /** @type {?} */
        TreeNode.prototype.children;
        /** @type {?} */
        TreeNode.prototype.ele;
        /** @type {?} */
        TreeNode.prototype.name;
        /** @type {?} */
        TreeNode.prototype.parent;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ValidElement = /** @class */ (function (_super) {
        __extends(ValidElement, _super);
        function ValidElement(data) {
            var _this = _super.call(this, __assign({}, data, { NotMenu: true, URL: '' })) || this;
            _this.Dept = data.Dept;
            return _this;
        }
        return ValidElement;
    }(dbwebCore.Element));
    if (false) {
        /** @type {?} */
        ValidElement.prototype.Dept;
    }
    var RoleComponent = /** @class */ (function () {
        function RoleComponent(eles, back, current) {
            this.eles = eles;
            this.back = back;
            this.current = current;
            this.menuSelectAll = 'all';
            this.menuSelectChecked = 'checked';
            this.menuSelectNotChecked = 'not-checked';
            this.hostClass = true;
            this.ctrlElementName = new forms.FormControl();
            this.ctrlMenuRange = new forms.FormControl();
            this.subs = [];
            this.treeControl = new tree$1.NestedTreeControl((/**
             * @param {?} node
             * @return {?}
             */
            function (node) { return node.children; }));
            this.dataSource = new material.MatTreeNestedDataSource();
            this.ctrlDeptSelect = new forms.FormControl();
            this.hasChild = (/**
             * @param {?} _
             * @param {?} node
             * @return {?}
             */
            function (_, node) { return !!node.children && node.children.length > 0; });
        }
        /**
         * @return {?}
         */
        RoleComponent.prototype.ngOnDestroy = /**
         * @return {?}
         */
        function () {
            this.subs.forEach((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.unsubscribe(); }));
        };
        /**
         * @return {?}
         */
        RoleComponent.prototype.refreshFilterElements = /**
         * @return {?}
         */
        function () {
            var _this = this;
            /** @type {?} */
            var val = this.ctrlElementName.value || '';
            /** @type {?} */
            var selectRange = this.ctrlMenuRange.value;
            /** @type {?} */
            var selectDepts = (/** @type {?} */ (this.ctrlDeptSelect.value));
            this.filterElements = this.validElements.filter((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.title().includes(val) || v.Category.includes(val); }));
            switch (selectRange) {
                case this.menuSelectChecked:
                    this.filterElements = this.filterElements.filter((/**
                     * @param {?} v
                     * @return {?}
                     */
                    function (v) { return _this.roles.find((/**
                     * @param {?} sv
                     * @return {?}
                     */
                    function (sv) { return sv.EleName === v.Name; })) !== undefined; }));
                    break;
                case this.menuSelectNotChecked:
                    this.filterElements = this.filterElements.filter((/**
                     * @param {?} v
                     * @return {?}
                     */
                    function (v) { return _this.roles.find((/**
                     * @param {?} sv
                     * @return {?}
                     */
                    function (sv) { return sv.EleName === v.Name; })) === undefined; }));
                    break;
            }
            // 过滤部门代码
            this.filterElements = this.filterElements.filter((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return selectDepts.find((/**
             * @param {?} sv
             * @return {?}
             */
            function (sv) { return sv.Code === v.Dept; })); }));
            this.filterElements = this.filterElements.sort((/**
             * @param {?} a
             * @param {?} b
             * @return {?}
             */
            function (a, b) { return a.title().localeCompare(b.title()); }));
            this.rootNode = new TreeNode('root', null);
            this.filterElements.forEach((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.rootNode.forceCreate(__spread(v.Category.split('/'), [v.Label || v.Name]), v);
            }));
            this.dataSource.data = this.rootNode.children;
            this.treeControl.dataNodes = this.rootNode.children;
            // 状态保存不住,总是缩起,所以每次全展开
            this.treeControl.expandAll();
        };
        /**
         * @return {?}
         */
        RoleComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.subs.push(this.bill.init.subscribe((/**
             * @return {?}
             */
            function () {
                _this.bill.typeRecord.Eles = _this.bill.typeRecord.Eles || [];
                // 新增或编辑,将显示所有的菜单项,否则只显示已经选中的
                if (_this.bill.isAdd() || _this.bill.isEdit()) {
                    _this.ctrlMenuRange.patchValue(_this.menuSelectAll);
                }
                else {
                    _this.ctrlMenuRange.patchValue(_this.menuSelectChecked);
                }
                _this.subs.push(_this.current.change$.subscribe((/**
                 * @return {?}
                 */
                function () {
                    _this.back.fetchHasRoleDepts().subscribe((/**
                     * @param {?} depts
                     * @return {?}
                     */
                    function (depts) {
                        _this.hasRoleDepts = depts;
                        _this.ctrlDeptSelect.patchValue(depts);
                    }));
                    _this.back.fetchEles().subscribe((/**
                     * @param {?} v
                     * @return {?}
                     */
                    function (v) {
                        // 转换成Element,主要目的是用到它的title函数
                        _this.validElements = v.map((/**
                         * @param {?} sv
                         * @return {?}
                         */
                        function (sv) { return new ValidElement(sv); }));
                        _this.subs.push(_this.ctrlElementName.valueChanges
                            .pipe(operators.startWith(''), operators.debounceTime(500))
                            .subscribe((/**
                         * @return {?}
                         */
                        function () { return _this.refreshFilterElements(); })), _this.ctrlMenuRange.valueChanges.subscribe((/**
                         * @return {?}
                         */
                        function () { return _this.refreshFilterElements(); })), _this.ctrlDeptSelect.valueChanges.subscribe((/**
                         * @return {?}
                         */
                        function () { return _this.refreshFilterElements(); })));
                    }));
                })));
            })));
        };
        Object.defineProperty(RoleComponent.prototype, "roles", {
            get: /**
             * @return {?}
             */
            function () {
                return (/** @type {?} */ (this.bill.typeRecord.Eles));
            },
            enumerable: true,
            configurable: true
        });
        /**
         * @param {?} node
         * @return {?}
         */
        RoleComponent.prototype.treeNodeChecked = /**
         * @param {?} node
         * @return {?}
         */
        function (node) {
            var _this = this;
            if (node.ele) {
                return this.roles.find((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) { return v.EleName === node.ele.Name; })) !== undefined;
            }
            else {
                /** @type {?} */
                var foundNotChecked = node.children.find((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) { return !_this.treeNodeChecked(v); }));
                return foundNotChecked === undefined;
            }
        };
        /**
         * @param {?} node
         * @param {?} event
         * @return {?}
         */
        RoleComponent.prototype.changeNodeChecked = /**
         * @param {?} node
         * @param {?} event
         * @return {?}
         */
        function (node, event) {
            var _this = this;
            if (event.checked) {
                if (node.ele) {
                    if (!this.roles.find((/**
                     * @param {?} v
                     * @return {?}
                     */
                    function (v) { return v.EleName === node.ele.Name; }))) {
                        this.roles.push({ EleName: node.ele.Name, RoleName: this.bill.formGroup.get('Name').value });
                    }
                }
            }
            else {
                if (node.ele) {
                    /** @type {?} */
                    var idx = this.roles.findIndex((/**
                     * @param {?} v
                     * @return {?}
                     */
                    function (v) { return v.EleName === node.ele.Name; }));
                    if (idx > -1) {
                        this.roles.splice(idx, 1);
                    }
                }
            }
            node.children.forEach((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return _this.changeNodeChecked(v, event); }));
        };
        /**
         * @param {?} ele
         * @return {?}
         */
        RoleComponent.prototype.dropEle = /**
         * @param {?} ele
         * @return {?}
         */
        function (ele) {
            /** @type {?} */
            var idx = this.roles.findIndex((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.EleName === ele.EleName; }));
            if (idx > -1) {
                this.roles.splice(idx, 1);
            }
        };
        RoleComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-role',
                        template: "<common-bill #bill>\r\n\t<div [formGroup]=\"bill.formGroup\" *ngIf=\"bill.formGroup\" class=\"role mat-elevation-z2\">\r\n\t\t<div class=\"modify-role\">\r\n\t\t\t<div class=\"modify-role-title title-color\">\u4FEE\u6539\u89D2\u8272</div>\r\n\t\t\t<div class=\"modify-role-content\">\r\n\t\t\t\t<div class=\"modify-role-content-input\">\r\n\t\t\t\t\t<span class=\"tips-color\">\u540D\u79F0</span>\r\n\t\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t\t<input matInput formControlName=\"Name\" commonBillField>\r\n\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"modify-role-content-input\">\r\n\t\t\t\t\t<span class=\"tips-color\">\u90E8\u95E8</span>\r\n\t\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t\t<input matInput formControlName=\"Dept\" commonBillField>\r\n\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"modify-role-content-input role-select\">\r\n\t\t\t\t\t<span class=\"tips-color\">\u4E0B\u7EA7\u53EF\u89C1</span>\r\n\t\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t\t<mat-select formControlName=\"VisibleLower\" commonBillField>\r\n\t\t\t\t\t\t\t<mat-option [value]=\"0\">\r\n\t\t\t\t\t\t\t\t\u4E0B\u7EA7\u4E0D\u53EF\u89C1\r\n\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t<mat-option [value]=\"1\">\r\n\t\t\t\t\t\t\t\t\u6240\u6709\u4E0B\u7EA7\r\n\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t\t<mat-option [value]=\"2\">\r\n\t\t\t\t\t\t\t\t\u4EC5\u76F4\u63A5\u4E0B\u7EA7\r\n\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t</mat-select>\r\n\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t</div>\r\n\t\t\t\t<!-- \u6682\u65F6\u4E0D\u9700\u8981,\u4E0D\u7528\u5220\u9664 -->\r\n\t\t\t\t<!-- <div class=\"modify-role-content-input\">\r\n\t\t\t\t\t<span class=\"tips-color\">\u53EF\u89C1\u6027\u8868\u8FBE\u5F0F</span>\r\n\t\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t\t<input matInput formControlName=\"Visible\" commonBillField>\r\n\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t</div> -->\r\n\t\t\t\t<mat-checkbox class=\"title-color\" #check trueFalseValue [trueValue]=\"1\" [falseValue]=\"0\"\r\n\t\t\t\t\tformControlName=\"VisibleSelf\" commonBillField>\u672C\u7EA7\u53EF\u89C1</mat-checkbox>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"menu-item-title tips-color\">\u83DC\u5355\u9879</div>\r\n\t\t\t<div class=\"menu-item-content\">\r\n\t\t\t\t<div class=\"menu-item-role\" *ngFor=\"let ele of roles\">{{ele.EleName}}<mat-icon\r\n\t\t\t\t\t\t*ngIf=\"bill.isAdd()||bill.isEdit()\" svgIcon=\"cancel\" (click)=\"dropEle(ele)\">\r\n\t\t\t\t\t</mat-icon>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<div class=\"menu-tree\">\r\n\t\t\t<div class=\"menu-tree-title\">\r\n\t\t\t\t<span class=\"tips-color\">\u53EF\u6DFB\u52A0\u83DC\u5355\u9879</span>\r\n\t\t\t\t<mat-form-field class=\"tips-color\">\r\n\t\t\t\t\t<mat-select [formControl]=\"ctrlDeptSelect\" multiple>\r\n\t\t\t\t\t\t<mat-option *ngFor=\"let oneDept of hasRoleDepts\"\r\n\t\t\t\t\t\t\t[value]=\"oneDept\">\r\n\t\t\t\t\t\t\t{{oneDept.Name}}</mat-option>\r\n\t\t\t\t\t</mat-select>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"menu-tree-screen\">\r\n\t\t\t\t<mat-form-field appearance=\"outline\" class=\"ctrlMenuRange\">\r\n\t\t\t\t\t<mat-select [formControl]=\"ctrlMenuRange\">\r\n\t\t\t\t\t\t<mat-option [value]=\"menuSelectAll\"> \u6240\u6709 </mat-option>\r\n\t\t\t\t\t\t<mat-option [value]=\"menuSelectChecked\"> \u9009\u4E2D</mat-option>\r\n\t\t\t\t\t\t<mat-option [value]=\"menuSelectNotChecked\"> \u672A\u9009\u4E2D</mat-option>\r\n\t\t\t\t\t</mat-select>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t\t<mat-form-field appearance=\"outline\" class=\"ctrlElementName\" *ngIf=\"bill.isEdit()||bill.isAdd()\">\r\n\t\t\t\t\t<input matInput [formControl]=\"ctrlElementName\" placeholder=\"\u8F93\u5165\u5173\u952E\u5B57\u7B5B\u9009\">\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t</div>\r\n\t\t\t<div class=\"tree\">\r\n\t\t\t\t<mat-tree [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\r\n\t\t\t\t\t<!-- This is the tree node template for leaf nodes -->\r\n\t\t\t\t\t<mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodeToggle>\r\n\t\t\t\t\t\t<li class=\"mat-tree-node tips-color\">\r\n\t\t\t\t\t\t\t<!-- use a disabled button to provide padding for tree leaf -->\r\n\t\t\t\t\t\t\t<button mat-icon-button disabled></button>\r\n\t\t\t\t\t\t\t<mat-checkbox [checked]=\"treeNodeChecked(node)\"\r\n\t\t\t\t\t\t\t\t[disabled]=\"bill.isBrowse()||bill.isDelete()\" (change)=\"changeNodeChecked(node,$event)\">\r\n\t\t\t\t\t\t\t\t{{node.item}}</mat-checkbox>\r\n\t\t\t\t\t\t\t<mat-icon *ngIf=\"node.iconName\" class=\"tree-icon\" svgIcon=\"{{node.iconName}}\"></mat-icon>\r\n\t\t\t\t\t\t\t{{node.title()}}\r\n\t\t\t\t\t\t</li>\r\n\t\t\t\t\t</mat-tree-node>\r\n\t\t\t\t\t<!-- This is the tree node template for expandable nodes -->\r\n\t\t\t\t\t<mat-nested-tree-node *matTreeNodeDef=\"let node; when: hasChild\">\r\n\t\t\t\t\t\t<li>\r\n\t\t\t\t\t\t\t<div class=\"mat-tree-node tips-color\">\r\n\t\t\t\t\t\t\t\t<button mat-icon-button matTreeNodeToggle [attr.aria-label]=\"'toggle ' + node.name\">\r\n\t\t\t\t\t\t\t\t\t<mat-icon class=\"mat-icon-rtl-mirror\"\r\n\t\t\t\t\t\t\t\t\t\t[svgIcon]=\"treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'\">\r\n\t\t\t\t\t\t\t\t\t</mat-icon>\r\n\t\t\t\t\t\t\t\t</button>\r\n\t\t\t\t\t\t\t\t<mat-checkbox [checked]=\"treeNodeChecked(node)\"\r\n\t\t\t\t\t\t\t\t\t[disabled]=\"bill.isBrowse()||bill.isDelete()\"\r\n\t\t\t\t\t\t\t\t\t(change)=\"changeNodeChecked(node,$event)\">\r\n\t\t\t\t\t\t\t\t\t{{node.item}}</mat-checkbox>\r\n\t\t\t\t\t\t\t\t<mat-icon *ngIf=\"node.iconName\" class=\"tree-icon\" svgIcon=\"{{node.iconName}}\">\r\n\t\t\t\t\t\t\t\t</mat-icon>\r\n\t\t\t\t\t\t\t\t{{node.title()}}\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t<ul [class.tree-invisible]=\"!treeControl.isExpanded(node)\">\r\n\t\t\t\t\t\t\t\t<ng-container matTreeNodeOutlet></ng-container>\r\n\t\t\t\t\t\t\t</ul>\r\n\t\t\t\t\t\t</li>\r\n\t\t\t\t\t</mat-nested-tree-node>\r\n\t\t\t\t</mat-tree>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</common-bill>",
                        providers: [RoleBack],
                        styles: [".tree-invisible{display:none}.tree li,.tree ul{margin-top:0;margin-bottom:0;list-style-type:none}.tree ul{padding-left:28px}.role{max-width:960px;margin:14px auto;height:calc(100% - 28px);border-radius:4px;display:flex}.role .modify-role{width:0;flex-grow:1;height:100%;padding:24px 24px 8px;box-sizing:border-box;display:flex;flex-direction:column}.role .modify-role .modify-role-title{font-size:20px;font-weight:700;margin-bottom:24px}.role .modify-role .modify-role-content{width:100%;display:flex;flex-wrap:wrap;align-items:flex-end}.role .modify-role .modify-role-content .modify-role-content-input{width:168px;margin:0 24px 16px 0}.role .modify-role .modify-role-content .modify-role-content-input span{display:block;font-size:12px;margin-bottom:8px}.role .modify-role .modify-role-content .modify-role-content-input .mat-form-field{width:100%;font-size:14px}.role .modify-role .modify-role-content .role-select{width:120px}.role .modify-role .modify-role-content .mat-checkbox{font-size:14px;margin:0 0 16px}.role .modify-role .menu-item-title{font-size:12px;margin-top:8px}.role .modify-role .menu-item-content{width:100%;flex-grow:1;overflow-y:auto;display:flex;flex-wrap:wrap;align-content:flex-start}.role .modify-role .menu-item-content .menu-item-role{height:32px;padding:0 8px 0 16px;font-size:14px;border-radius:16px;margin:8px 16px 0 0;display:flex;justify-content:space-between;align-items:center}.role .modify-role .menu-item-content .menu-item-role .mat-icon{width:18px;height:18px;line-height:18px;margin-left:8px;cursor:pointer}.role .menu-tree{max-height:100%;width:298px;flex-shrink:0;padding:16px 0 8px;box-sizing:border-box;display:flex;flex-direction:column}.role .menu-tree .menu-tree-title .mat-form-field ::ng-deep .mat-form-field-underline{display:none}.role .menu-tree .menu-tree-screen{padding:0 8px 8px 16px;font-size:12px;display:flex;align-items:center}.role .menu-tree .menu-tree-screen .ctrlElementName{width:170px;font-size:12px;margin-left:8px}.role .menu-tree .menu-tree-screen .ctrlMenuRange{width:88px;font-size:12px}.role .menu-tree .menu-tree-title{padding:0 8px 8px 16px;display:flex;justify-content:space-between;align-items:center}.role .menu-tree .menu-tree-title span{font-size:20px;font-weight:700}.role .menu-tree .menu-tree-title .mat-form-field{width:128px;font-size:12px;font-weight:700;text-align:right;box-sizing:border-box}.role .menu-tree .tree{flex-grow:1;padding-right:8px;box-sizing:border-box;overflow-y:auto;font-size:14px}.role .menu-tree .tree .mat-tree-node{min-height:40px;height:40px}.role .menu-tree .tree .mat-checkbox{margin-right:8px;vertical-align:top;line-height:16px;height:16px}.role .menu-tree .tree .tree-icon{vertical-align:top;width:16px;height:16px;line-height:16px;margin-right:8px}.role .mat-form-field ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:0}.role .mat-form-field ::ng-deep .mat-form-field-infix{border:0;padding:8px 0;height:30px;box-sizing:border-box}.role .mat-form-field ::ng-deep .mat-select-arrow-wrapper{display:block}"]
                    }] }
        ];
        /** @nocollapse */
        RoleComponent.ctorParameters = function () { return [
            { type: dbwebCore.ElementsService },
            { type: RoleBack },
            { type: dbwebCore.CurrentService }
        ]; };
        RoleComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.c-role',] }],
            bill: [{ type: core.ViewChild, args: ['bill', { static: true },] }]
        };
        return RoleComponent;
    }());
    if (false) {
        /** @type {?} */
        RoleComponent.prototype.menuSelectAll;
        /** @type {?} */
        RoleComponent.prototype.menuSelectChecked;
        /** @type {?} */
        RoleComponent.prototype.menuSelectNotChecked;
        /** @type {?} */
        RoleComponent.prototype.hostClass;
        /** @type {?} */
        RoleComponent.prototype.bill;
        /** @type {?} */
        RoleComponent.prototype.ctrlElementName;
        /** @type {?} */
        RoleComponent.prototype.ctrlMenuRange;
        /** @type {?} */
        RoleComponent.prototype.filterElements;
        /**
         * @type {?}
         * @private
         */
        RoleComponent.prototype.subs;
        /** @type {?} */
        RoleComponent.prototype.rootNode;
        /** @type {?} */
        RoleComponent.prototype.treeControl;
        /** @type {?} */
        RoleComponent.prototype.dataSource;
        /** @type {?} */
        RoleComponent.prototype.validElements;
        /** @type {?} */
        RoleComponent.prototype.ctrlDeptSelect;
        /** @type {?} */
        RoleComponent.prototype.hasRoleDepts;
        /** @type {?} */
        RoleComponent.prototype.hasChild;
        /** @type {?} */
        RoleComponent.prototype.eles;
        /**
         * @type {?}
         * @private
         */
        RoleComponent.prototype.back;
        /** @type {?} */
        RoleComponent.prototype.current;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ɵ0$b = dbwebCore.SaveStateData;
    var RoleModule = /** @class */ (function () {
        function RoleModule() {
        }
        RoleModule.decorators = [
            { type: core.NgModule, args: [{
                        declarations: [RoleComponent],
                        imports: [
                            common.CommonModule,
                            material.MatInputModule,
                            material.MatFormFieldModule,
                            material.MatCheckboxModule,
                            material.MatIconModule,
                            material.MatSelectModule,
                            material.MatTreeModule,
                            material.MatButtonModule,
                            forms.FormsModule,
                            BillModule,
                            router.RouterModule.forChild([
                                {
                                    path: '**',
                                    component: RoleComponent,
                                    data: ɵ0$b
                                }
                            ])
                        ]
                    },] }
        ];
        return RoleModule;
    }());

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /** @enum {string} */
    var RoleType = {
        always: 'always',
        select: 'select',
    };
    /**
     * @record
     */
    function UserRole() { }
    if (false) {
        /** @type {?} */
        UserRole.prototype.Name;
        /** @type {?} */
        UserRole.prototype.Type;
    }
    /**
     * @record
     */
    function ColumnsWithLetter$2() { }
    if (false) {
        /** @type {?} */
        ColumnsWithLetter$2.prototype.Letter;
        /** @type {?} */
        ColumnsWithLetter$2.prototype.Columns;
    }
    // ↑ 搬运的代码
    var UserBack = /** @class */ (function () {
        function UserBack(api) {
            this.api = api;
        }
        /**
         * @param {?} val
         * @return {?}
         */
        UserBack.prototype.fetchFilterDept = /**
         * @param {?} val
         * @return {?}
         */
        function (val) {
            return this.api.get('fetch-filter-dept', val);
        };
        /**
         * @return {?}
         */
        UserBack.prototype.fetchRoles = /**
         * @return {?}
         */
        function () {
            return this.api.get('fetch-roles');
        };
        UserBack.decorators = [
            { type: core.Injectable }
        ];
        /** @nocollapse */
        UserBack.ctorParameters = function () { return [
            { type: dbwebCore.CurrentApiService }
        ]; };
        return UserBack;
    }());
    if (false) {
        /**
         * @type {?}
         * @private
         */
        UserBack.prototype.api;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /**
     * @record
     */
    function ModelUserRole() { }
    if (false) {
        /** @type {?} */
        ModelUserRole.prototype.UserName;
        /** @type {?} */
        ModelUserRole.prototype.RoleName;
    }
    var UserComponent = /** @class */ (function () {
        function UserComponent(back, curr) {
            this.back = back;
            this.curr = curr;
            this.hostClass = true;
            this.roles = {};
            this.roleTypeAlways = RoleType.always;
            this.beforeSave = this.beforeSave.bind(this);
        }
        /**
         * @return {?}
         */
        UserComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.back.fetchRoles().subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.validRoles = v;
                _this.roleLists = _this.validRoles.map((/**
                 * @param {?} num
                 * @return {?}
                 */
                function (num) { return num.Name; }));
                _this.roleLitters = map2WithLetter$2(_this.roleLists);
            }));
        };
        /**
         * @param {?} selft
         * @return {?}
         */
        UserComponent.prototype.beforeSave = /**
         * @param {?} selft
         * @return {?}
         */
        function (selft) {
            var _this = this;
            return rxjs.of((/** @type {?} */ ({
                record: {
                    Password: selft.typeRecord.Password ? btoa(selft.typeRecord.Password) : null,
                    Roles: Object.keys(this.roles)
                        .filter((/**
                     * @param {?} v
                     * @return {?}
                     */
                    function (v) { return _this.roles[v]; }))
                        .map((/**
                     * @param {?} v
                     * @return {?}
                     */
                    function (v) { return ({
                        UserName: selft.typeRecord.Name,
                        RoleName: v
                    }); }))
                }
            })));
        };
        /**
         * @return {?}
         */
        UserComponent.prototype.ngAfterViewInit = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.bill.init.subscribe((/**
             * @return {?}
             */
            function () {
                _this.bill.formGroup.get('Password').patchValue(null);
                ((/** @type {?} */ ((_this.bill.typeRecord.Roles || [])))).forEach((/**
                 * @param {?} v
                 * @return {?}
                 */
                function (v) {
                    _this.roles[v.RoleName] = true;
                }));
                _this.bill.formGroup
                    .get('Dept')
                    .valueChanges.pipe(operators.startWith(_this.curr.data.Dept.Code), operators.debounceTime(500))
                    .subscribe((/**
                 * @param {?} val
                 * @return {?}
                 */
                function (val) {
                    _this.filterDeptList = _this.back.fetchFilterDept(val);
                    console.log('内:', _this.filterDeptList);
                }));
            }));
            this.bill.onBeforeSave = this.beforeSave;
        };
        /**
         * @param {?} event
         * @param {?} roleName
         * @return {?}
         */
        UserComponent.prototype.roleChange = /**
         * @param {?} event
         * @param {?} roleName
         * @return {?}
         */
        function (event, roleName) {
            if (event.checked) {
                this.roles[roleName] = true;
            }
            else {
                delete this.roles[roleName];
            }
        };
        /**
         * @param {?} letter
         * @return {?}
         */
        UserComponent.prototype.acronymFun = /**
         * @param {?} letter
         * @return {?}
         */
        function (letter) {
            document.querySelector('#' + letter).scrollIntoView(true);
        };
        /**
         * @return {?}
         */
        UserComponent.prototype.try = /**
         * @return {?}
         */
        function () {
            console.log(this.filterDeptList);
        };
        UserComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-user',
                        template: "<common-bill #bill>\r\n\r\n\t<div [formGroup]=\"bill.formGroup\" *ngIf=\"bill.formGroup\" class=\"main mat-elevation-z2 dis-row-sb\">\r\n\t\t<section class=\"section-1\">\r\n\t\t\t<header class=\"title\">\u4FEE\u6539\u7528\u6237</header>\r\n\t\t\t<section class=\"s1-content\">\r\n\t\t\t\t<div class=\"box-1\">\r\n\t\t\t\t\t<div class=\"wrapper\">\r\n\t\t\t\t\t\t<div class=\"title\">\u540D\u79F0</div>\r\n\t\t\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t\t\t<input matInput formControlName=\"Name\"\r\n\t\t\t\t\t\t\t\tcommonBillField>\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"wrapper\">\r\n\t\t\t\t\t\t<div class=\"title\">\u6635\u79F0</div>\r\n\t\t\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t\t\t<input matInput formControlName=\"NickName\"\r\n\t\t\t\t\t\t\t\tcommonBillField>\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"wrapper\">\r\n\t\t\t\t\t\t<div class=\"title\">\u5BC6\u7801</div>\r\n\t\t\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t\t\t<input matInput type=\"password\"\r\n\t\t\t\t\t\t\t\tformControlName=\"Password\" commonBillField>\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"wrapper\">\r\n\t\t\t\t\t\t<div class=\"title\">\u6240\u5C5E\u90E8\u95E8</div>\r\n\t\t\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t\t\t<input matInput formControlName=\"Dept\"\r\n\t\t\t\t\t\t\t\tcommonBillField [matAutocomplete]=\"autoDept\">\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t\t<mat-autocomplete #autoDept=\"matAutocomplete\">\r\n\t\t\t\t\t\t\t<mat-option *ngFor=\"let dept of filterDeptList|async\" [value]=\"dept.Code\">{{dept.Code}} - {{dept.Name}}\r\n\t\t\t\t\t\t\t</mat-option>\r\n\t\t\t\t\t\t</mat-autocomplete>\r\n\t\t\t\t\t</div>\r\n\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"box-2\">\r\n\t\t\t\t\t<div class=\"wrapper freeze-time\">\r\n\t\t\t\t\t\t<div class=\"title\">\u51BB\u7ED3\u65E5\u671F</div>\r\n\t\t\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t\t\t<input matInput type=\"datetime-local\" \r\n\t\t\t\t\t\t\t\tformControlName=\"FreezeTime\" commonBillField\r\n\t\t\t\t\t\t\t\tstep=\"1\">\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"wrapper\">\r\n\t\t\t\t\t\t<div class=\"title\">\u51BB\u7ED3\u539F\u56E0</div>\r\n\t\t\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t\t\t<input matInput formControlName=\"FreezeDesc\"\r\n\t\t\t\t\t\t\t\tcommonBillField>\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"wrapper\">\r\n\t\t\t\t\t\t<div class=\"title\">\u9644\u52A0\u4FE1\u606F</div>\r\n\t\t\t\t\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t\t\t\t\t<textarea matInput matTextareaAutosize matAutosizeMinRows=2 matAutosizeMaxRows=5 formControlName=\"Tag\"\r\n\t\t\t\t\t\t\t\tcommonBillField></textarea>\r\n\t\t\t\t\t\t</mat-form-field>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t</section>\r\n\t\t</section>\r\n\t\t<section class=\"section-2\">\r\n\t\t\t\r\n\t\t\t<section class=\"s2-content\">\r\n\t\t\t\t<header class=\"title\">\u89D2\u8272</header>\r\n\t\t\t\t<div class=\"s2-box-1\">\r\n\t\t\t\t\t<div class=\"wrapper-box\" *ngFor=\"let letter of roleLitters\">\r\n\t\t\t\t\t\t<div class=\"s2-title\" id=\"{{ letter.Letter }}\">{{letter.Letter | uppercase}}</div>\r\n\t\t\t\t\t\t<div class=\"s2-wrapper\" *ngFor=\"let list of letter.Columns\">\r\n\t\t\t\t\t\t\t<mat-checkbox [checked]=\"roles[list]\" (change)=\"roleChange($event,list)\"></mat-checkbox>\r\n\t\t\t\t\t\t\t<span>{{list}}</span>\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t\r\n\t\t\t\t</div>\r\n\t\t\t\r\n\t\t\t</section>\r\n\t\t\t<section class=\"s2-content-2\">\r\n\t\t\t\t<div class=\"s2-title\" *ngFor=\"let letter of roleLitters\">\r\n\t\t\t\t\t<span (click)=\"acronymFun(letter.Letter)\">{{letter.Letter | uppercase}}</span>\r\n\t\t\t\t</div>\r\n\t\t\t</section>\r\n\t\t</section>\r\n\t</div>\r\n<button (click)=\"try()\">111</button>\r\n</common-bill>\r\n\r\n\r\n<!-- 0: {Name: \"Name\", DBName: \"NAME\", Type: \"STR\", MaxLength: 50, Hidden: true, \u2026}\r\n1: {Name: \"NickName\", DBName: \"NICKNAME\", Type: \"STR\", MaxLength: 50, Null: true, \u2026}\r\n2: {Name: \"Salt\", DBName: \"SALT\", Type: \"BYTEA\", Value: \"pMA8mf37dmKZ8QKiZ/1FiA==\"}\r\n3: {Name: \"Password\", DBName: \"PASSWORD\", Type: \"BYTEA\", Value: \"ul0c07xKTaeYr2IX/jd6VI8iRnkWlCukaMF0Q4JyEic=\"}\r\n4: {Name: \"Dept\", DBName: \"DEPT\", Type: \"STR\", MaxLength: 50, Value: \"r\"}\r\n5: {Name: \"Tag\", DBName: \"TAG\", Type: \"STR\", MaxLength: 300, Null: true, \u2026}\r\n6: {Name: \"FreezeTime\", DBName: \"FREEZETIME\", Type: \"DATE\", Null: true, Value: \"\"}\r\n7: {Name: \"FreezeDesc\", DBName: \"FREEZEDESC\", Type: \"STR\", MaxLength: 300, Null: true, \u2026}\r\n8: {Name: \"HeadPortrait\", DBName: \"HEADPORTRAIT\", Type: \"BYTEA\", Null: true, Value: \"\"}\r\n9: {Name: \"HeadPortraitType\", DBName: \"HEADPORTRAITTYPE\", Type: \"STR\", MaxLength: 15, Null: true, \u2026}\r\n10: {Name: \"HeadPortraitTime\", DBName: \"HEADPORTRAITTIME\", Type: \"DATE\", Null: true, Value: \"\"}\r\n11: {Name: \"IndexSetting\", DBName: \"INDEXSETTING\", Type: \"BY -->\r\n\r\n\r\n\r\n<!-- \r\n<common-bill #bill>\r\n\t<div [formGroup]=\"bill.formGroup\" *ngIf=\"bill.formGroup\" class=\"main\">\r\n\t\t<span>\u540D\u79F0</span>\r\n\t\t<mat-form-field>\r\n\t\t\t<input matInput formControlName=\"Name\" commonBillField>\r\n\t\t</mat-form-field>\r\n\t\t<span>\u6635\u79F0</span>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<input matInput formControlName=\"NickName\" commonBillField>\r\n\t\t</mat-form-field>\r\n\t\t<span>\u5BC6\u7801</span>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<input matInput type=\"password\" formControlName=\"Password\" commonBillField>\r\n\t\t</mat-form-field>\r\n\t\t<span>\u6240\u5C5E\u90E8\u95E8</span>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<input matInput formControlName=\"Dept\" commonBillField [matAutocomplete]=\"autoDept\">\r\n\t\t</mat-form-field>\r\n\t\t<mat-autocomplete #autoDept=\"matAutocomplete\">\r\n\t\t\t<mat-option *ngFor=\"let dept of filterDeptList|async\" [value]=\"dept.Code\">{{dept.Code}} - {{dept.Name}}\r\n\t\t\t</mat-option>\r\n\t\t</mat-autocomplete>\r\n\t\t<span>\u51BB\u7ED3\u5230\u671F</span>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<input type=\"datetime-local\" matInput formControlName=\"FreezeTime\" commonBillField step=\"1\">\r\n\t\t</mat-form-field>\r\n\t\t<span>\u51BB\u7ED3\u539F\u56E0</span>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<input matInput formControlName=\"FreezeDesc\" commonBillField>\r\n\t\t</mat-form-field>\r\n\t\t<span>\u9644\u52A0\u4FE1\u606F</span>\r\n\t\t<mat-form-field appearance=\"outline\">\r\n\t\t\t<input matInput formControlName=\"Tag\" commonBillField>\r\n\t\t</mat-form-field>\r\n\t</div>\r\n\t<ng-container *ngFor=\"let role of validRoles\">\r\n\t\t<mat-checkbox *ngIf=\"role.Type==='roleTypeAlways';else normalRole\" [checked]=\"roles[role.Name]\"\r\n\t\t\t(click)=\"$event.preventDefault()\" (change)=\"roleChange($event,role.Name)\">\r\n\t\t\t{{role.Name}}\r\n\t\t</mat-checkbox>\r\n\t\t<ng-template #normalRole>\r\n\t\t\t<mat-checkbox [checked]=\"roles[role.Name]\" (change)=\"roleChange($event,role.Name)\">\r\n\t\t\t\t{{role.Name}}\r\n\t\t\t</mat-checkbox>\r\n\t\t</ng-template>\r\n\t</ng-container>\r\n\r\n</common-bill> -->",
                        providers: [UserBack],
                        styles: ["@charset \"UTF-8\";.dis-row-c{display:flex;justify-content:center}.dis-row-sb{display:flex;justify-content:space-between}.main{width:100%;max-width:960px;min-width:300px;height:calc(100% - 48px - 40px);box-sizing:border-box;margin:48px auto;border-radius:4px}.main .mat-form-field ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:0}.main .mat-form-field ::ng-deep .mat-form-field-infix{border:0;padding:14px 0 11px}.section-1{width:65%;max-width:664px;min-width:100px;box-sizing:border-box;margin-top:24px;margin-left:24px}.section-1 .title{font-size:20px}.s1-content{display:flex;width:100%;max-width:664px;min-width:300px;height:100%;box-sizing:border-box}.s1-content .title{padding-top:24px;padding-bottom:8px}.box-1{width:35%;max-width:216px;min-width:100px;box-sizing:border-box;padding-right:32px;height:calc(100% - 48px - 24px)}.box-1 .wrapper{width:100%;max-width:100%}.box-1 .wrapper .title{font-size:12px}.box-1 .wrapper .mat-form-field{width:100%;font-size:14px}.box-2{width:65%;max-width:304px;min-width:100px;box-sizing:border-box;margin-left:32px;height:368px}.box-2 .wrapper{width:100%;max-width:100%}.box-2 .wrapper .title{font-size:12px}.box-2 .wrapper .mat-form-field{width:100%;font-size:14px}.section-2{position:relative;width:30%;max-width:296px;min-width:100px;box-sizing:border-box}.s2-content{padding-left:24px}.s2-content header{padding-top:24px;margin-bottom:8px;font-size:14px}.s2-title{font-size:12px}.s2-box-1{height:100%;max-height:calc(100vh - 96px - 192px);box-sizing:border-box;overflow:auto}.s2-box-1 .wrapper-box{margin-bottom:8px}.s2-box-1 .s2-wrapper{font-size:14px;height:40px;line-height:40px}.s2-box-1 .s2-wrapper span{margin-left:16px}.s2-content-2{position:absolute;top:0;right:0;margin-top:74px;margin-right:12px}"]
                    }] }
        ];
        /** @nocollapse */
        UserComponent.ctorParameters = function () { return [
            { type: UserBack },
            { type: dbwebCore.CurrentService }
        ]; };
        UserComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.c-user',] }],
            bill: [{ type: core.ViewChild, args: ['bill', { static: true },] }]
        };
        return UserComponent;
    }());
    if (false) {
        /** @type {?} */
        UserComponent.prototype.hostClass;
        /** @type {?} */
        UserComponent.prototype.bill;
        /** @type {?} */
        UserComponent.prototype.filterDeptList;
        /** @type {?} */
        UserComponent.prototype.validRoles;
        /** @type {?} */
        UserComponent.prototype.roles;
        /** @type {?} */
        UserComponent.prototype.roleLists;
        /** @type {?} */
        UserComponent.prototype.roleLitters;
        /** @type {?} */
        UserComponent.prototype.roleTypeAlways;
        /**
         * @type {?}
         * @private
         */
        UserComponent.prototype.back;
        /**
         * @type {?}
         * @private
         */
        UserComponent.prototype.curr;
    }
    /**
     * @param {?} v
     * @return {?}
     */
    function map2WithLetter$2(v) {
        /** @type {?} */
        var mapList = new Map();
        v.forEach((/**
         * @param {?} vv
         * @return {?}
         */
        function (vv) {
            /** @type {?} */
            var headerLetter = pinyin___default(vv, { style: pinyin___default.STYLE_FIRST_LETTER }).map((/**
             * @param {?} s
             * @return {?}
             */
            function (s) { return s[0]; }))[0];
            if (headerLetter.length > 1) {
                headerLetter = headerLetter[0];
            }
            if (mapList.has(headerLetter)) {
                mapList.get(headerLetter).push(vv);
            }
            else {
                mapList.set(headerLetter, [vv]);
            }
        }));
        // 排序
        /** @type {?} */
        var rev = (/** @type {?} */ ([]));
        mapList.forEach((/**
         * @param {?} columns
         * @param {?} letter
         * @return {?}
         */
        function (columns, letter) {
            rev.push((/** @type {?} */ ({ Letter: letter, Columns: columns })));
        }));
        return rev.sort((/**
         * @param {?} a
         * @param {?} b
         * @return {?}
         */
        function (a, b) { return a.Letter.localeCompare(b.Letter); }));
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ɵ0$c = dbwebCore.SaveStateData;
    var UserModule = /** @class */ (function () {
        function UserModule() {
        }
        UserModule.decorators = [
            { type: core.NgModule, args: [{
                        declarations: [UserComponent],
                        imports: [
                            common.CommonModule,
                            BillModule,
                            material.MatFormFieldModule,
                            material.MatCheckboxModule,
                            material.MatAutocompleteModule,
                            material.MatInputModule,
                            router.RouterModule.forChild([
                                {
                                    path: '**',
                                    component: UserComponent,
                                    data: ɵ0$c
                                }
                            ])
                        ]
                    },] }
        ];
        return UserModule;
    }());

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var NoticeComponent$1 = /** @class */ (function () {
        function NoticeComponent(theme, api) {
            var _this = this;
            this.theme = theme;
            this.api = api;
            this.hostClass = true;
            this.options = { maxLines: 1000, printMargin: false };
            this.subs = [];
            this.subs.push(this.theme.theme.subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.themeModel = v.model;
            })));
        }
        Object.defineProperty(NoticeComponent.prototype, "content", {
            get: /**
             * @return {?}
             */
            function () {
                return this.bill.formGroup.get('Content').value;
            },
            set: /**
             * @param {?} val
             * @return {?}
             */
            function (val) {
                this.bill.formGroup.get('Content').patchValue(val);
            },
            enumerable: true,
            configurable: true
        });
        /**
         * @return {?}
         */
        NoticeComponent.prototype.ngOnDestroy = /**
         * @return {?}
         */
        function () {
            this.subs.forEach((/**
             * @param {?} v
             * @return {?}
             */
            function (v) { return v.unsubscribe(); }));
        };
        /**
         * @return {?}
         */
        NoticeComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            var _this = this;
            ace.config.set('basePath', '/front/assets/ace-builds/src-min-noconflict');
            this.subs.push(this.bill.init.subscribe((/**
             * @return {?}
             */
            function () {
                if (_this.bill.isBrowse()) {
                    _this.api.get('get-content-html').subscribe((/**
                     * @param {?} v
                     * @return {?}
                     */
                    function (v) {
                        _this.contentHTML = v;
                    }));
                    if (_this.bill.typeRecord.Publish === '1') {
                        _this.api.get('read-notice').subscribe();
                    }
                }
            })));
        };
        NoticeComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-notice',
                        template: "<common-bill #bill>\r\n\t<div\r\n\t\tclass=\"notice-all \"\r\n\t\t[formGroup]=\"bill.formGroup\"\r\n\t\t*ngIf=\"bill.formGroup\"\r\n\t>\r\n\t\t<ng-container *ngIf=\"bill.isBrowse(); else normal\">\r\n\t\t\t<div class=\"notice-content notice-content-preview mat-elevation-z2\">\r\n\t\t\t\t<div class=\"deptInformation\">\r\n\t\t\t\t\t<span>\r\n\t\t\t\t\t\t<span class=\"notice-creator\">{{\r\n\t\t\t\t\t\t\tbill.formGroup.get(\"Creator\").value\r\n\t\t\t\t\t\t}}</span>\r\n\t\t\t\t\t\t<span>{{ bill.formGroup.get(\"DeptCode\").value }}</span>\r\n\t\t\t\t\t</span>\r\n\t\t\t\t\t<span>{{\r\n\t\t\t\t\t\tbill.formGroup.get(\"PublishTime\").value\r\n\t\t\t\t\t\t\t| date: \"yyyy/MM/dd HH:mm:ss\"\r\n\t\t\t\t\t}}</span>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"notice-title\">\r\n\t\t\t\t\t{{ bill.formGroup.get(\"Title\").value }}\r\n\t\t\t\t</div>\r\n\t\t\t\t<div\r\n\t\t\t\t\tclass=\"markdown vscode-{{ themeModel }}\"\r\n\t\t\t\t\t[innerHTML]=\"contentHTML\"\r\n\t\t\t\t></div>\r\n\t\t\t</div>\r\n\t\t</ng-container>\r\n\t\t<ng-template #normal>\r\n\t\t\t<div class=\"notice-content notice-content-add mat-elevation-z2\">\r\n\t\t\t\t<div class=\"deptInformation\">\r\n\t\t\t\t\t<span>\r\n\t\t\t\t\t\t<span class=\"notice-creator\">{{\r\n\t\t\t\t\t\t\tbill.formGroup.get(\"Creator\").value\r\n\t\t\t\t\t\t}}</span>\r\n\t\t\t\t\t\t<span>{{ bill.formGroup.get(\"DeptCode\").value }}</span>\r\n\t\t\t\t\t</span>\r\n\t\t\t\t\t<span>{{\r\n\t\t\t\t\t\tbill.formGroup.get(\"PublishTime\").value\r\n\t\t\t\t\t\t\t| date: \"yyyy/MM/dd HH:mm:ss\"\r\n\t\t\t\t\t}}</span>\r\n\t\t\t\t</div>\r\n\t\t\t\t<!-- <mat-form-field appearance=\"outline\">\r\n\t\t\t\t<input matInput formControlName=\"ID\" commonBillField />\r\n\t\t\t</mat-form-field> -->\r\n\t\t\t\t<mat-form-field class=\"notice-title\" appearance=\"outline\">\r\n\t\t\t\t\t<input\r\n\t\t\t\t\t\tmatInput\r\n\t\t\t\t\t\tformControlName=\"Title\"\r\n\t\t\t\t\t\tcommonBillField\r\n\t\t\t\t\t\tplaceholder=\"\u8BF7\u5728\u6B64\u5904\u8F93\u5165\u6807\u9898\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t</mat-form-field>\r\n\t\t\t\t<div class=\"notice-ace-editor\">\r\n\t\t\t\t\t<div\r\n\t\t\t\t\t\tace-editor\r\n\t\t\t\t\t\t[(text)]=\"content\"\r\n\t\t\t\t\t\tmode=\"markdown\"\r\n\t\t\t\t\t\t[theme]=\"\r\n\t\t\t\t\t\t\tthemeModel === 'dark' ? 'tomorrow_night' : 'eclipse'\r\n\t\t\t\t\t\t\"\r\n\t\t\t\t\t\t[options]=\"options\"\r\n\t\t\t\t\t\t[autoUpdateContent]=\"true\"\r\n\t\t\t\t\t\t[durationBeforeCallback]=\"1000\"\r\n\t\t\t\t\t\tstyle=\"min-height: 100%; width:100%;\"\r\n\t\t\t\t\t></div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<mat-checkbox\r\n\t\t\t\t\ttrueFalseValue\r\n\t\t\t\t\t[falseValue]=\"''\"\r\n\t\t\t\t\t[trueValue]=\"'1'\"\r\n\t\t\t\t\tformControlName=\"Publish\"\r\n\t\t\t\t\tcommonBillField\r\n\t\t\t\t\t>\u4FDD\u5B58\u65F6\u53D1\u5E03</mat-checkbox\r\n\t\t\t\t>\r\n\t\t\t</div>\r\n\t\t</ng-template>\r\n\t</div>\r\n</common-bill>\r\n",
                        styles: [".notice-all{max-width:960px;height:100%;margin:0 auto;padding:8px 0;box-sizing:border-box}.notice-content{width:100%;margin:0 auto;box-sizing:border-box;border-radius:4px;display:flex;flex-direction:column}.notice-content-preview{max-height:100%;padding:0 0 32px 40px;box-sizing:border-box}.notice-content-preview .markdown{padding-right:40px;flex-grow:1;overflow:auto}.notice-content-preview .markdown p{margin:0}.notice-content-preview .deptInformation{padding-right:40px}.notice-content-preview .notice-title{padding-right:40px;padding-bottom:16px}.notice-content-add{padding:0 40px;height:100%}.notice-content-add .notice-ace-editor{flex-grow:1;border-radius:4px;overflow:auto}.notice-content-add .mat-checkbox{text-align:right;margin:8px 0;font-size:14px}.notice-content-add .mat-form-field ::ng-deep .mat-form-field-wrapper{margin:0;padding-bottom:16px;vertical-align:bottom;-webkit-transform:translateY(0);transform:translateY(0)}.notice-content-add .mat-form-field ::ng-deep .mat-form-field-infix{border:0;padding:10px 0;height:22px}.deptInformation{padding:8px 0 24px;display:flex;justify-content:space-between;font-size:14px}.deptInformation .notice-creator{margin-right:16px}.notice-title{width:100%;font-size:24px;font-weight:700}"]
                    }] }
        ];
        /** @nocollapse */
        NoticeComponent.ctorParameters = function () { return [
            { type: ThemeService },
            { type: dbwebCore.CurrentApiService }
        ]; };
        NoticeComponent.propDecorators = {
            bill: [{ type: core.ViewChild, args: ['bill', { static: true },] }],
            hostClass: [{ type: core.HostBinding, args: ['class.c-notice',] }]
        };
        return NoticeComponent;
    }());
    if (false) {
        /** @type {?} */
        NoticeComponent$1.prototype.bill;
        /** @type {?} */
        NoticeComponent$1.prototype.hostClass;
        /** @type {?} */
        NoticeComponent$1.prototype.options;
        /** @type {?} */
        NoticeComponent$1.prototype.subs;
        /** @type {?} */
        NoticeComponent$1.prototype.themeModel;
        /** @type {?} */
        NoticeComponent$1.prototype.contentHTML;
        /**
         * @type {?}
         * @private
         */
        NoticeComponent$1.prototype.theme;
        /**
         * @type {?}
         * @private
         */
        NoticeComponent$1.prototype.api;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ɵ0$d = dbwebCore.SaveStateData;
    var NoticeModule = /** @class */ (function () {
        function NoticeModule() {
        }
        NoticeModule.decorators = [
            { type: core.NgModule, args: [{
                        declarations: [NoticeComponent$1],
                        imports: [
                            common.CommonModule,
                            BillModule,
                            material.MatFormFieldModule,
                            material.MatInputModule,
                            material.MatCheckboxModule,
                            forms.FormsModule,
                            ng2AceEditor.AceEditorModule,
                            router.RouterModule.forChild([
                                {
                                    path: '**',
                                    component: NoticeComponent$1,
                                    data: ɵ0$d
                                }
                            ])
                        ]
                    },] }
        ];
        return NoticeModule;
    }());

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /** @enum {string} */
    var DumpType = {
        institution: 'institution',
        data: 'data',
    };
    /**
     * @record
     */
    function InstitutionModel() { }
    if (false) {
        /** @type {?} */
        InstitutionModel.prototype.Name;
        /** @type {?} */
        InstitutionModel.prototype.Tables;
    }
    /**
     * @record
     */
    function DumpResult() { }
    if (false) {
        /** @type {?} */
        DumpResult.prototype.TaskInfoURL;
        /** @type {?} */
        DumpResult.prototype.TaskInfoSign;
        /** @type {?} */
        DumpResult.prototype.BrowseTaskElement;
    }
    var DumpInstitutionService = /** @class */ (function () {
        function DumpInstitutionService(api) {
            this.api = api;
            this.dumpType = DumpType.institution;
        }
        /**
         * @return {?}
         */
        DumpInstitutionService.prototype.init = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.getModels().subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.models = v;
            }));
        };
        /**
         * @return {?}
         */
        DumpInstitutionService.prototype.getModels = /**
         * @return {?}
         */
        function () {
            return this.api.get('get-models');
        };
        /**
         * @return {?}
         */
        DumpInstitutionService.prototype.dump = /**
         * @return {?}
         */
        function () {
            return this.api.post('dump', this.dumpType);
        };
        DumpInstitutionService.decorators = [
            { type: core.Injectable }
        ];
        /** @nocollapse */
        DumpInstitutionService.ctorParameters = function () { return [
            { type: dbwebCore.CurrentApiService }
        ]; };
        return DumpInstitutionService;
    }());
    if (false) {
        /** @type {?} */
        DumpInstitutionService.prototype.models;
        /** @type {?} */
        DumpInstitutionService.prototype.dumpType;
        /**
         * @type {?}
         * @private
         */
        DumpInstitutionService.prototype.api;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var DumpInstitutionComponent = /** @class */ (function () {
        function DumpInstitutionComponent(svr, project, current, tabs, eles) {
            this.svr = svr;
            this.project = project;
            this.current = current;
            this.tabs = tabs;
            this.eles = eles;
            this.hostClass = true;
            this.displayedColumns = ['index', 'Name', 'Tables'];
            this.dumpTypeInstitution = DumpType.institution;
            this.dumpTypeData = DumpType.data;
            this.dumpDone = false;
        }
        /**
         * @return {?}
         */
        DumpInstitutionComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () {
            this.svr.init();
        };
        /**
         * @return {?}
         */
        DumpInstitutionComponent.prototype.dump = /**
         * @return {?}
         */
        function () {
            var _this = this;
            this.dumpDone = false;
            this.svr.dump().subscribe((/**
             * @param {?} v
             * @return {?}
             */
            function (v) {
                _this.dumpDone = true;
                _this.taskURL = _this.project.frontURL('task', v.TaskInfoURL);
                _this.eles.addElement(v.BrowseTaskElement);
                _this.eles.setURLSign(v.TaskInfoURL, v.TaskInfoSign);
            }));
        };
        /**
         * @return {?}
         */
        DumpInstitutionComponent.prototype.close = /**
         * @return {?}
         */
        function () {
            this.tabs.close();
        };
        DumpInstitutionComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-dump-institution',
                        template: "<ng-container *ngIf=\"!dumpDone;else done\">\r\n\t<div class=\"dumpSystem-all mat-elevation-z2\">\r\n\t\t<div class=\"dumpSystem-title\">\u5BFC\u51FA\u5236\u5EA6</div>\r\n\t<div class=\"dumpSystem-dept\"><div class=\"dumpSystem-dept-title\">\u5BFC\u51FA\u90E8\u95E8\u4EE3\u7801</div><div class=\"dumpSystem-dept-content\">{{current.data.Dept.Code}}</div></div>\r\n\t<div class=\"dumpSystem-dept\">\r\n\t\t<div class=\"dumpSystem-dept-title\">\u5BFC\u51FA\u7C7B\u578B</div>\r\n        <div class=\"dumpSystem-dept-content\"><mat-radio-group [(ngModel)]=\"svr.dumpType\">\r\n\t\t\t<mat-radio-button [value]=\"dumpTypeInstitution\">\u5236\u5EA6\u5305 (\u751F\u6210\u9ED8\u8BA4\u5236\u5EA6\u6587\u4EF6)\r\n\t\t\t</mat-radio-button>\r\n\t\t\t<mat-radio-button [value]=\"dumpTypeData\">\u6570\u636E\u5305 (\u751F\u6210\u53EF\u4E0B\u8F7DZIP\u6587\u4EF6)\r\n\t\t\t</mat-radio-button>\r\n\t\t</mat-radio-group></div>\r\n\t</div>\r\n    <div class=\"dumpType-tips\">\u5236\u5EA6\u5305\u542B\u6709\u4EE5\u4E0Bmodel</div>\r\n\t\r\n\t\r\n\t<!-- <div *ngFor=\"let row of svr.models;index as i\">\r\n\t\t<div>{{i}}</div>\r\n\t\t<div>{{row.Name}}</div>\r\n\t\t<div>{{row.Tables}}</div>\r\n\t</div> -->\r\n\t<div class=\"example-container mat-elevation-z4\">\r\n\t\t<table mat-table [dataSource]=\"svr.models\">\r\n\t\t\t<ng-container matColumnDef=\"index\">\r\n\t\t\t\t<th mat-header-cell *matHeaderCellDef> ID </th>\r\n\t\t\t\t<td mat-cell *matCellDef=\"let index = index\"> {{index + 1}} </td>\r\n\t\t\t</ng-container>\r\n\t\t\t<ng-container matColumnDef=\"Name\">\r\n\t\t\t  <th mat-header-cell *matHeaderCellDef> Name </th>\r\n\t\t\t  <td mat-cell *matCellDef=\"let element\"> {{element.Name}} </td>\r\n\t\t\t</ng-container>\r\n\t\t\t<ng-container matColumnDef=\"Tables\">\r\n\t\t\t  <th mat-header-cell *matHeaderCellDef> Tables </th>\r\n\t\t\t  <td mat-cell *matCellDef=\"let element\"> {{element.Tables}} </td>\r\n\t\t\t</ng-container>\r\n\t\t\t<tr mat-header-row *matHeaderRowDef=\"displayedColumns; sticky: true\"></tr>\r\n\t\t\t<tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\r\n\t\t</table>\r\n\t</div>\r\n\t<div class=\"dumpType-button\">\r\n\t\t<button mat-flat-button color=\"primary\" (click)=\"dump()\">\u5BFC\u51FA</button>\r\n    </div>\r\n</div>\r\n</ng-container>\r\n<ng-template #done>\r\n\t<!-- <div>\r\n\t\t\u4EFB\u52A1\u63D0\u4EA4\u5230\u540E\u53F0\uFF0C\u70B9\u51FB\r\n\t\t<a [routerLink]=\"taskURL\">\u4EFB\u52A1\u660E\u7EC6</a>\u67E5\u770B\u8FDB\u5EA6\r\n\t\t<button mat-button (click)=\"close()\">\u5173\u95ED</button>\r\n\t</div> -->\r\n\t<div class=\"prepare\">\r\n\t\t<div class=\"prepare-wrapper\">\r\n\t\t\t<div class=\"prepare-text\">\r\n\t\t\t\t\u4EFB\u52A1\u63D0\u4EA4\u5230\u540E\u53F0\uFF0C\u70B9\u51FB\r\n\t\t<a [routerLink]=\"taskURL\">\u4EFB\u52A1\u660E\u7EC6</a>\u67E5\u770B\u8FDB\u5EA6\r\n\t\t\t</div>\r\n\t\t\t<div class=\"btn\">\r\n\t\t\t\t<button mat-flat-button color=\"primary\" (click)=\"close()\">\u5173\u95ED</button>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n</ng-template>",
                        providers: [DumpInstitutionService],
                        styles: [":host{width:100%;height:100%}.dumpSystem-all{max-width:960px;margin:16px auto;padding:16px 24px;max-height:calc(100% - 32px);border-radius:4px;box-sizing:border-box;display:flex;flex-direction:column}.dumpSystem-all .dumpSystem-title{font-size:20px;font-weight:700;margin-bottom:16px}.dumpSystem-all .dumpSystem-dept{width:100%;display:flex;align-items:center;margin:8px 0}.dumpSystem-all .dumpSystem-dept .dumpSystem-dept-title{width:140px;font-size:14px}.dumpSystem-all .dumpSystem-dept .dumpSystem-dept-content{flex-grow:1;font-size:14px}.dumpSystem-all .dumpSystem-dept .dumpSystem-dept-content .mat-radio-button{margin-right:32px}.dumpSystem-all .dumpType-tips{margin:0 0 12px;font-size:12px}.dumpSystem-all .example-container{flex-grow:1;overflow-y:auto}.dumpSystem-all table{width:100%}.dumpSystem-all .dumpType-button{text-align:right;margin-top:16px;color:#fff}.prepare{display:flex;justify-content:center;align-items:center;width:100%;height:100%}.prepare .prepare-wrapper{width:624px;height:456px;margin-top:-60px;background:url(/front/assets/export/done.png) top center/300px 300px no-repeat;box-shadow:0 2px 5px 0 rgba(0,0,0,.14);box-sizing:border-box;border-radius:4px;display:flex;flex-direction:column;justify-content:flex-end}.prepare .prepare-wrapper .prepare-text{padding:16px 128px 0;font-size:16px}.prepare .prepare-wrapper .prepare-text a{font-weight:700}.prepare .prepare-wrapper .btn{width:100%;text-align:right;padding:35px 32px 25px 0;box-sizing:border-box}"]
                    }] }
        ];
        /** @nocollapse */
        DumpInstitutionComponent.ctorParameters = function () { return [
            { type: DumpInstitutionService },
            { type: dbwebCore.ProjectService },
            { type: dbwebCore.CurrentService },
            { type: TabsService },
            { type: dbwebCore.ElementsService }
        ]; };
        DumpInstitutionComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.c-dump-institution',] }]
        };
        return DumpInstitutionComponent;
    }());
    if (false) {
        /** @type {?} */
        DumpInstitutionComponent.prototype.hostClass;
        /** @type {?} */
        DumpInstitutionComponent.prototype.displayedColumns;
        /** @type {?} */
        DumpInstitutionComponent.prototype.dumpTypeInstitution;
        /** @type {?} */
        DumpInstitutionComponent.prototype.dumpTypeData;
        /** @type {?} */
        DumpInstitutionComponent.prototype.dumpDone;
        /** @type {?} */
        DumpInstitutionComponent.prototype.taskURL;
        /** @type {?} */
        DumpInstitutionComponent.prototype.svr;
        /**
         * @type {?}
         * @private
         */
        DumpInstitutionComponent.prototype.project;
        /** @type {?} */
        DumpInstitutionComponent.prototype.current;
        /**
         * @type {?}
         * @private
         */
        DumpInstitutionComponent.prototype.tabs;
        /**
         * @type {?}
         * @private
         */
        DumpInstitutionComponent.prototype.eles;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ɵ0$e = dbwebCore.SaveStateData;
    var DumpInstitutionModule = /** @class */ (function () {
        function DumpInstitutionModule() {
        }
        DumpInstitutionModule.decorators = [
            { type: core.NgModule, args: [{
                        declarations: [DumpInstitutionComponent],
                        imports: [
                            common.CommonModule,
                            material.MatFormFieldModule,
                            material.MatButtonModule,
                            material.MatTableModule,
                            material.MatRadioModule,
                            forms.FormsModule,
                            router.RouterModule.forChild([{ path: '**', data: ɵ0$e, component: DumpInstitutionComponent }])
                        ]
                    },] }
        ];
        return DumpInstitutionModule;
    }());

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    /**
     * @record
     */
    function FetchDataResult() { }
    if (false) {
        /** @type {?} */
        FetchDataResult.prototype.FromElement;
        /** @type {?} */
        FetchDataResult.prototype.Count;
    }
    /**
     * @record
     */
    function RemoveselResult() { }
    if (false) {
        /** @type {?} */
        RemoveselResult.prototype.TaskInfoURL;
        /** @type {?} */
        RemoveselResult.prototype.TaskInfoSign;
        /** @type {?} */
        RemoveselResult.prototype.BrowseTaskElement;
    }
    var RemoveselComponent = /** @class */ (function () {
        function RemoveselComponent(api) {
            this.api = api;
            this.hostClass = true;
        }
        /**
         * @return {?}
         */
        RemoveselComponent.prototype.ngOnInit = /**
         * @return {?}
         */
        function () { };
        /**
         * @return {?}
         */
        RemoveselComponent.prototype.apiFetchRemoveSelData = /**
         * @return {?}
         */
        function () {
            return this.api.get('fetch-data');
        };
        /**
         * @return {?}
         */
        RemoveselComponent.prototype.apiRemovesel = /**
         * @return {?}
         */
        function () {
            return this.api.post('removesel');
        };
        RemoveselComponent.decorators = [
            { type: core.Component, args: [{
                        selector: 'common-removesel',
                        template: "<p>removesel works!!!</p>\n",
                        styles: [""]
                    }] }
        ];
        /** @nocollapse */
        RemoveselComponent.ctorParameters = function () { return [
            { type: dbwebCore.CurrentApiService }
        ]; };
        RemoveselComponent.propDecorators = {
            hostClass: [{ type: core.HostBinding, args: ['class.c-removesel',] }]
        };
        return RemoveselComponent;
    }());
    if (false) {
        /** @type {?} */
        RemoveselComponent.prototype.hostClass;
        /**
         * @type {?}
         * @private
         */
        RemoveselComponent.prototype.api;
    }

    /**
     * @fileoverview added by tsickle
     * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
     */
    var ɵ0$f = dbwebCore.SaveStateData;
    var RemoveselModule = /** @class */ (function () {
        function RemoveselModule() {
        }
        RemoveselModule.decorators = [
            { type: core.NgModule, args: [{
                        declarations: [RemoveselComponent],
                        imports: [
                            common.CommonModule,
                            router.RouterModule.forChild([
                                {
                                    path: '**',
                                    component: RemoveselComponent,
                                    data: ɵ0$f
                                }
                            ])
                        ]
                    },] }
        ];
        return RemoveselModule;
    }());

    exports.AppLoadService = AppLoadService;
    exports.CTRL_DUMP_INSTITUTION = CTRL_DUMP_INSTITUTION;
    exports.CTRL_ELEMENT = CTRL_ELEMENT;
    exports.CTRL_EXPORT = CTRL_EXPORT;
    exports.CTRL_IMPORT = CTRL_IMPORT;
    exports.CTRL_INDEX = CTRL_INDEX;
    exports.CTRL_LOGIN = CTRL_LOGIN;
    exports.CTRL_NOTICE = CTRL_NOTICE;
    exports.CTRL_RECORDVIEW = CTRL_RECORDVIEW;
    exports.CTRL_REMOVESEL = CTRL_REMOVESEL;
    exports.CTRL_ROLE = CTRL_ROLE;
    exports.CTRL_TASK = CTRL_TASK;
    exports.CTRL_UPDATE = CTRL_UPDATE;
    exports.CTRL_USER = CTRL_USER;
    exports.CTRL_USERINFO = CTRL_USERINFO;
    exports.CTRL_VERSION = CTRL_VERSION;
    exports.CommonBillModule = CommonBillModule;
    exports.DBWebCommonModule = DBWebCommonModule;
    exports.DumpInstitutionModule = DumpInstitutionModule;
    exports.ElementModule = ElementModule;
    exports.ExportModule = ExportModule;
    exports.HomeComponent = HomeComponent;
    exports.ImportModule = ImportModule;
    exports.IndexModule = IndexModule;
    exports.LoginModule = LoginModule;
    exports.NoticeModule = NoticeModule;
    exports.PageNotFoundComponent = PageNotFoundComponent;
    exports.PageNotFoundModule = PageNotFoundModule;
    exports.RecordViewInnerModule = RecordViewInnerModule;
    exports.RecordViewModule = RecordViewModule;
    exports.RemoveselModule = RemoveselModule;
    exports.RoleModule = RoleModule;
    exports.SetDeptModule = SetDeptModule;
    exports.TaskModule = TaskModule;
    exports.ThemeService = ThemeService;
    exports.UpdateModule = UpdateModule;
    exports.UserModule = UserModule;
    exports.UserinfoModule = UserinfoModule;
    exports.VersionModule = VersionModule;
    exports.portraitDefault = portraitDefault;
    exports.ɵa = HomeModule;
    exports.ɵb = SetDeptComponent;
    exports.ɵba = SetPropertyImportComponent;
    exports.ɵbb = ConditionalTemplateComponent;
    exports.ɵbc = ProcessingListsComponent;
    exports.ɵbd = SelectSettingComponent;
    exports.ɵbe = SliderSettingComponent;
    exports.ɵbf = RangeInputSettingComponent;
    exports.ɵbg = SetPropertyBillComponent;
    exports.ɵbj = SetPropertyUpdateComponent;
    exports.ɵbk = SetParamsComponent;
    exports.ɵbl = ListParamsComponent;
    exports.ɵbm = ImportFieldComponent;
    exports.ɵbn = ImportSetComponent;
    exports.ɵbo = BillModule;
    exports.ɵbp = BillComponent;
    exports.ɵbq = BillCloneBackfaceService;
    exports.ɵbr = BillFieldDirective;
    exports.ɵbs = CloneComponent;
    exports.ɵbt = TrueFalseValueDirective;
    exports.ɵbu = ErrorMessageModule;
    exports.ɵbv = ErrorMessageComponent;
    exports.ɵbw = ViewDefineModule;
    exports.ɵbx = ViewDefineComponent;
    exports.ɵby = IconSelectModule;
    exports.ɵbz = IconSelectComponent;
    exports.ɵc = SetDeptService;
    exports.ɵca = LabelManagerModule;
    exports.ɵcb = LabelManagerComponent;
    exports.ɵcc = LabelManagerService;
    exports.ɵcd = CategoryComponent;
    exports.ɵce = LabelForEditComponent;
    exports.ɵcf = EditCategoryDialogComponent;
    exports.ɵcg = EditLabelComponent;
    exports.ɵch = EditLabelService;
    exports.ɵci = LabelHistoryComponent;
    exports.ɵcj = NodeModule;
    exports.ɵck = NodeComponent;
    exports.ɵcl = ConditionNodeComponent;
    exports.ɵcm = ShowHistoryDialogModule;
    exports.ɵcn = ShowHistoryDialogComponent;
    exports.ɵcp = ExportComponent;
    exports.ɵcq = exportAnimation;
    exports.ɵcr = ExportService;
    exports.ɵcs = TableModule;
    exports.ɵct = TableComponent;
    exports.ɵcu = ServiceService;
    exports.ɵcv = ServiceData;
    exports.ɵcw = BackFaceService;
    exports.ɵcx = ProcessComponent;
    exports.ɵcy = LabelSelectorModule;
    exports.ɵcz = LabelSelectorComponent;
    exports.ɵd = HomeTabfunctionService;
    exports.ɵda = ViewSelectorModule;
    exports.ɵdb = ViewSelectorComponent;
    exports.ɵdc = LabelSelectModule;
    exports.ɵdd = LabelSelectComponent;
    exports.ɵde = CategoryForSelectComponent;
    exports.ɵdf = RecordViewComponent;
    exports.ɵdg = FooterToolbarComponent;
    exports.ɵdh = LabelDrawerComponent;
    exports.ɵdi = LabelDrawerForSelectComponent;
    exports.ɵdj = LabelDrawerForEditComponent;
    exports.ɵdk = ViewDrawerComponent;
    exports.ɵdl = ConditionalTemplateRunnerComponent;
    exports.ɵdm = CtRunnerInputComponent;
    exports.ɵdn = CtRunnerSelectComponent;
    exports.ɵdo = CtRunnerMultiSelectComponent;
    exports.ɵdp = CtRunnerRangeInputComponent;
    exports.ɵdq = CtRunnerSilderComponent;
    exports.ɵdr = IndexComponent;
    exports.ɵds = IndexService;
    exports.ɵdt = WelcomeComponent;
    exports.ɵdu = BannerComponent;
    exports.ɵdv = NavigationComponent;
    exports.ɵdw = DataListComponent;
    exports.ɵdx = ChartComponent;
    exports.ɵdy = SettingDialogComponent;
    exports.ɵdz = CustomDateFormatter;
    exports.ɵe = TabsService;
    exports.ɵea = CalendarComponent;
    exports.ɵeb = NoticeComponent;
    exports.ɵec = MoreVertComponent;
    exports.ɵed = ImportComponent;
    exports.ɵee = ImportService;
    exports.ɵef = LoginComponent;
    exports.ɵeg = TaskComponent;
    exports.ɵeh = TaskState;
    exports.ɵei = TaskService;
    exports.ɵej = NewlinePipe;
    exports.ɵek = VersionComponent;
    exports.ɵel = UserinfoComponent;
    exports.ɵem = PortraitEditComponent;
    exports.ɵen = PortraitMaskComponent;
    exports.ɵeo = UpdateComponent;
    exports.ɵep = UpdateService;
    exports.ɵeq = CommonBillComponent;
    exports.ɵer = RoleComponent;
    exports.ɵes = RoleBack;
    exports.ɵet = UserComponent;
    exports.ɵeu = UserBack;
    exports.ɵev = NoticeComponent$1;
    exports.ɵew = DumpInstitutionComponent;
    exports.ɵex = DumpInstitutionService;
    exports.ɵey = RemoveselComponent;
    exports.ɵf = HomeNavComponent;
    exports.ɵg = NavtreeService;
    exports.ɵh = NavHome;
    exports.ɵi = MainNavService;
    exports.ɵj = MenuComponent;
    exports.ɵk = RouterTab;
    exports.ɵl = RouterTabItem;
    exports.ɵm = RouterTabComponent;
    exports.ɵn = NavSelectionDeptComponent;
    exports.ɵo = ConfirmDialogModule;
    exports.ɵp = ConfirmDialogComponent;
    exports.ɵq = PromptDialogModule;
    exports.ɵr = PromptDialogComponent;
    exports.ɵs = IconList;
    exports.ɵt = ElementComponent;
    exports.ɵu = ElementService;
    exports.ɵv = ElementBackFace;
    exports.ɵw = SetPropertyRecordviewComponent;
    exports.ɵx = LabelMockBackfaceService;
    exports.ɵy = EleViewBackFaceService;
    exports.ɵz = ParamsRecordviewFetchSQLComponent;

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

}));
//# sourceMappingURL=dbweb-common.umd.js.map