(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["app-pages-portal-usuarios-receita-colaborador-usuarios-receita-colaborador-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/portal/usuarios-receita-colaborador/usuarios-receita-colaborador-form/usuarios-receita-colaborador-form.component.html":
/*!************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/portal/usuarios-receita-colaborador/usuarios-receita-colaborador-form/usuarios-receita-colaborador-form.component.html ***!
  \************************************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<app-menu-command-bar [botoesComando]=\"constantes.listaForm\" [formAction]=\"actionForm\" [itemData]=\"data.codUsuario\"\n    [sisFormularioId]=\"constantes.sisFormularioId\">\n</app-menu-command-bar>\n\n<div class=\"section-comand-bar\">\n    <app-form-legenda></app-form-legenda>\n    <div class=\"card-body widget-body\">\n        <form class=\"form\" #f=\"ngForm\" (ngSubmit)=\"onSubmit(f)\">\n            <app-validacoes></app-validacoes>\n            <div class=\"row mb-2\">\n                <div class=\"col-lg-2 col-md-6 col-sm-12\">\n                    <label class=\"mb-0\">{{ 'labels.perfil' | translate }}</label>\n                    <div class=\"d-flex mt-1\">\n                        <div class=\"custom-control custom-checkbox mr-3\">\n                            <input id=\"colaborador\" name=\"colaborador\" [ngModel]=\"data.tipoUsuario === 3\"\n                                (ngModelChange)=\"data.tipoUsuario=$event?3:2\"\n                                [disabled]=\"funcoesService.isDetail(actionForm)\"\n                                class=\"custom-control-input checkbox-success\" type=\"checkbox\">\n                            <label class=\"custom-control-label\" for=\"colaborador\">\n                                {{ 'labels.colaborador' | translate }}\n                            </label>\n                        </div>\n                        <div class=\"custom-control custom-checkbox\">\n                            <input id=\"receita\" name=\"receita\" [ngModel]=\"data.tipoUsuario === 2\"\n                                (ngModelChange)=\"data.tipoUsuario=$event?2:3;\n                                                $event ? data.tipoDoc = '' : null;\n                                                $event ? data.numeroDoc = '' : null\"\n                                [disabled]=\"funcoesService.isDetail(actionForm)\"\n                                class=\"custom-control-input checkbox-success\" type=\"checkbox\" \n                                (change)=\"data.flagEstrangeiro = 'N'\">\n                            <label class=\"custom-control-label\" for=\"receita\">\n                                {{ 'labels.receita' | translate }}\n                            </label>\n                        </div>\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-lg-3 col-md-6 col-sm-12\">\n                    <div class=\"form-group form-group-sm\">\n                        <label for=\"email\" [class.required]=\"true\">{{ 'labels.email' | translate }}</label>\n                        <input id=\"email\" name=\"email\" [(ngModel)]=\"data.email\" class=\"form-control form-control-sm\"\n                            type=\"email\" [disabled]=\"funcoesService.isDetail(actionForm)\"\n                            data-title=\"{{ 'labels.email' | translate }}\" required (blur)=\"verificarEmailExistente()\">\n                    </div>\n                </div>\n                <div class=\"col-lg-2 col-md-6 col-sm-12 mt-4\">\n                    <div class=\"custom-control custom-checkbox\">\n                        <input id=\"estrangeiro\" name=\"estrangeiro\" [ngModel]=\"data.flagEstrangeiro === 'S'\"\n                            (ngModelChange)=\"data.flagEstrangeiro = $event ? 'S' : 'N';\n                              $event ? data.cpf = '' : null;\n                             !$event ? data.tipoDoc = '' : null;\n                             !$event ? data.numeroDoc = '' : null\"\n                            [disabled]=\"funcoesService.isDetail(actionForm) || habilitaCampos === false || data.tipoUsuario == 2\"\n                            class=\"custom-control-input checkbox-success\" type=\"checkbox\">\n                        <label class=\"custom-control-label\" for=\"estrangeiro\">{{ 'labels.flagEstrangeiro' | translate\n                            }}</label>\n                    </div>\n                </div>\n                <div class=\"col-lg-2 col-md-6 col-sm-12 mt-4\">\n                    <div class=\"custom-control custom-checkbox\">\n                        <input id=\"flagAtivo\" name=\"flagAtivo\" [ngModel]=\"data.flagAtivo === 'S'\"\n                            (ngModelChange)=\"data.flagAtivo=$event?'S':'N'\"\n                            class=\"custom-control-input checkbox-success\" type=\"checkbox\"\n                            [disabled]=\"funcoesService.isDetail(actionForm)\">\n                        <label class=\"custom-control-label\" for=\"flagAtivo\">{{ 'labels.ativo' | translate }}</label>\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-lg-6 col-md-6 col-sm-12\">\n                    <div class=\"form-group form-group-sm\">\n                        <label for=\"cpf\" [class.required]=\"data.flagEstrangeiro === 'N'\">{{\n                            'labels.cpf' |\n                            translate}}</label>\n                        <div class=\"input-group\">\n                            <input #cpf id=\"cpf\" name=\"cpf\" class=\"form-control form-control-sm\" type=\"text\"\n                                maxlength=\"14\" mask=\"000.000.000-00\" [(ngModel)]=\"data.cpf\"\n                                [disabled]=\"funcoesService.isDetail(actionForm) || data.flagEstrangeiro == 'S' || habilitaCampos === false\"\n                                (blur)=\"validaCpf()\" [required]=\"data.flagEstrangeiro === 'N'\" />\n                            <span class=\"ml-2\" style=\"color:#F34235;\">\n                                <b>({{ 'messages.informeSomenteNumeros' | translate }})</b>\n                            </span>\n                        </div>\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-lg-3 col-md-6 col-sm-12\">\n                    <div class=\"form-group form-group-sm\">\n                        <label for=\"tipoDeDocumentoId\" [class.required]=\"data.flagEstrangeiro == 'S'\">{{\n                            'labels.tipoDocumento' | translate }}</label>\n                        <app-combo-padrao name=\"tipoDeDocumentoId\" id=\"tipoDeDocumentoId\" chave=\"TipoDoc\"\n                            descricao=\"DescrTipoDoc\" ativo=\"true\" required=\"true\" tabela=\"TipoDocumento\"\n                            [(ngModel)]=\"data.tipoDoc\"\n                            [disabled]=\"funcoesService.isDetail(actionForm) || habilitaCampos === false || data.flagEstrangeiro !== 'S'\"\n                            [required]=\"data.flagEstrangeiro == 'S'\">\n                        </app-combo-padrao>\n                    </div>\n                </div>\n                <div class=\"col-lg-3 col-md-6 col-sm-12\">\n                    <div class=\"form-group form-group-sm\">\n                        <label for=\"numeroDocto\" [class.required]=\"data.flagEstrangeiro == 'S'\">{{ 'labels.numeroDocto'\n                            | translate }}</label>\n                        <input id=\"numeroDocto\" name=\"numeroDocto\" class=\"form-control form-control-sm\" type=\"text\"\n                            [(ngModel)]=\"data.numeroDoc\" required maxlength=\"9\"\n                            data-title=\"{{ 'labels.numeroDocto' | translate }}\"\n                            [disabled]=\"habilitaCampos === false || data.flagEstrangeiro !== 'S'\"\n                            [required]=\"data.flagEstrangeiro == 'S'\">\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-lg-6\">\n                    <div class=\"form-group form-group-sm\">\n                        <label for=\"nome\" class=\"required\">{{ 'labels.nome' | translate }}</label>\n                        <input id=\"nome\" name=\"nome\" [(ngModel)]=\"data.nome\" maxlength=\"50\"\n                            class=\"form-control form-control-sm\" type=\"text\"\n                            [disabled]=\"funcoesService.isDetail(actionForm) || habilitaCampos === false\" required\n                            data-title=\"{{ 'labels.nome' | translate }}\">\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-12 mt-3\">\n                    <div class=\"form-group\">\n                        <button class=\"btn btn-success mr-2\" type=\"submit\"\n                            [disabled]=\"funcoesService.isDetail(actionForm) || habilitaCampos === false\">\n                            {{ 'buttons.salvar' | translate }}\n                        </button>\n                        <button class=\"btn btn-success mr-2\" (click)=\"saveAndCreate(f)\" type=\"button\"\n                            [disabled]=\"funcoesService.isDetail(actionForm) || habilitaCampos === false\">\n                            {{ 'buttons.salvarNovo' | translate }}\n                        </button>\n                    </div>\n                </div>\n            </div>\n        </form>\n    </div>\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/portal/usuarios-receita-colaborador/usuarios-receita-colaborador-index/usuarios-receita-colaborador-index.component.html":
/*!**************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/portal/usuarios-receita-colaborador/usuarios-receita-colaborador-index/usuarios-receita-colaborador-index.component.html ***!
  \**************************************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<app-menu-command-bar [botoesComando]=\"constantes.listaIndex\"\n                      [formAction]=\"actionForm\"\n                      [itemData]=\"dados.codUsuario\"\n                      [sisFormularioId]=\"constantes.sisFormularioId\">\n</app-menu-command-bar>\n\n<div class=\"section-comand-bar\">\n    <table id=\"dtUsuariosReceitaColaborador\" class=\"table table-striped table-bordered table-hover nowrap table-sm\"></table>\n</div>\n\n<app-propriedades></app-propriedades>\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>\n<app-permissoes-rotina [constantes]=\"constantes\"></app-permissoes-rotina>");

/***/ }),

/***/ "./src/app/pages/portal/usuarios-receita-colaborador/usuarios-receita-colaborador-form/usuarios-receita-colaborador-form.component.ts":
/*!********************************************************************************************************************************************!*\
  !*** ./src/app/pages/portal/usuarios-receita-colaborador/usuarios-receita-colaborador-form/usuarios-receita-colaborador-form.component.ts ***!
  \********************************************************************************************************************************************/
/*! exports provided: UsuariosReceitaColaboradorFormComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UsuariosReceitaColaboradorFormComponent", function() { return UsuariosReceitaColaboradorFormComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! app/pages/cadastro/destinatario/destinatario.service */ "./src/app/pages/cadastro/destinatario/destinatario.service.ts");
/* harmony import */ var _usuarios_receita_colaborador_model__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../usuarios-receita-colaborador.model */ "./src/app/pages/portal/usuarios-receita-colaborador/usuarios-receita-colaborador.model.ts");
/* harmony import */ var _usuarios_receita_colaborador_constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../usuarios-receita-colaborador.constants */ "./src/app/pages/portal/usuarios-receita-colaborador/usuarios-receita-colaborador.constants.ts");
/* harmony import */ var app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! app/pages/cadastro/destinatario/destinatario.model */ "./src/app/pages/cadastro/destinatario/destinatario.model.ts");
/* harmony import */ var _usuarios_receita_colaborador_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../usuarios-receita-colaborador.service */ "./src/app/pages/portal/usuarios-receita-colaborador/usuarios-receita-colaborador.service.ts");
/* harmony import */ var app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! app/shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var app_shared_services_funcoes_cpf_cnpj_cpf_cnpj_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! app/shared/services/funcoes/cpf-cnpj/cpf-cnpj.service */ "./src/app/shared/services/funcoes/cpf-cnpj/cpf-cnpj.service.ts");
/* harmony import */ var app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! app/shared/services/funcoes/string-utils/string-utils.static.service */ "./src/app/shared/services/funcoes/string-utils/string-utils.static.service.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};














var UsuariosReceitaColaboradorFormComponent = /** @class */ (function (_super) {
    __extends(UsuariosReceitaColaboradorFormComponent, _super);
    function UsuariosReceitaColaboradorFormComponent(router, messageService, activatedRoute, funcoesService, permissoesUtils, destinatarioService, service, cpfCnpjService) {
        var _this = _super.call(this, new _usuarios_receita_colaborador_constants__WEBPACK_IMPORTED_MODULE_8__["UsuariosReceitaColaboradorConstants"](), funcoesService) || this;
        _this.router = router;
        _this.messageService = messageService;
        _this.activatedRoute = activatedRoute;
        _this.funcoesService = funcoesService;
        _this.permissoesUtils = permissoesUtils;
        _this.destinatarioService = destinatarioService;
        _this.service = service;
        _this.cpfCnpjService = cpfCnpjService;
        _this.data = new _usuarios_receita_colaborador_model__WEBPACK_IMPORTED_MODULE_7__["UsuariosReceitaColaborador"]();
        _this.habilitaCampos = true;
        _this.mensagens = [];
        _this.constantes = new _usuarios_receita_colaborador_constants__WEBPACK_IMPORTED_MODULE_8__["UsuariosReceitaColaboradorConstants"]();
        _this.isColaboradorChecked = true;
        _this.isReceitaChecked = false;
        _this.desabEstrangeiro = false;
        _this.target = _this.funcoesService.getTargetLocation();
        _this.pageRoute = "/portal/usuariosReceitaColaborador";
        _this.verificarEmailExistente = function () { return __awaiter(_this, void 0, void 0, function () {
            var _a;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        if (!this.funcoesService.isCreate(this.actionForm)) return [3 /*break*/, 2];
                        this.service.filtroEmail.email = this.data.email;
                        _a = this;
                        return [4 /*yield*/, this.service.getByEmail(this.service.filtroEmail).toPromise().catch(function () { return null; })];
                    case 1:
                        _a.dataEmail = _b.sent();
                        if (!this.dataEmail || !this.dataEmail.email || this.dataEmail.email.length === 0) {
                            this.habilitaCampos = true;
                        }
                        else {
                            this.habilitaCampos = false;
                            this.messageService.warning("titles.usuariosReceitaColaborador", "messages.emailJaUtilizado");
                        }
                        _b.label = 2;
                    case 2: return [2 /*return*/];
                }
            });
        }); };
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    UsuariosReceitaColaboradorFormComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, this.permissoesUtils.getLibRotina(this.actionForm), function () {
            var id = _this.activatedRoute.snapshot.paramMap.get("id");
            var codDest = _this.activatedRoute.snapshot.paramMap.get("codDest");
            var supervisor = _this.activatedRoute.snapshot.paramMap.get("supervisor");
            if (id) {
                _this.service.getById(+id).subscribe(function (resp) {
                    if (resp) {
                        _this.data = resp;
                        _this.destinatarioService.getById(codDest).subscribe(function (cliente) {
                            _this.trataCliente(cliente);
                        });
                        _this.data.supervisor = supervisor;
                    }
                    else {
                        _this.messageService.warning("titles.usuariosReceitaColaborador", "messages.nenhumRegistroEncontrado");
                        _this.back();
                    }
                });
            }
        }, function () {
            _this.permissoesUtils.back();
        });
    };
    UsuariosReceitaColaboradorFormComponent.prototype.getFirstFiveDigits = function () {
        var cleanCpf = this.data.cpf.replace(/\D/g, '');
        this.primeirosCincoDigitos = cleanCpf.substring(0, 5);
    };
    UsuariosReceitaColaboradorFormComponent.prototype.onSubmit = function (form, create) {
        var _this = this;
        if (create === void 0) { create = false; }
        console.log(this.data.tipoUsuario);
        app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_11__["EventEmitterService"].get("formError").emit(form);
        if (form.invalid) {
            return;
        }
        this.data.logRotina = "Usuarios Receita e Colaborador";
        var dataAtual = new Date();
        if (this.data.tipoUsuario === 3 && this.funcoesService.isCreate(this.actionForm)) {
            this.data.alteraSenha = 'S';
            this.data.validadeSenha = new Date(dataAtual.getTime() + 24 * 60 * 60 * 1000);
            this.data.senha = app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_13__["StringUtilsStaticService"].generateRandomString(20);
        }
        if (this.data.tipoUsuario === 2) {
            this.data.alteraSenha = 'N';
            this.data.validadeSenha = new Date(2050, 11, 31);
            this.data.senha = "RFB@" + this.primeirosCincoDigitos;
        }
        this.service
            .save(this.data, this.funcoesService.isEdit(this.actionForm))
            .subscribe(function (result) {
            _this.mensagens = _this.messageService.validationResult(result.validationResult);
            if (!result.validationResult.isValid) {
                app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_11__["EventEmitterService"].get("backError").emit(_this.mensagens);
            }
            else {
                _this.messageService.saveSuccess("titles.usuariosReceitaColaborador");
                if (create) {
                    _this.data = new _usuarios_receita_colaborador_model__WEBPACK_IMPORTED_MODULE_7__["UsuariosReceitaColaborador"]();
                    _this.router.navigate(["" + _this.target + _this.pageRoute + "/create"]);
                }
                else {
                    _this.back();
                }
            }
        });
    };
    UsuariosReceitaColaboradorFormComponent.prototype.edit = function () {
        this.router.navigate(["" + this.target + this.pageRoute + "/edit/" + this.data.codUsuario]);
    };
    UsuariosReceitaColaboradorFormComponent.prototype.saveAndCreate = function (form) {
        this.onSubmit(form, true);
    };
    UsuariosReceitaColaboradorFormComponent.prototype.back = function () {
        this.funcoesService.desabilitarFiltro();
        this.router.navigate(["" + this.target + this.pageRoute]);
    };
    UsuariosReceitaColaboradorFormComponent.prototype.trataCliente = function (cliente) {
        this.data.cliente = !!cliente ? cliente : new app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_9__["Destinatario"]();
    };
    UsuariosReceitaColaboradorFormComponent.prototype.validaCpf = function () {
        var valid = this.cpfCnpjService.valida_cpf(this.data.cpf);
        if (!valid) {
            this.messageService.warning("titles.loginPortal", "messages.cpfInvalido");
            return false;
        }
        this.getFirstFiveDigits();
        return true;
    };
    UsuariosReceitaColaboradorFormComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__["MessageService"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__["PermissoesUtilsService"] },
        { type: app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_6__["DestinatarioService"] },
        { type: _usuarios_receita_colaborador_service__WEBPACK_IMPORTED_MODULE_10__["UsuariosReceitaColaboradorService"] },
        { type: app_shared_services_funcoes_cpf_cnpj_cpf_cnpj_service__WEBPACK_IMPORTED_MODULE_12__["CpfCnpjService"] }
    ]; };
    UsuariosReceitaColaboradorFormComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-usuarios-receita-colaborador-form",
            template: __importDefault(__webpack_require__(/*! raw-loader!./usuarios-receita-colaborador-form.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/portal/usuarios-receita-colaborador/usuarios-receita-colaborador-form/usuarios-receita-colaborador-form.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__["MessageService"],
            _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__["PermissoesUtilsService"],
            app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_6__["DestinatarioService"],
            _usuarios_receita_colaborador_service__WEBPACK_IMPORTED_MODULE_10__["UsuariosReceitaColaboradorService"],
            app_shared_services_funcoes_cpf_cnpj_cpf_cnpj_service__WEBPACK_IMPORTED_MODULE_12__["CpfCnpjService"]])
    ], UsuariosReceitaColaboradorFormComponent);
    return UsuariosReceitaColaboradorFormComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_4__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/portal/usuarios-receita-colaborador/usuarios-receita-colaborador-index/usuarios-receita-colaborador-index.component.ts":
/*!**********************************************************************************************************************************************!*\
  !*** ./src/app/pages/portal/usuarios-receita-colaborador/usuarios-receita-colaborador-index/usuarios-receita-colaborador-index.component.ts ***!
  \**********************************************************************************************************************************************/
/*! exports provided: UsuariosReceitaColaboradorIndexComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UsuariosReceitaColaboradorIndexComponent", function() { return UsuariosReceitaColaboradorIndexComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../shared/services/datatables/datatables.service */ "./src/app/shared/services/datatables/datatables.service.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var _login_login_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _usuarios_receita_colaborador_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../usuarios-receita-colaborador.service */ "./src/app/pages/portal/usuarios-receita-colaborador/usuarios-receita-colaborador.service.ts");
/* harmony import */ var _usuarios_receita_colaborador_model__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../usuarios-receita-colaborador.model */ "./src/app/pages/portal/usuarios-receita-colaborador/usuarios-receita-colaborador.model.ts");
/* harmony import */ var _usuarios_receita_colaborador_constants__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../usuarios-receita-colaborador.constants */ "./src/app/pages/portal/usuarios-receita-colaborador/usuarios-receita-colaborador.constants.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};











var UsuariosReceitaColaboradorIndexComponent = /** @class */ (function (_super) {
    __extends(UsuariosReceitaColaboradorIndexComponent, _super);
    function UsuariosReceitaColaboradorIndexComponent(router, service, datatablesService, funcoesService, messageService, permissoesUtils, loginService) {
        var _this = _super.call(this, new _usuarios_receita_colaborador_constants__WEBPACK_IMPORTED_MODULE_10__["UsuariosReceitaColaboradorConstants"](), funcoesService) || this;
        _this.router = router;
        _this.service = service;
        _this.datatablesService = datatablesService;
        _this.funcoesService = funcoesService;
        _this.messageService = messageService;
        _this.permissoesUtils = permissoesUtils;
        _this.loginService = loginService;
        _this.data = new _usuarios_receita_colaborador_model__WEBPACK_IMPORTED_MODULE_9__["UsuariosReceitaColaborador"]();
        _this.dados = new _usuarios_receita_colaborador_model__WEBPACK_IMPORTED_MODULE_9__["UsuariosReceitaColaboradorIndex"]();
        _this.constantes = new _usuarios_receita_colaborador_constants__WEBPACK_IMPORTED_MODULE_10__["UsuariosReceitaColaboradorConstants"]();
        _this.target = _this.funcoesService.getTargetLocation();
        _this.pageRoute = "/portal/usuariosReceitaColaborador";
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    UsuariosReceitaColaboradorIndexComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 4, function () {
            if (!_this.loginService.isTokenExpired()) {
                _this.refresh();
            }
        }, function () {
            _this.permissoesUtils.back();
        }, true);
    };
    UsuariosReceitaColaboradorIndexComponent.prototype.refresh = function () {
        var _this = this;
        this.service.getByFilter().subscribe(function (data) {
            var columns = [
                _this.datatablesService.getDataString("codUsuario", "codigo"),
                _this.datatablesService.getDataString("email", "email"),
                _this.datatablesService.getDataString("nome", "nome")
            ];
            _this.datatablesService.toDataTable({ tableId: "dtUsuariosReceitaColaborador", columns: columns, data: data, orientationOrder: _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_2__["EOrientationOrder"].DESC }, function (aData) {
                _this.dados = aData;
                _this.data = aData;
            });
        });
    };
    UsuariosReceitaColaboradorIndexComponent.prototype.print = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 5, function () {
            _this.constantes.paramRelatorio = {};
            _super.prototype.print.call(_this);
        });
    };
    UsuariosReceitaColaboradorIndexComponent.prototype.remove = function () {
        var _this = this;
        if (!!(this.dados.codUsuario)) {
            this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 3, function () {
                _this.messageService.removeConfirm(function () {
                    _this.service.remove(_this.data).subscribe(function () {
                        _this.service.remove(_this.data);
                        _this.datatablesService.remove("dtUsuariosReceitaColaborador");
                    });
                });
            });
        }
    };
    UsuariosReceitaColaboradorIndexComponent.prototype.create = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 1, function () {
            _this.router.navigate(["" + _this.target + _this.pageRoute + "/create"]);
        });
    };
    UsuariosReceitaColaboradorIndexComponent.prototype.edit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 2, function () {
            if (_this.funcoesService.isNotUndefinedOrNull(_this.dados.codUsuario)) {
                _this.router.navigate(["" + _this.target + _this.pageRoute + "/edit/" + _this.dados.codUsuario]);
            }
        });
    };
    UsuariosReceitaColaboradorIndexComponent.prototype.detail = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 3, function () {
            _this.router.navigate(["" + _this.target + _this.pageRoute + "/detail/" + _this.dados.codUsuario]);
        });
    };
    UsuariosReceitaColaboradorIndexComponent.prototype.properties = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 6, function () {
            _super.prototype.properties.call(_this, _this.dados);
        });
    };
    UsuariosReceitaColaboradorIndexComponent.prototype.permissoes = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 7, function () {
            _super.prototype.permissoes.call(_this, _this.constantes);
        });
    };
    UsuariosReceitaColaboradorIndexComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: _usuarios_receita_colaborador_service__WEBPACK_IMPORTED_MODULE_8__["UsuariosReceitaColaboradorService"] },
        { type: _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_2__["DatatablesService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__["MessageService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__["PermissoesUtilsService"] },
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_6__["LoginService"] }
    ]; };
    UsuariosReceitaColaboradorIndexComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-usuarios-receita-colaborador-index",
            template: __importDefault(__webpack_require__(/*! raw-loader!./usuarios-receita-colaborador-index.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/portal/usuarios-receita-colaborador/usuarios-receita-colaborador-index/usuarios-receita-colaborador-index.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            _usuarios_receita_colaborador_service__WEBPACK_IMPORTED_MODULE_8__["UsuariosReceitaColaboradorService"],
            _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_2__["DatatablesService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__["MessageService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__["PermissoesUtilsService"],
            _login_login_service__WEBPACK_IMPORTED_MODULE_6__["LoginService"]])
    ], UsuariosReceitaColaboradorIndexComponent);
    return UsuariosReceitaColaboradorIndexComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_4__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/portal/usuarios-receita-colaborador/usuarios-receita-colaborador.constants.ts":
/*!*****************************************************************************************************!*\
  !*** ./src/app/pages/portal/usuarios-receita-colaborador/usuarios-receita-colaborador.constants.ts ***!
  \*****************************************************************************************************/
/*! exports provided: UsuariosReceitaColaboradorConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UsuariosReceitaColaboradorConstants", function() { return UsuariosReceitaColaboradorConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var UsuariosReceitaColaboradorConstants = /** @class */ (function () {
    function UsuariosReceitaColaboradorConstants() {
        this.sisFormularioId = 375246;
        this.permissoes = [
            { sisFormularioId: this.sisFormularioId, libRotina: 1, acao: "labels.inclusao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 2, acao: "labels.alteracao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 3, acao: "labels.exclusao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 4, acao: "labels.consulta" },
            { sisFormularioId: this.sisFormularioId, libRotina: 5, acao: "labels.impressao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 6, acao: "labels.propriedades" },
            { sisFormularioId: this.sisFormularioId, libRotina: 7, acao: "labels.permissoes" }
        ];
        this.sisSistemaId = "PTL";
        this.nomeForm = "titles.usuariosReceitaColaborador";
        this.reportId = "PTL0008";
        this.reportTitulo = { "titulo": "Usuários Receita e Colaborador", "subTitulo": "" };
        this.listaIndex = [
            { title: 'Novo', action: 'create', icon: "icon-plus", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Visualizar', action: 'detail', icon: "icon-eye", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Editar', action: 'edit', icon: "icon-pencil", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Excluir', action: 'remove', icon: "icon-close", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Atualizar', action: 'refresh', icon: "icon-reload", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Imprimir', action: 'print', icon: "icon-printer", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Propriedade', action: 'properties', icon: "icon-menu", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'Permissao', action: 'permissoes', icon: "icon-unlock", exibeButton: true, eximeMenu: true, menuName: 'Movimento' }
        ];
        this.listaForm = [
            { title: 'Editar', action: 'edit', icon: "icon-pencil", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Voltar', action: 'back', icon: "icon-arrow-left", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
        ];
    }
    return UsuariosReceitaColaboradorConstants;
}());



/***/ }),

/***/ "./src/app/pages/portal/usuarios-receita-colaborador/usuarios-receita-colaborador.model.ts":
/*!*************************************************************************************************!*\
  !*** ./src/app/pages/portal/usuarios-receita-colaborador/usuarios-receita-colaborador.model.ts ***!
  \*************************************************************************************************/
/*! exports provided: UsuariosReceitaColaboradorIndex, UsuariosReceitaColaborador, UsuariosReceitaColaboradorEmailFilter */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UsuariosReceitaColaboradorIndex", function() { return UsuariosReceitaColaboradorIndex; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UsuariosReceitaColaborador", function() { return UsuariosReceitaColaborador; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UsuariosReceitaColaboradorEmailFilter", function() { return UsuariosReceitaColaboradorEmailFilter; });
/* harmony import */ var app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! app/pages/cadastro/destinatario/destinatario.model */ "./src/app/pages/cadastro/destinatario/destinatario.model.ts");
/* harmony import */ var app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! app/shared/services/base/base.model */ "./src/app/shared/services/base/base.model.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};


var UsuariosReceitaColaboradorIndex = /** @class */ (function (_super) {
    __extends(UsuariosReceitaColaboradorIndex, _super);
    function UsuariosReceitaColaboradorIndex() {
        var _this = _super.call(this) || this;
        _this.codUsuario = 0;
        return _this;
    }
    return UsuariosReceitaColaboradorIndex;
}(app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_1__["BaseModel"]));

var UsuariosReceitaColaborador = /** @class */ (function (_super) {
    __extends(UsuariosReceitaColaborador, _super);
    function UsuariosReceitaColaborador() {
        var _this = _super.call(this) || this;
        _this.codUsuario = 0;
        _this.destinatarioIdCliente = 0;
        _this.tipoUsuario = 3;
        _this.email = '';
        _this.flagEstrangeiro = 'N';
        _this.flagAtivo = 'S';
        _this.supervisor = 'S';
        _this.cpf = '';
        _this.tipoDoc = '';
        _this.numeroDoc = '';
        _this.nome = '';
        _this.senha = '';
        _this.alteraSenha = '';
        _this.validadeSenha = null;
        _this.cliente = new app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_0__["Destinatario"]();
        return _this;
    }
    return UsuariosReceitaColaborador;
}(app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_1__["BaseModel"]));

var UsuariosReceitaColaboradorEmailFilter = /** @class */ (function (_super) {
    __extends(UsuariosReceitaColaboradorEmailFilter, _super);
    function UsuariosReceitaColaboradorEmailFilter() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return UsuariosReceitaColaboradorEmailFilter;
}(app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_1__["BaseModel"]));



/***/ }),

/***/ "./src/app/pages/portal/usuarios-receita-colaborador/usuarios-receita-colaborador.module.ts":
/*!**************************************************************************************************!*\
  !*** ./src/app/pages/portal/usuarios-receita-colaborador/usuarios-receita-colaborador.module.ts ***!
  \**************************************************************************************************/
/*! exports provided: UsuariosReceitaColaboradorModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UsuariosReceitaColaboradorModule", function() { return UsuariosReceitaColaboradorModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _shared_shared_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../shared/shared.module */ "./src/app/shared/shared.module.ts");
/* harmony import */ var _usuarios_receita_colaborador_routing_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./usuarios-receita-colaborador.routing.module */ "./src/app/pages/portal/usuarios-receita-colaborador/usuarios-receita-colaborador.routing.module.ts");
/* harmony import */ var _usuarios_receita_colaborador_index_usuarios_receita_colaborador_index_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./usuarios-receita-colaborador-index/usuarios-receita-colaborador-index.component */ "./src/app/pages/portal/usuarios-receita-colaborador/usuarios-receita-colaborador-index/usuarios-receita-colaborador-index.component.ts");
/* harmony import */ var _usuarios_receita_colaborador_form_usuarios_receita_colaborador_form_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./usuarios-receita-colaborador-form/usuarios-receita-colaborador-form.component */ "./src/app/pages/portal/usuarios-receita-colaborador/usuarios-receita-colaborador-form/usuarios-receita-colaborador-form.component.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};





var UsuariosReceitaColaboradorModule = /** @class */ (function () {
    function UsuariosReceitaColaboradorModule() {
    }
    UsuariosReceitaColaboradorModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            declarations: [
                _usuarios_receita_colaborador_index_usuarios_receita_colaborador_index_component__WEBPACK_IMPORTED_MODULE_3__["UsuariosReceitaColaboradorIndexComponent"],
                _usuarios_receita_colaborador_form_usuarios_receita_colaborador_form_component__WEBPACK_IMPORTED_MODULE_4__["UsuariosReceitaColaboradorFormComponent"]
            ],
            imports: [
                _shared_shared_module__WEBPACK_IMPORTED_MODULE_1__["SharedModule"],
                _usuarios_receita_colaborador_routing_module__WEBPACK_IMPORTED_MODULE_2__["UsuariosReceitaColaboradorRoutingModule"]
            ]
        })
    ], UsuariosReceitaColaboradorModule);
    return UsuariosReceitaColaboradorModule;
}());



/***/ }),

/***/ "./src/app/pages/portal/usuarios-receita-colaborador/usuarios-receita-colaborador.routing.module.ts":
/*!**********************************************************************************************************!*\
  !*** ./src/app/pages/portal/usuarios-receita-colaborador/usuarios-receita-colaborador.routing.module.ts ***!
  \**********************************************************************************************************/
/*! exports provided: UsuariosReceitaColaboradorRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UsuariosReceitaColaboradorRoutingModule", function() { return UsuariosReceitaColaboradorRoutingModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var _usuarios_receita_colaborador_form_usuarios_receita_colaborador_form_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./usuarios-receita-colaborador-form/usuarios-receita-colaborador-form.component */ "./src/app/pages/portal/usuarios-receita-colaborador/usuarios-receita-colaborador-form/usuarios-receita-colaborador-form.component.ts");
/* harmony import */ var _usuarios_receita_colaborador_index_usuarios_receita_colaborador_index_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./usuarios-receita-colaborador-index/usuarios-receita-colaborador-index.component */ "./src/app/pages/portal/usuarios-receita-colaborador/usuarios-receita-colaborador-index/usuarios-receita-colaborador-index.component.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};





var UsuariosReceitaColaboradorRoutes = [
    {
        path: "",
        component: _usuarios_receita_colaborador_index_usuarios_receita_colaborador_index_component__WEBPACK_IMPORTED_MODULE_4__["UsuariosReceitaColaboradorIndexComponent"],
        data: {
            breadcrumb: "usuariosReceitaColaborador",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].index }
        }
    },
    {
        path: "create",
        component: _usuarios_receita_colaborador_form_usuarios_receita_colaborador_form_component__WEBPACK_IMPORTED_MODULE_3__["UsuariosReceitaColaboradorFormComponent"],
        data: {
            breadcrumb: "usuariosReceitaColaborador",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].create }
        }
    },
    {
        path: "detail/:id",
        component: _usuarios_receita_colaborador_form_usuarios_receita_colaborador_form_component__WEBPACK_IMPORTED_MODULE_3__["UsuariosReceitaColaboradorFormComponent"],
        data: {
            breadcrumb: "usuariosReceitaColaborador",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].detail }
        }
    },
    {
        path: "edit/:id",
        component: _usuarios_receita_colaborador_form_usuarios_receita_colaborador_form_component__WEBPACK_IMPORTED_MODULE_3__["UsuariosReceitaColaboradorFormComponent"],
        data: {
            breadcrumb: "usuariosReceitaColaborador",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].edit }
        }
    }
];
var UsuariosReceitaColaboradorRoutingModule = /** @class */ (function () {
    function UsuariosReceitaColaboradorRoutingModule() {
    }
    UsuariosReceitaColaboradorRoutingModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"].forChild(UsuariosReceitaColaboradorRoutes)],
            exports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"]]
        })
    ], UsuariosReceitaColaboradorRoutingModule);
    return UsuariosReceitaColaboradorRoutingModule;
}());



/***/ }),

/***/ "./src/app/pages/portal/usuarios-receita-colaborador/usuarios-receita-colaborador.service.ts":
/*!***************************************************************************************************!*\
  !*** ./src/app/pages/portal/usuarios-receita-colaborador/usuarios-receita-colaborador.service.ts ***!
  \***************************************************************************************************/
/*! exports provided: UsuariosReceitaColaboradorService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UsuariosReceitaColaboradorService", function() { return UsuariosReceitaColaboradorService; });
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
/* harmony import */ var app_app_error_handler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/app.error-handler */ "./src/app/app.error-handler.ts");
/* harmony import */ var environments_environment__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var _usuarios_receita_colaborador_model__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./usuarios-receita-colaborador.model */ "./src/app/pages/portal/usuarios-receita-colaborador/usuarios-receita-colaborador.model.ts");
/* harmony import */ var _usuarios_receita_colaborador_constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./usuarios-receita-colaborador.constants */ "./src/app/pages/portal/usuarios-receita-colaborador/usuarios-receita-colaborador.constants.ts");
/* harmony import */ var app_shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/shared/services/base/base.service */ "./src/app/shared/services/base/base.service.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};








var UsuariosReceitaColaboradorService = /** @class */ (function (_super) {
    __extends(UsuariosReceitaColaboradorService, _super);
    function UsuariosReceitaColaboradorService(http) {
        var _this = _super.call(this, http, "portal/usuariosReceitaColaborador") || this;
        _this.http = http;
        _this.constantes = new _usuarios_receita_colaborador_constants__WEBPACK_IMPORTED_MODULE_6__["UsuariosReceitaColaboradorConstants"]();
        _this.filtroEmail = new _usuarios_receita_colaborador_model__WEBPACK_IMPORTED_MODULE_5__["UsuariosReceitaColaboradorEmailFilter"]();
        return _this;
    }
    UsuariosReceitaColaboradorService.prototype.getByFilter = function () {
        return this.http
            .get(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].service_url + "/api/v1/portal/usuariosReceitaColaborador/getByFilter")
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_3__["ErrorHandler"].handleError));
    };
    UsuariosReceitaColaboradorService.prototype.getByEmail = function (filter) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].service_url + "/api/v1/portal/usuariosReceitaColaborador/getByEmail", filter)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_3__["ErrorHandler"].handleError));
    };
    UsuariosReceitaColaboradorService.ctorParameters = function () { return [
        { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_0__["HttpClient"] }
    ]; };
    UsuariosReceitaColaboradorService = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
            providedIn: "root"
        }),
        __metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_0__["HttpClient"]])
    ], UsuariosReceitaColaboradorService);
    return UsuariosReceitaColaboradorService;
}(app_shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_7__["BaseService"]));



/***/ }),

/***/ "./src/app/shared/services/funcoes/cpf-cnpj/cpf-cnpj.service.ts":
/*!**********************************************************************!*\
  !*** ./src/app/shared/services/funcoes/cpf-cnpj/cpf-cnpj.service.ts ***!
  \**********************************************************************/
/*! exports provided: CpfCnpjService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CpfCnpjService", function() { return CpfCnpjService; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};


var CpfCnpjService = /** @class */ (function () {
    function CpfCnpjService() {
        this.mask$ = new rxjs__WEBPACK_IMPORTED_MODULE_1__["BehaviorSubject"]('AA.AAA.AAA/AAAA-00');
    }
    CpfCnpjService.prototype.verifica_cpf_cnpj = function (valor) {
        valor = valor.toString();
        valor = valor.replace(/[^0-9A-Za-z]/g, '');
        if (valor.length === 11) {
            return 'CPF';
        }
        else if (valor.length === 14) {
            return 'CNPJ';
        }
        else {
            return false;
        }
    };
    CpfCnpjService.prototype.valida_cpf = function (valor) {
        if (!valor)
            return true;
        valor = valor.replace(/[^0-9]/g, '');
        if (!/^\d{11}$/.test(valor))
            return false;
        // elimina CPFs inválidos conhecidos (ex: 00000000000, 11111111111 etc.)
        if (/^(\d)\1{10}$/.test(valor))
            return false;
        var digitos = valor.substring(0, 9);
        // calcula 1º DV
        var soma = 0;
        for (var i = 0; i < 9; i++) {
            soma += parseInt(digitos.charAt(i), 10) * (10 - i);
        }
        var resto = soma % 11;
        var dv1 = resto < 2 ? 0 : 11 - resto;
        // calcula 2º DV
        soma = 0;
        var digitosMaisDv1 = digitos + dv1;
        for (var i = 0; i < 10; i++) {
            soma += parseInt(digitosMaisDv1.charAt(i), 10) * (11 - i);
        }
        resto = soma % 11;
        var dv2 = resto < 2 ? 0 : 11 - resto;
        // monta CPF completo calculado
        var cpfCalculado = digitos + dv1.toString() + dv2.toString();
        return valor === cpfCalculado;
    };
    CpfCnpjService.prototype.valida_cnpj = function (cnpj) {
        function calc_digitos_cnpj(digitos) {
            var soma = 0;
            var peso = digitos.length === 12 ? 5 : 6; // 1º DV começa em 5, 2º em 6
            for (var i = 0; i < digitos.length; i++) {
                var char = digitos.charAt(i);
                var valorNumerico = void 0;
                if (/[0-9]/.test(char)) {
                    valorNumerico = parseInt(char, 10);
                }
                else if (/[A-Z]/.test(char)) {
                    valorNumerico = char.charCodeAt(0) - 48; // NT 49/2024
                }
                else {
                    throw new Error("Caractere inv\u00E1lido no CNPJ: '" + char + "'");
                }
                soma += valorNumerico * peso;
                peso--;
                if (peso < 2)
                    peso = 9;
            }
            var resto = soma % 11;
            return resto < 2 ? 0 : 11 - resto;
        }
        cnpj = cnpj.replace(/[^0-9A-Za-z]/g, '').toUpperCase();
        if (!/^[0-9A-Z]{12}[0-9]{2}$/.test(cnpj)) {
            return false;
        }
        var corpo = cnpj.substring(0, 12);
        var dv1Informado = parseInt(cnpj.charAt(12), 10);
        var dv2Informado = parseInt(cnpj.charAt(13), 10);
        var dv1Calculado = calc_digitos_cnpj(corpo);
        var dv2Calculado = calc_digitos_cnpj(corpo + dv1Calculado);
        return dv1Informado === dv1Calculado && dv2Informado === dv2Calculado;
    };
    CpfCnpjService.prototype.valida_cpf_cnpj = function (valor) {
        var valida = this.verifica_cpf_cnpj(valor);
        if (valida === 'CPF') {
            return this.valida_cpf(valor);
        }
        else if (valida === 'CNPJ') {
            return this.valida_cnpj(valor);
        }
        else {
            return false;
        }
    };
    CpfCnpjService.prototype.formata_cpf_cnpj = function (valor) {
        var formatado = "";
        var valida = this.verifica_cpf_cnpj(valor);
        if (valida === 'CPF') {
            if (this.valida_cpf(valor)) {
                formatado = valor.substr(0, 3) + '.';
                formatado += valor.substr(3, 3) + '.';
                formatado += valor.substr(6, 3) + '-';
                formatado += valor.substr(9, 2) + '';
            }
        }
        else if (valida === 'CNPJ') {
            if (this.valida_cnpj(valor)) {
                formatado = valor.substr(0, 2) + '.';
                formatado += valor.substr(2, 3) + '.';
                formatado += valor.substr(5, 3) + '/';
                formatado += valor.substr(8, 4) + '-';
                formatado += valor.substr(12, 14) + '';
            }
        }
        return formatado;
    };
    CpfCnpjService.prototype.format = function (documento, tipo) {
        var _this = this;
        if (tipo === void 0) { tipo = ''; }
        var valor = documento.replace(/[^a-zA-Z0-9]/g, '') || '';
        setTimeout(function () {
            var novaMask = 'AA.AAA.AAA/AAAA-00';
            if (tipo === 'F') {
                novaMask = '000.000.000-00';
            }
            else if (tipo === 'J') {
                if (/^[0-9]{14}$/.test(valor)) {
                    novaMask = '00.000.000/0000-00';
                }
                else if (valor.length >= 14 && /[a-zA-Z]/.test(valor)) {
                    novaMask = 'AA.AAA.AAA/AAAA-00';
                }
            }
            else {
                // tipo vazio
                if (/^[0-9]{11}$/.test(valor)) {
                    novaMask = '000.000.000-00';
                }
                else if (/^[0-9]{14}$/.test(valor)) {
                    novaMask = '00.000.000/0000-00';
                }
                else if (valor.length >= 14 && /[a-zA-Z]/.test(valor)) {
                    novaMask = 'AA.AAA.AAA/AAAA-00';
                }
            }
            _this.mask$.next(novaMask);
        });
    };
    CpfCnpjService.prototype.length = function (tipo) {
        if (tipo === 'F') {
            return 14;
        }
        else {
            return 18;
        }
    };
    CpfCnpjService = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])({
            providedIn: 'root'
        }),
        __metadata("design:paramtypes", [])
    ], CpfCnpjService);
    return CpfCnpjService;
}());



/***/ })

}]);
//# sourceMappingURL=app-pages-portal-usuarios-receita-colaborador-usuarios-receita-colaborador-module.js.map