!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@angular/forms"),require("@totvs/thf-ui"),require("@angular/router"),require("@angular/common/http"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@totvs/thf-templates",["exports","@angular/core","@angular/common","@angular/forms","@totvs/thf-ui","@angular/router","@angular/common/http","rxjs/operators"],t):t(((e=e||self).totvs=e.totvs||{},e.totvs["thf-templates"]={}),e.ng.core,e.ng.common,e.ng.forms,e.thfUi,e.ng.router,e.ng.common.http,e.rxjs.operators)}(this,function(e,t,o,n,r,i,s,a){"use strict";var c=function(e,t){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(e,t)};function l(e,t){function o(){this.constructor=e}c(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}var u=function(){return(u=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};function d(e,t){var o,n,r,i,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:a(0),"throw":a(1),"return":a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(o)throw new TypeError("Generator is already executing.");for(;s;)try{if(o=1,n&&(r=2&i[0]?n["return"]:i[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,i[1])).done)return r;switch(n=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(r=(r=s.trys).length>0&&r[r.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){s.label=i[1];break}if(6===i[0]&&s.label<r[1]){s.label=r[1],r=i;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(i);break}r[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(a){i=[6,a],n=0}finally{o=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}function p(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var n,r,i=o.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(a){r={error:a}}finally{try{n&&!n.done&&(o=i["return"])&&o.call(i)}finally{if(r)throw r.error}}return s}function h(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(p(arguments[t]));return e}var f=["pt","en","es"],m="pt";function g(){return function(){var e=(y()||m).toLowerCase().substring(0,2);if(!f.includes(e))return m;return e}()}function y(){return navigator.language||navigator.userLanguage}function v(e){return"string"==typeof e?"true"===(e=e.toLowerCase().trim())||"on"===e||""===e:"number"==typeof e?1===e:!!e}function b(e,t){return typeof e===t}function P(e){return!!e&&e.startsWith("http")}function w(e,t){void 0===e&&(e={}),void 0===t&&(t=[]);return t.reduce(function(t,o){var n;return u({},t,((n={})[o]=e[o],n))},{})}function k(e){return void 0===e&&(e={}),Object.keys(e).map(function(t){return e[t]})}function S(e){return e?e<10?"0"+e:e:"00"}var A={en:{cancelButton:"Cancel",closeButton:"Close",continueButton:"Continue",email:"e-mail",emailErrorMessagePhrase:"Invalid e-mail format",emailSentConfirmationPhrase:"We have sent the instructions and new password creation link to your e-mail.\n    If you did not receive it after a few minutes, check your spam box or click Resend.",emailSentTitle:"E-mail sent",forgotPasswordTitle:"Forgot your password?",insertCode:"Type the code",insertEmail:"Enter your e-mail",insertPhone:"Enter your mobile number",phoneErrorMessagePhrase:"Invalid phone number",prepositionIn:"in",prepositionOr:"or",recoveryPasswordPhrase:"To recover your password we will send you a {0} with instructions.",resendEmailButton:"Resend",resendSmsCodePhrase:"If the code does not arrive within a few minutes, please send it again.",sendAgainPhrase:"If the code does not arrive within a few minutes",sendAgain:"send again.",sendButton:"Submit",sentSmsCodePhrase:"We sent a code for your mobile phone.",sms:"SMS",smsCodeErrorMessagePhrase:"Invalid code. Please re-enter or contact support",supportContact:"If you do not have access to {0} contact support",telephone:"telephone",typeCodeTitle:"Enter sent code"},es:{cancelButton:"Cancelar",closeButton:"Cerrar",continueButton:"Continuar",email:"e-mail",emailErrorMessagePhrase:"Formato de correo electrónico no válido",emailSentConfirmationPhrase:"Enviamos las instrucciones y enlace de creación de nueva contraseña para su correo electrónico.\n    Si no ha recibido después de unos minutos, compruebe su caja de spam o haga clic en Reenviar",emailSentTitle:"E-mail enviado",forgotPasswordTitle:"Olvidaste tu contraseña?",insertCode:"Introduzca el código",insertEmail:"Introduce tu e-mail",insertPhone:"Introduce tu número de celular",phoneErrorMessagePhrase:"Número de teléfono no válido",prepositionIn:"en",prepositionOr:"u",recoveryPasswordPhrase:"Para recuperar su contraseña vamos a enviar un {0} con instrucciones.",resendEmailButton:"Reenviar",resendSmsCodePhrase:"Si el código no llega dentro de unos minutos, vuelva a enviar.",sendAgain:"envíe de nuevo.",sendAgainPhrase:"Si el código no llega dentro de unos minutos",sendButton:"Enviar",sentSmsCodePhrase:"Enviamos un código para su celular.",sms:"SMS",smsCodeErrorMessagePhrase:"Código no válido. Escriba de nuevo o póngase en contacto con el soporte",supportContact:"Si no tiene acceso a {0} póngase en contacto con el soporte",telephone:"teléfono",typeCodeTitle:"Escribir código enviado"},pt:{cancelButton:"Cancelar",closeButton:"Fechar",continueButton:"Continuar",email:"e-mail",emailErrorMessagePhrase:"Formato de e-mail inválido",emailSentConfirmationPhrase:"Enviamos as instruções e link de criação de nova senha para o seu e-mail.\n    Caso não tenha recebido após alguns minutos, verifique sua caixa de spam ou clique em Reenviar.",emailSentTitle:"E-mail enviado",forgotPasswordTitle:"Esqueceu sua senha?",insertCode:"Digite o código",insertEmail:"Insira seu e-mail",insertPhone:"Insira seu número de celular",phoneErrorMessagePhrase:"Número de telefone inválido",prepositionIn:"em",prepositionOr:"ou",recoveryPasswordPhrase:"Para recuperar sua senha vamos enviar um {0} com instruções.",resendEmailButton:"Reenviar",resendSmsCodePhrase:"Se o código não chegar dentro de alguns minutos envie novamente",sendAgain:"envie novamente.",sendAgainPhrase:"Se o código não chegar dentro de alguns minutos",sendButton:"Enviar",sentSmsCodePhrase:"Enviamos um código para seu celular cadastrado.",sms:"SMS",smsCodeErrorMessagePhrase:"Código inválido. Digite novamente ou contacte o suporte",supportContact:"Se não tiver acesso ao {0} contacte o suporte",telephone:"telefone",typeCodeTitle:"Digitar código enviado"}},C={All:"all",Email:"email",SMS:"sms"},E=15,I=15,T="(99) 99999-9999",M=C.Email,R=function(){function e(){this._phoneMask=T,this._type=M,this.maxLength=E,this.minLength=I,this.literals=u({},A[m],A[g()]),this.codeSubmit=new t.EventEmitter,this.submit=new t.EventEmitter}return Object.defineProperty(e.prototype,"contactEmail",{get:function(){return this._contactEmail},set:function(e){this._contactEmail=e,this.smsCodeErrorMessage=this.concatenateSMSErrorMessage(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"phoneMask",{get:function(){return this._phoneMask},set:function(e){this._phoneMask=e||T,this.minLength=this.maxLength=this._phoneMask.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this._type},set:function(e){this._type=Object.values(C).includes(e)?e:M},enumerable:!0,configurable:!0}),e.prototype.concatenateSMSErrorMessage=function(e){var t=this.literals.smsCodeErrorMessagePhrase;return e&&""!==e?t+" "+this.literals.prepositionIn+" "+e+".":t},e.propDecorators={contactEmail:[{type:t.Input,args:["t-contact-email"]}],codeError:[{type:t.Input,args:["t-code-error"]}],phoneMask:[{type:t.Input,args:["t-phone-mask"]}],type:[{type:t.Input,args:["t-type"]}],urlRecovery:[{type:t.Input,args:["t-url-recovery"]}],codeSubmit:[{type:t.Output,args:["t-code-submit"]}],submit:[{type:t.Output,args:["t-submit"]}]},e}(),F={Email:"email",SMSCode:"smsCode",Confirmation:"confirmation"},x=function(){function e(e){this.http=e}return e.prototype.post=function(e,t,o){return this.http.post(e,t,{observe:"response",params:o})},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:s.HttpClient}]},e}(),D=function(e){function o(t,o,n){var r=e.call(this)||this;return r.router=t,r.thfI18nPipe=o,r.thfModalPasswordRecoveryService=n,r.chosenTypeFormOption=C.Email,r.codeMask="9 9 9 9 9 9",r.emailModal=!0,r.emailModalPhrases={},r.endpoint=".",r.invalidCode=!1,r.invalidEmail=!1,r.modalType=F.Email,r.submittedCodeValue={},r.submittedContactValue={},r.primaryAction={label:undefined,action:function(){}},r.secondaryAction={label:undefined,action:function(){}},r.typeFormOptions=[{label:"e-mail",value:C.Email},{label:"SMS",value:C.SMS}],r}return l(o,e),o.prototype.ngOnDestroy=function(){this.passwordRecoverySubscription&&this.passwordRecoverySubscription.unsubscribe(),this.smsCodeSubscription&&this.smsCodeSubscription.unsubscribe()},o.prototype.completed=function(){this.cancelAction()},o.prototype.formModelChangesCheck=function(e){var t=e.invalid;if(this.invalidEmail=t&&e.dirty,this.primaryAction.disabled=t,this.modalType===F.SMSCode){var o=this.codeError!==undefined&&""!==this.codeError;this.showCustomCodeError=o&&e.pristine}},o.prototype.getInputType=function(e){var t=this;this.type=e,this.pipeModalPhrases(),setTimeout(function(){t.control=t.emailForm.controls[e],t.formModelChangesCheck(t.emailForm),t.resetFormFields(t.control)})},o.prototype.open=function(){var e=this.checkFormType(this.type);this.control=this.emailForm.controls[e],this.setEmailModalPhrasesAndActions(),this.formModelChangesCheck(this.emailForm),this.recoveryModalElement.open()},o.prototype.openConfirmation=function(){this.modalTitle=this.literals.emailSentTitle,this.modalType=F.Confirmation,this.setActions(this.cancelAction,this.literals.closeButton,this.submitAction,this.literals.resendEmailButton,!1)},o.prototype.openSmsCode=function(){var e=this;this.modalTitle=this.literals.typeCodeTitle,this.modalType=F.SMSCode,this.setActions(this.submitSmsCodeAction,this.literals.continueButton,this.cancelAction,this.literals.cancelButton,!0),setTimeout(function(){e.control=e.smsCodeForm.controls.sms,e.formModelChangesCheck(e.smsCodeForm)})},o.prototype.resendSmsCode=function(){this.incrementRetryAttempts(),this.urlRecovery?this.submitActionRequest(this.submittedContactValue,this.type):this.submit.emit(this.submittedContactValue)},o.prototype.assignSmsResponse=function(e){this.smsBodyResponse=Object.assign({},{hash:e.hash}),e.urlValidationCode&&(this.smsBodyResponse=Object.assign(this.smsBodyResponse,{urlValidationCode:e.urlValidationCode}))},o.prototype.cancelAction=function(){this.resetFormFields(this.control),this.submittedContactValue={},this.chosenTypeFormOption=C.Email,this.modalType=F.Email,this.type=this.modalPasswordRecoveryTypeAll?C.All:this.type,this.recoveryModalElement.close()},o.prototype.checkFormType=function(e){return e!==C.All?e:C.Email},o.prototype.formReset=function(e){e.markAsPristine(),e.markAsUntouched(),e.updateValueAndValidity()},o.prototype.getEmitValue=function(e){return e===C.SMS?this.phone:this.email},o.prototype.incrementRetryAttempts=function(){this.submittedContactValue.retry=this.submittedContactValue.retry+1||1},o.prototype.openExternalLink=function(e,t){window.open(e+"?token="+t,"_self")},o.prototype.openInternalLink=function(e,t,o){this.router.navigate([e+"/"+t],{queryParams:{token:o}})},o.prototype.pipeModalPhrases=function(){this.type===C.SMS?(this.emailModalPhrases.firstPhrase=this.setPipeArguments(this.literals.recoveryPasswordPhrase,this.literals.sms),this.emailModalPhrases.secondPhrase=this.setPipeArguments(this.literals.supportContact,this.literals.telephone)):(this.emailModalPhrases.firstPhrase=this.setPipeArguments(this.literals.recoveryPasswordPhrase,this.literals.email),this.emailModalPhrases.secondPhrase=this.setPipeArguments(this.literals.supportContact,this.literals.email))},o.prototype.redirectToChangePassword=function(e){var t=e.urlChangePassword;if(t)P(t)?this.openExternalLink(t,e.token):this.openInternalLink(this.urlRecovery,t,e.token);else{this.openInternalLink(this.urlRecovery,"changePassword",e.token)}},o.prototype.resetFormFields=function(e){this.formReset(e),this.email=undefined,this.phone=undefined,this.smsCode=undefined},o.prototype.setActions=function(e,t,o,n,r){var i=this;this.primaryAction.action=function(){return e.call(i)},this.primaryAction.label=t,this.secondaryAction.action=function(){return o.call(i)},this.secondaryAction.label=n,this.primaryAction.disabled=r},o.prototype.setEmailModalPhrasesAndActions=function(){this.modalTitle=this.literals.forgotPasswordTitle,this.pipeModalPhrases(),this.modalPasswordRecoveryTypeAll=this.type===C.All,this.setActions(this.submitAction,this.literals.sendButton,this.cancelAction,this.literals.cancelButton,!0)},o.prototype.setRequestEndpoint=function(e){var t=e||"validation";return this.urlRecovery+"/"+t},o.prototype.setPipeArguments=function(e,t){return this.thfI18nPipe.transform(e,t)},o.prototype.submitAction=function(){this.modalType===F.Confirmation?this.incrementRetryAttempts():this.formReset(this.control),this.submittedContactValue[this.checkFormType(this.type)]=this.getEmitValue(this.type),this.urlRecovery?this.submitActionRequest(this.submittedContactValue,this.type):this.submit.emit(this.submittedContactValue)},o.prototype.submitActionRequest=function(e,t){var o=this,n=t===C.SMS?{type:"sms"}:undefined;this.passwordRecoverySubscription=this.thfModalPasswordRecoveryService.post(this.urlRecovery,e,n).subscribe(function(e){t!==C.Email&&t!==C.All||204!==e.status?t===C.SMS&&200===e.status&&(o.assignSmsResponse(e.body),o.openSmsCode()):o.openConfirmation()})},o.prototype.submitSmsCodeAction=function(){this.submittedCodeValue.code=this.smsCode,this.urlRecovery?(this.submittedCodeValue=Object.assign(this.submittedCodeValue,{hash:this.smsBodyResponse.hash}),this.submitSmsCodeRequest(this.submittedCodeValue)):this.codeSubmit.emit(this.submittedCodeValue),this.resetFormFields(this.control)},o.prototype.submitSmsCodeRequest=function(e){var t=this;this.smsCodeSubscription=this.thfModalPasswordRecoveryService.post(this.setRequestEndpoint(this.smsBodyResponse.urlValidationCode),e).subscribe(function(e){200===e.status&&(t.completed(),t.redirectToChangePassword(e.body))},function(e){t.codeError=e.error.message,t.openSmsCode()})},o.decorators=[{type:t.Component,args:[{selector:"thf-modal-password-recovery",template:'<thf-modal #recoveryModal\n  t-hide-close\n  t-size="auto"\n  [ngSwitch]="modalType"\n  [t-primary-action]="primaryAction"\n  [t-secondary-action]="secondaryAction"\n  [t-title]="modalTitle"> \n  <div class="thf-modal-password-recovery-wrapper">\n    <div *ngSwitchCase="\'email\'" class="thf-modal-password-recovery-content thf-row">\n      <div class="thf-modal-password-recovery-text thf-md-12 thf-mb-1">\n        {{ emailModalPhrases.firstPhrase }}\n      </div>\n      <div class="thf-mb-2 thf-md-12">\n        <form #emailForm="ngForm">\n\n          <div *ngIf="modalPasswordRecoveryTypeAll">\n            <thf-radio-group \n              name="type"\n              [(ngModel)]="chosenTypeFormOption"\n              [t-options]="typeFormOptions"\n              (t-change)="getInputType($event)">\n            </thf-radio-group>\n          </div>\n\n          <div class="thf-mt-1">\n            <thf-email *ngIf="type === \'email\' || type === \'all\'"\n              name="email"\n              [(ngModel)]="email"\n              t-required\n              [t-label]="literals.insertEmail"\n              (t-change-model)="formModelChangesCheck(emailForm)">\n            </thf-email>\n    \n            <thf-input *ngIf="type === \'sms\'"\n              name="sms"\n              [(ngModel)]="phone"\n              t-icon="thf-icon-telephone"\n              t-required\n              [t-label]="literals.insertPhone"\n              [t-mask]="phoneMask"\n              [t-maxlength]="maxLength"\n              [t-minlength]="minLength"\n              (t-change-model)="formModelChangesCheck(emailForm)">\n            </thf-input>\n          </div>\n          \n          <div class="thf-field-container-bottom thf-field-container-error-container">\n            <thf-modal-password-recovery-error-message *ngIf="invalidEmail && control.dirty" \n              [t-text]="type === \'sms\' ? literals.phoneErrorMessagePhrase : literals.emailErrorMessagePhrase">\n            </thf-modal-password-recovery-error-message>\n          </div>\n        </form>\n      </div>\n      <div class="thf-modal-password-recovery-text thf-md-12">{{ emailModalPhrases.secondPhrase }}<span *ngIf="contactEmail">\n        {{ literals.prepositionIn }} \n          <a class="thf-modal-password-recovery-link" href="mailto:{{ contactEmail }}" target="_self">{{ contactEmail }}</a>\n        </span>{{ endpoint }}\n      </div>\n    </div>\n\n    <div #smsCodeModal *ngSwitchCase="\'smsCode\'" class="thf-modal-password-recovery-content thf-row">\n      <div class="thf-modal-password-recovery-text thf-md-12 thf-mb-1">{{ literals.sentSmsCodePhrase }}</div>\n      <div class="thf-mb-2 thf-md-12">\n        <form #smsCodeForm="ngForm">\n          <thf-input\n            name="sms"\n            [(ngModel)]="smsCode"\n            t-maxlength="11"\n            t-minlength="11"\n            t-required\n            [t-label]="literals.insertCode"\n            [t-mask]="codeMask"\n            (t-change-model)="formModelChangesCheck(smsCodeForm)">\n          </thf-input>\n          <div class="thf-field-container-bottom thf-field-container-error-container">\n            <thf-modal-password-recovery-error-message *ngIf="invalidEmail"\n              [t-text]="smsCodeErrorMessage || this.literals.smsCodeErrorMessagePhrase">\n            </thf-modal-password-recovery-error-message>\n            <thf-modal-password-recovery-error-message *ngIf="showCustomCodeError"\n              [t-text]="codeError">\n            </thf-modal-password-recovery-error-message>\n          </div>\n        </form>\n      </div>\n      <div class="thf-modal-password-recovery-text thf-md-12">\n        {{ literals.sendAgainPhrase }} \n        <span class="thf-modal-password-recovery-link" (click)="resendSmsCode()">{{ literals.sendAgain }}</span>\n      </div>\n    </div>\n    \n    <div #confirmationModal *ngSwitchCase="\'confirmation\'" class="thf-modal-password-recovery-content thf-row">\n      <img \n        class="thf-modal-password-recovery-user-image thf-mb-2" \n        src="./assets/images/email-sent.svg"> \n      <div class="thf-modal-password-recovery-text">\n        {{ literals.emailSentConfirmationPhrase }}\n      </div>\n    </div>\n  </div>\n</thf-modal>\n'}]}],o.ctorParameters=function(){return[{type:i.Router},{type:r.ThfI18nPipe},{type:x}]},o.propDecorators={emailForm:[{type:t.ViewChild,args:["emailForm",{"static":!1}]}],recoveryModalElement:[{type:t.ViewChild,args:["recoveryModal",{"static":!0}]}],smsCodeForm:[{type:t.ViewChild,args:["smsCodeForm",{"static":!1}]}]},o}(R),O=function(){function e(){}return e.decorators=[{type:t.Component,args:[{selector:"thf-modal-password-recovery-error-message",template:'<div class="thf-field-container-bottom-text-error thf-field-container-error-item">\n  <span class="thf-icon thf-icon-exclamation"></span>\n  <span class="thf-field-container-error-text">{{ text }}</span>\n</div>\n'}]}],e.propDecorators={text:[{type:t.Input,args:["t-text"]}]},e}(),_=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[o.CommonModule,n.FormsModule,r.ThfFieldModule,r.ThfModalModule],declarations:[D,O],exports:[D,O],providers:[r.ThfI18nPipe,x]}]}],e}(),N=function(){function e(){this._showSelectLanguage=!1,this.selectLanguageOptions=[{label:"English",value:"en"},{label:"Español",value:"es"},{label:"Português",value:"pt"}],this.selectedLanguage=new t.EventEmitter}return Object.defineProperty(e.prototype,"logo",{get:function(){return this._logo},set:function(e){this._logo=b(e,"string")&&e.trim()?e:undefined},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"secondaryLogo",{get:function(){return this._secondaryLogo},set:function(e){this._secondaryLogo=b(e,"string")&&e.trim()?e:undefined},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"showSelectLanguage",{get:function(){return this._showSelectLanguage},set:function(e){this._showSelectLanguage=v(e)},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.selectedLanguageOption=g()},e.prototype.onChangeLanguage=function(){this.selectedLanguage.emit(this.selectedLanguageOption)},e.decorators=[{type:t.Component,args:[{selector:"thf-page-background",template:'<div class="thf-page-login-container">\n  <div class="thf-page-login-panel">\n    <img *ngIf="logo"\n      class="thf-page-background-main-logo"\n      [class.thf-page-background-hide-logo]="hideLogo"\n      alt="main-logo"\n      [src]="logo">\n\n    <div class="thf-page-login-body">\n      <div class="thf-page-login-panel-content">\n        <ng-content></ng-content>\n      </div>\n    </div>\n    <div class="thf-page-background-footer thf-sm-12">\n\n      <thf-divider class="thf-page-background-footer-mobile-only"></thf-divider>\n\n      <div class="thf-page-background-footer-content">\n        <div *ngIf="showSelectLanguage" class="thf-page-background-footer-select">\n          <thf-select\n            name="selectedLanguageOption"\n            [(ngModel)]="selectedLanguageOption"\n            [t-options]="selectLanguageOptions"\n            (t-change) = "onChangeLanguage()">\n          </thf-select>\n        </div>\n\n        <div class="thf-page-background-secondary-logo"\n          [ngClass]="showSelectLanguage ? \'thf-page-background-secondary-logo-right\' : \'thf-page-background-secondary-logo-centered\'">\n\n          <img *ngIf="secondaryLogo"\n            class="thf-page-background-secondary-logo-image"\n            alt="secondary-logo"\n            [src]="secondaryLogo">\n        </div>\n      </div>\n    </div>\n  </div>\n\n  <div *ngIf="background"\n    [ngClass]="background ? \'thf-page-login-highlight-image\' : \'thf-page-login-highlight-image-off\'"\n    [style.background-image]="\'url(\' + background + \')\'">\n    <div class="thf-page-login-highlight-text">\n      <div class="thf-font-display">{{ highlightInfo }}</div>\n    </div>\n  </div>\n</div>\n'}]}],e.propDecorators={background:[{type:t.Input,args:["t-background"]}],hideLogo:[{type:t.Input,args:["t-hide-logo"]}],highlightInfo:[{type:t.Input,args:["t-highlight-info"]}],logo:[{type:t.Input,args:["t-logo"]}],secondaryLogo:[{type:t.Input,args:["t-secondary-logo"]}],showSelectLanguage:[{type:t.Input,args:["t-show-select-language"]}],selectedLanguage:[{type:t.Output,args:["t-selected-language"]}]},e}(),L=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[o.CommonModule,n.FormsModule,i.RouterModule,r.ThfDividerModule,r.ThfFieldModule],declarations:[N],exports:[N]}]}],e}(),j={None:"none",ExceededAttempts:"exceededAttempts",ExpiredPassword:"expiredPassword"},q=j.None,B={attempts:5,days:90,hours:24},U=function(){function e(){this._params=u({},B),this._reason=j.None,this._urlBack="/"}return Object.defineProperty(e.prototype,"params",{get:function(){return this._params},set:function(e){if(e instanceof Object){var t=Object.keys(e),o=u({},B);t.forEach(function(t){o[t]=e[t]}),this._params=o}else this._params=u({},B)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"reason",{get:function(){return this._reason},set:function(e){this._reason=Object.values(j).includes(e)?e:q},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"urlBack",{get:function(){return this._urlBack},set:function(e){this._urlBack=e},enumerable:!0,configurable:!0}),e.propDecorators={contactEmail:[{type:t.Input,args:["t-contact-email"]}],contactPhone:[{type:t.Input,args:["t-contact-phone"]}],params:[{type:t.Input,args:["t-params"]}],logo:[{type:t.Input,args:["t-logo"]}],reason:[{type:t.Input,args:["t-reason"]}],secondaryLogo:[{type:t.Input,args:["t-secondary-logo"]}],urlBack:[{type:t.Input,args:["t-url-back"]}]},e}(),V={en:{primaryButton:"Back to home screen"},es:{primaryButton:"Volver al inicio"},pt:{primaryButton:"Voltar para o início"}},H=function(e){function o(t,o){var n=e.call(this)||this;return n.activatedRoute=t,n.router=o,n.literals=u({},V[m],V[g()]),n}return l(o,e),o.prototype.ngOnInit=function(){this.checkingForRouteMetadata(this.activatedRoute.snapshot.data)},o.prototype.navigateTo=function(e){P(e)?window.open(e):this.router.navigate([e||"/"])},o.prototype.checkingForMetadataProperty=function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]},o.prototype.checkingForRouteMetadata=function(e){0!==Object.keys(e).length&&(this.contactEmail=this.checkingForMetadataProperty(e,"contactEmail")||this.contactEmail,this.contactPhone=this.checkingForMetadataProperty(e,"contactPhone")||this.contactPhone,this.reason=this.checkingForMetadataProperty(e,"reason")||this.reason,this.urlBack=this.checkingForMetadataProperty(e,"urlBack")||this.urlBack)},o.decorators=[{type:t.Component,args:[{selector:"thf-page-blocked-user",template:'<div class="thf-page-blocked-user-wrapper">\n  <div class="thf-page-background-wrap">\n    <thf-page-background\n      [t-hide-logo]="true"\n      [t-logo]="logo"\n      [t-secondary-logo]="secondaryLogo">\n\n      <thf-page-blocked-user-reason\n        [t-params]="params"\n        [t-reason]="reason">\n      </thf-page-blocked-user-reason>\n\n      <div class="thf-page-blocked-user-mobile-bottom-alignment">\n        <thf-page-blocked-user-contacts\n          [t-email]="contactEmail"\n          [t-phone]="contactPhone">\n        </thf-page-blocked-user-contacts>\n\n        <div class="thf-row">\n          <thf-button\n            class="thf-lg-12 thf-sm-12 thf-page-blocked-user-button"\n            t-type="primary"\n            [t-label]="literals.primaryButton"\n            (t-click)="navigateTo(urlBack)">\n          </thf-button>\n        </div>\n      </div>\n    </thf-page-background>\n  </div>\n</div>\n'}]}],o.ctorParameters=function(){return[{type:i.ActivatedRoute},{type:i.Router}]},o}(U),W=function(){function e(e){this.changeDetector=e,this.overflowItem=!1}return e.prototype.ngAfterViewInit=function(){this.checkContactItemWidth()},e.prototype.ngOnChanges=function(e){(e.email||e.phone)&&this.checkContactItemWidth()},e.prototype.checkContactItemWidth=function(){var e=this;this.email&&this.phone?(setTimeout(function(){var t=e.phoneItem.nativeElement.offsetWidth,o=e.mailItem.nativeElement.offsetWidth,n=e.contactGroup.nativeElement.offsetWidth/2;e.overflowItem=t>n||o>n-16}),this.changeDetector.detectChanges()):this.overflowItem=!0},e.decorators=[{type:t.Component,args:[{selector:"thf-page-blocked-user-contacts",template:'<div #contactGroup class="thf-page-blocked-user-contact-group thf-row thf-mb-3">\n  <div *ngIf="phone"\n    class="thf-page-blocked-user-contact-item"\n    [ngClass]="overflowItem ? \'thf-md-12\' : \'thf-md-6\'">\n    <a\n      class="thf-page-blocked-user-link thf-clickable"\n      [class.thf-page-blocked-user-contact-content-inline]="overflowItem"\n      href="tel:{{ phone }}"\n      target="_self">\n      <div class="thf-page-blocked-user-contact-group-item">\n        <span class="thf-page-blocked-user-contact-icon thf-icon thf-icon-telephone thf-pr-1"></span>\n        <span #phoneItem class="thf-page-blocked-user-contact-text thf-font-text">{{ phone }}</span>\n      </div>\n    </a>\n  </div>\n  <div *ngIf="email"\n    class="thf-page-blocked-user-contact-item thf-page-blocked-user-contact-mail"\n    [ngClass]="overflowItem ? \'thf-md-12\' : \'thf-md-6\'">\n    <a\n      class="thf-page-blocked-user-link thf-clickable"\n      [class.thf-page-blocked-user-contact-content-inline]="overflowItem"\n      href="mailto:{{ email }}"\n      target="_self">\n      <div class="thf-page-blocked-user-contact-group-item">\n        <span class="thf-page-blocked-user-contact-icon thf-icon thf-icon-mail thf-pr-1 "></span>\n        <span #mailItem class="thf-page-blocked-user-contact-text thf-font-text">{{ email }}</span>\n      </div>\n    </a>\n  </div>\n</div>'}]}],e.ctorParameters=function(){return[{type:t.ChangeDetectorRef}]},e.propDecorators={email:[{type:t.Input,args:["t-email"]}],phone:[{type:t.Input,args:["t-phone"]}],contactGroup:[{type:t.ViewChild,args:["contactGroup",{"static":!0}]}],mailItem:[{type:t.ViewChild,args:["mailItem",{"static":!0}]}],phoneItem:[{type:t.ViewChild,args:["phoneItem",{"static":!0}]}]},e}(),z={none:{pt:{title:"Opa!",firstPhrase:"Tivemos que bloquear essa tela temporariamente.",secondPhrase:"Mas não se preocupe! Basta fazer seu login novamente."},en:{title:"Oops!",firstPhrase:"We had to temporarily block this screen.",secondPhrase:"But do not worry! Just sign in again."},es:{title:"Opa!",firstPhrase:"Tuvimos que bloquear esta pantalla temporalmente.",secondPhrase:"¡Pero no se preocupe! Sólo tienes que iniciar sesión de nuevo."}},exceededAttempts:{pt:{title:"Opa!",firstPhrase:"Para sua segurança, após {0} tentativa(s) de senha seu usuário fica bloqueado e não pode ser acessado em {1} hora(s) :( ",secondPhrase:"Isso é para evitar que hackers invadam sua conta.",thirdPhrase:"Mas não se preocupe! Se você for o dono da conta e apenas esqueceu sua senha, basta entrar em contato com o suporte."},en:{title:"Oops!",firstPhrase:"For your security, after {0} attempt(s) of password\n        your user gets blocked and can not be accessed in {1} hour(s) :(",secondPhrase:"This is to prevent hackers from hacking into your account.",thirdPhrase:"But do not worry! If you are the owner of the account and just forgot your password, just contact support."},es:{title:"Opa!",firstPhrase:"Para su seguridad, después de {0} intento(s) de contraseña\n        su usuario queda bloqueado y no puede ser accedido en {1} hora(s) :(",secondPhrase:"Esto es para evitar que los hackers invadan su cuenta.",thirdPhrase:"¡Pero no se preocupe! Si usted es el dueño de la cuenta\n        y acaba de olvidar su contraseña, simplemente póngase en contacto con el soporte."}},expiredPassword:{pt:{title:"Opa! Sua senha expirou",firstPhrase:"A cada {0} dia(s) é preciso criar uma nova senha por questão de segurança. Após esses {0} dia(s) seu acesso é bloqueado :(",secondPhrase:"Mas não se preocupe! Basta entrar em contato com o administrador do sistema."},en:{title:"Oops! Your Password has expired",firstPhrase:"Every {0} day(s) you need to create a new password for security reasons.\n        After these {0} day(s) your access is blocked :(",secondPhrase:"But do not worry! Just contact your system administrator."},es:{title:"Opa! Su contraseña ha caducado",firstPhrase:"Cada {0} día(s) es necesario crear una nueva contraseña por razones de seguridad.\n        Después de estos {0} día(s) su acceso está bloqueado :(",secondPhrase:"¡Pero no se preocupe! Sólo tienes que ponerse en contacto con el administrador del sistema."}}},J=function(){function e(e){this.changeDetector=e}return e.prototype.ngOnChanges=function(e){(e.reason||e.params)&&this.getLiterals()},e.prototype.ngOnInit=function(){this.getLiterals()},e.prototype.getImageByReasonType=function(){var e;switch(this.reason){case"none":e="big-lock";break;case"exceededAttempts":e="blocked-user";break;case"expiredPassword":e="expired"}return"./assets/images/"+e+".svg"},e.prototype.getParams=function(){this.literalParams="expiredPassword"===this.reason?[this.params.days,this.params.days]:[this.params.attempts,this.params.hours]},e.prototype.getLiterals=function(){this.getParams(),this.literals=u({},z[this.reason][m],z[this.reason][g()]),this.changeDetector.detectChanges()},e.decorators=[{type:t.Component,args:[{selector:"thf-page-blocked-user-reason",template:'<div class="thf-page-blocked-user-reason-content">\n  <img \n    class="thf-page-blocked-user-image thf-mb-3" \n    [src]="getImageByReasonType()"> \n  <div class="thf-page-blocked-user-header thf-mb-md-3 thf-row">\n    <div class="thf-md-12">{{ literals?.title }}</div>\n  </div>\n  <div class="thf-page-blocked-user-text thf-font-text thf-row">\n    <div class="thf-mb-sm-2 thf-mb-md-3 thf-md-12 thf-page-blocked-user-text-bold">{{ literals?.firstPhrase | thfI18n:literalParams }}</div>\n    <div class="thf-mb-sm-2 thf-mb-md-3 thf-md-12">{{ literals?.secondPhrase }}</div>\n    <div class="thf-mb-sm-2 thf-mb-md-3 thf-md-12" *ngIf="literals?.thirdPhrase">{{ literals?.thirdPhrase }}</div>\n  </div>\n</div>'}]}],e.ctorParameters=function(){return[{type:t.ChangeDetectorRef}]},e.propDecorators={params:[{type:t.Input,args:["t-params"]}],reason:[{type:t.Input,args:["t-reason"]}]},e}(),G=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[o.CommonModule,i.RouterModule,r.ThfModule,L],declarations:[H,W,J],exports:[H,W,J]}]}],e}(),K=function(){function e(){this._hideCurrentPassword=!1,this._requirements=[],this._urlHome="/",this.urlBack="/",this.submit=new t.EventEmitter}return Object.defineProperty(e.prototype,"hideCurrentPassword",{get:function(){return this._hideCurrentPassword},set:function(e){this._hideCurrentPassword=v(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"recovery",{get:function(){return this._recovery},set:function(e){this._recovery=e,b(e,"string")&&(this.recoveryUrlType=P(e)?"externalLink":"internalLink")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"requirements",{get:function(){return this._requirements},set:function(e){this._requirements=e||[],this.showRequirements=this._requirements.length>0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"urlHome",{get:function(){return this._urlHome},set:function(e){this._urlHome=e,this.modalAction.action=this.navigateTo.bind(this,this.urlHome)},enumerable:!0,configurable:!0}),e.propDecorators={hideCurrentPassword:[{type:t.Input,args:["t-hide-current-password"]}],logo:[{type:t.Input,args:["t-logo"]}],recovery:[{type:t.Input,args:["t-recovery"]}],requirements:[{type:t.Input,args:["t-requirements"]}],secondaryLogo:[{type:t.Input,args:["t-secondary-logo"]}],token:[{type:t.Input,args:["t-token"]}],urlBack:[{type:t.Input,args:["t-url-back"]}],urlNewPassword:[{type:t.Input,args:["t-url-new-password"]}],urlHome:[{type:t.Input,args:["t-url-home"]}],submit:[{type:t.Output,args:["t-submit"]}]},e}(),Y={en:{backButton:"Back",confirmPassword:"Confirm password",createNewPassword:"Create new password",createNewPasswordPhrase:"Protect your account with a personal password created by you",currentPassword:"Current password",enterSystemButton:"Enter the system",forgotPassword:"Forgot your password?",newPassword:"New password",passwordSuccessfullyCreated:"Password successfully created!",passwordSuccessfullyUpdated:"Password successfully updated!",requirements:"Password requirements",safetyTips:"Safety tips!",safetyTipsFirst:"is used in other accounts;",safetyTipsPhrase:"Avoid a password that:",safetyTipsSecond:"has personal information like your name, nickname or family names;",safetyTipsThird:'that uses obvious sequences like "123" or obvious words like "password";',saveButton:"Save"},es:{backButton:"Volver",confirmPassword:"Confirmar seña",createNewPassword:"Crear nueva contraseña",createNewPasswordPhrase:"Proteger su cuenta con una contraseña personal creada por usted",currentPassword:"Contraseña actual",enterSystemButton:"Entrar en el sistema",forgotPassword:"¿Olvidaste tu contraseña?",newPassword:"Nueva contraseña",passwordSuccessfullyCreated:"Contraseña creada correctamente!",passwordSuccessfullyUpdated:"Contraseña correctamente actualizada!",requirements:"Requisitos de contraseña",safetyTips:"Consejos de seguridad!",safetyTipsFirst:"se utilice en otras cuentas;",safetyTipsPhrase:"Evite una contraseña que:",safetyTipsSecond:"utiliza información personal como su nombre, apellido o nombre de familia;",safetyTipsThird:'utilice secuencias muy obvias como "1234" o "abcd" o palabras obvias como "contraseña";',saveButton:"Guardar"},pt:{backButton:"Voltar",confirmPassword:"Confirmar senha",createNewPassword:"Criar nova senha",createNewPasswordPhrase:"Proteja sua conta com uma senha pessoal criada por você",currentPassword:"Senha atual",enterSystemButton:"Entrar no sistema",forgotPassword:"Esqueceu sua senha?",newPassword:"Nova senha",passwordSuccessfullyCreated:"Senha criada com sucesso!",passwordSuccessfullyUpdated:"Senha alterada com sucesso!",requirements:"Requisitos de senha",safetyTips:"Dicas de segurança!",safetyTipsFirst:"seja usada em outras contas;",safetyTipsPhrase:"Evite uma senha que:",safetyTipsSecond:"usa informações pessoais como seu nome, apelido ou nome de familiares;",safetyTipsThird:'use sequências muito óbvias como "1234" ou "abcd" ou palavras óbvias como “senha”;',saveButton:"Salvar"}},$=function(){function e(e){this.http=e}return e.prototype.post=function(e,t){return this.http.post(e,t,{observe:"response"})},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:s.HttpClient}]},e}(),Q=function(e){function o(t,o,n,r,i,s){var a=e.call(this)||this;return a.activatedRoute=t,a.route=o,a.router=n,a.service=r,a.thfComponentInjector=i,a.literals=u({},Y[m],Y[g()]),a.componentRef=null,a.modalAction={action:a.navigateTo.bind(a,a.urlHome),label:a.literals.enterSystemButton},a.parentRef=s._view.component,a}return l(o,e),o.prototype.ngAfterViewInit=function(){this.urlNewPassword&&this.subscribeToTokenParameter()},o.prototype.ngOnDestroy=function(){this.newPasswordSubscription&&this.newPasswordSubscription.unsubscribe()},o.prototype.ngOnInit=function(){this.checkingForRouteMetadata(this.activatedRoute.snapshot.data)},o.prototype.navigateTo=function(e){P(e)?window.open(e):this.router.navigate([e||"/"])},o.prototype.onForgotPasswordClick=function(e){b(e,"function")?e():this.createModalPasswordRecoveryComponent(e)},o.prototype.onLoginSubmit=function(){var e=this.getLoginForm();this.urlNewPassword?this.postUrlNewPassword(e):this.submit&&this.submit.observers.length&&this.emitSubmit(e)},o.prototype.openConfirmation=function(){this.modal.open()},o.prototype.validatePassword=function(){var e=this,t=this.passwordForm.form.controls,o=t.confirmPassword,n=t.newPassword;this.newPassword?this.confirmPassword?this.newPassword&&this.confirmPassword&&this.newPassword!==this.confirmPassword?this.setFormErrors({equalPassword:!0},[n,o]):this.setFormErrors(null,[o,n]):this.setFormErrors({required:!0},[o]):this.setFormErrors({required:!0},[n]),this.requirements.length&&this.requirements.find(function(t){return!1===e.validateRequirement(t)})&&this.setFormErrors({requirement:!0},[n])},o.prototype.validateRequirement=function(e){return"function"==typeof e.status?e.status.call(this.parentRef,this.newPassword):e.status},o.prototype.checkingForMetadataProperty=function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]},o.prototype.checkingForRouteMetadata=function(e){0!==Object.keys(e).length&&(this.urlNewPassword=this.checkingForMetadataProperty(e,"serviceApi")||this.urlNewPassword,this.recovery=this.checkingForMetadataProperty(e,"recovery")||this.recovery,this.hideCurrentPassword=this.checkingForMetadataProperty(e,"hideCurrentPassword")||this.hideCurrentPassword)},o.prototype.createModalPasswordRecoveryComponent=function(e){var t=this;this.componentRef&&this.thfComponentInjector.destroyComponentInApplication(this.componentRef),this.componentRef=this.thfComponentInjector.createComponentInApplication(D),this.componentRef.instance.recovery=e.url,this.componentRef.instance.contactEmail=e.contactMail,this.componentRef.instance.phoneMask=e.phoneMask,this.componentRef.instance.type=e.type||C.Email,this.componentRef.changeDetectorRef.detectChanges(),setTimeout(function(){t.componentRef.instance.open()})},o.prototype.emitSubmit=function(e){this.submit.emit(e)},o.prototype.getLoginForm=function(){return{currentPassword:this.currentPassword,newPassword:this.newPassword}},o.prototype.postUrlNewPassword=function(e){var t=this;e.token=this.token,this.service.post(this.urlNewPassword,e).subscribe(function(e){204===e.status&&t.openConfirmation()})},o.prototype.setFormErrors=function(e,t){t.forEach(function(t){t.setErrors(e)})},o.prototype.subscribeToTokenParameter=function(){var e=this;this.route.queryParams.subscribe(function(t){var o=t.token;o&&(e.token=o)})},o.decorators=[{type:t.Component,args:[{selector:"thf-page-change-password",template:'<div class="thf-page-change-password-wrapper" #pageChangePassword>\n  <div class="thf-page-change-password-container">\n    <thf-page-background class="thf-page-change-password"\n      [t-logo]="logo"\n      [t-secondary-logo]="secondaryLogo">\n\n      <div class="thf-page-blocked-user-header thf-row">\n        <div class="thf-md-12">{{literals.createNewPassword}}</div>\n        <div class="thf-md-12 thf-text-center thf-font-text">\n          {{literals.createNewPasswordPhrase}}\n        </div>\n      </div>\n\n      <form #passwordForm="ngForm">\n\n        <div class="thf-row thf-mt-3 thf-mt-sm-1">\n          <div class="thf-md-6"\n            [ngClass]="{\'thf-offset-md-3 thf-offset-lg-3 thf-offset-xl-3\': !showRequirements}">\n            <div *ngIf="!hideCurrentPassword">\n              <thf-password\n                name="currentPassword"\n                [(ngModel)]="currentPassword"\n                t-required\n                [t-label]="literals.currentPassword">\n              </thf-password>\n            </div>\n            <div *ngIf="!hideCurrentPassword && recovery" class="thf-text-center thf-mb-sm-1 thf-mb-2">\n              <a *ngIf="recoveryUrlType === \'internalLink\'"\n                class="thf-font-text-bold thf-page-change-password-forgot-password"\n                [routerLink]="recovery">\n                {{literals.forgotPassword}}\n              </a>\n              <a *ngIf="recoveryUrlType === \'externalLink\'"\n                class="thf-font-text-bold thf-page-change-password-forgot-password"\n                [href]="recovery">\n                {{literals.forgotPassword}}\n              </a>\n              <a *ngIf="!recoveryUrlType"\n                class="thf-font-text-bold thf-page-change-password-forgot-password thf-clickable"\n                (click)="onForgotPasswordClick(recovery)">\n                {{literals.forgotPassword}}\n              </a>\n            </div>\n            <div>\n              <thf-password\n                name="newPassword"\n                [(ngModel)]="newPassword"\n                t-required\n                [t-label]="literals.newPassword"\n                (t-change-model)="validatePassword()">\n              </thf-password>\n            </div>\n            <div>\n              <thf-password\n                name="confirmPassword"\n                [(ngModel)]="confirmPassword"\n                t-required\n                [t-label]="literals.confirmPassword"\n                (t-change-model)="validatePassword()">\n              </thf-password>\n            </div>\n          </div>\n          <div *ngIf="showRequirements"\n            class="thf-md-6 thf-page-change-password-required-container">\n            <thf-container>\n              <ul class="thf-page-change-password-required-list">\n                <li class="thf-page-change-password-required-item">\n                  <p class="thf-mb-1 thf-font-text-bold thf-page-change-password-required-title">\n                    {{literals?.requirements}}\n                  </p>\n                </li>\n                <li *ngFor="let requirement of requirements"\n                  class="thf-page-change-password-required-item">\n                  <span class="thf-icon thf-page-change-password-required-icon"\n                    [ngClass]="validateRequirement(requirement) ? \'thf-icon-ok thf-page-change-password-required-ok\' : \'thf-icon-minus thf-page-change-password-required-minus\'">\n                  </span>\n                  <p class="thf-page-change-password-required-text thf-font-text">\n                    {{requirement.requirement}}\n                  </p>\n                </li>\n              </ul>\n            </thf-container>\n          </div>\n        </div>\n      </form>\n\n      <thf-divider class="thf-sm-12"></thf-divider>\n\n      <div class="thf-page-change-password-tips thf-row">\n        <div class="thf-md-2 thf-mr-3">\n          <img\n            class="thf-page-change-password-lock-image thf-mb-3"\n            alt="Blocked user image"\n            src="./assets/images/big-lock.svg"\n          />\n        </div>\n        <div class="thf-md-9 thf-page-change-password-tips-text">\n          <div class="thf-font-text-bold thf-pb-1">{{literals.safetyTips}}</div>\n          <div class="thf-font-text-small">\n            <div class="thf-row thf-pb-1">{{literals.safetyTipsPhrase}}</div>\n            <div class="thf-row thf-pb-1">• {{literals.safetyTipsFirst}}</div>\n            <div class="thf-row thf-pb-1">• {{literals.safetyTipsSecond}}</div>\n            <div class="thf-row thf-pb-1">• {{literals.safetyTipsThird}}</div>\n          </div>\n        </div>\n      </div>\n\n      <div class="thf-page-change-password-buttons thf-row">\n\n        <thf-divider class="thf-sm-12 thf-mobile-only"></thf-divider>\n\n        <thf-button *ngIf="!hideCurrentPassword"\n          class="thf-sm-6 thf-mb-sm-1"\n          [t-label]="literals.backButton"\n          (t-click)="navigateTo(urlBack)">\n        </thf-button>\n\n        <thf-button\n          [ngClass]="hideCurrentPassword ? \'thf-md-12\':\'thf-sm-6\'"\n          t-type="primary"\n          [t-disabled]="passwordForm.invalid"\n          [t-label]="literals.saveButton"\n          (t-click)="onLoginSubmit()">\n        </thf-button>\n\n      </div>\n\n    </thf-page-background>\n\n  </div>\n</div>\n\n<thf-modal\n  [t-primary-action]="modalAction"\n  t-hide-close\n  t-size="auto"\n  [t-title]="hideCurrentPassword ? literals.passwordSuccessfullyCreated : literals.passwordSuccessfullyUpdated">\n\n  <div class="thf-text-center">\n    <img\n      alt="Blocked user image"\n      class="thf-page-change-password-lock-image thf-mb-3"\n      src="./assets/images/success.svg"\n    />\n  </div>\n</thf-modal>\n'}]}],o.ctorParameters=function(){return[{type:i.ActivatedRoute},{type:i.ActivatedRoute},{type:i.Router},{type:$},{type:r.ThfComponentInjectorService},{type:t.ViewContainerRef}]},o.propDecorators={modal:[{type:t.ViewChild,args:[r.ThfModalComponent,{"static":!0}]}],pageChangePassword:[{type:t.ViewChild,args:["pageChangePassword",{read:t.ViewContainerRef,"static":!0}]}],passwordForm:[{type:t.ViewChild,args:["passwordForm",{read:n.NgForm,"static":!0}]}]},o}(K),X=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[o.CommonModule,n.FormsModule,i.RouterModule,r.ThfModule,L],declarations:[Q],entryComponents:[D],providers:[$],exports:[Q]}]}],e}(),Z=function(){function e(e){this.http=e,this.endpoint="/",this.headers=new s.HttpHeaders({"X-TOTVS-SCREEN-LOCK":"true"})}return e.prototype.configServiceApi=function(e){void 0===e&&(e={}),this.endpoint=e.endpoint},e.prototype.getMetadata=function(e){void 0===e&&(e="list");var t=this.endpoint+"-"+e+"-metadata",o=JSON.parse(localStorage.getItem(t))||{},n=this.endpoint+"/metadata?type="+e+"&version="+(o.version||"");return this.http.get(n).pipe(a.map(function(e){return e.version===o.version?o:(localStorage.setItem(t,JSON.stringify(e)),u({},o,e))}))},e.prototype.deleteResource=function(e){return this.http["delete"](this.endpoint+"/"+e,{headers:this.headers})},e.prototype.deleteResources=function(e){return this.http.request("delete",""+this.endpoint,{headers:this.headers,body:e})},e.prototype.getResources=function(e){return void 0===e&&(e={}),this.http.get(this.endpoint,{headers:this.headers,params:e})},e.prototype.getResource=function(e){return this.http.get(this.endpoint+"/"+e,{headers:this.headers})},e.prototype.createResource=function(e){return this.http.post(""+this.endpoint,e,{headers:this.headers})},e.prototype.updateResource=function(e,t){return this.http.put(this.endpoint+"/"+e,t,{headers:this.headers})},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:s.HttpClient}]},e}(),ee={en:{pageActionEdit:"Edit",pageActionRemove:"Delete",pageActionBack:"Back",confirmRemoveTitle:"Confirm delete",confirmRemoveMessage:"Are you sure you want to delete this record? You can not undo this action.",removeNotificationSuccess:"Item deleted successfully.",registerNotFound:"Register not found."},es:{pageActionEdit:"Editar",pageActionRemove:"Borrar",pageActionBack:"Regreso",confirmRemoveTitle:"Confirmar la exclusión",confirmRemoveMessage:"¿Está seguro de que desea eliminar este registro? No puede deshacer esta acción.",removeNotificationSuccess:"Elemento eliminado con éxito.",registerNotFound:"Registro no encontrado."},pt:{pageActionEdit:"Editar",pageActionRemove:"Excluir",pageActionBack:"Voltar",confirmRemoveTitle:"Confirmar exclusão",confirmRemoveMessage:"Tem certeza de que deseja excluir esse registro? Você não poderá desfazer essa ação.",removeNotificationSuccess:"Item excluído com sucesso.",registerNotFound:"Registro não encontrado."}},te=function(){function e(e,t,o,n,r){this.router=e,this.activatedRoute=t,this.thfNotification=o,this.thfDialogService=n,this.thfPageDynamicService=r,this._actions={},this._autoRouter=!1,this._duplicates=[],this._fields=[],this._keys=[],this._pageActions=[],this.literals=u({},ee[m],ee[g()]),this.model={},this.breadcrumb={items:[]}}return Object.defineProperty(e.prototype,"actions",{set:function(e){this._actions=this.isObject(e)?e:{},this._pageActions=this.getPageActions(this._actions)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"autoRouter",{get:function(){return this._autoRouter},set:function(e){this._autoRouter=v(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fields",{get:function(){return this._fields},set:function(e){this._fields=Array.isArray(e)?h(e):[],this._keys=this.getKeysByFields(this.fields),this._duplicates=this.getDuplicatesByFields(this.fields)},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this.activatedRoute.snapshot.params.id;this.activatedRoute.snapshot.data.serviceApi?(this.serviceApi=this.activatedRoute.snapshot.data.serviceApi,this.thfPageDynamicService.configServiceApi({endpoint:this.serviceApi}),this.loadMetadata(e)):(this.thfPageDynamicService.configServiceApi({endpoint:this.serviceApi}),this.loadData(e))},Object.defineProperty(e.prototype,"duplicates",{get:function(){return h(this._duplicates)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"keys",{get:function(){return h(this._keys)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pageActions",{get:function(){return h(this._pageActions)},enumerable:!0,configurable:!0}),e.prototype.confirmRemove=function(e){var t={title:this.literals.confirmRemoveTitle,message:this.literals.confirmRemoveMessage,confirm:this.remove.bind(this,e)};this.thfDialogService.confirm(t)},e.prototype.formatUniqueKey=function(e){return k(w(e,this.keys)).join("|")},e.prototype.goBack=function(){window.history.back()},e.prototype.loadData=function(e){var t=this;this.thfPageDynamicService.getResource(e).toPromise().then(function(e){t.model=e})["catch"](function(){t.model=undefined,t.actions=undefined})},e.prototype.loadMetadata=function(e){var t=this;this.thfPageDynamicService.getMetadata("detail").toPromise().then(function(o){t.autoRouter=o.autoRouter,t.actions=o.actions||{},t.breadcrumb=o.breadcrumb||{items:[]},t.fields=o.fields||[],t.title=o.title,t.loadData(e)})},e.prototype.navigateTo=function(e,t){var o=this;void 0===t&&(t=!1),this.router.navigate([e.url||e.path],{queryParams:e.params})["catch"](function(){!t&&o.autoRouter&&(o.router.config.unshift({path:e.path,component:e.component,data:{serviceApi:o.serviceApi,autoRouter:!0}}),o.navigateTo(e,!0))})},e.prototype.openEdit=function(e){var t=this.resolveUrl(this.model,e);this.navigateTo({path:e,url:t})},e.prototype.remove=function(e){var t=this,o=this.formatUniqueKey(this.model);this.thfPageDynamicService.deleteResource(o).toPromise().then(function(){t.thfNotification.success(t.literals.removeNotificationSuccess),t.navigateTo({path:e})})},e.prototype.resolveUrl=function(e,t){var o=this.formatUniqueKey(e);return t.replace(/:id/g,o)},e.prototype.getPageActions=function(e){void 0===e&&(e={});var t=[];return e.edit&&t.push({label:this.literals.pageActionEdit,action:this.openEdit.bind(this,e.edit)}),e.remove&&t.push({label:this.literals.pageActionRemove,action:this.confirmRemove.bind(this,e.remove)}),(e.back===undefined||e.back)&&t.push({label:this.literals.pageActionBack,action:this.goBack.bind(this,e.back)}),t},e.prototype.getKeysByFields=function(e){return void 0===e&&(e=[]),e.filter(function(e){return!0===e.key}).map(function(e){return e.property})},e.prototype.getDuplicatesByFields=function(e){return void 0===e&&(e=[]),e.filter(function(e){return!0===e.duplicate}).map(function(e){return e.property})},e.prototype.isObject=function(e){return!!e&&"object"==typeof e&&!Array.isArray(e)},e.decorators=[{type:t.Component,args:[{selector:"thf-page-dynamic-detail",template:'<thf-page-default\n  [t-actions]="pageActions"\n  [t-breadcrumb]="breadcrumb"\n  [t-title]="title">\n\n  <ng-container *ngIf="model; then viewFieldsTemplate; else registerNotFoundTemplate">\n  </ng-container>\n\n</thf-page-default>\n\n<ng-template #registerNotFoundTemplate>\n\n  <thf-widget>\n    <span class="thf-icon thf-icon-info"></span>\n    <span class="thf-font-text-large">\n      {{ literals.registerNotFound }}\n    </span>\n  </thf-widget>\n\n</ng-template>\n\n<ng-template #viewFieldsTemplate>\n\n  <thf-dynamic-view [t-fields]="fields" [t-value]="model">\n  </thf-dynamic-view>\n\n</ng-template>\n',providers:[Z]}]}],e.ctorParameters=function(){return[{type:i.Router},{type:i.ActivatedRoute},{type:r.ThfNotificationService},{type:r.ThfDialogService},{type:Z}]},e.propDecorators={actions:[{type:t.Input,args:["t-actions"]}],autoRouter:[{type:t.Input,args:["t-auto-router"]}],breadcrumb:[{type:t.Input,args:["t-breadcrumb"]}],fields:[{type:t.Input,args:["t-fields"]}],title:[{type:t.Input,args:["t-title"]}],serviceApi:[{type:t.Input,args:["t-service-api"]}]},e}(),oe=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[o.CommonModule,n.FormsModule,i.RouterModule,r.ThfDynamicModule,r.ThfModalModule,r.ThfPageModule,r.ThfWidgetModule],declarations:[te],exports:[te]}]}],e}(),ne=function(){function e(e){this.http=e,this.endpoint="/",this.headers=new s.HttpHeaders({"X-TOTVS-SCREEN-LOCK":"true"})}return e.prototype.configServiceApi=function(e){void 0===e&&(e={}),this.endpoint=e.endpoint},e.prototype.getMetadata=function(e){void 0===e&&(e="list");var t=this.endpoint+"-"+e+"-metadata",o=JSON.parse(localStorage.getItem(t))||{},n=this.endpoint+"/metadata?type="+e+"&version="+(o.version||"");return this.http.get(n).pipe(a.map(function(e){return e.version===o.version?o:(localStorage.setItem(t,JSON.stringify(e)),u({},o,e))}))},e.prototype.deleteResource=function(e){return this.http["delete"](this.endpoint+"/"+e,{headers:this.headers})},e.prototype.deleteResources=function(e){return this.http.request("delete",""+this.endpoint,{headers:this.headers,body:e})},e.prototype.getResources=function(e){return void 0===e&&(e={}),this.http.get(this.endpoint,{headers:this.headers,params:e})},e.prototype.getResource=function(e){return this.http.get(this.endpoint+"/"+e,{headers:this.headers})},e.prototype.createResource=function(e){return this.http.post(""+this.endpoint,e,{headers:this.headers})},e.prototype.updateResource=function(e,t){return this.http.put(this.endpoint+"/"+e,t,{headers:this.headers})},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:s.HttpClient}]},e}(),re={en:{cancelConfirmMessage:"Are you sure you want to cancel this operation?",detailActionNew:"New",pageActionCancel:"Cancel",pageActionSave:"Save",pageActionSaveNew:"Save and new",registerNotFound:"Register not found.",saveNewNotificationSuccessSave:"Resource successfully saved.",saveNewNotificationSuccessUpdate:"Resource successfully updated.",saveNewNotificationWarning:"Form must be filled out correctly.",saveNotificationSuccessSave:"Resource successfully saved.",saveNotificationSuccessUpdate:"Resource successfully updated.",saveNotificationWarning:"Form must be filled out correctly."},es:{cancelConfirmMessage:"Está seguro de que desea cancelar esta operación?",detailActionNew:"Nuevo",pageActionCancel:"Cancelar",pageActionSave:"Guardar",pageActionSaveNew:"Guardar y nuevo",registerNotFound:"Registro no encontrado.",saveNewNotificationSuccessSave:"Recurso salvo con éxito.",saveNewNotificationSuccessUpdate:"Recurso actualizado con éxito.",saveNewNotificationWarning:"El formulario debe llenarse correctamente.",saveNotificationSuccessSave:"Recurso salvo con éxito.",saveNotificationSuccessUpdate:"Recurso actualizado con éxito.",saveNotificationWarning:"El formulario debe llenarse correctamente."},pt:{cancelConfirmMessage:"Tem certeza que deseja cancelar esta operação?",detailActionNew:"Novo",pageActionCancel:"Cancelar",pageActionSave:"Salvar",pageActionSaveNew:"Salvar e novo",registerNotFound:"Registro não encontrado.",saveNewNotificationSuccessSave:"Recurso salvo com sucesso.",saveNewNotificationSuccessUpdate:"Recurso atualizado com sucesso.",saveNewNotificationWarning:"Formulário precisa ser preenchido corretamente.",saveNotificationSuccessSave:"Recurso salvo com sucesso.",saveNotificationSuccessUpdate:"Recurso atualizado com sucesso.",saveNotificationWarning:"Formulário precisa ser preenchido corretamente."}},ie=function(){function e(e,t,o,n,r){this.router=e,this.activatedRoute=t,this.thfNotification=o,this.thfDialogService=n,this.thfPageDynamicService=r,this._actions={},this._autoRouter=!1,this._controlFields=[],this._detailFields=[],this._duplicates=[],this._fields=[],this._keys=[],this._pageActions=[],this.literals=u({},re[m],re[g()]),this.model={},this.detailActions={},this.breadcrumb={items:[]}}return Object.defineProperty(e.prototype,"actions",{set:function(e){this._actions=this.isObject(e)?e:{},this._pageActions=this.getPageActions(this._actions)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"autoRouter",{get:function(){return this._autoRouter},set:function(e){this._autoRouter=v(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fields",{get:function(){return this._fields},set:function(e){this._fields=Array.isArray(e)?h(e):[],this._keys=this.getKeysByFields(this._fields),this._duplicates=this.getDuplicatesByFields(this._fields),this._controlFields=this.getControlFields(this._fields),this._detailFields=this.getDetailFields(this._fields)},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){var e=this.activatedRoute.snapshot.params.id,t=this.activatedRoute.snapshot.queryParams.duplicate;this.activatedRoute.snapshot.data.serviceApi?(this.serviceApi=this.activatedRoute.snapshot.data.serviceApi,this.thfPageDynamicService.configServiceApi({endpoint:this.serviceApi}),this.loadMetadata(e,t)):(this.thfPageDynamicService.configServiceApi({endpoint:this.serviceApi}),this.loadData(e,t))},Object.defineProperty(e.prototype,"duplicates",{get:function(){return h(this._duplicates)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"keys",{get:function(){return h(this._keys)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pageActions",{get:function(){return h(this._pageActions)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"controlFields",{get:function(){return this._controlFields},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"detailFields",{get:function(){return this._detailFields},enumerable:!0,configurable:!0}),e.prototype.cancel=function(e){this.dynamicForm&&this.dynamicForm.form.dirty?this.thfDialogService.confirm({message:this.literals.cancelConfirmMessage,title:this.literals.pageActionCancel,confirm:this.goBack.bind(this,e)}):this.goBack(e)},e.prototype.formatUniqueKey=function(e){return k(w(e,this.keys)).join("|")},e.prototype.goBack=function(e){e?this.router.navigate([e]):window.history.back()},e.prototype.loadData=function(e,t){var o=this;if(e)this.thfPageDynamicService.getResource(e).toPromise().then(function(e){o.model=e})["catch"](function(){o.model=undefined,o.actions=undefined,o._pageActions=[]});else try{this.model=JSON.parse(t)||{}}catch(n){this.model={}}},e.prototype.loadMetadata=function(e,t){var o=this,n=e?"edit":"create";this.thfPageDynamicService.getMetadata(n).toPromise().then(function(n){o.autoRouter=n.autoRouter,o.actions=n.actions||{},o.breadcrumb=n.breadcrumb||{items:[]},o.fields=n.fields||[],o.title=n.title,o.loadData(e,t)})},e.prototype.navigateTo=function(e){if(e){var t=this.resolveUrl(this.model,e);this.router.navigate([t])}else window.history.back()},e.prototype.detailActionNew=function(){this.gridDetail.insertRow()},e.prototype.resolveUrl=function(e,t){var o=this.formatUniqueKey(e);return t.replace(/:id/g,o)},e.prototype.save=function(e){var t=this;if(this.dynamicForm.form.invalid)this.thfNotification.warning(this.literals.saveNotificationWarning);else{var o=this.activatedRoute.snapshot.params.id,n=o?this.thfPageDynamicService.updateResource(o,this.model):this.thfPageDynamicService.createResource(this.model),r=o?this.literals.saveNotificationSuccessUpdate:this.literals.saveNotificationSuccessSave;n.toPromise().then(function(){t.thfNotification.success(r),t.navigateTo(e)})}},e.prototype.saveNew=function(e){var t=this;if(this.dynamicForm.form.invalid)this.thfNotification.warning(this.literals.saveNewNotificationWarning);else{var o=this.activatedRoute.snapshot.params.id;o?this.thfPageDynamicService.updateResource(o,this.model).toPromise().then(function(){t.thfNotification.success(t.literals.saveNewNotificationSuccessUpdate),t.navigateTo(e)}):this.thfPageDynamicService.createResource(this.model).toPromise().then(function(){t.thfNotification.success(t.literals.saveNewNotificationSuccessSave),t.model={},t.dynamicForm.form.reset()})}},e.prototype.getKeysByFields=function(e){return void 0===e&&(e=[]),e.filter(function(e){return!0===e.key}).map(function(e){return e.property})},e.prototype.getControlFields=function(e){return void 0===e&&(e=[]),e.filter(function(e){return"detail"!==e.type})},e.prototype.getDetailFields=function(e){return void 0===e&&(e=[]),e.filter(function(e){return"detail"===e.type})},e.prototype.getDuplicatesByFields=function(e){return void 0===e&&(e=[]),e.filter(function(e){return!0===e.duplicate}).map(function(e){return e.property})},e.prototype.getPageActions=function(e){void 0===e&&(e={});var t=[{label:this.literals.pageActionSave,action:this.save.bind(this,e.save)}];return e.saveNew&&t.push({label:this.literals.pageActionSaveNew,action:this.saveNew.bind(this,e.saveNew)}),(e.cancel===undefined||e.cancel)&&t.push({label:this.literals.pageActionCancel,action:this.cancel.bind(this,e.cancel)}),t},e.prototype.isObject=function(e){return!!e&&"object"==typeof e&&!Array.isArray(e)},e.decorators=[{type:t.Component,args:[{selector:"thf-page-dynamic-edit",template:'<thf-page-default\n  [t-actions]="pageActions"\n  [t-breadcrumb]="breadcrumb"\n  [t-title]="title">\n\n  <ng-container *ngIf="model; then formFieldsTemplate; else registerNotFoundTemplate">\n  </ng-container>\n\n</thf-page-default>\n\n<ng-template #registerNotFoundTemplate>\n\n  <thf-widget>\n    <span class="thf-icon thf-icon-info"></span>\n    <span class="thf-font-text-large">\n      {{ literals.registerNotFound }}\n    </span>\n  </thf-widget>\n\n</ng-template>\n\n<ng-template #formFieldsTemplate>\n\n  <thf-dynamic-form #dynamicForm [t-fields]="controlFields" [t-value]="model">\n  </thf-dynamic-form>\n\n  <div *ngIf="detailFields.length > 0" class="thf-sm-12">\n    <thf-divider [t-label]="detailFields[0].divider"></thf-divider>\n\n    <div class="thf-row thf-mb-2">\n      <thf-button [t-label]="literals.detailActionNew" (t-click)="detailActionNew()" t-small></thf-button>\n    </div>\n\n    <thf-grid #gridDetail\n      [t-row-actions]="detailActions"\n      [t-columns]="detailFields[0].detail.columns"\n      [t-data]="model[detailFields[0].property]">\n    </thf-grid>\n  </div>\n\n</ng-template>\n',providers:[ne]}]}],e.ctorParameters=function(){return[{type:i.Router},{type:i.ActivatedRoute},{type:r.ThfNotificationService},{type:r.ThfDialogService},{type:ne}]},e.propDecorators={actions:[{type:t.Input,args:["t-actions"]}],autoRouter:[{type:t.Input,args:["t-auto-router"]}],breadcrumb:[{type:t.Input,args:["t-breadcrumb"]}],fields:[{type:t.Input,args:["t-fields"]}],serviceApi:[{type:t.Input,args:["t-service-api"]}],title:[{type:t.Input,args:["t-title"]}],dynamicForm:[{type:t.ViewChild,args:["dynamicForm",{"static":!0}]}],gridDetail:[{type:t.ViewChild,args:["gridDetail",{"static":!0}]}]},e}(),se=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[o.CommonModule,n.FormsModule,i.RouterModule,r.ThfButtonModule,r.ThfDividerModule,r.ThfDynamicModule,r.ThfGridModule,r.ThfPageModule,r.ThfWidgetModule],declarations:[ie],exports:[ie]}]}],e}(),ae={en:{title:"Advanced search",primaryActionLabel:"Apply filters",secondaryActionLabel:"Cancel"},es:{title:"Búsqueda avanzada",primaryActionLabel:"Aplicar filtros",secondaryActionLabel:"Cancelar"},pt:{title:"Busca avançada",primaryActionLabel:"Aplicar filtros",secondaryActionLabel:"Cancelar"}},ce=function(){function e(){this._filters=[],this.literals=u({},ae[m],ae[g()]),this.searchEvent=new t.EventEmitter}return Object.defineProperty(e.prototype,"filters",{get:function(){return this._filters},set:function(e){this._filters=Array.isArray(e)?h(e):[]},enumerable:!0,configurable:!0}),e.propDecorators={filters:[{type:t.Input,args:["t-filters"]}],searchEvent:[{type:t.Output,args:["t-search-event"]}]},e}(),le=function(e){function o(){var t=null!==e&&e.apply(this,arguments)||this;return t.filter={},t.primaryAction={action:function(){var e=t.getValuesFromForm();t.searchEvent.emit(e),t.thfModal.close()},label:t.literals.primaryActionLabel},t.secondaryAction={action:function(){t.thfModal.close()},label:t.literals.secondaryActionLabel},t}return l(o,e),o.prototype.getValuesFromForm=function(){var e=this;return Object.keys(this.filter).forEach(function(t){e.filter[t]!==undefined&&""!==e.filter[t]||delete e.filter[t]}),this.filter},o.prototype.open=function(){this.filter={},this.thfModal.open()},o.decorators=[{type:t.Component,args:[{selector:"thf-advanced-filter",template:'<thf-modal\n  t-hide-close\n  [t-primary-action]="primaryAction"\n  [t-secondary-action]="secondaryAction"\n  [t-title]="literals.title">\n\n  <thf-dynamic-form\n    [t-fields]="filters"\n    [t-value]="filter">\n  </thf-dynamic-form>\n\n</thf-modal>\n'}]}],o.propDecorators={thfModal:[{type:t.ViewChild,args:[r.ThfModalComponent,{"static":!0}]}],thfDynamicForm:[{type:t.ViewChild,args:[r.ThfDynamicFormComponent,{"static":!0}]}]},o}(ce),ue={en:{disclaimerGroupTitle:"Displaying results filtered by:",filterSettingsPlaceholder:"Search",quickSearchLabel:"Quick search:"},es:{disclaimerGroupTitle:"Presentando resultados filtrados por:",filterSettingsPlaceholder:"Buscar",quickSearchLabel:"Búsqueda rápida:"},pt:{disclaimerGroupTitle:"Apresentando resultados filtrados por:",filterSettingsPlaceholder:"Pesquisar",quickSearchLabel:"Pesquisa rápida:"}},de=function(){function e(){this._filters=[],this.literals=u({},ue[m],ue[g()]),this.actions=[],this.breadcrumb={items:[]},this.advancedSearch=new t.EventEmitter,this.changeDisclaimers=new t.EventEmitter,this.quickSearch=new t.EventEmitter}return Object.defineProperty(e.prototype,"filters",{get:function(){return this._filters},set:function(e){this._filters=Array.isArray(e)?h(e):[]},enumerable:!0,configurable:!0}),e.propDecorators={actions:[{type:t.Input,args:["t-actions"]}],breadcrumb:[{type:t.Input,args:["t-breadcrumb"]}],filters:[{type:t.Input,args:["t-filters"]}],title:[{type:t.Input,args:["t-title"]}],advancedSearch:[{type:t.Output,args:["t-advanced-search"]}],changeDisclaimers:[{type:t.Output,args:["t-change-disclaimers"]}],quickSearch:[{type:t.Output,args:["t-quick-search"]}]},e}(),pe=function(e){function o(){var t=null!==e&&e.apply(this,arguments)||this;return t._disclaimerGroup={change:t.onChangeDisclaimerGroup.bind(t),disclaimers:[],title:t.literals.disclaimerGroupTitle},t._filterSettings={action:"onAction",advancedAction:"onAdvancedAction",ngModel:"quickFilter",placeholder:t.literals.filterSettingsPlaceholder},t.changeDisclaimersEnabled=!1,t}return l(o,e),Object.defineProperty(o.prototype,"disclaimerGroup",{get:function(){return Object.assign({},this._disclaimerGroup)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"filterSettings",{get:function(){return this._filterSettings.advancedAction=0===this.filters.length?undefined:"onAdvancedAction",Object.assign({},this._filterSettings)},enumerable:!0,configurable:!0}),o.prototype.onAction=function(){this.changeDisclaimersEnabled=!1,this._disclaimerGroup.disclaimers=[{property:"search",label:this.literals.quickSearchLabel+" "+this.quickFilter,value:this.quickFilter}],this.quickSearch.observers&&this.quickSearch.observers.length>0&&this.quickSearch.emit(this.quickFilter),this.quickFilter=undefined},o.prototype.onAdvancedAction=function(){this.thfAdvancedFilter.open()},o.prototype.onAdvancedSearch=function(e){this.changeDisclaimersEnabled=!1,this._disclaimerGroup.disclaimers=this.setDisclaimers(e),this.advancedSearch.emit(e)},o.prototype.formatDate=function(e){var t=parseInt(e.substr(0,4),10),o=parseInt(e.substr(5,2),10),n=parseInt(e.substr(8,2),10);return new Date(t,o-1,n).toLocaleDateString(y())},o.prototype.getFieldByProperty=function(e,t){return e.find(function(e){return e.property===t})},o.prototype.onChangeDisclaimerGroup=function(e){this.changeDisclaimersEnabled?this.changeDisclaimers.emit(e):this.changeDisclaimersEnabled=!0},o.prototype.setDisclaimers=function(e){var t=this,o=[];return Object.keys(e).forEach(function(n){var i=t.getFieldByProperty(t.filters,n),s=i.type===r.ThfDynamicFieldType.Date?t.formatDate(e[n]):e[n];o.push({label:i.label+": "+s,property:n,value:e[n]})}),o},o.decorators=[{type:t.Component,args:[{selector:"thf-page-dynamic-search",template:'<thf-page-list\n  [t-actions]="actions"\n  [t-breadcrumb]="breadcrumb"\n  [t-disclaimer-group]="disclaimerGroup"\n  [t-filter]="filterSettings"\n  [t-title]="title">\n\n  <thf-advanced-filter\n    [t-filters]="filters"\n    (t-search-event)="onAdvancedSearch($event)">\n  </thf-advanced-filter>\n\n  <ng-content></ng-content>\n\n</thf-page-list>\n'}]}],o.propDecorators={thfAdvancedFilter:[{type:t.ViewChild,args:[le,{"static":!0}]}]},o}(de),he=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[o.CommonModule,n.FormsModule,i.RouterModule,r.ThfDynamicModule,r.ThfModalModule,r.ThfPageModule],declarations:[le,pe],exports:[pe]}]}],e}(),fe=function(){function e(){this._autoRouter=!1,this._columns=[],this._duplicates=[],this._fields=[],this._filters=[],this._keys=[],this.breadcrumb={items:[]}}return Object.defineProperty(e.prototype,"autoRouter",{get:function(){return this._autoRouter},set:function(e){this._autoRouter=v(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fields",{get:function(){return this._fields},set:function(e){this._fields=Array.isArray(e)?h(e):[],this.setFieldsProperties(this.fields)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"columns",{get:function(){return h(this._columns)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"duplicates",{get:function(){return h(this._duplicates)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filters",{get:function(){return h(this._filters)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"keys",{get:function(){return h(this._keys)},enumerable:!0,configurable:!0}),e.prototype.setFieldsProperties=function(e){this._filters=e.filter(function(e){return!0===e.filter}),this._columns=e.filter(function(e){return e.visible===undefined||!0===e.visible}),this._keys=e.filter(function(e){return!0===e.key}).map(function(e){return e.property}),this._duplicates=e.filter(function(e){return!0===e.duplicate}).map(function(e){return e.property})},e.propDecorators={autoRouter:[{type:t.Input,args:["t-auto-router"]}],breadcrumb:[{type:t.Input,args:["t-breadcrumb"]}],fields:[{type:t.Input,args:["t-fields"]}],serviceApi:[{type:t.Input,args:["t-service-api"]}],title:[{type:t.Input,args:["t-title"]}]},e}(),me=function(){function e(e){this.http=e,this.endpoint="/",this.headers=new s.HttpHeaders({"X-TOTVS-SCREEN-LOCK":"true"})}return e.prototype.configServiceApi=function(e){void 0===e&&(e={}),this.endpoint=e.endpoint},e.prototype.getMetadata=function(e){void 0===e&&(e="list");var t=this.endpoint+"-"+e+"-metadata",o=JSON.parse(localStorage.getItem(t))||{},n=this.endpoint+"/metadata?type="+e+"&version="+(o.version||"");return this.http.get(n).pipe(a.map(function(e){return e.version===o.version?o:(localStorage.setItem(t,JSON.stringify(e)),u({},o,e))}))},e.prototype.deleteResource=function(e){return this.http["delete"](this.endpoint+"/"+e,{headers:this.headers})},e.prototype.deleteResources=function(e){return this.http.request("delete",""+this.endpoint,{headers:this.headers,body:e})},e.prototype.getResources=function(e){return void 0===e&&(e={}),this.http.get(this.endpoint,{headers:this.headers,params:e})},e.prototype.getResource=function(e){return this.http.get(this.endpoint+"/"+e,{headers:this.headers})},e.prototype.createResource=function(e){return this.http.post(""+this.endpoint,e,{headers:this.headers})},e.prototype.updateResource=function(e,t){return this.http.put(this.endpoint+"/"+e,t,{headers:this.headers})},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:s.HttpClient}]},e}(),ge={en:{pageAction:"New",pageActionRemoveAll:"Delete",tableActionView:"View",tableActionEdit:"Edit",tableActionDuplicate:"Duplicate",tableActionDelete:"Delete",confirmRemoveTitle:"Confirm delete",confirmRemoveMessage:"Are you sure you want to delete this record? You can not undo this action.",confirmRemoveAllTitle:"Confirm batch deletion",confirmRemoveAllMessage:"Are you sure you want to delete all these records? You can not undo this action.",loadDataErrorNotification:"Service not found",removeSuccessNotification:"Item deleted successfully",removeAllSuccessNotification:"Items deleted successfully"},es:{pageAction:"Nuevo",pageActionRemoveAll:"Borrar",tableActionView:"Visualizar",tableActionEdit:"Editar",tableActionDuplicate:"Duplicar",tableActionDelete:"Borrar",confirmRemoveTitle:"Confirmar la exclusión",confirmRemoveMessage:"¿Está seguro de que desea eliminar este registro? No puede deshacer esta acción.",confirmRemoveAllTitle:"Confirmar la exclusión por lotes",confirmRemoveAllMessage:"¿Está seguro de que desea eliminar todos estos registros? No puede deshacer esta acción.",loadDataErrorNotification:"Servicio no informado.",removeSuccessNotification:"Elemento eliminado con éxito",removeAllSuccessNotification:"Elementos eliminados con éxito"},pt:{pageAction:"Novo",pageActionRemoveAll:"Excluir",tableActionView:"Visualizar",tableActionEdit:"Editar",tableActionDuplicate:"Duplicar",tableActionDelete:"Excluir",confirmRemoveTitle:"Confirmar exclusão",confirmRemoveMessage:"Tem certeza de que deseja excluir esse registro? Você não poderá desfazer essa ação.",confirmRemoveAllTitle:"Confirmar exclusão em lote",confirmRemoveAllMessage:"Tem certeza de que deseja excluir todos esses registros? Você não poderá desfazer essa ação.",loadDataErrorNotification:"Serviço não informado.",removeSuccessNotification:"Item excluido com sucesso",removeAllSuccessNotification:"Items excluidos com sucesso"}},ye=function(e){function o(t,o,n,r,i){var s=e.call(this)||this;return s.router=t,s.activatedRoute=o,s.thfDialogService=n,s.thfNotification=r,s.thfPageDynamicService=i,s._actions={},s._pageActions=[],s._tableActions=[],s.page=1,s.params={},s.hasNext=!1,s.items=[],s.literals=u({},ge[m],ge[g()]),s}return l(o,e),Object.defineProperty(o.prototype,"actions",{get:function(){return this._actions},set:function(e){this._actions=e&&"object"==typeof e&&Object.keys(e).length>0?e:{},this.setPageActions(this.actions),this.setRemoveAllAction(),this.setTableActions(this.actions)},enumerable:!0,configurable:!0}),o.prototype.ngOnInit=function(){this.activatedRoute.snapshot.data.serviceApi?(this.serviceApi=this.activatedRoute.snapshot.data.serviceApi,this.thfPageDynamicService.configServiceApi({endpoint:this.serviceApi}),this.loadMetadata()):(this.thfPageDynamicService.configServiceApi({endpoint:this.serviceApi}),this.loadData())},o.prototype.onAdvancedSearch=function(e){this.loadData(u({page:1},e)),this.params=e},o.prototype.onChangeDisclaimers=function(e){var t={};e.forEach(function(e){t[e.property]=e.value}),this.onAdvancedSearch(t)},o.prototype.onQuickSearch=function(e){this.loadData(e?{page:1,search:e}:undefined),this.params=e?{search:e}:{}},o.prototype.showMore=function(){this.loadData(u({page:++this.page},this.params))},Object.defineProperty(o.prototype,"hasActionRemoveAll",{get:function(){return!!this.actions.removeAll},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"pageActions",{get:function(){return h(this._pageActions)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"tableActions",{get:function(){return this._tableActions},enumerable:!0,configurable:!0}),o.prototype.confirmRemove=function(e){var t={title:this.literals.confirmRemoveTitle,message:this.literals.confirmRemoveMessage,confirm:this.remove.bind(this,e)};this.thfDialogService.confirm(t)},o.prototype.confirmRemoveAll=function(){var e={title:this.literals.confirmRemoveAllTitle,message:this.literals.confirmRemoveAllMessage,confirm:this.removeAll.bind(this)};this.thfDialogService.confirm(e)},o.prototype.formatUniqueKey=function(e){return k(w(e,this.keys)).join("|")},o.prototype.loadData=function(e){var t=this;if(void 0===e&&(e={}),this.serviceApi){var o=u({},{page:1,pageSize:10},e);this.thfPageDynamicService.getResources(o).toPromise().then(function(e){t.items=1===o.page?e.items:h(t.items,e.items),t.page=o.page,t.hasNext=e.hasNext})}else this.thfNotification.error(this.literals.loadDataErrorNotification)},o.prototype.loadMetadata=function(){var e=this;this.thfPageDynamicService.getMetadata().toPromise().then(function(t){e.autoRouter=t.autoRouter,e.actions=t.actions||{},e.breadcrumb=t.breadcrumb||{items:[]},e.fields=t.fields||[],e.title=t.title,e.loadData()})},o.prototype.navigateTo=function(e,t){var o=this;void 0===t&&(t=!1),this.router.navigate([e.url||e.path],{queryParams:e.params})["catch"](function(){!t&&o.autoRouter&&(o.router.config.unshift({path:e.path,component:e.component,data:{serviceApi:o.serviceApi,autoRouter:!0}}),o.navigateTo(e,!0))})},o.prototype.openDetail=function(e,t){var o=this.resolveUrl(t,e);this.navigateTo({path:e,url:o,component:te})},o.prototype.openDuplicate=function(e,t){var o=w(t,this.duplicates);this.navigateTo({path:e,params:{duplicate:JSON.stringify(o)}})},o.prototype.openEdit=function(e,t){var o=this.resolveUrl(t,e);this.navigateTo({path:e,url:o})},o.prototype.openNew=function(e){this.navigateTo({path:e})},o.prototype.remove=function(e){var t=this,o=this.formatUniqueKey(e);this.thfPageDynamicService.deleteResource(o).toPromise().then(function(){t.removeLocalItems([e]),t.thfNotification.success(t.literals.removeSuccessNotification)})},o.prototype.removeAll=function(){var e=this,t=this.items.filter(function(e){return e.$selected});if(0!==t.length){var o,n,r=(o=t,n=this.keys,void 0===o&&(o=[]),void 0===n&&(n=[]),o.map(function(e){return w(e,n)}));this.thfPageDynamicService.deleteResources(r).toPromise().then(function(){e.removeLocalItems(t),e.thfNotification.success(e.literals.removeAllSuccessNotification)})}},o.prototype.removeLocalItems=function(e){var t=this;void 0===e&&(e=[]),e.forEach(function(e){var o=t.items.indexOf(e);t.items.splice(o,1)})},o.prototype.resolveUrl=function(e,t){var o=this.formatUniqueKey(e);return t.replace(/:id/g,o)},o.prototype.setPageActions=function(e){e&&(this._pageActions=[{label:this.literals.pageAction,action:this.openNew.bind(this,e["new"]),disabled:!this._actions["new"]}])},o.prototype.setRemoveAllAction=function(){this._actions.removeAll&&this._pageActions.push({label:this.literals.pageActionRemoveAll,action:this.confirmRemoveAll.bind(this),disabled:!this._actions.removeAll})},o.prototype.setTableActions=function(e){e&&(this._tableActions=[{action:this.openDetail.bind(this,e.detail),label:this.literals.tableActionView,visible:!!this._actions.detail},{action:this.openEdit.bind(this,e.edit),label:this.literals.tableActionEdit,visible:!!this._actions.edit},{action:this.openDuplicate.bind(this,e.duplicate),label:this.literals.tableActionDuplicate,visible:!!this._actions.duplicate},{action:this.confirmRemove.bind(this),label:this.literals.tableActionDelete,separator:!0,type:"danger",visible:!!this._actions.remove}])},o.decorators=[{type:t.Component,args:[{selector:"thf-page-dynamic-table",template:'<thf-page-dynamic-search\n  [t-actions]="pageActions"\n  [t-breadcrumb]="breadcrumb"\n  [t-filters]="filters"\n  [t-title]="title"\n  (t-advanced-search)="onAdvancedSearch($event)"\n  (t-change-disclaimers)="onChangeDisclaimers($event)"\n  (t-quick-search)="onQuickSearch($event)">\n\n  <thf-table\n    t-sort="true"\n    [t-actions]="tableActions"\n    [t-checkbox]="hasActionRemoveAll"\n    [t-columns]="columns"\n    [t-items]="items"\n    [t-show-more-disabled]="!hasNext"\n    (t-show-more)="showMore()">\n  </thf-table>\n\n</thf-page-dynamic-search>\n',providers:[me]}]}],o.ctorParameters=function(){return[{type:i.Router},{type:i.ActivatedRoute},{type:r.ThfDialogService},{type:r.ThfNotificationService},{type:me}]},o.propDecorators={actions:[{type:t.Input,args:["t-actions"]}]},o}(fe),ve=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[o.CommonModule,n.FormsModule,i.RouterModule,r.ThfTableModule,he],declarations:[ye],exports:[ye]}]}],e}(),be=function(){function e(){this.periodicity="single",this.firstExecution=new Date,this.firstExecutionHour=this.getCurrentHour(this.firstExecution),this.recurrent=!0}return e.prototype.getCurrentHour=function(e){return(e.getHours()<10?"0"+e.getHours():e.getHours())+":"+(e.getMinutes()<10?"0"+e.getMinutes():e.getMinutes())},e}(),Pe=function(){function e(e){this.thfPageJobSchedulerService=e,this.breadcrumb={items:[]},this.model=new be}return e.prototype.loadData=function(e){var t=this;e?this.thfPageJobSchedulerService.getResource(e).toPromise().then(function(e){t.model=e})["catch"](function(){t.model=new be}):this.model=new be},e.prototype.markAsDirtyInvalidControls=function(e){for(var t in e)if(e.hasOwnProperty(t)){var o=e[t];o.invalid&&o.markAsDirty()}},e.propDecorators={breadcrumb:[{type:t.Input,args:["t-breadcrumb"]}],serviceApi:[{type:t.Input,args:["t-service-api"]}],title:[{type:t.Input,args:["t-title"]}]},e}(),we={en:{at:"at",back:"Back",next:"Next",periodicity:"Periodicity",execution:"Execution",process:"Process",enterProcess:"Enter a process",recurrent:"Recurrent",single:"Single",daily:"Daily",weekly:"Weekly",monthly:"Monthly",scheduling:"Scheduling",parameterization:"Parameterization",conclude:"Conclude",firstExecution:"First Execution",hour:"Hour",day:"Day",weekDays:"Week days",sunday:"Sunday",monday:"Monday",tuesday:"Tuesday",wednesday:"Wednesday",thursday:"Thursday",friday:"Friday",saturday:"Saturday",parameters:"Parameters",yes:"Yes",no:"No",notReported:"Not reported",periodicityData:"Periodicity data",confirmation:"Confirmation",confirmSaveMessage:"Are you sure you want to complete this schedule?",confirmUpdateMessage:"Are you sure you want to update this schedule?",saveNotificationSuccessUpdate:"Successfully updated scheduling",saveNotificationSuccessSave:"Successfully saved scheduling",parametersNotFound:"Parameters not found."},es:{at:"a las",back:"Volver",next:"Avanzar",periodicity:"Periodicidad",execution:"Ejecución",process:"Proceso",enterProcess:"Informe un proceso",recurrent:"Recurrente",single:"Única",daily:"Diaria",weekly:"Semanal",monthly:"Mensual",scheduling:"Programación",parameterization:"Parametrización",conclude:"Completar",firstExecution:"Primera ejecución",hour:"Horario",day:"Día",weekDays:"Dias de la semana",sunday:"Domingo",monday:"Lunes",tuesday:"Martes",wednesday:"Miércoles",thursday:"Jueves",friday:"Viernes",saturday:"Sábado",parameters:"Parámetros",yes:"Sí",no:"No",notReported:"No informado",periodicityData:"Dados da periodicidade",confirmation:"Confirmación",confirmSaveMessage:"¿Está seguro de que desea completar esta programación de proceso?",confirmUpdateMessage:"¿Está seguro de que desea cambiar esta programación de proceso?",saveNotificationSuccessUpdate:"Programación de proceso actualizada con éxito.",saveNotificationSuccessSave:"Programación de proceso salvo con éxito.",parametersNotFound:"No se encontraron parámetros."},pt:{at:"às",back:"Voltar",next:"Avançar",periodicity:"Periodicidade",execution:"Execução",process:"Processo",enterProcess:"Informe um processo",recurrent:"Recorrente",single:"Única",daily:"Diária",weekly:"Semanal",monthly:"Mensal",scheduling:"Agendamento",parameterization:"Parametrização",conclude:"Concluir",firstExecution:"Primeira execução",hour:"Horário",day:"Dia",weekDays:"Dias de semana",sunday:"Domingo",monday:"Segunda-feira",tuesday:"Terça-feira",wednesday:"Quarta-feira",thursday:"Quinta-feira",friday:"Sexta-feira",saturday:"Sábado",parameters:"Parâmetros",yes:"Sim",no:"Não",notReported:"Não informado",periodicityData:"Dados da periodicidade",confirmation:"Confirmação",confirmSaveMessage:"Tem certeza que deseja concluir este agendamento de processo?",confirmUpdateMessage:"Tem certeza que deseja alterar este agendamento de processo?",saveNotificationSuccessUpdate:"Agendamento de processo atualizado com sucesso.",saveNotificationSuccessSave:"Agendamento de processo salvo com sucesso.",parametersNotFound:"Parâmetros não foram encontrados."}},ke=function(){function e(e){this.http=e,this.endpoint="/",this.headers=new s.HttpHeaders({"X-TOTVS-SCREEN-LOCK":"true"})}return e.prototype.configServiceApi=function(e){void 0===e&&(e={}),this.endpoint=e.endpoint},e.prototype.createResource=function(e){var t=this.convertToJobScheduler(e);return this.http.post(""+this.endpoint,t,{headers:this.headers})},e.prototype.getHeadProcesses=function(){return this.http.head(this.endpoint+"/processes",{headers:{"X-Totvs-No-Error":"true"}})},e.prototype.getParametersByProcess=function(e){return this.http.get(this.endpoint+"/processes/"+e+"/parameters",{headers:this.headers}).pipe(a.map(function(e){return e.items}))},e.prototype.getProcess=function(e){return this.http.get(this.endpoint+"/processes/"+e,{headers:this.headers})},e.prototype.getProcesses=function(e){return void 0===e&&(e={}),this.http.get(this.endpoint+"/processes",{params:e})},e.prototype.getResource=function(e){var t=this;return this.http.get(this.endpoint+"/"+e,{headers:this.headers}).pipe(a.map(function(e){return t.convertToJobSchedulerInternal(e)}))},e.prototype.updateResource=function(e,t){var o=this.convertToJobScheduler(t);return this.http.put(this.endpoint+"/"+e,o,{headers:this.headers})},e.prototype.convertToJobScheduler=function(e){var t=u({},e);return e.periodicity&&("single"===e.periodicity?t.recurrent=!1:Object.assign(t,this.convertToPeriodicity(e))),e.firstExecutionHour&&(t.firstExecution=this.replaceHourFirstExecution(e.firstExecution,e.firstExecutionHour)),Object.keys(this.returnValidExecutionParameter(t.executionParameter)).length||delete t.executionParameter,this.removeInvalidKeys(t),t},e.prototype.convertToJobSchedulerInternal=function(e){void 0===e&&(e={});var t=u({},e);return e.firstExecution&&(t.firstExecutionHour=this.getHourFirstExecution(e.firstExecution)),Object.assign(t,this.convertToPeriodicityInternal(e)),this.removeInvalidKeys(t,["weekly","monthly","daily"]),t},e.prototype.convertToPeriodicity=function(e){var t={},o=e.periodicity;return o&&(t[o]={},"monthly"===o?t[o].day=e.dayOfMonth?parseInt(e.dayOfMonth,10):0:"weekly"===o&&(t[o].daysOfWeek=e.daysOfWeek),t[o].hour=e.hour?parseInt(e.hour.split(":")[0],10):0,t[o].minute=e.hour?parseInt(e.hour.split(":")[1],10):0),t},e.prototype.convertToPeriodicityInternal=function(e){return void 0===e&&(e={}),e.monthly?{periodicity:"monthly",hour:S(e.monthly.hour)+":"+S(e.monthly.minute),dayOfMonth:e.monthly.day}:e.daily?{periodicity:"daily",hour:S(e.daily.hour)+":"+S(e.daily.minute)}:e.weekly?{periodicity:"weekly",hour:S(e.weekly.hour)+":"+S(e.weekly.minute),daysOfWeek:h(e.weekly.daysOfWeek)}:{periodicity:"single"}},e.prototype.getCurrentHour=function(e){return S(e.getHours())+":"+S(e.getMinutes())},e.prototype.getHourFirstExecution=function(e){return this.getCurrentHour(new Date(e))},e.prototype.removeInvalidKeys=function(e,t){var o=t||["periodicity","hour","minute","day","daysOfWeek","dayOfMonth","firstExecutionHour"];Object.keys(e).forEach(function(t){o.includes(t)&&delete e[t]})},e.prototype.replaceHourFirstExecution=function(e,t){var o=new Date(e),n=t.split(":"),r=parseInt(n[0],10),i=parseInt(n[1],10);return o.setHours(r,i),function(e,t){if(e){var o=e.getMonth()+1,n=e.getDate()<10?"0"+e.getDate():e.getDate(),r=o<10?"0"+o:o,i=function(e){return e>=1e3?e.toString():e>99&&e<1e3?"0"+e:e>9&&e<100?"00"+e:e>=0&&e<10?"000"+e:void 0}(e.getFullYear()),s=e.toString();return t?i+"-"+r+"-"+n+t:i+"-"+r+"-"+n+"T"+s.substring(16,24)+s.substring(28,31)+":"+s.substring(31,33)}return null}(o)},e.prototype.returnValidExecutionParameter=function(e){var t=u({},e);for(var o in t)t.hasOwnProperty(o)&&t[o]===undefined&&delete t[o];return t},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:s.HttpClient}]},e}(),Se=function(){function e(e){this.thfPageJobSchedulerService=e}return e.prototype.getFilteredData=function(e,t,o){var n={page:t,pageSize:o,search:e};return this.thfPageJobSchedulerService.getProcesses(n)},e.prototype.getObjectByValue=function(e){return this.thfPageJobSchedulerService.getProcess(e)},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:ke}]},e}(),Ae=function(e){function o(t,o,n,r,i,s){var a=e.call(this,s)||this;return a.thfPageDynamicLookupService=t,a.activatedRoute=o,a.thfDialogService=n,a.thfNotification=r,a.router=i,a.isEdit=!1,a.literals=u({},we[m],we[g()]),a.parameters=[],a.step=1,a.backPageAction={label:a.literals.back,action:a.nextStepOperation.bind(a,"back"),disabled:a.isDisabledBack.bind(a)},a.concludePageActions=[{label:a.literals.conclude,action:a.confirmJobScheduler.bind(a)},u({},a.backPageAction)],a.nextPageActions=[{label:a.literals.next,action:a.nextStepOperation.bind(a,"next"),disabled:a.isDisabledAdvance.bind(a)},u({},a.backPageAction)],a.jobSchedulerActions=h(a.nextPageActions),a.steps=[{label:a.literals.scheduling},{label:a.literals.parameterization},{label:a.literals.conclude}],a}return l(o,e),Object.defineProperty(o.prototype,"stepperOrientation",{get:function(){return window.innerWidth>481&&window.innerWidth<960?"horizontal":"vertical"},enumerable:!0,configurable:!0}),o.prototype.ngOnInit=function(){var e=this.activatedRoute.snapshot.params.id;this.isEdit=!!e,this.thfPageJobSchedulerService.configServiceApi({endpoint:this.serviceApi}),this.loadData(e)},o.prototype.changePageActionsBySteps=function(e,t){var o=this.steps.length;t===o?this.jobSchedulerActions=h(this.concludePageActions):e===o&&t<e&&(this.jobSchedulerActions=h(this.nextPageActions))},o.prototype.nextStep=function(e){if(e>1&&this.schedulerExecution.form.invalid)this.markAsDirtyInvalidControls(this.schedulerExecution.form.controls);else if(e>2&&this.schedulerParameters&&this.schedulerParameters.form&&this.schedulerParameters.form.invalid)this.markAsDirtyInvalidControls(this.schedulerParameters.form.controls);else{this.changePageActionsBySteps(this.step,e);var t=this.steps[this.step-1];this.step=e,t&&(t.status=r.ThfStepperStatus.Done)}},o.prototype.onChangeProcess=function(e){if(e.existAPI&&e.processId)return this.getParametersByProcess(e.processId),void(this.isEdit||(this.model.executionParameter={}))},o.prototype.confirmJobScheduler=function(){var e=this,t=this.activatedRoute.snapshot.params.id,o=t?this.literals.confirmUpdateMessage:this.literals.confirmSaveMessage;this.thfDialogService.confirm({title:this.literals.confirmation,message:o,confirm:function(){var o=Object.assign({},e.model);e.save(o,t)}})},o.prototype.emitSuccessMessage=function(e,t){return o=this,n=void 0,i=function(){return d(this,function(o){switch(o.label){case 0:return[4,t.toPromise()];case 1:return o.sent(),this.thfNotification.success(e),this.resetJobSchedulerForm(),[2]}})},new((r=void 0)||(r=Promise))(function(e,t){function s(e){try{c(i.next(e))}catch(o){t(o)}}function a(e){try{c(i["throw"](e))}catch(o){t(o)}}function c(t){t.done?e(t.value):new r(function(e){e(t.value)}).then(s,a)}c((i=i.apply(o,n||[])).next())});var o,n,r,i},o.prototype.getParametersByProcess=function(e){var t=this;this.thfPageJobSchedulerService.getParametersByProcess(e).subscribe(function(e){t.parameters=e})},o.prototype.isDisabledAdvance=function(){return!!this.schedulerExecution&&this.schedulerExecution.form.invalid},o.prototype.isDisabledBack=function(){return 1===this.step},o.prototype.nextStepOperation=function(e){var t="back"===e?this.step-1:this.step+1;this.nextStep(t)},o.prototype.resetJobSchedulerForm=function(){var e=this;this.schedulerExecution.form.reset(),setTimeout(function(){e.model=new be,e.step=1,e.steps.forEach(function(e){e.status=r.ThfStepperStatus.Default}),e.jobSchedulerActions=h(e.nextPageActions)})},o.prototype.save=function(e,t){var o=t?this.thfPageJobSchedulerService.updateResource(t,e):this.thfPageJobSchedulerService.createResource(e),n=t?this.literals.saveNotificationSuccessUpdate:this.literals.saveNotificationSuccessSave;this.emitSuccessMessage(n,o)},o.decorators=[{type:t.Component,args:[{selector:"thf-page-job-scheduler",template:'<thf-page-default\n  [t-actions]="jobSchedulerActions"\n  [t-breadcrumb]="breadcrumb"\n  [t-title]="title">\n\n  <div class="thf-row">\n\n    <thf-stepper\n      class="thf-lg-3 thf-xl-2"\n      t-sequential="true"\n      [t-orientation]="stepperOrientation"\n      [t-step]="step"\n      [t-steps]="steps"\n      (t-change-step)="nextStep($event)">\n    </thf-stepper>\n\n    <thf-container class="thf-lg-8 thf-xl-6">\n      <form #formScheduler="ngForm">\n\n        <thf-page-job-scheduler-execution [hidden]="step !== 1"\n          #schedulerExecution\n          class="thf-md-12"\n          [t-is-edit]="isEdit"\n          [t-literals]="literals"\n          [t-value]="model"\n          (t-change-process)="onChangeProcess($event)">\n        </thf-page-job-scheduler-execution>\n\n        <thf-page-job-scheduler-parameters *ngIf="step === 2"\n          #schedulerParameters\n          class="thf-md-12"\n          [t-literals]="literals"\n          [t-parameters]="parameters || []"\n          [(t-value)]="model.executionParameter">\n        </thf-page-job-scheduler-parameters>\n\n        <thf-page-job-scheduler-summary *ngIf="step === 3"\n          class="thf-md-12"\n          [t-literals]="literals"\n          [t-parameters]="parameters"\n          [t-value]="model">\n        </thf-page-job-scheduler-summary>\n      </form>\n    </thf-container>\n  </div>\n\n</thf-page-default>\n',encapsulation:t.ViewEncapsulation.None,styles:["\n    thf-container .thf-container {\n      overflow-y: unset;\n    }\n  "]}]}],o.ctorParameters=function(){return[{type:Se},{type:i.ActivatedRoute},{type:r.ThfDialogService},{type:r.ThfNotificationService},{type:i.Router},{type:ke}]},o.propDecorators={schedulerExecution:[{type:t.ViewChild,args:["schedulerExecution",{"static":!0}]}],schedulerParameters:[{type:t.ViewChild,args:["schedulerParameters",{"static":!0}]}]},o}(Pe),Ce=function(){function e(e,o){this.thfPageJobSchedulerService=e,this.thfPageJobSchedulerLookup=o,this._value={},this.dayPattern="^(3[0-1]|[0-2][0-9]|[1-9]|0[1-9])$",this.existProcessAPI=!0,this.minDateFirstExecution=new Date,this.periodicityOptions=[],this.timePattern="^(2[0-3]|[01][0-9]):?([0-5][0-9])$",this.weekDays=[],this.isEdit=!1,this.literals={},this.changeProcess=new t.EventEmitter}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){this._value=e&&b(e,"object")?e:{}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"startDateFirstExecution",{get:function(){return this.isEdit?undefined:this.minDateFirstExecution},enumerable:!0,configurable:!0}),e.prototype.ngAfterViewInit=function(){var e=this;setTimeout(function(){e.subscribeProcessIdValueChanges()})},e.prototype.ngOnInit=function(){this.periodicityTemplates={daily:this.dailyTemplate,monthly:this.monthlyTemplate,weekly:this.weeklyTempalte},this.checkExistsProcessesAPI(),this.periodicityOptions=this.getPeriodicityOptions(),this.weekDays=this.getWeekDays()},e.prototype.checkExistsProcessesAPI=function(){var e=this;this.thfPageJobSchedulerService.getHeadProcesses().subscribe(undefined,function(t){e.existProcessAPI=!1})},e.prototype.getPeriodicityOptions=function(){return[{label:this.literals.single,value:"single"},{label:this.literals.daily,value:"daily"},{label:this.literals.weekly,value:"weekly"},{label:this.literals.monthly,value:"monthly"}]},e.prototype.getWeekDays=function(){return[{label:this.literals.sunday,value:"Sunday"},{label:this.literals.monday,value:"Monday"},{label:this.literals.tuesday,value:"Tuesday"},{label:this.literals.wednesday,value:"Wednesday"},{label:this.literals.thursday,value:"Thursday"},{label:this.literals.friday,value:"Friday"},{label:this.literals.saturday,value:"Saturday"}]},e.prototype.subscribeProcessIdValueChanges=function(){var e=this;this.form.controls.processID.valueChanges.subscribe(function(t){e.changeProcess.emit({processId:t,existAPI:e.existProcessAPI})})},e.decorators=[{type:t.Component,args:[{selector:"thf-page-job-scheduler-execution",template:'<form #formExecution="ngForm">\n  <div class="thf-row">\n    <ng-container *ngIf="existProcessAPI; then lookupProcessesID; else inputProcessesID"></ng-container>\n  </div>\n\n  <div class="thf-row">\n    <thf-divider class="thf-md-12" [t-label]="literals.firstExecution"></thf-divider>\n\n    <thf-datepicker\n      class="thf-md-4"\n      name="firstExecution"\n      [(ngModel)]="value.firstExecution"\n      t-placeholder="dd/mm/aaaa"\n      t-required\n      [t-disabled]="isEdit"\n      [t-label]="literals.day"\n      [t-min-date]="startDateFirstExecution">\n    </thf-datepicker>\n\n    <thf-input\n      class="thf-md-2"\n      name="firstExecutionHour"\n      [(ngModel)]="value.firstExecutionHour"\n      t-mask="99:99"\n      t-mask-format-model\n      t-placeholder="HH:mm"\n      t-required\n      [t-disabled]="isEdit"\n      [t-label]="literals.hour"\n      [t-pattern]="timePattern">\n    </thf-input>\n\n  </div>\n\n  <hr>\n\n  <div class="thf-row">\n    <thf-radio-group\n      class="thf-sm-12"\n      name="periodicity"\n      [(ngModel)]="value.periodicity"\n      t-columns="4"\n      t-required\n      [t-label]="literals.periodicity"\n      [t-options]="periodicityOptions">\n    </thf-radio-group>\n\n    <ng-container *ngIf="value.periodicity !== \'single\'">\n      <thf-divider class="thf-md-12" [t-label]="literals.periodicityData">\n      </thf-divider>\n\n      <div class="thf-row">\n        <ng-container *ngTemplateOutlet="periodicityTemplates[value.periodicity]">\n        </ng-container>\n      </div>\n\n      <div class="thf-row">\n        <thf-switch\n          class="thf-md-3"\n          name="recurrent"\n          [(ngModel)]="value.recurrent"\n          [t-label]="literals.recurrent"\n          [t-label-off]="literals.no"\n          [t-label-on]="literals.yes">\n        </thf-switch>\n      </div>\n    </ng-container>\n  </div>\n\n  <ng-template #lookupProcessesID>\n    <thf-lookup\n      class="thf-md-12"\n      name="processID"\n      [(ngModel)]="value.processID"\n      t-field-label="description"\n      t-field-value="processID"\n      t-required\n      [t-disabled]="isEdit"\n      [t-filter-service]="thfPageJobSchedulerLookup"\n      [t-label]="literals.process"\n      [t-placeholder]="literals.enterProcess">\n    </thf-lookup>\n  </ng-template>\n\n  <ng-template #inputProcessesID>\n    <thf-input\n      class="thf-md-12"\n      name="processID"\n      [(ngModel)]="value.processID"\n      t-required\n      [t-disabled]="isEdit"\n      [t-label]="literals.process"\n      [t-placeholder]="literals.enterProcess">\n    </thf-input>\n  </ng-template>\n\n  <ng-template #dailyTemplate>\n    <ng-container *ngTemplateOutlet="inputHourTemplate">\n    </ng-container>\n  </ng-template>\n\n  <ng-template #weeklyTemplate>\n    <div class="thf-row">\n      <ng-container *ngTemplateOutlet="inputHourTemplate">\n      </ng-container>\n    </div>\n\n    <thf-checkbox-group\n      class="thf-md-12"\n      name="daysOfWeek"\n      [(ngModel)]="value.daysOfWeek"\n      t-columns="4"\n      t-required\n      [t-label]="literals.weekDays"\n      [t-options]="weekDays">\n    </thf-checkbox-group>\n  </ng-template>\n\n  <ng-template #monthlyTemplate>\n    <thf-number\n      class="thf-md-3"\n      name="dayOfMonth"\n      [(ngModel)]="value.dayOfMonth"\n      t-required\n      [t-error-pattern]="\'Dia inválido\'"\n      [t-label]="literals.day"\n      [t-max]="31"\n      [t-pattern]="dayPattern">\n    </thf-number>\n\n    <ng-container *ngTemplateOutlet="inputHourTemplate">\n    </ng-container>\n  </ng-template>\n\n  <ng-template #inputHourTemplate>\n    <thf-input\n      class="thf-md-2"\n      name="hour"\n      [(ngModel)]="value.hour"\n      t-mask="99:99"\n      t-mask-format-model\n      t-placeholder="HH:mm"\n      t-required\n      [t-label]="literals.hour"\n      [t-pattern]="timePattern">\n    </thf-input>\n  </ng-template>\n</form>\n'}]}],e.ctorParameters=function(){return[{type:ke},{type:Se}]},e.propDecorators={form:[{type:t.ViewChild,args:["formExecution",{"static":!0}]}],dailyTemplate:[{type:t.ViewChild,args:["dailyTemplate",{"static":!0}]}],monthlyTemplate:[{type:t.ViewChild,args:["monthlyTemplate",{"static":!0}]}],weeklyTempalte:[{type:t.ViewChild,args:["weeklyTemplate",{"static":!0}]}],isEdit:[{type:t.Input,args:["t-is-edit"]}],literals:[{type:t.Input,args:["t-literals"]}],value:[{type:t.Input,args:["t-value"]}],changeProcess:[{type:t.Output,args:["t-change-process"]}]},e}(),Ee=function(){function e(){this.literals={},this.parameters=[],this.valueChange=new t.EventEmitter}return e.prototype.ngAfterViewInit=function(){var e=this;this.form&&setTimeout(function(){e.form.valueChanges.subscribe(function(t){e.valueChange.emit(t)})})},e.decorators=[{type:t.Component,args:[{selector:"thf-page-job-scheduler-parameters",template:'<ng-container *ngIf="parameters && parameters.length; then formFieldsTemplate; else parametersNotFoundTemplate">\n</ng-container>\n\n<ng-template #parametersNotFoundTemplate>\n\n  <div class="thf-text-center">\n    <span class="thf-icon thf-icon-info"></span>\n    <span class="thf-font-text-large">\n      {{ literals.parametersNotFound }}\n    </span>\n  </div>\n\n</ng-template>\n\n<ng-template #formFieldsTemplate>\n  <form #parametersForm="ngForm">\n    <thf-dynamic-form\n      t-group-form\n      [t-fields]="parameters"\n      [t-value]="value">\n    </thf-dynamic-form>\n  </form>\n</ng-template>\n'}]}],e.propDecorators={form:[{type:t.ViewChild,args:["parametersForm",{"static":!0}]}],literals:[{type:t.Input,args:["t-literals"]}],parameters:[{type:t.Input,args:["t-parameters"]}],value:[{type:t.Input,args:["t-value"]}],valueChange:[{type:t.Output,args:["t-valueChange"]}]},e}(),Ie=function(){function e(e){this.datePipe=e,this.executionValue="",this.firstExecutionValue="",this.infoOrientation=r.ThfInfoOrientation.Horizontal,this.periodicityValue="",this.recurrentValue="",this.literals={},this.parameters=[],this.value={}}return e.prototype.ngOnInit=function(){var e=this.value,t=e.periodicity,o=e.hour,n=e.dayOfMonth,r=e.daysOfWeek,i=e.recurrent,s=e.firstExecution,a=e.firstExecutionHour;this.periodicityValue=this.getPeriodicityLabel(t),this.executionValue=this.getExecutionValue(t,o,r,n),this.firstExecutionValue=this.getFirstExecutionLabel(s,a),this.recurrentValue=this.getRecurrentValue(i)},e.prototype.getExecutionValue=function(e,t,o,n){switch(e){case"daily":return this.getHourLabel(t);case"monthly":return this.getMonthlyLabelExecution(n,t);case"weekly":return this.getWeeklyLabelExecution(o,t);default:return this.literals.notReported}},e.prototype.getFirstExecutionLabel=function(e,t){return e?this.datePipe.transform(e,"dd/MM/yyyy","-0200")+" "+this.getHourLabel(t):this.literals.notReported},e.prototype.getHourLabel=function(e){return this.literals.at+" "+(e||"00:00")+"h"},e.prototype.getMonthlyLabelExecution=function(e,t){var o=this.getHourLabel(t);return this.literals.day+" "+e+" "+o},e.prototype.getPeriodicityLabel=function(e){switch(e){case"daily":return this.literals.daily;case"monthly":return this.literals.monthly;case"weekly":return this.literals.weekly;default:return this.literals.single}},e.prototype.getRecurrentValue=function(e){return e?this.literals.yes:this.literals.no},e.prototype.getSorterWeekDays=function(){return{sunday:0,monday:1,tuesday:2,wednesday:3,thursday:4,friday:5,saturday:6}},e.prototype.getTranslateWeekDay=function(e){return{Sunday:this.literals.sunday,Monday:this.literals.monday,Tuesday:this.literals.tuesday,Wednesday:this.literals.wednesday,Thursday:this.literals.thursday,Friday:this.literals.friday,Saturday:this.literals.saturday}[e]||""},e.prototype.getWeekDaysLabel=function(e){var t=this;return void 0===e&&(e=[]),this.sortWeekDays(e).map(function(e){return t.getTranslateWeekDay(e)}).join(", ")},e.prototype.getWeeklyLabelExecution=function(e,t){return e&&Array.isArray(e)?this.getWeekDaysLabel(e)+" "+this.getHourLabel(t):this.literals.notReported},e.prototype.sortWeekDays=function(e){void 0===e&&(e=[]);var t=this.getSorterWeekDays();return e.sort(function(e,o){var n=e.toLowerCase(),r=o.toLowerCase();return t[n]>t[r]?1:-1})},e.decorators=[{type:t.Component,args:[{selector:"thf-page-job-scheduler-summary",template:'<div class="thf-md-12">\n  <thf-info\n    [t-label]="literals.process"\n    [t-orientation]="infoOrientation"\n    [t-value]="value.processID">\n  </thf-info>\n\n  <thf-info\n    [t-label]="literals.periodicity"\n    [t-orientation]="infoOrientation"\n    [t-value]="periodicityValue">\n  </thf-info>\n\n  <thf-info *ngIf="value.periodicity !== \'single\'"\n    [t-label]="literals.execution"\n    [t-orientation]="infoOrientation"\n    [t-value]="executionValue">\n  </thf-info>\n\n  <thf-info\n    [t-label]="literals.recurrent"\n    [t-orientation]="infoOrientation"\n    [t-value]="recurrentValue">\n  </thf-info>\n\n  <thf-info\n    [t-label]="literals.firstExecution"\n    [t-orientation]="infoOrientation"\n    [t-value]="firstExecutionValue">\n  </thf-info>\n</div>\n\n<thf-widget *ngIf="parameters && parameters.length"\n  class="thf-pt-1 thf-pb-1 thf-md-12"\n  [t-title]="literals.parameters">\n\n  <thf-dynamic-view\n    [t-fields]="parameters"\n    [t-value]="value.executionParameter">\n  </thf-dynamic-view>\n\n</thf-widget>\n\n'}]}],e.ctorParameters=function(){return[{type:o.DatePipe}]},e.propDecorators={literals:[{type:t.Input,args:["t-literals"]}],parameters:[{type:t.Input,args:["t-parameters"]}],value:[{type:t.Input,args:["t-value"]}]},e}(),Te=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{declarations:[Ae,Ce,Ee,Ie],exports:[Ae],imports:[o.CommonModule,n.FormsModule,r.ThfButtonModule,r.ThfContainerModule,r.ThfDialogModule,r.ThfDividerModule,r.ThfDynamicModule,r.ThfFieldModule,r.ThfInfoModule,r.ThfPageModule,r.ThfStepperModule,r.ThfWidgetModule],providers:[ke,Se]}]}],e}(),Me={Basic:"Basic",Bearer:"Bearer"},Re={en:{title:"Welcome",loginErrorPattern:"Invalid Login",loginHint:"Your login user was given to you at your first day.\n    If you don't have this information contact support",loginPlaceholder:"Insert your e-mail",passwordErrorPattern:"Invalid Password",passwordPlaceholder:"Insert your password",customFieldErrorPattern:"Invalid value",customFieldPlaceholder:"Please enter a value",rememberUser:"Automatic login",rememberUserHint:"You can disable this option in system configuration",submitLabel:"Enter",submittedLabel:"Loading...",forgotPassword:"Forgot your Password?",highlightInfo:"",registerUrl:"New register",titlePopover:"Oops!",forgotYourPassword:"Forgot your password?",ifYouTryHarder:"If you try ",attempts:"{0} more time(s) ",yourUserWillBeBlocked:"without success your user will be blocked and you will be left 24 hours without being able to access :(",createANewPasswordNow:"Better create a new password now! You will be able to log into the system right away.",iForgotMyPassword:"I forgot my password"},es:{title:"Bienvenido",loginErrorPattern:"Login inválido",loginHint:"Su usuario ha sido entregado para usted en su primer día.\n    Si no tiene esta información, póngase en contacto con el soporte técnico",loginPlaceholder:"Inserte su e-mail",passwordErrorPattern:"Contraseña inválida",passwordPlaceholder:"Inserte su contraseña",customFieldErrorPattern:"Valor no válido.",customFieldPlaceholder:"Por favor introduzca un valor",rememberUser:"Inicio de sesión automáticamente",rememberUserHint:"Puede deshabilitar esta opción en el menú del sistema.",submitLabel:"Entrar",submittedLabel:"Cargando...",forgotPassword:"Olvidaste tu contraseña?",highlightInfo:"",registerUrl:"Nuevo registro",titlePopover:"Opa!",forgotYourPassword:"Olvidaste tu contraseña?",ifYouTryHarder:"Si intenta más ",attempts:"{0} vez/veces ",yourUserWillBeBlocked:"sin éxito su usuario sera bloqueado y usted vás permanecer 24 horas sin poder acceder a :(",createANewPasswordNow:"¡Mejor crear una nueva contraseña ahora! Usted podrá entrar en el sistema inmediatamente después.",iForgotMyPassword:"Olvide mi contraseña"},pt:{title:"Bem-vindo",loginErrorPattern:"Login inválido",loginHint:"Seu usuário foi entregue a você no seu primeiro dia.\n    Caso não tenha mais essa informação contacte o suporte",loginPlaceholder:"Insira seu e-mail",passwordErrorPattern:"Senha inválida",passwordPlaceholder:"Insira sua senha",customFieldErrorPattern:"Valor inválido.",customFieldPlaceholder:"Por favor insira um valor",rememberUser:"Logar automaticamente",rememberUserHint:"Você pode desabilitar essa opção no menu do sistema",submitLabel:"Entrar",submittedLabel:"Carregando...",forgotPassword:"Esqueceu sua senha?",highlightInfo:"",registerUrl:"Novo registro",titlePopover:"Opa!",forgotYourPassword:"Esqueceu sua senha?",ifYouTryHarder:"Se tentar mais ",attempts:"{0} vez(es) ",yourUserWillBeBlocked:"sem sucesso seu usuário será bloqueado e você fica 24 horas sem poder acessar :(",createANewPasswordNow:"Melhor criar uma senha nova agora! Você vai poder entrar no sistema logo em seguida.",iForgotMyPassword:"Esqueci minha senha"}},Fe={en:"in",es:"en",pt:"em"},xe={en:"to",es:"al",pt:"ao"},De=function(){function e(e,o){this.loginService=e,this.router=o,this.allLoginErrors=[],this.allPasswordErrors=[],this.containsCustomLiterals=!1,this.customizedDefaultLiterals={},this.showExceededAttemptsWarning=!1,this._authenticationType=Me.Basic,this._hideRememberUser=!1,this._loading=!1,this._loginErrors=[],this._passwordErrors=[],this.rememberUser=!1,this.loginChange=new t.EventEmitter,this.loginSubmit=new t.EventEmitter,this.passwordChange=new t.EventEmitter}return Object.defineProperty(e.prototype,"customField",{get:function(){return this._customField},set:function(e){if(e){if(b(e,"string"))return this.customFieldType="input",this._customField=e,void(this.customFieldObject=this.getDefaultCustomFieldObject(e));if(b(e,"object")&&!Array.isArray(e)&&e.property)return this._customField=e,this.customFieldObject=e,void(this.customFieldObject.options||this.customFieldObject.url?this.customFieldType=this.customFieldObject.options?"select":"combo":this.customFieldType="input")}this._customField=undefined,this.customFieldObject=undefined},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"contactEmail",{get:function(){return this._contactEmail},set:function(e){var t=this.selectedLanguage||g();this._contactEmail=e,this.setLoginHintLiteral(t,e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"productName",{get:function(){return this._productName},set:function(e){var t=this.selectedLanguage||g();this._productName=e,this.setTitleLiteral(t,e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"environment",{get:function(){return this._environment},set:function(e){e&&e.length>40?this._environment=e.substring(0,40):this._environment=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"exceededAttemptsWarning",{get:function(){return this._exceededAttemptsWarning},set:function(e){this._exceededAttemptsWarning=function(e,t){var o=parseInt(e,10),n=parseInt(t,10),r=n||0===n?n:undefined;return o||0===o?o:r}(e),this.showExceededAttemptsWarning=this.exceededAttemptsWarning>0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hideRememberUser",{get:function(){return this._hideRememberUser},set:function(e){this._hideRememberUser=""===e||v(e),this._hideRememberUser&&(this.rememberUser=!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"literals",{get:function(){return this._literals||Re[g()]},set:function(e){var t=this.selectedLanguage||g();e?(this.getLiterals(t,e),this.containsCustomLiterals=!this.literals.title.includes(Re[t].title)||!this.literals.loginHint.includes(Re[t].loginHint)):(this.containsCustomLiterals=!1,this._literals=Re[t])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loading",{get:function(){return this._loading},set:function(e){this._loading=v(e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"login",{get:function(){return this._login},set:function(e){this._login=e,this.authenticationUrl||this.loginChange.emit(this._login)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loginErrors",{get:function(){return this._loginErrors},set:function(e){this._loginErrors=e||[],this.setLoginErrors(this._loginErrors)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"passwordErrors",{get:function(){return this._passwordErrors},set:function(e){this._passwordErrors=e||[],this.setPasswordErrors(this._passwordErrors)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"recovery",{get:function(){return this._recovery},set:function(e){this._recovery=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"registerUrl",{get:function(){return this._registerUrl},set:function(e){this._registerUrl=b(e,"string")?e:undefined},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"authenticationType",{get:function(){return this._authenticationType},set:function(e){this._authenticationType=Object.values(Me).includes(e)?e:Me.Basic},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"authenticationUrl",{get:function(){return this._authenticationUrl},set:function(e){this._authenticationUrl=b(e,"string")?e:undefined},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"blockedUrl",{get:function(){return this._blockedUrl},set:function(e){this._blockedUrl=b(e,"string")?e:undefined},enumerable:!0,configurable:!0}),e.prototype.ngOnDestroy=function(){this.loginSubscription&&this.loginSubscription.unsubscribe()},e.prototype.closePopover=function(){this.showExceededAttemptsWarning=!1},e.prototype.getLiterals=function(e,t){e=e||g(),t instanceof Object&&!(t instanceof Array)?(this.customizedDefaultLiterals=u({},this.customizedDefaultLiterals,t),this._literals=u({},Re[m],Re[e],this.customizedDefaultLiterals,t)):(this.containsCustomLiterals=!1,this._literals=Re[e])},e.prototype.onLoginSubmit=function(){var e=this,t={login:this.login,password:this.password,rememberUser:this.rememberUser};this.customField&&(t[this.customFieldObject.property]=this.customFieldObject.value),this.authenticationUrl?this.loginSubscription=this.loginService.onLogin(this.authenticationUrl,this.authenticationType,t).subscribe(function(t){e.setValuesToProperties(),sessionStorage.setItem("THF_USER_LOGIN",JSON.stringify(t)),e.openInternalLink("/")},function(t){"400"!==t.error.code&&"401"!==t.error.code||(e.setValuesToProperties(t),e.redirectBlockedUrl(e.exceededAttemptsWarning,e.blockedUrl))}):(this.loginSubmit.emit(t),this.showExceededAttemptsWarning=this.exceededAttemptsWarning>0)},e.prototype.setLoginHintLiteral=function(e,t){var o=Re[e].loginHint,n=Fe[e];t?this.concatenateLiteral(t,"loginHint",o,n):t||(this.literals={loginHint:o})},e.prototype.setTitleLiteral=function(e,t){var o=Re[e].title,n=xe[e];t?this.concatenateLiteral(t,"title",o,n):!t&&this.literals.title.includes(o)&&(this.literals={title:o})},e.prototype.concatenate=function(e,t,o){return e+" "+t+" "+o},e.prototype.concatenateLiteral=function(e,t,o,n){var r;(e&&this.literals[t].includes(o)||this.literals[t].includes(e))&&(this.literals=((r={})[t]=this.concatenate(o,n,e),r))},e.prototype.getDefaultCustomFieldObject=function(e){return{property:e}},e.prototype.openExternalLink=function(e){window.open(e,"_blank")},e.prototype.openInternalLink=function(e){this.router.navigate([e])},e.prototype.redirectBlockedUrl=function(e,t){0===e&&t&&(this.showExceededAttemptsWarning=!1,P(t)?this.openExternalLink(t):this.openInternalLink(t))},e.prototype.setValuesToProperties=function(e){e?(this.exceededAttemptsWarning=e.error.maxAttemptsRemaining,this.loginErrors=e.error.loginWarnings,this.passwordErrors=e.error.passwordWarnings,this.blockedUrl=e.error.blockedUrl):(this.exceededAttemptsWarning=0,this.loginErrors=[],this.passwordErrors=[],this.blockedUrl="")},e.propDecorators={customField:[{type:t.Input,args:["t-custom-field"]}],background:[{type:t.Input,args:["t-background"]}],contactEmail:[{type:t.Input,args:["t-contact-email"]}],productName:[{type:t.Input,args:["t-product-name"]}],environment:[{type:t.Input,args:["t-environment"]}],exceededAttemptsWarning:[{type:t.Input,args:["t-exceeded-attempts-warning"]}],hideRememberUser:[{type:t.Input,args:["t-hide-remember-user"]}],literals:[{type:t.Input,args:["t-literals"]}],loading:[{type:t.Input,args:["t-loading"]}],login:[{type:t.Input,args:["t-login"]}],logo:[{type:t.Input,args:["t-logo"]}],loginPattern:[{type:t.Input,args:["t-login-pattern"]}],loginErrors:[{type:t.Input,args:["t-login-errors"]}],passwordErrors:[{type:t.Input,args:["t-password-errors"]}],passwordPattern:[{type:t.Input,args:["t-password-pattern"]}],recovery:[{type:t.Input,args:["t-recovery"]}],registerUrl:[{type:t.Input,args:["t-register-url"]}],secondaryLogo:[{type:t.Input,args:["t-secondary-logo"]}],authenticationType:[{type:t.Input,args:["t-authentication-type"]}],authenticationUrl:[{type:t.Input,args:["t-authentication-url"]}],blockedUrl:[{type:t.Input,args:["t-blocked-url"]}],loginChange:[{type:t.Output,args:["t-login-change"]}],loginSubmit:[{type:t.Output,args:["t-login-submit"]}],passwordChange:[{type:t.Output,args:["t-password-change"]}]},e}(),Oe=function(){function e(e){this.http=e}return e.prototype.onLogin=function(e,t,o){if(t===Me.Bearer)return o.password=btoa(o.password),this.http.post(e,o);var n="("+o.login+":"+o.password+")",r=new s.HttpHeaders({Authorization:t+" "+btoa(n)});return delete o.login,delete o.password,this.http.post(e,o,{headers:r})},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:s.HttpClient}]},e}(),_e=function(e){function o(t,o,n,r,i,s){var a=e.call(this,i,s)||this;return a.changeDetector=t,a.activatedRoute=o,a.thfComponentInjector=n,a.componentRef=null,a.customPasswordError={custom:!1},a.differ=r.find([]).create(null),a}return l(o,e),o.prototype.ngAfterViewChecked=function(){this.differ&&this.validateArrayChanges(this.differ,[{array:this.loginErrors,callback:this.generateLoginError.bind(this)},{array:this.passwordErrors,callback:this.generatePasswordError.bind(this)}])},o.prototype.ngOnInit=function(){this.checkingForRouteMetadata(this.activatedRoute.snapshot.data)},o.prototype.changeLoginModel=function(){this.authenticationUrl?this.loginErrors=[]:(this.setLoginErrors(this.loginErrors),this.loginChange.emit(this.login))},o.prototype.changePasswordModel=function(){this.authenticationUrl?this.passwordErrors=[]:(this.setPasswordErrors(this.passwordErrors),this.passwordChange.emit(this.password))},o.prototype.checkingForMetadataProperty=function(e,t){if(Object.prototype.hasOwnProperty.call(e,t))return e[t]},o.prototype.checkingForRouteMetadata=function(e){0!==Object.keys(e).length&&(this.authenticationUrl=this.checkingForMetadataProperty(e,"serviceApi")||this.authenticationUrl,this.authenticationType=this.checkingForMetadataProperty(e,"authenticationType")||this.authenticationType,this.environment=this.checkingForMetadataProperty(e,"environment")||this.environment,this.recovery=this.checkingForMetadataProperty(e,"recovery")||this.recovery,this.registerUrl=this.checkingForMetadataProperty(e,"registerUrl")||this.registerUrl)},o.prototype.createModalPasswordRecoveryComponent=function(e){var t=this;this.componentRef&&this.thfComponentInjector.destroyComponentInApplication(this.componentRef),this.componentRef=this.thfComponentInjector.createComponentInApplication(D),this.componentRef.instance.urlRecovery=e.url,this.componentRef.instance.contactEmail=e.contactMail,this.componentRef.instance.phoneMask=e.phoneMask,this.componentRef.instance.type=e.type||C.Email,this.componentRef.changeDetectorRef.detectChanges(),setTimeout(function(){t.componentRef.instance.open()})},o.prototype.generateLoginError=function(){if(this.loginErrors&&this.loginErrors.length)this.setLoginErrors(this.loginErrors);else{var e=this.loginForm.form.controls.login;e&&this.resetControl(e)}},o.prototype.generatePasswordError=function(){if(this.passwordErrors&&this.passwordErrors.length)this.setPasswordErrors(this.passwordErrors);else{var e=this.loginForm.form.controls.password;e&&this.resetControl(e)}},o.prototype.resetControl=function(e){e.markAsPristine(),e.markAsUntouched(),e.updateValueAndValidity()},o.prototype.setControlErrors=function(e,t,o,n){t&&(this[e]=t.hasError("pattern")?h(o,[n]):h(o),o&&o.length&&(t.valid||t.pristine)&&(t.markAsTouched(),t.markAsDirty(),t.setErrors(this.customPasswordError)))},o.prototype.setUrlRedirect=function(e){P(e)?window.open(e,"_blank"):this.router.navigate([e])},o.prototype.validateArrayChanges=function(e,t){var o=this;t.forEach(function(t){e.diff(t.array)&&(t.callback(),o.changeDetector.detectChanges())})},o.prototype.openUrl=function(e){switch(typeof e){case"string":this.setUrlRedirect(e);break;case"function":e();break;case"object":this.createModalPasswordRecoveryComponent(e)}},o.prototype.setLoginErrors=function(e){var t=this.loginForm.form.controls.login;this.setControlErrors("allLoginErrors",t,e,this.literals.loginErrorPattern)},o.prototype.setPasswordErrors=function(e){var t=this.loginForm.form.controls.password;this.setControlErrors("allPasswordErrors",t,e,this.literals.passwordErrorPattern)},o.prototype.onSelectedLanguage=function(e){this.selectedLanguage=e,this.getLiterals(e,this.containsCustomLiterals?this.customizedDefaultLiterals:undefined),this.setTitleLiteral(e,this.productName),this.setLoginHintLiteral(e,this.contactEmail)},o.decorators=[{type:t.Component,args:[{selector:"thf-page-login",template:'<thf-page-background #pageLogin\n  t-show-select-language\n  [t-background]="background"\n  [t-highlight-info]="literals.highlightInfo"\n  [t-logo]="logo"\n  [t-secondary-logo]="secondaryLogo"\n  (t-selected-language)="onSelectedLanguage($event)">\n\n  <div class="thf-page-login-header thf-mb-2 thf-mb-sm-1 thf-pt-sm-1">\n    <div class="thf-page-login-header-title thf-mb-sm-1">{{ literals.title }}</div>\n    <thf-tag\n      *ngIf="environment"\n      t-type="warning"\n      [t-value]="environment">\n    </thf-tag>\n  </div>\n\n  <form #loginForm="ngForm" class="thf-page-login-form">\n    <div class="thf-row">\n      <div class="thf-lg-12">\n        <div class="thf-page-login-hint thf-page-login-info-container">\n          <thf-login\n            class="thf-page-login-info-field"\n            name="login"\n            [(ngModel)]="login"\n            t-focus\n            t-required\n            [t-label]="literals.loginLabel"\n            [t-pattern]="loginPattern"\n            [t-placeholder]="literals.loginPlaceholder"\n            (click)="closePopover()"\n            (keyup.enter)="loginForm.valid && onLoginSubmit()"\n            (t-change-model)="changeLoginModel()">\n          </thf-login>\n\n          <div class="thf-page-login-info-icon-container">\n            <span\n              class="thf-icon thf-field-icon thf-icon-info"\n              t-tooltip-position="right"\n              [t-tooltip]="literals.loginHint">\n            </span>\n          </div>\n        </div>\n\n        <div class="thf-field-container-bottom thf-field-container-error-container">\n          <div *ngFor="let error of allLoginErrors" class="thf-field-container-bottom-text-error thf-field-container-error-item">\n            <span class="thf-icon thf-icon-exclamation"></span>\n            <span class="thf-field-container-error-text">{{error}}</span>\n          </div>\n        </div>\n      </div>\n\n      <div class="thf-lg-12">\n        <div class="thf-page-login-password-container">\n          <thf-password\n            class="thf-page-login-field-size thf-page-login-password-item"\n            name="password"\n            [(ngModel)]="password"\n            t-required\n            [t-label]="literals.passwordLabel"\n            [t-pattern]="passwordPattern"\n            [t-placeholder]="literals.passwordPlaceholder"\n            (click)="closePopover()"\n            (keyup.enter)="loginForm.valid && onLoginSubmit()"\n            (t-change-model)="changePasswordModel()">\n          </thf-password>\n          <div class="thf-page-login-password-item thf-page-login-password-popover-container">\n            <thf-page-login-popover *ngIf="showExceededAttemptsWarning && exceededAttemptsWarning"\n              [t-recovery]="recovery"\n              [t-remaining-attempts]="exceededAttemptsWarning"\n              [t-selected-language]="selectedLanguage"\n              (t-forgot-password) = "openUrl($event)">\n            </thf-page-login-popover>\n          </div>\n        </div>\n        <div class="thf-field-container-bottom thf-field-container-error-container">\n          <div *ngFor="let error of allPasswordErrors" class="thf-field-container-bottom-text-error thf-field-container-error-item">\n            <span class="thf-icon thf-icon-exclamation"></span>\n            <span class="thf-field-container-error-text">{{error}}</span>\n          </div>\n        </div>\n      </div>\n\n      <thf-input *ngIf="customField && customFieldType === \'input\'"\n        class="thf-page-login-field-size thf-lg-12"\n        name="customFieldInput"\n        [(ngModel)]="customFieldObject.value"\n        t-required\n        [t-error-pattern]="customFieldObject.errorPattern || literals.customFieldErrorPattern"\n        [t-pattern]="customFieldObject.pattern"\n        [t-placeholder]="customFieldObject.placeholder || literals.customFieldPlaceholder"\n        (keyup.enter)="loginForm.valid && onLoginSubmit()">\n      </thf-input>\n\n      <thf-combo *ngIf="customField && customFieldType === \'combo\'"\n        class="thf-page-login-field-size thf-lg-12"\n        name="customFieldCombo"\n        [(ngModel)]="customFieldObject.value"\n        t-required\n        [t-field-value]="customFieldObject.fieldValue"\n        [t-filter-service]="customFieldObject.url"\n        [t-placeholder]="customFieldObject.placeholder || literals.customFieldPlaceholder">\n      </thf-combo>\n\n      <thf-select *ngIf="customField && customFieldType === \'select\'"\n        class="thf-page-login-field-size thf-lg-12"\n        name="customFieldSelect"\n        [(ngModel)]="customFieldObject.value"\n        t-required\n        [t-placeholder]="customFieldObject.placeholder || literals.customFieldPlaceholder"\n        [t-options]="customFieldObject.options">\n      </thf-select>\n\n      <div class="thf-lg-12">\n        <div *ngIf="!hideRememberUser" class="thf-page-login-hint thf-page-login-info-container">\n          <thf-switch\n            class="thf-page-login-info-field thf-lg-7 thf-offset-lg-5 thf-offset-xl-5"\n            name="rememberUser"\n            [(ngModel)]="rememberUser"\n            t-label-position="1"\n            [t-label-off]="literals.rememberUser"\n            [t-label-on]="literals.rememberUser"\n            (keyup.enter)="loginForm.valid && onLoginSubmit()">\n          </thf-switch>\n\n          <div class="thf-page-login-info-icon-container thf-page-login-info-icon-remember-user">\n            <span\n              class="thf-icon thf-field-icon thf-icon-info"\n              t-tooltip-position="right"\n              [t-tooltip]="literals.rememberUserHint">\n            </span>\n          </div>\n        </div>\n      </div>\n\n\n      <thf-button\n        class="thf-lg-12 thf-page-login-button thf-page-login-field-size"\n        t-type="primary"\n        [t-disabled]="loginForm.invalid"\n        [t-label]="loading ? literals.submittedLabel : literals.submitLabel"\n        [t-loading]="loading"\n        (t-click)="onLoginSubmit()">\n      </thf-button>\n\n      <div *ngIf="recovery"\n        class="thf-page-login-recovery-link">\n        <a class="thf-font-text-large-bold" (click)="openUrl(recovery)">{{ literals.forgotPassword }}</a>\n      </div>\n\n      <div *ngIf="registerUrl"\n        class="thf-page-login-register-link">\n        <a class="thf-font-text-large-bold" (click)="openUrl(registerUrl)">{{ literals.registerUrl }}</a>\n      </div>\n    </div>\n  </form>\n</thf-page-background>\n'}]}],o.ctorParameters=function(){return[{type:t.ChangeDetectorRef},{type:i.ActivatedRoute},{type:r.ThfComponentInjectorService},{type:t.IterableDiffers},{type:Oe},{type:i.Router}]},o.propDecorators={loginForm:[{type:t.ViewChild,args:["loginForm",{read:n.NgForm,"static":!0}]}],pageLogin:[{type:t.ViewChild,args:["pageLogin",{read:t.ViewContainerRef,"static":!0}]}]},o}(De),Ne=function(){function e(e){this.changeDetector=e,this.forgotPassword=new t.EventEmitter}return Object.defineProperty(e.prototype,"recovery",{get:function(){return this._recovery},set:function(e){this._recovery=e,b(e,"string")&&(this.recoveryType=P(e)?"externalLink":"internalLink")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"remainingAttempts",{get:function(){return this._remainingAttempts},set:function(e){this._remainingAttempts=e,this.getLiterals(this.selectedLanguage)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectedLanguage",{get:function(){return this._selectedLanguage},set:function(e){this._selectedLanguage=e,this.getLiterals(e)},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){this.getLiterals(this.selectedLanguage)},e.prototype.onForgotPasswordClick=function(e){this.forgotPassword.emit(e)},e.prototype.getLiterals=function(e){e=e||g(),this.literalParams=this.remainingAttempts,this.literals=u({},Re[m],Re[e]),this.changeDetector.detectChanges()},e.decorators=[{type:t.Component,args:[{selector:"thf-page-login-popover",template:'<div class="thf-page-login-popover-container">\n  <div class="thf-page-login-popover">\n    <div class="thf-page-login-popover-arrow"></div>\n    <div class="thf-page-login-popover-content">\n      <p class="thf-font-text-bold thf-page-login-popover-title">\n        {{ literals?.titlePopover }}\n      </p>\n      <p class="thf-font-text">\n        {{ literals?.forgotYourPassword }}\n      </p>\n      <p class="thf-font-text">\n        {{ literals?.ifYouTryHarder }}\n        <span class="thf-font-text-bold thf-page-login-popover-attempts">\n          {{ literals?.attempts | thfI18n:literalParams }}\n        </span>{{ literals?.yourUserWillBeBlocked }}\n      </p>\n      <br>\n      <p class="thf-font-text">\n        {{ literals?.createANewPasswordNow }}\n      </p>\n      <div *ngIf="recovery" class="thf-font-text-bold thf-mt-1 thf-page-login-popover-link-container">\n        <a *ngIf="recoveryType === \'internalLink\'"\n          class="thf-page-login-popover-link"\n          [routerLink]="recovery">\n          {{ literals?.iForgotMyPassword }}\n        </a>\n        <a *ngIf="recoveryType === \'externalLink\'"\n          class="thf-page-login-popover-link"\n          [href]="recovery"\n          target="_blank">\n          {{ literals?.iForgotMyPassword }}\n        </a>\n        <a *ngIf="!recoveryType"\n          class="thf-page-login-popover-link"\n          (click)="onForgotPasswordClick(recovery)">\n          {{ literals?.iForgotMyPassword }}\n        </a>\n      </div>\n    </div>\n  </div>\n</div>\n'}]}],e.ctorParameters=function(){return[{type:t.ChangeDetectorRef}]},e.propDecorators={recovery:[{type:t.Input,args:["t-recovery"]}],remainingAttempts:[{type:t.Input,args:["t-remaining-attempts"]}],selectedLanguage:[{type:t.Input,args:["t-selected-language"]}],forgotPassword:[{type:t.Output,args:["t-forgot-password"]}]},e}(),Le=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[o.CommonModule,n.FormsModule,i.RouterModule,L,r.ThfModule],declarations:[_e,Ne],entryComponents:[D],exports:[_e],providers:[Oe]}]}],e}(),je=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[_,L,G,X,oe,se,he,ve,Te,Le],exports:[_,L,G,X,oe,se,he,ve,Te,Le]}]}],e}(),qe=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[je],exports:[je]}]}],e}();e.ThfComponentsModule=je,e.ThfModalPasswordRecoveryComponent=D,e.ThfModalPasswordRecoveryModalContent=F,e.ThfModalPasswordRecoveryModule=_,e.ThfModalPasswordRecoveryType=C,e.ThfPageBackgroundComponent=N,e.ThfPageBackgroundModule=L,e.ThfPageBlockedUserComponent=H,e.ThfPageBlockedUserModule=G,e.ThfPageBlockedUserReason=j,e.ThfPageChangePasswordComponent=Q,e.ThfPageChangePasswordModule=X,e.ThfPageDynamicDetailComponent=te,e.ThfPageDynamicDetailModule=oe,e.ThfPageDynamicEditComponent=ie,e.ThfPageDynamicEditModule=se,e.ThfPageDynamicSearchComponent=pe,e.ThfPageDynamicSearchModule=he,e.ThfPageDynamicTableComponent=ye,e.ThfPageDynamicTableModule=ve,e.ThfPageJobSchedulerComponent=Ae,e.ThfPageJobSchedulerModule=Te,e.ThfPageLoginAuthenticationType=Me,e.ThfPageLoginComponent=_e,e.ThfPageLoginModule=Le,e.ThfTemplatesModule=qe,e.thfModalPasswordRecoveryLiterals=A,e.thfPageBlockedUserButtonLiterals=V,e.thfPageBlockedUserLiterals=z,e.thfPageChangePasswordLiterals=Y,e.thfPageDynamicDetailLiteralsDefault=ee,e.thfPageDynamicEditLiteralsDefault=re,e.thfPageDynamicTableLiteralsDefault=ge,e.ɵa=R,e.ɵb=x,e.ɵc=O,e.ɵd=U,e.ɵe=W,e.ɵf=J,e.ɵg=K,e.ɵh=$,e.ɵi=Z,e.ɵj=ne,e.ɵk=le,e.ɵl=ce,e.ɵm=de,e.ɵn=fe,e.ɵo=me,e.ɵp=Pe,e.ɵq=ke,e.ɵr=Se,e.ɵs=Ce,e.ɵt=Ee,e.ɵu=Ie,e.ɵv=De,e.ɵw=Oe,e.ɵx=Ne,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=totvs-thf-templates.umd.min.js.map