(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["app-pages-operacao-programacao-navio-programacao-navio-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-confirmacao-chegada/programacao-navio-confirmacao-chegada.component.html":
/*!***********************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-confirmacao-chegada/programacao-navio-confirmacao-chegada.component.html ***!
  \***********************************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"modal fade\" id=\"app-programacao-navio-confirmacao-chegada-filter\" tabindex=\"-1\" role=\"dialog\"\n    data-backdrop=\"static\">\n    <div class=\"modal-dialog others\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h6 class=\"modal-title\">{{ 'titles.confirmacaoChegadaNavio' | translate }}</h6>\n            </div>\n            <form class=\"form\" #form=\"ngForm\" (ngSubmit)=\"onSubmit(form)\">\n                <div id=\"confirmacaoChegadaNavio\">\n                    <app-validacoes></app-validacoes>\n                </div>\n                <div class=\"modal-body\">\n                    <div class=\"row\">\n                        <div class=\"col-lg-12 col-md-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"data\" class=\"required\">{{'labels.data' |\n                                    translate}}</label>\n                                <app-data-h-m id=\"data\" name=\"data\" required=\"true\"\n                                    [(ngModel)]=\"programacaoNavioLiberacaoChegada.dtPrograma\">\n                                </app-data-h-m>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-12 col-md-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"pier\" class=\"required\">{{ 'labels.pier' | translate}}</label>\n                                <app-combo-padrao id=\"pier\" name=\"pier\" tabela=\"Pier\" required=\"true\"\n                                    descricao=\"DescrPier\" chave=\"CodPier\"\n                                    [(ngModel)]=\"programacaoNavioLiberacaoChegada.codPier\">\n                                </app-combo-padrao>\n                            </div>\n                        </div>\n                    </div>\n                </div>\n                <div class=\"modal-footer\">\n                    <button class=\"btn btn-success mr-1\" type=\"submit\"\n                        (click)=\"programacaoNavioLiberacaoChegada.cancela = 'N'\">{{ 'buttons.ok' | translate }}\n                    </button>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{ 'buttons.cancelar' | translate\n                        }}</button>\n                </div>\n            </form>\n        </div>\n    </div>\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-dados-antaq/programacao-navio-dados-antaq.component.html":
/*!*******************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-dados-antaq/programacao-navio-dados-antaq.component.html ***!
  \*******************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"modal fade\" id=\"app-programacao-navio-dados-antaq\" tabindex=\"-1\" role=\"dialog\" data-backdrop=\"static\">\n    <div class=\"modal-dialog\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h6 class=\"modal-title\">{{ 'titles.dadosAntaq' | translate }}</h6>\n            </div>\n            <form class=\"form\" #formDA=\"ngForm\">\n                <div class=\"modal-body\">\n                    <ng-container *ngIf=\"programacaoNavio\">\n                        <app-validacoes [formErrorId]=\"'formDadosAntaq'\" [validacoes]=\"messages\"></app-validacoes>\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=\"mdaTipoNavegacao\">{{ \"labels.tipoNavegacao\" |\n                                        translate}}</label>\n                                    <select id=\"mdaTipoNavegacao\" [(ngModel)]=\"programacaoNavio.tipoNavegacao\"\n                                        class=\"form-control form-control-sm\" name=\"tipoNavegacao\">\n                                        <option *ngFor=\"let item of tiposNavegacao\" [value]=\"item.id\">{{ (\"labels.\" +\n                                            item.descricao) | translate }}</option>\n                                    </select>\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=\"mdaTipoOperacao\" class=\"required\">{{ \"labels.tipoOperacao\" |\n                                        translate}}</label>\n                                    <select id=\"mdaTipoOperacao\" [(ngModel)]=\"programacaoNavio.tipoOperacao\"\n                                        class=\"form-control form-control-sm\" name=\"tipoOperacao\" required>\n                                        <option *ngFor=\"let item of tiposOperacao\" [value]=\"item.id\">{{ (\"labels.\" +\n                                            item.descricao) | translate }}</option>\n                                    </select>\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=\"mdaDtAtraca\" class=\"required\"> {{ 'labels.dtAtraca' | translate }}\n                                    </label>\n                                    <app-data-h-m id=\"mdaDtAtraca\" name=\"dtAtraca\"\n                                        [(ngModel)]=\"programacaoNavio.dtAtraca\" required>\n                                    </app-data-h-m>\n                                </div>\n                            </div>\n                            <div class=\"col-lg-6 col-md-6 col-sm-12\">\n                                <div class=\"form-group form-group-sm\">\n                                    <label for=\"mdaDtDesatraca\" class=\"required\"> {{ 'labels.dtDesatraca' | translate }}\n                                    </label>\n                                    <app-data-h-m id=\"mdaDtDesatraca\" name=\"dtDesatraca\"\n                                        [(ngModel)]=\"programacaoNavio.dtDesatraca\" required\n                                        (executa)=\"validation.dtAtracacaoNaoPodeSerMaiorDtDesatracao(programacaoNavio)\">\n                                    </app-data-h-m>\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=\"mdaInicioOper\" class=\"required\"> {{ 'labels.inicioOper' | translate }}\n                                    </label>\n                                    <app-data-h-m id=\"mdaInicioOper\" name=\"inicioOper\"\n                                        [(ngModel)]=\"programacaoNavio.inicioOper\" required\n                                        (executa)=\"validation.inicioOperNaoPodeSerMenorQueDtAtraca(programacaoNavio)\">\n                                    </app-data-h-m>\n                                </div>\n                            </div>\n                            <div class=\"col-lg-6 col-md-6 col-sm-12\">\n                                <div class=\"form-group form-group-sm\">\n                                    <label for=\"mdaFimOper\" class=\"required\"> {{ 'labels.fimOper' | translate }}\n                                    </label>\n                                    <app-data-h-m id=\"mdaFimOper\" name=\"fimOper\" [(ngModel)]=\"programacaoNavio.fimOper\"\n                                        required\n                                        (executa)=\"validation.fimOperNaoPodeSerMenorQueInicioOper(programacaoNavio)\">\n                                    </app-data-h-m>\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=\"mdaHrTempoEspera\"> {{ 'labels.hrTempoEspera' | translate }}\n                                    </label>\n                                    <input type=\"text\" class=\"form-control-sm form-control\" id=\"mdaHrTempoEspera\"\n                                        name=\"hrTempoEspera\" [mask]=\"'00:00'\" [dropSpecialCharacters]=\"false\"\n                                        [showMaskTyped]=\"true\" [(ngModel)]=\"programacaoNavio.hrTempoEspera\">\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=\"mdaCodOPenPort\">{{'labels.progOpenPort' |\n                                        translate}}</label>\n                                    <input type=\"text\" id=\"mdaCodOPenPort\" name=\"codOPenPort\"\n                                        class=\"form-control form-control-sm\" [(ngModel)]=\"programacaoNavio.codOPenPort\"\n                                        mask=\"999999999\">\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                                    <ng-container *ngIf=\"service.config.operacaoAppa\">\n                                        <label [ngClass]=\"{'required': service.config.camposObrigatorios}\"\n                                            id=\"mdaEscalaNavio\" for=\"escalaNavio\">{{'labels.numeroOperacaoAPPA' |\n                                            translate}}</label>\n                                    </ng-container>\n\n                                    <ng-container *ngIf=\"!service.config.operacaoAppa\">\n                                        <label [class.required]=\"service.config.camposObrigatorios\" id=\"mdaEscalaNavio\"\n                                            for=\"mdaEscalaNavio\">{{'labels.escala' | translate}}</label>\n                                    </ng-container>\n\n                                    <input type=\"text\" id=\"mdaEscalaNavio\" name=\"escalaNavio\"\n                                        class=\"form-control form-control-sm\" maxlength=\"16\"\n                                        [required]=\"service.config.camposObrigatorios\"\n                                        [(ngModel)]=\"programacaoNavio.escalaNavio\" [mask]=\"'000.000.000.000'\">\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=\"mdaViagem\">{{'labels.viagem' | translate}}</label>\n                                    <input type=\"text\" id=\"mdaViagem\" name=\"viagem\" class=\"form-control form-control-sm\"\n                                        maxlength=\"12\" [(ngModel)]=\"programacaoNavio.viagem\">\n                                </div>\n                            </div>\n                        </div>\n                        <div class=\"row\">\n                            <div class=\"col-12\">\n                                <div class=\"form-group form-group-sm\">\n                                    <app-pesquisa-destinatario id=\"mdaAgencia\" name=\"agencia\" tipoDestinatario=\"V\"\n                                        modalTitle=\"pesquisaDeAgencia\" label=\"agencia\"\n                                        [(ngModel)]=\"programacaoNavio.codAgencia\" showInscricao=\"false\"\n                                        showCgcCpf=\"false\" [inSelected]=\"programacaoNavio.agencia\">\n                                    </app-pesquisa-destinatario>\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=\"mdaPier\" class=\"required\">{{ 'labels.pier' |\n                                        translate}}</label>\n                                    <app-combo-padrao id=\"mdaPier\" name=\"pier\" tabela=\"Pier\" descricao=\"DescrPier\"\n                                        chave=\"CodPier\" [(ngModel)]=\"programacaoNavio.codPier\" required>\n                                    </app-combo-padrao>\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=\"mdaHrParadaPorto\"> {{ 'labels.hrParadaPorto' | translate }}\n                                    </label>\n                                    <input type=\"text\" class=\"form-control-sm form-control\" id=\"mdaHrParadaPorto\"\n                                        name=\"hrParadaPorto\" [dropSpecialCharacters]=\"false\" mask=\"00:00\"\n                                        [showMaskTyped]=\"true\" [(ngModel)]=\"programacaoNavio.hrParadaPorto\">\n                                </div>\n                            </div>\n                            <div class=\"col-lg-6 col-md-6 col-sm-12\">\n                                <div class=\"form-group form-group-sm\">\n                                    <label for=\"mdaHrParadaOperador\"> {{ 'labels.hrParadaOperador' | translate}}</label>\n                                    <input type=\"text\" class=\"form-control-sm form-control\" id=\"mdaHrParadaOperador\"\n                                        name=\"hrParadaOperador\" [dropSpecialCharacters]=\"false\" mask=\"00:00\"\n                                        [showMaskTyped]=\"true\" [(ngModel)]=\"service.programacaoNavio.hrParadaOperador\">\n                                </div>\n                            </div>\n                        </div>\n                    </ng-container>\n                </div>\n                <div class=\"modal-footer\">\n                    <button class=\"btn btn-success mr-1\" type=\"button\" (click)=\"onSubmit(formDA)\">{{ 'buttons.salvar' |\n                        translate }}\n                    </button>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Sair</button>\n                </div>\n            </form>\n        </div>\n    </div>\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-dados/programacao-navio-dados.component.html":
/*!*******************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-dados/programacao-navio-dados.component.html ***!
  \*******************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"modal fade\" id=\"app-programacao-navio-dados\" tabindex=\"-1\" role=\"dialog\" data-backdrop=\"static\">\n    <div class=\"modal-dialog modal-sm\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h6 class=\"modal-title\">{{ 'titles.alterarDados' | translate }}</h6>\n            </div>\n            <form class=\"form\" #formAD=\"ngForm\">\n                <div class=\"modal-body\">\n                    <ng-container *ngIf=\"programacaoNavio\">\n                        <app-validacoes [formErrorId]=\"'formAD'\" [validacoes]=\"messages\"></app-validacoes>\n                        <div class=\"row\">\n                            <div class=\"col-lg-12 col-md-12 col-sm-12\">\n                                <div class=\"form-group form-group-sm\">\n                                    <label for=\"previsaoSaida\" [class.required]=\"service.config.obrDtAtrSaida\">\n                                        {{ 'labels.previsaoSaida' | translate }}\n                                    </label>\n                                    <app-data id=\"previsaoSaida\" name=\"previsaoSaida\"\n                                        (executa)=\"validation.dataSaidaMenorDataAtracacao({dtSaida: programacaoNavio.dtSaida, dtAtracacao: programacaoNavio.dtAtracacao})\"\n                                        [required]=\"service.config.obrDtAtrSaida\"\n                                        [(ngModel)]=\"programacaoNavio.dtSaida\">\n                                    </app-data>\n                                </div>\n                            </div>\n                        </div>\n                        <div class=\"row\">\n                            <div class=\"col-lg-12 col-md-12 col-sm-12\">\n                                <div class=\"form-group form-group-sm\">\n                                    <label [class.required]=\"service.config.camposObrigatorios\"\n                                        [for]=\"service.config.operacaoAppa ? 'numeroOperacaoAPPA' : 'escalaNavio'\">\n                                        {{\n                                        service.config.operacaoAppa\n                                        ? ('labels.numeroOperacaoAPPA' | translate)\n                                        : ('labels.escalaNavio' | translate)\n                                        }}\n                                    </label>\n                                    <ng-container *ngIf=\"service.config.operacaoAppa; else escalaNavio\">\n                                        <input type=\"text\" id=\"numeroOperacaoAPPA\" name=\"numeroOperacaoAPPA\"\n                                            class=\"form-control form-control-sm\" maxlength=\"16\"\n                                            [required]=\"service.config.camposObrigatorios\"\n                                            [(ngModel)]=\"programacaoNavio.escalaNavio\" maskFormat=\"000.999.999.999\">\n                                    </ng-container>\n                                    <ng-template #escalaNavio>\n                                        <input type=\"text\" id=\"escalaNavio\" name=\"escalaNavio\"\n                                            class=\"form-control form-control-sm\" maxlength=\"16\"\n                                            [required]=\"service.config.camposObrigatorios\"\n                                            [(ngModel)]=\"programacaoNavio.escalaNavio\" maskFormat=\"000.999.999.999\">\n                                    </ng-template>\n                                </div>\n                            </div>\n                        </div>\n                        <div class=\"row\">\n                            <div class=\"col-lg-12 col-md-12 col-sm-12\">\n                                <div class=\"form-group form-group-sm\">\n                                    <label [ngClass]=\"{'required':service.config.camposObrigatorios}\"\n                                        for=\"regViagem\">{{'labels.viagem' | translate}}</label>\n                                    <select class=\"form-control form-control-sm\"\n                                        [required]=\"service.config.camposObrigatorios\" id=\"regViagem\" name=\"regViagem\"\n                                        [(ngModel)]=\"programacaoNavio.regViagem\">\n                                        <option value=\"0\">{{ 'labels.selecione' | translate }}\n                                        </option>\n                                        <option value=\"{{ item.viagemNavioId }}\" *ngFor=\"let item of regViagemList\">{{\n                                            item.numViagem\n                                            }}\n                                            - {{ item.dtAtracacao | date: 'dd/MM/yyyy HH:mm' }}\n                                        </option>\n                                    </select>\n                                </div>\n                            </div>\n                        </div>\n                    </ng-container>\n                </div>\n                <div class=\"modal-footer\">\n                    <button class=\"btn btn-success mr-1\" type=\"button\" (click)=\"onSubmit(formAD)\">{{ 'buttons.salvar' |\n                        translate }}\n                    </button>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Sair</button>\n                </div>\n            </form>\n        </div>\n    </div>\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-export/programacao-navio-export.component.html":
/*!*********************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-export/programacao-navio-export.component.html ***!
  \*********************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"modal fade\" id=\"app-programacao-navio-export\" tabindex=\"-1\" role=\"dialog\" data-backdrop=\"static\">\n    <div class=\"modal-dialog\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h6 class=\"modal-title\">{{ 'titles.programacaoNavio' | translate }}</h6>\n            </div>\n            <form class=\"form\" #form=\"ngForm\">\n                <div class=\"modal-body\">\n                    <div class=\"row\">\n                        <div class=\"col-md-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"tipoImpressao\" class=\"required\">{{'labels.tipoImpressao' |\n                                    translate}}</label>\n                                <select id=\"tipoImpressao\" name=\"tipoImpressao\" required\n                                    class=\"form-control form-control-sm\" [(ngModel)]=\"exportOption\">\n                                    <option value=\"\">{{ 'labels.selecione' | translate}}</option>\n                                    <option *ngFor=\"let option of exportOptions\" [value]=\"option.value\">{{ option.label\n                                        | translate}}</option>\n                                </select>\n                            </div>\n                        </div>\n                    </div>\n                </div>\n                <div class=\"modal-footer\">\n                    <button class=\"btn btn-success mr-1\" (click)=\"onSubmit(form)\">{{ 'buttons.gerar' | translate }}\n                    </button>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Sair</button>\n                </div>\n            </form>\n        </div>\n    </div>\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-filter/programacao-navio-filter.component.html":
/*!*********************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-filter/programacao-navio-filter.component.html ***!
  \*********************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"modal fade\" id=\"app-programacao-navio-filter\" tabindex=\"-1\" role=\"dialog\" data-backdrop=\"static\">\n    <div class=\"uni-modal-dialog-md-45\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h6 class=\"modal-title\">{{ 'titles.programacaoNavio' | translate }}</h6>\n            </div>\n            <form class=\"form\" #form=\"ngForm\" (ngSubmit)=\"onSubmit(form)\">\n                <div class=\"modal-body\">\n                    <div class=\"row\">\n                        <div class=\"col-lg-6 col-md-6\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"de\" class=\"required\">{{'labels.periodoDe' |\n                                    translate}}</label>\n                                <app-data id=\"de\" name=\"de\" required=\"true\" [(ngModel)]=\"service.filter.dataI\"\n                                    [ngStyle]=\"{'width':'100%'}\"></app-data>\n                            </div>\n                        </div>\n                        <div class=\"col-lg-6 col-md-6\">\n                            <div class=\"form-group form-group-sm\">\n                                <label for=\"ate\" class=\"required\">{{'labels.periodoAte' |\n                                    translate}}</label>\n                                <app-data id=\"ate\" name=\"ate\" required=\"true\" [(ngModel)]=\"service.filter.dataF\"\n                                    [ngStyle]=\"{'width':'100%'}\"></app-data>\n                            </div>\n                        </div>\n                    </div>\n                    <div class=\"row\">\n                        <div class=\"col-lg-12 col-md-12\">\n                            <div class=\"form-group form-group-sm\">\n                                <app-pesquisa-destinatario id=\"navio\" name=\"navio\" label=\"navio\" modalTitle=\"navio\"\n                                    [(ngModel)]=\"service.filter.destinatarioIdNavio\" tipoDestinatario=\"N\"\n                                    showCgcCpf=\"false\" showInscricao=\"false\" [inSelected]=\"service.filter.navio\"\n                                    (outModel)=\"trataNavio($event)\">\n                                </app-pesquisa-destinatario>\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=\"situacao\">{{ 'labels.situacao' | translate}}</label>\n                                <app-combo-padrao id=\"situacao\" name=\"situacao\" tabela=\"SituacaoNavio\"\n                                    descricao=\"DescrSitNavio\" chave=\"CodSitNavio\" [(ngModel)]=\"service.filter.situacao\">\n                                </app-combo-padrao>\n                            </div>\n                        </div>\n                    </div>\n                </div>\n                <div class=\"modal-footer\">\n                    <button class=\"btn btn-success mr-1\" type=\"submit\">{{ 'buttons.pesquisar' | translate }}\n                    </button>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Sair</button>\n                </div>\n            </form>\n        </div>\n    </div>\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-form/programacao-navio-form.component.html":
/*!*****************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-form/programacao-navio-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\"\n    [itemData]=\"service.programacaoNavio.programacaoNavioId\" [sisFormularioId]=\"constantes.sisFormularioId\">\n</app-menu-command-bar>\n\n<div class=\"row\">\n    <div class=\"col-lg-12\">\n        <div class=\"section-comand-bar\">\n            <div class=\"tab-content top\">\n                <!-- ABAS -->\n                <div class=\"tab-pane active show\">\n                    <div class=\"clearfix\">\n                        <ul class=\"nav nav-tabs\" id=\"tab\">\n                            <li class=\"nav-item\">\n                                <a class=\"nav-link active show\" data-toggle=\"tab\" href=\"#dados\">{{\"labels.dados\" |\n                                    translate}}</a>\n                            </li>\n                            <li class=\"nav-item\">\n                                <a class=\"nav-link\" data-toggle=\"tab\" href=\"#itens\">{{\"labels.itens\" | translate}}</a>\n                            </li>\n                            <li class=\"nav-item\" *ngIf=\"service.config.outrasOperProg\">\n                                <a class=\"nav-link\" data-toggle=\"tab\"\n                                    href=\"#outras_operacoes\">{{\"labels.outrasOperacoes\" | translate}}</a>\n                            </li>\n                            <li class=\"nav-item\">\n                                <a class=\"nav-link\" data-toggle=\"tab\" href=\"#status\">{{\"labels.status\" | translate}}</a>\n                            </li>\n                        </ul>\n                    </div>\n                    <div class=\"tab-content top\">\n                        <div class=\"tab-pane active show\" role=\"tabpanel\" id=\"dados\">\n                            <!-- ABAS -->\n                            <div class=\"clearfix\">\n                                <ul class=\"nav nav-tabs \">\n                                    <li class=\"nav-item\">\n                                        <a class=\"nav-link active show\" data-toggle=\"tab\"\n                                            href=\"#gerais\">{{\"labels.gerais\" | translate}}</a>\n                                    </li>\n                                    <li class=\"nav-item\">\n                                        <a class=\"nav-link\" data-toggle=\"tab\" href=\"#observacoes\">{{\"labels.observacoes\"\n                                            | translate}}</a>\n                                    </li>\n                                    <li class=\"nav-item\" *ngIf=\"service.config.dadosAntaq\">\n                                        <a class=\"nav-link\" data-toggle=\"tab\" href=\"#antaq\">{{\"labels.antaq\" |\n                                            translate}}</a>\n                                    </li>\n                                </ul>\n                            </div>\n                            <form class=\"form\" #f=\"ngForm\" (ngSubmit)=\"onSubmit(f)\" autocomplete=\"off\">\n                                <app-validacoes *ngIf=\"showButton\"></app-validacoes>\n                                <div class=\"tab-content top\">\n                                    <!-- begin gerais -->\n                                    <div class=\"tab-pane active show\" id=\"gerais\">\n                                        <div class=\"row\">\n                                            <div class=\"col-lg-6\">\n                                                <div class=\"row\">\n                                                    <div class=\"col-lg-6 col-md-12\">\n                                                        <div class=\"form-group form-group-sm\">\n                                                            <label for=\"programacaoNavioId\">{{'labels.numero' |\n                                                                translate}}</label>\n                                                            <input type=\"text\" id=\"programacaoNavioId\"\n                                                                name=\"programacaoNavioId\"\n                                                                class=\"form-control form-control-sm\"\n                                                                [(ngModel)]=\"service.programacaoNavio.programacaoNavioId\"\n                                                                disabled>\n                                                        </div>\n                                                    </div>\n                                                    <div class=\"col-lg-6 col-md-12\">\n                                                        <div class=\"form-group form-group-sm\">\n                                                            <label [class.required]=\"service.config.camposObrigatorios || service.config.obrigaNavioEmbar\"\n                                                                [for]=\"service.config.operacaoAppa ? 'numeroOperacaoAPPA' : 'escalaNavio'\">\n                                                                {{\n                                                                service.config.operacaoAppa\n                                                                ? ('labels.numeroOperacaoAPPA' | translate)\n                                                                : ('labels.escalaNavio' | translate)\n                                                                }}\n                                                            </label>\n                                                            <ng-container *ngIf=\"service.config.operacaoAppa; else escalaNavio\">\n                                                                <input \n                                                                    type=\"text\"\n                                                                    id=\"numeroOperacaoAPPA\"\n                                                                    name=\"numeroOperacaoAPPA\"\n                                                                    class=\"form-control form-control-sm\" maxlength=\"16\"\n                                                                    [required]=\"service.config.camposObrigatorios || service.config.obrigaNavioEmbar\"\n                                                                    [(ngModel)]=\"service.programacaoNavio.escalaNavio\"\n                                                                    maskFormat=\"000.999.999.999\"\n                                                                    [disabled]=\"funcoesService.isDetail(actionForm) || (!service.sitNaoPermitidos.includes(+service.programacaoNavio.codSitNavio) && !service.config.dadosAntaq) ? true: false\">\n                                                            </ng-container>   \n                                                            <ng-template #escalaNavio>                                                            \n                                                                <input \n                                                                    type=\"text\"\n                                                                    id=\"escalaNavio\"\n                                                                    name=\"escalaNavio\"\n                                                                    class=\"form-control form-control-sm\" maxlength=\"16\"\n                                                                    [required]=\"service.config.camposObrigatorios || service.config.obrigaNavioEmbar\"\n                                                                    [(ngModel)]=\"service.programacaoNavio.escalaNavio\"\n                                                                    maskFormat=\"000.999.999.999\"\n                                                                    [disabled]=\"funcoesService.isDetail(actionForm) || (!service.sitNaoPermitidos.includes(+service.programacaoNavio.codSitNavio) && !service.config.dadosAntaq) ? true: false\">\n                                                            </ng-template> \n                                                        </div>\n                                                    </div>\n                                                </div>\n                                                <div class=\"row\">\n                                                    <div class=\"col-lg-12\">\n                                                        <div class=\"form-group form-group-sm\">\n                                                            <app-pesquisa-destinatario id=\"navio\" name=\"navio\"\n                                                                label=\"navio\" [required]=\"service.config.obrigaNavioEmbar\"\n                                                                modalTitle=\"pesquisaDeNavio\"\n                                                                [(ngModel)]=\"service.programacaoNavio.destinatarioIdNavio\"\n                                                                tipoDestinatario=\"N\" showCgcCpf=\"false\"\n                                                                showInscricao=\"false\"\n                                                                [inSelected]=\"service.programacaoNavio?.navio\"\n                                                                [disabled]=\"funcoesService.isDetail(actionForm)? true: false\"\n                                                                (outModel)=\"outputNavio($event)\">\n                                                            </app-pesquisa-destinatario>\n                                                        </div>\n                                                    </div>\n                                                </div>\n                                                <div class=\"row\">\n                                                    <div class=\"col-lg-6 col-md-6\">\n                                                        <div class=\"form-group form-group-sm\">\n                                                            <label\n                                                                [ngClass]=\"{'required':service.config.camposObrigatorios || service.config.obrigaNavioEmbar}\"\n                                                                for=\"regViagem\">{{'labels.viagem' | translate}}</label>\n                                                            <select class=\"form-control form-control-sm\"\n                                                                [disabled]=\"funcoesService.isDetail(actionForm) || (!service.sitNaoPermitidos.includes(+service.programacaoNavio.codSitNavio) && !service.config.dadosAntaq)? true: false\"\n                                                                [required]=\"service.config.camposObrigatorios || service.config.obrigaNavioEmbar\"\n                                                                id=\"regViagem\" name=\"regViagem\"\n                                                                (change)=\"changeRegViagem($event)\"\n                                                                [(ngModel)]=\"service.programacaoNavio.regViagem\">\n                                                                <option value=\"0\">{{ 'labels.selecione' | translate }}\n                                                                </option>\n                                                                <option value=\"{{ item.viagemNavioId }}\"\n                                                                    *ngFor=\"let item of regViagemList\">{{ item.numViagem\n                                                                    }}\n                                                                    - {{ item.dtAtracacao | date: 'dd/MM/yyyy HH:mm' }}\n                                                                </option>\n                                                            </select>\n                                                        </div>\n                                                    </div>\n                                                    <div class=\"col-lg-6 col-md-6\">\n                                                        <div class=\"form-group form-group-sm\">\n                                                            <label for=\"viagem\">&nbsp;</label>\n                                                            <input type=\"text\" id=\"viagem\" name=\"viagem\"\n                                                                class=\"form-control form-control-sm\" maxlength=\"12\"\n                                                                [required]=\"service.config.camposObrigatorios || service.config.obrigaNavioEmbar\"\n                                                                [(ngModel)]=\"service.programacaoNavio.viagem\"\n                                                                [disabled]=\"funcoesService.isDetail(actionForm) || viagemDisabled || (!service.sitNaoPermitidos.includes(+service.programacaoNavio.codSitNavio) && !service.config.dadosAntaq)? true: false\">\n                                                        </div>\n                                                    </div>\n                                                </div>\n                                                <div class=\"row\">\n                                                    <div class=\"col-lg-12\">\n                                                        <div class=\"form-group form-group-sm\">\n                                                            <app-pesquisa-destinatario id=\"agencia\" name=\"agencia\"\n                                                                modalTitle=\"pesquisaDeAgencia\"\n                                                                label=\"agencia\"\n                                                                [(ngModel)]=\"service.programacaoNavio.codAgencia\"\n                                                                showInscricao=\"false\"\n                                                                [required]=\"service.config.camposObrigatorios\"\n                                                                showCgcCpf=\"false\"\n                                                                [inSelected]=\"service.programacaoNavio.agencia\"\n                                                                (outModel)=\"outputAgencia($event)\"\n                                                                [disabled]=\"funcoesService.isDetail(actionForm) || (!service.sitNaoPermitidos.includes(+service.programacaoNavio.codSitNavio) && !service.config.dadosAntaq)? true: false\">\n                                                            </app-pesquisa-destinatario>\n                                                        </div>\n                                                    </div>\n                                                </div>\n                                                <div class=\"row\">\n                                                    <div class=\"col-lg-8\">\n                                                        <div class=\"form-group form-group-sm\">\n                                                            <label\n                                                                [ngClass]=\"{'required':service.config.camposObrigatorios}\"\n                                                                for=\"contato\">{{'labels.contato' | translate}}</label>\n                                                            <input type=\"text\" id=\"contato\" name=\"contato\"\n                                                                class=\"form-control form-control-sm\" maxlength=\"30\"\n                                                                [required]=\"service.config.camposObrigatorios\"\n                                                                [(ngModel)]=\"service.programacaoNavio.contato\"\n                                                                [disabled]=\"funcoesService.isDetail(actionForm) ? true: false\">\n                                                        </div>\n                                                    </div>\n                                                    <div class=\"col-lg-4\">\n                                                        <div class=\"form-group form-group-sm\">\n                                                            <label for=\"telefone\"> {{ 'labels.telefone' | translate }}\n                                                            </label>\n                                                            <input id=\"telefone\" name=\"telefone\" maxlength=\"18\"\n                                                                value=\"{{ service.programacaoNavio?.agencia?.ddd }} {{ service.programacaoNavio?.agencia?.telefone1 }}\"\n                                                                class=\"form-control form-control-sm\" type=\"text\"\n                                                                disabled />\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=\"pier\" class=\"required\">{{ 'labels.pier' |\n                                                                translate}}</label>\n                                                            <app-combo-padrao id=\"pier\" name=\"pier\" tabela=\"Pier\"\n                                                                descricao=\"DescrPier\" chave=\"CodPier\"\n                                                                [(ngModel)]=\"service.programacaoNavio.codPier\"\n                                                                [disabled]=\"funcoesService.isDetail(actionForm) || (!service.sitNaoPermitidos.includes(+service.programacaoNavio.codSitNavio) && !service.config.dadosAntaq)? true: false\"\n                                                                required=\"true\">\n                                                            </app-combo-padrao>\n                                                        </div>\n                                                    </div>\n                                                </div>\n                                                <div class=\"row\">\n                                                    <div class=\"col-lg-12\">\n                                                        <div class=\"form-group form-group-sm\">\n                                                            <app-pesquisa-destinatario id=\"operador\" name=\"operador\"\n                                                                modalTitle=\"operador\" label=\"operadorPortuario\"\n                                                                [(ngModel)]=\"service.programacaoNavio.codOperPortuario\"\n                                                                showInscricao=\"false\" showCgcCpf=\"false\"\n                                                                [inSelected]=\"service.programacaoNavio.operador\"\n                                                                (outModel)=\"outputOperador($event)\"\n                                                                [disabled]=\"funcoesService.isDetail(actionForm) ? true: false\">\n                                                            </app-pesquisa-destinatario>\n                                                        </div>\n                                                    </div>\n                                                </div>\n                                                <div class=\"row\">\n                                                    <div class=\"col-lg-12\">\n                                                        <div class=\"form-group form-group-sm\">\n                                                            <label for=\"observ\">{{'labels.observacoes' |\n                                                                translate}}</label>\n                                                            <input type=\"text\" id=\"observ\" name=\"observ\"\n                                                                class=\"form-control form-control-sm\" maxlength=\"70\"\n                                                                [(ngModel)]=\"service.programacaoNavio.observ\"\n                                                                [disabled]=\"funcoesService.isDetail(actionForm) ? true: false\">\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=\"codOPenPort\">{{'labels.progOpenPort' |\n                                                                translate}}</label>\n                                                            <input type=\"text\" id=\"codOPenPort\" name=\"codOPenPort\"\n                                                                class=\"form-control form-control-sm\"\n                                                                [(ngModel)]=\"service.programacaoNavio.codOPenPort\"\n                                                                mask=\"999999999\"\n                                                                [disabled]=\"funcoesService.isDetail(actionForm) ? true: false\">\n                                                        </div>\n                                                    </div>\n                                                </div>\n\n                                            </div>\n                                            <div class=\"col-lg-4\">\n                                                <app-card-container tituloCard=\"previsao\">\n                                                    <div class=\"row\">\n                                                        <div class=\"col-lg-12 col-md-12 col-sm-12\">\n                                                            <div class=\"form-group form-group-sm\">\n                                                                <label for=\"previsaoChegada\" class=\"required\"> {{\n                                                                    'labels.chegada' | translate }}\n                                                                </label>\n                                                                <app-data-h-m id=\"previsaoChegada\"\n                                                                    name=\"previsaoChegada\" required=\"true\"\n                                                                    (executa)=\"validateDtPrograma()\"\n                                                                    [disabled]=\"funcoesService.isDetail(actionForm) ? true: false\"\n                                                                    [(ngModel)]=\"service.programacaoNavio.dtPrograma\">\n                                                                </app-data-h-m>\n                                                            </div>\n                                                        </div>\n                                                    </div>\n                                                    <div class=\"row\">\n                                                        <div class=\"col-lg-12 col-md-12 col-sm-12\">\n                                                            <div class=\"form-group form-group-sm\">\n                                                                <label for=\"previsaoAtracacao\"\n                                                                    [class.required]=\"service.config.obrDtAtrSaida\"> {{\n                                                                    'labels.atracao' | translate }}\n                                                                </label>\n                                                                <app-data id=\"previsaoAtracacao\"\n                                                                    name=\"previsaoAtracacao\"\n                                                                    (executa)=\"validateDtAtracacao()\"\n                                                                    [formatDateTime]=\"mascara.getFormatData\"\n                                                                    [required]=\"service.config.obrDtAtrSaida\"\n                                                                    [disabled]=\"funcoesService.isDetail(actionForm) ? true: false\"\n                                                                    [(ngModel)]=\"service.programacaoNavio.dtAtracacao\"\n                                                                    [ngStyle]=\"{'width':'100%'}\"></app-data>\n                                                            </div>\n                                                        </div>\n                                                    </div>\n                                                    <div class=\"row\">\n                                                        <div class=\"col-lg-12 col-md-12 col-sm-12\">\n                                                            <div class=\"form-group form-group-sm\">\n                                                                <label for=\"previsaoSaida\"\n                                                                    [class.required]=\"service.config.obrDtAtrSaida\">\n                                                                    {{ 'labels.saida' | translate }}\n                                                                </label>\n                                                                <app-data id=\"previsaoSaida\" name=\"previsaoSaida\"\n                                                                    (executa)=\"validation.dataSaidaMenorDataAtracacao({dtSaida: service.programacaoNavio.dtSaida, dtAtracacao: service.programacaoNavio.dtAtracacao})\"\n                                                                    [formatDateTime]=\"mascara.getFormatData\"\n                                                                    [required]=\"service.config.obrDtAtrSaida\"\n                                                                    [disabled]=\"funcoesService.isDetail(actionForm) || (service.programacaoNavio.codSitNavio !== 1 && service.programacaoNavio.codSitNavio !== 5 && service.programacaoNavio.codSitNavio !== 7 && (permissionAlteraDados === false))? true: false\"\n                                                                    [(ngModel)]=\"service.programacaoNavio.dtSaida\"\n                                                                    [ngStyle]=\"{'width':'100%'}\">\n                                                                </app-data>\n                                                            </div>\n                                                        </div>\n                                                    </div>\n                                                </app-card-container>\n                                                <app-card-container tituloCard=\"calado\">\n                                                    <div class=\"row\">\n                                                        <div class=\"col-lg-12 col-md-12 col-sm-12\">\n                                                            <div class=\"form-group form-group-sm\">\n                                                                <label for=\"caladoChegada\"> {{ 'labels.chegada' |\n                                                                    translate\n                                                                    }}\n                                                                </label>\n                                                                <input type=\"text\" id=\"caladoChegada\"\n                                                                    name=\"caladoChegada\"\n                                                                    class=\"form-control form-control-sm\"\n                                                                    (blur)=\"validateCaladoChegada()\" maxlength=\"5\"\n                                                                    [(ngModel)]=\"service.programacaoNavio.caladoChegada\"\n                                                                    currencyMask\n                                                                    [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 1 }\"\n                                                                    [disabled]=\"funcoesService.isDetail(actionForm)? true: false\">\n                                                            </div>\n                                                        </div>\n                                                    </div>\n                                                    <div class=\"row\">\n                                                        <div class=\"col-lg-12 col-md-12 col-sm-12\">\n                                                            <div class=\"form-group form-group-sm\">\n                                                                <label for=\"caladoSaida\"> {{ 'labels.saida' | translate\n                                                                    }}\n                                                                </label>\n                                                                <input type=\"text\" id=\"caladoSaida\" name=\"caladoSaida\"\n                                                                    class=\"form-control form-control-sm\" maxlength=\"5\"\n                                                                    [(ngModel)]=\"service.programacaoNavio.caladoSaida\"\n                                                                    (blur)=\"validateCaladoSaida()\" currencyMask\n                                                                    [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 1 }\"\n                                                                    [disabled]=\"funcoesService.isDetail(actionForm) ? true: false\">\n                                                            </div>\n                                                        </div>\n                                                    </div>\n                                                </app-card-container>\n                                            </div>\n                                            <div class=\"row\">\n                                                <div class=\"col-lg-12\">\n                                                    <span *ngIf=\"service.programacaoNavio.sisCampoAdds\">\n                                                        <div *ngFor=\"let d of service.programacaoNavio.sisCampoAdds\"\n                                                            [class.col-lg-6]=\"!d.colunas\">\n                                                            <app-campos-adicionais name=\"{{d.campo}}\" [sisCampoAdd]=\"d\"\n                                                                [(ngModel)]=\"d.valorCampo\"\n                                                                [disabled]=\"funcoesService.isDetail(actionForm)\"\n                                                                [required]=\"d.obrigatorio === 'S'\">\n                                                            </app-campos-adicionais>\n                                                        </div>\n                                                    </span>\n                                                </div>\n                                            </div>\n                                        </div>\n                                    </div>\n                                    <!-- end gerais -->\n\n                                    <div class=\"tab-pane\" id=\"observacoes\">\n                                        <app-programacao-navio-observacoes *ngIf=\"showComponents\" [item]=\"item\"\n                                            [isDetail]=\"funcoesService.isDetail(actionForm)\">\n                                        </app-programacao-navio-observacoes>\n                                    </div>\n                                    <div class=\"tab-pane\" id=\"antaq\" *ngIf=\"service.config.dadosAntaq\">\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=\"tipoNavegacao\">{{ \"labels.tipoNavegacao\" |\n                                                        translate}}</label>\n                                                    <select id=\"tipoNavegacao\"\n                                                        [(ngModel)]=\"service.programacaoNavio.tipoNavegacao\"\n                                                        class=\"form-control form-control-sm\" name=\"tipoNavegacao\"\n                                                        [disabled]=\"funcoesService.isDetail(actionForm)\">\n                                                        <option *ngFor=\"let item of tiposNavegacao\" [value]=\"item.id\">{{\n                                                            (\"labels.\" +\n                                                            item.descricao) | translate }}</option>\n                                                    </select>\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=\"tipoOperacao\">{{ \"labels.tipoOperacao\" |\n                                                        translate}}</label>\n                                                    <select id=\"tipoOperacao\"\n                                                        [(ngModel)]=\"service.programacaoNavio.tipoOperacao\"\n                                                        class=\"form-control form-control-sm\" name=\"tipoOperacao\"\n                                                        [disabled]=\"funcoesService.isDetail(actionForm)\">\n                                                        <option *ngFor=\"let item of tiposOperacao\" [value]=\"item.id\">{{\n                                                            (\"labels.\" +\n                                                            item.descricao) | translate }}</option>\n                                                    </select>\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=\"dtAtraca\"> {{ 'labels.dtAtraca' | translate }}\n                                                    </label>\n                                                    <app-data id=\"dtAtraca\" name=\"dtAtraca\"\n                                                        [disabled]=\"funcoesService.isDetail(actionForm)\"\n                                                        [(ngModel)]=\"service.programacaoNavio.dtAtraca\"\n                                                        [formatDateTime]=\"mascara.getFormatDataHorMin\"\n                                                        [ngStyle]=\"{'width':'100%'}\"></app-data>\n                                                </div>\n                                            </div>\n                                            <div class=\"col-lg-6 col-md-6 col-sm-12\">\n                                                <div class=\"form-group form-group-sm\">\n                                                    <label for=\"dtDesatraca\"> {{ 'labels.dtDesatraca' | translate }}\n                                                    </label>\n                                                    <app-data id=\"dtDesatraca\" name=\"dtDesatraca\"\n                                                        [disabled]=\"funcoesService.isDetail(actionForm)\"\n                                                        [formatDateTime]=\"mascara.getFormatDataHorMin\"\n                                                        [(ngModel)]=\"service.programacaoNavio.dtDesatraca\"\n                                                        [ngStyle]=\"{'width':'100%'}\">\n                                                    </app-data>\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=\"inicioOper\"> {{ 'labels.inicioOper' | translate }}\n                                                    </label>\n                                                    <app-data id=\"inicioOper\" name=\"inicioOper\"\n                                                        [disabled]=\"funcoesService.isDetail(actionForm)\"\n                                                        [formatDateTime]=\"mascara.getFormatDataHorMin\"\n                                                        [(ngModel)]=\"service.programacaoNavio.inicioOper\"\n                                                        [ngStyle]=\"{'width':'100%'}\">\n                                                    </app-data>\n                                                </div>\n                                            </div>\n                                            <div class=\"col-lg-6 col-md-6 col-sm-12\">\n                                                <div class=\"form-group form-group-sm\">\n                                                    <label for=\"fimOper\"> {{ 'labels.fimOper' | translate }}\n                                                    </label>\n                                                    <app-data id=\"fimOper\" name=\"fimOper\"\n                                                        [disabled]=\"funcoesService.isDetail(actionForm)\"\n                                                        [formatDateTime]=\"mascara.getFormatDataHorMin\"\n                                                        [(ngModel)]=\"service.programacaoNavio.fimOper\"\n                                                        [ngStyle]=\"{'width':'100%'}\">\n                                                    </app-data>\n                                                </div>\n                                            </div>\n                                        </div>\n                                        <div class=\"row\">\n                                            <div class=\"col-lg-4 col-md-4 col-sm-6\">\n                                                <div class=\"form-group form-group-sm\">\n                                                    <label for=\"hrTempoEspera\"> {{ 'labels.hrTempoEspera' | translate }}\n                                                    </label>\n                                                    <input type=\"text\" class=\"form-control-sm form-control\"\n                                                        id=\"hrTempoEspera\" (blur)=\"validateTempo('hrTempoEspera')\"\n                                                        name=\"hrTempoEspera\"\n                                                        [disabled]=\"funcoesService.isDetail(actionForm)\"\n                                                        [dropSpecialCharacters]=\"false\" mask=\"00:00\"\n                                                        [showMaskTyped]=\"true\"\n                                                        [(ngModel)]=\"service.programacaoNavio.hrTempoEspera\">\n                                                </div>\n                                            </div>\n                                        </div>\n                                        <div class=\"row\">\n                                            <div class=\"col-lg-4 col-md-4 col-sm-6\">\n                                                <div class=\"form-group form-group-sm\">\n                                                    <label for=\"hrParadaPorto\"> {{ 'labels.hrParadaPorto' | translate }}\n                                                    </label>\n                                                    <input type=\"text\" class=\"form-control-sm form-control\"\n                                                        id=\"hrParadaPorto\" name=\"hrParadaPorto\"\n                                                        (blur)=\"validateTempo('hrParadaPorto')\"\n                                                        [disabled]=\"funcoesService.isDetail(actionForm)\"\n                                                        [dropSpecialCharacters]=\"false\" mask=\"00:00\"\n                                                        [showMaskTyped]=\"true\"\n                                                        [(ngModel)]=\"service.programacaoNavio.hrParadaPorto\">\n                                                </div>\n                                            </div>\n                                        </div>\n                                        <div class=\"row\">\n                                            <div class=\"col-lg-4 col-md-4 col-sm-6\">\n                                                <div class=\"form-group form-group-sm\">\n                                                    <label for=\"hrParadaOperador\"> {{ 'labels.hrParadaOperador' |\n                                                        translate\n                                                        }}\n                                                    </label>\n                                                    <input type=\"text\" class=\"form-control-sm form-control\"\n                                                        id=\"hrParadaOperador\" name=\"hrParadaOperador\"\n                                                        (blur)=\"validateTempo('hrParadaOperador')\"\n                                                        [disabled]=\"funcoesService.isDetail(actionForm)\"\n                                                        [dropSpecialCharacters]=\"false\" mask=\"00:00\"\n                                                        [showMaskTyped]=\"true\"\n                                                        [(ngModel)]=\"service.programacaoNavio.hrParadaOperador\">\n                                                </div>\n                                            </div>\n                                        </div>\n                                    </div>\n                                    <div class=\"row\" *ngIf=\"showButton\">\n                                        <div class=\"col-12\">\n                                            <div class=\"form-group form-group-sm\">\n                                                <button class=\"btn btn-success mr-2\" type=\"submit\"\n                                                    [disabled]=\"funcoesService.isDetail(actionForm)\">\n                                                    {{ 'buttons.salvar' | translate }}\n                                                </button>\n                                                <button class=\"btn btn-success mr-2\" (click)=\"saveAndCreate(f)\"\n                                                    type=\"button\" [disabled]=\"funcoesService.isDetail(actionForm)\">{{\n                                                    'buttons.salvarNovo' | translate }}</button>\n                                            </div>\n                                        </div>\n                                    </div>\n                                </div>\n                            </form>\n                        </div>\n                        <div class=\"tab-pane\" role=\"tabpanel\" id=\"itens\">\n                            <app-programacao-navio-item-itens *ngIf=\"showComponents\"\n                                [isDetail]=\"funcoesService.isDetail(actionForm)\" (selectedItem)=\"selectedItem($event)\"\n                                (response)=\"updateShowButtom($event)\">\n                            </app-programacao-navio-item-itens>\n                        </div>\n                        <div class=\"tab-pane\" role=\"tabpanel\" id=\"outras_operacoes\"\n                            *ngIf=\"service.config.outrasOperProg\">\n                            <app-programacao-navio-outras-operacoes *ngIf=\"showComponents\"\n                                [isDetail]=\"funcoesService.isDetail(actionForm)\" (response)=\"updateShowButtom($event)\">\n                            </app-programacao-navio-outras-operacoes>\n                        </div>\n                        <div class=\"tab-pane\" role=\"tabpanel\" id=\"status\">\n                            <app-programacao-navio-status *ngIf=\"showComponents\"\n                                [isDetail]=\"funcoesService.isDetail(actionForm)\"></app-programacao-navio-status>\n                        </div>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n</div>\n\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-index/programacao-navio-index.component.html":
/*!*******************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-index/programacao-navio-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\" [formAction]=\"actionForm\" [itemData]=\"data.regPrograma\"\n    [sisFormularioId]=\"constantes.sisFormularioId\">\n</app-menu-command-bar>\n\n<div class=\"section-comand-bar\">\n    <table id=\"dtProgramacaoNavio\" class=\"table table-striped table-bordered table-hover nowrap table-sm\"></table>\n</div>\n\n<app-propriedades></app-propriedades>\n\n<app-programacao-navio-filter (filtrar)=\"executaFiltro()\"></app-programacao-navio-filter>\n<app-programacao-navio-confirmacao-chegada [programacaoNavioLiberacaoChegada]=\"programacaoNavioLiberacaoChegada\"\n    (filtrar)=\"executaConfirmacaoChegada($event)\"></app-programacao-navio-confirmacao-chegada>\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>\n<app-programacao-navio-export (filtrar)=\"export($event)\"></app-programacao-navio-export>\n<app-permissoes-rotina [constantes]=\"constantes\"></app-permissoes-rotina>\n<ng-container *ngIf=\"service.config.dadosAntaq\">\n    <app-programacao-navio-dados-antaq (execute)=\"outDadosAntaq($event)\"></app-programacao-navio-dados-antaq>\n</ng-container>\n<app-programacao-navio-dados (execute)=\"outAlteraDados($event)\"></app-programacao-navio-dados>\n<app-programacao-navio-item-bl-index (refresh)=\"refresh()\"></app-programacao-navio-item-bl-index>\n<app-programacao-navio-liberacao-operacao-index (refresh)=\"refresh()\"></app-programacao-navio-liberacao-operacao-index>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-item-bl/programacao-navio-item-bl-form/programacao-navio-item-bl-form.component.html":
/*!***********************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-item-bl/programacao-navio-item-bl-form/programacao-navio-item-bl-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"] = ("<div class=\"container-buttons\">\n    <div class=\"btn-group\">\n        <a title=\"\" class=\"btn uni-btn btn-sm\" *ngIf=\"!showTable\" (click)=\"back()\">\n            <i class=\"icon-arrow-left _white\"></i>\n        </a>\n        <a title=\"{{ 'buttons.novo' | translate }}\" class=\"btn uni-btn btn-sm\"\n            *ngIf=\"showTable && currentDto && currentDto.programacaoNavioId\" (click)=\"new()\">\n            <i class=\"icon-plus _white\"></i>\n        </a>\n        <a title=\"{{ 'buttons.visualizar' | translate }}\" class=\"btn uni-btn btn-sm opacity\" *ngIf=\"showTable\"\n            [ngClass]=\"{'opacity': data?.programacaoNavioId == null ? true: false}\" (click)=\"show()\">\n            <i class=\"icon-eye _white\"></i>\n        </a>\n        <a title=\"{{ 'buttons.editar' | translate }}\" class=\"btn uni-btn btn-sm opacity\" *ngIf=\"showTable || _detail\"\n            [ngClass]=\"{'opacity': data?.programacaoNavioId == null ? true: false}\" (click)=\"edit()\">\n            <i class=\"icon-pencil _white\"></i>\n        </a>\n        <a title=\"{{ 'buttons.excluir' | translate }}\" *ngIf=\"showTable\" class=\"btn uni-btn btn-sm opacity\"\n            [ngClass]=\"{'opacity': (data?.programacaoNavioId == null && !data?.item) ? true: false}\" (click)=\"delete()\">\n            <i class=\"icon-close _white\"></i>\n        </a>\n    </div>\n</div>\n<table class=\"table table-striped table-hover nowrap\" *ngIf=\"showTable\">\n    <tr>\n        <th>\n            {{\"labels.numeroBL\" | translate }}\n        </th>\n        <th>\n            {{\"labels.kilosVacuo\" | translate}}\n        </th>\n        <th>\n            {{\"labels.kilosAr\" | translate}}\n        </th>\n        <th>\n            {{\"labels.litros\" | translate}}\n        </th>\n        <th>\n            {{\"labels.quantidade\" | translate}}\n        </th>\n    </tr>\n    <tbody>\n        <tr *ngFor=\"let val of dados | removeExcluidos;let i = index\" (click)=\"selected(val, i)\"\n            [ngClass]=\"{'info':i === _index && data.programacaoNavioId === val.programacaoNavioId && data.item === val.item }\">\n            <td>\n                {{ val.numBL }}\n            </td>\n            <td>\n                {{val.kilosManif | formatCurrency: 0 }}\n            </td>\n            <td>\n                {{val.kilosAr | formatCurrency: 0 }}\n            </td>\n            <td>\n                {{val.litrosManif | formatCurrency: 0 }}\n            </td>\n            <td>\n                {{val.quantidManif | formatCurrency: 0 }}\n            </td>\n        </tr>\n        <tr *ngIf=\"!dados || dados.length === 0\">\n            <th colspan=\"5\">\n                {{'messages.nenhumRegistroEncontrado' | translate }}\n            </th>\n        </tr>\n    </tbody>\n</table>\n<form class=\"form\" #f=\"ngForm\" (ngSubmit)=\"onSubmit(f)\" *ngIf=\"!showTable\" autocomplete=\"off\">\n    <app-validacoes></app-validacoes>\n    <div class=\"row\" style=\"margin-bottom: -15px;\">\n        <div class=\"col-12\">\n            <app-card-container tituloCard=\"\"> \n                <div class=\"row\">\n                  <div class=\"col-lg-12 col-md-12 col-sm-12\">\n                    <div class=\"form-row\">\n                      <!-- Material -->\n                      <div class=\"col-2\">\n                        <div class=\"form-group form-group-sm\">\n                          <label for=\"material\">{{ 'labels.material' | translate }}</label>\n                          <input id=\"material\" name=\"material\" maxlength=\"10\"\n                                 [(ngModel)]=\"currentDto.material\"\n                                 class=\"form-control form-control-sm\"\n                                 type=\"text\" disabled />\n                        </div>\n                      </div>\n                      <!-- DescrMaterial -->\n                      <div class=\"col-8\">\n                        <div class=\"form-group form-group-sm\">\n                          <label for=\"nomeMaterial\">{{ 'labels.produto' | translate }}</label>            \n                          <input id=\"nomeMaterial\" name=\"nomeMaterial\" maxlength=\"18\"\n                                 [(ngModel)]=\"currentDto.nomeMaterial\"\n                                 class=\"form-control form-control-sm\"\n                                 type=\"text\" disabled />\n                        </div>\n                      </div>\n                    </div>\n                  </div>\n                </div>                 \n                <div class=\"row\">\n                  <div class=\"col-lg-12 col-md-12 col-sm-12\">\n                    <div class=\"form-row\">\n                      <!-- Código -->\n                      <div class=\"col-2\">\n                        <div class=\"form-group form-group-sm\">\n                          <label for=\"codDest\">{{ 'labels.codigo' | translate }}</label>\n                          <input id=\"codDest\" name=\"codDest\" maxlength=\"10\"\n                                 [(ngModel)]=\"currentDto.codDest\"\n                                 class=\"form-control form-control-sm\"\n                                 type=\"text\" disabled />\n                        </div>\n                      </div>\n                      <!-- Nome -->\n                      <div class=\"col-8\">\n                        <div class=\"form-group form-group-sm\">\n                          <label for=\"nomeCliente\">{{ 'labels.cliente' | translate }}</label>            \n                          <input id=\"nomeCliente\" name=\"nomeCliente\" maxlength=\"18\"\n                                 [(ngModel)]=\"currentDto.nomeCliente\"\n                                 class=\"form-control form-control-sm\"\n                                 type=\"text\" disabled />\n                        </div>\n                      </div>\n                    </div>\n                  </div>\n                </div>                                                \n            </app-card-container>\n        </div>\n    </div>\n    <ng-container *ngIf=\"!habilitarRegRE else inRegRE\">\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=\"numBL\" class=\"required\"> {{ 'labels.numeroBL' | translate }}\n                    </label>\n                    <input type=\"text\" class=\"form-control-sm form-control\" id=\"numBL\" name=\"numBL\" required=\"true\"\n                        maxlength=\"28\" [disabled]=\"funcoesService.isDetail(actionForm) || actionEdit || _detail\"\n                        [(ngModel)]=\"data.numBL\">\n                </div>\n            </div>\n        </div>\n    </ng-container>\n    <ng-template #inRegRE>\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 class=\"required\" for=\"regRE\">{{'labels.reDue' | translate}}</label>\n                    <select class=\"form-control form-control-sm\"\n                        [disabled]=\"funcoesService.isDetail(actionForm) || _detail\" required id=\"regRE\" name=\"regRE\"\n                        [(ngModel)]=\"data.regRE\">\n                        <option value=\"\">{{ 'labels.selecione' | translate }}</option>\n                        <option value=\"{{ item.lancamentoReId }}\" *ngFor=\"let item of regReDueList\">\n                            {{ item.lancamentoReId}} {{ item.numRE }} {{ item.dtRegistro }}\n                        </option>\n                    </select>\n                </div>\n            </div>\n        </div>\n    </ng-template>\n    <div class=\"row\">\n        <div class=\"col-lg-3 col-md-3 col-sm-12\">\n            <div class=\"form-group form-group-sm\">\n                <label for=\"kilosManif\" class=\"required\">{{'labels.kilosVacuo' | translate}}</label>\n                <input type=\"text\" id=\"kilosManif\" name=\"kilosManif\" class=\"form-control form-control-sm\" maxlength=\"15\"\n                    required=\"true\" [(ngModel)]=\"data.kilosManif\" currencyMask\n                    [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\"\n                    [disabled]=\"funcoesService.isDetail(actionForm) || _detail\">\n            </div>\n        </div>\n        <div class=\"col-lg-3 col-md-3 col-sm-12\">\n            <div class=\"form-group form-group-sm\">\n                <label for=\"kilosAr\">{{'labels.kilosAr' | translate}}</label>\n                <input type=\"text\" id=\"kilosAr\" name=\"kilosAr\" class=\"form-control form-control-sm\" maxlength=\"15\"\n                    [(ngModel)]=\"data.kilosAr\" currencyMask\n                    [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\"\n                    [disabled]=\"funcoesService.isDetail(actionForm) || _detail\">\n            </div>\n        </div>\n    </div>\n    <div class=\"row\">\n        <div class=\"col-lg-3 col-md-3 col-sm-12\">\n            <div class=\"form-group form-group-sm\">\n                <label for=\"litrosManif\">{{'labels.litros' | translate}}</label>\n                <input type=\"text\" id=\"litrosManif\" name=\"litrosManif\" class=\"form-control form-control-sm\"\n                    maxlength=\"15\" [(ngModel)]=\"data.litrosManif\" currencyMask\n                    [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\"\n                    [disabled]=\"funcoesService.isDetail(actionForm) || _detail\">\n            </div>\n        </div>\n        <div class=\"col-lg-3 col-md-3 col-sm-12\">\n            <div class=\"form-group form-group-sm\">\n                <label for=\"quantidManif\">{{'labels.quantidade' | translate}}</label>\n                <input type=\"text\" id=\"quantidManif\" name=\"quantidManif\" class=\"form-control form-control-sm\"\n                    maxlength=\"15\" [(ngModel)]=\"data.quantidManif\" currencyMask\n                    [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\"\n                    [disabled]=\"funcoesService.isDetail(actionForm) || _detail\">\n            </div>\n        </div>\n    </div>\n    <div class=\"row mt-2\">\n        <div class=\"col-12\">\n            <div class=\"form-group\">\n                <button class=\"btn btn-success\" type=\"submit\"\n                    [disabled]=\"funcoesService.isDetail(actionForm) || _detail\">\n                    {{ 'buttons.salvar' | translate }}\n                </button>\n            </div>\n        </div>\n    </div>\n</form>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-item-bl/programacao-navio-item-bl-index/programacao-navio-item-bl-index.component.html":
/*!*************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-item-bl/programacao-navio-item-bl-index/programacao-navio-item-bl-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"] = ("<div class=\"modal fade\" id=\"app-programacao-navio-liberacaoPeloFiscal\" tabindex=\"-1\" role=\"dialog\"\n    data-backdrop=\"static\">\n    <div class=\"modal-dialog modal-lg\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h6 class=\"modal-title\">{{ 'titles.liberacaoPeloFiscal' | translate }}</h6>\n            </div>\n            <div class=\"modal-body\">\n                <div class=\"row\">\n                    <div class=\"col-12\">\n                        <app-card-container tituloCard=\"\">\n                            <div class=\"row\">\n                                <div class=\"col-12\">\n                                    <div class=\"form-group form-group-sm\">\n                                        <app-input-description label=\"navio\" [valueID]=\"data?.destinatarioIdNavio\"\n                                            [valueDescription]=\"data?.nomeNavio\">\n                                        </app-input-description>\n                                    </div>\n                                </div>\n                            </div>\n                            <div class=\"row\">\n                                <div class=\"col-12\">\n                                    <div class=\"form-group form-group-sm\">\n                                        <label for=\"dados_descAgencia\"> {{ 'labels.agencia' | translate }}\n                                        </label>\n                                        <input id=\"dados_descAgencia\" name=\"dados_descAgencia\" maxlength=\"18\"\n                                            [value]=\"data.descrAgencia !== undefined ? data.descrAgencia : ''\"\n                                            class=\"form-control form-control-sm\" type=\"text\" disabled />\n                                    </div>\n                                </div>\n                            </div>\n                            <div class=\"row\">\n                                <div class=\"col-12\">\n                                    <div class=\"form-group form-group-sm\">\n                                        <label for=\"dados_observ\"> {{ 'labels.observacao' | translate }}\n                                        </label>\n                                        <input id=\"dados_observ\" name=\"dados_observ\" maxlength=\"18\"\n                                            [value]=\"data.observ !== undefined ? data.observ : ''\"\n                                            class=\"form-control form-control-sm\" type=\"text\" disabled />\n                                    </div>\n                                </div>\n                            </div>\n                        </app-card-container>\n                    </div>\n                </div>\n                <div class=\"clearfix\">\n                    <ul class=\"nav nav-tabs \">\n                        <li class=\"nav-item\">\n                            <a class=\"nav-link active show\" data-toggle=\"tab\" href=\"#dados\">{{\"labels.dados\" |\n                                translate}}</a>\n                        </li>\n                        <li class=\"nav-item\" *ngIf=\"data\">\n                            <a class=\"nav-link\" data-toggle=\"tab\" href=\"#itens\">{{\"labels.itens\" | translate}}</a>\n                        </li>\n                    </ul>\n                </div>\n                <div class=\"tab-content top\">\n                    <div class=\"tab-pane active show\" id=\"dados\">\n                        <table class=\"table table-striped table-hover nowrap\">\n                            <tr>\n                                <th>\n                                    {{\"labels.material\" | translate }}\n                                </th>                                \n                                <th>\n                                    {{\"labels.produto\" | translate }}\n                                </th>\n                                <th>\n                                    {{\"labels.marca\" | translate}}\n                                </th>\n                                <th>\n                                    {{\"labels.codigo\" | translate}}\n                                </th>                                \n                                <th>\n                                    {{\"labels.cliente\" | translate}}\n                                </th>\n                                <th>\n                                    {{\"labels.quantid\" | translate}}\n                                </th>\n                                <th>\n                                    {{\"labels.un\" | translate}}\n                                </th>\n                            </tr>\n                            <tbody>\n                                <tr *ngFor=\"let val of dados | removeExcluidos;let i = index\" (click)=\"selected(val, i)\"\n                                    [ngClass]=\"{'info':i === _index && data.programacaoNavioId === val.programacaoNavioId }\">\n                                    <td>\n                                        {{ val.material }}\n                                    </td>                                    \n                                    <td>\n                                        {{ val.nomeMaterial }}\n                                    </td>\n                                    <td>\n                                        {{ val.campoMarcado }}\n                                    </td>\n                                    <td>\n                                        {{ val.codDest }}\n                                    </td>                                    \n                                    <td>\n                                        {{ val.nomeCliente }}\n                                    </td>\n                                    <td>\n                                        {{ val.quantid | formatCurrency: 0 }}\n                                    </td>\n                                    <td>\n                                        {{ val.unidade }}\n                                    </td>\n                                </tr>\n                                <tr *ngIf=\"!dados || dados.length === 0\">\n                                    <th colspan=\"5\">\n                                        {{'messages.nenhumRegistroEncontrado' | translate }}\n                                    </th>\n                                </tr>\n                            </tbody>\n                        </table>\n                    </div>\n                    <div class=\"tab-pane\" id=\"itens\" *ngIf=\"data\">\n                        <app-programacao-navio-item-bl-form *ngIf=\"showComponents\" [currentDto]=\"data\"\n                            [currentNavio]=\"navio\" (response)=\"updateShowButtom($event)\">\n                        </app-programacao-navio-item-bl-form>\n                    </div>\n\n                    <div class=\"modal-footer\" *ngIf=\"showButton\">\n                        <button class=\"btn btn-success mr-2\" [disabled]=\"!regPrograma || !this.data.programacaoNavioId\"\n                            (click)=\"save()\">\n                            {{ 'buttons.gravar' | translate }}\n                        </button>\n                        <button type=\"button\" class=\"btn btn-default\" (click)=\"back()\">\n                            {{ 'buttons.cancelar' | translate }}\n                        </button>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-dados-portos/programacao-navio-item-dados-portos.component.html":
/*!******************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-dados-portos/programacao-navio-item-dados-portos.component.html ***!
  \******************************************************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"modal fade\" id=\"app-programacao-navio-item-dados-portos\" tabindex=\"-1\" role=\"dialog\" data-backdrop=\"static\">\n    <div class=\"modal-dialog\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h6 class=\"modal-title\">{{ 'titles.dadosPortos' | translate }}</h6>\n            </div>\n            <form class=\"form\" #formItemPortos=\"ngForm\">\n                <div class=\"modal-body\">\n                    <ng-container *ngIf=\"serviceItem.item\">\n                        <app-validacoes [formErrorId]=\"'formItemPortos'\" [validacoes]=\"messages\"></app-validacoes>\n                        <div class=\"row\">\n                            <div class=\"col-lg-6 col-md-12\">\n                                <div class=\"form-group form-group-sm\">\n                                    <label for=\"tipoOperacao\" class=\"required\">{{ 'labels.tipoDeOperacao' |\n                                        translate}}</label>\n                                    <select class=\"form-control form-control-sm\" id=\"tipoOperacao\" name=\"tipoOperacao\"\n                                        [(ngModel)]=\"serviceItem.item.tipoOperacao\"\n                                        (ngModelChange)=\"serviceItem.changeOperationType()\" required>\n                                        <option value=\"\">{{ 'labels.selecione' | translate }}</option>\n                                        <option *ngFor=\"let item of serviceItem.tiposOperacao\"\n                                            value=\"{{ item.tipoOperacaoId }}\" [disabled]=\"item.flagAtivo !== 'S'\">{{\n                                            item.descrTipoOperacao }}</option>\n                                    </select>\n                                </div>\n                            </div>\n                            <div class=\"col-lg-6 col-md-12\">\n                                <div class=\"form-group form-group-sm\">\n                                    <label>&nbsp;</label>\n                                    <br />\n                                    <fieldset [disabled]=\"serviceItem.disabledTipoMov\">\n                                        <div class=\"form-check-inline\">\n                                            <div class=\"custom-control custom-radio\">\n                                                <input type=\"radio\" name=\"tipoMov\" id=\"tipoMovC\"\n                                                    class=\"custom-control-input radio-dark-gray\" value=\"C\"\n                                                    [(ngModel)]=\"serviceItem.item.tipoMov\" />\n                                                <label for=\"tipoMovC\" class=\"custom-control-label\">{{ 'labels.carga' |\n                                                    translate\n                                                    }}</label>\n                                            </div>\n                                        </div>\n                                        <div class=\"form-check-inline\">\n                                            <div class=\"custom-control custom-radio\">\n                                                <input type=\"radio\" name=\"tipoMov\" id=\"tipoMovD\"\n                                                    class=\"custom-control-input radio-dark-gray\" value=\"D\"\n                                                    [(ngModel)]=\"serviceItem.item.tipoMov\" />\n                                                <label for=\"tipoMovD\" class=\"custom-control-label\">{{ 'labels.descarga'\n                                                    | translate\n                                                    }}</label>\n                                            </div>\n                                        </div>\n                                    </fieldset>\n                                </div>\n                            </div>\n                        </div>\n                        <div class=\"row\">\n                            <div class=\"col-lg-6 col-md-12\">\n                                <div class=\"form-group form-group-sm\">\n                                    <label for=\"codPortoOri\" [class.required]=\"service.config.camposObrigatorios\"> {{\n                                        'labels.portoOrigem' | translate}} </label>\n                                    <app-combo-padrao id=\"codPortoOri\" name=\"codPortoOri\" tabela=\"Porto\"\n                                        [required]=\"service.config.camposObrigatorios ? true : false\"\n                                        descricao=\"DescrPorto\" chave=\"CodPorto\" [(ngModel)]=\"serviceItem.item.codPortoOri\">\n                                    </app-combo-padrao>\n                                </div>\n                            </div>\n                            <div class=\"col-lg-6 col-md-12\">\n                                <div class=\"form-group form-group-sm\">\n                                    <label for=\"codPortoDest\"\n                                        [ngClass]=\"{'required':service.config.camposObrigatorios ? true : false}\">{{\n                                        'labels.portoDestino' | translate}}</label>\n                                    <app-combo-padrao id=\"codPortoDest\" name=\"codPortoDest\" tabela=\"Porto\"\n                                        [required]=\"service.config.camposObrigatorios\" descricao=\"DescrPorto\"\n                                        chave=\"CodPorto\" [(ngModel)]=\"serviceItem.item.codPortoDest\">\n                                    </app-combo-padrao>\n                                </div>\n                            </div>\n                        </div>\n                        <div class=\"row\">\n                            <div class=\"col-lg-6 col-md-12\">\n                                <div class=\"form-group form-group-sm\">\n                                    <label for=\"codPortoDest\">{{ 'labels.regCEMercante' | translate}}</label>\n                                    <select class=\"form-control form-control-sm\" id=\"regCEMercante\" name=\"regCEMercante\"\n                                        [(ngModel)]=\"serviceItem.item.regCEMercante\">\n                                        <option value=\"\">{{ 'labels.selecione' | translate }}</option>\n                                        <option value=\"{{ item.ceMercanteId }}\"\n                                            *ngFor=\"let item of serviceItem.cEMercanteList\">\n                                            {{ item.nrCeMercante }}</option>\n                                    </select>\n                                </div>\n                            </div>\n                        </div>\n                        <div class=\"row\">\n                            <div class=\"col-lg-6 col-md-12\">\n                                <div class=\"form-group form-group-sm\">\n                                    <label for=\"codEnquadramento\">{{ 'labels.codEnquadramento' | translate}}</label>\n                                    <select class=\"form-control form-control-sm\" id=\"codEnquadramento\"\n                                        name=\"codEnquadramento\" [(ngModel)]=\"serviceItem.item.codEnquadramento\"\n                                        (change)=\"serviceItem.trataEnquadramento($event)\">\n                                        <option value=\"\">{{ 'labels.selecione' | translate }}</option>\n                                        <option *ngFor=\"let item of serviceItem.enquadramentos\" [value]=\"item.chave\">{{\n                                            item.valor\n                                            }}\n                                        </option>\n                                    </select>\n                                </div>\n                            </div>\n                        </div>\n                        <div class=\"row\">\n                            <div class=\"col-lg-6 col-md-9\">\n                                <div class=\"form-group form-group-sm\">\n                                    <label for=\"codigoAC\"\n                                        [class.required]=\"serviceItem.obrigaCodigoEnquadramento\">{{'labels.codigoAC' |\n                                        translate}}</label>\n                                    <input type=\"text\" id=\"codigoAC\" name=\"codigoAC\"\n                                        class=\"form-control form-control-sm\" maxlength=\"11\" minlength=\"11\"\n                                        [required]=\"serviceItem.obrigaCodigoEnquadramento\" [(ngModel)]=\"serviceItem.item.codigoAC\">\n                                </div>\n                            </div>\n                            <div class=\"col-lg-2 col-md-3\">\n                                <div class=\"form-group form-group-sm\">\n                                    <label for=\"itemAC\"\n                                        [class.required]=\"serviceItem.obrigaCodigoEnquadramento\">{{'labels.item' |\n                                        translate}}</label>\n                                    <input type=\"text\" id=\"itemAC\" name=\"itemAC\" class=\"form-control form-control-sm\"\n                                        maxlength=\"1\" [required]=\"serviceItem.obrigaCodigoEnquadramento\"\n                                        [(ngModel)]=\"serviceItem.item.itemAC\">\n                                </div>\n                            </div>\n                        </div>\n                        <div class=\"row\">\n                            <div class=\"col-md-12\">\n                                <div class=\"form-group form-group-sm\">\n                                    <label for=\"item_observ\">{{'labels.observacoes' | translate}}</label>\n                                    <input type=\"text\" id=\"item_observ\" name=\"item_observ\"\n                                        class=\"form-control form-control-sm\" maxlength=\"70\" [(ngModel)]=\"serviceItem.item.observ\">\n                                </div>\n                            </div>\n                        </div>\n                    </ng-container>\n                </div>\n                <div class=\"modal-footer\">\n                    <button class=\"btn btn-success mr-1\" type=\"button\" (click)=\"onSubmit(formItemPortos)\">{{\n                        'buttons.salvar' |\n                        translate }}\n                    </button>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Sair</button>\n                </div>\n            </form>\n        </div>\n    </div>\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-dados-reexcedente/programacao-navio-item-dados-reexcedente.component.html":
/*!****************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-dados-reexcedente/programacao-navio-item-dados-reexcedente.component.html ***!
  \****************************************************************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"modal fade\" id=\"app-programacao-navio-item-dados-reexcedente\" tabindex=\"-1\" role=\"dialog\"\n    data-backdrop=\"static\">\n    <div class=\"modal-dialog modal-sm\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h6 class=\"modal-title\">{{ 'titles.alteraREExcedente' | translate }}</h6>\n            </div>\n            <form class=\"form\" #formItemDados=\"ngForm\">\n                <div class=\"modal-body\">\n                    <ng-container *ngIf=\"serviceItem.item\">\n                        <app-validacoes [formErrorId]=\"'formItemDados'\" [validacoes]=\"messages\"></app-validacoes>\n                        <div class=\"row\">\n                            <div class=\"col-12\">\n                                <div class=\"form-group form-group-sm\">\n                                    <label for=\"vlFOB\">{{'labels.quantidRE' | translate}}</label>\n                                    <input type=\"text\" id=\"quantidRE\" name=\"quantidRE\"\n                                        class=\"form-control form-control-sm\" maxlength=\"15\"\n                                        [(ngModel)]=\"serviceItem.item.quantidRE\" currencyMask\n                                        [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\">\n                                </div>\n                            </div>\n                        </div>\n                    </ng-container>\n                </div>\n                <div class=\"modal-footer\">\n                    <button class=\"btn btn-success mr-1\" type=\"button\" (click)=\"onSubmit(formItemDados)\">{{\n                        'buttons.salvar' |\n                        translate }}\n                    </button>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Sair</button>\n                </div>\n            </form>\n        </div>\n    </div>\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-dados-unidade/programacao-navio-item-dados-unidade.component.html":
/*!********************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-dados-unidade/programacao-navio-item-dados-unidade.component.html ***!
  \********************************************************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"modal fade\" id=\"app-programacao-navio-item-dados-unidade\" tabindex=\"-1\" role=\"dialog\"\n    data-backdrop=\"static\">\n    <div class=\"modal-dialog modal-sm\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h6 class=\"modal-title\">{{ 'titles.alterarUnidade' | translate }}</h6>\n            </div>\n            <form class=\"form\" #formItemDadosUnidade=\"ngForm\">\n                <div class=\"modal-body\">\n                    <ng-container *ngIf=\"serviceItem.item\">\n                        <app-validacoes [formErrorId]=\"'formItemDadosUnidade'\" [validacoes]=\"messages\"></app-validacoes>\n                        <div class=\"row\">\n                            <div class=\"col-lg-12\">\n                                <div class=\"form-group form-group-sm\">\n                                    <label for=\"unidade\" class=\"required\">{{\n                                        \"labels.unidade\" | translate\n                                        }}</label>\n                                    <select class=\"form-control form-control-sm\" id=\"unidade\" name=\"unidade\"\n                                        required=\"true\" [(ngModel)]=\"serviceItem.item.unidade\">\n                                        <option value=\"\">{{ 'labels.selecione' | translate }}</option>\n                                        <option *ngFor=\"let item of serviceItem.unidades\" [value]=\"item\">{{\n                                            item }}\n                                        </option>\n                                    </select>\n                                </div>\n                            </div>\n                        </div>\n                    </ng-container>\n                </div>\n                <div class=\"modal-footer\">\n                    <button class=\"btn btn-success mr-1\" type=\"button\" (click)=\"onSubmit(formItemDadosUnidade)\">{{\n                        'buttons.salvar' |\n                        translate }}\n                    </button>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Sair</button>\n                </div>\n            </form>\n        </div>\n    </div>\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-dados/programacao-navio-item-dados.component.html":
/*!****************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-dados/programacao-navio-item-dados.component.html ***!
  \****************************************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"modal fade\" id=\"app-programacao-navio-item-dados\" tabindex=\"-1\" role=\"dialog\" data-backdrop=\"static\">\n    <div class=\"modal-dialog\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h6 class=\"modal-title\">{{ 'titles.dadosAntaq' | translate }}</h6>\n            </div>\n            <form class=\"form\" #formItemDados=\"ngForm\">\n                <div class=\"modal-body\">\n                    <ng-container *ngIf=\"serviceItem.item\">\n                        <app-validacoes [formErrorId]=\"'formItemDados'\" [validacoes]=\"messages\"></app-validacoes>\n                        <div class=\"row\">\n                            <div class=\"col-12\">\n                                <div class=\"form-group form-group-sm\">\n                                    <label for=\"midTipoOperCarga\" class=\"required\">{{ \"labels.tipoOperacaoCarga\" |\n                                        translate}}</label>\n                                    <app-combo-padrao id=\"midTipoOperCarga\" name=\"tipoOperacaoCarga\"\n                                        tabela=\"TipoOperacaoCarga\" descricao=\"DescrTipoOperCarga\" chave=\"TipoOperCarga\"\n                                        [(ngModel)]=\"serviceItem.item.tipoOperCarga\" required\n                                        (outObjeto)=\"validation.validaTipoOperCargaPermitido(serviceItem.item)\">\n                                    </app-combo-padrao>\n                                </div>\n                            </div>\n                        </div>\n                    </ng-container>\n                </div>\n                <div class=\"modal-footer\">\n                    <button class=\"btn btn-success mr-1\" type=\"button\" (click)=\"onSubmit(formItemDados)\">{{\n                        'buttons.salvar' |\n                        translate }}\n                    </button>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Sair</button>\n                </div>\n            </form>\n        </div>\n    </div>\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-importadores/programacao-navio-item-importadores.component.html":
/*!******************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-importadores/programacao-navio-item-importadores.component.html ***!
  \******************************************************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"container-buttons\">\n    <div class=\"btn-group\">\n        <button title=\"{{ 'buttons.voltar' | translate }}\" class=\"btn uni-btn btn-sm\" (click)=\"back()\"\n            *ngIf=\"!showTable\">\n            <i class=\"icon-arrow-left _white\"></i>\n        </button>\n        <button title=\"{{ 'buttons.novo' | translate }}\" class=\"btn uni-btn btn-sm\" *ngIf=\"showTable\"\n            [disabled]=\"isDetail\" (click)=\"new()\">\n            <i class=\"icon-plus _white\"></i>\n        </button>\n        <button title=\"{{ 'buttons.visualizar' | translate }}\" class=\"btn uni-btn btn-sm\"\n            [disabled]=\"!itemImport?.sequencia || !showTable\" (click)=\"show()\">\n            <i class=\"icon-eye _white\"></i>\n        </button>\n        <button title=\"{{ 'buttons.editar' | translate }}\" class=\"btn uni-btn btn-sm\"\n            [disabled]=\"!itemImport?.sequencia || isDetail || (!showTable && !detail)\" (click)=\"edit()\">\n            <i class=\"icon-pencil _white\"></i>\n        </button>\n        <button title=\"{{ 'buttons.excluir' | translate }}\" class=\"btn uni-btn btn-sm\"\n            [disabled]=\"!itemImport?.sequencia || isItemDetail || !showTable\" (click)=\"delete(itemImport)\">\n            <i class=\"icon-close _white\"></i>\n        </button>\n    </div>\n</div>\n<table class=\"table table-striped table-hover\" *ngIf=\"showTable\">\n    <tr>\n        <th>\n            {{\"labels.importador\" | translate }}\n        </th>\n        <th>\n            {{\"labels.contrato\" | translate}}\n        </th>\n        <th>\n            {{\"labels.nrReDue\" | translate}}\n        </th>\n        <th>\n            {{\"labels.quantidade\" | translate}}\n        </th>\n    </tr>\n    <tbody>\n        <tr *ngFor=\"let val of item.importadores | removeExcluidos\" (click)=\"selected(val)\"\n            [ngClass]=\"{'info': itemImport?.sequencia === val?.sequencia }\">\n            <td>\n                <span *ngIf=\"val.importador && val.importador.fantasia\">{{ val.importador.fantasia }}</span>\n            </td>\n            <td>\n                {{ val.contrato }}\n            </td>\n            <td>\n                {{ val.numRE }}\n            </td>\n            <td>\n                {{ val.quantid }}\n            </td>\n        </tr>\n        <tr *ngIf=\"!item.importadores || item.importadores.length === 0\">\n            <th colspan=\"4\">\n                {{'messages.nenhumRegistroEncontrado' | translate }}\n            </th>\n        </tr>\n    </tbody>\n</table>\n\n<form class=\"form\" #form=\"ngForm\" (ngSubmit)=\"onSubmit(form)\" *ngIf=\"!showTable\" autocomplete=\"off\">\n    <app-validacoes></app-validacoes>\n    <div class=\"tab-content top\">\n        <div class=\"row\">\n            <div class=\"col-lg-6 col-sm-12\">\n                <div class=\"form-group form-group-sm\">\n                    <label>{{\"labels.cliente\" | translate}}</label>\n                    <div class=\"input-group\">\n                        <input type=\"text\" class=\"form-control form-control-sm col-2 disableKeyPress\" disabled\n                            value=\"{{item?.cliente?.destinatarioId}}\" />\n                        <input type=\"text\" class=\"form-control form-control-sm col disableKeyPress\"\n                            value=\"{{item?.cliente?.fantasia}}\" disabled />\n                    </div>\n                </div>\n            </div>\n        </div>\n        <div class=\"row\">\n            <div class=\"col-lg-6 col-sm-12\">\n                <div class=\"form-group form-group-sm\">\n                    <label>{{\"labels.produto\" | translate}}</label>\n                    <div class=\"input-group\">\n                        <input type=\"text\" class=\"form-control form-control-sm col-2 disableKeyPress\" disabled\n                            value=\"{{item?.material?.materialId}}\" />\n                        <input type=\"text\" class=\"form-control form-control-sm col disableKeyPress\"\n                            value=\"{{item?.material?.fantasia}}\" disabled />\n                    </div>\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                    <app-pesquisa-destinatario id=\"codImportador\" name=\"codImportador\" label=\"importador\"\n                        required=\"true\" modalTitle=\"pesquisaDeImportador\" [(ngModel)]=\"itemImport.codImportador\"\n                        tipoDestinatario=\"C\" showCgcCpf=\"false\" showInscricao=\"false\"\n                        [inSelected]=\"itemImport.importador\" [disabled]=\"detail === true? true: null\"\n                        (outModel)=\"outputImportador($event)\">\n                    </app-pesquisa-destinatario>\n                </div>\n            </div>\n        </div>\n        <div class=\"row\">\n            <div class=\"col-lg-4\">\n                <div class=\"form-group form-group-sm\">\n                    <div class=\"form-group\">\n                        <label for=\"quantidade\">{{'labels.quantidade' | translate}}</label>\n                        <input type=\"text\" id=\"quantidade\" name=\"quantidade\" class=\"form-control form-control-sm\"\n                            maxlength=\"15\" [disabled]=\"detail === true? true: null\" [(ngModel)]=\"itemImport.quantid\"\n                            currencyMask [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\">\n                    </div>\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=\"contrato\">{{'labels.contrato' | translate}}</label>\n                    <input type=\"text\" id=\"contrato\" name=\"contrato\" class=\"form-control form-control-sm\" maxlength=\"30\"\n                        [disabled]=\"detail === true? true: null\" [(ngModel)]=\"itemImport.contrato\">\n                </div>\n            </div>\n        </div>\n        <div class=\"row\">\n            <div class=\"col-lg-4\">\n                <div class=\"form-group form-group-sm\">\n                    <label for=\"regRE\">{{ 'labels.nrReDue' | translate}}</label>\n                    <app-combo-re-due id=\"regRE\" name=\"regRE\" [disabled]=\"detail === true? true: null\"\n                        [(ngModel)]=\"itemImport.regRE\"\n                        [destinatarioIdCliente]=\"itemImport.codImportador\"></app-combo-re-due>\n                </div>\n            </div>\n        </div>\n        <div class=\"row\">\n            <div class=\"col-12\">\n                <div class=\"form-group form-group-sm\">\n                    <button class=\"btn btn-success mr-1\" type=\"submit\" [disabled]=\"isDetail || detail\">{{\n                        'buttons.salvar' | translate }}\n                    </button>\n                </div>\n            </div>\n        </div>\n    </div>\n</form>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-itens/programacao-navio-item-itens.component.html":
/*!****************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-itens/programacao-navio-item-itens.component.html ***!
  \****************************************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"container-buttons\">\n    <div class=\"btn-group\">\n        <app-menu-button title=\"{{ 'buttons.voltar' | translate }}\" [icon]=\"'icon-arrow-left'\" (click)=\"back()\"\n            *ngIf=\"!showTable\">\n        </app-menu-button>\n        <app-menu-button title=\"{{ 'buttons.novo' | translate }}\" [disabled]=\"isDetail\" (click)=\"new()\"\n            [icon]=\"'icon-plus'\" *ngIf=\"showTable\">\n        </app-menu-button>\n        <ng-container *ngIf=\"showTable\">\n            <app-menu-button title=\"{{ 'buttons.visualizar' | translate }}\"\n                [disabled]=\"!serviceItem.item?.sequencia || !showTable\" (click)=\"show()\" [icon]=\"'icon-eye'\">\n            </app-menu-button>\n        </ng-container>\n        <app-menu-button title=\"{{ 'buttons.editar' | translate }}\" [icon]=\"'icon-pencil'\"\n            [disabled]=\"!serviceItem.item?.sequencia || isDetail || (!showTable && !detail)\" (click)=\"edit()\">\n        </app-menu-button>\n        <app-menu-button title=\"{{ 'buttons.duplicar' | translate }}\" [icon]=\"'fa fa-copy'\"\n            [disabled]=\"!serviceItem.item?.sequencia || isDetail || !showTable\" (click)=\"duplicate(serviceItem.item)\">\n        </app-menu-button>\n        <app-menu-button title=\"{{ 'buttons.excluir' | translate }}\" [icon]=\"'icon-close'\"\n            [disabled]=\"!serviceItem.item?.sequencia || isDetail || !showTable\" (click)=\"delete(serviceItem.item)\">\n        </app-menu-button>\n        <ng-container *ngIf=\"this.service.config.dadosAntaq\">\n            <app-menu-button title=\"{{ 'buttons.dadosAntaq' | translate }}\" [icon]=\"'fa fa-align-left'\"\n                [disabled]=\"!serviceItem.item?.sequencia || !showTable\" (click)=\"dadosItem(serviceItem.item)\">\n            </app-menu-button>\n        </ng-container>\n        <app-menu-button title=\"{{ 'buttons.dadosPortos' | translate }}\" [icon]=\"'fa fa-ship'\"\n            [disabled]=\"!serviceItem.item?.sequencia || !showTable\" (click)=\"dadosPortos()\">\n        </app-menu-button>\n        <app-menu-button title=\"{{ 'buttons.alterarUnidade' | translate }}\" [icon]=\"'fa fa-asterisk'\"\n            [disabled]=\"!serviceItem.item?.sequencia || !showTable\" (click)=\"alterarUnidade()\">\n        </app-menu-button>\n        <app-menu-button title=\"{{ 'buttons.alteraREExcedente' | translate }}\" [icon]=\"'fa fa-superpowers'\"\n            [disabled]=\"disabledAlteraREExcedente\" (click)=\"alteraREExcedente()\">\n        </app-menu-button>\n    </div>\n</div>\n<table class=\"table table-striped table-hover nowrap\" *ngIf=\"showTable\">\n    <tr>\n        <th>\n            {{\"labels.item\" | translate }}\n        </th>\n        <th *ngIf=\"service.config.tradingPedEmb\">\n            {{\"labels.codigo\" | translate}}\n        </th>\n        <th *ngIf=\"service.config.tradingPedEmb\">\n            {{\"labels.trading\" | translate}}\n        </th>\n        <th>\n            {{\"labels.codigo\" | translate}}\n        </th>\n        <th>\n            {{\"labels.cliente\" | translate}}\n        </th>\n        <th>\n            {{\"labels.produto\" | translate}}\n        </th>\n        <th style=\"text-align: right;\">\n            {{\"labels.quantidade\" | translate}}\n        </th>\n        <th>\n            {{\"labels.unidade\" | translate}}\n        </th>\n    </tr>\n    <tbody>\n        <tr *ngFor=\"let val of service.programacaoNavio.itens | removeExcluidos\" (click)=\"selected(val)\"\n            [ngClass]=\"{'info': serviceItem.item.sequencia === val.sequencia }\">\n            <td>\n                {{ val.item }}\n            </td>\n            <td *ngIf=\"service.config.tradingPedEmb\">\n                <span *ngIf=\"val.trading && val.trading.destinatarioId\">{{ val.trading.destinatarioId }}</span>\n            </td>\n            <td *ngIf=\"service.config.tradingPedEmb\">\n                <span *ngIf=\"val.trading && val.trading.fantasia\">{{ val.trading.fantasia }}</span>\n            </td>\n            <td>\n                <span *ngIf=\"val.cliente && val.cliente.destinatarioId\">{{ val.cliente.destinatarioId }}</span>\n            </td>\n            <td>\n                <span *ngIf=\"val.cliente && val.cliente.fantasia\">{{ val.cliente.fantasia }}</span>\n            </td>\n            <td>\n                <span *ngIf=\"val.material && val.material.fantasia\">{{ val.material.fantasia }}</span>\n            </td>\n            <td style=\"text-align: right;\">\n                {{ val.quantid | formatCurrency: 0 }}\n            </td>\n            <td>\n                {{ val.unidade }}\n            </td>\n        </tr>\n        <tr *ngIf=\"!service.programacaoNavio.itens || service.programacaoNavio.itens.length === 0\">\n            <th colspan=\"6\">\n                {{'messages.nenhumRegistroEncontrado' | translate }}\n            </th>\n        </tr>\n    </tbody>\n</table>\n<form class=\"form\" #formItem=\"ngForm\" (ngSubmit)=\"onSubmit(formItem)\" *ngIf=\"!showTable\" autocomplete=\"off\">\n    <app-validacoes></app-validacoes>\n    <div class=\"clearfix\">\n        <ul class=\"nav nav-tabs \">\n            <li class=\"nav-item\">\n                <a class=\"nav-link active show\" data-toggle=\"tab\" href=\"#itens1_dados\">{{\"labels.dados\" |\n                    translate}}</a>\n            </li>\n            <li class=\"nav-item\">\n                <a class=\"nav-link\" data-toggle=\"tab\" href=\"#itens1_dados_exportacao\">{{\"labels.exportacao\" |\n                    translate}}</a>\n            </li>\n            <li class=\"nav-item\">\n                <a class=\"nav-link\" data-toggle=\"tab\" href=\"#itens1_dados_importacao\">{{\"labels.importadores\" |\n                    translate}}</a>\n            </li>\n        </ul>\n    </div>\n    <div class=\"tab-content top\">\n        <div class=\"tab-pane active show\" id=\"itens1_dados\">\n            <ng-container *ngIf=\"service.config.tradingPedEmb\">\n                <div class=\"row\">\n                    <div class=\"col-lg-6\">\n                        <div class=\"form-group form-group-sm\">\n                            <app-pesquisa-destinatario id=\"trading\" name=\"trading\" label=\"trading\" required=\"true\"\n                                modalTitle=\"pesquisaDeTrading\" [(ngModel)]=\"serviceItem.item.destinatarioIdTrading\"\n                                tipoDestinatario=\"C\" showCgcCpf=\"false\" showInscricao=\"false\"\n                                [inSelected]=\"serviceItem.item?.trading\" [disabled]=\"detail === true? true: null\"\n                                (outModel)=\"outputTrading($event)\">\n                            </app-pesquisa-destinatario>\n                        </div>\n                    </div>\n                </div>\n            </ng-container>\n            <div class=\"row\">\n                <div class=\"col-lg-6\">\n                    <div class=\"form-group form-group-sm\">\n                        <app-pesquisa-destinatario id=\"clienteIt\" name=\"cliente\" label=\"cliente\"\n                            modalTitle=\"pesquisaDeCliente\" [required]=\"true\"\n                            [(ngModel)]=\"serviceItem.item.destinatarioIdCliente\" tipoDestinatario=\"C\" showCgcCpf=\"false\"\n                            showInscricao=\"false\" [inSelected]=\"serviceItem.item.cliente\"\n                            [disabled]=\"detail === true? true: null\" (outModel)=\"outputCliente($event)\">\n                        </app-pesquisa-destinatario>\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                        <app-pesquisa-material id=\"produto\" name=\"produto\" label=\"produto\" required=\"true\"\n                            modalTitle=\"pesquisaDeProduto\" [(ngModel)]=\"serviceItem.item.materialId\"\n                            [inSelected]=\"serviceItem.item.material\" [disabled]=\"detail === true? true: null\"\n                            (outModel)=\"outputMaterial($event)\">\n                        </app-pesquisa-material>\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                        <app-pesquisa-destinatario id=\"emitente\" name=\"emitente\" label=\"emitente\" required=\"true\"\n                            modalTitle=\"pesquisaDeEmitente\" [(ngModel)]=\"serviceItem.item.destinatarioIdEmitente\"\n                            tipoDestinatario=\"C\" showCgcCpf=\"false\" showInscricao=\"false\" [required]=\"solEmitente\"\n                            [inSelected]=\"serviceItem.item?.emitente\"\n                            [disabled]=\"!solEmitente || (detail === true? true: null)\"\n                            (outModel)=\"outputEmitente($event)\">\n                        </app-pesquisa-destinatario>\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-lg-4\">\n                    <div class=\"custom-control custom-checkbox mb-1\">\n                        <input id=\"campoMarcado\" name=\"campoMarcado\" [ngModel]=\"serviceItem.item.campoMarcado === 'S'\"\n                            (ngModelChange)=\"serviceItem.item.campoMarcado=$event?'S':'N'\"\n                            [disabled]=\"!!detail || !solicitaTanqueMarcado\"\n                            class=\"custom-control-input checkbox-success\" type=\"checkbox\">\n                        <label class=\"custom-control-label\" for=\"campoMarcado\">{{'labels.tanqueMarcado' |\n                            translate}}</label>\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                        <app-pesquisa-destinatario id=\"codDespac\" name=\"codDespac\" label=\"despachante\"\n                            modalTitle=\"pesquisaDeDespachante\" [(ngModel)]=\"serviceItem.item.codDespac\"\n                            tipoDestinatario=\"C\" showCgcCpf=\"false\" showInscricao=\"false\"\n                            [inSelected]=\"serviceItem.item.despachante\" [disabled]=\"detail === true? true: null\"\n                            (outModel)=\"outputDespachante($event)\">\n                        </app-pesquisa-destinatario>\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-lg-3 col-md-4 col-sm-12\">\n                    <div class=\"form-group form-group-sm\">\n                        <div class=\"form-group\">\n                            <label class=\"required\" for=\"quantidade\">{{'labels.quantidade' | translate}}</label>\n                            <input type=\"text\" id=\"quantidade\" name=\"quantidade\" class=\"form-control form-control-sm\"\n                                maxlength=\"15\" required=\"true\" [(ngModel)]=\"serviceItem.item.quantid\" currencyMask\n                                [disabled]=\"detail === true? true: null\"\n                                [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\">\n                        </div>\n                    </div>\n                </div>\n                <div class=\"col-lg-3 col-md-4 col-sm-12\">\n                    <div class=\"form-group form-group-sm\">\n                        <label for=\"unidade\" class=\"required\">{{\n                            \"labels.unidade\" | translate\n                            }}</label>\n                        <select class=\"form-control form-control-sm\" id=\"unidade\" name=\"unidade\" required=\"true\"\n                            [disabled]=\"detail === true? true: null\" [(ngModel)]=\"serviceItem.item.unidade\">\n                            <option value=\"\">{{ 'labels.selecione' | translate }}</option>\n                            <option *ngFor=\"let item of serviceItem.unidades\" value=\"{{ item }}\">{{ item }}\n                            </option>\n                        </select>\n                    </div>\n                </div>\n                <div class=\"col-lg-3 col-md-4 col-sm-12\">\n                    <div class=\"form-group form-group-sm\">\n                        <label\n                            [ngClass]=\"{'required': (serviceItem.item.unidade && serviceItem.item.unidade == 'LT') || (serviceItem.item.unidade && serviceItem.item.unidade == 'M3') ? true : false }\"\n                            for=\"densidade\">{{'labels.densidade' | translate}}</label>\n                        <input type=\"text\" id=\"densidade\" name=\"densidade\" class=\"form-control form-control-sm\"\n                            maxlength=\"9\"\n                            [required]=\"(serviceItem.item.unidade && serviceItem.item.unidade == 'LT') || (serviceItem.item.unidade && serviceItem.item.unidade == 'M3') ? true : false\"\n                            [(ngModel)]=\"serviceItem.item.densidade\" [disabled]=\"detail === true? true: null\"\n                            currencyMask [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 6 }\">\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-lg-4 col-md-12\">\n                    <div class=\"form-group form-group-sm\">\n                        <label for=\"tipoOperacao\" class=\"required\">{{ 'labels.tipoDeOperacao' | translate}}</label>\n                        <select class=\"form-control form-control-sm\" id=\"tipoOperacao\" name=\"tipoOperacao\"\n                            [disabled]=\"disabledTipoOperacao\" [(ngModel)]=\"serviceItem.item.tipoOperacao\"\n                            (ngModelChange)=\"serviceItem.changeOperationType()\" required>\n                            <option value=\"\">{{ 'labels.selecione' | translate }}</option>\n                            <option *ngFor=\"let item of serviceItem.tiposOperacao\" value=\"{{ item.tipoOperacaoId }}\"\n                                [disabled]=\"item.flagAtivo !== 'S'\">{{\n                                item.descrTipoOperacao }}</option>\n                        </select>\n                    </div>\n                </div>\n                <div class=\"col-lg-4 col-md-12\">\n                    <div class=\"form-group form-group-sm\">\n                        <label>&nbsp;</label>\n                        <br />\n                        <fieldset [disabled]=\"detail || serviceItem.disabledTipoMov\">\n                            <div class=\"form-check-inline\">\n                                <div class=\"custom-control custom-radio\">\n                                    <input type=\"radio\" name=\"tipoMov\" id=\"tipoMovC\"\n                                        class=\"custom-control-input radio-dark-gray\" value=\"C\"\n                                        [(ngModel)]=\"serviceItem.item.tipoMov\" [required]=\"serviceItem.obrigaTipoMov\" />\n                                    <label for=\"tipoMovC\" class=\"custom-control-label\">{{ 'labels.carga' | translate\n                                        }}</label>\n                                </div>\n                            </div>\n                            <div class=\"form-check-inline\">\n                                <div class=\"custom-control custom-radio\">\n                                    <input type=\"radio\" name=\"tipoMov\" id=\"tipoMovD\"\n                                        class=\"custom-control-input radio-dark-gray\" value=\"D\"\n                                        [(ngModel)]=\"serviceItem.item.tipoMov\" />\n                                    <label for=\"tipoMovD\" class=\"custom-control-label\">{{ 'labels.descarga' | translate\n                                        }}</label>\n                                </div>\n                            </div>\n                            <div class=\"form-check-inline\">\n                                <div class=\"custom-control custom-radio\">\n                                    <input type=\"radio\" name=\"tipoMov\" id=\"tipoMovCD\"\n                                        class=\"custom-control-input radio-dark-gray\" value=\"A\"\n                                        [(ngModel)]=\"serviceItem.item.tipoMov\" />\n                                    <label for=\"tipoMovCD\" class=\"custom-control-label\">{{ 'labels.cargaDirecta' |\n                                        translate\n                                        }}</label>\n                                </div>\n                            </div>\n                        </fieldset>\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-lg-4\">\n                    <div class=\"form-group form-group-sm\">\n                        <label for=\"tipoOperacaoCarga\">{{ 'labels.tipoOperacaoCarga' |\n                            translate}}</label>\n                        <app-combo-padrao id=\"tipoOperCarga\" name=\"tipoOperCarga\" tabela=\"TipoOperacaoCarga\"\n                            descricao=\"DescrTipoOperCarga\" chave=\"TipoOperCarga\"\n                            [(ngModel)]=\"serviceItem.item.tipoOperCarga\" [disabled]=\"detail === true? true: null\"\n                            (outObjeto)=\"validation.validaTipoOperCargaPermitido()\">\n                        </app-combo-padrao>\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-lg-6 col-md-12\">\n                    <div class=\"form-group form-group-sm\">\n                        <app-pesquisa-osg id=\"osg\" label=\"osg\" name=\"osg\"\n                            [destinatarioIdCliente]=\"serviceItem.item.destinatarioIdCliente\"\n                            [materialId]=\"serviceItem.item.materialId\" [disabled]=\"detail === true? true: null\"\n                            (outSelected)=\"trataOsg($event)\" [inpOsg]=\"serviceItem.item.osg\"\n                            [(ngModel)]=\"serviceItem.item.regOsg\">\n                        </app-pesquisa-osg>\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                        <div class=\"form-group\">\n                            <label [ngClass]=\"{'required':service.config.camposObrigatorios}\"\n                                for=\"inspetor\">{{'labels.inspetor' | translate}}</label>\n                            <input type=\"text\" id=\"inspetor\" name=\"inspetor\" class=\"form-control form-control-sm\"\n                                maxlength=\"30\" [disabled]=\"detail === true? true: null\"\n                                [required]=\"service.config.camposObrigatorios\" [(ngModel)]=\"serviceItem.item.inspetor\">\n                        </div>\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=\"codPortoOri\"\n                            [ngClass]=\"{'required':service.config.camposObrigatorios ? true : false}\">{{\n                            'labels.portoOrigem' | translate}}</label>\n                        <app-combo-padrao id=\"codPortoOri\" name=\"codPortoOri\" tabela=\"Porto\"\n                            [required]=\"service.config.camposObrigatorios ? true : false\" descricao=\"DescrPorto\"\n                            chave=\"CodPorto\"\n                            [disabled]=\"detail === true || (this.serviceItem.item.programacaoNavioId && permissionAlteraPortos === false)? true: null\"\n                            [(ngModel)]=\"serviceItem.item.codPortoOri\">\n                        </app-combo-padrao>\n                    </div>\n                </div>\n                <div class=\"col-lg-3\">\n                    <div class=\"form-group form-group-sm\">\n                        <label for=\"codPortoDest\"\n                            [ngClass]=\"{'required':service.config.camposObrigatorios ? true : false}\">{{\n                            'labels.portoDestino' | translate}}</label>\n                        <app-combo-padrao id=\"codPortoDest\" name=\"codPortoDest\" tabela=\"Porto\"\n                            [required]=\"service.config.camposObrigatorios || (this.serviceItem.item.programacaoNavioId && permissionAlteraPortos === false)? true : false\"\n                            descricao=\"DescrPorto\" chave=\"CodPorto\" [disabled]=\"detail === true? true: null\"\n                            [(ngModel)]=\"serviceItem.item.codPortoDest\">\n                        </app-combo-padrao>\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-lg-4\">\n                    <div class=\"form-group form-group-sm\">\n                        <label for=\"codPortoDest\">{{ 'labels.regCEMercante' | translate}}</label>\n                        <select class=\"form-control form-control-sm\"\n                            [disabled]=\"detail === true || (this.serviceItem.item.programacaoNavioId && permissionAlteraPortos === false)? true: null\"\n                            id=\"regCEMercante\" name=\"regCEMercante\" [(ngModel)]=\"serviceItem.item.regCEMercante\">\n                            <option value=\"\">{{ 'labels.selecione' | translate }}</option>\n                            <option value=\"{{ item.ceMercanteId }}\" *ngFor=\"let item of serviceItem.cEMercanteList\">\n                                {{ item.nrCeMercante }}</option>\n                        </select>\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=\"item_observ\">{{'labels.observacoes' | translate}}</label>\n                        <input type=\"text\" id=\"item_observ\" name=\"item_observ\" class=\"form-control form-control-sm\"\n                            maxlength=\"70\"\n                            [disabled]=\"detail === true || (this.serviceItem.item.programacaoNavioId && permissionAlteraPortos === false)? true: null\"\n                            [(ngModel)]=\"serviceItem.item.observ\">\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\" *ngIf=\"this.service.config.obrigaCodIntegracao\">\n                <div class=\"col-lg-6\">\n                    <div class=\"form-group form-group-sm\">\n                        <label for=\"codDeIntegracao\" [class.required]=\"this.service.config.obrigaCodIntegracao\">\n                            {{'labels.codDeIntegracao' | translate}}\n                        </label>\n                        <input type=\"text\" id=\"codDeIntegracao\" name=\"codDeIntegracao\"\n                            class=\"form-control form-control-sm\" maxlength=\"30\"\n                            [required]=\"this.service.config.obrigaCodIntegracao\" [disabled]=\"detail === true\"\n                            [(ngModel)]=\"serviceItem.item.codIntegracao\">\n                    </div>\n                </div>\n            </div>\n        </div>\n        <div class=\"tab-pane\" id=\"itens1_dados_exportacao\">\n            <div class=\"row\">\n                <div class=\"col-lg-6 col-sm-12\">\n                    <div class=\"form-group form-group-sm\">\n                        <label>{{\"labels.cliente\" | translate}}</label>\n                        <div class=\"input-group\">\n                            <input type=\"text\" class=\"form-control form-control-sm col-2 disableKeyPress\" disabled\n                                value=\"{{serviceItem.item?.cliente?.destinatarioId}}\" />\n                            <input type=\"text\" class=\"form-control form-control-sm col disableKeyPress\"\n                                value=\"{{serviceItem.item?.cliente?.fantasia}}\" disabled />\n                        </div>\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-lg-6 col-sm-12\">\n                    <div class=\"form-group form-group-sm\">\n                        <label>{{\"labels.produto\" | translate}}</label>\n                        <div class=\"input-group\">\n                            <input type=\"text\" class=\"form-control form-control-sm col-2 disableKeyPress\" disabled\n                                value=\"{{serviceItem.item?.material?.materialId}}\" />\n                            <input type=\"text\" class=\"form-control form-control-sm col disableKeyPress\"\n                                value=\"{{serviceItem.item?.material?.fantasia}}\" disabled />\n                        </div>\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-lg-4 col-md-12\">\n                    <div class=\"form-group form-group-sm\">\n                        <label for=\"vlFOB\">{{'labels.vlFOB' | translate}}</label>\n                        <input type=\"text\" id=\"vlFOB\" name=\"vlFOB\" class=\"form-control form-control-sm\" maxlength=\"14\"\n                            [(ngModel)]=\"serviceItem.item.vlFOB\" [disabled]=\"detail === true? true: null\" currencyMask\n                            [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\">\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-lg-4 col-md-12\">\n                    <div class=\"form-group form-group-sm\">\n                        <label for=\"vlFOB\">{{'labels.valorFobUnitario' | translate}}</label>\n                        <input type=\"text\" id=\"vlUnitFOB\" name=\"vlUnitFOB\" class=\"form-control form-control-sm\"\n                            maxlength=\"14\" [(ngModel)]=\"serviceItem.item.vlUnitFOB\"\n                            [disabled]=\"detail === true? true: null\" currencyMask\n                            [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 2 }\">\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-lg-4 col-md-12\">\n                    <div class=\"form-group form-group-sm\">\n                        <label for=\"vlFOB\">{{'labels.quantidRE' | translate}}</label>\n                        <input type=\"text\" id=\"quantidRE\" name=\"quantidRE\" class=\"form-control form-control-sm\"\n                            maxlength=\"15\" [(ngModel)]=\"serviceItem.item.quantidRE\"\n                            [disabled]=\"detail === true? true: null\" currencyMask\n                            [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\">\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-lg-3 col-sm-12\">\n                    <div class=\"form-group form-group-sm\">\n                        <label for=\"dtEmbarqueI\">{{\"labels.dtEmbarqueI\" | translate }}</label>\n                        <app-data id=\"dtEmbarqueI\" name=\"dtEmbarqueI\" [(ngModel)]=\"serviceItem.item.dtEmbarqueI\"\n                            autofocus [disabled]=\"detail === true? true: null\" class=\"dataHora\"\n                            [formatDateTime]=\"mascara.getFormatData\">\n                        </app-data>\n                    </div>\n                </div>\n                <div class=\"col-lg-3 col-sm-12\">\n                    <div class=\"form-group form-group-sm\">\n                        <label for=\"dtEmbarqueF\">{{\"labels.ate\" | translate}}</label>\n                        <app-data id=\"dtEmbarqueF\" name=\"dtEmbarqueF\" [(ngModel)]=\"serviceItem.item.dtEmbarqueF\"\n                            [disabled]=\"detail === true? true: null\" class=\"dataHora\"\n                            [formatDateTime]=\"mascara.getFormatData\">\n                        </app-data>\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                        <app-pesquisa-destinatario id=\"codControladora\" name=\"codControladora\" label=\"controladora\"\n                            modalTitle=\"pesquisaDeControladora\" [(ngModel)]=\"serviceItem.item.codControladora\"\n                            tipoDestinatario=\"C\" [disabled]=\"detail === true? true: null\" showCgcCpf=\"false\"\n                            showInscricao=\"false\" [inSelected]=\"serviceItem.item.controladora\"\n                            (outModel)=\"outputControladora($event)\">\n                        </app-pesquisa-destinatario>\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-lg-4\">\n                    <div class=\"form-group form-group-sm\">\n                        <label for=\"codEnquadramento\">{{ 'labels.codEnquadramento' | translate}}</label>\n                        <select class=\"form-control form-control-sm\" id=\"codEnquadramento\" name=\"codEnquadramento\"\n                            [disabled]=\"detail === true || (serviceItem.item.programacaoNavioId && permissionAlteraPortos === false)? true: null\"\n                            [(ngModel)]=\"serviceItem.item.codEnquadramento\"\n                            (change)=\"serviceItem.trataEnquadramento($event)\">\n                            <option value=\"\">{{ 'labels.selecione' | translate }}</option>\n                            <option *ngFor=\"let item of serviceItem.enquadramentos\" [value]=\"item.chave\">{{ item.valor\n                                }}\n                            </option>\n                        </select>\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-lg-4 col-md-8 col-sm-10\">\n                    <div class=\"form-group form-group-sm\">\n                        <label for=\"codigoAC\"\n                            [class.required]=\"serviceItem.obrigaCodigoEnquadramento\">{{'labels.codigoAC' |\n                            translate}}</label>\n                        <input type=\"text\" id=\"codigoAC\" name=\"codigoAC\" class=\"form-control form-control-sm\"\n                            maxlength=\"11\" minlength=\"11\"\n                            [disabled]=\"detail === true || (serviceItem.item.programacaoNavioId && permissionAlteraPortos === false)? true: null\"\n                            [required]=\"serviceItem.obrigaCodigoEnquadramento\" [(ngModel)]=\"serviceItem.item.codigoAC\">\n                    </div>\n                </div>\n                <div class=\"col-lg-1 col-md-2 col-sm-2\">\n                    <div class=\"form-group form-group-sm\">\n                        <label for=\"itemAC\" [class.required]=\"serviceItem.obrigaCodigoEnquadramento\">{{'labels.item' |\n                            translate}}</label>\n                        <input type=\"text\" id=\"itemAC\" name=\"itemAC\" class=\"form-control form-control-sm\" maxlength=\"1\"\n                            [disabled]=\"detail === true || (serviceItem.item.programacaoNavioId && permissionAlteraPortos === false)? true: null\"\n                            [required]=\"serviceItem.obrigaCodigoEnquadramento\" [(ngModel)]=\"serviceItem.item.itemAC\">\n                    </div>\n                </div>\n            </div>\n        </div>\n        <div class=\"tab-pane\" id=\"itens1_dados_importacao\">\n            <app-programacao-navio-item-importadores [item]=\"serviceItem.item\" [isDetail]=\"isDetail || detail\"\n                (response)=\"showComponents = $event\">\n            </app-programacao-navio-item-importadores>\n        </div>\n        <div class=\"row\">\n            <div class=\"col-lg-6\">\n                <div class=\"form-group form-group-sm\">\n                    <button class=\"btn btn-success mr-1\" type=\"submit\" *ngIf=\"showComponents\"\n                        [disabled]=\"isDetail || detail\">{{\n                        'buttons.salvar' | translate }}\n                    </button>\n                </div>\n            </div>\n        </div>\n    </div>\n</form>\n\n<ng-container *ngIf=\"service.config.dadosAntaq\">\n    <app-programacao-navio-item-dados (execute)=\"outDadosItem($event)\"></app-programacao-navio-item-dados>\n</ng-container>\n\n<app-programacao-navio-item-dados-portos (execute)=\"outDadosPortos($event)\"></app-programacao-navio-item-dados-portos>\n<app-programacao-navio-item-dados-unidade (execute)=\"outAlterarUnidade($event)\">\n</app-programacao-navio-item-dados-unidade>\n<app-programacao-navio-item-dados-reexcedente (execute)=\"outAlteraREExcedente($event)\">\n</app-programacao-navio-item-dados-reexcedente>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-liberacao-operacao-index/programacao-navio-liberacao-operacao-index.component.html":
/*!*********************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-liberacao-operacao-index/programacao-navio-liberacao-operacao-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"] = ("<div class=\"modal fade\" id=\"app-programacao-navio-liberacaoOperacao\" tabindex=\"-1\" role=\"dialog\" data-backdrop=\"static\">\n    <div class=\"modal-dialog modal-lg\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h6 class=\"modal-title\">{{ 'titles.liberacaoOperacao' | translate }}</h6>\n            </div>\n            <div class=\"modal-body\">\n                <div class=\"tab-pane active show\" id=\"dados\">\n                    <div class=\"row\">\n                        <div class=\"col-12\">\n                            <app-card-container tituloCard=\"\">\n                                <div class=\"row\">\n                                    <div class=\"col-8\">\n                                        <div class=\"row\">\n                                            <div class=\"col-12\">\n                                                <label for=\"pier\"> {{ 'labels.pier' | translate }}\n                                                </label>\n                                                <input id=\"pier\" name=\"pier\" ngModel=\"{{programacao?.descrPier}}\"\n                                                    class=\"form-control form-control-sm\" type=\"text\" disabled />\n                                            </div>\n                                        </div>\n                                        <div class=\"row\">\n                                            <div class=\"col-12\">\n                                                <app-input-description [label]=\"'navio'\"\n                                                    valueID=\"{{ programacao?.navio?.destinatarioId }}\"\n                                                    valueDescription=\"{{ programacao?.navio?.fantasia }}\">\n                                                </app-input-description>\n                                            </div>\n                                        </div>\n                                        <div class=\"row\">\n                                            <div class=\"col-12\">\n                                                <label for=\"dados_descAgencia_1\"> {{ 'labels.agencia' | translate }}\n                                                </label>\n                                                <input id=\"dados_descAgencia_1\" name=\"dados_descAgencia\" maxlength=\"18\"\n                                                    value=\"{{programacao.descAgencia}}\"\n                                                    class=\"form-control form-control-sm\" type=\"text\" disabled />\n                                            </div>\n                                        </div>\n                                        <div class=\"row\">\n                                            <div class=\"col-12\">\n                                                <label for=\"dados_observ\"> {{ 'labels.observacao' | translate }}\n                                                </label>\n                                                <input id=\"dados_observ\" name=\"dados_observ\" maxlength=\"18\"\n                                                    value=\"{{data?.observ}}\" class=\"form-control form-control-sm\"\n                                                    type=\"text\" disabled />\n                                            </div>\n                                        </div>\n                                    </div>\n                                    <div class=\"col-4\">\n                                        <div class=\"row mt25\">\n                                            <div class=\"col-12\">\n                                                <div class=\"form-group\">\n                                                    <button class=\"btn btn-success btn-block\" type=\"submit\"\n                                                        (click)=\"selectedAll()\"\n                                                        [disabled]=\"!dados || dados.length === 0\">\n                                                        {{ 'buttons.selecionaTodos' | translate }}\n                                                    </button>\n                                                </div>\n                                            </div>\n                                        </div>\n                                        <div class=\"row\">\n                                            <div class=\"col-12\">\n                                                <div class=\"form-group\">\n                                                    <button class=\"btn btn-success btn-block\" type=\"submit\"\n                                                        (click)=\"freeUp()\" [disabled]=\"!hasItemSelected\">\n                                                        {{ 'buttons.liberar' | translate }}\n                                                    </button>\n                                                </div>\n                                            </div>\n                                        </div>\n                                    </div>\n                                </div>\n                            </app-card-container>\n                        </div>\n                    </div>\n                    <table class=\"table table-striped table-hover table-sm nowrap\">\n                        <tr>\n                            <th>\n                                {{\"labels.conf\" | translate }}\n                            </th>\n                            <th>\n                                {{\"labels.produto\" | translate }}\n                            </th>\n                            <th>\n                                {{\"labels.marca\" | translate}}\n                            </th>\n                            <th>\n                                {{\"labels.cliente\" | translate}}\n                            </th>\n                            <th>\n                                {{\"labels.quantid\" | translate}}\n                            </th>\n                            <th>\n                                {{\"labels.un\" | translate}}\n                            </th>\n                        </tr>\n                        <tbody>\n                            <tr *ngFor=\"let val of dados; let i = index\" (dblclick)=\"selected(val, i)\">\n                                <td class=\"text-center td-center-h\" style=\"width: 10%;\">\n                                    <label class=\"chk\">\n                                        <input type=\"checkbox\" id=\"flagLib\" name=\"flagLib\" value=\"checked\"\n                                            (ngModelChange)=\"t.flagLib = $event ? 'S' : 'N'\"\n                                            [ngModel]=\"val.flagLib ==='S'\" style=\"margin-left:auto; margin-right:auto;\"\n                                            disabled>\n                                        <span [ngClass]=\"{'red':val.flag == true ? true : false}\"></span>\n                                    </label>\n                                </td>\n                                <td>\n                                    {{ val.nomeMaterial }}\n                                </td>\n                                <td style=\"width: 10%;\">\n                                    {{ val.campoMarcado }}\n                                </td>\n                                <td>\n                                    {{ val.nomeCliente }}\n                                </td>\n                                <td style=\"width: 10%;\">\n                                    {{ val.quantid | formatCurrency:0 }}\n                                </td>\n                                <td style=\"width: 10%;\">\n                                    {{ val.unidade }}\n                                </td>\n                            </tr>\n                            <tr *ngIf=\"!dados || dados.length === 0\">\n                                <th colspan=\"6\">\n                                    {{'messages.nenhumRegistroEncontrado' | translate }}\n                                </th>\n                            </tr>\n                        </tbody>\n                    </table>\n\n                    <div class=\"modal-footer\">\n                        <button type=\"button\" class=\"btn btn-default\" (click)=\"back()\">\n                            {{ 'buttons.cancelar' | translate }}\n                        </button>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-observacoes/programacao-navio-observacoes.component.html":
/*!*******************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-observacoes/programacao-navio-observacoes.component.html ***!
  \*******************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<form class=\"form\" #form=\"ngForm\" (ngSubmit)=\"onSubmit(form)\" *ngIf=\"!showTable\" autocomplete=\"off\">\n    <div class=\"row\">\n        <div class=\"col-lg-6\">\n            <div class=\"form-group\">\n                <label for=\"observacoes1\">{{'labels.observacoes' | translate}}</label>\n                <textarea id=\"observacoes1\" class=\"form-control form-control-sm\" name=\"observacoes1\" maxlength=\"250\"\n                          rows=\"5\"\n                          [(ngModel)]=\"service.programacaoNavio.observacoes.observacoes1\" [disabled]=\"isDetail\"></textarea>\n            </div>\n        </div>\n    </div>\n</form>\n");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-outras-operacoes/programacao-navio-outras-operacoes-dados/programacao-navio-outras-operacoes-dados.component.html":
/*!****************************************************************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-outras-operacoes/programacao-navio-outras-operacoes-dados/programacao-navio-outras-operacoes-dados.component.html ***!
  \****************************************************************************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"modal fade\" id=\"app-programacao-navio-outras-operacoes-dados\" tabindex=\"-1\" role=\"dialog\"\n    data-backdrop=\"static\">\n    <div class=\"modal-dialog\">\n        <div class=\"modal-content\">\n            <div class=\"modal-header\">\n                <h6 class=\"modal-title\">{{ 'titles.dadosAntaq' | translate }}</h6>\n            </div>\n            <form class=\"form\" #formOutrasDados=\"ngForm\">\n                <div class=\"modal-body\">\n                    <ng-container *ngIf=\"item\">\n                        <app-validacoes [formErrorId]=\"'formOutrasDados'\" [validacoes]=\"messages\"></app-validacoes>\n                        <div class=\"row\">\n                            <div class=\"col-12\">\n                                <div class=\"form-group form-group-sm\">\n                                    <label for=\"mooTipoOperCarga\" class=\"required\">{{ \"labels.tipoOperacaoCarga\" |\n                                        translate}}</label>\n                                    <app-combo-padrao id=\"mooTipoOperCarga\" name=\"tipoOperacaoCarga\"\n                                        tabela=\"TipoOperacaoCarga\" descricao=\"DescrTipoOperCarga\" chave=\"TipoOperCarga\"\n                                        [(ngModel)]=\"item.tipoOperCarga\" required\n                                        (outObjeto)=\"validation.validaTipoOperCargaPermitido(item)\">\n                                    </app-combo-padrao>\n                                </div>\n                            </div>\n                        </div>\n                    </ng-container>\n                </div>\n                <div class=\"modal-footer\">\n                    <button class=\"btn btn-success mr-1\" type=\"button\" (click)=\"onSubmit(formOutrasDados)\">{{\n                        'buttons.salvar' |\n                        translate }}\n                    </button>\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Sair</button>\n                </div>\n            </form>\n        </div>\n    </div>\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-outras-operacoes/programacao-navio-outras-operacoes.component.html":
/*!*****************************************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-outras-operacoes/programacao-navio-outras-operacoes.component.html ***!
  \*****************************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"container-buttons\">\n    <div class=\"btn-group\">\n        <app-menu-button title=\"{{ 'buttons.voltar' | translate }}\" [icon]=\"'icon-arrow-left'\" (click)=\"back()\"\n            *ngIf=\"!showTable\">\n        </app-menu-button>\n        <app-menu-button title=\"{{ 'buttons.novo' | translate }}\" [icon]=\"'icon-plus'\" *ngIf=\"showTable\"\n            [disabled]=\"isDetail\" (click)=\"new()\">\n        </app-menu-button>\n        <app-menu-button title=\"{{ 'buttons.visualizar' | translate }}\" [icon]=\"'icon-eye'\" *ngIf=\"showTable\"\n            [disabled]=\"!outraOperacao?.item\" (click)=\"show()\">\n        </app-menu-button>\n        <app-menu-button title=\"{{ 'buttons.editar' | translate }}\" [icon]=\"'icon-pencil'\" *ngIf=\"showTable || detail\"\n            [disabled]=\"!outraOperacao?.item || isDetail\" (click)=\"edit()\">\n        </app-menu-button>\n        <app-menu-button title=\"{{ 'buttons.excluir' | translate }}\" [icon]=\"'icon-close'\"\n            [disabled]=\"!showTable || isDetail || (!outraOperacao?.item && !outraOperacao?.notMapped)\"\n            (click)=\"delete(outraOperacao)\">\n        </app-menu-button>\n        <app-menu-button title=\"{{ 'buttons.dadosAntaq' | translate }}\" [icon]=\"'fa fa-align-left'\"\n            [disabled]=\"!showTable || isDetail || (outraOperacao?.item == null && !outraOperacao?.notMapped)\"\n            (click)=\"dadosOutrasOperacoes()\" *ngIf=\"this.service.config.dadosAntaq\">\n        </app-menu-button>\n    </div>\n</div>\n<table class=\"table table-striped table-hover\" *ngIf=\"showTable\">\n    <tr>\n        <th>\n            {{\"labels.item\" | translate }}\n        </th>\n        <th>\n            {{\"labels.cliente\" | translate}}\n        </th>\n        <th>\n            {{\"labels.produto\" | translate}}\n        </th>\n    </tr>\n    <tbody>\n        <tr *ngFor=\"let val of service.programacaoNavio.outrasOperacoes | removeExcluidos;let i = index\"\n            (click)=\"selected(val, i)\"\n            [ngClass]=\"{'info':i === _index && outraOperacao.programacaoNavioId === val.programacaoNavioId }\">\n            <td>\n                <span>{{ val.item }}</span>\n            </td>\n            <td>\n                <span>{{ val.destinatarioIdCliente }}</span>\n            </td>\n            <td>\n                <span>{{ val.materialId }}</span>\n            </td>\n        </tr>\n        <tr *ngIf=\"!service.programacaoNavio.outrasOperacoes || service.programacaoNavio.outrasOperacoes.length === 0\">\n            <th colspan=\"3\">\n                {{'messages.nenhumRegistroEncontrado' | translate }}\n            </th>\n        </tr>\n    </tbody>\n</table>\n<form class=\"form\" #form=\"ngForm\" (ngSubmit)=\"onSubmit(form)\" *ngIf=\"!showTable\" autocomplete=\"off\">\n    <app-validacoes></app-validacoes>\n    <div class=\"tab-content top\">\n        <div class=\"row\">\n            <div class=\"col-lg-6\">\n                <div class=\"form-group form-group-sm\">\n                    <label for=\"clienteOp\" class=\"required\"> {{ 'labels.cliente' | translate }}\n                    </label>\n                    <input type=\"text\" class=\"form-control-sm form-control\" id=\"clienteOp\" name=\"clienteOp\"\n                        [disabled]=\"detail === true? true: null\" [(ngModel)]=\"outraOperacao.destinatarioIdCliente\">\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=\"materialOp\" class=\"required\"> {{ 'labels.produto' | translate }}\n                    </label>\n                    <input type=\"text\" class=\"form-control-sm form-control\" id=\"materialOp\" required=\"true\"\n                        name=\"materialOp\" [disabled]=\"detail === true? true: null\"\n                        [(ngModel)]=\"outraOperacao.materialId\">\n                </div>\n            </div>\n        </div>\n        <div class=\"row\">\n            <div class=\"col-lg-4\">\n                <div class=\"form-group form-group-sm\">\n                    <label for=\"codNBM\">{{ 'labels.classificacaoFiscal' | translate}}</label>\n                    <app-combo-padrao id=\"codNBM\" name=\"codNBM\" tabela=\"ClassificacaoFiscal\" descricao=\"codNBM\"\n                        chave=\"CodNbm\" [disabled]=\"detail === true? true: null\" [(ngModel)]=\"outraOperacao.codNBM\">\n                    </app-combo-padrao>\n                </div>\n            </div>\n        </div>\n        <div class=\"row\">\n            <div class=\"col-lg-4 col-md-8\">\n                <div class=\"form-group form-group-sm\">\n                    <label class=\"required\" for=\"quantidade\">{{'labels.quantidade' | translate}}</label>\n                    <input type=\"text\" id=\"quantidade\" name=\"quantidade\" class=\"form-control form-control-sm\"\n                        maxlength=\"15\" [disabled]=\"detail === true? true: null\" required=\"true\"\n                        [(ngModel)]=\"outraOperacao.quantid\" currencyMask\n                        [options]=\"{ prefix: '', thousands: '.', decimal: ',', precision: 0 }\">\n                </div>\n            </div>\n            <div class=\"col-lg-2 col-md-4\">\n                <div class=\"form-group form-group-sm\">\n                    <label for=\"unidade\">{{ \"labels.unidade\" | translate }}</label>\n                    <select class=\"form-control form-control-sm\" id=\"unidade\" name=\"unidade\"\n                        [disabled]=\"detail === true? true: null\" [(ngModel)]=\"outraOperacao.unidade\">\n                        <option value=\"\">{{ 'labels.selecione' | translate }}</option>\n                        <option *ngFor=\"let item of units\" value=\"{{ item.value }}\">{{ item.name }}</option>\n                    </select>\n                </div>\n            </div>\n        </div>\n        <div class=\"row\">\n            <div class=\"col-lg-4 col-md-12\">\n                <div class=\"form-group form-group-sm\">\n                    <label for=\"tipoOperacao\" class=\"required\">{{ 'labels.tipoDeOperacao' | translate}}</label>\n                    <select class=\"form-control form-control-sm\" id=\"tipoOperacao\" name=\"tipoOperacao\"\n                        [disabled]=\"detail === true || (outraOperacao.programacaoNavioId && !service.sitNaoPermitidos.includes(+service.programacaoNavio.codSitNavio) && !service.config.dadosAntaq)? true: null\"\n                        [(ngModel)]=\"outraOperacao.tipoOperacao\" (ngModelChange)=\"changeOperationType()\"\n                        required=\"true\">\n                        <option value=\"0\">{{ 'labels.selecione' | translate }}</option>\n                        <option *ngFor=\"let item of tiposOperacao\" value=\"{{ item.tipoOperacaoId }}\">{{\n                            item.descrTipoOperacao }}</option>\n                    </select>\n                </div>\n            </div>\n            <div class=\"col-lg-4 col-md-12\">\n                <div class=\"form-group form-group-sm\">\n                    <label>&nbsp;</label>\n                    <br />\n                    <fieldset [disabled]=\"detail || disabledTipoMov\">\n                        <div class=\"form-check-inline\">\n                            <input type=\"radio\" name=\"tipoMov\" id=\"tipoMovC\" class=\"form-check-input\" value=\"C\"\n                                [(ngModel)]=\"outraOperacao.tipoMov\"\n                                [required]=\"obrigaTipoMov\" />\n                            <label for=\"tipoMovC\" class=\"form-check-label\">{{ 'labels.carga' | translate\n                                }}</label>\n                        </div>\n                        <div class=\"form-check-inline\">\n                            <input id=\"tipoMovD\" type=\"radio\" name=\"tipoMov\" class=\"form-check-input\" value=\"D\"\n                                [(ngModel)]=\"outraOperacao.tipoMov\" />\n                            <label for=\"tipoMovD\" class=\"form-check-label\">{{ 'labels.descarga' | translate\n                                }}</label>\n                        </div>\n                    </fieldset>\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=\"tipoOperCarga\" class=\"required\">{{ 'labels.tipoOperCarga' | translate}}</label>\n                    <app-combo-padrao id=\"tipoOperCarga\" name=\"tipoOperCarga\" tabela=\"TipoOperacaoCarga\"\n                        descricao=\"DescrTipoOperCarga\" chave=\"TipoOperCarga\"\n                        [disabled]=\"detail === true || (outraOperacao.programacaoNavioId && !service.sitNaoPermitidos.includes(+service.programacaoNavio.codSitNavio) && !service.config.dadosAntaq)? true: null\"\n                        [(ngModel)]=\"outraOperacao.tipoOperCarga\" required=\"true\" (outObjeto)=\"trataTipoOperCarga()\">\n                    </app-combo-padrao>\n                </div>\n            </div>\n        </div>\n        <div class=\"row\">\n            <div class=\"col-lg-4\">\n                <div class=\"form-group form-group-sm\">\n                    <label for=\"codPortoOri\">{{ 'labels.codPortoOri' | translate}}</label>\n                    <app-combo-padrao id=\"codPortoOri\" name=\"codPortoOri\" tabela=\"Porto\" descricao=\"DescrPorto\"\n                        chave=\"CodPorto\" [disabled]=\"detail === true? true: null\"\n                        [(ngModel)]=\"outraOperacao.codPortoOri\">\n                    </app-combo-padrao>\n                </div>\n            </div>\n        </div>\n        <div class=\"row\">\n            <div class=\"col-lg-4\">\n                <div class=\"form-group form-group-sm\">\n                    <label for=\"codPortoDest\">{{ 'labels.codPortoDest' | translate}}</label>\n                    <app-combo-padrao id=\"codPortoDest\" name=\"codPortoDest\" tabela=\"Porto\" descricao=\"DescrPorto\"\n                        chave=\"CodPorto\" [disabled]=\"detail === true? true: null\"\n                        [(ngModel)]=\"outraOperacao.codPortoDest\">\n                    </app-combo-padrao>\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                    <button class=\"btn btn-success mr-1\" type=\"submit\" [disabled]=\"isDetail || detail\">{{\n                        'buttons.salvar' | translate }}\n                    </button>\n                </div>\n            </div>\n        </div>\n    </div>\n</form>\n\n<ng-container *ngIf=\"this.service.config.dadosAntaq\">\n    <app-programacao-navio-outras-operacoes-dados (execute)=\"outDadosOutrasOperacoes($event)\">\n    </app-programacao-navio-outras-operacoes-dados>\n</ng-container>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-status/programacao-navio-status.component.html":
/*!*********************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-status/programacao-navio-status.component.html ***!
  \*********************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<table class=\"table table-striped table-hover\" *ngIf=\"showTable\">\n    <tr>\n        <th>\n            {{\"labels.data\" | translate  }}\n        </th>\n        <th>\n            {{\"labels.status\" | translate}}\n        </th>\n        <th>\n            {{\"labels.observacao\" | translate}}\n        </th>\n    </tr>\n    <tbody>\n    <tr *ngFor=\"let val of service.programacaoNavio.status | removeExcluidos;let i = index\">\n        <td>\n            {{ val.dtStatus }}\n        </td>\n        <td>\n            {{ val.statusNavio.descrStatus }}\n        </td>\n        <td>\n            {{ val.observ }}\n        </td>\n    </tr>\n    <tr *ngIf=\"!service.programacaoNavio.status || service.programacaoNavio.status.length === 0\">\n        <th colspan=\"3\">\n            {{'messages.nenhumRegistroEncontrado' | translate }}\n        </th>\n    </tr>\n    </tbody>\n</table>\n");

/***/ }),

/***/ "./src/app/pages/operacao/programacao-navio/programacao-navio-confirmacao-chegada/programacao-navio-confirmacao-chegada.component.scss":
/*!*********************************************************************************************************************************************!*\
  !*** ./src/app/pages/operacao/programacao-navio/programacao-navio-confirmacao-chegada/programacao-navio-confirmacao-chegada.component.scss ***!
  \*********************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = (".modal-dialog.others {\n  width: 20%;\n}\n\n#confirmacaoChegadaNavio .custom-alert {\n  margin: 5%;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcGFnZXMvb3BlcmFjYW8vcHJvZ3JhbWFjYW8tbmF2aW8vcHJvZ3JhbWFjYW8tbmF2aW8tY29uZmlybWFjYW8tY2hlZ2FkYS9DOlxcQ29ycG9yYXRlXFxDb3Jwb3JhdGVXZWJEZXNlbnZcXF91bmlzb2x1dGlvbi9zcmNcXGFwcFxccGFnZXNcXG9wZXJhY2FvXFxwcm9ncmFtYWNhby1uYXZpb1xccHJvZ3JhbWFjYW8tbmF2aW8tY29uZmlybWFjYW8tY2hlZ2FkYVxccHJvZ3JhbWFjYW8tbmF2aW8tY29uZmlybWFjYW8tY2hlZ2FkYS5jb21wb25lbnQuc2NzcyIsInNyYy9hcHAvcGFnZXMvb3BlcmFjYW8vcHJvZ3JhbWFjYW8tbmF2aW8vcHJvZ3JhbWFjYW8tbmF2aW8tY29uZmlybWFjYW8tY2hlZ2FkYS9wcm9ncmFtYWNhby1uYXZpby1jb25maXJtYWNhby1jaGVnYWRhLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsVUFBQTtBQ0NGOztBREVBO0VBQ0UsVUFBQTtBQ0NGIiwiZmlsZSI6InNyYy9hcHAvcGFnZXMvb3BlcmFjYW8vcHJvZ3JhbWFjYW8tbmF2aW8vcHJvZ3JhbWFjYW8tbmF2aW8tY29uZmlybWFjYW8tY2hlZ2FkYS9wcm9ncmFtYWNhby1uYXZpby1jb25maXJtYWNhby1jaGVnYWRhLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLm1vZGFsLWRpYWxvZy5vdGhlcnMge1xyXG4gIHdpZHRoOiAyMCU7XHJcbn1cclxuXHJcbiNjb25maXJtYWNhb0NoZWdhZGFOYXZpbyAuY3VzdG9tLWFsZXJ0IHtcclxuICBtYXJnaW46IDUlXHJcbn1cclxuIiwiLm1vZGFsLWRpYWxvZy5vdGhlcnMge1xuICB3aWR0aDogMjAlO1xufVxuXG4jY29uZmlybWFjYW9DaGVnYWRhTmF2aW8gLmN1c3RvbS1hbGVydCB7XG4gIG1hcmdpbjogNSU7XG59Il19 */");

/***/ }),

/***/ "./src/app/pages/operacao/programacao-navio/programacao-navio-confirmacao-chegada/programacao-navio-confirmacao-chegada.component.ts":
/*!*******************************************************************************************************************************************!*\
  !*** ./src/app/pages/operacao/programacao-navio/programacao-navio-confirmacao-chegada/programacao-navio-confirmacao-chegada.component.ts ***!
  \*******************************************************************************************************************************************/
/*! exports provided: ProgramacaoNavioConfirmacaoChegadaComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoNavioConfirmacaoChegadaComponent", function() { return ProgramacaoNavioConfirmacaoChegadaComponent; });
/* harmony import */ var _shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../../../shared/services/funcoes/date-time-utils/date-time-utils.static.service */ "./src/app/shared/services/funcoes/date-time-utils/date-time-utils.static.service.ts");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _login_login_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _programacao_navio_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../programacao-navio.service */ "./src/app/pages/operacao/programacao-navio/programacao-navio.service.ts");
/* harmony import */ var _programacao_navio_model__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../programacao-navio.model */ "./src/app/pages/operacao/programacao-navio/programacao-navio.model.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");
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 ProgramacaoNavioConfirmacaoChegadaComponent = /** @class */ (function () {
    function ProgramacaoNavioConfirmacaoChegadaComponent(loginService, message, service) {
        this.loginService = loginService;
        this.message = message;
        this.service = service;
        this.filtrar = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
        this.mascara = new _config_enumerables__WEBPACK_IMPORTED_MODULE_6__["Mascaras"]();
    }
    ProgramacaoNavioConfirmacaoChegadaComponent.prototype.ngOnInit = function () {
    };
    ProgramacaoNavioConfirmacaoChegadaComponent.prototype.onSubmit = function (form) {
        _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_7__["EventEmitterService"].get("formError").emit(form);
        if (form.invalid) {
            return;
        }
        if (_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_0__["DateTimeUtilsStaticService"].maiorAHoje(this.programacaoNavioLiberacaoChegada.dtPrograma, ['H', 'M'])) {
            this.message.warning('titles.programacaoNavio', 'messages.dataNaoPodeSerMaiorQueDataAtual');
            return;
        }
        this.filtrar.emit(this.programacaoNavioLiberacaoChegada);
    };
    ProgramacaoNavioConfirmacaoChegadaComponent.ctorParameters = function () { return [
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_2__["LoginService"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_3__["MessageService"] },
        { type: _programacao_navio_service__WEBPACK_IMPORTED_MODULE_4__["ProgramacaoNavioService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])(),
        __metadata("design:type", Object)
    ], ProgramacaoNavioConfirmacaoChegadaComponent.prototype, "filtrar", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(),
        __metadata("design:type", _programacao_navio_model__WEBPACK_IMPORTED_MODULE_5__["ProgramacaoNavioLiberacaoChegada"])
    ], ProgramacaoNavioConfirmacaoChegadaComponent.prototype, "programacaoNavioLiberacaoChegada", void 0);
    ProgramacaoNavioConfirmacaoChegadaComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
            selector: 'app-programacao-navio-confirmacao-chegada',
            template: __importDefault(__webpack_require__(/*! raw-loader!./programacao-navio-confirmacao-chegada.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-confirmacao-chegada/programacao-navio-confirmacao-chegada.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
            styles: [__importDefault(__webpack_require__(/*! ./programacao-navio-confirmacao-chegada.component.scss */ "./src/app/pages/operacao/programacao-navio/programacao-navio-confirmacao-chegada/programacao-navio-confirmacao-chegada.component.scss")).default]
        }),
        __metadata("design:paramtypes", [_login_login_service__WEBPACK_IMPORTED_MODULE_2__["LoginService"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_3__["MessageService"],
            _programacao_navio_service__WEBPACK_IMPORTED_MODULE_4__["ProgramacaoNavioService"]])
    ], ProgramacaoNavioConfirmacaoChegadaComponent);
    return ProgramacaoNavioConfirmacaoChegadaComponent;
}());



/***/ }),

/***/ "./src/app/pages/operacao/programacao-navio/programacao-navio-dados-antaq/programacao-navio-dados-antaq.component.ts":
/*!***************************************************************************************************************************!*\
  !*** ./src/app/pages/operacao/programacao-navio/programacao-navio-dados-antaq/programacao-navio-dados-antaq.component.ts ***!
  \***************************************************************************************************************************/
/*! exports provided: ProgramacaoNavioDadosAntaqComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoNavioDadosAntaqComponent", function() { return ProgramacaoNavioDadosAntaqComponent; });
/* harmony import */ var _shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../../../shared/services/funcoes/array-utils/array-utils.static.service */ "./src/app/shared/services/funcoes/array-utils/array-utils.static.service.ts");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _programacao_navio_model__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../programacao-navio.model */ "./src/app/pages/operacao/programacao-navio/programacao-navio.model.ts");
/* harmony import */ var _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__ = __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_funcoes_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _programacao_navio_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./../programacao-navio.service */ "./src/app/pages/operacao/programacao-navio/programacao-navio.service.ts");
/* harmony import */ var _programacao_navio_validation__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../programacao-navio.validation */ "./src/app/pages/operacao/programacao-navio/programacao-navio.validation.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 __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 ProgramacaoNavioDadosAntaqComponent = /** @class */ (function () {
    function ProgramacaoNavioDadosAntaqComponent(service, funcoes, message) {
        var _this = this;
        this.service = service;
        this.funcoes = funcoes;
        this.message = message;
        this.execute = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
        this.tiposNavegacao = _programacao_navio_model__WEBPACK_IMPORTED_MODULE_2__["ProgramacaoNavio"].ETipoNavegacao();
        this.tiposOperacao = _programacao_navio_model__WEBPACK_IMPORTED_MODULE_2__["ProgramacaoNavio"].ETipoOperacao();
        this.validation = new _programacao_navio_validation__WEBPACK_IMPORTED_MODULE_7__["ProgramacaoNavioValidation"](false, service, message, funcoes);
        this.sub = _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__["EventEmitterService"].get('emitProgramacaoNavioDadosAntaq').subscribe(function (_) {
            _this.messages = [];
            _this.programacaoNavio = _;
            jQuery("#app-programacao-navio-dados-antaq").modal("show");
        });
    }
    ProgramacaoNavioDadosAntaqComponent.prototype.ngOnDestroy = function () {
        this.sub.unsubscribe();
    };
    ProgramacaoNavioDadosAntaqComponent.prototype.ngOnInit = function () {
    };
    ProgramacaoNavioDadosAntaqComponent.prototype.onSubmit = function (form) {
        _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__["EventEmitterService"].get("formDadosAntaq").emit(form);
        if (form.invalid)
            return;
        if (this.hasError())
            return;
        jQuery("#app-programacao-navio-dados-antaq").modal("hide");
        this.execute.emit(this.programacaoNavio);
    };
    ProgramacaoNavioDadosAntaqComponent.prototype.hasError = function () {
        var messages = [];
        messages.push(this.validation.dtAtracacaoNaoPodeSerMaiorDtDesatracao(this.programacaoNavio, false));
        messages.push(this.validation.inicioOperNaoPodeSerMenorQueDtAtraca(this.programacaoNavio, false));
        messages.push(this.validation.fimOperNaoPodeSerMenorQueInicioOper(this.programacaoNavio, false));
        if (_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_0__["ArrayUtilsStaticService"].any(messages)) {
            this.messages = messages.filter(function (c) { return !c.isValid; }).map(function (c) { return c.message; });
            return _shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_0__["ArrayUtilsStaticService"].any(this.messages);
        }
        else
            false;
    };
    ProgramacaoNavioDadosAntaqComponent.ctorParameters = function () { return [
        { type: _programacao_navio_service__WEBPACK_IMPORTED_MODULE_6__["ProgramacaoNavioService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__["MessageService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])(),
        __metadata("design:type", Object)
    ], ProgramacaoNavioDadosAntaqComponent.prototype, "execute", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])(),
        __metadata("design:type", _programacao_navio_model__WEBPACK_IMPORTED_MODULE_2__["ProgramacaoNavio"])
    ], ProgramacaoNavioDadosAntaqComponent.prototype, "programacaoNavio", void 0);
    ProgramacaoNavioDadosAntaqComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
            selector: 'app-programacao-navio-dados-antaq',
            template: __importDefault(__webpack_require__(/*! raw-loader!./programacao-navio-dados-antaq.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-dados-antaq/programacao-navio-dados-antaq.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_programacao_navio_service__WEBPACK_IMPORTED_MODULE_6__["ProgramacaoNavioService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__["MessageService"]])
    ], ProgramacaoNavioDadosAntaqComponent);
    return ProgramacaoNavioDadosAntaqComponent;
}());



/***/ }),

/***/ "./src/app/pages/operacao/programacao-navio/programacao-navio-dados/programacao-navio-dados.component.ts":
/*!***************************************************************************************************************!*\
  !*** ./src/app/pages/operacao/programacao-navio/programacao-navio-dados/programacao-navio-dados.component.ts ***!
  \***************************************************************************************************************/
/*! exports provided: ProgramacaoNavioDadosComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoNavioDadosComponent", function() { return ProgramacaoNavioDadosComponent; });
/* harmony import */ var _shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../shared/services/funcoes/array-utils/array-utils.static.service */ "./src/app/shared/services/funcoes/array-utils/array-utils.static.service.ts");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _programacao_navio_model__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../programacao-navio.model */ "./src/app/pages/operacao/programacao-navio/programacao-navio.model.ts");
/* harmony import */ var _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__ = __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_funcoes_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _programacao_navio_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../programacao-navio.service */ "./src/app/pages/operacao/programacao-navio/programacao-navio.service.ts");
/* harmony import */ var _programacao_navio_validation__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../programacao-navio.validation */ "./src/app/pages/operacao/programacao-navio/programacao-navio.validation.ts");
/* harmony import */ var app_pages_cadastro_viagem_navio_viagem_navio_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! app/pages/cadastro/viagem-navio/viagem-navio.service */ "./src/app/pages/cadastro/viagem-navio/viagem-navio.service.ts");
/* harmony import */ var app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! app/shared/services/funcoes/configuracao/configuracao.facade */ "./src/app/shared/services/funcoes/configuracao/configuracao.facade.ts");
/* harmony import */ var _programacao_navio_constants__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../programacao-navio.constants */ "./src/app/pages/operacao/programacao-navio/programacao-navio.constants.ts");
/* harmony import */ var app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! app/shared/services/funcoes/number-utils/number-utils.static.service */ "./src/app/shared/services/funcoes/number-utils/number-utils.static.service.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 __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 ProgramacaoNavioDadosComponent = /** @class */ (function () {
    function ProgramacaoNavioDadosComponent(service, funcoes, message, serviceViagemNavio, configuracao) {
        var _this = this;
        this.service = service;
        this.funcoes = funcoes;
        this.message = message;
        this.serviceViagemNavio = serviceViagemNavio;
        this.configuracao = configuracao;
        this.execute = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
        this.viagemDisabled = false;
        this.dataIndex = new _programacao_navio_model__WEBPACK_IMPORTED_MODULE_2__["ProgramacaoNavioDto"]();
        this.constantes = new _programacao_navio_constants__WEBPACK_IMPORTED_MODULE_10__["ProgramacaoNavioConstants"]();
        this.loadConfig = function () {
            if (_this.configuracao.isLoadConfig()) {
                _this.service.config.obrDtAtrSaida = _this.configuracao.boolean("OPE", "ObrDtAtrSaida");
                _this.service.config.camposObrigatorios = _this.configuracao.boolean("OPE", "CamposObrigatorios");
                _this.service.config.operacaoAppa = _this.configuracao.boolean("OPE", "OperacaoAppa");
                _this.service.config.dadosAntaq = _this.configuracao.boolean("OPE", "DadosAntaq");
            }
        };
        this.validation = new _programacao_navio_validation__WEBPACK_IMPORTED_MODULE_7__["ProgramacaoNavioValidation"](false, service, message, funcoes);
        this.sub = _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__["EventEmitterService"].get('emitProgramacaoNavioDados').subscribe(function (dataIndex) {
            _this.programacaoNavio = new _programacao_navio_model__WEBPACK_IMPORTED_MODULE_2__["ProgramacaoNavio"]();
            _this.messages = [];
            _this.dataIndex = dataIndex;
            _this.getViagemNavio(_this.dataIndex.destinatarioIdNavio);
            _this.setDados();
            _this.configuracao.getConfig(_this.constantes.configs, _this.loadConfig);
            jQuery("#app-programacao-navio-dados").modal("show");
        });
    }
    ProgramacaoNavioDadosComponent.prototype.setDados = function () {
        this.programacaoNavio.dtSaida = this.dataIndex.dtSaida;
        this.programacaoNavio.escalaNavio = this.dataIndex.escalaNavio;
        this.programacaoNavio.regViagem = this.dataIndex.regViagem;
        this.programacaoNavio.dtAtracacao = this.dataIndex.dtAtracacao;
    };
    ProgramacaoNavioDadosComponent.prototype.ngOnDestroy = function () {
        this.sub.unsubscribe();
    };
    ProgramacaoNavioDadosComponent.prototype.ngOnInit = function () {
        this.regViagemList = [];
    };
    ProgramacaoNavioDadosComponent.prototype.onSubmit = function (form) {
        _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__["EventEmitterService"].get("formAD").emit(form);
        if (form.invalid)
            return;
        if (this.hasError())
            return;
        if (app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_11__["NumberUtilsStaticService"].isNotPositive(this.programacaoNavio.regViagem)) {
            this.programacaoNavio.regViagem = null;
        }
        this.execute.emit(this.programacaoNavio);
    };
    ProgramacaoNavioDadosComponent.prototype.hasError = function () {
        var messages = [];
        messages.push(this.validation.dataSaidaMenorDataAtracacao({ dtSaida: this.programacaoNavio.dtSaida, dtAtracacao: this.programacaoNavio.dtAtracacao }, false));
        if (this.service.config.camposObrigatorios && app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_11__["NumberUtilsStaticService"].isNotPositive(this.programacaoNavio.regViagem)) {
            this.message.warning("titles.programacaoNavio", "messages.campoObrigatorio", { name: this.message.translate('labels.viagem') });
            return true;
        }
        if (this.programacaoNavio.escalaNavio && this.programacaoNavio.escalaNavio.length < 3) {
            this.message.warning("titles.programacaoNavio", "messages.formatoValorCampoNOperacaoAPPAinvalido");
            return true;
        }
        if (_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_0__["ArrayUtilsStaticService"].any(messages)) {
            this.messages = messages.filter(function (c) { return !c.isValid; }).map(function (c) { return c.message; });
            return _shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_0__["ArrayUtilsStaticService"].any(this.messages);
        }
        else
            false;
    };
    ProgramacaoNavioDadosComponent.prototype.getViagemNavio = function (id) {
        var _this = this;
        if (!id) {
            return;
        }
        this.serviceViagemNavio.getViagemNavioByNavio(id).subscribe(function (resp) {
            _this.regViagemList = resp;
        });
    };
    ProgramacaoNavioDadosComponent.ctorParameters = function () { return [
        { type: _programacao_navio_service__WEBPACK_IMPORTED_MODULE_6__["ProgramacaoNavioService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__["MessageService"] },
        { type: app_pages_cadastro_viagem_navio_viagem_navio_service__WEBPACK_IMPORTED_MODULE_8__["ViagemNavioService"] },
        { type: app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_9__["ConfiguracaoFacade"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])(),
        __metadata("design:type", Object)
    ], ProgramacaoNavioDadosComponent.prototype, "execute", void 0);
    ProgramacaoNavioDadosComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
            selector: 'app-programacao-navio-dados',
            template: __importDefault(__webpack_require__(/*! raw-loader!./programacao-navio-dados.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-dados/programacao-navio-dados.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_programacao_navio_service__WEBPACK_IMPORTED_MODULE_6__["ProgramacaoNavioService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__["MessageService"],
            app_pages_cadastro_viagem_navio_viagem_navio_service__WEBPACK_IMPORTED_MODULE_8__["ViagemNavioService"],
            app_shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_9__["ConfiguracaoFacade"]])
    ], ProgramacaoNavioDadosComponent);
    return ProgramacaoNavioDadosComponent;
}());



/***/ }),

/***/ "./src/app/pages/operacao/programacao-navio/programacao-navio-export/programacao-navio-export.component.ts":
/*!*****************************************************************************************************************!*\
  !*** ./src/app/pages/operacao/programacao-navio/programacao-navio-export/programacao-navio-export.component.ts ***!
  \*****************************************************************************************************************/
/*! exports provided: ProgramacaoNavioExportComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoNavioExportComponent", function() { return ProgramacaoNavioExportComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! app/shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.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 __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 ProgramacaoNavioExportComponent = /** @class */ (function () {
    function ProgramacaoNavioExportComponent() {
        this.filtrar = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
    }
    ProgramacaoNavioExportComponent.prototype.ngOnInit = function () {
        this.exportOption = "";
        this.initOpcoesExportacao();
    };
    ProgramacaoNavioExportComponent.prototype.initOpcoesExportacao = function () {
        this.exportOptions = [
            { value: "listagemItens", label: "labels.listagemItens" },
            { value: "programacaoNavio", label: "labels.programacaoNavio" },
            { value: "reemissaoCrd", label: "labels.reemissaoCrd" },
            { value: "capaProcessoExportacao", label: "labels.capaProcessoExportacao" },
            { value: "ordemEmbarque", label: "labels.ordemEmbarque" },
        ];
    };
    ProgramacaoNavioExportComponent.prototype.onSubmit = function (form) {
        if (form.invalid) {
            app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_1__["EventEmitterService"].get("formError").emit(form);
            return;
        }
        this.filtrar.emit(this.exportOption);
        this.exportOption = "";
        jQuery("#app-programacao-navio-export").modal("hide");
    };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], ProgramacaoNavioExportComponent.prototype, "filtrar", void 0);
    ProgramacaoNavioExportComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: 'app-programacao-navio-export',
            template: __importDefault(__webpack_require__(/*! raw-loader!./programacao-navio-export.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-export/programacao-navio-export.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [])
    ], ProgramacaoNavioExportComponent);
    return ProgramacaoNavioExportComponent;
}());



/***/ }),

/***/ "./src/app/pages/operacao/programacao-navio/programacao-navio-filter/programacao-navio-filter.component.ts":
/*!*****************************************************************************************************************!*\
  !*** ./src/app/pages/operacao/programacao-navio/programacao-navio-filter/programacao-navio-filter.component.ts ***!
  \*****************************************************************************************************************/
/*! exports provided: ProgramacaoNavioFilterComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoNavioFilterComponent", function() { return ProgramacaoNavioFilterComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _login_login_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../login/login.service */ "./src/app/pages/login/login.service.ts");
/* 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 _programacao_navio_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../programacao-navio.service */ "./src/app/pages/operacao/programacao-navio/programacao-navio.service.ts");
/* harmony import */ var _cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../cadastro/destinatario/destinatario.service */ "./src/app/pages/cadastro/destinatario/destinatario.service.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 __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 ProgramacaoNavioFilterComponent = /** @class */ (function () {
    function ProgramacaoNavioFilterComponent(loginService, message, service, serviceDestinatario) {
        this.loginService = loginService;
        this.message = message;
        this.service = service;
        this.serviceDestinatario = serviceDestinatario;
        this.filtrar = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
    }
    ProgramacaoNavioFilterComponent.prototype.ngOnInit = function () {
        this.keyDownFunction();
    };
    ProgramacaoNavioFilterComponent.prototype.onSubmit = function (form) {
        if (!form.invalid) {
            if (!this.service.filter.destinatarioIdNavio) {
                this.service.filter.destinatarioIdNavio = 0;
            }
            this.filtrar.emit();
        }
    };
    ProgramacaoNavioFilterComponent.prototype.keyDownFunction = function () {
        jQuery("div.modal-content form").on('keypress', function (e) {
            if (e.which === 13) {
                e.preventDefault();
            }
        });
    };
    ProgramacaoNavioFilterComponent.prototype.trataNavio = function (navio) {
        this.service.filter.navio = navio;
    };
    ProgramacaoNavioFilterComponent.ctorParameters = function () { return [
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_1__["LoginService"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__["MessageService"] },
        { type: _programacao_navio_service__WEBPACK_IMPORTED_MODULE_3__["ProgramacaoNavioService"] },
        { type: _cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_4__["DestinatarioService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], ProgramacaoNavioFilterComponent.prototype, "filtrar", void 0);
    ProgramacaoNavioFilterComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: 'app-programacao-navio-filter',
            template: __importDefault(__webpack_require__(/*! raw-loader!./programacao-navio-filter.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-filter/programacao-navio-filter.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_login_login_service__WEBPACK_IMPORTED_MODULE_1__["LoginService"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__["MessageService"],
            _programacao_navio_service__WEBPACK_IMPORTED_MODULE_3__["ProgramacaoNavioService"],
            _cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_4__["DestinatarioService"]])
    ], ProgramacaoNavioFilterComponent);
    return ProgramacaoNavioFilterComponent;
}());



/***/ }),

/***/ "./src/app/pages/operacao/programacao-navio/programacao-navio-form/programacao-navio-form.component.ts":
/*!*************************************************************************************************************!*\
  !*** ./src/app/pages/operacao/programacao-navio/programacao-navio-form/programacao-navio-form.component.ts ***!
  \*************************************************************************************************************/
/*! exports provided: ProgramacaoNavioFormComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoNavioFormComponent", function() { return ProgramacaoNavioFormComponent; });
/* 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 rxjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
/* harmony import */ var _config_enumerables__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../config/enumerables */ "./src/app/config/enumerables.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_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_5__ = __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_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../shared/services/funcoes/configuracao/configuracao.facade */ "./src/app/shared/services/funcoes/configuracao/configuracao.facade.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.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 _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../cadastro/destinatario/destinatario.model */ "./src/app/pages/cadastro/destinatario/destinatario.model.ts");
/* harmony import */ var _cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../cadastro/destinatario/destinatario.service */ "./src/app/pages/cadastro/destinatario/destinatario.service.ts");
/* harmony import */ var _cadastro_navio_navio_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../cadastro/navio/navio.service */ "./src/app/pages/cadastro/navio/navio.service.ts");
/* harmony import */ var _cadastro_pier_pier_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../cadastro/pier/pier.service */ "./src/app/pages/cadastro/pier/pier.service.ts");
/* harmony import */ var _cadastro_viagem_navio_viagem_navio_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../cadastro/viagem-navio/viagem-navio.service */ "./src/app/pages/cadastro/viagem-navio/viagem-navio.service.ts");
/* harmony import */ var _login_login_service__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var _programacao_navio_constants__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../programacao-navio.constants */ "./src/app/pages/operacao/programacao-navio/programacao-navio.constants.ts");
/* harmony import */ var _programacao_navio_model__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../programacao-navio.model */ "./src/app/pages/operacao/programacao-navio/programacao-navio.model.ts");
/* harmony import */ var _programacao_navio_service__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../programacao-navio.service */ "./src/app/pages/operacao/programacao-navio/programacao-navio.service.ts");
/* harmony import */ var _programacao_navio_validation__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../programacao-navio.validation */ "./src/app/pages/operacao/programacao-navio/programacao-navio.validation.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 ProgramacaoNavioFormComponent = /** @class */ (function (_super) {
    __extends(ProgramacaoNavioFormComponent, _super);
    function ProgramacaoNavioFormComponent(router, messageService, activatedRoute, service, servicePier, serviceDestinatario, serviceViagemNavio, configuracao, serviceNavio, funcoesService, loginService, permissoesUtils) {
        var _this = _super.call(this, new _programacao_navio_constants__WEBPACK_IMPORTED_MODULE_16__["ProgramacaoNavioConstants"](), funcoesService) || this;
        _this.router = router;
        _this.messageService = messageService;
        _this.activatedRoute = activatedRoute;
        _this.service = service;
        _this.servicePier = servicePier;
        _this.serviceDestinatario = serviceDestinatario;
        _this.serviceViagemNavio = serviceViagemNavio;
        _this.configuracao = configuracao;
        _this.serviceNavio = serviceNavio;
        _this.funcoesService = funcoesService;
        _this.loginService = loginService;
        _this.permissoesUtils = permissoesUtils;
        _this.mensagens = [];
        _this.constantes = new _programacao_navio_constants__WEBPACK_IMPORTED_MODULE_16__["ProgramacaoNavioConstants"]();
        _this.target = _this.funcoesService.getTargetLocation();
        _this.blockFields = false;
        _this.mascara = new _config_enumerables__WEBPACK_IMPORTED_MODULE_3__["Mascaras"]();
        _this.viagemDisabled = false;
        _this.permissionAlteraPortos = false;
        _this.permissionAlteraDados = false;
        _this.permissionAlteraUnidade = false;
        _this.permissionAlteraREExcedente = false;
        _this.permissionExcluiItemCPEmbarque = false;
        _this.tiposNavegacao = _programacao_navio_model__WEBPACK_IMPORTED_MODULE_17__["ProgramacaoNavio"].ETipoNavegacao();
        _this.tiposOperacao = _programacao_navio_model__WEBPACK_IMPORTED_MODULE_17__["ProgramacaoNavio"].ETipoOperacao();
        _this.loadConfig = function () {
            if (_this.configuracao.isLoadConfig()) {
                _this.service.config.operacaoAppa = _this.configuracao.boolean("OPE", "OperacaoAppa");
                _this.service.config.camposObrigatorios = _this.configuracao.boolean("OPE", "CamposObrigatorios");
                _this.service.config.valDtChegada = _this.configuracao.boolean("OPE", "ValDtChegada");
                _this.service.config.progDataAnt = _this.configuracao.boolean("OPE", "ProgDataAnt");
                _this.service.config.obrDtAtrSaida = _this.configuracao.boolean("OPE", "ObrDtAtrSaida");
                _this.service.config.degradacao = _this.configuracao.lerConfig("OPE", "Degradacao");
                _this.service.config.outrasOperProg = _this.configuracao.boolean("OPE", "OutrasOperProg");
                _this.service.config.tipoNavegacao = _this.configuracao.lerConfig("OPE", "TipoNavegacao");
                _this.service.config.propriedadecarga = _this.configuracao.lerConfig("OPE", "Propriedadecarga");
                _this.service.config.dadosAntaq = _this.configuracao.boolean("OPE", "DadosAntaq");
                _this.service.config.reExcedente = _this.configuracao.boolean("OPE", "REExcedente");
                _this.service.config.obrigaCodIntegracao = _this.configuracao.boolean("OPE", "WebSolProgramNavio");
                _this.service.config.tradingPedEmb = _this.configuracao.boolean("WEB", "TradingPedEmb");
                _this.service.config.obrigaNavioEmbar = _this.configuracao.boolean("OPE", "obrigaNavioEmbar");
            }
            if (_this.service.programacaoNavio.tipoNavegacao === "0") {
                if (_this.service.config.tipoNavegacao === "0") {
                    _this.service.programacaoNavio.tipoNavegacao = '5';
                }
                else {
                    _this.service.programacaoNavio.tipoNavegacao = _this.service.config.tipoNavegacao;
                }
            }
            _this.constantes.listaForm.map(function (m) {
                if (m.action === 'dadosAntaq')
                    return m.exibeButton = _this.service.config.dadosAntaq;
            });
        };
        _this.validation = new _programacao_navio_validation__WEBPACK_IMPORTED_MODULE_19__["ProgramacaoNavioValidation"](_this.funcoesService.isDetail(_this.actionForm), service, messageService, funcoesService);
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    ProgramacaoNavioFormComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.regViagemList = [];
        this.showButton = true;
        this.item = new _programacao_navio_model__WEBPACK_IMPORTED_MODULE_17__["ItensModel"]();
        this.showComponents = false;
        this.caladoChegada = false;
        this.caladoSaida = false;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, this.permissoesUtils.getLibRotina(this.actionForm), function () { return __awaiter(_this, void 0, void 0, function () {
            var id;
            var _this = this;
            return __generator(this, function (_a) {
                this.configuracao.getConfig(this.constantes.configs, this.loadConfig);
                this.service.programacaoNavio = new _programacao_navio_model__WEBPACK_IMPORTED_MODULE_17__["ProgramacaoNavio"]();
                id = this.activatedRoute.snapshot.paramMap.get("id");
                if (id) {
                    this.alteraPortos();
                    this.vrfAlteraDados();
                    this.alteraUnidade();
                    this.alteraREExcedente();
                    this.excluiItemCPEmbarque();
                    this.service.getById(id).subscribe(function (resp) { return __awaiter(_this, void 0, void 0, function () {
                        var permiteAlterar;
                        return __generator(this, function (_a) {
                            switch (_a.label) {
                                case 0:
                                    this.service.programacaoNavio = resp;
                                    this.service.programacaoNavio.itens.map(function (el, idx) {
                                        el.sequencia = idx + 1;
                                        el.importadores.map(function (eli, idxi) {
                                            eli.sequencia = idxi + 1;
                                        });
                                    });
                                    if (!this.funcoesService.isEdit(this.actionForm)) return [3 /*break*/, 2];
                                    return [4 /*yield*/, this.service.validaAlteracao(this.service.programacaoNavio.programacaoNavioId, this.service.programacaoNavio.codSitNavio)];
                                case 1:
                                    permiteAlterar = _a.sent();
                                    if (!permiteAlterar) {
                                        this.detail();
                                        return [2 /*return*/];
                                    }
                                    _a.label = 2;
                                case 2:
                                    if (!resp.observacoes) {
                                        this.service.programacaoNavio.observacoes = new _programacao_navio_model__WEBPACK_IMPORTED_MODULE_17__["ObservacoesModel"]();
                                    }
                                    this.service.programacaoNavio.navio = resp.navio;
                                    if (this.service.programacaoNavio.navio) {
                                        this.getViagemNavio(this.service.programacaoNavio.navio.destinatarioId);
                                    }
                                    if (!this.service.programacaoNavio.regViagem) return [3 /*break*/, 4];
                                    return [4 /*yield*/, this.getRegViagem(this.service.programacaoNavio.regViagem)];
                                case 3:
                                    _a.sent();
                                    _a.label = 4;
                                case 4:
                                    this.service.programacaoNavio.agencia = resp.agencia;
                                    if (!this.service.programacaoNavio.agencia) {
                                        this.service.programacaoNavio.agencia = new _cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_10__["Destinatario"]();
                                    }
                                    this.service.programacaoNavio.operador = resp.operador;
                                    if (this.service.programacaoNavio.itens.length > 0) {
                                        this.item = this.service.programacaoNavio.itens[0];
                                    }
                                    this.showComponents = true;
                                    return [2 /*return*/];
                            }
                        });
                    }); });
                }
                else {
                    this.showComponents = true;
                    this.getCamposAdicionais();
                }
                return [2 /*return*/];
            });
        }); }, function () {
            _this.permissoesUtils.back();
        });
    };
    ProgramacaoNavioFormComponent.prototype.back = function () {
        this.funcoesService.desabilitarFiltro();
        this.router.navigate([this.target + "/operacao/programacaoNavio"]);
    };
    ProgramacaoNavioFormComponent.prototype.detail = function () {
        if (!!(this.service.programacaoNavio.programacaoNavioId)) {
            this.router.navigate([this.target + "/operacao/programacaoNavio/detail/" + this.service.programacaoNavio.programacaoNavioId]);
        }
    };
    ProgramacaoNavioFormComponent.prototype.edit = function () {
        return __awaiter(this, void 0, void 0, function () {
            var permiteAlterar;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (!!!(this.service.programacaoNavio.programacaoNavioId)) return [3 /*break*/, 2];
                        return [4 /*yield*/, this.service.validaAlteracao(this.service.programacaoNavio.programacaoNavioId, this.service.programacaoNavio.codSitNavio)];
                    case 1:
                        permiteAlterar = _a.sent();
                        if (permiteAlterar)
                            this.router.navigate([this.target + "/operacao/programacaoNavio/edit/" + this.service.programacaoNavio.programacaoNavioId]);
                        _a.label = 2;
                    case 2: return [2 /*return*/];
                }
            });
        });
    };
    ProgramacaoNavioFormComponent.prototype.getCamposAdicionais = function () {
        var _this = this;
        this.funcoesService.camposAdicionais
            .get(this.constantes.sisFormularioId)
            .subscribe(function (data) {
            _this.service.programacaoNavio.sisCampoAdds = data;
        });
    };
    ProgramacaoNavioFormComponent.prototype.onSubmit = function (form, create) {
        if (create === void 0) { create = false; }
        return __awaiter(this, void 0, void 0, function () {
            var pier, pier;
            var _this = this;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_5__["EventEmitterService"].get("formError").emit(form);
                        if (form.invalid) {
                            this.funcoesService.backToTop();
                            return [2 /*return*/];
                        }
                        if (!this.validate()) {
                            return [2 /*return*/, false];
                        }
                        if (this.service.programacaoNavio.escalaNavio && this.service.programacaoNavio.escalaNavio.length < 3) {
                            this.messageService.warning("titles.programacaoNavio", "messages.formatoValorCampoNOperacaoAPPAinvalido");
                            return [2 /*return*/, false];
                        }
                        if (!(this.service.programacaoNavio.caladoChegada && this.service.programacaoNavio.codPier)) return [3 /*break*/, 2];
                        return [4 /*yield*/, this.getPier()];
                    case 1:
                        pier = _a.sent();
                        if (pier && this.service.programacaoNavio.caladoChegada > pier.calado) {
                            this.messageService.warning("titles.programacaoNavio", "messages.caladoChegadaMaiorCaladoPier");
                        }
                        else {
                            this.caladoChegada = true;
                        }
                        if (this.caladoChegada === false) {
                            return [2 /*return*/, false];
                        }
                        _a.label = 2;
                    case 2:
                        if (!(this.service.programacaoNavio.caladoSaida && this.service.programacaoNavio.codPier)) return [3 /*break*/, 4];
                        return [4 /*yield*/, this.getPier()];
                    case 3:
                        pier = _a.sent();
                        if (pier && this.service.programacaoNavio.caladoSaida > pier.calado) {
                            this.messageService.warning("titles.programacaoNavio", "messages.caladoSaidaMaiorCaladoPier");
                        }
                        else {
                            this.caladoSaida = true;
                        }
                        if (this.caladoSaida === false) {
                            return [2 /*return*/, false];
                        }
                        _a.label = 4;
                    case 4:
                        if (this.service.programacaoNavio.regViagem === 0) {
                            this.service.programacaoNavio.regViagem = null;
                        }
                        if (!this.service.config.dadosAntaq) {
                            this.service.programacaoNavio.tipoNavegacao = 0;
                            this.service.programacaoNavio.tipoOperacao = 0;
                            this.service.programacaoNavio.dtAtraca = null;
                            this.service.programacaoNavio.dtDesatraca = null;
                            this.service.programacaoNavio.inicioOper = null;
                            this.service.programacaoNavio.fimOper = null;
                            this.service.programacaoNavio.hrTempoEspera = null;
                            this.service.programacaoNavio.hrParadaPorto = null;
                            this.service.programacaoNavio.hrParadaOperador = null;
                        }
                        if (!this.service.programacaoNavio.codSitNavio) {
                            this.service.programacaoNavio.codSitNavio = 1;
                        }
                        this.service.programacaoNavio.logRotina = "Programação de Navios";
                        if (this.service.programacaoNavio.programacaoNavioId) {
                            this.actionForm = 3;
                        }
                        if (this.service.programacaoNavio.itens.length === 0 && this.service.programacaoNavio.outrasOperacoes.length === 0) {
                            this.messageService.warning("titles.programacaoNavio", "messages.precisaCadastrarUmItemOuOperacao");
                            return [2 /*return*/];
                        }
                        this.service
                            .save(this.service.programacaoNavio, this.funcoesService.isEdit(this.actionForm))
                            .subscribe(function (result) {
                            _this.mensagens = _this.messageService.validationResult(result.validationResult);
                            if (result.validationResult != null && !result.validationResult.isValid) {
                                _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_5__["EventEmitterService"].get("backError").emit(_this.mensagens);
                            }
                            else {
                                _this.messageService.saveSuccess("titles.programacaoNavio");
                                if (create) {
                                    _this.service.programacaoNavio = new _programacao_navio_model__WEBPACK_IMPORTED_MODULE_17__["ProgramacaoNavio"]();
                                    _this.router.navigate([_this.target + "/operacao/programacaoNavio/create"]);
                                }
                                else {
                                    _this.back();
                                    return;
                                }
                            }
                        });
                        return [2 /*return*/];
                }
            });
        });
    };
    ProgramacaoNavioFormComponent.prototype.saveAndCreate = function (form) {
        this.onSubmit(form, true);
    };
    ProgramacaoNavioFormComponent.prototype.outputNavio = function (navio) {
        var _this = this;
        if (navio && !!navio.destinatarioId) {
            this.service.programacaoNavio.navio = navio;
            Object(rxjs__WEBPACK_IMPORTED_MODULE_2__["forkJoin"])([this.serviceViagemNavio.getViagemNavioByNavio(navio.destinatarioId), this.serviceNavio.getById(navio.destinatarioId)]).subscribe(function (resp) {
                if (resp) {
                    if (resp[0]) {
                        _this.regViagemList = resp[0];
                    }
                    if (resp[1] && resp[1].destinatarioNavio && resp[1].destinatarioNavio) {
                        _this.service.programacaoNavio.contato = resp[1].destinatarioNavio.contato;
                        _this.service.programacaoNavio.codAgencia = resp[1].destinatarioNavio.destinatarioIdAgencia;
                        if (resp[1].destinatarioNavio.agencia) {
                            _this.service.programacaoNavio.agencia = resp[1].destinatarioNavio.agencia;
                        }
                    }
                }
            });
        }
    };
    ProgramacaoNavioFormComponent.prototype.getViagemNavio = function (id) {
        var _this = this;
        if (!id) {
            return;
        }
        this.serviceViagemNavio.getViagemNavioByNavio(id).subscribe(function (resp) {
            _this.regViagemList = resp;
        });
    };
    ProgramacaoNavioFormComponent.prototype.outputAgencia = function (agencia) {
        if (!agencia || (agencia && !agencia.destinatarioId)) {
            return;
        }
        this.service.programacaoNavio.agencia = agencia;
    };
    ProgramacaoNavioFormComponent.prototype.outputOperador = function (operador) {
        if (!operador || (operador && !operador.destinatarioId)) {
            return;
        }
        this.service.programacaoNavio.operador = operador;
    };
    ProgramacaoNavioFormComponent.prototype.updateShowButtom = function (event) {
        this.showButton = event;
    };
    ProgramacaoNavioFormComponent.prototype.selectedItem = function (event) {
        return __awaiter(this, void 0, void 0, function () {
            var i;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        this.item = event;
                        i = 0;
                        _a.label = 1;
                    case 1:
                        if (!(i < this.item.importadores.length)) return [3 /*break*/, 4];
                        return [4 /*yield*/, this.getImportador(this.item.importadores[i].codImportador, i)];
                    case 2:
                        _a.sent();
                        _a.label = 3;
                    case 3:
                        i++;
                        return [3 /*break*/, 1];
                    case 4: return [2 /*return*/];
                }
            });
        });
    };
    ProgramacaoNavioFormComponent.prototype.getImportador = function (id, index) {
        var _this = this;
        var promise = new Promise(function (resolve, reject) {
            _this.serviceDestinatario.getById(id).subscribe(function (resp) {
                _this.item.importadores[index].importador = resp;
                resolve(resp);
            });
        });
        return promise;
    };
    ProgramacaoNavioFormComponent.prototype.validate = function () {
        if (this.validateDtPrograma() === false) {
            return false;
        }
        if (this.validateDtAtracacao() === false) {
            return false;
        }
        if (this.validation.dataSaidaMenorDataAtracacao({ dtSaida: this.service.programacaoNavio.dtSaida, dtAtracacao: this.service.programacaoNavio.dtAtracacao }) === false) {
            return false;
        }
        if (this.validateDtDesatraca() === false) {
            return false;
        }
        if (this.validateInicioOper() === false) {
            return false;
        }
        if (this.validateFimOper() === false) {
            return false;
        }
        return true;
    };
    ProgramacaoNavioFormComponent.prototype.validateDtPrograma = function () {
        if (!this.service.programacaoNavio.dtPrograma)
            return false;
        if (this.funcoesService.isDetail(this.actionForm))
            return false;
        var dataEMenor = this.funcoesService.dateTimeUtils.menorAHoje(this.service.programacaoNavio.dtPrograma, ['H', 'M']);
        if (dataEMenor && (!!this.service.config.valDtChegada && !this.service.config.progDataAnt && this.service.programacaoNavio.flagChegada !== 'S')) {
            this.messageService.warning("titles.programacaoNavio", "messages.dataChegadaMenorDataAtual");
            return false;
        }
        return true;
    };
    ProgramacaoNavioFormComponent.prototype.validateDtAtracacao = function () {
        if (!this.service.programacaoNavio.dtPrograma || !this.service.programacaoNavio.dtAtracacao)
            return;
        if (this.funcoesService.isDetail(this.actionForm))
            return false;
        if (this.funcoesService.dateTimeUtils.menorA(this.service.programacaoNavio.dtAtracacao, this.service.programacaoNavio.dtPrograma)) {
            this.messageService.warning("titles.programacaoNavio", "messages.dataSaidaMenorQueDataPrograma");
            return false;
        }
    };
    ProgramacaoNavioFormComponent.prototype.validateDtDesatraca = function () {
        if (!this.service.programacaoNavio.dtDesatraca || !this.service.programacaoNavio.dtAtraca)
            return;
        if (this.funcoesService.isDetail(this.actionForm))
            return false;
        if (this.funcoesService.dateTimeUtils.menorA(this.service.programacaoNavio.dtDesatraca, this.service.programacaoNavio.dtAtraca)) {
            this.messageService.warning("titles.programacaoNavio", "messages.dataDesatracacaoNaoPodeSerMenorDtatraca");
            return false;
        }
        return true;
    };
    ProgramacaoNavioFormComponent.prototype.validateInicioOper = function () {
        if (!this.service.programacaoNavio.inicioOper || !this.service.programacaoNavio.dtAtraca)
            return;
        if (this.funcoesService.isDetail(this.actionForm))
            return false;
        if (this.funcoesService.dateTimeUtils.menorA(this.service.programacaoNavio.inicioOper, this.service.programacaoNavio.dtAtraca)) {
            this.messageService.warning("titles.programacaoNavio", "messages.inicioOperacaoNaoPodeSerMenorDtatraca");
            return false;
        }
        return true;
    };
    ProgramacaoNavioFormComponent.prototype.validateFimOper = function () {
        if (!this.service.programacaoNavio.fimOper || !this.service.programacaoNavio.inicioOper)
            return;
        if (this.funcoesService.isDetail(this.actionForm))
            return false;
        if (this.funcoesService.dateTimeUtils.menorA(this.service.programacaoNavio.fimOper, this.service.programacaoNavio.inicioOper)) {
            this.messageService.warning("titles.programacaoNavio", "messages.finalOperacaoNaoPodeSerMenorIniciooper");
            return false;
        }
        return true;
    };
    ProgramacaoNavioFormComponent.prototype.getPier = function () {
        var _this = this;
        var promise = new Promise(function (resolve, reject) {
            _this.servicePier.getById(_this.service.programacaoNavio.codPier).subscribe(function (resp) {
                resolve(resp);
            });
        });
        return promise;
    };
    ProgramacaoNavioFormComponent.prototype.getRegViagem = function (id) {
        var _this = this;
        var promise = new Promise(function (resolve, reject) {
            _this.serviceViagemNavio.getById(id).subscribe(function (resp) {
                _this.service.programacaoNavio.viagem = resp.numViagem;
                _this.viagemDisabled = true;
                resolve(resp);
            });
        });
        return promise;
    };
    ProgramacaoNavioFormComponent.prototype.changeRegViagem = function (e) {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (!e) {
                            return [2 /*return*/];
                        }
                        if (e.target.value === 0 || e.target.value === "0") {
                            this.service.programacaoNavio.viagem = null;
                            this.viagemDisabled = false;
                            return [2 /*return*/];
                        }
                        return [4 /*yield*/, this.getRegViagem(e.target.value)];
                    case 1:
                        _a.sent();
                        return [2 /*return*/];
                }
            });
        });
    };
    ProgramacaoNavioFormComponent.prototype.alteraPortos = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 8, function () {
            _this.permissionAlteraPortos = true;
        }, function () {
            _this.permissionAlteraPortos = false;
        }, true);
    };
    ProgramacaoNavioFormComponent.prototype.vrfAlteraDados = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 8, function () {
            _this.permissionAlteraDados = true;
        }, function () {
            _this.permissionAlteraDados = false;
        }, true);
    };
    ProgramacaoNavioFormComponent.prototype.alteraUnidade = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 8, function () {
            _this.permissionAlteraUnidade = true;
        }, function () {
            _this.permissionAlteraUnidade = false;
        }, true);
    };
    ProgramacaoNavioFormComponent.prototype.alteraREExcedente = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 8, function () {
            _this.permissionAlteraREExcedente = true;
        }, function () {
            _this.permissionAlteraREExcedente = false;
        }, true);
    };
    ProgramacaoNavioFormComponent.prototype.excluiItemCPEmbarque = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 8, function () {
            _this.permissionExcluiItemCPEmbarque = true;
        }, function () {
            _this.permissionExcluiItemCPEmbarque = false;
        }, true);
    };
    ProgramacaoNavioFormComponent.prototype.validateCaladoChegada = function () {
        return __awaiter(this, void 0, void 0, function () {
            var pier;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (!(this.service.programacaoNavio.caladoChegada && this.service.programacaoNavio.codPier)) return [3 /*break*/, 2];
                        return [4 /*yield*/, this.getPier()];
                    case 1:
                        pier = _a.sent();
                        if (pier && this.service.programacaoNavio.caladoChegada > pier.calado) {
                            this.messageService.warning("titles.programacaoNavio", "messages.caladoChegadaMaiorCaladoPier");
                        }
                        _a.label = 2;
                    case 2: return [2 /*return*/];
                }
            });
        });
    };
    ProgramacaoNavioFormComponent.prototype.validateCaladoSaida = function () {
        return __awaiter(this, void 0, void 0, function () {
            var pier;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (!(this.service.programacaoNavio.caladoSaida && this.service.programacaoNavio.codPier)) return [3 /*break*/, 2];
                        return [4 /*yield*/, this.getPier()];
                    case 1:
                        pier = _a.sent();
                        if (pier && this.service.programacaoNavio.caladoSaida > pier.calado) {
                            this.messageService.warning("titles.programacaoNavio", "messages.caladoSaidaMaiorCaladoPier");
                        }
                        _a.label = 2;
                    case 2: return [2 /*return*/];
                }
            });
        });
    };
    ProgramacaoNavioFormComponent.prototype.validateTempo = function (key) {
        if (this.service.programacaoNavio[key] && this.service.programacaoNavio[key].trim() !== "") {
            var time = this.service.programacaoNavio[key].split(":");
            if (time[0] > 24) {
                time[0] = 24;
            }
            else if (time[0] < 10) {
                if (time[0][0] !== "0") {
                    time[0] = "0" + time[0];
                }
            }
            if (time[1] > 59) {
                time[1] = 59;
            }
            else if (!time[1] || time[1] === null || time[1] === undefined) {
                time[1] = "01";
            }
            this.service.programacaoNavio[key] = time[0] + ":" + time[1];
        }
    };
    ProgramacaoNavioFormComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_9__["MessageService"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"] },
        { type: _programacao_navio_service__WEBPACK_IMPORTED_MODULE_18__["ProgramacaoNavioService"] },
        { type: _cadastro_pier_pier_service__WEBPACK_IMPORTED_MODULE_13__["PierService"] },
        { type: _cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_11__["DestinatarioService"] },
        { type: _cadastro_viagem_navio_viagem_navio_service__WEBPACK_IMPORTED_MODULE_14__["ViagemNavioService"] },
        { type: _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_6__["ConfiguracaoFacade"] },
        { type: _cadastro_navio_navio_service__WEBPACK_IMPORTED_MODULE_12__["NavioService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_7__["FuncoesService"] },
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_15__["LoginService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_8__["PermissoesUtilsService"] }
    ]; };
    ProgramacaoNavioFormComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: 'app-programacao-navio-form',
            template: __importDefault(__webpack_require__(/*! raw-loader!./programacao-navio-form.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-form/programacao-navio-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_9__["MessageService"],
            _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"],
            _programacao_navio_service__WEBPACK_IMPORTED_MODULE_18__["ProgramacaoNavioService"],
            _cadastro_pier_pier_service__WEBPACK_IMPORTED_MODULE_13__["PierService"],
            _cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_11__["DestinatarioService"],
            _cadastro_viagem_navio_viagem_navio_service__WEBPACK_IMPORTED_MODULE_14__["ViagemNavioService"],
            _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_6__["ConfiguracaoFacade"],
            _cadastro_navio_navio_service__WEBPACK_IMPORTED_MODULE_12__["NavioService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_7__["FuncoesService"],
            _login_login_service__WEBPACK_IMPORTED_MODULE_15__["LoginService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_8__["PermissoesUtilsService"]])
    ], ProgramacaoNavioFormComponent);
    return ProgramacaoNavioFormComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_4__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/operacao/programacao-navio/programacao-navio-index/programacao-navio-index.component.ts":
/*!***************************************************************************************************************!*\
  !*** ./src/app/pages/operacao/programacao-navio/programacao-navio-index/programacao-navio-index.component.ts ***!
  \***************************************************************************************************************/
/*! exports provided: ProgramacaoNavioIndexComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoNavioIndexComponent", function() { return ProgramacaoNavioIndexComponent; });
/* 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_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../shared/services/datatables/datatables.service */ "./src/app/shared/services/datatables/datatables.service.ts");
/* harmony import */ var _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../shared/services/funcoes/configuracao/configuracao.facade */ "./src/app/shared/services/funcoes/configuracao/configuracao.facade.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.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 _programacao_navio_constants__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../programacao-navio.constants */ "./src/app/pages/operacao/programacao-navio/programacao-navio.constants.ts");
/* harmony import */ var _programacao_navio_model__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../programacao-navio.model */ "./src/app/pages/operacao/programacao-navio/programacao-navio.model.ts");
/* harmony import */ var _programacao_navio_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../programacao-navio.service */ "./src/app/pages/operacao/programacao-navio/programacao-navio.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 ProgramacaoNavioIndexComponent = /** @class */ (function (_super) {
    __extends(ProgramacaoNavioIndexComponent, _super);
    function ProgramacaoNavioIndexComponent(funcoes, router, service, datatablesService, configuracao, messageService, loginService, permissoesUtils) {
        var _this = _super.call(this, new _programacao_navio_constants__WEBPACK_IMPORTED_MODULE_10__["ProgramacaoNavioConstants"](), funcoes) || this;
        _this.funcoes = funcoes;
        _this.router = router;
        _this.service = service;
        _this.datatablesService = datatablesService;
        _this.configuracao = configuracao;
        _this.messageService = messageService;
        _this.loginService = loginService;
        _this.permissoesUtils = permissoesUtils;
        _this.data = new _programacao_navio_model__WEBPACK_IMPORTED_MODULE_11__["ProgramacaoNavioDto"]();
        _this.constantes = new _programacao_navio_constants__WEBPACK_IMPORTED_MODULE_10__["ProgramacaoNavioConstants"]();
        _this.mensagens = [];
        _this.target = _this.funcoes.getTargetLocation();
        _this.loadConfig = function () {
            if (_this.configuracao.isLoadConfig()) {
                _this.service.config.solPedEmbarque = _this.configuracao.lerConfig("OPE", "solPedEmbarque");
                _this.service.config.cWModProgramacaoNav = _this.configuracao.lerConfig("OPE", "cwModProgramacaoNav");
                _this.service.config.corpWebModCRD = _this.configuracao.lerConfig("WEB", "CorpWebModCRD");
                _this.service.config.dadosAntaq = _this.configuracao.boolean("OPE", "DadosAntaq");
                _this.service.config.obrigaOSg = _this.configuracao.boolean("OPE", "ObrigaOSg");
                _this.service.config.obrigaNavioEmbar = _this.configuracao.boolean("OPE", "ObrigaNavioEmbar");
                _this.posLoadConfig();
            }
        };
        _this.confirm = function () {
            _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 7, function () {
                _this.service.verificaImportador({ regPrograma: _this.data.regPrograma }).subscribe(function (resp) {
                    if (!resp.isValid) {
                        resp.erros.forEach(function (e) { return _this.messageService.warning("titles.programacaoNavio", e.message); });
                        return;
                    }
                    if (_this.data.flagChegada === "S") {
                        _this.messageService.confirm("titles.programacaoNavio", "messages.cancelaConfirmacaoChegada", "", function () {
                            var data = new _programacao_navio_model__WEBPACK_IMPORTED_MODULE_11__["ProgramacaoNavioLiberacaoChegada"]();
                            data.dtPrograma = _this.data.dtPrograma;
                            data.regPrograma = _this.data.regPrograma;
                            data.codPier = 0;
                            data.cancela = "S";
                            _this.send(data);
                        }, false, null, _this.messageService.getTranslates("labels", "sim"), _this.messageService.getTranslates("labels", "nao"));
                    }
                    else {
                        _this.showModalProgramacaoNavioConfirmacaoChegadaFilter();
                    }
                });
            }, function () {
                _this.notPermission();
            }, false);
        };
        _this.releaseProsecutor = function () {
            _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 8, function () { return __awaiter(_this, void 0, void 0, function () {
                var validation;
                var _this = this;
                return __generator(this, function (_a) {
                    switch (_a.label) {
                        case 0:
                            if (!this.service.config.obrigaOSg) return [3 /*break*/, 2];
                            return [4 /*yield*/, this.service.validaOSGNosItens(this.data.regPrograma).toPromise()];
                        case 1:
                            validation = _a.sent();
                            if (!validation.isValid) {
                                validation.erros.forEach(function (e) { return _this.messageService.warning('titles.programacaoNavio', e.message); });
                                return [2 /*return*/];
                            }
                            _a.label = 2;
                        case 2:
                            app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_2__["EventEmitterService"].get('emiProgramacaoNavioItemBL').emit(this.data);
                            return [2 /*return*/];
                    }
                });
            }); }, function () { return _this.notPermission(); }, false);
        };
        _this.releaseOperation = function () {
            _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 9, function () {
                if (_this.service.config.solPedEmbarque === 'S') {
                    _this.service.getTipoOperacaoItensProgramacao(_this.data.regPrograma).subscribe(function (tiposOpe) {
                        var tipoOpeCabotagem = 3;
                        if (!!tiposOpe && tiposOpe.length > 1) {
                            _this.messageService.warning("titles.programacaoNavio", "messages.naoEPossivelLiberarNavioComOperacoesDiferentes");
                            return;
                        }
                        else if ((!!tiposOpe && tiposOpe[0] === tipoOpeCabotagem)) {
                            app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_2__["EventEmitterService"].get('emiProgramacaoNavioLiberacaoOperacao').emit(_this.data);
                        }
                        else {
                            var verifica = { regPrograma: _this.data.regPrograma };
                            _this.service.verificaItem(verifica).subscribe(function (resp) {
                                if (resp.length === 0) {
                                    app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_2__["EventEmitterService"].get('emiProgramacaoNavioLiberacaoOperacao').emit(_this.data);
                                }
                                else {
                                    _this.messageService.warning("titles.programacaoNavio", "messages.exiteItemSemPedidoEmbarqueGerado");
                                    return;
                                }
                            });
                        }
                    });
                }
                else {
                    app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_2__["EventEmitterService"].get('emiProgramacaoNavioLiberacaoOperacao').emit(_this.data);
                }
            }, function () {
                _this.notPermission();
            }, false);
        };
        _this._print = function () {
            _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 5, function () { return jQuery("#app-programacao-navio-export").modal("show"); });
        };
        _this.dadosAntaq = function () {
            _this.service.getById(_this.data.regPrograma).subscribe(function (_) {
                _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 2, function () { return app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_2__["EventEmitterService"].get('emitProgramacaoNavioDadosAntaq').emit(_); }, function () { return _this.permissoesUtils.back(); }, false);
            });
        };
        _this.outDadosAntaq = function (programacaoNavio) {
            _this.service.alteraDadosAntaq(programacaoNavio).subscribe(function (result) {
                if (!result.isValid) {
                    _this.mensagens = _this.messageService.validationResult(result);
                    app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_2__["EventEmitterService"].get("backError").emit(_this.mensagens);
                }
                else {
                    _this.messageService.saveSuccess("titles.programacaoNavio");
                    _this.refresh();
                }
            });
        };
        _this.alteraDados = function () {
            console.log("DATA ENVIADA:", _this.data);
            _this.permissoesUtils.verificaRotina(_this.constantes.sisFormularioId, 11, function () { return app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_2__["EventEmitterService"].get('emitProgramacaoNavioDados').emit(_this.data); }, function () { return _this.permissoesUtils.back(); }, false);
        };
        _this.outAlteraDados = function (programacaoNavio) {
            if (!(programacaoNavio.programacaoNavioId > 0))
                programacaoNavio.programacaoNavioId = _this.data.regPrograma;
            _this.service.alteraDados(programacaoNavio).subscribe(function (result) {
                if (!result.isValid) {
                    _this.mensagens = _this.messageService.validationResult(result);
                    _this.mensagens.forEach(function (e) { return _this.messageService.warning("titles.programacaoNavio", e); });
                }
                else {
                    jQuery("#app-programacao-navio-dados").modal("hide");
                    _this.messageService.saveSuccess("titles.programacaoNavio");
                    _this.refresh();
                }
            });
        };
        _this.painelIntegracaoDue = function () {
            _this.funcoesService.openWindow('obrigacoes/monitorRecepcaoCct');
        };
        router.events.subscribe(function (event) {
            var params = _this.funcoes.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    ProgramacaoNavioIndexComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.programacaoNavioLiberacaoChegada = new _programacao_navio_model__WEBPACK_IMPORTED_MODULE_11__["ProgramacaoNavioLiberacaoChegada"]();
        this.configuracao.getConfig(this.constantes.configs, this.loadConfig);
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 4, function () {
            if (!_this.loginService.isTokenExpired()) {
                if (_this.funcoes.abrirFiltro) {
                    _this.service.filter = new _programacao_navio_model__WEBPACK_IMPORTED_MODULE_11__["ProgramacaoNavioFilter"]();
                    _this.service.filter.filialId = _this.loginService.getLogin().filialId;
                    _this.funcoes.openModal("app-programacao-navio-filter");
                }
                _this.refresh();
            }
        }, function () { return _this.permissoesUtils.back(); }, true);
        _super.prototype.addFuncoes.call(this, [
            { action: 'confirm', func: function () { return _this.confirm; } },
            { action: 'releaseProsecutor', func: function () { return _this.releaseProsecutor; } },
            { action: 'releaseOperation', func: function () { return _this.releaseOperation; } },
            { action: 'dadosAntaq', func: function () { return _this.dadosAntaq; } },
            { action: 'alteraDados', func: function () { return _this.alteraDados; } },
            { action: 'painelIntegracaoDue', func: function () { return _this.painelIntegracaoDue; } },
            { action: '_print', func: function () { return _this._print; } },
        ]);
    };
    ProgramacaoNavioIndexComponent.prototype.permissoes = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 15, function () {
            _super.prototype.permissoes.call(_this, _this.constantes);
        });
    };
    ProgramacaoNavioIndexComponent.prototype.properties = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 6, function () {
            _super.prototype.properties.call(_this, _this.data);
        });
    };
    ProgramacaoNavioIndexComponent.prototype.posLoadConfig = function () {
        this.constantes.listaIndex[12].exibeButton = this.service.config.dadosAntaq;
        this.constantes.listaIndex[12].eximeMenu = this.service.config.dadosAntaq;
    };
    ProgramacaoNavioIndexComponent.prototype.create = function () {
        this.router.navigate([this.target + "/operacao/programacaoNavio/create"]);
    };
    ProgramacaoNavioIndexComponent.prototype.edit = function () {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                if (!!(this.data.regPrograma)) {
                    this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 2, function () { return __awaiter(_this, void 0, void 0, function () {
                        var pedidoGerado, msn;
                        return __generator(this, function (_a) {
                            switch (_a.label) {
                                case 0: return [4 /*yield*/, this.service.pedidoEmbarqueGerado(this.data.regPrograma)];
                                case 1:
                                    pedidoGerado = _a.sent();
                                    if (pedidoGerado) {
                                        this.messageService.warning("titles.programacaoNavio", "messages.pedidoEmbarqueGeradoAlteracaoNaoPermitida");
                                    }
                                    else {
                                        if (this.service.sitNaoPermitidos.includes(+this.data.codSitNavio)) {
                                            this.router.navigate([this.target + "/operacao/programacaoNavio/edit/" + this.data.regPrograma]);
                                        }
                                        else {
                                            msn = "Programa\u00E7\u00E3o " + this.data.descrSitNavio + ". " + this.messageService.getTranslates("messages", "messages.alteracaoNaoPermitida");
                                            this.messageService.warning("titles.programacaoNavio", msn);
                                        }
                                    }
                                    return [2 /*return*/];
                            }
                        });
                    }); }, function () {
                        _this.notPermission();
                    }, true);
                }
                return [2 /*return*/];
            });
        });
    };
    ProgramacaoNavioIndexComponent.prototype.detail = function () {
        if (!!(this.data.regPrograma)) {
            this.router.navigate([this.target + "/operacao/programacaoNavio/detail/" + this.data.regPrograma]);
        }
    };
    ProgramacaoNavioIndexComponent.prototype.filtrar = function () {
        jQuery("#app-programacao-navio-filter").modal("show");
    };
    ProgramacaoNavioIndexComponent.prototype.executaFiltro = function () {
        jQuery("#app-programacao-navio-filter").modal("hide");
        this.refresh();
    };
    ProgramacaoNavioIndexComponent.prototype.refresh = function () {
        var _this = this;
        this.service.getByFilter(this.service.filter).subscribe(function (data) {
            var columns = [
                _this.datatablesService.getDataString("regPrograma", "numero", "10%"),
                _this.datatablesService.getDataString("fantasia", "navio"),
                _this.datatablesService.getDataDateTime("dtPrograma", "prevChegada", "DD/MM/YYYY HH:mm"),
                _this.datatablesService.getDataString("descrAgencia", "agencia"),
                _this.datatablesService.getDataString("descrSitNavio", "situacao"),
            ];
            _this.datatablesService.toDataTable({ tableId: "dtProgramacaoNavio", columns: columns, data: data }, function (aData) {
                _this.data = aData;
                _this.evalArrivalConfirmation();
                _this.evalReleaseProsecutor();
                _this.evalReleaseOperation();
            });
        });
    };
    ProgramacaoNavioIndexComponent.prototype.evalArrivalConfirmation = function () {
        var isset = false;
        var codSitNavio = [1, 5, 6, 8];
        for (var i = 0; i < codSitNavio.length; i++) {
            if (codSitNavio[i] === this.data.codSitNavio) {
                isset = true;
                break;
            }
        }
        if (isset === true) {
            this.constantes.listaIndex[9].disabled = false;
        }
        else {
            this.constantes.listaIndex[9].disabled = true;
        }
    };
    ProgramacaoNavioIndexComponent.prototype.evalReleaseProsecutor = function () {
        var isset = false;
        var codSitNavio = [1, 5, 6, 7, 8];
        for (var i = 0; i < codSitNavio.length; i++) {
            if (codSitNavio[i] === this.data.codSitNavio) {
                isset = true;
                break;
            }
        }
        if (isset === true) {
            this.constantes.listaIndex[10].disabled = false;
        }
        else {
            this.constantes.listaIndex[10].disabled = true;
        }
    };
    ProgramacaoNavioIndexComponent.prototype.evalReleaseOperation = function () {
        var isset = false;
        var codSitNavio = [7, 8];
        for (var i = 0; i < codSitNavio.length; i++) {
            if (codSitNavio[i] === this.data.codSitNavio) {
                isset = true;
                break;
            }
        }
        if (isset === true) {
            this.constantes.listaIndex[11].disabled = false;
        }
        else {
            this.constantes.listaIndex[11].disabled = true;
        }
    };
    ProgramacaoNavioIndexComponent.prototype.executaConfirmacaoChegada = function (event) {
        jQuery("#app-programacao-navio-confirmacao-chegada-filter").modal("hide");
        this.send(event);
    };
    ProgramacaoNavioIndexComponent.prototype.notPermission = function () {
        this.messageService.warning("titles.programacaoNavio", "messages.confirmacaoChegadaCompletada");
    };
    ProgramacaoNavioIndexComponent.prototype.showModalProgramacaoNavioConfirmacaoChegadaFilter = function () {
        var _this = this;
        this.service.getById(this.data.regPrograma).subscribe(function (resp) {
            _this.programacaoNavioLiberacaoChegada.regPrograma = resp.programacaoNavioId;
            _this.programacaoNavioLiberacaoChegada.dtPrograma = resp.dtPrograma;
            _this.programacaoNavioLiberacaoChegada.codPier = resp.codPier;
            jQuery("#app-programacao-navio-confirmacao-chegada-filter").modal("show");
        });
    };
    ProgramacaoNavioIndexComponent.prototype.send = function (programacaoNavioLiberacaoChegada) {
        var _this = this;
        this.service.confirmacaoChegada(programacaoNavioLiberacaoChegada).subscribe(function (resp) {
            _this.messageService.success("titles.programacaoNavio", "messages.confirmacaoChegadaCompletada");
            _this.refresh();
        });
    };
    ProgramacaoNavioIndexComponent.prototype.remove = function () {
        return __awaiter(this, void 0, void 0, function () {
            var _this = this;
            return __generator(this, function (_a) {
                if (!!(this.data.regPrograma)) {
                    this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 3, function () { return __awaiter(_this, void 0, void 0, function () {
                        var pedidoGerado, msn;
                        var _this = this;
                        return __generator(this, function (_a) {
                            switch (_a.label) {
                                case 0: return [4 /*yield*/, this.service.pedidoEmbarqueGerado(this.data.regPrograma)];
                                case 1:
                                    pedidoGerado = _a.sent();
                                    if (!!pedidoGerado) {
                                        this.messageService.warning("titles.programacaoNavio", "messages.pedidoEmbarqueGeradoAlteracaoNaoPermitida");
                                    }
                                    else if (![1, 6].includes(this.data.codSitNavio)) {
                                        msn = "Programa\u00E7\u00E3o " + this.data.descrSitNavio + ". " + this.messageService.getTranslates("messages", "messages.exclusaoNaoPermitida");
                                        this.messageService.warning("titles.programacaoNavio", msn);
                                    }
                                    else
                                        this.messageService.removeConfirm(function () {
                                            _this.service.remove({ programacaoNavioId: _this.data.regPrograma }).subscribe(function (result) {
                                                _this.mensagens = _this.messageService.validationResult(result.validationResult);
                                                if (result.validationResult && !result.validationResult.isValid) {
                                                    _this.messageService.warning("titles.programacaoNavio", _this.mensagens[0]);
                                                }
                                                else {
                                                    _this.datatablesService.remove("dtProgramacaoNavio");
                                                }
                                            });
                                        });
                                    return [2 /*return*/];
                            }
                        });
                    }); });
                }
                return [2 /*return*/];
            });
        });
    };
    ProgramacaoNavioIndexComponent.prototype.export = function (event) {
        switch (event) {
            case "programacaoNavio":
                this.exportProgramacao();
                break;
            case "reemissaoCrd":
                this.reemissaoCrd();
                break;
            case "ordemEmbarque":
                this.exportReportOrdemEmbarque();
                break;
            case "capaProcessoExportacao":
                this.capaProcessoExportacao();
                break;
            default:
                this.exportReportProgramacaoNavio();
        }
        jQuery("#app-programacao-navio-export").modal("hide");
    };
    ProgramacaoNavioIndexComponent.prototype.capaProcessoExportacao = function () {
        var self = this;
        self.permissoesUtils.verificaRotina(self.constantes.sisFormularioId, 5, function () {
            self.funcoes.reportInvoc.invocaRelatorio(self.constantes.reportIdCapaProcessoExportacao, self.constantes.reportTitulo, {
                programacaoNavioId: self.data.regPrograma
            });
        });
    };
    ProgramacaoNavioIndexComponent.prototype.exportProgramacao = function () {
        this.funcoes.openWindow("relatorios/" + _programacao_navio_constants__WEBPACK_IMPORTED_MODULE_10__["ModProgramacaoNavioReport"].get(this.service.config.cWModProgramacaoNav));
    };
    ProgramacaoNavioIndexComponent.prototype.exportReportProgramacaoNavio = function () {
        this.funcoes.reportInvoc.invocaRelatorio(this.constantes.reportId, this.constantes.reportTitulo, {
            dataI: this.service.filter.dataI,
            dataF: this.service.filter.dataF,
            destinatarioIdNavio: this.funcoes.isNotUndefinedOrNull(this.service.filter.destinatarioIdNavio) ? this.service.filter.destinatarioIdNavio : 0,
            situacao: this.funcoes.isNotUndefinedOrNull(this.service.filter.situacao) ? this.service.filter.situacao : "",
            filialId: this.loginService.getLogin().filialId
        });
    };
    ProgramacaoNavioIndexComponent.prototype.exportReportOrdemEmbarque = function () {
        if (!this.data.regPrograma) {
            this.messageService.warning("titles.programacaoNavio", "messages.precisaEscolherUmItem");
            return;
        }
        this.funcoes.reportInvoc.invocaRelatorio("CAD0250", this.constantes.reportTitulo, {
            regPrograma: this.data.regPrograma,
            filial: +this.loginService.getLogin().filialId,
            colaborador: +this.loginService.getLogin().colaboradorId
        });
    };
    ProgramacaoNavioIndexComponent.prototype.reemissaoCrd = function () {
        if (!this.data.regPrograma) {
            this.messageService.warning("titles.programacaoNavio", "messages.precisaEscolherUmItem");
            return;
        }
        this.funcoes.reportInvoc.invocaRelatorio(this.service.config.corpWebModCRD, {
            titulo: this.messageService.getTranslates('titles', 'crdModelo1'),
            subTitulo: 'CRD'
        }, {
            regPrograma: this.data.regPrograma,
            filial: +this.loginService.getLogin().filialId,
            regLog: +this.loginService.getLogin().colaboradorId
        });
    };
    ProgramacaoNavioIndexComponent.ctorParameters = function () { return [
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: _programacao_navio_service__WEBPACK_IMPORTED_MODULE_12__["ProgramacaoNavioService"] },
        { type: _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_4__["DatatablesService"] },
        { type: _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_5__["ConfiguracaoFacade"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__["MessageService"] },
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_9__["LoginService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__["PermissoesUtilsService"] }
    ]; };
    ProgramacaoNavioIndexComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: 'app-programacao-navio-index',
            template: __importDefault(__webpack_require__(/*! raw-loader!./programacao-navio-index.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-index/programacao-navio-index.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"],
            _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            _programacao_navio_service__WEBPACK_IMPORTED_MODULE_12__["ProgramacaoNavioService"],
            _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_4__["DatatablesService"],
            _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_5__["ConfiguracaoFacade"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__["MessageService"],
            _login_login_service__WEBPACK_IMPORTED_MODULE_9__["LoginService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__["PermissoesUtilsService"]])
    ], ProgramacaoNavioIndexComponent);
    return ProgramacaoNavioIndexComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_3__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/operacao/programacao-navio/programacao-navio-item-bl/programacao-navio-item-bl-form/programacao-navio-item-bl-form.component.ts":
/*!*******************************************************************************************************************************************************!*\
  !*** ./src/app/pages/operacao/programacao-navio/programacao-navio-item-bl/programacao-navio-item-bl-form/programacao-navio-item-bl-form.component.ts ***!
  \*******************************************************************************************************************************************************/
/*! exports provided: ProgramacaoNavioItemBLFormComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoNavioItemBLFormComponent", function() { return ProgramacaoNavioItemBLFormComponent; });
/* 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 moment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! moment */ "./node_modules/moment/moment.js");
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../../shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_4__ = __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_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../../shared/services/funcoes/configuracao/configuracao.facade */ "./src/app/shared/services/funcoes/configuracao/configuracao.facade.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../../shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../cadastro/destinatario/destinatario.model */ "./src/app/pages/cadastro/destinatario/destinatario.model.ts");
/* harmony import */ var _cadastro_lancamento_re_due_lancamento_re_due_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../../cadastro/lancamento-re-due/lancamento-re-due.service */ "./src/app/pages/cadastro/lancamento-re-due/lancamento-re-due.service.ts");
/* harmony import */ var _login_login_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../../login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var _programacao_navio_model__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../programacao-navio.model */ "./src/app/pages/operacao/programacao-navio/programacao-navio.model.ts");
/* harmony import */ var _programacao_navio_item_bl_constants__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../programacao-navio-item-bl.constants */ "./src/app/pages/operacao/programacao-navio/programacao-navio-item-bl/programacao-navio-item-bl.constants.ts");
/* harmony import */ var _programacao_navio_item_bl_service__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../programacao-navio-item-bl.service */ "./src/app/pages/operacao/programacao-navio/programacao-navio-item-bl/programacao-navio-item-bl.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 ProgramacaoNavioItemBLFormComponent = /** @class */ (function (_super) {
    __extends(ProgramacaoNavioItemBLFormComponent, _super);
    function ProgramacaoNavioItemBLFormComponent(router, messageService, configuracao, activatedRoute, service, serviceReDue, funcoesService, loginService, permissoesUtils) {
        var _this = _super.call(this, new _programacao_navio_item_bl_constants__WEBPACK_IMPORTED_MODULE_13__["ProgramacaoNavioItemBlConstants"](), funcoesService) || this;
        _this.router = router;
        _this.messageService = messageService;
        _this.configuracao = configuracao;
        _this.activatedRoute = activatedRoute;
        _this.service = service;
        _this.serviceReDue = serviceReDue;
        _this.funcoesService = funcoesService;
        _this.loginService = loginService;
        _this.permissoesUtils = permissoesUtils;
        _this.response = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        _this.data = new _programacao_navio_model__WEBPACK_IMPORTED_MODULE_12__["ProgramacaoNavioItemBl"]();
        _this.dados = [];
        _this.current = new _programacao_navio_model__WEBPACK_IMPORTED_MODULE_12__["ProgramacaoNavioItemBlDto"]();
        _this.mensagens = [];
        _this.actionEdit = false;
        _this.constantes = new _programacao_navio_item_bl_constants__WEBPACK_IMPORTED_MODULE_13__["ProgramacaoNavioItemBlConstants"]();
        _this.blockFields = false;
        _this._detail = false;
        _this.target = _this.funcoesService.getTargetLocation();
        _this.loadConfig = function () {
            if (_this.configuracao.isLoadConfig()) {
                _this.config.solRECrd = _this.configuracao.lerConfig("OPE", "solRECrd");
                _this.config.solPedEmbarque = _this.configuracao.lerConfig("OPE", "solPedEmbarque");
                _this.config.modRelCRD = _this.configuracao.lerConfig("OPE", "cwModRelCRD");
            }
        };
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    ProgramacaoNavioItemBLFormComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.showTable = true;
        this.config = new _programacao_navio_model__WEBPACK_IMPORTED_MODULE_12__["ConfiguracoesProgramacaoNavioItemBl"]();
        this.configuracao.getConfig(this.constantes.configs, this.loadConfig);
        this.findByRegProgramaAndItem();
        this.service.getChangeEmitter().subscribe(function (item) {
            if (item !== _this.currentDto) {
                _this.currentDto = item;
                _this.getReDue();
                _this.findByRegProgramaAndItem();
            }
        });
    };
    ProgramacaoNavioItemBLFormComponent.prototype.findByRegProgramaAndItem = function () {
        var _this = this;
        if (!this.currentDto.programacaoNavioId || !this.currentDto.item) {
            return;
        }
        var filter = { regPrograma: this.currentDto.programacaoNavioId, item: this.currentDto.item };
        this.service.findByRegProgramaAndItem(filter).subscribe(function (resp) {
            _this.dados = resp;
        });
    };
    ProgramacaoNavioItemBLFormComponent.prototype.getCamposAdicionais = function () {
        var _this = this;
        this.funcoesService.camposAdicionais
            .get(this.constantes.sisFormularioId)
            .subscribe(function (data) {
            _this.data.sisCampoAdds = data;
        });
    };
    ProgramacaoNavioItemBLFormComponent.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_4__["EventEmitterService"].get("formError").emit(form);
                if (form.invalid) {
                    return [2 /*return*/];
                }
                if (this.data.regRE === 0) {
                    this.data.regRE = null;
                }
                if (this.service.numBLOld === "") {
                    this.service.numBLOld = this.data.numBL;
                }
                this.data.logRotina = "Liberação Pelo Fiscal";
                this.service
                    .save(this.data, this.actionEdit)
                    .subscribe(function (result) {
                    if (result.validationResult != null && !result.validationResult.isValid) {
                        _this.mensagens = _this.messageService.validationResult(result.validationResult);
                        _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_4__["EventEmitterService"].get("backError").emit(_this.mensagens);
                        return;
                    }
                    _this.messageService.saveSuccess("titles.liberacaoPeloFiscal");
                    _this.findByRegProgramaAndItem();
                    _this.back();
                });
                return [2 /*return*/];
            });
        });
    };
    ProgramacaoNavioItemBLFormComponent.prototype.getReDue = function () {
        var _this = this;
        this.regReDueList = [];
        this.serviceReDue.getByClienteMaterial({ destinatarioIdCliente: this.currentDto.codDest, materialId: this.currentDto.material }).subscribe(function (resp) {
            if (resp) {
                _this.regReDueList = resp.filter(function (val) {
                    val.dtRegistro = moment__WEBPACK_IMPORTED_MODULE_2__(val.dtRegistro).format('DD/MM/YYYY HH:mm:ss');
                    return val;
                });
            }
        });
    };
    Object.defineProperty(ProgramacaoNavioItemBLFormComponent.prototype, "habilitarRegRE", {
        get: function () {
            return this.config.solRECrd === 'S' && this.config.solPedEmbarque === 'S';
        },
        enumerable: true,
        configurable: true
    });
    ProgramacaoNavioItemBLFormComponent.prototype.back = function () {
        this.response.emit(true);
        this.showTable = true;
        this.data = new _programacao_navio_model__WEBPACK_IMPORTED_MODULE_12__["ProgramacaoNavioItemBl"]();
    };
    ProgramacaoNavioItemBLFormComponent.prototype.new = function () {
        this._detail = false;
        this.showTable = false;
        this.response.emit(false);
        this.data = new _programacao_navio_model__WEBPACK_IMPORTED_MODULE_12__["ProgramacaoNavioItemBl"]();
        this.data.programacaoNavioId = this.currentDto.programacaoNavioId;
        this.data.item = this.currentDto.item;
        this.getReDue();
        this.actionEdit = false;
    };
    ProgramacaoNavioItemBLFormComponent.prototype.selected = function (val, index) {
        this._index = index;
        this.data = val;
    };
    ProgramacaoNavioItemBLFormComponent.prototype.show = function () {
        if (!this.data.programacaoNavioId) {
            return;
        }
        this.response.emit(false);
        this.showTable = false;
        this._detail = true;
        this.actionEdit = false;
        this.getReDue();
    };
    ProgramacaoNavioItemBLFormComponent.prototype.edit = function () {
        if (!this.data.programacaoNavioId) {
            return;
        }
        this.response.emit(false);
        this._detail = false;
        this.showTable = false;
        this.actionEdit = true;
        this.data.numBLOld = this.data.numBL;
        this.getReDue();
    };
    ProgramacaoNavioItemBLFormComponent.prototype.delete = function () {
        var _this = this;
        if (!this.data.programacaoNavioId) {
            return;
        }
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 8, function () {
            _this.messageService.removeConfirm(function () {
                _this.service.remove(_this.data).subscribe(function () {
                    _this.findByRegProgramaAndItem();
                });
            });
        });
    };
    ProgramacaoNavioItemBLFormComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__["MessageService"] },
        { type: _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_5__["ConfiguracaoFacade"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"] },
        { type: _programacao_navio_item_bl_service__WEBPACK_IMPORTED_MODULE_14__["ProgramacaoNavioItemBlService"] },
        { type: _cadastro_lancamento_re_due_lancamento_re_due_service__WEBPACK_IMPORTED_MODULE_10__["LancamentoReDueService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"] },
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_11__["LoginService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__["PermissoesUtilsService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], ProgramacaoNavioItemBLFormComponent.prototype, "response", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", _programacao_navio_model__WEBPACK_IMPORTED_MODULE_12__["ProgramacaoNavioItemBlDto"])
    ], ProgramacaoNavioItemBLFormComponent.prototype, "currentDto", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", _cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_9__["Destinatario"])
    ], ProgramacaoNavioItemBLFormComponent.prototype, "currentNavio", void 0);
    ProgramacaoNavioItemBLFormComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: 'app-programacao-navio-item-bl-form',
            template: __importDefault(__webpack_require__(/*! raw-loader!./programacao-navio-item-bl-form.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-item-bl/programacao-navio-item-bl-form/programacao-navio-item-bl-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_8__["MessageService"],
            _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_5__["ConfiguracaoFacade"],
            _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"],
            _programacao_navio_item_bl_service__WEBPACK_IMPORTED_MODULE_14__["ProgramacaoNavioItemBlService"],
            _cadastro_lancamento_re_due_lancamento_re_due_service__WEBPACK_IMPORTED_MODULE_10__["LancamentoReDueService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_6__["FuncoesService"],
            _login_login_service__WEBPACK_IMPORTED_MODULE_11__["LoginService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_7__["PermissoesUtilsService"]])
    ], ProgramacaoNavioItemBLFormComponent);
    return ProgramacaoNavioItemBLFormComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_3__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/operacao/programacao-navio/programacao-navio-item-bl/programacao-navio-item-bl-index/programacao-navio-item-bl-index.component.scss":
/*!***********************************************************************************************************************************************************!*\
  !*** ./src/app/pages/operacao/programacao-navio/programacao-navio-item-bl/programacao-navio-item-bl-index/programacao-navio-item-bl-index.component.scss ***!
  \***********************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = (".opacity {\n  opacity: 0.7;\n}\n\ni._white {\n  color: white;\n}\n\ntable tr.active {\n  background-color: #f5f5f5;\n}\n\ndiv.container-buttons {\n  margin-bottom: 5px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcGFnZXMvb3BlcmFjYW8vcHJvZ3JhbWFjYW8tbmF2aW8vcHJvZ3JhbWFjYW8tbmF2aW8taXRlbS1ibC9wcm9ncmFtYWNhby1uYXZpby1pdGVtLWJsLWluZGV4L0M6XFxDb3Jwb3JhdGVcXENvcnBvcmF0ZVdlYkRlc2VudlxcX3VuaXNvbHV0aW9uL3NyY1xcYXBwXFxwYWdlc1xcb3BlcmFjYW9cXHByb2dyYW1hY2FvLW5hdmlvXFxwcm9ncmFtYWNhby1uYXZpby1pdGVtLWJsXFxwcm9ncmFtYWNhby1uYXZpby1pdGVtLWJsLWluZGV4XFxwcm9ncmFtYWNhby1uYXZpby1pdGVtLWJsLWluZGV4LmNvbXBvbmVudC5zY3NzIiwic3JjL2FwcC9wYWdlcy9vcGVyYWNhby9wcm9ncmFtYWNhby1uYXZpby9wcm9ncmFtYWNhby1uYXZpby1pdGVtLWJsL3Byb2dyYW1hY2FvLW5hdmlvLWl0ZW0tYmwtaW5kZXgvcHJvZ3JhbWFjYW8tbmF2aW8taXRlbS1ibC1pbmRleC5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLFlBQUE7QUNDRjs7QURFQTtFQUNFLFlBQUE7QUNDRjs7QURFQTtFQUNFLHlCQUFBO0FDQ0Y7O0FERUE7RUFDRSxrQkFBQTtBQ0NGIiwiZmlsZSI6InNyYy9hcHAvcGFnZXMvb3BlcmFjYW8vcHJvZ3JhbWFjYW8tbmF2aW8vcHJvZ3JhbWFjYW8tbmF2aW8taXRlbS1ibC9wcm9ncmFtYWNhby1uYXZpby1pdGVtLWJsLWluZGV4L3Byb2dyYW1hY2FvLW5hdmlvLWl0ZW0tYmwtaW5kZXguY29tcG9uZW50LnNjc3MiLCJzb3VyY2VzQ29udGVudCI6WyIub3BhY2l0eSB7XHJcbiAgb3BhY2l0eTogMC43O1xyXG59XHJcblxyXG5pLl93aGl0ZSB7XHJcbiAgY29sb3I6IHdoaXRlO1xyXG59XHJcblxyXG50YWJsZSB0ci5hY3RpdmUge1xyXG4gIGJhY2tncm91bmQtY29sb3I6ICNmNWY1ZjU7XHJcbn1cclxuXHJcbmRpdi5jb250YWluZXItYnV0dG9ucyB7XHJcbiAgbWFyZ2luLWJvdHRvbTogNXB4O1xyXG59XHJcbiIsIi5vcGFjaXR5IHtcbiAgb3BhY2l0eTogMC43O1xufVxuXG5pLl93aGl0ZSB7XG4gIGNvbG9yOiB3aGl0ZTtcbn1cblxudGFibGUgdHIuYWN0aXZlIHtcbiAgYmFja2dyb3VuZC1jb2xvcjogI2Y1ZjVmNTtcbn1cblxuZGl2LmNvbnRhaW5lci1idXR0b25zIHtcbiAgbWFyZ2luLWJvdHRvbTogNXB4O1xufSJdfQ== */");

/***/ }),

/***/ "./src/app/pages/operacao/programacao-navio/programacao-navio-item-bl/programacao-navio-item-bl-index/programacao-navio-item-bl-index.component.ts":
/*!*********************************************************************************************************************************************************!*\
  !*** ./src/app/pages/operacao/programacao-navio/programacao-navio-item-bl/programacao-navio-item-bl-index/programacao-navio-item-bl-index.component.ts ***!
  \*********************************************************************************************************************************************************/
/*! exports provided: ProgramacaoNavioItemBLIndexComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoNavioItemBLIndexComponent", function() { return ProgramacaoNavioItemBLIndexComponent; });
/* 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_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../../shared/services/datatables/datatables.service */ "./src/app/shared/services/datatables/datatables.service.ts");
/* harmony import */ var _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../shared/services/funcoes/configuracao/configuracao.facade */ "./src/app/shared/services/funcoes/configuracao/configuracao.facade.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../../shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../cadastro/destinatario/destinatario.model */ "./src/app/pages/cadastro/destinatario/destinatario.model.ts");
/* harmony import */ var _cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../cadastro/destinatario/destinatario.service */ "./src/app/pages/cadastro/destinatario/destinatario.service.ts");
/* harmony import */ var _login_login_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../../login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var _programacao_navio_model__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../programacao-navio.model */ "./src/app/pages/operacao/programacao-navio/programacao-navio.model.ts");
/* harmony import */ var _programacao_navio_item_bl_constants__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../programacao-navio-item-bl.constants */ "./src/app/pages/operacao/programacao-navio/programacao-navio-item-bl/programacao-navio-item-bl.constants.ts");
/* harmony import */ var _programacao_navio_item_bl_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../programacao-navio-item-bl.service */ "./src/app/pages/operacao/programacao-navio/programacao-navio-item-bl/programacao-navio-item-bl.service.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 __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 ProgramacaoNavioItemBLIndexComponent = /** @class */ (function () {
    function ProgramacaoNavioItemBLIndexComponent(funcoes, service, configuracao, datatablesService, serviceDestinatario, messageService, loginService, funcoesService, activatedRoute, permissoesUtils) {
        var _this = this;
        this.funcoes = funcoes;
        this.service = service;
        this.configuracao = configuracao;
        this.datatablesService = datatablesService;
        this.serviceDestinatario = serviceDestinatario;
        this.messageService = messageService;
        this.loginService = loginService;
        this.funcoesService = funcoesService;
        this.activatedRoute = activatedRoute;
        this.permissoesUtils = permissoesUtils;
        this.refresh = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.data = new _programacao_navio_model__WEBPACK_IMPORTED_MODULE_11__["ProgramacaoNavioItemBlDto"]();
        this.dados = [];
        this.constantes = new _programacao_navio_item_bl_constants__WEBPACK_IMPORTED_MODULE_12__["ProgramacaoNavioItemBlConstants"]();
        this.navio = new _cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_8__["Destinatario"]();
        this.config = new _programacao_navio_model__WEBPACK_IMPORTED_MODULE_11__["ConfiguracoesProgramacaoNavioItemBl"]();
        this.loadConfig = function () {
            if (_this.configuracao.isLoadConfig()) {
                _this.config.solRECrd = _this.configuracao.lerConfig("OPE", "solRECrd");
                _this.config.solPedEmbarque = _this.configuracao.lerConfig("OPE", "solPedEmbarque");
                _this.config.modRelCRD = _this.configuracao.lerConfig("WEB", "CorpWebModCRD");
            }
        };
    }
    ProgramacaoNavioItemBLIndexComponent.prototype.ngOnDestroy = function () {
        this.sub.unsubscribe();
        this.dados = [];
        this.data = null;
    };
    ProgramacaoNavioItemBLIndexComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.sub = app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_2__["EventEmitterService"].get('emiProgramacaoNavioItemBL').subscribe(function (resp) {
            _this.showComponents = false;
            _this.showButton = true;
            _this._index = 0;
            _this.configuracao.getConfig(_this.constantes.configs, _this.loadConfig);
            _this.regPrograma = +resp.regPrograma;
            _this.onRefresh({ regPrograma: +resp.regPrograma });
            jQuery("#app-programacao-navio-liberacaoPeloFiscal").modal("show");
        });
    };
    ProgramacaoNavioItemBLIndexComponent.prototype.onRefresh = function (filter) {
        var _this = this;
        this.service.getByFilter(filter).subscribe(function (resp) {
            var columns = [
                _this.datatablesService.getDataString("navio", "navio"),
                _this.datatablesService.getDataString("descrAgencia", "agencia"),
                _this.datatablesService.getDataString("observ", "observacao"),
                _this.datatablesService.getDataString("nomeMaterial", "produto"),
                _this.datatablesService.getDataString("campoMarcado", "marca"),
                _this.datatablesService.getDataString("nomeCliente", "cliente"),
                _this.datatablesService.getDataString("quantid", "quantid"),
                _this.datatablesService.getDataString("unidade", "un")
            ];
            _this.showComponents = true;
            if (resp && resp.length > 0) {
                _this.dados = resp;
                _this.data = _this.dados.length > 0 ? _this.dados[0] : new _programacao_navio_model__WEBPACK_IMPORTED_MODULE_11__["ProgramacaoNavioItemBlDto"]();
                if (_this.data.navio) {
                    _this.serviceDestinatario.getById(_this.data.navio).subscribe(function (_resp) {
                        _this.navio = _resp;
                    });
                }
            }
            _this.datatablesService.datatable("dtLiberacaoPeloFiscal", columns, resp, function (aData) {
                _this.data = aData;
                if (_this.data.navio) {
                    _this.serviceDestinatario.getById(_this.data.navio).subscribe(function (__resp) {
                        _this.navio = __resp;
                    });
                }
            });
        });
    };
    ProgramacaoNavioItemBLIndexComponent.prototype.selected = function (val, index) {
        this._index = index;
        this.data = val;
        this.service.emitChangeEvent(this.data);
    };
    ProgramacaoNavioItemBLIndexComponent.prototype.updateShowButtom = function (event) {
        this.showButton = event;
    };
    ProgramacaoNavioItemBLIndexComponent.prototype.back = function () {
        jQuery("#app-programacao-navio-liberacaoPeloFiscal").modal("hide");
    };
    ProgramacaoNavioItemBLIndexComponent.prototype.save = function () {
        var _this = this;
        this.service.gravar({ regPrograma: this.regPrograma }).subscribe(function (resp) {
            if (!resp.isValid) {
                _this.messageService.warning("titles.liberacaoPeloFiscal", resp.erros[0].message);
                return;
            }
            if (!!_this.config.modRelCRD) {
                _this.print();
            }
            else {
                _this.messageService.info("titles.liberacaoPeloFiscal", "messages.modeloNaoEncontrado", { data: 'CRD' });
            }
            _this.back();
            _this.refresh.emit();
        });
    };
    ProgramacaoNavioItemBLIndexComponent.prototype.print = function () {
        if (!this.regPrograma)
            return;
        this.funcoesService.reportInvoc.invocaRelatorio(this.config.modRelCRD, this.constantes.reportTitulo, {
            regPrograma: +this.regPrograma,
            filial: +this.loginService.getLogin().filialId,
            regLog: +this.loginService.getLogin().colaboradorId
        });
    };
    ProgramacaoNavioItemBLIndexComponent.ctorParameters = function () { return [
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__["FuncoesService"] },
        { type: _programacao_navio_item_bl_service__WEBPACK_IMPORTED_MODULE_13__["ProgramacaoNavioItemBlService"] },
        { type: _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_4__["ConfiguracaoFacade"] },
        { type: _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_3__["DatatablesService"] },
        { type: _cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_9__["DestinatarioService"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__["MessageService"] },
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_10__["LoginService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__["FuncoesService"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__["PermissoesUtilsService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], ProgramacaoNavioItemBLIndexComponent.prototype, "refresh", void 0);
    ProgramacaoNavioItemBLIndexComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: 'app-programacao-navio-item-bl-index',
            template: __importDefault(__webpack_require__(/*! raw-loader!./programacao-navio-item-bl-index.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-item-bl/programacao-navio-item-bl-index/programacao-navio-item-bl-index.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
            styles: [__importDefault(__webpack_require__(/*! ./programacao-navio-item-bl-index.component.scss */ "./src/app/pages/operacao/programacao-navio/programacao-navio-item-bl/programacao-navio-item-bl-index/programacao-navio-item-bl-index.component.scss")).default]
        }),
        __metadata("design:paramtypes", [_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__["FuncoesService"],
            _programacao_navio_item_bl_service__WEBPACK_IMPORTED_MODULE_13__["ProgramacaoNavioItemBlService"],
            _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_4__["ConfiguracaoFacade"],
            _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_3__["DatatablesService"],
            _cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_9__["DestinatarioService"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__["MessageService"],
            _login_login_service__WEBPACK_IMPORTED_MODULE_10__["LoginService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_5__["FuncoesService"],
            _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__["PermissoesUtilsService"]])
    ], ProgramacaoNavioItemBLIndexComponent);
    return ProgramacaoNavioItemBLIndexComponent;
}());



/***/ }),

/***/ "./src/app/pages/operacao/programacao-navio/programacao-navio-item-bl/programacao-navio-item-bl.constants.ts":
/*!*******************************************************************************************************************!*\
  !*** ./src/app/pages/operacao/programacao-navio/programacao-navio-item-bl/programacao-navio-item-bl.constants.ts ***!
  \*******************************************************************************************************************/
/*! exports provided: ProgramacaoNavioItemBlConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoNavioItemBlConstants", function() { return ProgramacaoNavioItemBlConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var ProgramacaoNavioItemBlConstants = /** @class */ (function () {
    function ProgramacaoNavioItemBlConstants() {
        this.sisFormularioId = 250003;
        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" },
            { sisFormularioId: this.sisFormularioId, libRotina: 8, acao: "labels.liberacaoPeloFiscal", },
        ];
        this.sisSistemaId = "CAD";
        this.nomeForm = "titles.liberacaoPeloFiscal";
        this.reportId = "CON0025";
        this.reportTitulo = { "titulo": "Comunicado de Regularização Documental CRD", "subTitulo": "" };
        this.tabela = "ProgramacaoNavioItemBL";
        this.configs = [];
        this.listaIndex = [
            { title: 'Voltar', action: 'back', icon: "icon-arrow-left", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' }
        ];
        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' },
        ];
        this.configs = [
            { sistema: "OPE", parametros: ["SolRECrd", "SolPedEmbarque", "CWModRelCRD"] },
            { sistema: "WEB", parametros: ["CorpWebModCRD"] },
        ];
    }
    return ProgramacaoNavioItemBlConstants;
}());



/***/ }),

/***/ "./src/app/pages/operacao/programacao-navio/programacao-navio-item-bl/programacao-navio-item-bl.service.ts":
/*!*****************************************************************************************************************!*\
  !*** ./src/app/pages/operacao/programacao-navio/programacao-navio-item-bl/programacao-navio-item-bl.service.ts ***!
  \*****************************************************************************************************************/
/*! exports provided: ProgramacaoNavioItemBlService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoNavioItemBlService", function() { return ProgramacaoNavioItemBlService; });
/* 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");
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 ProgramacaoNavioItemBlService = /** @class */ (function (_super) {
    __extends(ProgramacaoNavioItemBlService, _super);
    function ProgramacaoNavioItemBlService(http) {
        var _this = _super.call(this, http, "cadastros/programacaoNavioItemBL") || this;
        _this.change = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
        return _this;
    }
    ProgramacaoNavioItemBlService.prototype.emitChangeEvent = function (current) {
        this.change.emit(current);
    };
    ProgramacaoNavioItemBlService.prototype.getChangeEmitter = function () {
        return this.change;
    };
    ProgramacaoNavioItemBlService.prototype.getByFilter = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/cadastros/programacaoNavioItemBL/getByFilter", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    ProgramacaoNavioItemBlService.prototype.findByRegProgramaAndItem = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/cadastros/programacaoNavioItemBL/findByRegProgramaAndItem", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    ProgramacaoNavioItemBlService.prototype.gravar = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/cadastros/programacaoNavioItemBL/gravar", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    ProgramacaoNavioItemBlService.prototype.gravarAtualizacaoCRDBL = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/cadastros/programacaoNavioItemBL/gravarAtualizacaoCRDBL", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    ProgramacaoNavioItemBlService.ctorParameters = function () { return [
        { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_0__["HttpClient"] }
    ]; };
    ProgramacaoNavioItemBlService = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
            providedIn: "root"
        }),
        __metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_0__["HttpClient"]])
    ], ProgramacaoNavioItemBlService);
    return ProgramacaoNavioItemBlService;
}(_shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_5__["BaseService"]));



/***/ }),

/***/ "./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-dados-portos/programacao-navio-item-dados-portos.component.ts":
/*!**************************************************************************************************************************************************************!*\
  !*** ./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-dados-portos/programacao-navio-item-dados-portos.component.ts ***!
  \**************************************************************************************************************************************************************/
/*! exports provided: ProgramacaoNavioItemDadosPortosComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoNavioItemDadosPortosComponent", function() { return ProgramacaoNavioItemDadosPortosComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_1__ = __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_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../shared/services/funcoes/array-utils/array-utils.static.service */ "./src/app/shared/services/funcoes/array-utils/array-utils.static.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_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _programacao_navio_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../programacao-navio.service */ "./src/app/pages/operacao/programacao-navio/programacao-navio.service.ts");
/* harmony import */ var _programacao_navio_validation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../programacao-navio.validation */ "./src/app/pages/operacao/programacao-navio/programacao-navio.validation.ts");
/* harmony import */ var _programacao_navio_item_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../programacao-navio-item.service */ "./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item.service.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 __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 ProgramacaoNavioItemDadosPortosComponent = /** @class */ (function () {
    function ProgramacaoNavioItemDadosPortosComponent(service, serviceItem, funcoes, message) {
        var _this = this;
        this.service = service;
        this.serviceItem = serviceItem;
        this.funcoes = funcoes;
        this.message = message;
        this.execute = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.validation = new _programacao_navio_validation__WEBPACK_IMPORTED_MODULE_6__["ProgramacaoNavioValidation"](false, service, message, funcoes);
        this.sub = _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_1__["EventEmitterService"].get('emitProgramacaoNavioItemDadosPortos').subscribe(function (item) {
            _this.messages = [];
            _this.serviceItem.item.regCEMercante = !!_this.serviceItem.item.regCEMercante ? _this.serviceItem.item.regCEMercante : "";
            jQuery("#app-programacao-navio-item-dados-portos").modal("show");
        });
    }
    ProgramacaoNavioItemDadosPortosComponent.prototype.ngOnDestroy = function () {
        this.sub.unsubscribe();
    };
    ProgramacaoNavioItemDadosPortosComponent.prototype.ngOnInit = function () {
    };
    ProgramacaoNavioItemDadosPortosComponent.prototype.onSubmit = function (form) {
        _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_1__["EventEmitterService"].get("formItemPortos").emit(form);
        if (form.invalid)
            return;
        if (this.hasError())
            return;
        jQuery("#app-programacao-navio-item-dados-portos").modal("hide");
        this.execute.emit(this.serviceItem.item);
    };
    ProgramacaoNavioItemDadosPortosComponent.prototype.hasError = function () {
        var messages = [];
        if (_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_2__["ArrayUtilsStaticService"].any(messages)) {
            this.messages = messages.filter(function (c) { return !c.isValid; }).map(function (c) { return c.message; });
            return _shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_2__["ArrayUtilsStaticService"].any(this.messages);
        }
        else
            false;
    };
    ProgramacaoNavioItemDadosPortosComponent.ctorParameters = function () { return [
        { type: _programacao_navio_service__WEBPACK_IMPORTED_MODULE_5__["ProgramacaoNavioService"] },
        { type: _programacao_navio_item_service__WEBPACK_IMPORTED_MODULE_7__["ProgramacaoNavioItemService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__["MessageService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], ProgramacaoNavioItemDadosPortosComponent.prototype, "execute", void 0);
    ProgramacaoNavioItemDadosPortosComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: 'app-programacao-navio-item-dados-portos',
            template: __importDefault(__webpack_require__(/*! raw-loader!./programacao-navio-item-dados-portos.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-dados-portos/programacao-navio-item-dados-portos.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_programacao_navio_service__WEBPACK_IMPORTED_MODULE_5__["ProgramacaoNavioService"],
            _programacao_navio_item_service__WEBPACK_IMPORTED_MODULE_7__["ProgramacaoNavioItemService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__["MessageService"]])
    ], ProgramacaoNavioItemDadosPortosComponent);
    return ProgramacaoNavioItemDadosPortosComponent;
}());



/***/ }),

/***/ "./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-dados-reexcedente/programacao-navio-item-dados-reexcedente.component.ts":
/*!************************************************************************************************************************************************************************!*\
  !*** ./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-dados-reexcedente/programacao-navio-item-dados-reexcedente.component.ts ***!
  \************************************************************************************************************************************************************************/
/*! exports provided: ProgramacaoNavioItemDadosREExcedenteComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoNavioItemDadosREExcedenteComponent", function() { return ProgramacaoNavioItemDadosREExcedenteComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_1__ = __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_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../shared/services/funcoes/array-utils/array-utils.static.service */ "./src/app/shared/services/funcoes/array-utils/array-utils.static.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_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _programacao_navio_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../programacao-navio.service */ "./src/app/pages/operacao/programacao-navio/programacao-navio.service.ts");
/* harmony import */ var _programacao_navio_validation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../programacao-navio.validation */ "./src/app/pages/operacao/programacao-navio/programacao-navio.validation.ts");
/* harmony import */ var _programacao_navio_item_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../programacao-navio-item.service */ "./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item.service.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 __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 ProgramacaoNavioItemDadosREExcedenteComponent = /** @class */ (function () {
    function ProgramacaoNavioItemDadosREExcedenteComponent(service, serviceItem, funcoes, message) {
        var _this = this;
        this.service = service;
        this.serviceItem = serviceItem;
        this.funcoes = funcoes;
        this.message = message;
        this.execute = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.validation = new _programacao_navio_validation__WEBPACK_IMPORTED_MODULE_6__["ProgramacaoNavioValidation"](false, service, message, funcoes);
        this.sub = _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_1__["EventEmitterService"].get('emitProgramacaoNavioItemDadosREExcedente').subscribe(function (item) {
            _this.messages = [];
            jQuery("#app-programacao-navio-item-dados-reexcedente").modal("show");
        });
    }
    ProgramacaoNavioItemDadosREExcedenteComponent.prototype.ngOnDestroy = function () {
        this.sub.unsubscribe();
    };
    ProgramacaoNavioItemDadosREExcedenteComponent.prototype.ngOnInit = function () {
    };
    ProgramacaoNavioItemDadosREExcedenteComponent.prototype.onSubmit = function (form) {
        _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_1__["EventEmitterService"].get("formItemDadosREExcedente").emit(form);
        if (form.invalid)
            return;
        if (this.hasError())
            return;
        jQuery("#app-programacao-navio-item-dados-reexcedente").modal("hide");
        this.execute.emit(this.serviceItem.item);
    };
    ProgramacaoNavioItemDadosREExcedenteComponent.prototype.hasError = function () {
        var messages = [];
        if (_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_2__["ArrayUtilsStaticService"].any(messages)) {
            this.messages = messages.filter(function (c) { return !c.isValid; }).map(function (c) { return c.message; });
            return _shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_2__["ArrayUtilsStaticService"].any(this.messages);
        }
        else
            false;
    };
    ProgramacaoNavioItemDadosREExcedenteComponent.ctorParameters = function () { return [
        { type: _programacao_navio_service__WEBPACK_IMPORTED_MODULE_5__["ProgramacaoNavioService"] },
        { type: _programacao_navio_item_service__WEBPACK_IMPORTED_MODULE_7__["ProgramacaoNavioItemService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__["MessageService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], ProgramacaoNavioItemDadosREExcedenteComponent.prototype, "execute", void 0);
    ProgramacaoNavioItemDadosREExcedenteComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: 'app-programacao-navio-item-dados-reexcedente',
            template: __importDefault(__webpack_require__(/*! raw-loader!./programacao-navio-item-dados-reexcedente.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-dados-reexcedente/programacao-navio-item-dados-reexcedente.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_programacao_navio_service__WEBPACK_IMPORTED_MODULE_5__["ProgramacaoNavioService"],
            _programacao_navio_item_service__WEBPACK_IMPORTED_MODULE_7__["ProgramacaoNavioItemService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__["MessageService"]])
    ], ProgramacaoNavioItemDadosREExcedenteComponent);
    return ProgramacaoNavioItemDadosREExcedenteComponent;
}());



/***/ }),

/***/ "./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-dados-unidade/programacao-navio-item-dados-unidade.component.ts":
/*!****************************************************************************************************************************************************************!*\
  !*** ./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-dados-unidade/programacao-navio-item-dados-unidade.component.ts ***!
  \****************************************************************************************************************************************************************/
/*! exports provided: ProgramacaoNavioItemDadosUnidadeComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoNavioItemDadosUnidadeComponent", function() { return ProgramacaoNavioItemDadosUnidadeComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_1__ = __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_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../shared/services/funcoes/array-utils/array-utils.static.service */ "./src/app/shared/services/funcoes/array-utils/array-utils.static.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_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _programacao_navio_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../programacao-navio.service */ "./src/app/pages/operacao/programacao-navio/programacao-navio.service.ts");
/* harmony import */ var _programacao_navio_validation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../programacao-navio.validation */ "./src/app/pages/operacao/programacao-navio/programacao-navio.validation.ts");
/* harmony import */ var _programacao_navio_item_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../programacao-navio-item.service */ "./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item.service.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 __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 ProgramacaoNavioItemDadosUnidadeComponent = /** @class */ (function () {
    function ProgramacaoNavioItemDadosUnidadeComponent(service, serviceItem, funcoes, message) {
        var _this = this;
        this.service = service;
        this.serviceItem = serviceItem;
        this.funcoes = funcoes;
        this.message = message;
        this.execute = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.validation = new _programacao_navio_validation__WEBPACK_IMPORTED_MODULE_6__["ProgramacaoNavioValidation"](false, service, message, funcoes);
        this.sub = _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_1__["EventEmitterService"].get('emitProgramacaoNavioItemDadosUnidade').subscribe(function (item) {
            _this.messages = [];
            jQuery("#app-programacao-navio-item-dados-unidade").modal("show");
        });
    }
    ProgramacaoNavioItemDadosUnidadeComponent.prototype.ngOnDestroy = function () {
        this.sub.unsubscribe();
    };
    ProgramacaoNavioItemDadosUnidadeComponent.prototype.ngOnInit = function () {
    };
    ProgramacaoNavioItemDadosUnidadeComponent.prototype.onSubmit = function (form) {
        _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_1__["EventEmitterService"].get("formItemDadosUnidade").emit(form);
        if (form.invalid)
            return;
        if (this.hasError())
            return;
        jQuery("#app-programacao-navio-item-dados-unidade").modal("hide");
        this.execute.emit(this.serviceItem.item);
    };
    ProgramacaoNavioItemDadosUnidadeComponent.prototype.hasError = function () {
        var messages = [];
        if (_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_2__["ArrayUtilsStaticService"].any(messages)) {
            this.messages = messages.filter(function (c) { return !c.isValid; }).map(function (c) { return c.message; });
            return _shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_2__["ArrayUtilsStaticService"].any(this.messages);
        }
        else
            false;
    };
    ProgramacaoNavioItemDadosUnidadeComponent.ctorParameters = function () { return [
        { type: _programacao_navio_service__WEBPACK_IMPORTED_MODULE_5__["ProgramacaoNavioService"] },
        { type: _programacao_navio_item_service__WEBPACK_IMPORTED_MODULE_7__["ProgramacaoNavioItemService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__["MessageService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], ProgramacaoNavioItemDadosUnidadeComponent.prototype, "execute", void 0);
    ProgramacaoNavioItemDadosUnidadeComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: 'app-programacao-navio-item-dados-unidade',
            template: __importDefault(__webpack_require__(/*! raw-loader!./programacao-navio-item-dados-unidade.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-dados-unidade/programacao-navio-item-dados-unidade.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_programacao_navio_service__WEBPACK_IMPORTED_MODULE_5__["ProgramacaoNavioService"],
            _programacao_navio_item_service__WEBPACK_IMPORTED_MODULE_7__["ProgramacaoNavioItemService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__["MessageService"]])
    ], ProgramacaoNavioItemDadosUnidadeComponent);
    return ProgramacaoNavioItemDadosUnidadeComponent;
}());



/***/ }),

/***/ "./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-dados/programacao-navio-item-dados.component.ts":
/*!************************************************************************************************************************************************!*\
  !*** ./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-dados/programacao-navio-item-dados.component.ts ***!
  \************************************************************************************************************************************************/
/*! exports provided: ProgramacaoNavioItemDadosComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoNavioItemDadosComponent", function() { return ProgramacaoNavioItemDadosComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _programacao_navio_item_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../programacao-navio-item.service */ "./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item.service.ts");
/* harmony import */ var _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_2__ = __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_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../../../../../shared/services/funcoes/array-utils/array-utils.static.service */ "./src/app/shared/services/funcoes/array-utils/array-utils.static.service.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _programacao_navio_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./../../programacao-navio.service */ "./src/app/pages/operacao/programacao-navio/programacao-navio.service.ts");
/* harmony import */ var _programacao_navio_validation__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./../../programacao-navio.validation */ "./src/app/pages/operacao/programacao-navio/programacao-navio.validation.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 __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 ProgramacaoNavioItemDadosComponent = /** @class */ (function () {
    function ProgramacaoNavioItemDadosComponent(service, serviceItem, funcoes, message) {
        var _this = this;
        this.service = service;
        this.serviceItem = serviceItem;
        this.funcoes = funcoes;
        this.message = message;
        this.execute = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.validation = new _programacao_navio_validation__WEBPACK_IMPORTED_MODULE_7__["ProgramacaoNavioValidation"](false, service, message, funcoes);
        this.sub = _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_2__["EventEmitterService"].get('emitProgramacaoNavioItemDados').subscribe(function (_) {
            _this.messages = [];
            jQuery("#app-programacao-navio-item-dados").modal("show");
        });
    }
    ProgramacaoNavioItemDadosComponent.prototype.ngOnDestroy = function () {
        this.sub.unsubscribe();
    };
    ProgramacaoNavioItemDadosComponent.prototype.ngOnInit = function () {
    };
    ProgramacaoNavioItemDadosComponent.prototype.onSubmit = function (form) {
        _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_2__["EventEmitterService"].get("formItemDados").emit(form);
        if (form.invalid)
            return;
        if (this.hasError())
            return;
        jQuery("#app-programacao-navio-item-dados").modal("hide");
        this.execute.emit(this.serviceItem.item);
    };
    ProgramacaoNavioItemDadosComponent.prototype.hasError = function () {
        var messages = [];
        messages.push(this.validation.validaTipoOperCargaPermitido(this.serviceItem.item, false));
        if (_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_3__["ArrayUtilsStaticService"].any(messages)) {
            this.messages = messages.filter(function (c) { return !c.isValid; }).map(function (c) { return c.message; });
            return _shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_3__["ArrayUtilsStaticService"].any(this.messages);
        }
        else
            false;
    };
    ProgramacaoNavioItemDadosComponent.ctorParameters = function () { return [
        { type: _programacao_navio_service__WEBPACK_IMPORTED_MODULE_6__["ProgramacaoNavioService"] },
        { type: _programacao_navio_item_service__WEBPACK_IMPORTED_MODULE_1__["ProgramacaoNavioItemService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__["MessageService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], ProgramacaoNavioItemDadosComponent.prototype, "execute", void 0);
    ProgramacaoNavioItemDadosComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: 'app-programacao-navio-item-dados',
            template: __importDefault(__webpack_require__(/*! raw-loader!./programacao-navio-item-dados.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-dados/programacao-navio-item-dados.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_programacao_navio_service__WEBPACK_IMPORTED_MODULE_6__["ProgramacaoNavioService"],
            _programacao_navio_item_service__WEBPACK_IMPORTED_MODULE_1__["ProgramacaoNavioItemService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__["MessageService"]])
    ], ProgramacaoNavioItemDadosComponent);
    return ProgramacaoNavioItemDadosComponent;
}());



/***/ }),

/***/ "./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-importadores/programacao-navio-item-importadores.component.scss":
/*!****************************************************************************************************************************************************************!*\
  !*** ./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-importadores/programacao-navio-item-importadores.component.scss ***!
  \****************************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = (".opacity {\n  opacity: 0.7;\n}\n\ni._white {\n  color: white;\n}\n\ntable tr.active {\n  background-color: #f5f5f5;\n}\n\ndiv.container-buttons {\n  margin-bottom: 5px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcGFnZXMvb3BlcmFjYW8vcHJvZ3JhbWFjYW8tbmF2aW8vcHJvZ3JhbWFjYW8tbmF2aW8taXRlbS9wcm9ncmFtYWNhby1uYXZpby1pdGVtLWltcG9ydGFkb3Jlcy9DOlxcQ29ycG9yYXRlXFxDb3Jwb3JhdGVXZWJEZXNlbnZcXF91bmlzb2x1dGlvbi9zcmNcXGFwcFxccGFnZXNcXG9wZXJhY2FvXFxwcm9ncmFtYWNhby1uYXZpb1xccHJvZ3JhbWFjYW8tbmF2aW8taXRlbVxccHJvZ3JhbWFjYW8tbmF2aW8taXRlbS1pbXBvcnRhZG9yZXNcXHByb2dyYW1hY2FvLW5hdmlvLWl0ZW0taW1wb3J0YWRvcmVzLmNvbXBvbmVudC5zY3NzIiwic3JjL2FwcC9wYWdlcy9vcGVyYWNhby9wcm9ncmFtYWNhby1uYXZpby9wcm9ncmFtYWNhby1uYXZpby1pdGVtL3Byb2dyYW1hY2FvLW5hdmlvLWl0ZW0taW1wb3J0YWRvcmVzL3Byb2dyYW1hY2FvLW5hdmlvLWl0ZW0taW1wb3J0YWRvcmVzLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsWUFBQTtBQ0NGOztBREVBO0VBQ0UsWUFBQTtBQ0NGOztBREVBO0VBQ0UseUJBQUE7QUNDRjs7QURFQTtFQUNFLGtCQUFBO0FDQ0YiLCJmaWxlIjoic3JjL2FwcC9wYWdlcy9vcGVyYWNhby9wcm9ncmFtYWNhby1uYXZpby9wcm9ncmFtYWNhby1uYXZpby1pdGVtL3Byb2dyYW1hY2FvLW5hdmlvLWl0ZW0taW1wb3J0YWRvcmVzL3Byb2dyYW1hY2FvLW5hdmlvLWl0ZW0taW1wb3J0YWRvcmVzLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLm9wYWNpdHkge1xyXG4gIG9wYWNpdHk6IDAuNztcclxufVxyXG5cclxuaS5fd2hpdGUge1xyXG4gIGNvbG9yOiB3aGl0ZTtcclxufVxyXG5cclxudGFibGUgdHIuYWN0aXZlIHtcclxuICBiYWNrZ3JvdW5kLWNvbG9yOiAjZjVmNWY1O1xyXG59XHJcblxyXG5kaXYuY29udGFpbmVyLWJ1dHRvbnMge1xyXG4gIG1hcmdpbi1ib3R0b206IDVweDtcclxufVxyXG4iLCIub3BhY2l0eSB7XG4gIG9wYWNpdHk6IDAuNztcbn1cblxuaS5fd2hpdGUge1xuICBjb2xvcjogd2hpdGU7XG59XG5cbnRhYmxlIHRyLmFjdGl2ZSB7XG4gIGJhY2tncm91bmQtY29sb3I6ICNmNWY1ZjU7XG59XG5cbmRpdi5jb250YWluZXItYnV0dG9ucyB7XG4gIG1hcmdpbi1ib3R0b206IDVweDtcbn0iXX0= */");

/***/ }),

/***/ "./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-importadores/programacao-navio-item-importadores.component.ts":
/*!**************************************************************************************************************************************************************!*\
  !*** ./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-importadores/programacao-navio-item-importadores.component.ts ***!
  \**************************************************************************************************************************************************************/
/*! exports provided: ProgramacaoNavioItemImportadoresComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoNavioItemImportadoresComponent", function() { return ProgramacaoNavioItemImportadoresComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var app_shared_components_combos_combo_re_due_combo_re_due_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! app/shared/components/combos/combo-re-due/combo-re-due.component */ "./src/app/shared/components/combos/combo-re-due/combo-re-due.component.ts");
/* harmony import */ var _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_2__ = __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_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_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../cadastro/destinatario/destinatario.model */ "./src/app/pages/cadastro/destinatario/destinatario.model.ts");
/* harmony import */ var _cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../cadastro/destinatario/destinatario.service */ "./src/app/pages/cadastro/destinatario/destinatario.service.ts");
/* harmony import */ var _cadastro_lancamento_re_due_lancamento_re_due_model__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../cadastro/lancamento-re-due/lancamento-re-due.model */ "./src/app/pages/cadastro/lancamento-re-due/lancamento-re-due.model.ts");
/* harmony import */ var _cadastro_lancamento_re_due_lancamento_re_due_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../cadastro/lancamento-re-due/lancamento-re-due.service */ "./src/app/pages/cadastro/lancamento-re-due/lancamento-re-due.service.ts");
/* harmony import */ var _cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../cadastro/material/material.service */ "./src/app/pages/cadastro/material/material.service.ts");
/* harmony import */ var _login_login_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../../login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var _programacao_navio_model__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../programacao-navio.model */ "./src/app/pages/operacao/programacao-navio/programacao-navio.model.ts");
/* harmony import */ var _programacao_navio_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../programacao-navio.service */ "./src/app/pages/operacao/programacao-navio/programacao-navio.service.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 __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 ProgramacaoNavioItemImportadoresComponent = /** @class */ (function () {
    function ProgramacaoNavioItemImportadoresComponent(loginService, serviceDestinatario, serviceMaterial, serviceLancamentoReDue, service, funcoesService, message) {
        this.loginService = loginService;
        this.serviceDestinatario = serviceDestinatario;
        this.serviceMaterial = serviceMaterial;
        this.serviceLancamentoReDue = serviceLancamentoReDue;
        this.service = service;
        this.funcoesService = funcoesService;
        this.message = message;
        this.response = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.detail = false;
        this.mensagens = [];
    }
    ProgramacaoNavioItemImportadoresComponent.prototype.ngOnInit = function () {
        return __awaiter(this, void 0, void 0, function () {
            var i, lancamentoReDue;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        this.showTable = true;
                        this.importador = new _cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_5__["Destinatario"]();
                        i = 0;
                        _a.label = 1;
                    case 1:
                        if (!(i < this.item.importadores.length)) return [3 /*break*/, 5];
                        return [4 /*yield*/, this.getImportador(this.item.importadores[i].codImportador, i)];
                    case 2:
                        _a.sent();
                        if (!this.item.importadores[i].regRE) return [3 /*break*/, 4];
                        return [4 /*yield*/, this.getByIdLancamentoReDue(this.item.importadores[i].regRE)];
                    case 3:
                        lancamentoReDue = _a.sent();
                        this.item.importadores[i].numRE = lancamentoReDue.numRE;
                        _a.label = 4;
                    case 4:
                        i++;
                        return [3 /*break*/, 1];
                    case 5: return [2 /*return*/];
                }
            });
        });
    };
    ProgramacaoNavioItemImportadoresComponent.prototype.back = function () {
        return __awaiter(this, void 0, void 0, function () {
            var i, lancamentoReDue;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        this.showComponents(true);
                        this.showTable = true;
                        this.itemImport = new _programacao_navio_model__WEBPACK_IMPORTED_MODULE_11__["ItensImportadoresModel"]();
                        this.importador = new _cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_5__["Destinatario"]();
                        i = 0;
                        _a.label = 1;
                    case 1:
                        if (!(i < this.item.importadores.length)) return [3 /*break*/, 5];
                        return [4 /*yield*/, this.getImportador(this.item.importadores[i].codImportador, i)];
                    case 2:
                        _a.sent();
                        if (!this.item.importadores[i].regRE) return [3 /*break*/, 4];
                        return [4 /*yield*/, this.getByIdLancamentoReDue(this.item.importadores[i].regRE)];
                    case 3:
                        lancamentoReDue = _a.sent();
                        this.item.importadores[i].numRE = lancamentoReDue.numRE;
                        _a.label = 4;
                    case 4:
                        i++;
                        return [3 /*break*/, 1];
                    case 5: return [2 /*return*/];
                }
            });
        });
    };
    ProgramacaoNavioItemImportadoresComponent.prototype.new = function () {
        if (this.isDetail) {
            return false;
        }
        if (!this.item || !this.item.sequencia) {
            this.message.warning("titles.programacaoNavio", "messages.precisaEscolherItem");
            return false;
        }
        this.detail = false;
        this.showTable = false;
        this.itemImport = new _programacao_navio_model__WEBPACK_IMPORTED_MODULE_11__["ItensImportadoresModel"]();
        this.importador = new _cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_5__["Destinatario"]();
        this.showComponents(false);
    };
    Object.defineProperty(ProgramacaoNavioItemImportadoresComponent.prototype, "isItemDetail", {
        get: function () {
            if (this.isDetail)
                return true;
            return this.detail;
        },
        enumerable: true,
        configurable: true
    });
    ProgramacaoNavioItemImportadoresComponent.prototype.showComponents = function (show) {
        this.response.emit(show);
        return show;
    };
    ProgramacaoNavioItemImportadoresComponent.prototype.selected = function (val) {
        this.itemImport = val;
    };
    ProgramacaoNavioItemImportadoresComponent.prototype.edit = function () {
        var _this = this;
        if (!this.itemImport.sequencia) {
            return;
        }
        this.detail = false;
        this.showTable = false;
        this.showComponents(false);
        if (this.itemImport && this.itemImport.programacaoNavioId) {
            var idImportador = this.itemImport.codImportador;
            this.serviceDestinatario
                .getById(idImportador)
                .subscribe(function (resp) {
                _this.importador = resp;
                _this.getLancamentoReDue();
            });
        }
    };
    ProgramacaoNavioItemImportadoresComponent.prototype.show = function () {
        var _this = this;
        if (!this.itemImport.sequencia) {
            return;
        }
        this.detail = true;
        this.showTable = false;
        this.showComponents(false);
        if (this.itemImport && this.itemImport.programacaoNavioId) {
            var idImportador = this.itemImport.codImportador;
            this.serviceDestinatario
                .getById(idImportador)
                .subscribe(function (resp) {
                _this.importador = resp;
                _this.getLancamentoReDue();
            });
        }
    };
    ProgramacaoNavioItemImportadoresComponent.prototype.delete = function (item) {
        var _this = this;
        if (this.isDetail)
            return;
        this.message.removeConfirm(function () {
            var count = 0;
            _this.item.importadores.forEach(function (val) {
                if (item.programacaoNavioId === val.programacaoNavioId &&
                    item.item &&
                    item.item === val.item &&
                    item.sequencia === val.sequencia) {
                    val.sitReg = "E";
                }
                else if (!item.programacaoNavioId &&
                    item.sequencia === val.sequencia) {
                    _this.item.importadores.splice(count, 1);
                }
                count++;
            });
        });
    };
    ProgramacaoNavioItemImportadoresComponent.prototype.onSubmit = function (form) {
        var _this = this;
        _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_2__["EventEmitterService"].get("formError").emit(form);
        if (form.invalid) {
            return;
        }
        if (this.itemImport.regRE === 0) {
            this.itemImport.regRE = null;
        }
        var idxItem = this.service.programacaoNavio.itens.findIndex(function (c) { return c.sequencia == _this.item.sequencia; });
        if (idxItem >= 0) {
            var idxImp = this.service.programacaoNavio.itens[idxItem].importadores.findIndex(function (c) { return c.sequencia == _this.itemImport.sequencia; });
            if (idxImp >= 0) {
                this.service.programacaoNavio.itens[idxItem].importadores[idxImp] =
                    this.itemImport;
            }
            else {
                this.itemImport.notMapped = true;
                this.itemImport.sequencia =
                    this.service.programacaoNavio.itens[idxItem].importadores.length + 1;
                this.service.programacaoNavio.itens[idxItem].importadores.push(this.itemImport);
            }
        }
        var actionForm;
        if (this.service.programacaoNavio.programacaoNavioId) {
            actionForm = 3;
        }
        else {
            actionForm = 1;
        }
        this.showTable = true;
        this.showComponents(true);
    };
    /*******************************************/
    ProgramacaoNavioItemImportadoresComponent.prototype.outputImportador = function (importador) {
        if (!importador || (importador && !importador.destinatarioId)) {
            return;
        }
        this.importador = importador;
        this.itemImport.importador = importador;
        this.getLancamentoReDue();
        this.reDue.getLancamentoReDue();
    };
    ProgramacaoNavioItemImportadoresComponent.prototype.getLancamentoReDue = function () {
        var _this = this;
        var filter = new _cadastro_lancamento_re_due_lancamento_re_due_model__WEBPACK_IMPORTED_MODULE_7__["LancamentoReDueFilter"]();
        var currenDate = new Date();
        currenDate.setFullYear(2000);
        filter.de = currenDate;
        filter.destinatarioIdCliente = this.itemImport.codImportador;
        this.listLancamentoReDue = [];
        this.serviceLancamentoReDue
            .getByFilter(filter)
            .subscribe(function (resp) {
            _this.listLancamentoReDue = resp;
        });
    };
    ProgramacaoNavioItemImportadoresComponent.prototype.getByIdLancamentoReDue = function (id) {
        return __awaiter(this, void 0, void 0, function () {
            var promise;
            var _this = this;
            return __generator(this, function (_a) {
                promise = new Promise(function (resolve, reject) {
                    _this.serviceLancamentoReDue
                        .getById(id)
                        .subscribe(function (resp) {
                        resolve(resp);
                    });
                });
                return [2 /*return*/, promise];
            });
        });
    };
    ProgramacaoNavioItemImportadoresComponent.prototype.getImportador = function (id, index) {
        var _this = this;
        var promise = new Promise(function (resolve, reject) {
            _this.serviceDestinatario.getById(id).subscribe(function (resp) {
                _this.item.importadores[index].importador = resp;
                resolve(resp);
            });
        });
        return promise;
    };
    ProgramacaoNavioItemImportadoresComponent.ctorParameters = function () { return [
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_10__["LoginService"] },
        { type: _cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_6__["DestinatarioService"] },
        { type: _cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_9__["MaterialService"] },
        { type: _cadastro_lancamento_re_due_lancamento_re_due_service__WEBPACK_IMPORTED_MODULE_8__["LancamentoReDueService"] },
        { type: _programacao_navio_service__WEBPACK_IMPORTED_MODULE_12__["ProgramacaoNavioService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__["MessageService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewChild"])(app_shared_components_combos_combo_re_due_combo_re_due_component__WEBPACK_IMPORTED_MODULE_1__["ComboReDueComponent"], { static: false }),
        __metadata("design:type", app_shared_components_combos_combo_re_due_combo_re_due_component__WEBPACK_IMPORTED_MODULE_1__["ComboReDueComponent"])
    ], ProgramacaoNavioItemImportadoresComponent.prototype, "reDue", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", Boolean)
    ], ProgramacaoNavioItemImportadoresComponent.prototype, "isDetail", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", _programacao_navio_model__WEBPACK_IMPORTED_MODULE_11__["ItensModel"])
    ], ProgramacaoNavioItemImportadoresComponent.prototype, "item", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], ProgramacaoNavioItemImportadoresComponent.prototype, "response", void 0);
    ProgramacaoNavioItemImportadoresComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-programacao-navio-item-importadores",
            template: __importDefault(__webpack_require__(/*! raw-loader!./programacao-navio-item-importadores.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-importadores/programacao-navio-item-importadores.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
            styles: [__importDefault(__webpack_require__(/*! ./programacao-navio-item-importadores.component.scss */ "./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-importadores/programacao-navio-item-importadores.component.scss")).default]
        }),
        __metadata("design:paramtypes", [_login_login_service__WEBPACK_IMPORTED_MODULE_10__["LoginService"],
            _cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_6__["DestinatarioService"],
            _cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_9__["MaterialService"],
            _cadastro_lancamento_re_due_lancamento_re_due_service__WEBPACK_IMPORTED_MODULE_8__["LancamentoReDueService"],
            _programacao_navio_service__WEBPACK_IMPORTED_MODULE_12__["ProgramacaoNavioService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_4__["MessageService"]])
    ], ProgramacaoNavioItemImportadoresComponent);
    return ProgramacaoNavioItemImportadoresComponent;
}());



/***/ }),

/***/ "./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-itens/programacao-navio-item-itens.component.scss":
/*!**************************************************************************************************************************************************!*\
  !*** ./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-itens/programacao-navio-item-itens.component.scss ***!
  \**************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = (".opacity {\n  opacity: 0.7;\n}\n\ni._white {\n  color: white;\n}\n\ntable tr.active {\n  background-color: #f5f5f5;\n}\n\ndiv.container-buttons {\n  margin-bottom: 5px;\n}\n\ndiv.form-check-inline {\n  position: relative;\n}\n\ndiv.__mask {\n  position: absolute;\n  width: 100%;\n  height: 100%;\n  z-index: 3;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcGFnZXMvb3BlcmFjYW8vcHJvZ3JhbWFjYW8tbmF2aW8vcHJvZ3JhbWFjYW8tbmF2aW8taXRlbS9wcm9ncmFtYWNhby1uYXZpby1pdGVtLWl0ZW5zL0M6XFxDb3Jwb3JhdGVcXENvcnBvcmF0ZVdlYkRlc2VudlxcX3VuaXNvbHV0aW9uL3NyY1xcYXBwXFxwYWdlc1xcb3BlcmFjYW9cXHByb2dyYW1hY2FvLW5hdmlvXFxwcm9ncmFtYWNhby1uYXZpby1pdGVtXFxwcm9ncmFtYWNhby1uYXZpby1pdGVtLWl0ZW5zXFxwcm9ncmFtYWNhby1uYXZpby1pdGVtLWl0ZW5zLmNvbXBvbmVudC5zY3NzIiwic3JjL2FwcC9wYWdlcy9vcGVyYWNhby9wcm9ncmFtYWNhby1uYXZpby9wcm9ncmFtYWNhby1uYXZpby1pdGVtL3Byb2dyYW1hY2FvLW5hdmlvLWl0ZW0taXRlbnMvcHJvZ3JhbWFjYW8tbmF2aW8taXRlbS1pdGVucy5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLFlBQUE7QUNDRjs7QURFQTtFQUNFLFlBQUE7QUNDRjs7QURFQTtFQUNFLHlCQUFBO0FDQ0Y7O0FERUE7RUFDRSxrQkFBQTtBQ0NGOztBREVBO0VBQ0Usa0JBQUE7QUNDRjs7QURFQTtFQUNFLGtCQUFBO0VBQ0EsV0FBQTtFQUNBLFlBQUE7RUFDQSxVQUFBO0FDQ0YiLCJmaWxlIjoic3JjL2FwcC9wYWdlcy9vcGVyYWNhby9wcm9ncmFtYWNhby1uYXZpby9wcm9ncmFtYWNhby1uYXZpby1pdGVtL3Byb2dyYW1hY2FvLW5hdmlvLWl0ZW0taXRlbnMvcHJvZ3JhbWFjYW8tbmF2aW8taXRlbS1pdGVucy5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIi5vcGFjaXR5IHtcclxuICBvcGFjaXR5OiAwLjc7XHJcbn1cclxuXHJcbmkuX3doaXRlIHtcclxuICBjb2xvcjogd2hpdGU7XHJcbn1cclxuXHJcbnRhYmxlIHRyLmFjdGl2ZSB7XHJcbiAgYmFja2dyb3VuZC1jb2xvcjogI2Y1ZjVmNTtcclxufVxyXG5cclxuZGl2LmNvbnRhaW5lci1idXR0b25zIHtcclxuICBtYXJnaW4tYm90dG9tOiA1cHg7XHJcbn1cclxuXHJcbmRpdi5mb3JtLWNoZWNrLWlubGluZSB7XHJcbiAgcG9zaXRpb246IHJlbGF0aXZlO1xyXG59XHJcblxyXG5kaXYuX19tYXNrIHtcclxuICBwb3NpdGlvbjogYWJzb2x1dGU7XHJcbiAgd2lkdGg6IDEwMCU7XHJcbiAgaGVpZ2h0OiAxMDAlO1xyXG4gIHotaW5kZXg6IDM7XHJcbn1cclxuIiwiLm9wYWNpdHkge1xuICBvcGFjaXR5OiAwLjc7XG59XG5cbmkuX3doaXRlIHtcbiAgY29sb3I6IHdoaXRlO1xufVxuXG50YWJsZSB0ci5hY3RpdmUge1xuICBiYWNrZ3JvdW5kLWNvbG9yOiAjZjVmNWY1O1xufVxuXG5kaXYuY29udGFpbmVyLWJ1dHRvbnMge1xuICBtYXJnaW4tYm90dG9tOiA1cHg7XG59XG5cbmRpdi5mb3JtLWNoZWNrLWlubGluZSB7XG4gIHBvc2l0aW9uOiByZWxhdGl2ZTtcbn1cblxuZGl2Ll9fbWFzayB7XG4gIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgd2lkdGg6IDEwMCU7XG4gIGhlaWdodDogMTAwJTtcbiAgei1pbmRleDogMztcbn0iXX0= */");

/***/ }),

/***/ "./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-itens/programacao-navio-item-itens.component.ts":
/*!************************************************************************************************************************************************!*\
  !*** ./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-itens/programacao-navio-item-itens.component.ts ***!
  \************************************************************************************************************************************************/
/*! exports provided: ProgramacaoNavioItemItensComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoNavioItemItensComponent", function() { return ProgramacaoNavioItemItensComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _config_enumerables__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var _shared_components_combos_combo_padrao_combo_padrao_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../shared/components/combos/combo-padrao/combo-padrao.service */ "./src/app/shared/components/combos/combo-padrao/combo-padrao.service.ts");
/* harmony import */ var _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__ = __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_funcoes_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.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 _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../cadastro/destinatario/destinatario.model */ "./src/app/pages/cadastro/destinatario/destinatario.model.ts");
/* harmony import */ var _cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../cadastro/destinatario/destinatario.service */ "./src/app/pages/cadastro/destinatario/destinatario.service.ts");
/* harmony import */ var _cadastro_material_material_model__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../../cadastro/material/material.model */ "./src/app/pages/cadastro/material/material.model.ts");
/* harmony import */ var _cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../../cadastro/material/material.service */ "./src/app/pages/cadastro/material/material.service.ts");
/* harmony import */ var _cadastro_tipo_operacao_tipo_operacao_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../../cadastro/tipo-operacao/tipo-operacao.service */ "./src/app/pages/cadastro/tipo-operacao/tipo-operacao.service.ts");
/* harmony import */ var _controle_osg_osg_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../../controle/osg/osg.service */ "./src/app/pages/controle/osg/osg.service.ts");
/* harmony import */ var _login_login_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../../login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var _programacao_navio_constants__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../programacao-navio.constants */ "./src/app/pages/operacao/programacao-navio/programacao-navio.constants.ts");
/* harmony import */ var _programacao_navio_model__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../programacao-navio.model */ "./src/app/pages/operacao/programacao-navio/programacao-navio.model.ts");
/* harmony import */ var _programacao_navio_service__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../programacao-navio.service */ "./src/app/pages/operacao/programacao-navio/programacao-navio.service.ts");
/* harmony import */ var _programacao_navio_item_service__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../programacao-navio-item.service */ "./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item.service.ts");
/* harmony import */ var _shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./../../../../../shared/services/funcoes/boolean-utils/boolean-utils.static.service */ "./src/app/shared/services/funcoes/boolean-utils/boolean-utils.static.service.ts");
/* harmony import */ var _shared_services_funcoes_object_utils_object_utils_static_service__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./../../../../../shared/services/funcoes/object-utils/object-utils.static.service */ "./src/app/shared/services/funcoes/object-utils/object-utils.static.service.ts");
/* harmony import */ var _cadastro_ce_mercante_ce_mercante_service__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./../../../../cadastro/ce-mercante/ce-mercante.service */ "./src/app/pages/cadastro/ce-mercante/ce-mercante.service.ts");
/* harmony import */ var _programacao_navio_validation__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./../../programacao-navio.validation */ "./src/app/pages/operacao/programacao-navio/programacao-navio.validation.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 __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 ProgramacaoNavioItemItensComponent = /** @class */ (function () {
    function ProgramacaoNavioItemItensComponent(service, serviceItem, loginService, serviceTipoOperacao, serviceDestinatario, serviceOsg, serviceMaterial, serviceProgramacaoNavio, message, funcoesService, permissoesUtils, serviceCEMercante, comboPadraoService) {
        var _this = this;
        this.service = service;
        this.serviceItem = serviceItem;
        this.loginService = loginService;
        this.serviceTipoOperacao = serviceTipoOperacao;
        this.serviceDestinatario = serviceDestinatario;
        this.serviceOsg = serviceOsg;
        this.serviceMaterial = serviceMaterial;
        this.serviceProgramacaoNavio = serviceProgramacaoNavio;
        this.message = message;
        this.funcoesService = funcoesService;
        this.permissoesUtils = permissoesUtils;
        this.serviceCEMercante = serviceCEMercante;
        this.comboPadraoService = comboPadraoService;
        this.response = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.selectedItem = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.constantes = new _programacao_navio_constants__WEBPACK_IMPORTED_MODULE_14__["ProgramacaoNavioConstants"]();
        this.detail = false;
        this.mascara = new _config_enumerables__WEBPACK_IMPORTED_MODULE_1__["Mascaras"]();
        this.mensagens = [];
        this.permissionAlteraPortos = false;
        this.permissionAlteraDados = false;
        this.permissionAlteraUnidade = false;
        this.permissionAlteraREExcedente = false;
        this.permissionExcluiItemCPEmbarque = false;
        this.showComponents = true;
        this.outDadosItem = function (item) {
            _this.service.alteraDadosItem(item).subscribe(function (result) {
                if (!result.isValid) {
                    _this.mensagens = _this.message.validationResult(result);
                    _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__["EventEmitterService"].get("backError").emit(_this.mensagens);
                }
                else {
                    _this.message.saveSuccess("titles.programacaoNavio");
                    _this.service.setDataItens(_this.serviceItem.item);
                    _this.serviceItem.item = new _programacao_navio_model__WEBPACK_IMPORTED_MODULE_15__["ItensModel"]();
                }
            });
        };
        this.outDadosPortos = function (item) {
            _this.service.alteraDadosPortos(item).subscribe(function (result) {
                if (!result.isValid) {
                    _this.mensagens = _this.message.validationResult(result);
                    _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__["EventEmitterService"].get("backError").emit(_this.mensagens);
                }
                else {
                    _this.message.saveSuccess("titles.programacaoNavio");
                    _this.service.setDataItens(_this.serviceItem.item);
                    _this.serviceItem.item = new _programacao_navio_model__WEBPACK_IMPORTED_MODULE_15__["ItensModel"]();
                }
            });
        };
        this.outAlterarUnidade = function (item) {
            _this.service.alteraDadosUnidade(item).subscribe(function (result) {
                if (!result.isValid) {
                    _this.mensagens = _this.message.validationResult(result);
                    _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__["EventEmitterService"].get("backError").emit(_this.mensagens);
                }
                else {
                    _this.message.saveSuccess("titles.programacaoNavio");
                    _this.service.setDataItens(_this.serviceItem.item);
                    _this.serviceItem.item = new _programacao_navio_model__WEBPACK_IMPORTED_MODULE_15__["ItensModel"]();
                }
            });
        };
        this.outAlteraREExcedente = function (item) {
            _this.service.alteraDadosREExcedente(item).subscribe(function (result) {
                if (!result.isValid) {
                    _this.mensagens = _this.message.validationResult(result);
                    _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__["EventEmitterService"].get("backError").emit(_this.mensagens);
                }
                else {
                    _this.message.saveSuccess("titles.programacaoNavio");
                    _this.service.setDataItens(_this.serviceItem.item);
                    _this.serviceItem.item = new _programacao_navio_model__WEBPACK_IMPORTED_MODULE_15__["ItensModel"]();
                }
            });
        };
        this.validation = new _programacao_navio_validation__WEBPACK_IMPORTED_MODULE_21__["ProgramacaoNavioValidation"](this.isDetail, service, message, funcoesService);
    }
    ProgramacaoNavioItemItensComponent.prototype.ngOnInit = function () {
        this.showTable = true;
        this.material = new _cadastro_material_material_model__WEBPACK_IMPORTED_MODULE_9__["Material"]();
        this.cliente = new _cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_7__["Destinatario"]();
        this.despachante = new _cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_7__["Destinatario"]();
        this.controladora = new _cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_7__["Destinatario"]();
        this.getOperationTypes();
        this.getEnquadramento();
    };
    ProgramacaoNavioItemItensComponent.prototype.alteraPortos = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 8, function () {
            _this.permissionAlteraPortos = true;
        }, function () {
            _this.permissionAlteraPortos = false;
        }, true);
    };
    ProgramacaoNavioItemItensComponent.prototype.alteraDados = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 8, function () {
            _this.permissionAlteraDados = true;
        }, function () {
            _this.permissionAlteraDados = false;
        }, true);
    };
    ProgramacaoNavioItemItensComponent.prototype.vrfAlteraUnidade = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 8, function () {
            _this.permissionAlteraUnidade = true;
        }, function () {
            _this.permissionAlteraUnidade = false;
        }, true);
    };
    ProgramacaoNavioItemItensComponent.prototype.vrfAlteraREExcedente = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 8, function () {
            _this.permissionAlteraREExcedente = true;
        }, function () {
            _this.permissionAlteraREExcedente = false;
        }, true);
    };
    ProgramacaoNavioItemItensComponent.prototype.excluiItemCPEmbarque = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 8, function () {
            _this.permissionExcluiItemCPEmbarque = true;
        }, function () {
            _this.permissionExcluiItemCPEmbarque = false;
        }, true);
    };
    ProgramacaoNavioItemItensComponent.prototype.back = function () {
        this.response.emit(true);
        this.showTable = true;
        this.cliente = new _cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_7__["Destinatario"]();
        this.material = new _cadastro_material_material_model__WEBPACK_IMPORTED_MODULE_9__["Material"]();
        this.serviceItem.item = new _programacao_navio_model__WEBPACK_IMPORTED_MODULE_15__["ItensModel"]();
        this.serviceItem.actionFormItem = 0;
        this.selectedItem.emit(this.serviceItem.item);
    };
    ProgramacaoNavioItemItensComponent.prototype.new = function () {
        if (this.isDetail) {
            return false;
        }
        this.getCeMercanteByNavio(this.service.programacaoNavio.destinatarioIdNavio, this.service.programacaoNavio.regViagem);
        this.detail = false;
        this.showTable = false;
        this.serviceItem.item = new _programacao_navio_model__WEBPACK_IMPORTED_MODULE_15__["ItensModel"]();
        this.cliente = new _cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_7__["Destinatario"]();
        this.material = new _cadastro_material_material_model__WEBPACK_IMPORTED_MODULE_9__["Material"]();
        this.serviceItem.actionFormItem = 1;
        this.response.emit(false);
    };
    ProgramacaoNavioItemItensComponent.prototype.selected = function (val) {
        var _this = this;
        this.serviceItem.item = _shared_services_funcoes_object_utils_object_utils_static_service__WEBPACK_IMPORTED_MODULE_19__["ObjectUtilsStaticService"].clone(val);
        this.serviceItem.item.cliente = _shared_services_funcoes_object_utils_object_utils_static_service__WEBPACK_IMPORTED_MODULE_19__["ObjectUtilsStaticService"].clone(val.cliente);
        this.serviceItem.item.trading = _shared_services_funcoes_object_utils_object_utils_static_service__WEBPACK_IMPORTED_MODULE_19__["ObjectUtilsStaticService"].clone(val.trading);
        this.serviceItem.item.emitente = _shared_services_funcoes_object_utils_object_utils_static_service__WEBPACK_IMPORTED_MODULE_19__["ObjectUtilsStaticService"].clone(val.emitente);
        this.serviceItem.item.material = _shared_services_funcoes_object_utils_object_utils_static_service__WEBPACK_IMPORTED_MODULE_19__["ObjectUtilsStaticService"].clone(val.material);
        if (!!this.serviceItem.item.codEnquadramento)
            this.serviceItem.item.enquadramento = this.serviceItem.enquadramentos.find(function (c) { return c.chave === _this.serviceItem.item.codEnquadramento; });
        this.selectedItem.emit(this.serviceItem.item);
    };
    Object.defineProperty(ProgramacaoNavioItemItensComponent.prototype, "isItemDetail", {
        get: function () {
            if (this.isDetail)
                return true;
            return this.detail;
        },
        enumerable: true,
        configurable: true
    });
    ProgramacaoNavioItemItensComponent.prototype.edit = function () {
        var _this = this;
        if (!this.serviceItem.item.sequencia || this.isDetail) {
            return;
        }
        if (this.serviceItem.item.flagLib === "G") {
            this.message.warning("titles.programacaoNavio", "messages.itemLiberadoParaOperacaoAlteracaoNaoPermitida");
            return;
        }
        this.serviceItem.actionFormItem = 3;
        this.getCeMercanteByNavio(this.service.programacaoNavio.destinatarioIdNavio, this.service.programacaoNavio.regViagem);
        this.alteraPortos();
        this.alteraDados();
        this.vrfAlteraUnidade();
        this.vrfAlteraREExcedente();
        this.excluiItemCPEmbarque();
        this.detail = false;
        this.showTable = false;
        this.response.emit(false);
        if (this.serviceItem.item && this.serviceItem.item.programacaoNavioId) {
            if (this.serviceItem.item.regOsg) {
                var idOsg = this.serviceItem.item.regOsg;
                this.serviceOsg.getById(idOsg).subscribe(function (resp) {
                    _this.serviceItem.item.osg = resp;
                });
            }
        }
    };
    ProgramacaoNavioItemItensComponent.prototype.show = function () {
        var _this = this;
        if (!this.serviceItem.item.sequencia) {
            return;
        }
        this.serviceItem.actionFormItem = 2;
        this.getCeMercanteByNavio(this.service.programacaoNavio.destinatarioIdNavio, this.service.programacaoNavio.regViagem);
        this.detail = true;
        this.showTable = false;
        this.response.emit(false);
        if (this.serviceItem.item && this.serviceItem.item.programacaoNavioId) {
            var idControladora = this.serviceItem.item.codControladora;
            if (idControladora) {
                this.serviceDestinatario.getById(idControladora).subscribe(function (resp) {
                    _this.controladora = resp;
                });
            }
            var idDespachante = this.serviceItem.item.codDespac;
            if (idDespachante) {
                this.serviceDestinatario.getById(idDespachante).subscribe(function (resp) {
                    _this.despachante = resp;
                });
            }
            if (this.serviceItem.item.regOsg) {
                var idOsg = this.serviceItem.item.regOsg;
                this.serviceOsg.getById(idOsg).subscribe(function (resp) {
                    _this.serviceItem.item.osg = resp;
                });
            }
        }
    };
    ProgramacaoNavioItemItensComponent.prototype.delete = function (item) {
        var _this = this;
        if (this.isDetail)
            return;
        if (item.flagLib === 'G') {
            this.message.warning("titles.programacaoNavio", "messages.itemLiberadoParaOperacaoAlteracaoNaoPermitida");
            return;
        }
        this.message.removeConfirm(function () {
            var count = 0;
            _this.service.programacaoNavio.itens.forEach(function (val) {
                if (item.programacaoNavioId === val.programacaoNavioId && item.item && item.item === val.item) {
                    val.sitReg = 'E';
                }
                else if (!item.programacaoNavioId && item.sequencia === val.sequencia) {
                    _this.service.programacaoNavio.itens.splice(count, 1);
                }
                count++;
            });
            _this.serviceItem.item = new _programacao_navio_model__WEBPACK_IMPORTED_MODULE_15__["ItensModel"]();
            _this.response.emit(true);
        });
    };
    ProgramacaoNavioItemItensComponent.prototype.onSubmit = function (form) {
        var _this = this;
        _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__["EventEmitterService"].get("formError").emit(form);
        if (form.invalid) {
            var counter = 0;
            for (var i = 0; i < form._directives.length; i++) {
                if (form._directives[i].name === "tipoMov") {
                    counter = counter + 1;
                    if (counter > 1) {
                        form._directives.splice(i, 1);
                        i = i - 1;
                    }
                }
            }
            _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__["EventEmitterService"].get("formError").emit(form);
            return;
        }
        if (!this.serviceItem.item.materialId) {
            return;
        }
        if (!this.serviceItem.item.destinatarioIdCliente) {
            return;
        }
        if (!this.validateDtEmbarque()) {
            return false;
        }
        if (this.serviceItem.item.tipoOperacao === 0) {
            this.serviceItem.item.tipoOperacao = null;
        }
        var idxItem = this.service.programacaoNavio.itens.findIndex(function (c) { return c.sequencia == _this.serviceItem.item.sequencia; });
        if (idxItem >= 0) {
            this.service.programacaoNavio.itens[idxItem] = this.serviceItem.item;
        }
        else {
            this.serviceItem.item.notMapped = true;
            this.serviceItem.item.sequencia = this.service.programacaoNavio.itens.length + 1;
            this.service.programacaoNavio.itens.push(this.serviceItem.item);
        }
        this.showTable = true;
        this.response.emit(true);
        this.selectedItem.emit(this.serviceItem.item);
    };
    ProgramacaoNavioItemItensComponent.prototype.outputMaterial = function (material) {
        if (!material || (material && !material.materialId)) {
            return;
        }
        this.serviceItem.item.material = material;
        if (this.serviceItem.actionFormItem === 1) {
            this.serviceItem.item.densidade = this.serviceItem.item.material.densidadePadrao;
        }
    };
    ProgramacaoNavioItemItensComponent.prototype.outputCliente = function (destinatario) {
        if (!destinatario || (destinatario && !destinatario.destinatarioId)) {
            return;
        }
        this.serviceItem.item.cliente = destinatario;
    };
    ProgramacaoNavioItemItensComponent.prototype.outputTrading = function (trading) {
        if (!trading || (trading && !trading.destinatarioId)) {
            return;
        }
        this.serviceItem.item.trading = trading;
    };
    ProgramacaoNavioItemItensComponent.prototype.outputEmitente = function (emitente) {
        if (!emitente || (emitente && !emitente.destinatarioId)) {
            return;
        }
        this.serviceItem.item.emitente = emitente;
    };
    ProgramacaoNavioItemItensComponent.prototype.outputDespachante = function (despachante) {
        if (!despachante || (despachante && !despachante.destinatarioId)) {
            return;
        }
        this.despachante = despachante;
        this.serviceItem.item.codDespac = despachante.destinatarioId;
    };
    ProgramacaoNavioItemItensComponent.prototype.outputControladora = function (controladora) {
        if (!controladora || (controladora && !controladora.destinatarioId)) {
            return;
        }
        this.controladora = controladora;
    };
    ProgramacaoNavioItemItensComponent.prototype.validateDtEmbarque = function () {
        if (this.serviceItem.item.dtEmbarqueI && this.serviceItem.item.dtEmbarqueF && this.serviceItem.item.dtEmbarqueI > this.serviceItem.item.dtEmbarqueF) {
            this.message.warning("titles.programacaoNavio", "messages.dtEmbarqueINaoPodeSerMaiorDataAte");
            return false;
        }
        return true;
    };
    ProgramacaoNavioItemItensComponent.prototype.getEnquadramento = function () {
        var _this = this;
        this.serviceItem.enquadramentos = [];
        this.comboPadraoService.get("Enquadramento", "CodEnquadramento", "DescrEnquadramento", true, null, "Obrigacodigo").subscribe(function (data) {
            _this.serviceItem.enquadramentos = data;
        });
    };
    ProgramacaoNavioItemItensComponent.prototype.duplicate = function (item) {
        if (this.isDetail) {
            return false;
        }
        var sitem = JSON.stringify(item);
        var nitem = JSON.parse(sitem);
        nitem.notMapped = true;
        nitem.sequencia = this.service.programacaoNavio.itens.length + 1;
        nitem.item = null;
        this.service.programacaoNavio.itens.push(nitem);
        this.message.success("titles.programacaoNavio", "messages.itemDuplicado");
    };
    ProgramacaoNavioItemItensComponent.prototype.trataOsg = function (osg) {
        this.serviceItem.item.regOsg = osg.osgId;
        this.serviceItem.item.osg = osg;
    };
    ProgramacaoNavioItemItensComponent.prototype.getOperationTypes = function () {
        var _this = this;
        this.serviceItem.operationTypes = [];
        this.serviceTipoOperacao._get().subscribe(function (resp) {
            _this.serviceItem.operationTypes = resp;
        });
    };
    ProgramacaoNavioItemItensComponent.prototype.getCeMercanteByNavio = function (destinatarioIdNavio, regViagem) {
        var _this = this;
        if (!destinatarioIdNavio || destinatarioIdNavio === 0 || !regViagem || regViagem === 0) {
            return;
        }
        this.serviceCEMercante.getByNavio(destinatarioIdNavio).subscribe(function (resp) {
            _this.serviceItem.cEMercanteList = resp.filter(function (val) {
                if (val.viagemNavioId === +regViagem) {
                    return val;
                }
            });
        });
    };
    Object.defineProperty(ProgramacaoNavioItemItensComponent.prototype, "disabledTipoOperacao", {
        get: function () {
            return this.detail === true || (this.serviceItem.item.programacaoNavioId && this.permissionAlteraPortos !== true && !this.service.config.dadosAntaq) ? true : null;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ProgramacaoNavioItemItensComponent.prototype, "solicitaTanqueMarcado", {
        get: function () {
            return _shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_18__["BooleanUtilsStaticService"].toBoolean(this.service.config.degradacao);
        },
        enumerable: true,
        configurable: true
    });
    ProgramacaoNavioItemItensComponent.prototype.dadosItem = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 2, function () { return _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__["EventEmitterService"].get('emitProgramacaoNavioItemDados').emit(_this.serviceItem.item); }, function () { return _this.permissoesUtils.back(); }, true);
    };
    ;
    ProgramacaoNavioItemItensComponent.prototype.dadosPortos = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 10, function () { return _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__["EventEmitterService"].get('emitProgramacaoNavioItemDadosPortos').emit(); }, function () { return _this.permissoesUtils.back(); }, true);
    };
    ;
    ProgramacaoNavioItemItensComponent.prototype.alterarUnidade = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 12, function () { return _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__["EventEmitterService"].get('emitProgramacaoNavioItemDadosUnidade').emit(); }, function () { return _this.permissoesUtils.back(); }, true);
    };
    ;
    ProgramacaoNavioItemItensComponent.prototype.alteraREExcedente = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 13, function () { return _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_3__["EventEmitterService"].get('emitProgramacaoNavioItemDadosREExcedente').emit(); }, function () { return _this.permissoesUtils.back(); }, true);
    };
    ;
    Object.defineProperty(ProgramacaoNavioItemItensComponent.prototype, "disabledAlteraREExcedente", {
        get: function () {
            if (!this.serviceItem.item || !this.serviceItem.item.sequencia || !this.showTable)
                return true;
            return ![1, 5, 6, 7, 8].includes(this.service.programacaoNavio.codSitNavio);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ProgramacaoNavioItemItensComponent.prototype, "solEmitente", {
        get: function () {
            if (!this.serviceItem)
                return false;
            if (!this.serviceItem.item)
                return false;
            if (!this.serviceItem.item.material)
                return false;
            return this.serviceItem.item.material.flagEmitenteNavio === "S";
        },
        enumerable: true,
        configurable: true
    });
    ProgramacaoNavioItemItensComponent.ctorParameters = function () { return [
        { type: _programacao_navio_service__WEBPACK_IMPORTED_MODULE_16__["ProgramacaoNavioService"] },
        { type: _programacao_navio_item_service__WEBPACK_IMPORTED_MODULE_17__["ProgramacaoNavioItemService"] },
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_13__["LoginService"] },
        { type: _cadastro_tipo_operacao_tipo_operacao_service__WEBPACK_IMPORTED_MODULE_11__["TipoOperacaoService"] },
        { type: _cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_8__["DestinatarioService"] },
        { type: _controle_osg_osg_service__WEBPACK_IMPORTED_MODULE_12__["OsgService"] },
        { type: _cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_10__["MaterialService"] },
        { type: _programacao_navio_service__WEBPACK_IMPORTED_MODULE_16__["ProgramacaoNavioService"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_6__["MessageService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__["PermissoesUtilsService"] },
        { type: _cadastro_ce_mercante_ce_mercante_service__WEBPACK_IMPORTED_MODULE_20__["CeMercanteService"] },
        { type: _shared_components_combos_combo_padrao_combo_padrao_service__WEBPACK_IMPORTED_MODULE_2__["ComboPadraoService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", Boolean)
    ], ProgramacaoNavioItemItensComponent.prototype, "isDetail", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], ProgramacaoNavioItemItensComponent.prototype, "response", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], ProgramacaoNavioItemItensComponent.prototype, "selectedItem", void 0);
    ProgramacaoNavioItemItensComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: 'app-programacao-navio-item-itens',
            template: __importDefault(__webpack_require__(/*! raw-loader!./programacao-navio-item-itens.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-itens/programacao-navio-item-itens.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
            styles: [__importDefault(__webpack_require__(/*! ./programacao-navio-item-itens.component.scss */ "./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-itens/programacao-navio-item-itens.component.scss")).default]
        }),
        __metadata("design:paramtypes", [_programacao_navio_service__WEBPACK_IMPORTED_MODULE_16__["ProgramacaoNavioService"],
            _programacao_navio_item_service__WEBPACK_IMPORTED_MODULE_17__["ProgramacaoNavioItemService"],
            _login_login_service__WEBPACK_IMPORTED_MODULE_13__["LoginService"],
            _cadastro_tipo_operacao_tipo_operacao_service__WEBPACK_IMPORTED_MODULE_11__["TipoOperacaoService"],
            _cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_8__["DestinatarioService"],
            _controle_osg_osg_service__WEBPACK_IMPORTED_MODULE_12__["OsgService"],
            _cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_10__["MaterialService"],
            _programacao_navio_service__WEBPACK_IMPORTED_MODULE_16__["ProgramacaoNavioService"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_6__["MessageService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__["PermissoesUtilsService"],
            _cadastro_ce_mercante_ce_mercante_service__WEBPACK_IMPORTED_MODULE_20__["CeMercanteService"],
            _shared_components_combos_combo_padrao_combo_padrao_service__WEBPACK_IMPORTED_MODULE_2__["ComboPadraoService"]])
    ], ProgramacaoNavioItemItensComponent);
    return ProgramacaoNavioItemItensComponent;
}());



/***/ }),

/***/ "./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item.service.ts":
/*!***********************************************************************************************************!*\
  !*** ./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item.service.ts ***!
  \***********************************************************************************************************/
/*! exports provided: ProgramacaoNavioItemService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoNavioItemService", function() { return ProgramacaoNavioItemService; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _programacao_navio_model__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../programacao-navio.model */ "./src/app/pages/operacao/programacao-navio/programacao-navio.model.ts");
/* harmony import */ var _pages_cadastro_tipo_operacao_tipo_operacao_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../../../../pages/cadastro/tipo-operacao/tipo-operacao.service */ "./src/app/pages/cadastro/tipo-operacao/tipo-operacao.service.ts");
/* harmony import */ var _shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../../../../shared/services/funcoes/boolean-utils/boolean-utils.static.service */ "./src/app/shared/services/funcoes/boolean-utils/boolean-utils.static.service.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.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 __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 ProgramacaoNavioItemService = /** @class */ (function () {
    function ProgramacaoNavioItemService(messageService, funcoesService, serviceTipoOperacao) {
        this.messageService = messageService;
        this.funcoesService = funcoesService;
        this.serviceTipoOperacao = serviceTipoOperacao;
        this.item = new _programacao_navio_model__WEBPACK_IMPORTED_MODULE_1__["ItensModel"]();
        this.cEMercanteList = [];
        this.enquadramentos = [];
    }
    Object.defineProperty(ProgramacaoNavioItemService.prototype, "tiposOperacao", {
        get: function () {
            var _this = this;
            var operationTypes = this.operationTypes;
            if (!!this.item.tipoOperacao)
                operationTypes = this.operationTypes.filter(function (c) { return _shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_3__["BooleanUtilsStaticService"].toBoolean(c.flagAtivo) || c.tipoOperacaoId === _this.item.tipoOperacao; });
            if (this.funcoesService.isCreate(this.actionFormItem))
                operationTypes = this.operationTypes.filter(function (c) { return _shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_3__["BooleanUtilsStaticService"].toBoolean(c.flagAtivo); });
            return operationTypes;
        },
        enumerable: true,
        configurable: true
    });
    ProgramacaoNavioItemService.prototype.changeOperationType = function () {
        var _this = this;
        if (!this.item.tipoOperacao) {
            this.item.tipoMov = "";
            return;
        }
        this.serviceTipoOperacao.getById(this.item.tipoOperacao).subscribe(function (resp) {
            var response = resp;
            _this.item.tipoMovimentoNavioId = response.tipoMovimentoNavioId;
            if (response.tipoMov === "A") {
                _this.item.tipoMov = "";
            }
            else {
                _this.item.tipoMov = response.tipoMov;
            }
        });
    };
    Object.defineProperty(ProgramacaoNavioItemService.prototype, "disabledTipoMov", {
        get: function () {
            var _this = this;
            var tipoOperacao = this.operationTypes.find(function (c) { return c.tipoOperacaoId === +_this.item.tipoOperacao; });
            return !tipoOperacao || tipoOperacao.tipoMov !== "A";
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ProgramacaoNavioItemService.prototype, "obrigaTipoMov", {
        get: function () {
            var _this = this;
            var tipoOperacao = this.operationTypes.find(function (c) { return c.tipoOperacaoId === +_this.item.tipoOperacao; });
            return tipoOperacao && tipoOperacao.tipoMov === "A";
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ProgramacaoNavioItemService.prototype, "obrigaCodigoEnquadramento", {
        get: function () {
            if (!this.item.enquadramento)
                return false;
            return _shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_3__["BooleanUtilsStaticService"].toBoolean(this.item.enquadramento.obrigacodigo);
        },
        enumerable: true,
        configurable: true
    });
    ProgramacaoNavioItemService.prototype.trataEnquadramento = function (event) {
        if (!event.target.value)
            this.item.enquadramento = {};
        else
            this.item.enquadramento = this.enquadramentos.find(function (c) { return c.chave === event.target.value; });
    };
    Object.defineProperty(ProgramacaoNavioItemService.prototype, "unidades", {
        get: function () {
            return ['KG', 'LT', 'M3', 'UN'];
        },
        enumerable: true,
        configurable: true
    });
    ProgramacaoNavioItemService.ctorParameters = function () { return [
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__["MessageService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"] },
        { type: _pages_cadastro_tipo_operacao_tipo_operacao_service__WEBPACK_IMPORTED_MODULE_2__["TipoOperacaoService"] }
    ]; };
    ProgramacaoNavioItemService = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])({
            providedIn: "root"
        }),
        __metadata("design:paramtypes", [_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__["MessageService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"],
            _pages_cadastro_tipo_operacao_tipo_operacao_service__WEBPACK_IMPORTED_MODULE_2__["TipoOperacaoService"]])
    ], ProgramacaoNavioItemService);
    return ProgramacaoNavioItemService;
}());



/***/ }),

/***/ "./src/app/pages/operacao/programacao-navio/programacao-navio-liberacao-operacao-index/programacao-navio-liberacao-operacao-index.component.scss":
/*!*******************************************************************************************************************************************************!*\
  !*** ./src/app/pages/operacao/programacao-navio/programacao-navio-liberacao-operacao-index/programacao-navio-liberacao-operacao-index.component.scss ***!
  \*******************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("div.circle {\n  width: 15px;\n  height: 15px;\n  border: 1px solid transparent;\n  border-radius: 100%;\n  background-color: transparent;\n}\ndiv.circle.actived {\n  border: 1px solid #ccc;\n  background-color: red;\n}\n.row.mt25 {\n  margin-top: 25px;\n}\n.chk input {\n  display: none;\n}\n.chk span {\n  width: 18px;\n  height: 18px;\n  display: block;\n  background-color: #fff;\n  border: 1px solid #DDD;\n  border-radius: 18px;\n}\nspan.red {\n  background-color: #c03;\n}\ntd label {\n  margin: 0;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcGFnZXMvb3BlcmFjYW8vcHJvZ3JhbWFjYW8tbmF2aW8vcHJvZ3JhbWFjYW8tbmF2aW8tbGliZXJhY2FvLW9wZXJhY2FvLWluZGV4L0M6XFxDb3Jwb3JhdGVcXENvcnBvcmF0ZVdlYkRlc2VudlxcX3VuaXNvbHV0aW9uL3NyY1xcYXBwXFxwYWdlc1xcb3BlcmFjYW9cXHByb2dyYW1hY2FvLW5hdmlvXFxwcm9ncmFtYWNhby1uYXZpby1saWJlcmFjYW8tb3BlcmFjYW8taW5kZXhcXHByb2dyYW1hY2FvLW5hdmlvLWxpYmVyYWNhby1vcGVyYWNhby1pbmRleC5jb21wb25lbnQuc2NzcyIsInNyYy9hcHAvcGFnZXMvb3BlcmFjYW8vcHJvZ3JhbWFjYW8tbmF2aW8vcHJvZ3JhbWFjYW8tbmF2aW8tbGliZXJhY2FvLW9wZXJhY2FvLWluZGV4L3Byb2dyYW1hY2FvLW5hdmlvLWxpYmVyYWNhby1vcGVyYWNhby1pbmRleC5jb21wb25lbnQuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtFQUNFLFdBQUE7RUFDQSxZQUFBO0VBQ0EsNkJBQUE7RUFDQSxtQkFBQTtFQUNBLDZCQUFBO0FDQ0Y7QURDRTtFQUNFLHNCQUFBO0VBQ0EscUJBQUE7QUNDSjtBREdBO0VBQ0UsZ0JBQUE7QUNBRjtBREdBO0VBQ0UsYUFBQTtBQ0FGO0FER0E7RUFDRSxXQUFBO0VBQ0EsWUFBQTtFQUNBLGNBQUE7RUFDQSxzQkFBQTtFQUNBLHNCQUFBO0VBQ0EsbUJBQUE7QUNBRjtBREdBO0VBQ0Usc0JBQUE7QUNBRjtBRElFO0VBQ0UsU0FBQTtBQ0RKIiwiZmlsZSI6InNyYy9hcHAvcGFnZXMvb3BlcmFjYW8vcHJvZ3JhbWFjYW8tbmF2aW8vcHJvZ3JhbWFjYW8tbmF2aW8tbGliZXJhY2FvLW9wZXJhY2FvLWluZGV4L3Byb2dyYW1hY2FvLW5hdmlvLWxpYmVyYWNhby1vcGVyYWNhby1pbmRleC5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbImRpdi5jaXJjbGUge1xyXG4gIHdpZHRoOiAxNXB4O1xyXG4gIGhlaWdodDogMTVweDtcclxuICBib3JkZXI6IDFweCBzb2xpZCB0cmFuc3BhcmVudDtcclxuICBib3JkZXItcmFkaXVzOiAxMDAlO1xyXG4gIGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50O1xyXG5cclxuICAmLmFjdGl2ZWQge1xyXG4gICAgYm9yZGVyOiAxcHggc29saWQgI2NjYztcclxuICAgIGJhY2tncm91bmQtY29sb3I6IHJlZDtcclxuICB9XHJcbn1cclxuXHJcbi5yb3cubXQyNSB7XHJcbiAgbWFyZ2luLXRvcDogMjVweDtcclxufVxyXG5cclxuLmNoayBpbnB1dCB7XHJcbiAgZGlzcGxheTogbm9uZTtcclxufVxyXG5cclxuLmNoayBzcGFuIHtcclxuICB3aWR0aDogMThweDtcclxuICBoZWlnaHQ6IDE4cHg7XHJcbiAgZGlzcGxheTogYmxvY2s7XHJcbiAgYmFja2dyb3VuZC1jb2xvcjogI2ZmZjtcclxuICBib3JkZXI6IDFweCBzb2xpZCAjREREO1xyXG4gIGJvcmRlci1yYWRpdXM6IDE4cHg7XHJcbn1cclxuXHJcbnNwYW4ucmVkIHtcclxuICBiYWNrZ3JvdW5kLWNvbG9yOiAjYzAzO1xyXG59XHJcblxyXG50ZCB7XHJcbiAgbGFiZWwge1xyXG4gICAgbWFyZ2luOiAwO1xyXG4gIH1cclxufSIsImRpdi5jaXJjbGUge1xuICB3aWR0aDogMTVweDtcbiAgaGVpZ2h0OiAxNXB4O1xuICBib3JkZXI6IDFweCBzb2xpZCB0cmFuc3BhcmVudDtcbiAgYm9yZGVyLXJhZGl1czogMTAwJTtcbiAgYmFja2dyb3VuZC1jb2xvcjogdHJhbnNwYXJlbnQ7XG59XG5kaXYuY2lyY2xlLmFjdGl2ZWQge1xuICBib3JkZXI6IDFweCBzb2xpZCAjY2NjO1xuICBiYWNrZ3JvdW5kLWNvbG9yOiByZWQ7XG59XG5cbi5yb3cubXQyNSB7XG4gIG1hcmdpbi10b3A6IDI1cHg7XG59XG5cbi5jaGsgaW5wdXQge1xuICBkaXNwbGF5OiBub25lO1xufVxuXG4uY2hrIHNwYW4ge1xuICB3aWR0aDogMThweDtcbiAgaGVpZ2h0OiAxOHB4O1xuICBkaXNwbGF5OiBibG9jaztcbiAgYmFja2dyb3VuZC1jb2xvcjogI2ZmZjtcbiAgYm9yZGVyOiAxcHggc29saWQgI0RERDtcbiAgYm9yZGVyLXJhZGl1czogMThweDtcbn1cblxuc3Bhbi5yZWQge1xuICBiYWNrZ3JvdW5kLWNvbG9yOiAjYzAzO1xufVxuXG50ZCBsYWJlbCB7XG4gIG1hcmdpbjogMDtcbn0iXX0= */");

/***/ }),

/***/ "./src/app/pages/operacao/programacao-navio/programacao-navio-liberacao-operacao-index/programacao-navio-liberacao-operacao-index.component.ts":
/*!*****************************************************************************************************************************************************!*\
  !*** ./src/app/pages/operacao/programacao-navio/programacao-navio-liberacao-operacao-index/programacao-navio-liberacao-operacao-index.component.ts ***!
  \*****************************************************************************************************************************************************/
/*! exports provided: ProgramacaoNavioLiberacaoOperacaoIndexComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoNavioLiberacaoOperacaoIndexComponent", function() { return ProgramacaoNavioLiberacaoOperacaoIndexComponent; });
/* harmony import */ var app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! app/shared/services/funcoes/array-utils/array-utils.static.service */ "./src/app/shared/services/funcoes/array-utils/array-utils.static.service.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 _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../shared/services/funcoes/configuracao/configuracao.facade */ "./src/app/shared/services/funcoes/configuracao/configuracao.facade.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.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 _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../cadastro/destinatario/destinatario.service */ "./src/app/pages/cadastro/destinatario/destinatario.service.ts");
/* harmony import */ var _login_login_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var _programacao_navio_model__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../programacao-navio.model */ "./src/app/pages/operacao/programacao-navio/programacao-navio.model.ts");
/* harmony import */ var _programacao_navio_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../programacao-navio.service */ "./src/app/pages/operacao/programacao-navio/programacao-navio.service.ts");
/* harmony import */ var _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./../../../../shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var _programacao_navio_liberacao_operacao_constants__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./programacao-navio-liberacao-operacao.constants */ "./src/app/pages/operacao/programacao-navio/programacao-navio-liberacao-operacao-index/programacao-navio-liberacao-operacao.constants.ts");
/* harmony import */ var _programacao_navio_liberacao_operacao_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./programacao-navio-liberacao-operacao.service */ "./src/app/pages/operacao/programacao-navio/programacao-navio-liberacao-operacao-index/programacao-navio-liberacao-operacao.service.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 __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 ProgramacaoNavioLiberacaoOperacaoIndexComponent = /** @class */ (function () {
    function ProgramacaoNavioLiberacaoOperacaoIndexComponent(funcoes, router, service, serviceDestinatario, configuracao, messageService, loginService, funcoesService, activatedRoute, permissoesUtils, serviceProgramacaoNavio) {
        var _this = this;
        this.funcoes = funcoes;
        this.router = router;
        this.service = service;
        this.serviceDestinatario = serviceDestinatario;
        this.configuracao = configuracao;
        this.messageService = messageService;
        this.loginService = loginService;
        this.funcoesService = funcoesService;
        this.activatedRoute = activatedRoute;
        this.permissoesUtils = permissoesUtils;
        this.serviceProgramacaoNavio = serviceProgramacaoNavio;
        this.refresh = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
        this.data = new _programacao_navio_model__WEBPACK_IMPORTED_MODULE_9__["ProgramacaoNavioLiberacaoOperacaoDto"]();
        this.dados = [];
        this.constantes = new _programacao_navio_liberacao_operacao_constants__WEBPACK_IMPORTED_MODULE_12__["ProgramacaoNavioLiberacaoOperacaoConstants"]();
        this.programacao = {};
        this.loadConfig = function () {
            if (_this.configuracao.isLoadConfig()) {
                _this.config.solPedEmbarque = _this.configuracao.lerConfig("OPE", "solPedEmbarque");
            }
        };
    }
    ProgramacaoNavioLiberacaoOperacaoIndexComponent.prototype.ngOnDestroy = function () {
        this.sub.unsubscribe();
        this.dados = [];
        this.data = null;
    };
    ProgramacaoNavioLiberacaoOperacaoIndexComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.sub = _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_11__["EventEmitterService"].get('emiProgramacaoNavioLiberacaoOperacao').subscribe(function (resp) { return __awaiter(_this, void 0, void 0, function () {
            var verifica;
            var _this = this;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        this.config = new _programacao_navio_model__WEBPACK_IMPORTED_MODULE_9__["ConfiguracoesNavio"]();
                        this.configuracao.getConfig(this.constantes.configs, this.loadConfig);
                        this.regPrograma = resp.regPrograma;
                        if (!(this.config.solPedEmbarque === 'S')) return [3 /*break*/, 1];
                        verifica = { regPrograma: +this.regPrograma };
                        this.serviceProgramacaoNavio.verificaItem(verifica).subscribe(function (resp) {
                            if (resp.length !== 0) {
                                _this.messageService.warning("titles.liberacaoOperacao", "messages.exiteItemSemPedidoEmbarqueGerado");
                                _this.back();
                            }
                        });
                        return [3 /*break*/, 3];
                    case 1: return [4 /*yield*/, this.service.crdAtualizar({ regPrograma: +this.regPrograma }).toPromise()];
                    case 2:
                        _a.sent();
                        this.onRefresh({ regPrograma: +this.regPrograma });
                        _a.label = 3;
                    case 3:
                        jQuery("#app-programacao-navio-liberacaoOperacao").modal("show");
                        return [2 /*return*/];
                }
            });
        }); });
    };
    ProgramacaoNavioLiberacaoOperacaoIndexComponent.prototype.onRefresh = function (filter) {
        return __awaiter(this, void 0, void 0, function () {
            var _a, _b;
            return __generator(this, function (_c) {
                switch (_c.label) {
                    case 0:
                        _a = this;
                        return [4 /*yield*/, this.service.getByRegPrograma(filter).toPromise()];
                    case 1:
                        _a.dados = _c.sent();
                        if (!(!!this.dados && this.dados.length > 0)) return [3 /*break*/, 3];
                        this.data = this.dados[0];
                        this.programacao.descrPier = this.data.descrPier;
                        _b = this.programacao;
                        return [4 /*yield*/, this.serviceDestinatario.getById(this.data.destinatarioIdNavio).toPromise()];
                    case 2:
                        _b.navio = _c.sent();
                        this.programacao.descAgencia = this.data.descAgencia;
                        this.programacao.observ = this.data.observ;
                        _c.label = 3;
                    case 3: return [2 /*return*/];
                }
            });
        });
    };
    ProgramacaoNavioLiberacaoOperacaoIndexComponent.prototype.back = function () {
        jQuery("#app-programacao-navio-liberacaoOperacao").modal("hide");
    };
    ProgramacaoNavioLiberacaoOperacaoIndexComponent.prototype.selected = function (val, index) {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                this._index = index;
                this.data = val;
                val.flag = !val.flag;
                val.flagLib = val.flag ? "S" : "N";
                this.dados[index].flag = val.flag;
                return [2 /*return*/];
            });
        });
    };
    ProgramacaoNavioLiberacaoOperacaoIndexComponent.prototype.getNavio = function () {
        var _this = this;
        var promise = new Promise(function (resolve, reject) {
            _this.serviceDestinatario.getById(_this.data.destinatarioIdNavio).subscribe(function (resp) {
                _this.data.navio = resp;
                resolve(_this.data);
            });
            return promise;
        });
        return promise;
    };
    ProgramacaoNavioLiberacaoOperacaoIndexComponent.prototype.freeUp = function () {
        return __awaiter(this, void 0, void 0, function () {
            var liberarOperacao;
            var _this = this;
            return __generator(this, function (_a) {
                switch (_a.label) {
                    case 0:
                        if (!this.hasItemSelected)
                            return [2 /*return*/];
                        this.dados.filter(function (c) { return c.flag; }).forEach(function (i) { return __awaiter(_this, void 0, void 0, function () {
                            return __generator(this, function (_a) {
                                switch (_a.label) {
                                    case 0: return [4 /*yield*/, this.service.setFlagLib({ regPrograma: i.programacaoNavioId, item: i.item, flagLib: i.flagLib }).toPromise()];
                                    case 1:
                                        _a.sent();
                                        return [2 /*return*/];
                                }
                            });
                        }); });
                        return [4 /*yield*/, this.service.liberarOperacao({ regPrograma: +this.data.programacaoNavioId }).toPromise()];
                    case 1:
                        liberarOperacao = _a.sent();
                        if (!liberarOperacao.isValid) {
                            liberarOperacao.erros.forEach(function (m) { return _this.messageService.warning("titles.liberacaoOperacao", m.message); });
                            return [2 /*return*/];
                        }
                        this.messageService.saveSuccess("titles.liberacaoOperacao");
                        this.refresh.emit();
                        this.onRefresh({ regPrograma: +this.data.programacaoNavioId });
                        this.data = new _programacao_navio_model__WEBPACK_IMPORTED_MODULE_9__["ProgramacaoNavioLiberacaoOperacaoDto"]();
                        this.dados = [];
                        jQuery("#app-programacao-navio-liberacaoOperacao").modal("hide");
                        return [2 /*return*/];
                }
            });
        });
    };
    ProgramacaoNavioLiberacaoOperacaoIndexComponent.prototype.selectedAll = function () {
        var _this = this;
        if (!app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_0__["ArrayUtilsStaticService"].any(this.dados))
            return;
        var flag = !this.hasItemSelected ? true : (this.dados.length !== this.countSelected);
        this.dados.map(function (e) {
            e.flag = flag;
            e.flagLib = _this.hasItemSelected ? "S" : "N";
        });
    };
    ProgramacaoNavioLiberacaoOperacaoIndexComponent.prototype.print = function () {
        var _this = this;
        if (!this.regPrograma) {
            return;
        }
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 5, function () {
            _this.funcoesService.reportInvoc.invocaRelatorio(_this.constantes.reportId02, _this.constantes.reportTitulo02, {
                regPrograma: +_this.regPrograma,
                filial: +_this.loginService.getLogin().filialId,
                colaborador: +_this.loginService.getLogin().colaboradorId
            });
        });
    };
    Object.defineProperty(ProgramacaoNavioLiberacaoOperacaoIndexComponent.prototype, "hasItemSelected", {
        get: function () {
            if (!this.dados)
                return false;
            var selecteds = this.dados.filter(function (c) { return c.flag; });
            return app_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_0__["ArrayUtilsStaticService"].any(selecteds);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ProgramacaoNavioLiberacaoOperacaoIndexComponent.prototype, "countSelected", {
        get: function () {
            if (!this.hasItemSelected)
                return 0;
            return this.dados.filter(function (c) { return c.flag; }).length;
        },
        enumerable: true,
        configurable: true
    });
    ProgramacaoNavioLiberacaoOperacaoIndexComponent.ctorParameters = function () { return [
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"] },
        { type: _programacao_navio_liberacao_operacao_service__WEBPACK_IMPORTED_MODULE_13__["ProgramacaoNavioLiberacaoOperacaoService"] },
        { type: _cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_7__["DestinatarioService"] },
        { type: _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_3__["ConfiguracaoFacade"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_6__["MessageService"] },
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_8__["LoginService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_2__["ActivatedRoute"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__["PermissoesUtilsService"] },
        { type: _programacao_navio_service__WEBPACK_IMPORTED_MODULE_10__["ProgramacaoNavioService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])(),
        __metadata("design:type", Object)
    ], ProgramacaoNavioLiberacaoOperacaoIndexComponent.prototype, "refresh", void 0);
    ProgramacaoNavioLiberacaoOperacaoIndexComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
            selector: 'app-programacao-navio-liberacao-operacao-index',
            template: __importDefault(__webpack_require__(/*! raw-loader!./programacao-navio-liberacao-operacao-index.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-liberacao-operacao-index/programacao-navio-liberacao-operacao-index.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None,
            styles: [__importDefault(__webpack_require__(/*! ./programacao-navio-liberacao-operacao-index.component.scss */ "./src/app/pages/operacao/programacao-navio/programacao-navio-liberacao-operacao-index/programacao-navio-liberacao-operacao-index.component.scss")).default]
        }),
        __metadata("design:paramtypes", [_shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"],
            _angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"],
            _programacao_navio_liberacao_operacao_service__WEBPACK_IMPORTED_MODULE_13__["ProgramacaoNavioLiberacaoOperacaoService"],
            _cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_7__["DestinatarioService"],
            _shared_services_funcoes_configuracao_configuracao_facade__WEBPACK_IMPORTED_MODULE_3__["ConfiguracaoFacade"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_6__["MessageService"],
            _login_login_service__WEBPACK_IMPORTED_MODULE_8__["LoginService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"],
            _angular_router__WEBPACK_IMPORTED_MODULE_2__["ActivatedRoute"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__["PermissoesUtilsService"],
            _programacao_navio_service__WEBPACK_IMPORTED_MODULE_10__["ProgramacaoNavioService"]])
    ], ProgramacaoNavioLiberacaoOperacaoIndexComponent);
    return ProgramacaoNavioLiberacaoOperacaoIndexComponent;
}());



/***/ }),

/***/ "./src/app/pages/operacao/programacao-navio/programacao-navio-liberacao-operacao-index/programacao-navio-liberacao-operacao.constants.ts":
/*!***********************************************************************************************************************************************!*\
  !*** ./src/app/pages/operacao/programacao-navio/programacao-navio-liberacao-operacao-index/programacao-navio-liberacao-operacao.constants.ts ***!
  \***********************************************************************************************************************************************/
/*! exports provided: ProgramacaoNavioLiberacaoOperacaoConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoNavioLiberacaoOperacaoConstants", function() { return ProgramacaoNavioLiberacaoOperacaoConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var ProgramacaoNavioLiberacaoOperacaoConstants = /** @class */ (function () {
    function ProgramacaoNavioLiberacaoOperacaoConstants() {
        this.sisFormularioId = 250003;
        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 = "CAD";
        this.nomeForm = "titles.liberacaoOperacao";
        this.reportId01 = "CAD0247";
        this.reportTitulo01 = { "titulo": "Comunicado de Regularização Documental CRD", "subTitulo": "" };
        this.reportId02 = "CAD0248";
        this.reportTitulo02 = { "titulo": "Comunicado de Regularização Documental CRD", "subTitulo": "" };
        this.tabela = "ProgramacaoNavioItem";
        this.configs = [];
        this.listaIndex = [
            { title: 'Voltar', action: 'back', icon: "icon-arrow-left", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' }
        ];
        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' },
        ];
        this.configs = [
            { sistema: "OPE", parametros: ["SolRECrd", "SolPedEmbarque"] },
        ];
    }
    return ProgramacaoNavioLiberacaoOperacaoConstants;
}());



/***/ }),

/***/ "./src/app/pages/operacao/programacao-navio/programacao-navio-liberacao-operacao-index/programacao-navio-liberacao-operacao.service.ts":
/*!*********************************************************************************************************************************************!*\
  !*** ./src/app/pages/operacao/programacao-navio/programacao-navio-liberacao-operacao-index/programacao-navio-liberacao-operacao.service.ts ***!
  \*********************************************************************************************************************************************/
/*! exports provided: ProgramacaoNavioLiberacaoOperacaoService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoNavioLiberacaoOperacaoService", function() { return ProgramacaoNavioLiberacaoOperacaoService; });
/* 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");
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 ProgramacaoNavioLiberacaoOperacaoService = /** @class */ (function (_super) {
    __extends(ProgramacaoNavioLiberacaoOperacaoService, _super);
    function ProgramacaoNavioLiberacaoOperacaoService(http) {
        return _super.call(this, http, "cadastros/programacaoNavioItem") || this;
    }
    ProgramacaoNavioLiberacaoOperacaoService.prototype.getByRegPrograma = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/cadastros/programacaoNavioItem/getByRegPrograma", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    ProgramacaoNavioLiberacaoOperacaoService.prototype.liberarOperacao = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/cadastros/programacaoNavio/liberarOperacao", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    ProgramacaoNavioLiberacaoOperacaoService.prototype.crdAtualizar = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/cadastros/programacaoNavio/crdAtualizar", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    ProgramacaoNavioLiberacaoOperacaoService.prototype.setFlagLib = function (data) {
        return this.http
            .post(_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].service_url + "/api/v1/cadastros/programacaoNavioItem/setFlagLib", data)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(_app_error_handler__WEBPACK_IMPORTED_MODULE_4__["ErrorHandler"].handleError));
    };
    ProgramacaoNavioLiberacaoOperacaoService.ctorParameters = function () { return [
        { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_0__["HttpClient"] }
    ]; };
    ProgramacaoNavioLiberacaoOperacaoService = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
            providedIn: "root"
        }),
        __metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_0__["HttpClient"]])
    ], ProgramacaoNavioLiberacaoOperacaoService);
    return ProgramacaoNavioLiberacaoOperacaoService;
}(_shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_5__["BaseService"]));



/***/ }),

/***/ "./src/app/pages/operacao/programacao-navio/programacao-navio-observacoes/programacao-navio-observacoes.component.scss":
/*!*****************************************************************************************************************************!*\
  !*** ./src/app/pages/operacao/programacao-navio/programacao-navio-observacoes/programacao-navio-observacoes.component.scss ***!
  \*****************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = (".opacity {\n  opacity: 0.7;\n}\n\ni._white {\n  color: white;\n}\n\ntable tr.active {\n  background-color: #f5f5f5;\n}\n\ndiv.container-buttons {\n  margin-bottom: 5px;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcGFnZXMvb3BlcmFjYW8vcHJvZ3JhbWFjYW8tbmF2aW8vcHJvZ3JhbWFjYW8tbmF2aW8tb2JzZXJ2YWNvZXMvQzpcXENvcnBvcmF0ZVxcQ29ycG9yYXRlV2ViRGVzZW52XFxfdW5pc29sdXRpb24vc3JjXFxhcHBcXHBhZ2VzXFxvcGVyYWNhb1xccHJvZ3JhbWFjYW8tbmF2aW9cXHByb2dyYW1hY2FvLW5hdmlvLW9ic2VydmFjb2VzXFxwcm9ncmFtYWNhby1uYXZpby1vYnNlcnZhY29lcy5jb21wb25lbnQuc2NzcyIsInNyYy9hcHAvcGFnZXMvb3BlcmFjYW8vcHJvZ3JhbWFjYW8tbmF2aW8vcHJvZ3JhbWFjYW8tbmF2aW8tb2JzZXJ2YWNvZXMvcHJvZ3JhbWFjYW8tbmF2aW8tb2JzZXJ2YWNvZXMuY29tcG9uZW50LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxZQUFBO0FDQ0Y7O0FERUE7RUFDRSxZQUFBO0FDQ0Y7O0FERUE7RUFDRSx5QkFBQTtBQ0NGOztBREVBO0VBQ0Usa0JBQUE7QUNDRiIsImZpbGUiOiJzcmMvYXBwL3BhZ2VzL29wZXJhY2FvL3Byb2dyYW1hY2FvLW5hdmlvL3Byb2dyYW1hY2FvLW5hdmlvLW9ic2VydmFjb2VzL3Byb2dyYW1hY2FvLW5hdmlvLW9ic2VydmFjb2VzLmNvbXBvbmVudC5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLm9wYWNpdHkge1xyXG4gIG9wYWNpdHk6IDAuNztcclxufVxyXG5cclxuaS5fd2hpdGUge1xyXG4gIGNvbG9yOiB3aGl0ZTtcclxufVxyXG5cclxudGFibGUgdHIuYWN0aXZlIHtcclxuICBiYWNrZ3JvdW5kLWNvbG9yOiAjZjVmNWY1O1xyXG59XHJcblxyXG5kaXYuY29udGFpbmVyLWJ1dHRvbnMge1xyXG4gIG1hcmdpbi1ib3R0b206IDVweDtcclxufVxyXG4iLCIub3BhY2l0eSB7XG4gIG9wYWNpdHk6IDAuNztcbn1cblxuaS5fd2hpdGUge1xuICBjb2xvcjogd2hpdGU7XG59XG5cbnRhYmxlIHRyLmFjdGl2ZSB7XG4gIGJhY2tncm91bmQtY29sb3I6ICNmNWY1ZjU7XG59XG5cbmRpdi5jb250YWluZXItYnV0dG9ucyB7XG4gIG1hcmdpbi1ib3R0b206IDVweDtcbn0iXX0= */");

/***/ }),

/***/ "./src/app/pages/operacao/programacao-navio/programacao-navio-observacoes/programacao-navio-observacoes.component.ts":
/*!***************************************************************************************************************************!*\
  !*** ./src/app/pages/operacao/programacao-navio/programacao-navio-observacoes/programacao-navio-observacoes.component.ts ***!
  \***************************************************************************************************************************/
/*! exports provided: ProgramacaoNavioObservacoesComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoNavioObservacoesComponent", function() { return ProgramacaoNavioObservacoesComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _programacao_navio_model__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../programacao-navio.model */ "./src/app/pages/operacao/programacao-navio/programacao-navio.model.ts");
/* harmony import */ var _programacao_navio_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../programacao-navio.service */ "./src/app/pages/operacao/programacao-navio/programacao-navio.service.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 __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 ProgramacaoNavioObservacoesComponent = /** @class */ (function () {
    function ProgramacaoNavioObservacoesComponent(message, service) {
        this.message = message;
        this.service = service;
        this.response = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
    }
    ProgramacaoNavioObservacoesComponent.prototype.ngOnInit = function () {
        this.showTable = false;
    };
    ProgramacaoNavioObservacoesComponent.prototype.onSubmit = function (form) {
        if (!form.invalid) {
            /**/
        }
    };
    ProgramacaoNavioObservacoesComponent.ctorParameters = function () { return [
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_1__["MessageService"] },
        { type: _programacao_navio_service__WEBPACK_IMPORTED_MODULE_3__["ProgramacaoNavioService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", Boolean)
    ], ProgramacaoNavioObservacoesComponent.prototype, "isDetail", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", _programacao_navio_model__WEBPACK_IMPORTED_MODULE_2__["ObservacoesModel"])
    ], ProgramacaoNavioObservacoesComponent.prototype, "item", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], ProgramacaoNavioObservacoesComponent.prototype, "response", void 0);
    ProgramacaoNavioObservacoesComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: 'app-programacao-navio-observacoes',
            template: __importDefault(__webpack_require__(/*! raw-loader!./programacao-navio-observacoes.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-observacoes/programacao-navio-observacoes.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
            styles: [__importDefault(__webpack_require__(/*! ./programacao-navio-observacoes.component.scss */ "./src/app/pages/operacao/programacao-navio/programacao-navio-observacoes/programacao-navio-observacoes.component.scss")).default]
        }),
        __metadata("design:paramtypes", [_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_1__["MessageService"],
            _programacao_navio_service__WEBPACK_IMPORTED_MODULE_3__["ProgramacaoNavioService"]])
    ], ProgramacaoNavioObservacoesComponent);
    return ProgramacaoNavioObservacoesComponent;
}());



/***/ }),

/***/ "./src/app/pages/operacao/programacao-navio/programacao-navio-outras-operacoes/programacao-navio-outras-operacoes-dados/programacao-navio-outras-operacoes-dados.component.ts":
/*!************************************************************************************************************************************************************************************!*\
  !*** ./src/app/pages/operacao/programacao-navio/programacao-navio-outras-operacoes/programacao-navio-outras-operacoes-dados/programacao-navio-outras-operacoes-dados.component.ts ***!
  \************************************************************************************************************************************************************************************/
/*! exports provided: ProgramacaoNavioOutrasOperacoesDadosComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoNavioOutrasOperacoesDadosComponent", function() { return ProgramacaoNavioOutrasOperacoesDadosComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_1__ = __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_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../shared/services/funcoes/array-utils/array-utils.static.service */ "./src/app/shared/services/funcoes/array-utils/array-utils.static.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_services_funcoes_object_utils_object_utils_static_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../shared/services/funcoes/object-utils/object-utils.static.service */ "./src/app/shared/services/funcoes/object-utils/object-utils.static.service.ts");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _programacao_navio_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../programacao-navio.service */ "./src/app/pages/operacao/programacao-navio/programacao-navio.service.ts");
/* harmony import */ var _programacao_navio_validation__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../programacao-navio.validation */ "./src/app/pages/operacao/programacao-navio/programacao-navio.validation.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 __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 ProgramacaoNavioOutrasOperacoesDadosComponent = /** @class */ (function () {
    function ProgramacaoNavioOutrasOperacoesDadosComponent(service, funcoes, message) {
        var _this = this;
        this.service = service;
        this.funcoes = funcoes;
        this.message = message;
        this.execute = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.validation = new _programacao_navio_validation__WEBPACK_IMPORTED_MODULE_7__["ProgramacaoNavioValidation"](false, service, message, funcoes);
        this.sub = _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_1__["EventEmitterService"].get('emitProgramacaoNavioOutrasOperacoesDados').subscribe(function (item) {
            _this.messages = [];
            _this.item = _shared_services_funcoes_object_utils_object_utils_static_service__WEBPACK_IMPORTED_MODULE_4__["ObjectUtilsStaticService"].clone(item);
            jQuery("#app-programacao-navio-outras-operacoes-dados").modal("show");
        });
    }
    ProgramacaoNavioOutrasOperacoesDadosComponent.prototype.ngOnDestroy = function () {
        this.sub.unsubscribe();
    };
    ProgramacaoNavioOutrasOperacoesDadosComponent.prototype.ngOnInit = function () {
    };
    ProgramacaoNavioOutrasOperacoesDadosComponent.prototype.onSubmit = function (form) {
        _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_1__["EventEmitterService"].get("formOutrasDados").emit(form);
        if (form.invalid)
            return;
        if (this.hasError())
            return;
        jQuery("#app-programacao-navio-outras-operacoes-dados").modal("hide");
        this.execute.emit(this.item);
    };
    ProgramacaoNavioOutrasOperacoesDadosComponent.prototype.hasError = function () {
        var messages = [];
        messages.push(this.validation.validaTipoOperCargaPermitido(this.item, false));
        if (_shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_2__["ArrayUtilsStaticService"].any(this.messages)) {
            this.messages = messages.filter(function (c) { return !c.isValid; }).map(function (c) { return c.message; });
            return _shared_services_funcoes_array_utils_array_utils_static_service__WEBPACK_IMPORTED_MODULE_2__["ArrayUtilsStaticService"].any(this.messages);
        }
        else
            false;
    };
    ProgramacaoNavioOutrasOperacoesDadosComponent.ctorParameters = function () { return [
        { type: _programacao_navio_service__WEBPACK_IMPORTED_MODULE_6__["ProgramacaoNavioService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__["MessageService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], ProgramacaoNavioOutrasOperacoesDadosComponent.prototype, "execute", void 0);
    ProgramacaoNavioOutrasOperacoesDadosComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: 'app-programacao-navio-outras-operacoes-dados',
            template: __importDefault(__webpack_require__(/*! raw-loader!./programacao-navio-outras-operacoes-dados.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-outras-operacoes/programacao-navio-outras-operacoes-dados/programacao-navio-outras-operacoes-dados.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_programacao_navio_service__WEBPACK_IMPORTED_MODULE_6__["ProgramacaoNavioService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_5__["MessageService"]])
    ], ProgramacaoNavioOutrasOperacoesDadosComponent);
    return ProgramacaoNavioOutrasOperacoesDadosComponent;
}());



/***/ }),

/***/ "./src/app/pages/operacao/programacao-navio/programacao-navio-outras-operacoes/programacao-navio-outras-operacoes.component.scss":
/*!***************************************************************************************************************************************!*\
  !*** ./src/app/pages/operacao/programacao-navio/programacao-navio-outras-operacoes/programacao-navio-outras-operacoes.component.scss ***!
  \***************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = (".opacity {\n  opacity: 0.7;\n}\n\ni._white {\n  color: white;\n}\n\ntable tr.active {\n  background-color: #f5f5f5;\n}\n\ndiv.container-buttons {\n  margin-bottom: 5px;\n}\n\ndiv.form-check-inline {\n  position: relative;\n}\n\ndiv.form-check-inline div.mask {\n  z-index: 9;\n  position: absolute;\n  height: 45px;\n  width: 100%;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNyYy9hcHAvcGFnZXMvb3BlcmFjYW8vcHJvZ3JhbWFjYW8tbmF2aW8vcHJvZ3JhbWFjYW8tbmF2aW8tb3V0cmFzLW9wZXJhY29lcy9DOlxcQ29ycG9yYXRlXFxDb3Jwb3JhdGVXZWJEZXNlbnZcXF91bmlzb2x1dGlvbi9zcmNcXGFwcFxccGFnZXNcXG9wZXJhY2FvXFxwcm9ncmFtYWNhby1uYXZpb1xccHJvZ3JhbWFjYW8tbmF2aW8tb3V0cmFzLW9wZXJhY29lc1xccHJvZ3JhbWFjYW8tbmF2aW8tb3V0cmFzLW9wZXJhY29lcy5jb21wb25lbnQuc2NzcyIsInNyYy9hcHAvcGFnZXMvb3BlcmFjYW8vcHJvZ3JhbWFjYW8tbmF2aW8vcHJvZ3JhbWFjYW8tbmF2aW8tb3V0cmFzLW9wZXJhY29lcy9wcm9ncmFtYWNhby1uYXZpby1vdXRyYXMtb3BlcmFjb2VzLmNvbXBvbmVudC5zY3NzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0VBQ0UsWUFBQTtBQ0NGOztBREVBO0VBQ0UsWUFBQTtBQ0NGOztBREVBO0VBQ0UseUJBQUE7QUNDRjs7QURFQTtFQUNFLGtCQUFBO0FDQ0Y7O0FERUE7RUFDRSxrQkFBQTtBQ0NGOztBREVBO0VBQ0UsVUFBQTtFQUNBLGtCQUFBO0VBQ0EsWUFBQTtFQUNBLFdBQUE7QUNDRiIsImZpbGUiOiJzcmMvYXBwL3BhZ2VzL29wZXJhY2FvL3Byb2dyYW1hY2FvLW5hdmlvL3Byb2dyYW1hY2FvLW5hdmlvLW91dHJhcy1vcGVyYWNvZXMvcHJvZ3JhbWFjYW8tbmF2aW8tb3V0cmFzLW9wZXJhY29lcy5jb21wb25lbnQuc2NzcyIsInNvdXJjZXNDb250ZW50IjpbIi5vcGFjaXR5IHtcclxuICBvcGFjaXR5OiAwLjc7XHJcbn1cclxuXHJcbmkuX3doaXRlIHtcclxuICBjb2xvcjogd2hpdGU7XHJcbn1cclxuXHJcbnRhYmxlIHRyLmFjdGl2ZSB7XHJcbiAgYmFja2dyb3VuZC1jb2xvcjogI2Y1ZjVmNTtcclxufVxyXG5cclxuZGl2LmNvbnRhaW5lci1idXR0b25zIHtcclxuICBtYXJnaW4tYm90dG9tOiA1cHg7XHJcbn1cclxuXHJcbmRpdi5mb3JtLWNoZWNrLWlubGluZSB7XHJcbiAgcG9zaXRpb246IHJlbGF0aXZlO1xyXG59XHJcblxyXG5kaXYuZm9ybS1jaGVjay1pbmxpbmUgZGl2Lm1hc2sge1xyXG4gIHotaW5kZXg6IDk7XHJcbiAgcG9zaXRpb246IGFic29sdXRlO1xyXG4gIGhlaWdodDogNDVweDtcclxuICB3aWR0aDogMTAwJTtcclxufVxyXG4iLCIub3BhY2l0eSB7XG4gIG9wYWNpdHk6IDAuNztcbn1cblxuaS5fd2hpdGUge1xuICBjb2xvcjogd2hpdGU7XG59XG5cbnRhYmxlIHRyLmFjdGl2ZSB7XG4gIGJhY2tncm91bmQtY29sb3I6ICNmNWY1ZjU7XG59XG5cbmRpdi5jb250YWluZXItYnV0dG9ucyB7XG4gIG1hcmdpbi1ib3R0b206IDVweDtcbn1cblxuZGl2LmZvcm0tY2hlY2staW5saW5lIHtcbiAgcG9zaXRpb246IHJlbGF0aXZlO1xufVxuXG5kaXYuZm9ybS1jaGVjay1pbmxpbmUgZGl2Lm1hc2sge1xuICB6LWluZGV4OiA5O1xuICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gIGhlaWdodDogNDVweDtcbiAgd2lkdGg6IDEwMCU7XG59Il19 */");

/***/ }),

/***/ "./src/app/pages/operacao/programacao-navio/programacao-navio-outras-operacoes/programacao-navio-outras-operacoes.component.ts":
/*!*************************************************************************************************************************************!*\
  !*** ./src/app/pages/operacao/programacao-navio/programacao-navio-outras-operacoes/programacao-navio-outras-operacoes.component.ts ***!
  \*************************************************************************************************************************************/
/*! exports provided: ProgramacaoNavioOutrasOperacoesComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoNavioOutrasOperacoesComponent", function() { return ProgramacaoNavioOutrasOperacoesComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_1__ = __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_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../shared/services/funcoes/boolean-utils/boolean-utils.static.service */ "./src/app/shared/services/funcoes/boolean-utils/boolean-utils.static.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_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../shared/services/funcoes/number-utils/number-utils.static.service */ "./src/app/shared/services/funcoes/number-utils/number-utils.static.service.ts");
/* harmony import */ var _shared_services_funcoes_object_utils_object_utils_static_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../shared/services/funcoes/object-utils/object-utils.static.service */ "./src/app/shared/services/funcoes/object-utils/object-utils.static.service.ts");
/* harmony import */ var _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../cadastro/destinatario/destinatario.model */ "./src/app/pages/cadastro/destinatario/destinatario.model.ts");
/* harmony import */ var _cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../cadastro/destinatario/destinatario.service */ "./src/app/pages/cadastro/destinatario/destinatario.service.ts");
/* harmony import */ var _cadastro_material_material_model__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../cadastro/material/material.model */ "./src/app/pages/cadastro/material/material.model.ts");
/* harmony import */ var _cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../cadastro/material/material.service */ "./src/app/pages/cadastro/material/material.service.ts");
/* harmony import */ var _cadastro_tipo_operacao_tipo_operacao_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../cadastro/tipo-operacao/tipo-operacao.service */ "./src/app/pages/cadastro/tipo-operacao/tipo-operacao.service.ts");
/* harmony import */ var _login_login_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var _programacao_navio_constants__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../programacao-navio.constants */ "./src/app/pages/operacao/programacao-navio/programacao-navio.constants.ts");
/* harmony import */ var _programacao_navio_model__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../programacao-navio.model */ "./src/app/pages/operacao/programacao-navio/programacao-navio.model.ts");
/* harmony import */ var _programacao_navio_service__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../programacao-navio.service */ "./src/app/pages/operacao/programacao-navio/programacao-navio.service.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 __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 ProgramacaoNavioOutrasOperacoesComponent = /** @class */ (function () {
    function ProgramacaoNavioOutrasOperacoesComponent(loginService, serviceDestinatario, permissoesUtils, serviceMaterial, service, funcoesService, serviceTipoOperacao, message) {
        var _this = this;
        this.loginService = loginService;
        this.serviceDestinatario = serviceDestinatario;
        this.permissoesUtils = permissoesUtils;
        this.serviceMaterial = serviceMaterial;
        this.service = service;
        this.funcoesService = funcoesService;
        this.serviceTipoOperacao = serviceTipoOperacao;
        this.message = message;
        this.response = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
        this.detail = false;
        this.constantes = new _programacao_navio_constants__WEBPACK_IMPORTED_MODULE_14__["ProgramacaoNavioConstants"]();
        this.mensagens = [];
        this.outDadosOutrasOperacoes = function (outraOperacao) {
            _this.service.alteraDadosOutrasOperacoes(outraOperacao).subscribe(function (result) {
                if (!result.isValid) {
                    _this.mensagens = _this.message.validationResult(result);
                    _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_1__["EventEmitterService"].get("backError").emit(_this.mensagens);
                }
                else {
                    _this.message.saveSuccess("titles.programacaoNavio");
                    _this.outraOperacao = _shared_services_funcoes_object_utils_object_utils_static_service__WEBPACK_IMPORTED_MODULE_5__["ObjectUtilsStaticService"].clone(outraOperacao);
                }
            });
        };
    }
    ProgramacaoNavioOutrasOperacoesComponent.prototype.ngOnInit = function () {
        return __awaiter(this, void 0, void 0, function () {
            return __generator(this, function (_a) {
                this.showTable = true;
                this.material = new _cadastro_material_material_model__WEBPACK_IMPORTED_MODULE_10__["Material"]();
                this.cliente = new _cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_8__["Destinatario"]();
                this.getUnits();
                this.getOperationTypes();
                return [2 /*return*/];
            });
        });
    };
    ProgramacaoNavioOutrasOperacoesComponent.prototype.back = function () {
        this.response.emit(true);
        this.showTable = true;
        this.cliente = new _cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_8__["Destinatario"]();
        this.material = new _cadastro_material_material_model__WEBPACK_IMPORTED_MODULE_10__["Material"]();
        this.outraOperacao = new _programacao_navio_model__WEBPACK_IMPORTED_MODULE_15__["OutrasOperacoesModel"]();
    };
    ProgramacaoNavioOutrasOperacoesComponent.prototype.new = function () {
        if (this.isDetail) {
            return false;
        }
        this.detail = false;
        this.showTable = false;
        this.outraOperacao = new _programacao_navio_model__WEBPACK_IMPORTED_MODULE_15__["OutrasOperacoesModel"]();
        this.cliente = new _cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_8__["Destinatario"]();
        this.material = new _cadastro_material_material_model__WEBPACK_IMPORTED_MODULE_10__["Material"]();
        this.response.emit(false);
    };
    ProgramacaoNavioOutrasOperacoesComponent.prototype.selected = function (val, index) {
        this._index = index;
        this.outraOperacao = val;
    };
    ProgramacaoNavioOutrasOperacoesComponent.prototype.edit = function () {
        if (!this.outraOperacao.item || this.isDetail) {
            return;
        }
        this.detail = false;
        this.showTable = false;
        this.response.emit(false);
    };
    ProgramacaoNavioOutrasOperacoesComponent.prototype.show = function () {
        if (!this.outraOperacao.item) {
            return;
        }
        this.detail = true;
        this.showTable = false;
        this.response.emit(false);
    };
    ProgramacaoNavioOutrasOperacoesComponent.prototype.delete = function (item) {
        var _this = this;
        if (this.detail || !this.showTable) {
            return;
        }
        this.message.removeConfirm(function () {
            var count = 0;
            _this.service.programacaoNavio.outrasOperacoes.forEach(function (val) {
                if (item.programacaoNavioId === val.programacaoNavioId && item.item && item.item === val.item) {
                    val.sitReg = 'E';
                }
                else if (!item.programacaoNavioId && item.sequencia === val.sequencia) {
                    _this.service.programacaoNavio.outrasOperacoes.splice(count, 1);
                }
                count++;
            });
            _this.outraOperacao = new _programacao_navio_model__WEBPACK_IMPORTED_MODULE_15__["OutrasOperacoesModel"]();
        });
    };
    ProgramacaoNavioOutrasOperacoesComponent.prototype.onSubmit = function (form) {
        var _this = this;
        _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_1__["EventEmitterService"].get("formError").emit(form);
        if (form.invalid) {
            var counter = 0;
            for (var i = 0; i < form._directives.length; i++) {
                if (form._directives[i].name === "tipoMov") {
                    counter = counter + 1;
                    if (counter > 1) {
                        form._directives.splice(i, 1);
                        i = i - 1;
                    }
                }
            }
            _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_1__["EventEmitterService"].get("formError").emit(form);
            return;
        }
        if (this.outraOperacao.tipoOperacao === 0) {
            this.outraOperacao.tipoOperacao = null;
        }
        this.outraOperacao.tipoNavegacao = +this.service.config.tipoNavegacao;
        if (this.service.config.propriedadecarga === this.outraOperacao.destinatarioIdCliente) {
            this.outraOperacao.propriedadeCarga = 1;
        }
        else {
            this.outraOperacao.propriedadeCarga = 2;
        }
        if (!this.outraOperacao.programacaoNavioId) {
            this.outraOperacao.tipoNavegacao = +this.service.config.tipoNavegacao;
            if (this.service.config.propriedadecarga.trim() === this.outraOperacao.destinatarioIdCliente) {
                this.outraOperacao.propriedadeCarga = 1;
            }
            else {
                this.outraOperacao.propriedadeCarga = 2;
            }
        }
        // if (!!this._index && this._index >= 0) {
        //     this.service.programacaoNavio.outrasOperacoes[this._index] = this.outraOperacao;
        // } else {
        //     this.outraOperacao.notMapped = true;
        //     this.service.programacaoNavio.outrasOperacoes.push(this.outraOperacao);
        // }
        var idxItem = this.service.programacaoNavio.outrasOperacoes.findIndex(function (c) { return c.item == _this.outraOperacao.item; });
        if (idxItem >= 0) {
            this.service.programacaoNavio.outrasOperacoes[idxItem] = this.outraOperacao;
        }
        else {
            this.outraOperacao.notMapped = true;
            this.outraOperacao.item = this.service.programacaoNavio.outrasOperacoes.length + 1;
            this.service.programacaoNavio.outrasOperacoes.push(this.outraOperacao);
        }
        var actionForm;
        if (this.service.programacaoNavio.programacaoNavioId) {
            actionForm = 3;
        }
        else {
            actionForm = 1;
        }
        this.showTable = true;
        this.response.emit(true);
    };
    /*******************************************/
    ProgramacaoNavioOutrasOperacoesComponent.prototype.outputMaterial = function (material) {
        this.outraOperacao.material = material;
    };
    ProgramacaoNavioOutrasOperacoesComponent.prototype.outputCliente = function (destinatario) {
        this.outraOperacao.cliente = destinatario;
    };
    ProgramacaoNavioOutrasOperacoesComponent.prototype.getUnits = function () {
        this.units = [];
        var current = { value: "KG", name: "KG" };
        this.units.push(current);
        current = { value: "LT", name: "LT" };
        this.units.push(current);
        current = { value: "M3", name: "M3" };
        this.units.push(current);
        current = { value: "UN", name: "UN" };
        this.units.push(current);
    };
    ProgramacaoNavioOutrasOperacoesComponent.prototype.getOperationTypes = function () {
        var _this = this;
        this.operationTypes = [];
        this.serviceTipoOperacao.get().subscribe(function (resp) {
            _this.operationTypes = resp;
        });
    };
    Object.defineProperty(ProgramacaoNavioOutrasOperacoesComponent.prototype, "disabledTipoMov", {
        get: function () {
            var _this = this;
            if (this.detail)
                return true;
            var tipoOperacao = this.operationTypes.find(function (c) { return c.tipoOperacaoId.toString() === _this.outraOperacao.tipoOperacao.toString(); });
            if (!tipoOperacao)
                return false;
            return tipoOperacao.tipoMov !== "A";
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ProgramacaoNavioOutrasOperacoesComponent.prototype, "obrigaTipoMov", {
        get: function () {
            var _this = this;
            var tipoOperacao = this.operationTypes.find(function (c) { return c.tipoOperacaoId.toString() === _this.outraOperacao.tipoOperacao.toString(); });
            return tipoOperacao && tipoOperacao.tipoMov === "A";
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(ProgramacaoNavioOutrasOperacoesComponent.prototype, "tiposOperacao", {
        get: function () {
            var _this = this;
            var operationTypes = this.operationTypes;
            if (!!this.outraOperacao.tipoOperacao)
                operationTypes = this.operationTypes.filter(function (c) { return _shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_2__["BooleanUtilsStaticService"].toBoolean(c.flagAtivo) || c.tipoOperacaoId === _this.outraOperacao.tipoOperacao; });
            if (!this.outraOperacao.item)
                operationTypes = this.operationTypes.filter(function (c) { return _shared_services_funcoes_boolean_utils_boolean_utils_static_service__WEBPACK_IMPORTED_MODULE_2__["BooleanUtilsStaticService"].toBoolean(c.flagAtivo); });
            return operationTypes;
        },
        enumerable: true,
        configurable: true
    });
    ProgramacaoNavioOutrasOperacoesComponent.prototype.changeOperationType = function () {
        var _this = this;
        if (!this.outraOperacao.tipoOperacao) {
            this.outraOperacao.tipoMov = "";
            return;
        }
        this.serviceTipoOperacao.getById(this.outraOperacao.tipoOperacao).subscribe(function (resp) {
            var response = resp;
            if (response.tipoMov === "A") {
                _this.outraOperacao.tipoMov = "";
            }
            else {
                _this.outraOperacao.tipoMov = response.tipoMov;
            }
        });
    };
    ProgramacaoNavioOutrasOperacoesComponent.prototype.getDestinatario = function (id) {
        var _this = this;
        var promise = new Promise(function (resolve, reject) {
            _this.serviceDestinatario.getById(id).subscribe(function (resp) {
                resolve(resp);
            });
        });
        return promise;
    };
    ProgramacaoNavioOutrasOperacoesComponent.prototype.getProducto = function (id) {
        var _this = this;
        var promise = new Promise(function (resolve, reject) {
            _this.serviceMaterial.getById(id).subscribe(function (resp) {
                resolve(resp);
            });
        });
        return promise;
    };
    ProgramacaoNavioOutrasOperacoesComponent.prototype.trataTipoOperCarga = function () {
        if (_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_4__["NumberUtilsStaticService"].toNumber(this.outraOperacao.tipoOperCarga) === 1 ||
            (_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_4__["NumberUtilsStaticService"].toNumber(this.service.programacaoNavio.tipoOperacao) === 1 && [13, 20].includes(_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_4__["NumberUtilsStaticService"].toNumber(this.outraOperacao.tipoOperCarga)))) {
            this.message.warning("titles.programacaoNavio", "messages.tipoOperacaoCargaInvalido");
            this.outraOperacao.tipoOperCarga = "";
            return;
        }
    };
    ProgramacaoNavioOutrasOperacoesComponent.prototype.dadosOutrasOperacoes = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 2, function () { return _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_1__["EventEmitterService"].get('emitProgramacaoNavioOutrasOperacoesDados').emit(_this.outraOperacao); }, function () { return _this.permissoesUtils.back(); }, true);
    };
    ;
    ProgramacaoNavioOutrasOperacoesComponent.ctorParameters = function () { return [
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_13__["LoginService"] },
        { type: _cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_9__["DestinatarioService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__["PermissoesUtilsService"] },
        { type: _cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_11__["MaterialService"] },
        { type: _programacao_navio_service__WEBPACK_IMPORTED_MODULE_16__["ProgramacaoNavioService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"] },
        { type: _cadastro_tipo_operacao_tipo_operacao_service__WEBPACK_IMPORTED_MODULE_12__["TipoOperacaoService"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__["MessageService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", Boolean)
    ], ProgramacaoNavioOutrasOperacoesComponent.prototype, "isDetail", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], ProgramacaoNavioOutrasOperacoesComponent.prototype, "response", void 0);
    ProgramacaoNavioOutrasOperacoesComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: 'app-programacao-navio-outras-operacoes',
            template: __importDefault(__webpack_require__(/*! raw-loader!./programacao-navio-outras-operacoes.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-outras-operacoes/programacao-navio-outras-operacoes.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None,
            styles: [__importDefault(__webpack_require__(/*! ./programacao-navio-outras-operacoes.component.scss */ "./src/app/pages/operacao/programacao-navio/programacao-navio-outras-operacoes/programacao-navio-outras-operacoes.component.scss")).default]
        }),
        __metadata("design:paramtypes", [_login_login_service__WEBPACK_IMPORTED_MODULE_13__["LoginService"],
            _cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_9__["DestinatarioService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__["PermissoesUtilsService"],
            _cadastro_material_material_service__WEBPACK_IMPORTED_MODULE_11__["MaterialService"],
            _programacao_navio_service__WEBPACK_IMPORTED_MODULE_16__["ProgramacaoNavioService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"],
            _cadastro_tipo_operacao_tipo_operacao_service__WEBPACK_IMPORTED_MODULE_12__["TipoOperacaoService"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_7__["MessageService"]])
    ], ProgramacaoNavioOutrasOperacoesComponent);
    return ProgramacaoNavioOutrasOperacoesComponent;
}());



/***/ }),

/***/ "./src/app/pages/operacao/programacao-navio/programacao-navio-status/programacao-navio-status.component.ts":
/*!*****************************************************************************************************************!*\
  !*** ./src/app/pages/operacao/programacao-navio/programacao-navio-status/programacao-navio-status.component.ts ***!
  \*****************************************************************************************************************/
/*! exports provided: ProgramacaoNavioStatusComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoNavioStatusComponent", function() { return ProgramacaoNavioStatusComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! moment */ "./node_modules/moment/moment.js");
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _programacao_navio_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../programacao-navio.service */ "./src/app/pages/operacao/programacao-navio/programacao-navio.service.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 __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 ProgramacaoNavioStatusComponent = /** @class */ (function () {
    function ProgramacaoNavioStatusComponent(service) {
        this.service = service;
    }
    ProgramacaoNavioStatusComponent.prototype.ngOnInit = function () {
        this.showTable = true;
        this.service.programacaoNavio.status.forEach(function (item) {
            item.dtStatus = moment__WEBPACK_IMPORTED_MODULE_1__(item.dtStatus).format('DD/MM/YYYY HH:mm');
        });
    };
    ProgramacaoNavioStatusComponent.ctorParameters = function () { return [
        { type: _programacao_navio_service__WEBPACK_IMPORTED_MODULE_2__["ProgramacaoNavioService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", Boolean)
    ], ProgramacaoNavioStatusComponent.prototype, "isDetail", void 0);
    ProgramacaoNavioStatusComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: 'app-programacao-navio-status',
            template: __importDefault(__webpack_require__(/*! raw-loader!./programacao-navio-status.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/operacao/programacao-navio/programacao-navio-status/programacao-navio-status.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_programacao_navio_service__WEBPACK_IMPORTED_MODULE_2__["ProgramacaoNavioService"]])
    ], ProgramacaoNavioStatusComponent);
    return ProgramacaoNavioStatusComponent;
}());



/***/ }),

/***/ "./src/app/pages/operacao/programacao-navio/programacao-navio.constants.ts":
/*!*********************************************************************************!*\
  !*** ./src/app/pages/operacao/programacao-navio/programacao-navio.constants.ts ***!
  \*********************************************************************************/
/*! exports provided: ProgramacaoNavioConstants, ModProgramacaoNavioReport */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoNavioConstants", function() { return ProgramacaoNavioConstants; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ModProgramacaoNavioReport", function() { return ModProgramacaoNavioReport; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var ProgramacaoNavioConstants = /** @class */ (function () {
    function ProgramacaoNavioConstants() {
        this.sisFormularioId = 250003;
        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.confirmaChegada", },
            { sisFormularioId: this.sisFormularioId, libRotina: 8, acao: "labels.liberacaoPeloFiscal", },
            { sisFormularioId: this.sisFormularioId, libRotina: 9, acao: "labels.liberacaoOperacao", },
            { sisFormularioId: this.sisFormularioId, libRotina: 10, acao: "labels.alteraPortos", },
            { sisFormularioId: this.sisFormularioId, libRotina: 11, acao: "labels.alteraDados", },
            { sisFormularioId: this.sisFormularioId, libRotina: 12, acao: "labels.alteraUnidade", },
            { sisFormularioId: this.sisFormularioId, libRotina: 13, acao: "labels.alteraREExcedente", },
            { sisFormularioId: this.sisFormularioId, libRotina: 14, acao: "labels.excluiItemCPEmbarque", },
            { sisFormularioId: this.sisFormularioId, libRotina: 15, acao: "labels.permissoes", },
        ];
        this.sisSistemaId = "CAD";
        this.nomeForm = "titles.programacaoNavio";
        this.reportId = "CAD0249";
        this.reportIdCapaProcessoExportacao = "OPE0006";
        this.reportTitulo = { titulo: "Programação de Navios", subTitulo: "" };
        this.tabela = "Materiais";
        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", disabled: false },
            { title: "Pesquisar", action: "filtrar", icon: "icon-search", exibeButton: true, eximeMenu: true, menuName: "Movimento", },
            { 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", },
            { title: "ConfirmacaoChegada", action: "confirm", icon: "fa fa-check", exibeButton: true, eximeMenu: true, menuName: "Arquivo", disabled: true, },
            { title: "LiberacaoPeloFiscal", action: "releaseProsecutor", icon: "fa fa-key", exibeButton: true, eximeMenu: true, menuName: "Arquivo", disabled: true, },
            { title: "LiberacaoOperacao", action: "releaseOperation", icon: "fa fa-unlock", exibeButton: true, eximeMenu: true, menuName: "Arquivo", disabled: true, },
            { title: "DadosAntaq", action: "dadosAntaq", icon: "fa fa-align-left", exibeButton: true, eximeMenu: true, menuName: "Movimento", },
            { title: "AlterarDados", action: "alteraDados", icon: "fa fa-align-center", exibeButton: true, eximeMenu: true, menuName: "Movimento", },
            { title: "painelIntegracaoDue", action: "painelIntegracaoDue", icon: "fa fa-paper-plane", 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", },
        ];
        this.configs = [
            {
                sistema: "OPE",
                parametros: [
                    "OperacaoAppa",
                    "CamposObrigatorios",
                    "ValDtChegada",
                    "ProgDataAnt",
                    "ObrDtAtrSaida",
                    "Degradacao",
                    "OutrasOperProg",
                    "TipoNavegacao",
                    "Propriedadecarga",
                    "DadosAntaq",
                    "SolPedEmbarque",
                    "CWModProgramacaoNav",
                    "REExcedente",
                    "ObrigaOSg",
                    "WebSolProgramNavio",
                    "ObrigaNavioEmbar"
                ],
            },
            {
                sistema: "WEB",
                parametros: [
                    "CorpWebModCRD",
                    "TradingPedEmb"
                ]
            }
        ];
    }
    return ProgramacaoNavioConstants;
}());

var ModProgramacaoNavioReport = /** @class */ (function () {
    function ModProgramacaoNavioReport() {
    }
    ModProgramacaoNavioReport.get = function (reportId) {
        if (reportId === void 0) { reportId = ""; }
        var lista = [
            { reportId: "REL0142", url: "programacaoNavio1" },
            { reportId: "REL0143", url: "programacaoNavio2" },
            { reportId: "REL0145", url: "programacaoNavio3" },
            { reportId: "REL0132", url: "programacaoNavio4" },
            { reportId: "REL0148", url: "programacaoNavio5" }
        ];
        var report = lista.find(function (x) { return x.reportId === reportId; });
        return !!report ? report.url : lista[0].url;
    };
    return ModProgramacaoNavioReport;
}());



/***/ }),

/***/ "./src/app/pages/operacao/programacao-navio/programacao-navio.module.routing.ts":
/*!**************************************************************************************!*\
  !*** ./src/app/pages/operacao/programacao-navio/programacao-navio.module.routing.ts ***!
  \**************************************************************************************/
/*! exports provided: ProgramacaoNavioModuleRouting */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoNavioModuleRouting", function() { return ProgramacaoNavioModuleRouting; });
/* 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 _programacao_navio_form_programacao_navio_form_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./programacao-navio-form/programacao-navio-form.component */ "./src/app/pages/operacao/programacao-navio/programacao-navio-form/programacao-navio-form.component.ts");
/* harmony import */ var _programacao_navio_index_programacao_navio_index_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./programacao-navio-index/programacao-navio-index.component */ "./src/app/pages/operacao/programacao-navio/programacao-navio-index/programacao-navio-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 MRoutes = [
    {
        path: "",
        component: _programacao_navio_index_programacao_navio_index_component__WEBPACK_IMPORTED_MODULE_4__["ProgramacaoNavioIndexComponent"],
        data: { breadcrumb: "programacaoNavio", formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].index } }
    },
    {
        path: "create",
        component: _programacao_navio_form_programacao_navio_form_component__WEBPACK_IMPORTED_MODULE_3__["ProgramacaoNavioFormComponent"],
        data: { breadcrumb: "programacaoNavio", formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].create } }
    },
    {
        path: "edit/:id",
        component: _programacao_navio_form_programacao_navio_form_component__WEBPACK_IMPORTED_MODULE_3__["ProgramacaoNavioFormComponent"],
        data: {
            breadcrumb: "programacaoNavio",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].edit }
        }
    },
    {
        path: "detail/:id",
        component: _programacao_navio_form_programacao_navio_form_component__WEBPACK_IMPORTED_MODULE_3__["ProgramacaoNavioFormComponent"],
        data: {
            breadcrumb: "programacaoNavio",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].detail }
        }
    }
];
var ProgramacaoNavioModuleRouting = /** @class */ (function () {
    function ProgramacaoNavioModuleRouting() {
    }
    ProgramacaoNavioModuleRouting = __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"]]
        })
    ], ProgramacaoNavioModuleRouting);
    return ProgramacaoNavioModuleRouting;
}());



/***/ }),

/***/ "./src/app/pages/operacao/programacao-navio/programacao-navio.module.ts":
/*!******************************************************************************!*\
  !*** ./src/app/pages/operacao/programacao-navio/programacao-navio.module.ts ***!
  \******************************************************************************/
/*! exports provided: ProgramacaoNavioModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoNavioModule", function() { return ProgramacaoNavioModule; });
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _shared_shared_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../shared/shared.module */ "./src/app/shared/shared.module.ts");
/* harmony import */ var _programacao_navio_confirmacao_chegada_programacao_navio_confirmacao_chegada_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./programacao-navio-confirmacao-chegada/programacao-navio-confirmacao-chegada.component */ "./src/app/pages/operacao/programacao-navio/programacao-navio-confirmacao-chegada/programacao-navio-confirmacao-chegada.component.ts");
/* harmony import */ var _programacao_navio_dados_antaq_programacao_navio_dados_antaq_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./programacao-navio-dados-antaq/programacao-navio-dados-antaq.component */ "./src/app/pages/operacao/programacao-navio/programacao-navio-dados-antaq/programacao-navio-dados-antaq.component.ts");
/* harmony import */ var _programacao_navio_dados_programacao_navio_dados_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./programacao-navio-dados/programacao-navio-dados.component */ "./src/app/pages/operacao/programacao-navio/programacao-navio-dados/programacao-navio-dados.component.ts");
/* harmony import */ var _programacao_navio_export_programacao_navio_export_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./programacao-navio-export/programacao-navio-export.component */ "./src/app/pages/operacao/programacao-navio/programacao-navio-export/programacao-navio-export.component.ts");
/* harmony import */ var _programacao_navio_filter_programacao_navio_filter_component__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./programacao-navio-filter/programacao-navio-filter.component */ "./src/app/pages/operacao/programacao-navio/programacao-navio-filter/programacao-navio-filter.component.ts");
/* harmony import */ var _programacao_navio_form_programacao_navio_form_component__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./programacao-navio-form/programacao-navio-form.component */ "./src/app/pages/operacao/programacao-navio/programacao-navio-form/programacao-navio-form.component.ts");
/* harmony import */ var _programacao_navio_index_programacao_navio_index_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./programacao-navio-index/programacao-navio-index.component */ "./src/app/pages/operacao/programacao-navio/programacao-navio-index/programacao-navio-index.component.ts");
/* harmony import */ var _programacao_navio_item_bl_programacao_navio_item_bl_form_programacao_navio_item_bl_form_component__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./programacao-navio-item-bl/programacao-navio-item-bl-form/programacao-navio-item-bl-form.component */ "./src/app/pages/operacao/programacao-navio/programacao-navio-item-bl/programacao-navio-item-bl-form/programacao-navio-item-bl-form.component.ts");
/* harmony import */ var _programacao_navio_item_bl_programacao_navio_item_bl_index_programacao_navio_item_bl_index_component__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./programacao-navio-item-bl/programacao-navio-item-bl-index/programacao-navio-item-bl-index.component */ "./src/app/pages/operacao/programacao-navio/programacao-navio-item-bl/programacao-navio-item-bl-index/programacao-navio-item-bl-index.component.ts");
/* harmony import */ var _programacao_navio_item_programacao_navio_item_dados_portos_programacao_navio_item_dados_portos_component__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./programacao-navio-item/programacao-navio-item-dados-portos/programacao-navio-item-dados-portos.component */ "./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-dados-portos/programacao-navio-item-dados-portos.component.ts");
/* harmony import */ var _programacao_navio_item_programacao_navio_item_dados_reexcedente_programacao_navio_item_dados_reexcedente_component__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./programacao-navio-item/programacao-navio-item-dados-reexcedente/programacao-navio-item-dados-reexcedente.component */ "./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-dados-reexcedente/programacao-navio-item-dados-reexcedente.component.ts");
/* harmony import */ var _programacao_navio_item_programacao_navio_item_dados_unidade_programacao_navio_item_dados_unidade_component__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./programacao-navio-item/programacao-navio-item-dados-unidade/programacao-navio-item-dados-unidade.component */ "./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-dados-unidade/programacao-navio-item-dados-unidade.component.ts");
/* harmony import */ var _programacao_navio_item_programacao_navio_item_dados_programacao_navio_item_dados_component__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./programacao-navio-item/programacao-navio-item-dados/programacao-navio-item-dados.component */ "./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-dados/programacao-navio-item-dados.component.ts");
/* harmony import */ var _programacao_navio_item_programacao_navio_item_importadores_programacao_navio_item_importadores_component__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./programacao-navio-item/programacao-navio-item-importadores/programacao-navio-item-importadores.component */ "./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-importadores/programacao-navio-item-importadores.component.ts");
/* harmony import */ var _programacao_navio_item_programacao_navio_item_itens_programacao_navio_item_itens_component__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./programacao-navio-item/programacao-navio-item-itens/programacao-navio-item-itens.component */ "./src/app/pages/operacao/programacao-navio/programacao-navio-item/programacao-navio-item-itens/programacao-navio-item-itens.component.ts");
/* harmony import */ var _programacao_navio_liberacao_operacao_index_programacao_navio_liberacao_operacao_index_component__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./programacao-navio-liberacao-operacao-index/programacao-navio-liberacao-operacao-index.component */ "./src/app/pages/operacao/programacao-navio/programacao-navio-liberacao-operacao-index/programacao-navio-liberacao-operacao-index.component.ts");
/* harmony import */ var _programacao_navio_observacoes_programacao_navio_observacoes_component__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./programacao-navio-observacoes/programacao-navio-observacoes.component */ "./src/app/pages/operacao/programacao-navio/programacao-navio-observacoes/programacao-navio-observacoes.component.ts");
/* harmony import */ var _programacao_navio_outras_operacoes_programacao_navio_outras_operacoes_dados_programacao_navio_outras_operacoes_dados_component__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./programacao-navio-outras-operacoes/programacao-navio-outras-operacoes-dados/programacao-navio-outras-operacoes-dados.component */ "./src/app/pages/operacao/programacao-navio/programacao-navio-outras-operacoes/programacao-navio-outras-operacoes-dados/programacao-navio-outras-operacoes-dados.component.ts");
/* harmony import */ var _programacao_navio_outras_operacoes_programacao_navio_outras_operacoes_component__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./programacao-navio-outras-operacoes/programacao-navio-outras-operacoes.component */ "./src/app/pages/operacao/programacao-navio/programacao-navio-outras-operacoes/programacao-navio-outras-operacoes.component.ts");
/* harmony import */ var _programacao_navio_status_programacao_navio_status_component__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./programacao-navio-status/programacao-navio-status.component */ "./src/app/pages/operacao/programacao-navio/programacao-navio-status/programacao-navio-status.component.ts");
/* harmony import */ var _programacao_navio_module_routing__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./programacao-navio.module.routing */ "./src/app/pages/operacao/programacao-navio/programacao-navio.module.routing.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 ProgramacaoNavioModule = /** @class */ (function () {
    function ProgramacaoNavioModule() {
    }
    ProgramacaoNavioModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({
            declarations: [_programacao_navio_index_programacao_navio_index_component__WEBPACK_IMPORTED_MODULE_9__["ProgramacaoNavioIndexComponent"], _programacao_navio_form_programacao_navio_form_component__WEBPACK_IMPORTED_MODULE_8__["ProgramacaoNavioFormComponent"], _programacao_navio_filter_programacao_navio_filter_component__WEBPACK_IMPORTED_MODULE_7__["ProgramacaoNavioFilterComponent"],
                _programacao_navio_confirmacao_chegada_programacao_navio_confirmacao_chegada_component__WEBPACK_IMPORTED_MODULE_3__["ProgramacaoNavioConfirmacaoChegadaComponent"], _programacao_navio_item_programacao_navio_item_itens_programacao_navio_item_itens_component__WEBPACK_IMPORTED_MODULE_17__["ProgramacaoNavioItemItensComponent"], _programacao_navio_item_programacao_navio_item_importadores_programacao_navio_item_importadores_component__WEBPACK_IMPORTED_MODULE_16__["ProgramacaoNavioItemImportadoresComponent"],
                _programacao_navio_outras_operacoes_programacao_navio_outras_operacoes_component__WEBPACK_IMPORTED_MODULE_21__["ProgramacaoNavioOutrasOperacoesComponent"], _programacao_navio_status_programacao_navio_status_component__WEBPACK_IMPORTED_MODULE_22__["ProgramacaoNavioStatusComponent"], _programacao_navio_observacoes_programacao_navio_observacoes_component__WEBPACK_IMPORTED_MODULE_19__["ProgramacaoNavioObservacoesComponent"], _programacao_navio_export_programacao_navio_export_component__WEBPACK_IMPORTED_MODULE_6__["ProgramacaoNavioExportComponent"],
                _programacao_navio_item_bl_programacao_navio_item_bl_form_programacao_navio_item_bl_form_component__WEBPACK_IMPORTED_MODULE_10__["ProgramacaoNavioItemBLFormComponent"], _programacao_navio_item_bl_programacao_navio_item_bl_index_programacao_navio_item_bl_index_component__WEBPACK_IMPORTED_MODULE_11__["ProgramacaoNavioItemBLIndexComponent"], _programacao_navio_liberacao_operacao_index_programacao_navio_liberacao_operacao_index_component__WEBPACK_IMPORTED_MODULE_18__["ProgramacaoNavioLiberacaoOperacaoIndexComponent"],
                _programacao_navio_dados_antaq_programacao_navio_dados_antaq_component__WEBPACK_IMPORTED_MODULE_4__["ProgramacaoNavioDadosAntaqComponent"], _programacao_navio_item_programacao_navio_item_dados_programacao_navio_item_dados_component__WEBPACK_IMPORTED_MODULE_15__["ProgramacaoNavioItemDadosComponent"], _programacao_navio_outras_operacoes_programacao_navio_outras_operacoes_dados_programacao_navio_outras_operacoes_dados_component__WEBPACK_IMPORTED_MODULE_20__["ProgramacaoNavioOutrasOperacoesDadosComponent"],
                _programacao_navio_item_programacao_navio_item_dados_portos_programacao_navio_item_dados_portos_component__WEBPACK_IMPORTED_MODULE_12__["ProgramacaoNavioItemDadosPortosComponent"], _programacao_navio_dados_programacao_navio_dados_component__WEBPACK_IMPORTED_MODULE_5__["ProgramacaoNavioDadosComponent"], _programacao_navio_item_programacao_navio_item_dados_reexcedente_programacao_navio_item_dados_reexcedente_component__WEBPACK_IMPORTED_MODULE_13__["ProgramacaoNavioItemDadosREExcedenteComponent"],
                _programacao_navio_item_programacao_navio_item_dados_unidade_programacao_navio_item_dados_unidade_component__WEBPACK_IMPORTED_MODULE_14__["ProgramacaoNavioItemDadosUnidadeComponent"]],
            imports: [
                _angular_common__WEBPACK_IMPORTED_MODULE_0__["CommonModule"],
                _shared_shared_module__WEBPACK_IMPORTED_MODULE_2__["SharedModule"],
                _programacao_navio_module_routing__WEBPACK_IMPORTED_MODULE_23__["ProgramacaoNavioModuleRouting"]
            ]
        })
    ], ProgramacaoNavioModule);
    return ProgramacaoNavioModule;
}());



/***/ }),

/***/ "./src/app/pages/operacao/programacao-navio/programacao-navio.validation.ts":
/*!**********************************************************************************!*\
  !*** ./src/app/pages/operacao/programacao-navio/programacao-navio.validation.ts ***!
  \**********************************************************************************/
/*! exports provided: ProgramacaoNavioValidation */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProgramacaoNavioValidation", function() { return ProgramacaoNavioValidation; });
/* harmony import */ var _shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../../shared/services/funcoes/date-time-utils/date-time-utils.static.service */ "./src/app/shared/services/funcoes/date-time-utils/date-time-utils.static.service.ts");
/* harmony import */ var _shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../../../shared/services/funcoes/number-utils/number-utils.static.service */ "./src/app/shared/services/funcoes/number-utils/number-utils.static.service.ts");
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};


var ProgramacaoNavioValidation = /** @class */ (function () {
    function ProgramacaoNavioValidation(isDetail, service, message, funcoes) {
        this.isDetail = isDetail;
        this.service = service;
        this.message = message;
        this.funcoes = funcoes;
    }
    ProgramacaoNavioValidation.prototype.error = function (message, showError) {
        var r = { "isValid": false, "message": "" };
        if (!r.isValid) {
            r.message = this.message.getTranslates("messages", message);
            if (showError) {
                this.message.warning("titles.entradaVeiculo", "messages." + message);
            }
        }
        return r;
    };
    ProgramacaoNavioValidation.prototype.dtAtracacaoNaoPodeSerMaiorDtDesatracao = function (params, showError) {
        if (showError === void 0) { showError = true; }
        var r = { "isValid": true, "message": "" };
        if (!params.dtAtraca || !params.dtDesatraca || !this.isDetail)
            return r;
        if (_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_0__["DateTimeUtilsStaticService"].menorA(params.dtDesatraca, params.dtAtraca, ['H', 'M'])) {
            return this.error('dtAtracacaoNaoPodeSerMaiorDtDesatracacao', showError);
        }
        return r;
    };
    ProgramacaoNavioValidation.prototype.inicioOperNaoPodeSerMenorQueDtAtraca = function (params, showError) {
        if (showError === void 0) { showError = true; }
        var r = { "isValid": true, "message": "" };
        if (!params.inicioOper || !params.dtAtraca || !this.isDetail)
            return r;
        if (_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_0__["DateTimeUtilsStaticService"].menorA(params.inicioOper, params.dtAtraca, ['H', 'M'])) {
            return this.error('inicioOperacaoNaoPodeSerMenorDtatraca', showError);
        }
        return r;
    };
    ProgramacaoNavioValidation.prototype.fimOperNaoPodeSerMenorQueInicioOper = function (params, showError) {
        if (showError === void 0) { showError = true; }
        var r = { "isValid": true, "message": "" };
        if (!params.fimOper || !params.inicioOper || !this.isDetail)
            return r;
        if (_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_0__["DateTimeUtilsStaticService"].menorA(params.fimOper, params.inicioOper, ['H', 'M'])) {
            return this.error('dtFimOperDeveSerMaiorDtIniOper', showError);
        }
        return r;
    };
    ProgramacaoNavioValidation.prototype.validaTipoOperCargaPermitido = function (params, showError) {
        if (showError === void 0) { showError = true; }
        var r = { "isValid": true, "message": "" };
        if (_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_1__["NumberUtilsStaticService"].toNumber(params.tipoOperCarga) === 1 ||
            (_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_1__["NumberUtilsStaticService"].toNumber(this.service.programacaoNavio.tipoOperacao) === 1 && [13, 20].includes(_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_1__["NumberUtilsStaticService"].toNumber(params.tipoOperCarga)))) {
            params.tipoOperCarga = "";
            return this.error('tipoOperacaoCargaInvalido', showError);
        }
        return r;
    };
    ProgramacaoNavioValidation.prototype.dataSaidaMenorDataAtracacao = function (params, showError) {
        if (showError === void 0) { showError = true; }
        var r = { "isValid": true, "message": "" };
        if (!params.dtSaida && !params.dtAtracacao && !this.isDetail)
            return r;
        if (this.service.config.obrDtAtrSaida) {
            if (_shared_services_funcoes_date_time_utils_date_time_utils_static_service__WEBPACK_IMPORTED_MODULE_0__["DateTimeUtilsStaticService"].menorA(params.dtSaida, params.dtAtracacao)) {
                return this.error('dataSaidaMenorDataAtracacao', showError);
            }
        }
        return r;
    };
    return ProgramacaoNavioValidation;
}());



/***/ })

}]);
//# sourceMappingURL=app-pages-operacao-programacao-navio-programacao-navio-module.js.map