(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["app-pages-nfe-exportar-danfe-exportar-danfe-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/nfe/exportar-danfe/exportar-danfe-form/exportar-danfe-form.component.html":
/*!***************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/nfe/exportar-danfe/exportar-danfe-form/exportar-danfe-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\" [sisFormularioId]=\"constantes.sisFormularioId\">\n</app-menu-command-bar>\n\n<div class=\"box-shadow\">\n    <div style=\"background-color: #fff; padding: 15px;\">\n        <app-validacoes></app-validacoes>\n        <form class=\"form\" #f=\"ngForm\" (ngSubmit)=\"onSubmit(f)\">\n            <div class=\"row\">\n                <div class=\"col-lg-3\">\n                    <div class=\"form-group form-group-sm\">\n                        <label for=\"periodoDe\" class=\"required\">{{\"labels.periodoDe\" | translate }}</label>\n                        <app-data id=\"periodoDe\" name=\"periodoDe\" [(ngModel)]=\"nfeXmlFilter.dataI\" autofocus\n                            class=\"dataHora\" [formatDateTime]=\"mascara.getFormatData\" required=\"true\">\n                        </app-data>\n                    </div>\n                </div>\n                <div class=\"col-lg-3\">\n                    <div class=\"form-group form-group-sm\">\n                        <label for=\"ate\" class=\"required\">{{\"labels.ate\" | translate}}</label>\n                        <app-data id=\"ate\" name=\"ate\" [(ngModel)]=\"nfeXmlFilter.dataF\" class=\"dataHora\"\n                            [formatDateTime]=\"mascara.getFormatData\" required=\"true\">\n                        </app-data>\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-lg-3\">\n                    <div class=\"form-group form-group-sm\">\n                        <label for=\"serie\" class=\"required\">{{'labels.serie' | translate}}</label>\n                        <app-combo-serie id=\"serie\" name=\"serie\" [(ngModel)]=\"nfeXmlFilter.serieNF\" required=\"true\">\n                        </app-combo-serie>\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-lg-3\">\n                    <div class=\"form-group form-group-sm\">\n                        <app-field-container>\n                            <label for=\"notaFiscalIdI\">{{'labels.notaInicial' | translate}}</label>\n                            <input id=\"notaFiscalIdI\" name=\"notaFiscalIdI\" maxlength=\"9\" mask=\"999999999\"\n                                [(ngModel)]=\"nfeXmlFilter.notaFiscalIdI\" class=\"form-control form-control-sm\"\n                                type=\"text\" data-title=\"{{'labels.notaInicial' | translate}}\">\n                        </app-field-container>\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-lg-3\">\n                    <div class=\"form-group form-group-sm\">\n                        <app-field-container>\n                            <label for=\"notaFiscalIdF\">{{'labels.notaFinal' | translate}}</label>\n                            <input id=\"notaFiscalIdF\" name=\"notaFiscalIdF\" maxlength=\"9\" mask=\"999999999\"\n                                [(ngModel)]=\"nfeXmlFilter.notaFiscalIdF\" class=\"form-control form-control-sm\"\n                                type=\"text\" data-title=\"{{'labels.notaFinal' | translate}}\">\n                        </app-field-container>\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-lg-8\">\n                    <div class=\"form-group\">\n                        <app-pesquisa-destinatario [(ngModel)]=\"nfeXmlFilter.destinatarioIdCliente\" id=\"cliente\"\n                            name=\"cliente\" label=\"cliente\" title=\"cliente\" modalTitle=\"pesquisaDeCliente\"\n                            showCgcCpf=\"false\" showInscricao=\"false\" [inSelected]=\"nfeXmlFilter.cliente\">\n                        </app-pesquisa-destinatario>\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-lg-12 text-left\">\n                    <button class=\"btn btn-success\" type=\"submit\">{{ 'buttons.gerarPdf' | translate }}</button>&nbsp;\n                    <button class=\"btn btn-default\" type=\"button\" (click)=\"onCancelar()\">\n                        {{ 'buttons.cancelar' | translate }}\n                    </button> &nbsp;\n                </div>\n            </div>\n        </form>\n    </div>\n</div>\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>\n<app-permissoes-rotina [constantes]=\"constantes\"></app-permissoes-rotina>");

/***/ }),

/***/ "./src/app/pages/nfe/exportar-danfe/exportar-danfe-form/exportar-danfe-form.component.ts":
/*!***********************************************************************************************!*\
  !*** ./src/app/pages/nfe/exportar-danfe/exportar-danfe-form/exportar-danfe-form.component.ts ***!
  \***********************************************************************************************/
/*! exports provided: ExportarDanfeFormComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExportarDanfeFormComponent", function() { return ExportarDanfeFormComponent; });
/* harmony import */ var _cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../../cadastro/destinatario/destinatario.model */ "./src/app/pages/cadastro/destinatario/destinatario.model.ts");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../app/shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var _app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../../app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _config_enumerables__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_8__ = __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_9__ = __webpack_require__(/*! ../../../login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var _exportar_danfe_constants__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../exportar-danfe.constants */ "./src/app/pages/nfe/exportar-danfe/exportar-danfe.constants.ts");
/* harmony import */ var _nfe_model__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./../../nfe.model */ "./src/app/pages/nfe/nfe.model.ts");
/* harmony import */ var _nfe_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./../../nfe.service */ "./src/app/pages/nfe/nfe.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 ExportarDanfeFormComponent = /** @class */ (function (_super) {
    __extends(ExportarDanfeFormComponent, _super);
    function ExportarDanfeFormComponent(loginService, permissoesUtils, router, funcoesService, nfeService, messageService) {
        var _this = _super.call(this, new _exportar_danfe_constants__WEBPACK_IMPORTED_MODULE_10__["ExportarDanfeConstants"](), funcoesService) || this;
        _this.loginService = loginService;
        _this.permissoesUtils = permissoesUtils;
        _this.router = router;
        _this.funcoesService = funcoesService;
        _this.nfeService = nfeService;
        _this.messageService = messageService;
        _this.nfeXmlFilter = new _nfe_model__WEBPACK_IMPORTED_MODULE_11__["NfeXmlFilter"]();
        _this.nfeXmlFilterAux = new _nfe_model__WEBPACK_IMPORTED_MODULE_11__["NfeXmlFilter"]();
        _this.constantes = new _exportar_danfe_constants__WEBPACK_IMPORTED_MODULE_10__["ExportarDanfeConstants"]();
        _this.mensagens = [];
        _this.mascara = new _config_enumerables__WEBPACK_IMPORTED_MODULE_6__["Mascaras"]();
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        _this.filialId = loginService.getLogin().filialId;
        return _this;
    }
    ExportarDanfeFormComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 1, function () { }, function () { return _this.permissoesUtils.back(); }, true);
    };
    ExportarDanfeFormComponent.prototype.onSubmit = function (form) {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_7__["EventEmitterService"].get("formError").emit(form);
                if (form.invalid) {
                    return [2 /*return*/];
                }
                this.nfeService.exportarPdf(this.nfeXmlFilter).subscribe(function (resp) {
                    if (!resp.validationResult.isValid) {
                        _this.mensagens = _this.messageService.validationResult(resp.validationResult);
                        _this.messageService.warning("titles.exportarXML", _this.mensagens[0]);
                        return;
                    }
                    _this.nfeXmlFilterAux = resp;
                    if ((!_this.funcoesService.isNotUndefinedOrNull(_this.nfeXmlFilterAux.arquivoZip)) || (_this.nfeXmlFilterAux.arquivoZip === "")) {
                        _this.messageService.warning("titles.exportarDanfe", "messages.nenhumPdfEnontrado");
                        return;
                    }
                    _this.download();
                    _this.messageService.success("Sucesso", "messages.exportacaoPdfRealizada");
                    _this.onCancelar();
                });
                return [2 /*return*/];
            });
        });
    };
    ExportarDanfeFormComponent.prototype.download = function () {
        if (this.funcoesService.isUndefinedOrNull(this.nfeXmlFilterAux)) {
            return;
        }
        var b64 = this.nfeXmlFilterAux.arquivoZip;
        var byteCharacters = atob(b64);
        var byteArrays = [];
        for (var offset = 0; offset < byteCharacters.length; offset += 512) {
            var slice = byteCharacters.slice(offset, offset + 512);
            var byteNumbers = new Array(slice.length);
            for (var i = 0; i < slice.length; i++) {
                byteNumbers[i] = slice.charCodeAt(i);
            }
            var byteArray = new Uint8Array(byteNumbers);
            byteArrays.push(byteArray);
        }
        var tipo = this.nfeXmlFilterAux.tipoArquivo.replace(',', '');
        var blobData = new Blob(byteArrays, { type: tipo });
        var blob = new Blob([blobData], { type: tipo });
        var url = window.URL.createObjectURL(blob);
        var link = document.createElement('a');
        link.href = url;
        link.download = this.nfeXmlFilterAux.nomeArquivo;
        link.click();
    };
    ExportarDanfeFormComponent.prototype.onCancelar = function () {
        this.nfeXmlFilter = new _nfe_model__WEBPACK_IMPORTED_MODULE_11__["NfeXmlFilter"]();
        this.nfeXmlFilter.cliente = new _cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_0__["Destinatario"]();
    };
    ExportarDanfeFormComponent.prototype.permissoes = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 2, function () {
            _super.prototype.permissoes.call(_this, _this.constantes);
        });
    };
    ExportarDanfeFormComponent.ctorParameters = function () { return [
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_9__["LoginService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_8__["PermissoesUtilsService"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"] },
        { type: app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"] },
        { type: _nfe_service__WEBPACK_IMPORTED_MODULE_12__["NfeService"] },
        { type: _app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__["MessageService"] }
    ]; };
    ExportarDanfeFormComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
            selector: "app-exportar-danfe-form",
            template: __importDefault(__webpack_require__(/*! raw-loader!./exportar-danfe-form.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/nfe/exportar-danfe/exportar-danfe-form/exportar-danfe-form.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_login_login_service__WEBPACK_IMPORTED_MODULE_9__["LoginService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_8__["PermissoesUtilsService"],
            _angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"],
            app_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"],
            _nfe_service__WEBPACK_IMPORTED_MODULE_12__["NfeService"],
            _app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__["MessageService"]])
    ], ExportarDanfeFormComponent);
    return ExportarDanfeFormComponent;
}(_app_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_4__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/nfe/exportar-danfe/exportar-danfe.constants.ts":
/*!**********************************************************************!*\
  !*** ./src/app/pages/nfe/exportar-danfe/exportar-danfe.constants.ts ***!
  \**********************************************************************/
/*! exports provided: ExportarDanfeConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExportarDanfeConstants", function() { return ExportarDanfeConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var ExportarDanfeConstants = /** @class */ (function () {
    function ExportarDanfeConstants() {
        this.sisFormularioId = 130110;
        this.permissoes = [
            { sisFormularioId: this.sisFormularioId, libRotina: 1, acao: "labels.consulta" },
            { sisFormularioId: this.sisFormularioId, libRotina: 2, acao: "labels.permissoes" }
        ];
        this.sisSistemaId = "FAT";
        this.nomeForm = "titles.exportarDanfe";
        this.configs = [];
        this.listaForm = [
            { title: 'Permissao', action: 'permissoes', icon: "icon-unlock", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
        ];
    }
    return ExportarDanfeConstants;
}());



/***/ }),

/***/ "./src/app/pages/nfe/exportar-danfe/exportar-danfe.module.ts":
/*!*******************************************************************!*\
  !*** ./src/app/pages/nfe/exportar-danfe/exportar-danfe.module.ts ***!
  \*******************************************************************/
/*! exports provided: ExportarDanfeModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExportarDanfeModule", function() { return ExportarDanfeModule; });
/* harmony import */ var _shared_shared_module__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../shared/shared.module */ "./src/app/shared/shared.module.ts");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _exportar_danfe_routing_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./exportar-danfe.routing.module */ "./src/app/pages/nfe/exportar-danfe/exportar-danfe.routing.module.ts");
/* harmony import */ var _exportar_danfe_form_exportar_danfe_form_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./exportar-danfe-form/exportar-danfe-form.component */ "./src/app/pages/nfe/exportar-danfe/exportar-danfe-form/exportar-danfe-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 ExportarDanfeModule = /** @class */ (function () {
    function ExportarDanfeModule() {
    }
    ExportarDanfeModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
            imports: [_shared_shared_module__WEBPACK_IMPORTED_MODULE_0__["SharedModule"], _exportar_danfe_routing_module__WEBPACK_IMPORTED_MODULE_2__["ExportarDanfeRoutingModule"]],
            declarations: [_exportar_danfe_form_exportar_danfe_form_component__WEBPACK_IMPORTED_MODULE_3__["ExportarDanfeFormComponent"]]
        })
    ], ExportarDanfeModule);
    return ExportarDanfeModule;
}());



/***/ }),

/***/ "./src/app/pages/nfe/exportar-danfe/exportar-danfe.routing.module.ts":
/*!***************************************************************************!*\
  !*** ./src/app/pages/nfe/exportar-danfe/exportar-danfe.routing.module.ts ***!
  \***************************************************************************/
/*! exports provided: ExportarDanfeRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExportarDanfeRoutingModule", function() { return ExportarDanfeRoutingModule; });
/* 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 _exportar_danfe_form_exportar_danfe_form_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./exportar-danfe-form/exportar-danfe-form.component */ "./src/app/pages/nfe/exportar-danfe/exportar-danfe-form/exportar-danfe-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 MRoutes = [
    {
        path: "",
        component: _exportar_danfe_form_exportar_danfe_form_component__WEBPACK_IMPORTED_MODULE_3__["ExportarDanfeFormComponent"],
        data: {
            breadcrumb: "exportarDanfe",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].index }
        }
    }
];
var ExportarDanfeRoutingModule = /** @class */ (function () {
    function ExportarDanfeRoutingModule() {
    }
    ExportarDanfeRoutingModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"].forChild(MRoutes)],
            exports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"]],
        })
    ], ExportarDanfeRoutingModule);
    return ExportarDanfeRoutingModule;
}());



/***/ }),

/***/ "./src/app/pages/nfe/nfe.model.ts":
/*!****************************************!*\
  !*** ./src/app/pages/nfe/nfe.model.ts ***!
  \****************************************/
/*! exports provided: ConNotaDtoOrigemRetorno, NfeOrigemRetorno, NfeFilter, NfeIndexDto, ConsultaNotaPedidoEmbarque, Nfe, LogDePedidos, NfeItem, NfeDadosItem, NfeXmlFilter, NfeXml, Contatos, NfeProtocoloAut, NfeProtocoloCanc */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConNotaDtoOrigemRetorno", function() { return ConNotaDtoOrigemRetorno; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NfeOrigemRetorno", function() { return NfeOrigemRetorno; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NfeFilter", function() { return NfeFilter; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NfeIndexDto", function() { return NfeIndexDto; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConsultaNotaPedidoEmbarque", function() { return ConsultaNotaPedidoEmbarque; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Nfe", function() { return Nfe; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LogDePedidos", function() { return LogDePedidos; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NfeItem", function() { return NfeItem; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NfeDadosItem", function() { return NfeDadosItem; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NfeXmlFilter", function() { return NfeXmlFilter; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NfeXml", function() { return NfeXml; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Contatos", function() { return Contatos; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NfeProtocoloAut", function() { return NfeProtocoloAut; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NfeProtocoloCanc", function() { return NfeProtocoloCanc; });
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! moment */ "./node_modules/moment/moment.js");
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_0__);
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};

var ConNotaDtoOrigemRetorno = /** @class */ (function () {
    function ConNotaDtoOrigemRetorno() {
    }
    return ConNotaDtoOrigemRetorno;
}());

var NfeOrigemRetorno = /** @class */ (function () {
    function NfeOrigemRetorno() {
    }
    return NfeOrigemRetorno;
}());

var NfeFilter = /** @class */ (function () {
    function NfeFilter() {
        this.tipoData = 1;
        this.tipoMov = "T";
        this.tipoNfe = "";
        var firstDay = new Date();
        firstDay.setDate(1);
        this.dataI = firstDay;
        this.dataF = new Date();
        this.destinatarioIdCliente = 0;
        this.loteId = "";
        this.materialId = "";
        this.nota = 0;
        this.notaFiscalId = 0;
        this.autorizacao = 0;
        this.regNota = 0;
    }
    return NfeFilter;
}());

var NfeIndexDto = /** @class */ (function () {
    function NfeIndexDto() {
    }
    return NfeIndexDto;
}());

var ConsultaNotaPedidoEmbarque = /** @class */ (function () {
    function ConsultaNotaPedidoEmbarque() {
    }
    return ConsultaNotaPedidoEmbarque;
}());

var Nfe = /** @class */ (function () {
    function Nfe() {
        this.serieNF = "";
        this.inutilizarMensagem = "";
    }
    return Nfe;
}());

var LogDePedidos = /** @class */ (function () {
    function LogDePedidos() {
    }
    return LogDePedidos;
}());

var NfeItem = /** @class */ (function () {
    function NfeItem() {
    }
    return NfeItem;
}());

var NfeDadosItem = /** @class */ (function () {
    function NfeDadosItem() {
    }
    return NfeDadosItem;
}());

var NfeXmlFilter = /** @class */ (function () {
    function NfeXmlFilter() {
        var firstDay = new Date();
        firstDay.setDate(1);
        this.dataI = moment__WEBPACK_IMPORTED_MODULE_0__().startOf('month').toDate();
        this.dataF = new Date();
        this.gerarComCertificado = "S";
        this.serieNF = "";
        this.notaFiscalIdI = 0;
        this.notaFiscalIdF = 0;
        this.destinatarioIdCliente = 0;
        this.pastaExpXml = "";
        this.criarZip = "N";
        this.tipoArquivo = "";
        this.arquivoZip = "";
        this.nomeArquivo = "";
    }
    return NfeXmlFilter;
}());

var NfeXml = /** @class */ (function () {
    function NfeXml() {
    }
    return NfeXml;
}());

var Contatos = /** @class */ (function () {
    function Contatos() {
    }
    return Contatos;
}());

var NfeProtocoloAut = /** @class */ (function () {
    function NfeProtocoloAut() {
    }
    return NfeProtocoloAut;
}());

var NfeProtocoloCanc = /** @class */ (function () {
    function NfeProtocoloCanc() {
    }
    return NfeProtocoloCanc;
}());



/***/ }),

/***/ "./src/app/pages/nfe/nfe.service.ts":
/*!******************************************!*\
  !*** ./src/app/pages/nfe/nfe.service.ts ***!
  \******************************************/
/*! exports provided: NfeService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NfeService", function() { return NfeService; });
/* 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 _environments_environment__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var _app_error_handler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../app.error-handler */ "./src/app/app.error-handler.ts");
/* harmony import */ var _shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../shared/services/base/base.service */ "./src/app/shared/services/base/base.service.ts");
/* harmony import */ var _nfe_model__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./nfe.model */ "./src/app/pages/nfe/nfe.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 __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 NfeService = /** @class */ (function (_super) {
    __extends(NfeService, _super);
    function NfeService(http) {
        var _this = _super.call(this, http, "nfe") || this;
        _this.http = http;
        _this.filtro = new _nfe_model__WEBPACK_IMPORTED_MODULE_6__["NfeFilter"]();
        _this.data = new _nfe_model__WEBPACK_IMPORTED_MODULE_6__["NfeIndexDto"]();
        return _this;
    }
    NfeService.prototype.statusServico = function () {
        return this.http
            .get(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/nfe/statusServico")
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    NfeService.prototype.emissao = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/nfe/emissao", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    NfeService.prototype.inutilizarNumero = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/nfe/inutilizarNumero", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    NfeService.prototype.cancelar = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/nfe/cancelar", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    NfeService.prototype.ajustarRecibos = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/nfe/ajustarRecibos", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    NfeService.prototype.exportarPdf = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/nfe/exportarPdf", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    NfeService.prototype.exportarXml = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/nfe/exportarXml", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    NfeService.prototype.getById = function (notaFiscalId) {
        return this.http
            .get(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/balanca/notaFiscal/" + notaFiscalId)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    NfeService.prototype.getByFiltro = function (filtro) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/balanca/notaFiscal/GetByFiltro", filtro)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    NfeService.prototype.gravarXml = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/balanca/notaFiscalXml/gravarXml", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    NfeService.prototype.listarXml = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/balanca/notaFiscalXml/listarXml", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    NfeService.prototype.atualizaProtocolo = function (regNota) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/nfe/atualizaProtocolo", { regNota: regNota })
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    NfeService.prototype.gravaDanfe = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/nfe/emissao/gravaDanfe", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    NfeService.prototype.enviaEmailDanfe = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/nfe/emissao/enviaEmailDanfe", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    NfeService.ctorParameters = function () { return [
        { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_0__["HttpClient"] }
    ]; };
    NfeService = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
            providedIn: "root"
        }),
        __metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_0__["HttpClient"]])
    ], NfeService);
    return NfeService;
}(_shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_5__["BaseService"]));



/***/ })

}]);
//# sourceMappingURL=app-pages-nfe-exportar-danfe-exportar-danfe-module.js.map