(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["main"],{

/***/ "./$$_lazy_route_resource lazy recursive":
/*!******************************************************!*\
  !*** ./$$_lazy_route_resource lazy namespace object ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports) {

function webpackEmptyAsyncContext(req) {
	// Here Promise.resolve().then() is used instead of new Promise() to prevent
	// uncaught exception popping up in devtools
	return Promise.resolve().then(function() {
		var e = new Error("Cannot find module '" + req + "'");
		e.code = 'MODULE_NOT_FOUND';
		throw e;
	});
}
webpackEmptyAsyncContext.keys = function() { return []; };
webpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;
module.exports = webpackEmptyAsyncContext;
webpackEmptyAsyncContext.id = "./$$_lazy_route_resource lazy recursive";

/***/ }),

/***/ "./node_modules/moment/locale sync recursive ^\\.\\/.*$":
/*!**************************************************!*\
  !*** ./node_modules/moment/locale sync ^\.\/.*$ ***!
  \**************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

var map = {
	"./af": "./node_modules/moment/locale/af.js",
	"./af.js": "./node_modules/moment/locale/af.js",
	"./ar": "./node_modules/moment/locale/ar.js",
	"./ar-dz": "./node_modules/moment/locale/ar-dz.js",
	"./ar-dz.js": "./node_modules/moment/locale/ar-dz.js",
	"./ar-kw": "./node_modules/moment/locale/ar-kw.js",
	"./ar-kw.js": "./node_modules/moment/locale/ar-kw.js",
	"./ar-ly": "./node_modules/moment/locale/ar-ly.js",
	"./ar-ly.js": "./node_modules/moment/locale/ar-ly.js",
	"./ar-ma": "./node_modules/moment/locale/ar-ma.js",
	"./ar-ma.js": "./node_modules/moment/locale/ar-ma.js",
	"./ar-ps": "./node_modules/moment/locale/ar-ps.js",
	"./ar-ps.js": "./node_modules/moment/locale/ar-ps.js",
	"./ar-sa": "./node_modules/moment/locale/ar-sa.js",
	"./ar-sa.js": "./node_modules/moment/locale/ar-sa.js",
	"./ar-tn": "./node_modules/moment/locale/ar-tn.js",
	"./ar-tn.js": "./node_modules/moment/locale/ar-tn.js",
	"./ar.js": "./node_modules/moment/locale/ar.js",
	"./az": "./node_modules/moment/locale/az.js",
	"./az.js": "./node_modules/moment/locale/az.js",
	"./be": "./node_modules/moment/locale/be.js",
	"./be.js": "./node_modules/moment/locale/be.js",
	"./bg": "./node_modules/moment/locale/bg.js",
	"./bg.js": "./node_modules/moment/locale/bg.js",
	"./bm": "./node_modules/moment/locale/bm.js",
	"./bm.js": "./node_modules/moment/locale/bm.js",
	"./bn": "./node_modules/moment/locale/bn.js",
	"./bn-bd": "./node_modules/moment/locale/bn-bd.js",
	"./bn-bd.js": "./node_modules/moment/locale/bn-bd.js",
	"./bn.js": "./node_modules/moment/locale/bn.js",
	"./bo": "./node_modules/moment/locale/bo.js",
	"./bo.js": "./node_modules/moment/locale/bo.js",
	"./br": "./node_modules/moment/locale/br.js",
	"./br.js": "./node_modules/moment/locale/br.js",
	"./bs": "./node_modules/moment/locale/bs.js",
	"./bs.js": "./node_modules/moment/locale/bs.js",
	"./ca": "./node_modules/moment/locale/ca.js",
	"./ca.js": "./node_modules/moment/locale/ca.js",
	"./cs": "./node_modules/moment/locale/cs.js",
	"./cs.js": "./node_modules/moment/locale/cs.js",
	"./cv": "./node_modules/moment/locale/cv.js",
	"./cv.js": "./node_modules/moment/locale/cv.js",
	"./cy": "./node_modules/moment/locale/cy.js",
	"./cy.js": "./node_modules/moment/locale/cy.js",
	"./da": "./node_modules/moment/locale/da.js",
	"./da.js": "./node_modules/moment/locale/da.js",
	"./de": "./node_modules/moment/locale/de.js",
	"./de-at": "./node_modules/moment/locale/de-at.js",
	"./de-at.js": "./node_modules/moment/locale/de-at.js",
	"./de-ch": "./node_modules/moment/locale/de-ch.js",
	"./de-ch.js": "./node_modules/moment/locale/de-ch.js",
	"./de.js": "./node_modules/moment/locale/de.js",
	"./dv": "./node_modules/moment/locale/dv.js",
	"./dv.js": "./node_modules/moment/locale/dv.js",
	"./el": "./node_modules/moment/locale/el.js",
	"./el.js": "./node_modules/moment/locale/el.js",
	"./en-au": "./node_modules/moment/locale/en-au.js",
	"./en-au.js": "./node_modules/moment/locale/en-au.js",
	"./en-ca": "./node_modules/moment/locale/en-ca.js",
	"./en-ca.js": "./node_modules/moment/locale/en-ca.js",
	"./en-gb": "./node_modules/moment/locale/en-gb.js",
	"./en-gb.js": "./node_modules/moment/locale/en-gb.js",
	"./en-ie": "./node_modules/moment/locale/en-ie.js",
	"./en-ie.js": "./node_modules/moment/locale/en-ie.js",
	"./en-il": "./node_modules/moment/locale/en-il.js",
	"./en-il.js": "./node_modules/moment/locale/en-il.js",
	"./en-in": "./node_modules/moment/locale/en-in.js",
	"./en-in.js": "./node_modules/moment/locale/en-in.js",
	"./en-nz": "./node_modules/moment/locale/en-nz.js",
	"./en-nz.js": "./node_modules/moment/locale/en-nz.js",
	"./en-sg": "./node_modules/moment/locale/en-sg.js",
	"./en-sg.js": "./node_modules/moment/locale/en-sg.js",
	"./eo": "./node_modules/moment/locale/eo.js",
	"./eo.js": "./node_modules/moment/locale/eo.js",
	"./es": "./node_modules/moment/locale/es.js",
	"./es-do": "./node_modules/moment/locale/es-do.js",
	"./es-do.js": "./node_modules/moment/locale/es-do.js",
	"./es-mx": "./node_modules/moment/locale/es-mx.js",
	"./es-mx.js": "./node_modules/moment/locale/es-mx.js",
	"./es-us": "./node_modules/moment/locale/es-us.js",
	"./es-us.js": "./node_modules/moment/locale/es-us.js",
	"./es.js": "./node_modules/moment/locale/es.js",
	"./et": "./node_modules/moment/locale/et.js",
	"./et.js": "./node_modules/moment/locale/et.js",
	"./eu": "./node_modules/moment/locale/eu.js",
	"./eu.js": "./node_modules/moment/locale/eu.js",
	"./fa": "./node_modules/moment/locale/fa.js",
	"./fa.js": "./node_modules/moment/locale/fa.js",
	"./fi": "./node_modules/moment/locale/fi.js",
	"./fi.js": "./node_modules/moment/locale/fi.js",
	"./fil": "./node_modules/moment/locale/fil.js",
	"./fil.js": "./node_modules/moment/locale/fil.js",
	"./fo": "./node_modules/moment/locale/fo.js",
	"./fo.js": "./node_modules/moment/locale/fo.js",
	"./fr": "./node_modules/moment/locale/fr.js",
	"./fr-ca": "./node_modules/moment/locale/fr-ca.js",
	"./fr-ca.js": "./node_modules/moment/locale/fr-ca.js",
	"./fr-ch": "./node_modules/moment/locale/fr-ch.js",
	"./fr-ch.js": "./node_modules/moment/locale/fr-ch.js",
	"./fr.js": "./node_modules/moment/locale/fr.js",
	"./fy": "./node_modules/moment/locale/fy.js",
	"./fy.js": "./node_modules/moment/locale/fy.js",
	"./ga": "./node_modules/moment/locale/ga.js",
	"./ga.js": "./node_modules/moment/locale/ga.js",
	"./gd": "./node_modules/moment/locale/gd.js",
	"./gd.js": "./node_modules/moment/locale/gd.js",
	"./gl": "./node_modules/moment/locale/gl.js",
	"./gl.js": "./node_modules/moment/locale/gl.js",
	"./gom-deva": "./node_modules/moment/locale/gom-deva.js",
	"./gom-deva.js": "./node_modules/moment/locale/gom-deva.js",
	"./gom-latn": "./node_modules/moment/locale/gom-latn.js",
	"./gom-latn.js": "./node_modules/moment/locale/gom-latn.js",
	"./gu": "./node_modules/moment/locale/gu.js",
	"./gu.js": "./node_modules/moment/locale/gu.js",
	"./he": "./node_modules/moment/locale/he.js",
	"./he.js": "./node_modules/moment/locale/he.js",
	"./hi": "./node_modules/moment/locale/hi.js",
	"./hi.js": "./node_modules/moment/locale/hi.js",
	"./hr": "./node_modules/moment/locale/hr.js",
	"./hr.js": "./node_modules/moment/locale/hr.js",
	"./hu": "./node_modules/moment/locale/hu.js",
	"./hu.js": "./node_modules/moment/locale/hu.js",
	"./hy-am": "./node_modules/moment/locale/hy-am.js",
	"./hy-am.js": "./node_modules/moment/locale/hy-am.js",
	"./id": "./node_modules/moment/locale/id.js",
	"./id.js": "./node_modules/moment/locale/id.js",
	"./is": "./node_modules/moment/locale/is.js",
	"./is.js": "./node_modules/moment/locale/is.js",
	"./it": "./node_modules/moment/locale/it.js",
	"./it-ch": "./node_modules/moment/locale/it-ch.js",
	"./it-ch.js": "./node_modules/moment/locale/it-ch.js",
	"./it.js": "./node_modules/moment/locale/it.js",
	"./ja": "./node_modules/moment/locale/ja.js",
	"./ja.js": "./node_modules/moment/locale/ja.js",
	"./jv": "./node_modules/moment/locale/jv.js",
	"./jv.js": "./node_modules/moment/locale/jv.js",
	"./ka": "./node_modules/moment/locale/ka.js",
	"./ka.js": "./node_modules/moment/locale/ka.js",
	"./kk": "./node_modules/moment/locale/kk.js",
	"./kk.js": "./node_modules/moment/locale/kk.js",
	"./km": "./node_modules/moment/locale/km.js",
	"./km.js": "./node_modules/moment/locale/km.js",
	"./kn": "./node_modules/moment/locale/kn.js",
	"./kn.js": "./node_modules/moment/locale/kn.js",
	"./ko": "./node_modules/moment/locale/ko.js",
	"./ko.js": "./node_modules/moment/locale/ko.js",
	"./ku": "./node_modules/moment/locale/ku.js",
	"./ku-kmr": "./node_modules/moment/locale/ku-kmr.js",
	"./ku-kmr.js": "./node_modules/moment/locale/ku-kmr.js",
	"./ku.js": "./node_modules/moment/locale/ku.js",
	"./ky": "./node_modules/moment/locale/ky.js",
	"./ky.js": "./node_modules/moment/locale/ky.js",
	"./lb": "./node_modules/moment/locale/lb.js",
	"./lb.js": "./node_modules/moment/locale/lb.js",
	"./lo": "./node_modules/moment/locale/lo.js",
	"./lo.js": "./node_modules/moment/locale/lo.js",
	"./lt": "./node_modules/moment/locale/lt.js",
	"./lt.js": "./node_modules/moment/locale/lt.js",
	"./lv": "./node_modules/moment/locale/lv.js",
	"./lv.js": "./node_modules/moment/locale/lv.js",
	"./me": "./node_modules/moment/locale/me.js",
	"./me.js": "./node_modules/moment/locale/me.js",
	"./mi": "./node_modules/moment/locale/mi.js",
	"./mi.js": "./node_modules/moment/locale/mi.js",
	"./mk": "./node_modules/moment/locale/mk.js",
	"./mk.js": "./node_modules/moment/locale/mk.js",
	"./ml": "./node_modules/moment/locale/ml.js",
	"./ml.js": "./node_modules/moment/locale/ml.js",
	"./mn": "./node_modules/moment/locale/mn.js",
	"./mn.js": "./node_modules/moment/locale/mn.js",
	"./mr": "./node_modules/moment/locale/mr.js",
	"./mr.js": "./node_modules/moment/locale/mr.js",
	"./ms": "./node_modules/moment/locale/ms.js",
	"./ms-my": "./node_modules/moment/locale/ms-my.js",
	"./ms-my.js": "./node_modules/moment/locale/ms-my.js",
	"./ms.js": "./node_modules/moment/locale/ms.js",
	"./mt": "./node_modules/moment/locale/mt.js",
	"./mt.js": "./node_modules/moment/locale/mt.js",
	"./my": "./node_modules/moment/locale/my.js",
	"./my.js": "./node_modules/moment/locale/my.js",
	"./nb": "./node_modules/moment/locale/nb.js",
	"./nb.js": "./node_modules/moment/locale/nb.js",
	"./ne": "./node_modules/moment/locale/ne.js",
	"./ne.js": "./node_modules/moment/locale/ne.js",
	"./nl": "./node_modules/moment/locale/nl.js",
	"./nl-be": "./node_modules/moment/locale/nl-be.js",
	"./nl-be.js": "./node_modules/moment/locale/nl-be.js",
	"./nl.js": "./node_modules/moment/locale/nl.js",
	"./nn": "./node_modules/moment/locale/nn.js",
	"./nn.js": "./node_modules/moment/locale/nn.js",
	"./oc-lnc": "./node_modules/moment/locale/oc-lnc.js",
	"./oc-lnc.js": "./node_modules/moment/locale/oc-lnc.js",
	"./pa-in": "./node_modules/moment/locale/pa-in.js",
	"./pa-in.js": "./node_modules/moment/locale/pa-in.js",
	"./pl": "./node_modules/moment/locale/pl.js",
	"./pl.js": "./node_modules/moment/locale/pl.js",
	"./pt": "./node_modules/moment/locale/pt.js",
	"./pt-br": "./node_modules/moment/locale/pt-br.js",
	"./pt-br.js": "./node_modules/moment/locale/pt-br.js",
	"./pt.js": "./node_modules/moment/locale/pt.js",
	"./ro": "./node_modules/moment/locale/ro.js",
	"./ro.js": "./node_modules/moment/locale/ro.js",
	"./ru": "./node_modules/moment/locale/ru.js",
	"./ru.js": "./node_modules/moment/locale/ru.js",
	"./sd": "./node_modules/moment/locale/sd.js",
	"./sd.js": "./node_modules/moment/locale/sd.js",
	"./se": "./node_modules/moment/locale/se.js",
	"./se.js": "./node_modules/moment/locale/se.js",
	"./si": "./node_modules/moment/locale/si.js",
	"./si.js": "./node_modules/moment/locale/si.js",
	"./sk": "./node_modules/moment/locale/sk.js",
	"./sk.js": "./node_modules/moment/locale/sk.js",
	"./sl": "./node_modules/moment/locale/sl.js",
	"./sl.js": "./node_modules/moment/locale/sl.js",
	"./sq": "./node_modules/moment/locale/sq.js",
	"./sq.js": "./node_modules/moment/locale/sq.js",
	"./sr": "./node_modules/moment/locale/sr.js",
	"./sr-cyrl": "./node_modules/moment/locale/sr-cyrl.js",
	"./sr-cyrl.js": "./node_modules/moment/locale/sr-cyrl.js",
	"./sr.js": "./node_modules/moment/locale/sr.js",
	"./ss": "./node_modules/moment/locale/ss.js",
	"./ss.js": "./node_modules/moment/locale/ss.js",
	"./sv": "./node_modules/moment/locale/sv.js",
	"./sv.js": "./node_modules/moment/locale/sv.js",
	"./sw": "./node_modules/moment/locale/sw.js",
	"./sw.js": "./node_modules/moment/locale/sw.js",
	"./ta": "./node_modules/moment/locale/ta.js",
	"./ta.js": "./node_modules/moment/locale/ta.js",
	"./te": "./node_modules/moment/locale/te.js",
	"./te.js": "./node_modules/moment/locale/te.js",
	"./tet": "./node_modules/moment/locale/tet.js",
	"./tet.js": "./node_modules/moment/locale/tet.js",
	"./tg": "./node_modules/moment/locale/tg.js",
	"./tg.js": "./node_modules/moment/locale/tg.js",
	"./th": "./node_modules/moment/locale/th.js",
	"./th.js": "./node_modules/moment/locale/th.js",
	"./tk": "./node_modules/moment/locale/tk.js",
	"./tk.js": "./node_modules/moment/locale/tk.js",
	"./tl-ph": "./node_modules/moment/locale/tl-ph.js",
	"./tl-ph.js": "./node_modules/moment/locale/tl-ph.js",
	"./tlh": "./node_modules/moment/locale/tlh.js",
	"./tlh.js": "./node_modules/moment/locale/tlh.js",
	"./tr": "./node_modules/moment/locale/tr.js",
	"./tr.js": "./node_modules/moment/locale/tr.js",
	"./tzl": "./node_modules/moment/locale/tzl.js",
	"./tzl.js": "./node_modules/moment/locale/tzl.js",
	"./tzm": "./node_modules/moment/locale/tzm.js",
	"./tzm-latn": "./node_modules/moment/locale/tzm-latn.js",
	"./tzm-latn.js": "./node_modules/moment/locale/tzm-latn.js",
	"./tzm.js": "./node_modules/moment/locale/tzm.js",
	"./ug-cn": "./node_modules/moment/locale/ug-cn.js",
	"./ug-cn.js": "./node_modules/moment/locale/ug-cn.js",
	"./uk": "./node_modules/moment/locale/uk.js",
	"./uk.js": "./node_modules/moment/locale/uk.js",
	"./ur": "./node_modules/moment/locale/ur.js",
	"./ur.js": "./node_modules/moment/locale/ur.js",
	"./uz": "./node_modules/moment/locale/uz.js",
	"./uz-latn": "./node_modules/moment/locale/uz-latn.js",
	"./uz-latn.js": "./node_modules/moment/locale/uz-latn.js",
	"./uz.js": "./node_modules/moment/locale/uz.js",
	"./vi": "./node_modules/moment/locale/vi.js",
	"./vi.js": "./node_modules/moment/locale/vi.js",
	"./x-pseudo": "./node_modules/moment/locale/x-pseudo.js",
	"./x-pseudo.js": "./node_modules/moment/locale/x-pseudo.js",
	"./yo": "./node_modules/moment/locale/yo.js",
	"./yo.js": "./node_modules/moment/locale/yo.js",
	"./zh-cn": "./node_modules/moment/locale/zh-cn.js",
	"./zh-cn.js": "./node_modules/moment/locale/zh-cn.js",
	"./zh-hk": "./node_modules/moment/locale/zh-hk.js",
	"./zh-hk.js": "./node_modules/moment/locale/zh-hk.js",
	"./zh-mo": "./node_modules/moment/locale/zh-mo.js",
	"./zh-mo.js": "./node_modules/moment/locale/zh-mo.js",
	"./zh-tw": "./node_modules/moment/locale/zh-tw.js",
	"./zh-tw.js": "./node_modules/moment/locale/zh-tw.js"
};


function webpackContext(req) {
	var id = webpackContextResolve(req);
	return __webpack_require__(id);
}
function webpackContextResolve(req) {
	if(!__webpack_require__.o(map, req)) {
		var e = new Error("Cannot find module '" + req + "'");
		e.code = 'MODULE_NOT_FOUND';
		throw e;
	}
	return map[req];
}
webpackContext.keys = function webpackContextKeys() {
	return Object.keys(map);
};
webpackContext.resolve = webpackContextResolve;
module.exports = webpackContext;
webpackContext.id = "./node_modules/moment/locale sync recursive ^\\.\\/.*$";

/***/ }),

/***/ "./src/app/app-routing.module.ts":
/*!***************************************!*\
  !*** ./src/app/app-routing.module.ts ***!
  \***************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.AppRoutingModule = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const router_1 = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const routes = [
    {
        path: '',
        redirectTo: 'login',
        pathMatch: 'full'
    },
    {
        path: 'sign-in',
        redirectTo: 'login',
        pathMatch: 'full'
    }
];
class AppRoutingModule {
}
exports.AppRoutingModule = AppRoutingModule;
AppRoutingModule.ɵmod = i0.ɵɵdefineNgModule({ type: AppRoutingModule });
AppRoutingModule.ɵinj = i0.ɵɵdefineInjector({ factory: function AppRoutingModule_Factory(t) { return new (t || AppRoutingModule)(); }, imports: [[router_1.RouterModule.forRoot(routes, { useHash: true })], router_1.RouterModule] });
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(AppRoutingModule, { imports: [i1.RouterModule], exports: [router_1.RouterModule] }); })();
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AppRoutingModule, [{
        type: core_1.NgModule,
        args: [{
                imports: [router_1.RouterModule.forRoot(routes, { useHash: true })],
                exports: [router_1.RouterModule]
            }]
    }], null, null); })();


/***/ }),

/***/ "./src/app/app.component.ts":
/*!**********************************!*\
  !*** ./src/app/app.component.ts ***!
  \**********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.AppComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const defaultLanguage = tslib_1.__importStar(__webpack_require__(/*! ../assets/i18n/en.json */ "./src/assets/i18n/en.json"));
const jaLanguage = tslib_1.__importStar(__webpack_require__(/*! ../assets/i18n/ja.json */ "./src/assets/i18n/ja.json"));
const viLanguage = tslib_1.__importStar(__webpack_require__(/*! ../assets/i18n/vi.json */ "./src/assets/i18n/vi.json"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! primeng/toast */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-toast.js"));
class AppComponent {
    constructor(primengConfig, translate) {
        this.primengConfig = primengConfig;
        this.translate = translate;
        // fix bugs load language for download page
        // translate.addLangs(['en', 'vi', 'ja']);
        // translate.setDefaultLang('en');
        // translate.use('en');
        // translate.get('primeng').subscribe(res => {
        //   this.primengConfig.setTranslation(res);
        // });
    }
    ngOnInit() {
        this.primengConfig.ripple = true;
        this.changeLanguage(null);
    }
    doDetectBrowserLang() {
        switch (this.translate.getBrowserLang().toLocaleLowerCase()) {
            case 'vi':
            case 'vi-vn':
                return 'vi';
            case 'ja':
                return 'ja';
            default:
                return 'en';
        }
    }
    changeLanguage(lang) {
        if (lang !== null) {
            switch (lang) {
                case 'vi':
                    this.translate.setTranslation('vi', viLanguage);
                    break;
                case 'ja':
                    this.translate.setTranslation('ja', jaLanguage);
                    break;
                default:
                    lang = 'en';
                    this.translate.setTranslation('en', defaultLanguage);
                    break;
            }
            // this language will be used as a fallback when a translation isn't found in the current language
            this.translate.setDefaultLang(lang);
            // the lang to use, if the lang isn't available, it will use the current loader to get them
            this.translate.use(lang);
        }
        else {
            const detectedLang = this.doDetectBrowserLang();
            switch (detectedLang) {
                case 'vi':
                    this.translate.setTranslation('vi', viLanguage);
                    break;
                case 'ja':
                    this.translate.setTranslation('ja', jaLanguage);
                    break;
                default:
                    this.translate.setTranslation('en', defaultLanguage);
                    break;
            }
            this.translate.setDefaultLang(detectedLang);
            this.translate.use(detectedLang);
        }
        this.translate.get('primeng').subscribe((res) => {
            this.primengConfig.setTranslation(res);
        });
    }
}
exports.AppComponent = AppComponent;
AppComponent.ɵfac = function AppComponent_Factory(t) { return new (t || AppComponent)(i0.ɵɵdirectiveInject(i1.PrimeNGConfig), i0.ɵɵdirectiveInject(i2.TranslateService)); };
AppComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AppComponent, selectors: [["app-root"]], decls: 2, vars: 1, consts: [[3, "baseZIndex"]], template: function AppComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelement(0, "router-outlet");
        i0.ɵɵelement(1, "p-toast", 0);
    } if (rf & 2) {
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("baseZIndex", 99999);
    } }, directives: [i3.RouterOutlet, i4.Toast], styles: ["[_nghost-%COMP%]     .email-transfer {\n  width: 330px;\n  display: block;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXBwLmNvbXBvbmVudC5zY3NzIiwic3JjL2FwcC9hcHAuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0U7RUFDRSxZQUFBO0VBQ0EsY0FBQTtBQ0FKIiwiZmlsZSI6InNyYy9hcHAvYXBwLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiOmhvc3QgOjpuZy1kZWVwIHtcbiAgLmVtYWlsLXRyYW5zZmVyIHtcbiAgICB3aWR0aDogMzMwcHg7XG4gICAgZGlzcGxheTogYmxvY2s7XG4gIH1cbn1cbiIsIjpob3N0IDo6bmctZGVlcCAuZW1haWwtdHJhbnNmZXIge1xuICB3aWR0aDogMzMwcHg7XG4gIGRpc3BsYXk6IGJsb2NrO1xufSJdfQ== */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AppComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-root',
                templateUrl: './app.component.html',
                styleUrls: ['./app.component.scss'],
            }]
    }], function () { return [{ type: i1.PrimeNGConfig }, { type: i2.TranslateService }]; }, null); })();


/***/ }),

/***/ "./src/app/app.module.ts":
/*!*******************************!*\
  !*** ./src/app/app.module.ts ***!
  \*******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.AppModule = exports.createTranslateLoader = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const platform_browser_1 = __webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/__ivy_ngcc__/fesm2015/platform-browser.js");
const animations_1 = __webpack_require__(/*! @angular/platform-browser/animations */ "./node_modules/@angular/platform-browser/__ivy_ngcc__/fesm2015/animations.js");
const app_routing_module_1 = __webpack_require__(/*! ./app-routing.module */ "./src/app/app-routing.module.ts");
const app_component_1 = __webpack_require__(/*! ./app.component */ "./src/app/app.component.ts");
const non_authentication_pages_module_1 = __webpack_require__(/*! ./non-authentication-pages/non-authentication-pages.module */ "./src/app/non-authentication-pages/non-authentication-pages.module.ts");
const authentication_pages_module_1 = __webpack_require__(/*! ./authentication-pages/authentication-pages.module */ "./src/app/authentication-pages/authentication-pages.module.ts");
const http_loader_1 = __webpack_require__(/*! @ngx-translate/http-loader */ "./node_modules/@ngx-translate/http-loader/__ivy_ngcc__/fesm2015/ngx-translate-http-loader.js");
const http_1 = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js");
const core_2 = __webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js");
const toast_1 = __webpack_require__(/*! primeng/toast */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-toast.js");
const jwt_interceptor_1 = __webpack_require__(/*! ../interceptor/jwt.interceptor */ "./src/interceptor/jwt.interceptor.ts");
const error_interceptor_1 = __webpack_require__(/*! ../interceptor/error.interceptor */ "./src/interceptor/error.interceptor.ts");
const api_1 = __webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js");
const auth_service_1 = __webpack_require__(/*! ./services/auth.service */ "./src/app/services/auth.service.ts");
const app_initializer_1 = __webpack_require__(/*! ../interceptor/app.initializer */ "./src/interceptor/app.initializer.ts");
const common_1 = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js");
const ngx_clipboard_1 = __webpack_require__(/*! ngx-clipboard */ "./node_modules/ngx-clipboard/__ivy_ngcc__/fesm2015/ngx-clipboard.js");
const overlay_1 = __webpack_require__(/*! @angular/cdk/overlay */ "./node_modules/@angular/cdk/__ivy_ngcc__/fesm2015/overlay.js");
const spinner_interceptor_1 = __webpack_require__(/*! ../interceptor/spinner.interceptor */ "./src/interceptor/spinner.interceptor.ts");
const broadcast_service_1 = __webpack_require__(/*! ./services/broadcast.service */ "./src/app/services/broadcast.service.ts");
const ng_recaptcha_1 = __webpack_require__(/*! ng-recaptcha */ "./node_modules/ng-recaptcha/__ivy_ngcc__/fesm2015/ng-recaptcha.js");
const environment_1 = __webpack_require__(/*! ../environments/environment */ "./src/environments/environment.ts");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
function createTranslateLoader(http) {
    return new http_loader_1.TranslateHttpLoader(new http_1.HttpClient(http), 'assets/i18n/', '.json');
}
exports.createTranslateLoader = createTranslateLoader;
class AppModule {
}
exports.AppModule = AppModule;
AppModule.ɵmod = i0.ɵɵdefineNgModule({ type: AppModule, bootstrap: [app_component_1.AppComponent] });
AppModule.ɵinj = i0.ɵɵdefineInjector({ factory: function AppModule_Factory(t) { return new (t || AppModule)(); }, providers: [
        platform_browser_1.Title,
        api_1.MessageService,
        broadcast_service_1.BroadcastService,
        {
            provide: core_1.APP_INITIALIZER,
            useFactory: app_initializer_1.appInitializer,
            multi: true,
            deps: [auth_service_1.AuthService],
        },
        { provide: http_1.HTTP_INTERCEPTORS, useClass: jwt_interceptor_1.JwtInterceptor, multi: true },
        { provide: http_1.HTTP_INTERCEPTORS, useClass: error_interceptor_1.ErrorInterceptor, multi: true },
        { provide: common_1.HashLocationStrategy, useClass: common_1.HashLocationStrategy },
        { provide: http_1.HTTP_INTERCEPTORS, useClass: spinner_interceptor_1.SpinnerInterceptor, multi: true },
        {
            provide: ng_recaptcha_1.RECAPTCHA_SETTINGS,
            useValue: { siteKey: environment_1.environment.RECAPTCHA_KEY },
        },
    ], imports: [[
            platform_browser_1.BrowserModule,
            http_1.HttpClientModule,
            app_routing_module_1.AppRoutingModule,
            animations_1.BrowserAnimationsModule,
            non_authentication_pages_module_1.NonAuthenticationPagesModule,
            authentication_pages_module_1.AuthenticationPagesModule,
            toast_1.ToastModule,
            core_2.TranslateModule.forRoot({
                // defaultLanguage: 'en', // fix bugs detect language for header of download page
                loader: {
                    provide: core_2.TranslateLoader,
                    useFactory: (createTranslateLoader),
                    deps: [http_1.HttpBackend]
                }
            }),
            overlay_1.OverlayModule,
            ngx_clipboard_1.ClipboardModule,
            ng_recaptcha_1.RecaptchaModule
        ]] });
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(AppModule, { declarations: [app_component_1.AppComponent], imports: [platform_browser_1.BrowserModule,
        http_1.HttpClientModule,
        app_routing_module_1.AppRoutingModule,
        animations_1.BrowserAnimationsModule,
        non_authentication_pages_module_1.NonAuthenticationPagesModule,
        authentication_pages_module_1.AuthenticationPagesModule,
        toast_1.ToastModule, i1.TranslateModule, overlay_1.OverlayModule,
        ngx_clipboard_1.ClipboardModule,
        ng_recaptcha_1.RecaptchaModule] }); })();
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AppModule, [{
        type: core_1.NgModule,
        args: [{
                declarations: [
                    app_component_1.AppComponent
                ],
                imports: [
                    platform_browser_1.BrowserModule,
                    http_1.HttpClientModule,
                    app_routing_module_1.AppRoutingModule,
                    animations_1.BrowserAnimationsModule,
                    non_authentication_pages_module_1.NonAuthenticationPagesModule,
                    authentication_pages_module_1.AuthenticationPagesModule,
                    toast_1.ToastModule,
                    core_2.TranslateModule.forRoot({
                        // defaultLanguage: 'en', // fix bugs detect language for header of download page
                        loader: {
                            provide: core_2.TranslateLoader,
                            useFactory: (createTranslateLoader),
                            deps: [http_1.HttpBackend]
                        }
                    }),
                    overlay_1.OverlayModule,
                    ngx_clipboard_1.ClipboardModule,
                    ng_recaptcha_1.RecaptchaModule
                ],
                providers: [
                    platform_browser_1.Title,
                    api_1.MessageService,
                    broadcast_service_1.BroadcastService,
                    {
                        provide: core_1.APP_INITIALIZER,
                        useFactory: app_initializer_1.appInitializer,
                        multi: true,
                        deps: [auth_service_1.AuthService],
                    },
                    { provide: http_1.HTTP_INTERCEPTORS, useClass: jwt_interceptor_1.JwtInterceptor, multi: true },
                    { provide: http_1.HTTP_INTERCEPTORS, useClass: error_interceptor_1.ErrorInterceptor, multi: true },
                    { provide: common_1.HashLocationStrategy, useClass: common_1.HashLocationStrategy },
                    { provide: http_1.HTTP_INTERCEPTORS, useClass: spinner_interceptor_1.SpinnerInterceptor, multi: true },
                    {
                        provide: ng_recaptcha_1.RECAPTCHA_SETTINGS,
                        useValue: { siteKey: environment_1.environment.RECAPTCHA_KEY },
                    },
                ],
                bootstrap: [app_component_1.AppComponent]
            }]
    }], null, null); })();


/***/ }),

/***/ "./src/app/authentication-pages/account-settings/account-information/account-information.component.ts":
/*!************************************************************************************************************!*\
  !*** ./src/app/authentication-pages/account-settings/account-information/account-information.component.ts ***!
  \************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.AccountInformationComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/payment.service */ "./src/app/services/payment.service.ts"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! primeng/dropdown */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dropdown.js"));
function AccountInformationComponent_small_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 3);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "label.pin_code"));
} }
function AccountInformationComponent_label_9_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "label", 19);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(ctx_r1.userInfo.pinCode);
} }
function AccountInformationComponent_div_11_i_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 29);
} }
function AccountInformationComponent_div_11_i_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 30);
} }
function AccountInformationComponent_div_11_i_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 31);
} }
function AccountInformationComponent_div_11_i_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 32);
} }
function AccountInformationComponent_div_11_i_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 33);
} }
function AccountInformationComponent_div_11_i_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 34);
} }
function AccountInformationComponent_div_11_i_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 35);
} }
function AccountInformationComponent_div_11_Template(rf, ctx) { if (rf & 1) {
    const _r18 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 20);
    i0.ɵɵtemplate(1, AccountInformationComponent_div_11_i_1_Template, 1, 0, "i", 21);
    i0.ɵɵtemplate(2, AccountInformationComponent_div_11_i_2_Template, 1, 0, "i", 22);
    i0.ɵɵtemplate(3, AccountInformationComponent_div_11_i_3_Template, 1, 0, "i", 23);
    i0.ɵɵtemplate(4, AccountInformationComponent_div_11_i_4_Template, 1, 0, "i", 24);
    i0.ɵɵtemplate(5, AccountInformationComponent_div_11_i_5_Template, 1, 0, "i", 25);
    i0.ɵɵtemplate(6, AccountInformationComponent_div_11_i_6_Template, 1, 0, "i", 26);
    i0.ɵɵtemplate(7, AccountInformationComponent_div_11_i_7_Template, 1, 0, "i", 27);
    i0.ɵɵelementStart(8, "div");
    i0.ɵɵelementStart(9, "b");
    i0.ɵɵtext(10);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(11, "div");
    i0.ɵɵtext(12);
    i0.ɵɵpipe(13, "translate");
    i0.ɵɵelementStart(14, "b");
    i0.ɵɵtext(15);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(16, "i", 28);
    i0.ɵɵlistener("click", function AccountInformationComponent_div_11_Template_i_click_16_listener() { i0.ɵɵrestoreView(_r18); const ctx_r17 = i0.ɵɵnextContext(); return ctx_r17.confirmDeleteCard(); });
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r2.currentCard.cardType === 1);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r2.currentCard.cardType === 2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r2.currentCard.cardType === 3);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r2.currentCard.cardType === 4);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r2.currentCard.cardType === 5);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r2.currentCard.cardType === 6);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r2.currentCard.cardType === 7 || ctx_r2.currentCard.card_type === 0);
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate1(" **** ", ctx_r2.currentCard.cardUserNumber, "");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(13, 10, "label.expired_on"), " ");
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(ctx_r2.currentCard.expireDate);
} }
function AccountInformationComponent_div_12_div_6_small_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 39);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.require"), " ");
} }
function AccountInformationComponent_div_12_div_6_small_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 39);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.special_chars"), " ");
} }
function AccountInformationComponent_div_12_div_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtemplate(1, AccountInformationComponent_div_12_div_6_small_1_Template, 3, 3, "small", 38);
    i0.ɵɵtemplate(2, AccountInformationComponent_div_12_div_6_small_2_Template, 3, 3, "small", 38);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r19 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r19.profileFrm.controls["lastName"].errors == null ? null : ctx_r19.profileFrm.controls["lastName"].errors.required);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r19.profileFrm.controls["lastName"].errors == null ? null : ctx_r19.profileFrm.controls["lastName"].errors.pattern);
} }
function AccountInformationComponent_div_12_Template(rf, ctx) { if (rf & 1) {
    const _r23 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 2);
    i0.ɵɵelementStart(1, "span", 9);
    i0.ɵɵelementStart(2, "input", 36);
    i0.ɵɵlistener("ngModelChange", function AccountInformationComponent_div_12_Template_input_ngModelChange_2_listener($event) { i0.ɵɵrestoreView(_r23); const ctx_r22 = i0.ɵɵnextContext(); return ctx_r22.userInfo.lastName = $event; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "label", 37);
    i0.ɵɵtext(4);
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(6, AccountInformationComponent_div_12_div_6_Template, 3, 2, "div", 12);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngModel", ctx_r3.userInfo.lastName);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 3, "label.last_name"));
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", (ctx_r3.profileFrm.controls["lastName"].dirty || ctx_r3.profileFrm.controls["lastName"].touched) && ctx_r3.profileFrm.controls["lastName"].invalid);
} }
function AccountInformationComponent_div_19_small_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 39);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.require"), " ");
} }
function AccountInformationComponent_div_19_small_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 39);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.special_chars"), " ");
} }
function AccountInformationComponent_div_19_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtemplate(1, AccountInformationComponent_div_19_small_1_Template, 3, 3, "small", 38);
    i0.ɵɵtemplate(2, AccountInformationComponent_div_19_small_2_Template, 3, 3, "small", 38);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r4 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r4.profileFrm.controls["firstName"].errors == null ? null : ctx_r4.profileFrm.controls["firstName"].errors.required);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r4.profileFrm.controls["firstName"].errors == null ? null : ctx_r4.profileFrm.controls["firstName"].errors.pattern);
} }
function AccountInformationComponent_div_20_div_6_small_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 39);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.require"), " ");
} }
function AccountInformationComponent_div_20_div_6_small_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 39);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.special_chars"), " ");
} }
function AccountInformationComponent_div_20_div_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtemplate(1, AccountInformationComponent_div_20_div_6_small_1_Template, 3, 3, "small", 38);
    i0.ɵɵtemplate(2, AccountInformationComponent_div_20_div_6_small_2_Template, 3, 3, "small", 38);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r26 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r26.profileFrm.controls["lastName"].errors == null ? null : ctx_r26.profileFrm.controls["lastName"].errors.required);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r26.profileFrm.controls["lastName"].errors == null ? null : ctx_r26.profileFrm.controls["lastName"].errors.pattern);
} }
function AccountInformationComponent_div_20_Template(rf, ctx) { if (rf & 1) {
    const _r30 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 2);
    i0.ɵɵelementStart(1, "span", 9);
    i0.ɵɵelementStart(2, "input", 40);
    i0.ɵɵlistener("ngModelChange", function AccountInformationComponent_div_20_Template_input_ngModelChange_2_listener($event) { i0.ɵɵrestoreView(_r30); const ctx_r29 = i0.ɵɵnextContext(); return ctx_r29.userInfo.lastName = $event; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "label", 41);
    i0.ɵɵtext(4);
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(6, AccountInformationComponent_div_20_div_6_Template, 3, 2, "div", 12);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r5 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngModel", ctx_r5.userInfo.lastName);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 3, "label.last_name"));
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", (ctx_r5.profileFrm.controls["lastName"].dirty || ctx_r5.profileFrm.controls["lastName"].touched) && ctx_r5.profileFrm.controls["lastName"].invalid);
} }
function AccountInformationComponent_ng_template_24_div_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelementStart(1, "div");
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r31 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, ctx_r31.selectedTimezone.name));
} }
function AccountInformationComponent_ng_template_24_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, AccountInformationComponent_ng_template_24_div_0_Template, 4, 3, "div", 12);
} if (rf & 2) {
    const ctx_r6 = i0.ɵɵnextContext();
    i0.ɵɵproperty("ngIf", ctx_r6.selectedTimezone);
} }
function AccountInformationComponent_ng_template_25_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelementStart(1, "div");
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const timezone_r32 = ctx.$implicit;
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, timezone_r32.name));
} }
function AccountInformationComponent_ng_template_32_div_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelementStart(1, "div");
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r33 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, ctx_r33.selectedLanguage.name));
} }
function AccountInformationComponent_ng_template_32_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, AccountInformationComponent_ng_template_32_div_0_Template, 4, 3, "div", 12);
} if (rf & 2) {
    const ctx_r8 = i0.ɵɵnextContext();
    i0.ɵɵproperty("ngIf", ctx_r8.selectedLanguage);
} }
function AccountInformationComponent_ng_template_33_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelementStart(1, "div");
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const language_r34 = ctx.$implicit;
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, language_r34.name));
} }
class AccountInformationComponent {
    constructor(fb, authService, translate, paymentService, messageService, confirmationService) {
        this.fb = fb;
        this.authService = authService;
        this.translate = translate;
        this.paymentService = paymentService;
        this.messageService = messageService;
        this.confirmationService = confirmationService;
        this.onDeleteCard = new core_1.EventEmitter();
        this.profileFrm = new forms_1.FormGroup({});
        this.utils = app_util_1.default;
        this.constant = app_constants_1.default;
        this.languageOption = [];
        this.timezoneOption = [];
        this.submitting = false;
    }
    ngOnChanges(changes) {
        if (changes.userDetails && changes.userDetails.currentValue) {
            this.userDetails = changes.userDetails.currentValue;
            this.userInfo = this.userDetails.userInfo;
        }
        if (changes.cards) {
            this.cards = changes.cards.currentValue;
            this.currentCard = (this.cards && this.cards.length > 0) ? this.cards[0] : null;
        }
    }
    ngOnInit() {
        this.languageOption = [
            { code: 'auto', name: 'language.auto' },
            { code: 'en', name: 'language.en' },
            { code: 'ja', name: 'language.ja' },
            { code: 'vi', name: 'language.vn' },
        ];
        this.timezoneOption = [
            { code: -12, name: 'label.timezone.GMT_-12' },
            { code: -11, name: 'label.timezone.GMT_-11' },
            { code: -10, name: 'label.timezone.GMT_-10' },
            { code: -9, name: 'label.timezone.GMT_-9' },
            { code: -8, name: 'label.timezone.GMT_-8' },
            { code: -7, name: 'label.timezone.GMT_-7' },
            { code: -6, name: 'label.timezone.GMT_-6' },
            { code: -5, name: 'label.timezone.GMT_-5' },
            { code: -4, name: 'label.timezone.GMT_-4' },
            { code: -3, name: 'label.timezone.GMT_-3' },
            { code: -2, name: 'label.timezone.GMT_-2' },
            { code: -1, name: 'label.timezone.GMT_-1' },
            { code: 0, name: 'label.timezone.GMT_0' },
            { code: 1, name: 'label.timezone.GMT_+1' },
            { code: 2, name: 'label.timezone.GMT_+2' },
            { code: 3, name: 'label.timezone.GMT_+3' },
            { code: 4, name: 'label.timezone.GMT_+4' },
            { code: 5, name: 'label.timezone.GMT_+5' },
            { code: 6, name: 'label.timezone.GMT_+6' },
            { code: 7, name: 'label.timezone.GMT_+7' },
            { code: 8, name: 'label.timezone.GMT_+8' },
            { code: 9, name: 'label.timezone.GMT_+9' },
            { code: 10, name: 'label.timezone.GMT_+10' },
            { code: 11, name: 'label.timezone.GMT_+11' },
            { code: 12, name: 'label.timezone.GMT_+12' }
        ];
        this.authUser = this.authService.authUser;
        this.userInfo = this.userDetails.userInfo;
        this.selectedLanguage = this.languageOption.find(language => language.code === this.userInfo.lang);
        this.selectedTimezone = this.timezoneOption.find(timezone => timezone.code === this.userInfo.timeZone);
        this.profileFrm = this.fb.group({
            firstName: ['', [forms_1.Validators.required, forms_1.Validators.pattern(this.constant.PATTERNS.SCRIPT_PATTERN)]],
            lastName: ['', [forms_1.Validators.required, forms_1.Validators.pattern(this.constant.PATTERNS.SCRIPT_PATTERN)]],
            language: [],
            timezone: [],
            notifyAccountChange: [false],
            notifyFileProtectedExp: [false],
            twoFA: [false],
        });
        this.currentCard = (this.cards && this.cards.length > 0) ? this.cards[0] : null;
    }
    confirmDeleteCard() {
        this.confirmationService.confirm({
            header: this.utils.translate(this.translate, 'label.delete_card_title'),
            message: this.utils.translate(this.translate, 'label.delete_card_mgs'),
            icon: 'pi pi-exclamation-triangle',
            defaultFocus: 'none',
            accept: () => {
                if (this.submitting) {
                    return;
                }
                this.submitting = true;
                this.paymentService.deleteCard(this.currentCard.cardId).subscribe(res => {
                    if (res.status === 200) {
                        this.messageService.add({
                            severity: 'success',
                            detail: this.utils.translate(this.translate, 'default_toast.delete_card_success')
                        });
                        this.onDeleteCard.emit(true);
                    }
                    this.submitting = false;
                });
            }
        });
    }
}
exports.AccountInformationComponent = AccountInformationComponent;
AccountInformationComponent.ɵfac = function AccountInformationComponent_Factory(t) { return new (t || AccountInformationComponent)(i0.ɵɵdirectiveInject(i1.FormBuilder), i0.ɵɵdirectiveInject(i2.AuthService), i0.ɵɵdirectiveInject(i3.TranslateService), i0.ɵɵdirectiveInject(i4.PaymentService), i0.ɵɵdirectiveInject(i5.MessageService), i0.ɵɵdirectiveInject(i5.ConfirmationService)); };
AccountInformationComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AccountInformationComponent, selectors: [["app-account-information"]], inputs: { userDetails: "userDetails", cards: "cards" }, outputs: { onDeleteCard: "onDeleteCard" }, features: [i0.ɵɵNgOnChangesFeature], decls: 37, vars: 25, consts: [[3, "formGroup"], [1, "p-fluid", "p-formgrid", "p-grid", "p-mt-2"], [1, "p-field", "p-col-12", "p-md-6"], [1, "p-d-block", "p-mb-1"], [1, "p-text-italic"], ["class", "p-d-block p-mb-1", 4, "ngIf"], ["class", "p-badge p-badge-info", 4, "ngIf"], ["class", "p-d-flex p-align-start card-container p-d-flex ", 4, "ngIf"], ["class", "p-field p-col-12 p-md-6", 4, "ngIf"], [1, "p-float-label"], ["formControlName", "firstName", "id", "firstName", "maxlength", "64", "pInputText", "", "type", "text", 3, "ngModel", "ngModelChange"], ["for", "firstName"], [4, "ngIf"], ["id", "timezone", "formControlName", "timezone", "optionLabel", "name", 3, "options", "ngModel", "ngModelChange"], ["pTemplate", "selectedItem"], ["pTemplate", "item"], ["for", "timezone"], ["id", "language", "formControlName", "language", "optionLabel", "name", 3, "options", "ngModel", "ngModelChange"], ["for", "language"], [1, "p-badge", "p-badge-info"], [1, "p-d-flex", "p-align-start", "card-container", "p-d-flex"], ["class", "fab fa-2x fa-cc-visa", 4, "ngIf"], ["class", "fab fa-2x fa-cc-mastercard", 4, "ngIf"], ["class", "fab fa-2x fa-cc-amex", 4, "ngIf"], ["class", "fab fa-2x fa-cc-diners-club", 4, "ngIf"], ["class", "fab fa-2x fa-cc-discover", 4, "ngIf"], ["class", "fab fa-2x fa-cc-jcb", 4, "ngIf"], ["class", "far fa-credit-card", 4, "ngIf"], [1, "fas", "fa-trash", "rm-card", 3, "click"], [1, "fab", "fa-2x", "fa-cc-visa"], [1, "fab", "fa-2x", "fa-cc-mastercard"], [1, "fab", "fa-2x", "fa-cc-amex"], [1, "fab", "fa-2x", "fa-cc-diners-club"], [1, "fab", "fa-2x", "fa-cc-discover"], [1, "fab", "fa-2x", "fa-cc-jcb"], [1, "far", "fa-credit-card"], ["formControlName", "lastName", "id", "lastNameJa", "maxlength", "64", "pInputText", "", "type", "text", 3, "ngModel", "ngModelChange"], ["for", "lastNameJa"], ["class", "p-error", 4, "ngIf"], [1, "p-error"], ["formControlName", "lastName", "id", "lastName", "maxlength", "64", "pInputText", "", "type", "text", 3, "ngModel", "ngModelChange"], ["for", "lastName"]], template: function AccountInformationComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "form", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵelementStart(2, "div", 2);
        i0.ɵɵelementStart(3, "small", 3);
        i0.ɵɵtext(4);
        i0.ɵɵpipe(5, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(6, "span", 4);
        i0.ɵɵtext(7);
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(8, AccountInformationComponent_small_8_Template, 3, 3, "small", 5);
        i0.ɵɵtemplate(9, AccountInformationComponent_label_9_Template, 2, 1, "label", 6);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(10, "div", 2);
        i0.ɵɵtemplate(11, AccountInformationComponent_div_11_Template, 17, 12, "div", 7);
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(12, AccountInformationComponent_div_12_Template, 7, 5, "div", 8);
        i0.ɵɵelementStart(13, "div", 2);
        i0.ɵɵelementStart(14, "span", 9);
        i0.ɵɵelementStart(15, "input", 10);
        i0.ɵɵlistener("ngModelChange", function AccountInformationComponent_Template_input_ngModelChange_15_listener($event) { return ctx.userInfo.firstName = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(16, "label", 11);
        i0.ɵɵtext(17);
        i0.ɵɵpipe(18, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(19, AccountInformationComponent_div_19_Template, 3, 2, "div", 12);
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(20, AccountInformationComponent_div_20_Template, 7, 5, "div", 8);
        i0.ɵɵelementStart(21, "div", 2);
        i0.ɵɵelementStart(22, "div", 9);
        i0.ɵɵelementStart(23, "p-dropdown", 13);
        i0.ɵɵlistener("ngModelChange", function AccountInformationComponent_Template_p_dropdown_ngModelChange_23_listener($event) { return ctx.userInfo.timeZone = $event; });
        i0.ɵɵtemplate(24, AccountInformationComponent_ng_template_24_Template, 1, 1, "ng-template", 14);
        i0.ɵɵtemplate(25, AccountInformationComponent_ng_template_25_Template, 4, 3, "ng-template", 15);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(26, "label", 16);
        i0.ɵɵtext(27);
        i0.ɵɵpipe(28, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(29, "div", 2);
        i0.ɵɵelementStart(30, "div", 9);
        i0.ɵɵelementStart(31, "p-dropdown", 17);
        i0.ɵɵlistener("ngModelChange", function AccountInformationComponent_Template_p_dropdown_ngModelChange_31_listener($event) { return ctx.selectedLanguage = $event; });
        i0.ɵɵtemplate(32, AccountInformationComponent_ng_template_32_Template, 1, 1, "ng-template", 14);
        i0.ɵɵtemplate(33, AccountInformationComponent_ng_template_33_Template, 4, 3, "ng-template", 15);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(34, "label", 18);
        i0.ɵɵtext(35);
        i0.ɵɵpipe(36, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵproperty("formGroup", ctx.profileFrm);
        i0.ɵɵadvance(4);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 17, "label.email_address"));
        i0.ɵɵadvance(3);
        i0.ɵɵtextInterpolate(ctx.userInfo.mailAddress);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.authUser.useSecureDrive && ctx.userInfo.pinCode);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.authUser.useSecureDrive && ctx.userInfo.pinCode);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.currentCard);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.authUser.lang === "ja");
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("ngModel", ctx.userInfo.firstName);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(18, 19, "label.first_name"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", (ctx.profileFrm.controls["firstName"].dirty || ctx.profileFrm.controls["firstName"].touched) && ctx.profileFrm.controls["firstName"].invalid);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.authUser.lang !== "ja");
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("options", ctx.timezoneOption)("ngModel", ctx.userInfo.timeZone);
        i0.ɵɵadvance(4);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(28, 21, "label.lbl_timezone"));
        i0.ɵɵadvance(4);
        i0.ɵɵproperty("options", ctx.languageOption)("ngModel", ctx.selectedLanguage);
        i0.ɵɵadvance(4);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(36, 23, "label.language"));
    } }, directives: [i1.ɵangular_packages_forms_forms_y, i1.NgControlStatusGroup, i1.FormGroupDirective, i6.NgIf, i1.DefaultValueAccessor, i1.NgControlStatus, i1.FormControlName, i1.MaxLengthValidator, i7.InputText, i8.Dropdown, i5.PrimeTemplate], pipes: [i3.TranslatePipe], styles: [".card-container[_ngcontent-%COMP%] {\n  border: 1px solid black;\n  border-radius: 2px;\n  padding: 8px;\n  gap: 8px;\n  width: 240px;\n  box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;\n  position: relative;\n}\n\n.rm-card[_ngcontent-%COMP%] {\n  position: absolute;\n  cursor: pointer;\n  color: red;\n  top: 10px;\n  right: 10px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvYWNjb3VudC1zZXR0aW5ncy9hY2NvdW50LWluZm9ybWF0aW9uL2FjY291bnQtaW5mb3JtYXRpb24uY29tcG9uZW50LnNjc3MiLCJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2FjY291bnQtc2V0dGluZ3MvYWNjb3VudC1pbmZvcm1hdGlvbi9hY2NvdW50LWluZm9ybWF0aW9uLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsdUJBQUE7RUFDQSxrQkFBQTtFQUNBLFlBQUE7RUFDQSxRQUFBO0VBQ0EsWUFBQTtFQUNBLDJDQUFBO0VBQ0Esa0JBQUE7QUNDRjs7QURFQTtFQUNFLGtCQUFBO0VBQ0EsZUFBQTtFQUNBLFVBQUE7RUFDQSxTQUFBO0VBQ0EsV0FBQTtBQ0NGIiwiZmlsZSI6InNyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvYWNjb3VudC1zZXR0aW5ncy9hY2NvdW50LWluZm9ybWF0aW9uL2FjY291bnQtaW5mb3JtYXRpb24uY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyIuY2FyZC1jb250YWluZXIge1xuICBib3JkZXI6IDFweCBzb2xpZCBibGFjaztcbiAgYm9yZGVyLXJhZGl1czogMnB4O1xuICBwYWRkaW5nOiA4cHg7XG4gIGdhcDogOHB4O1xuICB3aWR0aDogMjQwcHg7XG4gIGJveC1zaGFkb3c6IHJnYmEoMCwgMCwgMCwgMC4yNCkgMHB4IDNweCA4cHg7XG4gIHBvc2l0aW9uOiByZWxhdGl2ZTtcbn1cblxuLnJtLWNhcmQge1xuICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gIGN1cnNvcjogcG9pbnRlcjtcbiAgY29sb3I6IHJlZDtcbiAgdG9wOiAxMHB4O1xuICByaWdodDogMTBweFxufVxuIiwiLmNhcmQtY29udGFpbmVyIHtcbiAgYm9yZGVyOiAxcHggc29saWQgYmxhY2s7XG4gIGJvcmRlci1yYWRpdXM6IDJweDtcbiAgcGFkZGluZzogOHB4O1xuICBnYXA6IDhweDtcbiAgd2lkdGg6IDI0MHB4O1xuICBib3gtc2hhZG93OiByZ2JhKDAsIDAsIDAsIDAuMjQpIDBweCAzcHggOHB4O1xuICBwb3NpdGlvbjogcmVsYXRpdmU7XG59XG5cbi5ybS1jYXJkIHtcbiAgcG9zaXRpb246IGFic29sdXRlO1xuICBjdXJzb3I6IHBvaW50ZXI7XG4gIGNvbG9yOiByZWQ7XG4gIHRvcDogMTBweDtcbiAgcmlnaHQ6IDEwcHg7XG59Il19 */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AccountInformationComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-account-information',
                templateUrl: './account-information.component.html',
                styleUrls: ['./account-information.component.scss']
            }]
    }], function () { return [{ type: i1.FormBuilder }, { type: i2.AuthService }, { type: i3.TranslateService }, { type: i4.PaymentService }, { type: i5.MessageService }, { type: i5.ConfirmationService }]; }, { userDetails: [{
            type: core_1.Input
        }], cards: [{
            type: core_1.Input
        }], onDeleteCard: [{
            type: core_1.Output
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/account-settings/account-settings.component.ts":
/*!*************************************************************************************!*\
  !*** ./src/app/authentication-pages/account-settings/account-settings.component.ts ***!
  \*************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.AccountSettingsComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const app_constants_1 = tslib_1.__importStar(__webpack_require__(/*! ../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
const pure_1 = __webpack_require__(/*! @stripe/stripe-js/pure */ "./node_modules/@stripe/stripe-js/pure.js");
const environment_1 = __webpack_require__(/*! ../../../environments/environment */ "./src/environments/environment.ts");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/__ivy_ngcc__/fesm2015/platform-browser.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! ../../services/account.service */ "./src/app/services/account.service.ts"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! ../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! ../../services/user.service */ "./src/app/services/user.service.ts"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! ../../services/payment.service */ "./src/app/services/payment.service.ts"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! primeng/toolbar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-toolbar.js"));
const i10 = tslib_1.__importStar(__webpack_require__(/*! primeng/ripple */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-ripple.js"));
const i11 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
const i12 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i13 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js"));
const i14 = tslib_1.__importStar(__webpack_require__(/*! ../../shared/autofocus.directive */ "./src/app/shared/autofocus.directive.ts"));
const i15 = tslib_1.__importStar(__webpack_require__(/*! primeng/dialog */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dialog.js"));
const i16 = tslib_1.__importStar(__webpack_require__(/*! ./account-information/account-information.component */ "./src/app/authentication-pages/account-settings/account-information/account-information.component.ts"));
const i17 = tslib_1.__importStar(__webpack_require__(/*! ./notification-security/notification-security.component */ "./src/app/authentication-pages/account-settings/notification-security/notification-security.component.ts"));
const i18 = tslib_1.__importStar(__webpack_require__(/*! ./change-password/change-password.component */ "./src/app/authentication-pages/account-settings/change-password/change-password.component.ts"));
const _c0 = ["accountInformationComponent"];
const _c1 = ["notificationSecurityComponent"];
const _c2 = ["changePasswordComponent"];
function AccountSettingsComponent_button_12_Template(rf, ctx) { if (rf & 1) {
    const _r7 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 27);
    i0.ɵɵlistener("click", function AccountSettingsComponent_button_12_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r7); const ctx_r6 = i0.ɵɵnextContext(); return ctx_r6.generatePinCode(); });
    i0.ɵɵpipe(1, "uppercase");
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(1, 1, i0.ɵɵpipeBind1(2, 3, "label.generate_pin_code")));
} }
function AccountSettingsComponent_button_13_Template(rf, ctx) { if (rf & 1) {
    const _r9 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 28);
    i0.ɵɵlistener("click", function AccountSettingsComponent_button_13_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r9); const ctx_r8 = i0.ɵɵnextContext(); return ctx_r8.isAddCard = true; });
    i0.ɵɵpipe(1, "uppercase");
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(1, 1, i0.ɵɵpipeBind1(2, 3, "label.add_payment_card")));
} }
function AccountSettingsComponent_div_14_app_account_information_4_Template(rf, ctx) { if (rf & 1) {
    const _r14 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "app-account-information", 34, 35);
    i0.ɵɵlistener("onDeleteCard", function AccountSettingsComponent_div_14_app_account_information_4_Template_app_account_information_onDeleteCard_0_listener($event) { i0.ɵɵrestoreView(_r14); const ctx_r13 = i0.ɵɵnextContext(2); return ctx_r13.onDeleteCard($event); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r10 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("userDetails", ctx_r10.userDetails)("cards", ctx_r10.listCards);
} }
function AccountSettingsComponent_div_14_app_notification_security_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "app-notification-security", 36, 37);
} if (rf & 2) {
    const ctx_r11 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("userDetails", ctx_r11.userDetails);
} }
function AccountSettingsComponent_div_14_Template(rf, ctx) { if (rf & 1) {
    const _r17 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelementStart(1, "h4", 29);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(4, AccountSettingsComponent_div_14_app_account_information_4_Template, 2, 2, "app-account-information", 30);
    i0.ɵɵelementStart(5, "h4", 29);
    i0.ɵɵtext(6);
    i0.ɵɵpipe(7, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(8, AccountSettingsComponent_div_14_app_notification_security_8_Template, 2, 1, "app-notification-security", 31);
    i0.ɵɵelementStart(9, "div", 32);
    i0.ɵɵelementStart(10, "button", 33);
    i0.ɵɵlistener("click", function AccountSettingsComponent_div_14_Template_button_click_10_listener() { i0.ɵɵrestoreView(_r17); const ctx_r16 = i0.ɵɵnextContext(); return ctx_r16.handleUpdateInfo(); });
    i0.ɵɵpipe(11, "uppercase");
    i0.ɵɵpipe(12, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 5, "label.account_information"));
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r2.userInfo);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(7, 7, "label.email_notification_security"));
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r2.userInfo);
    i0.ɵɵadvance(2);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(11, 9, i0.ɵɵpipeBind1(12, 11, "label.save")));
} }
function AccountSettingsComponent_div_28_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelement(1, "small", 39);
    i0.ɵɵelementEnd();
} }
function AccountSettingsComponent_div_28_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 38);
    i0.ɵɵtemplate(1, AccountSettingsComponent_div_28_div_1_Template, 2, 0, "div", 7);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r3.getCardForm.holderName.errors.required);
} }
function AccountSettingsComponent_app_change_password_42_Template(rf, ctx) { if (rf & 1) {
    const _r21 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "app-change-password", 40, 41);
    i0.ɵɵlistener("isComplete", function AccountSettingsComponent_app_change_password_42_Template_app_change_password_isComplete_0_listener($event) { i0.ɵɵrestoreView(_r21); const ctx_r20 = i0.ɵɵnextContext(); return ctx_r20.isDialogVisible = !$event; });
    i0.ɵɵelementEnd();
} }
function AccountSettingsComponent_ng_template_43_Template(rf, ctx) { if (rf & 1) {
    const _r23 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 42);
    i0.ɵɵelementStart(1, "button", 43);
    i0.ɵɵlistener("click", function AccountSettingsComponent_ng_template_43_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r23); const ctx_r22 = i0.ɵɵnextContext(); return ctx_r22.isDialogVisible = false; });
    i0.ɵɵpipe(2, "titlecase");
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "button", 44);
    i0.ɵɵlistener("click", function AccountSettingsComponent_ng_template_43_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r23); const ctx_r24 = i0.ɵɵnextContext(); return ctx_r24.onChangePassword(); });
    i0.ɵɵpipe(5, "uppercase");
    i0.ɵɵpipe(6, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(2, 2, i0.ɵɵpipeBind1(3, 4, "label.cancel")));
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(5, 6, i0.ɵɵpipeBind1(6, 8, "label.save")));
} }
const _c3 = function () { return { width: "50vw" }; };
const _c4 = function () { return { "960px": "75vw" }; };
class AccountSettingsComponent {
    constructor(titleService, fb, accountService, messageService, authService, translate, userService, paymentService, confirmationService) {
        this.titleService = titleService;
        this.fb = fb;
        this.accountService = accountService;
        this.messageService = messageService;
        this.authService = authService;
        this.translate = translate;
        this.userService = userService;
        this.paymentService = paymentService;
        this.confirmationService = confirmationService;
        this.utils = app_util_1.default;
        this.constant = app_constants_1.default;
        this.cardForm = new forms_1.FormGroup({});
        this.systemRole = app_constants_1.SystemRole;
        this.submittingUpdateInfo = false;
        this.isDialogVisible = false;
        this.submittingChangeEmail = false;
        this.isAddCard = false;
        this.listCards = [];
        this.stripeError = false;
        this.translate.get(['page_title.user_profile']).subscribe(translation => {
            this.titleService.setTitle(translation['page_title.user_profile']);
        });
    }
    get getCardForm() {
        return this.cardForm.controls;
    }
    ngOnInit() {
        this.authUser = this.authService.authUser;
        this.getProfileData();
        this.cardForm = this.fb.group({
            holderName: ['', [forms_1.Validators.required]]
        });
        this.initStripe().then();
    }
    initStripe() {
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            this.stripe = yield pure_1.loadStripe(environment_1.environment.PUBLIC_KEY_STRIPE);
            const elements = this.stripe.elements();
            const style = {
                base: {
                    color: '#32325d',
                    fontFamily: '"Helvetica Neue", Helvetica, sans-serif',
                    fontSmoothing: 'antialiased',
                    fontSize: '16px',
                    '::placeholder': {
                        color: '#aab7c4'
                    }
                },
                invalid: {
                    color: '#B00020',
                    iconColor: '#B00020'
                }
            };
            // Create an instance of the card Element.
            this.card = elements.create('card', {
                hidePostalCode: true,
                style
            });
            this.card.mount('#card-element');
            // Add an instance of the card Element into the `card-element`
            this.card.addEventListener('change', (event) => {
                const displayError = document.getElementById('card-errors');
                if (event.error) {
                    this.stripeError = true;
                    displayError.textContent = app_util_1.default.translate(this.translate, 'stripe_error.' + event.error.code.toUpperCase());
                }
                else {
                    this.stripeError = false;
                    displayError.textContent = '';
                }
            });
        });
    }
    getProfileData() {
        this.authService.getUserDetail(this.authUser.userId).subscribe(res => {
            if (res.status === 200) {
                this.userDetails = res.data;
                this.userInfo = this.userDetails.userInfo;
                this.authUser.timeZone = this.userInfo.timeZone;
                this.authUser.firstName = this.userInfo.firstName;
                this.authUser.lastName = this.userInfo.lastName;
                this.authUser.lang = this.userInfo.lang;
                this.authService.setAuthUser(this.authUser);
                // only Team Admin can get their own cards
                if (this.userInfo.roleId === 1) {
                    this.getListCard();
                }
            }
        }, error => {
            // console.log('error', error);
        });
    }
    confirmChangeEmail() {
        this.submittingChangeEmail = false;
        this.confirmationService.confirm({
            header: this.utils.translate(this.translate, 'label.change_email_title'),
            message: this.utils.translate(this.translate, 'label.change_email_msg'),
            icon: 'pi pi-exclamation-triangle',
            defaultFocus: 'none',
            accept: () => {
                if (this.submittingChangeEmail) {
                    return;
                }
                this.submittingChangeEmail = true;
                this.accountService.requestChangeEmail().subscribe(res => {
                    if (res.status === 200) {
                        this.messageService.add({
                            severity: 'success',
                            detail: this.utils.translate(this.translate, 'default_toast.request_change_email_success')
                        });
                    }
                    this.submittingChangeEmail = false;
                });
            }
        });
    }
    generatePinCode() {
        this.authService.generatePinCode().subscribe(res => {
            if (res.status === 200) {
                this.getProfileData();
            }
            else {
                this.messageService.add({
                    severity: 'error',
                    detail: this.utils.translate(this.translate, 'error.' + res.status)
                });
            }
        });
    }
    handleUpdateInfo() {
        this.accountInformationComponent.profileFrm.markAllAsTouched();
        this.notificationSecurityComponent.securityFrm.markAllAsTouched();
        if (!this.accountInformationComponent.profileFrm.valid
            || !this.notificationSecurityComponent.securityFrm.valid
            || this.submittingUpdateInfo) {
            return;
        }
        this.doUpdateInfo();
    }
    doUpdateInfo() {
        this.submittingUpdateInfo = true;
        const notifyFlag = [];
        notifyFlag.push(this.notificationSecurityComponent.securityFrm.value.notifyAccountChange ? 1 : 0);
        notifyFlag.push(this.notificationSecurityComponent.securityFrm.value.notifyFileProtectedExp ? 1 : 0);
        const params = {
            firstName: this.accountInformationComponent.profileFrm.value.firstName,
            lastName: this.accountInformationComponent.profileFrm.value.lastName,
            timeZone: this.accountInformationComponent.profileFrm.value.timezone.code,
            language: this.accountInformationComponent.profileFrm.value.language.code,
            notificationFlag: notifyFlag.join(''),
            factorAuthen: this.notificationSecurityComponent.securityFrm.value.twoFA,
            teamId: this.authUser.teamId,
        };
        this.userService.updateUser(this.authUser.userId, this.utils.toSnakeCaseKey(params))
            .subscribe(res => {
            if (res.status === 200) {
                window.location.reload();
                // TODO: handle change user name in header (broadcast)
                this.messageService.add({
                    severity: 'success',
                    detail: this.utils.translate(this.translate, 'default_toast.update_success')
                });
            }
            this.submittingUpdateInfo = false;
        });
    }
    onChangePassword() {
        this.changePasswordComponent.passwordFormComponent.onSubmit();
    }
    getListCard() {
        const params = {
            page_size: 10,
            page_number: 1
        };
        this.paymentService.getListCard(params).subscribe(res => {
            if (res.status === 200) {
                this.listCards = res.data.content;
            }
        }, error => {
            // console.log('error', error);
        });
    }
    createToken() {
        this.stripe.createToken(this.card).then((result) => {
            if (result.error) {
                // Inform the user if there was an error
                const errorElement = document.getElementById('card-errors');
                errorElement.textContent = result.error.message;
            }
            else {
                // Send the token to your server
                this.token = result.token;
                this.cardForm.markAllAsTouched();
                if (!this.token || this.cardForm.invalid) {
                    return;
                }
                const params = {
                    card_token: this.token.id,
                    user_price_id: environment_1.environment.default_user_price,
                    storage_price_id: environment_1.environment.default_storage_price,
                };
                this.paymentService.addCard(this.authUser.teamId, params).subscribe(res => {
                    if (res.status === 200) {
                        this.listCards = res.data;
                        this.isAddCard = false;
                        this.messageService.add({
                            severity: 'success',
                            detail: this.utils.translate(this.translate, 'default_toast.add_card_success')
                        });
                        this.getListCard();
                    }
                }, error => {
                    // console.log('error', error);
                });
            }
        });
    }
    onCreateCard() {
        if (this.listCards.length > 0) {
            this.messageService.add({
                severity: 'error',
                detail: this.utils.translate(this.translate, 'validation.remove_old_card_before_create_new')
            });
            return;
        }
        this.createToken();
    }
    onDeleteCard(event) {
        if (event) {
            this.getListCard();
        }
    }
}
exports.AccountSettingsComponent = AccountSettingsComponent;
AccountSettingsComponent.ɵfac = function AccountSettingsComponent_Factory(t) { return new (t || AccountSettingsComponent)(i0.ɵɵdirectiveInject(i1.Title), i0.ɵɵdirectiveInject(i2.FormBuilder), i0.ɵɵdirectiveInject(i3.AccountService), i0.ɵɵdirectiveInject(i4.MessageService), i0.ɵɵdirectiveInject(i5.AuthService), i0.ɵɵdirectiveInject(i6.TranslateService), i0.ɵɵdirectiveInject(i7.UserService), i0.ɵɵdirectiveInject(i8.PaymentService), i0.ɵɵdirectiveInject(i4.ConfirmationService)); };
AccountSettingsComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AccountSettingsComponent, selectors: [["app-account-settings"]], viewQuery: function AccountSettingsComponent_Query(rf, ctx) { if (rf & 1) {
        i0.ɵɵviewQuery(_c0, 1);
        i0.ɵɵviewQuery(_c1, 1);
        i0.ɵɵviewQuery(_c2, 1);
    } if (rf & 2) {
        let _t;
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.accountInformationComponent = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.notificationSecurityComponent = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.changePasswordComponent = _t.first);
    } }, decls: 44, vars: 58, consts: [[1, "page-title"], [3, "styleClass"], [1, "p-toolbar-group-left"], ["pRipple", "", "pButton", "", "type", "button", "icon", "fas fa-user-lock p-button-icon-left", 1, "p-mr-2", "p-button-sm", 3, "label", "click"], ["pRipple", "", "pButton", "", "type", "button", "icon", "fas fa-user-edit p-button-icon-left", 1, "p-mr-2", "p-button-sm", 3, "label", "click"], ["pRipple", "", "pButton", "", "type", "button", "icon", "fas fa-key p-button-icon-left", "class", "p-mr-2 p-button-sm", 3, "label", "click", 4, "ngIf"], ["pRipple", "", "pButton", "", "type", "button", "icon", "fas fa-credit-card p-button-icon-left", "class", "p-mr-2 p-button-sm", 3, "label", "click", 4, "ngIf"], [4, "ngIf"], [3, "ngClass"], [1, "p-grid"], [1, "p-col-12", "p-md-6"], [1, "p-text-left"], ["role", "form", "autocomplete", "off", 3, "formGroup", "ngSubmit"], [1, "p-fluid"], [1, "p-field"], [1, "p-float-label"], ["id", "holderName", "name", "holderName", "formControlName", "holderName", "maxlength", "64", "pInputText", "", "required", "", "type", "text", 3, "appAutofocus"], ["for", "holderName", 3, "translate"], ["class", "p-error p-text-left", 4, "ngIf"], ["id", "card-element", 3, "ngClass"], ["id", "card-errors", "role", "alert", 1, "p-error"], [1, "p-text-right", "p-field"], ["pRipple", "", "pButton", "", "type", "button", 1, "p-mr-2", "p-button-sm", "p-button-warning", 3, "label", "click"], ["pRipple", "", "pButton", "", "type", "submit", 1, "p-button-sm", 3, "label"], [3, "header", "visible", "modal", "breakpoints", "draggable", "resizable", "baseZIndex", "visibleChange"], [3, "isComplete", 4, "ngIf"], ["pTemplate", "footer"], ["pRipple", "", "pButton", "", "type", "button", "icon", "fas fa-key p-button-icon-left", 1, "p-mr-2", "p-button-sm", 3, "label", "click"], ["pRipple", "", "pButton", "", "type", "button", "icon", "fas fa-credit-card p-button-icon-left", 1, "p-mr-2", "p-button-sm", 3, "label", "click"], [1, "p-my-3", "p-text-capitalize"], [3, "userDetails", "cards", "onDeleteCard", 4, "ngIf"], [3, "userDetails", 4, "ngIf"], [1, "p-text-right"], ["pRipple", "", "pButton", "", "type", "button", "icon", "fas fa-check p-button-icon-left", 3, "label", "click"], [3, "userDetails", "cards", "onDeleteCard"], ["accountInformationComponent", ""], [3, "userDetails"], ["notificationSecurityComponent", ""], [1, "p-error", "p-text-left"], ["translate", "validation.require"], [3, "isComplete"], ["changePasswordComponent", ""], [1, "p-col-12", "p-text-right", "p-pr-0"], ["icon", "fas fa-times", "pButton", "", "pRipple", "", "type", "button", 1, "p-button-raised", "p-button-warning", "p-mr-2", 3, "label", "click"], ["icon", "fas fa-check", "type", "button", "pRipple", "", "pButton", "", 1, "p-button-raised", "p-mr-0", 3, "label", "click"]], template: function AccountSettingsComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵtext(1);
        i0.ɵɵpipe(2, "titlecase");
        i0.ɵɵpipe(3, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(4, "p-toolbar", 1);
        i0.ɵɵelementStart(5, "div", 2);
        i0.ɵɵelementStart(6, "button", 3);
        i0.ɵɵlistener("click", function AccountSettingsComponent_Template_button_click_6_listener() { return ctx.isDialogVisible = true; });
        i0.ɵɵpipe(7, "uppercase");
        i0.ɵɵpipe(8, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(9, "button", 4);
        i0.ɵɵlistener("click", function AccountSettingsComponent_Template_button_click_9_listener() { return ctx.confirmChangeEmail(); });
        i0.ɵɵpipe(10, "uppercase");
        i0.ɵɵpipe(11, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(12, AccountSettingsComponent_button_12_Template, 3, 5, "button", 5);
        i0.ɵɵtemplate(13, AccountSettingsComponent_button_13_Template, 3, 5, "button", 6);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(14, AccountSettingsComponent_div_14_Template, 13, 13, "div", 7);
        i0.ɵɵelementStart(15, "div", 8);
        i0.ɵɵelementStart(16, "div", 9);
        i0.ɵɵelementStart(17, "div", 10);
        i0.ɵɵelementStart(18, "h3", 11);
        i0.ɵɵtext(19);
        i0.ɵɵpipe(20, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(21, "form", 12);
        i0.ɵɵlistener("ngSubmit", function AccountSettingsComponent_Template_form_ngSubmit_21_listener() { return ctx.onCreateCard(); });
        i0.ɵɵelementStart(22, "div", 13);
        i0.ɵɵelementStart(23, "div", 14);
        i0.ɵɵelementStart(24, "span", 15);
        i0.ɵɵelement(25, "input", 16);
        i0.ɵɵelement(26, "label", 17);
        i0.ɵɵpipe(27, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(28, AccountSettingsComponent_div_28_Template, 2, 1, "div", 18);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(29, "div", 14);
        i0.ɵɵelement(30, "div", 19);
        i0.ɵɵelement(31, "small", 20);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(32, "div", 21);
        i0.ɵɵelementStart(33, "button", 22);
        i0.ɵɵlistener("click", function AccountSettingsComponent_Template_button_click_33_listener() { return ctx.isAddCard = false; });
        i0.ɵɵpipe(34, "uppercase");
        i0.ɵɵpipe(35, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelement(36, "button", 23);
        i0.ɵɵpipe(37, "uppercase");
        i0.ɵɵpipe(38, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(39, "p-dialog", 24);
        i0.ɵɵlistener("visibleChange", function AccountSettingsComponent_Template_p_dialog_visibleChange_39_listener($event) { return ctx.isDialogVisible = $event; });
        i0.ɵɵpipe(40, "titlecase");
        i0.ɵɵpipe(41, "translate");
        i0.ɵɵtemplate(42, AccountSettingsComponent_app_change_password_42_Template, 2, 0, "app-change-password", 25);
        i0.ɵɵtemplate(43, AccountSettingsComponent_ng_template_43_Template, 7, 10, "ng-template", 26);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵadvance(1);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 28, i0.ɵɵpipeBind1(3, 30, "label.account_settings")));
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("styleClass", "p-p-0");
        i0.ɵɵadvance(2);
        i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(7, 32, i0.ɵɵpipeBind1(8, 34, "label.change_password")));
        i0.ɵɵadvance(3);
        i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(10, 36, i0.ɵɵpipeBind1(11, 38, "label.change_email")));
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("ngIf", ctx.userInfo && !ctx.userInfo.pinCode);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.listCards.length === 0 && ctx.userInfo && ctx.userInfo.roleId === 1);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", !ctx.isAddCard);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngClass", ctx.isAddCard ? "p-d-block" : "p-d-none");
        i0.ɵɵadvance(4);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(20, 40, "label.add_payment_card"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("formGroup", ctx.cardForm);
        i0.ɵɵadvance(4);
        i0.ɵɵclassProp("ng-dirty", ctx.getCardForm.holderName.invalid && (ctx.getCardForm.holderName.dirty || ctx.getCardForm.holderName.touched));
        i0.ɵɵproperty("appAutofocus", true);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("translate", i0.ɵɵpipeBind1(27, 42, "label.holder_name"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.getCardForm.holderName.invalid && (ctx.getCardForm.holderName.dirty || ctx.getCardForm.holderName.touched));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngClass", ctx.stripeError ? "invalid-form" : "");
        i0.ɵɵadvance(3);
        i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(34, 44, i0.ɵɵpipeBind1(35, 46, "button.cancel")));
        i0.ɵɵadvance(3);
        i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(37, 48, i0.ɵɵpipeBind1(38, 50, "label.save")));
        i0.ɵɵadvance(3);
        i0.ɵɵstyleMap(i0.ɵɵpureFunction0(56, _c3));
        i0.ɵɵpropertyInterpolate("header", i0.ɵɵpipeBind1(40, 52, i0.ɵɵpipeBind1(41, 54, "label.change_password")));
        i0.ɵɵproperty("visible", ctx.isDialogVisible)("modal", true)("breakpoints", i0.ɵɵpureFunction0(57, _c4))("draggable", false)("resizable", false)("baseZIndex", 10000);
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("ngIf", ctx.isDialogVisible);
    } }, directives: [i9.Toolbar, i10.Ripple, i11.ButtonDirective, i12.NgIf, i12.NgClass, i2.ɵangular_packages_forms_forms_y, i2.NgControlStatusGroup, i2.FormGroupDirective, i2.DefaultValueAccessor, i2.NgControlStatus, i2.FormControlName, i2.MaxLengthValidator, i13.InputText, i2.RequiredValidator, i14.AutofocusDirective, i6.TranslateDirective, i15.Dialog, i4.PrimeTemplate, i16.AccountInformationComponent, i17.NotificationSecurityComponent, i18.ChangePasswordComponent], pipes: [i12.TitleCasePipe, i6.TranslatePipe, i12.UpperCasePipe], styles: ["#card-element[_ngcontent-%COMP%] {\n  height: 42px;\n  border: 1px solid black;\n  padding: 12px;\n  border-radius: 4px;\n}\n\n.invalid-form[_ngcontent-%COMP%] {\n  border-color: #B00020 !important;\n  color: #B00020 !important;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvYWNjb3VudC1zZXR0aW5ncy9hY2NvdW50LXNldHRpbmdzLmNvbXBvbmVudC5zY3NzIiwic3JjL2FwcC9hdXRoZW50aWNhdGlvbi1wYWdlcy9hY2NvdW50LXNldHRpbmdzL2FjY291bnQtc2V0dGluZ3MuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxZQUFBO0VBQ0EsdUJBQUE7RUFDQSxhQUFBO0VBQ0Esa0JBQUE7QUNDRjs7QURFQTtFQUNFLGdDQUFBO0VBQ0EseUJBQUE7QUNDRiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2FjY291bnQtc2V0dGluZ3MvYWNjb3VudC1zZXR0aW5ncy5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIiNjYXJkLWVsZW1lbnQge1xuICBoZWlnaHQ6IDQycHg7XG4gIGJvcmRlcjogMXB4IHNvbGlkIGJsYWNrO1xuICBwYWRkaW5nOiAxMnB4O1xuICBib3JkZXItcmFkaXVzOiA0cHg7XG59XG5cbi5pbnZhbGlkLWZvcm0ge1xuICBib3JkZXItY29sb3I6ICNCMDAwMjAgIWltcG9ydGFudDtcbiAgY29sb3I6ICNCMDAwMjAgIWltcG9ydGFudDtcbn1cbiIsIiNjYXJkLWVsZW1lbnQge1xuICBoZWlnaHQ6IDQycHg7XG4gIGJvcmRlcjogMXB4IHNvbGlkIGJsYWNrO1xuICBwYWRkaW5nOiAxMnB4O1xuICBib3JkZXItcmFkaXVzOiA0cHg7XG59XG5cbi5pbnZhbGlkLWZvcm0ge1xuICBib3JkZXItY29sb3I6ICNCMDAwMjAgIWltcG9ydGFudDtcbiAgY29sb3I6ICNCMDAwMjAgIWltcG9ydGFudDtcbn0iXX0= */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AccountSettingsComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-account-settings',
                templateUrl: './account-settings.component.html',
                styleUrls: ['./account-settings.component.scss']
            }]
    }], function () { return [{ type: i1.Title }, { type: i2.FormBuilder }, { type: i3.AccountService }, { type: i4.MessageService }, { type: i5.AuthService }, { type: i6.TranslateService }, { type: i7.UserService }, { type: i8.PaymentService }, { type: i4.ConfirmationService }]; }, { accountInformationComponent: [{
            type: core_1.ViewChild,
            args: ['accountInformationComponent']
        }], notificationSecurityComponent: [{
            type: core_1.ViewChild,
            args: ['notificationSecurityComponent']
        }], changePasswordComponent: [{
            type: core_1.ViewChild,
            args: ['changePasswordComponent']
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/account-settings/change-password/change-password.component.ts":
/*!****************************************************************************************************!*\
  !*** ./src/app/authentication-pages/account-settings/change-password/change-password.component.ts ***!
  \****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ChangePasswordComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/team-setting.service */ "./src/app/services/team-setting.service.ts"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/user.service */ "./src/app/services/user.service.ts"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! ../../../shared/password-form/password-form.component */ "./src/app/shared/password-form/password-form.component.ts"));
const _c0 = ["passwordFormComponent"];
function ChangePasswordComponent_div_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 7);
    i0.ɵɵelement(1, "div");
    i0.ɵɵelement(2, "div");
    i0.ɵɵelement(3, "div");
    i0.ɵɵelementEnd();
} }
const _c1 = function (a0) { return { number: a0 }; };
function ChangePasswordComponent_ul_4_li_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "li", 9);
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("translate", "validation.password_policies.capital")("translateParams", i0.ɵɵpureFunction1(2, _c1, ctx_r3.passwordPolicies.capital));
} }
function ChangePasswordComponent_ul_4_li_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "li", 9);
} if (rf & 2) {
    const ctx_r4 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("translate", "validation.password_policies.lower")("translateParams", i0.ɵɵpureFunction1(2, _c1, ctx_r4.passwordPolicies.lower));
} }
function ChangePasswordComponent_ul_4_li_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "li", 9);
} if (rf & 2) {
    const ctx_r5 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("translate", "validation.password_policies.special")("translateParams", i0.ɵɵpureFunction1(2, _c1, ctx_r5.passwordPolicies.special));
} }
function ChangePasswordComponent_ul_4_li_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "li", 9);
} if (rf & 2) {
    const ctx_r6 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("translate", "validation.password_policies.number")("translateParams", i0.ɵɵpureFunction1(2, _c1, ctx_r6.passwordPolicies.number));
} }
const _c2 = function (a0, a1) { return { min: a0, max: a1 }; };
function ChangePasswordComponent_ul_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "ul", 8);
    i0.ɵɵelement(1, "li", 9);
    i0.ɵɵtemplate(2, ChangePasswordComponent_ul_4_li_2_Template, 1, 4, "li", 10);
    i0.ɵɵtemplate(3, ChangePasswordComponent_ul_4_li_3_Template, 1, 4, "li", 10);
    i0.ɵɵtemplate(4, ChangePasswordComponent_ul_4_li_4_Template, 1, 4, "li", 10);
    i0.ɵɵtemplate(5, ChangePasswordComponent_ul_4_li_5_Template, 1, 4, "li", 10);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("translate", "validation.password_policies.length")("translateParams", i0.ɵɵpureFunction2(6, _c2, ctx_r1.passwordPolicies.min, ctx_r1.passwordPolicies.max));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r1.passwordPolicies.capital > 0);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r1.passwordPolicies.lower > 0);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r1.passwordPolicies.special > 0);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r1.passwordPolicies.number > 0);
} }
class ChangePasswordComponent {
    constructor(fb, authService, teamSettingService, messageService, userService, translate) {
        this.fb = fb;
        this.authService = authService;
        this.teamSettingService = teamSettingService;
        this.messageService = messageService;
        this.userService = userService;
        this.translate = translate;
        this.isComplete = new core_1.EventEmitter();
        this.utils = app_util_1.default;
        this.changePwFrm = new forms_1.FormGroup({});
        this.isLoadSetting = true;
        this.submittingChangePassword = false;
    }
    ngOnInit() {
        this.authUser = this.authService.authUser;
        this.changePwFrm = this.fb.group({});
        const params = {
            teamId: this.authUser.teamId,
            type: 3,
        };
        this.teamSettingService.getTeamSettingByType(this.utils.toSnakeCaseKey(params)).subscribe(res => {
            if (res.status === 200) {
                this.teamSetting = res.data;
                this.passwordPolicies = JSON.parse(this.teamSetting.passwordSetting);
            }
            this.isLoadSetting = false;
        });
    }
    changePassword(event) {
        if (!event || this.submittingChangePassword) {
            return;
        }
        this.submittingChangePassword = true;
        const params = {
            userId: this.authUser.userId,
            currentPassword: event.currentPassword,
            newPassword: event.newPassword,
            confirmPassword: event.confirmNewPassword,
        };
        this.userService.userChangePassword(params).subscribe(res => {
            if (res.status === 200) {
                this.messageService.add({
                    severity: 'success',
                    detail: this.utils.translate(this.translate, 'default_toast.update_success')
                });
                this.isComplete.emit(true);
            }
            this.submittingChangePassword = false;
        }, () => {
            this.submittingChangePassword = false;
        });
    }
}
exports.ChangePasswordComponent = ChangePasswordComponent;
ChangePasswordComponent.ɵfac = function ChangePasswordComponent_Factory(t) { return new (t || ChangePasswordComponent)(i0.ɵɵdirectiveInject(i1.FormBuilder), i0.ɵɵdirectiveInject(i2.AuthService), i0.ɵɵdirectiveInject(i3.TeamSettingService), i0.ɵɵdirectiveInject(i4.MessageService), i0.ɵɵdirectiveInject(i5.UserService), i0.ɵɵdirectiveInject(i6.TranslateService)); };
ChangePasswordComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ChangePasswordComponent, selectors: [["app-change-password"]], viewQuery: function ChangePasswordComponent_Query(rf, ctx) { if (rf & 1) {
        i0.ɵɵviewQuery(_c0, 1);
    } if (rf & 2) {
        let _t;
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.passwordFormComponent = _t.first);
    } }, outputs: { isComplete: "isComplete" }, decls: 8, vars: 6, consts: [[1, "p-grid"], [1, "p-col-12"], [1, "p-my-1", 3, "translate"], ["class", "lds-ellipsis", 4, "ngIf"], ["class", "p-my-0", 4, "ngIf"], [3, "inputCurrentPassword", "showButton", "passwordPolicies", "onComplete"], ["passwordFormComponent", ""], [1, "lds-ellipsis"], [1, "p-my-0"], [3, "translate", "translateParams"], [3, "translate", "translateParams", 4, "ngIf"]], template: function ChangePasswordComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵelement(2, "h5", 2);
        i0.ɵɵtemplate(3, ChangePasswordComponent_div_3_Template, 4, 0, "div", 3);
        i0.ɵɵtemplate(4, ChangePasswordComponent_ul_4_Template, 6, 9, "ul", 4);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(5, "div", 1);
        i0.ɵɵelementStart(6, "app-password-form", 5, 6);
        i0.ɵɵlistener("onComplete", function ChangePasswordComponent_Template_app_password_form_onComplete_6_listener($event) { return ctx.changePassword($event); });
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("translate", "label.password_requirement");
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.isLoadSetting);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", !ctx.isLoadSetting);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("inputCurrentPassword", true)("showButton", false)("passwordPolicies", ctx.passwordPolicies);
    } }, directives: [i6.TranslateDirective, i7.NgIf, i8.PasswordFormComponent], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2FjY291bnQtc2V0dGluZ3MvY2hhbmdlLXBhc3N3b3JkL2NoYW5nZS1wYXNzd29yZC5jb21wb25lbnQuc2NzcyJ9 */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ChangePasswordComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-change-password',
                templateUrl: './change-password.component.html',
                styleUrls: ['./change-password.component.scss']
            }]
    }], function () { return [{ type: i1.FormBuilder }, { type: i2.AuthService }, { type: i3.TeamSettingService }, { type: i4.MessageService }, { type: i5.UserService }, { type: i6.TranslateService }]; }, { passwordFormComponent: [{
            type: core_1.ViewChild,
            args: ['passwordFormComponent']
        }], isComplete: [{
            type: core_1.Output
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/account-settings/notification-security/notification-security.component.ts":
/*!****************************************************************************************************************!*\
  !*** ./src/app/authentication-pages/account-settings/notification-security/notification-security.component.ts ***!
  \****************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.NotificationSecurityComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const app_constants_1 = tslib_1.__importStar(__webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/team.service */ "./src/app/services/team.service.ts"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! primeng/checkbox */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-checkbox.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
function NotificationSecurityComponent_form_0_label_16_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "label", 10);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "label.disable_reason"), " ");
} }
function NotificationSecurityComponent_form_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "form", 1);
    i0.ɵɵelementStart(1, "div", 2);
    i0.ɵɵelement(2, "p-checkbox", 3);
    i0.ɵɵelementStart(3, "label", 4);
    i0.ɵɵtext(4);
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(6, "div", 2);
    i0.ɵɵelement(7, "p-checkbox", 5);
    i0.ɵɵelementStart(8, "label", 6);
    i0.ɵɵtext(9);
    i0.ɵɵpipe(10, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(11, "div", 2);
    i0.ɵɵelement(12, "p-checkbox", 7);
    i0.ɵɵelementStart(13, "label", 8);
    i0.ɵɵtext(14);
    i0.ɵɵpipe(15, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(16, NotificationSecurityComponent_form_0_label_16_Template, 3, 3, "label", 9);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵproperty("formGroup", ctx_r0.securityFrm);
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 8, "label.account_change"), " ");
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(10, 10, "label.encode_file_expired"), " ");
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("ngClass", ctx_r0.teamInfo.enableTwoFactor ? "cs-not-allowed" : "")("disabled", ctx_r0.teamInfo.enableTwoFactor);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngClass", ctx_r0.teamInfo.enableTwoFactor ? "cs-not-allowed" : "cs-pointer");
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(15, 12, "label.security_auth"), " ");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r0.teamInfo.enableTwoFactor);
} }
class NotificationSecurityComponent {
    constructor(fb, authService, teamService) {
        this.fb = fb;
        this.authService = authService;
        this.teamService = teamService;
        this.securityFrm = new forms_1.FormGroup({});
        this.utils = app_util_1.default;
        this.constant = app_constants_1.default;
        this.systemRole = app_constants_1.SystemRole;
        this.loading = true;
    }
    ngOnChanges(changes) {
        if (changes.userDetails && changes.userDetails.currentValue) {
            this.userDetails = changes.userDetails.currentValue;
            this.userInfo = this.userDetails.userInfo;
        }
    }
    ngOnInit() {
        this.userInfo = this.userDetails.userInfo;
        this.authUser = this.authService.authUser;
        this.securityFrm = this.fb.group({
            notifyAccountChange: [false],
            notifyFileProtectedExp: [false],
            twoFA: [false],
        });
        this.loading = true;
        this.teamService.getTeamInfo(this.userInfo.teamId).subscribe(res => {
            if (res.status === 200) {
                this.teamInfo = res.data;
            }
            this.loading = false;
        });
        // set value
        this.securityFrm.controls.twoFA.setValue(this.userInfo.factorAuthen);
        this.securityFrm.controls.notifyAccountChange.setValue(parseInt(this.userInfo.notificationFlag.charAt(0), 0) === 1);
        this.securityFrm.controls.notifyFileProtectedExp.setValue(parseInt(this.userInfo.notificationFlag.charAt(1), 0) === 1);
    }
}
exports.NotificationSecurityComponent = NotificationSecurityComponent;
NotificationSecurityComponent.ɵfac = function NotificationSecurityComponent_Factory(t) { return new (t || NotificationSecurityComponent)(i0.ɵɵdirectiveInject(i1.FormBuilder), i0.ɵɵdirectiveInject(i2.AuthService), i0.ɵɵdirectiveInject(i3.TeamService)); };
NotificationSecurityComponent.ɵcmp = i0.ɵɵdefineComponent({ type: NotificationSecurityComponent, selectors: [["app-notification-security"]], inputs: { userDetails: "userDetails" }, features: [i0.ɵɵNgOnChangesFeature], decls: 1, vars: 1, consts: [[3, "formGroup", 4, "ngIf"], [3, "formGroup"], [1, "p-field-checkbox"], ["name", "notifyAccountChange", "binary", "true", "formControlName", "notifyAccountChange", "inputId", "notifyAccountChange"], ["for", "notifyAccountChange", 1, "cs-pointer"], ["name", "notifyFileProtectedExp", "binary", "true", "formControlName", "notifyFileProtectedExp", "inputId", "notifyFileProtectedExp"], ["for", "notifyFileProtectedExp", 1, "cs-pointer"], ["name", "twoFA", "binary", "true", "formControlName", "twoFA", "inputId", "twoFA", 3, "ngClass", "disabled"], ["for", "twoFA", 3, "ngClass"], ["for", "twoFA", "class", "p-text-italic cs-not-allowed", 4, "ngIf"], ["for", "twoFA", 1, "p-text-italic", "cs-not-allowed"]], template: function NotificationSecurityComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵtemplate(0, NotificationSecurityComponent_form_0_Template, 17, 14, "form", 0);
    } if (rf & 2) {
        i0.ɵɵproperty("ngIf", !ctx.loading);
    } }, directives: [i4.NgIf, i1.ɵangular_packages_forms_forms_y, i1.NgControlStatusGroup, i1.FormGroupDirective, i5.Checkbox, i1.NgControlStatus, i1.FormControlName, i4.NgClass], pipes: [i6.TranslatePipe], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2FjY291bnQtc2V0dGluZ3Mvbm90aWZpY2F0aW9uLXNlY3VyaXR5L25vdGlmaWNhdGlvbi1zZWN1cml0eS5jb21wb25lbnQuc2NzcyJ9 */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NotificationSecurityComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-notification-security',
                templateUrl: './notification-security.component.html',
                styleUrls: ['./notification-security.component.scss']
            }]
    }], function () { return [{ type: i1.FormBuilder }, { type: i2.AuthService }, { type: i3.TeamService }]; }, { userDetails: [{
            type: core_1.Input
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/activity/activity-detail/activity-content-type/activity-content-type.component.ts":
/*!************************************************************************************************************************!*\
  !*** ./src/app/authentication-pages/activity/activity-detail/activity-content-type/activity-content-type.component.ts ***!
  \************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ActivityContentTypeComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
function ActivityContentTypeComponent_span_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 2);
    i0.ɵɵelement(1, "i", 3);
    i0.ɵɵelementEnd();
} }
class ActivityContentTypeComponent {
    constructor() {
        this.appUtil = app_util_1.default;
        this.isFolder = false;
    }
    ngOnInit() {
    }
}
exports.ActivityContentTypeComponent = ActivityContentTypeComponent;
ActivityContentTypeComponent.ɵfac = function ActivityContentTypeComponent_Factory(t) { return new (t || ActivityContentTypeComponent)(); };
ActivityContentTypeComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ActivityContentTypeComponent, selectors: [["app-activity-content-type"]], inputs: { isFolder: "isFolder", contentType: "contentType" }, decls: 2, vars: 2, consts: [["class", "p-mr-1", 4, "ngIf"], [1, "p-mr-1", 3, "innerHTML"], [1, "p-mr-1"], [1, "fas", "fa-folder"]], template: function ActivityContentTypeComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵtemplate(0, ActivityContentTypeComponent_span_0_Template, 2, 0, "span", 0);
        i0.ɵɵelement(1, "span", 1);
    } if (rf & 2) {
        i0.ɵɵproperty("ngIf", ctx.isFolder);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("innerHTML", ctx.appUtil.getIconFromMimeType(ctx.contentType), i0.ɵɵsanitizeHtml);
    } }, directives: [i1.NgIf], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2FjdGl2aXR5L2FjdGl2aXR5LWRldGFpbC9hY3Rpdml0eS1jb250ZW50LXR5cGUvYWN0aXZpdHktY29udGVudC10eXBlLmNvbXBvbmVudC5zY3NzIn0= */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ActivityContentTypeComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-activity-content-type',
                templateUrl: './activity-content-type.component.html',
                styleUrls: ['./activity-content-type.component.scss']
            }]
    }], function () { return []; }, { isFolder: [{
            type: core_1.Input
        }], contentType: [{
            type: core_1.Input
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/activity/activity-detail/activity-detail.component.ts":
/*!********************************************************************************************!*\
  !*** ./src/app/authentication-pages/activity/activity-detail/activity-detail.component.ts ***!
  \********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ActivityDetailComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/history.service */ "./src/app/services/history.service.ts"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/project.service */ "./src/app/services/project.service.ts"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! primeng/scrolltop */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-scrolltop.js"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! primeng/tag */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-tag.js"));
const i10 = tslib_1.__importStar(__webpack_require__(/*! ./activity-content-type/activity-content-type.component */ "./src/app/authentication-pages/activity/activity-detail/activity-content-type/activity-content-type.component.ts"));
const i11 = tslib_1.__importStar(__webpack_require__(/*! ./activity-project-role/activity-project-role.component */ "./src/app/authentication-pages/activity/activity-detail/activity-project-role/activity-project-role.component.ts"));
function ActivityDetailComponent_div_3_div_2_div_9_div_1_div_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 13);
    i0.ɵɵelementStart(1, "del", 17);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const file_r19 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(file_r19.oldName);
} }
function ActivityDetailComponent_div_3_div_2_div_9_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelementStart(1, "div", 13);
    i0.ɵɵelement(2, "i", 14);
    i0.ɵɵelementStart(3, "a", 15);
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(5, ActivityDetailComponent_div_3_div_2_div_9_div_1_div_5_Template, 3, 1, "div", 16);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const file_r19 = ctx.$implicit;
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("title", file_r19.name);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(file_r19.name);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", file_r19.name !== file_r19.oldName);
} }
function ActivityDetailComponent_div_3_div_2_div_9_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtemplate(1, ActivityDetailComponent_div_3_div_2_div_9_div_1_Template, 6, 3, "div", 12);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r3 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngForOf", item_r3.data.result);
} }
function ActivityDetailComponent_div_3_div_2_div_10_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelementStart(1, "div", 18);
    i0.ɵɵelementStart(2, "div", 19);
    i0.ɵɵelement(3, "i", 20);
    i0.ɵɵelementStart(4, "span", 15);
    i0.ɵɵtext(5);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(6, "div", 21);
    i0.ɵɵelement(7, "span", 22);
    i0.ɵɵpipe(8, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(9, "div", 23);
    i0.ɵɵelementStart(10, "div", 19);
    i0.ɵɵelement(11, "i", 20);
    i0.ɵɵelementStart(12, "span", 15);
    i0.ɵɵtext(13);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(14, "div", 21);
    i0.ɵɵelement(15, "span", 24);
    i0.ɵɵpipe(16, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r3 = i0.ɵɵnextContext().$implicit;
    const ctx_r5 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("title", ctx_r5.getName(item_r3.data.transferUser.firstName, item_r3.data.transferUser.lastName));
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", ctx_r5.getName(item_r3.data.transferUser.firstName, item_r3.data.transferUser.lastName), " ");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("translate", i0.ɵɵpipeBind1(8, 6, "label.project_role.owner"));
    i0.ɵɵadvance(5);
    i0.ɵɵproperty("title", ctx_r5.getName(item_r3.data.oldOwner.firstName, item_r3.data.oldOwner.lastName));
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", ctx_r5.getName(item_r3.data.oldOwner.firstName, item_r3.data.oldOwner.lastName), " ");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("translate", i0.ɵɵpipeBind1(16, 8, "label.project_role.editor"));
} }
function ActivityDetailComponent_div_3_div_2_div_11_div_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelement(1, "p-tag", 29);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const label_r28 = ctx.$implicit;
    const ctx_r24 = i0.ɵɵnextContext(4);
    i0.ɵɵadvance(1);
    i0.ɵɵstyleMap(ctx_r24.appUtil.handleLabelColor(label_r28.color));
    i0.ɵɵpropertyInterpolate("value", label_r28.name);
    i0.ɵɵpropertyInterpolate("title", label_r28.name);
    i0.ɵɵproperty("rounded", true)("styleClass", !ctx_r24.appUtil.checkColorDark(label_r28.color) ? "text-dark p-max-width-100 p-tag-custom p-mb-1" : "p-max-width-100 p-tag-custom p-mb-1");
} }
function ActivityDetailComponent_div_3_div_2_div_11_span_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 15);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r25 = i0.ɵɵnextContext(4);
    i0.ɵɵproperty("title", ctx_r25.project.projectName);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(ctx_r25.project.projectName);
} }
function ActivityDetailComponent_div_3_div_2_div_11_span_6_Template(rf, ctx) { if (rf & 1) {
    const _r30 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵelementStart(1, "a", 30);
    i0.ɵɵlistener("click", function ActivityDetailComponent_div_3_div_2_div_11_span_6_Template_a_click_1_listener() { i0.ɵɵrestoreView(_r30); const item_r3 = i0.ɵɵnextContext(2).$implicit; const ctx_r29 = i0.ɵɵnextContext(2); return ctx_r29.onChangePosition(ctx_r29.project.projectId, item_r3.data.parent.id, null); });
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r3 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("title", item_r3.data.parent.name);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", item_r3.data.parent.name, " ");
} }
function ActivityDetailComponent_div_3_div_2_div_11_div_7_Template(rf, ctx) { if (rf & 1) {
    const _r35 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 31);
    i0.ɵɵelementStart(1, "div", 13);
    i0.ɵɵelement(2, "app-activity-content-type", 32);
    i0.ɵɵelementStart(3, "a", 30);
    i0.ɵɵlistener("click", function ActivityDetailComponent_div_3_div_2_div_11_div_7_Template_a_click_3_listener() { i0.ɵɵrestoreView(_r35); const file_r33 = ctx.$implicit; const item_r3 = i0.ɵɵnextContext(2).$implicit; const ctx_r34 = i0.ɵɵnextContext(2); return ctx_r34.onChangePosition(ctx_r34.project.projectId, item_r3.data.parent.id, file_r33.id); });
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const file_r33 = ctx.$implicit;
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("contentType", file_r33.contentType);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("title", file_r33.name);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", file_r33.name, " ");
} }
function ActivityDetailComponent_div_3_div_2_div_11_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelementStart(1, "div", 25);
    i0.ɵɵtemplate(2, ActivityDetailComponent_div_3_div_2_div_11_div_2_Template, 2, 6, "div", 12);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "div", 26);
    i0.ɵɵelement(4, "i", 14);
    i0.ɵɵtemplate(5, ActivityDetailComponent_div_3_div_2_div_11_span_5_Template, 2, 2, "span", 27);
    i0.ɵɵtemplate(6, ActivityDetailComponent_div_3_div_2_div_11_span_6_Template, 3, 2, "span", 11);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(7, ActivityDetailComponent_div_3_div_2_div_11_div_7_Template, 5, 3, "div", 28);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r3 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngForOf", item_r3.data.result);
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("ngIf", item_r3.data.parent === null);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r3.data.parent !== null);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngForOf", item_r3.data.object);
} }
function ActivityDetailComponent_div_3_div_2_div_12_div_1_span_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵelementStart(1, "span", 33);
    i0.ɵɵelementStart(2, "span", 34);
    i0.ɵɵelementStart(3, "del", 15);
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const label_r39 = i0.ɵɵnextContext().$implicit;
    const ctx_r40 = i0.ɵɵnextContext(4);
    i0.ɵɵadvance(1);
    i0.ɵɵstyleMap(ctx_r40.appUtil.handleLabelColor(label_r39.oldColor));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngClass", !ctx_r40.appUtil.checkColorDark(label_r39.oldColor) ? "text-dark" : "");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("title", label_r39.oldName);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(label_r39.oldName);
} }
function ActivityDetailComponent_div_3_div_2_div_12_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtemplate(1, ActivityDetailComponent_div_3_div_2_div_12_div_1_span_1_Template, 5, 5, "span", 11);
    i0.ɵɵelement(2, "p-tag", 29);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const label_r39 = ctx.$implicit;
    const item_r3 = i0.ɵɵnextContext(2).$implicit;
    const ctx_r38 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r3.historyType == ctx_r38.appConstant.PROJECT.UPDATE_LABEL.code);
    i0.ɵɵadvance(1);
    i0.ɵɵstyleMap(ctx_r38.appUtil.handleLabelColor(label_r39.color));
    i0.ɵɵpropertyInterpolate("value", label_r39.name);
    i0.ɵɵpropertyInterpolate("title", label_r39.name);
    i0.ɵɵproperty("rounded", true)("styleClass", !ctx_r38.appUtil.checkColorDark(label_r39.color) ? "text-dark p-max-width-100 p-tag-custom" : "p-max-width-100 p-tag-custom");
} }
function ActivityDetailComponent_div_3_div_2_div_12_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtemplate(1, ActivityDetailComponent_div_3_div_2_div_12_div_1_Template, 3, 7, "div", 12);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r3 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngForOf", item_r3.data.result);
} }
function ActivityDetailComponent_div_3_div_2_div_13_span_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 15);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r44 = i0.ɵɵnextContext(4);
    i0.ɵɵproperty("title", ctx_r44.project.projectName);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(ctx_r44.project.projectName);
} }
function ActivityDetailComponent_div_3_div_2_div_13_span_4_Template(rf, ctx) { if (rf & 1) {
    const _r48 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵelementStart(1, "a", 30);
    i0.ɵɵlistener("click", function ActivityDetailComponent_div_3_div_2_div_13_span_4_Template_a_click_1_listener() { i0.ɵɵrestoreView(_r48); const item_r3 = i0.ɵɵnextContext(2).$implicit; const ctx_r47 = i0.ɵɵnextContext(2); return ctx_r47.onChangePosition(ctx_r47.project.projectId, item_r3.data.parent.id, null); });
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r3 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("title", item_r3.data.parent.name);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", item_r3.data.parent.name, " ");
} }
function ActivityDetailComponent_div_3_div_2_div_13_div_5_Template(rf, ctx) { if (rf & 1) {
    const _r53 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 31);
    i0.ɵɵelementStart(1, "div", 13);
    i0.ɵɵelement(2, "app-activity-content-type", 32);
    i0.ɵɵelementStart(3, "a", 30);
    i0.ɵɵlistener("click", function ActivityDetailComponent_div_3_div_2_div_13_div_5_Template_a_click_3_listener() { i0.ɵɵrestoreView(_r53); const file_r51 = ctx.$implicit; const item_r3 = i0.ɵɵnextContext(2).$implicit; const ctx_r52 = i0.ɵɵnextContext(2); return ctx_r52.onChangePosition(ctx_r52.project.projectId, item_r3.data.parent.id, file_r51.id); });
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const file_r51 = ctx.$implicit;
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("contentType", file_r51.contentType);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("title", file_r51.name);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", file_r51.name, " ");
} }
function ActivityDetailComponent_div_3_div_2_div_13_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelementStart(1, "div", 13);
    i0.ɵɵelement(2, "i", 14);
    i0.ɵɵtemplate(3, ActivityDetailComponent_div_3_div_2_div_13_span_3_Template, 2, 2, "span", 27);
    i0.ɵɵtemplate(4, ActivityDetailComponent_div_3_div_2_div_13_span_4_Template, 3, 2, "span", 11);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(5, ActivityDetailComponent_div_3_div_2_div_13_div_5_Template, 5, 3, "div", 28);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r3 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("ngIf", item_r3.data.parent === null);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r3.data.parent !== null);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngForOf", item_r3.data.result);
} }
function ActivityDetailComponent_div_3_div_2_div_14_span_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 15);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r56 = i0.ɵɵnextContext(4);
    i0.ɵɵproperty("title", ctx_r56.project.projectName);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(ctx_r56.project.projectName);
} }
function ActivityDetailComponent_div_3_div_2_div_14_span_4_Template(rf, ctx) { if (rf & 1) {
    const _r60 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵelementStart(1, "a", 30);
    i0.ɵɵlistener("click", function ActivityDetailComponent_div_3_div_2_div_14_span_4_Template_a_click_1_listener() { i0.ɵɵrestoreView(_r60); const item_r3 = i0.ɵɵnextContext(2).$implicit; const ctx_r59 = i0.ɵɵnextContext(2); return ctx_r59.onChangePosition(ctx_r59.project.projectId, item_r3.data.parent.id, null); });
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r3 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("title", item_r3.data.parent.name);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", item_r3.data.parent.name, " ");
} }
function ActivityDetailComponent_div_3_div_2_div_14_div_5_Template(rf, ctx) { if (rf & 1) {
    const _r65 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelementStart(1, "div", 13);
    i0.ɵɵelement(2, "app-activity-content-type", 35);
    i0.ɵɵelementStart(3, "a", 30);
    i0.ɵɵlistener("click", function ActivityDetailComponent_div_3_div_2_div_14_div_5_Template_a_click_3_listener() { i0.ɵɵrestoreView(_r65); const file_r63 = ctx.$implicit; const item_r3 = i0.ɵɵnextContext(2).$implicit; const ctx_r64 = i0.ɵɵnextContext(2); return ctx_r64.onChangePosition(ctx_r64.project.projectId, item_r3.data.parent.id, file_r63.id); });
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "div", 13);
    i0.ɵɵelementStart(6, "del", 15);
    i0.ɵɵtext(7);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const file_r63 = ctx.$implicit;
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("isFolder", file_r63.isFolder)("contentType", file_r63.contentType);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("title", file_r63.name);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", file_r63.name, " ");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("title", file_r63.oldName);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(file_r63.oldName);
} }
function ActivityDetailComponent_div_3_div_2_div_14_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelementStart(1, "div", 13);
    i0.ɵɵelement(2, "i", 14);
    i0.ɵɵtemplate(3, ActivityDetailComponent_div_3_div_2_div_14_span_3_Template, 2, 2, "span", 27);
    i0.ɵɵtemplate(4, ActivityDetailComponent_div_3_div_2_div_14_span_4_Template, 3, 2, "span", 11);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(5, ActivityDetailComponent_div_3_div_2_div_14_div_5_Template, 8, 6, "div", 12);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r3 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("ngIf", item_r3.data.parent === null);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r3.data.parent !== null);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngForOf", item_r3.data.result);
} }
function ActivityDetailComponent_div_3_div_2_div_15_span_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 15);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r68 = i0.ɵɵnextContext(4);
    i0.ɵɵproperty("title", ctx_r68.project.projectName);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(ctx_r68.project.projectName);
} }
function ActivityDetailComponent_div_3_div_2_div_15_span_4_Template(rf, ctx) { if (rf & 1) {
    const _r72 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵelementStart(1, "a", 30);
    i0.ɵɵlistener("click", function ActivityDetailComponent_div_3_div_2_div_15_span_4_Template_a_click_1_listener() { i0.ɵɵrestoreView(_r72); const item_r3 = i0.ɵɵnextContext(2).$implicit; const ctx_r71 = i0.ɵɵnextContext(2); return ctx_r71.onChangePosition(ctx_r71.project.projectId, item_r3.data.parent.id, null); });
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r3 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("title", item_r3.data.parent.name);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", item_r3.data.parent.name, " ");
} }
function ActivityDetailComponent_div_3_div_2_div_15_div_5_div_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 13);
    i0.ɵɵelementStart(1, "del", 15);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const folder_r75 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("title", folder_r75.oldName);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(folder_r75.oldName);
} }
function ActivityDetailComponent_div_3_div_2_div_15_div_5_Template(rf, ctx) { if (rf & 1) {
    const _r79 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 31);
    i0.ɵɵelementStart(1, "div", 13);
    i0.ɵɵelement(2, "app-activity-content-type", 32);
    i0.ɵɵelementStart(3, "a", 30);
    i0.ɵɵlistener("click", function ActivityDetailComponent_div_3_div_2_div_15_div_5_Template_a_click_3_listener() { i0.ɵɵrestoreView(_r79); const folder_r75 = ctx.$implicit; const item_r3 = i0.ɵɵnextContext(2).$implicit; const ctx_r78 = i0.ɵɵnextContext(2); return ctx_r78.onChangePosition(ctx_r78.project.projectId, item_r3.data.parent.id, folder_r75.id); });
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(5, ActivityDetailComponent_div_3_div_2_div_15_div_5_div_5_Template, 3, 2, "div", 16);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const folder_r75 = ctx.$implicit;
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("contentType", folder_r75.contentType);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("title", folder_r75.name);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", folder_r75.name, " ");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", folder_r75.name !== folder_r75.oldName);
} }
function ActivityDetailComponent_div_3_div_2_div_15_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelementStart(1, "div", 13);
    i0.ɵɵelement(2, "i", 14);
    i0.ɵɵtemplate(3, ActivityDetailComponent_div_3_div_2_div_15_span_3_Template, 2, 2, "span", 27);
    i0.ɵɵtemplate(4, ActivityDetailComponent_div_3_div_2_div_15_span_4_Template, 3, 2, "span", 11);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(5, ActivityDetailComponent_div_3_div_2_div_15_div_5_Template, 6, 4, "div", 28);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r3 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("ngIf", item_r3.data.parent === null);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r3.data.parent !== null);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngForOf", item_r3.data.result);
} }
function ActivityDetailComponent_div_3_div_2_div_16_div_1_div_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 13);
    i0.ɵɵelementStart(1, "del", 15);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const folder_r83 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("title", folder_r83.oldName);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(folder_r83.oldName);
} }
function ActivityDetailComponent_div_3_div_2_div_16_div_1_Template(rf, ctx) { if (rf & 1) {
    const _r87 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 31);
    i0.ɵɵelementStart(1, "div", 13);
    i0.ɵɵelement(2, "app-activity-content-type", 32);
    i0.ɵɵelementStart(3, "a", 30);
    i0.ɵɵlistener("click", function ActivityDetailComponent_div_3_div_2_div_16_div_1_Template_a_click_3_listener() { i0.ɵɵrestoreView(_r87); const folder_r83 = ctx.$implicit; const item_r3 = i0.ɵɵnextContext(2).$implicit; const ctx_r86 = i0.ɵɵnextContext(2); return ctx_r86.onChangePosition(ctx_r86.project.projectId, item_r3.data.parent.id, folder_r83.id); });
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(5, ActivityDetailComponent_div_3_div_2_div_16_div_1_div_5_Template, 3, 2, "div", 16);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const folder_r83 = ctx.$implicit;
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("contentType", folder_r83.contentType);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("title", folder_r83.name);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", folder_r83.name, " ");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", folder_r83.name !== folder_r83.oldName);
} }
function ActivityDetailComponent_div_3_div_2_div_16_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtemplate(1, ActivityDetailComponent_div_3_div_2_div_16_div_1_Template, 6, 4, "div", 28);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r3 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngForOf", item_r3.data.result);
} }
function ActivityDetailComponent_div_3_div_2_div_17_span_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 15);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r90 = i0.ɵɵnextContext(4);
    i0.ɵɵproperty("title", ctx_r90.project.projectName);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(ctx_r90.project.projectName);
} }
function ActivityDetailComponent_div_3_div_2_div_17_span_4_Template(rf, ctx) { if (rf & 1) {
    const _r94 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "span", 17);
    i0.ɵɵelementStart(1, "a", 37);
    i0.ɵɵlistener("click", function ActivityDetailComponent_div_3_div_2_div_17_span_4_Template_a_click_1_listener() { i0.ɵɵrestoreView(_r94); const item_r3 = i0.ɵɵnextContext(2).$implicit; const ctx_r93 = i0.ɵɵnextContext(2); return ctx_r93.onChangePosition(ctx_r93.project.projectId, item_r3.data.parent.id, null); });
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r3 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("title", item_r3.data.parent.name);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", item_r3.data.parent.name, " ");
} }
function ActivityDetailComponent_div_3_div_2_div_17_div_5_del_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "del", 15);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const file_r97 = i0.ɵɵnextContext().$implicit;
    const ctx_r98 = i0.ɵɵnextContext(4);
    i0.ɵɵproperty("title", ctx_r98.getName(file_r97.firstName, file_r97.lastName));
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", ctx_r98.getName(file_r97.firstName, file_r97.lastName), " ");
} }
function ActivityDetailComponent_div_3_div_2_div_17_div_5_div_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 15);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const file_r97 = i0.ɵɵnextContext().$implicit;
    const ctx_r99 = i0.ɵɵnextContext(4);
    i0.ɵɵproperty("title", ctx_r99.getName(file_r97.firstName, file_r97.lastName));
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", ctx_r99.getName(file_r97.firstName, file_r97.lastName), " ");
} }
function ActivityDetailComponent_div_3_div_2_div_17_div_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 31);
    i0.ɵɵelementStart(1, "div", 38);
    i0.ɵɵelement(2, "i", 39);
    i0.ɵɵtemplate(3, ActivityDetailComponent_div_3_div_2_div_17_div_5_del_3_Template, 2, 2, "del", 27);
    i0.ɵɵtemplate(4, ActivityDetailComponent_div_3_div_2_div_17_div_5_div_4_Template, 2, 2, "div", 27);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "div", 40);
    i0.ɵɵelement(6, "app-activity-project-role", 41);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const file_r97 = ctx.$implicit;
    const item_r3 = i0.ɵɵnextContext(2).$implicit;
    const ctx_r92 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("ngIf", item_r3.historyType === ctx_r92.appConstant.PROJECT.USER_REMOVE.code);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r3.historyType !== ctx_r92.appConstant.PROJECT.USER_REMOVE.code);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("newRoleType", file_r97.newRole)("roleType", file_r97.role);
} }
function ActivityDetailComponent_div_3_div_2_div_17_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelementStart(1, "div", 13);
    i0.ɵɵelement(2, "i", 14);
    i0.ɵɵtemplate(3, ActivityDetailComponent_div_3_div_2_div_17_span_3_Template, 2, 2, "span", 27);
    i0.ɵɵtemplate(4, ActivityDetailComponent_div_3_div_2_div_17_span_4_Template, 3, 2, "span", 36);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(5, ActivityDetailComponent_div_3_div_2_div_17_div_5_Template, 7, 4, "div", 28);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r3 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("ngIf", item_r3.data.parent === null);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r3.data.parent !== null);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngForOf", item_r3.data.result);
} }
function ActivityDetailComponent_div_3_div_2_div_18_span_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 15);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r104 = i0.ɵɵnextContext(4);
    i0.ɵɵproperty("title", ctx_r104.project.projectName);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(ctx_r104.project.projectName);
} }
function ActivityDetailComponent_div_3_div_2_div_18_span_4_Template(rf, ctx) { if (rf & 1) {
    const _r108 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "span", 17);
    i0.ɵɵelementStart(1, "a", 37);
    i0.ɵɵlistener("click", function ActivityDetailComponent_div_3_div_2_div_18_span_4_Template_a_click_1_listener() { i0.ɵɵrestoreView(_r108); const item_r3 = i0.ɵɵnextContext(2).$implicit; const ctx_r107 = i0.ɵɵnextContext(2); return ctx_r107.onChangePosition(ctx_r107.project.projectId, item_r3.data.parent.id, null); });
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r3 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("title", item_r3.data.parent.name);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", item_r3.data.parent.name, " ");
} }
function ActivityDetailComponent_div_3_div_2_div_18_div_5_del_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "del", 15);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const file_r111 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵproperty("title", file_r111.name);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", file_r111.name, " ");
} }
function ActivityDetailComponent_div_3_div_2_div_18_div_5_div_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 15);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const file_r111 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵproperty("title", file_r111.name);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", file_r111.name, " ");
} }
function ActivityDetailComponent_div_3_div_2_div_18_div_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 31);
    i0.ɵɵelementStart(1, "div", 38);
    i0.ɵɵelement(2, "i", 42);
    i0.ɵɵtemplate(3, ActivityDetailComponent_div_3_div_2_div_18_div_5_del_3_Template, 2, 2, "del", 27);
    i0.ɵɵtemplate(4, ActivityDetailComponent_div_3_div_2_div_18_div_5_div_4_Template, 2, 2, "div", 27);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "div", 40);
    i0.ɵɵelement(6, "app-activity-project-role", 41);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const file_r111 = ctx.$implicit;
    const item_r3 = i0.ɵɵnextContext(2).$implicit;
    const ctx_r106 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("ngIf", item_r3.historyType === ctx_r106.appConstant.PROJECT.GROUP_REMOVE.code);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r3.historyType !== ctx_r106.appConstant.PROJECT.GROUP_REMOVE.code);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("newRoleType", file_r111.newRole)("roleType", file_r111.role);
} }
function ActivityDetailComponent_div_3_div_2_div_18_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelementStart(1, "div", 13);
    i0.ɵɵelement(2, "i", 14);
    i0.ɵɵtemplate(3, ActivityDetailComponent_div_3_div_2_div_18_span_3_Template, 2, 2, "span", 27);
    i0.ɵɵtemplate(4, ActivityDetailComponent_div_3_div_2_div_18_span_4_Template, 3, 2, "span", 36);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(5, ActivityDetailComponent_div_3_div_2_div_18_div_5_Template, 7, 4, "div", 28);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r3 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("ngIf", item_r3.data.parent === null);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r3.data.parent !== null);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngForOf", item_r3.data.result);
} }
function ActivityDetailComponent_div_3_div_2_div_19_div_1_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelementStart(1, "div", 46);
    i0.ɵɵelement(2, "app-activity-content-type", 32);
    i0.ɵɵelementStart(3, "span", 15);
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const file_r122 = ctx.$implicit;
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("contentType", file_r122.contentType);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("title", file_r122.name);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(file_r122.name);
} }
function ActivityDetailComponent_div_3_div_2_div_19_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 25);
    i0.ɵɵtemplate(1, ActivityDetailComponent_div_3_div_2_div_19_div_1_div_1_Template, 5, 3, "div", 12);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r3 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngForOf", item_r3.data.sharedObject);
} }
function ActivityDetailComponent_div_3_div_2_div_19_div_2_Template(rf, ctx) { if (rf & 1) {
    const _r126 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 47);
    i0.ɵɵelementStart(1, "div", 13);
    i0.ɵɵelement(2, "i", 48);
    i0.ɵɵelementStart(3, "a", 49);
    i0.ɵɵlistener("click", function ActivityDetailComponent_div_3_div_2_div_19_div_2_Template_a_click_3_listener() { i0.ɵɵrestoreView(_r126); const item_r3 = i0.ɵɵnextContext(2).$implicit; const ctx_r124 = i0.ɵɵnextContext(2); return ctx_r124.goToLink(item_r3.data.link.linkUrl); });
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r3 = i0.ɵɵnextContext(2).$implicit;
    const ctx_r119 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate1(" ", ctx_r119.getShareLinkURL(item_r3.data.link.linkUrl), " ");
} }
function ActivityDetailComponent_div_3_div_2_div_19_div_3_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelementStart(1, "div", 46);
    i0.ɵɵelement(2, "i", 51);
    i0.ɵɵelementStart(3, "span", 15);
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const share_r129 = ctx.$implicit;
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("title", share_r129.name);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(share_r129.name);
} }
function ActivityDetailComponent_div_3_div_2_div_19_div_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 50);
    i0.ɵɵtemplate(1, ActivityDetailComponent_div_3_div_2_div_19_div_3_div_1_Template, 5, 2, "div", 12);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r3 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngForOf", item_r3.data.result);
} }
const _c0 = function (a0) { return [a0]; };
function ActivityDetailComponent_div_3_div_2_div_19_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtemplate(1, ActivityDetailComponent_div_3_div_2_div_19_div_1_Template, 2, 1, "div", 43);
    i0.ɵɵtemplate(2, ActivityDetailComponent_div_3_div_2_div_19_div_2_Template, 5, 1, "div", 44);
    i0.ɵɵtemplate(3, ActivityDetailComponent_div_3_div_2_div_19_div_3_Template, 2, 1, "div", 45);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r3 = i0.ɵɵnextContext().$implicit;
    const ctx_r14 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r3.data.sharedObject);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r3.data.link);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", !i0.ɵɵpureFunction1(3, _c0, ctx_r14.appConstant.PROJECT.LINK_CREATED.code).includes(item_r3.historyType));
} }
function ActivityDetailComponent_div_3_div_2_div_20_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelementStart(1, "div", 13);
    i0.ɵɵelement(2, "app-activity-content-type", 32);
    i0.ɵɵelementStart(3, "span", 15);
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const file_r134 = ctx.$implicit;
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("contentType", file_r134.contentType);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("title", file_r134.name);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(file_r134.name);
} }
function ActivityDetailComponent_div_3_div_2_div_20_div_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 50);
    i0.ɵɵelementStart(1, "div", 46);
    i0.ɵɵelement(2, "i", 51);
    i0.ɵɵelementStart(3, "span", 15);
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const share_r135 = ctx.$implicit;
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("title", share_r135.email);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(share_r135.email);
} }
function ActivityDetailComponent_div_3_div_2_div_20_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtemplate(1, ActivityDetailComponent_div_3_div_2_div_20_div_1_Template, 5, 3, "div", 12);
    i0.ɵɵtemplate(2, ActivityDetailComponent_div_3_div_2_div_20_div_2_Template, 5, 2, "div", 52);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r3 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngForOf", item_r3.data.result);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngForOf", item_r3.data.object);
} }
function ActivityDetailComponent_div_3_div_2_div_21_span_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 15);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r137 = i0.ɵɵnextContext(4);
    i0.ɵɵproperty("title", ctx_r137.project.projectName);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(ctx_r137.project.projectName);
} }
function ActivityDetailComponent_div_3_div_2_div_21_span_4_Template(rf, ctx) { if (rf & 1) {
    const _r140 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵelementStart(1, "a", 30);
    i0.ɵɵlistener("click", function ActivityDetailComponent_div_3_div_2_div_21_span_4_Template_a_click_1_listener() { i0.ɵɵrestoreView(_r140); const item_r3 = i0.ɵɵnextContext(2).$implicit; const ctx_r139 = i0.ɵɵnextContext(2); return ctx_r139.onChangePosition(ctx_r139.project.projectId, item_r3.data.parent.id, null); });
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r3 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("title", item_r3.data.parent.name);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", item_r3.data.parent.name, " ");
} }
function ActivityDetailComponent_div_3_div_2_div_21_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelementStart(1, "div", 13);
    i0.ɵɵelement(2, "i", 14);
    i0.ɵɵtemplate(3, ActivityDetailComponent_div_3_div_2_div_21_span_3_Template, 2, 2, "span", 27);
    i0.ɵɵtemplate(4, ActivityDetailComponent_div_3_div_2_div_21_span_4_Template, 3, 2, "span", 11);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r3 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("ngIf", item_r3.data.parent === null);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r3.data.parent !== null);
} }
function ActivityDetailComponent_div_3_div_2_div_22_div_1_Template(rf, ctx) { if (rf & 1) {
    const _r147 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelementStart(1, "div", 13);
    i0.ɵɵelement(2, "app-activity-content-type", 35);
    i0.ɵɵelementStart(3, "a", 30);
    i0.ɵɵlistener("click", function ActivityDetailComponent_div_3_div_2_div_22_div_1_Template_a_click_3_listener() { i0.ɵɵrestoreView(_r147); const file_r145 = ctx.$implicit; const item_r3 = i0.ɵɵnextContext(2).$implicit; const ctx_r146 = i0.ɵɵnextContext(2); return ctx_r146.onChangePosition(ctx_r146.project.projectId, item_r3.data.parent.id, file_r145.id); });
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const file_r145 = ctx.$implicit;
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("isFolder", file_r145.isFolder)("contentType", file_r145.contentType);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("title", file_r145.name);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", file_r145.name, " ");
} }
function ActivityDetailComponent_div_3_div_2_div_22_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtemplate(1, ActivityDetailComponent_div_3_div_2_div_22_div_1_Template, 5, 4, "div", 12);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r3 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngForOf", item_r3.data.object);
} }
const _c1 = function () { return { "border-bottom": "1px solid var(--bluegray-400)" }; };
const _c2 = function (a0, a1, a2) { return [a0, a1, a2]; };
const _c3 = function (a0, a1) { return [a0, a1]; };
const _c4 = function (a0, a1, a2, a3, a4, a5, a6, a7, a8) { return [a0, a1, a2, a3, a4, a5, a6, a7, a8]; };
const _c5 = function (a0, a1, a2, a3, a4) { return [a0, a1, a2, a3, a4]; };
const _c6 = function (a0, a1, a2, a3) { return [a0, a1, a2, a3]; };
function ActivityDetailComponent_div_3_div_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 6);
    i0.ɵɵelementStart(1, "div", 7);
    i0.ɵɵelementStart(2, "span");
    i0.ɵɵelementStart(3, "span", 8);
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd();
    i0.ɵɵtext(5);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(6, "span", 9);
    i0.ɵɵtext(7);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(8, "div", 10);
    i0.ɵɵtemplate(9, ActivityDetailComponent_div_3_div_2_div_9_Template, 2, 1, "div", 11);
    i0.ɵɵtemplate(10, ActivityDetailComponent_div_3_div_2_div_10_Template, 17, 10, "div", 11);
    i0.ɵɵtemplate(11, ActivityDetailComponent_div_3_div_2_div_11_Template, 8, 4, "div", 11);
    i0.ɵɵtemplate(12, ActivityDetailComponent_div_3_div_2_div_12_Template, 2, 1, "div", 11);
    i0.ɵɵtemplate(13, ActivityDetailComponent_div_3_div_2_div_13_Template, 6, 3, "div", 11);
    i0.ɵɵtemplate(14, ActivityDetailComponent_div_3_div_2_div_14_Template, 6, 3, "div", 11);
    i0.ɵɵtemplate(15, ActivityDetailComponent_div_3_div_2_div_15_Template, 6, 3, "div", 11);
    i0.ɵɵtemplate(16, ActivityDetailComponent_div_3_div_2_div_16_Template, 2, 1, "div", 11);
    i0.ɵɵtemplate(17, ActivityDetailComponent_div_3_div_2_div_17_Template, 6, 3, "div", 11);
    i0.ɵɵtemplate(18, ActivityDetailComponent_div_3_div_2_div_18_Template, 6, 3, "div", 11);
    i0.ɵɵtemplate(19, ActivityDetailComponent_div_3_div_2_div_19_Template, 4, 5, "div", 11);
    i0.ɵɵtemplate(20, ActivityDetailComponent_div_3_div_2_div_20_Template, 3, 2, "div", 11);
    i0.ɵɵtemplate(21, ActivityDetailComponent_div_3_div_2_div_21_Template, 5, 2, "div", 11);
    i0.ɵɵtemplate(22, ActivityDetailComponent_div_3_div_2_div_22_Template, 2, 1, "div", 11);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r3 = ctx.$implicit;
    const ctx_r1 = i0.ɵɵnextContext(2);
    i0.ɵɵstyleMap(i0.ɵɵpureFunction0(19, _c1));
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate(ctx_r1.getUserName(item_r3));
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1("\u00A0", ctx_r1.getText(item_r3), "");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", ctx_r1.appUtil.formatDateBasedOnDiff(ctx_r1.datePipe, item_r3.createDate), " ");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", i0.ɵɵpureFunction3(20, _c2, ctx_r1.appConstant.PROJECT.PROJECT_ADDED.code, ctx_r1.appConstant.PROJECT.PROJECT_UPDATED.code, ctx_r1.appConstant.PROJECT.PROJECT_COPY.code).includes(item_r3.historyType));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", i0.ɵɵpureFunction1(24, _c0, ctx_r1.appConstant.PROJECT.TRANSFER_PROJECT.code).includes(item_r3.historyType));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", i0.ɵɵpureFunction2(26, _c3, ctx_r1.appConstant.PROJECT.ATTACH_LABEL.code, ctx_r1.appConstant.PROJECT.DETACH_LABEL.code).includes(item_r3.historyType));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", i0.ɵɵpureFunction3(29, _c2, ctx_r1.appConstant.PROJECT.CREATE_LABEL.code, ctx_r1.appConstant.PROJECT.UPDATE_LABEL.code, ctx_r1.appConstant.PROJECT.DELETE_LABEL.code).includes(item_r3.historyType));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", i0.ɵɵpureFunctionV(33, _c4, [ctx_r1.appConstant.PROJECT.DELETE_LICENSE.code, ctx_r1.appConstant.PROJECT.FILE_ADDED.code, ctx_r1.appConstant.PROJECT.FILE_DELETE.code, ctx_r1.appConstant.PROJECT.FILE_REMOVE.code, ctx_r1.appConstant.PROJECT.FILE_ENCODED.code, ctx_r1.appConstant.PROJECT.LICENSE_UPDATED.code, ctx_r1.appConstant.PROJECT.FILE_RESTORED.code, ctx_r1.appConstant.PROJECT.FILE_MOVE.code, ctx_r1.appConstant.PROJECT.COPY_FILE.code]).includes(item_r3.historyType));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", i0.ɵɵpureFunction1(43, _c0, ctx_r1.appConstant.PROJECT.FILE_UPDATE.code).includes(item_r3.historyType));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", i0.ɵɵpureFunction3(45, _c2, ctx_r1.appConstant.PROJECT.FOLDER_CREATED.code, ctx_r1.appConstant.PROJECT.FOLDER_MOVED.code, ctx_r1.appConstant.PROJECT.FOLDER_COPY.code).includes(item_r3.historyType));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", i0.ɵɵpureFunction5(49, _c5, ctx_r1.appConstant.PROJECT.FOLDER_UPDATED.code, ctx_r1.appConstant.PROJECT.FOLDER_UPDATED_SETTING.code, ctx_r1.appConstant.PROJECT.FOLDER_REMOVE.code, ctx_r1.appConstant.PROJECT.FOLDER_RESTORE.code, ctx_r1.appConstant.PROJECT.FOLDER_DELETED.code).includes(item_r3.historyType));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", i0.ɵɵpureFunction3(55, _c2, ctx_r1.appConstant.PROJECT.USER_INVITED.code, ctx_r1.appConstant.PROJECT.USER_CHANGE_ROLE.code, ctx_r1.appConstant.PROJECT.USER_REMOVE.code).includes(item_r3.historyType));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", i0.ɵɵpureFunction3(59, _c2, ctx_r1.appConstant.PROJECT.GROUP_INVITED.code, ctx_r1.appConstant.PROJECT.GROUP_CHANGE_ROLE.code, ctx_r1.appConstant.PROJECT.GROUP_REMOVE.code).includes(item_r3.historyType));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", i0.ɵɵpureFunction4(63, _c6, ctx_r1.appConstant.PROJECT.LINK_CREATED.code, ctx_r1.appConstant.PROJECT.LINK_SHARED.code, ctx_r1.appConstant.PROJECT.LINK_UPDATE.code, ctx_r1.appConstant.PROJECT.LINK_DELETED.code).includes(item_r3.historyType));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", i0.ɵɵpureFunction1(68, _c0, ctx_r1.appConstant.PROJECT.USER_REVOKED.code).includes(item_r3.historyType));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", i0.ɵɵpureFunction3(70, _c2, ctx_r1.appConstant.PROJECT.USER_CREATE_COMMENT.code, ctx_r1.appConstant.PROJECT.USER_UPDATE_COMMENT.code, ctx_r1.appConstant.PROJECT.USER_DELETE_COMMENT.code).includes(item_r3.historyType));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", i0.ɵɵpureFunction3(74, _c2, ctx_r1.appConstant.PROJECT.USER_CREATE_COMMENT_FILE.code, ctx_r1.appConstant.PROJECT.USER_UPDATE_COMMENT_FILE.code, ctx_r1.appConstant.PROJECT.USER_DELETE_COMMENT_FILE.code).includes(item_r3.historyType));
} }
const _c7 = function () { return { "border-top": "1px solid" }; };
function ActivityDetailComponent_div_3_div_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 53);
    i0.ɵɵelementStart(1, "span", 54);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵstyleMap(i0.ɵɵpureFunction0(5, _c7));
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 3, "label.end_activities"));
} }
function ActivityDetailComponent_div_3_Template(rf, ctx) { if (rf & 1) {
    const _r151 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 2);
    i0.ɵɵlistener("scroll", function ActivityDetailComponent_div_3_Template_div_scroll_0_listener($event) { i0.ɵɵrestoreView(_r151); const ctx_r150 = i0.ɵɵnextContext(); return ctx_r150.onScroll($event); });
    i0.ɵɵelement(1, "p-scrollTop", 3);
    i0.ɵɵtemplate(2, ActivityDetailComponent_div_3_div_2_Template, 23, 78, "div", 4);
    i0.ɵɵtemplate(3, ActivityDetailComponent_div_3_div_3_Template, 4, 6, "div", 5);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngForOf", ctx_r0.activities);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r0.activities && ctx_r0.isEndList);
} }
class ActivityDetailComponent {
    constructor(historyService, datePipe, authService, translateService, router, projectService, messageService) {
        this.historyService = historyService;
        this.datePipe = datePipe;
        this.authService = authService;
        this.translateService = translateService;
        this.router = router;
        this.projectService = projectService;
        this.messageService = messageService;
        this.appUtil = app_util_1.default;
        this.appConstant = app_constants_1.default;
        this.activities = [];
        this.isEndList = false;
    }
    ngOnInit() {
        this.authUser = this.authService.getAuthUser;
        this.getProject();
        this.getActivities(false);
    }
    // Update late
    getActivities(isScroll) {
        if (this.isEndList) {
            return;
        }
        const params = {
            historyTypes: '100,200,201,202,203,204,205,206,207,208,209,210,211,300,301,302,303,304,500,501,502,503,504,505,506,507,700,701,702,703,704,705,900,901,902,1100,1101,1102,1103,1200,1201,1202,1203,1204,1205',
            lastUpdate: this.activities.length > 0
                ? this.activities[this.activities.length - 1].lastUpdate : '',
            pageSize: 40
        };
        this.historyService.getActivities(this.projectId, this.appUtil.toSnakeCaseKey(params)).subscribe(res => {
            if (res.data.content && res.data.content.length > 0) {
                this.activities = isScroll ? this.activities.concat(res.data.content) : res.data.content;
            }
            this.isEndList = (res.data.totalElements <= params.pageSize);
        }, error => {
            this.messageService.add({
                severity: 'error',
                detail: this.appUtil.translate(this.translateService, 'error.' + error.status)
            });
        });
    }
    getProject() {
        this.projectService.getProjectDetail(this.projectId).subscribe(res => {
            this.project = res.data;
        }, error => {
            // console.log(error);
        });
    }
    onScroll(e) {
        if (e.target.scrollTop !== 0) {
            if (e.target.scrollHeight <= (Math.round(e.target.scrollTop)) + e.target.offsetHeight) {
                this.getActivities(true);
            }
        }
    }
    onChangePosition(projectId, folderId, fileId) {
        // Set next folder
        let currentUrl = `/project/` + projectId;
        if (folderId) {
            currentUrl += `/${folderId}`;
        }
        this.router.routeReuseStrategy.shouldReuseRoute = () => false;
        this.router.onSameUrlNavigation = 'reload';
        // set fileId to highlight in project detail
        if (fileId) {
            this.router.navigate([currentUrl], { queryParams: { highlight: fileId } });
        }
        else {
            this.router.navigate([currentUrl]);
        }
    }
    // Get member name from list members
    getUserName(item) {
        if (item.userId === this.authUser.userId) {
            return this.appUtil.translate(this.translateService, 'label.you');
        }
        let name = item.userFirstName + ' ' + item.userLastName;
        if (this.authUser.lang === 'ja') {
            name = item.userLastName + ' ' + item.userFirstName;
        }
        if (!name) {
            return this.appUtil.translate(this.translateService, 'label.unknown');
        }
        return name.length > 25 ? name.substring(0, 25) + '...' : name;
    }
    getNameOrder(first, last) {
        let name = first + ' ' + last;
        if (this.authUser.lang !== 'en') {
            name = last + ' ' + first;
        }
        return name.length > 25 ? name.substring(0, 25) + '...' : name;
    }
    getName(firstName, lastName) {
        return (this.authUser.lang !== 'ja') ? firstName + ' ' + lastName : lastName + ' ' + firstName;
    }
    getParentURL(item) {
        if (typeof (item) !== 'object') {
            return;
        }
        let url = '#/project/';
        // check if parent is null or not
        if (item.data.parent === undefined || item.data.parent === null) {
            return url + item.projectId + '/0';
        }
        switch (item.data.parent.content_type) {
            case app_constants_1.default.MINE_TYPES.project.types[0]:
                url = url + item.projectId + '/0';
                break;
            case app_constants_1.default.MINE_TYPES.folder.types[0]:
                url = url + item.projectId + '/' + item.data.parent.id;
                break;
            default:
                return url + item.projectId + '/0';
        }
        // Highlight item
        // E.g: #/project/id/folder_id?highlight = item_id
        url = url + '?highlight=' + item.file_ids;
        return url;
    }
    goToLink(url) {
        if (url) {
            window.open(window.location.origin + window.location.pathname + '#/'
                + url.replace('%d', 0), '_blank');
        }
        return '';
    }
    getShareLinkURL(url) {
        if (url) {
            return window.location.origin + window.location.pathname + '#/' + url.replace('%d', 0);
        }
        return '';
    }
    // Get header content for each type
    getText(history) {
        let content;
        // Detail of history
        const result = history.data && history.data.result;
        const length = (result) ? result.length : 0;
        switch (history.historyType) {
            // project
            case app_constants_1.default.PROJECT.PROJECT_ADDED.code:
                content = app_util_1.default.translate(this.translateService, 'label.add_project');
                break;
            case app_constants_1.default.PROJECT.PROJECT_UPDATED.code:
                content = app_util_1.default.translate(this.translateService, 'label.update_project');
                break;
            case app_constants_1.default.PROJECT.PROJECT_COPY.code:
                content = app_util_1.default.translate(this.translateService, 'label.copy_project');
                break;
            case app_constants_1.default.PROJECT.TRANSFER_PROJECT.code:
                content = app_util_1.default.translate(this.translateService, 'label.transferred_project');
                break;
            // file
            case app_constants_1.default.PROJECT.FILE_ADDED.code:
                content = (length > 1)
                    ? app_util_1.default.translateWithParams(this.translateService, 'label.add_files', { count: length })
                    : app_util_1.default.translate(this.translateService, 'label.add_file');
                break;
            case app_constants_1.default.PROJECT.FILE_ENCODED.code:
                content = app_util_1.default.translate(this.translateService, 'label.encode_file');
                break;
            case app_constants_1.default.PROJECT.DELETE_LICENSE.code:
                content = app_util_1.default.translate(this.translateService, 'label.delete_license');
                break;
            case app_constants_1.default.PROJECT.LICENSE_UPDATED.code:
                content = app_util_1.default.translate(this.translateService, 'label.update_encode_file');
                break;
            case app_constants_1.default.PROJECT.FILE_UPDATE.code:
                content = app_util_1.default.translate(this.translateService, 'label.update_file');
                break;
            case app_constants_1.default.PROJECT.FILE_REMOVE.code:
                content = app_util_1.default.translate(this.translateService, 'label.delete_file');
                break;
            case app_constants_1.default.PROJECT.FILE_DELETE.code:
                content = app_util_1.default.translate(this.translateService, 'label.delete_file_forever');
                break;
            case app_constants_1.default.PROJECT.FILE_RESTORED.code:
                content = app_util_1.default.translate(this.translateService, 'label.restore_file');
                break;
            case app_constants_1.default.PROJECT.COPY_FILE.code:
                content = (length > 1)
                    ? app_util_1.default.translateWithParams(this.translateService, 'label.copy_files', { count: length })
                    : app_util_1.default.translate(this.translateService, 'label.copy_file');
                break;
            case app_constants_1.default.PROJECT.FILE_MOVE.code:
                content = (length > 1)
                    ? app_util_1.default.translateWithParams(this.translateService, 'label.move_files', { count: length })
                    : app_util_1.default.translate(this.translateService, 'label.move_file');
                break;
            case app_constants_1.default.PROJECT.ATTACH_LABEL.code:
                content = (length > 1)
                    ? content = app_util_1.default.translateWithParams(this.translateService, 'label.attach_labels', { count: length })
                    : app_util_1.default.translate(this.translateService, 'label.attach_label');
                break;
            case app_constants_1.default.PROJECT.DETACH_LABEL.code:
                content = (length > 1)
                    ? content = app_util_1.default.translateWithParams(this.translateService, 'label.detach_labels', { count: length })
                    : app_util_1.default.translate(this.translateService, 'label.detach_label');
                break;
            // folder
            case app_constants_1.default.PROJECT.FOLDER_CREATED.code:
                content = app_util_1.default.translate(this.translateService, 'label.add_folder');
                break;
            case app_constants_1.default.PROJECT.FOLDER_UPDATED.code:
                content = app_util_1.default.translate(this.translateService, 'label.update_folder');
                break;
            case app_constants_1.default.PROJECT.FOLDER_DELETED.code:
                content = (length > 1)
                    ? app_util_1.default.translateWithParams(this.translateService, 'label.delete_folders_forever', { count: length })
                    : app_util_1.default.translate(this.translateService, 'label.delete_folder_forever');
                break;
            case app_constants_1.default.PROJECT.FOLDER_MOVED.code:
                content = (length > 1)
                    ? app_util_1.default.translateWithParams(this.translateService, 'label.move_folders', { count: length })
                    : app_util_1.default.translate(this.translateService, 'label.move_folder');
                break;
            case app_constants_1.default.PROJECT.FOLDER_RESTORE.code:
                content = app_util_1.default.translate(this.translateService, 'label.restore_folder');
                break;
            case app_constants_1.default.PROJECT.FOLDER_REMOVE.code:
                content = (length > 1)
                    ? app_util_1.default.translateWithParams(this.translateService, 'label.delete_folders', { count: length })
                    : app_util_1.default.translate(this.translateService, 'label.delete_folder');
                break;
            case app_constants_1.default.PROJECT.FOLDER_COPY.code:
                content = (length > 1)
                    ? app_util_1.default.translateWithParams(this.translateService, 'label.copy_folders', { count: length })
                    : app_util_1.default.translate(this.translateService, 'label.copy_folder');
                break;
            case app_constants_1.default.PROJECT.FOLDER_UPDATED_SETTING.code:
                content = app_util_1.default.translate(this.translateService, 'label.update_folder_setting');
                break;
            // invite user Collaborator
            case app_constants_1.default.PROJECT.USER_INVITED.code:
                content = (length > 1)
                    ? app_util_1.default.translateWithParams(this.translateService, 'label.invite_users', { count: length })
                    : app_util_1.default.translate(this.translateService, 'label.invite_user');
                break;
            case app_constants_1.default.PROJECT.USER_REMOVE.code:
                content = app_util_1.default.translate(this.translateService, 'label.remove_user');
                break;
            case app_constants_1.default.PROJECT.USER_CHANGE_ROLE.code:
                content = app_util_1.default.translate(this.translateService, 'label.update_role_user');
                break;
            // invite group Collaborator
            case app_constants_1.default.PROJECT.GROUP_INVITED.code:
                content = (length > 1)
                    ? app_util_1.default.translateWithParams(this.translateService, 'label.invite_groups', { count: length })
                    : app_util_1.default.translate(this.translateService, 'label.invite_group');
                break;
            case app_constants_1.default.PROJECT.GROUP_CHANGE_ROLE.code:
                content = app_util_1.default.translate(this.translateService, 'label.update_role_group');
                break;
            case app_constants_1.default.PROJECT.GROUP_REMOVE.code:
                content = app_util_1.default.translate(this.translateService, 'label.remove_group');
                break;
            // link
            case app_constants_1.default.PROJECT.LINK_CREATED.code:
                content = app_util_1.default.translate(this.translateService, 'label.created_link');
                break;
            case app_constants_1.default.PROJECT.LINK_SHARED.code:
                content = (length > 1)
                    ? app_util_1.default.translateWithParams(this.translateService, 'label.share_links', { count: length })
                    : app_util_1.default.translate(this.translateService, 'label.share_link_email');
                break;
            case app_constants_1.default.PROJECT.LINK_DELETED.code:
                content = app_util_1.default.translate(this.translateService, 'label.deleted_link');
                break;
            case app_constants_1.default.PROJECT.LINK_UPDATE.code:
                content = app_util_1.default.translate(this.translateService, 'label.updated_link');
                break;
            // comment project
            case app_constants_1.default.PROJECT.USER_CREATE_COMMENT.code:
                content = app_util_1.default.translate(this.translateService, 'label.add_comment');
                break;
            case app_constants_1.default.PROJECT.USER_UPDATE_COMMENT.code:
                content = app_util_1.default.translate(this.translateService, 'label.update_comment');
                break;
            case app_constants_1.default.PROJECT.USER_DELETE_COMMENT.code:
                content = app_util_1.default.translate(this.translateService, 'label.delete_comment');
                break;
            // comment file
            case app_constants_1.default.PROJECT.USER_CREATE_COMMENT_FILE.code:
                content = app_util_1.default.translate(this.translateService, 'label.add_comment_file');
                break;
            case app_constants_1.default.PROJECT.USER_UPDATE_COMMENT_FILE.code:
                content = app_util_1.default.translate(this.translateService, 'label.update_comment_file');
                break;
            case app_constants_1.default.PROJECT.USER_DELETE_COMMENT_FILE.code:
                content = app_util_1.default.translate(this.translateService, 'label.delete_comment_file');
                break;
            // label
            case app_constants_1.default.PROJECT.CREATE_LABEL.code:
                content = app_util_1.default.translate(this.translateService, 'label.created_label');
                break;
            case app_constants_1.default.PROJECT.UPDATE_LABEL.code:
                content = app_util_1.default.translate(this.translateService, 'label.updated_label');
                break;
            case app_constants_1.default.PROJECT.DELETE_LABEL.code:
                content = app_util_1.default.translate(this.translateService, 'label.deleted_label');
                break;
            case app_constants_1.default.PROJECT.USER_REVOKED.code:
                content = app_util_1.default.translate(this.translateService, 'label.revoke_user');
                break;
            default:
                break;
        }
        return content;
    }
}
exports.ActivityDetailComponent = ActivityDetailComponent;
ActivityDetailComponent.ɵfac = function ActivityDetailComponent_Factory(t) { return new (t || ActivityDetailComponent)(i0.ɵɵdirectiveInject(i1.HistoryService), i0.ɵɵdirectiveInject(i2.DatePipe), i0.ɵɵdirectiveInject(i3.AuthService), i0.ɵɵdirectiveInject(i4.TranslateService), i0.ɵɵdirectiveInject(i5.Router), i0.ɵɵdirectiveInject(i6.ProjectService), i0.ɵɵdirectiveInject(i7.MessageService)); };
ActivityDetailComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ActivityDetailComponent, selectors: [["app-activity-detail"]], inputs: { projectId: "projectId" }, decls: 4, vars: 6, consts: [[1, "page-title-lv2", 3, "translate"], ["class", "scroll-custom", 3, "scroll", 4, "ngIf"], [1, "scroll-custom", 3, "scroll"], ["target", "parent", "styleClass", "custom-scroll-top"], ["class", "p-px-2 p-pt-2 p-pb-3", 3, "style", 4, "ngFor", "ngForOf"], ["class", "p-pt-2 p-text-center", 3, "style", 4, "ngIf"], [1, "p-px-2", "p-pt-2", "p-pb-3"], [1, "p-d-flex", "p-flex-column"], [1, "p-text-bold"], [1, "p-pt-1", "datetime-custom", "p-text-italic", "p-text-secondary"], [1, "p-mt-2", "p-mb-1"], [4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "p-d-flex"], [1, "fas", "fa-folder", "p-pr-1"], [1, "p-text-truncate", 3, "title"], ["class", "p-d-flex", 4, "ngIf"], [1, "p-text-truncate"], [1, "p-grid", "p-jc-between", "p-ai-center"], [1, "p-col", "p-py-0", "p-pr-0", "p-d-flex", 2, "width", "78%"], [1, "fas", "fa-user", "p-pr-1"], [1, "p-col", "p-jc-end", "p-d-flex", "p-py-0", "p-pl-0"], [1, "p-badge", 3, "translate"], [1, "p-grid", "p-jc-between", "p-ai-center", "p-mt-2"], [1, "p-badge", "p-badge-secondary", 3, "translate"], [1, "list-200"], [1, "p-d-flex", "p-pt-2"], ["class", "p-text-truncate", 3, "title", 4, "ngIf"], ["class", "p-pl-3 p-pt-2", 4, "ngFor", "ngForOf"], [3, "rounded", "value", "title", "styleClass"], [1, "p-text-truncate", 3, "title", "click"], [1, "p-pl-3", "p-pt-2"], [3, "contentType"], [1, "p-tag", "p-tag-rounded", "p-tag-custom", "p-max-width-100", "p-mr-1", "p-mb-1"], [1, "p-tag-value", 3, "ngClass"], [3, "isFolder", "contentType"], ["class", "p-text-truncate", 4, "ngIf"], [3, "title", "click"], [1, "p-d-flex", "p-pb-2"], [1, "p-pr-1", "fas", "fa-user"], [1, "p-text-right"], [3, "newRoleType", "roleType"], [1, "p-pr-1", "fas", "fa-users"], ["class", "list-200", 4, "ngIf"], ["class", "p-mt-3", 4, "ngIf"], ["class", "list-200 p-mt-3", 4, "ngIf"], [1, "p-d-flex", "p-mb-2"], [1, "p-mt-3"], [1, "fas", "fa-link", "p-pr-1"], [1, "link-style", 3, "click"], [1, "list-200", "p-mt-3"], [1, "far", "fa-paper-plane", "p-pr-1"], ["class", "list-200 p-mt-3", 4, "ngFor", "ngForOf"], [1, "p-pt-2", "p-text-center"], [1, "p-text-secondary", "p-text-bold", "p-text-italic"]], template: function ActivityDetailComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelement(0, "div", 0);
        i0.ɵɵpipe(1, "titlecase");
        i0.ɵɵpipe(2, "translate");
        i0.ɵɵtemplate(3, ActivityDetailComponent_div_3_Template, 4, 2, "div", 1);
    } if (rf & 2) {
        i0.ɵɵproperty("translate", i0.ɵɵpipeBind1(1, 2, i0.ɵɵpipeBind1(2, 4, "label.activities")));
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("ngIf", ctx.activities && ctx.activities.length > 0);
    } }, directives: [i4.TranslateDirective, i2.NgIf, i8.ScrollTop, i2.NgForOf, i9.Tag, i10.ActivityContentTypeComponent, i2.NgClass, i11.ActivityProjectRoleComponent], pipes: [i2.TitleCasePipe, i4.TranslatePipe], styles: [".scroll-custom[_ngcontent-%COMP%] {\n  height: 87vh;\n  overflow: auto;\n}\n\na[_ngcontent-%COMP%] {\n  color: var(--bluegray-600);\n  text-decoration: none;\n  cursor: pointer;\n}\n\n.datetime-custom[_ngcontent-%COMP%] {\n  font-size: 0.8rem;\n}\n\n.word-wrap[_ngcontent-%COMP%] {\n  word-wrap: break-word;\n  \n  white-space: -moz-pre-wrap;\n  \n  white-space: pre-wrap;\n  \n}\n\n.list-200[_ngcontent-%COMP%] {\n  max-height: 200px;\n  overflow-x: auto;\n}\n\n[_nghost-%COMP%]  .custom-scroll-top {\n  position: absolute;\n  background-color: var(--blue-800);\n}\n\n[_nghost-%COMP%]  .custom-scroll-top:hover {\n  background-color: var(--blue-600);\n}\n\n[_nghost-%COMP%]  .text-dark {\n  color: #000000 !important;\n}\n\n[_nghost-%COMP%]  .p-max-width-100 {\n  max-width: 100%;\n}\n\n[_nghost-%COMP%]  .p-tag-custom .p-tag-value {\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n\n[_nghost-%COMP%]  .link-style {\n  white-space: nowrap;\n  overflow: auto;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvYWN0aXZpdHkvYWN0aXZpdHktZGV0YWlsL2FjdGl2aXR5LWRldGFpbC5jb21wb25lbnQuc2NzcyIsInNyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvYWN0aXZpdHkvYWN0aXZpdHktZGV0YWlsL2FjdGl2aXR5LWRldGFpbC5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLFlBQUE7RUFDQSxjQUFBO0FDQ0Y7O0FERUE7RUFDRSwwQkFBQTtFQUNBLHFCQUFBO0VBQ0EsZUFBQTtBQ0NGOztBREVBO0VBQ0UsaUJBQUE7QUNDRjs7QURFQTtFQUNFLHFCQUFBO0VBQXVCLGFBQUE7RUFDdkIsMEJBQUE7RUFBNEIsb0JBQUE7RUFDNUIscUJBQUE7RUFBdUIscUJBQUE7QUNJekI7O0FEREE7RUFDRSxpQkFBQTtFQUNBLGdCQUFBO0FDSUY7O0FEQUU7RUFDRSxrQkFBQTtFQUNBLGlDQUFBO0FDR0o7O0FEREk7RUFDRSxpQ0FBQTtBQ0dOOztBRENFO0VBQ0UseUJBQUE7QUNDSjs7QURFRTtFQUNFLGVBQUE7QUNBSjs7QURHRTtFQUNFLGdCQUFBO0VBQ0EsdUJBQUE7RUFDQSxtQkFBQTtBQ0RKOztBRElFO0VBQ0UsbUJBQUE7RUFDQSxjQUFBO0FDRkoiLCJmaWxlIjoic3JjL2FwcC9hdXRoZW50aWNhdGlvbi1wYWdlcy9hY3Rpdml0eS9hY3Rpdml0eS1kZXRhaWwvYWN0aXZpdHktZGV0YWlsLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLnNjcm9sbC1jdXN0b20ge1xuICBoZWlnaHQ6IDg3dmg7XG4gIG92ZXJmbG93OiBhdXRvO1xufVxuXG5hIHtcbiAgY29sb3I6IHZhcigtLWJsdWVncmF5LTYwMCk7XG4gIHRleHQtZGVjb3JhdGlvbjogbm9uZTtcbiAgY3Vyc29yOiBwb2ludGVyO1xufVxuXG4uZGF0ZXRpbWUtY3VzdG9tIHtcbiAgZm9udC1zaXplOiAwLjhyZW07XG59XG5cbi53b3JkLXdyYXAge1xuICB3b3JkLXdyYXA6IGJyZWFrLXdvcmQ7IC8qIElFIDUuNS03ICovXG4gIHdoaXRlLXNwYWNlOiAtbW96LXByZS13cmFwOyAvKiBGaXJlZm94IDEuMC0yLjAgKi9cbiAgd2hpdGUtc3BhY2U6IHByZS13cmFwOyAvKiBjdXJyZW50IGJyb3dzZXJzICovXG59XG5cbi5saXN0LTIwMCB7XG4gIG1heC1oZWlnaHQ6IDIwMHB4O1xuICBvdmVyZmxvdy14OiBhdXRvXG59XG5cbjpob3N0KDo6bmctZGVlcCkge1xuICAuY3VzdG9tLXNjcm9sbC10b3Age1xuICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgICBiYWNrZ3JvdW5kLWNvbG9yOiB2YXIoLS1ibHVlLTgwMCk7XG5cbiAgICAmOmhvdmVyIHtcbiAgICAgIGJhY2tncm91bmQtY29sb3I6IHZhcigtLWJsdWUtNjAwKTtcbiAgICB9XG4gIH1cblxuICAudGV4dC1kYXJrIHtcbiAgICBjb2xvcjogIzAwMDAwMCAhaW1wb3J0YW50O1xuICB9XG5cbiAgLnAtbWF4LXdpZHRoLTEwMCB7XG4gICAgbWF4LXdpZHRoOiAxMDAlO1xuICB9XG5cbiAgLnAtdGFnLWN1c3RvbSAucC10YWctdmFsdWUge1xuICAgIG92ZXJmbG93OiBoaWRkZW47XG4gICAgdGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7XG4gICAgd2hpdGUtc3BhY2U6IG5vd3JhcDtcbiAgfVxuXG4gIC5saW5rLXN0eWxlIHtcbiAgICB3aGl0ZS1zcGFjZTogbm93cmFwO1xuICAgIG92ZXJmbG93OiBhdXRvO1xuICB9XG59XG4iLCIuc2Nyb2xsLWN1c3RvbSB7XG4gIGhlaWdodDogODd2aDtcbiAgb3ZlcmZsb3c6IGF1dG87XG59XG5cbmEge1xuICBjb2xvcjogdmFyKC0tYmx1ZWdyYXktNjAwKTtcbiAgdGV4dC1kZWNvcmF0aW9uOiBub25lO1xuICBjdXJzb3I6IHBvaW50ZXI7XG59XG5cbi5kYXRldGltZS1jdXN0b20ge1xuICBmb250LXNpemU6IDAuOHJlbTtcbn1cblxuLndvcmQtd3JhcCB7XG4gIHdvcmQtd3JhcDogYnJlYWstd29yZDtcbiAgLyogSUUgNS41LTcgKi9cbiAgd2hpdGUtc3BhY2U6IC1tb3otcHJlLXdyYXA7XG4gIC8qIEZpcmVmb3ggMS4wLTIuMCAqL1xuICB3aGl0ZS1zcGFjZTogcHJlLXdyYXA7XG4gIC8qIGN1cnJlbnQgYnJvd3NlcnMgKi9cbn1cblxuLmxpc3QtMjAwIHtcbiAgbWF4LWhlaWdodDogMjAwcHg7XG4gIG92ZXJmbG93LXg6IGF1dG87XG59XG5cbjpob3N0KDo6bmctZGVlcCkgLmN1c3RvbS1zY3JvbGwtdG9wIHtcbiAgcG9zaXRpb246IGFic29sdXRlO1xuICBiYWNrZ3JvdW5kLWNvbG9yOiB2YXIoLS1ibHVlLTgwMCk7XG59XG46aG9zdCg6Om5nLWRlZXApIC5jdXN0b20tc2Nyb2xsLXRvcDpob3ZlciB7XG4gIGJhY2tncm91bmQtY29sb3I6IHZhcigtLWJsdWUtNjAwKTtcbn1cbjpob3N0KDo6bmctZGVlcCkgLnRleHQtZGFyayB7XG4gIGNvbG9yOiAjMDAwMDAwICFpbXBvcnRhbnQ7XG59XG46aG9zdCg6Om5nLWRlZXApIC5wLW1heC13aWR0aC0xMDAge1xuICBtYXgtd2lkdGg6IDEwMCU7XG59XG46aG9zdCg6Om5nLWRlZXApIC5wLXRhZy1jdXN0b20gLnAtdGFnLXZhbHVlIHtcbiAgb3ZlcmZsb3c6IGhpZGRlbjtcbiAgdGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7XG4gIHdoaXRlLXNwYWNlOiBub3dyYXA7XG59XG46aG9zdCg6Om5nLWRlZXApIC5saW5rLXN0eWxlIHtcbiAgd2hpdGUtc3BhY2U6IG5vd3JhcDtcbiAgb3ZlcmZsb3c6IGF1dG87XG59Il19 */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ActivityDetailComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-activity-detail',
                templateUrl: './activity-detail.component.html',
                styleUrls: ['./activity-detail.component.scss']
            }]
    }], function () { return [{ type: i1.HistoryService }, { type: i2.DatePipe }, { type: i3.AuthService }, { type: i4.TranslateService }, { type: i5.Router }, { type: i6.ProjectService }, { type: i7.MessageService }]; }, { projectId: [{
            type: core_1.Input
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/activity/activity-detail/activity-project-role/activity-project-role.component.ts":
/*!************************************************************************************************************************!*\
  !*** ./src/app/authentication-pages/activity/activity-detail/activity-project-role/activity-project-role.component.ts ***!
  \************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ActivityProjectRoleComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
function ActivityProjectRoleComponent_span_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "span", 3);
    i0.ɵɵpipe(1, "translate");
} if (rf & 2) {
    i0.ɵɵproperty("translate", i0.ɵɵpipeBind1(1, 1, "label.project_role.owner"));
} }
function ActivityProjectRoleComponent_span_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "span", 3);
    i0.ɵɵpipe(1, "translate");
} if (rf & 2) {
    i0.ɵɵproperty("translate", i0.ɵɵpipeBind1(1, 1, "label.project_role.editor"));
} }
function ActivityProjectRoleComponent_span_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "span", 3);
    i0.ɵɵpipe(1, "translate");
} if (rf & 2) {
    i0.ɵɵproperty("translate", i0.ɵɵpipeBind1(1, 1, "label.project_role.viewer"));
} }
function ActivityProjectRoleComponent_span_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "span", 3);
    i0.ɵɵpipe(1, "translate");
} if (rf & 2) {
    i0.ɵɵproperty("translate", i0.ɵɵpipeBind1(1, 1, "label.project_role.previewer"));
} }
function ActivityProjectRoleComponent_span_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "span", 3);
    i0.ɵɵpipe(1, "translate");
} if (rf & 2) {
    i0.ɵɵproperty("translate", i0.ɵɵpipeBind1(1, 1, "label.project_role.viewer_uploader"));
} }
function ActivityProjectRoleComponent_span_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "span", 3);
    i0.ɵɵpipe(1, "translate");
} if (rf & 2) {
    i0.ɵɵproperty("translate", i0.ɵɵpipeBind1(1, 1, "label.project_role.previewer_uploader"));
} }
function ActivityProjectRoleComponent_span_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "span", 3);
    i0.ɵɵpipe(1, "translate");
} if (rf & 2) {
    i0.ɵɵproperty("translate", i0.ɵɵpipeBind1(1, 1, "label.project_role.uploader"));
} }
function ActivityProjectRoleComponent_span_8_span_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "span", 3);
    i0.ɵɵpipe(1, "translate");
} if (rf & 2) {
    i0.ɵɵproperty("translate", i0.ɵɵpipeBind1(1, 1, "label.project_role.owner"));
} }
function ActivityProjectRoleComponent_span_8_span_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "span", 3);
    i0.ɵɵpipe(1, "translate");
} if (rf & 2) {
    i0.ɵɵproperty("translate", i0.ɵɵpipeBind1(1, 1, "label.project_role.editor"));
} }
function ActivityProjectRoleComponent_span_8_span_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "span", 3);
    i0.ɵɵpipe(1, "translate");
} if (rf & 2) {
    i0.ɵɵproperty("translate", i0.ɵɵpipeBind1(1, 1, "label.project_role.viewer"));
} }
function ActivityProjectRoleComponent_span_8_span_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "span", 3);
    i0.ɵɵpipe(1, "translate");
} if (rf & 2) {
    i0.ɵɵproperty("translate", i0.ɵɵpipeBind1(1, 1, "label.project_role.previewer"));
} }
function ActivityProjectRoleComponent_span_8_span_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "span", 3);
    i0.ɵɵpipe(1, "translate");
} if (rf & 2) {
    i0.ɵɵproperty("translate", i0.ɵɵpipeBind1(1, 1, "label.project_role.viewer_uploader"));
} }
function ActivityProjectRoleComponent_span_8_span_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "span", 3);
    i0.ɵɵpipe(1, "translate");
} if (rf & 2) {
    i0.ɵɵproperty("translate", i0.ɵɵpipeBind1(1, 1, "label.project_role.previewer_uploader"));
} }
function ActivityProjectRoleComponent_span_8_span_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "span", 3);
    i0.ɵɵpipe(1, "translate");
} if (rf & 2) {
    i0.ɵɵproperty("translate", i0.ɵɵpipeBind1(1, 1, "label.project_role.uploader"));
} }
function ActivityProjectRoleComponent_span_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 0);
    i0.ɵɵtemplate(1, ActivityProjectRoleComponent_span_8_span_1_Template, 2, 3, "span", 1);
    i0.ɵɵtemplate(2, ActivityProjectRoleComponent_span_8_span_2_Template, 2, 3, "span", 1);
    i0.ɵɵtemplate(3, ActivityProjectRoleComponent_span_8_span_3_Template, 2, 3, "span", 1);
    i0.ɵɵtemplate(4, ActivityProjectRoleComponent_span_8_span_4_Template, 2, 3, "span", 1);
    i0.ɵɵtemplate(5, ActivityProjectRoleComponent_span_8_span_5_Template, 2, 3, "span", 1);
    i0.ɵɵtemplate(6, ActivityProjectRoleComponent_span_8_span_6_Template, 2, 3, "span", 1);
    i0.ɵɵtemplate(7, ActivityProjectRoleComponent_span_8_span_7_Template, 2, 3, "span", 1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r7 = i0.ɵɵnextContext();
    i0.ɵɵclassProp("p-ml-1", ctx_r7.newRoleType);
    i0.ɵɵproperty("ngSwitch", ctx_r7.newRoleType);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 1);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 3);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 4);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 5);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 6);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 7);
} }
class ActivityProjectRoleComponent {
    constructor() {
        this.appConstant = app_constants_1.default;
    }
    ngOnInit() {
    }
}
exports.ActivityProjectRoleComponent = ActivityProjectRoleComponent;
ActivityProjectRoleComponent.ɵfac = function ActivityProjectRoleComponent_Factory(t) { return new (t || ActivityProjectRoleComponent)(); };
ActivityProjectRoleComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ActivityProjectRoleComponent, selectors: [["app-activity-project-role"]], inputs: { roleType: "roleType", newRoleType: "newRoleType" }, decls: 9, vars: 13, consts: [[1, "p-badge", 3, "ngSwitch"], [3, "translate", 4, "ngSwitchCase"], ["class", "p-badge", 3, "ngSwitch", "p-ml-1", 4, "ngIf"], [3, "translate"]], template: function ActivityProjectRoleComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "span", 0);
        i0.ɵɵtemplate(1, ActivityProjectRoleComponent_span_1_Template, 2, 3, "span", 1);
        i0.ɵɵtemplate(2, ActivityProjectRoleComponent_span_2_Template, 2, 3, "span", 1);
        i0.ɵɵtemplate(3, ActivityProjectRoleComponent_span_3_Template, 2, 3, "span", 1);
        i0.ɵɵtemplate(4, ActivityProjectRoleComponent_span_4_Template, 2, 3, "span", 1);
        i0.ɵɵtemplate(5, ActivityProjectRoleComponent_span_5_Template, 2, 3, "span", 1);
        i0.ɵɵtemplate(6, ActivityProjectRoleComponent_span_6_Template, 2, 3, "span", 1);
        i0.ɵɵtemplate(7, ActivityProjectRoleComponent_span_7_Template, 2, 3, "span", 1);
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(8, ActivityProjectRoleComponent_span_8_Template, 8, 10, "span", 2);
    } if (rf & 2) {
        i0.ɵɵclassProp("through-line", ctx.newRoleType)("p-badge-danger", ctx.newRoleType);
        i0.ɵɵproperty("ngSwitch", ctx.roleType);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngSwitchCase", 1);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngSwitchCase", 2);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngSwitchCase", 3);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngSwitchCase", 4);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngSwitchCase", 5);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngSwitchCase", 6);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngSwitchCase", 7);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.newRoleType);
    } }, directives: [i1.NgSwitch, i1.NgSwitchCase, i1.NgIf, i2.TranslateDirective], pipes: [i2.TranslatePipe], styles: [".through-line[_ngcontent-%COMP%] {\n  text-decoration: line-through;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvYWN0aXZpdHkvYWN0aXZpdHktZGV0YWlsL2FjdGl2aXR5LXByb2plY3Qtcm9sZS9hY3Rpdml0eS1wcm9qZWN0LXJvbGUuY29tcG9uZW50LnNjc3MiLCJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2FjdGl2aXR5L2FjdGl2aXR5LWRldGFpbC9hY3Rpdml0eS1wcm9qZWN0LXJvbGUvYWN0aXZpdHktcHJvamVjdC1yb2xlLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsNkJBQUE7QUNDRiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2FjdGl2aXR5L2FjdGl2aXR5LWRldGFpbC9hY3Rpdml0eS1wcm9qZWN0LXJvbGUvYWN0aXZpdHktcHJvamVjdC1yb2xlLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLnRocm91Z2gtbGluZSB7XG4gIHRleHQtZGVjb3JhdGlvbjogbGluZS10aHJvdWdoO1xufVxuIiwiLnRocm91Z2gtbGluZSB7XG4gIHRleHQtZGVjb3JhdGlvbjogbGluZS10aHJvdWdoO1xufSJdfQ== */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ActivityProjectRoleComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-activity-project-role',
                templateUrl: './activity-project-role.component.html',
                styleUrls: ['./activity-project-role.component.scss']
            }]
    }], function () { return []; }, { roleType: [{
            type: core_1.Input
        }], newRoleType: [{
            type: core_1.Input
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/activity/activity.component.ts":
/*!*********************************************************************!*\
  !*** ./src/app/authentication-pages/activity/activity.component.ts ***!
  \*********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ActivityComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
class ActivityComponent {
    constructor() {
    }
    ngOnInit() {
    }
}
exports.ActivityComponent = ActivityComponent;
ActivityComponent.ɵfac = function ActivityComponent_Factory(t) { return new (t || ActivityComponent)(); };
ActivityComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ActivityComponent, selectors: [["app-activity"]], decls: 1, vars: 0, template: function ActivityComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelement(0, "router-outlet");
    } }, directives: [i1.RouterOutlet], styles: ["[_nghost-%COMP%]     .p-sidebar {\n  padding: 0;\n}\n[_nghost-%COMP%]     .p-sidebar-right.p-sidebar-active {\n  overflow: hidden !important;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvYWN0aXZpdHkvYWN0aXZpdHkuY29tcG9uZW50LnNjc3MiLCJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2FjdGl2aXR5L2FjdGl2aXR5LmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNFO0VBQ0UsVUFBQTtBQ0FKO0FER0U7RUFDRSwyQkFBQTtBQ0RKIiwiZmlsZSI6InNyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvYWN0aXZpdHkvYWN0aXZpdHkuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyI6aG9zdCA6Om5nLWRlZXAge1xuICAucC1zaWRlYmFyIHtcbiAgICBwYWRkaW5nOiAwO1xuICB9XG5cbiAgLnAtc2lkZWJhci1yaWdodC5wLXNpZGViYXItYWN0aXZlIHtcbiAgICBvdmVyZmxvdzogaGlkZGVuICFpbXBvcnRhbnQ7XG4gIH1cbn1cbiIsIjpob3N0IDo6bmctZGVlcCAucC1zaWRlYmFyIHtcbiAgcGFkZGluZzogMDtcbn1cbjpob3N0IDo6bmctZGVlcCAucC1zaWRlYmFyLXJpZ2h0LnAtc2lkZWJhci1hY3RpdmUge1xuICBvdmVyZmxvdzogaGlkZGVuICFpbXBvcnRhbnQ7XG59Il19 */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ActivityComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-activity',
                templateUrl: './activity.component.html',
                styleUrls: ['./activity.component.scss']
            }]
    }], function () { return []; }, null); })();


/***/ }),

/***/ "./src/app/authentication-pages/addressbook/address-group-select/address-group-select.component.ts":
/*!*********************************************************************************************************!*\
  !*** ./src/app/authentication-pages/addressbook/address-group-select/address-group-select.component.ts ***!
  \*********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.AddressGroupSelectComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/addressbook-group.service */ "./src/app/services/addressbook-group.service.ts"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! primeng/table */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-table.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
function AddressGroupSelectComponent_ng_template_1_Template(rf, ctx) { if (rf & 1) {
    const _r5 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 5);
    i0.ɵɵelementStart(1, "span", 6);
    i0.ɵɵelement(2, "i", 7);
    i0.ɵɵelementStart(3, "input", 8);
    i0.ɵɵlistener("keyup", function AddressGroupSelectComponent_ng_template_1_Template_input_keyup_3_listener() { i0.ɵɵrestoreView(_r5); const ctx_r4 = i0.ɵɵnextContext(); return ctx_r4.loadGroupsModalEvent(null, true); })("ngModelChange", function AddressGroupSelectComponent_ng_template_1_Template_input_ngModelChange_3_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r6 = i0.ɵɵnextContext(); return ctx_r6.paramsGroupModal.searchKey = $event; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "label", 9);
    i0.ɵɵtext(5);
    i0.ɵɵpipe(6, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("autocomplete", "off")("ngModel", ctx_r0.paramsGroupModal.searchKey);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 3, "label.search"));
} }
function AddressGroupSelectComponent_ng_template_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "th", 10);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelement(4, "p-sortIcon", 11);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "th", 12);
    i0.ɵɵtext(6);
    i0.ɵɵpipe(7, "translate");
    i0.ɵɵelement(8, "p-sortIcon", 13);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "label.name"), " ");
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(7, 4, "label.no_address_book"), " ");
} }
function AddressGroupSelectComponent_ng_template_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr", 14);
    i0.ɵɵelementStart(1, "td", 15);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "td", 16);
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const group_r7 = ctx.$implicit;
    const rowIndex_r8 = ctx.rowIndex;
    i0.ɵɵproperty("pSelectableRow", group_r7)("pSelectableRowIndex", rowIndex_r8);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(group_r7.name);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(group_r7.numberAddress);
} }
function AddressGroupSelectComponent_ng_template_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "td", 17);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 1, "label.no_record"), "");
} }
class AddressGroupSelectComponent {
    constructor(authService, addressGroupService) {
        this.authService = authService;
        this.addressGroupService = addressGroupService;
        this.displayModalGroup = false;
        this.appUtil = app_util_1.default;
        this.constant = app_constants_1.default;
        this.rowOptions = this.constant.DATA_VIEW.ROW_PER_PAGE_OPTIONS;
        this.selectedGroupsInModal = [];
        this.loadingModalGroup = true;
        this.first = 0;
        this.rows = 5;
        this.paramsGroupModal = {
            teamId: '',
            searchKey: '',
            sortField: 'numberAddress',
            ascSort: false,
            pageNumber: 1,
            pageSize: 5,
        };
    }
    ngOnInit() {
        this.authUser = this.authService.getAuthUser;
        this.paramsGroupModal.teamId = this.authUser.teamId;
    }
    loadGroupsModalEvent(event, isSearch) {
        if (event) {
            this.paramsGroupModal.sortField = (event.sortField) ? event.sortField : 'numberAddress';
            this.paramsGroupModal.ascSort = (event.sortOrder === 1);
            if (event.rows) {
                this.paramsGroupModal.pageNumber = (event.first / event.rows) + 1;
                this.paramsGroupModal.pageSize = event.rows;
            }
        }
        if (isSearch) {
            this.paramsGroupModal.pageNumber = 1;
            this.first = 0;
        }
        this.loadingModalGroup = true;
        if (this.pendingRequest) {
            this.pendingRequest.unsubscribe();
        }
        this.pendingRequest = this.addressGroupService.getAddressBookGroupList(this.appUtil.toSnakeCaseKey(this.paramsGroupModal))
            .subscribe(response => {
            if (response.status === 200) {
                this.groups = response.data.content;
                this.totalRecords = response.data.totalElements;
            }
            this.loadingModalGroup = false;
        }, () => {
        });
    }
}
exports.AddressGroupSelectComponent = AddressGroupSelectComponent;
AddressGroupSelectComponent.ɵfac = function AddressGroupSelectComponent_Factory(t) { return new (t || AddressGroupSelectComponent)(i0.ɵɵdirectiveInject(i1.AuthService), i0.ɵɵdirectiveInject(i2.AddressbookGroupService)); };
AddressGroupSelectComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AddressGroupSelectComponent, selectors: [["app-address-group-select"]], decls: 5, vars: 12, consts: [["dataKey", "groupAddressId", "selectionMode", "multiple", "styleClass", "p-datatable-striped", 3, "rowHover", "paginator", "lazy", "loading", "sortField", "sortOrder", "value", "totalRecords", "first", "rows", "selection", "metaKeySelection", "onLazyLoad", "firstChange", "selectionChange"], ["pTemplate", "caption"], ["pTemplate", "header"], ["pTemplate", "body"], ["pTemplate", "emptymessage"], [1, "p-d-flex", "p-ai-center", "p-jc-between"], [1, "p-float-label", "p-input-icon-left"], [1, "pi", "pi-search"], ["id", "search", "pInputText", "", "type", "text", 3, "autocomplete", "ngModel", "keyup", "ngModelChange"], ["for", "search"], ["pSortableColumn", "groupName"], ["field", "groupName"], ["pSortableColumn", "numberAddress", 1, "p-text-center", 2, "width", "40%"], ["field", "numberAddress"], [3, "pSelectableRow", "pSelectableRowIndex"], [1, "p-text-truncate"], [1, "p-text-13", "p-text-center"], ["colspan", "3", 1, "p-text-center"]], template: function AddressGroupSelectComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "p-table", 0);
        i0.ɵɵlistener("onLazyLoad", function AddressGroupSelectComponent_Template_p_table_onLazyLoad_0_listener($event) { return ctx.loadGroupsModalEvent($event); })("firstChange", function AddressGroupSelectComponent_Template_p_table_firstChange_0_listener($event) { return ctx.first = $event; })("selectionChange", function AddressGroupSelectComponent_Template_p_table_selectionChange_0_listener($event) { return ctx.selectedGroupsInModal = $event; });
        i0.ɵɵtemplate(1, AddressGroupSelectComponent_ng_template_1_Template, 7, 5, "ng-template", 1);
        i0.ɵɵtemplate(2, AddressGroupSelectComponent_ng_template_2_Template, 9, 6, "ng-template", 2);
        i0.ɵɵtemplate(3, AddressGroupSelectComponent_ng_template_3_Template, 5, 4, "ng-template", 3);
        i0.ɵɵtemplate(4, AddressGroupSelectComponent_ng_template_4_Template, 4, 3, "ng-template", 4);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵproperty("rowHover", true)("paginator", ctx.totalRecords > 0)("lazy", true)("loading", ctx.loadingModalGroup)("sortField", "numberAddress")("sortOrder", -1)("value", ctx.groups)("totalRecords", ctx.totalRecords)("first", ctx.first)("rows", ctx.rows)("selection", ctx.selectedGroupsInModal)("metaKeySelection", true);
    } }, directives: [i3.Table, i4.PrimeTemplate, i5.DefaultValueAccessor, i6.InputText, i5.NgControlStatus, i5.NgModel, i3.SortableColumn, i3.SortIcon, i3.SelectableRow], pipes: [i7.TranslatePipe], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2FkZHJlc3Nib29rL2FkZHJlc3MtZ3JvdXAtc2VsZWN0L2FkZHJlc3MtZ3JvdXAtc2VsZWN0LmNvbXBvbmVudC5zY3NzIn0= */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AddressGroupSelectComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-address-group-select',
                templateUrl: './address-group-select.component.html',
                styleUrls: ['./address-group-select.component.scss']
            }]
    }], function () { return [{ type: i1.AuthService }, { type: i2.AddressbookGroupService }]; }, null); })();


/***/ }),

/***/ "./src/app/authentication-pages/addressbook/addressbook-form/addressbook-form.component.ts":
/*!*************************************************************************************************!*\
  !*** ./src/app/authentication-pages/addressbook/addressbook-form/addressbook-form.component.ts ***!
  \*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.AddressbookFormComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const addressbook_model_1 = __webpack_require__(/*! ../../../../models/addressbook.model */ "./src/models/addressbook.model.ts");
const app_validator_1 = __webpack_require__(/*! ../../../../utilities/app-validator */ "./src/utilities/app-validator.ts");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js"));
function AddressbookFormComponent_div_2_div_6_small_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 13);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.require"), " ");
} }
function AddressbookFormComponent_div_2_div_6_small_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 13);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.special_chars"), " ");
} }
function AddressbookFormComponent_div_2_div_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtemplate(1, AddressbookFormComponent_div_2_div_6_small_1_Template, 3, 3, "small", 12);
    i0.ɵɵtemplate(2, AddressbookFormComponent_div_2_div_6_small_2_Template, 3, 3, "small", 12);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r5 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", (ctx_r5.addressBookFrm.controls["lastName"].errors == null ? null : ctx_r5.addressBookFrm.controls["lastName"].errors.required) || (ctx_r5.addressBookFrm.controls["lastName"].errors == null ? null : ctx_r5.addressBookFrm.controls["lastName"].errors.whitespace));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r5.addressBookFrm.controls["lastName"].errors == null ? null : ctx_r5.addressBookFrm.controls["lastName"].errors.pattern);
} }
function AddressbookFormComponent_div_2_Template(rf, ctx) { if (rf & 1) {
    const _r9 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 3);
    i0.ɵɵelementStart(1, "span", 4);
    i0.ɵɵelementStart(2, "input", 10);
    i0.ɵɵlistener("ngModelChange", function AddressbookFormComponent_div_2_Template_input_ngModelChange_2_listener($event) { i0.ɵɵrestoreView(_r9); const ctx_r8 = i0.ɵɵnextContext(); return ctx_r8.addressBookDetail.lastName = $event; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "label", 11);
    i0.ɵɵtext(4);
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(6, AddressbookFormComponent_div_2_div_6_Template, 3, 2, "div", 7);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngModel", ctx_r0.addressBookDetail.lastName)("ngClass", (ctx_r0.addressBookFrm.controls["lastName"].dirty || ctx_r0.addressBookFrm.controls["lastName"].touched) && ctx_r0.addressBookFrm.controls["lastName"].invalid ? "ng-dirty" : "");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 4, "label.last_name"));
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", (ctx_r0.addressBookFrm.controls["lastName"].dirty || ctx_r0.addressBookFrm.controls["lastName"].touched) && ctx_r0.addressBookFrm.controls["lastName"].invalid);
} }
function AddressbookFormComponent_div_9_small_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 13);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.require"), " ");
} }
function AddressbookFormComponent_div_9_small_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 13);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.special_chars"), " ");
} }
function AddressbookFormComponent_div_9_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtemplate(1, AddressbookFormComponent_div_9_small_1_Template, 3, 3, "small", 12);
    i0.ɵɵtemplate(2, AddressbookFormComponent_div_9_small_2_Template, 3, 3, "small", 12);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", (ctx_r1.addressBookFrm.controls["firstName"].errors == null ? null : ctx_r1.addressBookFrm.controls["firstName"].errors.required) || (ctx_r1.addressBookFrm.controls["firstName"].errors == null ? null : ctx_r1.addressBookFrm.controls["firstName"].errors.whitespace));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r1.addressBookFrm.controls["firstName"].errors == null ? null : ctx_r1.addressBookFrm.controls["firstName"].errors.pattern);
} }
function AddressbookFormComponent_div_10_div_6_small_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 13);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.require"), " ");
} }
function AddressbookFormComponent_div_10_div_6_small_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 13);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.special_chars"), " ");
} }
function AddressbookFormComponent_div_10_div_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtemplate(1, AddressbookFormComponent_div_10_div_6_small_1_Template, 3, 3, "small", 12);
    i0.ɵɵtemplate(2, AddressbookFormComponent_div_10_div_6_small_2_Template, 3, 3, "small", 12);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r12 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", (ctx_r12.addressBookFrm.controls["lastName"].errors == null ? null : ctx_r12.addressBookFrm.controls["lastName"].errors.required) || (ctx_r12.addressBookFrm.controls["lastName"].errors == null ? null : ctx_r12.addressBookFrm.controls["lastName"].errors.whitespace));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r12.addressBookFrm.controls["lastName"].errors == null ? null : ctx_r12.addressBookFrm.controls["lastName"].errors.pattern);
} }
function AddressbookFormComponent_div_10_Template(rf, ctx) { if (rf & 1) {
    const _r16 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 3);
    i0.ɵɵelementStart(1, "span", 4);
    i0.ɵɵelementStart(2, "input", 14);
    i0.ɵɵlistener("ngModelChange", function AddressbookFormComponent_div_10_Template_input_ngModelChange_2_listener($event) { i0.ɵɵrestoreView(_r16); const ctx_r15 = i0.ɵɵnextContext(); return ctx_r15.addressBookDetail.lastName = $event; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "label", 15);
    i0.ɵɵtext(4);
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(6, AddressbookFormComponent_div_10_div_6_Template, 3, 2, "div", 7);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngModel", ctx_r2.addressBookDetail.lastName)("ngClass", (ctx_r2.addressBookFrm.controls["lastName"].dirty || ctx_r2.addressBookFrm.controls["lastName"].touched) && ctx_r2.addressBookFrm.controls["lastName"].invalid ? "ng-dirty" : "");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 4, "label.last_name"));
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", (ctx_r2.addressBookFrm.controls["lastName"].dirty || ctx_r2.addressBookFrm.controls["lastName"].touched) && ctx_r2.addressBookFrm.controls["lastName"].invalid);
} }
function AddressbookFormComponent_div_17_small_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 13);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.require"), " ");
} }
function AddressbookFormComponent_div_17_small_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 13);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.invalid_email_format"), " ");
} }
function AddressbookFormComponent_div_17_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtemplate(1, AddressbookFormComponent_div_17_small_1_Template, 3, 3, "small", 12);
    i0.ɵɵtemplate(2, AddressbookFormComponent_div_17_small_2_Template, 3, 3, "small", 12);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r3.addressBookFrm.controls["emailAddress"].errors == null ? null : ctx_r3.addressBookFrm.controls["emailAddress"].errors.required);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r3.addressBookFrm.controls["emailAddress"].errors == null ? null : ctx_r3.addressBookFrm.controls["emailAddress"].errors.pattern);
} }
function AddressbookFormComponent_div_18_span_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 18);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r19 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", ctx_r19.appUtil.formatDateBasedOnDiff(ctx_r19.datePipe, ctx_r19.addressBookDetail.createDate), " ");
} }
function AddressbookFormComponent_div_18_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 3);
    i0.ɵɵelementStart(1, "small", 16);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(4, AddressbookFormComponent_div_18_span_4_Template, 2, 1, "span", 17);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r4 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 2, "label.create_date"));
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r4.addressBookDetail.createDate);
} }
class AddressbookFormComponent {
    constructor(fb, messageService, translate, authService, datePipe) {
        this.fb = fb;
        this.messageService = messageService;
        this.translate = translate;
        this.authService = authService;
        this.datePipe = datePipe;
        this.addressBookDetail = new addressbook_model_1.AddressBook();
        this.addressBookFrm = new forms_1.FormGroup({});
        this.appUtil = app_util_1.default;
        this.constant = app_constants_1.default;
    }
    ngOnInit() {
        this.authUser = this.authService.authUser;
        this.addressBookFrm = this.fb.group({
            firstName: ['', [forms_1.Validators.required, forms_1.Validators.pattern(this.constant.PATTERNS.SCRIPT_PATTERN), app_validator_1.noWhitespaceValidator]],
            lastName: ['', [forms_1.Validators.required, forms_1.Validators.pattern(this.constant.PATTERNS.SCRIPT_PATTERN), app_validator_1.noWhitespaceValidator]],
            emailAddress: ['', [forms_1.Validators.required, forms_1.Validators.pattern(this.constant.PATTERNS.EMAIL)]],
            createdDate: [''],
        });
        this.currentLanguage = this.authService.getUserLanguage;
    }
}
exports.AddressbookFormComponent = AddressbookFormComponent;
AddressbookFormComponent.ɵfac = function AddressbookFormComponent_Factory(t) { return new (t || AddressbookFormComponent)(i0.ɵɵdirectiveInject(i1.FormBuilder), i0.ɵɵdirectiveInject(i2.MessageService), i0.ɵɵdirectiveInject(i3.TranslateService), i0.ɵɵdirectiveInject(i4.AuthService), i0.ɵɵdirectiveInject(i5.DatePipe)); };
AddressbookFormComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AddressbookFormComponent, selectors: [["app-addressbook-form"]], inputs: { mode: "mode", addressBookDetail: "addressBookDetail" }, decls: 19, vars: 17, consts: [[3, "formGroup"], [1, "p-fluid", "p-formgrid", "p-grid", "p-mt-2"], ["class", "p-field p-col-12", 4, "ngIf"], [1, "p-field", "p-col-12"], [1, "p-float-label"], ["formControlName", "firstName", "id", "firstNameJa", "maxlength", "64", "pInputText", "", "type", "text", 3, "ngModel", "ngClass", "ngModelChange"], ["for", "firstNameJa"], [4, "ngIf"], ["formControlName", "emailAddress", "id", "mailAddress", "maxlength", "64", "pInputText", "", "type", "text", 3, "ngModel", "ngClass", "readOnly", "ngModelChange"], ["for", "mailAddress"], ["formControlName", "lastName", "id", "lastNameJa", "maxlength", "64", "pInputText", "", "type", "text", 3, "ngModel", "ngClass", "ngModelChange"], ["for", "lastNameJa"], ["class", "p-error", 4, "ngIf"], [1, "p-error"], ["formControlName", "lastName", "id", "lastNameEn", "maxlength", "64", "pInputText", "", "type", "text", 3, "ngModel", "ngClass", "ngModelChange"], ["for", "lastNameEn"], [1, "p-d-block", "p-mt-0", "p-mb-1"], ["class", "p-tag p-tag-info", 4, "ngIf"], [1, "p-tag", "p-tag-info"]], template: function AddressbookFormComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "form", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵtemplate(2, AddressbookFormComponent_div_2_Template, 7, 6, "div", 2);
        i0.ɵɵelementStart(3, "div", 3);
        i0.ɵɵelementStart(4, "span", 4);
        i0.ɵɵelementStart(5, "input", 5);
        i0.ɵɵlistener("ngModelChange", function AddressbookFormComponent_Template_input_ngModelChange_5_listener($event) { return ctx.addressBookDetail.firstName = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(6, "label", 6);
        i0.ɵɵtext(7);
        i0.ɵɵpipe(8, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(9, AddressbookFormComponent_div_9_Template, 3, 2, "div", 7);
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(10, AddressbookFormComponent_div_10_Template, 7, 6, "div", 2);
        i0.ɵɵelementStart(11, "div", 3);
        i0.ɵɵelementStart(12, "span", 4);
        i0.ɵɵelementStart(13, "input", 8);
        i0.ɵɵlistener("ngModelChange", function AddressbookFormComponent_Template_input_ngModelChange_13_listener($event) { return ctx.addressBookDetail.mailAddress = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(14, "label", 9);
        i0.ɵɵtext(15);
        i0.ɵɵpipe(16, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(17, AddressbookFormComponent_div_17_Template, 3, 2, "div", 7);
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(18, AddressbookFormComponent_div_18_Template, 5, 4, "div", 2);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵproperty("formGroup", ctx.addressBookFrm);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.currentLanguage === "ja");
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("ngModel", ctx.addressBookDetail.firstName)("ngClass", (ctx.addressBookFrm.controls["firstName"].dirty || ctx.addressBookFrm.controls["firstName"].touched) && ctx.addressBookFrm.controls["firstName"].invalid ? "ng-dirty" : "");
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(8, 13, "label.first_name"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", (ctx.addressBookFrm.controls["firstName"].dirty || ctx.addressBookFrm.controls["firstName"].touched) && ctx.addressBookFrm.controls["firstName"].invalid);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.currentLanguage !== "ja");
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("ngModel", ctx.addressBookDetail.mailAddress)("ngClass", (ctx.addressBookFrm.controls["emailAddress"].dirty || ctx.addressBookFrm.controls["emailAddress"].touched) && ctx.addressBookFrm.controls["emailAddress"].invalid ? "ng-dirty" : "")("readOnly", ctx.mode === "detail");
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(16, 15, "label.email"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", (ctx.addressBookFrm.controls["emailAddress"].dirty || ctx.addressBookFrm.controls["emailAddress"].touched) && ctx.addressBookFrm.controls["emailAddress"].invalid);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.mode === "detail");
    } }, directives: [i1.ɵangular_packages_forms_forms_y, i1.NgControlStatusGroup, i1.FormGroupDirective, i5.NgIf, i1.DefaultValueAccessor, i1.NgControlStatus, i1.FormControlName, i1.MaxLengthValidator, i6.InputText, i5.NgClass], pipes: [i3.TranslatePipe], styles: ["[_nghost-%COMP%]     .p-tabview .p-tabview-panels {\n  padding: 0;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvYWRkcmVzc2Jvb2svYWRkcmVzc2Jvb2stZm9ybS9hZGRyZXNzYm9vay1mb3JtLmNvbXBvbmVudC5zY3NzIiwic3JjL2FwcC9hdXRoZW50aWNhdGlvbi1wYWdlcy9hZGRyZXNzYm9vay9hZGRyZXNzYm9vay1mb3JtL2FkZHJlc3Nib29rLWZvcm0uY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0U7RUFDRSxVQUFBO0FDQUoiLCJmaWxlIjoic3JjL2FwcC9hdXRoZW50aWNhdGlvbi1wYWdlcy9hZGRyZXNzYm9vay9hZGRyZXNzYm9vay1mb3JtL2FkZHJlc3Nib29rLWZvcm0uY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyI6aG9zdCA6Om5nLWRlZXAge1xuICAucC10YWJ2aWV3IC5wLXRhYnZpZXctcGFuZWxzIHtcbiAgICBwYWRkaW5nOiAwO1xuICB9XG59XG4iLCI6aG9zdCA6Om5nLWRlZXAgLnAtdGFidmlldyAucC10YWJ2aWV3LXBhbmVscyB7XG4gIHBhZGRpbmc6IDA7XG59Il19 */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AddressbookFormComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-addressbook-form',
                templateUrl: './addressbook-form.component.html',
                styleUrls: ['./addressbook-form.component.scss']
            }]
    }], function () { return [{ type: i1.FormBuilder }, { type: i2.MessageService }, { type: i3.TranslateService }, { type: i4.AuthService }, { type: i5.DatePipe }]; }, { mode: [{
            type: core_1.Input
        }], addressBookDetail: [{
            type: core_1.Input
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/addressbook/addressbook-group-detail/addressbook-group-detail.component.ts":
/*!*****************************************************************************************************************!*\
  !*** ./src/app/authentication-pages/addressbook/addressbook-group-detail/addressbook-group-detail.component.ts ***!
  \*****************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.AddressbookGroupDetailComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_constants_1 = __webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/__ivy_ngcc__/fesm2015/platform-browser.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! ../edit-addressbook-group/edit-addressbook-group.component */ "./src/app/authentication-pages/addressbook/edit-addressbook-group/edit-addressbook-group.component.ts"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! ../addressbook-group-member/addressbook-group-member.component */ "./src/app/authentication-pages/addressbook/addressbook-group-member/addressbook-group-member.component.ts"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const _c0 = ["editAddressbookGroupComponent"];
const _c1 = ["addressbookGroupMemberComponent"];
class AddressbookGroupDetailComponent {
    constructor(titleService, translate, authService, router) {
        this.titleService = titleService;
        this.translate = translate;
        this.authService = authService;
        this.router = router;
        this.translate.get(['page_title.group_address_detail']).subscribe(translation => {
            this.titleService.setTitle(translation['page_title.group_address_detail']);
        });
    }
    ngOnInit() {
        this.authUser = this.authService.getAuthUser;
        if (this.authUser.roleId === app_constants_1.SystemRole.Guest) {
            this.router.navigate(['/project']);
        }
    }
    doReloadDetail() {
        this.editAddressbookGroupComponent.getGroupDetail();
    }
}
exports.AddressbookGroupDetailComponent = AddressbookGroupDetailComponent;
AddressbookGroupDetailComponent.ɵfac = function AddressbookGroupDetailComponent_Factory(t) { return new (t || AddressbookGroupDetailComponent)(i0.ɵɵdirectiveInject(i1.Title), i0.ɵɵdirectiveInject(i2.TranslateService), i0.ɵɵdirectiveInject(i3.AuthService), i0.ɵɵdirectiveInject(i4.Router)); };
AddressbookGroupDetailComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AddressbookGroupDetailComponent, selectors: [["app-addressbook-group-detail"]], viewQuery: function AddressbookGroupDetailComponent_Query(rf, ctx) { if (rf & 1) {
        i0.ɵɵviewQuery(_c0, 1);
        i0.ɵɵviewQuery(_c1, 1);
    } if (rf & 2) {
        let _t;
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.editAddressbookGroupComponent = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.addressbookGroupMemberComponent = _t.first);
    } }, decls: 8, vars: 5, consts: [[1, "page-title"], ["editAddressbookGroupComponent", ""], [3, "actionSuccess"], ["addressbookGroupMemberComponent", ""]], template: function AddressbookGroupDetailComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵtext(1);
        i0.ɵɵpipe(2, "titlecase");
        i0.ɵɵpipe(3, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelement(4, "app-edit-addressbook-group", null, 1);
        i0.ɵɵelementStart(6, "app-addressbook-group-member", 2, 3);
        i0.ɵɵlistener("actionSuccess", function AddressbookGroupDetailComponent_Template_app_addressbook_group_member_actionSuccess_6_listener() { return ctx.doReloadDetail(); });
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵadvance(1);
        i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind1(3, 3, "label.address_group_detail")), "\n");
    } }, directives: [i5.EditAddressbookGroupComponent, i6.AddressbookGroupMemberComponent], pipes: [i7.TitleCasePipe, i2.TranslatePipe], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2FkZHJlc3Nib29rL2FkZHJlc3Nib29rLWdyb3VwLWRldGFpbC9hZGRyZXNzYm9vay1ncm91cC1kZXRhaWwuY29tcG9uZW50LnNjc3MifQ== */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AddressbookGroupDetailComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-addressbook-group-detail',
                templateUrl: './addressbook-group-detail.component.html',
                styleUrls: ['./addressbook-group-detail.component.scss']
            }]
    }], function () { return [{ type: i1.Title }, { type: i2.TranslateService }, { type: i3.AuthService }, { type: i4.Router }]; }, { editAddressbookGroupComponent: [{
            type: core_1.ViewChild,
            args: ['editAddressbookGroupComponent']
        }], addressbookGroupMemberComponent: [{
            type: core_1.ViewChild,
            args: ['addressbookGroupMemberComponent']
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/addressbook/addressbook-group-except-list/addressbook-group-except-list.component.ts":
/*!***************************************************************************************************************************!*\
  !*** ./src/app/authentication-pages/addressbook/addressbook-group-except-list/addressbook-group-except-list.component.ts ***!
  \***************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.AddressbookGroupExceptListComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/addressbook-group.service */ "./src/app/services/addressbook-group.service.ts"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! primeng/table */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-table.js"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js"));
function AddressbookGroupExceptListComponent_ng_template_1_Template(rf, ctx) { if (rf & 1) {
    const _r5 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 5);
    i0.ɵɵelementStart(1, "span", 6);
    i0.ɵɵelement(2, "i", 7);
    i0.ɵɵelementStart(3, "input", 8);
    i0.ɵɵlistener("keyup", function AddressbookGroupExceptListComponent_ng_template_1_Template_input_keyup_3_listener() { i0.ɵɵrestoreView(_r5); const ctx_r4 = i0.ɵɵnextContext(); return ctx_r4.loadGroups(null, true); })("ngModelChange", function AddressbookGroupExceptListComponent_ng_template_1_Template_input_ngModelChange_3_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r6 = i0.ɵɵnextContext(); return ctx_r6.params.searchKey = $event; });
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("placeholder", i0.ɵɵpipeBind1(4, 2, "label.search"));
    i0.ɵɵproperty("ngModel", ctx_r0.params.searchKey);
} }
function AddressbookGroupExceptListComponent_ng_template_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "th", 9);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelement(4, "p-sortIcon", 10);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "th", 11);
    i0.ɵɵtext(6);
    i0.ɵɵpipe(7, "titlecase");
    i0.ɵɵpipe(8, "translate");
    i0.ɵɵelement(9, "p-sortIcon", 12);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "label.group_name"), " ");
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(7, 4, i0.ɵɵpipeBind1(8, 6, "label.no_address_book")), " ");
} }
function AddressbookGroupExceptListComponent_ng_template_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr", 13);
    i0.ɵɵelementStart(1, "td", 14);
    i0.ɵɵelementStart(2, "span", 15);
    i0.ɵɵtext(3);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "td", 16);
    i0.ɵɵtext(5);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const group_r7 = ctx.$implicit;
    const rowIndex_r8 = ctx.rowIndex;
    i0.ɵɵproperty("pSelectableRow", group_r7)("pSelectableRowIndex", rowIndex_r8);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("title", group_r7.name);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(group_r7.name);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", group_r7.numberAddress, " ");
} }
function AddressbookGroupExceptListComponent_ng_template_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "td", 17);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, "label.no_record"));
} }
class AddressbookGroupExceptListComponent {
    constructor(fb, datePipe, translate, confirmationService, messageService, router, authService, addressBookGroupService) {
        this.fb = fb;
        this.datePipe = datePipe;
        this.translate = translate;
        this.confirmationService = confirmationService;
        this.messageService = messageService;
        this.router = router;
        this.authService = authService;
        this.addressBookGroupService = addressBookGroupService;
        this.appUtil = app_util_1.default;
        this.constant = app_constants_1.default;
        this.selectedGroups = [];
        this.first = 0;
        this.params = {
            searchKey: '',
            sortField: 'numberAddress',
            ascSort: false,
            pageNumber: 1,
            pageSize: 5
        };
    }
    ngOnInit() {
        this.currentLanguage = this.authService.getUserLanguage;
    }
    loadGroups(event, isSearch) {
        if (event) {
            this.params.sortField = (event.sortField) ? event.sortField : 'createdDate';
            this.params.ascSort = (event.sortOrder === 1);
            if (event.rows) {
                this.params.pageNumber = (event.first / event.rows) + 1;
                this.params.pageSize = event.rows;
            }
        }
        // reset page number to 1 when search
        if (isSearch) {
            this.params.pageNumber = 1;
            this.first = 0;
        }
        if (this.getABGRequest) {
            this.getABGRequest.unsubscribe();
        }
        this.getABGRequest = this.addressBookGroupService
            .getExceptAddressBookGroupList(this.groupId, this.appUtil.toSnakeCaseKey(this.params))
            .subscribe(res => {
            if (res.status === 200) {
                this.groups = res.data.content;
                this.totalRecords = res.data.totalElements;
            }
            else {
                this.messageService.add({
                    key: 'toast',
                    severity: 'error',
                    detail: this.appUtil.translate(this.translate, 'error.' + res.status)
                });
            }
        }, error => {
            this.messageService.add({
                key: 'toast',
                severity: 'error',
                detail: this.appUtil.translate(this.translate, 'error.' + error.status)
            });
        });
    }
}
exports.AddressbookGroupExceptListComponent = AddressbookGroupExceptListComponent;
AddressbookGroupExceptListComponent.ɵfac = function AddressbookGroupExceptListComponent_Factory(t) { return new (t || AddressbookGroupExceptListComponent)(i0.ɵɵdirectiveInject(i1.FormBuilder), i0.ɵɵdirectiveInject(i2.DatePipe), i0.ɵɵdirectiveInject(i3.TranslateService), i0.ɵɵdirectiveInject(i4.ConfirmationService), i0.ɵɵdirectiveInject(i4.MessageService), i0.ɵɵdirectiveInject(i5.Router), i0.ɵɵdirectiveInject(i6.AuthService), i0.ɵɵdirectiveInject(i7.AddressbookGroupService)); };
AddressbookGroupExceptListComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AddressbookGroupExceptListComponent, selectors: [["app-addressbook-group-except-list"]], inputs: { groupId: "groupId", mode: "mode" }, decls: 5, vars: 12, consts: [["dataKey", "groupAddressId", "styleClass", "p-datatable-striped", 3, "rowHover", "paginator", "lazy", "sortField", "value", "first", "rows", "totalRecords", "sortOrder", "selection", "metaKeySelection", "selectionMode", "firstChange", "onLazyLoad", "selectionChange"], ["pTemplate", "caption"], ["pTemplate", "header"], ["pTemplate", "body"], ["pTemplate", "emptymessage"], [1, "p-d-flex", "p-ai-center", "p-jc-between"], [1, "p-input-icon-left"], [1, "pi", "pi-search"], ["pInputText", "", "type", "text", 1, "search-style", "h-38", 3, "ngModel", "placeholder", "keyup", "ngModelChange"], ["pSortableColumn", "groupName", 1, "p-text-left"], ["field", "groupName"], ["pSortableColumn", "numberAddress", 1, "p-text-center", 2, "width", "30%"], ["field", "numberAddress"], [3, "pSelectableRow", "pSelectableRowIndex"], [1, "p-text-truncate", "p-text-left"], [3, "title"], [1, "p-text-center"], ["colspan", "2", 1, "p-text-center"]], template: function AddressbookGroupExceptListComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "p-table", 0);
        i0.ɵɵlistener("firstChange", function AddressbookGroupExceptListComponent_Template_p_table_firstChange_0_listener($event) { return ctx.first = $event; })("onLazyLoad", function AddressbookGroupExceptListComponent_Template_p_table_onLazyLoad_0_listener($event) { return ctx.loadGroups($event); })("selectionChange", function AddressbookGroupExceptListComponent_Template_p_table_selectionChange_0_listener($event) { return ctx.selectedGroups = $event; });
        i0.ɵɵtemplate(1, AddressbookGroupExceptListComponent_ng_template_1_Template, 5, 4, "ng-template", 1);
        i0.ɵɵtemplate(2, AddressbookGroupExceptListComponent_ng_template_2_Template, 10, 8, "ng-template", 2);
        i0.ɵɵtemplate(3, AddressbookGroupExceptListComponent_ng_template_3_Template, 6, 5, "ng-template", 3);
        i0.ɵɵtemplate(4, AddressbookGroupExceptListComponent_ng_template_4_Template, 4, 3, "ng-template", 4);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵpropertyInterpolate("selectionMode", ctx.mode === "move" ? "single" : "multiple");
        i0.ɵɵproperty("rowHover", true)("paginator", ctx.totalRecords > 0)("lazy", true)("sortField", "numberAddress")("value", ctx.groups)("first", ctx.first)("rows", 5)("totalRecords", ctx.totalRecords)("sortOrder", -1)("selection", ctx.selectedGroups)("metaKeySelection", true);
    } }, directives: [i8.Table, i4.PrimeTemplate, i1.DefaultValueAccessor, i9.InputText, i1.NgControlStatus, i1.NgModel, i8.SortableColumn, i8.SortIcon, i8.SelectableRow], pipes: [i3.TranslatePipe, i2.TitleCasePipe], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2FkZHJlc3Nib29rL2FkZHJlc3Nib29rLWdyb3VwLWV4Y2VwdC1saXN0L2FkZHJlc3Nib29rLWdyb3VwLWV4Y2VwdC1saXN0LmNvbXBvbmVudC5zY3NzIn0= */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AddressbookGroupExceptListComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-addressbook-group-except-list',
                templateUrl: './addressbook-group-except-list.component.html',
                styleUrls: ['./addressbook-group-except-list.component.scss']
            }]
    }], function () { return [{ type: i1.FormBuilder }, { type: i2.DatePipe }, { type: i3.TranslateService }, { type: i4.ConfirmationService }, { type: i4.MessageService }, { type: i5.Router }, { type: i6.AuthService }, { type: i7.AddressbookGroupService }]; }, { groupId: [{
            type: core_1.Input
        }], mode: [{
            type: core_1.Input
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/addressbook/addressbook-group-form/addressbook-group-form.component.ts":
/*!*************************************************************************************************************!*\
  !*** ./src/app/authentication-pages/addressbook/addressbook-group-form/addressbook-group-form.component.ts ***!
  \*************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.AddressbookGroupFormComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const addressbook_group_model_1 = __webpack_require__(/*! ../../../../models/addressbook-group.model */ "./src/models/addressbook-group.model.ts");
const app_validator_1 = __webpack_require__(/*! ../../../../utilities/app-validator */ "./src/utilities/app-validator.ts");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/addressbook.service */ "./src/app/services/addressbook.service.ts"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtextarea */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtextarea.js"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! @ng-select/ng-select */ "./node_modules/@ng-select/ng-select/__ivy_ngcc__/fesm2015/ng-select-ng-select.js"));
function AddressbookGroupFormComponent_div_8_small_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 11);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.require"), " ");
} }
function AddressbookGroupFormComponent_div_8_small_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 11);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.special_chars"), " ");
} }
function AddressbookGroupFormComponent_div_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtemplate(1, AddressbookGroupFormComponent_div_8_small_1_Template, 3, 3, "small", 10);
    i0.ɵɵtemplate(2, AddressbookGroupFormComponent_div_8_small_2_Template, 3, 3, "small", 10);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", (ctx_r0.groupFrm.controls["groupName"].errors == null ? null : ctx_r0.groupFrm.controls["groupName"].errors.required) || (ctx_r0.groupFrm.controls["groupName"].errors == null ? null : ctx_r0.groupFrm.controls["groupName"].errors.whitespace));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r0.groupFrm.controls["groupName"].errors == null ? null : ctx_r0.groupFrm.controls["groupName"].errors.pattern);
} }
function AddressbookGroupFormComponent_div_9_ng_template_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "b");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵtext(3);
} if (rf & 2) {
    const search_r7 = ctx.searchTerm;
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 2, "label.create_new"));
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(": ", search_r7, " ");
} }
function AddressbookGroupFormComponent_div_9_ng_template_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(2, "div");
    i0.ɵɵtext(3);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r8 = ctx.item;
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(item_r8.name);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(item_r8.value);
} }
const _c0 = function () { return { maxLength: "64" }; };
function AddressbookGroupFormComponent_div_9_Template(rf, ctx) { if (rf & 1) {
    const _r10 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 2);
    i0.ɵɵelementStart(1, "div", 12);
    i0.ɵɵelementStart(2, "span", 3);
    i0.ɵɵelementStart(3, "ng-select", 13);
    i0.ɵɵlistener("close", function AddressbookGroupFormComponent_div_9_Template_ng_select_close_3_listener() { i0.ɵɵrestoreView(_r10); const ctx_r9 = i0.ɵɵnextContext(); return ctx_r9.isOpenDropdown = false; })("keypress", function AddressbookGroupFormComponent_div_9_Template_ng_select_keypress_3_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r11 = i0.ɵɵnextContext(); return ctx_r11.appUtil.blockSpecialChars($event); })("open", function AddressbookGroupFormComponent_div_9_Template_ng_select_open_3_listener() { i0.ɵɵrestoreView(_r10); const ctx_r12 = i0.ɵɵnextContext(); return ctx_r12.isOpenDropdown = true; })("search", function AddressbookGroupFormComponent_div_9_Template_ng_select_search_3_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r13 = i0.ɵɵnextContext(); return ctx_r13.searchAB($event); });
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵtemplate(6, AddressbookGroupFormComponent_div_9_ng_template_6_Template, 4, 4, "ng-template", 14);
    i0.ɵɵtemplate(7, AddressbookGroupFormComponent_div_9_ng_template_7_Template, 4, 2, "ng-template", 15);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(8, "label", 16);
    i0.ɵɵtext(9);
    i0.ɵɵpipe(10, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("clearAllText", i0.ɵɵpipeBind1(4, 8, "label.clear_all"));
    i0.ɵɵpropertyInterpolate("notFoundText", i0.ɵɵpipeBind1(5, 10, "label.no_item_found"));
    i0.ɵɵproperty("hideSelected", true)("addTag", !ctx_r1.isInValidEmail ? ctx_r1.addNewAB : false)("inputAttrs", i0.ɵɵpureFunction0(14, _c0))("items", ctx_r1.addressBooks);
    i0.ɵɵadvance(5);
    i0.ɵɵproperty("ngClass", ctx_r1.groupFrm.controls.members.value.length > 0 || ctx_r1.isOpenDropdown ? "custom-float-label-tab" : "");
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(10, 12, "label.address_book"), " ");
} }
function AddressbookGroupFormComponent_div_16_small_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 11);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.special_chars"), " ");
} }
function AddressbookGroupFormComponent_div_16_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtemplate(1, AddressbookGroupFormComponent_div_16_small_1_Template, 3, 3, "small", 10);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r2.groupFrm.controls["description"].errors == null ? null : ctx_r2.groupFrm.controls["description"].errors.pattern);
} }
class AddressbookGroupFormComponent {
    constructor(fb, messageService, translate, authService, addressBookService) {
        this.fb = fb;
        this.messageService = messageService;
        this.translate = translate;
        this.authService = authService;
        this.addressBookService = addressBookService;
        this.addressGroupDetail = new addressbook_group_model_1.AddressBookGroup();
        this.groupFrm = new forms_1.FormGroup({});
        this.appUtil = app_util_1.default;
        this.constant = app_constants_1.default;
        this.addressBooks = [];
        this.isOpenDropdown = false;
    }
    ngOnInit() {
        this.groupFrm = this.fb.group({
            groupName: ['', [forms_1.Validators.required, forms_1.Validators.pattern(this.constant.PATTERNS.SCRIPT_PATTERN), app_validator_1.noWhitespaceValidator]],
            members: [[]],
            description: ['', [forms_1.Validators.pattern(this.constant.PATTERNS.SCRIPT_PATTERN)]]
        });
        this.getAllAddressBooks();
    }
    getAllAddressBooks() {
        const customAddressBooks = [];
        this.addressBookService.getAllAddressBook().subscribe(res => {
            if (res.status === 200) {
                res.data.forEach(ab => {
                    customAddressBooks.push({
                        id: ab.userId,
                        value: ab.mailAddress,
                        name: (this.authService.getUserLanguage === 'ja')
                            ? ab.lastName.trim() + ' ' + ab.firstName.trim()
                            : ab.firstName.trim() + ' ' + ab.lastName.trim()
                    });
                });
                this.addressBooks = customAddressBooks;
            }
        });
    }
    searchAB(event) {
        this.isInValidEmail = !this.appUtil.isValidEmail(event.term);
    }
    addNewAB(name) {
        const emailPattern = app_constants_1.default.PATTERNS.EMAIL;
        if (name.length > 64) {
            return;
        }
        else if (!emailPattern.test(name)) {
            return;
        }
        else {
            return { id: name, value: name, name, tag: true };
        }
    }
}
exports.AddressbookGroupFormComponent = AddressbookGroupFormComponent;
AddressbookGroupFormComponent.ɵfac = function AddressbookGroupFormComponent_Factory(t) { return new (t || AddressbookGroupFormComponent)(i0.ɵɵdirectiveInject(i1.FormBuilder), i0.ɵɵdirectiveInject(i2.MessageService), i0.ɵɵdirectiveInject(i3.TranslateService), i0.ɵɵdirectiveInject(i4.AuthService), i0.ɵɵdirectiveInject(i5.AddressbookService)); };
AddressbookGroupFormComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AddressbookGroupFormComponent, selectors: [["app-addressbook-group-form"]], inputs: { mode: "mode", addressGroupDetail: "addressGroupDetail" }, decls: 17, vars: 13, consts: [[3, "formGroup"], [1, "p-fluid", "p-formgrid", "p-grid", "p-mt-2"], [1, "p-field", "p-col-12"], [1, "p-float-label"], ["formControlName", "groupName", "id", "groupName", "maxlength", "64", "pInputText", "", "type", "text", 3, "ngClass", "ngModel", "ngModelChange"], ["for", "groupName"], [4, "ngIf"], ["class", "p-field p-col-12", 4, "ngIf"], ["rows", "5", "formControlName", "description", "autoResize", "true", "maxlength", "255", "pInputTextarea", "", "id", "description", 1, "min-height-119", 3, "ngModel", "ngModelChange"], ["for", "description"], ["class", "p-error", 4, "ngIf"], [1, "p-error"], [1, "p-inputgroup"], ["bindLabel", "value", "formControlName", "members", "multiple", "true", 1, "select-user", "in-group", 3, "hideSelected", "addTag", "inputAttrs", "items", "clearAllText", "notFoundText", "close", "keypress", "open", "search"], ["ng-tag-tmp", ""], ["ng-option-tmp", ""], [3, "ngClass"]], template: function AddressbookGroupFormComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "form", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵelementStart(2, "div", 2);
        i0.ɵɵelementStart(3, "span", 3);
        i0.ɵɵelementStart(4, "input", 4);
        i0.ɵɵlistener("ngModelChange", function AddressbookGroupFormComponent_Template_input_ngModelChange_4_listener($event) { return ctx.addressGroupDetail.name = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(5, "label", 5);
        i0.ɵɵtext(6);
        i0.ɵɵpipe(7, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(8, AddressbookGroupFormComponent_div_8_Template, 3, 2, "div", 6);
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(9, AddressbookGroupFormComponent_div_9_Template, 11, 15, "div", 7);
        i0.ɵɵelementStart(10, "div", 2);
        i0.ɵɵelementStart(11, "span", 3);
        i0.ɵɵelementStart(12, "textarea", 8);
        i0.ɵɵlistener("ngModelChange", function AddressbookGroupFormComponent_Template_textarea_ngModelChange_12_listener($event) { return ctx.addressGroupDetail.description = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(13, "label", 9);
        i0.ɵɵtext(14);
        i0.ɵɵpipe(15, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(16, AddressbookGroupFormComponent_div_16_Template, 2, 1, "div", 6);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵproperty("formGroup", ctx.groupFrm);
        i0.ɵɵadvance(4);
        i0.ɵɵproperty("ngClass", (ctx.groupFrm.controls["groupName"].dirty || ctx.groupFrm.controls["groupName"].touched) && ctx.groupFrm.controls["groupName"].invalid ? "ng-dirty" : "")("ngModel", ctx.addressGroupDetail.name);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(7, 9, "label.group_name"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", (ctx.groupFrm.controls["groupName"].dirty || ctx.groupFrm.controls["groupName"].touched) && ctx.groupFrm.controls["groupName"].invalid);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.mode === "create");
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("ngModel", ctx.addressGroupDetail.description);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(15, 11, "label.description"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", (ctx.groupFrm.controls["description"].dirty || ctx.groupFrm.controls["description"].touched) && ctx.groupFrm.controls["description"].invalid);
    } }, directives: [i1.ɵangular_packages_forms_forms_y, i1.NgControlStatusGroup, i1.FormGroupDirective, i1.DefaultValueAccessor, i1.NgControlStatus, i1.FormControlName, i1.MaxLengthValidator, i6.InputText, i7.NgClass, i7.NgIf, i8.InputTextarea, i9.NgSelectComponent, i9.ɵo, i9.ɵf], pipes: [i3.TranslatePipe], styles: [".custom-float-label[_ngcontent-%COMP%] {\n  color: rgba(0, 0, 0, 0.6);\n  transform-origin: left 0 !important;\n  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), color 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;\n  padding: 0 0.25em !important;\n  transform: translateY(-1.28125em) scale(0.75) perspective(100px) translateZ(0.001px) !important;\n  z-index: 1001;\n  top: 22px !important;\n  background-color: white;\n  font-size: 16px;\n}\n\n.min-height-119[_ngcontent-%COMP%] {\n  min-height: 119px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvYWRkcmVzc2Jvb2svYWRkcmVzc2Jvb2stZ3JvdXAtZm9ybS9hZGRyZXNzYm9vay1ncm91cC1mb3JtLmNvbXBvbmVudC5zY3NzIiwic3JjL2FwcC9hdXRoZW50aWNhdGlvbi1wYWdlcy9hZGRyZXNzYm9vay9hZGRyZXNzYm9vay1ncm91cC1mb3JtL2FkZHJlc3Nib29rLWdyb3VwLWZvcm0uY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSx5QkFBQTtFQUNBLG1DQUFBO0VBQ0EsZ0tBQUE7RUFDQSw0QkFBQTtFQUNBLCtGQUFBO0VBQ0EsYUFBQTtFQUNBLG9CQUFBO0VBQ0EsdUJBQUE7RUFDQSxlQUFBO0FDQ0Y7O0FERUE7RUFDRSxpQkFBQTtBQ0NGIiwiZmlsZSI6InNyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvYWRkcmVzc2Jvb2svYWRkcmVzc2Jvb2stZ3JvdXAtZm9ybS9hZGRyZXNzYm9vay1ncm91cC1mb3JtLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmN1c3RvbS1mbG9hdC1sYWJlbCB7XG4gIGNvbG9yOiByZ2JhKDAsIDAsIDAsIDAuNik7XG4gIHRyYW5zZm9ybS1vcmlnaW46IGxlZnQgMCAhaW1wb3J0YW50O1xuICB0cmFuc2l0aW9uOiB0cmFuc2Zvcm0gMC40cyBjdWJpYy1iZXppZXIoMC4yNSwgMC44LCAwLjI1LCAxKSwgY29sb3IgMC40cyBjdWJpYy1iZXppZXIoMC4yNSwgMC44LCAwLjI1LCAxKSwgd2lkdGggMC40cyBjdWJpYy1iZXppZXIoMC4yNSwgMC44LCAwLjI1LCAxKSAhaW1wb3J0YW50O1xuICBwYWRkaW5nOiAwIC4yNWVtICFpbXBvcnRhbnQ7XG4gIHRyYW5zZm9ybTogdHJhbnNsYXRlWSgtMS4yODEyNWVtKSBzY2FsZSgwLjc1KSBwZXJzcGVjdGl2ZSgxMDBweCkgdHJhbnNsYXRlWigwLjAwMXB4KSAhaW1wb3J0YW50O1xuICB6LWluZGV4OiAxMDAxO1xuICB0b3A6IDIycHggIWltcG9ydGFudDtcbiAgYmFja2dyb3VuZC1jb2xvcjogd2hpdGU7XG4gIGZvbnQtc2l6ZTogMTZweDtcbn1cblxuLm1pbi1oZWlnaHQtMTE5IHtcbiAgbWluLWhlaWdodDogMTE5cHg7XG59XG4iLCIuY3VzdG9tLWZsb2F0LWxhYmVsIHtcbiAgY29sb3I6IHJnYmEoMCwgMCwgMCwgMC42KTtcbiAgdHJhbnNmb3JtLW9yaWdpbjogbGVmdCAwICFpbXBvcnRhbnQ7XG4gIHRyYW5zaXRpb246IHRyYW5zZm9ybSAwLjRzIGN1YmljLWJlemllcigwLjI1LCAwLjgsIDAuMjUsIDEpLCBjb2xvciAwLjRzIGN1YmljLWJlemllcigwLjI1LCAwLjgsIDAuMjUsIDEpLCB3aWR0aCAwLjRzIGN1YmljLWJlemllcigwLjI1LCAwLjgsIDAuMjUsIDEpICFpbXBvcnRhbnQ7XG4gIHBhZGRpbmc6IDAgMC4yNWVtICFpbXBvcnRhbnQ7XG4gIHRyYW5zZm9ybTogdHJhbnNsYXRlWSgtMS4yODEyNWVtKSBzY2FsZSgwLjc1KSBwZXJzcGVjdGl2ZSgxMDBweCkgdHJhbnNsYXRlWigwLjAwMXB4KSAhaW1wb3J0YW50O1xuICB6LWluZGV4OiAxMDAxO1xuICB0b3A6IDIycHggIWltcG9ydGFudDtcbiAgYmFja2dyb3VuZC1jb2xvcjogd2hpdGU7XG4gIGZvbnQtc2l6ZTogMTZweDtcbn1cblxuLm1pbi1oZWlnaHQtMTE5IHtcbiAgbWluLWhlaWdodDogMTE5cHg7XG59Il19 */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AddressbookGroupFormComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-addressbook-group-form',
                templateUrl: './addressbook-group-form.component.html',
                styleUrls: ['./addressbook-group-form.component.scss']
            }]
    }], function () { return [{ type: i1.FormBuilder }, { type: i2.MessageService }, { type: i3.TranslateService }, { type: i4.AuthService }, { type: i5.AddressbookService }]; }, { mode: [{
            type: core_1.Input
        }], addressGroupDetail: [{
            type: core_1.Input
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/addressbook/addressbook-group-list/addressbook-group-list.component.ts":
/*!*************************************************************************************************************!*\
  !*** ./src/app/authentication-pages/addressbook/addressbook-group-list/addressbook-group-list.component.ts ***!
  \*************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.AddressbookGroupListComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/__ivy_ngcc__/fesm2015/platform-browser.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/addressbook-group.service */ "./src/app/services/addressbook-group.service.ts"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! primeng/table */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-table.js"));
const i10 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js"));
function AddressbookGroupListComponent_ng_template_1_Template(rf, ctx) { if (rf & 1) {
    const _r5 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 5);
    i0.ɵɵelementStart(1, "span", 6);
    i0.ɵɵelement(2, "i", 7);
    i0.ɵɵelementStart(3, "input", 8);
    i0.ɵɵlistener("keyup", function AddressbookGroupListComponent_ng_template_1_Template_input_keyup_3_listener() { i0.ɵɵrestoreView(_r5); const ctx_r4 = i0.ɵɵnextContext(); return ctx_r4.loadGroups(null, true); })("ngModelChange", function AddressbookGroupListComponent_ng_template_1_Template_input_ngModelChange_3_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r6 = i0.ɵɵnextContext(); return ctx_r6.params.searchKey = $event; });
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("placeholder", i0.ɵɵpipeBind1(4, 2, "label.search"));
    i0.ɵɵproperty("ngModel", ctx_r0.params.searchKey);
} }
function AddressbookGroupListComponent_ng_template_2_th_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "th", 14);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelement(3, "p-sortIcon", 15);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "label.create_date"), " ");
} }
function AddressbookGroupListComponent_ng_template_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "th", 9);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelement(4, "p-sortIcon", 10);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(5, AddressbookGroupListComponent_ng_template_2_th_5_Template, 4, 3, "th", 11);
    i0.ɵɵelementStart(6, "th", 12);
    i0.ɵɵtext(7);
    i0.ɵɵpipe(8, "titlecase");
    i0.ɵɵpipe(9, "translate");
    i0.ɵɵelement(10, "p-sortIcon", 13);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 3, "label.group_name"), " ");
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("ngIf", ctx_r1.mode === "full");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(8, 5, i0.ɵɵpipeBind1(9, 7, "label.no_address_book")), " ");
} }
function AddressbookGroupListComponent_ng_template_3_td_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "td", 21);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const group_r8 = i0.ɵɵnextContext().$implicit;
    const ctx_r10 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", ctx_r10.appUtil.formatDateBasedOnDiff(ctx_r10.datePipe, group_r8.createDate), " ");
} }
function AddressbookGroupListComponent_ng_template_3_Template(rf, ctx) { if (rf & 1) {
    const _r13 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "tr", 16);
    i0.ɵɵlistener("dblclick", function AddressbookGroupListComponent_ng_template_3_Template_tr_dblclick_0_listener() { i0.ɵɵrestoreView(_r13); const group_r8 = ctx.$implicit; const ctx_r12 = i0.ɵɵnextContext(); return ctx_r12.goToDetail(group_r8); });
    i0.ɵɵelementStart(1, "td", 17);
    i0.ɵɵelementStart(2, "span", 18);
    i0.ɵɵtext(3);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(4, AddressbookGroupListComponent_ng_template_3_td_4_Template, 2, 1, "td", 19);
    i0.ɵɵelementStart(5, "td", 20);
    i0.ɵɵtext(6);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const group_r8 = ctx.$implicit;
    const rowIndex_r9 = ctx.rowIndex;
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵproperty("pSelectableRow", group_r8)("pSelectableRowIndex", rowIndex_r9);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("title", group_r8.name);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(group_r8.name);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r2.mode === "full");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", group_r8.numberAddress, " ");
} }
function AddressbookGroupListComponent_ng_template_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "td", 22);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "td", 23);
    i0.ɵɵtext(5);
    i0.ɵɵpipe(6, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 2, "label.no_record"));
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 4, "label.no_record"));
} }
class AddressbookGroupListComponent {
    constructor(titleService, fb, datePipe, translate, confirmationService, messageService, router, authService, addressBookGroupService) {
        this.titleService = titleService;
        this.fb = fb;
        this.datePipe = datePipe;
        this.translate = translate;
        this.confirmationService = confirmationService;
        this.messageService = messageService;
        this.router = router;
        this.authService = authService;
        this.addressBookGroupService = addressBookGroupService;
        this.appUtil = app_util_1.default;
        this.constant = app_constants_1.default;
        this.selectedGroups = [];
        this.first = 0;
        this.rows = 10;
        this.sortField = 'createdDate';
        this.params = {
            searchKey: '',
            sortField: 'createdDate',
            ascSort: false,
            pageNumber: 1,
            pageSize: 10
        };
        this.translate.get(['page_title.address_group_list']).subscribe(translation => {
            this.titleService.setTitle(translation['page_title.address_group_list']);
        });
    }
    ngOnInit() {
        this.rowOptions = (this.mode === 'full') ? this.constant.DATA_VIEW.ROW_PER_PAGE_OPTIONS : null;
        this.currentLanguage = this.authService.getUserLanguage;
        this.params = (this.addressBookGroupService.getStoreParams && this.mode === 'full')
            ? this.addressBookGroupService.getStoreParams : this.params;
        this.params.searchKey = '';
        this.rows = this.mode === 'full' ? this.params.pageSize : 5;
        this.ascSort = (this.params.ascSort) ? 1 : -1;
        this.sortField = this.mode === 'full' ? this.params.sortField : 'numberAddress';
    }
    loadGroups(event, isSearch) {
        if (event) {
            this.params.sortField = (event.sortField) ? event.sortField : 'createdDate';
            this.params.ascSort = (event.sortOrder === 1);
            if (event.rows) {
                this.params.pageNumber = (event.first / event.rows) + 1;
                this.params.pageSize = event.rows;
            }
        }
        // reset page number to 1 when search
        if (isSearch) {
            this.params.pageNumber = 1;
            this.first = 0;
        }
        if (this.getABGRequest) {
            this.getABGRequest.unsubscribe();
        }
        this.getABGRequest = this.addressBookGroupService.getAddressBookGroupList(this.appUtil.toSnakeCaseKey(this.params)).subscribe(res => {
            if (res.status === 200) {
                if (this.mode === 'full') {
                    this.addressBookGroupService.setStoreParams(this.params);
                }
                this.groups = res.data.content;
                this.totalRecords = res.data.totalElements;
            }
            else {
                this.messageService.add({
                    key: 'toast',
                    severity: 'error',
                    detail: this.appUtil.translate(this.translate, 'error.' + res.status)
                });
            }
        }, error => {
            this.messageService.add({
                key: 'toast',
                severity: 'error',
                detail: this.appUtil.translate(this.translate, 'error.' + error.status)
            });
        });
    }
    goToDetail(group) {
        this.router.navigate(['/group/' + group.groupAddressId]);
    }
}
exports.AddressbookGroupListComponent = AddressbookGroupListComponent;
AddressbookGroupListComponent.ɵfac = function AddressbookGroupListComponent_Factory(t) { return new (t || AddressbookGroupListComponent)(i0.ɵɵdirectiveInject(i1.Title), i0.ɵɵdirectiveInject(i2.FormBuilder), i0.ɵɵdirectiveInject(i3.DatePipe), i0.ɵɵdirectiveInject(i4.TranslateService), i0.ɵɵdirectiveInject(i5.ConfirmationService), i0.ɵɵdirectiveInject(i5.MessageService), i0.ɵɵdirectiveInject(i6.Router), i0.ɵɵdirectiveInject(i7.AuthService), i0.ɵɵdirectiveInject(i8.AddressbookGroupService)); };
AddressbookGroupListComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AddressbookGroupListComponent, selectors: [["app-addressbook-group-list"]], inputs: { mode: "mode" }, decls: 5, vars: 12, consts: [["dataKey", "groupAddressId", "selectionMode", "multiple", "styleClass", "p-datatable-striped", 3, "rowHover", "paginator", "lazy", "totalRecords", "value", "rows", "first", "sortField", "rowsPerPageOptions", "sortOrder", "selection", "metaKeySelection", "firstChange", "onLazyLoad", "selectionChange"], ["pTemplate", "caption"], ["pTemplate", "header"], ["pTemplate", "body"], ["pTemplate", "emptymessage"], [1, "p-d-flex", "p-ai-center", "p-jc-between"], [1, "p-input-icon-left"], [1, "pi", "pi-search"], ["pInputText", "", "type", "text", 1, "search-style", "h-38", 3, "ngModel", "placeholder", "keyup", "ngModelChange"], ["pSortableColumn", "groupName", 1, "p-text-left"], ["field", "groupName"], ["class", "p-d-none p-d-md-table-cell p-text-left", "pSortableColumn", "createdDate", "style", "width:30%", 4, "ngIf"], ["pSortableColumn", "numberAddress", 1, "p-text-center", 2, "width", "30%"], ["field", "numberAddress"], ["pSortableColumn", "createdDate", 1, "p-d-none", "p-d-md-table-cell", "p-text-left", 2, "width", "30%"], ["field", "createdDate"], [3, "pSelectableRow", "pSelectableRowIndex", "dblclick"], [1, "p-text-truncate", "p-text-left"], [3, "title"], ["class", "p-d-none p-d-md-table-cell p-text-left", 4, "ngIf"], [1, "p-text-center"], [1, "p-d-none", "p-d-md-table-cell", "p-text-left"], ["colspan", "3", 1, "p-text-center", "p-d-none", "p-d-lg-table-cell"], ["colspan", "2", 1, "p-text-center", "p-d-sm-table-cell", "p-d-lg-none"]], template: function AddressbookGroupListComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "p-table", 0);
        i0.ɵɵlistener("firstChange", function AddressbookGroupListComponent_Template_p_table_firstChange_0_listener($event) { return ctx.first = $event; })("onLazyLoad", function AddressbookGroupListComponent_Template_p_table_onLazyLoad_0_listener($event) { return ctx.loadGroups($event); })("selectionChange", function AddressbookGroupListComponent_Template_p_table_selectionChange_0_listener($event) { return ctx.selectedGroups = $event; });
        i0.ɵɵtemplate(1, AddressbookGroupListComponent_ng_template_1_Template, 5, 4, "ng-template", 1);
        i0.ɵɵtemplate(2, AddressbookGroupListComponent_ng_template_2_Template, 11, 9, "ng-template", 2);
        i0.ɵɵtemplate(3, AddressbookGroupListComponent_ng_template_3_Template, 7, 6, "ng-template", 3);
        i0.ɵɵtemplate(4, AddressbookGroupListComponent_ng_template_4_Template, 7, 6, "ng-template", 4);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵproperty("rowHover", true)("paginator", ctx.totalRecords > 0)("lazy", true)("totalRecords", ctx.totalRecords)("value", ctx.groups)("rows", ctx.rows)("first", ctx.first)("sortField", ctx.sortField)("rowsPerPageOptions", ctx.rowOptions)("sortOrder", ctx.ascSort)("selection", ctx.selectedGroups)("metaKeySelection", true);
    } }, directives: [i9.Table, i5.PrimeTemplate, i2.DefaultValueAccessor, i10.InputText, i2.NgControlStatus, i2.NgModel, i9.SortableColumn, i9.SortIcon, i3.NgIf, i9.SelectableRow], pipes: [i4.TranslatePipe, i3.TitleCasePipe], styles: ["@media screen and (min-width: 768px) {\n  .p-d-md-table-cell[_ngcontent-%COMP%] {\n    display: table-cell !important;\n  }\n}\n@media only screen and (min-width: 992px) {\n  .p-d-lg-table-cell[_ngcontent-%COMP%] {\n    display: table-cell !important;\n  }\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvYWRkcmVzc2Jvb2svYWRkcmVzc2Jvb2stZ3JvdXAtbGlzdC9hZGRyZXNzYm9vay1ncm91cC1saXN0LmNvbXBvbmVudC5zY3NzIiwic3JjL2FwcC9hdXRoZW50aWNhdGlvbi1wYWdlcy9hZGRyZXNzYm9vay9hZGRyZXNzYm9vay1ncm91cC1saXN0L2FkZHJlc3Nib29rLWdyb3VwLWxpc3QuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRTtJQUNFLDhCQUFBO0VDQ0Y7QUFDRjtBREdBO0VBQ0U7SUFDRSw4QkFBQTtFQ0RGO0FBQ0YiLCJmaWxlIjoic3JjL2FwcC9hdXRoZW50aWNhdGlvbi1wYWdlcy9hZGRyZXNzYm9vay9hZGRyZXNzYm9vay1ncm91cC1saXN0L2FkZHJlc3Nib29rLWdyb3VwLWxpc3QuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyJAbWVkaWEgc2NyZWVuIGFuZCAobWluLXdpZHRoOiA3NjhweCkge1xuICAucC1kLW1kLXRhYmxlLWNlbGwge1xuICAgIGRpc3BsYXk6IHRhYmxlLWNlbGwgIWltcG9ydGFudDtcbiAgfVxufVxuXG4vLyBsZ1xuQG1lZGlhIG9ubHkgc2NyZWVuIGFuZCAobWluLXdpZHRoOiA5OTJweCkge1xuICAucC1kLWxnLXRhYmxlLWNlbGwge1xuICAgIGRpc3BsYXk6IHRhYmxlLWNlbGwgIWltcG9ydGFudDtcbiAgfVxufVxuIiwiQG1lZGlhIHNjcmVlbiBhbmQgKG1pbi13aWR0aDogNzY4cHgpIHtcbiAgLnAtZC1tZC10YWJsZS1jZWxsIHtcbiAgICBkaXNwbGF5OiB0YWJsZS1jZWxsICFpbXBvcnRhbnQ7XG4gIH1cbn1cbkBtZWRpYSBvbmx5IHNjcmVlbiBhbmQgKG1pbi13aWR0aDogOTkycHgpIHtcbiAgLnAtZC1sZy10YWJsZS1jZWxsIHtcbiAgICBkaXNwbGF5OiB0YWJsZS1jZWxsICFpbXBvcnRhbnQ7XG4gIH1cbn0iXX0= */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AddressbookGroupListComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-addressbook-group-list',
                templateUrl: './addressbook-group-list.component.html',
                styleUrls: ['./addressbook-group-list.component.scss']
            }]
    }], function () { return [{ type: i1.Title }, { type: i2.FormBuilder }, { type: i3.DatePipe }, { type: i4.TranslateService }, { type: i5.ConfirmationService }, { type: i5.MessageService }, { type: i6.Router }, { type: i7.AuthService }, { type: i8.AddressbookGroupService }]; }, { mode: [{
            type: core_1.Input
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/addressbook/addressbook-group-member/addressbook-group-member.component.ts":
/*!*****************************************************************************************************************!*\
  !*** ./src/app/authentication-pages/addressbook/addressbook-group-member/addressbook-group-member.component.ts ***!
  \*****************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.AddressbookGroupMemberComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/addressbook.service */ "./src/app/services/addressbook.service.ts"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/addressbook-group.service */ "./src/app/services/addressbook-group.service.ts"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! primeng/toolbar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-toolbar.js"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! primeng/table */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-table.js"));
const i10 = tslib_1.__importStar(__webpack_require__(/*! primeng/dialog */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dialog.js"));
const i11 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
const i12 = tslib_1.__importStar(__webpack_require__(/*! primeng/ripple */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-ripple.js"));
const i13 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i14 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js"));
const i15 = tslib_1.__importStar(__webpack_require__(/*! ../addressbook-not-in-group/addressbook-not-in-group.component */ "./src/app/authentication-pages/addressbook/addressbook-not-in-group/addressbook-not-in-group.component.ts"));
const i16 = tslib_1.__importStar(__webpack_require__(/*! ../addressbook-group-except-list/addressbook-group-except-list.component */ "./src/app/authentication-pages/addressbook/addressbook-group-except-list/addressbook-group-except-list.component.ts"));
const i17 = tslib_1.__importStar(__webpack_require__(/*! ../addressbook-form/addressbook-form.component */ "./src/app/authentication-pages/addressbook/addressbook-form/addressbook-form.component.ts"));
const _c0 = ["addressbookNotInGroupComponent"];
const _c1 = ["addressbookGroupExceptListComponent"];
const _c2 = ["addressbookFormComponent"];
function AddressbookGroupMemberComponent_ng_template_5_Template(rf, ctx) { if (rf & 1) {
    const _r11 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 13);
    i0.ɵɵlistener("click", function AddressbookGroupMemberComponent_ng_template_5_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r11); const ctx_r10 = i0.ɵɵnextContext(); return ctx_r10.openMemberModal("add"); });
    i0.ɵɵpipe(1, "uppercase");
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "button", 14);
    i0.ɵɵlistener("click", function AddressbookGroupMemberComponent_ng_template_5_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r11); const ctx_r12 = i0.ɵɵnextContext(); return ctx_r12.openMemberModal("move"); });
    i0.ɵɵpipe(4, "uppercase");
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(6, "button", 15);
    i0.ɵɵlistener("click", function AddressbookGroupMemberComponent_ng_template_5_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r11); const ctx_r13 = i0.ɵɵnextContext(); return ctx_r13.openMemberModal("copy"); });
    i0.ɵɵpipe(7, "uppercase");
    i0.ɵɵpipe(8, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(9, "button", 16);
    i0.ɵɵlistener("click", function AddressbookGroupMemberComponent_ng_template_5_Template_button_click_9_listener() { i0.ɵɵrestoreView(_r11); const ctx_r14 = i0.ɵɵnextContext(); return ctx_r14.confirmRemoveMemberFromGroup(); });
    i0.ɵɵpipe(10, "uppercase");
    i0.ɵɵpipe(11, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(1, 7, i0.ɵɵpipeBind1(2, 9, "button.add")));
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(4, 11, i0.ɵɵpipeBind1(5, 13, "button.move")));
    i0.ɵɵproperty("disabled", ctx_r0.selectedAddressBooks.length === 0);
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(7, 15, i0.ɵɵpipeBind1(8, 17, "button.copy")));
    i0.ɵɵproperty("disabled", ctx_r0.selectedAddressBooks.length === 0);
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(10, 19, i0.ɵɵpipeBind1(11, 21, "button.remove")));
    i0.ɵɵproperty("disabled", ctx_r0.selectedAddressBooks.length === 0);
} }
function AddressbookGroupMemberComponent_ng_template_7_Template(rf, ctx) { if (rf & 1) {
    const _r16 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 17);
    i0.ɵɵelementStart(1, "span", 18);
    i0.ɵɵelement(2, "i", 19);
    i0.ɵɵelementStart(3, "input", 20);
    i0.ɵɵlistener("keyup", function AddressbookGroupMemberComponent_ng_template_7_Template_input_keyup_3_listener() { i0.ɵɵrestoreView(_r16); const ctx_r15 = i0.ɵɵnextContext(); return ctx_r15.loadAddressBooks(null, true); })("ngModelChange", function AddressbookGroupMemberComponent_ng_template_7_Template_input_ngModelChange_3_listener($event) { i0.ɵɵrestoreView(_r16); const ctx_r17 = i0.ɵɵnextContext(); return ctx_r17.params.searchKey = $event; });
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("placeholder", i0.ɵɵpipeBind1(4, 2, "label.search"));
    i0.ɵɵproperty("ngModel", ctx_r1.params.searchKey);
} }
function AddressbookGroupMemberComponent_ng_template_8_th_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "th", 28);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelement(3, "p-sortIcon", 29);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "label.last_name"), " ");
} }
function AddressbookGroupMemberComponent_ng_template_8_th_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "th", 28);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelement(3, "p-sortIcon", 29);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "label.last_name"), " ");
} }
function AddressbookGroupMemberComponent_ng_template_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵtemplate(1, AddressbookGroupMemberComponent_ng_template_8_th_1_Template, 4, 3, "th", 21);
    i0.ɵɵelementStart(2, "th", 22);
    i0.ɵɵtext(3);
    i0.ɵɵpipe(4, "titlecase");
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelement(6, "p-sortIcon", 23);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(7, AddressbookGroupMemberComponent_ng_template_8_th_7_Template, 4, 3, "th", 21);
    i0.ɵɵelementStart(8, "th", 24);
    i0.ɵɵtext(9);
    i0.ɵɵpipe(10, "titlecase");
    i0.ɵɵpipe(11, "translate");
    i0.ɵɵelement(12, "p-sortIcon", 25);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(13, "th", 26);
    i0.ɵɵtext(14);
    i0.ɵɵpipe(15, "translate");
    i0.ɵɵelement(16, "p-sortIcon", 27);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r2.currentLanguage === "ja");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(4, 5, i0.ɵɵpipeBind1(5, 7, "label.first_name")), " ");
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("ngIf", ctx_r2.currentLanguage !== "ja");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(10, 9, i0.ɵɵpipeBind1(11, 11, "label.email_address")), " ");
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(15, 13, "label.create_date"), " ");
} }
function AddressbookGroupMemberComponent_ng_template_9_td_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "td", 32);
    i0.ɵɵelementStart(1, "span", 33);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const addressBook_r20 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("title", addressBook_r20.lastName);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(addressBook_r20.lastName);
} }
function AddressbookGroupMemberComponent_ng_template_9_td_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "td", 32);
    i0.ɵɵelementStart(1, "span", 33);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const addressBook_r20 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("title", addressBook_r20.lastName);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(addressBook_r20.lastName);
} }
function AddressbookGroupMemberComponent_ng_template_9_Template(rf, ctx) { if (rf & 1) {
    const _r27 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "tr", 30);
    i0.ɵɵlistener("dblclick", function AddressbookGroupMemberComponent_ng_template_9_Template_tr_dblclick_0_listener() { i0.ɵɵrestoreView(_r27); const addressBook_r20 = ctx.$implicit; const ctx_r26 = i0.ɵɵnextContext(); return ctx_r26.showModalDetail(addressBook_r20); });
    i0.ɵɵtemplate(1, AddressbookGroupMemberComponent_ng_template_9_td_1_Template, 3, 2, "td", 31);
    i0.ɵɵelementStart(2, "td", 32);
    i0.ɵɵelementStart(3, "span", 33);
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(5, AddressbookGroupMemberComponent_ng_template_9_td_5_Template, 3, 2, "td", 31);
    i0.ɵɵelementStart(6, "td", 34);
    i0.ɵɵelementStart(7, "span", 33);
    i0.ɵɵtext(8);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(9, "td", 35);
    i0.ɵɵtext(10);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const addressBook_r20 = ctx.$implicit;
    const rowIndex_r21 = ctx.rowIndex;
    const ctx_r3 = i0.ɵɵnextContext();
    i0.ɵɵproperty("pSelectableRow", addressBook_r20)("pSelectableRowIndex", rowIndex_r21);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r3.currentLanguage === "ja");
    i0.ɵɵadvance(2);
    i0.ɵɵpropertyInterpolate("title", addressBook_r20.firstName);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(addressBook_r20.firstName);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r3.currentLanguage !== "ja");
    i0.ɵɵadvance(2);
    i0.ɵɵpropertyInterpolate("title", addressBook_r20.mailAddress);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(addressBook_r20.mailAddress);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", ctx_r3.appUtil.formatDateBasedOnDiff(ctx_r3.datePipe, addressBook_r20.createDate), " ");
} }
function AddressbookGroupMemberComponent_ng_template_10_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "td", 36);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "td", 37);
    i0.ɵɵtext(5);
    i0.ɵɵpipe(6, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 2, "label.no_record"));
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 4, "label.no_record"));
} }
function AddressbookGroupMemberComponent_app_addressbook_not_in_group_12_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "app-addressbook-not-in-group", 38, 39);
} if (rf & 2) {
    const ctx_r5 = i0.ɵɵnextContext();
    i0.ɵɵproperty("groupId", ctx_r5.groupId);
} }
function AddressbookGroupMemberComponent_app_addressbook_group_except_list_13_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "app-addressbook-group-except-list", 40, 41);
} if (rf & 2) {
    const ctx_r6 = i0.ɵɵnextContext();
    i0.ɵɵproperty("groupId", ctx_r6.groupId)("mode", ctx_r6.modalMode);
} }
function AddressbookGroupMemberComponent_ng_template_14_Template(rf, ctx) { if (rf & 1) {
    const _r31 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 42);
    i0.ɵɵelementStart(1, "button", 43);
    i0.ɵɵlistener("click", function AddressbookGroupMemberComponent_ng_template_14_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r31); const ctx_r30 = i0.ɵɵnextContext(); return ctx_r30.isOpenModal = false; });
    i0.ɵɵpipe(2, "titlecase");
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "button", 44);
    i0.ɵɵlistener("click", function AddressbookGroupMemberComponent_ng_template_14_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r31); const ctx_r32 = i0.ɵɵnextContext(); return ctx_r32.onSubmit(); });
    i0.ɵɵpipe(5, "uppercase");
    i0.ɵɵpipe(6, "translate");
    i0.ɵɵpipe(7, "uppercase");
    i0.ɵɵpipe(8, "translate");
    i0.ɵɵpipe(9, "uppercase");
    i0.ɵɵpipe(10, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r7 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(2, 3, i0.ɵɵpipeBind1(3, 5, "label.cancel")));
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("label", ctx_r7.modalMode === "move" ? i0.ɵɵpipeBind1(5, 7, i0.ɵɵpipeBind1(6, 9, "button.move")) : ctx_r7.modalMode === "copy" ? i0.ɵɵpipeBind1(7, 11, i0.ɵɵpipeBind1(8, 13, "button.copy")) : i0.ɵɵpipeBind1(9, 15, i0.ɵɵpipeBind1(10, 17, "label.add")));
    i0.ɵɵproperty("icon", ctx_r7.modalMode === "move" ? "fas fa-arrows-alt" : ctx_r7.modalMode === "copy" ? "fas fa-copy" : "fas fa-plus");
} }
function AddressbookGroupMemberComponent_app_addressbook_form_17_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "app-addressbook-form", 45, 46);
} if (rf & 2) {
    const ctx_r8 = i0.ɵɵnextContext();
    i0.ɵɵproperty("addressBookDetail", ctx_r8.addressBookDetail);
} }
function AddressbookGroupMemberComponent_ng_template_18_Template(rf, ctx) { if (rf & 1) {
    const _r35 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 42);
    i0.ɵɵelementStart(1, "button", 43);
    i0.ɵɵlistener("click", function AddressbookGroupMemberComponent_ng_template_18_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r35); const ctx_r34 = i0.ɵɵnextContext(); return ctx_r34.isShownAddressModal = false; });
    i0.ɵɵpipe(2, "titlecase");
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "button", 47);
    i0.ɵɵlistener("click", function AddressbookGroupMemberComponent_ng_template_18_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r35); const ctx_r36 = i0.ɵɵnextContext(); return ctx_r36.doEditAddressBook(); });
    i0.ɵɵpipe(5, "uppercase");
    i0.ɵɵpipe(6, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(2, 2, i0.ɵɵpipeBind1(3, 4, "button.cancel")));
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(5, 6, i0.ɵɵpipeBind1(6, 8, "button.save")));
} }
class AddressbookGroupMemberComponent {
    constructor(datePipe, translate, confirmationService, messageService, authService, activatedRoute, addressBookService, addressBookGroupService) {
        this.datePipe = datePipe;
        this.translate = translate;
        this.confirmationService = confirmationService;
        this.messageService = messageService;
        this.authService = authService;
        this.activatedRoute = activatedRoute;
        this.addressBookService = addressBookService;
        this.addressBookGroupService = addressBookGroupService;
        this.actionSuccess = new core_1.EventEmitter();
        this.appUtil = app_util_1.default;
        this.constant = app_constants_1.default;
        this.selectedAddressBooks = [];
        this.sortField = 'createdDate';
        this.first = 0;
        this.rows = 5;
        this.params = {
            searchKey: '',
            sortField: 'createdDate',
            ascSort: false,
            pageNumber: 1,
            pageSize: 5
        };
        this.isOpenModal = false;
        this.isShownAddressModal = false;
    }
    ngOnInit() {
        this.rowOptions = this.constant.DATA_VIEW.ROW_PER_PAGE_OPTIONS;
        this.groupId = this.activatedRoute.snapshot.paramMap.get('id');
        this.params = this.addressBookGroupService.getStoreMemberGroupParams
            ? this.addressBookGroupService.getStoreMemberGroupParams : this.params;
        this.params.searchKey = '';
        this.rows = this.params.pageSize;
        this.ascSort = (this.params.ascSort) ? 1 : -1;
        this.sortField = this.params.sortField;
    }
    loadAddressBooks(event, isSearch) {
        if (event) {
            this.params.sortField = (event.sortField) ? event.sortField : 'createdDate';
            this.params.ascSort = (event.sortOrder === 1);
            if (event.rows) {
                this.params.pageNumber = (event.first / event.rows) + 1;
                this.params.pageSize = event.rows;
            }
        }
        // reset page number to 1 when search
        if (isSearch) {
            this.params.pageNumber = 1;
            this.first = 0;
        }
        if (this.getABRequest) {
            this.getABRequest.unsubscribe();
        }
        this.getABRequest = this.addressBookGroupService
            .getGroupAddressBookList(this.groupId, this.appUtil.toSnakeCaseKey(this.params))
            .subscribe(response => {
            if (response.status === 200) {
                this.addressBookGroupService.setStoreMemberGroupParams(this.params);
                this.addressBooks = response.data.content;
                this.totalRecords = response.data.totalElements;
            }
            else {
                this.messageService.add({
                    key: 'toast',
                    severity: 'error',
                    detail: this.appUtil.translate(this.translate, 'error.' + response.status)
                });
            }
        }, error => {
            this.messageService.add({
                key: 'toast',
                severity: 'error',
                detail: this.appUtil.translate(this.translate, 'error.' + error.status)
            });
        });
    }
    openMemberModal(mode) {
        this.modalMode = mode;
        if (mode === 'add') {
            this.modalHeader = this.appUtil.translate(this.translate, 'label.add_address_book_to_group');
        }
        else if (mode === 'move') {
            this.modalHeader = this.appUtil.translate(this.translate, 'label.move_address_book_to_group');
        }
        else if (mode === 'copy') {
            this.modalHeader = this.appUtil.translate(this.translate, 'label.copy_address_book_to_group');
        }
        this.isOpenModal = true;
    }
    doAddMoreMembers(addressBookIds, groupIds, cb) {
        const params = {
            addressBookIds,
            groupAddressIds: groupIds
        };
        this.addressBookGroupService.addMoreMembersToGroup(this.appUtil.toSnakeCaseKey(params)).subscribe(response => {
            if (response.status === 200) {
                this.messageService.add({
                    severity: 'success',
                    detail: this.appUtil.translate(this.translate, this.modalMode === 'copy' ? 'default_toast.copy_success' : 'default_toast.add_success')
                });
                this.first = 0;
                this.params.pageNumber = 1;
                this.loadAddressBooks(null);
                if (this.modalMode === 'add') {
                    cb && cb();
                }
            }
            else {
                this.messageService.add({
                    key: 'toast',
                    severity: 'error',
                    detail: this.appUtil.translate(this.translate, 'error.' + response.status)
                });
            }
        }, error => {
            this.messageService.add({
                key: 'toast',
                severity: 'error',
                detail: this.appUtil.translate(this.translate, 'error.' + error.status)
            });
        });
    }
    doMoveMembersToGroup(destGroup, cb) {
        const params = {
            addressBookIds: this.selectedAddressBooks.map(addressBook => addressBook.addressBookId).join(','),
            destGroupAddressId: destGroup.groupAddressId,
            sourceGroupAddressId: this.groupId
        };
        this.addressBookGroupService.moveMembersToGroup(this.appUtil.toSnakeCaseKey(params)).subscribe(response => {
            if (response.status === 200) {
                this.messageService.add({
                    severity: 'success',
                    detail: this.appUtil.translate(this.translate, 'default_toast.move_success')
                });
                // tslint:disable-next-line:no-unused-expression
                cb && cb();
            }
            else {
                this.messageService.add({
                    key: 'toast',
                    severity: 'error',
                    detail: this.appUtil.translate(this.translate, 'error.' + response.status)
                });
            }
        }, error => {
            this.messageService.add({
                key: 'toast',
                severity: 'error',
                detail: this.appUtil.translate(this.translate, 'error.' + error.status)
            });
        });
    }
    confirmRemoveMemberFromGroup() {
        this.confirmationService.confirm({
            header: this.appUtil.translate(this.translate, 'label.remove_ab_from_group_title'),
            message: this.appUtil.translate(this.translate, 'label.remove_ab_from_group_msg'),
            acceptLabel: this.appUtil.translate(this.translate, 'label.yes'),
            rejectLabel: this.appUtil.translate(this.translate, 'label.no'),
            icon: 'fas fa-exclamation-triangle text-danger',
            defaultFocus: 'none',
            accept: () => {
                this.deleteMembersInGroup();
                this.confirmationService.close();
            },
            reject: () => {
                this.confirmationService.close();
            }
        });
    }
    deleteMembersInGroup() {
        const params = {
            addressBookIds: this.selectedAddressBooks.map(addressBook => addressBook.addressBookId).join(','),
            groupAddressId: this.groupId
        };
        this.addressBookGroupService.deleteMembersInGroup(this.appUtil.toSnakeCaseKey(params))
            .subscribe(response => {
            if (response.status === 200) {
                this.messageService.add({
                    severity: 'success',
                    detail: this.appUtil.translate(this.translate, 'default_toast.delete_success')
                });
                this.first = 0;
                this.params.pageNumber = 1;
                this.loadAddressBooks(null);
                this.selectedAddressBooks = [];
                this.actionSuccess.emit(true);
            }
            else {
                this.messageService.add({
                    key: 'toast',
                    severity: 'error',
                    detail: this.appUtil.translate(this.translate, 'error.' + response.status)
                });
            }
        }, error => {
            this.messageService.add({
                key: 'toast',
                severity: 'error',
                detail: this.appUtil.translate(this.translate, 'error.' + error.status)
            });
        });
    }
    onSubmit() {
        let addressBookIds;
        let groupAddressIds;
        switch (this.modalMode) {
            case 'add':
                if (this.addressbookNotInGroupComponent.selectedAddressBooks.length === 0) {
                    return;
                }
                addressBookIds = this.addressbookNotInGroupComponent.selectedAddressBooks
                    .map(addressBook => addressBook.addressBookId).join(',');
                groupAddressIds = this.groupId;
                this.doAddMoreMembers(addressBookIds, groupAddressIds, () => {
                    this.actionSuccess.emit(true);
                });
                break;
            case 'move':
                if (this.addressbookGroupExceptListComponent.selectedGroups.length === 0) {
                    return;
                }
                this.doMoveMembersToGroup(this.addressbookGroupExceptListComponent.selectedGroups, () => {
                    this.first = 0;
                    this.params.pageNumber = 1;
                    this.loadAddressBooks(null);
                    this.selectedAddressBooks = [];
                    this.actionSuccess.emit(true);
                });
                break;
            case 'copy':
                if (this.addressbookGroupExceptListComponent.selectedGroups.length === 0) {
                    return;
                }
                addressBookIds = this.selectedAddressBooks.map(addressBook => addressBook.addressBookId).join(',');
                groupAddressIds = this.addressbookGroupExceptListComponent.selectedGroups.map(group => group.groupAddressId).join(',');
                this.doAddMoreMembers(addressBookIds, groupAddressIds);
                break;
            default:
                break;
        }
        this.isOpenModal = false;
    }
    showModalDetail(addressBook) {
        this.addressBookDetail = Object.assign({}, addressBook);
        this.isShownAddressModal = true;
    }
    doEditAddressBook() {
        this.addressbookFormComponent.addressBookFrm.markAllAsTouched();
        if (this.addressbookFormComponent.addressBookFrm.invalid) {
            return;
        }
        const params = {
            firstName: this.addressbookFormComponent.addressBookFrm.controls.firstName.value,
            lastName: this.addressbookFormComponent.addressBookFrm.controls.lastName.value
        };
        this.addressBookService.editAddressBook(this.addressBookDetail.addressBookId, this.appUtil.toSnakeCaseKey(params)).subscribe(res => {
            if (res.status === 200) {
                this.messageService.add({
                    severity: 'success',
                    detail: this.appUtil.translate(this.translate, 'default_toast.update_success')
                });
                this.loadAddressBooks(null);
                this.isShownAddressModal = false;
            }
        }, error => {
            // console.log('error', error);
        });
    }
}
exports.AddressbookGroupMemberComponent = AddressbookGroupMemberComponent;
AddressbookGroupMemberComponent.ɵfac = function AddressbookGroupMemberComponent_Factory(t) { return new (t || AddressbookGroupMemberComponent)(i0.ɵɵdirectiveInject(i1.DatePipe), i0.ɵɵdirectiveInject(i2.TranslateService), i0.ɵɵdirectiveInject(i3.ConfirmationService), i0.ɵɵdirectiveInject(i3.MessageService), i0.ɵɵdirectiveInject(i4.AuthService), i0.ɵɵdirectiveInject(i5.ActivatedRoute), i0.ɵɵdirectiveInject(i6.AddressbookService), i0.ɵɵdirectiveInject(i7.AddressbookGroupService)); };
AddressbookGroupMemberComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AddressbookGroupMemberComponent, selectors: [["app-addressbook-group-member"]], viewQuery: function AddressbookGroupMemberComponent_Query(rf, ctx) { if (rf & 1) {
        i0.ɵɵviewQuery(_c0, 1);
        i0.ɵɵviewQuery(_c1, 1);
        i0.ɵɵviewQuery(_c2, 1);
    } if (rf & 2) {
        let _t;
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.addressbookNotInGroupComponent = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.addressbookGroupExceptListComponent = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.addressbookFormComponent = _t.first);
    } }, outputs: { actionSuccess: "actionSuccess" }, decls: 19, vars: 34, consts: [[1, "page-title-lv2"], ["styleClass", "toolbar-custom p-pl-0"], ["pTemplate", "left"], ["dataKey", "addressBookId", "selectionMode", "multiple", "styleClass", "p-datatable-striped", 3, "rowHover", "paginator", "lazy", "totalRecords", "sortField", "value", "first", "rows", "rowsPerPageOptions", "sortOrder", "selection", "metaKeySelection", "firstChange", "onLazyLoad", "selectionChange"], ["pTemplate", "caption"], ["pTemplate", "header"], ["pTemplate", "body"], ["pTemplate", "emptymessage"], ["styleClass", "custom-dialog", 3, "header", "visible", "modal", "draggable", "resizable", "baseZIndex", "visibleChange"], [3, "groupId", 4, "ngIf"], [3, "groupId", "mode", 4, "ngIf"], ["pTemplate", "footer"], ["mode", "detail", 3, "addressBookDetail", 4, "ngIf"], ["icon", "pi pi-plus p-button-icon-left x-none", "pButton", "", "pRipple", "", 1, "p-button-raised", "p-button-primary", "p-mr-2", "x-none", 3, "label", "click"], ["icon", "fas fa-arrows-alt p-button-icon-left x-none", "pButton", "", "pRipple", "", 1, "p-button-raised", "p-button-primary", "p-mr-2", "x-none", 3, "disabled", "label", "click"], ["icon", "fas fa-copy p-button-icon-left x-none", "pButton", "", "pRipple", "", 1, "p-button-raised", "p-button-primary", "p-mr-2", "x-none", 3, "disabled", "label", "click"], ["icon", "pi pi-trash p-button-icon-left x-none", "pButton", "", "pRipple", "", 1, "p-button-raised", "p-button-danger", "p-mr-2", "x-none", 3, "disabled", "label", "click"], [1, "p-d-flex", "p-ai-center", "p-jc-between"], [1, "p-input-icon-left"], [1, "pi", "pi-search"], ["pInputText", "", "type", "text", 1, "search-style", "h-38", 3, "ngModel", "placeholder", "keyup", "ngModelChange"], ["class", "p-d-none p-d-lg-table-cell p-text-left", "pSortableColumn", "lastName", "style", "width:25%", 4, "ngIf"], ["pSortableColumn", "firstName", 1, "p-d-none", "p-d-lg-table-cell", "p-text-left", 2, "width", "25%"], ["field", "firstName"], ["pSortableColumn", "mailAddress", 1, "p-text-left"], ["field", "mailAddress"], ["pSortableColumn", "createdDate", 1, "p-d-none", "p-d-md-table-cell", "p-text-left", 2, "width", "20%"], ["field", "createdDate"], ["pSortableColumn", "lastName", 1, "p-d-none", "p-d-lg-table-cell", "p-text-left", 2, "width", "25%"], ["field", "lastName"], [3, "pSelectableRow", "pSelectableRowIndex", "dblclick"], ["class", "p-text-truncate p-d-none p-d-lg-table-cell p-text-left", 4, "ngIf"], [1, "p-text-truncate", "p-d-none", "p-d-lg-table-cell", "p-text-left"], [3, "title"], [1, "p-text-left", "p-text-truncate"], [1, "p-d-none", "p-d-md-table-cell", "p-text-left"], ["colspan", "4", 1, "p-text-center", "p-d-none", "p-d-lg-table-cell"], ["colspan", "2", 1, "p-text-center", "p-d-sm-table-cell", "p-d-lg-none"], [3, "groupId"], ["addressbookNotInGroupComponent", ""], [3, "groupId", "mode"], ["addressbookGroupExceptListComponent", ""], [1, "p-col-12", "p-text-right", "p-pr-0"], ["icon", "fas fa-times", "pButton", "", "pRipple", "", "type", "button", 1, "p-button-raised", "p-button-warning", "p-mr-2", 3, "label", "click"], ["type", "button", "pRipple", "", "pButton", "", 1, "p-button-raised", "p-mr-0", 3, "icon", "label", "click"], ["mode", "detail", 3, "addressBookDetail"], ["addressbookFormComponent", ""], ["icon", "fas fa-plus", "type", "button", "pRipple", "", "pButton", "", 1, "p-button-raised", "p-mr-0", 3, "label", "click"]], template: function AddressbookGroupMemberComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵtext(1);
        i0.ɵɵpipe(2, "titlecase");
        i0.ɵɵpipe(3, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(4, "p-toolbar", 1);
        i0.ɵɵtemplate(5, AddressbookGroupMemberComponent_ng_template_5_Template, 12, 23, "ng-template", 2);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(6, "p-table", 3);
        i0.ɵɵlistener("firstChange", function AddressbookGroupMemberComponent_Template_p_table_firstChange_6_listener($event) { return ctx.first = $event; })("onLazyLoad", function AddressbookGroupMemberComponent_Template_p_table_onLazyLoad_6_listener($event) { return ctx.loadAddressBooks($event); })("selectionChange", function AddressbookGroupMemberComponent_Template_p_table_selectionChange_6_listener($event) { return ctx.selectedAddressBooks = $event; });
        i0.ɵɵtemplate(7, AddressbookGroupMemberComponent_ng_template_7_Template, 5, 4, "ng-template", 4);
        i0.ɵɵtemplate(8, AddressbookGroupMemberComponent_ng_template_8_Template, 17, 15, "ng-template", 5);
        i0.ɵɵtemplate(9, AddressbookGroupMemberComponent_ng_template_9_Template, 11, 9, "ng-template", 6);
        i0.ɵɵtemplate(10, AddressbookGroupMemberComponent_ng_template_10_Template, 7, 6, "ng-template", 7);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(11, "p-dialog", 8);
        i0.ɵɵlistener("visibleChange", function AddressbookGroupMemberComponent_Template_p_dialog_visibleChange_11_listener($event) { return ctx.isOpenModal = $event; });
        i0.ɵɵtemplate(12, AddressbookGroupMemberComponent_app_addressbook_not_in_group_12_Template, 2, 1, "app-addressbook-not-in-group", 9);
        i0.ɵɵtemplate(13, AddressbookGroupMemberComponent_app_addressbook_group_except_list_13_Template, 2, 2, "app-addressbook-group-except-list", 10);
        i0.ɵɵtemplate(14, AddressbookGroupMemberComponent_ng_template_14_Template, 11, 19, "ng-template", 11);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(15, "p-dialog", 8);
        i0.ɵɵlistener("visibleChange", function AddressbookGroupMemberComponent_Template_p_dialog_visibleChange_15_listener($event) { return ctx.isShownAddressModal = $event; });
        i0.ɵɵpipe(16, "translate");
        i0.ɵɵtemplate(17, AddressbookGroupMemberComponent_app_addressbook_form_17_Template, 2, 1, "app-addressbook-form", 12);
        i0.ɵɵtemplate(18, AddressbookGroupMemberComponent_ng_template_18_Template, 7, 10, "ng-template", 11);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵadvance(1);
        i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 28, i0.ɵɵpipeBind1(3, 30, "label.address_book_list")), "\n");
        i0.ɵɵadvance(5);
        i0.ɵɵproperty("rowHover", true)("paginator", ctx.totalRecords > 0)("lazy", true)("totalRecords", ctx.totalRecords)("sortField", ctx.sortField)("value", ctx.addressBooks)("first", ctx.first)("rows", ctx.rows)("rowsPerPageOptions", ctx.rowOptions)("sortOrder", ctx.ascSort)("selection", ctx.selectedAddressBooks)("metaKeySelection", true);
        i0.ɵɵadvance(5);
        i0.ɵɵpropertyInterpolate("header", ctx.modalHeader);
        i0.ɵɵproperty("visible", ctx.isOpenModal)("modal", true)("draggable", false)("resizable", false)("baseZIndex", 10000);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.isOpenModal && ctx.modalMode === "add");
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.isOpenModal && (ctx.modalMode === "move" || ctx.modalMode === "copy"));
        i0.ɵɵadvance(2);
        i0.ɵɵpropertyInterpolate("header", i0.ɵɵpipeBind1(16, 32, "label.edit_address_book"));
        i0.ɵɵproperty("visible", ctx.isShownAddressModal)("modal", true)("draggable", false)("resizable", false)("baseZIndex", 10000);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.isShownAddressModal);
    } }, directives: [i8.Toolbar, i3.PrimeTemplate, i9.Table, i10.Dialog, i1.NgIf, i11.ButtonDirective, i12.Ripple, i13.DefaultValueAccessor, i14.InputText, i13.NgControlStatus, i13.NgModel, i9.SortableColumn, i9.SortIcon, i9.SelectableRow, i15.AddressbookNotInGroupComponent, i16.AddressbookGroupExceptListComponent, i17.AddressbookFormComponent], pipes: [i1.TitleCasePipe, i2.TranslatePipe, i1.UpperCasePipe], styles: ["@media only screen and (min-width: 992px) {\n  .p-d-lg-table-cell[_ngcontent-%COMP%] {\n    display: table-cell !important;\n  }\n}\n@media screen and (min-width: 768px) {\n  [_nghost-%COMP%]     .p-d-md-table-cell {\n    display: table-cell !important;\n  }\n  [_nghost-%COMP%]     .custom-dialog.p-dialog, [_nghost-%COMP%]     .custom-dialog.p-confirmDialog {\n    width: 50vw;\n    margin: 30px auto !important;\n  }\n}\n@media screen and (max-width: 768px) {\n  [_nghost-%COMP%]     .custom-dialog.p-dialog, [_nghost-%COMP%]     .custom-dialog.p-confirmDialog {\n    width: 80vw;\n  }\n}\n@media screen and (max-width: 576px) {\n  [_nghost-%COMP%]     .p-d-sm-table-cell {\n    display: table-cell !important;\n  }\n  [_nghost-%COMP%]     .custom-dialog.p-dialog, [_nghost-%COMP%]     .custom-dialog.p-confirmDialog {\n    width: 90vw;\n  }\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvYWRkcmVzc2Jvb2svYWRkcmVzc2Jvb2stZ3JvdXAtbWVtYmVyL2FkZHJlc3Nib29rLWdyb3VwLW1lbWJlci5jb21wb25lbnQuc2NzcyIsInNyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvYWRkcmVzc2Jvb2svYWRkcmVzc2Jvb2stZ3JvdXAtbWVtYmVyL2FkZHJlc3Nib29rLWdyb3VwLW1lbWJlci5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQTtFQUNFO0lBQ0UsOEJBQUE7RUNBRjtBQUNGO0FES0U7RUFDRTtJQUNFLDhCQUFBO0VDSEo7RURNRTs7SUFFRSxXQUFBO0lBQ0EsNEJBQUE7RUNKSjtBQUNGO0FEUUU7RUFDRTs7SUFFRSxXQUFBO0VDTko7QUFDRjtBRFVFO0VBQ0U7SUFDRSw4QkFBQTtFQ1JKO0VEV0U7O0lBRUUsV0FBQTtFQ1RKO0FBQ0YiLCJmaWxlIjoic3JjL2FwcC9hdXRoZW50aWNhdGlvbi1wYWdlcy9hZGRyZXNzYm9vay9hZGRyZXNzYm9vay1ncm91cC1tZW1iZXIvYWRkcmVzc2Jvb2stZ3JvdXAtbWVtYmVyLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLy8gbGdcbkBtZWRpYSBvbmx5IHNjcmVlbiBhbmQgKG1pbi13aWR0aDogOTkycHgpIHtcbiAgLnAtZC1sZy10YWJsZS1jZWxsIHtcbiAgICBkaXNwbGF5OiB0YWJsZS1jZWxsICFpbXBvcnRhbnQ7XG4gIH1cbn1cblxuOmhvc3QgOjpuZy1kZWVwIHtcbiAgLy8gPm1kXG4gIEBtZWRpYSBzY3JlZW4gYW5kIChtaW4td2lkdGg6IDc2OHB4KSB7XG4gICAgLnAtZC1tZC10YWJsZS1jZWxsIHtcbiAgICAgIGRpc3BsYXk6IHRhYmxlLWNlbGwgIWltcG9ydGFudDtcbiAgICB9XG5cbiAgICAuY3VzdG9tLWRpYWxvZy5wLWRpYWxvZyxcbiAgICAuY3VzdG9tLWRpYWxvZy5wLWNvbmZpcm1EaWFsb2cge1xuICAgICAgd2lkdGg6IDUwdnc7XG4gICAgICBtYXJnaW46IDMwcHggYXV0byAhaW1wb3J0YW50O1xuICAgIH1cbiAgfVxuXG4gIC8vIDxtZFxuICBAbWVkaWEgc2NyZWVuIGFuZCAobWF4LXdpZHRoOiA3NjhweCkge1xuICAgIC5jdXN0b20tZGlhbG9nLnAtZGlhbG9nLFxuICAgIC5jdXN0b20tZGlhbG9nLnAtY29uZmlybURpYWxvZyB7XG4gICAgICB3aWR0aDogODB2dztcbiAgICB9XG4gIH1cblxuICAvLyB4c1xuICBAbWVkaWEgc2NyZWVuIGFuZCAobWF4LXdpZHRoOiA1NzZweCkge1xuICAgIC5wLWQtc20tdGFibGUtY2VsbCB7XG4gICAgICBkaXNwbGF5OiB0YWJsZS1jZWxsICFpbXBvcnRhbnQ7XG4gICAgfVxuXG4gICAgLmN1c3RvbS1kaWFsb2cucC1kaWFsb2csXG4gICAgLmN1c3RvbS1kaWFsb2cucC1jb25maXJtRGlhbG9nIHtcbiAgICAgIHdpZHRoOiA5MHZ3O1xuICAgIH1cbiAgfVxuXG59XG4iLCJAbWVkaWEgb25seSBzY3JlZW4gYW5kIChtaW4td2lkdGg6IDk5MnB4KSB7XG4gIC5wLWQtbGctdGFibGUtY2VsbCB7XG4gICAgZGlzcGxheTogdGFibGUtY2VsbCAhaW1wb3J0YW50O1xuICB9XG59XG5AbWVkaWEgc2NyZWVuIGFuZCAobWluLXdpZHRoOiA3NjhweCkge1xuICA6aG9zdCA6Om5nLWRlZXAgLnAtZC1tZC10YWJsZS1jZWxsIHtcbiAgICBkaXNwbGF5OiB0YWJsZS1jZWxsICFpbXBvcnRhbnQ7XG4gIH1cbiAgOmhvc3QgOjpuZy1kZWVwIC5jdXN0b20tZGlhbG9nLnAtZGlhbG9nLFxuOmhvc3QgOjpuZy1kZWVwIC5jdXN0b20tZGlhbG9nLnAtY29uZmlybURpYWxvZyB7XG4gICAgd2lkdGg6IDUwdnc7XG4gICAgbWFyZ2luOiAzMHB4IGF1dG8gIWltcG9ydGFudDtcbiAgfVxufVxuQG1lZGlhIHNjcmVlbiBhbmQgKG1heC13aWR0aDogNzY4cHgpIHtcbiAgOmhvc3QgOjpuZy1kZWVwIC5jdXN0b20tZGlhbG9nLnAtZGlhbG9nLFxuOmhvc3QgOjpuZy1kZWVwIC5jdXN0b20tZGlhbG9nLnAtY29uZmlybURpYWxvZyB7XG4gICAgd2lkdGg6IDgwdnc7XG4gIH1cbn1cbkBtZWRpYSBzY3JlZW4gYW5kIChtYXgtd2lkdGg6IDU3NnB4KSB7XG4gIDpob3N0IDo6bmctZGVlcCAucC1kLXNtLXRhYmxlLWNlbGwge1xuICAgIGRpc3BsYXk6IHRhYmxlLWNlbGwgIWltcG9ydGFudDtcbiAgfVxuICA6aG9zdCA6Om5nLWRlZXAgLmN1c3RvbS1kaWFsb2cucC1kaWFsb2csXG46aG9zdCA6Om5nLWRlZXAgLmN1c3RvbS1kaWFsb2cucC1jb25maXJtRGlhbG9nIHtcbiAgICB3aWR0aDogOTB2dztcbiAgfVxufSJdfQ== */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AddressbookGroupMemberComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-addressbook-group-member',
                templateUrl: './addressbook-group-member.component.html',
                styleUrls: ['./addressbook-group-member.component.scss']
            }]
    }], function () { return [{ type: i1.DatePipe }, { type: i2.TranslateService }, { type: i3.ConfirmationService }, { type: i3.MessageService }, { type: i4.AuthService }, { type: i5.ActivatedRoute }, { type: i6.AddressbookService }, { type: i7.AddressbookGroupService }]; }, { addressbookNotInGroupComponent: [{
            type: core_1.ViewChild,
            args: ['addressbookNotInGroupComponent']
        }], addressbookGroupExceptListComponent: [{
            type: core_1.ViewChild,
            args: ['addressbookGroupExceptListComponent']
        }], addressbookFormComponent: [{
            type: core_1.ViewChild,
            args: ['addressbookFormComponent']
        }], actionSuccess: [{
            type: core_1.Output
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/addressbook/addressbook-group/addressbook-group.component.ts":
/*!***************************************************************************************************!*\
  !*** ./src/app/authentication-pages/addressbook/addressbook-group/addressbook-group.component.ts ***!
  \***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.AddressbookGroupComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/addressbook-group.service */ "./src/app/services/addressbook-group.service.ts"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! primeng/toolbar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-toolbar.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! ../addressbook-group-list/addressbook-group-list.component */ "./src/app/authentication-pages/addressbook/addressbook-group-list/addressbook-group-list.component.ts"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! primeng/dialog */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dialog.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! primeng/ripple */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-ripple.js"));
const i10 = tslib_1.__importStar(__webpack_require__(/*! ../addressbook-group-form/addressbook-group-form.component */ "./src/app/authentication-pages/addressbook/addressbook-group-form/addressbook-group-form.component.ts"));
const _c0 = ["addressbookGroupFormComponent"];
const _c1 = ["addressbookGroupListComponent"];
function AddressbookGroupComponent_ng_template_5_Template(rf, ctx) { if (rf & 1) {
    const _r5 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 8);
    i0.ɵɵlistener("click", function AddressbookGroupComponent_ng_template_5_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r4 = i0.ɵɵnextContext(); return ctx_r4.isShownModal = true; });
    i0.ɵɵpipe(1, "uppercase");
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "button", 9);
    i0.ɵɵlistener("click", function AddressbookGroupComponent_ng_template_5_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r5); const ctx_r6 = i0.ɵɵnextContext(); return ctx_r6.confirmDeleteGroups(); });
    i0.ɵɵpipe(4, "uppercase");
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵnextContext();
    const _r1 = i0.ɵɵreference(7);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(1, 3, i0.ɵɵpipeBind1(2, 5, "button.add")));
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(4, 7, i0.ɵɵpipeBind1(5, 9, "button.delete")));
    i0.ɵɵproperty("disabled", _r1.selectedGroups.length === 0);
} }
function AddressbookGroupComponent_app_addressbook_group_form_10_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "app-addressbook-group-form", 10, 11);
} if (rf & 2) {
    i0.ɵɵproperty("mode", "create");
} }
function AddressbookGroupComponent_ng_template_11_Template(rf, ctx) { if (rf & 1) {
    const _r9 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 12);
    i0.ɵɵelementStart(1, "button", 13);
    i0.ɵɵlistener("click", function AddressbookGroupComponent_ng_template_11_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r9); const ctx_r8 = i0.ɵɵnextContext(); return ctx_r8.isShownModal = false; });
    i0.ɵɵpipe(2, "titlecase");
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "button", 14);
    i0.ɵɵlistener("click", function AddressbookGroupComponent_ng_template_11_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r9); const ctx_r10 = i0.ɵɵnextContext(); return ctx_r10.createNewGroup(); });
    i0.ɵɵpipe(5, "uppercase");
    i0.ɵɵpipe(6, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(2, 2, i0.ɵɵpipeBind1(3, 4, "label.cancel")));
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(5, 6, i0.ɵɵpipeBind1(6, 8, "label.add")));
} }
class AddressbookGroupComponent {
    constructor(translate, confirmationService, messageService, addressBookGroupService) {
        this.translate = translate;
        this.confirmationService = confirmationService;
        this.messageService = messageService;
        this.addressBookGroupService = addressBookGroupService;
        this.appUtil = app_util_1.default;
        this.constant = app_constants_1.default;
        this.isShownModal = false;
    }
    ngOnInit() {
    }
    createNewGroup() {
        this.addressbookGroupFormComponent.groupFrm.markAllAsTouched();
        if (this.addressbookGroupFormComponent.groupFrm.invalid) {
            return;
        }
        const params = {
            name: this.addressbookGroupFormComponent.groupFrm.controls.groupName.value,
            emails: this.addressbookGroupFormComponent.groupFrm.controls.members.value.map(item => item.value).join(','),
            description: this.addressbookGroupFormComponent.groupFrm.controls.description.value
        };
        this.addressBookGroupService.createAddressBookGroup(this.appUtil.toSnakeCaseKey(params)).subscribe(res => {
            if (res.status === 200) {
                this.messageService.add({
                    severity: 'success',
                    detail: this.appUtil.translate(this.translate, 'default_toast.create_success')
                });
                this.isShownModal = false;
                this.addressbookGroupListComponent.first = 0;
                this.addressbookGroupListComponent.params.pageNumber = 1;
                this.addressbookGroupListComponent.loadGroups(null);
            }
        }, error => {
            this.messageService.add({
                severity: 'error',
                detail: this.appUtil.translate(this.translate, 'error.' + error.status)
            });
        });
    }
    confirmDeleteGroups() {
        this.confirmationService.confirm({
            header: this.appUtil.translate(this.translate, 'label.delete_address_group'),
            message: this.appUtil.translate(this.translate, 'label.delete_address_group_message'),
            acceptLabel: this.appUtil.translate(this.translate, 'button.delete'),
            rejectLabel: this.appUtil.translate(this.translate, 'button.cancel'),
            acceptButtonStyleClass: 'p-button-danger',
            rejectButtonStyleClass: 'p-button-warning',
            dismissableMask: true,
            defaultFocus: 'none',
            accept: () => {
                this.doDeleteGroups();
                this.confirmationService.close();
            },
            reject: () => {
                this.confirmationService.close();
            }
        });
    }
    doDeleteGroups() {
        let promises = [];
        // delete address books
        if (this.addressbookGroupListComponent.selectedGroups.length > 0) {
            this.addressbookGroupListComponent.selectedGroups.forEach(group => {
                promises = [...promises, this.deleteSingleGroup(group)];
            });
        }
        Promise.all(promises).then(responses => {
            let success = true;
            responses.forEach(res => {
                if (res.data && res.data.status !== 200) {
                    success = false;
                    this.messageService.add({
                        severity: 'error',
                        detail: res.data.message
                    });
                }
            });
            if (success) {
                this.messageService.add({
                    severity: 'success',
                    detail: this.appUtil.translate(this.translate, 'default_toast.delete_success')
                });
            }
            this.addressbookGroupListComponent.selectedGroups = [];
            this.addressbookGroupListComponent.first = 0;
            this.addressbookGroupListComponent.params.pageNumber = 1;
            this.addressbookGroupListComponent.loadGroups(null);
        });
    }
    deleteSingleGroup(group) {
        const params = {
            groupAddressId: group.groupAddressId
        };
        return new Promise((resolve) => {
            this.addressBookGroupService.deleteAddressBookGroup(this.appUtil.toSnakeCaseKey(params))
                .subscribe(res => {
                if (res.status === 200) {
                    resolve(res.data);
                }
                else {
                    resolve();
                }
            });
        });
    }
}
exports.AddressbookGroupComponent = AddressbookGroupComponent;
AddressbookGroupComponent.ɵfac = function AddressbookGroupComponent_Factory(t) { return new (t || AddressbookGroupComponent)(i0.ɵɵdirectiveInject(i1.TranslateService), i0.ɵɵdirectiveInject(i2.ConfirmationService), i0.ɵɵdirectiveInject(i2.MessageService), i0.ɵɵdirectiveInject(i3.AddressbookGroupService)); };
AddressbookGroupComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AddressbookGroupComponent, selectors: [["app-addressbook-group"]], viewQuery: function AddressbookGroupComponent_Query(rf, ctx) { if (rf & 1) {
        i0.ɵɵviewQuery(_c0, 1);
        i0.ɵɵviewQuery(_c1, 1);
    } if (rf & 2) {
        let _t;
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.addressbookGroupFormComponent = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.addressbookGroupListComponent = _t.first);
    } }, decls: 12, vars: 14, consts: [[1, "page-title"], ["styleClass", "toolbar-custom"], ["pTemplate", "left"], ["mode", "full"], ["addressbookGroupListComponent", ""], ["styleClass", "custom-dialog", 3, "header", "visible", "modal", "draggable", "resizable", "baseZIndex", "visibleChange"], [3, "mode", 4, "ngIf"], ["pTemplate", "footer"], ["icon", "pi pi-plus p-button-icon-left x-none", "pButton", "", "pRipple", "", 1, "p-button-raised", "p-button-primary", "p-mr-2", "x-none", 3, "label", "click"], ["icon", "pi pi-trash p-button-icon-left x-none", "pButton", "", "pRipple", "", 1, "p-button-raised", "p-button-danger", "p-mr-2", "x-none", 3, "disabled", "label", "click"], [3, "mode"], ["addressbookGroupFormComponent", ""], [1, "p-col-12", "p-text-right", "p-pr-0"], ["icon", "fas fa-times", "pButton", "", "pRipple", "", "type", "button", 1, "p-button-raised", "p-button-warning", "p-mr-2", 3, "label", "click"], ["icon", "fas fa-plus", "type", "button", "pRipple", "", "pButton", "", 1, "p-button-raised", "p-mr-0", 3, "label", "click"]], template: function AddressbookGroupComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵtext(1);
        i0.ɵɵpipe(2, "titlecase");
        i0.ɵɵpipe(3, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(4, "p-toolbar", 1);
        i0.ɵɵtemplate(5, AddressbookGroupComponent_ng_template_5_Template, 6, 11, "ng-template", 2);
        i0.ɵɵelementEnd();
        i0.ɵɵelement(6, "app-addressbook-group-list", 3, 4);
        i0.ɵɵelementStart(8, "p-dialog", 5);
        i0.ɵɵlistener("visibleChange", function AddressbookGroupComponent_Template_p_dialog_visibleChange_8_listener($event) { return ctx.isShownModal = $event; });
        i0.ɵɵpipe(9, "translate");
        i0.ɵɵtemplate(10, AddressbookGroupComponent_app_addressbook_group_form_10_Template, 2, 1, "app-addressbook-group-form", 6);
        i0.ɵɵtemplate(11, AddressbookGroupComponent_ng_template_11_Template, 7, 10, "ng-template", 7);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵadvance(1);
        i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 8, i0.ɵɵpipeBind1(3, 10, "label.address_book_group_list")), "\n");
        i0.ɵɵadvance(7);
        i0.ɵɵpropertyInterpolate("header", i0.ɵɵpipeBind1(9, 12, "label.add_new_address_group"));
        i0.ɵɵproperty("visible", ctx.isShownModal)("modal", true)("draggable", false)("resizable", false)("baseZIndex", 10000);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.isShownModal);
    } }, directives: [i4.Toolbar, i2.PrimeTemplate, i5.AddressbookGroupListComponent, i6.Dialog, i7.NgIf, i8.ButtonDirective, i9.Ripple, i10.AddressbookGroupFormComponent], pipes: [i7.TitleCasePipe, i1.TranslatePipe, i7.UpperCasePipe], styles: ["@media screen and (min-width: 768px) {\n  [_nghost-%COMP%]     .p-d-md-table-cell {\n    display: table-cell !important;\n  }\n  [_nghost-%COMP%]     .custom-dialog.p-dialog, [_nghost-%COMP%]     .custom-dialog.p-confirmDialog {\n    width: 50vw;\n    margin: 30px auto !important;\n  }\n}\n@media screen and (max-width: 768px) {\n  [_nghost-%COMP%]     .custom-dialog.p-dialog, [_nghost-%COMP%]     .custom-dialog.p-confirmDialog {\n    width: 80vw;\n  }\n}\n@media screen and (max-width: 576px) {\n  [_nghost-%COMP%]     .p-d-sm-table-cell {\n    display: table-cell !important;\n  }\n  [_nghost-%COMP%]     .custom-dialog.p-dialog, [_nghost-%COMP%]     .custom-dialog.p-confirmDialog {\n    width: 90vw;\n  }\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvYWRkcmVzc2Jvb2svYWRkcmVzc2Jvb2stZ3JvdXAvYWRkcmVzc2Jvb2stZ3JvdXAuY29tcG9uZW50LnNjc3MiLCJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2FkZHJlc3Nib29rL2FkZHJlc3Nib29rLWdyb3VwL2FkZHJlc3Nib29rLWdyb3VwLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVFO0VBQ0U7SUFDRSw4QkFBQTtFQ0RKO0VESUU7O0lBRUUsV0FBQTtJQUNBLDRCQUFBO0VDRko7QUFDRjtBRE1FO0VBQ0U7O0lBRUUsV0FBQTtFQ0pKO0FBQ0Y7QURRRTtFQUNFO0lBQ0UsOEJBQUE7RUNOSjtFRFNFOztJQUVFLFdBQUE7RUNQSjtBQUNGIiwiZmlsZSI6InNyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvYWRkcmVzc2Jvb2svYWRkcmVzc2Jvb2stZ3JvdXAvYWRkcmVzc2Jvb2stZ3JvdXAuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyI6aG9zdCA6Om5nLWRlZXAge1xuICAvLyA+bWRcbiAgQG1lZGlhIHNjcmVlbiBhbmQgKG1pbi13aWR0aDogNzY4cHgpIHtcbiAgICAucC1kLW1kLXRhYmxlLWNlbGwge1xuICAgICAgZGlzcGxheTogdGFibGUtY2VsbCAhaW1wb3J0YW50O1xuICAgIH1cblxuICAgIC5jdXN0b20tZGlhbG9nLnAtZGlhbG9nLFxuICAgIC5jdXN0b20tZGlhbG9nLnAtY29uZmlybURpYWxvZyB7XG4gICAgICB3aWR0aDogNTB2dztcbiAgICAgIG1hcmdpbjogMzBweCBhdXRvICFpbXBvcnRhbnQ7XG4gICAgfVxuICB9XG5cbiAgLy8gPG1kXG4gIEBtZWRpYSBzY3JlZW4gYW5kIChtYXgtd2lkdGg6IDc2OHB4KSB7XG4gICAgLmN1c3RvbS1kaWFsb2cucC1kaWFsb2csXG4gICAgLmN1c3RvbS1kaWFsb2cucC1jb25maXJtRGlhbG9nIHtcbiAgICAgIHdpZHRoOiA4MHZ3O1xuICAgIH1cbiAgfVxuXG4gIC8vIHhzXG4gIEBtZWRpYSBzY3JlZW4gYW5kIChtYXgtd2lkdGg6IDU3NnB4KSB7XG4gICAgLnAtZC1zbS10YWJsZS1jZWxsIHtcbiAgICAgIGRpc3BsYXk6IHRhYmxlLWNlbGwgIWltcG9ydGFudDtcbiAgICB9XG5cbiAgICAuY3VzdG9tLWRpYWxvZy5wLWRpYWxvZyxcbiAgICAuY3VzdG9tLWRpYWxvZy5wLWNvbmZpcm1EaWFsb2cge1xuICAgICAgd2lkdGg6IDkwdnc7XG4gICAgfVxuICB9XG59XG4iLCJAbWVkaWEgc2NyZWVuIGFuZCAobWluLXdpZHRoOiA3NjhweCkge1xuICA6aG9zdCA6Om5nLWRlZXAgLnAtZC1tZC10YWJsZS1jZWxsIHtcbiAgICBkaXNwbGF5OiB0YWJsZS1jZWxsICFpbXBvcnRhbnQ7XG4gIH1cbiAgOmhvc3QgOjpuZy1kZWVwIC5jdXN0b20tZGlhbG9nLnAtZGlhbG9nLFxuOmhvc3QgOjpuZy1kZWVwIC5jdXN0b20tZGlhbG9nLnAtY29uZmlybURpYWxvZyB7XG4gICAgd2lkdGg6IDUwdnc7XG4gICAgbWFyZ2luOiAzMHB4IGF1dG8gIWltcG9ydGFudDtcbiAgfVxufVxuQG1lZGlhIHNjcmVlbiBhbmQgKG1heC13aWR0aDogNzY4cHgpIHtcbiAgOmhvc3QgOjpuZy1kZWVwIC5jdXN0b20tZGlhbG9nLnAtZGlhbG9nLFxuOmhvc3QgOjpuZy1kZWVwIC5jdXN0b20tZGlhbG9nLnAtY29uZmlybURpYWxvZyB7XG4gICAgd2lkdGg6IDgwdnc7XG4gIH1cbn1cbkBtZWRpYSBzY3JlZW4gYW5kIChtYXgtd2lkdGg6IDU3NnB4KSB7XG4gIDpob3N0IDo6bmctZGVlcCAucC1kLXNtLXRhYmxlLWNlbGwge1xuICAgIGRpc3BsYXk6IHRhYmxlLWNlbGwgIWltcG9ydGFudDtcbiAgfVxuICA6aG9zdCA6Om5nLWRlZXAgLmN1c3RvbS1kaWFsb2cucC1kaWFsb2csXG46aG9zdCA6Om5nLWRlZXAgLmN1c3RvbS1kaWFsb2cucC1jb25maXJtRGlhbG9nIHtcbiAgICB3aWR0aDogOTB2dztcbiAgfVxufSJdfQ== */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AddressbookGroupComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-addressbook-group',
                templateUrl: './addressbook-group.component.html',
                styleUrls: ['./addressbook-group.component.scss']
            }]
    }], function () { return [{ type: i1.TranslateService }, { type: i2.ConfirmationService }, { type: i2.MessageService }, { type: i3.AddressbookGroupService }]; }, { addressbookGroupFormComponent: [{
            type: core_1.ViewChild,
            args: ['addressbookGroupFormComponent']
        }], addressbookGroupListComponent: [{
            type: core_1.ViewChild,
            args: ['addressbookGroupListComponent']
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/addressbook/addressbook-list/addressbook-list.component.ts":
/*!*************************************************************************************************!*\
  !*** ./src/app/authentication-pages/addressbook/addressbook-list/addressbook-list.component.ts ***!
  \*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.AddressbookListComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const addressbook_model_1 = __webpack_require__(/*! ../../../../models/addressbook.model */ "./src/models/addressbook.model.ts");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/__ivy_ngcc__/fesm2015/platform-browser.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/addressbook-group.service */ "./src/app/services/addressbook-group.service.ts"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/addressbook.service */ "./src/app/services/addressbook.service.ts"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! primeng/toolbar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-toolbar.js"));
const i10 = tslib_1.__importStar(__webpack_require__(/*! primeng/table */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-table.js"));
const i11 = tslib_1.__importStar(__webpack_require__(/*! primeng/dialog */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dialog.js"));
const i12 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
const i13 = tslib_1.__importStar(__webpack_require__(/*! primeng/ripple */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-ripple.js"));
const i14 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js"));
const i15 = tslib_1.__importStar(__webpack_require__(/*! ../addressbook-form/addressbook-form.component */ "./src/app/authentication-pages/addressbook/addressbook-form/addressbook-form.component.ts"));
const i16 = tslib_1.__importStar(__webpack_require__(/*! ../addressbook-group-list/addressbook-group-list.component */ "./src/app/authentication-pages/addressbook/addressbook-group-list/addressbook-group-list.component.ts"));
const _c0 = ["addressbookFormComponent"];
const _c1 = ["addressbookGroupListComponent"];
function AddressbookListComponent_ng_template_5_Template(rf, ctx) { if (rf & 1) {
    const _r9 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 12);
    i0.ɵɵlistener("click", function AddressbookListComponent_ng_template_5_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r9); const ctx_r8 = i0.ɵɵnextContext(); return ctx_r8.openCreateNewAddressBookModal(); });
    i0.ɵɵpipe(1, "uppercase");
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "button", 13);
    i0.ɵɵlistener("click", function AddressbookListComponent_ng_template_5_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r9); const ctx_r10 = i0.ɵɵnextContext(); return ctx_r10.openGroupModal(); });
    i0.ɵɵpipe(4, "uppercase");
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(6, "button", 14);
    i0.ɵɵlistener("click", function AddressbookListComponent_ng_template_5_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r9); const ctx_r11 = i0.ɵɵnextContext(); return ctx_r11.confirmDeleteAddressBooks(); });
    i0.ɵɵpipe(7, "uppercase");
    i0.ɵɵpipe(8, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(1, 5, i0.ɵɵpipeBind1(2, 7, "button.add")));
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(4, 9, i0.ɵɵpipeBind1(5, 11, "button.add_to_group")));
    i0.ɵɵproperty("disabled", ctx_r0.selectedAddressBooks.length === 0);
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(7, 13, i0.ɵɵpipeBind1(8, 15, "button.delete")));
    i0.ɵɵproperty("disabled", ctx_r0.selectedAddressBooks.length === 0);
} }
function AddressbookListComponent_ng_template_7_Template(rf, ctx) { if (rf & 1) {
    const _r13 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 15);
    i0.ɵɵelementStart(1, "span", 16);
    i0.ɵɵelement(2, "i", 17);
    i0.ɵɵelementStart(3, "input", 18);
    i0.ɵɵlistener("keyup", function AddressbookListComponent_ng_template_7_Template_input_keyup_3_listener() { i0.ɵɵrestoreView(_r13); const ctx_r12 = i0.ɵɵnextContext(); return ctx_r12.loadAddressBooks(null, true); })("ngModelChange", function AddressbookListComponent_ng_template_7_Template_input_ngModelChange_3_listener($event) { i0.ɵɵrestoreView(_r13); const ctx_r14 = i0.ɵɵnextContext(); return ctx_r14.params.searchKey = $event; });
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("placeholder", i0.ɵɵpipeBind1(4, 2, "label.search"));
    i0.ɵɵproperty("ngModel", ctx_r1.params.searchKey);
} }
function AddressbookListComponent_ng_template_8_th_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "th", 26);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelement(3, "p-sortIcon", 27);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "label.last_name"), " ");
} }
function AddressbookListComponent_ng_template_8_th_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "th", 26);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelement(3, "p-sortIcon", 27);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "label.last_name"), " ");
} }
function AddressbookListComponent_ng_template_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵtemplate(1, AddressbookListComponent_ng_template_8_th_1_Template, 4, 3, "th", 19);
    i0.ɵɵelementStart(2, "th", 20);
    i0.ɵɵtext(3);
    i0.ɵɵpipe(4, "titlecase");
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelement(6, "p-sortIcon", 21);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(7, AddressbookListComponent_ng_template_8_th_7_Template, 4, 3, "th", 19);
    i0.ɵɵelementStart(8, "th", 22);
    i0.ɵɵtext(9);
    i0.ɵɵpipe(10, "titlecase");
    i0.ɵɵpipe(11, "translate");
    i0.ɵɵelement(12, "p-sortIcon", 23);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(13, "th", 24);
    i0.ɵɵtext(14);
    i0.ɵɵpipe(15, "translate");
    i0.ɵɵelement(16, "p-sortIcon", 25);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r2.currentLanguage === "ja");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(4, 5, i0.ɵɵpipeBind1(5, 7, "label.first_name")), " ");
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("ngIf", ctx_r2.currentLanguage !== "ja");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(10, 9, i0.ɵɵpipeBind1(11, 11, "label.email")), " ");
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(15, 13, "label.create_date"), " ");
} }
function AddressbookListComponent_ng_template_9_td_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "td", 30);
    i0.ɵɵelementStart(1, "span", 31);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const addressBook_r17 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("title", addressBook_r17.lastName);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(addressBook_r17.lastName);
} }
function AddressbookListComponent_ng_template_9_td_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "td", 30);
    i0.ɵɵelementStart(1, "span", 31);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const addressBook_r17 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("title", addressBook_r17.lastName);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(addressBook_r17.lastName);
} }
function AddressbookListComponent_ng_template_9_Template(rf, ctx) { if (rf & 1) {
    const _r24 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "tr", 28);
    i0.ɵɵlistener("dblclick", function AddressbookListComponent_ng_template_9_Template_tr_dblclick_0_listener() { i0.ɵɵrestoreView(_r24); const addressBook_r17 = ctx.$implicit; const ctx_r23 = i0.ɵɵnextContext(); return ctx_r23.openAddressBookDetailModal(addressBook_r17); });
    i0.ɵɵtemplate(1, AddressbookListComponent_ng_template_9_td_1_Template, 3, 2, "td", 29);
    i0.ɵɵelementStart(2, "td", 30);
    i0.ɵɵelementStart(3, "span", 31);
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(5, AddressbookListComponent_ng_template_9_td_5_Template, 3, 2, "td", 29);
    i0.ɵɵelementStart(6, "td", 32);
    i0.ɵɵelementStart(7, "span", 31);
    i0.ɵɵtext(8);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(9, "td", 33);
    i0.ɵɵtext(10);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const addressBook_r17 = ctx.$implicit;
    const rowIndex_r18 = ctx.rowIndex;
    const ctx_r3 = i0.ɵɵnextContext();
    i0.ɵɵproperty("pSelectableRow", addressBook_r17)("pSelectableRowIndex", rowIndex_r18);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r3.currentLanguage === "ja");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("title", addressBook_r17.firstName);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(addressBook_r17.firstName);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r3.currentLanguage !== "ja");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("title", addressBook_r17.mailAddress);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(addressBook_r17.mailAddress);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", ctx_r3.appUtil.formatDateBasedOnDiff(ctx_r3.datePipe, addressBook_r17.createDate), " ");
} }
function AddressbookListComponent_ng_template_10_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "td", 34);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "td", 35);
    i0.ɵɵtext(5);
    i0.ɵɵpipe(6, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 2, "label.no_record"));
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 4, "label.no_record"));
} }
function AddressbookListComponent_app_addressbook_form_12_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "app-addressbook-form", 36, 37);
} if (rf & 2) {
    const ctx_r5 = i0.ɵɵnextContext();
    i0.ɵɵproperty("mode", ctx_r5.mode)("addressBookDetail", ctx_r5.addressBookDetail);
} }
function AddressbookListComponent_app_addressbook_group_list_13_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "app-addressbook-group-list", null, 38);
} }
function AddressbookListComponent_ng_template_14_Template(rf, ctx) { if (rf & 1) {
    const _r28 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 39);
    i0.ɵɵelementStart(1, "button", 40);
    i0.ɵɵlistener("click", function AddressbookListComponent_ng_template_14_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r28); const ctx_r27 = i0.ɵɵnextContext(); return ctx_r27.isShownAddressModal = false; });
    i0.ɵɵpipe(2, "titlecase");
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "button", 41);
    i0.ɵɵlistener("click", function AddressbookListComponent_ng_template_14_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r28); const ctx_r29 = i0.ɵɵnextContext(); return ctx_r29.doSubmit(); });
    i0.ɵɵpipe(5, "uppercase");
    i0.ɵɵpipe(6, "translate");
    i0.ɵɵpipe(7, "uppercase");
    i0.ɵɵpipe(8, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r7 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(2, 2, i0.ɵɵpipeBind1(3, 4, "button.cancel")));
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("label", ctx_r7.mode === "detail" ? i0.ɵɵpipeBind1(5, 6, i0.ɵɵpipeBind1(6, 8, "button.save")) : i0.ɵɵpipeBind1(7, 10, i0.ɵɵpipeBind1(8, 12, "button.add")));
} }
class AddressbookListComponent {
    constructor(titleService, fb, datePipe, translate, confirmationService, messageService, authService, addressBookGroupService, addressBookService) {
        this.titleService = titleService;
        this.fb = fb;
        this.datePipe = datePipe;
        this.translate = translate;
        this.confirmationService = confirmationService;
        this.messageService = messageService;
        this.authService = authService;
        this.addressBookGroupService = addressBookGroupService;
        this.addressBookService = addressBookService;
        this.appUtil = app_util_1.default;
        this.constant = app_constants_1.default;
        this.isSubmitting = false;
        this.isShownAddressModal = false;
        this.selectedAddressBooks = [];
        this.sortField = 'createdDate';
        this.first = 0;
        this.rows = 10;
        this.params = {
            searchKey: '',
            pageNumber: 1,
            pageSize: 10,
            sortField: 'createdDate',
            ascSort: false,
        };
        this.addressBookDetail = new addressbook_model_1.AddressBook();
        this.translate.get(['page_title.address_book_list']).subscribe(translation => {
            this.titleService.setTitle(translation['page_title.address_book_list']);
        });
    }
    ngOnInit() {
        this.rowOptions = this.constant.DATA_VIEW.ROW_PER_PAGE_OPTIONS;
        this.currentLanguage = this.authService.getUserLanguage;
        this.params = this.addressBookService.getStoreParams
            ? this.addressBookService.getStoreParams : this.params;
        this.params.searchKey = '';
        this.rows = this.params.pageSize;
        this.ascSort = (this.params.ascSort) ? 1 : -1;
        this.sortField = this.params.sortField;
    }
    loadAddressBooks(event, isSearch) {
        if (event) {
            this.params.sortField = (event.sortField) ? event.sortField : 'createdDate';
            this.params.ascSort = (event.sortOrder === 1);
            if (event.rows) {
                this.params.pageNumber = (event.first / event.rows) + 1;
                this.params.pageSize = event.rows;
            }
        }
        // reset page number to 1 when search
        if (isSearch) {
            this.params.pageNumber = 1;
            this.first = 0;
        }
        if (this.getABRequest) {
            this.getABRequest.unsubscribe();
        }
        this.getABRequest = this.addressBookService.getAddressBookList(this.appUtil.toSnakeCaseKey(this.params)).subscribe(response => {
            if (response.status === 200) {
                this.addressBookService.setStoreParams(this.params);
                this.addressBooks = response.data.content;
                this.totalRecords = response.data.totalElements;
            }
            else {
                this.messageService.add({
                    key: 'toast',
                    severity: 'error',
                    detail: this.appUtil.translate(this.translate, 'error.' + response.status)
                });
            }
        }, error => {
            this.messageService.add({
                key: 'toast',
                severity: 'error',
                detail: this.appUtil.translate(this.translate, 'error.' + error.status)
            });
        });
    }
    translateText(key) {
        return this.appUtil.translate(this.translate, key);
    }
    openCreateNewAddressBookModal() {
        this.mode = 'create';
        this.addressBookDetail = new addressbook_model_1.AddressBook();
        this.isShownAddressModal = true;
    }
    openAddressBookDetailModal(addressBook) {
        this.mode = 'detail';
        this.addressBookDetail = Object.assign({}, addressBook);
        this.isShownAddressModal = true;
    }
    openGroupModal() {
        this.mode = 'addToGroup';
        this.isShownAddressModal = true;
    }
    doSubmit() {
        if (this.mode === 'create') {
            this.addressbookFormComponent.addressBookFrm.markAllAsTouched();
            if (this.addressbookFormComponent.addressBookFrm.invalid || this.isSubmitting) {
                return;
            }
            this.isSubmitting = true;
            this.createAddressBook();
        }
        else if (this.mode === 'detail') {
            this.addressbookFormComponent.addressBookFrm.markAllAsTouched();
            if (this.addressbookFormComponent.addressBookFrm.invalid || this.isSubmitting) {
                return;
            }
            this.isSubmitting = true;
            this.editAddressBook();
        }
        else if (this.mode === 'addToGroup') {
            if (this.addressbookGroupListComponent.selectedGroups.length === 0 || this.isSubmitting) {
                return;
            }
            this.isSubmitting = true;
            this.addToGroup();
        }
    }
    createAddressBook() {
        const params = {
            firstName: this.addressbookFormComponent.addressBookFrm.controls.firstName.value,
            lastName: this.addressbookFormComponent.addressBookFrm.controls.lastName.value,
            mailAddress: this.addressbookFormComponent.addressBookFrm.controls.emailAddress.value
        };
        this.addressBookService.createAddressBook(this.appUtil.toSnakeCaseKey(params)).subscribe(res => {
            if (res.status === 200) {
                this.messageService.add({
                    severity: 'success',
                    detail: this.appUtil.translate(this.translate, 'default_toast.create_success')
                });
                this.first = 0;
                this.params.pageNumber = 1;
                this.loadAddressBooks(null);
                this.isShownAddressModal = false;
            }
            this.isSubmitting = false;
        }, error => {
            // console.log('error', error);
        });
    }
    editAddressBook() {
        const params = {
            firstName: this.addressbookFormComponent.addressBookFrm.controls.firstName.value,
            lastName: this.addressbookFormComponent.addressBookFrm.controls.lastName.value
        };
        this.addressBookService.editAddressBook(this.addressBookDetail.addressBookId, this.appUtil.toSnakeCaseKey(params)).subscribe(res => {
            if (res.status === 200) {
                this.messageService.add({
                    severity: 'success',
                    detail: this.appUtil.translate(this.translate, 'default_toast.save_success')
                });
                this.loadAddressBooks(null);
                this.isShownAddressModal = false;
            }
            this.isSubmitting = false;
        }, error => {
            // console.log('error', error);
        });
    }
    addToGroup() {
        const params = {
            addressBookIds: this.selectedAddressBooks.map(addressBook => addressBook.addressBookId).join(','),
            groupAddressIds: this.addressbookGroupListComponent.selectedGroups
                .map(group => group.groupAddressId).join(',')
        };
        this.addressBookGroupService.addMoreMembersToGroup(this.appUtil.toSnakeCaseKey(params)).subscribe(response => {
            if (response.status === 200) {
                this.messageService.add({
                    severity: 'success',
                    detail: this.appUtil.translate(this.translate, 'default_toast.add_success')
                });
                this.isShownAddressModal = false;
            }
            this.isSubmitting = false;
        });
    }
    confirmDeleteAddressBooks() {
        this.confirmationService.confirm({
            header: this.appUtil.translate(this.translate, 'label.delete_address_book'),
            message: this.appUtil.translate(this.translate, 'label.delete_address_book_message'),
            acceptLabel: this.appUtil.translate(this.translate, 'button.delete'),
            rejectLabel: this.appUtil.translate(this.translate, 'button.cancel'),
            acceptButtonStyleClass: 'p-button-danger',
            rejectButtonStyleClass: 'p-button-warning',
            dismissableMask: true,
            defaultFocus: 'none',
            accept: () => {
                this.doDeleteAddressBook();
                this.confirmationService.close();
            },
            reject: () => {
                this.confirmationService.close();
            }
        });
    }
    doDeleteAddressBook() {
        let promises = [];
        // delete address books
        if (this.selectedAddressBooks.length > 0) {
            this.selectedAddressBooks.forEach(addressBook => {
                promises = [...promises, this.deleteSingleAddressBook(addressBook)];
            });
        }
        Promise.all(promises).then(responses => {
            let success = true;
            responses.forEach(res => {
                if (res.data && res.data.status !== 200) {
                    success = false;
                    this.messageService.add({
                        severity: 'error',
                        detail: res.data.message
                    });
                }
            });
            if (success) {
                this.messageService.add({
                    severity: 'success',
                    detail: this.appUtil.translate(this.translate, 'default_toast.delete_success')
                });
            }
            this.selectedAddressBooks = [];
            this.first = 0;
            this.params.pageNumber = 1;
            this.loadAddressBooks(null);
        });
    }
    deleteSingleAddressBook(addressBook) {
        const params = {
            addressBookId: addressBook.addressBookId
        };
        return new Promise((resolve) => {
            this.addressBookService.deleteAddressBook(this.appUtil.toSnakeCaseKey(params))
                .subscribe(res => {
                if (res.status === 200) {
                    resolve(res.data);
                }
                else {
                    resolve();
                }
            });
        });
    }
}
exports.AddressbookListComponent = AddressbookListComponent;
AddressbookListComponent.ɵfac = function AddressbookListComponent_Factory(t) { return new (t || AddressbookListComponent)(i0.ɵɵdirectiveInject(i1.Title), i0.ɵɵdirectiveInject(i2.FormBuilder), i0.ɵɵdirectiveInject(i3.DatePipe), i0.ɵɵdirectiveInject(i4.TranslateService), i0.ɵɵdirectiveInject(i5.ConfirmationService), i0.ɵɵdirectiveInject(i5.MessageService), i0.ɵɵdirectiveInject(i6.AuthService), i0.ɵɵdirectiveInject(i7.AddressbookGroupService), i0.ɵɵdirectiveInject(i8.AddressbookService)); };
AddressbookListComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AddressbookListComponent, selectors: [["app-addressbook-list"]], viewQuery: function AddressbookListComponent_Query(rf, ctx) { if (rf & 1) {
        i0.ɵɵviewQuery(_c0, 1);
        i0.ɵɵviewQuery(_c1, 1);
    } if (rf & 2) {
        let _t;
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.addressbookFormComponent = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.addressbookGroupListComponent = _t.first);
    } }, decls: 15, vars: 25, consts: [[1, "page-title"], ["styleClass", "toolbar-custom"], ["pTemplate", "left"], ["dataKey", "addressBookId", "selectionMode", "multiple", "styleClass", "p-datatable-striped", 3, "rowHover", "paginator", "lazy", "totalRecords", "value", "rows", "sortField", "rowsPerPageOptions", "first", "sortOrder", "selection", "metaKeySelection", "firstChange", "onLazyLoad", "selectionChange"], ["pTemplate", "caption"], ["pTemplate", "header"], ["pTemplate", "body"], ["pTemplate", "emptymessage"], ["styleClass", "custom-dialog", 3, "header", "visible", "modal", "draggable", "resizable", "baseZIndex", "visibleChange"], [3, "mode", "addressBookDetail", 4, "ngIf"], [4, "ngIf"], ["pTemplate", "footer"], ["icon", "pi pi-plus p-button-icon-left x-none", "pButton", "", "pRipple", "", 1, "p-button-raised", "p-button-primary", "p-mr-2", "x-none", 3, "label", "click"], ["icon", "fas fa-user-plus p-button-icon-left x-none", "pButton", "", "pRipple", "", 1, "p-button-raised", "p-button-info", "p-mr-2", "x-none", 3, "disabled", "label", "click"], ["icon", "pi pi-trash p-button-icon-left x-none", "pButton", "", "pRipple", "", 1, "p-button-raised", "p-button-danger", "p-mr-2", "x-none", 3, "disabled", "label", "click"], [1, "p-d-flex", "p-ai-center", "p-jc-between"], [1, "p-input-icon-left"], [1, "pi", "pi-search"], ["pInputText", "", "type", "text", 1, "search-style", "h-38", 3, "ngModel", "placeholder", "keyup", "ngModelChange"], ["class", "p-d-none p-d-lg-table-cell p-text-left", "pSortableColumn", "lastName", "style", "width:25%", 4, "ngIf"], ["pSortableColumn", "firstName", 1, "p-d-none", "p-d-lg-table-cell", "p-text-left", 2, "width", "25%"], ["field", "firstName"], ["pSortableColumn", "mailAddress", 1, "p-text-left"], ["field", "mailAddress"], ["pSortableColumn", "createdDate", 1, "p-d-none", "p-d-md-table-cell", "p-text-left", 2, "width", "20%"], ["field", "createdDate"], ["pSortableColumn", "lastName", 1, "p-d-none", "p-d-lg-table-cell", "p-text-left", 2, "width", "25%"], ["field", "lastName"], [3, "pSelectableRow", "pSelectableRowIndex", "dblclick"], ["class", "p-text-truncate p-d-none p-d-lg-table-cell p-text-left", 4, "ngIf"], [1, "p-text-truncate", "p-d-none", "p-d-lg-table-cell", "p-text-left"], [3, "title"], [1, "p-text-truncate", "p-text-left"], [1, "p-d-none", "p-d-md-table-cell", "p-text-left"], ["colspan", "4", 1, "p-text-center", "p-d-none", "p-d-lg-table-cell"], ["colspan", "2", 1, "p-text-center", "p-d-sm-table-cell", "p-d-lg-none"], [3, "mode", "addressBookDetail"], ["addressbookFormComponent", ""], ["addressbookGroupListComponent", ""], [1, "p-col-12", "p-text-right", "p-pr-0"], ["icon", "fas fa-times", "pButton", "", "pRipple", "", "type", "button", 1, "p-button-raised", "p-button-warning", "p-mr-2", 3, "label", "click"], ["icon", "fas fa-plus", "type", "button", "pRipple", "", "pButton", "", 1, "p-button-raised", "p-mr-0", 3, "label", "click"]], template: function AddressbookListComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵtext(1);
        i0.ɵɵpipe(2, "titlecase");
        i0.ɵɵpipe(3, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(4, "p-toolbar", 1);
        i0.ɵɵtemplate(5, AddressbookListComponent_ng_template_5_Template, 9, 17, "ng-template", 2);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(6, "p-table", 3);
        i0.ɵɵlistener("firstChange", function AddressbookListComponent_Template_p_table_firstChange_6_listener($event) { return ctx.first = $event; })("onLazyLoad", function AddressbookListComponent_Template_p_table_onLazyLoad_6_listener($event) { return ctx.loadAddressBooks($event); })("selectionChange", function AddressbookListComponent_Template_p_table_selectionChange_6_listener($event) { return ctx.selectedAddressBooks = $event; });
        i0.ɵɵtemplate(7, AddressbookListComponent_ng_template_7_Template, 5, 4, "ng-template", 4);
        i0.ɵɵtemplate(8, AddressbookListComponent_ng_template_8_Template, 17, 15, "ng-template", 5);
        i0.ɵɵtemplate(9, AddressbookListComponent_ng_template_9_Template, 11, 9, "ng-template", 6);
        i0.ɵɵtemplate(10, AddressbookListComponent_ng_template_10_Template, 7, 6, "ng-template", 7);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(11, "p-dialog", 8);
        i0.ɵɵlistener("visibleChange", function AddressbookListComponent_Template_p_dialog_visibleChange_11_listener($event) { return ctx.isShownAddressModal = $event; });
        i0.ɵɵtemplate(12, AddressbookListComponent_app_addressbook_form_12_Template, 2, 2, "app-addressbook-form", 9);
        i0.ɵɵtemplate(13, AddressbookListComponent_app_addressbook_group_list_13_Template, 2, 0, "app-addressbook-group-list", 10);
        i0.ɵɵtemplate(14, AddressbookListComponent_ng_template_14_Template, 9, 14, "ng-template", 11);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵadvance(1);
        i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 21, i0.ɵɵpipeBind1(3, 23, "label.address_book_list")), "\n");
        i0.ɵɵadvance(5);
        i0.ɵɵproperty("rowHover", true)("paginator", ctx.totalRecords > 0)("lazy", true)("totalRecords", ctx.totalRecords)("value", ctx.addressBooks)("rows", ctx.rows)("sortField", ctx.sortField)("rowsPerPageOptions", ctx.rowOptions)("first", ctx.first)("sortOrder", ctx.ascSort)("selection", ctx.selectedAddressBooks)("metaKeySelection", true);
        i0.ɵɵadvance(5);
        i0.ɵɵpropertyInterpolate("header", ctx.mode === "create" ? ctx.translateText("label.create_new_address_book") : ctx.mode === "detail" ? ctx.translateText("label.edit_address_book") : ctx.translateText("label.add_address_book_to_group"));
        i0.ɵɵproperty("visible", ctx.isShownAddressModal)("modal", true)("draggable", false)("resizable", false)("baseZIndex", 10000);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.isShownAddressModal && ctx.mode !== "addToGroup");
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.isShownAddressModal && ctx.mode === "addToGroup");
    } }, directives: [i9.Toolbar, i5.PrimeTemplate, i10.Table, i11.Dialog, i3.NgIf, i12.ButtonDirective, i13.Ripple, i2.DefaultValueAccessor, i14.InputText, i2.NgControlStatus, i2.NgModel, i10.SortableColumn, i10.SortIcon, i10.SelectableRow, i15.AddressbookFormComponent, i16.AddressbookGroupListComponent], pipes: [i3.TitleCasePipe, i4.TranslatePipe, i3.UpperCasePipe], styles: ["@media only screen and (min-width: 992px) {\n  .p-d-lg-table-cell[_ngcontent-%COMP%] {\n    display: table-cell !important;\n  }\n}\n@media screen and (min-width: 768px) {\n  [_nghost-%COMP%]     .p-d-md-table-cell {\n    display: table-cell !important;\n  }\n  [_nghost-%COMP%]     .custom-dialog.p-dialog, [_nghost-%COMP%]     .custom-dialog.p-confirmDialog {\n    width: 50vw;\n    margin: 30px auto !important;\n  }\n}\n@media screen and (max-width: 768px) {\n  [_nghost-%COMP%]     .custom-dialog.p-dialog, [_nghost-%COMP%]     .custom-dialog.p-confirmDialog {\n    width: 80vw;\n  }\n}\n@media screen and (max-width: 576px) {\n  [_nghost-%COMP%]     .p-d-sm-table-cell {\n    display: table-cell !important;\n  }\n  [_nghost-%COMP%]     .custom-dialog.p-dialog, [_nghost-%COMP%]     .custom-dialog.p-confirmDialog {\n    width: 90vw;\n  }\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvYWRkcmVzc2Jvb2svYWRkcmVzc2Jvb2stbGlzdC9hZGRyZXNzYm9vay1saXN0LmNvbXBvbmVudC5zY3NzIiwic3JjL2FwcC9hdXRoZW50aWNhdGlvbi1wYWdlcy9hZGRyZXNzYm9vay9hZGRyZXNzYm9vay1saXN0L2FkZHJlc3Nib29rLWxpc3QuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0E7RUFDRTtJQUNFLDhCQUFBO0VDQUY7QUFDRjtBREtFO0VBQ0U7SUFDRSw4QkFBQTtFQ0hKO0VETUU7O0lBRUUsV0FBQTtJQUNBLDRCQUFBO0VDSko7QUFDRjtBRFFFO0VBQ0U7O0lBRUUsV0FBQTtFQ05KO0FBQ0Y7QURVRTtFQUNFO0lBQ0UsOEJBQUE7RUNSSjtFRFdFOztJQUVFLFdBQUE7RUNUSjtBQUNGIiwiZmlsZSI6InNyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvYWRkcmVzc2Jvb2svYWRkcmVzc2Jvb2stbGlzdC9hZGRyZXNzYm9vay1saXN0LmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLy8gbGdcbkBtZWRpYSBvbmx5IHNjcmVlbiBhbmQgKG1pbi13aWR0aDogOTkycHgpIHtcbiAgLnAtZC1sZy10YWJsZS1jZWxsIHtcbiAgICBkaXNwbGF5OiB0YWJsZS1jZWxsICFpbXBvcnRhbnQ7XG4gIH1cbn1cblxuOmhvc3QgOjpuZy1kZWVwIHtcbiAgLy8gPm1kXG4gIEBtZWRpYSBzY3JlZW4gYW5kIChtaW4td2lkdGg6IDc2OHB4KSB7XG4gICAgLnAtZC1tZC10YWJsZS1jZWxsIHtcbiAgICAgIGRpc3BsYXk6IHRhYmxlLWNlbGwgIWltcG9ydGFudDtcbiAgICB9XG5cbiAgICAuY3VzdG9tLWRpYWxvZy5wLWRpYWxvZyxcbiAgICAuY3VzdG9tLWRpYWxvZy5wLWNvbmZpcm1EaWFsb2cge1xuICAgICAgd2lkdGg6IDUwdnc7XG4gICAgICBtYXJnaW46IDMwcHggYXV0byAhaW1wb3J0YW50O1xuICAgIH1cbiAgfVxuXG4gIC8vIDxtZFxuICBAbWVkaWEgc2NyZWVuIGFuZCAobWF4LXdpZHRoOiA3NjhweCkge1xuICAgIC5jdXN0b20tZGlhbG9nLnAtZGlhbG9nLFxuICAgIC5jdXN0b20tZGlhbG9nLnAtY29uZmlybURpYWxvZyB7XG4gICAgICB3aWR0aDogODB2dztcbiAgICB9XG4gIH1cblxuICAvLyB4c1xuICBAbWVkaWEgc2NyZWVuIGFuZCAobWF4LXdpZHRoOiA1NzZweCkge1xuICAgIC5wLWQtc20tdGFibGUtY2VsbCB7XG4gICAgICBkaXNwbGF5OiB0YWJsZS1jZWxsICFpbXBvcnRhbnQ7XG4gICAgfVxuXG4gICAgLmN1c3RvbS1kaWFsb2cucC1kaWFsb2csXG4gICAgLmN1c3RvbS1kaWFsb2cucC1jb25maXJtRGlhbG9nIHtcbiAgICAgIHdpZHRoOiA5MHZ3O1xuICAgIH1cbiAgfVxuXG59XG4iLCJAbWVkaWEgb25seSBzY3JlZW4gYW5kIChtaW4td2lkdGg6IDk5MnB4KSB7XG4gIC5wLWQtbGctdGFibGUtY2VsbCB7XG4gICAgZGlzcGxheTogdGFibGUtY2VsbCAhaW1wb3J0YW50O1xuICB9XG59XG5AbWVkaWEgc2NyZWVuIGFuZCAobWluLXdpZHRoOiA3NjhweCkge1xuICA6aG9zdCA6Om5nLWRlZXAgLnAtZC1tZC10YWJsZS1jZWxsIHtcbiAgICBkaXNwbGF5OiB0YWJsZS1jZWxsICFpbXBvcnRhbnQ7XG4gIH1cbiAgOmhvc3QgOjpuZy1kZWVwIC5jdXN0b20tZGlhbG9nLnAtZGlhbG9nLFxuOmhvc3QgOjpuZy1kZWVwIC5jdXN0b20tZGlhbG9nLnAtY29uZmlybURpYWxvZyB7XG4gICAgd2lkdGg6IDUwdnc7XG4gICAgbWFyZ2luOiAzMHB4IGF1dG8gIWltcG9ydGFudDtcbiAgfVxufVxuQG1lZGlhIHNjcmVlbiBhbmQgKG1heC13aWR0aDogNzY4cHgpIHtcbiAgOmhvc3QgOjpuZy1kZWVwIC5jdXN0b20tZGlhbG9nLnAtZGlhbG9nLFxuOmhvc3QgOjpuZy1kZWVwIC5jdXN0b20tZGlhbG9nLnAtY29uZmlybURpYWxvZyB7XG4gICAgd2lkdGg6IDgwdnc7XG4gIH1cbn1cbkBtZWRpYSBzY3JlZW4gYW5kIChtYXgtd2lkdGg6IDU3NnB4KSB7XG4gIDpob3N0IDo6bmctZGVlcCAucC1kLXNtLXRhYmxlLWNlbGwge1xuICAgIGRpc3BsYXk6IHRhYmxlLWNlbGwgIWltcG9ydGFudDtcbiAgfVxuICA6aG9zdCA6Om5nLWRlZXAgLmN1c3RvbS1kaWFsb2cucC1kaWFsb2csXG46aG9zdCA6Om5nLWRlZXAgLmN1c3RvbS1kaWFsb2cucC1jb25maXJtRGlhbG9nIHtcbiAgICB3aWR0aDogOTB2dztcbiAgfVxufSJdfQ== */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AddressbookListComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-addressbook-list',
                templateUrl: './addressbook-list.component.html',
                styleUrls: ['./addressbook-list.component.scss']
            }]
    }], function () { return [{ type: i1.Title }, { type: i2.FormBuilder }, { type: i3.DatePipe }, { type: i4.TranslateService }, { type: i5.ConfirmationService }, { type: i5.MessageService }, { type: i6.AuthService }, { type: i7.AddressbookGroupService }, { type: i8.AddressbookService }]; }, { addressbookFormComponent: [{
            type: core_1.ViewChild,
            args: ['addressbookFormComponent']
        }], addressbookGroupListComponent: [{
            type: core_1.ViewChild,
            args: ['addressbookGroupListComponent']
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/addressbook/addressbook-not-in-group/addressbook-not-in-group.component.ts":
/*!*****************************************************************************************************************!*\
  !*** ./src/app/authentication-pages/addressbook/addressbook-not-in-group/addressbook-not-in-group.component.ts ***!
  \*****************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.AddressbookNotInGroupComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/addressbook-group.service */ "./src/app/services/addressbook-group.service.ts"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! primeng/table */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-table.js"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js"));
function AddressbookNotInGroupComponent_ng_template_1_Template(rf, ctx) { if (rf & 1) {
    const _r5 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 5);
    i0.ɵɵelementStart(1, "span", 6);
    i0.ɵɵelement(2, "i", 7);
    i0.ɵɵelementStart(3, "input", 8);
    i0.ɵɵlistener("keyup", function AddressbookNotInGroupComponent_ng_template_1_Template_input_keyup_3_listener() { i0.ɵɵrestoreView(_r5); const ctx_r4 = i0.ɵɵnextContext(); return ctx_r4.loadAddressBooks(null, true); })("ngModelChange", function AddressbookNotInGroupComponent_ng_template_1_Template_input_ngModelChange_3_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r6 = i0.ɵɵnextContext(); return ctx_r6.params.searchKey = $event; });
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("placeholder", i0.ɵɵpipeBind1(4, 2, "label.search"));
    i0.ɵɵproperty("ngModel", ctx_r0.params.searchKey);
} }
function AddressbookNotInGroupComponent_ng_template_2_th_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "th", 14);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelement(3, "p-sortIcon", 15);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "label.last_name"), " ");
} }
function AddressbookNotInGroupComponent_ng_template_2_th_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "th", 14);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelement(3, "p-sortIcon", 15);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "label.last_name"), " ");
} }
function AddressbookNotInGroupComponent_ng_template_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵtemplate(1, AddressbookNotInGroupComponent_ng_template_2_th_1_Template, 4, 3, "th", 9);
    i0.ɵɵelementStart(2, "th", 10);
    i0.ɵɵtext(3);
    i0.ɵɵpipe(4, "titlecase");
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelement(6, "p-sortIcon", 11);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(7, AddressbookNotInGroupComponent_ng_template_2_th_7_Template, 4, 3, "th", 9);
    i0.ɵɵelementStart(8, "th", 12);
    i0.ɵɵtext(9);
    i0.ɵɵpipe(10, "titlecase");
    i0.ɵɵpipe(11, "translate");
    i0.ɵɵelement(12, "p-sortIcon", 13);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r1.currentLanguage === "ja");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(4, 4, i0.ɵɵpipeBind1(5, 6, "label.first_name")), " ");
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("ngIf", ctx_r1.currentLanguage !== "ja");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(10, 8, i0.ɵɵpipeBind1(11, 10, "label.email_address")), " ");
} }
function AddressbookNotInGroupComponent_ng_template_3_td_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "td", 18);
    i0.ɵɵelementStart(1, "span", 19);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const addressBook_r9 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("title", addressBook_r9.lastName);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(addressBook_r9.lastName);
} }
function AddressbookNotInGroupComponent_ng_template_3_td_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "td", 18);
    i0.ɵɵelementStart(1, "span", 19);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const addressBook_r9 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("title", addressBook_r9.lastName);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(addressBook_r9.lastName);
} }
function AddressbookNotInGroupComponent_ng_template_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr", 16);
    i0.ɵɵtemplate(1, AddressbookNotInGroupComponent_ng_template_3_td_1_Template, 3, 2, "td", 17);
    i0.ɵɵelementStart(2, "td", 18);
    i0.ɵɵelementStart(3, "span", 19);
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(5, AddressbookNotInGroupComponent_ng_template_3_td_5_Template, 3, 2, "td", 17);
    i0.ɵɵelementStart(6, "td", 20);
    i0.ɵɵelementStart(7, "span", 19);
    i0.ɵɵtext(8);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const addressBook_r9 = ctx.$implicit;
    const rowIndex_r10 = ctx.rowIndex;
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵproperty("pSelectableRow", addressBook_r9)("pSelectableRowIndex", rowIndex_r10);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r2.currentLanguage === "ja");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("title", addressBook_r9.firstName);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(addressBook_r9.firstName);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r2.currentLanguage !== "ja");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("title", addressBook_r9.mailAddress);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(addressBook_r9.mailAddress);
} }
function AddressbookNotInGroupComponent_ng_template_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "td", 21);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, "label.no_record"));
} }
class AddressbookNotInGroupComponent {
    constructor(datePipe, translate, confirmationService, messageService, authService, activatedRoute, addressBookGroupService) {
        this.datePipe = datePipe;
        this.translate = translate;
        this.confirmationService = confirmationService;
        this.messageService = messageService;
        this.authService = authService;
        this.activatedRoute = activatedRoute;
        this.addressBookGroupService = addressBookGroupService;
        this.appUtil = app_util_1.default;
        this.constant = app_constants_1.default;
        this.selectedAddressBooks = [];
        this.first = 0;
        this.params = {
            searchKey: '',
            sortField: 'mailAddress',
            ascSort: true,
            pageNumber: 1,
            pageSize: 5,
            isInGroup: false
        };
    }
    ngOnInit() {
        this.params.searchKey = '';
    }
    loadAddressBooks(event, isSearch) {
        if (event) {
            this.params.sortField = (event.sortField) ? event.sortField : 'mailAddress';
            this.params.ascSort = (event.sortOrder === 1);
            if (event.rows) {
                this.params.pageNumber = (event.first / event.rows) + 1;
                this.params.pageSize = event.rows;
            }
        }
        // reset page number to 1 when search
        if (isSearch) {
            this.params.pageNumber = 1;
            this.first = 0;
        }
        if (this.getABRequest) {
            this.getABRequest.unsubscribe();
        }
        this.getABRequest = this.addressBookGroupService
            .getGroupAddressBookList(this.groupId, this.appUtil.toSnakeCaseKey(this.params))
            .subscribe(response => {
            if (response.status === 200) {
                this.addressBooks = response.data.content;
                this.totalRecords = response.data.totalElements;
            }
            else {
                this.messageService.add({
                    key: 'toast',
                    severity: 'error',
                    detail: this.appUtil.translate(this.translate, 'error.' + response.status)
                });
            }
        }, error => {
            this.messageService.add({
                key: 'toast',
                severity: 'error',
                detail: this.appUtil.translate(this.translate, 'error.' + error.status)
            });
        });
    }
}
exports.AddressbookNotInGroupComponent = AddressbookNotInGroupComponent;
AddressbookNotInGroupComponent.ɵfac = function AddressbookNotInGroupComponent_Factory(t) { return new (t || AddressbookNotInGroupComponent)(i0.ɵɵdirectiveInject(i1.DatePipe), i0.ɵɵdirectiveInject(i2.TranslateService), i0.ɵɵdirectiveInject(i3.ConfirmationService), i0.ɵɵdirectiveInject(i3.MessageService), i0.ɵɵdirectiveInject(i4.AuthService), i0.ɵɵdirectiveInject(i5.ActivatedRoute), i0.ɵɵdirectiveInject(i6.AddressbookGroupService)); };
AddressbookNotInGroupComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AddressbookNotInGroupComponent, selectors: [["app-addressbook-not-in-group"]], inputs: { groupId: "groupId" }, decls: 5, vars: 11, consts: [["dataKey", "addressBookId", "selectionMode", "multiple", "styleClass", "p-datatable-striped p-datatable-responsive-demo", 3, "rowHover", "paginator", "lazy", "value", "first", "rows", "totalRecords", "sortField", "sortOrder", "selection", "metaKeySelection", "firstChange", "onLazyLoad", "selectionChange"], ["pTemplate", "caption"], ["pTemplate", "header"], ["pTemplate", "body"], ["pTemplate", "emptymessage"], [1, "p-d-flex", "p-ai-center", "p-jc-between"], [1, "p-input-icon-left"], [1, "pi", "pi-search"], ["pInputText", "", "type", "text", 1, "search-style", "h-38", 3, "ngModel", "placeholder", "keyup", "ngModelChange"], ["class", "p-text-left", "pSortableColumn", "lastName", "style", "width:30%", 4, "ngIf"], ["pSortableColumn", "firstName", 1, "p-text-left", 2, "width", "30%"], ["field", "firstName"], ["pSortableColumn", "mailAddress", 1, "p-text-left"], ["field", "mailAddress"], ["pSortableColumn", "lastName", 1, "p-text-left", 2, "width", "30%"], ["field", "lastName"], [3, "pSelectableRow", "pSelectableRowIndex"], ["class", "p-text-truncate p-text-left", 4, "ngIf"], [1, "p-text-truncate", "p-text-left"], [3, "title"], [1, "p-text-left", "p-text-truncate"], ["colspan", "3", 1, "p-text-center"]], template: function AddressbookNotInGroupComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "p-table", 0);
        i0.ɵɵlistener("firstChange", function AddressbookNotInGroupComponent_Template_p_table_firstChange_0_listener($event) { return ctx.first = $event; })("onLazyLoad", function AddressbookNotInGroupComponent_Template_p_table_onLazyLoad_0_listener($event) { return ctx.loadAddressBooks($event); })("selectionChange", function AddressbookNotInGroupComponent_Template_p_table_selectionChange_0_listener($event) { return ctx.selectedAddressBooks = $event; });
        i0.ɵɵtemplate(1, AddressbookNotInGroupComponent_ng_template_1_Template, 5, 4, "ng-template", 1);
        i0.ɵɵtemplate(2, AddressbookNotInGroupComponent_ng_template_2_Template, 13, 12, "ng-template", 2);
        i0.ɵɵtemplate(3, AddressbookNotInGroupComponent_ng_template_3_Template, 9, 8, "ng-template", 3);
        i0.ɵɵtemplate(4, AddressbookNotInGroupComponent_ng_template_4_Template, 4, 3, "ng-template", 4);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵproperty("rowHover", true)("paginator", ctx.totalRecords > 0)("lazy", true)("value", ctx.addressBooks)("first", ctx.first)("rows", 5)("totalRecords", ctx.totalRecords)("sortField", "mailAddress")("sortOrder", 1)("selection", ctx.selectedAddressBooks)("metaKeySelection", true);
    } }, directives: [i7.Table, i3.PrimeTemplate, i8.DefaultValueAccessor, i9.InputText, i8.NgControlStatus, i8.NgModel, i1.NgIf, i7.SortableColumn, i7.SortIcon, i7.SelectableRow], pipes: [i2.TranslatePipe, i1.TitleCasePipe], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2FkZHJlc3Nib29rL2FkZHJlc3Nib29rLW5vdC1pbi1ncm91cC9hZGRyZXNzYm9vay1ub3QtaW4tZ3JvdXAuY29tcG9uZW50LnNjc3MifQ== */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AddressbookNotInGroupComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-addressbook-not-in-group',
                templateUrl: './addressbook-not-in-group.component.html',
                styleUrls: ['./addressbook-not-in-group.component.scss']
            }]
    }], function () { return [{ type: i1.DatePipe }, { type: i2.TranslateService }, { type: i3.ConfirmationService }, { type: i3.MessageService }, { type: i4.AuthService }, { type: i5.ActivatedRoute }, { type: i6.AddressbookGroupService }]; }, { groupId: [{
            type: core_1.Input
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/addressbook/addressbook.component.ts":
/*!***************************************************************************!*\
  !*** ./src/app/authentication-pages/addressbook/addressbook.component.ts ***!
  \***************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.AddressbookComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_constants_1 = tslib_1.__importStar(__webpack_require__(/*! ../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! ../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! primeng/tabview */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-tabview.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! ./addressbook-list/addressbook-list.component */ "./src/app/authentication-pages/addressbook/addressbook-list/addressbook-list.component.ts"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! ./addressbook-group/addressbook-group.component */ "./src/app/authentication-pages/addressbook/addressbook-group/addressbook-group.component.ts"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
function AddressbookComponent_app_addressbook_list_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "app-addressbook-list");
} }
function AddressbookComponent_app_addressbook_group_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "app-addressbook-group");
} }
class AddressbookComponent {
    constructor(authService, router) {
        this.authService = authService;
        this.router = router;
        this.activeIndex = 0;
        this.constant = app_constants_1.default;
    }
    ngOnInit() {
        const active = localStorage.getItem(this.constant.STORED_TAB.ADDRESS_BOOK_TAB);
        if (active) {
            this.activeIndex = parseInt(active, 0);
        }
        this.authUser = this.authService.getAuthUser;
        if (this.authUser.roleId === app_constants_1.SystemRole.Guest) {
            this.router.navigate(['/project']);
        }
    }
    resetTab() {
        this.activeIndex = 0;
        localStorage.setItem(this.constant.STORED_TAB.ADDRESS_BOOK_TAB, '0');
    }
    handleChangeTab(event) {
        localStorage.setItem(this.constant.STORED_TAB.ADDRESS_BOOK_TAB, String(event.index));
    }
}
exports.AddressbookComponent = AddressbookComponent;
AddressbookComponent.ɵfac = function AddressbookComponent_Factory(t) { return new (t || AddressbookComponent)(i0.ɵɵdirectiveInject(i1.AuthService), i0.ɵɵdirectiveInject(i2.Router)); };
AddressbookComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AddressbookComponent, selectors: [["app-addressbook"]], decls: 7, vars: 9, consts: [[3, "activeIndex", "activeIndexChange", "onChange"], [1, "p-p-0", 3, "header"], [4, "ngIf"]], template: function AddressbookComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "p-tabView", 0);
        i0.ɵɵlistener("activeIndexChange", function AddressbookComponent_Template_p_tabView_activeIndexChange_0_listener($event) { return ctx.activeIndex = $event; })("onChange", function AddressbookComponent_Template_p_tabView_onChange_0_listener($event) { return ctx.handleChangeTab($event); });
        i0.ɵɵelementStart(1, "p-tabPanel", 1);
        i0.ɵɵpipe(2, "translate");
        i0.ɵɵtemplate(3, AddressbookComponent_app_addressbook_list_3_Template, 1, 0, "app-addressbook-list", 2);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(4, "p-tabPanel", 1);
        i0.ɵɵpipe(5, "translate");
        i0.ɵɵtemplate(6, AddressbookComponent_app_addressbook_group_6_Template, 1, 0, "app-addressbook-group", 2);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵproperty("activeIndex", ctx.activeIndex);
        i0.ɵɵadvance(1);
        i0.ɵɵpropertyInterpolate("header", i0.ɵɵpipeBind1(2, 5, "app_menu.address_book"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.activeIndex === 0);
        i0.ɵɵadvance(1);
        i0.ɵɵpropertyInterpolate("header", i0.ɵɵpipeBind1(5, 7, "app_menu.group_address"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.activeIndex === 1);
    } }, directives: [i3.TabView, i3.TabPanel, i4.NgIf, i5.AddressbookListComponent, i6.AddressbookGroupComponent], pipes: [i7.TranslatePipe], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2FkZHJlc3Nib29rL2FkZHJlc3Nib29rLmNvbXBvbmVudC5zY3NzIn0= */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AddressbookComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-addressbook',
                templateUrl: './addressbook.component.html',
                styleUrls: ['./addressbook.component.scss']
            }]
    }], function () { return [{ type: i1.AuthService }, { type: i2.Router }]; }, null); })();


/***/ }),

/***/ "./src/app/authentication-pages/addressbook/edit-addressbook-group/edit-addressbook-group.component.ts":
/*!*************************************************************************************************************!*\
  !*** ./src/app/authentication-pages/addressbook/edit-addressbook-group/edit-addressbook-group.component.ts ***!
  \*************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.EditAddressbookGroupComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const addressbook_group_model_1 = __webpack_require__(/*! ../../../../models/addressbook-group.model */ "./src/models/addressbook-group.model.ts");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/addressbook-group.service */ "./src/app/services/addressbook-group.service.ts"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! primeng/tag */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-tag.js"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
const i10 = tslib_1.__importStar(__webpack_require__(/*! primeng/ripple */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-ripple.js"));
const i11 = tslib_1.__importStar(__webpack_require__(/*! ../addressbook-group-form/addressbook-group-form.component */ "./src/app/authentication-pages/addressbook/addressbook-group-form/addressbook-group-form.component.ts"));
const _c0 = ["addressbookGroupFormComponent"];
function EditAddressbookGroupComponent_app_addressbook_group_form_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "app-addressbook-group-form", 13, 14);
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵproperty("addressGroupDetail", ctx_r0.groupDetail)("mode", "edit");
} }
class EditAddressbookGroupComponent {
    constructor(fb, datePipe, messageService, translate, activatedRoute, router, addressBookGroupService, authService) {
        this.fb = fb;
        this.datePipe = datePipe;
        this.messageService = messageService;
        this.translate = translate;
        this.activatedRoute = activatedRoute;
        this.router = router;
        this.addressBookGroupService = addressBookGroupService;
        this.authService = authService;
        this.appUtil = app_util_1.default;
        this.constant = app_constants_1.default;
        this.groupDetail = new addressbook_group_model_1.AddressBookGroup();
        this.isUpdating = false;
    }
    ngOnInit() {
        this.groupId = this.activatedRoute.snapshot.paramMap.get('id');
        this.authUser = this.authService.authUser;
        this.getGroupDetail();
    }
    getGroupDetail() {
        this.addressBookGroupService.getAddressBookGroupInfo(this.groupId).subscribe(res => {
            if (res.status === 200) {
                this.groupDetail = res.data;
            }
        }, error => {
            this.messageService.add({
                severity: 'error',
                detail: this.appUtil.translate(this.translate, 'error.' + error.status)
            });
        });
    }
    updateGroupDetail() {
        this.addressbookGroupFormComponent.groupFrm.markAllAsTouched();
        if (this.addressbookGroupFormComponent.groupFrm.invalid || this.isUpdating) {
            return;
        }
        this.isUpdating = true;
        const params = {
            name: this.addressbookGroupFormComponent.groupFrm.controls.groupName.value,
            description: this.addressbookGroupFormComponent.groupFrm.controls.description.value
        };
        this.addressBookGroupService.updateAddressBookGroup(this.groupId, this.appUtil.toSnakeCaseKey(params)).subscribe(res => {
            if (res.status === 200) {
                this.messageService.add({
                    severity: 'success',
                    detail: this.appUtil.translate(this.translate, 'default_toast.update_success')
                });
            }
            this.isUpdating = false;
        }, error => {
            this.messageService.add({
                severity: 'error',
                detail: this.appUtil.translate(this.translate, 'error.' + error.status)
            });
        });
    }
}
exports.EditAddressbookGroupComponent = EditAddressbookGroupComponent;
EditAddressbookGroupComponent.ɵfac = function EditAddressbookGroupComponent_Factory(t) { return new (t || EditAddressbookGroupComponent)(i0.ɵɵdirectiveInject(i1.FormBuilder), i0.ɵɵdirectiveInject(i2.DatePipe), i0.ɵɵdirectiveInject(i3.MessageService), i0.ɵɵdirectiveInject(i4.TranslateService), i0.ɵɵdirectiveInject(i5.ActivatedRoute), i0.ɵɵdirectiveInject(i5.Router), i0.ɵɵdirectiveInject(i6.AddressbookGroupService), i0.ɵɵdirectiveInject(i7.AuthService)); };
EditAddressbookGroupComponent.ɵcmp = i0.ɵɵdefineComponent({ type: EditAddressbookGroupComponent, selectors: [["app-edit-addressbook-group"]], viewQuery: function EditAddressbookGroupComponent_Query(rf, ctx) { if (rf & 1) {
        i0.ɵɵviewQuery(_c0, 1);
    } if (rf & 2) {
        let _t;
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.addressbookGroupFormComponent = _t.first);
    } }, decls: 26, vars: 26, consts: [[1, "page-title-lv2"], [1, "p-fluid", "p-formgrid", "p-grid"], [1, "p-col-12", "p-md-6"], [3, "addressGroupDetail", "mode", 4, "ngIf"], [1, "p-d-block"], [1, "p-d-block", "p-mt-2", "p-field"], [1, "p-d-block", "p-mt-4"], [1, "p-mt-2"], ["rounded", "true", 3, "value"], [1, "p-grid"], [1, "p-col-12", "p-text-right"], ["routerLink", "/addressbook", "icon", "fas fa-times p-button-icon-left", "pButton", "", "pRipple", "", "type", "button", 1, "p-button-raised", "p-button-warning", "p-mr-2", 3, "label"], ["type", "button", "pRipple", "", "pButton", "", 1, "p-button-raised", 3, "disabled", "icon", "label", "click"], [3, "addressGroupDetail", "mode"], ["addressbookGroupFormComponent", ""]], template: function EditAddressbookGroupComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵtext(1);
        i0.ɵɵpipe(2, "titlecase");
        i0.ɵɵpipe(3, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(4, "div", 1);
        i0.ɵɵelementStart(5, "div", 2);
        i0.ɵɵtemplate(6, EditAddressbookGroupComponent_app_addressbook_group_form_6_Template, 2, 2, "app-addressbook-group-form", 3);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(7, "div", 2);
        i0.ɵɵelementStart(8, "small", 4);
        i0.ɵɵtext(9);
        i0.ɵɵpipe(10, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(11, "label", 5);
        i0.ɵɵtext(12);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(13, "small", 6);
        i0.ɵɵtext(14);
        i0.ɵɵpipe(15, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(16, "span", 7);
        i0.ɵɵelement(17, "p-tag", 8);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(18, "div", 9);
        i0.ɵɵelementStart(19, "div", 10);
        i0.ɵɵelement(20, "button", 11);
        i0.ɵɵpipe(21, "uppercase");
        i0.ɵɵpipe(22, "translate");
        i0.ɵɵelementStart(23, "button", 12);
        i0.ɵɵlistener("click", function EditAddressbookGroupComponent_Template_button_click_23_listener() { return ctx.updateGroupDetail(); });
        i0.ɵɵpipe(24, "uppercase");
        i0.ɵɵpipe(25, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵadvance(1);
        i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 10, i0.ɵɵpipeBind1(3, 12, "label.edit_address_group")), "\n");
        i0.ɵɵadvance(5);
        i0.ɵɵproperty("ngIf", ctx.groupDetail);
        i0.ɵɵadvance(3);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(10, 14, "label.create_date"));
        i0.ɵɵadvance(3);
        i0.ɵɵtextInterpolate(ctx.appUtil.formatDateBasedOnDiff(ctx.datePipe, ctx.groupDetail.createDate));
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(15, 16, "label.no_address_book"));
        i0.ɵɵadvance(3);
        i0.ɵɵpropertyInterpolate("value", ctx.groupDetail.numberAddress);
        i0.ɵɵadvance(3);
        i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(21, 18, i0.ɵɵpipeBind1(22, 20, "button.back")));
        i0.ɵɵadvance(3);
        i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(24, 22, i0.ɵɵpipeBind1(25, 24, "label.save")));
        i0.ɵɵproperty("disabled", ctx.isUpdating)("icon", ctx.isUpdating ? "fas fa-spinner fa-spin p-button-icon-left" : "fas fa-check p-button-icon-left");
    } }, directives: [i2.NgIf, i8.Tag, i5.RouterLink, i9.ButtonDirective, i10.Ripple, i11.AddressbookGroupFormComponent], pipes: [i2.TitleCasePipe, i4.TranslatePipe, i2.UpperCasePipe], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2FkZHJlc3Nib29rL2VkaXQtYWRkcmVzc2Jvb2stZ3JvdXAvZWRpdC1hZGRyZXNzYm9vay1ncm91cC5jb21wb25lbnQuc2NzcyJ9 */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EditAddressbookGroupComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-edit-addressbook-group',
                templateUrl: './edit-addressbook-group.component.html',
                styleUrls: ['./edit-addressbook-group.component.scss']
            }]
    }], function () { return [{ type: i1.FormBuilder }, { type: i2.DatePipe }, { type: i3.MessageService }, { type: i4.TranslateService }, { type: i5.ActivatedRoute }, { type: i5.Router }, { type: i6.AddressbookGroupService }, { type: i7.AuthService }]; }, { addressbookGroupFormComponent: [{
            type: core_1.ViewChild,
            args: ['addressbookGroupFormComponent']
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/authentication-footer/authentication-footer.component.ts":
/*!***********************************************************************************************!*\
  !*** ./src/app/authentication-pages/authentication-footer/authentication-footer.component.ts ***!
  \***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthenticationFooterComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
class AuthenticationFooterComponent {
    constructor() {
    }
    ngOnInit() {
        this.currentYear = { year: new Date().getFullYear() };
    }
}
exports.AuthenticationFooterComponent = AuthenticationFooterComponent;
AuthenticationFooterComponent.ɵfac = function AuthenticationFooterComponent_Factory(t) { return new (t || AuthenticationFooterComponent)(); };
AuthenticationFooterComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AuthenticationFooterComponent, selectors: [["app-authentication-footer"]], decls: 4, vars: 4, consts: [[1, "main-footer"], [1, "main-footer-inner"], ["href", "https://689cloud.com/our-team.html", "target", "_blank", 1, "p-p-4", 3, "translate"]], template: function AuthenticationFooterComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵelement(2, "a", 2);
        i0.ɵɵpipe(3, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("translate", i0.ɵɵpipeBind2(3, 1, "label.copy_right", ctx.currentYear));
    } }, directives: [i1.TranslateDirective], pipes: [i1.TranslatePipe], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2F1dGhlbnRpY2F0aW9uLWZvb3Rlci9hdXRoZW50aWNhdGlvbi1mb290ZXIuY29tcG9uZW50LnNjc3MifQ== */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AuthenticationFooterComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-authentication-footer',
                templateUrl: './authentication-footer.component.html',
                styleUrls: ['./authentication-footer.component.scss']
            }]
    }], function () { return []; }, null); })();


/***/ }),

/***/ "./src/app/authentication-pages/authentication-header/authentication-header.component.ts":
/*!***********************************************************************************************!*\
  !*** ./src/app/authentication-pages/authentication-header/authentication-header.component.ts ***!
  \***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthenticationHeaderComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const app_constants_1 = tslib_1.__importStar(__webpack_require__(/*! ../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const pusher_js_1 = tslib_1.__importDefault(__webpack_require__(/*! pusher-js */ "./node_modules/pusher-js/dist/web/pusher.js"));
const environment_1 = __webpack_require__(/*! ../../../environments/environment */ "./src/environments/environment.ts");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! ../../services/notification.service */ "./src/app/services/notification.service.ts"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! ../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! primeng/toolbar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-toolbar.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! primeng/ripple */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-ripple.js"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i10 = tslib_1.__importStar(__webpack_require__(/*! primeng/avatar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-avatar.js"));
const i11 = tslib_1.__importStar(__webpack_require__(/*! primeng/sidebar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-sidebar.js"));
const i12 = tslib_1.__importStar(__webpack_require__(/*! ../authentication-menu/authentication-menu.component */ "./src/app/authentication-pages/authentication-menu/authentication-menu.component.ts"));
const i13 = tslib_1.__importStar(__webpack_require__(/*! ../authentication-footer/authentication-footer.component */ "./src/app/authentication-pages/authentication-footer/authentication-footer.component.ts"));
const i14 = tslib_1.__importStar(__webpack_require__(/*! primeng/tieredmenu */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-tieredmenu.js"));
const i15 = tslib_1.__importStar(__webpack_require__(/*! primeng/overlaypanel */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-overlaypanel.js"));
const i16 = tslib_1.__importStar(__webpack_require__(/*! ../notification/notification-message/notification-message.component */ "./src/app/authentication-pages/notification/notification-message/notification-message.component.ts"));
function AuthenticationHeaderComponent_span_12_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 19);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(ctx_r0.numberMessageUnread);
} }
function AuthenticationHeaderComponent_ng_template_22_app_notification_message_0_Template(rf, ctx) { if (rf & 1) {
    const _r7 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "app-notification-message", 21, 22);
    i0.ɵɵlistener("isReadMessage", function AuthenticationHeaderComponent_ng_template_22_app_notification_message_0_Template_app_notification_message_isReadMessage_0_listener() { i0.ɵɵrestoreView(_r7); const ctx_r6 = i0.ɵɵnextContext(2); return ctx_r6.numberMessageUnread = 0; });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r4 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("numberMessUnread", ctx_r4.numberMessageUnread);
} }
function AuthenticationHeaderComponent_ng_template_22_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, AuthenticationHeaderComponent_ng_template_22_app_notification_message_0_Template, 2, 1, "app-notification-message", 20);
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext();
    i0.ɵɵproperty("ngIf", ctx_r3.displayMessage);
} }
const _c0 = function () { return { "height": "60px" }; };
const _c1 = function () { return { "width": "230px", "top": "60px" }; };
class AuthenticationHeaderComponent {
    constructor(router, translate, messageService, notificationService, authService) {
        this.router = router;
        this.translate = translate;
        this.messageService = messageService;
        this.notificationService = notificationService;
        this.authService = authService;
        this.util = app_util_1.default;
        this.appConstant = app_constants_1.default;
        this.displayMenu = false;
        this.displayMessage = false;
        this.numberMessageUnread = 0;
        this.isShowHideMenu = new core_1.EventEmitter();
    }
    ngOnInit() {
        this.authUser = this.authService.getAuthUser;
        this.loadData();
        this.getListMessageUnread();
        this.initializeSocketNotification();
    }
    loadData() {
        const lang = this.authUser.lang;
        switch (lang) {
            case 'ja':
            case 'vi':
                this.userName = this.authUser.lastName + ' ' + this.authUser.firstName;
                break;
            default:
                this.userName = this.authUser.firstName + ' ' + this.authUser.lastName;
                break;
        }
        this.isDefaultLogo = this.authUser.defaultLogo;
        this.logoURL = (this.isDefaultLogo || this.isDefaultLogo === undefined) ? 'assets/images/logo.png' :
            'https://' + environment_1.environment.app_amazons3_bucket + environment_1.environment.suffix_amazon_s3 + environment_1.environment.logo_path
                + this.authUser.teamId + '/' + this.authUser.logoUrl;
        this.util.translateList(this.translate, [
            'label.settings',
            'label.account_settings',
            'label.help',
            'label.logout'
        ], {}).subscribe(res => {
            this.items = [
                {
                    label: this.authUser.mailAddress,
                    disabled: true,
                    styleClass: 'p-text-small p-text-truncate p-d-inline-block text-natural'
                },
                {
                    label: res['label.account_settings'],
                    icon: 'fas fa-cog',
                    styleClass: 'text-natural',
                    routerLink: ['/account-settings']
                },
                {
                    label: res['label.help'],
                    icon: 'fas fa-question-circle',
                    styleClass: 'text-natural',
                    command: () => {
                        window.open('https://689cloud.com', '_blank');
                    }
                },
                {
                    separator: true
                },
                {
                    label: res['label.logout'],
                    icon: 'fas fa-sign-out-alt',
                    styleClass: 'text-natural',
                    command: () => {
                        this.logout();
                    }
                }
            ];
        });
    }
    logout() {
        this.authService.logout().subscribe(res => {
            if (res.status === 200) {
                this.authService.authUser = undefined;
                this.authService.deleteToken();
                this.authService.clearSession();
                localStorage.clear();
            }
        });
    }
    showHideMenu() {
        this.isShowHideMenu.emit();
    }
    getListMessageUnread() {
        const params = {
            codes: app_constants_1.HistoryType.ADD_FILE + ',' + app_constants_1.HistoryType.INVITE_USER + ',' +
                app_constants_1.HistoryType.ADD_COMMENT + ',' + app_constants_1.HistoryType.UPDATE_COMMENT + ',' +
                app_constants_1.HistoryType.ADD_COMMENT_FILE + ',' + app_constants_1.HistoryType.UPDATE_COMMENT_FILE
        };
        this.notificationService.getTeamMessageUnread(this.authUser.teamId, this.util.toSnakeCaseKey(params))
            .subscribe(res => {
            if (res.status === 200) {
                this.numberMessageUnread = res.data.totalElements;
            }
        });
    }
    handleLongText(text) {
        return (text.length > 15) ? text.substr(0, 10) + '...' : text;
    }
    initializeSocketNotification() {
        const pusher = new pusher_js_1.default(window.atob(environment_1.environment.pusher.app_key), environment_1.environment.pusher.options);
        const channel = pusher.subscribe(this.authUser.teamId);
        const that = this;
        channel.bind('notify-topic-event', (data) => {
            const projectId = (this.router.url.split('/')[2] !== 'create'
                && this.router.url.split('/')[2] !== 'file')
                ? this.router.url.split('/')[2] : null;
            const message = JSON.parse(data);
            switch (message.code) {
                case app_constants_1.default.NOTIFICATION_CODE.ADD_COMMENT.code:
                    if ((message.projectId === projectId && message.body.comment.userId !== that.authUser.userId)
                        // Notify for user in other project
                        || (message.notifyUserIds
                            && message.notifyUserIds.findIndex(userId => userId === that.authUser.userId) !== -1)) {
                        that.updateNumberMessage();
                    }
                    if (projectId === null || typeof projectId === 'undefined') {
                        that.getListMessageUnread();
                        that.playSound();
                    }
                    break;
                case app_constants_1.default.NOTIFICATION_CODE.EDIT_COMMENT.code:
                    if ((message.projectId === projectId && message.body.userId !== that.authUser.userId)
                        // Notify for user in other project
                        || (message.notifyUserIds
                            && message.notifyUserIds.findIndex(userId => userId === that.authUser.userId) !== -1)) {
                        that.updateNumberMessage();
                    }
                    if (projectId === null || typeof projectId === 'undefined') {
                        that.getListMessageUnread();
                        that.playSound();
                    }
                    break;
                case app_constants_1.default.NOTIFICATION_CODE.ADD_FILE.code:
                case app_constants_1.default.NOTIFICATION_CODE.ADD_FILE_CLOUD.code:
                    if (message.user.id !== that.authUser.userId) {
                        if (message.projectId === projectId
                            // Notify for user in other project
                            || (message.notifyUserIds
                                && message.notifyUserIds.findIndex(userId => userId === that.authUser.userId) !== -1)) {
                            that.updateNumberMessage();
                        }
                        if (projectId === null || typeof projectId === 'undefined') {
                            that.getListMessageUnread();
                            that.playSound();
                        }
                    }
                    break;
                case app_constants_1.default.NOTIFICATION_CODE.INVITE_USER.code:
                    if ((message.body.userId === that.authUser.userId) || (message.notifyUserIds
                        && message.notifyUserIds.findIndex(userId => userId === that.authUser.userId) !== -1)) {
                        that.updateNumberMessage();
                    }
                    break;
                default:
                    break;
            }
        });
        channel.bind('notify-system-event', (data) => {
            // console.log('Received notify-system-event with message: ', JSON.parse(data));
        });
    }
    updateNumberMessage() {
        this.numberMessageUnread++;
        this.playSound();
    }
    playSound() {
        const snd = new Audio(this.appConstant.MESS_SOUND);
        snd.play().then();
    }
}
exports.AuthenticationHeaderComponent = AuthenticationHeaderComponent;
AuthenticationHeaderComponent.ɵfac = function AuthenticationHeaderComponent_Factory(t) { return new (t || AuthenticationHeaderComponent)(i0.ɵɵdirectiveInject(i1.Router), i0.ɵɵdirectiveInject(i2.TranslateService), i0.ɵɵdirectiveInject(i3.MessageService), i0.ɵɵdirectiveInject(i4.NotificationService), i0.ɵɵdirectiveInject(i5.AuthService)); };
AuthenticationHeaderComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AuthenticationHeaderComponent, selectors: [["app-authentication-header"]], outputs: { isShowHideMenu: "isShowHideMenu" }, decls: 23, vars: 23, consts: [[3, "styleClass"], [1, "p-toolbar-group-left", "p-pl-3"], ["type", "button", "pButton", "", "pRipple", "", "icon", "fas fa-bars", 1, "p-button-rounded", "p-d-inline-flex", "p-d-md-none", 3, "click"], [1, "p-d-flex", "p-ai-center", "p-lg-3", "width-logo"], ["height", "34", "alt", "logo", 3, "src"], [1, "p-ml-2", "p-my-0"], ["type", "button", "pButton", "", "pRipple", "", "icon", "fas fa-bars", 1, "p-d-none", "p-d-md-inline-flex", 3, "click"], [1, "p-toolbar-group-right"], [2, "position", "relative"], ["type", "button", "pButton", "", "pRipple", "", "icon", "far fa-bell", 1, "p-button-rounded", "p-button-warning", "p-button-plain", "p-mr-2", 3, "click"], ["id", "notify-number", "class", "p-badge p-component p-badge-no-gutter unread-badge", 4, "ngIf"], ["pButton", "", "pRipple", "", "type", "button", "icon", "fas fa-chevron-down", "iconPos", "right", 1, "p-button-text", "p-button-plain", "p-mr-3", "button-avatar", 3, "label", "title", "click"], ["icon", "far fa-user", "styleClass", "p-mr-1", "shape", "circle"], ["position", "left", 3, "visible", "showCloseIcon", "styleClass", "visibleChange"], [3, "model", "popup"], ["menu", ""], ["styleClass", "message-style", 3, "showCloseIcon", "onHide"], ["op", ""], ["pTemplate", ""], ["id", "notify-number", 1, "p-badge", "p-component", "p-badge-no-gutter", "unread-badge"], [3, "numberMessUnread", "isReadMessage", 4, "ngIf"], [3, "numberMessUnread", "isReadMessage"], ["notificationMessageComponent", ""]], template: function AuthenticationHeaderComponent_Template(rf, ctx) { if (rf & 1) {
        const _r8 = i0.ɵɵgetCurrentView();
        i0.ɵɵelementStart(0, "p-toolbar", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵelementStart(2, "button", 2);
        i0.ɵɵlistener("click", function AuthenticationHeaderComponent_Template_button_click_2_listener() { return ctx.displayMenu = !ctx.displayMenu; });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(3, "div", 3);
        i0.ɵɵelement(4, "img", 4);
        i0.ɵɵelementStart(5, "h2", 5);
        i0.ɵɵtext(6);
        i0.ɵɵpipe(7, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(8, "button", 6);
        i0.ɵɵlistener("click", function AuthenticationHeaderComponent_Template_button_click_8_listener() { return ctx.showHideMenu(); });
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(9, "div", 7);
        i0.ɵɵelementStart(10, "div", 8);
        i0.ɵɵelementStart(11, "button", 9);
        i0.ɵɵlistener("click", function AuthenticationHeaderComponent_Template_button_click_11_listener($event) { i0.ɵɵrestoreView(_r8); const _r2 = i0.ɵɵreference(21); _r2.toggle($event); return ctx.displayMessage = !ctx.displayMessage; });
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(12, AuthenticationHeaderComponent_span_12_Template, 2, 1, "span", 10);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(13, "button", 11);
        i0.ɵɵlistener("click", function AuthenticationHeaderComponent_Template_button_click_13_listener($event) { i0.ɵɵrestoreView(_r8); const _r1 = i0.ɵɵreference(19); return _r1.toggle($event); });
        i0.ɵɵelement(14, "p-avatar", 12);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(15, "p-sidebar", 13);
        i0.ɵɵlistener("visibleChange", function AuthenticationHeaderComponent_Template_p_sidebar_visibleChange_15_listener($event) { return ctx.displayMenu = $event; });
        i0.ɵɵelement(16, "app-authentication-menu");
        i0.ɵɵelement(17, "app-authentication-footer");
        i0.ɵɵelementEnd();
        i0.ɵɵelement(18, "p-tieredMenu", 14, 15);
        i0.ɵɵelementStart(20, "p-overlayPanel", 16, 17);
        i0.ɵɵlistener("onHide", function AuthenticationHeaderComponent_Template_p_overlayPanel_onHide_20_listener() { return ctx.displayMessage = false; });
        i0.ɵɵtemplate(22, AuthenticationHeaderComponent_ng_template_22_Template, 1, 1, "ng-template", 18);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵstyleMap(i0.ɵɵpureFunction0(20, _c0));
        i0.ɵɵproperty("styleClass", "layout-top-bar p-p-0");
        i0.ɵɵadvance(4);
        i0.ɵɵproperty("src", ctx.logoURL, i0.ɵɵsanitizeUrl);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(7, 18, "app_title"));
        i0.ɵɵadvance(6);
        i0.ɵɵproperty("ngIf", ctx.numberMessageUnread > 0);
        i0.ɵɵadvance(1);
        i0.ɵɵpropertyInterpolate("label", ctx.handleLongText(ctx.userName));
        i0.ɵɵproperty("title", ctx.userName);
        i0.ɵɵadvance(2);
        i0.ɵɵstyleMap(i0.ɵɵpureFunction0(21, _c1));
        i0.ɵɵproperty("visible", ctx.displayMenu)("showCloseIcon", false)("styleClass", "p-p-0");
        i0.ɵɵadvance(3);
        i0.ɵɵstyleMap(i0.ɵɵpureFunction0(22, _c1));
        i0.ɵɵproperty("model", ctx.items)("popup", true);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("showCloseIcon", true);
    } }, directives: [i6.Toolbar, i7.ButtonDirective, i8.Ripple, i9.NgIf, i10.Avatar, i11.Sidebar, i12.AuthenticationMenuComponent, i13.AuthenticationFooterComponent, i14.TieredMenu, i15.OverlayPanel, i3.PrimeTemplate, i16.NotificationMessageComponent], pipes: [i2.TranslatePipe], styles: ["[_nghost-%COMP%]     .p-tieredmenu .text-natural .p-menuitem-text, [_nghost-%COMP%]     .p-tieredmenu .text-natural .p-menuitem-icon {\n  color: black !important;\n}\n[_nghost-%COMP%]     .p-tieredmenu .p-text-small .p-menuitem-text {\n  font-size: small;\n}\n[_nghost-%COMP%]     .p-tieredmenu .p-text-small {\n  width: 100%;\n}\n[_nghost-%COMP%]     .unread-badge {\n  position: absolute;\n  top: 0;\n  right: 0;\n  margin-left: 2rem;\n  min-width: 1.5rem;\n  height: 1.5rem;\n  line-height: 1.5rem;\n  color: #ffffff !important;\n  background-color: #D32F2F;\n  margin-bottom: 2rem;\n}\n[_nghost-%COMP%]     .message-style {\n  width: 300px;\n  padding: 0;\n  z-index: 1006 !important;\n  transform: translateY(0px);\n  opacity: 1;\n  top: 51.5px !important;\n  display: block !important;\n  position: fixed !important;\n}\n[_nghost-%COMP%]     .p-overlaypanel .p-overlaypanel-content {\n  padding: 0;\n}\n@media screen and (min-width: 768px) {\n  [_nghost-%COMP%]     .width-logo {\n    width: 214px;\n  }\n}\n@media screen and (max-width: 768px) {\n  [_nghost-%COMP%]     .button-avatar .p-button-label {\n    display: none;\n  }\n}\n[_nghost-%COMP%]     .p-sidebar-content {\n  overflow-y: unset;\n  height: 80%;\n}\n/*# sourceMappingURL=data:application/json;base64,  */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AuthenticationHeaderComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-authentication-header',
                templateUrl: './authentication-header.component.html',
                styleUrls: ['./authentication-header.component.scss']
            }]
    }], function () { return [{ type: i1.Router }, { type: i2.TranslateService }, { type: i3.MessageService }, { type: i4.NotificationService }, { type: i5.AuthService }]; }, { isShowHideMenu: [{
            type: core_1.Output
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/authentication-menu/authentication-menu.component.ts":
/*!*******************************************************************************************!*\
  !*** ./src/app/authentication-pages/authentication-menu/authentication-menu.component.ts ***!
  \*******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthenticationMenuComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const app_constants_1 = tslib_1.__importStar(__webpack_require__(/*! ../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const environment_1 = __webpack_require__(/*! ../../../environments/environment */ "./src/environments/environment.ts");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! ../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! primeng/panelmenu */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-panelmenu.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! ../authentication-footer/authentication-footer.component */ "./src/app/authentication-pages/authentication-footer/authentication-footer.component.ts"));
const _c0 = function () { return { "width": "100%" }; };
function AuthenticationMenuComponent_p_panelMenu_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "p-panelMenu", 2);
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵstyleMap(i0.ɵɵpureFunction0(3, _c0));
    i0.ɵɵproperty("model", ctx_r0.items);
} }
function AuthenticationMenuComponent_app_authentication_footer_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "app-authentication-footer");
} }
class AuthenticationMenuComponent {
    constructor(translate, messageService, authService) {
        this.translate = translate;
        this.messageService = messageService;
        this.authService = authService;
        this.util = app_util_1.default;
        this.constant = app_constants_1.default;
        this.isOpen = true;
    }
    ngOnInit() {
        this.authUser = this.authService.getAuthUser;
        this.loadMenu();
    }
    loadMenu() {
        this.util.translateList(this.translate, ['app_menu.project', 'app_menu.member', 'app_menu.address_book',
            'app_menu.history', 'app_menu.dashboard', 'app_menu.report',
            'app_menu.admin_console'], {}).subscribe(translation => {
            this.items = [
                {
                    label: translation['app_menu.project'],
                    icon: 'fas fa-tasks',
                    routerLink: ['/project']
                },
                {
                    label: translation['app_menu.address_book'],
                    icon: 'fas fa-address-book',
                    styleClass: (this.authUser.roleId === app_constants_1.SystemRole.Guest) ? 'p-d-none' : '',
                    routerLink: ['/addressbook'],
                    command: () => {
                        localStorage.setItem(this.constant.STORED_TAB.ADDRESS_BOOK_TAB, '0');
                    }
                },
                {
                    label: translation['app_menu.history'],
                    icon: 'fas fa-history',
                    styleClass: (this.authUser.roleId === app_constants_1.SystemRole.Guest) ? 'p-d-none' : '',
                    routerLink: ['/history']
                },
                {
                    label: translation['app_menu.admin_console'],
                    icon: 'fas fa-user-cog',
                    styleClass: (this.authUser.roleId === app_constants_1.SystemRole.TeamAdmin || this.authUser.roleId === app_constants_1.SystemRole.Manager) ? '' : 'p-d-none',
                    command: () => {
                        window.open(environment_1.environment.admin_console_url + '?tok=' + this.authService.token, '_blank');
                    }
                }
            ];
        });
    }
}
exports.AuthenticationMenuComponent = AuthenticationMenuComponent;
AuthenticationMenuComponent.ɵfac = function AuthenticationMenuComponent_Factory(t) { return new (t || AuthenticationMenuComponent)(i0.ɵɵdirectiveInject(i1.TranslateService), i0.ɵɵdirectiveInject(i2.MessageService), i0.ɵɵdirectiveInject(i3.AuthService)); };
AuthenticationMenuComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AuthenticationMenuComponent, selectors: [["app-authentication-menu"]], inputs: { isOpen: "isOpen" }, decls: 2, vars: 2, consts: [[3, "model", "style", 4, "ngIf"], [4, "ngIf"], [3, "model"]], template: function AuthenticationMenuComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵtemplate(0, AuthenticationMenuComponent_p_panelMenu_0_Template, 1, 4, "p-panelMenu", 0);
        i0.ɵɵtemplate(1, AuthenticationMenuComponent_app_authentication_footer_1_Template, 1, 0, "app-authentication-footer", 1);
    } if (rf & 2) {
        i0.ɵɵproperty("ngIf", ctx.isOpen);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.isOpen);
    } }, directives: [i4.NgIf, i5.PanelMenu, i6.AuthenticationFooterComponent], styles: ["[_nghost-%COMP%]     .p-panelmenu .p-panelmenu-panel {\n  box-shadow: none !important;\n}\n[_nghost-%COMP%]     .p-panelmenu .p-panelmenu-header > a {\n  border-radius: unset !important;\n  border-bottom: 1px #f6f6f6 solid !important;\n  box-shadow: none !important;\n}\n[_nghost-%COMP%]     .p-menuitem-link-active {\n  background-color: #e0e0e1 !important;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvYXV0aGVudGljYXRpb24tbWVudS9hdXRoZW50aWNhdGlvbi1tZW51LmNvbXBvbmVudC5zY3NzIiwic3JjL2FwcC9hdXRoZW50aWNhdGlvbi1wYWdlcy9hdXRoZW50aWNhdGlvbi1tZW51L2F1dGhlbnRpY2F0aW9uLW1lbnUuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0U7RUFDRSwyQkFBQTtBQ0FKO0FERUU7RUFDRSwrQkFBQTtFQUNBLDJDQUFBO0VBQ0EsMkJBQUE7QUNBSjtBREVFO0VBQ0Usb0NBQUE7QUNBSiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2F1dGhlbnRpY2F0aW9uLW1lbnUvYXV0aGVudGljYXRpb24tbWVudS5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIjpob3N0IDo6bmctZGVlcCB7XG4gIC5wLXBhbmVsbWVudSAucC1wYW5lbG1lbnUtcGFuZWx7XG4gICAgYm94LXNoYWRvdzogbm9uZSFpbXBvcnRhbnQ7XG4gIH1cbiAgLnAtcGFuZWxtZW51IC5wLXBhbmVsbWVudS1oZWFkZXIgPiBhe1xuICAgIGJvcmRlci1yYWRpdXM6IHVuc2V0IWltcG9ydGFudDtcbiAgICBib3JkZXItYm90dG9tOiAxcHggI2Y2ZjZmNiBzb2xpZCFpbXBvcnRhbnQ7XG4gICAgYm94LXNoYWRvdzogbm9uZSFpbXBvcnRhbnQ7XG4gIH1cbiAgLnAtbWVudWl0ZW0tbGluay1hY3RpdmUge1xuICAgIGJhY2tncm91bmQtY29sb3I6ICNlMGUwZTEhaW1wb3J0YW50O1xuICB9XG59XG4iLCI6aG9zdCA6Om5nLWRlZXAgLnAtcGFuZWxtZW51IC5wLXBhbmVsbWVudS1wYW5lbCB7XG4gIGJveC1zaGFkb3c6IG5vbmUgIWltcG9ydGFudDtcbn1cbjpob3N0IDo6bmctZGVlcCAucC1wYW5lbG1lbnUgLnAtcGFuZWxtZW51LWhlYWRlciA+IGEge1xuICBib3JkZXItcmFkaXVzOiB1bnNldCAhaW1wb3J0YW50O1xuICBib3JkZXItYm90dG9tOiAxcHggI2Y2ZjZmNiBzb2xpZCAhaW1wb3J0YW50O1xuICBib3gtc2hhZG93OiBub25lICFpbXBvcnRhbnQ7XG59XG46aG9zdCA6Om5nLWRlZXAgLnAtbWVudWl0ZW0tbGluay1hY3RpdmUge1xuICBiYWNrZ3JvdW5kLWNvbG9yOiAjZTBlMGUxICFpbXBvcnRhbnQ7XG59Il19 */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AuthenticationMenuComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-authentication-menu',
                templateUrl: './authentication-menu.component.html',
                styleUrls: ['./authentication-menu.component.scss']
            }]
    }], function () { return [{ type: i1.TranslateService }, { type: i2.MessageService }, { type: i3.AuthService }]; }, { isOpen: [{
            type: core_1.Input
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/authentication-pages-routing.module.ts":
/*!*****************************************************************************!*\
  !*** ./src/app/authentication-pages/authentication-pages-routing.module.ts ***!
  \*****************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthenticationPagesRoutingModule = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const router_1 = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js");
const authentication_pages_component_1 = __webpack_require__(/*! ./authentication-pages.component */ "./src/app/authentication-pages/authentication-pages.component.ts");
const project_component_1 = __webpack_require__(/*! ./project/project.component */ "./src/app/authentication-pages/project/project.component.ts");
const project_list_component_1 = __webpack_require__(/*! ./project/project-list/project-list.component */ "./src/app/authentication-pages/project/project-list/project-list.component.ts");
const auth_guard_1 = __webpack_require__(/*! ../../interceptor/auth.guard */ "./src/interceptor/auth.guard.ts");
const account_settings_component_1 = __webpack_require__(/*! ./account-settings/account-settings.component */ "./src/app/authentication-pages/account-settings/account-settings.component.ts");
const project_detail_component_1 = __webpack_require__(/*! ./project/project-detail/project-detail.component */ "./src/app/authentication-pages/project/project-detail/project-detail.component.ts");
const label_list_component_1 = __webpack_require__(/*! ./label/label-list/label-list.component */ "./src/app/authentication-pages/label/label-list/label-list.component.ts");
const link_component_1 = __webpack_require__(/*! ./link/link.component */ "./src/app/authentication-pages/link/link.component.ts");
const link_list_component_1 = __webpack_require__(/*! ./link/link-list/link-list.component */ "./src/app/authentication-pages/link/link-list/link-list.component.ts");
const link_detail_component_1 = __webpack_require__(/*! ./link/link-detail/link-detail.component */ "./src/app/authentication-pages/link/link-detail/link-detail.component.ts");
const file_report_component_1 = __webpack_require__(/*! ./file/file-report/file-report.component */ "./src/app/authentication-pages/file/file-report/file-report.component.ts");
const project_create_component_1 = __webpack_require__(/*! ./project/project-create/project-create.component */ "./src/app/authentication-pages/project/project-create/project-create.component.ts");
const history_tracking_component_1 = __webpack_require__(/*! ./history/history-tracking/history-tracking.component */ "./src/app/authentication-pages/history/history-tracking/history-tracking.component.ts");
const addressbook_component_1 = __webpack_require__(/*! ./addressbook/addressbook.component */ "./src/app/authentication-pages/addressbook/addressbook.component.ts");
const addressbook_group_detail_component_1 = __webpack_require__(/*! ./addressbook/addressbook-group-detail/addressbook-group-detail.component */ "./src/app/authentication-pages/addressbook/addressbook-group-detail/addressbook-group-detail.component.ts");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const routes = [
    {
        path: '',
        component: authentication_pages_component_1.AuthenticationPagesComponent,
        canActivate: [auth_guard_1.AuthGuard],
        children: [
            {
                path: 'project',
                component: project_component_1.ProjectComponent,
                children: [
                    { path: '', component: project_list_component_1.ProjectListComponent },
                    { path: 'create', component: project_create_component_1.ProjectCreateComponent },
                    { path: ':id/:folder_id', component: project_detail_component_1.ProjectDetailComponent },
                    { path: 'file/report/:projectId/:folderId/:fileId/:type', component: file_report_component_1.FileReportComponent },
                ]
            },
            {
                path: 'label',
                component: project_component_1.ProjectComponent,
                children: [
                    { path: ':project_id', component: label_list_component_1.LabelListComponent }
                ]
            },
            {
                path: 'link',
                component: link_component_1.LinkComponent,
                children: [
                    { path: ':project_id', component: link_list_component_1.LinkListComponent },
                    { path: ':project_id/:link_id', component: link_detail_component_1.LinkDetailComponent }
                ]
            },
            { path: 'account-settings', component: account_settings_component_1.AccountSettingsComponent },
            {
                path: 'history',
                component: history_tracking_component_1.HistoryTrackingComponent
            },
            {
                path: 'addressbook',
                component: addressbook_component_1.AddressbookComponent
            },
            {
                path: 'group/:id',
                component: addressbook_group_detail_component_1.AddressbookGroupDetailComponent
            },
            // redirect on startup or writing wrong URL
            { path: '**', redirectTo: 'project' }
        ]
    }
];
class AuthenticationPagesRoutingModule {
}
exports.AuthenticationPagesRoutingModule = AuthenticationPagesRoutingModule;
AuthenticationPagesRoutingModule.ɵmod = i0.ɵɵdefineNgModule({ type: AuthenticationPagesRoutingModule });
AuthenticationPagesRoutingModule.ɵinj = i0.ɵɵdefineInjector({ factory: function AuthenticationPagesRoutingModule_Factory(t) { return new (t || AuthenticationPagesRoutingModule)(); }, imports: [[router_1.RouterModule.forChild(routes)], router_1.RouterModule] });
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(AuthenticationPagesRoutingModule, { imports: [i1.RouterModule], exports: [router_1.RouterModule] }); })();
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AuthenticationPagesRoutingModule, [{
        type: core_1.NgModule,
        args: [{
                imports: [router_1.RouterModule.forChild(routes)],
                exports: [router_1.RouterModule]
            }]
    }], null, null); })();


/***/ }),

/***/ "./src/app/authentication-pages/authentication-pages.component.ts":
/*!************************************************************************!*\
  !*** ./src/app/authentication-pages/authentication-pages.component.ts ***!
  \************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthenticationPagesComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const animations_1 = __webpack_require__(/*! @angular/animations */ "./node_modules/@angular/animations/__ivy_ngcc__/fesm2015/animations.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! ../services/auth.service */ "./src/app/services/auth.service.ts"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! ./authentication-header/authentication-header.component */ "./src/app/authentication-pages/authentication-header/authentication-header.component.ts"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! ./authentication-menu/authentication-menu.component */ "./src/app/authentication-pages/authentication-menu/authentication-menu.component.ts"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! primeng/confirmdialog */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-confirmdialog.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! primeng/confirmpopup */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-confirmpopup.js"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const _c0 = function (a0) { return { count: a0 }; };
function AuthenticationPagesComponent_div_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 9);
    i0.ɵɵelementStart(1, "div", 10);
    i0.ɵɵelement(2, "span", 11);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("innerHTML", i0.ɵɵpipeBind2(3, 1, "label.trial_mgs", i0.ɵɵpureFunction1(4, _c0, ctx_r0.expiryTrialDays)), i0.ɵɵsanitizeHtml);
} }
class AuthenticationPagesComponent {
    constructor(authService) {
        this.authService = authService;
        this.isTrial = false;
        this.expiryTrialDays = 0;
        this.isOpen = true;
    }
    ngOnInit() {
        this.authUser = this.authService.authUser;
        console.log(this.authUser);
        // check if the team status is Trial status
        if (this.authUser.teamStatus === 6) {
            this.isTrial = true;
            // expiry trial days inform
            const currentDate = new Date();
            const teamCreateDate = new Date(this.authUser.teamCreatedDate);
            const days = Math.round((currentDate.getTime() - teamCreateDate.getTime()) / 1000 / 60 / 60 / 24);
            if (days <= 30) {
                this.expiryTrialDays = 30 - days;
            }
        }
    }
    toggle() {
        this.isOpen = !this.isOpen;
    }
}
exports.AuthenticationPagesComponent = AuthenticationPagesComponent;
AuthenticationPagesComponent.ɵfac = function AuthenticationPagesComponent_Factory(t) { return new (t || AuthenticationPagesComponent)(i0.ɵɵdirectiveInject(i1.AuthService)); };
AuthenticationPagesComponent.ɵcmp = i0.ɵɵdefineComponent({ type: AuthenticationPagesComponent, selectors: [["app-authentication-pages"]], decls: 10, vars: 6, consts: [[3, "isShowHideMenu"], [1, "p-d-flex"], ["id", "content-wrapper", 1, "d-flex", "flex-column", "p-width-100"], [1, "p-d-none", "p-d-md-block", "menu-layout"], [3, "isOpen"], [1, "p-p-4", "main-container"], ["class", "alert p-mt-2", 4, "ngIf"], ["styleClass", "md-dialog", "rejectButtonStyleClass", "p-button-text", 3, "baseZIndex"], ["key", "confirm", 3, "baseZIndex"], [1, "alert", "p-mt-2"], [1, "p-d-flex", "p-justify-center", "p-align-center"], [3, "innerHTML"]], template: function AuthenticationPagesComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "app-authentication-header", 0);
        i0.ɵɵlistener("isShowHideMenu", function AuthenticationPagesComponent_Template_app_authentication_header_isShowHideMenu_0_listener() { return ctx.toggle(); });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵelementStart(2, "div", 2);
        i0.ɵɵelementStart(3, "div", 3);
        i0.ɵɵelement(4, "app-authentication-menu", 4);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(5, "div", 5);
        i0.ɵɵtemplate(6, AuthenticationPagesComponent_div_6_Template, 4, 6, "div", 6);
        i0.ɵɵelement(7, "router-outlet");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelement(8, "p-confirmDialog", 7);
        i0.ɵɵelement(9, "p-confirmPopup", 8);
    } if (rf & 2) {
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("@openClose", ctx.isOpen ? "open" : "closed");
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("isOpen", ctx.isOpen);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("@fullShort", ctx.isOpen ? "short" : "full");
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.isTrial);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("baseZIndex", 10000);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("baseZIndex", 10001);
    } }, directives: [i2.AuthenticationHeaderComponent, i3.AuthenticationMenuComponent, i4.NgIf, i5.RouterOutlet, i6.ConfirmDialog, i7.ConfirmPopup], pipes: [i8.TranslatePipe], styles: [".alert[_ngcontent-%COMP%] {\n  position: relative;\n  padding: 0.75rem 1.25rem;\n  margin-bottom: 1rem;\n  border: 1px solid #faebcc;\n  border-radius: 0.35rem;\n  color: #8a6d3b;\n  background-color: #fcf8e3;\n}\n\n[_nghost-%COMP%]     .main-footer {\n  background: #ffffff;\n  bottom: 0;\n  left: 0;\n  position: absolute;\n  right: 0;\n}\n\n[_nghost-%COMP%]     .main-footer-inner {\n  font-size: 11px;\n  line-height: 50px;\n  margin: 0 auto;\n  max-width: 978px;\n}\n\n[_nghost-%COMP%]     .main-footer-inner ul {\n  border-top: 1px solid #ddd;\n  margin: 0;\n  text-align: center;\n}\n\n[_nghost-%COMP%]     .footer-navigation li {\n  display: inline-block;\n  margin-right: 10px;\n}\n\n[_nghost-%COMP%]     .main-footer-inner a {\n  color: #666;\n  outline: 0;\n  text-decoration: none;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvYXV0aGVudGljYXRpb24tcGFnZXMuY29tcG9uZW50LnNjc3MiLCJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2F1dGhlbnRpY2F0aW9uLXBhZ2VzLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0Usa0JBQUE7RUFDQSx3QkFBQTtFQUNBLG1CQUFBO0VBQ0EseUJBQUE7RUFDQSxzQkFBQTtFQUNBLGNBQUE7RUFDQSx5QkFBQTtBQ0NGOztBREdFO0VBQ0UsbUJBQUE7RUFDQSxTQUFBO0VBQ0EsT0FBQTtFQUNBLGtCQUFBO0VBQ0EsUUFBQTtBQ0FKOztBREdFO0VBQ0UsZUFBQTtFQUNBLGlCQUFBO0VBQ0EsY0FBQTtFQUNBLGdCQUFBO0FDREo7O0FESUU7RUFDRSwwQkFBQTtFQUNBLFNBQUE7RUFDQSxrQkFBQTtBQ0ZKOztBREtFO0VBQ0UscUJBQUE7RUFDQSxrQkFBQTtBQ0hKOztBRE1FO0VBQ0UsV0FBQTtFQUNBLFVBQUE7RUFDQSxxQkFBQTtBQ0pKIiwiZmlsZSI6InNyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvYXV0aGVudGljYXRpb24tcGFnZXMuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyIuYWxlcnQge1xuICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gIHBhZGRpbmc6IC43NXJlbSAxLjI1cmVtO1xuICBtYXJnaW4tYm90dG9tOiAxcmVtO1xuICBib3JkZXI6IDFweCBzb2xpZCAjZmFlYmNjO1xuICBib3JkZXItcmFkaXVzOiAuMzVyZW07XG4gIGNvbG9yOiAjOGE2ZDNiO1xuICBiYWNrZ3JvdW5kLWNvbG9yOiAjZmNmOGUzO1xufVxuXG46aG9zdCA6Om5nLWRlZXAge1xuICAubWFpbi1mb290ZXIge1xuICAgIGJhY2tncm91bmQ6ICNmZmZmZmY7XG4gICAgYm90dG9tOiAwO1xuICAgIGxlZnQ6IDA7XG4gICAgcG9zaXRpb246IGFic29sdXRlO1xuICAgIHJpZ2h0OiAwO1xuICB9XG5cbiAgLm1haW4tZm9vdGVyLWlubmVyIHtcbiAgICBmb250LXNpemU6IDExcHg7XG4gICAgbGluZS1oZWlnaHQ6IDUwcHg7XG4gICAgbWFyZ2luOiAwIGF1dG87XG4gICAgbWF4LXdpZHRoOiA5NzhweDtcbiAgfVxuXG4gIC5tYWluLWZvb3Rlci1pbm5lciB1bCB7XG4gICAgYm9yZGVyLXRvcDogMXB4IHNvbGlkICNkZGQ7XG4gICAgbWFyZ2luOiAwO1xuICAgIHRleHQtYWxpZ246IGNlbnRlcjtcbiAgfVxuXG4gIC5mb290ZXItbmF2aWdhdGlvbiBsaSB7XG4gICAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xuICAgIG1hcmdpbi1yaWdodDogMTBweDtcbiAgfVxuXG4gIC5tYWluLWZvb3Rlci1pbm5lciBhIHtcbiAgICBjb2xvcjogIzY2NjtcbiAgICBvdXRsaW5lOiAwO1xuICAgIHRleHQtZGVjb3JhdGlvbjogbm9uZTtcbiAgfVxufVxuIiwiLmFsZXJ0IHtcbiAgcG9zaXRpb246IHJlbGF0aXZlO1xuICBwYWRkaW5nOiAwLjc1cmVtIDEuMjVyZW07XG4gIG1hcmdpbi1ib3R0b206IDFyZW07XG4gIGJvcmRlcjogMXB4IHNvbGlkICNmYWViY2M7XG4gIGJvcmRlci1yYWRpdXM6IDAuMzVyZW07XG4gIGNvbG9yOiAjOGE2ZDNiO1xuICBiYWNrZ3JvdW5kLWNvbG9yOiAjZmNmOGUzO1xufVxuXG46aG9zdCA6Om5nLWRlZXAgLm1haW4tZm9vdGVyIHtcbiAgYmFja2dyb3VuZDogI2ZmZmZmZjtcbiAgYm90dG9tOiAwO1xuICBsZWZ0OiAwO1xuICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gIHJpZ2h0OiAwO1xufVxuOmhvc3QgOjpuZy1kZWVwIC5tYWluLWZvb3Rlci1pbm5lciB7XG4gIGZvbnQtc2l6ZTogMTFweDtcbiAgbGluZS1oZWlnaHQ6IDUwcHg7XG4gIG1hcmdpbjogMCBhdXRvO1xuICBtYXgtd2lkdGg6IDk3OHB4O1xufVxuOmhvc3QgOjpuZy1kZWVwIC5tYWluLWZvb3Rlci1pbm5lciB1bCB7XG4gIGJvcmRlci10b3A6IDFweCBzb2xpZCAjZGRkO1xuICBtYXJnaW46IDA7XG4gIHRleHQtYWxpZ246IGNlbnRlcjtcbn1cbjpob3N0IDo6bmctZGVlcCAuZm9vdGVyLW5hdmlnYXRpb24gbGkge1xuICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG4gIG1hcmdpbi1yaWdodDogMTBweDtcbn1cbjpob3N0IDo6bmctZGVlcCAubWFpbi1mb290ZXItaW5uZXIgYSB7XG4gIGNvbG9yOiAjNjY2O1xuICBvdXRsaW5lOiAwO1xuICB0ZXh0LWRlY29yYXRpb246IG5vbmU7XG59Il19 */"], data: { animation: [
            animations_1.trigger('openClose', [
                // ...
                animations_1.state('open', animations_1.style({
                    width: '230px'
                })),
                animations_1.state('closed', animations_1.style({
                    width: '0px',
                    display: 'none'
                })),
                animations_1.transition('open => closed', [
                    animations_1.animate('0.2s')
                ]),
                animations_1.transition('closed => open', [
                    animations_1.style({ display: 'block' }),
                    animations_1.animate('0.15s')
                ]),
            ]),
            animations_1.trigger('fullShort', [
                // ...
                animations_1.state('full', animations_1.style({
                    marginLeft: '0px'
                })),
                animations_1.state('short', animations_1.style({
                    marginLeft: '230px'
                })),
                animations_1.transition('short => full', [
                    animations_1.animate('0.15s')
                ]),
                animations_1.transition('full => short', [
                    animations_1.animate('0.15s')
                ]),
            ]),
        ] } });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AuthenticationPagesComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-authentication-pages',
                animations: [
                    animations_1.trigger('openClose', [
                        // ...
                        animations_1.state('open', animations_1.style({
                            width: '230px'
                        })),
                        animations_1.state('closed', animations_1.style({
                            width: '0px',
                            display: 'none'
                        })),
                        animations_1.transition('open => closed', [
                            animations_1.animate('0.2s')
                        ]),
                        animations_1.transition('closed => open', [
                            animations_1.style({ display: 'block' }),
                            animations_1.animate('0.15s')
                        ]),
                    ]),
                    animations_1.trigger('fullShort', [
                        // ...
                        animations_1.state('full', animations_1.style({
                            marginLeft: '0px'
                        })),
                        animations_1.state('short', animations_1.style({
                            marginLeft: '230px'
                        })),
                        animations_1.transition('short => full', [
                            animations_1.animate('0.15s')
                        ]),
                        animations_1.transition('full => short', [
                            animations_1.animate('0.15s')
                        ]),
                    ]),
                ],
                templateUrl: './authentication-pages.component.html',
                styleUrls: ['./authentication-pages.component.scss']
            }]
    }], function () { return [{ type: i1.AuthService }]; }, null); })();


/***/ }),

/***/ "./src/app/authentication-pages/authentication-pages.module.ts":
/*!*********************************************************************!*\
  !*** ./src/app/authentication-pages/authentication-pages.module.ts ***!
  \*********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthenticationPagesModule = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const common_1 = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js");
const authentication_pages_routing_module_1 = __webpack_require__(/*! ./authentication-pages-routing.module */ "./src/app/authentication-pages/authentication-pages-routing.module.ts");
const project_component_1 = __webpack_require__(/*! ./project/project.component */ "./src/app/authentication-pages/project/project.component.ts");
const project_list_component_1 = __webpack_require__(/*! ./project/project-list/project-list.component */ "./src/app/authentication-pages/project/project-list/project-list.component.ts");
const project_form_component_1 = __webpack_require__(/*! ./project/project-form/project-form.component */ "./src/app/authentication-pages/project/project-form/project-form.component.ts");
const authentication_pages_component_1 = __webpack_require__(/*! ./authentication-pages.component */ "./src/app/authentication-pages/authentication-pages.component.ts");
const authentication_header_component_1 = __webpack_require__(/*! ./authentication-header/authentication-header.component */ "./src/app/authentication-pages/authentication-header/authentication-header.component.ts");
const authentication_footer_component_1 = __webpack_require__(/*! ./authentication-footer/authentication-footer.component */ "./src/app/authentication-pages/authentication-footer/authentication-footer.component.ts");
const authentication_menu_component_1 = __webpack_require__(/*! ./authentication-menu/authentication-menu.component */ "./src/app/authentication-pages/authentication-menu/authentication-menu.component.ts");
const api_1 = __webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js");
const shared_module_1 = __webpack_require__(/*! ../shared/shared.module */ "./src/app/shared/shared.module.ts");
const file_report_component_1 = __webpack_require__(/*! ./file/file-report/file-report.component */ "./src/app/authentication-pages/file/file-report/file-report.component.ts");
const file_internal_component_1 = __webpack_require__(/*! ./file/file-report/file-internal/file-internal.component */ "./src/app/authentication-pages/file/file-report/file-internal/file-internal.component.ts");
const file_external_component_1 = __webpack_require__(/*! ./file/file-report/file-external/file-external.component */ "./src/app/authentication-pages/file/file-report/file-external/file-external.component.ts");
const file_normal_component_1 = __webpack_require__(/*! ./file/file-report/file-normal/file-normal.component */ "./src/app/authentication-pages/file/file-report/file-normal/file-normal.component.ts");
const file_path_component_1 = __webpack_require__(/*! ./file/file-report/file-path/file-path.component */ "./src/app/authentication-pages/file/file-report/file-path/file-path.component.ts");
const file_report_date_component_1 = __webpack_require__(/*! ./file/file-report/file-report-date/file-report-date.component */ "./src/app/authentication-pages/file/file-report/file-report-date/file-report-date.component.ts");
const file_tracking_ip_component_1 = __webpack_require__(/*! ./file/file-report/file-tracking-ip/file-tracking-ip.component */ "./src/app/authentication-pages/file/file-report/file-tracking-ip/file-tracking-ip.component.ts");
const file_open_statistics_component_1 = __webpack_require__(/*! ./file/file-report/file-open-statistics/file-open-statistics.component */ "./src/app/authentication-pages/file/file-report/file-open-statistics/file-open-statistics.component.ts");
const project_create_component_1 = __webpack_require__(/*! ./project/project-create/project-create.component */ "./src/app/authentication-pages/project/project-create/project-create.component.ts");
const project_setting_component_1 = __webpack_require__(/*! ./project/project-setting/project-setting.component */ "./src/app/authentication-pages/project/project-setting/project-setting.component.ts");
const watermark_setting_component_1 = __webpack_require__(/*! ./project/project-form/watermark-setting/watermark-setting.component */ "./src/app/authentication-pages/project/project-form/watermark-setting/watermark-setting.component.ts");
const project_collaborator_component_1 = __webpack_require__(/*! ./project/project-form/project-collaborator/project-collaborator.component */ "./src/app/authentication-pages/project/project-form/project-collaborator/project-collaborator.component.ts");
const group_component_1 = __webpack_require__(/*! ./project/project-form/group/group.component */ "./src/app/authentication-pages/project/project-form/group/group.component.ts");
const project_transfer_component_1 = __webpack_require__(/*! ./project/project-transfer/project-transfer.component */ "./src/app/authentication-pages/project/project-transfer/project-transfer.component.ts");
const project_detail_component_1 = __webpack_require__(/*! ./project/project-detail/project-detail.component */ "./src/app/authentication-pages/project/project-detail/project-detail.component.ts");
const label_component_1 = __webpack_require__(/*! ./label/label.component */ "./src/app/authentication-pages/label/label.component.ts");
const label_list_component_1 = __webpack_require__(/*! ./label/label-list/label-list.component */ "./src/app/authentication-pages/label/label-list/label-list.component.ts");
const label_form_component_1 = __webpack_require__(/*! ./label/label-form/label-form.component */ "./src/app/authentication-pages/label/label-form/label-form.component.ts");
const link_component_1 = __webpack_require__(/*! ./link/link.component */ "./src/app/authentication-pages/link/link.component.ts");
const link_list_component_1 = __webpack_require__(/*! ./link/link-list/link-list.component */ "./src/app/authentication-pages/link/link-list/link-list.component.ts");
const link_detail_component_1 = __webpack_require__(/*! ./link/link-detail/link-detail.component */ "./src/app/authentication-pages/link/link-detail/link-detail.component.ts");
const view_online_component_1 = __webpack_require__(/*! ./view-online/view-online.component */ "./src/app/authentication-pages/view-online/view-online.component.ts");
const link_create_component_1 = __webpack_require__(/*! ./link/link-form/link-create/link-create.component */ "./src/app/authentication-pages/link/link-form/link-create/link-create.component.ts");
const link_setting_component_1 = __webpack_require__(/*! ./link/link-form/link-setting/link-setting.component */ "./src/app/authentication-pages/link/link-form/link-setting/link-setting.component.ts");
const view_online_form_component_1 = __webpack_require__(/*! ./view-online/view-online-form/view-online-form.component */ "./src/app/authentication-pages/view-online/view-online-form/view-online-form.component.ts");
const file_version_component_1 = __webpack_require__(/*! ./file/file-version/file-version.component */ "./src/app/authentication-pages/file/file-version/file-version.component.ts");
const folder_tree_component_1 = __webpack_require__(/*! ./project/folder-tree/folder-tree.component */ "./src/app/authentication-pages/project/folder-tree/folder-tree.component.ts");
const file_info_component_1 = __webpack_require__(/*! ./file/file-info/file-info.component */ "./src/app/authentication-pages/file/file-info/file-info.component.ts");
const file_component_1 = __webpack_require__(/*! ./file/file.component */ "./src/app/authentication-pages/file/file.component.ts");
const collaborator_component_1 = __webpack_require__(/*! ./collaborator/collaborator.component */ "./src/app/authentication-pages/collaborator/collaborator.component.ts");
const notification_component_1 = __webpack_require__(/*! ./notification/notification.component */ "./src/app/authentication-pages/notification/notification.component.ts");
const notification_message_component_1 = __webpack_require__(/*! ./notification/notification-message/notification-message.component */ "./src/app/authentication-pages/notification/notification-message/notification-message.component.ts");
const account_settings_component_1 = __webpack_require__(/*! ./account-settings/account-settings.component */ "./src/app/authentication-pages/account-settings/account-settings.component.ts");
const project_information_component_1 = __webpack_require__(/*! ./project/project-information/project-information.component */ "./src/app/authentication-pages/project/project-information/project-information.component.ts");
const view_online_setting_component_1 = __webpack_require__(/*! ./drm/view-online-setting/view-online-setting.component */ "./src/app/authentication-pages/drm/view-online-setting/view-online-setting.component.ts");
const drm_setting_component_1 = __webpack_require__(/*! ./drm/drm-setting/drm-setting.component */ "./src/app/authentication-pages/drm/drm-setting/drm-setting.component.ts");
const history_component_1 = __webpack_require__(/*! ./history/history.component */ "./src/app/authentication-pages/history/history.component.ts");
const history_tracking_component_1 = __webpack_require__(/*! ./history/history-tracking/history-tracking.component */ "./src/app/authentication-pages/history/history-tracking/history-tracking.component.ts");
const change_password_component_1 = __webpack_require__(/*! ./account-settings/change-password/change-password.component */ "./src/app/authentication-pages/account-settings/change-password/change-password.component.ts");
const account_information_component_1 = __webpack_require__(/*! ./account-settings/account-information/account-information.component */ "./src/app/authentication-pages/account-settings/account-information/account-information.component.ts");
const notification_security_component_1 = __webpack_require__(/*! ./account-settings/notification-security/notification-security.component */ "./src/app/authentication-pages/account-settings/notification-security/notification-security.component.ts");
const comment_component_1 = __webpack_require__(/*! ./comment/comment.component */ "./src/app/authentication-pages/comment/comment.component.ts");
const comment_detail_component_1 = __webpack_require__(/*! ./comment/comment-detail/comment-detail.component */ "./src/app/authentication-pages/comment/comment-detail/comment-detail.component.ts");
const comment_all_component_1 = __webpack_require__(/*! ./comment/comment-detail/comment-all/comment-all.component */ "./src/app/authentication-pages/comment/comment-detail/comment-all/comment-all.component.ts");
const activity_component_1 = __webpack_require__(/*! ./activity/activity.component */ "./src/app/authentication-pages/activity/activity.component.ts");
const activity_detail_component_1 = __webpack_require__(/*! ./activity/activity-detail/activity-detail.component */ "./src/app/authentication-pages/activity/activity-detail/activity-detail.component.ts");
const activity_project_role_component_1 = __webpack_require__(/*! ./activity/activity-detail/activity-project-role/activity-project-role.component */ "./src/app/authentication-pages/activity/activity-detail/activity-project-role/activity-project-role.component.ts");
const activity_content_type_component_1 = __webpack_require__(/*! ./activity/activity-detail/activity-content-type/activity-content-type.component */ "./src/app/authentication-pages/activity/activity-detail/activity-content-type/activity-content-type.component.ts");
const addressbook_component_1 = __webpack_require__(/*! ./addressbook/addressbook.component */ "./src/app/authentication-pages/addressbook/addressbook.component.ts");
const addressbook_list_component_1 = __webpack_require__(/*! ./addressbook/addressbook-list/addressbook-list.component */ "./src/app/authentication-pages/addressbook/addressbook-list/addressbook-list.component.ts");
const addressbook_form_component_1 = __webpack_require__(/*! ./addressbook/addressbook-form/addressbook-form.component */ "./src/app/authentication-pages/addressbook/addressbook-form/addressbook-form.component.ts");
const addressbook_group_list_component_1 = __webpack_require__(/*! ./addressbook/addressbook-group-list/addressbook-group-list.component */ "./src/app/authentication-pages/addressbook/addressbook-group-list/addressbook-group-list.component.ts");
const addressbook_group_form_component_1 = __webpack_require__(/*! ./addressbook/addressbook-group-form/addressbook-group-form.component */ "./src/app/authentication-pages/addressbook/addressbook-group-form/addressbook-group-form.component.ts");
const addressbook_group_detail_component_1 = __webpack_require__(/*! ./addressbook/addressbook-group-detail/addressbook-group-detail.component */ "./src/app/authentication-pages/addressbook/addressbook-group-detail/addressbook-group-detail.component.ts");
const edit_addressbook_group_component_1 = __webpack_require__(/*! ./addressbook/edit-addressbook-group/edit-addressbook-group.component */ "./src/app/authentication-pages/addressbook/edit-addressbook-group/edit-addressbook-group.component.ts");
const addressbook_group_member_component_1 = __webpack_require__(/*! ./addressbook/addressbook-group-member/addressbook-group-member.component */ "./src/app/authentication-pages/addressbook/addressbook-group-member/addressbook-group-member.component.ts");
const addressbook_not_in_group_component_1 = __webpack_require__(/*! ./addressbook/addressbook-not-in-group/addressbook-not-in-group.component */ "./src/app/authentication-pages/addressbook/addressbook-not-in-group/addressbook-not-in-group.component.ts");
const addressbook_group_except_list_component_1 = __webpack_require__(/*! ./addressbook/addressbook-group-except-list/addressbook-group-except-list.component */ "./src/app/authentication-pages/addressbook/addressbook-group-except-list/addressbook-group-except-list.component.ts");
const addressbook_group_component_1 = __webpack_require__(/*! ./addressbook/addressbook-group/addressbook-group.component */ "./src/app/authentication-pages/addressbook/addressbook-group/addressbook-group.component.ts");
const autofocus_directive_1 = __webpack_require__(/*! ../shared/autofocus.directive */ "./src/app/shared/autofocus.directive.ts");
const project_notify_component_1 = __webpack_require__(/*! ./project/project-form/project-notify/project-notify.component */ "./src/app/authentication-pages/project/project-form/project-notify/project-notify.component.ts");
const folder_component_1 = __webpack_require__(/*! ./folder/folder.component */ "./src/app/authentication-pages/folder/folder.component.ts");
const folder_info_component_1 = __webpack_require__(/*! ./folder/folder-info/folder-info.component */ "./src/app/authentication-pages/folder/folder-info/folder-info.component.ts");
const item_info_component_1 = __webpack_require__(/*! ./file/item-info/item-info.component */ "./src/app/authentication-pages/file/item-info/item-info.component.ts");
const file_tracking_open_component_1 = __webpack_require__(/*! ./file/file-report/file-tracking-open/file-tracking-open.component */ "./src/app/authentication-pages/file/file-report/file-tracking-open/file-tracking-open.component.ts");
const item_title_component_1 = __webpack_require__(/*! ./file/item-title/item-title.component */ "./src/app/authentication-pages/file/item-title/item-title.component.ts");
const project_drm_setting_component_1 = __webpack_require__(/*! ./drm/project-drm-setting/project-drm-setting.component */ "./src/app/authentication-pages/drm/project-drm-setting/project-drm-setting.component.ts");
const file_drm_setting_component_1 = __webpack_require__(/*! ./file/file-drm-setting/file-drm-setting.component */ "./src/app/authentication-pages/file/file-drm-setting/file-drm-setting.component.ts");
const address_group_select_component_1 = __webpack_require__(/*! ./addressbook/address-group-select/address-group-select.component */ "./src/app/authentication-pages/addressbook/address-group-select/address-group-select.component.ts");
const member_group_component_1 = __webpack_require__(/*! ./project/project-form/member-group/member-group.component */ "./src/app/authentication-pages/project/project-form/member-group/member-group.component.ts");
const file_translation_component_1 = __webpack_require__(/*! ./file/file-translation/file-translation.component */ "./src/app/authentication-pages/file/file-translation/file-translation.component.ts");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
class AuthenticationPagesModule {
}
exports.AuthenticationPagesModule = AuthenticationPagesModule;
AuthenticationPagesModule.ɵmod = i0.ɵɵdefineNgModule({ type: AuthenticationPagesModule });
AuthenticationPagesModule.ɵinj = i0.ɵɵdefineInjector({ factory: function AuthenticationPagesModule_Factory(t) { return new (t || AuthenticationPagesModule)(); }, providers: [api_1.ConfirmationService, common_1.DatePipe], imports: [[
            common_1.CommonModule,
            authentication_pages_routing_module_1.AuthenticationPagesRoutingModule,
            shared_module_1.SharedModule
        ]] });
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(AuthenticationPagesModule, { declarations: [project_component_1.ProjectComponent,
        project_list_component_1.ProjectListComponent,
        project_form_component_1.ProjectFormComponent,
        authentication_pages_component_1.AuthenticationPagesComponent,
        authentication_header_component_1.AuthenticationHeaderComponent,
        authentication_footer_component_1.AuthenticationFooterComponent,
        authentication_menu_component_1.AuthenticationMenuComponent,
        file_report_component_1.FileReportComponent,
        file_internal_component_1.FileInternalComponent,
        file_external_component_1.FileExternalComponent,
        file_normal_component_1.FileNormalComponent,
        file_path_component_1.FilePathComponent,
        file_report_date_component_1.FileReportDateComponent,
        file_tracking_ip_component_1.FileTrackingIpComponent,
        file_open_statistics_component_1.FileOpenStatisticsComponent,
        project_create_component_1.ProjectCreateComponent,
        project_setting_component_1.ProjectSettingComponent,
        drm_setting_component_1.DrmSettingComponent,
        watermark_setting_component_1.WatermarkSettingComponent,
        project_collaborator_component_1.ProjectCollaboratorComponent,
        group_component_1.GroupComponent,
        project_transfer_component_1.ProjectTransferComponent,
        project_detail_component_1.ProjectDetailComponent,
        label_component_1.LabelComponent,
        label_list_component_1.LabelListComponent,
        label_form_component_1.LabelFormComponent,
        account_settings_component_1.AccountSettingsComponent,
        link_component_1.LinkComponent,
        link_list_component_1.LinkListComponent,
        link_create_component_1.LinkCreateComponent,
        link_setting_component_1.LinkSettingComponent,
        link_detail_component_1.LinkDetailComponent,
        view_online_component_1.ViewOnlineComponent,
        view_online_form_component_1.ViewOnlineFormComponent,
        file_version_component_1.FileVersionComponent,
        folder_tree_component_1.FolderTreeComponent,
        collaborator_component_1.CollaboratorComponent,
        file_info_component_1.FileInfoComponent,
        file_component_1.FileComponent,
        notification_component_1.NotificationComponent,
        notification_message_component_1.NotificationMessageComponent,
        project_information_component_1.ProjectInformationComponent,
        view_online_setting_component_1.ViewOnlineSettingComponent,
        history_component_1.HistoryComponent,
        history_tracking_component_1.HistoryTrackingComponent,
        change_password_component_1.ChangePasswordComponent,
        account_information_component_1.AccountInformationComponent,
        notification_security_component_1.NotificationSecurityComponent,
        comment_component_1.CommentComponent,
        comment_detail_component_1.CommentDetailComponent,
        comment_all_component_1.CommentAllComponent,
        activity_component_1.ActivityComponent,
        activity_detail_component_1.ActivityDetailComponent,
        activity_project_role_component_1.ActivityProjectRoleComponent,
        activity_content_type_component_1.ActivityContentTypeComponent,
        file_version_component_1.FileVersionComponent,
        link_create_component_1.LinkCreateComponent,
        link_setting_component_1.LinkSettingComponent,
        collaborator_component_1.CollaboratorComponent,
        addressbook_component_1.AddressbookComponent,
        addressbook_list_component_1.AddressbookListComponent,
        addressbook_form_component_1.AddressbookFormComponent,
        addressbook_group_list_component_1.AddressbookGroupListComponent,
        addressbook_group_form_component_1.AddressbookGroupFormComponent,
        addressbook_group_detail_component_1.AddressbookGroupDetailComponent,
        edit_addressbook_group_component_1.EditAddressbookGroupComponent,
        addressbook_group_member_component_1.AddressbookGroupMemberComponent,
        addressbook_not_in_group_component_1.AddressbookNotInGroupComponent,
        addressbook_group_except_list_component_1.AddressbookGroupExceptListComponent,
        addressbook_group_component_1.AddressbookGroupComponent,
        autofocus_directive_1.AutofocusDirective,
        project_notify_component_1.ProjectNotifyComponent,
        folder_component_1.FolderComponent,
        folder_info_component_1.FolderInfoComponent,
        item_info_component_1.ItemInfoComponent,
        file_tracking_open_component_1.FileTrackingOpenComponent,
        item_title_component_1.ItemTitleComponent,
        project_drm_setting_component_1.ProjectDrmSettingComponent,
        file_drm_setting_component_1.FileDrmSettingComponent,
        address_group_select_component_1.AddressGroupSelectComponent,
        member_group_component_1.MemberGroupComponent,
        file_translation_component_1.FileTranslationComponent], imports: [common_1.CommonModule,
        authentication_pages_routing_module_1.AuthenticationPagesRoutingModule,
        shared_module_1.SharedModule], exports: [view_online_component_1.ViewOnlineComponent,
        view_online_form_component_1.ViewOnlineFormComponent,
        autofocus_directive_1.AutofocusDirective] }); })();
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AuthenticationPagesModule, [{
        type: core_1.NgModule,
        args: [{
                declarations: [
                    project_component_1.ProjectComponent,
                    project_list_component_1.ProjectListComponent,
                    project_form_component_1.ProjectFormComponent,
                    authentication_pages_component_1.AuthenticationPagesComponent,
                    authentication_header_component_1.AuthenticationHeaderComponent,
                    authentication_footer_component_1.AuthenticationFooterComponent,
                    authentication_menu_component_1.AuthenticationMenuComponent,
                    file_report_component_1.FileReportComponent,
                    file_internal_component_1.FileInternalComponent,
                    file_external_component_1.FileExternalComponent,
                    file_normal_component_1.FileNormalComponent,
                    file_path_component_1.FilePathComponent,
                    file_report_date_component_1.FileReportDateComponent,
                    file_tracking_ip_component_1.FileTrackingIpComponent,
                    file_open_statistics_component_1.FileOpenStatisticsComponent,
                    project_create_component_1.ProjectCreateComponent,
                    project_setting_component_1.ProjectSettingComponent,
                    drm_setting_component_1.DrmSettingComponent,
                    watermark_setting_component_1.WatermarkSettingComponent,
                    project_collaborator_component_1.ProjectCollaboratorComponent,
                    group_component_1.GroupComponent,
                    project_transfer_component_1.ProjectTransferComponent,
                    project_detail_component_1.ProjectDetailComponent,
                    label_component_1.LabelComponent,
                    label_list_component_1.LabelListComponent,
                    label_form_component_1.LabelFormComponent,
                    account_settings_component_1.AccountSettingsComponent,
                    link_component_1.LinkComponent,
                    link_list_component_1.LinkListComponent,
                    link_create_component_1.LinkCreateComponent,
                    link_setting_component_1.LinkSettingComponent,
                    link_detail_component_1.LinkDetailComponent,
                    view_online_component_1.ViewOnlineComponent,
                    view_online_form_component_1.ViewOnlineFormComponent,
                    file_version_component_1.FileVersionComponent,
                    folder_tree_component_1.FolderTreeComponent,
                    collaborator_component_1.CollaboratorComponent,
                    file_info_component_1.FileInfoComponent,
                    file_component_1.FileComponent,
                    notification_component_1.NotificationComponent,
                    notification_message_component_1.NotificationMessageComponent,
                    project_information_component_1.ProjectInformationComponent,
                    view_online_setting_component_1.ViewOnlineSettingComponent,
                    history_component_1.HistoryComponent,
                    history_tracking_component_1.HistoryTrackingComponent,
                    change_password_component_1.ChangePasswordComponent,
                    account_information_component_1.AccountInformationComponent,
                    notification_security_component_1.NotificationSecurityComponent,
                    comment_component_1.CommentComponent,
                    comment_detail_component_1.CommentDetailComponent,
                    comment_all_component_1.CommentAllComponent,
                    activity_component_1.ActivityComponent,
                    activity_detail_component_1.ActivityDetailComponent,
                    activity_project_role_component_1.ActivityProjectRoleComponent,
                    activity_content_type_component_1.ActivityContentTypeComponent,
                    file_version_component_1.FileVersionComponent,
                    link_create_component_1.LinkCreateComponent,
                    link_setting_component_1.LinkSettingComponent,
                    collaborator_component_1.CollaboratorComponent,
                    addressbook_component_1.AddressbookComponent,
                    addressbook_list_component_1.AddressbookListComponent,
                    addressbook_form_component_1.AddressbookFormComponent,
                    addressbook_group_list_component_1.AddressbookGroupListComponent,
                    addressbook_group_form_component_1.AddressbookGroupFormComponent,
                    addressbook_group_detail_component_1.AddressbookGroupDetailComponent,
                    edit_addressbook_group_component_1.EditAddressbookGroupComponent,
                    addressbook_group_member_component_1.AddressbookGroupMemberComponent,
                    addressbook_not_in_group_component_1.AddressbookNotInGroupComponent,
                    addressbook_group_except_list_component_1.AddressbookGroupExceptListComponent,
                    addressbook_group_component_1.AddressbookGroupComponent,
                    autofocus_directive_1.AutofocusDirective,
                    project_notify_component_1.ProjectNotifyComponent,
                    folder_component_1.FolderComponent,
                    folder_info_component_1.FolderInfoComponent,
                    item_info_component_1.ItemInfoComponent,
                    file_tracking_open_component_1.FileTrackingOpenComponent,
                    item_title_component_1.ItemTitleComponent,
                    project_drm_setting_component_1.ProjectDrmSettingComponent,
                    file_drm_setting_component_1.FileDrmSettingComponent,
                    address_group_select_component_1.AddressGroupSelectComponent,
                    member_group_component_1.MemberGroupComponent,
                    file_translation_component_1.FileTranslationComponent,
                ],
                imports: [
                    common_1.CommonModule,
                    authentication_pages_routing_module_1.AuthenticationPagesRoutingModule,
                    shared_module_1.SharedModule
                ],
                exports: [
                    view_online_component_1.ViewOnlineComponent,
                    view_online_form_component_1.ViewOnlineFormComponent,
                    autofocus_directive_1.AutofocusDirective
                ],
                providers: [api_1.ConfirmationService, common_1.DatePipe]
            }]
    }], null, null); })();


/***/ }),

/***/ "./src/app/authentication-pages/collaborator/collaborator.component.ts":
/*!*****************************************************************************!*\
  !*** ./src/app/authentication-pages/collaborator/collaborator.component.ts ***!
  \*****************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.CollaboratorComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_constants_1 = tslib_1.__importStar(__webpack_require__(/*! ../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
const _ = tslib_1.__importStar(__webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js"));
const lodash_1 = __webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! ../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! ../../services/collaborator.service */ "./src/app/services/collaborator.service.ts"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! ../../services/user.service */ "./src/app/services/user.service.ts"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! ../../services/user-group.service */ "./src/app/services/user-group.service.ts"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! primeng/table */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-table.js"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i10 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
const i11 = tslib_1.__importStar(__webpack_require__(/*! primeng/ripple */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-ripple.js"));
const i12 = tslib_1.__importStar(__webpack_require__(/*! primeng/dialog */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dialog.js"));
const i13 = tslib_1.__importStar(__webpack_require__(/*! primeng/tag */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-tag.js"));
const i14 = tslib_1.__importStar(__webpack_require__(/*! @ng-select/ng-select */ "./node_modules/@ng-select/ng-select/__ivy_ngcc__/fesm2015/ng-select-ng-select.js"));
const i15 = tslib_1.__importStar(__webpack_require__(/*! primeng/dropdown */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dropdown.js"));
const i16 = tslib_1.__importStar(__webpack_require__(/*! primeng/checkbox */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-checkbox.js"));
const i17 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtextarea */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtextarea.js"));
const i18 = tslib_1.__importStar(__webpack_require__(/*! primeng/messages */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-messages.js"));
const i19 = tslib_1.__importStar(__webpack_require__(/*! ../project/project-form/group/group.component */ "./src/app/authentication-pages/project/project-form/group/group.component.ts"));
const i20 = tslib_1.__importStar(__webpack_require__(/*! ../project/project-form/member-group/member-group.component */ "./src/app/authentication-pages/project/project-form/member-group/member-group.component.ts"));
const _c0 = ["groupMemberComponent"];
const _c1 = ["groupComponent"];
function CollaboratorComponent_ng_template_3_i_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 30);
} }
function CollaboratorComponent_ng_template_3_i_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 31);
} }
function CollaboratorComponent_ng_template_3_i_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 32);
} }
function CollaboratorComponent_ng_template_3_a_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "a", 33);
    i0.ɵɵelementStart(1, "span");
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const collaborator_r10 = i0.ɵɵnextContext().$implicit;
    const ctx_r14 = i0.ɵɵnextContext();
    i0.ɵɵproperty("title", ctx_r14.getNameOrder(collaborator_r10.firstName, collaborator_r10.lastName));
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(ctx_r14.getNameOrder(collaborator_r10.firstName, collaborator_r10.lastName));
} }
function CollaboratorComponent_ng_template_3_a_9_Template(rf, ctx) { if (rf & 1) {
    const _r24 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "a", 34);
    i0.ɵɵelementStart(1, "span", 35);
    i0.ɵɵlistener("click", function CollaboratorComponent_ng_template_3_a_9_Template_span_click_1_listener() { i0.ɵɵrestoreView(_r24); const collaborator_r10 = i0.ɵɵnextContext().$implicit; const ctx_r23 = i0.ɵɵnextContext(); ctx_r23.memberGroupId = collaborator_r10.groupId; return ctx_r23.displayMemberGroupCoModal = true; });
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const collaborator_r10 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵproperty("title", collaborator_r10.name);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", collaborator_r10.name, " ");
} }
function CollaboratorComponent_ng_template_3_span_11_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 33);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const collaborator_r10 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵproperty("title", collaborator_r10.emailAddress);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(collaborator_r10.emailAddress);
} }
function CollaboratorComponent_ng_template_3_p_tag_12_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "p-tag", 36);
    i0.ɵɵpipe(1, "translate");
} if (rf & 2) {
    i0.ɵɵpropertyInterpolate("value", i0.ɵɵpipeBind1(1, 1, "label.me"));
} }
function CollaboratorComponent_ng_template_3_p_tag_13_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "p-tag", 37);
    i0.ɵɵpipe(1, "translate");
} if (rf & 2) {
    i0.ɵɵpropertyInterpolate("value", i0.ɵɵpipeBind1(1, 1, "label.group"));
} }
function CollaboratorComponent_ng_template_3_ng_select_15_Template(rf, ctx) { if (rf & 1) {
    const _r30 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "ng-select", 38);
    i0.ɵɵlistener("ngModelChange", function CollaboratorComponent_ng_template_3_ng_select_15_Template_ng_select_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r30); const collaborator_r10 = i0.ɵɵnextContext().$implicit; return collaborator_r10.projectRoleId = $event; });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const collaborator_r10 = i0.ɵɵnextContext().$implicit;
    const ctx_r19 = i0.ɵɵnextContext();
    i0.ɵɵproperty("items", ctx_r19.ownerRoles)("disabled", true)("clearable", false)("searchable", false)("closeOnSelect", true)("ngModel", collaborator_r10.projectRoleId);
} }
function CollaboratorComponent_ng_template_3_ng_select_16_Template(rf, ctx) { if (rf & 1) {
    const _r34 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "ng-select", 39);
    i0.ɵɵlistener("change", function CollaboratorComponent_ng_template_3_ng_select_16_Template_ng_select_change_0_listener() { i0.ɵɵrestoreView(_r34); const collaborator_r10 = i0.ɵɵnextContext().$implicit; const ctx_r32 = i0.ɵɵnextContext(); return ctx_r32.onChangeRoleCollaborator(collaborator_r10); })("ngModelChange", function CollaboratorComponent_ng_template_3_ng_select_16_Template_ng_select_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r34); const collaborator_r10 = i0.ɵɵnextContext().$implicit; return collaborator_r10.projectRoleId = $event; });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const collaborator_r10 = i0.ɵɵnextContext().$implicit;
    const ctx_r20 = i0.ɵɵnextContext();
    i0.ɵɵproperty("items", collaborator_r10.roleId === ctx_r20.systemRole.Guest || (collaborator_r10 == null ? null : collaborator_r10.projectRoleId) !== ctx_r20.projectRole.Editor && (ctx_r20.currentCollaborator == null ? null : ctx_r20.currentCollaborator.projectRoleId) === ctx_r20.projectRole.Editor ? ctx_r20.editorNotInRoles : ctx_r20.roles)("disabled", (ctx_r20.currentCollaborator == null ? null : ctx_r20.currentCollaborator.projectRoleId) !== ctx_r20.projectRole.Owner && (ctx_r20.currentCollaborator == null ? null : ctx_r20.currentCollaborator.projectRoleId) !== ctx_r20.projectRole.Editor || (ctx_r20.currentCollaborator == null ? null : ctx_r20.currentCollaborator.projectRoleId) === ctx_r20.projectRole.Editor && (collaborator_r10.projectRoleId === ctx_r20.projectRole.Owner || collaborator_r10.projectRoleId === ctx_r20.projectRole.Editor))("clearable", false)("searchable", false)("closeOnSelect", true)("ngModel", collaborator_r10.projectRoleId);
} }
function CollaboratorComponent_ng_template_3_i_18_Template(rf, ctx) { if (rf & 1) {
    const _r40 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "i", 40);
    i0.ɵɵlistener("click", function CollaboratorComponent_ng_template_3_i_18_Template_i_click_0_listener() { i0.ɵɵrestoreView(_r40); const collaborator_r10 = i0.ɵɵnextContext().$implicit; const ctx_r38 = i0.ɵɵnextContext(); return ctx_r38.onKickedCollaborator(collaborator_r10); });
    i0.ɵɵelementEnd();
} }
function CollaboratorComponent_ng_template_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "td", 15);
    i0.ɵɵtemplate(2, CollaboratorComponent_ng_template_3_i_2_Template, 1, 0, "i", 16);
    i0.ɵɵtemplate(3, CollaboratorComponent_ng_template_3_i_3_Template, 1, 0, "i", 17);
    i0.ɵɵtemplate(4, CollaboratorComponent_ng_template_3_i_4_Template, 1, 0, "i", 18);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "td");
    i0.ɵɵelementStart(6, "div", 0);
    i0.ɵɵelementStart(7, "div", 19);
    i0.ɵɵtemplate(8, CollaboratorComponent_ng_template_3_a_8_Template, 3, 2, "a", 20);
    i0.ɵɵtemplate(9, CollaboratorComponent_ng_template_3_a_9_Template, 3, 2, "a", 21);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(10, "div", 22);
    i0.ɵɵtemplate(11, CollaboratorComponent_ng_template_3_span_11_Template, 2, 2, "span", 20);
    i0.ɵɵtemplate(12, CollaboratorComponent_ng_template_3_p_tag_12_Template, 2, 3, "p-tag", 23);
    i0.ɵɵtemplate(13, CollaboratorComponent_ng_template_3_p_tag_13_Template, 2, 3, "p-tag", 24);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(14, "td", 25);
    i0.ɵɵtemplate(15, CollaboratorComponent_ng_template_3_ng_select_15_Template, 1, 6, "ng-select", 26);
    i0.ɵɵtemplate(16, CollaboratorComponent_ng_template_3_ng_select_16_Template, 1, 6, "ng-select", 27);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(17, "td", 28);
    i0.ɵɵtemplate(18, CollaboratorComponent_ng_template_3_i_18_Template, 1, 0, "i", 29);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const collaborator_r10 = ctx.$implicit;
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", collaborator_r10.userId === ctx_r0.authUser.userId);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", collaborator_r10.userId !== ctx_r0.authUser.userId && !collaborator_r10.groupId);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", collaborator_r10.userId !== ctx_r0.authUser.userId && collaborator_r10.groupId);
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("ngIf", !collaborator_r10.groupId);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", collaborator_r10.groupId);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r0.authUser.userId !== collaborator_r10.userId);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r0.authUser.userId === collaborator_r10.userId);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", collaborator_r10.groupId);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", collaborator_r10.projectRoleId === 1);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", collaborator_r10.projectRoleId !== 1);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", collaborator_r10.projectRoleId !== ctx_r0.projectRole.Owner && ((ctx_r0.currentCollaborator == null ? null : ctx_r0.currentCollaborator.projectRoleId) === ctx_r0.projectRole.Owner || (ctx_r0.currentCollaborator == null ? null : ctx_r0.currentCollaborator.projectRoleId) === ctx_r0.projectRole.Editor && collaborator_r10.projectRoleId !== ctx_r0.projectRole.Owner && collaborator_r10.projectRoleId !== ctx_r0.projectRole.Editor) && !collaborator_r10.isDeleted);
} }
function CollaboratorComponent_div_5_ng_template_17_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "b");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵtext(3);
} if (rf & 2) {
    const search_r46 = ctx.searchTerm;
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 2, "label.create_new"));
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(": ", search_r46, " ");
} }
function CollaboratorComponent_div_5_ng_template_18_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(2, "div");
    i0.ɵɵtext(3);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r47 = ctx.item;
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(item_r47.name);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(item_r47.value);
} }
function CollaboratorComponent_div_5_ng_template_19_div_0_Template(rf, ctx) { if (rf & 1) {
    const _r52 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 67);
    i0.ɵɵelementStart(1, "span", 68);
    i0.ɵɵlistener("click", function CollaboratorComponent_div_5_ng_template_19_div_0_Template_span_click_1_listener() { i0.ɵɵrestoreView(_r52); const item_r50 = ctx.$implicit; const ctx_r51 = i0.ɵɵnextContext(3); return ctx_r51.handleRemoveEmail(item_r50); });
    i0.ɵɵtext(2, "\u00D7");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "span", 69);
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r50 = ctx.$implicit;
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("title", item_r50.value);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(item_r50.value);
} }
function CollaboratorComponent_div_5_ng_template_19_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, CollaboratorComponent_div_5_ng_template_19_div_0_Template, 5, 2, "div", 66);
} if (rf & 2) {
    const items_r48 = ctx.items;
    i0.ɵɵproperty("ngForOf", items_r48);
} }
function CollaboratorComponent_div_5_ng_template_46_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "b");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵtext(3);
} if (rf & 2) {
    const search_r53 = ctx.searchTerm;
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 2, "label.create_new"));
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(": ", search_r53, " ");
} }
function CollaboratorComponent_div_5_ng_template_47_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r54 = ctx.item;
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(item_r54.name);
} }
const _c2 = function () { return { maxLength: "64" }; };
function CollaboratorComponent_div_5_Template(rf, ctx) { if (rf & 1) {
    const _r56 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 41);
    i0.ɵɵelementStart(1, "h3", 42);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "uppercase");
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "div", 43);
    i0.ɵɵelementStart(6, "div", 44);
    i0.ɵɵelement(7, "p-dropdown", 45);
    i0.ɵɵelementStart(8, "label", 46);
    i0.ɵɵtext(9);
    i0.ɵɵpipe(10, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(11, "div", 43);
    i0.ɵɵelementStart(12, "div", 47);
    i0.ɵɵelementStart(13, "span", 44);
    i0.ɵɵelementStart(14, "ng-select", 48);
    i0.ɵɵlistener("close", function CollaboratorComponent_div_5_Template_ng_select_close_14_listener() { i0.ɵɵrestoreView(_r56); const ctx_r55 = i0.ɵɵnextContext(); return ctx_r55.isOpenDropdownUser = false; })("keypress", function CollaboratorComponent_div_5_Template_ng_select_keypress_14_listener($event) { i0.ɵɵrestoreView(_r56); const ctx_r57 = i0.ɵɵnextContext(); return ctx_r57.util.blockSpecialChars($event); })("open", function CollaboratorComponent_div_5_Template_ng_select_open_14_listener() { i0.ɵɵrestoreView(_r56); const ctx_r58 = i0.ɵɵnextContext(); return ctx_r58.isOpenDropdownUser = true; })("search", function CollaboratorComponent_div_5_Template_ng_select_search_14_listener($event) { i0.ɵɵrestoreView(_r56); const ctx_r59 = i0.ɵɵnextContext(); return ctx_r59.searchMember($event); })("ngModelChange", function CollaboratorComponent_div_5_Template_ng_select_ngModelChange_14_listener($event) { i0.ɵɵrestoreView(_r56); const ctx_r60 = i0.ɵɵnextContext(); return ctx_r60.emailSelected = $event; })("remove", function CollaboratorComponent_div_5_Template_ng_select_remove_14_listener($event) { i0.ɵɵrestoreView(_r56); const ctx_r61 = i0.ɵɵnextContext(); return ctx_r61.handleRemoveEmail($event.value); })("clear", function CollaboratorComponent_div_5_Template_ng_select_clear_14_listener($event) { i0.ɵɵrestoreView(_r56); const ctx_r62 = i0.ɵɵnextContext(); return ctx_r62.handleRemoveEmail($event, true); });
    i0.ɵɵpipe(15, "translate");
    i0.ɵɵpipe(16, "translate");
    i0.ɵɵtemplate(17, CollaboratorComponent_div_5_ng_template_17_Template, 4, 4, "ng-template", 49);
    i0.ɵɵtemplate(18, CollaboratorComponent_div_5_ng_template_18_Template, 4, 2, "ng-template", 50);
    i0.ɵɵtemplate(19, CollaboratorComponent_div_5_ng_template_19_Template, 1, 1, "ng-template", 51);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(20, "label", 52);
    i0.ɵɵtext(21);
    i0.ɵɵpipe(22, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(23, "button", 53);
    i0.ɵɵlistener("click", function CollaboratorComponent_div_5_Template_button_click_23_listener() { i0.ɵɵrestoreView(_r56); const ctx_r63 = i0.ɵɵnextContext(); return ctx_r63.showUserModal(); });
    i0.ɵɵpipe(24, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(25, "div", 54);
    i0.ɵɵelement(26, "p-checkbox", 55);
    i0.ɵɵelementStart(27, "label", 56);
    i0.ɵɵtext(28);
    i0.ɵɵpipe(29, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(30, "h3", 57);
    i0.ɵɵtext(31);
    i0.ɵɵpipe(32, "uppercase");
    i0.ɵɵpipe(33, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(34, "div", 43);
    i0.ɵɵelementStart(35, "div", 44);
    i0.ɵɵelement(36, "p-dropdown", 58);
    i0.ɵɵelementStart(37, "label", 59);
    i0.ɵɵtext(38);
    i0.ɵɵpipe(39, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(40, "div", 43);
    i0.ɵɵelementStart(41, "div", 47);
    i0.ɵɵelementStart(42, "span", 44);
    i0.ɵɵelementStart(43, "ng-select", 60);
    i0.ɵɵlistener("close", function CollaboratorComponent_div_5_Template_ng_select_close_43_listener() { i0.ɵɵrestoreView(_r56); const ctx_r64 = i0.ɵɵnextContext(); return ctx_r64.isOpenDropdownGroup = false; })("keypress", function CollaboratorComponent_div_5_Template_ng_select_keypress_43_listener($event) { i0.ɵɵrestoreView(_r56); const ctx_r65 = i0.ɵɵnextContext(); return ctx_r65.util.blockSpecialChars($event); })("open", function CollaboratorComponent_div_5_Template_ng_select_open_43_listener() { i0.ɵɵrestoreView(_r56); const ctx_r66 = i0.ɵɵnextContext(); return ctx_r66.isOpenDropdownGroup = true; })("search", function CollaboratorComponent_div_5_Template_ng_select_search_43_listener($event) { i0.ɵɵrestoreView(_r56); const ctx_r67 = i0.ɵɵnextContext(); return ctx_r67.searchGroup($event); })("remove", function CollaboratorComponent_div_5_Template_ng_select_remove_43_listener($event) { i0.ɵɵrestoreView(_r56); const ctx_r68 = i0.ɵɵnextContext(); return ctx_r68.handleRemoveGroup($event); })("clear", function CollaboratorComponent_div_5_Template_ng_select_clear_43_listener($event) { i0.ɵɵrestoreView(_r56); const ctx_r69 = i0.ɵɵnextContext(); return ctx_r69.handleRemoveGroup($event, true); });
    i0.ɵɵpipe(44, "translate");
    i0.ɵɵpipe(45, "translate");
    i0.ɵɵtemplate(46, CollaboratorComponent_div_5_ng_template_46_Template, 4, 4, "ng-template", 49);
    i0.ɵɵtemplate(47, CollaboratorComponent_div_5_ng_template_47_Template, 2, 1, "ng-template", 50);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(48, "label", 52);
    i0.ɵɵtext(49);
    i0.ɵɵpipe(50, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(51, "button", 53);
    i0.ɵɵlistener("click", function CollaboratorComponent_div_5_Template_button_click_51_listener() { i0.ɵɵrestoreView(_r56); const ctx_r70 = i0.ɵɵnextContext(); return ctx_r70.showGroupModal(); });
    i0.ɵɵpipe(52, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(53, "div", 54);
    i0.ɵɵelement(54, "p-checkbox", 61);
    i0.ɵɵelementStart(55, "label", 62);
    i0.ɵɵtext(56);
    i0.ɵɵpipe(57, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(58, "div", 63);
    i0.ɵɵelementStart(59, "span", 44);
    i0.ɵɵelement(60, "textarea", 64);
    i0.ɵɵelementStart(61, "label", 65);
    i0.ɵɵtext(62);
    i0.ɵɵpipe(63, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 29, i0.ɵɵpipeBind1(4, 31, "label.add_collaborator")), " ");
    i0.ɵɵadvance(5);
    i0.ɵɵproperty("options", ctx_r1.currentCollaborator.projectRoleId === ctx_r1.projectRole.Editor ? ctx_r1.editorNotInRoles : ctx_r1.roles);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(10, 33, "label.select_role"), " ");
    i0.ɵɵadvance(5);
    i0.ɵɵpropertyInterpolate("clearAllText", i0.ɵɵpipeBind1(15, 35, "label.clear_all"));
    i0.ɵɵpropertyInterpolate("notFoundText", i0.ɵɵpipeBind1(16, 37, "label.no_item_found"));
    i0.ɵɵproperty("hideSelected", true)("inputAttrs", i0.ɵɵpureFunction0(63, _c2))("items", ctx_r1.members)("addTag", !ctx_r1.isInvalidEmail ? ctx_r1.addNewUser : false)("searchFn", ctx_r1.handleSearchEmail)("ngModel", ctx_r1.emailSelected);
    i0.ɵɵadvance(6);
    i0.ɵɵproperty("ngClass", ctx_r1.collaborateFrm.controls.collaboratedUsers.value.length > 0 || ctx_r1.isOpenDropdownUser ? "custom-float-label-tab" : "");
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(22, 39, "label.member"), " ");
    i0.ɵɵadvance(2);
    i0.ɵɵpropertyInterpolate("title", i0.ɵɵpipeBind1(24, 41, "label.select_member_group"));
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(29, 43, "label.collaborator_user_override"));
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(32, 45, i0.ɵɵpipeBind1(33, 47, "label.add_group")), " ");
    i0.ɵɵadvance(5);
    i0.ɵɵproperty("options", ctx_r1.currentCollaborator.projectRoleId === ctx_r1.projectRole.Editor ? ctx_r1.editorNotInRoles : ctx_r1.roles);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(39, 49, "label.select_role"), " ");
    i0.ɵɵadvance(5);
    i0.ɵɵpropertyInterpolate("clearAllText", i0.ɵɵpipeBind1(44, 51, "label.clear_all"));
    i0.ɵɵpropertyInterpolate("notFoundText", i0.ɵɵpipeBind1(45, 53, "label.no_item_found"));
    i0.ɵɵproperty("hideSelected", true)("inputAttrs", i0.ɵɵpureFunction0(64, _c2))("items", ctx_r1.groups)("addTag", !ctx_r1.isInvalidGroup ? ctx_r1.addNewGroup : false);
    i0.ɵɵadvance(5);
    i0.ɵɵproperty("ngClass", ctx_r1.collaborateFrm.controls.collaboratedGroups.value.length > 0 || ctx_r1.isOpenDropdownGroup ? "custom-float-label-tab" : "");
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(50, 55, "label.group"), " ");
    i0.ɵɵadvance(2);
    i0.ɵɵpropertyInterpolate("title", i0.ɵɵpipeBind1(52, 57, "label.select_member_group"));
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(57, 59, "label.collaborator_group_override"));
    i0.ɵɵadvance(6);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(63, 61, "label.message"));
} }
function CollaboratorComponent_div_6_ng_template_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 73);
    i0.ɵɵelementStart(1, "span", 74);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, "label.change_role_message"));
} }
function CollaboratorComponent_div_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 70);
    i0.ɵɵelementStart(1, "div", 43);
    i0.ɵɵelementStart(2, "p-messages", 71);
    i0.ɵɵtemplate(3, CollaboratorComponent_div_6_ng_template_3_Template, 4, 3, "ng-template", 72);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} }
function CollaboratorComponent_button_12_Template(rf, ctx) { if (rf & 1) {
    const _r73 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 75);
    i0.ɵɵlistener("click", function CollaboratorComponent_button_12_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r73); const ctx_r72 = i0.ɵɵnextContext(); return ctx_r72.doSaveCollaborator(); });
    i0.ɵɵpipe(1, "uppercase");
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext();
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(1, 2, i0.ɵɵpipeBind1(2, 4, "button.save")));
    i0.ɵɵproperty("disabled", ctx_r3.collaborateFrm.controls.collaboratedUsers.value.length === 0 && ctx_r3.collaborateFrm.controls.collaboratedGroups.value.length === 0 && !ctx_r3.isChange);
} }
function CollaboratorComponent_app_group_15_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "app-group", null, 76);
} }
function CollaboratorComponent_ng_template_16_button_4_Template(rf, ctx) { if (rf & 1) {
    const _r77 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 79);
    i0.ɵɵlistener("click", function CollaboratorComponent_ng_template_16_button_4_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r77); const ctx_r76 = i0.ɵɵnextContext(2); return ctx_r76.handleAddCollaboratorGroupUser(); });
    i0.ɵɵpipe(1, "uppercase");
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r75 = i0.ɵɵnextContext(2);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(1, 2, i0.ɵɵpipeBind1(2, 4, "label.add")));
    i0.ɵɵproperty("disabled", !ctx_r75.groupMemberComponent || !ctx_r75.groupMemberComponent.selectedGroupsInModal || ctx_r75.groupMemberComponent.selectedGroupsInModal.length === 0);
} }
function CollaboratorComponent_ng_template_16_Template(rf, ctx) { if (rf & 1) {
    const _r79 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 7);
    i0.ɵɵelementStart(1, "button", 77);
    i0.ɵɵlistener("click", function CollaboratorComponent_ng_template_16_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r79); const ctx_r78 = i0.ɵɵnextContext(); return ctx_r78.closeUserModal(); });
    i0.ɵɵpipe(2, "titlecase");
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(4, CollaboratorComponent_ng_template_16_button_4_Template, 3, 6, "button", 78);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r5 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(2, 2, i0.ɵɵpipeBind1(3, 4, "label.cancel")));
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("ngIf", ctx_r5.displayUserModal);
} }
function CollaboratorComponent_app_group_19_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "app-group", null, 80);
} }
function CollaboratorComponent_ng_template_20_button_4_Template(rf, ctx) { if (rf & 1) {
    const _r83 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 79);
    i0.ɵɵlistener("click", function CollaboratorComponent_ng_template_20_button_4_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r83); const ctx_r82 = i0.ɵɵnextContext(2); return ctx_r82.handleAddCollaboratorGroup(); });
    i0.ɵɵpipe(1, "uppercase");
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r81 = i0.ɵɵnextContext(2);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(1, 2, i0.ɵɵpipeBind1(2, 4, "label.add")));
    i0.ɵɵproperty("disabled", !ctx_r81.groupComponent || !ctx_r81.groupComponent.selectedGroupsInModal || ctx_r81.groupComponent.selectedGroupsInModal.length === 0);
} }
function CollaboratorComponent_ng_template_20_Template(rf, ctx) { if (rf & 1) {
    const _r85 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 7);
    i0.ɵɵelementStart(1, "button", 77);
    i0.ɵɵlistener("click", function CollaboratorComponent_ng_template_20_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r85); const ctx_r84 = i0.ɵɵnextContext(); return ctx_r84.closeGroupModal(); });
    i0.ɵɵpipe(2, "titlecase");
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(4, CollaboratorComponent_ng_template_20_button_4_Template, 3, 6, "button", 78);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r7 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(2, 2, i0.ɵɵpipeBind1(3, 4, "label.cancel")));
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("ngIf", ctx_r7.displayGroupModal);
} }
function CollaboratorComponent_app_member_group_23_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "app-member-group", 81);
} if (rf & 2) {
    const ctx_r8 = i0.ɵɵnextContext();
    i0.ɵɵpropertyInterpolate("groupId", ctx_r8.memberGroupId);
    i0.ɵɵpropertyInterpolate("folderId", ctx_r8.folderId);
    i0.ɵɵpropertyInterpolate("projectId", ctx_r8.projectId);
} }
function CollaboratorComponent_ng_template_24_Template(rf, ctx) { if (rf & 1) {
    const _r87 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 7);
    i0.ɵɵelementStart(1, "button", 77);
    i0.ɵɵlistener("click", function CollaboratorComponent_ng_template_24_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r87); const ctx_r86 = i0.ɵɵnextContext(); ctx_r86.displayMemberGroupCoModal = false; return ctx_r86.memberGroupId = ""; });
    i0.ɵɵpipe(2, "titlecase");
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind1(3, 3, "label.cancel")));
} }
const _c3 = function () { return { width: "50vw" }; };
const _c4 = function () { return { "960px": "75vw" }; };
class CollaboratorComponent {
    constructor(fb, translate, messageService, authService, collaboratorService, userService, userGroupService) {
        this.fb = fb;
        this.translate = translate;
        this.messageService = messageService;
        this.authService = authService;
        this.collaboratorService = collaboratorService;
        this.userService = userService;
        this.userGroupService = userGroupService;
        this.cancel = new core_1.EventEmitter();
        this.util = app_util_1.default;
        this.constant = app_constants_1.default;
        this.projectRole = app_constants_1.ProjectRole;
        this.systemRole = app_constants_1.SystemRole;
        this.collaborateFrm = new forms_1.FormGroup({});
        this.ownerRoles = [];
        this.roles = [];
        this.editorNotInRoles = [];
        this.collaborators = [];
        this.memberGroupProjects = [];
        this.members = [];
        this.groups = [];
        this.isOpenDropdownUser = false;
        this.isOpenDropdownGroup = false;
        this.isChange = false;
        this.displayUserModal = false;
        this.displayGroupModal = false;
        this.displayMemberGroupCoModal = false;
        this.memberGroupId = '';
        this.originalCollaborators = [];
        this.emailSelected = [];
    }
    ngOnInit() {
        this.authUser = this.authService.getAuthUser;
        this.util
            .translateList(this.translate, [
            'label.project_role.owner',
            'label.project_role.editor',
            'label.project_role.viewer',
            'label.project_role.previewer',
            'label.project_role.viewer_uploader',
            'label.project_role.previewer_uploader',
            'label.project_role.uploader',
        ], {})
            .subscribe((res) => {
            this.ownerRoles = [{ code: 1, name: res['label.project_role.owner'] }];
            this.roles = [
                { code: 2, name: res['label.project_role.editor'] },
                { code: 3, name: res['label.project_role.viewer'] },
                { code: 4, name: res['label.project_role.previewer'] },
                { code: 5, name: res['label.project_role.viewer_uploader'] },
                { code: 6, name: res['label.project_role.previewer_uploader'] },
                { code: 7, name: res['label.project_role.uploader'] },
            ];
            this.editorNotInRoles = [
                { code: 3, name: res['label.project_role.viewer'] },
                { code: 4, name: res['label.project_role.previewer'] },
                { code: 5, name: res['label.project_role.viewer_uploader'] },
                { code: 6, name: res['label.project_role.previewer_uploader'] },
                { code: 7, name: res['label.project_role.uploader'] },
            ];
        });
        this.collaborateFrm = this.fb.group({
            collaboratedUsers: [[]],
            userRole: [this.roles.find((r) => r.code === app_constants_1.ProjectRole.Viewer)],
            isUserOverride: [true],
            collaboratedGroups: [[]],
            groupRole: [this.roles.find((r) => r.code === app_constants_1.ProjectRole.Viewer)],
            isGroupOverride: [true],
            message: [
                '',
                [forms_1.Validators.pattern(this.constant.PATTERNS.SCRIPT_PATTERN)],
            ],
        });
        this.getCollaboratorList();
    }
    getCollaboratorList() {
        if (this.pendingRequest) {
            this.pendingRequest.unsubscribe();
        }
        const params = {
            projectId: this.projectId,
        };
        this.pendingRequest = this.collaboratorService
            .getCollaborators(this.folderId, this.util.toSnakeCaseKey(params))
            .subscribe((res) => {
            if (res.status === 200) {
                this.currentCollaborator = _.find(res.data.memberProjects, {
                    userId: this.authUser.userId,
                });
                if (!this.currentCollaborator) {
                    this.currentCollaborator = _.find(res.data.memberGroupProjects, {
                        userId: this.authUser.userId,
                    });
                }
                this.memberGroupProjects = res.data.memberGroupProjects;
                this.collaborators = res.data.memberProjects;
                this.collaborators = this.collaborators.concat(res.data.groupProjects);
                this.collaborators = _.orderBy(this.collaborators, ['projectRoleId'], ['asc']);
                this.originalCollaborators = lodash_1.cloneDeep(this.collaborators);
                console.log('collaborators', this.collaborators);
                this.getAllUsers();
                this.getAllGroups();
            }
        });
    }
    getNameOrder(firstName, lastName) {
        return this.authUser.lang === 'ja'
            ? lastName + ' ' + firstName
            : firstName + ' ' + lastName;
    }
    isGuestUser(collaborator) {
        return collaborator.roleId === app_constants_1.SystemRole.Guest;
    }
    getAllUsers() {
        const customUsers = [];
        this.userService
            .getAllUsersInTeam(this.authUser.teamId)
            .subscribe((res) => {
            if (res.status === 200) {
                res.data.forEach((data) => {
                    if (this.authUser.mailAddress !== data.mailAddress &&
                        this.collaborators.findIndex((item) => item.userId === data.userId) === -1 &&
                        this.memberGroupProjects.findIndex((item) => item.userId === data.userId) === -1) {
                        customUsers.push({
                            id: data.userId,
                            value: data.mailAddress,
                            name: this.authService.getUserLanguage === 'ja'
                                ? data.lastName + data.firstName
                                : (data.firstName + ' ' + data.lastName).trim(),
                        });
                    }
                });
                this.members = customUsers;
            }
        });
    }
    getAllGroups() {
        const customGroups = [];
        this.userGroupService.getAllGroup().subscribe((res) => {
            if (res.status === 200) {
                res.data.forEach((data) => {
                    customGroups.push({
                        id: data.groupUserId,
                        value: data.name,
                        name: data.name,
                    });
                });
                this.groups = customGroups;
            }
        });
    }
    showGroupModal() {
        this.displayGroupModal = true;
    }
    closeGroupModal() {
        this.displayGroupModal = false;
    }
    handleAddCollaboratorGroup() {
        const customGroups = [];
        let currentGroupList = this.collaborateFrm.value.collaboratedGroups;
        this.groupComponent.selectedGroupsInModal.forEach((res) => {
            const index = currentGroupList.findIndex((item) => item.id === res.groupUserId);
            if (index === -1) {
                customGroups.push({
                    id: res.groupUserId,
                    value: res.name,
                    name: res.name,
                });
            }
        });
        currentGroupList = currentGroupList.concat(customGroups);
        this.collaborateFrm.controls.collaboratedGroups.setValue(currentGroupList);
        this.closeGroupModal();
    }
    showUserModal() {
        this.displayUserModal = true;
    }
    closeUserModal() {
        this.displayUserModal = false;
    }
    handleAddCollaboratorGroupUser() {
        const params = {
            groupUserIds: this.groupMemberComponent.selectedGroupsInModal
                .map((group) => group.groupUserId)
                .join(','),
            teamId: this.authUser.teamId,
        };
        this.userGroupService
            .getUserInGroup(this.util.toSnakeCaseKey(params))
            .subscribe((resp) => {
            if (resp.status === 200) {
                const customUsers = [];
                let currentUserList = this.collaborateFrm.value.collaboratedUsers;
                resp.data.forEach((res) => {
                    if (customUsers.findIndex((item) => item.id === res.userId) === -1 &&
                        currentUserList.findIndex((item) => item.id === res.userId) ===
                            -1 &&
                        this.collaborators.findIndex((item) => item.userId === res.userId) === -1 &&
                        this.memberGroupProjects.findIndex((item) => item.userId === res.userId) === -1) {
                        customUsers.push({
                            id: res.userId,
                            value: res.mailAddress,
                            name: this.authService.getUserLanguage === 'ja'
                                ? res.lastName + ' ' + res.firstName
                                : (res.firstName + ' ' + res.lastName).trim(),
                        });
                    }
                });
                currentUserList = currentUserList.concat(customUsers);
                this.emailSelected = currentUserList;
                currentUserList.forEach((memCustom) => {
                    this.members = this.members.filter((data) => data.id !== memCustom.id);
                });
                this.closeUserModal();
            }
        });
    }
    doCancel() {
        if (this.isChange) {
            this.isChange = false;
            this.collaborators = lodash_1.cloneDeep(this.originalCollaborators);
        }
        else {
            // trigger on close modal
            this.cancel.emit(true);
        }
    }
    doSaveCollaborator() {
        if (this.isSubmitting) {
            return;
        }
        // change when user is kicked or changed role
        if (this.isChange) {
            const changedRoleCollaborators = this.collaborators.filter((collaborator) => {
                return !collaborator.groupId && collaborator.isChanged;
            });
            const changedRoleGroupCollaborators = this.collaborators.filter((collaborator) => {
                return collaborator.groupId && collaborator.isChanged;
            });
            const kickedCollaborators = this.collaborators.filter((collaborator) => {
                return !collaborator.groupId && collaborator.isDeleted;
            });
            const kickedGroupCollaborators = this.collaborators.filter((collaborator) => {
                return collaborator.groupId && collaborator.isDeleted;
            });
            this.isSubmitting = true;
            let promises = [];
            // change role collaborators
            if (changedRoleCollaborators.length > 0) {
                promises = [
                    ...promises,
                    this.changeRoleCollaborator(changedRoleCollaborators),
                ];
            }
            // change role group collaborators
            if (changedRoleGroupCollaborators.length > 0) {
                changedRoleGroupCollaborators.forEach((groupCollaborator) => {
                    promises = [
                        ...promises,
                        this.changeRoleCollaboratorGroup(groupCollaborator),
                    ];
                });
            }
            // kick collaborators out of project
            if (kickedCollaborators.length > 0) {
                kickedCollaborators.forEach((collaborator) => {
                    promises = [...promises, this.kickCollaborator(collaborator)];
                });
            }
            // kick group collaborators out of project
            if (kickedGroupCollaborators.length > 0) {
                kickedGroupCollaborators.forEach((groupCollaborator) => {
                    promises = [
                        ...promises,
                        this.kickGroupCollaborator(groupCollaborator),
                    ];
                });
            }
            Promise.all(promises).then((responses) => {
                let success = true;
                responses.forEach((res) => {
                    if (res && res.status !== 200) {
                        success = false;
                    }
                });
                if (success) {
                    this.messageService.add({
                        severity: 'success',
                        detail: this.util.translate(this.translate, 'default_toast.save_success'),
                    });
                    this.getCollaboratorList();
                    this.isChange = false;
                }
                else {
                    this.messageService.add({
                        severity: 'error',
                        detail: this.util.translate(this.translate, 'error.' + 403),
                    });
                    window.location.reload();
                }
                this.isSubmitting = false;
            });
        }
        else {
            this.isSubmitting = true;
            // invite users and group to collaborator
            const users = this.collaborateFrm.value.collaboratedUsers;
            const groups = this.collaborateFrm.value.collaboratedGroups;
            let promises = [];
            if (users.length > 0) {
                promises = [...promises, this.inviteCollaborator()];
            }
            if (groups.length > 0) {
                promises = [...promises, this.inviteGroupCollaborator()];
            }
            Promise.all(promises).then((responses) => {
                let success = true;
                let noErrUser = true;
                responses.forEach((res) => {
                    var _a, _b;
                    if ((res === null || res === void 0 ? void 0 : res.data) && ((_a = res.data) === null || _a === void 0 ? void 0 : _a.errorUsers)) {
                        res.data.errorUsers.forEach((item) => {
                            var _a;
                            if (!item.email) {
                                item.email = (_a = this.members[this.members.findIndex((m) => m.id === item.userId)]) === null || _a === void 0 ? void 0 : _a.value;
                            }
                            this.messageService.add({
                                severity: 'error',
                                detail: this.util.translateWithParams(this.translate, 'invite_error_users.' + item.typeError, { email: item.email }),
                            });
                        });
                        if (((_b = res.data) === null || _b === void 0 ? void 0 : _b.errorUsers.length) > 0) {
                            noErrUser = false;
                        }
                    }
                    if (!res || res.status !== 200) {
                        success = false;
                    }
                });
                if (success) {
                    if (noErrUser) {
                        this.messageService.add({
                            severity: 'success',
                            detail: this.util.translate(this.translate, 'default_toast.add_success'),
                        });
                    }
                    this.emailSelected = [];
                    this.collaborateFrm.controls.collaboratedUsers.setValue([]);
                    this.collaborateFrm.controls.collaboratedGroups.setValue([]);
                    this.collaborateFrm.controls.userRole.setValue(this.roles.find((r) => r.code === app_constants_1.ProjectRole.Viewer));
                    this.collaborateFrm.controls.groupRole.setValue(this.roles.find((r) => r.code === app_constants_1.ProjectRole.Viewer));
                    this.getCollaboratorList();
                }
                else {
                    this.messageService.add({
                        severity: 'error',
                        detail: this.util.translate(this.translate, 'error.' + 403),
                    });
                    window.location.reload();
                }
                this.isSubmitting = false;
            });
        }
    }
    inviteCollaborator() {
        const selectedCollaborator = this.collaborateFrm.value.collaboratedUsers;
        const userRole = this.collaborateFrm.value.userRole.code;
        const isOverride = this.collaborateFrm.value.isUserOverride;
        const message = this.collaborateFrm.value.message;
        const collaborators = [];
        selectedCollaborator.forEach((item) => {
            const user = {
                userId: item.id,
                roleId: userRole,
            };
            collaborators.push(user);
        });
        const params = {
            teamId: this.authUser.teamId,
            projectId: this.projectId,
            users: collaborators,
            overwrite: isOverride,
            message,
        };
        return new Promise((resolve) => {
            this.collaboratorService
                .inviteCollaborator(this.folderId, this.util.toSnakeCaseKey(params))
                .subscribe((res) => {
                resolve(res);
            });
        });
    }
    inviteGroupCollaborator() {
        const selectedCollaboratorGroups = this.collaborateFrm.value.collaboratedGroups
            .map((group) => group.name)
            .join(',');
        const groupRole = this.collaborateFrm.value.groupRole.code;
        const isOverride = this.collaborateFrm.value.isGroupOverride;
        const message = this.collaborateFrm.value.message.code;
        const params = {
            teamId: this.authUser.teamId,
            projectId: this.projectId,
            groupNames: selectedCollaboratorGroups,
            roleId: groupRole,
            overwrite: isOverride,
            message,
        };
        return new Promise((resolve) => {
            this.collaboratorService
                .inviteGroupCollaborator(this.folderId, this.util.toSnakeCaseKey(params))
                .subscribe((res) => {
                resolve(res);
            });
        });
    }
    onChangeRoleCollaborator(collaborator) {
        this.isChange = true;
        collaborator.isChanged = true;
    }
    onKickedCollaborator(collaborator) {
        this.isChange = true;
        collaborator.isDeleted = true;
    }
    changeRoleCollaborator(selectedCollaborators) {
        const collaborators = [];
        selectedCollaborators.forEach((item) => {
            const user = {
                userId: item.userId,
                roleId: item.projectRoleId,
            };
            collaborators.push(user);
        });
        const params = {
            projectId: this.projectId,
            users: collaborators,
        };
        return new Promise((resolve) => {
            this.collaboratorService
                .changeRoleCollaborator(this.folderId, this.util.toSnakeCaseKey(params))
                .subscribe((res) => {
                resolve(res);
            });
        });
    }
    changeRoleCollaboratorGroup(collaboratorGroup) {
        const params = {
            projectId: this.projectId,
            folderGroupRoleId: collaboratorGroup.projectRoleId,
            groupId: collaboratorGroup.groupId,
        };
        return new Promise((resolve) => {
            this.collaboratorService
                .changeRoleGroupCollaborator(this.folderId, this.util.toSnakeCaseKey(params))
                .subscribe((res) => {
                resolve(res);
            });
        });
    }
    kickCollaborator(collaborator) {
        const params = {
            projectId: this.projectId,
            userId: collaborator.userId,
        };
        return new Promise((resolve) => {
            this.collaboratorService
                .kickCollaborator(this.folderId, this.util.toSnakeCaseKey(params))
                .subscribe((res) => {
                resolve(res);
            });
        });
    }
    kickGroupCollaborator(groupCollaborator) {
        const params = {
            projectId: this.projectId,
        };
        return new Promise((resolve) => {
            this.collaboratorService
                .kickGroupCollaborator(this.folderId, groupCollaborator.groupId, this.util.toSnakeCaseKey(params))
                .subscribe((res) => {
                resolve(res);
            });
        });
    }
    searchMember(event) {
        this.isInvalidEmail =
            !this.util.isValidEmail(event.term) ||
                this.collaborators.findIndex((item) => item.emailAddress === event.term) !== -1 ||
                this.memberGroupProjects.findIndex((item) => item.emailAddress === event.term) !== -1 ||
                (this.authUser.roleId !== this.systemRole.TeamAdmin &&
                    this.authUser.roleId !== this.systemRole.Manager) ||
                this.members.findIndex((item) => item.value === event.term) !== -1 ||
                this.collaborateFrm.controls.collaboratedUsers.value.findIndex((item) => item.value === event.term) !== -1;
    }
    searchGroup(event) {
        this.isInvalidGroup =
            this.collaborators.findIndex((item) => item.name === event.term) !== -1 ||
                (this.authUser.roleId !== this.systemRole.TeamAdmin &&
                    this.authUser.roleId !== this.systemRole.Manager);
    }
    addNewUser(name) {
        const emailPattern = app_constants_1.default.PATTERNS.EMAIL;
        if (name.length > 64) {
            return;
        }
        else if (!emailPattern.test(name)) {
            return;
        }
        else {
            return { id: name, value: name, name, tag: true };
        }
    }
    addNewGroup(name) {
        if (name.length > 64) {
            return;
        }
        else {
            return { value: name, name, tag: true };
        }
    }
    handleRemoveEmail(event, isRemoveAll) {
        if (isRemoveAll) {
            this.getAllUsers();
            return;
        }
        if (event.tag) {
            this.members = this.members.filter((data) => data.id !== event.id);
        }
        else {
            if (this.members.findIndex((m) => m.id === event.id) === -1) {
                this.members = [...this.members, event];
            }
        }
        this.emailSelected = this.emailSelected.filter((data) => data.id !== event.id);
    }
    handleRemoveGroup(event, isRemoveAll) {
        if (isRemoveAll) {
            this.groups = this.groups.filter((data) => !data.tag);
            return;
        }
        if (event.value.tag) {
            this.groups = this.groups.filter((data) => data.id !== event.value.id);
        }
    }
    handleSearchEmail(term, item) {
        // console.log("term",term,item);
        return item.value.toLowerCase().indexOf(term.toLowerCase()) !== -1;
    }
}
exports.CollaboratorComponent = CollaboratorComponent;
CollaboratorComponent.ɵfac = function CollaboratorComponent_Factory(t) { return new (t || CollaboratorComponent)(i0.ɵɵdirectiveInject(i1.FormBuilder), i0.ɵɵdirectiveInject(i2.TranslateService), i0.ɵɵdirectiveInject(i3.MessageService), i0.ɵɵdirectiveInject(i4.AuthService), i0.ɵɵdirectiveInject(i5.CollaboratorService), i0.ɵɵdirectiveInject(i6.UserService), i0.ɵɵdirectiveInject(i7.UserGroupService)); };
CollaboratorComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CollaboratorComponent, selectors: [["app-collaborator"]], viewQuery: function CollaboratorComponent_Query(rf, ctx) { if (rf & 1) {
        i0.ɵɵviewQuery(_c0, 1);
        i0.ɵɵviewQuery(_c1, 1);
    } if (rf & 2) {
        let _t;
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.groupMemberComponent = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.groupComponent = _t.first);
    } }, inputs: { folderId: "folderId", projectId: "projectId" }, outputs: { cancel: "cancel" }, decls: 25, vars: 43, consts: [[1, "p-grid"], [1, "p-col-12"], ["scrollHeight", "240px", 3, "scrollable", "value"], ["pTemplate", "body"], [3, "formGroup"], ["class", "p-fluid p-formgrid p-grid", 4, "ngIf"], ["class", "p-fluid p-grid", 4, "ngIf"], [1, "p-col-12", "p-text-right", "p-pr-0"], ["icon", "fas fa-times", "pButton", "", "pRipple", "", "type", "button", 1, "p-button-raised", "p-button-warning", "p-mr-2", 3, "label", "click"], ["class", "p-button-raised p-mr-0", "icon", "fas fa-check", "type", "button", "pRipple", "", "pButton", "", 3, "disabled", "label", "click", 4, "ngIf"], ["styleClass", "custom-dialog", "position", "right", 3, "header", "visible", "modal", "draggable", "resizable", "baseZIndex", "visibleChange", "onHide"], [4, "ngIf"], ["pTemplate", "footer"], ["position", "right", 3, "header", "visible", "modal", "baseZIndex", "breakpoints", "draggable", "resizable", "visibleChange", "onHide"], [3, "groupId", "folderId", "projectId", 4, "ngIf"], [2, "width", "30px"], ["class", "fas fa-user text-warning", 4, "ngIf"], ["class", "fas fa-user text-primary", 4, "ngIf"], ["class", "fas fa-users text-primary", 4, "ngIf"], [1, "p-col-12", "p-text-truncate", "username", "p-pt-0", "p-pb-0", "p-mt-3"], [3, "title", 4, "ngIf"], ["class", "cs-pointer", 3, "title", 4, "ngIf"], [1, "p-col-12", "p-text-truncate", "p-pt-0", "p-pb-0"], ["severity", "info", 3, "value", 4, "ngIf"], ["severity", "success", 3, "value", 4, "ngIf"], [2, "width", "280px"], ["bindLabel", "name", "bindValue", "code", 3, "items", "disabled", "clearable", "searchable", "closeOnSelect", "ngModel", "ngModelChange", 4, "ngIf"], ["bindLabel", "name", "bindValue", "code", 3, "items", "disabled", "clearable", "searchable", "closeOnSelect", "ngModel", "change", "ngModelChange", 4, "ngIf"], [1, "p-text-center", 2, "width", "30px"], ["class", "fas fa-times cs-pointer", 3, "click", 4, "ngIf"], [1, "fas", "fa-user", "text-warning"], [1, "fas", "fa-user", "text-primary"], [1, "fas", "fa-users", "text-primary"], [3, "title"], [1, "cs-pointer", 3, "title"], [3, "click"], ["severity", "info", 3, "value"], ["severity", "success", 3, "value"], ["bindLabel", "name", "bindValue", "code", 3, "items", "disabled", "clearable", "searchable", "closeOnSelect", "ngModel", "ngModelChange"], ["bindLabel", "name", "bindValue", "code", 3, "items", "disabled", "clearable", "searchable", "closeOnSelect", "ngModel", "change", "ngModelChange"], [1, "fas", "fa-times", "cs-pointer", 3, "click"], [1, "p-fluid", "p-formgrid", "p-grid"], [1, "p-ml-2"], [1, "p-col-12", "p-field"], [1, "p-float-label"], ["id", "userRole", "formControlName", "userRole", "optionLabel", "name", 3, "options"], ["for", "userRole"], [1, "p-inputgroup"], ["formControlName", "collaboratedUsers", "multiple", "true", 1, "select-user", "in-group", 3, "hideSelected", "inputAttrs", "items", "addTag", "searchFn", "ngModel", "clearAllText", "notFoundText", "close", "keypress", "open", "search", "ngModelChange", "remove", "clear"], ["ng-tag-tmp", ""], ["ng-option-tmp", ""], ["ng-multi-label-tmp", ""], [3, "ngClass"], ["icon", "far fa-address-book", "pButton", "", "pRipple", "", "type", "button", 1, "p-button-primary", 3, "title", "click"], [1, "p-col-12", "p-field-checkbox"], ["binary", "true", "inputId", "override", "formControlName", "isUserOverride", "name", "override"], ["for", "override", 1, "cs-pointer"], [1, "p-ml-2", "p-mt-0"], ["id", "groupRole", "formControlName", "groupRole", "optionLabel", "name", 3, "options"], ["for", "groupRole"], ["bindLabel", "value", "formControlName", "collaboratedGroups", "multiple", "true", 1, "select-user", "in-group", 3, "hideSelected", "inputAttrs", "items", "addTag", "clearAllText", "notFoundText", "close", "keypress", "open", "search", "remove", "clear"], ["binary", "true", "inputId", "groupOverride", "formControlName", "isGroupOverride"], ["for", "groupOverride", 1, "cs-pointer"], [1, "p-field", "p-col-12"], ["rows", "3", "formControlName", "message", "maxlength", "255", "pInputTextarea", "", "id", "share_mess"], ["for", "share_mess"], ["class", "ng-value", 4, "ngFor", "ngForOf"], [1, "ng-value"], ["aria-hidden", "true", 1, "ng-value-icon", "left", 3, "click"], [1, "ng-value-label", 3, "title"], [1, "p-fluid", "p-grid"], ["severity", "warn"], ["pTemplate", ""], [1, "fas", "fa-exclamation-triangle", "p-pr-1"], [1, "custom-message"], ["icon", "fas fa-check", "type", "button", "pRipple", "", "pButton", "", 1, "p-button-raised", "p-mr-0", 3, "disabled", "label", "click"], ["groupMemberComponent", ""], ["pButton", "", "pRipple", "", "type", "button", "icon", "fas fa-times", 1, "p-button-raised", "p-button-warning", "p-mr-2", 3, "label", "click"], ["type", "submit", "pRipple", "", "pButton", "", "class", "p-button-raised", "icon", "fas fa-plus", 3, "label", "disabled", "click", 4, "ngIf"], ["type", "submit", "pRipple", "", "pButton", "", "icon", "fas fa-plus", 1, "p-button-raised", 3, "label", "disabled", "click"], ["groupComponent", ""], [3, "groupId", "folderId", "projectId"]], template: function CollaboratorComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵelementStart(2, "p-table", 2);
        i0.ɵɵtemplate(3, CollaboratorComponent_ng_template_3_Template, 19, 11, "ng-template", 3);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(4, "form", 4);
        i0.ɵɵtemplate(5, CollaboratorComponent_div_5_Template, 64, 65, "div", 5);
        i0.ɵɵtemplate(6, CollaboratorComponent_div_6_Template, 4, 0, "div", 6);
        i0.ɵɵelementStart(7, "div", 0);
        i0.ɵɵelementStart(8, "div", 7);
        i0.ɵɵelementStart(9, "button", 8);
        i0.ɵɵlistener("click", function CollaboratorComponent_Template_button_click_9_listener() { return ctx.doCancel(); });
        i0.ɵɵpipe(10, "titlecase");
        i0.ɵɵpipe(11, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(12, CollaboratorComponent_button_12_Template, 3, 6, "button", 9);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(13, "p-dialog", 10);
        i0.ɵɵlistener("visibleChange", function CollaboratorComponent_Template_p_dialog_visibleChange_13_listener($event) { return ctx.displayUserModal = $event; })("onHide", function CollaboratorComponent_Template_p_dialog_onHide_13_listener() { return ctx.closeUserModal(); });
        i0.ɵɵpipe(14, "translate");
        i0.ɵɵtemplate(15, CollaboratorComponent_app_group_15_Template, 2, 0, "app-group", 11);
        i0.ɵɵtemplate(16, CollaboratorComponent_ng_template_16_Template, 5, 6, "ng-template", 12);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(17, "p-dialog", 13);
        i0.ɵɵlistener("visibleChange", function CollaboratorComponent_Template_p_dialog_visibleChange_17_listener($event) { return ctx.displayGroupModal = $event; })("onHide", function CollaboratorComponent_Template_p_dialog_onHide_17_listener() { return ctx.closeGroupModal(); });
        i0.ɵɵpipe(18, "translate");
        i0.ɵɵtemplate(19, CollaboratorComponent_app_group_19_Template, 2, 0, "app-group", 11);
        i0.ɵɵtemplate(20, CollaboratorComponent_ng_template_20_Template, 5, 6, "ng-template", 12);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(21, "p-dialog", 10);
        i0.ɵɵlistener("visibleChange", function CollaboratorComponent_Template_p_dialog_visibleChange_21_listener($event) { return ctx.displayMemberGroupCoModal = $event; })("onHide", function CollaboratorComponent_Template_p_dialog_onHide_21_listener() { ctx.displayMemberGroupCoModal = false; return ctx.memberGroupId = ""; });
        i0.ɵɵpipe(22, "translate");
        i0.ɵɵtemplate(23, CollaboratorComponent_app_member_group_23_Template, 1, 3, "app-member-group", 14);
        i0.ɵɵtemplate(24, CollaboratorComponent_ng_template_24_Template, 4, 5, "ng-template", 12);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("scrollable", ctx.collaborators && ctx.collaborators.length > 3)("value", ctx.collaborators);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("formGroup", ctx.collaborateFrm);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", !ctx.isChange && ((ctx.currentCollaborator == null ? null : ctx.currentCollaborator.projectRoleId) === ctx.projectRole.Owner || (ctx.currentCollaborator == null ? null : ctx.currentCollaborator.projectRoleId) === ctx.projectRole.Editor));
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.isChange);
        i0.ɵɵadvance(3);
        i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(10, 31, i0.ɵɵpipeBind1(11, 33, "button.cancel")));
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("ngIf", (ctx.currentCollaborator == null ? null : ctx.currentCollaborator.projectRoleId) === ctx.projectRole.Owner || (ctx.currentCollaborator == null ? null : ctx.currentCollaborator.projectRoleId) === ctx.projectRole.Editor);
        i0.ɵɵadvance(1);
        i0.ɵɵpropertyInterpolate("header", i0.ɵɵpipeBind1(14, 35, "label.select_member_group"));
        i0.ɵɵproperty("visible", ctx.displayUserModal)("modal", true)("draggable", false)("resizable", false)("baseZIndex", 10000);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.displayUserModal);
        i0.ɵɵadvance(2);
        i0.ɵɵstyleMap(i0.ɵɵpureFunction0(41, _c3));
        i0.ɵɵpropertyInterpolate("header", i0.ɵɵpipeBind1(18, 37, "label.select_member_group"));
        i0.ɵɵproperty("visible", ctx.displayGroupModal)("modal", true)("baseZIndex", 10000)("breakpoints", i0.ɵɵpureFunction0(42, _c4))("draggable", false)("resizable", false);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.displayGroupModal);
        i0.ɵɵadvance(2);
        i0.ɵɵpropertyInterpolate("header", i0.ɵɵpipeBind1(22, 39, "label.group_collaborator_list"));
        i0.ɵɵproperty("visible", ctx.displayMemberGroupCoModal)("modal", true)("draggable", false)("resizable", false)("baseZIndex", 10000);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.displayMemberGroupCoModal);
    } }, directives: [i8.Table, i3.PrimeTemplate, i1.ɵangular_packages_forms_forms_y, i1.NgControlStatusGroup, i1.FormGroupDirective, i9.NgIf, i10.ButtonDirective, i11.Ripple, i12.Dialog, i13.Tag, i14.NgSelectComponent, i1.NgControlStatus, i1.NgModel, i15.Dropdown, i1.FormControlName, i14.ɵo, i14.ɵf, i14.ɵi, i9.NgClass, i16.Checkbox, i1.DefaultValueAccessor, i1.MaxLengthValidator, i17.InputTextarea, i9.NgForOf, i18.Messages, i19.GroupComponent, i20.MemberGroupComponent], pipes: [i9.TitleCasePipe, i2.TranslatePipe, i9.UpperCasePipe], styles: [".username[_ngcontent-%COMP%] {\n  padding-bottom: 2px;\n}\n\n.custom-float-label[_ngcontent-%COMP%] {\n  color: rgba(0, 0, 0, 0.6);\n  transform-origin: left 0 !important;\n  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), color 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;\n  padding: 0 0.25em !important;\n  transform: translateY(-1.28125em) scale(0.75) perspective(100px) translateZ(0.001px) !important;\n  z-index: 1001;\n  top: 22px !important;\n  background-color: white;\n  font-size: 16px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvY29sbGFib3JhdG9yL2NvbGxhYm9yYXRvci5jb21wb25lbnQuc2NzcyIsInNyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvY29sbGFib3JhdG9yL2NvbGxhYm9yYXRvci5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLG1CQUFBO0FDQ0Y7O0FERUE7RUFDRSx5QkFBQTtFQUNBLG1DQUFBO0VBQ0EsZ0tBQUE7RUFDQSw0QkFBQTtFQUNBLCtGQUFBO0VBQ0EsYUFBQTtFQUNBLG9CQUFBO0VBQ0EsdUJBQUE7RUFDQSxlQUFBO0FDQ0YiLCJmaWxlIjoic3JjL2FwcC9hdXRoZW50aWNhdGlvbi1wYWdlcy9jb2xsYWJvcmF0b3IvY29sbGFib3JhdG9yLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLnVzZXJuYW1lIHtcbiAgcGFkZGluZy1ib3R0b206IDJweDtcbn1cblxuLmN1c3RvbS1mbG9hdC1sYWJlbCB7XG4gIGNvbG9yOiByZ2JhKDAsIDAsIDAsIDAuNik7XG4gIHRyYW5zZm9ybS1vcmlnaW46IGxlZnQgMCAhaW1wb3J0YW50O1xuICB0cmFuc2l0aW9uOiB0cmFuc2Zvcm0gMC40cyBjdWJpYy1iZXppZXIoMC4yNSwgMC44LCAwLjI1LCAxKSwgY29sb3IgMC40cyBjdWJpYy1iZXppZXIoMC4yNSwgMC44LCAwLjI1LCAxKSwgd2lkdGggMC40cyBjdWJpYy1iZXppZXIoMC4yNSwgMC44LCAwLjI1LCAxKSAhaW1wb3J0YW50O1xuICBwYWRkaW5nOiAwIC4yNWVtICFpbXBvcnRhbnQ7XG4gIHRyYW5zZm9ybTogdHJhbnNsYXRlWSgtMS4yODEyNWVtKSBzY2FsZSgwLjc1KSBwZXJzcGVjdGl2ZSgxMDBweCkgdHJhbnNsYXRlWigwLjAwMXB4KSAhaW1wb3J0YW50O1xuICB6LWluZGV4OiAxMDAxO1xuICB0b3A6IDIycHggIWltcG9ydGFudDtcbiAgYmFja2dyb3VuZC1jb2xvcjogd2hpdGU7XG4gIGZvbnQtc2l6ZTogMTZweDtcbn1cbiIsIi51c2VybmFtZSB7XG4gIHBhZGRpbmctYm90dG9tOiAycHg7XG59XG5cbi5jdXN0b20tZmxvYXQtbGFiZWwge1xuICBjb2xvcjogcmdiYSgwLCAwLCAwLCAwLjYpO1xuICB0cmFuc2Zvcm0tb3JpZ2luOiBsZWZ0IDAgIWltcG9ydGFudDtcbiAgdHJhbnNpdGlvbjogdHJhbnNmb3JtIDAuNHMgY3ViaWMtYmV6aWVyKDAuMjUsIDAuOCwgMC4yNSwgMSksIGNvbG9yIDAuNHMgY3ViaWMtYmV6aWVyKDAuMjUsIDAuOCwgMC4yNSwgMSksIHdpZHRoIDAuNHMgY3ViaWMtYmV6aWVyKDAuMjUsIDAuOCwgMC4yNSwgMSkgIWltcG9ydGFudDtcbiAgcGFkZGluZzogMCAwLjI1ZW0gIWltcG9ydGFudDtcbiAgdHJhbnNmb3JtOiB0cmFuc2xhdGVZKC0xLjI4MTI1ZW0pIHNjYWxlKDAuNzUpIHBlcnNwZWN0aXZlKDEwMHB4KSB0cmFuc2xhdGVaKDAuMDAxcHgpICFpbXBvcnRhbnQ7XG4gIHotaW5kZXg6IDEwMDE7XG4gIHRvcDogMjJweCAhaW1wb3J0YW50O1xuICBiYWNrZ3JvdW5kLWNvbG9yOiB3aGl0ZTtcbiAgZm9udC1zaXplOiAxNnB4O1xufSJdfQ== */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CollaboratorComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-collaborator',
                templateUrl: './collaborator.component.html',
                styleUrls: ['./collaborator.component.scss'],
            }]
    }], function () { return [{ type: i1.FormBuilder }, { type: i2.TranslateService }, { type: i3.MessageService }, { type: i4.AuthService }, { type: i5.CollaboratorService }, { type: i6.UserService }, { type: i7.UserGroupService }]; }, { groupMemberComponent: [{
            type: core_1.ViewChild,
            args: ['groupMemberComponent']
        }], groupComponent: [{
            type: core_1.ViewChild,
            args: ['groupComponent']
        }], folderId: [{
            type: core_1.Input
        }], projectId: [{
            type: core_1.Input
        }], cancel: [{
            type: core_1.Output
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/comment/comment-detail/comment-all/comment-all.component.ts":
/*!**************************************************************************************************!*\
  !*** ./src/app/authentication-pages/comment/comment-detail/comment-all/comment-all.component.ts ***!
  \**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.CommentAllComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const app_constants_1 = tslib_1.__importStar(__webpack_require__(/*! ../../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! ../../../../services/comment.service */ "./src/app/services/comment.service.ts"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! ../../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! primeng/scrolltop */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-scrolltop.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! primeng/tag */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-tag.js"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! primeng/ripple */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-ripple.js"));
const i10 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i11 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtextarea */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtextarea.js"));
const i12 = tslib_1.__importStar(__webpack_require__(/*! angular-mentions */ "./node_modules/angular-mentions/__ivy_ngcc__/fesm2015/angular-mentions.js"));
function CommentAllComponent_div_6_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 13);
    i0.ɵɵelementStart(1, "span", 14);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelement(3, "p-tag", 15);
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r2 = i0.ɵɵnextContext().$implicit;
    const ctx_r3 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", ctx_r3.appUtil.formatDateBasedOnDiff(ctx_r3.datePipe, item_r2.createDate), " ");
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("value", i0.ɵɵpipeBind1(4, 2, "label.me"));
} }
function CommentAllComponent_div_6_div_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 16);
    i0.ɵɵelement(1, "p-tag", 17);
    i0.ɵɵelementStart(2, "span", 14);
    i0.ɵɵtext(3);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r2 = i0.ɵɵnextContext().$implicit;
    const ctx_r4 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("title", ctx_r4.appUtil.getFullName(ctx_r4.authUser.lang, item_r2))("value", ctx_r4.appUtil.getFullName(ctx_r4.authUser.lang, item_r2));
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", ctx_r4.appUtil.formatDateBasedOnDiff(ctx_r4.datePipe, item_r2.createDate), " ");
} }
function CommentAllComponent_div_6_div_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "div", 18);
} }
function CommentAllComponent_div_6_div_7_div_2_Template(rf, ctx) { if (rf & 1) {
    const _r13 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 13);
    i0.ɵɵelementStart(1, "span", 20);
    i0.ɵɵelementStart(2, "button", 21);
    i0.ɵɵlistener("click", function CommentAllComponent_div_6_div_7_div_2_Template_button_click_2_listener() { i0.ɵɵrestoreView(_r13); const item_r2 = i0.ɵɵnextContext(2).$implicit; return item_r2.isEdit = true; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "span");
    i0.ɵɵelementStart(4, "button", 22);
    i0.ɵɵlistener("click", function CommentAllComponent_div_6_div_7_div_2_Template_button_click_4_listener($event) { i0.ɵɵrestoreView(_r13); const item_r2 = i0.ɵɵnextContext(2).$implicit; const ctx_r14 = i0.ɵɵnextContext(); return ctx_r14.confirm($event, item_r2.commentId); });
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("icon", "fas fa-pen");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("icon", "fas fa-times");
} }
function CommentAllComponent_div_6_div_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelement(1, "div", 19);
    i0.ɵɵtemplate(2, CommentAllComponent_div_6_div_7_div_2_Template, 5, 2, "div", 6);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r2 = i0.ɵɵnextContext().$implicit;
    const ctx_r6 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("innerHTML", item_r2.text, i0.ɵɵsanitizeHtml);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r2.userId === ctx_r6.authUser.userId);
} }
function CommentAllComponent_div_6_div_8_small_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 31);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.special_chars"), " ");
} }
function CommentAllComponent_div_6_div_8_Template(rf, ctx) { if (rf & 1) {
    const _r21 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelementStart(1, "span", 23);
    i0.ɵɵelementStart(2, "textarea", 24, 25);
    i0.ɵɵlistener("ngModelChange", function CommentAllComponent_div_6_div_8_Template_textarea_ngModelChange_2_listener($event) { i0.ɵɵrestoreView(_r21); const item_r2 = i0.ɵɵnextContext().$implicit; return item_r2.textTemp = $event; })("itemSelected", function CommentAllComponent_div_6_div_8_Template_textarea_itemSelected_2_listener($event) { i0.ɵɵrestoreView(_r21); const ctx_r22 = i0.ɵɵnextContext(2); return ctx_r22.onSelectedMention($event); })("closed", function CommentAllComponent_div_6_div_8_Template_textarea_closed_2_listener() { i0.ɵɵrestoreView(_r21); const item_r2 = i0.ɵɵnextContext().$implicit; const ctx_r23 = i0.ɵɵnextContext(); return ctx_r23.closed(item_r2); })("keydown", function CommentAllComponent_div_6_div_8_Template_textarea_keydown_2_listener($event) { i0.ɵɵrestoreView(_r21); const item_r2 = i0.ɵɵnextContext().$implicit; const ctx_r25 = i0.ɵɵnextContext(); return ctx_r25.triggerOnPost($event, item_r2); });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "label", 26);
    i0.ɵɵtext(5);
    i0.ɵɵpipe(6, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(7, CommentAllComponent_div_6_div_8_small_7_Template, 3, 3, "small", 27);
    i0.ɵɵelementStart(8, "div", 28);
    i0.ɵɵelementStart(9, "button", 29);
    i0.ɵɵlistener("click", function CommentAllComponent_div_6_div_8_Template_button_click_9_listener() { i0.ɵɵrestoreView(_r21); const item_r2 = i0.ɵɵnextContext().$implicit; return item_r2.isEdit = false; });
    i0.ɵɵpipe(10, "titlecase");
    i0.ɵɵpipe(11, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(12, "button", 30);
    i0.ɵɵlistener("click", function CommentAllComponent_div_6_div_8_Template_button_click_12_listener() { i0.ɵɵrestoreView(_r21); const item_r2 = i0.ɵɵnextContext().$implicit; const ctx_r29 = i0.ɵɵnextContext(); return ctx_r29.onEdit(item_r2); });
    i0.ɵɵpipe(13, "titlecase");
    i0.ɵɵpipe(14, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const _r17 = i0.ɵɵreference(3);
    const item_r2 = i0.ɵɵnextContext().$implicit;
    const ctx_r7 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngModel", item_r2.textTemp)("pattern", ctx_r7.appConstant.PATTERNS.SCRIPT_PATTERN)("mentionConfig", ctx_r7.mentionConfig);
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 8, "label.comments"));
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", _r17 == null ? null : _r17.errors == null ? null : _r17.errors.pattern);
    i0.ɵɵadvance(2);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(10, 10, i0.ɵɵpipeBind1(11, 12, "label.cancel")));
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(13, 14, i0.ɵɵpipeBind1(14, 16, "label.save")));
    i0.ɵɵproperty("disabled", !item_r2.textTemp || !item_r2.textTemp.trim() || (_r17 == null ? null : _r17.errors == null ? null : _r17.errors.pattern));
} }
function CommentAllComponent_div_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 5);
    i0.ɵɵtemplate(1, CommentAllComponent_div_6_div_1_Template, 5, 4, "div", 6);
    i0.ɵɵtemplate(2, CommentAllComponent_div_6_div_2_Template, 4, 3, "div", 7);
    i0.ɵɵelementStart(3, "div", 8);
    i0.ɵɵtemplate(4, CommentAllComponent_div_6_div_4_Template, 1, 0, "div", 9);
    i0.ɵɵelementStart(5, "div", 10);
    i0.ɵɵelementStart(6, "div", 11);
    i0.ɵɵtemplate(7, CommentAllComponent_div_6_div_7_Template, 3, 2, "div", 12);
    i0.ɵɵtemplate(8, CommentAllComponent_div_6_div_8_Template, 15, 18, "div", 12);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r2 = ctx.$implicit;
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r2.userId === ctx_r0.authUser.userId);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r2.userId !== ctx_r0.authUser.userId);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", item_r2.userId === ctx_r0.authUser.userId);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngClass", item_r2.userId === ctx_r0.authUser.userId ? "p-input-icon-right" : "p-input-icon-left");
    i0.ɵɵadvance(1);
    i0.ɵɵclassProp("comment-others", item_r2.userId === ctx_r0.authUser.userId && !item_r2.isEdit);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", !item_r2.isEdit);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r2.isEdit);
} }
function CommentAllComponent_div_7_span_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵelementStart(1, "span", 33);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, "label.end_comments"));
} }
function CommentAllComponent_div_7_span_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵelementStart(1, "span", 33);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, "label.no_comments"));
} }
const _c0 = function () { return { "border-top": "1px solid" }; };
function CommentAllComponent_div_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 32);
    i0.ɵɵtemplate(1, CommentAllComponent_div_7_span_1_Template, 4, 3, "span", 12);
    i0.ɵɵtemplate(2, CommentAllComponent_div_7_span_2_Template, 4, 3, "span", 12);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵstyleMap(i0.ɵɵpureFunction0(4, _c0));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r1.isEndList && ctx_r1.comments.length !== 0);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r1.comments.length === 0);
} }
class CommentAllComponent {
    constructor(commentService, authService, datePipe, confirmationService, messageService, translateService) {
        this.commentService = commentService;
        this.authService = authService;
        this.datePipe = datePipe;
        this.confirmationService = confirmationService;
        this.messageService = messageService;
        this.translateService = translateService;
        this.appUtil = app_util_1.default;
        this.appConstant = app_constants_1.default;
        this.projectRole = app_constants_1.ProjectRole;
        this.comments = [];
        this.authUser = null;
        this.isEdit = false;
        this.mentionConfig = {};
        // params comment
        this.isEndList = false;
    }
    ngOnInit() {
        this.authUser = this.authService.getAuthUser;
    }
    getAllComments(collaborators = [], isScroll) {
        if (this.isEndList) {
            return;
        }
        if (collaborators.length > 0) {
            this.collaborators = collaborators;
        }
        const coClone = [...this.collaborators];
        coClone.splice(coClone.findIndex(co => co.userId === this.authUser.userId), 1);
        this.mentionConfig = {
            items: coClone,
            triggerChar: '@',
            labelKey: 'fullName'
        };
        const params = {
            ascSort: false,
            projectId: this.projectId,
            sortField: '',
            lastUpdate: this.comments.length > 0
                ? this.comments[this.comments.length - 1].lastUpdate : '',
            pageNumber: 1,
            pageSize: 10,
            fileId: this.file ? this.file.id : '',
        };
        if (this.pendingRequest) {
            this.pendingRequest.unsubscribe();
        }
        this.pendingRequest = this.commentService.getComments(this.appUtil.toSnakeCaseKey(params)).subscribe(res => {
            if (res.status === 200) {
                this.comments = !isScroll ? [] : this.comments;
                if (res.data.content && res.data.content.length > 0) {
                    // accept plus data if scroll = true
                    this.comments = isScroll
                        ? this.comments.concat(res.data.content) : res.data.content;
                    // Show full name in comment
                    this.comments.forEach(item => {
                        this.convertEmailToFullName(item);
                    });
                }
                this.isEndList = (res.data.totalElements <= params.pageSize);
            }
            else {
                if (res.status === 403) {
                    this.messageService.add({
                        key: 'toast',
                        severity: 'error',
                        detail: this.appUtil.translate(this.translateService, 'error.' + res.status)
                    });
                    window.location.reload();
                }
            }
        }, error => {
            this.messageService.add({
                severity: 'error',
                detail: this.appUtil.translate(this.translateService, 'error.' + error.status)
            });
        });
    }
    convertEmailToFullName(item) {
        const texts = item.text.split(/[ ,\n]/);
        if (texts.length > 0) {
            item.textTemp = item.text;
            // handle mention all
            texts.filter(x => x.toLowerCase().includes('@all')).forEach(value => {
                item.text = item.text.replace(value, `<span title='` +
                    this.appUtil.translate(this.translateService, 'label.all_member_in_project') + `'>
                <b>${this.appUtil.translate(this.translateService, 'label.annotation_all')}</b>
            </span>`);
            });
            // handle mention members
            texts.filter(x => x.includes('@[') && x.includes(']')).forEach(text => {
                const email = text.substring(text.indexOf('@[') + 2, text.indexOf(']'));
                const collaborator = this.collaborators.find(x => x.emailAddress === email);
                if (collaborator) {
                    item.text = item.text.replace(`@[${email}]`, `<b>${(this.appUtil.getFullName(this.authUser.lang, collaborator))}</b>`);
                }
            });
        }
    }
    onEdit(item) {
        if (!item.textTemp.trim()) {
            return;
        }
        const params = {
            projectId: this.projectId,
            text: item.textTemp
        };
        this.commentService.editComment(item.commentId, this.appUtil.toSnakeCaseKey(params)).subscribe(res => {
            if (res.status === 200) {
                const comment = this.comments.find(x => x.commentId === item.commentId);
                comment.text = res.data.text;
                this.convertEmailToFullName(comment);
                item.isEdit = false;
            }
        }, error => {
            this.messageService.add({
                severity: 'error',
                detail: this.appUtil.translate(this.translateService, 'error.' + error.status)
            });
        });
    }
    confirm(event, commentId) {
        this.confirmationService.confirm({
            key: 'confirm',
            target: event.target,
            message: this.appUtil.translate(this.translateService, 'label.confirm_remove_comment'),
            acceptIcon: 'fas fa-check',
            rejectIcon: 'fas fa-times',
            icon: 'fas fa-exclamation-triangle text-danger',
            defaultFocus: 'none',
            accept: () => {
                // Confirm action
                const params = {
                    projectId: this.projectId
                };
                this.commentService.deleteComment(commentId, this.appUtil.toSnakeCaseKey(params)).subscribe(res => {
                    if (res.status === 200) {
                        this.comments = this.comments.filter(x => x.commentId !== commentId);
                    }
                }, error => {
                    console.log(error);
                });
            },
            reject: () => {
                // Reject action
            }
        });
    }
    onSelectedMention(event) {
        this.selectedMention = event;
    }
    closed(item) {
        if (this.selectedMention) {
            const collaborator = this.collaborators.find(x => x.fullName === this.selectedMention.fullName);
            item.textTemp = item.textTemp.replace(`@${collaborator.fullName}`, `@[${collaborator.emailAddress}]`);
        }
    }
    onScroll(event) {
        if (event.target.scrollTop !== 0) {
            if (event.target.scrollHeight <= (Math.round(event.target.scrollTop)) + event.target.offsetHeight) {
                this.getAllComments(this.collaborators, true);
            }
        }
    }
    triggerOnPost(event, item) {
        if (event.ctrlKey && event.key === 'Enter') {
            this.onEdit(item);
        }
    }
}
exports.CommentAllComponent = CommentAllComponent;
CommentAllComponent.ɵfac = function CommentAllComponent_Factory(t) { return new (t || CommentAllComponent)(i0.ɵɵdirectiveInject(i1.CommentService), i0.ɵɵdirectiveInject(i2.AuthService), i0.ɵɵdirectiveInject(i3.DatePipe), i0.ɵɵdirectiveInject(i4.ConfirmationService), i0.ɵɵdirectiveInject(i4.MessageService), i0.ɵɵdirectiveInject(i5.TranslateService)); };
CommentAllComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CommentAllComponent, selectors: [["app-comment-all"]], inputs: { projectId: "projectId", file: "file", userFileRoleId: "userFileRoleId" }, decls: 8, vars: 8, consts: [[1, "page-title-lv2"], [3, "ngClass", "scroll"], ["target", "parent", "styleClass", "custom-scroll-top"], ["class", "p-mb-3 p-d-flex p-flex-column", 4, "ngFor", "ngForOf"], ["class", "p-mt-2 p-pt-2 p-text-center", 3, "style", 4, "ngIf"], [1, "p-mb-3", "p-d-flex", "p-flex-column"], ["class", "p-text-right", 4, "ngIf"], ["class", "p-text-left", 4, "ngIf"], [1, "p-d-flex", "p-ai-center", "p-jc-between"], ["class", "p-input-icon-left", 4, "ngIf"], [3, "ngClass"], [1, "talk-bubble"], [4, "ngIf"], [1, "p-text-right"], [1, "datetime-custom", "p-text-italic", "p-text-secondary"], ["severity", "success", 1, "p-pl-1", 3, "value"], [1, "p-text-left"], ["severity", "info", "styleClass", "p-max-width-50 p-tag-custom", 3, "title", "value"], [1, "p-input-icon-left"], [1, "p-mb-2", "overflow-wrap-break", 3, "innerHTML"], [1, "p-pr-1"], ["pButton", "", "pRipple", "", "type", "button", 1, "button-custom", "p-button-rounded", "p-button-raised", "p-button-warning", 3, "icon", "click"], ["pButton", "", "pRipple", "", "type", "button", 1, "button-custom", "p-button-rounded", "p-button-raised", "p-button-danger", 3, "icon", "click"], [1, "p-mt-1", "p-float-label", "p-fluid"], ["rows", "3", "pInputTextarea", "", "id", "itemText", "aria-describedby", "comment-invalid", "name", "itemText", 1, "cmt-style", 3, "ngModel", "pattern", "mentionConfig", "ngModelChange", "itemSelected", "closed", "keydown"], ["itemText", "ngModel"], ["for", "itemText"], ["id", "comment-invalid", "class", "p-error", 4, "ngIf"], [1, "p-mt-2"], ["pButton", "", "pRipple", "", "type", "button", "icon", "fas fa-times", 1, "p-button-sm", "p-button-raised", "p-button-warning", "p-mr-2", 3, "label", "click"], ["pButton", "", "pRipple", "", "type", "button", "icon", "fas fa-check", 1, "p-button-sm", "p-button-raised", "p-mr-2", 3, "disabled", "label", "click"], ["id", "comment-invalid", 1, "p-error"], [1, "p-mt-2", "p-pt-2", "p-text-center"], [1, "p-text-secondary", "p-text-bold", "p-text-italic"]], template: function CommentAllComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵtext(1);
        i0.ɵɵpipe(2, "titlecase");
        i0.ɵɵpipe(3, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(4, "div", 1);
        i0.ɵɵlistener("scroll", function CommentAllComponent_Template_div_scroll_4_listener($event) { return ctx.onScroll($event); });
        i0.ɵɵelement(5, "p-scrollTop", 2);
        i0.ɵɵtemplate(6, CommentAllComponent_div_6_Template, 9, 8, "div", 3);
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(7, CommentAllComponent_div_7_Template, 3, 5, "div", 4);
    } if (rf & 2) {
        i0.ɵɵadvance(1);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 4, i0.ɵɵpipeBind1(3, 6, "label.all_comments")));
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("ngClass", ctx.comments.length === 0 ? "" : "scroll-custom");
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngForOf", ctx.comments);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.isEndList || ctx.comments.length === 0);
    } }, directives: [i3.NgClass, i6.ScrollTop, i3.NgForOf, i3.NgIf, i7.Tag, i8.ButtonDirective, i9.Ripple, i10.DefaultValueAccessor, i11.InputTextarea, i10.NgControlStatus, i10.NgModel, i10.PatternValidator, i12.MentionDirective], pipes: [i3.TitleCasePipe, i5.TranslatePipe], styles: [".talk-bubble[_ngcontent-%COMP%] {\n  margin-top: 5px;\n  padding: 10px;\n  display: inline-block;\n  border-radius: 5px;\n  width: 250px;\n  height: auto;\n  background-color: #eaeaea;\n}\n\n.datetime-custom[_ngcontent-%COMP%] {\n  font-size: 0.8rem;\n}\n\n.button-custom[_ngcontent-%COMP%] {\n  width: 1.8rem;\n  height: 1.8rem !important;\n}\n\n.comment-others[_ngcontent-%COMP%] {\n  background-color: #2196F3;\n  color: white;\n}\n\n.overflow-wrap-break[_ngcontent-%COMP%] {\n  overflow-wrap: break-word;\n}\n\n.scroll-custom[_ngcontent-%COMP%] {\n  height: 29.2rem;\n  overflow: auto;\n}\n\n[_nghost-%COMP%]     .p-tag {\n  padding: 5px 10px;\n}\n\n[_nghost-%COMP%]     .custom-scroll-top {\n  position: absolute;\n  background-color: var(--blue-800);\n}\n\n[_nghost-%COMP%]     .custom-scroll-top:hover {\n  background-color: var(--blue-600);\n}\n\n[_nghost-%COMP%]     .p-max-width-50 {\n  max-width: 50%;\n}\n\n[_nghost-%COMP%]     .p-tag-custom .p-tag-value {\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n\n.cmt-style[_ngcontent-%COMP%] {\n  resize: vertical;\n  min-height: 102px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvY29tbWVudC9jb21tZW50LWRldGFpbC9jb21tZW50LWFsbC9jb21tZW50LWFsbC5jb21wb25lbnQuc2NzcyIsInNyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvY29tbWVudC9jb21tZW50LWRldGFpbC9jb21tZW50LWFsbC9jb21tZW50LWFsbC5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLGVBQUE7RUFDQSxhQUFBO0VBQ0EscUJBQUE7RUFDQSxrQkFBQTtFQUNBLFlBQUE7RUFDQSxZQUFBO0VBQ0EseUJBQUE7QUNDRjs7QURFQTtFQUNFLGlCQUFBO0FDQ0Y7O0FERUE7RUFDRSxhQUFBO0VBQ0EseUJBQUE7QUNDRjs7QURFQTtFQUNFLHlCQUFBO0VBQ0EsWUFBQTtBQ0NGOztBREVBO0VBQ0UseUJBQUE7QUNDRjs7QURFQTtFQUNFLGVBQUE7RUFDQSxjQUFBO0FDQ0Y7O0FER0U7RUFDRSxpQkFBQTtBQ0FKOztBREdFO0VBQ0Usa0JBQUE7RUFDQSxpQ0FBQTtBQ0RKOztBREdJO0VBQ0UsaUNBQUE7QUNETjs7QURLRTtFQUNFLGNBQUE7QUNISjs7QURNRTtFQUNFLGdCQUFBO0VBQ0EsdUJBQUE7RUFDQSxtQkFBQTtBQ0pKOztBRFFBO0VBQ0UsZ0JBQUE7RUFDQSxpQkFBQTtBQ0xGIiwiZmlsZSI6InNyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvY29tbWVudC9jb21tZW50LWRldGFpbC9jb21tZW50LWFsbC9jb21tZW50LWFsbC5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIi50YWxrLWJ1YmJsZSB7XG4gIG1hcmdpbi10b3A6IDVweDtcbiAgcGFkZGluZzogMTBweDtcbiAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xuICBib3JkZXItcmFkaXVzOiA1cHg7XG4gIHdpZHRoOiAyNTBweDtcbiAgaGVpZ2h0OiBhdXRvO1xuICBiYWNrZ3JvdW5kLWNvbG9yOiAjZWFlYWVhO1xufVxuXG4uZGF0ZXRpbWUtY3VzdG9tIHtcbiAgZm9udC1zaXplOiAwLjhyZW07XG59XG5cbi5idXR0b24tY3VzdG9tIHtcbiAgd2lkdGg6IDEuOHJlbTtcbiAgaGVpZ2h0OiAxLjhyZW0gIWltcG9ydGFudDtcbn1cblxuLmNvbW1lbnQtb3RoZXJzIHtcbiAgYmFja2dyb3VuZC1jb2xvcjogIzIxOTZGMztcbiAgY29sb3I6IHdoaXRlO1xufVxuXG4ub3ZlcmZsb3ctd3JhcC1icmVhayB7XG4gIG92ZXJmbG93LXdyYXA6IGJyZWFrLXdvcmQ7XG59XG5cbi5zY3JvbGwtY3VzdG9tIHtcbiAgaGVpZ2h0OiAyOS4ycmVtO1xuICBvdmVyZmxvdzogYXV0bztcbn1cblxuOmhvc3QgOjpuZy1kZWVwIHtcbiAgLnAtdGFnIHtcbiAgICBwYWRkaW5nOiA1cHggMTBweDtcbiAgfVxuXG4gIC5jdXN0b20tc2Nyb2xsLXRvcCB7XG4gICAgcG9zaXRpb246IGFic29sdXRlO1xuICAgIGJhY2tncm91bmQtY29sb3I6IHZhcigtLWJsdWUtODAwKTtcblxuICAgICY6aG92ZXIge1xuICAgICAgYmFja2dyb3VuZC1jb2xvcjogdmFyKC0tYmx1ZS02MDApO1xuICAgIH1cbiAgfVxuXG4gIC5wLW1heC13aWR0aC01MCB7XG4gICAgbWF4LXdpZHRoOiA1MCU7XG4gIH1cblxuICAucC10YWctY3VzdG9tIC5wLXRhZy12YWx1ZSB7XG4gICAgb3ZlcmZsb3c6IGhpZGRlbjtcbiAgICB0ZXh0LW92ZXJmbG93OiBlbGxpcHNpcztcbiAgICB3aGl0ZS1zcGFjZTogbm93cmFwO1xuICB9XG59XG5cbi5jbXQtc3R5bGUge1xuICByZXNpemU6IHZlcnRpY2FsO1xuICBtaW4taGVpZ2h0OiAxMDJweDtcbn1cbiIsIi50YWxrLWJ1YmJsZSB7XG4gIG1hcmdpbi10b3A6IDVweDtcbiAgcGFkZGluZzogMTBweDtcbiAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xuICBib3JkZXItcmFkaXVzOiA1cHg7XG4gIHdpZHRoOiAyNTBweDtcbiAgaGVpZ2h0OiBhdXRvO1xuICBiYWNrZ3JvdW5kLWNvbG9yOiAjZWFlYWVhO1xufVxuXG4uZGF0ZXRpbWUtY3VzdG9tIHtcbiAgZm9udC1zaXplOiAwLjhyZW07XG59XG5cbi5idXR0b24tY3VzdG9tIHtcbiAgd2lkdGg6IDEuOHJlbTtcbiAgaGVpZ2h0OiAxLjhyZW0gIWltcG9ydGFudDtcbn1cblxuLmNvbW1lbnQtb3RoZXJzIHtcbiAgYmFja2dyb3VuZC1jb2xvcjogIzIxOTZGMztcbiAgY29sb3I6IHdoaXRlO1xufVxuXG4ub3ZlcmZsb3ctd3JhcC1icmVhayB7XG4gIG92ZXJmbG93LXdyYXA6IGJyZWFrLXdvcmQ7XG59XG5cbi5zY3JvbGwtY3VzdG9tIHtcbiAgaGVpZ2h0OiAyOS4ycmVtO1xuICBvdmVyZmxvdzogYXV0bztcbn1cblxuOmhvc3QgOjpuZy1kZWVwIC5wLXRhZyB7XG4gIHBhZGRpbmc6IDVweCAxMHB4O1xufVxuOmhvc3QgOjpuZy1kZWVwIC5jdXN0b20tc2Nyb2xsLXRvcCB7XG4gIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgYmFja2dyb3VuZC1jb2xvcjogdmFyKC0tYmx1ZS04MDApO1xufVxuOmhvc3QgOjpuZy1kZWVwIC5jdXN0b20tc2Nyb2xsLXRvcDpob3ZlciB7XG4gIGJhY2tncm91bmQtY29sb3I6IHZhcigtLWJsdWUtNjAwKTtcbn1cbjpob3N0IDo6bmctZGVlcCAucC1tYXgtd2lkdGgtNTAge1xuICBtYXgtd2lkdGg6IDUwJTtcbn1cbjpob3N0IDo6bmctZGVlcCAucC10YWctY3VzdG9tIC5wLXRhZy12YWx1ZSB7XG4gIG92ZXJmbG93OiBoaWRkZW47XG4gIHRleHQtb3ZlcmZsb3c6IGVsbGlwc2lzO1xuICB3aGl0ZS1zcGFjZTogbm93cmFwO1xufVxuXG4uY210LXN0eWxlIHtcbiAgcmVzaXplOiB2ZXJ0aWNhbDtcbiAgbWluLWhlaWdodDogMTAycHg7XG59Il19 */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CommentAllComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-comment-all',
                templateUrl: './comment-all.component.html',
                styleUrls: ['./comment-all.component.scss']
            }]
    }], function () { return [{ type: i1.CommentService }, { type: i2.AuthService }, { type: i3.DatePipe }, { type: i4.ConfirmationService }, { type: i4.MessageService }, { type: i5.TranslateService }]; }, { projectId: [{
            type: core_1.Input
        }], file: [{
            type: core_1.Input
        }], userFileRoleId: [{
            type: core_1.Input
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/comment/comment-detail/comment-detail.component.ts":
/*!*****************************************************************************************!*\
  !*** ./src/app/authentication-pages/comment/comment-detail/comment-detail.component.ts ***!
  \*****************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.CommentDetailComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_constants_1 = tslib_1.__importStar(__webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
const _ = tslib_1.__importStar(__webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/comment.service */ "./src/app/services/comment.service.ts"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtextarea */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtextarea.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! angular-mentions */ "./node_modules/angular-mentions/__ivy_ngcc__/fesm2015/angular-mentions.js"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! primeng/ripple */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-ripple.js"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
const i10 = tslib_1.__importStar(__webpack_require__(/*! ./comment-all/comment-all.component */ "./src/app/authentication-pages/comment/comment-detail/comment-all/comment-all.component.ts"));
const i11 = tslib_1.__importStar(__webpack_require__(/*! ../../file/item-info/item-info.component */ "./src/app/authentication-pages/file/item-info/item-info.component.ts"));
const _c0 = ["commentAllComponent"];
function CommentDetailComponent_app_item_info_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "app-item-info", 12);
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵproperty("file", ctx_r0.file)("projectId", ctx_r0.projectId);
} }
function CommentDetailComponent_small_11_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 13);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.special_chars"), " ");
} }
class CommentDetailComponent {
    constructor(fb, commentService, authService) {
        this.fb = fb;
        this.commentService = commentService;
        this.authService = authService;
        this.appUtil = app_util_1.default;
        this.appConstant = app_constants_1.default;
        this.projectRole = app_constants_1.ProjectRole;
        this.commentFrm = new forms_1.FormGroup({});
        this.collaborators = [];
        this.comment = '';
        this.isShowTag = false;
        this.mentionConfig = {};
    }
    ngOnInit() {
        this.authUser = this.authService.getAuthUser;
        this.commentFrm = this.fb.group({
            comment: ['', [forms_1.Validators.pattern(this.appConstant.PATTERNS.SCRIPT_PATTERN)]],
        });
    }
    triggerOnPost(event) {
        if (event.ctrlKey && event.key === 'Enter') {
            this.onPost();
        }
    }
    onPost() {
        if (!this.comment.trim()) {
            return;
        }
        let mentionedUsers = [];
        // handle for mention all
        if (this.comment.match("@All") || this.comment.match("@all")) {
            this.collaborators.forEach(item => {
                const existedMem = _.find(mentionedUsers, member => member === item.emailAddress);
                if (!existedMem) {
                    mentionedUsers.push(item.emailAddress);
                }
            });
        }
        // find mention tag user @[email]
        const mentions = this.comment.match(/@\[(.*?)]/gi);
        // filter email from @[email] and filter unique email  in list
        if (mentions) {
            mentions.forEach(mention => {
                const email = mention.substr(2, mention.length - 3);
                const existedMember = _.find(mentionedUsers, member => member === email);
                if (!existedMember) {
                    mentionedUsers.push(email);
                }
            });
        }
        const params = {
            emails: mentionedUsers.join(','),
            fileId: this.file ? this.file.id : '',
            projectId: this.projectId,
            text: this.comment
        };
        if (!this.file) {
            delete params.fileId;
        }
        this.commentService.addComment(this.appUtil.toSnakeCaseKey(params)).subscribe(res => {
            if (res.status === 200) {
                this.getAllComments(this.collaborators);
                this.comment = '';
                const snd = new Audio(this.appConstant.BEEP_MESS);
                snd.play().then();
            }
        });
    }
    getAllComments(collaborators) {
        if (collaborators && collaborators.length > 0) {
            this.collaborators = collaborators;
            this.collaborators.forEach(item => {
                item.fullName = this.appUtil.getFullName(this.authUser.lang, item);
                if (item.fullName.length > 20) {
                    item.fullName = item.fullName.substring(0, 25) + '...';
                }
            });
            const coClone = [...this.collaborators];
            coClone.splice(coClone.findIndex(co => co.userId === this.authUser.userId), 1);
            this.mentionConfig = {
                items: coClone,
                triggerChar: '@',
                labelKey: 'fullName',
                allowSpace: true,
                mentionFilter: this.filter
            };
            this.commentAllComponent.isEndList = false;
            this.commentAllComponent.comments = [];
            this.commentAllComponent.getAllComments(collaborators, false);
        }
    }
    filter(searchString, items) {
        return items.filter(item => item.fullName.toLowerCase().includes(searchString.toLowerCase()));
    }
    onSelectedMention(event) {
        this.selectedMention = event;
    }
    closed() {
        if (this.selectedMention) {
            const collaborator = this.collaborators.find(x => x.emailAddress === this.selectedMention.emailAddress);
            this.comment = this.comment.replace(`@${collaborator.fullName}`, `@[${collaborator.emailAddress}]`);
        }
    }
}
exports.CommentDetailComponent = CommentDetailComponent;
CommentDetailComponent.ɵfac = function CommentDetailComponent_Factory(t) { return new (t || CommentDetailComponent)(i0.ɵɵdirectiveInject(i1.FormBuilder), i0.ɵɵdirectiveInject(i2.CommentService), i0.ɵɵdirectiveInject(i3.AuthService)); };
CommentDetailComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CommentDetailComponent, selectors: [["app-comment-detail"]], viewQuery: function CommentDetailComponent_Query(rf, ctx) { if (rf & 1) {
        i0.ɵɵviewQuery(_c0, 1);
    } if (rf & 2) {
        let _t;
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.commentAllComponent = _t.first);
    } }, inputs: { file: "file", projectId: "projectId" }, decls: 18, vars: 21, consts: [[3, "file", "projectId", 4, "ngIf"], [1, "p-d-flex", "p-flex-column"], [1, "page-title-lv2", 3, "translate"], ["autocomplete", "off", 3, "formGroup"], [1, "p-float-label", "p-fluid"], ["rows", "4", "pInputTextarea", "", "id", "comment", "formControlName", "comment", "aria-describedby", "comment-invalid", 1, "cmt-style", 3, "ngModel", "mentionConfig", "ngModelChange", "itemSelected", "closed", "keydown"], ["for", "comment"], ["id", "comment-invalid", "class", "p-error", 4, "ngIf"], [1, "p-text-right"], ["pRipple", "", "pButton", "", "icon", "far fa-paper-plane", 3, "disabled", "label", "click"], [1, "p-pt-2", 3, "file", "projectId"], ["commentAllComponent", ""], [3, "file", "projectId"], ["id", "comment-invalid", 1, "p-error"]], template: function CommentDetailComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵtemplate(0, CommentDetailComponent_app_item_info_0_Template, 1, 2, "app-item-info", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵelement(2, "div", 2);
        i0.ɵɵpipe(3, "titlecase");
        i0.ɵɵpipe(4, "translate");
        i0.ɵɵelementStart(5, "form", 3);
        i0.ɵɵelementStart(6, "span", 4);
        i0.ɵɵelementStart(7, "textarea", 5);
        i0.ɵɵlistener("ngModelChange", function CommentDetailComponent_Template_textarea_ngModelChange_7_listener($event) { return ctx.comment = $event; })("itemSelected", function CommentDetailComponent_Template_textarea_itemSelected_7_listener($event) { return ctx.onSelectedMention($event); })("closed", function CommentDetailComponent_Template_textarea_closed_7_listener() { return ctx.closed(); })("keydown", function CommentDetailComponent_Template_textarea_keydown_7_listener($event) { return ctx.triggerOnPost($event); });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(8, "label", 6);
        i0.ɵɵtext(9);
        i0.ɵɵpipe(10, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(11, CommentDetailComponent_small_11_Template, 3, 3, "small", 7);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(12, "div", 8);
        i0.ɵɵelementStart(13, "button", 9);
        i0.ɵɵlistener("click", function CommentDetailComponent_Template_button_click_13_listener() { return ctx.onPost(); });
        i0.ɵɵpipe(14, "uppercase");
        i0.ɵɵpipe(15, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelement(16, "app-comment-all", 10, 11);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵproperty("ngIf", ctx.file);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("translate", i0.ɵɵpipeBind1(3, 11, i0.ɵɵpipeBind1(4, 13, "label.comments")));
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("formGroup", ctx.commentFrm);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngModel", ctx.comment)("mentionConfig", ctx.mentionConfig);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(10, 15, "label.comments"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.commentFrm.controls.comment.errors == null ? null : ctx.commentFrm.controls.comment.errors.pattern);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("disabled", ctx.commentFrm.controls.comment.invalid)("label", i0.ɵɵpipeBind1(14, 17, i0.ɵɵpipeBind1(15, 19, "label.post")));
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("file", ctx.file)("projectId", ctx.projectId);
    } }, directives: [i4.NgIf, i5.TranslateDirective, i1.ɵangular_packages_forms_forms_y, i1.NgControlStatusGroup, i1.FormGroupDirective, i1.DefaultValueAccessor, i6.InputTextarea, i1.NgControlStatus, i1.FormControlName, i7.MentionDirective, i8.Ripple, i9.ButtonDirective, i10.CommentAllComponent, i11.ItemInfoComponent], pipes: [i4.TitleCasePipe, i5.TranslatePipe, i4.UpperCasePipe], styles: [".cmt-style[_ngcontent-%COMP%] {\n  resize: vertical;\n  min-height: 102px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvY29tbWVudC9jb21tZW50LWRldGFpbC9jb21tZW50LWRldGFpbC5jb21wb25lbnQuc2NzcyIsInNyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvY29tbWVudC9jb21tZW50LWRldGFpbC9jb21tZW50LWRldGFpbC5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLGdCQUFBO0VBQ0EsaUJBQUE7QUNDRiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2NvbW1lbnQvY29tbWVudC1kZXRhaWwvY29tbWVudC1kZXRhaWwuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyIuY210LXN0eWxlIHtcbiAgcmVzaXplOiB2ZXJ0aWNhbDtcbiAgbWluLWhlaWdodDogMTAycHg7XG59XG4iLCIuY210LXN0eWxlIHtcbiAgcmVzaXplOiB2ZXJ0aWNhbDtcbiAgbWluLWhlaWdodDogMTAycHg7XG59Il19 */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CommentDetailComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-comment-detail',
                templateUrl: './comment-detail.component.html',
                styleUrls: ['./comment-detail.component.scss']
            }]
    }], function () { return [{ type: i1.FormBuilder }, { type: i2.CommentService }, { type: i3.AuthService }]; }, { commentAllComponent: [{
            type: core_1.ViewChild,
            args: ['commentAllComponent']
        }], file: [{
            type: core_1.Input
        }], projectId: [{
            type: core_1.Input
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/comment/comment.component.ts":
/*!*******************************************************************!*\
  !*** ./src/app/authentication-pages/comment/comment.component.ts ***!
  \*******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.CommentComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_constants_1 = __webpack_require__(/*! ../../../utilities/app-constants */ "./src/utilities/app-constants.ts");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! ../../services/project.service */ "./src/app/services/project.service.ts"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! ../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! primeng/sidebar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-sidebar.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! primeng/ripple */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-ripple.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! ./comment-detail/comment-detail.component */ "./src/app/authentication-pages/comment/comment-detail/comment-detail.component.ts"));
const _c0 = ["commentDetailComponent"];
function CommentComponent_button_0_i_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 5);
} }
function CommentComponent_button_0_Template(rf, ctx) { if (rf & 1) {
    const _r4 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 3);
    i0.ɵɵlistener("click", function CommentComponent_button_0_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r3 = i0.ɵɵnextContext(); ctx_r3.isComment = false; ctx_r3.isShowComment = !ctx_r3.isShowComment; ctx_r3.file = null; return ctx_r3.getCollaboratorsAndLoadComment(); });
    i0.ɵɵtemplate(1, CommentComponent_button_0_i_1_Template, 1, 0, "i", 4);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵproperty("ngClass", ctx_r0.isShowComment ? "right-350" : "");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r0.isComment);
} }
function CommentComponent_app_comment_detail_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "app-comment-detail", 6, 7);
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵproperty("file", ctx_r1.file)("projectId", ctx_r1.projectId);
} }
const _c1 = function () { return { "width": "350px" }; };
class CommentComponent {
    constructor(projectService, activatedRoute, router, authService) {
        this.projectService = projectService;
        this.activatedRoute = activatedRoute;
        this.router = router;
        this.authService = authService;
        this.isComment = false;
        this.projectRole = app_constants_1.ProjectRole;
        this.isShowComment = false;
    }
    ngOnInit() {
        this.authUser = this.authService.getAuthUser;
    }
    getCollaboratorsAndLoadComment() {
        if (this.isShowComment) {
            this.projectService.getCollaborators(this.projectId).subscribe(res => {
                if (res.status === 200) {
                    // handle duplicate email
                    let collaborate = [];
                    res.data.forEach(co => {
                        if (this.file) {
                            if (this.file.parentFolderId === co.folderId) {
                                // check exist in array
                                if (collaborate.findIndex(newCo => newCo.userId === co.userId) === -1) {
                                    collaborate = [...collaborate, co];
                                }
                            }
                        }
                        else {
                            if (collaborate.findIndex(newCo => newCo.userId === co.userId) === -1) {
                                collaborate = [...collaborate, co];
                            }
                        }
                    });
                    this.commentDetailComponent.getAllComments(collaborate);
                    this.showRightBar(true);
                }
            });
        }
    }
    // Change position button message by right bar
    showRightBar(isShow) {
        this.isShowComment = isShow;
        if (document.getElementById('btnComment')
            && document.getElementById('btnComment').style
            && document.getElementById('btnComment').style.right) {
            setTimeout(() => {
                document.getElementById('btnComment').style.right = (isShow) ? '350px' : '0';
            }, (isShow) ? 200 : 100);
        }
    }
    handleUrl() {
        const comment = this.activatedRoute.snapshot.queryParamMap.get('comment');
        if (comment) {
            let projectId = this.activatedRoute.snapshot.paramMap.get('id');
            let folderId = this.activatedRoute.snapshot.paramMap.get('folder_id');
            this.router.navigate([`/project/${projectId}/${folderId}`]);
        }
    }
}
exports.CommentComponent = CommentComponent;
CommentComponent.ɵfac = function CommentComponent_Factory(t) { return new (t || CommentComponent)(i0.ɵɵdirectiveInject(i1.ProjectService), i0.ɵɵdirectiveInject(i2.ActivatedRoute), i0.ɵɵdirectiveInject(i2.Router), i0.ɵɵdirectiveInject(i3.AuthService)); };
CommentComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CommentComponent, selectors: [["app-comment"]], viewQuery: function CommentComponent_Query(rf, ctx) { if (rf & 1) {
        i0.ɵɵviewQuery(_c0, 1);
    } if (rf & 2) {
        let _t;
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.commentDetailComponent = _t.first);
    } }, inputs: { userFolderRole: "userFolderRole", projectId: "projectId", file: "file", isComment: "isComment" }, decls: 3, vars: 9, consts: [["id", "btnComment", "pRipple", "", "pButton", "", "class", "btn-message-custom", "icon", "far fa-comments po-relative", 3, "ngClass", "click", 4, "ngIf"], ["blockScroll", "true", "position", "right", 1, "view-style", 3, "visible", "baseZIndex", "autoZIndex", "closeOnEscape", "visibleChange", "onHide"], [3, "file", "projectId", 4, "ngIf"], ["id", "btnComment", "pRipple", "", "pButton", "", "icon", "far fa-comments po-relative", 1, "btn-message-custom", 3, "ngClass", "click"], ["class", "fas fa-plus-circle icon-top", 4, "ngIf"], [1, "fas", "fa-plus-circle", "icon-top"], [3, "file", "projectId"], ["commentDetailComponent", ""]], template: function CommentComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵtemplate(0, CommentComponent_button_0_Template, 2, 2, "button", 0);
        i0.ɵɵelementStart(1, "p-sidebar", 1);
        i0.ɵɵlistener("visibleChange", function CommentComponent_Template_p_sidebar_visibleChange_1_listener($event) { return ctx.isShowComment = $event; })("onHide", function CommentComponent_Template_p_sidebar_onHide_1_listener() { ctx.showRightBar(false); return ctx.handleUrl(); });
        i0.ɵɵtemplate(2, CommentComponent_app_comment_detail_2_Template, 2, 2, "app-comment-detail", 2);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵproperty("ngIf", ctx.userFolderRole !== ctx.projectRole.Uploader && (!ctx.isShowComment || ctx.isShowComment && !ctx.file));
        i0.ɵɵadvance(1);
        i0.ɵɵstyleMap(i0.ɵɵpureFunction0(8, _c1));
        i0.ɵɵproperty("visible", ctx.isShowComment)("baseZIndex", 1006)("autoZIndex", false)("closeOnEscape", true);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.isShowComment);
    } }, directives: [i4.NgIf, i5.Sidebar, i6.Ripple, i7.ButtonDirective, i4.NgClass, i8.CommentDetailComponent], styles: [".btn-message-custom[_ngcontent-%COMP%] {\n  position: fixed;\n  z-index: 1006;\n  width: 44px;\n  height: 44px;\n  background-color: var(--primary-color);\n  top: 50%;\n  right: 0;\n  overflow: hidden;\n  border-radius: 5px;\n  box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12);\n}\n\n.right-350[_ngcontent-%COMP%] {\n  right: 350px;\n}\n\n.view-style[_ngcontent-%COMP%] {\n  z-index: 1006 !important;\n  position: fixed;\n}\n\n.po-relative[_ngcontent-%COMP%] {\n  position: relative;\n}\n\n.icon-top[_ngcontent-%COMP%] {\n  color: red;\n  font-size: 6px;\n  position: absolute;\n  right: 8px;\n  top: 14px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvY29tbWVudC9jb21tZW50LmNvbXBvbmVudC5zY3NzIiwic3JjL2FwcC9hdXRoZW50aWNhdGlvbi1wYWdlcy9jb21tZW50L2NvbW1lbnQuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxlQUFBO0VBQ0EsYUFBQTtFQUNBLFdBQUE7RUFDQSxZQUFBO0VBQ0Esc0NBQUE7RUFDQSxRQUFBO0VBQ0EsUUFBQTtFQUNBLGdCQUFBO0VBQ0Esa0JBQUE7RUFDQSxxSEFBQTtBQ0NGOztBREVBO0VBQ0UsWUFBQTtBQ0NGOztBREVBO0VBQ0Usd0JBQUE7RUFDQSxlQUFBO0FDQ0Y7O0FERUE7RUFDRSxrQkFBQTtBQ0NGOztBREVBO0VBQ0UsVUFBQTtFQUNBLGNBQUE7RUFDQSxrQkFBQTtFQUNBLFVBQUE7RUFDQSxTQUFBO0FDQ0YiLCJmaWxlIjoic3JjL2FwcC9hdXRoZW50aWNhdGlvbi1wYWdlcy9jb21tZW50L2NvbW1lbnQuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyIuYnRuLW1lc3NhZ2UtY3VzdG9tIHtcbiAgcG9zaXRpb246IGZpeGVkO1xuICB6LWluZGV4OiAxMDA2O1xuICB3aWR0aDogNDRweDtcbiAgaGVpZ2h0OiA0NHB4O1xuICBiYWNrZ3JvdW5kLWNvbG9yOiB2YXIoLS1wcmltYXJ5LWNvbG9yKTtcbiAgdG9wOiA1MCU7XG4gIHJpZ2h0OiAwO1xuICBvdmVyZmxvdzogaGlkZGVuO1xuICBib3JkZXItcmFkaXVzOiA1cHg7XG4gIGJveC1zaGFkb3c6IDAgNXB4IDVweCAtM3B4IHJnYigwIDAgMCAvIDIwJSksIDAgOHB4IDEwcHggMXB4IHJnYigwIDAgMCAvIDE0JSksIDAgM3B4IDE0cHggMnB4IHJnYigwIDAgMCAvIDEyJSk7XG59XG5cbi5yaWdodC0zNTAge1xuICByaWdodDogMzUwcHhcbn1cblxuLnZpZXctc3R5bGUge1xuICB6LWluZGV4OiAxMDA2ICFpbXBvcnRhbnQ7XG4gIHBvc2l0aW9uOiBmaXhlZDtcbn1cblxuLnBvLXJlbGF0aXZlIHtcbiAgcG9zaXRpb246IHJlbGF0aXZlO1xufVxuXG4uaWNvbi10b3Age1xuICBjb2xvcjogcmVkO1xuICBmb250LXNpemU6IDZweDtcbiAgcG9zaXRpb246IGFic29sdXRlO1xuICByaWdodDogOHB4O1xuICB0b3A6IDE0cHg7XG59XG4iLCIuYnRuLW1lc3NhZ2UtY3VzdG9tIHtcbiAgcG9zaXRpb246IGZpeGVkO1xuICB6LWluZGV4OiAxMDA2O1xuICB3aWR0aDogNDRweDtcbiAgaGVpZ2h0OiA0NHB4O1xuICBiYWNrZ3JvdW5kLWNvbG9yOiB2YXIoLS1wcmltYXJ5LWNvbG9yKTtcbiAgdG9wOiA1MCU7XG4gIHJpZ2h0OiAwO1xuICBvdmVyZmxvdzogaGlkZGVuO1xuICBib3JkZXItcmFkaXVzOiA1cHg7XG4gIGJveC1zaGFkb3c6IDAgNXB4IDVweCAtM3B4IHJnYmEoMCwgMCwgMCwgMC4yKSwgMCA4cHggMTBweCAxcHggcmdiYSgwLCAwLCAwLCAwLjE0KSwgMCAzcHggMTRweCAycHggcmdiYSgwLCAwLCAwLCAwLjEyKTtcbn1cblxuLnJpZ2h0LTM1MCB7XG4gIHJpZ2h0OiAzNTBweDtcbn1cblxuLnZpZXctc3R5bGUge1xuICB6LWluZGV4OiAxMDA2ICFpbXBvcnRhbnQ7XG4gIHBvc2l0aW9uOiBmaXhlZDtcbn1cblxuLnBvLXJlbGF0aXZlIHtcbiAgcG9zaXRpb246IHJlbGF0aXZlO1xufVxuXG4uaWNvbi10b3Age1xuICBjb2xvcjogcmVkO1xuICBmb250LXNpemU6IDZweDtcbiAgcG9zaXRpb246IGFic29sdXRlO1xuICByaWdodDogOHB4O1xuICB0b3A6IDE0cHg7XG59Il19 */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CommentComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-comment',
                templateUrl: './comment.component.html',
                styleUrls: ['./comment.component.scss']
            }]
    }], function () { return [{ type: i1.ProjectService }, { type: i2.ActivatedRoute }, { type: i2.Router }, { type: i3.AuthService }]; }, { commentDetailComponent: [{
            type: core_1.ViewChild,
            args: ['commentDetailComponent']
        }], userFolderRole: [{
            type: core_1.Input
        }], projectId: [{
            type: core_1.Input
        }], file: [{
            type: core_1.Input
        }], isComment: [{
            type: core_1.Input
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/drm/drm-setting/drm-setting.component.ts":
/*!*******************************************************************************!*\
  !*** ./src/app/authentication-pages/drm/drm-setting/drm-setting.component.ts ***!
  \*******************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.DrmSettingComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
const drm_model_1 = __webpack_require__(/*! ../../../../models/drm.model */ "./src/models/drm.model.ts");
const _ = tslib_1.__importStar(__webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js"));
const moment_1 = tslib_1.__importDefault(__webpack_require__(/*! moment */ "./node_modules/moment/moment.js"));
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! primeng/checkbox */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-checkbox.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! primeng/calendar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-calendar.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! @ng-select/ng-select */ "./node_modules/@ng-select/ng-select/__ivy_ngcc__/fesm2015/ng-select-ng-select.js"));
function DrmSettingComponent_div_3_Template(rf, ctx) { if (rf & 1) {
    const _r6 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 5);
    i0.ɵɵelementStart(1, "p-checkbox", 10);
    i0.ɵɵlistener("ngModelChange", function DrmSettingComponent_div_3_Template_p_checkbox_ngModelChange_1_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r5 = i0.ɵɵnextContext(); return ctx_r5.drmModel.setDocExpiry = $event; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(2, "label", 11);
    i0.ɵɵtext(3);
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("disabled", ctx_r1.disabled)("ngModel", ctx_r1.drmModel.setDocExpiry);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(4, 3, "label.set_expiry_doc"), " ");
} }
function DrmSettingComponent_div_4_div_6_small_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.require"), " ");
} }
function DrmSettingComponent_div_4_div_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 16);
    i0.ɵɵtemplate(1, DrmSettingComponent_div_4_div_6_small_1_Template, 3, 3, "small", 17);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r7 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r7.f.expiryDate.errors == null ? null : ctx_r7.f.expiryDate.errors.required);
} }
function DrmSettingComponent_div_4_Template(rf, ctx) { if (rf & 1) {
    const _r10 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 12);
    i0.ɵɵelementStart(1, "span", 13);
    i0.ɵɵelementStart(2, "p-calendar", 14);
    i0.ɵɵlistener("ngModelChange", function DrmSettingComponent_div_4_Template_p_calendar_ngModelChange_2_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r9 = i0.ɵɵnextContext(); return ctx_r9.drmModel.date = $event; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "label");
    i0.ɵɵtext(4);
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(6, DrmSettingComponent_div_4_div_6_Template, 2, 1, "div", 15);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵproperty("ngClass", ctx_r2.mode === "xs-small" ? "p-sm-12" : ctx_r2.mode === "small" ? "p-sm-8" : "p-sm-4");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("monthNavigator", true)("minDate", ctx_r2.minDateValue)("disabled", ctx_r2.disabled)("styleClass", ctx_r2.mode === "xs-small" ? "xs-small-cal" : "")("ngClass", (ctx_r2.f.expiryDate.dirty || ctx_r2.f.expiryDate.touched) && ctx_r2.f.expiryDate.invalid ? "ng-dirty" : "")("ngModel", ctx_r2.drmModel.date)("placeholder", "mm/dd/yyyy");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 10, "label.document_expiry_date"), " ");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", (ctx_r2.f.expiryDate.dirty || ctx_r2.f.expiryDate.touched) && ctx_r2.f.expiryDate.invalid);
} }
function DrmSettingComponent_div_5_div_6_small_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.require"), " ");
} }
function DrmSettingComponent_div_5_div_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 16);
    i0.ɵɵtemplate(1, DrmSettingComponent_div_5_div_6_small_1_Template, 3, 3, "small", 17);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r11 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", (ctx_r11.f.expiryTime.errors == null ? null : ctx_r11.f.expiryTime.errors.required) || (ctx_r11.f.expiryTime.errors == null ? null : ctx_r11.f.expiryTime.errors.whitespace));
} }
function DrmSettingComponent_div_5_Template(rf, ctx) { if (rf & 1) {
    const _r14 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 12);
    i0.ɵɵelementStart(1, "span", 13);
    i0.ɵɵelementStart(2, "p-calendar", 18);
    i0.ɵɵlistener("ngModelChange", function DrmSettingComponent_div_5_Template_p_calendar_ngModelChange_2_listener($event) { i0.ɵɵrestoreView(_r14); const ctx_r13 = i0.ɵɵnextContext(); return ctx_r13.drmModel.expiryTime = $event; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "label");
    i0.ɵɵtext(4);
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(6, DrmSettingComponent_div_5_div_6_Template, 2, 1, "div", 15);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext();
    i0.ɵɵproperty("ngClass", ctx_r3.mode === "xs-small" ? "p-sm-12" : ctx_r3.mode === "small" ? "p-sm-4" : "p-sm-3");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("disabled", ctx_r3.disabled)("ngClass", (ctx_r3.f.expiryDate.dirty || ctx_r3.f.expiryDate.touched) && ctx_r3.f.expiryDate.invalid ? "ng-dirty" : "")("ngModel", ctx_r3.drmModel.expiryTime)("timeOnly", true)("stepMinute", 1);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 8, "label.document_expiry_time"), " ");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", (ctx_r3.f.expiryTime.dirty || ctx_r3.f.expiryTime.touched) && ctx_r3.f.expiryTime.invalid);
} }
function DrmSettingComponent_div_6_ng_template_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 22);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r16 = ctx.item;
    i0.ɵɵpropertyInterpolate("title", item_r16.name);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(item_r16.name);
} }
function DrmSettingComponent_div_6_Template(rf, ctx) { if (rf & 1) {
    const _r18 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 12);
    i0.ɵɵelementStart(1, "span", 13);
    i0.ɵɵelementStart(2, "ng-select", 19);
    i0.ɵɵlistener("ngModelChange", function DrmSettingComponent_div_6_Template_ng_select_ngModelChange_2_listener($event) { i0.ɵɵrestoreView(_r18); const ctx_r17 = i0.ɵɵnextContext(); return ctx_r17.currentTimezone = $event; });
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵtemplate(4, DrmSettingComponent_div_6_ng_template_4_Template, 2, 2, "ng-template", 20);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "label", 21);
    i0.ɵɵtext(6);
    i0.ɵɵpipe(7, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r4 = i0.ɵɵnextContext();
    i0.ɵɵproperty("ngClass", ctx_r4.mode === "xs-small" || ctx_r4.mode === "small" ? "" : " p-sm-5");
    i0.ɵɵadvance(2);
    i0.ɵɵpropertyInterpolate("placeholder", i0.ɵɵpipeBind1(3, 10, "label.lbl_timezone"));
    i0.ɵɵproperty("items", ctx_r4.timezones)("clearable", false)("readonly", ctx_r4.disabled)("searchable", false)("closeOnSelect", true)("ngClass", ctx_r4.mode === "xs-small" ? "xs-small" : "")("ngModel", ctx_r4.currentTimezone);
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(7, 12, "label.lbl_timezone"), " ");
} }
class DrmSettingComponent {
    constructor(fb, authService, datePipe, translateService) {
        this.fb = fb;
        this.authService = authService;
        this.datePipe = datePipe;
        this.translateService = translateService;
        this.isShowCB = true;
        this.mode = 'large';
        this.disabled = false;
        this.constant = app_constants_1.default;
        this.newDate = new Date();
        this.form = new forms_1.FormGroup({});
        this.appUtil = app_util_1.default;
        this.drmModel = new drm_model_1.DrmSetting();
        this.timezones = [];
        this.minDateValue = new Date();
        this.translateService.get([
            'label.timezone.GMT_-12', 'label.timezone.GMT_-11', 'label.timezone.GMT_-10', 'label.timezone.GMT_-9', 'label.timezone.GMT_-8',
            'label.timezone.GMT_-7', 'label.timezone.GMT_-6', 'label.timezone.GMT_-5', 'label.timezone.GMT_-4', 'label.timezone.GMT_-3',
            'label.timezone.GMT_-2', 'label.timezone.GMT_-1', 'label.timezone.GMT_0', 'label.timezone.GMT_+1', 'label.timezone.GMT_+2',
            'label.timezone.GMT_+3', 'label.timezone.GMT_+4', 'label.timezone.GMT_+5', 'label.timezone.GMT_+6', 'label.timezone.GMT_+7',
            'label.timezone.GMT_+8', 'label.timezone.GMT_+9', 'label.timezone.GMT_+10', 'label.timezone.GMT_+11', 'label.timezone.GMT_+12'
        ]).subscribe(res => {
            this.timezones = [
                { code: -12, name: res['label.timezone.GMT_-12'] },
                { code: -11, name: res['label.timezone.GMT_-11'] },
                { code: -10, name: res['label.timezone.GMT_-10'] },
                { code: -9, name: res['label.timezone.GMT_-9'] },
                { code: -8, name: res['label.timezone.GMT_-8'] },
                { code: -7, name: res['label.timezone.GMT_-7'] },
                { code: -6, name: res['label.timezone.GMT_-6'] },
                { code: -5, name: res['label.timezone.GMT_-5'] },
                { code: -4, name: res['label.timezone.GMT_-4'] },
                { code: -3, name: res['label.timezone.GMT_-3'] },
                { code: -2, name: res['label.timezone.GMT_-2'] },
                { code: -1, name: res['label.timezone.GMT_-1'] },
                { code: 0, name: res['label.timezone.GMT_0'] },
                { code: 1, name: res['label.timezone.GMT_+1'] },
                { code: 2, name: res['label.timezone.GMT_+2'] },
                { code: 3, name: res['label.timezone.GMT_+3'] },
                { code: 4, name: res['label.timezone.GMT_+4'] },
                { code: 5, name: res['label.timezone.GMT_+5'] },
                { code: 6, name: res['label.timezone.GMT_+6'] },
                { code: 7, name: res['label.timezone.GMT_+7'] },
                { code: 8, name: res['label.timezone.GMT_+8'] },
                { code: 9, name: res['label.timezone.GMT_+9'] },
                { code: 10, name: res['label.timezone.GMT_+10'] },
                { code: 11, name: res['label.timezone.GMT_+11'] },
                { code: 12, name: res['label.timezone.GMT_+12'] }
            ];
        });
    }
    ngOnInit() {
        this.currentTimezone = _.find(this.timezones, timezone => timezone.code === this.authService.getAuthUser.timeZone);
        this.form = this.fb.group({
            setDocExpiry: [false],
            expiryDate: [new Date(), [forms_1.Validators.required]],
            expiryTime: [new Date(), [forms_1.Validators.required]],
            timezone: [this.currentTimezone],
            printable: [false],
            editable: [false],
        });
        let date = moment_1.default(new Date()).format(this.constant.FORMAT_DATE.MOMENT_SHORT_DATE);
        if (this.drmSetting && this.drmSetting !== 'null') {
            const drm = JSON.parse(this.drmSetting);
            this.drmModel.printable = drm.printable;
            this.drmModel.editable = drm.editable;
            this.drmModel.unlimited = drm.unlimited;
            this.drmModel.setDocExpiry = drm.unlimited === 0;
            if (this.drmModel.setDocExpiry) {
                if (drm.expiryDate === null) {
                    const currentDate = new Date();
                    currentDate.setHours(23);
                    currentDate.setMinutes(45);
                    currentDate.setSeconds(59);
                    drm.expiryDate = moment_1.default(currentDate)
                        .format(this.dateType ? this.dateType : this.constant.FORMAT_DATE.MOMENT_LONG_DATE);
                }
                else {
                    const dateTemp = drm.expiryDate;
                    if (dateTemp !== this.constant.MAX_DATE) {
                        drm.expiryDate = moment_1.default(dateTemp).add(this.currentTimezone.code, 'hours')
                            .format(this.dateType ? this.dateType : this.constant.FORMAT_DATE.MOMENT_LONG_DATE);
                    }
                }
                const dateTime = moment_1.default(new Date(drm.expiryDate), app_constants_1.default.FORMAT_DATE.MOMENT_LONG_DATE);
                date = dateTime.format(this.constant.FORMAT_DATE.MOMENT_SHORT_DATE);
                this.drmModel.expiryDate = new Date(date);
                this.drmModel.expiryTime = new Date(dateTime.format(this.constant.FORMAT_DATE.MOMENT_LONG_DATE));
            }
        }
        this.drmModel.date = date;
        this.drmModel.timezone = this.authService.getAuthUser.timeZone;
        this.checkValueChange();
    }
    checkValueChange() {
        // handle validate field
        this.form.controls.setDocExpiry.valueChanges.subscribe(value => {
            this.form.controls.expiryDate.markAsUntouched();
            if (!value) {
                this.form.controls.expiryDate.clearValidators();
                this.form.controls.expiryDate.setErrors(null);
                this.form.updateValueAndValidity({ onlySelf: true });
            }
            else {
                this.form.controls.expiryDate.setValidators([
                    forms_1.Validators.required
                ]);
                this.form.controls.expiryTime.setValidators([
                    forms_1.Validators.required
                ]);
            }
        });
    }
    get f() {
        return this.form.controls;
    }
}
exports.DrmSettingComponent = DrmSettingComponent;
DrmSettingComponent.ɵfac = function DrmSettingComponent_Factory(t) { return new (t || DrmSettingComponent)(i0.ɵɵdirectiveInject(i1.FormBuilder), i0.ɵɵdirectiveInject(i2.AuthService), i0.ɵɵdirectiveInject(i3.DatePipe), i0.ɵɵdirectiveInject(i4.TranslateService)); };
DrmSettingComponent.ɵcmp = i0.ɵɵdefineComponent({ type: DrmSettingComponent, selectors: [["app-drm-setting"]], inputs: { isShowCB: "isShowCB", mode: "mode", disabled: "disabled", drmSetting: "drmSetting", dateType: "dateType" }, decls: 17, vars: 15, consts: [[3, "formGroup"], ["forma", ""], [1, "p-fluid", "p-formgrid", "p-grid"], ["class", "p-field-checkbox p-col-12", 4, "ngIf"], ["class", "p-field p-col-12", 3, "ngClass", 4, "ngIf"], [1, "p-field-checkbox", "p-col-12"], ["name", "printable", "binary", "true", "formControlName", "printable", "inputId", "printable", 3, "disabled", "ngModel", "ngModelChange"], ["for", "printable"], ["name", "editable", "binary", "true", "formControlName", "editable", "inputId", "editable", 3, "ngModel", "disabled", "ngModelChange"], ["for", "editable"], ["name", "set-doc-expiry", "binary", "true", "formControlName", "setDocExpiry", "inputId", "set-doc-expiry", 3, "disabled", "ngModel", "ngModelChange"], ["for", "set-doc-expiry"], [1, "p-field", "p-col-12", 3, "ngClass"], [1, "p-float-label"], ["dateFormat", "mm/dd/yy", "formControlName", "expiryDate", "showIcon", "true", "appendTo", "body", "inputId", "expiry-date", "icon", "far fa-calendar", 1, "placeholder-custom", 3, "monthNavigator", "minDate", "disabled", "styleClass", "ngClass", "ngModel", "placeholder", "ngModelChange"], ["class", "p-error", 4, "ngIf"], [1, "p-error"], [4, "ngIf"], ["formControlName", "expiryTime", "showIcon", "true", "inputId", "expiryTime", "icon", "far fa-clock", 3, "disabled", "ngClass", "ngModel", "timeOnly", "stepMinute", "ngModelChange"], ["bindLabel", "name", "id", "timezone", "formControlName", "timezone", 3, "items", "clearable", "readonly", "searchable", "closeOnSelect", "placeholder", "ngClass", "ngModel", "ngModelChange"], ["ng-option-tmp", ""], [1, "custom-float-label"], [1, "p-text-truncate", 3, "title"]], template: function DrmSettingComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "form", 0, 1);
        i0.ɵɵelementStart(2, "div", 2);
        i0.ɵɵtemplate(3, DrmSettingComponent_div_3_Template, 5, 5, "div", 3);
        i0.ɵɵtemplate(4, DrmSettingComponent_div_4_Template, 7, 12, "div", 4);
        i0.ɵɵtemplate(5, DrmSettingComponent_div_5_Template, 7, 10, "div", 4);
        i0.ɵɵtemplate(6, DrmSettingComponent_div_6_Template, 8, 14, "div", 4);
        i0.ɵɵelementStart(7, "div", 5);
        i0.ɵɵelementStart(8, "p-checkbox", 6);
        i0.ɵɵlistener("ngModelChange", function DrmSettingComponent_Template_p_checkbox_ngModelChange_8_listener($event) { return ctx.drmModel.printable = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(9, "label", 7);
        i0.ɵɵtext(10);
        i0.ɵɵpipe(11, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(12, "div", 5);
        i0.ɵɵelementStart(13, "p-checkbox", 8);
        i0.ɵɵlistener("ngModelChange", function DrmSettingComponent_Template_p_checkbox_ngModelChange_13_listener($event) { return ctx.drmModel.editable = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(14, "label", 9);
        i0.ɵɵtext(15);
        i0.ɵɵpipe(16, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵproperty("formGroup", ctx.form);
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("ngIf", ctx.isShowCB);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.drmModel.setDocExpiry || !ctx.isShowCB);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.drmModel.setDocExpiry || !ctx.isShowCB);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.drmModel.setDocExpiry || !ctx.isShowCB);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("disabled", ctx.disabled)("ngModel", ctx.drmModel.printable);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(11, 11, "label.printable"), " ");
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("ngModel", ctx.drmModel.editable)("disabled", ctx.disabled);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(16, 13, "label.editable"), " ");
    } }, directives: [i1.ɵangular_packages_forms_forms_y, i1.NgControlStatusGroup, i1.FormGroupDirective, i3.NgIf, i5.Checkbox, i1.NgControlStatus, i1.FormControlName, i3.NgClass, i6.Calendar, i7.NgSelectComponent, i7.ɵf], pipes: [i4.TranslatePipe], styles: ["[_nghost-%COMP%]  .p-dropdown-panel {\n  left: auto !important;\n  right: 0 !important;\n}\n[_nghost-%COMP%]  .p-calendar .p-datepicker {\n  min-width: unset !important;\n}\n[_nghost-%COMP%]  .placeholder-custom .p-calendar .p-inputtext::placeholder {\n  color: transparent;\n}\n[_nghost-%COMP%]  .placeholder-custom .p-calendar .p-inputtext:focus::placeholder {\n  color: gray;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvZHJtL2RybS1zZXR0aW5nL2RybS1zZXR0aW5nLmNvbXBvbmVudC5zY3NzIiwic3JjL2FwcC9hdXRoZW50aWNhdGlvbi1wYWdlcy9kcm0vZHJtLXNldHRpbmcvZHJtLXNldHRpbmcuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0U7RUFDRSxxQkFBQTtFQUNBLG1CQUFBO0FDQUo7QURHRTtFQUNFLDJCQUFBO0FDREo7QURJRTtFQUNFLGtCQUFBO0FDRko7QURLRTtFQUNFLFdBQUE7QUNISiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2RybS9kcm0tc2V0dGluZy9kcm0tc2V0dGluZy5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIjpob3N0KDo6bmctZGVlcCkge1xuICAucC1kcm9wZG93bi1wYW5lbCB7XG4gICAgbGVmdDogYXV0byAhaW1wb3J0YW50O1xuICAgIHJpZ2h0OiAwICFpbXBvcnRhbnQ7XG4gIH1cblxuICAucC1jYWxlbmRhciAucC1kYXRlcGlja2VyIHtcbiAgICBtaW4td2lkdGg6IHVuc2V0ICFpbXBvcnRhbnQ7XG4gIH1cblxuICAucGxhY2Vob2xkZXItY3VzdG9tIC5wLWNhbGVuZGFyIC5wLWlucHV0dGV4dDo6cGxhY2Vob2xkZXIge1xuICAgIGNvbG9yOiB0cmFuc3BhcmVudDtcbiAgfVxuXG4gIC5wbGFjZWhvbGRlci1jdXN0b20gLnAtY2FsZW5kYXIgLnAtaW5wdXR0ZXh0OmZvY3VzOjpwbGFjZWhvbGRlciB7XG4gICAgY29sb3I6IGdyYXk7XG4gIH1cbn1cbiIsIjpob3N0KDo6bmctZGVlcCkgLnAtZHJvcGRvd24tcGFuZWwge1xuICBsZWZ0OiBhdXRvICFpbXBvcnRhbnQ7XG4gIHJpZ2h0OiAwICFpbXBvcnRhbnQ7XG59XG46aG9zdCg6Om5nLWRlZXApIC5wLWNhbGVuZGFyIC5wLWRhdGVwaWNrZXIge1xuICBtaW4td2lkdGg6IHVuc2V0ICFpbXBvcnRhbnQ7XG59XG46aG9zdCg6Om5nLWRlZXApIC5wbGFjZWhvbGRlci1jdXN0b20gLnAtY2FsZW5kYXIgLnAtaW5wdXR0ZXh0OjpwbGFjZWhvbGRlciB7XG4gIGNvbG9yOiB0cmFuc3BhcmVudDtcbn1cbjpob3N0KDo6bmctZGVlcCkgLnBsYWNlaG9sZGVyLWN1c3RvbSAucC1jYWxlbmRhciAucC1pbnB1dHRleHQ6Zm9jdXM6OnBsYWNlaG9sZGVyIHtcbiAgY29sb3I6IGdyYXk7XG59Il19 */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DrmSettingComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-drm-setting',
                templateUrl: './drm-setting.component.html',
                styleUrls: ['./drm-setting.component.scss']
            }]
    }], function () { return [{ type: i1.FormBuilder }, { type: i2.AuthService }, { type: i3.DatePipe }, { type: i4.TranslateService }]; }, { isShowCB: [{
            type: core_1.Input
        }], mode: [{
            type: core_1.Input
        }], disabled: [{
            type: core_1.Input
        }], drmSetting: [{
            type: core_1.Input
        }], dateType: [{
            type: core_1.Input
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/drm/project-drm-setting/project-drm-setting.component.ts":
/*!***********************************************************************************************!*\
  !*** ./src/app/authentication-pages/drm/project-drm-setting/project-drm-setting.component.ts ***!
  \***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ProjectDrmSettingComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const drm_model_1 = __webpack_require__(/*! ../../../../models/drm.model */ "./src/models/drm.model.ts");
const moment_1 = tslib_1.__importDefault(__webpack_require__(/*! moment */ "./node_modules/moment/moment.js"));
const _ = tslib_1.__importStar(__webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! primeng/checkbox */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-checkbox.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! primeng/calendar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-calendar.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! @ng-select/ng-select */ "./node_modules/@ng-select/ng-select/__ivy_ngcc__/fesm2015/ng-select-ng-select.js"));
function ProjectDrmSettingComponent_div_20_small_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.require"), " ");
} }
function ProjectDrmSettingComponent_div_20_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 20);
    i0.ɵɵtemplate(1, ProjectDrmSettingComponent_div_20_small_1_Template, 3, 3, "small", 21);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r0.f.expiryDate.errors == null ? null : ctx_r0.f.expiryDate.errors.required);
} }
function ProjectDrmSettingComponent_div_27_small_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.require"), " ");
} }
function ProjectDrmSettingComponent_div_27_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 20);
    i0.ɵɵtemplate(1, ProjectDrmSettingComponent_div_27_small_1_Template, 3, 3, "small", 21);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", (ctx_r1.f.expiryTime.errors == null ? null : ctx_r1.f.expiryTime.errors.required) || (ctx_r1.f.expiryTime.errors == null ? null : ctx_r1.f.expiryTime.errors.whitespace));
} }
function ProjectDrmSettingComponent_ng_template_32_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 22);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r5 = ctx.item;
    i0.ɵɵpropertyInterpolate("title", item_r5.name);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(item_r5.name);
} }
class ProjectDrmSettingComponent {
    constructor(fb, authService, datePipe, translateService) {
        this.fb = fb;
        this.authService = authService;
        this.datePipe = datePipe;
        this.translateService = translateService;
        this.disabled = false;
        this.util = app_util_1.default;
        this.constant = app_constants_1.default;
        this.form = new forms_1.FormGroup({});
        this.appUtil = app_util_1.default;
        this.drmModel = new drm_model_1.DrmSetting();
        this.timezones = [];
        this.minDateValue = new Date();
        this.maxDate = new Date(this.constant.MAX_DATE);
        this.translateService.get([
            'label.timezone.GMT_-12', 'label.timezone.GMT_-11', 'label.timezone.GMT_-10', 'label.timezone.GMT_-9', 'label.timezone.GMT_-8',
            'label.timezone.GMT_-7', 'label.timezone.GMT_-6', 'label.timezone.GMT_-5', 'label.timezone.GMT_-4', 'label.timezone.GMT_-3',
            'label.timezone.GMT_-2', 'label.timezone.GMT_-1', 'label.timezone.GMT_0', 'label.timezone.GMT_+1', 'label.timezone.GMT_+2',
            'label.timezone.GMT_+3', 'label.timezone.GMT_+4', 'label.timezone.GMT_+5', 'label.timezone.GMT_+6', 'label.timezone.GMT_+7',
            'label.timezone.GMT_+8', 'label.timezone.GMT_+9', 'label.timezone.GMT_+10', 'label.timezone.GMT_+11', 'label.timezone.GMT_+12'
        ]).subscribe(res => {
            this.timezones = [
                { code: -12, name: res['label.timezone.GMT_-12'] },
                { code: -11, name: res['label.timezone.GMT_-11'] },
                { code: -10, name: res['label.timezone.GMT_-10'] },
                { code: -9, name: res['label.timezone.GMT_-9'] },
                { code: -8, name: res['label.timezone.GMT_-8'] },
                { code: -7, name: res['label.timezone.GMT_-7'] },
                { code: -6, name: res['label.timezone.GMT_-6'] },
                { code: -5, name: res['label.timezone.GMT_-5'] },
                { code: -4, name: res['label.timezone.GMT_-4'] },
                { code: -3, name: res['label.timezone.GMT_-3'] },
                { code: -2, name: res['label.timezone.GMT_-2'] },
                { code: -1, name: res['label.timezone.GMT_-1'] },
                { code: 0, name: res['label.timezone.GMT_0'] },
                { code: 1, name: res['label.timezone.GMT_+1'] },
                { code: 2, name: res['label.timezone.GMT_+2'] },
                { code: 3, name: res['label.timezone.GMT_+3'] },
                { code: 4, name: res['label.timezone.GMT_+4'] },
                { code: 5, name: res['label.timezone.GMT_+5'] },
                { code: 6, name: res['label.timezone.GMT_+6'] },
                { code: 7, name: res['label.timezone.GMT_+7'] },
                { code: 8, name: res['label.timezone.GMT_+8'] },
                { code: 9, name: res['label.timezone.GMT_+9'] },
                { code: 10, name: res['label.timezone.GMT_+10'] },
                { code: 11, name: res['label.timezone.GMT_+11'] },
                { code: 12, name: res['label.timezone.GMT_+12'] }
            ];
        });
    }
    ngOnInit() {
        this.currentTimezone = _.find(this.timezones, timezone => timezone.code === this.authService.getAuthUser.timeZone);
        this.form = this.fb.group({
            setDocExpiry: [false],
            expiryDate: [null],
            expiryTime: [new Date()],
            timezone: [this.currentTimezone],
            printable: [false],
            editable: [false],
        });
        if (this.drmSetting && this.drmSetting !== 'null') {
            const drm = JSON.parse(this.drmSetting);
            this.drmModel.printable = drm.printable;
            this.drmModel.editable = drm.editable;
            this.drmModel.unlimited = drm.unlimited;
            this.drmModel.setDocExpiry = drm.unlimited === 1;
            if (this.drmModel.setDocExpiry) {
                if (drm.expiryDate === null) {
                    const currentDate = new Date();
                    currentDate.setHours(23);
                    currentDate.setMinutes(59);
                    currentDate.setSeconds(59);
                    drm.expiryDate = moment_1.default(currentDate).format(this.constant.FORMAT_DATE.MOMENT_LONG_DATE);
                }
                else {
                    const dateTemp = drm.expiryDate;
                    drm.expiryDate = moment_1.default(dateTemp).format(this.constant.FORMAT_DATE.MOMENT_LONG_DATE);
                }
                const dateTime = moment_1.default(drm.expiryDate, app_constants_1.default.FORMAT_DATE.MOMENT_LONG_DATE);
                const date = dateTime.format(this.constant.FORMAT_DATE.MOMENT_SHORT_DATE);
                this.drmModel.date = date;
                this.drmModel.expiryDate = new Date(date);
                this.drmModel.expiryTime = new Date(dateTime.format(this.constant.FORMAT_DATE.MOMENT_LONG_DATE));
            }
        }
        this.drmModel.timezone = this.authService.getAuthUser.timeZone;
    }
    get f() {
        return this.form.controls;
    }
}
exports.ProjectDrmSettingComponent = ProjectDrmSettingComponent;
ProjectDrmSettingComponent.ɵfac = function ProjectDrmSettingComponent_Factory(t) { return new (t || ProjectDrmSettingComponent)(i0.ɵɵdirectiveInject(i1.FormBuilder), i0.ɵɵdirectiveInject(i2.AuthService), i0.ɵɵdirectiveInject(i3.DatePipe), i0.ɵɵdirectiveInject(i4.TranslateService)); };
ProjectDrmSettingComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ProjectDrmSettingComponent, selectors: [["app-project-drm-setting"]], inputs: { drmSetting: "drmSetting", disabled: "disabled" }, decls: 60, vars: 74, consts: [[3, "formGroup"], [1, "p-fluid", "p-formgrid", "p-grid"], [1, "p-col-10", "p-m-0", "page-title-lv2", "p-px-2"], [1, "p-col-2", "p-text-right", "text-primary", "cs-pointer"], [1, "far", "fa-question-circle", 3, "title"], [1, "p-field-checkbox", "p-col-12", "p-mt-3"], ["name", "set-doc-expiry", "binary", "true", "formControlName", "setDocExpiry", "inputId", "set-doc-expiry", 3, "ngModel", "disabled", "ngModelChange"], ["for", "set-doc-expiry"], [1, "p-field", "p-col-12"], [1, "p-float-label"], ["dateFormat", "mm/dd/yy", "formControlName", "expiryDate", "showIcon", "true", "appendTo", "body", "inputId", "expiry-date", "readonlyInput", "true", "icon", "far fa-calendar", 1, "placeholder-custom", 3, "monthNavigator", "minDate", "ngClass", "placeholder", "required", "disabled", "ngModel", "styleClass", "ngModelChange"], ["class", "p-error", 4, "ngIf"], ["formControlName", "expiryTime", "showIcon", "true", "inputId", "expiryTime", "icon", "far fa-clock", 3, "ngClass", "disabled", "required", "ngModel", "timeOnly", "stepMinute", "ngModelChange"], ["bindLabel", "name", "id", "timezone", "formControlName", "timezone", 3, "items", "clearable", "searchable", "readonly", "closeOnSelect", "placeholder", "ngModel", "ngModelChange"], ["ng-option-tmp", ""], [1, "custom-float-label"], ["name", "printable", "binary", "true", "formControlName", "printable", "inputId", "printable", 3, "ngModel", "disabled", "ngModelChange"], ["for", "printable"], ["name", "editable", "binary", "true", "formControlName", "editable", "inputId", "editable", 3, "ngModel", "disabled", "ngModelChange"], ["for", "editable"], [1, "p-error"], [4, "ngIf"], [1, "p-text-truncate", 3, "title"]], template: function ProjectDrmSettingComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "form", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵelementStart(2, "div", 2);
        i0.ɵɵtext(3);
        i0.ɵɵpipe(4, "titlecase");
        i0.ɵɵpipe(5, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(6, "span", 3);
        i0.ɵɵelement(7, "i", 4);
        i0.ɵɵpipe(8, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(9, "div", 5);
        i0.ɵɵelementStart(10, "p-checkbox", 6);
        i0.ɵɵlistener("ngModelChange", function ProjectDrmSettingComponent_Template_p_checkbox_ngModelChange_10_listener($event) { return ctx.drmModel.setDocExpiry = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(11, "label", 7);
        i0.ɵɵtext(12);
        i0.ɵɵpipe(13, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(14, "div", 8);
        i0.ɵɵelementStart(15, "span", 9);
        i0.ɵɵelementStart(16, "p-calendar", 10);
        i0.ɵɵlistener("ngModelChange", function ProjectDrmSettingComponent_Template_p_calendar_ngModelChange_16_listener($event) { return ctx.drmModel.date = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(17, "label");
        i0.ɵɵtext(18);
        i0.ɵɵpipe(19, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(20, ProjectDrmSettingComponent_div_20_Template, 2, 1, "div", 11);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(21, "div", 8);
        i0.ɵɵelementStart(22, "span", 9);
        i0.ɵɵelementStart(23, "p-calendar", 12);
        i0.ɵɵlistener("ngModelChange", function ProjectDrmSettingComponent_Template_p_calendar_ngModelChange_23_listener($event) { return ctx.drmModel.expiryTime = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(24, "label");
        i0.ɵɵtext(25);
        i0.ɵɵpipe(26, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(27, ProjectDrmSettingComponent_div_27_Template, 2, 1, "div", 11);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(28, "div", 8);
        i0.ɵɵelementStart(29, "span", 9);
        i0.ɵɵelementStart(30, "ng-select", 13);
        i0.ɵɵlistener("ngModelChange", function ProjectDrmSettingComponent_Template_ng_select_ngModelChange_30_listener($event) { return ctx.currentTimezone = $event; });
        i0.ɵɵpipe(31, "translate");
        i0.ɵɵtemplate(32, ProjectDrmSettingComponent_ng_template_32_Template, 2, 2, "ng-template", 14);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(33, "label", 15);
        i0.ɵɵtext(34);
        i0.ɵɵpipe(35, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(36, "div", 2);
        i0.ɵɵtext(37);
        i0.ɵɵpipe(38, "titlecase");
        i0.ɵɵpipe(39, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(40, "span", 3);
        i0.ɵɵelement(41, "i", 4);
        i0.ɵɵpipe(42, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(43, "div", 5);
        i0.ɵɵelementStart(44, "p-checkbox", 16);
        i0.ɵɵlistener("ngModelChange", function ProjectDrmSettingComponent_Template_p_checkbox_ngModelChange_44_listener($event) { return ctx.drmModel.printable = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(45, "label", 17);
        i0.ɵɵtext(46);
        i0.ɵɵpipe(47, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(48, "div", 2);
        i0.ɵɵtext(49);
        i0.ɵɵpipe(50, "titlecase");
        i0.ɵɵpipe(51, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(52, "span", 3);
        i0.ɵɵelement(53, "i", 4);
        i0.ɵɵpipe(54, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(55, "div", 5);
        i0.ɵɵelementStart(56, "p-checkbox", 18);
        i0.ɵɵlistener("ngModelChange", function ProjectDrmSettingComponent_Template_p_checkbox_ngModelChange_56_listener($event) { return ctx.drmModel.editable = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(57, "label", 19);
        i0.ɵɵtext(58);
        i0.ɵɵpipe(59, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵproperty("formGroup", ctx.form);
        i0.ɵɵadvance(3);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 42, i0.ɵɵpipeBind1(5, 44, "label.document_expiry_date")));
        i0.ɵɵadvance(4);
        i0.ɵɵpropertyInterpolate("title", i0.ɵɵpipeBind1(8, 46, "label.document_expiry_date_tooltip"));
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("ngModel", ctx.drmModel.setDocExpiry)("disabled", ctx.disabled);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(13, 48, "label.set_expiry_doc"), " ");
        i0.ɵɵadvance(4);
        i0.ɵɵproperty("monthNavigator", true)("minDate", ctx.minDateValue)("ngClass", (ctx.f.expiryDate.dirty || ctx.f.expiryDate.touched) && ctx.f.expiryDate.invalid ? "ng-dirty" : "")("placeholder", "mm/dd/yyyy")("required", ctx.f.setDocExpiry.value ? true : null)("disabled", !ctx.drmModel.setDocExpiry || ctx.disabled)("ngModel", ctx.drmModel.date)("styleClass", "xs-small");
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(19, 50, "label.document_expiry_date"), " ");
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", (ctx.f.expiryDate.dirty || ctx.f.expiryDate.touched) && ctx.f.expiryDate.invalid);
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("ngClass", (ctx.f.expiryDate.dirty || ctx.f.expiryDate.touched) && ctx.f.expiryDate.invalid ? "ng-dirty" : "")("disabled", !ctx.drmModel.setDocExpiry || ctx.disabled || !ctx.drmModel.date)("required", ctx.f.setDocExpiry.value && ctx.drmModel.setDocExpiry ? true : null)("ngModel", ctx.drmModel.expiryTime)("timeOnly", true)("stepMinute", 1);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(26, 52, "label.document_expiry_time"), " ");
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", (ctx.f.expiryTime.dirty || ctx.f.expiryTime.touched) && ctx.f.expiryTime.invalid);
        i0.ɵɵadvance(3);
        i0.ɵɵpropertyInterpolate("placeholder", i0.ɵɵpipeBind1(31, 54, "label.lbl_timezone"));
        i0.ɵɵproperty("items", ctx.timezones)("clearable", false)("searchable", false)("readonly", !ctx.drmModel.setDocExpiry || ctx.disabled || !ctx.drmModel.date)("closeOnSelect", true)("ngModel", ctx.currentTimezone);
        i0.ɵɵadvance(4);
        i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(35, 56, "label.lbl_timezone"), " ");
        i0.ɵɵadvance(3);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(38, 58, i0.ɵɵpipeBind1(39, 60, "label.printable")));
        i0.ɵɵadvance(4);
        i0.ɵɵpropertyInterpolate("title", i0.ɵɵpipeBind1(42, 62, "label.printable_tooltip"));
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("ngModel", ctx.drmModel.printable)("disabled", ctx.disabled);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(47, 64, "label.printable"), " ");
        i0.ɵɵadvance(3);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(50, 66, i0.ɵɵpipeBind1(51, 68, "label.editable")));
        i0.ɵɵadvance(4);
        i0.ɵɵpropertyInterpolate("title", i0.ɵɵpipeBind1(54, 70, "label.editable_tooltip"));
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("ngModel", ctx.drmModel.editable)("disabled", ctx.disabled);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(59, 72, "label.editable"), " ");
    } }, directives: [i1.ɵangular_packages_forms_forms_y, i1.NgControlStatusGroup, i1.FormGroupDirective, i5.Checkbox, i1.NgControlStatus, i1.FormControlName, i6.Calendar, i3.NgClass, i1.RequiredValidator, i3.NgIf, i7.NgSelectComponent, i7.ɵf], pipes: [i3.TitleCasePipe, i4.TranslatePipe], styles: [".text-primary[_ngcontent-%COMP%] {\n  color: #007bff !important;\n}\n\n[_nghost-%COMP%]  .p-dropdown-panel {\n  left: 0 !important;\n  right: auto !important;\n}\n\n[_nghost-%COMP%]  .p-calendar .p-datepicker {\n  min-width: unset !important;\n}\n\n[_nghost-%COMP%]  .placeholder-custom .p-calendar .p-inputtext::placeholder {\n  color: transparent;\n}\n\n[_nghost-%COMP%]  .placeholder-custom .p-calendar .p-inputtext:focus::placeholder {\n  color: gray;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvZHJtL3Byb2plY3QtZHJtLXNldHRpbmcvcHJvamVjdC1kcm0tc2V0dGluZy5jb21wb25lbnQuc2NzcyIsInNyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvZHJtL3Byb2plY3QtZHJtLXNldHRpbmcvcHJvamVjdC1kcm0tc2V0dGluZy5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLHlCQUFBO0FDQ0Y7O0FER0U7RUFDRSxrQkFBQTtFQUNBLHNCQUFBO0FDQUo7O0FER0U7RUFDRSwyQkFBQTtBQ0RKOztBRElFO0VBQ0Usa0JBQUE7QUNGSjs7QURLRTtFQUNFLFdBQUE7QUNISiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2RybS9wcm9qZWN0LWRybS1zZXR0aW5nL3Byb2plY3QtZHJtLXNldHRpbmcuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyIudGV4dC1wcmltYXJ5IHtcbiAgY29sb3I6ICMwMDdiZmYgIWltcG9ydGFudDtcbn1cblxuOmhvc3QoOjpuZy1kZWVwKSB7XG4gIC5wLWRyb3Bkb3duLXBhbmVsIHtcbiAgICBsZWZ0OiAwICFpbXBvcnRhbnQ7XG4gICAgcmlnaHQ6IGF1dG8gIWltcG9ydGFudDtcbiAgfVxuXG4gIC5wLWNhbGVuZGFyIC5wLWRhdGVwaWNrZXIge1xuICAgIG1pbi13aWR0aDogdW5zZXQgIWltcG9ydGFudDtcbiAgfVxuXG4gIC5wbGFjZWhvbGRlci1jdXN0b20gLnAtY2FsZW5kYXIgLnAtaW5wdXR0ZXh0OjpwbGFjZWhvbGRlciB7XG4gICAgY29sb3I6IHRyYW5zcGFyZW50O1xuICB9XG5cbiAgLnBsYWNlaG9sZGVyLWN1c3RvbSAucC1jYWxlbmRhciAucC1pbnB1dHRleHQ6Zm9jdXM6OnBsYWNlaG9sZGVyIHtcbiAgICBjb2xvcjogZ3JheTtcbiAgfVxufVxuIiwiLnRleHQtcHJpbWFyeSB7XG4gIGNvbG9yOiAjMDA3YmZmICFpbXBvcnRhbnQ7XG59XG5cbjpob3N0KDo6bmctZGVlcCkgLnAtZHJvcGRvd24tcGFuZWwge1xuICBsZWZ0OiAwICFpbXBvcnRhbnQ7XG4gIHJpZ2h0OiBhdXRvICFpbXBvcnRhbnQ7XG59XG46aG9zdCg6Om5nLWRlZXApIC5wLWNhbGVuZGFyIC5wLWRhdGVwaWNrZXIge1xuICBtaW4td2lkdGg6IHVuc2V0ICFpbXBvcnRhbnQ7XG59XG46aG9zdCg6Om5nLWRlZXApIC5wbGFjZWhvbGRlci1jdXN0b20gLnAtY2FsZW5kYXIgLnAtaW5wdXR0ZXh0OjpwbGFjZWhvbGRlciB7XG4gIGNvbG9yOiB0cmFuc3BhcmVudDtcbn1cbjpob3N0KDo6bmctZGVlcCkgLnBsYWNlaG9sZGVyLWN1c3RvbSAucC1jYWxlbmRhciAucC1pbnB1dHRleHQ6Zm9jdXM6OnBsYWNlaG9sZGVyIHtcbiAgY29sb3I6IGdyYXk7XG59Il19 */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ProjectDrmSettingComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-project-drm-setting',
                templateUrl: './project-drm-setting.component.html',
                styleUrls: ['./project-drm-setting.component.scss']
            }]
    }], function () { return [{ type: i1.FormBuilder }, { type: i2.AuthService }, { type: i3.DatePipe }, { type: i4.TranslateService }]; }, { drmSetting: [{
            type: core_1.Input
        }], disabled: [{
            type: core_1.Input
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/drm/view-online-setting/view-online-setting.component.ts":
/*!***********************************************************************************************!*\
  !*** ./src/app/authentication-pages/drm/view-online-setting/view-online-setting.component.ts ***!
  \***********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ViewOnlineSettingComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const watermark_model_1 = __webpack_require__(/*! ../../../../models/watermark.model */ "./src/models/watermark.model.ts");
const app_validator_1 = __webpack_require__(/*! ../../../../utilities/app-validator */ "./src/utilities/app-validator.ts");
const _ = tslib_1.__importStar(__webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! primeng/radiobutton */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-radiobutton.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! ../../../shared/autofocus.directive */ "./src/app/shared/autofocus.directive.ts"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! primeng/tooltip */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-tooltip.js"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! primeng/dropdown */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dropdown.js"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! primeng/colorpicker */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-colorpicker.js"));
function ViewOnlineSettingComponent_div_12_div_7_small_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.require"), " ");
} }
function ViewOnlineSettingComponent_div_12_div_7_small_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.special_chars"), " ");
} }
function ViewOnlineSettingComponent_div_12_div_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 15);
    i0.ɵɵtemplate(1, ViewOnlineSettingComponent_div_12_div_7_small_1_Template, 3, 3, "small", 16);
    i0.ɵɵtemplate(2, ViewOnlineSettingComponent_div_12_div_7_small_2_Template, 3, 3, "small", 16);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r5 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", (ctx_r5.f.wmContent.errors == null ? null : ctx_r5.f.wmContent.errors.required) || (ctx_r5.f.wmContent.errors == null ? null : ctx_r5.f.wmContent.errors.whitespace));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r5.f.wmContent.errors == null ? null : ctx_r5.f.wmContent.errors.pattern);
} }
function ViewOnlineSettingComponent_div_12_Template(rf, ctx) { if (rf & 1) {
    const _r9 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 10);
    i0.ɵɵelementStart(1, "div", 11);
    i0.ɵɵelementStart(2, "input", 12);
    i0.ɵɵlistener("ngModelChange", function ViewOnlineSettingComponent_div_12_Template_input_ngModelChange_2_listener($event) { i0.ɵɵrestoreView(_r9); const ctx_r8 = i0.ɵɵnextContext(); return ctx_r8.watermarkModel.wmContent = $event; });
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "label", 13);
    i0.ɵɵtext(5);
    i0.ɵɵpipe(6, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(7, ViewOnlineSettingComponent_div_12_div_7_Template, 3, 2, "div", 14);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵproperty("ngClass", ctx_r0.mode === "xs-small" ? "p-col-12" : "p-col-12 p-md-6");
    i0.ɵɵadvance(2);
    i0.ɵɵpropertyInterpolate("pTooltip", i0.ɵɵpipeBind1(3, 9, "label.content_watermark_tooltip"));
    i0.ɵɵproperty("autocomplete", "off")("appAutofocus", ctx_r0.watermarkModel.wmSetting === "custom")("ngModel", ctx_r0.watermarkModel.wmContent)("ngClass", (ctx_r0.f.wmContent.dirty || ctx_r0.f.wmContent.touched) && ctx_r0.f.wmContent.invalid ? "ng-dirty" : "");
    i0.ɵɵattribute("disabled", ctx_r0.disabled ? true : null);
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 11, "label.customs"), " ");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", (ctx_r0.f.wmContent.dirty || ctx_r0.f.wmContent.touched) && ctx_r0.f.wmContent.invalid);
} }
function ViewOnlineSettingComponent_div_13_Template(rf, ctx) { if (rf & 1) {
    const _r11 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 10);
    i0.ɵɵelementStart(1, "div", 11);
    i0.ɵɵelementStart(2, "p-dropdown", 17);
    i0.ɵɵlistener("ngModelChange", function ViewOnlineSettingComponent_div_13_Template_p_dropdown_ngModelChange_2_listener($event) { i0.ɵɵrestoreView(_r11); const ctx_r10 = i0.ɵɵnextContext(); return ctx_r10.watermarkModel.fontSize = $event; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "label", 18);
    i0.ɵɵtext(4);
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵproperty("ngClass", ctx_r1.mode === "xs-small" ? "p-col-12" : "p-col-5 p-md-6");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("options", ctx_r1.fontSizes)("disabled", ctx_r1.disabled)("ngModel", ctx_r1.watermarkModel.fontSize);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 5, "label.font_size"), " ");
} }
function ViewOnlineSettingComponent_div_14_Template(rf, ctx) { if (rf & 1) {
    const _r13 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 10);
    i0.ɵɵelementStart(1, "div", 11);
    i0.ɵɵelementStart(2, "p-dropdown", 19);
    i0.ɵɵlistener("ngModelChange", function ViewOnlineSettingComponent_div_14_Template_p_dropdown_ngModelChange_2_listener($event) { i0.ɵɵrestoreView(_r13); const ctx_r12 = i0.ɵɵnextContext(); return ctx_r12.watermarkModel.position = $event; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "label", 18);
    i0.ɵɵtext(4);
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵproperty("ngClass", ctx_r2.mode === "xs-small" ? "p-col-12" : "p-col-7 p-md-6");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("options", ctx_r2.positions)("disabled", ctx_r2.disabled)("ngModel", ctx_r2.watermarkModel.position);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 5, "label.position"), " ");
} }
function ViewOnlineSettingComponent_div_15_div_8_small_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 15);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.input_color"), " ");
} }
function ViewOnlineSettingComponent_div_15_div_8_small_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 15);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.invalid_color_format"), " ");
} }
function ViewOnlineSettingComponent_div_15_div_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtemplate(1, ViewOnlineSettingComponent_div_15_div_8_small_1_Template, 3, 3, "small", 14);
    i0.ɵɵtemplate(2, ViewOnlineSettingComponent_div_15_div_8_small_2_Template, 3, 3, "small", 14);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r14 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r14.f.colorText.errors == null ? null : ctx_r14.f.colorText.errors.required);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r14.f.colorText.errors == null ? null : ctx_r14.f.colorText.errors.pattern);
} }
function ViewOnlineSettingComponent_div_15_Template(rf, ctx) { if (rf & 1) {
    const _r18 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 10);
    i0.ɵɵelementStart(1, "div", 20);
    i0.ɵɵelementStart(2, "span", 21);
    i0.ɵɵelementStart(3, "input", 22);
    i0.ɵɵlistener("ngModelChange", function ViewOnlineSettingComponent_div_15_Template_input_ngModelChange_3_listener($event) { i0.ɵɵrestoreView(_r18); const ctx_r17 = i0.ɵɵnextContext(); return ctx_r17.watermarkModel.colorText = $event; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "label", 23);
    i0.ɵɵtext(5);
    i0.ɵɵpipe(6, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(7, "p-colorPicker", 24);
    i0.ɵɵlistener("onChange", function ViewOnlineSettingComponent_div_15_Template_p_colorPicker_onChange_7_listener($event) { i0.ɵɵrestoreView(_r18); const ctx_r19 = i0.ɵɵnextContext(); return ctx_r19.pickColorInPicker($event); })("ngModelChange", function ViewOnlineSettingComponent_div_15_Template_p_colorPicker_ngModelChange_7_listener($event) { i0.ɵɵrestoreView(_r18); const ctx_r20 = i0.ɵɵnextContext(); return ctx_r20.watermarkModel.color = $event; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(8, ViewOnlineSettingComponent_div_15_div_8_Template, 3, 2, "div", 16);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext();
    i0.ɵɵproperty("ngClass", ctx_r3.mode === "xs-small" ? "p-col-12" : "p-col-12 p-md-6");
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("ngModel", ctx_r3.watermarkModel.colorText)("ngClass", (ctx_r3.f.colorText.dirty || ctx_r3.f.colorText.touched) && ctx_r3.f.colorText.invalid ? "ng-dirty" : "");
    i0.ɵɵattribute("disabled", ctx_r3.disabled ? true : null);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 8, "label.color"));
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngModel", ctx_r3.watermarkModel.color)("disabled", ctx_r3.disabled);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", (ctx_r3.f.colorText.dirty || ctx_r3.f.colorText.touched) && ctx_r3.f.colorText.invalid);
} }
function ViewOnlineSettingComponent_div_16_span_4_Template(rf, ctx) { if (rf & 1) {
    const _r24 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "span", 28);
    i0.ɵɵlistener("click", function ViewOnlineSettingComponent_div_16_span_4_Template_span_click_0_listener() { i0.ɵɵrestoreView(_r24); const item_r22 = ctx.$implicit; const ctx_r23 = i0.ɵɵnextContext(2); return ctx_r23.pickColorAvailable(item_r22.color_rgb); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r22 = ctx.$implicit;
    const ctx_r21 = i0.ɵɵnextContext(2);
    i0.ɵɵstyleMap(ctx_r21.handlePickColor(item_r22.color_rgb));
    i0.ɵɵproperty("title", item_r22.text);
} }
function ViewOnlineSettingComponent_div_16_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 25);
    i0.ɵɵelementStart(1, "p", 26);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(4, ViewOnlineSettingComponent_div_16_span_4_Template, 1, 3, "span", 27);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r4 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 2, "label.select_one"));
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngForOf", ctx_r4.sampleColors);
} }
const _c0 = function (a0) { return { "p-mb-0": a0 }; };
class ViewOnlineSettingComponent {
    constructor(fb, translate) {
        this.fb = fb;
        this.translate = translate;
        this.mode = '';
        this.disabled = false;
        this.form = new forms_1.FormGroup({});
        this.appConstant = app_constants_1.default;
        this.appUtil = app_util_1.default;
        this.watermarkModel = new watermark_model_1.WatermarkSettings();
        this.fontSizes = [];
        this.positions = [];
        this.sampleColors = this.appConstant.sampleColors;
    }
    get f() {
        return this.form.controls;
    }
    ngOnInit() {
        const size = _.range(50, 100, 2);
        for (const item of size) {
            this.fontSizes = [...this.fontSizes, { name: item.toString(), code: item }];
        }
        this.positions = this.appUtil.getWatermarkPositionObj(this.translate);
        this.form = this.fb.group({
            wmSetting: ['default'],
            wmContent: ['', [forms_1.Validators.required,
                    forms_1.Validators.pattern(this.appConstant.PATTERNS.SCRIPT_PATTERN),
                    app_validator_1.noWhitespaceValidator]],
            color: [{ r: 192, g: 192, b: 192 }, []],
            colorText: ['RGB(192,192,192)', [forms_1.Validators.required,
                    forms_1.Validators.pattern(this.appConstant.PATTERNS.COLOR_RGB_PATTERN)]],
            position: [this.positions.find(position => position.code === 'diagonal').code],
            fontSize: [this.fontSizes.find(fontSize => fontSize.code === 50).code],
        });
        console.log("watermarkSetting", this.watermarkSetting);
        if (this.watermarkSetting) {
            const wm = this.appUtil.toCamelCaseKey(JSON.parse(this.watermarkSetting));
            this.watermarkModel.showWm = (wm.showWm === 1);
            this.watermarkModel.wmSetting = (wm.defaultWm === 1) ? 'default' : 'custom';
            if (wm.defaultWm === 0) {
                // get color
                let colorText = wm.setting.wmColor;
                let color = wm.setting.wmColor.slice(wm.setting.wmColor.indexOf('(') + 1, wm.setting.wmColor.indexOf(')')).split(',');
                if (wm.setting.wmColor === '') {
                    color = [192, 192, 192];
                    colorText = 'RGB(192,192,192)';
                }
                this.watermarkModel.colorText = colorText;
                this.watermarkModel.wmContent = wm.setting.wmText;
                this.watermarkModel.color = { r: parseInt(color[0], 0), g: parseInt(color[1], 0), b: parseInt(color[2], 0) };
                this.watermarkModel.fontSize = wm.setting.wmFontSize;
                this.watermarkModel.position = wm.setting.wmPosition;
            }
        }
        this.checkValueChange();
    }
    checkValueChange() {
        // set the value for the color-picker when select the available color
        this.form.controls.colorText.valueChanges.subscribe(value => {
            const colorText = value;
            const color = colorText.slice(colorText.indexOf('(') + 1, colorText.indexOf(')')).split(',');
            this.watermarkModel.color = {
                r: parseInt(color[0], 0),
                g: parseInt(color[1], 0),
                b: parseInt(color[2], 0)
            };
        });
        // handle validate field
        this.form.controls.wmSetting.valueChanges.subscribe(value => {
            this.form.controls.wmContent.markAsUntouched();
            this.form.controls.colorText.markAsUntouched();
            if (value === 'default') {
                this.form.controls.wmContent.clearValidators();
                this.form.controls.wmContent.setErrors(null);
                this.form.controls.colorText.clearValidators();
                this.form.controls.colorText.setErrors(null);
                this.form.updateValueAndValidity({ onlySelf: true });
            }
            else {
                this.form.controls.wmContent.setValidators([
                    forms_1.Validators.required,
                    forms_1.Validators.pattern(this.appConstant.PATTERNS.SCRIPT_PATTERN),
                    app_validator_1.noWhitespaceValidator
                ]);
                this.form.controls.colorText.setValidators([
                    forms_1.Validators.required,
                    forms_1.Validators.pattern(this.appConstant.PATTERNS.COLOR_RGB_PATTERN)
                ]);
            }
        });
    }
    pickColorInPicker(event) {
        this.watermarkModel.colorText = 'RGB(' + event.value.r + ',' + event.value.g + ',' + event.value.b + ')';
    }
    pickColorAvailable(event) {
        this.watermarkModel.colorText = event.toUpperCase().replace(/ /gi, '');
    }
    handlePickColor(color) {
        return {
            'background-color': color, width: '40px', height: '40px', display: 'inline-block',
            float: 'left', cursor: 'pointer'
        };
    }
}
exports.ViewOnlineSettingComponent = ViewOnlineSettingComponent;
ViewOnlineSettingComponent.ɵfac = function ViewOnlineSettingComponent_Factory(t) { return new (t || ViewOnlineSettingComponent)(i0.ɵɵdirectiveInject(i1.FormBuilder), i0.ɵɵdirectiveInject(i2.TranslateService)); };
ViewOnlineSettingComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ViewOnlineSettingComponent, selectors: [["app-view-online-setting"]], inputs: { mode: "mode", disabled: "disabled", watermarkSetting: "watermarkSetting" }, decls: 17, vars: 19, consts: [[3, "formGroup"], [1, "p-fluid", "p-formgrid", "p-grid"], [1, "p-field-radiobutton", "p-col-12"], ["name", "wmSetting", "value", "default", "inputId", "default-wt", "formControlName", "wmSetting", 3, "ngModel", "disabled", "ngModelChange"], ["for", "default-wt"], [1, "p-field-radiobutton", "p-col-12", 3, "ngClass"], ["name", "wmSetting", "value", "custom", "inputId", "custom-wt", "formControlName", "wmSetting", 3, "ngModel", "disabled", "ngModelChange"], ["for", "custom-wt"], ["class", "p-field", 3, "ngClass", 4, "ngIf"], ["class", "p-field p-col-12 p-mb-0", 4, "ngIf"], [1, "p-field", 3, "ngClass"], [1, "p-float-label"], ["id", "custom", "type", "text", "maxlength", "255", "tooltipPosition", "bottom", "tooltipZIndex", "11002", "formControlName", "wmContent", "pInputText", "", 3, "autocomplete", "appAutofocus", "pTooltip", "ngModel", "ngClass", "ngModelChange"], ["for", "custom"], ["class", "p-error", 4, "ngIf"], [1, "p-error"], [4, "ngIf"], ["id", "fontSize", "formControlName", "fontSize", "optionLabel", "name", "optionValue", "code", 3, "options", "disabled", "ngModel", "ngModelChange"], ["for", "fontSize"], ["id", "position", "formControlName", "position", "optionLabel", "name", "optionValue", "code", 3, "options", "disabled", "ngModel", "ngModelChange"], [1, "p-inputgroup"], [1, "p-float-label", "width-100"], ["formControlName", "colorText", "id", "label-color", "maxlength", "64", "pInputText", "", "type", "text", 2, "border-right", "none", 3, "ngModel", "ngClass", "ngModelChange"], ["for", "label-color"], ["formControlName", "color", "appendTo", "body", "format", "rgb", 3, "ngModel", "disabled", "onChange", "ngModelChange"], [1, "p-field", "p-col-12", "p-mb-0"], [1, "p-mt-0", "p-mb-2"], [3, "title", "style", "click", 4, "ngFor", "ngForOf"], [3, "title", "click"]], template: function ViewOnlineSettingComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "form", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵelementStart(2, "div", 2);
        i0.ɵɵelementStart(3, "p-radioButton", 3);
        i0.ɵɵlistener("ngModelChange", function ViewOnlineSettingComponent_Template_p_radioButton_ngModelChange_3_listener($event) { return ctx.watermarkModel.wmSetting = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(4, "label", 4);
        i0.ɵɵtext(5);
        i0.ɵɵpipe(6, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(7, "div", 5);
        i0.ɵɵelementStart(8, "p-radioButton", 6);
        i0.ɵɵlistener("ngModelChange", function ViewOnlineSettingComponent_Template_p_radioButton_ngModelChange_8_listener($event) { return ctx.watermarkModel.wmSetting = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(9, "label", 7);
        i0.ɵɵtext(10);
        i0.ɵɵpipe(11, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(12, ViewOnlineSettingComponent_div_12_Template, 8, 13, "div", 8);
        i0.ɵɵtemplate(13, ViewOnlineSettingComponent_div_13_Template, 6, 7, "div", 8);
        i0.ɵɵtemplate(14, ViewOnlineSettingComponent_div_14_Template, 6, 7, "div", 8);
        i0.ɵɵtemplate(15, ViewOnlineSettingComponent_div_15_Template, 9, 10, "div", 8);
        i0.ɵɵtemplate(16, ViewOnlineSettingComponent_div_16_Template, 5, 4, "div", 9);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵproperty("formGroup", ctx.form);
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("ngModel", ctx.watermarkModel.wmSetting)("disabled", ctx.disabled);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 13, "label.default_wm"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(17, _c0, ctx.watermarkModel.wmSetting !== "custom"));
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngModel", ctx.watermarkModel.wmSetting)("disabled", ctx.disabled);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(11, 15, "label.customs"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.watermarkModel.wmSetting === "custom");
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.watermarkModel.wmSetting === "custom");
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.watermarkModel.wmSetting === "custom");
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.watermarkModel.wmSetting === "custom");
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", !ctx.disabled && ctx.watermarkModel.wmSetting === "custom");
    } }, directives: [i1.ɵangular_packages_forms_forms_y, i1.NgControlStatusGroup, i1.FormGroupDirective, i3.RadioButton, i1.NgControlStatus, i1.FormControlName, i4.NgClass, i4.NgIf, i1.DefaultValueAccessor, i1.MaxLengthValidator, i5.InputText, i6.AutofocusDirective, i7.Tooltip, i8.Dropdown, i9.ColorPicker, i4.NgForOf], pipes: [i2.TranslatePipe], styles: ["[_nghost-%COMP%]  .p-colorpicker-preview, [_nghost-%COMP%]  .p-fluid .p-colorpicker-preview.p-inputtext {\n  width: 44px;\n  height: 45px;\n  border-radius: 0 4px 4px 0 !important;\n  border-color: #9e9e9e;\n}\n[_nghost-%COMP%]  .p-colorpicker-panel {\n  right: 0;\n  left: auto !important;\n}\n[_nghost-%COMP%]  .required:after {\n  content: \" *\";\n  color: red;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvZHJtL3ZpZXctb25saW5lLXNldHRpbmcvdmlldy1vbmxpbmUtc2V0dGluZy5jb21wb25lbnQuc2NzcyIsInNyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvZHJtL3ZpZXctb25saW5lLXNldHRpbmcvdmlldy1vbmxpbmUtc2V0dGluZy5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDRTtFQUNFLFdBQUE7RUFDQSxZQUFBO0VBQ0EscUNBQUE7RUFDQSxxQkFBQTtBQ0FKO0FER0U7RUFDRSxRQUFBO0VBQ0EscUJBQUE7QUNESjtBRElFO0VBQ0UsYUFBQTtFQUNBLFVBQUE7QUNGSiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2RybS92aWV3LW9ubGluZS1zZXR0aW5nL3ZpZXctb25saW5lLXNldHRpbmcuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyI6aG9zdCg6Om5nLWRlZXApIHtcbiAgLnAtY29sb3JwaWNrZXItcHJldmlldywgLnAtZmx1aWQgLnAtY29sb3JwaWNrZXItcHJldmlldy5wLWlucHV0dGV4dCB7XG4gICAgd2lkdGg6IDQ0cHg7XG4gICAgaGVpZ2h0OiA0NXB4O1xuICAgIGJvcmRlci1yYWRpdXM6IDAgNHB4IDRweCAwICFpbXBvcnRhbnQ7XG4gICAgYm9yZGVyLWNvbG9yOiAjOWU5ZTllO1xuICB9XG5cbiAgLnAtY29sb3JwaWNrZXItcGFuZWwge1xuICAgIHJpZ2h0OiAwO1xuICAgIGxlZnQ6IGF1dG8gIWltcG9ydGFudDtcbiAgfVxuXG4gIC5yZXF1aXJlZDphZnRlciB7XG4gICAgY29udGVudDogXCIgKlwiO1xuICAgIGNvbG9yOiByZWQ7XG4gIH1cbn1cbiIsIjpob3N0KDo6bmctZGVlcCkgLnAtY29sb3JwaWNrZXItcHJldmlldywgOmhvc3QoOjpuZy1kZWVwKSAucC1mbHVpZCAucC1jb2xvcnBpY2tlci1wcmV2aWV3LnAtaW5wdXR0ZXh0IHtcbiAgd2lkdGg6IDQ0cHg7XG4gIGhlaWdodDogNDVweDtcbiAgYm9yZGVyLXJhZGl1czogMCA0cHggNHB4IDAgIWltcG9ydGFudDtcbiAgYm9yZGVyLWNvbG9yOiAjOWU5ZTllO1xufVxuOmhvc3QoOjpuZy1kZWVwKSAucC1jb2xvcnBpY2tlci1wYW5lbCB7XG4gIHJpZ2h0OiAwO1xuICBsZWZ0OiBhdXRvICFpbXBvcnRhbnQ7XG59XG46aG9zdCg6Om5nLWRlZXApIC5yZXF1aXJlZDphZnRlciB7XG4gIGNvbnRlbnQ6IFwiICpcIjtcbiAgY29sb3I6IHJlZDtcbn0iXX0= */"], changeDetection: 0 });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ViewOnlineSettingComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-view-online-setting',
                templateUrl: './view-online-setting.component.html',
                styleUrls: ['./view-online-setting.component.scss'],
                changeDetection: core_1.ChangeDetectionStrategy.OnPush // fix bug NG0100
            }]
    }], function () { return [{ type: i1.FormBuilder }, { type: i2.TranslateService }]; }, { mode: [{
            type: core_1.Input
        }], disabled: [{
            type: core_1.Input
        }], watermarkSetting: [{
            type: core_1.Input
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/file/file-drm-setting/file-drm-setting.component.ts":
/*!******************************************************************************************!*\
  !*** ./src/app/authentication-pages/file/file-drm-setting/file-drm-setting.component.ts ***!
  \******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.FileDrmSettingComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const moment_1 = tslib_1.__importStar(__webpack_require__(/*! moment */ "./node_modules/moment/moment.js"));
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const app_constants_1 = tslib_1.__importStar(__webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/file.service */ "./src/app/services/file.service.ts"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! ../../drm/project-drm-setting/project-drm-setting.component */ "./src/app/authentication-pages/drm/project-drm-setting/project-drm-setting.component.ts"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! primeng/ripple */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-ripple.js"));
const _c0 = ["projectDrmSettingComponent"];
function FileDrmSettingComponent_app_project_drm_setting_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "app-project-drm-setting", 3, 4);
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵproperty("drmSetting", ctx_r0.drmSettingJson)("disabled", !ctx_r0.hasPermission);
} }
function FileDrmSettingComponent_div_3_Template(rf, ctx) { if (rf & 1) {
    const _r4 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 5);
    i0.ɵɵelementStart(1, "button", 6);
    i0.ɵɵlistener("click", function FileDrmSettingComponent_div_3_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r4); const ctx_r3 = i0.ɵɵnextContext(); return ctx_r3.disabledDrmSetting(); });
    i0.ɵɵpipe(2, "uppercase");
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "button", 7);
    i0.ɵɵlistener("click", function FileDrmSettingComponent_div_3_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r4); const ctx_r5 = i0.ɵɵnextContext(); return ctx_r5.updateDrmSetting(); });
    i0.ɵɵpipe(5, "uppercase");
    i0.ɵɵpipe(6, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(2, 4, i0.ɵɵpipeBind1(3, 6, "button.disable_drm")));
    i0.ɵɵproperty("disabled", !ctx_r1.hasPermission || ctx_r1.isDisabling);
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(5, 8, i0.ɵɵpipeBind1(6, 10, "button.save")));
    i0.ɵɵproperty("disabled", !ctx_r1.hasPermission || ctx_r1.isDisabling);
} }
class FileDrmSettingComponent {
    constructor(fileService, authService, messageService, translateService) {
        this.fileService = fileService;
        this.authService = authService;
        this.messageService = messageService;
        this.translateService = translateService;
        this.doStartDecrypt = new core_1.EventEmitter();
        this.done = new core_1.EventEmitter();
        this.doDecode = new core_1.EventEmitter();
        this.appUtil = app_util_1.default;
        this.appConstant = app_constants_1.default;
        this.projectRole = app_constants_1.ProjectRole;
        this.hasPermission = false;
        this.isDisabling = false;
        this.isUpdating = false;
    }
    ngOnInit() {
        if (this.projectRoleId === this.projectRole.Owner || this.projectRoleId === this.projectRole.Editor) {
            this.hasPermission = true;
        }
        this.getFileDrmSetting();
    }
    getFileDrmSetting() {
        const params = {
            projectId: this.projectId,
            folderId: this.folderId
        };
        this.fileService.getFileDrmSettings(this.fileId, this.appUtil.toSnakeCaseKey(params)).subscribe(res => {
            if (res.status === 200) {
                this.label = res.data.fileProject.label;
                const currentTimezone = this.authService.getAuthUser.timeZone;
                const documentExpiryDate = moment_1.default(new Date(res.data.fileProject.documentExpiryDate)).add(currentTimezone, 'hours');
                const unlimited = (documentExpiryDate && documentExpiryDate.isAfter(moment_1.default(this.appConstant.MAX_DATE_ONLY))) ? 0 : 1;
                const drmSetting = {
                    printable: res.data.fileProject.printable,
                    editable: res.data.fileProject.editable,
                    unlimited,
                    expiryDate: res.data.fileProject.documentExpiryDate // bugs fixing expiry date not same with folder
                };
                this.drmSettingJson = JSON.stringify(drmSetting);
            }
        }, error => {
            // console.log('error', error);
        });
    }
    disabledDrmSetting() {
        if (this.file.fileTranslateStatus === app_constants_1.TranslateStatus.TRANSLATING) {
            this.messageService.add({
                severity: 'warn',
                detail: this.appUtil.translate(this.translateService, 'label.file_translating_disabled')
            });
            return;
        }
        const params = {
            projectId: this.projectId
        };
        // this.doDecode.emit(true);
        this.fileService.emitFileWatch();
        this.isDisabling = true;
        this.messageService.add({
            severity: 'info',
            detail: this.appUtil.translate(this.translateService, 'default_toast.wait')
        });
        this.fileService.deleteDrmSetting(this.fileId, this.appUtil.toSnakeCaseKey(params)).subscribe(res => {
            if (res.status === 200) {
                this.messageService.add({
                    severity: 'success',
                    detail: this.appUtil.translate(this.translateService, 'default_toast.update_success')
                });
                this.done.emit(true);
                this.fileService.emitFileWatch();
                this.isDisabling = false;
            }
            else {
                if (res.status === 403) {
                    this.messageService.add({
                        key: 'toast',
                        severity: 'error',
                        detail: this.appUtil.translate(this.translateService, 'error.' + res.status)
                    });
                    window.location.reload();
                }
            }
        }, error => {
            // console.log('error', error);
            this.isDisabling = false;
        });
    }
    updateDrmSetting() {
        this.projectDrmSettingComponent.form.markAllAsTouched();
        if (this.projectDrmSettingComponent.form.invalid) {
            return;
        }
        if (this.isUpdating) {
            return;
        }
        let docExpiryDate;
        if (!this.projectDrmSettingComponent.f.setDocExpiry.value) {
            docExpiryDate = this.appUtil.formatBookendDate(new Date(this.appConstant.MAX_DATE), this.projectDrmSettingComponent.f.timezone.value.code, this.appConstant.FORMAT_DATE.LINK_FORMAT_DATE, moment_1.default);
        }
        else {
            const expDate = new Date(this.projectDrmSettingComponent.f.expiryDate.value);
            const expTime = new Date(this.projectDrmSettingComponent.f.expiryTime.value);
            expDate.setHours(expTime.getHours());
            expDate.setMinutes(expTime.getMinutes());
            expDate.setSeconds(59);
            docExpiryDate = this.appUtil.formatBookendDate(expDate, this.projectDrmSettingComponent.f.timezone.value.code, this.appConstant.FORMAT_DATE.LINK_FORMAT_DATE, moment_1.default);
        }
        if (docExpiryDate <= moment_1.default(moment_1.utc(new Date())).format(this.appConstant.FORMAT_DATE.LINK_FORMAT_DATE)) {
            this.messageService.add({
                severity: 'error',
                detail: this.appUtil.translate(this.translateService, 'error.invalid_expiry_date'),
            });
            return;
        }
        const params = {
            projectId: this.projectId,
            fileIds: this.fileId,
            folderId: this.folderId,
            label: this.label,
            expiryDate: docExpiryDate,
            editable: (this.projectDrmSettingComponent.f.editable.value) ? 1 : 0,
            printable: (this.projectDrmSettingComponent.f.printable.value) ? 1 : 0,
        };
        this.isUpdating = true;
        this.fileService.updateFileDrmSetting(this.appUtil.toSnakeCaseKey(params)).subscribe(res => {
            if (res.status === 200) {
                this.messageService.add({
                    severity: 'success',
                    detail: this.appUtil.translate(this.translateService, 'default_toast.update_success')
                });
                // this.done.emit(true);
                this.fileService.emitFileWatch();
            }
            this.isUpdating = false;
        }, error => {
            // console.log('error', error);
            this.isUpdating = false;
        });
    }
}
exports.FileDrmSettingComponent = FileDrmSettingComponent;
FileDrmSettingComponent.ɵfac = function FileDrmSettingComponent_Factory(t) { return new (t || FileDrmSettingComponent)(i0.ɵɵdirectiveInject(i1.FileService), i0.ɵɵdirectiveInject(i2.AuthService), i0.ɵɵdirectiveInject(i3.MessageService), i0.ɵɵdirectiveInject(i4.TranslateService)); };
FileDrmSettingComponent.ɵcmp = i0.ɵɵdefineComponent({ type: FileDrmSettingComponent, selectors: [["app-file-drm-setting"]], viewQuery: function FileDrmSettingComponent_Query(rf, ctx) { if (rf & 1) {
        i0.ɵɵviewQuery(_c0, 1);
    } if (rf & 2) {
        let _t;
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.projectDrmSettingComponent = _t.first);
    } }, inputs: { projectId: "projectId", folderId: "folderId", fileId: "fileId", projectRoleId: "projectRoleId", file: "file" }, outputs: { doStartDecrypt: "doStartDecrypt", done: "done", doDecode: "doDecode" }, decls: 4, vars: 5, consts: [[1, "page-title-lv2", 2, "padding", "5px 0", 3, "translate"], ["class", "mt-1", 3, "drmSetting", "disabled", 4, "ngIf"], ["class", "p-col-12 p-pr-0 p-text-right", 4, "ngIf"], [1, "mt-1", 3, "drmSetting", "disabled"], ["projectDrmSettingComponent", ""], [1, "p-col-12", "p-pr-0", "p-text-right"], ["icon", "fas fa-ban p-button-icon-left", "pButton", "", "pRipple", "", 1, "p-button-raised", "p-button-danger", "p-mr-2", 3, "disabled", "label", "click"], ["icon", "fas fa-check p-button-icon-left", "pButton", "", "pRipple", "", 1, "p-button-raised", "p-button-primary", 3, "disabled", "label", "click"]], template: function FileDrmSettingComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelement(0, "div", 0);
        i0.ɵɵpipe(1, "translate");
        i0.ɵɵtemplate(2, FileDrmSettingComponent_app_project_drm_setting_2_Template, 2, 2, "app-project-drm-setting", 1);
        i0.ɵɵtemplate(3, FileDrmSettingComponent_div_3_Template, 7, 12, "div", 2);
    } if (rf & 2) {
        i0.ɵɵproperty("translate", i0.ɵɵpipeBind1(1, 3, "label.drm_settings"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.drmSettingJson);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.drmSettingJson);
    } }, directives: [i4.TranslateDirective, i5.NgIf, i6.ProjectDrmSettingComponent, i7.ButtonDirective, i8.Ripple], pipes: [i4.TranslatePipe, i5.UpperCasePipe], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2ZpbGUvZmlsZS1kcm0tc2V0dGluZy9maWxlLWRybS1zZXR0aW5nLmNvbXBvbmVudC5zY3NzIn0= */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FileDrmSettingComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-file-drm-setting',
                templateUrl: './file-drm-setting.component.html',
                styleUrls: ['./file-drm-setting.component.scss']
            }]
    }], function () { return [{ type: i1.FileService }, { type: i2.AuthService }, { type: i3.MessageService }, { type: i4.TranslateService }]; }, { projectDrmSettingComponent: [{
            type: core_1.ViewChild,
            args: ['projectDrmSettingComponent']
        }], projectId: [{
            type: core_1.Input
        }], folderId: [{
            type: core_1.Input
        }], fileId: [{
            type: core_1.Input
        }], projectRoleId: [{
            type: core_1.Input
        }], file: [{
            type: core_1.Input
        }], doStartDecrypt: [{
            type: core_1.Output
        }], done: [{
            type: core_1.Output
        }], doDecode: [{
            type: core_1.Output
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/file/file-info/file-info.component.ts":
/*!****************************************************************************!*\
  !*** ./src/app/authentication-pages/file/file-info/file-info.component.ts ***!
  \****************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.FileInfoComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const app_constants_1 = __webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts");
const label_data_model_1 = __webpack_require__(/*! ../../../../models/label-data.model */ "./src/models/label-data.model.ts");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/file.service */ "./src/app/services/file.service.ts"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/label.service */ "./src/app/services/label.service.ts"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! ../item-info/item-info.component */ "./src/app/authentication-pages/file/item-info/item-info.component.ts"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! ../item-title/item-title.component */ "./src/app/authentication-pages/file/item-title/item-title.component.ts"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! @ng-select/ng-select */ "./node_modules/@ng-select/ng-select/__ivy_ngcc__/fesm2015/ng-select-ng-select.js"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i10 = tslib_1.__importStar(__webpack_require__(/*! primeng/tag */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-tag.js"));
const i11 = tslib_1.__importStar(__webpack_require__(/*! primeng/ripple */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-ripple.js"));
const i12 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
const i13 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i14 = tslib_1.__importStar(__webpack_require__(/*! ../../label/label-form/label-form.component */ "./src/app/authentication-pages/label/label-form/label-form.component.ts"));
const i15 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const _c0 = ["labelFormComponent"];
function FileInfoComponent_div_2_ng_template_11_i_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 17);
} }
function FileInfoComponent_div_2_ng_template_11_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, FileInfoComponent_div_2_ng_template_11_i_0_Template, 1, 0, "i", 15);
    i0.ɵɵelement(1, "p-tag", 16);
} if (rf & 2) {
    const item_r8 = ctx.item;
    const ctx_r3 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("ngIf", item_r8.selected === true);
    i0.ɵɵadvance(1);
    i0.ɵɵstyleMap(ctx_r3.handleLabelColor(item_r8.color));
    i0.ɵɵpropertyInterpolate("value", item_r8.name);
    i0.ɵɵpropertyInterpolate("title", item_r8.name);
    i0.ɵɵproperty("rounded", true)("styleClass", !ctx_r3.appUtil.checkColorDark(item_r8.color) ? "text-dark p-max-width-100" : "p-max-width-100");
} }
function FileInfoComponent_div_2_ng_template_12_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "b");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵtext(3);
} if (rf & 2) {
    const search_r10 = ctx.searchTerm;
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 2, "label.create_new"));
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(": ", search_r10, " ");
} }
function FileInfoComponent_div_2_ng_template_13_div_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 19);
    i0.ɵɵelementStart(1, "span", 20);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const items_r11 = i0.ɵɵnextContext().items;
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate2("", items_r11.length, " ", i0.ɵɵpipeBind1(3, 2, "label.checked"), "");
} }
function FileInfoComponent_div_2_ng_template_13_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, FileInfoComponent_div_2_ng_template_13_div_0_Template, 4, 4, "div", 18);
} if (rf & 2) {
    const items_r11 = ctx.items;
    i0.ɵɵproperty("ngIf", items_r11.length > 0);
} }
function FileInfoComponent_div_2_ng_template_14_button_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "button", 22);
    i0.ɵɵpipe(1, "uppercase");
    i0.ɵɵpipe(2, "translate");
} if (rf & 2) {
    const ctx_r14 = i0.ɵɵnextContext(3);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(1, 2, i0.ɵɵpipeBind1(2, 4, "label.manage_label")));
    i0.ɵɵpropertyInterpolate1("routerLink", "/label/", ctx_r14.projectId, "");
} }
function FileInfoComponent_div_2_ng_template_14_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, FileInfoComponent_div_2_ng_template_14_button_0_Template, 3, 6, "button", 21);
} if (rf & 2) {
    const ctx_r6 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("ngIf", ctx_r6.file.userFileRole === ctx_r6.projectRole.Owner || ctx_r6.file.userFileRole === ctx_r6.projectRole.Editor);
} }
function FileInfoComponent_div_2_p_tag_19_Template(rf, ctx) { if (rf & 1) {
    const _r17 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "p-tag", 16);
    i0.ɵɵelementStart(1, "i", 23);
    i0.ɵɵlistener("click", function FileInfoComponent_div_2_p_tag_19_Template_i_click_1_listener() { i0.ɵɵrestoreView(_r17); const item_r15 = ctx.$implicit; const ctx_r16 = i0.ɵɵnextContext(2); return ctx_r16.removeLabelFile(item_r15); });
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r15 = ctx.$implicit;
    const ctx_r7 = i0.ɵɵnextContext(2);
    i0.ɵɵstyleMap(ctx_r7.handleLabelColor(item_r15.color));
    i0.ɵɵpropertyInterpolate("value", item_r15.name);
    i0.ɵɵpropertyInterpolate("title", item_r15.name);
    i0.ɵɵproperty("rounded", true)("styleClass", !ctx_r7.appUtil.checkColorDark(item_r15.color) ? "text-dark p-max-width-100 p-mr-1 p-mt-1" : "p-max-width-100 p-mr-1 p-mt-1");
} }
const _c1 = function () { return { maxLength: "64" }; };
function FileInfoComponent_div_2_Template(rf, ctx) { if (rf & 1) {
    const _r19 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 3);
    i0.ɵɵelementStart(1, "label", 4);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "titlecase");
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "div", 5);
    i0.ɵɵelementStart(6, "span", 6);
    i0.ɵɵelementStart(7, "ng-select", 7, 8);
    i0.ɵɵlistener("keypress", function FileInfoComponent_div_2_Template_ng_select_keypress_7_listener($event) { i0.ɵɵrestoreView(_r19); const ctx_r18 = i0.ɵɵnextContext(); return ctx_r18.appUtil.blockSpecial4Chars($event); })("ngModelChange", function FileInfoComponent_div_2_Template_ng_select_ngModelChange_7_listener($event) { i0.ɵɵrestoreView(_r19); const ctx_r20 = i0.ɵɵnextContext(); return ctx_r20.labelSelected = $event; })("open", function FileInfoComponent_div_2_Template_ng_select_open_7_listener() { i0.ɵɵrestoreView(_r19); const ctx_r21 = i0.ɵɵnextContext(); return ctx_r21.isOpenDropdown = true; })("close", function FileInfoComponent_div_2_Template_ng_select_close_7_listener() { i0.ɵɵrestoreView(_r19); const ctx_r22 = i0.ɵɵnextContext(); return ctx_r22.isBlurDropdown(); })("add", function FileInfoComponent_div_2_Template_ng_select_add_7_listener($event) { i0.ɵɵrestoreView(_r19); const ctx_r23 = i0.ɵɵnextContext(); return ctx_r23.selectLabelFile($event); })("remove", function FileInfoComponent_div_2_Template_ng_select_remove_7_listener($event) { i0.ɵɵrestoreView(_r19); const ctx_r24 = i0.ɵɵnextContext(); return ctx_r24.unselectLabelFile($event); })("clear", function FileInfoComponent_div_2_Template_ng_select_clear_7_listener() { i0.ɵɵrestoreView(_r19); const ctx_r25 = i0.ɵɵnextContext(); return ctx_r25.clearAllLabelFile(); });
    i0.ɵɵpipe(9, "translate");
    i0.ɵɵpipe(10, "translate");
    i0.ɵɵtemplate(11, FileInfoComponent_div_2_ng_template_11_Template, 2, 7, "ng-template", 9);
    i0.ɵɵtemplate(12, FileInfoComponent_div_2_ng_template_12_Template, 4, 4, "ng-template", 10);
    i0.ɵɵtemplate(13, FileInfoComponent_div_2_ng_template_13_Template, 1, 1, "ng-template", 11);
    i0.ɵɵtemplate(14, FileInfoComponent_div_2_ng_template_14_Template, 1, 1, "ng-template", 12);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(15, "label", 13);
    i0.ɵɵtext(16);
    i0.ɵɵpipe(17, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(18, "div", 5);
    i0.ɵɵtemplate(19, FileInfoComponent_div_2_p_tag_19_Template, 2, 6, "p-tag", 14);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 13, i0.ɵɵpipeBind1(4, 15, "label.label")));
    i0.ɵɵadvance(5);
    i0.ɵɵpropertyInterpolate("notFoundText", i0.ɵɵpipeBind1(9, 17, "label.no_item_found"));
    i0.ɵɵpropertyInterpolate("clearAllText", i0.ɵɵpipeBind1(10, 19, "label.clear_all"));
    i0.ɵɵproperty("items", ctx_r0.labelList)("addTag", ctx_r0.file.userFileRole === ctx_r0.projectRole.Owner || ctx_r0.file.userFileRole === ctx_r0.projectRole.Editor ? ctx_r0.addNewLabelTag : false)("inputAttrs", i0.ɵɵpureFunction0(23, _c1))("loading", ctx_r0.loading)("ngModel", ctx_r0.labelSelected)("searchFn", ctx_r0.handleSearchLabel)("closeOnSelect", false);
    i0.ɵɵadvance(8);
    i0.ɵɵproperty("ngClass", ctx_r0.labelSelected.length > 0 || ctx_r0.isOpenDropdown ? "custom-float-label-tab" : "");
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(17, 21, "label.apply_label"), " ");
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("ngForOf", ctx_r0.labelSelected);
} }
function FileInfoComponent_div_3_app_label_form_7_Template(rf, ctx) { if (rf & 1) {
    const _r29 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "app-label-form", 31, 32);
    i0.ɵɵlistener("isSuccess", function FileInfoComponent_div_3_app_label_form_7_Template_app_label_form_isSuccess_0_listener($event) { i0.ɵɵrestoreView(_r29); const ctx_r28 = i0.ɵɵnextContext(2); return ctx_r28.handleCreateLabelSuccess($event); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r26 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("mode", "create")("labelInfo", ctx_r26.labelData)("projectId", ctx_r26.projectId);
} }
function FileInfoComponent_div_3_Template(rf, ctx) { if (rf & 1) {
    const _r31 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 3);
    i0.ɵɵelementStart(1, "span", 24);
    i0.ɵɵelementStart(2, "i", 25);
    i0.ɵɵlistener("click", function FileInfoComponent_div_3_Template_i_click_2_listener() { i0.ɵɵrestoreView(_r31); const ctx_r30 = i0.ɵɵnextContext(); return ctx_r30.isShowAddLabel = false; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "label", 26);
    i0.ɵɵtext(4);
    i0.ɵɵpipe(5, "titlecase");
    i0.ɵɵpipe(6, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(7, FileInfoComponent_div_3_app_label_form_7_Template, 2, 3, "app-label-form", 27);
    i0.ɵɵelementStart(8, "div", 28);
    i0.ɵɵelementStart(9, "button", 29);
    i0.ɵɵlistener("click", function FileInfoComponent_div_3_Template_button_click_9_listener() { i0.ɵɵrestoreView(_r31); const ctx_r32 = i0.ɵɵnextContext(); return ctx_r32.isShowAddLabel = false; });
    i0.ɵɵpipe(10, "titlecase");
    i0.ɵɵpipe(11, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(12, "button", 30);
    i0.ɵɵlistener("click", function FileInfoComponent_div_3_Template_button_click_12_listener() { i0.ɵɵrestoreView(_r31); const ctx_r33 = i0.ɵɵnextContext(); return ctx_r33.createNewLabel(); });
    i0.ɵɵpipe(13, "uppercase");
    i0.ɵɵpipe(14, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 4, i0.ɵɵpipeBind1(6, 6, "label.create_label")));
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("ngIf", ctx_r1.isShowAddLabel);
    i0.ɵɵadvance(2);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(10, 8, i0.ɵɵpipeBind1(11, 10, "label.cancel")));
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(13, 12, i0.ɵɵpipeBind1(14, 14, "label.add")));
} }
class FileInfoComponent {
    constructor(authService, fileService, datePipe, labelService, messageService) {
        this.authService = authService;
        this.fileService = fileService;
        this.datePipe = datePipe;
        this.labelService = labelService;
        this.messageService = messageService;
        this.doLoadLabelFile = new core_1.EventEmitter();
        this.doLoadAllLabels = new core_1.EventEmitter();
        this.labelList = [];
        this.appUtil = app_util_1.default;
        this.projectRole = app_constants_1.ProjectRole;
        this.owner = '';
        this.loading = true;
        this.isShowAddLabel = false;
        this.labelSelected = [];
        this.originSelected = [];
        this.labelAddTemp = [];
        this.labelRemoveTemp = [];
        this.paramLabel = {
            projectId: '',
            searchKey: '',
            pageNumber: 1,
            pageSize: 9999,
            sortField: 'create_date',
            ascSort: false,
        };
        this.labelData = new label_data_model_1.LabelData();
        this.addNewLabelTag = (name) => {
            if (this.file.userFileRole !== this.projectRole.Owner &&
                this.file.userFileRole !== this.projectRole.Editor) {
                return;
            }
            if (name.length > 0) {
                this.isShowAddLabel = true;
                this.labelData = new label_data_model_1.LabelData();
                this.labelData.labelName = name;
                this.labelList.forEach((l) => {
                    this.labelAddTemp.forEach((at) => {
                        if (l.id === at.id && l.selected) {
                            l.selected = false;
                        }
                    });
                });
                this.labelRemoveTemp = [];
                this.labelAddTemp = [];
                this.originSelected.forEach((org) => (org.selected = true));
                this.labelSelected = this.originSelected;
            }
        };
    }
    ngOnInit() {
        this.authUser = this.authService.getAuthUser;
        this.folderId = this.file.parentFolderId ? this.file.parentFolderId : '0';
        const params = {
            projectId: this.projectId,
            folderId: this.folderId,
        };
        this.fileService
            .getFileOwner(this.file.id, this.appUtil.toSnakeCaseKey(params))
            .subscribe((res) => {
            if (res.status === 200) {
                if (this.authUser.lang === 'ja') {
                    this.owner = res.data.lastName + ' ' + res.data.firstName;
                }
                else {
                    this.owner = res.data.firstName + ' ' + res.data.lastName;
                }
            }
        });
        this.getAllLabels();
    }
    loadLabelFiles() {
        const paramsLabelFile = {
            projectId: this.projectId,
            folderId: this.folderId,
        };
        this.labelService
            .getListLabelFile(this.file.id, this.appUtil.toSnakeCaseKey(paramsLabelFile))
            .subscribe((res) => {
            if (res.status === 200) {
                this.labelSelected = [];
                res.data.forEach((l) => {
                    const index = this.labelList.findIndex((i) => i.id === l.labelFilePk.labelId);
                    if (index !== -1) {
                        this.labelList[index].selected = true;
                        this.labelSelected = [
                            ...this.labelSelected,
                            this.labelList[index],
                        ];
                    }
                });
                this.originSelected = [...this.labelSelected];
            }
        });
    }
    getAllLabels() {
        this.loading = true;
        this.paramLabel.projectId = this.projectId;
        this.labelService
            .getLabelList(this.appUtil.toSnakeCaseKey(this.paramLabel))
            .subscribe((res) => {
            if (res.status === 200) {
                this.labelList = [];
                res.data.content.forEach((item) => {
                    this.labelList = [
                        ...this.labelList,
                        {
                            id: item.labelId,
                            color: item.color,
                            name: item.labelName,
                        },
                    ];
                });
            }
            this.loading = false;
            this.loadLabelFiles();
        });
    }
    handleLabelColor(color) {
        return { 'background-color': color, 'max-width': '90%' };
    }
    isBlurDropdown() {
        this.isOpenDropdown = false;
        if (this.labelRemoveTemp.length > 0) {
            this.doDetachLabel(() => {
                this.labelRemoveTemp = [];
                if (this.labelAddTemp.length > 0) {
                    this.doAttachLabel();
                }
                else {
                    this.emitReloadLabelFile();
                }
            });
        }
        else {
            if (this.labelAddTemp.length > 0) {
                this.doAttachLabel();
            }
        }
    }
    doAttachLabel() {
        const paramsAddLabelFile = {
            projectId: this.projectId,
            folderId: this.folderId,
            labelIds: [],
        };
        this.labelAddTemp.forEach((add) => {
            paramsAddLabelFile.labelIds = [...paramsAddLabelFile.labelIds, add.id];
        });
        this.labelService
            .attachLabel(this.file.id, this.appUtil.toSnakeCaseKey(paramsAddLabelFile))
            .subscribe((res) => {
            if (res.status === 200) {
                this.labelAddTemp = [];
                this.emitReloadLabelFile();
            }
        });
    }
    doDetachLabel(cb) {
        if (this.labelRemoveTemp.length === 0) {
            this.labelAddTemp = [];
            return null;
        }
        const paramsRemoveLabelFile = {
            projectId: this.projectId,
            folderId: this.folderId,
            labelIds: this.labelRemoveTemp.map((i) => i.id).join(','),
        };
        return new Promise((resolve) => {
            this.labelService
                .detachLabel(this.file.id, this.appUtil.toSnakeCaseKey(paramsRemoveLabelFile))
                .subscribe(() => {
                resolve();
                cb && cb();
            });
        });
    }
    createNewLabel() {
        this.labelFormComponent.doCreateNewLabel();
    }
    handleCreateLabelSuccess(event) {
        if (event === true) {
            this.isSubmitCreateLabel = false;
            this.isShowAddLabel = false;
            this.getAllLabels();
            this.doLoadAllLabels.emit(true);
        }
    }
    selectLabelFile(event) {
        event.selected = true;
        for (let i = 0; i < this.labelRemoveTemp.length; i++) {
            if (this.labelRemoveTemp[i].id === event.id) {
                this.labelRemoveTemp.splice(i, 1);
            }
        }
        if (this.originSelected.findIndex((s) => s.id === event.id) === -1) {
            this.labelAddTemp = [...new Set(this.labelAddTemp.concat(event))];
        }
    }
    unselectLabelFile(event) {
        event.value.selected = false;
        for (let i = 0; i < this.labelAddTemp.length; i++) {
            if (this.labelAddTemp[i].id === event.value.id) {
                this.labelAddTemp.splice(i, 1);
            }
        }
        if (this.originSelected.findIndex((s) => s.id === event.value.id) !== -1) {
            this.labelRemoveTemp = [
                ...new Set(this.labelRemoveTemp.concat(event.value)),
            ];
        }
    }
    clearAllLabelFile() {
        this.labelRemoveTemp = [...this.originSelected];
        this.labelList.forEach((label) => (label.selected = false));
        this.doDetachLabel(() => {
            this.labelRemoveTemp = [];
            this.emitReloadLabelFile();
        });
    }
    removeLabelFile(item) {
        this.labelRemoveTemp = [item];
        const index = this.labelSelected.findIndex((s) => s.id === item.id);
        this.labelSelected.splice(index, 1);
        this.labelList.forEach((label) => {
            if (label.id === item.id) {
                delete label.selected;
            }
        });
        this.doDetachLabel(() => {
            this.labelRemoveTemp = [];
            this.emitReloadLabelFile();
            this.loadLabelFiles();
        });
    }
    emitReloadLabelFile() {
        // reset origin
        this.originSelected = [...this.labelSelected];
        // emit event to parent
        this.doLoadLabelFile.emit(this.file);
    }
    handleSearchLabel(term, item) {
        return item.name.indexOf(term) !== -1;
    }
}
exports.FileInfoComponent = FileInfoComponent;
FileInfoComponent.ɵfac = function FileInfoComponent_Factory(t) { return new (t || FileInfoComponent)(i0.ɵɵdirectiveInject(i1.AuthService), i0.ɵɵdirectiveInject(i2.FileService), i0.ɵɵdirectiveInject(i3.DatePipe), i0.ɵɵdirectiveInject(i4.LabelService), i0.ɵɵdirectiveInject(i5.MessageService)); };
FileInfoComponent.ɵcmp = i0.ɵɵdefineComponent({ type: FileInfoComponent, selectors: [["app-file-info"]], viewQuery: function FileInfoComponent_Query(rf, ctx) { if (rf & 1) {
        i0.ɵɵviewQuery(_c0, 1);
    } if (rf & 2) {
        let _t;
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.labelFormComponent = _t.first);
    } }, inputs: { file: "file", projectId: "projectId" }, outputs: { doLoadLabelFile: "doLoadLabelFile", doLoadAllLabels: "doLoadAllLabels" }, decls: 4, vars: 6, consts: [[3, "file", "projectId"], [3, "file", "owner"], ["class", "p-mt-2 p-grid", 4, "ngIf"], [1, "p-mt-2", "p-grid"], [1, "p-col-12", "page-title-lv2", "p-p-2"], [1, "p-col-12"], [1, "p-float-label", "p-width-100"], ["multiple", "true", 1, "select-user", 3, "items", "addTag", "inputAttrs", "loading", "ngModel", "searchFn", "closeOnSelect", "notFoundText", "clearAllText", "keypress", "ngModelChange", "open", "close", "add", "remove", "clear"], ["select", ""], ["ng-option-tmp", ""], ["ng-tag-tmp", ""], ["ng-multi-label-tmp", ""], ["ng-footer-tmp", ""], [3, "ngClass"], ["class", "p-text-truncate", 3, "rounded", "value", "title", "styleClass", "style", 4, "ngFor", "ngForOf"], ["class", "fas fa-check text-success p-mr-2", 4, "ngIf"], [1, "p-text-truncate", 3, "rounded", "value", "title", "styleClass"], [1, "fas", "fa-check", "text-success", "p-mr-2"], ["class", "ng-value p-text-center", 4, "ngIf"], [1, "ng-value", "p-text-center"], [1, "ng-value-label", "p-text-center"], ["class", "border-radius-top-0 p-width-100", "pRipple", "", "pButton", "", 3, "label", "routerLink", 4, "ngIf"], ["pRipple", "", "pButton", "", 1, "border-radius-top-0", "p-width-100", 3, "label", "routerLink"], [1, "far", "fa-times-circle", "p-mr-1", "cs-pointer", 3, "click"], [1, "p-col-1"], [1, "fas", "fa-chevron-left", "p-mr-2", "cs-pointer", "p-mt-1", 3, "click"], [1, "p-col-11", "p-pb-0", "page-title-lv2", "p-p-2"], ["class", "p-col-12", 3, "mode", "labelInfo", "projectId", "isSuccess", 4, "ngIf"], [1, "p-col-12", "p-text-right"], ["pButton", "", "pRipple", "", "type", "button", "icon", "fas fa-times", 1, "p-button-raised", "p-button-warning", "p-mr-2", 3, "label", "click"], ["type", "submit", "pRipple", "", "pButton", "", "icon", "fas fa-plus", 1, "p-button-raised", "p-mr-0", 3, "label", "click"], [1, "p-col-12", 3, "mode", "labelInfo", "projectId", "isSuccess"], ["labelFormComponent", ""]], template: function FileInfoComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelement(0, "app-item-info", 0);
        i0.ɵɵelement(1, "app-item-title", 1);
        i0.ɵɵtemplate(2, FileInfoComponent_div_2_Template, 20, 24, "div", 2);
        i0.ɵɵtemplate(3, FileInfoComponent_div_3_Template, 15, 16, "div", 2);
    } if (rf & 2) {
        i0.ɵɵproperty("file", ctx.file)("projectId", ctx.projectId);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("file", ctx.file)("owner", ctx.owner);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", !ctx.isShowAddLabel && ctx.file.userFileRole !== ctx.projectRole.Viewer && ctx.file.userFileRole !== ctx.projectRole.Previewer && ctx.file.userFileRole !== ctx.projectRole.Uploader);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.isShowAddLabel);
    } }, directives: [i6.ItemInfoComponent, i7.ItemTitleComponent, i3.NgIf, i8.NgSelectComponent, i9.NgControlStatus, i9.NgModel, i8.ɵf, i8.ɵo, i8.ɵi, i8.ɵk, i3.NgClass, i3.NgForOf, i10.Tag, i11.Ripple, i12.ButtonDirective, i13.RouterLink, i14.LabelFormComponent], pipes: [i3.TitleCasePipe, i15.TranslatePipe, i3.UpperCasePipe], styles: [".ng-select.ng-select-multiple[_ngcontent-%COMP%]   .ng-select-container[_ngcontent-%COMP%]   .ng-value-container[_ngcontent-%COMP%]   .ng-value[_ngcontent-%COMP%] {\n  background-color: #ebf5ff !important;\n}\n\n[_nghost-%COMP%]     .ng-dropdown-panel .ng-dropdown-footer {\n  padding: 0;\n}\n\n[_nghost-%COMP%]     .text-dark {\n  color: #000000 !important;\n}\n\n[_nghost-%COMP%]     .p-max-width-100 {\n  max-width: 100%;\n}\n\n[_nghost-%COMP%]     .p-tag-value {\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n}\n\n[_nghost-%COMP%]     .custom-float-label {\n  color: rgba(0, 0, 0, 0.6);\n  transform-origin: left 0 !important;\n  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), color 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;\n  padding: 0.25em !important;\n  transform: translateY(-1.28125em) scale(0.75) perspective(100px) translateZ(0.001px) !important;\n  z-index: 1001;\n  top: 22px !important;\n  background-color: white;\n  font-size: 16px;\n}\n\n.border-radius-top-0[_ngcontent-%COMP%] {\n  border-radius: 0 0 4px 4px !important;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvZmlsZS9maWxlLWluZm8vZmlsZS1pbmZvLmNvbXBvbmVudC5zY3NzIiwic3JjL2FwcC9hdXRoZW50aWNhdGlvbi1wYWdlcy9maWxlL2ZpbGUtaW5mby9maWxlLWluZm8uY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxvQ0FBQTtBQ0NGOztBREdFO0VBQ0UsVUFBQTtBQ0FKOztBREdFO0VBQ0UseUJBQUE7QUNESjs7QURJRTtFQUNFLGVBQUE7QUNGSjs7QURLRTtFQUNFLGdCQUFBO0VBQ0EsdUJBQUE7RUFDQSxtQkFBQTtBQ0hKOztBRE1FO0VBQ0UseUJBQUE7RUFDQSxtQ0FBQTtFQUNBLGdLQUFBO0VBQ0EsMEJBQUE7RUFDQSwrRkFBQTtFQUNBLGFBQUE7RUFDQSxvQkFBQTtFQUNBLHVCQUFBO0VBQ0EsZUFBQTtBQ0pKOztBRFNBO0VBQ0UscUNBQUE7QUNORiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2ZpbGUvZmlsZS1pbmZvL2ZpbGUtaW5mby5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIi5uZy1zZWxlY3Qubmctc2VsZWN0LW11bHRpcGxlIC5uZy1zZWxlY3QtY29udGFpbmVyIC5uZy12YWx1ZS1jb250YWluZXIgLm5nLXZhbHVlIHtcbiAgYmFja2dyb3VuZC1jb2xvcjogI2ViZjVmZiAhaW1wb3J0YW50O1xufVxuXG46aG9zdCA6Om5nLWRlZXAge1xuICAubmctZHJvcGRvd24tcGFuZWwgLm5nLWRyb3Bkb3duLWZvb3RlciB7XG4gICAgcGFkZGluZzogMDtcbiAgfVxuXG4gIC50ZXh0LWRhcmsge1xuICAgIGNvbG9yOiAjMDAwMDAwICFpbXBvcnRhbnQ7XG4gIH1cblxuICAucC1tYXgtd2lkdGgtMTAwIHtcbiAgICBtYXgtd2lkdGg6IDEwMCU7XG4gIH1cblxuICAucC10YWctdmFsdWUge1xuICAgIG92ZXJmbG93OiBoaWRkZW47XG4gICAgdGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7XG4gICAgd2hpdGUtc3BhY2U6IG5vd3JhcDtcbiAgfVxuXG4gIC5jdXN0b20tZmxvYXQtbGFiZWwge1xuICAgIGNvbG9yOiByZ2JhKDAsIDAsIDAsIDAuNik7XG4gICAgdHJhbnNmb3JtLW9yaWdpbjogbGVmdCAwICFpbXBvcnRhbnQ7XG4gICAgdHJhbnNpdGlvbjogdHJhbnNmb3JtIDAuNHMgY3ViaWMtYmV6aWVyKDAuMjUsIDAuOCwgMC4yNSwgMSksIGNvbG9yIDAuNHMgY3ViaWMtYmV6aWVyKDAuMjUsIDAuOCwgMC4yNSwgMSksIHdpZHRoIDAuNHMgY3ViaWMtYmV6aWVyKDAuMjUsIDAuOCwgMC4yNSwgMSkgIWltcG9ydGFudDtcbiAgICBwYWRkaW5nOiAwLjI1ZW0gIWltcG9ydGFudDtcbiAgICB0cmFuc2Zvcm06IHRyYW5zbGF0ZVkoLTEuMjgxMjVlbSkgc2NhbGUoMC43NSkgcGVyc3BlY3RpdmUoMTAwcHgpIHRyYW5zbGF0ZVooMC4wMDFweCkgIWltcG9ydGFudDtcbiAgICB6LWluZGV4OiAxMDAxO1xuICAgIHRvcDogMjJweCAhaW1wb3J0YW50O1xuICAgIGJhY2tncm91bmQtY29sb3I6IHdoaXRlO1xuICAgIGZvbnQtc2l6ZTogMTZweDtcbiAgfVxuXG59XG5cbi5ib3JkZXItcmFkaXVzLXRvcC0wIHtcbiAgYm9yZGVyLXJhZGl1czogMCAwIDRweCA0cHggIWltcG9ydGFudDtcbn1cbiIsIi5uZy1zZWxlY3Qubmctc2VsZWN0LW11bHRpcGxlIC5uZy1zZWxlY3QtY29udGFpbmVyIC5uZy12YWx1ZS1jb250YWluZXIgLm5nLXZhbHVlIHtcbiAgYmFja2dyb3VuZC1jb2xvcjogI2ViZjVmZiAhaW1wb3J0YW50O1xufVxuXG46aG9zdCA6Om5nLWRlZXAgLm5nLWRyb3Bkb3duLXBhbmVsIC5uZy1kcm9wZG93bi1mb290ZXIge1xuICBwYWRkaW5nOiAwO1xufVxuOmhvc3QgOjpuZy1kZWVwIC50ZXh0LWRhcmsge1xuICBjb2xvcjogIzAwMDAwMCAhaW1wb3J0YW50O1xufVxuOmhvc3QgOjpuZy1kZWVwIC5wLW1heC13aWR0aC0xMDAge1xuICBtYXgtd2lkdGg6IDEwMCU7XG59XG46aG9zdCA6Om5nLWRlZXAgLnAtdGFnLXZhbHVlIHtcbiAgb3ZlcmZsb3c6IGhpZGRlbjtcbiAgdGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7XG4gIHdoaXRlLXNwYWNlOiBub3dyYXA7XG59XG46aG9zdCA6Om5nLWRlZXAgLmN1c3RvbS1mbG9hdC1sYWJlbCB7XG4gIGNvbG9yOiByZ2JhKDAsIDAsIDAsIDAuNik7XG4gIHRyYW5zZm9ybS1vcmlnaW46IGxlZnQgMCAhaW1wb3J0YW50O1xuICB0cmFuc2l0aW9uOiB0cmFuc2Zvcm0gMC40cyBjdWJpYy1iZXppZXIoMC4yNSwgMC44LCAwLjI1LCAxKSwgY29sb3IgMC40cyBjdWJpYy1iZXppZXIoMC4yNSwgMC44LCAwLjI1LCAxKSwgd2lkdGggMC40cyBjdWJpYy1iZXppZXIoMC4yNSwgMC44LCAwLjI1LCAxKSAhaW1wb3J0YW50O1xuICBwYWRkaW5nOiAwLjI1ZW0gIWltcG9ydGFudDtcbiAgdHJhbnNmb3JtOiB0cmFuc2xhdGVZKC0xLjI4MTI1ZW0pIHNjYWxlKDAuNzUpIHBlcnNwZWN0aXZlKDEwMHB4KSB0cmFuc2xhdGVaKDAuMDAxcHgpICFpbXBvcnRhbnQ7XG4gIHotaW5kZXg6IDEwMDE7XG4gIHRvcDogMjJweCAhaW1wb3J0YW50O1xuICBiYWNrZ3JvdW5kLWNvbG9yOiB3aGl0ZTtcbiAgZm9udC1zaXplOiAxNnB4O1xufVxuXG4uYm9yZGVyLXJhZGl1cy10b3AtMCB7XG4gIGJvcmRlci1yYWRpdXM6IDAgMCA0cHggNHB4ICFpbXBvcnRhbnQ7XG59Il19 */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FileInfoComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-file-info',
                templateUrl: './file-info.component.html',
                styleUrls: ['./file-info.component.scss'],
            }]
    }], function () { return [{ type: i1.AuthService }, { type: i2.FileService }, { type: i3.DatePipe }, { type: i4.LabelService }, { type: i5.MessageService }]; }, { labelFormComponent: [{
            type: core_1.ViewChild,
            args: ['labelFormComponent']
        }], file: [{
            type: core_1.Input
        }], projectId: [{
            type: core_1.Input
        }], doLoadLabelFile: [{
            type: core_1.Output
        }], doLoadAllLabels: [{
            type: core_1.Output
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/file/file-report/file-external/file-external.component.ts":
/*!************************************************************************************************!*\
  !*** ./src/app/authentication-pages/file/file-report/file-external/file-external.component.ts ***!
  \************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.FileExternalComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! primeng/toolbar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-toolbar.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! ../file-report-date/file-report-date.component */ "./src/app/authentication-pages/file/file-report/file-report-date/file-report-date.component.ts"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! primeng/ripple */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-ripple.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! ../file-open-statistics/file-open-statistics.component */ "./src/app/authentication-pages/file/file-report/file-open-statistics/file-open-statistics.component.ts"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! ../file-tracking-open/file-tracking-open.component */ "./src/app/authentication-pages/file/file-report/file-tracking-open/file-tracking-open.component.ts"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const _c0 = ["fileOpenStatisticsComponent"];
const _c1 = ["fileTrackingOpenComponent"];
const _c2 = ["fileReportDateComponent"];
function FileExternalComponent_div_9_app_file_open_statistics_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "app-file-open-statistics", 13, 14);
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("typeReport", "external")("rangeDates", ctx_r2.rangeDates);
} }
function FileExternalComponent_div_9_app_file_tracking_open_4_Template(rf, ctx) { if (rf & 1) {
    const _r7 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "app-file-tracking-open", 15, 16);
    i0.ɵɵlistener("isRevokeSuccess", function FileExternalComponent_div_9_app_file_tracking_open_4_Template_app_file_tracking_open_isRevokeSuccess_0_listener() { i0.ɵɵrestoreView(_r7); const ctx_r6 = i0.ɵɵnextContext(2); return ctx_r6.reloadPage(); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("typeReport", "external")("rangeDates", ctx_r3.rangeDates);
} }
function FileExternalComponent_div_9_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 8);
    i0.ɵɵelementStart(1, "div", 9);
    i0.ɵɵtemplate(2, FileExternalComponent_div_9_app_file_open_statistics_2_Template, 2, 2, "app-file-open-statistics", 10);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "div", 11);
    i0.ɵɵtemplate(4, FileExternalComponent_div_9_app_file_tracking_open_4_Template, 2, 2, "app-file-tracking-open", 12);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r1.rangeDates);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r1.rangeDates);
} }
class FileExternalComponent {
    constructor() {
        this.appUtil = app_util_1.default;
        this.defaultRangeDates = [this.appUtil.subtractDays(new Date(), 14), new Date()];
    }
    ngOnInit() {
        const today = new Date();
        const lastMonth = new Date(today.getFullYear(), today.getMonth(), 0);
        this.defaultRangeDates = [lastMonth, today];
        this.rangeDates = this.defaultRangeDates;
    }
    returnRangeDates(value) {
        if (value && value[1]) {
            this.rangeDates = value;
        }
    }
    reloadPage() {
        if (this.fileReportDateComponent.isInvalidRangeDate) {
            return;
        }
        // reload charts tracking
        this.fileOpenStatisticsComponent.rangeDates = this.rangeDates;
        this.fileOpenStatisticsComponent.getDataOpenStatistics();
        // reload tracking open
        this.fileTrackingOpenComponent.rangeDates = this.rangeDates;
        this.fileTrackingOpenComponent.getFileOpenStatistics();
    }
}
exports.FileExternalComponent = FileExternalComponent;
FileExternalComponent.ɵfac = function FileExternalComponent_Factory(t) { return new (t || FileExternalComponent)(); };
FileExternalComponent.ɵcmp = i0.ɵɵdefineComponent({ type: FileExternalComponent, selectors: [["app-file-external"]], viewQuery: function FileExternalComponent_Query(rf, ctx) { if (rf & 1) {
        i0.ɵɵviewQuery(_c0, 1);
        i0.ɵɵviewQuery(_c1, 1);
        i0.ɵɵviewQuery(_c2, 1);
    } if (rf & 2) {
        let _t;
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.fileOpenStatisticsComponent = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.fileTrackingOpenComponent = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.fileReportDateComponent = _t.first);
    } }, decls: 10, vars: 7, consts: [[1, "p-mt-2"], ["styleClass", "p-p-0"], [1, "p-toolbar-group-left", "p-field"], [3, "componentName", "returnRangeDates"], ["fileReportDateComponent", ""], [1, "p-toolbar-group-right", "p-field"], ["type", "button", "pRipple", "", "pButton", "", "icon", "fas fa-plus", 1, "p-button-raised", 3, "label", "click"], ["class", "p-fluid p-grid p-mt-2", 4, "ngIf"], [1, "p-fluid", "p-grid", "p-mt-2"], [1, "p-field", "p-col-12"], [3, "typeReport", "rangeDates", 4, "ngIf"], [1, "p-field", "p-col-12", "p-mt-2"], [3, "typeReport", "rangeDates", "isRevokeSuccess", 4, "ngIf"], [3, "typeReport", "rangeDates"], ["fileOpenStatisticsComponent", ""], [3, "typeReport", "rangeDates", "isRevokeSuccess"], ["fileTrackingOpenComponent", ""]], template: function FileExternalComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵelementStart(1, "p-toolbar", 1);
        i0.ɵɵelementStart(2, "div", 2);
        i0.ɵɵelementStart(3, "app-file-report-date", 3, 4);
        i0.ɵɵlistener("returnRangeDates", function FileExternalComponent_Template_app_file_report_date_returnRangeDates_3_listener($event) { return ctx.returnRangeDates($event); });
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(5, "div", 5);
        i0.ɵɵelementStart(6, "button", 6);
        i0.ɵɵlistener("click", function FileExternalComponent_Template_button_click_6_listener() { return ctx.reloadPage(); });
        i0.ɵɵpipe(7, "titlecase");
        i0.ɵɵpipe(8, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(9, FileExternalComponent_div_9_Template, 5, 2, "div", 7);
    } if (rf & 2) {
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("componentName", "file-normal");
        i0.ɵɵadvance(3);
        i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(7, 3, i0.ɵɵpipeBind1(8, 5, "label.create_report")));
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("ngIf", ctx.rangeDates);
    } }, directives: [i1.Toolbar, i2.FileReportDateComponent, i3.Ripple, i4.ButtonDirective, i5.NgIf, i6.FileOpenStatisticsComponent, i7.FileTrackingOpenComponent], pipes: [i5.TitleCasePipe, i8.TranslatePipe], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2ZpbGUvZmlsZS1yZXBvcnQvZmlsZS1leHRlcm5hbC9maWxlLWV4dGVybmFsLmNvbXBvbmVudC5zY3NzIn0= */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FileExternalComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-file-external',
                templateUrl: './file-external.component.html',
                styleUrls: ['./file-external.component.scss']
            }]
    }], function () { return []; }, { fileOpenStatisticsComponent: [{
            type: core_1.ViewChild,
            args: ['fileOpenStatisticsComponent']
        }], fileTrackingOpenComponent: [{
            type: core_1.ViewChild,
            args: ['fileTrackingOpenComponent']
        }], fileReportDateComponent: [{
            type: core_1.ViewChild,
            args: ['fileReportDateComponent']
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/file/file-report/file-internal/file-internal.component.ts":
/*!************************************************************************************************!*\
  !*** ./src/app/authentication-pages/file/file-report/file-internal/file-internal.component.ts ***!
  \************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.FileInternalComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! primeng/toolbar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-toolbar.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! ../file-report-date/file-report-date.component */ "./src/app/authentication-pages/file/file-report/file-report-date/file-report-date.component.ts"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! primeng/ripple */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-ripple.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! ../file-open-statistics/file-open-statistics.component */ "./src/app/authentication-pages/file/file-report/file-open-statistics/file-open-statistics.component.ts"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! ../file-tracking-ip/file-tracking-ip.component */ "./src/app/authentication-pages/file/file-report/file-tracking-ip/file-tracking-ip.component.ts"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! ../file-tracking-open/file-tracking-open.component */ "./src/app/authentication-pages/file/file-report/file-tracking-open/file-tracking-open.component.ts"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const _c0 = ["fileOpenStatisticsComponent"];
const _c1 = ["fileTrackingIpComponent"];
const _c2 = ["fileTrackingOpenComponent"];
const _c3 = ["fileReportDateComponent"];
function FileInternalComponent_app_file_open_statistics_11_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "app-file-open-statistics", 12, 13);
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵproperty("typeReport", "internal")("rangeDates", ctx_r1.rangeDates);
} }
function FileInternalComponent_app_file_tracking_ip_13_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "app-file-tracking-ip", 14, 15);
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵproperty("rangeDates", ctx_r2.rangeDates);
} }
function FileInternalComponent_app_file_tracking_open_15_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "app-file-tracking-open", 14, 16);
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext();
    i0.ɵɵproperty("rangeDates", ctx_r3.rangeDates);
} }
class FileInternalComponent {
    constructor() {
        this.appUtil = app_util_1.default;
        this.defaultRangeDates = [this.appUtil.subtractDays(new Date(), 14), new Date()];
    }
    ngOnInit() {
        const today = new Date();
        const lastMonth = new Date(today.getFullYear(), today.getMonth(), 0);
        this.defaultRangeDates = [lastMonth, today];
        this.rangeDates = this.defaultRangeDates;
    }
    returnRangeDates(value) {
        if (value && value[1]) {
            this.rangeDates = value;
        }
    }
    reloadPage() {
        if (this.fileReportDateComponent.isInvalidRangeDate) {
            return;
        }
        // reload charts tracking
        this.fileOpenStatisticsComponent.rangeDates = this.rangeDates;
        this.fileOpenStatisticsComponent.getDataOpenStatistics();
        // reload tracking view/download
        this.fileTrackingIpComponent.rangeDates = this.rangeDates;
        this.fileTrackingIpComponent.loadFileTrackingIP();
        // reload tracking open
        this.fileTrackingOpenComponent.rangeDates = this.rangeDates;
        this.fileTrackingOpenComponent.getFileOpenStatistics();
    }
}
exports.FileInternalComponent = FileInternalComponent;
FileInternalComponent.ɵfac = function FileInternalComponent_Factory(t) { return new (t || FileInternalComponent)(); };
FileInternalComponent.ɵcmp = i0.ɵɵdefineComponent({ type: FileInternalComponent, selectors: [["app-file-internal"]], viewQuery: function FileInternalComponent_Query(rf, ctx) { if (rf & 1) {
        i0.ɵɵviewQuery(_c0, 1);
        i0.ɵɵviewQuery(_c1, 1);
        i0.ɵɵviewQuery(_c2, 1);
        i0.ɵɵviewQuery(_c3, 1);
    } if (rf & 2) {
        let _t;
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.fileOpenStatisticsComponent = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.fileTrackingIpComponent = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.fileTrackingOpenComponent = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.fileReportDateComponent = _t.first);
    } }, decls: 16, vars: 9, consts: [[1, "p-mt-2"], ["styleClass", "p-p-0"], [1, "p-toolbar-group-left", "p-field"], [3, "componentName", "returnRangeDates"], ["fileReportDateComponent", ""], [1, "p-toolbar-group-right", "p-field"], ["type", "button", "pRipple", "", "pButton", "", "icon", "fas fa-plus", 1, "p-button-raised", 3, "label", "click"], [1, "p-fluid", "p-grid", "p-mt-2"], [1, "p-field", "p-col-12"], [3, "typeReport", "rangeDates", 4, "ngIf"], [1, "p-field", "p-col-12", "p-mt-2"], [3, "rangeDates", 4, "ngIf"], [3, "typeReport", "rangeDates"], ["fileOpenStatisticsComponent", ""], [3, "rangeDates"], ["fileTrackingIpComponent", ""], ["fileTrackingOpenComponent", ""]], template: function FileInternalComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵelementStart(1, "p-toolbar", 1);
        i0.ɵɵelementStart(2, "div", 2);
        i0.ɵɵelementStart(3, "app-file-report-date", 3, 4);
        i0.ɵɵlistener("returnRangeDates", function FileInternalComponent_Template_app_file_report_date_returnRangeDates_3_listener($event) { return ctx.returnRangeDates($event); });
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(5, "div", 5);
        i0.ɵɵelementStart(6, "button", 6);
        i0.ɵɵlistener("click", function FileInternalComponent_Template_button_click_6_listener() { return ctx.reloadPage(); });
        i0.ɵɵpipe(7, "titlecase");
        i0.ɵɵpipe(8, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(9, "div", 7);
        i0.ɵɵelementStart(10, "div", 8);
        i0.ɵɵtemplate(11, FileInternalComponent_app_file_open_statistics_11_Template, 2, 2, "app-file-open-statistics", 9);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(12, "div", 10);
        i0.ɵɵtemplate(13, FileInternalComponent_app_file_tracking_ip_13_Template, 2, 1, "app-file-tracking-ip", 11);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(14, "div", 10);
        i0.ɵɵtemplate(15, FileInternalComponent_app_file_tracking_open_15_Template, 2, 1, "app-file-tracking-open", 11);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("componentName", "file-normal");
        i0.ɵɵadvance(3);
        i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(7, 5, i0.ɵɵpipeBind1(8, 7, "label.create_report")));
        i0.ɵɵadvance(5);
        i0.ɵɵproperty("ngIf", ctx.rangeDates);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.rangeDates);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.rangeDates);
    } }, directives: [i1.Toolbar, i2.FileReportDateComponent, i3.Ripple, i4.ButtonDirective, i5.NgIf, i6.FileOpenStatisticsComponent, i7.FileTrackingIpComponent, i8.FileTrackingOpenComponent], pipes: [i5.TitleCasePipe, i9.TranslatePipe], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2ZpbGUvZmlsZS1yZXBvcnQvZmlsZS1pbnRlcm5hbC9maWxlLWludGVybmFsLmNvbXBvbmVudC5zY3NzIn0= */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FileInternalComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-file-internal',
                templateUrl: './file-internal.component.html',
                styleUrls: ['./file-internal.component.scss']
            }]
    }], function () { return []; }, { fileOpenStatisticsComponent: [{
            type: core_1.ViewChild,
            args: ['fileOpenStatisticsComponent']
        }], fileTrackingIpComponent: [{
            type: core_1.ViewChild,
            args: ['fileTrackingIpComponent']
        }], fileTrackingOpenComponent: [{
            type: core_1.ViewChild,
            args: ['fileTrackingOpenComponent']
        }], fileReportDateComponent: [{
            type: core_1.ViewChild,
            args: ['fileReportDateComponent']
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/file/file-report/file-normal/file-normal.component.ts":
/*!********************************************************************************************!*\
  !*** ./src/app/authentication-pages/file/file-report/file-normal/file-normal.component.ts ***!
  \********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.FileNormalComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const moment_1 = tslib_1.__importDefault(__webpack_require__(/*! moment */ "./node_modules/moment/moment.js"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! ../../../../services/file-report.service */ "./src/app/services/file-report.service.ts"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! primeng/toolbar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-toolbar.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! ../file-report-date/file-report-date.component */ "./src/app/authentication-pages/file/file-report/file-report-date/file-report-date.component.ts"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! primeng/ripple */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-ripple.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! primeng/badge */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-badge.js"));
const i10 = tslib_1.__importStar(__webpack_require__(/*! primeng/chart */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-chart.js"));
const i11 = tslib_1.__importStar(__webpack_require__(/*! ../file-tracking-ip/file-tracking-ip.component */ "./src/app/authentication-pages/file/file-report/file-tracking-ip/file-tracking-ip.component.ts"));
const _c0 = ["fileOpenStatisticsComponent"];
const _c1 = ["fileTrackingIpComponent"];
const _c2 = ["fileTrackingOpenComponent"];
const _c3 = ["fileReportDateComponent"];
function FileNormalComponent_div_9_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 10);
    i0.ɵɵelementStart(1, "div", 11);
    i0.ɵɵelement(2, "span", 12);
    i0.ɵɵelementStart(3, "div");
    i0.ɵɵelement(4, "small", 13);
    i0.ɵɵtext(5, ": ");
    i0.ɵɵelement(6, "p-badge", 14);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelement(7, "p-chart", 15);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("translate", "label.number_of_downloads");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("translate", "label.total_of_downloads");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("value", ctx_r1.internalFiles.totalDownload.toString());
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("data", ctx_r1.numberOfDownloads)("options", ctx_r1.basicOptionsDownload);
} }
function FileNormalComponent_div_10_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 10);
    i0.ɵɵelementStart(1, "div", 11);
    i0.ɵɵelement(2, "span", 12);
    i0.ɵɵelementStart(3, "div");
    i0.ɵɵelement(4, "small", 13);
    i0.ɵɵtext(5, ": ");
    i0.ɵɵelement(6, "p-badge", 14);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelement(7, "p-chart", 15);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("translate", "label.number_of_views");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("translate", "label.total_of_views");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("value", ctx_r2.internalFiles.totalView.toString());
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("data", ctx_r2.numberOfViews)("options", ctx_r2.basicOptionsView);
} }
function FileNormalComponent_app_file_tracking_ip_13_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "app-file-tracking-ip", 16, 17);
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext();
    i0.ɵɵproperty("rangeDates", ctx_r3.rangeDates);
} }
class FileNormalComponent {
    constructor(translateService, fileReportService, route) {
        this.translateService = translateService;
        this.fileReportService = fileReportService;
        this.route = route;
        this.appUtil = app_util_1.default;
        this.defaultRangeDates = [this.appUtil.subtractDays(new Date(), 14), new Date()];
        this.basicOptionsView = {
            legend: {
                labels: {
                    fontColor: '#495057'
                }
            },
            scales: {
                xAxes: [{
                        ticks: {
                            fontColor: '#495057'
                        },
                        gridLines: {
                            display: false,
                        },
                        chart: {
                            canvasLeftPadding: '40'
                        }
                    }],
                yAxes: [{
                        display: true,
                        scaleLabel: {
                            display: true,
                            labelString: '',
                            fontColor: '#495057',
                            fontSize: 12
                        },
                        position: 'left',
                        ticks: {
                            fontColor: '#495057',
                            min: 0,
                            max: 2,
                            stepSize: 1,
                        }
                    }]
            }
        };
        this.basicOptionsDownload = {
            legend: {
                labels: {
                    fontColor: '#495057'
                }
            },
            scales: {
                xAxes: [{
                        ticks: {
                            fontColor: '#495057'
                        },
                        gridLines: {
                            display: false,
                        },
                        chart: {
                            canvasLeftPadding: '40'
                        }
                    }],
                yAxes: [{
                        display: true,
                        scaleLabel: {
                            display: true,
                            labelString: '',
                            fontColor: '#495057',
                            fontSize: 12
                        },
                        position: 'left',
                        ticks: {
                            fontColor: '#495057',
                            min: 0,
                            max: 2,
                            stepSize: 1,
                        }
                    }]
            }
        };
        this.getNumberParams = {
            eDate: '',
            folderId: '',
            projectId: '',
            sDate: '',
            type: 0
        };
    }
    ngOnInit() {
        this.projectId = this.route.snapshot.paramMap.get('projectId');
        this.folderId = this.route.snapshot.paramMap.get('folderId');
        this.type = this.route.snapshot.paramMap.get('type');
        this.fileId = this.route.snapshot.paramMap.get('fileId');
        const today = new Date();
        const lastMonth = new Date(today.getFullYear(), today.getMonth(), 0);
        this.defaultRangeDates = [lastMonth, today];
        this.rangeDates = this.defaultRangeDates;
        this.getNumberParams.projectId = this.projectId;
        this.getNumberParams.folderId = this.folderId;
        this.getNumberParams.type = this.type;
        this.basicOptionsView.scales.yAxes[0].scaleLabel.labelString =
            this.appUtil.translate(this.translateService, 'label.number_of_times_viewed');
        this.basicOptionsDownload.scales.yAxes[0].scaleLabel.labelString =
            this.appUtil.translate(this.translateService, 'label.number_of_times_download');
        this.getReportInternalFiles(this.defaultRangeDates);
    }
    // Get Report Internal files
    getReportInternalFiles(rangeDates) {
        this.getNumberParams.sDate = moment_1.default(rangeDates[0]).format('YYYY/MM/DD 00:00:00');
        this.getNumberParams.eDate = moment_1.default(rangeDates[1]).format('YYYY/MM/DD 23:59:59');
        // Get Report Internal Files
        this.fileReportService.getReportInternalFiles(this.fileId, this.appUtil.toSnakeCaseKey(this.getNumberParams)).subscribe(res => {
            if (res.status === 200) {
                this.internalFiles = res.data;
                this.numberOfDownloads = {
                    labels: this.internalFiles.detailDownload.map(x => moment_1.default(x.date).format('MM/DD/YYYY')),
                    datasets: [
                        {
                            label: this.appUtil.translate(this.translateService, 'label.downloaded'),
                            data: this.internalFiles.detailDownload.map(x => x.value),
                            fill: true,
                            borderColor: '#42A5F5'
                        }
                    ]
                };
                this.numberOfViews = {
                    labels: this.internalFiles.detailView.map(x => moment_1.default(x.date).format('MM/DD/YYYY')),
                    datasets: [
                        {
                            label: this.appUtil.translate(this.translateService, 'label.viewed'),
                            data: this.internalFiles.detailView.map(x => x.value),
                            fill: true,
                            borderColor: '#FFA726'
                        }
                    ]
                };
                if (this.numberOfDownloads.datasets[0].data.findIndex(d => d > 0) !== -1) {
                    // @ts-ignore
                    this.basicOptionsDownload.scales.yAxes[0].ticks = {
                        fontColor: '#495057',
                        max: Math.max(...this.numberOfDownloads.datasets[0].data) + 2,
                    };
                    if (Math.max(...this.numberOfDownloads.datasets[0].data) < 8) {
                        this.basicOptionsDownload.scales.yAxes[0].ticks = {
                            fontColor: '#495057',
                            min: 0,
                            max: Math.max(...this.numberOfDownloads.datasets[0].data) + 2,
                            stepSize: 1
                        };
                    }
                }
                if (this.numberOfViews.datasets[0].data.findIndex(d => d > 0) !== -1) {
                    // @ts-ignore
                    this.basicOptionsView.scales.yAxes[0].ticks = {
                        fontColor: '#495057',
                        max: Math.max(...this.numberOfViews.datasets[0].data) + 2,
                    };
                    if (Math.max(...this.numberOfViews.datasets[0].data) < 8) {
                        this.basicOptionsView.scales.yAxes[0].ticks = {
                            fontColor: '#495057',
                            min: 0,
                            max: Math.max(...this.numberOfViews.datasets[0].data) + 2,
                            stepSize: 1
                        };
                    }
                }
            }
        });
    }
    returnRangeDates(value) {
        if (value && value[1]) {
            this.rangeDates = value;
        }
    }
    reloadPage() {
        if (this.fileReportDateComponent.isInvalidRangeDate) {
            return;
        }
        // reload charts tracking
        this.getReportInternalFiles(this.rangeDates);
        // reload tracking view/download
        this.fileTrackingIpComponent.rangeDates = this.rangeDates;
        this.fileTrackingIpComponent.loadFileTrackingIP();
    }
}
exports.FileNormalComponent = FileNormalComponent;
FileNormalComponent.ɵfac = function FileNormalComponent_Factory(t) { return new (t || FileNormalComponent)(i0.ɵɵdirectiveInject(i1.TranslateService), i0.ɵɵdirectiveInject(i2.FileReportService), i0.ɵɵdirectiveInject(i3.ActivatedRoute)); };
FileNormalComponent.ɵcmp = i0.ɵɵdefineComponent({ type: FileNormalComponent, selectors: [["app-file-normal"]], viewQuery: function FileNormalComponent_Query(rf, ctx) { if (rf & 1) {
        i0.ɵɵviewQuery(_c0, 1);
        i0.ɵɵviewQuery(_c1, 1);
        i0.ɵɵviewQuery(_c2, 1);
        i0.ɵɵviewQuery(_c3, 1);
    } if (rf & 2) {
        let _t;
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.fileOpenStatisticsComponent = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.fileTrackingIpComponent = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.fileTrackingOpenComponent = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.fileReportDateComponent = _t.first);
    } }, decls: 14, vars: 9, consts: [[1, "p-mt-2"], ["styleClass", "p-p-0"], [1, "p-toolbar-group-left", "p-field"], [3, "componentName", "returnRangeDates"], ["fileReportDateComponent", ""], [1, "p-toolbar-group-right", "p-field"], ["type", "button", "pRipple", "", "pButton", "", "icon", "fas fa-plus", 1, "p-button-raised", 3, "label", "click"], ["class", "p-mt-2 p-field", 4, "ngIf"], [1, "p-field", "p-col-12", "p-mt-2"], [3, "rangeDates", 4, "ngIf"], [1, "p-mt-2", "p-field"], [1, "p-d-flex", "p-jc-between"], [1, "p-text-bold", 3, "translate"], [3, "translate"], [3, "value"], ["height", "50vh", "type", "line", 3, "data", "options"], [3, "rangeDates"], ["fileTrackingIpComponent", ""]], template: function FileNormalComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵelementStart(1, "p-toolbar", 1);
        i0.ɵɵelementStart(2, "div", 2);
        i0.ɵɵelementStart(3, "app-file-report-date", 3, 4);
        i0.ɵɵlistener("returnRangeDates", function FileNormalComponent_Template_app_file_report_date_returnRangeDates_3_listener($event) { return ctx.returnRangeDates($event); });
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(5, "div", 5);
        i0.ɵɵelementStart(6, "button", 6);
        i0.ɵɵlistener("click", function FileNormalComponent_Template_button_click_6_listener() { return ctx.reloadPage(); });
        i0.ɵɵpipe(7, "titlecase");
        i0.ɵɵpipe(8, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(9, FileNormalComponent_div_9_Template, 8, 5, "div", 7);
        i0.ɵɵtemplate(10, FileNormalComponent_div_10_Template, 8, 5, "div", 7);
        i0.ɵɵelementStart(11, "div", 0);
        i0.ɵɵelementStart(12, "div", 8);
        i0.ɵɵtemplate(13, FileNormalComponent_app_file_tracking_ip_13_Template, 2, 1, "app-file-tracking-ip", 9);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("componentName", "file-normal");
        i0.ɵɵadvance(3);
        i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(7, 5, i0.ɵɵpipeBind1(8, 7, "label.create_report")));
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("ngIf", ctx.numberOfDownloads);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.numberOfViews);
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("ngIf", ctx.rangeDates);
    } }, directives: [i4.Toolbar, i5.FileReportDateComponent, i6.Ripple, i7.ButtonDirective, i8.NgIf, i1.TranslateDirective, i9.Badge, i10.UIChart, i11.FileTrackingIpComponent], pipes: [i8.TitleCasePipe, i1.TranslatePipe], styles: ["[_nghost-%COMP%]     .p-datatable-responsive-demo .p-datatable-tbody > tr > td .p-column-title {\n  display: none;\n}\n[_nghost-%COMP%]     .p-datatable .p-datatable-tbody > tr > td {\n  padding: 1.25rem 0 1.25rem 0.75rem;\n}\n@media screen and (max-width: 40rem) {\n  [_nghost-%COMP%]     .p-datatable.p-datatable-responsive-demo .p-datatable-thead > tr > th, [_nghost-%COMP%]     .p-datatable.p-datatable-responsive-demo .p-datatable-tfoot > tr > td {\n    display: none !important;\n  }\n  [_nghost-%COMP%]     .p-datatable.p-datatable-responsive-demo .p-datatable-tbody > tr > td {\n    text-align: left;\n    display: block;\n    width: 100%;\n    float: left;\n    clear: left;\n    border: 0 none;\n  }\n  [_nghost-%COMP%]     .p-datatable.p-datatable-responsive-demo .p-datatable-tbody > tr > td .p-column-title {\n    padding: 0.4rem;\n    min-width: 30%;\n    display: inline-block;\n    margin: -0.4em 1em -0.4em -0.4rem;\n    font-weight: bold;\n  }\n  [_nghost-%COMP%]     .p-datatable.p-datatable-responsive-demo .p-datatable-tbody > tr > td:last-child {\n    border-bottom: 1px solid var(--surface-d);\n  }\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvZmlsZS9maWxlLXJlcG9ydC9maWxlLW5vcm1hbC9maWxlLW5vcm1hbC5jb21wb25lbnQuc2NzcyIsInNyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvZmlsZS9maWxlLXJlcG9ydC9maWxlLW5vcm1hbC9maWxlLW5vcm1hbC5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDRTtFQUNFLGFBQUE7QUNBSjtBREVFO0VBQ0Usa0NBQUE7QUNBSjtBRElBO0VBSVE7O0lBRUUsd0JBQUE7RUNKUjtFRE9NO0lBQ0UsZ0JBQUE7SUFDQSxjQUFBO0lBQ0EsV0FBQTtJQUNBLFdBQUE7SUFDQSxXQUFBO0lBQ0EsY0FBQTtFQ0xSO0VET1E7SUFDRSxlQUFBO0lBQ0EsY0FBQTtJQUNBLHFCQUFBO0lBQ0EsaUNBQUE7SUFDQSxpQkFBQTtFQ0xWO0VEUVE7SUFDRSx5Q0FBQTtFQ05WO0FBQ0YiLCJmaWxlIjoic3JjL2FwcC9hdXRoZW50aWNhdGlvbi1wYWdlcy9maWxlL2ZpbGUtcmVwb3J0L2ZpbGUtbm9ybWFsL2ZpbGUtbm9ybWFsLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiOmhvc3QgOjpuZy1kZWVwIHtcbiAgLnAtZGF0YXRhYmxlLXJlc3BvbnNpdmUtZGVtbyAucC1kYXRhdGFibGUtdGJvZHkgPiB0ciA+IHRkIC5wLWNvbHVtbi10aXRsZSB7XG4gICAgZGlzcGxheTogbm9uZTtcbiAgfVxuICAucC1kYXRhdGFibGUgLnAtZGF0YXRhYmxlLXRib2R5ID4gdHIgPiB0ZCB7XG4gICAgcGFkZGluZzogMS4yNXJlbSAwIDEuMjVyZW0gMC43NXJlbTtcbiAgfVxufVxuXG5AbWVkaWEgc2NyZWVuIGFuZCAobWF4LXdpZHRoOiA0MHJlbSkge1xuICA6aG9zdCA6Om5nLWRlZXAge1xuICAgIC5wLWRhdGF0YWJsZSB7XG4gICAgICAmLnAtZGF0YXRhYmxlLXJlc3BvbnNpdmUtZGVtbyB7XG4gICAgICAgIC5wLWRhdGF0YWJsZS10aGVhZCA+IHRyID4gdGgsXG4gICAgICAgIC5wLWRhdGF0YWJsZS10Zm9vdCA+IHRyID4gdGQge1xuICAgICAgICAgIGRpc3BsYXk6IG5vbmUgIWltcG9ydGFudDtcbiAgICAgICAgfVxuXG4gICAgICAgIC5wLWRhdGF0YWJsZS10Ym9keSA+IHRyID4gdGQge1xuICAgICAgICAgIHRleHQtYWxpZ246IGxlZnQ7XG4gICAgICAgICAgZGlzcGxheTogYmxvY2s7XG4gICAgICAgICAgd2lkdGg6IDEwMCU7XG4gICAgICAgICAgZmxvYXQ6IGxlZnQ7XG4gICAgICAgICAgY2xlYXI6IGxlZnQ7XG4gICAgICAgICAgYm9yZGVyOiAwIG5vbmU7XG5cbiAgICAgICAgICAucC1jb2x1bW4tdGl0bGUge1xuICAgICAgICAgICAgcGFkZGluZzogLjRyZW07XG4gICAgICAgICAgICBtaW4td2lkdGg6IDMwJTtcbiAgICAgICAgICAgIGRpc3BsYXk6IGlubGluZS1ibG9jaztcbiAgICAgICAgICAgIG1hcmdpbjogLS40ZW0gMWVtIC0uNGVtIC0uNHJlbTtcbiAgICAgICAgICAgIGZvbnQtd2VpZ2h0OiBib2xkO1xuICAgICAgICAgIH1cblxuICAgICAgICAgICY6bGFzdC1jaGlsZCB7XG4gICAgICAgICAgICBib3JkZXItYm90dG9tOiAxcHggc29saWQgdmFyKC0tc3VyZmFjZS1kKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH1cbn1cbiIsIjpob3N0IDo6bmctZGVlcCAucC1kYXRhdGFibGUtcmVzcG9uc2l2ZS1kZW1vIC5wLWRhdGF0YWJsZS10Ym9keSA+IHRyID4gdGQgLnAtY29sdW1uLXRpdGxlIHtcbiAgZGlzcGxheTogbm9uZTtcbn1cbjpob3N0IDo6bmctZGVlcCAucC1kYXRhdGFibGUgLnAtZGF0YXRhYmxlLXRib2R5ID4gdHIgPiB0ZCB7XG4gIHBhZGRpbmc6IDEuMjVyZW0gMCAxLjI1cmVtIDAuNzVyZW07XG59XG5cbkBtZWRpYSBzY3JlZW4gYW5kIChtYXgtd2lkdGg6IDQwcmVtKSB7XG4gIDpob3N0IDo6bmctZGVlcCAucC1kYXRhdGFibGUucC1kYXRhdGFibGUtcmVzcG9uc2l2ZS1kZW1vIC5wLWRhdGF0YWJsZS10aGVhZCA+IHRyID4gdGgsXG46aG9zdCA6Om5nLWRlZXAgLnAtZGF0YXRhYmxlLnAtZGF0YXRhYmxlLXJlc3BvbnNpdmUtZGVtbyAucC1kYXRhdGFibGUtdGZvb3QgPiB0ciA+IHRkIHtcbiAgICBkaXNwbGF5OiBub25lICFpbXBvcnRhbnQ7XG4gIH1cbiAgOmhvc3QgOjpuZy1kZWVwIC5wLWRhdGF0YWJsZS5wLWRhdGF0YWJsZS1yZXNwb25zaXZlLWRlbW8gLnAtZGF0YXRhYmxlLXRib2R5ID4gdHIgPiB0ZCB7XG4gICAgdGV4dC1hbGlnbjogbGVmdDtcbiAgICBkaXNwbGF5OiBibG9jaztcbiAgICB3aWR0aDogMTAwJTtcbiAgICBmbG9hdDogbGVmdDtcbiAgICBjbGVhcjogbGVmdDtcbiAgICBib3JkZXI6IDAgbm9uZTtcbiAgfVxuICA6aG9zdCA6Om5nLWRlZXAgLnAtZGF0YXRhYmxlLnAtZGF0YXRhYmxlLXJlc3BvbnNpdmUtZGVtbyAucC1kYXRhdGFibGUtdGJvZHkgPiB0ciA+IHRkIC5wLWNvbHVtbi10aXRsZSB7XG4gICAgcGFkZGluZzogMC40cmVtO1xuICAgIG1pbi13aWR0aDogMzAlO1xuICAgIGRpc3BsYXk6IGlubGluZS1ibG9jaztcbiAgICBtYXJnaW46IC0wLjRlbSAxZW0gLTAuNGVtIC0wLjRyZW07XG4gICAgZm9udC13ZWlnaHQ6IGJvbGQ7XG4gIH1cbiAgOmhvc3QgOjpuZy1kZWVwIC5wLWRhdGF0YWJsZS5wLWRhdGF0YWJsZS1yZXNwb25zaXZlLWRlbW8gLnAtZGF0YXRhYmxlLXRib2R5ID4gdHIgPiB0ZDpsYXN0LWNoaWxkIHtcbiAgICBib3JkZXItYm90dG9tOiAxcHggc29saWQgdmFyKC0tc3VyZmFjZS1kKTtcbiAgfVxufSJdfQ== */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FileNormalComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-file-normal',
                templateUrl: './file-normal.component.html',
                styleUrls: ['./file-normal.component.scss']
            }]
    }], function () { return [{ type: i1.TranslateService }, { type: i2.FileReportService }, { type: i3.ActivatedRoute }]; }, { fileOpenStatisticsComponent: [{
            type: core_1.ViewChild,
            args: ['fileOpenStatisticsComponent']
        }], fileTrackingIpComponent: [{
            type: core_1.ViewChild,
            args: ['fileTrackingIpComponent']
        }], fileTrackingOpenComponent: [{
            type: core_1.ViewChild,
            args: ['fileTrackingOpenComponent']
        }], fileReportDateComponent: [{
            type: core_1.ViewChild,
            args: ['fileReportDateComponent']
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/file/file-report/file-open-statistics/file-open-statistics.component.ts":
/*!**************************************************************************************************************!*\
  !*** ./src/app/authentication-pages/file/file-report/file-open-statistics/file-open-statistics.component.ts ***!
  \**************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.FileOpenStatisticsComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const moment_1 = tslib_1.__importDefault(__webpack_require__(/*! moment */ "./node_modules/moment/moment.js"));
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! ../../../../services/file.service */ "./src/app/services/file.service.ts"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! ../../../../services/file-report.service */ "./src/app/services/file-report.service.ts"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! primeng/badge */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-badge.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! primeng/chart */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-chart.js"));
function FileOpenStatisticsComponent_p_chart_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "p-chart", 9);
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵproperty("data", ctx_r0.docData)("options", ctx_r0.basicOptions);
} }
class FileOpenStatisticsComponent {
    constructor(translateService, datePipe, route, fileService, fileReportService) {
        this.translateService = translateService;
        this.datePipe = datePipe;
        this.route = route;
        this.fileService = fileService;
        this.fileReportService = fileReportService;
        this.typeReport = 'internal';
        this.appUtil = app_util_1.default;
        this.constant = app_constants_1.default;
        this.getStatisticParams = {
            projectId: '',
            folderId: '',
            sDate: '',
            eDate: '',
            type: '',
        };
    }
    ngOnInit() {
        this.projectId = this.route.snapshot.paramMap.get('projectId');
        this.folderId = this.route.snapshot.paramMap.get('folderId');
        this.fileId = this.route.snapshot.paramMap.get('fileId');
        this.type = this.route.snapshot.paramMap.get('type');
        this.getStatisticParams.projectId = this.projectId;
        this.getStatisticParams.folderId = this.folderId;
        this.getStatisticParams.type = this.type;
        this.basicOptions = {
            legend: {
                labels: {
                    fontColor: '#495057'
                }
            },
            scales: {
                xAxes: [{
                        ticks: {
                            fontColor: '#495057'
                        },
                        gridLines: {
                            display: false,
                        }
                    }],
                yAxes: [{
                        display: true,
                        scaleLabel: {
                            display: true,
                            labelString: this.appUtil.translate(this.translateService, 'label.number_of_times_opened'),
                            fontColor: '#495057',
                            fontSize: 12
                        },
                        position: 'left',
                        ticks: {
                            fontColor: '#495057',
                            min: 0,
                            max: 4,
                            stepSize: 1,
                        }
                    }]
            }
        };
        this.getDataOpenStatistics();
    }
    // Get Document/OS open statistics
    getDataOpenStatistics() {
        this.getStatisticParams.sDate = moment_1.default(this.rangeDates[0]).format('YYYY/MM/DD 00:00:00');
        this.getStatisticParams.eDate = moment_1.default(this.rangeDates[1]).format('YYYY/MM/DD 23:59:59');
        switch (this.typeReport) {
            case 'external':
                this.getReportExternalFiles();
                break;
            case 'internal':
                this.getReportInternalFiles();
                break;
        }
    }
    // Get Report External files
    getReportExternalFiles() {
        this.fileReportService.getReportExternalFiles(this.fileId, this.appUtil.toSnakeCaseKey(this.getStatisticParams)).subscribe(res => {
            if (res.status === 200) {
                this.handleData(res.data);
            }
        });
    }
    // Get Report Internal files
    getReportInternalFiles() {
        this.fileReportService.getReportInternalFiles(this.fileId, this.appUtil.toSnakeCaseKey(this.getStatisticParams)).subscribe(res => {
            if (res.status === 200) {
                this.handleData(res.data);
            }
            else {
                if (res.status === 403) {
                    window.history.back();
                }
            }
        });
    }
    handleData(data) {
        this.totalOpened = data.fileStatistic.totalOpened;
        this.docData = {
            labels: data.fileUserStatistic.map(x => x.email),
            datasets: [
                {
                    label: this.appUtil.translate(this.translateService, 'label.opened'),
                    backgroundColor: '#2196F3',
                    data: data.fileUserStatistic.map(x => x.totalOpened)
                }
            ]
        };
        this.osData = {
            labels: [
                this.appUtil.translate(this.translateService, 'label.android'),
                this.appUtil.translate(this.translateService, 'label.ios'),
                this.appUtil.translate(this.translateService, 'label.mac'),
                this.appUtil.translate(this.translateService, 'label.undetectable'),
                this.appUtil.translate(this.translateService, 'label.window')
            ],
            datasets: [
                {
                    data: [
                        data.fileStatistic.totalOpenedAndroid,
                        data.fileStatistic.totalOpenedIos,
                        data.fileStatistic.totalOpenedMac,
                        data.fileStatistic.totalOpenedUndetectable,
                        data.fileStatistic.totalOpenedWin
                    ],
                    backgroundColor: [
                        '#FF6384',
                        '#36A2EB',
                        '#FFCE56',
                        '#90EE90',
                        '#FFDEAD'
                    ],
                    hoverBackgroundColor: [
                        '#FF6384',
                        '#36A2EB',
                        '#FFCE56',
                        '#90EE90',
                        '#FFDEAD'
                    ]
                }
            ]
        };
        if (this.docData.datasets[0].data.findIndex(d => d > 0) !== -1) {
            this.basicOptions.scales.yAxes[0].ticks = {
                fontColor: '#495057',
                max: Math.max(...this.docData.datasets[0].data) + 2,
            };
            if (Math.max(...this.docData.datasets[0].data) < 8) {
                this.basicOptions.scales.yAxes[0].ticks = {
                    fontColor: '#495057',
                    min: 0,
                    max: Math.max(...this.docData.datasets[0].data) + 2,
                    stepSize: 1
                };
            }
        }
    }
}
exports.FileOpenStatisticsComponent = FileOpenStatisticsComponent;
FileOpenStatisticsComponent.ɵfac = function FileOpenStatisticsComponent_Factory(t) { return new (t || FileOpenStatisticsComponent)(i0.ɵɵdirectiveInject(i1.TranslateService), i0.ɵɵdirectiveInject(i2.DatePipe), i0.ɵɵdirectiveInject(i3.ActivatedRoute), i0.ɵɵdirectiveInject(i4.FileService), i0.ɵɵdirectiveInject(i5.FileReportService)); };
FileOpenStatisticsComponent.ɵcmp = i0.ɵɵdefineComponent({ type: FileOpenStatisticsComponent, selectors: [["app-file-open-statistics"]], inputs: { typeReport: "typeReport", rangeDates: "rangeDates" }, decls: 12, vars: 6, consts: [[1, "p-field"], [1, "p-d-flex", "p-jc-between", "p-mb-2"], [1, "p-text-bold", 3, "translate"], ["height", "50vh", "type", "bar", 3, "data", "options", 4, "ngIf"], [1, "p-col-12", "p-mt-4"], [1, "p-d-flex", "p-jc-between"], [3, "translate"], [3, "value"], ["height", "50vh", "type", "pie", 3, "data"], ["height", "50vh", "type", "bar", 3, "data", "options"]], template: function FileOpenStatisticsComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵelement(2, "span", 2);
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(3, FileOpenStatisticsComponent_p_chart_3_Template, 1, 2, "p-chart", 3);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(4, "div", 4);
        i0.ɵɵelementStart(5, "div", 5);
        i0.ɵɵelement(6, "span", 2);
        i0.ɵɵelementStart(7, "div");
        i0.ɵɵelement(8, "small", 6);
        i0.ɵɵtext(9, ": ");
        i0.ɵɵelement(10, "p-badge", 7);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelement(11, "p-chart", 8);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("translate", "label.document_open_statistics");
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.docData);
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("translate", "label.os_open_statistics");
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("translate", "label.total_of_times_opened");
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("value", ctx.totalOpened);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("data", ctx.osData);
    } }, directives: [i1.TranslateDirective, i2.NgIf, i6.Badge, i7.UIChart], styles: ["[_nghost-%COMP%]     .p-datatable-responsive-demo .p-datatable-tbody > tr > td .p-column-title {\n  display: none;\n}\n[_nghost-%COMP%]     .p-note-custom {\n  background-color: #dddddd;\n  height: 50px;\n  padding-top: 20px;\n}\n[_nghost-%COMP%]     .p-datatable .p-datatable-header {\n  padding-bottom: 0;\n}\n@media screen and (max-width: 40rem) {\n  [_nghost-%COMP%]     .p-datatable.p-datatable-responsive-demo .p-datatable-thead > tr > th, [_nghost-%COMP%]     .p-datatable.p-datatable-responsive-demo .p-datatable-tfoot > tr > td {\n    display: none !important;\n  }\n  [_nghost-%COMP%]     .p-datatable.p-datatable-responsive-demo .p-datatable-tbody > tr > td {\n    text-align: left;\n    display: block;\n    width: 100%;\n    float: left;\n    clear: left;\n    border: 0 none;\n  }\n  [_nghost-%COMP%]     .p-datatable.p-datatable-responsive-demo .p-datatable-tbody > tr > td .p-column-title {\n    padding: 0.4rem;\n    min-width: 30%;\n    display: inline-block;\n    margin: -0.4em 1em -0.4em -0.4rem;\n    font-weight: bold;\n  }\n  [_nghost-%COMP%]     .p-datatable.p-datatable-responsive-demo .p-datatable-tbody > tr > td:last-child {\n    border-bottom: 1px solid var(--surface-d);\n  }\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvZmlsZS9maWxlLXJlcG9ydC9maWxlLW9wZW4tc3RhdGlzdGljcy9maWxlLW9wZW4tc3RhdGlzdGljcy5jb21wb25lbnQuc2NzcyIsInNyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvZmlsZS9maWxlLXJlcG9ydC9maWxlLW9wZW4tc3RhdGlzdGljcy9maWxlLW9wZW4tc3RhdGlzdGljcy5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDRTtFQUNFLGFBQUE7QUNBSjtBREVFO0VBQ0UseUJBQUE7RUFDQSxZQUFBO0VBQ0EsaUJBQUE7QUNBSjtBREVFO0VBQ0UsaUJBQUE7QUNBSjtBRElBO0VBSVE7O0lBRUUsd0JBQUE7RUNKUjtFRE9NO0lBQ0UsZ0JBQUE7SUFDQSxjQUFBO0lBQ0EsV0FBQTtJQUNBLFdBQUE7SUFDQSxXQUFBO0lBQ0EsY0FBQTtFQ0xSO0VET1E7SUFDRSxlQUFBO0lBQ0EsY0FBQTtJQUNBLHFCQUFBO0lBQ0EsaUNBQUE7SUFDQSxpQkFBQTtFQ0xWO0VEUVE7SUFDRSx5Q0FBQTtFQ05WO0FBQ0YiLCJmaWxlIjoic3JjL2FwcC9hdXRoZW50aWNhdGlvbi1wYWdlcy9maWxlL2ZpbGUtcmVwb3J0L2ZpbGUtb3Blbi1zdGF0aXN0aWNzL2ZpbGUtb3Blbi1zdGF0aXN0aWNzLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiOmhvc3QgOjpuZy1kZWVwIHtcbiAgLnAtZGF0YXRhYmxlLXJlc3BvbnNpdmUtZGVtbyAucC1kYXRhdGFibGUtdGJvZHkgPiB0ciA+IHRkIC5wLWNvbHVtbi10aXRsZSB7XG4gICAgZGlzcGxheTogbm9uZTtcbiAgfVxuICAucC1ub3RlLWN1c3RvbSB7XG4gICAgYmFja2dyb3VuZC1jb2xvcjogI2RkZGRkZDtcbiAgICBoZWlnaHQ6IDUwcHg7XG4gICAgcGFkZGluZy10b3A6IDIwcHg7XG4gIH1cbiAgLnAtZGF0YXRhYmxlIC5wLWRhdGF0YWJsZS1oZWFkZXIge1xuICAgIHBhZGRpbmctYm90dG9tOiAwO1xuICB9XG59XG5cbkBtZWRpYSBzY3JlZW4gYW5kIChtYXgtd2lkdGg6IDQwcmVtKSB7XG4gIDpob3N0IDo6bmctZGVlcCB7XG4gICAgLnAtZGF0YXRhYmxlIHtcbiAgICAgICYucC1kYXRhdGFibGUtcmVzcG9uc2l2ZS1kZW1vIHtcbiAgICAgICAgLnAtZGF0YXRhYmxlLXRoZWFkID4gdHIgPiB0aCxcbiAgICAgICAgLnAtZGF0YXRhYmxlLXRmb290ID4gdHIgPiB0ZCB7XG4gICAgICAgICAgZGlzcGxheTogbm9uZSAhaW1wb3J0YW50O1xuICAgICAgICB9XG5cbiAgICAgICAgLnAtZGF0YXRhYmxlLXRib2R5ID4gdHIgPiB0ZCB7XG4gICAgICAgICAgdGV4dC1hbGlnbjogbGVmdDtcbiAgICAgICAgICBkaXNwbGF5OiBibG9jaztcbiAgICAgICAgICB3aWR0aDogMTAwJTtcbiAgICAgICAgICBmbG9hdDogbGVmdDtcbiAgICAgICAgICBjbGVhcjogbGVmdDtcbiAgICAgICAgICBib3JkZXI6IDAgbm9uZTtcblxuICAgICAgICAgIC5wLWNvbHVtbi10aXRsZSB7XG4gICAgICAgICAgICBwYWRkaW5nOiAuNHJlbTtcbiAgICAgICAgICAgIG1pbi13aWR0aDogMzAlO1xuICAgICAgICAgICAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xuICAgICAgICAgICAgbWFyZ2luOiAtLjRlbSAxZW0gLS40ZW0gLS40cmVtO1xuICAgICAgICAgICAgZm9udC13ZWlnaHQ6IGJvbGQ7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgJjpsYXN0LWNoaWxkIHtcbiAgICAgICAgICAgIGJvcmRlci1ib3R0b206IDFweCBzb2xpZCB2YXIoLS1zdXJmYWNlLWQpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgfVxufVxuIiwiOmhvc3QgOjpuZy1kZWVwIC5wLWRhdGF0YWJsZS1yZXNwb25zaXZlLWRlbW8gLnAtZGF0YXRhYmxlLXRib2R5ID4gdHIgPiB0ZCAucC1jb2x1bW4tdGl0bGUge1xuICBkaXNwbGF5OiBub25lO1xufVxuOmhvc3QgOjpuZy1kZWVwIC5wLW5vdGUtY3VzdG9tIHtcbiAgYmFja2dyb3VuZC1jb2xvcjogI2RkZGRkZDtcbiAgaGVpZ2h0OiA1MHB4O1xuICBwYWRkaW5nLXRvcDogMjBweDtcbn1cbjpob3N0IDo6bmctZGVlcCAucC1kYXRhdGFibGUgLnAtZGF0YXRhYmxlLWhlYWRlciB7XG4gIHBhZGRpbmctYm90dG9tOiAwO1xufVxuXG5AbWVkaWEgc2NyZWVuIGFuZCAobWF4LXdpZHRoOiA0MHJlbSkge1xuICA6aG9zdCA6Om5nLWRlZXAgLnAtZGF0YXRhYmxlLnAtZGF0YXRhYmxlLXJlc3BvbnNpdmUtZGVtbyAucC1kYXRhdGFibGUtdGhlYWQgPiB0ciA+IHRoLFxuOmhvc3QgOjpuZy1kZWVwIC5wLWRhdGF0YWJsZS5wLWRhdGF0YWJsZS1yZXNwb25zaXZlLWRlbW8gLnAtZGF0YXRhYmxlLXRmb290ID4gdHIgPiB0ZCB7XG4gICAgZGlzcGxheTogbm9uZSAhaW1wb3J0YW50O1xuICB9XG4gIDpob3N0IDo6bmctZGVlcCAucC1kYXRhdGFibGUucC1kYXRhdGFibGUtcmVzcG9uc2l2ZS1kZW1vIC5wLWRhdGF0YWJsZS10Ym9keSA+IHRyID4gdGQge1xuICAgIHRleHQtYWxpZ246IGxlZnQ7XG4gICAgZGlzcGxheTogYmxvY2s7XG4gICAgd2lkdGg6IDEwMCU7XG4gICAgZmxvYXQ6IGxlZnQ7XG4gICAgY2xlYXI6IGxlZnQ7XG4gICAgYm9yZGVyOiAwIG5vbmU7XG4gIH1cbiAgOmhvc3QgOjpuZy1kZWVwIC5wLWRhdGF0YWJsZS5wLWRhdGF0YWJsZS1yZXNwb25zaXZlLWRlbW8gLnAtZGF0YXRhYmxlLXRib2R5ID4gdHIgPiB0ZCAucC1jb2x1bW4tdGl0bGUge1xuICAgIHBhZGRpbmc6IDAuNHJlbTtcbiAgICBtaW4td2lkdGg6IDMwJTtcbiAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG4gICAgbWFyZ2luOiAtMC40ZW0gMWVtIC0wLjRlbSAtMC40cmVtO1xuICAgIGZvbnQtd2VpZ2h0OiBib2xkO1xuICB9XG4gIDpob3N0IDo6bmctZGVlcCAucC1kYXRhdGFibGUucC1kYXRhdGFibGUtcmVzcG9uc2l2ZS1kZW1vIC5wLWRhdGF0YWJsZS10Ym9keSA+IHRyID4gdGQ6bGFzdC1jaGlsZCB7XG4gICAgYm9yZGVyLWJvdHRvbTogMXB4IHNvbGlkIHZhcigtLXN1cmZhY2UtZCk7XG4gIH1cbn0iXX0= */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FileOpenStatisticsComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-file-open-statistics',
                templateUrl: './file-open-statistics.component.html',
                styleUrls: ['./file-open-statistics.component.scss']
            }]
    }], function () { return [{ type: i1.TranslateService }, { type: i2.DatePipe }, { type: i3.ActivatedRoute }, { type: i4.FileService }, { type: i5.FileReportService }]; }, { typeReport: [{
            type: core_1.Input
        }], rangeDates: [{
            type: core_1.Input
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/file/file-report/file-path/file-path.component.ts":
/*!****************************************************************************************!*\
  !*** ./src/app/authentication-pages/file/file-report/file-path/file-path.component.ts ***!
  \****************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.FilePathComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! ../../../../services/file.service */ "./src/app/services/file.service.ts"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! ../../../../services/project.service */ "./src/app/services/project.service.ts"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! ../../../../services/folder.service */ "./src/app/services/folder.service.ts"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! primeng/breadcrumb */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-breadcrumb.js"));
function FilePathComponent_p_breadcrumb_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "p-breadcrumb", 1);
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵproperty("model", ctx_r0.items);
} }
class FilePathComponent {
    constructor(route, router, translateService, fileService, projectService, folderService) {
        this.route = route;
        this.router = router;
        this.translateService = translateService;
        this.fileService = fileService;
        this.projectService = projectService;
        this.folderService = folderService;
        this.appUtil = app_util_1.default;
    }
    ngOnInit() {
        this.projectId = this.route.snapshot.paramMap.get('projectId');
        this.folderId = this.route.snapshot.paramMap.get('folderId');
        this.itemsTemp = [
            { label: this.appUtil.translate(this.translateService, 'label.all_project'), routerLink: [`/project`] }
        ];
        this.getProjectDetail();
    }
    // Get detail project
    getProjectDetail() {
        this.projectService.getProjectDetail(this.projectId).subscribe(res => {
            if (res.status === 200) {
                this.itemsTemp = [...this.itemsTemp, {
                        label: res.data.name, routerLink: [`/project/${this.projectId}/0`]
                    }];
                this.getPath();
            }
        });
    }
    getPath() {
        const paramsPF = {
            projectId: this.projectId,
            folderId: this.folderId,
        };
        this.folderService.getPath(this.appUtil.toSnakeCaseKey(paramsPF)).subscribe(res => {
            if (res.status === 200) {
                const path = res.data;
                if (this.folderId !== '0' && path.length !== 0) {
                    for (const item of path) {
                        this.handleChildItems(item);
                    }
                }
                this.getFolderDetail();
            }
        });
    }
    // Get detail folder
    getFolderDetail() {
        const paramsPF = {
            projectId: this.projectId,
            folderId: this.folderId
        };
        this.folderService.getFolder(this.appUtil.toSnakeCaseKey(paramsPF)).subscribe(res => {
            if (res.status === 200) {
                const folder = res.data.folder;
                this.handleChildItems(folder);
                this.itemsTemp = [...this.itemsTemp, { label: this.fileTitle }];
                this.items = this.itemsTemp;
            }
        });
    }
    handleChildItems(folder) {
        if (!folder.parentFolderId) { // root folder
            return;
        }
        this.itemsTemp = [...this.itemsTemp, {
                id: folder.folderId,
                label: folder.name,
                routerLink: [`/project/${this.projectId}/${folder.folderId}`],
                command: () => {
                    const currentUrl = `/project/${this.projectId}/${folder.folderId}`;
                    this.router.routeReuseStrategy.shouldReuseRoute = () => false;
                    this.router.onSameUrlNavigation = 'reload';
                    this.router.navigate([currentUrl]);
                }
            }];
    }
}
exports.FilePathComponent = FilePathComponent;
FilePathComponent.ɵfac = function FilePathComponent_Factory(t) { return new (t || FilePathComponent)(i0.ɵɵdirectiveInject(i1.ActivatedRoute), i0.ɵɵdirectiveInject(i1.Router), i0.ɵɵdirectiveInject(i2.TranslateService), i0.ɵɵdirectiveInject(i3.FileService), i0.ɵɵdirectiveInject(i4.ProjectService), i0.ɵɵdirectiveInject(i5.FolderService)); };
FilePathComponent.ɵcmp = i0.ɵɵdefineComponent({ type: FilePathComponent, selectors: [["app-file-path"]], inputs: { fileTitle: "fileTitle" }, decls: 1, vars: 1, consts: [[3, "model", 4, "ngIf"], [3, "model"]], template: function FilePathComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵtemplate(0, FilePathComponent_p_breadcrumb_0_Template, 1, 1, "p-breadcrumb", 0);
    } if (rf & 2) {
        i0.ɵɵproperty("ngIf", ctx.items);
    } }, directives: [i6.NgIf, i7.Breadcrumb], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2ZpbGUvZmlsZS1yZXBvcnQvZmlsZS1wYXRoL2ZpbGUtcGF0aC5jb21wb25lbnQuc2NzcyJ9 */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FilePathComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-file-path',
                templateUrl: './file-path.component.html',
                styleUrls: ['./file-path.component.scss']
            }]
    }], function () { return [{ type: i1.ActivatedRoute }, { type: i1.Router }, { type: i2.TranslateService }, { type: i3.FileService }, { type: i4.ProjectService }, { type: i5.FolderService }]; }, { fileTitle: [{
            type: core_1.Input
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/file/file-report/file-report-date/file-report-date.component.ts":
/*!******************************************************************************************************!*\
  !*** ./src/app/authentication-pages/file/file-report/file-report-date/file-report-date.component.ts ***!
  \******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.FileReportDateComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! primeng/calendar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-calendar.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
function FileReportDateComponent_small_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.require"), " ");
} }
function FileReportDateComponent_small_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "error.invalid_date"), " ");
} }
class FileReportDateComponent {
    constructor() {
        this.util = app_util_1.default;
        this.returnRangeDates = new core_1.EventEmitter();
        this.rangeDates = [];
        this.maxDate = new Date();
        this.isInvalidRangeDate = false;
    }
    ngOnInit() {
        this.defaultRangeDates();
    }
    // Get range 2 weeks
    defaultRangeDates() {
        const today = new Date();
        const lastMonth = new Date(today.getFullYear(), today.getMonth(), 0);
        this.rangeDates = [lastMonth, new Date()];
    }
    onChangeRangeDates(event) {
        if (this.rangeDates && event[0] && event[1]) {
            // Set default 90 days
            if (this.util.calc2Date(event[0], event[1]) > 89) {
                this.rangeDates = [event[0], this.util.addDays(event[0], 89)];
            }
            // Set default date now
            if (this.util.calc2Date(new Date(), event[1]) > 0) {
                this.rangeDates[1] = new Date();
            }
            // check startDate > endDate
            this.isInvalidRangeDate = (this.util.calc2Date(event[0], event[1]) < 0);
        }
        this.returnRangeDates.emit(this.rangeDates);
    }
}
exports.FileReportDateComponent = FileReportDateComponent;
FileReportDateComponent.ɵfac = function FileReportDateComponent_Factory(t) { return new (t || FileReportDateComponent)(); };
FileReportDateComponent.ɵcmp = i0.ɵɵdefineComponent({ type: FileReportDateComponent, selectors: [["app-file-report-date"]], inputs: { componentName: "componentName" }, outputs: { returnRangeDates: "returnRangeDates" }, decls: 6, vars: 9, consts: [[1, "p-float-label"], ["selectionMode", "range", "id", "range", "required", "", 1, "placeholder-custom", 3, "ngModel", "maxDate", "showIcon", "placeholder", "ngModelChange"], ["for", "range", 1, "p-text-secondary", "required", 3, "translate"], [1, "p-error"], [4, "ngIf"]], template: function FileReportDateComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "span", 0);
        i0.ɵɵelementStart(1, "p-calendar", 1);
        i0.ɵɵlistener("ngModelChange", function FileReportDateComponent_Template_p_calendar_ngModelChange_1_listener($event) { return ctx.rangeDates = $event; })("ngModelChange", function FileReportDateComponent_Template_p_calendar_ngModelChange_1_listener($event) { return ctx.onChangeRangeDates($event); });
        i0.ɵɵelementEnd();
        i0.ɵɵelement(2, "label", 2);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(3, "div", 3);
        i0.ɵɵtemplate(4, FileReportDateComponent_small_4_Template, 3, 3, "small", 4);
        i0.ɵɵtemplate(5, FileReportDateComponent_small_5_Template, 3, 3, "small", 4);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵadvance(1);
        i0.ɵɵclassProp("ng-invalid", !ctx.rangeDates || ctx.rangeDates && (!ctx.rangeDates[0] || !ctx.rangeDates[1]) || ctx.isInvalidRangeDate);
        i0.ɵɵproperty("ngModel", ctx.rangeDates)("maxDate", ctx.maxDate)("showIcon", true)("placeholder", "mm/dd/yyyy - mm/dd/yyyy");
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("translate", "label.start_end_date");
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", !ctx.rangeDates);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.rangeDates && (!ctx.rangeDates[0] || !ctx.rangeDates[1] || ctx.isInvalidRangeDate));
    } }, directives: [i1.Calendar, i2.RequiredValidator, i2.NgControlStatus, i2.NgModel, i3.TranslateDirective, i4.NgIf], pipes: [i3.TranslatePipe], styles: ["[_nghost-%COMP%]  .placeholder-custom .p-calendar .p-inputtext::placeholder {\n  color: transparent;\n}\n[_nghost-%COMP%]  .placeholder-custom .p-calendar .p-inputtext:focus::placeholder {\n  color: gray;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvZmlsZS9maWxlLXJlcG9ydC9maWxlLXJlcG9ydC1kYXRlL2ZpbGUtcmVwb3J0LWRhdGUuY29tcG9uZW50LnNjc3MiLCJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2ZpbGUvZmlsZS1yZXBvcnQvZmlsZS1yZXBvcnQtZGF0ZS9maWxlLXJlcG9ydC1kYXRlLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNFO0VBQ0Usa0JBQUE7QUNBSjtBREdFO0VBQ0UsV0FBQTtBQ0RKIiwiZmlsZSI6InNyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvZmlsZS9maWxlLXJlcG9ydC9maWxlLXJlcG9ydC1kYXRlL2ZpbGUtcmVwb3J0LWRhdGUuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyI6aG9zdCg6Om5nLWRlZXApIHtcbiAgLnBsYWNlaG9sZGVyLWN1c3RvbSAucC1jYWxlbmRhciAucC1pbnB1dHRleHQ6OnBsYWNlaG9sZGVyIHtcbiAgICBjb2xvcjogdHJhbnNwYXJlbnQ7XG4gIH1cblxuICAucGxhY2Vob2xkZXItY3VzdG9tIC5wLWNhbGVuZGFyIC5wLWlucHV0dGV4dDpmb2N1czo6cGxhY2Vob2xkZXIge1xuICAgIGNvbG9yOiBncmF5O1xuICB9XG59XG4iLCI6aG9zdCg6Om5nLWRlZXApIC5wbGFjZWhvbGRlci1jdXN0b20gLnAtY2FsZW5kYXIgLnAtaW5wdXR0ZXh0OjpwbGFjZWhvbGRlciB7XG4gIGNvbG9yOiB0cmFuc3BhcmVudDtcbn1cbjpob3N0KDo6bmctZGVlcCkgLnBsYWNlaG9sZGVyLWN1c3RvbSAucC1jYWxlbmRhciAucC1pbnB1dHRleHQ6Zm9jdXM6OnBsYWNlaG9sZGVyIHtcbiAgY29sb3I6IGdyYXk7XG59Il19 */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FileReportDateComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-file-report-date',
                templateUrl: './file-report-date.component.html',
                styleUrls: ['./file-report-date.component.scss']
            }]
    }], function () { return []; }, { componentName: [{
            type: core_1.Input
        }], returnRangeDates: [{
            type: core_1.Output
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/file/file-report/file-report.component.ts":
/*!********************************************************************************!*\
  !*** ./src/app/authentication-pages/file/file-report/file-report.component.ts ***!
  \********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.FileReportComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const app_constants_1 = __webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/__ivy_ngcc__/fesm2015/platform-browser.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/folder.service */ "./src/app/services/folder.service.ts"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/file.service */ "./src/app/services/file.service.ts"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! primeng/tabview */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-tabview.js"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! ./file-internal/file-internal.component */ "./src/app/authentication-pages/file/file-report/file-internal/file-internal.component.ts"));
const i10 = tslib_1.__importStar(__webpack_require__(/*! ./file-path/file-path.component */ "./src/app/authentication-pages/file/file-report/file-path/file-path.component.ts"));
const i11 = tslib_1.__importStar(__webpack_require__(/*! ./file-external/file-external.component */ "./src/app/authentication-pages/file/file-report/file-external/file-external.component.ts"));
const i12 = tslib_1.__importStar(__webpack_require__(/*! ./file-normal/file-normal.component */ "./src/app/authentication-pages/file/file-report/file-normal/file-normal.component.ts"));
const _c0 = ["fileInternalComponent"];
const _c1 = ["fileExternalComponent"];
function FileReportComponent_div_4_ng_template_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 8);
    i0.ɵɵelementStart(1, "span");
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, "label.internal_team_tracking"));
} }
function FileReportComponent_div_4_div_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 9);
    i0.ɵɵelement(1, "app-file-path", 10);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r4 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("fileTitle", ctx_r4.fileData.file.title);
} }
function FileReportComponent_div_4_p_tabPanel_7_ng_template_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 12);
    i0.ɵɵelementStart(1, "span");
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, "label.external_team_tracking"));
} }
function FileReportComponent_div_4_p_tabPanel_7_div_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 9);
    i0.ɵɵelement(1, "app-file-path", 10);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r8 = i0.ɵɵnextContext(3);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("fileTitle", ctx_r8.fileData.file.title);
} }
function FileReportComponent_div_4_p_tabPanel_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "p-tabPanel");
    i0.ɵɵtemplate(1, FileReportComponent_div_4_p_tabPanel_7_ng_template_1_Template, 4, 3, "ng-template", 4);
    i0.ɵɵtemplate(2, FileReportComponent_div_4_p_tabPanel_7_div_2_Template, 2, 1, "div", 5);
    i0.ɵɵelement(3, "app-file-external", null, 11);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r6 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r6.fileData);
} }
function FileReportComponent_div_4_Template(rf, ctx) { if (rf & 1) {
    const _r11 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelementStart(1, "p-tabView", 3);
    i0.ɵɵlistener("onChange", function FileReportComponent_div_4_Template_p_tabView_onChange_1_listener($event) { i0.ɵɵrestoreView(_r11); const ctx_r10 = i0.ɵɵnextContext(); return ctx_r10.handleChange($event); });
    i0.ɵɵelementStart(2, "p-tabPanel");
    i0.ɵɵtemplate(3, FileReportComponent_div_4_ng_template_3_Template, 4, 3, "ng-template", 4);
    i0.ɵɵtemplate(4, FileReportComponent_div_4_div_4_Template, 2, 1, "div", 5);
    i0.ɵɵelement(5, "app-file-internal", null, 6);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(7, FileReportComponent_div_4_p_tabPanel_7_Template, 5, 1, "p-tabPanel", 7);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("ngIf", ctx_r0.fileData);
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("ngIf", ctx_r0.userFolderRole !== ctx_r0.projectRole.ViewerUploader);
} }
function FileReportComponent_ng_template_5_div_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 9);
    i0.ɵɵelement(1, "app-file-path", 10);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r12 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("fileTitle", ctx_r12.fileData.file.title);
} }
function FileReportComponent_ng_template_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, FileReportComponent_ng_template_5_div_0_Template, 2, 1, "div", 5);
    i0.ɵɵelement(1, "app-file-normal");
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵproperty("ngIf", ctx_r2.fileData);
} }
class FileReportComponent {
    constructor(titleService, route, router, messageService, translateService, folderService, fileService) {
        this.titleService = titleService;
        this.route = route;
        this.router = router;
        this.messageService = messageService;
        this.translateService = translateService;
        this.folderService = folderService;
        this.fileService = fileService;
        this.appUtil = app_util_1.default;
        this.projectRole = app_constants_1.ProjectRole;
        this.translateService.get(['page_title.view_file_report']).subscribe(translation => {
            this.titleService.setTitle(translation['page_title.view_file_report']);
        });
    }
    ngOnInit() {
        this.type = this.route.snapshot.paramMap.get('type');
        this.projectId = this.route.snapshot.paramMap.get('projectId');
        this.folderId = this.route.snapshot.paramMap.get('folderId');
        this.getUserFolderRole();
        this.getFileDetail();
    }
    getUserFolderRole() {
        const paramsPermission = {
            projectId: this.projectId,
            folderId: this.folderId
        };
        this.folderService.getUserProjectRole(this.appUtil.toSnakeCaseKey(paramsPermission))
            .subscribe(res => {
            if (res.status === 200) {
                this.userFolderRole = res.data.projectRoleId;
                if (this.userFolderRole !== this.projectRole.Owner
                    && this.userFolderRole !== this.projectRole.Editor
                    && this.userFolderRole !== this.projectRole.ViewerUploader) {
                    this.messageService.add({
                        severity: 'error',
                        detail: this.appUtil.translate(this.translateService, 'error.403'),
                    });
                    const currentUrl = '/project/' + this.projectId + '/' + this.folderId;
                    this.router.routeReuseStrategy.shouldReuseRoute = () => false;
                    this.router.onSameUrlNavigation = 'reload';
                    this.router.navigate([currentUrl]);
                }
            }
        });
    }
    // Get detail file
    getFileDetail() {
        const pathParams = {
            projectId: this.projectId,
            folderId: this.folderId
        };
        this.fileService.getFileDetail(this.route.snapshot.paramMap.get('fileId'), this.appUtil.toSnakeCaseKey(pathParams)).subscribe(res => {
            if (res.status === 200) {
                this.fileData = res.data;
            }
        });
    }
    handleChange(event) {
        switch (event.index) {
            case 0:
                this.fileInternalComponent.reloadPage();
                break;
            case 1:
                this.fileExternalComponent.reloadPage();
                break;
            default:
                break;
        }
    }
}
exports.FileReportComponent = FileReportComponent;
FileReportComponent.ɵfac = function FileReportComponent_Factory(t) { return new (t || FileReportComponent)(i0.ɵɵdirectiveInject(i1.Title), i0.ɵɵdirectiveInject(i2.ActivatedRoute), i0.ɵɵdirectiveInject(i2.Router), i0.ɵɵdirectiveInject(i3.MessageService), i0.ɵɵdirectiveInject(i4.TranslateService), i0.ɵɵdirectiveInject(i5.FolderService), i0.ɵɵdirectiveInject(i6.FileService)); };
FileReportComponent.ɵcmp = i0.ɵɵdefineComponent({ type: FileReportComponent, selectors: [["app-file-report"]], viewQuery: function FileReportComponent_Query(rf, ctx) { if (rf & 1) {
        i0.ɵɵviewQuery(_c0, 1);
        i0.ɵɵviewQuery(_c1, 1);
    } if (rf & 2) {
        let _t;
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.fileInternalComponent = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.fileExternalComponent = _t.first);
    } }, decls: 7, vars: 7, consts: [[1, "page-title"], [4, "ngIf", "ngIfElse"], ["fileNormal", ""], [3, "onChange"], ["pTemplate", "header"], ["class", "p-field", 4, "ngIf"], ["fileInternalComponent", ""], [4, "ngIf"], [1, "fas", "fa-shield-alt", "p-mr-2"], [1, "p-field"], [3, "fileTitle"], ["fileExternalComponent", ""], [1, "far", "fa-eye", "p-mr-2"]], template: function FileReportComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵtext(1);
        i0.ɵɵpipe(2, "titlecase");
        i0.ɵɵpipe(3, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(4, FileReportComponent_div_4_Template, 8, 2, "div", 1);
        i0.ɵɵtemplate(5, FileReportComponent_ng_template_5_Template, 2, 1, "ng-template", null, 2, i0.ɵɵtemplateRefExtractor);
    } if (rf & 2) {
        const _r1 = i0.ɵɵreference(6);
        i0.ɵɵadvance(1);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 3, i0.ɵɵpipeBind1(3, 5, "label.file_report_details")));
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("ngIf", ctx.type === "1")("ngIfElse", _r1);
    } }, directives: [i7.NgIf, i8.TabView, i8.TabPanel, i3.PrimeTemplate, i9.FileInternalComponent, i10.FilePathComponent, i11.FileExternalComponent, i12.FileNormalComponent], pipes: [i7.TitleCasePipe, i4.TranslatePipe], styles: ["[_nghost-%COMP%]  .p-tabview .p-tabview-panels {\n  padding-left: 0;\n  padding-right: 0;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvZmlsZS9maWxlLXJlcG9ydC9maWxlLXJlcG9ydC5jb21wb25lbnQuc2NzcyIsInNyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvZmlsZS9maWxlLXJlcG9ydC9maWxlLXJlcG9ydC5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDRTtFQUNFLGVBQUE7RUFDQSxnQkFBQTtBQ0FKIiwiZmlsZSI6InNyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvZmlsZS9maWxlLXJlcG9ydC9maWxlLXJlcG9ydC5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIjpob3N0KDo6bmctZGVlcCkge1xuICAucC10YWJ2aWV3IC5wLXRhYnZpZXctcGFuZWxzIHtcbiAgICBwYWRkaW5nLWxlZnQ6IDA7XG4gICAgcGFkZGluZy1yaWdodDogMDtcbiAgfVxufVxuIiwiOmhvc3QoOjpuZy1kZWVwKSAucC10YWJ2aWV3IC5wLXRhYnZpZXctcGFuZWxzIHtcbiAgcGFkZGluZy1sZWZ0OiAwO1xuICBwYWRkaW5nLXJpZ2h0OiAwO1xufSJdfQ== */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FileReportComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-file-report',
                templateUrl: './file-report.component.html',
                styleUrls: ['./file-report.component.scss']
            }]
    }], function () { return [{ type: i1.Title }, { type: i2.ActivatedRoute }, { type: i2.Router }, { type: i3.MessageService }, { type: i4.TranslateService }, { type: i5.FolderService }, { type: i6.FileService }]; }, { fileInternalComponent: [{
            type: core_1.ViewChild,
            args: ['fileInternalComponent']
        }], fileExternalComponent: [{
            type: core_1.ViewChild,
            args: ['fileExternalComponent']
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/file/file-report/file-tracking-ip/file-tracking-ip.component.ts":
/*!******************************************************************************************************!*\
  !*** ./src/app/authentication-pages/file/file-report/file-tracking-ip/file-tracking-ip.component.ts ***!
  \******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.FileTrackingIpComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const moment_1 = tslib_1.__importDefault(__webpack_require__(/*! moment */ "./node_modules/moment/moment.js"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! ../../../../services/file-report.service */ "./src/app/services/file-report.service.ts"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! primeng/table */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-table.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! primeng/badge */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-badge.js"));
function FileTrackingIpComponent_ng_template_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "th", 4);
    i0.ɵɵelementStart(2, "div");
    i0.ɵɵelement(3, "span", 5);
    i0.ɵɵelement(4, "p-sortIcon", 6);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "th", 7);
    i0.ɵɵelementStart(6, "div");
    i0.ɵɵelement(7, "span", 5);
    i0.ɵɵelement(8, "p-sortIcon", 8);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(9, "th", 9);
    i0.ɵɵelementStart(10, "div");
    i0.ɵɵelement(11, "span", 5);
    i0.ɵɵelement(12, "p-sortIcon", 10);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("translate", "label.date_time");
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("translate", "label.ip_address");
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("translate", "label.type");
} }
function FileTrackingIpComponent_ng_template_2_span_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵelement(1, "p-badge", 14);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("value", "Download");
} }
function FileTrackingIpComponent_ng_template_2_span_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵelement(1, "p-badge", 15);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("value", "View");
} }
function FileTrackingIpComponent_ng_template_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "td");
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "td", 11);
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "td", 11);
    i0.ɵɵelementStart(6, "div", 12);
    i0.ɵɵtemplate(7, FileTrackingIpComponent_ng_template_2_span_7_Template, 2, 1, "span", 13);
    i0.ɵɵtemplate(8, FileTrackingIpComponent_ng_template_2_span_8_Template, 2, 1, "span", 13);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const openFileNormal_r3 = ctx.$implicit;
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", ctx_r1.appUtil.formatDateBasedOnDiff(ctx_r1.datePipe, openFileNormal_r3.dateTime), " ");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", openFileNormal_r3.ipAddress, " ");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngSwitch", openFileNormal_r3.type);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 0);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 1);
} }
function FileTrackingIpComponent_ng_template_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "td", 16);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, "label.no_record"));
} }
class FileTrackingIpComponent {
    constructor(route, datePipe, fileReportService) {
        this.route = route;
        this.datePipe = datePipe;
        this.fileReportService = fileReportService;
        this.getOpenParams = {
            projectId: '',
            folderId: '',
            sDate: '',
            eDate: '',
            type: '',
            sortField: 'dateTime',
            ascSort: false,
            pageNumber: 1,
            pageSize: 10
        };
        this.appUtil = app_util_1.default;
        this.constant = app_constants_1.default;
        this.defaultField = 'dateTime';
        this.first = 0;
        this.rows = 10;
    }
    ngOnInit() {
        this.rowOptions = this.constant.DATA_VIEW.ROW_PER_PAGE_OPTIONS;
        this.projectId = this.route.snapshot.paramMap.get('projectId');
        this.folderId = this.route.snapshot.paramMap.get('folderId');
        this.type = this.route.snapshot.paramMap.get('type');
        // load getStoreParamsInternalNoneProtectedOnl
        this.getOpenParams = this.fileReportService.getStoreParamsInternalNoneProtectedOnl
            ? this.fileReportService.getStoreParamsInternalNoneProtectedOnl : this.getOpenParams;
        this.getOpenParams.projectId = this.projectId;
        this.getOpenParams.folderId = this.folderId;
        this.getOpenParams.type = this.type;
        this.defaultField = this.getOpenParams.sortField;
        this.rows = this.getOpenParams.pageSize;
        this.defaultSort = this.getOpenParams.ascSort;
    }
    // Event lazy load file tracking IP
    loadFileTrackingIP(event) {
        if (event) {
            this.getOpenParams.sortField = (event.sortField) ? event.sortField : 'dateTime';
            this.getOpenParams.ascSort = (event.sortOrder === 1);
            if (event.rows) {
                this.getOpenParams.pageNumber = (event.first / event.rows) + 1;
                this.getOpenParams.pageSize = event.rows;
            }
        }
        // get sDate, eDate
        this.getOpenParams.sDate = moment_1.default(this.rangeDates[0]).format('YYYY/MM/DD 00:00:00');
        this.getOpenParams.eDate = moment_1.default(this.rangeDates[1]).format('YYYY/MM/DD 23:59:59');
        if (this.getRequest) {
            this.getRequest.unsubscribe();
        }
        this.getRequest = this.fileReportService.getOpenInternalFiles(this.route.snapshot.paramMap.get('fileId'), this.appUtil.toSnakeCaseKey(this.getOpenParams)).subscribe(res => {
            if (res.status === 200) {
                this.fileReportService.setStoreParamsInternalNoneProtectedOnl(this.getOpenParams);
                this.trackingIps = res.data.data.content;
                this.totalRecords = res.data.data.totalElements;
            }
        });
    }
}
exports.FileTrackingIpComponent = FileTrackingIpComponent;
FileTrackingIpComponent.ɵfac = function FileTrackingIpComponent_Factory(t) { return new (t || FileTrackingIpComponent)(i0.ɵɵdirectiveInject(i1.ActivatedRoute), i0.ɵɵdirectiveInject(i2.DatePipe), i0.ɵɵdirectiveInject(i3.FileReportService)); };
FileTrackingIpComponent.ɵcmp = i0.ɵɵdefineComponent({ type: FileTrackingIpComponent, selectors: [["app-file-tracking-ip"]], inputs: { rangeDates: "rangeDates" }, decls: 4, vars: 10, consts: [[3, "value", "sortField", "sortOrder", "totalRecords", "rowHover", "lazy", "first", "rows", "paginator", "rowsPerPageOptions", "onLazyLoad"], ["pTemplate", "header"], ["pTemplate", "body"], ["pTemplate", "emptymessage"], ["pSortableColumn", "dateTime", 2, "width", "35%"], [3, "translate"], ["field", "dateTime"], ["pSortableColumn", "ipAddress", 1, "p-text-center"], ["field", "ipAddress"], ["pSortableColumn", "type", 1, "p-text-center", 2, "width", "28%"], ["field", "type"], [1, "p-text-center"], [3, "ngSwitch"], [4, "ngSwitchCase"], [3, "value"], ["severity", "success", 3, "value"], ["colspan", "3", 1, "p-text-center"]], template: function FileTrackingIpComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "p-table", 0);
        i0.ɵɵlistener("onLazyLoad", function FileTrackingIpComponent_Template_p_table_onLazyLoad_0_listener($event) { return ctx.loadFileTrackingIP($event); });
        i0.ɵɵtemplate(1, FileTrackingIpComponent_ng_template_1_Template, 13, 3, "ng-template", 1);
        i0.ɵɵtemplate(2, FileTrackingIpComponent_ng_template_2_Template, 9, 5, "ng-template", 2);
        i0.ɵɵtemplate(3, FileTrackingIpComponent_ng_template_3_Template, 4, 3, "ng-template", 3);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵproperty("value", ctx.trackingIps)("sortField", ctx.defaultField)("sortOrder", ctx.defaultSort ? 1 : -1)("totalRecords", ctx.totalRecords)("rowHover", true)("lazy", true)("first", ctx.first)("rows", ctx.rows)("paginator", ctx.totalRecords > 0)("rowsPerPageOptions", ctx.rowOptions);
    } }, directives: [i4.Table, i5.PrimeTemplate, i4.SortableColumn, i6.TranslateDirective, i4.SortIcon, i2.NgSwitch, i2.NgSwitchCase, i7.Badge], pipes: [i6.TranslatePipe], styles: ["[_nghost-%COMP%]     .p-datatable-responsive-demo .p-datatable-tbody > tr > td .p-column-title {\n  display: none;\n}\n\n@media screen and (max-width: 40rem) {\n  [_nghost-%COMP%]     .p-datatable.p-datatable-responsive-demo .p-datatable-thead > tr > th, [_nghost-%COMP%]     .p-datatable.p-datatable-responsive-demo .p-datatable-tfoot > tr > td {\n    display: none !important;\n  }\n  [_nghost-%COMP%]     .p-datatable.p-datatable-responsive-demo .p-datatable-tbody > tr > td {\n    text-align: left;\n    display: block;\n    width: 100%;\n    float: left;\n    clear: left;\n    border: 0 none;\n  }\n  [_nghost-%COMP%]     .p-datatable.p-datatable-responsive-demo .p-datatable-tbody > tr > td .p-column-title {\n    padding: 0.4rem;\n    min-width: 30%;\n    display: inline-block;\n    margin: -0.4em 1em -0.4em -0.4rem;\n    font-weight: bold;\n  }\n  [_nghost-%COMP%]     .p-datatable.p-datatable-responsive-demo .p-datatable-tbody > tr > td:last-child {\n    border-bottom: 1px solid var(--surface-d);\n  }\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvZmlsZS9maWxlLXJlcG9ydC9maWxlLXRyYWNraW5nLWlwL2ZpbGUtdHJhY2tpbmctaXAuY29tcG9uZW50LnNjc3MiLCJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2ZpbGUvZmlsZS1yZXBvcnQvZmlsZS10cmFja2luZy1pcC9maWxlLXRyYWNraW5nLWlwLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNFO0VBQ0UsYUFBQTtBQ0FKOztBRElBO0VBSVE7O0lBRUUsd0JBQUE7RUNKUjtFRE9NO0lBQ0UsZ0JBQUE7SUFDQSxjQUFBO0lBQ0EsV0FBQTtJQUNBLFdBQUE7SUFDQSxXQUFBO0lBQ0EsY0FBQTtFQ0xSO0VET1E7SUFDRSxlQUFBO0lBQ0EsY0FBQTtJQUNBLHFCQUFBO0lBQ0EsaUNBQUE7SUFDQSxpQkFBQTtFQ0xWO0VEUVE7SUFDRSx5Q0FBQTtFQ05WO0FBQ0YiLCJmaWxlIjoic3JjL2FwcC9hdXRoZW50aWNhdGlvbi1wYWdlcy9maWxlL2ZpbGUtcmVwb3J0L2ZpbGUtdHJhY2tpbmctaXAvZmlsZS10cmFja2luZy1pcC5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIjpob3N0IDo6bmctZGVlcCB7XG4gIC5wLWRhdGF0YWJsZS1yZXNwb25zaXZlLWRlbW8gLnAtZGF0YXRhYmxlLXRib2R5ID4gdHIgPiB0ZCAucC1jb2x1bW4tdGl0bGUge1xuICAgIGRpc3BsYXk6IG5vbmU7XG4gIH1cbn1cblxuQG1lZGlhIHNjcmVlbiBhbmQgKG1heC13aWR0aDogNDByZW0pIHtcbiAgOmhvc3QgOjpuZy1kZWVwIHtcbiAgICAucC1kYXRhdGFibGUge1xuICAgICAgJi5wLWRhdGF0YWJsZS1yZXNwb25zaXZlLWRlbW8ge1xuICAgICAgICAucC1kYXRhdGFibGUtdGhlYWQgPiB0ciA+IHRoLFxuICAgICAgICAucC1kYXRhdGFibGUtdGZvb3QgPiB0ciA+IHRkIHtcbiAgICAgICAgICBkaXNwbGF5OiBub25lICFpbXBvcnRhbnQ7XG4gICAgICAgIH1cblxuICAgICAgICAucC1kYXRhdGFibGUtdGJvZHkgPiB0ciA+IHRkIHtcbiAgICAgICAgICB0ZXh0LWFsaWduOiBsZWZ0O1xuICAgICAgICAgIGRpc3BsYXk6IGJsb2NrO1xuICAgICAgICAgIHdpZHRoOiAxMDAlO1xuICAgICAgICAgIGZsb2F0OiBsZWZ0O1xuICAgICAgICAgIGNsZWFyOiBsZWZ0O1xuICAgICAgICAgIGJvcmRlcjogMCBub25lO1xuXG4gICAgICAgICAgLnAtY29sdW1uLXRpdGxlIHtcbiAgICAgICAgICAgIHBhZGRpbmc6IC40cmVtO1xuICAgICAgICAgICAgbWluLXdpZHRoOiAzMCU7XG4gICAgICAgICAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG4gICAgICAgICAgICBtYXJnaW46IC0uNGVtIDFlbSAtLjRlbSAtLjRyZW07XG4gICAgICAgICAgICBmb250LXdlaWdodDogYm9sZDtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICAmOmxhc3QtY2hpbGQge1xuICAgICAgICAgICAgYm9yZGVyLWJvdHRvbTogMXB4IHNvbGlkIHZhcigtLXN1cmZhY2UtZCk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuICB9XG59XG4iLCI6aG9zdCA6Om5nLWRlZXAgLnAtZGF0YXRhYmxlLXJlc3BvbnNpdmUtZGVtbyAucC1kYXRhdGFibGUtdGJvZHkgPiB0ciA+IHRkIC5wLWNvbHVtbi10aXRsZSB7XG4gIGRpc3BsYXk6IG5vbmU7XG59XG5cbkBtZWRpYSBzY3JlZW4gYW5kIChtYXgtd2lkdGg6IDQwcmVtKSB7XG4gIDpob3N0IDo6bmctZGVlcCAucC1kYXRhdGFibGUucC1kYXRhdGFibGUtcmVzcG9uc2l2ZS1kZW1vIC5wLWRhdGF0YWJsZS10aGVhZCA+IHRyID4gdGgsXG46aG9zdCA6Om5nLWRlZXAgLnAtZGF0YXRhYmxlLnAtZGF0YXRhYmxlLXJlc3BvbnNpdmUtZGVtbyAucC1kYXRhdGFibGUtdGZvb3QgPiB0ciA+IHRkIHtcbiAgICBkaXNwbGF5OiBub25lICFpbXBvcnRhbnQ7XG4gIH1cbiAgOmhvc3QgOjpuZy1kZWVwIC5wLWRhdGF0YWJsZS5wLWRhdGF0YWJsZS1yZXNwb25zaXZlLWRlbW8gLnAtZGF0YXRhYmxlLXRib2R5ID4gdHIgPiB0ZCB7XG4gICAgdGV4dC1hbGlnbjogbGVmdDtcbiAgICBkaXNwbGF5OiBibG9jaztcbiAgICB3aWR0aDogMTAwJTtcbiAgICBmbG9hdDogbGVmdDtcbiAgICBjbGVhcjogbGVmdDtcbiAgICBib3JkZXI6IDAgbm9uZTtcbiAgfVxuICA6aG9zdCA6Om5nLWRlZXAgLnAtZGF0YXRhYmxlLnAtZGF0YXRhYmxlLXJlc3BvbnNpdmUtZGVtbyAucC1kYXRhdGFibGUtdGJvZHkgPiB0ciA+IHRkIC5wLWNvbHVtbi10aXRsZSB7XG4gICAgcGFkZGluZzogMC40cmVtO1xuICAgIG1pbi13aWR0aDogMzAlO1xuICAgIGRpc3BsYXk6IGlubGluZS1ibG9jaztcbiAgICBtYXJnaW46IC0wLjRlbSAxZW0gLTAuNGVtIC0wLjRyZW07XG4gICAgZm9udC13ZWlnaHQ6IGJvbGQ7XG4gIH1cbiAgOmhvc3QgOjpuZy1kZWVwIC5wLWRhdGF0YWJsZS5wLWRhdGF0YWJsZS1yZXNwb25zaXZlLWRlbW8gLnAtZGF0YXRhYmxlLXRib2R5ID4gdHIgPiB0ZDpsYXN0LWNoaWxkIHtcbiAgICBib3JkZXItYm90dG9tOiAxcHggc29saWQgdmFyKC0tc3VyZmFjZS1kKTtcbiAgfVxufSJdfQ== */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FileTrackingIpComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-file-tracking-ip',
                templateUrl: './file-tracking-ip.component.html',
                styleUrls: ['./file-tracking-ip.component.scss']
            }]
    }], function () { return [{ type: i1.ActivatedRoute }, { type: i2.DatePipe }, { type: i3.FileReportService }]; }, { rangeDates: [{
            type: core_1.Input
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/file/file-report/file-tracking-open/file-tracking-open.component.ts":
/*!**********************************************************************************************************!*\
  !*** ./src/app/authentication-pages/file/file-report/file-tracking-open/file-tracking-open.component.ts ***!
  \**********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.FileTrackingOpenComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const moment_1 = tslib_1.__importDefault(__webpack_require__(/*! moment */ "./node_modules/moment/moment.js"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! ../../../../services/file.service */ "./src/app/services/file.service.ts"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! ../../../../services/file-report.service */ "./src/app/services/file-report.service.ts"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! primeng/table */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-table.js"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! primeng/ripple */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-ripple.js"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
function FileTrackingOpenComponent_ng_template_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 4);
    i0.ɵɵelementStart(1, "div", 5);
    i0.ɵɵelementStart(2, "div", 6);
    i0.ɵɵelementStart(3, "div", 7);
    i0.ɵɵelement(4, "i", 8);
    i0.ɵɵelement(5, "span", 9);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(6, "div");
    i0.ɵɵelement(7, "i", 10);
    i0.ɵɵelement(8, "span", 9);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(5);
    i0.ɵɵproperty("translate", "label.equal_not_open_yet");
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("translate", "label.equal_opened");
} }
function FileTrackingOpenComponent_ng_template_2_th_17_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "th", 21);
} }
function FileTrackingOpenComponent_ng_template_2_tr_18_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "th", 22);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, "label.no_data"));
} }
function FileTrackingOpenComponent_ng_template_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "th", 11);
    i0.ɵɵelementStart(2, "div");
    i0.ɵɵelement(3, "span", 9);
    i0.ɵɵelement(4, "p-sortIcon", 12);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "th", 13);
    i0.ɵɵelementStart(6, "div");
    i0.ɵɵelement(7, "span", 9);
    i0.ɵɵelement(8, "p-sortIcon", 14);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(9, "th", 15);
    i0.ɵɵelementStart(10, "div");
    i0.ɵɵelement(11, "span", 9);
    i0.ɵɵelement(12, "p-sortIcon", 16);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(13, "th", 17);
    i0.ɵɵelementStart(14, "div");
    i0.ɵɵelement(15, "span", 9);
    i0.ɵɵelement(16, "p-sortIcon", 18);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(17, FileTrackingOpenComponent_ng_template_2_th_17_Template, 1, 0, "th", 19);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(18, FileTrackingOpenComponent_ng_template_2_tr_18_Template, 4, 3, "tr", 20);
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("translate", "label.member");
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("translate", "label.open_status");
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("translate", "label.last_opened");
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("translate", "label.ip_address");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r1.typeReport === "external");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r1.trackingMembers && ctx_r1.trackingMembers.length === 0);
} }
function FileTrackingOpenComponent_ng_template_3_span_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵelement(1, "i", 8);
    i0.ɵɵelementEnd();
} }
function FileTrackingOpenComponent_ng_template_3_span_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵelement(1, "i", 10);
    i0.ɵɵelementEnd();
} }
function FileTrackingOpenComponent_ng_template_3_td_11_Template(rf, ctx) { if (rf & 1) {
    const _r11 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "td");
    i0.ɵɵelementStart(1, "button", 27);
    i0.ɵɵlistener("click", function FileTrackingOpenComponent_ng_template_3_td_11_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r11); const openFileNormal_r5 = i0.ɵɵnextContext().$implicit; const ctx_r9 = i0.ɵɵnextContext(); return ctx_r9.confirmRevoke(openFileNormal_r5.addressBookId); });
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(2, 1, "label.revoke"));
} }
function FileTrackingOpenComponent_ng_template_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "td", 23);
    i0.ɵɵelementStart(2, "span", 24);
    i0.ɵɵtext(3);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "td", 25);
    i0.ɵɵtemplate(5, FileTrackingOpenComponent_ng_template_3_span_5_Template, 2, 0, "span", 20);
    i0.ɵɵtemplate(6, FileTrackingOpenComponent_ng_template_3_span_6_Template, 2, 0, "span", 20);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(7, "td");
    i0.ɵɵtext(8);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(9, "td", 26);
    i0.ɵɵtext(10);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(11, FileTrackingOpenComponent_ng_template_3_td_11_Template, 3, 3, "td", 20);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const openFileNormal_r5 = ctx.$implicit;
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("title", openFileNormal_r5.mailAddress);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(openFileNormal_r5.mailAddress);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", !openFileNormal_r5.openTime);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", openFileNormal_r5.openTime);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", ctx_r2.appUtil.formatDateBasedOnDiff(ctx_r2.datePipe, openFileNormal_r5.openTime), " ");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", openFileNormal_r5.ipAddress, " ");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r2.typeReport === "external");
} }
class FileTrackingOpenComponent {
    constructor(datePipe, route, fileService, confirmationService, messageService, translateService, fileReportService) {
        this.datePipe = datePipe;
        this.route = route;
        this.fileService = fileService;
        this.confirmationService = confirmationService;
        this.messageService = messageService;
        this.translateService = translateService;
        this.fileReportService = fileReportService;
        this.typeReport = 'internal';
        this.isRevokeSuccess = new core_1.EventEmitter();
        this.appUtil = app_util_1.default;
        this.constant = app_constants_1.default;
        this.defaultField = 'open_time';
        this.first = 0;
        this.rows = 10;
        this.getOpenParams = {
            projectId: '',
            folderId: '',
            sDate: '',
            eDate: '',
            type: '',
            sortField: 'open_time',
            ascSort: false,
            pageNumber: 1,
            pageSize: 10
        };
    }
    ngOnInit() {
        this.rowOptions = this.constant.DATA_VIEW.ROW_PER_PAGE_OPTIONS;
        this.projectId = this.route.snapshot.paramMap.get('projectId');
        this.folderId = this.route.snapshot.paramMap.get('folderId');
        this.fileId = this.route.snapshot.paramMap.get('fileId');
        // load getInternalProtectOfflineParams
        switch (this.typeReport) {
            case 'external':
                this.getOpenParams = this.fileReportService.getStoreParamsExternalProtectedOff
                    ? this.fileReportService.getStoreParamsExternalProtectedOff : this.getOpenParams;
                break;
            case 'internal':
                this.getOpenParams = this.fileReportService.getStoreParamsInternalProtectedOff
                    ? this.fileReportService.getStoreParamsInternalProtectedOff : this.getOpenParams;
                break;
        }
        this.rows = this.getOpenParams.pageSize;
        this.defaultField = this.getOpenParams.sortField;
        this.defaultSort = (this.getOpenParams.ascSort) ? 1 : -1;
        this.getOpenParams.projectId = this.projectId;
        this.getOpenParams.folderId = this.folderId;
        this.getOpenParams.type = this.route.snapshot.paramMap.get('type');
    }
    // Event lazy load file tracking IP
    loadFileOpenStatistics(event) {
        if (event) {
            this.getOpenParams.sortField = (event.sortField) ? event.sortField : 'open_time';
            this.getOpenParams.ascSort = (event.sortOrder === 1);
            if (event.rows) {
                this.getOpenParams.pageNumber = (event.first / event.rows) + 1;
                this.getOpenParams.pageSize = event.rows;
            }
        }
        if (this.getRequest) {
            this.getRequest.unsubscribe();
        }
        this.getRequest = this.getFileOpenStatistics();
    }
    // Get Open internal files
    getFileOpenStatistics() {
        this.getOpenParams.sDate = moment_1.default(this.rangeDates[0]).format('YYYY/MM/DD 00:00:00');
        this.getOpenParams.eDate = moment_1.default(this.rangeDates[1]).format('YYYY/MM/DD 23:59:59');
        switch (this.typeReport) {
            case 'external':
                this.getOpenExternalFiles();
                break;
            case 'internal':
                this.getTrackingMembers();
                break;
        }
    }
    getTrackingMembers() {
        this.fileReportService.getOpenInternalFiles(this.fileId, this.appUtil.toSnakeCaseKey(this.getOpenParams)).subscribe(res => {
            if (res.status === 200) {
                this.fileReportService.setStoreParamsInternalProtectedOff(this.getOpenParams);
                if (res.data.viewFile) {
                    this.trackingMembers = res.data.viewFile.content;
                    this.totalRecords = res.data.viewFile.totalElements;
                }
            }
        });
    }
    // Get report open files
    getOpenExternalFiles() {
        this.fileReportService.getOpenExternalFiles(this.fileId, this.appUtil.toSnakeCaseKey(this.getOpenParams)).subscribe(res => {
            if (res.status === 200) {
                this.fileReportService.setStoreParamsExternalProtectedOff(this.getOpenParams);
                if (res.data.viewFile) {
                    this.trackingMembers = res.data.viewFile.content;
                    this.totalRecords = res.data.viewFile.totalElements;
                }
            }
        });
    }
    confirmRevoke(addressBookId) {
        this.confirmationService.confirm({
            header: this.appUtil.translate(this.translateService, 'label.revoke_recipient_title'),
            message: this.appUtil.translate(this.translateService, 'label.revoke_recipient_msg'),
            acceptLabel: this.appUtil.translate(this.translateService, 'label.yes'),
            rejectLabel: this.appUtil.translate(this.translateService, 'label.no'),
            icon: 'fas fa-exclamation-triangle text-danger',
            defaultFocus: 'none',
            accept: () => {
                this.onRevoke(addressBookId);
                this.confirmationService.close();
            },
            reject: () => {
                this.confirmationService.close();
            }
        });
    }
    onRevoke(addressBookId) {
        const revokeParams = {
            addressBookId,
            folderId: this.folderId,
            projectId: this.projectId
        };
        this.fileService.revokeLicense(this.fileId, this.appUtil.toSnakeCaseKey(revokeParams)).subscribe(res => {
            if (res.status === 200) {
                this.messageService.add({
                    severity: 'success',
                    detail: this.appUtil.translate(this.translateService, 'default_toast.revoke_success')
                });
            }
            this.getFileOpenStatistics();
            this.isRevokeSuccess.emit(true);
        });
    }
}
exports.FileTrackingOpenComponent = FileTrackingOpenComponent;
FileTrackingOpenComponent.ɵfac = function FileTrackingOpenComponent_Factory(t) { return new (t || FileTrackingOpenComponent)(i0.ɵɵdirectiveInject(i1.DatePipe), i0.ɵɵdirectiveInject(i2.ActivatedRoute), i0.ɵɵdirectiveInject(i3.FileService), i0.ɵɵdirectiveInject(i4.ConfirmationService), i0.ɵɵdirectiveInject(i4.MessageService), i0.ɵɵdirectiveInject(i5.TranslateService), i0.ɵɵdirectiveInject(i6.FileReportService)); };
FileTrackingOpenComponent.ɵcmp = i0.ɵɵdefineComponent({ type: FileTrackingOpenComponent, selectors: [["app-file-tracking-open"]], inputs: { typeReport: "typeReport", rangeDates: "rangeDates" }, outputs: { isRevokeSuccess: "isRevokeSuccess" }, decls: 4, vars: 10, consts: [[3, "value", "sortField", "sortOrder", "totalRecords", "rowHover", "lazy", "first", "rows", "paginator", "rowsPerPageOptions", "onLazyLoad"], ["pTemplate", "caption"], ["pTemplate", "header"], ["pTemplate", "body"], [1, "p-d-block", "p-grid"], [1, "p-p-2", "p-sm-offset-6", "p-sm-6", "p-note-custom"], [1, "p-d-flex", "p-jc-center", "p-pt-2"], [1, "p-mr-4"], [1, "far", "fa-envelope"], [3, "translate"], [1, "far", "fa-envelope-open"], ["pSortableColumn", "mail_address"], ["field", "mail_address"], ["pSortableColumn", "status", 1, "p-text-center"], ["field", "status"], ["pSortableColumn", "open_time"], ["field", "open_time"], ["pSortableColumn", "ip_address", 1, "p-d-none", "p-d-md-table-cell"], ["field", "ip_address"], ["style", "width: 8rem;", 4, "ngIf"], [4, "ngIf"], [2, "width", "8rem"], ["colspan", "5", 1, "p-text-center"], [1, "p-text-truncate"], [3, "title"], [1, "p-text-center"], [1, "p-d-none", "p-d-md-table-cell"], ["type", "button", "pRipple", "", "pButton", "", "icon", "fas fa-ban", 1, "p-mr-2", "p-button-raised", 3, "label", "click"]], template: function FileTrackingOpenComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "p-table", 0);
        i0.ɵɵlistener("onLazyLoad", function FileTrackingOpenComponent_Template_p_table_onLazyLoad_0_listener($event) { return ctx.loadFileOpenStatistics($event); });
        i0.ɵɵtemplate(1, FileTrackingOpenComponent_ng_template_1_Template, 9, 2, "ng-template", 1);
        i0.ɵɵtemplate(2, FileTrackingOpenComponent_ng_template_2_Template, 19, 6, "ng-template", 2);
        i0.ɵɵtemplate(3, FileTrackingOpenComponent_ng_template_3_Template, 12, 7, "ng-template", 3);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵproperty("value", ctx.trackingMembers)("sortField", ctx.defaultField)("sortOrder", ctx.defaultSort)("totalRecords", ctx.totalRecords)("rowHover", true)("lazy", true)("first", ctx.first)("rows", ctx.rows)("paginator", ctx.totalRecords > 0)("rowsPerPageOptions", ctx.rowOptions);
    } }, directives: [i7.Table, i4.PrimeTemplate, i5.TranslateDirective, i7.SortableColumn, i7.SortIcon, i1.NgIf, i8.Ripple, i9.ButtonDirective], pipes: [i5.TranslatePipe], styles: ["@media screen and (min-width: 768px) {\n  .p-d-md-table-cell[_ngcontent-%COMP%] {\n    display: table-cell !important;\n  }\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvZmlsZS9maWxlLXJlcG9ydC9maWxlLXRyYWNraW5nLW9wZW4vZmlsZS10cmFja2luZy1vcGVuLmNvbXBvbmVudC5zY3NzIiwic3JjL2FwcC9hdXRoZW50aWNhdGlvbi1wYWdlcy9maWxlL2ZpbGUtcmVwb3J0L2ZpbGUtdHJhY2tpbmctb3Blbi9maWxlLXRyYWNraW5nLW9wZW4uY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRTtJQUNFLDhCQUFBO0VDQ0Y7QUFDRiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2ZpbGUvZmlsZS1yZXBvcnQvZmlsZS10cmFja2luZy1vcGVuL2ZpbGUtdHJhY2tpbmctb3Blbi5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIkBtZWRpYSBzY3JlZW4gYW5kIChtaW4td2lkdGg6IDc2OHB4KSB7XG4gIC5wLWQtbWQtdGFibGUtY2VsbCB7XG4gICAgZGlzcGxheTogdGFibGUtY2VsbCAhaW1wb3J0YW50O1xuICB9XG59XG4iLCJAbWVkaWEgc2NyZWVuIGFuZCAobWluLXdpZHRoOiA3NjhweCkge1xuICAucC1kLW1kLXRhYmxlLWNlbGwge1xuICAgIGRpc3BsYXk6IHRhYmxlLWNlbGwgIWltcG9ydGFudDtcbiAgfVxufSJdfQ== */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FileTrackingOpenComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-file-tracking-open',
                templateUrl: './file-tracking-open.component.html',
                styleUrls: ['./file-tracking-open.component.scss']
            }]
    }], function () { return [{ type: i1.DatePipe }, { type: i2.ActivatedRoute }, { type: i3.FileService }, { type: i4.ConfirmationService }, { type: i4.MessageService }, { type: i5.TranslateService }, { type: i6.FileReportService }]; }, { typeReport: [{
            type: core_1.Input
        }], rangeDates: [{
            type: core_1.Input
        }], isRevokeSuccess: [{
            type: core_1.Output
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/file/file-translation/file-translation.component.ts":
/*!******************************************************************************************!*\
  !*** ./src/app/authentication-pages/file/file-translation/file-translation.component.ts ***!
  \******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.FileTranslationComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
const app_constants_1 = __webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! primeng/dropdown */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dropdown.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const _c0 = function (a0) { return { name: a0 }; };
function FileTranslationComponent_div_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "div", 10);
    i0.ɵɵpipe(1, "translate");
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵpropertyInterpolate("innerHTML", i0.ɵɵpipeBind2(1, 1, "label.translation_file_name", i0.ɵɵpureFunction1(4, _c0, ctx_r0.file.name)), i0.ɵɵsanitizeHtml);
} }
function FileTranslationComponent_div_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "div", 10);
    i0.ɵɵpipe(1, "translate");
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵpropertyInterpolate("innerHTML", i0.ɵɵpipeBind2(1, 1, "label.translation_file_fail", i0.ɵɵpureFunction1(4, _c0, ctx_r1.file.name)), i0.ɵɵsanitizeHtml);
} }
function FileTranslationComponent_div_4_span_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 13);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "label.translation_error.404"));
} }
function FileTranslationComponent_div_4_span_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 13);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "label.translation_error.405"));
} }
function FileTranslationComponent_div_4_span_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 13);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "label.translation_error.406"));
} }
function FileTranslationComponent_div_4_span_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 13);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "label.translation_error.407"));
} }
function FileTranslationComponent_div_4_span_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 13);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "label.translation_error.408"));
} }
function FileTranslationComponent_div_4_span_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 13);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "label.translation_error.409"));
} }
function FileTranslationComponent_div_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 11);
    i0.ɵɵtemplate(1, FileTranslationComponent_div_4_span_1_Template, 3, 3, "span", 12);
    i0.ɵɵtemplate(2, FileTranslationComponent_div_4_span_2_Template, 3, 3, "span", 12);
    i0.ɵɵtemplate(3, FileTranslationComponent_div_4_span_3_Template, 3, 3, "span", 12);
    i0.ɵɵtemplate(4, FileTranslationComponent_div_4_span_4_Template, 3, 3, "span", 12);
    i0.ɵɵtemplate(5, FileTranslationComponent_div_4_span_5_Template, 3, 3, "span", 12);
    i0.ɵɵtemplate(6, FileTranslationComponent_div_4_span_6_Template, 3, 3, "span", 12);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵproperty("ngSwitch", ctx_r2.file.fileTranslateError);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 404);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 405);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 406);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 407);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 408);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 409);
} }
function FileTranslationComponent_ng_template_8_div_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelementStart(1, "div");
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r11 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, ctx_r11.selectedLanguage.name));
} }
function FileTranslationComponent_ng_template_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, FileTranslationComponent_ng_template_8_div_0_Template, 4, 3, "div", 14);
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext();
    i0.ɵɵproperty("ngIf", ctx_r3.selectedLanguage);
} }
function FileTranslationComponent_ng_template_9_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelementStart(1, "div");
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const language_r12 = ctx.$implicit;
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, language_r12.name));
} }
class FileTranslationComponent {
    constructor(fb, translateService) {
        this.fb = fb;
        this.translateService = translateService;
        this.form = new forms_1.FormGroup({});
        this.languageOptions = [];
        this.translateStatus = app_constants_1.TranslateStatus;
        this.translateService.get([
            'label.translation_lang.en',
            'label.translation_lang.ja',
            'label.translation_lang.vi',
            'label.translation_lang.zh'
        ]).subscribe(res => {
            this.languageOptions = [
                { code: 'en', name: res['label.translation_lang.en'] },
                { code: 'ja', name: res['label.translation_lang.ja'] },
                { code: 'vi', name: res['label.translation_lang.vi'] },
                { code: 'zh', name: res['label.translation_lang.zh'] }
            ];
        });
    }
    ngOnInit() {
        this.selectedLanguage = this.languageOptions[0];
        this.form = this.fb.group({
            language: [null]
        });
    }
}
exports.FileTranslationComponent = FileTranslationComponent;
FileTranslationComponent.ɵfac = function FileTranslationComponent_Factory(t) { return new (t || FileTranslationComponent)(i0.ɵɵdirectiveInject(i1.FormBuilder), i0.ɵɵdirectiveInject(i2.TranslateService)); };
FileTranslationComponent.ɵcmp = i0.ɵɵdefineComponent({ type: FileTranslationComponent, selectors: [["app-file-translation"]], inputs: { file: "file" }, decls: 13, vars: 10, consts: [[3, "formGroup"], [1, "p-fluid", "p-formgrid", "p-grid"], ["class", "p-col-12 file-name", 3, "innerHTML", 4, "ngIf"], ["class", "p-col-12 file-name p-mt-1", 3, "ngSwitch", 4, "ngIf"], [1, "p-field", "p-col-12", "p-pt-4", "p-m-0"], [1, "p-float-label"], ["id", "language", "appendTo", "body", "formControlName", "language", "optionLabel", "name", 3, "options", "ngModel", "disabled", "ngModelChange"], ["pTemplate", "selectedItem"], ["pTemplate", "item"], ["for", "language"], [1, "p-col-12", "file-name", 3, "innerHTML"], [1, "p-col-12", "file-name", "p-mt-1", 3, "ngSwitch"], ["class", "p-badge p-badge-danger", 4, "ngSwitchCase"], [1, "p-badge", "p-badge-danger"], [4, "ngIf"]], template: function FileTranslationComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "form", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵtemplate(2, FileTranslationComponent_div_2_Template, 2, 6, "div", 2);
        i0.ɵɵtemplate(3, FileTranslationComponent_div_3_Template, 2, 6, "div", 2);
        i0.ɵɵtemplate(4, FileTranslationComponent_div_4_Template, 7, 7, "div", 3);
        i0.ɵɵelementStart(5, "div", 4);
        i0.ɵɵelementStart(6, "div", 5);
        i0.ɵɵelementStart(7, "p-dropdown", 6);
        i0.ɵɵlistener("ngModelChange", function FileTranslationComponent_Template_p_dropdown_ngModelChange_7_listener($event) { return ctx.selectedLanguage = $event; });
        i0.ɵɵtemplate(8, FileTranslationComponent_ng_template_8_Template, 1, 1, "ng-template", 7);
        i0.ɵɵtemplate(9, FileTranslationComponent_ng_template_9_Template, 4, 3, "ng-template", 8);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(10, "label", 9);
        i0.ɵɵtext(11);
        i0.ɵɵpipe(12, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵproperty("formGroup", ctx.form);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.file.fileTranslateStatus !== ctx.translateStatus.FAIL);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.file.fileTranslateStatus === ctx.translateStatus.FAIL);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.file.fileTranslateStatus === ctx.translateStatus.FAIL);
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("options", ctx.languageOptions)("ngModel", ctx.selectedLanguage)("disabled", ctx.file.fileTranslateStatus === ctx.translateStatus.FAIL);
        i0.ɵɵadvance(4);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(12, 8, "label.language"));
    } }, directives: [i1.ɵangular_packages_forms_forms_y, i1.NgControlStatusGroup, i1.FormGroupDirective, i3.NgIf, i4.Dropdown, i1.NgControlStatus, i1.FormControlName, i5.PrimeTemplate, i3.NgSwitch, i3.NgSwitchCase], pipes: [i2.TranslatePipe], styles: [".file-name[_ngcontent-%COMP%] {\n  word-wrap: break-word;\n  \n  white-space: -moz-pre-wrap;\n  \n  white-space: pre-wrap;\n  \n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvZmlsZS9maWxlLXRyYW5zbGF0aW9uL2ZpbGUtdHJhbnNsYXRpb24uY29tcG9uZW50LnNjc3MiLCJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2ZpbGUvZmlsZS10cmFuc2xhdGlvbi9maWxlLXRyYW5zbGF0aW9uLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UscUJBQUE7RUFBNEIsYUFBQTtFQUM1QiwwQkFBQTtFQUE0QixvQkFBQTtFQUM1QixxQkFBQTtFQUE0QixxQkFBQTtBQ0k5QiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2ZpbGUvZmlsZS10cmFuc2xhdGlvbi9maWxlLXRyYW5zbGF0aW9uLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmZpbGUtbmFtZSB7XG4gIHdvcmQtd3JhcDogYnJlYWstd29yZDsgICAgICAvKiBJRSA1LjUtNyAqL1xuICB3aGl0ZS1zcGFjZTogLW1vei1wcmUtd3JhcDsgLyogRmlyZWZveCAxLjAtMi4wICovXG4gIHdoaXRlLXNwYWNlOiBwcmUtd3JhcDsgICAgICAvKiBjdXJyZW50IGJyb3dzZXJzICovXG59XG4iLCIuZmlsZS1uYW1lIHtcbiAgd29yZC13cmFwOiBicmVhay13b3JkO1xuICAvKiBJRSA1LjUtNyAqL1xuICB3aGl0ZS1zcGFjZTogLW1vei1wcmUtd3JhcDtcbiAgLyogRmlyZWZveCAxLjAtMi4wICovXG4gIHdoaXRlLXNwYWNlOiBwcmUtd3JhcDtcbiAgLyogY3VycmVudCBicm93c2VycyAqL1xufSJdfQ== */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FileTranslationComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-file-translation',
                templateUrl: './file-translation.component.html',
                styleUrls: ['./file-translation.component.scss']
            }]
    }], function () { return [{ type: i1.FormBuilder }, { type: i2.TranslateService }]; }, { file: [{
            type: core_1.Input
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/file/file-version/file-version.component.ts":
/*!**********************************************************************************!*\
  !*** ./src/app/authentication-pages/file/file-version/file-version.component.ts ***!
  \**********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.FileVersionComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const app_constants_1 = tslib_1.__importStar(__webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const environment_1 = __webpack_require__(/*! ../../../../environments/environment */ "./src/environments/environment.ts");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/file.service */ "./src/app/services/file.service.ts"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/folder.service */ "./src/app/services/folder.service.ts"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/download.service */ "./src/app/services/download.service.ts"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! primeng/tag */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-tag.js"));
function FileVersionComponent_div_0_p_tag_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "p-tag", 10);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "label.current"));
} }
function FileVersionComponent_div_0_div_10_Template(rf, ctx) { if (rf & 1) {
    const _r7 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 11);
    i0.ɵɵelementStart(1, "div", 12);
    i0.ɵɵlistener("click", function FileVersionComponent_div_0_div_10_Template_div_click_1_listener() { i0.ɵɵrestoreView(_r7); const item_r2 = i0.ɵɵnextContext().$implicit; const ctx_r5 = i0.ɵɵnextContext(); return ctx_r5.doDownloadFile(item_r2); });
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "div", 12);
    i0.ɵɵlistener("click", function FileVersionComponent_div_0_div_10_Template_div_click_4_listener() { i0.ɵɵrestoreView(_r7); const item_r2 = i0.ɵɵnextContext().$implicit; const ctx_r8 = i0.ɵɵnextContext(); return ctx_r8.doReverseFileVersion(item_r2); });
    i0.ɵɵtext(5);
    i0.ɵɵpipe(6, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(7, "div", 12);
    i0.ɵɵlistener("click", function FileVersionComponent_div_0_div_10_Template_div_click_7_listener($event) { i0.ɵɵrestoreView(_r7); const item_r2 = i0.ɵɵnextContext().$implicit; const ctx_r10 = i0.ɵɵnextContext(); return ctx_r10.confirm($event, item_r2); });
    i0.ɵɵtext(8);
    i0.ɵɵpipe(9, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 3, "label.download"));
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 5, "label.make_current"));
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(9, 7, "label.remove"));
} }
const _c0 = function (a0, a1) { return { date: a0, user: a1 }; };
function FileVersionComponent_div_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 2);
    i0.ɵɵelementStart(1, "div", 3);
    i0.ɵɵelementStart(2, "p-tag", 4);
    i0.ɵɵtext(3);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(4, FileVersionComponent_div_0_p_tag_4_Template, 3, 3, "p-tag", 5);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "div", 6);
    i0.ɵɵelementStart(6, "span", 7);
    i0.ɵɵtext(7);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelement(8, "div", 8);
    i0.ɵɵpipe(9, "translate");
    i0.ɵɵtemplate(10, FileVersionComponent_div_0_div_10_Template, 10, 9, "div", 9);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r2 = ctx.$implicit;
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate("V" + item_r2.version);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r2.current === true);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("title", item_r2.title);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", item_r2.title, " ");
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("innerHTML", i0.ɵɵpipeBind2(9, 6, "label.uploaded_on", i0.ɵɵpureFunction2(9, _c0, ctx_r0.util.formatDateBasedOnDiff(ctx_r0.datePipe, item_r2.createDate), ctx_r0.authUser.lang !== "ja" ? item_r2.firstName + " " + item_r2.lastName : item_r2.lastName + " " + item_r2.firstName)), i0.ɵɵsanitizeHtml);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", item_r2.current !== true && (ctx_r0.userFolderRole === ctx_r0.projectRole.Owner || ctx_r0.userFolderRole === ctx_r0.projectRole.Editor));
} }
function FileVersionComponent_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 13);
    i0.ɵɵelementStart(1, "div", 14);
    i0.ɵɵelement(2, "div");
    i0.ɵɵelement(3, "div");
    i0.ɵɵelement(4, "div");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} }
class FileVersionComponent {
    constructor(authService, fileService, datePipe, translate, folderService, confirmationService, downloadService, messageService) {
        this.authService = authService;
        this.fileService = fileService;
        this.datePipe = datePipe;
        this.translate = translate;
        this.folderService = folderService;
        this.confirmationService = confirmationService;
        this.downloadService = downloadService;
        this.messageService = messageService;
        this.isBrowseFile = new core_1.EventEmitter();
        this.util = app_util_1.default;
        this.constant = app_constants_1.default;
        this.projectRole = app_constants_1.ProjectRole;
        this.loading = true;
    }
    ngOnInit() {
        this.authUser = this.authService.getAuthUser;
        this.folderId = this.file.parentFolderId ? this.file.parentFolderId : '0';
        this.loadData();
    }
    loadData() {
        this.loading = true;
        const params = {
            projectId: this.projectId,
            folderId: this.folderId
        };
        this.fileService.getAllFilesVersion(this.file.id, this.util.toSnakeCaseKey(params)).subscribe(res => {
            if (res.status === 200) {
                this.fileVersion = res.data;
                if (this.fileVersion.length === 1) {
                    this.isBrowseFile.emit(true);
                }
            }
            this.loading = false;
        });
    }
    confirm(event, item) {
        this.confirmationService.confirm({
            key: 'confirm',
            target: event.target,
            message: this.util.translate(this.translate, 'label.confirm_delete_version'),
            icon: 'fas fa-exclamation-triangle text-danger',
            acceptIcon: 'fas fa-check',
            rejectIcon: 'fas fa-times',
            accept: () => {
                this.doDeleteFileVersion(item);
            },
            reject: () => {
            }
        });
    }
    doDeleteFileVersion(item) {
        const paramsDel = {
            projectId: this.projectId,
            fileVersionId: item.id,
            folderId: this.folderId
        };
        this.fileService.deleteFileVersion(item.fileId, this.util.toSnakeCaseKey(paramsDel)).subscribe(res => {
            if (res.status === 200) {
                this.messageService.add({
                    severity: 'success',
                    detail: this.util.translate(this.translate, 'default_toast.delete_success')
                });
                this.loadData();
            }
        });
    }
    doReverseFileVersion(item) {
        const paramsActive = {
            projectId: this.projectId,
            fileVersionId: item.id,
            folderId: this.folderId
        };
        this.fileService.reverseFileVersion(item.fileId, this.util.toSnakeCaseKey(paramsActive)).subscribe(res => {
            if (res.status === 200) {
                this.loadData();
                this.isBrowseFile.emit(true);
            }
        });
    }
    doDownloadFile(item) {
        const data = {
            email: this.authUser.mailAddress,
            os: ''
        };
        const params = {
            data: window.btoa(JSON.stringify(data).toString()),
            projectId: this.projectId,
            folderId: this.folderId,
            downloadType: this.constant.DOWNLOAD_TYPE.NORMAL,
            authToken: this.authService.token,
            fileVersion: item.id
        };
        let formattedParams = app_util_1.default.toSnakeCaseKey(params);
        let queryParams = new URLSearchParams();
        for (let key in formattedParams) {
            queryParams.set(key, formattedParams[key]);
        }
        window.open(environment_1.environment.backend_url + "/api/download/files/" + item.fileId + "?" + queryParams.toString(), "_self");
        // this.downloadService.downloadFile(item.fileId, this.util.toSnakeCaseKey(params), this.file.contentType).then((response) => {
        //   // when you use stricter type checking
        //   const blob: any = new Blob([response], {type: this.file.contentType});
        //   fileSaver.saveAs(blob, this.file.name);
        // }, (error) => {
        //   this.messageService.add({
        //     severity: 'error',
        //     detail: this.util.translate(this.translate, 'error.' + error.status)
        //   });
        // });
    }
}
exports.FileVersionComponent = FileVersionComponent;
FileVersionComponent.ɵfac = function FileVersionComponent_Factory(t) { return new (t || FileVersionComponent)(i0.ɵɵdirectiveInject(i1.AuthService), i0.ɵɵdirectiveInject(i2.FileService), i0.ɵɵdirectiveInject(i3.DatePipe), i0.ɵɵdirectiveInject(i4.TranslateService), i0.ɵɵdirectiveInject(i5.FolderService), i0.ɵɵdirectiveInject(i6.ConfirmationService), i0.ɵɵdirectiveInject(i7.DownloadService), i0.ɵɵdirectiveInject(i6.MessageService)); };
FileVersionComponent.ɵcmp = i0.ɵɵdefineComponent({ type: FileVersionComponent, selectors: [["app-file-version"]], inputs: { file: "file", projectId: "projectId", userFolderRole: "userFolderRole" }, outputs: { isBrowseFile: "isBrowseFile" }, decls: 2, vars: 2, consts: [["class", "p-grid p-field", 4, "ngFor", "ngForOf"], ["class", "p-col-12 p-text-center", 4, "ngIf"], [1, "p-grid", "p-field"], [1, "p-col-12", "p-mb-2"], ["severity", "info"], ["severity", "primary", "styleClass", "p-ml-2", 4, "ngIf"], [1, "p-col-12"], [1, "p-text-truncate", 3, "title"], [1, "p-col-12", "p-mb-2", 3, "innerHTML"], ["class", "p-col-12 p-d-flex p-pr-3 p-ai-center p-jc-between p-text-color-blue-500", 4, "ngIf"], ["severity", "primary", "styleClass", "p-ml-2"], [1, "p-col-12", "p-d-flex", "p-pr-3", "p-ai-center", "p-jc-between", "p-text-color-blue-500"], [1, "cs-pointer", "link", 3, "click"], [1, "p-col-12", "p-text-center"], [1, "lds-loading"]], template: function FileVersionComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵtemplate(0, FileVersionComponent_div_0_Template, 11, 12, "div", 0);
        i0.ɵɵtemplate(1, FileVersionComponent_div_1_Template, 5, 0, "div", 1);
    } if (rf & 2) {
        i0.ɵɵproperty("ngForOf", ctx.fileVersion);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.loading);
    } }, directives: [i3.NgForOf, i3.NgIf, i8.Tag], pipes: [i4.TranslatePipe], styles: [".link[_ngcontent-%COMP%] {\n  color: #5bc0de;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvZmlsZS9maWxlLXZlcnNpb24vZmlsZS12ZXJzaW9uLmNvbXBvbmVudC5zY3NzIiwic3JjL2FwcC9hdXRoZW50aWNhdGlvbi1wYWdlcy9maWxlL2ZpbGUtdmVyc2lvbi9maWxlLXZlcnNpb24uY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxjQUFBO0FDQ0YiLCJmaWxlIjoic3JjL2FwcC9hdXRoZW50aWNhdGlvbi1wYWdlcy9maWxlL2ZpbGUtdmVyc2lvbi9maWxlLXZlcnNpb24uY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyIubGluayB7XG4gIGNvbG9yOiAjNWJjMGRlO1xufVxuIiwiLmxpbmsge1xuICBjb2xvcjogIzViYzBkZTtcbn0iXX0= */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FileVersionComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-file-version',
                templateUrl: './file-version.component.html',
                styleUrls: ['./file-version.component.scss']
            }]
    }], function () { return [{ type: i1.AuthService }, { type: i2.FileService }, { type: i3.DatePipe }, { type: i4.TranslateService }, { type: i5.FolderService }, { type: i6.ConfirmationService }, { type: i7.DownloadService }, { type: i6.MessageService }]; }, { file: [{
            type: core_1.Input
        }], projectId: [{
            type: core_1.Input
        }], userFolderRole: [{
            type: core_1.Input
        }], isBrowseFile: [{
            type: core_1.Output
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/file/file.component.ts":
/*!*************************************************************!*\
  !*** ./src/app/authentication-pages/file/file.component.ts ***!
  \*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.FileComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
class FileComponent {
    constructor() { }
    ngOnInit() {
    }
}
exports.FileComponent = FileComponent;
FileComponent.ɵfac = function FileComponent_Factory(t) { return new (t || FileComponent)(); };
FileComponent.ɵcmp = i0.ɵɵdefineComponent({ type: FileComponent, selectors: [["app-file"]], decls: 1, vars: 0, template: function FileComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelement(0, "router-outlet");
    } }, directives: [i1.RouterOutlet], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2ZpbGUvZmlsZS5jb21wb25lbnQuc2NzcyJ9 */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FileComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-file',
                templateUrl: './file.component.html',
                styleUrls: ['./file.component.scss']
            }]
    }], function () { return []; }, null); })();


/***/ }),

/***/ "./src/app/authentication-pages/file/item-info/item-info.component.ts":
/*!****************************************************************************!*\
  !*** ./src/app/authentication-pages/file/item-info/item-info.component.ts ***!
  \****************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ItemInfoComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! ../../../shared/autofocus.directive */ "./src/app/shared/autofocus.directive.ts"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
function ItemInfoComponent_div_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelement(1, "i", 6);
    i0.ɵɵelementEnd();
} }
function ItemInfoComponent_div_3_span_2_i_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 21);
} }
function ItemInfoComponent_div_3_span_2_i_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 22);
} }
function ItemInfoComponent_div_3_span_2_i_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 23);
} }
function ItemInfoComponent_div_3_span_2_i_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 24);
} }
function ItemInfoComponent_div_3_span_2_i_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 25);
} }
function ItemInfoComponent_div_3_span_2_i_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 25);
} }
function ItemInfoComponent_div_3_span_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 15);
    i0.ɵɵtemplate(1, ItemInfoComponent_div_3_span_2_i_1_Template, 1, 0, "i", 16);
    i0.ɵɵtemplate(2, ItemInfoComponent_div_3_span_2_i_2_Template, 1, 0, "i", 17);
    i0.ɵɵtemplate(3, ItemInfoComponent_div_3_span_2_i_3_Template, 1, 0, "i", 18);
    i0.ɵɵtemplate(4, ItemInfoComponent_div_3_span_2_i_4_Template, 1, 0, "i", 19);
    i0.ɵɵtemplate(5, ItemInfoComponent_div_3_span_2_i_5_Template, 1, 0, "i", 20);
    i0.ɵɵtemplate(6, ItemInfoComponent_div_3_span_2_i_6_Template, 1, 0, "i", 14);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("ngSwitch", ctx_r3.file.fileType);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 1);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 3);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 4);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 5);
} }
function ItemInfoComponent_div_3_i_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 26);
} }
function ItemInfoComponent_div_3_i_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 27);
} }
function ItemInfoComponent_div_3_i_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 28);
} }
function ItemInfoComponent_div_3_i_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 29);
} }
function ItemInfoComponent_div_3_i_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 30);
} }
function ItemInfoComponent_div_3_i_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 25);
} }
function ItemInfoComponent_div_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelementStart(1, "div", 7);
    i0.ɵɵtemplate(2, ItemInfoComponent_div_3_span_2_Template, 7, 6, "span", 8);
    i0.ɵɵtemplate(3, ItemInfoComponent_div_3_i_3_Template, 1, 0, "i", 9);
    i0.ɵɵtemplate(4, ItemInfoComponent_div_3_i_4_Template, 1, 0, "i", 10);
    i0.ɵɵtemplate(5, ItemInfoComponent_div_3_i_5_Template, 1, 0, "i", 11);
    i0.ɵɵtemplate(6, ItemInfoComponent_div_3_i_6_Template, 1, 0, "i", 12);
    i0.ɵɵtemplate(7, ItemInfoComponent_div_3_i_7_Template, 1, 0, "i", 13);
    i0.ɵɵtemplate(8, ItemInfoComponent_div_3_i_8_Template, 1, 0, "i", 14);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitch", ctx_r1.appUtil.getGroupFromMimeType(ctx_r1.file));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "secure");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "video");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "audio");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "image");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "text");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "compress");
} }
function ItemInfoComponent_div_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 31);
    i0.ɵɵelement(1, "i", 32);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("title", i0.ɵɵpipeBind1(2, 1, "label.encoded"));
} }
class ItemInfoComponent {
    constructor(router) {
        this.router = router;
        this.appUtil = app_util_1.default;
    }
    ngOnInit() {
    }
    goToParent() {
        const urlLink = '/project/' + this.projectId + '/' + this.file.parentFolderId;
        if (this.router.url !== urlLink && !this.file.folder) {
            this.router.routeReuseStrategy.shouldReuseRoute = () => false;
            this.router.onSameUrlNavigation = 'reload';
            this.router.navigate(['/project/' + this.projectId + '/' + this.file.parentFolderId], { queryParams: { highlight: this.file.id } });
        }
    }
}
exports.ItemInfoComponent = ItemInfoComponent;
ItemInfoComponent.ɵfac = function ItemInfoComponent_Factory(t) { return new (t || ItemInfoComponent)(i0.ɵɵdirectiveInject(i1.Router)); };
ItemInfoComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ItemInfoComponent, selectors: [["app-item-info"]], inputs: { projectId: "projectId", file: "file" }, decls: 8, vars: 6, consts: [[1, "p-grid"], [1, "p-ml-1", "align-self-center"], [4, "ngIf"], ["class", "icon-protect", 4, "ngIf"], [1, "p-col-10", "p-pl-3"], [1, "p-col-12", "p-p-0", "p-text-truncate", "cs-pointer", 3, "appAutofocus", "title", "click"], [1, "fas", "fa-folder"], [1, "p-d-inline-flex", "p-align-center", "p-pl-1", 3, "ngSwitch"], [3, "ngSwitch", 4, "ngSwitchCase"], ["class", "fas fs-24 fa-file-video", 4, "ngSwitchCase"], ["class", "fas fs-24 fa-file-audio", 4, "ngSwitchCase"], ["class", "fas fs-24 fa-file-image", 4, "ngSwitchCase"], ["class", "far fs-24 fa-file-alt", 4, "ngSwitchCase"], ["class", "far fs-24 fa-file-archive", 4, "ngSwitchCase"], ["class", "far fs-24 fa-file", 4, "ngSwitchDefault"], [3, "ngSwitch"], ["class", "far fs-24 fa-file-pdf text-danger", 4, "ngSwitchCase"], ["class", "far fs-24 fa-file-word text-primary", 4, "ngSwitchCase"], ["class", "far fs-24 fa-file-excel text-success", 4, "ngSwitchCase"], ["class", "far fs-24 fa-file-powerpoint text-warning", 4, "ngSwitchCase"], ["class", "far fs-24 fa-file", 4, "ngSwitchCase"], [1, "far", "fs-24", "fa-file-pdf", "text-danger"], [1, "far", "fs-24", "fa-file-word", "text-primary"], [1, "far", "fs-24", "fa-file-excel", "text-success"], [1, "far", "fs-24", "fa-file-powerpoint", "text-warning"], [1, "far", "fs-24", "fa-file"], [1, "fas", "fs-24", "fa-file-video"], [1, "fas", "fs-24", "fa-file-audio"], [1, "fas", "fs-24", "fa-file-image"], [1, "far", "fs-24", "fa-file-alt"], [1, "far", "fs-24", "fa-file-archive"], [1, "icon-protect"], [1, "fas", "fa-lock", 3, "title"]], template: function ItemInfoComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵtemplate(2, ItemInfoComponent_div_2_Template, 2, 0, "div", 2);
        i0.ɵɵtemplate(3, ItemInfoComponent_div_3_Template, 9, 7, "div", 2);
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(4, ItemInfoComponent_div_4_Template, 3, 3, "div", 3);
        i0.ɵɵelementStart(5, "div", 4);
        i0.ɵɵelementStart(6, "div", 5);
        i0.ɵɵlistener("click", function ItemInfoComponent_Template_div_click_6_listener() { return ctx.goToParent(); });
        i0.ɵɵtext(7);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.file.folder);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", !ctx.file.folder);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.file.isEncrypt === 1);
        i0.ɵɵadvance(2);
        i0.ɵɵpropertyInterpolate("title", ctx.file.name);
        i0.ɵɵproperty("appAutofocus", true);
        i0.ɵɵadvance(1);
        i0.ɵɵtextInterpolate(ctx.file.name);
    } }, directives: [i2.NgIf, i3.AutofocusDirective, i2.NgSwitch, i2.NgSwitchCase, i2.NgSwitchDefault], pipes: [i4.TranslatePipe], styles: [".align-self-center[_ngcontent-%COMP%] {\n  align-self: center;\n}\n\n.icon-protect[_ngcontent-%COMP%] {\n  position: absolute;\n  left: 10px;\n  top: 20px;\n  background: white;\n  border-radius: 5px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvZmlsZS9pdGVtLWluZm8vaXRlbS1pbmZvLmNvbXBvbmVudC5zY3NzIiwic3JjL2FwcC9hdXRoZW50aWNhdGlvbi1wYWdlcy9maWxlL2l0ZW0taW5mby9pdGVtLWluZm8uY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxrQkFBQTtBQ0NGOztBREVBO0VBQ0Usa0JBQUE7RUFDQSxVQUFBO0VBQ0EsU0FBQTtFQUNBLGlCQUFBO0VBQ0Esa0JBQUE7QUNDRiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2ZpbGUvaXRlbS1pbmZvL2l0ZW0taW5mby5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIi5hbGlnbi1zZWxmLWNlbnRlciB7XG4gIGFsaWduLXNlbGY6IGNlbnRlcjtcbn1cblxuLmljb24tcHJvdGVjdCB7XG4gIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgbGVmdDogMTBweDtcbiAgdG9wOiAyMHB4O1xuICBiYWNrZ3JvdW5kOiB3aGl0ZTtcbiAgYm9yZGVyLXJhZGl1czogNXB4O1xufVxuIiwiLmFsaWduLXNlbGYtY2VudGVyIHtcbiAgYWxpZ24tc2VsZjogY2VudGVyO1xufVxuXG4uaWNvbi1wcm90ZWN0IHtcbiAgcG9zaXRpb246IGFic29sdXRlO1xuICBsZWZ0OiAxMHB4O1xuICB0b3A6IDIwcHg7XG4gIGJhY2tncm91bmQ6IHdoaXRlO1xuICBib3JkZXItcmFkaXVzOiA1cHg7XG59Il19 */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ItemInfoComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-item-info',
                templateUrl: './item-info.component.html',
                styleUrls: ['./item-info.component.scss']
            }]
    }], function () { return [{ type: i1.Router }]; }, { projectId: [{
            type: core_1.Input
        }], file: [{
            type: core_1.Input
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/file/item-title/item-title.component.ts":
/*!******************************************************************************!*\
  !*** ./src/app/authentication-pages/file/item-title/item-title.component.ts ***!
  \******************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ItemTitleComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
function ItemTitleComponent_span_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "label.file_size"));
} }
function ItemTitleComponent_span_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "label.folder_size"));
} }
function ItemTitleComponent_span_9_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(ctx_r2.appUtil.convertFileSize(ctx_r2.file.fileSize));
} }
function ItemTitleComponent_span_10_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(ctx_r3.file.fileSize);
} }
function ItemTitleComponent_span_17_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "label.updated_by"));
} }
function ItemTitleComponent_span_18_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "label.created_by"));
} }
class ItemTitleComponent {
    constructor(datePipe, translateService) {
        this.datePipe = datePipe;
        this.translateService = translateService;
        this.owner = app_util_1.default.translate(this.translateService, 'label.loading');
        this.appUtil = app_util_1.default;
    }
    ngOnInit() {
    }
}
exports.ItemTitleComponent = ItemTitleComponent;
ItemTitleComponent.ɵfac = function ItemTitleComponent_Factory(t) { return new (t || ItemTitleComponent)(i0.ɵɵdirectiveInject(i1.DatePipe), i0.ɵɵdirectiveInject(i2.TranslateService)); };
ItemTitleComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ItemTitleComponent, selectors: [["app-item-title"]], inputs: { owner: "owner", file: "file" }, decls: 21, vars: 16, consts: [[1, "p-mt-3", "p-grid"], [1, "p-col-12", "page-title-lv2", "p-p-2", "p-text-bold"], [1, "p-col-5", "p-px-0", "p-text-right", "p-text-bold"], [4, "ngIf"], [1, "p-col-7"], [1, "p-col-7", "p-text-truncate"]], template: function ItemTitleComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵelementStart(1, "label", 1);
        i0.ɵɵtext(2);
        i0.ɵɵpipe(3, "titlecase");
        i0.ɵɵpipe(4, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(5, "div", 2);
        i0.ɵɵtemplate(6, ItemTitleComponent_span_6_Template, 3, 3, "span", 3);
        i0.ɵɵtemplate(7, ItemTitleComponent_span_7_Template, 3, 3, "span", 3);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(8, "div", 4);
        i0.ɵɵtemplate(9, ItemTitleComponent_span_9_Template, 2, 1, "span", 3);
        i0.ɵɵtemplate(10, ItemTitleComponent_span_10_Template, 2, 1, "span", 3);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(11, "div", 2);
        i0.ɵɵtext(12);
        i0.ɵɵpipe(13, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(14, "div", 4);
        i0.ɵɵtext(15);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(16, "div", 2);
        i0.ɵɵtemplate(17, ItemTitleComponent_span_17_Template, 3, 3, "span", 3);
        i0.ɵɵtemplate(18, ItemTitleComponent_span_18_Template, 3, 3, "span", 3);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(19, "div", 5);
        i0.ɵɵtext(20);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 10, i0.ɵɵpipeBind1(4, 12, "label.detail")));
        i0.ɵɵadvance(4);
        i0.ɵɵproperty("ngIf", !ctx.file.folder);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.file.folder);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", !ctx.file.folder);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.file.folder);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(13, 14, "label.last_update"));
        i0.ɵɵadvance(3);
        i0.ɵɵtextInterpolate(ctx.appUtil.formatDateBasedOnDiff(ctx.datePipe, ctx.file.lastModifiedDate));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", !ctx.file.folder);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.file.folder);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(ctx.owner);
    } }, directives: [i1.NgIf], pipes: [i1.TitleCasePipe, i2.TranslatePipe], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2ZpbGUvaXRlbS10aXRsZS9pdGVtLXRpdGxlLmNvbXBvbmVudC5zY3NzIn0= */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ItemTitleComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-item-title',
                templateUrl: './item-title.component.html',
                styleUrls: ['./item-title.component.scss']
            }]
    }], function () { return [{ type: i1.DatePipe }, { type: i2.TranslateService }]; }, { owner: [{
            type: core_1.Input
        }], file: [{
            type: core_1.Input
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/folder/folder-info/folder-info.component.ts":
/*!**********************************************************************************!*\
  !*** ./src/app/authentication-pages/folder/folder-info/folder-info.component.ts ***!
  \**********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.FolderInfoComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const project_model_1 = __webpack_require__(/*! ../../../../models/project.model */ "./src/models/project.model.ts");
const moment_1 = tslib_1.__importStar(__webpack_require__(/*! moment */ "./node_modules/moment/moment.js"));
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/folder.service */ "./src/app/services/folder.service.ts"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! ../../file/item-info/item-info.component */ "./src/app/authentication-pages/file/item-info/item-info.component.ts"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! ../../file/item-title/item-title.component */ "./src/app/authentication-pages/file/item-title/item-title.component.ts"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! primeng/checkbox */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-checkbox.js"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i10 = tslib_1.__importStar(__webpack_require__(/*! primeng/ripple */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-ripple.js"));
const i11 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
const i12 = tslib_1.__importStar(__webpack_require__(/*! ../../drm/drm-setting/drm-setting.component */ "./src/app/authentication-pages/drm/drm-setting/drm-setting.component.ts"));
const i13 = tslib_1.__importStar(__webpack_require__(/*! ../../drm/view-online-setting/view-online-setting.component */ "./src/app/authentication-pages/drm/view-online-setting/view-online-setting.component.ts"));
const _c0 = ["drmSettingComponent"];
const _c1 = ["viewOnlineSettingComponent"];
function FolderInfoComponent_div_13_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 13);
    i0.ɵɵelement(1, "app-drm-setting", 14, 15);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("mode", "xs-small")("disabled", ctx_r0.disabled)("drmSetting", ctx_r0.folderInfo.drmSetting)("dateType", ctx_r0.appConstant.FORMAT_DATE.DRM_FORMAT_DATE);
} }
function FolderInfoComponent_div_20_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 13);
    i0.ɵɵelement(1, "app-view-online-setting", 16, 17);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("mode", "xs-small")("disabled", ctx_r1.disabled)("watermarkSetting", ctx_r1.folderInfo.watermarkSetting);
} }
class FolderInfoComponent {
    constructor(authService, fb, messageService, translateService, folderService) {
        this.authService = authService;
        this.fb = fb;
        this.messageService = messageService;
        this.translateService = translateService;
        this.folderService = folderService;
        this.updateSettingSuccess = new core_1.EventEmitter();
        this.appUtil = app_util_1.default;
        this.appConstant = app_constants_1.default;
        this.folderFrm = new forms_1.FormGroup({});
        this.folderModel = new project_model_1.CreateProject();
        this.disabled = false;
    }
    ngOnInit() {
        if (this.folder.userFolderRole > 2) {
            this.disabled = true;
        }
        this.authUser = this.authService.getAuthUser;
        this.folderFrm = this.fb.group({
            autoApplyDrm: [false],
            showWatermark: [false]
        });
        const params = {
            projectId: this.projectId,
            folderId: this.folder.id
        };
        this.folderService.getFolder(this.appUtil.toSnakeCaseKey(params)).subscribe(data => {
            if (data.status === 200) {
                if (this.authUser.lang === 'ja') {
                    this.owner = data.data.ownerLastName + ' ' + data.data.ownerFirstName;
                }
                else {
                    this.owner = data.data.ownerFirstName + ' ' + data.data.ownerLastName;
                }
                this.folderInfo = data.data.folder;
                if (this.folderInfo.watermarkSetting) {
                    const wm = this.appUtil.toCamelCaseKey(JSON.parse(this.folderInfo.watermarkSetting));
                    this.folderModel.showWatermark = (wm.showWm === 1);
                }
                this.folderModel.autoApplyDrm = (this.folderInfo.setting.charAt(0) === '1');
            }
        });
    }
    doUpdateFolderSetting() {
        let drmInvalid = false;
        let viewOnlineInvalid = false;
        if (this.folderFrm.value.autoApplyDrm) {
            this.drmSettingComponent.form.markAllAsTouched();
            if (this.drmSettingComponent.form.invalid) {
                drmInvalid = true;
            }
        }
        if (this.folderFrm.value.showWatermark) {
            this.viewOnlineSettingComponent.form.markAllAsTouched();
            if (this.viewOnlineSettingComponent.form.invalid) {
                viewOnlineInvalid = true;
            }
        }
        if (drmInvalid || viewOnlineInvalid) {
            return false;
        }
        // handle params
        const params = {
            projectId: this.projectId,
            drmSetting: undefined,
            setting: undefined,
            wmSettings: undefined,
        };
        let settings = (this.folderFrm.value.autoApplyDrm) ? '1' : '0';
        settings = settings.concat('00000');
        params.setting = settings;
        const drmSettings = {
            unlimited: 1,
            printable: 0,
            editable: 0,
            expiryDate: ''
        };
        let drmSetting = null;
        if (this.folderFrm.value.autoApplyDrm) {
            drmSettings.printable = (this.drmSettingComponent.form.value.printable) ? 1 : 0;
            drmSettings.editable = (this.drmSettingComponent.form.value.editable) ? 1 : 0;
            if (!this.drmSettingComponent.form.value.setDocExpiry) {
                delete drmSettings.expiryDate;
            }
            else {
                drmSettings.unlimited = 0;
                const expDate = new Date(this.drmSettingComponent.form.value.expiryDate);
                expDate.setHours(this.drmSettingComponent.form.value.expiryTime.getHours());
                expDate.setMinutes(this.drmSettingComponent.form.value.expiryTime.getMinutes());
                expDate.setSeconds(55);
                drmSettings.expiryDate = this.appUtil.formatBookendDate(expDate, this.drmSettingComponent.form.value.timezone.code, this.appConstant.FORMAT_DATE.LINK_FORMAT_DATE, moment_1.default);
                if (drmSettings.expiryDate <= moment_1.default(moment_1.utc(new Date())).format(this.appConstant.FORMAT_DATE.LINK_FORMAT_DATE)) {
                    this.messageService.add({
                        severity: 'error',
                        detail: this.appUtil.translate(this.translateService, 'error.invalid_expiry_date'),
                    });
                    return false;
                }
            }
            drmSetting = JSON.stringify(drmSettings);
        }
        params.drmSetting = drmSetting;
        const wmSet = {
            defaultWm: 1,
            showWm: 1,
            setting: null
        };
        const wmSubSetting = {
            wmText: '',
            wmFontSize: 50,
            wmColor: '',
            wmPosition: 'diagonal'
        };
        if (!this.folderFrm.value.showWatermark) {
            wmSet.showWm = 0;
        }
        else {
            if (this.viewOnlineSettingComponent.form.value.wmSetting === 'custom') {
                wmSet.defaultWm = 0;
                wmSubSetting.wmText = this.viewOnlineSettingComponent.form.value.wmContent;
                wmSubSetting.wmColor = this.viewOnlineSettingComponent.form.value.colorText;
                wmSubSetting.wmFontSize = this.viewOnlineSettingComponent.form.value.fontSize;
                wmSubSetting.wmPosition = this.viewOnlineSettingComponent.form.value.position;
                wmSet.setting = wmSubSetting;
            }
        }
        params.wmSettings = JSON.stringify(this.appUtil.toSnakeCaseKey(wmSet));
        this.folderService.updateFolderSettings(this.folderInfo.folderId, this.appUtil.toSnakeCaseKey(params))
            .subscribe(res => {
            if (res.status === 200) {
                this.messageService.add({
                    severity: 'success',
                    detail: this.appUtil.translate(this.translateService, 'default_toast.update_success')
                });
                this.updateSettingSuccess.emit({ folderId: this.folderInfo.folderId, setting: params.setting });
            }
        });
    }
}
exports.FolderInfoComponent = FolderInfoComponent;
FolderInfoComponent.ɵfac = function FolderInfoComponent_Factory(t) { return new (t || FolderInfoComponent)(i0.ɵɵdirectiveInject(i1.AuthService), i0.ɵɵdirectiveInject(i2.FormBuilder), i0.ɵɵdirectiveInject(i3.MessageService), i0.ɵɵdirectiveInject(i4.TranslateService), i0.ɵɵdirectiveInject(i5.FolderService)); };
FolderInfoComponent.ɵcmp = i0.ɵɵdefineComponent({ type: FolderInfoComponent, selectors: [["app-folder-info"]], viewQuery: function FolderInfoComponent_Query(rf, ctx) { if (rf & 1) {
        i0.ɵɵviewQuery(_c0, 1);
        i0.ɵɵviewQuery(_c1, 1);
    } if (rf & 2) {
        let _t;
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.drmSettingComponent = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.viewOnlineSettingComponent = _t.first);
    } }, inputs: { projectId: "projectId", folder: "folder" }, outputs: { updateSettingSuccess: "updateSettingSuccess" }, decls: 25, vars: 28, consts: [[3, "file", "projectId"], [3, "file", "owner"], [1, "p-mt-2", "p-grid", 3, "formGroup"], [1, "p-col-12", "page-title-lv2", "p-p-2", "p-text-bold"], [1, "p-col-12", "p-fluid", "p-formgrid", "p-grid", "p-pr-0"], [1, "p-field-checkbox", "p-col-12"], ["name", "autoApplyDrm", "binary", "true", "formControlName", "autoApplyDrm", "inputId", "auto-apply-drm", 3, "disabled", "ngModel", "ngModelChange"], ["for", "auto-apply-drm"], ["class", "p-col-12 p-pl-5", 4, "ngIf"], ["name", "showWatermark", "binary", "true", "formControlName", "showWatermark", "inputId", "show-watermark", 3, "disabled", "ngModel", "ngModelChange"], ["for", "show-watermark"], [1, "p-col-12", "p-text-right"], ["type", "submit", "pRipple", "", "pButton", "", "icon", "fas fa-check", 1, "p-button-raised", 3, "label", "disabled", "click"], [1, "p-col-12", "p-pl-5"], [3, "mode", "disabled", "drmSetting", "dateType"], ["drmSettingComponent", ""], [3, "mode", "disabled", "watermarkSetting"], ["viewOnlineSettingComponent", ""]], template: function FolderInfoComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelement(0, "app-item-info", 0);
        i0.ɵɵelement(1, "app-item-title", 1);
        i0.ɵɵelementStart(2, "form", 2);
        i0.ɵɵelementStart(3, "div", 3);
        i0.ɵɵtext(4);
        i0.ɵɵpipe(5, "titlecase");
        i0.ɵɵpipe(6, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(7, "div", 4);
        i0.ɵɵelementStart(8, "div", 5);
        i0.ɵɵelementStart(9, "p-checkbox", 6);
        i0.ɵɵlistener("ngModelChange", function FolderInfoComponent_Template_p_checkbox_ngModelChange_9_listener($event) { return ctx.folderModel.autoApplyDrm = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(10, "label", 7);
        i0.ɵɵtext(11);
        i0.ɵɵpipe(12, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(13, FolderInfoComponent_div_13_Template, 3, 4, "div", 8);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(14, "div", 4);
        i0.ɵɵelementStart(15, "div", 5);
        i0.ɵɵelementStart(16, "p-checkbox", 9);
        i0.ɵɵlistener("ngModelChange", function FolderInfoComponent_Template_p_checkbox_ngModelChange_16_listener($event) { return ctx.folderModel.showWatermark = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(17, "label", 10);
        i0.ɵɵtext(18);
        i0.ɵɵpipe(19, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(20, FolderInfoComponent_div_20_Template, 3, 3, "div", 8);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(21, "div", 11);
        i0.ɵɵelementStart(22, "button", 12);
        i0.ɵɵlistener("click", function FolderInfoComponent_Template_button_click_22_listener() { return ctx.doUpdateFolderSetting(); });
        i0.ɵɵpipe(23, "uppercase");
        i0.ɵɵpipe(24, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵproperty("file", ctx.folder)("projectId", ctx.projectId);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("file", ctx.folder)("owner", ctx.owner);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("formGroup", ctx.folderFrm);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 16, i0.ɵɵpipeBind1(6, 18, "label.folder_settings")));
        i0.ɵɵadvance(5);
        i0.ɵɵproperty("disabled", ctx.disabled)("ngModel", ctx.folderModel.autoApplyDrm);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(12, 20, "label.apply_drm"), " ");
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.folderModel.autoApplyDrm);
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("disabled", ctx.disabled)("ngModel", ctx.folderModel.showWatermark);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(19, 22, "label.show_wm"), " ");
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.folderModel.showWatermark);
        i0.ɵɵadvance(2);
        i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(23, 24, i0.ɵɵpipeBind1(24, 26, "label.save")));
        i0.ɵɵproperty("disabled", ctx.disabled);
    } }, directives: [i6.ItemInfoComponent, i7.ItemTitleComponent, i2.ɵangular_packages_forms_forms_y, i2.NgControlStatusGroup, i2.FormGroupDirective, i8.Checkbox, i2.NgControlStatus, i2.FormControlName, i9.NgIf, i10.Ripple, i11.ButtonDirective, i12.DrmSettingComponent, i13.ViewOnlineSettingComponent], pipes: [i9.TitleCasePipe, i4.TranslatePipe, i9.UpperCasePipe], styles: [".p-field-checkbox[_ngcontent-%COMP%]    > label[_ngcontent-%COMP%], .p-field-radiobutton[_ngcontent-%COMP%]    > label[_ngcontent-%COMP%] {\n  margin-left: 0.5rem;\n  line-height: 1.4;\n  letter-spacing: -0.5px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvZm9sZGVyL2ZvbGRlci1pbmZvL2ZvbGRlci1pbmZvLmNvbXBvbmVudC5zY3NzIiwic3JjL2FwcC9hdXRoZW50aWNhdGlvbi1wYWdlcy9mb2xkZXIvZm9sZGVyLWluZm8vZm9sZGVyLWluZm8uY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxtQkFBQTtFQUNBLGdCQUFBO0VBQ0Esc0JBQUE7QUNDRiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2ZvbGRlci9mb2xkZXItaW5mby9mb2xkZXItaW5mby5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIi5wLWZpZWxkLWNoZWNrYm94ID4gbGFiZWwsIC5wLWZpZWxkLXJhZGlvYnV0dG9uID4gbGFiZWwge1xuICBtYXJnaW4tbGVmdDogMC41cmVtO1xuICBsaW5lLWhlaWdodDogMS40O1xuICBsZXR0ZXItc3BhY2luZzogLTAuNXB4O1xufVxuIiwiLnAtZmllbGQtY2hlY2tib3ggPiBsYWJlbCwgLnAtZmllbGQtcmFkaW9idXR0b24gPiBsYWJlbCB7XG4gIG1hcmdpbi1sZWZ0OiAwLjVyZW07XG4gIGxpbmUtaGVpZ2h0OiAxLjQ7XG4gIGxldHRlci1zcGFjaW5nOiAtMC41cHg7XG59Il19 */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FolderInfoComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-folder-info',
                templateUrl: './folder-info.component.html',
                styleUrls: ['./folder-info.component.scss']
            }]
    }], function () { return [{ type: i1.AuthService }, { type: i2.FormBuilder }, { type: i3.MessageService }, { type: i4.TranslateService }, { type: i5.FolderService }]; }, { drmSettingComponent: [{
            type: core_1.ViewChild,
            args: ['drmSettingComponent']
        }], viewOnlineSettingComponent: [{
            type: core_1.ViewChild,
            args: ['viewOnlineSettingComponent']
        }], projectId: [{
            type: core_1.Input
        }], folder: [{
            type: core_1.Input
        }], updateSettingSuccess: [{
            type: core_1.Output
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/folder/folder.component.ts":
/*!*****************************************************************!*\
  !*** ./src/app/authentication-pages/folder/folder.component.ts ***!
  \*****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.FolderComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
class FolderComponent {
    constructor() { }
    ngOnInit() {
    }
}
exports.FolderComponent = FolderComponent;
FolderComponent.ɵfac = function FolderComponent_Factory(t) { return new (t || FolderComponent)(); };
FolderComponent.ɵcmp = i0.ɵɵdefineComponent({ type: FolderComponent, selectors: [["app-folder"]], decls: 1, vars: 0, template: function FolderComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelement(0, "router-outlet");
    } }, directives: [i1.RouterOutlet], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2ZvbGRlci9mb2xkZXIuY29tcG9uZW50LnNjc3MifQ== */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FolderComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-folder',
                templateUrl: './folder.component.html',
                styleUrls: ['./folder.component.scss']
            }]
    }], function () { return []; }, null); })();


/***/ }),

/***/ "./src/app/authentication-pages/history/history-tracking/history-tracking.component.ts":
/*!*********************************************************************************************!*\
  !*** ./src/app/authentication-pages/history/history-tracking/history-tracking.component.ts ***!
  \*********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.HistoryTrackingComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const app_constants_1 = __webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/__ivy_ngcc__/fesm2015/platform-browser.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/history.service */ "./src/app/services/history.service.ts"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! primeng/scrolltop */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-scrolltop.js"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! primeng/timeline */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-timeline.js"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i10 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
const i11 = tslib_1.__importStar(__webpack_require__(/*! primeng/ripple */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-ripple.js"));
function HistoryTrackingComponent_ng_template_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 9);
    i0.ɵɵelement(1, "i", 10);
    i0.ɵɵelementEnd();
} }
function HistoryTrackingComponent_ng_template_7_div_0_span_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 18);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "label.you"), " ");
} }
function HistoryTrackingComponent_ng_template_7_div_0_span_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 19);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r7 = i0.ɵɵnextContext().$implicit;
    const ctx_r9 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", ctx_r9.getUserName(item_r7.userFirstName, item_r7.userLastName), " ");
} }
function HistoryTrackingComponent_ng_template_7_div_0_div_8_span_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵelement(1, "i", 20);
    i0.ɵɵelementStart(2, "label", 21);
    i0.ɵɵtext(3);
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 1, "label.log_in"));
} }
function HistoryTrackingComponent_ng_template_7_div_0_div_8_span_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵelement(1, "i", 22);
    i0.ɵɵelementStart(2, "label", 21);
    i0.ɵɵtext(3);
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 1, "label.log_out"));
} }
function HistoryTrackingComponent_ng_template_7_div_0_div_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtemplate(1, HistoryTrackingComponent_ng_template_7_div_0_div_8_span_1_Template, 5, 3, "span", 17);
    i0.ɵɵtemplate(2, HistoryTrackingComponent_ng_template_7_div_0_div_8_span_2_Template, 5, 3, "span", 17);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r7 = i0.ɵɵnextContext().$implicit;
    const ctx_r10 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r7.historyType === ctx_r10.historyType.LOG_IN);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r7.historyType === ctx_r10.historyType.LOG_OUT);
} }
function HistoryTrackingComponent_ng_template_7_div_0_div_9_span_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵelement(1, "i", 24);
    i0.ɵɵelementStart(2, "label", 21);
    i0.ɵɵtext(3);
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 1, "label.add_project"));
} }
function HistoryTrackingComponent_ng_template_7_div_0_div_9_span_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵelement(1, "i", 25);
    i0.ɵɵelementStart(2, "label", 21);
    i0.ɵɵtext(3);
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 1, "label.update_project"));
} }
function HistoryTrackingComponent_ng_template_7_div_0_div_9_span_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵelement(1, "i", 26);
    i0.ɵɵelementStart(2, "label", 21);
    i0.ɵɵtext(3);
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 1, "label.delete_project"));
} }
function HistoryTrackingComponent_ng_template_7_div_0_div_9_span_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵelement(1, "i", 27);
    i0.ɵɵelementStart(2, "label", 21);
    i0.ɵɵtext(3);
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 1, "label.copy_project"));
} }
function HistoryTrackingComponent_ng_template_7_div_0_div_9_div_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 28);
    i0.ɵɵelement(1, "i", 29);
    i0.ɵɵelementStart(2, "div", 30);
    i0.ɵɵelementStart(3, "span", 31);
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const project_r25 = ctx.$implicit;
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("title", project_r25.name);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", project_r25.name, " ");
} }
function HistoryTrackingComponent_ng_template_7_div_0_div_9_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtemplate(1, HistoryTrackingComponent_ng_template_7_div_0_div_9_span_1_Template, 5, 3, "span", 17);
    i0.ɵɵtemplate(2, HistoryTrackingComponent_ng_template_7_div_0_div_9_span_2_Template, 5, 3, "span", 17);
    i0.ɵɵtemplate(3, HistoryTrackingComponent_ng_template_7_div_0_div_9_span_3_Template, 5, 3, "span", 17);
    i0.ɵɵtemplate(4, HistoryTrackingComponent_ng_template_7_div_0_div_9_span_4_Template, 5, 3, "span", 17);
    i0.ɵɵtemplate(5, HistoryTrackingComponent_ng_template_7_div_0_div_9_div_5_Template, 5, 2, "div", 23);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r7 = i0.ɵɵnextContext().$implicit;
    const ctx_r11 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r7.historyType === ctx_r11.historyType.ADD_PROJECT);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r7.historyType === ctx_r11.historyType.UPDATE_PROJECT);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r7.historyType === ctx_r11.historyType.DELETE_PROJECT);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r7.historyType === ctx_r11.historyType.COPY_PROJECT);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngForOf", item_r7.data.result);
} }
function HistoryTrackingComponent_ng_template_7_div_0_div_10_span_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 36);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r7 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", item_r7.data.transferUser.lastName, " ");
} }
function HistoryTrackingComponent_ng_template_7_div_0_div_10_span_11_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 36);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r7 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", item_r7.data.transferUser.lastName, " ");
} }
function HistoryTrackingComponent_ng_template_7_div_0_div_10_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelement(1, "i", 32);
    i0.ɵɵelementStart(2, "label", 21);
    i0.ɵɵtext(3);
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "div", 28);
    i0.ɵɵelement(6, "i", 33);
    i0.ɵɵelementStart(7, "span", 34);
    i0.ɵɵtemplate(8, HistoryTrackingComponent_ng_template_7_div_0_div_10_span_8_Template, 2, 1, "span", 35);
    i0.ɵɵelementStart(9, "span", 36);
    i0.ɵɵtext(10);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(11, HistoryTrackingComponent_ng_template_7_div_0_div_10_span_11_Template, 2, 1, "span", 35);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r7 = i0.ɵɵnextContext().$implicit;
    const ctx_r12 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 5, "label.transferred_project"));
    i0.ɵɵadvance(4);
    i0.ɵɵpropertyInterpolate("title", ctx_r12.getUserName(item_r7.data.transferUser.firstName, item_r7.data.transferUser.lastName));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r12.authUser.lang === "ja");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", item_r7.data.transferUser.firstName, " ");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r12.authUser.lang !== "ja");
} }
function HistoryTrackingComponent_ng_template_7_div_0_div_11_span_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵelement(1, "i", 38);
    i0.ɵɵelementStart(2, "label", 21);
    i0.ɵɵtext(3);
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 1, "label.add_user"));
} }
function HistoryTrackingComponent_ng_template_7_div_0_div_11_span_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵelement(1, "i", 39);
    i0.ɵɵelementStart(2, "label", 21);
    i0.ɵɵtext(3);
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 1, "label.update_user"));
} }
function HistoryTrackingComponent_ng_template_7_div_0_div_11_span_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵelement(1, "i", 26);
    i0.ɵɵelementStart(2, "label", 21);
    i0.ɵɵtext(3);
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 1, "label.delete_user"));
} }
function HistoryTrackingComponent_ng_template_7_div_0_div_11_div_4_span_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 36);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const member_r36 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", member_r36.lastName, " ");
} }
function HistoryTrackingComponent_ng_template_7_div_0_div_11_div_4_span_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 36);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const member_r36 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", member_r36.lastName, " ");
} }
function HistoryTrackingComponent_ng_template_7_div_0_div_11_div_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 40);
    i0.ɵɵelement(1, "i", 41);
    i0.ɵɵelementStart(2, "span", 34);
    i0.ɵɵtemplate(3, HistoryTrackingComponent_ng_template_7_div_0_div_11_div_4_span_3_Template, 2, 1, "span", 35);
    i0.ɵɵelementStart(4, "span", 36);
    i0.ɵɵtext(5);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(6, HistoryTrackingComponent_ng_template_7_div_0_div_11_div_4_span_6_Template, 2, 1, "span", 35);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const member_r36 = ctx.$implicit;
    const item_r7 = i0.ɵɵnextContext(2).$implicit;
    const ctx_r35 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("ngClass", item_r7.historyType === ctx_r35.historyType.ADD_USER ? "ml-28" : item_r7.historyType === ctx_r35.historyType.UPDATE_USER ? "ml-26" : "ml-23");
    i0.ɵɵadvance(2);
    i0.ɵɵpropertyInterpolate("title", ctx_r35.getUserName(member_r36.firstName, member_r36.lastName));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r35.authUser.lang === "ja");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", member_r36.firstName, " ");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r35.authUser.lang !== "ja");
} }
function HistoryTrackingComponent_ng_template_7_div_0_div_11_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtemplate(1, HistoryTrackingComponent_ng_template_7_div_0_div_11_span_1_Template, 5, 3, "span", 17);
    i0.ɵɵtemplate(2, HistoryTrackingComponent_ng_template_7_div_0_div_11_span_2_Template, 5, 3, "span", 17);
    i0.ɵɵtemplate(3, HistoryTrackingComponent_ng_template_7_div_0_div_11_span_3_Template, 5, 3, "span", 17);
    i0.ɵɵtemplate(4, HistoryTrackingComponent_ng_template_7_div_0_div_11_div_4_Template, 7, 5, "div", 37);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r7 = i0.ɵɵnextContext().$implicit;
    const ctx_r13 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r7.historyType === ctx_r13.historyType.ADD_USER);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r7.historyType === ctx_r13.historyType.UPDATE_USER);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r7.historyType === ctx_r13.historyType.DELETE_USER);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngForOf", item_r7.data.result);
} }
function HistoryTrackingComponent_ng_template_7_div_0_div_12_span_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵelement(1, "i", 43);
    i0.ɵɵelementStart(2, "label", 21);
    i0.ɵɵtext(3);
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 1, "label.create_group"));
} }
function HistoryTrackingComponent_ng_template_7_div_0_div_12_span_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵelement(1, "i", 44);
    i0.ɵɵelementStart(2, "label", 21);
    i0.ɵɵtext(3);
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 1, "label.update_group"));
} }
function HistoryTrackingComponent_ng_template_7_div_0_div_12_span_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵelement(1, "i", 45);
    i0.ɵɵelementStart(2, "label", 21);
    i0.ɵɵtext(3);
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 1, "label.delete_group"));
} }
function HistoryTrackingComponent_ng_template_7_div_0_div_12_div_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 46);
    i0.ɵɵelement(1, "i", 44);
    i0.ɵɵelementStart(2, "div", 30);
    i0.ɵɵelementStart(3, "span", 47);
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const group_r47 = ctx.$implicit;
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("title", group_r47.name);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", group_r47.name, " ");
} }
function HistoryTrackingComponent_ng_template_7_div_0_div_12_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtemplate(1, HistoryTrackingComponent_ng_template_7_div_0_div_12_span_1_Template, 5, 3, "span", 17);
    i0.ɵɵtemplate(2, HistoryTrackingComponent_ng_template_7_div_0_div_12_span_2_Template, 5, 3, "span", 17);
    i0.ɵɵtemplate(3, HistoryTrackingComponent_ng_template_7_div_0_div_12_span_3_Template, 5, 3, "span", 17);
    i0.ɵɵtemplate(4, HistoryTrackingComponent_ng_template_7_div_0_div_12_div_4_Template, 5, 2, "div", 42);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r7 = i0.ɵɵnextContext().$implicit;
    const ctx_r14 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r7.historyType === ctx_r14.historyType.CREATE_GROUP);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r7.historyType === ctx_r14.historyType.UPDATE_GROUP);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r7.historyType === ctx_r14.historyType.DELETE_GROUP);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngForOf", item_r7.data.result);
} }
const _c0 = function (a0) { return { count: a0 }; };
function HistoryTrackingComponent_ng_template_7_div_0_div_13_span_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵelement(1, "i", 43);
    i0.ɵɵelementStart(2, "label", 49);
    i0.ɵɵtext(3);
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r7 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate1(" ", item_r7.data.result.length === 1 ? i0.ɵɵpipeBind1(4, 1, "label.add_member_group") : i0.ɵɵpipeBind2(5, 3, "label.add_member_groups", i0.ɵɵpureFunction1(6, _c0, item_r7.data.result.length)), " ");
} }
function HistoryTrackingComponent_ng_template_7_div_0_div_13_span_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵelement(1, "i", 44);
    i0.ɵɵelementStart(2, "label", 21);
    i0.ɵɵtext(3);
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r7 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(item_r7.data.result.length === 1 ? i0.ɵɵpipeBind1(4, 1, "label.move_member_group") : i0.ɵɵpipeBind2(5, 3, "label.move_member_groups", i0.ɵɵpureFunction1(6, _c0, item_r7.data.result.length)));
} }
function HistoryTrackingComponent_ng_template_7_div_0_div_13_span_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵelement(1, "i", 45);
    i0.ɵɵelementStart(2, "label", 21);
    i0.ɵɵtext(3);
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r7 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(item_r7.data.result.length === 1 ? i0.ɵɵpipeBind1(4, 1, "label.remove_member_group") : i0.ɵɵpipeBind2(5, 3, "label.remove_member_groups", i0.ɵɵpureFunction1(6, _c0, item_r7.data.result.length)));
} }
function HistoryTrackingComponent_ng_template_7_div_0_div_13_div_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 46);
    i0.ɵɵelement(1, "i", 44);
    i0.ɵɵelementStart(2, "div", 30);
    i0.ɵɵelementStart(3, "span", 47);
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const group_r57 = ctx.$implicit;
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("title", group_r57.name);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", group_r57.name, " ");
} }
function HistoryTrackingComponent_ng_template_7_div_0_div_13_div_5_span_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 36);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const member_r58 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", member_r58.lastName, " ");
} }
function HistoryTrackingComponent_ng_template_7_div_0_div_13_div_5_span_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 36);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const member_r58 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", member_r58.lastName, " ");
} }
function HistoryTrackingComponent_ng_template_7_div_0_div_13_div_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 50);
    i0.ɵɵelement(1, "i", 41);
    i0.ɵɵelementStart(2, "span", 51);
    i0.ɵɵtemplate(3, HistoryTrackingComponent_ng_template_7_div_0_div_13_div_5_span_3_Template, 2, 1, "span", 35);
    i0.ɵɵelementStart(4, "span", 36);
    i0.ɵɵtext(5);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(6, HistoryTrackingComponent_ng_template_7_div_0_div_13_div_5_span_6_Template, 2, 1, "span", 35);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const member_r58 = ctx.$implicit;
    const ctx_r53 = i0.ɵɵnextContext(4);
    i0.ɵɵadvance(2);
    i0.ɵɵpropertyInterpolate("title", ctx_r53.getUserName(member_r58.firstName, member_r58.lastName));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r53.authUser.lang === "ja");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", member_r58.firstName, " ");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r53.authUser.lang !== "ja");
} }
function HistoryTrackingComponent_ng_template_7_div_0_div_13_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtemplate(1, HistoryTrackingComponent_ng_template_7_div_0_div_13_span_1_Template, 6, 8, "span", 17);
    i0.ɵɵtemplate(2, HistoryTrackingComponent_ng_template_7_div_0_div_13_span_2_Template, 6, 8, "span", 17);
    i0.ɵɵtemplate(3, HistoryTrackingComponent_ng_template_7_div_0_div_13_span_3_Template, 6, 8, "span", 17);
    i0.ɵɵtemplate(4, HistoryTrackingComponent_ng_template_7_div_0_div_13_div_4_Template, 5, 2, "div", 42);
    i0.ɵɵtemplate(5, HistoryTrackingComponent_ng_template_7_div_0_div_13_div_5_Template, 7, 4, "div", 48);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r7 = i0.ɵɵnextContext().$implicit;
    const ctx_r15 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r7.historyType === ctx_r15.historyType.ADD_MEMBER_GROUP);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r7.historyType === ctx_r15.historyType.MOVE_MEMBER_GROUP);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", item_r7.historyType === ctx_r15.historyType.REMOVE_MEMBER_GROUP);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngForOf", item_r7.data.object);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngForOf", item_r7.data.result);
} }
const _c1 = function (a0, a1) { return [a0, a1]; };
const _c2 = function (a0, a1, a2, a3) { return [a0, a1, a2, a3]; };
const _c3 = function (a0) { return [a0]; };
const _c4 = function (a0, a1, a2) { return [a0, a1, a2]; };
function HistoryTrackingComponent_ng_template_7_div_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelementStart(1, "div", 12);
    i0.ɵɵelementStart(2, "span", 13);
    i0.ɵɵtext(3);
    i0.ɵɵpipe(4, "date");
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(5, HistoryTrackingComponent_ng_template_7_div_0_span_5_Template, 3, 3, "span", 14);
    i0.ɵɵtemplate(6, HistoryTrackingComponent_ng_template_7_div_0_span_6_Template, 2, 1, "span", 15);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(7, "div", 16);
    i0.ɵɵtemplate(8, HistoryTrackingComponent_ng_template_7_div_0_div_8_Template, 3, 2, "div", 17);
    i0.ɵɵtemplate(9, HistoryTrackingComponent_ng_template_7_div_0_div_9_Template, 6, 5, "div", 17);
    i0.ɵɵtemplate(10, HistoryTrackingComponent_ng_template_7_div_0_div_10_Template, 12, 7, "div", 17);
    i0.ɵɵtemplate(11, HistoryTrackingComponent_ng_template_7_div_0_div_11_Template, 5, 4, "div", 17);
    i0.ɵɵtemplate(12, HistoryTrackingComponent_ng_template_7_div_0_div_12_Template, 5, 4, "div", 17);
    i0.ɵɵtemplate(13, HistoryTrackingComponent_ng_template_7_div_0_div_13_Template, 6, 5, "div", 17);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r7 = ctx.$implicit;
    const ctx_r6 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(2);
    i0.ɵɵpropertyInterpolate("title", ctx_r6.util.formatDateBasedOnDiff(ctx_r6.datePipe, item_r7.createDate));
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(4, 10, item_r7.createDate, "HH:mm"), " ");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r6.authUser.userId === item_r7.userId);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r6.authUser.userId !== item_r7.userId);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", i0.ɵɵpureFunction2(13, _c1, ctx_r6.historyType.LOG_IN, ctx_r6.historyType.LOG_OUT).indexOf(item_r7.historyType) !== -1);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", i0.ɵɵpureFunction4(16, _c2, ctx_r6.historyType.ADD_PROJECT, ctx_r6.historyType.UPDATE_PROJECT, ctx_r6.historyType.DELETE_PROJECT, ctx_r6.historyType.COPY_PROJECT).indexOf(item_r7.historyType) !== -1);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", i0.ɵɵpureFunction1(21, _c3, ctx_r6.historyType.TRANSFERRED_PROJECT).indexOf(item_r7.historyType) !== -1);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", i0.ɵɵpureFunction3(23, _c4, ctx_r6.historyType.ADD_USER, ctx_r6.historyType.UPDATE_USER, ctx_r6.historyType.DELETE_USER).indexOf(item_r7.historyType) !== -1);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", i0.ɵɵpureFunction3(27, _c4, ctx_r6.historyType.CREATE_GROUP, ctx_r6.historyType.UPDATE_GROUP, ctx_r6.historyType.DELETE_GROUP).indexOf(item_r7.historyType) !== -1);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", i0.ɵɵpureFunction3(31, _c4, ctx_r6.historyType.ADD_MEMBER_GROUP, ctx_r6.historyType.REMOVE_MEMBER_GROUP, ctx_r6.historyType.MOVE_MEMBER_GROUP).indexOf(item_r7.historyType) !== -1);
} }
function HistoryTrackingComponent_ng_template_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, HistoryTrackingComponent_ng_template_7_div_0_Template, 14, 35, "div", 11);
} if (rf & 2) {
    const events_r5 = ctx.$implicit;
    i0.ɵɵproperty("ngForOf", events_r5.events);
} }
function HistoryTrackingComponent_ng_template_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtext(0);
    i0.ɵɵpipe(1, "date");
} if (rf & 2) {
    const event_r64 = ctx.$implicit;
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(1, 1, event_r64.date, "MM/dd/YYYY"), " ");
} }
function HistoryTrackingComponent_div_9_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 52);
    i0.ɵɵelementStart(1, "div", 53);
    i0.ɵɵelement(2, "div");
    i0.ɵɵelement(3, "div");
    i0.ɵɵelement(4, "div");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} }
function HistoryTrackingComponent_button_11_Template(rf, ctx) { if (rf & 1) {
    const _r66 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 54);
    i0.ɵɵlistener("click", function HistoryTrackingComponent_button_11_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r66); const ctx_r65 = i0.ɵɵnextContext(); return ctx_r65.getListMessage(true); });
    i0.ɵɵpipe(1, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r4 = i0.ɵɵnextContext();
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(1, 2, "label.load_more"));
    i0.ɵɵproperty("disabled", ctx_r4.loading);
} }
class HistoryTrackingComponent {
    constructor(titleService, translate, authService, router, historyService, datePipe) {
        this.titleService = titleService;
        this.translate = translate;
        this.authService = authService;
        this.router = router;
        this.historyService = historyService;
        this.datePipe = datePipe;
        this.util = app_util_1.default;
        this.historyType = app_constants_1.HistoryType;
        this.isFirstLoad = true;
        this.loading = true;
        this.listHistory = [];
        this.translate.get(['page_title.history']).subscribe(translation => {
            this.titleService.setTitle(translation['page_title.history']);
        });
    }
    ngOnInit() {
        this.authUser = this.authService.getAuthUser;
        if (this.authUser.roleId === app_constants_1.SystemRole.Guest) {
            this.router.navigate(['/project']);
        }
        this.getListMessage(false);
    }
    getListMessage(isLoadMore) {
        this.loading = true;
        const lastDate = (this.listHistory && this.listHistory.length > 0 && isLoadMore)
            ? (this.listHistory[this.listHistory.length - 1]
                .events[this.listHistory[this.listHistory.length - 1].events.length - 1].lastUpdate || 0) : 0;
        const params = {
            pageSize: 10,
            // 300,301,302,303,304,400,401,402,403,404,800,801,802,803,804,805
            historyTypes: app_constants_1.HistoryType.ADD_PROJECT + ',' + app_constants_1.HistoryType.UPDATE_PROJECT + ',' +
                app_constants_1.HistoryType.DELETE_PROJECT + ',' + app_constants_1.HistoryType.COPY_PROJECT + ',' + app_constants_1.HistoryType.TRANSFERRED_PROJECT + ',' +
                app_constants_1.HistoryType.ADD_USER + ',' + app_constants_1.HistoryType.UPDATE_USER + ',' + app_constants_1.HistoryType.DELETE_USER + ',' +
                app_constants_1.HistoryType.LOG_IN + ',' + app_constants_1.HistoryType.LOG_OUT + ',' +
                app_constants_1.HistoryType.CREATE_GROUP + ',' + app_constants_1.HistoryType.UPDATE_GROUP + ',' + app_constants_1.HistoryType.DELETE_GROUP + ',' +
                app_constants_1.HistoryType.ADD_MEMBER_GROUP + ',' + app_constants_1.HistoryType.REMOVE_MEMBER_GROUP + ',' + app_constants_1.HistoryType.MOVE_MEMBER_GROUP,
            lastUpdate: lastDate
        };
        // no call API if end
        if (this.totalRecords === 0 && isLoadMore) {
            this.loading = false;
            return;
        }
        this.historyService.getHistory(this.authUser.teamId, this.util.toSnakeCaseKey(params))
            .subscribe(res => {
            if (res.status === 200) {
                if (this.listHistory && this.listHistory.length > 0) {
                    res.data.content.forEach(content => {
                        const date = content.createDate.split('T')[0];
                        const index = this.listHistory.findIndex(h => h.date === date);
                        if (index !== -1) {
                            this.listHistory[index].events = [...this.listHistory[index].events, content];
                        }
                        else {
                            this.listHistory = [...this.listHistory, {
                                    date,
                                    events: [...[], content]
                                }];
                        }
                    });
                }
                else {
                    // this gives an object with dates as keys
                    const groups = res.data.content.reduce((group, events) => {
                        const date = events.createDate.split('T')[0];
                        if (!group[date]) {
                            group[date] = [];
                        }
                        group[date].push(events);
                        return group;
                    }, {});
                    // Edit: to add it in the array format instead
                    this.listHistory = Object.keys(groups).map((date) => {
                        return {
                            date,
                            events: groups[date]
                        };
                    });
                }
                // trigger change detection
                this.listHistory = [...this.listHistory];
                this.totalRecords = res.data.totalElements;
            }
            this.loading = false;
        });
    }
    getUserName(firstName, lastName) {
        return (this.authUser.lang === 'ja' ? lastName : firstName) + ' ' + lastName;
    }
}
exports.HistoryTrackingComponent = HistoryTrackingComponent;
HistoryTrackingComponent.ɵfac = function HistoryTrackingComponent_Factory(t) { return new (t || HistoryTrackingComponent)(i0.ɵɵdirectiveInject(i1.Title), i0.ɵɵdirectiveInject(i2.TranslateService), i0.ɵɵdirectiveInject(i3.AuthService), i0.ɵɵdirectiveInject(i4.Router), i0.ɵɵdirectiveInject(i5.HistoryService), i0.ɵɵdirectiveInject(i6.DatePipe)); };
HistoryTrackingComponent.ɵcmp = i0.ɵɵdefineComponent({ type: HistoryTrackingComponent, selectors: [["app-history-tracking"]], decls: 12, vars: 8, consts: [[1, "page-title"], ["styleClass", "custom-scrolltop"], ["align", "left", 3, "value"], ["pTemplate", "marker"], ["pTemplate", "content"], ["pTemplate", "opposite"], ["class", "p-col-12 p-text-center", 4, "ngIf"], [1, "p-text-center", "p-mt-2"], ["class", "p-button-info", "type", "button", "pButton", "", "pRipple", "", "icon", "fas fa-caret-down", "iconPos", "right", 3, "disabled", "label", "click", 4, "ngIf"], [1, "custom-marker", "p-shadow-2"], [1, "far", "fa-calendar-check"], [4, "ngFor", "ngForOf"], [1, "p-mt-1"], [1, "p-tag", "p-tag-secondary", 3, "title"], ["class", "p-tag p-tag-success p-ml-2", 4, "ngIf"], ["class", "p-tag p-tag-info p-ml-2", 4, "ngIf"], [1, "p-pt-2", "p-pb-3"], [4, "ngIf"], [1, "p-tag", "p-tag-success", "p-ml-2"], [1, "p-tag", "p-tag-info", "p-ml-2"], [1, "fas", "fa-sign-in-alt"], [1, "p-ml-2"], [1, "fas", "fa-sign-out-alt", "text-danger"], ["class", "p-mt-1 ml-26 p-d-flex", 4, "ngFor", "ngForOf"], [1, "fas", "fa-folder-plus"], [1, "fas", "fa-folder-open"], [1, "fas", "fa-trash", "text-danger"], [1, "fas", "fa-copy"], [1, "p-mt-1", "ml-26", "p-d-flex"], [1, "fas", "fa-folder-open", "text-primary"], [1, "member-name"], [1, "p-ml-1", "p-text-truncate", 3, "title"], [1, "fas", "fa-exchange-alt"], [1, "fas", "fa-user", "text-primary"], [1, "member-name", 3, "title"], ["class", "p-ml-1 p-text-truncate", 4, "ngIf"], [1, "p-ml-1", "p-text-truncate"], ["class", "p-mt-1 p-d-flex", 3, "ngClass", 4, "ngFor", "ngForOf"], [1, "fas", "fa-user-plus"], [1, "fas", "fa-edit"], [1, "p-mt-1", "p-d-flex", 3, "ngClass"], [1, "fas", "fa-user", "text-orange"], ["class", "p-mt-1 ml-28 p-d-flex", 4, "ngFor", "ngForOf"], [1, "fas", "fa-users", "text-primary"], [1, "fas", "fa-users"], [1, "fas", "fa-users", "text-danger"], [1, "p-mt-1", "ml-28", "p-d-flex"], [1, "p-ml-2", "p-text-truncate", 3, "title"], ["class", "ml-58 p-mt-2 p-d-flex", 4, "ngFor", "ngForOf"], [1, "p-ml-1"], [1, "ml-58", "p-mt-2", "p-d-flex"], [1, "name-2", 3, "title"], [1, "p-col-12", "p-text-center"], [1, "lds-loading"], ["type", "button", "pButton", "", "pRipple", "", "icon", "fas fa-caret-down", "iconPos", "right", 1, "p-button-info", 3, "disabled", "label", "click"]], template: function HistoryTrackingComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵtext(1);
        i0.ɵɵpipe(2, "titlecase");
        i0.ɵɵpipe(3, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelement(4, "p-scrollTop", 1);
        i0.ɵɵelementStart(5, "p-timeline", 2);
        i0.ɵɵtemplate(6, HistoryTrackingComponent_ng_template_6_Template, 2, 0, "ng-template", 3);
        i0.ɵɵtemplate(7, HistoryTrackingComponent_ng_template_7_Template, 1, 1, "ng-template", 4);
        i0.ɵɵtemplate(8, HistoryTrackingComponent_ng_template_8_Template, 2, 4, "ng-template", 5);
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(9, HistoryTrackingComponent_div_9_Template, 5, 0, "div", 6);
        i0.ɵɵelementStart(10, "div", 7);
        i0.ɵɵtemplate(11, HistoryTrackingComponent_button_11_Template, 2, 4, "button", 8);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵadvance(1);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 4, i0.ɵɵpipeBind1(3, 6, "label.events")));
        i0.ɵɵadvance(4);
        i0.ɵɵproperty("value", ctx.listHistory);
        i0.ɵɵadvance(4);
        i0.ɵɵproperty("ngIf", ctx.loading);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.totalRecords > 20);
    } }, directives: [i7.ScrollTop, i8.Timeline, i9.PrimeTemplate, i6.NgIf, i6.NgForOf, i6.NgClass, i10.ButtonDirective, i11.Ripple], pipes: [i6.TitleCasePipe, i2.TranslatePipe, i6.DatePipe], styles: ["[_nghost-%COMP%]     .custom-scrolltop {\n  background-color: var(--blue-800);\n}\n[_nghost-%COMP%]     .custom-scrolltop:hover {\n  background-color: var(--blue-600);\n}\n@media screen and (max-width: 768px) {\n  [_nghost-%COMP%]     .p-timeline-left .p-timeline-event-opposite {\n    max-width: 25vw;\n  }\n}\n@media screen and (min-width: 769px) {\n  [_nghost-%COMP%]     .p-timeline-left .p-timeline-event-opposite {\n    max-width: 15vw;\n  }\n}\n[_nghost-%COMP%]     .p-timeline.p-timeline-vertical .p-timeline-event-opposite {\n  padding-left: 0 !important;\n  padding-top: 8px;\n}\n[_nghost-%COMP%]     .p-timeline.p-timeline-vertical .p-timeline-event-content {\n  padding: 40px 0 0 0;\n}\n[_nghost-%COMP%]     .ml-23 {\n  margin-left: 23px;\n}\n[_nghost-%COMP%]     .ml-26 {\n  margin-left: 26px;\n}\n[_nghost-%COMP%]     .ml-28 {\n  margin-left: 28px;\n}\n[_nghost-%COMP%]     .ml-58 {\n  margin-left: 58px;\n}\n[_nghost-%COMP%]     .member-name {\n  display: inline-flex;\n  max-width: 50vw;\n}\n[_nghost-%COMP%]     .name-2 {\n  display: inline-flex;\n  max-width: 45vw;\n}\n[_nghost-%COMP%]     .p-tag {\n  padding: 0.1rem 0.4rem !important;\n  font-size: 12px !important;\n  line-height: 16px !important;\n}\n.custom-marker[_ngcontent-%COMP%] {\n  display: flex;\n  width: 2rem;\n  height: 2rem;\n  align-items: center;\n  justify-content: center;\n  border-radius: 50%;\n  z-index: 1;\n}\n/*# sourceMappingURL=data:application/json;base64,  */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(HistoryTrackingComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-history-tracking',
                templateUrl: './history-tracking.component.html',
                styleUrls: ['./history-tracking.component.scss']
            }]
    }], function () { return [{ type: i1.Title }, { type: i2.TranslateService }, { type: i3.AuthService }, { type: i4.Router }, { type: i5.HistoryService }, { type: i6.DatePipe }]; }, null); })();


/***/ }),

/***/ "./src/app/authentication-pages/history/history.component.ts":
/*!*******************************************************************!*\
  !*** ./src/app/authentication-pages/history/history.component.ts ***!
  \*******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.HistoryComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
class HistoryComponent {
    constructor() { }
    ngOnInit() {
    }
}
exports.HistoryComponent = HistoryComponent;
HistoryComponent.ɵfac = function HistoryComponent_Factory(t) { return new (t || HistoryComponent)(); };
HistoryComponent.ɵcmp = i0.ɵɵdefineComponent({ type: HistoryComponent, selectors: [["app-history"]], decls: 1, vars: 0, template: function HistoryComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelement(0, "router-outlet");
    } }, directives: [i1.RouterOutlet], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2hpc3RvcnkvaGlzdG9yeS5jb21wb25lbnQuc2NzcyJ9 */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(HistoryComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-history',
                templateUrl: './history.component.html',
                styleUrls: ['./history.component.scss']
            }]
    }], function () { return []; }, null); })();


/***/ }),

/***/ "./src/app/authentication-pages/label/label-form/label-form.component.ts":
/*!*******************************************************************************!*\
  !*** ./src/app/authentication-pages/label/label-form/label-form.component.ts ***!
  \*******************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.LabelFormComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/label.service */ "./src/app/services/label.service.ts"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! primeng/colorpicker */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-colorpicker.js"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtextarea */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtextarea.js"));
function LabelFormComponent_div_8_small_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 18);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.require"), " ");
} }
function LabelFormComponent_div_8_small_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 18);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.special_chars"), " ");
} }
const _c0 = function () { return { number: 64 }; };
function LabelFormComponent_div_8_small_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 18);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, "label.max_length", i0.ɵɵpureFunction0(4, _c0)), " ");
} }
function LabelFormComponent_div_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtemplate(1, LabelFormComponent_div_8_small_1_Template, 3, 3, "small", 17);
    i0.ɵɵtemplate(2, LabelFormComponent_div_8_small_2_Template, 3, 3, "small", 17);
    i0.ɵɵtemplate(3, LabelFormComponent_div_8_small_3_Template, 3, 5, "small", 17);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r0.labelFrm.controls["labelName"].errors == null ? null : ctx_r0.labelFrm.controls["labelName"].errors.required);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r0.labelFrm.controls["labelName"].errors == null ? null : ctx_r0.labelFrm.controls["labelName"].errors.pattern);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r0.labelFrm.controls["labelName"].errors == null ? null : ctx_r0.labelFrm.controls["labelName"].errors.maxlength);
} }
function LabelFormComponent_div_17_small_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 18);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.require"), " ");
} }
function LabelFormComponent_div_17_small_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 18);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.invalid_color_format"), " ");
} }
function LabelFormComponent_div_17_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtemplate(1, LabelFormComponent_div_17_small_1_Template, 3, 3, "small", 17);
    i0.ɵɵtemplate(2, LabelFormComponent_div_17_small_2_Template, 3, 3, "small", 17);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r1.labelFrm.controls["color"].errors == null ? null : ctx_r1.labelFrm.controls["color"].errors.required);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r1.labelFrm.controls["color"].errors == null ? null : ctx_r1.labelFrm.controls["color"].errors.pattern);
} }
function LabelFormComponent_span_22_Template(rf, ctx) { if (rf & 1) {
    const _r11 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "span", 19);
    i0.ɵɵlistener("click", function LabelFormComponent_span_22_Template_span_click_0_listener() { i0.ɵɵrestoreView(_r11); const item_r9 = ctx.$implicit; const ctx_r10 = i0.ɵɵnextContext(); return ctx_r10.pickColor(item_r9.color); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r9 = ctx.$implicit;
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵstyleMap(ctx_r2.handlePickColor(item_r9.color));
    i0.ɵɵproperty("title", item_r9.text);
} }
function LabelFormComponent_div_29_small_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 18);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.special_chars"), " ");
} }
function LabelFormComponent_div_29_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtemplate(1, LabelFormComponent_div_29_small_1_Template, 3, 3, "small", 17);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r3.labelFrm.controls["description"].errors == null ? null : ctx_r3.labelFrm.controls["description"].errors.pattern);
} }
class LabelFormComponent {
    constructor(fb, labelService, translate, messageService) {
        this.fb = fb;
        this.labelService = labelService;
        this.translate = translate;
        this.messageService = messageService;
        this.mode = 'create';
        this.isSuccess = new core_1.EventEmitter();
        this.labelFrm = new forms_1.FormGroup({});
        this.appUtil = app_util_1.default;
        this.constant = app_constants_1.default;
        this.sampleColors = this.constant.sampleColors;
    }
    ngOnInit() {
        this.labelFrm = this.fb.group({
            labelId: [this.labelInfo.labelId],
            labelName: ['', [forms_1.Validators.required, forms_1.Validators.pattern(this.constant.PATTERNS.SCRIPT_PATTERN)]],
            color: ['', [forms_1.Validators.required, forms_1.Validators.pattern(this.constant.PATTERNS.COLOR_PATTERN)]],
            description: ['', [forms_1.Validators.pattern(this.constant.PATTERNS.SCRIPT_PATTERN)]],
        });
    }
    pickColor(color) {
        this.labelInfo.color = color;
    }
    handlePickColor(color) {
        return { 'background-color': color, width: '40px', height: '40px', display: 'inline-block', float: 'left', cursor: 'pointer' };
    }
    validateBeforeSubmit() {
        this.labelFrm.markAllAsTouched();
        if (this.labelFrm.invalid || this.isSubmitting) {
            return null;
        }
        const params = {
            projectId: this.projectId,
            labelName: this.labelFrm.controls.labelName.value,
            description: this.labelFrm.controls.description.value,
            color: this.labelFrm.controls.color.value
        };
        this.isSubmitting = true;
        return params;
    }
    doCreateNewLabel() {
        const params = this.validateBeforeSubmit();
        if (!params) {
            this.isSuccess.emit(false);
            return;
        }
        this.labelService.createLabel(this.appUtil.toSnakeCaseKey(params)).subscribe(res => {
            if (res.status === 200) {
                this.messageService.add({
                    severity: 'success',
                    detail: this.appUtil.translate(this.translate, 'default_toast.add_success')
                });
                this.isSubmitting = false;
                this.isSuccess.emit(true);
            }
            else {
                this.isSuccess.emit(false);
            }
        }, error => {
            this.messageService.add({
                severity: 'error',
                detail: this.appUtil.translate(this.translate, 'error.' + error.status)
            });
        });
    }
    doEditLabel() {
        const params = this.validateBeforeSubmit();
        if (!params) {
            this.isSuccess.emit(false);
            return;
        }
        this.labelService.editLabel(this.labelFrm.controls.labelId.value, this.appUtil.toSnakeCaseKey(params))
            .subscribe(res => {
            if (res.status === 200) {
                this.messageService.add({
                    severity: 'success',
                    detail: this.appUtil.translate(this.translate, 'default_toast.update_success')
                });
                this.isSuccess.emit(true);
            }
            else {
                this.isSuccess.emit(false);
            }
        }, error => {
            // console.log('error', error);
        });
    }
}
exports.LabelFormComponent = LabelFormComponent;
LabelFormComponent.ɵfac = function LabelFormComponent_Factory(t) { return new (t || LabelFormComponent)(i0.ɵɵdirectiveInject(i1.FormBuilder), i0.ɵɵdirectiveInject(i2.LabelService), i0.ɵɵdirectiveInject(i3.TranslateService), i0.ɵɵdirectiveInject(i4.MessageService)); };
LabelFormComponent.ɵcmp = i0.ɵɵdefineComponent({ type: LabelFormComponent, selectors: [["app-label-form"]], inputs: { projectId: "projectId", mode: "mode", labelInfo: "labelInfo" }, outputs: { isSuccess: "isSuccess" }, decls: 30, vars: 23, consts: [[3, "formGroup"], [1, "p-fluid", "p-formgrid", "p-grid", "p-mt-2"], [1, "p-field", "p-col-12"], [1, "p-float-label"], ["formControlName", "labelName", "id", "title", "maxlength", "64", "pInputText", "", "type", "text", 3, "ngModel", "ngClass", "ngModelChange"], ["for", "title"], [4, "ngIf"], [1, "p-inputgroup"], [1, "p-float-label", "width-100"], ["formControlName", "color", "id", "label-color", "maxlength", "64", "pInputText", "", "type", "text", 3, "ngModel", "ngClass", "ngModelChange"], ["for", "label-color"], ["formControlName", "color", "appendTo", "body", 3, "ngModel", "ngModelChange"], [1, "p-text-bold", "p-mt-0", "p-mb-2"], [3, "title", "style", "click", 4, "ngFor", "ngForOf"], [1, "p-col-12"], ["autoResize", "true", "formControlName", "description", "id", "description", "maxlength", "255", "pInputTextarea", "", "rows", "5", 1, "min-height-119", 3, "ngModel", "ngModelChange"], ["for", "description"], ["class", "p-error", 4, "ngIf"], [1, "p-error"], [3, "title", "click"]], template: function LabelFormComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "form", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵelementStart(2, "div", 2);
        i0.ɵɵelementStart(3, "span", 3);
        i0.ɵɵelementStart(4, "input", 4);
        i0.ɵɵlistener("ngModelChange", function LabelFormComponent_Template_input_ngModelChange_4_listener($event) { return ctx.labelInfo.labelName = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(5, "label", 5);
        i0.ɵɵtext(6);
        i0.ɵɵpipe(7, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(8, LabelFormComponent_div_8_Template, 4, 3, "div", 6);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(9, "div", 2);
        i0.ɵɵelementStart(10, "div", 7);
        i0.ɵɵelementStart(11, "span", 8);
        i0.ɵɵelementStart(12, "input", 9);
        i0.ɵɵlistener("ngModelChange", function LabelFormComponent_Template_input_ngModelChange_12_listener($event) { return ctx.labelInfo.color = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(13, "label", 10);
        i0.ɵɵtext(14);
        i0.ɵɵpipe(15, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(16, "p-colorPicker", 11);
        i0.ɵɵlistener("ngModelChange", function LabelFormComponent_Template_p_colorPicker_ngModelChange_16_listener($event) { return ctx.labelInfo.color = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(17, LabelFormComponent_div_17_Template, 3, 2, "div", 6);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(18, "div", 2);
        i0.ɵɵelementStart(19, "p", 12);
        i0.ɵɵtext(20);
        i0.ɵɵpipe(21, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(22, LabelFormComponent_span_22_Template, 1, 3, "span", 13);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(23, "div", 14);
        i0.ɵɵelementStart(24, "span", 3);
        i0.ɵɵelementStart(25, "textarea", 15);
        i0.ɵɵlistener("ngModelChange", function LabelFormComponent_Template_textarea_ngModelChange_25_listener($event) { return ctx.labelInfo.description = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(26, "label", 16);
        i0.ɵɵtext(27);
        i0.ɵɵpipe(28, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(29, LabelFormComponent_div_29_Template, 2, 1, "div", 6);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵproperty("formGroup", ctx.labelFrm);
        i0.ɵɵadvance(4);
        i0.ɵɵproperty("ngModel", ctx.labelInfo.labelName)("ngClass", (ctx.labelFrm.controls["labelName"].dirty || ctx.labelFrm.controls["labelName"].touched) && ctx.labelFrm.controls["labelName"].invalid ? "ng-dirty" : "");
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(7, 15, "label.title"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", (ctx.labelFrm.controls["labelName"].dirty || ctx.labelFrm.controls["labelName"].touched) && ctx.labelFrm.controls["labelName"].invalid);
        i0.ɵɵadvance(4);
        i0.ɵɵproperty("ngModel", ctx.labelInfo.color)("ngClass", (ctx.labelFrm.controls["color"].dirty || ctx.labelFrm.controls["color"].touched) && ctx.labelFrm.controls["color"].invalid ? "ng-dirty" : "");
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(15, 17, "label.color"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngModel", ctx.labelInfo.color);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", (ctx.labelFrm.controls["color"].dirty || ctx.labelFrm.controls["color"].touched) && ctx.labelFrm.controls["color"].invalid);
        i0.ɵɵadvance(3);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(21, 19, "label.select_one"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngForOf", ctx.sampleColors);
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("ngModel", ctx.labelInfo.description);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(28, 21, "label.description"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", (ctx.labelFrm.controls["description"].dirty || ctx.labelFrm.controls["description"].touched) && ctx.labelFrm.controls["description"].invalid);
    } }, directives: [i1.ɵangular_packages_forms_forms_y, i1.NgControlStatusGroup, i1.FormGroupDirective, i1.DefaultValueAccessor, i1.NgControlStatus, i1.FormControlName, i1.MaxLengthValidator, i5.InputText, i6.NgClass, i6.NgIf, i7.ColorPicker, i6.NgForOf, i8.InputTextarea], pipes: [i3.TranslatePipe], styles: ["[_nghost-%COMP%]  .p-colorpicker-preview, [_nghost-%COMP%]  .p-fluid .p-colorpicker-preview.p-inputtext {\n  width: 44px;\n  height: 45px;\n  border-radius: 0 4px 4px 0 !important;\n}\n[_nghost-%COMP%]  .p-colorpicker-panel {\n  right: 0;\n  left: auto !important;\n}\n.min-height-119[_ngcontent-%COMP%] {\n  min-height: 119px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvbGFiZWwvbGFiZWwtZm9ybS9sYWJlbC1mb3JtLmNvbXBvbmVudC5zY3NzIiwic3JjL2FwcC9hdXRoZW50aWNhdGlvbi1wYWdlcy9sYWJlbC9sYWJlbC1mb3JtL2xhYmVsLWZvcm0uY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0U7RUFDRSxXQUFBO0VBQ0EsWUFBQTtFQUNBLHFDQUFBO0FDQUo7QURHRTtFQUNFLFFBQUE7RUFDQSxxQkFBQTtBQ0RKO0FETUE7RUFDRSxpQkFBQTtBQ0hGIiwiZmlsZSI6InNyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvbGFiZWwvbGFiZWwtZm9ybS9sYWJlbC1mb3JtLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiOmhvc3QoOjpuZy1kZWVwKSB7XG4gIC5wLWNvbG9ycGlja2VyLXByZXZpZXcsIC5wLWZsdWlkIC5wLWNvbG9ycGlja2VyLXByZXZpZXcucC1pbnB1dHRleHQge1xuICAgIHdpZHRoOiA0NHB4O1xuICAgIGhlaWdodDogNDVweDtcbiAgICBib3JkZXItcmFkaXVzOiAwIDRweCA0cHggMCAhaW1wb3J0YW50O1xuICB9XG5cbiAgLnAtY29sb3JwaWNrZXItcGFuZWwge1xuICAgIHJpZ2h0OiAwO1xuICAgIGxlZnQ6IGF1dG8gIWltcG9ydGFudDtcbiAgfVxuXG59XG5cbi5taW4taGVpZ2h0LTExOSB7XG4gIG1pbi1oZWlnaHQ6IDExOXB4O1xufVxuIiwiOmhvc3QoOjpuZy1kZWVwKSAucC1jb2xvcnBpY2tlci1wcmV2aWV3LCA6aG9zdCg6Om5nLWRlZXApIC5wLWZsdWlkIC5wLWNvbG9ycGlja2VyLXByZXZpZXcucC1pbnB1dHRleHQge1xuICB3aWR0aDogNDRweDtcbiAgaGVpZ2h0OiA0NXB4O1xuICBib3JkZXItcmFkaXVzOiAwIDRweCA0cHggMCAhaW1wb3J0YW50O1xufVxuOmhvc3QoOjpuZy1kZWVwKSAucC1jb2xvcnBpY2tlci1wYW5lbCB7XG4gIHJpZ2h0OiAwO1xuICBsZWZ0OiBhdXRvICFpbXBvcnRhbnQ7XG59XG5cbi5taW4taGVpZ2h0LTExOSB7XG4gIG1pbi1oZWlnaHQ6IDExOXB4O1xufSJdfQ== */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LabelFormComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-label-form',
                templateUrl: './label-form.component.html',
                styleUrls: ['./label-form.component.scss']
            }]
    }], function () { return [{ type: i1.FormBuilder }, { type: i2.LabelService }, { type: i3.TranslateService }, { type: i4.MessageService }]; }, { projectId: [{
            type: core_1.Input
        }], mode: [{
            type: core_1.Input
        }], labelInfo: [{
            type: core_1.Input
        }], isSuccess: [{
            type: core_1.Output
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/label/label-list/label-list.component.ts":
/*!*******************************************************************************!*\
  !*** ./src/app/authentication-pages/label/label-list/label-list.component.ts ***!
  \*******************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.LabelListComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const label_data_model_1 = __webpack_require__(/*! ../../../../models/label-data.model */ "./src/models/label-data.model.ts");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/__ivy_ngcc__/fesm2015/platform-browser.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/label.service */ "./src/app/services/label.service.ts"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! primeng/table */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-table.js"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! primeng/dialog */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dialog.js"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! primeng/ripple */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-ripple.js"));
const i10 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
const i11 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i12 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js"));
const i13 = tslib_1.__importStar(__webpack_require__(/*! primeng/tag */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-tag.js"));
const i14 = tslib_1.__importStar(__webpack_require__(/*! ../label-form/label-form.component */ "./src/app/authentication-pages/label/label-form/label-form.component.ts"));
const _c0 = ["labelFormComponent"];
function LabelListComponent_div_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 12);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "titlecase");
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind1(3, 3, "label.label_list")));
} }
function LabelListComponent_button_1_Template(rf, ctx) { if (rf & 1) {
    const _r10 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 13);
    i0.ɵɵlistener("click", function LabelListComponent_button_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r10); const ctx_r9 = i0.ɵɵnextContext(); return ctx_r9.showDialog("create", null); });
    i0.ɵɵpipe(1, "uppercase");
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(1, 1, i0.ɵɵpipeBind1(2, 3, "label.add")));
} }
function LabelListComponent_button_2_Template(rf, ctx) { if (rf & 1) {
    const _r12 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 14);
    i0.ɵɵlistener("click", function LabelListComponent_button_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r12); const ctx_r11 = i0.ɵɵnextContext(); return ctx_r11.confirmDeleteLabel(); });
    i0.ɵɵpipe(1, "uppercase");
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(1, 2, i0.ɵɵpipeBind1(2, 4, "label.delete")));
    i0.ɵɵproperty("disabled", ctx_r2.selectedItems.length === 0);
} }
function LabelListComponent_ng_template_5_Template(rf, ctx) { if (rf & 1) {
    const _r14 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 15);
    i0.ɵɵelementStart(1, "span", 16);
    i0.ɵɵelement(2, "i", 17);
    i0.ɵɵelementStart(3, "input", 18);
    i0.ɵɵlistener("keyup", function LabelListComponent_ng_template_5_Template_input_keyup_3_listener() { i0.ɵɵrestoreView(_r14); const ctx_r13 = i0.ɵɵnextContext(); return ctx_r13.getLabelList(null, true); })("ngModelChange", function LabelListComponent_ng_template_5_Template_input_ngModelChange_3_listener($event) { i0.ɵɵrestoreView(_r14); const ctx_r15 = i0.ɵɵnextContext(); return ctx_r15.getParams.searchKey = $event; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "label", 19);
    i0.ɵɵtext(5);
    i0.ɵɵpipe(6, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngClass", ctx_r3.labelMode === "short" ? "p-width-100" : "");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngModel", ctx_r3.getParams.searchKey)("ngClass", ctx_r3.labelMode === "short" ? "p-width-100" : "");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 4, "label.search"));
} }
function LabelListComponent_ng_template_6_tr_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "th", 21);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "titlecase");
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelement(5, "p-sortIcon", 22);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(6, "th", 23);
    i0.ɵɵtext(7);
    i0.ɵɵpipe(8, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(9, "th", 24);
    i0.ɵɵtext(10);
    i0.ɵɵpipe(11, "translate");
    i0.ɵɵelement(12, "p-sortIcon", 25);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(13, "th", 26);
    i0.ɵɵtext(14);
    i0.ɵɵpipe(15, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 4, i0.ɵɵpipeBind1(4, 6, "label.title")), " ");
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(8, 8, "label.description"), " ");
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(11, 10, "label.create_date"), " ");
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(15, 12, "label.action"), " ");
} }
function LabelListComponent_ng_template_6_tr_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "th");
    i0.ɵɵelement(2, "i", 27);
    i0.ɵɵtext(3);
    i0.ɵɵpipe(4, "uppercase");
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(4, 1, i0.ɵɵpipeBind1(5, 3, "label.label")), " ");
} }
function LabelListComponent_ng_template_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, LabelListComponent_ng_template_6_tr_0_Template, 16, 14, "tr", 20);
    i0.ɵɵtemplate(1, LabelListComponent_ng_template_6_tr_1_Template, 6, 5, "tr", 20);
} if (rf & 2) {
    const ctx_r4 = i0.ɵɵnextContext();
    i0.ɵɵproperty("ngIf", ctx_r4.labelMode === "");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r4.labelMode === "short");
} }
function LabelListComponent_ng_template_7_tr_0_Template(rf, ctx) { if (rf & 1) {
    const _r24 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "tr", 30);
    i0.ɵɵlistener("dblclick", function LabelListComponent_ng_template_7_tr_0_Template_tr_dblclick_0_listener() { i0.ɵɵrestoreView(_r24); const label_r18 = i0.ɵɵnextContext().$implicit; const ctx_r22 = i0.ɵɵnextContext(); return ctx_r22.showDialog("edit", label_r18); });
    i0.ɵɵelementStart(1, "td");
    i0.ɵɵelement(2, "p-tag", 31);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "td", 32);
    i0.ɵɵelementStart(4, "span", 33);
    i0.ɵɵtext(5);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(6, "td");
    i0.ɵɵtext(7);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(8, "td", 34);
    i0.ɵɵelementStart(9, "button", 35);
    i0.ɵɵlistener("click", function LabelListComponent_ng_template_7_tr_0_Template_button_click_9_listener() { i0.ɵɵrestoreView(_r24); const label_r18 = i0.ɵɵnextContext().$implicit; const ctx_r25 = i0.ɵɵnextContext(); return ctx_r25.showDialog("edit", label_r18); });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(10, "button", 36);
    i0.ɵɵlistener("click", function LabelListComponent_ng_template_7_tr_0_Template_button_click_10_listener() { i0.ɵɵrestoreView(_r24); const label_r18 = i0.ɵɵnextContext().$implicit; const ctx_r27 = i0.ɵɵnextContext(); return ctx_r27.confirmDeleteLabel(label_r18); });
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r29 = i0.ɵɵnextContext();
    const label_r18 = ctx_r29.$implicit;
    const rowIndex_r19 = ctx_r29.rowIndex;
    const ctx_r20 = i0.ɵɵnextContext();
    i0.ɵɵproperty("pSelectableRow", label_r18)("pSelectableRowIndex", rowIndex_r19);
    i0.ɵɵadvance(2);
    i0.ɵɵstyleMap(ctx_r20.handleLabelColor(label_r18.color));
    i0.ɵɵpropertyInterpolate("value", label_r18.labelName);
    i0.ɵɵpropertyInterpolate("title", label_r18.labelName);
    i0.ɵɵproperty("rounded", true)("styleClass", !ctx_r20.appUtil.checkColorDark(label_r18.color) ? "text-dark p-max-width-100" : "p-max-width-100");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("title", label_r18.description);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(label_r18.description);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(ctx_r20.appUtil.formatDateBasedOnDiff(ctx_r20.datePipe, label_r18.createDate));
} }
function LabelListComponent_ng_template_7_tr_1_i_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 40);
} }
function LabelListComponent_ng_template_7_tr_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr", 37);
    i0.ɵɵelementStart(1, "td", 32);
    i0.ɵɵtemplate(2, LabelListComponent_ng_template_7_tr_1_i_2_Template, 1, 0, "i", 38);
    i0.ɵɵelement(3, "p-tag", 39);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r31 = i0.ɵɵnextContext();
    const label_r18 = ctx_r31.$implicit;
    const rowIndex_r19 = ctx_r31.rowIndex;
    const ctx_r21 = i0.ɵɵnextContext();
    i0.ɵɵproperty("pSelectableRow", label_r18)("pSelectableRowIndex", rowIndex_r19);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", label_r18.selected === true);
    i0.ɵɵadvance(1);
    i0.ɵɵstyleMap(ctx_r21.handleLabelColor(label_r18.color));
    i0.ɵɵpropertyInterpolate("value", label_r18.labelName);
    i0.ɵɵpropertyInterpolate("title", label_r18.labelName);
    i0.ɵɵproperty("rounded", true)("styleClass", !ctx_r21.appUtil.checkColorDark(label_r18.color) ? "text-dark p-max-width-100" : "p-max-width-100");
} }
function LabelListComponent_ng_template_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, LabelListComponent_ng_template_7_tr_0_Template, 11, 11, "tr", 28);
    i0.ɵɵtemplate(1, LabelListComponent_ng_template_7_tr_1_Template, 4, 9, "tr", 29);
} if (rf & 2) {
    const ctx_r5 = i0.ɵɵnextContext();
    i0.ɵɵproperty("ngIf", ctx_r5.labelMode === "");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r5.labelMode === "short");
} }
function LabelListComponent_ng_template_8_td_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "td", 43);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "label.no_record"));
} }
function LabelListComponent_ng_template_8_td_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "td", 44);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "label.no_record"));
} }
function LabelListComponent_ng_template_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵtemplate(1, LabelListComponent_ng_template_8_td_1_Template, 3, 3, "td", 41);
    i0.ɵɵtemplate(2, LabelListComponent_ng_template_8_td_2_Template, 3, 3, "td", 42);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r6 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r6.labelMode === "");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r6.labelMode === "short");
} }
function LabelListComponent_app_label_form_14_Template(rf, ctx) { if (rf & 1) {
    const _r36 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "app-label-form", 45, 46);
    i0.ɵɵlistener("isSuccess", function LabelListComponent_app_label_form_14_Template_app_label_form_isSuccess_0_listener($event) { i0.ɵɵrestoreView(_r36); const ctx_r35 = i0.ɵɵnextContext(); return ctx_r35.handleSuccess($event); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r7 = i0.ɵɵnextContext();
    i0.ɵɵproperty("mode", ctx_r7.mode)("projectId", ctx_r7.getParams.projectId)("labelInfo", ctx_r7.selectLabel);
} }
function LabelListComponent_ng_template_15_Template(rf, ctx) { if (rf & 1) {
    const _r38 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 47);
    i0.ɵɵelementStart(1, "button", 48);
    i0.ɵɵlistener("click", function LabelListComponent_ng_template_15_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r38); const ctx_r37 = i0.ɵɵnextContext(); return ctx_r37.isShownModal = false; });
    i0.ɵɵpipe(2, "titlecase");
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "button", 49);
    i0.ɵɵlistener("click", function LabelListComponent_ng_template_15_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r38); const ctx_r39 = i0.ɵɵnextContext(); return ctx_r39.doSaveAction(); });
    i0.ɵɵpipe(5, "uppercase");
    i0.ɵɵpipe(6, "translate");
    i0.ɵɵpipe(7, "uppercase");
    i0.ɵɵpipe(8, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r8 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(2, 3, i0.ɵɵpipeBind1(3, 5, "label.cancel")));
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("label", ctx_r8.mode === "create" ? i0.ɵɵpipeBind1(5, 7, i0.ɵɵpipeBind1(6, 9, "label.add")) : i0.ɵɵpipeBind1(7, 11, i0.ɵɵpipeBind1(8, 13, "label.save")));
    i0.ɵɵproperty("icon", ctx_r8.mode === "create" ? "fas fa-plus" : "far fa-save");
} }
const _c1 = function () { return []; };
const _c2 = function () { return { width: "50vw" }; };
class LabelListComponent {
    constructor(titleService, translate, datePipe, messageService, activatedRoute, router, labelService, confirmationService) {
        this.titleService = titleService;
        this.translate = translate;
        this.datePipe = datePipe;
        this.messageService = messageService;
        this.activatedRoute = activatedRoute;
        this.router = router;
        this.labelService = labelService;
        this.confirmationService = confirmationService;
        this.labelMode = '';
        this.labelFilter = [];
        this.labelIsSelected = new core_1.EventEmitter();
        this.appUtil = app_util_1.default;
        this.isShownModal = false;
        this.labels = [];
        this.selectedItems = [];
        this.first = 0;
        this.rows = 10;
        this.sortField = 'create_date';
        this.getParams = {
            projectId: '',
            searchKey: '',
            pageNumber: 1,
            pageSize: 10,
            sortField: 'create_date',
            ascSort: false,
        };
        this.selectLabel = {
            labelId: 0,
            labelName: '',
            description: '',
            color: ''
        };
        this.translate.get(['page_title.list_label']).subscribe(translation => {
            this.titleService.setTitle(translation['page_title.list_label']);
        });
    }
    ngOnInit() {
        this.getParams = this.labelService.getStoreParams
            ? this.labelService.getStoreParams : this.getParams;
        this.getParams.searchKey = '';
        this.rows = this.getParams.pageSize;
        this.ascSort = (this.getParams.ascSort) ? 1 : -1;
        this.sortField = this.getParams.sortField;
        this.getParams.projectId = (this.labelMode === '')
            ? this.activatedRoute.snapshot.paramMap.get('project_id')
            : this.activatedRoute.snapshot.paramMap.get('id');
        this.rowOptions = app_constants_1.default.DATA_VIEW.ROW_PER_PAGE_OPTIONS;
        if (this.labelMode === 'short') {
            this.selectedItems = this.labelFilter;
        }
    }
    getLabelList(event, isSearch) {
        if (event) {
            this.getParams.sortField = (event.sortField) ? event.sortField : 'create_date';
            this.getParams.ascSort = (event.sortOrder === 1);
            if (event.rows) {
                this.getParams.pageNumber = (event.first / event.rows) + 1;
                this.getParams.pageSize = event.rows;
            }
        }
        if (isSearch) {
            this.getParams.pageNumber = 1;
            this.first = 0;
        }
        if (this.pendingRequest) {
            this.pendingRequest.unsubscribe();
        }
        this.pendingRequest = this.labelService.getLabelList(this.appUtil.toSnakeCaseKey(this.getParams)).subscribe(res => {
            if (res.status === 200) {
                const storeParams = {
                    pageNumber: this.getParams.pageNumber,
                    pageSize: this.getParams.pageSize,
                    sortField: this.getParams.sortField,
                    ascSort: this.getParams.ascSort
                };
                localStorage.setItem(app_constants_1.default.SORT_PAGE.LABEL_LIST, JSON.stringify(storeParams));
                this.labels = res.data.content;
                this.selectedItems.forEach(s => {
                    this.labels.forEach(l => {
                        if (s.labelId === l.labelId) {
                            l.selected = true;
                        }
                    });
                });
                this.totalRecords = res.data.totalElements;
            }
        });
    }
    handleLabelColor(color) {
        return { 'background-color': color };
    }
    confirmDeleteLabel(label) {
        this.confirmationService.confirm({
            header: this.appUtil.translate(this.translate, 'label.delete_label'),
            message: this.appUtil.translate(this.translate, 'label.delete_label_message'),
            acceptLabel: this.appUtil.translate(this.translate, 'button.delete'),
            rejectLabel: this.appUtil.translate(this.translate, 'button.cancel'),
            acceptButtonStyleClass: 'p-button-danger',
            rejectButtonStyleClass: 'p-button-warning',
            dismissableMask: true,
            defaultFocus: 'none',
            accept: () => {
                this.doDeleteLabel(label);
                this.confirmationService.close();
            },
            reject: () => {
                this.confirmationService.close();
            }
        });
    }
    doDeleteLabel(label) {
        if (!label && (this.selectedItems.length === 0 || !this.selectedItems)) {
            return;
        }
        let promises = [];
        // delete label
        if (label) {
            promises = [...promises, this.deleteSingleLabel(label.labelId)];
        }
        else {
            this.selectedItems.forEach(l => {
                promises = [...promises, this.deleteSingleLabel(l.labelId)];
            });
        }
        Promise.all(promises).then(responses => {
            let success = true;
            responses.forEach(res => {
                if (res && res.status !== 200) {
                    success = false;
                }
            });
            if (success) {
                this.messageService.add({
                    severity: 'success',
                    detail: this.appUtil.translate(this.translate, 'default_toast.delete_success')
                });
            }
            this.first = 0;
            this.getParams.pageNumber = 1;
            this.selectedItems = [];
            this.getLabelList();
        });
    }
    deleteSingleLabel(labelId) {
        const params = {
            projectId: this.getParams.projectId,
            labelId
        };
        return new Promise((resolve) => {
            this.labelService.deleteLabel(this.appUtil.toSnakeCaseKey(params)).subscribe(res => {
                resolve(res);
            }, error => {
                // console.log('error', error);
            });
        });
    }
    showDialog(mode, label) {
        this.mode = mode;
        this.isShownModal = true;
        if (label) {
            this.selectLabel = Object.assign({}, label);
        }
        else {
            this.selectLabel = new label_data_model_1.LabelData();
        }
    }
    doSaveAction() {
        switch (this.mode) {
            case 'create':
                this.labelFormComponent.doCreateNewLabel();
                break;
            case 'edit':
                this.labelFormComponent.doEditLabel();
                break;
            default:
                break;
        }
    }
    handleSuccess(event) {
        if (event === true) {
            this.isShownModal = false;
            this.getLabelList();
        }
    }
    clearSelected() {
        this.selectedItems.forEach(p => {
            p.selected = false;
        });
        this.labels.forEach(l => {
            l.selected = false;
        });
        this.selectedItems = [];
    }
    doSelectLabel(event) {
        if (this.labelMode === 'short') {
            this.selectedItems = [];
            this.labels.forEach(l => {
                if (l.selected === true) {
                    this.selectedItems = [...this.selectedItems, l];
                }
            });
            if (event.data.length && event.data.length > 1) {
                event.data.forEach(d => {
                    const index = this.selectedItems.findIndex(s => s.labelId === d.labelId);
                    d.selected = (index === -1);
                    if (index !== -1) {
                        this.selectedItems.splice(index, 1);
                    }
                    else {
                        this.selectedItems = [...new Set(this.selectedItems.concat(d))];
                    }
                    for (const item of this.labels) {
                        if (item.labelId === d.labelId) {
                            item.selected = d.selected;
                            break;
                        }
                    }
                });
            }
            else {
                if (this.selectedItems.length > 0) {
                    let isSelect = true;
                    this.selectedItems.forEach(i => {
                        if (i.labelId === event.data.labelId) {
                            isSelect = false;
                        }
                    });
                    event.data.selected = isSelect;
                }
                else {
                    event.data.selected = true;
                }
                for (const item of this.labels) {
                    if (item.labelId === event.data.labelId) {
                        item.selected = event.data.selected;
                        break;
                    }
                }
                if (event.data.selected === true) {
                    this.selectedItems = [...new Set(this.selectedItems.concat(event.data))];
                }
                else {
                    for (let i = 0; i < this.selectedItems.length; i++) {
                        if (this.selectedItems[i].labelId === event.data.labelId) {
                            this.selectedItems.splice(i, 1);
                        }
                    }
                }
            }
            for (let i = 0; i < this.selectedItems.length; i++) {
                if (this.selectedItems[i].selected === false) {
                    this.selectedItems.splice(i, 1);
                }
            }
            this.labelIsSelected.emit(this.selectedItems);
        }
        else {
            if (event.originalEvent.ctrlKey === true) {
                event.data.selected = true;
            }
            else if (event.originalEvent.shiftKey === true) {
                this.clearSelected();
                if (event.data.length && event.data.length > 1) {
                    event.data.forEach(d => {
                        d.selected = true;
                    });
                }
                else {
                    event.data.selected = true;
                }
            }
            else {
                this.clearSelected();
                event.data.selected = true;
            }
            this.selectedItems = [...new Set(this.selectedItems.concat(event.data))];
        }
    }
    doUnselectLabel(event) {
        if (this.labelMode === 'short') {
            this.selectedItems = [];
            this.labels.forEach(l => {
                if (l.selected === true) {
                    this.selectedItems = [...this.selectedItems, l];
                }
            });
            const index = this.selectedItems.findIndex(s => s.labelId === event.data.labelId);
            const indexLabel = this.labels.findIndex(l => l.labelId === event.data.labelId);
            this.labels[indexLabel].selected = false;
            if (index !== -1) {
                this.selectedItems.splice(index, 1);
            }
            this.labelIsSelected.emit(this.selectedItems);
        }
    }
}
exports.LabelListComponent = LabelListComponent;
LabelListComponent.ɵfac = function LabelListComponent_Factory(t) { return new (t || LabelListComponent)(i0.ɵɵdirectiveInject(i1.Title), i0.ɵɵdirectiveInject(i2.TranslateService), i0.ɵɵdirectiveInject(i3.DatePipe), i0.ɵɵdirectiveInject(i4.MessageService), i0.ɵɵdirectiveInject(i5.ActivatedRoute), i0.ɵɵdirectiveInject(i5.Router), i0.ɵɵdirectiveInject(i6.LabelService), i0.ɵɵdirectiveInject(i4.ConfirmationService)); };
LabelListComponent.ɵcmp = i0.ɵɵdefineComponent({ type: LabelListComponent, selectors: [["app-label-list"]], viewQuery: function LabelListComponent_Query(rf, ctx) { if (rf & 1) {
        i0.ɵɵviewQuery(_c0, 1);
    } if (rf & 2) {
        let _t;
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.labelFormComponent = _t.first);
    } }, inputs: { labelMode: "labelMode", labelFilter: "labelFilter" }, outputs: { labelIsSelected: "labelIsSelected" }, decls: 16, vars: 36, consts: [["class", "page-title", 4, "ngIf"], ["type", "button", "pRipple", "", "pButton", "", "class", "p-mr-2 p-button-raised", "icon", "fas fa-plus p-button-icon-left", 3, "label", "click", 4, "ngIf"], ["type", "button", "pRipple", "", "pButton", "", "class", "p-button-danger p-button-raised p-button-icon-left p-button-icon", "icon", "fas fa-trash p-button-icon-left", 3, "label", "disabled", "click", 4, "ngIf"], [1, "p-mt-2"], ["selectionMode", "multiple", "dataKey", "labelId", "scrollHeight", "190px", "styleClass", "p-datatable-striped bg-white", 3, "rowHover", "paginator", "totalRecords", "lazy", "resetPageOnSort", "value", "first", "rows", "rowsPerPageOptions", "sortField", "sortOrder", "selection", "metaKeySelection", "scrollable", "onLazyLoad", "firstChange", "selectionChange", "onRowSelect", "onRowUnselect"], ["pTemplate", "caption"], ["pTemplate", "header"], ["pTemplate", "body"], ["pTemplate", "emptymessage"], ["styleClass", "custom-dialog", 3, "header", "visible", "modal", "draggable", "resizable", "baseZIndex", "visibleChange"], [3, "mode", "projectId", "labelInfo", "isSuccess", 4, "ngIf"], ["pTemplate", "footer"], [1, "page-title"], ["type", "button", "pRipple", "", "pButton", "", "icon", "fas fa-plus p-button-icon-left", 1, "p-mr-2", "p-button-raised", 3, "label", "click"], ["type", "button", "pRipple", "", "pButton", "", "icon", "fas fa-trash p-button-icon-left", 1, "p-button-danger", "p-button-raised", "p-button-icon-left", "p-button-icon", 3, "label", "disabled", "click"], [1, "p-d-flex", "p-ai-center", "p-jc-between"], [1, "p-float-label", "p-input-icon-left", 3, "ngClass"], [1, "pi", "pi-search"], ["pInputText", "", "id", "search", "type", "text", 1, "search-style", "h-38", 3, "ngModel", "ngClass", "keyup", "ngModelChange"], ["for", "search"], [4, "ngIf"], ["pSortableColumn", "label_name", 1, "p-text-left", 2, "width", "30%"], ["field", "label_name"], [1, "p-text-left"], ["pSortableColumn", "create_date", 1, "p-text-left", 2, "width", "24%"], ["field", "create_date"], [1, "p-text-center", 2, "width", "20%"], [1, "fas", "fa-tags", "p-mr-2"], [3, "pSelectableRow", "pSelectableRowIndex", "dblclick", 4, "ngIf"], [3, "pSelectableRow", "pSelectableRowIndex", 4, "ngIf"], [3, "pSelectableRow", "pSelectableRowIndex", "dblclick"], [3, "rounded", "value", "title", "styleClass"], [1, "p-text-truncate"], [3, "title"], [1, "p-text-center"], ["type", "button", "pRipple", "", "pButton", "", "icon", "fas fa-edit", 1, "p-button-info", "p-button-raised", "p-mr-2", 3, "click"], ["type", "button", "pRipple", "", "pButton", "", "icon", "fas fa-trash", 1, "p-button-danger", "p-button-raised", "p-mr-2", 3, "click"], [3, "pSelectableRow", "pSelectableRowIndex"], ["class", "fas fa-check text-success p-mr-2", 4, "ngIf"], [1, "p-text-truncate", 3, "rounded", "value", "title", "styleClass"], [1, "fas", "fa-check", "text-success", "p-mr-2"], ["colspan", "4", "class", "p-text-center", 4, "ngIf"], ["colspan", "1", "class", "p-text-center", 4, "ngIf"], ["colspan", "4", 1, "p-text-center"], ["colspan", "1", 1, "p-text-center"], [3, "mode", "projectId", "labelInfo", "isSuccess"], ["labelFormComponent", ""], [1, "p-col-12", "p-text-right", "p-pr-0"], ["pButton", "", "pRipple", "", "type", "button", "icon", "fas fa-times", 1, "p-button-raised", "p-button-warning", "p-mr-2", 3, "label", "click"], ["type", "submit", "pRipple", "", "pButton", "", 1, "p-button-raised", "p-mr-0", 3, "label", "icon", "click"]], template: function LabelListComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵtemplate(0, LabelListComponent_div_0_Template, 4, 5, "div", 0);
        i0.ɵɵtemplate(1, LabelListComponent_button_1_Template, 3, 5, "button", 1);
        i0.ɵɵtemplate(2, LabelListComponent_button_2_Template, 3, 6, "button", 2);
        i0.ɵɵelementStart(3, "div", 3);
        i0.ɵɵelementStart(4, "p-table", 4);
        i0.ɵɵlistener("onLazyLoad", function LabelListComponent_Template_p_table_onLazyLoad_4_listener($event) { return ctx.getLabelList($event); })("firstChange", function LabelListComponent_Template_p_table_firstChange_4_listener($event) { return ctx.first = $event; })("selectionChange", function LabelListComponent_Template_p_table_selectionChange_4_listener($event) { return ctx.selectedItems = $event; })("onRowSelect", function LabelListComponent_Template_p_table_onRowSelect_4_listener($event) { return ctx.doSelectLabel($event); })("onRowUnselect", function LabelListComponent_Template_p_table_onRowUnselect_4_listener($event) { return ctx.doUnselectLabel($event); });
        i0.ɵɵtemplate(5, LabelListComponent_ng_template_5_Template, 7, 6, "ng-template", 5);
        i0.ɵɵtemplate(6, LabelListComponent_ng_template_6_Template, 2, 2, "ng-template", 6);
        i0.ɵɵtemplate(7, LabelListComponent_ng_template_7_Template, 2, 2, "ng-template", 7);
        i0.ɵɵtemplate(8, LabelListComponent_ng_template_8_Template, 3, 2, "ng-template", 8);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(9, "p-dialog", 9);
        i0.ɵɵlistener("visibleChange", function LabelListComponent_Template_p_dialog_visibleChange_9_listener($event) { return ctx.isShownModal = $event; });
        i0.ɵɵpipe(10, "titlecase");
        i0.ɵɵpipe(11, "translate");
        i0.ɵɵpipe(12, "titlecase");
        i0.ɵɵpipe(13, "translate");
        i0.ɵɵtemplate(14, LabelListComponent_app_label_form_14_Template, 2, 3, "app-label-form", 10);
        i0.ɵɵtemplate(15, LabelListComponent_ng_template_15_Template, 9, 15, "ng-template", 11);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵproperty("ngIf", ctx.labelMode === "");
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.labelMode === "");
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.labelMode === "");
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("rowHover", true)("paginator", ctx.totalRecords > 0 && ctx.labelMode !== "short")("totalRecords", ctx.totalRecords)("lazy", true)("resetPageOnSort", true)("value", ctx.labels)("first", ctx.first)("rows", ctx.rows)("rowsPerPageOptions", ctx.labelMode === "short" ? i0.ɵɵpureFunction0(34, _c1) : ctx.rowOptions)("sortField", ctx.sortField)("sortOrder", ctx.ascSort)("selection", ctx.selectedItems)("metaKeySelection", true)("scrollable", ctx.labelMode === "short");
        i0.ɵɵadvance(5);
        i0.ɵɵstyleMap(i0.ɵɵpureFunction0(35, _c2));
        i0.ɵɵpropertyInterpolate("header", ctx.mode === "create" ? i0.ɵɵpipeBind1(10, 26, i0.ɵɵpipeBind1(11, 28, "label.create_new_label")) : i0.ɵɵpipeBind1(12, 30, i0.ɵɵpipeBind1(13, 32, "label.edit_label")));
        i0.ɵɵproperty("visible", ctx.isShownModal)("modal", true)("draggable", false)("resizable", false)("baseZIndex", 1);
        i0.ɵɵadvance(5);
        i0.ɵɵproperty("ngIf", ctx.isShownModal);
    } }, directives: [i3.NgIf, i7.Table, i4.PrimeTemplate, i8.Dialog, i9.Ripple, i10.ButtonDirective, i3.NgClass, i11.DefaultValueAccessor, i12.InputText, i11.NgControlStatus, i11.NgModel, i7.SortableColumn, i7.SortIcon, i7.SelectableRow, i13.Tag, i14.LabelFormComponent], pipes: [i3.TitleCasePipe, i2.TranslatePipe, i3.UpperCasePipe], styles: ["[_nghost-%COMP%]     .text-dark {\n  color: #000000 !important;\n}\n[_nghost-%COMP%]     .p-max-width-100 {\n  max-width: 100%;\n}\n[_nghost-%COMP%]     .p-tag {\n  padding: 0.1rem 0.4rem !important;\n}\n[_nghost-%COMP%]     .p-tag-value {\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  font-size: 12px;\n  line-height: 16px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvbGFiZWwvbGFiZWwtbGlzdC9sYWJlbC1saXN0LmNvbXBvbmVudC5zY3NzIiwic3JjL2FwcC9hdXRoZW50aWNhdGlvbi1wYWdlcy9sYWJlbC9sYWJlbC1saXN0L2xhYmVsLWxpc3QuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0U7RUFDRSx5QkFBQTtBQ0FKO0FER0U7RUFDRSxlQUFBO0FDREo7QURJRTtFQUNFLGlDQUFBO0FDRko7QURLRTtFQUNFLGdCQUFBO0VBQ0EsdUJBQUE7RUFDQSxtQkFBQTtFQUNBLGVBQUE7RUFDQSxpQkFBQTtBQ0hKIiwiZmlsZSI6InNyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvbGFiZWwvbGFiZWwtbGlzdC9sYWJlbC1saXN0LmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiOmhvc3QgOjpuZy1kZWVwIHtcbiAgLnRleHQtZGFyayB7XG4gICAgY29sb3I6ICMwMDAwMDAgIWltcG9ydGFudDtcbiAgfVxuXG4gIC5wLW1heC13aWR0aC0xMDAge1xuICAgIG1heC13aWR0aDogMTAwJTtcbiAgfVxuXG4gIC5wLXRhZyB7XG4gICAgcGFkZGluZzogMC4xcmVtIDAuNHJlbSAhaW1wb3J0YW50O1xuICB9XG5cbiAgLnAtdGFnLXZhbHVlIHtcbiAgICBvdmVyZmxvdzogaGlkZGVuO1xuICAgIHRleHQtb3ZlcmZsb3c6IGVsbGlwc2lzO1xuICAgIHdoaXRlLXNwYWNlOiBub3dyYXA7XG4gICAgZm9udC1zaXplOiAxMnB4O1xuICAgIGxpbmUtaGVpZ2h0OiAxNnB4O1xuICB9XG59XG4iLCI6aG9zdCA6Om5nLWRlZXAgLnRleHQtZGFyayB7XG4gIGNvbG9yOiAjMDAwMDAwICFpbXBvcnRhbnQ7XG59XG46aG9zdCA6Om5nLWRlZXAgLnAtbWF4LXdpZHRoLTEwMCB7XG4gIG1heC13aWR0aDogMTAwJTtcbn1cbjpob3N0IDo6bmctZGVlcCAucC10YWcge1xuICBwYWRkaW5nOiAwLjFyZW0gMC40cmVtICFpbXBvcnRhbnQ7XG59XG46aG9zdCA6Om5nLWRlZXAgLnAtdGFnLXZhbHVlIHtcbiAgb3ZlcmZsb3c6IGhpZGRlbjtcbiAgdGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7XG4gIHdoaXRlLXNwYWNlOiBub3dyYXA7XG4gIGZvbnQtc2l6ZTogMTJweDtcbiAgbGluZS1oZWlnaHQ6IDE2cHg7XG59Il19 */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LabelListComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-label-list',
                templateUrl: './label-list.component.html',
                styleUrls: ['./label-list.component.scss']
            }]
    }], function () { return [{ type: i1.Title }, { type: i2.TranslateService }, { type: i3.DatePipe }, { type: i4.MessageService }, { type: i5.ActivatedRoute }, { type: i5.Router }, { type: i6.LabelService }, { type: i4.ConfirmationService }]; }, { labelFormComponent: [{
            type: core_1.ViewChild,
            args: ['labelFormComponent']
        }], labelMode: [{
            type: core_1.Input
        }], labelFilter: [{
            type: core_1.Input
        }], labelIsSelected: [{
            type: core_1.Output
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/label/label.component.ts":
/*!***************************************************************!*\
  !*** ./src/app/authentication-pages/label/label.component.ts ***!
  \***************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.LabelComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
class LabelComponent {
    constructor() { }
    ngOnInit() {
    }
}
exports.LabelComponent = LabelComponent;
LabelComponent.ɵfac = function LabelComponent_Factory(t) { return new (t || LabelComponent)(); };
LabelComponent.ɵcmp = i0.ɵɵdefineComponent({ type: LabelComponent, selectors: [["app-label"]], decls: 1, vars: 0, template: function LabelComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelement(0, "router-outlet");
    } }, directives: [i1.RouterOutlet], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2xhYmVsL2xhYmVsLmNvbXBvbmVudC5zY3NzIn0= */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LabelComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-label',
                templateUrl: './label.component.html',
                styleUrls: ['./label.component.scss']
            }]
    }], function () { return []; }, null); })();


/***/ }),

/***/ "./src/app/authentication-pages/link/link-detail/link-detail.component.ts":
/*!********************************************************************************!*\
  !*** ./src/app/authentication-pages/link/link-detail/link-detail.component.ts ***!
  \********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.LinkDetailComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const linkInfo_model_1 = __webpack_require__(/*! ../../../../models/linkInfo.model */ "./src/models/linkInfo.model.ts");
const environment_1 = __webpack_require__(/*! ../../../../environments/environment */ "./src/environments/environment.ts");
const moment_1 = tslib_1.__importStar(__webpack_require__(/*! moment */ "./node_modules/moment/moment.js"));
const watermark_model_1 = __webpack_require__(/*! ../../../../models/watermark.model */ "./src/models/watermark.model.ts");
const drm_model_1 = __webpack_require__(/*! ../../../../models/drm.model */ "./src/models/drm.model.ts");
const addressbook_model_1 = __webpack_require__(/*! ../../../../models/addressbook.model */ "./src/models/addressbook.model.ts");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/__ivy_ngcc__/fesm2015/platform-browser.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! ngx-clipboard */ "./node_modules/ngx-clipboard/__ivy_ngcc__/fesm2015/ngx-clipboard.js"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/download.service */ "./src/app/services/download.service.ts"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i10 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/addressbook.service */ "./src/app/services/addressbook.service.ts"));
const i11 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/link.service */ "./src/app/services/link.service.ts"));
const i12 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js"));
const i13 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
const i14 = tslib_1.__importStar(__webpack_require__(/*! primeng/ripple */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-ripple.js"));
const i15 = tslib_1.__importStar(__webpack_require__(/*! primeng/tooltip */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-tooltip.js"));
const i16 = tslib_1.__importStar(__webpack_require__(/*! primeng/calendar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-calendar.js"));
const i17 = tslib_1.__importStar(__webpack_require__(/*! primeng/checkbox */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-checkbox.js"));
const i18 = tslib_1.__importStar(__webpack_require__(/*! primeng/table */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-table.js"));
const i19 = tslib_1.__importStar(__webpack_require__(/*! primeng/dialog */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dialog.js"));
const i20 = tslib_1.__importStar(__webpack_require__(/*! ../../drm/drm-setting/drm-setting.component */ "./src/app/authentication-pages/drm/drm-setting/drm-setting.component.ts"));
const i21 = tslib_1.__importStar(__webpack_require__(/*! ../../drm/view-online-setting/view-online-setting.component */ "./src/app/authentication-pages/drm/view-online-setting/view-online-setting.component.ts"));
const i22 = tslib_1.__importStar(__webpack_require__(/*! ../../view-online/view-online-form/view-online-form.component */ "./src/app/authentication-pages/view-online/view-online-form/view-online-form.component.ts"));
const i23 = tslib_1.__importStar(__webpack_require__(/*! ../../addressbook/addressbook-form/addressbook-form.component */ "./src/app/authentication-pages/addressbook/addressbook-form/addressbook-form.component.ts"));
const _c0 = ["drmSettingComponent"];
const _c1 = ["viewOnlineSettingComponent"];
const _c2 = ["addressbookFormComponent"];
function LinkDetailComponent_input_35_Template(rf, ctx) { if (rf & 1) {
    const _r14 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "input", 42);
    i0.ɵɵlistener("ngModelChange", function LinkDetailComponent_input_35_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r14); const ctx_r13 = i0.ɵɵnextContext(); return ctx_r13.linkInfo.password = $event; });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵproperty("ngModel", ctx_r0.linkInfo.password)("ngClass", (ctx_r0.linkFrm.controls["password"].dirty || ctx_r0.linkFrm.controls["password"].touched) && ctx_r0.linkFrm.controls["password"].invalid ? "ng-dirty" : "")("disabled", ctx_r0.linkInfo.linkType === 3 && ctx_r0.linkInfo.isViewPublic === 1 && !ctx_r0.hasProtectedFile ? true : null);
} }
function LinkDetailComponent_input_36_Template(rf, ctx) { if (rf & 1) {
    const _r16 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "input", 43);
    i0.ɵɵlistener("ngModelChange", function LinkDetailComponent_input_36_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r16); const ctx_r15 = i0.ɵɵnextContext(); return ctx_r15.linkInfo.password = $event; });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵproperty("ngModel", ctx_r1.linkInfo.password)("ngClass", (ctx_r1.linkFrm.controls["password"].dirty || ctx_r1.linkFrm.controls["password"].touched) && ctx_r1.linkFrm.controls["password"].invalid ? "ng-dirty" : "")("disabled", ctx_r1.linkInfo.linkType === 3 && ctx_r1.linkInfo.isViewPublic === 1 && !ctx_r1.hasProtectedFile ? true : null);
} }
function LinkDetailComponent_button_43_Template(rf, ctx) { if (rf & 1) {
    const _r18 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 44);
    i0.ɵɵlistener("click", function LinkDetailComponent_button_43_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r18); const ctx_r17 = i0.ɵɵnextContext(); return ctx_r17.showPassword = !ctx_r17.showPassword; });
    i0.ɵɵpipe(1, "titlecase");
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵpropertyInterpolate("pTooltip", i0.ɵɵpipeBind1(1, 1, i0.ɵɵpipeBind1(2, 3, "label.show_password")));
} }
function LinkDetailComponent_button_44_Template(rf, ctx) { if (rf & 1) {
    const _r20 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 45);
    i0.ɵɵlistener("click", function LinkDetailComponent_button_44_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r20); const ctx_r19 = i0.ɵɵnextContext(); return ctx_r19.showPassword = !ctx_r19.showPassword; });
    i0.ɵɵpipe(1, "titlecase");
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵpropertyInterpolate("pTooltip", i0.ɵɵpipeBind1(1, 1, i0.ɵɵpipeBind1(2, 3, "label.hide_password")));
} }
function LinkDetailComponent_div_45_small_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 46);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.special_chars"), " ");
} }
function LinkDetailComponent_div_45_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtemplate(1, LinkDetailComponent_div_45_small_1_Template, 3, 3, "small", 24);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r4 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r4.linkFrm.controls["password"].errors == null ? null : ctx_r4.linkFrm.controls["password"].errors.pattern);
} }
function LinkDetailComponent_div_58_small_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.require"), " ");
} }
function LinkDetailComponent_div_58_small_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.date_format"), " ");
} }
function LinkDetailComponent_div_58_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 46);
    i0.ɵɵtemplate(1, LinkDetailComponent_div_58_small_1_Template, 3, 3, "small", 19);
    i0.ɵɵtemplate(2, LinkDetailComponent_div_58_small_2_Template, 3, 3, "small", 19);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r5 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ((ctx_r5.linkFrm.controls["expiryDate"].errors == null ? null : ctx_r5.linkFrm.controls["expiryDate"].errors.required) || (ctx_r5.linkFrm.controls["expiryDate"].errors == null ? null : ctx_r5.linkFrm.controls["expiryDate"].errors.whitespace)) && (!ctx_r5.invalidExpiryLinkDate || !ctx_r5.isInputDate));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r5.invalidExpiryLinkDate && ctx_r5.isInputDate);
} }
function LinkDetailComponent_div_70_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 3);
    i0.ɵɵelementStart(1, "div", 47);
    i0.ɵɵelement(2, "app-drm-setting", 48, 49);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r6 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("mode", "small")("drmSetting", ctx_r6.linkDRMSettings)("isShowCB", false);
} }
function LinkDetailComponent_div_72_div_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 54);
    i0.ɵɵelement(1, "app-view-online-setting", 55, 56);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r25 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("watermarkSetting", ctx_r25.linkInfo.watermarkSetting);
} }
function LinkDetailComponent_div_72_Template(rf, ctx) { if (rf & 1) {
    const _r28 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 3);
    i0.ɵɵelementStart(1, "div", 50);
    i0.ɵɵelementStart(2, "p-checkbox", 51);
    i0.ɵɵlistener("ngModelChange", function LinkDetailComponent_div_72_Template_p_checkbox_ngModelChange_2_listener($event) { i0.ɵɵrestoreView(_r28); const ctx_r27 = i0.ɵɵnextContext(); return ctx_r27.watermarkSettings.showWm = $event; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "label", 52);
    i0.ɵɵtext(4);
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(6, LinkDetailComponent_div_72_div_6_Template, 3, 1, "div", 53);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r7 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngModel", ctx_r7.watermarkSettings.showWm);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 3, "label.show_wm"), " ");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r7.watermarkSettings.showWm && ctx_r7.linkInfo.watermarkSetting);
} }
function LinkDetailComponent_ng_template_87_tr_0_Template(rf, ctx) { if (rf & 1) {
    const _r34 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "td", 57);
    i0.ɵɵelementStart(2, "div", 58);
    i0.ɵɵelement(3, "i", 59);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "td", 60);
    i0.ɵɵtext(5);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(6, "td", 61);
    i0.ɵɵtext(7);
    i0.ɵɵpipe(8, "translate");
    i0.ɵɵpipe(9, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(10, "td", 62);
    i0.ɵɵelementStart(11, "td", 63);
    i0.ɵɵelementStart(12, "button", 64);
    i0.ɵɵlistener("click", function LinkDetailComponent_ng_template_87_tr_0_Template_button_click_12_listener() { i0.ɵɵrestoreView(_r34); const file_r29 = i0.ɵɵnextContext().$implicit; const ctx_r32 = i0.ɵɵnextContext(); return ctx_r32.navigateToFolder(file_r29); });
    i0.ɵɵpipe(13, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const file_r29 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("title", file_r29.name);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", file_r29.name, " ");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate2(" ", file_r29.fileSize, " ", file_r29.fileSize > 1 ? i0.ɵɵpipeBind1(8, 5, "label.items") : i0.ɵɵpipeBind1(9, 7, "label.item"), " ");
    i0.ɵɵadvance(5);
    i0.ɵɵpropertyInterpolate("pTooltip", i0.ɵɵpipeBind1(13, 9, "button.view"));
} }
function LinkDetailComponent_ng_template_87_tr_1_span_3_i_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 85);
} }
function LinkDetailComponent_ng_template_87_tr_1_span_3_i_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 86);
} }
function LinkDetailComponent_ng_template_87_tr_1_span_3_i_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 87);
} }
function LinkDetailComponent_ng_template_87_tr_1_span_3_i_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 88);
} }
function LinkDetailComponent_ng_template_87_tr_1_span_3_i_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 89);
} }
function LinkDetailComponent_ng_template_87_tr_1_span_3_i_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 89);
} }
function LinkDetailComponent_ng_template_87_tr_1_span_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 79);
    i0.ɵɵtemplate(1, LinkDetailComponent_ng_template_87_tr_1_span_3_i_1_Template, 1, 0, "i", 80);
    i0.ɵɵtemplate(2, LinkDetailComponent_ng_template_87_tr_1_span_3_i_2_Template, 1, 0, "i", 81);
    i0.ɵɵtemplate(3, LinkDetailComponent_ng_template_87_tr_1_span_3_i_3_Template, 1, 0, "i", 82);
    i0.ɵɵtemplate(4, LinkDetailComponent_ng_template_87_tr_1_span_3_i_4_Template, 1, 0, "i", 83);
    i0.ɵɵtemplate(5, LinkDetailComponent_ng_template_87_tr_1_span_3_i_5_Template, 1, 0, "i", 84);
    i0.ɵɵtemplate(6, LinkDetailComponent_ng_template_87_tr_1_span_3_i_6_Template, 1, 0, "i", 72);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const file_r29 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵproperty("ngSwitch", file_r29.fileType);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 1);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 3);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 4);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 5);
} }
function LinkDetailComponent_ng_template_87_tr_1_i_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 90);
} }
function LinkDetailComponent_ng_template_87_tr_1_i_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 91);
} }
function LinkDetailComponent_ng_template_87_tr_1_i_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 92);
} }
function LinkDetailComponent_ng_template_87_tr_1_i_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 93);
} }
function LinkDetailComponent_ng_template_87_tr_1_i_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 94);
} }
function LinkDetailComponent_ng_template_87_tr_1_i_9_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 89);
} }
function LinkDetailComponent_ng_template_87_tr_1_i_16_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 95);
    i0.ɵɵpipe(1, "translate");
} if (rf & 2) {
    i0.ɵɵpropertyInterpolate("pTooltip", i0.ɵɵpipeBind1(1, 1, "label.is_encrypted"));
} }
function LinkDetailComponent_ng_template_87_tr_1_button_18_Template(rf, ctx) { if (rf & 1) {
    const _r55 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 64);
    i0.ɵɵlistener("click", function LinkDetailComponent_ng_template_87_tr_1_button_18_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r55); const file_r29 = i0.ɵɵnextContext(2).$implicit; const ctx_r53 = i0.ɵɵnextContext(); return ctx_r53.doViewOnline(file_r29); });
    i0.ɵɵpipe(1, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵpropertyInterpolate("pTooltip", i0.ɵɵpipeBind1(1, 1, "button.view"));
} }
function LinkDetailComponent_ng_template_87_tr_1_button_19_Template(rf, ctx) { if (rf & 1) {
    const _r58 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 96);
    i0.ɵɵlistener("click", function LinkDetailComponent_ng_template_87_tr_1_button_19_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r58); const file_r29 = i0.ɵɵnextContext(2).$implicit; const ctx_r56 = i0.ɵɵnextContext(); return ctx_r56.downloadSingleFile(file_r29); });
    i0.ɵɵpipe(1, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵpropertyInterpolate("pTooltip", i0.ɵɵpipeBind1(1, 1, "button.download"));
} }
function LinkDetailComponent_ng_template_87_tr_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "td", 57);
    i0.ɵɵelementStart(2, "div", 65);
    i0.ɵɵtemplate(3, LinkDetailComponent_ng_template_87_tr_1_span_3_Template, 7, 6, "span", 66);
    i0.ɵɵtemplate(4, LinkDetailComponent_ng_template_87_tr_1_i_4_Template, 1, 0, "i", 67);
    i0.ɵɵtemplate(5, LinkDetailComponent_ng_template_87_tr_1_i_5_Template, 1, 0, "i", 68);
    i0.ɵɵtemplate(6, LinkDetailComponent_ng_template_87_tr_1_i_6_Template, 1, 0, "i", 69);
    i0.ɵɵtemplate(7, LinkDetailComponent_ng_template_87_tr_1_i_7_Template, 1, 0, "i", 70);
    i0.ɵɵtemplate(8, LinkDetailComponent_ng_template_87_tr_1_i_8_Template, 1, 0, "i", 71);
    i0.ɵɵtemplate(9, LinkDetailComponent_ng_template_87_tr_1_i_9_Template, 1, 0, "i", 72);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(10, "td", 73);
    i0.ɵɵelementStart(11, "span", 74);
    i0.ɵɵtext(12);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(13, "td", 61);
    i0.ɵɵtext(14);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(15, "td", 75);
    i0.ɵɵtemplate(16, LinkDetailComponent_ng_template_87_tr_1_i_16_Template, 2, 3, "i", 76);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(17, "td", 63);
    i0.ɵɵtemplate(18, LinkDetailComponent_ng_template_87_tr_1_button_18_Template, 2, 3, "button", 77);
    i0.ɵɵtemplate(19, LinkDetailComponent_ng_template_87_tr_1_button_19_Template, 2, 3, "button", 78);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const file_r29 = i0.ɵɵnextContext().$implicit;
    const ctx_r31 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngSwitch", ctx_r31.appUtil.getGroupFromMimeType(file_r29));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "secure");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "video");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "audio");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "image");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "text");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "compress");
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("title", file_r29.name);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(file_r29.name);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(ctx_r31.appUtil.convertFileSize(file_r29.fileSize));
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", file_r29.isEncrypt === 1 && ctx_r31.linkInfo.isViewPublic === 0);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r31.supportFileViewOnline(file_r29));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r31.linkInfo.allowedDownloadFile);
} }
function LinkDetailComponent_ng_template_87_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, LinkDetailComponent_ng_template_87_tr_0_Template, 14, 11, "tr", 19);
    i0.ɵɵtemplate(1, LinkDetailComponent_ng_template_87_tr_1_Template, 20, 13, "tr", 19);
} if (rf & 2) {
    const file_r29 = ctx.$implicit;
    i0.ɵɵproperty("ngIf", file_r29.folder);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", !file_r29.folder);
} }
function LinkDetailComponent_div_88_ng_template_6_Template(rf, ctx) { if (rf & 1) {
    const _r65 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 101);
    i0.ɵɵelementStart(1, "span", 102);
    i0.ɵɵelement(2, "i", 103);
    i0.ɵɵelementStart(3, "input", 104);
    i0.ɵɵlistener("keyup", function LinkDetailComponent_div_88_ng_template_6_Template_input_keyup_3_listener() { i0.ɵɵrestoreView(_r65); const ctx_r64 = i0.ɵɵnextContext(2); return ctx_r64.getAddressBookList(null, true); })("ngModelChange", function LinkDetailComponent_div_88_ng_template_6_Template_input_ngModelChange_3_listener($event) { i0.ɵɵrestoreView(_r65); const ctx_r66 = i0.ɵɵnextContext(2); return ctx_r66.getParams.searchKey = $event; });
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r60 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("placeholder", i0.ɵɵpipeBind1(4, 2, "label.search"));
    i0.ɵɵproperty("ngModel", ctx_r60.getParams.searchKey);
} }
function LinkDetailComponent_div_88_ng_template_7_th_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "th", 112);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "titlecase");
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelement(4, "p-sortIcon", 113);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind1(3, 3, "label.last_name")), " ");
} }
function LinkDetailComponent_div_88_ng_template_7_th_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "th", 112);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "titlecase");
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelement(4, "p-sortIcon", 113);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind1(3, 3, "label.last_name")), " ");
} }
function LinkDetailComponent_div_88_ng_template_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵtemplate(1, LinkDetailComponent_div_88_ng_template_7_th_1_Template, 5, 5, "th", 105);
    i0.ɵɵelementStart(2, "th", 106);
    i0.ɵɵtext(3);
    i0.ɵɵpipe(4, "titlecase");
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelement(6, "p-sortIcon", 107);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(7, LinkDetailComponent_div_88_ng_template_7_th_7_Template, 5, 5, "th", 105);
    i0.ɵɵelementStart(8, "th", 108);
    i0.ɵɵtext(9);
    i0.ɵɵpipe(10, "titlecase");
    i0.ɵɵpipe(11, "translate");
    i0.ɵɵelement(12, "p-sortIcon", 109);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(13, "th", 110);
    i0.ɵɵtext(14);
    i0.ɵɵpipe(15, "translate");
    i0.ɵɵelement(16, "p-sortIcon", 111);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r61 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r61.authUser.lang === "ja");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(4, 5, i0.ɵɵpipeBind1(5, 7, "label.first_name")), " ");
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("ngIf", ctx_r61.authUser.lang !== "ja");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(10, 9, i0.ɵɵpipeBind1(11, 11, "label.email")), " ");
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(15, 13, "label.create_date"), " ");
} }
function LinkDetailComponent_div_88_ng_template_8_td_1_Template(rf, ctx) { if (rf & 1) {
    const _r74 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "td", 115);
    i0.ɵɵlistener("dblclick", function LinkDetailComponent_div_88_ng_template_8_td_1_Template_td_dblclick_0_listener() { i0.ɵɵrestoreView(_r74); const item_r69 = i0.ɵɵnextContext().$implicit; const ctx_r72 = i0.ɵɵnextContext(2); return ctx_r72.openAddressBookDetail(item_r69); });
    i0.ɵɵelementStart(1, "span", 74);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r69 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("title", item_r69.lastName);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(item_r69.lastName);
} }
function LinkDetailComponent_div_88_ng_template_8_td_5_Template(rf, ctx) { if (rf & 1) {
    const _r78 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "td", 117);
    i0.ɵɵlistener("dblclick", function LinkDetailComponent_div_88_ng_template_8_td_5_Template_td_dblclick_0_listener() { i0.ɵɵrestoreView(_r78); const item_r69 = i0.ɵɵnextContext().$implicit; const ctx_r76 = i0.ɵɵnextContext(2); return ctx_r76.openAddressBookDetail(item_r69); });
    i0.ɵɵelementStart(1, "span", 74);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r69 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("title", item_r69.lastName);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(item_r69.lastName);
} }
function LinkDetailComponent_div_88_ng_template_8_Template(rf, ctx) { if (rf & 1) {
    const _r81 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵtemplate(1, LinkDetailComponent_div_88_ng_template_8_td_1_Template, 3, 2, "td", 114);
    i0.ɵɵelementStart(2, "td", 115);
    i0.ɵɵlistener("dblclick", function LinkDetailComponent_div_88_ng_template_8_Template_td_dblclick_2_listener() { i0.ɵɵrestoreView(_r81); const item_r69 = ctx.$implicit; const ctx_r80 = i0.ɵɵnextContext(2); return ctx_r80.openAddressBookDetail(item_r69); });
    i0.ɵɵelementStart(3, "span", 74);
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(5, LinkDetailComponent_div_88_ng_template_8_td_5_Template, 3, 2, "td", 116);
    i0.ɵɵelementStart(6, "td", 117);
    i0.ɵɵlistener("dblclick", function LinkDetailComponent_div_88_ng_template_8_Template_td_dblclick_6_listener() { i0.ɵɵrestoreView(_r81); const item_r69 = ctx.$implicit; const ctx_r82 = i0.ɵɵnextContext(2); return ctx_r82.openAddressBookDetail(item_r69); });
    i0.ɵɵelementStart(7, "span", 74);
    i0.ɵɵtext(8);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(9, "td", 118);
    i0.ɵɵlistener("dblclick", function LinkDetailComponent_div_88_ng_template_8_Template_td_dblclick_9_listener() { i0.ɵɵrestoreView(_r81); const item_r69 = ctx.$implicit; const ctx_r83 = i0.ɵɵnextContext(2); return ctx_r83.openAddressBookDetail(item_r69); });
    i0.ɵɵtext(10);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r69 = ctx.$implicit;
    const ctx_r62 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r62.authUser.lang === "ja");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("title", item_r69.firstName);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(item_r69.firstName);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r62.authUser.lang !== "ja");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("title", item_r69.mailAddress);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(item_r69.mailAddress);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", ctx_r62.appUtil.formatDateBasedOnDiff(ctx_r62.datePipe, item_r69.createDate), " ");
} }
function LinkDetailComponent_div_88_ng_template_9_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "td", 119);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, "label.no_record"));
} }
function LinkDetailComponent_div_88_Template(rf, ctx) { if (rf & 1) {
    const _r85 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelementStart(1, "div", 2);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "titlecase");
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "p-table", 97);
    i0.ɵɵlistener("onLazyLoad", function LinkDetailComponent_div_88_Template_p_table_onLazyLoad_5_listener($event) { i0.ɵɵrestoreView(_r85); const ctx_r84 = i0.ɵɵnextContext(); return ctx_r84.getAddressBookList($event); })("firstChange", function LinkDetailComponent_div_88_Template_p_table_firstChange_5_listener($event) { i0.ɵɵrestoreView(_r85); const ctx_r86 = i0.ɵɵnextContext(); return ctx_r86.first = $event; });
    i0.ɵɵtemplate(6, LinkDetailComponent_div_88_ng_template_6_Template, 5, 4, "ng-template", 98);
    i0.ɵɵtemplate(7, LinkDetailComponent_div_88_ng_template_7_Template, 17, 15, "ng-template", 99);
    i0.ɵɵtemplate(8, LinkDetailComponent_div_88_ng_template_8_Template, 11, 7, "ng-template", 37);
    i0.ɵɵtemplate(9, LinkDetailComponent_div_88_ng_template_9_Template, 4, 3, "ng-template", 100);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r9 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 12, i0.ɵɵpipeBind1(4, 14, "label.share_address_book_list")));
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("first", ctx_r9.first)("lazy", true)("paginator", ctx_r9.totalRecords > 0)("resetPageOnSort", true)("rowHover", true)("rowsPerPageOptions", ctx_r9.rowOptions)("rows", ctx_r9.rows)("sortField", ctx_r9.sortField)("sortOrder", ctx_r9.ascSort)("totalRecords", ctx_r9.totalRecords)("value", ctx_r9.addressBooks);
} }
function LinkDetailComponent_app_view_online_form_89_Template(rf, ctx) { if (rf & 1) {
    const _r88 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "app-view-online-form", 120);
    i0.ɵɵlistener("isClose", function LinkDetailComponent_app_view_online_form_89_Template_app_view_online_form_isClose_0_listener($event) { i0.ɵɵrestoreView(_r88); const ctx_r87 = i0.ɵɵnextContext(); return ctx_r87.isCheckViewOnline = $event; });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r10 = i0.ɵɵnextContext();
    i0.ɵɵproperty("emailView", ctx_r10.authUser.mailAddress)("file", ctx_r10.fileView)("projectId", ctx_r10.projectId)("watermarkSetting", ctx_r10.linkInfo.watermarkSetting);
} }
function LinkDetailComponent_app_addressbook_form_92_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "app-addressbook-form", 121, 122);
} if (rf & 2) {
    const ctx_r11 = i0.ɵɵnextContext();
    i0.ɵɵproperty("mode", "detail")("addressBookDetail", ctx_r11.addressBookDetail);
} }
function LinkDetailComponent_ng_template_93_Template(rf, ctx) { if (rf & 1) {
    const _r91 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 123);
    i0.ɵɵelementStart(1, "button", 124);
    i0.ɵɵlistener("click", function LinkDetailComponent_ng_template_93_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r91); const ctx_r90 = i0.ɵɵnextContext(); return ctx_r90.isShownAddressModal = false; });
    i0.ɵɵpipe(2, "titlecase");
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "button", 125);
    i0.ɵɵlistener("click", function LinkDetailComponent_ng_template_93_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r91); const ctx_r92 = i0.ɵɵnextContext(); return ctx_r92.doSubmit(); });
    i0.ɵɵpipe(5, "uppercase");
    i0.ɵɵpipe(6, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(2, 2, i0.ɵɵpipeBind1(3, 4, "button.cancel")));
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("label", i0.ɵɵpipeBind1(5, 6, i0.ɵɵpipeBind1(6, 8, "button.save")));
} }
class LinkDetailComponent {
    constructor(titleService, fb, datePipe, router, activatedRoute, authService, translate, clipboardService, downloadService, messageService, addressBookService, linkService) {
        this.titleService = titleService;
        this.fb = fb;
        this.datePipe = datePipe;
        this.router = router;
        this.activatedRoute = activatedRoute;
        this.authService = authService;
        this.translate = translate;
        this.clipboardService = clipboardService;
        this.downloadService = downloadService;
        this.messageService = messageService;
        this.addressBookService = addressBookService;
        this.linkService = linkService;
        this.linkFrm = new forms_1.FormGroup({});
        this.appUtil = app_util_1.default;
        this.constant = app_constants_1.default;
        this.linkInfo = new linkInfo_model_1.LinkInfo();
        this.files = [];
        this.documentLoading = true;
        this.minDate = new Date();
        this.showPassword = false;
        this.showViewPublic = false;
        this.hasProtectedFile = false;
        this.hasPackageSetting = false;
        this.drmSettings = new drm_model_1.DrmSetting();
        this.isInputDate = false;
        this.invalidExpiryLinkDate = false;
        this.invalidExpiryDocDate = false;
        this.isHideABList = true;
        this.addressBooks = [];
        this.first = 0;
        this.rows = 10;
        this.getParams = {
            projectId: '',
            searchKey: '',
            pageNumber: 1,
            pageSize: 10,
            sortField: 'createdDate',
            ascSort: false
        };
        this.isCheckViewOnline = false;
        this.isShownAddressModal = false;
        this.addressBookDetail = new addressbook_model_1.AddressBook();
        this.translate.get(['page_title.link_detail']).subscribe(translation => {
            this.titleService.setTitle(translation['page_title.link_detail']);
        });
    }
    ngOnInit() {
        this.authUser = this.authService.authUser;
        this.rowOptions = this.constant.DATA_VIEW.ROW_PER_PAGE_OPTIONS;
        this.projectId = this.activatedRoute.snapshot.paramMap.get('project_id');
        this.linkId = this.activatedRoute.snapshot.paramMap.get('link_id');
        this.getParams = this.linkService.getStoreParamsDetail
            ? this.linkService.getStoreParamsDetail : this.getParams;
        this.getParams.projectId = this.projectId;
        this.getParams.searchKey = '';
        this.rows = this.getParams.pageSize;
        this.ascSort = (this.getParams.ascSort) ? 1 : -1;
        this.sortField = this.getParams.sortField;
        this.maxDate = new Date(this.constant.MAX_DATE);
        this.linkFrm = this.fb.group({
            linkUrl: [''],
            type: [''],
            owner: [''],
            createdDate: [''],
            // can update
            password: ['', [forms_1.Validators.pattern(this.constant.PATTERNS.SCRIPT_PATTERN)]],
            allowedDownloadFile: [''],
            allowedViewPublic: [''],
            expiryDate: [''],
            showWatermark: [false],
        });
        this.getLinkPackage(() => {
            this.getAddressBookList();
        });
        this.getLinkItems();
    }
    getLinkPackage(cb) {
        if (this.pendingRequest) {
            this.pendingRequest.unsubscribe();
        }
        const params = {
            projectId: this.projectId
        };
        this.pendingRequest = this.linkService.getLinkPackage(this.linkId, this.appUtil.toSnakeCaseKey(params))
            .subscribe(res => {
            if (res.status === 200) {
                this.linkInfo = res.data;
                this.watermarkSettings = this.appUtil.toCamelCaseKey(JSON.parse(this.linkInfo.watermarkSetting));
                this.hasProtectedFile = this.linkInfo.hasProtectFile;
                this.hasPackageSetting = !!(this.linkInfo.packageId);
                if (this.hasProtectedFile && this.hasPackageSetting && !this.watermarkSettings) {
                    this.watermarkSettings = new watermark_model_1.WatermarkSettings();
                }
                if (this.hasPackageSetting) {
                    // tslint:disable-next-line:no-unused-expression
                    cb && cb();
                }
                this.showViewPublic = this.linkInfo.linkUrl.indexOf('public') !== -1 ||
                    this.linkInfo.linkType !== 3 || (this.linkInfo.linkType === 3 && this.hasProtectedFile);
                this.linkInfo.ownerName = (this.authUser.lang === 'ja') ? this.linkInfo.lastName + this.linkInfo.firstName :
                    this.linkInfo.firstName + ' ' + this.linkInfo.lastName;
                this.linkInfo.linkTypeStr = this.handleLinkType(this.linkInfo);
                this.linkInfo.linkUrl = this.handleLinkURL(this.linkInfo);
                const linkCreateDate = (new Date(this.linkInfo.createDate) > this.maxDate)
                    ? this.maxDate : this.linkInfo.createDate;
                this.linkInfo.createDate = moment_1.default(linkCreateDate).utc(false).format(this.constant.FORMAT_DATE.MOMENT_SHORT_DATE);
                const linkExpDate = (new Date(this.linkInfo.expiryDate) > this.maxDate)
                    ? this.maxDate : this.linkInfo.expiryDate;
                this.linkInfo.expiryDate = moment_1.default(linkExpDate).utc(false).format(this.constant.FORMAT_DATE.MOMENT_SHORT_DATE);
                this.linkInfo.allowViewPublic = this.linkInfo.isViewPublic === 1;
                const drmExp = (new Date(this.linkInfo.documentExpire) > this.maxDate)
                    ? this.maxDate : this.linkInfo.documentExpire;
                this.drmSettings.applyDRM = true;
                this.drmSettings.setDocExpiry = true;
                this.drmSettings.expiryDate = this.drmSettings.expiryTime = this.appUtil.formatBookendDate(drmExp, 0, this.constant.FORMAT_DATE.DRM_FORMAT_DATE, moment_1.default);
                this.drmSettings.unlimited = (this.drmSettings.expiryDate.toString() >= this.constant.MAX_DATE) ? 1 : 0;
                this.drmSettings.editable = this.linkInfo.editable;
                this.drmSettings.printable = this.linkInfo.printable;
                this.linkDRMSettings = JSON.stringify(this.drmSettings);
            }
        });
    }
    handleLinkURL(link) {
        const printable = (link.pritable) ? link.printable : 0;
        return environment_1.environment.frontend_url + link.linkUrl.replace('%d', printable);
    }
    handleLinkType(link) {
        let text = '';
        switch (link.linkType) {
            case 1:
                text = this.appUtil.translate(this.translate, 'label.link_type_project');
                break;
            case 2:
                text = this.appUtil.translate(this.translate, 'label.link_type_folder');
                break;
            case 3:
                text = this.appUtil.translate(this.translate, 'label.link_type_file');
                break;
            case 4:
                text = this.appUtil.translate(this.translate, 'label.link_type_multi_files');
                break;
            default:
                break;
        }
        return text;
    }
    handleCopyLinkURL() {
        this.clipboardService.copy(this.linkFrm.controls.linkUrl.value);
    }
    checkInvalidExpiryLinkDate() {
        this.invalidExpiryLinkDate = !this.linkFrm.controls.expiryDate.value;
        this.isInputDate = true;
    }
    updateLinkInfo() {
        this.linkFrm.markAllAsTouched();
        if (this.linkFrm.invalid) {
            return;
        }
        if (this.pendingRequest) {
            this.pendingRequest.unsubscribe();
        }
        let drmInvalid = false;
        let viewOnlineInvalid = false;
        if (this.drmSettingComponent && this.drmSettingComponent.form) {
            this.drmSettingComponent.form.markAllAsTouched();
            if (this.drmSettingComponent.form.invalid) {
                drmInvalid = true;
            }
        }
        if (this.linkFrm.value.showWatermark) {
            this.viewOnlineSettingComponent.form.markAllAsTouched();
            if (this.viewOnlineSettingComponent.form.invalid) {
                viewOnlineInvalid = true;
            }
        }
        if (drmInvalid || viewOnlineInvalid) {
            return;
        }
        let linkExpireDate = (this.linkFrm.controls.expiryDate.value) ? this.linkFrm.controls.expiryDate.value : this.maxDate;
        linkExpireDate = new Date(linkExpireDate);
        linkExpireDate.setHours(23);
        linkExpireDate.setMinutes(59);
        linkExpireDate.setSeconds(59);
        if (moment_1.default(linkExpireDate).format(this.constant.FORMAT_DATE.LINK_FORMAT_DATE)
            <= moment_1.default(moment_1.utc(new Date())).format(this.constant.FORMAT_DATE.LINK_FORMAT_DATE)) {
            this.messageService.add({
                severity: 'error',
                detail: this.appUtil.translate(this.translate, 'error.invalid_expiry_date'),
            });
            return;
        }
        const params = {
            projectId: this.projectId,
            expiryDate: moment_1.default(linkExpireDate).format(this.constant.FORMAT_DATE.MOMENT_SHORT_DATE),
            password: this.linkFrm.value.password,
            isViewPublic: (this.linkFrm.value.allowedViewPublic) ? 1 : 0,
            allowedDownloadFile: this.linkFrm.value.allowedDownloadFile,
            // watermark setting
            watermarkSetting: undefined,
            // document settings
            documentExpiryDate: moment_1.default(linkExpireDate).format(this.constant.FORMAT_DATE.DRM_FORMAT_DATE),
            printable: 0,
            editable: 0,
            maxNoDownload: 0
        };
        if (this.drmSettingComponent && this.drmSettingComponent.form) {
            const expDate = new Date(this.drmSettingComponent.form.value.expiryDate);
            expDate.setHours(this.drmSettingComponent.form.value.expiryTime.getHours());
            expDate.setMinutes(this.drmSettingComponent.form.value.expiryTime.getMinutes());
            expDate.setSeconds(55);
            const expiryDateDoc = this.appUtil.formatBookendDate(expDate, this.drmSettingComponent.form.value.timezone.code, this.constant.FORMAT_DATE.LINK_FORMAT_DATE, moment_1.default);
            if (expiryDateDoc <= moment_1.default(moment_1.utc(new Date())).format(this.constant.FORMAT_DATE.LINK_FORMAT_DATE)) {
                this.messageService.add({
                    severity: 'error',
                    detail: this.appUtil.translate(this.translate, 'error.invalid_expiry_date'),
                });
                return;
            }
            params.documentExpiryDate = expiryDateDoc;
            params.printable = (this.drmSettingComponent.form.value.printable) ? 1 : 0;
            params.editable = (this.drmSettingComponent.form.value.editable) ? 1 : 0;
        }
        if (!this.linkFrm.value.showWatermark && this.hasProtectedFile && this.hasPackageSetting
            || (this.viewOnlineSettingComponent && this.viewOnlineSettingComponent.form)) {
            params.watermarkSetting = JSON.stringify(this.handleWmParams());
        }
        this.pendingRequest = this.linkService.editLink(this.linkId, this.appUtil.toSnakeCaseKey(params))
            .subscribe(res => {
            if (res.status === 200) {
                this.getLinkPackage();
                this.messageService.add({
                    severity: 'success',
                    detail: this.appUtil.translate(this.translate, 'default_toast.update_success')
                });
            }
        });
    }
    handleWmParams() {
        const wmSet = {
            defaultWm: 1,
            showWm: 1,
            setting: null
        };
        const wmSubSetting = {
            wmText: '',
            wmFontSize: 50,
            wmColor: '',
            wmPosition: 'diagonal'
        };
        if (!this.linkFrm.value.showWatermark) {
            wmSet.showWm = 0;
        }
        else {
            if (this.viewOnlineSettingComponent.form.value.wmSetting === 'custom') {
                wmSet.defaultWm = 0;
                wmSubSetting.wmText = this.viewOnlineSettingComponent.form.value.wmContent;
                wmSubSetting.wmColor = this.viewOnlineSettingComponent.form.value.colorText;
                wmSubSetting.wmFontSize = this.viewOnlineSettingComponent.form.value.fontSize;
                wmSubSetting.wmPosition = this.viewOnlineSettingComponent.form.value.position;
                wmSet.setting = wmSubSetting;
            }
        }
        return this.appUtil.toSnakeCaseKey(wmSet);
    }
    getLinkItems() {
        this.documentLoading = true;
        const params = {
            childFolderId: 0,
            projectId: this.projectId
        };
        this.linkService.getLinkItems(this.linkId, this.appUtil.toSnakeCaseKey(params)).subscribe(res => {
            if (res.status === 200) {
                this.files = res.data;
                this.documentLoading = false;
            }
        });
    }
    downloadSingleFile(f) {
        if (!f) {
            return;
        }
        const params = {
            projectId: this.projectId,
            downloadType: 1,
            printable: (this.linkInfo.printable) ? this.linkInfo.printable : 0,
            linkId: this.linkId
        };
        let formattedParams = this.appUtil.toSnakeCaseKey(params);
        let queryParams = new URLSearchParams();
        for (let key in formattedParams) {
            queryParams.set(key, formattedParams[key]);
        }
        window.open(environment_1.environment.backend_url + "/api/download/files/" + f.id + "/share?" + queryParams.toString(), "_self");
        // this.downloadService.downloadFileFromShareLink(f.id, this.appUtil.toSnakeCaseKey(params), f.contentType).then((response) => {
        //   // when you use stricter type checking
        //   const blob: any = new Blob([response], {type: f.contentType});
        //   fileSaver.saveAs(blob, f.name);
        // }, (error) => {
        //   // console.log('error', error);
        // });
    }
    supportFileViewOnline(f) {
        return f.isEncrypt === 1 || (f.isEncrypt === 0 && this.supportNonProtectViewOnline(f));
    }
    supportNonProtectViewOnline(f) {
        const fileType = this.appUtil.getGroupFromMimeType(f);
        return ((fileType === 'secure' && f.fileType !== 5)
            || fileType === 'image' || fileType === 'video'
            || fileType === 'audio' || fileType === 'office');
    }
    navigateToFolder(file) {
        // this.router.navigate(['/view-link', this.linkInfo.printable, this.projectId, this.linkId, file.id]);
        const url = window.location.origin + window.location.pathname + '#/' + 'view-link/' +
            this.linkInfo.printable + '/' + this.projectId + '/' + this.linkId + '/' + file.id;
        window.open(url, '_blank');
    }
    getAddressBookList(event, isSearch) {
        if (event) {
            this.getParams.sortField = (event.sortField) ? event.sortField : 'createdDate';
            this.getParams.ascSort = (event.sortOrder === 1);
            if (event.rows) {
                this.getParams.pageNumber = (event.first / event.rows) + 1;
                this.getParams.pageSize = event.rows;
            }
        }
        if (isSearch) {
            this.getParams.pageNumber = 1;
            this.first = 0;
        }
        if (this.pendingRequest) {
            this.pendingRequest.unsubscribe();
        }
        this.pendingRequest = this.linkService.getSharedLinkRecipients(this.linkId, this.appUtil.toSnakeCaseKey(this.getParams)).subscribe(res => {
            if (res.status === 200) {
                this.isHideABList = false;
                this.linkService.setStoreParamsDetail(this.getParams);
                this.addressBooks = res.data.content;
                this.totalRecords = res.data.totalElements;
            }
            else {
                if (res.status === 1101) {
                    this.isHideABList = true;
                }
            }
        });
    }
    doViewOnline(file) {
        this.fileView = file;
        this.isCheckViewOnline = true;
    }
    openAddressBookDetail(addressBook) {
        this.addressBookDetail = Object.assign({}, addressBook);
        this.isShownAddressModal = true;
    }
    doSubmit() {
        this.addressbookFormComponent.addressBookFrm.markAllAsTouched();
        if (this.addressbookFormComponent.addressBookFrm.invalid) {
            return;
        }
        this.editAddressBook();
    }
    editAddressBook() {
        const params = {
            firstName: this.addressbookFormComponent.addressBookFrm.controls.firstName.value,
            lastName: this.addressbookFormComponent.addressBookFrm.controls.lastName.value
        };
        this.addressBookService.editAddressBook(this.addressBookDetail.addressBookId, this.appUtil.toSnakeCaseKey(params)).subscribe(res => {
            if (res.status === 200) {
                this.messageService.add({
                    severity: 'success',
                    detail: this.appUtil.translate(this.translate, 'default_toast.save_success')
                });
                this.getAddressBookList(null);
                this.isShownAddressModal = false;
            }
        }, error => {
            // console.log('error', error);
        });
    }
}
exports.LinkDetailComponent = LinkDetailComponent;
LinkDetailComponent.ɵfac = function LinkDetailComponent_Factory(t) { return new (t || LinkDetailComponent)(i0.ɵɵdirectiveInject(i1.Title), i0.ɵɵdirectiveInject(i2.FormBuilder), i0.ɵɵdirectiveInject(i3.DatePipe), i0.ɵɵdirectiveInject(i4.Router), i0.ɵɵdirectiveInject(i4.ActivatedRoute), i0.ɵɵdirectiveInject(i5.AuthService), i0.ɵɵdirectiveInject(i6.TranslateService), i0.ɵɵdirectiveInject(i7.ClipboardService), i0.ɵɵdirectiveInject(i8.DownloadService), i0.ɵɵdirectiveInject(i9.MessageService), i0.ɵɵdirectiveInject(i10.AddressbookService), i0.ɵɵdirectiveInject(i11.LinkService)); };
LinkDetailComponent.ɵcmp = i0.ɵɵdefineComponent({ type: LinkDetailComponent, selectors: [["app-link-detail"]], viewQuery: function LinkDetailComponent_Query(rf, ctx) { if (rf & 1) {
        i0.ɵɵviewQuery(_c0, 1);
        i0.ɵɵviewQuery(_c1, 1);
        i0.ɵɵviewQuery(_c2, 1);
    } if (rf & 2) {
        let _t;
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.drmSettingComponent = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.viewOnlineSettingComponent = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.addressbookFormComponent = _t.first);
    } }, decls: 94, vars: 98, consts: [[1, "page-title"], [3, "formGroup"], [1, "page-title-lv2"], [1, "p-fluid", "p-formgrid", "p-grid"], [1, "p-field", "p-col-12", "p-lg-6"], [1, "p-inputgroup"], [1, "p-float-label"], ["formControlName", "linkUrl", "id", "linkURL", "pInputText", "", "type", "text", 3, "readonly", "ngModel", "ngModelChange"], ["for", "linkURL"], ["icon", "fas fa-copy", "pButton", "", "pRipple", "", "type", "button", 1, "p-inputgroup-addon", 3, "pTooltip", "click"], ["formControlName", "type", "id", "type", "pInputText", "", "type", "text", 3, "ngModel", "ngModelChange"], ["for", "type"], ["formControlName", "owner", "id", "owner", "pInputText", "", "type", "text"], ["formControlName", "password", "id", "password-show", "maxlength", "32", "pInputText", "", "type", "password", 3, "ngModel", "ngClass", "disabled", "ngModelChange", 4, "ngIf"], ["formControlName", "password", "id", "password", "maxlength", "32", "pInputText", "", "type", "text", 3, "ngModel", "ngClass", "disabled", "ngModelChange", 4, "ngIf"], ["for", "password-show"], ["for", "password"], ["class", "p-inputgroup-addon", "icon", "far fa-eye", "pButton", "", "pRipple", "", "type", "button", 3, "pTooltip", "click", 4, "ngIf"], ["class", "p-inputgroup-addon", "icon", "fas fa-eye-slash", "pButton", "", "pRipple", "", "type", "button", 3, "pTooltip", "click", 4, "ngIf"], [4, "ngIf"], ["dateFormat", "mm/dd/yy", "showIcon", "true", "showButtonBar", "true", "formControlName", "createdDate", "id", "createdDate", 3, "disabled", "ngModel", "minDate", "ngModelChange"], ["for", "createdDate"], ["dateFormat", "mm/dd/yy", "formControlName", "expiryDate", "id", "expiryDate", 1, "placeholder-custom", 3, "minDate", "ngClass", "showIcon", "placeholder", "ngModel", "disabled", "onInput", "onBlur", "ngModelChange"], ["for", "expiryDate"], ["class", "p-error", 4, "ngIf"], [1, "p-field-checkbox"], ["binary", "true", "formControlName", "allowedDownloadFile", "inputId", "allowedDownloadFile", "name", "allowedDownloadFile", 1, "cs-pointer", 3, "ngModel", "ngModelChange"], ["for", "allowedDownloadFile", 1, "cs-pointer"], ["binary", "true", "formControlName", "allowedViewPublic", "inputId", "allowedViewPublic", "name", "allowedViewPublic", 1, "cs-pointer", 3, "disabled", "ngModel", "ngModelChange"], ["for", "allowedViewPublic", 1, "cs-pointer"], ["class", "p-fluid p-formgrid p-grid", 4, "ngIf"], [1, "p-grid"], [1, "p-col-12", "p-text-right"], ["icon", "fas fa-arrow-left p-button-icon-left", "pButton", "", "pRipple", "", "type", "button", 1, "p-button-raised", "p-button-warning", "p-mr-2", 3, "routerLink", "label"], ["icon", "fas fa-check p-button-icon-left", "pButton", "", "pRipple", "", "type", "button", 1, "p-button-raised", 3, "label", "click"], [1, "p-formgrid", "p-grid"], ["scrollHeight", "400px", 1, "p-field", 3, "value", "scrollable", "loading"], ["pTemplate", "body"], [3, "emailView", "file", "projectId", "watermarkSetting", "isClose", 4, "ngIf"], ["styleClass", "custom-dialog", 3, "header", "visible", "modal", "draggable", "resizable", "baseZIndex", "visibleChange"], [3, "mode", "addressBookDetail", 4, "ngIf"], ["pTemplate", "footer"], ["formControlName", "password", "id", "password-show", "maxlength", "32", "pInputText", "", "type", "password", 3, "ngModel", "ngClass", "disabled", "ngModelChange"], ["formControlName", "password", "id", "password", "maxlength", "32", "pInputText", "", "type", "text", 3, "ngModel", "ngClass", "disabled", "ngModelChange"], ["icon", "far fa-eye", "pButton", "", "pRipple", "", "type", "button", 1, "p-inputgroup-addon", 3, "pTooltip", "click"], ["icon", "fas fa-eye-slash", "pButton", "", "pRipple", "", "type", "button", 1, "p-inputgroup-addon", 3, "pTooltip", "click"], [1, "p-error"], [1, "p-col-12"], [3, "mode", "drmSetting", "isShowCB"], ["drmSettingComponent", ""], [1, "p-field-checkbox", "p-col-12"], ["name", "showWatermark", "binary", "true", "formControlName", "showWatermark", "inputId", "show-watermark", 3, "ngModel", "ngModelChange"], ["for", "show-watermark"], ["class", "p-col-12 p-pl-5", 4, "ngIf"], [1, "p-col-12", "p-pl-5"], [3, "watermarkSetting"], ["viewOnlineSettingComponent", ""], [2, "width", "20px"], [1, "p-d-inline-flex", "p-align-center"], [1, "fas", "fa-folder", "text-primary"], [1, "p-text-truncate", 3, "title"], [2, "width", "15%"], [1, "p-px-0", 2, "width", "20px"], [1, "p-text-right", 2, "width", "117px"], ["icon", "fas fa-eye", "iconPos", "left", "pButton", "", "tooltipPosition", "top", 1, "p-button-info", 3, "pTooltip", "click"], [1, "p-d-inline-flex", "p-align-center", 3, "ngSwitch"], [3, "ngSwitch", 4, "ngSwitchCase"], ["class", "fas fa-file-video", 4, "ngSwitchCase"], ["class", "fas fa-file-audio", 4, "ngSwitchCase"], ["class", "fas fa-file-image", 4, "ngSwitchCase"], ["class", "far fa-file-alt", 4, "ngSwitchCase"], ["class", "far fa-file-archive", 4, "ngSwitchCase"], ["class", "far fa-file", 4, "ngSwitchDefault"], [1, "p-text-truncate"], [3, "title"], [1, "p-text-center", "p-px-0", 2, "width", "20px"], ["class", "fas fa-lock", "tooltipPosition", "top", 3, "pTooltip", 4, "ngIf"], ["class", "p-button-info", "icon", "fas fa-eye", "iconPos", "left", "pButton", "", "tooltipPosition", "top", 3, "pTooltip", "click", 4, "ngIf"], ["pButton", "", "icon", "fas fa-download", "iconPos", "left", "class", "p-ml-1", "tooltipPosition", "top", 3, "pTooltip", "click", 4, "ngIf"], [3, "ngSwitch"], ["class", "far fa-file-pdf text-danger", 4, "ngSwitchCase"], ["class", "far fa-file-word text-primary", 4, "ngSwitchCase"], ["class", "far fa-file-excel text-success", 4, "ngSwitchCase"], ["class", "far fa-file-powerpoint text-warning", 4, "ngSwitchCase"], ["class", "far fa-file", 4, "ngSwitchCase"], [1, "far", "fa-file-pdf", "text-danger"], [1, "far", "fa-file-word", "text-primary"], [1, "far", "fa-file-excel", "text-success"], [1, "far", "fa-file-powerpoint", "text-warning"], [1, "far", "fa-file"], [1, "fas", "fa-file-video"], [1, "fas", "fa-file-audio"], [1, "fas", "fa-file-image"], [1, "far", "fa-file-alt"], [1, "far", "fa-file-archive"], ["tooltipPosition", "top", 1, "fas", "fa-lock", 3, "pTooltip"], ["pButton", "", "icon", "fas fa-download", "iconPos", "left", "tooltipPosition", "top", 1, "p-ml-1", 3, "pTooltip", "click"], [3, "first", "lazy", "paginator", "resetPageOnSort", "rowHover", "rowsPerPageOptions", "rows", "sortField", "sortOrder", "totalRecords", "value", "onLazyLoad", "firstChange"], ["pTemplate", "caption"], ["pTemplate", "header"], ["pTemplate", "emptymessage"], [1, "p-d-flex", "p-ai-center", "p-jc-between", "p-pl-0"], [1, "p-input-icon-left"], [1, "pi", "pi-search"], ["pInputText", "", "type", "text", 1, "search-style", "h-38", 3, "ngModel", "placeholder", "keyup", "ngModelChange"], ["class", "p-text-left", "pSortableColumn", "lastName", "style", "width:25%", 4, "ngIf"], ["pSortableColumn", "firstName", 1, "p-text-left", 2, "width", "25%"], ["field", "firstName"], ["pSortableColumn", "mailAddress", 1, "p-text-left"], ["field", "mailAddress"], ["pSortableColumn", "createdDate", 1, "p-text-left", 2, "width", "20%"], ["field", "createdDate"], ["pSortableColumn", "lastName", 1, "p-text-left", 2, "width", "25%"], ["field", "lastName"], ["class", "p-text-truncate cs-pointer", 3, "dblclick", 4, "ngIf"], [1, "p-text-truncate", "cs-pointer", 3, "dblclick"], ["class", "p-text-truncate", 3, "dblclick", 4, "ngIf"], [1, "p-text-truncate", 3, "dblclick"], [3, "dblclick"], ["colspan", "4", 1, "p-text-center"], [3, "emailView", "file", "projectId", "watermarkSetting", "isClose"], [3, "mode", "addressBookDetail"], ["addressbookFormComponent", ""], [1, "p-col-12", "p-text-right", "p-pr-0"], ["icon", "fas fa-times", "pButton", "", "pRipple", "", "type", "button", 1, "p-button-raised", "p-button-warning", "p-mr-2", 3, "label", "click"], ["icon", "fas fa-plus", "type", "button", "pRipple", "", "pButton", "", 1, "p-button-raised", "p-mr-0", 3, "label", "click"]], template: function LinkDetailComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵtext(1);
        i0.ɵɵpipe(2, "titlecase");
        i0.ɵɵpipe(3, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(4, "form", 1);
        i0.ɵɵelementStart(5, "div", 2);
        i0.ɵɵtext(6);
        i0.ɵɵpipe(7, "titlecase");
        i0.ɵɵpipe(8, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(9, "div", 3);
        i0.ɵɵelementStart(10, "div", 4);
        i0.ɵɵelementStart(11, "div", 5);
        i0.ɵɵelementStart(12, "span", 6);
        i0.ɵɵelementStart(13, "input", 7);
        i0.ɵɵlistener("ngModelChange", function LinkDetailComponent_Template_input_ngModelChange_13_listener($event) { return ctx.linkInfo.linkUrl = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(14, "label", 8);
        i0.ɵɵtext(15);
        i0.ɵɵpipe(16, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(17, "button", 9);
        i0.ɵɵlistener("click", function LinkDetailComponent_Template_button_click_17_listener() { return ctx.handleCopyLinkURL(); });
        i0.ɵɵpipe(18, "titlecase");
        i0.ɵɵpipe(19, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(20, "div", 4);
        i0.ɵɵelementStart(21, "span", 6);
        i0.ɵɵelementStart(22, "input", 10);
        i0.ɵɵlistener("ngModelChange", function LinkDetailComponent_Template_input_ngModelChange_22_listener($event) { return ctx.linkInfo.linkTypeStr = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(23, "label", 11);
        i0.ɵɵtext(24);
        i0.ɵɵpipe(25, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(26, "div", 4);
        i0.ɵɵelementStart(27, "span", 6);
        i0.ɵɵelement(28, "input", 12);
        i0.ɵɵelementStart(29, "label", 11);
        i0.ɵɵtext(30);
        i0.ɵɵpipe(31, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(32, "div", 4);
        i0.ɵɵelementStart(33, "div", 5);
        i0.ɵɵelementStart(34, "span", 6);
        i0.ɵɵtemplate(35, LinkDetailComponent_input_35_Template, 1, 3, "input", 13);
        i0.ɵɵtemplate(36, LinkDetailComponent_input_36_Template, 1, 3, "input", 14);
        i0.ɵɵelementStart(37, "label", 15);
        i0.ɵɵtext(38);
        i0.ɵɵpipe(39, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(40, "label", 16);
        i0.ɵɵtext(41);
        i0.ɵɵpipe(42, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(43, LinkDetailComponent_button_43_Template, 3, 5, "button", 17);
        i0.ɵɵtemplate(44, LinkDetailComponent_button_44_Template, 3, 5, "button", 18);
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(45, LinkDetailComponent_div_45_Template, 2, 1, "div", 19);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(46, "div", 4);
        i0.ɵɵelementStart(47, "span", 6);
        i0.ɵɵelementStart(48, "p-calendar", 20);
        i0.ɵɵlistener("ngModelChange", function LinkDetailComponent_Template_p_calendar_ngModelChange_48_listener($event) { return ctx.linkInfo.createDate = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(49, "label", 21);
        i0.ɵɵtext(50);
        i0.ɵɵpipe(51, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(52, "div", 4);
        i0.ɵɵelementStart(53, "span", 6);
        i0.ɵɵelementStart(54, "p-calendar", 22);
        i0.ɵɵlistener("onInput", function LinkDetailComponent_Template_p_calendar_onInput_54_listener() { return ctx.checkInvalidExpiryLinkDate(); })("onBlur", function LinkDetailComponent_Template_p_calendar_onBlur_54_listener() { return ctx.isInputDate = false; })("ngModelChange", function LinkDetailComponent_Template_p_calendar_ngModelChange_54_listener($event) { return ctx.linkInfo.expiryDate = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(55, "label", 23);
        i0.ɵɵtext(56);
        i0.ɵɵpipe(57, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(58, LinkDetailComponent_div_58_Template, 3, 2, "div", 24);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(59, "div", 4);
        i0.ɵɵelementStart(60, "div", 25);
        i0.ɵɵelementStart(61, "p-checkbox", 26);
        i0.ɵɵlistener("ngModelChange", function LinkDetailComponent_Template_p_checkbox_ngModelChange_61_listener($event) { return ctx.linkInfo.allowedDownloadFile = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(62, "label", 27);
        i0.ɵɵtext(63);
        i0.ɵɵpipe(64, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(65, "div", 25);
        i0.ɵɵelementStart(66, "p-checkbox", 28);
        i0.ɵɵlistener("ngModelChange", function LinkDetailComponent_Template_p_checkbox_ngModelChange_66_listener($event) { return ctx.linkInfo.allowViewPublic = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(67, "label", 29);
        i0.ɵɵtext(68);
        i0.ɵɵpipe(69, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(70, LinkDetailComponent_div_70_Template, 4, 3, "div", 30);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(71, "div", 4);
        i0.ɵɵtemplate(72, LinkDetailComponent_div_72_Template, 7, 5, "div", 30);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(73, "div", 31);
        i0.ɵɵelementStart(74, "div", 32);
        i0.ɵɵelement(75, "button", 33);
        i0.ɵɵpipe(76, "uppercase");
        i0.ɵɵpipe(77, "translate");
        i0.ɵɵelementStart(78, "button", 34);
        i0.ɵɵlistener("click", function LinkDetailComponent_Template_button_click_78_listener() { return ctx.updateLinkInfo(); });
        i0.ɵɵpipe(79, "uppercase");
        i0.ɵɵpipe(80, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(81, "div", 2);
        i0.ɵɵtext(82);
        i0.ɵɵpipe(83, "titlecase");
        i0.ɵɵpipe(84, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(85, "div", 35);
        i0.ɵɵelementStart(86, "p-table", 36);
        i0.ɵɵtemplate(87, LinkDetailComponent_ng_template_87_Template, 2, 2, "ng-template", 37);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(88, LinkDetailComponent_div_88_Template, 10, 16, "div", 19);
        i0.ɵɵtemplate(89, LinkDetailComponent_app_view_online_form_89_Template, 1, 4, "app-view-online-form", 38);
        i0.ɵɵelementStart(90, "p-dialog", 39);
        i0.ɵɵlistener("visibleChange", function LinkDetailComponent_Template_p_dialog_visibleChange_90_listener($event) { return ctx.isShownAddressModal = $event; });
        i0.ɵɵpipe(91, "translate");
        i0.ɵɵtemplate(92, LinkDetailComponent_app_addressbook_form_92_Template, 2, 2, "app-addressbook-form", 40);
        i0.ɵɵtemplate(93, LinkDetailComponent_ng_template_93_Template, 7, 10, "ng-template", 41);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵadvance(1);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 54, i0.ɵɵpipeBind1(3, 56, "label.link_detail")));
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("formGroup", ctx.linkFrm);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(7, 58, i0.ɵɵpipeBind1(8, 60, "label.edit_link_info")));
        i0.ɵɵadvance(7);
        i0.ɵɵproperty("readonly", true)("ngModel", ctx.linkInfo.linkUrl);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(16, 62, "label.link_url"));
        i0.ɵɵadvance(2);
        i0.ɵɵpropertyInterpolate("pTooltip", i0.ɵɵpipeBind1(18, 64, i0.ɵɵpipeBind1(19, 66, "label.copy_link")));
        i0.ɵɵadvance(5);
        i0.ɵɵproperty("ngModel", ctx.linkInfo.linkTypeStr);
        i0.ɵɵattribute("disabled", true);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(25, 68, "label.type"));
        i0.ɵɵadvance(4);
        i0.ɵɵattribute("disabled", true);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(31, 70, "label.owner"));
        i0.ɵɵadvance(5);
        i0.ɵɵproperty("ngIf", !ctx.showPassword);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.showPassword);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(39, 72, "label.password_lbl"));
        i0.ɵɵadvance(3);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(42, 74, "label.password_lbl"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", !ctx.showPassword);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.showPassword);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", (ctx.linkFrm.controls["password"].dirty || ctx.linkFrm.controls["password"].touched) && ctx.linkFrm.controls["password"].invalid);
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("disabled", true)("ngModel", ctx.linkInfo.createDate)("minDate", ctx.minDate);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(51, 76, "label.create_date"));
        i0.ɵɵadvance(4);
        i0.ɵɵproperty("minDate", ctx.minDate)("ngClass", ctx.linkFrm.controls["expiryDate"].value && (ctx.linkFrm.controls["expiryDate"].invalid || ctx.invalidExpiryLinkDate) ? "ng-dirty" : "")("showIcon", true)("placeholder", "mm/dd/yyyy")("ngModel", ctx.linkInfo.expiryDate)("disabled", ctx.linkInfo.linkType === 3 && ctx.linkInfo.isViewPublic === 1 && !ctx.hasProtectedFile);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(57, 78, "label.link_expiry_date"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.linkFrm.controls["expiryDate"].value && (ctx.linkFrm.controls["expiryDate"].invalid || ctx.invalidExpiryLinkDate));
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("ngModel", ctx.linkInfo.allowedDownloadFile);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(64, 80, "label.allow_download_file"));
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("disabled", ctx.linkInfo.linkType === 3 && !ctx.hasProtectedFile)("ngModel", ctx.linkInfo.allowViewPublic);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(69, 82, "label.allow_public_view"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.hasProtectedFile && ctx.hasPackageSetting && ctx.linkDRMSettings !== null);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.hasProtectedFile && ctx.hasPackageSetting);
        i0.ɵɵadvance(3);
        i0.ɵɵpropertyInterpolate1("routerLink", "/link/", ctx.projectId, "");
        i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(76, 84, i0.ɵɵpipeBind1(77, 86, "button.back")));
        i0.ɵɵadvance(3);
        i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(79, 88, i0.ɵɵpipeBind1(80, 90, "button.save")));
        i0.ɵɵadvance(4);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(83, 92, i0.ɵɵpipeBind1(84, 94, "label.share_documents")));
        i0.ɵɵadvance(4);
        i0.ɵɵproperty("value", ctx.files)("scrollable", ctx.files.length > 6)("loading", ctx.documentLoading);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.hasProtectedFile && !ctx.isHideABList);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.isCheckViewOnline);
        i0.ɵɵadvance(1);
        i0.ɵɵpropertyInterpolate("header", i0.ɵɵpipeBind1(91, 96, "label.edit_address_book"));
        i0.ɵɵproperty("visible", ctx.isShownAddressModal)("modal", true)("draggable", false)("resizable", false)("baseZIndex", 10000);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.isShownAddressModal);
    } }, directives: [i2.ɵangular_packages_forms_forms_y, i2.NgControlStatusGroup, i2.FormGroupDirective, i2.DefaultValueAccessor, i2.NgControlStatus, i2.FormControlName, i12.InputText, i13.ButtonDirective, i14.Ripple, i15.Tooltip, i3.NgIf, i16.Calendar, i3.NgClass, i17.Checkbox, i4.RouterLink, i18.Table, i9.PrimeTemplate, i19.Dialog, i2.MaxLengthValidator, i20.DrmSettingComponent, i21.ViewOnlineSettingComponent, i3.NgSwitch, i3.NgSwitchCase, i3.NgSwitchDefault, i2.NgModel, i18.SortableColumn, i18.SortIcon, i22.ViewOnlineFormComponent, i23.AddressbookFormComponent], pipes: [i3.TitleCasePipe, i6.TranslatePipe, i3.UpperCasePipe], styles: ["[_nghost-%COMP%]  .p-datepicker table td {\n  padding: 0;\n}\n[_nghost-%COMP%]  .p-datepicker .p-datepicker-header {\n  padding-bottom: 0 !important;\n}\n[_nghost-%COMP%]  .placeholder-custom .p-calendar .p-inputtext::placeholder {\n  color: transparent;\n}\n[_nghost-%COMP%]  .placeholder-custom .p-calendar .p-inputtext:focus::placeholder {\n  color: gray;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvbGluay9saW5rLWRldGFpbC9saW5rLWRldGFpbC5jb21wb25lbnQuc2NzcyIsInNyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvbGluay9saW5rLWRldGFpbC9saW5rLWRldGFpbC5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDRTtFQUNFLFVBQUE7QUNBSjtBREdFO0VBQ0UsNEJBQUE7QUNESjtBRElFO0VBQ0Usa0JBQUE7QUNGSjtBREtFO0VBQ0UsV0FBQTtBQ0hKIiwiZmlsZSI6InNyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvbGluay9saW5rLWRldGFpbC9saW5rLWRldGFpbC5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIjpob3N0KDo6bmctZGVlcCkge1xuICAucC1kYXRlcGlja2VyIHRhYmxlIHRkIHtcbiAgICBwYWRkaW5nOiAwO1xuICB9XG5cbiAgLnAtZGF0ZXBpY2tlciAucC1kYXRlcGlja2VyLWhlYWRlciB7XG4gICAgcGFkZGluZy1ib3R0b206IDAgIWltcG9ydGFudDtcbiAgfVxuXG4gIC5wbGFjZWhvbGRlci1jdXN0b20gLnAtY2FsZW5kYXIgLnAtaW5wdXR0ZXh0OjpwbGFjZWhvbGRlciB7XG4gICAgY29sb3I6IHRyYW5zcGFyZW50O1xuICB9XG5cbiAgLnBsYWNlaG9sZGVyLWN1c3RvbSAucC1jYWxlbmRhciAucC1pbnB1dHRleHQ6Zm9jdXM6OnBsYWNlaG9sZGVyIHtcbiAgICBjb2xvcjogZ3JheTtcbiAgfVxufVxuXG4iLCI6aG9zdCg6Om5nLWRlZXApIC5wLWRhdGVwaWNrZXIgdGFibGUgdGQge1xuICBwYWRkaW5nOiAwO1xufVxuOmhvc3QoOjpuZy1kZWVwKSAucC1kYXRlcGlja2VyIC5wLWRhdGVwaWNrZXItaGVhZGVyIHtcbiAgcGFkZGluZy1ib3R0b206IDAgIWltcG9ydGFudDtcbn1cbjpob3N0KDo6bmctZGVlcCkgLnBsYWNlaG9sZGVyLWN1c3RvbSAucC1jYWxlbmRhciAucC1pbnB1dHRleHQ6OnBsYWNlaG9sZGVyIHtcbiAgY29sb3I6IHRyYW5zcGFyZW50O1xufVxuOmhvc3QoOjpuZy1kZWVwKSAucGxhY2Vob2xkZXItY3VzdG9tIC5wLWNhbGVuZGFyIC5wLWlucHV0dGV4dDpmb2N1czo6cGxhY2Vob2xkZXIge1xuICBjb2xvcjogZ3JheTtcbn0iXX0= */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LinkDetailComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-link-detail',
                templateUrl: './link-detail.component.html',
                styleUrls: ['./link-detail.component.scss']
            }]
    }], function () { return [{ type: i1.Title }, { type: i2.FormBuilder }, { type: i3.DatePipe }, { type: i4.Router }, { type: i4.ActivatedRoute }, { type: i5.AuthService }, { type: i6.TranslateService }, { type: i7.ClipboardService }, { type: i8.DownloadService }, { type: i9.MessageService }, { type: i10.AddressbookService }, { type: i11.LinkService }]; }, { drmSettingComponent: [{
            type: core_1.ViewChild,
            args: ['drmSettingComponent']
        }], viewOnlineSettingComponent: [{
            type: core_1.ViewChild,
            args: ['viewOnlineSettingComponent']
        }], addressbookFormComponent: [{
            type: core_1.ViewChild,
            args: ['addressbookFormComponent']
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/link/link-form/link-create/link-create.component.ts":
/*!******************************************************************************************!*\
  !*** ./src/app/authentication-pages/link/link-form/link-create/link-create.component.ts ***!
  \******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.LinkCreateComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const moment_1 = tslib_1.__importDefault(__webpack_require__(/*! moment */ "./node_modules/moment/moment.js"));
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! ../../../../services/link.service */ "./src/app/services/link.service.ts"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! ../../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! primeng/calendar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-calendar.js"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! primeng/checkbox */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-checkbox.js"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js"));
const i10 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
const i11 = tslib_1.__importStar(__webpack_require__(/*! primeng/ripple */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-ripple.js"));
const i12 = tslib_1.__importStar(__webpack_require__(/*! primeng/tooltip */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-tooltip.js"));
function LinkCreateComponent_div_9_small_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.date_format"), " ");
} }
function LinkCreateComponent_div_9_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 17);
    i0.ɵɵtemplate(1, LinkCreateComponent_div_9_small_1_Template, 3, 3, "small", 18);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r0.invalidExpiryDate && ctx_r0.isInputDate);
} }
function LinkCreateComponent_input_17_Template(rf, ctx) { if (rf & 1) {
    const _r8 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "input", 19);
    i0.ɵɵlistener("keypress", function LinkCreateComponent_input_17_Template_input_keypress_0_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r7 = i0.ɵɵnextContext(); return ctx_r7.util.blockSpaceChars($event); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵproperty("ngClass", (ctx_r1.createLinkFrm.controls["password"].dirty || ctx_r1.createLinkFrm.controls["password"].touched) && ctx_r1.createLinkFrm.controls["password"].invalid ? "ng-dirty" : "");
} }
function LinkCreateComponent_input_18_Template(rf, ctx) { if (rf & 1) {
    const _r10 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "input", 20);
    i0.ɵɵlistener("keypress", function LinkCreateComponent_input_18_Template_input_keypress_0_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r9 = i0.ɵɵnextContext(); return ctx_r9.util.blockSpaceChars($event); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵproperty("ngClass", (ctx_r2.createLinkFrm.controls["password"].dirty || ctx_r2.createLinkFrm.controls["password"].touched) && ctx_r2.createLinkFrm.controls["password"].invalid ? "ng-dirty" : "");
} }
function LinkCreateComponent_button_19_Template(rf, ctx) { if (rf & 1) {
    const _r12 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 21);
    i0.ɵɵlistener("click", function LinkCreateComponent_button_19_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r12); const ctx_r11 = i0.ɵɵnextContext(); return ctx_r11.handleShowPassword(); });
    i0.ɵɵpipe(1, "titlecase");
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵpropertyInterpolate("pTooltip", i0.ɵɵpipeBind1(1, 1, i0.ɵɵpipeBind1(2, 3, "label.show_password")));
} }
function LinkCreateComponent_button_20_Template(rf, ctx) { if (rf & 1) {
    const _r14 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 22);
    i0.ɵɵlistener("click", function LinkCreateComponent_button_20_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r14); const ctx_r13 = i0.ɵɵnextContext(); return ctx_r13.handleShowPassword(); });
    i0.ɵɵpipe(1, "titlecase");
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵpropertyInterpolate("pTooltip", i0.ɵɵpipeBind1(1, 1, i0.ɵɵpipeBind1(2, 3, "label.hide_password")));
} }
function LinkCreateComponent_div_21_small_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.special_chars"), " ");
} }
function LinkCreateComponent_div_21_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 17);
    i0.ɵɵtemplate(1, LinkCreateComponent_div_21_small_1_Template, 3, 3, "small", 18);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r5 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r5.createLinkFrm.controls["password"].errors == null ? null : ctx_r5.createLinkFrm.controls["password"].errors.pattern);
} }
class LinkCreateComponent {
    constructor(fb, datePipe, messageService, translate, linkService, authService) {
        this.fb = fb;
        this.datePipe = datePipe;
        this.messageService = messageService;
        this.translate = translate;
        this.linkService = linkService;
        this.authService = authService;
        this.util = app_util_1.default;
        this.constant = app_constants_1.default;
        this.createLinkFrm = new forms_1.FormGroup({});
        this.minDate = new Date();
        this.invalidExpiryDate = false;
        this.isInputDate = false;
        this.showPassword = false;
    }
    ngOnInit() {
        this.authUser = this.authService.authUser;
        this.createLinkFrm = this.fb.group({
            expiryDate: ['', []],
            password: ['', [forms_1.Validators.pattern(this.constant.PATTERNS.SCRIPT_PATTERN)]],
            allowedDownloadFile: [true, []],
            allowedViewPublic: [false, []]
        });
    }
    checkBlur() {
        this.isInputDate = false;
    }
    checkInvalidExpiryDate() {
        this.invalidExpiryDate = !this.createLinkFrm.controls.expiryDate.value;
        this.isInputDate = true;
    }
    handleShowPassword() {
        this.showPassword = !this.showPassword;
    }
    createLink(cb) {
        if (this.createLinkFrm.invalid) {
            return;
        }
        if (this.pendingRequest) {
            this.pendingRequest.unsubscribe();
        }
        let expiryDate;
        if (this.createLinkFrm.controls.expiryDate.value) {
            const docDateTime = new Date(this.createLinkFrm.controls.expiryDate.value);
            docDateTime.setHours(23, 59, 59);
            expiryDate = this.util.formatBookendDate(docDateTime, 0, this.constant.FORMAT_DATE.LINK_FORMAT_DATE, moment_1.default);
        }
        else {
            expiryDate = this.util.formatBookendDate(new Date(this.constant.MAX_DATE), 0, this.constant.FORMAT_DATE.LINK_FORMAT_DATE, moment_1.default);
        }
        const params = {
            name: this.name,
            projectId: this.projectId,
            folderId: this.folderId,
            fileId: this.fileId,
            typeShare: this.typeShare,
            password: this.createLinkFrm.controls.password.value,
            expiryDate: expiryDate,
            allowedDownloadFile: (this.createLinkFrm.controls.allowedDownloadFile.value) ? 1 : 0,
            isViewPublic: (this.createLinkFrm.controls.allowedViewPublic.value) ? 1 : 0,
            creating: false
        };
        this.linkService.createLink(this.util.toSnakeCaseKey(params)).subscribe(res => {
            if (res.status === 200) {
                this.messageService.add({
                    severity: 'success',
                    detail: this.util.translate(this.translate, 'default_toast.create_success')
                });
                cb && cb(res.data);
            }
        }, error => {
            this.messageService.add({
                severity: 'error',
                detail: this.util.translate(this.translate, 'error.' + error.status)
            });
        });
    }
}
exports.LinkCreateComponent = LinkCreateComponent;
LinkCreateComponent.ɵfac = function LinkCreateComponent_Factory(t) { return new (t || LinkCreateComponent)(i0.ɵɵdirectiveInject(i1.FormBuilder), i0.ɵɵdirectiveInject(i2.DatePipe), i0.ɵɵdirectiveInject(i3.MessageService), i0.ɵɵdirectiveInject(i4.TranslateService), i0.ɵɵdirectiveInject(i5.LinkService), i0.ɵɵdirectiveInject(i6.AuthService)); };
LinkCreateComponent.ɵcmp = i0.ɵɵdefineComponent({ type: LinkCreateComponent, selectors: [["app-link-create"]], inputs: { name: "name", typeShare: "typeShare", projectId: "projectId", folderId: "folderId", fileId: "fileId" }, decls: 37, vars: 33, consts: [[3, "formGroup"], [1, "p-fluid", "p-formgrid", "p-grid", 2, "position", "relative"], [1, "p-col-12"], [1, "page-title-lv2"], [1, "p-float-label"], ["placeholder", "mm/dd/yyyy", "dateFormat", "mm/dd/yy", "formControlName", "expiryDate", "appendTo", "body", 3, "showIcon", "minDate", "monthNavigator", "styleClass", "ngClass", "onInput", "onBlur"], ["class", "p-error", 4, "ngIf"], [1, "p-inputgroup"], ["formControlName", "password", "maxlength", "32", "pInputText", "", "type", "password", 3, "ngClass", "keypress", 4, "ngIf"], ["formControlName", "password", "maxlength", "32", "pInputText", "", "type", "text", 3, "ngClass", "keypress", 4, "ngIf"], ["class", "p-inputgroup-addon", "icon", "far fa-eye", "pButton", "", "pRipple", "", "type", "button", 3, "pTooltip", "click", 4, "ngIf"], ["class", "p-inputgroup-addon", "icon", "fas fa-eye-slash", "pButton", "", "pRipple", "", "type", "button", 3, "pTooltip", "click", 4, "ngIf"], [1, "p-field-checkbox"], ["binary", "true", "formControlName", "allowedDownloadFile", "inputId", "allowedDownloadFile", "name", "allowedDownloadFile", 1, "cs-pointer"], ["for", "allowedDownloadFile", 1, "cs-pointer"], ["binary", "true", "formControlName", "allowedViewPublic", "inputId", "allowedViewPublic", "name", "allowedViewPublic", 1, "cs-pointer"], ["for", "allowedViewPublic", 1, "cs-pointer"], [1, "p-error"], [4, "ngIf"], ["formControlName", "password", "maxlength", "32", "pInputText", "", "type", "password", 3, "ngClass", "keypress"], ["formControlName", "password", "maxlength", "32", "pInputText", "", "type", "text", 3, "ngClass", "keypress"], ["icon", "far fa-eye", "pButton", "", "pRipple", "", "type", "button", 1, "p-inputgroup-addon", 3, "pTooltip", "click"], ["icon", "fas fa-eye-slash", "pButton", "", "pRipple", "", "type", "button", 1, "p-inputgroup-addon", 3, "pTooltip", "click"]], template: function LinkCreateComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "form", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵelementStart(2, "div", 2);
        i0.ɵɵelementStart(3, "div", 3);
        i0.ɵɵtext(4);
        i0.ɵɵpipe(5, "titlecase");
        i0.ɵɵpipe(6, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(7, "span", 4);
        i0.ɵɵelementStart(8, "p-calendar", 5);
        i0.ɵɵlistener("onInput", function LinkCreateComponent_Template_p_calendar_onInput_8_listener() { return ctx.checkInvalidExpiryDate(); })("onBlur", function LinkCreateComponent_Template_p_calendar_onBlur_8_listener() { return ctx.checkBlur(); });
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(9, LinkCreateComponent_div_9_Template, 2, 1, "div", 6);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(10, "div", 2);
        i0.ɵɵelementStart(11, "div", 3);
        i0.ɵɵtext(12);
        i0.ɵɵpipe(13, "titlecase");
        i0.ɵɵpipe(14, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(15, "div", 7);
        i0.ɵɵelementStart(16, "span", 4);
        i0.ɵɵtemplate(17, LinkCreateComponent_input_17_Template, 1, 1, "input", 8);
        i0.ɵɵtemplate(18, LinkCreateComponent_input_18_Template, 1, 1, "input", 9);
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(19, LinkCreateComponent_button_19_Template, 3, 5, "button", 10);
        i0.ɵɵtemplate(20, LinkCreateComponent_button_20_Template, 3, 5, "button", 11);
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(21, LinkCreateComponent_div_21_Template, 2, 1, "div", 6);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(22, "div", 2);
        i0.ɵɵelementStart(23, "div", 3);
        i0.ɵɵtext(24);
        i0.ɵɵpipe(25, "titlecase");
        i0.ɵɵpipe(26, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(27, "div", 12);
        i0.ɵɵelement(28, "p-checkbox", 13);
        i0.ɵɵelementStart(29, "label", 14);
        i0.ɵɵtext(30);
        i0.ɵɵpipe(31, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(32, "div", 12);
        i0.ɵɵelement(33, "p-checkbox", 15);
        i0.ɵɵelementStart(34, "label", 16);
        i0.ɵɵtext(35);
        i0.ɵɵpipe(36, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵproperty("formGroup", ctx.createLinkFrm);
        i0.ɵɵadvance(4);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 17, i0.ɵɵpipeBind1(6, 19, "label.expiration")));
        i0.ɵɵadvance(4);
        i0.ɵɵproperty("showIcon", true)("minDate", ctx.minDate)("monthNavigator", true)("styleClass", "xs-small")("ngClass", ctx.createLinkFrm.controls["expiryDate"].value && (ctx.createLinkFrm.controls["expiryDate"].invalid || ctx.invalidExpiryDate) ? "ng-dirty" : "");
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.createLinkFrm.controls["expiryDate"].value && (ctx.createLinkFrm.controls["expiryDate"].invalid || ctx.invalidExpiryDate));
        i0.ɵɵadvance(3);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(13, 21, i0.ɵɵpipeBind1(14, 23, "label.set_password")));
        i0.ɵɵadvance(5);
        i0.ɵɵproperty("ngIf", !ctx.showPassword);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.showPassword);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", !ctx.showPassword);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.showPassword);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.createLinkFrm.controls["password"].value && ctx.createLinkFrm.controls["password"].invalid);
        i0.ɵɵadvance(3);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(25, 25, i0.ɵɵpipeBind1(26, 27, "label.settings")));
        i0.ɵɵadvance(6);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(31, 29, "label.allow_download_file"));
        i0.ɵɵadvance(5);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(36, 31, "label.allow_public_view"));
    } }, directives: [i1.ɵangular_packages_forms_forms_y, i1.NgControlStatusGroup, i1.FormGroupDirective, i7.Calendar, i1.NgControlStatus, i1.FormControlName, i2.NgClass, i2.NgIf, i8.Checkbox, i1.DefaultValueAccessor, i1.MaxLengthValidator, i9.InputText, i10.ButtonDirective, i11.Ripple, i12.Tooltip], pipes: [i2.TitleCasePipe, i4.TranslatePipe], styles: [".ui-datepicker.ui-widget {\n  line-height: 0.5rem;\n}\n\n[_nghost-%COMP%]  .p-dropdown-panel {\n  left: auto !important;\n  right: 0 !important;\n}\n\n[_nghost-%COMP%]  .p-calendar .p-datepicker {\n  min-width: unset !important;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvbGluay9saW5rLWZvcm0vbGluay1jcmVhdGUvbGluay1jcmVhdGUuY29tcG9uZW50LnNjc3MiLCJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2xpbmsvbGluay1mb3JtL2xpbmstY3JlYXRlL2xpbmstY3JlYXRlLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsbUJBQUE7QUNDRjs7QURHRTtFQUNFLHFCQUFBO0VBQ0EsbUJBQUE7QUNBSjs7QURHRTtFQUNFLDJCQUFBO0FDREoiLCJmaWxlIjoic3JjL2FwcC9hdXRoZW50aWNhdGlvbi1wYWdlcy9saW5rL2xpbmstZm9ybS9saW5rLWNyZWF0ZS9saW5rLWNyZWF0ZS5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIjo6bmctZGVlcCAudWktZGF0ZXBpY2tlci51aS13aWRnZXR7XG4gIGxpbmUtaGVpZ2h0OiAwLjVyZW07XG59XG5cbjpob3N0KDo6bmctZGVlcCkge1xuICAucC1kcm9wZG93bi1wYW5lbCB7XG4gICAgbGVmdDogYXV0byAhaW1wb3J0YW50O1xuICAgIHJpZ2h0OiAwICFpbXBvcnRhbnQ7XG4gIH1cblxuICAucC1jYWxlbmRhciAucC1kYXRlcGlja2VyIHtcbiAgICBtaW4td2lkdGg6IHVuc2V0ICFpbXBvcnRhbnQ7XG4gIH1cbn1cbiIsIjo6bmctZGVlcCAudWktZGF0ZXBpY2tlci51aS13aWRnZXQge1xuICBsaW5lLWhlaWdodDogMC41cmVtO1xufVxuXG46aG9zdCg6Om5nLWRlZXApIC5wLWRyb3Bkb3duLXBhbmVsIHtcbiAgbGVmdDogYXV0byAhaW1wb3J0YW50O1xuICByaWdodDogMCAhaW1wb3J0YW50O1xufVxuOmhvc3QoOjpuZy1kZWVwKSAucC1jYWxlbmRhciAucC1kYXRlcGlja2VyIHtcbiAgbWluLXdpZHRoOiB1bnNldCAhaW1wb3J0YW50O1xufSJdfQ== */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LinkCreateComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-link-create',
                templateUrl: './link-create.component.html',
                styleUrls: ['./link-create.component.scss']
            }]
    }], function () { return [{ type: i1.FormBuilder }, { type: i2.DatePipe }, { type: i3.MessageService }, { type: i4.TranslateService }, { type: i5.LinkService }, { type: i6.AuthService }]; }, { name: [{
            type: core_1.Input
        }], typeShare: [{
            type: core_1.Input
        }], projectId: [{
            type: core_1.Input
        }], folderId: [{
            type: core_1.Input
        }], fileId: [{
            type: core_1.Input
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/link/link-form/link-setting/link-setting.component.ts":
/*!********************************************************************************************!*\
  !*** ./src/app/authentication-pages/link/link-form/link-setting/link-setting.component.ts ***!
  \********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.LinkSettingComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
const _ = tslib_1.__importStar(__webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js"));
const moment_1 = tslib_1.__importStar(__webpack_require__(/*! moment */ "./node_modules/moment/moment.js"));
const environment_1 = __webpack_require__(/*! ../../../../../environments/environment */ "./src/environments/environment.ts");
const watermark_model_1 = __webpack_require__(/*! ../../../../../models/watermark.model */ "./src/models/watermark.model.ts");
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! ngx-clipboard */ "./node_modules/ngx-clipboard/__ivy_ngcc__/fesm2015/ngx-clipboard.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! ../../../../services/link.service */ "./src/app/services/link.service.ts"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! ../../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! ../../../../services/user.service */ "./src/app/services/user.service.ts"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! ../../../../services/user-group.service */ "./src/app/services/user-group.service.ts"));
const i10 = tslib_1.__importStar(__webpack_require__(/*! ../../../../services/addressbook.service */ "./src/app/services/addressbook.service.ts"));
const i11 = tslib_1.__importStar(__webpack_require__(/*! ../../../../services/addressbook-group.service */ "./src/app/services/addressbook-group.service.ts"));
const i12 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js"));
const i13 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
const i14 = tslib_1.__importStar(__webpack_require__(/*! primeng/ripple */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-ripple.js"));
const i15 = tslib_1.__importStar(__webpack_require__(/*! @ng-select/ng-select */ "./node_modules/@ng-select/ng-select/__ivy_ngcc__/fesm2015/ng-select-ng-select.js"));
const i16 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtextarea */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtextarea.js"));
const i17 = tslib_1.__importStar(__webpack_require__(/*! primeng/dialog */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dialog.js"));
const i18 = tslib_1.__importStar(__webpack_require__(/*! primeng/calendar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-calendar.js"));
const i19 = tslib_1.__importStar(__webpack_require__(/*! primeng/dropdown */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dropdown.js"));
const i20 = tslib_1.__importStar(__webpack_require__(/*! primeng/checkbox */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-checkbox.js"));
const i21 = tslib_1.__importStar(__webpack_require__(/*! ../../../drm/view-online-setting/view-online-setting.component */ "./src/app/authentication-pages/drm/view-online-setting/view-online-setting.component.ts"));
const i22 = tslib_1.__importStar(__webpack_require__(/*! ../../../addressbook/address-group-select/address-group-select.component */ "./src/app/authentication-pages/addressbook/address-group-select/address-group-select.component.ts"));
const _c0 = ["viewOnlineSettingComponent"];
const _c1 = ["addressGroupSelectComponent"];
function LinkSettingComponent_ng_template_22_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "b");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵtext(3);
} if (rf & 2) {
    const search_r14 = ctx.searchTerm;
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 2, "label.create_new"));
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(": ", search_r14, " ");
} }
function LinkSettingComponent_ng_template_23_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r15 = ctx.item;
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(item_r15.value);
} }
function LinkSettingComponent_div_28_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 28);
    i0.ɵɵelementStart(1, "div", 4);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 1, "label.document_setting"), " ");
} }
function LinkSettingComponent_div_29_div_6_small_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.require"), " ");
} }
function LinkSettingComponent_div_29_div_6_small_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.date_format"), " ");
} }
function LinkSettingComponent_div_29_div_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 32);
    i0.ɵɵtemplate(1, LinkSettingComponent_div_29_div_6_small_1_Template, 3, 3, "small", 26);
    i0.ɵɵtemplate(2, LinkSettingComponent_div_29_div_6_small_2_Template, 3, 3, "small", 26);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r16 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ((ctx_r16.shareLinkFrm.controls["expiryDate"].errors == null ? null : ctx_r16.shareLinkFrm.controls["expiryDate"].errors.required) || (ctx_r16.shareLinkFrm.controls["expiryDate"].errors == null ? null : ctx_r16.shareLinkFrm.controls["expiryDate"].errors.whitespace)) && (!ctx_r16.invalidExpiryDate || !ctx_r16.isInputDate));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r16.invalidExpiryDate && ctx_r16.isInputDate);
} }
function LinkSettingComponent_div_29_Template(rf, ctx) { if (rf & 1) {
    const _r20 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 29);
    i0.ɵɵelementStart(1, "span", 6);
    i0.ɵɵelementStart(2, "p-calendar", 30);
    i0.ɵɵlistener("onInput", function LinkSettingComponent_div_29_Template_p_calendar_onInput_2_listener() { i0.ɵɵrestoreView(_r20); const ctx_r19 = i0.ɵɵnextContext(); return ctx_r19.checkInvalidExpiryDate(); })("onBlur", function LinkSettingComponent_div_29_Template_p_calendar_onBlur_2_listener() { i0.ɵɵrestoreView(_r20); const ctx_r21 = i0.ɵɵnextContext(); return ctx_r21.checkBlur(); });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "label", 31);
    i0.ɵɵtext(4);
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(6, LinkSettingComponent_div_29_div_6_Template, 3, 2, "div", 24);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r4 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("monthNavigator", true)("minDate", ctx_r4.minDate)("ngClass", ctx_r4.shareLinkFrm.controls["expiryDate"].value && (ctx_r4.shareLinkFrm.controls["expiryDate"].invalid || ctx_r4.invalidExpiryDate) ? "ng-dirty" : "")("showIcon", true)("disabled", ctx_r4.shareLinkFrm.controls.recipients.value.length === 0)("styleClass", "xs-small");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 8, "label.document_expiry_date"));
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r4.shareLinkFrm.controls["expiryDate"].value && (ctx_r4.shareLinkFrm.controls["expiryDate"].invalid || ctx_r4.invalidExpiryDate));
} }
function LinkSettingComponent_div_30_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 33);
    i0.ɵɵelementStart(1, "div", 6);
    i0.ɵɵelement(2, "p-dropdown", 34);
    i0.ɵɵelementStart(3, "label", 35);
    i0.ɵɵtext(4);
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r5 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("options", ctx_r5.hours)("disabled", ctx_r5.shareLinkFrm.controls.recipients.value.length === 0 || !ctx_r5.shareLinkFrm.controls["expiryDate"].value);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 3, "label.hour"));
} }
function LinkSettingComponent_div_31_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 33);
    i0.ɵɵelementStart(1, "div", 6);
    i0.ɵɵelement(2, "p-dropdown", 36);
    i0.ɵɵelementStart(3, "label", 37);
    i0.ɵɵtext(4);
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r6 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("options", ctx_r6.minutes)("disabled", ctx_r6.shareLinkFrm.controls.recipients.value.length === 0 || !ctx_r6.shareLinkFrm.controls["expiryDate"].value);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 3, "label.minute"));
} }
function LinkSettingComponent_div_32_Template(rf, ctx) { if (rf & 1) {
    const _r23 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 38);
    i0.ɵɵelementStart(1, "div", 6);
    i0.ɵɵelementStart(2, "p-dropdown", 39);
    i0.ɵɵlistener("ngModelChange", function LinkSettingComponent_div_32_Template_p_dropdown_ngModelChange_2_listener($event) { i0.ɵɵrestoreView(_r23); const ctx_r22 = i0.ɵɵnextContext(); return ctx_r22.currentTimezone = $event; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "label", 40);
    i0.ɵɵtext(4);
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r7 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("options", ctx_r7.timezones)("disabled", ctx_r7.shareLinkFrm.controls.recipients.value.length === 0 || !ctx_r7.shareLinkFrm.controls["expiryDate"].value)("ngModel", ctx_r7.currentTimezone);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 4, "label.lbl_timezone"), " ");
} }
function LinkSettingComponent_div_33_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 28);
    i0.ɵɵelementStart(1, "div", 41);
    i0.ɵɵelement(2, "p-checkbox", 42);
    i0.ɵɵelementStart(3, "label", 43);
    i0.ɵɵtext(4);
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(6, "i", 44);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(7, "div", 41);
    i0.ɵɵelement(8, "p-checkbox", 45);
    i0.ɵɵelementStart(9, "label", 46);
    i0.ɵɵtext(10);
    i0.ɵɵpipe(11, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(12, "i", 44);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r8 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("disabled", ctx_r8.shareLinkFrm.controls.recipients.value.length === 0)("ngClass", ctx_r8.shareLinkFrm.controls.recipients.value.length === 0 ? "cs-not-allowed" : "cs-pointer");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngClass", ctx_r8.shareLinkFrm.controls.recipients.value.length === 0 ? "cs-not-allowed" : "cs-pointer");
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 10, "label.printable"), " ");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("title", ctx_r8.translateText("label.printable_help"));
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("disabled", ctx_r8.shareLinkFrm.controls.recipients.value.length === 0)("ngClass", ctx_r8.shareLinkFrm.controls.recipients.value.length === 0 ? "cs-not-allowed" : "cs-pointer");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngClass", ctx_r8.shareLinkFrm.controls.recipients.value.length === 0 ? "cs-not-allowed" : "cs-pointer");
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(11, 12, "label.editable"), " ");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("title", ctx_r8.translateText("label.editable_help"));
} }
function LinkSettingComponent_div_34_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 47);
    i0.ɵɵelementStart(1, "div", 41);
    i0.ɵɵelement(2, "p-checkbox", 48);
    i0.ɵɵelementStart(3, "label", 49);
    i0.ɵɵtext(4);
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(6, "i", 44);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r9 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngClass", ctx_r9.shareLinkFrm.controls.recipients.value.length === 0 ? "cs-not-allowed" : "cs-pointer")("disabled", ctx_r9.shareLinkFrm.controls.recipients.value.length === 0);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngClass", ctx_r9.shareLinkFrm.controls.recipients.value.length === 0 ? "cs-not-allowed" : "cs-pointer");
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 5, "label.show_wm"), " ");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("title", ctx_r9.translateText("label.wm_help"));
} }
function LinkSettingComponent_div_35_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelement(1, "app-view-online-setting", 51, 52);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r24 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("disabled", ctx_r24.shareLinkFrm.controls.recipients.value.length === 0);
} }
function LinkSettingComponent_div_35_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 50);
    i0.ɵɵtemplate(1, LinkSettingComponent_div_35_div_1_Template, 3, 1, "div", 26);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r10 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r10.shareLinkFrm.controls.showWatermark.value);
} }
function LinkSettingComponent_div_42_small_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.special_chars"), " ");
} }
function LinkSettingComponent_div_42_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 32);
    i0.ɵɵtemplate(1, LinkSettingComponent_div_42_small_1_Template, 3, 3, "small", 26);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r11 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r11.shareLinkFrm.controls["shareMessage"].errors == null ? null : ctx_r11.shareLinkFrm.controls["shareMessage"].errors.pattern);
} }
function LinkSettingComponent_app_address_group_select_45_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "app-address-group-select", null, 53);
} }
function LinkSettingComponent_ng_template_46_Template(rf, ctx) { if (rf & 1) {
    const _r29 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 54);
    i0.ɵɵelementStart(1, "button", 55);
    i0.ɵɵlistener("click", function LinkSettingComponent_ng_template_46_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r29); const ctx_r28 = i0.ɵɵnextContext(); return ctx_r28.closeAddressGroupModal(); });
    i0.ɵɵpipe(2, "titlecase");
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "button", 56);
    i0.ɵɵlistener("click", function LinkSettingComponent_ng_template_46_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r29); const ctx_r30 = i0.ɵɵnextContext(); return ctx_r30.handleSelected(); });
    i0.ɵɵpipe(5, "uppercase");
    i0.ɵɵpipe(6, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(2, 2, i0.ɵɵpipeBind1(3, 4, "label.cancel")));
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(5, 6, i0.ɵɵpipeBind1(6, 8, "label.add")));
} }
const _c2 = function () { return { maxLength: "64" }; };
class LinkSettingComponent {
    constructor(fb, datePipe, clipboardService, messageService, translate, linkService, authService, userService, userGroupService, addressbookService, addressbookGroupService) {
        this.fb = fb;
        this.datePipe = datePipe;
        this.clipboardService = clipboardService;
        this.messageService = messageService;
        this.translate = translate;
        this.linkService = linkService;
        this.authService = authService;
        this.userService = userService;
        this.userGroupService = userGroupService;
        this.addressbookService = addressbookService;
        this.addressbookGroupService = addressbookGroupService;
        this.util = app_util_1.default;
        this.constant = app_constants_1.default;
        this.shareLinkFrm = new forms_1.FormGroup({});
        this.minDate = new Date();
        this.watermarkSettings = new watermark_model_1.WatermarkSettings();
        this.hours = [];
        this.minutes = [];
        this.timezones = [];
        this.invalidExpiryDate = false;
        this.isInputDate = false;
        this.selectUser = [];
        this.recipientsList = [];
        this.displayAddressGroupModal = false;
        this.selectedData = [];
        const hour = _.range(0, 24, 1);
        for (const item of hour) {
            this.hours = [...this.hours, { name: item.toString(), code: item }];
        }
        const min = _.range(0, 60, 5);
        for (const item of min) {
            this.minutes = [...this.minutes, { name: item.toString(), code: item }];
        }
        this.util
            .translateList(this.translate, [
            'label.timezone.GMT_-12',
            'label.timezone.GMT_-11',
            'label.timezone.GMT_-10',
            'label.timezone.GMT_-9',
            'label.timezone.GMT_-8',
            'label.timezone.GMT_-7',
            'label.timezone.GMT_-6',
            'label.timezone.GMT_-5',
            'label.timezone.GMT_-4',
            'label.timezone.GMT_-3',
            'label.timezone.GMT_-2',
            'label.timezone.GMT_-1',
            'label.timezone.GMT_0',
            'label.timezone.GMT_+1',
            'label.timezone.GMT_+2',
            'label.timezone.GMT_+3',
            'label.timezone.GMT_+4',
            'label.timezone.GMT_+5',
            'label.timezone.GMT_+6',
            'label.timezone.GMT_+7',
            'label.timezone.GMT_+8',
            'label.timezone.GMT_+9',
            'label.timezone.GMT_+10',
            'label.timezone.GMT_+11',
            'label.timezone.GMT_+12',
        ], {})
            .subscribe((res) => {
            this.timezones = [
                { code: -12, name: res['label.timezone.GMT_-12'] },
                { code: -11, name: res['label.timezone.GMT_-11'] },
                { code: -10, name: res['label.timezone.GMT_-10'] },
                { code: -9, name: res['label.timezone.GMT_-9'] },
                { code: -8, name: res['label.timezone.GMT_-8'] },
                { code: -7, name: res['label.timezone.GMT_-7'] },
                { code: -6, name: res['label.timezone.GMT_-6'] },
                { code: -5, name: res['label.timezone.GMT_-5'] },
                { code: -4, name: res['label.timezone.GMT_-4'] },
                { code: -3, name: res['label.timezone.GMT_-3'] },
                { code: -2, name: res['label.timezone.GMT_-2'] },
                { code: -1, name: res['label.timezone.GMT_-1'] },
                { code: 0, name: res['label.timezone.GMT_0'] },
                { code: 1, name: res['label.timezone.GMT_+1'] },
                { code: 2, name: res['label.timezone.GMT_+2'] },
                { code: 3, name: res['label.timezone.GMT_+3'] },
                { code: 4, name: res['label.timezone.GMT_+4'] },
                { code: 5, name: res['label.timezone.GMT_+5'] },
                { code: 6, name: res['label.timezone.GMT_+6'] },
                { code: 7, name: res['label.timezone.GMT_+7'] },
                { code: 8, name: res['label.timezone.GMT_+8'] },
                { code: 9, name: res['label.timezone.GMT_+9'] },
                { code: 10, name: res['label.timezone.GMT_+10'] },
                { code: 11, name: res['label.timezone.GMT_+11'] },
                { code: 12, name: res['label.timezone.GMT_+12'] },
            ];
        });
    }
    ngOnInit() {
        this.authUser = this.authService.authUser;
        this.currentTimezone = _.find(this.timezones, (timezone) => timezone.code === this.authService.getAuthUser.timeZone);
        this.maxDate = new Date(this.constant.MAX_DATE);
        this.shareLinkFrm = this.fb.group({
            linkUrl: ['', []],
            expiryDate: ['', []],
            hour: [this.hours[this.hours.length - 1].code, []],
            minute: [this.minutes[this.minutes.length - 1].code, []],
            timezone: [this.currentTimezone],
            recipients: [[]],
            printable: [false, []],
            editable: [false, []],
            showWatermark: [false, []],
            shareMessage: [
                '',
                [forms_1.Validators.pattern(this.constant.PATTERNS.SCRIPT_PATTERN)],
            ],
        });
        this.getAllUsers();
        this.shareLinkFrm.controls.linkUrl.setValue(this.handleLinkURL());
        this.checkValueChange();
    }
    handleCopyLinkURL() {
        this.clipboardService.copy(this.shareLinkFrm.controls.linkUrl.value);
    }
    handleCopyEmbedLinkURL() {
        const embedLink = '<iframe src="' +
            this.shareLinkFrm.controls.linkUrl.value +
            '" frameborder="0" width="700" height="430" allowfullscreen></iframe>';
        this.clipboardService.copy(embedLink);
    }
    checkBlur() {
        this.isInputDate = false;
    }
    checkInvalidExpiryDate() {
        this.invalidExpiryDate = !this.shareLinkFrm.controls.expiryDate.value;
        this.isInputDate = true;
    }
    setWmSettings(event) {
        this.watermarkSettings = event;
    }
    onClose() {
        this.shareLinkFrm.controls.linkUrl.setValue('');
        this.shareLinkFrm.controls.expiryDate.setValue('');
        this.shareLinkFrm.controls.hour.setValue(0);
        this.shareLinkFrm.controls.minute.setValue(0);
        this.shareLinkFrm.controls.timezone.setValue('');
        this.shareLinkFrm.controls.recipients.setValue([]);
        this.shareLinkFrm.controls.printable.setValue(false);
        this.shareLinkFrm.controls.editable.setValue(false);
        this.shareLinkFrm.controls.showWatermark.setValue(false);
        this.shareLinkFrm.controls.shareMessage.setValue('');
    }
    isBlurDropdown() {
        this.isOpenDropdown = false;
    }
    isClickDropdown() {
        this.isOpenDropdown = true;
    }
    searchMember(event) {
        this.isInValidEmail = !this.util.isValidEmail(event.term);
    }
    addNewUser(name) {
        // const broadcastService = new BroadcastService;
        const emailPattern = app_constants_1.default.PATTERNS.EMAIL;
        if (name.length > 64) {
            return;
        }
        else if (!emailPattern.test(name)) {
            return;
        }
        else {
            return {
                id: name,
                value: name,
                name,
                tag: true,
                type: app_constants_1.default.EMAIL_TYPE.GUEST,
            };
        }
    }
    getAllUsers() {
        this.loading1 = true;
        const userCustoms = [];
        this.userService
            .getAllUsersInTeam(this.authUser.teamId)
            .subscribe((resp) => {
            if (resp.status === 200) {
                resp.data.forEach((res) => {
                    userCustoms.push({
                        id: res.userId,
                        value: res.mailAddress,
                        name: this.authService.getUserLanguage === 'ja'
                            ? res.lastName + res.firstName
                            : (res.firstName + ' ' + res.lastName).trim(),
                        type: this.constant.EMAIL_TYPE.USER,
                    });
                });
                this.recipientsList = this.recipientsList.concat(userCustoms);
                this.getAllAddressBooks();
            }
            this.loading1 = false;
        });
    }
    getAllAddressBooks() {
        this.loading2 = true;
        const addressBookCustoms = [];
        this.addressbookService.getAllAddressBook().subscribe((res) => {
            if (res.status === 200) {
                // tslint:disable-next-line:no-shadowed-variable
                res.data.forEach((res) => {
                    const existedEmail = _.find(this.recipientsList, (item) => item.value === res.mailAddress);
                    if (existedEmail) {
                        return;
                    }
                    addressBookCustoms.push({
                        id: res.addressBookId,
                        value: res.mailAddress,
                        name: this.authService.getUserLanguage === 'ja'
                            ? (res.lastName + res.firstName).trim()
                            : (res.firstName + ' ' + res.lastName).trim(),
                        type: this.constant.EMAIL_TYPE.ADDRESS_BOOK,
                    });
                });
                this.recipientsList = this.recipientsList
                    .concat(addressBookCustoms)
                    .sort(this.dynamicSort('value'));
            }
            this.loading2 = false;
        });
    }
    dynamicSort(property) {
        let sortOrder = 1;
        if (property[0] === '-') {
            sortOrder = -1;
            property = property.substr(1);
        }
        return (a, b) => {
            /* next line works with strings and numbers,
             * and you may want to customize it to your needs
             */
            const result = a[property] < b[property] ? -1 : a[property] > b[property] ? 1 : 0;
            return result * sortOrder;
        };
    }
    showAddressGroupModal() {
        this.displayAddressGroupModal = true;
    }
    closeAddressGroupModal() {
        this.displayAddressGroupModal = false;
    }
    handleSelected() {
        if (!this.addressGroupSelectComponent.selectedGroupsInModal ||
            this.addressGroupSelectComponent.selectedGroupsInModal.length === 0) {
            return;
        }
        this.selectedData = this.addressGroupSelectComponent.selectedGroupsInModal;
        this.closeAddressGroupModal();
        if (this.selectedData) {
            let groupIds = '';
            for (let i = 0; i < this.selectedData.length; i++) {
                if (i === this.selectedData.length - 1) {
                    groupIds = groupIds.concat(this.selectedData[i].groupAddressId);
                }
                else {
                    groupIds = groupIds.concat(this.selectedData[i].groupAddressId, ',');
                }
            }
            const params = {
                groupAddressIds: groupIds,
            };
            this.addressbookGroupService
                .getMembersInGroups(this.util.toSnakeCaseKey(params))
                .subscribe((res) => {
                if (res.status === 200) {
                    if (!this.shareLinkFrm.value.recipients ||
                        this.shareLinkFrm.value.recipients.length === 0) {
                        res.data.forEach((item) => {
                            this.selectUser = [
                                ...this.selectUser,
                                {
                                    id: item.addressBookId,
                                    value: item.mailAddress,
                                    name: this.authService.getUserLanguage === 'ja'
                                        ? item.lastName + item.firstName
                                        : item.firstName + item.lastName,
                                    type: this.constant.EMAIL_TYPE.ADDRESS_BOOK,
                                },
                            ];
                        });
                    }
                    else {
                        res.data.forEach((itemChoose) => {
                            const existedEmail = _.find(this.selectUser, (item) => item.value === itemChoose.mailAddress);
                            if (existedEmail) {
                                return;
                            }
                            this.selectUser = [
                                ...this.selectUser,
                                {
                                    id: itemChoose.addressBookId,
                                    value: itemChoose.mailAddress,
                                    name: this.authService.getUserLanguage === 'ja'
                                        ? itemChoose.lastName + itemChoose.firstName
                                        : itemChoose.firstName + itemChoose.lastName,
                                    type: this.constant.EMAIL_TYPE.ADDRESS_BOOK,
                                },
                            ];
                        });
                    }
                }
            });
        }
    }
    checkValueChange() {
        this.shareLinkFrm.get('printable').valueChanges.subscribe((val) => {
            this.shareLinkFrm.controls.linkUrl.setValue(this.handleLinkURL());
        });
    }
    handleLinkURL() {
        const printable = this.shareLinkFrm.controls.printable.value ? '1' : '0';
        const prefix = this.isPublicView && this.linkData.link.includes('public/')
            ? environment_1.environment.backend_url + '/'
            : environment_1.environment.frontend_url;
        return prefix + this.linkData.link.replace('%d', printable);
    }
    registerLicense(cb) {
        if (this.shareLinkFrm.invalid) {
            return;
        }
        if (this.pendingRequest) {
            this.pendingRequest.unsubscribe();
            return;
        }
        const addressBooks = _.filter(this.shareLinkFrm.controls.recipients.value, (user) => user.type === this.constant.EMAIL_TYPE.ADDRESS_BOOK);
        const listUser = _.filter(this.shareLinkFrm.controls.recipients.value, (user) => user.type === this.constant.EMAIL_TYPE.USER);
        const listGuest = _.filter(this.shareLinkFrm.controls.recipients.value, (user) => user.type === this.constant.EMAIL_TYPE.GUEST);
        let docDateTime = this.maxDate;
        if (this.shareLinkFrm.controls.expiryDate.value) {
            docDateTime = new Date(this.shareLinkFrm.controls.expiryDate.value);
            docDateTime.setHours(this.shareLinkFrm.controls.hour.value, this.shareLinkFrm.controls.minute.value, 59);
        }
        const documentExpiryDate = this.util.formatBookendDate(docDateTime, this.shareLinkFrm.controls.timezone.value.code, this.constant.FORMAT_DATE.LINK_FORMAT_DATE, moment_1.default);
        if (documentExpiryDate <=
            moment_1.default(moment_1.utc(new Date())).format(this.constant.FORMAT_DATE.LINK_FORMAT_DATE)) {
            this.messageService.add({
                severity: 'error',
                detail: this.util.translate(this.translate, 'error.invalid_expiry_date'),
            });
            return;
        }
        const params = {
            projectId: this.projectId,
            expiryDate: documentExpiryDate,
            printable: this.shareLinkFrm.controls.printable.value ? 1 : 0,
            editable: this.shareLinkFrm.controls.editable.value ? 1 : 0,
            emails: listUser.map((user) => user.value).join(','),
            addressBooks: addressBooks.map((user) => user.value).join(','),
            guest: listGuest.map((user) => user.value).join(','),
            watermarkSetting: JSON.stringify(this.handleWmParams()),
            message: this.shareLinkFrm.controls.shareMessage.value,
        };
        this.linkService
            .registerLicense(this.linkData.linkId, this.util.toSnakeCaseKey(params))
            .subscribe((res) => {
            if (res.status === 200) {
                this.messageService.add({
                    severity: 'success',
                    detail: this.util.translate(this.translate, 'default_toast.share_success'),
                });
                this.onClose();
                cb && cb(true);
            }
            else {
                cb && cb(false);
            }
        });
    }
    handleWmParams() {
        var _a, _b, _c, _d, _e, _f, _g, _h;
        let wmParams = {
            show_wm: this.shareLinkFrm.value.showWatermark ? 1 : 0,
            default_wm: 1,
            setting: null,
        };
        if (this.shareLinkFrm.value.showWatermark) {
            wmParams.default_wm =
                ((_a = this.viewOnlineSettingComponent) === null || _a === void 0 ? void 0 : _a.form.value.wmSetting) === 'default'
                    ? 1
                    : 0;
            if (((_b = this.viewOnlineSettingComponent) === null || _b === void 0 ? void 0 : _b.form.value.wmSetting) !== 'default') {
                wmParams.setting = {
                    wm_text: (_c = this.viewOnlineSettingComponent) === null || _c === void 0 ? void 0 : _c.form.value.wmContent,
                    wm_font_size: (_d = this.viewOnlineSettingComponent) === null || _d === void 0 ? void 0 : _d.form.value.fontSize,
                    wm_color: 'RGB(' + ((_e = this.viewOnlineSettingComponent) === null || _e === void 0 ? void 0 : _e.form.value.color.r) +
                        ',' + ((_f = this.viewOnlineSettingComponent) === null || _f === void 0 ? void 0 : _f.form.value.color.g) +
                        ',' + ((_g = this.viewOnlineSettingComponent) === null || _g === void 0 ? void 0 : _g.form.value.color.b) +
                        ')',
                    wm_position: (_h = this.viewOnlineSettingComponent) === null || _h === void 0 ? void 0 : _h.form.value.position,
                };
            }
        }
        return wmParams;
    }
    translateText(key) {
        return this.util.translate(this.translate, key);
    }
    deleteLink() {
        if (this.pendingRequest) {
            this.pendingRequest.unsubscribe();
        }
        const params = {
            projectId: this.projectId,
            linkId: this.linkData.linkId,
        };
        this.pendingRequest = this.linkService
            .deleteLink(this.util.toSnakeCaseKey(params))
            .subscribe((res) => {
            if (res.status === 200) {
                this.messageService.add({
                    severity: 'success',
                    detail: this.util.translate(this.translate, 'default_toast.delete_success'),
                });
                this.onClose();
            }
        }, (error) => {
            // console.log('error', error);
        });
    }
    handleRemoveEmail(event, isRemoveAll) {
        if (isRemoveAll) {
            this.recipientsList = this.recipientsList.filter((data) => !data.tag);
            return;
        }
        if (event.value.tag) {
            this.recipientsList = this.recipientsList.filter((data) => data.id !== event.value.id);
        }
    }
}
exports.LinkSettingComponent = LinkSettingComponent;
LinkSettingComponent.ɵfac = function LinkSettingComponent_Factory(t) { return new (t || LinkSettingComponent)(i0.ɵɵdirectiveInject(i1.FormBuilder), i0.ɵɵdirectiveInject(i2.DatePipe), i0.ɵɵdirectiveInject(i3.ClipboardService), i0.ɵɵdirectiveInject(i4.MessageService), i0.ɵɵdirectiveInject(i5.TranslateService), i0.ɵɵdirectiveInject(i6.LinkService), i0.ɵɵdirectiveInject(i7.AuthService), i0.ɵɵdirectiveInject(i8.UserService), i0.ɵɵdirectiveInject(i9.UserGroupService), i0.ɵɵdirectiveInject(i10.AddressbookService), i0.ɵɵdirectiveInject(i11.AddressbookGroupService)); };
LinkSettingComponent.ɵcmp = i0.ɵɵdefineComponent({ type: LinkSettingComponent, selectors: [["app-link-setting"]], viewQuery: function LinkSettingComponent_Query(rf, ctx) { if (rf & 1) {
        i0.ɵɵviewQuery(_c0, 1);
        i0.ɵɵviewQuery(_c1, 1);
    } if (rf & 2) {
        let _t;
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.viewOnlineSettingComponent = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.addressGroupSelectComponent = _t.first);
    } }, inputs: { displayModal: "displayModal", linkData: "linkData", projectId: "projectId", isPublicView: "isPublicView" }, decls: 47, vars: 50, consts: [[3, "formGroup"], ["shareLinkComponent", ""], [1, "p-fluid", "p-formgrid", "p-grid"], [1, "p-field", "p-col-12"], [1, "page-title-lv2", "p-mt-0", "p-mb-0"], [1, "p-inputgroup"], [1, "p-float-label"], ["formControlName", "linkUrl", "id", "linkURL", "pInputText", "", "type", "text"], ["for", "linkURL"], ["icon", "fas fa-copy", "pButton", "", "pRipple", "", "type", "button", 1, "p-inputgroup-addon", 3, "title", "click"], ["icon", "fas fa-code", "pButton", "", "pRipple", "", "type", "button", 1, "p-inputgroup-addon", 3, "title", "click"], ["bindLabel", "value", "formControlName", "recipients", "multiple", "true", 1, "select-user", "in-group", 3, "ngModel", "addTag", "hideSelected", "inputAttrs", "items", "loading", "clearAllText", "notFoundText", "close", "keypress", "open", "search", "ngModelChange", "remove", "clear"], ["ng-tag-tmp", ""], ["ng-option-tmp", ""], [3, "ngClass"], ["icon", "far fa-address-book", "pButton", "", "pRipple", "", "type", "button", 1, "p-button-primary", 3, "title", "click"], ["class", "p-col-12", 4, "ngIf"], ["class", "p-col-6 p-field", "style", "position: relative", 4, "ngIf"], ["class", "p-col-3 p-field", 4, "ngIf"], ["class", "p-col-12 p-field", 4, "ngIf"], ["class", "p-col-12", "style", "position: relative", 4, "ngIf"], ["class", "p-field p-col-12 p-pl-5", 4, "ngIf"], ["rows", "5", "formControlName", "shareMessage", "pInputTextarea", "", "id", "share_mess"], ["for", "share_mess"], ["class", "p-error", 4, "ngIf"], ["styleClass", "custom-dialog", "position", "right", 3, "header", "visible", "modal", "draggable", "resizable", "baseZIndex", "visibleChange", "onHide"], [4, "ngIf"], ["pTemplate", "footer"], [1, "p-col-12"], [1, "p-col-6", "p-field", 2, "position", "relative"], ["dateFormat", "mm/dd/yy", "appendTo", "body", "formControlName", "expiryDate", "id", "docExpiryDate", 3, "monthNavigator", "minDate", "ngClass", "showIcon", "disabled", "styleClass", "onInput", "onBlur"], ["for", "docExpiryDate"], [1, "p-error"], [1, "p-col-3", "p-field"], ["formControlName", "hour", "id", "hour", "optionLabel", "name", "optionValue", "code", 3, "options", "disabled"], ["for", "hour"], ["formControlName", "minute", "id", "minute", "optionLabel", "name", "optionValue", "code", 3, "options", "disabled"], ["for", "minute"], [1, "p-col-12", "p-field"], ["id", "timezone", "formControlName", "timezone", "optionLabel", "name", 3, "options", "disabled", "ngModel", "ngModelChange"], ["for", "timezone"], [1, "p-field-checkbox"], ["binary", "true", "formControlName", "printable", "inputId", "printable", "name", "printable", 3, "disabled", "ngClass"], ["for", "printable", 3, "ngClass"], [1, "far", "fa-question-circle", "p-ml-1", "cs-pointer", "text-primary", 3, "title"], ["binary", "true", "formControlName", "editable", "inputId", "editable", "name", "editable", 3, "disabled", "ngClass"], ["for", "editable", 3, "ngClass"], [1, "p-col-12", 2, "position", "relative"], ["name", "showWatermark", "binary", "true", "formControlName", "showWatermark", "inputId", "show-watermark", 3, "ngClass", "disabled"], ["for", "show-watermark", 3, "ngClass"], [1, "p-field", "p-col-12", "p-pl-5"], [3, "disabled", "watermarkSetting"], ["viewOnlineSettingComponent", ""], ["addressGroupSelectComponent", ""], [1, "p-col-12", "p-text-right", "p-pr-0"], ["pButton", "", "pRipple", "", "type", "button", "icon", "fas fa-times", 1, "p-button-raised", "p-button-warning", "p-mr-2", 3, "label", "click"], ["type", "submit", "pRipple", "", "pButton", "", "icon", "fas fa-plus", 1, "p-button-raised", 3, "label", "click"]], template: function LinkSettingComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "form", 0, 1);
        i0.ɵɵelementStart(2, "div", 2);
        i0.ɵɵelementStart(3, "div", 3);
        i0.ɵɵelementStart(4, "div", 4);
        i0.ɵɵtext(5);
        i0.ɵɵpipe(6, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(7, "div", 3);
        i0.ɵɵelementStart(8, "div", 5);
        i0.ɵɵelementStart(9, "span", 6);
        i0.ɵɵelement(10, "input", 7);
        i0.ɵɵelementStart(11, "label", 8);
        i0.ɵɵtext(12);
        i0.ɵɵpipe(13, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(14, "button", 9);
        i0.ɵɵlistener("click", function LinkSettingComponent_Template_button_click_14_listener() { return ctx.handleCopyLinkURL(); });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(15, "button", 10);
        i0.ɵɵlistener("click", function LinkSettingComponent_Template_button_click_15_listener() { return ctx.handleCopyEmbedLinkURL(); });
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(16, "div", 3);
        i0.ɵɵelementStart(17, "div", 5);
        i0.ɵɵelementStart(18, "span", 6);
        i0.ɵɵelementStart(19, "ng-select", 11);
        i0.ɵɵlistener("close", function LinkSettingComponent_Template_ng_select_close_19_listener() { return ctx.isBlurDropdown(); })("keypress", function LinkSettingComponent_Template_ng_select_keypress_19_listener($event) { return ctx.util.blockSpecialChars($event); })("open", function LinkSettingComponent_Template_ng_select_open_19_listener() { return ctx.isClickDropdown(); })("search", function LinkSettingComponent_Template_ng_select_search_19_listener($event) { return ctx.searchMember($event); })("ngModelChange", function LinkSettingComponent_Template_ng_select_ngModelChange_19_listener($event) { return ctx.selectUser = $event; })("remove", function LinkSettingComponent_Template_ng_select_remove_19_listener($event) { return ctx.handleRemoveEmail($event); })("clear", function LinkSettingComponent_Template_ng_select_clear_19_listener($event) { return ctx.handleRemoveEmail($event, true); });
        i0.ɵɵpipe(20, "translate");
        i0.ɵɵpipe(21, "translate");
        i0.ɵɵtemplate(22, LinkSettingComponent_ng_template_22_Template, 4, 4, "ng-template", 12);
        i0.ɵɵtemplate(23, LinkSettingComponent_ng_template_23_Template, 2, 1, "ng-template", 13);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(24, "label", 14);
        i0.ɵɵtext(25);
        i0.ɵɵpipe(26, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(27, "button", 15);
        i0.ɵɵlistener("click", function LinkSettingComponent_Template_button_click_27_listener() { return ctx.showAddressGroupModal(); });
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(28, LinkSettingComponent_div_28_Template, 4, 3, "div", 16);
        i0.ɵɵtemplate(29, LinkSettingComponent_div_29_Template, 7, 10, "div", 17);
        i0.ɵɵtemplate(30, LinkSettingComponent_div_30_Template, 6, 5, "div", 18);
        i0.ɵɵtemplate(31, LinkSettingComponent_div_31_Template, 6, 5, "div", 18);
        i0.ɵɵtemplate(32, LinkSettingComponent_div_32_Template, 6, 6, "div", 19);
        i0.ɵɵtemplate(33, LinkSettingComponent_div_33_Template, 13, 14, "div", 16);
        i0.ɵɵtemplate(34, LinkSettingComponent_div_34_Template, 7, 7, "div", 20);
        i0.ɵɵtemplate(35, LinkSettingComponent_div_35_Template, 2, 1, "div", 21);
        i0.ɵɵelementStart(36, "div", 3);
        i0.ɵɵelementStart(37, "span", 6);
        i0.ɵɵelement(38, "textarea", 22);
        i0.ɵɵelementStart(39, "label", 23);
        i0.ɵɵtext(40);
        i0.ɵɵpipe(41, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(42, LinkSettingComponent_div_42_Template, 2, 1, "div", 24);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(43, "p-dialog", 25);
        i0.ɵɵlistener("visibleChange", function LinkSettingComponent_Template_p_dialog_visibleChange_43_listener($event) { return ctx.displayAddressGroupModal = $event; })("onHide", function LinkSettingComponent_Template_p_dialog_onHide_43_listener() { return ctx.closeAddressGroupModal(); });
        i0.ɵɵpipe(44, "translate");
        i0.ɵɵtemplate(45, LinkSettingComponent_app_address_group_select_45_Template, 2, 0, "app-address-group-select", 26);
        i0.ɵɵtemplate(46, LinkSettingComponent_ng_template_46_Template, 7, 10, "ng-template", 27);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵproperty("formGroup", ctx.shareLinkFrm);
        i0.ɵɵadvance(5);
        i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 35, "label.link_url"), " ");
        i0.ɵɵadvance(5);
        i0.ɵɵattribute("disabled", true);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(13, 37, "label.link_url"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("title", ctx.translateText("label.copy_link"));
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("title", ctx.translateText("label.copy_embed"));
        i0.ɵɵadvance(4);
        i0.ɵɵpropertyInterpolate("clearAllText", i0.ɵɵpipeBind1(20, 39, "label.clear_all"));
        i0.ɵɵpropertyInterpolate("notFoundText", i0.ɵɵpipeBind1(21, 41, "label.no_item_found"));
        i0.ɵɵproperty("ngModel", ctx.selectUser)("addTag", !ctx.isInValidEmail ? ctx.addNewUser : false)("hideSelected", true)("inputAttrs", i0.ɵɵpureFunction0(49, _c2))("items", ctx.recipientsList)("loading", ctx.loading1 && ctx.loading2);
        i0.ɵɵadvance(5);
        i0.ɵɵproperty("ngClass", ctx.shareLinkFrm.controls.recipients.value.length > 0 || ctx.isOpenDropdown ? "custom-float-label-tab" : "");
        i0.ɵɵadvance(1);
        i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(26, 43, "label.email"), " ");
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("title", ctx.translateText("label.select_address_group"));
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.linkData.hasProtectFile);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.linkData.hasProtectFile);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.linkData.hasProtectFile);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.linkData.hasProtectFile);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.linkData.hasProtectFile);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.linkData.hasProtectFile);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.linkData.hasProtectFile);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.linkData.hasProtectFile);
        i0.ɵɵadvance(3);
        i0.ɵɵattribute("disabled", ctx.shareLinkFrm.controls.recipients.value.length === 0 ? true : null);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(41, 45, "label.share_message"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.shareLinkFrm.controls["shareMessage"].value && ctx.shareLinkFrm.controls["shareMessage"].invalid);
        i0.ɵɵadvance(1);
        i0.ɵɵpropertyInterpolate("header", i0.ɵɵpipeBind1(44, 47, "label.select_address_group"));
        i0.ɵɵproperty("visible", ctx.displayAddressGroupModal)("modal", true)("draggable", false)("resizable", false)("baseZIndex", 10000);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.displayAddressGroupModal);
    } }, directives: [i1.ɵangular_packages_forms_forms_y, i1.NgControlStatusGroup, i1.FormGroupDirective, i1.DefaultValueAccessor, i1.NgControlStatus, i1.FormControlName, i12.InputText, i13.ButtonDirective, i14.Ripple, i15.NgSelectComponent, i15.ɵo, i15.ɵf, i2.NgClass, i2.NgIf, i16.InputTextarea, i17.Dialog, i4.PrimeTemplate, i18.Calendar, i19.Dropdown, i20.Checkbox, i21.ViewOnlineSettingComponent, i22.AddressGroupSelectComponent], pipes: [i5.TranslatePipe, i2.TitleCasePipe, i2.UpperCasePipe], styles: ["[_nghost-%COMP%]  .p-dropdown-panel {\n  left: auto !important;\n  right: 0 !important;\n}\n[_nghost-%COMP%]  .p-calendar .p-datepicker {\n  min-width: unset !important;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvbGluay9saW5rLWZvcm0vbGluay1zZXR0aW5nL2xpbmstc2V0dGluZy5jb21wb25lbnQuc2NzcyIsInNyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvbGluay9saW5rLWZvcm0vbGluay1zZXR0aW5nL2xpbmstc2V0dGluZy5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDRTtFQUNFLHFCQUFBO0VBQ0EsbUJBQUE7QUNBSjtBREdFO0VBQ0UsMkJBQUE7QUNESiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL2xpbmsvbGluay1mb3JtL2xpbmstc2V0dGluZy9saW5rLXNldHRpbmcuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyI6aG9zdCg6Om5nLWRlZXApIHtcbiAgLnAtZHJvcGRvd24tcGFuZWwge1xuICAgIGxlZnQ6IGF1dG8gIWltcG9ydGFudDtcbiAgICByaWdodDogMCAhaW1wb3J0YW50O1xuICB9XG5cbiAgLnAtY2FsZW5kYXIgLnAtZGF0ZXBpY2tlciB7XG4gICAgbWluLXdpZHRoOiB1bnNldCAhaW1wb3J0YW50O1xuICB9XG59XG4iLCI6aG9zdCg6Om5nLWRlZXApIC5wLWRyb3Bkb3duLXBhbmVsIHtcbiAgbGVmdDogYXV0byAhaW1wb3J0YW50O1xuICByaWdodDogMCAhaW1wb3J0YW50O1xufVxuOmhvc3QoOjpuZy1kZWVwKSAucC1jYWxlbmRhciAucC1kYXRlcGlja2VyIHtcbiAgbWluLXdpZHRoOiB1bnNldCAhaW1wb3J0YW50O1xufSJdfQ== */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LinkSettingComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-link-setting',
                templateUrl: './link-setting.component.html',
                styleUrls: ['./link-setting.component.scss'],
            }]
    }], function () { return [{ type: i1.FormBuilder }, { type: i2.DatePipe }, { type: i3.ClipboardService }, { type: i4.MessageService }, { type: i5.TranslateService }, { type: i6.LinkService }, { type: i7.AuthService }, { type: i8.UserService }, { type: i9.UserGroupService }, { type: i10.AddressbookService }, { type: i11.AddressbookGroupService }]; }, { displayModal: [{
            type: core_1.Input
        }], linkData: [{
            type: core_1.Input
        }], projectId: [{
            type: core_1.Input
        }], isPublicView: [{
            type: core_1.Input
        }], viewOnlineSettingComponent: [{
            type: core_1.ViewChild,
            args: ['viewOnlineSettingComponent']
        }], addressGroupSelectComponent: [{
            type: core_1.ViewChild,
            args: ['addressGroupSelectComponent']
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/link/link-list/link-list.component.ts":
/*!****************************************************************************!*\
  !*** ./src/app/authentication-pages/link/link-list/link-list.component.ts ***!
  \****************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.LinkListComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const environment_1 = __webpack_require__(/*! ../../../../environments/environment */ "./src/environments/environment.ts");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/__ivy_ngcc__/fesm2015/platform-browser.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/link.service */ "./src/app/services/link.service.ts"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! primeng/ripple */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-ripple.js"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! primeng/table */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-table.js"));
const i10 = tslib_1.__importStar(__webpack_require__(/*! primeng/overlaypanel */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-overlaypanel.js"));
const i11 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i12 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js"));
function LinkListComponent_ng_template_9_Template(rf, ctx) { if (rf & 1) {
    const _r7 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 11);
    i0.ɵɵelementStart(1, "span", 12);
    i0.ɵɵelement(2, "i", 13);
    i0.ɵɵelementStart(3, "input", 14);
    i0.ɵɵlistener("keyup", function LinkListComponent_ng_template_9_Template_input_keyup_3_listener() { i0.ɵɵrestoreView(_r7); const ctx_r6 = i0.ɵɵnextContext(); return ctx_r6.getLinkList(null, true); })("ngModelChange", function LinkListComponent_ng_template_9_Template_input_ngModelChange_3_listener($event) { i0.ɵɵrestoreView(_r7); const ctx_r8 = i0.ɵɵnextContext(); return ctx_r8.getParams.searchKey = $event; });
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("placeholder", i0.ɵɵpipeBind1(4, 2, "label.search"));
    i0.ɵɵproperty("ngModel", ctx_r0.getParams.searchKey);
} }
function LinkListComponent_ng_template_10_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "th", 15);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "th", 16);
    i0.ɵɵtext(5);
    i0.ɵɵpipe(6, "translate");
    i0.ɵɵelement(7, "p-sortIcon", 17);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(8, "th", 18);
    i0.ɵɵtext(9);
    i0.ɵɵpipe(10, "translate");
    i0.ɵɵelement(11, "p-sortIcon", 19);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(12, "th", 20);
    i0.ɵɵtext(13);
    i0.ɵɵpipe(14, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(15, "th", 21);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 4, "label.link_url"), " ");
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 6, "label.type"), " ");
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(10, 8, "label.create_date"), " ");
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(14, 10, "label.document"), " ");
} }
function LinkListComponent_ng_template_11_span_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "label.link_type_project"));
} }
function LinkListComponent_ng_template_11_span_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "label.link_type_folder"));
} }
function LinkListComponent_ng_template_11_span_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "label.link_type_file"));
} }
function LinkListComponent_ng_template_11_span_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "label.link_type_multi_files"));
} }
function LinkListComponent_ng_template_11_span_9_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "span");
} }
function LinkListComponent_ng_template_11_i_14_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 38);
} }
function LinkListComponent_ng_template_11_i_15_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 38);
} }
function LinkListComponent_ng_template_11_span_16_i_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 50);
} }
function LinkListComponent_ng_template_11_span_16_i_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 51);
} }
function LinkListComponent_ng_template_11_span_16_i_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 52);
} }
function LinkListComponent_ng_template_11_span_16_i_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 53);
} }
function LinkListComponent_ng_template_11_span_16_i_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 54);
} }
function LinkListComponent_ng_template_11_span_16_i_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 55);
} }
function LinkListComponent_ng_template_11_span_16_i_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 56);
} }
function LinkListComponent_ng_template_11_span_16_i_9_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 57);
} }
function LinkListComponent_ng_template_11_span_16_i_10_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 58);
} }
function LinkListComponent_ng_template_11_span_16_i_11_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 59);
} }
function LinkListComponent_ng_template_11_span_16_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵelementStart(1, "span", 39);
    i0.ɵɵtemplate(2, LinkListComponent_ng_template_11_span_16_i_2_Template, 1, 0, "i", 40);
    i0.ɵɵtemplate(3, LinkListComponent_ng_template_11_span_16_i_3_Template, 1, 0, "i", 41);
    i0.ɵɵtemplate(4, LinkListComponent_ng_template_11_span_16_i_4_Template, 1, 0, "i", 42);
    i0.ɵɵtemplate(5, LinkListComponent_ng_template_11_span_16_i_5_Template, 1, 0, "i", 43);
    i0.ɵɵtemplate(6, LinkListComponent_ng_template_11_span_16_i_6_Template, 1, 0, "i", 44);
    i0.ɵɵtemplate(7, LinkListComponent_ng_template_11_span_16_i_7_Template, 1, 0, "i", 45);
    i0.ɵɵtemplate(8, LinkListComponent_ng_template_11_span_16_i_8_Template, 1, 0, "i", 46);
    i0.ɵɵtemplate(9, LinkListComponent_ng_template_11_span_16_i_9_Template, 1, 0, "i", 47);
    i0.ɵɵtemplate(10, LinkListComponent_ng_template_11_span_16_i_10_Template, 1, 0, "i", 48);
    i0.ɵɵtemplate(11, LinkListComponent_ng_template_11_span_16_i_11_Template, 1, 0, "i", 49);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const link_r9 = i0.ɵɵnextContext().$implicit;
    const ctx_r18 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitch", ctx_r18.appUtil.getGroupFromMimeTypeByFileType(link_r9.fileType, link_r9.contentType));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "pdf");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "word");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "excel");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "presentation");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "video");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "audio");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "image");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "text");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "compress");
} }
function LinkListComponent_ng_template_11_i_17_Template(rf, ctx) { if (rf & 1) {
    const _r36 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "i", 60);
    i0.ɵɵlistener("click", function LinkListComponent_ng_template_11_i_17_Template_i_click_0_listener($event) { i0.ɵɵrestoreView(_r36); const link_r9 = i0.ɵɵnextContext().$implicit; const ctx_r34 = i0.ɵɵnextContext(); const _r4 = i0.ɵɵreference(14); ctx_r34.selectHoverItems(link_r9); return _r4.show($event); });
    i0.ɵɵelementEnd();
} }
function LinkListComponent_ng_template_11_i_18_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i");
} }
function LinkListComponent_ng_template_11_span_19_Template(rf, ctx) { if (rf & 1) {
    const _r39 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "span", 61);
    i0.ɵɵlistener("click", function LinkListComponent_ng_template_11_span_19_Template_span_click_0_listener($event) { i0.ɵɵrestoreView(_r39); const link_r9 = i0.ɵɵnextContext().$implicit; const ctx_r37 = i0.ɵɵnextContext(); const _r4 = i0.ɵɵreference(14); ctx_r37.selectHoverItems(link_r9); return _r4.show($event); });
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const link_r9 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵproperty("title", link_r9.documents);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(link_r9.documents);
} }
function LinkListComponent_ng_template_11_span_20_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 62);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const link_r9 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵproperty("title", link_r9.documents);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(link_r9.documents);
} }
function LinkListComponent_ng_template_11_Template(rf, ctx) { if (rf & 1) {
    const _r43 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "tr", 22);
    i0.ɵɵelementStart(1, "td", 23);
    i0.ɵɵlistener("dblclick", function LinkListComponent_ng_template_11_Template_td_dblclick_1_listener() { i0.ɵɵrestoreView(_r43); const link_r9 = ctx.$implicit; const ctx_r42 = i0.ɵɵnextContext(); return ctx_r42.goToDetailPage(link_r9.linkId); });
    i0.ɵɵelementStart(2, "a", 24);
    i0.ɵɵtext(3);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "td", 25);
    i0.ɵɵlistener("dblclick", function LinkListComponent_ng_template_11_Template_td_dblclick_4_listener() { i0.ɵɵrestoreView(_r43); const link_r9 = ctx.$implicit; const ctx_r44 = i0.ɵɵnextContext(); return ctx_r44.goToDetailPage(link_r9.linkId); });
    i0.ɵɵtemplate(5, LinkListComponent_ng_template_11_span_5_Template, 3, 3, "span", 26);
    i0.ɵɵtemplate(6, LinkListComponent_ng_template_11_span_6_Template, 3, 3, "span", 26);
    i0.ɵɵtemplate(7, LinkListComponent_ng_template_11_span_7_Template, 3, 3, "span", 26);
    i0.ɵɵtemplate(8, LinkListComponent_ng_template_11_span_8_Template, 3, 3, "span", 26);
    i0.ɵɵtemplate(9, LinkListComponent_ng_template_11_span_9_Template, 1, 0, "span", 27);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(10, "td", 28);
    i0.ɵɵlistener("dblclick", function LinkListComponent_ng_template_11_Template_td_dblclick_10_listener() { i0.ɵɵrestoreView(_r43); const link_r9 = ctx.$implicit; const ctx_r45 = i0.ɵɵnextContext(); return ctx_r45.goToDetailPage(link_r9.linkId); });
    i0.ɵɵtext(11);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(12, "td", 29);
    i0.ɵɵlistener("dblclick", function LinkListComponent_ng_template_11_Template_td_dblclick_12_listener() { i0.ɵɵrestoreView(_r43); const link_r9 = ctx.$implicit; const ctx_r46 = i0.ɵɵnextContext(); return ctx_r46.goToDetailPage(link_r9.linkId); });
    i0.ɵɵelementStart(13, "div", 30);
    i0.ɵɵtemplate(14, LinkListComponent_ng_template_11_i_14_Template, 1, 0, "i", 31);
    i0.ɵɵtemplate(15, LinkListComponent_ng_template_11_i_15_Template, 1, 0, "i", 31);
    i0.ɵɵtemplate(16, LinkListComponent_ng_template_11_span_16_Template, 12, 10, "span", 26);
    i0.ɵɵtemplate(17, LinkListComponent_ng_template_11_i_17_Template, 1, 0, "i", 32);
    i0.ɵɵtemplate(18, LinkListComponent_ng_template_11_i_18_Template, 1, 0, "i", 27);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(19, LinkListComponent_ng_template_11_span_19_Template, 2, 2, "span", 33);
    i0.ɵɵtemplate(20, LinkListComponent_ng_template_11_span_20_Template, 2, 2, "span", 34);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(21, "td", 35);
    i0.ɵɵelementStart(22, "button", 36);
    i0.ɵɵlistener("click", function LinkListComponent_ng_template_11_Template_button_click_22_listener() { i0.ɵɵrestoreView(_r43); const link_r9 = ctx.$implicit; const ctx_r47 = i0.ɵɵnextContext(); return ctx_r47.goToDetailPage(link_r9.linkId); });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(23, "button", 37);
    i0.ɵɵlistener("click", function LinkListComponent_ng_template_11_Template_button_click_23_listener() { i0.ɵɵrestoreView(_r43); const link_r9 = ctx.$implicit; const ctx_r48 = i0.ɵɵnextContext(); return ctx_r48.confirmDeleteLink(link_r9); });
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const link_r9 = ctx.$implicit;
    const rowIndex_r10 = ctx.rowIndex;
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵproperty("pSelectableRow", link_r9)("pSelectableRowIndex", rowIndex_r10);
    i0.ɵɵadvance(2);
    i0.ɵɵpropertyInterpolate("href", ctx_r2.handleLinkURL(link_r9), i0.ɵɵsanitizeUrl);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1("", ctx_r2.handleLinkURL(link_r9), " ");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitch", link_r9.linkType);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 1);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 3);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 4);
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(ctx_r2.appUtil.formatDateBasedOnDiff(ctx_r2.datePipe, link_r9.createDate));
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngSwitch", link_r9.linkType);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 1);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 3);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 4);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", link_r9.linkType === 4);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", link_r9.linkType !== 4);
} }
function LinkListComponent_ng_template_12_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "td", 63);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "td", 64);
    i0.ɵɵtext(5);
    i0.ɵɵpipe(6, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 2, "label.no_record"));
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 4, "label.no_record"));
} }
function LinkListComponent_ng_template_15_div_1_i_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 50);
} }
function LinkListComponent_ng_template_15_div_1_i_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 51);
} }
function LinkListComponent_ng_template_15_div_1_i_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 52);
} }
function LinkListComponent_ng_template_15_div_1_i_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 53);
} }
function LinkListComponent_ng_template_15_div_1_i_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 54);
} }
function LinkListComponent_ng_template_15_div_1_i_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 55);
} }
function LinkListComponent_ng_template_15_div_1_i_9_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 56);
} }
function LinkListComponent_ng_template_15_div_1_i_10_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 57);
} }
function LinkListComponent_ng_template_15_div_1_i_11_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 58);
} }
function LinkListComponent_ng_template_15_div_1_i_12_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 59);
} }
function LinkListComponent_ng_template_15_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelementStart(1, "div", 67);
    i0.ɵɵelementStart(2, "div", 39);
    i0.ɵɵtemplate(3, LinkListComponent_ng_template_15_div_1_i_3_Template, 1, 0, "i", 40);
    i0.ɵɵtemplate(4, LinkListComponent_ng_template_15_div_1_i_4_Template, 1, 0, "i", 41);
    i0.ɵɵtemplate(5, LinkListComponent_ng_template_15_div_1_i_5_Template, 1, 0, "i", 42);
    i0.ɵɵtemplate(6, LinkListComponent_ng_template_15_div_1_i_6_Template, 1, 0, "i", 43);
    i0.ɵɵtemplate(7, LinkListComponent_ng_template_15_div_1_i_7_Template, 1, 0, "i", 44);
    i0.ɵɵtemplate(8, LinkListComponent_ng_template_15_div_1_i_8_Template, 1, 0, "i", 45);
    i0.ɵɵtemplate(9, LinkListComponent_ng_template_15_div_1_i_9_Template, 1, 0, "i", 46);
    i0.ɵɵtemplate(10, LinkListComponent_ng_template_15_div_1_i_10_Template, 1, 0, "i", 47);
    i0.ɵɵtemplate(11, LinkListComponent_ng_template_15_div_1_i_11_Template, 1, 0, "i", 48);
    i0.ɵɵtemplate(12, LinkListComponent_ng_template_15_div_1_i_12_Template, 1, 0, "i", 49);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(13, "span", 68);
    i0.ɵɵtext(14);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r50 = ctx.$implicit;
    const ctx_r49 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngSwitch", ctx_r49.getExtension(item_r50));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "pdf");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "docx");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "xlsx");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "pptx");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "video");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "mp3");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "jpg");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "txt");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "zip");
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(item_r50);
} }
function LinkListComponent_ng_template_15_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 65);
    i0.ɵɵtemplate(1, LinkListComponent_ng_template_15_div_1_Template, 15, 11, "div", 66);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r5 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngForOf", ctx_r5.hoverItems);
} }
const _c0 = function () { return { width: "30vw" }; };
class LinkListComponent {
    constructor(titleService, translate, datePipe, messageService, activatedRoute, router, confirmationService, linkService) {
        this.titleService = titleService;
        this.translate = translate;
        this.datePipe = datePipe;
        this.messageService = messageService;
        this.activatedRoute = activatedRoute;
        this.router = router;
        this.confirmationService = confirmationService;
        this.linkService = linkService;
        this.appUtil = app_util_1.default;
        this.constant = app_constants_1.default;
        this.links = [];
        this.selectedItems = [];
        this.first = 0;
        this.rows = 10;
        this.getParams = {
            projectId: '',
            searchKey: '',
            pageNumber: 1,
            pageSize: 10,
            sortField: 'createdDate',
            ascSort: false,
        };
        this.hoverItems = [];
        this.translate.get(['page_title.list_link']).subscribe(translation => {
            this.titleService.setTitle(translation['page_title.list_link']);
        });
    }
    ngOnInit() {
        this.rowOptions = this.constant.DATA_VIEW.ROW_PER_PAGE_OPTIONS;
        this.getParams = this.linkService.getStoreParams
            ? this.linkService.getStoreParams : this.getParams;
        this.getParams.projectId = this.activatedRoute.snapshot.paramMap.get('project_id');
        this.getParams.searchKey = '';
        this.rows = this.getParams.pageSize;
        this.ascSort = (this.getParams.ascSort) ? 1 : -1;
        this.sortField = this.getParams.sortField;
    }
    getLinkList(event, isSearch) {
        if (event) {
            this.getParams.sortField = (event.sortField) ? event.sortField : 'createdDate';
            this.getParams.ascSort = (event.sortOrder === 1);
            if (event.rows) {
                this.getParams.pageNumber = (event.first / event.rows) + 1;
                this.getParams.pageSize = event.rows;
            }
        }
        if (isSearch) {
            this.getParams.pageNumber = 1;
            this.first = 0;
        }
        if (this.pendingRequest) {
            this.pendingRequest.unsubscribe();
        }
        this.pendingRequest = this.linkService.getLinkList(this.appUtil.toSnakeCaseKey(this.getParams)).subscribe(res => {
            if (res.status === 200) {
                this.linkService.setStoreParams(this.getParams);
                this.links = res.data.content;
                this.totalRecords = res.data.totalElements;
            }
        });
    }
    doDeleteLink(link) {
        if (!link && (this.selectedItems.length === 0 || !this.selectedItems)) {
            return;
        }
        let promises = [];
        // delete link
        if (link) {
            promises = [...promises, this.deleteSingleLink(link.linkId)];
        }
        else {
            this.selectedItems.forEach(l => {
                promises = [...promises, this.deleteSingleLink(l.linkId)];
            });
        }
        Promise.all(promises).then(responses => {
            let success = true;
            responses.forEach(res => {
                if (res && res.status !== 200) {
                    success = false;
                }
            });
            if (success) {
                this.messageService.add({
                    severity: 'success',
                    detail: this.appUtil.translate(this.translate, 'default_toast.delete_success')
                });
            }
            this.selectedItems = [];
            this.first = 0;
            this.getParams.pageNumber = 1;
            this.getLinkList();
        });
    }
    deleteSingleLink(linkId) {
        const params = {
            projectId: this.getParams.projectId,
            linkId
        };
        return new Promise((resolve) => {
            this.linkService.deleteLink(this.appUtil.toSnakeCaseKey(params)).subscribe(res => {
                resolve(res);
            }, error => {
                // console.log('error', error);
            });
        });
    }
    translateText(key) {
        return this.appUtil.translate(this.translate, key);
    }
    confirmDeleteLink(link) {
        this.confirmationService.confirm({
            header: this.translateText('label.delete_link'),
            message: this.translateText('label.delete_link_message'),
            acceptIcon: 'pi pi-check',
            rejectIcon: 'pi pi-times',
            acceptLabel: this.translateText('button.delete'),
            rejectLabel: this.translateText('button.cancel'),
            dismissableMask: true,
            defaultFocus: 'none',
            accept: () => {
                this.doDeleteLink(link);
                this.confirmationService.close();
            },
            reject: () => {
                this.confirmationService.close();
            }
        });
    }
    handleLinkURL(link) {
        const printable = (link.pritable) ? link.printable : 0;
        return environment_1.environment.frontend_url + link.linkUrl.replace('%d', printable);
    }
    getExtension(fileName) {
        return fileName.split('.').pop();
    }
    selectHoverItems(link) {
        this.hoverItems = link.documents.split(',');
    }
    goToDetailPage(linkId) {
        this.router.navigate(['/link', this.getParams.projectId, linkId]);
    }
}
exports.LinkListComponent = LinkListComponent;
LinkListComponent.ɵfac = function LinkListComponent_Factory(t) { return new (t || LinkListComponent)(i0.ɵɵdirectiveInject(i1.Title), i0.ɵɵdirectiveInject(i2.TranslateService), i0.ɵɵdirectiveInject(i3.DatePipe), i0.ɵɵdirectiveInject(i4.MessageService), i0.ɵɵdirectiveInject(i5.ActivatedRoute), i0.ɵɵdirectiveInject(i5.Router), i0.ɵɵdirectiveInject(i4.ConfirmationService), i0.ɵɵdirectiveInject(i6.LinkService)); };
LinkListComponent.ɵcmp = i0.ɵɵdefineComponent({ type: LinkListComponent, selectors: [["app-link-list"]], decls: 16, vars: 28, consts: [[1, "page-title"], ["icon", "fas fa-trash p-button-icon-left", "pButton", "", "pRipple", "", "type", "button", 1, "p-button-danger", "p-button-raised", "p-button-icon-left", "p-button-icon", 3, "label", "disabled", "click"], [1, "p-mt-2"], ["dataKey", "linkId", "selectionMode", "multiple", 3, "first", "selection", "lazy", "metaKeySelection", "paginator", "resetPageOnSort", "rowHover", "rowsPerPageOptions", "rows", "sortField", "sortOrder", "totalRecords", "value", "onLazyLoad", "firstChange", "selectionChange"], ["pTemplate", "caption"], ["pTemplate", "header"], ["pTemplate", "body"], ["pTemplate", "emptymessage"], [3, "dismissable"], ["showItems", ""], ["pTemplate", ""], [1, "p-d-flex", "p-ai-center", "p-jc-between"], [1, "p-input-icon-left"], [1, "pi", "pi-search"], ["pInputText", "", "type", "text", "maxlength", "64", 1, "search-style", "h-38", 3, "ngModel", "placeholder", "keyup", "ngModelChange"], [1, "p-text-left", 2, "width", "30%"], ["pSortableColumn", "linkType", 1, "p-text-left", "p-d-none", "p-d-lg-table-cell", 2, "width", "10%"], ["field", "linkType"], ["pSortableColumn", "createdDate", 1, "p-text-left", "p-d-none", "p-d-md-table-cell", 2, "width", "20%"], ["field", "createdDate"], [1, "p-text-left", "p-d-none", "p-d-lg-table-cell"], [1, "p-text-center", 2, "width", "15%"], [3, "pSelectableRow", "pSelectableRowIndex"], [1, "p-text-truncate", 3, "dblclick"], ["target", "_blank", 1, "link-wrap", 3, "href"], [1, "p-text-left", "p-d-none", "p-d-lg-table-cell", 3, "ngSwitch", "dblclick"], [4, "ngSwitchCase"], [4, "ngSwitchDefault"], [1, "p-text-left", "p-d-none", "p-d-md-table-cell", 3, "dblclick"], [1, "p-text-truncate", "p-text-left", "p-d-none", "p-d-lg-table-cell", 3, "dblclick"], [1, "p-d-inline-flex", 3, "ngSwitch"], ["class", "fas fa-folder text-primary", 4, "ngSwitchCase"], ["class", "fas fa-file-alt", 3, "click", 4, "ngSwitchCase"], ["class", "p-pl-1", 3, "title", "click", 4, "ngIf"], ["class", "p-pl-1", 3, "title", 4, "ngIf"], [1, "p-text-center"], ["icon", "fas fa-edit", "pButton", "", "pRipple", "", "type", "button", 1, "p-button-info", "p-button-raised", "p-mr-2", 3, "click"], ["icon", "fas fa-trash", "pButton", "", "pRipple", "", "type", "button", 1, "p-button-danger", "p-button-raised", "p-mr-2", 3, "click"], [1, "fas", "fa-folder", "text-primary"], [3, "ngSwitch"], ["class", "far fa-file-pdf text-danger", 4, "ngSwitchCase"], ["class", "far fa-file-word text-primary", 4, "ngSwitchCase"], ["class", "far fa-file-excel text-success", 4, "ngSwitchCase"], ["class", "far fa-file-powerpoint text-warning", 4, "ngSwitchCase"], ["class", "fas fa-file-video", 4, "ngSwitchCase"], ["class", "fas fa-file-audio", 4, "ngSwitchCase"], ["class", "fas fa-file-image", 4, "ngSwitchCase"], ["class", "far fa-file-alt", 4, "ngSwitchCase"], ["class", "far fa-file-archive", 4, "ngSwitchCase"], ["class", "far fa-file", 4, "ngSwitchDefault"], [1, "far", "fa-file-pdf", "text-danger"], [1, "far", "fa-file-word", "text-primary"], [1, "far", "fa-file-excel", "text-success"], [1, "far", "fa-file-powerpoint", "text-warning"], [1, "fas", "fa-file-video"], [1, "fas", "fa-file-audio"], [1, "fas", "fa-file-image"], [1, "far", "fa-file-alt"], [1, "far", "fa-file-archive"], [1, "far", "fa-file"], [1, "fas", "fa-file-alt", 3, "click"], [1, "p-pl-1", 3, "title", "click"], [1, "p-pl-1", 3, "title"], ["colspan", "5", 1, "p-text-center", "p-d-none", "p-d-lg-table-cell"], ["colspan", "2", 1, "p-text-center", "p-d-sm-table-cell", "p-d-lg-none"], [1, "item-scroll"], [4, "ngFor", "ngForOf"], [1, "p-d-inline-flex", "p-mb-3"], [1, "p-pl-1"]], template: function LinkListComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵtext(1);
        i0.ɵɵpipe(2, "titlecase");
        i0.ɵɵpipe(3, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(4, "button", 1);
        i0.ɵɵlistener("click", function LinkListComponent_Template_button_click_4_listener() { return ctx.confirmDeleteLink(); });
        i0.ɵɵpipe(5, "uppercase");
        i0.ɵɵpipe(6, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(7, "div", 2);
        i0.ɵɵelementStart(8, "p-table", 3);
        i0.ɵɵlistener("onLazyLoad", function LinkListComponent_Template_p_table_onLazyLoad_8_listener($event) { return ctx.getLinkList($event); })("firstChange", function LinkListComponent_Template_p_table_firstChange_8_listener($event) { return ctx.first = $event; })("selectionChange", function LinkListComponent_Template_p_table_selectionChange_8_listener($event) { return ctx.selectedItems = $event; });
        i0.ɵɵtemplate(9, LinkListComponent_ng_template_9_Template, 5, 4, "ng-template", 4);
        i0.ɵɵtemplate(10, LinkListComponent_ng_template_10_Template, 16, 12, "ng-template", 5);
        i0.ɵɵtemplate(11, LinkListComponent_ng_template_11_Template, 24, 17, "ng-template", 6);
        i0.ɵɵtemplate(12, LinkListComponent_ng_template_12_Template, 7, 6, "ng-template", 7);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(13, "p-overlayPanel", 8, 9);
        i0.ɵɵtemplate(15, LinkListComponent_ng_template_15_Template, 2, 1, "ng-template", 10);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵadvance(1);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 19, i0.ɵɵpipeBind1(3, 21, "label.link_list")));
        i0.ɵɵadvance(3);
        i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(5, 23, i0.ɵɵpipeBind1(6, 25, "label.delete")));
        i0.ɵɵproperty("disabled", ctx.selectedItems.length === 0);
        i0.ɵɵadvance(4);
        i0.ɵɵproperty("first", ctx.first)("selection", ctx.selectedItems)("lazy", true)("metaKeySelection", true)("paginator", ctx.totalRecords > 0)("resetPageOnSort", true)("rowHover", true)("rowsPerPageOptions", ctx.rowOptions)("rows", ctx.rows)("sortField", ctx.sortField)("sortOrder", ctx.ascSort)("totalRecords", ctx.totalRecords)("value", ctx.links);
        i0.ɵɵadvance(5);
        i0.ɵɵstyleMap(i0.ɵɵpureFunction0(27, _c0));
        i0.ɵɵproperty("dismissable", true);
    } }, directives: [i7.ButtonDirective, i8.Ripple, i9.Table, i4.PrimeTemplate, i10.OverlayPanel, i11.DefaultValueAccessor, i12.InputText, i11.MaxLengthValidator, i11.NgControlStatus, i11.NgModel, i9.SortableColumn, i9.SortIcon, i9.SelectableRow, i3.NgSwitch, i3.NgSwitchCase, i3.NgSwitchDefault, i3.NgIf, i3.NgForOf], pipes: [i3.TitleCasePipe, i2.TranslatePipe, i3.UpperCasePipe], styles: [".link-wrap[_ngcontent-%COMP%] {\n  color: #00b3ee;\n  cursor: pointer;\n  word-break: break-all;\n}\n\n.item-scroll[_ngcontent-%COMP%] {\n  max-height: 120px;\n  overflow-y: auto;\n}\n\n@media screen and (min-width: 768px) {\n  .p-d-md-table-cell[_ngcontent-%COMP%] {\n    display: table-cell !important;\n  }\n}\n\n@media only screen and (min-width: 992px) {\n  .p-d-lg-table-cell[_ngcontent-%COMP%] {\n    display: table-cell !important;\n  }\n}\n\n@media screen and (max-width: 576px) {\n  .p-d-sm-table-cell[_ngcontent-%COMP%] {\n    display: table-cell !important;\n  }\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvbGluay9saW5rLWxpc3QvbGluay1saXN0LmNvbXBvbmVudC5zY3NzIiwic3JjL2FwcC9hdXRoZW50aWNhdGlvbi1wYWdlcy9saW5rL2xpbmstbGlzdC9saW5rLWxpc3QuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxjQUFBO0VBQ0EsZUFBQTtFQUNBLHFCQUFBO0FDQ0Y7O0FERUE7RUFDRSxpQkFBQTtFQUNBLGdCQUFBO0FDQ0Y7O0FERUE7RUFDRTtJQUNFLDhCQUFBO0VDQ0Y7QUFDRjs7QURHQTtFQUNFO0lBQ0UsOEJBQUE7RUNERjtBQUNGOztBREtBO0VBQ0U7SUFDRSw4QkFBQTtFQ0hGO0FBQ0YiLCJmaWxlIjoic3JjL2FwcC9hdXRoZW50aWNhdGlvbi1wYWdlcy9saW5rL2xpbmstbGlzdC9saW5rLWxpc3QuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyIubGluay13cmFwIHtcbiAgY29sb3I6ICMwMGIzZWU7XG4gIGN1cnNvcjogcG9pbnRlcjtcbiAgd29yZC1icmVhazogYnJlYWstYWxsO1xufVxuXG4uaXRlbS1zY3JvbGwge1xuICBtYXgtaGVpZ2h0OiAxMjBweDtcbiAgb3ZlcmZsb3cteTogYXV0bztcbn1cblxuQG1lZGlhIHNjcmVlbiBhbmQgKG1pbi13aWR0aDogNzY4cHgpIHtcbiAgLnAtZC1tZC10YWJsZS1jZWxsIHtcbiAgICBkaXNwbGF5OiB0YWJsZS1jZWxsICFpbXBvcnRhbnQ7XG4gIH1cbn1cblxuLy8gbGdcbkBtZWRpYSBvbmx5IHNjcmVlbiBhbmQgKG1pbi13aWR0aDogOTkycHgpIHtcbiAgLnAtZC1sZy10YWJsZS1jZWxsIHtcbiAgICBkaXNwbGF5OiB0YWJsZS1jZWxsICFpbXBvcnRhbnQ7XG4gIH1cbn1cblxuLy8geHNcbkBtZWRpYSBzY3JlZW4gYW5kIChtYXgtd2lkdGg6IDU3NnB4KSB7XG4gIC5wLWQtc20tdGFibGUtY2VsbCB7XG4gICAgZGlzcGxheTogdGFibGUtY2VsbCAhaW1wb3J0YW50O1xuICB9XG59XG4iLCIubGluay13cmFwIHtcbiAgY29sb3I6ICMwMGIzZWU7XG4gIGN1cnNvcjogcG9pbnRlcjtcbiAgd29yZC1icmVhazogYnJlYWstYWxsO1xufVxuXG4uaXRlbS1zY3JvbGwge1xuICBtYXgtaGVpZ2h0OiAxMjBweDtcbiAgb3ZlcmZsb3cteTogYXV0bztcbn1cblxuQG1lZGlhIHNjcmVlbiBhbmQgKG1pbi13aWR0aDogNzY4cHgpIHtcbiAgLnAtZC1tZC10YWJsZS1jZWxsIHtcbiAgICBkaXNwbGF5OiB0YWJsZS1jZWxsICFpbXBvcnRhbnQ7XG4gIH1cbn1cbkBtZWRpYSBvbmx5IHNjcmVlbiBhbmQgKG1pbi13aWR0aDogOTkycHgpIHtcbiAgLnAtZC1sZy10YWJsZS1jZWxsIHtcbiAgICBkaXNwbGF5OiB0YWJsZS1jZWxsICFpbXBvcnRhbnQ7XG4gIH1cbn1cbkBtZWRpYSBzY3JlZW4gYW5kIChtYXgtd2lkdGg6IDU3NnB4KSB7XG4gIC5wLWQtc20tdGFibGUtY2VsbCB7XG4gICAgZGlzcGxheTogdGFibGUtY2VsbCAhaW1wb3J0YW50O1xuICB9XG59Il19 */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LinkListComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-link-list',
                templateUrl: './link-list.component.html',
                styleUrls: ['./link-list.component.scss']
            }]
    }], function () { return [{ type: i1.Title }, { type: i2.TranslateService }, { type: i3.DatePipe }, { type: i4.MessageService }, { type: i5.ActivatedRoute }, { type: i5.Router }, { type: i4.ConfirmationService }, { type: i6.LinkService }]; }, null); })();


/***/ }),

/***/ "./src/app/authentication-pages/link/link.component.ts":
/*!*************************************************************!*\
  !*** ./src/app/authentication-pages/link/link.component.ts ***!
  \*************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.LinkComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
class LinkComponent {
    constructor() { }
    ngOnInit() {
    }
}
exports.LinkComponent = LinkComponent;
LinkComponent.ɵfac = function LinkComponent_Factory(t) { return new (t || LinkComponent)(); };
LinkComponent.ɵcmp = i0.ɵɵdefineComponent({ type: LinkComponent, selectors: [["app-link"]], decls: 1, vars: 0, template: function LinkComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelement(0, "router-outlet");
    } }, directives: [i1.RouterOutlet], styles: [".text-danger[_ngcontent-%COMP%] {\n  color: #dc3545 !important;\n}\n\n.text-primary[_ngcontent-%COMP%] {\n  color: #007bff !important;\n}\n\n.text-success[_ngcontent-%COMP%] {\n  color: #28a745 !important;\n}\n\n.text-warning[_ngcontent-%COMP%] {\n  color: #ffc107 !important;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvbGluay9saW5rLmNvbXBvbmVudC5zY3NzIiwic3JjL2FwcC9hdXRoZW50aWNhdGlvbi1wYWdlcy9saW5rL2xpbmsuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSx5QkFBQTtBQ0NGOztBREVBO0VBQ0UseUJBQUE7QUNDRjs7QURFQTtFQUNFLHlCQUFBO0FDQ0Y7O0FERUE7RUFDRSx5QkFBQTtBQ0NGIiwiZmlsZSI6InNyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvbGluay9saW5rLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLnRleHQtZGFuZ2VyIHtcbiAgY29sb3I6ICNkYzM1NDUgIWltcG9ydGFudDtcbn1cblxuLnRleHQtcHJpbWFyeSB7XG4gIGNvbG9yOiAjMDA3YmZmICFpbXBvcnRhbnQ7XG59XG5cbi50ZXh0LXN1Y2Nlc3Mge1xuICBjb2xvcjogIzI4YTc0NSAhaW1wb3J0YW50O1xufVxuXG4udGV4dC13YXJuaW5nIHtcbiAgY29sb3I6ICNmZmMxMDcgIWltcG9ydGFudDtcbn1cbiIsIi50ZXh0LWRhbmdlciB7XG4gIGNvbG9yOiAjZGMzNTQ1ICFpbXBvcnRhbnQ7XG59XG5cbi50ZXh0LXByaW1hcnkge1xuICBjb2xvcjogIzAwN2JmZiAhaW1wb3J0YW50O1xufVxuXG4udGV4dC1zdWNjZXNzIHtcbiAgY29sb3I6ICMyOGE3NDUgIWltcG9ydGFudDtcbn1cblxuLnRleHQtd2FybmluZyB7XG4gIGNvbG9yOiAjZmZjMTA3ICFpbXBvcnRhbnQ7XG59Il19 */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LinkComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-link',
                templateUrl: './link.component.html',
                styleUrls: ['./link.component.scss']
            }]
    }], function () { return []; }, null); })();


/***/ }),

/***/ "./src/app/authentication-pages/notification/notification-message/notification-message.component.ts":
/*!**********************************************************************************************************!*\
  !*** ./src/app/authentication-pages/notification/notification-message/notification-message.component.ts ***!
  \**********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.NotificationMessageComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const app_constants_1 = tslib_1.__importStar(__webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/__ivy_ngcc__/fesm2015/platform-browser.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/notification.service */ "./src/app/services/notification.service.ts"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! primeng/table */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-table.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
function NotificationMessageComponent_ng_template_1_Template(rf, ctx) { if (rf & 1) {
    const _r5 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "td");
    i0.ɵɵelementStart(2, "div", 3);
    i0.ɵɵlistener("click", function NotificationMessageComponent_ng_template_1_Template_div_click_2_listener() { i0.ɵɵrestoreView(_r5); const message_r2 = ctx.$implicit; const ctx_r4 = i0.ɵɵnextContext(); return ctx_r4.gotoProject(message_r2); });
    i0.ɵɵelementStart(3, "span");
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd();
    i0.ɵɵtext(5, "\u00A0 ");
    i0.ɵɵelement(6, "span", 4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(7, "div", 5);
    i0.ɵɵelementStart(8, "small");
    i0.ɵɵtext(9);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const message_r2 = ctx.$implicit;
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate(ctx_r0.getText(message_r2));
    i0.ɵɵadvance(2);
    i0.ɵɵpropertyInterpolate("title", ctx_r0.getContent(message_r2).text);
    i0.ɵɵproperty("innerHTML", ctx_r0.getContent(message_r2).html, i0.ɵɵsanitizeHtml);
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate1(" ", ctx_r0.getMessageTime(message_r2), " ");
} }
function NotificationMessageComponent_ng_template_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "td", 6);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, "label.no_message"));
} }
class NotificationMessageComponent {
    constructor(translateService, authService, router, sanitizer, notificationService) {
        this.translateService = translateService;
        this.authService = authService;
        this.router = router;
        this.sanitizer = sanitizer;
        this.notificationService = notificationService;
        this.isReadMessage = new core_1.EventEmitter();
        this.util = app_util_1.default;
        this.constant = app_constants_1.default;
        this.isFirstLoad = true;
        this.listMess = [];
    }
    ngOnInit() {
        this.authUser = this.authService.getAuthUser;
        this.lengthLoad = (this.numberMessUnread !== 0) ? this.numberMessUnread
            : this.constant.DEFAULT_PAGE_SIZE;
        this.getListMessage(false);
    }
    getListMessage(isScroll) {
        this.lengthLoad = (this.numberMessUnread !== 0 && this.numberMessUnread > 5) ? this.numberMessUnread
            : this.constant.DEFAULT_PAGE_SIZE;
        const lastDate = (this.listMess && this.listMess.length > 0 && isScroll)
            ? (this.listMess[this.listMess.length - 1].lastUpdate || 0) : 0;
        const params = {
            pageSize: this.lengthLoad,
            codes: app_constants_1.HistoryType.ADD_FILE + ',' + app_constants_1.HistoryType.INVITE_USER + ',' +
                app_constants_1.HistoryType.ADD_COMMENT + ',' + app_constants_1.HistoryType.UPDATE_COMMENT + ',' +
                app_constants_1.HistoryType.ADD_COMMENT_FILE + ',' + app_constants_1.HistoryType.UPDATE_COMMENT_FILE,
            lastUpdate: lastDate
        };
        // no call API if scroll end
        if (this.totalRecords === 0 && !this.isFirstLoad) {
            return;
        }
        this.notificationService.getTeamMessage(this.authUser.teamId, this.util.toSnakeCaseKey(params))
            .subscribe(res => {
            if (res.status === 200) {
                if (this.isFirstLoad) {
                    this.listMess = [];
                    this.isReadMessage.emit(true);
                }
                else {
                    if (this.listMess && this.listMess.length > 0) {
                        res.data.content.forEach(content => {
                            this.listMess = [...this.listMess, content];
                        });
                    }
                    else {
                        this.listMess = res.data.content;
                    }
                }
                // trigger change detection
                this.listMess = [...this.listMess];
                this.totalRecords = res.data.totalElements;
                this.numberMessUnread = 0;
                this.isFirstLoad = false;
            }
        });
    }
    getText(message) {
        let result = '';
        let userName;
        if (this.authUser.lang === 'ja') {
            userName = message.fromUserLastName + ' ' + message.fromUserFirstName;
        }
        else {
            userName = message.fromUserFirstName + ' ' + message.fromUserLastName;
        }
        result += userName;
        switch (message.code) {
            case app_constants_1.HistoryType.INVITE_USER:
                result += this.util.translate(this.translateService, 'label.notify_invite_project');
                break;
            case app_constants_1.HistoryType.ADD_COMMENT:
            case app_constants_1.HistoryType.ADD_COMMENT_FILE:
                if (message.messageText && this.isMention(message.messageText)) {
                    result += this.util.translate(this.translateService, 'label.notify_mention');
                }
                else {
                    if (message.fileId) {
                        result += this.util.translate(this.translateService, 'label.notify_file_comment');
                    }
                    else {
                        result += this.util.translate(this.translateService, 'label.notify_comment');
                    }
                }
                break;
            case app_constants_1.HistoryType.UPDATE_COMMENT:
            case app_constants_1.HistoryType.UPDATE_COMMENT_FILE:
                if (message.messageText && this.isMention(message.messageText)) {
                    result += this.util.translate(this.translateService, 'label.notify_mention');
                }
                else {
                    if (message.fileId) {
                        result += this.util.translate(this.translateService, 'label.notify_update_file_comment');
                    }
                    else {
                        result += this.util.translate(this.translateService, 'label.notify_update_comment');
                    }
                }
                break;
            case app_constants_1.HistoryType.ADD_FILE:
                result += this.util.translate(this.translateService, 'label.notify_upload_file');
                break;
        }
        return result;
    }
    getContent(message) {
        const result = {
            html: '',
            text: '',
            action: false,
        };
        switch (message.code) {
            case app_constants_1.HistoryType.INVITE_USER:
                result.html = '<b class="p-d-block p-text-truncate">' + message.projectName + '</b>';
                result.text = message.projectName;
                break;
            case app_constants_1.HistoryType.ADD_COMMENT:
            case app_constants_1.HistoryType.ADD_COMMENT_FILE:
                if (message.fileId) {
                    result.html = '<b class="p-d-block p-text-truncate">' + message.fileName + '</b>';
                    result.text = message.fileName;
                }
                else {
                    result.html = '<b class="p-d-block p-text-truncate">' + message.projectName + '</b>';
                    result.text = message.projectName;
                }
                result.action = true;
                break;
            case app_constants_1.HistoryType.UPDATE_COMMENT:
            case app_constants_1.HistoryType.UPDATE_COMMENT_FILE:
                if (message.fileId) {
                    result.html = '<b class="p-d-block p-text-truncate">' + message.fileName + '</b>';
                    result.text = message.fileName;
                }
                else {
                    result.html = '<b class="p-d-block p-text-truncate">' + message.projectName + '</b>';
                    result.text = message.projectName;
                }
                break;
            case app_constants_1.HistoryType.ADD_FILE:
                result.html = '<span class="text-notify"><b>' + message.fileName + '</b>' +
                    this.util.translate(this.translateService, 'label.on') +
                    '<b>' + message.projectName + '</b></span>';
                result.text = message.fileName +
                    this.util.translate(this.translateService, 'label.on') +
                    message.projectName;
                break;
        }
        return result;
    }
    isMention(messageText) {
        let text = '';
        if (messageText) {
            text = this.sanitizer.bypassSecurityTrustHtml(messageText);
        }
        // try to get email
        const email = this.authUser.mailAddress;
        if (!email) {
            return false;
        }
        let isTag = false;
        // get mention tag from pattern @[email]
        // @ts-ignore
        const mentions = text.changingThisBreaksApplicationSecurity.match(/@\[(.*?)]/gi);
        if (!mentions) {
            return false;
        }
        // find mention tags point to current user
        for (const item of mentions) {
            if (item === '@[' + email + ']') {
                isTag = true;
                break;
            }
        }
        return isTag;
    }
    millisecondsToStr(milliseconds) {
        let temp = Math.floor(milliseconds / 1000);
        const years = Math.floor(temp / 31536000);
        if (years) {
            return years + this.util.translate(this.translateService, 'label.time.year') + this.numberEnding(years);
        }
        const days = Math.floor((temp %= 31536000) / 86400);
        if (days) {
            return days + this.util.translate(this.translateService, 'label.time.day') + this.numberEnding(days);
        }
        const hours = Math.floor((temp %= 86400) / 3600);
        if (hours) {
            return hours + this.util.translate(this.translateService, 'label.time.hour') + this.numberEnding(hours);
        }
        const minutes = Math.floor((temp %= 3600) / 60);
        if (minutes) {
            return minutes + this.util.translate(this.translateService, 'label.time.minute') + this.numberEnding(minutes);
        }
        const seconds = temp % 60;
        if (seconds) {
            return seconds + this.util.translate(this.translateService, 'label.time.second') + this.numberEnding(seconds);
        }
        return this.util.translate(this.translateService, 'label.time.now'); // 'just now' //or other string you like;
    }
    numberEnding(time) {
        return (time > 1) ? this.util.translate(this.translateService, 'label.time.s') : '';
    }
    getMessageTime(message) {
        return this.millisecondsToStr(new Date().getTime() - message.lastUpdate) + this.util.translate(this.translateService, 'label.ago');
    }
    gotoProject(message) {
        let url = `/project/${message.projectId}/0`;
        if (message.folderId) {
            url = `/project/${message.projectId}/${message.folderId}`;
        }
        this.router.routeReuseStrategy.shouldReuseRoute = () => false;
        this.router.onSameUrlNavigation = 'reload';
        if (message.code === this.constant.PROJECT.USER_CREATE_COMMENT.code
            || message.code === this.constant.PROJECT.USER_UPDATE_COMMENT.code) {
            this.router.navigate([url], { queryParams: { comment: '00' } });
        }
        else if (message.code === this.constant.PROJECT.USER_CREATE_COMMENT_FILE.code
            || message.code === this.constant.PROJECT.USER_UPDATE_COMMENT_FILE.code) {
            this.router.navigate([url], { queryParams: { comment: message.fileId } });
        }
        else {
            this.router.navigate([url], { queryParams: { highlight: message.fileId } });
        }
    }
}
exports.NotificationMessageComponent = NotificationMessageComponent;
NotificationMessageComponent.ɵfac = function NotificationMessageComponent_Factory(t) { return new (t || NotificationMessageComponent)(i0.ɵɵdirectiveInject(i1.TranslateService), i0.ɵɵdirectiveInject(i2.AuthService), i0.ɵɵdirectiveInject(i3.Router), i0.ɵɵdirectiveInject(i4.DomSanitizer), i0.ɵɵdirectiveInject(i5.NotificationService)); };
NotificationMessageComponent.ɵcmp = i0.ɵɵdefineComponent({ type: NotificationMessageComponent, selectors: [["app-notification-message"]], inputs: { numberMessUnread: "numberMessUnread" }, outputs: { isReadMessage: "isReadMessage" }, decls: 3, vars: 9, consts: [[3, "lazy", "value", "scrollable", "scrollHeight", "virtualScroll", "totalRecords", "rows", "loading", "paginator", "onLazyLoad"], ["pTemplate", "body"], ["pTemplate", "emptymessage"], [1, "cs-pointer", 3, "click"], [3, "title", "innerHTML"], [1, "p-text-right"], [1, "p-text-center"]], template: function NotificationMessageComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "p-table", 0);
        i0.ɵɵlistener("onLazyLoad", function NotificationMessageComponent_Template_p_table_onLazyLoad_0_listener() { return ctx.getListMessage(true); });
        i0.ɵɵtemplate(1, NotificationMessageComponent_ng_template_1_Template, 10, 4, "ng-template", 1);
        i0.ɵɵtemplate(2, NotificationMessageComponent_ng_template_2_Template, 4, 3, "ng-template", 2);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵproperty("lazy", true)("value", ctx.listMess)("scrollable", true)("scrollHeight", ctx.listMess.length > 0 ? "200px" : "45px")("virtualScroll", true)("totalRecords", ctx.totalRecords)("rows", ctx.lengthLoad)("loading", ctx.isFirstLoad)("paginator", false);
    } }, directives: [i6.Table, i7.PrimeTemplate], pipes: [i1.TranslatePipe], styles: ["[_nghost-%COMP%]     .text-notify {\n  white-space: normal;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  display: block;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvbm90aWZpY2F0aW9uL25vdGlmaWNhdGlvbi1tZXNzYWdlL25vdGlmaWNhdGlvbi1tZXNzYWdlLmNvbXBvbmVudC5zY3NzIiwic3JjL2FwcC9hdXRoZW50aWNhdGlvbi1wYWdlcy9ub3RpZmljYXRpb24vbm90aWZpY2F0aW9uLW1lc3NhZ2Uvbm90aWZpY2F0aW9uLW1lc3NhZ2UuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0U7RUFDRSxtQkFBQTtFQUNBLGdCQUFBO0VBQ0EsdUJBQUE7RUFDQSxjQUFBO0FDQUoiLCJmaWxlIjoic3JjL2FwcC9hdXRoZW50aWNhdGlvbi1wYWdlcy9ub3RpZmljYXRpb24vbm90aWZpY2F0aW9uLW1lc3NhZ2Uvbm90aWZpY2F0aW9uLW1lc3NhZ2UuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyI6aG9zdCA6Om5nLWRlZXAge1xuICAudGV4dC1ub3RpZnkge1xuICAgIHdoaXRlLXNwYWNlOiBub3JtYWw7XG4gICAgb3ZlcmZsb3c6IGhpZGRlbjtcbiAgICB0ZXh0LW92ZXJmbG93OiBlbGxpcHNpcztcbiAgICBkaXNwbGF5OiBibG9jaztcbiAgfVxufVxuIiwiOmhvc3QgOjpuZy1kZWVwIC50ZXh0LW5vdGlmeSB7XG4gIHdoaXRlLXNwYWNlOiBub3JtYWw7XG4gIG92ZXJmbG93OiBoaWRkZW47XG4gIHRleHQtb3ZlcmZsb3c6IGVsbGlwc2lzO1xuICBkaXNwbGF5OiBibG9jaztcbn0iXX0= */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NotificationMessageComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-notification-message',
                templateUrl: './notification-message.component.html',
                styleUrls: ['./notification-message.component.scss']
            }]
    }], function () { return [{ type: i1.TranslateService }, { type: i2.AuthService }, { type: i3.Router }, { type: i4.DomSanitizer }, { type: i5.NotificationService }]; }, { numberMessUnread: [{
            type: core_1.Input
        }], isReadMessage: [{
            type: core_1.Output
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/notification/notification.component.ts":
/*!*****************************************************************************!*\
  !*** ./src/app/authentication-pages/notification/notification.component.ts ***!
  \*****************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.NotificationComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
class NotificationComponent {
    constructor() {
    }
    ngOnInit() {
    }
}
exports.NotificationComponent = NotificationComponent;
NotificationComponent.ɵfac = function NotificationComponent_Factory(t) { return new (t || NotificationComponent)(); };
NotificationComponent.ɵcmp = i0.ɵɵdefineComponent({ type: NotificationComponent, selectors: [["app-notification"]], decls: 1, vars: 0, template: function NotificationComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelement(0, "router-outlet");
    } }, directives: [i1.RouterOutlet], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL25vdGlmaWNhdGlvbi9ub3RpZmljYXRpb24uY29tcG9uZW50LnNjc3MifQ== */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NotificationComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-notification',
                templateUrl: './notification.component.html',
                styleUrls: ['./notification.component.scss']
            }]
    }], function () { return []; }, null); })();


/***/ }),

/***/ "./src/app/authentication-pages/project/folder-tree/folder-tree.component.ts":
/*!***********************************************************************************!*\
  !*** ./src/app/authentication-pages/project/folder-tree/folder-tree.component.ts ***!
  \***********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.FolderTreeComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const app_constants_1 = tslib_1.__importStar(__webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const _ = tslib_1.__importStar(__webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/folder.service */ "./src/app/services/folder.service.ts"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! primeng/tree */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-tree.js"));
class FolderTreeComponent {
    constructor(folderService, translateService) {
        this.folderService = folderService;
        this.translateService = translateService;
        this.selectedFolder = new core_1.EventEmitter();
        this.util = app_util_1.default;
        this.constant = app_constants_1.default;
        // projectRole = ProjectRole;
        this.projectFolderRole = app_constants_1.ProjectFolderRole;
        this.isShowTree = false;
        this.loadingTree = true;
        this.projectTree = [];
        this.selectedItem = [];
    }
    ngOnInit() {
        this.getFolder('');
    }
    getFolder(folderId) {
        this.loadingTree = true;
        const params = {
            active: true,
            folderOnly: true,
            start: 1,
            length: 50,
            projectId: this.projectId,
            folderId: folderId ? folderId : '0',
            searchGlobal: false,
        };
        if (this.pendingRequest) {
            this.pendingRequest.unsubscribe();
        }
        this.pendingRequest = this.folderService
            .doBrowseItems(this.util.toSnakeCaseKey(params))
            .subscribe((res) => {
            if (res.status === 200) {
                if (res.data.project) {
                    this.projectTree = [
                        {
                            label: res.data.project.name,
                            data: '0',
                            expanded: true,
                            expandedIcon: 'far fa-folder-open',
                            collapsedIcon: 'far fa-folder',
                            leaf: false,
                            children: [],
                        },
                    ];
                }
                res.data.fileInfo.forEach((data) => {
                    const selectItem = _.find(this.selectedValues, function (item) {
                        return item.folder && item.id === data.id;
                    });
                    if (selectItem) {
                        return;
                    }
                    this.projectTree = [
                        ...this.projectTree,
                        {
                            label: data.name,
                            data: data.id,
                            expanded: false,
                            expandedIcon: 'far fa-folder-open',
                            collapsedIcon: 'far fa-folder',
                            selectable: data.userFolderRole === this.projectFolderRole.Owner ||
                                data.userFolderRole === this.projectFolderRole.Editor,
                            leaf: false,
                            children: [
                                {
                                    data: 0,
                                    label: this.util.translate(this.translateService, 'label.loading'),
                                },
                            ],
                        },
                    ];
                    // if (this.projectTree[0] && this.projectTree[0].children) {
                    //   this.projectTree[0].children = [
                    //     ...this.projectTree[0].children,
                    //     {
                    //       label: data.name,
                    //       data: data.id,
                    //       expanded: false,
                    //       expandedIcon: 'far fa-folder-open',
                    //       collapsedIcon: 'far fa-folder',
                    //       selectable:
                    //         data.userFolderRole === this.projectRole.Owner ||
                    //         data.userFolderRole === this.projectRole.Editor,
                    //       leaf: false,
                    //       children: [
                    //         {
                    //           data: 0,
                    //           label: this.util.translate(
                    //             this.translateService,
                    //             'label.loading'
                    //           ),
                    //         },
                    //       ],
                    //     },
                    //   ];
                    // } 
                });
            }
            else {
                if (res.status === 403) {
                }
            }
            this.loadingTree = false;
        });
    }
    getChildFolder(event) {
        const params = {
            active: true,
            folderOnly: true,
            start: 1,
            length: 50,
            projectId: this.projectId,
            folderId: event.node.data ? event.node.data : '0',
            searchGlobal: false,
        };
        let child = [];
        this.folderService
            .doBrowseItems(this.util.toSnakeCaseKey(params))
            .subscribe((res) => {
            if (res.status === 200) {
                if (res.data.fileInfo.length === 0) {
                    event.node.expanded = false;
                    event.node.leaf = true;
                }
                else {
                    res.data.fileInfo.forEach((data) => {
                        child = [
                            ...child,
                            {
                                label: data.name,
                                data: data.id,
                                expanded: false,
                                leaf: false,
                                selectable: data.userFolderRole === this.projectFolderRole.Owner ||
                                    data.userFolderRole === this.projectFolderRole.Editor,
                                expandedIcon: 'far fa-folder-open',
                                collapsedIcon: 'far fa-folder',
                            },
                        ];
                    });
                }
                event.node.children = child;
            }
            else {
                if (res.status === 403) {
                }
            }
        });
    }
    doSelectFolder() {
        this.selectedFolder.emit(this.selectedItem);
    }
    loadExpand(event) {
        if (!event.node.children || event.node.children[0].data === 0) {
            this.getChildFolder(event);
        }
    }
}
exports.FolderTreeComponent = FolderTreeComponent;
FolderTreeComponent.ɵfac = function FolderTreeComponent_Factory(t) { return new (t || FolderTreeComponent)(i0.ɵɵdirectiveInject(i1.FolderService), i0.ɵɵdirectiveInject(i2.TranslateService)); };
FolderTreeComponent.ɵcmp = i0.ɵɵdefineComponent({ type: FolderTreeComponent, selectors: [["app-folder-tree"]], inputs: { projectId: "projectId", selectedValues: "selectedValues" }, outputs: { selectedFolder: "selectedFolder" }, decls: 1, vars: 3, consts: [["selectionMode", "single", "scrollHeight", "flex", 3, "value", "selection", "loading", "selectionChange", "onNodeExpand", "onNodeSelect", "onNodeUnselect"]], template: function FolderTreeComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "p-tree", 0);
        i0.ɵɵlistener("selectionChange", function FolderTreeComponent_Template_p_tree_selectionChange_0_listener($event) { return ctx.selectedItem = $event; })("onNodeExpand", function FolderTreeComponent_Template_p_tree_onNodeExpand_0_listener($event) { return ctx.loadExpand($event); })("onNodeSelect", function FolderTreeComponent_Template_p_tree_onNodeSelect_0_listener() { return ctx.doSelectFolder(); })("onNodeUnselect", function FolderTreeComponent_Template_p_tree_onNodeUnselect_0_listener() { return ctx.doSelectFolder(); });
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵproperty("value", ctx.projectTree)("selection", ctx.selectedItem)("loading", ctx.loadingTree);
    } }, directives: [i3.Tree], styles: ["[_nghost-%COMP%]     .p-tree {\n  border: 0;\n  padding: 0;\n}\n[_nghost-%COMP%]     .p-tree .p-tree-container .p-treenode .p-treenode-content {\n  padding: 0;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvcHJvamVjdC9mb2xkZXItdHJlZS9mb2xkZXItdHJlZS5jb21wb25lbnQuc2NzcyIsInNyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvcHJvamVjdC9mb2xkZXItdHJlZS9mb2xkZXItdHJlZS5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDRTtFQUNFLFNBQUE7RUFDQSxVQUFBO0FDQUo7QURHRTtFQUNFLFVBQUE7QUNESiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL3Byb2plY3QvZm9sZGVyLXRyZWUvZm9sZGVyLXRyZWUuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyI6aG9zdCA6Om5nLWRlZXAge1xuICAucC10cmVlIHtcbiAgICBib3JkZXI6IDA7XG4gICAgcGFkZGluZzogMDtcbiAgfVxuXG4gIC5wLXRyZWUgLnAtdHJlZS1jb250YWluZXIgLnAtdHJlZW5vZGUgLnAtdHJlZW5vZGUtY29udGVudCB7XG4gICAgcGFkZGluZzogMDtcbiAgfVxufVxuIiwiOmhvc3QgOjpuZy1kZWVwIC5wLXRyZWUge1xuICBib3JkZXI6IDA7XG4gIHBhZGRpbmc6IDA7XG59XG46aG9zdCA6Om5nLWRlZXAgLnAtdHJlZSAucC10cmVlLWNvbnRhaW5lciAucC10cmVlbm9kZSAucC10cmVlbm9kZS1jb250ZW50IHtcbiAgcGFkZGluZzogMDtcbn0iXX0= */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FolderTreeComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-folder-tree',
                templateUrl: './folder-tree.component.html',
                styleUrls: ['./folder-tree.component.scss'],
            }]
    }], function () { return [{ type: i1.FolderService }, { type: i2.TranslateService }]; }, { projectId: [{
            type: core_1.Input
        }], selectedValues: [{
            type: core_1.Input
        }], selectedFolder: [{
            type: core_1.Output
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/project/project-create/project-create.component.ts":
/*!*****************************************************************************************!*\
  !*** ./src/app/authentication-pages/project/project-create/project-create.component.ts ***!
  \*****************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ProjectCreateComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const project_model_1 = __webpack_require__(/*! ../../../../models/project.model */ "./src/models/project.model.ts");
const forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
const moment_1 = tslib_1.__importStar(__webpack_require__(/*! moment */ "./node_modules/moment/moment.js"));
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/__ivy_ngcc__/fesm2015/platform-browser.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/project.service */ "./src/app/services/project.service.ts"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/folder.service */ "./src/app/services/folder.service.ts"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/collaborator.service */ "./src/app/services/collaborator.service.ts"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i10 = tslib_1.__importStar(__webpack_require__(/*! ../project-information/project-information.component */ "./src/app/authentication-pages/project/project-information/project-information.component.ts"));
const i11 = tslib_1.__importStar(__webpack_require__(/*! primeng/checkbox */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-checkbox.js"));
const i12 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i13 = tslib_1.__importStar(__webpack_require__(/*! ../../drm/drm-setting/drm-setting.component */ "./src/app/authentication-pages/drm/drm-setting/drm-setting.component.ts"));
const i14 = tslib_1.__importStar(__webpack_require__(/*! ../../drm/view-online-setting/view-online-setting.component */ "./src/app/authentication-pages/drm/view-online-setting/view-online-setting.component.ts"));
const i15 = tslib_1.__importStar(__webpack_require__(/*! ../project-form/project-collaborator/project-collaborator.component */ "./src/app/authentication-pages/project/project-form/project-collaborator/project-collaborator.component.ts"));
const i16 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
const i17 = tslib_1.__importStar(__webpack_require__(/*! primeng/ripple */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-ripple.js"));
const _c0 = ["projectInformationComponent"];
const _c1 = ["drmSettingComponent"];
const _c2 = ["viewOnlineSettingComponent"];
const _c3 = ["projectCollaboratorComponent"];
function ProjectCreateComponent_div_17_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 14);
    i0.ɵɵelement(1, "app-drm-setting", 15, 16);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("disabled", ctx_r1.disabled)("drmSetting", ctx_r1.projectSettings.drmSetting);
} }
function ProjectCreateComponent_div_24_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 14);
    i0.ɵɵelement(1, "app-view-online-setting", 17, 18);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("disabled", ctx_r2.disabled)("watermarkSetting", ctx_r2.projectSettings.watermarkSetting);
} }
function ProjectCreateComponent_div_25_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelementStart(1, "div", 19);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "titlecase");
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "div", 4);
    i0.ɵɵelementStart(6, "div", 20);
    i0.ɵɵelement(7, "app-project-collaborator", null, 21);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, i0.ɵɵpipeBind1(4, 3, "label.collaborators")));
} }
function ProjectCreateComponent_div_26_Template(rf, ctx) { if (rf & 1) {
    const _r9 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 22);
    i0.ɵɵelementStart(1, "div", 23);
    i0.ɵɵelement(2, "p-button", 24);
    i0.ɵɵpipe(3, "titlecase");
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelementStart(5, "button", 25);
    i0.ɵɵlistener("click", function ProjectCreateComponent_div_26_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r9); const ctx_r8 = i0.ɵɵnextContext(); return ctx_r8.onSubmit(); });
    i0.ɵɵpipe(6, "uppercase");
    i0.ɵɵpipe(7, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(3, 2, i0.ɵɵpipeBind1(4, 4, "label.cancel")));
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(6, 6, i0.ɵɵpipeBind1(7, 8, "label.save")));
} }
const _c4 = function (a0) { return { "p-mb-0": a0 }; };
class ProjectCreateComponent {
    constructor(titleService, fb, projectService, router, messageService, authService, folderService, collaboratorService, translate, activatedRoute) {
        this.titleService = titleService;
        this.fb = fb;
        this.projectService = projectService;
        this.router = router;
        this.messageService = messageService;
        this.authService = authService;
        this.folderService = folderService;
        this.collaboratorService = collaboratorService;
        this.translate = translate;
        this.activatedRoute = activatedRoute;
        this.projectSettings = new project_model_1.ProjectSettings();
        this.disabled = false;
        this.mode = 'create';
        this.appConstant = app_constants_1.default;
        this.appUtil = app_util_1.default;
        this.createProjectForm = new forms_1.FormGroup({});
        this.createProjectModel = new project_model_1.CreateProject();
        this.createProjectForm = fb.group({
            autoApplyDrm: [false],
            showWatermark: [false]
        });
    }
    ngOnInit() {
        if (this.router.url.split('/')[2] && this.router.url.split('/')[2].indexOf('create') >= 0) {
            this.translate.get(['page_title.create_project']).subscribe(translation => {
                this.titleService.setTitle(translation['page_title.create_project']);
            });
        }
        const name = this.activatedRoute.snapshot.queryParamMap.get('name')
            ? this.activatedRoute.snapshot.queryParamMap.get('name') : null; // handle default project name when create with settings
        if (name) {
            this.projectSettings.name = name;
        }
        if (this.projectSettings.watermarkSetting) {
            const wm = JSON.parse(this.projectSettings.watermarkSetting);
            this.createProjectModel.showWatermark = (wm.show_wm === 1);
        }
        this.createProjectModel.autoApplyDrm =
            (this.projectSettings.drmSetting && this.projectSettings.drmSetting !== 'null');
    }
    onSubmit(callback) {
        // validate
        this.projectInformationComponent.form.markAllAsTouched();
        let drmInvalid = false;
        let viewOnlineInvalid = false;
        if (this.createProjectForm.value.autoApplyDrm) {
            this.drmSettingComponent.form.markAllAsTouched();
            if (this.drmSettingComponent.form.invalid) {
                drmInvalid = true;
            }
        }
        if (this.createProjectForm.value.showWatermark) {
            this.viewOnlineSettingComponent.form.markAllAsTouched();
            if (this.viewOnlineSettingComponent.form.invalid) {
                viewOnlineInvalid = true;
            }
        }
        if (this.projectInformationComponent.form.invalid || drmInvalid || viewOnlineInvalid || this.isSubmitting) {
            return false;
        }
        this.isSubmitting = true;
        // handle params
        const params = {
            name: this.projectInformationComponent.form.value.name.trim(),
            description: (this.projectInformationComponent.form.value.description)
                ? this.projectInformationComponent.form.value.description : '',
            setting: '000000',
            notifyAll: false,
            subSetting: '',
            wmSettings: '',
            userIds: '',
        };
        let settings = (this.createProjectForm.value.autoApplyDrm) ? '1' : '0';
        settings = settings.concat('00000');
        params.setting = settings;
        const drmSettings = {
            unlimited: 1,
            printable: 0,
            editable: 0,
            expiryDate: ''
        };
        let drmSetting = null;
        if (this.createProjectForm.value.autoApplyDrm) {
            drmSettings.printable = (this.drmSettingComponent.form.value.printable) ? 1 : 0;
            drmSettings.editable = (this.drmSettingComponent.form.value.editable) ? 1 : 0;
            if (!this.drmSettingComponent.form.value.setDocExpiry) {
                delete drmSettings.expiryDate;
            }
            else {
                drmSettings.unlimited = 0;
                const expDate = new Date(this.drmSettingComponent.form.value.expiryDate);
                expDate.setHours(this.drmSettingComponent.form.value.expiryTime.getHours());
                expDate.setMinutes(this.drmSettingComponent.form.value.expiryTime.getMinutes());
                expDate.setSeconds(55);
                drmSettings.expiryDate = this.appUtil.formatBookendDate(expDate, this.drmSettingComponent.form.value.timezone.code, this.appConstant.FORMAT_DATE.LINK_FORMAT_DATE, moment_1.default);
                if (drmSettings.expiryDate <= moment_1.default(moment_1.utc(new Date())).format(this.appConstant.FORMAT_DATE.LINK_FORMAT_DATE)) {
                    this.messageService.add({
                        severity: 'error',
                        detail: this.appUtil.translate(this.translate, 'error.invalid_expiry_date'),
                    });
                    this.isSubmitting = false;
                    return false;
                }
            }
            drmSetting = JSON.stringify(drmSettings);
        }
        params.subSetting = drmSetting;
        const wmSet = {
            defaultWm: 1,
            showWm: 1,
            setting: null
        };
        const wmSubSetting = {
            wmText: '',
            wmFontSize: 50,
            wmColor: '',
            wmPosition: 'diagonal'
        };
        if (!this.createProjectForm.value.showWatermark) {
            wmSet.showWm = 0;
        }
        else {
            if (this.viewOnlineSettingComponent.form.value.wmSetting === 'custom') {
                wmSet.defaultWm = 0;
                wmSubSetting.wmText = this.viewOnlineSettingComponent.form.value.wmContent;
                wmSubSetting.wmColor = this.viewOnlineSettingComponent.form.value.colorText;
                wmSubSetting.wmFontSize = this.viewOnlineSettingComponent.form.value.fontSize;
                wmSubSetting.wmPosition = this.viewOnlineSettingComponent.form.value.position;
                wmSet.setting = wmSubSetting;
            }
        }
        params.wmSettings = JSON.stringify(this.appUtil.toSnakeCaseKey(wmSet));
        // create project
        switch (this.mode) {
            case 'create':
                let addUsers = [];
                if (this.projectCollaboratorComponent
                    && this.projectCollaboratorComponent.collaborateFrm.value.userCollaborate) {
                    this.projectCollaboratorComponent.collaborateFrm.value.userCollaborate.forEach(item => {
                        addUsers = [...addUsers, {
                                user_id: item.id,
                                role_id: this.projectCollaboratorComponent.collaborateFrm.value.userRole.code
                            }];
                    });
                }
                let addGroups = '';
                if (this.projectCollaboratorComponent.collaborateFrm.value
                    && this.projectCollaboratorComponent.collaborateFrm.value.groupCollaborate) {
                    addGroups = this.convertArrayToString(this.projectCollaboratorComponent.collaborateFrm.value.groupCollaborate);
                }
                this.projectService.addProject(this.appUtil.toSnakeCaseKey(params)).subscribe(res => {
                    if (res.status === 200) {
                        if (addUsers && addUsers.length > 0 || (addUsers && addUsers.length > 0 && addGroups && addGroups.length > 0)) {
                            const paramsInviteUser = {
                                teamId: this.authService.getAuthUser.teamId,
                                users: addUsers,
                                message: this.projectCollaboratorComponent.collaborateFrm.value.message,
                                projectId: res.data.projectId
                            };
                            this.folderService.inviteUserProject(this.appUtil.toSnakeCaseKey(paramsInviteUser))
                                .subscribe(resp => {
                                var _a;
                                // fix bugs invite email & group - check override (email belong to group)
                                if (addGroups && addGroups.length > 0) {
                                    const paramsInviteGroup = {
                                        overwrite: this.projectCollaboratorComponent.collaborateFrm.value.isOverride,
                                        roleId: this.projectCollaboratorComponent.collaborateFrm.value.groupRole.code,
                                        groupNames: addGroups,
                                        message: this.projectCollaboratorComponent.collaborateFrm.value.message,
                                        projectId: res.data.projectId
                                    };
                                    this.folderService.inviteGroupProject(this.appUtil.toSnakeCaseKey(paramsInviteGroup))
                                        .subscribe(() => {
                                    });
                                }
                                if ((resp === null || resp === void 0 ? void 0 : resp.data) && ((_a = resp.data) === null || _a === void 0 ? void 0 : _a.errorUsers)) {
                                    resp.data.errorUsers.forEach(item => {
                                        this.messageService.add({
                                            severity: 'error',
                                            detail: this.appUtil.translateWithParams(this.translate, 'invite_error_users.' + item.typeError, { email: item.email })
                                        });
                                    });
                                }
                            });
                        }
                        else {
                            if (addGroups && addGroups.length > 0) {
                                const paramsInviteGroup = {
                                    overwrite: this.projectCollaboratorComponent.collaborateFrm.value.isOverride,
                                    roleId: this.projectCollaboratorComponent.collaborateFrm.value.groupRole.code,
                                    groupNames: addGroups,
                                    message: this.projectCollaboratorComponent.collaborateFrm.value.message,
                                    projectId: res.data.projectId
                                };
                                this.folderService.inviteGroupProject(this.appUtil.toSnakeCaseKey(paramsInviteGroup))
                                    .subscribe(() => {
                                });
                            }
                        }
                        this.messageService.add({
                            severity: 'success',
                            detail: this.appUtil.translate(this.translate, 'default_toast.create_success')
                        });
                        this.isSubmitting = false;
                        callback && callback();
                        this.router.navigate(['/project']);
                    }
                    else {
                        if (res.status === 403) {
                            this.messageService.add({
                                severity: 'error',
                                detail: this.appUtil.translate(this.translate, 'error.403'),
                            });
                            // load auth user
                            this.authService.getAuthInfo().subscribe(resp => {
                                if (resp.data) {
                                    if (!resp.data.useSecureDrive) {
                                        // clear user into session
                                        this.authService.deleteToken();
                                    }
                                    else {
                                        this.authService.setAuthUser(resp.data);
                                        this.router.routeReuseStrategy.shouldReuseRoute = () => false;
                                        this.router.onSameUrlNavigation = 'reload';
                                        this.router.navigate(['/project']);
                                    }
                                }
                            });
                        }
                    }
                });
                break;
            case 'detail':
                this.projectService.updateProject(this.projectSettings.projectId, this.appUtil.toSnakeCaseKey(params)).subscribe(res => {
                    if (res.status === 200) {
                        this.messageService.add({
                            severity: 'success',
                            detail: this.appUtil.translate(this.translate, 'default_toast.update_success')
                        });
                        this.isSubmitting = false;
                        callback && callback();
                    }
                });
                break;
            default:
                this.isSubmitting = false;
                break;
        }
    }
    convertArrayToString(array) {
        let str = '';
        for (let i = 0; i < array.length; i++) {
            if (i === array.length - 1) {
                str = str.concat(array[i].value);
            }
            else {
                str = str.concat(array[i].value, ',');
            }
        }
        return str;
    }
}
exports.ProjectCreateComponent = ProjectCreateComponent;
ProjectCreateComponent.ɵfac = function ProjectCreateComponent_Factory(t) { return new (t || ProjectCreateComponent)(i0.ɵɵdirectiveInject(i1.Title), i0.ɵɵdirectiveInject(i2.FormBuilder), i0.ɵɵdirectiveInject(i3.ProjectService), i0.ɵɵdirectiveInject(i4.Router), i0.ɵɵdirectiveInject(i5.MessageService), i0.ɵɵdirectiveInject(i6.AuthService), i0.ɵɵdirectiveInject(i7.FolderService), i0.ɵɵdirectiveInject(i8.CollaboratorService), i0.ɵɵdirectiveInject(i9.TranslateService), i0.ɵɵdirectiveInject(i4.ActivatedRoute)); };
ProjectCreateComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ProjectCreateComponent, selectors: [["app-project-create"]], viewQuery: function ProjectCreateComponent_Query(rf, ctx) { if (rf & 1) {
        i0.ɵɵviewQuery(_c0, 1);
        i0.ɵɵviewQuery(_c1, 1);
        i0.ɵɵviewQuery(_c2, 1);
        i0.ɵɵviewQuery(_c3, 1);
    } if (rf & 2) {
        let _t;
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.projectInformationComponent = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.drmSettingComponent = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.viewOnlineSettingComponent = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.projectCollaboratorComponent = _t.first);
    } }, inputs: { projectSettings: "projectSettings", disabled: "disabled", mode: "mode" }, decls: 27, vars: 30, consts: [[3, "formGroup"], [1, "page-title-lv2"], [3, "disabled", "projectInfo"], ["projectInformationComponent", ""], [1, "p-fluid", "p-formgrid", "p-grid"], [1, "p-field-checkbox", "p-col-12"], ["name", "autoApplyDrm", "binary", "true", "formControlName", "autoApplyDrm", "inputId", "auto-apply-drm", 3, "disabled", "ngModel", "ngModelChange"], ["for", "auto-apply-drm"], ["class", "p-col-12 p-pl-5 p-py-0", 4, "ngIf"], [1, "p-field-checkbox", "p-col-12", 3, "ngClass"], ["name", "showWatermark", "binary", "true", "formControlName", "showWatermark", "inputId", "show-watermark", 3, "disabled", "ngModel", "ngModelChange"], ["for", "show-watermark"], [4, "ngIf"], ["class", "p-formgrid p-grid", 4, "ngIf"], [1, "p-col-12", "p-pl-5", "p-py-0"], [3, "disabled", "drmSetting"], ["drmSettingComponent", ""], [3, "disabled", "watermarkSetting"], ["viewOnlineSettingComponent", ""], [1, "page-title"], [1, "p-col-12"], ["projectCollaboratorComponent", ""], [1, "p-formgrid", "p-grid"], [1, "p-col-12", "p-text-right"], ["pRipple", "", "type", "button", "icon", "fas fa-times", "routerLink", "/project", "styleClass", "p-button-warning p-mr-2", 3, "label"], ["pRipple", "", "pButton", "", "type", "button", "icon", "fas fa-check", 3, "label", "click"]], template: function ProjectCreateComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "form", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵtext(2);
        i0.ɵɵpipe(3, "titlecase");
        i0.ɵɵpipe(4, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelement(5, "app-project-information", 2, 3);
        i0.ɵɵelementStart(7, "div", 1);
        i0.ɵɵtext(8);
        i0.ɵɵpipe(9, "titlecase");
        i0.ɵɵpipe(10, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(11, "div", 4);
        i0.ɵɵelementStart(12, "div", 5);
        i0.ɵɵelementStart(13, "p-checkbox", 6);
        i0.ɵɵlistener("ngModelChange", function ProjectCreateComponent_Template_p_checkbox_ngModelChange_13_listener($event) { return ctx.createProjectModel.autoApplyDrm = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(14, "label", 7);
        i0.ɵɵtext(15);
        i0.ɵɵpipe(16, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(17, ProjectCreateComponent_div_17_Template, 3, 2, "div", 8);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(18, "div", 4);
        i0.ɵɵelementStart(19, "div", 9);
        i0.ɵɵelementStart(20, "p-checkbox", 10);
        i0.ɵɵlistener("ngModelChange", function ProjectCreateComponent_Template_p_checkbox_ngModelChange_20_listener($event) { return ctx.createProjectModel.showWatermark = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(21, "label", 11);
        i0.ɵɵtext(22);
        i0.ɵɵpipe(23, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(24, ProjectCreateComponent_div_24_Template, 3, 2, "div", 8);
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(25, ProjectCreateComponent_div_25_Template, 9, 5, "div", 12);
        i0.ɵɵtemplate(26, ProjectCreateComponent_div_26_Template, 8, 10, "div", 13);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵproperty("formGroup", ctx.createProjectForm);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 16, i0.ɵɵpipeBind1(4, 18, "label.project_info")));
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("disabled", ctx.disabled)("projectInfo", ctx.projectSettings);
        i0.ɵɵadvance(3);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(9, 20, i0.ɵɵpipeBind1(10, 22, "label.project_settings")));
        i0.ɵɵadvance(5);
        i0.ɵɵproperty("disabled", ctx.disabled)("ngModel", ctx.createProjectModel.autoApplyDrm);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(16, 24, "label.apply_drm"), " ");
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.createProjectModel.autoApplyDrm);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(28, _c4, !ctx.createProjectModel.showWatermark));
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("disabled", ctx.disabled)("ngModel", ctx.createProjectModel.showWatermark);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(23, 26, "label.show_wm"), " ");
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.createProjectModel.showWatermark);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.mode === "create");
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.mode === "create");
    } }, directives: [i2.ɵangular_packages_forms_forms_y, i2.NgControlStatusGroup, i2.FormGroupDirective, i10.ProjectInformationComponent, i11.Checkbox, i2.NgControlStatus, i2.FormControlName, i12.NgIf, i12.NgClass, i13.DrmSettingComponent, i14.ViewOnlineSettingComponent, i15.ProjectCollaboratorComponent, i16.Button, i17.Ripple, i4.RouterLink, i16.ButtonDirective], pipes: [i12.TitleCasePipe, i9.TranslatePipe, i12.UpperCasePipe], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL3Byb2plY3QvcHJvamVjdC1jcmVhdGUvcHJvamVjdC1jcmVhdGUuY29tcG9uZW50LnNjc3MifQ== */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ProjectCreateComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-project-create',
                templateUrl: './project-create.component.html',
                styleUrls: ['./project-create.component.scss']
            }]
    }], function () { return [{ type: i1.Title }, { type: i2.FormBuilder }, { type: i3.ProjectService }, { type: i4.Router }, { type: i5.MessageService }, { type: i6.AuthService }, { type: i7.FolderService }, { type: i8.CollaboratorService }, { type: i9.TranslateService }, { type: i4.ActivatedRoute }]; }, { projectInformationComponent: [{
            type: core_1.ViewChild,
            args: ['projectInformationComponent']
        }], drmSettingComponent: [{
            type: core_1.ViewChild,
            args: ['drmSettingComponent']
        }], viewOnlineSettingComponent: [{
            type: core_1.ViewChild,
            args: ['viewOnlineSettingComponent']
        }], projectCollaboratorComponent: [{
            type: core_1.ViewChild,
            args: ['projectCollaboratorComponent']
        }], projectSettings: [{
            type: core_1.Input
        }], disabled: [{
            type: core_1.Input
        }], mode: [{
            type: core_1.Input
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/project/project-detail/project-detail.component.ts":
/*!*****************************************************************************************!*\
  !*** ./src/app/authentication-pages/project/project-detail/project-detail.component.ts ***!
  \*****************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ProjectDetailComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
/* tslint:disable */
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const app_constants_1 = tslib_1.__importStar(__webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const http_1 = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js");
const forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
const moment_1 = tslib_1.__importStar(__webpack_require__(/*! moment */ "./node_modules/moment/moment.js"));
const _ = tslib_1.__importStar(__webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js"));
const pusher_js_1 = tslib_1.__importDefault(__webpack_require__(/*! pusher-js */ "./node_modules/pusher-js/dist/web/pusher.js"));
const environment_1 = __webpack_require__(/*! ../../../../environments/environment */ "./src/environments/environment.ts");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/__ivy_ngcc__/fesm2015/platform-browser.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/project.service */ "./src/app/services/project.service.ts"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/upload.service */ "./src/app/services/upload.service.ts"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/folder.service */ "./src/app/services/folder.service.ts"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/file.service */ "./src/app/services/file.service.ts"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i10 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/label.service */ "./src/app/services/label.service.ts"));
const i11 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i12 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i13 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/trash.service */ "./src/app/services/trash.service.ts"));
const i14 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/download.service */ "./src/app/services/download.service.ts"));
const i15 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/file-translation.service */ "./src/app/services/file-translation.service.ts"));
const i16 = tslib_1.__importStar(__webpack_require__(/*! primeng/breadcrumb */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-breadcrumb.js"));
const i17 = tslib_1.__importStar(__webpack_require__(/*! primeng/dragdrop */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dragdrop.js"));
const i18 = tslib_1.__importStar(__webpack_require__(/*! primeng/toolbar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-toolbar.js"));
const i19 = tslib_1.__importStar(__webpack_require__(/*! primeng/dialog */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dialog.js"));
const i20 = tslib_1.__importStar(__webpack_require__(/*! primeng/messages */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-messages.js"));
const i21 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js"));
const i22 = tslib_1.__importStar(__webpack_require__(/*! primeng/table */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-table.js"));
const i23 = tslib_1.__importStar(__webpack_require__(/*! primeng/overlaypanel */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-overlaypanel.js"));
const i24 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
const i25 = tslib_1.__importStar(__webpack_require__(/*! primeng/ripple */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-ripple.js"));
const i26 = tslib_1.__importStar(__webpack_require__(/*! primeng/tooltip */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-tooltip.js"));
const i27 = tslib_1.__importStar(__webpack_require__(/*! ngx-file-drop */ "./node_modules/ngx-file-drop/__ivy_ngcc__/fesm2015/ngx-file-drop.js"));
const i28 = tslib_1.__importStar(__webpack_require__(/*! primeng/sidebar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-sidebar.js"));
const i29 = tslib_1.__importStar(__webpack_require__(/*! ng-circle-progress */ "./node_modules/ng-circle-progress/__ivy_ngcc__/fesm2015/ng-circle-progress.js"));
const i30 = tslib_1.__importStar(__webpack_require__(/*! primeng/fileupload */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-fileupload.js"));
const i31 = tslib_1.__importStar(__webpack_require__(/*! primeng/contextmenu */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-contextmenu.js"));
const i32 = tslib_1.__importStar(__webpack_require__(/*! primeng/tieredmenu */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-tieredmenu.js"));
const i33 = tslib_1.__importStar(__webpack_require__(/*! primeng/tag */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-tag.js"));
const i34 = tslib_1.__importStar(__webpack_require__(/*! primeng/skeleton */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-skeleton.js"));
const i35 = tslib_1.__importStar(__webpack_require__(/*! ../../label/label-list/label-list.component */ "./src/app/authentication-pages/label/label-list/label-list.component.ts"));
const i36 = tslib_1.__importStar(__webpack_require__(/*! ../../view-online/view-online-form/view-online-form.component */ "./src/app/authentication-pages/view-online/view-online-form/view-online-form.component.ts"));
const i37 = tslib_1.__importStar(__webpack_require__(/*! ../../file/file-version/file-version.component */ "./src/app/authentication-pages/file/file-version/file-version.component.ts"));
const i38 = tslib_1.__importStar(__webpack_require__(/*! ../folder-tree/folder-tree.component */ "./src/app/authentication-pages/project/folder-tree/folder-tree.component.ts"));
const i39 = tslib_1.__importStar(__webpack_require__(/*! ../../file/file-info/file-info.component */ "./src/app/authentication-pages/file/file-info/file-info.component.ts"));
const i40 = tslib_1.__importStar(__webpack_require__(/*! ../../folder/folder-info/folder-info.component */ "./src/app/authentication-pages/folder/folder-info/folder-info.component.ts"));
const i41 = tslib_1.__importStar(__webpack_require__(/*! ../../comment/comment.component */ "./src/app/authentication-pages/comment/comment.component.ts"));
const i42 = tslib_1.__importStar(__webpack_require__(/*! ../../activity/activity-detail/activity-detail.component */ "./src/app/authentication-pages/activity/activity-detail/activity-detail.component.ts"));
const i43 = tslib_1.__importStar(__webpack_require__(/*! ../../collaborator/collaborator.component */ "./src/app/authentication-pages/collaborator/collaborator.component.ts"));
const i44 = tslib_1.__importStar(__webpack_require__(/*! ../../link/link-form/link-create/link-create.component */ "./src/app/authentication-pages/link/link-form/link-create/link-create.component.ts"));
const i45 = tslib_1.__importStar(__webpack_require__(/*! ../../link/link-form/link-setting/link-setting.component */ "./src/app/authentication-pages/link/link-form/link-setting/link-setting.component.ts"));
const i46 = tslib_1.__importStar(__webpack_require__(/*! ../../drm/project-drm-setting/project-drm-setting.component */ "./src/app/authentication-pages/drm/project-drm-setting/project-drm-setting.component.ts"));
const i47 = tslib_1.__importStar(__webpack_require__(/*! ../../file/file-drm-setting/file-drm-setting.component */ "./src/app/authentication-pages/file/file-drm-setting/file-drm-setting.component.ts"));
const i48 = tslib_1.__importStar(__webpack_require__(/*! ../../file/file-translation/file-translation.component */ "./src/app/authentication-pages/file/file-translation/file-translation.component.ts"));
const _c0 = ["commentComponent"];
const _c1 = ["activityDetailComponent"];
const _c2 = ["linkCreateComponent"];
const _c3 = ["linkSettingComponent"];
const _c4 = ["projectDrmSettingComponent"];
const _c5 = ["fileTranslationComponent"];
function ProjectDetailComponent_div_11_i_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 68);
} }
function ProjectDetailComponent_div_11_i_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 69);
} }
function ProjectDetailComponent_div_11_i_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 70);
} }
function ProjectDetailComponent_div_11_i_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 70);
} }
function ProjectDetailComponent_div_11_i_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 71);
} }
function ProjectDetailComponent_div_11_i_9_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 72);
} }
function ProjectDetailComponent_div_11_i_10_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 73);
} }
function ProjectDetailComponent_div_11_i_11_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 74);
} }
function ProjectDetailComponent_div_11_i_12_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 74);
} }
function ProjectDetailComponent_div_11_i_13_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 74);
} }
function ProjectDetailComponent_div_11_i_14_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 75);
} }
function ProjectDetailComponent_div_11_i_15_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 76);
} }
function ProjectDetailComponent_div_11_i_16_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 76);
} }
function ProjectDetailComponent_div_11_i_17_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 77);
} }
function ProjectDetailComponent_div_11_div_22_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 78);
    i0.ɵɵelement(1, "circle-progress", 79);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const uploadFile_r44 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("percent", uploadFile_r44.progress);
} }
function ProjectDetailComponent_div_11_div_23_p_button_1_Template(rf, ctx) { if (rf & 1) {
    const _r67 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "p-button", 83);
    i0.ɵɵlistener("click", function ProjectDetailComponent_div_11_div_23_p_button_1_Template_p_button_click_0_listener() { i0.ɵɵrestoreView(_r67); const uploadFile_r44 = i0.ɵɵnextContext(2).$implicit; const ctx_r65 = i0.ɵɵnextContext(); return ctx_r65.onCancel(uploadFile_r44.name); });
    i0.ɵɵpipe(1, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵpropertyInterpolate("title", i0.ɵɵpipeBind1(1, 1, "label.cancel"));
} }
function ProjectDetailComponent_div_11_div_23_p_button_2_Template(rf, ctx) { if (rf & 1) {
    const _r70 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "p-button", 84);
    i0.ɵɵlistener("click", function ProjectDetailComponent_div_11_div_23_p_button_2_Template_p_button_click_0_listener() { i0.ɵɵrestoreView(_r70); const uploadFile_r44 = i0.ɵɵnextContext(2).$implicit; const ctx_r68 = i0.ɵɵnextContext(); return ctx_r68.onRetry(uploadFile_r44.name); });
    i0.ɵɵpipe(1, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵpropertyInterpolate("title", i0.ɵɵpipeBind1(1, 1, "label.retry"));
} }
function ProjectDetailComponent_div_11_div_23_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 80);
    i0.ɵɵtemplate(1, ProjectDetailComponent_div_11_div_23_p_button_1_Template, 2, 3, "p-button", 81);
    i0.ɵɵtemplate(2, ProjectDetailComponent_div_11_div_23_p_button_2_Template, 2, 3, "p-button", 82);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const uploadFile_r44 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", uploadFile_r44.isUpload);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", !uploadFile_r44.isUpload);
} }
const _c6 = function () { return { color: "red" }; };
function ProjectDetailComponent_div_11_div_24_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 80);
    i0.ɵɵelement(1, "i", 85);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const uploadFile_r44 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵstyleMap(i0.ɵɵpureFunction0(3, _c6));
    i0.ɵɵproperty("title", uploadFile_r44.failDesc);
} }
function ProjectDetailComponent_div_11_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelementStart(1, "div", 51);
    i0.ɵɵelementStart(2, "div", 52);
    i0.ɵɵelementStart(3, "div", 53);
    i0.ɵɵtemplate(4, ProjectDetailComponent_div_11_i_4_Template, 1, 0, "i", 54);
    i0.ɵɵtemplate(5, ProjectDetailComponent_div_11_i_5_Template, 1, 0, "i", 55);
    i0.ɵɵtemplate(6, ProjectDetailComponent_div_11_i_6_Template, 1, 0, "i", 56);
    i0.ɵɵtemplate(7, ProjectDetailComponent_div_11_i_7_Template, 1, 0, "i", 56);
    i0.ɵɵtemplate(8, ProjectDetailComponent_div_11_i_8_Template, 1, 0, "i", 57);
    i0.ɵɵtemplate(9, ProjectDetailComponent_div_11_i_9_Template, 1, 0, "i", 58);
    i0.ɵɵtemplate(10, ProjectDetailComponent_div_11_i_10_Template, 1, 0, "i", 59);
    i0.ɵɵtemplate(11, ProjectDetailComponent_div_11_i_11_Template, 1, 0, "i", 60);
    i0.ɵɵtemplate(12, ProjectDetailComponent_div_11_i_12_Template, 1, 0, "i", 60);
    i0.ɵɵtemplate(13, ProjectDetailComponent_div_11_i_13_Template, 1, 0, "i", 60);
    i0.ɵɵtemplate(14, ProjectDetailComponent_div_11_i_14_Template, 1, 0, "i", 61);
    i0.ɵɵtemplate(15, ProjectDetailComponent_div_11_i_15_Template, 1, 0, "i", 62);
    i0.ɵɵtemplate(16, ProjectDetailComponent_div_11_i_16_Template, 1, 0, "i", 62);
    i0.ɵɵtemplate(17, ProjectDetailComponent_div_11_i_17_Template, 1, 0, "i", 63);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(18, "span", 64);
    i0.ɵɵtext(19);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(20, "div", 65);
    i0.ɵɵtext(21);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(22, ProjectDetailComponent_div_11_div_22_Template, 2, 1, "div", 66);
    i0.ɵɵtemplate(23, ProjectDetailComponent_div_11_div_23_Template, 3, 2, "div", 67);
    i0.ɵɵtemplate(24, ProjectDetailComponent_div_11_div_24_Template, 2, 4, "div", 67);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const uploadFile_r44 = ctx.$implicit;
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("ngSwitch", uploadFile_r44.fileType);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "pdf");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "docx");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "xlsx");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "csv");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "pptx");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "mp4");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "mp3");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "jpg");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "png");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "jpeg");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "txt");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "zip");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "rar");
    i0.ɵɵadvance(2);
    i0.ɵɵpropertyInterpolate2("title", "", uploadFile_r44.fileName, "", uploadFile_r44.uploadType ? "(" + uploadFile_r44.uploadType + ")" : "", "");
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate2(" ", uploadFile_r44.fileName, "", uploadFile_r44.uploadType ? " (" + uploadFile_r44.uploadType + ")" : "", " ");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", uploadFile_r44.loaded ? ctx_r0.appUtil.convertFileSize(uploadFile_r44.loaded) : "0B", " ");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", !uploadFile_r44.isFail);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", uploadFile_r44.progress < 100);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", uploadFile_r44.progress === 100 && uploadFile_r44.isFail);
} }
function ProjectDetailComponent_ng_template_15_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "span", 86);
    i0.ɵɵpipe(1, "translate");
} if (rf & 2) {
    i0.ɵɵproperty("translate", i0.ɵɵpipeBind1(1, 1, "label.duplicate_files_message"));
} }
function ProjectDetailComponent_ng_template_21_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "th", 87);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "titlecase");
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelement(5, "p-sortIcon", 88);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(6, "th", 89);
    i0.ɵɵtext(7);
    i0.ɵɵpipe(8, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(9, "th", 90);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, i0.ɵɵpipeBind1(4, 4, "label.name")), " ");
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(8, 6, "label.size"), " ");
} }
function ProjectDetailComponent_ng_template_22_div_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const file_r73 = i0.ɵɵnextContext().$implicit;
    const ctx_r75 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", ctx_r75.appUtil.convertFileSize(file_r73.fileSize), " ");
} }
function ProjectDetailComponent_ng_template_22_div_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const file_r73 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate2(" ", file_r73.fileSize, " ", file_r73.fileSize <= 1 ? i0.ɵɵpipeBind1(2, 2, "label.item") : i0.ɵɵpipeBind1(3, 4, "label.items"), " ");
} }
function ProjectDetailComponent_ng_template_22_Template(rf, ctx) { if (rf & 1) {
    const _r80 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "td", 91);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "td", 92);
    i0.ɵɵtemplate(4, ProjectDetailComponent_ng_template_22_div_4_Template, 2, 1, "div", 16);
    i0.ɵɵtemplate(5, ProjectDetailComponent_ng_template_22_div_5_Template, 4, 6, "div", 16);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(6, "td");
    i0.ɵɵelementStart(7, "p-button", 93);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_22_Template_p_button_click_7_listener() { i0.ɵɵrestoreView(_r80); const file_r73 = ctx.$implicit; const ctx_r79 = i0.ɵɵnextContext(); return ctx_r79.onRemoveDupFile(file_r73); });
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const file_r73 = ctx.$implicit;
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", file_r73.fileName, " ");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", !file_r73.folder);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", file_r73.folder);
} }
function ProjectDetailComponent_23_ng_template_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "td", 95);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 1, "label.no_record"), " ");
} }
function ProjectDetailComponent_23_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, ProjectDetailComponent_23_ng_template_0_Template, 4, 3, "ng-template", 94);
} }
function ProjectDetailComponent_ng_template_24_Template(rf, ctx) { if (rf & 1) {
    const _r83 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 96);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_24_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r83); const ctx_r82 = i0.ɵɵnextContext(); return ctx_r82.onCancelDupFile(); });
    i0.ɵɵpipe(1, "titlecase");
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "button", 97);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_24_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r83); const ctx_r84 = i0.ɵɵnextContext(); return ctx_r84.onSuccessDupFile(); });
    i0.ɵɵpipe(4, "uppercase");
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r5 = i0.ɵɵnextContext();
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(1, 3, i0.ɵɵpipeBind1(2, 5, "label.cancel")));
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(4, 7, i0.ɵɵpipeBind1(5, 9, "button.ok")));
    i0.ɵɵproperty("disabled", !(ctx_r5.dupFiles && ctx_r5.dupFiles.length > 0));
} }
function ProjectDetailComponent_ng_template_28_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "span", 86);
    i0.ɵɵpipe(1, "translate");
} if (rf & 2) {
    i0.ɵɵproperty("translate", i0.ɵɵpipeBind1(1, 1, "label.duplicate_files_local_message"));
} }
function ProjectDetailComponent_ng_template_30_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "th", 98);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "titlecase");
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "th", 99);
    i0.ɵɵtext(6);
    i0.ɵɵpipe(7, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(8, "th", 90);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, i0.ɵɵpipeBind1(4, 4, "label.name")), " ");
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(7, 6, "label.path"), " ");
} }
function ProjectDetailComponent_ng_template_31_Template(rf, ctx) { if (rf & 1) {
    const _r87 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "td", 100);
    i0.ɵɵelementStart(2, "span", 101);
    i0.ɵɵtext(3);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "td", 100);
    i0.ɵɵelementStart(5, "span", 101);
    i0.ɵɵtext(6);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(7, "td");
    i0.ɵɵelementStart(8, "p-button", 93);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_31_Template_p_button_click_8_listener() { i0.ɵɵrestoreView(_r87); const file_r85 = ctx.$implicit; const ctx_r86 = i0.ɵɵnextContext(); return ctx_r86.onRemoveDupFileLocal(file_r85); });
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const file_r85 = ctx.$implicit;
    i0.ɵɵadvance(2);
    i0.ɵɵpropertyInterpolate("title", file_r85.name);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(file_r85.name);
    i0.ɵɵadvance(2);
    i0.ɵɵpropertyInterpolate("title", file_r85.path);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(file_r85.path);
} }
function ProjectDetailComponent_32_ng_template_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "td", 95);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 1, "label.no_record"), " ");
} }
function ProjectDetailComponent_32_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, ProjectDetailComponent_32_ng_template_0_Template, 4, 3, "ng-template", 94);
} }
function ProjectDetailComponent_ng_template_33_Template(rf, ctx) { if (rf & 1) {
    const _r90 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 102);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_33_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r90); const ctx_r89 = i0.ɵɵnextContext(); return ctx_r89.displayDupFileLocal = false; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(1, "button", 103);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_33_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r90); const ctx_r91 = i0.ɵɵnextContext(); return ctx_r91.onSuccessDupFileLocal(); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r10 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("disabled", !(ctx_r10.localDupFiles && ctx_r10.localDupFiles.length > 0));
} }
function ProjectDetailComponent_button_34_Template(rf, ctx) { if (rf & 1) {
    const _r93 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 104);
    i0.ɵɵlistener("click", function ProjectDetailComponent_button_34_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r93); i0.ɵɵnextContext(); const _r12 = i0.ɵɵreference(36); return _r12.toggle($event); });
    i0.ɵɵelement(1, "i", 105);
    i0.ɵɵelementStart(2, "span");
    i0.ɵɵtext(3);
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(5, "i", 106);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 1, "label.upload"));
} }
function ProjectDetailComponent_ng_template_37_div_18_Template(rf, ctx) { if (rf & 1) {
    const _r97 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 117);
    i0.ɵɵelementStart(1, "div", 118);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_37_div_18_Template_div_click_1_listener() { i0.ɵɵrestoreView(_r97); const ctx_r96 = i0.ɵɵnextContext(2); const _r12 = i0.ɵɵreference(36); ctx_r96.selectedCloud = { code: "dropBox" }; return ctx_r96.onChangeCloud(_r12); });
    i0.ɵɵelement(2, "img", 119);
    i0.ɵɵelementStart(3, "span");
    i0.ɵɵtext(4, "Dropbox");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "div", 118);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_37_div_18_Template_div_click_5_listener() { i0.ɵɵrestoreView(_r97); const ctx_r98 = i0.ɵɵnextContext(2); const _r12 = i0.ɵɵreference(36); ctx_r98.selectedCloud = { code: "box" }; return ctx_r98.onChangeCloud(_r12); });
    i0.ɵɵelement(6, "img", 120);
    i0.ɵɵelementStart(7, "span");
    i0.ɵɵtext(8, "Box");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} }
function ProjectDetailComponent_ng_template_37_Template(rf, ctx) { if (rf & 1) {
    const _r100 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 107);
    i0.ɵɵelementStart(1, "div", 108);
    i0.ɵɵelementStart(2, "p-fileUpload", 109, 110);
    i0.ɵɵlistener("onSelect", function ProjectDetailComponent_ng_template_37_Template_p_fileUpload_onSelect_2_listener($event) { i0.ɵɵrestoreView(_r100); const _r94 = i0.ɵɵreference(3); const ctx_r99 = i0.ɵɵnextContext(); const _r12 = i0.ɵɵreference(36); ctx_r99.onUploadFiles($event.files, _r94); return _r12.hide(); });
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "div", 108);
    i0.ɵɵelementStart(6, "label", 111);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_37_Template_label_click_6_listener() { i0.ɵɵrestoreView(_r100); i0.ɵɵnextContext(); const _r12 = i0.ɵɵreference(36); return _r12.hide(); });
    i0.ɵɵelement(7, "i", 112);
    i0.ɵɵelementStart(8, "span");
    i0.ɵɵtext(9);
    i0.ɵɵpipe(10, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(11, "div", 108);
    i0.ɵɵelementStart(12, "div", 113);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_37_Template_div_click_12_listener() { i0.ɵɵrestoreView(_r100); const ctx_r102 = i0.ɵɵnextContext(); return ctx_r102.showCloudSubmenu = !ctx_r102.showCloudSubmenu; });
    i0.ɵɵelement(13, "i", 114);
    i0.ɵɵelementStart(14, "span");
    i0.ɵɵtext(15);
    i0.ɵɵpipe(16, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(17, "i", 115);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(18, ProjectDetailComponent_ng_template_37_div_18_Template, 9, 0, "div", 116);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r13 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵpropertyInterpolate("chooseLabel", i0.ɵɵpipeBind1(4, 6, "label.upload_computer"));
    i0.ɵɵproperty("multiple", true);
    i0.ɵɵadvance(7);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(10, 8, "label.upload_folder"));
    i0.ɵɵadvance(6);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(16, 10, "label.upload_cloud"));
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngClass", ctx_r13.showCloudSubmenu ? "pi-chevron-up" : "pi-chevron-down");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r13.showCloudSubmenu);
} }
function ProjectDetailComponent_button_39_Template(rf, ctx) { if (rf & 1) {
    const _r104 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 121);
    i0.ɵɵlistener("click", function ProjectDetailComponent_button_39_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r104); const ctx_r103 = i0.ɵɵnextContext(); return ctx_r103.doShowPopupCreateFolder(); });
    i0.ɵɵpipe(1, "translate");
    i0.ɵɵelement(2, "i", 122);
    i0.ɵɵelementStart(3, "span", 123);
    i0.ɵɵtext(4);
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵproperty("pTooltip", i0.ɵɵpipeBind1(1, 2, "label.new_folder"));
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 4, "label.new_folder"));
} }
function ProjectDetailComponent_button_40_Template(rf, ctx) { if (rf & 1) {
    const _r106 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 121);
    i0.ɵɵlistener("click", function ProjectDetailComponent_button_40_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r106); const ctx_r105 = i0.ɵɵnextContext(); return ctx_r105.isShowCollaborator = true; });
    i0.ɵɵpipe(1, "translate");
    i0.ɵɵelement(2, "i", 124);
    i0.ɵɵelementStart(3, "span", 123);
    i0.ɵɵtext(4);
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵproperty("pTooltip", i0.ɵɵpipeBind1(1, 2, "label.edit_collaborators"));
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 4, "label.edit_collaborators"));
} }
function ProjectDetailComponent_ng_template_46_div_1_Template(rf, ctx) { if (rf & 1) {
    const _r112 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 128);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_46_div_1_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r112); const ctx_r111 = i0.ɵɵnextContext(2); const _r16 = i0.ɵɵreference(45); ctx_r111.getFileDeleted(); return _r16.hide(); });
    i0.ɵɵelementStart(1, "div", 129);
    i0.ɵɵelement(2, "i");
    i0.ɵɵelementStart(3, "span");
    i0.ɵɵtext(4);
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r107 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(2);
    i0.ɵɵclassMap(ctx_r107.isActive ? "fas fa-eye p-mr-2" : "fas fa-eye-slash p-mr-2");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 3, ctx_r107.isActive ? "label.show_hidden_files" : "label.hide_hidden_files"));
} }
function ProjectDetailComponent_ng_template_46_div_2_Template(rf, ctx) { if (rf & 1) {
    const _r114 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 128);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_46_div_2_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r114); const ctx_r113 = i0.ɵɵnextContext(2); const _r16 = i0.ɵɵreference(45); ctx_r113.isShowActivity = true; return _r16.hide(); });
    i0.ɵɵelementStart(1, "div", 129);
    i0.ɵɵelement(2, "i", 130);
    i0.ɵɵelementStart(3, "span");
    i0.ɵɵtext(4);
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 1, "label.show_activities_comments"));
} }
function ProjectDetailComponent_ng_template_46_div_3_Template(rf, ctx) { if (rf & 1) {
    const _r116 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 131);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_46_div_3_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r116); i0.ɵɵnextContext(2); const _r16 = i0.ɵɵreference(45); return _r16.hide(); });
    i0.ɵɵelementStart(1, "div", 129);
    i0.ɵɵelement(2, "i", 132);
    i0.ɵɵelementStart(3, "span");
    i0.ɵɵtext(4);
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r109 = i0.ɵɵnextContext(2);
    i0.ɵɵpropertyInterpolate1("routerLink", "/label/", ctx_r109.projectId, "");
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 2, "label.manage_label"));
} }
function ProjectDetailComponent_ng_template_46_div_4_Template(rf, ctx) { if (rf & 1) {
    const _r118 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 131);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_46_div_4_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r118); i0.ɵɵnextContext(2); const _r16 = i0.ɵɵreference(45); return _r16.hide(); });
    i0.ɵɵelementStart(1, "div", 129);
    i0.ɵɵelement(2, "i", 133);
    i0.ɵɵelementStart(3, "span");
    i0.ɵɵtext(4);
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r110 = i0.ɵɵnextContext(2);
    i0.ɵɵpropertyInterpolate1("routerLink", "/link/", ctx_r110.projectId, "");
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 2, "label.manage_link"));
} }
function ProjectDetailComponent_ng_template_46_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 125);
    i0.ɵɵtemplate(1, ProjectDetailComponent_ng_template_46_div_1_Template, 6, 5, "div", 126);
    i0.ɵɵtemplate(2, ProjectDetailComponent_ng_template_46_div_2_Template, 6, 3, "div", 126);
    i0.ɵɵtemplate(3, ProjectDetailComponent_ng_template_46_div_3_Template, 6, 4, "div", 127);
    i0.ɵɵtemplate(4, ProjectDetailComponent_ng_template_46_div_4_Template, 6, 4, "div", 127);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r17 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r17.userFolderRole === ctx_r17.projectRole.Owner || ctx_r17.userFolderRole === ctx_r17.projectRole.Editor || ctx_r17.userFolderRole === ctx_r17.projectRole.ViewerUploader);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r17.userFolderRole && ctx_r17.userFolderRole !== ctx_r17.projectRole.Uploader);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r17.userFolderRole === ctx_r17.projectRole.Owner || ctx_r17.userFolderRole === ctx_r17.projectRole.Editor);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r17.userFolderRole === ctx_r17.projectRole.Owner || ctx_r17.userFolderRole === ctx_r17.projectRole.Editor);
} }
function ProjectDetailComponent_ng_template_48_span_18_label_2_Template(rf, ctx) { if (rf & 1) {
    const _r132 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "label", 155);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_48_span_18_label_2_Template_label_click_0_listener($event) { i0.ɵɵrestoreView(_r132); i0.ɵɵnextContext(3); const _r20 = i0.ɵɵreference(51); return _r20.show($event); });
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "label.label"));
} }
function ProjectDetailComponent_ng_template_48_span_18_p_tag_3_Template(rf, ctx) { if (rf & 1) {
    const _r135 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "p-tag", 156);
    i0.ɵɵelementStart(1, "i", 157);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_48_span_18_p_tag_3_Template_i_click_1_listener() { i0.ɵɵrestoreView(_r135); const item_r133 = ctx.$implicit; const ctx_r134 = i0.ɵɵnextContext(3); return ctx_r134.removeFilterLabel(item_r133); });
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r133 = ctx.$implicit;
    const ctx_r130 = i0.ɵɵnextContext(3);
    i0.ɵɵstyleMap(ctx_r130.handleLabelColor(item_r133.color));
    i0.ɵɵpropertyInterpolate("title", item_r133.labelName);
    i0.ɵɵpropertyInterpolate("value", item_r133.labelName);
    i0.ɵɵproperty("rounded", true)("styleClass", !ctx_r130.appUtil.checkColorDark(item_r133.color) ? "text-dark p-max-width-100" : "p-max-width-100");
} }
function ProjectDetailComponent_ng_template_48_span_18_Template(rf, ctx) { if (rf & 1) {
    const _r137 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵelementStart(1, "i", 152);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_48_span_18_Template_i_click_1_listener($event) { i0.ɵɵrestoreView(_r137); i0.ɵɵnextContext(2); const _r20 = i0.ɵɵreference(51); return _r20.toggle($event); });
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(2, ProjectDetailComponent_ng_template_48_span_18_label_2_Template, 3, 3, "label", 153);
    i0.ɵɵtemplate(3, ProjectDetailComponent_ng_template_48_span_18_p_tag_3_Template, 2, 6, "p-tag", 154);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r122 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r122.selectedLabel.length === 0);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngForOf", ctx_r122.selectedLabel);
} }
function ProjectDetailComponent_ng_template_48_div_20_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 158);
    i0.ɵɵelementStart(1, "span");
    i0.ɵɵelement(2, "span");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} }
function ProjectDetailComponent_ng_template_48_div_21_span_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 163);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r138 = i0.ɵɵnextContext(3);
    i0.ɵɵproperty("title", ctx_r138.selectedItems[0].name);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", ctx_r138.selectedItems[0].name, " ");
} }
function ProjectDetailComponent_ng_template_48_div_21_span_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 164);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "titlecase");
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵpipe(4, "titlecase");
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r139 = i0.ɵɵnextContext(3);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate2(" ", ctx_r139.numberFolder, " ", ctx_r139.numberFolder === 1 ? i0.ɵɵpipeBind1(2, 2, i0.ɵɵpipeBind1(3, 4, "label.folder")) : i0.ɵɵpipeBind1(4, 6, i0.ɵɵpipeBind1(5, 8, "label.folders")), " ");
} }
function ProjectDetailComponent_ng_template_48_div_21_span_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 164);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "titlecase");
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵpipe(4, "titlecase");
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r140 = i0.ɵɵnextContext(3);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate2(" ", ctx_r140.numberFile, " ", ctx_r140.numberFile === 1 ? i0.ɵɵpipeBind1(2, 2, i0.ɵɵpipeBind1(3, 4, "label.file")) : i0.ɵɵpipeBind1(4, 6, i0.ɵɵpipeBind1(5, 8, "label.files")), " ");
} }
function ProjectDetailComponent_ng_template_48_div_21_span_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 164);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "titlecase");
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵpipe(4, "titlecase");
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵpipe(6, "titlecase");
    i0.ɵɵpipe(7, "translate");
    i0.ɵɵpipe(8, "titlecase");
    i0.ɵɵpipe(9, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r141 = i0.ɵɵnextContext(3);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate4(" ", ctx_r141.numberFolder, " ", ctx_r141.numberFolder === 1 ? i0.ɵɵpipeBind1(2, 4, i0.ɵɵpipeBind1(3, 6, "label.folder")) : i0.ɵɵpipeBind1(4, 8, i0.ɵɵpipeBind1(5, 10, "label.folders")), " , ", ctx_r141.numberFile, " ", ctx_r141.numberFile === 1 ? i0.ɵɵpipeBind1(6, 12, i0.ɵɵpipeBind1(7, 14, "label.file")) : i0.ɵɵpipeBind1(8, 16, i0.ɵɵpipeBind1(9, 18, "label.files")), " ");
} }
function ProjectDetailComponent_ng_template_48_div_21_Template(rf, ctx) { if (rf & 1) {
    const _r143 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelementStart(1, "span", 159);
    i0.ɵɵtemplate(2, ProjectDetailComponent_ng_template_48_div_21_span_2_Template, 2, 2, "span", 160);
    i0.ɵɵtemplate(3, ProjectDetailComponent_ng_template_48_div_21_span_3_Template, 6, 10, "span", 161);
    i0.ɵɵtemplate(4, ProjectDetailComponent_ng_template_48_div_21_span_4_Template, 6, 10, "span", 161);
    i0.ɵɵtemplate(5, ProjectDetailComponent_ng_template_48_div_21_span_5_Template, 10, 20, "span", 161);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(6, "i", 162);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_48_div_21_Template_i_click_6_listener($event) { i0.ɵɵrestoreView(_r143); i0.ɵɵnextContext(); const _r121 = i0.ɵɵreference(6); const ctx_r142 = i0.ɵɵnextContext(); return ctx_r142.getMoreOption(_r121, $event); });
    i0.ɵɵpipe(7, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r124 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r124.selectedItems.length === 1);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r124.numberFolder > 1 && ctx_r124.numberFile === 0);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r124.numberFile > 1 && ctx_r124.numberFolder === 0);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r124.numberFile > 0 && ctx_r124.numberFolder > 0);
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("title", i0.ɵɵpipeBind1(7, 6, "label.more_option"));
    i0.ɵɵproperty("ngClass", !ctx_r124.checkShowContextmenu(null) ? "p-d-none" : "");
} }
function ProjectDetailComponent_ng_template_48_ng_template_23_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "th", 165);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "titlecase");
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelement(5, "p-sortIcon", 88);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(6, "th", 166);
    i0.ɵɵtext(7);
    i0.ɵɵpipe(8, "translate");
    i0.ɵɵelement(9, "p-sortIcon", 167);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(10, "th", 168);
    i0.ɵɵtext(11);
    i0.ɵɵpipe(12, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(13, "th", 169);
    i0.ɵɵtext(14);
    i0.ɵɵpipe(15, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(16, "th", 90);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 4, i0.ɵɵpipeBind1(4, 6, "label.name")), " ");
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(8, 8, "label.date_modified"), " ");
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(12, 10, "label.permission"), " ");
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(15, 12, "label.size"), " ");
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_3_img_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "img", 185);
} if (rf & 2) {
    const file_r144 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵproperty("ngClass", file_r144.shared === 1 ? "folder-share" : "");
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_3_img_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "img", 186);
} if (rf & 2) {
    const file_r144 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵproperty("ngClass", file_r144.shared === 1 ? "folder-share" : "");
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_3_img_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "img", 187);
} if (rf & 2) {
    const file_r144 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵproperty("ngClass", file_r144.shared === 1 ? "folder-share" : "");
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_3_img_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "img", 188);
} if (rf & 2) {
    const file_r144 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵproperty("ngClass", file_r144.shared === 1 ? "folder-share" : "");
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 180);
    i0.ɵɵtemplate(1, ProjectDetailComponent_ng_template_48_ng_template_24_div_3_img_1_Template, 1, 1, "img", 181);
    i0.ɵɵtemplate(2, ProjectDetailComponent_ng_template_48_ng_template_24_div_3_img_2_Template, 1, 1, "img", 182);
    i0.ɵɵtemplate(3, ProjectDetailComponent_ng_template_48_ng_template_24_div_3_img_3_Template, 1, 1, "img", 183);
    i0.ɵɵtemplate(4, ProjectDetailComponent_ng_template_48_ng_template_24_div_3_img_4_Template, 1, 1, "img", 184);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const file_r144 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", file_r144.folderSetting.charAt(0) === "1" && file_r144.numberUser <= 1);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", file_r144.folderSetting.charAt(0) !== "1" && file_r144.numberUser <= 1);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", file_r144.folderSetting.charAt(0) === "1" && file_r144.numberUser > 1);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", file_r144.folderSetting.charAt(0) !== "1" && file_r144.numberUser > 1);
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_4_span_2_i_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 68);
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_4_span_2_i_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 69);
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_4_span_2_i_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 70);
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_4_span_2_i_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 71);
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_4_span_2_i_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 77);
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_4_span_2_i_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 77);
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_4_span_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 191);
    i0.ɵɵtemplate(1, ProjectDetailComponent_ng_template_48_ng_template_24_div_4_span_2_i_1_Template, 1, 0, "i", 54);
    i0.ɵɵtemplate(2, ProjectDetailComponent_ng_template_48_ng_template_24_div_4_span_2_i_2_Template, 1, 0, "i", 55);
    i0.ɵɵtemplate(3, ProjectDetailComponent_ng_template_48_ng_template_24_div_4_span_2_i_3_Template, 1, 0, "i", 56);
    i0.ɵɵtemplate(4, ProjectDetailComponent_ng_template_48_ng_template_24_div_4_span_2_i_4_Template, 1, 0, "i", 57);
    i0.ɵɵtemplate(5, ProjectDetailComponent_ng_template_48_ng_template_24_div_4_span_2_i_5_Template, 1, 0, "i", 192);
    i0.ɵɵtemplate(6, ProjectDetailComponent_ng_template_48_ng_template_24_div_4_span_2_i_6_Template, 1, 0, "i", 63);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const file_r144 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵproperty("ngSwitch", file_r144.fileType);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 1);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 3);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 4);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 5);
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_4_i_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 72);
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_4_i_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 73);
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_4_i_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 74);
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_4_i_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 75);
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_4_i_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 76);
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_4_i_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 77);
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 180);
    i0.ɵɵelementStart(1, "div", 189);
    i0.ɵɵtemplate(2, ProjectDetailComponent_ng_template_48_ng_template_24_div_4_span_2_Template, 7, 6, "span", 190);
    i0.ɵɵtemplate(3, ProjectDetailComponent_ng_template_48_ng_template_24_div_4_i_3_Template, 1, 0, "i", 58);
    i0.ɵɵtemplate(4, ProjectDetailComponent_ng_template_48_ng_template_24_div_4_i_4_Template, 1, 0, "i", 59);
    i0.ɵɵtemplate(5, ProjectDetailComponent_ng_template_48_ng_template_24_div_4_i_5_Template, 1, 0, "i", 60);
    i0.ɵɵtemplate(6, ProjectDetailComponent_ng_template_48_ng_template_24_div_4_i_6_Template, 1, 0, "i", 61);
    i0.ɵɵtemplate(7, ProjectDetailComponent_ng_template_48_ng_template_24_div_4_i_7_Template, 1, 0, "i", 62);
    i0.ɵɵtemplate(8, ProjectDetailComponent_ng_template_48_ng_template_24_div_4_i_8_Template, 1, 0, "i", 63);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const file_r144 = i0.ɵɵnextContext().$implicit;
    const ctx_r147 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitch", ctx_r147.appUtil.getGroupFromMimeType(file_r144));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "secure");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "video");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "audio");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "image");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "text");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "compress");
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_p_tag_9_Template(rf, ctx) { if (rf & 1) {
    const _r182 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "p-tag", 193);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_48_ng_template_24_p_tag_9_Template_p_tag_click_0_listener() { i0.ɵɵrestoreView(_r182); const file_r144 = i0.ɵɵnextContext().$implicit; const ctx_r180 = i0.ɵɵnextContext(2); return ctx_r180.doViewFileVersion(file_r144); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const file_r144 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵpropertyInterpolate("value", "V" + file_r144.version);
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_p_tag_10_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "p-tag", 194);
} if (rf & 2) {
    const item_r184 = ctx.$implicit;
    const ctx_r149 = i0.ɵɵnextContext(3);
    i0.ɵɵstyleMap(ctx_r149.handleLabelColor(item_r184.color));
    i0.ɵɵpropertyInterpolate("id", item_r184.id);
    i0.ɵɵpropertyInterpolate("title", item_r184.name);
    i0.ɵɵpropertyInterpolate("value", item_r184.name);
    i0.ɵɵproperty("rounded", true)("styleClass", !ctx_r149.appUtil.checkColorDark(item_r184.color) ? "text-dark p-max-width-100 p-mr-1 p-mb-1" : "p-max-width-100 p-mr-1 p-mb-1");
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_14_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtext(1, "--");
    i0.ɵɵelementEnd();
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_15_span_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 198);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "label.project_role.owner"));
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_15_span_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 199);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "label.project_role.editor"));
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_15_span_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 200);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "label.project_role.viewer"));
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_15_span_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 200);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "label.project_role.previewer"));
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_15_span_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 200);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "label.project_role.viewer_uploader"));
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_15_span_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 200);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "label.project_role.previewer_uploader"));
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_15_span_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 200);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "label.project_role.uploader"));
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_15_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelementStart(1, "span", 191);
    i0.ɵɵtemplate(2, ProjectDetailComponent_ng_template_48_ng_template_24_div_15_span_2_Template, 3, 3, "span", 195);
    i0.ɵɵtemplate(3, ProjectDetailComponent_ng_template_48_ng_template_24_div_15_span_3_Template, 3, 3, "span", 196);
    i0.ɵɵtemplate(4, ProjectDetailComponent_ng_template_48_ng_template_24_div_15_span_4_Template, 3, 3, "span", 197);
    i0.ɵɵtemplate(5, ProjectDetailComponent_ng_template_48_ng_template_24_div_15_span_5_Template, 3, 3, "span", 197);
    i0.ɵɵtemplate(6, ProjectDetailComponent_ng_template_48_ng_template_24_div_15_span_6_Template, 3, 3, "span", 197);
    i0.ɵɵtemplate(7, ProjectDetailComponent_ng_template_48_ng_template_24_div_15_span_7_Template, 3, 3, "span", 197);
    i0.ɵɵtemplate(8, ProjectDetailComponent_ng_template_48_ng_template_24_div_15_span_8_Template, 3, 3, "span", 197);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const file_r144 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitch", file_r144.userFolderRole);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 1);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 3);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 4);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 5);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 6);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 7);
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_17_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const file_r144 = i0.ɵɵnextContext().$implicit;
    const ctx_r152 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", ctx_r152.appUtil.convertFileSize(file_r144.fileSize), " ");
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_18_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const file_r144 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate2(" ", file_r144.fileSize, " ", file_r144.fileSize <= 1 ? i0.ɵɵpipeBind1(2, 2, "label.item") : i0.ɵɵpipeBind1(3, 4, "label.items"), " ");
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_20_i_2_Template(rf, ctx) { if (rf & 1) {
    const _r200 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "i", 204);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_48_ng_template_24_div_20_i_2_Template_i_click_0_listener() { i0.ɵɵrestoreView(_r200); const file_r144 = i0.ɵɵnextContext(2).$implicit; const ctx_r198 = i0.ɵɵnextContext(2); return ctx_r198.doViewItemsInfo("folder", file_r144); });
    i0.ɵɵpipe(1, "titlecase");
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵproperty("pTooltip", i0.ɵɵpipeBind1(1, 1, i0.ɵɵpipeBind1(2, 3, "label.settings")));
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_20_i_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 205);
    i0.ɵɵpipe(1, "titlecase");
    i0.ɵɵpipe(2, "translate");
} if (rf & 2) {
    const file_r144 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵproperty("ngClass", file_r144.isCopying && file_r144.status === 1 ? "p-pr-2" : "")("pTooltip", i0.ɵɵpipeBind1(1, 2, i0.ɵɵpipeBind1(2, 4, "label.copying")));
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_20_i_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i");
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_20_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelement(1, "i", 201);
    i0.ɵɵtemplate(2, ProjectDetailComponent_ng_template_48_ng_template_24_div_20_i_2_Template, 3, 5, "i", 202);
    i0.ɵɵtemplate(3, ProjectDetailComponent_ng_template_48_ng_template_24_div_20_i_3_Template, 3, 6, "i", 203);
    i0.ɵɵtemplate(4, ProjectDetailComponent_ng_template_48_ng_template_24_div_20_i_4_Template, 1, 0, "i", 16);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const file_r144 = i0.ɵɵnextContext().$implicit;
    const ctx_r154 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngClass", ctx_r154.userFolderRole === ctx_r154.projectRole.Uploader ? "p-pr-4" : ctx_r154.userFolderRole === ctx_r154.projectRole.Previewer || ctx_r154.userFolderRole === ctx_r154.projectRole.Viewer ? "p-pr-2" : "");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", !file_r144.isCopying && file_r144.status === 1);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", file_r144.isCopying && file_r144.status === 1);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r154.userFolderRole !== ctx_r154.projectRole.PreviewerUploader);
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_21_span_2_i_1_Template(rf, ctx) { if (rf & 1) {
    const _r218 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "i", 217);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_48_ng_template_24_div_21_span_2_i_1_Template_i_click_0_listener() { i0.ɵɵrestoreView(_r218); const file_r144 = i0.ɵɵnextContext(3).$implicit; const ctx_r216 = i0.ɵɵnextContext(2); return ctx_r216.openTranslationFile(file_r144); });
    i0.ɵɵpipe(1, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵproperty("pTooltip", i0.ɵɵpipeBind1(1, 1, "label.translate"));
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_21_span_2_i_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 218);
    i0.ɵɵpipe(1, "translate");
} if (rf & 2) {
    i0.ɵɵproperty("pTooltip", i0.ɵɵpipeBind1(1, 1, "label.translating"));
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_21_span_2_i_3_Template(rf, ctx) { if (rf & 1) {
    const _r221 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "i", 219);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_48_ng_template_24_div_21_span_2_i_3_Template_i_click_0_listener() { i0.ɵɵrestoreView(_r221); const file_r144 = i0.ɵɵnextContext(3).$implicit; const ctx_r219 = i0.ɵɵnextContext(2); return ctx_r219.onShowDrmSettings(file_r144); });
    i0.ɵɵpipe(1, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵproperty("pTooltip", i0.ɵɵpipeBind1(1, 1, "label.drm_settings"));
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_21_span_2_i_4_Template(rf, ctx) { if (rf & 1) {
    const _r224 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "i", 220);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_48_ng_template_24_div_21_span_2_i_4_Template_i_click_0_listener() { i0.ɵɵrestoreView(_r224); const file_r144 = i0.ɵɵnextContext(3).$implicit; const ctx_r222 = i0.ɵɵnextContext(2); return ctx_r222.openFileDrmSetting(file_r144); });
    i0.ɵɵpipe(1, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵproperty("pTooltip", i0.ɵɵpipeBind1(1, 1, "label.encoded"));
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_21_span_2_i_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 221);
    i0.ɵɵpipe(1, "translate");
} if (rf & 2) {
    i0.ɵɵproperty("pTooltip", i0.ɵɵpipeBind1(1, 1, "label.encoding"));
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_21_span_2_i_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 221);
    i0.ɵɵpipe(1, "translate");
} if (rf & 2) {
    i0.ɵɵproperty("pTooltip", i0.ɵɵpipeBind1(1, 1, "label.decoding"));
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_21_span_2_i_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 222);
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_21_span_2_img_8_Template(rf, ctx) { if (rf & 1) {
    const _r227 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "img", 223);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_48_ng_template_24_div_21_span_2_img_8_Template_img_click_0_listener() { i0.ɵɵrestoreView(_r227); const file_r144 = i0.ɵɵnextContext(3).$implicit; const ctx_r225 = i0.ɵɵnextContext(2); return ctx_r225.onShowDrmSettings(file_r144); });
    i0.ɵɵpipe(1, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵproperty("pTooltip", i0.ɵɵpipeBind1(1, 1, "label.err_encode"));
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_21_span_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵtemplate(1, ProjectDetailComponent_ng_template_48_ng_template_24_div_21_span_2_i_1_Template, 2, 3, "i", 211);
    i0.ɵɵtemplate(2, ProjectDetailComponent_ng_template_48_ng_template_24_div_21_span_2_i_2_Template, 2, 3, "i", 212);
    i0.ɵɵtemplate(3, ProjectDetailComponent_ng_template_48_ng_template_24_div_21_span_2_i_3_Template, 2, 3, "i", 213);
    i0.ɵɵtemplate(4, ProjectDetailComponent_ng_template_48_ng_template_24_div_21_span_2_i_4_Template, 2, 3, "i", 214);
    i0.ɵɵtemplate(5, ProjectDetailComponent_ng_template_48_ng_template_24_div_21_span_2_i_5_Template, 2, 3, "i", 215);
    i0.ɵɵtemplate(6, ProjectDetailComponent_ng_template_48_ng_template_24_div_21_span_2_i_6_Template, 2, 3, "i", 215);
    i0.ɵɵtemplate(7, ProjectDetailComponent_ng_template_48_ng_template_24_div_21_span_2_i_7_Template, 1, 0, "i", 207);
    i0.ɵɵtemplate(8, ProjectDetailComponent_ng_template_48_ng_template_24_div_21_span_2_img_8_Template, 2, 3, "img", 216);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const file_r144 = i0.ɵɵnextContext(2).$implicit;
    const ctx_r203 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r203.showTranslationIcon(file_r144));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", file_r144.fileTranslateStatus === ctx_r203.translateStatus.TRANSLATING);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", file_r144.status === 1 && file_r144.isEncrypt === 0 && (file_r144.userFileRole === ctx_r203.projectRole.Owner || file_r144.userFileRole === ctx_r203.projectRole.Editor));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", file_r144.isEncrypt === 1);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", file_r144.isEncrypt === 2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", file_r144.isEncrypt === 4);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", file_r144.isEncrypt === 2 || file_r144.isEncrypt === 4);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", file_r144.status === 1 && file_r144.isEncrypt === 3 && (file_r144.userFileRole === ctx_r203.projectRole.Owner || file_r144.userFileRole === ctx_r203.projectRole.Editor));
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_21_span_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 222);
    i0.ɵɵelement(1, "i", 224);
    i0.ɵɵelementEnd();
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_21_i_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 225);
    i0.ɵɵpipe(1, "translate");
} if (rf & 2) {
    const file_r144 = i0.ɵɵnextContext(2).$implicit;
    const ctx_r205 = i0.ɵɵnextContext(2);
    i0.ɵɵpropertyInterpolate("routerLink", ctx_r205.getURLViewTracking(file_r144));
    i0.ɵɵproperty("pTooltip", i0.ɵɵpipeBind1(1, 2, "label.file_tracking"));
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_21_i_5_Template(rf, ctx) { if (rf & 1) {
    const _r232 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "i", 226);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_48_ng_template_24_div_21_i_5_Template_i_click_0_listener() { i0.ɵɵrestoreView(_r232); const file_r144 = i0.ɵɵnextContext(2).$implicit; const ctx_r230 = i0.ɵɵnextContext(2); return ctx_r230.doViewItemsInfo("file", file_r144); });
    i0.ɵɵpipe(1, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵproperty("pTooltip", i0.ɵɵpipeBind1(1, 1, "label.file_info"));
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_21_i_6_i_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 229);
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_21_i_6_Template(rf, ctx) { if (rf & 1) {
    const _r236 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "i", 227);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_48_ng_template_24_div_21_i_6_Template_i_click_0_listener() { i0.ɵɵrestoreView(_r236); const file_r144 = i0.ɵɵnextContext(2).$implicit; const ctx_r234 = i0.ɵɵnextContext(2); return ctx_r234.onShowComment(file_r144); });
    i0.ɵɵpipe(1, "translate");
    i0.ɵɵtemplate(2, ProjectDetailComponent_ng_template_48_ng_template_24_div_21_i_6_i_2_Template, 1, 0, "i", 228);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const file_r144 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵproperty("pTooltip", i0.ɵɵpipeBind1(1, 2, "label.comments"));
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", file_r144.isComment);
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_div_21_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelementStart(1, "div", 206);
    i0.ɵɵtemplate(2, ProjectDetailComponent_ng_template_48_ng_template_24_div_21_span_2_Template, 9, 8, "span", 16);
    i0.ɵɵtemplate(3, ProjectDetailComponent_ng_template_48_ng_template_24_div_21_span_3_Template, 2, 0, "span", 207);
    i0.ɵɵtemplate(4, ProjectDetailComponent_ng_template_48_ng_template_24_div_21_i_4_Template, 2, 4, "i", 208);
    i0.ɵɵtemplate(5, ProjectDetailComponent_ng_template_48_ng_template_24_div_21_i_5_Template, 2, 3, "i", 209);
    i0.ɵɵtemplate(6, ProjectDetailComponent_ng_template_48_ng_template_24_div_21_i_6_Template, 3, 4, "i", 210);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const file_r144 = i0.ɵɵnextContext().$implicit;
    const ctx_r155 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r155.appUtil.getGroupFromMimeType(file_r144) === "secure" || file_r144.contentType === "image/jpeg" || file_r144.contentType === "image/png");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r155.appUtil.getGroupFromMimeType(file_r144) !== "secure" && file_r144.contentType !== "image/jpeg" && file_r144.contentType !== "image/png" || !file_r144.folder && (file_r144.isEncrypt === 0 || file_r144.isEncrypt === 3) && file_r144.userFileRole !== ctx_r155.projectRole.Owner && file_r144.userFileRole !== ctx_r155.projectRole.Editor);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", file_r144.status === 1 && (file_r144.userFileRole === ctx_r155.projectRole.Owner || file_r144.userFileRole === ctx_r155.projectRole.Editor || file_r144.userFileRole === ctx_r155.projectRole.ViewerUploader));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", file_r144.status === 1);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", file_r144.status === 1 && file_r144.userFileRole && file_r144.userFileRole !== ctx_r155.projectRole.Uploader);
} }
function ProjectDetailComponent_ng_template_48_ng_template_24_Template(rf, ctx) { if (rf & 1) {
    const _r240 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "tr", 170);
    i0.ɵɵlistener("dblclick", function ProjectDetailComponent_ng_template_48_ng_template_24_Template_tr_dblclick_0_listener() { i0.ɵɵrestoreView(_r240); const file_r144 = ctx.$implicit; const ctx_r239 = i0.ɵɵnextContext(2); return ctx_r239.onRowDBClick(file_r144); })("onDragStart", function ProjectDetailComponent_ng_template_48_ng_template_24_Template_tr_onDragStart_0_listener() { i0.ɵɵrestoreView(_r240); const file_r144 = ctx.$implicit; const ctx_r241 = i0.ɵɵnextContext(2); return ctx_r241.doDragItems(file_r144); })("onDrop", function ProjectDetailComponent_ng_template_48_ng_template_24_Template_tr_onDrop_0_listener() { i0.ɵɵrestoreView(_r240); const file_r144 = ctx.$implicit; const ctx_r242 = i0.ɵɵnextContext(2); return ctx_r242.doDropItems(file_r144); });
    i0.ɵɵelementStart(1, "td", 171);
    i0.ɵɵelementStart(2, "div", 172);
    i0.ɵɵtemplate(3, ProjectDetailComponent_ng_template_48_ng_template_24_div_3_Template, 5, 4, "div", 173);
    i0.ɵɵtemplate(4, ProjectDetailComponent_ng_template_48_ng_template_24_div_4_Template, 9, 7, "div", 173);
    i0.ɵɵelementStart(5, "div", 174);
    i0.ɵɵelementStart(6, "span", 175);
    i0.ɵɵtext(7);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(8, "div", 176);
    i0.ɵɵtemplate(9, ProjectDetailComponent_ng_template_48_ng_template_24_p_tag_9_Template, 1, 1, "p-tag", 177);
    i0.ɵɵtemplate(10, ProjectDetailComponent_ng_template_48_ng_template_24_p_tag_10_Template, 1, 7, "p-tag", 178);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(11, "td", 92);
    i0.ɵɵtext(12);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(13, "td", 92);
    i0.ɵɵtemplate(14, ProjectDetailComponent_ng_template_48_ng_template_24_div_14_Template, 2, 0, "div", 16);
    i0.ɵɵtemplate(15, ProjectDetailComponent_ng_template_48_ng_template_24_div_15_Template, 9, 8, "div", 16);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(16, "td", 92);
    i0.ɵɵtemplate(17, ProjectDetailComponent_ng_template_48_ng_template_24_div_17_Template, 2, 1, "div", 16);
    i0.ɵɵtemplate(18, ProjectDetailComponent_ng_template_48_ng_template_24_div_18_Template, 4, 6, "div", 16);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(19, "td", 179);
    i0.ɵɵtemplate(20, ProjectDetailComponent_ng_template_48_ng_template_24_div_20_Template, 5, 4, "div", 16);
    i0.ɵɵtemplate(21, ProjectDetailComponent_ng_template_48_ng_template_24_div_21_Template, 7, 5, "div", 16);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const file_r144 = ctx.$implicit;
    const rowIndex_r145 = ctx.rowIndex;
    const ctx_r126 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("ngClass", file_r144.status === 1 ? "" : "opacity-z5")("pContextMenuRowDisabled", file_r144.isCopying)("pContextMenuRow", file_r144)("pSelectableRowDisabled", file_r144.isCopying)("pSelectableRowIndex", rowIndex_r145)("pSelectableRow", file_r144);
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("ngIf", file_r144.folder);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", !file_r144.folder);
    i0.ɵɵadvance(2);
    i0.ɵɵpropertyInterpolate("title", file_r144.name);
    i0.ɵɵproperty("ngClass", file_r144.folder ? "project-name" : "");
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", file_r144.name, " ");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", !file_r144.folder && file_r144.totalVersion !== 1 && file_r144.version > 0 && file_r144.isEncrypt === 0);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngForOf", file_r144.labelFile);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", ctx_r126.appUtil.formatDateBasedOnDiff(ctx_r126.datePipe, file_r144.lastModifiedDate), " ");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", !file_r144.folder);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", file_r144.folder);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", !file_r144.folder);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", file_r144.folder);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", file_r144.folder);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", !file_r144.folder);
} }
function ProjectDetailComponent_ng_template_48_25_ng_template_0_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "td", 230);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 1, "label.no_record"), " ");
} }
function ProjectDetailComponent_ng_template_48_25_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, ProjectDetailComponent_ng_template_48_25_ng_template_0_Template, 4, 3, "ng-template", 94);
} }
function ProjectDetailComponent_ng_template_48_div_26_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 231);
    i0.ɵɵelementStart(1, "div", 232);
    i0.ɵɵelement(2, "div");
    i0.ɵɵelement(3, "div");
    i0.ɵɵelement(4, "div");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} }
function ProjectDetailComponent_ng_template_48_Template(rf, ctx) { if (rf & 1) {
    const _r245 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 134);
    i0.ɵɵelementStart(1, "p-contextMenu", 135, 136);
    i0.ɵɵlistener("onShow", function ProjectDetailComponent_ng_template_48_Template_p_contextMenu_onShow_1_listener() { i0.ɵɵrestoreView(_r245); const ctx_r244 = i0.ɵɵnextContext(); return ctx_r244.onShowCm(); });
    i0.ɵɵelementEnd();
    i0.ɵɵelement(3, "p-contextMenu", 137, 138);
    i0.ɵɵelement(5, "p-tieredMenu", 139, 140);
    i0.ɵɵelementStart(7, "div");
    i0.ɵɵelementStart(8, "div", 141);
    i0.ɵɵelementStart(9, "span", 142);
    i0.ɵɵelementStart(10, "span", 143);
    i0.ɵɵelement(11, "i", 11);
    i0.ɵɵelementStart(12, "input", 144);
    i0.ɵɵlistener("keyup", function ProjectDetailComponent_ng_template_48_Template_input_keyup_12_listener() { i0.ɵɵrestoreView(_r245); const ctx_r246 = i0.ɵɵnextContext(); return ctx_r246.doSearch(); })("ngModelChange", function ProjectDetailComponent_ng_template_48_Template_input_ngModelChange_12_listener($event) { i0.ɵɵrestoreView(_r245); const ctx_r247 = i0.ɵɵnextContext(); return ctx_r247.getParams.searchKey = $event; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(13, "label", 145);
    i0.ɵɵtext(14);
    i0.ɵɵpipe(15, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(16, "div", 146);
    i0.ɵɵelementStart(17, "div", 147);
    i0.ɵɵtemplate(18, ProjectDetailComponent_ng_template_48_span_18_Template, 4, 2, "span", 16);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(19, "div", 148);
    i0.ɵɵtemplate(20, ProjectDetailComponent_ng_template_48_div_20_Template, 3, 0, "div", 149);
    i0.ɵɵtemplate(21, ProjectDetailComponent_ng_template_48_div_21_Template, 8, 8, "div", 16);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(22, "p-table", 150);
    i0.ɵɵlistener("contextmenu", function ProjectDetailComponent_ng_template_48_Template_p_table_contextmenu_22_listener() { i0.ɵɵrestoreView(_r245); const _r119 = i0.ɵɵreference(2); const ctx_r248 = i0.ɵɵnextContext(); return ctx_r248.checkShowContextmenu(_r119); })("onContextMenuSelect", function ProjectDetailComponent_ng_template_48_Template_p_table_onContextMenuSelect_22_listener($event) { i0.ɵɵrestoreView(_r245); const _r119 = i0.ɵɵreference(2); const ctx_r249 = i0.ɵɵnextContext(); return ctx_r249.doCmSelect(_r119, $event); })("onLazyLoad", function ProjectDetailComponent_ng_template_48_Template_p_table_onLazyLoad_22_listener($event) { i0.ɵɵrestoreView(_r245); const ctx_r250 = i0.ɵɵnextContext(); return ctx_r250.loadFolderItems($event); })("onRowSelect", function ProjectDetailComponent_ng_template_48_Template_p_table_onRowSelect_22_listener($event) { i0.ɵɵrestoreView(_r245); const _r119 = i0.ɵɵreference(2); const ctx_r251 = i0.ɵɵnextContext(); return ctx_r251.doRowSelect(_r119, $event); })("onRowUnselect", function ProjectDetailComponent_ng_template_48_Template_p_table_onRowUnselect_22_listener($event) { i0.ɵɵrestoreView(_r245); const _r119 = i0.ɵɵreference(2); const ctx_r252 = i0.ɵɵnextContext(); return ctx_r252.doRowUnselect(_r119, $event); })("contextMenuSelectionChange", function ProjectDetailComponent_ng_template_48_Template_p_table_contextMenuSelectionChange_22_listener($event) { i0.ɵɵrestoreView(_r245); const ctx_r253 = i0.ɵɵnextContext(); return ctx_r253.selectedFile = $event; })("firstChange", function ProjectDetailComponent_ng_template_48_Template_p_table_firstChange_22_listener($event) { i0.ɵɵrestoreView(_r245); const ctx_r254 = i0.ɵɵnextContext(); return ctx_r254.first = $event; })("selectionChange", function ProjectDetailComponent_ng_template_48_Template_p_table_selectionChange_22_listener($event) { i0.ɵɵrestoreView(_r245); const ctx_r255 = i0.ɵɵnextContext(); return ctx_r255.selectedItems = $event; });
    i0.ɵɵtemplate(23, ProjectDetailComponent_ng_template_48_ng_template_23_Template, 17, 14, "ng-template", 14);
    i0.ɵɵtemplate(24, ProjectDetailComponent_ng_template_48_ng_template_24_Template, 22, 20, "ng-template", 15);
    i0.ɵɵtemplate(25, ProjectDetailComponent_ng_template_48_25_Template, 1, 0, undefined, 16);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(26, ProjectDetailComponent_ng_template_48_div_26_Template, 5, 0, "div", 151);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const _r119 = i0.ɵɵreference(2);
    const ctx_r18 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("model", ctx_r18.itemsCm);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("model", ctx_r18.itemsCm);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("model", ctx_r18.items)("popup", true);
    i0.ɵɵadvance(7);
    i0.ɵɵproperty("ngModel", ctx_r18.getParams.searchKey)("autocomplete", "off");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(15, 27, "label.search"));
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("ngIf", ctx_r18.labelProject && ctx_r18.labelProject.length > 0);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r18.selectedItems.length <= 0);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r18.selectedItems.length > 0);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("contextMenuSelection", ctx_r18.selectedFile)("first", ctx_r18.first)("selection", ctx_r18.selectedItems)("contextMenu", _r119)("lazy", true)("metaKeySelection", true)("paginator", ctx_r18.totalRecords > 0)("resetPageOnSort", true)("rowHover", true)("rowsPerPageOptions", ctx_r18.rowOptions)("rows", ctx_r18.rows)("sortField", ctx_r18.sortField)("sortOrder", ctx_r18.ascSort ? 1 : -1)("totalRecords", ctx_r18.totalRecords)("value", ctx_r18.fileInfos);
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("ngIf", !ctx_r18.loading);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r18.loading);
} }
function ProjectDetailComponent_p_skeleton_49_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "p-skeleton", 233);
} }
function ProjectDetailComponent_ng_template_52_Template(rf, ctx) { if (rf & 1) {
    const _r257 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "app-label-list", 234);
    i0.ɵɵlistener("labelIsSelected", function ProjectDetailComponent_ng_template_52_Template_app_label_list_labelIsSelected_0_listener($event) { i0.ɵɵrestoreView(_r257); const ctx_r256 = i0.ɵɵnextContext(); return ctx_r256.filterByLabel($event); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r21 = i0.ɵɵnextContext();
    i0.ɵɵproperty("labelFilter", ctx_r21.selectedLabel)("labelMode", "short");
} }
function ProjectDetailComponent_app_view_online_form_53_Template(rf, ctx) { if (rf & 1) {
    const _r259 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "app-view-online-form", 235);
    i0.ɵɵlistener("isClose", function ProjectDetailComponent_app_view_online_form_53_Template_app_view_online_form_isClose_0_listener($event) { i0.ɵɵrestoreView(_r259); const ctx_r258 = i0.ɵɵnextContext(); return ctx_r258.isCheckViewOnline = $event; });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r22 = i0.ɵɵnextContext();
    i0.ɵɵproperty("emailView", ctx_r22.authUser.mailAddress)("file", ctx_r22.fileView)("projectId", ctx_r22.projectId)("watermarkSetting", ctx_r22.currentFolder.watermarkSetting);
} }
function ProjectDetailComponent_app_file_version_55_Template(rf, ctx) { if (rf & 1) {
    const _r261 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "app-file-version", 236);
    i0.ɵɵlistener("isBrowseFile", function ProjectDetailComponent_app_file_version_55_Template_app_file_version_isBrowseFile_0_listener() { i0.ɵɵrestoreView(_r261); const ctx_r260 = i0.ɵɵnextContext(); return ctx_r260.doBrowseFiles(); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r23 = i0.ɵɵnextContext();
    i0.ɵɵproperty("file", ctx_r23.fileView)("projectId", ctx_r23.projectId)("userFolderRole", ctx_r23.permissionViewVersion);
} }
function ProjectDetailComponent_p_56_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "p");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "label.download_folder_message"), " ");
} }
function ProjectDetailComponent_form_57_div_8_small_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 244);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.require"), " ");
} }
function ProjectDetailComponent_form_57_div_8_small_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 244);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.special_chars"), " ");
} }
function ProjectDetailComponent_form_57_div_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtemplate(1, ProjectDetailComponent_form_57_div_8_small_1_Template, 3, 3, "small", 243);
    i0.ɵɵtemplate(2, ProjectDetailComponent_form_57_div_8_small_2_Template, 3, 3, "small", 243);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r262 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r262.renameFrm.controls["name"].errors == null ? null : ctx_r262.renameFrm.controls["name"].errors.required);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r262.renameFrm.controls["name"].errors == null ? null : ctx_r262.renameFrm.controls["name"].errors.pattern);
} }
function ProjectDetailComponent_form_57_Template(rf, ctx) { if (rf & 1) {
    const _r266 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "form", 237);
    i0.ɵɵelementStart(1, "div", 238);
    i0.ɵɵelementStart(2, "div", 239);
    i0.ɵɵelementStart(3, "span", 240);
    i0.ɵɵelementStart(4, "input", 241);
    i0.ɵɵlistener("ngModelChange", function ProjectDetailComponent_form_57_Template_input_ngModelChange_4_listener($event) { i0.ɵɵrestoreView(_r266); const ctx_r265 = i0.ɵɵnextContext(); return ctx_r265.renameFileName = $event; })("keyup", function ProjectDetailComponent_form_57_Template_input_keyup_4_listener($event) { i0.ɵɵrestoreView(_r266); const ctx_r267 = i0.ɵɵnextContext(); return ctx_r267.handlePressEnter($event); });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "label", 242);
    i0.ɵɵtext(6);
    i0.ɵɵpipe(7, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(8, ProjectDetailComponent_form_57_div_8_Template, 3, 2, "div", 16);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r25 = i0.ɵɵnextContext();
    i0.ɵɵproperty("formGroup", ctx_r25.renameFrm);
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("ngModel", ctx_r25.renameFileName)("ngClass", (ctx_r25.renameFrm.controls["name"].dirty || ctx_r25.renameFrm.controls["name"].touched) && ctx_r25.renameFrm.controls["name"].invalid ? "ng-dirty" : "");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(7, 5, "label.name"));
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", (ctx_r25.renameFrm.controls["name"].dirty || ctx_r25.renameFrm.controls["name"].touched) && ctx_r25.renameFrm.controls["name"].invalid);
} }
function ProjectDetailComponent_ng_template_58_button_6_Template(rf, ctx) { if (rf & 1) {
    const _r270 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 248);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_58_button_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r270); const ctx_r269 = i0.ɵɵnextContext(2); return ctx_r269.doRenameItem(); });
    i0.ɵɵpipe(1, "uppercase");
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r268 = i0.ɵɵnextContext(2);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(1, 2, i0.ɵɵpipeBind1(2, 4, "label.save")));
    i0.ɵɵproperty("disabled", ctx_r268.renameFrm.invalid);
} }
function ProjectDetailComponent_ng_template_58_Template(rf, ctx) { if (rf & 1) {
    const _r272 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 245);
    i0.ɵɵelementStart(1, "button", 246);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_58_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r272); const ctx_r271 = i0.ɵɵnextContext(); return ctx_r271.doCloseDialog(); });
    i0.ɵɵpipe(2, "titlecase");
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵpipe(4, "titlecase");
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(6, ProjectDetailComponent_ng_template_58_button_6_Template, 3, 6, "button", 247);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r26 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("label", ctx_r26.modalMode === "version" ? i0.ɵɵpipeBind1(2, 2, i0.ɵɵpipeBind1(3, 4, "label.close")) : i0.ɵɵpipeBind1(4, 6, i0.ɵɵpipeBind1(5, 8, "label.cancel")));
    i0.ɵɵadvance(5);
    i0.ɵɵproperty("ngIf", ctx_r26.modalMode === "edit");
} }
function ProjectDetailComponent_app_folder_tree_60_Template(rf, ctx) { if (rf & 1) {
    const _r274 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "app-folder-tree", 249);
    i0.ɵɵlistener("selectedFolder", function ProjectDetailComponent_app_folder_tree_60_Template_app_folder_tree_selectedFolder_0_listener($event) { i0.ɵɵrestoreView(_r274); const ctx_r273 = i0.ɵɵnextContext(); return ctx_r273.doHandleMoveCopyItem($event); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r27 = i0.ɵɵnextContext();
    i0.ɵɵproperty("projectId", ctx_r27.projectId)("selectedValues", ctx_r27.selectedItems);
} }
function ProjectDetailComponent_div_61_label_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "label");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "label.move_items_content_folder"), "");
} }
function ProjectDetailComponent_div_61_ul_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "ul");
    i0.ɵɵelementStart(1, "li");
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r279 = ctx.$implicit;
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(item_r279.name);
} }
function ProjectDetailComponent_div_61_label_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "label");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "label.move_items_content_file"), "");
} }
function ProjectDetailComponent_div_61_ul_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "ul");
    i0.ɵɵelementStart(1, "li");
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r280 = ctx.$implicit;
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(item_r280.name);
} }
function ProjectDetailComponent_div_61_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtemplate(1, ProjectDetailComponent_div_61_label_1_Template, 3, 3, "label", 16);
    i0.ɵɵtemplate(2, ProjectDetailComponent_div_61_ul_2_Template, 3, 1, "ul", 6);
    i0.ɵɵtemplate(3, ProjectDetailComponent_div_61_label_3_Template, 3, 3, "label", 16);
    i0.ɵɵtemplate(4, ProjectDetailComponent_div_61_ul_4_Template, 3, 1, "ul", 6);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r28 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r28.folderErrors.length > 0);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngForOf", ctx_r28.folderErrors);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r28.fileErrors.length > 0);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngForOf", ctx_r28.fileErrors);
} }
function ProjectDetailComponent_ng_template_62_button_6_Template(rf, ctx) { if (rf & 1) {
    const _r283 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 251);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_62_button_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r283); const ctx_r282 = i0.ɵɵnextContext(2); return ctx_r282.doMoveOrRestore(); });
    i0.ɵɵpipe(1, "uppercase");
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵpipe(3, "uppercase");
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r281 = i0.ɵɵnextContext(2);
    i0.ɵɵpropertyInterpolate("label", ctx_r281.treeMode === "copy" ? i0.ɵɵpipeBind1(1, 3, i0.ɵɵpipeBind1(2, 5, "label.copy")) : i0.ɵɵpipeBind1(3, 7, i0.ɵɵpipeBind1(4, 9, "label.move")));
    i0.ɵɵproperty("disabled", !ctx_r281.selectedFolderDest || ctx_r281.selectedFolderDest.length === 0)("icon", ctx_r281.treeMode === "copy" ? "fas fa-copy" : "fas fa-arrow-alt-circle-right");
} }
function ProjectDetailComponent_ng_template_62_Template(rf, ctx) { if (rf & 1) {
    const _r285 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 245);
    i0.ɵɵelementStart(1, "button", 246);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_62_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r285); const ctx_r284 = i0.ɵɵnextContext(); ctx_r284.isShowTree = false; return ctx_r284.showError = false; });
    i0.ɵɵpipe(2, "titlecase");
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵpipe(4, "titlecase");
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(6, ProjectDetailComponent_ng_template_62_button_6_Template, 5, 11, "button", 250);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r29 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("label", ctx_r29.showError ? i0.ɵɵpipeBind1(2, 2, i0.ɵɵpipeBind1(3, 4, "label.close")) : i0.ɵɵpipeBind1(4, 6, i0.ɵɵpipeBind1(5, 8, "label.cancel")));
    i0.ɵɵadvance(5);
    i0.ɵɵproperty("ngIf", !ctx_r29.showError);
} }
function ProjectDetailComponent_app_file_info_64_Template(rf, ctx) { if (rf & 1) {
    const _r287 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "app-file-info", 252);
    i0.ɵɵlistener("doLoadLabelFile", function ProjectDetailComponent_app_file_info_64_Template_app_file_info_doLoadLabelFile_0_listener($event) { i0.ɵɵrestoreView(_r287); const ctx_r286 = i0.ɵɵnextContext(); return ctx_r286.loadLabelFiles($event); })("doLoadAllLabels", function ProjectDetailComponent_app_file_info_64_Template_app_file_info_doLoadAllLabels_0_listener() { i0.ɵɵrestoreView(_r287); const ctx_r288 = i0.ɵɵnextContext(); return ctx_r288.loadAllLabels(); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r30 = i0.ɵɵnextContext();
    i0.ɵɵproperty("file", ctx_r30.fileViewInfo)("projectId", ctx_r30.projectId);
} }
function ProjectDetailComponent_app_folder_info_65_Template(rf, ctx) { if (rf & 1) {
    const _r290 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "app-folder-info", 253);
    i0.ɵɵlistener("updateSettingSuccess", function ProjectDetailComponent_app_folder_info_65_Template_app_folder_info_updateSettingSuccess_0_listener($event) { i0.ɵɵrestoreView(_r290); const ctx_r289 = i0.ɵɵnextContext(); return ctx_r289.handleChangeIconFolder($event); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r31 = i0.ɵɵnextContext();
    i0.ɵɵproperty("folder", ctx_r31.folderViewInfo)("projectId", ctx_r31.projectId);
} }
function ProjectDetailComponent_app_comment_66_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "app-comment", 254, 255);
} if (rf & 2) {
    const ctx_r32 = i0.ɵɵnextContext();
    i0.ɵɵproperty("projectId", ctx_r32.projectId)("userFolderRole", ctx_r32.userFolderRole);
} }
function ProjectDetailComponent_app_activity_detail_68_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "app-activity-detail", 256, 257);
} if (rf & 2) {
    const ctx_r33 = i0.ɵɵnextContext();
    i0.ɵɵproperty("projectId", ctx_r33.projectId);
} }
function ProjectDetailComponent_app_collaborator_71_Template(rf, ctx) { if (rf & 1) {
    const _r294 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "app-collaborator", 258);
    i0.ɵɵlistener("cancel", function ProjectDetailComponent_app_collaborator_71_Template_app_collaborator_cancel_0_listener($event) { i0.ɵɵrestoreView(_r294); const ctx_r293 = i0.ɵɵnextContext(); return ctx_r293.onCancelCollaborator($event); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r34 = i0.ɵɵnextContext();
    i0.ɵɵproperty("folderId", ctx_r34.folderId)("projectId", ctx_r34.projectId);
} }
function ProjectDetailComponent_app_link_create_74_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "app-link-create", 259, 260);
} if (rf & 2) {
    const ctx_r35 = i0.ɵɵnextContext();
    i0.ɵɵproperty("name", ctx_r35.getShareName())("projectId", ctx_r35.projectId)("folderId", ctx_r35.getFolderIdShare())("fileId", ctx_r35.getFileIdShare())("typeShare", ctx_r35.typeShare);
} }
function ProjectDetailComponent_ng_template_75_Template(rf, ctx) { if (rf & 1) {
    const _r297 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 245);
    i0.ɵɵelementStart(1, "button", 261);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_75_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r297); const ctx_r296 = i0.ɵɵnextContext(); return ctx_r296.displayShareModal = false; });
    i0.ɵɵpipe(2, "titlecase");
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "button", 262);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_75_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r297); const ctx_r298 = i0.ɵɵnextContext(); return ctx_r298.doCreateLink(); });
    i0.ɵɵpipe(5, "uppercase");
    i0.ɵɵpipe(6, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(2, 2, i0.ɵɵpipeBind1(3, 4, "label.cancel")));
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(5, 6, i0.ɵɵpipeBind1(6, 8, "label.create_link")));
} }
function ProjectDetailComponent_app_link_setting_79_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "app-link-setting", 263, 264);
} if (rf & 2) {
    const ctx_r37 = i0.ɵɵnextContext();
    i0.ɵɵproperty("linkData", ctx_r37.linkData)("projectId", ctx_r37.projectId)("isPublicView", ctx_r37.isCreatePublicView);
} }
function ProjectDetailComponent_ng_template_80_Template(rf, ctx) { if (rf & 1) {
    const _r301 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 245);
    i0.ɵɵelementStart(1, "button", 265);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_80_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r301); const ctx_r300 = i0.ɵɵnextContext(); return ctx_r300.deleteLink(); });
    i0.ɵɵpipe(2, "titlecase");
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "button", 266);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_80_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r301); const ctx_r302 = i0.ɵɵnextContext(); return ctx_r302.doRegisterLicense(); });
    i0.ɵɵpipe(5, "uppercase");
    i0.ɵɵpipe(6, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(2, 2, i0.ɵɵpipeBind1(3, 4, "button.delete")));
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(5, 6, i0.ɵɵpipeBind1(6, 8, "button.done")));
} }
function ProjectDetailComponent_app_project_drm_setting_83_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "app-project-drm-setting", null, 267);
} }
function ProjectDetailComponent_ng_template_84_Template(rf, ctx) { if (rf & 1) {
    const _r305 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 245);
    i0.ɵɵelementStart(1, "button", 261);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_84_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r305); const ctx_r304 = i0.ɵɵnextContext(); return ctx_r304.onCloseDrmSettings(); });
    i0.ɵɵpipe(2, "titlecase");
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "button", 268);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_84_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r305); const ctx_r306 = i0.ɵɵnextContext(); return ctx_r306.encryptDocument(); });
    i0.ɵɵpipe(5, "uppercase");
    i0.ɵɵpipe(6, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(2, 2, i0.ɵɵpipeBind1(3, 4, "label.cancel")));
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(5, 6, i0.ɵɵpipeBind1(6, 8, "button.encode")));
} }
function ProjectDetailComponent_app_file_drm_setting_86_Template(rf, ctx) { if (rf & 1) {
    const _r308 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "app-file-drm-setting", 269);
    i0.ɵɵlistener("done", function ProjectDetailComponent_app_file_drm_setting_86_Template_app_file_drm_setting_done_0_listener($event) { i0.ɵɵrestoreView(_r308); const ctx_r307 = i0.ɵɵnextContext(); return ctx_r307.onDoneFileDrmSetting($event); })("doDecode", function ProjectDetailComponent_app_file_drm_setting_86_Template_app_file_drm_setting_doDecode_0_listener($event) { i0.ɵɵrestoreView(_r308); const ctx_r309 = i0.ɵɵnextContext(); return ctx_r309.onDoDecodeFile($event); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r41 = i0.ɵɵnextContext();
    i0.ɵɵproperty("projectId", ctx_r41.projectId)("folderId", ctx_r41.selectedFolderId)("fileId", ctx_r41.selectedFileId)("file", ctx_r41.selectedFile)("projectRoleId", ctx_r41.userFolderRole);
} }
function ProjectDetailComponent_app_file_translation_89_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "app-file-translation", 270, 271);
} if (rf & 2) {
    const ctx_r42 = i0.ɵɵnextContext();
    i0.ɵɵproperty("file", ctx_r42.selectedFile);
} }
function ProjectDetailComponent_ng_template_90_Template(rf, ctx) { if (rf & 1) {
    const _r312 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 245);
    i0.ɵɵelementStart(1, "button", 261);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_90_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r312); const ctx_r311 = i0.ɵɵnextContext(); return ctx_r311.onCloseTranslationFile(); });
    i0.ɵɵpipe(2, "titlecase");
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "button", 272);
    i0.ɵɵlistener("click", function ProjectDetailComponent_ng_template_90_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r312); const ctx_r313 = i0.ɵɵnextContext(); return ctx_r313.startTranslateFile(); });
    i0.ɵɵpipe(5, "uppercase");
    i0.ɵɵpipe(6, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r43 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(2, 3, i0.ɵɵpipeBind1(3, 5, "label.cancel")));
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(5, 7, i0.ɵɵpipeBind1(6, 9, "label.translate")));
    i0.ɵɵproperty("disabled", ctx_r43.selectedFile.fileTranslateStatus === ctx_r43.translateStatus.FAIL);
} }
const _c7 = function () { return { width: "40vw", maxHeight: "21vw" }; };
const _c8 = function () { return { width: "40vw" }; };
const _c9 = function () { return { width: "250px" }; };
const _c10 = function () { return { width: "220px" }; };
const _c11 = function () { return { width: "450px", padding: 0 }; };
const _c12 = function () { return { width: "500px" }; };
const _c13 = function () { return { height: "300px" }; };
const _c14 = function () { return { width: "350px" }; };
const _c15 = function () { return { width: "50vw" }; };
const _c16 = function () { return { "960px": "75vw" }; };
class ProjectDetailComponent {
    constructor(titleService, projectService, translateService, uploadService, folderService, fileService, router, messageService, datePipe, labelService, authService, fb, confirmationService, trashService, downloadService, activatedRoute, fileTranslationService) {
        this.titleService = titleService;
        this.projectService = projectService;
        this.translateService = translateService;
        this.uploadService = uploadService;
        this.folderService = folderService;
        this.fileService = fileService;
        this.router = router;
        this.messageService = messageService;
        this.datePipe = datePipe;
        this.labelService = labelService;
        this.authService = authService;
        this.fb = fb;
        this.confirmationService = confirmationService;
        this.trashService = trashService;
        this.downloadService = downloadService;
        this.activatedRoute = activatedRoute;
        this.fileTranslationService = fileTranslationService;
        this.appUtil = app_util_1.default;
        this.appConstant = app_constants_1.default;
        this.translateStatus = app_constants_1.TranslateStatus;
        this.itemsCm = [];
        this.items = [];
        this.fileType = app_constants_1.FileType;
        this.projectRole = app_constants_1.ProjectRole;
        this.pendingRequests = [];
        this.first = 0;
        this.rows = 20;
        this.selectedItems = [];
        // set default
        this.displayView = 'list';
        this.sortField = 'modifyDate';
        this.isActive = true;
        this.showCloudSubmenu = false;
        this.displayShareModal = false;
        this.displayShareSettingModal = false;
        this.displayDrmModal = false;
        this.typeShare = 0;
        this.getParams = {
            active: true,
            folderOnly: '',
            labelIds: '',
            searchKey: '',
            start: 1,
            length: 10,
            projectId: '',
            folderId: '',
            searchGlobal: false,
            sortField: 'modifyDate',
            ascSort: false,
        };
        this.paramLabel = {
            projectId: '',
            searchKey: '',
            pageNumber: 1,
            pageSize: 9999,
            sortField: 'create_date',
            ascSort: false,
        };
        this.selectUser = [];
        this.selectedLabel = [];
        this.isCheckViewOnline = false;
        this.isShowModalDialog = false;
        // file version
        this.permissionViewVersion = 0;
        // File custom
        this.uploadFiles = [];
        this.submitting = false;
        this.isCreatePublicView = false;
        // Param identity
        this.maxQueueId = 0;
        // List title of all
        this.titles = [];
        // Duplicate File origin
        this.dupOriginFiles = [];
        // Duplicate File to search and filter
        this.dupFiles = [];
        // Duplicate File on local
        this.localDupFiles = [];
        // List folder is created by function create new folder
        this.folderList = [];
        // List file is created by function create new file
        this.pathFileList = [];
        // List full path of files
        this.fullPathList = [];
        this.isOpenBox = false;
        this.isOpenDropBox = false;
        this.DBox = {
            // Dropbox options
            options: {
                // Required. Called when a user selects an item in the Chooser.
                success: (files) => {
                    this.onUploadCloud(files, 'dropBox');
                    this.isOpenDropBox = false;
                },
                // Optional. Called when the user closes the dialog without selecting a file
                // and does not include any parameters.
                cancel: () => {
                    this.isOpenDropBox = false;
                },
                // Optional. "preview" (default) is a preview link to the document for sharing,
                // "direct" is an expiring link to download the contents of the file. For more
                // information about link types, see Link types below.
                linkType: 'direct',
                // Optional. A value of false (default) limits selection to a single file, while
                // true enables multiple file selection.
                multiselect: true,
            },
            initDropbox() {
                // @ts-ignore
                window.Dropbox.choose(this.options);
            },
        };
        this.Box = {
            // Box options
            options: {
                // Required. Called when a user selects an item in the Chooser.
                success: (files) => {
                    const uploadedFiles = [];
                    for (let i = 0; i < files.length; i++) {
                        const file = files[i];
                        if (file.size === 0) {
                            this.messageService.add({
                                severity: 'error',
                                detail: this.appUtil.translate(this.translateService, 'label.empty_document_size'),
                            });
                            continue;
                        }
                        uploadedFiles.push(file);
                    }
                    if (uploadedFiles.length > 0) {
                        this.onUploadCloud(uploadedFiles, 'box');
                    }
                    this.isOpenBox = false;
                },
                cancel: () => {
                    this.isOpenBox = false;
                },
                clientId: this.appConstant.BOX.CLIENT_ID,
                linkType: 'direct',
                multiselect: true,
            },
            boxSelect: null,
            initBox() {
                const thisGlobal = this;
                // Box integration
                if (this.boxSelect === null) {
                    // @ts-ignore
                    this.boxSelect = new BoxSelect(this.option);
                    this.boxSelect.success((files) => {
                        thisGlobal.options.success(files);
                    });
                    this.boxSelect.cancel(() => {
                        thisGlobal.options.cancel();
                    });
                }
                // Register button open Box
                this.boxSelect.launchPopup();
            },
        };
        this.renameExt = '';
        this.renameFrm = new forms_1.FormGroup({});
        this.isShowTree = false;
        this.showError = false;
        // view info info
        this.isViewItemInfo = false;
        this.infoMode = 'file';
        this.isShowCollaborator = false;
        // activity
        this.isShowActivity = false;
        this.isShowFileDrmSetting = false;
        this.isSubmitCreateLink = false;
        this.isSubmitShareLink = false;
        this.isSubmitEncodeFile = false;
        this.isShowTranslation = false;
        this.translateService
            .get(['page_title.project_detail'])
            .subscribe((translation) => {
            this.titleService.setTitle(translation['page_title.project_detail']);
        });
    }
    ngOnInit() {
        this.projectId = this.activatedRoute.snapshot.paramMap.get('id');
        this.folderId = this.activatedRoute.snapshot.paramMap.get('folder_id');
        this.getParams.projectId = this.projectId;
        this.getParams.folderId = this.folderId;
        this.rowOptions = this.appConstant.DATA_VIEW.ROW_PER_PAGE_OPTIONS;
        this.authUser = this.authService.getAuthUser;
        this.getStoreParams();
        // watch the event of file change and load the list item again
        this.fileService.fileWatch.subscribe((res) => {
            this.doBrowseFiles();
        });
        const search = this.activatedRoute.snapshot.queryParamMap.get('query');
        if (search) {
            this.getParams.searchKey = search;
        }
        this.loading = true;
        this.appUtil
            .translateList(this.translateService, ['label.all_project', 'label.loading'], {})
            .subscribe((t) => {
            this.pathItems = [
                { label: t['label.all_project'], routerLink: ['/project'] },
                { label: t['label.loading'] },
            ];
            this.pathItemsTemp = [
                { label: t['label.all_project'], routerLink: ['/project'] },
            ];
        });
        this.projectService.getProjectSettings(this.projectId).subscribe((res) => {
            if (res.status === 200) {
                this.projectSetting = res.data;
                this.loadData();
            }
        });
        this.getTitlesInProject();
        this.uploadClouds = [
            { name: 'Drop Box', code: 'dropBox' },
            { name: 'Box', code: 'box' },
        ];
        this.initializeSocketNotification();
    }
    loadData() {
        this.appUtil
            .translateList(this.translateService, [
            'label.date_modified_asc',
            'label.date_modified_desc',
            'label.name_asc',
            'label.name_desc',
            'label.owner_asc',
            'label.owner_desc',
        ], {})
            .subscribe((res) => {
            this.sortOptions = [
                {
                    code: 'modifiedDateAsc',
                    label: res['label.date_modified_asc'],
                    ascSort: true,
                    sortField: 'modifyDate',
                },
                {
                    code: 'modifiedDateDesc',
                    label: res['label.date_modified_desc'],
                    ascSort: false,
                    sortField: 'modifyDate',
                },
                {
                    code: 'nameAsc',
                    label: res['label.name_asc'],
                    ascSort: true,
                    sortField: 'name',
                },
                {
                    code: 'nameDesc',
                    label: res['label.name_desc'],
                    ascSort: false,
                    sortField: 'name',
                },
            ];
        });
        const paramsPF = {
            projectId: this.projectId,
            folderId: this.folderId,
        };
        this.folderService
            .getFolder(this.appUtil.toSnakeCaseKey(paramsPF))
            .subscribe((data) => {
            if (data.status === 200) {
                this.paramLabel.projectId = this.projectId;
                this.loadAllLabels();
                this.currentFolder = data.data.folder;
                this.userFolderRole = data.data.userFolderRole;
                console.log('userFolderRole', this.userFolderRole);
                this.folderService
                    .getPath(this.appUtil.toSnakeCaseKey(paramsPF))
                    .subscribe((res) => {
                    var _a;
                    if (res.status === 200) {
                        const path = res.data;
                        if (this.currentFolder.parentFolderId) {
                            this.getProjectLink();
                        }
                        if (this.folderId !== '0' && path.length !== 0) {
                            for (const item of path) {
                                this.pathItemsTemp = [
                                    ...this.pathItemsTemp,
                                    {
                                        id: item.folderId,
                                        label: item.name,
                                        routerLink: [
                                            '/project/' + this.projectId + '/' + item.folderId,
                                        ],
                                        command: () => {
                                            const currentUrl = '/project/' + this.projectId + '/' + item.folderId;
                                            this.router.routeReuseStrategy.shouldReuseRoute =
                                                () => false;
                                            this.router.onSameUrlNavigation = 'reload';
                                            this.router.navigate([currentUrl]);
                                        },
                                    },
                                ];
                            }
                        }
                        this.pathItemsTemp = [
                            ...this.pathItemsTemp,
                            {
                                label: this.currentFolder.name,
                                styleClass: 'p-text-color-surface-500',
                                command: () => { },
                            },
                        ];
                        this.pathItems = this.pathItemsTemp;
                    }
                    else {
                        if (res.status === 403) {
                            this.getProjectLink();
                            this.pathItemsTemp = [
                                ...this.pathItemsTemp,
                                {
                                    label: (_a = this.currentFolder) === null || _a === void 0 ? void 0 : _a.name,
                                    styleClass: 'p-text-color-surface-500',
                                    command: () => { },
                                },
                            ];
                            this.pathItems = this.pathItemsTemp;
                        }
                    }
                    this.pathEmpty = res.status === 403;
                });
            }
            else if (data.status === 602) {
                this.router.navigate(['/project']);
            }
            else {
                this.pathItemsTemp = [
                    ...this.pathItemsTemp,
                    {
                        label: this.projectSetting.name,
                        styleClass: 'p-text-color-surface-500',
                        command: () => { },
                    },
                ];
                this.pathItems = this.pathItemsTemp;
            }
        });
        this.doBrowseFiles();
    }
    loadAllLabels() {
        this.labelService
            .getLabelList(this.appUtil.toSnakeCaseKey(this.paramLabel))
            .subscribe((res) => {
            this.labelProject = res.data.content;
        });
    }
    getProjectLink() {
        this.pathItemsTemp = [
            ...this.pathItemsTemp,
            {
                label: this.projectSetting.name,
                id: 'root',
                routerLink: ['/project/' + this.projectId + '/0'],
                command: () => {
                    const currentUrl = '/project/' + this.projectId + '/0';
                    this.router.routeReuseStrategy.shouldReuseRoute = () => false;
                    this.router.onSameUrlNavigation = 'reload';
                    this.router.navigate([currentUrl]);
                },
            },
        ];
    }
    doChangePageProject(event) {
        this.getParams.start = event.first + 1;
        this.getParams.length = event.rows;
        this.doBrowseFiles();
    }
    loadFolderItems(event) {
        this.selectedItems = [];
        this.getParams.start = event.first + 1;
        this.getParams.length = event.rows;
        this.getParams.ascSort = event.sortOrder === 1;
        if (event.sortField) {
            this.getParams.sortField = event.sortField;
        }
        this.doBrowseFiles();
    }
    doBrowseFiles() {
        if (this.pendingRequest) {
            this.pendingRequest.unsubscribe();
        }
        this.loading = true;
        this.pendingRequest = this.folderService
            .doBrowseItems(this.appUtil.toSnakeCaseKey(this.getParams))
            .subscribe((res) => {
            var _a;
            if (res.status === 200) {
                this.setStoreParams();
                this.loading = false;
                // this.currentFolder = res.data.currentFolder;
                this.fileInfos = res.data.fileInfo;
                this.getRelatedFolderInfo();
                this.getRelatedFileInfo();
                this.totalRecords = res.data.totalResult;
                const encodingFiles = _.filter(this.fileInfos, (f) => {
                    // check if the item is file and File types are encodable [ pdf, docx, xlsx, pptx ] and is encoding
                    return (!f.folder &&
                        [1, 2, 3, 4].includes(f.fileType) &&
                        f.isEncrypt === 2);
                });
                const translatingFiles = _.filter(this.fileInfos, (f) => {
                    // check if the item is file and File types are translatable [ pdf, docx, xlsx, pptx] and is translating
                    return (!f.folder &&
                        [1, 2, 3, 4].includes(f.fileType) &&
                        f.fileTranslateStatus === app_constants_1.TranslateStatus.TRANSLATING);
                });
                if (encodingFiles.length > 0) {
                    this.processCheckEncodeStatus(encodingFiles.map((file) => file.id));
                }
                if (translatingFiles.length > 0) {
                    this.processCheckTranslateStatus(translatingFiles.map((file) => file.id), translatingFiles[0].parentFolderId);
                }
                let listHighlightId = [];
                const highlight = this.activatedRoute.snapshot.queryParamMap.get('highlight');
                if (highlight) {
                    listHighlightId = highlight.split(',');
                }
                const comment = this.activatedRoute.snapshot.queryParamMap.get('comment');
                if (comment && this.userFolderRole !== this.projectRole.Uploader) {
                    this.onShowComment((_a = this.fileInfos[this.fileInfos.findIndex((f) => f.id === comment)]) !== null && _a !== void 0 ? _a : null);
                }
                this.fileInfos.forEach((result) => {
                    // check project is copying
                    result.isEncoding = result.status === 3;
                    // handle selected items
                    if (this.selectedItems.length > 0) {
                        for (let i = 0; i < this.selectedItems.length; i++) {
                            if (result.id === this.selectedItems[i].id) {
                                this.selectedItems[i] = result;
                                result.selected = true;
                                break;
                            }
                        }
                        listHighlightId.forEach((id) => {
                            if (this.selectedItems.findIndex((s) => s.id === id) === -1 &&
                                id === result.id) {
                                result.selected = true;
                                this.selectedItems = [...this.selectedItems, result];
                            }
                        });
                    }
                    else {
                        // handle highlight items
                        if (listHighlightId.length !== 0) {
                            listHighlightId.forEach((id) => {
                                if (id === result.id) {
                                    result.selected = true;
                                    this.selectedItems = [...this.selectedItems, result];
                                }
                            });
                        }
                    }
                });
            }
            else {
                if (res.status === 403) {
                    this.messageService.add({
                        severity: 'error',
                        detail: this.appUtil.translate(this.translateService, 'error.403'),
                    });
                    this.router.navigate(['/project']);
                }
                if (res.status === 600) {
                    this.router.navigate(['/project']);
                }
            }
        });
    }
    getRelatedFolderInfo() {
        const folderList = this.fileInfos.filter((item) => item.folder);
        if (folderList.length > 0) {
            const params = {
                projectId: this.projectId,
                folderIds: folderList.map((file) => file.id).join(','),
            };
            this.folderService
                .getRelatedFolderInfo(this.appUtil.toSnakeCaseKey(params))
                .subscribe((res) => {
                if (res.status === 200) {
                    res.data.map((obj) => {
                        const index = this.fileInfos.findIndex((el) => el.id === obj.folderId);
                        if (index !== -1) {
                            this.fileInfos[index].fileSize = obj.numberFile;
                            this.fileInfos[index].numberUser = obj.numberUser;
                            this.fileInfos[index].userFolderRole = obj.userFolderRole;
                        }
                    });
                }
            });
        }
    }
    getRelatedFileInfo() {
        const fileList = this.fileInfos.filter((item) => !item.folder);
        if (fileList.length > 0) {
            const params = {
                projectId: this.projectId,
                folderId: this.folderId,
                fileIds: fileList.map((file) => file.id).join(','),
            };
            this.fileService
                .getRelatedFileInfo(this.appUtil.toSnakeCaseKey(params))
                .subscribe((res) => {
                if (res.status === 200) {
                    res.data.map((obj) => {
                        const index = this.fileInfos.findIndex((el) => el.id === obj.fileId);
                        if (index !== -1) {
                            this.fileInfos[index].parentFolderId = obj.parentFolderId;
                            this.fileInfos[index].version = obj.version;
                            this.fileInfos[index].totalVersion = obj.totalVersion;
                            this.fileInfos[index].userFileRole = obj.userFileRole;
                            if (this.fileInfos[index].status === 1) {
                                this.loadLabelFiles(this.fileInfos[index]);
                            }
                        }
                    });
                }
            });
        }
    }
    loadLabelFiles(file) {
        const paramsLabelFile = {
            projectId: this.projectId,
            folderId: file.parentFolderId,
        };
        this.labelService
            .getListLabelFile(file.id, this.appUtil.toSnakeCaseKey(paramsLabelFile))
            .subscribe((res) => {
            if (res.status === 200) {
                file.labelFile = [];
                res.data.forEach((l) => {
                    const index = this.labelProject.findIndex((i) => i.labelId === l.labelFilePk.labelId);
                    if (index !== -1) {
                        file.labelFile = [
                            ...file.labelFile,
                            {
                                id: this.labelProject[index].labelId,
                                color: this.labelProject[index].color,
                                name: this.labelProject[index].labelName,
                            },
                        ];
                    }
                });
                this.fileInfos[this.fileInfos.findIndex((fi) => fi.id === file.id)] =
                    file;
            }
        });
    }
    doSearch() {
        this.getParams.start = 1;
        this.first = 0;
        this.doBrowseFiles();
    }
    getStoreParams(isLoadLayout) {
        const storageDisplayView = localStorage.getItem(app_constants_1.default.SORT_PAGE.DISPLAY_VIEW);
        if (storageDisplayView) {
            this.displayView = storageDisplayView;
        }
        else {
            this.displayView = 'list';
        }
        const storageProjectPaging = app_util_1.default.toCamelCaseKey(JSON.parse(localStorage.getItem(app_constants_1.default.SORT_PAGE.PROJECT_DETAIL)));
        if (storageProjectPaging) {
            this.first = isLoadLayout ? storageProjectPaging.start - 1 : 0;
            this.rows = storageProjectPaging.length;
            this.sortField = storageProjectPaging.sortField;
            this.ascSort = storageProjectPaging.ascSort;
            this.getParams.length = storageProjectPaging.length;
            this.getParams.sortField = storageProjectPaging.sortField;
            this.getParams.ascSort = storageProjectPaging.ascSort;
        }
        else {
            this.first = 0;
            this.rows = 20;
            this.sortField = 'modifyDate';
            this.ascSort = false;
        }
    }
    setStoreParams() {
        const storeParams = {
            start: this.getParams.start,
            length: this.getParams.length,
            sortField: this.getParams.sortField,
            ascSort: this.getParams.ascSort,
        };
        localStorage.setItem(app_constants_1.default.SORT_PAGE.PROJECT_DETAIL, JSON.stringify(storeParams));
    }
    onShowCm() {
        this.toggleShowMenu();
    }
    toggleShowMenu() {
        const current = this;
        if (this.selectedItems) {
            if (this.selectedItems.findIndex((s) => !s.folder && s.fileTranslateStatus === app_constants_1.TranslateStatus.TRANSLATING) !== -1) {
                this.messageService.add({
                    severity: 'warn',
                    detail: this.appUtil.translate(this.translateService, 'label.file_is_translating'),
                });
                return;
            }
            if (this.selectedItems.findIndex((s) => !s.folder && s.isEncrypt === 2) !==
                -1) {
                this.messageService.add({
                    severity: 'warn',
                    detail: this.appUtil.translate(this.translateService, 'label.file_is_encoding'),
                });
                return;
            }
            this.appUtil
                .translateList(this.translateService, [
                'label.file_info',
                'label.file_tracking',
                'label.set_drm',
                'label.view_drm',
                'label.download',
                'label.download_as_zip',
                'label.view_online',
                'label.rename',
                'label.move',
                'label.remove',
                'label.remove_forever',
                'label.restore',
                'label.copy',
                'label.share',
                'label.translate',
            ], {})
                .subscribe((res) => {
                this.itemsCm = this.items = [
                    {
                        label: res['label.file_info'],
                        icon: 'fas fa-info-circle',
                        styleClass: this.displayView === 'grid' &&
                            this.selectedItems.length === 1 &&
                            !this.selectedItems[0].folder &&
                            this.selectedItems[0].status === 1 &&
                            this.selectedItems[0].userFileRole !== this.projectRole.Uploader
                            ? ''
                            : 'p-d-none',
                        command: showUnSupportMessage,
                    },
                    {
                        label: res['label.file_tracking'],
                        icon: 'fas fa-chart-bar',
                        styleClass: this.displayView === 'grid' &&
                            this.selectedItems.length === 1 &&
                            !this.selectedItems[0].folder &&
                            this.selectedItems[0].status === 1 &&
                            (this.selectedItems[0].userFileRole ===
                                this.projectRole.Owner ||
                                this.selectedItems[0].userFileRole ===
                                    this.projectRole.Editor ||
                                this.selectedItems[0].userFileRole ===
                                    this.projectRole.ViewerUploader)
                            ? ''
                            : 'p-d-none',
                        routerLink: this.getURLViewTracking(this.selectedItems[0]),
                        command: () => { },
                    },
                    {
                        label: res['label.set_drm'],
                        icon: 'fas fa-shield-alt text-primary',
                        styleClass: this.selectedItems.length === 1 &&
                            !this.selectedItems[0].folder &&
                            this.selectedItems[0].status === 1 &&
                            (this.selectedItems[0].userFileRole ===
                                this.projectRole.Owner ||
                                this.selectedItems[0].userFileRole ===
                                    this.projectRole.Editor) &&
                            (this.selectedItems[0].fileType !== 5 ||
                                (this.selectedItems[0].fileType === 5 &&
                                    this.checkAllowExtension(this.selectedItems[0].name))) &&
                            this.selectedItems[0].isEncrypt !== 1
                            ? ''
                            : 'p-d-none',
                        command: () => {
                            this.onShowDrmSettings(this.selectedItems[0]);
                        },
                    },
                    {
                        label: res['label.view_drm'],
                        icon: 'fas fa-lock',
                        styleClass: this.selectedItems.length === 1 &&
                            this.selectedItems[0].userFileRole !==
                                this.projectRole.Uploader &&
                            this.selectedItems[0].fileType !== 5 &&
                            !this.selectedItems[0].folder &&
                            this.selectedItems[0].status === 1 &&
                            this.selectedItems[0].isEncrypt === 1
                            ? ''
                            : 'p-d-none',
                        command: () => {
                            this.openFileDrmSetting(this.selectedItems[0]);
                        },
                    },
                    {
                        label: res['label.translate'],
                        icon: 'fas fa-language',
                        styleClass: this.selectedItems.length === 1 &&
                            !this.selectedItems[0].folder &&
                            this.selectedItems[0].status === 1 &&
                            (this.selectedItems[0].userFileRole ===
                                this.projectRole.Owner ||
                                this.selectedItems[0].userFileRole ===
                                    this.projectRole.Editor) &&
                            this.selectedItems[0].fileType !== 5 &&
                            this.authUser.useGoogleTranslate
                            ? ''
                            : 'p-d-none',
                        command: () => {
                            // show popup translate
                            this.openTranslationFile(this.selectedItems[0]);
                        },
                    },
                    {
                        label: res['label.download'],
                        icon: 'fas fa-download',
                        styleClass: this.selectedItems.findIndex((s) => s.folder ||
                            s.status !== 1 ||
                            (s.userFileRole !== this.projectRole.Owner &&
                                s.userFileRole !== this.projectRole.Editor &&
                                s.userFileRole !== this.projectRole.Viewer &&
                                s.userFileRole !== this.projectRole.ViewerUploader)) !== -1
                            ? 'p-d-none'
                            : '',
                        command: () => {
                            this.doDownloadFiles();
                        },
                    },
                    {
                        label: res['label.download_as_zip'],
                        icon: 'fas fa-download',
                        styleClass: this.selectedItems.length !== 1 ||
                            this.selectedItems[0].status !== 1 ||
                            !this.selectedItems[0].folder ||
                            (this.selectedItems[0].userFolderRole !==
                                this.projectRole.Owner &&
                                this.selectedItems[0].userFolderRole !==
                                    this.projectRole.Editor &&
                                this.selectedItems[0].userFolderRole !==
                                    this.projectRole.Viewer &&
                                this.selectedItems[0].userFolderRole !==
                                    this.projectRole.ViewerUploader)
                            ? 'p-d-none'
                            : '',
                        command: () => {
                            this.doZipFolder();
                        },
                    },
                    {
                        label: res['label.view_online'],
                        icon: 'fas fa-eye',
                        styleClass: this.selectedItems.length !== 1 ||
                            this.selectedItems[0].status !== 1 ||
                            this.selectedItems[0].folder ||
                            this.selectedItems[0].userFileRole === this.projectRole.Uploader
                            ? 'p-d-none'
                            : '',
                        command: () => {
                            this.doViewFileOnline(this.selectedItems[0]);
                        },
                    },
                    {
                        label: res['label.rename'],
                        icon: 'fas fa-edit',
                        styleClass: this.selectedItems.length !== 1 ||
                            this.selectedItems[0].status !== 1 ||
                            (!this.selectedItems[0].folder &&
                                this.selectedItems[0].userFileRole !==
                                    this.projectRole.Owner &&
                                this.selectedItems[0].userFileRole !==
                                    this.projectRole.Editor &&
                                this.selectedItems[0].userFileRole !==
                                    this.projectRole.ViewerUploader) ||
                            (this.selectedItems[0].folder &&
                                this.selectedItems[0].userFolderRole !==
                                    this.projectRole.Owner &&
                                this.selectedItems[0].userFolderRole !==
                                    this.projectRole.Editor)
                            ? 'p-d-none'
                            : '',
                        command: () => {
                            this.doShowPopupRename();
                        },
                    },
                    {
                        label: res['label.move'],
                        icon: 'fas fa-arrow-alt-circle-right',
                        styleClass: this.selectedItems.findIndex((s) => s.status !== 1 ||
                            (!s.folder &&
                                s.userFileRole !== this.projectRole.Owner &&
                                s.userFileRole !== this.projectRole.Editor) ||
                            (s.folder &&
                                s.userFolderRole !== this.projectRole.Owner &&
                                s.userFolderRole !== this.projectRole.Editor)) !== -1
                            ? 'p-d-none'
                            : '',
                        command: () => {
                            this.treeMode = 'move';
                            let suffix = this.selectedItems.length === 1
                                ? this.selectedItems[0].name
                                : this.numberFolder > 1
                                    ? this.numberFolder +
                                        ' ' +
                                        this.appUtil.translate(this.translateService, 'label.folders')
                                    : this.numberFile +
                                        ' ' +
                                        this.appUtil.translate(this.translateService, 'label.files');
                            if (suffix.length > 20) {
                                suffix = suffix.substr(0, 20) + '...';
                            }
                            this.headerTree = this.appUtil.translateWithParams(this.translateService, 'label.move_items_title', {
                                file: suffix,
                            });
                            this.isShowTree = true;
                        },
                    },
                    {
                        label: res['label.remove'],
                        icon: 'fas fa-trash text-danger',
                        styleClass: this.selectedItems.findIndex((s) => s.status !== 1 ||
                            (s.folder &&
                                s.userFolderRole !== this.projectRole.Owner &&
                                s.userFolderRole !== this.projectRole.Editor) ||
                            (!s.folder &&
                                s.userFileRole !== this.projectRole.Owner &&
                                s.userFileRole !== this.projectRole.Editor &&
                                s.userFileRole !== this.projectRole.ViewerUploader)) !== -1
                            ? 'p-d-none'
                            : '',
                        command: () => {
                            this.confirmDeleteItem();
                        },
                    },
                    {
                        label: res['label.copy'],
                        icon: 'fas fa-copy',
                        styleClass: this.isContentFileProtect ||
                            this.selectedItems.findIndex((s) => s.status !== 1 ||
                                (!s.folder &&
                                    s.userFileRole !== this.projectRole.Owner &&
                                    s.userFileRole !== this.projectRole.Editor) ||
                                (s.folder &&
                                    s.userFolderRole !== this.projectRole.Owner &&
                                    s.userFolderRole !== this.projectRole.Editor)) !== -1
                            ? 'p-d-none'
                            : '',
                        command: () => {
                            this.treeMode = 'copy';
                            let suffix = this.selectedItems.length === 1
                                ? this.selectedItems[0].name
                                : this.numberFolder > 1
                                    ? this.numberFolder +
                                        ' ' +
                                        this.appUtil.translate(this.translateService, 'label.folders')
                                    : this.numberFile +
                                        ' ' +
                                        this.appUtil.translate(this.translateService, 'label.files');
                            if (suffix.length > 20) {
                                suffix = suffix.substr(0, 20) + '...';
                            }
                            this.headerTree = this.appUtil.translateWithParams(this.translateService, 'label.copy_items_title', {
                                file: suffix,
                            });
                            this.isShowTree = true;
                        },
                    },
                    {
                        label: res['label.share'],
                        icon: 'fas fa-share-alt text-primary',
                        styleClass: this.numberFolder > 1 ||
                            this.selectedItems.findIndex((s) => s.status !== 1 ||
                                (s.folder &&
                                    s.userFolderRole !== this.projectRole.Owner &&
                                    s.userFolderRole !== this.projectRole.Editor) ||
                                (!s.folder &&
                                    s.userFileRole !== this.projectRole.Owner &&
                                    s.userFileRole !== this.projectRole.Editor)) !== -1
                            ? 'p-d-none'
                            : '',
                        command: () => {
                            const indexFolder = this.selectedItems.findIndex((item) => item.folder);
                            if (this.selectedItems.length > 1 && indexFolder !== -1) {
                                return;
                            }
                            else {
                                if (this.selectedItems.length === 1) {
                                    this.typeShare = this.selectedItems[0].folder ? 2 : 3;
                                }
                                else {
                                    this.typeShare = 4;
                                }
                                this.displayShareModal = true;
                            }
                        },
                    },
                    {
                        label: res['label.restore'],
                        icon: 'fas fa-trash-restore',
                        styleClass: this.selectedItems.findIndex((s) => s.status === 1 ||
                            (s.folder &&
                                s.userFolderRole !== this.projectRole.Owner &&
                                s.userFolderRole !== this.projectRole.Editor) ||
                            (!s.folder &&
                                s.userFileRole !== this.projectRole.Owner &&
                                s.userFileRole !== this.projectRole.Editor &&
                                s.userFileRole !== this.projectRole.ViewerUploader)) !== -1
                            ? 'p-d-none'
                            : '',
                        command: () => {
                            this.doRestoreItems();
                        },
                    },
                    {
                        label: res['label.remove_forever'],
                        icon: 'fas fa-trash text-danger',
                        styleClass: this.selectedItems.findIndex((s) => s.status === 1 ||
                            (s.folder &&
                                s.userFolderRole !== this.projectRole.Owner &&
                                s.userFolderRole !== this.projectRole.Editor) ||
                            (!s.folder &&
                                s.userFileRole !== this.projectRole.Owner &&
                                s.userFileRole !== this.projectRole.Editor)) !== -1
                            ? 'p-d-none'
                            : '',
                        command: () => {
                            this.confirmDeleteForeverItems();
                        },
                    },
                ];
                function showUnSupportMessage() {
                    current.messageService.add({
                        severity: 'warn',
                        detail: 'This feature is not supported yet!',
                    });
                }
            });
        }
    }
    openCm(event, cm, product) {
        if (product.isEncoding) {
            return;
        }
        if (!this.selectedItems) {
            product.selected = true;
            this.selectedItems = [...[], product];
        }
        else {
            this.handleBeforeOpenCm(product);
        }
        event.preventDefault();
        event.stopPropagation();
        this.toggleShowMenu();
        if (this.numberFile > 0 && this.numberFolder > 0) {
            cm.hide();
        }
        else {
            cm.show(event);
        }
        return false;
    }
    toggleSelected(obj) {
        if (obj.isEncoding) {
            return;
        }
        if (obj && obj.id) {
            const index = this.selectedItems.findIndex((p) => p.id === obj.id);
            if (index > -1) {
                this.selectedItems.splice(index, 1);
                obj.selected = false;
            }
            else {
                this.selectedItems.push(obj);
                obj.selected = true;
            }
        }
    }
    clearSelected() {
        this.fileInfos.forEach((p) => {
            p.selected = false;
        });
        this.selectedItems = [];
    }
    handleCtrlClick(event, cm, item) {
        if (item.isEncoding) {
            return;
        }
        if (event.ctrlKey) {
            this.toggleSelected(item);
        }
        else {
            this.clearSelected();
            item.selected = true;
            this.selectedItems = [item];
        }
        this.handleAfterSelectItems();
    }
    doRowSelect(cm, event) {
        if (event.originalEvent.ctrlKey === true ||
            event.originalEvent.metaKey === true) {
            event.data.selected = true;
        }
        else if (event.originalEvent.shiftKey === true) {
            this.clearSelected();
            if (event.data.length && event.data.length > 1) {
                event.data.forEach((d) => {
                    d.selected = true;
                });
            }
            else {
                event.data.selected = true;
            }
        }
        else {
            this.clearSelected();
            event.data.selected = true;
        }
        this.selectedItems = [...new Set(this.selectedItems.concat(event.data))];
        this.handleAfterSelectItems();
    }
    doRowUnselect(cm, event) {
        event.data.selected = false;
        this.fileInfos.forEach((result) => {
            if (result.id === event.data.id) {
                result.selected = false;
            }
        });
        this.handleAfterSelectItems();
    }
    doCmSelect(cm, event) {
        this.handleBeforeOpenCm(event.data);
    }
    checkShowContextmenu(cm) {
        if ((this.numberFile > 0 && this.numberFolder > 0) ||
            (this.isConstantFileActive && this.isConstantFileDelete) ||
            this.selectedItems.findIndex((s) => !s.folder && s.userFileRole === this.projectRole.Uploader) !== -1 ||
            this.selectedItems.findIndex((s) => s.folder &&
                (s.userFolderRole === this.projectRole.Uploader ||
                    s.userFolderRole === this.projectRole.Previewer ||
                    s.userFolderRole === this.projectRole.PreviewerUploader)) !== -1 ||
            // folder deleted
            this.selectedItems.findIndex((s) => s.folder &&
                s.status !== 1 &&
                s.userFolderRole !== this.projectRole.Owner &&
                s.userFolderRole !== this.projectRole.Editor) !== -1 ||
            // multiple folder active
            (this.numberFolder > 1 &&
                this.selectedItems.findIndex((s) => s.folder &&
                    s.status === 1 &&
                    s.userFolderRole !== this.projectRole.Owner &&
                    s.userFolderRole !== this.projectRole.Editor) !== -1) ||
            // multiple file
            (this.numberFile > 1 &&
                this.selectedItems.findIndex((s) => !s.folder &&
                    s.userFileRole !== this.projectRole.Owner &&
                    s.userFileRole !== this.projectRole.Editor &&
                    s.userFileRole !== this.projectRole.Viewer &&
                    s.userFileRole !== this.projectRole.ViewerUploader) !== -1) ||
            // constant encoding file
            this.selectedItems.findIndex((s) => !s.folder && s.isEncrypt === 2) !==
                -1 ||
            this.selectedItems.findIndex((s) => !s.folder && s.fileTranslateStatus === app_constants_1.TranslateStatus.TRANSLATING) !== -1) {
            if (cm !== null) {
                cm.hide();
            }
            return false;
        }
        return true;
    }
    isShowOption(file) {
        return !((file.folder &&
            (file.status !== 1 ||
                file.userFolderRole === this.projectRole.Uploader ||
                file.userFolderRole === this.projectRole.PreviewerUploader ||
                file.userFolderRole === this.projectRole.Previewer)) ||
            (!file.folder && file.userFileRole === this.projectRole.Uploader) ||
            (!file.folder && file.isEncrypt === 2));
    }
    getFileDeleted() {
        this.isActive = !this.isActive;
        this.getParams.active = this.isActive;
        this.doBrowseFiles();
    }
    handleBeforeOpenCm(product) {
        let inSelection = false;
        this.selectedItems.forEach((s) => {
            if (s.id === product.id) {
                inSelection = true;
            }
        });
        if (!inSelection) {
            this.clearSelected();
            product.selected = true;
            this.selectedItems = [...[], product];
        }
        this.handleAfterSelectItems();
    }
    handleAfterSelectItems() {
        if (this.selectedItems) {
            let numberFile = 0;
            let numberFolder = 0;
            let isContentFileProtect = false;
            this.selectedItems.forEach((i) => {
                if (i.folder) {
                    numberFolder++;
                }
                else {
                    if (i.isEncrypt === 1) {
                        isContentFileProtect = true;
                    }
                    numberFile++;
                }
            });
            this.isConstantFileActive =
                this.selectedItems.findIndex((s) => s.status === 1) !== -1;
            this.isConstantFileDelete =
                this.selectedItems.findIndex((s) => s.status !== 1) !== -1;
            this.numberFile = numberFile;
            this.numberFolder = numberFolder;
            this.isContentFileProtect = isContentFileProtect;
        }
    }
    getMoreOption(menuList, event) {
        this.toggleShowMenu();
        menuList.toggle(event);
    }
    onRowDBClick(file) {
        if (file.status !== 1) {
            // file is deleted
            return;
        }
        if (file.folder) {
            // Set next folder
            const currentUrl = '/project/' + this.projectId + '/' + file.id;
            this.router.routeReuseStrategy.shouldReuseRoute = () => false;
            this.router.onSameUrlNavigation = 'reload';
            this.router.navigate([currentUrl]);
        }
        else {
            // file
            if (file.isEncrypt === 2) {
                // file is encoding
                this.messageService.add({
                    severity: 'warn',
                    detail: this.appUtil.translate(this.translateService, 'label.file_is_encoding'),
                });
                return;
            }
            // uploader cannot view online
            if (file.userFileRole === this.projectRole.Uploader) {
                return;
            }
            const fileExt = this.appUtil.getExtension(file.name).toLowerCase();
            if (this.appConstant.VIEWER_SUPPORT_TYPE.SUPPORT_TYPES_DOC.indexOf(fileExt) === -1 &&
                this.appConstant.VIEWER_SUPPORT_TYPE.SUPPORT_TYPES_IMG.indexOf(fileExt) === -1 &&
                this.appConstant.VIEWER_SUPPORT_TYPE.SUPPORT_TYPES_PLAN_TEXT.indexOf(fileExt) === -1 &&
                this.appConstant.VIEWER_SUPPORT_TYPE.SUPPORT_AUDIO.indexOf(fileExt) ===
                    -1 &&
                this.appConstant.VIEWER_SUPPORT_TYPE.SUPPORT_VIDEO.indexOf(fileExt) ===
                    -1) {
                this.messageService.add({
                    severity: 'warn',
                    detail: this.appUtil.translate(this.translateService, 'label.not_support_view_online'),
                });
                return;
            }
            // view file info
            this.doViewFileOnline(file);
        }
    }
    handleLabelColor(color) {
        return { 'background-color': color };
    }
    filterByLabel(event) {
        this.selectedLabel = event;
        this.getParams.labelIds = this.selectedLabel
            .map((i) => i.labelId)
            .join(',');
        this.doBrowseFiles();
    }
    removeFilterLabel(label) {
        const index = this.selectedLabel.findIndex((s) => s.labelId === label.labelId);
        this.selectedLabel.splice(index, 1);
        this.getParams.labelIds = this.selectedLabel
            .map((i) => i.labelId)
            .join(',');
        this.doBrowseFiles();
    }
    getURLViewTracking(file) {
        const folderId = file.parentFolderId ? file.parentFolderId : '0';
        const suffixURL = file.isEncrypt === 1 ? '/1' : '/0';
        return ('/project/file/report/' +
            this.projectId +
            '/' +
            folderId +
            '/' +
            file.id +
            suffixURL);
    }
    doViewFileOnline(file) {
        this.fileView = file;
        this.isCheckViewOnline = true;
    }
    // Get report open files. All title. (need confirm)
    getTitlesInProject() {
        this.fileService.getTitlesInProject(this.projectId).subscribe((res) => {
            if (res.status === 200) {
                this.titles = res.data;
            }
        });
    }
    // Delete list upload files by root folderId
    deleteUploadFiles(folderId) {
        this.uploadFiles = this.uploadFiles.filter((x) => x.folderId !== folderId);
        this.folderList = this.folderList.filter((x) => x.id !== folderId);
        this.folderList.forEach((folder) => {
            if (folder.parentId === folderId) {
                this.deleteUploadFiles(folder.id);
            }
        });
    }
    // Event upload file after selected icon upload file
    onUploadFiles(files, form) {
        this.resetFileList();
        if (files.length > 0) {
            for (let i = 0; i < files.length; i++) {
                const file = files.item(i);
                if (file.size === 0) {
                    this.messageService.add({
                        severity: 'error',
                        detail: this.appUtil.translate(this.translateService, 'label.empty_document_size'),
                    });
                    continue;
                }
                // Add file in root folder
                this.pathFileList.push({
                    path: '',
                    data: files.item(i),
                    name: files.item(i).name,
                });
                this.addFileQueue(this.pathFileList.find((x) => x.name === files.item(i).name), this.folderId);
            }
            form.clear();
        }
    }
    // Event upload folder after selected icon upload folder
    onUploadFolder(event) {
        this.resetFileList();
        this.resetDupList();
        const files = event.target.files;
        if (files.length > 0) {
            // Convert to array paths
            for (const file of files) {
                this.fullPathList.push(file.webkitRelativePath);
                this.pathFileList.push({
                    path: file.webkitRelativePath,
                    data: file,
                    name: file.name,
                });
                this.checkLocalDupFiles(file.name);
            }
            this.showLocalDupFiles();
        }
        document.getElementById('file-input').value = null;
    }
    // Event check exist is duplicate file on local
    checkLocalDupFiles(name) {
        const localDupFiles = this.pathFileList.filter((x) => x.name === name);
        if (localDupFiles.length > 1) {
            // Add localDupFiles and remove localDupFiles in this.pathFileList
            localDupFiles.forEach((dupFile) => {
                dupFile.isDupLocal = true;
            });
            // add local dup files to list
            this.localDupFiles = this.pathFileList.filter((x) => x.isDupLocal);
        }
    }
    // Event show duplicate local files
    showLocalDupFiles() {
        if (this.localDupFiles && this.localDupFiles.length > 0) {
            // add file not local dup files to path
            this.pathFileList = this.pathFileList.filter((x) => !x.isDupLocal);
            this.fullPathList = this.fullPathList.filter((x) => this.pathFileList.map((y) => y.path).includes(x));
            this.displayDupFileLocal = true;
        }
        else {
            this.createFolderTree(this.createFoldersTree(this.fullPathList), this.folderId);
        }
    }
    // Event drag and drop files or folder local
    dropped(files) {
        this.resetFileList();
        this.resetDupList();
        let rootFolder = '';
        files = files.filter((x) => x.fileEntry.isFile);
        for (let i = 0; i < files.length; i++) {
            const fileEntry = files[i].fileEntry;
            // Handle checking upload multi folders
            const filePath = files[i].relativePath;
            const namePaths = filePath.split('/');
            if (namePaths.length > 0 && filePath.includes('/')) {
                if (!rootFolder) {
                    rootFolder = namePaths[0];
                }
                else {
                    if (namePaths[0] !== rootFolder) {
                        this.messageService.add({
                            severity: 'warn',
                            detail: this.appUtil.translate(this.translateService, 'default_toast.not_allow_upload_folders'),
                        });
                        break;
                    }
                }
            }
            // using for because callback event. => check call create folder with in position max size
            fileEntry.file((file) => {
                this.fullPathList.push(files[i].relativePath);
                this.pathFileList.push({
                    path: files[i].relativePath,
                    data: file,
                    name: file.name,
                });
                this.checkLocalDupFiles(file.name);
                // Check paths exist
                if (i === files.length - 1 &&
                    this.fullPathList &&
                    this.fullPathList.length > 0) {
                    this.showLocalDupFiles();
                }
            });
        }
    }
    // Return array path of folders tree
    createFoldersTree(paths) {
        const result = [];
        const level = { result };
        paths.forEach((path) => {
            path.split('/').reduce((r, name) => {
                if (!r[name]) {
                    r[name] = { result: [] };
                    r.result.push({
                        name,
                        children: r[name].result,
                        path: path.substring(0, path.lastIndexOf(name) + name.length),
                    });
                }
                return r[name];
            }, level);
        });
        return result;
    }
    // Recursive to create folders or create files
    createFolderTree(foldersTree, parentFolderId) {
        const thisGlobal = this;
        for (const object of foldersTree) {
            // Create folder if exist children. Else add file
            if (object.children.length > 0) {
                // validate name in here
                let folderName = object.name;
                if (!this.appConstant.PATTERNS.SPECIAL_CHARS_NOT_ALLOW_RENAME.test(folderName)) {
                    folderName = folderName.replace(this.appConstant.PATTERNS.REGEX_SPECIAL_FOLDER_NAME, '');
                    if (folderName.trim() === '') {
                        folderName = 'New Folder';
                    }
                }
                this.createFolder(folderName, parentFolderId, function afterReturn(id) {
                    object.id = id;
                    thisGlobal.folderList.push({
                        id,
                        parentId: parentFolderId,
                        name: object.name,
                    });
                    if (object.children && object.children[0].name) {
                        thisGlobal.createFolderTree(object.children, object.id);
                    }
                });
            }
            else {
                thisGlobal.addFileQueue(thisGlobal.pathFileList.find((x) => x.path === object.path), parentFolderId);
            }
        }
    }
    resetFileList() {
        this.folderList = [];
        this.fullPathList = [];
        this.pathFileList = [];
    }
    resetDupList() {
        this.dupFiles = [];
        this.dupOriginFiles = [];
    }
    // Call apis upload file and check progress
    onCallUpload(uploadFile, folderIdTemp) {
        if (uploadFile.fileSize === 0) {
            this.messageService.add({
                severity: 'error',
                detail: this.appUtil.translate(this.translateService, 'label.empty_document_size'),
            });
            uploadFile.isFail = true;
            uploadFile.progress = 100;
            return;
        }
        const formData = new FormData();
        formData.append('file_name', uploadFile.fileName);
        formData.append('name', uploadFile.name);
        formData.append('project_id', this.projectId);
        formData.append('folder_id', folderIdTemp);
        formData.append('session_upload', `${this.authService.token}_` + new Date().getTime());
        formData.append('file', uploadFile.fileData, uploadFile.name);
        this.pendingRequests.push({
            name: uploadFile.name,
            request: this.uploadService
                .uploadFiles(formData)
                .subscribe((event) => {
                switch (event.type) {
                    case http_1.HttpEventType.UploadProgress:
                        uploadFile.progress = Math.round((event.loaded / event.total) * 100);
                        uploadFile.loaded = event.loaded;
                        break;
                    case http_1.HttpEventType.Response: {
                        if (event.body.status === 200) {
                            uploadFile.queueId = event.body.data.file.fileId;
                            uploadFile.folderId = event.body.data.parentFolderId;
                            this.maxQueueId--;
                            // Push new title to list title
                            if (!this.titles.includes(uploadFile.fileName.toLowerCase().trim())) {
                                this.titles.push(uploadFile.fileName.toLowerCase().trim());
                            }
                            this.doBrowseFiles();
                        }
                        else {
                            uploadFile.isFail = true;
                            uploadFile.failDesc = event.body.message;
                            if (event.body.status === 403) {
                                this.messageService.add({
                                    key: 'toast',
                                    severity: 'error',
                                    detail: this.appUtil.translate(this.translateService, 'error.403'),
                                });
                                window.location.reload();
                            }
                        }
                        break;
                    }
                }
            }),
        });
    }
    // Call api create new folder
    createFolder(name, parentFolderId, myCallback) {
        this.folderService
            .createFolder(this.appUtil.toSnakeCaseKey({
            name,
            parentFolderId,
            projectId: this.projectId,
        }))
            .subscribe((res) => {
            if (res.status === 200) {
                this.doBrowseFiles();
                myCallback(res.data.folder.folderId);
            }
            else {
                this.messageService.add({
                    severity: 'error',
                    detail: this.appUtil.translate(this.translateService, 'error.' + res.status),
                });
            }
        });
    }
    // Check exist file in file info
    checkExistFile(file, isDupLocal, folderId) {
        // Check allow only one fileName is uploaded
        if (this.uploadFiles.filter((x) => x.name === file.name && x.queueId.includes('temp_')).length > 1 &&
            !isDupLocal) {
            // Get first queueId of files had been sorted
            const correctFile = this.uploadFiles
                .sort((x) => x.queueId)
                .find((x) => x.name === file.name);
            // Except files incorrect
            this.uploadFiles = this.uploadFiles.filter((x) => !(x.name === file.name && x !== correctFile));
            this.messageService.add({
                severity: 'warn',
                detail: this.appUtil.translateWithParams(this.translateService, 'default_toast.exist_file_uploading', { fileName: file.fileName }),
            });
            return true;
        }
        // Get title name to check exists => show duplicate dialog
        if (file.fileName &&
            this.titles.find((x) => x === file.fileName.toLowerCase().trim())) {
            file.isDuplicate = true;
            file.folderId = folderId;
            this.showProgressDialog(true);
            return true;
        }
        this.showProgressDialog(true);
        return false;
    }
    addFileQueue(fileEntry, folderIdTemp) {
        const data = fileEntry.data;
        if (data.name) {
            // Add file to queue upload files
            const geneName = new Date().getTime() + `_${data.name}`;
            this.uploadFiles.push({
                queueId: 'temp_' + this.maxQueueId++,
                name: geneName,
                fileName: data.name,
                fileSize: data.size,
                fileType: this.appUtil.getExtension(data.name),
                progress: 0,
                isUpload: true,
                isDuplicate: false,
                fileData: data,
            });
            if (!this.checkExistFile(this.getFile(geneName), fileEntry.isDupLocal, folderIdTemp)) {
                this.onCallUpload(this.getFile(geneName), folderIdTemp);
            }
        }
    }
    // Event show progress upload files Dialog
    showProgressDialog(isShow) {
        this.displayProgress = isShow;
        // if exists 1 or more file duplicate => close progress dialog and show duplicate dialog
        if (isShow === true &&
            this.uploadFiles.filter((x) => x.isDuplicate === true).length > 0) {
            this.showDupDialog(isShow);
        }
    }
    // Event show duplicate files Dialog
    showDupDialog(isShow) {
        this.displayDupFile = isShow;
        this.loadDupFiles();
    }
    // Load data of duplicate files
    loadDupFiles() {
        this.resetDupList();
        const dupFiles = this.uploadFiles.filter((x) => x.isDuplicate === true && x.queueId.includes('temp_'));
        if (dupFiles.length === 0) {
            this.displayDupFile = false;
        }
        else {
            // Update file size to show in duplicate File Dialog
            dupFiles.forEach((file) => {
                if (!file.fileSize) {
                    file.fileSize = this.getFile(file.name).fileSize;
                }
            });
            this.dupOriginFiles = dupFiles;
            this.dupFiles = dupFiles;
        }
    }
    // Return file exist name temp
    getFile(name) {
        return this.uploadFiles.find((x) => x.name === name && x.queueId.includes('temp_'));
    }
    // Event click cancel upload file
    onCancel(name) {
        const uploadFile = this.getFile(name);
        if (uploadFile.isUpload) {
            this.pendingRequests.find((x) => x.name === name).request.unsubscribe();
            this.pendingRequests = this.pendingRequests.filter((x) => x.name !== name);
            uploadFile.isUpload = false;
            uploadFile.progress = 0;
            uploadFile.loaded = 0;
        }
    }
    // Event click retry upload file
    onRetry(name) {
        const uploadFile = this.getFile(name);
        if (!uploadFile.isUpload) {
            uploadFile.isUpload = true;
            this.onCallUpload(uploadFile, this.folderId);
        }
    }
    fileOver(event) {
        // console.log('file over', event);
    }
    fileLeave(event) {
        // console.log('file leave', event);
    }
    // Event click remove file upload
    onRemoveDupFile(file) {
        file.isDuplicate = false;
        this.uploadFiles = this.uploadFiles.filter((x) => x.name !== file.name);
        if (this.uploadFiles.length === 0) {
            this.showProgressDialog(false);
        }
        this.loadDupFiles();
    }
    // Event click cancel upload duplicate files
    onCancelDupFile() {
        this.uploadFiles = this.uploadFiles.filter((el) => !this.dupFiles.includes(el));
        if (this.uploadFiles.length === 0) {
            this.showProgressDialog(false);
        }
        // Show last folders is created
        this.doBrowseFiles();
        this.displayDupFile = false;
    }
    // Event click allow upload duplicate files
    onSuccessDupFile() {
        this.showProgressDialog(true);
        this.dupFiles.forEach((file) => {
            this.onCallUpload(file, file.folderId);
            this.dupFiles = this.dupFiles.filter((x) => x !== file);
        });
        this.displayDupFile = false;
    }
    // Input search text in duplicate files dialog
    doSearchDup(event) {
        this.dupFiles = event.target.value
            ? this.dupOriginFiles.filter((x) => x.fileName
                .toLowerCase()
                .includes(event.target.value.toLowerCase().trim()))
            : this.dupOriginFiles;
    }
    // Event click button remove in popup duplicate local files
    onRemoveDupFileLocal(file) {
        this.localDupFiles = this.localDupFiles.filter((x) => x !== file);
        if (this.localDupFiles.length === 0) {
            this.continueDupFile();
        }
    }
    // Event click allow upload duplicate files
    onSuccessDupFileLocal() {
        this.localDupFiles.forEach((file) => {
            this.pathFileList.push(file);
            this.fullPathList.push(file.path);
        });
        this.continueDupFile();
    }
    // Event continue process create folder
    continueDupFile() {
        this.localDupFiles = [];
        this.displayDupFileLocal = false;
        // Check paths exist
        if (this.fullPathList && this.fullPathList.length > 0) {
            this.createFolderTree(this.createFoldersTree(this.fullPathList), this.folderId);
        }
    }
    onChangeCloud(op) {
        if (this.isOpenDropBox || this.isOpenBox) {
            this.messageService.add({
                severity: 'warn',
                detail: this.appUtil.translate(this.translateService, 'label.upload_cloud_is_opening'),
            });
        }
        else {
            switch (this.selectedCloud.code) {
                case 'dropBox': {
                    this.isOpenDropBox = true;
                    this.DBox.initDropbox();
                    break;
                }
                case 'box': {
                    this.isOpenBox = true;
                    this.Box.initBox();
                    break;
                }
            }
        }
        this.selectedCloud = null;
        op.hide();
    }
    onUploadCloud(files, type) {
        this.showProgressDialog(true);
        for (const file of files) {
            const params = {
                cloudType: type === 'dropBox' ? 2 : 3,
                contentUrl: type === 'dropBox' ? file.link : file.url,
                fileName: file.name,
                fileType: this.appUtil.getExtension(file.name),
                folderId: this.folderId,
                projectId: this.projectId,
                sessionUpload: `${this.authService.token}_` + new Date().getTime(),
            };
            const uploadTemp = {
                queueId: 'temp_' + this.maxQueueId++,
                name: new Date().getTime() + `_${file.name}`,
                fileName: file.name,
                fileSize: type === 'dropBox' ? file.bytes : file.size,
                loaded: type === 'dropBox' ? file.bytes : file.size,
                fileType: this.appUtil.getExtension(file.name),
                uploadType: this.appUtil.translate(this.translateService, type === 'dropBox' ? 'label.dropbox' : 'label.box'),
                progress: 0,
                isUpload: false,
                isDuplicate: false,
            };
            this.uploadFiles.push(uploadTemp);
            this.uploadService
                .uploadCloudDropBox(this.appUtil.toSnakeCaseKey(params))
                .subscribe((event) => {
                switch (event.type) {
                    case http_1.HttpEventType.UploadProgress:
                        uploadTemp.progress = Math.round((event.loaded / event.total) * 100);
                        uploadTemp.loaded = event.loaded;
                        break;
                    case http_1.HttpEventType.Response: {
                        if (event.body.status === 200) {
                            const uploadFile = this.getFile(uploadTemp.name);
                            uploadFile.queueId = event.body.data.file.fileId;
                            uploadFile.folderId = event.body.data.parentFolderId;
                            this.maxQueueId--;
                            this.doBrowseFiles();
                        }
                    }
                }
            });
        }
    }
    onShowComment(file) {
        if (file) {
            file.isComment = false;
        }
        this.commentComponent.file = file;
        this.commentComponent.isShowComment = true;
        this.commentComponent.getCollaboratorsAndLoadComment();
    }
    doViewFileVersion(file) {
        this.isShowModalDialog = false;
        this.headerDialog = this.appUtil.translate(this.translateService, 'label.file_version');
        this.permissionViewVersion = 0;
        const paramsPermission = {
            projectId: this.projectId,
            folderId: file.parentFolderId ? file.parentFolderId : '0',
        };
        this.folderService
            .getUserProjectRole(this.appUtil.toSnakeCaseKey(paramsPermission))
            .subscribe((res) => {
            if (res.status === 200) {
                if (res.data.projectRoleId !== this.projectRole.Uploader) {
                    this.permissionViewVersion = res.data.projectRoleId;
                    this.isShowModalDialog = true;
                    this.modalMode = 'version';
                    this.fileView = file;
                }
            }
        });
    }
    // ----------------------Context menu--------------------------
    doDownloadFiles() {
        if (this.selectedItems.length === 0) {
            return;
        }
        const data = {
            email: this.authUser.mailAddress,
            os: '',
        };
        for (const item of this.selectedItems) {
            const params = {
                data: window.btoa(JSON.stringify(data).toString()),
                projectId: this.projectId,
                folderId: item.parentFolderId ? item.parentFolderId : '0',
                downloadType: this.appConstant.DOWNLOAD_TYPE.NORMAL,
                authToken: this.authService.token,
            };
            const formattedParams = this.appUtil.toSnakeCaseKey(params);
            const queryParams = new URLSearchParams();
            for (const key in formattedParams) {
                queryParams.set(key, formattedParams[key]);
            }
            window.open(environment_1.environment.backend_url +
                '/api/download/files/' +
                item.id +
                '?' +
                queryParams.toString(), '_blank');
            // this.downloadService.downloadFile(item.id, this.appUtil.toSnakeCaseKey(params), item.contentType).then((response) => {
            //   // when you use stricter type checking
            //   const blob: any = new Blob([response], {type: item.contentType});
            //   fileSaver.saveAs(blob, item.name);
            // }, (error) => {
            //   // console.log('error', error);
            // });
        }
    }
    doZipFolder() {
        this.headerDialog = this.appUtil.translate(this.translateService, 'label.download_folder');
        this.modalMode = 'download_zip';
        const params = {
            projectId: this.projectId,
            authToken: this.authService.token,
        };
        this.downloadService
            .zipFolder(this.selectedItems[0].id, this.appUtil.toSnakeCaseKey(params))
            .subscribe((res) => {
            if (res.status === 200 && this.modalMode === 'download_zip') {
                this.isShowModalDialog = true;
                this.doCheckStatusFolderZip(this.selectedItems[0], res.data.queueId);
            }
        });
    }
    doCheckStatusFolderZip(folder, id) {
        const params = {
            queueId: id,
            authToken: this.authService.token,
        };
        this.checkQueueZip = this.downloadService
            .checkQueueDownloadFolder(folder, this.appUtil.toSnakeCaseKey(params))
            .subscribe((res) => {
            if (res.status === 200) {
                switch (res.data.status) {
                    case 0: // queue pending
                    case 1: // queue make folder structure
                    case 2: // queue zipping files
                        this.doCheckStatusFolderZip(folder.id, id);
                        break;
                    case 3: // queue completed
                        const formattedParams = app_util_1.default.toSnakeCaseKey(params);
                        const queryParams = new URLSearchParams();
                        for (const key in formattedParams) {
                            queryParams.set(key, formattedParams[key]);
                        }
                        window.open(environment_1.environment.backend_url +
                            '/api/download/folders/queue/' +
                            id +
                            '?' +
                            queryParams.toString(), '_blank');
                        this.doCloseDialog();
                        // this.downloadService.downloadFolderAsZip(id, this.appUtil.toSnakeCaseKey(params),
                        //   this.appConstant.MINE_TYPES.compress.types[0]).then((response) => {
                        //   // when you use stricter type checking
                        //   const blob: any = new Blob([response], {type: this.appConstant.MINE_TYPES.compress.types[0]});
                        //   fileSaver.saveAs(blob, folder.name + '.zip');
                        // }, (error) => {
                        //   // console.log('error', error);
                        // });
                        break;
                    case 4: // queue error
                        this.messageService.add({
                            severity: 'error',
                            detail: this.appUtil.translate(this.translateService, 'error.400'),
                        });
                        this.doCloseDialog();
                        break;
                    default:
                        break;
                }
            }
        });
    }
    doCloseDialog() {
        this.isShowModalDialog = false;
        if (this.checkQueueZip) {
            this.checkQueueZip.unsubscribe();
        }
    }
    doShowPopupRename() {
        this.nameMode = 'rename';
        this.headerDialog = this.appUtil.translate(this.translateService, 'label.rename');
        this.renameFrm = this.fb.group({
            name: [
                '',
                [
                    forms_1.Validators.required,
                    forms_1.Validators.pattern(this.appConstant.PATTERNS.SPECIAL_CHARS_NOT_ALLOW_RENAME),
                ],
            ],
        });
        this.renameFile = Object.assign({}, this.selectedItems[0]);
        this.renameFileName = this.renameFile.folder
            ? this.renameFile.name
            : this.renameFile.name.substr(0, this.renameFile.name.lastIndexOf('.'));
        this.renameExt = this.renameFile.folder
            ? ''
            : this.renameFile.name.substr(this.renameFile.name.lastIndexOf('.'), this.renameFile.name.length - 1);
        this.modalMode = 'edit';
        this.isShowModalDialog = true;
    }
    handlePressEnter(event) {
        if (event.key === 'Enter') {
            this.doRenameItem();
        }
    }
    doRenameItem() {
        this.renameFrm.markAllAsTouched();
        if (this.renameFrm.invalid) {
            return;
        }
        if (this.nameMode === 'rename') {
            const newName = this.renameFile.folder
                ? this.renameFrm.controls.name.value
                : this.renameFrm.controls.name.value + this.renameExt;
            if (this.renameExt && newName.length > 64) {
                this.messageService.add({
                    severity: 'error',
                    detail: this.appUtil.translateWithParams(this.translateService, 'label.max_length', { number: 64 }),
                });
                return;
            }
            const params = {
                type: this.renameExt === '' ? 'folder' : 'file',
                projectId: this.projectId,
                name: newName,
            };
            this.folderService
                .renameItems(this.renameFile.id, this.appUtil.toSnakeCaseKey(params))
                .subscribe((res) => {
                if (res.status === 200) {
                    this.messageService.add({
                        severity: 'success',
                        detail: this.appUtil.translate(this.translateService, 'default_toast.update_success'),
                    });
                    this.doCloseDialog();
                    this.doBrowseFiles();
                    this.selectedItems[0].name = newName;
                }
                else {
                    if (res.status === 403) {
                        this.messageService.add({
                            key: 'toast',
                            severity: 'error',
                            detail: this.appUtil.translate(this.translateService, 'error.' + res.status),
                        });
                        window.location.reload();
                    }
                }
            });
        }
        else {
            // create_folder
            if (this.submitting) {
                return;
            }
            this.submitting = true;
            const params = {
                projectId: this.projectId,
                name: this.renameFrm.controls.name.value,
                parentFolderId: this.folderId,
            };
            this.folderService
                .createFolder(this.appUtil.toSnakeCaseKey(params))
                .subscribe((res) => {
                if (res.status === 200) {
                    this.doBrowseFiles();
                }
                this.doCloseDialog();
                this.submitting = false;
            });
        }
    }
    getMessage() {
        let message;
        if (this.numberFile === 1) {
            message = this.appUtil.translate(this.translateService, 'label.this_file');
        }
        if (this.numberFile > 1) {
            message =
                this.numberFile +
                    ' ' +
                    this.appUtil.translate(this.translateService, 'label.files');
        }
        if (this.numberFolder === 1) {
            message = this.appUtil.translate(this.translateService, 'label.this_folder');
        }
        if (this.numberFolder > 1) {
            message =
                this.numberFolder +
                    ' ' +
                    this.appUtil.translate(this.translateService, 'label.folders');
        }
        return message;
    }
    confirmDeleteItem() {
        let header = 'label.delete_folder_title';
        const message = this.getMessage();
        if (this.numberFolder === 0) {
            header = 'label.delete_file_title';
        }
        this.confirmationService.confirm({
            header: this.appUtil.translate(this.translateService, header),
            message: this.appUtil.translateWithParams(this.translateService, 'label.delete_item_content', { title: message }),
            icon: 'fas fa-exclamation-triangle text-danger',
            defaultFocus: 'none',
            accept: () => {
                this.doDeleteItems();
            },
        });
    }
    doDeleteItems() {
        this.loading = true;
        const params = {
            projectId: this.projectId,
            fileId: '',
            folderId: '',
        };
        for (let i = 0; i < this.selectedItems.length; i++) {
            if (this.selectedItems[i].folder) {
                params.folderId = this.selectedItems[i].id;
            }
            else {
                params.fileId = this.selectedItems[i].id;
            }
            this.trashService
                .deleteItems(this.appUtil.toSnakeCaseKey(params))
                .subscribe((res) => {
                if (res.status === 200 && i === this.selectedItems.length - 1) {
                    this.messageService.add({
                        severity: 'success',
                        detail: this.appUtil.translate(this.translateService, 'default_toast.delete_success'),
                    });
                    this.selectedItems = [];
                    this.getTitlesInProject();
                    this.deleteUploadFiles(params.folderId);
                    if (this.uploadFiles.length === 0) {
                        this.showProgressDialog(false);
                    }
                    this.doBrowseFiles();
                }
            });
        }
    }
    confirmDeleteForeverItems() {
        let header = 'label.delete_folder_title';
        const message = this.getMessage();
        if (this.numberFolder === 0) {
            header = 'label.delete_file_title';
        }
        this.confirmationService.confirm({
            header: this.appUtil.translate(this.translateService, header),
            message: this.appUtil.translateWithParams(this.translateService, 'label.delete_item_forever_content', { title: message }),
            icon: 'fas fa-exclamation-triangle text-danger',
            defaultFocus: 'none',
            accept: () => {
                this.doDeleteForeverItems();
            },
        });
    }
    doDeleteForeverItems() {
        this.loading = true;
        const params = {
            projectId: this.projectId,
            fileId: '',
            folderId: '',
        };
        for (let i = 0; i < this.selectedItems.length; i++) {
            if (this.selectedItems[i].folder) {
                params.folderId = this.selectedItems[i].id;
            }
            else {
                params.fileId = this.selectedItems[i].id;
            }
            this.trashService
                .deleteForeverItems(this.appUtil.toSnakeCaseKey(params))
                .subscribe((res) => {
                if (res.status === 200 && i === this.selectedItems.length - 1) {
                    this.messageService.add({
                        severity: 'success',
                        detail: this.appUtil.translate(this.translateService, 'default_toast.delete_success'),
                    });
                    this.selectedItems = [];
                    this.doBrowseFiles();
                }
            });
        }
    }
    doRestoreAItem(itemRestore) {
        const params = {
            projectId: this.projectId,
            fileId: itemRestore.folder ? '' : itemRestore.id,
            folderId: itemRestore.folder ? itemRestore.id : '',
        };
        return new Promise((resolve) => {
            this.trashService
                .restoreItems(this.appUtil.toSnakeCaseKey(params))
                .subscribe((res) => {
                if (res.status === 200) {
                    if (this.currentFolder.setting.charAt(0) === '1') {
                        const item = this.fileInfos.find((it) => it.id === itemRestore.id);
                        item.status = 1;
                        if (!item.folder &&
                            [1, 2, 3, 4].indexOf(item.fileType) !== -1 &&
                            item.isEncrypt !== 1) {
                            item.isEncrypt = 2;
                            item.isEncoding = true;
                            resolve(itemRestore.id);
                        }
                        else {
                            resolve();
                        }
                    }
                    else {
                        resolve();
                    }
                }
                else {
                    resolve();
                }
            });
        });
    }
    doRestoreItems() {
        this.loading = true;
        let listIds = [];
        this.selectedItems.forEach((item1) => {
            listIds = [...listIds, this.doRestoreAItem(item1)];
        });
        Promise.all(listIds).then((responses) => {
            this.loading = false;
            let listFileIdCheckEncoding = [];
            this.messageService.add({
                severity: 'success',
                detail: this.appUtil.translate(this.translateService, 'default_toast.restore_success'),
            });
            responses.forEach((item) => {
                if (item !== undefined) {
                    listFileIdCheckEncoding = [...listFileIdCheckEncoding, item];
                }
            });
            if (listFileIdCheckEncoding.length > 0) {
                this.processCheckEncodeStatus(listFileIdCheckEncoding);
            }
            else {
                this.doBrowseFiles();
            }
            this.selectedItems = [];
        });
    }
    processCheckEncodeStatus(itemIds) {
        const param = {
            projectId: this.projectId,
            fileIds: itemIds.join(','),
        };
        let listIds = [];
        this.fileService
            .checkEncodeStatus(this.appUtil.toSnakeCaseKey(param))
            .subscribe((res) => {
            if (res.status === 200) {
                for (const item of res.data) {
                    switch (item.statusEncode) {
                        case 1: // waiting
                        case 2: // encoding
                            listIds = [...listIds, item.fileId];
                            break;
                        case 3: // encoded
                            const itemEncoded = this.fileInfos.find((it) => it.id === item.fileId);
                            itemEncoded.isEncrypt = 1;
                            itemEncoded.name = item.fileName;
                            itemEncoded.isEncoding = false;
                            this.selectedItems.forEach((selected) => {
                                if (item.fileId === selected.id) {
                                    selected.isEncrypt = 1;
                                }
                            });
                            this.doBrowseFiles();
                            break;
                        case 0:
                        case 4: // error
                            const itemError = this.fileInfos.find((it) => it.id === item.fileId);
                            itemError.isEncrypt = 3;
                            itemError.name = item.fileName;
                            itemError.isEncoding = false;
                            this.selectedItems.forEach((selected) => {
                                if (item.fileId === selected.id) {
                                    selected.isEncrypt = 3;
                                }
                            });
                            break;
                    }
                }
                if (listIds.length > 0) {
                    setTimeout(() => {
                        this.processCheckEncodeStatus(listIds);
                    }, 5000);
                }
            }
        });
    }
    doHandleMoveCopyItem(event) {
        this.selectedFolderDest = event;
    }
    doMoveOrRestore() {
        if (this.treeMode === 'copy') {
            let fileIds = [];
            let folderIds = [];
            this.selectedItems.forEach((i) => {
                if (i.folder) {
                    folderIds = [...folderIds, i.id];
                }
                else {
                    fileIds = [...fileIds, i.id];
                }
            });
            const params = {
                projectId: this.projectId,
                copiedFolderIds: folderIds.join(','),
                newParentFolderId: this.selectedFolderDest.data,
                copiedFileIds: fileIds.join(','),
            };
            this.folderService
                .copyItems(this.appUtil.toSnakeCaseKey(params))
                .subscribe((res) => {
                if (res.status === 200) {
                    this.messageService.add({
                        severity: 'success',
                        detail: this.appUtil.translate(this.translateService, 'default_toast.copy_success'),
                    });
                    this.selectedItems = [];
                    this.isShowTree = false;
                    this.doBrowseFiles();
                }
                else {
                    if (res.status === 403) {
                        this.messageService.add({
                            severity: 'error',
                            detail: this.appUtil.translate(this.translateService, 'error.403'),
                        });
                        this.isShowTree = false;
                    }
                }
            });
        }
        else {
            // move
            let movedFoldersArray = [];
            let movedFilesArray = [];
            this.selectedItems.forEach((i) => {
                if (i.folder) {
                    movedFoldersArray = [
                        ...movedFoldersArray,
                        {
                            folderId: i.id,
                            parentFolderId: i.parentFolderId,
                        },
                    ];
                }
                else {
                    movedFilesArray = [
                        ...movedFilesArray,
                        {
                            fileId: i.id,
                            parentFolderId: i.parentFolderId,
                        },
                    ];
                }
            });
            const params = {
                projectId: this.projectId,
                newParentFolderId: this.selectedFolderDest.data,
                movedFolders: movedFoldersArray,
                movedFiles: movedFilesArray,
            };
            this.doMoveItems(params);
        }
    }
    doDragItems(item) {
        if (this.selectedItems.length === 0) {
            item.selected = true;
            this.selectedItems = [...[], item];
        }
    }
    doDropItems(event) {
        let movedFoldersArray = [];
        let movedFilesArray = [];
        if (!event.folder) {
            return;
        }
        this.selectedItems.forEach((i) => {
            if (i.folder) {
                movedFoldersArray = [
                    ...movedFoldersArray,
                    {
                        folderId: i.id,
                        parentFolderId: i.parentFolderId,
                    },
                ];
            }
            else {
                movedFilesArray = [
                    ...movedFilesArray,
                    {
                        fileId: i.id,
                        parentFolderId: i.parentFolderId,
                    },
                ];
            }
        });
        if (movedFoldersArray.findIndex((fo) => fo.folderId === event.id) !== -1) {
            return;
        }
        const params = {
            projectId: this.projectId,
            newParentFolderId: event.id,
            movedFolders: movedFoldersArray,
            movedFiles: movedFilesArray,
        };
        this.doMoveItems(params);
    }
    doMoveItems(params) {
        this.folderService
            .moveItems(this.appUtil.toSnakeCaseKey(params))
            .subscribe((res) => {
            if (res.status === 200) {
                if (res.data.isEmpty || res.data.length === 0) {
                    this.messageService.add({
                        severity: 'success',
                        detail: this.appUtil.translate(this.translateService, 'default_toast.move_success'),
                    });
                    this.selectedItems = [];
                    this.isShowTree = false;
                    this.showError = false;
                    this.doBrowseFiles();
                }
                else {
                    const fIds = res.data.map((item) => {
                        return item.fid;
                    });
                    this.fileErrors = this.fileInfos.filter((item) => {
                        return fIds.indexOf(item.id) !== -1 && !item.folder;
                    });
                    this.folderErrors = this.fileInfos.filter((item) => {
                        return fIds.toString().indexOf(item.id) !== -1 && item.folder;
                    });
                    this.headerTree = this.appUtil.translate(this.translateService, 'label.move_item_error_title');
                    this.showError = true;
                }
            }
            else {
                if (res.status === 403) {
                    this.messageService.add({
                        severity: 'error',
                        detail: this.appUtil.translate(this.translateService, 'error.403'),
                    });
                    this.isShowTree = false;
                }
                if (res.status === 318) {
                    // move file success but encode fail for expiry date invalid
                    this.messageService.add({
                        severity: 'success',
                        detail: this.appUtil.translate(this.translateService, 'default_toast.move_success'),
                    });
                    this.messageService.add({
                        severity: 'error',
                        detail: this.appUtil.translate(this.translateService, 'error.318'),
                    });
                    this.isShowTree = false;
                    this.doBrowseFiles();
                }
            }
        });
    }
    dropInBreadcrumb(event) {
        let movedFoldersArray = [];
        let movedFilesArray = [];
        if (!event.target.parentNode.id) {
            return;
        }
        this.selectedItems.forEach((i) => {
            if (i.folder) {
                movedFoldersArray = [
                    ...movedFoldersArray,
                    {
                        folderId: i.id,
                        parentFolderId: i.parentFolderId,
                    },
                ];
            }
            else {
                movedFilesArray = [
                    ...movedFilesArray,
                    {
                        fileId: i.id,
                        parentFolderId: i.parentFolderId,
                    },
                ];
            }
        });
        const params = {
            projectId: this.projectId,
            newParentFolderId: event.target.parentNode.id === 'root'
                ? '0'
                : event.target.parentNode.id,
            movedFolders: movedFoldersArray,
            movedFiles: movedFilesArray,
        };
        this.doMoveItems(params);
    }
    doShowPopupCreateFolder() {
        this.nameMode = 'create_folder';
        this.headerDialog = app_util_1.default.translate(this.translateService, 'label.create_folder');
        this.renameFrm = this.fb.group({
            name: [
                '',
                [
                    forms_1.Validators.required,
                    forms_1.Validators.pattern(app_constants_1.default.PATTERNS.SPECIAL_CHARS_NOT_ALLOW_RENAME),
                ],
            ],
        });
        this.renameFileName = '';
        this.renameExt = '';
        this.modalMode = 'edit';
        this.isShowModalDialog = true;
    }
    doViewItemsInfo(mode, item) {
        this.infoMode = mode;
        switch (mode) {
            case 'file':
                this.fileViewInfo = Object.assign({}, item);
                break;
            case 'folder':
                this.folderViewInfo = Object.assign({}, item);
                break;
            default:
                break;
        }
        this.isViewItemInfo = true;
    }
    doCloseFileInfo() {
        this.isViewItemInfo = false;
        if (this.infoMode === 'file') {
            this.loadLabelFiles(this.fileViewInfo);
        }
    }
    onCancelCollaborator(event) {
        if (event) {
            this.isShowCollaborator = false;
        }
    }
    doCreateLink() {
        this.displayShareModal = false;
        if (this.isSubmitCreateLink) {
            return;
        }
        this.isSubmitCreateLink = true;
        this.isCreatePublicView =
            this.linkCreateComponent.createLinkFrm.controls.allowedViewPublic.value;
        this.linkCreateComponent.createLink((res) => {
            this.linkData = res;
            this.displayShareSettingModal = true;
            this.isSubmitCreateLink = false;
        });
    }
    deleteLink() {
        this.displayShareSettingModal = false;
        this.linkSettingComponent.deleteLink();
    }
    doRegisterLicense() {
        if (this.linkSettingComponent.shareLinkFrm.controls.showWatermark.value) {
            this.linkSettingComponent.viewOnlineSettingComponent.form.markAllAsTouched();
            if (this.linkSettingComponent.viewOnlineSettingComponent.form.invalid) {
                return;
            }
        }
        if (this.isSubmitShareLink ||
            this.linkSettingComponent.shareLinkFrm.invalid) {
            return;
        }
        this.isSubmitShareLink = true;
        this.linkSettingComponent.registerLicense(() => {
            this.displayShareSettingModal = false;
            this.isSubmitShareLink = false;
        });
    }
    getFileIdShare() {
        return this.selectedItems.map((item) => item.id).join(',');
    }
    getFolderIdShare() {
        let folderId;
        if (this.selectedItems[0].folder) {
            folderId = this.selectedItems[0].id;
        }
        return folderId;
    }
    getShareName() {
        return this.selectedItems[0].name;
    }
    onShowDrmSettings(file) {
        if (file.fileTranslateStatus === app_constants_1.TranslateStatus.TRANSLATING) {
            this.messageService.add({
                severity: 'warn',
                detail: this.appUtil.translate(this.translateService, 'label.file_translating_disabled'),
            });
            return;
        }
        this.displayDrmModal = true;
        this.selectedEncryptFile = file;
    }
    onCloseDrmSettings() {
        this.displayDrmModal = false;
        this.selectedEncryptFile = null;
    }
    encryptDocument() {
        this.projectDrmSettingComponent.form.markAllAsTouched();
        if (this.projectDrmSettingComponent.form.invalid ||
            this.isSubmitEncodeFile) {
            return;
        }
        let docExpiryDate;
        if (!this.projectDrmSettingComponent.f.setDocExpiry.value) {
            docExpiryDate = this.appUtil.formatBookendDate(new Date(this.appConstant.MAX_DATE), this.projectDrmSettingComponent.f.timezone.value.code, this.appConstant.FORMAT_DATE.LINK_FORMAT_DATE, moment_1.default);
        }
        else {
            const expDate = new Date(this.projectDrmSettingComponent.f.expiryDate.value);
            const expTime = new Date(this.projectDrmSettingComponent.f.expiryTime.value);
            expDate.setHours(expTime.getHours());
            expDate.setMinutes(expTime.getMinutes());
            expDate.setSeconds(55);
            docExpiryDate = this.appUtil.formatBookendDate(expDate, this.projectDrmSettingComponent.f.timezone.value.code, this.appConstant.FORMAT_DATE.LINK_FORMAT_DATE, moment_1.default);
        }
        if (docExpiryDate <=
            moment_1.default(moment_1.utc(new Date())).format(this.appConstant.FORMAT_DATE.LINK_FORMAT_DATE)) {
            this.messageService.add({
                severity: 'error',
                detail: this.appUtil.translate(this.translateService, 'error.invalid_expiry_date'),
            });
            return;
        }
        this.isSubmitEncodeFile = true;
        const params = {
            projectId: this.projectId,
            fileIds: this.selectedEncryptFile.id,
            expiryDate: docExpiryDate,
            printable: this.projectDrmSettingComponent.f.printable.value ? 1 : 0,
            editable: this.projectDrmSettingComponent.f.editable.value ? 1 : 0,
            localCopies: 2,
            label: this.projectSetting.name,
        };
        this.fileService.encryptFile(this.appUtil.toSnakeCaseKey(params)).subscribe((res) => {
            this.isSubmitEncodeFile = false;
            if (res.status === 200) {
                this.doBrowseFiles();
                this.onCloseDrmSettings();
            }
        }, (error) => {
            // console.log('error', error);
        });
    }
    openFileDrmSetting(file) {
        this.isShowFileDrmSetting = true;
        this.selectedFile = file;
        this.selectedFileId = file.id;
        this.selectedFolderId = file.parentFolderId;
        this.selectedUserFileRole = file.userFileRole;
    }
    onDoneFileDrmSetting(event) {
        if (event) {
            this.isShowFileDrmSetting = false;
        }
    }
    onDoDecodeFile(event) {
        if (event) {
            this.doBrowseFiles();
        }
    }
    onHideUploadFile($event) {
        this.uploadFiles = [];
    }
    initializeSocketNotification() {
        const pusher = new pusher_js_1.default(window.atob(environment_1.environment.pusher.app_key), environment_1.environment.pusher.options);
        const channel = pusher.subscribe(this.authUser.teamId);
        const that = this;
        channel.bind('notify-topic-event', (data) => {
            const message = JSON.parse(data);
            switch (message.code) {
                case app_constants_1.default.NOTIFICATION_CODE.ADD_COMMENT.code:
                    if (message.body.comment.fileId) {
                        that.fileInfos.forEach((file) => {
                            if (file.id === message.body.comment.fileId) {
                                that.playSound();
                                if (that.commentComponent.isShowComment) {
                                    that.commentComponent.getCollaboratorsAndLoadComment();
                                }
                                else {
                                    file.isComment = true;
                                }
                            }
                        });
                    }
                    else {
                        if (message.body.comment.projectId === that.projectId &&
                            message.body.comment.userId !== that.authUser.userId) {
                            that.playSound();
                            if (that.commentComponent.isShowComment) {
                                that.commentComponent.getCollaboratorsAndLoadComment();
                            }
                            else {
                                that.commentComponent.isComment = true;
                            }
                        }
                    }
                    break;
                case app_constants_1.default.NOTIFICATION_CODE.EDIT_COMMENT.code:
                case app_constants_1.default.NOTIFICATION_CODE.DELETE_COMMENT.code:
                    if (message.body.fileId) {
                        that.fileInfos.forEach((file) => {
                            if (file.id === message.body.fileId) {
                                that.playSound();
                                if (that.commentComponent.isShowComment) {
                                    that.commentComponent.getCollaboratorsAndLoadComment();
                                }
                                else {
                                    file.isComment = true;
                                }
                            }
                        });
                    }
                    else {
                        if (message.projectId === that.projectId &&
                            message.body.userId !== that.authUser.userId) {
                            that.playSound();
                            if (that.commentComponent.isShowComment) {
                                that.commentComponent.getCollaboratorsAndLoadComment();
                            }
                            else {
                                that.commentComponent.isComment = true;
                            }
                        }
                    }
                    break;
            }
        });
        channel.bind('notify-system-event', (data) => {
            // console.log('Received notify-system-event with message: ', JSON.parse(data));
        });
    }
    playSound() {
        const snd = new Audio(this.appConstant.MESS_SOUND);
        snd.play().then();
    }
    handleChangeIconFolder(event) {
        this.fileInfos.forEach((item) => {
            if (item.id === event.folderId) {
                item.folderSetting = event.setting;
            }
        });
    }
    checkAllowExtension(name) {
        const extension = name.split('.').pop();
        const allowImgExt = ['jpg', 'jpeg', 'png'];
        return allowImgExt.includes(extension);
    }
    openTranslationFile(file) {
        this.isShowTranslation = true;
        this.selectedFile = file;
        this.selectedFileId = file.id;
        this.selectedFolderId = file.parentFolderId;
        this.selectedUserFileRole = file.userFileRole;
    }
    onCloseTranslationFile() {
        this.isShowTranslation = false;
    }
    startTranslateFile() {
        const params = {
            fileId: this.selectedFile.id,
            folderId: this.selectedFolderId,
            projectId: this.projectId,
            destLang: this.fileTranslationComponent.form.value.language.code,
        };
        this.fileTranslationService
            .startTranslateFile(app_util_1.default.toSnakeCaseKey(params))
            .subscribe((res) => {
            if (res.status === 200) {
                this.doBrowseFiles();
                this.onCloseTranslationFile();
            }
            else {
                this.messageService.add({
                    severity: 'error',
                    detail: this.appUtil.translate(this.translateService, 'error.' + res.status),
                });
                location.reload();
            }
        }, (err) => {
            this.messageService.add({
                severity: 'error',
                detail: this.appUtil.translate(this.translateService, 'error.' + err.status),
            });
        });
    }
    processCheckTranslateStatus(itemIds, folderId) {
        const param = {
            projectId: this.projectId,
            folderId: folderId,
            fileIds: itemIds.join(','),
        };
        let listIds = [];
        this.fileTranslationService
            .checkFileTranslateStatus(this.appUtil.toSnakeCaseKey(param))
            .subscribe((res) => {
            if (res.status === 200) {
                for (const item of res.data) {
                    if (item.status) {
                        switch (item.status) {
                            case app_constants_1.TranslateStatus.TRANSLATING: // waiting
                                listIds = [...listIds, item.fileId];
                                break;
                            case app_constants_1.TranslateStatus.SUCCESS:
                            case app_constants_1.TranslateStatus.FAIL:
                                this.doBrowseFiles();
                                break;
                        }
                    }
                }
                if (listIds.length > 0) {
                    setTimeout(() => {
                        this.processCheckTranslateStatus(listIds, folderId);
                    }, 5000);
                }
            }
        });
    }
    showTranslationIcon(file) {
        return (file.status === 1 &&
            file.fileType !== 5 &&
            (file.isEncrypt === 0 || file.isEncrypt === 1) &&
            (file.userFileRole === app_constants_1.ProjectRole.Owner ||
                file.userFileRole === app_constants_1.ProjectRole.Editor) &&
            file.fileTranslateStatus !== app_constants_1.TranslateStatus.TRANSLATING &&
            this.authUser.useGoogleTranslate);
    }
}
exports.ProjectDetailComponent = ProjectDetailComponent;
ProjectDetailComponent.ɵfac = function ProjectDetailComponent_Factory(t) { return new (t || ProjectDetailComponent)(i0.ɵɵdirectiveInject(i1.Title), i0.ɵɵdirectiveInject(i2.ProjectService), i0.ɵɵdirectiveInject(i3.TranslateService), i0.ɵɵdirectiveInject(i4.UploadService), i0.ɵɵdirectiveInject(i5.FolderService), i0.ɵɵdirectiveInject(i6.FileService), i0.ɵɵdirectiveInject(i7.Router), i0.ɵɵdirectiveInject(i8.MessageService), i0.ɵɵdirectiveInject(i9.DatePipe), i0.ɵɵdirectiveInject(i10.LabelService), i0.ɵɵdirectiveInject(i11.AuthService), i0.ɵɵdirectiveInject(i12.FormBuilder), i0.ɵɵdirectiveInject(i8.ConfirmationService), i0.ɵɵdirectiveInject(i13.TrashService), i0.ɵɵdirectiveInject(i14.DownloadService), i0.ɵɵdirectiveInject(i7.ActivatedRoute), i0.ɵɵdirectiveInject(i15.FileTranslationService)); };
ProjectDetailComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ProjectDetailComponent, selectors: [["app-project-detail"]], viewQuery: function ProjectDetailComponent_Query(rf, ctx) { if (rf & 1) {
        i0.ɵɵviewQuery(_c0, 1);
        i0.ɵɵviewQuery(_c1, 1);
        i0.ɵɵviewQuery(_c2, 1);
        i0.ɵɵviewQuery(_c3, 1);
        i0.ɵɵviewQuery(_c4, 1);
        i0.ɵɵviewQuery(_c5, 1);
    } if (rf & 2) {
        let _t;
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.commentComponent = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.activityDetailComponent = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.linkCreateComponent = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.linkSettingComponent = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.projectDrmSettingComponent = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.fileTranslationComponent = _t.first);
    } }, decls: 91, vars: 188, consts: [[1, "page-title"], ["pDroppable", "fileInfos", 3, "model", "onDrop"], [1, "p-mt-3"], [1, "p-toolbar-group-left"], [1, "p-toolbar-group-right"], [3, "visible", "baseZIndex", "header", "position", "visibleChange", "onHide"], [4, "ngFor", "ngForOf"], [3, "visible", "baseZIndex", "draggable", "header", "modal", "resizable", "onHide", "visibleChange"], ["severity", "error"], ["pTemplate", ""], [1, "p-input-icon-left", "p-mb-3"], [1, "pi", "pi-search"], ["maxlength", "64", "pInputText", "", "type", "text", 1, "search-style", "h-38", 3, "placeholder", "keyup"], ["styleClass", "p-datatable-striped p-datatable-responsive-demo p-px-2 bg-white", 3, "rowHover", "value"], ["pTemplate", "header"], ["pTemplate", "body"], [4, "ngIf"], ["pTemplate", "footer"], ["pButton", "", "pRipple", "", "type", "button", "class", "p-button-outlined p-button-secondary p-mr-2", 3, "click", 4, "ngIf"], [3, "hideTransitionOptions", "showTransitionOptions"], ["uploadMenu", ""], ["id", "file-input", "type", "file", "webkitdirectory", "", 2, "display", "none", 3, "change"], ["pButton", "", "pRipple", "", "type", "button", "class", "p-button-outlined p-button-secondary p-mr-2", "tooltipPosition", "bottom", 3, "pTooltip", "click", 4, "ngIf"], ["pButton", "", "pRipple", "", "type", "button", "tooltipPosition", "bottom", 1, "p-button-outlined", "p-button-secondary", "p-button-icon-only", 3, "pTooltip", "click"], [1, "fas", "fa-ellipsis-h"], ["moreMenu", ""], ["dropZoneLabel", "Drop Zone (Select Multi files or Folder)", 3, "contentClassName", "dropZoneClassName", "onFileDrop", "onFileLeave", "onFileOver"], ["ngx-file-drop-content-tmp", ""], ["class", "loading-style", "height", "100%", "width", "100%", 4, "ngIf"], [3, "showCloseIcon"], ["opLabel", ""], [3, "emailView", "file", "projectId", "watermarkSetting", "isClose", 4, "ngIf"], [3, "visible", "baseZIndex", "draggable", "modal", "resizable", "styleClass", "header", "onHide", "visibleChange"], [3, "file", "projectId", "userFolderRole", "isBrowseFile", 4, "ngIf"], ["class", "p-pt-2", 3, "formGroup", 4, "ngIf"], ["styleClass", "p-fluid custom-dialog", 3, "visible", "baseZIndex", "contentStyle", "draggable", "header", "modal", "resizable", "visibleChange"], [3, "projectId", "selectedValues", "selectedFolder", 4, "ngIf"], ["blockScroll", "true", "position", "right", 1, "view-style", 3, "visible", "autoZIndex", "baseZIndex", "closeOnEscape", "onHide", "visibleChange"], [3, "file", "projectId", "doLoadLabelFile", "doLoadAllLabels", 4, "ngIf"], [3, "folder", "projectId", "updateSettingSuccess", 4, "ngIf"], [3, "projectId", "userFolderRole", 4, "ngIf"], [3, "projectId", 4, "ngIf"], [3, "visible", "baseZIndex", "breakpoints", "draggable", "modal", "resizable", "header", "visibleChange"], [3, "folderId", "projectId", "cancel", 4, "ngIf"], [3, "visible", "baseZIndex", "breakpoints", "draggable", "modal", "blockScroll", "resizable", "header", "onHide", "visibleChange"], [3, "name", "projectId", "folderId", "fileId", "typeShare", 4, "ngIf"], ["maximizable", "true", 3, "visible", "baseZIndex", "breakpoints", "draggable", "modal", "blockScroll", "resizable", "header", "onHide", "visibleChange"], [3, "linkData", "projectId", "isPublicView", 4, "ngIf"], [3, "visible", "baseZIndex", "breakpoints", "draggable", "modal", "resizable", "header", "onHide", "visibleChange"], [3, "projectId", "folderId", "fileId", "file", "projectRoleId", "done", "doDecode", 4, "ngIf"], [3, "file", 4, "ngIf"], [1, "p-grid"], [1, "p-sm-6", "p-text-truncate", "p-mt-3"], [1, "p-d-inline-flex", "p-align-center", 3, "ngSwitch"], ["class", "far fa-file-pdf text-danger", 4, "ngSwitchCase"], ["class", "far fa-file-word text-primary", 4, "ngSwitchCase"], ["class", "far fa-file-excel text-success", 4, "ngSwitchCase"], ["class", "far fa-file-powerpoint text-warning", 4, "ngSwitchCase"], ["class", "fas fa-file-video", 4, "ngSwitchCase"], ["class", "fas fa-file-audio", 4, "ngSwitchCase"], ["class", "fas fa-file-image", 4, "ngSwitchCase"], ["class", "far fa-file-alt", 4, "ngSwitchCase"], ["class", "far fa-file-archive", 4, "ngSwitchCase"], ["class", "far fa-file", 4, "ngSwitchDefault"], [1, "p-pl-1", 3, "title"], [1, "p-d-none", "p-d-lg-table-cell", "p-lg-3", "p-mt-3"], ["class", "p-sm-1 p-text-right p-mt-1", 4, "ngIf"], ["class", "p-col-4 p-lg-2 p-text-right p-mt-2", 4, "ngIf"], [1, "far", "fa-file-pdf", "text-danger"], [1, "far", "fa-file-word", "text-primary"], [1, "far", "fa-file-excel", "text-success"], [1, "far", "fa-file-powerpoint", "text-warning"], [1, "fas", "fa-file-video"], [1, "fas", "fa-file-audio"], [1, "fas", "fa-file-image"], [1, "far", "fa-file-alt"], [1, "far", "fa-file-archive"], [1, "far", "fa-file"], [1, "p-sm-1", "p-text-right", "p-mt-1"], [3, "percent"], [1, "p-col-4", "p-lg-2", "p-text-right", "p-mt-2"], ["icon", "pi pi-times", "styleClass", "p-button-text", 3, "title", "click", 4, "ngIf"], ["icon", "pi pi-refresh", "styleClass", "p-button-text", 3, "title", "click", 4, "ngIf"], ["icon", "pi pi-times", "styleClass", "p-button-text", 3, "title", "click"], ["icon", "pi pi-refresh", "styleClass", "p-button-text", 3, "title", "click"], [1, "fas", "fa-2x", "fa-exclamation-circle", 3, "title"], [1, "p-ml-1", 3, "translate"], ["pSortableColumn", "name", 1, "p-d-none", "p-d-lg-table-cell", "p-text-left", 2, "width", "50%"], ["field", "name"], [1, "p-d-none", "p-d-lg-table-cell", "p-text-left", 2, "width", "30%"], [1, "p-text-center", 2, "width", "20%"], [1, "p-text-truncate"], [1, "p-d-none", "p-d-lg-table-cell", "p-text-left"], ["icon", "pi pi-trash", "styleClass", "p-button-text", 3, "click"], ["pTemplate", "emptymessage"], ["colspan", "3", 1, "p-text-center", "p-d-none", "p-d-lg-table-cell"], ["icon", "pi pi-times", "pButton", "", "pRipple", "", "type", "button", 1, "p-button-warning", 3, "label", "click"], ["icon", "pi pi-check", "pButton", "", "pRipple", "", "type", "button", 3, "disabled", "label", "click"], [1, "p-text-left", 2, "width", "25%"], [1, "p-d-none", "p-d-lg-table-cell", "p-text-left", 2, "width", "40%"], [1, "p-d-md-table-cell", "p-text-truncate"], [3, "title"], ["icon", "pi pi-times", "label", "Cancel", "pButton", "", "pRipple", "", "type", "button", 1, "p-button-warning", 3, "click"], ["icon", "pi pi-check", "label", "Ok", "pButton", "", "pRipple", "", "type", "button", 3, "disabled", "click"], ["pButton", "", "pRipple", "", "type", "button", 1, "p-button-outlined", "p-button-secondary", "p-mr-2", 3, "click"], [1, "fas", "fa-upload", "p-mr-2"], [1, "pi", "pi-chevron-down", "p-ml-2"], [1, "upload-dropdown-menu"], [1, "upload-menu-item"], ["chooseIcon", "fas fa-laptop", "id", "fileUpload", "mode", "basic", 1, "menu-file-upload", 3, "multiple", "chooseLabel", "onSelect"], ["form", ""], ["for", "file-input", 1, "folder-upload-label", 3, "click"], [1, "fas", "fa-folder", "p-mr-2"], [1, "cloud-upload-item", 3, "click"], [1, "fas", "fa-cloud", "p-mr-2"], [1, "pi", "p-ml-2", 2, "font-size", "0.8rem", "color", "#6c757d", 3, "ngClass"], ["class", "cloud-submenu", 4, "ngIf"], [1, "cloud-submenu"], [1, "cloud-submenu-item", 3, "click"], ["src", "assets/images/drop_box.ico", "width", "16", "height", "16", 1, "p-mr-2", 2, "object-fit", "contain"], ["src", "assets/images/box.png", "width", "16", "height", "16", 1, "p-mr-2", 2, "object-fit", "contain"], ["pButton", "", "pRipple", "", "type", "button", "tooltipPosition", "bottom", 1, "p-button-outlined", "p-button-secondary", "p-mr-2", 3, "pTooltip", "click"], [1, "fas", "fa-folder-plus"], [1, "p-d-none", "p-d-lg-inline", "p-ml-2"], [1, "fas", "fa-users"], [1, "more-dropdown-menu"], ["class", "more-menu-item", 3, "click", 4, "ngIf"], ["class", "more-menu-item", 3, "routerLink", "click", 4, "ngIf"], [1, "more-menu-item", 3, "click"], [1, "menu-item-content"], [1, "fas", "fa-history", "p-mr-2"], [1, "more-menu-item", 3, "routerLink", "click"], [1, "fas", "fa-tags", "p-mr-2"], [1, "fas", "fa-link", "p-mr-2"], ["id", "dragZone"], [3, "model", "onShow"], ["cm", ""], ["appendTo", "body", 3, "model"], ["cm_grid", ""], [3, "model", "popup"], ["menu_list", ""], [1, "p-d-flex", "p-jc-between", "p-ai-center"], [1, "p-input-icon-left", "p-grid", "p-pl-2", "w-50"], [1, "p-float-label", "p-input-icon-left", "p-ml-2", "p-my-2", "p-mb-md-0", "p-width-100"], ["id", "search", "maxlength", "64", "pInputText", "", "type", "text", 1, "p-width-100", 3, "ngModel", "autocomplete", "keyup", "ngModelChange"], ["for", "search"], [1, "p-d-flex", "p-jc-between", "p-mt-2"], [1, "p-col-6"], [1, "p-text-right", "p-col-6", "lbl-name", "p-text-truncate", "p-d-inline"], ["class", "min-height-23", 4, "ngIf"], ["dataKey", "id", "selectionMode", "multiple", "styleClass", "p-datatable-striped p-px-2 bg-white", 3, "contextMenuSelection", "first", "selection", "contextMenu", "lazy", "metaKeySelection", "paginator", "resetPageOnSort", "rowHover", "rowsPerPageOptions", "rows", "sortField", "sortOrder", "totalRecords", "value", "contextmenu", "onContextMenuSelect", "onLazyLoad", "onRowSelect", "onRowUnselect", "contextMenuSelectionChange", "firstChange", "selectionChange"], ["class", "p-col-12 p-text-center", 4, "ngIf"], [1, "fas", "fa-filter", "p-mr-2", "cs-pointer", 3, "click"], ["class", "cs-pointer", 3, "click", 4, "ngIf"], ["class", "p-mr-1 p-text-truncate", 3, "rounded", "styleClass", "style", "title", "value", 4, "ngFor", "ngForOf"], [1, "cs-pointer", 3, "click"], [1, "p-mr-1", "p-text-truncate", 3, "rounded", "styleClass", "title", "value"], [1, "far", "fa-times-circle", "p-mr-1", "cs-pointer", 3, "click"], [1, "min-height-23"], [1, "p-text-truncate", "p-d-inline-block", "p-width-85"], ["class", "p-text-normal", 3, "title", 4, "ngIf"], ["class", "p-text-normal", 4, "ngIf"], [1, "fas", "fa-ellipsis-h", "p-ml-1", "vertical-top", "cs-pointer", 3, "ngClass", "title", "click"], [1, "p-text-normal", 3, "title"], [1, "p-text-normal"], ["pSortableColumn", "name", 1, "p-text-left", 2, "width", "40%"], ["pSortableColumn", "modifyDate", 1, "p-d-none", "p-d-lg-table-cell", "p-text-left", 2, "width", "25%"], ["field", "modifyDate"], [1, "p-d-none", "p-d-lg-table-cell", "p-text-left", 2, "width", "20%"], [1, "p-d-none", "p-d-lg-table-cell", "p-text-left", 2, "width", "15%"], ["pDraggable", "fileInfos", "pDroppable", "fileInfos", 3, "ngClass", "pContextMenuRowDisabled", "pContextMenuRow", "pSelectableRowDisabled", "pSelectableRowIndex", "pSelectableRow", "dblclick", "onDragStart", "onDrop"], ["pEditableColumn", "", 1, "p-text-left", "p-text-13"], [1, "p-grid", "p-mt-0"], ["class", "p-col-1 p-py-0", 4, "ngIf"], [1, "p-col-11", "p-text-truncate", "p-py-0"], [1, "p-pl-1", 3, "ngClass", "title"], [1, "p-pl-4", "p-pt-1"], ["styleClass", "p-tag-secondary p-mr-1 p-mb-1", 3, "value", "click", 4, "ngIf"], ["class", "p-text-truncate", 3, "rounded", "styleClass", "style", "id", "title", "value", 4, "ngFor", "ngForOf"], [1, "p-text-right", "p-col-2"], [1, "p-col-1", "p-py-0"], ["alt", "689Cloud folder", "src", "assets/images/ui/folder-lock-24.png", 3, "ngClass", 4, "ngIf"], ["alt", "689Cloud folder", "src", "assets/images/ui/folder-24.png", 3, "ngClass", 4, "ngIf"], ["alt", "689Cloud folder", "src", "assets/images/ui/folder-share-lock-24.png", 3, "ngClass", 4, "ngIf"], ["alt", "689Cloud folder", "src", "assets/images/ui/folder-share-24.png", 3, "ngClass", 4, "ngIf"], ["alt", "689Cloud folder", "src", "assets/images/ui/folder-lock-24.png", 3, "ngClass"], ["alt", "689Cloud folder", "src", "assets/images/ui/folder-24.png", 3, "ngClass"], ["alt", "689Cloud folder", "src", "assets/images/ui/folder-share-lock-24.png", 3, "ngClass"], ["alt", "689Cloud folder", "src", "assets/images/ui/folder-share-24.png", 3, "ngClass"], [1, "p-d-inline-flex", "p-align-center", "file-icon", 3, "ngSwitch"], [3, "ngSwitch", 4, "ngSwitchCase"], [3, "ngSwitch"], ["class", "far fa-file", 4, "ngSwitchCase"], ["styleClass", "p-tag-secondary p-mr-1 p-mb-1", 3, "value", "click"], [1, "p-text-truncate", 3, "rounded", "styleClass", "id", "title", "value"], ["class", "p-tag p-tag-success", 4, "ngSwitchCase"], ["class", "p-tag p-tag-primary", 4, "ngSwitchCase"], ["class", "p-tag p-tag-secondary", 4, "ngSwitchCase"], [1, "p-tag", "p-tag-success"], [1, "p-tag", "p-tag-primary"], [1, "p-tag", "p-tag-secondary"], [3, "ngClass"], ["class", "fas fa-cog cs-pointer p-mr-2", "tooltipPosition", "bottom", 3, "pTooltip", "click", 4, "ngIf"], ["class", "fas fa-spin fa-spinner", "tooltipPosition", "bottom", 3, "ngClass", "pTooltip", 4, "ngIf"], ["tooltipPosition", "bottom", 1, "fas", "fa-cog", "cs-pointer", "p-mr-2", 3, "pTooltip", "click"], ["tooltipPosition", "bottom", 1, "fas", "fa-spin", "fa-spinner", 3, "ngClass", "pTooltip"], [1, "p-d-inline-flex", "p-align-center"], ["class", "p-mr-2", 4, "ngIf"], ["class", "fas fa-chart-bar p-pr-2", "tooltipPosition", "bottom", 3, "routerLink", "pTooltip", 4, "ngIf"], ["class", "fas fa-info-circle p-pr-2", "tooltipPosition", "bottom", 3, "pTooltip", "click", 4, "ngIf"], ["class", "far fa-comments p-pr-2 po-relative", "tooltipPosition", "bottom", 3, "pTooltip", "click", 4, "ngIf"], ["class", "fas fa-language p-mr-2", "tooltipPosition", "bottom", 3, "pTooltip", "click", 4, "ngIf"], ["class", "fas fa-spin fa-spinner p-mr-2", "tooltipPosition", "bottom", 3, "pTooltip", 4, "ngIf"], ["class", "fas fa-shield-alt text-primary p-mr-2", "tooltipPosition", "bottom", 3, "pTooltip", "click", 4, "ngIf"], ["class", "fas fa-lock p-mr-2", "tooltipPosition", "bottom", 3, "pTooltip", "click", 4, "ngIf"], ["class", "fas fa-spin fa-spinner", "tooltipPosition", "bottom", 3, "pTooltip", 4, "ngIf"], ["alt", "security-denied", "class", "p-mr-2", "src", "assets/images/ui/security-denied-24.png", "tooltipPosition", "bottom", "width", "17", 3, "pTooltip", "click", 4, "ngIf"], ["tooltipPosition", "bottom", 1, "fas", "fa-language", "p-mr-2", 3, "pTooltip", "click"], ["tooltipPosition", "bottom", 1, "fas", "fa-spin", "fa-spinner", "p-mr-2", 3, "pTooltip"], ["tooltipPosition", "bottom", 1, "fas", "fa-shield-alt", "text-primary", "p-mr-2", 3, "pTooltip", "click"], ["tooltipPosition", "bottom", 1, "fas", "fa-lock", "p-mr-2", 3, "pTooltip", "click"], ["tooltipPosition", "bottom", 1, "fas", "fa-spin", "fa-spinner", 3, "pTooltip"], [1, "p-mr-2"], ["alt", "security-denied", "src", "assets/images/ui/security-denied-24.png", "tooltipPosition", "bottom", "width", "17", 1, "p-mr-2", 3, "pTooltip", "click"], [1, "p-mr-3"], ["tooltipPosition", "bottom", 1, "fas", "fa-chart-bar", "p-pr-2", 3, "routerLink", "pTooltip"], ["tooltipPosition", "bottom", 1, "fas", "fa-info-circle", "p-pr-2", 3, "pTooltip", "click"], ["tooltipPosition", "bottom", 1, "far", "fa-comments", "p-pr-2", "po-relative", 3, "pTooltip", "click"], ["class", "fas fa-plus-circle icon-top", 4, "ngIf"], [1, "fas", "fa-plus-circle", "icon-top"], ["colspan", "7", 1, "p-text-center", "p-d-none", "p-d-lg-table-cell"], [1, "p-col-12", "p-text-center"], [1, "lds-loading"], ["height", "100%", "width", "100%", 1, "loading-style"], [3, "labelFilter", "labelMode", "labelIsSelected"], [3, "emailView", "file", "projectId", "watermarkSetting", "isClose"], [3, "file", "projectId", "userFolderRole", "isBrowseFile"], [1, "p-pt-2", 3, "formGroup"], [1, "p-fluid", "p-formgrid", "p-grid"], [1, "p-field", "p-col-12"], [1, "p-float-label"], ["autocomplete", "off", "autofocus", "", "formControlName", "name", "id", "name", "maxlength", "64", "pInputText", "", "type", "text", 3, "ngModel", "ngClass", "ngModelChange", "keyup"], ["for", "name"], ["class", "p-error", 4, "ngIf"], [1, "p-error"], [1, "p-col-12", "p-text-right", "p-pr-0"], ["icon", "fas fa-times", "pButton", "", "pRipple", "", "type", "button", 1, "p-button-raised", "p-button-warning", 3, "label", "click"], ["class", "p-button-raised p-mr-0", "icon", "fas fa-plus", "pButton", "", "pRipple", "", "type", "submit", 3, "disabled", "label", "click", 4, "ngIf"], ["icon", "fas fa-plus", "pButton", "", "pRipple", "", "type", "submit", 1, "p-button-raised", "p-mr-0", 3, "disabled", "label", "click"], [3, "projectId", "selectedValues", "selectedFolder"], ["class", "p-button-raised p-mr-0", "pButton", "", "pRipple", "", "type", "button", 3, "disabled", "icon", "label", "click", 4, "ngIf"], ["pButton", "", "pRipple", "", "type", "button", 1, "p-button-raised", "p-mr-0", 3, "disabled", "icon", "label", "click"], [3, "file", "projectId", "doLoadLabelFile", "doLoadAllLabels"], [3, "folder", "projectId", "updateSettingSuccess"], [3, "projectId", "userFolderRole"], ["commentComponent", ""], [3, "projectId"], ["activityDetailComponent", ""], [3, "folderId", "projectId", "cancel"], [3, "name", "projectId", "folderId", "fileId", "typeShare"], ["linkCreateComponent", ""], ["icon", "fas fa-times", "pButton", "", "pRipple", "", "type", "button", 1, "p-button-raised", "p-button-warning", "p-mr-2", 3, "label", "click"], ["icon", "fas fa-plus", "pButton", "", "pRipple", "", "type", "button", 1, "p-button-raised", "p-mr-0", 3, "label", "click"], [3, "linkData", "projectId", "isPublicView"], ["linkSettingComponent", ""], ["icon", "fas fa-times", "pButton", "", "pRipple", "", "type", "button", 1, "p-button-raised", "p-button-danger", "p-mr-2", 3, "label", "click"], ["icon", "fas fa-check", "pButton", "", "pRipple", "", "type", "button", 1, "p-button-raised", "p-mr-0", 3, "label", "click"], ["projectDrmSettingComponent", ""], ["icon", "fas fa-shield-alt", "pButton", "", "pRipple", "", "type", "button", 1, "p-button-raised", "p-mr-0", 3, "label", "click"], [3, "projectId", "folderId", "fileId", "file", "projectRoleId", "done", "doDecode"], [3, "file"], ["fileTranslationComponent", ""], ["icon", "fas fa-language", "pButton", "", "pRipple", "", "type", "button", 1, "p-button-raised", "p-mr-0", 3, "label", "disabled", "click"]], template: function ProjectDetailComponent_Template(rf, ctx) { if (rf & 1) {
        const _r314 = i0.ɵɵgetCurrentView();
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵtext(1);
        i0.ɵɵpipe(2, "titlecase");
        i0.ɵɵpipe(3, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(4, "p-breadcrumb", 1);
        i0.ɵɵlistener("onDrop", function ProjectDetailComponent_Template_p_breadcrumb_onDrop_4_listener($event) { return ctx.dropInBreadcrumb($event); });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(5, "div", 2);
        i0.ɵɵelementStart(6, "p-toolbar");
        i0.ɵɵelement(7, "div", 3);
        i0.ɵɵelementStart(8, "div", 4);
        i0.ɵɵelementStart(9, "p-dialog", 5);
        i0.ɵɵlistener("visibleChange", function ProjectDetailComponent_Template_p_dialog_visibleChange_9_listener($event) { return ctx.displayProgress = $event; })("onHide", function ProjectDetailComponent_Template_p_dialog_onHide_9_listener($event) { return ctx.onHideUploadFile($event); });
        i0.ɵɵpipe(10, "translate");
        i0.ɵɵtemplate(11, ProjectDetailComponent_div_11_Template, 25, 22, "div", 6);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(12, "p-dialog", 7);
        i0.ɵɵlistener("onHide", function ProjectDetailComponent_Template_p_dialog_onHide_12_listener() { return ctx.onCancelDupFile(); })("visibleChange", function ProjectDetailComponent_Template_p_dialog_visibleChange_12_listener($event) { return ctx.displayDupFile = $event; });
        i0.ɵɵpipe(13, "translate");
        i0.ɵɵelementStart(14, "p-messages", 8);
        i0.ɵɵtemplate(15, ProjectDetailComponent_ng_template_15_Template, 2, 3, "ng-template", 9);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(16, "span", 10);
        i0.ɵɵelement(17, "i", 11);
        i0.ɵɵelementStart(18, "input", 12);
        i0.ɵɵlistener("keyup", function ProjectDetailComponent_Template_input_keyup_18_listener($event) { return ctx.doSearchDup($event); });
        i0.ɵɵpipe(19, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(20, "p-table", 13);
        i0.ɵɵtemplate(21, ProjectDetailComponent_ng_template_21_Template, 10, 8, "ng-template", 14);
        i0.ɵɵtemplate(22, ProjectDetailComponent_ng_template_22_Template, 8, 3, "ng-template", 15);
        i0.ɵɵtemplate(23, ProjectDetailComponent_23_Template, 1, 0, undefined, 16);
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(24, ProjectDetailComponent_ng_template_24_Template, 6, 11, "ng-template", 17);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(25, "p-dialog", 7);
        i0.ɵɵlistener("onHide", function ProjectDetailComponent_Template_p_dialog_onHide_25_listener() { return ctx.displayDupFileLocal = false; })("visibleChange", function ProjectDetailComponent_Template_p_dialog_visibleChange_25_listener($event) { return ctx.displayDupFileLocal = $event; });
        i0.ɵɵpipe(26, "translate");
        i0.ɵɵelementStart(27, "p-messages", 8);
        i0.ɵɵtemplate(28, ProjectDetailComponent_ng_template_28_Template, 2, 3, "ng-template", 9);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(29, "p-table", 13);
        i0.ɵɵtemplate(30, ProjectDetailComponent_ng_template_30_Template, 9, 8, "ng-template", 14);
        i0.ɵɵtemplate(31, ProjectDetailComponent_ng_template_31_Template, 9, 4, "ng-template", 15);
        i0.ɵɵtemplate(32, ProjectDetailComponent_32_Template, 1, 0, undefined, 16);
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(33, ProjectDetailComponent_ng_template_33_Template, 2, 1, "ng-template", 17);
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(34, ProjectDetailComponent_button_34_Template, 6, 3, "button", 18);
        i0.ɵɵelementStart(35, "p-overlayPanel", 19, 20);
        i0.ɵɵtemplate(37, ProjectDetailComponent_ng_template_37_Template, 19, 12, "ng-template", 9);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(38, "input", 21);
        i0.ɵɵlistener("change", function ProjectDetailComponent_Template_input_change_38_listener($event) { return ctx.onUploadFolder($event); });
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(39, ProjectDetailComponent_button_39_Template, 6, 6, "button", 22);
        i0.ɵɵtemplate(40, ProjectDetailComponent_button_40_Template, 6, 6, "button", 22);
        i0.ɵɵelementStart(41, "button", 23);
        i0.ɵɵlistener("click", function ProjectDetailComponent_Template_button_click_41_listener($event) { i0.ɵɵrestoreView(_r314); const _r16 = i0.ɵɵreference(45); return _r16.toggle($event); });
        i0.ɵɵpipe(42, "translate");
        i0.ɵɵelement(43, "i", 24);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(44, "p-overlayPanel", 19, 25);
        i0.ɵɵtemplate(46, ProjectDetailComponent_ng_template_46_Template, 5, 4, "ng-template", 9);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(47, "ngx-file-drop", 26);
        i0.ɵɵlistener("onFileDrop", function ProjectDetailComponent_Template_ngx_file_drop_onFileDrop_47_listener($event) { return ctx.dropped($event); })("onFileLeave", function ProjectDetailComponent_Template_ngx_file_drop_onFileLeave_47_listener($event) { return ctx.fileLeave($event); })("onFileOver", function ProjectDetailComponent_Template_ngx_file_drop_onFileOver_47_listener($event) { return ctx.fileOver($event); });
        i0.ɵɵtemplate(48, ProjectDetailComponent_ng_template_48_Template, 27, 29, "ng-template", 27);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(49, ProjectDetailComponent_p_skeleton_49_Template, 1, 0, "p-skeleton", 28);
        i0.ɵɵelementStart(50, "p-overlayPanel", 29, 30);
        i0.ɵɵtemplate(52, ProjectDetailComponent_ng_template_52_Template, 1, 2, "ng-template", 9);
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(53, ProjectDetailComponent_app_view_online_form_53_Template, 1, 4, "app-view-online-form", 31);
        i0.ɵɵelementStart(54, "p-dialog", 32);
        i0.ɵɵlistener("onHide", function ProjectDetailComponent_Template_p_dialog_onHide_54_listener() { return ctx.doCloseDialog(); })("visibleChange", function ProjectDetailComponent_Template_p_dialog_visibleChange_54_listener($event) { return ctx.isShowModalDialog = $event; });
        i0.ɵɵtemplate(55, ProjectDetailComponent_app_file_version_55_Template, 1, 3, "app-file-version", 33);
        i0.ɵɵtemplate(56, ProjectDetailComponent_p_56_Template, 3, 3, "p", 16);
        i0.ɵɵtemplate(57, ProjectDetailComponent_form_57_Template, 9, 7, "form", 34);
        i0.ɵɵtemplate(58, ProjectDetailComponent_ng_template_58_Template, 7, 10, "ng-template", 17);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(59, "p-dialog", 35);
        i0.ɵɵlistener("visibleChange", function ProjectDetailComponent_Template_p_dialog_visibleChange_59_listener($event) { return ctx.isShowTree = $event; });
        i0.ɵɵtemplate(60, ProjectDetailComponent_app_folder_tree_60_Template, 1, 2, "app-folder-tree", 36);
        i0.ɵɵtemplate(61, ProjectDetailComponent_div_61_Template, 5, 4, "div", 16);
        i0.ɵɵtemplate(62, ProjectDetailComponent_ng_template_62_Template, 7, 10, "ng-template", 17);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(63, "p-sidebar", 37);
        i0.ɵɵlistener("onHide", function ProjectDetailComponent_Template_p_sidebar_onHide_63_listener() { return ctx.doCloseFileInfo(); })("visibleChange", function ProjectDetailComponent_Template_p_sidebar_visibleChange_63_listener($event) { return ctx.isViewItemInfo = $event; });
        i0.ɵɵtemplate(64, ProjectDetailComponent_app_file_info_64_Template, 1, 2, "app-file-info", 38);
        i0.ɵɵtemplate(65, ProjectDetailComponent_app_folder_info_65_Template, 1, 2, "app-folder-info", 39);
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(66, ProjectDetailComponent_app_comment_66_Template, 2, 2, "app-comment", 40);
        i0.ɵɵelementStart(67, "p-sidebar", 37);
        i0.ɵɵlistener("onHide", function ProjectDetailComponent_Template_p_sidebar_onHide_67_listener() { return ctx.isShowActivity = false; })("visibleChange", function ProjectDetailComponent_Template_p_sidebar_visibleChange_67_listener($event) { return ctx.isShowActivity = $event; });
        i0.ɵɵtemplate(68, ProjectDetailComponent_app_activity_detail_68_Template, 2, 1, "app-activity-detail", 41);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(69, "p-dialog", 42);
        i0.ɵɵlistener("visibleChange", function ProjectDetailComponent_Template_p_dialog_visibleChange_69_listener($event) { return ctx.isShowCollaborator = $event; });
        i0.ɵɵpipe(70, "translate");
        i0.ɵɵtemplate(71, ProjectDetailComponent_app_collaborator_71_Template, 1, 2, "app-collaborator", 43);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(72, "p-dialog", 44);
        i0.ɵɵlistener("onHide", function ProjectDetailComponent_Template_p_dialog_onHide_72_listener() { return ctx.displayShareModal = false; })("visibleChange", function ProjectDetailComponent_Template_p_dialog_visibleChange_72_listener($event) { return ctx.displayShareModal = $event; });
        i0.ɵɵpipe(73, "translate");
        i0.ɵɵtemplate(74, ProjectDetailComponent_app_link_create_74_Template, 2, 5, "app-link-create", 45);
        i0.ɵɵtemplate(75, ProjectDetailComponent_ng_template_75_Template, 7, 10, "ng-template", 17);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(76, "p-dialog", 46);
        i0.ɵɵlistener("onHide", function ProjectDetailComponent_Template_p_dialog_onHide_76_listener() { return ctx.displayShareSettingModal = false; })("visibleChange", function ProjectDetailComponent_Template_p_dialog_visibleChange_76_listener($event) { return ctx.displayShareSettingModal = $event; });
        i0.ɵɵpipe(77, "uppercase");
        i0.ɵɵpipe(78, "translate");
        i0.ɵɵtemplate(79, ProjectDetailComponent_app_link_setting_79_Template, 2, 3, "app-link-setting", 47);
        i0.ɵɵtemplate(80, ProjectDetailComponent_ng_template_80_Template, 7, 10, "ng-template", 17);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(81, "p-dialog", 48);
        i0.ɵɵlistener("onHide", function ProjectDetailComponent_Template_p_dialog_onHide_81_listener() { return ctx.onCloseDrmSettings(); })("visibleChange", function ProjectDetailComponent_Template_p_dialog_visibleChange_81_listener($event) { return ctx.displayDrmModal = $event; });
        i0.ɵɵpipe(82, "translate");
        i0.ɵɵtemplate(83, ProjectDetailComponent_app_project_drm_setting_83_Template, 2, 0, "app-project-drm-setting", 16);
        i0.ɵɵtemplate(84, ProjectDetailComponent_ng_template_84_Template, 7, 10, "ng-template", 17);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(85, "p-sidebar", 37);
        i0.ɵɵlistener("onHide", function ProjectDetailComponent_Template_p_sidebar_onHide_85_listener() { return ctx.isShowFileDrmSetting = false; })("visibleChange", function ProjectDetailComponent_Template_p_sidebar_visibleChange_85_listener($event) { return ctx.isShowFileDrmSetting = $event; });
        i0.ɵɵtemplate(86, ProjectDetailComponent_app_file_drm_setting_86_Template, 1, 5, "app-file-drm-setting", 49);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(87, "p-dialog", 48);
        i0.ɵɵlistener("onHide", function ProjectDetailComponent_Template_p_dialog_onHide_87_listener() { return ctx.onCloseTranslationFile(); })("visibleChange", function ProjectDetailComponent_Template_p_dialog_visibleChange_87_listener($event) { return ctx.isShowTranslation = $event; });
        i0.ɵɵpipe(88, "translate");
        i0.ɵɵtemplate(89, ProjectDetailComponent_app_file_translation_89_Template, 2, 1, "app-file-translation", 50);
        i0.ɵɵtemplate(90, ProjectDetailComponent_ng_template_90_Template, 7, 11, "ng-template", 17);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵadvance(1);
        i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 143, i0.ɵɵpipeBind1(3, 145, "label.project_detail")), "\n");
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("model", ctx.pathItems);
        i0.ɵɵadvance(5);
        i0.ɵɵstyleMap(i0.ɵɵpureFunction0(169, _c7));
        i0.ɵɵproperty("visible", ctx.displayProgress)("baseZIndex", 10000)("header", i0.ɵɵpipeBind1(10, 147, "label.upload_header"))("position", "bottom-right");
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngForOf", ctx.uploadFiles);
        i0.ɵɵadvance(1);
        i0.ɵɵstyleMap(i0.ɵɵpureFunction0(170, _c8));
        i0.ɵɵproperty("visible", ctx.displayDupFile)("baseZIndex", 10001)("draggable", false)("header", i0.ɵɵpipeBind1(13, 149, "label.duplicate_files"))("modal", true)("resizable", false);
        i0.ɵɵadvance(6);
        i0.ɵɵpropertyInterpolate("placeholder", i0.ɵɵpipeBind1(19, 151, "label.search"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("rowHover", true)("value", ctx.dupFiles);
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("ngIf", !ctx.loading);
        i0.ɵɵadvance(2);
        i0.ɵɵstyleMap(i0.ɵɵpureFunction0(171, _c8));
        i0.ɵɵproperty("visible", ctx.displayDupFileLocal)("baseZIndex", 10001)("draggable", false)("header", i0.ɵɵpipeBind1(26, 153, "label.duplicate_files_local"))("modal", true)("resizable", false);
        i0.ɵɵadvance(4);
        i0.ɵɵproperty("rowHover", true)("value", ctx.localDupFiles);
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("ngIf", !ctx.loading);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.userFolderRole === ctx.projectRole.Owner || ctx.userFolderRole === ctx.projectRole.Editor || ctx.userFolderRole === ctx.projectRole.ViewerUploader || ctx.userFolderRole === ctx.projectRole.PreviewerUploader || ctx.userFolderRole === ctx.projectRole.Uploader);
        i0.ɵɵadvance(1);
        i0.ɵɵstyleMap(i0.ɵɵpureFunction0(172, _c9));
        i0.ɵɵproperty("hideTransitionOptions", "100ms")("showTransitionOptions", "100ms");
        i0.ɵɵadvance(4);
        i0.ɵɵproperty("ngIf", ctx.userFolderRole === ctx.projectRole.Owner || ctx.userFolderRole === ctx.projectRole.Editor);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.userFolderRole === ctx.projectRole.Owner || ctx.userFolderRole === ctx.projectRole.Editor || ctx.userFolderRole === ctx.projectRole.Viewer || ctx.userFolderRole === ctx.projectRole.ViewerUploader);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("pTooltip", i0.ɵɵpipeBind1(42, 155, "label.more_option"));
        i0.ɵɵadvance(3);
        i0.ɵɵstyleMap(i0.ɵɵpureFunction0(173, _c10));
        i0.ɵɵproperty("hideTransitionOptions", "100ms")("showTransitionOptions", "100ms");
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("contentClassName", "content-custom")("dropZoneClassName", "border-custom");
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.loading);
        i0.ɵɵadvance(1);
        i0.ɵɵstyleMap(i0.ɵɵpureFunction0(174, _c11));
        i0.ɵɵproperty("showCloseIcon", true);
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("ngIf", ctx.isCheckViewOnline);
        i0.ɵɵadvance(1);
        i0.ɵɵpropertyInterpolate("header", ctx.headerDialog);
        i0.ɵɵproperty("visible", ctx.isShowModalDialog)("baseZIndex", 10000)("draggable", false)("modal", true)("resizable", false)("styleClass", ctx.modalMode === "download_zip" ? "custom-dialog" : ctx.modalMode === "version" ? "version-dialog" : "rename-dialog");
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.isShowModalDialog && ctx.modalMode === "version");
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.isShowModalDialog && ctx.modalMode === "download_zip");
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.isShowModalDialog && ctx.modalMode === "edit");
        i0.ɵɵadvance(2);
        i0.ɵɵstyleMap(i0.ɵɵpureFunction0(175, _c12));
        i0.ɵɵproperty("visible", ctx.isShowTree)("baseZIndex", 10000)("contentStyle", i0.ɵɵpureFunction0(176, _c13))("draggable", false)("header", ctx.headerTree)("modal", true)("resizable", false);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.isShowTree && !ctx.showError);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.isShowTree && ctx.showError);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("visible", ctx.isViewItemInfo)("autoZIndex", false)("baseZIndex", 1007)("closeOnEscape", true);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.isViewItemInfo && ctx.infoMode === "file");
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.isViewItemInfo && ctx.infoMode === "folder");
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.userFolderRole);
        i0.ɵɵadvance(1);
        i0.ɵɵstyleMap(i0.ɵɵpureFunction0(177, _c14));
        i0.ɵɵproperty("visible", ctx.isShowActivity)("autoZIndex", false)("baseZIndex", 1007)("closeOnEscape", true);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.isShowActivity);
        i0.ɵɵadvance(1);
        i0.ɵɵstyleMap(i0.ɵɵpureFunction0(178, _c15));
        i0.ɵɵpropertyInterpolate("header", i0.ɵɵpipeBind1(70, 157, "label.collaborators"));
        i0.ɵɵproperty("visible", ctx.isShowCollaborator)("baseZIndex", 1)("breakpoints", i0.ɵɵpureFunction0(179, _c16))("draggable", false)("modal", true)("resizable", false);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.isShowCollaborator);
        i0.ɵɵadvance(1);
        i0.ɵɵstyleMap(i0.ɵɵpureFunction0(180, _c15));
        i0.ɵɵpropertyInterpolate("header", i0.ɵɵpipeBind1(73, 159, "label.create_link"));
        i0.ɵɵproperty("visible", ctx.displayShareModal)("baseZIndex", 1)("breakpoints", i0.ɵɵpureFunction0(181, _c16))("draggable", false)("modal", true)("blockScroll", true)("resizable", false);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.displayShareModal);
        i0.ɵɵadvance(2);
        i0.ɵɵstyleMap(i0.ɵɵpureFunction0(182, _c15));
        i0.ɵɵpropertyInterpolate("header", i0.ɵɵpipeBind1(77, 161, i0.ɵɵpipeBind1(78, 163, "label.share_link")));
        i0.ɵɵproperty("visible", ctx.displayShareSettingModal)("baseZIndex", 1)("breakpoints", i0.ɵɵpureFunction0(183, _c16))("draggable", false)("modal", true)("blockScroll", true)("resizable", false);
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("ngIf", ctx.displayShareSettingModal);
        i0.ɵɵadvance(2);
        i0.ɵɵstyleMap(i0.ɵɵpureFunction0(184, _c15));
        i0.ɵɵpropertyInterpolate("header", i0.ɵɵpipeBind1(82, 165, "label.drm_settings"));
        i0.ɵɵproperty("visible", ctx.displayDrmModal)("baseZIndex", 1)("breakpoints", i0.ɵɵpureFunction0(185, _c16))("draggable", false)("modal", true)("resizable", false);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.displayDrmModal);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("visible", ctx.isShowFileDrmSetting)("autoZIndex", false)("baseZIndex", 1007)("closeOnEscape", true);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.isShowFileDrmSetting);
        i0.ɵɵadvance(1);
        i0.ɵɵstyleMap(i0.ɵɵpureFunction0(186, _c15));
        i0.ɵɵpropertyInterpolate("header", i0.ɵɵpipeBind1(88, 167, "label.translation_file"));
        i0.ɵɵproperty("visible", ctx.isShowTranslation)("baseZIndex", 1)("breakpoints", i0.ɵɵpureFunction0(187, _c16))("draggable", false)("modal", true)("resizable", false);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.isShowTranslation);
    } }, directives: [i16.Breadcrumb, i17.Droppable, i18.Toolbar, i19.Dialog, i9.NgForOf, i20.Messages, i8.PrimeTemplate, i21.InputText, i22.Table, i9.NgIf, i23.OverlayPanel, i24.ButtonDirective, i25.Ripple, i26.Tooltip, i27.NgxFileDropComponent, i27.NgxFileDropContentTemplateDirective, i28.Sidebar, i9.NgSwitch, i9.NgSwitchCase, i9.NgSwitchDefault, i29.CircleProgressComponent, i24.Button, i3.TranslateDirective, i22.SortableColumn, i22.SortIcon, i30.FileUpload, i9.NgClass, i7.RouterLink, i31.ContextMenu, i32.TieredMenu, i12.DefaultValueAccessor, i12.MaxLengthValidator, i12.NgControlStatus, i12.NgModel, i33.Tag, i17.Draggable, i22.ContextMenuRow, i22.SelectableRow, i22.EditableColumn, i34.Skeleton, i35.LabelListComponent, i36.ViewOnlineFormComponent, i37.FileVersionComponent, i12.ɵangular_packages_forms_forms_y, i12.NgControlStatusGroup, i12.FormGroupDirective, i12.FormControlName, i38.FolderTreeComponent, i39.FileInfoComponent, i40.FolderInfoComponent, i41.CommentComponent, i42.ActivityDetailComponent, i43.CollaboratorComponent, i44.LinkCreateComponent, i45.LinkSettingComponent, i46.ProjectDrmSettingComponent, i47.FileDrmSettingComponent, i48.FileTranslationComponent], pipes: [i9.TitleCasePipe, i3.TranslatePipe, i9.UpperCasePipe], styles: [".color-word[_ngcontent-%COMP%] {\n  color: #51a2e4;\n}\n\n.mb-24[_ngcontent-%COMP%] {\n  margin-bottom: 24px;\n}\n\n.width-300[_ngcontent-%COMP%] {\n  max-width: 300px;\n}\n\n.vertical-top[_ngcontent-%COMP%] {\n  vertical-align: top;\n}\n\n.border-custom[_ngcontent-%COMP%] {\n  border: none;\n  border-radius: 0;\n}\n\n.content-custom[_ngcontent-%COMP%] {\n  align-items: normal;\n}\n\n.lbl-name[_ngcontent-%COMP%] {\n  display: inline-grid;\n  align-content: center;\n}\n\n.min-height-23[_ngcontent-%COMP%] {\n  min-height: 23px;\n}\n\n.image-upload[_ngcontent-%COMP%]    > input[_ngcontent-%COMP%] {\n  display: none;\n}\n\n.image-upload[_ngcontent-%COMP%]   img[_ngcontent-%COMP%] {\n  width: 80px;\n  cursor: pointer;\n}\n\n.view-style[_ngcontent-%COMP%] {\n  z-index: 1007 !important;\n  position: fixed;\n}\n\n@media only screen and (min-width: 992px) {\n  .p-d-lg-table-cell[_ngcontent-%COMP%] {\n    display: table-cell !important;\n  }\n}\n\n@media screen and (min-width: 768px) {\n  .p-d-md-table-cell[_ngcontent-%COMP%] {\n    display: table-cell !important;\n  }\n}\n\n[_nghost-%COMP%]     .p-overlaypanel .p-overlaypanel-content {\n  padding: 0;\n}\n\n[_nghost-%COMP%]     .p-dataview .p-dataview-header {\n  padding-bottom: 0;\n  padding-top: 0;\n}\n\n[_nghost-%COMP%]     .p-datatable-responsive-demo .p-datatable-tbody > tr > td .p-column-title {\n  display: none;\n}\n\n[_nghost-%COMP%]     .p-button.p-fileupload-choose {\n  color: black;\n  background-color: white;\n  padding: 0 0 0 21px;\n}\n\n[_nghost-%COMP%]     .p-button.p-button-icon-only .p-button-icon-left, [_nghost-%COMP%]     .p-button.p-button-icon-only .p-button-icon-right {\n  font-size: 14px;\n}\n\n[_nghost-%COMP%]     .button-icon-custom > .p-fileupload {\n  margin-top: -7px;\n}\n\n[_nghost-%COMP%]     .button-icon-custom > .p-fileupload > .p-button.p-component > .p-button-icon {\n  width: 1rem;\n}\n\n[_nghost-%COMP%]     #dragZone {\n  min-height: 600px;\n  height: auto;\n}\n\n[_nghost-%COMP%]     .dropbox-chooser-header {\n  background-color: #cceeff;\n}\n\n[_nghost-%COMP%]     .loading-style {\n  position: fixed;\n  top: 9vh;\n  left: 0;\n  height: 100%;\n  width: 100%;\n}\n\n[_nghost-%COMP%]     .p-sidebar-right.p-sidebar-active {\n  overflow-y: auto !important;\n}\n\n[_nghost-%COMP%]     .p-sidebar-content {\n  overflow-y: hidden;\n  height: 100%;\n}\n\n[_nghost-%COMP%]     .text-dark {\n  color: #000000 !important;\n}\n\n[_nghost-%COMP%]     .p-max-width-100 {\n  max-width: 100%;\n}\n\n[_nghost-%COMP%]     .version-dialog {\n  width: 400px;\n  max-height: 50vh;\n}\n\n[_nghost-%COMP%]     .rename-dialog {\n  width: 400px;\n}\n\n[_nghost-%COMP%]     .p-width-85 {\n  max-width: 85%;\n}\n\n[_nghost-%COMP%]     .p-tag {\n  padding: 0.1rem 0.4rem !important;\n}\n\n[_nghost-%COMP%]     .p-tag-value {\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  font-size: 12px;\n  line-height: 16px;\n}\n\n@media screen and (max-width: 70rem) {\n  [_nghost-%COMP%]     #dragZone {\n    height: 400px;\n  }\n  [_nghost-%COMP%]     .p-datatable.p-datatable-responsive-demo .p-datatable-thead > tr > th, [_nghost-%COMP%]     .p-datatable.p-datatable-responsive-demo .p-datatable-tfoot > tr > td {\n    display: none !important;\n  }\n  [_nghost-%COMP%]     .p-datatable.p-datatable-responsive-demo .p-datatable-tbody > tr > td {\n    text-align: left;\n    display: block;\n    width: 100%;\n    float: left;\n    clear: left;\n    border: 0 none;\n  }\n  [_nghost-%COMP%]     .p-datatable.p-datatable-responsive-demo .p-datatable-tbody > tr > td .p-column-title {\n    padding: 0.4rem;\n    min-width: 30%;\n    display: inline-block;\n    margin: -0.4em 1em -0.4em -0.4rem;\n    font-weight: bold;\n  }\n  [_nghost-%COMP%]     .p-datatable.p-datatable-responsive-demo .p-datatable-tbody > tr > td:last-child {\n    border-bottom: 1px solid var(--surface-d);\n  }\n}\n\n.w-50[_ngcontent-%COMP%] {\n  width: 50%;\n}\n\n.po-relative[_ngcontent-%COMP%] {\n  position: relative;\n}\n\n.icon-top[_ngcontent-%COMP%] {\n  color: red;\n  font-size: 6px;\n  position: absolute;\n  right: 3px;\n}\n\n.project-name[_ngcontent-%COMP%] {\n  vertical-align: top;\n  line-height: 26px;\n}\n\n.folder-share[_ngcontent-%COMP%] {\n  filter: grayscale(100%);\n}\n\n.file-icon[_ngcontent-%COMP%] {\n  padding-left: 6px !important;\n}\n\n[_nghost-%COMP%]     .upload-dropdown-menu {\n  display: flex;\n  flex-direction: column;\n  padding: 4px 0;\n}\n\n[_nghost-%COMP%]     .upload-menu-item {\n  width: 100%;\n}\n\n[_nghost-%COMP%]     .upload-menu-item .folder-upload-label, [_nghost-%COMP%]     .upload-menu-item .cloud-upload-item {\n  display: flex;\n  align-items: center;\n  justify-content: flex-start;\n  text-align: left;\n  width: 100%;\n  padding: 10px 16px;\n  color: #495057;\n  cursor: pointer;\n  font-size: 14px;\n  margin-bottom: 0;\n  transition: background-color 0.2s;\n  white-space: normal;\n  line-height: 1.3;\n}\n\n[_nghost-%COMP%]     .upload-menu-item .folder-upload-label i:not(.pi), [_nghost-%COMP%]     .upload-menu-item .cloud-upload-item i:not(.pi) {\n  width: 1.5rem;\n  font-size: 16px;\n  color: #6c757d;\n  margin-right: 8px;\n  display: inline-flex;\n  align-items: center;\n  justify-content: flex-start;\n  flex-shrink: 0;\n}\n\n[_nghost-%COMP%]     .upload-menu-item .folder-upload-label .pi, [_nghost-%COMP%]     .upload-menu-item .cloud-upload-item .pi {\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n  flex-shrink: 0;\n  width: 1rem;\n  height: 1rem;\n  margin: 0;\n}\n\n[_nghost-%COMP%]     .upload-menu-item .folder-upload-label span, [_nghost-%COMP%]     .upload-menu-item .cloud-upload-item span {\n  flex: 1;\n}\n\n[_nghost-%COMP%]     .upload-menu-item .folder-upload-label:hover, [_nghost-%COMP%]     .upload-menu-item .cloud-upload-item:hover {\n  background-color: #f8f9fa;\n  color: #212529;\n}\n\n[_nghost-%COMP%]     .upload-menu-item .folder-upload-label:hover i, [_nghost-%COMP%]     .upload-menu-item .cloud-upload-item:hover i {\n  color: #3F51B5;\n}\n\n[_nghost-%COMP%]     .cloud-submenu {\n  display: flex;\n  flex-direction: column;\n  background-color: #f8f9fa;\n  border-top: 1px solid #e9ecef;\n  border-bottom: 1px solid #e9ecef;\n  padding: 4px 0;\n}\n\n[_nghost-%COMP%]     .cloud-submenu-item {\n  display: flex;\n  align-items: center;\n  justify-content: flex-start;\n  text-align: left;\n  width: 100%;\n  padding: 8px 16px 8px 36px;\n  color: #495057;\n  cursor: pointer;\n  font-size: 13px;\n  transition: background-color 0.2s;\n}\n\n[_nghost-%COMP%]     .cloud-submenu-item img {\n  margin-right: 8px;\n}\n\n[_nghost-%COMP%]     .cloud-submenu-item:hover {\n  background-color: #e9ecef;\n  color: #212529;\n}\n\n[_nghost-%COMP%]     {\n  \n}\n\n[_nghost-%COMP%]     .p-toolbar-group-right .p-button.p-button-outlined {\n  border: 1px solid #3F51B5 !important;\n  color: #3F51B5 !important;\n  display: inline-flex !important;\n  align-items: center !important;\n  justify-content: center !important;\n  text-align: center !important;\n}\n\n[_nghost-%COMP%]     .p-toolbar-group-right .p-button.p-button-outlined i {\n  color: #3F51B5 !important;\n}\n\n[_nghost-%COMP%]     .p-toolbar-group-right .p-button.p-button-outlined .p-button-label {\n  display: none !important;\n}\n\n[_nghost-%COMP%]     .p-toolbar-group-right .p-button.p-button-outlined.p-button-icon-only i {\n  margin: 0 !important;\n}\n\n[_nghost-%COMP%]     .p-toolbar-group-right .p-button.p-button-outlined:hover, [_nghost-%COMP%]     .p-toolbar-group-right .p-button.p-button-outlined:focus, [_nghost-%COMP%]     .p-toolbar-group-right .p-button.p-button-outlined:active, [_nghost-%COMP%]     .p-toolbar-group-right .p-button.p-button-outlined.p-button-active {\n  background-color: #f1f3f4 !important;\n  border-color: #3F51B5 !important;\n  color: #3F51B5 !important;\n}\n\n[_nghost-%COMP%]     .menu-file-upload {\n  width: 100%;\n}\n\n[_nghost-%COMP%]     .menu-file-upload .p-fileupload-choose {\n  background-color: transparent !important;\n  border: none !important;\n  color: #495057 !important;\n  padding: 10px 16px !important;\n  width: 100% !important;\n  display: flex !important;\n  align-items: center !important;\n  justify-content: flex-start !important;\n  text-align: left !important;\n  font-weight: normal !important;\n  font-size: 14px !important;\n  border-radius: 0 !important;\n  transition: background-color 0.2s;\n}\n\n[_nghost-%COMP%]     .menu-file-upload .p-fileupload-choose .p-button-icon {\n  width: 1.5rem !important;\n  font-size: 16px;\n  color: #6c757d;\n  margin-right: 8px !important;\n  margin-left: 0 !important;\n  display: inline-flex !important;\n  align-items: center !important;\n  justify-content: flex-start !important;\n}\n\n[_nghost-%COMP%]     .menu-file-upload .p-fileupload-choose .p-button-label {\n  flex: 1 !important;\n  text-align: left !important;\n  white-space: normal !important;\n  line-height: 1.3 !important;\n}\n\n[_nghost-%COMP%]     .menu-file-upload .p-fileupload-choose:hover {\n  background-color: #f8f9fa !important;\n  color: #212529 !important;\n}\n\n[_nghost-%COMP%]     .menu-file-upload .p-fileupload-choose:hover .p-button-icon {\n  color: #3F51B5 !important;\n}\n\n[_nghost-%COMP%]     .more-dropdown-menu {\n  display: flex;\n  flex-direction: column;\n  padding: 4px 0;\n}\n\n[_nghost-%COMP%]     .more-menu-item {\n  width: 100%;\n}\n\n[_nghost-%COMP%]     .more-menu-item .menu-item-content {\n  display: flex;\n  align-items: center;\n  justify-content: flex-start;\n  text-align: left;\n  width: 100%;\n  padding: 10px 16px;\n  color: #495057;\n  cursor: pointer;\n  font-size: 14px;\n  transition: background-color 0.2s;\n  white-space: normal;\n  line-height: 1.3;\n}\n\n[_nghost-%COMP%]     .more-menu-item .menu-item-content i {\n  width: 1.5rem;\n  font-size: 16px;\n  color: #6c757d;\n  margin-right: 8px;\n  display: inline-flex;\n  align-items: center;\n  justify-content: flex-start;\n  flex-shrink: 0;\n}\n\n[_nghost-%COMP%]     .more-menu-item .menu-item-content span {\n  flex: 1;\n}\n\n[_nghost-%COMP%]     .more-menu-item .menu-item-content:hover {\n  background-color: #f8f9fa;\n  color: #212529;\n}\n\n[_nghost-%COMP%]     .more-menu-item .menu-item-content:hover i {\n  color: #3F51B5;\n}\n/*# sourceMappingURL=data:application/json;base64,  */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ProjectDetailComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-project-detail',
                templateUrl: './project-detail.component.html',
                styleUrls: ['./project-detail.component.scss'],
            }]
    }], function () { return [{ type: i1.Title }, { type: i2.ProjectService }, { type: i3.TranslateService }, { type: i4.UploadService }, { type: i5.FolderService }, { type: i6.FileService }, { type: i7.Router }, { type: i8.MessageService }, { type: i9.DatePipe }, { type: i10.LabelService }, { type: i11.AuthService }, { type: i12.FormBuilder }, { type: i8.ConfirmationService }, { type: i13.TrashService }, { type: i14.DownloadService }, { type: i7.ActivatedRoute }, { type: i15.FileTranslationService }]; }, { commentComponent: [{
            type: core_1.ViewChild,
            args: ['commentComponent']
        }], activityDetailComponent: [{
            type: core_1.ViewChild,
            args: ['activityDetailComponent']
        }], linkCreateComponent: [{
            type: core_1.ViewChild,
            args: ['linkCreateComponent']
        }], linkSettingComponent: [{
            type: core_1.ViewChild,
            args: ['linkSettingComponent']
        }], projectDrmSettingComponent: [{
            type: core_1.ViewChild,
            args: ['projectDrmSettingComponent']
        }], fileTranslationComponent: [{
            type: core_1.ViewChild,
            args: ['fileTranslationComponent']
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/project/project-form/group/group.component.ts":
/*!************************************************************************************!*\
  !*** ./src/app/authentication-pages/project/project-form/group/group.component.ts ***!
  \************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.GroupComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! ../../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! ../../../../services/user-group.service */ "./src/app/services/user-group.service.ts"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! primeng/table */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-table.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
function GroupComponent_ng_template_1_Template(rf, ctx) { if (rf & 1) {
    const _r5 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 5);
    i0.ɵɵelementStart(1, "span", 6);
    i0.ɵɵelement(2, "i", 7);
    i0.ɵɵelementStart(3, "input", 8);
    i0.ɵɵlistener("keyup", function GroupComponent_ng_template_1_Template_input_keyup_3_listener() { i0.ɵɵrestoreView(_r5); const ctx_r4 = i0.ɵɵnextContext(); return ctx_r4.loadGroupsModalEvent(null, true); })("ngModelChange", function GroupComponent_ng_template_1_Template_input_ngModelChange_3_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r6 = i0.ɵɵnextContext(); return ctx_r6.paramsGroupModal.searchKey = $event; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "label", 9);
    i0.ɵɵtext(5);
    i0.ɵɵpipe(6, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("autocomplete", "off")("ngModel", ctx_r0.paramsGroupModal.searchKey);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 3, "label.search"));
} }
function GroupComponent_ng_template_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "th", 10);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelement(4, "p-sortIcon", 11);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "th", 12);
    i0.ɵɵtext(6);
    i0.ɵɵpipe(7, "translate");
    i0.ɵɵelement(8, "p-sortIcon", 13);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "label.name"), " ");
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(7, 4, "label.numbers_user"), " ");
} }
function GroupComponent_ng_template_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr", 14);
    i0.ɵɵelementStart(1, "td", 15);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "td", 16);
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const group_r7 = ctx.$implicit;
    const rowIndex_r8 = ctx.rowIndex;
    i0.ɵɵproperty("pSelectableRow", group_r7)("pSelectableRowIndex", rowIndex_r8);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(group_r7.name);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(group_r7.numberUser);
} }
function GroupComponent_ng_template_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "td", 17);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 1, "label.no_record"), "");
} }
class GroupComponent {
    constructor(authService, userGroupService) {
        this.authService = authService;
        this.userGroupService = userGroupService;
        this.displayModalGroup = false;
        this.appUtil = app_util_1.default;
        this.constant = app_constants_1.default;
        this.rowOptions = this.constant.DATA_VIEW.ROW_PER_PAGE_OPTIONS;
        this.selectedGroupsInModal = [];
        this.loadingModalGroup = true;
        this.first = 0;
        this.rows = 5;
        this.paramsGroupModal = {
            teamId: '',
            searchKey: '',
            sortField: 'numberUser',
            ascSort: false,
            pageNumber: 1,
            pageSize: 5,
        };
    }
    ngOnInit() {
        this.authUser = this.authService.getAuthUser;
        this.paramsGroupModal.teamId = this.authUser.teamId;
    }
    loadGroupsModalEvent(event, isSearch) {
        if (event) {
            this.paramsGroupModal.sortField = (event.sortField) ? event.sortField : 'numberUser';
            this.paramsGroupModal.ascSort = (event.sortOrder === 1);
            if (event.rows) {
                this.paramsGroupModal.pageNumber = (event.first / event.rows) + 1;
                this.paramsGroupModal.pageSize = event.rows;
            }
        }
        if (isSearch) {
            this.paramsGroupModal.pageNumber = 1;
            this.first = 0;
        }
        this.loadingModalGroup = true;
        if (this.pendingRequest) {
            this.pendingRequest.unsubscribe();
        }
        this.pendingRequest = this.userGroupService.getGroupsAllPaging(this.appUtil.toSnakeCaseKey(this.paramsGroupModal))
            .subscribe(response => {
            if (response.status === 200) {
                this.groups = response.data.content;
                this.totalRecords = response.data.totalElements;
            }
            this.loadingModalGroup = false;
        }, () => {
        });
    }
}
exports.GroupComponent = GroupComponent;
GroupComponent.ɵfac = function GroupComponent_Factory(t) { return new (t || GroupComponent)(i0.ɵɵdirectiveInject(i1.AuthService), i0.ɵɵdirectiveInject(i2.UserGroupService)); };
GroupComponent.ɵcmp = i0.ɵɵdefineComponent({ type: GroupComponent, selectors: [["app-group"]], decls: 5, vars: 12, consts: [["dataKey", "groupUserId", "selectionMode", "multiple", "styleClass", "p-datatable-striped", 3, "rowHover", "paginator", "lazy", "loading", "totalRecords", "sortField", "sortOrder", "value", "first", "rows", "selection", "metaKeySelection", "onLazyLoad", "firstChange", "selectionChange"], ["pTemplate", "caption"], ["pTemplate", "header"], ["pTemplate", "body"], ["pTemplate", "emptymessage"], [1, "p-d-flex", "p-ai-center", "p-jc-between"], [1, "p-float-label", "p-input-icon-left"], [1, "pi", "pi-search"], ["id", "search", "pInputText", "", "type", "text", "maxlength", "64", 3, "autocomplete", "ngModel", "keyup", "ngModelChange"], ["for", "search"], ["pSortableColumn", "groupName"], ["field", "groupName"], ["pSortableColumn", "numberUser", 2, "width", "30%"], ["field", "numberUser"], [3, "pSelectableRow", "pSelectableRowIndex"], [1, "p-text-truncate"], [1, "p-text-13", "p-text-center"], ["colspan", "2", 1, "p-text-center"]], template: function GroupComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "p-table", 0);
        i0.ɵɵlistener("onLazyLoad", function GroupComponent_Template_p_table_onLazyLoad_0_listener($event) { return ctx.loadGroupsModalEvent($event); })("firstChange", function GroupComponent_Template_p_table_firstChange_0_listener($event) { return ctx.first = $event; })("selectionChange", function GroupComponent_Template_p_table_selectionChange_0_listener($event) { return ctx.selectedGroupsInModal = $event; });
        i0.ɵɵtemplate(1, GroupComponent_ng_template_1_Template, 7, 5, "ng-template", 1);
        i0.ɵɵtemplate(2, GroupComponent_ng_template_2_Template, 9, 6, "ng-template", 2);
        i0.ɵɵtemplate(3, GroupComponent_ng_template_3_Template, 5, 4, "ng-template", 3);
        i0.ɵɵtemplate(4, GroupComponent_ng_template_4_Template, 4, 3, "ng-template", 4);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵproperty("rowHover", true)("paginator", ctx.totalRecords > 0)("lazy", true)("loading", ctx.loadingModalGroup)("totalRecords", ctx.totalRecords)("sortField", "numberUser")("sortOrder", -1)("value", ctx.groups)("first", ctx.first)("rows", ctx.rows)("selection", ctx.selectedGroupsInModal)("metaKeySelection", true);
    } }, directives: [i3.Table, i4.PrimeTemplate, i5.DefaultValueAccessor, i6.InputText, i5.MaxLengthValidator, i5.NgControlStatus, i5.NgModel, i3.SortableColumn, i3.SortIcon, i3.SelectableRow], pipes: [i7.TranslatePipe], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL3Byb2plY3QvcHJvamVjdC1mb3JtL2dyb3VwL2dyb3VwLmNvbXBvbmVudC5zY3NzIn0= */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(GroupComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-group',
                templateUrl: './group.component.html',
                styleUrls: ['./group.component.scss']
            }]
    }], function () { return [{ type: i1.AuthService }, { type: i2.UserGroupService }]; }, null); })();


/***/ }),

/***/ "./src/app/authentication-pages/project/project-form/member-group/member-group.component.ts":
/*!**************************************************************************************************!*\
  !*** ./src/app/authentication-pages/project/project-form/member-group/member-group.component.ts ***!
  \**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.MemberGroupComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! ../../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! ../../../../services/user-group.service */ "./src/app/services/user-group.service.ts"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! ../../../../services/collaborator.service */ "./src/app/services/collaborator.service.ts"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! primeng/table */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-table.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
function MemberGroupComponent_ng_template_1_Template(rf, ctx) { if (rf & 1) {
    const _r5 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 5);
    i0.ɵɵelementStart(1, "span", 6);
    i0.ɵɵelement(2, "i", 7);
    i0.ɵɵelementStart(3, "input", 8);
    i0.ɵɵlistener("keyup", function MemberGroupComponent_ng_template_1_Template_input_keyup_3_listener() { i0.ɵɵrestoreView(_r5); const ctx_r4 = i0.ɵɵnextContext(); return ctx_r4.loadGroupsModalEvent(null, true); })("ngModelChange", function MemberGroupComponent_ng_template_1_Template_input_ngModelChange_3_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r6 = i0.ɵɵnextContext(); return ctx_r6.paramsGroupModal.searchKey = $event; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "label", 9);
    i0.ɵɵtext(5);
    i0.ɵɵpipe(6, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("autocomplete", "off")("ngModel", ctx_r0.paramsGroupModal.searchKey);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 3, "label.search"));
} }
function MemberGroupComponent_ng_template_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "th", 10);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelement(4, "p-sortIcon", 11);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "th", 12);
    i0.ɵɵtext(6);
    i0.ɵɵpipe(7, "translate");
    i0.ɵɵelement(8, "p-sortIcon", 13);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(9, "th", 14);
    i0.ɵɵtext(10);
    i0.ɵɵpipe(11, "translate");
    i0.ɵɵelement(12, "p-sortIcon", 15);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("pSortableColumn", ctx_r1.authUser.lang === "ja" ? "firstName" : "lastName");
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 5, "label.name"), " ");
    i0.ɵɵadvance(2);
    i0.ɵɵpropertyInterpolate("field", ctx_r1.authUser.lang === "ja" ? "firstName" : "lastName");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(7, 7, "label.email_address"), " ");
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(11, 9, "label.role"), " ");
} }
function MemberGroupComponent_ng_template_3_span_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 24);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "label.project_role.owner"));
} }
function MemberGroupComponent_ng_template_3_span_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 25);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "label.project_role.editor"));
} }
function MemberGroupComponent_ng_template_3_span_9_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 26);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "label.project_role.viewer"));
} }
function MemberGroupComponent_ng_template_3_span_10_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 26);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "label.project_role.previewer"));
} }
function MemberGroupComponent_ng_template_3_span_11_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 26);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "label.project_role.viewer_uploader"));
} }
function MemberGroupComponent_ng_template_3_span_12_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 26);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "label.project_role.previewer_uploader"));
} }
function MemberGroupComponent_ng_template_3_span_13_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 26);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "label.project_role.uploader"));
} }
function MemberGroupComponent_ng_template_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr", 16);
    i0.ɵɵelementStart(1, "td", 17);
    i0.ɵɵtext(2);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "td", 18);
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "td", 19);
    i0.ɵɵelementStart(6, "span", 20);
    i0.ɵɵtemplate(7, MemberGroupComponent_ng_template_3_span_7_Template, 3, 3, "span", 21);
    i0.ɵɵtemplate(8, MemberGroupComponent_ng_template_3_span_8_Template, 3, 3, "span", 22);
    i0.ɵɵtemplate(9, MemberGroupComponent_ng_template_3_span_9_Template, 3, 3, "span", 23);
    i0.ɵɵtemplate(10, MemberGroupComponent_ng_template_3_span_10_Template, 3, 3, "span", 23);
    i0.ɵɵtemplate(11, MemberGroupComponent_ng_template_3_span_11_Template, 3, 3, "span", 23);
    i0.ɵɵtemplate(12, MemberGroupComponent_ng_template_3_span_12_Template, 3, 3, "span", 23);
    i0.ɵɵtemplate(13, MemberGroupComponent_ng_template_3_span_13_Template, 3, 3, "span", 23);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const member_r7 = ctx.$implicit;
    const rowIndex_r8 = ctx.rowIndex;
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵproperty("pSelectableRow", member_r7)("pSelectableRowIndex", rowIndex_r8);
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("title", ctx_r2.authUser.lang === "ja" ? member_r7.lastName + " " + member_r7.firstName : member_r7.firstName + " " + member_r7.lastName);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", ctx_r2.authUser.lang === "ja" ? member_r7.lastName + " " + member_r7.firstName : member_r7.firstName + " " + member_r7.lastName, "");
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("title", member_r7.emailAddress);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(member_r7.emailAddress);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngSwitch", member_r7.projectRoleId);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 1);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 3);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 4);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 5);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 6);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 7);
} }
function MemberGroupComponent_ng_template_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "td", 27);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 1, "label.no_record"), "");
} }
class MemberGroupComponent {
    constructor(authService, userGroupService, collaboratorService) {
        this.authService = authService;
        this.userGroupService = userGroupService;
        this.collaboratorService = collaboratorService;
        this.displayModalGroup = false;
        this.appUtil = app_util_1.default;
        this.constant = app_constants_1.default;
        this.rowOptions = this.constant.DATA_VIEW.ROW_PER_PAGE_OPTIONS;
        this.loadingModalGroup = true;
        this.first = 0;
        this.rows = 5;
        this.paramsGroupModal = {
            projectId: '',
            searchKey: '',
            sortField: 'role',
            ascSort: true,
            pageNumber: 1,
            pageSize: 5,
        };
    }
    ngOnInit() {
        this.authUser = this.authService.getAuthUser;
        this.paramsGroupModal.projectId = this.projectId;
    }
    loadGroupsModalEvent(event, isSearch) {
        if (event) {
            this.paramsGroupModal.sortField = (event.sortField) ? event.sortField : 'role';
            this.paramsGroupModal.ascSort = (event.sortOrder === 1);
            if (event.rows) {
                this.paramsGroupModal.pageNumber = (event.first / event.rows) + 1;
                this.paramsGroupModal.pageSize = event.rows;
            }
        }
        if (isSearch) {
            this.paramsGroupModal.pageNumber = 1;
            this.first = 0;
        }
        this.loadingModalGroup = true;
        if (this.pendingRequest) {
            this.pendingRequest.unsubscribe();
        }
        this.pendingRequest = this.collaboratorService.getMemberGroupCollaborator(this.folderId, this.groupId, this.appUtil.toSnakeCaseKey(this.paramsGroupModal))
            .subscribe(response => {
            if (response.status === 200) {
                this.members = response.data.content;
                this.totalRecords = response.data.totalElements;
            }
            this.loadingModalGroup = false;
        }, () => {
        });
    }
}
exports.MemberGroupComponent = MemberGroupComponent;
MemberGroupComponent.ɵfac = function MemberGroupComponent_Factory(t) { return new (t || MemberGroupComponent)(i0.ɵɵdirectiveInject(i1.AuthService), i0.ɵɵdirectiveInject(i2.UserGroupService), i0.ɵɵdirectiveInject(i3.CollaboratorService)); };
MemberGroupComponent.ɵcmp = i0.ɵɵdefineComponent({ type: MemberGroupComponent, selectors: [["app-member-group"]], inputs: { groupId: "groupId", projectId: "projectId", folderId: "folderId" }, decls: 5, vars: 12, consts: [["dataKey", "userId", "styleClass", "p-datatable-striped", 3, "rowHover", "paginator", "lazy", "loading", "totalRecords", "sortField", "sortOrder", "metaKeySelection", "value", "first", "rows", "rowsPerPageOptions", "onLazyLoad", "firstChange"], ["pTemplate", "caption"], ["pTemplate", "header"], ["pTemplate", "body"], ["pTemplate", "emptymessage"], [1, "p-d-flex", "p-ai-center", "p-jc-between"], [1, "p-float-label", "p-input-icon-left"], [1, "pi", "pi-search"], ["id", "search", "pInputText", "", "type", "text", "maxlength", "64", 3, "autocomplete", "ngModel", "keyup", "ngModelChange"], ["for", "search"], [1, "p-d-none", "p-d-md-table-cell", 3, "pSortableColumn"], [3, "field"], ["pSortableColumn", "mailAddress", 2, "width", "50%"], ["field", "mailAddress"], ["pSortableColumn", "role", 2, "width", "150px"], ["field", "role"], [3, "pSelectableRow", "pSelectableRowIndex"], [1, "p-d-none", "p-d-md-table-cell", "p-text-truncate", 3, "title"], [1, "p-text-13", "p-text-truncate", 3, "title"], [1, "p-text-13", "p-text-center"], [3, "ngSwitch"], ["class", "p-tag p-tag-success", 4, "ngSwitchCase"], ["class", "p-tag", 4, "ngSwitchCase"], ["class", "p-tag p-tag-secondary", 4, "ngSwitchCase"], [1, "p-tag", "p-tag-success"], [1, "p-tag"], [1, "p-tag", "p-tag-secondary"], ["colspan", "3", 1, "p-text-center"]], template: function MemberGroupComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "p-table", 0);
        i0.ɵɵlistener("onLazyLoad", function MemberGroupComponent_Template_p_table_onLazyLoad_0_listener($event) { return ctx.loadGroupsModalEvent($event); })("firstChange", function MemberGroupComponent_Template_p_table_firstChange_0_listener($event) { return ctx.first = $event; });
        i0.ɵɵtemplate(1, MemberGroupComponent_ng_template_1_Template, 7, 5, "ng-template", 1);
        i0.ɵɵtemplate(2, MemberGroupComponent_ng_template_2_Template, 13, 11, "ng-template", 2);
        i0.ɵɵtemplate(3, MemberGroupComponent_ng_template_3_Template, 14, 14, "ng-template", 3);
        i0.ɵɵtemplate(4, MemberGroupComponent_ng_template_4_Template, 4, 3, "ng-template", 4);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵproperty("rowHover", true)("paginator", ctx.totalRecords > 0)("lazy", true)("loading", ctx.loadingModalGroup)("totalRecords", ctx.totalRecords)("sortField", "role")("sortOrder", 1)("metaKeySelection", true)("value", ctx.members)("first", ctx.first)("rows", ctx.rows)("rowsPerPageOptions", ctx.rowOptions);
    } }, directives: [i4.Table, i5.PrimeTemplate, i6.DefaultValueAccessor, i7.InputText, i6.MaxLengthValidator, i6.NgControlStatus, i6.NgModel, i4.SortableColumn, i4.SortIcon, i4.SelectableRow, i8.NgSwitch, i8.NgSwitchCase], pipes: [i9.TranslatePipe], styles: ["@media screen and (min-width: 768px) {\n  .p-d-md-table-cell[_ngcontent-%COMP%] {\n    display: table-cell !important;\n  }\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvcHJvamVjdC9wcm9qZWN0LWZvcm0vbWVtYmVyLWdyb3VwL21lbWJlci1ncm91cC5jb21wb25lbnQuc2NzcyIsInNyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvcHJvamVjdC9wcm9qZWN0LWZvcm0vbWVtYmVyLWdyb3VwL21lbWJlci1ncm91cC5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFO0lBQ0UsOEJBQUE7RUNDRjtBQUNGIiwiZmlsZSI6InNyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvcHJvamVjdC9wcm9qZWN0LWZvcm0vbWVtYmVyLWdyb3VwL21lbWJlci1ncm91cC5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIkBtZWRpYSBzY3JlZW4gYW5kIChtaW4td2lkdGg6IDc2OHB4KSB7XG4gIC5wLWQtbWQtdGFibGUtY2VsbCB7XG4gICAgZGlzcGxheTogdGFibGUtY2VsbCAhaW1wb3J0YW50O1xuICB9XG59XG4iLCJAbWVkaWEgc2NyZWVuIGFuZCAobWluLXdpZHRoOiA3NjhweCkge1xuICAucC1kLW1kLXRhYmxlLWNlbGwge1xuICAgIGRpc3BsYXk6IHRhYmxlLWNlbGwgIWltcG9ydGFudDtcbiAgfVxufSJdfQ== */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MemberGroupComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-member-group',
                templateUrl: './member-group.component.html',
                styleUrls: ['./member-group.component.scss']
            }]
    }], function () { return [{ type: i1.AuthService }, { type: i2.UserGroupService }, { type: i3.CollaboratorService }]; }, { groupId: [{
            type: core_1.Input
        }], projectId: [{
            type: core_1.Input
        }], folderId: [{
            type: core_1.Input
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/project/project-form/project-collaborator/project-collaborator.component.ts":
/*!******************************************************************************************************************!*\
  !*** ./src/app/authentication-pages/project/project-form/project-collaborator/project-collaborator.component.ts ***!
  \******************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ProjectCollaboratorComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
const app_constants_1 = tslib_1.__importStar(__webpack_require__(/*! ../../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! ../../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! ../../../../services/user.service */ "./src/app/services/user.service.ts"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! ../../../../services/user-group.service */ "./src/app/services/user-group.service.ts"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! @ng-select/ng-select */ "./node_modules/@ng-select/ng-select/__ivy_ngcc__/fesm2015/ng-select-ng-select.js"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
const i10 = tslib_1.__importStar(__webpack_require__(/*! primeng/ripple */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-ripple.js"));
const i11 = tslib_1.__importStar(__webpack_require__(/*! primeng/dropdown */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dropdown.js"));
const i12 = tslib_1.__importStar(__webpack_require__(/*! primeng/checkbox */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-checkbox.js"));
const i13 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtextarea */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtextarea.js"));
const i14 = tslib_1.__importStar(__webpack_require__(/*! primeng/dialog */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dialog.js"));
const i15 = tslib_1.__importStar(__webpack_require__(/*! ../group/group.component */ "./src/app/authentication-pages/project/project-form/group/group.component.ts"));
const _c0 = ["groupComponent"];
function ProjectCollaboratorComponent_ng_template_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "b");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵtext(3);
} if (rf & 2) {
    const search_r8 = ctx.searchTerm;
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 2, "label.create_new"));
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(": ", search_r8, " ");
} }
function ProjectCollaboratorComponent_ng_template_9_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(2, "div");
    i0.ɵɵtext(3);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r9 = ctx.item;
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(item_r9.name);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(item_r9.value);
} }
function ProjectCollaboratorComponent_ng_template_10_div_0_Template(rf, ctx) { if (rf & 1) {
    const _r14 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 27);
    i0.ɵɵelementStart(1, "span", 28);
    i0.ɵɵlistener("click", function ProjectCollaboratorComponent_ng_template_10_div_0_Template_span_click_1_listener() { i0.ɵɵrestoreView(_r14); const item_r12 = ctx.$implicit; const ctx_r13 = i0.ɵɵnextContext(2); return ctx_r13.handleRemoveEmail(item_r12); });
    i0.ɵɵtext(2, "\u00D7");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "span", 29);
    i0.ɵɵtext(4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r12 = ctx.$implicit;
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("title", item_r12.value);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(item_r12.value);
} }
function ProjectCollaboratorComponent_ng_template_10_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, ProjectCollaboratorComponent_ng_template_10_div_0_Template, 5, 2, "div", 26);
} if (rf & 2) {
    const items_r10 = ctx.items;
    i0.ɵɵproperty("ngForOf", items_r10);
} }
function ProjectCollaboratorComponent_ng_template_27_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "b");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵtext(3);
} if (rf & 2) {
    const search_r15 = ctx.searchTerm;
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 2, "label.create_new"));
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(": ", search_r15, " ");
} }
function ProjectCollaboratorComponent_ng_template_28_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(2, "div");
    i0.ɵɵtext(3);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r16 = ctx.item;
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(item_r16.name);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(item_r16.value);
} }
function ProjectCollaboratorComponent_div_50_small_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 31);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.special_chars"), " ");
} }
function ProjectCollaboratorComponent_div_50_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtemplate(1, ProjectCollaboratorComponent_div_50_small_1_Template, 3, 3, "small", 30);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r5 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r5.collaborateFrm.controls["message"].errors == null ? null : ctx_r5.collaborateFrm.controls["message"].errors.pattern);
} }
function ProjectCollaboratorComponent_app_group_53_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "app-group", null, 32);
} }
function ProjectCollaboratorComponent_ng_template_54_Template(rf, ctx) { if (rf & 1) {
    const _r20 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 33);
    i0.ɵɵelementStart(1, "button", 34);
    i0.ɵɵlistener("click", function ProjectCollaboratorComponent_ng_template_54_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r20); const ctx_r19 = i0.ɵɵnextContext(); return ctx_r19.displayModal = false; });
    i0.ɵɵpipe(2, "titlecase");
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "button", 35);
    i0.ɵɵlistener("click", function ProjectCollaboratorComponent_ng_template_54_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r20); const ctx_r21 = i0.ɵɵnextContext(); return ctx_r21.handleSelected(); });
    i0.ɵɵpipe(5, "uppercase");
    i0.ɵɵpipe(6, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(2, 2, i0.ɵɵpipeBind1(3, 4, "label.cancel")));
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(5, 6, i0.ɵɵpipeBind1(6, 8, "button.ok")));
} }
const _c1 = function () { return { maxLength: "64" }; };
const _c2 = function () { return { width: "50vw" }; };
const _c3 = function () { return { "960px": "75vw" }; };
class ProjectCollaboratorComponent {
    constructor(fb, authService, userService, messageService, userGroupService, translate) {
        this.fb = fb;
        this.authService = authService;
        this.userService = userService;
        this.messageService = messageService;
        this.userGroupService = userGroupService;
        this.translate = translate;
        this.collaborateFrm = new forms_1.FormGroup({});
        this.userList = [];
        this.groupList = [];
        this.constant = app_constants_1.default;
        this.util = app_util_1.default;
        this.systemRole = app_constants_1.SystemRole;
        this.roles = [];
        this.displayModal = false;
        this.selectedData = [];
        this.selectUser = [];
        this.selectGroup = [];
    }
    ngOnInit() {
        this.authUser = this.authService.getAuthUser;
        this.util.translateList(this.translate, [
            'label.project_role.editor',
            'label.project_role.viewer',
            'label.project_role.previewer',
            'label.project_role.viewer_uploader',
            'label.project_role.previewer_uploader',
            'label.project_role.uploader',
        ], {}).subscribe(res => {
            this.roles = [
                { code: 2, name: res['label.project_role.editor'] },
                { code: 3, name: res['label.project_role.viewer'] },
                { code: 4, name: res['label.project_role.previewer'] },
                { code: 5, name: res['label.project_role.viewer_uploader'] },
                { code: 6, name: res['label.project_role.previewer_uploader'] },
                { code: 7, name: res['label.project_role.uploader'] }
            ];
        });
        this.collaborateFrm = this.fb.group({
            userCollaborate: [[]],
            userRole: [this.roles.find(r => r.code === app_constants_1.ProjectRole.Viewer)],
            groupCollaborate: [[]],
            groupRole: [this.roles.find(r => r.code === app_constants_1.ProjectRole.Viewer)],
            isOverride: [true],
            message: ['', [forms_1.Validators.pattern(this.constant.PATTERNS.SCRIPT_PATTERN)]]
        });
        this.getUsers();
        this.getGroups();
    }
    addNewGroup(name) {
        if (name.length > 64) {
            return;
        }
        else {
            return { value: name, name, tag: true };
        }
    }
    addNewUser(name) {
        const emailPattern = app_constants_1.default.PATTERNS.EMAIL;
        if (name.length > 64) {
            return;
        }
        else if (!emailPattern.test(name)) {
            return;
        }
        else {
            return { id: name, value: name, name, tag: true };
        }
    }
    searchGroup(event) {
        this.isInvalidGroup = this.authUser.roleId !== this.systemRole.TeamAdmin
            && this.authUser.roleId !== this.systemRole.Manager;
    }
    searchMember(event) {
        this.isInvalidEmail = !this.util.isValidEmail(event.term)
            || this.authUser.mailAddress === event.term || (this.authUser.roleId !== this.systemRole.TeamAdmin
            && this.authUser.roleId !== this.systemRole.Manager)
            || this.selectUser.findIndex(item => item.value === event.term) !== -1
            || this.userList.findIndex(item => item.value === event.term) !== -1;
    }
    getUsers() {
        this.loading = true;
        const userCustoms = [];
        return this.userService.getAllUsersInTeam(this.authUser.teamId)
            .subscribe(res => {
            if (res.status === 200) {
                res.data.forEach(data => {
                    if (this.authUser.mailAddress !== data.mailAddress) {
                        userCustoms.push({
                            id: data.userId,
                            value: data.mailAddress,
                            name: this.authService.getUserLanguage === 'ja'
                                ? data.lastName + ' ' + data.firstName
                                : data.firstName + ' ' + data.lastName
                        });
                    }
                });
            }
            this.loading = false;
            this.userList = userCustoms;
        });
    }
    getGroups() {
        this.loadingGroup = true;
        const groupCustoms = [];
        this.userGroupService.getAllGroup()
            .subscribe(res => {
            if (res.status === 200) {
                res.data.forEach(data => {
                    groupCustoms.push({
                        id: data.groupUserId,
                        value: data.name,
                    });
                });
            }
            this.loadingGroup = false;
            this.groupList = groupCustoms;
        });
    }
    handleSelected() {
        if (!this.groupComponent.selectedGroupsInModal || this.groupComponent.selectedGroupsInModal.length === 0) {
            return;
        }
        this.selectedData = this.groupComponent.selectedGroupsInModal;
        this.displayModal = false;
        if (this.selectedData) {
            if (this.modalMode === 'user') {
                let groupIds = '';
                for (let i = 0; i < this.selectedData.length; i++) {
                    if (i === this.selectedData.length - 1) {
                        groupIds = groupIds.concat(this.selectedData[i].groupUserId);
                    }
                    else {
                        groupIds = groupIds.concat(this.selectedData[i].groupUserId, ',');
                    }
                }
                const params = {
                    groupUserIds: groupIds,
                    teamId: this.authUser.teamId
                };
                this.userGroupService.getUserInGroup(this.util.toSnakeCaseKey(params)).subscribe(res => {
                    if (res.status === 200) {
                        if (!this.collaborateFrm.value.userCollaborate
                            || this.collaborateFrm.value.userCollaborate.length === 0) {
                            res.data.forEach(item => {
                                if (this.selectUser.findIndex(s => s.id === item.userId) === -1
                                    && this.authUser.userId !== item.userId) {
                                    this.selectUser = [...this.selectUser, {
                                            id: item.userId,
                                            value: item.mailAddress,
                                            name: this.authService.getUserLanguage === 'ja'
                                                ? item.lastName + ' ' + item.firstName
                                                : item.firstName + ' ' + item.lastName
                                        }];
                                }
                            });
                        }
                        else {
                            res.data.forEach(itemChoose => {
                                if (this.collaborateFrm.value.userCollaborate.findIndex(item => item.id === itemChoose.userId) === -1
                                    && this.authUser.userId !== itemChoose.userId) {
                                    this.selectUser = [...this.selectUser, {
                                            id: itemChoose.userId,
                                            value: itemChoose.mailAddress,
                                            name: this.authService.getUserLanguage === 'ja'
                                                ? itemChoose.lastName + ' ' + itemChoose.firstName
                                                : itemChoose.firstName + ' ' + itemChoose.lastName
                                        }];
                                }
                            });
                        }
                        this.selectUser.forEach(memCustom => {
                            this.userList = this.userList.filter(data => data.id !== memCustom.id);
                        });
                    }
                });
            }
            else {
                if (!this.collaborateFrm.value.groupCollaborate
                    || this.collaborateFrm.value.groupCollaborate.length === 0) {
                    this.selectedData.forEach(itemChoose => {
                        this.selectGroup = [...this.selectGroup, {
                                value: itemChoose.name,
                                name: itemChoose.name
                            }];
                    });
                }
                else {
                    this.selectedData.forEach(itemChoose => {
                        this.collaborateFrm.value.groupCollaborate.forEach(item => {
                            if (item.name !== itemChoose.name) {
                                this.selectGroup = [...this.selectGroup, {
                                        value: itemChoose.name,
                                        name: itemChoose.name
                                    }];
                            }
                        });
                    });
                }
            }
        }
    }
    handleRemoveEmail(event, isRemoveAll) {
        if (isRemoveAll) {
            this.getUsers();
            return;
        }
        if (event.tag) {
            this.userList = this.userList.filter(data => data.id !== event.id);
        }
        else {
            if (this.userList.findIndex(m => m.id === event.id) === -1) {
                this.userList = [...this.userList, event];
            }
        }
        this.selectUser = this.selectUser.filter(data => data.id !== event.id);
    }
    handleRemoveGroup(event, isRemoveAll) {
        if (isRemoveAll) {
            this.groupList = this.groupList.filter(data => !data.tag);
            return;
        }
        if (event.value.tag) {
            this.groupList = this.groupList.filter(data => data.id !== event.value.id);
        }
    }
    handleSearchEmail(term, item) {
        return (item.value.toLowerCase().indexOf(term.toLowerCase()) !== -1);
    }
}
exports.ProjectCollaboratorComponent = ProjectCollaboratorComponent;
ProjectCollaboratorComponent.ɵfac = function ProjectCollaboratorComponent_Factory(t) { return new (t || ProjectCollaboratorComponent)(i0.ɵɵdirectiveInject(i1.FormBuilder), i0.ɵɵdirectiveInject(i2.AuthService), i0.ɵɵdirectiveInject(i3.UserService), i0.ɵɵdirectiveInject(i4.MessageService), i0.ɵɵdirectiveInject(i5.UserGroupService), i0.ɵɵdirectiveInject(i6.TranslateService)); };
ProjectCollaboratorComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ProjectCollaboratorComponent, selectors: [["app-project-collaborator"]], viewQuery: function ProjectCollaboratorComponent_Query(rf, ctx) { if (rf & 1) {
        i0.ɵɵviewQuery(_c0, 1);
    } if (rf & 2) {
        let _t;
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.groupComponent = _t.first);
    } }, decls: 55, vars: 65, consts: [[3, "formGroup"], [1, "p-fluid", "p-formgrid", "p-grid"], [1, "p-col-8", "p-field"], [1, "p-inputgroup"], [1, "p-float-label"], ["multiple", "true", "formControlName", "userCollaborate", 1, "select-user", "in-group", 3, "items", "hideSelected", "addTag", "inputAttrs", "loading", "searchFn", "ngModel", "notFoundText", "clearAllText", "search", "keypress", "ngModelChange", "remove", "clear", "open", "close"], ["ng-tag-tmp", ""], ["ng-option-tmp", ""], ["ng-multi-label-tmp", ""], [3, "ngClass"], ["type", "button", "pButton", "", "pRipple", "", "icon", "far fa-address-book", 1, "p-button-primary", 3, "click"], [1, "p-col-4", "p-field"], ["id", "role", "formControlName", "userRole", "optionLabel", "name", 3, "options"], ["for", "role"], ["multiple", "true", "bindLabel", "value", "formControlName", "groupCollaborate", 1, "select-user", "in-group", 3, "items", "hideSelected", "addTag", "inputAttrs", "loading", "ngModel", "notFoundText", "clearAllText", "search", "keypress", "remove", "clear", "ngModelChange", "open", "close"], ["id", "groupRole", "formControlName", "groupRole", "optionLabel", "name", 3, "options"], ["for", "groupRole"], [1, "p-col-12", "p-field-checkbox"], ["binary", "true", "inputId", "override", "formControlName", "isOverride", "name", "override"], ["for", "override", 1, "cs-pointer"], [1, "p-col-12", "p-field"], ["rows", "2", "maxlength", "255", "formControlName", "message", "id", "message", "pInputTextarea", "", "autoResize", "true"], ["for", "message"], [4, "ngIf"], [3, "header", "visible", "breakpoints", "modal", "draggable", "resizable", "baseZIndex", "visibleChange", "onHide"], ["pTemplate", "footer"], ["class", "ng-value", 4, "ngFor", "ngForOf"], [1, "ng-value"], ["aria-hidden", "true", 1, "ng-value-icon", "left", 3, "click"], [1, "ng-value-label", 3, "title"], ["class", "p-error", 4, "ngIf"], [1, "p-error"], ["groupComponent", ""], [1, "p-col-12", "p-text-right", "p-pr-0"], ["pButton", "", "pRipple", "", "type", "button", "icon", "fas fa-times", 1, "p-button-raised", "p-button-warning", "p-mr-2", 3, "label", "click"], ["type", "submit", "pRipple", "", "pButton", "", "icon", "fas fa-check", 1, "p-button-raised", 3, "label", "click"]], template: function ProjectCollaboratorComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "form", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵelementStart(2, "div", 2);
        i0.ɵɵelementStart(3, "div", 3);
        i0.ɵɵelementStart(4, "span", 4);
        i0.ɵɵelementStart(5, "ng-select", 5);
        i0.ɵɵlistener("search", function ProjectCollaboratorComponent_Template_ng_select_search_5_listener($event) { return ctx.searchMember($event); })("keypress", function ProjectCollaboratorComponent_Template_ng_select_keypress_5_listener($event) { return ctx.util.blockSpecialChars($event); })("ngModelChange", function ProjectCollaboratorComponent_Template_ng_select_ngModelChange_5_listener($event) { return ctx.selectUser = $event; })("remove", function ProjectCollaboratorComponent_Template_ng_select_remove_5_listener($event) { return ctx.handleRemoveEmail($event); })("clear", function ProjectCollaboratorComponent_Template_ng_select_clear_5_listener($event) { return ctx.handleRemoveEmail($event, true); })("open", function ProjectCollaboratorComponent_Template_ng_select_open_5_listener() { return ctx.isOpenDropdown = true; })("close", function ProjectCollaboratorComponent_Template_ng_select_close_5_listener() { return ctx.isOpenDropdown = false; });
        i0.ɵɵpipe(6, "translate");
        i0.ɵɵpipe(7, "translate");
        i0.ɵɵtemplate(8, ProjectCollaboratorComponent_ng_template_8_Template, 4, 4, "ng-template", 6);
        i0.ɵɵtemplate(9, ProjectCollaboratorComponent_ng_template_9_Template, 4, 2, "ng-template", 7);
        i0.ɵɵtemplate(10, ProjectCollaboratorComponent_ng_template_10_Template, 1, 1, "ng-template", 8);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(11, "label", 9);
        i0.ɵɵtext(12);
        i0.ɵɵpipe(13, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(14, "button", 10);
        i0.ɵɵlistener("click", function ProjectCollaboratorComponent_Template_button_click_14_listener() { ctx.displayModal = true; return ctx.modalMode = "user"; });
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(15, "div", 11);
        i0.ɵɵelementStart(16, "div", 4);
        i0.ɵɵelement(17, "p-dropdown", 12);
        i0.ɵɵelementStart(18, "label", 13);
        i0.ɵɵtext(19);
        i0.ɵɵpipe(20, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(21, "div", 2);
        i0.ɵɵelementStart(22, "div", 3);
        i0.ɵɵelementStart(23, "span", 4);
        i0.ɵɵelementStart(24, "ng-select", 14);
        i0.ɵɵlistener("search", function ProjectCollaboratorComponent_Template_ng_select_search_24_listener($event) { return ctx.searchGroup($event); })("keypress", function ProjectCollaboratorComponent_Template_ng_select_keypress_24_listener($event) { return ctx.util.blockSpecialChars($event); })("remove", function ProjectCollaboratorComponent_Template_ng_select_remove_24_listener($event) { return ctx.handleRemoveGroup($event); })("clear", function ProjectCollaboratorComponent_Template_ng_select_clear_24_listener($event) { return ctx.handleRemoveGroup($event, true); })("ngModelChange", function ProjectCollaboratorComponent_Template_ng_select_ngModelChange_24_listener($event) { return ctx.selectGroup = $event; })("open", function ProjectCollaboratorComponent_Template_ng_select_open_24_listener() { return ctx.isOpenDropdownGroup = true; })("close", function ProjectCollaboratorComponent_Template_ng_select_close_24_listener() { return ctx.isOpenDropdownGroup = false; });
        i0.ɵɵpipe(25, "translate");
        i0.ɵɵpipe(26, "translate");
        i0.ɵɵtemplate(27, ProjectCollaboratorComponent_ng_template_27_Template, 4, 4, "ng-template", 6);
        i0.ɵɵtemplate(28, ProjectCollaboratorComponent_ng_template_28_Template, 4, 2, "ng-template", 7);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(29, "label", 9);
        i0.ɵɵtext(30);
        i0.ɵɵpipe(31, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(32, "button", 10);
        i0.ɵɵlistener("click", function ProjectCollaboratorComponent_Template_button_click_32_listener() { ctx.displayModal = true; return ctx.modalMode = "group"; });
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(33, "div", 11);
        i0.ɵɵelementStart(34, "div", 4);
        i0.ɵɵelement(35, "p-dropdown", 15);
        i0.ɵɵelementStart(36, "label", 16);
        i0.ɵɵtext(37);
        i0.ɵɵpipe(38, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(39, "div", 17);
        i0.ɵɵelement(40, "p-checkbox", 18);
        i0.ɵɵelementStart(41, "label", 19);
        i0.ɵɵtext(42);
        i0.ɵɵpipe(43, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(44, "div", 20);
        i0.ɵɵelementStart(45, "span", 4);
        i0.ɵɵelement(46, "textarea", 21);
        i0.ɵɵelementStart(47, "label", 22);
        i0.ɵɵtext(48);
        i0.ɵɵpipe(49, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(50, ProjectCollaboratorComponent_div_50_Template, 2, 1, "div", 23);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(51, "p-dialog", 24);
        i0.ɵɵlistener("visibleChange", function ProjectCollaboratorComponent_Template_p_dialog_visibleChange_51_listener($event) { return ctx.displayModal = $event; })("onHide", function ProjectCollaboratorComponent_Template_p_dialog_onHide_51_listener() { return ctx.displayModal = false; });
        i0.ɵɵpipe(52, "translate");
        i0.ɵɵtemplate(53, ProjectCollaboratorComponent_app_group_53_Template, 2, 0, "app-group", 23);
        i0.ɵɵtemplate(54, ProjectCollaboratorComponent_ng_template_54_Template, 7, 10, "ng-template", 25);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵproperty("formGroup", ctx.collaborateFrm);
        i0.ɵɵadvance(5);
        i0.ɵɵpropertyInterpolate("notFoundText", i0.ɵɵpipeBind1(6, 39, "label.no_item_found"));
        i0.ɵɵpropertyInterpolate("clearAllText", i0.ɵɵpipeBind1(7, 41, "label.clear_all"));
        i0.ɵɵproperty("items", ctx.userList)("hideSelected", true)("addTag", !ctx.isInvalidEmail ? ctx.addNewUser : false)("inputAttrs", i0.ɵɵpureFunction0(61, _c1))("loading", ctx.loading)("searchFn", ctx.handleSearchEmail)("ngModel", ctx.selectUser);
        i0.ɵɵadvance(6);
        i0.ɵɵproperty("ngClass", ctx.collaborateFrm.controls.userCollaborate.value.length > 0 || ctx.isOpenDropdown ? "custom-float-label-tab" : "");
        i0.ɵɵadvance(1);
        i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(13, 43, "label.email"), " ");
        i0.ɵɵadvance(5);
        i0.ɵɵproperty("options", ctx.roles);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(20, 45, "label.select_role"), " ");
        i0.ɵɵadvance(5);
        i0.ɵɵpropertyInterpolate("notFoundText", i0.ɵɵpipeBind1(25, 47, "label.no_item_found"));
        i0.ɵɵpropertyInterpolate("clearAllText", i0.ɵɵpipeBind1(26, 49, "label.clear_all"));
        i0.ɵɵproperty("items", ctx.groupList)("hideSelected", true)("addTag", !ctx.isInvalidGroup ? ctx.addNewGroup : false)("inputAttrs", i0.ɵɵpureFunction0(62, _c1))("loading", ctx.loading)("ngModel", ctx.selectGroup);
        i0.ɵɵadvance(5);
        i0.ɵɵproperty("ngClass", ctx.collaborateFrm.controls.groupCollaborate.value.length > 0 || ctx.isOpenDropdownGroup ? "custom-float-label-tab" : "");
        i0.ɵɵadvance(1);
        i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(31, 51, "label.group"), " ");
        i0.ɵɵadvance(5);
        i0.ɵɵproperty("options", ctx.roles);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(38, 53, "label.select_role"), " ");
        i0.ɵɵadvance(5);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(43, 55, "label.override_project"));
        i0.ɵɵadvance(6);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(49, 57, "label.message"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", (ctx.collaborateFrm.controls["message"].dirty || ctx.collaborateFrm.controls["message"].touched) && ctx.collaborateFrm.controls["message"].invalid);
        i0.ɵɵadvance(1);
        i0.ɵɵstyleMap(i0.ɵɵpureFunction0(63, _c2));
        i0.ɵɵpropertyInterpolate("header", i0.ɵɵpipeBind1(52, 59, "label.select_member_group"));
        i0.ɵɵproperty("visible", ctx.displayModal)("breakpoints", i0.ɵɵpureFunction0(64, _c3))("modal", true)("draggable", false)("resizable", false)("baseZIndex", 10000);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.displayModal);
    } }, directives: [i1.ɵangular_packages_forms_forms_y, i1.NgControlStatusGroup, i1.FormGroupDirective, i7.NgSelectComponent, i1.NgControlStatus, i1.FormControlName, i7.ɵo, i7.ɵf, i7.ɵi, i8.NgClass, i9.ButtonDirective, i10.Ripple, i11.Dropdown, i12.Checkbox, i1.DefaultValueAccessor, i1.MaxLengthValidator, i13.InputTextarea, i8.NgIf, i14.Dialog, i4.PrimeTemplate, i8.NgForOf, i15.GroupComponent], pipes: [i6.TranslatePipe, i8.TitleCasePipe, i8.UpperCasePipe], styles: ["[_nghost-%COMP%]  .in-group > div {\n  border-radius: 4px 0 0 4px !important;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvcHJvamVjdC9wcm9qZWN0LWZvcm0vcHJvamVjdC1jb2xsYWJvcmF0b3IvcHJvamVjdC1jb2xsYWJvcmF0b3IuY29tcG9uZW50LnNjc3MiLCJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL3Byb2plY3QvcHJvamVjdC1mb3JtL3Byb2plY3QtY29sbGFib3JhdG9yL3Byb2plY3QtY29sbGFib3JhdG9yLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNFO0VBQ0UscUNBQUE7QUNBSiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL3Byb2plY3QvcHJvamVjdC1mb3JtL3Byb2plY3QtY29sbGFib3JhdG9yL3Byb2plY3QtY29sbGFib3JhdG9yLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiOmhvc3QoOjpuZy1kZWVwKSB7XG4gIC5pbi1ncm91cCA+IGRpdiB7XG4gICAgYm9yZGVyLXJhZGl1czogNHB4IDAgMCA0cHggIWltcG9ydGFudDtcbiAgfVxufVxuIiwiOmhvc3QoOjpuZy1kZWVwKSAuaW4tZ3JvdXAgPiBkaXYge1xuICBib3JkZXItcmFkaXVzOiA0cHggMCAwIDRweCAhaW1wb3J0YW50O1xufSJdfQ== */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ProjectCollaboratorComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-project-collaborator',
                templateUrl: './project-collaborator.component.html',
                styleUrls: ['./project-collaborator.component.scss']
            }]
    }], function () { return [{ type: i1.FormBuilder }, { type: i2.AuthService }, { type: i3.UserService }, { type: i4.MessageService }, { type: i5.UserGroupService }, { type: i6.TranslateService }]; }, { groupComponent: [{
            type: core_1.ViewChild,
            args: ['groupComponent']
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/project/project-form/project-form.component.ts":
/*!*************************************************************************************!*\
  !*** ./src/app/authentication-pages/project/project-form/project-form.component.ts ***!
  \*************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ProjectFormComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
class ProjectFormComponent {
    constructor() {
    }
    ngOnInit() {
    }
}
exports.ProjectFormComponent = ProjectFormComponent;
ProjectFormComponent.ɵfac = function ProjectFormComponent_Factory(t) { return new (t || ProjectFormComponent)(); };
ProjectFormComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ProjectFormComponent, selectors: [["app-project-form"]], decls: 1, vars: 0, template: function ProjectFormComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelement(0, "router-outlet");
    } }, directives: [i1.RouterOutlet], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL3Byb2plY3QvcHJvamVjdC1mb3JtL3Byb2plY3QtZm9ybS5jb21wb25lbnQuc2NzcyJ9 */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ProjectFormComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-project-form',
                templateUrl: './project-form.component.html',
                styleUrls: ['./project-form.component.scss']
            }]
    }], function () { return []; }, null); })();


/***/ }),

/***/ "./src/app/authentication-pages/project/project-form/project-notify/project-notify.component.ts":
/*!******************************************************************************************************!*\
  !*** ./src/app/authentication-pages/project/project-form/project-notify/project-notify.component.ts ***!
  \******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ProjectNotifyComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm2015/operators/index.js");
const project_notify_model_1 = __webpack_require__(/*! ../../../../../models/project-notify.model */ "./src/models/project-notify.model.ts");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! ../../../../services/user.service */ "./src/app/services/user.service.ts"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! ../../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! primeng/checkbox */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-checkbox.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! primeng/radiobutton */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-radiobutton.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! @ng-select/ng-select */ "./node_modules/@ng-select/ng-select/__ivy_ngcc__/fesm2015/ng-select-ng-select.js"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
function ProjectNotifyComponent_form_0_div_6_ng_template_16_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "b");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵtext(3);
} if (rf & 2) {
    const search_r4 = ctx.searchTerm;
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 2, "label.create_new"));
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", search_r4, " ");
} }
function ProjectNotifyComponent_form_0_div_6_ng_template_17_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(2, "div");
    i0.ɵɵtext(3);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r5 = ctx.item;
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(item_r5.name);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(item_r5.value);
} }
const _c0 = function () { return { maxLength: "64" }; };
function ProjectNotifyComponent_form_0_div_6_Template(rf, ctx) { if (rf & 1) {
    const _r7 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 6);
    i0.ɵɵelementStart(1, "div", 7);
    i0.ɵɵelementStart(2, "p-radioButton", 8);
    i0.ɵɵlistener("ngModelChange", function ProjectNotifyComponent_form_0_div_6_Template_p_radioButton_ngModelChange_2_listener($event) { i0.ɵɵrestoreView(_r7); const ctx_r6 = i0.ɵɵnextContext(2); return ctx_r6.notifySetting.notifyAll = $event; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "label", 9);
    i0.ɵɵtext(4);
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(6, "div", 7);
    i0.ɵɵelementStart(7, "p-radioButton", 10);
    i0.ɵɵlistener("ngModelChange", function ProjectNotifyComponent_form_0_div_6_Template_p_radioButton_ngModelChange_7_listener($event) { i0.ɵɵrestoreView(_r7); const ctx_r8 = i0.ɵɵnextContext(2); return ctx_r8.notifySetting.notifyAll = $event; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(8, "label", 11);
    i0.ɵɵtext(9);
    i0.ɵɵpipe(10, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(11, "div", 12);
    i0.ɵɵelementStart(12, "ng-select", 13);
    i0.ɵɵlistener("keypress", function ProjectNotifyComponent_form_0_div_6_Template_ng_select_keypress_12_listener($event) { i0.ɵɵrestoreView(_r7); const ctx_r9 = i0.ɵɵnextContext(2); return ctx_r9.blockSpecialChars($event); })("ngModelChange", function ProjectNotifyComponent_form_0_div_6_Template_ng_select_ngModelChange_12_listener($event) { i0.ɵɵrestoreView(_r7); const ctx_r10 = i0.ɵɵnextContext(2); return ctx_r10.notifySetting.notifyUser = $event; });
    i0.ɵɵpipe(13, "async");
    i0.ɵɵpipe(14, "translate");
    i0.ɵɵpipe(15, "translate");
    i0.ɵɵtemplate(16, ProjectNotifyComponent_form_0_div_6_ng_template_16_Template, 4, 4, "ng-template", 14);
    i0.ɵɵtemplate(17, ProjectNotifyComponent_form_0_div_6_ng_template_17_Template, 4, 2, "ng-template", 15);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngModel", ctx_r1.notifySetting.notifyAll)("disabled", ctx_r1.disabled);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 14, "label.send_notify_all"), " ");
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("ngModel", ctx_r1.notifySetting.notifyAll)("disabled", ctx_r1.disabled);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(10, 16, "label.notify_specific"), " ");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngClass", ctx_r1.notifyFrm.controls.notifyAll.value === "false" ? "p-d-block" : "p-d-none");
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("notFoundText", i0.ɵɵpipeBind1(14, 20, "label.no_item_found"));
    i0.ɵɵpropertyInterpolate("clearAllText", i0.ɵɵpipeBind1(15, 22, "label.clear_all"));
    i0.ɵɵproperty("items", i0.ɵɵpipeBind1(13, 18, ctx_r1.userList$))("hideSelected", true)("inputAttrs", i0.ɵɵpureFunction0(24, _c0))("loading", ctx_r1.loading)("ngModel", ctx_r1.notifySetting.notifyUser);
} }
function ProjectNotifyComponent_form_0_Template(rf, ctx) { if (rf & 1) {
    const _r12 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "form", 1);
    i0.ɵɵelementStart(1, "div", 2);
    i0.ɵɵelementStart(2, "p-checkbox", 3);
    i0.ɵɵlistener("ngModelChange", function ProjectNotifyComponent_form_0_Template_p_checkbox_ngModelChange_2_listener($event) { i0.ɵɵrestoreView(_r12); const ctx_r11 = i0.ɵɵnextContext(); return ctx_r11.notifySetting.isNotify = $event; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "label", 4);
    i0.ɵɵtext(4);
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(6, ProjectNotifyComponent_form_0_div_6_Template, 18, 25, "div", 5);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵproperty("formGroup", ctx_r0.notifyFrm);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("disabled", ctx_r0.disabled)("ngModel", ctx_r0.notifySetting.isNotify);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 5, "label.notify"), " ");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r0.notifyFrm.controls.isNotify.value);
} }
class ProjectNotifyComponent {
    constructor(fb, userService, authService) {
        this.fb = fb;
        this.userService = userService;
        this.authService = authService;
        this.disabled = false;
        this.notifyFrm = new forms_1.FormGroup({});
        this.constant = app_constants_1.default;
        this.util = app_util_1.default;
        this.notifyUsers = [];
    }
    ngOnInit() {
        this.authUser = this.authService.getAuthUser;
        this.notifyFrm = this.fb.group({
            isNotify: [false],
            notifyAll: ['true'],
            notifyUser: [[]]
        });
        this.userList$ = this.getUsers();
        if (this.disabled === true) {
            this.notifyFrm.controls.notifyUser.disable();
        }
        this.notifySetting = new project_notify_model_1.ProjectNotifySetting();
        if (this.projectSettings && this.projectSettings.setting) {
            this.notifySetting.isNotify = (this.projectSettings.setting.split('')[5] === '1');
            if (this.notifySetting.isNotify) {
                this.notifySetting.notifyAll = this.projectSettings.notifyAll + ''; // string
                if (this.notifySetting.notifyAll === 'false') {
                    this.notifySetting.notifyUser = [];
                    const member = JSON.parse(this.projectSettings.notifyUser);
                    isLook: for (const item of member) {
                        for (const item1 of this.notifySetting.notifyUser) {
                            if (item.name === item1.value) {
                                break isLook;
                            }
                        }
                        this.notifySetting.notifyUser = [...this.notifySetting.notifyUser, {
                                id: item.userId,
                                value: item.mailAddress,
                                name: this.authService.getUserLanguage === 'ja' ? item.lastName + item.firstName : item.firstName + item.lastName
                            }];
                    }
                }
            }
        }
    }
    blockSpecialChars(event) {
        const k = event.charCode;
        // 44,   47/   60<   62>   123{   125}
        return (k !== 44 && k !== 47 && k !== 60
            && k !== 62 && k !== 123 && k !== 125);
    }
    getUsers() {
        this.loading = true;
        const userCustoms = [];
        return this.userService.getAllUsersInTeam(this.authUser.teamId)
            .pipe(operators_1.map(res => {
            if (res.status === 200) {
                res.data.forEach(data => {
                    userCustoms.push({
                        value: data.mailAddress,
                        id: data.userId,
                        name: this.authService.getUserLanguage === 'ja'
                            ? data.lastName + data.firstName : data.firstName + data.lastName
                    });
                });
            }
            this.loading = false;
            return userCustoms;
        }));
    }
}
exports.ProjectNotifyComponent = ProjectNotifyComponent;
ProjectNotifyComponent.ɵfac = function ProjectNotifyComponent_Factory(t) { return new (t || ProjectNotifyComponent)(i0.ɵɵdirectiveInject(i1.FormBuilder), i0.ɵɵdirectiveInject(i2.UserService), i0.ɵɵdirectiveInject(i3.AuthService)); };
ProjectNotifyComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ProjectNotifyComponent, selectors: [["app-project-notify"]], inputs: { projectSettings: "projectSettings", disabled: "disabled" }, decls: 1, vars: 1, consts: [[3, "formGroup", 4, "ngIf"], [3, "formGroup"], [1, "p-field-checkbox"], ["name", "showWm", "binary", "true", "formControlName", "isNotify", "inputId", "notify", 3, "disabled", "ngModel", "ngModelChange"], ["for", "notify"], ["class", "p-fluid p-formgrid p-grid p-pl-4", 4, "ngIf"], [1, "p-fluid", "p-formgrid", "p-grid", "p-pl-4"], [1, "p-col-12", "p-field-radiobutton"], ["name", "notifyAll", "formControlName", "notifyAll", "value", "true", "inputId", "all", 3, "ngModel", "disabled", "ngModelChange"], ["for", "all"], ["name", "notifyAll", "formControlName", "notifyAll", "value", "false", "inputId", "special", 3, "ngModel", "disabled", "ngModelChange"], ["for", "special"], [1, "p-col-12", "p-field", 3, "ngClass"], ["multiple", "true", "bindLabel", "value", "formControlName", "notifyUser", 1, "select-user", 3, "items", "hideSelected", "inputAttrs", "loading", "ngModel", "notFoundText", "clearAllText", "keypress", "ngModelChange"], ["ng-tag-tmp", ""], ["ng-option-tmp", ""]], template: function ProjectNotifyComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵtemplate(0, ProjectNotifyComponent_form_0_Template, 7, 7, "form", 0);
    } if (rf & 2) {
        i0.ɵɵproperty("ngIf", ctx.notifySetting);
    } }, directives: [i4.NgIf, i1.ɵangular_packages_forms_forms_y, i1.NgControlStatusGroup, i1.FormGroupDirective, i5.Checkbox, i1.NgControlStatus, i1.FormControlName, i6.RadioButton, i4.NgClass, i7.NgSelectComponent, i7.ɵo, i7.ɵf], pipes: [i8.TranslatePipe, i4.AsyncPipe], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL3Byb2plY3QvcHJvamVjdC1mb3JtL3Byb2plY3Qtbm90aWZ5L3Byb2plY3Qtbm90aWZ5LmNvbXBvbmVudC5zY3NzIn0= */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ProjectNotifyComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-project-notify',
                templateUrl: './project-notify.component.html',
                styleUrls: ['./project-notify.component.scss']
            }]
    }], function () { return [{ type: i1.FormBuilder }, { type: i2.UserService }, { type: i3.AuthService }]; }, { projectSettings: [{
            type: core_1.Input
        }], disabled: [{
            type: core_1.Input
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/project/project-form/watermark-setting/watermark-setting.component.ts":
/*!************************************************************************************************************!*\
  !*** ./src/app/authentication-pages/project/project-form/watermark-setting/watermark-setting.component.ts ***!
  \************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.WatermarkSettingComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const _ = tslib_1.__importStar(__webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js"));
const app_validator_1 = __webpack_require__(/*! ../../../../../utilities/app-validator */ "./src/utilities/app-validator.ts");
const watermark_model_1 = __webpack_require__(/*! ../../../../../models/watermark.model */ "./src/models/watermark.model.ts");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! primeng/checkbox */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-checkbox.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! primeng/radiobutton */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-radiobutton.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! primeng/dropdown */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dropdown.js"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! primeng/colorpicker */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-colorpicker.js"));
function WatermarkSettingComponent_div_6_div_16_small_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.require"), " ");
} }
function WatermarkSettingComponent_div_6_div_16_small_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.special_chars"), " ");
} }
function WatermarkSettingComponent_div_6_div_16_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 27);
    i0.ɵɵtemplate(1, WatermarkSettingComponent_div_6_div_16_small_1_Template, 3, 3, "small", 25);
    i0.ɵɵtemplate(2, WatermarkSettingComponent_div_6_div_16_small_2_Template, 3, 3, "small", 25);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", (ctx_r1.watermarkFrm.controls["wmContent"].errors == null ? null : ctx_r1.watermarkFrm.controls["wmContent"].errors.required) || (ctx_r1.watermarkFrm.controls["wmContent"].errors == null ? null : ctx_r1.watermarkFrm.controls["wmContent"].errors.whitespace));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r1.watermarkFrm.controls["wmContent"].errors == null ? null : ctx_r1.watermarkFrm.controls["wmContent"].errors.pattern);
} }
function WatermarkSettingComponent_div_6_div_37_small_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 27);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.input_color"), " ");
} }
function WatermarkSettingComponent_div_6_div_37_small_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 27);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.invalid_color_format"), " ");
} }
function WatermarkSettingComponent_div_6_div_37_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtemplate(1, WatermarkSettingComponent_div_6_div_37_small_1_Template, 3, 3, "small", 15);
    i0.ɵɵtemplate(2, WatermarkSettingComponent_div_6_div_37_small_2_Template, 3, 3, "small", 15);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r2.watermarkFrm.controls["colorText"].errors == null ? null : ctx_r2.watermarkFrm.controls["colorText"].errors.required);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r2.watermarkFrm.controls["colorText"].errors == null ? null : ctx_r2.watermarkFrm.controls["colorText"].errors.pattern);
} }
function WatermarkSettingComponent_div_6_div_38_span_4_Template(rf, ctx) { if (rf & 1) {
    const _r11 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "span", 31);
    i0.ɵɵlistener("click", function WatermarkSettingComponent_div_6_div_38_span_4_Template_span_click_0_listener() { i0.ɵɵrestoreView(_r11); const item_r9 = ctx.$implicit; const ctx_r10 = i0.ɵɵnextContext(3); return ctx_r10.pickColorAvailable(item_r9.color_rgb); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r9 = ctx.$implicit;
    const ctx_r8 = i0.ɵɵnextContext(3);
    i0.ɵɵstyleMap(ctx_r8.handlePickColor(item_r9.color_rgb));
    i0.ɵɵproperty("title", item_r9.text);
} }
function WatermarkSettingComponent_div_6_div_38_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 28);
    i0.ɵɵelementStart(1, "p", 29);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(4, WatermarkSettingComponent_div_6_div_38_span_4_Template, 1, 3, "span", 30);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 2, "label.select_one"));
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngForOf", ctx_r3.sampleColors);
} }
function WatermarkSettingComponent_div_6_Template(rf, ctx) { if (rf & 1) {
    const _r13 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 5);
    i0.ɵɵelementStart(1, "div", 6);
    i0.ɵɵelementStart(2, "div", 7);
    i0.ɵɵelementStart(3, "span", 8);
    i0.ɵɵelementStart(4, "p-radioButton", 9);
    i0.ɵɵlistener("ngModelChange", function WatermarkSettingComponent_div_6_Template_p_radioButton_ngModelChange_4_listener($event) { i0.ɵɵrestoreView(_r13); const ctx_r12 = i0.ɵɵnextContext(); return ctx_r12.watermarkModel.wmSetting = $event; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelement(5, "input", 10);
    i0.ɵɵpipe(6, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(7, "div", 6);
    i0.ɵɵelementStart(8, "div", 7);
    i0.ɵɵelementStart(9, "span", 8);
    i0.ɵɵelementStart(10, "p-radioButton", 11);
    i0.ɵɵlistener("ngModelChange", function WatermarkSettingComponent_div_6_Template_p_radioButton_ngModelChange_10_listener($event) { i0.ɵɵrestoreView(_r13); const ctx_r14 = i0.ɵɵnextContext(); return ctx_r14.watermarkModel.wmSetting = $event; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(11, "div", 12);
    i0.ɵɵelementStart(12, "input", 13);
    i0.ɵɵlistener("ngModelChange", function WatermarkSettingComponent_div_6_Template_input_ngModelChange_12_listener($event) { i0.ɵɵrestoreView(_r13); const ctx_r15 = i0.ɵɵnextContext(); return ctx_r15.watermarkModel.wmContent = $event; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(13, "label", 14);
    i0.ɵɵtext(14);
    i0.ɵɵpipe(15, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(16, WatermarkSettingComponent_div_6_div_16_Template, 3, 2, "div", 15);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(17, "div", 16);
    i0.ɵɵelementStart(18, "div", 12);
    i0.ɵɵelementStart(19, "p-dropdown", 17);
    i0.ɵɵlistener("ngModelChange", function WatermarkSettingComponent_div_6_Template_p_dropdown_ngModelChange_19_listener($event) { i0.ɵɵrestoreView(_r13); const ctx_r16 = i0.ɵɵnextContext(); return ctx_r16.watermarkModel.fontSize = $event; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(20, "label", 18);
    i0.ɵɵtext(21);
    i0.ɵɵpipe(22, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(23, "div", 16);
    i0.ɵɵelementStart(24, "div", 12);
    i0.ɵɵelementStart(25, "p-dropdown", 19);
    i0.ɵɵlistener("ngModelChange", function WatermarkSettingComponent_div_6_Template_p_dropdown_ngModelChange_25_listener($event) { i0.ɵɵrestoreView(_r13); const ctx_r17 = i0.ɵɵnextContext(); return ctx_r17.watermarkModel.position = $event; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(26, "label", 20);
    i0.ɵɵtext(27);
    i0.ɵɵpipe(28, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(29, "div", 6);
    i0.ɵɵelementStart(30, "div", 7);
    i0.ɵɵelementStart(31, "span", 21);
    i0.ɵɵelementStart(32, "input", 22);
    i0.ɵɵlistener("ngModelChange", function WatermarkSettingComponent_div_6_Template_input_ngModelChange_32_listener($event) { i0.ɵɵrestoreView(_r13); const ctx_r18 = i0.ɵɵnextContext(); return ctx_r18.watermarkModel.colorText = $event; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(33, "label", 23);
    i0.ɵɵtext(34);
    i0.ɵɵpipe(35, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(36, "p-colorPicker", 24);
    i0.ɵɵlistener("onChange", function WatermarkSettingComponent_div_6_Template_p_colorPicker_onChange_36_listener($event) { i0.ɵɵrestoreView(_r13); const ctx_r19 = i0.ɵɵnextContext(); return ctx_r19.pickColorInPicker($event); })("ngModelChange", function WatermarkSettingComponent_div_6_Template_p_colorPicker_ngModelChange_36_listener($event) { i0.ɵɵrestoreView(_r13); const ctx_r20 = i0.ɵɵnextContext(); return ctx_r20.watermarkModel.color = $event; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(37, WatermarkSettingComponent_div_6_div_37_Template, 3, 2, "div", 25);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(38, WatermarkSettingComponent_div_6_div_38_Template, 5, 4, "div", 26);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("disabled", ctx_r0.isEdit === false ? true : null)("ngModel", ctx_r0.watermarkModel.wmSetting);
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("placeholder", i0.ɵɵpipeBind1(6, 29, "label.default_wm"));
    i0.ɵɵadvance(5);
    i0.ɵɵproperty("disabled", ctx_r0.isEdit === false ? true : null)("ngModel", ctx_r0.watermarkModel.wmSetting);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngModel", ctx_r0.watermarkModel.wmContent)("ngClass", ctx_r0.watermarkFrm.controls["showWm"].value && ctx_r0.watermarkFrm.controls["wmSetting"].value !== "default" && ctx_r0.watermarkFrm.controls["wmContent"].invalid ? "ng-dirty" : "")("required", ctx_r0.watermarkFrm.controls["showWm"].value === true && ctx_r0.watermarkFrm.controls["wmSetting"].value !== "default");
    i0.ɵɵattribute("disabled", ctx_r0.watermarkFrm.controls.wmSetting.value === "default" || ctx_r0.isEdit === false ? true : null);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(15, 31, "label.customs"), " ");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r0.watermarkFrm.controls["showWm"].value === true && ctx_r0.watermarkFrm.controls["wmSetting"].value !== "default");
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("disabled", ctx_r0.watermarkFrm.controls.wmSetting.value === "default" || ctx_r0.isEdit === false)("options", ctx_r0.fontSizes)("ngModel", ctx_r0.watermarkModel.fontSize);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(22, 33, "label.font_size"), " ");
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("disabled", ctx_r0.watermarkFrm.controls.wmSetting.value === "default" || ctx_r0.isEdit === false)("options", ctx_r0.positions)("ngModel", ctx_r0.watermarkModel.position);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(28, 35, "label.position"), " ");
    i0.ɵɵadvance(5);
    i0.ɵɵproperty("ngModel", ctx_r0.watermarkModel.colorText)("ngClass", ctx_r0.watermarkFrm.controls["showWm"].value && ctx_r0.watermarkFrm.controls["wmSetting"].value !== "default" && ctx_r0.watermarkFrm.controls["wmContent"].invalid ? "ng-dirty" : "")("pattern", ctx_r0.watermarkFrm.controls["showWm"].value === true && ctx_r0.watermarkFrm.controls["wmSetting"].value !== "default" ? ctx_r0.constant.PATTERNS.COLOR_RGB_PATTERN : "")("required", ctx_r0.watermarkFrm.controls["showWm"].value === true && ctx_r0.watermarkFrm.controls["wmSetting"].value !== "default");
    i0.ɵɵattribute("disabled", ctx_r0.watermarkFrm.controls.wmSetting.value === "default" || ctx_r0.isEdit === false ? true : null);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(35, 37, "label.color"));
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngModel", ctx_r0.watermarkModel.color)("disabled", ctx_r0.watermarkFrm.controls.wmSetting.value !== "custom" || ctx_r0.isEdit === false || !ctx_r0.watermarkFrm.controls.showWm.value);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", (ctx_r0.watermarkFrm.controls["colorText"].dirty || ctx_r0.watermarkFrm.controls["colorText"].touched) && ctx_r0.watermarkFrm.controls["colorText"].invalid);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r0.watermarkFrm.controls.wmSetting.value === "custom" && ctx_r0.watermarkFrm.controls.showWm.value && !!ctx_r0.isEdit);
} }
class WatermarkSettingComponent {
    constructor(fb, cdref, translate) {
        this.fb = fb;
        this.cdref = cdref;
        this.translate = translate;
        this.checkInValidWm = new core_1.EventEmitter();
        this.frmWmData = new core_1.EventEmitter();
        this.watermarkFrm = new forms_1.FormGroup({});
        this.constant = app_constants_1.default;
        this.util = app_util_1.default;
        this.watermarkModel = new watermark_model_1.WatermarkSettings();
        this.fontSizes = [];
        this.positions = [];
        this.sampleColors = this.constant.sampleColors;
    }
    ngOnInit() {
        const size = _.range(50, 100, 2);
        for (const item of size) {
            this.fontSizes = [...this.fontSizes, { name: item.toString(), code: item }];
        }
        this.positions = this.util.getWatermarkPositionObj(this.translate);
        this.watermarkFrm = this.fb.group({
            // watermark
            showWm: [false],
            wmSetting: ['default'],
            wmContent: ['', [
                    app_validator_1.conditionalValidator(() => this.watermarkFrm.get('wmSetting').value !== 'default'
                        && this.watermarkFrm.get('showWm').value, forms_1.Validators.pattern(this.constant.PATTERNS.SCRIPT_PATTERN)),
                    app_validator_1.conditionalValidator(() => this.watermarkFrm.get('wmSetting').value !== 'default'
                        && this.watermarkFrm.get('showWm').value, app_validator_1.noWhitespaceValidator)
                ]],
            color: [{ r: 192, g: 192, b: 192 }, []],
            colorText: ['RGB(192,192,192)', []],
            position: [this.positions.find(position => position.code === 'diagonal').code],
            fontSize: [this.fontSizes.find(fontSize => fontSize.code === 50).code],
        });
        if (this.watermarkSetting) {
            const wm = JSON.parse(this.watermarkSetting);
            this.watermarkModel.showWm = (wm.show_wm === 1);
            this.watermarkModel.wmSetting = (wm.default_wm === 1) ? 'default' : 'custom';
            if (wm.default_wm === 0) {
                // get color
                let colorText = wm.setting.wm_color;
                let color = wm.setting.wm_color.slice(wm.setting.wm_color.indexOf('(') + 1, wm.setting.wm_color.indexOf(')')).split(',');
                if (wm.setting.wm_color === '') {
                    color = [192, 192, 192];
                    colorText = 'RGB(192,192,192)';
                }
                this.watermarkModel.colorText = colorText;
                this.watermarkModel.wmContent = wm.setting.wm_text;
                this.watermarkModel.color = { r: parseInt(color[0], 0), g: parseInt(color[1], 0), b: parseInt(color[2], 0) };
                this.watermarkModel.fontSize = wm.setting.wm_font_size;
                this.watermarkModel.position = wm.setting.wm_position;
            }
        }
        this.checkValueChange();
    }
    checkValueChange() {
        this.watermarkFrm.controls.colorText.valueChanges.subscribe(value => {
            const colorText = value;
            const color = colorText.slice(colorText.indexOf('(') + 1, colorText.indexOf(')')).split(',');
            this.watermarkModel.color = {
                r: parseInt(color[0], 0),
                g: parseInt(color[1], 0),
                b: parseInt(color[2], 0)
            };
        });
        this.watermarkFrm.valueChanges.subscribe(value => {
            this.isInValid = app_validator_1.checkFrm(false, this.watermarkFrm);
            this.checkInValidWm.emit(this.isInValid);
            this.frmWmData.emit(value);
        });
    }
    ngAfterViewChecked() {
        this.cdref.detectChanges();
    }
    pickColorInPicker(event) {
        this.watermarkModel.colorText = 'RGB(' + event.value.r + ',' + event.value.g + ',' + event.value.b + ')';
    }
    pickColorAvailable(event) {
        this.watermarkModel.colorText = event.toUpperCase().replace(/ /gi, '');
    }
    handlePickColor(color) {
        return {
            'background-color': color, width: '40px', height: '40px', display: 'inline-block',
            float: 'left', cursor: 'pointer'
        };
    }
}
exports.WatermarkSettingComponent = WatermarkSettingComponent;
WatermarkSettingComponent.ɵfac = function WatermarkSettingComponent_Factory(t) { return new (t || WatermarkSettingComponent)(i0.ɵɵdirectiveInject(i1.FormBuilder), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i2.TranslateService)); };
WatermarkSettingComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WatermarkSettingComponent, selectors: [["app-watermark-setting"]], inputs: { watermarkSetting: "watermarkSetting", isEdit: "isEdit" }, outputs: { checkInValidWm: "checkInValidWm", frmWmData: "frmWmData" }, decls: 7, vars: 9, consts: [[3, "formGroup"], [1, "p-field-checkbox"], ["name", "showWm", "binary", "true", "formControlName", "showWm", "inputId", "showWm", 3, "ngClass", "ngModel", "disabled", "ngModelChange"], ["for", "showWm", 3, "ngClass"], ["class", "p-fluid p-formgrid p-grid p-pl-4", 4, "ngIf"], [1, "p-fluid", "p-formgrid", "p-grid", "p-pl-4"], [1, "p-col-12", "p-field"], [1, "p-inputgroup"], [1, "p-inputgroup-addon"], ["formControlName", "wmSetting", "value", "default", "name", "wmSetting", 3, "disabled", "ngModel", "ngModelChange"], ["type", "text", "disabled", "disabled", "pInputText", "", 1, "opacity-1", 3, "placeholder"], ["formControlName", "wmSetting", "value", "custom", "name", "wmSetting", 3, "disabled", "ngModel", "ngModelChange"], [1, "p-float-label"], ["id", "custom", "type", "text", "maxlength", "255", "formControlName", "wmContent", "pInputText", "", 3, "ngModel", "ngClass", "required", "ngModelChange"], ["for", "custom", 1, "required", "p-text-small", "p-text-bold"], ["class", "p-error", 4, "ngIf"], [1, "p-col-6", "p-field"], ["id", "fontSize", "formControlName", "fontSize", "optionLabel", "name", "optionValue", "code", 3, "disabled", "options", "ngModel", "ngModelChange"], ["for", "fontSize"], ["id", "position", "formControlName", "position", "optionLabel", "name", "optionValue", "code", 3, "disabled", "options", "ngModel", "ngModelChange"], ["for", "position"], [1, "p-float-label", "width-100"], ["formControlName", "colorText", "id", "label-color", "maxlength", "64", "pInputText", "", "type", "text", 3, "ngModel", "ngClass", "pattern", "required", "ngModelChange"], ["for", "label-color"], ["formControlName", "color", "format", "rgb", 3, "ngModel", "disabled", "onChange", "ngModelChange"], [4, "ngIf"], ["class", "p-field p-col-12", 4, "ngIf"], [1, "p-error"], [1, "p-field", "p-col-12"], [1, "p-text-bold", "p-mt-0", "p-mb-2"], [3, "title", "style", "click", 4, "ngFor", "ngForOf"], [3, "title", "click"]], template: function WatermarkSettingComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "form", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵelementStart(2, "p-checkbox", 2);
        i0.ɵɵlistener("ngModelChange", function WatermarkSettingComponent_Template_p_checkbox_ngModelChange_2_listener($event) { return ctx.watermarkModel.showWm = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(3, "label", 3);
        i0.ɵɵtext(4);
        i0.ɵɵpipe(5, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(6, WatermarkSettingComponent_div_6_Template, 39, 39, "div", 4);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵproperty("formGroup", ctx.watermarkFrm);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngClass", ctx.isEdit === false ? "cs-not-allowed" : "cs-pointer")("ngModel", ctx.watermarkModel.showWm)("disabled", ctx.isEdit === false ? true : null);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngClass", ctx.isEdit === false ? "cs-not-allowed" : "cs-pointer");
        i0.ɵɵadvance(1);
        i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 7, "label.show_wm"), " ");
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.watermarkFrm.controls.showWm.value);
    } }, directives: [i1.ɵangular_packages_forms_forms_y, i1.NgControlStatusGroup, i1.FormGroupDirective, i3.Checkbox, i1.NgControlStatus, i1.FormControlName, i4.NgClass, i4.NgIf, i5.RadioButton, i6.InputText, i1.DefaultValueAccessor, i1.MaxLengthValidator, i1.RequiredValidator, i7.Dropdown, i1.PatternValidator, i8.ColorPicker, i4.NgForOf], pipes: [i2.TranslatePipe], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL3Byb2plY3QvcHJvamVjdC1mb3JtL3dhdGVybWFyay1zZXR0aW5nL3dhdGVybWFyay1zZXR0aW5nLmNvbXBvbmVudC5zY3NzIn0= */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WatermarkSettingComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-watermark-setting',
                templateUrl: './watermark-setting.component.html',
                styleUrls: ['./watermark-setting.component.scss']
            }]
    }], function () { return [{ type: i1.FormBuilder }, { type: i0.ChangeDetectorRef }, { type: i2.TranslateService }]; }, { watermarkSetting: [{
            type: core_1.Input
        }], isEdit: [{
            type: core_1.Input
        }], checkInValidWm: [{
            type: core_1.Output
        }], frmWmData: [{
            type: core_1.Output
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/project/project-information/project-information.component.ts":
/*!***************************************************************************************************!*\
  !*** ./src/app/authentication-pages/project/project-information/project-information.component.ts ***!
  \***************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ProjectInformationComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const app_validator_1 = __webpack_require__(/*! ../../../../utilities/app-validator */ "./src/utilities/app-validator.ts");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! ../../../shared/autofocus.directive */ "./src/app/shared/autofocus.directive.ts"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtextarea */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtextarea.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
function ProjectInformationComponent_div_8_small_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 9);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.require"), " ");
} }
function ProjectInformationComponent_div_8_small_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 9);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.special_chars"), " ");
} }
function ProjectInformationComponent_div_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtemplate(1, ProjectInformationComponent_div_8_small_1_Template, 3, 3, "small", 8);
    i0.ɵɵtemplate(2, ProjectInformationComponent_div_8_small_2_Template, 3, 3, "small", 8);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", (ctx_r0.f.name.errors == null ? null : ctx_r0.f.name.errors.required) || (ctx_r0.f.name.errors == null ? null : ctx_r0.f.name.errors.whitespace));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r0.f.name.errors == null ? null : ctx_r0.f.name.errors.pattern);
} }
function ProjectInformationComponent_div_9_div_6_small_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 9);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.special_chars"), " ");
} }
function ProjectInformationComponent_div_9_div_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtemplate(1, ProjectInformationComponent_div_9_div_6_small_1_Template, 3, 3, "small", 8);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r4 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r4.f.description.errors == null ? null : ctx_r4.f.description.errors.pattern);
} }
function ProjectInformationComponent_div_9_Template(rf, ctx) { if (rf & 1) {
    const _r7 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 10);
    i0.ɵɵelementStart(1, "span", 3);
    i0.ɵɵelementStart(2, "textarea", 11);
    i0.ɵɵlistener("ngModelChange", function ProjectInformationComponent_div_9_Template_textarea_ngModelChange_2_listener($event) { i0.ɵɵrestoreView(_r7); const ctx_r6 = i0.ɵɵnextContext(); return ctx_r6.projectInfo.description = $event; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "label", 12);
    i0.ɵɵtext(4);
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(6, ProjectInformationComponent_div_9_div_6_Template, 2, 1, "div", 6);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngModel", ctx_r1.projectInfo.description);
    i0.ɵɵattribute("disabled", ctx_r1.disabled ? true : null);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 4, "label.description"));
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", (ctx_r1.f.description.dirty || ctx_r1.f.description.touched) && ctx_r1.f.description.invalid);
} }
class ProjectInformationComponent {
    constructor(fb) {
        this.fb = fb;
        this.form = new forms_1.FormGroup({});
        this.disabled = false;
        this.showDescription = true;
        this.projectInfo = {
            projectId: '',
            name: '',
            description: ''
        };
    }
    ngOnInit() {
        this.form = this.fb.group({
            name: ['', [forms_1.Validators.required, forms_1.Validators.pattern(app_constants_1.default.PATTERNS.SCRIPT_PATTERN), app_validator_1.noWhitespaceValidator]],
            description: ['', [forms_1.Validators.pattern(app_constants_1.default.PATTERNS.SCRIPT_PATTERN)]],
        });
    }
    get f() {
        return this.form.controls;
    }
}
exports.ProjectInformationComponent = ProjectInformationComponent;
ProjectInformationComponent.ɵfac = function ProjectInformationComponent_Factory(t) { return new (t || ProjectInformationComponent)(i0.ɵɵdirectiveInject(i1.FormBuilder)); };
ProjectInformationComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ProjectInformationComponent, selectors: [["app-project-information"]], inputs: { form: "form", disabled: "disabled", showDescription: "showDescription", projectInfo: "projectInfo" }, decls: 10, vars: 10, consts: [[3, "formGroup"], [1, "p-fluid", "p-formgrid", "p-grid"], [1, "p-field", "p-col-12"], [1, "p-float-label"], ["id", "name", "type", "text", "pInputText", "", "formControlName", "name", "autocomplete", "off", "maxlength", "64", 3, "appAutofocus", "ngModel", "ngClass", "ngModelChange"], ["for", "name"], [4, "ngIf"], ["class", "p-col-12", 4, "ngIf"], ["class", "p-error", 4, "ngIf"], [1, "p-error"], [1, "p-col-12"], ["rows", "5", "maxlength", "255", "formControlName", "description", "id", "description", "pInputTextarea", "", "autoResize", "true", 1, "min-height-119", 3, "ngModel", "ngModelChange"], ["for", "description"]], template: function ProjectInformationComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "form", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵelementStart(2, "div", 2);
        i0.ɵɵelementStart(3, "span", 3);
        i0.ɵɵelementStart(4, "input", 4);
        i0.ɵɵlistener("ngModelChange", function ProjectInformationComponent_Template_input_ngModelChange_4_listener($event) { return ctx.projectInfo.name = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(5, "label", 5);
        i0.ɵɵtext(6);
        i0.ɵɵpipe(7, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(8, ProjectInformationComponent_div_8_Template, 3, 2, "div", 6);
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(9, ProjectInformationComponent_div_9_Template, 7, 6, "div", 7);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵproperty("formGroup", ctx.form);
        i0.ɵɵadvance(4);
        i0.ɵɵproperty("appAutofocus", true)("ngModel", ctx.projectInfo.name)("ngClass", (ctx.f.name.dirty || ctx.f.name.touched) && ctx.f.name.invalid ? "ng-dirty" : "");
        i0.ɵɵattribute("disabled", ctx.disabled ? true : null);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(7, 8, "label.name"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", (ctx.f.name.dirty || ctx.f.name.touched) && ctx.f.name.invalid);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.showDescription);
    } }, directives: [i1.ɵangular_packages_forms_forms_y, i1.NgControlStatusGroup, i1.FormGroupDirective, i1.DefaultValueAccessor, i2.InputText, i1.NgControlStatus, i1.FormControlName, i1.MaxLengthValidator, i3.AutofocusDirective, i4.NgClass, i4.NgIf, i5.InputTextarea], pipes: [i6.TranslatePipe], styles: [".required[_ngcontent-%COMP%]:after {\n  content: \" *\";\n  color: red;\n}\n\n.min-height-119[_ngcontent-%COMP%] {\n  min-height: 119px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvcHJvamVjdC9wcm9qZWN0LWluZm9ybWF0aW9uL3Byb2plY3QtaW5mb3JtYXRpb24uY29tcG9uZW50LnNjc3MiLCJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL3Byb2plY3QvcHJvamVjdC1pbmZvcm1hdGlvbi9wcm9qZWN0LWluZm9ybWF0aW9uLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsYUFBQTtFQUNBLFVBQUE7QUNDRjs7QURFQTtFQUNFLGlCQUFBO0FDQ0YiLCJmaWxlIjoic3JjL2FwcC9hdXRoZW50aWNhdGlvbi1wYWdlcy9wcm9qZWN0L3Byb2plY3QtaW5mb3JtYXRpb24vcHJvamVjdC1pbmZvcm1hdGlvbi5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIi5yZXF1aXJlZDphZnRlciB7XG4gIGNvbnRlbnQ6IFwiICpcIjtcbiAgY29sb3I6IHJlZDtcbn1cblxuLm1pbi1oZWlnaHQtMTE5IHtcbiAgbWluLWhlaWdodDogMTE5cHg7XG59XG4iLCIucmVxdWlyZWQ6YWZ0ZXIge1xuICBjb250ZW50OiBcIiAqXCI7XG4gIGNvbG9yOiByZWQ7XG59XG5cbi5taW4taGVpZ2h0LTExOSB7XG4gIG1pbi1oZWlnaHQ6IDExOXB4O1xufSJdfQ== */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ProjectInformationComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-project-information',
                templateUrl: './project-information.component.html',
                styleUrls: ['./project-information.component.scss']
            }]
    }], function () { return [{ type: i1.FormBuilder }]; }, { form: [{
            type: core_1.Input
        }], disabled: [{
            type: core_1.Input
        }], showDescription: [{
            type: core_1.Input
        }], projectInfo: [{
            type: core_1.Input
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/project/project-list/project-list.component.ts":
/*!*************************************************************************************!*\
  !*** ./src/app/authentication-pages/project/project-list/project-list.component.ts ***!
  \*************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ProjectListComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const _ = tslib_1.__importStar(__webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js"));
const pusher_js_1 = tslib_1.__importDefault(__webpack_require__(/*! pusher-js */ "./node_modules/pusher-js/dist/web/pusher.js"));
const environment_1 = __webpack_require__(/*! ../../../../environments/environment */ "./src/environments/environment.ts");
const project_model_1 = __webpack_require__(/*! ../../../../models/project.model */ "./src/models/project.model.ts");
const app_constants_1 = tslib_1.__importStar(__webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/__ivy_ngcc__/fesm2015/platform-browser.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/project.service */ "./src/app/services/project.service.ts"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/folder.service */ "./src/app/services/folder.service.ts"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! primeng/table */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-table.js"));
const i10 = tslib_1.__importStar(__webpack_require__(/*! primeng/contextmenu */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-contextmenu.js"));
const i11 = tslib_1.__importStar(__webpack_require__(/*! primeng/tieredmenu */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-tieredmenu.js"));
const i12 = tslib_1.__importStar(__webpack_require__(/*! primeng/dialog */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dialog.js"));
const i13 = tslib_1.__importStar(__webpack_require__(/*! primeng/toolbar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-toolbar.js"));
const i14 = tslib_1.__importStar(__webpack_require__(/*! primeng/dropdown */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dropdown.js"));
const i15 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i16 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js"));
const i17 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
const i18 = tslib_1.__importStar(__webpack_require__(/*! primeng/ripple */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-ripple.js"));
const i19 = tslib_1.__importStar(__webpack_require__(/*! primeng/tag */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-tag.js"));
const i20 = tslib_1.__importStar(__webpack_require__(/*! ../project-information/project-information.component */ "./src/app/authentication-pages/project/project-information/project-information.component.ts"));
const i21 = tslib_1.__importStar(__webpack_require__(/*! ../project-create/project-create.component */ "./src/app/authentication-pages/project/project-create/project-create.component.ts"));
const i22 = tslib_1.__importStar(__webpack_require__(/*! ../project-transfer/project-transfer.component */ "./src/app/authentication-pages/project/project-transfer/project-transfer.component.ts"));
const i23 = tslib_1.__importStar(__webpack_require__(/*! ../../link/link-form/link-create/link-create.component */ "./src/app/authentication-pages/link/link-form/link-create/link-create.component.ts"));
const i24 = tslib_1.__importStar(__webpack_require__(/*! ../../link/link-form/link-setting/link-setting.component */ "./src/app/authentication-pages/link/link-form/link-setting/link-setting.component.ts"));
const _c0 = ["projectCreateComponent"];
const _c1 = ["projectSettingComponent"];
const _c2 = ["projectTransferComponent"];
const _c3 = ["projectInformationComponent"];
const _c4 = ["linkCreateComponent"];
const _c5 = ["linkSettingComponent"];
function ProjectListComponent_ng_template_5_button_14_Template(rf, ctx) { if (rf & 1) {
    const _r23 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 39);
    i0.ɵɵlistener("click", function ProjectListComponent_ng_template_5_button_14_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r23); const ctx_r22 = i0.ɵɵnextContext(2); return ctx_r22.displayCreateProjectDialog = true; });
    i0.ɵɵpipe(1, "titlecase");
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(1, 1, i0.ɵɵpipeBind1(2, 3, "button.new")));
} }
function ProjectListComponent_ng_template_5_button_15_Template(rf, ctx) { if (rf & 1) {
    const _r25 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 40);
    i0.ɵɵlistener("click", function ProjectListComponent_ng_template_5_button_15_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r25); const ctx_r24 = i0.ɵɵnextContext(2); return ctx_r24.displayShareModal = true; });
    i0.ɵɵpipe(1, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵpropertyInterpolate("title", i0.ɵɵpipeBind1(1, 1, "label.share"));
} }
function ProjectListComponent_ng_template_5_button_16_Template(rf, ctx) { if (rf & 1) {
    const _r27 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 41);
    i0.ɵɵlistener("click", function ProjectListComponent_ng_template_5_button_16_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r27); const ctx_r26 = i0.ɵɵnextContext(2); return ctx_r26.doShowDialog("detail", ctx_r26.selectedProjects[0]); });
    i0.ɵɵpipe(1, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵpropertyInterpolate("title", i0.ɵɵpipeBind1(1, 1, "label.settings"));
} }
function ProjectListComponent_ng_template_5_button_17_Template(rf, ctx) { if (rf & 1) {
    const _r29 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 42);
    i0.ɵɵlistener("click", function ProjectListComponent_ng_template_5_button_17_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r29); const ctx_r28 = i0.ɵɵnextContext(2); return ctx_r28.confirmDeleteProject(); });
    i0.ɵɵpipe(1, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵpropertyInterpolate("title", i0.ɵɵpipeBind1(1, 1, "label.delete"));
} }
function ProjectListComponent_ng_template_5_button_18_Template(rf, ctx) { if (rf & 1) {
    const _r31 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 43);
    i0.ɵɵlistener("click", function ProjectListComponent_ng_template_5_button_18_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r31); const ctx_r30 = i0.ɵɵnextContext(2); return ctx_r30.goToDetail(ctx_r30.selectedProjects[0]); });
    i0.ɵɵpipe(1, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵpropertyInterpolate("title", i0.ɵɵpipeBind1(1, 1, "label.open"));
} }
function ProjectListComponent_ng_template_5_button_19_Template(rf, ctx) { if (rf & 1) {
    const _r33 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 44);
    i0.ɵɵlistener("click", function ProjectListComponent_ng_template_5_button_19_Template_button_click_0_listener($event) { i0.ɵɵrestoreView(_r33); const ctx_r32 = i0.ɵɵnextContext(2); const _r6 = i0.ɵɵreference(14); return ctx_r32.getMoreOption(ctx_r32.selectedProjects[0], _r6, $event); });
    i0.ɵɵpipe(1, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵpropertyInterpolate("title", i0.ɵɵpipeBind1(1, 1, "label.more_option"));
} }
function ProjectListComponent_ng_template_5_Template(rf, ctx) { if (rf & 1) {
    const _r35 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "p-toolbar", 23);
    i0.ɵɵelementStart(1, "div", 24);
    i0.ɵɵelementStart(2, "span", 25);
    i0.ɵɵelementStart(3, "p-dropdown", 26);
    i0.ɵɵlistener("onChange", function ProjectListComponent_ng_template_5_Template_p_dropdown_onChange_3_listener() { i0.ɵɵrestoreView(_r35); const ctx_r34 = i0.ɵɵnextContext(); return ctx_r34.loadProjects(null); })("ngModelChange", function ProjectListComponent_ng_template_5_Template_p_dropdown_ngModelChange_3_listener($event) { i0.ɵɵrestoreView(_r35); const ctx_r36 = i0.ɵɵnextContext(); return ctx_r36.searchTypeSelected = $event; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "label", 27);
    i0.ɵɵtext(5);
    i0.ɵɵpipe(6, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(7, "span", 28);
    i0.ɵɵelement(8, "i", 29);
    i0.ɵɵelementStart(9, "input", 30);
    i0.ɵɵlistener("keyup", function ProjectListComponent_ng_template_5_Template_input_keyup_9_listener() { i0.ɵɵrestoreView(_r35); const ctx_r37 = i0.ɵɵnextContext(); return ctx_r37.loadProjects(null, true); })("ngModelChange", function ProjectListComponent_ng_template_5_Template_input_ngModelChange_9_listener($event) { i0.ɵɵrestoreView(_r35); const ctx_r38 = i0.ɵɵnextContext(); return ctx_r38.getProjectsParams.searchKey = $event; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(10, "label", 31);
    i0.ɵɵtext(11);
    i0.ɵɵpipe(12, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(13, "div", 32);
    i0.ɵɵtemplate(14, ProjectListComponent_ng_template_5_button_14_Template, 3, 5, "button", 33);
    i0.ɵɵtemplate(15, ProjectListComponent_ng_template_5_button_15_Template, 2, 3, "button", 34);
    i0.ɵɵtemplate(16, ProjectListComponent_ng_template_5_button_16_Template, 2, 3, "button", 35);
    i0.ɵɵtemplate(17, ProjectListComponent_ng_template_5_button_17_Template, 2, 3, "button", 36);
    i0.ɵɵtemplate(18, ProjectListComponent_ng_template_5_button_18_Template, 2, 3, "button", 37);
    i0.ɵɵtemplate(19, ProjectListComponent_ng_template_5_button_19_Template, 2, 3, "button", 38);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵproperty("styleClass", "p-p-0");
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("ngModel", ctx_r0.searchTypeSelected)("options", ctx_r0.filterOptions);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 13, "label.filter_by"));
    i0.ɵɵadvance(4);
    i0.ɵɵproperty("ngModel", ctx_r0.getProjectsParams.searchKey)("autocomplete", "off");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(12, 15, "label.search"));
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("ngIf", ctx_r0.authUser.roleId === ctx_r0.systemRole.TeamAdmin || ctx_r0.authUser.allowRoles.includes(ctx_r0.authUser.roleId + ""));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r0.selectedProjects && ctx_r0.selectedProjects.length === 1 && (ctx_r0.selectedProjects[0].projectRoleId === ctx_r0.projectRole.Owner || ctx_r0.selectedProjects[0].projectRoleId === ctx_r0.projectRole.Editor) && ctx_r0.selectedProjects[0].status !== 3);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r0.selectedProjects && ctx_r0.selectedProjects.length === 1 && ctx_r0.selectedProjects[0].status !== 3);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r0.selectedProjects && ctx_r0.selectedProjects.length > 0 && ctx_r0.isOwnerOnly && !ctx_r0.isCopying);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r0.selectedProjects && ctx_r0.selectedProjects.length === 1 && ctx_r0.selectedProjects[0].status !== 3);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r0.selectedProjects && ctx_r0.selectedProjects.length === 1 && ctx_r0.isOwnerOnly && ctx_r0.selectedProjects[0].status !== 3);
} }
function ProjectListComponent_ng_template_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "th", 45);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "titlecase");
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelement(5, "p-sortIcon", 46);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(6, "th", 47);
    i0.ɵɵtext(7);
    i0.ɵɵpipe(8, "translate");
    i0.ɵɵelement(9, "p-sortIcon", 48);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(10, "th", 49);
    i0.ɵɵtext(11);
    i0.ɵɵpipe(12, "translate");
    i0.ɵɵelement(13, "p-sortIcon", 50);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(14, "th", 51);
    i0.ɵɵtext(15);
    i0.ɵɵpipe(16, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(17, "th", 52);
    i0.ɵɵtext(18);
    i0.ɵɵpipe(19, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 5, i0.ɵɵpipeBind1(4, 7, "label.project_name")), " ");
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(8, 9, "label.owner"), " ");
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(12, 11, "label.date_modified"), " ");
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(16, 13, "label.size"), " ");
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(19, 15, "label.numbers_user"), " ");
} }
function ProjectListComponent_ng_template_7_img_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "img", 68);
} }
function ProjectListComponent_ng_template_7_img_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "img", 69);
    i0.ɵɵpipe(1, "translate");
} if (rf & 2) {
    i0.ɵɵpropertyInterpolate("title", i0.ɵɵpipeBind1(1, 1, "label.auto_drm"));
} }
function ProjectListComponent_ng_template_7_img_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "img", 70);
    i0.ɵɵpipe(1, "translate");
} if (rf & 2) {
    i0.ɵɵpropertyInterpolate("title", i0.ɵɵpipeBind1(1, 1, "label.auto_drm"));
} }
function ProjectListComponent_ng_template_7_img_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "img", 71);
} }
const _c6 = function () { return { color: "var(--primary-color)" }; };
function ProjectListComponent_ng_template_7_i_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 72);
} if (rf & 2) {
    i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction0(1, _c6));
} }
function ProjectListComponent_ng_template_7_p_tag_11_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "p-tag", 73);
    i0.ɵɵpipe(1, "titlecase");
    i0.ɵɵpipe(2, "translate");
} if (rf & 2) {
    i0.ɵɵpropertyInterpolate("value", i0.ɵɵpipeBind1(1, 1, i0.ɵɵpipeBind1(2, 3, "label.me")));
} }
function ProjectListComponent_ng_template_7_p_tag_12_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "p-tag", 74);
} if (rf & 2) {
    const project_r39 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵpropertyInterpolate("title", project_r39.firstName + " " + project_r39.lastName);
    i0.ɵɵpropertyInterpolate("value", project_r39.firstName + " " + project_r39.lastName);
} }
function ProjectListComponent_ng_template_7_p_tag_13_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "p-tag", 75);
} if (rf & 2) {
    const project_r39 = i0.ɵɵnextContext().$implicit;
    i0.ɵɵpropertyInterpolate("title", project_r39.lastName + " " + project_r39.firstName);
    i0.ɵɵpropertyInterpolate("value", project_r39.lastName + " " + project_r39.firstName);
} }
function ProjectListComponent_ng_template_7_Template(rf, ctx) { if (rf & 1) {
    const _r52 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "tr", 53);
    i0.ɵɵlistener("dblclick", function ProjectListComponent_ng_template_7_Template_tr_dblclick_0_listener() { i0.ɵɵrestoreView(_r52); const project_r39 = ctx.$implicit; const ctx_r51 = i0.ɵɵnextContext(); return ctx_r51.goToDetail(project_r39); });
    i0.ɵɵelementStart(1, "td", 54);
    i0.ɵɵelementStart(2, "div", 55);
    i0.ɵɵtemplate(3, ProjectListComponent_ng_template_7_img_3_Template, 1, 0, "img", 56);
    i0.ɵɵtemplate(4, ProjectListComponent_ng_template_7_img_4_Template, 2, 3, "img", 57);
    i0.ɵɵtemplate(5, ProjectListComponent_ng_template_7_img_5_Template, 2, 3, "img", 58);
    i0.ɵɵtemplate(6, ProjectListComponent_ng_template_7_img_6_Template, 1, 0, "img", 59);
    i0.ɵɵtemplate(7, ProjectListComponent_ng_template_7_i_7_Template, 1, 2, "i", 60);
    i0.ɵɵelementStart(8, "span", 61);
    i0.ɵɵtext(9);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(10, "td", 62);
    i0.ɵɵtemplate(11, ProjectListComponent_ng_template_7_p_tag_11_Template, 3, 5, "p-tag", 63);
    i0.ɵɵtemplate(12, ProjectListComponent_ng_template_7_p_tag_12_Template, 1, 2, "p-tag", 64);
    i0.ɵɵtemplate(13, ProjectListComponent_ng_template_7_p_tag_13_Template, 1, 2, "p-tag", 65);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(14, "td", 66);
    i0.ɵɵtext(15);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(16, "td", 67);
    i0.ɵɵtext(17);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(18, "td", 67);
    i0.ɵɵtext(19);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const project_r39 = ctx.$implicit;
    const rowIndex_r40 = ctx.rowIndex;
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵproperty("pContextMenuRow", project_r39)("pSelectableRowIndex", rowIndex_r40)("pSelectableRow", project_r39);
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("ngIf", project_r39.setting.charAt(0) === "0" && project_r39.numberMember === 1 && project_r39.status !== 3);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", project_r39.setting.charAt(0) === "1" && project_r39.numberMember === 1 && project_r39.status !== 3);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", project_r39.setting.charAt(0) === "1" && project_r39.numberMember > 1 && project_r39.status !== 3);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", project_r39.setting.charAt(0) === "0" && project_r39.numberMember > 1 && project_r39.status !== 3);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", project_r39.status === 3);
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("title", project_r39.projectName);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", project_r39.projectName, " ");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r2.authUser.userId === project_r39.ownerId);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r2.authUser.userId !== project_r39.ownerId && ctx_r2.authUser.lang !== "ja");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r2.authUser.userId !== project_r39.ownerId && ctx_r2.authUser.lang === "ja");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", ctx_r2.appUtil.formatDateBasedOnDiff(ctx_r2.datePipe, project_r39.modifiedDate), " ");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", project_r39.numberFile, " ");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", project_r39.numberMember, " ");
} }
function ProjectListComponent_ng_template_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelementStart(1, "td", 76);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "td", 77);
    i0.ɵɵtext(5);
    i0.ɵɵpipe(6, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 2, "label.no_record"), " ");
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(6, 4, "label.no_record"), " ");
} }
function ProjectListComponent_app_project_information_18_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "app-project-information", 78, 79);
} if (rf & 2) {
    i0.ɵɵproperty("showDescription", false);
} }
const _c7 = function (a0) { return { name: a0 }; };
const _c8 = function () { return ["create"]; };
function ProjectListComponent_ng_template_19_Template(rf, ctx) { if (rf & 1) {
    const _r55 = i0.ɵɵgetCurrentView();
    i0.ɵɵelement(0, "p-button", 80);
    i0.ɵɵpipe(1, "translate");
    i0.ɵɵelementStart(2, "p-button", 81);
    i0.ɵɵlistener("click", function ProjectListComponent_ng_template_19_Template_p_button_click_2_listener() { i0.ɵɵrestoreView(_r55); const ctx_r54 = i0.ɵɵnextContext(); return ctx_r54.displayCreateProjectDialog = false; });
    i0.ɵɵpipe(3, "titlecase");
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(5, "p-button", 82);
    i0.ɵɵlistener("click", function ProjectListComponent_ng_template_19_Template_p_button_click_5_listener() { i0.ɵɵrestoreView(_r55); const ctx_r56 = i0.ɵɵnextContext(); return ctx_r56.createProject(); });
    i0.ɵɵpipe(6, "uppercase");
    i0.ɵɵpipe(7, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r8 = i0.ɵɵnextContext();
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(1, 5, "label.create_project_with_setting"));
    i0.ɵɵproperty("queryParams", i0.ɵɵpureFunction1(15, _c7, ctx_r8.projectInformationComponent ? ctx_r8.projectInformationComponent.form.value.name : ""))("routerLink", i0.ɵɵpureFunction0(17, _c8));
    i0.ɵɵadvance(2);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(3, 7, i0.ɵɵpipeBind1(4, 9, "label.cancel")));
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(6, 11, i0.ɵɵpipeBind1(7, 13, "label.save")));
} }
function ProjectListComponent_app_project_create_21_Template(rf, ctx) { if (rf & 1) {
    const _r59 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "app-project-create", 83, 84);
    i0.ɵɵlistener("onSaveCallBack", function ProjectListComponent_app_project_create_21_Template_app_project_create_onSaveCallBack_0_listener($event) { i0.ɵɵrestoreView(_r59); const ctx_r58 = i0.ɵɵnextContext(); return ctx_r58.onSaveDetail($event); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r9 = i0.ɵɵnextContext();
    i0.ɵɵproperty("disabled", ctx_r9.selectedProjects[0].projectRoleId !== ctx_r9.projectRole.Owner && ctx_r9.selectedProjects[0].projectRoleId !== ctx_r9.projectRole.Editor)("mode", "detail")("projectSettings", ctx_r9.projectClone);
} }
function ProjectListComponent_app_project_transfer_22_Template(rf, ctx) { if (rf & 1) {
    const _r62 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "app-project-transfer", 85, 86);
    i0.ɵɵlistener("frmTransferData", function ProjectListComponent_app_project_transfer_22_Template_app_project_transfer_frmTransferData_0_listener($event) { i0.ɵɵrestoreView(_r62); const ctx_r61 = i0.ɵɵnextContext(); return ctx_r61.pushData($event, "transfer"); });
    i0.ɵɵelementEnd();
} }
function ProjectListComponent_ng_template_23_button_4_Template(rf, ctx) { if (rf & 1) {
    const _r65 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 90);
    i0.ɵɵlistener("click", function ProjectListComponent_ng_template_23_button_4_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r65); const ctx_r64 = i0.ɵɵnextContext(2); return ctx_r64.doSave(); });
    i0.ɵɵpipe(1, "uppercase");
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵpipe(3, "uppercase");
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵpipe(5, "uppercase");
    i0.ɵɵpipe(6, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r63 = i0.ɵɵnextContext(2);
    i0.ɵɵpropertyInterpolate("label", ctx_r63.mode === "create" ? i0.ɵɵpipeBind1(1, 2, i0.ɵɵpipeBind1(2, 4, "label.add")) : ctx_r63.mode === "transfer" ? i0.ɵɵpipeBind1(3, 6, i0.ɵɵpipeBind1(4, 8, "label.transfer_project_title")) : i0.ɵɵpipeBind1(5, 10, i0.ɵɵpipeBind1(6, 12, "label.save")));
    i0.ɵɵproperty("icon", ctx_r63.mode === "create" ? "fas fa-plus" : ctx_r63.mode === "transfer" ? "fas fa-exchange-alt" : "far fa-save");
} }
function ProjectListComponent_ng_template_23_Template(rf, ctx) { if (rf & 1) {
    const _r67 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 87);
    i0.ɵɵelementStart(1, "button", 88);
    i0.ɵɵlistener("click", function ProjectListComponent_ng_template_23_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r67); const ctx_r66 = i0.ɵɵnextContext(); return ctx_r66.displayModal = false; });
    i0.ɵɵpipe(2, "titlecase");
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(4, ProjectListComponent_ng_template_23_button_4_Template, 7, 14, "button", 89);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r11 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(2, 2, i0.ɵɵpipeBind1(3, 4, "label.cancel")));
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("ngIf", ctx_r11.selectedProjects[0].projectRoleId === ctx_r11.projectRole.Owner || ctx_r11.selectedProjects[0].projectRoleId === ctx_r11.projectRole.Editor);
} }
function ProjectListComponent_app_link_create_26_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "app-link-create", 91, 92);
} if (rf & 2) {
    const ctx_r12 = i0.ɵɵnextContext();
    i0.ɵɵproperty("name", ctx_r12.selectedProjects[0].projectName)("projectId", ctx_r12.selectedProjects[0].projectId)("typeShare", 1);
} }
function ProjectListComponent_ng_template_27_Template(rf, ctx) { if (rf & 1) {
    const _r70 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 87);
    i0.ɵɵelementStart(1, "button", 93);
    i0.ɵɵlistener("click", function ProjectListComponent_ng_template_27_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r70); const ctx_r69 = i0.ɵɵnextContext(); return ctx_r69.displayShareModal = false; });
    i0.ɵɵpipe(2, "titlecase");
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "button", 94);
    i0.ɵɵlistener("click", function ProjectListComponent_ng_template_27_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r70); const ctx_r71 = i0.ɵɵnextContext(); return ctx_r71.doCreateLink(); });
    i0.ɵɵpipe(5, "uppercase");
    i0.ɵɵpipe(6, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(2, 2, i0.ɵɵpipeBind1(3, 4, "label.cancel")));
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(5, 6, i0.ɵɵpipeBind1(6, 8, "label.create_link")));
} }
function ProjectListComponent_app_link_setting_31_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "app-link-setting", 95, 96);
} if (rf & 2) {
    const ctx_r14 = i0.ɵɵnextContext();
    i0.ɵɵproperty("linkData", ctx_r14.linkData)("projectId", ctx_r14.selectedProjects[0].projectId)("isPublicView", ctx_r14.isPublicView);
} }
function ProjectListComponent_ng_template_32_Template(rf, ctx) { if (rf & 1) {
    const _r74 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 87);
    i0.ɵɵelementStart(1, "button", 97);
    i0.ɵɵlistener("click", function ProjectListComponent_ng_template_32_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r74); const ctx_r73 = i0.ɵɵnextContext(); return ctx_r73.deleteLink(); });
    i0.ɵɵpipe(2, "titlecase");
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "button", 98);
    i0.ɵɵlistener("click", function ProjectListComponent_ng_template_32_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r74); const ctx_r75 = i0.ɵɵnextContext(); return ctx_r75.doRegisterLicense(); });
    i0.ɵɵpipe(5, "uppercase");
    i0.ɵɵpipe(6, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(2, 2, i0.ɵɵpipeBind1(3, 4, "button.delete")));
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(5, 6, i0.ɵɵpipeBind1(6, 8, "button.done")));
} }
const _c9 = function () { return { width: "50vw" }; };
const _c10 = function () { return { "960px": "75vw" }; };
class ProjectListComponent {
    constructor(titleService, projectService, translate, datePipe, authService, messageService, folderService, router, confirmationService) {
        this.titleService = titleService;
        this.projectService = projectService;
        this.translate = translate;
        this.datePipe = datePipe;
        this.authService = authService;
        this.messageService = messageService;
        this.folderService = folderService;
        this.router = router;
        this.confirmationService = confirmationService;
        // App Utilities and Configuration values
        this.appUtil = app_util_1.default;
        this.appConstant = app_constants_1.default;
        this.systemRole = app_constants_1.SystemRole;
        this.projectRole = app_constants_1.ProjectRole;
        this.first = 0;
        this.rows = 10;
        this.sortField = 'modifiedDate';
        this.getProjectsParams = {
            searchKey: '',
            pageNumber: 1,
            pageSize: 10,
            sortField: 'modifiedDate',
            ascSort: false,
            searchType: 0,
            layout: 'list',
        };
        this.filterOptions = [];
        this.isOwnerOnly = true;
        this.isCopying = true;
        this.displayCreateProjectDialog = false;
        this.isMaxDisplay = new core_1.EventEmitter();
        this.itemsCm = [];
        this.displayModal = false;
        this.displayShareModal = false;
        this.displayShareSettingModal = false;
        this.isSubmitCreateLink = false;
        this.isSubmitShareLink = false;
        this.isLoading = true;
        this.searchTypeSelected = 'project';
        this.isPublicView = false;
        this.translate.get(['page_title.project_list']).subscribe((translation) => {
            this.titleService.setTitle(translation['page_title.project_list']);
        });
    }
    ngOnInit() {
        this.rowOptions = this.appConstant.DATA_VIEW.ROW_PER_PAGE_OPTIONS;
        this.getProjectsParams = this.projectService.getProjectsParams
            ? this.projectService.getProjectsParams
            : this.getProjectsParams;
        this.getProjectsParams.searchKey = '';
        this.rows = this.getProjectsParams.pageSize;
        this.ascSort = this.getProjectsParams.ascSort ? 1 : -1;
        this.sortField = this.getProjectsParams.sortField;
        this.loadData();
        this.initializeSocketNotification();
    }
    loadData() {
        this.authUser = this.authService.getAuthUser;
        const allowSettings = this.authUser.allowRoles.split(',');
        this.isCreateProject =
            allowSettings.indexOf(this.authUser.roleId + '') !== -1 ||
                this.authUser.roleId === app_constants_1.SystemRole.TeamAdmin;
        this.appUtil
            .translateList(this.translate, ['label.file_name', 'label.project_name'], {})
            .subscribe((res) => {
            this.filterOptions = [
                { code: 'project', name: res['label.project_name'] },
                { code: 'file', name: res['label.file_name'] },
            ];
        });
        this.appUtil
            .translateList(this.translate, [
            'label.date_modified_asc',
            'label.date_modified_desc',
            'label.project_name_asc',
            'label.project_name_desc',
            'label.owner_asc',
            'label.owner_desc',
        ], {})
            .subscribe((res) => {
            this.sortOptions = [
                {
                    code: 'modifiedDateAsc',
                    label: res['label.date_modified_asc'],
                    ascSort: true,
                    sortField: 'modifiedDate',
                },
                {
                    code: 'modifiedDateDesc',
                    label: res['label.date_modified_desc'],
                    ascSort: false,
                    sortField: 'modifiedDate',
                },
                {
                    code: 'projectNameAsc',
                    label: res['label.project_name_asc'],
                    ascSort: true,
                    sortField: 'projectName',
                },
                {
                    code: 'projectNameDesc',
                    label: res['label.project_name_desc'],
                    ascSort: false,
                    sortField: 'projectName',
                },
                {
                    code: 'ownerNameAsc',
                    label: res['label.owner_asc'],
                    ascSort: true,
                    sortField: 'ownerName',
                },
                {
                    code: 'ownerNameDesc',
                    label: res['label.owner_desc'],
                    ascSort: false,
                    sortField: 'ownerName',
                },
            ];
        });
    }
    loadProjects(event, isSearch) {
        if (event) {
            this.getProjectsParams.pageNumber = event.first / event.rows + 1;
            this.getProjectsParams.sortField = event.sortField
                ? event.sortField
                : 'createdDate';
            this.getProjectsParams.ascSort = event.sortOrder === 1;
            this.getProjectsParams.pageSize = event.rows;
        }
        this.getProjectsParams.searchType =
            this.searchTypeSelected === 'file' ? 1 : 0;
        if (isSearch) {
            this.getProjectsParams.pageNumber = 1;
            this.first = 0;
        }
        this.isLoading = true;
        if (this.getProjectsRequest) {
            this.getProjectsRequest.unsubscribe();
        }
        this.getProjectsRequest = this.projectService
            .getProjects(this.appUtil.toSnakeCaseKey(this.getProjectsParams))
            .subscribe((res) => {
            if (res.status === 200) {
                this.projects = res.data.content;
                this.totalRecords = res.data.totalElements;
                this.projectService.setGetProjectsParams(this.getProjectsParams);
                this.getFileUserNumberInProject();
            }
            this.isLoading = false;
        });
    }
    getFileUserNumberInProject() {
        if (this.projects.length > 0) {
            const params = {
                projectIds: this.projects.map((project) => project.projectId).join(','),
            };
            this.projectService
                .getUserFileProjectNumber(this.appUtil.toSnakeCaseKey(params))
                .subscribe((res) => {
                if (res.status === 200) {
                    res.data.map((obj) => {
                        const index = this.projects.findIndex((el) => el['projectId'] == obj['projectId']);
                        if (index != -1) {
                            this.projects[index].numberFile = obj.numberFile;
                            this.projects[index].numberMember = obj.numberMember;
                        }
                    });
                }
            });
        }
    }
    checkProjectOwner() {
        if (this.selectedProjects && this.selectedProjects.length > 0) {
            const authUserId = this.authUser.userId;
            this.isOwnerOnly = !_.find(this.selectedProjects, (p) => p.ownerId !== authUserId);
        }
        this.isCopying =
            this.selectedProjects &&
                this.selectedProjects.findIndex((s) => s.status === 3) !== -1;
    }
    getMoreOption(project, menu, event) {
        if (project) {
            this.appUtil
                .translateList(this.translate, ['label.settings', 'label.share', 'label.clone', 'label.transfer'], {})
                .subscribe((res) => {
                this.items = [
                    {
                        label: res['label.transfer'],
                        icon: 'fas fa-exchange-alt',
                        command: () => {
                            this.doShowDialog('transfer', project);
                        },
                    },
                    {
                        label: res['label.clone'],
                        icon: 'fas fa-copy',
                        styleClass: project && project.ownerId !== this.authUser.userId
                            ? 'p-d-none'
                            : '',
                        command: () => {
                            this.confirmCopyProject();
                        },
                    },
                ];
                menu.toggle(event);
            });
        }
    }
    onContextMenuSelect(cm) {
        let isHide = false;
        this.checkProjectOwner();
        for (const item of this.selectedProjects) {
            if (!item.projectRoleId ||
                (this.selectedProjects.length > 1 &&
                    item.projectRoleId !== this.projectRole.Owner) ||
                item.status === 3) {
                isHide = true;
                break;
            }
        }
        if (isHide === true) {
            cm.hide();
        }
    }
    createProject() {
        this.projectInformationComponent.form.markAllAsTouched();
        if (this.projectInformationComponent.form.invalid) {
            return;
        }
        const params = {
            name: this.projectInformationComponent.projectInfo.name,
            setting: '000000',
        };
        this.projectService.addProject(params).subscribe((res) => {
            if (res.status === 200) {
                this.displayCreateProjectDialog = false;
                this.messageService.add({
                    severity: 'success',
                    detail: this.appUtil.translate(this.translate, 'default_toast.create_success'),
                });
                this.loadProjects(null);
            }
            else {
                if (res.status === 403) {
                    this.messageService.add({
                        severity: 'error',
                        detail: this.appUtil.translate(this.translate, 'error.403'),
                    });
                    // load auth user
                    this.authService.getAuthInfo().subscribe((resp) => {
                        if (resp.data) {
                            if (!resp.data.useSecureDrive) {
                                // clear user into session
                                this.authService.deleteToken();
                            }
                            else {
                                this.authService.setAuthUser(resp.data);
                                this.router.routeReuseStrategy.shouldReuseRoute = () => false;
                                this.router.onSameUrlNavigation = 'reload';
                                this.router.navigate(['/project']);
                            }
                        }
                    });
                }
            }
        });
    }
    // ------ /////
    doShowDialog(mode, project) {
        this.mode = mode;
        switch (mode) {
            case 'detail':
                this.dialogHeader = this.appUtil.translate(this.translate, 'label.project_detail');
                if (project) {
                    this.projectService
                        .getProjectSettings(project.projectId)
                        .subscribe((res) => {
                        if (res.status === 200) {
                            this.projectClone = Object.assign({}, res.data);
                            this.displayModal = true;
                        }
                    });
                }
                break;
            case 'transfer':
                this.dialogHeader = this.appUtil.translate(this.translate, 'label.transfer_project');
                this.projectClone = new project_model_1.ProjectSettings();
                this.displayModal = true;
                break;
            default:
                this.dialogHeader = this.appUtil.translate(this.translate, 'label.project_create');
                this.projectClone = new project_model_1.ProjectSettings();
                this.displayModal = true;
                break;
        }
    }
    onMaximizeDialog(event) {
        this.isMaximized = event.maximized;
        this.isMaxDisplay.emit(event.maximized);
    }
    pushData(event, key) {
        // key: frm, drm, wm, co
        switch (key) {
            case 'frm':
                this.dataSaveFrm = event;
                break;
            case 'drm':
                this.dataSaveDrmFrm = event;
                break;
            case 'wm':
                this.dataSaveWmFrm = event;
                break;
            case 'co':
                this.dataSaveCoFrm = event;
                break;
            case 'noty':
                this.dataSaveNotifyFrm = event;
                break;
            case 'transfer':
                this.dataTransferFrm = event;
                break;
        }
    }
    doSave() {
        switch (this.mode) {
            case 'detail':
                if (this.projectCreateComponent.onSubmit(() => {
                    this.loadProjects(null);
                }) !== false) {
                    this.displayModal = false;
                }
                break;
            case 'transfer':
                if (!this.dataTransferFrm.transferUser ||
                    !this.dataTransferFrm.transferUser.value) {
                    return;
                }
                this.confirmTransferProject();
                break;
            default:
                break;
        }
    }
    confirmTransferProject() {
        this.confirmationService.confirm({
            header: this.appUtil.translate(this.translate, 'label.transfer_project_title'),
            message: this.appUtil.translateWithParams(this.translate, 'label.transfer_project_content', { email: this.dataTransferFrm.transferUser.value }),
            acceptLabel: this.appUtil.translate(this.translate, 'button.ok'),
            rejectLabel: this.appUtil.translate(this.translate, 'button.cancel'),
            icon: 'fas fa-exclamation-triangle text-danger',
            defaultFocus: 'none',
            accept: () => {
                this.doTransferProject();
            },
        });
    }
    doTransferProject() {
        this.projectService
            .transferProject(this.selectedProjects[0].projectId, this.dataTransferFrm.transferUser.id)
            .subscribe((res) => {
            if (res.status === 200) {
                this.selectedProjects = [];
                this.displayModal = false;
                this.loadProjects(null);
                this.messageService.add({
                    severity: 'success',
                    detail: this.appUtil.translate(this.translate, 'default_toast.save_success'),
                });
            }
        });
    }
    confirmDeleteProject() {
        this.confirmationService.confirm({
            header: this.appUtil.translate(this.translate, 'label.delete_project_title'),
            message: this.appUtil.translate(this.translate, 'label.delete_project_content'),
            icon: 'fas fa-exclamation-triangle text-danger',
            defaultFocus: 'none',
            accept: () => {
                this.doDeleteProject();
            },
        });
    }
    doDeleteProject() {
        for (let i = 0; i < this.selectedProjects.length; i++) {
            this.projectService
                .deleteProject(this.selectedProjects[i].projectId)
                .subscribe((res) => {
                if (res.status === 200 && i === this.selectedProjects.length - 1) {
                    this.messageService.add({
                        severity: 'success',
                        detail: this.appUtil.translate(this.translate, 'default_toast.delete_success'),
                    });
                    this.selectedProjects = [];
                    this.loadProjects(null);
                }
            });
        }
    }
    toggleProjectContextMenu() {
        this.itemsCm = [];
        if (this.selectedProject) {
            if (this.selectedProjects &&
                this.selectedProjects.indexOf(this.selectedProject) > -1) {
                this.selectedProjects = [...this.selectedProjects];
            }
            else {
                this.selectedProjects = [...[], this.selectedProject];
            }
            const authUserId = this.authUser.userId;
            if (this.selectedProjects.length > 1 &&
                _.find(this.selectedProjects, (item) => item.ownerId !== authUserId)) {
                return;
            }
            this.appUtil
                .translateList(this.translate, [
                'label.settings',
                'label.share',
                'label.clone',
                'label.transfer',
                'label.delete',
            ], {})
                .subscribe((res) => {
                // Show setting menu when projects selected is one
                if (this.selectedProjects.length === 1) {
                    this.itemsCm.push({
                        label: res['label.settings'],
                        icon: 'fas fa-cog',
                        command: () => {
                            this.doShowDialog('detail', this.selectedProjects[0]);
                        },
                    });
                }
                // Show share menu
                if (this.selectedProjects.length === 1 &&
                    (this.selectedProjects[0].projectRoleId === app_constants_1.ProjectRole.Owner ||
                        this.selectedProjects[0].projectRoleId === app_constants_1.ProjectRole.Editor)) {
                    this.itemsCm.push({
                        label: res['label.share'],
                        icon: 'fas fa-share-alt',
                        command: () => {
                            this.displayShareModal = true;
                        },
                    });
                }
                // Show transfer menu
                if (this.selectedProjects.length === 1 &&
                    this.selectedProjects[0].ownerId === this.authUser.userId) {
                    this.itemsCm = [
                        ...this.itemsCm,
                        {
                            label: res['label.transfer'],
                            icon: 'fas fa-exchange-alt',
                            command: () => {
                                this.doShowDialog('transfer', this.selectedProjects[0]);
                            },
                        },
                    ];
                }
                // Show clone menu
                if (this.selectedProjects.length === 1 &&
                    this.selectedProjects[0].ownerId === this.authUser.userId) {
                    this.itemsCm = [
                        ...this.itemsCm,
                        {
                            label: res['label.clone'],
                            icon: 'fas fa-copy',
                            command: () => {
                                this.confirmCopyProject();
                            },
                        },
                    ];
                }
                // show delete menu
                if (!_.find(this.selectedProjects, (item) => item.ownerId !== authUserId)) {
                    this.itemsCm = [
                        ...this.itemsCm,
                        {
                            label: res['label.delete'],
                            icon: 'fas fa-trash',
                            styleClass: '',
                            command: () => {
                                this.confirmDeleteProject();
                            },
                        },
                    ];
                }
            });
        }
    }
    confirmCopyProject() {
        this.confirmationService.confirm({
            header: this.appUtil.translate(this.translate, 'label.copy_project_title'),
            message: this.appUtil.translate(this.translate, 'label.copy_project_content'),
            icon: 'fas fa-exclamation-triangle text-danger',
            defaultFocus: 'none',
            accept: () => {
                this.doCopyProject();
            },
        });
    }
    doCopyProject() {
        if (!this.selectedProjects || this.selectedProjects.length !== 1) {
            return;
        }
        this.projectService
            .copyProject(this.selectedProjects[0].projectId)
            .subscribe((res) => {
            if (res.status === 200) {
                this.selectedProjects = [];
                this.loadProjects(null);
            }
        });
    }
    goToDetail(project) {
        if (project.status === 3) {
            this.messageService.add({
                severity: 'info',
                detail: this.appUtil.translate(this.translate, 'default_toast.project_is_copying'),
            });
            return;
        }
        if (this.getProjectsParams.searchType === 1) {
            this.router.navigate(['/project/' + project.projectId + '/0'], {
                queryParams: { query: this.getProjectsParams.searchKey },
            });
        }
        else {
            this.router.navigate(['/project/' + project.projectId + '/0']);
        }
    }
    doCreateLink() {
        this.displayShareModal = false;
        if (this.isSubmitCreateLink) {
            return;
        }
        this.isSubmitCreateLink = true;
        this.linkCreateComponent.createLink((res) => {
            this.linkData = res;
            this.displayShareSettingModal = true;
            this.isSubmitCreateLink = false;
        });
    }
    doRegisterLicense() {
        var _a, _b, _c, _d;
        if (this.linkSettingComponent.shareLinkFrm.controls.showWatermark.value) {
            (_b = (_a = this.linkSettingComponent.viewOnlineSettingComponent) === null || _a === void 0 ? void 0 : _a.form) === null || _b === void 0 ? void 0 : _b.markAllAsTouched();
            if ((_d = (_c = this.linkSettingComponent.viewOnlineSettingComponent) === null || _c === void 0 ? void 0 : _c.form) === null || _d === void 0 ? void 0 : _d.invalid) {
                return;
            }
        }
        if (this.isSubmitShareLink ||
            this.linkSettingComponent.shareLinkFrm.invalid) {
            return;
        }
        this.isSubmitShareLink = true;
        this.linkSettingComponent.registerLicense((isCloseModal) => {
            if (isCloseModal) {
                this.displayShareSettingModal = false;
            }
            this.isSubmitShareLink = false;
        });
    }
    deleteLink() {
        this.displayShareSettingModal = false;
        this.linkSettingComponent.deleteLink();
    }
    onSaveDetail(event) {
        if (event) {
            this.loadProjects(null);
        }
    }
    initializeSocketNotification() {
        const pusher = new pusher_js_1.default(window.atob(environment_1.environment.pusher.app_key), environment_1.environment.pusher.options);
        const channel = pusher.subscribe(this.authUser.teamId);
        const that = this;
        channel.bind('notify-topic-event', (data) => {
            const message = JSON.parse(data);
            switch (message.code) {
                case app_constants_1.default.NOTIFICATION_CODE.COPY_PROJECT.code:
                    if (message.body.project_ids
                        .split(',')
                        .findIndex((id) => id === message.projectId) !== -1) {
                        that.loadProjects(null);
                    }
                    break;
            }
        });
    }
}
exports.ProjectListComponent = ProjectListComponent;
ProjectListComponent.ɵfac = function ProjectListComponent_Factory(t) { return new (t || ProjectListComponent)(i0.ɵɵdirectiveInject(i1.Title), i0.ɵɵdirectiveInject(i2.ProjectService), i0.ɵɵdirectiveInject(i3.TranslateService), i0.ɵɵdirectiveInject(i4.DatePipe), i0.ɵɵdirectiveInject(i5.AuthService), i0.ɵɵdirectiveInject(i6.MessageService), i0.ɵɵdirectiveInject(i7.FolderService), i0.ɵɵdirectiveInject(i8.Router), i0.ɵɵdirectiveInject(i6.ConfirmationService)); };
ProjectListComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ProjectListComponent, selectors: [["app-project-list"]], viewQuery: function ProjectListComponent_Query(rf, ctx) { if (rf & 1) {
        i0.ɵɵviewQuery(_c0, 1);
        i0.ɵɵviewQuery(_c1, 1);
        i0.ɵɵviewQuery(_c2, 1);
        i0.ɵɵviewQuery(_c3, 1);
        i0.ɵɵviewQuery(_c4, 1);
        i0.ɵɵviewQuery(_c5, 1);
    } if (rf & 2) {
        let _t;
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.projectCreateComponent = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.projectSettingComponent = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.projectTransferComponent = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.projectInformationComponent = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.linkCreateComponent = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.linkSettingComponent = _t.first);
    } }, outputs: { isMaxDisplay: "isMaxDisplay" }, decls: 33, vars: 83, consts: [[1, "page-title"], ["dataKey", "projectId", "selectionMode", "multiple", "styleClass", "p-datatable-lg p-datatable-striped", 3, "contextMenuSelection", "first", "selection", "contextMenu", "lazy", "metaKeySelection", "paginator", "rowHover", "rowsPerPageOptions", "rows", "sortField", "sortOrder", "totalRecords", "value", "loading", "contextmenu", "onLazyLoad", "onRowSelect", "onRowUnselect", "contextMenuSelectionChange", "firstChange", "selectionChange"], ["pTemplate", "caption"], ["pTemplate", "header"], ["pTemplate", "body"], ["pTemplate", "emptymessage"], [3, "model", "onShow"], ["cm", ""], ["appendTo", "body", 3, "model"], ["cm_grid", ""], [3, "model", "popup"], ["menuMorOption", ""], [3, "visible", "baseZIndex", "breakpoints", "draggable", "modal", "resizable", "header", "visibleChange"], [1, "p-pt-2"], [3, "showDescription", 4, "ngIf"], ["pTemplate", "footer"], ["maximizable", "false", 3, "visible", "baseZIndex", "breakpoints", "draggable", "header", "modal", "resizable", "onMaximize", "visibleChange"], [3, "disabled", "mode", "projectSettings", "onSaveCallBack", 4, "ngIf"], [3, "frmTransferData", 4, "ngIf"], [3, "visible", "baseZIndex", "breakpoints", "draggable", "modal", "blockScroll", "resizable", "header", "onHide", "visibleChange"], [3, "name", "projectId", "typeShare", 4, "ngIf"], ["maximizable", "true", 3, "visible", "baseZIndex", "breakpoints", "draggable", "modal", "blockScroll", "resizable", "header", "onHide", "visibleChange"], [3, "linkData", "projectId", "isPublicView", 4, "ngIf"], [3, "styleClass"], [1, "p-toolbar-group-left"], [1, "p-float-label"], ["id", "filter", "optionLabel", "name", "optionValue", "code", 3, "ngModel", "options", "onChange", "ngModelChange"], ["for", "filter"], [1, "p-float-label", "p-input-icon-right", "p-ml-1"], [1, "pi", "pi-search"], ["id", "search", "pInputText", "", "type", "text", 1, "p-width-100", 3, "ngModel", "autocomplete", "keyup", "ngModelChange"], ["for", "search"], [1, "p-toolbar-group-right"], ["class", "p-button-rounded p-button-sm", "icon", "fas fa-plus p-button-icon-left", "pButton", "", "pRipple", "", "type", "button", 3, "label", "click", 4, "ngIf"], ["class", "p-button-rounded p-button-text p-button-plain p-ml-1", "icon", "fas fa-link", "pButton", "", "pRipple", "", "type", "button", 3, "title", "click", 4, "ngIf"], ["class", "p-button-rounded p-button-text p-button-plain p-ml-1", "icon", "fas fa-cog", "pButton", "", "pRipple", "", "type", "button", 3, "title", "click", 4, "ngIf"], ["class", "p-button-rounded p-button-text p-button-plain p-ml-1", "icon", "fas fa-trash", "pButton", "", "pRipple", "", "type", "button", 3, "title", "click", 4, "ngIf"], ["class", "p-button-rounded p-button-text p-button-plain p-d-block p-d-md-none p-ml-1", "icon", "fas fa-external-link-alt", "pButton", "", "pRipple", "", "type", "button", 3, "title", "click", 4, "ngIf"], ["class", "p-button-rounded p-button-text p-button-plain p-ml-1", "icon", "fas fa-ellipsis-v", "pButton", "", "pRipple", "", "type", "button", 3, "title", "click", 4, "ngIf"], ["icon", "fas fa-plus p-button-icon-left", "pButton", "", "pRipple", "", "type", "button", 1, "p-button-rounded", "p-button-sm", 3, "label", "click"], ["icon", "fas fa-link", "pButton", "", "pRipple", "", "type", "button", 1, "p-button-rounded", "p-button-text", "p-button-plain", "p-ml-1", 3, "title", "click"], ["icon", "fas fa-cog", "pButton", "", "pRipple", "", "type", "button", 1, "p-button-rounded", "p-button-text", "p-button-plain", "p-ml-1", 3, "title", "click"], ["icon", "fas fa-trash", "pButton", "", "pRipple", "", "type", "button", 1, "p-button-rounded", "p-button-text", "p-button-plain", "p-ml-1", 3, "title", "click"], ["icon", "fas fa-external-link-alt", "pButton", "", "pRipple", "", "type", "button", 1, "p-button-rounded", "p-button-text", "p-button-plain", "p-d-block", "p-d-md-none", "p-ml-1", 3, "title", "click"], ["icon", "fas fa-ellipsis-v", "pButton", "", "pRipple", "", "type", "button", 1, "p-button-rounded", "p-button-text", "p-button-plain", "p-ml-1", 3, "title", "click"], ["pSortableColumn", "projectName", 1, "p-text-left"], ["field", "projectName"], ["pSortableColumn", "ownerName", 1, "p-text-left"], ["field", "ownerName"], ["pSortableColumn", "modifiedDate", 1, "p-text-left"], ["field", "modifiedDate"], [1, "p-d-none", "p-d-lg-table-cell", "p-text-center", 2, "width", "120px"], [1, "p-d-none", "p-d-lg-table-cell", "p-text-center", 2, "width", "150px"], [3, "pContextMenuRow", "pSelectableRowIndex", "pSelectableRow", "dblclick"], [1, "p-text-truncate", "p-text-left"], [1, "p-d-inline"], ["alt", "689Cloud project", "src", "assets/images/ui/folder-24.png", 4, "ngIf"], ["alt", "689Cloud project", "src", "assets/images/ui/folder-lock-24.png", 3, "title", 4, "ngIf"], ["alt", "689Cloud project", "src", "assets/images/ui/folder-share-lock-24.png", 3, "title", 4, "ngIf"], ["alt", "689Cloud project", "src", "assets/images/ui/folder-share-24.png", 4, "ngIf"], ["class", "fas fa-spin fa-spinner", "style", "margin-top: 5px", 3, "ngStyle", 4, "ngIf"], [1, "project-name", 3, "title"], [1, "p-text-left", "p-max-width-100"], ["severity", "success", "styleClass", "p-max-width-100", 3, "value", 4, "ngIf"], ["severity", "info", "styleClass", "p-max-width-100", 3, "title", "value", 4, "ngIf"], ["styleClass", "p-max-width-100", 3, "title", "value", 4, "ngIf"], [1, "p-text-left"], [1, "p-d-none", "p-d-lg-table-cell", "p-text-center"], ["alt", "689Cloud project", "src", "assets/images/ui/folder-24.png"], ["alt", "689Cloud project", "src", "assets/images/ui/folder-lock-24.png", 3, "title"], ["alt", "689Cloud project", "src", "assets/images/ui/folder-share-lock-24.png", 3, "title"], ["alt", "689Cloud project", "src", "assets/images/ui/folder-share-24.png"], [1, "fas", "fa-spin", "fa-spinner", 2, "margin-top", "5px", 3, "ngStyle"], ["severity", "success", "styleClass", "p-max-width-100", 3, "value"], ["severity", "info", "styleClass", "p-max-width-100", 3, "title", "value"], ["styleClass", "p-max-width-100", 3, "title", "value"], ["colspan", "5", 1, "p-text-center", "p-d-none", "p-d-lg-table-cell"], ["colspan", "3", 1, "p-text-center", "p-d-sm-table-cell", "p-d-lg-none"], [3, "showDescription"], ["projectInformationComponent", ""], ["icon", "fas fa-external-link-alt", "styleClass", "p-button-link", 3, "queryParams", "routerLink", "label"], ["icon", "fas fa-times", "styleClass", "p-button-warning", 3, "label", "click"], ["icon", "fas fa-check", 3, "label", "click"], [3, "disabled", "mode", "projectSettings", "onSaveCallBack"], ["projectCreateComponent", ""], [3, "frmTransferData"], ["projectTransferComponent", ""], [1, "p-col-12", "p-text-right", "p-pr-0"], ["icon", "fas fa-times", "pButton", "", "pRipple", "", "type", "button", 1, "p-button-raised", "p-button-warning", "p-mr-2", 3, "label", "click"], ["class", "p-button-raised p-mr-0", "pButton", "", "pRipple", "", "type", "submit", 3, "icon", "label", "click", 4, "ngIf"], ["pButton", "", "pRipple", "", "type", "submit", 1, "p-button-raised", "p-mr-0", 3, "icon", "label", "click"], [3, "name", "projectId", "typeShare"], ["linkCreateComponent", ""], ["icon", "fas fa-times p-button-icon-left", "pButton", "", "pRipple", "", "type", "button", 1, "p-button-raised", "p-button-warning", "p-mr-2", 3, "label", "click"], ["icon", "fas fa-plus p-button-icon-left", "pButton", "", "pRipple", "", "type", "button", 1, "p-button-raised", "p-mr-0", 3, "label", "click"], [3, "linkData", "projectId", "isPublicView"], ["linkSettingComponent", ""], ["icon", "fas fa-times", "pButton", "", "pRipple", "", "type", "button", 1, "p-button-raised", "p-button-danger", "p-mr-2", 3, "label", "click"], ["icon", "fas fa-check", "pButton", "", "pRipple", "", "type", "button", 1, "p-button-raised", "p-mr-0", 3, "label", "click"]], template: function ProjectListComponent_Template(rf, ctx) { if (rf & 1) {
        const _r76 = i0.ɵɵgetCurrentView();
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵtext(1);
        i0.ɵɵpipe(2, "titlecase");
        i0.ɵɵpipe(3, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(4, "p-table", 1);
        i0.ɵɵlistener("contextmenu", function ProjectListComponent_Template_p_table_contextmenu_4_listener() { i0.ɵɵrestoreView(_r76); const _r4 = i0.ɵɵreference(10); return ctx.onContextMenuSelect(_r4); })("onLazyLoad", function ProjectListComponent_Template_p_table_onLazyLoad_4_listener($event) { return ctx.loadProjects($event); })("onRowSelect", function ProjectListComponent_Template_p_table_onRowSelect_4_listener() { return ctx.checkProjectOwner(); })("onRowUnselect", function ProjectListComponent_Template_p_table_onRowUnselect_4_listener() { return ctx.checkProjectOwner(); })("contextMenuSelectionChange", function ProjectListComponent_Template_p_table_contextMenuSelectionChange_4_listener($event) { return ctx.selectedProject = $event; })("firstChange", function ProjectListComponent_Template_p_table_firstChange_4_listener($event) { return ctx.first = $event; })("selectionChange", function ProjectListComponent_Template_p_table_selectionChange_4_listener($event) { return ctx.selectedProjects = $event; });
        i0.ɵɵtemplate(5, ProjectListComponent_ng_template_5_Template, 20, 17, "ng-template", 2);
        i0.ɵɵtemplate(6, ProjectListComponent_ng_template_6_Template, 20, 17, "ng-template", 3);
        i0.ɵɵtemplate(7, ProjectListComponent_ng_template_7_Template, 20, 16, "ng-template", 4);
        i0.ɵɵtemplate(8, ProjectListComponent_ng_template_8_Template, 7, 6, "ng-template", 5);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(9, "p-contextMenu", 6, 7);
        i0.ɵɵlistener("onShow", function ProjectListComponent_Template_p_contextMenu_onShow_9_listener() { return ctx.toggleProjectContextMenu(); });
        i0.ɵɵelementEnd();
        i0.ɵɵelement(11, "p-contextMenu", 8, 9);
        i0.ɵɵelement(13, "p-tieredMenu", 10, 11);
        i0.ɵɵelementStart(15, "p-dialog", 12);
        i0.ɵɵlistener("visibleChange", function ProjectListComponent_Template_p_dialog_visibleChange_15_listener($event) { return ctx.displayCreateProjectDialog = $event; });
        i0.ɵɵpipe(16, "translate");
        i0.ɵɵelementStart(17, "div", 13);
        i0.ɵɵtemplate(18, ProjectListComponent_app_project_information_18_Template, 2, 1, "app-project-information", 14);
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(19, ProjectListComponent_ng_template_19_Template, 8, 18, "ng-template", 15);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(20, "p-dialog", 16);
        i0.ɵɵlistener("onMaximize", function ProjectListComponent_Template_p_dialog_onMaximize_20_listener($event) { return ctx.onMaximizeDialog($event); })("visibleChange", function ProjectListComponent_Template_p_dialog_visibleChange_20_listener($event) { return ctx.displayModal = $event; });
        i0.ɵɵtemplate(21, ProjectListComponent_app_project_create_21_Template, 2, 3, "app-project-create", 17);
        i0.ɵɵtemplate(22, ProjectListComponent_app_project_transfer_22_Template, 2, 0, "app-project-transfer", 18);
        i0.ɵɵtemplate(23, ProjectListComponent_ng_template_23_Template, 5, 6, "ng-template", 15);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(24, "p-dialog", 19);
        i0.ɵɵlistener("onHide", function ProjectListComponent_Template_p_dialog_onHide_24_listener() { return ctx.displayShareModal = false; })("visibleChange", function ProjectListComponent_Template_p_dialog_visibleChange_24_listener($event) { return ctx.displayShareModal = $event; });
        i0.ɵɵpipe(25, "translate");
        i0.ɵɵtemplate(26, ProjectListComponent_app_link_create_26_Template, 2, 3, "app-link-create", 20);
        i0.ɵɵtemplate(27, ProjectListComponent_ng_template_27_Template, 7, 10, "ng-template", 15);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(28, "p-dialog", 21);
        i0.ɵɵlistener("onHide", function ProjectListComponent_Template_p_dialog_onHide_28_listener() { return ctx.displayShareSettingModal = false; })("visibleChange", function ProjectListComponent_Template_p_dialog_visibleChange_28_listener($event) { return ctx.displayShareSettingModal = $event; });
        i0.ɵɵpipe(29, "uppercase");
        i0.ɵɵpipe(30, "translate");
        i0.ɵɵtemplate(31, ProjectListComponent_app_link_setting_31_Template, 2, 3, "app-link-setting", 22);
        i0.ɵɵtemplate(32, ProjectListComponent_ng_template_32_Template, 7, 10, "ng-template", 15);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        const _r4 = i0.ɵɵreference(10);
        i0.ɵɵadvance(1);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 63, i0.ɵɵpipeBind1(3, 65, "label.project_list")));
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("contextMenuSelection", ctx.selectedProject)("first", ctx.first)("selection", ctx.selectedProjects)("contextMenu", _r4)("lazy", true)("metaKeySelection", true)("paginator", ctx.totalRecords > 0)("rowHover", true)("rowsPerPageOptions", ctx.rowOptions)("rows", ctx.rows)("sortField", ctx.sortField)("sortOrder", ctx.ascSort)("totalRecords", ctx.totalRecords)("value", ctx.projects)("loading", ctx.isLoading);
        i0.ɵɵadvance(5);
        i0.ɵɵproperty("model", ctx.itemsCm);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("model", ctx.itemsCm);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("model", ctx.items)("popup", true);
        i0.ɵɵadvance(2);
        i0.ɵɵstyleMap(i0.ɵɵpureFunction0(75, _c9));
        i0.ɵɵpropertyInterpolate("header", i0.ɵɵpipeBind1(16, 67, "label.project_create"));
        i0.ɵɵproperty("visible", ctx.displayCreateProjectDialog)("baseZIndex", 10000)("breakpoints", i0.ɵɵpureFunction0(76, _c10))("draggable", false)("modal", true)("resizable", false);
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("ngIf", ctx.displayCreateProjectDialog);
        i0.ɵɵadvance(2);
        i0.ɵɵstyleMap(i0.ɵɵpureFunction0(77, _c9));
        i0.ɵɵproperty("visible", ctx.displayModal)("baseZIndex", 1)("breakpoints", i0.ɵɵpureFunction0(78, _c10))("draggable", false)("header", ctx.dialogHeader)("modal", true)("resizable", false);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.displayModal && ctx.mode === "detail");
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.displayModal && ctx.mode === "transfer");
        i0.ɵɵadvance(2);
        i0.ɵɵstyleMap(i0.ɵɵpureFunction0(79, _c9));
        i0.ɵɵpropertyInterpolate("header", i0.ɵɵpipeBind1(25, 69, "label.create_link"));
        i0.ɵɵproperty("visible", ctx.displayShareModal)("baseZIndex", 1)("breakpoints", i0.ɵɵpureFunction0(80, _c10))("draggable", false)("modal", true)("blockScroll", true)("resizable", false);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.displayShareModal);
        i0.ɵɵadvance(2);
        i0.ɵɵstyleMap(i0.ɵɵpureFunction0(81, _c9));
        i0.ɵɵpropertyInterpolate("header", i0.ɵɵpipeBind1(29, 71, i0.ɵɵpipeBind1(30, 73, "label.share_link")));
        i0.ɵɵproperty("visible", ctx.displayShareSettingModal)("baseZIndex", 1)("breakpoints", i0.ɵɵpureFunction0(82, _c10))("draggable", false)("modal", true)("blockScroll", true)("resizable", false);
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("ngIf", ctx.displayShareSettingModal);
    } }, directives: [i9.Table, i6.PrimeTemplate, i10.ContextMenu, i11.TieredMenu, i12.Dialog, i4.NgIf, i13.Toolbar, i14.Dropdown, i15.NgControlStatus, i15.NgModel, i15.DefaultValueAccessor, i16.InputText, i17.ButtonDirective, i18.Ripple, i9.SortableColumn, i9.SortIcon, i9.ContextMenuRow, i9.SelectableRow, i4.NgStyle, i19.Tag, i20.ProjectInformationComponent, i17.Button, i8.RouterLink, i21.ProjectCreateComponent, i22.ProjectTransferComponent, i23.LinkCreateComponent, i24.LinkSettingComponent], pipes: [i4.TitleCasePipe, i3.TranslatePipe, i4.UpperCasePipe], styles: ["[_nghost-%COMP%]     .p-datatable.p-datatable-lg .p-datatable-header {\n  padding: 0.9375rem 0;\n}\n@media screen and (max-width: 576px) {\n  [_nghost-%COMP%]     .p-d-sm-table-cell {\n    display: table-cell !important;\n  }\n}\n@media screen and (min-width: 768px) {\n  [_nghost-%COMP%]     .p-d-md-table-cell {\n    display: table-cell !important;\n  }\n}\n@media only screen and (min-width: 992px) {\n  [_nghost-%COMP%]     .p-d-lg-table-cell {\n    display: table-cell !important;\n  }\n}\n[_nghost-%COMP%]     .p-max-width-100 {\n  max-width: 100%;\n}\n[_nghost-%COMP%]     .p-tag {\n  padding: 0.1rem 0.4rem !important;\n}\n[_nghost-%COMP%]     .p-tag-value {\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  font-size: 12px;\n  line-height: 16px;\n}\n.project-name[_ngcontent-%COMP%] {\n  vertical-align: top;\n  line-height: 26px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvcHJvamVjdC9wcm9qZWN0LWxpc3QvcHJvamVjdC1saXN0LmNvbXBvbmVudC5zY3NzIiwic3JjL2FwcC9hdXRoZW50aWNhdGlvbi1wYWdlcy9wcm9qZWN0L3Byb2plY3QtbGlzdC9wcm9qZWN0LWxpc3QuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0U7RUFDRSxvQkFBQTtBQ0FKO0FESUU7RUFDRTtJQUNFLDhCQUFBO0VDRko7QUFDRjtBREtFO0VBQ0U7SUFDRSw4QkFBQTtFQ0hKO0FBQ0Y7QURPRTtFQUNFO0lBQ0UsOEJBQUE7RUNMSjtBQUNGO0FEUUU7RUFDRSxlQUFBO0FDTko7QURTRTtFQUNFLGlDQUFBO0FDUEo7QURVRTtFQUNFLGdCQUFBO0VBQ0EsdUJBQUE7RUFDQSxtQkFBQTtFQUNBLGVBQUE7RUFDQSxpQkFBQTtBQ1JKO0FEWUE7RUFDRSxtQkFBQTtFQUNBLGlCQUFBO0FDVEYiLCJmaWxlIjoic3JjL2FwcC9hdXRoZW50aWNhdGlvbi1wYWdlcy9wcm9qZWN0L3Byb2plY3QtbGlzdC9wcm9qZWN0LWxpc3QuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyI6aG9zdCA6Om5nLWRlZXAge1xuICAucC1kYXRhdGFibGUucC1kYXRhdGFibGUtbGcgLnAtZGF0YXRhYmxlLWhlYWRlciB7XG4gICAgcGFkZGluZzogMC45Mzc1cmVtIDA7XG4gIH1cblxuICAvLyB4c1xuICBAbWVkaWEgc2NyZWVuIGFuZCAobWF4LXdpZHRoOiA1NzZweCkge1xuICAgIC5wLWQtc20tdGFibGUtY2VsbCB7XG4gICAgICBkaXNwbGF5OiB0YWJsZS1jZWxsICFpbXBvcnRhbnQ7XG4gICAgfVxuICB9XG5cbiAgQG1lZGlhIHNjcmVlbiBhbmQgKG1pbi13aWR0aDogNzY4cHgpIHtcbiAgICAucC1kLW1kLXRhYmxlLWNlbGwge1xuICAgICAgZGlzcGxheTogdGFibGUtY2VsbCAhaW1wb3J0YW50O1xuICAgIH1cbiAgfVxuXG4gIC8vIGxnXG4gIEBtZWRpYSBvbmx5IHNjcmVlbiBhbmQgKG1pbi13aWR0aDogOTkycHgpIHtcbiAgICAucC1kLWxnLXRhYmxlLWNlbGwge1xuICAgICAgZGlzcGxheTogdGFibGUtY2VsbCAhaW1wb3J0YW50O1xuICAgIH1cbiAgfVxuXG4gIC5wLW1heC13aWR0aC0xMDAge1xuICAgIG1heC13aWR0aDogMTAwJTtcbiAgfVxuXG4gIC5wLXRhZyB7XG4gICAgcGFkZGluZzogMC4xcmVtIDAuNHJlbSAhaW1wb3J0YW50O1xuICB9XG5cbiAgLnAtdGFnLXZhbHVlIHtcbiAgICBvdmVyZmxvdzogaGlkZGVuO1xuICAgIHRleHQtb3ZlcmZsb3c6IGVsbGlwc2lzO1xuICAgIHdoaXRlLXNwYWNlOiBub3dyYXA7XG4gICAgZm9udC1zaXplOiAxMnB4O1xuICAgIGxpbmUtaGVpZ2h0OiAxNnB4O1xuICB9XG59XG5cbi5wcm9qZWN0LW5hbWUge1xuICB2ZXJ0aWNhbC1hbGlnbjogdG9wO1xuICBsaW5lLWhlaWdodDogMjZweDtcbn1cbiIsIjpob3N0IDo6bmctZGVlcCAucC1kYXRhdGFibGUucC1kYXRhdGFibGUtbGcgLnAtZGF0YXRhYmxlLWhlYWRlciB7XG4gIHBhZGRpbmc6IDAuOTM3NXJlbSAwO1xufVxuQG1lZGlhIHNjcmVlbiBhbmQgKG1heC13aWR0aDogNTc2cHgpIHtcbiAgOmhvc3QgOjpuZy1kZWVwIC5wLWQtc20tdGFibGUtY2VsbCB7XG4gICAgZGlzcGxheTogdGFibGUtY2VsbCAhaW1wb3J0YW50O1xuICB9XG59XG5AbWVkaWEgc2NyZWVuIGFuZCAobWluLXdpZHRoOiA3NjhweCkge1xuICA6aG9zdCA6Om5nLWRlZXAgLnAtZC1tZC10YWJsZS1jZWxsIHtcbiAgICBkaXNwbGF5OiB0YWJsZS1jZWxsICFpbXBvcnRhbnQ7XG4gIH1cbn1cbkBtZWRpYSBvbmx5IHNjcmVlbiBhbmQgKG1pbi13aWR0aDogOTkycHgpIHtcbiAgOmhvc3QgOjpuZy1kZWVwIC5wLWQtbGctdGFibGUtY2VsbCB7XG4gICAgZGlzcGxheTogdGFibGUtY2VsbCAhaW1wb3J0YW50O1xuICB9XG59XG46aG9zdCA6Om5nLWRlZXAgLnAtbWF4LXdpZHRoLTEwMCB7XG4gIG1heC13aWR0aDogMTAwJTtcbn1cbjpob3N0IDo6bmctZGVlcCAucC10YWcge1xuICBwYWRkaW5nOiAwLjFyZW0gMC40cmVtICFpbXBvcnRhbnQ7XG59XG46aG9zdCA6Om5nLWRlZXAgLnAtdGFnLXZhbHVlIHtcbiAgb3ZlcmZsb3c6IGhpZGRlbjtcbiAgdGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7XG4gIHdoaXRlLXNwYWNlOiBub3dyYXA7XG4gIGZvbnQtc2l6ZTogMTJweDtcbiAgbGluZS1oZWlnaHQ6IDE2cHg7XG59XG5cbi5wcm9qZWN0LW5hbWUge1xuICB2ZXJ0aWNhbC1hbGlnbjogdG9wO1xuICBsaW5lLWhlaWdodDogMjZweDtcbn0iXX0= */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ProjectListComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-project-list',
                templateUrl: './project-list.component.html',
                styleUrls: ['./project-list.component.scss'],
            }]
    }], function () { return [{ type: i1.Title }, { type: i2.ProjectService }, { type: i3.TranslateService }, { type: i4.DatePipe }, { type: i5.AuthService }, { type: i6.MessageService }, { type: i7.FolderService }, { type: i8.Router }, { type: i6.ConfirmationService }]; }, { projectCreateComponent: [{
            type: core_1.ViewChild,
            args: ['projectCreateComponent']
        }], projectSettingComponent: [{
            type: core_1.ViewChild,
            args: ['projectSettingComponent']
        }], projectTransferComponent: [{
            type: core_1.ViewChild,
            args: ['projectTransferComponent']
        }], projectInformationComponent: [{
            type: core_1.ViewChild,
            args: ['projectInformationComponent']
        }], linkCreateComponent: [{
            type: core_1.ViewChild,
            args: ['linkCreateComponent']
        }], linkSettingComponent: [{
            type: core_1.ViewChild,
            args: ['linkSettingComponent']
        }], isMaxDisplay: [{
            type: core_1.Output
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/project/project-setting/project-setting.component.ts":
/*!*******************************************************************************************!*\
  !*** ./src/app/authentication-pages/project/project-setting/project-setting.component.ts ***!
  \*******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ProjectSettingComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! ../project-form/project-form.component */ "./src/app/authentication-pages/project/project-form/project-form.component.ts"));
const _c0 = ["projectFormComponent"];
class ProjectSettingComponent {
    constructor() {
        this.frmData = new core_1.EventEmitter();
        this.frmDrmData = new core_1.EventEmitter();
        this.frmWmData = new core_1.EventEmitter();
        this.frmCoData = new core_1.EventEmitter();
        this.frmNotyData = new core_1.EventEmitter();
        this.isInValidFrm = new core_1.EventEmitter();
        this.isInValidFrmDrm = new core_1.EventEmitter();
        this.isInValidFrmWm = new core_1.EventEmitter();
        this.isInValidFrmCo = new core_1.EventEmitter();
    }
    ngOnInit() {
    }
    ngOnChanges(changes) {
    }
    checkInValid(event, key) {
        switch (key) {
            case 'frm':
                this.isInValidFrm.emit(event);
                break;
            case 'drm':
                this.isInValidFrmDrm.emit(event);
                break;
            case 'wm':
                this.isInValidFrmWm.emit(event);
                break;
            case 'co':
                this.isInValidFrmCo.emit(event);
                break;
        }
    }
    pushData(event, key) {
        switch (key) {
            case 'frm':
                this.frmData.emit(event);
                break;
            case 'drm':
                this.frmDrmData.emit(event);
                break;
            case 'wm':
                this.frmWmData.emit(event);
                break;
            case 'co':
                this.frmCoData.emit(event);
                break;
            case 'noty':
                this.frmNotyData.emit(event);
                break;
        }
    }
}
exports.ProjectSettingComponent = ProjectSettingComponent;
ProjectSettingComponent.ɵfac = function ProjectSettingComponent_Factory(t) { return new (t || ProjectSettingComponent)(); };
ProjectSettingComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ProjectSettingComponent, selectors: [["app-project-setting"]], viewQuery: function ProjectSettingComponent_Query(rf, ctx) { if (rf & 1) {
        i0.ɵɵviewQuery(_c0, 1);
    } if (rf & 2) {
        let _t;
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.projectForm = _t.first);
    } }, inputs: { projectSettings: "projectSettings", maximized: "maximized" }, outputs: { frmData: "frmData", frmDrmData: "frmDrmData", frmWmData: "frmWmData", frmCoData: "frmCoData", frmNotyData: "frmNotyData", isInValidFrm: "isInValidFrm", isInValidFrmDrm: "isInValidFrmDrm", isInValidFrmWm: "isInValidFrmWm", isInValidFrmCo: "isInValidFrmCo" }, features: [i0.ɵɵNgOnChangesFeature], decls: 2, vars: 0, consts: [["projectFormComponent", ""]], template: function ProjectSettingComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelement(0, "app-project-form", null, 0);
    } }, directives: [i1.ProjectFormComponent], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL3Byb2plY3QvcHJvamVjdC1zZXR0aW5nL3Byb2plY3Qtc2V0dGluZy5jb21wb25lbnQuc2NzcyJ9 */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ProjectSettingComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-project-setting',
                templateUrl: './project-setting.component.html',
                styleUrls: ['./project-setting.component.scss']
            }]
    }], function () { return []; }, { projectForm: [{
            type: core_1.ViewChild,
            args: ['projectFormComponent']
        }], projectSettings: [{
            type: core_1.Input
        }], maximized: [{
            type: core_1.Input
        }], frmData: [{
            type: core_1.Output
        }], frmDrmData: [{
            type: core_1.Output
        }], frmWmData: [{
            type: core_1.Output
        }], frmCoData: [{
            type: core_1.Output
        }], frmNotyData: [{
            type: core_1.Output
        }], isInValidFrm: [{
            type: core_1.Output
        }], isInValidFrmDrm: [{
            type: core_1.Output
        }], isInValidFrmWm: [{
            type: core_1.Output
        }], isInValidFrmCo: [{
            type: core_1.Output
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/project/project-transfer/project-transfer.component.ts":
/*!*********************************************************************************************!*\
  !*** ./src/app/authentication-pages/project/project-transfer/project-transfer.component.ts ***!
  \*********************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ProjectTransferComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
const app_constants_1 = tslib_1.__importStar(__webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm2015/operators/index.js");
const _ = tslib_1.__importStar(__webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/user.service */ "./src/app/services/user.service.ts"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/team-setting.service */ "./src/app/services/team-setting.service.ts"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! @ng-select/ng-select */ "./node_modules/@ng-select/ng-select/__ivy_ngcc__/fesm2015/ng-select-ng-select.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
function ProjectTransferComponent_ng_template_9_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(2, "div");
    i0.ɵɵtext(3);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const item_r1 = ctx.item;
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(item_r1.name);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(item_r1.value);
} }
const _c0 = function () { return { maxLength: "64" }; };
class ProjectTransferComponent {
    constructor(fb, userService, teamSettingService, authService) {
        this.fb = fb;
        this.userService = userService;
        this.teamSettingService = teamSettingService;
        this.authService = authService;
        this.frmTransferData = new core_1.EventEmitter();
        this.transferFrm = new forms_1.FormGroup({});
        this.constant = app_constants_1.default;
        this.util = app_util_1.default;
    }
    ngOnInit() {
        this.loading = true;
        this.authUser = this.authService.getAuthUser;
        this.transferFrm = this.fb.group({
            transferUser: [[]]
        });
        const params = {
            teamId: this.authUser.teamId,
            type: 0
        };
        this.teamSettingService.getTeamSettingByType(this.util.toSnakeCaseKey(params)).subscribe(data => {
            if (data.status === 200) {
                const settings = data.data.settings ? data.data.settings.split(',') : [];
                for (let i = 0; i < settings.length; i++) {
                    settings[i] = parseInt(settings[i], 0);
                }
                // allow team admin roles and team setting role
                settings.push(app_constants_1.SystemRole.TeamAdmin);
                this.allowCreateProject = settings;
                this.userList$ = this.getUsers();
            }
        });
        this.checkValueChange();
    }
    checkValueChange() {
        this.transferFrm.valueChanges.subscribe(val => {
            this.frmTransferData.emit(val);
        });
    }
    blockSpecialChars(event) {
        const k = event.charCode;
        // 44,   47/   60<   62>   123{   125}
        return (k !== 44 && k !== 47 && k !== 60
            && k !== 62 && k !== 123 && k !== 125);
    }
    getUsers() {
        const userCustoms = [];
        return this.userService.getAllUsersInTeam(this.authUser.teamId)
            .pipe(operators_1.map(res => {
            if (res.status === 200) {
                res.data.forEach(u => {
                    if (this.authUser.userId !== u.userId && _.indexOf(this.allowCreateProject, u.roleId) !== -1) {
                        userCustoms.push({
                            id: u.userId,
                            value: u.mailAddress,
                            name: (this.authService.getUserLanguage === 'ja') ? u.lastName + u.firstName : u.firstName + u.lastName
                        });
                    }
                });
            }
            this.loading = false;
            return userCustoms;
        }));
    }
}
exports.ProjectTransferComponent = ProjectTransferComponent;
ProjectTransferComponent.ɵfac = function ProjectTransferComponent_Factory(t) { return new (t || ProjectTransferComponent)(i0.ɵɵdirectiveInject(i1.FormBuilder), i0.ɵɵdirectiveInject(i2.UserService), i0.ɵɵdirectiveInject(i3.TeamSettingService), i0.ɵɵdirectiveInject(i4.AuthService)); };
ProjectTransferComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ProjectTransferComponent, selectors: [["app-project-transfer"]], outputs: { frmTransferData: "frmTransferData" }, decls: 10, vars: 18, consts: [[1, "transfer-frm", 3, "formGroup"], [1, "overflow-box"], ["bindLabel", "value", "formControlName", "transferUser", 1, "select-user", 3, "items", "hideSelected", "inputAttrs", "loading", "ngModel", "notFoundText", "clearAllText", "keypress", "ngModelChange"], ["ng-option-tmp", ""]], template: function ProjectTransferComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "form", 0);
        i0.ɵɵelementStart(1, "label");
        i0.ɵɵtext(2);
        i0.ɵɵpipe(3, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(4, "div", 1);
        i0.ɵɵelementStart(5, "ng-select", 2);
        i0.ɵɵlistener("keypress", function ProjectTransferComponent_Template_ng_select_keypress_5_listener($event) { return ctx.blockSpecialChars($event); })("ngModelChange", function ProjectTransferComponent_Template_ng_select_ngModelChange_5_listener($event) { return ctx.transferUser = $event; });
        i0.ɵɵpipe(6, "async");
        i0.ɵɵpipe(7, "translate");
        i0.ɵɵpipe(8, "translate");
        i0.ɵɵtemplate(9, ProjectTransferComponent_ng_template_9_Template, 4, 2, "ng-template", 3);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵproperty("formGroup", ctx.transferFrm);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 9, "label.transfer_project_role"), " ");
        i0.ɵɵadvance(3);
        i0.ɵɵpropertyInterpolate("notFoundText", i0.ɵɵpipeBind1(7, 13, "label.no_item_found"));
        i0.ɵɵpropertyInterpolate("clearAllText", i0.ɵɵpipeBind1(8, 15, "label.clear_all"));
        i0.ɵɵproperty("items", i0.ɵɵpipeBind1(6, 11, ctx.userList$))("hideSelected", true)("inputAttrs", i0.ɵɵpureFunction0(17, _c0))("loading", ctx.loading)("ngModel", ctx.transferUser);
    } }, directives: [i1.ɵangular_packages_forms_forms_y, i1.NgControlStatusGroup, i1.FormGroupDirective, i5.NgSelectComponent, i1.NgControlStatus, i1.FormControlName, i5.ɵf], pipes: [i6.TranslatePipe, i7.AsyncPipe], styles: [".transfer-frm[_ngcontent-%COMP%] {\n  min-height: 50px;\n}\n\n.overflow-box[_ngcontent-%COMP%] {\n  position: absolute;\n  width: 93%;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvcHJvamVjdC9wcm9qZWN0LXRyYW5zZmVyL3Byb2plY3QtdHJhbnNmZXIuY29tcG9uZW50LnNjc3MiLCJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL3Byb2plY3QvcHJvamVjdC10cmFuc2Zlci9wcm9qZWN0LXRyYW5zZmVyLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsZ0JBQUE7QUNDRjs7QURFQTtFQUNFLGtCQUFBO0VBQ0EsVUFBQTtBQ0NGIiwiZmlsZSI6InNyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvcHJvamVjdC9wcm9qZWN0LXRyYW5zZmVyL3Byb2plY3QtdHJhbnNmZXIuY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyIudHJhbnNmZXItZnJtIHtcbiAgbWluLWhlaWdodDogNTBweDtcbn1cblxuLm92ZXJmbG93LWJveCB7XG4gIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgd2lkdGg6IDkzJTtcbn1cbiIsIi50cmFuc2Zlci1mcm0ge1xuICBtaW4taGVpZ2h0OiA1MHB4O1xufVxuXG4ub3ZlcmZsb3ctYm94IHtcbiAgcG9zaXRpb246IGFic29sdXRlO1xuICB3aWR0aDogOTMlO1xufSJdfQ== */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ProjectTransferComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-project-transfer',
                templateUrl: './project-transfer.component.html',
                styleUrls: ['./project-transfer.component.scss']
            }]
    }], function () { return [{ type: i1.FormBuilder }, { type: i2.UserService }, { type: i3.TeamSettingService }, { type: i4.AuthService }]; }, { frmTransferData: [{
            type: core_1.Output
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/project/project.component.ts":
/*!*******************************************************************!*\
  !*** ./src/app/authentication-pages/project/project.component.ts ***!
  \*******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ProjectComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
class ProjectComponent {
    constructor() { }
    ngOnInit() {
    }
}
exports.ProjectComponent = ProjectComponent;
ProjectComponent.ɵfac = function ProjectComponent_Factory(t) { return new (t || ProjectComponent)(); };
ProjectComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ProjectComponent, selectors: [["app-project"]], decls: 1, vars: 0, template: function ProjectComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelement(0, "router-outlet");
    } }, directives: [i1.RouterOutlet], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL2F1dGhlbnRpY2F0aW9uLXBhZ2VzL3Byb2plY3QvcHJvamVjdC5jb21wb25lbnQuc2NzcyJ9 */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ProjectComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-project',
                templateUrl: './project.component.html',
                styleUrls: ['./project.component.scss']
            }]
    }], function () { return []; }, null); })();


/***/ }),

/***/ "./src/app/authentication-pages/view-online/view-online-form/view-online-form.component.ts":
/*!*************************************************************************************************!*\
  !*** ./src/app/authentication-pages/view-online/view-online-form/view-online-form.component.ts ***!
  \*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ViewOnlineFormComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/file.service */ "./src/app/services/file.service.ts"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! primeng/sidebar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-sidebar.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! ../view-online.component */ "./src/app/authentication-pages/view-online/view-online.component.ts"));
function ViewOnlineFormComponent_app_view_online_1_Template(rf, ctx) { if (rf & 1) {
    const _r2 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "app-view-online", 2);
    i0.ɵɵlistener("isClose", function ViewOnlineFormComponent_app_view_online_1_Template_app_view_online_isClose_0_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r1 = i0.ɵɵnextContext(); return ctx_r1.isViewOnline = $event; });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵproperty("emailView", ctx_r0.emailView)("isLinkView", ctx_r0.isLinkView)("isViewOnline", ctx_r0.isViewOnline)("file", ctx_r0.file)("watermarkSetting", ctx_r0.wmSettings)("linkId", ctx_r0.linkId)("printable", ctx_r0.printable);
} }
class ViewOnlineFormComponent {
    constructor(authService, fileService, translate, messageService) {
        this.authService = authService;
        this.fileService = fileService;
        this.translate = translate;
        this.messageService = messageService;
        this.isClose = new core_1.EventEmitter();
        this.util = app_util_1.default;
        this.isViewOnline = false;
        this.wmSubSetting = {
            wmText: '',
            wmFontSize: 0,
            wmColor: '',
            wmPosition: {}
        };
        this.wmSettings = {
            defaultWm: 1,
            showWm: 1,
            setting: null
        };
    }
    ngOnInit() {
        this.authUser = this.authService.getAuthUser;
        if (!this.isLinkView) {
            this.doViewFileOnline(this.file);
        }
        else {
            this.isViewOnline = true;
        }
        this.handleWatermark();
    }
    doViewFileOnline(file) {
        const paramsFileLicense = {
            projectId: this.projectId,
            folderId: (file.parentFolderId) ? file.parentFolderId : '0'
        };
        this.fileView = file;
        this.fileService.getFileDrmSettings(file.id, this.util.toSnakeCaseKey(paramsFileLicense))
            .subscribe(res => {
            if (res.status === 200) {
                if (!this.isLinkView) {
                    this.printable = res.data.fileProject.printable;
                }
                this.isViewOnline = true;
            }
            else if (res.status === 403) {
                this.messageService.add({
                    severity: 'error',
                    detail: this.util.translate(this.translate, 'error.' + res.status)
                });
                window.location.reload();
            }
        });
    }
    handleWatermark() {
        if (this.watermarkSetting && this.watermarkSetting !== 'null') {
            const positions = this.util.getWatermarkPositionObj(this.translate);
            this.wmSettings = this.util.toCamelCaseKey(JSON.parse(this.watermarkSetting));
            if (this.wmSettings.defaultWm === 1) {
                const email = (this.emailView) ? this.emailView + ' ' : '';
                this.wmSubSetting.wmText = email + new Date().toLocaleDateString('en-US', {
                    month: '2-digit',
                    day: '2-digit',
                    year: 'numeric'
                });
                this.wmSubSetting.wmColor = 'RGB(0,0,255)';
                this.wmSubSetting.wmFontSize = 50;
                this.wmSubSetting.wmPosition = positions[0];
                this.wmSettings.setting = this.wmSubSetting;
            }
            else {
                this.wmSubSetting.wmText = escape(this.wmSettings.setting.wmText);
                this.wmSubSetting.wmPosition = positions.find(p => p.code === this.wmSettings.setting.wmPosition);
                this.wmSubSetting.wmColor = this.wmSettings.setting.wmColor;
                this.wmSubSetting.wmFontSize = this.wmSettings.setting.wmFontSize;
                this.wmSettings.setting = this.wmSubSetting;
            }
        }
        else {
            this.wmSettings.showWm = 0;
        }
    }
    doClose() {
        this.isClose.emit(false);
    }
}
exports.ViewOnlineFormComponent = ViewOnlineFormComponent;
ViewOnlineFormComponent.ɵfac = function ViewOnlineFormComponent_Factory(t) { return new (t || ViewOnlineFormComponent)(i0.ɵɵdirectiveInject(i1.AuthService), i0.ɵɵdirectiveInject(i2.FileService), i0.ɵɵdirectiveInject(i3.TranslateService), i0.ɵɵdirectiveInject(i4.MessageService)); };
ViewOnlineFormComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ViewOnlineFormComponent, selectors: [["app-view-online-form"]], inputs: { emailView: "emailView", projectId: "projectId", file: "file", watermarkSetting: "watermarkSetting", isLinkView: "isLinkView", printable: "printable", linkId: "linkId" }, outputs: { isClose: "isClose" }, decls: 2, vars: 7, consts: [["blockScroll", "true", 1, "view-style", 3, "visible", "baseZIndex", "autoZIndex", "closeOnEscape", "showCloseIcon", "fullScreen", "visibleChange", "onHide"], [3, "emailView", "isLinkView", "isViewOnline", "file", "watermarkSetting", "linkId", "printable", "isClose", 4, "ngIf"], [3, "emailView", "isLinkView", "isViewOnline", "file", "watermarkSetting", "linkId", "printable", "isClose"]], template: function ViewOnlineFormComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "p-sidebar", 0);
        i0.ɵɵlistener("visibleChange", function ViewOnlineFormComponent_Template_p_sidebar_visibleChange_0_listener($event) { return ctx.isViewOnline = $event; })("onHide", function ViewOnlineFormComponent_Template_p_sidebar_onHide_0_listener() { return ctx.doClose(); });
        i0.ɵɵtemplate(1, ViewOnlineFormComponent_app_view_online_1_Template, 1, 7, "app-view-online", 1);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵproperty("visible", ctx.isViewOnline)("baseZIndex", 1007)("autoZIndex", false)("closeOnEscape", true)("showCloseIcon", false)("fullScreen", true);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.isViewOnline);
    } }, directives: [i5.Sidebar, i6.NgIf, i7.ViewOnlineComponent], styles: [".view-style[_ngcontent-%COMP%] {\n  z-index: 1007 !important;\n  position: fixed;\n}\n\n[_nghost-%COMP%]  .p-sidebar {\n  padding: 0 !important;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvYXV0aGVudGljYXRpb24tcGFnZXMvdmlldy1vbmxpbmUvdmlldy1vbmxpbmUtZm9ybS92aWV3LW9ubGluZS1mb3JtLmNvbXBvbmVudC5zY3NzIiwic3JjL2FwcC9hdXRoZW50aWNhdGlvbi1wYWdlcy92aWV3LW9ubGluZS92aWV3LW9ubGluZS1mb3JtL3ZpZXctb25saW5lLWZvcm0uY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSx3QkFBQTtFQUNBLGVBQUE7QUNDRjs7QURFRTtFQUNFLHFCQUFBO0FDQ0oiLCJmaWxlIjoic3JjL2FwcC9hdXRoZW50aWNhdGlvbi1wYWdlcy92aWV3LW9ubGluZS92aWV3LW9ubGluZS1mb3JtL3ZpZXctb25saW5lLWZvcm0uY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyIudmlldy1zdHlsZSB7XG4gIHotaW5kZXg6IDEwMDcgIWltcG9ydGFudDtcbiAgcG9zaXRpb246IGZpeGVkO1xufVxuOmhvc3QoOjpuZy1kZWVwKXtcbiAgLnAtc2lkZWJhciB7XG4gICAgcGFkZGluZzogMCAhaW1wb3J0YW50O1xuICB9XG59XG4iLCIudmlldy1zdHlsZSB7XG4gIHotaW5kZXg6IDEwMDcgIWltcG9ydGFudDtcbiAgcG9zaXRpb246IGZpeGVkO1xufVxuXG46aG9zdCg6Om5nLWRlZXApIC5wLXNpZGViYXIge1xuICBwYWRkaW5nOiAwICFpbXBvcnRhbnQ7XG59Il19 */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ViewOnlineFormComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-view-online-form',
                templateUrl: './view-online-form.component.html',
                styleUrls: ['./view-online-form.component.scss']
            }]
    }], function () { return [{ type: i1.AuthService }, { type: i2.FileService }, { type: i3.TranslateService }, { type: i4.MessageService }]; }, { emailView: [{
            type: core_1.Input
        }], projectId: [{
            type: core_1.Input
        }], file: [{
            type: core_1.Input
        }], watermarkSetting: [{
            type: core_1.Input
        }], isLinkView: [{
            type: core_1.Input
        }], printable: [{
            type: core_1.Input
        }], linkId: [{
            type: core_1.Input
        }], isClose: [{
            type: core_1.Output
        }] }); })();


/***/ }),

/***/ "./src/app/authentication-pages/view-online/view-online.component.ts":
/*!***************************************************************************!*\
  !*** ./src/app/authentication-pages/view-online/view-online.component.ts ***!
  \***************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ViewOnlineComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const file_model_1 = __webpack_require__(/*! ../../../models/file.model */ "./src/models/file.model.ts");
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/__ivy_ngcc__/fesm2015/platform-browser.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! ../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! ../../services/file.service */ "./src/app/services/file.service.ts"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! primeng/ripple */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-ripple.js"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! ng2-pdfjs-viewer */ "./node_modules/ng2-pdfjs-viewer/__ivy_ngcc__/index.js"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
function ViewOnlineComponent_span_7_i_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 24);
} }
function ViewOnlineComponent_span_7_i_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 25);
} }
function ViewOnlineComponent_span_7_i_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 26);
} }
function ViewOnlineComponent_span_7_i_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 27);
} }
function ViewOnlineComponent_span_7_i_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 28);
} }
function ViewOnlineComponent_span_7_i_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 28);
} }
function ViewOnlineComponent_span_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 18);
    i0.ɵɵtemplate(1, ViewOnlineComponent_span_7_i_1_Template, 1, 0, "i", 19);
    i0.ɵɵtemplate(2, ViewOnlineComponent_span_7_i_2_Template, 1, 0, "i", 20);
    i0.ɵɵtemplate(3, ViewOnlineComponent_span_7_i_3_Template, 1, 0, "i", 21);
    i0.ɵɵtemplate(4, ViewOnlineComponent_span_7_i_4_Template, 1, 0, "i", 22);
    i0.ɵɵtemplate(5, ViewOnlineComponent_span_7_i_5_Template, 1, 0, "i", 23);
    i0.ɵɵtemplate(6, ViewOnlineComponent_span_7_i_6_Template, 1, 0, "i", 12);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵproperty("ngSwitch", ctx_r0.file.fileType);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 1);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 3);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 4);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 5);
} }
function ViewOnlineComponent_i_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 29);
} }
function ViewOnlineComponent_i_9_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 30);
} }
function ViewOnlineComponent_i_10_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 31);
} }
function ViewOnlineComponent_i_11_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 32);
} }
function ViewOnlineComponent_i_12_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 33);
} }
function ViewOnlineComponent_i_13_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 28);
} }
function ViewOnlineComponent_div_14_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 34);
    i0.ɵɵelement(1, "i", 35);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("title", i0.ɵɵpipeBind1(2, 1, "label.encoded"));
} }
function ViewOnlineComponent_div_18_iframe_2_Template(rf, ctx) { if (rf & 1) {
    const _r22 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "iframe", 43);
    i0.ɵɵlistener("load", function ViewOnlineComponent_div_18_iframe_2_Template_iframe_load_0_listener($event) { i0.ɵɵrestoreView(_r22); const ctx_r21 = i0.ɵɵnextContext(2); return ctx_r21.onIframeLoad($event); });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r16 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("src", ctx_r16.currentUrl, i0.ɵɵsanitizeResourceUrl)("frameBorder", 0);
} }
function ViewOnlineComponent_div_18_ng2_pdfjs_viewer_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "ng2-pdfjs-viewer", 44);
} if (rf & 2) {
    const ctx_r17 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("pdfSrc", ctx_r17.currentUrl)("locale", (ctx_r17.authUser == null ? null : ctx_r17.authUser.lang) === "ja" ? "ja-JP" : (ctx_r17.authUser == null ? null : ctx_r17.authUser.lang) === "vi" ? "vi-VN" : "en-GB")("download", ctx_r17.printable === 1);
} }
function ViewOnlineComponent_div_18_div_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 45);
    i0.ɵɵelement(1, "img", 46);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r18 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("src", ctx_r18.currentUrl, i0.ɵɵsanitizeUrl);
} }
function ViewOnlineComponent_div_18_div_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 47);
    i0.ɵɵelementStart(1, "audio", 48);
    i0.ɵɵelement(2, "source", 49);
    i0.ɵɵelement(3, "source", 50);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r19 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("src", ctx_r19.currentUrl, i0.ɵɵsanitizeUrl);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("src", ctx_r19.currentUrl, i0.ɵɵsanitizeUrl);
} }
function ViewOnlineComponent_div_18_div_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelementStart(1, "video", 51);
    i0.ɵɵelement(2, "source", 52);
    i0.ɵɵelement(3, "source", 53);
    i0.ɵɵtext(4, " Your browser does not support the video tag. ");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r20 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("src", ctx_r20.currentUrl, i0.ɵɵsanitizeUrl);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("src", ctx_r20.currentUrl, i0.ɵɵsanitizeUrl);
} }
function ViewOnlineComponent_div_18_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 36);
    i0.ɵɵelementStart(1, "div", 37);
    i0.ɵɵtemplate(2, ViewOnlineComponent_div_18_iframe_2_Template, 1, 2, "iframe", 38);
    i0.ɵɵtemplate(3, ViewOnlineComponent_div_18_ng2_pdfjs_viewer_3_Template, 1, 3, "ng2-pdfjs-viewer", 39);
    i0.ɵɵtemplate(4, ViewOnlineComponent_div_18_div_4_Template, 2, 1, "div", 40);
    i0.ɵɵtemplate(5, ViewOnlineComponent_div_18_div_5_Template, 4, 2, "div", 41);
    i0.ɵɵtemplate(6, ViewOnlineComponent_div_18_div_6_Template, 5, 2, "div", 42);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r8 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitch", ctx_r8.showType);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngSwitchCase", "pdf");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "image");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "audio");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "video");
} }
function ViewOnlineComponent_div_19_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 54);
    i0.ɵɵelementStart(1, "div", 55);
    i0.ɵɵelement(2, "div");
    i0.ɵɵelement(3, "div");
    i0.ɵɵelement(4, "div");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} }
class ViewOnlineComponent {
    constructor(router, sanitizer, datePipe, authService, fileService, activatedRoute) {
        this.router = router;
        this.sanitizer = sanitizer;
        this.datePipe = datePipe;
        this.authService = authService;
        this.fileService = fileService;
        this.activatedRoute = activatedRoute;
        this.isClose = new core_1.EventEmitter();
        this.util = app_util_1.default;
        this.constant = app_constants_1.default;
        this.urlViewFile = new file_model_1.URLViewFile();
        this.isOldEncryptedFile = true;
    }
    ngOnInit() {
        this.authUser = this.authService.getAuthUser;
        this.projectId = this.activatedRoute.snapshot.paramMap.get('id');
        this.folderId = this.file.parentFolderId ? this.file.parentFolderId : '0';
        if (this.file.isEncrypt !== 1) {
            this.loading = true;
        }
        const paramsURL = {
            fileId: this.file.id,
            data: window.btoa(JSON.stringify({
                email: this.emailView,
            }).toString()),
            t: new Date().getTime(),
        };
        this.fileService
            .getFileURLView(this.util.toSnakeCaseKey(paramsURL))
            .subscribe((res) => {
            if (res.status === 200) {
                this.urlViewFile = res.data;
                const fileUrl = this.urlViewFile.urlFile;
                if (this.file.isEncrypt === 1) {
                    // file is protected -> open in a new tab
                    let iframeSource = this.constant.VIEWER_URL.HOGO;
                    iframeSource += '?id=' + res.data.contentId;
                    iframeSource += '&ak=' + res.data.keyId;
                    if (this.printable === 1) {
                        iframeSource += '&pr=' + 1;
                    }
                    if (this.watermarkSetting && this.watermarkSetting.setting) {
                        if (this.watermarkSetting.setting.wmColor &&
                            this.watermarkSetting.showWm === 1) {
                            iframeSource += '&wc=' + this.watermarkSetting.setting.wmColor;
                        }
                        if (this.watermarkSetting.setting.wmFontSize &&
                            this.watermarkSetting.showWm === 1) {
                            iframeSource +=
                                '&ws=' + this.watermarkSetting.setting.wmFontSize;
                        }
                        if (this.watermarkSetting.setting.wmPosition &&
                            this.watermarkSetting.showWm === 1) {
                            iframeSource +=
                                '&wp=' + this.watermarkSetting.setting.wmPosition.code;
                        }
                        if (this.watermarkSetting.setting.wmText &&
                            this.watermarkSetting.showWm === 1) {
                            iframeSource += '&wt=' + this.watermarkSetting.setting.wmText;
                        }
                    }
                    // Logic to open encrypted file in a new browser tab. (Disabled: load in iframe instead)
                    // window.open(iframeSource, '_blank');
                    // this.doClose();
                    // Load the encrypted file inside the page's iframe
                    this.currentUrl = this.sanitizer.bypassSecurityTrustResourceUrl(iframeSource);
                }
                else {
                    // file normal -> view online in page
                    this.fileExt = this.util.getExtension(fileUrl).toLowerCase();
                    if (this.constant.VIEWER_SUPPORT_TYPE.SUPPORT_TYPES_DOC.indexOf(this.fileExt) !== -1) {
                        this.showType = 'ms'; // file office
                        const linkFile = this.constant.VIEWER_URL.ONE_DRIVE +
                            encodeURIComponent(fileUrl);
                        if (this.fileExt === 'pdf') {
                            this.currentUrl = fileUrl;
                            this.showType = 'pdf';
                        }
                        else {
                            this.currentUrl =
                                this.sanitizer.bypassSecurityTrustResourceUrl(linkFile);
                        }
                    }
                    else {
                        if (this.constant.VIEWER_SUPPORT_TYPE.SUPPORT_TYPES_IMG.indexOf(this.fileExt) !== -1) {
                            this.showType = 'image';
                        }
                        else if (this.constant.VIEWER_SUPPORT_TYPE.SUPPORT_TYPES_PLAN_TEXT.indexOf(this.fileExt) !== -1) {
                            this.showType = 'txt';
                        }
                        else if (this.constant.VIEWER_SUPPORT_TYPE.SUPPORT_AUDIO.indexOf(this.fileExt) !== -1) {
                            this.showType = 'audio';
                        }
                        else if (this.constant.VIEWER_SUPPORT_TYPE.SUPPORT_VIDEO.indexOf(this.fileExt) !== -1) {
                            this.showType = 'video';
                        }
                        else {
                            this.showType = 'not-support';
                        }
                        this.currentUrl =
                            this.sanitizer.bypassSecurityTrustResourceUrl(fileUrl);
                    }
                }
            }
            else {
                if (res.status === 403) {
                    window.location.reload();
                }
                if (res.status === 806 || // File is too large to preview, please download
                    res.status === 2302) {
                    // Do not allow view online for this file
                    this.doClose();
                }
            }
            this.loading = false;
        });
    }
    onIframeLoad(event) {
        console.log('Iframe loaded, focusing iframe element');
        if (event && event.target) {
            event.target.focus();
        }
    }
    /*
    initViewerEncryptedFile(data) {
      let iframeSource = this.constant.VIEWER_URL.HOGO;
      iframeSource += '?id=' + data.contentId;
      iframeSource += '&ak=' + data.keyId;
      if (this.printable === 1) {
        iframeSource += '&pr=' + 1;
      }
  
      if (this.watermarkSetting && this.watermarkSetting.setting) {
        if (
          this.watermarkSetting.setting.wmColor &&
          this.watermarkSetting.showWm === 1
        ) {
          iframeSource += '&wc=' + this.watermarkSetting.setting.wmColor;
        }
        if (
          this.watermarkSetting.setting.wmFontSize &&
          this.watermarkSetting.showWm === 1
        ) {
          iframeSource += '&ws=' + this.watermarkSetting.setting.wmFontSize;
        }
        if (
          this.watermarkSetting.setting.wmPosition &&
          this.watermarkSetting.showWm === 1
        ) {
          iframeSource += '&wp=' + this.watermarkSetting.setting.wmPosition.code;
        }
        if (
          this.watermarkSetting.setting.wmText &&
          this.watermarkSetting.showWm === 1
        ) {
          iframeSource += '&wt=' + this.watermarkSetting.setting.wmText;
        }
      }
      this.currentUrl =
        this.sanitizer.bypassSecurityTrustResourceUrl(iframeSource);
    }
    */
    doClose() {
        this.isClose.emit(false);
    }
}
exports.ViewOnlineComponent = ViewOnlineComponent;
ViewOnlineComponent.ɵfac = function ViewOnlineComponent_Factory(t) { return new (t || ViewOnlineComponent)(i0.ɵɵdirectiveInject(i1.Router), i0.ɵɵdirectiveInject(i2.DomSanitizer), i0.ɵɵdirectiveInject(i3.DatePipe), i0.ɵɵdirectiveInject(i4.AuthService), i0.ɵɵdirectiveInject(i5.FileService), i0.ɵɵdirectiveInject(i1.ActivatedRoute)); };
ViewOnlineComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ViewOnlineComponent, selectors: [["app-view-online"]], inputs: { emailView: "emailView", isViewOnline: "isViewOnline", file: "file", watermarkSetting: "watermarkSetting", printable: "printable", isLinkView: "isLinkView", linkId: "linkId" }, outputs: { isClose: "isClose" }, decls: 20, vars: 11, consts: [[2, "position", "fixed", "top", "0", "left", "0", "width", "100%"], [1, "toolbar-hover"], [1, "toolbar-content"], [1, "p-d-flex", "p-align-center"], [1, "p-ml-1", "align-self-center"], [1, "p-d-inline-flex", "p-align-center", "p-pl-1", 3, "ngSwitch"], [3, "ngSwitch", 4, "ngSwitchCase"], ["class", "fas fs-24 fa-file-video", 4, "ngSwitchCase"], ["class", "fas fs-24 fa-file-audio", 4, "ngSwitchCase"], ["class", "fas fs-24 fa-file-image", 4, "ngSwitchCase"], ["class", "far fs-24 fa-file-alt", 4, "ngSwitchCase"], ["class", "far fs-24 fa-file-archive", 4, "ngSwitchCase"], ["class", "far fs-24 fa-file", 4, "ngSwitchDefault"], ["class", "icon-protect", 4, "ngIf"], [2, "margin-left", "10px"], ["pRipple", "", "type", "button", "icon", "fas fa-times", "styleClass", "p-button-warning p-mr-2", 1, "btn-close", 3, "click"], ["class", "p-text-center", "style", "\n    display: flex;\n    width: 90vw;\n    align-items: center;\n    justify-content: center;\n    margin: auto;\n  ", 4, "ngIf"], ["class", "p-col-12 p-text-center", 4, "ngIf"], [3, "ngSwitch"], ["class", "far fs-24 fa-file-pdf text-danger", 4, "ngSwitchCase"], ["class", "far fs-24 fa-file-word text-primary", 4, "ngSwitchCase"], ["class", "far fs-24 fa-file-excel text-success", 4, "ngSwitchCase"], ["class", "far fs-24 fa-file-powerpoint text-warning", 4, "ngSwitchCase"], ["class", "far fs-24 fa-file", 4, "ngSwitchCase"], [1, "far", "fs-24", "fa-file-pdf", "text-danger"], [1, "far", "fs-24", "fa-file-word", "text-primary"], [1, "far", "fs-24", "fa-file-excel", "text-success"], [1, "far", "fs-24", "fa-file-powerpoint", "text-warning"], [1, "far", "fs-24", "fa-file"], [1, "fas", "fs-24", "fa-file-video"], [1, "fas", "fs-24", "fa-file-audio"], [1, "fas", "fs-24", "fa-file-image"], [1, "far", "fs-24", "fa-file-alt"], [1, "far", "fs-24", "fa-file-archive"], [1, "icon-protect"], [1, "fas", "fa-lock", 3, "title"], [1, "p-text-center", 2, "display", "flex", "width", "90vw", "align-items", "center", "justify-content", "center", "margin", "auto"], [1, "p-width-100", 3, "ngSwitch"], ["class", "p-width-100 p-height-80vh p-text-center", 3, "src", "frameBorder", "load", 4, "ngSwitchDefault"], ["class", "p-width-100 p-height-80vh p-text-center", 3, "pdfSrc", "locale", "download", 4, "ngSwitchCase"], ["class", "p-width-100 p-height-80vh p-text-center scroll-style", 4, "ngSwitchCase"], ["class", "p-width-100 p-height-80vh p-text-center p-pt-20vh", 4, "ngSwitchCase"], [4, "ngSwitchCase"], [1, "p-width-100", "p-height-80vh", "p-text-center", 3, "src", "frameBorder", "load"], [1, "p-width-100", "p-height-80vh", "p-text-center", 3, "pdfSrc", "locale", "download"], [1, "p-width-100", "p-height-80vh", "p-text-center", "scroll-style"], ["alt", "img", 1, "img-style", 3, "src"], [1, "p-width-100", "p-height-80vh", "p-text-center", "p-pt-20vh"], ["controls", ""], ["type", "audio/ogg", 3, "src"], ["type", "audio/mpeg", 3, "src"], ["controls", "", 1, "p-width-100", "p-height-80vh"], ["type", "video/mp4", 3, "src"], ["type", "video/ogg", 3, "src"], [1, "p-col-12", "p-text-center"], [1, "lds-loading"]], template: function ViewOnlineComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵtext(2, "\u00A0");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(3, "div", 2);
        i0.ɵɵelementStart(4, "div", 3);
        i0.ɵɵelementStart(5, "div", 4);
        i0.ɵɵelementStart(6, "div", 5);
        i0.ɵɵtemplate(7, ViewOnlineComponent_span_7_Template, 7, 6, "span", 6);
        i0.ɵɵtemplate(8, ViewOnlineComponent_i_8_Template, 1, 0, "i", 7);
        i0.ɵɵtemplate(9, ViewOnlineComponent_i_9_Template, 1, 0, "i", 8);
        i0.ɵɵtemplate(10, ViewOnlineComponent_i_10_Template, 1, 0, "i", 9);
        i0.ɵɵtemplate(11, ViewOnlineComponent_i_11_Template, 1, 0, "i", 10);
        i0.ɵɵtemplate(12, ViewOnlineComponent_i_12_Template, 1, 0, "i", 11);
        i0.ɵɵtemplate(13, ViewOnlineComponent_i_13_Template, 1, 0, "i", 12);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(14, ViewOnlineComponent_div_14_Template, 3, 3, "div", 13);
        i0.ɵɵelementStart(15, "div", 14);
        i0.ɵɵtext(16);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(17, "p-button", 15);
        i0.ɵɵlistener("click", function ViewOnlineComponent_Template_p_button_click_17_listener() { return ctx.doClose(); });
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(18, ViewOnlineComponent_div_18_Template, 7, 5, "div", 16);
        i0.ɵɵtemplate(19, ViewOnlineComponent_div_19_Template, 5, 0, "div", 17);
    } if (rf & 2) {
        i0.ɵɵadvance(6);
        i0.ɵɵproperty("ngSwitch", ctx.util.getGroupFromMimeType(ctx.file));
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngSwitchCase", "secure");
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngSwitchCase", "video");
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngSwitchCase", "audio");
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngSwitchCase", "image");
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngSwitchCase", "text");
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngSwitchCase", "compress");
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.file.isEncrypt === 1);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(ctx.file.name);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", !ctx.loading && ctx.isOldEncryptedFile);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.loading);
    } }, directives: [i3.NgSwitch, i3.NgSwitchCase, i3.NgSwitchDefault, i3.NgIf, i6.Button, i7.Ripple, i8.PdfJsViewerComponent], pipes: [i9.TranslatePipe], styles: [".toolbar-hover[_ngcontent-%COMP%] {\n  position: fixed;\n  width: 100%;\n  top: 0;\n  height: 20px;\n  z-index: 99;\n}\n\n.toolbar-content[_ngcontent-%COMP%] {\n  display: none;\n  visibility: visible;\n  top: 0;\n  opacity: 1;\n  transition: all 0.2s ease;\n  background-color: rgba(0, 0, 0, 0.6);\n  padding: 20px;\n  color: #fff;\n}\n\n.toolbar-content[_ngcontent-%COMP%]:hover, .btn-close[_ngcontent-%COMP%]:hover, .toolbar-hover[_ngcontent-%COMP%]:hover    + .toolbar-content[_ngcontent-%COMP%] {\n  display: block;\n  transition: all 0.2s ease;\n}\n\n.btn-close[_ngcontent-%COMP%] {\n  position: fixed;\n  top: 1px;\n  right: -4px;\n  z-index: 1000;\n}\n\n.align-self-center[_ngcontent-%COMP%] {\n  align-self: center;\n}\n\n.p-height-80vh[_ngcontent-%COMP%] {\n  height: 100vh;\n}\n\n.icon-protect[_ngcontent-%COMP%] {\n  position: absolute;\n  left: 35px;\n  top: 30px;\n  font-size: 10px;\n}\n\n[_nghost-%COMP%]  .p-height-80vh > iframe {\n  height: 100vh !important;\n}\n\n[_nghost-%COMP%]  .img-style {\n  max-width: 90vw !important;\n  height: auto;\n}\n\n[_nghost-%COMP%]  .p-button.p-button-icon-only {\n  width: 36px;\n}\n\n[_nghost-%COMP%]  .p-button.p-button-warning {\n  background: none;\n  border-radius: 18px;\n}\n\n[_nghost-%COMP%]  .p-button.p-button-warning:enabled:hover {\n  background: rgba(0, 0, 0, 0.5);\n  color: #fff;\n}\n\n.scroll-style[_ngcontent-%COMP%] {\n  overflow-y: auto;\n}\n\n.p-pt-20vh[_ngcontent-%COMP%] {\n  padding-top: 20vh;\n}\n/*# sourceMappingURL=data:application/json;base64,  */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ViewOnlineComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-view-online',
                templateUrl: './view-online.component.html',
                styleUrls: ['./view-online.component.scss'],
            }]
    }], function () { return [{ type: i1.Router }, { type: i2.DomSanitizer }, { type: i3.DatePipe }, { type: i4.AuthService }, { type: i5.FileService }, { type: i1.ActivatedRoute }]; }, { emailView: [{
            type: core_1.Input
        }], isViewOnline: [{
            type: core_1.Input
        }], file: [{
            type: core_1.Input
        }], watermarkSetting: [{
            type: core_1.Input
        }], printable: [{
            type: core_1.Input
        }], isLinkView: [{
            type: core_1.Input
        }], linkId: [{
            type: core_1.Input
        }], isClose: [{
            type: core_1.Output
        }] }); })();


/***/ }),

/***/ "./src/app/non-authentication-pages/change-email/change-email.component.ts":
/*!*********************************************************************************!*\
  !*** ./src/app/non-authentication-pages/change-email/change-email.component.ts ***!
  \*********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ChangeEmailComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/__ivy_ngcc__/fesm2015/platform-browser.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! ../../services/account.service */ "./src/app/services/account.service.ts"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
function ChangeEmailComponent_div_14_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelement(1, "small", 17);
    i0.ɵɵelementEnd();
} }
function ChangeEmailComponent_div_14_div_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelement(1, "small", 18);
    i0.ɵɵelementEnd();
} }
function ChangeEmailComponent_div_14_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 15);
    i0.ɵɵtemplate(1, ChangeEmailComponent_div_14_div_1_Template, 2, 0, "div", 16);
    i0.ɵɵtemplate(2, ChangeEmailComponent_div_14_div_2_Template, 2, 0, "div", 16);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵnextContext();
    const _r1 = i0.ɵɵreference(11);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", _r1.errors.required);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", _r1.errors.pattern);
} }
class ChangeEmailComponent {
    constructor(titleService, accountService, router, activatedRoute, messageService, translateService) {
        this.titleService = titleService;
        this.accountService = accountService;
        this.router = router;
        this.activatedRoute = activatedRoute;
        this.messageService = messageService;
        this.translateService = translateService;
        this.appConstant = app_constants_1.default;
        this.changeEmailRequest = {
            email: ''
        };
    }
    ngOnInit() {
        this.translateService.get(['page_title.change_email']).subscribe(translation => {
            this.titleService.setTitle(translation['page_title.change_email']);
        });
        // Get id from route
        this.activatedRoute.paramMap.subscribe(param => {
            // @ts-ignore
            const { params: { reset_code } } = param;
            if (reset_code) {
                this.resetCode = reset_code;
            }
        });
    }
    onSubmit() {
        this.accountService.changeEmail(this.resetCode, this.changeEmailRequest.email).subscribe(res => {
            if (res.status === 200) {
                this.messageService.add({
                    severity: 'success',
                    // @ts-ignore
                    detail: app_util_1.default.translate(this.translateService, 'label.change_email_success'),
                });
                this.router.navigate(['/login']);
            }
        });
    }
}
exports.ChangeEmailComponent = ChangeEmailComponent;
ChangeEmailComponent.ɵfac = function ChangeEmailComponent_Factory(t) { return new (t || ChangeEmailComponent)(i0.ɵɵdirectiveInject(i1.Title), i0.ɵɵdirectiveInject(i2.AccountService), i0.ɵɵdirectiveInject(i3.Router), i0.ɵɵdirectiveInject(i3.ActivatedRoute), i0.ɵɵdirectiveInject(i4.MessageService), i0.ɵɵdirectiveInject(i5.TranslateService)); };
ChangeEmailComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ChangeEmailComponent, selectors: [["app-change-email"]], decls: 20, vars: 15, consts: [["autocomplete", "off", "role", "form", "autofocus", "", 3, "ngSubmit"], ["form", "ngForm"], [1, "p-grid", "p-mt-6", "p-mx-0", "p-ai-center"], [1, "p-col-12", "p-sm-10", "p-md-8", "p-lg-6", "p-sm-offset-1", "p-md-offset-2", "p-lg-offset-3"], [1, "p-text-center", "p-text-capitalize"], [1, "p-fluid"], [1, "p-field"], [1, "p-float-label"], ["id", "sing-in-email", "type", "text", "pInputText", "", "name", "signInEmail", "required", "", "autofocus", "", 3, "ngModel", "pattern", "ngModelChange"], ["signInEmail", "ngModel"], ["for", "sing-in-email", 3, "translate"], ["class", "p-error p-text-left", 4, "ngIf"], ["pButton", "", "type", "submit", 3, "label"], [1, "p-field", "p-text-center"], ["routerLink", "/login", 2, "font-size", "small", "text-decoration", "none", 3, "translate"], [1, "p-error", "p-text-left"], [4, "ngIf"], ["translate", "validation.input_email"], ["translate", "validation.email_format"]], template: function ChangeEmailComponent_Template(rf, ctx) { if (rf & 1) {
        const _r5 = i0.ɵɵgetCurrentView();
        i0.ɵɵelementStart(0, "form", 0, 1);
        i0.ɵɵlistener("ngSubmit", function ChangeEmailComponent_Template_form_ngSubmit_0_listener() { i0.ɵɵrestoreView(_r5); const _r0 = i0.ɵɵreference(1); return _r0.form.valid && ctx.onSubmit(); });
        i0.ɵɵelementStart(2, "div", 2);
        i0.ɵɵelementStart(3, "div", 3);
        i0.ɵɵelementStart(4, "h3", 4);
        i0.ɵɵtext(5);
        i0.ɵɵpipe(6, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(7, "div", 5);
        i0.ɵɵelementStart(8, "div", 6);
        i0.ɵɵelementStart(9, "span", 7);
        i0.ɵɵelementStart(10, "input", 8, 9);
        i0.ɵɵlistener("ngModelChange", function ChangeEmailComponent_Template_input_ngModelChange_10_listener($event) { return ctx.changeEmailRequest.email = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelement(12, "label", 10);
        i0.ɵɵpipe(13, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(14, ChangeEmailComponent_div_14_Template, 3, 2, "div", 11);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(15, "div", 6);
        i0.ɵɵelement(16, "button", 12);
        i0.ɵɵpipe(17, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(18, "div", 13);
        i0.ɵɵelement(19, "a", 14);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        const _r0 = i0.ɵɵreference(1);
        const _r1 = i0.ɵɵreference(11);
        i0.ɵɵadvance(5);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 9, "label.update_your_email"));
        i0.ɵɵadvance(5);
        i0.ɵɵclassProp("ng-dirty", _r1.invalid && (_r1.dirty || _r1.touched) || _r0.submitted && _r1.invalid);
        i0.ɵɵproperty("ngModel", ctx.changeEmailRequest.email)("pattern", ctx.appConstant.PATTERNS.EMAIL);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("translate", i0.ɵɵpipeBind1(13, 11, "label.enter_new_email"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", _r1.invalid && (_r1.dirty || _r1.touched) || _r0.submitted && _r1.invalid);
        i0.ɵɵadvance(2);
        i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(17, 13, "button.submit"));
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("translate", "label.back_login");
    } }, directives: [i6.ɵangular_packages_forms_forms_y, i6.NgControlStatusGroup, i6.NgForm, i6.DefaultValueAccessor, i7.InputText, i6.RequiredValidator, i6.NgControlStatus, i6.NgModel, i6.PatternValidator, i5.TranslateDirective, i8.NgIf, i9.ButtonDirective, i3.RouterLinkWithHref], pipes: [i5.TranslatePipe], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL25vbi1hdXRoZW50aWNhdGlvbi1wYWdlcy9jaGFuZ2UtZW1haWwvY2hhbmdlLWVtYWlsLmNvbXBvbmVudC5zY3NzIn0= */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ChangeEmailComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-change-email',
                templateUrl: './change-email.component.html',
                styleUrls: ['./change-email.component.scss']
            }]
    }], function () { return [{ type: i1.Title }, { type: i2.AccountService }, { type: i3.Router }, { type: i3.ActivatedRoute }, { type: i4.MessageService }, { type: i5.TranslateService }]; }, null); })();


/***/ }),

/***/ "./src/app/non-authentication-pages/download/download-content/download-content.component.ts":
/*!**************************************************************************************************!*\
  !*** ./src/app/non-authentication-pages/download/download-content/download-content.component.ts ***!
  \**************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.DownloadContentComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const environment_1 = __webpack_require__(/*! ../../../../environments/environment */ "./src/environments/environment.ts");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/download.service */ "./src/app/services/download.service.ts"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/link.service */ "./src/app/services/link.service.ts"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! primeng/table */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-table.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! primeng/dialog */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dialog.js"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i10 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js"));
const i11 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
const i12 = tslib_1.__importStar(__webpack_require__(/*! primeng/tooltip */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-tooltip.js"));
const i13 = tslib_1.__importStar(__webpack_require__(/*! ../../../authentication-pages/view-online/view-online-form/view-online-form.component */ "./src/app/authentication-pages/view-online/view-online-form/view-online-form.component.ts"));
function DownloadContentComponent_button_2_Template(rf, ctx) { if (rf & 1) {
    const _r14 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 28);
    i0.ɵɵlistener("click", function DownloadContentComponent_button_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r14); const ctx_r13 = i0.ɵɵnextContext(); return ctx_r13.goBack(); });
    i0.ɵɵpipe(1, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(1, 2, "button.back"));
    i0.ɵɵproperty("disabled", ctx_r0.isLoading);
} }
function DownloadContentComponent_button_3_Template(rf, ctx) { if (rf & 1) {
    const _r16 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 29);
    i0.ɵɵlistener("click", function DownloadContentComponent_button_3_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r16); const ctx_r15 = i0.ɵɵnextContext(); return ctx_r15.downloadMultipleFile(); });
    i0.ɵɵpipe(1, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(1, 1, "button.download"));
} }
function DownloadContentComponent_ng_template_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr");
    i0.ɵɵelement(1, "th", 30);
    i0.ɵɵelement(2, "th");
    i0.ɵɵelement(3, "th", 31);
    i0.ɵɵelementStart(4, "th", 32);
    i0.ɵɵtext(5);
    i0.ɵɵpipe(6, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(7, "th", 33);
    i0.ɵɵtext(8);
    i0.ɵɵpipe(9, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelement(10, "th", 34);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 2, "label.size"));
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(9, 4, "label.date_modified"));
} }
function DownloadContentComponent_ng_template_6_tr_0_Template(rf, ctx) { if (rf & 1) {
    const _r23 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "tr", 37);
    i0.ɵɵlistener("dblclick", function DownloadContentComponent_ng_template_6_tr_0_Template_tr_dblclick_0_listener() { i0.ɵɵrestoreView(_r23); const file_r17 = i0.ɵɵnextContext().$implicit; const ctx_r21 = i0.ɵɵnextContext(); return ctx_r21.gotoFolder(file_r17); });
    i0.ɵɵelementStart(1, "td");
    i0.ɵɵelementStart(2, "div", 38);
    i0.ɵɵelement(3, "i", 39);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "td", 40);
    i0.ɵɵelementStart(5, "span", 41);
    i0.ɵɵlistener("click", function DownloadContentComponent_ng_template_6_tr_0_Template_span_click_5_listener() { i0.ɵɵrestoreView(_r23); const file_r17 = i0.ɵɵnextContext().$implicit; const ctx_r24 = i0.ɵɵnextContext(); return ctx_r24.gotoFolder(file_r17); });
    i0.ɵɵtext(6);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelement(7, "td");
    i0.ɵɵelementStart(8, "td");
    i0.ɵɵtext(9);
    i0.ɵɵpipe(10, "translate");
    i0.ɵɵpipe(11, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(12, "td", 42);
    i0.ɵɵtext(13);
    i0.ɵɵelementEnd();
    i0.ɵɵelement(14, "td");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const file_r17 = i0.ɵɵnextContext().$implicit;
    const ctx_r19 = i0.ɵɵnextContext();
    i0.ɵɵadvance(5);
    i0.ɵɵproperty("title", file_r17.name);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(file_r17.name);
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate2(" ", file_r17.fileSize, " ", file_r17.fileSize > 1 ? i0.ɵɵpipeBind1(10, 5, "label.items") : i0.ɵɵpipeBind1(11, 7, "label.item"), " ");
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate(ctx_r19.util.formatDateBasedOnDiff(ctx_r19.datePipe, file_r17.lastModifiedDate));
} }
function DownloadContentComponent_ng_template_6_tr_1_span_3_i_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 65);
} }
function DownloadContentComponent_ng_template_6_tr_1_span_3_i_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 66);
} }
function DownloadContentComponent_ng_template_6_tr_1_span_3_i_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 67);
} }
function DownloadContentComponent_ng_template_6_tr_1_span_3_i_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 68);
} }
function DownloadContentComponent_ng_template_6_tr_1_span_3_i_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 69);
} }
function DownloadContentComponent_ng_template_6_tr_1_span_3_i_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 69);
} }
function DownloadContentComponent_ng_template_6_tr_1_span_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span", 59);
    i0.ɵɵtemplate(1, DownloadContentComponent_ng_template_6_tr_1_span_3_i_1_Template, 1, 0, "i", 60);
    i0.ɵɵtemplate(2, DownloadContentComponent_ng_template_6_tr_1_span_3_i_2_Template, 1, 0, "i", 61);
    i0.ɵɵtemplate(3, DownloadContentComponent_ng_template_6_tr_1_span_3_i_3_Template, 1, 0, "i", 62);
    i0.ɵɵtemplate(4, DownloadContentComponent_ng_template_6_tr_1_span_3_i_4_Template, 1, 0, "i", 63);
    i0.ɵɵtemplate(5, DownloadContentComponent_ng_template_6_tr_1_span_3_i_5_Template, 1, 0, "i", 64);
    i0.ɵɵtemplate(6, DownloadContentComponent_ng_template_6_tr_1_span_3_i_6_Template, 1, 0, "i", 51);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const file_r17 = i0.ɵɵnextContext(2).$implicit;
    i0.ɵɵproperty("ngSwitch", file_r17.fileType);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 1);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 3);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 4);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", 5);
} }
function DownloadContentComponent_ng_template_6_tr_1_i_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 70);
} }
function DownloadContentComponent_ng_template_6_tr_1_i_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 71);
} }
function DownloadContentComponent_ng_template_6_tr_1_i_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 72);
} }
function DownloadContentComponent_ng_template_6_tr_1_i_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 73);
} }
function DownloadContentComponent_ng_template_6_tr_1_i_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 74);
} }
function DownloadContentComponent_ng_template_6_tr_1_i_9_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 69);
} }
function DownloadContentComponent_ng_template_6_tr_1_i_14_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 75);
    i0.ɵɵpipe(1, "translate");
} if (rf & 2) {
    i0.ɵɵpropertyInterpolate("pTooltip", i0.ɵɵpipeBind1(1, 1, "label.is_encrypted"));
} }
function DownloadContentComponent_ng_template_6_tr_1_button_20_Template(rf, ctx) { if (rf & 1) {
    const _r46 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 76);
    i0.ɵɵlistener("click", function DownloadContentComponent_ng_template_6_tr_1_button_20_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r46); const file_r17 = i0.ɵɵnextContext(2).$implicit; const ctx_r44 = i0.ɵɵnextContext(); return ctx_r44.doViewOnline(file_r17); });
    i0.ɵɵpipe(1, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵpropertyInterpolate("pTooltip", i0.ɵɵpipeBind1(1, 1, "button.view"));
} }
function DownloadContentComponent_ng_template_6_tr_1_button_21_Template(rf, ctx) { if (rf & 1) {
    const _r49 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 77);
    i0.ɵɵlistener("click", function DownloadContentComponent_ng_template_6_tr_1_button_21_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r49); const file_r17 = i0.ɵɵnextContext(2).$implicit; const ctx_r47 = i0.ɵɵnextContext(); return ctx_r47.downloadSingleFile(file_r17); });
    i0.ɵɵpipe(1, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵpropertyInterpolate("pTooltip", i0.ɵɵpipeBind1(1, 1, "button.download"));
} }
const _c0 = function (a0) { return { "bg-selected": a0 }; };
function DownloadContentComponent_ng_template_6_tr_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr", 43);
    i0.ɵɵelementStart(1, "td");
    i0.ɵɵelementStart(2, "div", 44);
    i0.ɵɵtemplate(3, DownloadContentComponent_ng_template_6_tr_1_span_3_Template, 7, 6, "span", 45);
    i0.ɵɵtemplate(4, DownloadContentComponent_ng_template_6_tr_1_i_4_Template, 1, 0, "i", 46);
    i0.ɵɵtemplate(5, DownloadContentComponent_ng_template_6_tr_1_i_5_Template, 1, 0, "i", 47);
    i0.ɵɵtemplate(6, DownloadContentComponent_ng_template_6_tr_1_i_6_Template, 1, 0, "i", 48);
    i0.ɵɵtemplate(7, DownloadContentComponent_ng_template_6_tr_1_i_7_Template, 1, 0, "i", 49);
    i0.ɵɵtemplate(8, DownloadContentComponent_ng_template_6_tr_1_i_8_Template, 1, 0, "i", 50);
    i0.ɵɵtemplate(9, DownloadContentComponent_ng_template_6_tr_1_i_9_Template, 1, 0, "i", 51);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(10, "td", 52);
    i0.ɵɵelementStart(11, "span", 53);
    i0.ɵɵtext(12);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(13, "td", 54);
    i0.ɵɵtemplate(14, DownloadContentComponent_ng_template_6_tr_1_i_14_Template, 2, 3, "i", 55);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(15, "td");
    i0.ɵɵtext(16);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(17, "td", 42);
    i0.ɵɵtext(18);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(19, "td", 56);
    i0.ɵɵtemplate(20, DownloadContentComponent_ng_template_6_tr_1_button_20_Template, 2, 3, "button", 57);
    i0.ɵɵtemplate(21, DownloadContentComponent_ng_template_6_tr_1_button_21_Template, 2, 3, "button", 58);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r50 = i0.ɵɵnextContext();
    const file_r17 = ctx_r50.$implicit;
    const rowIndex_r18 = ctx_r50.rowIndex;
    const ctx_r20 = i0.ɵɵnextContext();
    i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(17, _c0, file_r17.selected))("pSelectableRow", file_r17)("pSelectableRowIndex", rowIndex_r18);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngSwitch", ctx_r20.util.getGroupFromMimeType(file_r17));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "secure");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "video");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "audio");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "image");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "text");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngSwitchCase", "compress");
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("title", file_r17.name);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(file_r17.name);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", file_r17.isEncrypt === 1 && ctx_r20.link.isViewPublic === 0);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", ctx_r20.util.convertFileSize(file_r17.fileSize), " ");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(ctx_r20.util.formatDateBasedOnDiff(ctx_r20.datePipe, file_r17.lastModifiedDate));
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r20.supportFileViewOnline(file_r17));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r20.link.allowedDownloadFile);
} }
function DownloadContentComponent_ng_template_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵtemplate(0, DownloadContentComponent_ng_template_6_tr_0_Template, 15, 9, "tr", 35);
    i0.ɵɵtemplate(1, DownloadContentComponent_ng_template_6_tr_1_Template, 22, 19, "tr", 36);
} if (rf & 2) {
    const file_r17 = ctx.$implicit;
    i0.ɵɵproperty("ngIf", file_r17.folder);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", !file_r17.folder);
} }
function DownloadContentComponent_div_20_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelement(1, "small", 80);
    i0.ɵɵelementEnd();
} }
function DownloadContentComponent_div_20_div_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelement(1, "small", 81);
    i0.ɵɵelementEnd();
} }
function DownloadContentComponent_div_20_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 78);
    i0.ɵɵtemplate(1, DownloadContentComponent_div_20_div_1_Template, 2, 0, "div", 79);
    i0.ɵɵtemplate(2, DownloadContentComponent_div_20_div_2_Template, 2, 0, "div", 79);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵnextContext();
    const _r6 = i0.ɵɵreference(16);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", _r6.errors.required);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", _r6.errors.pattern);
} }
function DownloadContentComponent_div_42_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelement(1, "small", 82);
    i0.ɵɵelementEnd();
} }
function DownloadContentComponent_div_42_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 78);
    i0.ɵɵtemplate(1, DownloadContentComponent_div_42_div_1_Template, 2, 0, "div", 79);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵnextContext();
    const _r10 = i0.ɵɵreference(38);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", _r10.errors.required);
} }
function DownloadContentComponent_app_view_online_form_51_Template(rf, ctx) { if (rf & 1) {
    const _r55 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "app-view-online-form", 83);
    i0.ɵɵlistener("isClose", function DownloadContentComponent_app_view_online_form_51_Template_app_view_online_form_isClose_0_listener($event) { i0.ɵɵrestoreView(_r55); const ctx_r54 = i0.ɵɵnextContext(); return ctx_r54.isCheckViewOnline = $event; });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r12 = i0.ɵɵnextContext();
    i0.ɵɵproperty("emailView", ctx_r12.storedEmail)("file", ctx_r12.fileView)("projectId", ctx_r12.projectId)("isLinkView", true)("printable", ctx_r12.link.printable)("watermarkSetting", ctx_r12.link.watermarkSetting);
} }
const _c1 = function () { return { width: "30vw" }; };
const _c2 = function () { return { "960px": "75vw" }; };
class DownloadContentComponent {
    constructor(translateService, datePipe, router, activatedRoute, downloadService, linkService) {
        this.translateService = translateService;
        this.datePipe = datePipe;
        this.router = router;
        this.activatedRoute = activatedRoute;
        this.downloadService = downloadService;
        this.linkService = linkService;
        this.util = app_util_1.default;
        this.appConstant = app_constants_1.default;
        this.currentSelected = [];
        this.selectedFiles = [];
        this.isSelectedAll = false;
        this.files = [];
        this.filterFiles = [];
        this.showVerifiedEmailModal = false;
        this.showVerifiedPinModal = false;
        this.isCheckViewOnline = false;
        this.isLoading = true;
        this.lang = app_util_1.default.getBrowserLang() !== 'vi' && app_util_1.default.getBrowserLang() !== 'ja' ? 'en' : app_util_1.default.getBrowserLang();
    }
    ngOnInit() {
        this.activatedRoute.params.subscribe(params => {
            this.initial();
        });
    }
    initial() {
        this.projectId = this.downloadService.getProjectId();
        this.linkId = this.downloadService.getLinkId();
        this.link = this.downloadService.getLink();
        this.folderId = (this.activatedRoute.snapshot.paramMap.get('folder_id')) ?
            this.activatedRoute.snapshot.paramMap.get('folder_id') : '0';
        this.items = [
            {
                label: 'View Online',
                icon: 'fas fa-eye',
                command: (event) => {
                    // console.log('event', event);
                }
            },
            {
                label: 'Download',
                icon: 'fas fa-download',
                command: (event) => {
                    this.downloadSingleFile(this.selectedFile);
                }
            }
        ];
        this.getLinkItems();
        this.clearSelectedFile();
    }
    getLinkItems() {
        if (this.pendingRequest) {
            this.pendingRequest.unsubscribe();
        }
        this.isLoading = true;
        const params = {
            child_folder_id: this.folderId,
            project_id: this.projectId
        };
        this.pendingRequest = this.linkService.getLinkItems(this.linkId, this.util.toSnakeCaseKey(params)).subscribe(res => {
            if (res.status === 200) {
                this.files = res.data;
                this.filterFiles = this.files.filter(f => !f.folder);
            }
            this.isLoading = false;
        });
    }
    downloadMultipleFile() {
        if (this.selectedFiles.length === 0) {
            return;
        }
        for (let i = 0; i < this.selectedFiles.length; i++) {
            this.downloadSingleFile(this.selectedFiles[i]);
        }
    }
    downloadSingleFile(f) {
        if (!f) {
            return;
        }
        const data = {
            email: '',
            os: ''
        };
        const params = {
            projectId: this.projectId,
            downloadType: 1,
            printable: (this.link.printable) ? this.link.printable : 0,
            linkId: this.linkId,
            data: window.btoa(JSON.stringify(data).toString())
        };
        let formattedParams = app_util_1.default.toSnakeCaseKey(params);
        let queryParams = new URLSearchParams();
        for (let key in formattedParams) {
            queryParams.set(key, formattedParams[key]);
        }
        window.open(environment_1.environment.backend_url + "/api/download/files/" + f.id + "/share?" + queryParams.toString(), "_blank");
        // this.downloadService.downloadFileFromShareLink(f.id, params, f.contentType).then((response) => {
        //   // when you use stricter type checking
        //   const blob: any = new Blob([response], {type: f.contentType});
        //   fileSaver.saveAs(blob, f.name);
        // }, (error) => {
        //   // console.log('error', error);
        // });
    }
    // ---------------- checkbox custom ---------------
    toggleSelected(obj) {
        if (obj && obj.id) {
            const index = this.selectedFiles.findIndex(f => f.id === obj.id);
            if (index > -1) {
                this.selectedFiles.splice(index, 1);
                obj.selected = false;
            }
            else {
                this.selectedFiles.push(obj);
                obj.selected = true;
            }
            this.isSelectedAll = false;
            let numberCheckAll = 0;
            this.filterFiles.forEach(result => {
                this.selectedFiles.forEach(selected => {
                    if (result.id === selected.id) {
                        result.selected = true;
                        numberCheckAll++;
                        this.isSelectedAll = (numberCheckAll === this.filterFiles.length);
                    }
                });
            });
        }
    }
    clearSelectedFile() {
        this.files.forEach(f => {
            f.selected = false;
        });
        this.selectedFiles = [];
    }
    supportFileViewOnline(f) {
        return f.isEncrypt === 1 || (f.isEncrypt === 0 && this.supportNonProtectViewOnline(f));
    }
    supportNonProtectViewOnline(f) {
        const fileType = this.util.getGroupFromMimeType(f);
        return ((fileType === 'secure' && f.fileType !== 5)
            || fileType === 'image' || fileType === 'video'
            || fileType === 'audio' || fileType === 'office');
    }
    doViewOnline(file) {
        this.isCheckViewOnline = false;
        if (file.isEncrypt === 1) {
            if (this.link.isViewPublic === 0) {
                // show confirm modal for input email and pin to verify permission
                this.showVerifiedEmailModal = true;
                this.selectedFile = file;
            }
            else {
                // view protected file online
                this.viewFile(file);
            }
        }
        else {
            // view non-protected file online
            this.viewFile(file);
        }
    }
    getPinCode(form) {
        if (form.form.invalid) {
            return;
        }
        const params = {
            link_id: this.linkId,
            email: this.inputtedEmail.trim(),
            language: this.lang
        };
        this.linkService.getPinCode(this.selectedFile.id, this.util.toSnakeCaseKey(params)).subscribe(res => {
            if (res.status === 200) {
                this.storedEmail = this.inputtedEmail.trim();
                this.showVerifiedEmailModal = false;
                this.showVerifiedPinModal = true;
            }
        }, error => {
            // console.log('err', error);
        });
    }
    verifyPinCode(formPin) {
        if (formPin.form.invalid) {
            return;
        }
        const params = {
            project_id: this.projectId,
            email: window.btoa(this.storedEmail)
        };
        this.linkService.verifyPinCode(this.selectedFile.id, window.btoa(this.inputtedPin.trim()), this.util.toSnakeCaseKey(params)).subscribe(res => {
            if (res.status === 200) {
                this.showVerifiedPinModal = false;
                this.viewFile(this.selectedFile);
            }
        }, error => {
            // console.log('err', error);
        });
    }
    handleCtrlClick(event, file) {
        if (!event.ctrlKey) {
            this.clearSelectedFile();
        }
        this.toggleSelected(file);
    }
    viewFile(file) {
        this.fileView = file;
        this.isCheckViewOnline = true;
    }
    doRowSelect(event) {
        if (event.originalEvent.ctrlKey === true) {
            event.data.selected = true;
        }
        else if (event.originalEvent.shiftKey === true) {
            this.clearSelectedFile();
            if (event.data.length && event.data.length > 1) {
                event.data.forEach(d => {
                    d.selected = true;
                });
            }
            else {
                event.data.selected = true;
            }
        }
        else {
            this.clearSelectedFile();
            event.data.selected = true;
        }
        this.selectedFiles = [...new Set(this.selectedFiles.concat(event.data))];
    }
    doRowUnselect(event) {
        event.data.selected = false;
        this.files.forEach(result => {
            if (result.id === event.data.id) {
                result.selected = false;
            }
        });
    }
    goBack() {
        window.history.back();
    }
    gotoFolder(file) {
        this.router.navigate(['/view-link/' + this.link.printable + '/' + this.projectId + '/' +
                this.linkId + '/' + file.id]);
    }
}
exports.DownloadContentComponent = DownloadContentComponent;
DownloadContentComponent.ɵfac = function DownloadContentComponent_Factory(t) { return new (t || DownloadContentComponent)(i0.ɵɵdirectiveInject(i1.TranslateService), i0.ɵɵdirectiveInject(i2.DatePipe), i0.ɵɵdirectiveInject(i3.Router), i0.ɵɵdirectiveInject(i3.ActivatedRoute), i0.ɵɵdirectiveInject(i4.DownloadService), i0.ɵɵdirectiveInject(i5.LinkService)); };
DownloadContentComponent.ɵcmp = i0.ɵɵdefineComponent({ type: DownloadContentComponent, selectors: [["app-download-content"]], decls: 52, vars: 69, consts: [[1, "p-grid", "p-p-1"], [1, "p-col-9", "p-p-3"], ["icon", "fas fa-chevron-left", "class", "p-button-warning p-mr-2", "iconPos", "left", "pButton", "", 3, "disabled", "label", "click", 4, "ngIf"], ["icon", "fas fa-download", "iconPos", "left", "pButton", "", 3, "label", "click", 4, "ngIf"], ["selectionMode", "multiple", "loadingIcon", "fas fa-spinner fa-spin", "dataKey", "id", 3, "value", "selection", "metaKeySelection", "loading", "selectionChange", "onRowSelect", "onRowUnselect"], ["pTemplate", "header"], ["pTemplate", "body"], [1, "dark-panel", 3, "visible", "blockScroll", "draggable", "header", "modal", "closeOnEscape", "breakpoints", "visibleChange", "onHide"], ["cd", ""], ["autocomplete", "off", "autofocus", "", "role", "form"], ["form", "ngForm"], [1, "p-grid", "p-mt-3", "p-formgrid", "p-fluid"], [1, "p-col-12", "p-field"], [1, "p-float-label"], ["autofocus", "", "id", "email", "name", "verifiedEmail", "pInputText", "", "required", "", "type", "text", 3, "ngModel", "pattern", "maxlength", "ngModelChange"], ["verifiedEmail", "ngModel"], ["for", "email"], ["class", "p-error p-text-left", 4, "ngIf"], [1, "p-col-6", "p-field"], ["type", "button", "icon", "pi pi-times p-button-icon-left", "iconPos", "left", "pButton", "", 1, "p-button-warning", 3, "label", "click"], ["type", "submit", "icon", "pi pi-check p-button-icon-left", "iconPos", "left", "pButton", "", 1, "p-button-info", 3, "label", "click"], [1, "dark-panel", 3, "visible", "blockScroll", "draggable", "header", "modal", "breakpoints", "visibleChange", "onHide"], ["cdVerifyPin", ""], ["formPin", "ngForm"], ["autofocus", "", "id", "pinCode", "name", "verifiedPin", "pInputText", "", "required", "", "type", "text", 3, "ngModel", "maxLength", "ngModelChange"], ["verifiedPin", "ngModel"], ["for", "pinCode"], [3, "emailView", "file", "projectId", "isLinkView", "printable", "watermarkSetting", "linkId", "isClose", 4, "ngIf"], ["icon", "fas fa-chevron-left", "iconPos", "left", "pButton", "", 1, "p-button-warning", "p-mr-2", 3, "disabled", "label", "click"], ["icon", "fas fa-download", "iconPos", "left", "pButton", "", 3, "label", "click"], [2, "width", "50px"], [2, "width", "35px"], [2, "width", "15%"], [1, "p-d-none", "p-d-lg-table-cell", "p-text-center", 2, "width", "20%"], [2, "width", "120px"], [3, "dblclick", 4, "ngIf"], [3, "ngClass", "pSelectableRow", "pSelectableRowIndex", 4, "ngIf"], [3, "dblclick"], [1, "p-d-inline-flex", "p-align-center", "pl-1px"], [1, "fas", "fa-2x", "fa-folder", "text-primary"], [1, "folder-name"], [3, "title", "click"], [1, "p-d-none", "p-d-lg-table-cell", "p-text-center"], [3, "ngClass", "pSelectableRow", "pSelectableRowIndex"], [1, "p-d-inline-flex", "p-align-center", "pl-1px", 3, "ngSwitch"], [3, "ngSwitch", 4, "ngSwitchCase"], ["class", "fas fa-2x fa-file-video", 4, "ngSwitchCase"], ["class", "fas fa-2x fa-file-audio", 4, "ngSwitchCase"], ["class", "fas fa-2x fa-file-image", 4, "ngSwitchCase"], ["class", "far fa-2x fa-file-alt", 4, "ngSwitchCase"], ["class", "far fa-2x fa-file-archive", 4, "ngSwitchCase"], ["class", "far fa-2x fa-file", 4, "ngSwitchDefault"], [1, "p-text-truncate"], [3, "title"], [1, "p-text-center"], ["class", "fas fa-lock", "tooltipPosition", "top", 3, "pTooltip", 4, "ngIf"], [1, "p-text-right"], ["pButton", "", "icon", "fas fa-eye", "iconPos", "left", "class", "p-button-info p-ml-1", "tooltipPosition", "top", 3, "pTooltip", "click", 4, "ngIf"], ["pButton", "", "icon", "fas fa-download", "iconPos", "left", "class", "p-ml-1", "tooltipPosition", "top", 3, "pTooltip", "click", 4, "ngIf"], [3, "ngSwitch"], ["class", "far fa-2x fa-file-pdf text-danger", 4, "ngSwitchCase"], ["class", "far fa-2x fa-file-word text-primary", 4, "ngSwitchCase"], ["class", "far fa-2x fa-file-excel text-success", 4, "ngSwitchCase"], ["class", "far fa-2x fa-file-powerpoint text-warning", 4, "ngSwitchCase"], ["class", "far fa-2x fa-file", 4, "ngSwitchCase"], [1, "far", "fa-2x", "fa-file-pdf", "text-danger"], [1, "far", "fa-2x", "fa-file-word", "text-primary"], [1, "far", "fa-2x", "fa-file-excel", "text-success"], [1, "far", "fa-2x", "fa-file-powerpoint", "text-warning"], [1, "far", "fa-2x", "fa-file"], [1, "fas", "fa-2x", "fa-file-video"], [1, "fas", "fa-2x", "fa-file-audio"], [1, "fas", "fa-2x", "fa-file-image"], [1, "far", "fa-2x", "fa-file-alt"], [1, "far", "fa-2x", "fa-file-archive"], ["tooltipPosition", "top", 1, "fas", "fa-lock", 3, "pTooltip"], ["pButton", "", "icon", "fas fa-eye", "iconPos", "left", "tooltipPosition", "top", 1, "p-button-info", "p-ml-1", 3, "pTooltip", "click"], ["pButton", "", "icon", "fas fa-download", "iconPos", "left", "tooltipPosition", "top", 1, "p-ml-1", 3, "pTooltip", "click"], [1, "p-error", "p-text-left"], [4, "ngIf"], ["translate", "validation.input_email"], ["translate", "validation.email_format"], ["translate", "validation.input_otp_code"], [3, "emailView", "file", "projectId", "isLinkView", "printable", "watermarkSetting", "linkId", "isClose"]], template: function DownloadContentComponent_Template(rf, ctx) { if (rf & 1) {
        const _r56 = i0.ɵɵgetCurrentView();
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵtemplate(2, DownloadContentComponent_button_2_Template, 2, 4, "button", 2);
        i0.ɵɵtemplate(3, DownloadContentComponent_button_3_Template, 2, 3, "button", 3);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(4, "p-table", 4);
        i0.ɵɵlistener("selectionChange", function DownloadContentComponent_Template_p_table_selectionChange_4_listener($event) { return ctx.selectedFiles = $event; })("onRowSelect", function DownloadContentComponent_Template_p_table_onRowSelect_4_listener($event) { return ctx.doRowSelect($event); })("onRowUnselect", function DownloadContentComponent_Template_p_table_onRowUnselect_4_listener($event) { return ctx.doRowUnselect($event); });
        i0.ɵɵtemplate(5, DownloadContentComponent_ng_template_5_Template, 11, 6, "ng-template", 5);
        i0.ɵɵtemplate(6, DownloadContentComponent_ng_template_6_Template, 2, 2, "ng-template", 6);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(7, "p-dialog", 7, 8);
        i0.ɵɵlistener("visibleChange", function DownloadContentComponent_Template_p_dialog_visibleChange_7_listener($event) { return ctx.showVerifiedEmailModal = $event; })("onHide", function DownloadContentComponent_Template_p_dialog_onHide_7_listener() { i0.ɵɵrestoreView(_r56); const _r5 = i0.ɵɵreference(11); return _r5.reset(); });
        i0.ɵɵpipe(9, "translate");
        i0.ɵɵelementStart(10, "form", 9, 10);
        i0.ɵɵelementStart(12, "div", 11);
        i0.ɵɵelementStart(13, "div", 12);
        i0.ɵɵelementStart(14, "span", 13);
        i0.ɵɵelementStart(15, "input", 14, 15);
        i0.ɵɵlistener("ngModelChange", function DownloadContentComponent_Template_input_ngModelChange_15_listener($event) { return ctx.inputtedEmail = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(17, "label", 16);
        i0.ɵɵtext(18);
        i0.ɵɵpipe(19, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(20, DownloadContentComponent_div_20_Template, 3, 2, "div", 17);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(21, "div", 18);
        i0.ɵɵelementStart(22, "button", 19);
        i0.ɵɵlistener("click", function DownloadContentComponent_Template_button_click_22_listener($event) { i0.ɵɵrestoreView(_r56); const _r4 = i0.ɵɵreference(8); return _r4.close($event); });
        i0.ɵɵpipe(23, "titlecase");
        i0.ɵɵpipe(24, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(25, "div", 18);
        i0.ɵɵelementStart(26, "button", 20);
        i0.ɵɵlistener("click", function DownloadContentComponent_Template_button_click_26_listener() { i0.ɵɵrestoreView(_r56); const _r5 = i0.ɵɵreference(11); return ctx.getPinCode(_r5); });
        i0.ɵɵpipe(27, "uppercase");
        i0.ɵɵpipe(28, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(29, "p-dialog", 21, 22);
        i0.ɵɵlistener("visibleChange", function DownloadContentComponent_Template_p_dialog_visibleChange_29_listener($event) { return ctx.showVerifiedPinModal = $event; })("onHide", function DownloadContentComponent_Template_p_dialog_onHide_29_listener() { i0.ɵɵrestoreView(_r56); const _r9 = i0.ɵɵreference(33); return _r9.reset(); });
        i0.ɵɵpipe(31, "translate");
        i0.ɵɵelementStart(32, "form", 9, 23);
        i0.ɵɵelementStart(34, "div", 11);
        i0.ɵɵelementStart(35, "div", 12);
        i0.ɵɵelementStart(36, "span", 13);
        i0.ɵɵelementStart(37, "input", 24, 25);
        i0.ɵɵlistener("ngModelChange", function DownloadContentComponent_Template_input_ngModelChange_37_listener($event) { return ctx.inputtedPin = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(39, "label", 26);
        i0.ɵɵtext(40);
        i0.ɵɵpipe(41, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(42, DownloadContentComponent_div_42_Template, 2, 1, "div", 17);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(43, "div", 18);
        i0.ɵɵelementStart(44, "button", 19);
        i0.ɵɵlistener("click", function DownloadContentComponent_Template_button_click_44_listener($event) { i0.ɵɵrestoreView(_r56); const _r8 = i0.ɵɵreference(30); return _r8.close($event); });
        i0.ɵɵpipe(45, "titlecase");
        i0.ɵɵpipe(46, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(47, "div", 18);
        i0.ɵɵelementStart(48, "button", 20);
        i0.ɵɵlistener("click", function DownloadContentComponent_Template_button_click_48_listener() { i0.ɵɵrestoreView(_r56); const _r9 = i0.ɵɵreference(33); return ctx.verifyPinCode(_r9); });
        i0.ɵɵpipe(49, "uppercase");
        i0.ɵɵpipe(50, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(51, DownloadContentComponent_app_view_online_form_51_Template, 1, 6, "app-view-online-form", 27);
    } if (rf & 2) {
        const _r5 = i0.ɵɵreference(11);
        const _r6 = i0.ɵɵreference(16);
        const _r9 = i0.ɵɵreference(33);
        const _r10 = i0.ɵɵreference(38);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", !!ctx.router.url.split("/")[5]);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.link.allowedDownloadFile && ctx.selectedFiles.length > 0);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("value", ctx.files)("selection", ctx.selectedFiles)("metaKeySelection", true)("loading", ctx.isLoading);
        i0.ɵɵadvance(3);
        i0.ɵɵstyleMap(i0.ɵɵpureFunction0(65, _c1));
        i0.ɵɵproperty("visible", ctx.showVerifiedEmailModal)("blockScroll", true)("draggable", false)("header", i0.ɵɵpipeBind1(9, 41, "label.enter_email"))("modal", true)("closeOnEscape", false)("breakpoints", i0.ɵɵpureFunction0(66, _c2));
        i0.ɵɵadvance(8);
        i0.ɵɵclassProp("ng-dirty", _r6.invalid && (_r6.dirty || _r6.touched) || _r5.submitted && _r6.invalid);
        i0.ɵɵproperty("ngModel", ctx.inputtedEmail)("pattern", ctx.appConstant.PATTERNS.EMAIL)("maxlength", 64);
        i0.ɵɵadvance(3);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(19, 43, "label.enter_email"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", _r6.invalid && (_r6.dirty || _r6.touched) || _r5.submitted && _r6.invalid);
        i0.ɵɵadvance(2);
        i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(23, 45, i0.ɵɵpipeBind1(24, 47, "button.cancel")));
        i0.ɵɵadvance(4);
        i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(27, 49, i0.ɵɵpipeBind1(28, 51, "button.verify")));
        i0.ɵɵadvance(3);
        i0.ɵɵstyleMap(i0.ɵɵpureFunction0(67, _c1));
        i0.ɵɵproperty("visible", ctx.showVerifiedPinModal)("blockScroll", true)("draggable", false)("header", i0.ɵɵpipeBind1(31, 53, "label.enter_pin_code"))("modal", true)("breakpoints", i0.ɵɵpureFunction0(68, _c2));
        i0.ɵɵadvance(8);
        i0.ɵɵclassProp("ng-dirty", _r10.invalid && (_r10.dirty || _r10.touched) || _r9.submitted && _r10.invalid);
        i0.ɵɵproperty("ngModel", ctx.inputtedPin)("maxLength", 10);
        i0.ɵɵadvance(3);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(41, 55, "label.enter_pin_code"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", _r10.invalid && (_r10.dirty || _r10.touched) || _r9.submitted && _r10.invalid);
        i0.ɵɵadvance(2);
        i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(45, 57, i0.ɵɵpipeBind1(46, 59, "button.cancel")));
        i0.ɵɵadvance(4);
        i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(49, 61, i0.ɵɵpipeBind1(50, 63, "button.verify")));
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("ngIf", ctx.isCheckViewOnline);
    } }, directives: [i2.NgIf, i6.Table, i7.PrimeTemplate, i8.Dialog, i9.ɵangular_packages_forms_forms_y, i9.NgControlStatusGroup, i9.NgForm, i9.DefaultValueAccessor, i10.InputText, i9.RequiredValidator, i9.NgControlStatus, i9.NgModel, i9.PatternValidator, i9.MaxLengthValidator, i11.ButtonDirective, i2.NgClass, i6.SelectableRow, i2.NgSwitch, i2.NgSwitchCase, i2.NgSwitchDefault, i12.Tooltip, i1.TranslateDirective, i13.ViewOnlineFormComponent], pipes: [i1.TranslatePipe, i2.TitleCasePipe, i2.UpperCasePipe], styles: [".item-name[_ngcontent-%COMP%] {\n  line-height: 1.6;\n}\n\n.bg-selected[_ngcontent-%COMP%] {\n  background-color: #e8f0fe !important;\n}\n\n.folder-name[_ngcontent-%COMP%] {\n  text-decoration: none;\n  cursor: pointer;\n}\n\n.folder-name[_ngcontent-%COMP%]:focus, .folder-name[_ngcontent-%COMP%]:hover {\n  font-weight: bold;\n  color: #23527c;\n  text-decoration: underline;\n}\n\n.btn-fit[_ngcontent-%COMP%] {\n  height: -moz-fit-content;\n  height: fit-content;\n}\n\n.flex-end[_ngcontent-%COMP%] {\n  justify-content: flex-end !important;\n}\n\n.p-card[_ngcontent-%COMP%]:hover {\n  background-color: #e8f0fe !important;\n}\n\n.text-danger[_ngcontent-%COMP%] {\n  color: #dc3545 !important;\n}\n\n.text-primary[_ngcontent-%COMP%] {\n  color: #007bff !important;\n}\n\n.text-success[_ngcontent-%COMP%] {\n  color: #28a745 !important;\n}\n\n.text-warning[_ngcontent-%COMP%] {\n  color: #ffc107 !important;\n}\n\n[_nghost-%COMP%]  .dark-panel .p-dialog .p-dialog-header {\n  background-color: #2A3F54 !important;\n  color: #ffffff;\n}\n\n[_nghost-%COMP%]  .dark-panel .p-dialog .p-dialog-header .p-dialog-header-icon {\n  color: #ffffff;\n}\n\n[_nghost-%COMP%]  .p-datatable .p-datatable-tbody > tr.p-highlight {\n  background: none;\n}\n\n[_nghost-%COMP%]  .p-dataview .p-dataview-content {\n  padding: 0;\n}\n\n[_nghost-%COMP%]  .p-dataview .p-dataview-emptymessage {\n  text-align: center;\n}\n\n[_nghost-%COMP%]  .hide-message .p-dataview .p-dataview-emptymessage {\n  display: none;\n}\n\n@media only screen and (min-width: 992px) {\n  .p-d-lg-table-cell[_ngcontent-%COMP%] {\n    display: table-cell !important;\n  }\n}\n\n.pl-1px[_ngcontent-%COMP%] {\n  padding-left: 1px;\n}\n/*# sourceMappingURL=data:application/json;base64,  */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DownloadContentComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-download-content',
                templateUrl: './download-content.component.html',
                styleUrls: ['./download-content.component.scss']
            }]
    }], function () { return [{ type: i1.TranslateService }, { type: i2.DatePipe }, { type: i3.Router }, { type: i3.ActivatedRoute }, { type: i4.DownloadService }, { type: i5.LinkService }]; }, null); })();


/***/ }),

/***/ "./src/app/non-authentication-pages/download/download-password/download-password.component.ts":
/*!****************************************************************************************************!*\
  !*** ./src/app/non-authentication-pages/download/download-password/download-password.component.ts ***!
  \****************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.DownloadPasswordComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/download.service */ "./src/app/services/download.service.ts"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/link.service */ "./src/app/services/link.service.ts"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! primeng/ripple */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-ripple.js"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! primeng/tooltip */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-tooltip.js"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
function DownloadPasswordComponent_input_5_Template(rf, ctx) { if (rf & 1) {
    const _r6 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "input", 13);
    i0.ɵɵlistener("keypress", function DownloadPasswordComponent_input_5_Template_input_keypress_0_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r5 = i0.ɵɵnextContext(); return ctx_r5.util.blockSpaceChars($event); })("ngModelChange", function DownloadPasswordComponent_input_5_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r7 = i0.ɵɵnextContext(); return ctx_r7.linkPassword = $event; });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵproperty("ngModel", ctx_r0.linkPassword);
} }
function DownloadPasswordComponent_input_6_Template(rf, ctx) { if (rf & 1) {
    const _r9 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "input", 14);
    i0.ɵɵlistener("keypress", function DownloadPasswordComponent_input_6_Template_input_keypress_0_listener($event) { i0.ɵɵrestoreView(_r9); const ctx_r8 = i0.ɵɵnextContext(); return ctx_r8.util.blockSpaceChars($event); })("ngModelChange", function DownloadPasswordComponent_input_6_Template_input_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r9); const ctx_r10 = i0.ɵɵnextContext(); return ctx_r10.linkPassword = $event; });
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵproperty("ngModel", ctx_r1.linkPassword);
} }
function DownloadPasswordComponent_button_10_Template(rf, ctx) { if (rf & 1) {
    const _r12 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 15);
    i0.ɵɵlistener("click", function DownloadPasswordComponent_button_10_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r12); const ctx_r11 = i0.ɵɵnextContext(); return ctx_r11.handleShowPassword(); });
    i0.ɵɵpipe(1, "titlecase");
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵpropertyInterpolate("pTooltip", i0.ɵɵpipeBind1(1, 1, i0.ɵɵpipeBind1(2, 3, "label.show_password")));
} }
function DownloadPasswordComponent_button_11_Template(rf, ctx) { if (rf & 1) {
    const _r14 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 16);
    i0.ɵɵlistener("click", function DownloadPasswordComponent_button_11_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r14); const ctx_r13 = i0.ɵɵnextContext(); return ctx_r13.handleShowPassword(); });
    i0.ɵɵpipe(1, "titlecase");
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵpropertyInterpolate("pTooltip", i0.ɵɵpipeBind1(1, 1, i0.ɵɵpipeBind1(2, 3, "label.hide_password")));
} }
function DownloadPasswordComponent_div_12_small_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 18);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "validation.require"), " ");
} }
function DownloadPasswordComponent_div_12_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵtemplate(1, DownloadPasswordComponent_div_12_small_1_Template, 3, 3, "small", 17);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r4 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r4.linkPasswordFrm.controls["linkPassword"].errors == null ? null : ctx_r4.linkPasswordFrm.controls["linkPassword"].errors.required);
} }
class DownloadPasswordComponent {
    constructor(downloadService, linkService, fb) {
        this.downloadService = downloadService;
        this.linkService = linkService;
        this.fb = fb;
        this.isVerifySuccess = new core_1.EventEmitter();
        this.util = app_util_1.default;
        this.linkPasswordFrm = new forms_1.FormGroup({});
        this.isShowPassword = false;
        this.isSubmit = false;
    }
    ngOnInit() {
        this.linkPasswordFrm = this.fb.group({
            linkPassword: ['', [forms_1.Validators.required, forms_1.Validators.pattern(app_constants_1.default.PATTERNS.SCRIPT_PATTERN)]],
        });
    }
    handleShowPassword() {
        this.isShowPassword = !this.isShowPassword;
    }
    verifyPasswordLink() {
        this.isSubmit = true;
        if (this.linkPasswordFrm.invalid) {
            return;
        }
        this.linkService.verifyPasswordLink(this.linkId, window.btoa(unescape(encodeURIComponent(this.linkPassword))))
            .subscribe(res => {
            if (res.status === 200) {
                this.isVerifySuccess.emit(true);
            }
            else {
                this.isVerifySuccess.emit(false);
            }
        }, error => {
            this.isVerifySuccess.emit(false);
            if (error.status === 1100 || error.status === 600) {
                // AppUtil.showError({
                //   text: util.translate("error.1100")
                // });
                // var compiledHTML = $compile("<div 404-notfound></div>")($scope);
                // $("#body").append(compiledHTML);
            }
            else {
                // AppUtil.showError({
                //   text: util.translate("error." + res.status)
                // });
                // error && error(res);
            }
        });
    }
}
exports.DownloadPasswordComponent = DownloadPasswordComponent;
DownloadPasswordComponent.ɵfac = function DownloadPasswordComponent_Factory(t) { return new (t || DownloadPasswordComponent)(i0.ɵɵdirectiveInject(i1.DownloadService), i0.ɵɵdirectiveInject(i2.LinkService), i0.ɵɵdirectiveInject(i3.FormBuilder)); };
DownloadPasswordComponent.ɵcmp = i0.ɵɵdefineComponent({ type: DownloadPasswordComponent, selectors: [["app-download-password"]], inputs: { linkId: "linkId" }, outputs: { isVerifySuccess: "isVerifySuccess" }, decls: 16, vars: 12, consts: [[3, "formGroup"], [1, "p-grid"], [1, "p-col-8", "p-md-offset-4", "p-md-3"], [1, "p-inputgroup"], [1, "p-float-label"], ["formControlName", "linkPassword", "id", "inputPass", "maxlength", "32", "pInputText", "", "required", "required", "type", "password", 3, "ngModel", "keypress", "ngModelChange", 4, "ngIf"], ["formControlName", "linkPassword", "id", "inputPass", "maxlength", "32", "pInputText", "", "required", "required", "type", "text", 3, "ngModel", "keypress", "ngModelChange", 4, "ngIf"], ["for", "inputPass"], ["class", "p-inputgroup-addon", "icon", "far fa-eye", "pButton", "", "pRipple", "", "type", "button", 3, "pTooltip", "click", 4, "ngIf"], ["class", "p-inputgroup-addon", "icon", "fas fa-eye-slash", "pButton", "", "pRipple", "", "type", "button", 3, "pTooltip", "click", 4, "ngIf"], [4, "ngIf"], [1, "p-col-4", "p-md-1"], ["pButton", "", "type", "submit", 1, "p-width-100", 2, "height", "42px", 3, "label", "click"], ["formControlName", "linkPassword", "id", "inputPass", "maxlength", "32", "pInputText", "", "required", "required", "type", "password", 3, "ngModel", "keypress", "ngModelChange"], ["formControlName", "linkPassword", "id", "inputPass", "maxlength", "32", "pInputText", "", "required", "required", "type", "text", 3, "ngModel", "keypress", "ngModelChange"], ["icon", "far fa-eye", "pButton", "", "pRipple", "", "type", "button", 1, "p-inputgroup-addon", 3, "pTooltip", "click"], ["icon", "fas fa-eye-slash", "pButton", "", "pRipple", "", "type", "button", 1, "p-inputgroup-addon", 3, "pTooltip", "click"], ["class", "p-error", 4, "ngIf"], [1, "p-error"]], template: function DownloadPasswordComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "form", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵelementStart(2, "div", 2);
        i0.ɵɵelementStart(3, "div", 3);
        i0.ɵɵelementStart(4, "span", 4);
        i0.ɵɵtemplate(5, DownloadPasswordComponent_input_5_Template, 1, 1, "input", 5);
        i0.ɵɵtemplate(6, DownloadPasswordComponent_input_6_Template, 1, 1, "input", 6);
        i0.ɵɵelementStart(7, "label", 7);
        i0.ɵɵtext(8);
        i0.ɵɵpipe(9, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(10, DownloadPasswordComponent_button_10_Template, 3, 5, "button", 8);
        i0.ɵɵtemplate(11, DownloadPasswordComponent_button_11_Template, 3, 5, "button", 9);
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(12, DownloadPasswordComponent_div_12_Template, 2, 1, "div", 10);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(13, "div", 11);
        i0.ɵɵelementStart(14, "button", 12);
        i0.ɵɵlistener("click", function DownloadPasswordComponent_Template_button_click_14_listener() { return ctx.verifyPasswordLink(); });
        i0.ɵɵpipe(15, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵproperty("formGroup", ctx.linkPasswordFrm);
        i0.ɵɵadvance(5);
        i0.ɵɵproperty("ngIf", !ctx.isShowPassword);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.isShowPassword);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(9, 8, "label.input_password_to_unlock"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", !ctx.isShowPassword);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.isShowPassword);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", (ctx.linkPasswordFrm.controls["linkPassword"].dirty || ctx.linkPasswordFrm.controls["linkPassword"].touched || ctx.isSubmit) && ctx.linkPasswordFrm.controls["linkPassword"].invalid);
        i0.ɵɵadvance(2);
        i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(15, 10, "button.verify"));
    } }, directives: [i3.ɵangular_packages_forms_forms_y, i3.NgControlStatusGroup, i3.FormGroupDirective, i4.NgIf, i5.ButtonDirective, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlName, i3.MaxLengthValidator, i6.InputText, i3.RequiredValidator, i7.Ripple, i8.Tooltip], pipes: [i9.TranslatePipe, i4.TitleCasePipe], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL25vbi1hdXRoZW50aWNhdGlvbi1wYWdlcy9kb3dubG9hZC9kb3dubG9hZC1wYXNzd29yZC9kb3dubG9hZC1wYXNzd29yZC5jb21wb25lbnQuc2NzcyJ9 */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DownloadPasswordComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-download-password',
                templateUrl: './download-password.component.html',
                styleUrls: ['./download-password.component.scss']
            }]
    }], function () { return [{ type: i1.DownloadService }, { type: i2.LinkService }, { type: i3.FormBuilder }]; }, { linkId: [{
            type: core_1.Input
        }], isVerifySuccess: [{
            type: core_1.Output
        }] }); })();


/***/ }),

/***/ "./src/app/non-authentication-pages/download/download.component.ts":
/*!*************************************************************************!*\
  !*** ./src/app/non-authentication-pages/download/download.component.ts ***!
  \*************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.DownloadComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const moment_1 = tslib_1.__importStar(__webpack_require__(/*! moment */ "./node_modules/moment/moment.js"));
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/__ivy_ngcc__/fesm2015/platform-browser.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! ../../services/download.service */ "./src/app/services/download.service.ts"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! ../../services/link.service */ "./src/app/services/link.service.ts"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! ./download-password/download-password.component */ "./src/app/non-authentication-pages/download/download-password/download-password.component.ts"));
const _c0 = ["downloadPasswordComponent"];
const _c1 = ["downloadContentComponent"];
function DownloadComponent_div_0_Template(rf, ctx) { if (rf & 1) {
    const _r5 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 7);
    i0.ɵɵelementStart(1, "app-download-password", 8, 9);
    i0.ɵɵlistener("isVerifySuccess", function DownloadComponent_div_0_Template_app_download_password_isVerifySuccess_1_listener($event) { i0.ɵɵrestoreView(_r5); const ctx_r4 = i0.ɵɵnextContext(); return ctx_r4.isVerify = $event; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("linkId", ctx_r0.linkId);
} }
function DownloadComponent_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 10);
    i0.ɵɵelement(1, "router-outlet");
    i0.ɵɵelementEnd();
} }
const _c2 = function (a0) { return { expire_date: a0 }; };
function DownloadComponent_label_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "label", 11);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(2, 1, "label.download_instruction.link_expiry", i0.ɵɵpureFunction1(4, _c2, ctx_r2.linkExpDate)), " ");
} }
class DownloadComponent {
    constructor(titleService, translateService, datePipe, router, activatedRoute, downloadService, linkService) {
        this.titleService = titleService;
        this.translateService = translateService;
        this.datePipe = datePipe;
        this.router = router;
        this.activatedRoute = activatedRoute;
        this.downloadService = downloadService;
        this.linkService = linkService;
        this.util = app_util_1.default;
        this.appConstant = app_constants_1.default;
        this.hasPassword = 1;
        this.isVerify = false;
        this.translateService.get(['page_title.view_link']).subscribe(translation => {
            this.titleService.setTitle(translation['page_title.view_link']);
        });
    }
    ngOnInit() {
        this.projectId = this.activatedRoute.snapshot.paramMap.get('project_id');
        this.linkId = this.activatedRoute.snapshot.paramMap.get('link_id');
        this.folderId = (this.activatedRoute.snapshot.paramMap.get('folder_id')) ?
            this.activatedRoute.snapshot.paramMap.get('folder_id') : '0';
        this.downloadService.setProjectId(this.projectId);
        this.downloadService.setLinkId(this.linkId);
        this.getLinkInfo();
    }
    getLinkInfo() {
        const params = {
            project_id: this.projectId
        };
        this.linkService.getLinkInfo(this.linkId, this.util.toSnakeCaseKey(params)).subscribe(res => {
            var _a, _b;
            if (res.status === 200) {
                this.link = res.data;
                this.linkExpDate = (moment_1.default((_a = this.link) === null || _a === void 0 ? void 0 : _a.expiryDate).format('YYYY/MM/DD') <= this.appConstant.MAX_DATE_ONLY)
                    ? moment_1.default(moment_1.utc((_b = this.link) === null || _b === void 0 ? void 0 : _b.expiryDate)).format(this.appConstant.FORMAT_DATE.MOMENT_SHORT_DATE) : null;
                this.downloadService.setLink(this.link);
                this.hasPassword = this.link.isPassword;
            }
            else if (res.status === 1100 || res.status === 600) {
                this.router.navigate(['/error-404']);
            }
        });
    }
}
exports.DownloadComponent = DownloadComponent;
DownloadComponent.ɵfac = function DownloadComponent_Factory(t) { return new (t || DownloadComponent)(i0.ɵɵdirectiveInject(i1.Title), i0.ɵɵdirectiveInject(i2.TranslateService), i0.ɵɵdirectiveInject(i3.DatePipe), i0.ɵɵdirectiveInject(i4.Router), i0.ɵɵdirectiveInject(i4.ActivatedRoute), i0.ɵɵdirectiveInject(i5.DownloadService), i0.ɵɵdirectiveInject(i6.LinkService)); };
DownloadComponent.ɵcmp = i0.ɵɵdefineComponent({ type: DownloadComponent, selectors: [["app-download"]], viewQuery: function DownloadComponent_Query(rf, ctx) { if (rf & 1) {
        i0.ɵɵviewQuery(_c0, 1);
        i0.ɵɵviewQuery(_c1, 1);
    } if (rf & 2) {
        let _t;
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.downloadPasswordComponent = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.downloadContentComponent = _t.first);
    } }, decls: 35, vars: 27, consts: [["class", "p-mt-4 px-20", 4, "ngIf"], ["class", "p-px-2", 4, "ngIf"], [1, "p-pt-4", "p-pb-6", "p-px-4"], [1, "p-grid"], [1, "p-col-12", "p-p-1"], ["class", "p-text-bold font-16", 4, "ngIf"], [1, "fas", "fa-lock"], [1, "p-mt-4", "px-20"], [3, "linkId", "isVerifySuccess"], ["downloadPasswordComponent", ""], [1, "p-px-2"], [1, "p-text-bold", "font-16"]], template: function DownloadComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵtemplate(0, DownloadComponent_div_0_Template, 3, 1, "div", 0);
        i0.ɵɵtemplate(1, DownloadComponent_div_1_Template, 2, 0, "div", 1);
        i0.ɵɵelementStart(2, "div", 2);
        i0.ɵɵelementStart(3, "div", 3);
        i0.ɵɵelementStart(4, "div", 4);
        i0.ɵɵtemplate(5, DownloadComponent_label_5_Template, 3, 6, "label", 5);
        i0.ɵɵelementStart(6, "h2");
        i0.ɵɵelementStart(7, "span");
        i0.ɵɵtext(8);
        i0.ɵɵpipe(9, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelement(10, "i", 6);
        i0.ɵɵelementStart(11, "span");
        i0.ɵɵtext(12);
        i0.ɵɵpipe(13, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(14, "p");
        i0.ɵɵelementStart(15, "strong");
        i0.ɵɵtext(16);
        i0.ɵɵpipe(17, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(18, "span");
        i0.ɵɵtext(19);
        i0.ɵɵpipe(20, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(21, "p");
        i0.ɵɵelementStart(22, "strong");
        i0.ɵɵtext(23);
        i0.ɵɵpipe(24, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(25, "span");
        i0.ɵɵtext(26);
        i0.ɵɵpipe(27, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(28, "p");
        i0.ɵɵelementStart(29, "strong");
        i0.ɵɵtext(30);
        i0.ɵɵpipe(31, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(32, "span");
        i0.ɵɵtext(33);
        i0.ɵɵpipe(34, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵproperty("ngIf", ctx.hasPassword === 1 && !ctx.isVerify);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.hasPassword === 0 || ctx.hasPassword === 1 && ctx.isVerify);
        i0.ɵɵadvance(4);
        i0.ɵɵproperty("ngIf", ctx.linkExpDate);
        i0.ɵɵadvance(3);
        i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(9, 11, "label.download_instruction.title_1"), " ");
        i0.ɵɵadvance(4);
        i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(13, 13, "label.download_instruction.title_2"), "");
        i0.ɵɵadvance(4);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(17, 15, "label.download_instruction.view_protect"));
        i0.ɵɵadvance(3);
        i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(20, 17, "label.download_instruction.view_protect_files_message"), "");
        i0.ɵɵadvance(4);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(24, 19, "label.download_instruction.download_use_protect_pdf"));
        i0.ɵɵadvance(3);
        i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(27, 21, "label.download_instruction.download_use_protect_pdf_content"), "");
        i0.ɵɵadvance(4);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(31, 23, "label.download_instruction.download_use_protect_microsoft"));
        i0.ɵɵadvance(3);
        i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(34, 25, "label.download_instruction.download_use_protect_microsoft_content"), "");
    } }, directives: [i3.NgIf, i7.DownloadPasswordComponent, i4.RouterOutlet], pipes: [i2.TranslatePipe], styles: [".border-radius-8[_ngcontent-%COMP%] {\n  border-radius: 8px;\n}\n\n.px-20[_ngcontent-%COMP%] {\n  padding-right: 20px;\n  padding-left: 20px;\n}\n\n.font-16[_ngcontent-%COMP%] {\n  font-size: 1rem;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvbm9uLWF1dGhlbnRpY2F0aW9uLXBhZ2VzL2Rvd25sb2FkL2Rvd25sb2FkLmNvbXBvbmVudC5zY3NzIiwic3JjL2FwcC9ub24tYXV0aGVudGljYXRpb24tcGFnZXMvZG93bmxvYWQvZG93bmxvYWQuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxrQkFBQTtBQ0NGOztBREVBO0VBQ0UsbUJBQUE7RUFDQSxrQkFBQTtBQ0NGOztBREVBO0VBQ0UsZUFBQTtBQ0NGIiwiZmlsZSI6InNyYy9hcHAvbm9uLWF1dGhlbnRpY2F0aW9uLXBhZ2VzL2Rvd25sb2FkL2Rvd25sb2FkLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmJvcmRlci1yYWRpdXMtOCB7XG4gIGJvcmRlci1yYWRpdXM6IDhweDtcbn1cblxuLnB4LTIwIHtcbiAgcGFkZGluZy1yaWdodDogMjBweDtcbiAgcGFkZGluZy1sZWZ0OiAyMHB4XG59XG5cbi5mb250LTE2IHtcbiAgZm9udC1zaXplOiAxcmVtO1xufVxuIiwiLmJvcmRlci1yYWRpdXMtOCB7XG4gIGJvcmRlci1yYWRpdXM6IDhweDtcbn1cblxuLnB4LTIwIHtcbiAgcGFkZGluZy1yaWdodDogMjBweDtcbiAgcGFkZGluZy1sZWZ0OiAyMHB4O1xufVxuXG4uZm9udC0xNiB7XG4gIGZvbnQtc2l6ZTogMXJlbTtcbn0iXX0= */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DownloadComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-download',
                templateUrl: './download.component.html',
                styleUrls: ['./download.component.scss']
            }]
    }], function () { return [{ type: i1.Title }, { type: i2.TranslateService }, { type: i3.DatePipe }, { type: i4.Router }, { type: i4.ActivatedRoute }, { type: i5.DownloadService }, { type: i6.LinkService }]; }, { downloadPasswordComponent: [{
            type: core_1.ViewChild,
            args: ['downloadPasswordComponent']
        }], downloadContentComponent: [{
            type: core_1.ViewChild,
            args: ['downloadContentComponent']
        }] }); })();


/***/ }),

/***/ "./src/app/non-authentication-pages/error-template/internal-server/internal-server.component.ts":
/*!******************************************************************************************************!*\
  !*** ./src/app/non-authentication-pages/error-template/internal-server/internal-server.component.ts ***!
  \******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.InternalServerComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
class InternalServerComponent {
    constructor() { }
    ngOnInit() {
    }
}
exports.InternalServerComponent = InternalServerComponent;
InternalServerComponent.ɵfac = function InternalServerComponent_Factory(t) { return new (t || InternalServerComponent)(); };
InternalServerComponent.ɵcmp = i0.ɵɵdefineComponent({ type: InternalServerComponent, selectors: [["app-internal-server"]], decls: 9, vars: 0, consts: [[1, "p-grid", "p-mt-6", "p-mx-0", "p-ai-center"], [1, "p-col-12", "p-text-center"], [1, "pi", "pi-times-circle", "p-error", 2, "font-size", "2rem"], [1, "p-mt-3"], ["routerLink", "/", "pButton", "", "type", "button", "icon", "pi pi-chevron-left", "label", "Take Me Home", 1, "p-button-info"]], template: function InternalServerComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵelementStart(2, "h1");
        i0.ɵɵelement(3, "i", 2);
        i0.ɵɵtext(4, " Oops! Something went wrong!");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(5, "p");
        i0.ɵɵtext(6, "Sorry, an error has occurred. Please contact the administration!");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(7, "div", 3);
        i0.ɵɵelement(8, "button", 4);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } }, directives: [i1.RouterLink, i2.ButtonDirective], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL25vbi1hdXRoZW50aWNhdGlvbi1wYWdlcy9lcnJvci10ZW1wbGF0ZS9pbnRlcm5hbC1zZXJ2ZXIvaW50ZXJuYWwtc2VydmVyLmNvbXBvbmVudC5zY3NzIn0= */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(InternalServerComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-internal-server',
                templateUrl: './internal-server.component.html',
                styleUrls: ['./internal-server.component.scss']
            }]
    }], function () { return []; }, null); })();


/***/ }),

/***/ "./src/app/non-authentication-pages/error-template/not-found/not-found.component.ts":
/*!******************************************************************************************!*\
  !*** ./src/app/non-authentication-pages/error-template/not-found/not-found.component.ts ***!
  \******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.NotFoundComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
class NotFoundComponent {
    constructor() { }
    ngOnInit() {
    }
}
exports.NotFoundComponent = NotFoundComponent;
NotFoundComponent.ɵfac = function NotFoundComponent_Factory(t) { return new (t || NotFoundComponent)(); };
NotFoundComponent.ɵcmp = i0.ɵɵdefineComponent({ type: NotFoundComponent, selectors: [["app-not-found"]], decls: 8, vars: 0, consts: [[1, "p-grid", "p-m-0"], [1, "p-col-12", "p-text-center"], [1, "title", "p-mt-6", "p-mb-1"], [1, "small"]], template: function NotFoundComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵelementStart(2, "p", 2);
        i0.ɵɵtext(3, "404 NOT FOUND");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(4, "p", 3);
        i0.ɵɵtext(5, "Sorry, an error has occurred. The requested link is not found!");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(6, "p", 3);
        i0.ɵɵtext(7, "The link might be deleted. Please contact the owner of the link!");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } }, styles: [".title[_ngcontent-%COMP%] {\n  font-size: 100px;\n  color: #23527c;\n  letter-spacing: -0.5px;\n  line-height: 100%;\n}\n\n.small[_ngcontent-%COMP%] {\n  font-size: 20px;\n  line-height: 100%;\n  vertical-align: top;\n  color: #23527c;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvbm9uLWF1dGhlbnRpY2F0aW9uLXBhZ2VzL2Vycm9yLXRlbXBsYXRlL25vdC1mb3VuZC9ub3QtZm91bmQuY29tcG9uZW50LnNjc3MiLCJzcmMvYXBwL25vbi1hdXRoZW50aWNhdGlvbi1wYWdlcy9lcnJvci10ZW1wbGF0ZS9ub3QtZm91bmQvbm90LWZvdW5kLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsZ0JBQUE7RUFDQSxjQUFBO0VBQ0Esc0JBQUE7RUFDQSxpQkFBQTtBQ0NGOztBREVBO0VBQ0UsZUFBQTtFQUNBLGlCQUFBO0VBQ0EsbUJBQUE7RUFDQSxjQUFBO0FDQ0YiLCJmaWxlIjoic3JjL2FwcC9ub24tYXV0aGVudGljYXRpb24tcGFnZXMvZXJyb3ItdGVtcGxhdGUvbm90LWZvdW5kL25vdC1mb3VuZC5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIi50aXRsZSB7XG4gIGZvbnQtc2l6ZTogMTAwcHg7XG4gIGNvbG9yOiAjMjM1MjdjO1xuICBsZXR0ZXItc3BhY2luZzogLTAuNXB4O1xuICBsaW5lLWhlaWdodDogMTAwJTtcbn1cblxuLnNtYWxsIHtcbiAgZm9udC1zaXplOiAyMHB4O1xuICBsaW5lLWhlaWdodDogMTAwJTtcbiAgdmVydGljYWwtYWxpZ246IHRvcDtcbiAgY29sb3I6ICMyMzUyN2M7XG59XG4iLCIudGl0bGUge1xuICBmb250LXNpemU6IDEwMHB4O1xuICBjb2xvcjogIzIzNTI3YztcbiAgbGV0dGVyLXNwYWNpbmc6IC0wLjVweDtcbiAgbGluZS1oZWlnaHQ6IDEwMCU7XG59XG5cbi5zbWFsbCB7XG4gIGZvbnQtc2l6ZTogMjBweDtcbiAgbGluZS1oZWlnaHQ6IDEwMCU7XG4gIHZlcnRpY2FsLWFsaWduOiB0b3A7XG4gIGNvbG9yOiAjMjM1MjdjO1xufSJdfQ== */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NotFoundComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-not-found',
                templateUrl: './not-found.component.html',
                styleUrls: ['./not-found.component.scss']
            }]
    }], function () { return []; }, null); })();


/***/ }),

/***/ "./src/app/non-authentication-pages/forgot-password/forgot-password-checking-team/forgot-password-checking-team.component.ts":
/*!***********************************************************************************************************************************!*\
  !*** ./src/app/non-authentication-pages/forgot-password/forgot-password-checking-team/forgot-password-checking-team.component.ts ***!
  \***********************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ForgotPasswordCheckingTeamComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/account.service */ "./src/app/services/account.service.ts"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! ../../../shared/autofocus.directive */ "./src/app/shared/autofocus.directive.ts"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
function ForgotPasswordCheckingTeamComponent_div_11_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelement(1, "small", 15);
    i0.ɵɵelementEnd();
} }
function ForgotPasswordCheckingTeamComponent_div_11_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 13);
    i0.ɵɵtemplate(1, ForgotPasswordCheckingTeamComponent_div_11_div_1_Template, 2, 0, "div", 14);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵnextContext();
    const _r1 = i0.ɵɵreference(8);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", _r1.errors.required);
} }
class ForgotPasswordCheckingTeamComponent {
    constructor(authService, router, accountService) {
        this.authService = authService;
        this.router = router;
        this.accountService = accountService;
        this.checkingTeam = {
            email: '',
            serviceKey: app_constants_1.default.SERVICE_KEY
        };
    }
    ngOnInit() {
    }
    onSubmit() {
        this.authService.getUserTeam(this.checkingTeam).subscribe(res => {
            if (res.status === 200) {
                this.accountService.setSignInEmail(this.checkingTeam.email);
                this.accountService.setUserTeamList(res.data);
                this.router.navigate(['/forgot-password/submit']).then(result => { });
            }
        });
    }
}
exports.ForgotPasswordCheckingTeamComponent = ForgotPasswordCheckingTeamComponent;
ForgotPasswordCheckingTeamComponent.ɵfac = function ForgotPasswordCheckingTeamComponent_Factory(t) { return new (t || ForgotPasswordCheckingTeamComponent)(i0.ɵɵdirectiveInject(i1.AuthService), i0.ɵɵdirectiveInject(i2.Router), i0.ɵɵdirectiveInject(i3.AccountService)); };
ForgotPasswordCheckingTeamComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ForgotPasswordCheckingTeamComponent, selectors: [["app-forgot-password-checking-team"]], decls: 17, vars: 14, consts: [["autocomplete", "off", "role", "form", 3, "ngSubmit"], ["form", "ngForm"], [1, "p-fluid"], [1, "p-field"], [3, "translate"], [1, "p-float-label"], ["id", "sing-in-email", "type", "text", "pInputText", "", "name", "signInEmail", "required", "", 3, "ngModel", "appAutofocus", "maxLength", "ngModelChange"], ["signInEmail", "ngModel"], ["for", "sing-in-email", 3, "translate"], ["class", "p-error p-text-left", 4, "ngIf"], ["pButton", "", "type", "submit", 3, "label"], [1, "p-field", "p-text-center"], ["routerLink", "/login", 2, "font-size", "small", "text-decoration", "none", 3, "translate"], [1, "p-error", "p-text-left"], [4, "ngIf"], ["translate", "validation.input_email"]], template: function ForgotPasswordCheckingTeamComponent_Template(rf, ctx) { if (rf & 1) {
        const _r4 = i0.ɵɵgetCurrentView();
        i0.ɵɵelementStart(0, "form", 0, 1);
        i0.ɵɵlistener("ngSubmit", function ForgotPasswordCheckingTeamComponent_Template_form_ngSubmit_0_listener() { i0.ɵɵrestoreView(_r4); const _r0 = i0.ɵɵreference(1); return _r0.form.valid && ctx.onSubmit(); });
        i0.ɵɵelementStart(2, "div", 2);
        i0.ɵɵelementStart(3, "div", 3);
        i0.ɵɵelement(4, "label", 4);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(5, "div", 3);
        i0.ɵɵelementStart(6, "span", 5);
        i0.ɵɵelementStart(7, "input", 6, 7);
        i0.ɵɵlistener("ngModelChange", function ForgotPasswordCheckingTeamComponent_Template_input_ngModelChange_7_listener($event) { return ctx.checkingTeam.email = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelement(9, "label", 8);
        i0.ɵɵpipe(10, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(11, ForgotPasswordCheckingTeamComponent_div_11_Template, 2, 1, "div", 9);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(12, "div", 3);
        i0.ɵɵelement(13, "button", 10);
        i0.ɵɵpipe(14, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(15, "div", 11);
        i0.ɵɵelement(16, "a", 12);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        const _r0 = i0.ɵɵreference(1);
        const _r1 = i0.ɵɵreference(8);
        i0.ɵɵadvance(4);
        i0.ɵɵproperty("translate", "label.forgot_password_msg");
        i0.ɵɵadvance(3);
        i0.ɵɵclassProp("ng-dirty", _r1.invalid && (_r1.dirty || _r1.touched) || _r0.submitted && _r1.invalid);
        i0.ɵɵproperty("ngModel", ctx.checkingTeam.email)("appAutofocus", true)("maxLength", 64);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("translate", i0.ɵɵpipeBind1(10, 10, "label.enter_email"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", _r1.invalid && (_r1.dirty || _r1.touched) || _r0.submitted && _r1.invalid);
        i0.ɵɵadvance(2);
        i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(14, 12, "button.submit"));
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("translate", "label.back_login");
    } }, directives: [i4.ɵangular_packages_forms_forms_y, i4.NgControlStatusGroup, i4.NgForm, i5.TranslateDirective, i4.DefaultValueAccessor, i6.InputText, i4.RequiredValidator, i4.NgControlStatus, i4.NgModel, i7.AutofocusDirective, i8.NgIf, i9.ButtonDirective, i2.RouterLinkWithHref], pipes: [i5.TranslatePipe], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL25vbi1hdXRoZW50aWNhdGlvbi1wYWdlcy9mb3Jnb3QtcGFzc3dvcmQvZm9yZ290LXBhc3N3b3JkLWNoZWNraW5nLXRlYW0vZm9yZ290LXBhc3N3b3JkLWNoZWNraW5nLXRlYW0uY29tcG9uZW50LnNjc3MifQ== */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ForgotPasswordCheckingTeamComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-forgot-password-checking-team',
                templateUrl: './forgot-password-checking-team.component.html',
                styleUrls: ['./forgot-password-checking-team.component.scss']
            }]
    }], function () { return [{ type: i1.AuthService }, { type: i2.Router }, { type: i3.AccountService }]; }, null); })();


/***/ }),

/***/ "./src/app/non-authentication-pages/forgot-password/forgot-password-submit/forgot-password-submit.component.ts":
/*!*********************************************************************************************************************!*\
  !*** ./src/app/non-authentication-pages/forgot-password/forgot-password-submit/forgot-password-submit.component.ts ***!
  \*********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ForgotPasswordSubmitComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/account.service */ "./src/app/services/account.service.ts"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! primeng/divider */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-divider.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! primeng/table */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-table.js"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
const i10 = tslib_1.__importStar(__webpack_require__(/*! primeng/message */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-message.js"));
function ForgotPasswordSubmitComponent_p_divider_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "p-divider", 8);
    i0.ɵɵelementStart(1, "small");
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵproperty("styleClass", "p-my-2");
    i0.ɵɵadvance(1);
    i0.ɵɵclassProp("p-error", !ctx_r1.selectedTeam);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 4, "label.choose_team_reset_password"));
} }
const _c0 = function () { return { color: "var(--green-500)" }; };
function ForgotPasswordSubmitComponent_p_table_3_ng_template_1_i_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 14);
} if (rf & 2) {
    i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction0(1, _c0));
} }
function ForgotPasswordSubmitComponent_p_table_3_ng_template_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr", 11);
    i0.ɵɵelementStart(1, "td", 12);
    i0.ɵɵelementStart(2, "span");
    i0.ɵɵtext(3);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(4, ForgotPasswordSubmitComponent_p_table_3_ng_template_1_i_4_Template, 1, 2, "i", 13);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const team_r6 = ctx.$implicit;
    const ctx_r5 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("pSelectableRow", team_r6);
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(team_r6.teamName);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r5.selectedTeam && ctx_r5.selectedTeam.teamId === team_r6.teamId);
} }
function ForgotPasswordSubmitComponent_p_table_3_Template(rf, ctx) { if (rf & 1) {
    const _r9 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "p-table", 9);
    i0.ɵɵlistener("selectionChange", function ForgotPasswordSubmitComponent_p_table_3_Template_p_table_selectionChange_0_listener($event) { i0.ɵɵrestoreView(_r9); const ctx_r8 = i0.ɵɵnextContext(); return ctx_r8.selectedTeam = $event; });
    i0.ɵɵtemplate(1, ForgotPasswordSubmitComponent_p_table_3_ng_template_1_Template, 5, 3, "ng-template", 10);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵproperty("value", ctx_r2.userTeamList)("selection", ctx_r2.selectedTeam)("scrollable", ctx_r2.userTeamList && ctx_r2.userTeamList.length > 4)("styleClass", "p-mb-4");
} }
function ForgotPasswordSubmitComponent_div_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 15);
    i0.ɵɵelement(1, "button", 16);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(2, 1, "button.submit"));
} }
function ForgotPasswordSubmitComponent_div_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 15);
    i0.ɵɵelement(1, "p-message", 17);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("text", i0.ɵɵpipeBind1(2, 1, "label.request_reset_password_success_msg"));
} }
class ForgotPasswordSubmitComponent {
    constructor(accountService, router) {
        this.accountService = accountService;
        this.router = router;
        this.isSuccess = false;
    }
    ngOnInit() {
        this.userTeamList = this.accountService.getUserTeamList;
        this.isSuccess = false;
        if (!this.userTeamList || this.userTeamList.length < 1 || !this.accountService.getSignInEmail)
            this.router.navigate(['/forgot-password']).then(result => { });
        if (this.userTeamList && this.userTeamList.length === 1) {
            this.selectedTeam = this.userTeamList[0];
            // auto submit
            this.onSubmit();
        }
    }
    onSubmit() {
        this.forgotPasswordRequest = {
            email: this.accountService.getSignInEmail,
            teamId: this.selectedTeam.teamId
        };
        this.accountService.requestResetPassword(this.forgotPasswordRequest).subscribe(res => {
            if (res.status === 200) {
                this.isSuccess = true;
            }
        });
    }
}
exports.ForgotPasswordSubmitComponent = ForgotPasswordSubmitComponent;
ForgotPasswordSubmitComponent.ɵfac = function ForgotPasswordSubmitComponent_Factory(t) { return new (t || ForgotPasswordSubmitComponent)(i0.ɵɵdirectiveInject(i1.AccountService), i0.ɵɵdirectiveInject(i2.Router)); };
ForgotPasswordSubmitComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ForgotPasswordSubmitComponent, selectors: [["app-forgot-password-submit"]], decls: 9, vars: 5, consts: [["autocomplete", "off", "role", "form", 3, "ngSubmit"], ["form", "ngForm"], ["align", "center", "type", "dashed", 3, "styleClass", 4, "ngIf"], ["selectionMode", "single", "dataKey", "teamId", "scrollHeight", "176.5px", 3, "value", "selection", "scrollable", "styleClass", "selectionChange", 4, "ngIf"], [1, "p-fluid"], ["class", "p-field", 4, "ngIf"], [1, "p-field", "p-text-center"], ["routerLink", "/login", 2, "font-size", "small", "text-decoration", "none", 3, "translate"], ["align", "center", "type", "dashed", 3, "styleClass"], ["selectionMode", "single", "dataKey", "teamId", "scrollHeight", "176.5px", 3, "value", "selection", "scrollable", "styleClass", "selectionChange"], ["pTemplate", "body"], [3, "pSelectableRow"], [1, "p-d-flex", "p-jc-between"], ["class", "fas fa-check p-align-end", 3, "ngStyle", 4, "ngIf"], [1, "fas", "fa-check", "p-align-end", 3, "ngStyle"], [1, "p-field"], ["pButton", "", "type", "submit", 3, "label"], ["severity", "success", 3, "text"]], template: function ForgotPasswordSubmitComponent_Template(rf, ctx) { if (rf & 1) {
        const _r10 = i0.ɵɵgetCurrentView();
        i0.ɵɵelementStart(0, "form", 0, 1);
        i0.ɵɵlistener("ngSubmit", function ForgotPasswordSubmitComponent_Template_form_ngSubmit_0_listener() { i0.ɵɵrestoreView(_r10); const _r0 = i0.ɵɵreference(1); return _r0.form.valid && ctx.selectedTeam && ctx.onSubmit(); });
        i0.ɵɵtemplate(2, ForgotPasswordSubmitComponent_p_divider_2_Template, 4, 6, "p-divider", 2);
        i0.ɵɵtemplate(3, ForgotPasswordSubmitComponent_p_table_3_Template, 2, 4, "p-table", 3);
        i0.ɵɵelementStart(4, "div", 4);
        i0.ɵɵtemplate(5, ForgotPasswordSubmitComponent_div_5_Template, 3, 3, "div", 5);
        i0.ɵɵtemplate(6, ForgotPasswordSubmitComponent_div_6_Template, 3, 3, "div", 5);
        i0.ɵɵelementStart(7, "div", 6);
        i0.ɵɵelement(8, "a", 7);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", !ctx.isSuccess && ctx.userTeamList && ctx.userTeamList.length > 1);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", !ctx.isSuccess && ctx.userTeamList && ctx.userTeamList.length > 1);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", !ctx.isSuccess && ctx.userTeamList && ctx.userTeamList.length > 1);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.isSuccess);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("translate", "label.back_login");
    } }, directives: [i3.ɵangular_packages_forms_forms_y, i3.NgControlStatusGroup, i3.NgForm, i4.NgIf, i2.RouterLinkWithHref, i5.TranslateDirective, i6.Divider, i7.Table, i8.PrimeTemplate, i7.SelectableRow, i4.NgStyle, i9.ButtonDirective, i10.UIMessage], pipes: [i5.TranslatePipe], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL25vbi1hdXRoZW50aWNhdGlvbi1wYWdlcy9mb3Jnb3QtcGFzc3dvcmQvZm9yZ290LXBhc3N3b3JkLXN1Ym1pdC9mb3Jnb3QtcGFzc3dvcmQtc3VibWl0LmNvbXBvbmVudC5zY3NzIn0= */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ForgotPasswordSubmitComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-forgot-password-submit',
                templateUrl: './forgot-password-submit.component.html',
                styleUrls: ['./forgot-password-submit.component.scss']
            }]
    }], function () { return [{ type: i1.AccountService }, { type: i2.Router }]; }, null); })();


/***/ }),

/***/ "./src/app/non-authentication-pages/forgot-password/forgot-password.component.ts":
/*!***************************************************************************************!*\
  !*** ./src/app/non-authentication-pages/forgot-password/forgot-password.component.ts ***!
  \***************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ForgotPasswordComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/__ivy_ngcc__/fesm2015/platform-browser.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
class ForgotPasswordComponent {
    constructor(titleService, translateService) {
        this.titleService = titleService;
        this.translateService = translateService;
        this.translateService.get(['page_title.forgot_password']).subscribe(translation => {
            this.titleService.setTitle(translation['page_title.forgot_password']);
        });
    }
    ngOnInit() {
    }
}
exports.ForgotPasswordComponent = ForgotPasswordComponent;
ForgotPasswordComponent.ɵfac = function ForgotPasswordComponent_Factory(t) { return new (t || ForgotPasswordComponent)(i0.ɵɵdirectiveInject(i1.Title), i0.ɵɵdirectiveInject(i2.TranslateService)); };
ForgotPasswordComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ForgotPasswordComponent, selectors: [["app-forgot-password"]], decls: 6, vars: 3, consts: [[1, "p-grid", "p-mt-6", "p-mx-0", "p-ai-center"], [1, "p-col-12", "p-sm-10", "p-md-8", "p-lg-6", "p-sm-offset-1", "p-md-offset-2", "p-lg-offset-3"], [1, "p-text-center"]], template: function ForgotPasswordComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵelementStart(2, "h3", 2);
        i0.ɵɵtext(3);
        i0.ɵɵpipe(4, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelement(5, "router-outlet");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵadvance(3);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(4, 1, "label.forgot_password"));
    } }, directives: [i3.RouterOutlet], pipes: [i2.TranslatePipe], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL25vbi1hdXRoZW50aWNhdGlvbi1wYWdlcy9mb3Jnb3QtcGFzc3dvcmQvZm9yZ290LXBhc3N3b3JkLmNvbXBvbmVudC5zY3NzIn0= */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ForgotPasswordComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-forgot-password',
                templateUrl: './forgot-password.component.html',
                styleUrls: ['./forgot-password.component.scss']
            }]
    }], function () { return [{ type: i1.Title }, { type: i2.TranslateService }]; }, null); })();


/***/ }),

/***/ "./src/app/non-authentication-pages/non-authentication-footer/non-authentication-footer.component.ts":
/*!***********************************************************************************************************!*\
  !*** ./src/app/non-authentication-pages/non-authentication-footer/non-authentication-footer.component.ts ***!
  \***********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.NonAuthenticationFooterComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
class NonAuthenticationFooterComponent {
    constructor(translateService) {
        this.translateService = translateService;
        this.appUtils = app_util_1.default;
    }
    ngOnInit() {
        this.currentYear = { year: new Date().getFullYear() };
    }
}
exports.NonAuthenticationFooterComponent = NonAuthenticationFooterComponent;
NonAuthenticationFooterComponent.ɵfac = function NonAuthenticationFooterComponent_Factory(t) { return new (t || NonAuthenticationFooterComponent)(i0.ɵɵdirectiveInject(i1.TranslateService)); };
NonAuthenticationFooterComponent.ɵcmp = i0.ɵɵdefineComponent({ type: NonAuthenticationFooterComponent, selectors: [["app-non-authentication-footer"]], decls: 14, vars: 14, consts: [[1, "main-footer"], [1, "main-footer-inner"], ["role", "navigation", 1, "footer-navigation"], [1, "copyright"], ["rel", "noopener noreferrer", 1, "cs-pointer", 3, "translate", "click"]], template: function NonAuthenticationFooterComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵelementStart(2, "ul", 2);
        i0.ɵɵelementStart(3, "li", 3);
        i0.ɵɵelementStart(4, "a", 4);
        i0.ɵɵlistener("click", function NonAuthenticationFooterComponent_Template_a_click_4_listener() { return ctx.appUtils.goToHomePage("about-689cloud", ctx.translateService.currentLang); });
        i0.ɵɵpipe(5, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(6, "li");
        i0.ɵɵelementStart(7, "a", 4);
        i0.ɵɵlistener("click", function NonAuthenticationFooterComponent_Template_a_click_7_listener() { return ctx.appUtils.goToHomePage("privacy-policy", ctx.translateService.currentLang); });
        i0.ɵɵpipe(8, "titlecase");
        i0.ɵɵpipe(9, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(10, "li");
        i0.ɵɵelementStart(11, "a", 4);
        i0.ɵɵlistener("click", function NonAuthenticationFooterComponent_Template_a_click_11_listener() { return ctx.appUtils.goToHomePage("terms-and-conditions", ctx.translateService.currentLang); });
        i0.ɵɵpipe(12, "titlecase");
        i0.ɵɵpipe(13, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵadvance(4);
        i0.ɵɵproperty("translate", i0.ɵɵpipeBind2(5, 3, "label.copy_right", ctx.currentYear));
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("translate", i0.ɵɵpipeBind1(8, 6, i0.ɵɵpipeBind1(9, 8, "label.privacy_policy")));
        i0.ɵɵadvance(4);
        i0.ɵɵproperty("translate", i0.ɵɵpipeBind1(12, 10, i0.ɵɵpipeBind1(13, 12, "label.term_and_condition")));
    } }, directives: [i1.TranslateDirective], pipes: [i1.TranslatePipe, i2.TitleCasePipe], styles: [".main-footer[_ngcontent-%COMP%] {\n  background: #F5F5F5;\n  bottom: 0;\n  left: 0;\n  position: fixed;\n  right: 0;\n}\n\n.main-footer-inner[_ngcontent-%COMP%] {\n  font-size: 11px;\n  line-height: 50px;\n  margin: 0 auto;\n  max-width: 978px;\n}\n\n.main-footer-inner[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%] {\n  border-top: 1px solid #ddd;\n  margin: 0;\n  text-align: center;\n}\n\n.footer-navigation[_ngcontent-%COMP%]   li[_ngcontent-%COMP%] {\n  display: inline-block;\n  margin-right: 10px;\n}\n\n.main-footer-inner[_ngcontent-%COMP%]   a[_ngcontent-%COMP%] {\n  color: #666;\n  outline: 0;\n  text-decoration: none;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvbm9uLWF1dGhlbnRpY2F0aW9uLXBhZ2VzL25vbi1hdXRoZW50aWNhdGlvbi1mb290ZXIvbm9uLWF1dGhlbnRpY2F0aW9uLWZvb3Rlci5jb21wb25lbnQuc2NzcyIsInNyYy9hcHAvbm9uLWF1dGhlbnRpY2F0aW9uLXBhZ2VzL25vbi1hdXRoZW50aWNhdGlvbi1mb290ZXIvbm9uLWF1dGhlbnRpY2F0aW9uLWZvb3Rlci5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLG1CQUFBO0VBQ0EsU0FBQTtFQUNBLE9BQUE7RUFDQSxlQUFBO0VBQ0EsUUFBQTtBQ0NGOztBREVBO0VBQ0UsZUFBQTtFQUNBLGlCQUFBO0VBQ0EsY0FBQTtFQUNBLGdCQUFBO0FDQ0Y7O0FERUE7RUFDRSwwQkFBQTtFQUNBLFNBQUE7RUFDQSxrQkFBQTtBQ0NGOztBREVBO0VBQ0UscUJBQUE7RUFDQSxrQkFBQTtBQ0NGOztBREVBO0VBQ0UsV0FBQTtFQUNBLFVBQUE7RUFDQSxxQkFBQTtBQ0NGIiwiZmlsZSI6InNyYy9hcHAvbm9uLWF1dGhlbnRpY2F0aW9uLXBhZ2VzL25vbi1hdXRoZW50aWNhdGlvbi1mb290ZXIvbm9uLWF1dGhlbnRpY2F0aW9uLWZvb3Rlci5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIi5tYWluLWZvb3RlciB7XG4gIGJhY2tncm91bmQ6ICNGNUY1RjU7XG4gIGJvdHRvbTogMDtcbiAgbGVmdDogMDtcbiAgcG9zaXRpb246IGZpeGVkO1xuICByaWdodDogMDtcbn1cblxuLm1haW4tZm9vdGVyLWlubmVyIHtcbiAgZm9udC1zaXplOiAxMXB4O1xuICBsaW5lLWhlaWdodDogNTBweDtcbiAgbWFyZ2luOiAwIGF1dG87XG4gIG1heC13aWR0aDogOTc4cHg7XG59XG5cbi5tYWluLWZvb3Rlci1pbm5lciB1bCB7XG4gIGJvcmRlci10b3A6IDFweCBzb2xpZCAjZGRkO1xuICBtYXJnaW46IDA7XG4gIHRleHQtYWxpZ246IGNlbnRlcjtcbn1cblxuLmZvb3Rlci1uYXZpZ2F0aW9uIGxpIHtcbiAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xuICBtYXJnaW4tcmlnaHQ6IDEwcHg7XG59XG5cbi5tYWluLWZvb3Rlci1pbm5lciBhIHtcbiAgY29sb3I6ICM2NjY7XG4gIG91dGxpbmU6IDA7XG4gIHRleHQtZGVjb3JhdGlvbjogbm9uZTtcbn1cbiIsIi5tYWluLWZvb3RlciB7XG4gIGJhY2tncm91bmQ6ICNGNUY1RjU7XG4gIGJvdHRvbTogMDtcbiAgbGVmdDogMDtcbiAgcG9zaXRpb246IGZpeGVkO1xuICByaWdodDogMDtcbn1cblxuLm1haW4tZm9vdGVyLWlubmVyIHtcbiAgZm9udC1zaXplOiAxMXB4O1xuICBsaW5lLWhlaWdodDogNTBweDtcbiAgbWFyZ2luOiAwIGF1dG87XG4gIG1heC13aWR0aDogOTc4cHg7XG59XG5cbi5tYWluLWZvb3Rlci1pbm5lciB1bCB7XG4gIGJvcmRlci10b3A6IDFweCBzb2xpZCAjZGRkO1xuICBtYXJnaW46IDA7XG4gIHRleHQtYWxpZ246IGNlbnRlcjtcbn1cblxuLmZvb3Rlci1uYXZpZ2F0aW9uIGxpIHtcbiAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xuICBtYXJnaW4tcmlnaHQ6IDEwcHg7XG59XG5cbi5tYWluLWZvb3Rlci1pbm5lciBhIHtcbiAgY29sb3I6ICM2NjY7XG4gIG91dGxpbmU6IDA7XG4gIHRleHQtZGVjb3JhdGlvbjogbm9uZTtcbn0iXX0= */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NonAuthenticationFooterComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-non-authentication-footer',
                templateUrl: './non-authentication-footer.component.html',
                styleUrls: ['./non-authentication-footer.component.scss']
            }]
    }], function () { return [{ type: i1.TranslateService }]; }, null); })();


/***/ }),

/***/ "./src/app/non-authentication-pages/non-authentication-header/non-authentication-header.component.ts":
/*!***********************************************************************************************************!*\
  !*** ./src/app/non-authentication-pages/non-authentication-header/non-authentication-header.component.ts ***!
  \***********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.NonAuthenticationHeaderComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const _ = tslib_1.__importStar(__webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js"));
const defaultLanguage = tslib_1.__importStar(__webpack_require__(/*! ../../../assets/i18n/en.json */ "./src/assets/i18n/en.json"));
const jaLanguage = tslib_1.__importStar(__webpack_require__(/*! ../../../assets/i18n/ja.json */ "./src/assets/i18n/ja.json"));
const viLanguage = tslib_1.__importStar(__webpack_require__(/*! ../../../assets/i18n/vi.json */ "./src/assets/i18n/vi.json"));
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! primeng/menubar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-menubar.js"));
const _c0 = function () { return { "border-radius": "0px", "border": "none" }; };
class NonAuthenticationHeaderComponent {
    constructor(translate) {
        this.translate = translate;
        this.lang = localStorage.getItem(app_constants_1.default.STORAGE_KEYS.LANGUAGE) ||
            app_util_1.default.getBrowserLang();
    }
    ngOnInit() {
        // 1. Kiểm tra ưu tiên lang từ URL (hash routing format)
        const hashStr = window.location.hash;
        const matchLang = hashStr.match(/[?&]lang=([^&]+)/);
        let urlLang = matchLang ? matchLang[1] : null;
        // Đổi 'vn' trên param URL thành 'vi' để tương thích với config i18n
        if (urlLang === 'vn') {
            urlLang = 'vi';
        }
        if (urlLang) {
            this.lang = urlLang;
            localStorage.setItem(app_constants_1.default.STORAGE_KEYS.LANGUAGE, this.lang);
        }
        console.log('Final this.lang in Header:', this.lang);
        switch (this.lang) {
            case 'ja':
                this.translate.setTranslation('ja', jaLanguage);
                this.translate.setDefaultLang('ja');
                this.translate.use('ja');
                break;
            case 'vi':
                this.translate.setTranslation('vi', viLanguage);
                this.translate.setDefaultLang('vi');
                this.translate.use('vi');
                this.translate.defaultLang = 'vi';
                break;
            default:
                this.translate.setTranslation(this.lang, defaultLanguage);
                this.translate.setDefaultLang('en');
                this.translate.use('en');
                this.lang = 'en';
                break;
        }
        this.translate
            .get(['label.home', 'label.blog', 'label.help'])
            .subscribe((translation) => {
            this.items = [
                {
                    label: translation['label.home'],
                    icon: 'fas fa-home',
                    command: () => {
                        app_util_1.default.goToHomePage('', this.lang);
                    },
                },
                {
                    label: translation['label.blog'],
                    icon: 'fas fa-blog',
                    command: () => {
                        app_util_1.default.goToHomePage('blogs', this.lang);
                    },
                },
                {
                    label: translation['label.help'],
                    icon: 'fas fa-question-circle',
                    command: () => {
                        app_util_1.default.goToHomePage('support-securedrive', this.lang);
                    },
                },
            ];
        });
        this.translate
            .get(['language.en', 'language.ja', 'language.vn'])
            .subscribe((translation) => {
            this.languages = [
                { label: translation['language.en'], code: 'en' },
                { label: translation['language.ja'], code: 'ja' },
                { label: translation['language.vn'], code: 'vi' },
            ];
            this.selectedLang = _.find(this.languages, { code: this.lang });
        });
    }
    onChangeLang(event) {
        if (event) {
            this.translate.setDefaultLang(event.value.code);
            this.translate.use(event.value.code);
            localStorage.setItem(app_constants_1.default.STORAGE_KEYS.LANGUAGE, event.value.code);
            this.lang = event.value.code;
        }
    }
}
exports.NonAuthenticationHeaderComponent = NonAuthenticationHeaderComponent;
NonAuthenticationHeaderComponent.ɵfac = function NonAuthenticationHeaderComponent_Factory(t) { return new (t || NonAuthenticationHeaderComponent)(i0.ɵɵdirectiveInject(i1.TranslateService)); };
NonAuthenticationHeaderComponent.ɵcmp = i0.ɵɵdefineComponent({ type: NonAuthenticationHeaderComponent, selectors: [["app-non-authentication-header"]], decls: 6, vars: 5, consts: [[1, "p-grid", "p-jc-between", "p-ai-center", "top-bar", "p-mx-0", "p-pt-1"], [1, "p-col"], [3, "model", "styleClass"], [1, "p-col", "p-text-center"], ["src", "assets/images/logo.png", "height", "60"], [1, "p-col", "p-jc-end", "p-d-flex"]], template: function NonAuthenticationHeaderComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵelement(2, "p-menubar", 2);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(3, "div", 3);
        i0.ɵɵelement(4, "img", 4);
        i0.ɵɵelementEnd();
        i0.ɵɵelement(5, "div", 5);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵadvance(2);
        i0.ɵɵstyleMap(i0.ɵɵpureFunction0(4, _c0));
        i0.ɵɵproperty("model", ctx.items)("styleClass", "p-p-md-0 p-pl-1");
    } }, directives: [i2.Menubar], styles: [".top-bar[_ngcontent-%COMP%] {\n  background: transparent;\n  color: rgba(0, 0, 0, 0.87);\n  border: 1px solid #e5e5e5;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvbm9uLWF1dGhlbnRpY2F0aW9uLXBhZ2VzL25vbi1hdXRoZW50aWNhdGlvbi1oZWFkZXIvbm9uLWF1dGhlbnRpY2F0aW9uLWhlYWRlci5jb21wb25lbnQuc2NzcyIsInNyYy9hcHAvbm9uLWF1dGhlbnRpY2F0aW9uLXBhZ2VzL25vbi1hdXRoZW50aWNhdGlvbi1oZWFkZXIvbm9uLWF1dGhlbnRpY2F0aW9uLWhlYWRlci5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLHVCQUFBO0VBQ0EsMEJBQUE7RUFDQSx5QkFBQTtBQ0NGIiwiZmlsZSI6InNyYy9hcHAvbm9uLWF1dGhlbnRpY2F0aW9uLXBhZ2VzL25vbi1hdXRoZW50aWNhdGlvbi1oZWFkZXIvbm9uLWF1dGhlbnRpY2F0aW9uLWhlYWRlci5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIi50b3AtYmFyIHtcbiAgYmFja2dyb3VuZDogdHJhbnNwYXJlbnQ7XG4gIGNvbG9yOiByZ2JhKDAsIDAsIDAsIDAuODcpO1xuICBib3JkZXI6IDFweCBzb2xpZCAjZTVlNWU1O1xufVxuIiwiLnRvcC1iYXIge1xuICBiYWNrZ3JvdW5kOiB0cmFuc3BhcmVudDtcbiAgY29sb3I6IHJnYmEoMCwgMCwgMCwgMC44Nyk7XG4gIGJvcmRlcjogMXB4IHNvbGlkICNlNWU1ZTU7XG59Il19 */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NonAuthenticationHeaderComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-non-authentication-header',
                templateUrl: './non-authentication-header.component.html',
                styleUrls: ['./non-authentication-header.component.scss'],
            }]
    }], function () { return [{ type: i1.TranslateService }]; }, null); })();


/***/ }),

/***/ "./src/app/non-authentication-pages/non-authentication-pages-routing.module.ts":
/*!*************************************************************************************!*\
  !*** ./src/app/non-authentication-pages/non-authentication-pages-routing.module.ts ***!
  \*************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.NonAuthenticationPagesRoutingModule = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const router_1 = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js");
const sign_in_component_1 = __webpack_require__(/*! ./sign-in/sign-in.component */ "./src/app/non-authentication-pages/sign-in/sign-in.component.ts");
const non_authentication_pages_component_1 = __webpack_require__(/*! ./non-authentication-pages.component */ "./src/app/non-authentication-pages/non-authentication-pages.component.ts");
const checking_team_component_1 = __webpack_require__(/*! ./sign-in/checking-team/checking-team.component */ "./src/app/non-authentication-pages/sign-in/checking-team/checking-team.component.ts");
const checking_account_component_1 = __webpack_require__(/*! ./sign-in/checking-account/checking-account.component */ "./src/app/non-authentication-pages/sign-in/checking-account/checking-account.component.ts");
const checking_two_factor_component_1 = __webpack_require__(/*! ./sign-in/checking-two-factor/checking-two-factor.component */ "./src/app/non-authentication-pages/sign-in/checking-two-factor/checking-two-factor.component.ts");
const checking_otp_component_1 = __webpack_require__(/*! ./sign-in/checking-otp/checking-otp.component */ "./src/app/non-authentication-pages/sign-in/checking-otp/checking-otp.component.ts");
const download_component_1 = __webpack_require__(/*! ./download/download.component */ "./src/app/non-authentication-pages/download/download.component.ts");
const forgot_password_component_1 = __webpack_require__(/*! ./forgot-password/forgot-password.component */ "./src/app/non-authentication-pages/forgot-password/forgot-password.component.ts");
const forgot_password_checking_team_component_1 = __webpack_require__(/*! ./forgot-password/forgot-password-checking-team/forgot-password-checking-team.component */ "./src/app/non-authentication-pages/forgot-password/forgot-password-checking-team/forgot-password-checking-team.component.ts");
const forgot_password_submit_component_1 = __webpack_require__(/*! ./forgot-password/forgot-password-submit/forgot-password-submit.component */ "./src/app/non-authentication-pages/forgot-password/forgot-password-submit/forgot-password-submit.component.ts");
const reset_password_component_1 = __webpack_require__(/*! ./reset-password/reset-password.component */ "./src/app/non-authentication-pages/reset-password/reset-password.component.ts");
const change_email_component_1 = __webpack_require__(/*! ./change-email/change-email.component */ "./src/app/non-authentication-pages/change-email/change-email.component.ts");
const download_content_component_1 = __webpack_require__(/*! ./download/download-content/download-content.component */ "./src/app/non-authentication-pages/download/download-content/download-content.component.ts");
const internal_server_component_1 = __webpack_require__(/*! ./error-template/internal-server/internal-server.component */ "./src/app/non-authentication-pages/error-template/internal-server/internal-server.component.ts");
const not_found_component_1 = __webpack_require__(/*! ./error-template/not-found/not-found.component */ "./src/app/non-authentication-pages/error-template/not-found/not-found.component.ts");
const sign_up_component_1 = __webpack_require__(/*! ./sign-up/sign-up.component */ "./src/app/non-authentication-pages/sign-up/sign-up.component.ts");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const routes = [
    {
        path: '',
        component: non_authentication_pages_component_1.NonAuthenticationPagesComponent,
        children: [
            {
                path: 'login',
                component: sign_in_component_1.SignInComponent,
                children: [
                    { path: '', component: checking_team_component_1.CheckingTeamComponent },
                    { path: 'checking-account', component: checking_account_component_1.CheckingAccountComponent },
                    { path: 'checking-two-factor', component: checking_two_factor_component_1.CheckingTwoFactorComponent },
                    { path: 'checking-otp', component: checking_otp_component_1.CheckingOtpComponent }
                ]
            },
            {
                path: 'view-link/:printable/:project_id/:link_id',
                component: download_component_1.DownloadComponent,
                children: [
                    { path: '', component: download_content_component_1.DownloadContentComponent },
                    { path: ':folder_id', component: download_content_component_1.DownloadContentComponent }
                ]
            },
            {
                path: 'forgot-password',
                component: forgot_password_component_1.ForgotPasswordComponent,
                children: [
                    { path: '', component: forgot_password_checking_team_component_1.ForgotPasswordCheckingTeamComponent },
                    { path: 'submit', component: forgot_password_submit_component_1.ForgotPasswordSubmitComponent }
                ]
            },
            {
                path: 'reset-password/:reset_code',
                component: reset_password_component_1.ResetPasswordComponent
            },
            {
                path: 'change-email/:reset_code',
                component: change_email_component_1.ChangeEmailComponent
            },
            {
                path: 'error-500',
                component: internal_server_component_1.InternalServerComponent
            },
            {
                path: 'error-404',
                component: not_found_component_1.NotFoundComponent
            },
            {
                path: 'sign-up',
                component: sign_up_component_1.SignUpComponent
            },
        ]
    }
];
class NonAuthenticationPagesRoutingModule {
}
exports.NonAuthenticationPagesRoutingModule = NonAuthenticationPagesRoutingModule;
NonAuthenticationPagesRoutingModule.ɵmod = i0.ɵɵdefineNgModule({ type: NonAuthenticationPagesRoutingModule });
NonAuthenticationPagesRoutingModule.ɵinj = i0.ɵɵdefineInjector({ factory: function NonAuthenticationPagesRoutingModule_Factory(t) { return new (t || NonAuthenticationPagesRoutingModule)(); }, imports: [[router_1.RouterModule.forChild(routes)], router_1.RouterModule] });
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(NonAuthenticationPagesRoutingModule, { imports: [i1.RouterModule], exports: [router_1.RouterModule] }); })();
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NonAuthenticationPagesRoutingModule, [{
        type: core_1.NgModule,
        args: [{
                imports: [router_1.RouterModule.forChild(routes)],
                exports: [router_1.RouterModule]
            }]
    }], null, null); })();


/***/ }),

/***/ "./src/app/non-authentication-pages/non-authentication-pages.component.ts":
/*!********************************************************************************!*\
  !*** ./src/app/non-authentication-pages/non-authentication-pages.component.ts ***!
  \********************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.NonAuthenticationPagesComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! ./non-authentication-header/non-authentication-header.component */ "./src/app/non-authentication-pages/non-authentication-header/non-authentication-header.component.ts"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! ./non-authentication-footer/non-authentication-footer.component */ "./src/app/non-authentication-pages/non-authentication-footer/non-authentication-footer.component.ts"));
class NonAuthenticationPagesComponent {
    constructor() { }
    ngOnInit() {
    }
}
exports.NonAuthenticationPagesComponent = NonAuthenticationPagesComponent;
NonAuthenticationPagesComponent.ɵfac = function NonAuthenticationPagesComponent_Factory(t) { return new (t || NonAuthenticationPagesComponent)(); };
NonAuthenticationPagesComponent.ɵcmp = i0.ɵɵdefineComponent({ type: NonAuthenticationPagesComponent, selectors: [["app-non-authentication-pages"]], decls: 3, vars: 0, template: function NonAuthenticationPagesComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelement(0, "app-non-authentication-header");
        i0.ɵɵelement(1, "router-outlet");
        i0.ɵɵelement(2, "app-non-authentication-footer");
    } }, directives: [i1.NonAuthenticationHeaderComponent, i2.RouterOutlet, i3.NonAuthenticationFooterComponent], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL25vbi1hdXRoZW50aWNhdGlvbi1wYWdlcy9ub24tYXV0aGVudGljYXRpb24tcGFnZXMuY29tcG9uZW50LnNjc3MifQ== */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NonAuthenticationPagesComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-non-authentication-pages',
                templateUrl: './non-authentication-pages.component.html',
                styleUrls: ['./non-authentication-pages.component.scss']
            }]
    }], function () { return []; }, null); })();


/***/ }),

/***/ "./src/app/non-authentication-pages/non-authentication-pages.module.ts":
/*!*****************************************************************************!*\
  !*** ./src/app/non-authentication-pages/non-authentication-pages.module.ts ***!
  \*****************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.NonAuthenticationPagesModule = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const common_1 = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
const ngx_countdown_1 = __webpack_require__(/*! ngx-countdown */ "./node_modules/ngx-countdown/__ivy_ngcc__/fesm2015/ngx-countdown.js");
const inputnumber_1 = __webpack_require__(/*! primeng/inputnumber */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputnumber.js");
const authentication_pages_module_1 = __webpack_require__(/*! ../authentication-pages/authentication-pages.module */ "./src/app/authentication-pages/authentication-pages.module.ts");
const shared_module_1 = __webpack_require__(/*! ../shared/shared.module */ "./src/app/shared/shared.module.ts");
const change_email_component_1 = __webpack_require__(/*! ./change-email/change-email.component */ "./src/app/non-authentication-pages/change-email/change-email.component.ts");
const download_content_component_1 = __webpack_require__(/*! ./download/download-content/download-content.component */ "./src/app/non-authentication-pages/download/download-content/download-content.component.ts");
const download_password_component_1 = __webpack_require__(/*! ./download/download-password/download-password.component */ "./src/app/non-authentication-pages/download/download-password/download-password.component.ts");
const download_component_1 = __webpack_require__(/*! ./download/download.component */ "./src/app/non-authentication-pages/download/download.component.ts");
const internal_server_component_1 = __webpack_require__(/*! ./error-template/internal-server/internal-server.component */ "./src/app/non-authentication-pages/error-template/internal-server/internal-server.component.ts");
const not_found_component_1 = __webpack_require__(/*! ./error-template/not-found/not-found.component */ "./src/app/non-authentication-pages/error-template/not-found/not-found.component.ts");
const forgot_password_checking_team_component_1 = __webpack_require__(/*! ./forgot-password/forgot-password-checking-team/forgot-password-checking-team.component */ "./src/app/non-authentication-pages/forgot-password/forgot-password-checking-team/forgot-password-checking-team.component.ts");
const forgot_password_submit_component_1 = __webpack_require__(/*! ./forgot-password/forgot-password-submit/forgot-password-submit.component */ "./src/app/non-authentication-pages/forgot-password/forgot-password-submit/forgot-password-submit.component.ts");
const forgot_password_component_1 = __webpack_require__(/*! ./forgot-password/forgot-password.component */ "./src/app/non-authentication-pages/forgot-password/forgot-password.component.ts");
const non_authentication_footer_component_1 = __webpack_require__(/*! ./non-authentication-footer/non-authentication-footer.component */ "./src/app/non-authentication-pages/non-authentication-footer/non-authentication-footer.component.ts");
const non_authentication_header_component_1 = __webpack_require__(/*! ./non-authentication-header/non-authentication-header.component */ "./src/app/non-authentication-pages/non-authentication-header/non-authentication-header.component.ts");
const non_authentication_pages_routing_module_1 = __webpack_require__(/*! ./non-authentication-pages-routing.module */ "./src/app/non-authentication-pages/non-authentication-pages-routing.module.ts");
const non_authentication_pages_component_1 = __webpack_require__(/*! ./non-authentication-pages.component */ "./src/app/non-authentication-pages/non-authentication-pages.component.ts");
const reset_password_component_1 = __webpack_require__(/*! ./reset-password/reset-password.component */ "./src/app/non-authentication-pages/reset-password/reset-password.component.ts");
const checking_account_component_1 = __webpack_require__(/*! ./sign-in/checking-account/checking-account.component */ "./src/app/non-authentication-pages/sign-in/checking-account/checking-account.component.ts");
const checking_otp_component_1 = __webpack_require__(/*! ./sign-in/checking-otp/checking-otp.component */ "./src/app/non-authentication-pages/sign-in/checking-otp/checking-otp.component.ts");
const checking_team_component_1 = __webpack_require__(/*! ./sign-in/checking-team/checking-team.component */ "./src/app/non-authentication-pages/sign-in/checking-team/checking-team.component.ts");
const checking_two_factor_component_1 = __webpack_require__(/*! ./sign-in/checking-two-factor/checking-two-factor.component */ "./src/app/non-authentication-pages/sign-in/checking-two-factor/checking-two-factor.component.ts");
const sign_in_component_1 = __webpack_require__(/*! ./sign-in/sign-in.component */ "./src/app/non-authentication-pages/sign-in/sign-in.component.ts");
const sign_up_component_1 = __webpack_require__(/*! ./sign-up/sign-up.component */ "./src/app/non-authentication-pages/sign-up/sign-up.component.ts");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
class NonAuthenticationPagesModule {
}
exports.NonAuthenticationPagesModule = NonAuthenticationPagesModule;
NonAuthenticationPagesModule.ɵmod = i0.ɵɵdefineNgModule({ type: NonAuthenticationPagesModule });
NonAuthenticationPagesModule.ɵinj = i0.ɵɵdefineInjector({ factory: function NonAuthenticationPagesModule_Factory(t) { return new (t || NonAuthenticationPagesModule)(); }, imports: [[
            common_1.CommonModule,
            non_authentication_pages_routing_module_1.NonAuthenticationPagesRoutingModule,
            shared_module_1.SharedModule,
            authentication_pages_module_1.AuthenticationPagesModule,
            ngx_countdown_1.CountdownModule,
            inputnumber_1.InputNumberModule,
            forms_1.FormsModule,
            forms_1.ReactiveFormsModule
        ]] });
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(NonAuthenticationPagesModule, { declarations: [sign_in_component_1.SignInComponent,
        non_authentication_pages_component_1.NonAuthenticationPagesComponent,
        checking_team_component_1.CheckingTeamComponent,
        checking_account_component_1.CheckingAccountComponent,
        checking_two_factor_component_1.CheckingTwoFactorComponent,
        non_authentication_header_component_1.NonAuthenticationHeaderComponent,
        non_authentication_footer_component_1.NonAuthenticationFooterComponent,
        checking_otp_component_1.CheckingOtpComponent,
        download_component_1.DownloadComponent,
        download_content_component_1.DownloadContentComponent,
        forgot_password_component_1.ForgotPasswordComponent,
        forgot_password_checking_team_component_1.ForgotPasswordCheckingTeamComponent,
        forgot_password_submit_component_1.ForgotPasswordSubmitComponent,
        reset_password_component_1.ResetPasswordComponent,
        change_email_component_1.ChangeEmailComponent,
        download_password_component_1.DownloadPasswordComponent,
        internal_server_component_1.InternalServerComponent,
        not_found_component_1.NotFoundComponent,
        sign_up_component_1.SignUpComponent], imports: [common_1.CommonModule,
        non_authentication_pages_routing_module_1.NonAuthenticationPagesRoutingModule,
        shared_module_1.SharedModule,
        authentication_pages_module_1.AuthenticationPagesModule,
        ngx_countdown_1.CountdownModule,
        inputnumber_1.InputNumberModule,
        forms_1.FormsModule,
        forms_1.ReactiveFormsModule], exports: [change_email_component_1.ChangeEmailComponent] }); })();
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NonAuthenticationPagesModule, [{
        type: core_1.NgModule,
        args: [{
                declarations: [
                    sign_in_component_1.SignInComponent,
                    non_authentication_pages_component_1.NonAuthenticationPagesComponent,
                    checking_team_component_1.CheckingTeamComponent,
                    checking_account_component_1.CheckingAccountComponent,
                    checking_two_factor_component_1.CheckingTwoFactorComponent,
                    non_authentication_header_component_1.NonAuthenticationHeaderComponent,
                    non_authentication_footer_component_1.NonAuthenticationFooterComponent,
                    checking_otp_component_1.CheckingOtpComponent,
                    download_component_1.DownloadComponent,
                    download_content_component_1.DownloadContentComponent,
                    forgot_password_component_1.ForgotPasswordComponent,
                    forgot_password_checking_team_component_1.ForgotPasswordCheckingTeamComponent,
                    forgot_password_submit_component_1.ForgotPasswordSubmitComponent,
                    reset_password_component_1.ResetPasswordComponent,
                    change_email_component_1.ChangeEmailComponent,
                    download_password_component_1.DownloadPasswordComponent,
                    internal_server_component_1.InternalServerComponent,
                    not_found_component_1.NotFoundComponent,
                    sign_up_component_1.SignUpComponent
                ],
                imports: [
                    common_1.CommonModule,
                    non_authentication_pages_routing_module_1.NonAuthenticationPagesRoutingModule,
                    shared_module_1.SharedModule,
                    authentication_pages_module_1.AuthenticationPagesModule,
                    ngx_countdown_1.CountdownModule,
                    inputnumber_1.InputNumberModule,
                    forms_1.FormsModule,
                    forms_1.ReactiveFormsModule
                ],
                exports: [
                    change_email_component_1.ChangeEmailComponent
                ]
            }]
    }], null, null); })();


/***/ }),

/***/ "./src/app/non-authentication-pages/reset-password/reset-password.component.ts":
/*!*************************************************************************************!*\
  !*** ./src/app/non-authentication-pages/reset-password/reset-password.component.ts ***!
  \*************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ResetPasswordComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/__ivy_ngcc__/fesm2015/platform-browser.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! ../../services/team-setting.service */ "./src/app/services/team-setting.service.ts"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! ../../services/account.service */ "./src/app/services/account.service.ts"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! primeng/messages */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-messages.js"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! ../../shared/password-form/password-form.component */ "./src/app/shared/password-form/password-form.component.ts"));
function ResetPasswordComponent_div_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 7);
    i0.ɵɵelementStart(1, "span");
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 1, "label.invalid_reset_password_link"));
} }
function ResetPasswordComponent_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 2);
    i0.ɵɵelementStart(1, "p-messages", 3);
    i0.ɵɵtemplate(2, ResetPasswordComponent_div_1_ng_template_2_Template, 4, 3, "ng-template", 4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "div", 5);
    i0.ɵɵelement(4, "a", 6);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("closable", false);
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("translate", "label.back_login");
} }
const _c0 = function (a0) { return { number: a0 }; };
function ResetPasswordComponent_div_2_li_8_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "li", 12);
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("translate", "validation.password_policies.capital")("translateParams", i0.ɵɵpureFunction1(2, _c0, ctx_r3.passwordPolicies.capital));
} }
function ResetPasswordComponent_div_2_li_9_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "li", 12);
} if (rf & 2) {
    const ctx_r4 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("translate", "validation.password_policies.lower")("translateParams", i0.ɵɵpureFunction1(2, _c0, ctx_r4.passwordPolicies.lower));
} }
function ResetPasswordComponent_div_2_li_10_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "li", 12);
} if (rf & 2) {
    const ctx_r5 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("translate", "validation.password_policies.special")("translateParams", i0.ɵɵpureFunction1(2, _c0, ctx_r5.passwordPolicies.special));
} }
function ResetPasswordComponent_div_2_li_11_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "li", 12);
} if (rf & 2) {
    const ctx_r6 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("translate", "validation.password_policies.number")("translateParams", i0.ɵɵpureFunction1(2, _c0, ctx_r6.passwordPolicies.number));
} }
const _c1 = function (a0, a1) { return { min: a0, max: a1 }; };
function ResetPasswordComponent_div_2_Template(rf, ctx) { if (rf & 1) {
    const _r8 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 2);
    i0.ɵɵelementStart(1, "h2", 8);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "div", 9);
    i0.ɵɵelement(5, "h3", 10);
    i0.ɵɵelementStart(6, "ul", 11);
    i0.ɵɵelement(7, "li", 12);
    i0.ɵɵtemplate(8, ResetPasswordComponent_div_2_li_8_Template, 1, 4, "li", 13);
    i0.ɵɵtemplate(9, ResetPasswordComponent_div_2_li_9_Template, 1, 4, "li", 13);
    i0.ɵɵtemplate(10, ResetPasswordComponent_div_2_li_10_Template, 1, 4, "li", 13);
    i0.ɵɵtemplate(11, ResetPasswordComponent_div_2_li_11_Template, 1, 4, "li", 13);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(12, "app-password-form", 14);
    i0.ɵɵlistener("onComplete", function ResetPasswordComponent_div_2_Template_app_password_form_onComplete_12_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r7 = i0.ɵɵnextContext(); return ctx_r7.resetPassword($event); });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(13, "div", 5);
    i0.ɵɵelement(14, "a", 6);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 10, "label.update_password"));
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("translate", "label.password_pattern");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("translate", "validation.password_policies.length")("translateParams", i0.ɵɵpureFunction2(12, _c1, ctx_r1.passwordPolicies.min, ctx_r1.passwordPolicies.max));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r1.passwordPolicies.capital > 0);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r1.passwordPolicies.lower > 0);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r1.passwordPolicies.special > 0);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r1.passwordPolicies.number > 0);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("passwordPolicies", ctx_r1.passwordPolicies);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("translate", "label.back_login");
} }
class ResetPasswordComponent {
    constructor(titleService, router, activatedRoute, teamSettingService, accountService, messageService, translate) {
        this.titleService = titleService;
        this.router = router;
        this.activatedRoute = activatedRoute;
        this.teamSettingService = teamSettingService;
        this.accountService = accountService;
        this.messageService = messageService;
        this.translate = translate;
        this.invalidResetCode = false;
        this.translate.get(['page_title.create_password']).subscribe(translation => {
            this.titleService.setTitle(translation['page_title.create_password']);
        });
    }
    ngOnInit() {
        // Get id from route
        this.activatedRoute.paramMap.subscribe(param => {
            // @ts-ignore
            const { params: { reset_code } } = param;
            if (reset_code) {
                this.resetCode = reset_code;
                this.teamSettingService.getPasswordPolicies(this.resetCode).subscribe(res => {
                    if (res.status === 200) {
                        this.teamSetting = res.data;
                        this.passwordPolicies = JSON.parse(this.teamSetting.passwordSetting);
                    }
                    else {
                        this.router.navigate(['/login']).then(() => {
                        });
                    }
                });
            }
        });
    }
    resetPassword(event) {
        if (event) {
            this.accountService.resetPassword(this.resetCode, event.newPassword, event.confirmNewPassword)
                .subscribe(res => {
                if (res.status === 200) {
                    this.messageService.add({
                        severity: 'success',
                        detail: app_util_1.default.translate(this.translate, 'label.reset_password_success'),
                    });
                    this.router.navigate(['/login']).then(() => {
                    });
                }
            });
        }
    }
}
exports.ResetPasswordComponent = ResetPasswordComponent;
ResetPasswordComponent.ɵfac = function ResetPasswordComponent_Factory(t) { return new (t || ResetPasswordComponent)(i0.ɵɵdirectiveInject(i1.Title), i0.ɵɵdirectiveInject(i2.Router), i0.ɵɵdirectiveInject(i2.ActivatedRoute), i0.ɵɵdirectiveInject(i3.TeamSettingService), i0.ɵɵdirectiveInject(i4.AccountService), i0.ɵɵdirectiveInject(i5.MessageService), i0.ɵɵdirectiveInject(i6.TranslateService)); };
ResetPasswordComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ResetPasswordComponent, selectors: [["app-reset-password"]], decls: 3, vars: 2, consts: [[1, "p-grid", "p-mt-6", "p-mx-0", "p-ai-center"], ["class", "p-col-12 p-sm-10 p-md-8 p-lg-6 p-sm-offset-1 p-md-offset-2 p-lg-offset-3", 4, "ngIf"], [1, "p-col-12", "p-sm-10", "p-md-8", "p-lg-6", "p-sm-offset-1", "p-md-offset-2", "p-lg-offset-3"], ["severity", "error", 3, "closable"], ["pTemplate", ""], [1, "p-field", "p-text-center"], ["routerLink", "/login", 2, "font-size", "small", "text-decoration", "none", 3, "translate"], [1, "fas", "fa-exclamation-triangle", "p-mr-2"], [1, "p-text-center", "p-text-capitalize"], [1, "p-field"], [1, "p-my-0", 3, "translate"], [1, "p-my-0"], [3, "translate", "translateParams"], [3, "translate", "translateParams", 4, "ngIf"], [3, "passwordPolicies", "onComplete"]], template: function ResetPasswordComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵtemplate(1, ResetPasswordComponent_div_1_Template, 5, 2, "div", 1);
        i0.ɵɵtemplate(2, ResetPasswordComponent_div_2_Template, 15, 15, "div", 1);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.invalidResetCode);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.passwordPolicies);
    } }, directives: [i7.NgIf, i8.Messages, i5.PrimeTemplate, i2.RouterLinkWithHref, i6.TranslateDirective, i9.PasswordFormComponent], pipes: [i6.TranslatePipe], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL25vbi1hdXRoZW50aWNhdGlvbi1wYWdlcy9yZXNldC1wYXNzd29yZC9yZXNldC1wYXNzd29yZC5jb21wb25lbnQuc2NzcyJ9 */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ResetPasswordComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-reset-password',
                templateUrl: './reset-password.component.html',
                styleUrls: ['./reset-password.component.scss']
            }]
    }], function () { return [{ type: i1.Title }, { type: i2.Router }, { type: i2.ActivatedRoute }, { type: i3.TeamSettingService }, { type: i4.AccountService }, { type: i5.MessageService }, { type: i6.TranslateService }]; }, null); })();


/***/ }),

/***/ "./src/app/non-authentication-pages/sign-in/checking-account/checking-account.component.ts":
/*!*************************************************************************************************!*\
  !*** ./src/app/non-authentication-pages/sign-in/checking-account/checking-account.component.ts ***!
  \*************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.CheckingAccountComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/account.service */ "./src/app/services/account.service.ts"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! ../../../shared/autofocus.directive */ "./src/app/shared/autofocus.directive.ts"));
const i10 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
const i11 = tslib_1.__importStar(__webpack_require__(/*! primeng/checkbox */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-checkbox.js"));
const i12 = tslib_1.__importStar(__webpack_require__(/*! primeng/messages */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-messages.js"));
const i13 = tslib_1.__importStar(__webpack_require__(/*! ngx-countdown */ "./node_modules/ngx-countdown/__ivy_ngcc__/fesm2015/ngx-countdown.js"));
const i14 = tslib_1.__importStar(__webpack_require__(/*! primeng/divider */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-divider.js"));
const i15 = tslib_1.__importStar(__webpack_require__(/*! primeng/table */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-table.js"));
function CheckingAccountComponent_p_messages_2_ng_template_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 25);
    i0.ɵɵelement(1, "small", 5);
    i0.ɵɵpipe(2, "translate");
} if (rf & 2) {
    const ctx_r7 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("innerHTML", i0.ɵɵpipeBind2(2, 1, "label.password_remain", ctx_r7.remainAttempt), i0.ɵɵsanitizeHtml);
} }
function CheckingAccountComponent_p_messages_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "p-messages", 23);
    i0.ɵɵtemplate(1, CheckingAccountComponent_p_messages_2_ng_template_1_Template, 3, 4, "ng-template", 24);
    i0.ɵɵelementEnd();
} }
const _c0 = function (a0) { return { leftTime: a0 }; };
function CheckingAccountComponent_p_messages_3_ng_template_1_Template(rf, ctx) { if (rf & 1) {
    const _r10 = i0.ɵɵgetCurrentView();
    i0.ɵɵelement(0, "i", 25);
    i0.ɵɵelementStart(1, "small");
    i0.ɵɵelement(2, "span", 27);
    i0.ɵɵelement(3, "br");
    i0.ɵɵelement(4, "span", 27);
    i0.ɵɵelementStart(5, "strong");
    i0.ɵɵelementStart(6, "countdown", 28);
    i0.ɵɵlistener("event", function CheckingAccountComponent_p_messages_3_ng_template_1_Template_countdown_event_6_listener($event) { i0.ɵɵrestoreView(_r10); const ctx_r9 = i0.ɵɵnextContext(2); return ctx_r9.handleCountdownEvent($event); });
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelement(7, "span", 27);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r8 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("translate", "label.account_lock");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("translate", "label.account_lock_try_again_msg");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("config", i0.ɵɵpureFunction1(4, _c0, ctx_r8.singInResponseModel.timeRemain));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("translate", "label.account_lock_contact_admin_msg");
} }
function CheckingAccountComponent_p_messages_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "p-messages", 26);
    i0.ɵɵtemplate(1, CheckingAccountComponent_p_messages_3_ng_template_1_Template, 8, 6, "ng-template", 24);
    i0.ɵɵelementEnd();
} }
function CheckingAccountComponent_p_divider_7_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "p-divider", 29);
    i0.ɵɵelementStart(1, "small");
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r3 = i0.ɵɵnextContext();
    i0.ɵɵproperty("styleClass", "p-my-2");
    i0.ɵɵadvance(1);
    i0.ɵɵclassProp("p-error", !ctx_r3.selectedTeam);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 4, "label.choose_team"));
} }
const _c1 = function () { return { color: "var(--green-500)" }; };
function CheckingAccountComponent_p_table_8_ng_template_1_i_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "i", 36);
} if (rf & 2) {
    i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction0(1, _c1));
} }
function CheckingAccountComponent_p_table_8_ng_template_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tr", 32);
    i0.ɵɵelementStart(1, "td", 33);
    i0.ɵɵelementStart(2, "span", 34);
    i0.ɵɵtext(3);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(4, CheckingAccountComponent_p_table_8_ng_template_1_i_4_Template, 1, 2, "i", 35);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const team_r12 = ctx.$implicit;
    const ctx_r11 = i0.ɵɵnextContext(2);
    i0.ɵɵproperty("pSelectableRow", team_r12);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("title", team_r12.teamName);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(team_r12.teamName);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r11.selectedTeam && ctx_r11.selectedTeam.teamId === team_r12.teamId);
} }
function CheckingAccountComponent_p_table_8_Template(rf, ctx) { if (rf & 1) {
    const _r15 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "p-table", 30);
    i0.ɵɵlistener("selectionChange", function CheckingAccountComponent_p_table_8_Template_p_table_selectionChange_0_listener($event) { i0.ɵɵrestoreView(_r15); const ctx_r14 = i0.ɵɵnextContext(); return ctx_r14.selectedTeam = $event; })("selectionChange", function CheckingAccountComponent_p_table_8_Template_p_table_selectionChange_0_listener() { i0.ɵɵrestoreView(_r15); const ctx_r16 = i0.ɵɵnextContext(); return ctx_r16.singInResponseModel = null; });
    i0.ɵɵtemplate(1, CheckingAccountComponent_p_table_8_ng_template_1_Template, 5, 4, "ng-template", 31);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r4 = i0.ɵɵnextContext();
    i0.ɵɵproperty("value", ctx_r4.userTeamList)("selection", ctx_r4.selectedTeam)("scrollable", ctx_r4.userTeamList && ctx_r4.userTeamList.length > 4)("styleClass", "p-mb-4");
} }
function CheckingAccountComponent_div_15_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelement(1, "small", 39);
    i0.ɵɵelementEnd();
} }
function CheckingAccountComponent_div_15_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 37);
    i0.ɵɵtemplate(1, CheckingAccountComponent_div_15_div_1_Template, 2, 0, "div", 38);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵnextContext();
    const _r5 = i0.ɵɵreference(13);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", _r5.errors.required);
} }
class CheckingAccountComponent {
    constructor(authService, router, accountService, messageService, translateService) {
        this.authService = authService;
        this.router = router;
        this.accountService = accountService;
        this.messageService = messageService;
        this.translateService = translateService;
        this.utils = app_util_1.default;
        this.signInEmail = {
            email: ''
        };
        this.signInModel = {
            email: '',
            passwordHash: '',
            teamId: '',
            keepLogin: false
        };
        this.remainAttempt = {
            numberRemain: 0,
            threshold: 0
        };
    }
    ngOnInit() {
        this.userTeamList = this.authService.userTeams;
        if (!this.userTeamList) {
            this.router.navigate(['/login']).then(result => {
            });
        }
        if (this.userTeamList && this.userTeamList.length > 0) {
            this.selectedTeam = this.userTeamList[0];
            this.signInEmail.email = this.authService.getLoginEmail;
        }
    }
    onSubmit() {
        if (!this.selectedTeam) {
            this.messageService.add({
                severity: 'error',
                detail: this.utils.translate(this.translateService, 'label.choose_team')
            });
            return;
        }
        this.signInModel.teamId = this.selectedTeam.teamId;
        this.signInModel.email = this.signInEmail.email;
        this.authService.login(this.signInModel).subscribe(res => {
            if (res.status === 200) {
                this.singInResponseModel = res.data;
                switch (this.singInResponseModel.type) {
                    case 1:
                        // Login with OTP
                        this.router.navigate(['/login/checking-otp']).then(r => {
                        });
                        this.authService.setOtpToken(this.singInResponseModel.sessionId);
                        this.authService.setKeepLogin(this.signInModel.keepLogin);
                        break;
                    case 2:
                        // change password for first time login or password already expiry
                        this.messageService.add({
                            severity: 'error',
                            detail: app_util_1.default.translate(this.translateService, (this.singInResponseModel.passwordExpire) ? 'label.password_expired' : 'label.change_password_first_time'),
                        });
                        this.router.navigate([`/reset-password/${this.singInResponseModel.sessionId}`]).then(r => {
                        });
                        break;
                    default:
                        if (!this.singInResponseModel.accountLockout) { // login success
                            if (typeof window !== 'undefined' && (window === null || window === void 0 ? void 0 : window.dataLayer)) {
                                window.dataLayer.push({
                                    event: "sign_in_success",
                                });
                            }
                            this.authService.setToken(this.singInResponseModel.sessionId);
                            if (this.authService.redirectUrl) { // redirect URL
                                this.router.navigate([this.authService.redirectUrl]);
                                this.authService.redirectUrl = null;
                            }
                            else {
                                this.router.navigate(['/project']);
                            }
                        }
                        else {
                            this.remainAttempt = undefined;
                        }
                        break;
                }
            }
            else if (res.status === 100 || res.status === 112) {
                // checking remaining time
                this.accountService.getRemainAttemptPassword(this.signInModel).subscribe(resp => {
                    if (resp.status === 200) {
                        this.remainAttempt = resp.data;
                    }
                });
            }
        });
    }
    handleCountdownEvent($event) {
        if ($event && $event.action === 'done') {
            this.singInResponseModel.accountLockout = false;
            this.singInResponseModel.timeRemain = $event.left;
        }
    }
}
exports.CheckingAccountComponent = CheckingAccountComponent;
CheckingAccountComponent.ɵfac = function CheckingAccountComponent_Factory(t) { return new (t || CheckingAccountComponent)(i0.ɵɵdirectiveInject(i1.AuthService), i0.ɵɵdirectiveInject(i2.Router), i0.ɵɵdirectiveInject(i3.AccountService), i0.ɵɵdirectiveInject(i4.MessageService), i0.ɵɵdirectiveInject(i5.TranslateService)); };
CheckingAccountComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CheckingAccountComponent, selectors: [["app-checking-account"]], decls: 28, vars: 25, consts: [["autocomplete", "off", "role", "form", 3, "ngSubmit"], ["form", "ngForm"], ["severity", "warn", 4, "ngIf"], ["severity", "error", 4, "ngIf"], [1, "p-text-center"], [3, "innerHTML"], ["align", "center", "type", "dashed", 3, "styleClass", 4, "ngIf"], ["selectionMode", "single", "dataKey", "teamId", "scrollHeight", "176.5px", 3, "value", "selection", "scrollable", "styleClass", "selectionChange", 4, "ngIf"], [1, "p-fluid", "p-pb-5"], [1, "p-field"], [1, "p-float-label"], ["id", "login-password", "type", "password", "pInputText", "", "name", "password", "required", "", 3, "ngModel", "appAutofocus", "ngModelChange"], ["password", "ngModel"], ["for", "login-password", 3, "translate"], ["class", "p-error p-text-left", 4, "ngIf"], ["pButton", "", "type", "submit", 3, "label"], [1, "p-field-checkbox", "p-jc-center"], ["binary", "true", "inputId", "keepLogin", "name", "keepLogin", 3, "ngModel", "ngModelChange"], ["for", "keepLogin", 3, "translate"], [1, "p-field", "p-text-center"], ["routerLink", "/forgot-password", 2, "font-size", "small", 3, "translate"], [1, "p-field", "p-text-center", "p-mb-6"], ["routerLink", "/login", 2, "font-size", "small", "text-decoration", "none", 3, "translate"], ["severity", "warn"], ["pTemplate", ""], [1, "fas", "fa-exclamation-triangle", "p-mr-2"], ["severity", "error"], [3, "translate"], [3, "config", "event"], ["align", "center", "type", "dashed", 3, "styleClass"], ["selectionMode", "single", "dataKey", "teamId", "scrollHeight", "176.5px", 3, "value", "selection", "scrollable", "styleClass", "selectionChange"], ["pTemplate", "body"], [3, "pSelectableRow"], [1, "p-d-flex", "p-jc-between"], [1, "p-text-truncate", 3, "title"], ["class", "fas fa-check p-align-end", 3, "ngStyle", 4, "ngIf"], [1, "fas", "fa-check", "p-align-end", 3, "ngStyle"], [1, "p-error", "p-text-left"], [4, "ngIf"], ["translate", "validation.input_password"]], template: function CheckingAccountComponent_Template(rf, ctx) { if (rf & 1) {
        const _r18 = i0.ɵɵgetCurrentView();
        i0.ɵɵelementStart(0, "form", 0, 1);
        i0.ɵɵlistener("ngSubmit", function CheckingAccountComponent_Template_form_ngSubmit_0_listener() { i0.ɵɵrestoreView(_r18); const _r0 = i0.ɵɵreference(1); return _r0.form.valid && ctx.onSubmit(); });
        i0.ɵɵtemplate(2, CheckingAccountComponent_p_messages_2_Template, 2, 0, "p-messages", 2);
        i0.ɵɵtemplate(3, CheckingAccountComponent_p_messages_3_Template, 2, 0, "p-messages", 3);
        i0.ɵɵelementStart(4, "div", 4);
        i0.ɵɵelement(5, "label", 5);
        i0.ɵɵpipe(6, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(7, CheckingAccountComponent_p_divider_7_Template, 4, 6, "p-divider", 6);
        i0.ɵɵtemplate(8, CheckingAccountComponent_p_table_8_Template, 2, 4, "p-table", 7);
        i0.ɵɵelementStart(9, "div", 8);
        i0.ɵɵelementStart(10, "div", 9);
        i0.ɵɵelementStart(11, "span", 10);
        i0.ɵɵelementStart(12, "input", 11, 12);
        i0.ɵɵlistener("ngModelChange", function CheckingAccountComponent_Template_input_ngModelChange_12_listener($event) { return ctx.signInModel.passwordHash = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelement(14, "label", 13);
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(15, CheckingAccountComponent_div_15_Template, 2, 1, "div", 14);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(16, "div", 9);
        i0.ɵɵelement(17, "button", 15);
        i0.ɵɵpipe(18, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(19, "div", 9);
        i0.ɵɵelementStart(20, "div", 16);
        i0.ɵɵelementStart(21, "p-checkbox", 17);
        i0.ɵɵlistener("ngModelChange", function CheckingAccountComponent_Template_p_checkbox_ngModelChange_21_listener($event) { return ctx.signInModel.keepLogin = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelement(22, "label", 18);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(23, "div", 19);
        i0.ɵɵelement(24, "a", 20);
        i0.ɵɵpipe(25, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(26, "div", 21);
        i0.ɵɵelement(27, "a", 22);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        const _r0 = i0.ɵɵreference(1);
        const _r5 = i0.ɵɵreference(13);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.remainAttempt && ctx.remainAttempt.numberRemain > 0);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.singInResponseModel == null ? null : ctx.singInResponseModel.accountLockout);
        i0.ɵɵadvance(1);
        i0.ɵɵclassProp("p-field", ctx.userTeamList && ctx.userTeamList.length == 1);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("innerHTML", i0.ɵɵpipeBind2(6, 18, "label.signing_in_as", ctx.signInEmail), i0.ɵɵsanitizeHtml);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.userTeamList && ctx.userTeamList.length > 1);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.userTeamList && ctx.userTeamList.length > 1);
        i0.ɵɵadvance(4);
        i0.ɵɵclassProp("ng-dirty", _r5.invalid && (_r5.dirty || _r5.touched) || _r0.submitted && _r5.invalid);
        i0.ɵɵproperty("ngModel", ctx.signInModel.passwordHash)("appAutofocus", true);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("translate", "label.enter_password");
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", _r5.invalid && (_r5.dirty || _r5.touched) || _r0.submitted && _r5.invalid);
        i0.ɵɵadvance(2);
        i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(18, 21, "button.log_in"));
        i0.ɵɵadvance(4);
        i0.ɵɵproperty("ngModel", ctx.signInModel.keepLogin);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("translate", "label.keep_login");
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("translate", i0.ɵɵpipeBind1(25, 23, "label.reset_password"));
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("translate", "label.back_login");
    } }, directives: [i6.ɵangular_packages_forms_forms_y, i6.NgControlStatusGroup, i6.NgForm, i7.NgIf, i6.DefaultValueAccessor, i8.InputText, i6.RequiredValidator, i6.NgControlStatus, i6.NgModel, i9.AutofocusDirective, i5.TranslateDirective, i10.ButtonDirective, i11.Checkbox, i2.RouterLinkWithHref, i12.Messages, i4.PrimeTemplate, i13.CountdownComponent, i14.Divider, i15.Table, i15.SelectableRow, i7.NgStyle], pipes: [i5.TranslatePipe], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL25vbi1hdXRoZW50aWNhdGlvbi1wYWdlcy9zaWduLWluL2NoZWNraW5nLWFjY291bnQvY2hlY2tpbmctYWNjb3VudC5jb21wb25lbnQuc2NzcyJ9 */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CheckingAccountComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-checking-account',
                templateUrl: './checking-account.component.html',
                styleUrls: ['./checking-account.component.scss']
            }]
    }], function () { return [{ type: i1.AuthService }, { type: i2.Router }, { type: i3.AccountService }, { type: i4.MessageService }, { type: i5.TranslateService }]; }, null); })();


/***/ }),

/***/ "./src/app/non-authentication-pages/sign-in/checking-otp/checking-otp.component.ts":
/*!*****************************************************************************************!*\
  !*** ./src/app/non-authentication-pages/sign-in/checking-otp/checking-otp.component.ts ***!
  \*****************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.CheckingOtpComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! primeng/keyfilter */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-keyfilter.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! ../../../shared/autofocus.directive */ "./src/app/shared/autofocus.directive.ts"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
function CheckingOtpComponent_div_11_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelement(1, "small", 16);
    i0.ɵɵelementEnd();
} }
function CheckingOtpComponent_div_11_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 14);
    i0.ɵɵtemplate(1, CheckingOtpComponent_div_11_div_1_Template, 2, 0, "div", 15);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵnextContext();
    const _r1 = i0.ɵɵreference(9);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", _r1.errors.required);
} }
class CheckingOtpComponent {
    constructor(authService, router) {
        this.authService = authService;
        this.router = router;
        this.otp = {
            code: ''
        };
        this.signInEmail = {
            email: ''
        };
    }
    ngOnInit() {
        if (!this.authService.getOtpToken()) {
            this.router.navigate(['/login']).then(result => {
            });
        }
        this.signInEmail.email = this.authService.getLoginEmail;
    }
    onSubmit() {
        this.authService.loginOpt(this.otp.code, this.authService.keepLogin, this.authService.getOtpToken()).subscribe(res => {
            if (res.status === 200) {
                this.singInResponseModel = res.data;
                switch (this.singInResponseModel.type) {
                    case 2:
                        // change password for first time login or password already expiry
                        this.router.navigate(['/reset-password']);
                        break;
                    default:
                        // login success
                        if (typeof window !== 'undefined' && (window === null || window === void 0 ? void 0 : window.dataLayer)) {
                            window.dataLayer.push({
                                event: "sign_in_success",
                            });
                        }
                        this.authService.setToken(this.singInResponseModel.sessionId);
                        if (this.authService.redirectUrl) { // redirect URL
                            this.router.navigate([this.authService.redirectUrl]);
                            this.authService.redirectUrl = null;
                        }
                        else {
                            this.router.navigate(['/project']);
                        }
                        break;
                }
            }
        });
    }
}
exports.CheckingOtpComponent = CheckingOtpComponent;
CheckingOtpComponent.ɵfac = function CheckingOtpComponent_Factory(t) { return new (t || CheckingOtpComponent)(i0.ɵɵdirectiveInject(i1.AuthService), i0.ɵɵdirectiveInject(i2.Router)); };
CheckingOtpComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CheckingOtpComponent, selectors: [["app-checking-otp"]], decls: 17, vars: 14, consts: [["autocomplete", "off", "role", "form", 3, "ngSubmit"], ["form", "ngForm"], [1, "p-fluid"], [1, "p-text-center", "p-field"], [3, "innerHTML"], [1, "p-field"], [1, "p-float-label"], ["id", "otp-token", "type", "text", "pInputText", "", "name", "otpCode", "required", "", "maxlength", "6", "pKeyFilter", "num", 3, "ngModel", "appAutofocus", "ngModelChange"], ["otpCode", "ngModel"], ["for", "otp-token", 3, "translate"], ["class", "p-error p-text-left", 4, "ngIf"], ["pButton", "", "type", "submit", 3, "label"], [1, "p-field", "p-text-center"], ["routerLink", "/login", 2, "font-size", "small", 3, "translate"], [1, "p-error", "p-text-left"], [4, "ngIf"], ["translate", "validation.input_otp_code"]], template: function CheckingOtpComponent_Template(rf, ctx) { if (rf & 1) {
        const _r4 = i0.ɵɵgetCurrentView();
        i0.ɵɵelementStart(0, "form", 0, 1);
        i0.ɵɵlistener("ngSubmit", function CheckingOtpComponent_Template_form_ngSubmit_0_listener() { i0.ɵɵrestoreView(_r4); const _r0 = i0.ɵɵreference(1); return _r0.form.valid && ctx.onSubmit(); });
        i0.ɵɵelementStart(2, "div", 2);
        i0.ɵɵelementStart(3, "div", 3);
        i0.ɵɵelement(4, "label", 4);
        i0.ɵɵpipe(5, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(6, "div", 5);
        i0.ɵɵelementStart(7, "span", 6);
        i0.ɵɵelementStart(8, "input", 7, 8);
        i0.ɵɵlistener("ngModelChange", function CheckingOtpComponent_Template_input_ngModelChange_8_listener($event) { return ctx.otp.code = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelement(10, "label", 9);
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(11, CheckingOtpComponent_div_11_Template, 2, 1, "div", 10);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(12, "div", 5);
        i0.ɵɵelement(13, "button", 11);
        i0.ɵɵpipe(14, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(15, "div", 12);
        i0.ɵɵelement(16, "a", 13);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        const _r0 = i0.ɵɵreference(1);
        const _r1 = i0.ɵɵreference(9);
        i0.ɵɵadvance(4);
        i0.ɵɵproperty("innerHTML", i0.ɵɵpipeBind2(5, 9, "label.signing_in_as", ctx.signInEmail), i0.ɵɵsanitizeHtml);
        i0.ɵɵadvance(4);
        i0.ɵɵclassProp("ng-dirty", _r1.invalid && (_r1.dirty || _r1.touched) || _r0.submitted && _r1.invalid);
        i0.ɵɵproperty("ngModel", ctx.otp.code)("appAutofocus", true);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("translate", "label.enter_otp_code");
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", _r1.invalid && (_r1.dirty || _r1.touched) || _r0.submitted && _r1.invalid);
        i0.ɵɵadvance(2);
        i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(14, 12, "button.verify_otp_code"));
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("translate", "label.back_login");
    } }, directives: [i3.ɵangular_packages_forms_forms_y, i3.NgControlStatusGroup, i3.NgForm, i3.DefaultValueAccessor, i4.InputText, i3.RequiredValidator, i3.MaxLengthValidator, i5.KeyFilter, i3.NgControlStatus, i3.NgModel, i6.AutofocusDirective, i7.TranslateDirective, i8.NgIf, i9.ButtonDirective, i2.RouterLinkWithHref], pipes: [i7.TranslatePipe], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL25vbi1hdXRoZW50aWNhdGlvbi1wYWdlcy9zaWduLWluL2NoZWNraW5nLW90cC9jaGVja2luZy1vdHAuY29tcG9uZW50LnNjc3MifQ== */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CheckingOtpComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-checking-otp',
                templateUrl: './checking-otp.component.html',
                styleUrls: ['./checking-otp.component.scss']
            }]
    }], function () { return [{ type: i1.AuthService }, { type: i2.Router }]; }, null); })();


/***/ }),

/***/ "./src/app/non-authentication-pages/sign-in/checking-team/checking-team.component.ts":
/*!*******************************************************************************************!*\
  !*** ./src/app/non-authentication-pages/sign-in/checking-team/checking-team.component.ts ***!
  \*******************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.CheckingTeamComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! ../../../services/auth.service */ "./src/app/services/auth.service.ts"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! ../../../shared/autofocus.directive */ "./src/app/shared/autofocus.directive.ts"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
function CheckingTeamComponent_div_9_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelement(1, "small", 15);
    i0.ɵɵelementEnd();
} }
function CheckingTeamComponent_div_9_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 13);
    i0.ɵɵtemplate(1, CheckingTeamComponent_div_9_div_1_Template, 2, 0, "div", 14);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵnextContext();
    const _r1 = i0.ɵɵreference(6);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", _r1.errors.required);
} }
class CheckingTeamComponent {
    constructor(authService, router, activatedRoute) {
        this.authService = authService;
        this.router = router;
        this.activatedRoute = activatedRoute;
        this.checkingTeam = {
            email: '',
            serviceKey: app_constants_1.default.SERVICE_KEY
        };
    }
    ngOnInit() {
        this.checkingTeam.email = '';
        // get current token
        const currentToken = this.authService.token;
        // login as user
        let giraffe = this.activatedRoute.snapshot.queryParamMap.get('giraffe');
        let redirectPath = this.activatedRoute.snapshot.queryParamMap.get('redirectPath');
        console.log("giraffe", giraffe);
        console.log("redirectPath", redirectPath);
        if (giraffe && redirectPath) {
            // decrypt the token & redirectPath
            giraffe = window.atob(giraffe);
            redirectPath = window.atob(redirectPath);
            if (currentToken) {
                this.authService.deleteToken();
            }
            if (typeof window !== 'undefined' && (window === null || window === void 0 ? void 0 : window.dataLayer)) {
                window.dataLayer.push({
                    event: "sign_in_success",
                });
            }
            this.authService.setToken(giraffe);
            // check use_secure_drive
            this.authService.getAuthInfo().subscribe(res => {
                if (res.data) {
                    if (!res.data.useSecureDrive) {
                        // clear user into session
                        this.authService.deleteToken();
                    }
                    else {
                        this.authService.setAuthUser(res.data);
                        window.location.href = redirectPath;
                    }
                }
            });
        }
        if (currentToken) {
            this.router.navigate(['/project']);
        }
    }
    onSubmit() {
        this.authService.getUserTeam(this.checkingTeam).subscribe(res => {
            if (res.status === 200) {
                this.authService.setLoginEmail(this.checkingTeam.email.trim());
                this.authService.setUserTeams(res.data);
                this.router.navigate(['/login/checking-account']).then(result => {
                });
            }
        });
    }
}
exports.CheckingTeamComponent = CheckingTeamComponent;
CheckingTeamComponent.ɵfac = function CheckingTeamComponent_Factory(t) { return new (t || CheckingTeamComponent)(i0.ɵɵdirectiveInject(i1.AuthService), i0.ɵɵdirectiveInject(i2.Router), i0.ɵɵdirectiveInject(i2.ActivatedRoute)); };
CheckingTeamComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CheckingTeamComponent, selectors: [["app-checking-team"]], decls: 18, vars: 17, consts: [["autocomplete", "off", "role", "form", 3, "ngSubmit"], ["form", "ngForm"], [1, "p-fluid"], [1, "p-field"], [1, "p-float-label"], ["id", "sing-in-email", "type", "text", "pInputText", "", "maxlength", "64", "name", "signInEmail", "required", "", 3, "ngModel", "appAutofocus", "ngModelChange"], ["signInEmail", "ngModel"], ["for", "sing-in-email", 3, "translate"], ["class", "p-error p-text-left", 4, "ngIf"], ["pButton", "", "type", "submit", 3, "label"], [1, "p-field", "p-d-flex", "p-justify-between", "p-align-center"], ["routerLink", "/sign-up", 2, "font-size", "small", "text-decoration", "none", 3, "translate"], ["routerLink", "/forgot-password", 2, "font-size", "small", "text-decoration", "none", 3, "translate"], [1, "p-error", "p-text-left"], [4, "ngIf"], ["translate", "validation.input_email"]], template: function CheckingTeamComponent_Template(rf, ctx) { if (rf & 1) {
        const _r4 = i0.ɵɵgetCurrentView();
        i0.ɵɵelementStart(0, "form", 0, 1);
        i0.ɵɵlistener("ngSubmit", function CheckingTeamComponent_Template_form_ngSubmit_0_listener() { i0.ɵɵrestoreView(_r4); const _r0 = i0.ɵɵreference(1); return _r0.form.valid && ctx.onSubmit(); });
        i0.ɵɵelementStart(2, "div", 2);
        i0.ɵɵelementStart(3, "div", 3);
        i0.ɵɵelementStart(4, "span", 4);
        i0.ɵɵelementStart(5, "input", 5, 6);
        i0.ɵɵlistener("ngModelChange", function CheckingTeamComponent_Template_input_ngModelChange_5_listener($event) { return ctx.checkingTeam.email = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelement(7, "label", 7);
        i0.ɵɵpipe(8, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(9, CheckingTeamComponent_div_9_Template, 2, 1, "div", 8);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(10, "div", 3);
        i0.ɵɵelement(11, "button", 9);
        i0.ɵɵpipe(12, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(13, "div", 10);
        i0.ɵɵelement(14, "a", 11);
        i0.ɵɵpipe(15, "translate");
        i0.ɵɵelement(16, "a", 12);
        i0.ɵɵpipe(17, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        const _r0 = i0.ɵɵreference(1);
        const _r1 = i0.ɵɵreference(6);
        i0.ɵɵadvance(5);
        i0.ɵɵclassProp("ng-dirty", _r1.invalid && (_r1.dirty || _r1.touched) || _r0.submitted && _r1.invalid);
        i0.ɵɵproperty("ngModel", ctx.checkingTeam.email)("appAutofocus", true);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("translate", i0.ɵɵpipeBind1(8, 9, "label.enter_email"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", _r1.invalid && (_r1.dirty || _r1.touched) || _r0.submitted && _r1.invalid);
        i0.ɵɵadvance(2);
        i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(12, 11, "button.next"));
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("translate", i0.ɵɵpipeBind1(15, 13, "label.sign_up"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("translate", i0.ɵɵpipeBind1(17, 15, "label.reset_password"));
    } }, directives: [i3.ɵangular_packages_forms_forms_y, i3.NgControlStatusGroup, i3.NgForm, i3.DefaultValueAccessor, i4.InputText, i3.MaxLengthValidator, i3.RequiredValidator, i3.NgControlStatus, i3.NgModel, i5.AutofocusDirective, i6.TranslateDirective, i7.NgIf, i8.ButtonDirective, i2.RouterLinkWithHref], pipes: [i6.TranslatePipe], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL25vbi1hdXRoZW50aWNhdGlvbi1wYWdlcy9zaWduLWluL2NoZWNraW5nLXRlYW0vY2hlY2tpbmctdGVhbS5jb21wb25lbnQuc2NzcyJ9 */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CheckingTeamComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-checking-team',
                templateUrl: './checking-team.component.html',
                styleUrls: ['./checking-team.component.scss']
            }]
    }], function () { return [{ type: i1.AuthService }, { type: i2.Router }, { type: i2.ActivatedRoute }]; }, null); })();


/***/ }),

/***/ "./src/app/non-authentication-pages/sign-in/checking-two-factor/checking-two-factor.component.ts":
/*!*******************************************************************************************************!*\
  !*** ./src/app/non-authentication-pages/sign-in/checking-two-factor/checking-two-factor.component.ts ***!
  \*******************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.CheckingTwoFactorComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
class CheckingTwoFactorComponent {
    constructor(translate) { }
    ngOnInit() {
    }
}
exports.CheckingTwoFactorComponent = CheckingTwoFactorComponent;
CheckingTwoFactorComponent.ɵfac = function CheckingTwoFactorComponent_Factory(t) { return new (t || CheckingTwoFactorComponent)(i0.ɵɵdirectiveInject(i1.TranslateService)); };
CheckingTwoFactorComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CheckingTwoFactorComponent, selectors: [["app-checking-two-factor"]], decls: 2, vars: 0, template: function CheckingTwoFactorComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "p");
        i0.ɵɵtext(1, "checking-two-factor works!");
        i0.ɵɵelementEnd();
    } }, styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL25vbi1hdXRoZW50aWNhdGlvbi1wYWdlcy9zaWduLWluL2NoZWNraW5nLXR3by1mYWN0b3IvY2hlY2tpbmctdHdvLWZhY3Rvci5jb21wb25lbnQuc2NzcyJ9 */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CheckingTwoFactorComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-checking-two-factor',
                templateUrl: './checking-two-factor.component.html',
                styleUrls: ['./checking-two-factor.component.scss']
            }]
    }], function () { return [{ type: i1.TranslateService }]; }, null); })();


/***/ }),

/***/ "./src/app/non-authentication-pages/sign-in/sign-in.component.ts":
/*!***********************************************************************!*\
  !*** ./src/app/non-authentication-pages/sign-in/sign-in.component.ts ***!
  \***********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.SignInComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/__ivy_ngcc__/fesm2015/platform-browser.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
class SignInComponent {
    constructor(titleService, translateService) {
        this.titleService = titleService;
        this.translateService = translateService;
        this.translateService.get(['page_title.login']).subscribe(translation => {
            this.titleService.setTitle(translation['page_title.login']);
        });
    }
    ngOnInit() {
    }
}
exports.SignInComponent = SignInComponent;
SignInComponent.ɵfac = function SignInComponent_Factory(t) { return new (t || SignInComponent)(i0.ɵɵdirectiveInject(i1.Title), i0.ɵɵdirectiveInject(i2.TranslateService)); };
SignInComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SignInComponent, selectors: [["app-sign-in"]], decls: 8, vars: 3, consts: [[1, "p-grid", "p-mt-5", "p-mx-0", "p-ai-center"], [1, "p-d-none", "p-d-md-flex", "p-md-5", "p-lg-4", "p-sm-offset-1", "p-md-offset-1", "p-lg-offset-2"], ["src", "assets/images/sign-in-img.png", 1, "p-pr-5", "p-pb-5", 2, "width", "100%"], [1, "p-col-12", "p-sm-10", "p-md-5", "p-lg-4", "p-sm-offset-1", "p-md-offset-0", "p-p-0"], [1, "p-text-center"]], template: function SignInComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵelement(2, "img", 2);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(3, "div", 3);
        i0.ɵɵelementStart(4, "h3", 4);
        i0.ɵɵtext(5);
        i0.ɵɵpipe(6, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelement(7, "router-outlet");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵadvance(5);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(6, 1, "label.sign_in"));
    } }, directives: [i3.RouterOutlet], pipes: [i2.TranslatePipe], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL25vbi1hdXRoZW50aWNhdGlvbi1wYWdlcy9zaWduLWluL3NpZ24taW4uY29tcG9uZW50LnNjc3MifQ== */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SignInComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-sign-in',
                templateUrl: './sign-in.component.html',
                styleUrls: ['./sign-in.component.scss']
            }]
    }], function () { return [{ type: i1.Title }, { type: i2.TranslateService }]; }, null); })();


/***/ }),

/***/ "./src/app/non-authentication-pages/sign-up/sign-up.component.ts":
/*!***********************************************************************!*\
  !*** ./src/app/non-authentication-pages/sign-up/sign-up.component.ts ***!
  \***********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.SignUpComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
const environment_1 = __webpack_require__(/*! ../../../environments/environment */ "./src/environments/environment.ts");
const aes_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../utilities/aes.util */ "./src/utilities/aes.util.ts"));
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const confirmed_validator_1 = __webpack_require__(/*! ../../../utilities/confirmed.validator */ "./src/utilities/confirmed.validator.ts");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/__ivy_ngcc__/fesm2015/platform-browser.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! ../../services/team.service */ "./src/app/services/team.service.ts"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! ../../services/package.service */ "./src/app/services/package.service.ts"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i9 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputnumber */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputnumber.js"));
const i10 = tslib_1.__importStar(__webpack_require__(/*! primeng/dialog */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dialog.js"));
const i11 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js"));
const i12 = tslib_1.__importStar(__webpack_require__(/*! ../../shared/autofocus.directive */ "./src/app/shared/autofocus.directive.ts"));
const i13 = tslib_1.__importStar(__webpack_require__(/*! primeng/password */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-password.js"));
const i14 = tslib_1.__importStar(__webpack_require__(/*! primeng/checkbox */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-checkbox.js"));
const i15 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
const i16 = tslib_1.__importStar(__webpack_require__(/*! ../../shared/components/payment-card-form/payment-card-form.component */ "./src/app/shared/components/payment-card-form/payment-card-form.component.ts"));
const _c0 = ["paymentCardForm"];
function SignUpComponent_div_6_div_3_div_5_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelement(1, "small", 58);
    i0.ɵɵelementEnd();
} }
function SignUpComponent_div_6_div_3_div_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 57);
    i0.ɵɵtemplate(1, SignUpComponent_div_6_div_3_div_5_div_1_Template, 2, 0, "div", 4);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r19 = i0.ɵɵnextContext(3);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r19.f.firstName.errors.required);
} }
function SignUpComponent_div_6_div_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 20);
    i0.ɵɵelementStart(1, "span", 21);
    i0.ɵɵelement(2, "input", 55);
    i0.ɵɵelement(3, "label", 56);
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(5, SignUpComponent_div_6_div_3_div_5_Template, 2, 1, "div", 42);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r13 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(2);
    i0.ɵɵclassProp("ng-dirty", ctx_r13.f.firstName.invalid && (ctx_r13.f.firstName.dirty || ctx_r13.f.firstName.touched));
    i0.ɵɵproperty("appAutofocus", ctx_r13.lang !== ctx_r13.ja);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("translate", i0.ɵɵpipeBind1(4, 5, "label.first_name"));
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r13.f.firstName.invalid && (ctx_r13.f.firstName.dirty || ctx_r13.f.firstName.touched));
} }
function SignUpComponent_div_6_div_9_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelement(1, "small", 58);
    i0.ɵɵelementEnd();
} }
function SignUpComponent_div_6_div_9_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 57);
    i0.ɵɵtemplate(1, SignUpComponent_div_6_div_9_div_1_Template, 2, 0, "div", 4);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r14 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r14.f.lastName.errors.required);
} }
function SignUpComponent_div_6_div_10_div_5_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelement(1, "small", 58);
    i0.ɵɵelementEnd();
} }
function SignUpComponent_div_6_div_10_div_5_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 57);
    i0.ɵɵtemplate(1, SignUpComponent_div_6_div_10_div_5_div_1_Template, 2, 0, "div", 4);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r22 = i0.ɵɵnextContext(3);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r22.f.firstName.errors.required);
} }
function SignUpComponent_div_6_div_10_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 20);
    i0.ɵɵelementStart(1, "span", 21);
    i0.ɵɵelement(2, "input", 59);
    i0.ɵɵelement(3, "label", 56);
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(5, SignUpComponent_div_6_div_10_div_5_Template, 2, 1, "div", 42);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r15 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(2);
    i0.ɵɵclassProp("ng-dirty", ctx_r15.f.firstName.invalid && (ctx_r15.f.firstName.dirty || ctx_r15.f.firstName.touched));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("translate", i0.ɵɵpipeBind1(4, 4, "label.first_name"));
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r15.f.firstName.invalid && (ctx_r15.f.firstName.dirty || ctx_r15.f.firstName.touched));
} }
function SignUpComponent_div_6_div_16_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelement(1, "small", 58);
    i0.ɵɵelementEnd();
} }
function SignUpComponent_div_6_div_16_div_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelement(1, "small", 60);
    i0.ɵɵelementEnd();
} }
function SignUpComponent_div_6_div_16_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 57);
    i0.ɵɵtemplate(1, SignUpComponent_div_6_div_16_div_1_Template, 2, 0, "div", 4);
    i0.ɵɵtemplate(2, SignUpComponent_div_6_div_16_div_2_Template, 2, 0, "div", 4);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r16 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r16.f.teamEmail.errors.required);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r16.f.teamEmail.errors.pattern);
} }
function SignUpComponent_div_6_div_23_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelement(1, "small", 58);
    i0.ɵɵelementEnd();
} }
function SignUpComponent_div_6_div_23_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 57);
    i0.ɵɵtemplate(1, SignUpComponent_div_6_div_23_div_1_Template, 2, 0, "div", 4);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r17 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r17.f.newPassword.errors.required);
} }
function SignUpComponent_div_6_div_30_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelement(1, "small", 58);
    i0.ɵɵelementEnd();
} }
function SignUpComponent_div_6_div_30_div_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelement(1, "small", 61);
    i0.ɵɵelementEnd();
} }
function SignUpComponent_div_6_div_30_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 57);
    i0.ɵɵtemplate(1, SignUpComponent_div_6_div_30_div_1_Template, 2, 0, "div", 4);
    i0.ɵɵtemplate(2, SignUpComponent_div_6_div_30_div_2_Template, 2, 0, "div", 4);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r18 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r18.f.confirmedPassword.errors.required);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r18.f.confirmedPassword.errors.confirmedValidator);
} }
function SignUpComponent_div_6_Template(rf, ctx) { if (rf & 1) {
    const _r30 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelementStart(1, "form", 38);
    i0.ɵɵlistener("ngSubmit", function SignUpComponent_div_6_Template_form_ngSubmit_1_listener() { i0.ɵɵrestoreView(_r30); const ctx_r29 = i0.ɵɵnextContext(); return ctx_r29.onSubmit(); });
    i0.ɵɵelementStart(2, "div", 29);
    i0.ɵɵtemplate(3, SignUpComponent_div_6_div_3_Template, 6, 7, "div", 39);
    i0.ɵɵelementStart(4, "div", 20);
    i0.ɵɵelementStart(5, "span", 21);
    i0.ɵɵelement(6, "input", 40);
    i0.ɵɵelement(7, "label", 41);
    i0.ɵɵpipe(8, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(9, SignUpComponent_div_6_div_9_Template, 2, 1, "div", 42);
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(10, SignUpComponent_div_6_div_10_Template, 6, 6, "div", 39);
    i0.ɵɵelementStart(11, "div", 20);
    i0.ɵɵelementStart(12, "span", 21);
    i0.ɵɵelement(13, "input", 43);
    i0.ɵɵelement(14, "label", 44);
    i0.ɵɵpipe(15, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(16, SignUpComponent_div_6_div_16_Template, 3, 2, "div", 42);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(17, "div", 20);
    i0.ɵɵelementStart(18, "span", 21);
    i0.ɵɵelement(19, "p-password", 45);
    i0.ɵɵelementStart(20, "label", 46);
    i0.ɵɵtext(21);
    i0.ɵɵpipe(22, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(23, SignUpComponent_div_6_div_23_Template, 2, 1, "div", 42);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(24, "div", 20);
    i0.ɵɵelementStart(25, "span", 21);
    i0.ɵɵelement(26, "p-password", 47);
    i0.ɵɵelementStart(27, "label", 48);
    i0.ɵɵtext(28);
    i0.ɵɵpipe(29, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(30, SignUpComponent_div_6_div_30_Template, 3, 2, "div", 42);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(31, "div", 49);
    i0.ɵɵelement(32, "p-checkbox", 50);
    i0.ɵɵelement(33, "label", 51);
    i0.ɵɵpipe(34, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(35, "div", 20);
    i0.ɵɵelement(36, "button", 52);
    i0.ɵɵpipe(37, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(38, "div", 53);
    i0.ɵɵelement(39, "a", 54);
    i0.ɵɵpipe(40, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("formGroup", ctx_r0.form);
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r0.lang !== "ja");
    i0.ɵɵadvance(3);
    i0.ɵɵclassProp("ng-dirty", ctx_r0.f.lastName.invalid && (ctx_r0.f.lastName.dirty || ctx_r0.f.lastName.touched));
    i0.ɵɵproperty("appAutofocus", ctx_r0.lang === "ja");
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("translate", i0.ɵɵpipeBind1(8, 21, "label.last_name"));
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r0.f.lastName.invalid && (ctx_r0.f.lastName.dirty || ctx_r0.f.lastName.touched));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r0.lang === "ja");
    i0.ɵɵadvance(3);
    i0.ɵɵclassProp("ng-dirty", ctx_r0.f.teamEmail.invalid && (ctx_r0.f.teamEmail.dirty || ctx_r0.f.teamEmail.touched));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("translate", i0.ɵɵpipeBind1(15, 23, "label.enter_email"));
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r0.f.teamEmail.invalid && (ctx_r0.f.teamEmail.dirty || ctx_r0.f.teamEmail.touched));
    i0.ɵɵadvance(5);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(22, 25, "label.enter_password"));
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r0.f.newPassword.invalid && (ctx_r0.f.newPassword.dirty || ctx_r0.f.newPassword.touched));
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("feedback", false);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(29, 27, "label.confirm_password"));
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r0.f.confirmedPassword.invalid && (ctx_r0.f.confirmedPassword.dirty || ctx_r0.f.confirmedPassword.touched));
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("innerHTML", i0.ɵɵpipeBind1(34, 29, "label.agree_term"), i0.ɵɵsanitizeHtml);
    i0.ɵɵadvance(3);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(37, 31, "button.sign_up"));
    i0.ɵɵproperty("disabled", ctx_r0.loading);
    i0.ɵɵadvance(3);
    i0.ɵɵproperty("translate", i0.ɵɵpipeBind1(40, 33, "label.sign_in"));
} }
function SignUpComponent_div_7_Template(rf, ctx) { if (rf & 1) {
    const _r33 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelementStart(1, "app-payment-card-form", 62, 63);
    i0.ɵɵlistener("cardCreated", function SignUpComponent_div_7_Template_app_payment_card_form_cardCreated_1_listener($event) { i0.ɵɵrestoreView(_r33); const ctx_r32 = i0.ɵɵnextContext(); return ctx_r32.onCardCreated($event); })("cancelled", function SignUpComponent_div_7_Template_app_payment_card_form_cancelled_1_listener() { i0.ɵɵrestoreView(_r33); const ctx_r34 = i0.ɵɵnextContext(); return ctx_r34.onCardFormCancelled(); })("confirmPayment", function SignUpComponent_div_7_Template_app_payment_card_form_confirmPayment_1_listener($event) { i0.ɵɵrestoreView(_r33); const ctx_r35 = i0.ɵɵnextContext(); return ctx_r35.onCardConfirmRequest($event); });
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("showTitle", true)("userInfo", ctx_r1.userDetails == null ? null : ctx_r1.userDetails.userInfo);
} }
function SignUpComponent_div_23_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 64);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, "label.first_month_free"), " ");
} }
function SignUpComponent_li_25_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "li", 65);
    i0.ɵɵelementStart(1, "span", 66);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const feature_r36 = ctx.$implicit;
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(3, 1, feature_r36.key, feature_r36.params));
} }
function SignUpComponent_span_27_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "label.show_more_features"));
} }
function SignUpComponent_span_28_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "label.show_less_features"));
} }
function SignUpComponent_div_30_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 67);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "uppercase");
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind1(3, 3, "label.recurring_annual_cost")), " ");
} }
function SignUpComponent_div_31_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 67);
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "uppercase");
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(2, 1, i0.ɵɵpipeBind1(3, 3, "label.recurring_month_cost")), " ");
} }
const _c1 = function () { return { number_months: 12 }; };
function SignUpComponent_ng_container_38_span_10_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "span");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" x ", i0.ɵɵpipeBind2(2, 1, "label.annually_billing_cycle", i0.ɵɵpureFunction0(4, _c1)), " ");
} }
const _c2 = function (a0, a1, a2) { return { currency: a0, price: a1, number_user: a2 }; };
function SignUpComponent_ng_container_38_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "div", 68);
    i0.ɵɵelementStart(2, "span");
    i0.ɵɵtext(3);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "span", 69);
    i0.ɵɵtext(5);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(6, "div", 70);
    i0.ɵɵelementStart(7, "span", 71);
    i0.ɵɵtext(8);
    i0.ɵɵpipe(9, "translate");
    i0.ɵɵtemplate(10, SignUpComponent_ng_container_38_span_10_Template, 3, 5, "span", 4);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const ctx_r8 = i0.ɵɵnextContext();
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(ctx_r8.packageDetail == null ? null : ctx_r8.packageDetail.name);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate2("", ctx_r8.currencyUnit, "", ctx_r8.totalPackagePrice, "");
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(9, 5, "label.summary_sub_text", i0.ɵɵpureFunction3(8, _c2, ctx_r8.currencyUnit, ctx_r8.packagePrice, ctx_r8.numberOfUsers)), " ");
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r8.isAnnuallyBilling);
} }
function SignUpComponent_div_46_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 72);
    i0.ɵɵelement(1, "i", 73);
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(3, 1, "label.no_credit_card_required"), " ");
} }
function SignUpComponent_small_93_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "small", 74);
    i0.ɵɵtext(1, " 30-day free trial ");
    i0.ɵɵelementEnd();
} }
function SignUpComponent_div_94_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 75);
    i0.ɵɵelementStart(1, "div", 76);
    i0.ɵɵelement(2, "i", 77);
    i0.ɵɵelementStart(3, "span");
    i0.ɵɵtext(4);
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(6, "div", 78);
    i0.ɵɵtext(7);
    i0.ɵɵpipe(8, "translate");
    i0.ɵɵelementStart(9, "strong");
    i0.ɵɵtext(10);
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r11 = i0.ɵɵnextContext();
    i0.ɵɵadvance(4);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 3, "label.confirm_payment_information"));
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(8, 5, "label.card_holder_name"), ": ");
    i0.ɵɵadvance(3);
    i0.ɵɵtextInterpolate(ctx_r11.stripeDetails == null ? null : ctx_r11.stripeDetails.form == null ? null : ctx_r11.stripeDetails.form.value == null ? null : ctx_r11.stripeDetails.form.value.holderName);
} }
function SignUpComponent_ng_template_95_Template(rf, ctx) { if (rf & 1) {
    const _r39 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 79);
    i0.ɵɵelementStart(1, "button", 80);
    i0.ɵɵlistener("click", function SignUpComponent_ng_template_95_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r39); const ctx_r38 = i0.ɵɵnextContext(); return ctx_r38.cancelConfirmation(); });
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "button", 81);
    i0.ɵɵlistener("click", function SignUpComponent_ng_template_95_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r39); const ctx_r40 = i0.ɵɵnextContext(); return ctx_r40.stripeDetails ? ctx_r40.confirmCardAndSignUp() : ctx_r40.onSubmit(); });
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r12 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(2, 3, "label.cancel"));
    i0.ɵɵadvance(2);
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(4, 5, "label.ok"));
    i0.ɵɵproperty("loading", ctx_r12.loading);
} }
const _c3 = function (a0) { return { "show-all": a0 }; };
const _c4 = function () { return { width: "100%" }; };
const _c5 = function () { return { width: "450px" }; };
class SignUpComponent {
    constructor(titleService, translateService, messageService, fb, translate, router, route, teamService, packageService) {
        this.titleService = titleService;
        this.translateService = translateService;
        this.messageService = messageService;
        this.fb = fb;
        this.translate = translate;
        this.router = router;
        this.route = route;
        this.teamService = teamService;
        this.packageService = packageService;
        this.form = new forms_1.FormGroup({});
        this.loading = false;
        this.utils = app_util_1.default;
        this.recaptchaKey = environment_1.environment.RECAPTCHA_KEY;
        this.numberOfUsers = 0;
        this.currencyUnit = app_constants_1.default.CURRENCY_UNIT.USD;
        this.packagePrice = 0;
        this.isAnnuallyBilling = false;
        this.totalPackagePrice = 0;
        // Biến để kiểm soát hiển thị form
        this.showSignUpForm = true;
        this.showPaymentForm = false;
        this.isAddCard = false;
        // Biến lưu thông tin đăng ký
        this.signUpParams = null;
        // Thông tin card sau khi người dùng nhập
        this.cardToken = null;
        this.displayConfirmModal = false;
        // Thêm biến lưu trữ thông tin thẻ tạm thời
        this.stripeDetails = null;
        this.packageDetail = null;
        this.showAllFeatures = false;
        this.translateService
            .get(['page_title.signup'])
            .subscribe((translation) => {
            this.titleService.setTitle(translation['page_title.signup']);
        });
    }
    getCurrency() {
        // Priority 1: Follow param on URL
        const queryCurrency = this.route.snapshot.queryParams['currency'];
        if (queryCurrency) {
            if (queryCurrency === 'vn' || queryCurrency === 'vi') {
                return app_constants_1.default.CURRENCY.USD;
            }
            return queryCurrency;
        }
        // Priority 2: According to the current language configuration
        const currentLang = this.translateService.currentLang;
        if (currentLang === 'ja') {
            return app_constants_1.default.CURRENCY.YEN;
        }
        else if (currentLang === 'vi' || currentLang === 'vn') {
            return app_constants_1.default.CURRENCY.USD;
        }
        // Priority 3: Default
        return app_constants_1.default.CURRENCY.USD;
    }
    ngOnInit() {
        this.lang = this.translateService.currentLang;
        this.package =
            this.route.snapshot.queryParams['pk'] || app_constants_1.default.PACKAGE_NAME.STARTER;
        this.billingCycle =
            this.route.snapshot.queryParams['billing_cycle'] ||
                app_constants_1.default.BILLING_CYCLE.MONTHLY;
        this.currency = this.getCurrency();
        console.log('this.currency', this.currency);
        this.isAnnuallyBilling =
            this.billingCycle === app_constants_1.default.BILLING_CYCLE.ANNUALLY;
        this.form = this.fb.group({
            firstName: ['', [forms_1.Validators.required]],
            lastName: ['', [forms_1.Validators.required]],
            teamEmail: [
                '',
                [forms_1.Validators.required, forms_1.Validators.pattern(app_constants_1.default.PATTERNS.EMAIL)],
            ],
            newPassword: ['', [forms_1.Validators.required]],
            confirmedPassword: ['', [forms_1.Validators.required]],
            agreeTerm: [false, [forms_1.Validators.required]],
            numberUsers: [3, [forms_1.Validators.required, forms_1.Validators.min(1)]],
        }, {
            validator: confirmed_validator_1.ConfirmedValidator('newPassword', 'confirmedPassword'),
        });
        this.getPackageDetail();
    }
    /**
     * Kiểm tra xem gói hiện tại có phải là STARTER không.
     * Gói STARTER được hưởng 30 ngày dùng thử miễn phí.
     */
    isStarterPackage() {
        return this.package === app_constants_1.default.PACKAGE_NAME.STARTER;
    }
    /** @deprecated Dùng isStarterPackage() thay thế */
    isDisabledTrial() {
        return this.isStarterPackage();
    }
    /**
     * Tính số tiền phải trả ngay hôm nay.
     * - Gói STARTER: $0 (30 ngày dùng thử miễn phí, không cần thẻ)
     * - Các gói khác: bằng totalPackagePrice đã tính
     */
    get todayTotal() {
        return this.isStarterPackage() ? 0 : this.totalPackagePrice;
    }
    /**
     * Lấy danh sách tính năng của gói hiện tại với các giá trị đã được thay thế
     */
    getCurrentPackageFeatures() {
        const currentPackageName = this.package || 'STARTER';
        const numberOfUsers = this.numberOfUsers || 1;
        const packageFeatures = this.utils.generatePackageFeaturesConfig(currentPackageName, numberOfUsers, this.billingCycle);
        return packageFeatures.features;
    }
    /**
     * Lấy danh sách tính năng hiển thị (3 tính năng đầu hoặc tất cả)
     */
    getVisibleFeatures() {
        const features = this.getCurrentPackageFeatures();
        if (this.showAllFeatures) {
            return features;
        }
        else {
            return features.slice(0, 4);
        }
    }
    /**
     * Chuyển đổi trạng thái hiển thị tất cả tính năng
     */
    toggleFeatures() {
        this.showAllFeatures = !this.showAllFeatures;
    }
    /**
     * Handle show modal confirm request when user click confirm button
     * @param cardDetails Thông tin thẻ được nhập từ component payment-card-form
     */
    onCardConfirmRequest(cardDetails) {
        console.log('Card details for confirmation:', cardDetails);
        this.stripeDetails = cardDetails;
        // Hiển thị modal xác nhận
        this.displayConfirmModal = true;
    }
    /**
     * Confirm to create card amd sign up
     */
    confirmCardAndSignUp() {
        // Ẩn modal xác nhận
        this.displayConfirmModal = false;
        if (this.stripeDetails) {
            // Reference tới component payment-card-form để gọi phương thức processCardPayment
            if (this.stripeDetails && this.paymentCardForm) {
                const paymentCardComponent = this.paymentCardForm;
                paymentCardComponent.processCardPayment(this.stripeDetails);
            }
        }
    }
    /**
     * Tính tổng giá gói dịch vụ dựa theo số người dùng
     * Công thức: pricePerUser * minUsers + (additionalUsers * pricePerUser)
     */
    calculateTotalPackagePrice(packageDetail) {
        // Lưu giá mỗi người dùng để hiển thị trong UI
        // this.packagePrice = packageDetail.price;
        // Khởi tạo số người dùng nếu chưa có
        if (!this.numberOfUsers || this.numberOfUsers < packageDetail.minimumUser) {
            this.numberOfUsers = packageDetail.minimumUser;
            // Cập nhật form control nếu cần
            if (this.form && this.form.get('numberUsers')) {
                this.form.get('numberUsers').setValue(this.numberOfUsers);
            }
        }
        // Lấy số người dùng, đảm bảo không nhỏ hơn số tối thiểu
        const usersCount = Math.max(this.numberOfUsers, packageDetail.minimumUser);
        // Tính giá cơ bản: pricePerUser * minUsers
        let basePrice = packageDetail.price * packageDetail.minimumUser;
        // Tính giá cho thêm người dùng
        let additionalPrice = 0;
        if (usersCount > packageDetail.minimumUser) {
            const additionalUsers = usersCount - packageDetail.minimumUser;
            additionalPrice = additionalUsers * packageDetail.price;
        }
        // Tổng giá = giá cơ bản + giá bổ sung
        let totalPrice = basePrice + additionalPrice;
        // Nhân với 12 tháng
        if (this.isAnnuallyBilling) {
            totalPrice = totalPrice * 12;
        }
        // Làm tròn đến 2 chữ số thập phân
        this.totalPackagePrice = Math.round(totalPrice * 100) / 100;
        console.log('Total price calculated:', this.totalPackagePrice, 'for', this.numberOfUsers, 'users');
        return this.totalPackagePrice;
    }
    getPackageDetail() {
        if (!this.package || !this.billingCycle || !this.currency) {
            console.error('Missing required parameters for package detail');
            return;
        }
        const params = {
            pricing_code: this.package,
            billing_cycle: this.billingCycle,
            currency: this.currency,
            console_type: 'SECURE_DRIVE',
        };
        this.packageService.getPackageDetail(params).subscribe((res) => {
            if (res.status === 200) {
                this.packageDetail = res.data;
                // Update currencyUnit based on the response
                this.currencyUnit =
                    app_constants_1.default.CURRENCY_UNIT[res.data.currency] ||
                        app_constants_1.default.CURRENCY_UNIT.USD;
                const packageDetail = res.data;
                this.packagePrice = packageDetail.price;
                this.calculateTotalPackagePrice(packageDetail);
            }
            else {
                this.messageService.add({
                    severity: 'error',
                    detail: this.utils.translate(this.translate, 'default_toast.package_detail_error'),
                });
            }
        }, (error) => {
            this.loading = false;
            console.error('Error getting package details:', error);
            this.messageService.add({
                severity: 'error',
                detail: this.utils.translate(this.translate, 'default_toast.package_detail_error'),
            });
        });
    }
    updateNumberOfUsers(event) {
        // Cập nhật giá trị numberOfUsers
        this.numberOfUsers = event.value;
        // / Tính lại tổng giá chỉ khi có packageDetail
        if (this.packageDetail) {
            this.calculateTotalPackagePrice(this.packageDetail);
        }
        else {
            console.warn('Package detail is not available yet');
            // Có thể gọi lại getPackageDetail() nếu cần
        }
    }
    get f() {
        return this.form.controls;
    }
    /**
     * Xử lý khi người dùng nhập card thành công
     */
    onCardCreated(cardData) {
        console.log('Card data received:', cardData);
        this.cardToken = cardData;
        console.log('Card token:', this.cardToken);
        // Thêm card token vào params đăng ký
        if (this.signUpParams) {
            this.signUpParams.card_token = this.cardToken.id;
            // Tiến hành đăng ký với thông tin card
            this.completeSignUp();
        }
    }
    /**
     * Hủy form nhập card
     */
    onCardFormCancelled() {
        this.showSignUpForm = true;
        this.showPaymentForm = false;
        this.isAddCard = false;
        this.loading = false;
    }
    /**
     * Kiểm tra form và hiển thị modal xác nhận
     */
    showConfirmation() {
        this.form.controls.firstName.setValue(this.f.firstName.value.trim());
        this.form.controls.lastName.setValue(this.f.lastName.value.trim());
        this.form.markAllAsTouched();
        if (this.form.invalid || this.loading || !this.f.agreeTerm.value) {
            return;
        }
        // Hiển thị modal xác nhận
        this.displayConfirmModal = true;
    }
    /**
     * Hủy modal xác nhận
     */
    cancelConfirmation() {
        this.displayConfirmModal = false;
    }
    onSubmit() {
        this.form.controls.firstName.setValue(this.f.firstName.value.trim());
        this.form.controls.lastName.setValue(this.f.lastName.value.trim());
        this.form.markAllAsTouched();
        if (this.form.invalid || this.loading || !this.f.agreeTerm.value) {
            return;
        }
        const currentTimeZoneOffsetInHours = 0 - new Date().getTimezoneOffset() / 60;
        const params = {
            company_id: environment_1.environment.default_company_id,
            email_address: this.f.teamEmail.value,
            first_name: this.f.firstName.value,
            last_name: this.f.lastName.value,
            password_hash: aes_util_1.default.hashMD5(this.f.confirmedPassword.value),
            confirm_password: aes_util_1.default.hashMD5(this.f.confirmedPassword.value),
            time_zone: currentTimeZoneOffsetInHours,
            use_secure_drive: true,
            use_secure_mail: false,
            code: this.package,
            billing_cycle: this.billingCycle,
            currency: this.currency,
            number_of_user: this.numberOfUsers,
            console_type: 'SECURE_DRIVE',
        };
        this.signUpParams = params;
        console.log('this.package', this.package);
        if (this.package === app_constants_1.default.PACKAGE_NAME.STARTER) {
            this.completeSignUp();
        }
        else {
            // If the package is not STARTER, show payment form to enter card
            this.showSignUpForm = false;
            this.showPaymentForm = true;
            this.isAddCard = true;
        }
    }
    /**
     * Hoàn tất đăng ký
     */
    completeSignUp() {
        // Update signUpParams with the number of users
        if (this.signUpParams) {
            this.signUpParams.number_of_user = this.numberOfUsers;
        }
        this.loading = true;
        this.teamService.signUpTeam(this.signUpParams).subscribe((res) => {
            if (res.status === 200) {
                this.messageService.add({
                    severity: 'success',
                    detail: this.utils.translate(this.translate, 'default_toast.signup_success'),
                });
                this.router.navigate(['/sign-in']);
                if (typeof window !== 'undefined' && (window === null || window === void 0 ? void 0 : window.dataLayer)) {
                    window.dataLayer.push({
                        event: "sign_up_success",
                    });
                }
            }
            else {
                this.messageService.add({
                    severity: 'error',
                    detail: res.message ||
                        this.utils.translate(this.translate, 'default_toast.signup_error'),
                });
            }
            this.loading = false;
        }, (error) => {
            console.error('Sign up error:', error);
            this.messageService.add({
                severity: 'error',
                detail: this.utils.translate(this.translate, 'default_toast.signup_error'),
            });
            this.loading = false;
        });
    }
    resolved(captchaResponse) {
        this.captchaResponse = captchaResponse;
    }
}
exports.SignUpComponent = SignUpComponent;
SignUpComponent.ɵfac = function SignUpComponent_Factory(t) { return new (t || SignUpComponent)(i0.ɵɵdirectiveInject(i1.Title), i0.ɵɵdirectiveInject(i2.TranslateService), i0.ɵɵdirectiveInject(i3.MessageService), i0.ɵɵdirectiveInject(i4.FormBuilder), i0.ɵɵdirectiveInject(i2.TranslateService), i0.ɵɵdirectiveInject(i5.Router), i0.ɵɵdirectiveInject(i5.ActivatedRoute), i0.ɵɵdirectiveInject(i6.TeamService), i0.ɵɵdirectiveInject(i7.PackageService)); };
SignUpComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SignUpComponent, selectors: [["app-sign-up"]], viewQuery: function SignUpComponent_Query(rf, ctx) { if (rf & 1) {
        i0.ɵɵviewQuery(_c0, 1);
    } if (rf & 2) {
        let _t;
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.paymentCardForm = _t.first);
    } }, decls: 96, vars: 88, consts: [[1, "p-d-flex", "p-jc-center", "p-w-100"], [1, "p-grid", "p-mt-5", "p-shadow-3", "p-border-round", "p-ai-stretch", "p-p-5", "p-d-flex", "p-flex-column-reverse", "p-flex-md-row", 2, "width", "90%", "max-width", "1000px", "min-height", "500px"], [1, "p-col-12", "p-sm-10", "p-md-6", "p-lg-6"], [1, "p-text-center"], [4, "ngIf"], [1, "p-col-12", "p-sm-10", "p-md-1", "p-lg-1", "p-md-d-block", "p-d-none", "p-d-md-flex", "p-jc-center", "p-ai-stretch", 2, "height", "100%"], [2, "width", "1px", "background", "#e0e0e0", "height", "100%", "min-height", "450px", "margin", "0 12px"], [1, "p-col-12", "p-sm-10", "p-md-4", "p-lg-4", "p-d-flex", "p-w-100"], [1, "p-mb-3", 2, "width", "100%"], [1, "p-mb-2", 2, "font-size", "1rem"], [1, "p-text-bold", "p-mb-2", 2, "font-size", "1.5rem"], [1, "p-mb-3"], [1, "p-text-secondary", 2, "font-size", "1.25rem"], [1, "p-text-secondary", 2, "font-size", "1rem"], ["class", "p-mt-2", "style", "font-size: 0.95rem; font-style: italic; font-weight: 500", 4, "ngIf"], [1, "p-mb-3", "p-pl-0", "features", 2, "list-style", "none", 3, "ngClass"], ["class", "", 4, "ngFor", "ngForOf"], [1, "feature-toggle", "p-text-primary", 2, "color", "#2196f3", "cursor", "pointer", "font-size", "15px", 3, "click"], [1, "p-my-3"], ["class", "p-text-secondary p-mb-2", 4, "ngIf"], [1, "p-field"], [1, "p-float-label"], ["id", "numberUsers", 3, "min", "ngModel", "disabled", "showButtons", "inputStyle", "ngModelChange", "onInput"], ["for", "numberUsers"], [1, "p-mb-2"], [1, "p-bg-blue-50", "p-d-flex", "p-jc-between", "p-ai-center", "p-border-round", "p-text-bold", "p-mt-3"], [2, "font-size", "1.5rem"], ["class", "p-mt-2", "style", "font-size: 0.8rem; color: #888; font-style: italic", 4, "ngIf"], ["styleClass", "payment-confirmation-dialog", 3, "visible", "header", "modal", "closable", "draggable", "resizable", "visibleChange"], [1, "p-fluid"], [1, "p-text-center", "p-mb-4"], [1, "confirmation-table"], [1, "label"], [1, "value"], [1, "total-row"], ["style", "\n                font-size: 0.75rem;\n                color: #888;\n                display: block;\n                font-style: italic;\n              ", 4, "ngIf"], ["class", "card-info-container p-mt-3", 4, "ngIf"], ["pTemplate", "footer"], ["role", "form", "autocomplete", "off", 3, "formGroup", "ngSubmit"], ["class", "p-field", 4, "ngIf"], ["id", "lastName", "name", "lastName", "formControlName", "lastName", "maxlength", "64", "pInputText", "", "required", "", "type", "text", 3, "appAutofocus"], ["for", "lastName", 3, "translate"], ["class", "p-error p-text-left", 4, "ngIf"], ["id", "teamEmail", "name", "teamEmail", "formControlName", "teamEmail", "maxlength", "64", "pInputText", "", "required", "", "type", "text"], ["for", "teamEmail", 3, "translate"], ["id", "new-password", "formControlName", "newPassword", "toggleMask", "true"], ["for", "new-password"], ["id", "confirmedPassword", "formControlName", "confirmedPassword", "toggleMask", "true", 3, "feedback"], ["for", "confirmedPassword"], [1, "p-field-checkbox"], ["name", "agreeTerm", "binary", "true", "formControlName", "agreeTerm", "inputId", "agreeTerm"], ["for", "agreeTerm", 1, "cs-pointer", 3, "innerHTML"], ["pButton", "", "type", "submit", 3, "label", "disabled"], [1, "p-field", "p-text-center", "p-pb-3"], ["routerLink", "/signin", 2, "font-size", "small", "text-decoration", "none", 3, "translate"], ["id", "firstName", "name", "firstName", "formControlName", "firstName", "maxlength", "64", "pInputText", "", "required", "", "type", "text", 3, "appAutofocus"], ["for", "firstName", 3, "translate"], [1, "p-error", "p-text-left"], ["translate", "validation.require"], ["id", "firstName", "name", "firstName", "formControlName", "firstName", "maxlength", "64", "pInputText", "", "required", "", "type", "text"], ["translate", "validation.email_format"], ["translate", "validation.confirm_password"], [3, "showTitle", "userInfo", "cardCreated", "cancelled", "confirmPayment"], ["paymentCardForm", ""], [1, "p-mt-2", 2, "font-size", "0.95rem", "font-style", "italic", "font-weight", "500"], [1, ""], [2, "line-height", "1.5"], [1, "p-text-secondary", "p-mb-2"], [1, "p-d-flex", "p-jc-between", "p-mb-1"], [1, "p-text-bold"], [1, "p-text-secondary", "p-mb-2", 2, "font-size", "0.95rem"], [2, "font-size", "14px"], [1, "p-mt-2", 2, "font-size", "0.8rem", "color", "#888", "font-style", "italic"], [1, "pi", "pi-info-circle", 2, "font-size", "0.8rem"], [2, "font-size", "0.75rem", "color", "#888", "display", "block", "font-style", "italic"], [1, "card-info-container", "p-mt-3"], [1, "card-info-header"], [1, "pi", "pi-credit-card"], [1, "card-holder-name"], [1, "p-d-flex", "p-jc-center", "button-container"], ["pButton", "", "type", "button", 1, "p-button-outlined", "p-mr-3", 3, "label", "click"], ["pButton", "", "type", "button", 1, "p-button-primary", 3, "loading", "label", "click"]], template: function SignUpComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵelementStart(2, "div", 2);
        i0.ɵɵelementStart(3, "h3", 3);
        i0.ɵɵtext(4);
        i0.ɵɵpipe(5, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(6, SignUpComponent_div_6_Template, 41, 35, "div", 4);
        i0.ɵɵtemplate(7, SignUpComponent_div_7_Template, 3, 2, "div", 4);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(8, "div", 5);
        i0.ɵɵelement(9, "div", 6);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(10, "div", 7);
        i0.ɵɵelementStart(11, "div", 8);
        i0.ɵɵelementStart(12, "div", 9);
        i0.ɵɵtext(13);
        i0.ɵɵpipe(14, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(15, "div", 10);
        i0.ɵɵtext(16);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(17, "div", 11);
        i0.ɵɵelementStart(18, "span", 12);
        i0.ɵɵtext(19);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(20, "span", 13);
        i0.ɵɵtext(21);
        i0.ɵɵpipe(22, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(23, SignUpComponent_div_23_Template, 3, 3, "div", 14);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(24, "ul", 15);
        i0.ɵɵtemplate(25, SignUpComponent_li_25_Template, 4, 4, "li", 16);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(26, "a", 17);
        i0.ɵɵlistener("click", function SignUpComponent_Template_a_click_26_listener() { return ctx.toggleFeatures(); });
        i0.ɵɵtemplate(27, SignUpComponent_span_27_Template, 3, 3, "span", 4);
        i0.ɵɵtemplate(28, SignUpComponent_span_28_Template, 3, 3, "span", 4);
        i0.ɵɵelementEnd();
        i0.ɵɵelement(29, "hr", 18);
        i0.ɵɵtemplate(30, SignUpComponent_div_30_Template, 4, 5, "div", 19);
        i0.ɵɵtemplate(31, SignUpComponent_div_31_Template, 4, 5, "div", 19);
        i0.ɵɵelementStart(32, "div", 20);
        i0.ɵɵelementStart(33, "span", 21);
        i0.ɵɵelementStart(34, "p-inputNumber", 22);
        i0.ɵɵlistener("ngModelChange", function SignUpComponent_Template_p_inputNumber_ngModelChange_34_listener($event) { return ctx.numberOfUsers = $event; })("onInput", function SignUpComponent_Template_p_inputNumber_onInput_34_listener($event) { return ctx.updateNumberOfUsers($event); });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(35, "label", 23);
        i0.ɵɵtext(36);
        i0.ɵɵpipe(37, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(38, SignUpComponent_ng_container_38_Template, 11, 12, "ng-container", 4);
        i0.ɵɵelement(39, "hr", 24);
        i0.ɵɵelementStart(40, "div", 25);
        i0.ɵɵelementStart(41, "span", 26);
        i0.ɵɵtext(42);
        i0.ɵɵpipe(43, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(44, "span", 26);
        i0.ɵɵtext(45);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(46, SignUpComponent_div_46_Template, 4, 3, "div", 27);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(47, "p-dialog", 28);
        i0.ɵɵlistener("visibleChange", function SignUpComponent_Template_p_dialog_visibleChange_47_listener($event) { return ctx.displayConfirmModal = $event; });
        i0.ɵɵpipe(48, "translate");
        i0.ɵɵelementStart(49, "div", 29);
        i0.ɵɵelementStart(50, "h3", 30);
        i0.ɵɵtext(51);
        i0.ɵɵpipe(52, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(53, "table", 31);
        i0.ɵɵelementStart(54, "tbody");
        i0.ɵɵelementStart(55, "tr");
        i0.ɵɵelementStart(56, "td", 32);
        i0.ɵɵtext(57);
        i0.ɵɵpipe(58, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(59, "td", 33);
        i0.ɵɵtext(60);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(61, "tr");
        i0.ɵɵelementStart(62, "td", 32);
        i0.ɵɵtext(63);
        i0.ɵɵpipe(64, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(65, "td", 33);
        i0.ɵɵtext(66);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(67, "tr");
        i0.ɵɵelementStart(68, "td", 32);
        i0.ɵɵtext(69);
        i0.ɵɵpipe(70, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(71, "td", 33);
        i0.ɵɵtext(72);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(73, "tr");
        i0.ɵɵelementStart(74, "td", 32);
        i0.ɵɵtext(75);
        i0.ɵɵpipe(76, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(77, "td", 33);
        i0.ɵɵtext(78);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(79, "tr");
        i0.ɵɵelementStart(80, "td", 32);
        i0.ɵɵtext(81);
        i0.ɵɵpipe(82, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(83, "td", 33);
        i0.ɵɵtext(84);
        i0.ɵɵpipe(85, "translate");
        i0.ɵɵpipe(86, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(87, "tr", 34);
        i0.ɵɵelementStart(88, "td", 32);
        i0.ɵɵtext(89);
        i0.ɵɵpipe(90, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(91, "td", 33);
        i0.ɵɵtext(92);
        i0.ɵɵtemplate(93, SignUpComponent_small_93_Template, 2, 0, "small", 35);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(94, SignUpComponent_div_94_Template, 11, 7, "div", 36);
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(95, SignUpComponent_ng_template_95_Template, 5, 7, "ng-template", 37);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵadvance(4);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 53, "label.sign_up"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.showSignUpForm);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.showPaymentForm);
        i0.ɵɵadvance(6);
        i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(14, 55, "label.your_current_plan"), " ");
        i0.ɵɵadvance(3);
        i0.ɵɵtextInterpolate1(" ", ctx.packageDetail == null ? null : ctx.packageDetail.name, " ");
        i0.ɵɵadvance(3);
        i0.ɵɵtextInterpolate2("", ctx.currencyUnit, "", (ctx.packageDetail == null ? null : ctx.packageDetail.price) || 0, "");
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(22, 57, "label.user_per_month"), " ");
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.isStarterPackage());
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(83, _c3, ctx.showAllFeatures));
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngForOf", ctx.getVisibleFeatures());
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", !ctx.showAllFeatures);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.showAllFeatures);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.isAnnuallyBilling);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", !ctx.isAnnuallyBilling);
        i0.ɵɵadvance(3);
        i0.ɵɵstyleMap(i0.ɵɵpureFunction0(85, _c4));
        i0.ɵɵproperty("min", (ctx.packageDetail == null ? null : ctx.packageDetail.minimumUser) || 1)("ngModel", ctx.numberOfUsers)("disabled", ctx.isDisabledTrial())("showButtons", false)("inputStyle", i0.ɵɵpureFunction0(86, _c4));
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(37, 59, "label.number_of_users"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", !ctx.isStarterPackage());
        i0.ɵɵadvance(4);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(43, 61, "label.today_total"));
        i0.ɵɵadvance(3);
        i0.ɵɵtextInterpolate2(" ", ctx.currencyUnit, "", ctx.todayTotal, " ");
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.isStarterPackage());
        i0.ɵɵadvance(1);
        i0.ɵɵstyleMap(i0.ɵɵpureFunction0(87, _c5));
        i0.ɵɵpropertyInterpolate("header", i0.ɵɵpipeBind1(48, 63, "label.payment_confirmation"));
        i0.ɵɵproperty("visible", ctx.displayConfirmModal)("modal", true)("closable", true)("draggable", false)("resizable", false);
        i0.ɵɵadvance(4);
        i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(52, 65, "label.confirm_details"), " ");
        i0.ɵɵadvance(6);
        i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(58, 67, "label.email"), ":");
        i0.ɵɵadvance(3);
        i0.ɵɵtextInterpolate(ctx.f.teamEmail == null ? null : ctx.f.teamEmail.value);
        i0.ɵɵadvance(3);
        i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(64, 69, "label.name"), ":");
        i0.ɵɵadvance(3);
        i0.ɵɵtextInterpolate2(" ", ctx.f.firstName == null ? null : ctx.f.firstName.value, " ", ctx.f.lastName == null ? null : ctx.f.lastName.value, " ");
        i0.ɵɵadvance(3);
        i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(70, 71, "label.package"), ":");
        i0.ɵɵadvance(3);
        i0.ɵɵtextInterpolate(ctx.packageDetail == null ? null : ctx.packageDetail.name);
        i0.ɵɵadvance(3);
        i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(76, 73, "label.users"), ":");
        i0.ɵɵadvance(3);
        i0.ɵɵtextInterpolate(ctx.numberOfUsers);
        i0.ɵɵadvance(3);
        i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(82, 75, "label.billing_cycle"), ":");
        i0.ɵɵadvance(3);
        i0.ɵɵtextInterpolate1(" ", ctx.isAnnuallyBilling ? i0.ɵɵpipeBind1(85, 77, "label.annually") : i0.ɵɵpipeBind1(86, 79, "label.monthly"), " ");
        i0.ɵɵadvance(5);
        i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind1(90, 81, "label.total"), ":");
        i0.ɵɵadvance(3);
        i0.ɵɵtextInterpolate2(" ", ctx.currencyUnit, "", ctx.todayTotal, " ");
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.isStarterPackage());
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.stripeDetails);
    } }, directives: [i8.NgIf, i8.NgClass, i8.NgForOf, i9.InputNumber, i4.NgControlStatus, i4.NgModel, i10.Dialog, i3.PrimeTemplate, i4.ɵangular_packages_forms_forms_y, i4.NgControlStatusGroup, i4.FormGroupDirective, i4.DefaultValueAccessor, i4.FormControlName, i4.MaxLengthValidator, i11.InputText, i4.RequiredValidator, i12.AutofocusDirective, i2.TranslateDirective, i13.Password, i14.Checkbox, i15.ButtonDirective, i5.RouterLinkWithHref, i16.PaymentCardFormComponent], pipes: [i2.TranslatePipe, i8.UpperCasePipe], styles: ["@charset \"UTF-8\";\n[_nghost-%COMP%]     .p-float-label p-password:has(.p-inputwrapper-focus) ~ label, [_nghost-%COMP%]     .p-float-label p-password:has(.p-filled) ~ label {\n  top: -0.5rem !important;\n  background-color: #ffffff;\n  padding: 2px 4px;\n  margin-left: -4px;\n  margin-top: 0;\n  font-size: 12px;\n}\n[_nghost-%COMP%]     .payment-confirmation-dialog .p-dialog-header {\n  background-color: #304FFE;\n  padding: 1rem;\n}\n[_nghost-%COMP%]     .payment-confirmation-dialog .p-dialog-header .p-dialog-title {\n  color: white;\n  font-size: 1.2rem;\n  font-weight: 600;\n  text-transform: uppercase;\n}\n[_nghost-%COMP%]     .payment-confirmation-dialog .p-dialog-header .p-dialog-header-icon {\n  color: white;\n}\n[_nghost-%COMP%]     .payment-confirmation-dialog .p-dialog-content {\n  padding: 1.5rem;\n}\n[_nghost-%COMP%]     .payment-confirmation-dialog .p-dialog-content h3 {\n  margin-top: 0;\n  font-weight: 500;\n  color: #333;\n  font-size: 1.2rem;\n}\n[_nghost-%COMP%]     .payment-confirmation-dialog .confirmation-table {\n  width: 100%;\n  border-collapse: collapse;\n  margin-bottom: 1rem;\n}\n[_nghost-%COMP%]     .payment-confirmation-dialog .confirmation-table tr:last-child {\n  border-bottom: none;\n}\n[_nghost-%COMP%]     .payment-confirmation-dialog .confirmation-table tr.total-row {\n  font-weight: bold;\n}\n[_nghost-%COMP%]     .payment-confirmation-dialog .confirmation-table td {\n  padding: 0.75rem 0;\n}\n[_nghost-%COMP%]     .payment-confirmation-dialog .confirmation-table td.label {\n  color: #666;\n  width: 40%;\n}\n[_nghost-%COMP%]     .payment-confirmation-dialog .confirmation-table td.value {\n  text-align: left;\n  color: #333;\n  width: 60%;\n}\n[_nghost-%COMP%]     .payment-confirmation-dialog .card-info-container {\n  margin-top: 1rem;\n  padding: 1rem 0;\n  border-top: 1px solid #e0e0e0;\n}\n[_nghost-%COMP%]     .payment-confirmation-dialog .card-info-container .card-info-header {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  margin-bottom: 0.5rem;\n}\n[_nghost-%COMP%]     .payment-confirmation-dialog .card-info-container .card-info-header i {\n  margin-right: 0.5rem;\n}\n[_nghost-%COMP%]     .payment-confirmation-dialog .card-info-container .card-info-header span {\n  font-weight: 500;\n}\n[_nghost-%COMP%]     .payment-confirmation-dialog .card-info-container .card-holder-name {\n  text-align: center;\n}\n[_nghost-%COMP%]     .payment-confirmation-dialog .card-info-container .card-holder-name strong {\n  font-weight: 600;\n  text-transform: uppercase;\n}\n[_nghost-%COMP%]     .payment-confirmation-dialog .button-container {\n  padding: 0.5rem;\n}\n[_nghost-%COMP%]     .payment-confirmation-dialog .button-container button {\n  min-width: 100px;\n}\n.features[_ngcontent-%COMP%]   li[_ngcontent-%COMP%] {\n  position: relative;\n  padding-left: 20px;\n}\n.features[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]:before {\n  content: \"\u2713\";\n  position: absolute;\n  left: 0;\n  color: #00c8c8;\n  font-weight: bold;\n}\n/*# sourceMappingURL=data:application/json;base64,  */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SignUpComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-sign-up',
                templateUrl: './sign-up.component.html',
                styleUrls: ['./sign-up.component.scss'],
            }]
    }], function () { return [{ type: i1.Title }, { type: i2.TranslateService }, { type: i3.MessageService }, { type: i4.FormBuilder }, { type: i2.TranslateService }, { type: i5.Router }, { type: i5.ActivatedRoute }, { type: i6.TeamService }, { type: i7.PackageService }]; }, { paymentCardForm: [{
            type: core_1.ViewChild,
            args: ['paymentCardForm']
        }] }); })();


/***/ }),

/***/ "./src/app/prime-ng/prime-ng.module.ts":
/*!*********************************************!*\
  !*** ./src/app/prime-ng/prime-ng.module.ts ***!
  \*********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.PrimeNgModule = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const common_1 = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js");
const inputtext_1 = __webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js");
const card_1 = __webpack_require__(/*! primeng/card */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-card.js");
const button_1 = __webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js");
const menubar_1 = __webpack_require__(/*! primeng/menubar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-menubar.js");
const dropdown_1 = __webpack_require__(/*! primeng/dropdown */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dropdown.js");
const fieldset_1 = __webpack_require__(/*! primeng/fieldset */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-fieldset.js");
const radiobutton_1 = __webpack_require__(/*! primeng/radiobutton */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-radiobutton.js");
const checkbox_1 = __webpack_require__(/*! primeng/checkbox */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-checkbox.js");
const scrollpanel_1 = __webpack_require__(/*! primeng/scrollpanel */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-scrollpanel.js");
const progressspinner_1 = __webpack_require__(/*! primeng/progressspinner */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-progressspinner.js");
const dataview_1 = __webpack_require__(/*! primeng/dataview */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dataview.js");
const divider_1 = __webpack_require__(/*! primeng/divider */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-divider.js");
const table_1 = __webpack_require__(/*! primeng/table */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-table.js");
const editor_1 = __webpack_require__(/*! primeng/editor */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-editor.js");
const badge_1 = __webpack_require__(/*! primeng/badge */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-badge.js");
const confirmdialog_1 = __webpack_require__(/*! primeng/confirmdialog */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-confirmdialog.js");
const sidebar_1 = __webpack_require__(/*! primeng/sidebar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-sidebar.js");
const ripple_1 = __webpack_require__(/*! primeng/ripple */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-ripple.js");
const tieredmenu_1 = __webpack_require__(/*! primeng/tieredmenu */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-tieredmenu.js");
const menu_1 = __webpack_require__(/*! primeng/menu */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-menu.js");
const tag_1 = __webpack_require__(/*! primeng/tag */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-tag.js");
const tooltip_1 = __webpack_require__(/*! primeng/tooltip */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-tooltip.js");
const contextmenu_1 = __webpack_require__(/*! primeng/contextmenu */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-contextmenu.js");
const tabview_1 = __webpack_require__(/*! primeng/tabview */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-tabview.js");
const breadcrumb_1 = __webpack_require__(/*! primeng/breadcrumb */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-breadcrumb.js");
const chart_1 = __webpack_require__(/*! primeng/chart */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-chart.js");
const keyfilter_1 = __webpack_require__(/*! primeng/keyfilter */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-keyfilter.js");
const toolbar_1 = __webpack_require__(/*! primeng/toolbar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-toolbar.js");
const avatar_1 = __webpack_require__(/*! primeng/avatar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-avatar.js");
const avatargroup_1 = __webpack_require__(/*! primeng/avatargroup */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-avatargroup.js");
const panelmenu_1 = __webpack_require__(/*! primeng/panelmenu */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-panelmenu.js");
const dialog_1 = __webpack_require__(/*! primeng/dialog */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dialog.js");
const inputtextarea_1 = __webpack_require__(/*! primeng/inputtextarea */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtextarea.js");
const colorpicker_1 = __webpack_require__(/*! primeng/colorpicker */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-colorpicker.js");
const inputmask_1 = __webpack_require__(/*! primeng/inputmask */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputmask.js");
const calendar_1 = __webpack_require__(/*! primeng/calendar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-calendar.js");
const password_1 = __webpack_require__(/*! primeng/password */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-password.js");
const overlaypanel_1 = __webpack_require__(/*! primeng/overlaypanel */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-overlaypanel.js");
const fileupload_1 = __webpack_require__(/*! primeng/fileupload */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-fileupload.js");
const ng_circle_progress_1 = __webpack_require__(/*! ng-circle-progress */ "./node_modules/ng-circle-progress/__ivy_ngcc__/fesm2015/ng-circle-progress.js");
const ngx_file_drop_1 = __webpack_require__(/*! ngx-file-drop */ "./node_modules/ngx-file-drop/__ivy_ngcc__/fesm2015/ngx-file-drop.js");
const confirmpopup_1 = __webpack_require__(/*! primeng/confirmpopup */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-confirmpopup.js");
const progressbar_1 = __webpack_require__(/*! primeng/progressbar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-progressbar.js");
const tree_1 = __webpack_require__(/*! primeng/tree */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-tree.js");
const skeleton_1 = __webpack_require__(/*! primeng/skeleton */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-skeleton.js");
const dragdrop_1 = __webpack_require__(/*! primeng/dragdrop */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-dragdrop.js");
const scrolltop_1 = __webpack_require__(/*! primeng/scrolltop */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-scrolltop.js");
const timeline_1 = __webpack_require__(/*! primeng/timeline */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-timeline.js");
const messages_1 = __webpack_require__(/*! primeng/messages */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-messages.js");
const message_1 = __webpack_require__(/*! primeng/message */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-message.js");
const listbox_1 = __webpack_require__(/*! primeng/listbox */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-listbox.js");
const angular_mentions_1 = __webpack_require__(/*! angular-mentions */ "./node_modules/angular-mentions/__ivy_ngcc__/fesm2015/angular-mentions.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! ng-circle-progress */ "./node_modules/ng-circle-progress/__ivy_ngcc__/fesm2015/ng-circle-progress.js"));
class PrimeNgModule {
}
exports.PrimeNgModule = PrimeNgModule;
PrimeNgModule.ɵmod = i0.ɵɵdefineNgModule({ type: PrimeNgModule });
PrimeNgModule.ɵinj = i0.ɵɵdefineInjector({ factory: function PrimeNgModule_Factory(t) { return new (t || PrimeNgModule)(); }, imports: [[
            common_1.CommonModule,
            inputtext_1.InputTextModule,
            card_1.CardModule,
            button_1.ButtonModule,
            menubar_1.MenubarModule,
            dropdown_1.DropdownModule,
            fieldset_1.FieldsetModule,
            radiobutton_1.RadioButtonModule,
            checkbox_1.CheckboxModule,
            scrollpanel_1.ScrollPanelModule,
            progressspinner_1.ProgressSpinnerModule,
            dataview_1.DataViewModule,
            divider_1.DividerModule,
            table_1.TableModule,
            sidebar_1.SidebarModule,
            editor_1.EditorModule,
            badge_1.BadgeModule,
            confirmdialog_1.ConfirmDialogModule,
            ripple_1.RippleModule,
            tieredmenu_1.TieredMenuModule,
            menu_1.MenuModule,
            tag_1.TagModule,
            tooltip_1.TooltipModule,
            contextmenu_1.ContextMenuModule,
            tabview_1.TabViewModule,
            breadcrumb_1.BreadcrumbModule,
            chart_1.ChartModule,
            keyfilter_1.KeyFilterModule,
            toolbar_1.ToolbarModule,
            avatar_1.AvatarModule,
            avatargroup_1.AvatarGroupModule,
            panelmenu_1.PanelMenuModule,
            dialog_1.DialogModule,
            inputtextarea_1.InputTextareaModule,
            colorpicker_1.ColorPickerModule,
            inputmask_1.InputMaskModule,
            calendar_1.CalendarModule,
            password_1.PasswordModule,
            overlaypanel_1.OverlayPanelModule,
            fileupload_1.FileUploadModule,
            ngx_file_drop_1.NgxFileDropModule,
            ng_circle_progress_1.NgCircleProgressModule.forRoot({
                radius: 20,
                outerStrokeWidth: 3,
                innerStrokeWidth: 2,
                showSubtitle: false,
                space: 2,
                outerStrokeColor: '#3F51B5',
                innerStrokeColor: '#2196F3',
                animation: true,
                animationDuration: 0,
                titleFontSize: '12',
                unitsFontSize: '12',
                titleFontWeight: '600',
                unitsFontWeight: '600',
                backgroundPadding: 0
            }),
            confirmpopup_1.ConfirmPopupModule,
            tree_1.TreeModule,
            skeleton_1.SkeletonModule,
            dragdrop_1.DragDropModule,
            messages_1.MessagesModule,
            message_1.MessageModule,
            progressbar_1.ProgressBarModule,
            listbox_1.ListboxModule,
            messages_1.MessagesModule,
            scrolltop_1.ScrollTopModule,
            timeline_1.TimelineModule,
            angular_mentions_1.MentionModule
        ], inputtext_1.InputTextModule,
        card_1.CardModule,
        button_1.ButtonModule,
        menubar_1.MenubarModule,
        dropdown_1.DropdownModule,
        fieldset_1.FieldsetModule,
        radiobutton_1.RadioButtonModule,
        checkbox_1.CheckboxModule,
        scrollpanel_1.ScrollPanelModule,
        progressspinner_1.ProgressSpinnerModule,
        dataview_1.DataViewModule,
        divider_1.DividerModule,
        table_1.TableModule,
        sidebar_1.SidebarModule,
        editor_1.EditorModule,
        badge_1.BadgeModule,
        confirmdialog_1.ConfirmDialogModule,
        ripple_1.RippleModule,
        tieredmenu_1.TieredMenuModule,
        menu_1.MenuModule,
        tag_1.TagModule,
        tooltip_1.TooltipModule,
        contextmenu_1.ContextMenuModule,
        tabview_1.TabViewModule,
        breadcrumb_1.BreadcrumbModule,
        chart_1.ChartModule,
        keyfilter_1.KeyFilterModule,
        toolbar_1.ToolbarModule,
        avatar_1.AvatarModule,
        avatargroup_1.AvatarGroupModule,
        panelmenu_1.PanelMenuModule,
        dialog_1.DialogModule,
        inputtextarea_1.InputTextareaModule,
        colorpicker_1.ColorPickerModule,
        inputmask_1.InputMaskModule,
        calendar_1.CalendarModule,
        password_1.PasswordModule,
        overlaypanel_1.OverlayPanelModule,
        fileupload_1.FileUploadModule,
        ngx_file_drop_1.NgxFileDropModule,
        ng_circle_progress_1.NgCircleProgressModule,
        confirmpopup_1.ConfirmPopupModule,
        tree_1.TreeModule,
        skeleton_1.SkeletonModule,
        dragdrop_1.DragDropModule,
        messages_1.MessagesModule,
        message_1.MessageModule,
        dialog_1.DialogModule,
        progressbar_1.ProgressBarModule,
        listbox_1.ListboxModule,
        messages_1.MessagesModule,
        scrolltop_1.ScrollTopModule,
        timeline_1.TimelineModule,
        angular_mentions_1.MentionModule] });
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(PrimeNgModule, { imports: [common_1.CommonModule,
        inputtext_1.InputTextModule,
        card_1.CardModule,
        button_1.ButtonModule,
        menubar_1.MenubarModule,
        dropdown_1.DropdownModule,
        fieldset_1.FieldsetModule,
        radiobutton_1.RadioButtonModule,
        checkbox_1.CheckboxModule,
        scrollpanel_1.ScrollPanelModule,
        progressspinner_1.ProgressSpinnerModule,
        dataview_1.DataViewModule,
        divider_1.DividerModule,
        table_1.TableModule,
        sidebar_1.SidebarModule,
        editor_1.EditorModule,
        badge_1.BadgeModule,
        confirmdialog_1.ConfirmDialogModule,
        ripple_1.RippleModule,
        tieredmenu_1.TieredMenuModule,
        menu_1.MenuModule,
        tag_1.TagModule,
        tooltip_1.TooltipModule,
        contextmenu_1.ContextMenuModule,
        tabview_1.TabViewModule,
        breadcrumb_1.BreadcrumbModule,
        chart_1.ChartModule,
        keyfilter_1.KeyFilterModule,
        toolbar_1.ToolbarModule,
        avatar_1.AvatarModule,
        avatargroup_1.AvatarGroupModule,
        panelmenu_1.PanelMenuModule,
        dialog_1.DialogModule,
        inputtextarea_1.InputTextareaModule,
        colorpicker_1.ColorPickerModule,
        inputmask_1.InputMaskModule,
        calendar_1.CalendarModule,
        password_1.PasswordModule,
        overlaypanel_1.OverlayPanelModule,
        fileupload_1.FileUploadModule,
        ngx_file_drop_1.NgxFileDropModule, i1.NgCircleProgressModule, confirmpopup_1.ConfirmPopupModule,
        tree_1.TreeModule,
        skeleton_1.SkeletonModule,
        dragdrop_1.DragDropModule,
        messages_1.MessagesModule,
        message_1.MessageModule,
        progressbar_1.ProgressBarModule,
        listbox_1.ListboxModule,
        messages_1.MessagesModule,
        scrolltop_1.ScrollTopModule,
        timeline_1.TimelineModule,
        angular_mentions_1.MentionModule], exports: [inputtext_1.InputTextModule,
        card_1.CardModule,
        button_1.ButtonModule,
        menubar_1.MenubarModule,
        dropdown_1.DropdownModule,
        fieldset_1.FieldsetModule,
        radiobutton_1.RadioButtonModule,
        checkbox_1.CheckboxModule,
        scrollpanel_1.ScrollPanelModule,
        progressspinner_1.ProgressSpinnerModule,
        dataview_1.DataViewModule,
        divider_1.DividerModule,
        table_1.TableModule,
        sidebar_1.SidebarModule,
        editor_1.EditorModule,
        badge_1.BadgeModule,
        confirmdialog_1.ConfirmDialogModule,
        ripple_1.RippleModule,
        tieredmenu_1.TieredMenuModule,
        menu_1.MenuModule,
        tag_1.TagModule,
        tooltip_1.TooltipModule,
        contextmenu_1.ContextMenuModule,
        tabview_1.TabViewModule,
        breadcrumb_1.BreadcrumbModule,
        chart_1.ChartModule,
        keyfilter_1.KeyFilterModule,
        toolbar_1.ToolbarModule,
        avatar_1.AvatarModule,
        avatargroup_1.AvatarGroupModule,
        panelmenu_1.PanelMenuModule,
        dialog_1.DialogModule,
        inputtextarea_1.InputTextareaModule,
        colorpicker_1.ColorPickerModule,
        inputmask_1.InputMaskModule,
        calendar_1.CalendarModule,
        password_1.PasswordModule,
        overlaypanel_1.OverlayPanelModule,
        fileupload_1.FileUploadModule,
        ngx_file_drop_1.NgxFileDropModule,
        ng_circle_progress_1.NgCircleProgressModule,
        confirmpopup_1.ConfirmPopupModule,
        tree_1.TreeModule,
        skeleton_1.SkeletonModule,
        dragdrop_1.DragDropModule,
        messages_1.MessagesModule,
        message_1.MessageModule,
        dialog_1.DialogModule,
        progressbar_1.ProgressBarModule,
        listbox_1.ListboxModule,
        messages_1.MessagesModule,
        scrolltop_1.ScrollTopModule,
        timeline_1.TimelineModule,
        angular_mentions_1.MentionModule] }); })();
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PrimeNgModule, [{
        type: core_1.NgModule,
        args: [{
                declarations: [],
                imports: [
                    common_1.CommonModule,
                    inputtext_1.InputTextModule,
                    card_1.CardModule,
                    button_1.ButtonModule,
                    menubar_1.MenubarModule,
                    dropdown_1.DropdownModule,
                    fieldset_1.FieldsetModule,
                    radiobutton_1.RadioButtonModule,
                    checkbox_1.CheckboxModule,
                    scrollpanel_1.ScrollPanelModule,
                    progressspinner_1.ProgressSpinnerModule,
                    dataview_1.DataViewModule,
                    divider_1.DividerModule,
                    table_1.TableModule,
                    sidebar_1.SidebarModule,
                    editor_1.EditorModule,
                    badge_1.BadgeModule,
                    confirmdialog_1.ConfirmDialogModule,
                    ripple_1.RippleModule,
                    tieredmenu_1.TieredMenuModule,
                    menu_1.MenuModule,
                    tag_1.TagModule,
                    tooltip_1.TooltipModule,
                    contextmenu_1.ContextMenuModule,
                    tabview_1.TabViewModule,
                    breadcrumb_1.BreadcrumbModule,
                    chart_1.ChartModule,
                    keyfilter_1.KeyFilterModule,
                    toolbar_1.ToolbarModule,
                    avatar_1.AvatarModule,
                    avatargroup_1.AvatarGroupModule,
                    panelmenu_1.PanelMenuModule,
                    dialog_1.DialogModule,
                    inputtextarea_1.InputTextareaModule,
                    colorpicker_1.ColorPickerModule,
                    inputmask_1.InputMaskModule,
                    calendar_1.CalendarModule,
                    password_1.PasswordModule,
                    overlaypanel_1.OverlayPanelModule,
                    fileupload_1.FileUploadModule,
                    ngx_file_drop_1.NgxFileDropModule,
                    ng_circle_progress_1.NgCircleProgressModule.forRoot({
                        radius: 20,
                        outerStrokeWidth: 3,
                        innerStrokeWidth: 2,
                        showSubtitle: false,
                        space: 2,
                        outerStrokeColor: '#3F51B5',
                        innerStrokeColor: '#2196F3',
                        animation: true,
                        animationDuration: 0,
                        titleFontSize: '12',
                        unitsFontSize: '12',
                        titleFontWeight: '600',
                        unitsFontWeight: '600',
                        backgroundPadding: 0
                    }),
                    confirmpopup_1.ConfirmPopupModule,
                    tree_1.TreeModule,
                    skeleton_1.SkeletonModule,
                    dragdrop_1.DragDropModule,
                    messages_1.MessagesModule,
                    message_1.MessageModule,
                    progressbar_1.ProgressBarModule,
                    listbox_1.ListboxModule,
                    messages_1.MessagesModule,
                    scrolltop_1.ScrollTopModule,
                    timeline_1.TimelineModule,
                    angular_mentions_1.MentionModule
                ],
                exports: [
                    inputtext_1.InputTextModule,
                    card_1.CardModule,
                    button_1.ButtonModule,
                    menubar_1.MenubarModule,
                    dropdown_1.DropdownModule,
                    fieldset_1.FieldsetModule,
                    radiobutton_1.RadioButtonModule,
                    checkbox_1.CheckboxModule,
                    scrollpanel_1.ScrollPanelModule,
                    progressspinner_1.ProgressSpinnerModule,
                    dataview_1.DataViewModule,
                    divider_1.DividerModule,
                    table_1.TableModule,
                    sidebar_1.SidebarModule,
                    editor_1.EditorModule,
                    badge_1.BadgeModule,
                    confirmdialog_1.ConfirmDialogModule,
                    ripple_1.RippleModule,
                    tieredmenu_1.TieredMenuModule,
                    menu_1.MenuModule,
                    tag_1.TagModule,
                    tooltip_1.TooltipModule,
                    contextmenu_1.ContextMenuModule,
                    tabview_1.TabViewModule,
                    breadcrumb_1.BreadcrumbModule,
                    chart_1.ChartModule,
                    keyfilter_1.KeyFilterModule,
                    toolbar_1.ToolbarModule,
                    avatar_1.AvatarModule,
                    avatargroup_1.AvatarGroupModule,
                    panelmenu_1.PanelMenuModule,
                    dialog_1.DialogModule,
                    inputtextarea_1.InputTextareaModule,
                    colorpicker_1.ColorPickerModule,
                    inputmask_1.InputMaskModule,
                    calendar_1.CalendarModule,
                    password_1.PasswordModule,
                    overlaypanel_1.OverlayPanelModule,
                    fileupload_1.FileUploadModule,
                    ngx_file_drop_1.NgxFileDropModule,
                    ng_circle_progress_1.NgCircleProgressModule,
                    confirmpopup_1.ConfirmPopupModule,
                    tree_1.TreeModule,
                    skeleton_1.SkeletonModule,
                    dragdrop_1.DragDropModule,
                    messages_1.MessagesModule,
                    message_1.MessageModule,
                    dialog_1.DialogModule,
                    progressbar_1.ProgressBarModule,
                    listbox_1.ListboxModule,
                    messages_1.MessagesModule,
                    scrolltop_1.ScrollTopModule,
                    timeline_1.TimelineModule,
                    angular_mentions_1.MentionModule
                ]
            }]
    }], null, null); })();


/***/ }),

/***/ "./src/app/services/account.service.ts":
/*!*********************************************!*\
  !*** ./src/app/services/account.service.ts ***!
  \*********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.AccountService = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const http_1 = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm2015/operators/index.js");
const custom_http_param_encoder_1 = __webpack_require__(/*! ../../interceptor/custom.http.param.encoder */ "./src/interceptor/custom.http.param.encoder.ts");
const aes_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../utilities/aes.util */ "./src/utilities/aes.util.ts"));
const app_constants_1 = __webpack_require__(/*! ../../utilities/app-constants */ "./src/utilities/app-constants.ts");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js"));
class AccountService {
    constructor(http) {
        this.http = http;
    }
    setUserTeamList(userTeams) {
        this.userTeamsList = userTeams;
    }
    get getUserTeamList() {
        return this.userTeamsList;
    }
    setSignInEmail(email) {
        this.signInEmail = email;
    }
    get getSignInEmail() {
        return this.signInEmail;
    }
    requestResetPassword(forgotPasswordRequest) {
        return this.http
            .post('/auth/user/password', {
            email: forgotPasswordRequest.email,
            team_id: forgotPasswordRequest.teamId,
            service_key: app_constants_1.ConsoleType[app_constants_1.ConsoleType.SecureDrive]
        })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    resetPassword(token, newPassword, confirmPassword) {
        return this.http
            .put('/auth/user/password', {
            auth_token: token,
            new_password: aes_util_1.default.hashMD5(newPassword),
            confirm_password: aes_util_1.default.hashMD5(confirmPassword)
        })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    getRemainAttemptPassword(signInModel) {
        // This use to fix the issue double encode splash character
        let params = new http_1.HttpParams({ encoder: new custom_http_param_encoder_1.CustomHttpParamEncoder() });
        // params = params.append('email', AESUtil.hashMD5(signInModel.email));
        params = params.append('email', signInModel.email);
        params = params.append('team_id', signInModel.teamId);
        return this.http
            .get('/auth/user/password/remain', { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    changeEmail(token, newEmail) {
        return this.http
            .put('/auth/user/email', {
            confirm_code: token,
            mail_address: newEmail
        })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    requestChangeEmail() {
        return this.http
            .post('/auth/user/email', {
            service_key: app_constants_1.ConsoleType[app_constants_1.ConsoleType.SecureDrive]
        })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
}
exports.AccountService = AccountService;
AccountService.ɵfac = function AccountService_Factory(t) { return new (t || AccountService)(i0.ɵɵinject(i1.HttpClient)); };
AccountService.ɵprov = i0.ɵɵdefineInjectable({ token: AccountService, factory: AccountService.ɵfac, providedIn: 'root' });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AccountService, [{
        type: core_1.Injectable,
        args: [{
                providedIn: 'root'
            }]
    }], function () { return [{ type: i1.HttpClient }]; }, null); })();


/***/ }),

/***/ "./src/app/services/addressbook-group.service.ts":
/*!*******************************************************!*\
  !*** ./src/app/services/addressbook-group.service.ts ***!
  \*******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.AddressbookGroupService = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm2015/operators/index.js");
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../utilities/app-util */ "./src/utilities/app-util.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js"));
class AddressbookGroupService {
    constructor(http) {
        this.http = http;
    }
    setStoreParams(storeParams) {
        localStorage.setItem(app_constants_1.default.SORT_PAGE.ADDRESS_BOOK_GROUP_LIST, JSON.stringify(storeParams));
    }
    get getStoreParams() {
        return app_util_1.default.toCamelCaseKey(JSON.parse(localStorage.getItem(app_constants_1.default.SORT_PAGE.ADDRESS_BOOK_GROUP_LIST)));
    }
    setStoreMemberGroupParams(storeParams) {
        localStorage.setItem(app_constants_1.default.SORT_PAGE.ADDRESS_BOOK_MEMBER_GROUP_LIST, JSON.stringify(storeParams));
    }
    get getStoreMemberGroupParams() {
        return app_util_1.default.toCamelCaseKey(JSON.parse(localStorage.getItem(app_constants_1.default.SORT_PAGE.ADDRESS_BOOK_MEMBER_GROUP_LIST)));
    }
    getAddressBookGroupList(params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.get(`/address_groups`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    createAddressBookGroup(params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.post(`/address_groups`, params)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    updateAddressBookGroup(id, params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.put(`/address_groups/${id}`, params)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    deleteAddressBookGroup(params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.delete(`/address_groups`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    getAddressBookGroupInfo(groupId) {
        return this.http.get(`/address_groups/${groupId}`)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    getGroupAddressBookList(groupId, params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.get(`/address_groups/${groupId}/address_books`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    addMoreMembersToGroup(params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.post(`/address_groups/address_books`, params)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    getExceptAddressBookGroupList(id, params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.get(`/address_groups/${id}/except`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    moveMembersToGroup(params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.put(`/address_groups/address_books`, params)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    deleteMembersInGroup(params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.delete(`/address_groups/address_books`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    getMembersInGroups(params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.get(`/address_groups/address_books`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
}
exports.AddressbookGroupService = AddressbookGroupService;
AddressbookGroupService.ɵfac = function AddressbookGroupService_Factory(t) { return new (t || AddressbookGroupService)(i0.ɵɵinject(i1.HttpClient)); };
AddressbookGroupService.ɵprov = i0.ɵɵdefineInjectable({ token: AddressbookGroupService, factory: AddressbookGroupService.ɵfac, providedIn: 'root' });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AddressbookGroupService, [{
        type: core_1.Injectable,
        args: [{
                providedIn: 'root'
            }]
    }], function () { return [{ type: i1.HttpClient }]; }, null); })();


/***/ }),

/***/ "./src/app/services/addressbook.service.ts":
/*!*************************************************!*\
  !*** ./src/app/services/addressbook.service.ts ***!
  \*************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.AddressbookService = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm2015/operators/index.js");
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../utilities/app-util */ "./src/utilities/app-util.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js"));
class AddressbookService {
    constructor(http) {
        this.http = http;
    }
    setStoreParams(storeParams) {
        localStorage.setItem(app_constants_1.default.SORT_PAGE.ADDRESS_BOOK_LIST, JSON.stringify(storeParams));
    }
    get getStoreParams() {
        return app_util_1.default.toCamelCaseKey(JSON.parse(localStorage.getItem(app_constants_1.default.SORT_PAGE.ADDRESS_BOOK_LIST)));
    }
    getAllAddressBook() {
        return this.http.get(`/address_books/all`)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    getAddressBookList(params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.get(`/address_books`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    createAddressBook(params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.post(`/address_books`, params)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    editAddressBook(id, params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.put(`/address_books/${id}`, params)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    deleteAddressBook(params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.delete(`/address_books`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
}
exports.AddressbookService = AddressbookService;
AddressbookService.ɵfac = function AddressbookService_Factory(t) { return new (t || AddressbookService)(i0.ɵɵinject(i1.HttpClient)); };
AddressbookService.ɵprov = i0.ɵɵdefineInjectable({ token: AddressbookService, factory: AddressbookService.ɵfac, providedIn: 'root' });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AddressbookService, [{
        type: core_1.Injectable,
        args: [{
                providedIn: 'root'
            }]
    }], function () { return [{ type: i1.HttpClient }]; }, null); })();


/***/ }),

/***/ "./src/app/services/auth.service.ts":
/*!******************************************!*\
  !*** ./src/app/services/auth.service.ts ***!
  \******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthService = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const http_1 = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm2015/operators/index.js");
const custom_http_param_encoder_1 = __webpack_require__(/*! ../../interceptor/custom.http.param.encoder */ "./src/interceptor/custom.http.param.encoder.ts");
const aes_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../utilities/aes.util */ "./src/utilities/aes.util.ts"));
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
class AuthService {
    constructor(http, router) {
        this.http = http;
        this.router = router;
        this.keepLogin = false;
    }
    setToken(token) {
        localStorage.setItem(app_constants_1.default.STORAGE_KEYS.SESSION, token);
    }
    get token() {
        return localStorage.getItem(app_constants_1.default.STORAGE_KEYS.SESSION);
    }
    deleteToken() {
        localStorage.removeItem(app_constants_1.default.STORAGE_KEYS.SESSION);
    }
    clearSession() {
        this.authUser = undefined;
        this.deleteToken();
        this.router.navigate(['/login']).then((res) => { });
    }
    get userTeams() {
        return this.userTeamsList;
    }
    setUserTeams(userTeamList) {
        this.userTeamsList = userTeamList;
    }
    setAuthUser(authUser) {
        this.authUser = authUser;
    }
    get getAuthUser() {
        return this.authUser;
    }
    setOtpToken(otpToken) {
        this.otpToken = otpToken;
    }
    getOtpToken() {
        return this.otpToken;
    }
    setKeepLogin(keepLogin) {
        this.keepLogin = keepLogin;
    }
    isKeepLogin() {
        return this.keepLogin;
    }
    setLoginEmail(email) {
        this.loginEmail = email;
    }
    get getLoginEmail() {
        return this.loginEmail;
    }
    getUserTeam(checkingTeam) {
        // This use to fix the issue double encode splash character
        let params = new http_1.HttpParams({
            encoder: new custom_http_param_encoder_1.CustomHttpParamEncoder(),
        });
        // params = params.append('email', AESUtil.encrypt(checkingTeam.email.trim()));
        params = params.append('email', checkingTeam.email.trim());
        params = params.append('service_key', app_constants_1.default.SERVICE_KEY);
        console.log('getUserTeam params', params);
        return this.http.get('/auth/user/teams', { params }).pipe(operators_1.map((result) => {
            return result;
        }));
    }
    login(signInModel) {
        return this.http
            .post('/auth/user/login', {
            // email: AESUtil.encrypt(signInModel.email),
            email: signInModel.email,
            password_hash: aes_util_1.default.hashMD5(signInModel.passwordHash),
            // password_hash: AESUtil.encrypt(
            //   AESUtil.hashMD5(signInModel.passwordHash)
            // ),
            team_id: signInModel.teamId,
            keep_login: signInModel.keepLogin,
            service_key: app_constants_1.default.SERVICE_NAME,
        })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    loginOpt(authCode, keepLogin, otpToken) {
        return this.http
            .post('/auth/user/otp/login', {
            auth_code: authCode,
            keep_login: keepLogin,
        }, { headers: { 'otp-token': otpToken } })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    getAuthInfo() {
        return this.http.get('/auth/info').pipe(operators_1.map((result) => {
            return result;
        }));
    }
    get getUserLanguage() {
        return this.authUser ? this.authUser.lang : 'en';
    }
    logout() {
        return this.http.post('/auth/logout', {}).pipe(operators_1.map((result) => {
            return result;
        }));
    }
    getUserDetail(userId) {
        return this.http.get(`/users/${userId}`);
    }
    generatePinCode() {
        return this.http.post('/auth/user/pincode', {}).pipe(operators_1.map((result) => {
            return result;
        }));
    }
}
exports.AuthService = AuthService;
AuthService.ɵfac = function AuthService_Factory(t) { return new (t || AuthService)(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(i2.Router)); };
AuthService.ɵprov = i0.ɵɵdefineInjectable({ token: AuthService, factory: AuthService.ɵfac, providedIn: 'root' });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AuthService, [{
        type: core_1.Injectable,
        args: [{
                providedIn: 'root',
            }]
    }], function () { return [{ type: i1.HttpClient }, { type: i2.Router }]; }, null); })();


/***/ }),

/***/ "./src/app/services/broadcast.service.ts":
/*!***********************************************!*\
  !*** ./src/app/services/broadcast.service.ts ***!
  \***********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.BroadcastService = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const rxjs_1 = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm2015/index.js");
const operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm2015/operators/index.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
class BroadcastService {
    constructor() {
        // tslint:disable-next-line:variable-name
        this._handler = new rxjs_1.Subject();
    }
    broadcast(type, payload = null) {
        this._handler.next({ type, payload });
    }
    subscribe(type, callback) {
        return this._handler.pipe(operators_1.filter(message => message.type === type), operators_1.map(message => message.payload)).subscribe(callback);
    }
}
exports.BroadcastService = BroadcastService;
BroadcastService.ɵfac = function BroadcastService_Factory(t) { return new (t || BroadcastService)(); };
BroadcastService.ɵprov = i0.ɵɵdefineInjectable({ token: BroadcastService, factory: BroadcastService.ɵfac });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BroadcastService, [{
        type: core_1.Injectable
    }], function () { return []; }, null); })();


/***/ }),

/***/ "./src/app/services/collaborator.service.ts":
/*!**************************************************!*\
  !*** ./src/app/services/collaborator.service.ts ***!
  \**************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.CollaboratorService = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm2015/operators/index.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js"));
class CollaboratorService {
    constructor(http) {
        this.http = http;
    }
    getCollaborators(folderId, params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.get(`/folders/${folderId}/collaborations`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    inviteCollaborator(folderId, params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.post(`/folders/${folderId}/collaborations`, params)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    inviteGroupCollaborator(folderId, params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.post(`/folders/${folderId}/collaborations/groups`, params)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    changeRoleCollaborator(folderId, params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.put(`/folders/${folderId}/collaborations`, params)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    changeRoleGroupCollaborator(folderId, params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.put(`/folders/${folderId}/collaborations/groups`, params)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    kickCollaborator(folderId, params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.delete(`/folders/${folderId}/collaborations`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    kickGroupCollaborator(folderId, groupId, params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.delete(`/folders/${folderId}/collaborations/groups/${groupId}`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    getMemberGroupCollaborator(folderId, groupId, params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.get(`/folders/${folderId}/collaborations/groups/${groupId}`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
}
exports.CollaboratorService = CollaboratorService;
CollaboratorService.ɵfac = function CollaboratorService_Factory(t) { return new (t || CollaboratorService)(i0.ɵɵinject(i1.HttpClient)); };
CollaboratorService.ɵprov = i0.ɵɵdefineInjectable({ token: CollaboratorService, factory: CollaboratorService.ɵfac, providedIn: 'root' });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CollaboratorService, [{
        type: core_1.Injectable,
        args: [{
                providedIn: 'root'
            }]
    }], function () { return [{ type: i1.HttpClient }]; }, null); })();


/***/ }),

/***/ "./src/app/services/comment.service.ts":
/*!*********************************************!*\
  !*** ./src/app/services/comment.service.ts ***!
  \*********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.CommentService = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm2015/operators/index.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js"));
class CommentService {
    constructor(http) {
        this.http = http;
    }
    getComments(params) {
        if (!params.lastUpdate) {
            delete params.lastUpdate;
        }
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.get(`/comments`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    addComment(params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.post(`/comments`, params)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    editComment(id, params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.put(`/comments/${id}`, params)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    deleteComment(id, params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.delete(`/comments/${id}`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
}
exports.CommentService = CommentService;
CommentService.ɵfac = function CommentService_Factory(t) { return new (t || CommentService)(i0.ɵɵinject(i1.HttpClient)); };
CommentService.ɵprov = i0.ɵɵdefineInjectable({ token: CommentService, factory: CommentService.ɵfac, providedIn: 'root' });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CommentService, [{
        type: core_1.Injectable,
        args: [{
                providedIn: 'root'
            }]
    }], function () { return [{ type: i1.HttpClient }]; }, null); })();


/***/ }),

/***/ "./src/app/services/download.service.ts":
/*!**********************************************!*\
  !*** ./src/app/services/download.service.ts ***!
  \**********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.DownloadService = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const http_1 = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js");
const operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm2015/operators/index.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js"));
class DownloadService {
    constructor(http) {
        this.http = http;
    }
    setProjectId(projectId) {
        this.projectId = projectId;
    }
    getProjectId() {
        return this.projectId;
    }
    setLinkId(linkId) {
        this.linkId = linkId;
    }
    getLinkId() {
        return this.linkId;
    }
    setLink(link) {
        this.link = link;
    }
    getLink() {
        return this.link;
    }
    downloadFileFromShareLink(id, params, contentType) {
        return this.http.get(`/download/files/${id}/share`, {
            params,
            headers: new http_1.HttpHeaders().set('Content-Type', contentType),
            responseType: 'arraybuffer'
        }).pipe(operators_1.map((file) => {
            return file;
        })).toPromise();
    }
    downloadFile(id, params, contentType) {
        return this.http.get(`/download/files/${id}`, {
            params,
            headers: new http_1.HttpHeaders().set('Content-Type', contentType),
            responseType: 'arraybuffer'
        }).pipe(operators_1.map((file) => {
            return file;
        })).toPromise();
    }
    zipFolder(folderId, params) {
        return this.http.get(`/download/folders/${folderId}`, { params }).pipe(operators_1.map((result) => {
            return result;
        }));
    }
    checkQueueDownloadFolder(folderId, params) {
        return this.http.get(`/download/folders/status`, { params }).pipe(operators_1.map((result) => {
            return result;
        }));
    }
    downloadFolderAsZip(queueId, params, contentType) {
        return this.http.get(`/download/folders/queue/${queueId}`, {
            params,
            headers: new http_1.HttpHeaders().set('Content-Type', contentType),
            responseType: 'arraybuffer'
        }).pipe(operators_1.map((file) => {
            return file;
        })).toPromise();
    }
}
exports.DownloadService = DownloadService;
DownloadService.ɵfac = function DownloadService_Factory(t) { return new (t || DownloadService)(i0.ɵɵinject(i1.HttpClient)); };
DownloadService.ɵprov = i0.ɵɵdefineInjectable({ token: DownloadService, factory: DownloadService.ɵfac, providedIn: 'root' });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DownloadService, [{
        type: core_1.Injectable,
        args: [{
                providedIn: 'root'
            }]
    }], function () { return [{ type: i1.HttpClient }]; }, null); })();


/***/ }),

/***/ "./src/app/services/file-report.service.ts":
/*!*************************************************!*\
  !*** ./src/app/services/file-report.service.ts ***!
  \*************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.FileReportService = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm2015/operators/index.js");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../utilities/app-util */ "./src/utilities/app-util.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js"));
class FileReportService {
    constructor(http) {
        this.http = http;
    }
    setStoreParamsInternalNoneProtectedOnl(storeParams) {
        localStorage.setItem(app_constants_1.default.SORT_PAGE.INTERNAL_NONE_PROTECT_ONLINE_TRACKING, JSON.stringify(storeParams));
    }
    get getStoreParamsInternalNoneProtectedOnl() {
        return app_util_1.default.toCamelCaseKey(JSON.parse(localStorage.getItem(app_constants_1.default.SORT_PAGE.INTERNAL_NONE_PROTECT_ONLINE_TRACKING)));
    }
    setStoreParamsInternalProtectedOnl(storeParams) {
        localStorage.setItem(app_constants_1.default.SORT_PAGE.INTERNAL_PROTECT_ONLINE_TRACKING, JSON.stringify(storeParams));
    }
    get getStoreParamsInternalProtectedOnl() {
        return app_util_1.default.toCamelCaseKey(JSON.parse(localStorage.getItem(app_constants_1.default.SORT_PAGE.INTERNAL_PROTECT_ONLINE_TRACKING)));
    }
    setStoreParamsInternalProtectedOff(storeParams) {
        localStorage.setItem(app_constants_1.default.SORT_PAGE.INTERNAL_PROTECT_OFFLINE_TRACKING, JSON.stringify(storeParams));
    }
    get getStoreParamsInternalProtectedOff() {
        return app_util_1.default.toCamelCaseKey(JSON.parse(localStorage.getItem(app_constants_1.default.SORT_PAGE.INTERNAL_PROTECT_OFFLINE_TRACKING)));
    }
    setStoreParamsExternalProtectedOff(storeParams) {
        localStorage.setItem(app_constants_1.default.SORT_PAGE.EXTERNAL_PROTECT_OFFLINE_TRACKING, JSON.stringify(storeParams));
    }
    get getStoreParamsExternalProtectedOff() {
        return app_util_1.default.toCamelCaseKey(JSON.parse(localStorage.getItem(app_constants_1.default.SORT_PAGE.EXTERNAL_PROTECT_OFFLINE_TRACKING)));
    }
    getReportInternalFiles(fileId, params) {
        // trim value
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.get(`/files/${fileId}/report/internal`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    getOpenInternalFiles(fileId, params) {
        // trim value
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.get(`/files/${fileId}/report/internal/open`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    getReportExternalFiles(fileId, params) {
        // trim value
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.get(`/files/${fileId}/report/external`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    getOpenExternalFiles(fileId, params) {
        // trim value
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.get(`/files/${fileId}/report/external/open`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
}
exports.FileReportService = FileReportService;
FileReportService.ɵfac = function FileReportService_Factory(t) { return new (t || FileReportService)(i0.ɵɵinject(i1.HttpClient)); };
FileReportService.ɵprov = i0.ɵɵdefineInjectable({ token: FileReportService, factory: FileReportService.ɵfac, providedIn: 'root' });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FileReportService, [{
        type: core_1.Injectable,
        args: [{
                providedIn: 'root'
            }]
    }], function () { return [{ type: i1.HttpClient }]; }, null); })();


/***/ }),

/***/ "./src/app/services/file-translation.service.ts":
/*!******************************************************!*\
  !*** ./src/app/services/file-translation.service.ts ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.FileTranslationService = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm2015/operators/index.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js"));
class FileTranslationService {
    constructor(http) {
        this.http = http;
    }
    startTranslateFile(params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.post(`/files/translation/start`, params)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    checkFileTranslateStatus(params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.get(`/files/translation/status`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
}
exports.FileTranslationService = FileTranslationService;
FileTranslationService.ɵfac = function FileTranslationService_Factory(t) { return new (t || FileTranslationService)(i0.ɵɵinject(i1.HttpClient)); };
FileTranslationService.ɵprov = i0.ɵɵdefineInjectable({ token: FileTranslationService, factory: FileTranslationService.ɵfac, providedIn: 'root' });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FileTranslationService, [{
        type: core_1.Injectable,
        args: [{
                providedIn: 'root'
            }]
    }], function () { return [{ type: i1.HttpClient }]; }, null); })();


/***/ }),

/***/ "./src/app/services/file.service.ts":
/*!******************************************!*\
  !*** ./src/app/services/file.service.ts ***!
  \******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.FileService = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const rxjs_1 = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm2015/index.js");
const operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm2015/operators/index.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js"));
class FileService {
    constructor(http) {
        this.http = http;
        this.fileWatch = new rxjs_1.BehaviorSubject('File Watched events');
    }
    getFileDetail(fileId, params) {
        // trim value
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.get(`/files/${fileId}`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    getTitlesInProject(projectId) {
        return this.http.get(`/files/titles/projects/${projectId}`)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    revokeLicense(fileId, params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.delete(`/files/${fileId}/drm/license`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    getFileOwner(fileId, params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.get(`/files/${fileId}/owner`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    getFileURLView(params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.get(`/files/view/link`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    getAllFilesVersion(fileId, params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.get(`/files/${fileId}/versions`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    deleteFileVersion(fileId, params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.delete(`/files/${fileId}/versions`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    reverseFileVersion(fileId, params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.post(`/files/${fileId}/versions/reverse`, params)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    checkEncodeStatus(params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.get(`/files/drm/encrypt/status`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    encryptFile(params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.post(`/files/drm/encrypt/license`, params)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    getFileDrmSettings(fileId, params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.get(`/files/${fileId}/drm/license`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    updateFileDrmSetting(params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.put(`/files/drm/license`, params)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    deleteDrmSetting(fileId, params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.delete(`/files/${fileId}/drm`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    emitFileWatch() {
        this.fileWatch.next('Emit file watch');
    }
    getRelatedFileInfo(params) {
        // trim value
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.get(`/files/related-info`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
}
exports.FileService = FileService;
FileService.ɵfac = function FileService_Factory(t) { return new (t || FileService)(i0.ɵɵinject(i1.HttpClient)); };
FileService.ɵprov = i0.ɵɵdefineInjectable({ token: FileService, factory: FileService.ɵfac, providedIn: 'root' });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FileService, [{
        type: core_1.Injectable,
        args: [{
                providedIn: 'root'
            }]
    }], function () { return [{ type: i1.HttpClient }]; }, null); })();


/***/ }),

/***/ "./src/app/services/folder.service.ts":
/*!********************************************!*\
  !*** ./src/app/services/folder.service.ts ***!
  \********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.FolderService = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm2015/operators/index.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js"));
class FolderService {
    constructor(http) {
        this.http = http;
    }
    inviteUserProject(params) {
        const folderId = (params.folder_id) ? params.folder_id : 0;
        // trim value
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.post(`/folders/${folderId}/collaborations`, params)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    inviteGroupProject(params) {
        const folderId = (params.folder_id) ? params.folder_id : 0;
        // trim value
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.post(`/folders/${folderId}/collaborations/groups`, params)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    getUserProjectRole(params) {
        const folderId = (params.folder_id) ? params.folder_id : 0;
        // trim value
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.get(`/users/folders/${folderId}/me`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    getFolder(params) {
        const folderId = (params.folder_id) ? params.folder_id : 0;
        // trim value
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.get(`/folders/${folderId}`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    doBrowseItems(params) {
        const folderId = (params.folder_id) ? params.folder_id : 0;
        // trim value
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.get(`/folders/${folderId}/items`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    getPath(params) {
        const folderId = (params.folder_id) ? params.folder_id : 0;
        // trim value
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.get(`/folders/${folderId}/path`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    createFolder(params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.post(`/folders`, params)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    renameItems(itemId, params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.put(`/folders/items/${itemId}/${params.type}`, params)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    copyItems(params) {
        return this.http.put(`/folders/items/copy`, params)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    moveItems(params) {
        return this.http.put(`/folders/items/move`, params)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    updateFolderSettings(folderId, params) {
        return this.http.put(`/folders/${folderId}/settings`, params)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    getRelatedFolderInfo(params) {
        // trim value
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.get(`/folders/related-info`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
}
exports.FolderService = FolderService;
FolderService.ɵfac = function FolderService_Factory(t) { return new (t || FolderService)(i0.ɵɵinject(i1.HttpClient)); };
FolderService.ɵprov = i0.ɵɵdefineInjectable({ token: FolderService, factory: FolderService.ɵfac, providedIn: 'root' });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FolderService, [{
        type: core_1.Injectable,
        args: [{
                providedIn: 'root'
            }]
    }], function () { return [{ type: i1.HttpClient }]; }, null); })();


/***/ }),

/***/ "./src/app/services/history.service.ts":
/*!*********************************************!*\
  !*** ./src/app/services/history.service.ts ***!
  \*********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.HistoryService = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm2015/operators/index.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js"));
class HistoryService {
    constructor(http) {
        this.http = http;
    }
    getHistory(teamId, params) {
        return this.http.get(`/histories/team/${teamId}`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    getActivities(projectId, params) {
        if (!params.lastUpdate) {
            delete params.lastUpdate;
        }
        return this.http.get(`/histories/project/${projectId}`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
}
exports.HistoryService = HistoryService;
HistoryService.ɵfac = function HistoryService_Factory(t) { return new (t || HistoryService)(i0.ɵɵinject(i1.HttpClient)); };
HistoryService.ɵprov = i0.ɵɵdefineInjectable({ token: HistoryService, factory: HistoryService.ɵfac, providedIn: 'root' });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(HistoryService, [{
        type: core_1.Injectable,
        args: [{
                providedIn: 'root'
            }]
    }], function () { return [{ type: i1.HttpClient }]; }, null); })();


/***/ }),

/***/ "./src/app/services/label.service.ts":
/*!*******************************************!*\
  !*** ./src/app/services/label.service.ts ***!
  \*******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.LabelService = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm2015/operators/index.js");
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../utilities/app-util */ "./src/utilities/app-util.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js"));
class LabelService {
    constructor(http) {
        this.http = http;
    }
    getLabelList(params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.get(`/labels`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    setStoreParams(storeParams) {
        localStorage.setItem(app_constants_1.default.SORT_PAGE.LABEL_LIST, JSON.stringify(storeParams));
    }
    get getStoreParams() {
        return app_util_1.default.toCamelCaseKey(JSON.parse(localStorage.getItem(app_constants_1.default.SORT_PAGE.LABEL_LIST)));
    }
    createLabel(params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.post(`/labels`, params)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    editLabel(id, params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.put(`/labels/${id}`, params)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    deleteLabel(params) {
        return this.http.delete(`/labels`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    getListLabelFile(fileId, params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.get(`/labels/files/${fileId}`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    attachLabel(fileId, params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.post(`/labels/files/${fileId}`, params)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    detachLabel(fileId, params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.delete(`/labels/files/${fileId}`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
}
exports.LabelService = LabelService;
LabelService.ɵfac = function LabelService_Factory(t) { return new (t || LabelService)(i0.ɵɵinject(i1.HttpClient)); };
LabelService.ɵprov = i0.ɵɵdefineInjectable({ token: LabelService, factory: LabelService.ɵfac, providedIn: 'root' });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LabelService, [{
        type: core_1.Injectable,
        args: [{
                providedIn: 'root'
            }]
    }], function () { return [{ type: i1.HttpClient }]; }, null); })();


/***/ }),

/***/ "./src/app/services/link.service.ts":
/*!******************************************!*\
  !*** ./src/app/services/link.service.ts ***!
  \******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.LinkService = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm2015/operators/index.js");
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../utilities/app-util */ "./src/utilities/app-util.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js"));
class LinkService {
    constructor(http) {
        this.http = http;
    }
    setStoreParams(storeParams) {
        localStorage.setItem(app_constants_1.default.SORT_PAGE.LINK_LIST, JSON.stringify(storeParams));
    }
    get getStoreParams() {
        return app_util_1.default.toCamelCaseKey(JSON.parse(localStorage.getItem(app_constants_1.default.SORT_PAGE.LINK_LIST)));
    }
    setStoreParamsDetail(storeParams) {
        localStorage.setItem(app_constants_1.default.SORT_PAGE.LINK_DETAIL, JSON.stringify(storeParams));
    }
    get getStoreParamsDetail() {
        return app_util_1.default.toCamelCaseKey(JSON.parse(localStorage.getItem(app_constants_1.default.SORT_PAGE.LINK_DETAIL)));
    }
    getLinkList(params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.get(`/links`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    getLinkInfo(id, params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.get(`/links/${id}`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    getLinkItems(id, params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.get(`/links/${id}/items`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    getSharedLinkRecipients(id, params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.get(`/links/${id}/address_books`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    editLink(id, params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.put(`/links/${id}`, params)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    deleteLink(params) {
        return this.http.delete(`/links`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    getLinkPackage(id, params) {
        // trim value
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.get(`/links/${id}/package`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    verifyPasswordLink(id, passwordEncode) {
        return this.http.get(`/links/${id}/share/${passwordEncode}`)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    getPinCode(id, params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.post(`/files/${id}/view/pin`, params)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    verifyPinCode(id, pinCode, params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.get(`/files/${id}/view/pin/${pinCode}`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    createLink(params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.post(`/links`, params)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    registerLicense(id, params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.post(`/links/${id}/share`, params)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
}
exports.LinkService = LinkService;
LinkService.ɵfac = function LinkService_Factory(t) { return new (t || LinkService)(i0.ɵɵinject(i1.HttpClient)); };
LinkService.ɵprov = i0.ɵɵdefineInjectable({ token: LinkService, factory: LinkService.ɵfac, providedIn: 'root' });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LinkService, [{
        type: core_1.Injectable,
        args: [{
                providedIn: 'root'
            }]
    }], function () { return [{ type: i1.HttpClient }]; }, null); })();


/***/ }),

/***/ "./src/app/services/notification.service.ts":
/*!**************************************************!*\
  !*** ./src/app/services/notification.service.ts ***!
  \**************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.NotificationService = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm2015/operators/index.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js"));
class NotificationService {
    constructor(http) {
        this.http = http;
    }
    getTeamMessage(teamId, params) {
        return this.http.get(`/notification/messages/team/${teamId}`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    getTeamMessageUnread(teamId, params) {
        return this.http.get(`/notification/messages/team/${teamId}/unread`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
}
exports.NotificationService = NotificationService;
NotificationService.ɵfac = function NotificationService_Factory(t) { return new (t || NotificationService)(i0.ɵɵinject(i1.HttpClient)); };
NotificationService.ɵprov = i0.ɵɵdefineInjectable({ token: NotificationService, factory: NotificationService.ɵfac, providedIn: 'root' });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NotificationService, [{
        type: core_1.Injectable,
        args: [{
                providedIn: 'root'
            }]
    }], function () { return [{ type: i1.HttpClient }]; }, null); })();


/***/ }),

/***/ "./src/app/services/package.service.ts":
/*!*********************************************!*\
  !*** ./src/app/services/package.service.ts ***!
  \*********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.PackageService = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm2015/operators/index.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js"));
class PackageService {
    constructor(http) {
        this.http = http;
    }
    getAllPackages() {
        return this.http.get(`/packages`, {}).pipe(operators_1.map((result) => {
            return result;
        }));
    }
    getPackageDetail(params) {
        return this.http
            .get(`/pricing/package/detail/public`, {
            params: params,
        })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    calculatePackagePrice(packageId, params) {
        return this.http
            .post(`/packages/${packageId}/calculate`, params)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    updatePackage(packageId, params) {
        return this.http.put(`/packages/${packageId}`, params).pipe(operators_1.map((result) => {
            return result;
        }));
    }
}
exports.PackageService = PackageService;
PackageService.ɵfac = function PackageService_Factory(t) { return new (t || PackageService)(i0.ɵɵinject(i1.HttpClient)); };
PackageService.ɵprov = i0.ɵɵdefineInjectable({ token: PackageService, factory: PackageService.ɵfac, providedIn: 'root' });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PackageService, [{
        type: core_1.Injectable,
        args: [{
                providedIn: 'root',
            }]
    }], function () { return [{ type: i1.HttpClient }]; }, null); })();


/***/ }),

/***/ "./src/app/services/payment.service.ts":
/*!*********************************************!*\
  !*** ./src/app/services/payment.service.ts ***!
  \*********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.PaymentService = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const http_1 = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js");
const operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm2015/operators/index.js");
const custom_http_param_encoder_1 = __webpack_require__(/*! ../../interceptor/custom.http.param.encoder */ "./src/interceptor/custom.http.param.encoder.ts");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js"));
class PaymentService {
    constructor(http) {
        this.http = http;
    }
    getListCard(obj) {
        let params = new http_1.HttpParams({ encoder: new custom_http_param_encoder_1.CustomHttpParamEncoder() });
        params = params.append('page_size', obj.page_size);
        params = params.append('page_number', obj.page_number);
        return this.http.get(`/payments/cards`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    addCard(teamId, params) {
        return this.http.post(`/payments/team/${teamId}/new_card`, params)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    deleteCard(cardId) {
        return this.http.delete(`/payments/card/${cardId}`, {})
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
}
exports.PaymentService = PaymentService;
PaymentService.ɵfac = function PaymentService_Factory(t) { return new (t || PaymentService)(i0.ɵɵinject(i1.HttpClient)); };
PaymentService.ɵprov = i0.ɵɵdefineInjectable({ token: PaymentService, factory: PaymentService.ɵfac, providedIn: 'root' });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaymentService, [{
        type: core_1.Injectable,
        args: [{
                providedIn: 'root'
            }]
    }], function () { return [{ type: i1.HttpClient }]; }, null); })();


/***/ }),

/***/ "./src/app/services/project.service.ts":
/*!*********************************************!*\
  !*** ./src/app/services/project.service.ts ***!
  \*********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ProjectService = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm2015/operators/index.js");
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../utilities/app-util */ "./src/utilities/app-util.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js"));
class ProjectService {
    constructor(http) {
        this.http = http;
    }
    setGetProjectsParams(getProjectParams) {
        localStorage.setItem(app_constants_1.default.SORT_PAGE.PROJECT_LIST, JSON.stringify(getProjectParams));
    }
    get getProjectsParams() {
        return app_util_1.default.toCamelCaseKey(JSON.parse(localStorage.getItem(app_constants_1.default.SORT_PAGE.PROJECT_LIST)));
    }
    getProjects(params) {
        // trim value
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.get(`/projects`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    getProjectDetail(projectId) {
        return this.http.get(`/projects/${projectId}`);
    }
    getProjectSettings(id) {
        return this.http.get(`/projects/${id}`)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    addProject(params) {
        return this.http.post(`/projects`, params).pipe(operators_1.map((result) => {
            return result;
        }));
    }
    updateProject(id, params) {
        return this.http.put(`/projects/${id}`, params).pipe(operators_1.map((result) => {
            return result;
        }));
    }
    deleteProject(id) {
        return this.http.delete(`/projects/${id}`).pipe(operators_1.map((result) => {
            return result;
        }));
    }
    copyProject(id) {
        return this.http.put(`/projects/${id}/copy`, {}).pipe(operators_1.map((result) => {
            return result;
        }));
    }
    transferProject(projectId, userId) {
        return this.http.put(`/projects/${projectId}/user/${userId}`, {}).pipe(operators_1.map((result) => {
            return result;
        }));
    }
    // https://dev-api.689cloud.com/api/projects/1bdaaae2ca25486ca14afc33502e4ddc/collaborators
    getCollaborators(projectId) {
        return this.http.get(`/projects/${projectId}/collaborators`)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    getUserFileProjectNumber(params) {
        // trim value
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.get(`/projects/user-file-info`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
}
exports.ProjectService = ProjectService;
ProjectService.ɵfac = function ProjectService_Factory(t) { return new (t || ProjectService)(i0.ɵɵinject(i1.HttpClient)); };
ProjectService.ɵprov = i0.ɵɵdefineInjectable({ token: ProjectService, factory: ProjectService.ɵfac, providedIn: 'root' });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ProjectService, [{
        type: core_1.Injectable,
        args: [{
                providedIn: 'root'
            }]
    }], function () { return [{ type: i1.HttpClient }]; }, null); })();


/***/ }),

/***/ "./src/app/services/team-setting.service.ts":
/*!**************************************************!*\
  !*** ./src/app/services/team-setting.service.ts ***!
  \**************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.TeamSettingService = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm2015/operators/index.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js"));
class TeamSettingService {
    constructor(http) {
        this.http = http;
    }
    getTeamSettingByType(params) {
        return this.http.get(`/team/settings`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    getPasswordPolicies(token) {
        return this.http.get('/team/settings/password_policy', { params: { auth_token: token } }).pipe(operators_1.map((result) => {
            return result;
        }));
    }
}
exports.TeamSettingService = TeamSettingService;
TeamSettingService.ɵfac = function TeamSettingService_Factory(t) { return new (t || TeamSettingService)(i0.ɵɵinject(i1.HttpClient)); };
TeamSettingService.ɵprov = i0.ɵɵdefineInjectable({ token: TeamSettingService, factory: TeamSettingService.ɵfac, providedIn: 'root' });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TeamSettingService, [{
        type: core_1.Injectable,
        args: [{
                providedIn: 'root'
            }]
    }], function () { return [{ type: i1.HttpClient }]; }, null); })();


/***/ }),

/***/ "./src/app/services/team.service.ts":
/*!******************************************!*\
  !*** ./src/app/services/team.service.ts ***!
  \******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.TeamService = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm2015/operators/index.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js"));
class TeamService {
    constructor(http) {
        this.http = http;
    }
    getTeamInfo(teamId) {
        return this.http.get(`/teams/${teamId}`, {})
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    signUpTeam(params) {
        return this.http.post(`/teams/signup`, params)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
}
exports.TeamService = TeamService;
TeamService.ɵfac = function TeamService_Factory(t) { return new (t || TeamService)(i0.ɵɵinject(i1.HttpClient)); };
TeamService.ɵprov = i0.ɵɵdefineInjectable({ token: TeamService, factory: TeamService.ɵfac, providedIn: 'root' });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TeamService, [{
        type: core_1.Injectable,
        args: [{
                providedIn: 'root'
            }]
    }], function () { return [{ type: i1.HttpClient }]; }, null); })();


/***/ }),

/***/ "./src/app/services/trash.service.ts":
/*!*******************************************!*\
  !*** ./src/app/services/trash.service.ts ***!
  \*******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.TrashService = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm2015/operators/index.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js"));
class TrashService {
    constructor(http) {
        this.http = http;
    }
    deleteItems(params) {
        return this.http.delete(`/trash/items`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    deleteForeverItems(params) {
        return this.http.delete(`/trash/items/physical`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    restoreItems(params) {
        return this.http.put(`/trash/items/restore`, params)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
}
exports.TrashService = TrashService;
TrashService.ɵfac = function TrashService_Factory(t) { return new (t || TrashService)(i0.ɵɵinject(i1.HttpClient)); };
TrashService.ɵprov = i0.ɵɵdefineInjectable({ token: TrashService, factory: TrashService.ɵfac, providedIn: 'root' });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TrashService, [{
        type: core_1.Injectable,
        args: [{
                providedIn: 'root'
            }]
    }], function () { return [{ type: i1.HttpClient }]; }, null); })();


/***/ }),

/***/ "./src/app/services/upload.service.ts":
/*!********************************************!*\
  !*** ./src/app/services/upload.service.ts ***!
  \********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.UploadService = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const rxjs_1 = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm2015/index.js");
const operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm2015/operators/index.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js"));
class UploadService {
    constructor(http) {
        this.http = http;
    }
    uploadFiles(formData) {
        return this.http.post(`/upload/files`, formData, {
            reportProgress: true,
            observe: 'events'
        }).pipe(operators_1.catchError(this.errorMgmt));
    }
    uploadCloudDropBox(params) {
        return this.http.post(`/upload/files/cloud`, params, {
            reportProgress: true,
            observe: 'events'
        })
            .pipe(operators_1.catchError(this.errorMgmt));
    }
    errorMgmt(error) {
        let errorMessage = '';
        if (error.error instanceof ErrorEvent) {
            // Get client-side error
            errorMessage = error.error.message;
        }
        else {
            // Get server-side error
            errorMessage = `Error Code: ${error.status}\nMessage: ${error.message}`;
        }
        return rxjs_1.throwError(errorMessage);
    }
}
exports.UploadService = UploadService;
UploadService.ɵfac = function UploadService_Factory(t) { return new (t || UploadService)(i0.ɵɵinject(i1.HttpClient)); };
UploadService.ɵprov = i0.ɵɵdefineInjectable({ token: UploadService, factory: UploadService.ɵfac, providedIn: 'root' });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UploadService, [{
        type: core_1.Injectable,
        args: [{
                providedIn: 'root'
            }]
    }], function () { return [{ type: i1.HttpClient }]; }, null); })();


/***/ }),

/***/ "./src/app/services/user-group.service.ts":
/*!************************************************!*\
  !*** ./src/app/services/user-group.service.ts ***!
  \************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.UserGroupService = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm2015/operators/index.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js"));
class UserGroupService {
    constructor(http) {
        this.http = http;
    }
    getAllGroup() {
        return this.http.get(`/user_groups/all`)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    getGroupsAllPaging(params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.get(`/user_groups`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    getUserInGroup(params) {
        Object.keys(params).map(k => params[k] = typeof params[k] === 'string' ? params[k].trim() : params[k]);
        return this.http.get(`/user_groups/users`, { params })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
}
exports.UserGroupService = UserGroupService;
UserGroupService.ɵfac = function UserGroupService_Factory(t) { return new (t || UserGroupService)(i0.ɵɵinject(i1.HttpClient)); };
UserGroupService.ɵprov = i0.ɵɵdefineInjectable({ token: UserGroupService, factory: UserGroupService.ɵfac, providedIn: 'root' });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UserGroupService, [{
        type: core_1.Injectable,
        args: [{
                providedIn: 'root'
            }]
    }], function () { return [{ type: i1.HttpClient }]; }, null); })();


/***/ }),

/***/ "./src/app/services/user.service.ts":
/*!******************************************!*\
  !*** ./src/app/services/user.service.ts ***!
  \******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.UserService = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm2015/operators/index.js");
const aes_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../utilities/aes.util */ "./src/utilities/aes.util.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/http.js"));
class UserService {
    constructor(http) {
        this.http = http;
    }
    getAllUsersInTeam(id) {
        return this.http.get(`/users/${id}/all`)
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    userChangePassword(params) {
        return this.http
            .put(`/users/${params.userId}/password`, {
            old_password: aes_util_1.default.hashMD5(params.currentPassword),
            new_password: aes_util_1.default.hashMD5(params.newPassword),
            confirm_password: aes_util_1.default.hashMD5(params.confirmPassword),
        })
            .pipe(operators_1.map((result) => {
            return result;
        }));
    }
    updateUser(userId, params) {
        return this.http.put(`/users/${userId}`, params).pipe(operators_1.map((result) => {
            return result;
        }));
    }
}
exports.UserService = UserService;
UserService.ɵfac = function UserService_Factory(t) { return new (t || UserService)(i0.ɵɵinject(i1.HttpClient)); };
UserService.ɵprov = i0.ɵɵdefineInjectable({ token: UserService, factory: UserService.ɵfac, providedIn: 'root' });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UserService, [{
        type: core_1.Injectable,
        args: [{
                providedIn: 'root'
            }]
    }], function () { return [{ type: i1.HttpClient }]; }, null); })();


/***/ }),

/***/ "./src/app/shared/autofocus.directive.ts":
/*!***********************************************!*\
  !*** ./src/app/shared/autofocus.directive.ts ***!
  \***********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.AutofocusDirective = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
class AutofocusDirective {
    constructor(el) {
        this.el = el;
        this.focus = true;
    }
    ngOnInit() {
        if (this.focus) {
            // Otherwise Angular throws error: Expression has changed after it was checked.
            window.setTimeout(() => {
                this.el.nativeElement.focus(); // For SSR (server side rendering) this is not safe.
                // Use: https://github.com/angular/angular/issues/15008#issuecomment-285141070)
            });
        }
    }
    set appAutofocus(condition) {
        this.focus = condition !== false;
    }
}
exports.AutofocusDirective = AutofocusDirective;
AutofocusDirective.ɵfac = function AutofocusDirective_Factory(t) { return new (t || AutofocusDirective)(i0.ɵɵdirectiveInject(i0.ElementRef)); };
AutofocusDirective.ɵdir = i0.ɵɵdefineDirective({ type: AutofocusDirective, selectors: [["", "appAutofocus", ""]], inputs: { appAutofocus: "appAutofocus" } });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AutofocusDirective, [{
        type: core_1.Directive,
        args: [{
                selector: '[appAutofocus]'
            }]
    }], function () { return [{ type: i0.ElementRef }]; }, { appAutofocus: [{
            type: core_1.Input
        }] }); })();


/***/ }),

/***/ "./src/app/shared/components/payment-card-form/payment-card-form.component.ts":
/*!************************************************************************************!*\
  !*** ./src/app/shared/components/payment-card-form/payment-card-form.component.ts ***!
  \************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.PaymentCardFormComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
const stripe_js_1 = __webpack_require__(/*! @stripe/stripe-js */ "./node_modules/@stripe/stripe-js/dist/stripe.esm.js");
const environment_1 = __webpack_require__(/*! ../../../../environments/environment */ "./src/environments/environment.ts");
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../../../../utilities/app-util */ "./src/utilities/app-util.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
function PaymentCardFormComponent_h3_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "h3");
    i0.ɵɵtext(1);
    i0.ɵɵpipe(2, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, "label.add_payment_card"));
} }
function PaymentCardFormComponent_div_10_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelement(1, "small", 15);
    i0.ɵɵelementEnd();
} }
function PaymentCardFormComponent_div_10_div_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelement(1, "small", 16);
    i0.ɵɵelementEnd();
} }
function PaymentCardFormComponent_div_10_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 14);
    i0.ɵɵtemplate(1, PaymentCardFormComponent_div_10_div_1_Template, 2, 0, "div", 1);
    i0.ɵɵtemplate(2, PaymentCardFormComponent_div_10_div_2_Template, 2, 0, "div", 1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r1.f.holderName.errors == null ? null : ctx_r1.f.holderName.errors.required);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r1.f.holderName.errors == null ? null : ctx_r1.f.holderName.errors.pattern);
} }
const _c0 = function (a0) { return { "ng-invalid ng-dirty": a0 }; };
const _c1 = function (a0) { return { "invalid-form": a0 }; };
class PaymentCardFormComponent {
    constructor(fb, translate, messageService) {
        this.fb = fb;
        this.translate = translate;
        this.messageService = messageService;
        this.showTitle = true;
        this.cardCreated = new core_1.EventEmitter();
        this.cancelled = new core_1.EventEmitter();
        this.confirmPayment = new core_1.EventEmitter();
        this.stripeError = false;
        this.isProcessing = false;
        this.utils = app_util_1.default;
    }
    ngOnInit() {
        this.initForm();
    }
    ngAfterViewInit() {
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            try {
                yield this.initStripe();
            }
            catch (error) {
                console.error('Error in ngAfterViewInit:', error);
                this.messageService.add({
                    severity: 'error',
                    detail: this.utils.translate(this.translate, 'default_toast.stripe_initialization_error'),
                });
            }
        });
    }
    ngOnDestroy() {
        if (this.card) {
            this.card.destroy();
        }
    }
    initForm() {
        this.cardForm = this.fb.group({
            holderName: ['', [forms_1.Validators.required, forms_1.Validators.pattern(/^[^<>]*$/)]],
        });
    }
    initStripe() {
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            this.stripe = yield stripe_js_1.loadStripe(environment_1.environment.PUBLIC_KEY_STRIPE);
            const elements = this.stripe.elements();
            const style = {
                base: {
                    color: '#32325d',
                    fontFamily: '"Helvetica Neue", Helvetica, sans-serif',
                    fontSmoothing: 'antialiased',
                    fontSize: '16px',
                    '::placeholder': {
                        color: '#aab7c4',
                    },
                },
                invalid: {
                    color: '#B00020',
                    iconColor: '#B00020',
                },
            };
            // Create an instance of the card Element.
            this.card = elements.create('card', {
                hidePostalCode: true,
                style,
            });
            this.card.mount('#card-element');
            // Add an instance of the card Element into the `card-element`
            this.card.on('change', (event) => {
                const displayError = document.getElementById('card-errors');
                if (event.error) {
                    this.stripeError = true;
                    displayError.textContent = app_util_1.default.translate(this.translate, 'stripe_error.' + event.error.code.toUpperCase());
                }
                else {
                    this.stripeError = false;
                    displayError.textContent = '';
                }
            });
        });
    }
    // Handle form submission and validation
    validateAndConfirm() {
        if (this.cardForm.invalid) {
            // Mark all fields as touched để hiển thị lỗi
            Object.keys(this.cardForm.controls).forEach((key) => {
                const control = this.cardForm.get(key);
                control.markAsTouched();
            });
            return;
        }
        // Emit event with form and card details
        this.confirmPayment.emit({
            form: this.cardForm,
            card: this.card,
        });
    }
    // Handle card payment after confirmation
    processCardPayment(stripeDetails) {
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            this.isProcessing = true;
            try {
                const { token, error } = yield this.stripe.createToken(stripeDetails.card, {
                    name: stripeDetails.form.get('holderName').value,
                });
                if (error) {
                    const displayError = document.getElementById('card-errors');
                    displayError.textContent = error.message;
                    this.stripeError = true;
                }
                else {
                    // Emit the token to the parent component
                    this.cardCreated.emit(token);
                    // Reset the form
                    // this.cardForm.reset();
                    // this.card.clear();
                }
            }
            catch (error) {
                console.error('Error creating card token:', error);
                const displayError = document.getElementById('card-errors');
                displayError.textContent = this.utils.translate(this.translate, 'message.card_creation_error');
                this.stripeError = true;
            }
            finally {
                this.isProcessing = false;
            }
        });
    }
    cancel() {
        this.cancelled.emit();
        this.cardForm.reset();
        if (this.card) {
            this.card.clear();
        }
    }
    // Getter cho form controls
    get f() {
        return this.cardForm.controls;
    }
}
exports.PaymentCardFormComponent = PaymentCardFormComponent;
PaymentCardFormComponent.ɵfac = function PaymentCardFormComponent_Factory(t) { return new (t || PaymentCardFormComponent)(i0.ɵɵdirectiveInject(i1.FormBuilder), i0.ɵɵdirectiveInject(i2.TranslateService), i0.ɵɵdirectiveInject(i3.MessageService)); };
PaymentCardFormComponent.ɵcmp = i0.ɵɵdefineComponent({ type: PaymentCardFormComponent, selectors: [["app-payment-card-form"]], inputs: { showTitle: "showTitle", userInfo: "userInfo" }, outputs: { cardCreated: "cardCreated", cancelled: "cancelled", confirmPayment: "confirmPayment" }, decls: 19, vars: 20, consts: [[1, "card-form-container"], [4, "ngIf"], [3, "formGroup", "ngSubmit"], [1, "p-fluid"], [1, "p-field"], [1, "p-float-label"], ["id", "holderName", "type", "text", "pInputText", "", "formControlName", "holderName", 3, "ngClass"], ["for", "holderName"], ["class", "p-error p-text-left", 4, "ngIf"], ["id", "card-element", 3, "ngClass"], ["id", "card-errors", "role", "alert", 1, "p-error"], [1, "form-actions", "p-d-flex", "p-jc-end", "p-mt-3"], ["pButton", "", "type", "button", 1, "p-button-text", "p-button-raised", "p-mr-2", 3, "label", "click"], ["pButton", "", "type", "submit", 3, "disabled", "loading", "label"], [1, "p-error", "p-text-left"], ["translate", "validation.require"], ["translate", "validation.special_chars"]], template: function PaymentCardFormComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵtemplate(1, PaymentCardFormComponent_h3_1_Template, 3, 3, "h3", 1);
        i0.ɵɵelementStart(2, "form", 2);
        i0.ɵɵlistener("ngSubmit", function PaymentCardFormComponent_Template_form_ngSubmit_2_listener() { return ctx.validateAndConfirm(); });
        i0.ɵɵelementStart(3, "div", 3);
        i0.ɵɵelementStart(4, "div", 4);
        i0.ɵɵelementStart(5, "span", 5);
        i0.ɵɵelement(6, "input", 6);
        i0.ɵɵelementStart(7, "label", 7);
        i0.ɵɵtext(8);
        i0.ɵɵpipe(9, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(10, PaymentCardFormComponent_div_10_Template, 3, 2, "div", 8);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(11, "div", 4);
        i0.ɵɵelement(12, "div", 9);
        i0.ɵɵelement(13, "div", 10);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(14, "div", 11);
        i0.ɵɵelementStart(15, "button", 12);
        i0.ɵɵlistener("click", function PaymentCardFormComponent_Template_button_click_15_listener() { return ctx.cancel(); });
        i0.ɵɵpipe(16, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelement(17, "button", 13);
        i0.ɵɵpipe(18, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.showTitle);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("formGroup", ctx.cardForm);
        i0.ɵɵadvance(4);
        i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(16, _c0, ctx.f.holderName.invalid && ctx.f.holderName.touched));
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(9, 10, "label.holder_name"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.f.holderName.invalid && ctx.f.holderName.touched);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(18, _c1, ctx.stripeError));
        i0.ɵɵadvance(3);
        i0.ɵɵproperty("label", i0.ɵɵpipeBind1(16, 12, "button.cancel"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("disabled", ctx.cardForm.invalid || ctx.isProcessing)("loading", ctx.isProcessing)("label", i0.ɵɵpipeBind1(18, 14, "button.save"));
    } }, directives: [i4.NgIf, i1.ɵangular_packages_forms_forms_y, i1.NgControlStatusGroup, i1.FormGroupDirective, i1.DefaultValueAccessor, i5.InputText, i1.NgControlStatus, i1.FormControlName, i4.NgClass, i6.ButtonDirective, i2.TranslateDirective], pipes: [i2.TranslatePipe], styles: ["#card-element[_ngcontent-%COMP%] {\n  padding: 1rem;\n  border: 1px solid #ced4da;\n  border-radius: 4px;\n  background: white;\n  box-sizing: border-box;\n  margin-top: 0.5rem;\n}\n#card-element.invalid-form[_ngcontent-%COMP%] {\n  border-color: #f44336;\n}\n[_nghost-%COMP%]     .StripeElement--focus {\n  border-color: #3f51b5;\n}\n#card-errors[_ngcontent-%COMP%] {\n  margin-top: 0.25rem;\n  font-size: 0.75rem;\n}\n.processing-overlay[_ngcontent-%COMP%] {\n  position: absolute;\n  top: 0;\n  left: 0;\n  width: 100%;\n  height: 100%;\n  background-color: rgba(255, 255, 255, 0.7);\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  z-index: 10;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvc2hhcmVkL2NvbXBvbmVudHMvcGF5bWVudC1jYXJkLWZvcm0vcGF5bWVudC1jYXJkLWZvcm0uY29tcG9uZW50LnNjc3MiLCJzcmMvYXBwL3NoYXJlZC9jb21wb25lbnRzL3BheW1lbnQtY2FyZC1mb3JtL3BheW1lbnQtY2FyZC1mb3JtLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsYUFBQTtFQUNBLHlCQUFBO0VBQ0Esa0JBQUE7RUFDQSxpQkFBQTtFQUNBLHNCQUFBO0VBQ0Esa0JBQUE7QUNDRjtBRENFO0VBQ0UscUJBQUE7QUNDSjtBREdBO0VBQ0UscUJBQUE7QUNBRjtBREdBO0VBQ0UsbUJBQUE7RUFDQSxrQkFBQTtBQ0FGO0FER0E7RUFDRSxrQkFBQTtFQUNBLE1BQUE7RUFDQSxPQUFBO0VBQ0EsV0FBQTtFQUNBLFlBQUE7RUFDQSwwQ0FBQTtFQUNBLGFBQUE7RUFDQSx1QkFBQTtFQUNBLG1CQUFBO0VBQ0EsV0FBQTtBQ0FGIiwiZmlsZSI6InNyYy9hcHAvc2hhcmVkL2NvbXBvbmVudHMvcGF5bWVudC1jYXJkLWZvcm0vcGF5bWVudC1jYXJkLWZvcm0uY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyIjY2FyZC1lbGVtZW50IHtcbiAgcGFkZGluZzogMXJlbTtcbiAgYm9yZGVyOiAxcHggc29saWQgI2NlZDRkYTtcbiAgYm9yZGVyLXJhZGl1czogNHB4O1xuICBiYWNrZ3JvdW5kOiB3aGl0ZTtcbiAgYm94LXNpemluZzogYm9yZGVyLWJveDtcbiAgbWFyZ2luLXRvcDogMC41cmVtO1xuICBcbiAgJi5pbnZhbGlkLWZvcm0ge1xuICAgIGJvcmRlci1jb2xvcjogI2Y0NDMzNjtcbiAgfVxufVxuXG46aG9zdCA6Om5nLWRlZXAgLlN0cmlwZUVsZW1lbnQtLWZvY3VzIHtcbiAgYm9yZGVyLWNvbG9yOiAjM2Y1MWI1O1xufVxuXG4jY2FyZC1lcnJvcnMge1xuICBtYXJnaW4tdG9wOiAwLjI1cmVtO1xuICBmb250LXNpemU6IDAuNzVyZW07XG59XG5cbi5wcm9jZXNzaW5nLW92ZXJsYXkge1xuICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gIHRvcDogMDtcbiAgbGVmdDogMDtcbiAgd2lkdGg6IDEwMCU7XG4gIGhlaWdodDogMTAwJTtcbiAgYmFja2dyb3VuZC1jb2xvcjogcmdiYSgyNTUsIDI1NSwgMjU1LCAwLjcpO1xuICBkaXNwbGF5OiBmbGV4O1xuICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcbiAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgei1pbmRleDogMTA7XG59IiwiI2NhcmQtZWxlbWVudCB7XG4gIHBhZGRpbmc6IDFyZW07XG4gIGJvcmRlcjogMXB4IHNvbGlkICNjZWQ0ZGE7XG4gIGJvcmRlci1yYWRpdXM6IDRweDtcbiAgYmFja2dyb3VuZDogd2hpdGU7XG4gIGJveC1zaXppbmc6IGJvcmRlci1ib3g7XG4gIG1hcmdpbi10b3A6IDAuNXJlbTtcbn1cbiNjYXJkLWVsZW1lbnQuaW52YWxpZC1mb3JtIHtcbiAgYm9yZGVyLWNvbG9yOiAjZjQ0MzM2O1xufVxuXG46aG9zdCA6Om5nLWRlZXAgLlN0cmlwZUVsZW1lbnQtLWZvY3VzIHtcbiAgYm9yZGVyLWNvbG9yOiAjM2Y1MWI1O1xufVxuXG4jY2FyZC1lcnJvcnMge1xuICBtYXJnaW4tdG9wOiAwLjI1cmVtO1xuICBmb250LXNpemU6IDAuNzVyZW07XG59XG5cbi5wcm9jZXNzaW5nLW92ZXJsYXkge1xuICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gIHRvcDogMDtcbiAgbGVmdDogMDtcbiAgd2lkdGg6IDEwMCU7XG4gIGhlaWdodDogMTAwJTtcbiAgYmFja2dyb3VuZC1jb2xvcjogcmdiYSgyNTUsIDI1NSwgMjU1LCAwLjcpO1xuICBkaXNwbGF5OiBmbGV4O1xuICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcbiAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgei1pbmRleDogMTA7XG59Il19 */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaymentCardFormComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-payment-card-form',
                templateUrl: './payment-card-form.component.html',
                styleUrls: ['./payment-card-form.component.scss'],
            }]
    }], function () { return [{ type: i1.FormBuilder }, { type: i2.TranslateService }, { type: i3.MessageService }]; }, { showTitle: [{
            type: core_1.Input
        }], userInfo: [{
            type: core_1.Input
        }], cardCreated: [{
            type: core_1.Output
        }], cancelled: [{
            type: core_1.Output
        }], confirmPayment: [{
            type: core_1.Output
        }] }); })();


/***/ }),

/***/ "./src/app/shared/password-form/password-form.component.ts":
/*!*****************************************************************!*\
  !*** ./src/app/shared/password-form/password-form.component.ts ***!
  \*****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.PasswordFormComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
const confirmed_validator_1 = __webpack_require__(/*! ../../../utilities/confirmed.validator */ "./src/utilities/confirmed.validator.ts");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js"));
const i6 = tslib_1.__importStar(__webpack_require__(/*! primeng/inputtext */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-inputtext.js"));
const i7 = tslib_1.__importStar(__webpack_require__(/*! primeng/ripple */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-ripple.js"));
const i8 = tslib_1.__importStar(__webpack_require__(/*! primeng/button */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-button.js"));
function PasswordFormComponent_div_4_div_6_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelement(1, "small", 19);
    i0.ɵɵelementEnd();
} }
function PasswordFormComponent_div_4_div_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 17);
    i0.ɵɵtemplate(1, PasswordFormComponent_div_4_div_6_div_1_Template, 2, 0, "div", 18);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r5 = i0.ɵɵnextContext(2);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r5.f.currentPassword.errors.required);
} }
function PasswordFormComponent_div_4_Template(rf, ctx) { if (rf & 1) {
    const _r8 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "div", 5);
    i0.ɵɵelementStart(1, "span", 6);
    i0.ɵɵelementStart(2, "input", 15);
    i0.ɵɵlistener("ngModelChange", function PasswordFormComponent_div_4_Template_input_ngModelChange_2_listener($event) { i0.ɵɵrestoreView(_r8); const ctx_r7 = i0.ɵɵnextContext(); return ctx_r7.passwordFormModel.currentPassword = $event; });
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(3, "label", 16);
    i0.ɵɵtext(4);
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementEnd();
    i0.ɵɵtemplate(6, PasswordFormComponent_div_4_div_6_Template, 2, 1, "div", 9);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵclassProp("ng-dirty", ctx_r0.f.currentPassword.invalid && (ctx_r0.f.currentPassword.dirty || ctx_r0.f.currentPassword.touched));
    i0.ɵɵpropertyInterpolate("required", ctx_r0.inputCurrentPassword);
    i0.ɵɵproperty("ngModel", ctx_r0.passwordFormModel == null ? null : ctx_r0.passwordFormModel.currentPassword);
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(5, 6, "label.current_password"));
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngIf", ctx_r0.f.currentPassword.invalid && (ctx_r0.f.currentPassword.dirty || ctx_r0.f.currentPassword.touched));
} }
function PasswordFormComponent_div_11_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelement(1, "small", 19);
    i0.ɵɵelementEnd();
} }
function PasswordFormComponent_div_11_div_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelement(1, "small", 20);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("translate", "validation.pattern");
} }
function PasswordFormComponent_div_11_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 17);
    i0.ɵɵtemplate(1, PasswordFormComponent_div_11_div_1_Template, 2, 0, "div", 18);
    i0.ɵɵtemplate(2, PasswordFormComponent_div_11_div_2_Template, 2, 1, "div", 18);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r1.f.newPassword.errors.required);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r1.f.newPassword.errors.pattern);
} }
function PasswordFormComponent_div_18_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelement(1, "small", 19);
    i0.ɵɵelementEnd();
} }
function PasswordFormComponent_div_18_div_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div");
    i0.ɵɵelement(1, "small", 21);
    i0.ɵɵelementEnd();
} }
function PasswordFormComponent_div_18_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 17);
    i0.ɵɵtemplate(1, PasswordFormComponent_div_18_div_1_Template, 2, 0, "div", 18);
    i0.ɵɵtemplate(2, PasswordFormComponent_div_18_div_2_Template, 2, 0, "div", 18);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r2.f.confirmNewPassword.errors.required);
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", ctx_r2.f.confirmNewPassword.errors.confirmedValidator);
} }
function PasswordFormComponent_button_20_Template(rf, ctx) { if (rf & 1) {
    const _r14 = i0.ɵɵgetCurrentView();
    i0.ɵɵelementStart(0, "button", 22);
    i0.ɵɵlistener("click", function PasswordFormComponent_button_20_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r14); const ctx_r13 = i0.ɵɵnextContext(); return ctx_r13.cancel(); });
    i0.ɵɵpipe(1, "translate");
    i0.ɵɵelementEnd();
} if (rf & 2) {
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(1, 1, "button.cancel"));
} }
function PasswordFormComponent_button_21_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelement(0, "button", 23);
    i0.ɵɵpipe(1, "translate");
} if (rf & 2) {
    i0.ɵɵpropertyInterpolate("label", i0.ɵɵpipeBind1(1, 1, "button.save"));
} }
class PasswordFormComponent {
    constructor(fb, translateService, messageService, router) {
        this.fb = fb;
        this.translateService = translateService;
        this.messageService = messageService;
        this.router = router;
        this.onCancel = new core_1.EventEmitter;
        this.onComplete = new core_1.EventEmitter;
        this.inputCurrentPassword = false;
        this.showButton = true;
        this.showCancel = false;
        this.form = new forms_1.FormGroup({});
        this.passwordFormModel = {
            currentPassword: '',
            newPassword: '',
            confirmNewPassword: ''
        };
        this.form = fb.group({
            currentPassword: [''],
            newPassword: ['', [forms_1.Validators.required]],
            confirmNewPassword: ['', [forms_1.Validators.required]]
        }, {
            validator: confirmed_validator_1.ConfirmedValidator('newPassword', 'confirmNewPassword')
        });
    }
    get f() {
        return this.form.controls;
    }
    ngOnInit() {
    }
    onSubmit() {
        this.form.markAllAsTouched();
        if (this.form.invalid) {
            return;
        }
        this.onComplete.emit(this.passwordFormModel);
    }
    cancel() {
        if (this.onCancel) {
            this.onCancel.emit(true);
        }
    }
}
exports.PasswordFormComponent = PasswordFormComponent;
PasswordFormComponent.ɵfac = function PasswordFormComponent_Factory(t) { return new (t || PasswordFormComponent)(i0.ɵɵdirectiveInject(i1.FormBuilder), i0.ɵɵdirectiveInject(i2.TranslateService), i0.ɵɵdirectiveInject(i3.MessageService), i0.ɵɵdirectiveInject(i4.Router)); };
PasswordFormComponent.ɵcmp = i0.ɵɵdefineComponent({ type: PasswordFormComponent, selectors: [["app-password-form"]], inputs: { inputCurrentPassword: "inputCurrentPassword", showButton: "showButton", showCancel: "showCancel", passwordPolicies: "passwordPolicies" }, outputs: { onCancel: "onCancel", onComplete: "onComplete" }, decls: 22, vars: 21, consts: [["role", "form", "autocomplete", "off", 3, "formGroup", "ngSubmit"], [1, "p-grid"], [1, "p-col-12"], [1, "p-fluid", "p-pt-2"], ["class", "p-field", 4, "ngIf"], [1, "p-field"], [1, "p-float-label"], ["id", "new-password", "type", "password", "pInputText", "", "name", "newPassword", "formControlName", "newPassword", 3, "ngModel", "maxlength", "pattern", "ngModelChange"], ["for", "new-password"], ["class", "p-error p-text-left", 4, "ngIf"], ["id", "confirm-new-password", "type", "password", "pInputText", "", "name", "confirmNewPassword", "formControlName", "confirmNewPassword", 3, "ngModel", "maxlength", "ngModelChange"], ["for", "confirm-new-password"], [1, "p-field", "p-text-right"], ["pRipple", "", "pButton", "", "type", "button", "icon", "fas fa-times p-mr-2", "class", "p-mr-2 p-button-warning", 3, "label", "click", 4, "ngIf"], ["pRipple", "", "pButton", "", "type", "submit", "icon", "pi pi-check p-mr-2", "iconPos", "left", 3, "label", 4, "ngIf"], ["id", "current-password", "type", "password", "pInputText", "", "name", "currentPassword", "formControlName", "currentPassword", "maxlength", "128", "autocomplete", "disabled", 3, "ngModel", "required", "ngModelChange"], ["for", "current-password"], [1, "p-error", "p-text-left"], [4, "ngIf"], ["translate", "validation.require"], [3, "translate"], ["translate", "validation.confirm_password"], ["pRipple", "", "pButton", "", "type", "button", "icon", "fas fa-times p-mr-2", 1, "p-mr-2", "p-button-warning", 3, "label", "click"], ["pRipple", "", "pButton", "", "type", "submit", "icon", "pi pi-check p-mr-2", "iconPos", "left", 3, "label"]], template: function PasswordFormComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "form", 0);
        i0.ɵɵlistener("ngSubmit", function PasswordFormComponent_Template_form_ngSubmit_0_listener() { return ctx.onSubmit(); });
        i0.ɵɵelementStart(1, "div", 1);
        i0.ɵɵelementStart(2, "div", 2);
        i0.ɵɵelementStart(3, "div", 3);
        i0.ɵɵtemplate(4, PasswordFormComponent_div_4_Template, 7, 8, "div", 4);
        i0.ɵɵelementStart(5, "div", 5);
        i0.ɵɵelementStart(6, "span", 6);
        i0.ɵɵelementStart(7, "input", 7);
        i0.ɵɵlistener("ngModelChange", function PasswordFormComponent_Template_input_ngModelChange_7_listener($event) { return ctx.passwordFormModel.newPassword = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(8, "label", 8);
        i0.ɵɵtext(9);
        i0.ɵɵpipe(10, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(11, PasswordFormComponent_div_11_Template, 3, 2, "div", 9);
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(12, "div", 5);
        i0.ɵɵelementStart(13, "span", 6);
        i0.ɵɵelementStart(14, "input", 10);
        i0.ɵɵlistener("ngModelChange", function PasswordFormComponent_Template_input_ngModelChange_14_listener($event) { return ctx.passwordFormModel.confirmNewPassword = $event; });
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(15, "label", 11);
        i0.ɵɵtext(16);
        i0.ɵɵpipe(17, "translate");
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(18, PasswordFormComponent_div_18_Template, 3, 2, "div", 9);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementStart(19, "div", 12);
        i0.ɵɵtemplate(20, PasswordFormComponent_button_20_Template, 2, 3, "button", 13);
        i0.ɵɵtemplate(21, PasswordFormComponent_button_21_Template, 2, 3, "button", 14);
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵproperty("formGroup", ctx.form);
        i0.ɵɵadvance(4);
        i0.ɵɵproperty("ngIf", ctx.inputCurrentPassword);
        i0.ɵɵadvance(3);
        i0.ɵɵclassProp("ng-dirty", ctx.f.newPassword.invalid && (ctx.f.newPassword.dirty || ctx.f.newPassword.touched));
        i0.ɵɵpropertyInterpolate("maxlength", ctx.passwordPolicies ? ctx.passwordPolicies.max : 64);
        i0.ɵɵproperty("ngModel", ctx.passwordFormModel == null ? null : ctx.passwordFormModel.newPassword)("pattern", ctx.passwordPolicies ? ctx.passwordPolicies.regex : "");
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(10, 17, "label.new_password"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.f.newPassword.invalid && (ctx.f.newPassword.dirty || ctx.f.newPassword.touched));
        i0.ɵɵadvance(3);
        i0.ɵɵclassProp("ng-dirty", ctx.f.confirmNewPassword.invalid && (ctx.f.confirmNewPassword.dirty || ctx.f.confirmNewPassword.touched));
        i0.ɵɵpropertyInterpolate("maxlength", ctx.passwordPolicies ? ctx.passwordPolicies.max : 64);
        i0.ɵɵproperty("ngModel", ctx.passwordFormModel == null ? null : ctx.passwordFormModel.confirmNewPassword);
        i0.ɵɵadvance(2);
        i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(17, 19, "label.confirm_password"));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.f.confirmNewPassword.invalid && (ctx.f.confirmNewPassword.dirty || ctx.f.confirmNewPassword.touched));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.showCancel && ctx.showButton);
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.showButton);
    } }, directives: [i1.ɵangular_packages_forms_forms_y, i1.NgControlStatusGroup, i1.FormGroupDirective, i5.NgIf, i1.DefaultValueAccessor, i6.InputText, i1.NgControlStatus, i1.FormControlName, i1.MaxLengthValidator, i1.PatternValidator, i1.RequiredValidator, i2.TranslateDirective, i7.Ripple, i8.ButtonDirective], pipes: [i2.TranslatePipe], styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL3NoYXJlZC9wYXNzd29yZC1mb3JtL3Bhc3N3b3JkLWZvcm0uY29tcG9uZW50LnNjc3MifQ== */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PasswordFormComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-password-form',
                templateUrl: './password-form.component.html',
                styleUrls: ['./password-form.component.scss']
            }]
    }], function () { return [{ type: i1.FormBuilder }, { type: i2.TranslateService }, { type: i3.MessageService }, { type: i4.Router }]; }, { onCancel: [{
            type: core_1.Output
        }], onComplete: [{
            type: core_1.Output
        }], inputCurrentPassword: [{
            type: core_1.Input
        }], showButton: [{
            type: core_1.Input
        }], showCancel: [{
            type: core_1.Input
        }], passwordPolicies: [{
            type: core_1.Input
        }] }); })();


/***/ }),

/***/ "./src/app/shared/shared.module.ts":
/*!*****************************************!*\
  !*** ./src/app/shared/shared.module.ts ***!
  \*****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.SharedModule = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const common_1 = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/__ivy_ngcc__/fesm2015/common.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
const ng_select_1 = __webpack_require__(/*! @ng-select/ng-select */ "./node_modules/@ng-select/ng-select/__ivy_ngcc__/fesm2015/ng-select-ng-select.js");
const core_2 = __webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js");
const ng_click_outside_1 = __webpack_require__(/*! ng-click-outside */ "./node_modules/ng-click-outside/__ivy_ngcc__/lib_esmodule/index.js");
const ng_recaptcha_1 = __webpack_require__(/*! ng-recaptcha */ "./node_modules/ng-recaptcha/__ivy_ngcc__/fesm2015/ng-recaptcha.js");
const ng2_pdfjs_viewer_1 = __webpack_require__(/*! ng2-pdfjs-viewer */ "./node_modules/ng2-pdfjs-viewer/__ivy_ngcc__/index.js");
const prime_ng_module_1 = __webpack_require__(/*! ../prime-ng/prime-ng.module */ "./src/app/prime-ng/prime-ng.module.ts");
const payment_card_form_component_1 = __webpack_require__(/*! ./components/payment-card-form/payment-card-form.component */ "./src/app/shared/components/payment-card-form/payment-card-form.component.ts");
const password_form_component_1 = __webpack_require__(/*! ./password-form/password-form.component */ "./src/app/shared/password-form/password-form.component.ts");
const spinner_overlay_component_1 = __webpack_require__(/*! ./spinner-overlay/spinner-overlay.component */ "./src/app/shared/spinner-overlay/spinner-overlay.component.ts");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
class SharedModule {
}
exports.SharedModule = SharedModule;
SharedModule.ɵmod = i0.ɵɵdefineNgModule({ type: SharedModule });
SharedModule.ɵinj = i0.ɵɵdefineInjector({ factory: function SharedModule_Factory(t) { return new (t || SharedModule)(); }, imports: [[
            common_1.CommonModule,
            forms_1.FormsModule,
            forms_1.ReactiveFormsModule,
            prime_ng_module_1.PrimeNgModule,
            core_2.TranslateModule,
            ng2_pdfjs_viewer_1.PdfJsViewerModule,
            ng_click_outside_1.ClickOutsideModule,
            ng_recaptcha_1.RecaptchaModule,
        ], forms_1.FormsModule,
        forms_1.ReactiveFormsModule,
        prime_ng_module_1.PrimeNgModule,
        core_2.TranslateModule,
        ng_select_1.NgSelectModule,
        ng2_pdfjs_viewer_1.PdfJsViewerModule,
        ng_click_outside_1.ClickOutsideModule,
        ng_recaptcha_1.RecaptchaModule] });
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(SharedModule, { declarations: [spinner_overlay_component_1.SpinnerOverlayComponent,
        password_form_component_1.PasswordFormComponent,
        payment_card_form_component_1.PaymentCardFormComponent], imports: [common_1.CommonModule,
        forms_1.FormsModule,
        forms_1.ReactiveFormsModule,
        prime_ng_module_1.PrimeNgModule,
        core_2.TranslateModule,
        ng2_pdfjs_viewer_1.PdfJsViewerModule,
        ng_click_outside_1.ClickOutsideModule,
        ng_recaptcha_1.RecaptchaModule], exports: [forms_1.FormsModule,
        forms_1.ReactiveFormsModule,
        prime_ng_module_1.PrimeNgModule,
        core_2.TranslateModule,
        ng_select_1.NgSelectModule,
        ng2_pdfjs_viewer_1.PdfJsViewerModule,
        password_form_component_1.PasswordFormComponent,
        ng_click_outside_1.ClickOutsideModule,
        ng_recaptcha_1.RecaptchaModule,
        payment_card_form_component_1.PaymentCardFormComponent] }); })();
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SharedModule, [{
        type: core_1.NgModule,
        args: [{
                declarations: [
                    spinner_overlay_component_1.SpinnerOverlayComponent,
                    password_form_component_1.PasswordFormComponent,
                    payment_card_form_component_1.PaymentCardFormComponent,
                ],
                imports: [
                    common_1.CommonModule,
                    forms_1.FormsModule,
                    forms_1.ReactiveFormsModule,
                    prime_ng_module_1.PrimeNgModule,
                    core_2.TranslateModule,
                    ng2_pdfjs_viewer_1.PdfJsViewerModule,
                    ng_click_outside_1.ClickOutsideModule,
                    ng_recaptcha_1.RecaptchaModule,
                ],
                exports: [
                    forms_1.FormsModule,
                    forms_1.ReactiveFormsModule,
                    prime_ng_module_1.PrimeNgModule,
                    core_2.TranslateModule,
                    ng_select_1.NgSelectModule,
                    ng2_pdfjs_viewer_1.PdfJsViewerModule,
                    password_form_component_1.PasswordFormComponent,
                    ng_click_outside_1.ClickOutsideModule,
                    ng_recaptcha_1.RecaptchaModule,
                    payment_card_form_component_1.PaymentCardFormComponent,
                ],
            }]
    }], null, null); })();


/***/ }),

/***/ "./src/app/shared/spinner-overlay/spinner-overlay.component.ts":
/*!*********************************************************************!*\
  !*** ./src/app/shared/spinner-overlay/spinner-overlay.component.ts ***!
  \*********************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.SpinnerOverlayComponent = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! primeng/progressbar */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-progressbar.js"));
const _c0 = function () { return { "height": "3px" }; };
class SpinnerOverlayComponent {
    constructor() { }
    ngOnInit() {
    }
}
exports.SpinnerOverlayComponent = SpinnerOverlayComponent;
SpinnerOverlayComponent.ɵfac = function SpinnerOverlayComponent_Factory(t) { return new (t || SpinnerOverlayComponent)(); };
SpinnerOverlayComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SpinnerOverlayComponent, selectors: [["app-spinner-overlay"]], decls: 2, vars: 3, consts: [[1, "loading"], ["mode", "indeterminate"]], template: function SpinnerOverlayComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "div", 0);
        i0.ɵɵelement(1, "p-progressBar", 1);
        i0.ɵɵelementEnd();
    } if (rf & 2) {
        i0.ɵɵadvance(1);
        i0.ɵɵstyleMap(i0.ɵɵpureFunction0(2, _c0));
    } }, directives: [i1.ProgressBar], styles: [".loading[_ngcontent-%COMP%] {\n  position: fixed;\n  top: 0;\n  left: 0;\n  right: 0;\n  background: #e8f1f87d;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9idWl0aGFuaGxvYy9Eb2N1bWVudHMvd29ya3NwYWNlLzY4OUNsb3VkL1NlY3VyZURyaXZlL3NlY3VyZS1kcml2ZS13ZWItYXBwLXYyL3NyYy9hcHAvc2hhcmVkL3NwaW5uZXItb3ZlcmxheS9zcGlubmVyLW92ZXJsYXkuY29tcG9uZW50LnNjc3MiLCJzcmMvYXBwL3NoYXJlZC9zcGlubmVyLW92ZXJsYXkvc3Bpbm5lci1vdmVybGF5LmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsZUFBQTtFQUNBLE1BQUE7RUFDQSxPQUFBO0VBQ0EsUUFBQTtFQUNBLHFCQUFBO0FDQ0YiLCJmaWxlIjoic3JjL2FwcC9zaGFyZWQvc3Bpbm5lci1vdmVybGF5L3NwaW5uZXItb3ZlcmxheS5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIi5sb2FkaW5nIHtcbiAgcG9zaXRpb246IGZpeGVkO1xuICB0b3A6IDA7XG4gIGxlZnQ6IDA7XG4gIHJpZ2h0OiAwO1xuICBiYWNrZ3JvdW5kOiAjZThmMWY4N2Q7XG59XG4iLCIubG9hZGluZyB7XG4gIHBvc2l0aW9uOiBmaXhlZDtcbiAgdG9wOiAwO1xuICBsZWZ0OiAwO1xuICByaWdodDogMDtcbiAgYmFja2dyb3VuZDogI2U4ZjFmODdkO1xufSJdfQ== */"] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SpinnerOverlayComponent, [{
        type: core_1.Component,
        args: [{
                selector: 'app-spinner-overlay',
                templateUrl: './spinner-overlay.component.html',
                styleUrls: ['./spinner-overlay.component.scss']
            }]
    }], function () { return []; }, null); })();


/***/ }),

/***/ "./src/app/shared/spinner-overlay/spinner-overlay.service.ts":
/*!*******************************************************************!*\
  !*** ./src/app/shared/spinner-overlay/spinner-overlay.service.ts ***!
  \*******************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.SpinnerOverlayService = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const portal_1 = __webpack_require__(/*! @angular/cdk/portal */ "./node_modules/@angular/cdk/__ivy_ngcc__/fesm2015/portal.js");
const spinner_overlay_component_1 = __webpack_require__(/*! ./spinner-overlay.component */ "./src/app/shared/spinner-overlay/spinner-overlay.component.ts");
const rxjs_1 = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm2015/index.js");
const operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm2015/operators/index.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/cdk/overlay */ "./node_modules/@angular/cdk/__ivy_ngcc__/fesm2015/overlay.js"));
class SpinnerOverlayService {
    constructor(overlay) {
        this.overlay = overlay;
        this.overlayRef = undefined;
        this.spinner$ = rxjs_1.defer(() => {
            this.show();
            return rxjs_1.NEVER.pipe(operators_1.finalize(() => {
                this.hide();
            }));
        }).pipe(operators_1.share());
    }
    show() {
        // Hack avoiding `ExpressionChangedAfterItHasBeenCheckedError` error
        Promise.resolve(null).then(() => {
            if (!this.overlayRef) {
                this.overlayRef = this.overlay.create({
                    positionStrategy: this.overlay
                        .position()
                        .global()
                        .centerHorizontally()
                        .centerVertically(),
                    hasBackdrop: true,
                });
                this.overlayRef.attach(new portal_1.ComponentPortal(spinner_overlay_component_1.SpinnerOverlayComponent));
            }
        });
    }
    hide() {
        this.overlayRef.detach();
        this.overlayRef = undefined;
    }
}
exports.SpinnerOverlayService = SpinnerOverlayService;
SpinnerOverlayService.ɵfac = function SpinnerOverlayService_Factory(t) { return new (t || SpinnerOverlayService)(i0.ɵɵinject(i1.Overlay)); };
SpinnerOverlayService.ɵprov = i0.ɵɵdefineInjectable({ token: SpinnerOverlayService, factory: SpinnerOverlayService.ɵfac, providedIn: 'root' });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SpinnerOverlayService, [{
        type: core_1.Injectable,
        args: [{
                providedIn: 'root'
            }]
    }], function () { return [{ type: i1.Overlay }]; }, null); })();


/***/ }),

/***/ "./src/assets/i18n/en.json":
/*!*********************************!*\
  !*** ./src/assets/i18n/en.json ***!
  \*********************************/
/*! exports provided: app_title, page_title, language, button, app_menu, features, label, validation, default_toast, error, invite_error_users, primeng, stripe_error, default */
/***/ (function(module) {

module.exports = JSON.parse("{\"app_title\":\"SecureDrive\",\"page_title\":{\"login\":\"Login - 689Cloud\",\"forgot_password\":\"Forgot Password - 689Cloud\",\"create_password\":\"Create Password - 689Cloud\",\"project_detail\":\"Project Detail - 689Cloud\",\"project_list\":\"Project List - 689Cloud\",\"create_project\":\"Create Project - 689Cloud\",\"view_file_report\":\"View File Report - 689Cloud\",\"history\":\"History - 689Cloud\",\"user_profile\":\"User Profile - 689Cloud\",\"address_book_list\":\"Address Book List - 689Cloud\",\"address_group_list\":\"Address Group List - 689Cloud\",\"change_email\":\"Change E-mail - 689Cloud\",\"change_password\":\"Change Password - 689Cloud\",\"view_link\":\"View Link - 689Cloud\",\"view_online\":\"View Online - 689Cloud\",\"list_label\":\"Label List - 689Cloud\",\"group_address_detail\":\"Address Group Detail - 689Cloud\",\"list_link\":\"Link List - 689Cloud\",\"link_detail\":\"Link Detail - 689Cloud\",\"signup\":\"Sign Up - 689Cloud\"},\"language\":{\"label\":\"Select Language\",\"auto\":\"Auto\",\"en\":\"English\",\"ja\":\"日本語\",\"vn\":\"Tiếng Việt\"},\"button\":{\"next\":\"Next\",\"log_in\":\"Log in\",\"verify_otp_code\":\"Verify Authentication Code\",\"submit\":\"Submit\",\"cancel\":\"Cancel\",\"delete\":\"Delete\",\"view\":\"View\",\"back\":\"Back\",\"save\":\"Save\",\"done\":\"Done\",\"new\":\"New\",\"add\":\"Add\",\"add_to_group\":\"Add To Group\",\"remove\":\"Remove\",\"copy\":\"Copy\",\"move\":\"Move\",\"verify\":\"Verify\",\"download\":\"Download\",\"ok\":\"OK\",\"encode\":\"Encode\",\"disable_drm\":\"Disable DRM\",\"sign_up\":\"Sign Up\",\"confirm\":\"Confirm\"},\"app_menu\":{\"project\":\"Projects\",\"member\":\"Members\",\"address_book\":\"Address Books\",\"group_address\":\"Address Groups\",\"group_member\":\"Member Groups\",\"history\":\"History\",\"dashboard\":\"Dashboard\",\"report\":\"Reports\",\"admin_console\":\"Admin Console\"},\"features\":{\"expiry_setting\":\"Expiry setting\",\"printing_control\":\"Printing control\",\"two_factor_auth\":\"2-Factor authentication\",\"secure_online_viewer\":\"Secure online viewer\",\"watermark_view_online\":\"Watermark on view online\",\"revoke_access_remotely\":\"Revoke access remotely\",\"copy_protection\":\"Copy protection\",\"tracking_documents\":\"Tracking of documents\",\"secure_shares_per_month\":\"Secure shares per month: {{ value }}\",\"secure_shares_per_year\":\"Secure shares per year: {{ value }}\",\"shared_space\":\"Shared space: {{ value }}\",\"supported_protected_files\":\"Supported protected files: PDF, Microsoft Office (docx, pptx, xlsx)\"},\"label\":{\"first_month_free\":\"First month free\",\"user_per_month\":\"/user/month\",\"number_of_users\":\"Number of users\",\"today_total\":\"Today's Total\",\"your_current_plan\":\"Your Current Plan\",\"recurring_annual_cost\":\"Recurring Annual Cost\",\"recurring_month_cost\":\"Recurring Month Cost\",\"show_less_features\":\"Show less features\",\"show_more_features\":\"Show more features\",\"payment_confirmation\":\"PAYMENT CONFIRMATION\",\"confirm_details\":\"Please confirm your details\",\"confirm_payment_information\":\"Confirm Payment Information\",\"card_holder_name\":\"Card Holder Name\",\"ok\":\"OK\",\"confirm_card_payment\":\"Confirm Payment Information\",\"card_holder\":\"Card Holder Name\",\"confirm_sign_up\":\"Confirm Sign Up\",\"package\":\"Package\",\"users\":\"Users\",\"billing_cycle\":\"Billing Cycle\",\"total\":\"Total\",\"annually\":\"Annually\",\"monthly\":\"Monthly\",\"payment_required\":\"This package requires payment information\",\"card_info_required\":\"You will be asked to provide card information in the next step\",\"copy_right\":\"© {{year}} 689Cloud PTE Ltd\",\"privacy_policy\":\"Privacy Policy\",\"term_and_condition\":\"Terms And Conditions\",\"home\":\"Home\",\"blog\":\"Blog\",\"help\":\"Help\",\"sign_in\":\"Sign In to Your SecureDrive\",\"signing_in_as\":\"Signing in as <strong>{{email}}</strong>\",\"enter_email\":\"Enter Your E-mail\",\"reset_password\":\"Reset password\",\"update_password\":\"Update Password\",\"choose_team\":\"Choose your team to login\",\"enter_password\":\"Enter Your Password\",\"keep_login\":\"Keep me logged in\",\"back_login\":\"Not you? Return to Login\",\"account_settings\":\"Account Settings\",\"logout\":\"Logout\",\"project_list\":\"Project List\",\"add\":\"Add\",\"save\":\"Save\",\"delete\":\"Delete\",\"cancel\":\"Cancel\",\"retry\":\"Retry\",\"back\":\"Back\",\"me\":\"me\",\"item\":\"item\",\"items\":\"items\",\"filter_by\":\"Filter by\",\"file_name\":\"File name\",\"project_name\":\"Project name\",\"search\":\"Search\",\"no_record\":\"No data available in table\",\"numbers_user\":\"Members\",\"create_date\":\"Date Created\",\"owner\":\"Owner\",\"date_modified\":\"Date Modified\",\"action\":\"Action\",\"size\":\"Files\",\"select_all\":\"Select All\",\"sort_by\":\"Sort by\",\"date_modified_asc\":\"Date modified, Ascending\",\"date_modified_desc\":\"Date modified, Descending\",\"project_name_asc\":\"Project name, Ascending\",\"project_name_desc\":\"Project name, Descending\",\"name_asc\":\"Name, Ascending\",\"name_desc\":\"Name, Descending\",\"owner_asc\":\"Owner, Ascending\",\"owner_desc\":\"Owner, Descending\",\"settings\":\"Settings\",\"share\":\"Share\",\"clone\":\"Clone\",\"transfer\":\"Transfer\",\"more_option\":\"More options\",\"file_report_details\":\"File report details\",\"internal_team_tracking\":\"Internal Team Tracking\",\"external_team_tracking\":\"External Team Tracking\",\"number_of_downloads\":\"Number of Downloads\",\"number_of_views\":\"Number of Views\",\"total_of_downloads\":\"Total Number of Downloads\",\"total_of_views\":\"Total Number of Views\",\"downloaded\":\"Downloaded\",\"viewed\":\"Viewed\",\"date_time\":\"Date Time\",\"ip_address\":\"IP Address\",\"type\":\"Type\",\"start_end_date\":\"Date Range\",\"document_open_statistics\":\"Document Open Statistics\",\"os_open_statistics\":\"OS Open Statistics\",\"number_of_times_opened\":\"Number of times opened\",\"total_of_times_opened\":\"Total Number of Times Opened\",\"equal_not_open_yet\":\" = Not Open Yet\",\"equal_opened\":\" = Opened\",\"opened\":\"Opened\",\"android\":\"Android\",\"ios\":\"iOS\",\"mac\":\"Mac\",\"undetectable\":\"Undetectable\",\"window\":\"Window\",\"member\":\"Member\",\"revoke\":\"Revoke\",\"open_status\":\"Open Status\",\"last_opened\":\"Last Opened\",\"post\":\"Post\",\"dropbox\":\"Dropbox\",\"box\":\"Box\",\"upload_header\":\"Upload to 689Cloud\",\"duplicate_files\":\"Duplicate Files\",\"duplicate_files_local\":\"Duplicate Files\",\"duplicate_files_message\":\"These files already exist in this project. Remove them from this list if you do not want to upload again\",\"duplicate_files_local_message\":\"These files appear to be duplicates. Remove them from this list if you do not want to upload again.\",\"upload_cloud_is_opening\":\"Opening upload from Cloud\",\"no_data\":\"No data found\",\"enter_otp_code\":\"Enter your authentication code\",\"is_encrypted\":\"Encrypted\",\"enter_pin_code\":\"Enter Your Pin Code\",\"project_detail\":\"Project Details\",\"project_create\":\"Add New Project\",\"project_info\":\"Project information\",\"collaborators\":\"Collaborators\",\"project_settings\":\"Project settings (Root folder)\",\"name\":\"Name\",\"path\":\"Path\",\"apply_drm\":\"Automatically apply DRM protection to PDF and Microsoft Office files\",\"send_notify_all\":\"Send All Members\",\"notify_specific\":\"Notify Specific\",\"override_project\":\"Override existing roles\",\"notify\":\"Notify\",\"show_wm\":\"Add watermark to online view\",\"font_size\":\"Font size\",\"position\":\"Position\",\"default_wm\":\"Default (User's E-mail)\",\"customs\":\"Set watermark content\",\"set_expiry_doc\":\"Set document expiry date\",\"no_expiry_date\":\"No expiry date\",\"document_expiry_date\":\"Document expiry date\",\"document_expiry_date_tooltip\":\"Set expiry date for document\",\"hour\":\"Hours\",\"minute\":\"Minutes\",\"printable\":\"Printable\",\"printable_tooltip\":\"Allow internal members to print document\",\"editable\":\"Editable\",\"editable_tooltip\":\"Allow internal members to edit and save document\",\"lbl_timezone\":\"Timezone\",\"no_item_found\":\"No item found\",\"clear_all\":\"Clear all\",\"watermark_position\":{\"center\":\"Center\",\"top-left\":\"Top-Left\",\"top-center\":\"Top-Center\",\"top-right\":\"Top-Right\",\"bottom-left\":\"Bottom-Left\",\"bottom-center\":\"Bottom-Center\",\"bottom-right\":\"Bottom-Right\",\"diagonal\":\"Diagonal\"},\"timezone\":{\"GMT_-12\":\"(GMT -12:00) Eniwetok, Kwajalein\",\"GMT_-11\":\"(GMT -11:00) Midway Island, Samoa\",\"GMT_-10\":\"(GMT -10:00) Hawaii\",\"GMT_-9\":\"(GMT -9:00) Alaska\",\"GMT_-8\":\"(GMT -8:00) Pacific Time (US & Canada)\",\"GMT_-7\":\"(GMT -7:00) Mountain Time (US & Canada)\",\"GMT_-6\":\"(GMT -6:00) Central Time (US & Canada), Mexico City\",\"GMT_-5\":\"(GMT -5:00) Eastern Time (US & Canada), Bogota, Lima\",\"GMT_-4\":\"(GMT -4:00) Atlantic Time (Canada), Caracas, La Paz\",\"GMT_-3\":\"(GMT -3:00) Brazil, Buenos Aires, Georgetown\",\"GMT_-2\":\"(GMT -2:00) Mid-Atlantic\",\"GMT_-1\":\"(GMT -1:00 hour) Azores, Cape Verde Islands\",\"GMT_0\":\"(GMT) Western Europe Time, London, Lisbon, Casablanca\",\"GMT_+1\":\"(GMT +1:00 hour) Brussels, Copenhagen, Madrid, Paris\",\"GMT_+2\":\"(GMT +2:00) Kaliningrad, South Africa\",\"GMT_+3\":\"(GMT +3:00) Baghdad, Riyadh, Moscow, St. Petersburg\",\"GMT_+4\":\"(GMT +4:00) Abu Dhabi, Muscat, Baku, Tbilisi\",\"GMT_+5\":\"(GMT +5:00) Ekaterinburg, Islamabad, Karachi, Tashkent\",\"GMT_+6\":\"(GMT +6:00) Almaty, Dhaka, Colombo\",\"GMT_+7\":\"(GMT +7:00) Bangkok, Hanoi, Jakarta\",\"GMT_+8\":\"(GMT +8:00) Beijing, Perth, Singapore, Hong Kong\",\"GMT_+9\":\"(GMT +9:00) Tokyo, Seoul, Osaka, Sapporo, Yakutsk\",\"GMT_+10\":\"(GMT +10:00) Eastern Australia, Guam, Vladivostok\",\"GMT_+11\":\"(GMT +11:00) Magadan, Solomon Islands, New Caledonia\",\"GMT_+12\":\"(GMT +12:00) Auckland, Wellington, Fiji, Kamchatka\"},\"email\":\"E-mail\",\"email_address\":\"E-mail Address\",\"group\":\"Group\",\"select_role\":\"Select role\",\"system_role\":{\"admin\":\"Admin\",\"manager\":\"Manager\",\"user\":\"Member\",\"guest\":\"Guest\"},\"project_role\":{\"owner\":\"Owner\",\"editor\":\"Editor\",\"viewer\":\"Viewer\",\"previewer\":\"Previewer\",\"viewer_uploader\":\"Viewer Uploader\",\"previewer_uploader\":\"Previewer Uploader\",\"uploader\":\"Uploader\"},\"delete_license\":\"disabled DRM for a file in\",\"revoke_user\":\"revoked a recipient from\",\"add_file\":\"uploaded a file to\",\"add_files\":\"uploaded {{count}} files to\",\"encode_file\":\"set DRM for a file in\",\"update_encode_file\":\"updated DRM for a file in\",\"update_file\":\"renamed a file in\",\"delete_file\":\"moved a file to trash from\",\"move_file\":\"moved a file to\",\"move_files\":\"moved {{count}} files to\",\"restore_file\":\"restored a file to\",\"delete_file_forever\":\"deleted a file forever from\",\"copy_file\":\"copied a file to\",\"copy_files\":\"copied {{count}} files to\",\"attach_label\":\"attached a label to file in\",\"attach_labels\":\"attached {{count}} labels to file in\",\"detach_label\":\"detached a label from file in\",\"detach_labels\":\"detached {{count}} labels from file in\",\"add_folder\":\"created a folder in\",\"update_folder\":\"renamed a folder\",\"delete_folder\":\"moved an item to trash\",\"delete_folders\":\"moved {{count}} items to trash\",\"move_folder\":\"moved an item to\",\"move_folders\":\"moved {{count}} items to\",\"restore_folder\":\"restored a folder\",\"delete_folder_forever\":\"deleted an item forever\",\"delete_folders_forever\":\"deleted {{count}} items forever\",\"update_folder_setting\":\"updated folder settings\",\"copy_folder\":\"copied a folder to\",\"copy_folders\":\"copied {{count}} folders to\",\"invite_user\":\"added a collaborator to\",\"invite_users\":\"added {{count}} collaborators to\",\"remove_user\":\"removed a collaborator from\",\"update_role_user\":\"changed role of a collaborator in\",\"invite_group\":\"added a collaboration group to\",\"invite_groups\":\"added {{count}} collaboration groups to\",\"remove_group\":\"removed a collaboration group from\",\"update_role_group\":\"changed role of a collaboration group in\",\"created_link\":\"created a link\",\"updated_link\":\"updated a link\",\"deleted_link\":\"deleted a link\",\"share_link_email\":\"shared a link with an E-mail address\",\"share_links\":\"shared a link with {{count}} E-mail addresses\",\"add_comment\":\"created a comment on project\",\"update_comment\":\"updated a comment on project\",\"delete_comment\":\"deleted a comment on  project\",\"add_comment_file\":\"created a comment on file\",\"update_comment_file\":\"updated a comment on file\",\"delete_comment_file\":\"deleted a comment on file\",\"created_label\":\"created a label\",\"updated_label\":\"updated a label\",\"deleted_label\":\"deleted a label\",\"message\":\"Message\",\"select_member_group\":\"Select Member Group\",\"delete_project_title\":\"Delete Project\",\"delete_project_content\":\"Do you want to delete project(s)?\",\"copy_project_title\":\"Copy Project\",\"copy_project_content\":\"Do you want to copy this project?\",\"copying\":\"Copying\",\"transfer_project\":\"Transfer Project Owner Role\",\"transfer_project_role\":\"Transfer project owner role to\",\"transfer_project_title\":\"Transfer Project\",\"transfer_project_content\":\"Ownership of this project will be transferred to <strong class=\\\"p-text-truncate email-transfer\\\" title=\\\"{{email}}\\\">{{email}}. </strong>Are you sure?\",\"all_project\":\"All Projects\",\"loading\":\"Loading...\",\"permission\":\"Permission\",\"title\":\"Title\",\"description\":\"Description\",\"delete_label\":\"Delete label\",\"delete_label_message\":\"Are you sure to delete label(s)?\",\"color\":\"Color\",\"select_one\":\"or select one\",\"create_new_label\":\"Create new label\",\"edit_label\":\"Edit label\",\"link_list\":\"Link list\",\"link_type_project\":\"Project\",\"link_type_folder\":\"Folder\",\"link_type_file\":\"File\",\"link_type_multi_files\":\"Multiple files\",\"document\":\"Documents\",\"delete_link\":\"Delete link\",\"delete_link_message\":\"Are you sure to delete link(s)?\",\"link_detail\":\"Link Detail\",\"edit_link_info\":\"Edit Link Info\",\"link_url\":\"Link URL\",\"password_lbl\":\"Password\",\"link_expiry_date\":\"Link expiry date\",\"allow_download_file\":\"Allow download file\",\"allow_public_view\":\"Allow public view\",\"copy_link\":\"Copy link\",\"show_password\":\"Show password\",\"hide_password\":\"Hide password\",\"share_documents\":\"Shared document list\",\"share_address_book_list\":\"Shared address book list\",\"first_name\":\"First Name\",\"last_name\":\"Last Name\",\"folder\":\"folder\",\"folders\":\"folders\",\"file\":\"file\",\"files\":\"files\",\"upload\":\"Upload\",\"new_folder\":\"New folder\",\"remove\":\"Remove\",\"rename\":\"Rename\",\"remove_forever\":\"Remove forever\",\"restore\":\"Restore\",\"move\":\"Move to\",\"copy\":\"Copy to\",\"set_drm\":\"Security (DRM)\",\"view_drm\":\"View DRM settings\",\"view_online\":\"View online\",\"download\":\"Download\",\"download_as_zip\":\"Download As Zip File\",\"label\":\"Label\",\"label_list\":\"Label List\",\"encoded\":\"Encoded\",\"encoding\":\"Encoding\",\"decoding\":\"Decoding\",\"translating\":\"Translating\",\"comments\":\"Comments\",\"activities\":\"Activities\",\"confirm_remove_comment\":\"Do you want to remove this comment?\",\"end_activities\":\"End of activities\",\"all_comments\":\"All comments\",\"end_comments\":\"End of comments\",\"no_comments\":\"No comments\",\"file_info\":\"File Info\",\"file_tracking\":\"File Tracking\",\"report\":\"Report\",\"err_encode\":\"An error has occurred. Click to encode again.\",\"drm_settings\":\"DRM Settings\",\"upload_computer\":\"Upload new files from computer\",\"upload_folder\":\"Upload folder from computer\",\"upload_cloud\":\"Get files from cloud\",\"invite_people\":\"Add collaborators\",\"edit_collaborators\":\"Edit collaborators\",\"show_hidden_files\":\"Show hidden files\",\"hide_hidden_files\":\"Hide hidden files\",\"show_activities_comments\":\"Show activities\",\"manage_label\":\"Manage Labels\",\"manage_link\":\"Manage Links\",\"expiration\":\"Expiration\",\"set_password\":\"Set password\",\"create_link\":\"Create Link\",\"share_link\":\"Share Link\",\"document_setting\":\"Document Settings\",\"copy_embed\":\"Copy as embed code\",\"printable_help\":\"Allow external members to print document\",\"editable_help\":\"Allow external members to edit and save document\",\"wm_help\":\"Apply watermark for external member\",\"share_message\":\"Share message\",\"file_is_encoding\":\"Your selected file(s) are contained encoding file(s). Please wait until it finished or remove it from selected.\",\"not_support_view_online\":\"The viewer does not support this file!\",\"uploaded_on\":\"Uploaded on {{date}} by <b>{{user}}</b>\",\"current\":\"Current\",\"file_version\":\"Version History\",\"close\":\"Close\",\"make_current\":\"Make current\",\"confirm_delete_version\":\"Delete this version?\",\"download_folder\":\"Download Folder\",\"download_folder_message\":\"Your folder is being zipped. Please wait a moment...\",\"delete_file_title\":\"Remove file\",\"delete_folder_title\":\"Remove folder\",\"delete_item_content\":\"Do you want to remove {{title}}?\",\"delete_item_forever_content\":\"Do you want to remove forever {{title}}?\",\"this_file\":\"this file\",\"this_folder\":\"this folder\",\"move_items_title\":\"Moving selected item(s) '{{file}}'\",\"copy_items_title\":\"Copying selected item(s) '{{file}}'\",\"move_item_error_title\":\"Errors have occurred during moving\",\"move_items_content_file\":\"Files that have errors:\",\"move_items_content_folder\":\"Folders that have errors:\",\"create_folder\":\"Create Folder\",\"add_collaborator\":\"Add collaborators\",\"add_group\":\"Add Groups\",\"collaborator_user_override\":\"Override existing collaborator roles in sub-folders\",\"collaborator_group_override\":\"Override existing collaborator roles\",\"detail\":\"Details\",\"file_size\":\"File size\",\"last_update\":\"Last updated\",\"updated_by\":\"Uploaded by\",\"detect\":\"Detect label\",\"create_label\":\"Create label\",\"attached_label\":\"Attached label\",\"detached_label\":\"Detached label\",\"create_new\":\"Create new\",\"apply_label\":\"Apply labels\",\"checked\":\"checked\",\"no_message\":\"No Message\",\"notify_update_file_comment\":\" updated comment in file\",\"notify_update_comment\":\" updated comment in project\",\"notify_invite_project\":\" just added you into project\",\"notify_comment\":\" commented in project\",\"notify_file_comment\":\" commented in file\",\"notify_mention\":\" tagged you in your project\",\"notify_upload_file\":\" upload new document\",\"ago\":\" ago\",\"on\":\" - on \",\"time\":{\"now\":\"just now\",\"second\":\" second\",\"minute\":\" minute\",\"hour\":\" hour\",\"day\":\" day\",\"year\":\" year\",\"s\":\"s\"},\"forgot_password\":\"Forgot your password?\",\"forgot_password_msg\":\"Enter your E-mail address to reset your password. You may need to check your spam folder or unblock noreply@689cloud.com.\",\"choose_team_reset_password\":\"Choose your team to reset password\",\"request_reset_password_success_msg\":\"Your request changing password have been submitted, please check your E-mail to create new password\",\"current_password\":\"Current Password\",\"new_password\":\"New Password\",\"confirm_password\":\"Confirm Password\",\"password_pattern\":\"Password Pattern\",\"invalid_reset_password_link\":\"Invalid link or the link has expired\",\"reset_password_success\":\"Congratulations! Your password has been reset. Sign in now.\",\"password_remain\":\"<p>Attempts remaining: <strong>{{numberRemain}}</strong> <br/> <strong>Warning:</strong> After <strong>{{threshold}} consecutive</strong> unsuccessful login attempts, your account will be locked.</p>\",\"account_lock\":\"Your account is disabled.\",\"account_lock_try_again_msg\":\"Try again in \",\"account_lock_contact_admin_msg\":\" or contact your Admin.\",\"password_expired\":\"Your password is expired. Please change the password before re-login.\",\"change_password_first_time\":\"You are required to change your password for the first time login\",\"update_your_email\":\"Update Your E-mail\",\"enter_new_email\":\"Enter your new E-mail\",\"change_email_success\":\"Congratulations! Your E-mail had been updated. Sign in now.\",\"setting\":\"Setting\",\"open\":\"Open\",\"document_expiry_time\":\"Expiry Time\",\"create_project_with_setting\":\"Create Project with Settings\",\"events\":\"Events\",\"load_more\":\"Load more\",\"you\":\"You\",\"unknown\":\"Unknown\",\"log_in\":\"logged in to 689Cloud\",\"log_out\":\"logged out of 689Cloud\",\"add_user\":\"created a member\",\"update_user\":\"updated a member\",\"delete_user\":\"deleted a member\",\"add_project\":\"created a project\",\"update_project\":\"updated a project\",\"delete_project\":\"deleted a project\",\"copy_project\":\"copied a project\",\"transferred_project\":\"transferred project Owner role to\",\"create_group\":\"created a member group\",\"update_group\":\"updated a member group\",\"delete_group\":\"deleted a member group\",\"add_member_group\":\"added a member to group\",\"add_member_groups\":\"added {{count}} members to group\",\"remove_member_group\":\"removed a member from group\",\"remove_member_groups\":\"removed {{count}} members from group\",\"move_member_group\":\"moved a member to another group\",\"move_member_groups\":\"moved {{count}} members to another group\",\"change_password\":\"Change password\",\"change_email\":\"Change E-mail\",\"generate_pin_code\":\"Generate PIN Code\",\"pin_code\":\"PIN Code\",\"account_information\":\"Account Information\",\"email_notification_security\":\"E-MAIL NOTIFICATION AND SECURITY\",\"password_requirement\":\"Password Requirement\",\"change_email_title\":\"Change E-mail Address\",\"change_email_msg\":\"Do you want to change your E-mail address?\",\"language\":\"Language\",\"account_change\":\"Notify me when changes are made to my account\",\"encode_file_expired\":\"Notify me when protected files have expired\",\"new_comment\":\"Notify me when there are new comments\",\"security_auth\":\"Two factor authentication\",\"disable_reason\":\"(Force enable by team setting)\",\"content_watermark_tooltip\":\"Input \\\"/n\\\" to go down line for watermark\",\"change_role_message\":\"You need to save what you've just changed.\",\"address_book_list\":\"Address Book List\",\"create_new_address_book\":\"Add New Address Book\",\"edit_address_book\":\"Edit Address Book\",\"delete_address_book\":\"Delete address book\",\"delete_address_book_message\":\"Do you want to delete address book(s)?\",\"delete_address_group\":\"Delete address group\",\"delete_address_group_message\":\"Do you want to delete address group(s)?\",\"add_address_book_to_group\":\"Add Address Book To Group\",\"address_book_group_list\":\"Address Group List\",\"group_name\":\"Group Name\",\"no_address_book\":\"No. Address Books\",\"add_new_address_group\":\"Add New Address Group\",\"address_group_detail\":\"Address Group Details\",\"edit_address_group\":\"Edit Address Group\",\"move_address_book_to_group\":\"Move Address Book To Another Group\",\"copy_address_book_to_group\":\"Copy Address Book To Other Group\",\"address_book\":\"Address Book(s)\",\"remove_ab_from_group_title\":\"Remove Address Book From Group\",\"remove_ab_from_group_msg\":\"Do you want to remove address book(s) from group?\",\"yes\":\"Yes\",\"no\":\"No\",\"download_instruction\":{\"title_1\":\"Instructions for\",\"title_2\":\"Protected Files\",\"view_protect\":\"View protected files:\",\"view_protect_files_message\":\"Click on the View button. You will be asked to enter your E-mail address. If you are authorized to view the file, you will receive a one-time PIN. Please enter the PIN at the prompt to view the file.\",\"download_use_protect_pdf\":\"Download and use protected PDF files:\",\"download_use_protect_pdf_content\":\"Protected PDF files can only be downloaded and viewed using Adobe Reader XI or newer on Windows or MacOS. Click on the Download button and save the file. Open with Adobe Reader and enter your E-mail address and PIN when prompted.\",\"download_use_protect_microsoft\":\"Download and use protected Microsoft Office files:\",\"download_use_protect_microsoft_content\":\"To download and use protected Microsoft office files, you must be using Microsoft Office 2010, 2013, 2016 or Office 365 on a Windows PC. Download and open the file, and follow the instructions to install the 689Cloud Add-in. Restart the application and open the file. You will be asked to enter your E-mail address and PIN.\",\"link_expiry\":\"This link will expire on: {{expire_date}}\"},\"folder_size\":\"Folder size\",\"folder_settings\":\"Folder settings\",\"create_report\":\"Create report\",\"revoke_recipient_title\":\"Revoke Recipient\",\"revoke_recipient_msg\":\"If this recipient is revoked, he/she cannot open this file again. Are you sure you want to revoke this recipient?\",\"number_of_times_viewed\":\"Number of Views\",\"number_of_times_download\":\"Number of Downloads\",\"all_member_in_project\":\"All members in project\",\"annotation_all\":\"@All\",\"empty_document_size\":\"Document file size empty\",\"max_length\":\"Max length is {{number}} characters\",\"created_by\":\"Created by\",\"select_address_group\":\"Select Address Group\",\"group_collaborator_list\":\"Group Collaborator List\",\"role\":\"Role\",\"input_password_to_unlock\":\"Input password to unlock\",\"auto_drm\":\"Automatically apply DRM protection\",\"translate\":\"Translate\",\"translation_file\":\"Translation File\",\"translation_file_name\":\"File <strong>{{name}}</strong> will be translated to the selected language below\",\"translation_file_fail\":\"File <strong>{{name}}</strong> have been translated fail. Please use another file to do translation\",\"file_is_translating\":\"Your selected file(s) are contained translating file(s). Please wait until it finished or remove it from selected.\",\"file_translating_disabled\":\"The file is translating. Please try again later\",\"translation_lang\":{\"label\":\"Select Language\",\"en\":\"English\",\"ja\":\"Japanese\",\"vi\":\"Vietnamese\",\"zh\":\"Chinese\"},\"translation_error\":{\"404\":\"File is NOT FOUND\",\"405\":\"File is NOT FOUND in Disk\",\"406\":\"File size is limited, cannot exceed 20MB\",\"407\":\"PDF file is limited, cannot exceed 20 pages\",\"408\":\"File name is translated fail\",\"409\":\"Google Translate service cannot translate this file\"},\"sign_up\":\"Sign Up\",\"summary_sub_text\":\"{{ currency }}{{ price }} x {{ number_user }} users\",\"annually_billing_cycle\":\"{{ number_months }} months\",\"no_credit_card_required\":\"No credit card required for free trial\",\"sign_up_title\":\"Sign Up SecureDrive Account\",\"agree_term\":\"I agree to the <a href='https://689cloud.com/terms-and-conditions/' target='_blank'>Terms of Service</a> and <a href='https://689cloud.com/privacy-policy/' target='_blank'>Privacy Policy</a>\",\"add_payment_card\":\"Add Payment Card\",\"holder_name\":\"Holder Name\",\"expired_on\":\"Expired on\",\"delete_card_title\":\"Remove Credit Card\",\"delete_card_mgs\":\"Are you sure you want to remove this card?\",\"trial_mgs\":\"<p class='p-m-0'>Your trial account will be expire in <strong>{{count}} days</strong></p>\"},\"validation\":{\"require\":\"This field is required\",\"input_email\":\"Please input your email\",\"input_password\":\"Please input your password\",\"input_otp_code\":\"Please input your authentication code\",\"special_chars\":\"Special characters are not allowed\",\"date_format\":\"Invalid date format\",\"confirm_password\":\"Confirm password does not match\",\"min_length\":\"This field requires at least {{number}} characters\",\"pattern\":\"Please input correct pattern\",\"email_format\":\"Invalid E-mail format\",\"password_policies\":{\"full_secure\":\"Password must be 6 - 64 characters, 1 uppercase character, 1 lowercase character, 1 special character, and 1 numeric character\",\"length\":\"Password must be {{min}} - {{max}} characters\",\"capital\":\"At least {{number}} uppercase character(s)\",\"lower\":\"At least {{number}} lowercase character(s)\",\"special\":\"At least {{number}} special character(s)\",\"number\":\"At least {{number}} numeric character(s)\"},\"invalid_color_format\":\"Invalid color format\",\"invalid_email_format\":\"Invalid email format\",\"input_color\":\"Please choose color to apply watermark\",\"remove_old_card_before_create_new\":\"Please remove the old card before adding a new one\"},\"default_toast\":{\"create_success\":\"Created successfully\",\"add_success\":\"Added successfully\",\"update_success\":\"Updated successfully\",\"update_pass_success\":\"Your new password has been updated\",\"save_success\":\"Saved successfully\",\"delete_success\":\"Deleted successfully\",\"revoke_success\":\"Revoked successfully\",\"drop_upload\":\"Drop your file to upload\",\"exist_file_uploading\":\"File {{fileName}} is uploading\",\"wait\":\"Please wait...\",\"only_support_trial\":\"Currently only trial accounts are supported\",\"move_success\":\"Moved successfully\",\"invite_success\":\"Added successfully\",\"invite_success_error_users\":\"Add failed: \",\"share_success\":\"Shared successfully\",\"restore_success\":\"Restored successfully\",\"upload_success\":\"Uploaded successfully\",\"send_confirm_email\":\"Please confirm your E-mail to change E-mail\",\"invalid_data\":\"There is some invalid data\",\"waiting_sync\":\"You have to wait a while for the update process to complete\",\"error_dot_folder\":\"You cannot create a folder only containing dot character\",\"copy_success\":\"Copied successfully\",\"remove_success\":\"Removed successfully\",\"change_mail_success\":\"Changed E-mail Address successfully\",\"activate_success\":\"Activated successfully\",\"deactivate_success\":\"Deactivated successfully\",\"unlock_success\":\"Unlocked successfully\",\"import_success\":\"Imported successfully\",\"not_allow_upload_folders\":\"You cannot upload multiple folders\",\"load_data_failed\":\"Load data failed\",\"request_change_email_success\":\"Please confirm your E-mail to change E-mail address\",\"project_is_copying\":\"The project is being copied\",\"signup_success\":\"SignUp Account completed\",\"add_card_success\":\"Credit card added successfully\",\"delete_card_success\":\"Credit card removed successfully\"},\"error\":{\"100\":\"Invalid login credentials\",\"101\":\"Generate access token (session) fail.\",\"102\":\"Invalid login credentials\",\"103\":\"Invalid confirm code or confirm code is expired\",\"104\":\"Account Directory inactivated.\",\"105\":\"Account Directory password expired.\",\"106\":\"Account Directory expired.\",\"107\":\"Account Directory - Exceed password retry limit.\",\"108\":\"Account Directory - Unwilling To Perform.\",\"109\":\"Account Directory - System error from Security Provider.\",\"110\":\"E-mail already exists\",\"112\":\"Your account is disabled. Please contact your Admin\",\"113\":\"Member isn't locked\",\"114\":\"Member already unlocked\",\"200\":\"OK.\",\"300\":\"Invalid login credentials\",\"301\":\"Invalid PIN code or had been expired\",\"302\":\"Confirm password does not match with password\",\"303\":\"Invalid color format\",\"304\":\"Invalid website URL format\",\"305\":\"Invalid payment currency\",\"306\":\"Invalid paging request\",\"307\":\"Invalid date format\",\"308\":\"Invalid update folder item type\",\"309\":\"Invalid project setting format\",\"310\":\"Invalid team status\",\"311\":\"Invalid payment method\",\"312\":\"Invalid payment billing cycle\",\"313\":\"Invalid login credentials\",\"314\":\"Invalid password format\",\"318\":\"Invalid expiry date\",\"400\":\"Bad request\",\"401\":\"Unauthorized or session had been expired\",\"403\":\"You do not have permission\",\"404\":\"Not found\",\"406\":\"There is some invalid data\",\"407\":\"Missing parameters\",\"408\":\"The App is disabled. Please contact your provider.\",\"500\":\"Internal server error\",\"501\":\"The group name cannot contains characters: ,/\",\"600\":\"Project not found\",\"601\":\"Create new project fail\",\"602\":\"The project is being copied\",\"700\":\"Folder not found\",\"701\":\"Special characters are not allowed\",\"702\":\"You do not have permission\",\"800\":\"File not found\",\"801\":\"File version not found\",\"802\":\"Unauthorized User The E-mail address that was entered is not authorized to view this file\",\"803\":\"File name already exists\",\"804\":\"File had been protected\",\"805\":\"File decrypt fail\",\"806\":\"File is too large to preview, please download\",\"807\":\"File is encrypting\",\"900\":\"Label not found\",\"901\":\"Label already exists\",\"1100\":\"Share link not found\",\"1101\":\"Share link package not found\",\"1102\":\"Share link expired\",\"1103\":\"Link not found\",\"1106\":\"Position is required\",\"1107\":\"Font size is required and must have a value > 0\",\"1109\":\"The number of file transfers has exceeded the total number of transfers.\",\"1111\":\"Invalid password\",\"1112\":\"Link is empty\",\"1113\":\"The file has expired and is no longer available\",\"1200\":\"Reach max limited number of download\",\"1201\":\"Download file fail\",\"1202\":\"Download zip queue not found\",\"1203\":\"Cannot download as zip file. The specified folder is empty.\",\"1300\":\"File extension does not allow to upload\",\"1301\":\"Upload file fail\",\"1302\":\"Upload file data not found\",\"1304\":\"File cannot upload\",\"1400\":\"User not found\",\"1401\":\"E-mail already exists\",\"1402\":\"Group member not found\",\"1403\":\"Group name already exists\",\"1404\":\"Creat User fail\",\"1405\":\"User role not found\",\"1406\":\"Wrong current password\",\"1407\":\"User not found in folder\",\"1408\":\"Please request the user to transfer their projects first\",\"1409\":\"User not found in group\",\"1410\":\"Cannot change member's role at this time.This member is cloning project(s). Please wait until it is finished and try again.\",\"1411\":\"Import failed. Invalid CSV file.\",\"1412\":\"Import failed. CSV file is empty.\",\"1413\":\"Import failed\",\"1414\":\"Group name have max length is 64 characters\",\"1415\":\"Password cannot contain space characters\",\"1416\":\"New password must be different from current password\",\"1500\":\"Address book not found\",\"1501\":\"E-mail already exists\",\"1502\":\"Group Address book not found\",\"1503\":\"Address Group name already exists\",\"1600\":\"Comment not found\",\"1700\":\"Company not found\",\"1701\":\"Company name already exists\",\"1800\":\"Team not found\",\"1801\":\"Team Name already exists\",\"1802\":\"Team payment not found\",\"1803\":\"Team reached max limited number of members\",\"1804\":\"Cannot update team payment\",\"1805\":\"Create team payment receipt fail\",\"1806\":\"Team storage had been reached the limited\",\"1807\":\"Create new team fail\",\"1808\":\"User Price not found\",\"1809\":\"Storage Price not found\",\"1810\":\"Team payment card info not found\",\"1811\":\"Invalid team notify setting\",\"2300\":\"Unauthorized User The E-mail address that was entered is not authorized to view this file\",\"2502\":\"You cannot update the in-used package\",\"2700\":\"Card already existed\",\"2701\":\"Card type not found\",\"2702\":\"Invalid card number format\",\"2703\":\"Your card has expired\",\"2704\":\"Please add credit card first\",\"2705\":\"Customer Stripe not found\",\"2706\":\"The card has been activated\",\"2707\":\"The card is not valid. Please change another card to continue\",\"2708\":\"Cannot update team payment for trial team\",\"2709\":\"User Price and Storage Price must be the same currency\",\"2710\":\"Delete card fail\",\"2711\":\"Charge fail\",\"2712\":\"Card activation failed\",\"2713\":\"Error during credit card processing\",\"2714\":\"Your card's CVC is incorrect\",\"invalid_expiry_date\":\"Invalid expiry date\",\"invalid_date\":\"Invalid start date or end date\",\"invalid_email\":\"Invalid E-mail\"},\"invite_error_users\":{\"1\":\"Role of user is invalid: {{email}}\",\"2\":\"Team has reached the maximum number of users: {{email}}\",\"3\":\"Invalid E-mail format: {{email}}\",\"4\":\"User already exists: {{email}}\",\"5\":\"User does not exist: {{email}}\",\"6\":\"You cannot invite user who do not exist in team: {{email}}\"},\"primeng\":{\"accept\":\"Yes\",\"reject\":\"No\",\"weak\":\"Weak\",\"medium\":\"Medium\",\"strong\":\"Strong\",\"passwordPrompt\":\"Enter a password\"},\"stripe_error\":{\"INCOMPLETE_NUMBER\":\"Your card number is incomplete\",\"INCORRECT_NUMBER\":\"Your card number is incorrect\",\"INVALID_NUMBER\":\"Your card number is invalid\",\"INVALID_EXPIRY_YEAR_PAST\":\"Your card's expiration year is in the past\",\"INCOMPLETE_CVC\":\"Your card's CVC is incomplete\",\"INCOMPLETE_EXPIRY\":\"Your card's expiration date is incomplete\",\"INVALID_EXPIRY_YEAR\":\"Your card's expiration year is invalid\",\"INVALID_EXPIRY_MONTH_PAST\":\"Your card's expiration month is in the past\",\"CARD_DECLINED\":\"Register card error. Please contact your card provider.\",\"UPGRADE_ACCOUNT_FAIL\":\"Payment could not be processed. Please contact your card provider.\",\"ACTIVATE_CARD_FAIL\":\"Activate card failed. Please contact your card provider.\",\"DELETE_CARD_FAIL\":\"Delete card failed. Please contact your card provider.\"}}");

/***/ }),

/***/ "./src/assets/i18n/ja.json":
/*!*********************************!*\
  !*** ./src/assets/i18n/ja.json ***!
  \*********************************/
/*! exports provided: app_title, page_title, language, button, app_menu, features, label, validation, default_toast, error, invite_error_users, primeng, stripe_error, default */
/***/ (function(module) {

module.exports = JSON.parse("{\"app_title\":\"SecureDrive\",\"page_title\":{\"login\":\"ログイン - 689Cloud\",\"forgot_password\":\"パスワードを忘れた方 - 689Cloud\",\"create_password\":\"パスワード登録 - 689Cloud\",\"project_detail\":\"プロジェクト詳細 - 689Cloud\",\"project_list\":\"プロジェクトリスト - 689Cloud\",\"create_project\":\"新規プロジェクト作成 - 689Cloud\",\"view_file_report\":\"ファイルレポート - 689Cloud\",\"history\":\"履歴 - 689Cloud\",\"user_profile\":\"ユーザープロフィール - 689Cloud\",\"address_book_list\":\"アドレス帳リスト - 689Cloud\",\"address_group_list\":\"アドレスグループリスト - 689Cloud\",\"change_email\":\"メールアドレス変更 - 689Cloud\",\"change_password\":\"パスワード変更 - 689Cloud\",\"view_link\":\"リンクを表示 - 689Cloud\",\"view_online\":\"ブラウザでプレビュー - 689Cloud\",\"list_label\":\"ラベルリスト - 689Cloud\",\"group_address_detail\":\"アドレスグループ詳細 - 689Cloud\",\"list_link\":\":リンクのリスト - 689Cloud\",\"link_detail\":\"リンク詳細 - 689Cloud\",\"signup\":\"サインアップ - 689Cloud\"},\"language\":{\"label\":\"言語\",\"auto\":\"自動\",\"en\":\"English\",\"ja\":\"日本語\",\"vn\":\"Tiếng Việt\"},\"button\":{\"next\":\"次\",\"log_in\":\"ログイン\",\"verify_otp_code\":\"認証コード確認\",\"submit\":\"送信\",\"cancel\":\"中止\",\"delete\":\"削除\",\"view\":\"表示\",\"back\":\"戻る\",\"save\":\"保存\",\"done\":\"完了\",\"new\":\"新規\",\"add\":\"追加\",\"add_to_group\":\"追加\",\"remove\":\"削除\",\"copy\":\"リンクをコピー\",\"move\":\"移動\",\"verify\":\"確認\",\"download\":\"ダウンロード\",\"ok\":\"OK\",\"encode\":\"暗号化\",\"disable_drm\":\"解除する\",\"sign_up\":\"ユーザー登録\"},\"app_menu\":{\"project\":\"プロジェクト\",\"member\":\"ユーザー\",\"address_book\":\"アドレス帳\",\"group_address\":\"アドレスグループ \",\"group_member\":\"ユーザーグループ\",\"history\":\"履歴\",\"dashboard\":\"ダッシュボード\",\"report\":\"レポート\",\"admin_console\":\"管理者コンソール\"},\"features\":{\"show_less_features\":\"詳細を非表示\",\"show_more_features\":\"詳細を表示\",\"expiry_setting\":\"ファイル閲覧期限設定\",\"printing_control\":\"印刷制御\",\"two_factor_auth\":\"多要素認証\",\"secure_online_viewer\":\"ウオーターマーク\",\"watermark_view_online\":\"セキュアなブラウザビューワ\",\"revoke_access_remotely\":\"ファイルへのアクセス停止機能\",\"copy_protection\":\"IRM保護によるコピー防止\",\"tracking_documents\":\"ファイル追跡\",\"secure_shares_per_month\":\"外部への保護された共有数：{{ value }}\",\"secure_shares_per_year\":\"年間セキュア共有数: {{ value }}\",\"maximum_file_size\":\"最大ファイルサイズ：{{ value }}\",\"shared_space\":\"合計共有ストレージ： {{ value }}\",\"supported_protected_files\":\"保護可能なファイル（PDF, DOCX, XLSX, PPTX)\"},\"label\":{\"first_month_free\":\"初月無料\",\"user_per_month\":\"/ユーザー／月\",\"number_of_users\":\"ユーザー数\",\"today_total\":\"本日のお支払い合計\",\"your_current_plan\":\"現在ご利用のプラン\",\"ok\":\"OK\",\"card_holder_name\":\"カード名義人\",\"confirm_payment_information\":\"決済情報を確認\",\"total\":\"合計\",\"monthly\":\"月間\",\"annually\":\"年間\",\"billing_cycle\":\"決済周期\",\"users\":\"ユーザー\",\"package\":\"プラン\",\"confirm_details\":\"詳細をご確認ください\",\"recurring_month_cost\":\"継続月間ご利用額\",\"recurring_annual_cost\":\"継続年間ご利用額\",\"show_less_features\":\"詳細を非表示\",\"show_more_features\":\"詳細を表示\",\"copy_right\":\"© {{year}} 689Cloud PTE Ltd\",\"privacy_policy\":\"プライバシーポリシー\",\"term_and_condition\":\"利用規約\",\"home\":\"ホームページ\",\"blog\":\"ブログ\",\"help\":\"ヘルプ\",\"sign_in\":\"SecureDriveにログイン\",\"signing_in_as\":\"<strong>{{email}}</strong>としてログイン中\",\"enter_email\":\"メールアドレスを入力してください\",\"reset_password\":\"パスワードを忘れた方\",\"update_password\":\"パスワード変更\",\"choose_team\":\"ログインするチームを選択してください\",\"enter_password\":\"パスワードを入力してください\",\"keep_login\":\"ログイン状態を維持する\",\"back_login\":\"ログイン画面に戻る\",\"account_settings\":\"アカウント設定\",\"logout\":\"ログアウト\",\"project_list\":\"プロジェクトリスト\",\"add\":\"追加\",\"save\":\"保存\",\"delete\":\"削除\",\"cancel\":\"中止\",\"retry\":\"再試行\",\"back\":\"戻る\",\"me\":\"私\",\"item\":\"個\",\"items\":\"個\",\"filter_by\":\"フィルター\",\"file_name\":\"ファイル名\",\"project_name\":\"プロジェクト名\",\"search\":\"検索\",\"no_record\":\"記録がありません\",\"numbers_user\":\"メンバー数\",\"create_date\":\"登録日\",\"owner\":\"オーナー\",\"date_modified\":\"更新日\",\"action\":\"動作\",\"size\":\"ファイル数\",\"select_all\":\"全てを選択\",\"sort_by\":\"Sort by\",\"date_modified_asc\":\"Date modified, Ascending\",\"date_modified_desc\":\"Date modified, Descending\",\"project_name_asc\":\"Project name, Ascending\",\"project_name_desc\":\"Project name, Descending\",\"name_asc\":\"Name, Ascending\",\"name_desc\":\"Name, Descending\",\"owner_asc\":\"Owner, Ascending\",\"owner_desc\":\"Owner, Descending\",\"settings\":\"設定\",\"share\":\"共有\",\"clone\":\"コピーを作成\",\"transfer\":\"移譲\",\"more_option\":\"もっと表示\",\"file_report_details\":\"ファイル詳細レポート\",\"internal_team_tracking\":\"チーム内ユーザー\",\"external_team_tracking\":\"チーム外ユーザー\",\"number_of_downloads\":\"ダウンロード数\",\"number_of_views\":\"閲覧数\",\"total_of_downloads\":\"ダウンロード数\",\"total_of_views\":\"閲覧数\",\"downloaded\":\"ダウンロード済み\",\"viewed\":\"閲覧済み\",\"date_time\":\"日時\",\"ip_address\":\"IPアドレス\",\"type\":\"種別\",\"start_end_date\":\"日付レンジ\",\"document_open_statistics\":\"ファイルアクセス統計\",\"os_open_statistics\":\"OS別アクセス数\",\"number_of_times_opened\":\"ファイルオープン回数\",\"total_of_times_opened\":\"ファイルアクセス回数\",\"equal_not_open_yet\":\" = 未開封\",\"equal_opened\":\" = 開封済み\",\"opened\":\"開封済み\",\"android\":\"Android\",\"ios\":\"iOS\",\"mac\":\"Mac\",\"undetectable\":\"Undetectable\",\"window\":\"Window\",\"member\":\"ユーザー\",\"revoke\":\"アクセス停止\",\"open_status\":\"開封状況\",\"last_opened\":\"最終アクセス\",\"post\":\"送信\",\"dropbox\":\"Dropbox\",\"box\":\"Box\",\"upload_header\":\"689Cloudにアップロード\",\"duplicate_files\":\"重複ファイル\",\"duplicate_files_local\":\"重複ファイル\",\"duplicate_files_message\":\"このファイルは既に存在します。再アップロードしない場合はリストから外してください。\",\"duplicate_files_local_message\":\"これらのファイルは重複しているようです。再度アップロードしない場合は、リストから削除してください。\",\"upload_cloud_is_opening\":\"クラウドからのアップロードを開きます\",\"no_data\":\"データが見つかりませんでした\",\"enter_otp_code\":\"認証コードを入れてください\",\"is_encrypted\":\"暗号化\",\"enter_pin_code\":\"PINコードを入れてください\",\"project_detail\":\"プロジェクト詳細\",\"project_create\":\"新規プロジェクト作成\",\"project_info\":\"プロジェクトの情報\",\"collaborators\":\"ユーザーを招待\",\"project_settings\":\"プロジェクト設定\",\"name\":\"プロジェクト名\",\"path\":\"パス\",\"apply_drm\":\"PDFおよびMicrosoft Officeファイルは自動的に暗号化する\",\"send_notify_all\":\"全員に送る\",\"notify_specific\":\"指定して送る\",\"override_project\":\"既存のロールを上書きする\",\"notify\":\"通知先：\",\"show_wm\":\"透かしの設定\",\"font_size\":\"フォントサイズ\",\"position\":\"位置\",\"default_wm\":\"デフォルト（ユーザーのメールアドレス）\",\"customs\":\"ユーザー設定の透かし\",\"set_expiry_doc\":\"ファイルがいつまで閲覧可能かを設定\",\"no_expiry_date\":\"有効期限無し\",\"document_expiry_date\":\"ファイル有効期限\",\"document_expiry_date_tooltip\":\"ファイルがいつまで閲覧可能かを設定\",\"hour\":\"時間\",\"minute\":\"分\",\"printable\":\"印刷可\",\"printable_tooltip\":\"印刷を許可する\",\"editable\":\"編集・保存可\",\"editable_tooltip\":\"ファイルの編集・保存を許可する\",\"lbl_timezone\":\"タイムゾーン\",\"no_item_found\":\"見つかりませんでした\",\"clear_all\":\"クリア\",\"watermark_position\":{\"center\":\"中央\",\"top-left\":\"左上\",\"top-center\":\"上\",\"top-right\":\"右上\",\"bottom-left\":\"左下\",\"bottom-center\":\"下\",\"bottom-right\":\"右下\",\"diagonal\":\"斜め\"},\"timezone\":{\"GMT_-12\":\"(GMT -12:00) Eniwetok, Kwajalein\",\"GMT_-11\":\"(GMT -11:00) Midway Island, Samoa\",\"GMT_-10\":\"(GMT -10:00) Hawaii\",\"GMT_-9\":\"(GMT -9:00) Alaska\",\"GMT_-8\":\"(GMT -8:00) Pacific Time (US & Canada)\",\"GMT_-7\":\"(GMT -7:00) Mountain Time (US & Canada)\",\"GMT_-6\":\"(GMT -6:00) Central Time (US & Canada), Mexico City\",\"GMT_-5\":\"(GMT -5:00) Eastern Time (US & Canada), Bogota, Lima\",\"GMT_-4\":\"(GMT -4:00) Atlantic Time (Canada), Caracas, La Paz\",\"GMT_-3\":\"(GMT -3:00) Brazil, Buenos Aires, Georgetown\",\"GMT_-2\":\"(GMT -2:00) Mid-Atlantic\",\"GMT_-1\":\"(GMT -1:00 hour) Azores, Cape Verde Islands\",\"GMT_0\":\"(GMT) Western Europe Time, London, Lisbon, Casablanca\",\"GMT_+1\":\"(GMT +1:00 hour) Brussels, Copenhagen, Madrid, Paris\",\"GMT_+2\":\"(GMT +2:00) Kaliningrad, South Africa\",\"GMT_+3\":\"(GMT +3:00) Baghdad, Riyadh, Moscow, St. Petersburg\",\"GMT_+4\":\"(GMT +4:00) Abu Dhabi, Muscat, Baku, Tbilisi\",\"GMT_+5\":\"(GMT +5:00) Ekaterinburg, Islamabad, Karachi, Tashkent\",\"GMT_+6\":\"(GMT +6:00) ダッカ、コロンボ\",\"GMT_+7\":\"(GMT +7:00) Bangkok, Hanoi, Jakarta\",\"GMT_+8\":\"(GMT +8:00) Beijing, Perth, Singapore, Hong Kong\",\"GMT_+9\":\"(GMT +9:00) 東京、ソウル、大阪、札幌\",\"GMT_+10\":\"(GMT +10:00) Eastern Australia, Guam, Vladivostok\",\"GMT_+11\":\"(GMT +11:00) Magadan, Solomon Islands, New Caledonia\",\"GMT_+12\":\"(GMT +12:00) Auckland, Wellington, Fiji, Kamchatka\"},\"email\":\"メールアドレス\",\"email_address\":\"メールアドレス\",\"group\":\"グループ\",\"select_role\":\"役割を設定\",\"system_role\":{\"admin\":\"管理者\",\"manager\":\"マネージャー\",\"user\":\"ユーザー\",\"guest\":\"ゲスト\"},\"project_role\":{\"owner\":\"オーナー\",\"editor\":\"編集者\",\"viewer\":\"ビュワー\",\"previewer\":\"プレビュワー\",\"viewer_uploader\":\"ビュワー・アップローダー\",\"previewer_uploader\":\"プレビュワー・アップローダー\",\"uploader\":\"アップローダー\"},\"delete_license\":\"ファイルのDRMを解除\",\"revoke_user\":\"ファイルから閲覧者を削除\",\"add_file\":\"ファイルをアップロード\",\"add_files\":\"{{count}} 個のファイルをアップロード\",\"encode_file\":\"ファイルのDRMを設定\",\"update_encode_file\":\"ファイルのDRMを更新\",\"update_file\":\"ファイル名を変更\",\"delete_file\":\"ファイルをゴミ箱に移動\",\"move_file\":\"ファイルを移動\",\"move_files\":\"{{count}} 個のファイルを移動\",\"restore_file\":\"ファイルを復帰\",\"delete_file_forever\":\"ファイルを完全削除\",\"copy_file\":\"ファイルをコピー\",\"copy_files\":\"{{count}} 個のファイルをコピー\",\"attach_label\":\"ファイルにラベルを追加\",\"attach_labels\":\"{{count}} 個のラベルを追加\",\"detach_label\":\"ラベルを外す\",\"detach_labels\":\"{{count}} 個のラベルを外す\",\"add_folder\":\"フォルダを作成\",\"update_folder\":\"フォルダ名を変更\",\"delete_folder\":\"ゴミ箱に移動\",\"delete_folders\":\"{{count}} 個のアイテムをゴミ箱に移動\",\"move_folder\":\"フォルダを右記に移動\",\"move_folders\":\"{{count}} 個のフォルダを右記に移動\",\"restore_folder\":\"フォルダを復帰\",\"delete_folder_forever\":\"アイテムを完全削除\",\"delete_folders_forever\":\"{{count}} 個のアイテムを完全削除r\",\"update_folder_setting\":\"フォルダの設定を更新\",\"copy_folder\":\"アイテムをコピー\",\"copy_folders\":\"{{count}} 個のアイテムをコピー\",\"invite_user\":\"コラボレーターを追加\",\"invite_users\":\"{{count}} 人のコラボレーターを追加\",\"remove_user\":\"コラボレーターを削除\",\"update_role_user\":\"コラボレーターの権限を変更\",\"invite_group\":\"コラボレーターグループを追加\",\"invite_groups\":\"{{count}} 個のコラボレーターグループを追加\",\"remove_group\":\"コラボレーターグループを削除\",\"update_role_group\":\"コラボレーターグループの権限を変更\",\"created_link\":\"リンクを作成\",\"updated_link\":\"リンクを更新\",\"deleted_link\":\"リンクを削除\",\"share_link_email\":\"がリンクを共有\",\"share_links\":\"リンクを{{count}} のメールアドレスと共有\",\"add_comment\":\"プロジェクトにコメントを追加 \",\"update_comment\":\"プロジェクトのコメントを更新\",\"delete_comment\":\"プロジェクトのコメントを削除\",\"add_comment_file\":\"ファイルにコメントを追加\",\"update_comment_file\":\"ファイルのコメントを更新\",\"delete_comment_file\":\"ファイルのコメントを削除\",\"created_label\":\"プロジェクトにラベルを追加\",\"updated_label\":\"プロジェクトのラベルを更新\",\"deleted_label\":\"プロジェクトのラベルを削除t\",\"message\":\"メッセージ\",\"select_member_group\":\"グループ選択\",\"delete_project_title\":\"プロジェクト削除\",\"delete_project_content\":\"プロジェクトを削除しますか？\",\"copy_project_title\":\"プロジェクトコピー\",\"copy_project_content\":\"このプロジェクトのコピーを作成しますか？\",\"copying\":\"コピー中\",\"transfer_project\":\"プロジェクトのオーナー権限を譲渡\",\"transfer_project_role\":\"オーナー権限の譲渡先\",\"transfer_project_title\":\"プロジェクト譲渡\",\"transfer_project_content\":\"このプロジェクトのオーナー権を <strong class=\\\"p-text-truncate email-transfer\\\" title=\\\"{{email}}\\\">{{email}}に移管します。 </strong>よろしいですか？\",\"all_project\":\"全てのプロジェクト\",\"loading\":\"ロード中...\",\"permission\":\"権限\",\"title\":\"ラベル名\",\"description\":\"説明\",\"delete_label\":\"ラベルを削除\",\"delete_label_message\":\"このラベルを削除しますか？\",\"color\":\"色\",\"select_one\":\"一つ選んでください\",\"create_new_label\":\"ラベル作成\",\"edit_label\":\"ラベル編集\",\"link_list\":\"リンク管理\",\"link_type_project\":\"プロジェクト\",\"link_type_folder\":\"フォルダ\",\"link_type_file\":\"ファイル\",\"link_type_multi_files\":\"複数プロジェクト\",\"document\":\"ファイル\",\"delete_link\":\"リンクを削除\",\"delete_link_message\":\"このリンクを削除してもいいですか？\",\"link_detail\":\"詳細\",\"edit_link_info\":\"編集\",\"link_url\":\"リンクURL\",\"password_lbl\":\"パスワード\",\"link_expiry_date\":\"リンクの有効期限\",\"allow_download_file\":\"ファイルダウンロードを許可\",\"allow_public_view\":\"パブリック\",\"copy_link\":\"リンクをコピー\",\"show_password\":\"パスワードを表示\",\"hide_password\":\"パスワードを隠す\",\"share_documents\":\"共有ファイルリスト\",\"share_address_book_list\":\"共有アドレス帳\",\"first_name\":\"名\",\"last_name\":\"姓\",\"folder\":\"フォルダ\",\"folders\":\"フォルダ\",\"file\":\"ファイル\",\"files\":\"ファイル\",\"upload\":\"アップロード\",\"new_folder\":\"新規フォルダ\",\"remove\":\"削除\",\"rename\":\"名前を変更\",\"remove_forever\":\"完全に消去\",\"restore\":\"リストア\",\"move\":\"移動\",\"copy\":\"コピー\",\"set_drm\":\"セキュリティ（IRM）\",\"view_drm\":\"セキュリティ設定\",\"view_online\":\"ブラウザでプレビュー\",\"download\":\"ダウンロード\",\"download_as_zip\":\"ZIPファイルでダウンロード\",\"label\":\"ラベル\",\"label_list\":\"ラベルリスト\",\"encoded\":\"暗号化\",\"encoding\":\"暗号化注\",\"decoding\":\"復号化注\",\"translating\":\"翻訳化注\",\"comments\":\"コメント\",\"activities\":\"履歴\",\"confirm_remove_comment\":\"このコメントを削除しますか？\",\"end_activities\":\"アクション終了\",\"all_comments\":\"全てのコメント\",\"end_comments\":\"コメント終了\",\"no_comments\":\"コメントがありません\",\"file_info\":\"ファイル情報\",\"file_tracking\":\"ファイル追跡\",\"report\":\"レポート\",\"err_encode\":\"問題が起きました。クリックしたら再暗号化します。\",\"drm_settings\":\"ファイルセキュリティ設定\",\"upload_computer\":\"ファイルをアップロード\",\"upload_folder\":\"フォルダをアップロード\",\"upload_cloud\":\"クラウドサービスからファイル取得\",\"invite_people\":\"コラボレーター追加\",\"edit_collaborators\":\"コラボレーター編集\",\"show_hidden_files\":\"隠しファイルを表示\",\"hide_hidden_files\":\"隠しファイルを非表示にする\",\"show_activities_comments\":\"履歴とコメントを表示する\",\"manage_label\":\"ラベル管理\",\"manage_link\":\"共有リンクを管理\",\"expiration\":\"有効期限\",\"set_password\":\"パスワードを設定\",\"create_link\":\"リンクを作成\",\"share_link\":\"リンクを共有\",\"document_setting\":\"ドキュメントの設定\",\"copy_embed\":\"埋め込みコードとしてコピーする。\",\"printable_help\":\"印刷可能にする\",\"editable_help\":\"編集、保存を可能にする\",\"wm_help\":\"透かしの設定\",\"share_message\":\"メッセージ\",\"file_is_encoding\":\"選択されたファイルには暗号化されたものが含まれています。\",\"not_support_view_online\":\"ビューワはこのファイルには対応していません!\",\"uploaded_on\":\"アップロード日 {{date}} ユーザー <b>{{user}}</b>\",\"current\":\"現在\",\"file_version\":\"バージョン履歴\",\"close\":\"閉じる\",\"make_current\":\"最新にする\",\"confirm_delete_version\":\"このバージョンを削除しますか？\",\"download_folder\":\"フォルダをダウンロード\",\"download_folder_message\":\"フォルダをZIP化してます。少々お待ちください。\",\"delete_file_title\":\"ファイルを削除\",\"delete_folder_title\":\"フォルダを削除\",\"delete_item_content\":\"{{title}} を削除しますか？\",\"delete_item_forever_content\":\"ファイル {{title}} を完全に削除しますか？\",\"this_file\":\"ファイル\",\"this_folder\":\"フォルダ\",\"move_items_title\":\"'{{file}}'を移動\",\"copy_items_title\":\"'{{file}}'コピー中\",\"move_item_error_title\":\"移動中にエラーが発生しました\",\"move_items_content_file\":\"次のファイルにエラーが発生しました:\",\"move_items_content_folder\":\"次のフォルダにエラーが発生しました:\",\"create_folder\":\"フォルダ作成\",\"add_collaborator\":\"コラボレーター追加\",\"add_group\":\"グループ追加\",\"collaborator_user_override\":\"サブフォルダのコラボレーター権限も更新する\",\"collaborator_group_override\":\"既存のコラボレーター権限を更新する\",\"detail\":\"詳細\",\"file_size\":\"サイズ\",\"last_update\":\"更新日\",\"updated_by\":\"更新者\",\"detect\":\"ラベル\",\"create_label\":\"ラベル作成\",\"attached_label\":\"ラベルを追加\",\"detached_label\":\"ラベルを外す\",\"create_new\":\"新規作成\",\"apply_label\":\"ラベルを付ける\",\"checked\":\"チェック\",\"no_message\":\"メッセージがありません\",\"notify_update_file_comment\":\" コメントをアップデートしました \",\"notify_update_comment\":\" プロジェクトの中のコメントをアップデートしました \",\"notify_invite_project\":\"があなたを追加しました \",\"notify_comment\":\"があなたを追加しました\",\"notify_file_comment\":\"がコメントしました。\",\"notify_mention\":\"があなたをタグ付けしました。\",\"notify_upload_file\":\"がファイルをアップロードしました。\",\"ago\":\" 前\",\"on\":\" - \",\"time\":{\"now\":\"たった今\",\"second\":\"秒\",\"minute\":\"分\",\"hour\":\"時間\",\"day\":\"日\",\"year\":\"年\",\"s\":\"\"},\"forgot_password\":\"パスワードを忘れた\",\"forgot_password_msg\":\"パスワードをリセットするにはメールアドレスを入れてください。メールが届かない場合は、迷惑メールフォルダをチェックしてください。\",\"choose_team_reset_password\":\"パスワードをリセットするチームを選択してください\",\"request_reset_password_success_msg\":\"パスワード変更を受け付けました。メールをチェックしてください。\",\"current_password\":\"現在のパスワード\",\"new_password\":\"新しいパスワード新しいパスワード\",\"confirm_password\":\"パスワード確認\",\"password_pattern\":\"パスワード形式\",\"invalid_reset_password_link\":\"リンクが無効か期限切れです\",\"reset_password_success\":\"パスワードがリセットされました。ログインする\",\"password_remain\":\"<p>残りのリトライ回数: <strong>{{numberRemain}}</strong> <br/> <strong>注意:</strong> <strong>{{threshold}}</strong> 回の連続ログイン失敗をしますとアカウントはロックされます</p>\",\"account_lock\":\"アカウントが停止中です。\",\"account_lock_try_again_msg\":\"\",\"account_lock_contact_admin_msg\":\"後に再試行するか管理者に問い合わせてください。\",\"password_expired\":\"パスワードの期限が切れました。変更して再度ログインしてください。\",\"change_password_first_time\":\"初回ログイン時にパスワードの変更が必要です。\",\"update_your_email\":\"メールアドレス変更\",\"enter_new_email\":\"新しいメールアドレスを入力してください\",\"change_email_success\":\"メールアドレスが更新されました。ログインする\",\"setting\":\"設定\",\"open\":\"Open\",\"document_expiry_time\":\"期限\",\"create_project_with_setting\":\"この設定でプロジェクトを作成\",\"events\":\"イベント\",\"load_more\":\"もっと見る\",\"you\":\"あなた\",\"unknown\":\"不明\",\"log_in\":\"689Cloudにログイン689Cloudにログイン\",\"log_out\":\"689Cloudからログアウト689Cloudからログアウト\",\"add_user\":\"ユーザーを作成\",\"update_user\":\"ユーザーを更新\",\"delete_user\":\"ユーザーを削除\",\"add_project\":\"プロジェクトを作成\",\"update_project\":\"プロジェクトを更新\",\"delete_project\":\"プロジェクトを削除\",\"copy_project\":\"プロジェクトをコピー\",\"transferred_project\":\"プロジェクトのオーナー権限を委譲\",\"create_group\":\"ユーザーグループを作成\",\"update_group\":\"ユーザーグループを更新\",\"delete_group\":\"ユーザーグループを削除\",\"add_member_group\":\"グループにユーザーを追加\",\"add_member_groups\":\"{{count}} 人のユーザーをグループに追加\",\"remove_member_group\":\"グループからユーザーを削除\",\"remove_member_groups\":\"{{count}} 人のユーザーをグループから削除\",\"move_member_group\":\"ユーザーを他のグループに移動\",\"move_member_groups\":\"{{count}} 人のユーザーを他のグループに移動\",\"change_password\":\"パスワード変更\",\"change_email\":\"メールアドレス変更\",\"generate_pin_code\":\"PINコードを生成する\",\"pin_code\":\"PINコード\",\"account_information\":\"アカウント情報\",\"email_notification_security\":\"メール通知 とセキュリティ\",\"password_requirement\":\"パスワード要件\",\"change_email_title\":\"メールアドレス変更\",\"change_email_msg\":\"メールアドレスを変更しますか？\",\"language\":\"言語\",\"account_change\":\"アカウント設定が変更されたら通知を受け取る\",\"encode_file_expired\":\"暗号化されたファイルの有効期限がきたら通知を受け取る\",\"new_comment\":\"新しいコメントが追加されたら通知を受け取る\",\"security_auth\":\"2因子認証\",\"disable_reason\":\"(チーム設定により有効化)\",\"content_watermark_tooltip\":\"ウオーターマークに改行を入れるには 「/n」 を入れます\",\"change_role_message\":\"変更した内容を保存してください\",\"address_book_list\":\"アドレス帳リスト\",\"create_new_address_book\":\"アドレス帳作成\",\"edit_address_book\":\"アドレス帳編集\",\"delete_address_book\":\"アドレスを削除\",\"delete_address_book_message\":\"アドレス削除していいですか？\",\"delete_address_group\":\"グループ削除\",\"delete_address_group_message\":\"グループを削除していいですか？\",\"add_address_book_to_group\":\"グループにアドレスを追加\",\"address_book_group_list\":\"アドレスグループリスト\",\"group_name\":\"グループ名\",\"no_address_book\":\"番号\",\"add_new_address_group\":\"グループを追加\",\"address_group_detail\":\"アドレスグループ詳細\",\"edit_address_group\":\"アドレスグループ編集\",\"move_address_book_to_group\":\"アドレスを他グループに移動\",\"copy_address_book_to_group\":\"アドレスを他グループにコピー\",\"address_book\":\"アドレス追加\",\"remove_ab_from_group_title\":\"グループからアドレスを削除\",\"remove_ab_from_group_msg\":\"アドレスをグループから削除していいですか？\",\"yes\":\"はい\",\"no\":\"いいえ\",\"download_instruction\":{\"title_1\":\"保護\",\"title_2\":\"されたファイルの開け方\",\"view_protect\":\"保護されたファイルをブラウザで閲覧する：\",\"view_protect_files_message\":\"「表示」ボタンをクリックし、メールアドレスを入力してください。閲覧権限が確認されれば、メールにPINコードが届きます。このPINを入力しますとファイルは表示されます。\",\"download_use_protect_pdf\":\"保護されたPDFファイルをダウンロードして開く：\",\"download_use_protect_pdf_content\":\"保護されたPDFを開くためにはWindowsまたはMacOS用のAdobe Reader（XI以降のバージョン）が必要です。「ダウンロード」ボタンをクリックして第るをダウンロード・保存してください。Adobe Readerで開き、指示に従ってメールアドレスとPINを入れてください。\",\"download_use_protect_microsoft\":\"保護されたマイクロソフトオフィスファイルをダウンロードして利用する：\",\"download_use_protect_microsoft_content\":\"保護されたワード、エクセル、パワーポイントファイルをダウンロードして利用するにはMicrosoft Office 2010, 2013, 2016 またはOffice 365 の Windows版が必要です。ファイルをダウンロード・保存してアプリケーションで開いてください。初めての場合は、アドインのダウンロード・インストールの案内が出ます。案内に従ってアドインをインストールしてアプリケーションを再起動してください。再度ファイルを開きますとメールアドレスとPINの入力を経てファイルが利用できます。\",\"link_expiry\":\"このリンクは {{expire_date}} まで使えます\"},\"folder_size\":\"フォルダサイズ\",\"folder_settings\":\"フォルダ設定\",\"create_report\":\"レポート作成\",\"revoke_recipient_title\":\"ユーザー停止\",\"revoke_recipient_msg\":\"ユーザーを停止しますと、そのユーザーはこのファイルを開けなくなります。続けますか？\",\"number_of_times_viewed\":\"閲覧数\",\"number_of_times_download\":\"ダウンロード数\",\"all_member_in_project\":\"プロジェクトの全メンバー\",\"annotation_all\":\"@All\",\"empty_document_size\":\"ファイルサイズが空です\",\"max_length\":\"最大文字数は {{number}} です\",\"created_by\":\"オーナー\",\"select_address_group\":\"アドレスグループを選択\",\"group_collaborator_list\":\"コラボレーターリスト\",\"role\":\"役割\",\"input_password_to_unlock\":\"パスワードを入れてください\",\"auto_drm\":\"自動的にDRM保護する\",\"translate\":\"翻訳\",\"translation_file\":\"ファイル翻訳\",\"translation_file_name\":\"<strong>{{name}}</strong>を選択された言語に翻訳します\",\"translation_file_fail\":\"<strong>{{name}}</strong>は、翻訳できませんでした\",\"file_is_translating\":\"翻訳中のファイルが選択されています。翻訳が完了するまでお待ちください。\",\"file_translating_disabled\":\"ファイルは、翻訳中です\",\"translation_lang\":{\"label\":\"言語選択\",\"en\":\"英語\",\"ja\":\"日本語\",\"vi\":\"ベトナム語\",\"zh\":\"中国語\"},\"translation_error\":{\"404\":\"ファイルは見つかりません\",\"405\":\"ファイルはありません\",\"406\":\"翻訳できるファイルは20MBまでです\",\"407\":\"翻訳できるファイルは20ページまでです\",\"408\":\"ファイル名を翻訳できません\",\"409\":\"このファイルはGoogle翻訳に対応してません\"},\"annually_billing_cycle\":\"{{ number_months }} か月」\",\"no_credit_card_required\":\"トライアル中はクレジットカードは不要です\",\"summary_sub_text\":\"{{ currency }}{{ price }} x {{ number_user }} ユーザー\",\"sign_up\":\"ユーザー登録\",\"sign_up_title\":\"SecureDriveアカウント登録\",\"agree_term\":\"<a href='https://689cloud.com/terms-and-conditions/' target='_blank'>利用規約</a> および <a href='https://689cloud.com/privacy-policy/' target='_blank'>プライバシーポリシー</a>に同意します。\",\"add_payment_card\":\"お支払いカード登録\",\"holder_name\":\"カード氏名\",\"expired_on\":\"有効期限\",\"delete_card_title\":\"お支払いカードを削除\",\"delete_card_mgs\":\"クレジットカードを削除してもいいですか？\",\"trial_mgs\":\"<p class='p-m-0'>試用期間は、 <strong>{{count}}日</strong>で終了します。</p>\"},\"validation\":{\"require\":\"このフィールドは必須です\",\"input_email\":\"メールアドレスを入力してください\",\"input_password\":\"パスワードを入力してください\",\"input_otp_code\":\"認証コードを入力してください\",\"special_chars\":\"特殊文字は使えません\",\"date_format\":\"日付形式が無効です\",\"confirm_password\":\"パスワードに誤りがあります\",\"min_length\":\"最低 {{number}} 文字必要です\",\"pattern\":\"正しいパターンを入れてください\",\"email_format\":\"メールアドレスは無効な形式です\",\"password_policies\":{\"length\":\"パスワードの文字数は {{min}}-{{max}} 文字です\",\"capital\":\"英大文字 {{number}} 字\",\"lower\":\"英小文字 {{number}} 字を含む必要があります\",\"special\":\"特殊文字 {{number}} 個を含む必要があります\",\"number\":\"数字 {{number}} 個を含む必要があります\"},\"invalid_color_format\":\"無効な色\",\"invalid_email_format\":\"メールアドレスの形式が無効です\",\"input_color\":\"透かしの色を設定してください。\",\"remove_old_card_before_create_new\":\"新しいカードを登録する前に登録済みのカードを削除してください。\"},\"default_toast\":{\"create_success\":\"登録しました\",\"add_success\":\"追加しました\",\"update_success\":\"更新しました\",\"update_pass_success\":\"新しいパスワードは更新されました\",\"save_success\":\"保存しました\",\"delete_success\":\"削除しました\",\"revoke_success\":\"ファイルをアクセス停止にしました\",\"drop_upload\":\"アップロードするファイルをドラッグアンドドロップしてください\",\"exist_file_uploading\":\"{{fileName}} がアップロードされています\",\"wait\":\"お待ちください。。。\",\"only_support_trial\":\"現在は使用アカウントしかありません\",\"move_success\":\"移動しました\",\"invite_success\":\"招待しました\",\"invite_success_error_users\":\"次のアドレスは招待できませんでした: \",\"share_success\":\"共有しました\",\"restore_success\":\"リストアしました\",\"upload_success\":\"アップロードしました\",\"send_confirm_email\":\"確認メールを送りましたので、ご確認ください\",\"invalid_data\":\"無効なデータがあります\",\"waiting_sync\":\"アップデートが終るまで少々お待ちください\",\"error_dot_folder\":\"ピリオドだけのファイル名は無効です\",\"copy_success\":\"コピーしました\",\"remove_success\":\"削除しました\",\"change_mail_success\":\"メールアドレスを変更しました\",\"activate_success\":\"チームの有効化に成功しました。\",\"deactivate_success\":\"無効化しました\",\"unlock_success\":\"ロックアウト解除されました\",\"import_success\":\"インポートが完了しました\",\"not_allow_upload_folders\":\"一度に複数のフォルダをアップロードできません\",\"load_data_failed\":\"データ読込失敗\",\"request_change_email_success\":\"メールアドレスを変更するためのメールを送りました\",\"project_is_copying\":\"プロジェクトがコピーされます\",\"signup_success\":\"アカウント登録は成功しました。\",\"add_card_success\":\"お支払いカードの登録は成功しました。\",\"delete_card_success\":\"お支払いカードの削除は成功しました。\"},\"error\":{\"100\":\"ログインが無効です\",\"101\":\"アクセストークンの作成が出来ませんでした。\",\"102\":\"ログインが無効です\",\"103\":\"無効な認証コードもしくは認証コードの期限が切れています。\",\"104\":\"アカウントディレクトリが無効です\",\"105\":\"アカウントディレクトリのパスワードの期限が切れています。\",\"106\":\"アカウントディレクトリの期限が切れています。\",\"107\":\"アカウントディレクトリ－パスワードのリトライ回数の制限を超えています\",\"108\":\"アカウントディレクトリー\",\"109\":\"アカウントディレクトリ－セキュリティプロバイダによるシステムエラー\",\"110\":\"メールアドレスは既に使われています\",\"112\":\"<p class='text-center'>あなたのアカウントは停止中です <br/>管理者に連絡してください</p>\",\"113\":\"ユーザーはロックアウトされてません\",\"114\":\"ユーザーは既にロックアウト解除されてます\",\"200\":\"OK.\",\"300\":\"ログインが無効です\",\"301\":\"無効なPINコードもしくはPINコードの期限が切れています。\",\"302\":\"パスワードが合いません\",\"303\":\"無効な色\",\"304\":\"無効なウェブサイトＵＲＬ\",\"305\":\"無効な支払通貨\",\"306\":\"無効なページリクエスト\",\"307\":\"無効な日付\",\"308\":\"無効なフォルダーをアップデートしました。\",\"309\":\"無効なプロジェクト設定\",\"310\":\"無効なチームステータス\",\"311\":\"無効な支払方法\",\"312\":\"無効な支払請求書発行サイクル\",\"313\":\"ログインが無効です\",\"314\":\"パスワード形式が無効です\",\"318\":\"有効期限は無効です\",\"400\":\"無効なリクエスト\",\"401\":\"操作は許可されてません\",\"403\":\"権限がありません\",\"404\":\"見つかりません\",\"406\":\"無効なデータが存在します。\",\"407\":\"パラメーターがありません。\",\"408\":\"アプリは有効ではありません。ベンダーにお問い合わせください。\",\"500\":\"システムエラー\",\"501\":\"グループ名には次の文字は使えません: ,/\",\"600\":\"プロジェクトが見つかりません。\",\"601\":\"新しいプロジェクトを作ることが出来ませんした。\",\"602\":\"プロジェクトがコピーされます\",\"700\":\"フォルダーが見つかりません。\",\"701\":\"特殊文字は使えません\",\"702\":\"権限がありません\",\"800\":\"ファイルが見つかりません。\",\"801\":\"ファイルのバージョンが見つかりません。\",\"802\":\"ファイルのライセンスが見つかりません。\",\"803\":\"同じ名前のファイルが存在しています。\",\"804\":\"ファイルは保護されています。\",\"805\":\"ファイルの複合化が出来ませんでした。\",\"806\":\"ファイルは大きすぎてプレビューできません。ダウンロードしてください。\",\"807\":\"ファイルを暗号化しています。\",\"900\":\"ラベルが見つかりません。\",\"901\":\"ラベルは既に存在しています。\",\"1100\":\"共有リンクが見つかりません。\",\"1101\":\"共有リンクパッケージが見つかりません。\",\"1102\":\"リンクの期限が切れました\",\"1103\":\"リンクが見つかりません。\",\"1106\":\"位置が必要です\",\"1107\":\"フォントサイズは必須で、値は0より大きい必要があります\",\"1109\":\"ファイル転送の数が、転送全体の数を超えました。\",\"1111\":\"パスワードが違います\",\"1112\":\"リンクが空です\",\"1113\":\"ファイルの有効期限が切れており、使用できなくなりました\",\"1200\":\"ダウンロードの上限回数に達しました。\",\"1201\":\"ファイルのダウンロードが出来ませんでした。\",\"1202\":\"ダウンロードzipキューが見つかりません。\",\"1203\":\"Zipファイルとしてダウンロードできません。フォルダーが空になっています。\",\"1300\":\"ファイルの拡張は許可されていません。\",\"1301\":\"アップロード中にエラーが起きました\",\"1302\":\"アップロードファイルのデータが見つかりません。\",\"1304\":\"ファイルをアップロードできません\",\"1400\":\"ユーザーが見つかりません。\",\"1401\":\"ユーザーは既に存在しています。\",\"1402\":\"グループユーザーが見つかりません。\",\"1403\":\"ユーザーグループ名は存在しています。\",\"1404\":\"ユーザーの作成が出来ませんでした。\",\"1405\":\"ユーザーの役割が見つかりません。\",\"1406\":\"現在のパスワードが誤っています。\",\"1407\":\"フォルダー内にユーザーが見つかりません。\",\"1408\":\"先にユーザーがオーナーであるプロジェクトの移管を依頼してください。\",\"1409\":\"グループにユーザーがありません\",\"1410\":\"このユーザーはプロジェクトのコピーを現在行っているため役割は今変更できません。\",\"1411\":\"インポート失敗。CSVファイルが無効です。\",\"1412\":\"インポート失敗。CSVファイルが空です。\",\"1413\":\"インポートできませんでした\",\"1414\":\"グループ名の最大文字数 > 64 文字\",\"1415\":\"パスワードにはスペースは使えません\",\"1416\":\"新しいパスワードは現在のものと同じではいけません\",\"1500\":\"アドレスブックが見つかりません。\",\"1501\":\"アドレスブックは既に存在しています。\",\"1502\":\"グループアドレスブックは見つかりません。\",\"1503\":\"アドレスグループの名前は既に存在しています。\",\"1600\":\"コメントが見つかりません。\",\"1700\":\"会社が見つかりません。\",\"1701\":\"会社は既に存在しています。\",\"1800\":\"このチームは存在しません\",\"1801\":\"チームは既に存在しています。\",\"1802\":\"チームの支払が見つかりません。\",\"1803\":\"チームメンバーの人数は上限に達しています。\",\"1804\":\"チームの支払をアップデート出来ません。\",\"1805\":\"チームの支払領収書が発行できませんでした。\",\"1806\":\"チームのストレージが上限に達しています。\",\"1807\":\"新しいチームを作ることが出来ませんでした。\",\"1808\":\"ユーザー価格が見つかりません。\",\"1809\":\"ストレージの価格が見つかりません。\",\"1810\":\"チームの支払カードが見つかりません。\",\"1811\":\"無効なチームへの通知設定\",\"2300\":\"このファイルにアクセスする権限のないE-mailアドレスのユーザーです。\",\"2502\":\"You cannot update the in-used package\",\"2700\":\"かーどは既に存在します\",\"2701\":\"カード種が見つかりません\",\"2702\":\"カード番号の形式が無効です\",\"2703\":\"カードは期限切れです\",\"2704\":\"最初にクレジットカードを登録してください\",\"2705\":\"お客様 Stripe は、見つかりません\",\"2706\":\"カードを有効にしました\",\"2707\":\"このカードは無効です。別のカードをご利用ください。\",\"2708\":\"試用アカウントのお支払い方法を更新できません\",\"2709\":\"ユーザー数課金とストレージ容量課金の通貨は一緒である必要があります\",\"2710\":\"カードを削除できません\",\"2711\":\"決済失敗\",\"2712\":\"カードの有効化ができません\",\"2713\":\"クレジットカード処理でエラーが発生しました。\",\"2714\":\"カードのセキュリティコードが違います\",\"invalid_expiry_date\":\"有効期限は無効です\",\"invalid_date\":\"日付が無効です\",\"invalid_email\":\"メールアドレスが無効です\"},\"invite_error_users\":{\"1\":\"ユーザーの役割が無効です: {{email}}\",\"2\":\"ユーザー数の上限です: {{email}}\",\"3\":\"メールアドレスの形式が無効です: {{email}}\",\"4\":\"ユーザーは既に存在します: {{email}}\",\"5\":\"このユーザーは存在しません: {{email}}\",\"6\":\"チームに登録されていないユーザーは招待できません：{{email}}\"},\"primeng\":{\"accept\":\"はい\",\"reject\":\"いいえ\",\"weak\":\"弱い\",\"medium\":\"普通\",\"strong\":\"強い\",\"passwordPrompt\":\"パスワードを入れてください\"},\"stripe_error\":{\"INCOMPLETE_NUMBER\":\"カード番号が足りません\",\"INCORRECT_NUMBER\":\"カード番号が間違っています\",\"INVALID_NUMBER\":\"カード番号が無効です\",\"INVALID_EXPIRY_YEAR_PAST\":\"カード期限の年が過去のものです\",\"INCOMPLETE_CVC\":\"カードのセキュリティコードが無効です\",\"INCOMPLETE_EXPIRY\":\"カードの有効期限が足りません\",\"INVALID_EXPIRY_YEAR\":\"カード期限の年が無効です\",\"INVALID_EXPIRY_MONTH_PAST\":\"カード期限の月が過去のものです\",\"CARD_DECLINED\":\"カードを登録できません。 カード会社にお問い合わせください。\",\"UPGRADE_ACCOUNT_FAIL\":\"お支払いを処理できません。 カード会社にお問い合わせください。\",\"ACTIVATE_CARD_FAIL\":\"カードを登録できません。 カード会社にお問い合わせください。\",\"DELETE_CARD_FAIL\":\"カードを削除できません。 カード会社にお問い合わせください。\"}}");

/***/ }),

/***/ "./src/assets/i18n/vi.json":
/*!*********************************!*\
  !*** ./src/assets/i18n/vi.json ***!
  \*********************************/
/*! exports provided: app_title, page_title, language, button, app_menu, features, label, validation, default_toast, error, invite_error_users, primeng, stripe_error, default */
/***/ (function(module) {

module.exports = JSON.parse("{\"app_title\":\"SecureDrive\",\"page_title\":{\"login\":\"Đăng Nhập - 689Cloud\",\"forgot_password\":\"Quên Mật Khẩu - 689Cloud\",\"create_password\":\"Tạo Mật Khẩu - 689Cloud\",\"project_detail\":\"Chi Tiết Dự Án - 689Cloud\",\"project_list\":\"Danh Sách Dự Án - 689Cloud\",\"create_project\":\"Tạo Dự Án - 689Cloud\",\"view_file_report\":\"Xem Tập Tin Báo Cáo - 689Cloud\",\"history\":\"Lịch Sử - 689Cloud\",\"user_profile\":\"Thông Tin Thành Viên - 689Cloud\",\"address_book_list\":\"Danh Sách Danh Bạ - 689Cloud\",\"address_group_list\":\"Danh Sách Nhóm Danh Bạ - 689Cloud\",\"change_email\":\"Thay Đổi E-mail - 689Cloud\",\"change_password\":\"Thay Đổi Mật Khẩu - 689Cloud\",\"view_link\":\"Xem Link - 689Cloud\",\"view_online\":\"Xem Trực Tuyến - 689Cloud\",\"list_label\":\"Danh Sách Nhãn - 689Cloud\",\"group_address_detail\":\"Chi tiết nhóm danh bạ - 689Cloud\",\"list_link\":\"Danh sách liên kết - 689Cloud\",\"link_detail\":\"Chi tiết liên kết - 689Cloud\",\"signup\":\"Đăng Ký - 689Cloud\"},\"language\":{\"label\":\"Chọn ngôn ngữ\",\"auto\":\"Tự Động\",\"en\":\"English\",\"ja\":\"日本語\",\"vn\":\"Tiếng Việt\"},\"button\":{\"next\":\"Tiếp\",\"log_in\":\"Đăng nhập\",\"verify_otp_code\":\"Xác thực\",\"submit\":\"Gửi\",\"cancel\":\"Hủy\",\"delete\":\"Xóa\",\"view\":\"Xem\",\"back\":\"Quay về\",\"save\":\"Lưu\",\"done\":\"Xong\",\"new\":\"Tạo mới\",\"add\":\"Thêm\",\"add_to_group\":\"Thêm vào Nhóm\",\"remove\":\"Xóa\",\"copy\":\"Sao chép\",\"move\":\"Di chuyển\",\"verify\":\"Xác thực\",\"download\":\"Tải về\",\"ok\":\"OK\",\"encode\":\"Mã hóa\",\"disable_drm\":\"Vô hiệu hóa DRM\",\"sign_up\":\"Đăng Ký\"},\"app_menu\":{\"project\":\"Dự án\",\"member\":\"Thành viên\",\"address_book\":\"Danh bạ\",\"group_address\":\"Nhóm danh bạ\",\"group_member\":\"Nhóm thành viên\",\"history\":\"Lịch sử\",\"dashboard\":\"Bảng điều khiển\",\"report\":\"Báo cáo\",\"admin_console\":\"Trang Quản Trị\"},\"features\":{\"show_less_features\":\"Hiển thị ít tính năng\",\"show_more_features\":\"Hiển thị thêm tính năng\",\"expiry_setting\":\"Cài đặt thời hạn\",\"printing_control\":\"Kiểm soát in ấn\",\"two_factor_auth\":\"Xác thực 2 yếu tố\",\"secure_online_viewer\":\"Trình xem trực tuyến bảo mật\",\"watermark_view_online\":\"Đóng dấu bản quyền khi xem trực tuyến\",\"revoke_access_remotely\":\"Thu hồi quyền truy cập từ xa\",\"copy_protection\":\"Bảo vệ sao chép\",\"tracking_documents\":\"Theo dõi tài liệu\",\"secure_shares_per_month\":\"Chia sẻ bảo mật hàng tháng: {{ value }}\",\"secure_shares_per_year\":\"Chia sẻ bảo mật hàng năm: {{ value }}\",\"maximum_file_size\":\"Kích thước tối đa của tập tin: {{ value }}\",\"shared_space\":\"Không gian chia sẻ: {{ value }}\",\"supported_protected_files\":\"Định dạng tập tin được bảo vệ: PDF, Microsoft Office (docx, pptx, xlsx)\"},\"label\":{\"first_month_free\":\"Miễn phí tháng đầu tiên\",\"user_per_month\":\"/người/tháng\",\"number_of_users\":\"Số lượng người dùng\",\"today_total\":\"Tổng số hôm nay\",\"your_current_plan\":\"Kế hoạch hiện tại của bạn\",\"ok\":\"OK\",\"card_holder_name\":\"Tên chủ thẻ\",\"confirm_payment_information\":\"Xác nhận thông tin thanh toán\",\"total\":\"Tổng\",\"monthly\":\"Hàng tháng\",\"annually\":\"Hàng năm\",\"billing_cycle\":\"Chu kỳ thanh toán\",\"users\":\"Người dùng\",\"package\":\"Gói\",\"confirm_details\":\"Vui lòng kiểm tra chi tiết\",\"payment_confirmation\":\"Xác nhận thanh toán\",\"recurring_month_cost\":\"Chi phí hàng tháng định kỳ\",\"recurring_annual_cost\":\"Chi phí hàng năm định kỳ\",\"show_less_features\":\"Ẩn bớt tính năng\",\"show_more_features\":\"Hiển thị thêm tính năng\",\"copy_right\":\"© {{year}} 689Cloud PTE Ltd\",\"privacy_policy\":\"Chính sách bảo mật\",\"term_and_condition\":\"Các điều khoản & điều kiện\",\"home\":\"Trang Chủ\",\"blog\":\"Blog\",\"help\":\"Trợ giúp\",\"sign_in\":\"Đăng nhập vào SecureDrive của bạn\",\"signing_in_as\":\"Đăng nhập bằng <strong>{{email}}</strong>\",\"enter_email\":\"Nhập E-mail của bạn\",\"reset_password\":\"Đặt lại mật khẩu\",\"update_password\":\"Cập Nhật Mật Khẩu\",\"choose_team\":\"Chọn nhóm để đăng nhập\",\"enter_password\":\"Nhập mật khẩu của bạn\",\"keep_login\":\"Duy trì trạng thái đăng nhập\",\"back_login\":\"Không phải bạn? Trở về trang đăng nhập\",\"account_settings\":\"Cài đặt tài khoản\",\"logout\":\"Đăng xuất\",\"project_list\":\"Danh Sách Dự Án\",\"add\":\"Thêm\",\"save\":\"Lưu\",\"delete\":\"Xóa\",\"cancel\":\"Hủy\",\"retry\":\"Thử lại\",\"back\":\"Quay về\",\"me\":\"tôi\",\"item\":\"mục\",\"items\":\"mục\",\"filter_by\":\"Lọc theo\",\"file_name\":\"Tên tệp\",\"project_name\":\"Tên dự án\",\"search\":\"Tìm kiếm\",\"no_record\":\"Không có kết quả nào.\",\"numbers_user\":\"Thành Viên\",\"create_date\":\"Ngày Tạo\",\"owner\":\"Chủ Sở Hữu\",\"date_modified\":\"Ngày Sửa\",\"action\":\"Hành động\",\"size\":\"Tệp\",\"select_all\":\"Chọn Tất Cả\",\"sort_by\":\"Sắp xếp theo\",\"date_modified_asc\":\"Ngày chỉnh sửa, Tăng dần\",\"date_modified_desc\":\"Ngày chỉnh sửa, Giảm dần\",\"project_name_asc\":\"Tên dự án, Tăng dần\",\"project_name_desc\":\"Tên dự án, Giảm dần\",\"name_asc\":\"Tên, Tăng dần\",\"name_desc\":\"Tên, Giảm dần\",\"owner_asc\":\"Chủ sở hữu, Tăng dần\",\"owner_desc\":\"Chủ sở hữu, Giảm dần\",\"settings\":\"Cài đặt\",\"share\":\"Chia sẻ\",\"clone\":\"Nhân bản\",\"transfer\":\"Chuyển nhượng\",\"more_option\":\"Lựa chọn khác\",\"file_report_details\":\"Báo cáo chi tiết\",\"internal_team_tracking\":\"Theo dõi nội bộ nhóm\",\"external_team_tracking\":\"Theo dõi bên ngoài nhóm\",\"number_of_downloads\":\"Số lượt tải xuống\",\"number_of_views\":\"Số lượt xem\",\"total_of_downloads\":\"Tổng số lượt tải xuống\",\"total_of_views\":\"Tổng số lượt xem\",\"downloaded\":\"Đã tải về\",\"viewed\":\"Đã xem\",\"date_time\":\"Ngày giờ\",\"ip_address\":\"Địa chỉ IP\",\"type\":\"Loại\",\"start_end_date\":\"Khoảng Thời Gian\",\"document_open_statistics\":\"Thống Kê Truy Cập\",\"os_open_statistics\":\"Lượng Truy Cập Theo Hệ Điều Hành\",\"number_of_times_opened\":\"Số lần đã mở\",\"total_of_times_opened\":\"Tổng Số Lần Truy Cập\",\"equal_not_open_yet\":\" = Chưa Mở\",\"equal_opened\":\" = Đã Mở\",\"opened\":\"Đã Mở\",\"android\":\"Android\",\"ios\":\"iOS\",\"mac\":\"Mac\",\"undetectable\":\"Không thể phát hiện\",\"window\":\"Window\",\"member\":\"Thành viên\",\"revoke\":\"Hủy bỏ\",\"open_status\":\"Trạng thái mở\",\"last_opened\":\"Lần cuối mở\",\"post\":\"Đăng\",\"dropbox\":\"Dropbox\",\"box\":\"Box\",\"upload_header\":\"Tải lên 689Cloud\",\"duplicate_files\":\"Tập tin đã tồn tại\",\"duplicate_files_local\":\"Tập tin đã tồn tại trên cục bộ\",\"duplicate_files_message\":\"Những tập tin này đã tồn tại trong dự án, xóa nó khỏi danh sách này nếu bạn không muốn tải lên lại\",\"duplicate_files_local_message\":\"Những tập tin này đã tồn tại trong cục bộ, xóa nó khỏi danh sách này nếu bạn không muốn tải lên lại\",\"upload_cloud_is_opening\":\"Tải từ đám mây đang mở\",\"no_data\":\"Không có dữ liệu được tìm thấy\",\"enter_otp_code\":\"Nhập mã xác thực của bạn\",\"is_encrypted\":\"Đã được mã hóa\",\"enter_pin_code\":\"Nhập mã Pin của bạn\",\"project_detail\":\"Chi tiết Dự án\",\"project_create\":\"Thêm dự án mới\",\"project_info\":\"Thông tin dự án\",\"collaborators\":\"Công tác viên\",\"project_settings\":\"Cài đặt dự án (Thư mục gốc)\",\"name\":\"Tên\",\"path\":\"Đường dẫn\",\"apply_drm\":\"Áp dụng mã hóa tập tin PDF và Microsoft Office\",\"send_notify_all\":\"Send All Members\",\"notify_specific\":\"Notify Specific\",\"override_project\":\"Ghi đè lên quyền đã tồn tại\",\"notify\":\"Thông báo\",\"show_wm\":\"Chèn Watermark vào tài liệu xem trực tuyến\",\"font_size\":\"Kích Thước\",\"position\":\"Vị trí\",\"default_wm\":\"Mặc định (E-mail của người xem)\",\"customs\":\"Cài Đặt Nội Dung\",\"set_expiry_doc\":\"Đặt ngày hết hạn tài liệu\",\"no_expiry_date\":\"Vô thời hạn\",\"document_expiry_date\":\"Ngày hết hạn tài liệu\",\"document_expiry_date_tooltip\":\"Chọn ngày hết hạn cho tài liệu\",\"hour\":\"Giờ\",\"minute\":\"Phút\",\"printable\":\"Có thể in\",\"printable_tooltip\":\"Cho phép các thành viên nội bộ có thể in tài liệu\",\"editable\":\"Có thể chỉnh sửa\",\"editable_tooltip\":\"Cho phép các thành viên nội bộ có thể chỉnh sửa & lưu tài liệu\",\"lbl_timezone\":\"Múi giờ\",\"no_item_found\":\"Không tìm thấy\",\"clear_all\":\"Xóa tất cả\",\"watermark_position\":{\"center\":\"Giữa\",\"top-left\":\"Trên-Trái\",\"top-center\":\"Trên-Giữa\",\"top-right\":\"Trên-Phải\",\"bottom-left\":\"Dưới-Trái\",\"bottom-center\":\"Dưới-Giữa\",\"bottom-right\":\"Dưới-Phải\",\"diagonal\":\"Đường chéo\"},\"timezone\":{\"GMT_-12\":\"(GMT -12:00) Eniwetok, Kwajalein\",\"GMT_-11\":\"(GMT -11:00) Đảo Midway, Samoa\",\"GMT_-10\":\"(GMT -10:00) Hawaii\",\"GMT_-9\":\"(GMT -9:00) Alaska\",\"GMT_-8\":\"(GMT -8:00) Giờ Thái Bình Dương (Hoa Kỳ & Canada)\",\"GMT_-7\":\"(GMT -7:00) Giờ Miền Núi (Hoa Kỳ & Canada)\",\"GMT_-6\":\"(GMT -6:00) Giờ Miền Trung (Hoa Kỳ & Canada), Mexico City\",\"GMT_-5\":\"(GMT -5:00) Giờ Miền Đông (Hoa Kỳ & Canada), Bogota, Lima\",\"GMT_-4\":\"(GMT -4:00) Giờ Đại Tây Dương (Canada), Caracas, La Paz\",\"GMT_-3\":\"(GMT -3:00) Brazil, Buenos Aires, Georgetown\",\"GMT_-2\":\"(GMT -2:00) Trung Đại Tây Dương\",\"GMT_-1\":\"(GMT -1:00) Azores, Quần Đảo Cape Verde\",\"GMT_0\":\"(GMT) Giờ Tây Âu, Luân Đôn, Lisbon, Casablanca\",\"GMT_+1\":\"(GMT +1:00) Brussels, Copenhagen, Madrid, Paris\",\"GMT_+2\":\"(GMT +2:00) Kaliningrad, Nam Phi\",\"GMT_+3\":\"(GMT +3:00) Baghdad, Riyadh, Moscow, St. Petersburg\",\"GMT_+4\":\"(GMT +4:00) Abu Dhabi, Muscat, Baku, Tbilisi\",\"GMT_+5\":\"(GMT +5:00) Ekaterinburg, Islamabad, Karachi, Tashkent\",\"GMT_+6\":\"(GMT +6:00) Almaty, Dhaka, Colombo\",\"GMT_+7\":\"(GMT +7:00) Bangkok, Hà Nội, Jakarta\",\"GMT_+8\":\"(GMT +8:00) Bắc Kinh, Perth, Singapore, Hồng Kông\",\"GMT_+9\":\"(GMT +9:00) Tokyo, Seoul, Osaka, Sapporo, Yakutsk\",\"GMT_+10\":\"(GMT +10:00) Đông Úc, Guam, Vladivostok\",\"GMT_+11\":\"(GMT +11:00) Magadan, Quần đảo Solomon, New Caledonia\",\"GMT_+12\":\"(GMT +12:00) Auckland, Wellington, Fiji, Kamchatka\"},\"email\":\"E-mail\",\"email_address\":\"Địa chỉ E-mail\",\"group\":\"Nhóm\",\"select_role\":\"Chọn quyền\",\"system_role\":{\"admin\":\"Quản trị viên\",\"manager\":\"Quản lý\",\"user\":\"Thành viên\",\"guest\":\"Khách\"},\"project_role\":{\"owner\":\"Chủ sở hữu\",\"editor\":\"Biên tập viên\",\"viewer\":\"Người xem\",\"previewer\":\"Khách mời\",\"viewer_uploader\":\"Người xem - Tải lên\",\"previewer_uploader\":\"Khách mời - Tải lên\",\"uploader\":\"Người tải lên\"},\"delete_license\":\"đã xóa DRM cho tập tin\",\"revoke_user\":\"đã xoá danh bạ\",\"add_file\":\"đã tải lên một tập tin vào\",\"add_files\":\"đã tải lên{{count}} tập tin vào\",\"encode_file\":\"đã thiết lập DRM cho tập tin\",\"update_encode_file\":\"đã chỉnh sửa cài đặt DRM cho tập tin\",\"update_file\":\"đã đổi tên tập tin trong\",\"delete_file\":\"đã chuyển một tập tin vào thùng rác\",\"move_file\":\"đã chuyển một tập tin đến\",\"move_files\":\"đã chuyển {{count}} tập tin đến\",\"restore_file\":\"đã khôi phục tập tin trong\",\"delete_file_forever\":\"đã xóa tập tin vĩnh viễn\",\"copy_file\":\"đã sao chép tập tin vào\",\"copy_files\":\"đã sao chép {{count}} tập tin vào\",\"attach_label\":\"đính kèm nhãn\",\"attach_labels\":\"đính kèm {{count}} nhãn\",\"detach_label\":\"tách nhãn\",\"detach_labels\":\"detach {{count}} nhãn\",\"add_folder\":\"đã tạo một thư mục trong\",\"update_folder\":\"đã đổi tên thư mục\",\"delete_folder\":\"đã chuyển một thư mục vào thùng rác\",\"delete_folders\":\"đã chuyển {{count}} thư mục vào thùng rác\",\"move_folder\":\"đã chuyển một thư mục đến\",\"move_folders\":\"đã chuyển {{count}} mục đến\",\"restore_folder\":\"đã khôi phục thư mục\",\"delete_folder_forever\":\"đã xóa thư mục vĩnh viễn\",\"delete_folders_forever\":\"đã xóa {{count}} mục vĩnh viễn\",\"update_folder_setting\":\"đã chỉnh sửa cài đặt cho thư mục\",\"copy_folder\":\"đã sao chép thư mục vào\",\"copy_folders\":\"đã sao chép {{count}} thư mục vào\",\"invite_user\":\"đã mời một thành viên vào\",\"invite_users\":\"đã mời {{count}} thành viên vào\",\"remove_user\":\"đã loại bỏ thành viên khỏi\",\"update_role_user\":\"đã cập nhật quyền của một thành viên\",\"invite_group\":\"đã mời một nhóm thành viên vào\",\"invite_groups\":\"đã mời {{count}} nhóm thành viên vào\",\"remove_group\":\"đã loại bỏ nhóm thành viên khỏi\",\"update_role_group\":\"đã cập nhật quyền của nhóm thành viên\",\"created_link\":\"đã tạo liên kết\",\"deleted_link\":\"đã xóa liên kết\",\"update_link\":\"đã cập nhật liên kết\",\"share_link_email\":\"đã chia sẻ liên kết với một địa chỉ E-mail\",\"share_links\":\"đã chia sẻ liên kết với {{count}} địa chỉ E-mail\",\"add_comment\":\"đã tạo bình luận mới trong dự án\",\"update_comment\":\"đã cập nhật bình luận mới trong dự án\",\"delete_comment\":\"đã xóa bình luận mới trong dự án\",\"add_comment_file\":\"đã tạo bình luận mới trên tập tin\",\"update_comment_file\":\"đã cập nhật bình luận mới trên tập tin\",\"delete_comment_file\":\"đã xóa bình luận mới trên tập tin\",\"created_label\":\"đã tạo một nhãn dán trong dự án\",\"updated_label\":\"đã cập nhật một nhãn dán trong dự án\",\"deleted_label\":\"đã xóa một nhãn dán trong dự án\",\"message\":\"Tin nhắn\",\"select_member_group\":\"Chọn Nhóm Thành Viên\",\"delete_project_title\":\"Xóa Dự án\",\"delete_project_content\":\"Bạn có thật sự muốn xóa dự án này?\",\"copy_project_title\":\"Sao Chép Dự Án\",\"copy_project_content\":\"Bạn có thật sự muốn sao chép dự án này?\",\"copying\":\"Đang sao chép\",\"transfer_project\":\"Chuyển nhượng vai trò chủ dự án\",\"transfer_project_role\":\"Chuyển nhượng vai trò chủ dự án cho\",\"transfer_project_title\":\"Chuyển nhượng dự án\",\"transfer_project_content\":\"Quyền sở hữu dự án sẽ được chuyển qua cho <strong class=\\\"p-text-truncate email-transfer\\\" title=\\\"{{email}}\\\">{{email}}. </strong>Bạn nên chắc chắn trước khi xác nhận?\",\"all_project\":\"Tất cả dự án\",\"loading\":\"Đang tải...\",\"permission\":\"Quyền Hạn\",\"title\":\"Tiêu đề\",\"description\":\"Mô tả\",\"delete_label\":\"Xóa nhãn\",\"delete_label_message\":\"Bạn có chắc muốn xoá nhãn này?\",\"color\":\"Màu\",\"select_one\":\"hoặc chọn một\",\"create_new_label\":\"Tạo nhãn mới\",\"edit_label\":\"Chỉnh sửa nhãn\",\"link_list\":\"Danh sách liên kết\",\"link_type_project\":\"Dự án\",\"link_type_folder\":\"Thư mục\",\"link_type_file\":\"Tập tin\",\"link_type_multi_files\":\"Nhiều tập tin\",\"document\":\"Tài liệu\",\"delete_link\":\"Xóa Liên Kết\",\"delete_link_message\":\"Bạn có muốn xóa liên kết này?\",\"link_detail\":\"Chỉnh Sửa Liên Kết\",\"edit_link_info\":\"Chỉnh sửa thông tin liên kết\",\"link_url\":\"URL Liên Kết\",\"password_lbl\":\"Mật khẩu\",\"link_expiry_date\":\"Ngày hết hạn liên kết\",\"allow_download_file\":\"Cho phép tải tập tin\",\"allow_public_view\":\"Cho phép xem công khai\",\"copy_link\":\"Sao chép liên kết\",\"show_password\":\"Hiện mật khẩu\",\"hide_password\":\"Ẩn mật khẩu\",\"share_documents\":\"Danh sách tại liệu được chia sẻ\",\"share_address_book_list\":\"Danh sách địa chỉ được chia sẻ\",\"first_name\":\"Tên\",\"last_name\":\"Họ\",\"folder\":\"thư mục\",\"folders\":\"thư mục\",\"file\":\"tập tin\",\"files\":\"tập tin\",\"upload\":\"tải lên\",\"new_folder\":\"Thư mục mới\",\"remove\":\"Xóa\",\"rename\":\"Sửa tên\",\"remove_forever\":\"Xóa vĩnh viễn\",\"restore\":\"Phục hồi\",\"move\":\"Di chuyển đến\",\"copy\":\"Sao chép đến\",\"set_drm\":\"Bảo vệ (DRM)\",\"view_drm\":\"Xem cài đặt DRM\",\"view_online\":\"Xem trực tuyến\",\"download\":\"Tải xuống\",\"download_as_zip\":\"Tải tập tin về dưới dạng ZIP\",\"label\":\"Nhãn\",\"label_list\":\"Danh sách nhãn\",\"encoded\":\"Đã mã hóa\",\"encoding\":\"Đang mã hóa\",\"decoding\":\"Đang giải mã\",\"translating\":\"Đang dịch\",\"comments\":\"Bình luận\",\"activities\":\"Hoạt động\",\"confirm_remove_comment\":\"Bạn thật sự muốn gỡ bỏ bình luận này?\",\"end_activities\":\"Đã tải hết các hoạt động\",\"all_comments\":\"Tất cả bình luận\",\"end_comments\":\"Đã tải hết các bình luận\",\"no_comments\":\"Không có bình luận\",\"file_info\":\"Thông tin tập tin\",\"file_tracking\":\"Theo dõi tập tin\",\"report\":\"Báo cáo\",\"err_encode\":\"Đã xảy ra lỗi. Nhấn vào đây để mã hóa lại.\",\"drm_settings\":\"Cài đặt DRM\",\"upload_computer\":\"Tải tập tin từ máy tính\",\"upload_folder\":\"Tải thư mục từ máy tính\",\"upload_cloud\":\"Lấy tập tin từ cloud\",\"invite_people\":\"Thêm cộng tác viên\",\"edit_collaborators\":\"Chỉnh sửa cộng tác viên\",\"show_hidden_files\":\"Hiển thị các mục ẩn\",\"hide_hidden_files\":\"Ẩn các mục ẩn\",\"show_activities_comments\":\"Hiển thị hoạt động\",\"manage_label\":\"Quản lý nhãn\",\"manage_link\":\"Quản lý liên kết\",\"expiration\":\"Hết hạn\",\"set_password\":\"Thiết lập mật khẩu\",\"create_link\":\"Tạo liên kết\",\"share_link\":\"Chia sẻ liên kết\",\"document_setting\":\"Cài Đặt Tài Liệu\",\"copy_embed\":\"Sao chép liên kết nhúng\",\"printable_help\":\"Cho phép người nhận có thể in tài liệu\",\"editable_help\":\"Cho phép người nhận có thể chỉnh sửa tài liệu\",\"wm_help\":\"Áp dụng Watermark cho người nhận\",\"share_message\":\"Tin nhắn\",\"file_is_encoding\":\"Tài liệu được chọn có chứa tài liệu đang được mã hóa. Vui lòng chờ quá trình mã hóa kết thúc hoặc loại bỏ tài liệu đang mã hóa khỏi danh sách đã chọn.\",\"not_support_view_online\":\"Tập tin chưa được hỗ trợ xem trực tuyến!\",\"uploaded_on\":\"Tải lên ngày {{date}} bởi <b>{{user}}</b>\",\"current\":\"Hiện tại\",\"file_version\":\"Lịch Sử Sửa Đổi\",\"close\":\"Đóng\",\"make_current\":\"Đặt làm mặc định\",\"confirm_delete_version\":\"Xoá phiên bản này?\",\"download_folder\":\"Tải thư mục\",\"download_folder_message\":\"Thư mục của bạn đang được nén. Xin vui lòng chờ trong giây lát...\",\"delete_file_title\":\"Xóa tập tin\",\"delete_folder_title\":\"Xóa thư mục\",\"delete_item_content\":\"Bạn có thật sự muốn xóa {{title}} không?\",\"delete_item_forever_content\":\"Bạn có thật sự muốn xóa vĩnh viễn {{title}} không?\",\"this_file\":\"tập tin này\",\"this_folder\":\"thư mục này\",\"move_items_title\":\"Di chuyển các mục đã chọn '{{file}}'\",\"copy_items_title\":\"Sao chép các mục đã chọn '{{file}}'\",\"move_item_error_title\":\"Lỗi xảy ra đối với một số phần tử\",\"move_items_content_file\":\"Tập tin lỗi bao gồm: \",\"move_items_content_folder\":\"Thư mục lỗi bao gồm: \",\"create_folder\":\"Tạo thư mục\",\"add_collaborator\":\"Thêm Cộng Tác Viên\",\"add_group\":\"Thêm Nhóm Cộng Tác Viên\",\"collaborator_user_override\":\"Ghi đè quyền của cộng tác viên trong các thư mục con\",\"collaborator_group_override\":\"Ghi đè quyền của cộng tác viên\",\"detail\":\"Chi tiết\",\"file_size\":\"Kích Cỡ Tệp\",\"last_update\":\"Cập Nhật Lần Cuối\",\"updated_by\":\"Được Tạo Bởi\",\"detect\":\"Phân tích nhãn\",\"create_label\":\"Tạo Nhãn\",\"attached_label\":\"Đính kèm nhãn\",\"detached_label\":\"Gỡ nhãn khỏi tập tin\",\"create_new\":\"Tạo mới\",\"apply_label\":\"Áp dụng nhãn\",\"checked\":\"đã chọn\",\"no_message\":\"Không có tin nhắn\",\"notify_update_file_comment\":\" cập nhật bình luận trong tập tin\",\"notify_update_comment\":\" cập nhật bình luận trong dự án\",\"notify_invite_project\":\" vừa thêm bạn vào dự án\",\"notify_comment\":\" bình luận về dự án\",\"notify_file_comment\":\" bình luận trong tập tin\",\"notify_mention\":\" gắn thẻ bạn trong dự án của bạn\",\"notify_upload_file\":\" đăng tải tài liệu mới\",\"ago\":\" trước\",\"on\":\" - trong \",\"time\":{\"now\":\"ngay bây giờ\",\"second\":\" giây\",\"minute\":\" phút\",\"hour\":\" giờ\",\"day\":\" ngày\",\"year\":\" năm\",\"s\":\"\"},\"forgot_password\":\"Quên mật khẩu?\",\"forgot_password_msg\":\"Nhập địa chỉ E-mail của bạn để thiết lập lại mật khẩu. Bạn có thể cần kiểm tra thư mục thư rác của mình hoặc bỏ chặn noreply@689cloud.com. Cảm ơn\",\"choose_team_reset_password\":\"Chọn nhóm của bạn để thay đổi mật khẩu\",\"request_reset_password_success_msg\":\"Yêu cầu thay đổi mật khẩu của bạn đã được gửi đi, vui lòng kiểm tra E-mail của bạn để tạo mật khẩu mới\",\"current_password\":\"Mật Khẩu Hiện Tại\",\"new_password\":\"Mật Khẩu Mới\",\"confirm_password\":\"Nhập Lại Mật Khẩu Mới\",\"password_pattern\":\"Yêu cầu đối với mật khẩu\",\"invalid_reset_password_link\":\"Liên kết không hợp lệ hoặc đã hết hạn\",\"reset_password_success\":\"Xin chúc mừng! Bạn đã đặt lại mật khẩu của mình. Đăng nhập ngay.\",\"password_remain\":\"<p>Số lần còn lại: <strong>{{numberRemain}}</strong> <br/> <strong>Cảnh báo:</strong> Sau <strong>{{threshold}} liên tiếp</strong> đăng nhập không thành công, tài khoản của bạn sẽ bị khóa.</p>\",\"account_lock\":\"Tài khoản của bạn đã bị khóa.\",\"account_lock_try_again_msg\":\"Vui lòng đăng nhập sau \",\"account_lock_contact_admin_msg\":\" hoặc liên hệ với quản trị viên để mở khóa.\",\"password_expired\":\"Mật khẩu đã hết hạn. Vui lòng thay đổi mật khẩu để đăng nhập.\",\"change_password_first_time\":\"Vui lòng thay đổi mật khẩu của bạn cho lần đầu tiên đăng nhập\",\"update_your_email\":\"Thay Đổi E-mail\",\"enter_new_email\":\"Nhập E-mail mới của bạn\",\"change_email_success\":\"Xin chúc mừng! E-mail của bạn đã được cập nhật. Đăng nhập ngay.\",\"setting\":\"Cài đặt\",\"open\":\"Mở\",\"document_expiry_time\":\"Thời gian hết hạn\",\"create_project_with_setting\":\"Tạo dự án với cài đặt\",\"events\":\"Sự kiện\",\"load_more\":\"Tải thêm\",\"you\":\"Bạn\",\"unknown\":\"Không xác định\",\"log_in\":\"đăng nhập vào 689Cloud\",\"log_out\":\"đăng xuất khỏi 689Cloud\",\"add_user\":\"tạo thành viên mới\",\"update_user\":\"cập nhật thành viên\",\"delete_user\":\"xóa thành viên\",\"add_project\":\"đã tạo dự án\",\"update_project\":\"đã cập nhật dự án\",\"delete_project\":\"đã xóa dự án\",\"copy_project\":\"đã sao chép dự án\",\"transferred_project\":\"chuyển vai trò chủ sở hữu cho\",\"create_group\":\"tạo nhóm thành viên\",\"update_group\":\"cập nhật nhóm thành viên\",\"delete_group\":\"xóa nhóm thành viên\",\"add_member_group\":\"thêm một thành viên vào nhóm\",\"add_member_groups\":\"thêm {{count}} thành viên vào nhóm\",\"remove_member_group\":\"xóa một thành viên khỏi nhóm\",\"remove_member_groups\":\"xóa {{count}} thành viên khỏi nhóm\",\"move_member_group\":\"di chuyển một thành viên đến nhóm\",\"move_member_groups\":\"di chuyển {{count}} thành viên đến nhóm\",\"change_password\":\"Thay đổi mật khẩu\",\"change_email\":\"Thay đổi E-mail\",\"generate_pin_code\":\"Tạo mã PIN\",\"pin_code\":\"Mã PIN\",\"account_information\":\"Thông tin tài khoản\",\"email_notification_security\":\"THÔNG BÁO E-MAIL VÀ BẢO MẬT\",\"password_requirement\":\"Yêu cầu mật khẩu\",\"change_email_title\":\"Thay Đổi Địa Chỉ E-Mail\",\"change_email_msg\":\"Bạn có muốn thay đổi địa chỉ E-mail không?\",\"language\":\"Ngôn ngữ\",\"account_change\":\"Thông báo khi tài khoản của tôi có sự thay đổi\",\"encode_file_expired\":\"Thông báo cho tôi khi các tập tin được bảo vệ hết hạn\",\"new_comment\":\"Thông báo khi có thảo luận mới\",\"security_auth\":\"Xác thực 2 bước\",\"disable_reason\":\"(Bắt buộc bởi cài đặt nhóm)\",\"content_watermark_tooltip\":\"Nhập \\\"/n\\\" để xuống dòng cho hình mờ\",\"change_role_message\":\"Bạn cần phải lưu những gì bạn vừa thay đổi.\",\"address_book_list\":\"Danh Sách Danh Bạ\",\"create_new_address_book\":\"Tạo Danh Bạ\",\"edit_address_book\":\"Chỉnh Sửa Danh Bạ\",\"delete_address_book\":\"Xóa Danh Bạ\",\"delete_address_book_message\":\"Bạn có thật sự muốn xóa danh bạ này?\",\"delete_address_group\":\"Xóa Nhóm Danh Bạ\",\"delete_address_group_message\":\"Bạn có thật sự muốn xóa nhóm danh bạ này?\",\"add_address_book_to_group\":\"Thêm Danh Bạ Vào Nhóm\",\"address_book_group_list\":\"Danh Sách Nhóm Danh Bạ\",\"group_name\":\"Tên Nhóm\",\"no_address_book\":\"Số Liên Hệ\",\"add_new_address_group\":\"Thêm Mới Nhóm Danh Bạ\",\"address_group_detail\":\"Chi Tiết Nhóm Danh Bạ\",\"edit_address_group\":\"Sửa Nhóm Danh Bạ\",\"move_address_book_to_group\":\"Di Chuyển Danh Bạ Qua Nhóm Khác\",\"copy_address_book_to_group\":\"Chép Danh Bạ Qua Nhóm Khác\",\"address_book\":\"Địa Chỉ E-mail\",\"remove_ab_from_group_title\":\"Xóa Danh Bạ Khỏi Nhóm\",\"remove_ab_from_group_msg\":\"Bạn có thật sự muốn xóa danh bạ ra khỏi nhóm không?\",\"yes\":\"Có\",\"no\":\"Không\",\"download_instruction\":{\"title_1\":\"Hướng dẫn cho\",\"title_2\":\"các tệp được mã hóa\",\"view_protect\":\"Xem các tệp được mã hóa:\",\"view_protect_files_message\":\"Nhấp vào nút Xem. Bạn sẽ được yêu cầu nhập địa chỉ E-mail của bạn. Nếu bạn được xác thực để xem tệp, bạn sẽ nhận được mã PIN sử dụng một lần. Hãy nhập mã PIN đó để xem được tệp đó.\",\"download_use_protect_pdf\":\"Tải và sử dụng tệp PDF đã được mã hóa:\",\"download_use_protect_pdf_content\":\" Các tệp PDF được mã hóa chỉ có thể được tải về và xem bằng cách sử dụng Adobe Reader XI hoặc mới nhất trên Windows hoặc MacOS. Nhấp vào nút Tải Về và lưu tệp. Mở bằng Adobe Reader và nhập địa chỉ E-mail cùng mã PIN để xem.\",\"download_use_protect_microsoft\":\"Tải và sử dụng tệp Microsoft Office được mã hóa:\",\"download_use_protect_microsoft_content\":\"Để tải và sử dụng tệp Microsoft được mã hoá, bạn phải sử dụng Microsoft Office 2010, 2013, 2016 hoặc Office 365 trên Windows PC. Tải và mở tệp, và theo hướng dẫn để cài đặt 689Cloud Add-in. Khởi động lại ứng dụng và mở tệp. Bạn sẽ được yêu cầu nhập địa chỉ E-mail và mã PIN.\",\"link_expiry\":\"Liên kết sẽ hết hạn vào: {{expire_date}}\"},\"folder_size\":\"Kích Cỡ Thư Mục\",\"folder_settings\":\"Cài đặt thư mục\",\"create_report\":\"Tạo báo cáo\",\"revoke_recipient_title\":\"Hủy Bỏ Người Dùng\",\"revoke_recipient_msg\":\"Nếu người dùng này bị xóa, anh ấy/cô ấy không thể mở file này lần nữa. Bạn có chắc rằng mình muốn xóa người dùng này?\",\"number_of_times_viewed\":\"Số Lượt Xem\",\"number_of_times_download\":\"Số Lượt Tải Xuống\",\"all_member_in_project\":\"Tất cả thành viên trong dự án\",\"annotation_all\":\"[@Tất Cả]\",\"empty_document_size\":\"Tập tin không chứa dữ liệu\",\"max_length\":\"Độ dài tối đa là {{number}} kí tự\",\"created_by\":\"Được tạo bởi\",\"select_address_group\":\"Chọn Nhóm Danh Bạ\",\"group_collaborator_list\":\"Danh Sách Cộng Tác Viên\",\"role\":\"Quyền\",\"input_password_to_unlock\":\"Nhập mật khẩu để mở khóa\",\"auto_drm\":\"Áp dụng mã hóa tập tin\",\"translate\":\"Dịch\",\"translation_file\":\"Dịch Tệp\",\"translation_file_name\":\"Tệp <strong>{{name}}</strong> sẽ được dịch sang ngôn ngữ bạn chọn ở bên dưới\",\"translation_file_fail\":\"Tệp <strong>{{name}}</strong> đã được dịch thất bại. Hãy sử dụng tệp khác để dịch\",\"file_is_translating\":\"Tài liệu được chọn có chứa tài liệu đang được dịch. Vui lòng chờ quá trình mã hóa kết thúc hoặc loại bỏ tài liệu đang dịch khỏi danh sách đã chọn.\",\"file_translating_disabled\":\"Tài liệu đang được dịch. Vui lòng thử lại sau\",\"translation_lang\":{\"label\":\"Ngôn ngữ\",\"en\":\"Tiếng Anh\",\"ja\":\"Tiếng Nhật\",\"vi\":\"Tiếng Việt\",\"zh\":\"Tiếng Trung\"},\"translation_error\":{\"404\":\"Không thể tìm thấy thông tin tệp\",\"405\":\"Không thể tìm thấy tệp trong ổ đĩa\",\"406\":\"Kích thước tệp bị giới hạn, không thể vượt quá 20MB\",\"407\":\"Tệp PDF bị giới hạn, không thể vượt quá 20 trang\",\"408\":\"Tên tệp được dịch thất bại\",\"409\":\"Dịch vụ Google Translate không thể dịch tệp này\"},\"annually_billing_cycle\":\"Thanh toán hàng năm\",\"no_credit_card_required\":\"Không cần thẻ tín dụng để dùng thử miễn phí\",\"summary_sub_text\":\"{{ currency }}{{ price }} x {{ number_user }} người dùng\",\"sign_up\":\"Đăng Ký\",\"sign_up_title\":\"Đăng Ký Tài Khoản SecureDrive\",\"agree_term\":\"Đồng ý với <a href='https://689cloud.com/terms-and-conditions/' target='_blank'>Điều Khoản</a> và <a href='https://689cloud.com/privacy-policy/' target='_blank'>Chính Sách Bảo Mật</a>\",\"add_payment_card\":\"Thêm Thẻ Thanh Toán\",\"holder_name\":\"Tên Chủ Thẻ\",\"expired_on\":\"Hết hạn vào\",\"delete_card_title\":\"Xóa Thẻ Thanh Toán\",\"delete_card_mgs\":\"Bạn có chắc rằng muốn xóa thẻ này?\",\"trial_mgs\":\"<p class='p-m-0'>Tài khoản dùng thử của bạn sẽ hết hạn sau <strong>{{count}} ngày</strong></p>\"},\"validation\":{\"require\":\"Trường này là trường bắt buộc\",\"input_email\":\"Vui lòng nhập E-mail của bạn\",\"input_password\":\"Vui lòng nhập mật khẩu\",\"input_otp_code\":\"Vui lòng nhập mã xác thực\",\"special_chars\":\"Có kí tự đặc biệt không được cho phép\",\"date_format\":\"Sai định dạng ngày\",\"confirm_password\":\"Mật khẩu nhập lại không chính xác\",\"min_length\":\"Trường này yêu cầu ít nhất {{number}} ký tự\",\"pattern\":\"Vui lòng nhập đúng mẫu\",\"email_format\":\"Sai định dạng E-mail\",\"password_policies\":{\"full_secure\":\"Mật khẩu phải từ  6 - 64  kí tự, 1 kí tự viết hoa, 1 kí tự viết thường, 1 kí tự đặc biệt, and 1 chữ số\",\"length\":\"Mật khẩu phải từ {{min}} đến {{max}} kí tự\",\"capital\":\"Ít nhất {{number}} kí tự viết hoa\",\"lower\":\"Ít nhất {{number}} kí tự viết thường\",\"special\":\"Ít nhất {{number}} kí tự đặc biệt\",\"number\":\"Ít nhất {{number}} chữ số\"},\"invalid_color_format\":\"Định dạng màu sắc không hợp lệ\",\"invalid_email_format\":\"Định dạng E-mail không hợp lệ\",\"input_color\":\"Vui lòng chọn màu cho ảnh mờ\",\"remove_old_card_before_create_new\":\"Vui lòng xóa thẻ cũ trước khi thêm thẻ mới\"},\"default_toast\":{\"create_success\":\"Tạo thành công\",\"add_success\":\"Thêm thành công\",\"update_success\":\"Cập nhật thành công\",\"update_pass_success\":\"Đã cập nhật mật khẩu mới\",\"save_success\":\"Lưu thành công\",\"delete_success\":\"Xóa thành công\",\"revoke_success\":\"Hủy bỏ thành công\",\"drop_upload\":\"Kéo tập tin vào đây để tải lên\",\"exist_file_uploading\":\"Tập tin {{fileName}} đang được tải lên\",\"wait\":\"Vui lòng chờ...\",\"only_support_trial\":\"Hiện tại chỉ hỗ trợ tài khoản thử nghiệm\",\"move_success\":\"Di chuyển thành công\",\"invite_success\":\"Thêm thành công\",\"invite_success_error_users\":\"Thêm không thành công: \",\"share_success\":\"Chia sẻ thành công\",\"restore_success\":\"Phục hồi\",\"upload_success\":\"Tải lên thành công\",\"send_confirm_email\":\"Vui lòng xác nhận E-mail để thay đổi E-mail mới\",\"invalid_data\":\"Có một số dữ liệu không hợp lệ\",\"waiting_sync\":\"bạn phải chờ đợi một khoảng thời gian để quá trình cập nhật hoàn tất\",\"error_dot_folder\":\"Bạn không thể tạo thư mục chỉ chứa kí tự dấu chấm\",\"copy_success\":\"Sao chép thành công\",\"remove_success\":\"Gỡ bỏ thành công\",\"change_mail_success\":\"Thay đổi E-mail thành công\",\"activate_success\":\"Kích hoạt nhóm thành công\",\"deactivate_success\":\"Vô hiệu hóa nhóm thành công\",\"unlock_success\":\"Mở khóa thành công\",\"import_success\":\"Nhập thành công\",\"not_allow_upload_folders\":\"Bạn không thể tải lên nhiều thư mục\",\"load_data_failed\":\"Truy xuất dữ liệu lỗi\",\"request_change_email_success\":\"Vui lòng xác nhận E-mail của bạn để thay đổi E-mail\",\"project_is_copying\":\"Dự án đang được sao chép\",\"signup_success\":\"Đăng ký tài khoản thành công\",\"add_card_success\":\"Thêm Thẻ thành công\",\"delete_card_success\":\"Xóa Thẻ thành công\"},\"error\":{\"100\":\"Thông tin đăng nhập không hợp lệ\",\"101\":\"Tạo mã truy cập thất bại.\",\"102\":\"Thông tin đăng nhập không hợp lệ\",\"103\":\"Mã truy cập không hợp lệ hoặc hết hạn\",\"104\":\"Danh mục tài khoản chưa được kích hoạt.\",\"105\":\"Mật khẩu danh mục tài khoản hết hạn.\",\"106\":\"Danh mục tài khoản hết hạn.\",\"107\":\"Danh mục tài khoản - Thử lại mật khẩu vượt quá giới hạn quy định.\",\"108\":\"Danh mục tài khoản - Không sẵn sàng thực thi.\",\"109\":\"Danh mục tài khoản - Lỗi hệ thống từ nhà cung cấp bảo mật.\",\"110\":\"E-mail đã tồn tại\",\"112\":\"<p class='text-center'>Tài khoản của bạn đã bị khóa. <br/>Vui lòng liên hệ với quản trị viên để mở khóa</p>\",\"113\":\"Thành viên không bị khóa\",\"114\":\"Thành viên đã được mở khóa\",\"200\":\"Thành công.\",\"300\":\"Thông tin đăng nhập không hợp lệ\",\"301\":\"Mã PIN không hợp lệ hoặc hết hạn\",\"302\":\"Mật khẩu xác nhận không khớp với mật khẩu\",\"303\":\"Định dạng màu sắc không hợp lệ\",\"304\":\"Định dạng đường dẫn trang web không hợp lệ\",\"305\":\"Tiền thanh toán không hợp lệ\",\"306\":\"Yêu cầu phân trang không hợp lệ\",\"307\":\"Định dạng ngày tháng không hợp lệ\",\"308\":\"Loại phần tử của thư mục cập nhật không hợp lệ\",\"309\":\"Định dạng cài đặt dự án không hợp lệ\",\"310\":\"Tình trạng nhóm không hợp lệ\",\"311\":\"Phương thức thanh toán không hợp lệ\",\"312\":\"Chu kỳ thanh toán không hợp lệ\",\"313\":\"Thông tin đăng nhập không hợp lệ\",\"314\":\"Mật khẩu sai định dạng\",\"318\":\"Ngày hết hạn không hợp lệ\",\"400\":\"Máy chủ không hiểu yêu cầu vừa được gửi\",\"401\":\"Không được phép truy cập hoặc mã truy cập hết hạn\",\"403\":\"Truy cập bị từ chối với trang này\",\"404\":\"Không tìm thấy trang hoặc máy chủ bạn yêu cầu\",\"406\":\"Dữ liệu nhập vào không hợp lệ\",\"407\":\"Không tìm thấy tham số\",\"408\":\"Ứng dụng bị vô hiệu hóa. Vui lòng liên hệ với nhà cung cấp\",\"500\":\"Máy chủ tạm thời đang bị lỗi\",\"501\":\"Tên nhóm không được chứa các dấu: ,/\",\"600\":\"Không tìm thấy dự án\",\"601\":\"Tạo mới dự án thất bại\",\"602\":\"Dự án đang được sao chép\",\"700\":\"Không thể tìm thấy thư mục\",\"701\":\"Chứa kí tự đặc biệt không hỗ trợ\",\"702\":\"Truy cập bị từ chối với trang này\",\"800\":\"Không thể tìm thấy tập tin\",\"801\":\"Không thấy phiên bản của tập tin\",\"802\":\"Địa chỉ E-mail đã nhập không được phép xem tệp này\",\"803\":\"Tập tin đã tồn tại\",\"804\":\"Tập tin đã được bảo vệ\",\"805\":\"Giải mã tập tin thất bại\",\"806\":\"Tập tin quá lớn, không thể xem. Vui lòng tải về\",\"807\":\"Tập tin đang mã hóa\",\"900\":\"Không tìm thấy nhãn trạng thái\",\"901\":\"Nhãn trạng thái đã tồn tại\",\"1100\":\"Không tìm thấy liên kết được chia sẻ\",\"1101\":\"Không tìm thấy gói liên kết được chia sẻ\",\"1102\":\"Liên kết được chia sẻ hết hạn\",\"1103\":\"Không tìm thấy liên kết\",\"1106\":\"Vị trí hình mờ phải được chọn\",\"1107\":\"Kích thước hình mờ phải lớn hơn 0\",\"1109\":\"Số lần truyền tải file đã vượt quá tổng số truyền tải được cấp phép\",\"1111\":\"Mật khẩu liên kết sai\",\"1112\":\"Liên kết không chứa bất cứ tệp nào\",\"1113\":\"Tài liệu đã hết hạn và không còn tồn tại nữa\",\"1200\":\"Đạt đến số lượng tải xuống giới hạn tối đa\",\"1201\":\"Tải xuống tập tin thất bại\",\"1202\":\"Không tìm thấy hàng đợi tải xuống tệp nén\",\"1203\":\"Thư mục được chỉ định trống. Không thể tải xuống dưới dạng zip.\",\"1300\":\"Phần mở rộng của tập tin không được chấp nhận\",\"1301\":\"Tập tin tải lên bị lỗi\",\"1302\":\"Không tìm thấy dữ liệu tập tin tải lên\",\"1304\":\"Tập tin không thể tải lên\",\"1400\":\"Không tìm thấy người dùng\",\"1401\":\"Người dùng đã tồn tại\",\"1402\":\"không tìm thấy nhóm người dùng\",\"1403\":\"Nhóm người dùng đã tồn tại\",\"1404\":\"Tạo người dùng thất bại\",\"1405\":\"Không tìm thấy vai trò của người dùng\",\"1406\":\"Sai mật khẩu hiện tại\",\"1407\":\"Không tìm thấy người dùng trong thư mục\",\"1408\":\"Vui lòng yêu cầu người dùng nhượng quyền dự án trước khi xóa\",\"1409\":\"Người dùng không tồn tại trng nhóm\",\"1410\":\"Không thể thay đổi quyền. Người dùng này đang sao chép dự án. Vui lòng chờ quá trình này kết thúc\",\"1411\":\"Nhập thất bại. Tập Tin CSV không hợp lệ.\",\"1412\":\"Nhập thất bại. Tập Tin CSV trống.\",\"1413\":\"Nhập thất bại\",\"1414\":\"Tên nhóm có độ dài tối đa là 64 kí tự\",\"1415\":\"Mật khẩu không thể chứa khoảng trắng\",\"1416\":\"Mật khẩu mới phải khác mật khẩu hiện tại\",\"1500\":\"Không tìm thấy danh bạ\",\"1501\":\"Danh bạ đã tồn tại\",\"1502\":\"Không tìm thấy nhóm danh bạ\",\"1503\":\"Nhóm danh bạ đã tồn tại\",\"1600\":\"Không tìm thấy bình luận\",\"1700\":\"Không tìm thấy công ty\",\"1701\":\"Tên công ty đã tồn tại\",\"1800\":\"Không tìm thấy nhóm\",\"1801\":\"Tên nhóm đã tồn tại\",\"1802\":\"Không tìm thấy thanh toán nhóm\",\"1803\":\"Nhóm đạt số lượng thành viên giới hạn tối đa\",\"1804\":\"Không thể cập nhật thanh toán nhóm\",\"1805\":\"Tạo hóa đơn thanh toán nhóm thất bại\",\"1806\":\"Lưu trữ của nhóm đã đạt đến giới hạn\",\"1807\":\"Tạo nhóm mới thất bại\",\"1808\":\"Không tìm thấy giá của người dùng\",\"1809\":\"Không tìm thấy giá lưu trữ\",\"1810\":\"Không tìm thấy thông tin thẻ thanh toán nhóm\",\"1811\":\"Cài đặt thông báo nhóm không hợp lệ\",\"2300\":\"Địa chỉ E-mail đã nhập không được phép xem tệp này.\",\"2502\":\"Bạn không thể cập nhật gói đang được sử dụng\",\"2700\":\"Thẻ đã tồn tại\",\"2701\":\"Không tìm thấy loại thẻ\",\"2702\":\"Định dạng số thẻ không hợp lệ\",\"2703\":\"Thẻ của bạn đã hết hạn\",\"2704\":\"Vui lòng thêm thẻ tín dụng trước\",\"2705\":\"Không tìm thấy khách hàng Stripe\",\"2706\":\"Thẻ đã được kích hoạt\",\"2707\":\"Thẻ không hợp lệ. Vui lòng đổi thẻ khác để tiếp tục\",\"2708\":\"Không thể cập nhật thanh toán nhóm cho nhóm dùng thử\",\"2709\":\"Giá người dùng và giá lưu trữ phải cùng loại tiền\",\"2710\":\"Xóa thẻ thất bại\",\"2711\":\"Tính phí không thành công\",\"2712\":\"Kích hoạt không thành công\",\"2713\":\"Lỗi thanh toán xảy ra với Stripe\",\"2714\":\"CVC thẻ của bạn không chính xác\",\"invalid_expiry_date\":\"Ngày hết hạn không hợp lệ\",\"invalid_date\":\"Ngày bắt đầu hoặc kết thúc không hợp lệ.\",\"invalid_email\":\"Invalid E-mail\"},\"invite_error_users\":{\"1\":\"Quyền hạn của người dùng không đúng: {{email}}\",\"2\":\"Nhóm đã đạt số thành viên tối đa: {{email}}\",\"3\":\"Sai định dạng E-mail: {{email}}\",\"4\":\"Người dùng đã là thành viên: {{email}}\",\"5\":\"Người dùng không tồn tại: {{email}}\",\"6\":\"Bạn không có quyền mời người dùng không tồn tại trong nhóm: {{email}}\"},\"primeng\":{\"accept\":\"Có\",\"reject\":\"Không\",\"weak\":\"Yếu\",\"medium\":\"Trung bình\",\"strong\":\"Mạnh\",\"passwordPrompt\":\"Vui lòng nhập mật khẩu\"},\"stripe_error\":{\"INCOMPLETE_NUMBER\":\"Số thẻ của bạn không đầy đủ\",\"INCORRECT_NUMBER\":\"Số thẻ của bạn không chính xác\",\"INVALID_NUMBER\":\"Số thẻ của bạn không hợp lệ\",\"INVALID_EXPIRY_YEAR_PAST\":\"Năm hết hạn thẻ của bạn trong quá khứ\",\"INCOMPLETE_CVC\":\"CVC thẻ của bạn không đầy đủ\",\"INCOMPLETE_EXPIRY\":\"Ngày hết hạn thẻ của bạn không đầy đủ\",\"INVALID_EXPIRY_YEAR\":\"Năm hết hạn thẻ của bạn không hợp lệ\",\"INVALID_EXPIRY_MONTH_PAST\":\"Tháng hết hạn thẻ của bạn trong quá khứ\",\"CARD_DECLINED\":\"Đăng ký thẻ không thành công. Vui lòng liên hệ với nhà cung cấp thẻ của bạn.\",\"UPGRADE_ACCOUNT_FAIL\":\"Thanh toán thất bại. Vui lòng liên hệ với nhà cung cấp thẻ của bạn.\",\"ACTIVATE_CARD_FAIL\":\"Kích hoạt thẻ thất bại. Vui lòng liên hệ với nhà cung cấp thẻ của bạn.\",\"DELETE_CARD_FAIL\":\"Xóa thẻ thất bại. Vui lòng liên hệ với nhà cung cấp thẻ của bạn.\"}}");

/***/ }),

/***/ "./src/environments/environment.ts":
/*!*****************************************!*\
  !*** ./src/environments/environment.ts ***!
  \*****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// This file can be replaced during build by using the `fileReplacements` array.
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.
Object.defineProperty(exports, "__esModule", { value: true });
exports.environment = void 0;
exports.environment = {
    production: false,
    backend_url: 'https://dev-api.689cloud.com',
    // backend_url: 'http://192.168.1.149:8080', // for local development
    // backend_url: 'http://localhost:8080',
    // backend_url: 'https://backend-api.689cloud.com',
    frontend_url: 'https://dev.689cloud.com/#/',
    // admin_console_url: 'https://dev-admin.689cloud.com/689cloud-team/#/login',
    admin_console_url: 'https://dev-admin.689cloud.com/#/login',
    home_site: 'https://689cloud.com',
    pusher: {
        app_key: 'M2ZiOTNhZDIxNDM0OTc4NWJmOGQ=',
        options: {
            cluster: 'ap1',
        },
    },
    app_amazons3_bucket: '689cloud-image',
    suffix_amazon_s3: '.s3.ap-southeast-1.amazonaws.com',
    // upload path
    logo_path: '/team-logo/',
    default_storage_price: 1,
    default_user_price: 1,
    default_company_id: 2,
    // PUBLIC_KEY_STRIPE: "pk_live_dFTd311fc0JRrPCetLQoaJIl00Z82SD1Xz", // pk
    PUBLIC_KEY_STRIPE: 'pk_test_51H5NsOAgRbmgIcNo8Sba0yEi6txE6oFUlOE2i7TQx4mHEI2vPSXf5NTHQVxKvqtualiWj9C8yd3tX5rCUFl0L73e00kxaG22YW',
    RECAPTCHA_KEY: '6Lf9LH0pAAAAALM2W4pGstMhfx5Jv16SF6cQjDJe',
};
/*
 * For easier debugging in development mode, you can import the following file
 * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
 *
 * This import should be commented out in production mode because it will have a negative impact
 * on performance if an error is thrown.
 */
// import 'zone.js/dist/zone-error';  // Included with Angular CLI.


/***/ }),

/***/ "./src/interceptor/app.initializer.ts":
/*!********************************************!*\
  !*** ./src/interceptor/app.initializer.ts ***!
  \********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.appInitializer = void 0;
function appInitializer(authService) {
    return () => new Promise((resolve) => {
        // @ts-ignore
        resolve();
        // if (!authService.isLoggedIn) {
        //   resolve();
        // } else {
        //   // attempt to refresh token on app start up to auto authenticate
        //   authService.refreshToken().subscribe().add(resolve);
        // }
    });
}
exports.appInitializer = appInitializer;


/***/ }),

/***/ "./src/interceptor/auth.guard.ts":
/*!***************************************!*\
  !*** ./src/interceptor/auth.guard.ts ***!
  \***************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthGuard = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const rxjs_1 = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm2015/index.js");
const operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm2015/operators/index.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! ../app/services/auth.service */ "./src/app/services/auth.service.ts"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
class AuthGuard {
    constructor(router, authService, translate, primengConfig) {
        this.router = router;
        this.authService = authService;
        this.translate = translate;
        this.primengConfig = primengConfig;
    }
    canActivate(route, state) {
        const url = state.url;
        if (!this.authService.token) {
            // Store the attempted URL for redirecting
            this.authService.redirectUrl = url;
            this.router.navigate(['sign-in']).then(r => {
            });
            return rxjs_1.of(false);
        }
        // not logged in so redirect to login page with the return url
        return this.authService.getAuthInfo().pipe(operators_1.map(res => {
            if (res && res.status === 200) {
                const authUser = res.data;
                // set language
                const languageChange = authUser.lang === 'auto' ? 'en' : authUser.lang;
                this.translate.setDefaultLang(languageChange);
                this.translate.use(languageChange);
                this.translate.get('primeng').subscribe(data => {
                    this.primengConfig.setTranslation(data);
                });
                this.authService.setAuthUser(authUser);
                return true;
            }
            else {
                this.authService.clearSession();
                this.router.navigate(['/sign-in']).then(r => {
                });
                return false;
            }
        }, error => {
            this.authService.clearSession();
            this.router.navigate(['/sign-in']).then(r => {
            });
            return false;
        }));
    }
}
exports.AuthGuard = AuthGuard;
AuthGuard.ɵfac = function AuthGuard_Factory(t) { return new (t || AuthGuard)(i0.ɵɵinject(i1.Router), i0.ɵɵinject(i2.AuthService), i0.ɵɵinject(i3.TranslateService), i0.ɵɵinject(i4.PrimeNGConfig)); };
AuthGuard.ɵprov = i0.ɵɵdefineInjectable({ token: AuthGuard, factory: AuthGuard.ɵfac, providedIn: 'root' });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AuthGuard, [{
        type: core_1.Injectable,
        args: [{ providedIn: 'root' }]
    }], function () { return [{ type: i1.Router }, { type: i2.AuthService }, { type: i3.TranslateService }, { type: i4.PrimeNGConfig }]; }, null); })();


/***/ }),

/***/ "./src/interceptor/custom.http.param.encoder.ts":
/*!******************************************************!*\
  !*** ./src/interceptor/custom.http.param.encoder.ts ***!
  \******************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.CustomHttpParamEncoder = void 0;
class CustomHttpParamEncoder {
    encodeKey(key) {
        return encodeURIComponent(key);
    }
    encodeValue(value) {
        return encodeURIComponent(value);
    }
    decodeKey(key) {
        return decodeURIComponent(key);
    }
    decodeValue(value) {
        return decodeURIComponent(value);
    }
}
exports.CustomHttpParamEncoder = CustomHttpParamEncoder;


/***/ }),

/***/ "./src/interceptor/error.interceptor.ts":
/*!**********************************************!*\
  !*** ./src/interceptor/error.interceptor.ts ***!
  \**********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ErrorInterceptor = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const rxjs_1 = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm2015/index.js");
const operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm2015/operators/index.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! ../app/services/auth.service */ "./src/app/services/auth.service.ts"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
class ErrorInterceptor {
    constructor(messageService, translate, authService, router) {
        this.messageService = messageService;
        this.translate = translate;
        this.authService = authService;
        this.router = router;
    }
    intercept(request, next) {
        return next.handle(request).pipe(operators_1.catchError((err) => {
            let errorMessage = '';
            this.translate.get(`error.${err.status}`).subscribe(s => { errorMessage = s; });
            // Not show error message when token expired
            if (err.status !== 401) {
                this.messageService.add({
                    severity: 'error',
                    detail: errorMessage || err.error.message
                });
            }
            if ([401, 403].includes(err.status)) {
                // auto logout if 401 or 403 response returned from api
                this.authService.clearSession();
            }
            else if (500 === err.status) {
                this.router.navigate(['/error-500']).then(result => { });
            }
            const error = (err && err.error && err.error.message) || err.statusText;
            return rxjs_1.throwError(error);
        }));
    }
}
exports.ErrorInterceptor = ErrorInterceptor;
ErrorInterceptor.ɵfac = function ErrorInterceptor_Factory(t) { return new (t || ErrorInterceptor)(i0.ɵɵinject(i1.MessageService), i0.ɵɵinject(i2.TranslateService), i0.ɵɵinject(i3.AuthService), i0.ɵɵinject(i4.Router)); };
ErrorInterceptor.ɵprov = i0.ɵɵdefineInjectable({ token: ErrorInterceptor, factory: ErrorInterceptor.ɵfac });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ErrorInterceptor, [{
        type: core_1.Injectable
    }], function () { return [{ type: i1.MessageService }, { type: i2.TranslateService }, { type: i3.AuthService }, { type: i4.Router }]; }, null); })();


/***/ }),

/***/ "./src/interceptor/jwt.interceptor.ts":
/*!********************************************!*\
  !*** ./src/interceptor/jwt.interceptor.ts ***!
  \********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.JwtInterceptor = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm2015/operators/index.js");
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ../utilities/app-constants */ "./src/utilities/app-constants.ts"));
const app_util_1 = tslib_1.__importDefault(__webpack_require__(/*! ../utilities/app-util */ "./src/utilities/app-util.ts"));
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! ../app/services/auth.service */ "./src/app/services/auth.service.ts"));
const i2 = tslib_1.__importStar(__webpack_require__(/*! primeng/api */ "./node_modules/primeng/__ivy_ngcc__/fesm2015/primeng-api.js"));
const i3 = tslib_1.__importStar(__webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/__ivy_ngcc__/fesm2015/ngx-translate-core.js"));
const i4 = tslib_1.__importStar(__webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/__ivy_ngcc__/fesm2015/router.js"));
const i5 = tslib_1.__importStar(__webpack_require__(/*! ../app/shared/spinner-overlay/spinner-overlay.service */ "./src/app/shared/spinner-overlay/spinner-overlay.service.ts"));
class JwtInterceptor {
    constructor(authService, messageService, translate, router, spinnerOverlayService) {
        this.authService = authService;
        this.messageService = messageService;
        this.translate = translate;
        this.router = router;
        this.spinnerOverlayService = spinnerOverlayService;
    }
    intercept(request, next) {
        request = request.clone({
            url: `${app_constants_1.default.DEFAULT_URLS.API}${request.url}`,
            setHeaders: {
                'auth-token': `${this.authService.token}`
            }
        });
        this.spinnerOverlayService.show();
        return next.handle(request).pipe(operators_1.map(event => {
            var _a;
            // @ts-ignore
            if (event && event.body) {
                // @ts-ignore
                event.body = app_util_1.default.toCamelCaseKey(event.body);
                // @ts-ignore
                if (((_a = event.body) === null || _a === void 0 ? void 0 : _a.status) && event.body.status !== 200 && event.body.status !== 403 && event.body.status !== 318
                // move file to folder has DRM setting & invalid expiry date
                ) {
                    // @ts-ignore
                    // @ts-ignore
                    if (event.body.status === 401) {
                        // Token had been expired
                        this.authService.clearSession();
                        this.router.navigate(['/login']);
                    }
                    else {
                        let errorMessage = '';
                        // @ts-ignore
                        this.translate.get(`error.${event.body.status}`).subscribe(s => {
                            errorMessage = s;
                        });
                        this.messageService.add({
                            severity: 'error',
                            // @ts-ignore
                            detail: errorMessage || event.body.message,
                        });
                    }
                }
            }
            return event;
        }));
    }
}
exports.JwtInterceptor = JwtInterceptor;
JwtInterceptor.ɵfac = function JwtInterceptor_Factory(t) { return new (t || JwtInterceptor)(i0.ɵɵinject(i1.AuthService), i0.ɵɵinject(i2.MessageService), i0.ɵɵinject(i3.TranslateService), i0.ɵɵinject(i4.Router), i0.ɵɵinject(i5.SpinnerOverlayService)); };
JwtInterceptor.ɵprov = i0.ɵɵdefineInjectable({ token: JwtInterceptor, factory: JwtInterceptor.ɵfac });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(JwtInterceptor, [{
        type: core_1.Injectable
    }], function () { return [{ type: i1.AuthService }, { type: i2.MessageService }, { type: i3.TranslateService }, { type: i4.Router }, { type: i5.SpinnerOverlayService }]; }, null); })();


/***/ }),

/***/ "./src/interceptor/spinner.interceptor.ts":
/*!************************************************!*\
  !*** ./src/interceptor/spinner.interceptor.ts ***!
  \************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.SpinnerInterceptor = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const operators_1 = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm2015/operators/index.js");
const i0 = tslib_1.__importStar(__webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js"));
const i1 = tslib_1.__importStar(__webpack_require__(/*! ../app/shared/spinner-overlay/spinner-overlay.service */ "./src/app/shared/spinner-overlay/spinner-overlay.service.ts"));
class SpinnerInterceptor {
    constructor(spinnerOverlayService) {
        this.spinnerOverlayService = spinnerOverlayService;
    }
    intercept(req, next) {
        const spinnerSubscription = this.spinnerOverlayService.spinner$.subscribe();
        return next.handle(req).pipe(operators_1.finalize(() => spinnerSubscription.unsubscribe()));
    }
}
exports.SpinnerInterceptor = SpinnerInterceptor;
SpinnerInterceptor.ɵfac = function SpinnerInterceptor_Factory(t) { return new (t || SpinnerInterceptor)(i0.ɵɵinject(i1.SpinnerOverlayService)); };
SpinnerInterceptor.ɵprov = i0.ɵɵdefineInjectable({ token: SpinnerInterceptor, factory: SpinnerInterceptor.ɵfac });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SpinnerInterceptor, [{
        type: core_1.Injectable
    }], function () { return [{ type: i1.SpinnerOverlayService }]; }, null); })();


/***/ }),

/***/ "./src/main.ts":
/*!*********************!*\
  !*** ./src/main.ts ***!
  \*********************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const core_1 = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/__ivy_ngcc__/fesm2015/core.js");
const environment_1 = __webpack_require__(/*! ./environments/environment */ "./src/environments/environment.ts");
const __NgCli_bootstrap_1 = tslib_1.__importStar(__webpack_require__(/*! ./app/app.module */ "./src/app/app.module.ts"));
const __NgCli_bootstrap_2 = tslib_1.__importStar(__webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/__ivy_ngcc__/fesm2015/platform-browser.js"));
if (environment_1.environment.production) {
    core_1.enableProdMode();
}
__NgCli_bootstrap_2.platformBrowser().bootstrapModule(__NgCli_bootstrap_1.AppModule)
    .catch(err => console.error(err));


/***/ }),

/***/ "./src/models/addressbook-group.model.ts":
/*!***********************************************!*\
  !*** ./src/models/addressbook-group.model.ts ***!
  \***********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.AddressBookGroup = void 0;
class AddressBookGroup {
}
exports.AddressBookGroup = AddressBookGroup;


/***/ }),

/***/ "./src/models/addressbook.model.ts":
/*!*****************************************!*\
  !*** ./src/models/addressbook.model.ts ***!
  \*****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.AddressBook = void 0;
class AddressBook {
}
exports.AddressBook = AddressBook;


/***/ }),

/***/ "./src/models/drm.model.ts":
/*!*********************************!*\
  !*** ./src/models/drm.model.ts ***!
  \*********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.DrmSetting = void 0;
class DrmSetting {
    constructor() {
        this.expiryDate = timeDefault;
        this.unlimited = 1;
        this.expiryTime = timeDefault;
    }
}
exports.DrmSetting = DrmSetting;
// default time
const timeDefault = new Date();
timeDefault.setHours(23);
timeDefault.setMinutes(59);
timeDefault.setSeconds(59);


/***/ }),

/***/ "./src/models/file.model.ts":
/*!**********************************!*\
  !*** ./src/models/file.model.ts ***!
  \**********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.FileVersion = exports.URLViewFile = exports.FileOwner = exports.FileProject = exports.FileInfo = void 0;
class FileInfo {
}
exports.FileInfo = FileInfo;
class FileProject {
}
exports.FileProject = FileProject;
class FileOwner {
}
exports.FileOwner = FileOwner;
class URLViewFile {
}
exports.URLViewFile = URLViewFile;
class FileVersion {
}
exports.FileVersion = FileVersion;


/***/ }),

/***/ "./src/models/label-data.model.ts":
/*!****************************************!*\
  !*** ./src/models/label-data.model.ts ***!
  \****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.LabelFile = exports.LabelDetail = exports.LabelData = void 0;
class LabelData {
}
exports.LabelData = LabelData;
class LabelDetail {
}
exports.LabelDetail = LabelDetail;
class LabelFile {
}
exports.LabelFile = LabelFile;


/***/ }),

/***/ "./src/models/linkInfo.model.ts":
/*!**************************************!*\
  !*** ./src/models/linkInfo.model.ts ***!
  \**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.LinkInfo = void 0;
class LinkInfo {
}
exports.LinkInfo = LinkInfo;


/***/ }),

/***/ "./src/models/project-notify.model.ts":
/*!********************************************!*\
  !*** ./src/models/project-notify.model.ts ***!
  \********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ProjectNotifySetting = void 0;
class ProjectNotifySetting {
    constructor() {
        this.isNotify = false;
        this.notifyAll = 'true';
    }
}
exports.ProjectNotifySetting = ProjectNotifySetting;


/***/ }),

/***/ "./src/models/project.model.ts":
/*!*************************************!*\
  !*** ./src/models/project.model.ts ***!
  \*************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.CreateProject = exports.ProjectInfo = exports.ProjectSettings = exports.Project = void 0;
class Project {
}
exports.Project = Project;
class ProjectSettings {
    constructor() {
        this.isEdit = true;
    }
}
exports.ProjectSettings = ProjectSettings;
class ProjectInfo {
}
exports.ProjectInfo = ProjectInfo;
class CreateProject {
}
exports.CreateProject = CreateProject;


/***/ }),

/***/ "./src/models/watermark.model.ts":
/*!***************************************!*\
  !*** ./src/models/watermark.model.ts ***!
  \***************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.WatermarkSettings = void 0;
class WatermarkSettings {
    constructor() {
        this.showWm = false;
        this.wmSetting = 'default';
        this.wmContent = '';
        this.position = 'diagonal';
        this.fontSize = 50;
        this.color = { r: 192, g: 192, b: 192 };
        this.colorText = 'RGB(192,192,192)';
    }
}
exports.WatermarkSettings = WatermarkSettings;


/***/ }),

/***/ "./src/utilities/aes.util.ts":
/*!***********************************!*\
  !*** ./src/utilities/aes.util.ts ***!
  \***********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const crypto_js_1 = tslib_1.__importDefault(__webpack_require__(/*! crypto-js */ "./node_modules/crypto-js/index.js"));
const AESUtil = {
    key: "f9c48f382012cac69ffcc78da220123f",
    encrypt: function (text) {
        var _key = this.key;
        var aesUtil = new AesUtil(256, 1000);
        return aesUtil.encrypt(_key, _key, _key, text);
    },
    decrypt: function (text) {
        var _key = this.key;
        var aesUtil = new AesUtil(256, 1000);
        return aesUtil.decrypt(_key, _key, _key, text);
    },
    hashMD5(text) {
        return crypto_js_1.default.MD5(text).toString();
    }
};
let AesUtil = function (keySize, iterationCount) {
    this.keySize = keySize / 32;
    this.iterationCount = iterationCount;
};
AesUtil.prototype.generateKey = function (salt, passPhrase) {
    let key = crypto_js_1.default.PBKDF2(passPhrase, crypto_js_1.default.enc.Hex.parse(salt), { keySize: this.keySize, iterations: this.iterationCount });
    return key;
};
AesUtil.prototype.encrypt = function (salt, iv, passPhrase, plainText) {
    let key = this.generateKey(salt, passPhrase);
    let encrypted = crypto_js_1.default.AES.encrypt(plainText, key, { iv: crypto_js_1.default.enc.Hex.parse(iv) });
    return encrypted.ciphertext.toString(crypto_js_1.default.enc.Base64);
};
AesUtil.prototype.decrypt = function (salt, iv, passPhrase, cipherText) {
    let key = this.generateKey(salt, passPhrase);
    let cipherParams = crypto_js_1.default.lib.CipherParams.create({
        ciphertext: crypto_js_1.default.enc.Base64.parse(cipherText)
    });
    let decrypted = crypto_js_1.default.AES.decrypt(cipherParams, key, { iv: crypto_js_1.default.enc.Hex.parse(iv) });
    return decrypted.toString(crypto_js_1.default.enc.Utf8);
};
exports.default = AESUtil;


/***/ }),

/***/ "./src/utilities/app-constants.ts":
/*!****************************************!*\
  !*** ./src/utilities/app-constants.ts ***!
  \****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.TranslateStatus = exports.ConsoleType = exports.HistoryType = exports.FileType = exports.ProjectFolderRole = exports.ProjectRole = exports.SystemRole = void 0;
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const crypto_js_1 = tslib_1.__importDefault(__webpack_require__(/*! crypto-js */ "./node_modules/crypto-js/index.js"));
const environment_1 = __webpack_require__(/*! ../environments/environment */ "./src/environments/environment.ts");
const AppConstant = Object.freeze({
    DEFAULT_URLS: {
        API: `${environment_1.environment.backend_url}/api`,
    },
    SERVICE_KEY: '1',
    SERVICE_NAME: 'SecureDrive',
    DEFAULT_PAGE_SIZE: 5,
    PATTERNS: {
        EMAIL: /^(([^<>()?\[\]\.,;:\s@\"]+(\.[^<>()?\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()?[\]\.,;:\s@\"]+\.)+[^<>()?[\]\.,;:\s@\"]{2,})$/,
        USERNAME: /^[a-zA-Z0-9_@.]*$/,
        NO_SP_CHAR: '[^<>{}]*',
        PHONE: /^[0-9-]*$/,
        POSITIVE_NUMBER: /^[+]?([.]\d+|\d+[.]?\d*)$/,
        ALLOWED_INPUT: /^[0-9a-zA-Z._%+-@]*$/,
        SCRIPT_PATTERN: /^((?!<|>|{|\})[\s\S])*?$/,
        COLOR_PATTERN: /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,
        COLOR_RGB_PATTERN: /^RGB\(\s*(?:(\d{1,3})\s*,?){3}\)$/,
        SPECIAL_CHARS_NOT_ALLOW_RENAME: /^((?!\\|\/|:|\*|\?|"|<|>|\||\{|})[\s\S])*?$/,
        REGEX_SPECIAL_FOLDER_NAME: /[*/<>?\\/:"{}]/g,
    },
    FORMAT_DATE: {
        MOMENT_LONG_DATE: 'MM/DD/YYYY HH:mm:ss',
        MOMENT_SHORT_DATE: 'MM/DD/YYYY',
        DATE_PIPE_LONG_DATE: 'MM/dd/YYYY HH:mm:ss',
        DATE_PIPE_SHORT_DATE: 'MM/dd/YYYY',
        TIME_FORMAT: 'HH:mm:ss',
        LINK_FORMAT_DATE: 'YYYY-MM-DD HH:mm:ss',
        DRM_FORMAT_DATE: 'YYYY/MM/DD HH:mm:ss',
    },
    ENCRYPT: {
        IV: crypto_js_1.default.enc.Base64.parse(''),
        KEY: crypto_js_1.default.SHA256('VLEPPO'),
    },
    STORAGE_KEYS: {
        SESSION: 'stk',
        LANGUAGE: 'lang',
    },
    // BOX
    BOX: {
        /* Box's clientID: Using for production */
        CLIENT_ID: 'low2iq0okfuywwcc9io0rft0z8ekhdnd',
    },
    PACKAGE_NAME: {
        STARTER: 'STARTER',
        TEAM: 'TEAM',
        BUSINESS: 'BUSINESS',
    },
    BILLING_CYCLE: {
        MONTHLY: 'MONTHLY',
        ANNUALLY: 'ANNUALLY',
    },
    CURRENCY: {
        USD: 'USD',
        YEN: 'YEN',
    },
    CURRENCY_UNIT: {
        USD: '$',
        YEN: '¥',
        VND: '₫',
    },
    // BEEP MESSAGE
    BEEP_MESS: 'data:audio/wav;base64, ',
    MESS_SOUND: 'data:audio/ogg;base64, ',
    DATA_VIEW: {
        ROW_PER_PAGE_OPTIONS: [5, 10, 20, 50, 100],
        DEFAULT_ROW_PER_PAGE: 10,
    },
    SORT_PAGE: {
        DISPLAY_VIEW: 'displayView',
        PROJECT_LIST: 'projectList',
        PROJECT_DETAIL: 'projectDetail',
        LABEL_LIST: 'labelList',
        LINK_LIST: 'linkList',
        LINK_DETAIL: 'linkDetail',
        SHARED_ADDRESS_LIST: 'sharedAddressList',
        ADDRESS_BOOK_LIST: 'addressBookList',
        ADDRESS_BOOK_GROUP_LIST: 'addressBookGroupList',
        ADDRESS_BOOK_MEMBER_GROUP_LIST: 'addressBookMemberGroupList',
        INTERNAL_NONE_PROTECT_ONLINE_TRACKING: 'internalNoneProtectOnlineTracking',
        INTERNAL_PROTECT_ONLINE_TRACKING: 'internalProtectOnlineTracking',
        INTERNAL_PROTECT_OFFLINE_TRACKING: 'internalProtectOfflineTracking',
        EXTERNAL_PROTECT_OFFLINE_TRACKING: 'externalProtectOfflineTracking',
    },
    MINE_TYPES: {
        secure: {
            types: [
                'application/pdf',
                'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
                'application/vnd.openxmlformats-officedocument.presentationml.presentation',
                'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
            ],
        },
        video: {
            types: [
                'video/mpeg',
                'video/mpeg',
                'video/mpeg',
                'video/quicktime',
                'video/quicktime',
                'video/mp4',
                'video/x-m4v',
                'video/x-flv',
                'video/x-ms-wmv',
                'video/avi',
                'video/webm',
                'video/vnd.rn-realvideo',
            ],
        },
        audio: {
            types: [
                'audio/mpeg',
                'audio/mpeg',
                'audio/mpeg',
                'audio/mpeg',
                'audio/x-wav',
                'audio/mp4',
            ],
        },
        image: {
            types: [
                'image/bmp',
                'image/gif',
                'image/jpeg',
                'image/photoshop',
                'image/png',
                'image/svg+xml',
                'image/svg+xml',
                'image/tiff',
                'image/tiff',
            ],
        },
        compress: {
            types: [
                'application/zip',
                'application/rar',
                'application/x-zip-compressed',
                'application/x-gunzip',
                'application/x-gzip',
                'application/x-7z-compressed',
            ],
        },
        text: {
            types: [
                'text/rtf',
                'text/plain',
                'text/html',
                'text/xml',
                'text/css',
                'text/csv',
            ],
        },
        folder: {
            types: ['application/folder'],
        },
        project: {
            types: ['application/project'],
        },
        office: {
            types: [
                'application/msword',
                'application/vnd.ms-excel',
                'application/vnd.ms-powerpoint',
            ],
        },
    },
    MINE_DETAILS: {
        PDF: {
            type: 'application/pdf',
            ext: 'pdf',
            icon: '<i class="far fa-file-pdf"></i>',
        },
        WORD: {
            type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
            ext: 'docx',
            icon: '<i class="far fa-file-word"></i>',
        },
        PPTX: {
            type: 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
            ext: 'pptx',
            icon: '<i class="far fa-file-powerpoint"></i>',
        },
        EXCEL: {
            type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
            ext: 'xlsx',
            icon: '<i class="far fa-file-excel"></i>',
        },
        FOLDER: {
            type: 'application/folder',
            ext: 'folder',
            icon: '<i class="fas fa-folder"></i>',
        },
    },
    sampleColors: [
        {
            text: 'Green-cyan',
            color: '#009966',
            color_rgb: 'rgb(0,153,102)',
        },
        {
            text: 'Green screen',
            color: '#00b140',
            color_rgb: 'rgb(0, 177, 64)',
        },
        {
            text: 'Dark green',
            color: '#013220',
            color_rgb: 'rgb(1, 50, 32)',
        },
        {
            text: 'Blue gray',
            color: '#6699cc',
            color_rgb: 'rgb(102, 153, 204)',
        },
        {
            text: 'Blue',
            color: '#0000ff',
            color_rgb: 'rgb(0, 0, 255)',
        },
        {
            text: 'Dark violet',
            color: '#9400d3',
            color_rgb: 'rgb(148, 0, 211)',
        },
        {
            text: 'Deep violet',
            color: '#330066',
            color_rgb: 'rgb(51, 0, 102)',
        },
        {
            text: 'Gray',
            color: '#808080',
            color_rgb: 'rgb(128, 128, 128)',
        },
        {
            text: 'Charcoal Grey',
            color: '#36454f',
            color_rgb: 'rgb(54, 69, 79)',
        },
        {
            text: 'Rose red',
            color: '#c21e56',
            color_rgb: 'rgb(194, 30, 86)',
        },
        {
            text: 'Magenta-pink',
            color: '#cc338b',
            color_rgb: 'rgb(204, 51, 139)',
        },
        {
            text: 'Red',
            color: '#ff0000',
            color_rgb: 'rgb(255, 0, 0)',
        },
        {
            text: 'Dark coral',
            color: '#cd5b45',
            color_rgb: 'rgb(205, 91, 69)',
        },
        {
            text: 'Titanium yellow',
            color: '#eee600',
            color_rgb: 'rgb(238, 230, 0)',
        },
        {
            text: 'Carrot Orange',
            color: '#ed9121',
            color_rgb: 'rgb(237, 145, 33)',
        },
        {
            text: 'Aztec Gold',
            color: '#c39953',
            color_rgb: 'rgb(195, 153, 83)',
        },
    ],
    MAX_DATE_ONLY: '9999/12/30',
    MAX_DATE: '9999/12/30 23:59:59',
    VIEWER_SUPPORT_TYPE: {
        SUPPORT_TYPES_DOC: [
            'doc',
            'docx',
            'ppt',
            'pptx',
            'xls',
            'xlsx',
            'xlsm',
            'pdf',
        ],
        SUPPORT_TYPES_IMG: ['jpg', 'png', 'gif'],
        SUPPORT_TYPES_PLAN_TEXT: ['txt'],
        SUPPORT_AUDIO: ['mp3'],
        SUPPORT_VIDEO: ['mp4'],
    },
    VIEWER_URL: {
        GOOGLE_DRIVE: 'https://docs.google.com/gview?url=',
        ONE_DRIVE: 'https://view.officeapps.live.com/op/embed.aspx?src=',
        OLD_VIEWER: 'https://www.hogodoc.com/viewer/old-viewer.html?url=',
        PDF_JS: 'js/pdfjs/web/viewer.html?file=',
        // parentURL for porthole js
        HOGO: 'https://689cloud.com/viewer/',
        CLOUD: 'https://viewer.689cloud.com/?id=2a16ecb9cb9347198e465a141907a857?ak=78ea3e80c1684973b22058f64f82f90d',
        VIEWER_CLOUD_ORIGIN: 'https://viewer.689cloud.com',
        VIEWER_ORIGIN: 'https://689cloud.com',
    },
    PROJECT: {
        // LICENSE (100  - 199)
        USER_REVOKED: { code: 100, desc: 'Revoked recipient license' },
        // FILE (200 - 299)
        FILE_ADDED: { code: 200, desc: 'Uploaded file' },
        FILE_UPDATE: { code: 201, desc: 'User renamed file' },
        FILE_DELETE: { code: 202, desc: 'User deleted forever file' },
        FILE_ENCODED: { code: 203, desc: 'User set DRM file' },
        FILE_RESTORED: { code: 204, desc: 'User restored file' },
        FILE_MOVE: { code: 205, desc: 'User moved file' },
        FILE_REMOVE: { code: 206, desc: 'User removed file' },
        LICENSE_UPDATED: { code: 207, desc: 'User updated DRM file setting' },
        DELETE_LICENSE: { code: 208, desc: 'User disabled DRM file setting' },
        ATTACH_LABEL: { code: 209, desc: 'Attach label file' },
        DETACH_LABEL: { code: 210, desc: 'Detach label file' },
        COPY_FILE: { code: 211, desc: 'User Copied File' },
        // PROJECT (300 - 399)
        PROJECT_ADDED: { code: 300, desc: 'Added new project' },
        PROJECT_UPDATED: { code: 301, desc: 'Updated project' },
        PROJECT_DELETED: { code: 302, desc: 'Deleted project' },
        PROJECT_COPY: { code: 303, desc: 'Copied project' },
        TRANSFER_PROJECT: { code: 304, desc: 'Transferred a project' },
        // FOLDER (500 - 599)
        FOLDER_CREATED: { code: 500, desc: 'Created folder' },
        FOLDER_UPDATED: { code: 501, desc: 'User renamed folder' },
        FOLDER_DELETED: { code: 502, desc: 'User deleted forever folder' },
        FOLDER_REMOVE: { code: 503, desc: 'User removed folder' },
        FOLDER_MOVED: { code: 504, desc: 'User moved folder' },
        FOLDER_RESTORE: { code: 505, desc: 'User restored folder' },
        FOLDER_UPDATED_SETTING: { code: 506, desc: 'User updated folder setting' },
        FOLDER_COPY: { code: 507, desc: 'Copied folder' },
        // COLLABORATOR (700 - 799)
        USER_REMOVE: { code: 700, desc: 'Removed individual collaborator' },
        USER_CHANGE_ROLE: {
            code: 701,
            desc: 'Changed role for individual collaborator',
        },
        USER_INVITED: { code: 702, desc: 'Added individual collaborator' },
        GROUP_INVITED: { code: 703, desc: 'Added group collaborator' },
        GROUP_CHANGE_ROLE: {
            code: 704,
            desc: 'Changed role for group collaborator',
        },
        GROUP_REMOVE: { code: 705, desc: 'Removed group collaborator' },
        // LABEL (900 - 999)
        CREATE_LABEL: { code: 900, desc: 'User created label' },
        UPDATE_LABEL: { code: 901, desc: 'User updated label' },
        DELETE_LABEL: { code: 902, desc: 'User deleted label' },
        // LINK (1100 - 1199)
        LINK_CREATED: { code: 1100, desc: 'User created link' },
        LINK_DELETED: { code: 1101, desc: 'User deleted link' },
        LINK_UPDATE: { code: 1102, desc: 'User updated link' },
        LINK_SHARED: { code: 1103, desc: 'User shared link' },
        // COMMENT (1200 - 1299)
        USER_CREATE_COMMENT: { code: 1200, desc: 'Added comment in project' },
        USER_UPDATE_COMMENT: { code: 1201, desc: 'Updated comment in project' },
        USER_DELETE_COMMENT: { code: 1202, desc: 'Removed comment in project' },
        USER_CREATE_COMMENT_FILE: {
            code: 1203,
            desc: 'User added comment in file',
        },
        USER_UPDATE_COMMENT_FILE: {
            code: 1204,
            desc: 'User updated comment in file',
        },
        USER_DELETE_COMMENT_FILE: {
            code: 1205,
            desc: 'User removed comment in file',
        },
    },
    DOWNLOAD_TYPE: {
        NORMAL: 1,
        ZIP: 3,
    },
    STORED_TAB: {
        ADDRESS_BOOK_TAB: 'addressBookTab',
        ADDRESS_BOOK_GROUP_TAB: 'addressBookGroupTab',
    },
    EMAIL_TYPE: {
        USER: 'user',
        ADDRESS_BOOK: 'addressBook',
        GUEST: 'guest',
    },
    NOTIFICATION_CODE: {
        ADD_COMMENT: { code: 100, description: 'ADD_COMMENT' },
        EDIT_COMMENT: { code: 101, description: 'EDIT_COMMENT' },
        DELETE_COMMENT: { code: 102, description: 'DELETE_COMMENT' },
        ADD_PROJECT: { code: 200, description: 'ADD_PROJECT' },
        EDIT_PROJECT: { code: 201, description: 'EDIT_PROJECT' },
        DELETE_PROJECT: { code: 202, description: 'DELETE_PROJECT' },
        COPY_PROJECT: { code: 203, description: 'COPY_PROJECT' },
        MOVE_FOLDER: { code: 300, description: 'MOVE_FOLDER' },
        ADD_FOLDER: { code: 301, description: 'ADD_FOLDER' },
        DELETE_FOLDER: { code: 302, description: 'DELETE_FOLDER' },
        COPY_FOLDER: { code: 306, description: 'COPY_FOLDER' },
        MOVE_FILE: { code: 400, description: 'MOVE_FILE' },
        ADD_FILE: { code: 401, description: 'ADD_FILE' },
        ADD_FILE_CLOUD: { code: 402, description: 'ADD_FILE_CLOUD' },
        DELETE_FILE: { code: 403, description: 'DELETE_FILE' },
        FILE_NAME_UPDATED: { code: 405, description: 'FILE_NAME_UPDATED' },
        COPY_FILE: { code: 407, description: 'COPY_FILE' },
        ADD_MEMBER: { code: 500, description: 'ADD_MEMBER' },
        ADD_MEMBER_FROM_CSV: { code: 501, description: 'ADD_MEMBER_FROM_CSV' },
        UPDATE_MEMBER: { code: 502, description: 'UPDATE_MEMBER' },
        DELETE_MEMBER: { code: 503, description: 'DELETE_MEMBER' },
        RENAME_FILE_FOLDER: { code: 600, description: 'RENAME_OBJECT' },
        INVITE_USER: { code: 700, description: 'INVITE_USER_TO_PROJECT' },
    },
    CARD_TYPE: {
        UNKNOWN: { id: 0, value: 'Unknown' },
        VISA: { id: 1, value: 'Visa' },
        MASTERCARD: { id: 2, value: 'MasterCard' },
        AMERICAN_EXPRESS: { id: 3, value: 'American Express' },
        DINERS_CLUB: { id: 4, value: 'Diners Club' },
        DISCOVER: { id: 5, value: 'Discover' },
        JCB: { id: 6, value: 'JCB' },
        UNIONPAY: { id: 7, value: 'UnionPay' },
    },
});
exports.default = AppConstant;
var SystemRole;
(function (SystemRole) {
    SystemRole[SystemRole["TeamAdmin"] = 1] = "TeamAdmin";
    SystemRole[SystemRole["Manager"] = 2] = "Manager";
    SystemRole[SystemRole["Member"] = 3] = "Member";
    SystemRole[SystemRole["Guest"] = 4] = "Guest";
})(SystemRole = exports.SystemRole || (exports.SystemRole = {}));
var ProjectRole;
(function (ProjectRole) {
    ProjectRole[ProjectRole["Owner"] = 1] = "Owner";
    ProjectRole[ProjectRole["Editor"] = 2] = "Editor";
    ProjectRole[ProjectRole["Viewer"] = 3] = "Viewer";
    ProjectRole[ProjectRole["Previewer"] = 4] = "Previewer";
    ProjectRole[ProjectRole["ViewerUploader"] = 5] = "ViewerUploader";
    ProjectRole[ProjectRole["PreviewerUploader"] = 6] = "PreviewerUploader";
    ProjectRole[ProjectRole["Uploader"] = 7] = "Uploader";
})(ProjectRole = exports.ProjectRole || (exports.ProjectRole = {}));
var ProjectFolderRole;
(function (ProjectFolderRole) {
    ProjectFolderRole[ProjectFolderRole["Owner"] = 0] = "Owner";
    ProjectFolderRole[ProjectFolderRole["Editor"] = 1] = "Editor";
})(ProjectFolderRole = exports.ProjectFolderRole || (exports.ProjectFolderRole = {}));
var FileType;
(function (FileType) {
    FileType[FileType["PDF"] = 1] = "PDF";
    FileType[FileType["DOCX"] = 2] = "DOCX";
    FileType[FileType["XLSX"] = 3] = "XLSX";
    FileType[FileType["PPTX"] = 4] = "PPTX";
    FileType[FileType["DEFAULT"] = 5] = "DEFAULT";
})(FileType = exports.FileType || (exports.FileType = {}));
var HistoryType;
(function (HistoryType) {
    HistoryType[HistoryType["REVOKE_USER"] = 100] = "REVOKE_USER";
    HistoryType[HistoryType["ADD_FILE"] = 200] = "ADD_FILE";
    HistoryType[HistoryType["UPDATE_FILE"] = 201] = "UPDATE_FILE";
    HistoryType[HistoryType["DELETE_FILE_FOREVER"] = 202] = "DELETE_FILE_FOREVER";
    HistoryType[HistoryType["ENCODE_FILE"] = 203] = "ENCODE_FILE";
    HistoryType[HistoryType["RESTORE_FILE"] = 204] = "RESTORE_FILE";
    HistoryType[HistoryType["MOVE_FILE"] = 205] = "MOVE_FILE";
    HistoryType[HistoryType["DELETE_FILE"] = 206] = "DELETE_FILE";
    HistoryType[HistoryType["UPDATE_ENCODE_FILE"] = 207] = "UPDATE_ENCODE_FILE";
    HistoryType[HistoryType["DELETE_LICENSE"] = 208] = "DELETE_LICENSE";
    HistoryType[HistoryType["ATTACH_LABEL"] = 209] = "ATTACH_LABEL";
    HistoryType[HistoryType["DETACH_LABEL"] = 210] = "DETACH_LABEL";
    HistoryType[HistoryType["COPY_FILE"] = 211] = "COPY_FILE";
    HistoryType[HistoryType["ADD_PROJECT"] = 300] = "ADD_PROJECT";
    HistoryType[HistoryType["UPDATE_PROJECT"] = 301] = "UPDATE_PROJECT";
    HistoryType[HistoryType["DELETE_PROJECT"] = 302] = "DELETE_PROJECT";
    HistoryType[HistoryType["COPY_PROJECT"] = 303] = "COPY_PROJECT";
    HistoryType[HistoryType["TRANSFERRED_PROJECT"] = 304] = "TRANSFERRED_PROJECT";
    HistoryType[HistoryType["ADD_USER"] = 400] = "ADD_USER";
    HistoryType[HistoryType["UPDATE_USER"] = 401] = "UPDATE_USER";
    HistoryType[HistoryType["DELETE_USER"] = 402] = "DELETE_USER";
    HistoryType[HistoryType["LOG_IN"] = 403] = "LOG_IN";
    HistoryType[HistoryType["LOG_OUT"] = 404] = "LOG_OUT";
    HistoryType[HistoryType["TEAM_ADMIN_LOGIN_MEMBER"] = 405] = "TEAM_ADMIN_LOGIN_MEMBER";
    HistoryType[HistoryType["TRANSFERRED_A_ACCOUNT"] = 406] = "TRANSFERRED_A_ACCOUNT";
    HistoryType[HistoryType["ADD_FOLDER"] = 500] = "ADD_FOLDER";
    HistoryType[HistoryType["UPDATE_FOLDER"] = 501] = "UPDATE_FOLDER";
    HistoryType[HistoryType["DELETE_FOREVER_FOLDER"] = 502] = "DELETE_FOREVER_FOLDER";
    HistoryType[HistoryType["DELETE_FOLDER"] = 503] = "DELETE_FOLDER";
    HistoryType[HistoryType["MOVE_FOLDER"] = 504] = "MOVE_FOLDER";
    HistoryType[HistoryType["RESTORE_FOLDER"] = 505] = "RESTORE_FOLDER";
    HistoryType[HistoryType["UPDATE_FOLDER_SETTING"] = 506] = "UPDATE_FOLDER_SETTING";
    HistoryType[HistoryType["COPY_FOLDER"] = 507] = "COPY_FOLDER";
    HistoryType[HistoryType["ADD_ADDRESS"] = 600] = "ADD_ADDRESS";
    HistoryType[HistoryType["UPDATE_ADDRESS"] = 601] = "UPDATE_ADDRESS";
    HistoryType[HistoryType["DELETE_ADDRESS"] = 602] = "DELETE_ADDRESS";
    HistoryType[HistoryType["REMOVE_USER"] = 700] = "REMOVE_USER";
    HistoryType[HistoryType["UPDATE_ROLE_USER"] = 701] = "UPDATE_ROLE_USER";
    HistoryType[HistoryType["INVITE_USER"] = 702] = "INVITE_USER";
    HistoryType[HistoryType["INVITE_GROUP"] = 703] = "INVITE_GROUP";
    HistoryType[HistoryType["UPDATE_ROLE_GROUP"] = 704] = "UPDATE_ROLE_GROUP";
    HistoryType[HistoryType["REMOVE_GROUP"] = 705] = "REMOVE_GROUP";
    HistoryType[HistoryType["CREATE_GROUP"] = 800] = "CREATE_GROUP";
    HistoryType[HistoryType["UPDATE_GROUP"] = 801] = "UPDATE_GROUP";
    HistoryType[HistoryType["DELETE_GROUP"] = 802] = "DELETE_GROUP";
    HistoryType[HistoryType["ADD_MEMBER_GROUP"] = 803] = "ADD_MEMBER_GROUP";
    HistoryType[HistoryType["REMOVE_MEMBER_GROUP"] = 804] = "REMOVE_MEMBER_GROUP";
    HistoryType[HistoryType["MOVE_MEMBER_GROUP"] = 805] = "MOVE_MEMBER_GROUP";
    HistoryType[HistoryType["CREATE_LABEL"] = 900] = "CREATE_LABEL";
    HistoryType[HistoryType["UPDATE_LABEL"] = 901] = "UPDATE_LABEL";
    HistoryType[HistoryType["DELETE_LABEL"] = 902] = "DELETE_LABEL";
    HistoryType[HistoryType["CREATE_ADDRESS_GROUP"] = 1000] = "CREATE_ADDRESS_GROUP";
    HistoryType[HistoryType["UPDATE_ADDRESS_GROUP"] = 1001] = "UPDATE_ADDRESS_GROUP";
    HistoryType[HistoryType["DELETE_ADDRESS_GROUP"] = 1002] = "DELETE_ADDRESS_GROUP";
    HistoryType[HistoryType["ADD_ADDRESS_GROUP"] = 1003] = "ADD_ADDRESS_GROUP";
    HistoryType[HistoryType["REMOVE_ADDRESS_GROUP"] = 1004] = "REMOVE_ADDRESS_GROUP";
    HistoryType[HistoryType["MOVE_ADDRESS_GROUP"] = 1005] = "MOVE_ADDRESS_GROUP";
    HistoryType[HistoryType["CREATE_LINK"] = 1100] = "CREATE_LINK";
    HistoryType[HistoryType["DELETE_LINK"] = 1101] = "DELETE_LINK";
    HistoryType[HistoryType["UPDATE_LINK"] = 1102] = "UPDATE_LINK";
    HistoryType[HistoryType["SHARE_LINK"] = 1103] = "SHARE_LINK";
    HistoryType[HistoryType["SHARE_LINK_SECURE_MAIL"] = 1104] = "SHARE_LINK_SECURE_MAIL";
    HistoryType[HistoryType["ADD_COMMENT"] = 1200] = "ADD_COMMENT";
    HistoryType[HistoryType["UPDATE_COMMENT"] = 1201] = "UPDATE_COMMENT";
    HistoryType[HistoryType["DELETE_COMMENT"] = 1202] = "DELETE_COMMENT";
    HistoryType[HistoryType["ADD_COMMENT_FILE"] = 1203] = "ADD_COMMENT_FILE";
    HistoryType[HistoryType["UPDATE_COMMENT_FILE"] = 1204] = "UPDATE_COMMENT_FILE";
    HistoryType[HistoryType["DELETE_COMMENT_FILE"] = 1205] = "DELETE_COMMENT_FILE";
})(HistoryType = exports.HistoryType || (exports.HistoryType = {}));
var ConsoleType;
(function (ConsoleType) {
    ConsoleType[ConsoleType["SecureDrive"] = 1] = "SecureDrive";
    ConsoleType[ConsoleType["SecureMail"] = 2] = "SecureMail";
    ConsoleType[ConsoleType["TeamAdmin"] = 3] = "TeamAdmin";
    ConsoleType[ConsoleType["Reseller"] = 4] = "Reseller";
})(ConsoleType = exports.ConsoleType || (exports.ConsoleType = {}));
var TranslateStatus;
(function (TranslateStatus) {
    TranslateStatus["PENDING"] = "PENDING";
    TranslateStatus["TRANSLATING"] = "TRANSLATING";
    TranslateStatus["SUCCESS"] = "SUCCESS";
    TranslateStatus["FAIL"] = "FAIL";
})(TranslateStatus = exports.TranslateStatus || (exports.TranslateStatus = {}));


/***/ }),

/***/ "./src/utilities/app-util.ts":
/*!***********************************!*\
  !*** ./src/utilities/app-util.ts ***!
  \***********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
const _ = tslib_1.__importStar(__webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js"));
const environment_1 = __webpack_require__(/*! ../environments/environment */ "./src/environments/environment.ts");
const app_constants_1 = tslib_1.__importDefault(__webpack_require__(/*! ./app-constants */ "./src/utilities/app-constants.ts"));
const AppUtil = {
    generatePackageFeaturesConfig(packageName = 'STARTER', numberOfUsers = 1, billingCycle = 'MONTHLY') {
        var packageFeaturesConfig = {
            commonFeatures: [
                { key: 'features.supported_protected_files' },
                { key: 'features.shared_space', paramKey: 'storageSpace' },
                {
                    key: billingCycle === 'ANNUALLY'
                        ? 'features.secure_shares_per_year'
                        : 'features.secure_shares_per_month',
                    paramKey: 'secureShares',
                },
                { key: 'features.copy_protection' },
                { key: 'features.tracking_documents' },
                { key: 'features.revoke_access_remotely' },
                { key: 'features.secure_online_viewer' },
                { key: 'features.watermark_view_online' },
                { key: 'features.two_factor_auth' },
                { key: 'features.printing_control' },
                { key: 'features.expiry_setting' },
            ],
            STARTER: {
                storageSpacePerUser: 5,
                secureSharesPerUser: 100,
            },
            TEAM: {
                storageSpacePerUser: 5,
                secureSharesPerUser: 100,
            },
            BUSINESS: {
                storageSpacePerUser: 5,
                secureSharesPerUser: 150,
            },
        };
        // Clone the package features config to avoid mutating the original object
        let packageValues = Object.assign({}, (packageFeaturesConfig[packageName] || {}));
        packageValues.storageSpace =
            packageValues.storageSpacePerUser * numberOfUsers + 'GB';
        if (billingCycle === 'ANNUALLY') {
            packageValues.secureShares =
                packageValues.secureSharesPerUser * numberOfUsers * 12;
        }
        else {
            packageValues.secureShares =
                packageValues.secureSharesPerUser * numberOfUsers;
        }
        // Return a list of features based on the selected package
        const features = [...packageFeaturesConfig.commonFeatures];
        // Replace parameters with actual values
        var featuresWithParams = features.map((feature) => {
            if (feature.paramKey && packageValues[feature.paramKey]) {
                return {
                    key: feature.key,
                    params: { value: packageValues[feature.paramKey] },
                };
            }
            return { key: feature.key };
        });
        return {
            features: featuresWithParams,
            totalFeatures: featuresWithParams.length,
            package: packageName,
            values: packageValues,
        };
    },
    capitalizeFirstLetter(str) {
        if (!str)
            return '';
        return (str.toLowerCase().charAt(0).toUpperCase() + str.toLowerCase().slice(1));
    },
    toCamelCaseKey(obj) {
        if (Array.isArray(obj)) {
            return obj.map((v) => AppUtil.toCamelCaseKey(v));
        }
        else if (obj && obj.constructor === Object) {
            return Object.keys(obj).reduce((result, key) => (Object.assign(Object.assign({}, result), { [_.camelCase(key)]: AppUtil.toCamelCaseKey(obj[key]) })), {});
        }
        return obj;
    },
    toSnakeCaseKey(obj) {
        if (Array.isArray(obj)) {
            return obj.map((v) => AppUtil.toSnakeCaseKey(v));
        }
        else if (obj && obj.constructor === Object) {
            return Object.keys(obj).reduce((result, key) => (Object.assign(Object.assign({}, result), { [_.snakeCase(key)]: AppUtil.toSnakeCaseKey(obj[key]) })), {});
        }
        return obj;
    },
    translate(service, key) {
        if (!service || !key) {
            return '';
        }
        let translated = '';
        service.get(key).subscribe((s) => {
            translated = s;
        });
        return translated;
    },
    translateWithParams(service, key, params) {
        if (!service || !key) {
            return '';
        }
        let translateTxt = '';
        service.get(key, params).subscribe((res) => {
            translateTxt = res;
        });
        return translateTxt;
    },
    translateList(service, keys, object) {
        return service.get(keys, object);
    },
    // Format date based on the difference between 2 days
    formatDateBasedOnDiff(datepipe, dateChange) {
        const currentDate = new Date();
        const dateSent = new Date(dateChange);
        const cal = Math.floor((Date.UTC(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDate()) -
            Date.UTC(dateSent.getFullYear(), dateSent.getMonth(), dateSent.getDate())) /
            (1000 * 60 * 60 * 24));
        if (cal === 0) {
            return datepipe.transform(dateChange, app_constants_1.default.FORMAT_DATE.TIME_FORMAT);
        }
        else {
            return datepipe.transform(dateChange, app_constants_1.default.FORMAT_DATE.DATE_PIPE_LONG_DATE);
        }
    },
    getFullName(lang, item) {
        return lang === 'ja'
            ? item.lastName + ' ' + item.firstName
            : item.firstName + ' ' + item.lastName;
    },
    // Compare 2 date
    calc2Date(date1, date2) {
        return (date2.getTime() - date1.getTime()) / (1000 * 3600 * 24);
    },
    addDays(date, days) {
        const copy = new Date(Number(date));
        copy.setDate(date.getDate() + days);
        return copy;
    },
    subtractDays(date, days) {
        const copy = new Date(Number(date));
        copy.setDate(date.getDate() - days);
        return copy;
    },
    parseQueryString(str) {
        const ret = Object.create(null);
        if (typeof str !== 'string') {
            return ret;
        }
        str = str.trim().replace(/^(\?|#|&)/, '');
        if (!str) {
            return ret;
        }
        str.split('&').forEach((param) => {
            const parts = param.replace(/\+/g, ' ').split('=');
            // Firefox (pre 40) decodes `%3D` to `=`
            // https://github.com/sindresorhus/query-string/pull/37
            let key = parts.shift();
            let val = parts.length > 0 ? parts.join('=') : undefined;
            key = decodeURIComponent(key);
            // missing `=` should be `null`:
            // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters
            val = val === undefined ? null : decodeURIComponent(val);
            const retVal = ret[key];
            if (ret[key] === undefined) {
                ret[key] = val;
            }
            else if (Array.isArray(retVal)) {
                retVal.push(val);
            }
            else {
                ret[key] = [ret[key], val];
            }
        });
        return ret;
    },
    getAccessTokenFromUrl() {
        return this.parseQueryString(window.location.hash)['access_token'];
    },
    // Default is using calendar format
    // Convert from calendar date to bookend date
    formatBookendDate(date, timezone, format, moment) {
        const d = moment(date, format || app_constants_1.default.FORMAT_DATE.MOMENT_SHORT_DATE);
        if (timezone) {
            d.subtract(timezone, 'hours');
        }
        return d.format(format || app_constants_1.default.FORMAT_DATE.MOMENT_LONG_DATE);
    },
    isValidEmail(email) {
        const emailPattern = app_constants_1.default.PATTERNS.EMAIL;
        return emailPattern.test(email);
    },
    getGroupFromMimeType(file) {
        if (file === undefined) {
            return null;
        }
        let group = null;
        switch (file.fileType) {
            case 1:
            case 2:
            case 3:
            case 4:
                group = 'secure';
                break;
            default:
                if (file.contentType === undefined || file.contentType === null) {
                    return null;
                }
                // Not in secure file
                // tslint:disable-next-line:only-arrow-functions
                _.forIn(app_constants_1.default.MINE_TYPES, function (value, key) {
                    if (group === null) {
                        const list = value.types || value;
                        for (const i in list) {
                            if (file.contentType === list[i]) {
                                group = key;
                                break;
                            }
                        }
                    }
                });
                break;
        }
        return group;
    },
    getGroupFromMimeTypeByFileType(fileType, contentType) {
        let group = null;
        switch (Number(fileType)) {
            case 1:
                group = 'pdf';
                break;
            case 2:
                group = 'word';
                break;
            case 3:
                group = 'excel';
                break;
            case 4:
                group = 'presentation';
                break;
            default:
                // Not in secure file
                // tslint:disable-next-line:only-arrow-functions
                _.forIn(app_constants_1.default.MINE_TYPES, function (value, key) {
                    if (group === null) {
                        const list = value.types || value;
                        for (const i in list) {
                            if (contentType === list[i]) {
                                group = key;
                                break;
                            }
                        }
                    }
                });
                break;
        }
        return group;
    },
    getIconFromMimeType(mimeType) {
        let src;
        // Lookup in group
        _.forIn(app_constants_1.default.MINE_TYPES, (value, key) => {
            const list = value.types;
            if (src === undefined) {
                for (const i in list) {
                    if (list[i] === mimeType) {
                        src = value.icon;
                        break;
                    }
                }
            }
        });
        const details = [];
        _.forIn(app_constants_1.default.MINE_DETAILS, (v) => {
            details.push(v);
        });
        // Then lookup in detail
        for (var i in details) {
            let obj = details[i];
            if (obj.type === mimeType) {
                src = obj.icon;
                break;
            }
        }
        return src || '<i class="far fa-file"></i>';
    },
    convertFileSize(bytes) {
        const thresh = 1024;
        if (bytes < thresh) {
            return bytes + ' B';
        }
        const units = ['KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
        let u = -1;
        do {
            bytes /= thresh;
            ++u;
        } while (bytes >= thresh);
        return bytes.toFixed(1) + ' ' + units[u];
    },
    convertHexToRgb(hex) {
        const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
        return result
            ? {
                r: parseInt(result[1], 16),
                g: parseInt(result[2], 16),
                b: parseInt(result[3], 16),
            }
            : null;
    },
    checkColorDark(color) {
        const colorCovert = this.convertHexToRgb(color);
        if (colorCovert !== null) {
            const darkness = 1 -
                (0.2126 * colorCovert.r +
                    0.7152 * colorCovert.g +
                    0.0722 * colorCovert.b) /
                    255;
            return darkness >= 0.5; // true is a dark color
        }
        else {
            return null;
        }
    },
    handleLabelColor(color) {
        return { 'background-color': color };
    },
    blockSpecialChars(event) {
        const k = event.charCode;
        // 44,   47/   60<   62>   123{   125}
        return (k !== 44 && k !== 47 && k !== 60 && k !== 62 && k !== 123 && k !== 125);
    },
    blockSpecial4Chars(event) {
        const k = event.charCode;
        // 60<   62>   123{   125}
        return k !== 60 && k !== 62 && k !== 123 && k !== 125;
    },
    blockSpaceChars(event) {
        const k = event.charCode;
        return k !== 32;
    },
    getExtension(path) {
        const basename = /[^/\\&\?]+\.\w{3,4}(?=([\?#&].*$|$))/g.exec(path);
        const fileName = basename && basename[0];
        return fileName && fileName.split('.').pop();
    },
    getWatermarkPositionObj(translateService) {
        return [
            {
                code: 'diagonal',
                name: this.translate(translateService, 'label.watermark_position.diagonal'),
            },
            {
                code: 'center',
                name: this.translate(translateService, 'label.watermark_position.center'),
            },
            {
                code: 'top-left',
                name: this.translate(translateService, 'label.watermark_position.top-left'),
            },
            {
                code: 'top-center',
                name: this.translate(translateService, 'label.watermark_position.top-center'),
            },
            {
                code: 'top-right',
                name: this.translate(translateService, 'label.watermark_position.top-right'),
            },
            {
                code: 'bottom-left',
                name: this.translate(translateService, 'label.watermark_position.bottom-left'),
            },
            {
                code: 'bottom-center',
                name: this.translate(translateService, 'label.watermark_position.bottom-center'),
            },
            {
                code: 'bottom-right',
                name: this.translate(translateService, 'label.watermark_position.bottom-right'),
            },
        ];
    },
    getBrowserLang() {
        return navigator.language || window.navigator.language;
    },
    goToHomePage(path, lang) {
        if (lang !== 'vi' && lang !== 'ja') {
            window.open(`${environment_1.environment.home_site}/${path}`, '_blank');
        }
        else {
            window.open(`${environment_1.environment.home_site}/${lang}/${path}`, '_blank');
        }
    },
};
exports.default = AppUtil;


/***/ }),

/***/ "./src/utilities/app-validator.ts":
/*!****************************************!*\
  !*** ./src/utilities/app-validator.ts ***!
  \****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.checkFrm = exports.noWhitespaceValidator = exports.cleanValidator = exports.conditionalValidator = exports.requiredIfValidator = exports.ConfirmedValidator = void 0;
const forms_1 = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/__ivy_ngcc__/fesm2015/forms.js");
function ConfirmedValidator(controlName, matchingControlName) {
    return (formGroup) => {
        const control = formGroup.controls[controlName];
        const matchingControl = formGroup.controls[matchingControlName];
        if (matchingControl.errors && !matchingControl.errors.confirmedValidator) {
            return;
        }
        if (control.value !== matchingControl.value) {
            matchingControl.setErrors({ confirmedValidator: true });
        }
        else {
            matchingControl.setErrors(null);
        }
    };
}
exports.ConfirmedValidator = ConfirmedValidator;
function requiredIfValidator(predicate) {
    return (formControl => {
        if (!formControl.parent) {
            return null;
        }
        if (predicate()) {
            return forms_1.Validators.required(formControl);
        }
        return null;
    });
}
exports.requiredIfValidator = requiredIfValidator;
function conditionalValidator(predicate, validator) {
    return (formControl => {
        if (!formControl.parent) {
            return null;
        }
        if (predicate()) {
            return validator(formControl);
        }
        return null;
    });
}
exports.conditionalValidator = conditionalValidator;
function cleanValidator(predicate) {
    return (formControl => {
        if (!formControl.parent) {
            return null;
        }
        if (predicate()) {
            return formControl.clearValidators();
        }
        return null;
    });
}
exports.cleanValidator = cleanValidator;
function noWhitespaceValidator(control) {
    const isSpace = (control.value || '').trim().length === 0;
    return isSpace ? { whitespace: true } : null;
}
exports.noWhitespaceValidator = noWhitespaceValidator;
function checkFrm(check, frm) {
    Object.keys(frm.controls).forEach(key => {
        const controlErrors = frm.get(key).errors;
        if (controlErrors != null) {
            Object.keys(controlErrors).forEach(keyError => {
                if (keyError) {
                    check = true;
                }
            });
        }
    });
    return check;
}
exports.checkFrm = checkFrm;


/***/ }),

/***/ "./src/utilities/confirmed.validator.ts":
/*!**********************************************!*\
  !*** ./src/utilities/confirmed.validator.ts ***!
  \**********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

"use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.ConfirmedValidator = void 0;
function ConfirmedValidator(controlName, matchingControlName) {
    return (formGroup) => {
        const control = formGroup.controls[controlName];
        const matchingControl = formGroup.controls[matchingControlName];
        if (matchingControl.errors && !matchingControl.errors.confirmedValidator) {
            return;
        }
        if (control.value !== matchingControl.value) {
            matchingControl.setErrors({ confirmedValidator: true });
        }
        else {
            matchingControl.setErrors(null);
        }
    };
}
exports.ConfirmedValidator = ConfirmedValidator;


/***/ }),

/***/ 0:
/*!***************************!*\
  !*** multi ./src/main.ts ***!
  \***************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__(/*! /Users/buithanhloc/Documents/workspace/689Cloud/SecureDrive/secure-drive-web-app-v2/src/main.ts */"./src/main.ts");


/***/ }),

/***/ 1:
/*!************************!*\
  !*** crypto (ignored) ***!
  \************************/
/*! no static exports found */
/***/ (function(module, exports) {

/* (ignored) */

/***/ })

},[[0,"runtime","vendor"]]]);
//# sourceMappingURL=main.js.map