@senior-gestao-pessoas/payroll-core 9.0.0-ffa996ad-435c-4748-b85e-90746de85131 → 9.1.0-4c189107-f538-4deb-9b77-aee8dab91b50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. package/bundles/senior-gestao-pessoas-payroll-core.umd.js +18 -11
  2. package/bundles/senior-gestao-pessoas-payroll-core.umd.js.map +1 -1
  3. package/bundles/senior-gestao-pessoas-payroll-core.umd.min.js +1 -1
  4. package/bundles/senior-gestao-pessoas-payroll-core.umd.min.js.map +1 -1
  5. package/components/employee-summary/employee-summary.service.d.ts +0 -2
  6. package/components/input-rest-auto-complete-employee-model/input-rest-auto-complete-employee-model.component.d.ts +5 -2
  7. package/esm2015/components/employee-summary/employee-summary.service.js +1 -4
  8. package/esm2015/components/input-rest-auto-complete-employee/input-rest-auto-complete-employee.component.js +1 -2
  9. package/esm2015/components/input-rest-auto-complete-employee-model/input-rest-auto-complete-employee-model.component.js +21 -8
  10. package/esm5/components/employee-summary/employee-summary.service.js +1 -4
  11. package/esm5/components/input-rest-auto-complete-employee/input-rest-auto-complete-employee.component.js +1 -2
  12. package/esm5/components/input-rest-auto-complete-employee-model/input-rest-auto-complete-employee-model.component.js +22 -8
  13. package/fesm2015/senior-gestao-pessoas-payroll-core.js +17 -11
  14. package/fesm2015/senior-gestao-pessoas-payroll-core.js.map +1 -1
  15. package/fesm5/senior-gestao-pessoas-payroll-core.js +18 -11
  16. package/fesm5/senior-gestao-pessoas-payroll-core.js.map +1 -1
  17. package/package.json +1 -1
  18. package/senior-gestao-pessoas-payroll-core.metadata.json +1 -1
  19. package/core/interfaces/auto-complete-employee.d.ts +0 -10
  20. package/esm2015/core/interfaces/auto-complete-employee.js +0 -1
  21. package/esm5/core/interfaces/auto-complete-employee.js +0 -1
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/forms"),require("primeng/blockui"),require("primeng/progressspinner"),require("@angular/router"),require("@ngx-translate/core"),require("rxjs/operators"),require("primeng/breadcrumb"),require("@angular/common"),require("primeng/dropdown"),require("primeng/inputmask"),require("primeng/inputtext"),require("primeng/shared"),require("@seniorsistemas/angular-components"),require("moment"),require("rxjs"),require("primeng/tooltip"),require("primeng/table"),require("@angular/common/http"),require("primeng/api"),require("@senior-gestao-pessoas/angular-components"),require("ng2-img-cropper"),require("primeng/button"),require("primeng/dialog"),require("primeng/fileupload"),require("chance"),require("moment-business"),require("primeng/autocomplete"),require("primeng/splitbutton"),require("primeng/components/common/messageservice"),require("@seniorsistemas/senior-platform-data"),require("primeng/toast"),require("ng2-currency-mask"),require("primeng/fieldset"),require("primeng/panel"),require("primeng/confirmdialog")):"function"==typeof define&&define.amd?define("@senior-gestao-pessoas/payroll-core",["exports","@angular/core","@angular/forms","primeng/blockui","primeng/progressspinner","@angular/router","@ngx-translate/core","rxjs/operators","primeng/breadcrumb","@angular/common","primeng/dropdown","primeng/inputmask","primeng/inputtext","primeng/shared","@seniorsistemas/angular-components","moment","rxjs","primeng/tooltip","primeng/table","@angular/common/http","primeng/api","@senior-gestao-pessoas/angular-components","ng2-img-cropper","primeng/button","primeng/dialog","primeng/fileupload","chance","moment-business","primeng/autocomplete","primeng/splitbutton","primeng/components/common/messageservice","@seniorsistemas/senior-platform-data","primeng/toast","ng2-currency-mask","primeng/fieldset","primeng/panel","primeng/confirmdialog"],t):t(((e=e||self)["senior-gestao-pessoas"]=e["senior-gestao-pessoas"]||{},e["senior-gestao-pessoas"]["payroll-core"]={}),e.ng.core,e.ng.forms,e.blockui,e.progressspinner,e.ng.router,e.core$1,e.rxjs.operators,e.breadcrumb,e.ng.common,e.dropdown,e.inputmask,e.inputtext,e.shared,e.angularComponents,e.moment_,e.rxjs,e.tooltip,e.table,e.ng.common.http,e.api,e.angularComponents$1,e.ng2ImgCropper,e.button,e.dialog,e.fileupload,e.chance,e.business,e.autocomplete,e.splitbutton,e.messageservice,e.seniorPlatformData,e.toast,e.ng2CurrencyMask,e.fieldset,e.panel,e.confirmdialog)}(this,(function(e,t,o,n,r,i,a,s,l,p,c,u,d,m,h,y,f,g,b,v,I,k,S,_,w,C,D,T,E,F,M,P,A,O,L,R,x){"use strict";T=T&&T.hasOwnProperty("default")?T.default:T;var B=function(){return(B=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 N(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a}function j(e,t,o,n){return new(o||(o=Promise))((function(r,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){e.done?r(e.value):new o((function(t){t(e.value)})).then(a,s)}l((n=n.apply(e,t||[])).next())}))}function q(e,t){var o,n,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(o)throw new TypeError("Generator is already executing.");for(;a;)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 a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{o=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function V(e){var t="function"==typeof Symbol&&e[Symbol.iterator],o=0;return t?t.call(e):{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}}}function U(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var n,r,i=o.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return a}function Y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(U(arguments[t]));return e}var G,H,W,z,$,Q,K,J,X,Z,ee,te,oe=function(){function e(){}return e.prototype.calcChecker1=function(e){for(var t=null,o=0;o<9;++o)t+=e.toString().charAt(o)*(10-o);var n=t%11;return n<2?0:11-n},e.prototype.calcChecker2=function(e){for(var t=null,o=0;o<10;++o)t+=e.toString().charAt(o)*(11-o);var n=t%11;return n<2?0:11-n},e.prototype.checkCPF=function(e){var t=e.replace(/\.|\-|\s/g,""),o=t.substring(0,9),n=t.substring(9,11);if(11!==t.length)return!1;for(var r=0;r<10;r++)if(""+o+n===Array(12).join(r.toString()))return!1;var i=this.calcChecker1(o),a=this.calcChecker2(o+""+i);return n.toString()===i.toString()+a.toString()},e}(),ne=new oe,re=function(){function e(){}return e.prototype.checkCNPJ=function(e){var t=e;if(t){var o=void 0,n=void 0,r=void 0,i=void 0,a=void 0;if(14!==(t=t.replace(/[^\d]+/g,"")).length)return!0;if("00000000000000"===t||"11111111111111"===t||"22222222222222"===t||"33333333333333"===t||"44444444444444"===t||"55555555555555"===t||"66666666666666"===t||"77777777777777"===t||"88888888888888"===t||"99999999999999"===t)return!1;o=t.length-2,n=t.substring(0,o),r=t.substring(o),i=0,a=o-7;for(var s=o;s>=1;s--)i+=n.charAt(o-s)*a--,a<2&&(a=9);if((i%11<2?0:11-i%11)!==Number(r.charAt(0)))return!1;o+=1,n=t.substring(0,o),i=0,a=o-7;for(s=o;s>=1;s--)i+=n.charAt(o-s)*a--,a<2&&(a=9);return(i%11<2?0:11-i%11)===Number(r.charAt(1))}return!0},e}(),ie=new re,ae=function(){function e(){this.addStringFormat()}return e.prototype.addStringFormat=function(){if(!String.prototype.hasOwnProperty("format")){var e={format:function(){for(var e=this,t=0;t<arguments.length;t++){var o=new RegExp("\\{"+t+"\\}","gi");e=e.replace(o,arguments[t])}return e}};Object.assign(String.prototype,e)}},e}(),se=new ae,le=function(){function e(){}return N([t.Input()],e.prototype,"blocked",void 0),N([t.Input()],e.prototype,"target",void 0),e=N([t.Component({selector:"block-ui",template:'<p-blockUI [blocked]="blocked">\n <p-progressSpinner [strokeWidth]="5"></p-progressSpinner>\n</p-blockUI>\n',styles:[".ui-widget-overlay{background:#ccc!important;opacity:.5!important}@-webkit-keyframes ui-progress-spinner-color{0%,100%,40%,66%,80%,90%{stroke:#428bca}}@keyframes ui-progress-spinner-color{0%,100%,40%,66%,80%,90%{stroke:#428bca}}p-progressspinner{position:absolute!important;top:50%!important;left:50%!important}"]})],e)}(),pe=function(){function e(){}return e=N([t.NgModule({imports:[o.FormsModule,n.BlockUIModule,r.ProgressSpinnerModule],declarations:[le],exports:[le]})],e)}(),ce=function(){function e(e,t,o){this.activatedRoute=e,this.router=t,this.translate=o,this.items=[]}return e.prototype.ngOnInit=function(){var e=this;this.router.events.pipe(s.filter((function(e){return e instanceof i.NavigationEnd}))).subscribe((function(){var t=e.activatedRoute.root;e.items=e.getBreadcrumbs(t,[])}))},e.prototype.getBreadcrumbs=function(e,t){var o=e.children;if(0===o.length)return t;this.generateBreadcrumb(o,t);var n=t.length&&t.length-1||0;return this.title=t[n]&&t[n].label,t},e.prototype.generateBreadcrumb=function(e,t){var o=this;e.forEach((function(e,n){e.snapshot.data.hasOwnProperty("breadcrumb")&&e.snapshot.data.breadcrumb.map((function(n){var r={label:o.translate.instant(n.name),queryParams:e.snapshot.queryParams,routerLink:o.getFormattedUrl(e,n.routerLink),url:o.getFormattedUrl(e,n.url)};n.routerLink&&(r.disabled=!0,r.routerLinkActiveOptions={exact:!0}),t.push(r)})),e.children&&e.children.length&&o.generateBreadcrumb(e.children,t)}))},e.prototype.getFormattedUrl=function(e,t){return t&&(Object.keys(e.snapshot.params).forEach((function(o){t=t.replace(":"+o,e.snapshot.params[o])})),t.includes(":")&&e.parent)?this.getFormattedUrl(e.parent,t):t},e.ctorParameters=function(){return[{type:i.ActivatedRoute},{type:i.Router},{type:a.TranslateService}]},e=N([t.Component({selector:"c-breadcrumb",template:'<h1 class="sds-page-title">{{title}}</h1>\n<p-breadcrumb [model]="items" ></p-breadcrumb>\n'})],e)}(),ue=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule],exports:[p.CommonModule,a.TranslateModule]})],e)}(),de=function(){function e(){}return e=N([t.NgModule({imports:[o.FormsModule,l.BreadcrumbModule,ue],declarations:[ce],exports:[ce]})],e)}(),me=function(){function e(){}return Object.defineProperty(e.prototype,"errorMessage",{get:function(){for(var e in this.control.errors)if(this.control.errors.hasOwnProperty(e)&&(this.control.touched||this.control.dirty))return this.errorList[e];return null},enumerable:!0,configurable:!0}),N([t.Input()],e.prototype,"control",void 0),N([t.Input()],e.prototype,"errorList",void 0),e=N([t.Component({selector:"control-messages-error",template:'<div class="error-message" *ngIf="errorMessage">\n {{ errorMessage | translate }}\n</div>\n',styles:[".error-message{color:#c13018;margin-top:5px;font-size:13px}"]})],e)}(),he=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,ue,o.ReactiveFormsModule],declarations:[me],exports:[me]})],e)}(),ye=function(){function e(){this.optionsBoolean=[{label:"Selecione",value:""},{label:"Sim",value:"true"},{label:"Não",value:"false"}]}return e.prototype.ngOnInit=function(){},N([t.Input()],e.prototype,"params",void 0),N([t.Input()],e.prototype,"disabled",void 0),N([t.Input()],e.prototype,"readonly",void 0),N([t.Input()],e.prototype,"required",void 0),N([t.Input()],e.prototype,"form",void 0),e=N([t.Component({selector:"custom-fields",template:'<div [ngSwitch]="params.type" [formGroup]="form" *ngIf="form" >\n <div *ngSwitchCase="\'date\'" >\n <input-date-calendar [form]="form" [name]="params.field" ></input-date-calendar>\n </div>\n <div *ngSwitchCase="\'boolean\'" >\n <p-dropdown [options]="optionsBoolean" [name]="params.field"\n [(ngModel)]="params.value" [formControlName]="params.field" [required]="required" [readonly]="readonly"\n [style]="{\'width\': \'100%\'}"\n ></p-dropdown>\n </div>\n <div *ngSwitchDefault >\n <input type="text" *ngIf="!params.mask" pInputText [formControlName]="params.field" />\n <p-inputMask *ngIf="params.mask" [(ngModel)]="params.value" [formControlName]="params.field" [mask]="params.mask" [required]="required" [name]="params.field" [readonly]="readonly" ></p-inputMask>\n </div>\n</div>\n',styles:[""]})],e)}(),fe=y,ge=function(){function e(e){this.localeService=e,this.unmask=!0,this.onBlurGetMoment=new t.EventEmitter,this.ngUnsubscribe=new f.Subject,this.mask=null}return e.prototype.ngOnInit=function(){var e=this;this.localeService.get().pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(t){if(e.mask=e.formatMask(t),e.format=e.setFormat(),e.form.get(e.name).value){var o=e.form.get(e.name).value.toString(),n=fe(o,e.format||"YYYY-MM-DD");e.form.get(e.name).setValue(n.format(e.format||"L")),e._date=n}}))},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},e.prototype.formatMask=function(e){this.locale=e;var t=this.locale.calendar.dateFormat.toString();return this.withoutDay&&(t=t.replace("dd/","").replace("-dd","")),(t=t.replace(/[d]|[m]/g,"9")).replace(/[y]/g,"99")},e.prototype.setFormat=function(){var e=this.locale.calendar.dateFormat.toString();return e=e.replace(/[y]/g,"YY"),this.withoutDay&&(e=e.replace("dd/","").replace("-dd","")),e.toUpperCase()},Object.defineProperty(e.prototype,"placeholder",{get:function(){return this.mask?this.mask.toString().replace(/[9]/g,"_"):""},enumerable:!0,configurable:!0}),e.prototype.onBlur=function(e){if(e&&e.target&&e.target.value){var t=this.form.get(this.name).value;this._date=fe(t,this.format),this.onBlurGetMoment.emit(this._date)}else this._date={},this.form.get(this.name).setValue(null),this.onBlurGetMoment.emit(null)},Object.defineProperty(e.prototype,"model",{get:function(){var e=this.form.get(this.name).value;return fe(e,this.format)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inputDateElement",{get:function(){return this._inputDateElement},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:h.LocaleService}]},N([t.ViewChild("inputDateElement",{static:!1})],e.prototype,"_inputDateElement",void 0),N([t.Input()],e.prototype,"form",void 0),N([t.Input()],e.prototype,"name",void 0),N([t.Input()],e.prototype,"disabled",void 0),N([t.Input()],e.prototype,"unmask",void 0),N([t.Input()],e.prototype,"inputId",void 0),N([t.Input()],e.prototype,"withoutDay",void 0),N([t.Input()],e.prototype,"readonly",void 0),N([t.Output()],e.prototype,"onBlurGetMoment",void 0),N([t.Input()],e.prototype,"model",null),e=N([t.Component({selector:"input-date-calendar",template:'<div [formGroup]="form" >\n <p-inputMask *ngIf="mask" [formControlName]="name"\n [mask]="mask"\n (onBlur)="onBlur($event)"\n [placeholder]="placeholder"\n [attr.disabled]="disabled"\n [unmask]="unmask"\n [inputId]="inputId"\n [readonly]="readonly"\n #inputDateElement\n ></p-inputMask>\n</div>\n'})],e)}(),be=function(){function e(){}return e=N([t.NgModule({imports:[u.InputMaskModule,o.FormsModule,o.ReactiveFormsModule,p.CommonModule],declarations:[ge],exports:[ge]})],e)}(),ve=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,o.ReactiveFormsModule,m.SharedModule,d.InputTextModule,be,c.DropdownModule,u.InputMaskModule],declarations:[ye],providers:[],exports:[ye]})],e)}(),Ie=function(){function e(e){this.elementRef=e,this.el=this.elementRef.nativeElement}return e.prototype.onBlur=function(e){this.cleanVar(e)},e.prototype.cleanVar=function(e){var t=e.trim().replace(/^\s+|\s+$|\s+(?=\s)/g,"");return e!==t&&(this.el.value=t),t},e.ctorParameters=function(){return[{type:t.ElementRef}]},N([t.HostListener("blur",["$event.target.value"])],e.prototype,"onBlur",null),e=N([t.Directive({selector:"[name-not-spaces]"})],e)}(),ke=function(){function e(e){this.el=e}return e.prototype.onKeyDown=function(e){var t=e;-1!==[46,8,9,27,13,110,190].indexOf(t.keyCode)||65===t.keyCode&&(t.ctrlKey||t.metaKey)||67===t.keyCode&&(t.ctrlKey||t.metaKey)||86===t.keyCode&&(t.ctrlKey||t.metaKey)||88===t.keyCode&&(t.ctrlKey||t.metaKey)||t.keyCode>=35&&t.keyCode<=39||(t.shiftKey||t.keyCode<48||t.keyCode>57)&&(t.keyCode<96||t.keyCode>105)&&t.preventDefault()},e.ctorParameters=function(){return[{type:t.ElementRef}]},N([t.HostListener("keydown",["$event"])],e.prototype,"onKeyDown",null),e=N([t.Directive({selector:"[only-number]"})],e)}(),Se=function(){function e(){}return e=N([t.NgModule({imports:[],declarations:[ke,Ie],exports:[ke,Ie],providers:[],schemas:[]})],e)}();(G=e.UsingType||(e.UsingType={})).TYPE_1="TYPE_1",G.TYPE_2="TYPE_2",G.TYPE_3="TYPE_3",G.TYPE_4="TYPE_4",G.TYPE_6="TYPE_6",G.TYPE_7="TYPE_7",G.TYPE_8="TYPE_8",G.TYPE_9="TYPE_9",G.TYPE_10="TYPE_10",G.TYPE_11="TYPE_11",G.TYPE_12="TYPE_12",G.TYPE_14="TYPE_14",G.TYPE_15="TYPE_15",G.TYPE_16="TYPE_16",G.TYPE_17="TYPE_17",G.TYPE_18="TYPE_18",G.TYPE_19="TYPE_19",G.TYPE_20="TYPE_20",G.TYPE_21="TYPE_21",(H=e.CompanyIndicationType||(e.CompanyIndicationType={})).USE_DEPENDENTS="USE_DEPENDENTS",H.VACCINATION_FREQUENCY="VACCINATION_FREQUENCY",H.APPORTIONMENT_CALCULATION="APPORTIONMENT_CALCULATION",H.USE_WORKSTATION_GROUP_EMPLOYEE="USE_WORKSTATION_GROUP_EMPLOYEE",H.STRUCTURE="STRUCTURE",H.PAY_ANNUITY="PAY_ANNUITY",H.USE_HISTORICAL_BANK_ACCOUNT="USE_HISTORICAL_BANK_ACCOUNT",(e.CoreFieldType||(e.CoreFieldType={})).searchValue="searchValue",(W=e.DirectionEnumeration||(e.DirectionEnumeration={})).ASC="ASC",W.DESC="DESC",(z=e.ModuleType||(e.ModuleType={})).MANAGEMENT_PANEL="MANAGEMENT_PANEL",z.PERFORMANCE_MANAGEMENT="PERFORMANCE_MANAGEMENT",z.CAREER_SUCCESSION="CAREER_SUCCESSION",z.RECRUIT_MANAGEMENT="RECRUIT_MANAGEMENT",z.REMUNERATION_MANAGEMENT="REMUNERATION_MANAGEMENT",z.DEVELOPMENT_MANAGEMENT="DEVELOPMENT_MANAGEMENT",z.PAYROLL="PAYROLL",z.APP="APP",z.MOODS="MOODS",($=e.Operators||(e.Operators={})).EQUAL="eq",$.DIFFERENT="ne",$.LESS_THAN="it",$.GREATER_THAN="gt",$.LESS__EQUAL_THAN="le",$.GREATER_EQUAL_THAN="ge",$.CONTAINING="containing",$.LOWER="lower",$.AND="and",$.OR="or",(Q=e.CompareType||(e.CompareType={})).isBefore="isBefore",Q.isAfter="isAfter",Q.isSame="isSame",Q.isSameOrAfter="isSameOrAfter",Q.isSameOrBefore="isSameOrBefore",Q.isNotSame="isNotSame",(K=e.ServiceType||(e.ServiceType={})).ENTRY="entry",K.GENERAL_REGISTER="general_register",K.ORGANIZATION_REGISTER="organization_register",K.PAYROLL="payroll",K.DEPENDENT="dependent",(J=e.HttpRequestType||(e.HttpRequestType={})).POST="post",J.GET="get",(X=e.ReportFormat||(e.ReportFormat={})).PDF="Pdf",X.CSV="Csv",X.HTML="Html",X.XLS="Xls",X.XLSX="Xlsx",X.XML="Xml",X.ODT="Odt",X.RTF="Rtf",(Z=e.ParameterType||(e.ParameterType={})).STRING="String",Z.INTEGER="Integer",Z.DOUBLE="Double",Z.BOOLEAN="Boolean",Z.DATE="Date",Z.DATETIME="DateTime",Z.TIME="Time",Z.OBJECT="Object",(ee=e.MenuType||(e.MenuType={})).DEFAULT="DEFAULT",ee.ACTION="ACTION",(te=e.ReportStage||(e.ReportStage={})).STARTING="Starting",te.COMPILING="Compiling",te.FILLING="Filling",te.EXPORTING="Exporting",te.DONE="Done",te.CANCELLED="Cancelled",te.GENERATED="Generated",te.ERROR="Error";var _e=function(){function e(e){this.http=e}return e.prototype.getList=function(e,t){return this.http.post(""+e,t)},e.ctorParameters=function(){return[{type:v.HttpClient}]},e=N([t.Injectable()],e)}(),we=function(){function o(e){this.dataListService=e,this.rows=10,this.paginator=!0,this.first=1,this.alwaysShowPaginator=!0,this.sortMode="multiple",this.responsive=!0,this.scrollable=!1,this.lazyLoad=new t.EventEmitter,this.loadingChange=new t.EventEmitter,this.listDataChange=new t.EventEmitter,this.selectedDataChange=new t.EventEmitter,this.headerCheckboxToggle=new t.EventEmitter,this.ngUnsubscribe=new f.Subject}return o.prototype.ngOnInit=function(){this.lazy||this.getlistData()},o.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},o.prototype.getActions=function(e,t){return this.actions(e,t)},o.prototype.pagination=function(e){this.lazy||this.getlistData(e.rows,Math.floor(e.first/e.rows))},o.prototype.onLazyLoad=function(t){var o=this;this.loading=!0,t.multiSortMeta&&t.multiSortMeta.length&&(this.orderBy=[],t.multiSortMeta.map((function(t){o.orderBy.push({field:t.field,direction:1===t.order?e.DirectionEnumeration.ASC:e.DirectionEnumeration.DESC})}))),this.getlistData(t.rows,Math.floor(t.first/t.rows)+1)},o.prototype.onFilter=function(){this.lazy&&(this.loading=!0),this.getlistData()},Object.defineProperty(o.prototype,"recordsMessage",{get:function(){return(this.totalRecords||0)+" "+(1===this.totalRecords?this.singularMessageRecords:this.pluralMessageRecords)},enumerable:!0,configurable:!0}),o.prototype.getlistData=function(e,t){var o=this;void 0===e&&(e=this.rows),void 0===t&&(t=this.first),this.endpoint?this.dataListService.getList(this.endpoint,B({page:{current:t,size:e,orderBy:this.orderBy}},this.initParameters,this._searchParameters)).pipe(s.takeUntil(this.ngUnsubscribe),s.map((function(e){return e&&e.result}))).subscribe((function(e){o.listData=e[o.keyPayload],o.totalRecords=e.countResult,o.lazy&&o.lazyLoad.emit(o.listData)})):this.lazy&&this.lazyLoad.emit(this.listData)},o.prototype.onHeaderCheckboxToggle=function(e){this.headerCheckboxToggle.emit(e)},o.prototype.getFieldValue=function(e,t){return t.field&&t.field.includes(".")?(t.field.split(".").map((function(t){return e=e&&e[t]})),e):e[t.field]},Object.defineProperty(o.prototype,"parameters",{set:function(e){e&&(this._searchParameters=B({},e),this.dataListTable&&(this.dataListTable.first=0),this.onFilter())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"loading",{get:function(){return this._loading},set:function(e){this._loading=e,this.loadingChange.emit(this._loading)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"listData",{get:function(){return this._listData},set:function(e){this._listData=e,this.listDataChange.emit(this._listData)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"selectedData",{get:function(){return this._selectedData},set:function(e){this._selectedData=e,this.selectedDataChange.emit(this._selectedData)},enumerable:!0,configurable:!0}),o.ctorParameters=function(){return[{type:_e}]},N([t.ViewChild("dataListTable",{static:!1})],o.prototype,"dataListTable",void 0),N([t.Input()],o.prototype,"id",void 0),N([t.Input()],o.prototype,"dataKey",void 0),N([t.Input()],o.prototype,"rows",void 0),N([t.Input()],o.prototype,"emptyMessage",void 0),N([t.Input()],o.prototype,"columns",void 0),N([t.Input()],o.prototype,"paginator",void 0),N([t.Input()],o.prototype,"first",void 0),N([t.Input()],o.prototype,"alwaysShowPaginator",void 0),N([t.Input()],o.prototype,"actions",void 0),N([t.Input()],o.prototype,"actionLabel",void 0),N([t.Input()],o.prototype,"selectionMode",void 0),N([t.Input()],o.prototype,"lazy",void 0),N([t.Input()],o.prototype,"isMultipleSelection",void 0),N([t.Input()],o.prototype,"isSortable",void 0),N([t.Input()],o.prototype,"showHeaderCheckBox",void 0),N([t.Input()],o.prototype,"sortMode",void 0),N([t.Input()],o.prototype,"endpoint",void 0),N([t.Input()],o.prototype,"totalRecords",void 0),N([t.Input()],o.prototype,"orderBy",void 0),N([t.Input()],o.prototype,"singularMessageRecords",void 0),N([t.Input()],o.prototype,"pluralMessageRecords",void 0),N([t.Input()],o.prototype,"keyPayload",void 0),N([t.Input()],o.prototype,"initParameters",void 0),N([t.Input()],o.prototype,"responsive",void 0),N([t.Input()],o.prototype,"scrollable",void 0),N([t.Output()],o.prototype,"lazyLoad",void 0),N([t.Output()],o.prototype,"loadingChange",void 0),N([t.Output()],o.prototype,"listDataChange",void 0),N([t.Output()],o.prototype,"selectedDataChange",void 0),N([t.Output()],o.prototype,"headerCheckboxToggle",void 0),N([t.Input()],o.prototype,"parameters",null),N([t.Input()],o.prototype,"loading",null),N([t.Input()],o.prototype,"listData",null),N([t.Input()],o.prototype,"selectedData",null),o=N([t.Component({selector:"c-data-list-rest",template:'<div *sLoadingState="loading">\n <p-table #dataListTable [id]="id" class="sds-list" [value]="listData" [columns]="columns" [paginator]="paginator" [rows]="rows" [first]="first"\n (onLazyLoad)="onLazyLoad($event)" [lazy]="lazy" [alwaysShowPaginator]="alwaysShowPaginator" (onPage)="pagination($event)"\n [totalRecords]="totalRecords" [(selection)]="selectedData" [dataKey]="dataKey" [sortMode]="sortMode" [responsive]="responsive" [scrollable]="scrollable"\n pageLinks="3" (onHeaderCheckboxToggle)="onHeaderCheckboxToggle($event)" [selectionMode]="selectionMode">\n \x3c!-- Colgroup --\x3e\n <ng-template pTemplate="colgroup" let-coumns>\n <colgroup>\n <col *ngFor="let col of columns; let i = index"\n [ngClass]="\'col-\'+i+\' col-scroll-resize\'"/>\n <col [ngClass]="\'col-\'+ (columns?.length || 0) +\' col-scroll-resize\'"/>\n </colgroup>\n </ng-template>\n \x3c!-- Header --\x3e\n <ng-template pTemplate="header">\n \x3c!-- Cabeçalhos quando da table é permitido ordenar as colunas --\x3e\n <tr>\n \x3c!-- Checkbox quando há seleção de linhas --\x3e\n <th id="{{id}}-checkbox-header" *ngIf="isMultipleSelection" style="width: 2.25em">\n <p-tableHeaderCheckbox *ngIf="showHeaderCheckBox"></p-tableHeaderCheckbox>\n </th>\n \x3c!-- Cabeçalhos das colunas da tabela --\x3e\n <th id="{{id}}-col-header-{{i}}" *ngFor="let col of columns; let i = index" [pSortableColumn]="col.field" [pSortableColumnDisabled]="!isSortable || !!col.icon"\n [style.width]="col.width" [pTooltip]="col.tooltip || col.label" tooltipPosition="top" showDelay="500">\n {{col[\'label\']}}\n \x3c!-- Quando a coluna é um ícone não exibe o ícone de ordenação da mesma --\x3e\n <p-sortIcon *ngIf="isSortable && !col.icon" [field]="col.field"></p-sortIcon>\n </th>\n \x3c!-- Cabeçalho da coluna de ações --\x3e\n <th id="col-actions" *ngIf="actions && actions()?.length" [ngClass]="{ actionsSize: actions().length > 1, actionSize: actions().length === 1 }"></th>\n </tr>\n </ng-template>\n \x3c!-- Body --\x3e\n <ng-template pTemplate="body" let-rowData let-key="rowIndex">\n <tr [pSelectableRow]="rowData">\n <td id="{{id}}-checkbox-body-{{key}}" *ngIf="isMultipleSelection">\n <p-tableCheckbox [value]="rowData"></p-tableCheckbox>\n </td>\n <td id="{{id}}-col-body-{{i}}-{{key}}" *ngFor="let col of columns;let i = index" [pTooltip]="col.icon ? \'\' : getFieldValue(rowData, col)"\n tooltipPosition="top" showDelay="500">\n \x3c!-- Exibe o ícone caso exista. Para isso o valor da coluna deve ser { value: string, style: object } --\x3e\n <i *ngIf="col.icon" class="{{rowData[col[\'field\']]?.value}}" [ngStyle]="rowData[col[\'field\']]?.style" aria-hidden="true"></i>\n \x3c!-- Quando não há ícone exibe o valor normal da coluna --\x3e\n <span>{{getFieldValue(rowData, col)}}</span>\n </td>\n\n \x3c!-- Coluna das ações --\x3e\n <td id="col-actions-{{key}}" class="col-actions" *ngIf="actions && actions(rowData)?.length">\n <s-button id="{{id}}-btn-actions-{{key}}" *ngIf="actions(rowData).length > 1" [label]="actionLabel" priority="default" [model]="getActions(rowData, key)"\n [disabled]="false" [auxiliary]="true"></s-button>\n\n <s-button id="{{id}}-btn-action-{{key}}" *ngIf="actions(rowData).length <= 1" [label]="actions(rowData, key)[0].label" priority="default"\n (click)="actions(rowData, key)[0].command()" [disabled]="false" [auxiliary]="true"></s-button>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate="paginatorright">\n <span>{{recordsMessage}}</span>\n </ng-template>\n\n <ng-template pTemplate="emptymessage" let-columns>\n <tr>\n <td id="{{id}}-empty-message" [attr.colspan]="columns?.length + (isMultipleSelection ? 2 : 1)">{{emptyMessage}}</td>\n </tr>\n </ng-template>\n </p-table>\n</div>\n',encapsulation:t.ViewEncapsulation.None,providers:[_e],styles:["app-data-list p-table .ui-table .ui-table-tbody>tr>td,app-data-list p-table .ui-table .ui-table-thead>tr>th{text-overflow:ellipsis;white-space:nowrap!important}app-data-list p-table .ui-paginator .ui-paginator-right-content{margin-left:auto}.actionsSize{width:11rem}.actionSize{width:18rem}body .ui-tooltip{max-width:22.3em!important}@media screen and (max-width:478px){.ui-paginator-right-content{display:none}}"]})],o)}(),Ce=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,ue,h.ButtonModule,h.LoadingStateModule,b.TableModule,g.TooltipModule],declarations:[we],exports:[we]})],e)}(),De=function(){function e(e){this.http=e,this.employeeBasicInformations=new f.Subject}return e.prototype.findEmployee=function(e,t){return this.http.post("hcm/payroll/queries/"+e,{employeeId:t})},e.prototype.findEmployeeAutoComplete=function(e,t){return this.http.post("hcm/payroll/queries/"+e,{valueSearch:t})},e.prototype.blobServiceRequestAccess=function(e,t){return this.http.post("hcm/payroll/actions/"+e,t)},e.prototype.setEmployeeBasicInformations=function(e){this.employeeBasicInformations.next(e)},e.prototype.getEmployeeBasicInformations=function(){return this.employeeBasicInformations.asObservable()},e.prototype.findEmployeeCompleteParameterizable=function(e,t){return this.http.post("hcm/payroll/queries/"+e,t)},e.ctorParameters=function(){return[{type:v.HttpClient}]},e=N([t.Injectable()],e)}(),Te=y,Ee=function(){function e(e,t){this.activatedRoute=e,this.employeeService=t,this.timetrackingLabel="Status",this.hireLabel="Admissão",this.registerNumberLabel="Matrícula",this.ageLabel="Idade",this.loadingLabel="...",this.loadingDescription="Carregando...",this.isLoading=!1,this.ngUnsubscribe=new f.Subject}return e.prototype.ngOnInit=function(){var e=this;this.emploayeeData={name:this.loadingLabel,jobPosition:this.loadingDescription},this.activatedRoute.params.pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(t){t.employeeId&&e.getInformation(t.employeeId)}))},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(!0),this.ngUnsubscribe.complete()},e.prototype.getInformation=function(e){var t=this;this.isLoading=!0,this.employeeService.findEmployee("employeeContractualInformations",e).pipe(s.takeUntil(this.ngUnsubscribe),s.map((function(e){return e&&e.result})),s.finalize((function(){t.isLoading=!1}))).subscribe((function(e){t.employeeService.setEmployeeBasicInformations(e),t.emploayeeData=B({},e,{timeTrackingResumeType:e.timeTrackingResumeType&&e.timeTrackingResumeType.value});var o=[];if(e.city&&o.push(e.city),e.stateAbbreviation&&o.push(e.stateAbbreviation),t.emploayeeData.location=o.join(" - "),e.hireDate&&(t.emploayeeData.hireDate=t.hireDate?t.hireDate:Te(e.hireDate).format("L")),e.idPicture){var n={fileId:e.idPicture,ttl:2,thumbnail:!1};t.employeeService.blobServiceRequestAccess("blobServiceRequestAccess",n).pipe(s.takeUntil(t.ngUnsubscribe),s.map((function(e){return e&&e.result}))).subscribe((function(e){e&&(t.emploayeeData.photoSource=e.locationURI)}))}}))},e.ctorParameters=function(){return[{type:i.ActivatedRoute},{type:De}]},N([t.Input()],e.prototype,"timetrackingLabel",void 0),N([t.Input()],e.prototype,"hireDate",void 0),N([t.Input()],e.prototype,"hireLabel",void 0),N([t.Input()],e.prototype,"registerNumberLabel",void 0),N([t.Input()],e.prototype,"ageLabel",void 0),N([t.Input()],e.prototype,"loadingLabel",void 0),N([t.Input()],e.prototype,"loadingDescription",void 0),e=N([t.Component({selector:"c-employee-summary",template:'<s-object-card *sLoadingState="isLoading">\n <s-object-card-main [label]="emploayeeData?.name" [description]="emploayeeData?.jobPosition" [imageSource]="emploayeeData?.photoSource"></s-object-card-main>\n <s-object-card-field [label]="emploayeeData?.employer" [description]="emploayeeData?.location"></s-object-card-field>\n <s-object-card-field [label]="timetrackingLabel" [description]="emploayeeData?.timeTrackingResumeType"></s-object-card-field>\n <s-object-card-field [label]="hireLabel" [description]="emploayeeData?.hireDate" iconClass="fa fa-calendar"></s-object-card-field>\n <s-object-card-field [label]="registerNumberLabel" [description]="emploayeeData?.registernumber" iconClass="fa fa-id-card"></s-object-card-field>\n <s-object-card-field [label]="ageLabel" [description]="emploayeeData?.age" iconClass="fa fa-birthday-cake"></s-object-card-field>\n</s-object-card>\n'})],e)}(),Fe=function(){function e(){}return e=N([t.NgModule({imports:[h.ObjectCardModule,h.LoadingStateModule],declarations:[Ee],exports:[Ee],providers:[De]})],e)}(),Me=function(){function e(e){this.http=e,this.admissionDraftBasicInformations=new f.Subject}return e.prototype.findAdmissionDraft=function(e){return this.http.post("hcm/payroll/queries/admissionDraftQuery",{id:e})},e.prototype.blobServiceRequestAccess=function(e,t){return this.http.post("hcm/payroll/actions/"+e,t)},e.prototype.setAdmissionDraftBasicInformations=function(e){this.admissionDraftBasicInformations.next(e)},e.ctorParameters=function(){return[{type:v.HttpClient}]},e=N([t.Injectable()],e)}(),Pe=function(){function e(e,t,o){this.activatedRoute=e,this.admissionDraftSummaryService=t,this.translateService=o,this.hireLabel="Admissão",this.hireDate="...",this.badgeText="Rascunho",this.loadingLabel="...",this.documentNumberLabel="Documento",this.loadingDescription="Carregando...",this.isLoading=!1,this.ngUnsubscribe=new f.Subject}return e.prototype.ngOnInit=function(){var e=this;this.draftData={name:this.loadingLabel,hiringDate:this.hireDate,documentNumber:this.loadingLabel,companyName:this.loadingLabel,localeOfCompany:this.loadingLabel,originDraftType:this.loadingLabel},this.activatedRoute.params.pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(t){t.draftId&&e.getInformation(t.draftId)}))},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(!0),this.ngUnsubscribe.complete()},e.prototype.getInformation=function(e){var t=this;this.isLoading=!0,this.admissionDraftSummaryService.findAdmissionDraft(e).pipe(s.takeUntil(this.ngUnsubscribe),s.map((function(e){return e&&e.result})),s.finalize((function(){t.isLoading=!1}))).subscribe((function(e){if(t.admissionDraftSummaryService.setAdmissionDraftBasicInformations(e),e.hiringDate=t.hireDate,t.draftData=B({},e),t.draftData.originDraftType=t.originType,e.attachment&&e.attachment.fileId){var o={fileId:t.draftData.attachment.fileId,ttl:2,thumbnail:!1};t.admissionDraftSummaryService.blobServiceRequestAccess("blobServiceRequestAccess",o).pipe(s.takeUntil(t.ngUnsubscribe),s.map((function(e){return e&&e.result}))).subscribe((function(e){e&&(t.draftData.photoSource=e.locationURI)}))}}))},e.ctorParameters=function(){return[{type:i.ActivatedRoute},{type:Me},{type:a.TranslateService}]},N([t.Input()],e.prototype,"originType",void 0),N([t.Input()],e.prototype,"hireLabel",void 0),N([t.Input()],e.prototype,"hireDate",void 0),N([t.Input()],e.prototype,"badgeText",void 0),N([t.Input()],e.prototype,"loadingLabel",void 0),N([t.Input()],e.prototype,"documentNumberLabel",void 0),N([t.Input()],e.prototype,"loadingDescription",void 0),e=N([t.Component({selector:"c-admission-draft-summary",template:'<s-object-card *sLoadingState="isLoading">\n <s-object-card-main [label]="draftData?.name"\n [imageSource]="draftData?.photoSource">\n </s-object-card-main>\n <s-object-card-field [label]="draftData.companyName" [description]="draftData.localeOfCompany"></s-object-card-field>\n <s-object-card-field [label]="draftData.originDraftType">\n <span descriptionTemplate class="sds-badge sds-semantic-orange">{{badgeText}}</span>\n </s-object-card-field>\n <s-object-card-field [label]="hireLabel" [description]="draftData?.hiringDate" iconClass="fa fa-calendar"></s-object-card-field>\n <s-object-card-field [label]="documentNumberLabel" [description]="draftData?.documentNumber" iconClass="fa fa-id-card"></s-object-card-field>\n</s-object-card>\n'})],e)}(),Ae=function(){function e(){}return e=N([t.NgModule({imports:[h.ObjectCardModule,h.LoadingStateModule],declarations:[Pe],exports:[Pe],providers:[Me]})],e)}(),Oe=function(){function e(){}return e.prototype.ngOnInit=function(){},e=N([t.Component({selector:"error-page",template:'<div class="ui-g">\n <div class="ui-sm-6 error-code">\n <span>403</span>\n </div>\n <div class="col-sm-6">\n <h4 class="error-title">​{{\'hcm.payroll.permission_error_page\'|translate}}</h4>\n <h5 class="error-description">{{\'hcm.payroll.permission_error_page_description\'|translate}}</h5>\n </div>\n</div>\n',styles:["@media (max-width:767px){.error-code{text-align:center}.error-code>span{color:#697882;font-size:80px;font-weight:300}}@media (min-width:768px){.error-code>span{color:#697882;font-size:128px;font-weight:300;float:right}}.error-title{padding-top:30px}.error-description{color:#999;margin-top:10px}"]})],e)}(),Le=function(){function e(){}return e=N([t.NgModule({imports:[ue],declarations:[Oe],exports:[Oe],providers:[]})],e)}(),Re=function(){function e(){this.errorMessage=""}return e.prototype.ngOnInit=function(){},e.prototype.ngOnChanges=function(e){var t=this,o=e.inputErrors.currentValue;this.errorMessage="",o&&Object.keys(this.errorDefs).some((function(e){if(o[e])return t.errorMessage=t.errorDefs[e],!0}))},N([t.Input()],e.prototype,"inputErrors",void 0),N([t.Input()],e.prototype,"errorDefs",void 0),N([t.Input()],e.prototype,"field",void 0),N([t.Input()],e.prototype,"onlyShowAfterTouched",void 0),e=N([t.Component({selector:"field-validator",template:'<ng-content></ng-content>\n<div style="color:#a94442;font-size: 13px"\n *ngIf="(onlyShowAfterTouched&&!field.valid&&(field.dirty || field.touched)&&errorMessage) || (!onlyShowAfterTouched&&errorMessage)">\n {{errorMessage | translate}}\n</div>\n'})],e)}(),xe=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,ue,o.ReactiveFormsModule],declarations:[Re],exports:[Re],providers:[]})],e)}(),Be=function(){function e(){this.messagesSubjectError=new f.Subject,this.messagesSubjectSuccess=new f.Subject,this.messagesSubjectWarning=new f.Subject}return e.prototype.showError=function(e,t){void 0===t&&(t=!1),this.messagesSubjectError.next({message:e,breakLine:t})},e.prototype.showSuccess=function(e,t){void 0===t&&(t=!1),this.messagesSubjectSuccess.next({message:e,breakLine:t})},e.prototype.showWarning=function(e,t){void 0===t&&(t=!1),this.messagesSubjectWarning.next({message:e,breakLine:t})},e.prototype.loadErrorMessages=function(){return this.messagesSubjectError.asObservable()},e.prototype.loadSuccessMessages=function(){return this.messagesSubjectSuccess.asObservable()},e.prototype.loadWarningMessages=function(){return this.messagesSubjectWarning.asObservable()},e}(),Ne=function(){function o(e,t,o){this.http=e,this.messageService=t,this.translateService=o}return o.prototype.query=function(t,o,n){var r=this;void 0===n&&(n=e.ServiceType.PAYROLL);var i="hcm/"+n+"/queries/"+t;return this.http.post(i,o).pipe(s.catchError((function(e){return e&&403===e.status&&r.messageService.add({severity:"error",summary:r.translateService.instant("hcm.payroll.error"),detail:r.translateService.instant("hcm.payroll.permission_error_not_allowed_search"),sticky:!0}),f.throwError(e)})))},o.prototype.enumQuery=function(e,t,o){var n=this;void 0===o&&(o="payroll");var r="hcm/"+o+"/queries/"+e;return this.http.post(r,t).pipe(s.catchError((function(e){return e&&403===e.status&&n.messageService.add({severity:"error",summary:n.translateService.instant("hcm.payroll.error"),detail:n.translateService.instant("hcm.payroll.permission_error_not_allowed_search"),sticky:!0}),f.throwError(e)})))},o.prototype.action=function(e,t){var o=this,n="hcm/payroll/actions/"+e;return this.http.post(n,t).pipe(s.catchError((function(e){return e&&403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)})))},o.prototype.recruitmentAction=function(e,t){var o=this,n="hcm/recruitment/actions/"+e;return this.http.post(n,t).pipe(s.catchError((function(e){return e&&403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)})))},o.prototype.get=function(e){var t=this,o="hcm/payroll/entities/"+e;return this.http.get(o).pipe(s.catchError((function(e){return 403===e.status&&t.messageService.add({severity:"error",summary:t.translateService.instant("hcm.payroll.error"),detail:t.translateService.instant("hcm.payroll.permission_error_not_allowed_search"),sticky:!0}),f.throwError(e)})))},o.prototype.getAutoComplete=function(t,o,n){var r=this;void 0===n&&(n=e.ServiceType.PAYROLL);var i="hcm/"+n+"/entities/"+t+"?filter="+o+"&size=10&orderby=code+asc";return this.http.get(i).pipe(s.catchError((function(e){return e&&403===e.status&&r.messageService.add({severity:"error",summary:r.translateService.instant("hcm.payroll.error"),detail:r.translateService.instant("hcm.payroll.permission_error_not_allowed_search"),sticky:!0}),f.throwError(e)})))},o.prototype.patch=function(e,t){var o=this,n="hcm/payroll/entities/"+e;return this.http.patch(n,t).pipe(s.catchError((function(e){return e&&403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)})))},o.prototype.post=function(e,t){var o=this,n="hcm/payroll/"+e;return this.http.post(n,t).pipe(s.catchError((function(e){return e&&403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)})))},o.prototype.put=function(e,t){var o=this,n="hcm/payroll/entities/"+e;return this.http.put(n,t).pipe(s.catchError((function(e){return e&&403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)})))},o.prototype.delete=function(e,t){var o=this,n=t?"hcm/payroll/entities/"+e+"/"+t:"hcm/payroll/entities/"+e;return this.http.delete(n).pipe(s.catchError((function(e){return e&&403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)})))},o.ctorParameters=function(){return[{type:v.HttpClient},{type:I.MessageService},{type:a.TranslateService}]},o=N([t.Injectable()],o)}(),je=function(){function e(e){this.http=e}return e.prototype.blobServiceRequestUpload=function(e){var t={fileName:e.name,thumbnail:this.isImage(e)};return this.http.action("blobServiceRequestUpload",t)},e.prototype.blobServiceRequestAccess=function(e){var t={fileId:e,tll:2,thumbnail:!1};return this.http.action("blobServiceRequestAccess",t)},e.prototype.blobServiceFileDelete=function(e){var t={fileId:e,thumbnail:!1};return this.http.action("blobServiceDelete",t)},e.prototype.isImage=function(e){return/^image\//.test(e.type)},e.ctorParameters=function(){return[{type:Ne}]},e=N([t.Injectable()],e)}(),qe=function(){function e(e,o,n){this.service=e,this.toastService=o,this.translate=n,this.files=[],this.onUploadFile=new t.EventEmitter,this.onRemoveFile=new t.EventEmitter}return e.prototype.uploadHandler=function(e){var t=this,o=[];if(e&&e.files.length){e.files.sort(),e.files.length>10&&e.files[10]&&delete e.files[10];for(var n=this.getFilesCountAndValidate(e.files),r=0;r<n;r++){var i=this.validateFileSize(e.files[r]);r<=9&&i.isUploaded&&!i.complete&&o.push(this.saveFile(i))}f.forkJoin.apply(void 0,Y(o)).subscribe((function(){t.onUploadFile.emit(t.files)}))}},e.prototype.validateFileSize=function(e){return e.isUploaded&&!e.complete&&e.size>5e7&&(e.complete=!0,e.error=this.translate.instant("hcm.payroll.attachments_max_mb"),this.toastService.showError(this.translate.instant("hcm.payroll.attachments_alert_error"))),e},e.prototype.getFilesCountAndValidate=function(e){var t=0;return e.length&&(e.length>10?(t=10,this.toastService.showError(this.translate.instant("hcm.payroll.attachments_max_length"))):t=e.length),t},e.prototype.saveFile=function(e){var t=this;return new f.Observable((function(o){return t.service.blobServiceRequestUpload(e).pipe(s.map((function(e){return e&&e.result}))).subscribe((function(n){return t.doUpload(n,e,o)}),(function(t){e.complete=!0,e.error=t.message,e.objectURL=void 0}))}))},e.prototype.doUpload=function(e,t,o){var n=new XMLHttpRequest;return t.id=e.fileId,t.objectURL=e.locationURI,t.version=e.version,t.progress=0,n.upload.addEventListener("progress",(function(e){t.progress=Math.round(100*e.loaded/e.total)}),!1),n.onreadystatechange=function(){4===n.readyState&&(t.complete=!0,n.status<200||n.status>=300?(t.objectURL=void 0,t.error=n.statusText||"Erro ao anexar arquivo"):t.error=!1,o.next(t),o.complete())},n.open("PUT",t.objectURL,!0),n.setRequestHeader("Translate","f"),n.send(t)},e.prototype.onCancelUpload=function(e){this.files.splice(e,1)},e.prototype.removeFile=function(){this.onRemoveFile.emit(this.files)},e.ctorParameters=function(){return[{type:je},{type:Be},{type:a.TranslateService}]},N([t.Input()],e.prototype,"errorTooltip",void 0),N([t.Input()],e.prototype,"files",void 0),N([t.Output()],e.prototype,"onUploadFile",void 0),N([t.Output()],e.prototype,"onRemoveFile",void 0),e=N([t.Component({selector:"c-file-upload",template:'<s-file-upload-deprecated chooseLabel="{{\'hcm.payroll.file_upload_choose_label\'|translate}}"\n cancelLabel="{{\'hcm.payroll.file_upload_cancel_label\'|translate}}"\n removeLabel="{{\'hcm.payroll.file_upload_remove_label\'|translate}}"\n successTooltip="{{\'hcm.payroll.file_upload_success_tooltip\'|translate}}"\n [errorTooltip]="errorTooltip"\n [customUpload]="true" [accept]="\'*/*\'" [multiple]="true"\n (uploadHandler)="uploadHandler($event)" (onCancelUpload)="onCancelUpload($event)"\n (onRemoveFile)="removeFile()" [files]="files"\n></s-file-upload-deprecated>\n'})],e)}(),Ve=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,k.FileUploadModuleDeprecated,ue],declarations:[qe],providers:[je],exports:[qe]})],e)}(),Ue=function(){function e(e){this.http=e}return e.prototype.saveImage=function(e,t,o){return j(this,void 0,void 0,(function(){var n,r,i;return q(this,(function(a){switch(a.label){case 0:return e?(n=null,e?n={fileName:e.name}:t&&(n={fileName:t.split("/")[1]}),n?[4,this.blobServiceRequestUpload(o,n).toPromise()]:[3,2]):[2];case 1:return r=a.sent(),(i=new XMLHttpRequest).open("PUT",r.result.locationURI,!0),i.setRequestHeader("Translate","f"),i.send(e),[2,r.result];case 2:return[2]}}))}))},e.prototype.urltoFile=function(e,t,o){return void 0===o&&(o=null),o=o||(e.match(/^data:([^;]+);/)||"")[1],this.http.request("GET",e,{responseType:"arraybuffer"}).pipe(s.map((function(e){var n=new Blob([e],{type:o});return n.name=t,n})))},e.prototype.getImage=function(e,t,o){return j(this,void 0,void 0,(function(){return q(this,(function(n){switch(n.label){case 0:return e&&e.fileId?[4,this.blobServiceRequestAccess(t,e.fileId,o).toPromise()]:[3,2];case 1:return[2,n.sent().result.locationURI];case 2:return[2]}}))}))},e.prototype.buildUrl=function(e,t){return"hcm/"+e+"/"+t},e.prototype.query=function(e,t,o){var n="queries/"+t;return this.http.post(this.buildUrl(e,n),o)},e.prototype.blobServiceRequestUpload=function(e,t){var o={fileName:t.fileName,thumbnail:!0};return this.http.post(this.buildUrl(e,"actions/blobServiceRequestUpload"),o)},e.prototype.blobServiceRequestAccess=function(e,t,o){var n={fileId:t,tll:2,thumbnail:o};return this.http.post(this.buildUrl(e,"actions/blobServiceRequestAccess"),n)},e.prototype.blobServiceFileDelete=function(e,t){var o={fileId:t,thumbnail:!0};return this.http.post(this.buildUrl(e,"actions/blobServiceDelete"),o)},e.ctorParameters=function(){return[{type:v.HttpClient}]},e=N([t.Injectable()],e)}(),Ye=function(){function e(e,o){this.imageCropService=e,this.toastService=o,this.service="payroll",this.onClickSave=new t.EventEmitter,this.defaulPerson="assets/default-person.png",this.display=!1,this.imageCrop=[],this.data={},this.cropperSettings=new S.CropperSettings,this.cropperSettings.width=100,this.cropperSettings.height=100,this.cropperSettings.keepAspect=!1,this.cropperSettings.preserveSize=!0,this.cropperSettings.canvasWidth=600,this.cropperSettings.canvasHeight=450,this.cropperSettings.rounded=!0,this.cropperSettings.minWithRelativeToResolution=!1,this.cropperSettings.noFileInput=!0,this.cropperSettings.cropperDrawSettings.strokeColor="rgba(255,255,255,1)",this.cropperSettings.cropperDrawSettings.strokeWidth=1}return Object.defineProperty(e.prototype,"image",{set:function(e){var t=this;e&&e.fileId&&!this.personPhotoLink&&this.imageCropService.blobServiceRequestAccess(this.service,e.fileId,!0).subscribe((function(e){t.personPhotoLink=e.result.locationURI}))},enumerable:!0,configurable:!0}),e.prototype.onUploadHandler=function(e){var t=this;if(this.file=e.files[0],this.file&&this.file.size>5e6)return this.file=null,this.imageCrop=[],void this.toastService.showError("O tamanho máximo permitido para a imagem é de 5MB");this.display=!1;var o=new Image,n=new FileReader;n.onloadend=function(e){o.src=e.target.result,t.cropper.setImage(o)},n.readAsDataURL(this.file),this.display=!0},e.prototype.ngOnInit=function(){this.data.image=null,this.personPhotoLink=null,this.personFirstName="",this.display=!1},e.prototype.showDialog=function(){this.display=!0},e.prototype.onHide=function(){this.display=!1},e.prototype.reset=function(){this.file=null,this.data={},this.imageCrop=[],this.cropper.reset(),this.data.image=null,this.personPhotoLink=null,this.personFirstName=""},e.prototype.saveImage=function(){return j(this,void 0,void 0,(function(){var e,t,o,n=this;return q(this,(function(r){switch(r.label){case 0:return this.file?(e=this.file.name,this.cropper&&this.cropper.image?[4,this.urltoFile(this.cropper.image.image,e)]:[3,2]):(this.onClickSave.emit(null),this.onHide(),[2]);case 1:t=r.sent(),this.personPhotoLink=this.data.image,o=null,this.file?o={fileName:this.file.name}:this.data&&(o={fileName:this.data.fileId.split("/")[1]}),o&&(this,this.imageCropService.blobServiceRequestUpload(this.service,o).subscribe((function(e){var o=new XMLHttpRequest;o.open("PUT",e.result.locationURI,!0),o.setRequestHeader("Translate","f"),o.send(t),n.onClickSave.emit(e.result),n.onHide()}))),r.label=2;case 2:return[2]}}))}))},e.prototype.urltoFile=function(e,t,o){return void 0===o&&(o=null),o=o||(e.match(/^data:([^;]+);/)||"")[1],fetch(e).then((function(e){return e.arrayBuffer()})).then((function(e){return new File([e],t,{type:o})}))},e.prototype.deleteImage=function(){this.imageCropService.blobServiceFileDelete(this.service,this.data&&this.data.image&&this.data.image.fileId),this.reset()},e.ctorParameters=function(){return[{type:Ue},{type:Be}]},N([t.Input()],e.prototype,"service",void 0),N([t.Output()],e.prototype,"onClickSave",void 0),N([t.ViewChild("cropper",{static:!1})],e.prototype,"cropper",void 0),N([t.Input()],e.prototype,"image",null),e=N([t.Component({selector:"image-crop",template:'<a (click)="showDialog()">\n <span class="result rounded">\n <img class="center-block" style="max-width: 100%; height: auto"\n [src]="personPhotoLink ? personPhotoLink : defaulPerson" [alt]="personFirstName"\n width="auto" height="140">\n </span>\n</a>\n\n<p-dialog [(visible)]="display" modal="true" [minWidth]="450" (onHide)="onHide()">\n <p-header>\n {{\'hcm.payroll.employees_image_cropper_edit\' | translate}}\n </p-header>\n\n <div class="ui-g" *ngIf="!data.image">\n <div class="ui-md-12 img-user-modal" *ngIf="!personPhotoLink">\n <i class="fa fa-user-circle fa-5x"></i>\n <div id="txt-select-image">{{\'hcm.payroll.employees_image_cropper_viewing\' | translate}}</div>\n <div class="ui-md-4 btn-center">\n <p-fileUpload [chooseLabel]="\'hcm.payroll.employees_image_cropper_select\'|translate"\n mode="basic"\n name="imageCrop[]"\n accept="image/*"\n customUpload="true"\n auto="true"\n [files]="imageCrop"\n (uploadHandler)="onUploadHandler($event)"\n >\n </p-fileUpload>\n </div>\n </div>\n </div>\n <div class="ui-g" *ngIf="!data.image">\n <div class="ui-md-4 btn-left" *ngIf="personPhotoLink">\n <p-fileUpload [chooseLabel]="\'hcm.payroll.employees_image_cropper_select\'|translate"\n mode="basic"\n name="imageCrop[]"\n accept="image/*"\n customUpload="true"\n auto="true"\n [files]="imageCrop"\n (uploadHandler)="onUploadHandler($event)"\n >\n </p-fileUpload>\n </div>\n <div class="ui-md-4 btn-left" *ngIf="personPhotoLink">\n <button pButton class="ui-button-secondary" type="button" (click)="deleteImage()"\n label="{{\'hcm.payroll.employees_image_cropper_delete\' | translate}}"></button>\n </div>\n <div class="ui-g-12 ui-md-12" *ngIf="personPhotoLink">\n <span class="result rounded">\n <img class="center-block default-image"\n [src]="personPhotoLink ? personPhotoLink : defaulPerson"\n [alt]="personFirstName"\n width="auto"\n height="140">\n </span>\n </div>\n </div>\n <div class="ui-g" [style.display]="data.image ? \'block\' : \'none\'">\n <div class="ui-md-4 btn-left">\n <p-fileUpload chooseLabel="Selecionar foto"\n mode="basic"\n name="imageCrop[]"\n accept="image/*"\n customUpload="true"\n auto="true"\n [files]="imageCrop"\n (uploadHandler)="onUploadHandler($event)"\n >\n </p-fileUpload>\n </div>\n <div class="ui-md-4 btn-left">\n <button pButton class="ui-button-secondary" type="button" (click)="deleteImage()"\n label="{{\'hcm.payroll.employees_image_cropper_delete\'|translate}}"></button>\n </div>\n <div class="ui-md-12">\n <img-cropper #cropper [image]="data" [settings]="cropperSettings"></img-cropper>\n </div>\n </div>\n\n <p-footer>\n <button pButton type="button" class="btn-link ui-button-link" (click)="display=false"\n label="{{\'hcm.payroll.employees_image_cropper_cancel\' | translate}}"></button>\n <button pButton type="button" (click)="saveImage()" label="{{\'hcm.payroll.employees_image_cropper_save\'|translate}}"></button>\n </p-footer>\n</p-dialog>\n',styles:[".center{float:left;position:relative;left:30%}.btn-center{float:left;position:relative;left:33%}.btn-left{float:left;position:relative}.rounded{cursor:pointer}.result.rounded>img{border-radius:50%}div.cropper{height:400px}.center-block{display:block;margin-right:auto;margin-left:auto}.ui-fileupload-choose{width:300px!important}.fa-user-circle{color:#ccc}.img-user-modal{text-align:center!important}#txt-select-image{margin:20px 0;font-weight:700;font-size:16px}"]})],e)}(),Ge=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,ue,w.DialogModule,_.ButtonModule,C.FileUploadModule,S.ImageCropperModule,S.ImageCropperModule,h.ThumbnailModule],declarations:[Ye],providers:[Ue,h.ImageCropperService],exports:[Ye]})],e)}(),He=y,We=function(){function e(e){this.localeService=e,this.onBlurGetMoment=new t.EventEmitter,this.modelChange=new t.EventEmitter,this.mask=null}return e.prototype.ngOnInit=function(){var e=this;this.localeService.get().subscribe((function(t){if(e.mask=e.formatMask(t),e.format=e.getFormat(),e.model){var o=e.model,n=He(o,e.format||"YYYY-MM-DD");n.isValid()?(e.model=n.format(e.format||"L"),e._date=n):e._date=null}}))},e.prototype.formatMask=function(e){this.locale=e;var t=this.locale.calendar.dateFormat.toString();return this.withoutDay&&(t=t.replace("dd/","").replace("-dd","")),(t=t.replace(/[d]|[m]/g,"9")).replace(/[y]/g,"99")},e.prototype.getFormat=function(){var e=this.locale.calendar.dateFormat.toString();return e=e.replace(/[y]/g,"YY"),this.withoutDay&&(e=e.replace("dd/","").replace("-dd","")),e.toUpperCase()},Object.defineProperty(e.prototype,"placeholder",{get:function(){return this.mask?this.mask.toString().replace(/[9]/g,"_"):""},enumerable:!0,configurable:!0}),e.prototype.onBlur=function(){var e=this.model;this._date=He(e,this.format),this.onBlurGetMoment.emit(this._date)},Object.defineProperty(e.prototype,"model",{get:function(){return this._model},set:function(e){this._model=e,this.modelChange.emit(this._model)},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:h.LocaleService}]},N([t.Input()],e.prototype,"name",void 0),N([t.Input()],e.prototype,"disabled",void 0),N([t.Input()],e.prototype,"withoutDay",void 0),N([t.Input()],e.prototype,"unmask",void 0),N([t.Input()],e.prototype,"style",void 0),N([t.Input()],e.prototype,"styleClass",void 0),N([t.Output()],e.prototype,"onBlurGetMoment",void 0),N([t.Output()],e.prototype,"modelChange",void 0),N([t.Input()],e.prototype,"model",null),e=N([t.Component({selector:"input-date-calendar-model",template:'<p-inputMask *ngIf="mask"\n [mask]="mask"\n (onBlur)="onBlur()"\n [unmask]="unmask"\n [placeholder]="placeholder"\n [disabled]="disabled"\n [(ngModel)]="model"\n [style]="style"\n [styleClass]="styleClass"\n></p-inputMask>\n'})],e)}(),ze=function(){function e(){}return e=N([t.NgModule({imports:[u.InputMaskModule,o.FormsModule,o.ReactiveFormsModule,p.CommonModule],declarations:[We],exports:[We]})],e)}(),$e=y;function Qe(e){return e&&"object"==typeof e&&!Array.isArray(e)}function Ke(e){return!Array.isArray(e)||!e.find((function(e){return"object"==typeof e}))}function Je(e){return 0===e||"boolean"==typeof e||null!=e&&""!==e}function Xe(e,t){return void 0===t&&(t=!0),!e||!Ze(e,t)||(t?$e(e.replace(/[^\d]+/g,""),"DDMMYYYY").isValid():$e(e.replace(/[^\d]+/g,""),"MMYYYY").isValid())}function Ze(e,t){if(void 0===t&&(t=!0),e){var o=void 0;return o=t?8:6,e.replace(/[^\d]+/g,"").length===o}return!0}function et(e,t){return-1!==e.search("Date")?tt(t):t}function tt(e,t,o){if(void 0===t&&(t="DDMMYYYY"),void 0===o&&(o="YYYY-MM-DD"),Je(e)){var n=ot(e,t);return $e(e.replace(/[^\d]+/g,""),n).format(o)}}function ot(e,t){return-1!==e.search("/")?"DDMMYYYY":-1!==e.search("-")?"YYYYMMDD":t}function nt(e){return void 0===e&&(e="YYYY-MM-DD"),$e().format(e)}function rt(e,t){void 0===t&&(t="DDMMYYYY");var o=ot(e,t);return $e(e.replace(/[^\d]+/g,""),o)}function it(e,t){return t?$e(e,t):$e(e)}function at(e){var t=[];return Object.entries(e).forEach((function(e){var o=U(e,2),n=o[0],r=o[1];t.push({field:n,value:r})})),t}function st(e){var t={};return e&&e.length&&e.forEach((function(e){"date"===e.type&&e.value&&(e.value=it(e.value).format("L")),t[e.field]=e.value})),t}function lt(){var e=this;Object.keys(this.controls).map((function(t){var n=e.get(t);n.markAsDirty(),(n instanceof o.FormGroup||n instanceof o.FormArray)&&lt.call(n)}))}function pt(e,t,n,r){n?(e.controls[t].setValidators(o.Validators.compose(r&&r.length?r:[o.Validators.required])),e.controls[t].updateValueAndValidity()):(e.controls[t].setValidators(null),e.controls[t].updateValueAndValidity())}function ct(e,t,o,n){t?o.forEach((function(t){return e.get(t).enable()})):(o.forEach((function(t){return e.get(t).disable()})),ht(e,n||o))}function ut(e,t,n){n&&n.length?(e.controls[t].setValidators(o.Validators.compose(n)),e.controls[t].updateValueAndValidity()):(e.controls[t].setValidators(null),e.controls[t].updateValueAndValidity())}function dt(e,t,o,n){void 0===n&&(n=!0),t?(e.get(o).disable(),n&&e.get(o).reset()):e.get(o).enable()}function mt(e,t){return void 0===t&&(t="ASC"),function(o,n){if(!o.hasOwnProperty(e)||!n.hasOwnProperty(e))return 0;var r="string"==typeof o[e]?o[e].toUpperCase():o[e],i="string"==typeof n[e]?n[e].toUpperCase():n[e],a=0;return r>i?a=1:r<i&&(a=-1),"DESC"===t?-1*a:a}}function ht(e,t){t.forEach((function(t){return e.get(t).reset()}))}function yt(e){if(e){var t=e.calendar.dateFormat.toString();return(t=(t=t.replace(/[y]/g,"YY")).replace(/[/]/g,"")).toUpperCase()}}function ft(e){return e?e.toString().replace(/[&\/\\#,+()$~%.'":*?<>{}-]/g,""):null}var gt=function(){function o(e){this.http=e}return o.prototype.query=function(t,o,n){return void 0===n&&(n=e.ServiceType.PAYROLL),this.http.query(t,o,n)},o.ctorParameters=function(){return[{type:Ne}]},o=N([t.Injectable()],o)}(),bt=function(){function o(o){this.service=o,this.forceSelection=!0,this.keyName="name",this.keyToExclude=[],this.usingType=[],this.minCharactersToSearch=3,this.multiple=!1,this.serviceType=e.ServiceType.PAYROLL,this.onBlur=new t.EventEmitter,this.onSelect=new t.EventEmitter,this.onClear=new t.EventEmitter,this.suggestions=[]}return o.prototype.ngOnInit=function(){},o.prototype.filterQuery=function(t){var o=this,n=t.query;if(!(isNaN(n)&&n.toString().length<this.minCharactersToSearch))try{if(this.isTimetrackingSituation)return this.service.query("autocompleteTimetrackingSituation",{valueSearch:n,referenceDate:this.referenceDate}).subscribe((function(e){return o.formaterResponce(e.result)}));if(this.isDismissalReason){var r={valueSearch:n};return this.referenceDate&&(r.referenceDate=this.referenceDate),this.service.query("autocompleteDismissalReason",r,e.ServiceType.GENERAL_REGISTER).subscribe((function(e){return o.formaterResponce(e.result)}))}if(this.usingType&&this.usingType.length)return this.service.query("autocompleteOtherCompanyFilterUsingType",{searchText:n,usingType:this.usingType}).subscribe((function(e){return o.formaterResponce(e.result)}));if(this.isDepartmentFromCompany)return this.service.query("autocompleteDepartmentQuery",{searchText:n,companyId:this.companyId,referenceDate:this.referenceDate}).subscribe((function(e){return o.formaterResponce(e.result)}));if(this.isWagetype){r={searchText:n,companyId:this.companyId};return this.service.query("autocompleteWagetypeQuery",r,e.ServiceType.ENTRY).subscribe((function(e){return o.formaterResponce(e.result)}))}this.service.query("autocomplete",this.getParamsRest(n),this.serviceType).subscribe((function(e){return o.formaterResponce(e.result)}))}catch(e){console.log(e)}},o.prototype.formaterResponce=function(e){var t=this;this.suggestions=[];var o=[];return e.map((function(e){var n={tableId:e.tableId,name:""};if(t.isTimetrackingSituation||t.isDismissalReason||t.usingType&&t.usingType.length){if(t.keyToExclude.includes(e.fields&&e.fields[2]&&e.fields[2].value))return;var r="";e.fields.map((function(e){n[e.name]=e.value})),r+=e.fields.filter((function(e){return"code"===e.name.toLowerCase()})).map((function(e){return e?e.value+=" - ":""}))[0],!t.usingType||!t.usingType.length||r&&"undefined"!==r||(r=""),r+=e.fields.filter((function(e){return"name"===e.name.toLowerCase()})).map((function(e){return e?e.value:""}))[0],n.name=r,o.push(n)}else{e.fields.map((function(e){n[e.name]=e.value}));var i="";t.concatFieldsForName?(t.concatFieldsForName.map((function(e){(e.includes("date")||e.includes("Birthday"))&&(n[e]=it(n[e]).format("DD/MM/YYYY")),i+=n[e]+" - "})),i=i.slice(0,-3)):(t.keyCode&&(i+=n[t.keyCode]+" - "),t.keyName&&(i+=n[t.keyName])),n.name=i,o.push(n)}})),this.suggestions=Y(o),o},o.prototype.getParamsRest=function(e){return{table:this.table,fields:this.fields,order:this.order,conditions:this.getConditionsRest(e),enableEntityFilters:this.enableEntityFilters}},o.prototype.getConditionsRest=function(e){var t=[{fields:this.conditionsFields||this.fields,expression:"LIKE",value:""+e}];return this.conditions&&this.conditions.map((function(e){(["IS_NULL","IS_NOT_NULL","IS_TRUE"].includes(e.expression)||Je(e.value))&&t.push(e)})),t},o.prototype.selectOption=function(e){this.onSelect.emit(e)},o.prototype.onClearItem=function(e){return j(this,void 0,void 0,(function(){return q(this,(function(t){switch(t.label){case 0:return[4,this.onClear.emit(e)];case 1:return t.sent(),this.form.get(this.name).reset(),[2]}}))}))},o.prototype.onBlurItem=function(e){this.isDropdown?this.isDropdown=!1:(this.form.controls[this.name].markAsDirty(),this.onBlur.emit(e))},o.prototype.onDropdownClick=function(){this.isDropdown=!0},Object.defineProperty(o.prototype,"autoCompleteObject",{get:function(){return this._autoCompleteObject},enumerable:!0,configurable:!0}),o.ctorParameters=function(){return[{type:gt}]},N([t.ViewChild("autoCompleteObject",{static:!0})],o.prototype,"_autoCompleteObject",void 0),N([t.Input()],o.prototype,"name",void 0),N([t.Input()],o.prototype,"table",void 0),N([t.Input()],o.prototype,"order",void 0),N([t.Input()],o.prototype,"enableEntityFilters",void 0),N([t.Input()],o.prototype,"fields",void 0),N([t.Input()],o.prototype,"conditionsFields",void 0),N([t.Input()],o.prototype,"conditions",void 0),N([t.Input()],o.prototype,"placeholder",void 0),N([t.Input()],o.prototype,"readonly",void 0),N([t.Input()],o.prototype,"required",void 0),N([t.Input()],o.prototype,"disabled",void 0),N([t.Input()],o.prototype,"dropdown",void 0),N([t.Input()],o.prototype,"forceSelection",void 0),N([t.Input()],o.prototype,"error",void 0),N([t.Input()],o.prototype,"emptyMessage",void 0),N([t.Input()],o.prototype,"keyCode",void 0),N([t.Input()],o.prototype,"keyName",void 0),N([t.Input()],o.prototype,"concatFieldsForName",void 0),N([t.Input()],o.prototype,"itemSelect",void 0),N([t.Input()],o.prototype,"form",void 0),N([t.Input()],o.prototype,"inputId",void 0),N([t.Input()],o.prototype,"isTimetrackingSituation",void 0),N([t.Input()],o.prototype,"isDepartmentFromCompany",void 0),N([t.Input()],o.prototype,"companyId",void 0),N([t.Input()],o.prototype,"referenceDate",void 0),N([t.Input()],o.prototype,"isDismissalReason",void 0),N([t.Input()],o.prototype,"keyToExclude",void 0),N([t.Input()],o.prototype,"usingType",void 0),N([t.Input()],o.prototype,"minCharactersToSearch",void 0),N([t.Input()],o.prototype,"isWagetype",void 0),N([t.Input()],o.prototype,"multiple",void 0),N([t.Input()],o.prototype,"serviceType",void 0),N([t.Output()],o.prototype,"onBlur",void 0),N([t.Output()],o.prototype,"onSelect",void 0),N([t.Output()],o.prototype,"onClear",void 0),o=N([t.Component({selector:"input-rest-auto-complete",template:'<div [formGroup]="form" >\n <p-autoComplete [suggestions]="suggestions"\n (completeMethod)="filterQuery($event)"\n [placeholder]="placeholder"\n [minLength]="1" [dropdown]="dropdown"\n field="name" size="50"\n [emptyMessage]="emptyMessage"\n [readonly]="readonly"\n [disabled]="disabled"\n [required]="required"\n [forceSelection]="forceSelection"\n (onSelect)="selectOption($event)"\n [formControlName]="name"\n (onClear)="onClearItem($event)"\n (onBlur)="onBlurItem($event)"\n (onDropdownClick)="onDropdownClick()"\n [inputId]="inputId"\n [autoHighlight]="true"\n [multiple]="multiple"\n #autoCompleteObject\n >\n <ng-template let-info pTemplate="item">\n <div class="ui-helper-clearfix">\n {{info.name}}\n </div>\n </ng-template>\n\n </p-autoComplete>\n</div>\n',styles:[""]})],o)}(),vt=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,v.HttpClientModule,E.AutoCompleteModule,ue,o.ReactiveFormsModule],declarations:[bt],providers:[gt],exports:[bt]})],e)}(),It=function(){function e(e){this.http=e}return e.prototype.query=function(e,t){var o="queries/"+e;return this.http.post(o,t)},e.ctorParameters=function(){return[{type:Ne}]},e=N([t.Injectable()],e)}(),kt=function(){function e(e){this.service=e,this.forceSelection=!0,this.keyName="name",this.onBlur=new t.EventEmitter,this.onSelect=new t.EventEmitter,this.onClear=new t.EventEmitter,this.suggestions=[]}return e.prototype.ngOnInit=function(){},e.prototype.filterQuery=function(e){var t=this,o=e.query;if(!(isNaN(o)&&o.toString().length<3))try{this.service.query("autocompleteEmployee",this.getParamsRest(o)).subscribe((function(e){return t.formaterResponce(e.result)}))}catch(e){console.log("Erro ao buscar no back")}},e.prototype.formaterResponce=function(e){this.suggestions=[];var t=[];return e.map((function(e){var o={tableId:e.tableId,code:"",name:"",fullname:"",admission:"",document:""};e.fields&&e.fields.length&&(o.fullname=e.fields[0].value,o.admission=e.fields[1].value,o.document=e.fields[2].value,o.code=4===e.fields.length&&e.fields[3].value,o.code?o.name=o.code.concat(" - ").concat(o.fullname).concat(" - ").concat(rt(o.admission).format("DD/MM/YYYY")):o.name=o.fullname.concat(" - ").concat(rt(o.admission).format("DD/MM/YYYY")),t.push(o))})),this.suggestions=t,t},e.prototype.getParamsRest=function(e){var t={valueSearch:e,timeTrackingResumeType:{key:"FIRED"},enableEntityFilters:this.enableEntityFilters};return this.company&&(t.company=this.company),this.branch&&(t.companyBranch=this.branch),this.employeeType&&(t.employeeType=this.employeeType),this.otherContractType&&(t.otherContractType=this.otherContractType),!1===this.filterEmployeeType&&(t.filterEmployeeType=this.filterEmployeeType),t},e.prototype.selectOption=function(e){this.onSelect.emit(e)},e.prototype.onClearItem=function(e){this.onClear.emit(e)},e.prototype.onBlurItem=function(e){this.isDropdown?this.isDropdown=!1:(this.form.controls[this.name].markAsDirty(),this.onBlur.emit(e))},e.prototype.onDropdownClick=function(){this.isDropdown=!0},e.ctorParameters=function(){return[{type:It}]},N([t.Input()],e.prototype,"name",void 0),N([t.Input()],e.prototype,"value",void 0),N([t.Input()],e.prototype,"company",void 0),N([t.Input()],e.prototype,"branch",void 0),N([t.Input()],e.prototype,"employeeType",void 0),N([t.Input()],e.prototype,"otherContractType",void 0),N([t.Input()],e.prototype,"filterEmployeeType",void 0),N([t.Input()],e.prototype,"enableEntityFilters",void 0),N([t.Input()],e.prototype,"placeholder",void 0),N([t.Input()],e.prototype,"readonly",void 0),N([t.Input()],e.prototype,"required",void 0),N([t.Input()],e.prototype,"disabled",void 0),N([t.Input()],e.prototype,"dropdown",void 0),N([t.Input()],e.prototype,"forceSelection",void 0),N([t.Input()],e.prototype,"error",void 0),N([t.Input()],e.prototype,"emptyMessage",void 0),N([t.Input()],e.prototype,"keyCode",void 0),N([t.Input()],e.prototype,"keyName",void 0),N([t.Input()],e.prototype,"itemSelect",void 0),N([t.Input()],e.prototype,"form",void 0),N([t.Input()],e.prototype,"inputId",void 0),N([t.Output()],e.prototype,"onBlur",void 0),N([t.Output()],e.prototype,"onSelect",void 0),N([t.Output()],e.prototype,"onClear",void 0),e=N([t.Component({selector:"input-rest-auto-complete-employee",template:'<div [formGroup]="form" >\n <p-autoComplete [suggestions]="suggestions"\n (completeMethod)="filterQuery($event)"\n [placeholder]="placeholder"\n [minLength]="1" [dropdown]="dropdown"\n field="name" size="50"\n [emptyMessage]="emptyMessage"\n [readonly]="readonly"\n [disabled]="disabled"\n [required]="required"\n [forceSelection]="forceSelection"\n (onSelect)="selectOption($event)"\n [formControlName]="name"\n (onClear)="onClearItem($event)"\n (onBlur)="onBlurItem($event)"\n (onDropdownClick)="onDropdownClick()"\n [inputId]="inputId"\n [autoHighlight]="true"\n >\n <ng-template let-info pTemplate="item">\n <div class="ui-helper-clearfix">\n {{info.name}}\n </div>\n </ng-template>\n\n </p-autoComplete>\n</div>\n',styles:[""]})],e)}(),St=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,v.HttpClientModule,E.AutoCompleteModule,ue,o.ReactiveFormsModule],declarations:[kt],providers:[It],exports:[kt]})],e)}(),_t=function(){function e(e){this.http=e}return e.prototype.query=function(e,t){var o="queries/"+e;return this.http.post(o,t)},e.ctorParameters=function(){return[{type:Ne}]},e=N([t.Injectable()],e)}(),wt=function(){function e(e){this.service=e,this.forceSelection=!0,this.keyName="name",this.onBlur=new t.EventEmitter,this.onSelect=new t.EventEmitter,this.onClear=new t.EventEmitter,this.modelChange=new t.EventEmitter,this.suggestions=[]}return e.prototype.ngOnInit=function(){},e.prototype.filterQuery=function(e){var t=this,o=e.query;if(!(isNaN(o)&&o.toString().length<3))try{this.service.query("autocompleteEmployee",this.getParamsRest(o)).subscribe((function(e){return t.formaterResponce(e.result)}))}catch(e){console.log("Erro ao buscar no back")}},e.prototype.formaterResponce=function(e){this.suggestions=[];var t=[];return e.map((function(e){var o={tableId:e.tableId,code:"",name:"",fullname:"",admission:"",document:""};e.fields&&e.fields.length&&(o.fullname=e.fields[0].value,o.admission=e.fields[1].value,o.document=e.fields[2].value,o.code=4===e.fields.length&&e.fields[3].value,o.code?o.name=o.code.concat(" - ").concat(o.fullname).concat(" - ").concat(rt(o.admission).format("DD/MM/YYYY")):o.name=o.fullname.concat(" - ").concat(rt(o.admission).format("DD/MM/YYYY")),t.push(o))})),this.suggestions=t,t},e.prototype.getParamsRest=function(e){var t={valueSearch:e,timeTrackingResumeType:{key:"FIRED"}};return this.company&&(t.company=this.company),this.branch&&(t.companyBranch=this.branch),this.employeeType&&(t.employeeType=this.employeeType),t},e.prototype.selectOption=function(e){this.onSelect.emit(e)},e.prototype.onClearItem=function(e){this.onClear.emit(e)},e.prototype.onBlurItem=function(e){this.onBlur.emit(e)},Object.defineProperty(e.prototype,"model",{get:function(){return this._model},set:function(e){this._model=e,this.modelChange.emit(this._model)},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:_t}]},N([t.Input()],e.prototype,"name",void 0),N([t.Input()],e.prototype,"value",void 0),N([t.Input()],e.prototype,"company",void 0),N([t.Input()],e.prototype,"branch",void 0),N([t.Input()],e.prototype,"employeeType",void 0),N([t.Input()],e.prototype,"placeholder",void 0),N([t.Input()],e.prototype,"readonly",void 0),N([t.Input()],e.prototype,"required",void 0),N([t.Input()],e.prototype,"disabled",void 0),N([t.Input()],e.prototype,"dropdown",void 0),N([t.Input()],e.prototype,"forceSelection",void 0),N([t.Input()],e.prototype,"error",void 0),N([t.Input()],e.prototype,"emptyMessage",void 0),N([t.Input()],e.prototype,"keyCode",void 0),N([t.Input()],e.prototype,"keyName",void 0),N([t.Input()],e.prototype,"itemSelect",void 0),N([t.Input()],e.prototype,"style",void 0),N([t.Input()],e.prototype,"inputStyle",void 0),N([t.Input()],e.prototype,"timeTrackingResumeType",void 0),N([t.Output()],e.prototype,"onBlur",void 0),N([t.Output()],e.prototype,"onSelect",void 0),N([t.Output()],e.prototype,"onClear",void 0),N([t.Output()],e.prototype,"modelChange",void 0),N([t.Input()],e.prototype,"model",null),e=N([t.Component({selector:"input-rest-auto-complete-employee-model",template:'<p-autoComplete [suggestions]="suggestions"\n (completeMethod)="filterQuery($event)"\n [placeholder]="placeholder"\n [minLength]="1" [dropdown]="dropdown"\n field="name" size="50"\n [emptyMessage]="emptyMessage"\n [readonly]="readonly"\n [disabled]="disabled"\n [required]="required"\n [forceSelection]="forceSelection"\n (onSelect)="selectOption($event)"\n (onClear)="onClearItem($event)"\n (onBlur)="onBlurItem($event)"\n [(ngModel)]="model"\n [autoHighlight]="true"\n [style]="style"\n [inputStyle]="inputStyle"\n appendTo="body"\n>\n <ng-template let-info pTemplate="item">\n <div class="ui-helper-clearfix">\n {{info.name}}\n </div>\n </ng-template>\n\n</p-autoComplete>\n',styles:[""]})],e)}(),Ct=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,ue,v.HttpClientModule,E.AutoCompleteModule,o.ReactiveFormsModule],declarations:[wt],providers:[_t],exports:[wt]})],e)}(),Dt=function(){function e(e){this.http=e}return e.prototype.query=function(e,t){var o={names:[t]};return this.http.enumQuery("enumQuery",o,e)},e.ctorParameters=function(){return[{type:Ne}]},e=N([t.Injectable()],e)}(),Tt=function(){function e(e){this.service=e,this.forceSelection=!0,this.keyToExclude=[],this.keyToKeep=[],this.multiple=!1,this.onSelect=new t.EventEmitter,this.onBlur=new t.EventEmitter,this.onClear=new t.EventEmitter,this.suggestions=[]}return e.prototype.ngOnInit=function(){var e=this;try{this.service.query(this.server,this.enumeration).subscribe((function(t){return e.payload=t.results[0].items}))}catch(e){console.log("Erro ao buscar no back")}},e.prototype.filterQuery=function(e){var t=this,o=e.query;if(this.suggestions=[],!(isNaN(o)&&o.toString().length<3)){this.keyToExclude&&this.keyToExclude.length?this.payload=this.payload&&this.payload.filter((function(e){return!t.keyToExclude.includes(e.key)})):this.keyToKeep&&this.keyToKeep.length&&(this.payload=this.payload&&this.payload.filter((function(e){return t.keyToKeep.includes(e.key)})));for(var n=0;n<this.payload.length;n++){var r=this.payload[n];-1!==r.value.toLowerCase().indexOf(o.toLowerCase())&&this.suggestions.push(r)}}},e.prototype.selectOption=function(e){this.onSelect.emit(e)},e.prototype.onBlurItem=function(e){this.isDropdown?this.isDropdown=!1:(this.form.controls[this.name].markAsDirty(),this.onBlur.emit(e))},e.prototype.onDropdownClick=function(){this.isDropdown=!0},e.prototype.onClearItem=function(e){return j(this,void 0,void 0,(function(){return q(this,(function(t){switch(t.label){case 0:return[4,this.onClear.emit(e)];case 1:return t.sent(),this.form.get(this.name).reset(),[2]}}))}))},Object.defineProperty(e.prototype,"autoCompleteObject",{get:function(){return this._autoCompleteObjectEl},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:Dt}]},N([t.ViewChild("autoCompleteObject",{static:!0})],e.prototype,"_autoCompleteObjectEl",void 0),N([t.Input()],e.prototype,"name",void 0),N([t.Input()],e.prototype,"placeholder",void 0),N([t.Input()],e.prototype,"readonly",void 0),N([t.Input()],e.prototype,"required",void 0),N([t.Input()],e.prototype,"disabled",void 0),N([t.Input()],e.prototype,"dropdown",void 0),N([t.Input()],e.prototype,"forceSelection",void 0),N([t.Input()],e.prototype,"error",void 0),N([t.Input()],e.prototype,"emptyMessage",void 0),N([t.Input()],e.prototype,"itemSelect",void 0),N([t.Input()],e.prototype,"inputId",void 0),N([t.Input()],e.prototype,"keyToExclude",void 0),N([t.Input()],e.prototype,"keyToKeep",void 0),N([t.Input()],e.prototype,"server",void 0),N([t.Input()],e.prototype,"enumeration",void 0),N([t.Input()],e.prototype,"form",void 0),N([t.Input()],e.prototype,"multiple",void 0),N([t.Output()],e.prototype,"onSelect",void 0),N([t.Output()],e.prototype,"onBlur",void 0),N([t.Output()],e.prototype,"onClear",void 0),e=N([t.Component({selector:"input-rest-auto-complete-enum",template:'<div [formGroup]="form">\n <p-autoComplete\n [suggestions]="suggestions"\n (completeMethod)="filterQuery($event)"\n [placeholder]="placeholder"\n [minLength]="1" [dropdown]="dropdown"\n field="value" size="50"\n [emptyMessage]="emptyMessage | translate"\n [readonly]="readonly"\n [disabled]="disabled"\n [required]="required"\n [forceSelection]="forceSelection"\n (onSelect)="selectOption($event)"\n [formControlName]="name"\n (onBlur)="onBlurItem($event)"\n (onClear)="onClearItem($event)"\n (onDropdownClick)="onDropdownClick()"\n [inputId]="inputId"\n [autoHighlight]="true"\n [multiple]="multiple"\n #autoCompleteObject\n >\n <ng-template let-info pTemplate="item">\n <div class="ui-helper-clearfix">\n {{info.value | translate}}\n </div>\n </ng-template>\n\n </p-autoComplete>\n</div>\n',styles:[""]})],e)}(),Et=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,v.HttpClientModule,E.AutoCompleteModule,ue,o.ReactiveFormsModule],declarations:[Tt],providers:[Dt],exports:[Tt]})],e)}(),Ft=function(){function o(e){this.http=e}return o.prototype.query=function(t,o,n){return void 0===n&&(n=e.ServiceType.PAYROLL),this.http.query(t,o,n)},o.ctorParameters=function(){return[{type:Ne}]},o=N([t.Injectable()],o)}(),Mt=function(){function o(e){this.service=e,this.forceSelection=!0,this.keyName="name",this.keysToExclude=[],this.onBlur=new t.EventEmitter,this.onSelect=new t.EventEmitter,this.onClear=new t.EventEmitter,this.onFocus=new t.EventEmitter,this.modelChange=new t.EventEmitter,this.suggestions=[]}return o.prototype.ngOnInit=function(){},o.prototype.filterQuery=function(t){var o=this,n=t.query;if(!(isNaN(n)&&n.toString().length<3))try{if(this.isWagetype){var r=B({searchText:n,companyId:this.companyId},this.wagetypeReferenceDates);return this.service.query("autocompleteWagetypeQuery",r,e.ServiceType.ENTRY).subscribe((function(e){return o.formaterResponce(e.result)}))}this.service.query("autocomplete",this.getParamsRest(n)).subscribe((function(e){return o.formaterResponce(e.result)}))}catch(e){console.log("Erro ao buscar no back")}},o.prototype.formaterResponce=function(e){var t=this;this.suggestions=[];var o=[];return e.map((function(e){var n={tableId:e.tableId,name:""};if(e.fields.map((function(e){n[e.name]=e.value})),!t.keysToExclude.includes(e&&e.tableId)){var r="";t.concatFieldsForName?(t.concatFieldsForName.map((function(e){e.includes("date")&&(n[e]=it(n[e]).format("L")),r+=n[e]+" - "})),r=r.slice(0,-3)):(t.keyCode&&(r+=n[t.keyCode]+" - "),t.keyName&&(r+=n[t.keyName])),n.name=r,o.push(n)}})),this.suggestions=o,o},o.prototype.getParamsRest=function(e){return{table:this.table,fields:this.fields,order:this.order,conditions:this.getConditionsRest(e)}},o.prototype.getConditionsRest=function(e){var t=[{fields:this.conditionsFields||this.fields,expression:"LIKE",value:""+e}];return this.conditions&&this.conditions.map((function(e){!["IS_NULL","IS_NOT_NULL","IS_TRUE"].includes(e.expression)&&Je(e.value)&&t.push(e)})),t},o.prototype.selectOption=function(e){this.onSelect.emit(e)},o.prototype.onClearItem=function(e){this.onClear.emit(e)},o.prototype.onBlurItem=function(e){this.onBlur.emit(e)},o.prototype.onFocusItem=function(e){this.onFocus.emit(e)},Object.defineProperty(o.prototype,"model",{get:function(){return this._model},set:function(e){this._model=e,this.modelChange.emit(this._model)},enumerable:!0,configurable:!0}),o.ctorParameters=function(){return[{type:Ft}]},N([t.Input()],o.prototype,"name",void 0),N([t.Input()],o.prototype,"table",void 0),N([t.Input()],o.prototype,"order",void 0),N([t.Input()],o.prototype,"fields",void 0),N([t.Input()],o.prototype,"conditionsFields",void 0),N([t.Input()],o.prototype,"conditions",void 0),N([t.Input()],o.prototype,"placeholder",void 0),N([t.Input()],o.prototype,"readonly",void 0),N([t.Input()],o.prototype,"required",void 0),N([t.Input()],o.prototype,"disabled",void 0),N([t.Input()],o.prototype,"dropdown",void 0),N([t.Input()],o.prototype,"forceSelection",void 0),N([t.Input()],o.prototype,"error",void 0),N([t.Input()],o.prototype,"emptyMessage",void 0),N([t.Input()],o.prototype,"keyCode",void 0),N([t.Input()],o.prototype,"keyName",void 0),N([t.Input()],o.prototype,"concatFieldsForName",void 0),N([t.Input()],o.prototype,"itemSelect",void 0),N([t.Input()],o.prototype,"style",void 0),N([t.Input()],o.prototype,"inputStyle",void 0),N([t.Input()],o.prototype,"keysToExclude",void 0),N([t.Input()],o.prototype,"isWagetype",void 0),N([t.Input()],o.prototype,"companyId",void 0),N([t.Input()],o.prototype,"wagetypeReferenceDates",void 0),N([t.Output()],o.prototype,"onBlur",void 0),N([t.Output()],o.prototype,"onSelect",void 0),N([t.Output()],o.prototype,"onClear",void 0),N([t.Output()],o.prototype,"onFocus",void 0),N([t.Output()],o.prototype,"modelChange",void 0),N([t.Input()],o.prototype,"model",null),o=N([t.Component({selector:"input-rest-auto-complete-model",template:'<p-autoComplete [suggestions]="suggestions"\n (completeMethod)="filterQuery($event)"\n [placeholder]="placeholder"\n [minLength]="1" [dropdown]="dropdown"\n field="name" size="50"\n [emptyMessage]="emptyMessage"\n [readonly]="readonly"\n [disabled]="disabled"\n [required]="required"\n [forceSelection]="forceSelection"\n (onSelect)="selectOption($event)"\n (onClear)="onClearItem($event)"\n (onBlur)="onBlurItem($event)"\n (onFocus)="onFocusItem($event)"\n [(ngModel)]="model"\n [autoHighlight]="true"\n [style]="style"\n [inputStyle]="inputStyle"\n appendTo="body"\n>\n <ng-template let-info pTemplate="item">\n <div class="ui-helper-clearfix">\n {{info.name}}\n </div>\n </ng-template>\n</p-autoComplete>\n',styles:[""]})],o)}(),Pt=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,v.HttpClientModule,E.AutoCompleteModule,ue,o.ReactiveFormsModule],declarations:[Mt],providers:[Ft],exports:[Mt]})],e)}(),At=function(){function e(e){this.http=e}return e.prototype.query=function(e,t){var o={names:[t]};return this.http.enumQuery("enumQuery",o,e)},e.ctorParameters=function(){return[{type:Ne}]},e=N([t.Injectable()],e)}(),Ot=function(){function e(e){this.service=e,this.forceSelection=!0,this.onSelect=new t.EventEmitter,this.onBlur=new t.EventEmitter,this.onClear=new t.EventEmitter,this.modelChange=new t.EventEmitter,this.suggestions=[]}return e.prototype.ngOnInit=function(){var e=this;try{this.service.query(this.server,this.enumeration).subscribe((function(t){return e.payload=t.results}))}catch(e){console.log("Erro ao buscar no back")}},e.prototype.filterQuery=function(e){var t=e.query;if(this.suggestions=[],!(isNaN(t)&&t.toString().length<3))for(var o=0;o<this.payload[0].items.length;o++){var n=this.payload[0].items[o];-1!==n.value.toLowerCase().indexOf(t.toLowerCase())&&this.suggestions.push(n)}},e.prototype.selectOption=function(e){this.onSelect.emit(e)},e.prototype.onBlurItem=function(e){this.onBlur.emit(e)},e.prototype.onClearItem=function(e){this.onClear.emit(e)},Object.defineProperty(e.prototype,"model",{get:function(){return this._model},set:function(e){this._model=e,this.modelChange.emit(this._model)},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:At}]},N([t.Input()],e.prototype,"name",void 0),N([t.Input()],e.prototype,"placeholder",void 0),N([t.Input()],e.prototype,"readonly",void 0),N([t.Input()],e.prototype,"required",void 0),N([t.Input()],e.prototype,"disabled",void 0),N([t.Input()],e.prototype,"dropdown",void 0),N([t.Input()],e.prototype,"forceSelection",void 0),N([t.Input()],e.prototype,"error",void 0),N([t.Input()],e.prototype,"emptyMessage",void 0),N([t.Input()],e.prototype,"itemSelect",void 0),N([t.Input()],e.prototype,"style",void 0),N([t.Input()],e.prototype,"inputStyle",void 0),N([t.Input()],e.prototype,"server",void 0),N([t.Input()],e.prototype,"enumeration",void 0),N([t.Output()],e.prototype,"onSelect",void 0),N([t.Output()],e.prototype,"onBlur",void 0),N([t.Output()],e.prototype,"onClear",void 0),N([t.Output()],e.prototype,"modelChange",void 0),N([t.Input()],e.prototype,"model",null),e=N([t.Component({selector:"input-rest-auto-complete-model-enum",template:'<p-autoComplete\n [suggestions]="suggestions"\n (completeMethod)="filterQuery($event)"\n [placeholder]="placeholder"\n [minLength]="1" [dropdown]="dropdown"\n field="value" size="50"\n [emptyMessage]="emptyMessage | translate"\n [readonly]="readonly"\n [disabled]="disabled"\n [required]="required"\n [forceSelection]="forceSelection"\n (onSelect)="selectOption($event)"\n (onBlur)="onBlurItem($event)"\n (onClear)="onClearItem($event)"\n [(ngModel)]="model"\n [autoHighlight]="true"\n [style]="style"\n [inputStyle]="inputStyle"\n appendTo="body"\n>\n <ng-template let-info pTemplate="item">\n <div class="ui-helper-clearfix">\n {{info.value | translate}}\n </div>\n </ng-template>\n</p-autoComplete>\n',styles:[""]})],e)}(),Lt=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,v.HttpClientModule,E.AutoCompleteModule,ue,o.ReactiveFormsModule],declarations:[Ot],providers:[At],exports:[Ot]})],e)}(),Rt=function(){function e(e){this.http=e}return e.prototype.query=function(e,t){var o="queries/"+e;return this.http.post(o,t)},e.ctorParameters=function(){return[{type:Ne}]},e=N([t.Injectable()],e)}(),xt=function(){function e(e){this.service=e,this.forceSelection=!0,this.minCharactersToSearch=3,this.multiple=!1,this.onBlur=new t.EventEmitter,this.onSelect=new t.EventEmitter,this.onClear=new t.EventEmitter,this.onFocus=new t.EventEmitter,this.suggestions=[]}return e.prototype.ngOnInit=function(){},e.prototype.filterQuery=function(e){var t=this,o=e.query;if(!(isNaN(o)&&o.toString().length<this.minCharactersToSearch))try{this.service.query("autocompleteJobpositionQuery",this.getParamsRest(o)).subscribe((function(e){return t.formaterResponse(e.result)}))}catch(e){console.log("Erro ao buscar no back")}},e.prototype.formaterResponse=function(e){this.suggestions=[];var t=[];return e.map((function(e){var o={tableId:e.tableId,name:""};e.fields.map((function(e){o[e.name]=e.value})),o.name=o.Code+" - "+o.Name,t.push(o)})),this.suggestions=t,t},e.prototype.getParamsRest=function(e){return{searchText:e,companyId:this.companyId?this.replace(this.companyId):null,creationDate:this.creationDate?this.replace(this.creationDate):null,expirationDate:this.expirationDate?this.replace(this.expirationDate):null,jobpositionsFilter:this.jobpositionsFilter?this.replaceArray(this.jobpositionsFilter):null,ignoredJobpositions:this.ignoredJobpositions?this.replaceArray(this.ignoredJobpositions):null,order:this.order}},e.prototype.replace=function(e){return e.replace(new RegExp("'","g"),"")},e.prototype.replaceArray=function(e){var t=this;return e.map((function(e){return t.replace(e)}))},e.prototype.selectOption=function(e){this.onSelect.emit(e)},e.prototype.onClearItem=function(e){this.onClear.emit(e)},e.prototype.onBlurItem=function(e){this.isDropdown?this.isDropdown=!1:(this.form.controls[this.name].markAsDirty(),this.onBlur.emit(e))},e.prototype.onDropdownClick=function(){this.isDropdown=!0},e.ctorParameters=function(){return[{type:Rt}]},N([t.Input()],e.prototype,"name",void 0),N([t.Input()],e.prototype,"value",void 0),N([t.Input()],e.prototype,"companyId",void 0),N([t.Input()],e.prototype,"creationDate",void 0),N([t.Input()],e.prototype,"expirationDate",void 0),N([t.Input()],e.prototype,"jobpositionsFilter",void 0),N([t.Input()],e.prototype,"ignoredJobpositions",void 0),N([t.Input()],e.prototype,"order",void 0),N([t.Input()],e.prototype,"placeholder",void 0),N([t.Input()],e.prototype,"readonly",void 0),N([t.Input()],e.prototype,"required",void 0),N([t.Input()],e.prototype,"disabled",void 0),N([t.Input()],e.prototype,"dropdown",void 0),N([t.Input()],e.prototype,"forceSelection",void 0),N([t.Input()],e.prototype,"error",void 0),N([t.Input()],e.prototype,"emptyMessage",void 0),N([t.Input()],e.prototype,"itemSelect",void 0),N([t.Input()],e.prototype,"form",void 0),N([t.Input()],e.prototype,"inputId",void 0),N([t.Input()],e.prototype,"minCharactersToSearch",void 0),N([t.Input()],e.prototype,"multiple",void 0),N([t.Output()],e.prototype,"onBlur",void 0),N([t.Output()],e.prototype,"onSelect",void 0),N([t.Output()],e.prototype,"onClear",void 0),N([t.Output()],e.prototype,"onFocus",void 0),e=N([t.Component({selector:"input-rest-auto-complete-jobposition",template:'<div [formGroup]="form" >\n <p-autoComplete [suggestions]="suggestions"\n (completeMethod)="filterQuery($event)"\n [placeholder]="placeholder"\n [minLength]="1" [dropdown]="dropdown"\n field="name" size="50"\n [emptyMessage]="emptyMessage"\n [readonly]="readonly"\n [disabled]="disabled"\n [required]="required"\n [forceSelection]="forceSelection"\n (onSelect)="selectOption($event)"\n [formControlName]="name"\n (onClear)="onClearItem($event)"\n (onBlur)="onBlurItem($event)"\n (onDropdownClick)="onDropdownClick()"\n [inputId]="inputId"\n [autoHighlight]="true"\n [multiple]="multiple"\n >\n <ng-template let-info pTemplate="item">\n <div class="ui-helper-clearfix">\n {{info.name}}\n </div>\n </ng-template>\n\n </p-autoComplete>\n</div>\n',styles:[""]})],e)}(),Bt=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,v.HttpClientModule,E.AutoCompleteModule,m.SharedModule,o.ReactiveFormsModule],declarations:[xt],providers:[Rt],exports:[xt]})],e)}(),Nt=function(){function e(e){this.http=e}return e.prototype.query=function(e,t){var o="queries/"+e;return this.http.post(o,t)},e.prototype.queryEntity=function(e,t){return this.http.get(e)},e.ctorParameters=function(){return[{type:Ne}]},e=N([t.Injectable()],e)}(),jt=function(){function e(e,o){this.translateService=e,this.service=o,this.arguments={page:{current:1,size:"10"}},this.alwaysShowPaginator=!1,this.onLoadPayload=new t.EventEmitter,this.loadedList=new t.EventEmitter}return e.prototype.ngOnInit=function(){},e.prototype.ngOnChanges=function(e){e.hasOwnProperty("arguments")&&(this.arguments=Object.assign({},e.arguments.currentValue),this.getList(1)),e.hasOwnProperty("reload")&&!0===e.reload.currentValue&&this.getList(1)},e.prototype.getList=function(e){var t=this;this.loadedList.emit(!0);try{var o=Object.assign({},this.arguments);o.page.current=e,this.isEntity?this.service.queryEntity(this.urlRest,o).subscribe((function(o){t.onResponseQuery(o,e),t.loadedList.emit(!1)})):this.service.query(this.urlRest,o).subscribe((function(o){t.onResponseQuery(o.result,e),t.loadedList.emit(!1)}))}catch(e){console.log("Erro ao tentar buscar lista no back")}},e.prototype.onResponseQuery=function(e,t){this.payload=this.filterValues?this.filterValues.bind(this.scope)(e[this.keyPayload]):e[this.keyPayload],this.onLoadPayload.emit({result:e[this.keyPayload],page:t}),this.totalRecords=this.isEntity?e.totalElements:e.countResult},e.prototype.onHandlePage=function(e){var t=e.first/e.rows+1;this.getList(t)},e.prototype.getRowActions=function(e){return this.getRowActionsFun.call(this.scope,e)},e.prototype.handleClickActions=function(e){e.containerViewChild.nativeElement.getElementsByClassName("ui-splitbutton-menubutton")[0].click()},e.ctorParameters=function(){return[{type:a.TranslateService},{type:Nt}]},N([t.Input()],e.prototype,"emptyMessage",void 0),N([t.Input()],e.prototype,"urlRest",void 0),N([t.Input()],e.prototype,"keyPayload",void 0),N([t.Input()],e.prototype,"columns",void 0),N([t.Input()],e.prototype,"arguments",void 0),N([t.Input()],e.prototype,"filterValues",void 0),N([t.Input()],e.prototype,"getRowActionsFun",void 0),N([t.Input()],e.prototype,"scope",void 0),N([t.Input()],e.prototype,"reload",void 0),N([t.Input()],e.prototype,"isEntity",void 0),N([t.Input()],e.prototype,"alwaysShowPaginator",void 0),N([t.Output()],e.prototype,"onLoadPayload",void 0),N([t.Output()],e.prototype,"loadedList",void 0),e=N([t.Component({selector:"list-rest",template:'<p-table [value]="payload" reorderableColumns="true" [rows]="10" [totalRecords]="totalRecords" [paginator]="true" [pageLinks]="8"\n [alwaysShowPaginator]="alwaysShowPaginator" [responsive]="true" [lazy]="true" (onPage)="onHandlePage($event)">\n <p-column *ngFor="let col of columns;" [field]="col[\'field\']" [header]="col[\'label\']|translate" [style]="{\'border\':\'none\',\'height\':\'60px\',\'text-align\':\'left\',\'background-color\':\'#FFFFFF\'}">\n <ng-template let-data="rowData" pTemplate="body">\n <span>{{data[col[\'field\']]}}</span>\n </ng-template>\n </p-column>\n\n <p-column [style]="{\'border\':\'none\',\'height\':\'60px\',\'text-align\':\'left\',\'background-color\':\'#FFFFFF\', \'overflow\': \'inherit\'}">\n <ng-template let-data="rowData" pTemplate="body">\n <p-splitButton *ngIf="getRowActions(data).length > 1" label="{{\'hcm.payroll.action\' | translate}} &#9660;" [model]="getRowActions(data)"\n (onClick)="handleClickActions(button)" #button></p-splitButton>\n <button *ngIf="getRowActions(data).length <= 1" type="button" class="sds-button-aux aux-secondary" (click)="getRowActions(data)[0].command()">\n {{getRowActions(data)[0].label}}\n </button>\n </ng-template>\n </p-column>\n\n <ng-template pTemplate="emptymessage">\n {{ emptyMessage }}\n </ng-template>\n</p-table>\n',styles:["tr{border:1px solid #ddd!important}"]})],e)}(),qt=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,ue,v.HttpClientModule,b.TableModule,d.InputTextModule,_.ButtonModule,F.SplitButtonModule],declarations:[jt],providers:[Nt],exports:[jt]})],e)}(),Vt=function(){function e(){}return e=N([t.Component({selector:"spinner-loader",template:"<p-progressSpinner></p-progressSpinner>\n"})],e)}(),Ut=function(){function e(){}return e=N([t.NgModule({imports:[o.FormsModule,r.ProgressSpinnerModule],declarations:[Vt],exports:[Vt]})],e)}(),Yt=function(){function e(){this.company={},this.contractNationality={},this.contractType={}}return e.prototype.setCompany=function(e){this.company=e},e.prototype.getCompanyId=function(){return this.company.companyId},e.prototype.setContractNationality=function(e){this.contractNationality=e},e.prototype.isBrazilianAdmission=function(){return"BR"===this.company.abbreviation&&"National"===this.contractNationality.key},e.prototype.isBrazilAndforeignContract=function(){return"BR"===this.company.abbreviation&&"National"!==this.contractNationality.key},e.prototype.isForeignAdmission=function(){return"BR"!==this.company.abbreviation&&"National"===this.contractNationality.key},e.prototype.isForeignAndforeignContract=function(){return"BR"!==this.company.abbreviation&&"National"!==this.contractNationality.key},e.prototype.isBrazilianCompany=function(){return"BR"===this.company.abbreviation},e.prototype.isNationalContract=function(){return"National"===this.contractNationality.key},e.prototype.getCountryID=function(){return this.company.id},Object.defineProperty(e.prototype,"contractNationalityKey",{get:function(){return this.contractNationality.key},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"abbreviation",{get:function(){return this.company.abbreviation},enumerable:!0,configurable:!0}),e.prototype.getCurrency=function(){return this.company.currency},e.prototype.getStructureID=function(){return this.company.structure},e.prototype.setContractType=function(e){this.contractType=e},Object.defineProperty(e.prototype,"contractTypeKey",{get:function(){return this.contractType?this.contractType.key:this.contractType},enumerable:!0,configurable:!0}),e=N([t.Injectable()],e)}(),Gt=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule],providers:[Yt]})],e)}(),Ht=y;function Wt(e){return/^\d*$/.test(e)}function zt(e){return e||!1}function $t(e){return Wt(zt(e))?Number.parseInt(e):0}var Qt=function(){function e(e){this.http=e,this.companyUseWorkstationGroupSubject=new f.Subject}return e.prototype.getCompanyIndications=function(e,t){return this.http.query("companyIndicationQuery",{companyId:e,companyIndicationType:t}).pipe(s.map((function(e){return e.result})))},e.prototype.setCompanyUseWorkstationGroup=function(e){this.companyUseWorkstationGroupSubject.next(e)},e.prototype.setStructure=function(e){this.structure=e},e.prototype.getStructure=function(){return this.structure},e.prototype.getCompanyUseWorkstationGroup=function(){return this.companyUseWorkstationGroupSubject.asObservable()},e.prototype.setUseWorkstationGroup=function(e){this.useWorkstationGroup=e},e.prototype.getUseWorkstationGroup=function(){return this.useWorkstationGroup},e.ctorParameters=function(){return[{type:Ne}]},e=N([t.Injectable()],e)}(),Kt=function(){function e(e){this.http=e}return e.prototype.hasModule=function(e){return this.http.query("hasModule",{module:e})},e.ctorParameters=function(){return[{type:Ne}]},e=N([t.Injectable()],e)}(),Jt=y,Xt=function(){function e(e,t,o){this.http=e,this.messageService=t,this.translateService=o,this._httpParams=new v.HttpParams}return e.prototype.lookupRequestPost=function(e,t,o,n){return void 0===o&&(o=null),this.httpPostParams=e,this.postConfigPageSize(e),this.lookupDisplayField=n,this.concatFields=o,this.postDataLookup(t)},e.prototype.postConfigPageSize=function(e){e&&(this.httpPostParams.page.size=e.page&&e.page.size?e.page.size:10,this.httpPostParams.page.current=e.page&&e.page.current?e.page.current:0)},e.prototype.lookupRequest=function(e,t,o,n,r,i,a,s){return void 0===a&&(a=[]),void 0===s&&(s=[]),this.searchLookupFields=o,this.endpoint=t,this.parameters=s,this.concatFields=r,this.concatOtherFields=a,this.lookupDisplayField=i,this.searchFields=n,this.generateLookupParameters(e),this.configHttpParamsPagination("10","0"),this.configHttpParamsOrderBy(e.multiSortMeta),this.getDataLookup()},e.prototype.searchRequest=function(e,t,o,n,r,i,a){return void 0===i&&(i=[]),void 0===a&&(a=[]),this.endpoint=t,this.parameters=a,this.concatFields=n,this.concatOtherFields=i,this.lookupDisplayField=r,this.searchFields=o,this.generateGridParameters(e.filterData),this.configHttpParamsPagination(e.rows.toString(),Math.floor(e.first/e.rows).toString()),this.configHttpParamsOrderBy(e.multiSortMeta),this.getDataLookup()},e.prototype.getDataLookup=function(){var e=this;return this.getUrlDataLookup(this.endpoint,this.httpParams).pipe(s.map((function(t){var o=t.contents;return e.concatFields&&e.concatFields.length&&o.map((function(t){e.convertGridFieldValue(t),t[e.lookupDisplayField]=e.generateDisplayFieldValue(B({},t))})),t})))},e.prototype.postDataLookup=function(e){var t=this;return this.postUrlDataLookup(e,this.httpPostParams).pipe(s.map((function(e){var o=e.contents;return t.concatFields&&t.concatFields.length&&o.map((function(e){t.concatOtherFields&&t.convertGridFieldValue(e),e[t.lookupDisplayField]=t.generateDisplayFieldValue(B({},e))})),e})))},e.prototype.convertLookupFieldValue=function(e,t){if(e)switch(t.type){case h.FieldType.Date:e=Jt(e).format("L");break;case h.FieldType.Enum:var o=t.options.filter((function(t){return t.value===e}))[0];e=o?o.label:e}return e},e.prototype.convertGridFieldValue=function(e){e&&this.concatOtherFields.forEach((function(t){switch(t.type){case h.FieldType.Enum:var o=t.options.filter((function(o){return o.value===e[t.name]}))[0];e[t.name]=o?o.label:e[t.name]}}))},e.prototype.generateDisplayFieldValue=function(e){var t=this,o="";return this.concatFields.forEach((function(n){var r=t.convertLookupFieldValue(e[n.name],n);r&&(o?o+=" - "+r:o=r)})),o},e.prototype.generateLookupParameters=function(e){var t=this,o="";this.searchLookupFields.forEach((function(n){var r=t.searchFields.filter((function(e){return n===e.name}))[0];o?o+=" or "+t.getParameterByType(r.type,n,e):o=""+t.getParameterByType(r.type,n,e)})),this.parameters.forEach((function(e){o?o+=" and "+e.toString():o=""+e.toString()})),this.httpParams=(new v.HttpParams).set("filter",o)},e.prototype.generateGridParameters=function(e){var t=this,o="";Object.keys(e).forEach((function(n){if(e[n]){var r=t.searchFields.filter((function(e){return n===e.name}))[0];o+=o?" and "+t.getParameterByType(r.type,n,e[n]):t.getParameterByType(r.type,n,e[n])}})),this.parameters.forEach((function(e){o?o+=" and "+e.toString():o=""+e.toString()})),this.httpParams=(new v.HttpParams).set("filter",o)},e.prototype.getParameterByType=function(e,t,o){switch(e){case h.FieldType.Date:return t+" eq '"+Jt(o).format("YYYY-MM-DD")+"'";case h.FieldType.Enum:return t+" eq '"+o+"'";case h.FieldType.Integer:return t+" eq "+o;case h.FieldType.Autocomplete:return t+" eq '"+o.id+"'";default:return"containing(lower("+t+"), lower('"+o+"'))"}},e.prototype.configHttpParamsPagination=function(e,t){this.httpParams=this.httpParams.set("size",e),this.httpParams=this.httpParams.set("offset",t)},e.prototype.configHttpParamsOrderBy=function(e){if(e&&e.length){var t="";e.map((function(e){t+=t?","+e.field+"+"+(1===e.order?"asc":"desc"):e.field+"+"+(1===e.order?"asc":"desc")})),this.httpParams=this.httpParams.set("orderby",t)}},Object.defineProperty(e.prototype,"httpParams",{get:function(){return this._httpParams},set:function(e){this._httpParams=e},enumerable:!0,configurable:!0}),e.prototype.getUrlDataLookup=function(e,t){var o=this;return t?this.http.get(""+e,{params:t}).pipe(s.catchError((function(e){return e&&403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed_search"),sticky:!0}),f.throwError(e)}))):this.http.get(""+e).pipe(s.catchError((function(e){return e&&403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed_search"),sticky:!0}),f.throwError(e)})))},e.prototype.postUrlDataLookup=function(e,t){var o=this;return t?this.http.post(""+e,B({},t)).pipe(s.catchError((function(e){return 403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)}))):this.http.post(""+e,{}).pipe(s.catchError((function(e){return 403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)})))},e.ctorParameters=function(){return[{type:v.HttpClient},{type:I.MessageService},{type:a.TranslateService}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(v.HttpClient),t.ɵɵinject(M.MessageService),t.ɵɵinject(a.TranslateService))},token:e,providedIn:"root"}),e=N([t.Injectable({providedIn:"root"})],e)}(),Zt=y,eo=function(){function o(e){this.httpClienteService=e}return o.prototype.getAutoComplete=function(e,t,o,n,r){var i=this.generateGridParameters(t,o,n);return this.httpClienteService.getAutoComplete(e,i,r).pipe(s.map((function(e){return e&&e.contents})))},o.prototype.getAutoCompleteQuery=function(e,t){return this.httpClienteService.query(e,t).pipe(s.map((function(e){return e&&e.result})))},o.prototype.generateGridParameters=function(t,o,n){var r=this,i="";return Object.keys(t).forEach((function(a){var s,l=o&&o.filter((function(e){return a===e.name}))[0],p="",c=l&&l.type;l||a==e.CoreFieldType.searchValue||(c=h.FieldType.String),l||a!==e.CoreFieldType.searchValue||(c=e.CoreFieldType.searchValue),i&&(p=" and "),(s=r.getParameterByType(c,a,t[a],n))&&(i+=" "+p+" "+s)})),i},o.prototype.getParameterByType=function(t,o,n,r){if(!n&&t!=e.CoreFieldType.searchValue)return o+" is null";if(n&&"not null"===n&&t!=e.CoreFieldType.searchValue)return o+" is not null";switch(t){case h.FieldType.Date:return o+" eq '"+Zt(n).format("YYYY-MM-DD")+"'";case h.FieldType.Enum:return o+" eq '"+n+"'";case h.FieldType.Integer:return o+" eq "+n;case h.FieldType.Autocomplete:return o+" eq '"+n.id+"'";case e.CoreFieldType.searchValue:return""+this.getParameterBySearchType(n,r);default:return this.getSearchFilterString(o,n)}},o.prototype.getParameterBySearchType=function(e,t){var o,n,r="";if(e){try{for(var i=V(Object.entries(e)),a=i.next();!a.done;a=i.next()){var s=U(a.value,2),l=s[0],p=s[1];if("code"===l&&Number(p)){var c=t?"'":"";r+=r?" or "+l+" eq "+c+p+c:l+" eq "+c+p+c}else"code"!=l&&(r+=r?" or "+this.getSearchFilterString(l,p):this.getSearchFilterString(l,p))}}catch(e){o={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}r=r?"("+r+")":""}return r},o.prototype.getSearchFilterString=function(e,t){return"containing(lower("+e+"), lower('"+t+"'))"},o.ctorParameters=function(){return[{type:Ne}]},o.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new o(t.ɵɵinject(Ne))},token:o,providedIn:"root"}),o=N([t.Injectable({providedIn:"root"})],o)}(),to="platform/report/queries/getParameters",oo="platform/report/queries/getReportUri",no="platform/report/queries/getReportStatus",ro="platform/report/queries/findReportsByName",io="platform/report/queries/getRunningReports",ao="platform/report/actions/generateReport",so=function(){function e(e){this.http=e}return e.prototype.findReportsByName=function(e){return this.http.post(""+ro,{name:e}).pipe(s.map((function(e){return e.reports?e.reports:[]})))},e.prototype.findReportByName=function(e){return e=e||"",this.findReportsByName(e).pipe(s.map((function(t){var o=t&&t.filter((function(t){return t.name&&t.name===e}));return o&&1==o.length?o[0]:null})))},e.prototype.getParameters=function(e,t){return this.http.post(""+to,{id:e,reportFileId:t}).pipe(s.map((function(e){return e||null})))},e.prototype.getReportUri=function(e){return this.http.post(""+oo,{reportTicket:e}).pipe(s.map((function(e){return e&&e.reportUri})))},e.prototype.getReportStatus=function(e){return this.http.post(""+no,{reportTicket:e}).pipe(s.map((function(e){return e&&e.reportStatus})))},e.prototype.generateReport=function(e){return this.http.post(""+ao,e).pipe(s.map((function(e){return e||null})))},e.prototype.getRunningReports=function(e,t){return this.http.post(""+io,{offset:e,limit:t,orderByDesc:!0,filterCancelled:!0})},e.ctorParameters=function(){return[{type:v.HttpClient}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(v.HttpClient))},token:e,providedIn:"root"}),e=N([t.Injectable({providedIn:"root"})],e)}(),lo=function(){function e(){this.useWorkflowValueChange=new f.Subject,this._draftJSON=new f.BehaviorSubject(null)}return e.prototype.setUseWorkflow=function(e){this.useWorkflowValueChange.next(e)},e.prototype.getUseWorkflow=function(){return this.useWorkflowValueChange.asObservable()},e.prototype.setDraftJSON=function(e){this._draftJSON.next(e)},e.prototype.getDraftJSON=function(){return this._draftJSON.asObservable()},e=N([t.Injectable()],e)}(),po=function(){function e(){this.resetDivergentFormData()}return e.prototype.resetDivergentFormData=function(){this._divergentFormData={}},e.prototype.checkFormDisagreements=function(e){var t=this;void 0===e&&(e=!1),this.resetDivergentFormData(),this._sanitizeEmptyStrings(),e&&this._removeIdsFromFormDatas(),this._oldFormData===this._newFormData?this._throwIdenticalMessage():(Object.keys(this._oldFormData).forEach((function(e){t._oldFormData[e]!==t._newFormData[e]&&(t._divergentFormData[e]=t._createDivergencePair(e))})),Object.keys(this._newFormData).forEach((function(e){t._newFormData[e]!==t._oldFormData[e]&&(t._divergentFormData[e]=t._createDivergencePair(e))})),this._isDivergentFormDataEmpty&&this._throwIdenticalMessage())},e.prototype._removeIdsFromFormDatas=function(){[this._oldFormData,this._newFormData].forEach((function(e){delete e.id}))},e.prototype._sanitizeEmptyStrings=function(){[this._oldFormData,this._newFormData].forEach((function(e){Object.keys(e).map((function(t){""===e[t]&&(e[t]=null)}))}))},e.prototype._createDivergencePair=function(e){var t={oldValue:null,newValue:null};return t.oldValue=this._oldFormData[e],t.newValue=this._newFormData[e],t},e.prototype._throwIdenticalMessage=function(){throw new Error("The objects oldFormData and newFormData are identical")},Object.defineProperty(e.prototype,"oldFormData",{get:function(){return this._oldFormData},set:function(e){this._oldFormData=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"newFormData",{get:function(){return this._newFormData},set:function(e){this._newFormData=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"divergentFormArray",{get:function(){var e=[];return Object.entries(this._divergentFormData).map((function(t){var o=U(t,2),n=o[0],r=o[1],i={key:null,oldValue:null,newValue:null};i.key=n,i.oldValue=r.oldValue,i.newValue=r.newValue,e.push(i)})),e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_isDivergentFormDataEmpty",{get:function(){return 0===Object.entries(this._divergentFormData).length},enumerable:!0,configurable:!0}),e=N([t.Injectable()],e)}(),co=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule],providers:[Qt,Kt,Xt,eo,so,lo,po]})],e)}(),uo=function(){function e(e){var t=this;this.http=e,this.actionUrl="platform/authorization/queries/checkAccess",this.resourceAddress="res://senior.com.br/hcm/payroll/",this.defaultActions=["Visualizar","Incluir","Editar","Excluir"],this._resources=[],this._attributes=[],P.user.getAuthHeader().then((function(e){t.httpOptions={headers:new v.HttpHeaders({"Content-Type":"application/json",Accept:"application/json",Authorization:e})}})),P.service.getRestUrl().then((function(e){return t.restUrl=e}))}return e.prototype.get=function(e){var t=this;return void 0===e&&(e=""),this.permissions?this.observable=f.Observable.of(this.permissions):this.observable||(this.observable=this.getPermissions().pipe(s.map((function(e){return t.permissions=e})))),this.observable.pipe(s.map((function(t){return e?t[e]:t})))},e.prototype.getAbac=function(e,t){return this.attributes=t,this.getAbacPermission(e)},e.prototype.getAbacPermission=function(e){return this.http.post(this.actionUrl,{includeFilters:!1,permissions:[{resource:""+this.resourceAddress+e,action:"Visualizar",attributes:this._attributes.map((function(e){return{attribute:e.name,value:e.value}}))}]},this.httpOptions)},e.prototype.getPermissions=function(){var e=this,t=[];return this._resources.forEach((function(o){return e.defaultActions.forEach((function(n){return t.push({action:n,resource:""+e.resourceAddress+o})}))})),this.http.post(this.actionUrl,{includeFilters:!1,permissions:Y(t)},this.httpOptions).pipe(s.map((function(t){var o=t.permissions,n={};return o.forEach((function(t){var o=t.resource.replace(e.resourceAddress,"");n[o]=n[o]||{},n[o][t.action.toLowerCase()]=t.authorized})),n})))},Object.defineProperty(e.prototype,"attributes",{set:function(e){this._attributes=e},enumerable:!0,configurable:!0}),e.prototype.setResources=function(e){this._resources=e},e.ctorParameters=function(){return[{type:v.HttpClient}]},e=N([t.Injectable()],e)}(),mo=function(){function e(e,t,o){this.toastService=e,this.messageService=t,this.translateService=o,this.key="TOAST",this.breakLine=!1,this.ngUnsubscribe=new f.Subject}return e.prototype.ngOnInit=function(){var e=this;this.toastService.loadErrorMessages().pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.createErrorMessage(t&&t.message),e.breakLine=t&&t.breakLine})),this.toastService.loadSuccessMessages().pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.createSuccessMessage(t&&t.message),e.breakLine=t&&t.breakLine})),this.toastService.loadWarningMessages().pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.createWarningMessage(t&&t.message),e.breakLine=t&&t.breakLine}))},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(!0),this.ngUnsubscribe.complete()},e.prototype.createErrorMessage=function(e,t){this.messageService.clear(),this.messageService.add({severity:"error",summary:t||this.translateService.instant("hcm.payroll.error"),detail:e,sticky:!0,key:this.key})},e.prototype.createSuccessMessage=function(e,t){this.messageService.add({severity:"success",summary:t||this.translateService.instant("hcm.payroll.success"),detail:e,key:this.key})},e.prototype.createWarningMessage=function(e,t){this.messageService.add({severity:"warn",summary:t||this.translateService.instant("hcm.payroll.warn"),detail:e,sticky:!0,key:this.key})},e.ctorParameters=function(){return[{type:Be},{type:I.MessageService},{type:a.TranslateService}]},e=N([t.Component({selector:"c-toast",template:"\n <p-toast [ngClass]=\"breakLine ? 'ui-toast-break-line' : ''\" [key]=\"key\"></p-toast>\n "})],e)}(),ho=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,ue,A.ToastModule],declarations:[mo],providers:[Be,I.MessageService],exports:[mo]})],e)}(),yo=function(){function e(e){this.http=e}return e.prototype.getList=function(e,t){return this.http.get(""+e,{params:t})},e.ctorParameters=function(){return[{type:v.HttpClient}]},e=N([t.Injectable()],e)}(),fo=function(){function o(e){this.dataListService=e,this.rows=10,this.paginator=!0,this.first=0,this.alwaysShowPaginator=!0,this.sortMode="multiple",this.lazyLoad=new t.EventEmitter,this.loadingChange=new t.EventEmitter,this.totalRecordsChange=new t.EventEmitter,this.listDataChange=new t.EventEmitter,this.selectedDataChange=new t.EventEmitter,this.headerCheckboxToggle=new t.EventEmitter,this._httpParams=new v.HttpParams,this.ngUnsubscribe=new f.Subject}return o.prototype.ngOnInit=function(){this.lazy||this.getlistData()},o.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},o.prototype.getActions=function(e,t){return this.actions(e,t)},o.prototype.handleClickActions=function(e){e.containerViewChild.nativeElement.getElementsByClassName("ui-splitbutton-menubutton")[0].click()},o.prototype.pagination=function(e){this.lazy||this.getlistData(e.rows,Math.floor(e.first/e.rows))},o.prototype.onLazyLoad=function(t){var o=this;this.loading=!0,t.multiSortMeta&&t.multiSortMeta.length&&(this.orderBy=[],t.multiSortMeta.map((function(t){o.orderBy.push({field:t.field,direction:1===t.order?e.DirectionEnumeration.ASC:e.DirectionEnumeration.DESC})}))),this.getlistData(t.rows,Math.floor(t.first/t.rows))},o.prototype.onFilter=function(){this.lazy&&(this.loading=!0),this.getlistData()},Object.defineProperty(o.prototype,"recordsMessage",{get:function(){return(this.totalRecords||0)+" "+(1===this.totalRecords?this.singularMessageRecords:this.pluralMessageRecords)},enumerable:!0,configurable:!0}),o.prototype.getlistData=function(e,t){var o=this;void 0===e&&(e=this.rows),void 0===t&&(t=this.first),this.endpoint?(this.configParameters(this.initParameters),this.configHttpParamsDisplayFields(),this.configHttpParamsPagination(e.toString(),t.toString()),this.configHttpParamsOrderBy(),this.dataListService.getList(this.endpoint,this.httpParams).pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(e){o.listData=e.contents,o.totalRecords=e.totalElements,o.lazy&&o.lazyLoad.emit(o.listData)}))):this.lazy&&this.lazyLoad.emit(this.listData)},o.prototype.configHttpParamsPagination=function(e,t){this.httpParams=this.httpParams.set("size",e),this.httpParams=this.httpParams.set("offset",t)},o.prototype.configHttpParamsOrderBy=function(){if(this.orderBy&&this.orderBy.length){var e="";this.orderBy.map((function(t){e+=e?","+t.field+"+"+t.direction:t.field+"+"+t.direction})),this.httpParams=this.httpParams.set("orderby",e)}},o.prototype.configHttpParamsDisplayFields=function(){this.displayFields&&this.displayFields.length&&(this.httpParams=this.httpParams.set("displayfields",this.displayFields.toString()))},o.prototype.onHeaderCheckboxToggle=function(e){this.headerCheckboxToggle.emit(e)},o.prototype.getFieldValue=function(e,t){return t.field&&t.field.includes(".")?(t.field.split(".").map((function(t){return e=e&&e[t]})),e):e[t.field]},o.prototype.configParameters=function(e){var t="";e&&(e.forEach((function(e){t?t+=" and "+e.toString():t=""+e.toString()})),this.httpParams=(new v.HttpParams).set("filter",t))},Object.defineProperty(o.prototype,"parameters",{set:function(e){this.configParameters(e),e&&(this.dataListTable&&(this.dataListTable.first=0),this.onFilter())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"httpParams",{get:function(){return this._httpParams},set:function(e){this._httpParams=e},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"loading",{get:function(){return this._loading},set:function(e){this._loading=e,this.loadingChange.emit(this._loading)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"listData",{get:function(){return this._listData},set:function(e){this._listData=e,this.listDataChange.emit(this._listData)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"selectedData",{get:function(){return this._selectedData},set:function(e){this._selectedData=e,this.selectedDataChange.emit(this._selectedData)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"totalRecords",{get:function(){return this._totalRecords},set:function(e){this._totalRecords=e,this.totalRecordsChange.emit(this.totalRecords)},enumerable:!0,configurable:!0}),o.ctorParameters=function(){return[{type:yo}]},N([t.ViewChild("dataListTable",{static:!1})],o.prototype,"dataListTable",void 0),N([t.Input()],o.prototype,"id",void 0),N([t.Input()],o.prototype,"dataKey",void 0),N([t.Input()],o.prototype,"rows",void 0),N([t.Input()],o.prototype,"emptyMessage",void 0),N([t.Input()],o.prototype,"columns",void 0),N([t.Input()],o.prototype,"paginator",void 0),N([t.Input()],o.prototype,"first",void 0),N([t.Input()],o.prototype,"alwaysShowPaginator",void 0),N([t.Input()],o.prototype,"actions",void 0),N([t.Input()],o.prototype,"actionLabel",void 0),N([t.Input()],o.prototype,"selectionMode",void 0),N([t.Input()],o.prototype,"lazy",void 0),N([t.Input()],o.prototype,"isMultipleSelection",void 0),N([t.Input()],o.prototype,"isSortable",void 0),N([t.Input()],o.prototype,"showHeaderCheckBox",void 0),N([t.Input()],o.prototype,"sortMode",void 0),N([t.Input()],o.prototype,"endpoint",void 0),N([t.Input()],o.prototype,"displayFields",void 0),N([t.Input()],o.prototype,"orderBy",void 0),N([t.Input()],o.prototype,"singularMessageRecords",void 0),N([t.Input()],o.prototype,"pluralMessageRecords",void 0),N([t.Input()],o.prototype,"initParameters",void 0),N([t.Output()],o.prototype,"lazyLoad",void 0),N([t.Output()],o.prototype,"loadingChange",void 0),N([t.Output()],o.prototype,"totalRecordsChange",void 0),N([t.Output()],o.prototype,"listDataChange",void 0),N([t.Output()],o.prototype,"selectedDataChange",void 0),N([t.Output()],o.prototype,"headerCheckboxToggle",void 0),N([t.Input()],o.prototype,"parameters",null),N([t.Input()],o.prototype,"loading",null),N([t.Input()],o.prototype,"listData",null),N([t.Input()],o.prototype,"selectedData",null),N([t.Input()],o.prototype,"totalRecords",null),o=N([t.Component({selector:"c-data-list",template:'<div *sLoadingState="loading">\n <p-table #dataListTable [id]="id" class="sds-list" [value]="listData" [columns]="columns" [paginator]="paginator" [rows]="rows"\n [first]="first" (onLazyLoad)="onLazyLoad($event)" [lazy]="lazy" [alwaysShowPaginator]="alwaysShowPaginator"\n (onPage)="pagination($event)" [totalRecords]="totalRecords" [(selection)]="selectedData" [dataKey]="dataKey"\n [sortMode]="sortMode" [responsive]="true" pageLinks="3" (onHeaderCheckboxToggle)="onHeaderCheckboxToggle($event)"\n [selectionMode]="selectionMode">\n \x3c!-- Header --\x3e\n <ng-template pTemplate="header">\n \x3c!-- Cabeçalhos quando da table é permitido ordenar as colunas --\x3e\n <tr>\n \x3c!-- Checkbox quando há seleção de linhas --\x3e\n <th id="{{id}}-checkbox-header" *ngIf="isMultipleSelection" style="width: 2.25em">\n <p-tableHeaderCheckbox *ngIf="showHeaderCheckBox"></p-tableHeaderCheckbox>\n </th>\n \x3c!-- Cabeçalhos das colunas da tabela --\x3e\n <th id="{{id}}-col-header-{{i}}" *ngFor="let col of columns; let i = index" [pSortableColumn]="col.orderBy || col.field"\n [pSortableColumnDisabled]="!isSortable || !!col.icon" [style.width]="col.width" [pTooltip]="col.tooltip || col.label"\n tooltipPosition="top" showDelay="500">\n {{col[\'label\']}}\n \x3c!-- Quando a coluna é um ícone não exibe o ícone de ordenação da mesma --\x3e\n <p-sortIcon *ngIf="isSortable && !col.icon" [field]="col.field"></p-sortIcon>\n </th>\n \x3c!-- Cabeçalho da coluna de ações --\x3e\n <th id="{{id}}-col-actions" *ngIf="actions && actions()?.length" [ngClass]="{ actionsSize: actions().length > 1, actionSize: actions().length === 1 }"></th>\n </tr>\n </ng-template>\n \x3c!-- Body --\x3e\n <ng-template pTemplate="body" let-rowData let-key="rowIndex">\n <tr [pSelectableRow]="rowData">\n <td id="{{id}}-checkbox-body-{{key}}" *ngIf="isMultipleSelection">\n <p-tableCheckbox [value]="rowData"></p-tableCheckbox>\n </td>\n <td id="{{id}}-col-body-{{i}}-{{key}}" *ngFor="let col of columns;let i = index" [pTooltip]="col.icon ? \'\' : getFieldValue(rowData, col)"\n tooltipPosition="top" showDelay="500">\n \x3c!-- Exibe o ícone caso exista. Para isso o valor da coluna deve ser { value: string, style: object } --\x3e\n <i *ngIf="col.icon" class="{{rowData[col[\'field\']]?.value}}" [ngStyle]="rowData[col[\'field\']]?.style"\n aria-hidden="true"></i>\n \x3c!-- Quando não há ícone exibe o valor normal da coluna --\x3e\n <span>{{getFieldValue(rowData, col)}}</span>\n </td>\n\n \x3c!-- Coluna das ações --\x3e\n <td id="{{id}}-col-actions-{{key}}" class="col-actions" *ngIf="actions && actions(rowData)?.length">\n <s-button id="{{id}}-btn-actions-{{key}}" *ngIf="actions(rowData).length > 1" [label]="actionLabel" priority="default"\n [model]="getActions(rowData, key)" [disabled]="false" [auxiliary]="true"></s-button>\n\n <s-button id="{{id}}-btn-action-{{key}}" *ngIf="actions(rowData).length <= 1" [label]="actions(rowData, key)[0].label"\n priority="default" (click)="actions(rowData, key)[0].command()" [disabled]="false" [auxiliary]="true"></s-button>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate="paginatorright">\n <span>{{recordsMessage}}</span>\n </ng-template>\n\n <ng-template pTemplate="emptymessage" let-columns>\n <tr>\n <td id="{{id}}-empty-message" [attr.colspan]="columns?.length + (isMultipleSelection ? 2 : 1)">{{emptyMessage}}</td>\n </tr>\n </ng-template>\n </p-table>\n</div>\n',encapsulation:t.ViewEncapsulation.None,styles:["app-data-list p-table .ui-table .ui-table-tbody>tr>td,app-data-list p-table .ui-table .ui-table-thead>tr>th{text-overflow:ellipsis;white-space:nowrap!important}app-data-list p-table .ui-paginator .ui-paginator-right-content{margin-left:auto}.actionsSize{width:11rem}.actionSize{width:18rem}body .ui-tooltip{max-width:22.3em!important}@media screen and (max-width:478px){.ui-paginator-right-content{display:none}}"]})],o)}(),go=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,h.ButtonModule,h.LoadingStateModule,b.TableModule,g.TooltipModule],declarations:[fo],exports:[fo],providers:[yo]})],e)}(),bo=function(){function e(e,t,o){this.http=e,this.messageService=t,this.translateService=o}return e.prototype.getDataLookup=function(e,t){var o=this;return t?this.http.get(""+e,{params:t}).pipe(s.catchError((function(e){return 403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)}))):this.http.get(""+e).pipe(s.catchError((function(e){return 403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)})))},e.ctorParameters=function(){return[{type:v.HttpClient},{type:I.MessageService},{type:a.TranslateService}]},e=N([t.Injectable()],e)}(),vo=y,Io=function(){function e(e){this.lookupService=e,this.searchTotalRecordsLabel="hcm.payroll.lookup_search_total_records_label",this.filterLabel="hcm.payroll.lookup_generic_filter_label",this.clearLabel="hcm.payroll.lookup_generic_clean_filter_label",this.cancelLabel="hcm.payroll.lookup_generic_btn_cancel_label",this.selectLabel="hcm.payroll.lookup_btn_select_label",this.lookupEmptyMessage="hcm.payroll.lookup_auto_complete_empty_message",this.lookupSuggestions=[],this.searchGridFields=[],this.searchLookupFields=[],this.searchGridData=[],this.searchFields=[],this.parameters=[],this.onSelect=new t.EventEmitter,this.onClear=new t.EventEmitter,this.modelChange=new t.EventEmitter,this._httpParams=new v.HttpParams,this.ngUnsubscribe=new f.Subject}return e.prototype.ngOnInit=function(){},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},e.prototype.lookupRequest=function(e){var t=this;this.generateLookupParameters(e),this.configHttpParamsPagination("10","0"),this.getDataLookup(this.endpoint,this.httpParams).pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(e){return t.lookupSuggestions=e&&Y(e.contents)}))},e.prototype.searchRequest=function(e){var t=this;this.generateGridParameters(e.filterData),this.configHttpParamsPagination(e.rows.toString(),Math.floor(e.first/e.rows).toString()),this.configHttpParamsOrderBy(e.multiSortMeta),this.getDataLookup(this.endpoint,this.httpParams).pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(e){return t.searchGridData=e&&Y(e.contents)}))},e.prototype.getDataLookup=function(e,t){var o=this;return this.lookupService.getDataLookup(this.endpoint,this.httpParams).pipe(s.map((function(e){var t=e.totalElements,n=e.contents;return o.searchTotalRecords=t,o.concatFields&&o.concatFields.length&&n.map((function(e){o.convertGridFieldValue(e),e[o.lookupDisplayField]=o.generateDisplayFieldValue(B({},e))})),e})))},e.prototype.convertLookupFieldValue=function(e,t){if(e)switch(t.type){case h.FieldType.Date:e=vo(e).format("L");break;case h.FieldType.Enum:var o=t.options.filter((function(t){return t.value===e}))[0];e=o?o.label:e}return e},e.prototype.convertGridFieldValue=function(e){e&&this.searchGridFields.forEach((function(t){switch(t.type){case h.FieldType.Enum:var o=t.options.filter((function(o){return o.value===e[t.name]}))[0];e[t.name]=o?o.label:e[t.name]}}))},e.prototype.generateDisplayFieldValue=function(e){var t=this,o="";return this.concatFields.forEach((function(n){var r=t.convertLookupFieldValue(e[n.name],n);r&&(o?o+=" - "+r:o=r)})),o},e.prototype.generateLookupParameters=function(e){var t=this,o="";this.searchLookupFields.forEach((function(n){var r=t.searchFields.filter((function(e){return n===e.name}))[0];o?o+=" or "+t.getParameterByType(r.type,n,e):o=""+t.getParameterByType(r.type,n,e)})),this.parameters.forEach((function(e){o?o+=" and "+e.toString():o=""+e.toString()})),this.httpParams=(new v.HttpParams).set("filter",o)},e.prototype.generateGridParameters=function(e){var t=this,o="";Object.keys(e).forEach((function(n){if(e[n]){var r=t.searchFields.filter((function(e){return n===e.name}))[0];o+=o?" and "+t.getParameterByType(r.type,n,e[n]):t.getParameterByType(r.type,n,e[n])}})),this.parameters.forEach((function(e){o?o+=" and "+e.toString():o=""+e.toString()})),this.httpParams=(new v.HttpParams).set("filter",o)},e.prototype.getParameterByType=function(e,t,o){switch(e){case h.FieldType.Date:return t+" eq '"+vo(o).format("YYYY-MM-DD")+"'";case h.FieldType.Enum:return t+" eq '"+o+"'";case h.FieldType.Integer:return t+" eq "+o;case h.FieldType.Autocomplete:return t+" eq "+o.id;default:return"containing(lower("+t+"), lower('"+o+"'))"}},e.prototype.configHttpParamsPagination=function(e,t){this.httpParams=this.httpParams.set("size",e),this.httpParams=this.httpParams.set("offset",t)},e.prototype.configHttpParamsOrderBy=function(e){if(e&&e.length){var t="";e.map((function(e){t+=t?","+e.field+"+"+(1===e.order?"asc":"desc"):e.field+"+"+(1===e.order?"asc":"desc")})),this.httpParams=this.httpParams.set("orderby",t)}},Object.defineProperty(e.prototype,"httpParams",{get:function(){return this._httpParams},set:function(e){this._httpParams=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"model",{get:function(){return this._model},set:function(e){this._model=e,this.modelChange.emit(e)},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:bo}]},N([t.Input()],e.prototype,"id",void 0),N([t.Input()],e.prototype,"dataKey",void 0),N([t.Input()],e.prototype,"concatFields",void 0),N([t.Input()],e.prototype,"searchTitle",void 0),N([t.Input()],e.prototype,"formGroup",void 0),N([t.Input()],e.prototype,"controlName",void 0),N([t.Input()],e.prototype,"multiple",void 0),N([t.Input()],e.prototype,"endpoint",void 0),N([t.Input()],e.prototype,"lookupDisplayField",void 0),N([t.Input()],e.prototype,"searchTotalRecordsLabel",void 0),N([t.Input()],e.prototype,"filterLabel",void 0),N([t.Input()],e.prototype,"clearLabel",void 0),N([t.Input()],e.prototype,"cancelLabel",void 0),N([t.Input()],e.prototype,"selectLabel",void 0),N([t.Input()],e.prototype,"lookupEmptyMessage",void 0),N([t.Input()],e.prototype,"searchTotalRecords",void 0),N([t.Input()],e.prototype,"lookupSuggestions",void 0),N([t.Input()],e.prototype,"searchGridFields",void 0),N([t.Input()],e.prototype,"searchLookupFields",void 0),N([t.Input()],e.prototype,"searchGridData",void 0),N([t.Input()],e.prototype,"searchFields",void 0),N([t.Input()],e.prototype,"parameters",void 0),N([t.Output()],e.prototype,"onSelect",void 0),N([t.Output()],e.prototype,"onClear",void 0),N([t.Output()],e.prototype,"modelChange",void 0),N([t.Input()],e.prototype,"model",null),e=N([t.Component({selector:"c-lookup",template:'<div *ngIf="formGroup;else noForm" [formGroup]="formGroup">\n <s-lookup [id]="id" [dataKey]="dataKey" [formControlName]="controlName" (onLookupRequest)="lookupRequest($event)"\n (onSearchRequest)="searchRequest($event)" filterLabel="{{filterLabel|translate}}" clearLabel="{{clearLabel|translate}}"\n cancelLabel="{{cancelLabel|translate}}" selectLabel="{{selectLabel|translate}}" [lookupSuggestions]="lookupSuggestions"\n lookupEmptyMessage="{{lookupEmptyMessage|translate}}" [searchGridData]="searchGridData" [searchFields]="searchFields"\n [searchTotalRecords]="searchTotalRecords" searchTotalRecordsLabel="{{searchTotalRecords}} {{searchTotalRecordsLabel|translate}}"\n [searchGridFields]="searchGridFields" [searchTitle]="searchTitle" [lookupDisplayField]="lookupDisplayField"\n [multiple]="multiple" (onSelect)="onSelect.next($event)" appendTo="body" (onClear)="onClear.next($event)"></s-lookup>\n</div>\n\n<ng-template #noForm>\n <s-lookup [id]="id" [dataKey]="dataKey" [(ngModel)]="model" (onLookupRequest)="lookupRequest($event)"\n (onSearchRequest)="searchRequest($event)" filterLabel="{{filterLabel|translate}}" clearLabel="{{clearLabel|translate}}"\n cancelLabel="{{cancelLabel|translate}}" selectLabel="{{selectLabel|translate}}" [lookupSuggestions]="lookupSuggestions"\n lookupEmptyMessage="{{lookupEmptyMessage|translate}}" [searchGridData]="searchGridData" [searchFields]="searchFields"\n [searchTotalRecords]="searchTotalRecords" searchTotalRecordsLabel="{{searchTotalRecords}} {{searchTotalRecordsLabel|translate}}"\n [searchGridFields]="searchGridFields" [searchTitle]="searchTitle" [lookupDisplayField]="lookupDisplayField"\n [multiple]="multiple" (onSelect)="onSelect.next($event)" appendTo="body" (onClear)="onClear.next($event)"></s-lookup>\n</ng-template>\n'})],e)}(),ko=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,h.DynamicFormModule,o.ReactiveFormsModule,a.TranslateModule],declarations:[Io],exports:[Io],providers:[bo]})],e)}(),So=y,_o=function(){function o(e){this.httpClienteService=e}return o.prototype.getAutoComplete=function(e,t,o,n,r){var i=this.generateGridParameters(t,o,n);return this.httpClienteService.getAutoComplete(e,i,r).pipe(s.map((function(e){return e&&e.contents})))},o.prototype.getAutoCompleteQuery=function(e,t){return this.httpClienteService.query(e,t).pipe(s.map((function(e){return e&&e.result})))},o.prototype.generateGridParameters=function(t,o,n){var r=this,i="";return Object.keys(t).forEach((function(a){var s,l=o&&o.filter((function(e){return a===e.name}))[0],p="",c=l&&l.type;l||a==e.CoreFieldType.searchValue||(c=h.FieldType.String),l||a!==e.CoreFieldType.searchValue||(c=e.CoreFieldType.searchValue),i&&(p=" and "),(s=r.getParameterByType(c,a,t[a],n))&&(i+=" "+p+" "+s)})),i},o.prototype.getParameterByType=function(t,o,n,r){if(!n&&t!=e.CoreFieldType.searchValue)return o+" is null";if(n&&"not null"===n&&t!=e.CoreFieldType.searchValue)return o+" is not null";switch(t){case h.FieldType.Date:return o+" eq '"+So(n).format("YYYY-MM-DD")+"'";case h.FieldType.Enum:return o+" eq '"+n+"'";case h.FieldType.Integer:return o+" eq "+n;case h.FieldType.Autocomplete:return o+" eq '"+n.id+"'";case e.CoreFieldType.searchValue:return""+this.getParameterBySearchType(n,r);default:return this.getSearchFilterString(o,n)}},o.prototype.getParameterBySearchType=function(e,t){var o,n,r="";if(e){try{for(var i=V(Object.entries(e)),a=i.next();!a.done;a=i.next()){var s=U(a.value,2),l=s[0],p=s[1];if("code"===l&&Number(p)){var c=t?"'":"";r+=r?" or "+l+" eq "+c+p+c:l+" eq "+c+p+c}else"code"!=l&&(r+=r?" or "+this.getSearchFilterString(l,p):this.getSearchFilterString(l,p))}}catch(e){o={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}r=r?"("+r+")":""}return r},o.prototype.getSearchFilterString=function(e,t){return"containing(lower("+e+"), lower('"+t+"'))"},o.ctorParameters=function(){return[{type:Ne}]},o=N([t.Injectable()],o)}(),wo=y,Co=function(){function e(e,t,o){this.http=e,this.messageService=t,this.translateService=o}return e.prototype.lookupRequestPost=function(e,t,o,n){return void 0===o&&(o=null),this.httpPostParams=e,this.postConfigPageSize(e),this.lookupDisplayField=n,this.concatFields=o,this.postDataLookup(t)},e.prototype.postConfigPageSize=function(e){e&&(this.httpPostParams.page.size=e.page&&e.page.size?e.page.size:10,this.httpPostParams.page.current=e.page&&e.page.current?e.page.current:0)},e.prototype.postDataLookup=function(e){var t=this;return this.postUrlDataLookup(e,this.httpPostParams).pipe(s.map((function(e){var o=e.contents;return t.concatFields&&t.concatFields.length&&o.map((function(e){t.concatOtherFields&&t.convertGridFieldValue(e),e[t.lookupDisplayField]=t.generateDisplayFieldValue(B({},e))})),e})))},e.prototype.convertLookupFieldValue=function(e,t){if(e)switch(t.type){case h.FieldType.Date:e=wo(e).format("L");break;case h.FieldType.Enum:var o=t.options.filter((function(t){return t.value===e}))[0];e=o?o.label:e}return e},e.prototype.convertGridFieldValue=function(e){e&&this.concatOtherFields.forEach((function(t){switch(t.type){case h.FieldType.Enum:var o=t.options.filter((function(o){return o.value===e[t.name]}))[0];e[t.name]=o?o.label:e[t.name]}}))},e.prototype.generateDisplayFieldValue=function(e){var t=this,o="";return this.concatFields.forEach((function(n){var r=t.convertLookupFieldValue(e[n.name],n);r&&(o?o+=" - "+r:o=r)})),o},e.prototype.postUrlDataLookup=function(e,t){var o=this;return t?this.http.post(""+e,B({},t)).pipe(s.catchError((function(e){return 403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)}))):this.http.post(""+e,{}).pipe(s.catchError((function(e){return 403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)})))},e.ctorParameters=function(){return[{type:v.HttpClient},{type:I.MessageService},{type:a.TranslateService}]},e=N([t.Injectable()],e)}(),Do=function(){function e(e,t){var o=e.filterData;this.name=o.name||null,this.code=o.code||null,this.searchText=o.searchText||null,this.companyId=o.headoffice||null,this.companyBranchId=o.branchoffice&&o.branchoffice.id||null,this.departmentId=o.department&&o.department.tableId||null,this.costcenterId=o.costcenter&&o.costcenter.id||null,this.jobpositionIds=o.jobposition||null,this.syndicateId=o.syndicate&&o.syndicate.id||null,this.shiftId=o.workshiftScale||null,this.workshiftId=o.workshiftId&&o.workshiftId.id||null,this.workshiftGroupId=o.workshiftGroupId&&o.workshiftGroupId.id||null,this.intervalGroupId=o.intervalGroupId&&o.intervalGroupId.is||null,this.scaleTeamId=o.scaleTeamId&&o.scaleTeamId.id||null,this.scaleCategoryId=o.scaleCategoryId&&o.scaleCategoryId.id||null,this.employmentRelationshipId=o.employmentRelationshipId&&o.employmentRelationshipId.id||null,this.contractType=o.contractType||null,this.expenseNatureId=o.expenseNatureId&&o.expenseNatureId.id||null,this.allowDeficient=o.allowDeficient||null,this.disabilityIds=o.disabilityIds||null,this.listExpired=!!o.hasOwnProperty("listExpired")&&o.listExpired,this.manager=o.manager?o.manager.tableId:null,this.referenceDate=t||null,this.page={current:e.first?e.first:0,size:e.rows?e.rows:10}||null}return e.prototype.getToFilter=function(){return this.jobpositionIds=this.convertListIds(this.jobpositionIds),this.disabilityIds=this.convertListIds(this.disabilityIds),this},e.prototype.convertListIds=function(e){if(e)return e.map((function(e){return e.tableId?e.tableId:e.id}))},e}(),To=y,Eo=function(){function o(o,n,r,i){var a=this;this.translate=o,this.cd=n,this.autocompleteParametersService=r,this.lookupParametersService=i,this.currentCompanyId=null,this.currentCompanyName=null,this.onSelect=new t.EventEmitter,this.onClear=new t.EventEmitter,this.onBlur=new t.EventEmitter,this.companyBranchId=null,this.lookupSuggestions=[],this.searchGridData=[],this.suggestionsObservable=new f.BehaviorSubject([]),this.totalRecords=0,this.valueEnumShift=[{label:this.translate.instant("hcm.payroll.enum_WorkshiftScale_FIRST_SHIFT"),value:"0",enum:"FIRST_SHIFT"},{label:this.translate.instant("hcm.payroll.enum_WorkshiftScale_SECOND_SHIFT"),value:"1",enum:"SECOND_SHIFT"},{label:this.translate.instant("hcm.payroll.enum_WorkshiftScale_THIRD_SHIFT"),value:"2",enum:"THIRD_SHIFT"},{label:this.translate.instant("hcm.payroll.enum_WorkshiftScale_FOURTH_SHIFT"),value:"3",enum:"FOURTH_SHIFT"},{label:this.translate.instant("hcm.payroll.enum_WorkshiftScale_MIXED"),value:"4",enum:"MIXED"},{label:this.translate.instant("hcm.payroll.enum_WorkshiftScale_GENERAL"),value:"5",enum:"GENERAL"}],this.concatFieldsName=[new h.FormField({name:"code",label:this.translate.instant("hcm.payroll.code"),type:h.FieldType.String}),new h.FormField({name:"name",label:this.translate.instant("hcm.payroll.employees_addition_workstation"),type:h.FieldType.String})],this.concatName=[new h.FormField({name:"code",label:this.translate.instant("hcm.payroll.code"),type:h.FieldType.String})],this.gridFields=[new h.FormField({name:"name",label:this.translate.instant("hcm.payroll.employees_addition_workstation"),type:h.FieldType.String}),new h.FormField({name:"manager",label:this.translate.instant("hcm.payroll.workstation_form_lookup_search_manager_label"),type:h.FieldType.String})],this.searchFields=Y(this.concatName,[{name:"name",label:this.translate.instant("hcm.payroll.movimentation_name"),type:h.FieldType.String},{name:"headoffice",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_company"),dataKey:"id",appendTo:"body",fullWidth:!0,suggestionsObservable:this.suggestionsObservable,displayField:"companyname"},{name:"branchoffice",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_branch"),dataKey:"id",appendTo:"body",fullWidth:!0,onRemove:function(){return a.companyBranchId=null},onSelect:function(e){var t=e.id;return a.companyBranchId=t},onSearch:function(e){a.getAutocomplete("company",e?{companyname:e,code:e}:null,"code","companyname",{headquarter:a.currentCompanyId?a.currentCompanyId:"not null"})},suggestionsObservable:this.suggestionsObservable,displayField:"companyname"},{name:"manager",type:h.FieldType.Autocomplete,multiple:!1,label:this.translate.instant("hcm.payroll.workstation_form_lookup_search_manager_label"),appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocompleteQuery("autocompleteManager",{valueSearch:e||"",companyId:{tableId:a.currentCompanyId},companyBranchId:{tableId:a.companyBranchId?a.companyBranchId:""}})},suggestionsObservable:this.suggestionsObservable,displayField:"manager"},{name:"department",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.movimentation_historical_department_tab"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocompleteQuery("autocompleteDepartmentQuery",{searchText:e||"",companyId:a.currentCompanyId,referenceDate:To(y.now()).format("YYYY-MM-DD")})},suggestionsObservable:this.suggestionsObservable,displayField:"name"},{name:"costcenter",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_cost_center"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(t){a.getAutocomplete("costcenter",t?{name:t,code:t}:null,"code","name",a.currentCompanyId?{company:a.currentCompanyId}:null,!0,e.ServiceType.ORGANIZATION_REGISTER)},suggestionsObservable:this.suggestionsObservable,displayField:"name"},{name:"jobposition",type:h.FieldType.Autocomplete,multiple:!0,label:this.translate.instant("hcm.payroll.movimentation_historical_job_position_tab"),dataKey:"tableId",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocompleteQuery("autocompleteJobpositionQuery",{searchText:e||"",companyId:a.currentCompanyId,creationDate:To().format("YYYY-MM-DD"),expirationDate:To().format("YYYY-MM-DD")})},suggestionsObservable:this.suggestionsObservable,displayField:"name"},{name:"syndicate",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_syndicate"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocomplete("syndicate",e?{name:e,code:e}:null,"code","name")},suggestionsObservable:this.suggestionsObservable,displayField:"name"},{name:"workshiftScale",type:h.FieldType.Enum,label:this.translate.instant("hcm.payroll.SHIFT"),showClear:!0,size:{md:12},onChange:function(){a.resetDependenciesOfShift(!0)},options:this.valueEnumShift},{name:"workshiftId",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_scale"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocomplete("workshift",e?{description:e,code:e}:null,"code","description",a.workstationFilterForm.get("workshiftScale").value?{workshiftScale:a.valueEnumShift[a.workstationFilterForm.get("workshiftScale").value].enum}:null)},onSelect:function(){a.resetDependenciesOfShift()},suggestionsObservable:this.suggestionsObservable,displayField:"description"},{name:"workshiftGroupId",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_workshift-group"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocomplete("workshiftGroup",e?{code:e}:null,"code","baseDate",a.workstationFilterForm.get("workshiftId").value?{workshift:a.workstationFilterForm.get("workshiftId").value.id}:null)},suggestionsObservable:this.suggestionsObservable,displayField:"baseDate"},{name:"intervalGroupId",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_class_interval"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocomplete("intervalGroup",e?{description:e,code:e}:null,"code","description",a.workstationFilterForm.get("workshiftId").value?{workshift:a.workstationFilterForm.get("workshiftId").value.id}:null)},suggestionsObservable:this.suggestionsObservable,displayField:"description"},{name:"scaleTeamId",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_scale_team"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocomplete("scaleTeam",e?{name:e,code:e}:null,"code","name")},suggestionsObservable:this.suggestionsObservable,displayField:"name"},{name:"scaleCategoryId",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_scale_category"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocomplete("scaleCategory",e?{name:e,code:e}:null,"code","name")},suggestionsObservable:this.suggestionsObservable,displayField:"name"},{name:"employmentRelationshipId",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_employment_relationship"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocomplete("employmentRelationship",e?{name:e,code:e}:null,"code","name")},suggestionsObservable:this.suggestionsObservable,displayField:"name"},{name:"contractType",type:h.FieldType.Enum,label:this.translate.instant("hcm.payroll.employees_temporary_contract_temporary_contract_type"),showClear:!0,size:{md:12},options:[{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_Employee"),value:"0"},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_Manager"),value:1},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_FarmWorker"),value:2},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_Retired"),value:3},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_Trainee"),value:4},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_Apprentice"),value:5},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_FixedDueDate"),value:6},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_RetiredManager"),value:7},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_PublicAgent"),value:8},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_Teacher"),value:9},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_CooperativeWorker"),value:10},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_DomesticWorker"),value:11},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_TeacherFixedDueDate"),value:12}]},{name:"expenseNatureId",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_expense_nature"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocomplete("expenseNature",e?{name:e,code:e}:null,"code","name")},suggestionsObservable:this.suggestionsObservable,displayField:"name"},{name:"allowDeficient",type:h.FieldType.Enum,label:this.translate.instant("hcm.payroll.allow_deficient"),showClear:!0,size:{md:12},options:[{label:this.translate.instant("hcm.payroll.enum_DecisionPcD_No"),value:"0"},{label:this.translate.instant("hcm.payroll.enum_DecisionPcD_Also"),value:1},{label:this.translate.instant("hcm.payroll.enum_DecisionPcD_Only"),value:2}]},{name:"disabilityIds",type:h.FieldType.Autocomplete,multiple:!0,label:this.translate.instant("hcm.payroll.employees_addition_disability"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocomplete("disability",e?{name:e,code:e}:null,"code","name")},suggestionsObservable:this.suggestionsObservable,displayField:"name"}]),this.ngUnsubscribe=new f.Subject}return o.prototype.ngOnInit=function(){},o.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},o.prototype.ngAfterViewInit=function(){this.cd.detectChanges();var e=this.workstationFilterForm.get("headoffice");e.setValue({id:this.currentCompanyId,companyname:this.currentCompanyName}),e.disable()},Object.defineProperty(o.prototype,"workstationFilterForm",{get:function(){return this.workstationgroupEl&&this.workstationgroupEl.formGroupDialog},enumerable:!0,configurable:!0}),o.prototype.selectOption=function(e){this.onSelect.emit(e)},o.prototype.onClearItem=function(e){return j(this,void 0,void 0,(function(){return q(this,(function(t){switch(t.label){case 0:return[4,this.onClear.emit(e)];case 1:return t.sent(),this.form.get(this.name).reset(),[2]}}))}))},o.prototype.resetDependenciesOfShift=function(e){void 0===e&&(e=!1),e&&this.workstationFilterForm.get("workshiftId").reset(),this.workstationFilterForm.get("workshiftGroupId").reset(),this.workstationFilterForm.get("intervalGroupId").reset()},o.prototype.searchRequest=function(e){var t=this,o=this.workstationFilterForm.get("headoffice"),n=e&&e.filterData;o.setValue({id:this.currentCompanyId,companyname:this.currentCompanyName}),e=B({},this.getValueEvent(e,n));var r=this.getHireDate().replace(/\'/g,""),i=new Do(e,r);this.lookupParametersService.lookupRequestPost(i.getToFilter(),"hcm/payroll/queries/workstationgroupFilterQuery",Y(this.concatFieldsName),"name").pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(e){n?t.searchGridData=e&&Y(e.contents):t.lookupSuggestions=e&&Y(e.contents),t.totalRecords=e&&e.totalPages}))},o.prototype.getValueEvent=function(e,t){return t?e.filterData.headoffice=this.currentCompanyId:e={filterData:{headoffice:this.currentCompanyId,searchText:e}},e},o.prototype.getAutocompleteQuery=function(e,t){var o=this;this.autocompleteParametersService.getAutoCompleteQuery(e,t).pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(t){"autocompleteDepartmentQuery"===e?t.filter((function(e){e.fields&&e.fields[0]&&(e.name=e.fields[1].value+" - "+e.fields[0].value)})):"autocompleteJobpositionQuery"===e?t.filter((function(e){e.fields&&e.fields[0]&&e.fields[1]&&(e.name=e.fields[0].value+" - "+e.fields[1].value)})):"autocompleteManager"===e&&t.map((function(e){e.manager=e.fields[0].value?e.fields[0].value:e.fields[3].value})),o.suggestionsObservable.next(t)}))},o.prototype.getAutocomplete=function(t,o,n,r,i,a,l){var p=this;void 0===i&&(i=null),void 0===a&&(a=!1),void 0===l&&(l=e.ServiceType.PAYROLL),this.autocompleteParametersService.getAutoComplete(t,B({},i,{searchValue:B({},o)}),this.searchFields,a,l).pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(e){"workshiftGroup"===t&&e.filter((function(e){if(e.baseDate){var t=To(e.baseDate,"YYYY-MM-DD");if(t.isValid())return e.baseDate=t.format(p.dateFormat)}})),p.suggestionsObservable.next(p.getConcatFields(e,n,r))}))},o.prototype.getConcatFields=function(e,t,o){return o&&t&&e.filter((function(e){e[o]=e[t]+" - "+e[o]})),e},o.prototype.getHireDate=function(){var e=To(this.hireDate).format(this.dateFormat);return e?"'"+tt(e,this.dateFormat)+"'":"'"+nt()+"'"},o.ctorParameters=function(){return[{type:a.TranslateService},{type:t.ChangeDetectorRef},{type:_o},{type:Co}]},N([t.ViewChild("workstationgroupEl",{static:!1})],o.prototype,"workstationgroupEl",void 0),N([t.Input()],o.prototype,"currentCompanyId",void 0),N([t.Input()],o.prototype,"currentCompanyName",void 0),N([t.Input()],o.prototype,"hireDate",void 0),N([t.Input()],o.prototype,"dateFormat",void 0),N([t.Input()],o.prototype,"required",void 0),N([t.Input()],o.prototype,"disabled",void 0),N([t.Input()],o.prototype,"form",void 0),N([t.Input()],o.prototype,"name",void 0),N([t.Output()],o.prototype,"onSelect",void 0),N([t.Output()],o.prototype,"onClear",void 0),N([t.Output()],o.prototype,"onBlur",void 0),o=N([t.Component({selector:"c-workstationgroup-lookup",template:'<div [formGroup]="form">\n <s-lookup\n #workstationgroupEl\n id="workstationGroup"\n dataKey="code"\n (onSelect)="selectOption($event)"\n (onClear)="onClearItem($event)"\n [formControlName]="name"\n (onLookupRequest)="searchRequest($event)"\n (onSearchRequest)="searchRequest($event)"\n filterTitle="{{ \'hcm.payroll.filters\' | translate }}"\n filterLabel="{{ \'hcm.payroll.filter\' | translate }}"\n clearLabel="{{ \'hcm.payroll.lookup_generic_clean_filter_label\' | translate }}"\n cancelLabel="{{ \'hcm.payroll.cancel\' | translate }}"\n selectLabel="{{ \'hcm.payroll.lookup_btn_select_label\' | translate }}"\n [disabled]="disabled"\n [lookupSuggestions]="lookupSuggestions"\n lookupEmptyMessage="{{ \'hcm.payroll.lookup_auto_complete_empty_message\' | translate }}"\n [searchGridData]="searchGridData"\n [searchFields]="searchFields"\n placeholder="{{\'hcm.payroll.suggestions\' | translate}}"\n [searchTotalRecords]="totalRecords"\n searchTotalRecordsLabel="{{ totalRecords }} {{\n \'hcm.payroll.admission_registers\' | translate\n }}"\n [searchGridFields]="gridFields"\n searchTitle="{{ \'hcm.payroll.employees_addition_workstation\' | translate }}"\n lookupDisplayField="name"\n ></s-lookup>\n\n</div>\n'})],o)}(),Fo=function(){function e(){}return e=N([t.NgModule({imports:[o.FormsModule,h.DynamicFormModule,o.ReactiveFormsModule,p.CommonModule,a.TranslateModule],declarations:[Eo],exports:[Eo],providers:[_o,Co]})],e)}(),Mo=function(){function n(o,n,r,i,a){var s=this;this.confirmationService=o,this.translateService=n,this.activatedRoute=r,this.cd=i,this.formBuilder=a,this.recordByRow=1,this.showDateWhen=!1,this.isEditMode=!1,this.isViewMode=!1,this.withSideBar=!0,this.visibleChange=new t.EventEmitter,this.ngUnsubscribe=new f.Subject,this.orderBy={field:"displayDateWhen",direction:e.DirectionEnumeration.DESC},this.bankAccountItemInput={},this.totalRecords=0,this.actionLabel=this.translateService.instant("hcm.payroll.entries_query_actions_total_title"),this.loading=!0,this.listData=[],this.listDataNoPage=[],this.cols=[{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_date_when"),field:"displayDateWhen"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_bank"),field:"bank"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_bank_branch"),field:"bankBranch"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_account_type"),field:"accountType"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_account"),field:"bankAccount"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_digit"),field:"digit"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_percentage"),field:"percentage"}],this.actions=function(e,t){return void 0===e&&(e={}),[{visible:s.isEditMode,label:s.translateService.instant("hcm.payroll.employees_image_cropper_view"),command:function(){e.index=t,s.bankAccountItemInput={currentItem:e,listData:s.listDataNoPage,isEditMode:!1},s.visible=!0}},{visible:!(s.isEditMode||!s.withSideBar),label:s.translateService.instant("hcm.payroll.edit"),command:function(){e.index=t,s.bankAccountItemInput={currentItem:e,listData:s.listDataNoPage,isEditMode:!0},s.visible=!0}},{visible:!s.isEditMode,label:s.translateService.instant("hcm.payroll.delete"),command:function(){s.loading=!0,s.deleteAnnuityItem(t)}}]},this.createFormGroup()}return n.prototype.ngOnInit=function(){this.formGroup.setControl(this.fieldFormGroup,this.historicalBankAccountList)},n.prototype.createFormGroup=function(){this.historicalBankAccountList=this.formBuilder.group({historicalBankAccountList:this.formBuilder.control(null)})},n.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},n.prototype.ngAfterViewInit=function(){this.cd.detectChanges()},n.prototype.onLazyLoad=function(t){var o=this,n=t&&t.first?t.first:0,r=t&&t.rows?t.rows:this.recordByRow,i=this.getHistoricalBankAccountList();this.listData=[],this.totalRecords=null,t&&t.multiSortMeta&&t.multiSortMeta.length&&t.multiSortMeta.map((function(t){o.orderBy.field=t.field,o.orderBy.direction=1===t.order?e.DirectionEnumeration.ASC:e.DirectionEnumeration.DESC})),i&&i.length?(this.totalRecords=i.length,this.listData=i,this.listDataNoPage=Y(i),this.listData.sort(mt(this.orderBy.field,this.orderBy.direction)),this.listData=this.listData.slice(n,n+r)):this.listDataNoPage=[],(this.isEditMode||i&&1===i.length)&&this.refreshCssInIE11(),this.loading=!1},n.prototype.refreshCssInIE11=function(){/msie\s|trident\/|edge\//i.test(window.navigator.userAgent)&&setTimeout((function(){var e=document.getElementsByClassName("row0");e&&e[0]&&(e[0].className="refresh")}),1)},n.prototype.add=function(){this.bankAccountItemInput={},this.visible=!0},n.prototype.deleteAnnuityItem=function(e){var t=Y(this.getHistoricalBankAccountList());t.sort(mt(this.orderBy.field,this.orderBy.direction)),delete t[e],t=t.filter((function(e){return e})),this.historicalBankAccountList.get("historicalBankAccountList").setValue(t),this.verifyTotalPercentage(),this.onLazyLoad()},n.prototype.getHistoricalBankAccountList=function(){return this.historicalBankAccountList.get("historicalBankAccountList")&&this.historicalBankAccountList.get("historicalBankAccountList").value&&this.historicalBankAccountList.get("historicalBankAccountList").value.length?this.historicalBankAccountList.get("historicalBankAccountList")&&this.historicalBankAccountList.get("historicalBankAccountList").value:[]},n.prototype.addItemInList=function(e){var t=e&&e.index>=0?e.index:null,o=this.getHistoricalBankAccountList()?this.getHistoricalBankAccountList():[];if(null!=t)o[t]=e,delete e.index;else{if(Je(e.customFields)&&Object.keys(e.customFields).length){var n=at(e.customFields);e.customFields=Y(n)}e.dateWhen=this.dateWhen,o.push(e)}this.historicalBankAccountList.get("historicalBankAccountList").setValue(o),this.verifyTotalPercentage(),this.onLazyLoad({first:this.getNumberPageByIndex(t,o)})},n.prototype.getNumberPageByIndex=function(e,t){if(e){var o=t.length,n=this.recordByRow-1;return Math.ceil(o/this.recordByRow)*this.recordByRow-n-1}return null},n.prototype.verifyTotalPercentage=function(){var e=this.getHistoricalBankAccountList()?this.getHistoricalBankAccountList():[],t=[];if(!e.length)return this.msgTotalLimitByPercentage=null;e.filter((function(e){return t.push(e&&e.percentage)}));var o=t.reduce((function(e,t){return e+t}),0);this.msgTotalLimitByPercentage=100===o?this.translateService.instant("hcm.payroll.historical_bank_account_msg_limit_total_by_percentage"):null},Object.defineProperty(n.prototype,"scopedActions",{get:function(){return this.actions.bind(this)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"recordsMessage",{get:function(){return(this.totalRecords||0)+" "+(1===this.totalRecords?this.translateService.instant("hcm.payroll.admission_register"):this.translateService.instant("hcm.payroll.admission_registers"))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"getTooltipAndDisableButtonAdd",{get:function(){return this.dateWhen?null:this.msgTooltipAdd},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"dateWhen",{get:function(){return this._dateWhen},set:function(e){var t=this;this._dateWhen=e,this._dateWhen&&this.listData.filter((function(e){return e.dateWhen=t._dateWhen}))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"displayDateWhen",{get:function(){return this._displayDateWhen},set:function(e){var t=this;this._displayDateWhen=e,this._displayDateWhen&&this.listData.filter((function(e){return e.displayDateWhen=t._displayDateWhen}))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"addListData",{set:function(e){this.loading=!0,this.historicalBankAccountList.get("historicalBankAccountList").patchValue(e),this.verifyTotalPercentage(),this.onLazyLoad()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"visible",{get:function(){return this._visible},set:function(e){this._visible=e,this.visibleChange.emit(this.visible)},enumerable:!0,configurable:!0}),n.prototype.close=function(){this.visible=!1},n.ctorParameters=function(){return[{type:I.ConfirmationService},{type:a.TranslateService},{type:i.ActivatedRoute},{type:t.ChangeDetectorRef},{type:o.FormBuilder}]},N([t.ViewChild(h.CustomFieldsComponent,{static:!1})],n.prototype,"customFields",void 0),N([t.Input()],n.prototype,"formGroup",void 0),N([t.Input()],n.prototype,"fieldFormGroup",void 0),N([t.Input()],n.prototype,"_dateWhen",void 0),N([t.Input()],n.prototype,"_displayDateWhen",void 0),N([t.Input()],n.prototype,"recordByRow",void 0),N([t.Input()],n.prototype,"showDateWhen",void 0),N([t.Input()],n.prototype,"msgTooltipAdd",void 0),N([t.Input()],n.prototype,"isEditMode",void 0),N([t.Input()],n.prototype,"isViewMode",void 0),N([t.Input()],n.prototype,"currency",void 0),N([t.Input()],n.prototype,"customEntity",void 0),N([t.Input()],n.prototype,"customService",void 0),N([t.Input()],n.prototype,"withSideBar",void 0),N([t.Input()],n.prototype,"dateWhen",null),N([t.Input()],n.prototype,"displayDateWhen",null),N([t.Input()],n.prototype,"addListData",null),N([t.Input()],n.prototype,"visible",null),n=N([t.Component({selector:"c-historical-bank-account",template:'<s-sidebar *ngIf="withSideBar" [visible]="visible" (visibleChange)="close()"\n header="{{\'hcm.payroll.historical_bank_account_title_form\'|translate}}">\n<bank-account [(visible)]="visible"\n [isEditAndViewValue]="bankAccountItemInput"\n [currency]="currency"\n [customEntity]="customEntity"\n [customService]="customService"\n [getListBankAccount]="listDataNoPage"\n (bankAccountItemToList)="addItemInList($event)"></bank-account>\n</s-sidebar>\n\n<div *ngIf="!withSideBar">\n <bank-account [(visible)]="visible"\n [isEditAndViewValue]="bankAccountItemInput"\n [currency]="currency"\n [customEntity]="customEntity"\n [customService]="customService"\n [getListBankAccount]="listDataNoPage"\n [withSideBar]="false"\n [isViewMode]="isViewMode"\n (bankAccountItemToList)="addItemInList($event)"></bank-account>\n</div>\n\n<div class="ui-g-1" *ngIf="withSideBar && !isEditMode">\n <div class="form-group ">\n <s-button id="ta-addPayAnnuity"\n [disabled]="getTooltipAndDisableButtonAdd || msgTotalLimitByPercentage"\n (onClick)="add()"\n [pTooltip]="getTooltipAndDisableButtonAdd || msgTotalLimitByPercentage"\n tooltipPosition="top"\n label="{{\'hcm.payroll.historical_bank_account_add\'|translate}}"></s-button>\n </div>\n</div>\n<div class="ui-g-12">\n <p-table\n id="table-annuity"\n [value]="listData"\n [columns]="cols"\n (onLazyLoad)="onLazyLoad($event)"\n [lazy]="true"\n [scrollable]="true"\n [paginator]="true"\n [totalRecords]="totalRecords"\n [sortMode]="\'multiple\'"\n *sLoadingState="loading"\n [rows]="recordByRow"\n dataKey="id">\n <ng-template pTemplate="colgroup" let-coumns>\n <colgroup>\n <col [ngClass]="\'col-default-s\'" *ngIf="showDateWhen">\n <col [ngClass]="\'col-default-l\'">\n <col [ngClass]="\'col-default-l\'">\n <col [ngClass]="\'col-default-m\'" *ngIf="withSideBar">\n <col [ngClass]="\'col-default-m\'">\n <col [ngClass]="\'col-default-s\'" *ngIf="withSideBar">\n <col [ngClass]="\'col-default-m\'">\n <col [ngClass]="\'col-action\'">\n </colgroup>\n </ng-template>\n <ng-template pTemplate="header" let-columns>\n \x3c!-- Cabeçalhos quando da table é permitido ordenar as colunas --\x3e\n <tr>\n \x3c!-- Cabeçalhos das colunas da tabela --\x3e\n <th\n *ngIf="showDateWhen"\n [pSortableColumn]="\'displayDateWhen\'"\n [pTooltip]="\'hcm.payroll.historical_bank_account_label_date_when\' | translate"\n tooltipPosition="top"\n showDelay="500"\n >\n <div class="senior-header" id="table-0">\n <span\n id="table-annuity-s-0">{{ \'hcm.payroll.historical_bank_account_label_date_when\' | translate }}</span>\n <p-sortIcon class="p-sorticon-status"\n [field]="\'hcm.payroll.historical_bank_account_label_date_when\' | translate"></p-sortIcon>\n </div>\n </th>\n\n <th\n [pSortableColumn]="\'bank\'"\n [pTooltip]="\'hcm.payroll.historical_bank_account_label_bank\' | translate"\n tooltipPosition="top"\n showDelay="500"\n >\n <div class="senior-header">\n <span>{{ \'hcm.payroll.historical_bank_account_label_bank\' | translate }}</span>\n <p-sortIcon class="p-sorticon-status"\n [field]="\'hcm.payroll.historical_bank_account_label_bank\' | translate"></p-sortIcon>\n </div>\n </th>\n\n <th\n [pSortableColumn]="\'bankBranch\'"\n [pTooltip]="\'hcm.payroll.historical_bank_account_label_bank_branch\' | translate"\n tooltipPosition="top"\n showDelay="500"\n >\n <div class="senior-header">\n <span>{{ \'hcm.payroll.historical_bank_account_label_bank_branch\' | translate }}</span>\n <p-sortIcon class="p-sorticon-status"\n [field]="\'hcm.payroll.historical_bank_account_label_bank_branch\' | translate"></p-sortIcon>\n </div>\n </th>\n\n <th *ngIf="withSideBar"\n [pSortableColumn]="\'accountType\'"\n [pTooltip]="\'hcm.payroll.historical_bank_account_label_account_type\' | translate"\n tooltipPosition="top"\n showDelay="500"\n >\n <div class="senior-header">\n <span>{{ \'hcm.payroll.historical_bank_account_label_account_type\' | translate }}</span>\n <p-sortIcon class="p-sorticon-status"\n [field]="\'hcm.payroll.historical_bank_account_label_account_type\' | translate"></p-sortIcon>\n </div>\n </th>\n\n <th\n [pSortableColumn]="\'bankAccount\'"\n [pTooltip]="\'hcm.payroll.historical_bank_account_label_account\' | translate"\n tooltipPosition="top"\n showDelay="500"\n >\n <div class="senior-header">\n <span>{{ \'hcm.payroll.historical_bank_account_label_account\' | translate }}</span>\n <p-sortIcon class="p-sorticon-status"\n [field]="\'hcm.payroll.historical_bank_account_label_account\' | translate"></p-sortIcon>\n </div>\n </th>\n\n <th *ngIf="withSideBar"\n [pSortableColumn]="\'digit\'"\n [pTooltip]="\'hcm.payroll.historical_bank_account_label_digit\' | translate"\n tooltipPosition="top"\n showDelay="500"\n >\n <div class="senior-header">\n <span>{{ \'hcm.payroll.historical_bank_account_label_digit\' | translate }}</span>\n <p-sortIcon class="p-sorticon-status"\n [field]="\'hcm.payroll.historical_bank_account_label_digit\' | translate"></p-sortIcon>\n </div>\n </th>\n\n <th\n [pSortableColumn]="\'percentage\'"\n [pTooltip]="\'hcm.payroll.historical_bank_account_label_percentage\' | translate"\n tooltipPosition="top"\n showDelay="500"\n >\n <div class="senior-header">\n <span>{{ \'hcm.payroll.historical_bank_account_label_percentage\' | translate }}</span>\n <p-sortIcon class="p-sorticon-status"\n [field]="\'hcm.payroll.historical_bank_account_label_percentage\' | translate"></p-sortIcon>\n </div>\n </th>\n \x3c!-- Cabeçalho da coluna de ações --\x3e\n <th id="col-actions"></th>\n </tr>\n </ng-template>\n <ng-template pTemplate="body" let-rowData let-key="rowIndex">\n\n <tr [ngClass]="\'row\'+key" [pSelectableRow]="rowData">\n <td *ngIf="showDateWhen" [pTooltip]="rowData?.displayDateWhen" tooltipPosition="top"\n showDelay="500">\n <span>{{ rowData?.displayDateWhen }}</span>\n </td>\n <td [pTooltip]="rowData?.bank?.name" tooltipPosition="top"\n showDelay="500">\n <span>{{ rowData?.bank?.name }}</span>\n </td>\n <td [pTooltip]="rowData?.bankBranch?.name" tooltipPosition="top"\n showDelay="500">\n <span>{{ rowData?.bankBranch?.name }}</span>\n </td>\n <td *ngIf="withSideBar" [pTooltip]="rowData?.accountType?.value" tooltipPosition="top"\n showDelay="500">\n <span>{{ rowData?.accountType?.value }}</span>\n </td>\n <td [pTooltip]="rowData?.bankAccount" tooltipPosition="top"\n showDelay="500">\n <span>{{ rowData?.bankAccount }}</span>\n </td>\n <td *ngIf="withSideBar" [pTooltip]="rowData?.digit" tooltipPosition="top"\n showDelay="500">\n <span>{{ rowData?.digit }}</span>\n </td>\n <td [pTooltip]="rowData?.percentage" tooltipPosition="top"\n showDelay="500">\n <span>{{ rowData?.percentage }}</span>\n </td>\n <td id="col-actions-{{key}}" class="col-actions "\n *ngIf="actions && actions(rowData, key)?.length">\n <s-button id="table-admission-btn-actions-{{key}}"\n *ngIf="actions(rowData, key).length > 1" [label]="actionLabel"\n priority="default" [model]="scopedActions(rowData, key)"\n [disabled]="false" [auxiliary]="true"></s-button>\n\n <s-button id="table-admission-btn-action-{{key}}"\n *ngIf="actions(rowData, key).length <= 1"\n [label]="scopedActions(rowData, key)[0].label"\n priority="default"\n (click)="scopedActions(rowData, key)[0].command()"\n [disabled]="false" [auxiliary]="true"></s-button>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate="emptymessage" let-columns>\n <tr>\n <td [attr.colspan]="columns.length +2">\n {{\'hcm.payroll.admission_empty_message\'|translate}}\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate="paginatorright">\n <span *ngIf="totalRecords">{{recordsMessage}}</span>\n </ng-template>\n </p-table>\n</div>\n',styles:[".refresh{width:100%!important}#table-annuity .col-default-s{width:10%}#table-annuity .col-default-m{width:12%}#table-annuity .col-default-l{width:16%}#table-annuity .col-action{width:10%}#table-annuity .icon-warning{text-align:center!important;color:#ff6d00c7!important}@media screen and (max-width:612px){#table-annuity .col-default-1,#table-annuity .col-default-2{width:16%}#table-annuity .col-default-3{width:26%}#table-annuity .col-icon{width:10%}#table-annuity .col-action{width:27%}}#main{display:-webkit-box;display:flex;height:100%;width:100%;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}#main form{height:100%}#main .footer{border-top:1px solid #ccc;padding-top:15px;margin-top:15px;flex-shrink:0;margin-bottom:-18px}#main .footer-s-border{padding-left:7px;flex-shrink:0;margin-bottom:-18px}"]})],n)}(),Po=function(){function e(e,n,r,i){this.translate=e,this.formBuilder=n,this.route=r,this.cd=i,this.withSideBar=!0,this.isEditMode=!1,this.visibleChange=new t.EventEmitter,this.bankAccountItemToList=new t.EventEmitter,this.ngUnsubscribe=new f.Subject,this.initialValidatorOfPercentage=[o.Validators.required,o.Validators.min(.01)],this.initialValidatorOfBankAccount=[o.Validators.required,o.Validators.maxLength(12)],this.labelBtnAdd="hcm.payroll.employees_add",this.maxValuePercentage=100,this.visibleBtnSave=!0,this.isView=!1,this.createFormGroup(),this.registerSubjects()}return e.prototype.validateDuplicateBankAccount=function(e,t,o,n){return function(r){var i=r&&r.value,a=!1;return e.filter((function(e,r){if(r!=e.index&&i&&e.bank&&e.bank.tableId===o&&e.bankBranch&&e.bankBranch.tableId===n&&e.accountType&&e.accountType.key===t&&Number(e.bankAccount)===Number(i))return a=!0})),a?{bankAccountDuplicate:!0}:null}},e.prototype.ngOnInit=function(){},e.prototype.ngAfterViewInit=function(){this.cd.detectChanges()},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(!0),this.ngUnsubscribe.unsubscribe()},e.prototype.registerSubjects=function(){},e.prototype.createFormGroup=function(){this.bankAccountFormGroup=this.formBuilder.group({id:this.formBuilder.control(null),index:this.formBuilder.control(null),employee:this.formBuilder.control({value:{tableId:null},disabled:!0}),dateWhen:this.formBuilder.control(null),displayDateWhen:this.formBuilder.control(null),bank:this.formBuilder.control(null,o.Validators.required),bankBranch:this.formBuilder.control(null,o.Validators.required),accountType:this.formBuilder.control(null,o.Validators.required),bankAccount:this.formBuilder.control(null,o.Validators.compose(Y(this.initialValidatorOfBankAccount))),digit:this.formBuilder.control(null,o.Validators.maxLength(3)),percentage:this.formBuilder.control(null,o.Validators.compose(Y(this.initialValidatorOfPercentage,[o.Validators.max(this.maxValuePercentage)]))),customFields:this.formBuilder.control(null)})},e.prototype.onSelectBank=function(){this.cleanBankInformation(),this.beforeSetBankAccountValidator()},e.prototype.onClearBank=function(){this.bankAccountFormGroup.get("bank").reset(),this.cleanBankInformation(),this.beforeSetBankAccountValidator()},e.prototype.cleanBankInformation=function(){ht(this.bankAccountFormGroup,["bankBranch"])},e.prototype.onClearBankBranch=function(){this.bankAccountFormGroup.get("bankBranch").reset(),this.beforeSetBankAccountValidator()},e.prototype.onClearAccountType=function(){this.bankAccountFormGroup.get("accountType").reset(),this.beforeSetBankAccountValidator()},Object.defineProperty(e.prototype,"visible",{get:function(){return this._visible},set:function(e){this._visible=e,this.visibleChange.emit(this.visible)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isEditAndViewValue",{set:function(e){this.resetForm(),this.visibleBtnSave=!0,e&&e.currentItem&&Object.keys(e.currentItem).length?(this.bankAccountFormGroup.patchValue(this.convertDTOToShowWithCustomFields(B({},e.currentItem))),this.labelBtnAdd="hcm.payroll.employees_update",this.setValidatorsAccordingList(e.listData,e.currentItem.index),this.isView||this.configEnableFields(e&&e.isEditMode)):this.labelBtnAdd="hcm.payroll.employees_add"},enumerable:!0,configurable:!0}),e.prototype.convertDTOToShowWithCustomFields=function(e){var t=B({},e);return t.customFields=st(t.customFields),t},e.prototype.configEnableFields=function(e){this.visibleBtnSave=e,ct(this.bankAccountFormGroup,e,["bank","bankBranch","accountType","bankAccount","digit","percentage","customFields"],[])},e.prototype.close=function(){this.resetForm(),this.visible=!1},e.prototype.addItem=function(){this.bankAccountFormGroup.updateValueAndValidity(),lt.call(this.bankAccountFormGroup),this.bankAccountFormGroup.valid&&(this.employeeId&&this.bankAccountFormGroup.get("employee").setValue({tableId:this.employeeId,name:""}),this.bankAccountItemToList.emit(this.bankAccountFormGroup.getRawValue()),this.visible=!1,this.resetForm())},e.prototype.resetForm=function(){this.bankAccountFormGroup.reset(),this.labelBtnAdd="hcm.payroll.employees_add",this.customFields&&this.customFields.formGroup&&this.customFields.formGroup.reset()},e.prototype.getBankTableId=function(){return this.bankAccountFormGroup.controls.bank.value?"'"+this.bankAccountFormGroup.controls.bank.value.tableId+"'":null},Object.defineProperty(e.prototype,"percentagePlaceholder",{get:function(){return"0"+(this.currency&&this.currency.decimalSeparator)+"00"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"optionsPercentage",{get:function(){return B({},this.getOptions(),{precision:2})},enumerable:!0,configurable:!0}),e.prototype.getOptions=function(){return{prefix:"",thousands:this.currency.thousandsSeparator,decimal:this.currency.decimalSeparator}},Object.defineProperty(e.prototype,"getListBankAccount",{set:function(e){e?this.setValidatorsAccordingList(e):this.resetForm()},enumerable:!0,configurable:!0}),e.prototype.setValidatorsAccordingList=function(e,t){void 0===t&&(t=null),this.bankAccountList=e&&e.length?Y(e):[];var o=[];this.bankAccountList&&this.bankAccountList.length&&this.bankAccountList.filter((function(e,n){e.percentage&&n!=t&&o.push(e.percentage)})),this.beforeSetBankAccountValidator(),this.validatePercentageValid(o)},e.prototype.beforeSetBankAccountValidator=function(){var e=this.bankAccountFormGroup.get("bankAccount"),t=this.bankAccountFormGroup.get("accountType")&&this.bankAccountFormGroup.get("accountType").value&&this.bankAccountFormGroup.get("accountType").value.key,n=this.bankAccountFormGroup.get("bank")&&this.bankAccountFormGroup.get("bank").value&&this.bankAccountFormGroup.get("bank").value.tableId,r=this.bankAccountFormGroup.get("bankBranch")&&this.bankAccountFormGroup.get("bankBranch").value&&this.bankAccountFormGroup.get("bankBranch").value.tableId;n&&r&&t&&this.bankAccountList&&this.bankAccountList.length?(e.setValidators(o.Validators.compose(Y(this.initialValidatorOfBankAccount,[this.validateDuplicateBankAccount(this.bankAccountList,t,n,r)]))),e.updateValueAndValidity()):e.setValidators(o.Validators.compose(Y(this.initialValidatorOfBankAccount)))},e.prototype.validatePercentageValid=function(e){var t=this.bankAccountFormGroup.get("percentage");this.maxValuePercentage=e.reduce((function(e,t){return e-t}),100),t.setValidators(o.Validators.compose(Y(this.initialValidatorOfPercentage,[o.Validators.max(this.maxValuePercentage)]))),t.updateValueAndValidity()},Object.defineProperty(e.prototype,"isViewMode",{set:function(e){this.isView=!(!e||this.withSideBar),this.configEnableFields(!this.isView),this.isView||this.resetForm()},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:a.TranslateService},{type:o.FormBuilder},{type:i.ActivatedRoute},{type:t.ChangeDetectorRef}]},N([t.ViewChild(h.CustomFieldsComponent,{static:!0})],e.prototype,"customFields",void 0),N([t.Input()],e.prototype,"currency",void 0),N([t.Input()],e.prototype,"customEntity",void 0),N([t.Input()],e.prototype,"customService",void 0),N([t.Input()],e.prototype,"withSideBar",void 0),N([t.Input()],e.prototype,"isEditMode",void 0),N([t.Output()],e.prototype,"visibleChange",void 0),N([t.Output()],e.prototype,"bankAccountItemToList",void 0),N([t.Input()],e.prototype,"visible",null),N([t.Input()],e.prototype,"isEditAndViewValue",null),N([t.Input()],e.prototype,"getListBankAccount",null),N([t.Input()],e.prototype,"isViewMode",null),e=N([t.Component({selector:"bank-account",template:'<div id="main">\n <form [formGroup]="bankAccountFormGroup" autocomplete="off">\n <div class="ui-fluid">\n <div class="ui-g">\n \x3c!-- Banco --\x3e\n <div class="ui-md-6 ui-sm-12 required">\n <label>{{\'hcm.payroll.historical_bank_account_label_bank\' | translate}}</label>\n <input-rest-auto-complete [dropdown]="true" table="Bank"\n [order]="[\'BankCode\',\'BankNameI18n\']"\n [fields]="[\'BankCode\',\'BankNameI18n\']"\n placeholder="{{\'hcm.payroll.suggestions\' | translate}}"\n emptyMessage="{{\'hcm.payroll.not_suggestions\' | translate}}"\n keyCode="BankCode" keyName="BankNameI18n"\n itemSelect="bank" name="bank"\n [form]="bankAccountFormGroup"\n (onSelect)="onSelectBank()"\n (onClear)="onClearBank()"\n id="ta-bankName"></input-rest-auto-complete>\n <s-control-errors [control]="bankAccountFormGroup.get(\'bank\')"\n [errorMessages]="{ required: \'hcm.payroll.required\' | translate }">\n </s-control-errors>\n </div>\n \x3c!--Agência--\x3e\n <div class="ui-md-6 ui-sm-12 required">\n <label>{{\'hcm.payroll.historical_bank_account_label_bank_branch\'|translate}}</label>\n <input-rest-auto-complete [dropdown]="true" table="BankBranch"\n [order]="[\'BankBranchCode\']"\n [fields]="[\'BankBranchCode\',\'BankBranchNameI18n\']"\n placeholder="{{\'hcm.payroll.suggestions\' | translate}}"\n emptyMessage="{{\'hcm.payroll.not_suggestions\' | translate}}"\n keyCode="BankBranchCode" keyName="BankBranchNameI18n"\n itemSelect="bankBranch" name="bankBranch"\n [conditions]="[{ \'fields\': [\'BankBranchBank\'], \'expression\' : \'EQUAL\', \'value\': getBankTableId() }]"\n [form]="bankAccountFormGroup"\n (onSelect)="beforeSetBankAccountValidator()"\n (onClear)="onClearBankBranch()"\n id="ta-bankBranch">\n </input-rest-auto-complete>\n <s-control-errors [control]="bankAccountFormGroup.get(\'bankBranch\')"\n [errorMessages]="{ required: \'hcm.payroll.required\' | translate }">\n </s-control-errors>\n </div>\n \x3c!-- Tipo conta --\x3e\n <div class="ui-md-6 ui-sm-12 required">\n <label>{{\'hcm.payroll.employees_addition_account_type\'|translate}}</label>\n <input-rest-auto-complete-enum [dropdown]="true" server="payroll"\n enumeration="AccountType"\n placeholder="{{\'hcm.payroll.select\' | translate}}"\n name="accountType" [form]="bankAccountFormGroup"\n (onSelect)="beforeSetBankAccountValidator()"\n (onClear)="onClearBankBranch()"\n id="ta-accountType"></input-rest-auto-complete-enum>\n <s-control-errors [control]="bankAccountFormGroup.get(\'accountType\')"\n [errorMessages]="{ required: \'hcm.payroll.required\' | translate }">\n </s-control-errors>\n </div>\n \x3c!--Número conta--\x3e\n <div class="ui-md-6 ui-sm-12 required">\n <label>{{\'hcm.payroll.historical_bank_account_label_account_form\' |\n translate}}</label>\n <input pInputText id="ta-bankAccount" name="bankAccount" only-number\n formControlName="bankAccount"/>\n <s-control-errors [control]="bankAccountFormGroup.get(\'bankAccount\')"\n [errorMessages]="{\n required: \'hcm.payroll.required\' | translate,\n bankAccountDuplicate: \'hcm.payroll.historical_bank_account_label_bank_account_duplicate\' | translate,\n maxlength: \'hcm.payroll.error_max_length\' | translate: { value: \'12\' }\n }">\n </s-control-errors>\n </div>\n <div class="ui-md-6 ui-sm-12">\n <label>{{\'hcm.payroll.historical_bank_account_label_digit\'|translate}}</label>\n \x3c!--Dígito--\x3e\n <input pInputText id="ta-digit" name="digit" only-number formControlName="digit"/>\n <s-control-errors [control]="bankAccountFormGroup.get(\'digit\')"\n [errorMessages]="{ maxlength: \'hcm.payroll.error_max_length\' | translate: { value: \'3\' } }">\n </s-control-errors>\n </div>\n <div class="ui-md-6 ui-sm-12 required">\n <label id="lb-percentage"\n for="ff-percentage">{{ \'hcm.payroll.historical_bank_account_label_percentage\' | translate }}</label>\n <div class="ui-inputgroup">\n <span class="ui-inputgroup-addon">%</span>\n <input pInputText id="ff-percentage" name="percentage"\n formControlName="percentage"\n currencyMask\n [options]="optionsPercentage"\n [placeholder]="percentagePlaceholder"/>\n </div>\n <s-control-errors [control]="bankAccountFormGroup.get(\'percentage\')"\n [errorMessages]="{\n required: \'hcm.payroll.required\' | translate,\n maxlength: \'hcm.payroll.error_max_length\' | translate: { value: \'6\' },\n max: \'hcm.payroll.error_max_value_number\' | translate: { value: maxValuePercentage },\n min: \'hcm.payroll.error_min_value_number\' | translate: { value: \'0,01\' }\n }">\n </s-control-errors>\n </div>\n <div class="ui-g-12">\n <p-fieldset\n legend="{{ \'hcm.payroll.custom_fields\' | translate }}"\n [attr.data-hidden]="!customFields || !customFields.fields.length"\n >\n <s-custom-fields\n domain="hcm"\n service="{{customService}}"\n entity="{{customEntity}}"\n formControlName="customFields"\n [invalidErrorLabel]="\'hcm.payroll.employees_invalid_field\' | translate"\n >\n </s-custom-fields>\n </p-fieldset>\n </div>\n </div>\n </div>\n </form>\n\n <div [ngClass]="withSideBar ? \'footer\' : \'footer-s-border\'">\n <div class="form-group">\n <s-button id="btn-save" label="{{ labelBtnAdd | translate}}" priority="primary"\n (onClick)="addItem()" *ngIf="visibleBtnSave && !this.isView"></s-button>\n <s-button *ngIf="withSideBar" id="btn-close" label="{{\'hcm.payroll.cancel\'|translate}}" priority="secondary"\n priority="link" (onClick)="close()"></s-button>\n </div>\n </div>\n</div>\n',styles:[".refresh{width:100%!important}#table-annuity .col-default-s{width:10%}#table-annuity .col-default-m{width:12%}#table-annuity .col-default-l{width:16%}#table-annuity .col-action{width:10%}#table-annuity .icon-warning{text-align:center!important;color:#ff6d00c7!important}@media screen and (max-width:612px){#table-annuity .col-default-1,#table-annuity .col-default-2{width:16%}#table-annuity .col-default-3{width:26%}#table-annuity .col-icon{width:10%}#table-annuity .col-action{width:27%}}#main{display:-webkit-box;display:flex;height:100%;width:100%;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}#main form{height:100%}#main .footer{border-top:1px solid #ccc;padding-top:15px;margin-top:15px;flex-shrink:0;margin-bottom:-18px}#main .footer-s-border{padding-left:7px;flex-shrink:0;margin-bottom:-18px}"]})],e)}(),Ao=function(){function o(e){this.http=e}return o.prototype.query=function(t,o,n){return void 0===n&&(n=e.ServiceType.PAYROLL),this.http.query(t,o,n)},o.ctorParameters=function(){return[{type:Ne}]},o=N([t.Injectable()],o)}(),Oo=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,v.HttpClientModule,E.AutoCompleteModule,ue,o.ReactiveFormsModule,b.TableModule,h.ButtonModule,g.TooltipModule,h.LoadingStateModule,h.SidebarModule,be,h.ControlErrorsModule,Et,O.CurrencyMaskModule,vt,d.InputTextModule,Se,L.FieldsetModule,h.CustomFieldsModule,R.PanelModule],declarations:[Mo,Po],providers:[Ao,I.ConfirmationService],exports:[Mo]})],e)}(),Lo=function(){function o(e,t){this.http=e,this.httpClient=t}return o.prototype.remove=function(t,o,n,r){return void 0===n&&(n=e.ServiceType.PAYROLL),n===e.ServiceType.DEPENDENT?this.httpClient.post("hcm/dependent/queries/historicalJudicialPensionBankAccountDelete",{dependentId:r,dateWhen:o}):this.http.post("actions/historicalEmployeeBankAccountDelete",{employeeId:t,dateWhen:o})},o.ctorParameters=function(){return[{type:Ne},{type:v.HttpClient}]},o=N([t.Injectable()],o)}(),Ro=y,xo=function(){function o(e,o,n,r,i,a,s){this.confirmationService=e,this.translateService=o,this.activatedRoute=n,this.cd=r,this.router=i,this.messageService=a,this.historicalBankAccountListService=s,this.endPoint="hcm/payroll/queries/historicalEmployeeBankAccountQuery",this.keyPayload="historicalEmployeeBankAccount",this.withSidebar=!0,this.enableView=new t.EventEmitter,this.ngUnsubscribe=new f.Subject,this.loading=!0,this.columns=[{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_date_when"),field:"dateWhen"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_bank"),field:"bank.name"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_bank_branch"),field:"bankBranch.name"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_account"),field:"bankAccount"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_percentage"),field:"percentage"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_qtd_account"),field:"numberOfBankAccount"}]}return o.prototype.ngOnInit=function(){this.initParameters={employeeId:this.employeeId,dependentId:this.dependentId}},o.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},o.prototype.ngAfterViewInit=function(){this.cd.detectChanges()},o.prototype.onLazyLoad=function(e){var t=this;e.forEach((function(e){e.dateWhen=Ro(e.dateWhen).format(t.dateFormat)})),this.onGridLoad(e),this.loading=!1},o.prototype.getMenuActions=function(e){var t=this;return[{label:this.translateService.instant("hcm.payroll.employees_image_cropper_view"),command:function(){var o=e&&e.dateWhen&&Ro(e.dateWhen,t.dateFormat).format("YYYY-MM-DD");t.withSidebar?t.router.navigate(["historical-bank-account/"+o],{relativeTo:t.activatedRoute}):t.enableView.emit(o)}},{label:this.translateService.instant("hcm.payroll.delete"),command:function(){t.isAllowToDeleteHistorical&&e?t.delete(e.id,e.dateWhen):t.messageService.add({severity:"error",summary:t.translateService.instant("hcm.payroll.error"),detail:t.translateService.instant("hcm.payroll.permission_error_not_allowed")})}}]},o.prototype.delete=function(t,o){var n=this;if(t===this.lastRecord.id){var r=Ro(o,this.dateFormat).format("YYYY-MM-DD");this.confirmationService.confirm({message:this.translateService.instant("hcm.payroll.employees_movimentation_historical_bank_account_question_confirm_delete")+"?",accept:function(){n.loading=!0;var t=n.withSidebar?e.ServiceType.PAYROLL:e.ServiceType.DEPENDENT;n.historicalBankAccountListService.remove(n.employeeId,r,t,n.dependentId).pipe(s.takeUntil(n.ngUnsubscribe)).subscribe((function(){n.messageService.add({severity:"success",summary:n.translateService.instant("hcm.payroll.success"),detail:n.translateService.instant("hcm.payroll.employees_movimentation_historical_bank_account_remove")}),n.parameters=n.parameters&&B({},n.parameters)||{}}),(function(){n.messageService.add({severity:"error",summary:n.translateService.instant("hcm.payroll.error"),detail:n.translateService.instant("hcm.payroll.employees_movimentation_historical_bank_account_error_remove")}),n.loading=!1}))}})}else this.messageService.add({severity:"error",summary:this.translateService.instant("hcm.payroll.error"),detail:this.translateService.instant("hcm.payroll.not_allowed_delete_last")})},o.prototype.add=function(){this.isAllowToAddHistorical?this.router.navigate(["historical-irrf-new"],{relativeTo:this.activatedRoute}):this.messageService.add({severity:"error",summary:this.translateService.instant("hcm.payroll.error"),detail:this.translateService.instant("hcm.payroll.permission_error_not_allowed")})},o.prototype.onGridLoad=function(e){e&&e.length&&(this.lastRecord=e[0])},Object.defineProperty(o.prototype,"isAllowToAddHistorical",{get:function(){return this.permission.incluir},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isAllowToDeleteHistorical",{get:function(){return this.permission.excluir},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"scopedActions",{get:function(){return this.getMenuActions.bind(this)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"reloadList",{set:function(e){e&&(this.loading=!0,this.parameters=this.parameters&&B({},this.parameters)||{})},enumerable:!0,configurable:!0}),o.ctorParameters=function(){return[{type:I.ConfirmationService},{type:a.TranslateService},{type:i.ActivatedRoute},{type:t.ChangeDetectorRef},{type:i.Router},{type:I.MessageService},{type:Lo}]},N([t.ViewChild(h.CustomFieldsComponent,{static:!1})],o.prototype,"customFields",void 0),N([t.Input()],o.prototype,"permission",void 0),N([t.Input()],o.prototype,"employeeId",void 0),N([t.Input()],o.prototype,"dependentId",void 0),N([t.Input()],o.prototype,"dateFormat",void 0),N([t.Input()],o.prototype,"endPoint",void 0),N([t.Input()],o.prototype,"keyPayload",void 0),N([t.Input()],o.prototype,"withSidebar",void 0),N([t.Output()],o.prototype,"enableView",void 0),N([t.Input()],o.prototype,"reloadList",null),o=N([t.Component({selector:"c-historical-bank-account-list",template:'<div class="ui-g">\n <div class="ui-g-12">\n <c-data-list-rest\n id="ta-irrf"\n [columns]="columns"\n actionLabel="{{ \'hcm.payroll.movimentation_generic_action\' | translate }}"\n emptyMessage="{{ \'hcm.payroll.admission_empty_message\' | translate }}"\n [endpoint]="endPoint"\n singularMessageRecords="{{\n \'hcm.payroll.admission_register\' | translate\n }}"\n [actions]="scopedActions"\n pluralMessageRecords="{{\n \'hcm.payroll.admission_registers\' | translate\n }}"\n [keyPayload]="keyPayload"\n [lazy]="true"\n (lazyLoad)="onLazyLoad($event)"\n [(loading)]="loading"\n [initParameters]="initParameters"\n [parameters]="parameters"\n [isSortable]="false"\n ></c-data-list-rest>\n </div>\n</div>\n\n',styles:[""]})],o)}(),Bo=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,v.HttpClientModule,E.AutoCompleteModule,ue,o.ReactiveFormsModule,b.TableModule,h.ButtonModule,g.TooltipModule,h.LoadingStateModule,Ce,x.ConfirmDialogModule],declarations:[xo],providers:[Lo],exports:[xo]})],e)}(),No=function(){function t(e){this.field=e.field,this.value=e.value,this.operation=e.operation}return Object.defineProperty(t.prototype,"field",{get:function(){return this._field},set:function(e){this._field=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"operation",{get:function(){return this._operation},set:function(e){this._operation=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(e){this._value=e},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return this.operation===e.Operators.CONTAINING?this.operation+"(lower("+this.field+"), lower("+this.value+"))":this.field+" "+(this.operation||"")+" "+this.value},t}(),jo=y,qo=jo("31/12/1900","DD/MM/YYYY"),Vo=jo("04/06/2080","DD/MM/YYYY"),Uo=function(){function t(){}return t.isValidDate=function(e,t){return function(o){var n=!t||!t.hasOwnProperty("useG5DateRange")||t.useG5DateRange,r=ft(o.value);if(e=ft(e),r&&e&&r.length===e.length&&!o.value.includes("_")){var i=jo(r,e),a=i.isValid(),s=!n||i.isBetween(qo,Vo,null,"[]");return a&&s?null:{invalidDate:!0}}return null}},t.isDateLower=function(t,o,n){void 0===n&&(n="day");var r={compareName:"lowerDate",granularity:n};return this.isValidDateCompare(t,o,e.CompareType.isBefore,r)},t.isValidDateCompare=function(e,t,o,n){var r=this;return function(i){var a=ft(i.value);if(t=ft(t),a&&t&&a.length===t.length&&!i.value.includes("_")){var s=jo(a,t),l=jo(e,t);return r.dateCompare(s,l,o,n)}return null}},t.getDateFormatFromLocale=function(e,t){var o=e&&e.dateFormat;if(o){var n=o.replace(/[y]/g,"YY").replace(/[^a-zA-Z]/g,"").toUpperCase();return t&&(n=n.replace("DD","")),n}return null},t.getDateTimeFormatFromLocale=function(e){if(e){var t=e.dateFormat.toString();return t=t.replace(/[y]/g,"YY").toUpperCase(),t+=" HH:mm:ss"}return null},t.getDateFormatFromCalendar=function(e){if(e&&e.dateFormat){var t=e.dateFormat.toString();return t=t.replace(/[y]/g,"YY").toUpperCase()}return null},t.dateCompare=function(t,o,n,r){var i=n===e.CompareType.isNotSame?e.CompareType.isSame:n,a=r&&r.granularity?r.granularity:"day",s=t[i](o,a);if(s=n===e.CompareType.isNotSame?!s:s){var l={};return l[r&&r.compareName?r.compareName:n]=!0,l}return null},t.getFormatDateWithBar=function(e){if(e&&e.dateFormat){var t=e.dateFormat.toString();return t=t.replace("dd","DD").replace("mm","MM").replace("yy","YYYY")}return null},t}(),Yo=function(){function e(){this._processVariables={},this._workflowPayload={},this.processInstanceId=new f.BehaviorSubject(null),this.resetActions()}return e.prototype.init=function(){var e=this;this.workflowCockpit=workflowCockpit({init:function(t,o){return j(e,void 0,void 0,(function(){var e,n,r;return q(this,(function(i){switch(i.label){case 0:return this._isRequestNew=o&&o.isRequestNew(),e=this,(n=o)?[4,o.getTaskData()]:[3,2];case 1:n=i.sent(),i.label=2;case 2:return e._taskData=n,this._isRequestNew?[3,4]:[4,o.getInfoFromProcessVariables()];case 3:r=i.sent(),this.addProcessVariable("processVariablesFromWorkflow",r),i.label=4;case 4:return this.processInstanceId.next(t.processInstanceId),[4,this._onLoadWorkflow(t,o)];case 5:return[2,i.sent()]}}))}))},onSubmit:function(t,o){return j(e,void 0,void 0,(function(){var e,n;return q(this,(function(r){switch(r.label){case 0:return e=this,(n=t)?[4,t.nextAction]:[3,2];case 1:n=r.sent(),r.label=2;case 2:return e._nextAction=n,this._isFinishing=this._nextAction.finish,this._nextActionName=this._nextAction.name,[4,this._onSubmitWorkflow(t,o)];case 3:return r.sent(),[2,this._workflowPayload]}}))}))},onError:function(t,o){return j(e,void 0,void 0,(function(){return q(this,(function(e){switch(e.label){case 0:return[4,this._onRollbackWorkflow(t,o)];case 1:return e.sent(),[2]}}))}))}})},e.prototype._onLoadWorkflow=function(e,t){return j(this,void 0,void 0,(function(){return q(this,(function(e){switch(e.label){case 0:return[4,this._runActions(this.onLoadActions)];case 1:return[2,e.sent()]}}))}))},e.prototype._onSubmitWorkflow=function(e,t){return j(this,void 0,void 0,(function(){return q(this,(function(e){switch(e.label){case 0:return[4,this._runActions(this.onSubmitActions)];case 1:return[2,e.sent()]}}))}))},e.prototype._onRollbackWorkflow=function(e,t){return j(this,void 0,void 0,(function(){return q(this,(function(e){switch(e.label){case 0:return[4,this._runActions(this.onRollbackActions)];case 1:return[2,e.sent()]}}))}))},e.prototype.resetActions=function(){this.onLoadActions={},this.onSubmitActions={},this.onRollbackActions={}},e.prototype._runActions=function(e){return j(this,void 0,void 0,(function(){var t,o=this;return q(this,(function(n){switch(n.label){case 0:return t={},[4,Promise.all(Object.entries(e).map((function(e){var n=U(e,2),r=n[0],i=n[1];return j(o,void 0,void 0,(function(){var e,o,n;return q(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),e=t,o=r,[4,i()];case 1:return e[o]=a.sent(),[2];case 2:throw n=a.sent(),Error(n);case 3:return[2]}}))}))})))];case 1:return n.sent(),[2,t]}}))}))},e.prototype.addOnLoadAction=function(e,t){this.onLoadActions[e]=t},e.prototype.addOnSubmitAction=function(e,t){this.onSubmitActions[e]=t},e.prototype.addOnRollbackAction=function(e,t){this.onRollbackActions[e]=t},e.prototype.addProcessVariable=function(e,t){try{this._processVariables[e]=t}catch(t){throw{erro:t,message:"Não foi possível adicionar a variável "+e+" às variáveis do processo."}}},e.prototype.setWorkflowPayload=function(e){this._workflowPayload=e},Object.defineProperty(e.prototype,"loadActions",{get:function(){return this.onLoadActions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"submitActions",{get:function(){return this.onSubmitActions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rollbackActions",{get:function(){return this.onRollbackActions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isRequestNew",{get:function(){return this._isRequestNew},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isFinishing",{get:function(){return this._isFinishing},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nextActionName",{get:function(){return this._nextActionName},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"taskData",{get:function(){return this._taskData},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"processVariables",{get:function(){var e=this;return new Promise((function(t,o){e._processVariables?t(e._processVariables):o("Não foram encontradas variáveis para o processo")})).then((function(t){e._processVariables=t})).catch((function(e){throw e})),this._processVariables},enumerable:!0,configurable:!0}),e=N([t.Injectable()],e)}(),Go=function(){function e(e,t,o){this.router=e,this.activatedRoute=t,this.workflowDataService=o,this.ngUnsubscribe=new f.Subject}return e.prototype.ngOnInit=function(){this.registerSubscribers()},e.prototype.registerSubscribers=function(){var e=this;this.activatedRoute.data.pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.useWorkflow=!(!t||!t.useWorkflow),e.routeEndpoint=t&&t.routeEndpoint,e.useWorkflow&&e.workflowDataService.setUseWorkflow(e.useWorkflow)}))},e.prototype.onSelectEmployee=function(){var e=this.employeeSelected.tableId;e&&this.navigate(e)},e.prototype.navigate=function(e){this.router.navigate(["workflow/"+e+"/"+this._routeEndpoint])},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(!0),this.ngUnsubscribe.complete()},Object.defineProperty(e.prototype,"useWorkflow",{get:function(){return this._useWorkflow},set:function(e){this._useWorkflow=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"routeEndpoint",{get:function(){return this._routeEndpoint},set:function(e){this._routeEndpoint=e},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:i.Router},{type:i.ActivatedRoute},{type:lo}]},e=N([t.Component({selector:"lib-employee-selector",template:'<p-panel header="{{ \'hcm.payroll.employee_selector_panel_header\' | translate }}">\n <div class="ui-g ui-fluid">\n <div class="ui-md-6 ui-g-6">\n <label for="ff-employee" id="lb-employee">{{\n "hcm.payroll.employee" | translate\n }}</label>\n <input-rest-auto-complete-employee-model\n id="ff-employee"\n [dropdown]="true"\n placeholder="{{\n \'hcm.payroll.employees_company_placeholder\' | translate\n }}"\n name="employee"\n emptyMessage="{{ \'hcm.payroll.not_suggestions\'|translate }}"\n [(model)]="employeeSelected"\n (onSelect)="onSelectEmployee()"\n >\n </input-rest-auto-complete-employee-model>\n </div>\n </div>\n</p-panel>\n',styles:[""]})],e)}(),Ho=function(){function e(){}return e=N([t.NgModule({imports:[ue,R.PanelModule,Ct],declarations:[Go],exports:[Go]})],e)}(),Wo=function(){function e(){}return N([t.Input()],e.prototype,"divergentFormData",void 0),e=N([t.Component({selector:"from-to",template:'<div id="from-to" class="ui-g ui-fluid" *ngIf="divergentFormData">\n <div class="ui-g-12">\n \x3c!-- Painel Collapsable --\x3e\n <p-panel\n class="ui-g-12 ui-fluid form-group"\n header="{{ \'hcm.payroll.disagreements\' | translate }}"\n [toggleable]="true"\n [collapsed]="false"\n >\n <section id="from-to-content" class="ui-g ui-fluid form-group">\n \x3c!-- INICIO DE SEÇÃO: DE (ANTES): --\x3e\n <p-panel class="ui-g-6 ui-fluid form-group" header="{{ \'hcm.payroll.from\' | translate }}">\n <section id="from-content" class="ui-g ui-fluid">\n <ng-container *ngFor="let divergence of divergentFormData">\n <div class="ui-g-6">\n <label for="{{divergence.key}}-from">{{ divergence.key }}</label>\n <input\n pInputText\n type="text"\n name="{{divergence.key}}-from"\n id="{{divergence.key}}-from"\n value="{{ divergence.oldValue }}"\n />\n\n </div>\n </ng-container>\n </section>\n </p-panel>\n \x3c!-- FINAL DE SEÇÃO: DE (ANTES): --\x3e\n\n \x3c!-- INICIO DE SEÇÃO: PARA (DEPOIS): --\x3e\n <p-panel class="ui-g-6 ui-fluid form-group" header="{{ \'hcm.payroll.to\' | translate }}">\n <section id="to-content" class="ui-g ui-fluid">\n <ng-container *ngFor="let divergence of divergentFormData">\n <div class="ui-g-6">\n <label for="{{divergence.key}}-to">{{ divergence.key }}</label>\n <input\n pInputText\n type="text"\n name="{{divergence.key}}-to"\n id="{{divergence.key}}-to"\n value="{{ divergence.newValue }}"\n />\n </div>\n </ng-container>\n </section>\n </p-panel>\n \x3c!-- FINAL DE SEÇÃO: PARA (DEPOIS): --\x3e\n </section>\n </p-panel>\n </div>\n</div>\n'})],e)}(),zo=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,R.PanelModule,a.TranslateModule,o.ReactiveFormsModule,d.InputTextModule],declarations:[Wo],exports:[Wo]})],e)}();e.AdmissionDraftSummaryComponent=Pe,e.AdmissionDraftSummaryModule=Ae,e.AdmissionDraftSummaryService=Me,e.AutocompleteParametersService=eo,e.BlockUiComponent=le,e.BlockUiModule=pe,e.BreadcrumbComponent=ce,e.BreadcrumbSDSModule=de,e.CNPJValidator=re,e.CPFValidator=oe,e.CompanyIndicationsService=Qt,e.ControlMessagesErrorComponent=me,e.ControlMessagesErrorModule=he,e.CoreDirectives=Se,e.CustomFieldsComponent=ye,e.CustomFieldsModule=ve,e.DataListModule=go,e.DataListRestModule=Ce,e.DateValidator=Uo,e.EmployeeSelectorComponent=Go,e.EmployeeSelectorModule=Ho,e.EmployeeSummaryComponent=Ee,e.EmployeeSummaryModule=Fe,e.EmployeeSummaryService=De,e.EntityODataParameter=No,e.ErrorPageComponent=Oe,e.ErrorPageModule=Le,e.FieldValidatorComponent=Re,e.FieldValidatorModule=xe,e.FileUploadComponent=qe,e.FileUploadCoreModule=Ve,e.FormComparatorService=po,e.FromToComponent=Wo,e.FromToModule=zo,e.HistoricalBankAccountComponent=Mo,e.HistoricalBankAccountListComponent=xo,e.HistoricalBankAccountListModule=Bo,e.HistoricalBankAccountListService=Lo,e.HistoricalBankAccountModule=Oo,e.HistoricalBankAccountService=Ao,e.HttpClientService=Ne,e.ImageCropComponent=Ye,e.ImageCropModule=Ge,e.ImageCropService=Ue,e.InputDateComponent=ge,e.InputDateModelComponent=We,e.InputDateModelModule=ze,e.InputDateModule=be,e.InputRestAutoCompleteComponent=bt,e.InputRestAutoCompleteEmployeeModelModule=Ct,e.InputRestAutoCompleteEmployeeModelService=_t,e.InputRestAutoCompleteEmployeeModule=St,e.InputRestAutoCompleteEmployeeService=It,e.InputRestAutoCompleteEnumComponent=Tt,e.InputRestAutoCompleteEnumModule=Et,e.InputRestAutoCompleteEnumService=Dt,e.InputRestAutoCompleteJobpositionComponent=xt,e.InputRestAutoCompleteJobpositionModule=Bt,e.InputRestAutoCompleteJobpositionService=Rt,e.InputRestAutoCompleteModelEnumModule=Lt,e.InputRestAutoCompleteModelEnumService=At,e.InputRestAutoCompleteModelModule=Pt,e.InputRestAutoCompleteModelService=Ft,e.InputRestAutoCompleteModule=vt,e.InputRestAutoCompleteService=gt,e.IntegrationService=Kt,e.ListRestComponent=jt,e.ListRestModule=qt,e.LookupModule=ko,e.LookupParametersService=Xt,e.NameNotSpacesDirective=Ie,e.OnlyNumberDirective=ke,e.PermissionService=uo,e.ReportService=so,e.ServicesModule=co,e.SpinnerLoaderComponent=Vt,e.SpinnerLoaderModule=Ut,e.StringMethods=ae,e.ToastComponent=mo,e.ToastModule=ho,e.ToastService=Be,e.TypeAdmissionModule=Gt,e.TypeAdmissionServices=Yt,e.WorkflowDataService=lo,e.WorkflowIntegrator=Yo,e.WorkstationgroupLookupDto=Do,e.WorkstationgroupLookupModule=Fo,e._moment=it,e.assign=function e(t){for(var o=[],n=1;n<arguments.length;n++)o[n-1]=arguments[n];if(!o.length)return t;var r=o.shift();if(Qe(t)&&Qe(r)){var i=function(o){var n,i,a,s;Qe(r[o])?(t[o]||Object.assign(t,((n={})[o]={},n)),e(t[o],r[o])):Ke(r[o])?Object.assign(t,((i={})[o]=r[o],i)):(t[o]||Object.assign(t,((a={})[o]=[],a)),Object.assign(t,((s={})[o]=r[o].map((function(n,r){return e(t[o][r]||{},n)})),s)))};for(var a in r)i(a)}return e.apply(void 0,Y([t],o))},e.autoCompleteObjectForIdObject=function(e){return Qe(e)?(e.hasOwnProperty("tableId")&&console.error("Paramentro não é um objeto Auto Complete válido, falta tableId"),Je(e.tableId)||console.error("tableId esta vazio"),{id:e.tableId}):(console.error("Paramentro não é um objeto"),!1)},e.clearValues=ht,e.cnpjValidator=ie,e.compareValues=mt,e.configEnabledFields=ct,e.containsMoreThanOneConsecutiveAbbreviation=function(e){return!/(\b.\s)(.\s)(.\b)\1?/g.test(e)},e.containsMoreThanOneConsecutiveBlankSpace=function(e){return!/(\w[ ]{2,}\w)/.test(e)},e.containsMoreThanTwoRepeatedCharacters=function(e){return!/([a-zA-Z])\1{2}/g.test(e)},e.containsSpecialCharacters=function(e){return!/[[\]!@#$%&*_+=`´{}^~<>.,:;?|()\/\\-]/.test(e)},e.convertBooleanString=function(e){return"boolean"==typeof e?!0===e?"true":"false":e},e.convertStringToBoolean=function(e){return!0===e||"true"===e.toLowerCase()},e.cpfValidator=ne,e.firstNameIsValid=function(e){var t=e.split(" ");return t.length>=2&&t[1].length>=1},e.firstNameLengthIsValid=function(e){var t=e.split(" ");return!(t[0].trim().length>0)||t[0].trim().length>=2},e.formatMoney=function(e,t){switch(void 0===t&&(t="EN"),t){case"EN":return Je(e)?e.toString().replace(".","").replace(",","."):"";case"BR":return Je(e)?e.toString().replace(".",",").replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1."):"";default:return Je(e)?e.toString().replace(".","").replace(",","."):""}},e.fullNameLengthIsValid=function(e){return e.length<=70},e.getAddWeekDaysBusiness=function(e,t){return T.addWeekDays(rt(e),t).format("DD/MM/YYYY")},e.getFormat=yt,e.getFormatDate=ot,e.getMoment=rt,e.getNowDate=nt,e.getObjValids=function(e){var t=Object.assign({},e),o={};return Object.keys(t).map((function(e){Je(t[e])&&(o[e]=et(e,t[e]))})),o},e.getQueryParams=function(e){e=e.split("+").join(" ");for(var t,o={},n=/[?&]?([^=]+)=([^&]*)/g;t=n.exec(e);)o[decodeURIComponent(t[1])]=decodeURIComponent(t[2]);return o},e.getWeekDaysBusiness=function(e,t){var o=t?rt(t):rt(e).endOf("month");return T.weekDays(rt(e),o)},e.getYears=function(e){return $e().diff(e,"years",!1)},e.invertFieldDate=tt,e.isBirthDayValid=function(e,t){if(e&&t)return t.isSameOrAfter(e)},e.isDateCompare=function(e,t,o){return!(e&&e.isValid()&&t&&o)||e[o](t)},e.isDateExpirationBeforeExpeditionDate=function(e,t){if(e&&t)return t.isSameOrAfter(e)},e.isDateField=et,e.isDateSameOrAfterCurrentDate=function(e){if(e){var t=Ht();return e.isSameOrAfter(t)}},e.isFullDate=Ze,e.isMax=function(e,t){return e.length<=t},e.isNumber=Wt,e.isObject=Qe,e.isRequired=function(e){return null!=e&&e.length>0},e.isShallow=Ke,e.isValid=Je,e.isValidDate=Xe,e.isValidPIS=function(e){var t=0,o=0,n=e.replace(/[^\d]+/g,"");if(11!==n.length||"00000000000"===n||"11111111111"===n||"22222222222"===n||"33333333333"===n||"44444444444"===n||"55555555555"===n||"66666666666"===n||"77777777777"===n||"88888888888"===n||"99999999999"===n)return!1;for(var r=0;r<10;r++)t+=parseInt(n.substring(r,r+1))*parseInt("3298765432".substring(r,r+1));return(o=10===(o=11-t%11)||11===o?0:o)===parseInt(""+n.charAt(10))},e.mountCustomForSave=function(e,t,o){void 0===t&&(t=null),void 0===o&&(o=null);var n=[];return t&&e.length&&t.map((function(t,r){var i=Object.keys(e[r]).toString(),a=Je(e[r][i])?e[r][i]:null,s="date"===t.type&&o&&Je(a)?$e(a,yt(o)).format("YYYY-MM-DD"):a;n.push({field:i,value:s})})),n.length?n:null},e.mountCustomForShow=function(e){var t=[];return Object.keys(e||{}).forEach((function(o){"date"===e[o].type&&e[o].value&&(e[o].value=it(e[o].value).format("L")),t.push(e[o])})),t},e.mountCustomToSave=at,e.mountCustomToShow=st,e.mountGeneratedCustomToSave=function(e){return Object.entries(e).forEach((function(t){var o=U(t,2),n=o[0];o[1]||delete e[n]})),e},e.ngCalendarFormat=function(e,t){if(void 0===t&&(t="DD/MM/YYYY"),Xe(e))return"string"==typeof e?e:it(e).format(t)},e.notEmpty=zt,e.numberOrZero=$t,e.removeCharacteresSpecials=ft,e.removeEmpty=function e(t){return Object.keys(t).forEach((function(o){return t[o]&&"object"==typeof t[o]&&e(t[o])||!t[o]&&void 0!==t[o]&&delete t[o]})),t},e.removeWhiteSpaces=function(e){return e&&String(e)?String(e).replace(/\s/g,""):String(e)},e.setCustonFields=function(e){var t=this;return e.map((function(e){var n={},r=e.value||null;"boolean"==typeof r&&(r=r?"true":"false"),n[e.field]=new o.FormControl(r),t.push(new o.FormGroup(n))})),e},e.setDisableField=dt,e.setErrors=function(e,t,o){var n=this;setTimeout((function(){var r;o?((r=Object.assign({},n.get(e).errors))[t]=o,n.get(e).setErrors(r)):(r=n.get(e).errors)&&Object.keys(r).length&&(delete r[t],Object.keys(r).length||n.get(e).setErrors(null))}),0)},e.setRequired=pt,e.setRequiredFields=function(e,t,n){t?n.forEach((function(t){return pt(e,t,!0,[o.Validators.required])})):n.forEach((function(t){return pt(e,t,!1)}))},e.setValidator=ut,e.setValidatorsAndDisableFields=function(e,t){t.forEach((function(t){ut(e,t.field,t.validators),dt(e,t.disabled,t.field,t.clearValue)}))},e.setValueCustom=function(e,t){var o=t?Object.keys(t).length:0;return e.map((function(e){e.value=o>0?t[e.field]:null})),e},e.stringMethods=se,e.sun=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduce((function(e,t){return $t(t)+e}),0)},e.uiid=function(){return(new D).guid().replace(/[^a-zA-Z0-9.]/g,"").toUpperCase()},e.validateBirthDate=function(e,t){if(e&&t){var o=Ht("string"==typeof e?e.replace(/[^\d]+/g,""):e,"DDMMYYYY").format("YYYY-MM-DD").toString(),n=Ht(t.replace(/[^\d]+/g,""),"DDMMYYYY").format("YYYY-MM-DD").toString();return Ht(n).isSameOrAfter(o)}},e.verifyValidationsForm=lt,e.ɵa=ue,e.ɵb=we,e.ɵc=_e,e.ɵd=je,e.ɵe=kt,e.ɵf=wt,e.ɵg=Mt,e.ɵh=Ot,e.ɵi=Nt,e.ɵj=fo,e.ɵk=yo,e.ɵl=Io,e.ɵm=bo,e.ɵn=Eo,e.ɵo=_o,e.ɵp=Co,e.ɵq=Po,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/forms"),require("primeng/blockui"),require("primeng/progressspinner"),require("@angular/router"),require("@ngx-translate/core"),require("rxjs/operators"),require("primeng/breadcrumb"),require("@angular/common"),require("primeng/dropdown"),require("primeng/inputmask"),require("primeng/inputtext"),require("primeng/shared"),require("@seniorsistemas/angular-components"),require("moment"),require("rxjs"),require("primeng/tooltip"),require("primeng/table"),require("@angular/common/http"),require("primeng/api"),require("@senior-gestao-pessoas/angular-components"),require("ng2-img-cropper"),require("primeng/button"),require("primeng/dialog"),require("primeng/fileupload"),require("chance"),require("moment-business"),require("primeng/autocomplete"),require("primeng/splitbutton"),require("primeng/components/common/messageservice"),require("@seniorsistemas/senior-platform-data"),require("primeng/toast"),require("ng2-currency-mask"),require("primeng/fieldset"),require("primeng/panel"),require("primeng/confirmdialog")):"function"==typeof define&&define.amd?define("@senior-gestao-pessoas/payroll-core",["exports","@angular/core","@angular/forms","primeng/blockui","primeng/progressspinner","@angular/router","@ngx-translate/core","rxjs/operators","primeng/breadcrumb","@angular/common","primeng/dropdown","primeng/inputmask","primeng/inputtext","primeng/shared","@seniorsistemas/angular-components","moment","rxjs","primeng/tooltip","primeng/table","@angular/common/http","primeng/api","@senior-gestao-pessoas/angular-components","ng2-img-cropper","primeng/button","primeng/dialog","primeng/fileupload","chance","moment-business","primeng/autocomplete","primeng/splitbutton","primeng/components/common/messageservice","@seniorsistemas/senior-platform-data","primeng/toast","ng2-currency-mask","primeng/fieldset","primeng/panel","primeng/confirmdialog"],t):t(((e=e||self)["senior-gestao-pessoas"]=e["senior-gestao-pessoas"]||{},e["senior-gestao-pessoas"]["payroll-core"]={}),e.ng.core,e.ng.forms,e.blockui,e.progressspinner,e.ng.router,e.core$1,e.rxjs.operators,e.breadcrumb,e.ng.common,e.dropdown,e.inputmask,e.inputtext,e.shared,e.angularComponents,e.moment_,e.rxjs,e.tooltip,e.table,e.ng.common.http,e.api,e.angularComponents$1,e.ng2ImgCropper,e.button,e.dialog,e.fileupload,e.chance,e.business,e.autocomplete,e.splitbutton,e.messageservice,e.seniorPlatformData,e.toast,e.ng2CurrencyMask,e.fieldset,e.panel,e.confirmdialog)}(this,(function(e,t,o,n,r,i,a,s,l,p,c,u,d,m,h,y,f,g,b,v,I,k,S,_,w,C,D,T,E,F,M,P,A,O,L,R,x){"use strict";T=T&&T.hasOwnProperty("default")?T.default:T;var B=function(){return(B=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 N(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a}function j(e,t,o,n){return new(o||(o=Promise))((function(r,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){e.done?r(e.value):new o((function(t){t(e.value)})).then(a,s)}l((n=n.apply(e,t||[])).next())}))}function q(e,t){var o,n,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(o)throw new TypeError("Generator is already executing.");for(;a;)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 a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{o=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function V(e){var t="function"==typeof Symbol&&e[Symbol.iterator],o=0;return t?t.call(e):{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}}}function U(e,t){var o="function"==typeof Symbol&&e[Symbol.iterator];if(!o)return e;var n,r,i=o.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return a}function Y(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(U(arguments[t]));return e}var G,H,W,z,$,Q,K,J,X,Z,ee,te,oe=function(){function e(){}return e.prototype.calcChecker1=function(e){for(var t=null,o=0;o<9;++o)t+=e.toString().charAt(o)*(10-o);var n=t%11;return n<2?0:11-n},e.prototype.calcChecker2=function(e){for(var t=null,o=0;o<10;++o)t+=e.toString().charAt(o)*(11-o);var n=t%11;return n<2?0:11-n},e.prototype.checkCPF=function(e){var t=e.replace(/\.|\-|\s/g,""),o=t.substring(0,9),n=t.substring(9,11);if(11!==t.length)return!1;for(var r=0;r<10;r++)if(""+o+n===Array(12).join(r.toString()))return!1;var i=this.calcChecker1(o),a=this.calcChecker2(o+""+i);return n.toString()===i.toString()+a.toString()},e}(),ne=new oe,re=function(){function e(){}return e.prototype.checkCNPJ=function(e){var t=e;if(t){var o=void 0,n=void 0,r=void 0,i=void 0,a=void 0;if(14!==(t=t.replace(/[^\d]+/g,"")).length)return!0;if("00000000000000"===t||"11111111111111"===t||"22222222222222"===t||"33333333333333"===t||"44444444444444"===t||"55555555555555"===t||"66666666666666"===t||"77777777777777"===t||"88888888888888"===t||"99999999999999"===t)return!1;o=t.length-2,n=t.substring(0,o),r=t.substring(o),i=0,a=o-7;for(var s=o;s>=1;s--)i+=n.charAt(o-s)*a--,a<2&&(a=9);if((i%11<2?0:11-i%11)!==Number(r.charAt(0)))return!1;o+=1,n=t.substring(0,o),i=0,a=o-7;for(s=o;s>=1;s--)i+=n.charAt(o-s)*a--,a<2&&(a=9);return(i%11<2?0:11-i%11)===Number(r.charAt(1))}return!0},e}(),ie=new re,ae=function(){function e(){this.addStringFormat()}return e.prototype.addStringFormat=function(){if(!String.prototype.hasOwnProperty("format")){var e={format:function(){for(var e=this,t=0;t<arguments.length;t++){var o=new RegExp("\\{"+t+"\\}","gi");e=e.replace(o,arguments[t])}return e}};Object.assign(String.prototype,e)}},e}(),se=new ae,le=function(){function e(){}return N([t.Input()],e.prototype,"blocked",void 0),N([t.Input()],e.prototype,"target",void 0),e=N([t.Component({selector:"block-ui",template:'<p-blockUI [blocked]="blocked">\n <p-progressSpinner [strokeWidth]="5"></p-progressSpinner>\n</p-blockUI>\n',styles:[".ui-widget-overlay{background:#ccc!important;opacity:.5!important}@-webkit-keyframes ui-progress-spinner-color{0%,100%,40%,66%,80%,90%{stroke:#428bca}}@keyframes ui-progress-spinner-color{0%,100%,40%,66%,80%,90%{stroke:#428bca}}p-progressspinner{position:absolute!important;top:50%!important;left:50%!important}"]})],e)}(),pe=function(){function e(){}return e=N([t.NgModule({imports:[o.FormsModule,n.BlockUIModule,r.ProgressSpinnerModule],declarations:[le],exports:[le]})],e)}(),ce=function(){function e(e,t,o){this.activatedRoute=e,this.router=t,this.translate=o,this.items=[]}return e.prototype.ngOnInit=function(){var e=this;this.router.events.pipe(s.filter((function(e){return e instanceof i.NavigationEnd}))).subscribe((function(){var t=e.activatedRoute.root;e.items=e.getBreadcrumbs(t,[])}))},e.prototype.getBreadcrumbs=function(e,t){var o=e.children;if(0===o.length)return t;this.generateBreadcrumb(o,t);var n=t.length&&t.length-1||0;return this.title=t[n]&&t[n].label,t},e.prototype.generateBreadcrumb=function(e,t){var o=this;e.forEach((function(e,n){e.snapshot.data.hasOwnProperty("breadcrumb")&&e.snapshot.data.breadcrumb.map((function(n){var r={label:o.translate.instant(n.name),queryParams:e.snapshot.queryParams,routerLink:o.getFormattedUrl(e,n.routerLink),url:o.getFormattedUrl(e,n.url)};n.routerLink&&(r.disabled=!0,r.routerLinkActiveOptions={exact:!0}),t.push(r)})),e.children&&e.children.length&&o.generateBreadcrumb(e.children,t)}))},e.prototype.getFormattedUrl=function(e,t){return t&&(Object.keys(e.snapshot.params).forEach((function(o){t=t.replace(":"+o,e.snapshot.params[o])})),t.includes(":")&&e.parent)?this.getFormattedUrl(e.parent,t):t},e.ctorParameters=function(){return[{type:i.ActivatedRoute},{type:i.Router},{type:a.TranslateService}]},e=N([t.Component({selector:"c-breadcrumb",template:'<h1 class="sds-page-title">{{title}}</h1>\n<p-breadcrumb [model]="items" ></p-breadcrumb>\n'})],e)}(),ue=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule],exports:[p.CommonModule,a.TranslateModule]})],e)}(),de=function(){function e(){}return e=N([t.NgModule({imports:[o.FormsModule,l.BreadcrumbModule,ue],declarations:[ce],exports:[ce]})],e)}(),me=function(){function e(){}return Object.defineProperty(e.prototype,"errorMessage",{get:function(){for(var e in this.control.errors)if(this.control.errors.hasOwnProperty(e)&&(this.control.touched||this.control.dirty))return this.errorList[e];return null},enumerable:!0,configurable:!0}),N([t.Input()],e.prototype,"control",void 0),N([t.Input()],e.prototype,"errorList",void 0),e=N([t.Component({selector:"control-messages-error",template:'<div class="error-message" *ngIf="errorMessage">\n {{ errorMessage | translate }}\n</div>\n',styles:[".error-message{color:#c13018;margin-top:5px;font-size:13px}"]})],e)}(),he=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,ue,o.ReactiveFormsModule],declarations:[me],exports:[me]})],e)}(),ye=function(){function e(){this.optionsBoolean=[{label:"Selecione",value:""},{label:"Sim",value:"true"},{label:"Não",value:"false"}]}return e.prototype.ngOnInit=function(){},N([t.Input()],e.prototype,"params",void 0),N([t.Input()],e.prototype,"disabled",void 0),N([t.Input()],e.prototype,"readonly",void 0),N([t.Input()],e.prototype,"required",void 0),N([t.Input()],e.prototype,"form",void 0),e=N([t.Component({selector:"custom-fields",template:'<div [ngSwitch]="params.type" [formGroup]="form" *ngIf="form" >\n <div *ngSwitchCase="\'date\'" >\n <input-date-calendar [form]="form" [name]="params.field" ></input-date-calendar>\n </div>\n <div *ngSwitchCase="\'boolean\'" >\n <p-dropdown [options]="optionsBoolean" [name]="params.field"\n [(ngModel)]="params.value" [formControlName]="params.field" [required]="required" [readonly]="readonly"\n [style]="{\'width\': \'100%\'}"\n ></p-dropdown>\n </div>\n <div *ngSwitchDefault >\n <input type="text" *ngIf="!params.mask" pInputText [formControlName]="params.field" />\n <p-inputMask *ngIf="params.mask" [(ngModel)]="params.value" [formControlName]="params.field" [mask]="params.mask" [required]="required" [name]="params.field" [readonly]="readonly" ></p-inputMask>\n </div>\n</div>\n',styles:[""]})],e)}(),fe=y,ge=function(){function e(e){this.localeService=e,this.unmask=!0,this.onBlurGetMoment=new t.EventEmitter,this.ngUnsubscribe=new f.Subject,this.mask=null}return e.prototype.ngOnInit=function(){var e=this;this.localeService.get().pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(t){if(e.mask=e.formatMask(t),e.format=e.setFormat(),e.form.get(e.name).value){var o=e.form.get(e.name).value.toString(),n=fe(o,e.format||"YYYY-MM-DD");e.form.get(e.name).setValue(n.format(e.format||"L")),e._date=n}}))},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},e.prototype.formatMask=function(e){this.locale=e;var t=this.locale.calendar.dateFormat.toString();return this.withoutDay&&(t=t.replace("dd/","").replace("-dd","")),(t=t.replace(/[d]|[m]/g,"9")).replace(/[y]/g,"99")},e.prototype.setFormat=function(){var e=this.locale.calendar.dateFormat.toString();return e=e.replace(/[y]/g,"YY"),this.withoutDay&&(e=e.replace("dd/","").replace("-dd","")),e.toUpperCase()},Object.defineProperty(e.prototype,"placeholder",{get:function(){return this.mask?this.mask.toString().replace(/[9]/g,"_"):""},enumerable:!0,configurable:!0}),e.prototype.onBlur=function(e){if(e&&e.target&&e.target.value){var t=this.form.get(this.name).value;this._date=fe(t,this.format),this.onBlurGetMoment.emit(this._date)}else this._date={},this.form.get(this.name).setValue(null),this.onBlurGetMoment.emit(null)},Object.defineProperty(e.prototype,"model",{get:function(){var e=this.form.get(this.name).value;return fe(e,this.format)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inputDateElement",{get:function(){return this._inputDateElement},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:h.LocaleService}]},N([t.ViewChild("inputDateElement",{static:!1})],e.prototype,"_inputDateElement",void 0),N([t.Input()],e.prototype,"form",void 0),N([t.Input()],e.prototype,"name",void 0),N([t.Input()],e.prototype,"disabled",void 0),N([t.Input()],e.prototype,"unmask",void 0),N([t.Input()],e.prototype,"inputId",void 0),N([t.Input()],e.prototype,"withoutDay",void 0),N([t.Input()],e.prototype,"readonly",void 0),N([t.Output()],e.prototype,"onBlurGetMoment",void 0),N([t.Input()],e.prototype,"model",null),e=N([t.Component({selector:"input-date-calendar",template:'<div [formGroup]="form" >\n <p-inputMask *ngIf="mask" [formControlName]="name"\n [mask]="mask"\n (onBlur)="onBlur($event)"\n [placeholder]="placeholder"\n [attr.disabled]="disabled"\n [unmask]="unmask"\n [inputId]="inputId"\n [readonly]="readonly"\n #inputDateElement\n ></p-inputMask>\n</div>\n'})],e)}(),be=function(){function e(){}return e=N([t.NgModule({imports:[u.InputMaskModule,o.FormsModule,o.ReactiveFormsModule,p.CommonModule],declarations:[ge],exports:[ge]})],e)}(),ve=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,o.ReactiveFormsModule,m.SharedModule,d.InputTextModule,be,c.DropdownModule,u.InputMaskModule],declarations:[ye],providers:[],exports:[ye]})],e)}(),Ie=function(){function e(e){this.elementRef=e,this.el=this.elementRef.nativeElement}return e.prototype.onBlur=function(e){this.cleanVar(e)},e.prototype.cleanVar=function(e){var t=e.trim().replace(/^\s+|\s+$|\s+(?=\s)/g,"");return e!==t&&(this.el.value=t),t},e.ctorParameters=function(){return[{type:t.ElementRef}]},N([t.HostListener("blur",["$event.target.value"])],e.prototype,"onBlur",null),e=N([t.Directive({selector:"[name-not-spaces]"})],e)}(),ke=function(){function e(e){this.el=e}return e.prototype.onKeyDown=function(e){var t=e;-1!==[46,8,9,27,13,110,190].indexOf(t.keyCode)||65===t.keyCode&&(t.ctrlKey||t.metaKey)||67===t.keyCode&&(t.ctrlKey||t.metaKey)||86===t.keyCode&&(t.ctrlKey||t.metaKey)||88===t.keyCode&&(t.ctrlKey||t.metaKey)||t.keyCode>=35&&t.keyCode<=39||(t.shiftKey||t.keyCode<48||t.keyCode>57)&&(t.keyCode<96||t.keyCode>105)&&t.preventDefault()},e.ctorParameters=function(){return[{type:t.ElementRef}]},N([t.HostListener("keydown",["$event"])],e.prototype,"onKeyDown",null),e=N([t.Directive({selector:"[only-number]"})],e)}(),Se=function(){function e(){}return e=N([t.NgModule({imports:[],declarations:[ke,Ie],exports:[ke,Ie],providers:[],schemas:[]})],e)}();(G=e.UsingType||(e.UsingType={})).TYPE_1="TYPE_1",G.TYPE_2="TYPE_2",G.TYPE_3="TYPE_3",G.TYPE_4="TYPE_4",G.TYPE_6="TYPE_6",G.TYPE_7="TYPE_7",G.TYPE_8="TYPE_8",G.TYPE_9="TYPE_9",G.TYPE_10="TYPE_10",G.TYPE_11="TYPE_11",G.TYPE_12="TYPE_12",G.TYPE_14="TYPE_14",G.TYPE_15="TYPE_15",G.TYPE_16="TYPE_16",G.TYPE_17="TYPE_17",G.TYPE_18="TYPE_18",G.TYPE_19="TYPE_19",G.TYPE_20="TYPE_20",G.TYPE_21="TYPE_21",(H=e.CompanyIndicationType||(e.CompanyIndicationType={})).USE_DEPENDENTS="USE_DEPENDENTS",H.VACCINATION_FREQUENCY="VACCINATION_FREQUENCY",H.APPORTIONMENT_CALCULATION="APPORTIONMENT_CALCULATION",H.USE_WORKSTATION_GROUP_EMPLOYEE="USE_WORKSTATION_GROUP_EMPLOYEE",H.STRUCTURE="STRUCTURE",H.PAY_ANNUITY="PAY_ANNUITY",H.USE_HISTORICAL_BANK_ACCOUNT="USE_HISTORICAL_BANK_ACCOUNT",(e.CoreFieldType||(e.CoreFieldType={})).searchValue="searchValue",(W=e.DirectionEnumeration||(e.DirectionEnumeration={})).ASC="ASC",W.DESC="DESC",(z=e.ModuleType||(e.ModuleType={})).MANAGEMENT_PANEL="MANAGEMENT_PANEL",z.PERFORMANCE_MANAGEMENT="PERFORMANCE_MANAGEMENT",z.CAREER_SUCCESSION="CAREER_SUCCESSION",z.RECRUIT_MANAGEMENT="RECRUIT_MANAGEMENT",z.REMUNERATION_MANAGEMENT="REMUNERATION_MANAGEMENT",z.DEVELOPMENT_MANAGEMENT="DEVELOPMENT_MANAGEMENT",z.PAYROLL="PAYROLL",z.APP="APP",z.MOODS="MOODS",($=e.Operators||(e.Operators={})).EQUAL="eq",$.DIFFERENT="ne",$.LESS_THAN="it",$.GREATER_THAN="gt",$.LESS__EQUAL_THAN="le",$.GREATER_EQUAL_THAN="ge",$.CONTAINING="containing",$.LOWER="lower",$.AND="and",$.OR="or",(Q=e.CompareType||(e.CompareType={})).isBefore="isBefore",Q.isAfter="isAfter",Q.isSame="isSame",Q.isSameOrAfter="isSameOrAfter",Q.isSameOrBefore="isSameOrBefore",Q.isNotSame="isNotSame",(K=e.ServiceType||(e.ServiceType={})).ENTRY="entry",K.GENERAL_REGISTER="general_register",K.ORGANIZATION_REGISTER="organization_register",K.PAYROLL="payroll",K.DEPENDENT="dependent",(J=e.HttpRequestType||(e.HttpRequestType={})).POST="post",J.GET="get",(X=e.ReportFormat||(e.ReportFormat={})).PDF="Pdf",X.CSV="Csv",X.HTML="Html",X.XLS="Xls",X.XLSX="Xlsx",X.XML="Xml",X.ODT="Odt",X.RTF="Rtf",(Z=e.ParameterType||(e.ParameterType={})).STRING="String",Z.INTEGER="Integer",Z.DOUBLE="Double",Z.BOOLEAN="Boolean",Z.DATE="Date",Z.DATETIME="DateTime",Z.TIME="Time",Z.OBJECT="Object",(ee=e.MenuType||(e.MenuType={})).DEFAULT="DEFAULT",ee.ACTION="ACTION",(te=e.ReportStage||(e.ReportStage={})).STARTING="Starting",te.COMPILING="Compiling",te.FILLING="Filling",te.EXPORTING="Exporting",te.DONE="Done",te.CANCELLED="Cancelled",te.GENERATED="Generated",te.ERROR="Error";var _e=function(){function e(e){this.http=e}return e.prototype.getList=function(e,t){return this.http.post(""+e,t)},e.ctorParameters=function(){return[{type:v.HttpClient}]},e=N([t.Injectable()],e)}(),we=function(){function o(e){this.dataListService=e,this.rows=10,this.paginator=!0,this.first=1,this.alwaysShowPaginator=!0,this.sortMode="multiple",this.responsive=!0,this.scrollable=!1,this.lazyLoad=new t.EventEmitter,this.loadingChange=new t.EventEmitter,this.listDataChange=new t.EventEmitter,this.selectedDataChange=new t.EventEmitter,this.headerCheckboxToggle=new t.EventEmitter,this.ngUnsubscribe=new f.Subject}return o.prototype.ngOnInit=function(){this.lazy||this.getlistData()},o.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},o.prototype.getActions=function(e,t){return this.actions(e,t)},o.prototype.pagination=function(e){this.lazy||this.getlistData(e.rows,Math.floor(e.first/e.rows))},o.prototype.onLazyLoad=function(t){var o=this;this.loading=!0,t.multiSortMeta&&t.multiSortMeta.length&&(this.orderBy=[],t.multiSortMeta.map((function(t){o.orderBy.push({field:t.field,direction:1===t.order?e.DirectionEnumeration.ASC:e.DirectionEnumeration.DESC})}))),this.getlistData(t.rows,Math.floor(t.first/t.rows)+1)},o.prototype.onFilter=function(){this.lazy&&(this.loading=!0),this.getlistData()},Object.defineProperty(o.prototype,"recordsMessage",{get:function(){return(this.totalRecords||0)+" "+(1===this.totalRecords?this.singularMessageRecords:this.pluralMessageRecords)},enumerable:!0,configurable:!0}),o.prototype.getlistData=function(e,t){var o=this;void 0===e&&(e=this.rows),void 0===t&&(t=this.first),this.endpoint?this.dataListService.getList(this.endpoint,B({page:{current:t,size:e,orderBy:this.orderBy}},this.initParameters,this._searchParameters)).pipe(s.takeUntil(this.ngUnsubscribe),s.map((function(e){return e&&e.result}))).subscribe((function(e){o.listData=e[o.keyPayload],o.totalRecords=e.countResult,o.lazy&&o.lazyLoad.emit(o.listData)})):this.lazy&&this.lazyLoad.emit(this.listData)},o.prototype.onHeaderCheckboxToggle=function(e){this.headerCheckboxToggle.emit(e)},o.prototype.getFieldValue=function(e,t){return t.field&&t.field.includes(".")?(t.field.split(".").map((function(t){return e=e&&e[t]})),e):e[t.field]},Object.defineProperty(o.prototype,"parameters",{set:function(e){e&&(this._searchParameters=B({},e),this.dataListTable&&(this.dataListTable.first=0),this.onFilter())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"loading",{get:function(){return this._loading},set:function(e){this._loading=e,this.loadingChange.emit(this._loading)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"listData",{get:function(){return this._listData},set:function(e){this._listData=e,this.listDataChange.emit(this._listData)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"selectedData",{get:function(){return this._selectedData},set:function(e){this._selectedData=e,this.selectedDataChange.emit(this._selectedData)},enumerable:!0,configurable:!0}),o.ctorParameters=function(){return[{type:_e}]},N([t.ViewChild("dataListTable",{static:!1})],o.prototype,"dataListTable",void 0),N([t.Input()],o.prototype,"id",void 0),N([t.Input()],o.prototype,"dataKey",void 0),N([t.Input()],o.prototype,"rows",void 0),N([t.Input()],o.prototype,"emptyMessage",void 0),N([t.Input()],o.prototype,"columns",void 0),N([t.Input()],o.prototype,"paginator",void 0),N([t.Input()],o.prototype,"first",void 0),N([t.Input()],o.prototype,"alwaysShowPaginator",void 0),N([t.Input()],o.prototype,"actions",void 0),N([t.Input()],o.prototype,"actionLabel",void 0),N([t.Input()],o.prototype,"selectionMode",void 0),N([t.Input()],o.prototype,"lazy",void 0),N([t.Input()],o.prototype,"isMultipleSelection",void 0),N([t.Input()],o.prototype,"isSortable",void 0),N([t.Input()],o.prototype,"showHeaderCheckBox",void 0),N([t.Input()],o.prototype,"sortMode",void 0),N([t.Input()],o.prototype,"endpoint",void 0),N([t.Input()],o.prototype,"totalRecords",void 0),N([t.Input()],o.prototype,"orderBy",void 0),N([t.Input()],o.prototype,"singularMessageRecords",void 0),N([t.Input()],o.prototype,"pluralMessageRecords",void 0),N([t.Input()],o.prototype,"keyPayload",void 0),N([t.Input()],o.prototype,"initParameters",void 0),N([t.Input()],o.prototype,"responsive",void 0),N([t.Input()],o.prototype,"scrollable",void 0),N([t.Output()],o.prototype,"lazyLoad",void 0),N([t.Output()],o.prototype,"loadingChange",void 0),N([t.Output()],o.prototype,"listDataChange",void 0),N([t.Output()],o.prototype,"selectedDataChange",void 0),N([t.Output()],o.prototype,"headerCheckboxToggle",void 0),N([t.Input()],o.prototype,"parameters",null),N([t.Input()],o.prototype,"loading",null),N([t.Input()],o.prototype,"listData",null),N([t.Input()],o.prototype,"selectedData",null),o=N([t.Component({selector:"c-data-list-rest",template:'<div *sLoadingState="loading">\n <p-table #dataListTable [id]="id" class="sds-list" [value]="listData" [columns]="columns" [paginator]="paginator" [rows]="rows" [first]="first"\n (onLazyLoad)="onLazyLoad($event)" [lazy]="lazy" [alwaysShowPaginator]="alwaysShowPaginator" (onPage)="pagination($event)"\n [totalRecords]="totalRecords" [(selection)]="selectedData" [dataKey]="dataKey" [sortMode]="sortMode" [responsive]="responsive" [scrollable]="scrollable"\n pageLinks="3" (onHeaderCheckboxToggle)="onHeaderCheckboxToggle($event)" [selectionMode]="selectionMode">\n \x3c!-- Colgroup --\x3e\n <ng-template pTemplate="colgroup" let-coumns>\n <colgroup>\n <col *ngFor="let col of columns; let i = index"\n [ngClass]="\'col-\'+i+\' col-scroll-resize\'"/>\n <col [ngClass]="\'col-\'+ (columns?.length || 0) +\' col-scroll-resize\'"/>\n </colgroup>\n </ng-template>\n \x3c!-- Header --\x3e\n <ng-template pTemplate="header">\n \x3c!-- Cabeçalhos quando da table é permitido ordenar as colunas --\x3e\n <tr>\n \x3c!-- Checkbox quando há seleção de linhas --\x3e\n <th id="{{id}}-checkbox-header" *ngIf="isMultipleSelection" style="width: 2.25em">\n <p-tableHeaderCheckbox *ngIf="showHeaderCheckBox"></p-tableHeaderCheckbox>\n </th>\n \x3c!-- Cabeçalhos das colunas da tabela --\x3e\n <th id="{{id}}-col-header-{{i}}" *ngFor="let col of columns; let i = index" [pSortableColumn]="col.field" [pSortableColumnDisabled]="!isSortable || !!col.icon"\n [style.width]="col.width" [pTooltip]="col.tooltip || col.label" tooltipPosition="top" showDelay="500">\n {{col[\'label\']}}\n \x3c!-- Quando a coluna é um ícone não exibe o ícone de ordenação da mesma --\x3e\n <p-sortIcon *ngIf="isSortable && !col.icon" [field]="col.field"></p-sortIcon>\n </th>\n \x3c!-- Cabeçalho da coluna de ações --\x3e\n <th id="col-actions" *ngIf="actions && actions()?.length" [ngClass]="{ actionsSize: actions().length > 1, actionSize: actions().length === 1 }"></th>\n </tr>\n </ng-template>\n \x3c!-- Body --\x3e\n <ng-template pTemplate="body" let-rowData let-key="rowIndex">\n <tr [pSelectableRow]="rowData">\n <td id="{{id}}-checkbox-body-{{key}}" *ngIf="isMultipleSelection">\n <p-tableCheckbox [value]="rowData"></p-tableCheckbox>\n </td>\n <td id="{{id}}-col-body-{{i}}-{{key}}" *ngFor="let col of columns;let i = index" [pTooltip]="col.icon ? \'\' : getFieldValue(rowData, col)"\n tooltipPosition="top" showDelay="500">\n \x3c!-- Exibe o ícone caso exista. Para isso o valor da coluna deve ser { value: string, style: object } --\x3e\n <i *ngIf="col.icon" class="{{rowData[col[\'field\']]?.value}}" [ngStyle]="rowData[col[\'field\']]?.style" aria-hidden="true"></i>\n \x3c!-- Quando não há ícone exibe o valor normal da coluna --\x3e\n <span>{{getFieldValue(rowData, col)}}</span>\n </td>\n\n \x3c!-- Coluna das ações --\x3e\n <td id="col-actions-{{key}}" class="col-actions" *ngIf="actions && actions(rowData)?.length">\n <s-button id="{{id}}-btn-actions-{{key}}" *ngIf="actions(rowData).length > 1" [label]="actionLabel" priority="default" [model]="getActions(rowData, key)"\n [disabled]="false" [auxiliary]="true"></s-button>\n\n <s-button id="{{id}}-btn-action-{{key}}" *ngIf="actions(rowData).length <= 1" [label]="actions(rowData, key)[0].label" priority="default"\n (click)="actions(rowData, key)[0].command()" [disabled]="false" [auxiliary]="true"></s-button>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate="paginatorright">\n <span>{{recordsMessage}}</span>\n </ng-template>\n\n <ng-template pTemplate="emptymessage" let-columns>\n <tr>\n <td id="{{id}}-empty-message" [attr.colspan]="columns?.length + (isMultipleSelection ? 2 : 1)">{{emptyMessage}}</td>\n </tr>\n </ng-template>\n </p-table>\n</div>\n',encapsulation:t.ViewEncapsulation.None,providers:[_e],styles:["app-data-list p-table .ui-table .ui-table-tbody>tr>td,app-data-list p-table .ui-table .ui-table-thead>tr>th{text-overflow:ellipsis;white-space:nowrap!important}app-data-list p-table .ui-paginator .ui-paginator-right-content{margin-left:auto}.actionsSize{width:11rem}.actionSize{width:18rem}body .ui-tooltip{max-width:22.3em!important}@media screen and (max-width:478px){.ui-paginator-right-content{display:none}}"]})],o)}(),Ce=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,ue,h.ButtonModule,h.LoadingStateModule,b.TableModule,g.TooltipModule],declarations:[we],exports:[we]})],e)}(),De=function(){function e(e){this.http=e,this.employeeBasicInformations=new f.Subject}return e.prototype.findEmployee=function(e,t){return this.http.post("hcm/payroll/queries/"+e,{employeeId:t})},e.prototype.findEmployeeAutoComplete=function(e,t){return this.http.post("hcm/payroll/queries/"+e,{valueSearch:t})},e.prototype.blobServiceRequestAccess=function(e,t){return this.http.post("hcm/payroll/actions/"+e,t)},e.prototype.setEmployeeBasicInformations=function(e){this.employeeBasicInformations.next(e)},e.prototype.getEmployeeBasicInformations=function(){return this.employeeBasicInformations.asObservable()},e.ctorParameters=function(){return[{type:v.HttpClient}]},e=N([t.Injectable()],e)}(),Te=y,Ee=function(){function e(e,t){this.activatedRoute=e,this.employeeService=t,this.timetrackingLabel="Status",this.hireLabel="Admissão",this.registerNumberLabel="Matrícula",this.ageLabel="Idade",this.loadingLabel="...",this.loadingDescription="Carregando...",this.isLoading=!1,this.ngUnsubscribe=new f.Subject}return e.prototype.ngOnInit=function(){var e=this;this.emploayeeData={name:this.loadingLabel,jobPosition:this.loadingDescription},this.activatedRoute.params.pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(t){t.employeeId&&e.getInformation(t.employeeId)}))},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(!0),this.ngUnsubscribe.complete()},e.prototype.getInformation=function(e){var t=this;this.isLoading=!0,this.employeeService.findEmployee("employeeContractualInformations",e).pipe(s.takeUntil(this.ngUnsubscribe),s.map((function(e){return e&&e.result})),s.finalize((function(){t.isLoading=!1}))).subscribe((function(e){t.employeeService.setEmployeeBasicInformations(e),t.emploayeeData=B({},e,{timeTrackingResumeType:e.timeTrackingResumeType&&e.timeTrackingResumeType.value});var o=[];if(e.city&&o.push(e.city),e.stateAbbreviation&&o.push(e.stateAbbreviation),t.emploayeeData.location=o.join(" - "),e.hireDate&&(t.emploayeeData.hireDate=t.hireDate?t.hireDate:Te(e.hireDate).format("L")),e.idPicture){var n={fileId:e.idPicture,ttl:2,thumbnail:!1};t.employeeService.blobServiceRequestAccess("blobServiceRequestAccess",n).pipe(s.takeUntil(t.ngUnsubscribe),s.map((function(e){return e&&e.result}))).subscribe((function(e){e&&(t.emploayeeData.photoSource=e.locationURI)}))}}))},e.ctorParameters=function(){return[{type:i.ActivatedRoute},{type:De}]},N([t.Input()],e.prototype,"timetrackingLabel",void 0),N([t.Input()],e.prototype,"hireDate",void 0),N([t.Input()],e.prototype,"hireLabel",void 0),N([t.Input()],e.prototype,"registerNumberLabel",void 0),N([t.Input()],e.prototype,"ageLabel",void 0),N([t.Input()],e.prototype,"loadingLabel",void 0),N([t.Input()],e.prototype,"loadingDescription",void 0),e=N([t.Component({selector:"c-employee-summary",template:'<s-object-card *sLoadingState="isLoading">\n <s-object-card-main [label]="emploayeeData?.name" [description]="emploayeeData?.jobPosition" [imageSource]="emploayeeData?.photoSource"></s-object-card-main>\n <s-object-card-field [label]="emploayeeData?.employer" [description]="emploayeeData?.location"></s-object-card-field>\n <s-object-card-field [label]="timetrackingLabel" [description]="emploayeeData?.timeTrackingResumeType"></s-object-card-field>\n <s-object-card-field [label]="hireLabel" [description]="emploayeeData?.hireDate" iconClass="fa fa-calendar"></s-object-card-field>\n <s-object-card-field [label]="registerNumberLabel" [description]="emploayeeData?.registernumber" iconClass="fa fa-id-card"></s-object-card-field>\n <s-object-card-field [label]="ageLabel" [description]="emploayeeData?.age" iconClass="fa fa-birthday-cake"></s-object-card-field>\n</s-object-card>\n'})],e)}(),Fe=function(){function e(){}return e=N([t.NgModule({imports:[h.ObjectCardModule,h.LoadingStateModule],declarations:[Ee],exports:[Ee],providers:[De]})],e)}(),Me=function(){function e(e){this.http=e,this.admissionDraftBasicInformations=new f.Subject}return e.prototype.findAdmissionDraft=function(e){return this.http.post("hcm/payroll/queries/admissionDraftQuery",{id:e})},e.prototype.blobServiceRequestAccess=function(e,t){return this.http.post("hcm/payroll/actions/"+e,t)},e.prototype.setAdmissionDraftBasicInformations=function(e){this.admissionDraftBasicInformations.next(e)},e.ctorParameters=function(){return[{type:v.HttpClient}]},e=N([t.Injectable()],e)}(),Pe=function(){function e(e,t,o){this.activatedRoute=e,this.admissionDraftSummaryService=t,this.translateService=o,this.hireLabel="Admissão",this.hireDate="...",this.badgeText="Rascunho",this.loadingLabel="...",this.documentNumberLabel="Documento",this.loadingDescription="Carregando...",this.isLoading=!1,this.ngUnsubscribe=new f.Subject}return e.prototype.ngOnInit=function(){var e=this;this.draftData={name:this.loadingLabel,hiringDate:this.hireDate,documentNumber:this.loadingLabel,companyName:this.loadingLabel,localeOfCompany:this.loadingLabel,originDraftType:this.loadingLabel},this.activatedRoute.params.pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(t){t.draftId&&e.getInformation(t.draftId)}))},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(!0),this.ngUnsubscribe.complete()},e.prototype.getInformation=function(e){var t=this;this.isLoading=!0,this.admissionDraftSummaryService.findAdmissionDraft(e).pipe(s.takeUntil(this.ngUnsubscribe),s.map((function(e){return e&&e.result})),s.finalize((function(){t.isLoading=!1}))).subscribe((function(e){if(t.admissionDraftSummaryService.setAdmissionDraftBasicInformations(e),e.hiringDate=t.hireDate,t.draftData=B({},e),t.draftData.originDraftType=t.originType,e.attachment&&e.attachment.fileId){var o={fileId:t.draftData.attachment.fileId,ttl:2,thumbnail:!1};t.admissionDraftSummaryService.blobServiceRequestAccess("blobServiceRequestAccess",o).pipe(s.takeUntil(t.ngUnsubscribe),s.map((function(e){return e&&e.result}))).subscribe((function(e){e&&(t.draftData.photoSource=e.locationURI)}))}}))},e.ctorParameters=function(){return[{type:i.ActivatedRoute},{type:Me},{type:a.TranslateService}]},N([t.Input()],e.prototype,"originType",void 0),N([t.Input()],e.prototype,"hireLabel",void 0),N([t.Input()],e.prototype,"hireDate",void 0),N([t.Input()],e.prototype,"badgeText",void 0),N([t.Input()],e.prototype,"loadingLabel",void 0),N([t.Input()],e.prototype,"documentNumberLabel",void 0),N([t.Input()],e.prototype,"loadingDescription",void 0),e=N([t.Component({selector:"c-admission-draft-summary",template:'<s-object-card *sLoadingState="isLoading">\n <s-object-card-main [label]="draftData?.name"\n [imageSource]="draftData?.photoSource">\n </s-object-card-main>\n <s-object-card-field [label]="draftData.companyName" [description]="draftData.localeOfCompany"></s-object-card-field>\n <s-object-card-field [label]="draftData.originDraftType">\n <span descriptionTemplate class="sds-badge sds-semantic-orange">{{badgeText}}</span>\n </s-object-card-field>\n <s-object-card-field [label]="hireLabel" [description]="draftData?.hiringDate" iconClass="fa fa-calendar"></s-object-card-field>\n <s-object-card-field [label]="documentNumberLabel" [description]="draftData?.documentNumber" iconClass="fa fa-id-card"></s-object-card-field>\n</s-object-card>\n'})],e)}(),Ae=function(){function e(){}return e=N([t.NgModule({imports:[h.ObjectCardModule,h.LoadingStateModule],declarations:[Pe],exports:[Pe],providers:[Me]})],e)}(),Oe=function(){function e(){}return e.prototype.ngOnInit=function(){},e=N([t.Component({selector:"error-page",template:'<div class="ui-g">\n <div class="ui-sm-6 error-code">\n <span>403</span>\n </div>\n <div class="col-sm-6">\n <h4 class="error-title">​{{\'hcm.payroll.permission_error_page\'|translate}}</h4>\n <h5 class="error-description">{{\'hcm.payroll.permission_error_page_description\'|translate}}</h5>\n </div>\n</div>\n',styles:["@media (max-width:767px){.error-code{text-align:center}.error-code>span{color:#697882;font-size:80px;font-weight:300}}@media (min-width:768px){.error-code>span{color:#697882;font-size:128px;font-weight:300;float:right}}.error-title{padding-top:30px}.error-description{color:#999;margin-top:10px}"]})],e)}(),Le=function(){function e(){}return e=N([t.NgModule({imports:[ue],declarations:[Oe],exports:[Oe],providers:[]})],e)}(),Re=function(){function e(){this.errorMessage=""}return e.prototype.ngOnInit=function(){},e.prototype.ngOnChanges=function(e){var t=this,o=e.inputErrors.currentValue;this.errorMessage="",o&&Object.keys(this.errorDefs).some((function(e){if(o[e])return t.errorMessage=t.errorDefs[e],!0}))},N([t.Input()],e.prototype,"inputErrors",void 0),N([t.Input()],e.prototype,"errorDefs",void 0),N([t.Input()],e.prototype,"field",void 0),N([t.Input()],e.prototype,"onlyShowAfterTouched",void 0),e=N([t.Component({selector:"field-validator",template:'<ng-content></ng-content>\n<div style="color:#a94442;font-size: 13px"\n *ngIf="(onlyShowAfterTouched&&!field.valid&&(field.dirty || field.touched)&&errorMessage) || (!onlyShowAfterTouched&&errorMessage)">\n {{errorMessage | translate}}\n</div>\n'})],e)}(),xe=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,ue,o.ReactiveFormsModule],declarations:[Re],exports:[Re],providers:[]})],e)}(),Be=function(){function e(){this.messagesSubjectError=new f.Subject,this.messagesSubjectSuccess=new f.Subject,this.messagesSubjectWarning=new f.Subject}return e.prototype.showError=function(e,t){void 0===t&&(t=!1),this.messagesSubjectError.next({message:e,breakLine:t})},e.prototype.showSuccess=function(e,t){void 0===t&&(t=!1),this.messagesSubjectSuccess.next({message:e,breakLine:t})},e.prototype.showWarning=function(e,t){void 0===t&&(t=!1),this.messagesSubjectWarning.next({message:e,breakLine:t})},e.prototype.loadErrorMessages=function(){return this.messagesSubjectError.asObservable()},e.prototype.loadSuccessMessages=function(){return this.messagesSubjectSuccess.asObservable()},e.prototype.loadWarningMessages=function(){return this.messagesSubjectWarning.asObservable()},e}(),Ne=function(){function o(e,t,o){this.http=e,this.messageService=t,this.translateService=o}return o.prototype.query=function(t,o,n){var r=this;void 0===n&&(n=e.ServiceType.PAYROLL);var i="hcm/"+n+"/queries/"+t;return this.http.post(i,o).pipe(s.catchError((function(e){return e&&403===e.status&&r.messageService.add({severity:"error",summary:r.translateService.instant("hcm.payroll.error"),detail:r.translateService.instant("hcm.payroll.permission_error_not_allowed_search"),sticky:!0}),f.throwError(e)})))},o.prototype.enumQuery=function(e,t,o){var n=this;void 0===o&&(o="payroll");var r="hcm/"+o+"/queries/"+e;return this.http.post(r,t).pipe(s.catchError((function(e){return e&&403===e.status&&n.messageService.add({severity:"error",summary:n.translateService.instant("hcm.payroll.error"),detail:n.translateService.instant("hcm.payroll.permission_error_not_allowed_search"),sticky:!0}),f.throwError(e)})))},o.prototype.action=function(e,t){var o=this,n="hcm/payroll/actions/"+e;return this.http.post(n,t).pipe(s.catchError((function(e){return e&&403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)})))},o.prototype.recruitmentAction=function(e,t){var o=this,n="hcm/recruitment/actions/"+e;return this.http.post(n,t).pipe(s.catchError((function(e){return e&&403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)})))},o.prototype.get=function(e){var t=this,o="hcm/payroll/entities/"+e;return this.http.get(o).pipe(s.catchError((function(e){return 403===e.status&&t.messageService.add({severity:"error",summary:t.translateService.instant("hcm.payroll.error"),detail:t.translateService.instant("hcm.payroll.permission_error_not_allowed_search"),sticky:!0}),f.throwError(e)})))},o.prototype.getAutoComplete=function(t,o,n){var r=this;void 0===n&&(n=e.ServiceType.PAYROLL);var i="hcm/"+n+"/entities/"+t+"?filter="+o+"&size=10&orderby=code+asc";return this.http.get(i).pipe(s.catchError((function(e){return e&&403===e.status&&r.messageService.add({severity:"error",summary:r.translateService.instant("hcm.payroll.error"),detail:r.translateService.instant("hcm.payroll.permission_error_not_allowed_search"),sticky:!0}),f.throwError(e)})))},o.prototype.patch=function(e,t){var o=this,n="hcm/payroll/entities/"+e;return this.http.patch(n,t).pipe(s.catchError((function(e){return e&&403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)})))},o.prototype.post=function(e,t){var o=this,n="hcm/payroll/"+e;return this.http.post(n,t).pipe(s.catchError((function(e){return e&&403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)})))},o.prototype.put=function(e,t){var o=this,n="hcm/payroll/entities/"+e;return this.http.put(n,t).pipe(s.catchError((function(e){return e&&403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)})))},o.prototype.delete=function(e,t){var o=this,n=t?"hcm/payroll/entities/"+e+"/"+t:"hcm/payroll/entities/"+e;return this.http.delete(n).pipe(s.catchError((function(e){return e&&403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)})))},o.ctorParameters=function(){return[{type:v.HttpClient},{type:I.MessageService},{type:a.TranslateService}]},o=N([t.Injectable()],o)}(),je=function(){function e(e){this.http=e}return e.prototype.blobServiceRequestUpload=function(e){var t={fileName:e.name,thumbnail:this.isImage(e)};return this.http.action("blobServiceRequestUpload",t)},e.prototype.blobServiceRequestAccess=function(e){var t={fileId:e,tll:2,thumbnail:!1};return this.http.action("blobServiceRequestAccess",t)},e.prototype.blobServiceFileDelete=function(e){var t={fileId:e,thumbnail:!1};return this.http.action("blobServiceDelete",t)},e.prototype.isImage=function(e){return/^image\//.test(e.type)},e.ctorParameters=function(){return[{type:Ne}]},e=N([t.Injectable()],e)}(),qe=function(){function e(e,o,n){this.service=e,this.toastService=o,this.translate=n,this.files=[],this.onUploadFile=new t.EventEmitter,this.onRemoveFile=new t.EventEmitter}return e.prototype.uploadHandler=function(e){var t=this,o=[];if(e&&e.files.length){e.files.sort(),e.files.length>10&&e.files[10]&&delete e.files[10];for(var n=this.getFilesCountAndValidate(e.files),r=0;r<n;r++){var i=this.validateFileSize(e.files[r]);r<=9&&i.isUploaded&&!i.complete&&o.push(this.saveFile(i))}f.forkJoin.apply(void 0,Y(o)).subscribe((function(){t.onUploadFile.emit(t.files)}))}},e.prototype.validateFileSize=function(e){return e.isUploaded&&!e.complete&&e.size>5e7&&(e.complete=!0,e.error=this.translate.instant("hcm.payroll.attachments_max_mb"),this.toastService.showError(this.translate.instant("hcm.payroll.attachments_alert_error"))),e},e.prototype.getFilesCountAndValidate=function(e){var t=0;return e.length&&(e.length>10?(t=10,this.toastService.showError(this.translate.instant("hcm.payroll.attachments_max_length"))):t=e.length),t},e.prototype.saveFile=function(e){var t=this;return new f.Observable((function(o){return t.service.blobServiceRequestUpload(e).pipe(s.map((function(e){return e&&e.result}))).subscribe((function(n){return t.doUpload(n,e,o)}),(function(t){e.complete=!0,e.error=t.message,e.objectURL=void 0}))}))},e.prototype.doUpload=function(e,t,o){var n=new XMLHttpRequest;return t.id=e.fileId,t.objectURL=e.locationURI,t.version=e.version,t.progress=0,n.upload.addEventListener("progress",(function(e){t.progress=Math.round(100*e.loaded/e.total)}),!1),n.onreadystatechange=function(){4===n.readyState&&(t.complete=!0,n.status<200||n.status>=300?(t.objectURL=void 0,t.error=n.statusText||"Erro ao anexar arquivo"):t.error=!1,o.next(t),o.complete())},n.open("PUT",t.objectURL,!0),n.setRequestHeader("Translate","f"),n.send(t)},e.prototype.onCancelUpload=function(e){this.files.splice(e,1)},e.prototype.removeFile=function(){this.onRemoveFile.emit(this.files)},e.ctorParameters=function(){return[{type:je},{type:Be},{type:a.TranslateService}]},N([t.Input()],e.prototype,"errorTooltip",void 0),N([t.Input()],e.prototype,"files",void 0),N([t.Output()],e.prototype,"onUploadFile",void 0),N([t.Output()],e.prototype,"onRemoveFile",void 0),e=N([t.Component({selector:"c-file-upload",template:'<s-file-upload-deprecated chooseLabel="{{\'hcm.payroll.file_upload_choose_label\'|translate}}"\n cancelLabel="{{\'hcm.payroll.file_upload_cancel_label\'|translate}}"\n removeLabel="{{\'hcm.payroll.file_upload_remove_label\'|translate}}"\n successTooltip="{{\'hcm.payroll.file_upload_success_tooltip\'|translate}}"\n [errorTooltip]="errorTooltip"\n [customUpload]="true" [accept]="\'*/*\'" [multiple]="true"\n (uploadHandler)="uploadHandler($event)" (onCancelUpload)="onCancelUpload($event)"\n (onRemoveFile)="removeFile()" [files]="files"\n></s-file-upload-deprecated>\n'})],e)}(),Ve=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,k.FileUploadModuleDeprecated,ue],declarations:[qe],providers:[je],exports:[qe]})],e)}(),Ue=function(){function e(e){this.http=e}return e.prototype.saveImage=function(e,t,o){return j(this,void 0,void 0,(function(){var n,r,i;return q(this,(function(a){switch(a.label){case 0:return e?(n=null,e?n={fileName:e.name}:t&&(n={fileName:t.split("/")[1]}),n?[4,this.blobServiceRequestUpload(o,n).toPromise()]:[3,2]):[2];case 1:return r=a.sent(),(i=new XMLHttpRequest).open("PUT",r.result.locationURI,!0),i.setRequestHeader("Translate","f"),i.send(e),[2,r.result];case 2:return[2]}}))}))},e.prototype.urltoFile=function(e,t,o){return void 0===o&&(o=null),o=o||(e.match(/^data:([^;]+);/)||"")[1],this.http.request("GET",e,{responseType:"arraybuffer"}).pipe(s.map((function(e){var n=new Blob([e],{type:o});return n.name=t,n})))},e.prototype.getImage=function(e,t,o){return j(this,void 0,void 0,(function(){return q(this,(function(n){switch(n.label){case 0:return e&&e.fileId?[4,this.blobServiceRequestAccess(t,e.fileId,o).toPromise()]:[3,2];case 1:return[2,n.sent().result.locationURI];case 2:return[2]}}))}))},e.prototype.buildUrl=function(e,t){return"hcm/"+e+"/"+t},e.prototype.query=function(e,t,o){var n="queries/"+t;return this.http.post(this.buildUrl(e,n),o)},e.prototype.blobServiceRequestUpload=function(e,t){var o={fileName:t.fileName,thumbnail:!0};return this.http.post(this.buildUrl(e,"actions/blobServiceRequestUpload"),o)},e.prototype.blobServiceRequestAccess=function(e,t,o){var n={fileId:t,tll:2,thumbnail:o};return this.http.post(this.buildUrl(e,"actions/blobServiceRequestAccess"),n)},e.prototype.blobServiceFileDelete=function(e,t){var o={fileId:t,thumbnail:!0};return this.http.post(this.buildUrl(e,"actions/blobServiceDelete"),o)},e.ctorParameters=function(){return[{type:v.HttpClient}]},e=N([t.Injectable()],e)}(),Ye=function(){function e(e,o){this.imageCropService=e,this.toastService=o,this.service="payroll",this.onClickSave=new t.EventEmitter,this.defaulPerson="assets/default-person.png",this.display=!1,this.imageCrop=[],this.data={},this.cropperSettings=new S.CropperSettings,this.cropperSettings.width=100,this.cropperSettings.height=100,this.cropperSettings.keepAspect=!1,this.cropperSettings.preserveSize=!0,this.cropperSettings.canvasWidth=600,this.cropperSettings.canvasHeight=450,this.cropperSettings.rounded=!0,this.cropperSettings.minWithRelativeToResolution=!1,this.cropperSettings.noFileInput=!0,this.cropperSettings.cropperDrawSettings.strokeColor="rgba(255,255,255,1)",this.cropperSettings.cropperDrawSettings.strokeWidth=1}return Object.defineProperty(e.prototype,"image",{set:function(e){var t=this;e&&e.fileId&&!this.personPhotoLink&&this.imageCropService.blobServiceRequestAccess(this.service,e.fileId,!0).subscribe((function(e){t.personPhotoLink=e.result.locationURI}))},enumerable:!0,configurable:!0}),e.prototype.onUploadHandler=function(e){var t=this;if(this.file=e.files[0],this.file&&this.file.size>5e6)return this.file=null,this.imageCrop=[],void this.toastService.showError("O tamanho máximo permitido para a imagem é de 5MB");this.display=!1;var o=new Image,n=new FileReader;n.onloadend=function(e){o.src=e.target.result,t.cropper.setImage(o)},n.readAsDataURL(this.file),this.display=!0},e.prototype.ngOnInit=function(){this.data.image=null,this.personPhotoLink=null,this.personFirstName="",this.display=!1},e.prototype.showDialog=function(){this.display=!0},e.prototype.onHide=function(){this.display=!1},e.prototype.reset=function(){this.file=null,this.data={},this.imageCrop=[],this.cropper.reset(),this.data.image=null,this.personPhotoLink=null,this.personFirstName=""},e.prototype.saveImage=function(){return j(this,void 0,void 0,(function(){var e,t,o,n=this;return q(this,(function(r){switch(r.label){case 0:return this.file?(e=this.file.name,this.cropper&&this.cropper.image?[4,this.urltoFile(this.cropper.image.image,e)]:[3,2]):(this.onClickSave.emit(null),this.onHide(),[2]);case 1:t=r.sent(),this.personPhotoLink=this.data.image,o=null,this.file?o={fileName:this.file.name}:this.data&&(o={fileName:this.data.fileId.split("/")[1]}),o&&(this,this.imageCropService.blobServiceRequestUpload(this.service,o).subscribe((function(e){var o=new XMLHttpRequest;o.open("PUT",e.result.locationURI,!0),o.setRequestHeader("Translate","f"),o.send(t),n.onClickSave.emit(e.result),n.onHide()}))),r.label=2;case 2:return[2]}}))}))},e.prototype.urltoFile=function(e,t,o){return void 0===o&&(o=null),o=o||(e.match(/^data:([^;]+);/)||"")[1],fetch(e).then((function(e){return e.arrayBuffer()})).then((function(e){return new File([e],t,{type:o})}))},e.prototype.deleteImage=function(){this.imageCropService.blobServiceFileDelete(this.service,this.data&&this.data.image&&this.data.image.fileId),this.reset()},e.ctorParameters=function(){return[{type:Ue},{type:Be}]},N([t.Input()],e.prototype,"service",void 0),N([t.Output()],e.prototype,"onClickSave",void 0),N([t.ViewChild("cropper",{static:!1})],e.prototype,"cropper",void 0),N([t.Input()],e.prototype,"image",null),e=N([t.Component({selector:"image-crop",template:'<a (click)="showDialog()">\n <span class="result rounded">\n <img class="center-block" style="max-width: 100%; height: auto"\n [src]="personPhotoLink ? personPhotoLink : defaulPerson" [alt]="personFirstName"\n width="auto" height="140">\n </span>\n</a>\n\n<p-dialog [(visible)]="display" modal="true" [minWidth]="450" (onHide)="onHide()">\n <p-header>\n {{\'hcm.payroll.employees_image_cropper_edit\' | translate}}\n </p-header>\n\n <div class="ui-g" *ngIf="!data.image">\n <div class="ui-md-12 img-user-modal" *ngIf="!personPhotoLink">\n <i class="fa fa-user-circle fa-5x"></i>\n <div id="txt-select-image">{{\'hcm.payroll.employees_image_cropper_viewing\' | translate}}</div>\n <div class="ui-md-4 btn-center">\n <p-fileUpload [chooseLabel]="\'hcm.payroll.employees_image_cropper_select\'|translate"\n mode="basic"\n name="imageCrop[]"\n accept="image/*"\n customUpload="true"\n auto="true"\n [files]="imageCrop"\n (uploadHandler)="onUploadHandler($event)"\n >\n </p-fileUpload>\n </div>\n </div>\n </div>\n <div class="ui-g" *ngIf="!data.image">\n <div class="ui-md-4 btn-left" *ngIf="personPhotoLink">\n <p-fileUpload [chooseLabel]="\'hcm.payroll.employees_image_cropper_select\'|translate"\n mode="basic"\n name="imageCrop[]"\n accept="image/*"\n customUpload="true"\n auto="true"\n [files]="imageCrop"\n (uploadHandler)="onUploadHandler($event)"\n >\n </p-fileUpload>\n </div>\n <div class="ui-md-4 btn-left" *ngIf="personPhotoLink">\n <button pButton class="ui-button-secondary" type="button" (click)="deleteImage()"\n label="{{\'hcm.payroll.employees_image_cropper_delete\' | translate}}"></button>\n </div>\n <div class="ui-g-12 ui-md-12" *ngIf="personPhotoLink">\n <span class="result rounded">\n <img class="center-block default-image"\n [src]="personPhotoLink ? personPhotoLink : defaulPerson"\n [alt]="personFirstName"\n width="auto"\n height="140">\n </span>\n </div>\n </div>\n <div class="ui-g" [style.display]="data.image ? \'block\' : \'none\'">\n <div class="ui-md-4 btn-left">\n <p-fileUpload chooseLabel="Selecionar foto"\n mode="basic"\n name="imageCrop[]"\n accept="image/*"\n customUpload="true"\n auto="true"\n [files]="imageCrop"\n (uploadHandler)="onUploadHandler($event)"\n >\n </p-fileUpload>\n </div>\n <div class="ui-md-4 btn-left">\n <button pButton class="ui-button-secondary" type="button" (click)="deleteImage()"\n label="{{\'hcm.payroll.employees_image_cropper_delete\'|translate}}"></button>\n </div>\n <div class="ui-md-12">\n <img-cropper #cropper [image]="data" [settings]="cropperSettings"></img-cropper>\n </div>\n </div>\n\n <p-footer>\n <button pButton type="button" class="btn-link ui-button-link" (click)="display=false"\n label="{{\'hcm.payroll.employees_image_cropper_cancel\' | translate}}"></button>\n <button pButton type="button" (click)="saveImage()" label="{{\'hcm.payroll.employees_image_cropper_save\'|translate}}"></button>\n </p-footer>\n</p-dialog>\n',styles:[".center{float:left;position:relative;left:30%}.btn-center{float:left;position:relative;left:33%}.btn-left{float:left;position:relative}.rounded{cursor:pointer}.result.rounded>img{border-radius:50%}div.cropper{height:400px}.center-block{display:block;margin-right:auto;margin-left:auto}.ui-fileupload-choose{width:300px!important}.fa-user-circle{color:#ccc}.img-user-modal{text-align:center!important}#txt-select-image{margin:20px 0;font-weight:700;font-size:16px}"]})],e)}(),Ge=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,ue,w.DialogModule,_.ButtonModule,C.FileUploadModule,S.ImageCropperModule,S.ImageCropperModule,h.ThumbnailModule],declarations:[Ye],providers:[Ue,h.ImageCropperService],exports:[Ye]})],e)}(),He=y,We=function(){function e(e){this.localeService=e,this.onBlurGetMoment=new t.EventEmitter,this.modelChange=new t.EventEmitter,this.mask=null}return e.prototype.ngOnInit=function(){var e=this;this.localeService.get().subscribe((function(t){if(e.mask=e.formatMask(t),e.format=e.getFormat(),e.model){var o=e.model,n=He(o,e.format||"YYYY-MM-DD");n.isValid()?(e.model=n.format(e.format||"L"),e._date=n):e._date=null}}))},e.prototype.formatMask=function(e){this.locale=e;var t=this.locale.calendar.dateFormat.toString();return this.withoutDay&&(t=t.replace("dd/","").replace("-dd","")),(t=t.replace(/[d]|[m]/g,"9")).replace(/[y]/g,"99")},e.prototype.getFormat=function(){var e=this.locale.calendar.dateFormat.toString();return e=e.replace(/[y]/g,"YY"),this.withoutDay&&(e=e.replace("dd/","").replace("-dd","")),e.toUpperCase()},Object.defineProperty(e.prototype,"placeholder",{get:function(){return this.mask?this.mask.toString().replace(/[9]/g,"_"):""},enumerable:!0,configurable:!0}),e.prototype.onBlur=function(){var e=this.model;this._date=He(e,this.format),this.onBlurGetMoment.emit(this._date)},Object.defineProperty(e.prototype,"model",{get:function(){return this._model},set:function(e){this._model=e,this.modelChange.emit(this._model)},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:h.LocaleService}]},N([t.Input()],e.prototype,"name",void 0),N([t.Input()],e.prototype,"disabled",void 0),N([t.Input()],e.prototype,"withoutDay",void 0),N([t.Input()],e.prototype,"unmask",void 0),N([t.Input()],e.prototype,"style",void 0),N([t.Input()],e.prototype,"styleClass",void 0),N([t.Output()],e.prototype,"onBlurGetMoment",void 0),N([t.Output()],e.prototype,"modelChange",void 0),N([t.Input()],e.prototype,"model",null),e=N([t.Component({selector:"input-date-calendar-model",template:'<p-inputMask *ngIf="mask"\n [mask]="mask"\n (onBlur)="onBlur()"\n [unmask]="unmask"\n [placeholder]="placeholder"\n [disabled]="disabled"\n [(ngModel)]="model"\n [style]="style"\n [styleClass]="styleClass"\n></p-inputMask>\n'})],e)}(),ze=function(){function e(){}return e=N([t.NgModule({imports:[u.InputMaskModule,o.FormsModule,o.ReactiveFormsModule,p.CommonModule],declarations:[We],exports:[We]})],e)}(),$e=y;function Qe(e){return e&&"object"==typeof e&&!Array.isArray(e)}function Ke(e){return!Array.isArray(e)||!e.find((function(e){return"object"==typeof e}))}function Je(e){return 0===e||"boolean"==typeof e||null!=e&&""!==e}function Xe(e,t){return void 0===t&&(t=!0),!e||!Ze(e,t)||(t?$e(e.replace(/[^\d]+/g,""),"DDMMYYYY").isValid():$e(e.replace(/[^\d]+/g,""),"MMYYYY").isValid())}function Ze(e,t){if(void 0===t&&(t=!0),e){var o=void 0;return o=t?8:6,e.replace(/[^\d]+/g,"").length===o}return!0}function et(e,t){return-1!==e.search("Date")?tt(t):t}function tt(e,t,o){if(void 0===t&&(t="DDMMYYYY"),void 0===o&&(o="YYYY-MM-DD"),Je(e)){var n=ot(e,t);return $e(e.replace(/[^\d]+/g,""),n).format(o)}}function ot(e,t){return-1!==e.search("/")?"DDMMYYYY":-1!==e.search("-")?"YYYYMMDD":t}function nt(e){return void 0===e&&(e="YYYY-MM-DD"),$e().format(e)}function rt(e,t){void 0===t&&(t="DDMMYYYY");var o=ot(e,t);return $e(e.replace(/[^\d]+/g,""),o)}function it(e,t){return t?$e(e,t):$e(e)}function at(e){var t=[];return Object.entries(e).forEach((function(e){var o=U(e,2),n=o[0],r=o[1];t.push({field:n,value:r})})),t}function st(e){var t={};return e&&e.length&&e.forEach((function(e){"date"===e.type&&e.value&&(e.value=it(e.value).format("L")),t[e.field]=e.value})),t}function lt(){var e=this;Object.keys(this.controls).map((function(t){var n=e.get(t);n.markAsDirty(),(n instanceof o.FormGroup||n instanceof o.FormArray)&&lt.call(n)}))}function pt(e,t,n,r){n?(e.controls[t].setValidators(o.Validators.compose(r&&r.length?r:[o.Validators.required])),e.controls[t].updateValueAndValidity()):(e.controls[t].setValidators(null),e.controls[t].updateValueAndValidity())}function ct(e,t,o,n){t?o.forEach((function(t){return e.get(t).enable()})):(o.forEach((function(t){return e.get(t).disable()})),ht(e,n||o))}function ut(e,t,n){n&&n.length?(e.controls[t].setValidators(o.Validators.compose(n)),e.controls[t].updateValueAndValidity()):(e.controls[t].setValidators(null),e.controls[t].updateValueAndValidity())}function dt(e,t,o,n){void 0===n&&(n=!0),t?(e.get(o).disable(),n&&e.get(o).reset()):e.get(o).enable()}function mt(e,t){return void 0===t&&(t="ASC"),function(o,n){if(!o.hasOwnProperty(e)||!n.hasOwnProperty(e))return 0;var r="string"==typeof o[e]?o[e].toUpperCase():o[e],i="string"==typeof n[e]?n[e].toUpperCase():n[e],a=0;return r>i?a=1:r<i&&(a=-1),"DESC"===t?-1*a:a}}function ht(e,t){t.forEach((function(t){return e.get(t).reset()}))}function yt(e){if(e){var t=e.calendar.dateFormat.toString();return(t=(t=t.replace(/[y]/g,"YY")).replace(/[/]/g,"")).toUpperCase()}}function ft(e){return e?e.toString().replace(/[&\/\\#,+()$~%.'":*?<>{}-]/g,""):null}var gt=function(){function o(e){this.http=e}return o.prototype.query=function(t,o,n){return void 0===n&&(n=e.ServiceType.PAYROLL),this.http.query(t,o,n)},o.ctorParameters=function(){return[{type:Ne}]},o=N([t.Injectable()],o)}(),bt=function(){function o(o){this.service=o,this.forceSelection=!0,this.keyName="name",this.keyToExclude=[],this.usingType=[],this.minCharactersToSearch=3,this.multiple=!1,this.serviceType=e.ServiceType.PAYROLL,this.onBlur=new t.EventEmitter,this.onSelect=new t.EventEmitter,this.onClear=new t.EventEmitter,this.suggestions=[]}return o.prototype.ngOnInit=function(){},o.prototype.filterQuery=function(t){var o=this,n=t.query;if(!(isNaN(n)&&n.toString().length<this.minCharactersToSearch))try{if(this.isTimetrackingSituation)return this.service.query("autocompleteTimetrackingSituation",{valueSearch:n,referenceDate:this.referenceDate}).subscribe((function(e){return o.formaterResponce(e.result)}));if(this.isDismissalReason){var r={valueSearch:n};return this.referenceDate&&(r.referenceDate=this.referenceDate),this.service.query("autocompleteDismissalReason",r,e.ServiceType.GENERAL_REGISTER).subscribe((function(e){return o.formaterResponce(e.result)}))}if(this.usingType&&this.usingType.length)return this.service.query("autocompleteOtherCompanyFilterUsingType",{searchText:n,usingType:this.usingType}).subscribe((function(e){return o.formaterResponce(e.result)}));if(this.isDepartmentFromCompany)return this.service.query("autocompleteDepartmentQuery",{searchText:n,companyId:this.companyId,referenceDate:this.referenceDate}).subscribe((function(e){return o.formaterResponce(e.result)}));if(this.isWagetype){r={searchText:n,companyId:this.companyId};return this.service.query("autocompleteWagetypeQuery",r,e.ServiceType.ENTRY).subscribe((function(e){return o.formaterResponce(e.result)}))}this.service.query("autocomplete",this.getParamsRest(n),this.serviceType).subscribe((function(e){return o.formaterResponce(e.result)}))}catch(e){console.log(e)}},o.prototype.formaterResponce=function(e){var t=this;this.suggestions=[];var o=[];return e.map((function(e){var n={tableId:e.tableId,name:""};if(t.isTimetrackingSituation||t.isDismissalReason||t.usingType&&t.usingType.length){if(t.keyToExclude.includes(e.fields&&e.fields[2]&&e.fields[2].value))return;var r="";e.fields.map((function(e){n[e.name]=e.value})),r+=e.fields.filter((function(e){return"code"===e.name.toLowerCase()})).map((function(e){return e?e.value+=" - ":""}))[0],!t.usingType||!t.usingType.length||r&&"undefined"!==r||(r=""),r+=e.fields.filter((function(e){return"name"===e.name.toLowerCase()})).map((function(e){return e?e.value:""}))[0],n.name=r,o.push(n)}else{e.fields.map((function(e){n[e.name]=e.value}));var i="";t.concatFieldsForName?(t.concatFieldsForName.map((function(e){(e.includes("date")||e.includes("Birthday"))&&(n[e]=it(n[e]).format("DD/MM/YYYY")),i+=n[e]+" - "})),i=i.slice(0,-3)):(t.keyCode&&(i+=n[t.keyCode]+" - "),t.keyName&&(i+=n[t.keyName])),n.name=i,o.push(n)}})),this.suggestions=Y(o),o},o.prototype.getParamsRest=function(e){return{table:this.table,fields:this.fields,order:this.order,conditions:this.getConditionsRest(e),enableEntityFilters:this.enableEntityFilters}},o.prototype.getConditionsRest=function(e){var t=[{fields:this.conditionsFields||this.fields,expression:"LIKE",value:""+e}];return this.conditions&&this.conditions.map((function(e){(["IS_NULL","IS_NOT_NULL","IS_TRUE"].includes(e.expression)||Je(e.value))&&t.push(e)})),t},o.prototype.selectOption=function(e){this.onSelect.emit(e)},o.prototype.onClearItem=function(e){return j(this,void 0,void 0,(function(){return q(this,(function(t){switch(t.label){case 0:return[4,this.onClear.emit(e)];case 1:return t.sent(),this.form.get(this.name).reset(),[2]}}))}))},o.prototype.onBlurItem=function(e){this.isDropdown?this.isDropdown=!1:(this.form.controls[this.name].markAsDirty(),this.onBlur.emit(e))},o.prototype.onDropdownClick=function(){this.isDropdown=!0},Object.defineProperty(o.prototype,"autoCompleteObject",{get:function(){return this._autoCompleteObject},enumerable:!0,configurable:!0}),o.ctorParameters=function(){return[{type:gt}]},N([t.ViewChild("autoCompleteObject",{static:!0})],o.prototype,"_autoCompleteObject",void 0),N([t.Input()],o.prototype,"name",void 0),N([t.Input()],o.prototype,"table",void 0),N([t.Input()],o.prototype,"order",void 0),N([t.Input()],o.prototype,"enableEntityFilters",void 0),N([t.Input()],o.prototype,"fields",void 0),N([t.Input()],o.prototype,"conditionsFields",void 0),N([t.Input()],o.prototype,"conditions",void 0),N([t.Input()],o.prototype,"placeholder",void 0),N([t.Input()],o.prototype,"readonly",void 0),N([t.Input()],o.prototype,"required",void 0),N([t.Input()],o.prototype,"disabled",void 0),N([t.Input()],o.prototype,"dropdown",void 0),N([t.Input()],o.prototype,"forceSelection",void 0),N([t.Input()],o.prototype,"error",void 0),N([t.Input()],o.prototype,"emptyMessage",void 0),N([t.Input()],o.prototype,"keyCode",void 0),N([t.Input()],o.prototype,"keyName",void 0),N([t.Input()],o.prototype,"concatFieldsForName",void 0),N([t.Input()],o.prototype,"itemSelect",void 0),N([t.Input()],o.prototype,"form",void 0),N([t.Input()],o.prototype,"inputId",void 0),N([t.Input()],o.prototype,"isTimetrackingSituation",void 0),N([t.Input()],o.prototype,"isDepartmentFromCompany",void 0),N([t.Input()],o.prototype,"companyId",void 0),N([t.Input()],o.prototype,"referenceDate",void 0),N([t.Input()],o.prototype,"isDismissalReason",void 0),N([t.Input()],o.prototype,"keyToExclude",void 0),N([t.Input()],o.prototype,"usingType",void 0),N([t.Input()],o.prototype,"minCharactersToSearch",void 0),N([t.Input()],o.prototype,"isWagetype",void 0),N([t.Input()],o.prototype,"multiple",void 0),N([t.Input()],o.prototype,"serviceType",void 0),N([t.Output()],o.prototype,"onBlur",void 0),N([t.Output()],o.prototype,"onSelect",void 0),N([t.Output()],o.prototype,"onClear",void 0),o=N([t.Component({selector:"input-rest-auto-complete",template:'<div [formGroup]="form" >\n <p-autoComplete [suggestions]="suggestions"\n (completeMethod)="filterQuery($event)"\n [placeholder]="placeholder"\n [minLength]="1" [dropdown]="dropdown"\n field="name" size="50"\n [emptyMessage]="emptyMessage"\n [readonly]="readonly"\n [disabled]="disabled"\n [required]="required"\n [forceSelection]="forceSelection"\n (onSelect)="selectOption($event)"\n [formControlName]="name"\n (onClear)="onClearItem($event)"\n (onBlur)="onBlurItem($event)"\n (onDropdownClick)="onDropdownClick()"\n [inputId]="inputId"\n [autoHighlight]="true"\n [multiple]="multiple"\n #autoCompleteObject\n >\n <ng-template let-info pTemplate="item">\n <div class="ui-helper-clearfix">\n {{info.name}}\n </div>\n </ng-template>\n\n </p-autoComplete>\n</div>\n',styles:[""]})],o)}(),vt=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,v.HttpClientModule,E.AutoCompleteModule,ue,o.ReactiveFormsModule],declarations:[bt],providers:[gt],exports:[bt]})],e)}(),It=function(){function e(e){this.http=e}return e.prototype.query=function(e,t){var o="queries/"+e;return this.http.post(o,t)},e.ctorParameters=function(){return[{type:Ne}]},e=N([t.Injectable()],e)}(),kt=function(){function e(e){this.service=e,this.forceSelection=!0,this.keyName="name",this.onBlur=new t.EventEmitter,this.onSelect=new t.EventEmitter,this.onClear=new t.EventEmitter,this.suggestions=[]}return e.prototype.ngOnInit=function(){},e.prototype.filterQuery=function(e){var t=this,o=e.query;if(!(isNaN(o)&&o.toString().length<3))try{this.service.query("autocompleteEmployee",this.getParamsRest(o)).subscribe((function(e){return t.formaterResponce(e.result)}))}catch(e){console.log("Erro ao buscar no back")}},e.prototype.formaterResponce=function(e){this.suggestions=[];var t=[];return e.map((function(e){var o={tableId:e.tableId,code:"",name:"",fullname:"",admission:"",document:""};e.fields&&e.fields.length&&(o.fullname=e.fields[0].value,o.admission=e.fields[1].value,o.document=e.fields[2].value,o.code=4===e.fields.length&&e.fields[3].value,o.code?o.name=o.code.concat(" - ").concat(o.fullname).concat(" - ").concat(rt(o.admission).format("DD/MM/YYYY")):o.name=o.fullname.concat(" - ").concat(rt(o.admission).format("DD/MM/YYYY")),t.push(o))})),this.suggestions=t,t},e.prototype.getParamsRest=function(e){var t={valueSearch:e,enableEntityFilters:this.enableEntityFilters};return this.company&&(t.company=this.company),this.branch&&(t.companyBranch=this.branch),this.employeeType&&(t.employeeType=this.employeeType),this.otherContractType&&(t.otherContractType=this.otherContractType),!1===this.filterEmployeeType&&(t.filterEmployeeType=this.filterEmployeeType),t},e.prototype.selectOption=function(e){this.onSelect.emit(e)},e.prototype.onClearItem=function(e){this.onClear.emit(e)},e.prototype.onBlurItem=function(e){this.isDropdown?this.isDropdown=!1:(this.form.controls[this.name].markAsDirty(),this.onBlur.emit(e))},e.prototype.onDropdownClick=function(){this.isDropdown=!0},e.ctorParameters=function(){return[{type:It}]},N([t.Input()],e.prototype,"name",void 0),N([t.Input()],e.prototype,"value",void 0),N([t.Input()],e.prototype,"company",void 0),N([t.Input()],e.prototype,"branch",void 0),N([t.Input()],e.prototype,"employeeType",void 0),N([t.Input()],e.prototype,"otherContractType",void 0),N([t.Input()],e.prototype,"filterEmployeeType",void 0),N([t.Input()],e.prototype,"enableEntityFilters",void 0),N([t.Input()],e.prototype,"placeholder",void 0),N([t.Input()],e.prototype,"readonly",void 0),N([t.Input()],e.prototype,"required",void 0),N([t.Input()],e.prototype,"disabled",void 0),N([t.Input()],e.prototype,"dropdown",void 0),N([t.Input()],e.prototype,"forceSelection",void 0),N([t.Input()],e.prototype,"error",void 0),N([t.Input()],e.prototype,"emptyMessage",void 0),N([t.Input()],e.prototype,"keyCode",void 0),N([t.Input()],e.prototype,"keyName",void 0),N([t.Input()],e.prototype,"itemSelect",void 0),N([t.Input()],e.prototype,"form",void 0),N([t.Input()],e.prototype,"inputId",void 0),N([t.Output()],e.prototype,"onBlur",void 0),N([t.Output()],e.prototype,"onSelect",void 0),N([t.Output()],e.prototype,"onClear",void 0),e=N([t.Component({selector:"input-rest-auto-complete-employee",template:'<div [formGroup]="form" >\n <p-autoComplete [suggestions]="suggestions"\n (completeMethod)="filterQuery($event)"\n [placeholder]="placeholder"\n [minLength]="1" [dropdown]="dropdown"\n field="name" size="50"\n [emptyMessage]="emptyMessage"\n [readonly]="readonly"\n [disabled]="disabled"\n [required]="required"\n [forceSelection]="forceSelection"\n (onSelect)="selectOption($event)"\n [formControlName]="name"\n (onClear)="onClearItem($event)"\n (onBlur)="onBlurItem($event)"\n (onDropdownClick)="onDropdownClick()"\n [inputId]="inputId"\n [autoHighlight]="true"\n >\n <ng-template let-info pTemplate="item">\n <div class="ui-helper-clearfix">\n {{info.name}}\n </div>\n </ng-template>\n\n </p-autoComplete>\n</div>\n',styles:[""]})],e)}(),St=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,v.HttpClientModule,E.AutoCompleteModule,ue,o.ReactiveFormsModule],declarations:[kt],providers:[It],exports:[kt]})],e)}(),_t=function(){function e(e){this.http=e}return e.prototype.query=function(e,t){var o="queries/"+e;return this.http.post(o,t)},e.ctorParameters=function(){return[{type:Ne}]},e=N([t.Injectable()],e)}(),wt=function(){function e(e,o){this.service=e,this.activatedRoute=o,this.forceSelection=!0,this.keyName="name",this.onBlur=new t.EventEmitter,this.onSelect=new t.EventEmitter,this.onClear=new t.EventEmitter,this.modelChange=new t.EventEmitter,this.suggestions=[],this.ngUnsubscribe=new f.Subject}return e.prototype.ngOnInit=function(){var e=this;this.activatedRoute.data.pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.useWorkflow=!(!t||!t.useWorkflow)}))},e.prototype.filterQuery=function(e){var t=this,o=e.query;if(!(isNaN(o)&&o.toString().length<3))try{this.service.query("autocompleteEmployee",this.getParamsRest(o)).subscribe((function(e){return t.formaterResponce(e.result)}))}catch(e){console.log("Erro ao buscar no back")}},e.prototype.formaterResponce=function(e){this.suggestions=[];var t=[];return e.map((function(e){var o={tableId:e.tableId,code:"",name:"",fullname:"",admission:"",document:""};e.fields&&e.fields.length&&(o.fullname=e.fields[0].value,o.admission=e.fields[1].value,o.document=e.fields[2].value,o.code=4===e.fields.length&&e.fields[3].value,o.code?o.name=o.code.concat(" - ").concat(o.fullname).concat(" - ").concat(rt(o.admission).format("DD/MM/YYYY")):o.name=o.fullname.concat(" - ").concat(rt(o.admission).format("DD/MM/YYYY")),t.push(o))})),this.suggestions=t,t},e.prototype.getParamsRest=function(e){var t={valueSearch:e};return this.company&&(t.company=this.company),this.branch&&(t.companyBranch=this.branch),this.employeeType&&(t.employeeType=this.employeeType),this.useWorkflow&&(t.timeTrackingResumeType={key:"FIRED"}),t},e.prototype.selectOption=function(e){this.onSelect.emit(e)},e.prototype.onClearItem=function(e){this.onClear.emit(e)},e.prototype.onBlurItem=function(e){this.onBlur.emit(e)},Object.defineProperty(e.prototype,"model",{get:function(){return this._model},set:function(e){this._model=e,this.modelChange.emit(this._model)},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:_t},{type:i.ActivatedRoute}]},N([t.Input()],e.prototype,"name",void 0),N([t.Input()],e.prototype,"value",void 0),N([t.Input()],e.prototype,"company",void 0),N([t.Input()],e.prototype,"branch",void 0),N([t.Input()],e.prototype,"employeeType",void 0),N([t.Input()],e.prototype,"placeholder",void 0),N([t.Input()],e.prototype,"readonly",void 0),N([t.Input()],e.prototype,"required",void 0),N([t.Input()],e.prototype,"disabled",void 0),N([t.Input()],e.prototype,"dropdown",void 0),N([t.Input()],e.prototype,"forceSelection",void 0),N([t.Input()],e.prototype,"error",void 0),N([t.Input()],e.prototype,"emptyMessage",void 0),N([t.Input()],e.prototype,"keyCode",void 0),N([t.Input()],e.prototype,"keyName",void 0),N([t.Input()],e.prototype,"itemSelect",void 0),N([t.Input()],e.prototype,"style",void 0),N([t.Input()],e.prototype,"inputStyle",void 0),N([t.Output()],e.prototype,"onBlur",void 0),N([t.Output()],e.prototype,"onSelect",void 0),N([t.Output()],e.prototype,"onClear",void 0),N([t.Output()],e.prototype,"modelChange",void 0),N([t.Input()],e.prototype,"model",null),e=N([t.Component({selector:"input-rest-auto-complete-employee-model",template:'<p-autoComplete [suggestions]="suggestions"\n (completeMethod)="filterQuery($event)"\n [placeholder]="placeholder"\n [minLength]="1" [dropdown]="dropdown"\n field="name" size="50"\n [emptyMessage]="emptyMessage"\n [readonly]="readonly"\n [disabled]="disabled"\n [required]="required"\n [forceSelection]="forceSelection"\n (onSelect)="selectOption($event)"\n (onClear)="onClearItem($event)"\n (onBlur)="onBlurItem($event)"\n [(ngModel)]="model"\n [autoHighlight]="true"\n [style]="style"\n [inputStyle]="inputStyle"\n appendTo="body"\n>\n <ng-template let-info pTemplate="item">\n <div class="ui-helper-clearfix">\n {{info.name}}\n </div>\n </ng-template>\n\n</p-autoComplete>\n',styles:[""]})],e)}(),Ct=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,ue,v.HttpClientModule,E.AutoCompleteModule,o.ReactiveFormsModule],declarations:[wt],providers:[_t],exports:[wt]})],e)}(),Dt=function(){function e(e){this.http=e}return e.prototype.query=function(e,t){var o={names:[t]};return this.http.enumQuery("enumQuery",o,e)},e.ctorParameters=function(){return[{type:Ne}]},e=N([t.Injectable()],e)}(),Tt=function(){function e(e){this.service=e,this.forceSelection=!0,this.keyToExclude=[],this.keyToKeep=[],this.multiple=!1,this.onSelect=new t.EventEmitter,this.onBlur=new t.EventEmitter,this.onClear=new t.EventEmitter,this.suggestions=[]}return e.prototype.ngOnInit=function(){var e=this;try{this.service.query(this.server,this.enumeration).subscribe((function(t){return e.payload=t.results[0].items}))}catch(e){console.log("Erro ao buscar no back")}},e.prototype.filterQuery=function(e){var t=this,o=e.query;if(this.suggestions=[],!(isNaN(o)&&o.toString().length<3)){this.keyToExclude&&this.keyToExclude.length?this.payload=this.payload&&this.payload.filter((function(e){return!t.keyToExclude.includes(e.key)})):this.keyToKeep&&this.keyToKeep.length&&(this.payload=this.payload&&this.payload.filter((function(e){return t.keyToKeep.includes(e.key)})));for(var n=0;n<this.payload.length;n++){var r=this.payload[n];-1!==r.value.toLowerCase().indexOf(o.toLowerCase())&&this.suggestions.push(r)}}},e.prototype.selectOption=function(e){this.onSelect.emit(e)},e.prototype.onBlurItem=function(e){this.isDropdown?this.isDropdown=!1:(this.form.controls[this.name].markAsDirty(),this.onBlur.emit(e))},e.prototype.onDropdownClick=function(){this.isDropdown=!0},e.prototype.onClearItem=function(e){return j(this,void 0,void 0,(function(){return q(this,(function(t){switch(t.label){case 0:return[4,this.onClear.emit(e)];case 1:return t.sent(),this.form.get(this.name).reset(),[2]}}))}))},Object.defineProperty(e.prototype,"autoCompleteObject",{get:function(){return this._autoCompleteObjectEl},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:Dt}]},N([t.ViewChild("autoCompleteObject",{static:!0})],e.prototype,"_autoCompleteObjectEl",void 0),N([t.Input()],e.prototype,"name",void 0),N([t.Input()],e.prototype,"placeholder",void 0),N([t.Input()],e.prototype,"readonly",void 0),N([t.Input()],e.prototype,"required",void 0),N([t.Input()],e.prototype,"disabled",void 0),N([t.Input()],e.prototype,"dropdown",void 0),N([t.Input()],e.prototype,"forceSelection",void 0),N([t.Input()],e.prototype,"error",void 0),N([t.Input()],e.prototype,"emptyMessage",void 0),N([t.Input()],e.prototype,"itemSelect",void 0),N([t.Input()],e.prototype,"inputId",void 0),N([t.Input()],e.prototype,"keyToExclude",void 0),N([t.Input()],e.prototype,"keyToKeep",void 0),N([t.Input()],e.prototype,"server",void 0),N([t.Input()],e.prototype,"enumeration",void 0),N([t.Input()],e.prototype,"form",void 0),N([t.Input()],e.prototype,"multiple",void 0),N([t.Output()],e.prototype,"onSelect",void 0),N([t.Output()],e.prototype,"onBlur",void 0),N([t.Output()],e.prototype,"onClear",void 0),e=N([t.Component({selector:"input-rest-auto-complete-enum",template:'<div [formGroup]="form">\n <p-autoComplete\n [suggestions]="suggestions"\n (completeMethod)="filterQuery($event)"\n [placeholder]="placeholder"\n [minLength]="1" [dropdown]="dropdown"\n field="value" size="50"\n [emptyMessage]="emptyMessage | translate"\n [readonly]="readonly"\n [disabled]="disabled"\n [required]="required"\n [forceSelection]="forceSelection"\n (onSelect)="selectOption($event)"\n [formControlName]="name"\n (onBlur)="onBlurItem($event)"\n (onClear)="onClearItem($event)"\n (onDropdownClick)="onDropdownClick()"\n [inputId]="inputId"\n [autoHighlight]="true"\n [multiple]="multiple"\n #autoCompleteObject\n >\n <ng-template let-info pTemplate="item">\n <div class="ui-helper-clearfix">\n {{info.value | translate}}\n </div>\n </ng-template>\n\n </p-autoComplete>\n</div>\n',styles:[""]})],e)}(),Et=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,v.HttpClientModule,E.AutoCompleteModule,ue,o.ReactiveFormsModule],declarations:[Tt],providers:[Dt],exports:[Tt]})],e)}(),Ft=function(){function o(e){this.http=e}return o.prototype.query=function(t,o,n){return void 0===n&&(n=e.ServiceType.PAYROLL),this.http.query(t,o,n)},o.ctorParameters=function(){return[{type:Ne}]},o=N([t.Injectable()],o)}(),Mt=function(){function o(e){this.service=e,this.forceSelection=!0,this.keyName="name",this.keysToExclude=[],this.onBlur=new t.EventEmitter,this.onSelect=new t.EventEmitter,this.onClear=new t.EventEmitter,this.onFocus=new t.EventEmitter,this.modelChange=new t.EventEmitter,this.suggestions=[]}return o.prototype.ngOnInit=function(){},o.prototype.filterQuery=function(t){var o=this,n=t.query;if(!(isNaN(n)&&n.toString().length<3))try{if(this.isWagetype){var r=B({searchText:n,companyId:this.companyId},this.wagetypeReferenceDates);return this.service.query("autocompleteWagetypeQuery",r,e.ServiceType.ENTRY).subscribe((function(e){return o.formaterResponce(e.result)}))}this.service.query("autocomplete",this.getParamsRest(n)).subscribe((function(e){return o.formaterResponce(e.result)}))}catch(e){console.log("Erro ao buscar no back")}},o.prototype.formaterResponce=function(e){var t=this;this.suggestions=[];var o=[];return e.map((function(e){var n={tableId:e.tableId,name:""};if(e.fields.map((function(e){n[e.name]=e.value})),!t.keysToExclude.includes(e&&e.tableId)){var r="";t.concatFieldsForName?(t.concatFieldsForName.map((function(e){e.includes("date")&&(n[e]=it(n[e]).format("L")),r+=n[e]+" - "})),r=r.slice(0,-3)):(t.keyCode&&(r+=n[t.keyCode]+" - "),t.keyName&&(r+=n[t.keyName])),n.name=r,o.push(n)}})),this.suggestions=o,o},o.prototype.getParamsRest=function(e){return{table:this.table,fields:this.fields,order:this.order,conditions:this.getConditionsRest(e)}},o.prototype.getConditionsRest=function(e){var t=[{fields:this.conditionsFields||this.fields,expression:"LIKE",value:""+e}];return this.conditions&&this.conditions.map((function(e){!["IS_NULL","IS_NOT_NULL","IS_TRUE"].includes(e.expression)&&Je(e.value)&&t.push(e)})),t},o.prototype.selectOption=function(e){this.onSelect.emit(e)},o.prototype.onClearItem=function(e){this.onClear.emit(e)},o.prototype.onBlurItem=function(e){this.onBlur.emit(e)},o.prototype.onFocusItem=function(e){this.onFocus.emit(e)},Object.defineProperty(o.prototype,"model",{get:function(){return this._model},set:function(e){this._model=e,this.modelChange.emit(this._model)},enumerable:!0,configurable:!0}),o.ctorParameters=function(){return[{type:Ft}]},N([t.Input()],o.prototype,"name",void 0),N([t.Input()],o.prototype,"table",void 0),N([t.Input()],o.prototype,"order",void 0),N([t.Input()],o.prototype,"fields",void 0),N([t.Input()],o.prototype,"conditionsFields",void 0),N([t.Input()],o.prototype,"conditions",void 0),N([t.Input()],o.prototype,"placeholder",void 0),N([t.Input()],o.prototype,"readonly",void 0),N([t.Input()],o.prototype,"required",void 0),N([t.Input()],o.prototype,"disabled",void 0),N([t.Input()],o.prototype,"dropdown",void 0),N([t.Input()],o.prototype,"forceSelection",void 0),N([t.Input()],o.prototype,"error",void 0),N([t.Input()],o.prototype,"emptyMessage",void 0),N([t.Input()],o.prototype,"keyCode",void 0),N([t.Input()],o.prototype,"keyName",void 0),N([t.Input()],o.prototype,"concatFieldsForName",void 0),N([t.Input()],o.prototype,"itemSelect",void 0),N([t.Input()],o.prototype,"style",void 0),N([t.Input()],o.prototype,"inputStyle",void 0),N([t.Input()],o.prototype,"keysToExclude",void 0),N([t.Input()],o.prototype,"isWagetype",void 0),N([t.Input()],o.prototype,"companyId",void 0),N([t.Input()],o.prototype,"wagetypeReferenceDates",void 0),N([t.Output()],o.prototype,"onBlur",void 0),N([t.Output()],o.prototype,"onSelect",void 0),N([t.Output()],o.prototype,"onClear",void 0),N([t.Output()],o.prototype,"onFocus",void 0),N([t.Output()],o.prototype,"modelChange",void 0),N([t.Input()],o.prototype,"model",null),o=N([t.Component({selector:"input-rest-auto-complete-model",template:'<p-autoComplete [suggestions]="suggestions"\n (completeMethod)="filterQuery($event)"\n [placeholder]="placeholder"\n [minLength]="1" [dropdown]="dropdown"\n field="name" size="50"\n [emptyMessage]="emptyMessage"\n [readonly]="readonly"\n [disabled]="disabled"\n [required]="required"\n [forceSelection]="forceSelection"\n (onSelect)="selectOption($event)"\n (onClear)="onClearItem($event)"\n (onBlur)="onBlurItem($event)"\n (onFocus)="onFocusItem($event)"\n [(ngModel)]="model"\n [autoHighlight]="true"\n [style]="style"\n [inputStyle]="inputStyle"\n appendTo="body"\n>\n <ng-template let-info pTemplate="item">\n <div class="ui-helper-clearfix">\n {{info.name}}\n </div>\n </ng-template>\n</p-autoComplete>\n',styles:[""]})],o)}(),Pt=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,v.HttpClientModule,E.AutoCompleteModule,ue,o.ReactiveFormsModule],declarations:[Mt],providers:[Ft],exports:[Mt]})],e)}(),At=function(){function e(e){this.http=e}return e.prototype.query=function(e,t){var o={names:[t]};return this.http.enumQuery("enumQuery",o,e)},e.ctorParameters=function(){return[{type:Ne}]},e=N([t.Injectable()],e)}(),Ot=function(){function e(e){this.service=e,this.forceSelection=!0,this.onSelect=new t.EventEmitter,this.onBlur=new t.EventEmitter,this.onClear=new t.EventEmitter,this.modelChange=new t.EventEmitter,this.suggestions=[]}return e.prototype.ngOnInit=function(){var e=this;try{this.service.query(this.server,this.enumeration).subscribe((function(t){return e.payload=t.results}))}catch(e){console.log("Erro ao buscar no back")}},e.prototype.filterQuery=function(e){var t=e.query;if(this.suggestions=[],!(isNaN(t)&&t.toString().length<3))for(var o=0;o<this.payload[0].items.length;o++){var n=this.payload[0].items[o];-1!==n.value.toLowerCase().indexOf(t.toLowerCase())&&this.suggestions.push(n)}},e.prototype.selectOption=function(e){this.onSelect.emit(e)},e.prototype.onBlurItem=function(e){this.onBlur.emit(e)},e.prototype.onClearItem=function(e){this.onClear.emit(e)},Object.defineProperty(e.prototype,"model",{get:function(){return this._model},set:function(e){this._model=e,this.modelChange.emit(this._model)},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:At}]},N([t.Input()],e.prototype,"name",void 0),N([t.Input()],e.prototype,"placeholder",void 0),N([t.Input()],e.prototype,"readonly",void 0),N([t.Input()],e.prototype,"required",void 0),N([t.Input()],e.prototype,"disabled",void 0),N([t.Input()],e.prototype,"dropdown",void 0),N([t.Input()],e.prototype,"forceSelection",void 0),N([t.Input()],e.prototype,"error",void 0),N([t.Input()],e.prototype,"emptyMessage",void 0),N([t.Input()],e.prototype,"itemSelect",void 0),N([t.Input()],e.prototype,"style",void 0),N([t.Input()],e.prototype,"inputStyle",void 0),N([t.Input()],e.prototype,"server",void 0),N([t.Input()],e.prototype,"enumeration",void 0),N([t.Output()],e.prototype,"onSelect",void 0),N([t.Output()],e.prototype,"onBlur",void 0),N([t.Output()],e.prototype,"onClear",void 0),N([t.Output()],e.prototype,"modelChange",void 0),N([t.Input()],e.prototype,"model",null),e=N([t.Component({selector:"input-rest-auto-complete-model-enum",template:'<p-autoComplete\n [suggestions]="suggestions"\n (completeMethod)="filterQuery($event)"\n [placeholder]="placeholder"\n [minLength]="1" [dropdown]="dropdown"\n field="value" size="50"\n [emptyMessage]="emptyMessage | translate"\n [readonly]="readonly"\n [disabled]="disabled"\n [required]="required"\n [forceSelection]="forceSelection"\n (onSelect)="selectOption($event)"\n (onBlur)="onBlurItem($event)"\n (onClear)="onClearItem($event)"\n [(ngModel)]="model"\n [autoHighlight]="true"\n [style]="style"\n [inputStyle]="inputStyle"\n appendTo="body"\n>\n <ng-template let-info pTemplate="item">\n <div class="ui-helper-clearfix">\n {{info.value | translate}}\n </div>\n </ng-template>\n</p-autoComplete>\n',styles:[""]})],e)}(),Lt=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,v.HttpClientModule,E.AutoCompleteModule,ue,o.ReactiveFormsModule],declarations:[Ot],providers:[At],exports:[Ot]})],e)}(),Rt=function(){function e(e){this.http=e}return e.prototype.query=function(e,t){var o="queries/"+e;return this.http.post(o,t)},e.ctorParameters=function(){return[{type:Ne}]},e=N([t.Injectable()],e)}(),xt=function(){function e(e){this.service=e,this.forceSelection=!0,this.minCharactersToSearch=3,this.multiple=!1,this.onBlur=new t.EventEmitter,this.onSelect=new t.EventEmitter,this.onClear=new t.EventEmitter,this.onFocus=new t.EventEmitter,this.suggestions=[]}return e.prototype.ngOnInit=function(){},e.prototype.filterQuery=function(e){var t=this,o=e.query;if(!(isNaN(o)&&o.toString().length<this.minCharactersToSearch))try{this.service.query("autocompleteJobpositionQuery",this.getParamsRest(o)).subscribe((function(e){return t.formaterResponse(e.result)}))}catch(e){console.log("Erro ao buscar no back")}},e.prototype.formaterResponse=function(e){this.suggestions=[];var t=[];return e.map((function(e){var o={tableId:e.tableId,name:""};e.fields.map((function(e){o[e.name]=e.value})),o.name=o.Code+" - "+o.Name,t.push(o)})),this.suggestions=t,t},e.prototype.getParamsRest=function(e){return{searchText:e,companyId:this.companyId?this.replace(this.companyId):null,creationDate:this.creationDate?this.replace(this.creationDate):null,expirationDate:this.expirationDate?this.replace(this.expirationDate):null,jobpositionsFilter:this.jobpositionsFilter?this.replaceArray(this.jobpositionsFilter):null,ignoredJobpositions:this.ignoredJobpositions?this.replaceArray(this.ignoredJobpositions):null,order:this.order}},e.prototype.replace=function(e){return e.replace(new RegExp("'","g"),"")},e.prototype.replaceArray=function(e){var t=this;return e.map((function(e){return t.replace(e)}))},e.prototype.selectOption=function(e){this.onSelect.emit(e)},e.prototype.onClearItem=function(e){this.onClear.emit(e)},e.prototype.onBlurItem=function(e){this.isDropdown?this.isDropdown=!1:(this.form.controls[this.name].markAsDirty(),this.onBlur.emit(e))},e.prototype.onDropdownClick=function(){this.isDropdown=!0},e.ctorParameters=function(){return[{type:Rt}]},N([t.Input()],e.prototype,"name",void 0),N([t.Input()],e.prototype,"value",void 0),N([t.Input()],e.prototype,"companyId",void 0),N([t.Input()],e.prototype,"creationDate",void 0),N([t.Input()],e.prototype,"expirationDate",void 0),N([t.Input()],e.prototype,"jobpositionsFilter",void 0),N([t.Input()],e.prototype,"ignoredJobpositions",void 0),N([t.Input()],e.prototype,"order",void 0),N([t.Input()],e.prototype,"placeholder",void 0),N([t.Input()],e.prototype,"readonly",void 0),N([t.Input()],e.prototype,"required",void 0),N([t.Input()],e.prototype,"disabled",void 0),N([t.Input()],e.prototype,"dropdown",void 0),N([t.Input()],e.prototype,"forceSelection",void 0),N([t.Input()],e.prototype,"error",void 0),N([t.Input()],e.prototype,"emptyMessage",void 0),N([t.Input()],e.prototype,"itemSelect",void 0),N([t.Input()],e.prototype,"form",void 0),N([t.Input()],e.prototype,"inputId",void 0),N([t.Input()],e.prototype,"minCharactersToSearch",void 0),N([t.Input()],e.prototype,"multiple",void 0),N([t.Output()],e.prototype,"onBlur",void 0),N([t.Output()],e.prototype,"onSelect",void 0),N([t.Output()],e.prototype,"onClear",void 0),N([t.Output()],e.prototype,"onFocus",void 0),e=N([t.Component({selector:"input-rest-auto-complete-jobposition",template:'<div [formGroup]="form" >\n <p-autoComplete [suggestions]="suggestions"\n (completeMethod)="filterQuery($event)"\n [placeholder]="placeholder"\n [minLength]="1" [dropdown]="dropdown"\n field="name" size="50"\n [emptyMessage]="emptyMessage"\n [readonly]="readonly"\n [disabled]="disabled"\n [required]="required"\n [forceSelection]="forceSelection"\n (onSelect)="selectOption($event)"\n [formControlName]="name"\n (onClear)="onClearItem($event)"\n (onBlur)="onBlurItem($event)"\n (onDropdownClick)="onDropdownClick()"\n [inputId]="inputId"\n [autoHighlight]="true"\n [multiple]="multiple"\n >\n <ng-template let-info pTemplate="item">\n <div class="ui-helper-clearfix">\n {{info.name}}\n </div>\n </ng-template>\n\n </p-autoComplete>\n</div>\n',styles:[""]})],e)}(),Bt=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,v.HttpClientModule,E.AutoCompleteModule,m.SharedModule,o.ReactiveFormsModule],declarations:[xt],providers:[Rt],exports:[xt]})],e)}(),Nt=function(){function e(e){this.http=e}return e.prototype.query=function(e,t){var o="queries/"+e;return this.http.post(o,t)},e.prototype.queryEntity=function(e,t){return this.http.get(e)},e.ctorParameters=function(){return[{type:Ne}]},e=N([t.Injectable()],e)}(),jt=function(){function e(e,o){this.translateService=e,this.service=o,this.arguments={page:{current:1,size:"10"}},this.alwaysShowPaginator=!1,this.onLoadPayload=new t.EventEmitter,this.loadedList=new t.EventEmitter}return e.prototype.ngOnInit=function(){},e.prototype.ngOnChanges=function(e){e.hasOwnProperty("arguments")&&(this.arguments=Object.assign({},e.arguments.currentValue),this.getList(1)),e.hasOwnProperty("reload")&&!0===e.reload.currentValue&&this.getList(1)},e.prototype.getList=function(e){var t=this;this.loadedList.emit(!0);try{var o=Object.assign({},this.arguments);o.page.current=e,this.isEntity?this.service.queryEntity(this.urlRest,o).subscribe((function(o){t.onResponseQuery(o,e),t.loadedList.emit(!1)})):this.service.query(this.urlRest,o).subscribe((function(o){t.onResponseQuery(o.result,e),t.loadedList.emit(!1)}))}catch(e){console.log("Erro ao tentar buscar lista no back")}},e.prototype.onResponseQuery=function(e,t){this.payload=this.filterValues?this.filterValues.bind(this.scope)(e[this.keyPayload]):e[this.keyPayload],this.onLoadPayload.emit({result:e[this.keyPayload],page:t}),this.totalRecords=this.isEntity?e.totalElements:e.countResult},e.prototype.onHandlePage=function(e){var t=e.first/e.rows+1;this.getList(t)},e.prototype.getRowActions=function(e){return this.getRowActionsFun.call(this.scope,e)},e.prototype.handleClickActions=function(e){e.containerViewChild.nativeElement.getElementsByClassName("ui-splitbutton-menubutton")[0].click()},e.ctorParameters=function(){return[{type:a.TranslateService},{type:Nt}]},N([t.Input()],e.prototype,"emptyMessage",void 0),N([t.Input()],e.prototype,"urlRest",void 0),N([t.Input()],e.prototype,"keyPayload",void 0),N([t.Input()],e.prototype,"columns",void 0),N([t.Input()],e.prototype,"arguments",void 0),N([t.Input()],e.prototype,"filterValues",void 0),N([t.Input()],e.prototype,"getRowActionsFun",void 0),N([t.Input()],e.prototype,"scope",void 0),N([t.Input()],e.prototype,"reload",void 0),N([t.Input()],e.prototype,"isEntity",void 0),N([t.Input()],e.prototype,"alwaysShowPaginator",void 0),N([t.Output()],e.prototype,"onLoadPayload",void 0),N([t.Output()],e.prototype,"loadedList",void 0),e=N([t.Component({selector:"list-rest",template:'<p-table [value]="payload" reorderableColumns="true" [rows]="10" [totalRecords]="totalRecords" [paginator]="true" [pageLinks]="8"\n [alwaysShowPaginator]="alwaysShowPaginator" [responsive]="true" [lazy]="true" (onPage)="onHandlePage($event)">\n <p-column *ngFor="let col of columns;" [field]="col[\'field\']" [header]="col[\'label\']|translate" [style]="{\'border\':\'none\',\'height\':\'60px\',\'text-align\':\'left\',\'background-color\':\'#FFFFFF\'}">\n <ng-template let-data="rowData" pTemplate="body">\n <span>{{data[col[\'field\']]}}</span>\n </ng-template>\n </p-column>\n\n <p-column [style]="{\'border\':\'none\',\'height\':\'60px\',\'text-align\':\'left\',\'background-color\':\'#FFFFFF\', \'overflow\': \'inherit\'}">\n <ng-template let-data="rowData" pTemplate="body">\n <p-splitButton *ngIf="getRowActions(data).length > 1" label="{{\'hcm.payroll.action\' | translate}} &#9660;" [model]="getRowActions(data)"\n (onClick)="handleClickActions(button)" #button></p-splitButton>\n <button *ngIf="getRowActions(data).length <= 1" type="button" class="sds-button-aux aux-secondary" (click)="getRowActions(data)[0].command()">\n {{getRowActions(data)[0].label}}\n </button>\n </ng-template>\n </p-column>\n\n <ng-template pTemplate="emptymessage">\n {{ emptyMessage }}\n </ng-template>\n</p-table>\n',styles:["tr{border:1px solid #ddd!important}"]})],e)}(),qt=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,ue,v.HttpClientModule,b.TableModule,d.InputTextModule,_.ButtonModule,F.SplitButtonModule],declarations:[jt],providers:[Nt],exports:[jt]})],e)}(),Vt=function(){function e(){}return e=N([t.Component({selector:"spinner-loader",template:"<p-progressSpinner></p-progressSpinner>\n"})],e)}(),Ut=function(){function e(){}return e=N([t.NgModule({imports:[o.FormsModule,r.ProgressSpinnerModule],declarations:[Vt],exports:[Vt]})],e)}(),Yt=function(){function e(){this.company={},this.contractNationality={},this.contractType={}}return e.prototype.setCompany=function(e){this.company=e},e.prototype.getCompanyId=function(){return this.company.companyId},e.prototype.setContractNationality=function(e){this.contractNationality=e},e.prototype.isBrazilianAdmission=function(){return"BR"===this.company.abbreviation&&"National"===this.contractNationality.key},e.prototype.isBrazilAndforeignContract=function(){return"BR"===this.company.abbreviation&&"National"!==this.contractNationality.key},e.prototype.isForeignAdmission=function(){return"BR"!==this.company.abbreviation&&"National"===this.contractNationality.key},e.prototype.isForeignAndforeignContract=function(){return"BR"!==this.company.abbreviation&&"National"!==this.contractNationality.key},e.prototype.isBrazilianCompany=function(){return"BR"===this.company.abbreviation},e.prototype.isNationalContract=function(){return"National"===this.contractNationality.key},e.prototype.getCountryID=function(){return this.company.id},Object.defineProperty(e.prototype,"contractNationalityKey",{get:function(){return this.contractNationality.key},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"abbreviation",{get:function(){return this.company.abbreviation},enumerable:!0,configurable:!0}),e.prototype.getCurrency=function(){return this.company.currency},e.prototype.getStructureID=function(){return this.company.structure},e.prototype.setContractType=function(e){this.contractType=e},Object.defineProperty(e.prototype,"contractTypeKey",{get:function(){return this.contractType?this.contractType.key:this.contractType},enumerable:!0,configurable:!0}),e=N([t.Injectable()],e)}(),Gt=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule],providers:[Yt]})],e)}(),Ht=y;function Wt(e){return/^\d*$/.test(e)}function zt(e){return e||!1}function $t(e){return Wt(zt(e))?Number.parseInt(e):0}var Qt=function(){function e(e){this.http=e,this.companyUseWorkstationGroupSubject=new f.Subject}return e.prototype.getCompanyIndications=function(e,t){return this.http.query("companyIndicationQuery",{companyId:e,companyIndicationType:t}).pipe(s.map((function(e){return e.result})))},e.prototype.setCompanyUseWorkstationGroup=function(e){this.companyUseWorkstationGroupSubject.next(e)},e.prototype.setStructure=function(e){this.structure=e},e.prototype.getStructure=function(){return this.structure},e.prototype.getCompanyUseWorkstationGroup=function(){return this.companyUseWorkstationGroupSubject.asObservable()},e.prototype.setUseWorkstationGroup=function(e){this.useWorkstationGroup=e},e.prototype.getUseWorkstationGroup=function(){return this.useWorkstationGroup},e.ctorParameters=function(){return[{type:Ne}]},e=N([t.Injectable()],e)}(),Kt=function(){function e(e){this.http=e}return e.prototype.hasModule=function(e){return this.http.query("hasModule",{module:e})},e.ctorParameters=function(){return[{type:Ne}]},e=N([t.Injectable()],e)}(),Jt=y,Xt=function(){function e(e,t,o){this.http=e,this.messageService=t,this.translateService=o,this._httpParams=new v.HttpParams}return e.prototype.lookupRequestPost=function(e,t,o,n){return void 0===o&&(o=null),this.httpPostParams=e,this.postConfigPageSize(e),this.lookupDisplayField=n,this.concatFields=o,this.postDataLookup(t)},e.prototype.postConfigPageSize=function(e){e&&(this.httpPostParams.page.size=e.page&&e.page.size?e.page.size:10,this.httpPostParams.page.current=e.page&&e.page.current?e.page.current:0)},e.prototype.lookupRequest=function(e,t,o,n,r,i,a,s){return void 0===a&&(a=[]),void 0===s&&(s=[]),this.searchLookupFields=o,this.endpoint=t,this.parameters=s,this.concatFields=r,this.concatOtherFields=a,this.lookupDisplayField=i,this.searchFields=n,this.generateLookupParameters(e),this.configHttpParamsPagination("10","0"),this.configHttpParamsOrderBy(e.multiSortMeta),this.getDataLookup()},e.prototype.searchRequest=function(e,t,o,n,r,i,a){return void 0===i&&(i=[]),void 0===a&&(a=[]),this.endpoint=t,this.parameters=a,this.concatFields=n,this.concatOtherFields=i,this.lookupDisplayField=r,this.searchFields=o,this.generateGridParameters(e.filterData),this.configHttpParamsPagination(e.rows.toString(),Math.floor(e.first/e.rows).toString()),this.configHttpParamsOrderBy(e.multiSortMeta),this.getDataLookup()},e.prototype.getDataLookup=function(){var e=this;return this.getUrlDataLookup(this.endpoint,this.httpParams).pipe(s.map((function(t){var o=t.contents;return e.concatFields&&e.concatFields.length&&o.map((function(t){e.convertGridFieldValue(t),t[e.lookupDisplayField]=e.generateDisplayFieldValue(B({},t))})),t})))},e.prototype.postDataLookup=function(e){var t=this;return this.postUrlDataLookup(e,this.httpPostParams).pipe(s.map((function(e){var o=e.contents;return t.concatFields&&t.concatFields.length&&o.map((function(e){t.concatOtherFields&&t.convertGridFieldValue(e),e[t.lookupDisplayField]=t.generateDisplayFieldValue(B({},e))})),e})))},e.prototype.convertLookupFieldValue=function(e,t){if(e)switch(t.type){case h.FieldType.Date:e=Jt(e).format("L");break;case h.FieldType.Enum:var o=t.options.filter((function(t){return t.value===e}))[0];e=o?o.label:e}return e},e.prototype.convertGridFieldValue=function(e){e&&this.concatOtherFields.forEach((function(t){switch(t.type){case h.FieldType.Enum:var o=t.options.filter((function(o){return o.value===e[t.name]}))[0];e[t.name]=o?o.label:e[t.name]}}))},e.prototype.generateDisplayFieldValue=function(e){var t=this,o="";return this.concatFields.forEach((function(n){var r=t.convertLookupFieldValue(e[n.name],n);r&&(o?o+=" - "+r:o=r)})),o},e.prototype.generateLookupParameters=function(e){var t=this,o="";this.searchLookupFields.forEach((function(n){var r=t.searchFields.filter((function(e){return n===e.name}))[0];o?o+=" or "+t.getParameterByType(r.type,n,e):o=""+t.getParameterByType(r.type,n,e)})),this.parameters.forEach((function(e){o?o+=" and "+e.toString():o=""+e.toString()})),this.httpParams=(new v.HttpParams).set("filter",o)},e.prototype.generateGridParameters=function(e){var t=this,o="";Object.keys(e).forEach((function(n){if(e[n]){var r=t.searchFields.filter((function(e){return n===e.name}))[0];o+=o?" and "+t.getParameterByType(r.type,n,e[n]):t.getParameterByType(r.type,n,e[n])}})),this.parameters.forEach((function(e){o?o+=" and "+e.toString():o=""+e.toString()})),this.httpParams=(new v.HttpParams).set("filter",o)},e.prototype.getParameterByType=function(e,t,o){switch(e){case h.FieldType.Date:return t+" eq '"+Jt(o).format("YYYY-MM-DD")+"'";case h.FieldType.Enum:return t+" eq '"+o+"'";case h.FieldType.Integer:return t+" eq "+o;case h.FieldType.Autocomplete:return t+" eq '"+o.id+"'";default:return"containing(lower("+t+"), lower('"+o+"'))"}},e.prototype.configHttpParamsPagination=function(e,t){this.httpParams=this.httpParams.set("size",e),this.httpParams=this.httpParams.set("offset",t)},e.prototype.configHttpParamsOrderBy=function(e){if(e&&e.length){var t="";e.map((function(e){t+=t?","+e.field+"+"+(1===e.order?"asc":"desc"):e.field+"+"+(1===e.order?"asc":"desc")})),this.httpParams=this.httpParams.set("orderby",t)}},Object.defineProperty(e.prototype,"httpParams",{get:function(){return this._httpParams},set:function(e){this._httpParams=e},enumerable:!0,configurable:!0}),e.prototype.getUrlDataLookup=function(e,t){var o=this;return t?this.http.get(""+e,{params:t}).pipe(s.catchError((function(e){return e&&403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed_search"),sticky:!0}),f.throwError(e)}))):this.http.get(""+e).pipe(s.catchError((function(e){return e&&403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed_search"),sticky:!0}),f.throwError(e)})))},e.prototype.postUrlDataLookup=function(e,t){var o=this;return t?this.http.post(""+e,B({},t)).pipe(s.catchError((function(e){return 403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)}))):this.http.post(""+e,{}).pipe(s.catchError((function(e){return 403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)})))},e.ctorParameters=function(){return[{type:v.HttpClient},{type:I.MessageService},{type:a.TranslateService}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(v.HttpClient),t.ɵɵinject(M.MessageService),t.ɵɵinject(a.TranslateService))},token:e,providedIn:"root"}),e=N([t.Injectable({providedIn:"root"})],e)}(),Zt=y,eo=function(){function o(e){this.httpClienteService=e}return o.prototype.getAutoComplete=function(e,t,o,n,r){var i=this.generateGridParameters(t,o,n);return this.httpClienteService.getAutoComplete(e,i,r).pipe(s.map((function(e){return e&&e.contents})))},o.prototype.getAutoCompleteQuery=function(e,t){return this.httpClienteService.query(e,t).pipe(s.map((function(e){return e&&e.result})))},o.prototype.generateGridParameters=function(t,o,n){var r=this,i="";return Object.keys(t).forEach((function(a){var s,l=o&&o.filter((function(e){return a===e.name}))[0],p="",c=l&&l.type;l||a==e.CoreFieldType.searchValue||(c=h.FieldType.String),l||a!==e.CoreFieldType.searchValue||(c=e.CoreFieldType.searchValue),i&&(p=" and "),(s=r.getParameterByType(c,a,t[a],n))&&(i+=" "+p+" "+s)})),i},o.prototype.getParameterByType=function(t,o,n,r){if(!n&&t!=e.CoreFieldType.searchValue)return o+" is null";if(n&&"not null"===n&&t!=e.CoreFieldType.searchValue)return o+" is not null";switch(t){case h.FieldType.Date:return o+" eq '"+Zt(n).format("YYYY-MM-DD")+"'";case h.FieldType.Enum:return o+" eq '"+n+"'";case h.FieldType.Integer:return o+" eq "+n;case h.FieldType.Autocomplete:return o+" eq '"+n.id+"'";case e.CoreFieldType.searchValue:return""+this.getParameterBySearchType(n,r);default:return this.getSearchFilterString(o,n)}},o.prototype.getParameterBySearchType=function(e,t){var o,n,r="";if(e){try{for(var i=V(Object.entries(e)),a=i.next();!a.done;a=i.next()){var s=U(a.value,2),l=s[0],p=s[1];if("code"===l&&Number(p)){var c=t?"'":"";r+=r?" or "+l+" eq "+c+p+c:l+" eq "+c+p+c}else"code"!=l&&(r+=r?" or "+this.getSearchFilterString(l,p):this.getSearchFilterString(l,p))}}catch(e){o={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}r=r?"("+r+")":""}return r},o.prototype.getSearchFilterString=function(e,t){return"containing(lower("+e+"), lower('"+t+"'))"},o.ctorParameters=function(){return[{type:Ne}]},o.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new o(t.ɵɵinject(Ne))},token:o,providedIn:"root"}),o=N([t.Injectable({providedIn:"root"})],o)}(),to="platform/report/queries/getParameters",oo="platform/report/queries/getReportUri",no="platform/report/queries/getReportStatus",ro="platform/report/queries/findReportsByName",io="platform/report/queries/getRunningReports",ao="platform/report/actions/generateReport",so=function(){function e(e){this.http=e}return e.prototype.findReportsByName=function(e){return this.http.post(""+ro,{name:e}).pipe(s.map((function(e){return e.reports?e.reports:[]})))},e.prototype.findReportByName=function(e){return e=e||"",this.findReportsByName(e).pipe(s.map((function(t){var o=t&&t.filter((function(t){return t.name&&t.name===e}));return o&&1==o.length?o[0]:null})))},e.prototype.getParameters=function(e,t){return this.http.post(""+to,{id:e,reportFileId:t}).pipe(s.map((function(e){return e||null})))},e.prototype.getReportUri=function(e){return this.http.post(""+oo,{reportTicket:e}).pipe(s.map((function(e){return e&&e.reportUri})))},e.prototype.getReportStatus=function(e){return this.http.post(""+no,{reportTicket:e}).pipe(s.map((function(e){return e&&e.reportStatus})))},e.prototype.generateReport=function(e){return this.http.post(""+ao,e).pipe(s.map((function(e){return e||null})))},e.prototype.getRunningReports=function(e,t){return this.http.post(""+io,{offset:e,limit:t,orderByDesc:!0,filterCancelled:!0})},e.ctorParameters=function(){return[{type:v.HttpClient}]},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e(t.ɵɵinject(v.HttpClient))},token:e,providedIn:"root"}),e=N([t.Injectable({providedIn:"root"})],e)}(),lo=function(){function e(){this.useWorkflowValueChange=new f.Subject,this._draftJSON=new f.BehaviorSubject(null)}return e.prototype.setUseWorkflow=function(e){this.useWorkflowValueChange.next(e)},e.prototype.getUseWorkflow=function(){return this.useWorkflowValueChange.asObservable()},e.prototype.setDraftJSON=function(e){this._draftJSON.next(e)},e.prototype.getDraftJSON=function(){return this._draftJSON.asObservable()},e=N([t.Injectable()],e)}(),po=function(){function e(){this.resetDivergentFormData()}return e.prototype.resetDivergentFormData=function(){this._divergentFormData={}},e.prototype.checkFormDisagreements=function(e){var t=this;void 0===e&&(e=!1),this.resetDivergentFormData(),this._sanitizeEmptyStrings(),e&&this._removeIdsFromFormDatas(),this._oldFormData===this._newFormData?this._throwIdenticalMessage():(Object.keys(this._oldFormData).forEach((function(e){t._oldFormData[e]!==t._newFormData[e]&&(t._divergentFormData[e]=t._createDivergencePair(e))})),Object.keys(this._newFormData).forEach((function(e){t._newFormData[e]!==t._oldFormData[e]&&(t._divergentFormData[e]=t._createDivergencePair(e))})),this._isDivergentFormDataEmpty&&this._throwIdenticalMessage())},e.prototype._removeIdsFromFormDatas=function(){[this._oldFormData,this._newFormData].forEach((function(e){delete e.id}))},e.prototype._sanitizeEmptyStrings=function(){[this._oldFormData,this._newFormData].forEach((function(e){Object.keys(e).map((function(t){""===e[t]&&(e[t]=null)}))}))},e.prototype._createDivergencePair=function(e){var t={oldValue:null,newValue:null};return t.oldValue=this._oldFormData[e],t.newValue=this._newFormData[e],t},e.prototype._throwIdenticalMessage=function(){throw new Error("The objects oldFormData and newFormData are identical")},Object.defineProperty(e.prototype,"oldFormData",{get:function(){return this._oldFormData},set:function(e){this._oldFormData=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"newFormData",{get:function(){return this._newFormData},set:function(e){this._newFormData=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"divergentFormArray",{get:function(){var e=[];return Object.entries(this._divergentFormData).map((function(t){var o=U(t,2),n=o[0],r=o[1],i={key:null,oldValue:null,newValue:null};i.key=n,i.oldValue=r.oldValue,i.newValue=r.newValue,e.push(i)})),e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"_isDivergentFormDataEmpty",{get:function(){return 0===Object.entries(this._divergentFormData).length},enumerable:!0,configurable:!0}),e=N([t.Injectable()],e)}(),co=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule],providers:[Qt,Kt,Xt,eo,so,lo,po]})],e)}(),uo=function(){function e(e){var t=this;this.http=e,this.actionUrl="platform/authorization/queries/checkAccess",this.resourceAddress="res://senior.com.br/hcm/payroll/",this.defaultActions=["Visualizar","Incluir","Editar","Excluir"],this._resources=[],this._attributes=[],P.user.getAuthHeader().then((function(e){t.httpOptions={headers:new v.HttpHeaders({"Content-Type":"application/json",Accept:"application/json",Authorization:e})}})),P.service.getRestUrl().then((function(e){return t.restUrl=e}))}return e.prototype.get=function(e){var t=this;return void 0===e&&(e=""),this.permissions?this.observable=f.Observable.of(this.permissions):this.observable||(this.observable=this.getPermissions().pipe(s.map((function(e){return t.permissions=e})))),this.observable.pipe(s.map((function(t){return e?t[e]:t})))},e.prototype.getAbac=function(e,t){return this.attributes=t,this.getAbacPermission(e)},e.prototype.getAbacPermission=function(e){return this.http.post(this.actionUrl,{includeFilters:!1,permissions:[{resource:""+this.resourceAddress+e,action:"Visualizar",attributes:this._attributes.map((function(e){return{attribute:e.name,value:e.value}}))}]},this.httpOptions)},e.prototype.getPermissions=function(){var e=this,t=[];return this._resources.forEach((function(o){return e.defaultActions.forEach((function(n){return t.push({action:n,resource:""+e.resourceAddress+o})}))})),this.http.post(this.actionUrl,{includeFilters:!1,permissions:Y(t)},this.httpOptions).pipe(s.map((function(t){var o=t.permissions,n={};return o.forEach((function(t){var o=t.resource.replace(e.resourceAddress,"");n[o]=n[o]||{},n[o][t.action.toLowerCase()]=t.authorized})),n})))},Object.defineProperty(e.prototype,"attributes",{set:function(e){this._attributes=e},enumerable:!0,configurable:!0}),e.prototype.setResources=function(e){this._resources=e},e.ctorParameters=function(){return[{type:v.HttpClient}]},e=N([t.Injectable()],e)}(),mo=function(){function e(e,t,o){this.toastService=e,this.messageService=t,this.translateService=o,this.key="TOAST",this.breakLine=!1,this.ngUnsubscribe=new f.Subject}return e.prototype.ngOnInit=function(){var e=this;this.toastService.loadErrorMessages().pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.createErrorMessage(t&&t.message),e.breakLine=t&&t.breakLine})),this.toastService.loadSuccessMessages().pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.createSuccessMessage(t&&t.message),e.breakLine=t&&t.breakLine})),this.toastService.loadWarningMessages().pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.createWarningMessage(t&&t.message),e.breakLine=t&&t.breakLine}))},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(!0),this.ngUnsubscribe.complete()},e.prototype.createErrorMessage=function(e,t){this.messageService.clear(),this.messageService.add({severity:"error",summary:t||this.translateService.instant("hcm.payroll.error"),detail:e,sticky:!0,key:this.key})},e.prototype.createSuccessMessage=function(e,t){this.messageService.add({severity:"success",summary:t||this.translateService.instant("hcm.payroll.success"),detail:e,key:this.key})},e.prototype.createWarningMessage=function(e,t){this.messageService.add({severity:"warn",summary:t||this.translateService.instant("hcm.payroll.warn"),detail:e,sticky:!0,key:this.key})},e.ctorParameters=function(){return[{type:Be},{type:I.MessageService},{type:a.TranslateService}]},e=N([t.Component({selector:"c-toast",template:"\n <p-toast [ngClass]=\"breakLine ? 'ui-toast-break-line' : ''\" [key]=\"key\"></p-toast>\n "})],e)}(),ho=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,ue,A.ToastModule],declarations:[mo],providers:[Be,I.MessageService],exports:[mo]})],e)}(),yo=function(){function e(e){this.http=e}return e.prototype.getList=function(e,t){return this.http.get(""+e,{params:t})},e.ctorParameters=function(){return[{type:v.HttpClient}]},e=N([t.Injectable()],e)}(),fo=function(){function o(e){this.dataListService=e,this.rows=10,this.paginator=!0,this.first=0,this.alwaysShowPaginator=!0,this.sortMode="multiple",this.lazyLoad=new t.EventEmitter,this.loadingChange=new t.EventEmitter,this.totalRecordsChange=new t.EventEmitter,this.listDataChange=new t.EventEmitter,this.selectedDataChange=new t.EventEmitter,this.headerCheckboxToggle=new t.EventEmitter,this._httpParams=new v.HttpParams,this.ngUnsubscribe=new f.Subject}return o.prototype.ngOnInit=function(){this.lazy||this.getlistData()},o.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},o.prototype.getActions=function(e,t){return this.actions(e,t)},o.prototype.handleClickActions=function(e){e.containerViewChild.nativeElement.getElementsByClassName("ui-splitbutton-menubutton")[0].click()},o.prototype.pagination=function(e){this.lazy||this.getlistData(e.rows,Math.floor(e.first/e.rows))},o.prototype.onLazyLoad=function(t){var o=this;this.loading=!0,t.multiSortMeta&&t.multiSortMeta.length&&(this.orderBy=[],t.multiSortMeta.map((function(t){o.orderBy.push({field:t.field,direction:1===t.order?e.DirectionEnumeration.ASC:e.DirectionEnumeration.DESC})}))),this.getlistData(t.rows,Math.floor(t.first/t.rows))},o.prototype.onFilter=function(){this.lazy&&(this.loading=!0),this.getlistData()},Object.defineProperty(o.prototype,"recordsMessage",{get:function(){return(this.totalRecords||0)+" "+(1===this.totalRecords?this.singularMessageRecords:this.pluralMessageRecords)},enumerable:!0,configurable:!0}),o.prototype.getlistData=function(e,t){var o=this;void 0===e&&(e=this.rows),void 0===t&&(t=this.first),this.endpoint?(this.configParameters(this.initParameters),this.configHttpParamsDisplayFields(),this.configHttpParamsPagination(e.toString(),t.toString()),this.configHttpParamsOrderBy(),this.dataListService.getList(this.endpoint,this.httpParams).pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(e){o.listData=e.contents,o.totalRecords=e.totalElements,o.lazy&&o.lazyLoad.emit(o.listData)}))):this.lazy&&this.lazyLoad.emit(this.listData)},o.prototype.configHttpParamsPagination=function(e,t){this.httpParams=this.httpParams.set("size",e),this.httpParams=this.httpParams.set("offset",t)},o.prototype.configHttpParamsOrderBy=function(){if(this.orderBy&&this.orderBy.length){var e="";this.orderBy.map((function(t){e+=e?","+t.field+"+"+t.direction:t.field+"+"+t.direction})),this.httpParams=this.httpParams.set("orderby",e)}},o.prototype.configHttpParamsDisplayFields=function(){this.displayFields&&this.displayFields.length&&(this.httpParams=this.httpParams.set("displayfields",this.displayFields.toString()))},o.prototype.onHeaderCheckboxToggle=function(e){this.headerCheckboxToggle.emit(e)},o.prototype.getFieldValue=function(e,t){return t.field&&t.field.includes(".")?(t.field.split(".").map((function(t){return e=e&&e[t]})),e):e[t.field]},o.prototype.configParameters=function(e){var t="";e&&(e.forEach((function(e){t?t+=" and "+e.toString():t=""+e.toString()})),this.httpParams=(new v.HttpParams).set("filter",t))},Object.defineProperty(o.prototype,"parameters",{set:function(e){this.configParameters(e),e&&(this.dataListTable&&(this.dataListTable.first=0),this.onFilter())},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"httpParams",{get:function(){return this._httpParams},set:function(e){this._httpParams=e},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"loading",{get:function(){return this._loading},set:function(e){this._loading=e,this.loadingChange.emit(this._loading)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"listData",{get:function(){return this._listData},set:function(e){this._listData=e,this.listDataChange.emit(this._listData)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"selectedData",{get:function(){return this._selectedData},set:function(e){this._selectedData=e,this.selectedDataChange.emit(this._selectedData)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"totalRecords",{get:function(){return this._totalRecords},set:function(e){this._totalRecords=e,this.totalRecordsChange.emit(this.totalRecords)},enumerable:!0,configurable:!0}),o.ctorParameters=function(){return[{type:yo}]},N([t.ViewChild("dataListTable",{static:!1})],o.prototype,"dataListTable",void 0),N([t.Input()],o.prototype,"id",void 0),N([t.Input()],o.prototype,"dataKey",void 0),N([t.Input()],o.prototype,"rows",void 0),N([t.Input()],o.prototype,"emptyMessage",void 0),N([t.Input()],o.prototype,"columns",void 0),N([t.Input()],o.prototype,"paginator",void 0),N([t.Input()],o.prototype,"first",void 0),N([t.Input()],o.prototype,"alwaysShowPaginator",void 0),N([t.Input()],o.prototype,"actions",void 0),N([t.Input()],o.prototype,"actionLabel",void 0),N([t.Input()],o.prototype,"selectionMode",void 0),N([t.Input()],o.prototype,"lazy",void 0),N([t.Input()],o.prototype,"isMultipleSelection",void 0),N([t.Input()],o.prototype,"isSortable",void 0),N([t.Input()],o.prototype,"showHeaderCheckBox",void 0),N([t.Input()],o.prototype,"sortMode",void 0),N([t.Input()],o.prototype,"endpoint",void 0),N([t.Input()],o.prototype,"displayFields",void 0),N([t.Input()],o.prototype,"orderBy",void 0),N([t.Input()],o.prototype,"singularMessageRecords",void 0),N([t.Input()],o.prototype,"pluralMessageRecords",void 0),N([t.Input()],o.prototype,"initParameters",void 0),N([t.Output()],o.prototype,"lazyLoad",void 0),N([t.Output()],o.prototype,"loadingChange",void 0),N([t.Output()],o.prototype,"totalRecordsChange",void 0),N([t.Output()],o.prototype,"listDataChange",void 0),N([t.Output()],o.prototype,"selectedDataChange",void 0),N([t.Output()],o.prototype,"headerCheckboxToggle",void 0),N([t.Input()],o.prototype,"parameters",null),N([t.Input()],o.prototype,"loading",null),N([t.Input()],o.prototype,"listData",null),N([t.Input()],o.prototype,"selectedData",null),N([t.Input()],o.prototype,"totalRecords",null),o=N([t.Component({selector:"c-data-list",template:'<div *sLoadingState="loading">\n <p-table #dataListTable [id]="id" class="sds-list" [value]="listData" [columns]="columns" [paginator]="paginator" [rows]="rows"\n [first]="first" (onLazyLoad)="onLazyLoad($event)" [lazy]="lazy" [alwaysShowPaginator]="alwaysShowPaginator"\n (onPage)="pagination($event)" [totalRecords]="totalRecords" [(selection)]="selectedData" [dataKey]="dataKey"\n [sortMode]="sortMode" [responsive]="true" pageLinks="3" (onHeaderCheckboxToggle)="onHeaderCheckboxToggle($event)"\n [selectionMode]="selectionMode">\n \x3c!-- Header --\x3e\n <ng-template pTemplate="header">\n \x3c!-- Cabeçalhos quando da table é permitido ordenar as colunas --\x3e\n <tr>\n \x3c!-- Checkbox quando há seleção de linhas --\x3e\n <th id="{{id}}-checkbox-header" *ngIf="isMultipleSelection" style="width: 2.25em">\n <p-tableHeaderCheckbox *ngIf="showHeaderCheckBox"></p-tableHeaderCheckbox>\n </th>\n \x3c!-- Cabeçalhos das colunas da tabela --\x3e\n <th id="{{id}}-col-header-{{i}}" *ngFor="let col of columns; let i = index" [pSortableColumn]="col.orderBy || col.field"\n [pSortableColumnDisabled]="!isSortable || !!col.icon" [style.width]="col.width" [pTooltip]="col.tooltip || col.label"\n tooltipPosition="top" showDelay="500">\n {{col[\'label\']}}\n \x3c!-- Quando a coluna é um ícone não exibe o ícone de ordenação da mesma --\x3e\n <p-sortIcon *ngIf="isSortable && !col.icon" [field]="col.field"></p-sortIcon>\n </th>\n \x3c!-- Cabeçalho da coluna de ações --\x3e\n <th id="{{id}}-col-actions" *ngIf="actions && actions()?.length" [ngClass]="{ actionsSize: actions().length > 1, actionSize: actions().length === 1 }"></th>\n </tr>\n </ng-template>\n \x3c!-- Body --\x3e\n <ng-template pTemplate="body" let-rowData let-key="rowIndex">\n <tr [pSelectableRow]="rowData">\n <td id="{{id}}-checkbox-body-{{key}}" *ngIf="isMultipleSelection">\n <p-tableCheckbox [value]="rowData"></p-tableCheckbox>\n </td>\n <td id="{{id}}-col-body-{{i}}-{{key}}" *ngFor="let col of columns;let i = index" [pTooltip]="col.icon ? \'\' : getFieldValue(rowData, col)"\n tooltipPosition="top" showDelay="500">\n \x3c!-- Exibe o ícone caso exista. Para isso o valor da coluna deve ser { value: string, style: object } --\x3e\n <i *ngIf="col.icon" class="{{rowData[col[\'field\']]?.value}}" [ngStyle]="rowData[col[\'field\']]?.style"\n aria-hidden="true"></i>\n \x3c!-- Quando não há ícone exibe o valor normal da coluna --\x3e\n <span>{{getFieldValue(rowData, col)}}</span>\n </td>\n\n \x3c!-- Coluna das ações --\x3e\n <td id="{{id}}-col-actions-{{key}}" class="col-actions" *ngIf="actions && actions(rowData)?.length">\n <s-button id="{{id}}-btn-actions-{{key}}" *ngIf="actions(rowData).length > 1" [label]="actionLabel" priority="default"\n [model]="getActions(rowData, key)" [disabled]="false" [auxiliary]="true"></s-button>\n\n <s-button id="{{id}}-btn-action-{{key}}" *ngIf="actions(rowData).length <= 1" [label]="actions(rowData, key)[0].label"\n priority="default" (click)="actions(rowData, key)[0].command()" [disabled]="false" [auxiliary]="true"></s-button>\n </td>\n </tr>\n </ng-template>\n\n <ng-template pTemplate="paginatorright">\n <span>{{recordsMessage}}</span>\n </ng-template>\n\n <ng-template pTemplate="emptymessage" let-columns>\n <tr>\n <td id="{{id}}-empty-message" [attr.colspan]="columns?.length + (isMultipleSelection ? 2 : 1)">{{emptyMessage}}</td>\n </tr>\n </ng-template>\n </p-table>\n</div>\n',encapsulation:t.ViewEncapsulation.None,styles:["app-data-list p-table .ui-table .ui-table-tbody>tr>td,app-data-list p-table .ui-table .ui-table-thead>tr>th{text-overflow:ellipsis;white-space:nowrap!important}app-data-list p-table .ui-paginator .ui-paginator-right-content{margin-left:auto}.actionsSize{width:11rem}.actionSize{width:18rem}body .ui-tooltip{max-width:22.3em!important}@media screen and (max-width:478px){.ui-paginator-right-content{display:none}}"]})],o)}(),go=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,h.ButtonModule,h.LoadingStateModule,b.TableModule,g.TooltipModule],declarations:[fo],exports:[fo],providers:[yo]})],e)}(),bo=function(){function e(e,t,o){this.http=e,this.messageService=t,this.translateService=o}return e.prototype.getDataLookup=function(e,t){var o=this;return t?this.http.get(""+e,{params:t}).pipe(s.catchError((function(e){return 403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)}))):this.http.get(""+e).pipe(s.catchError((function(e){return 403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)})))},e.ctorParameters=function(){return[{type:v.HttpClient},{type:I.MessageService},{type:a.TranslateService}]},e=N([t.Injectable()],e)}(),vo=y,Io=function(){function e(e){this.lookupService=e,this.searchTotalRecordsLabel="hcm.payroll.lookup_search_total_records_label",this.filterLabel="hcm.payroll.lookup_generic_filter_label",this.clearLabel="hcm.payroll.lookup_generic_clean_filter_label",this.cancelLabel="hcm.payroll.lookup_generic_btn_cancel_label",this.selectLabel="hcm.payroll.lookup_btn_select_label",this.lookupEmptyMessage="hcm.payroll.lookup_auto_complete_empty_message",this.lookupSuggestions=[],this.searchGridFields=[],this.searchLookupFields=[],this.searchGridData=[],this.searchFields=[],this.parameters=[],this.onSelect=new t.EventEmitter,this.onClear=new t.EventEmitter,this.modelChange=new t.EventEmitter,this._httpParams=new v.HttpParams,this.ngUnsubscribe=new f.Subject}return e.prototype.ngOnInit=function(){},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},e.prototype.lookupRequest=function(e){var t=this;this.generateLookupParameters(e),this.configHttpParamsPagination("10","0"),this.getDataLookup(this.endpoint,this.httpParams).pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(e){return t.lookupSuggestions=e&&Y(e.contents)}))},e.prototype.searchRequest=function(e){var t=this;this.generateGridParameters(e.filterData),this.configHttpParamsPagination(e.rows.toString(),Math.floor(e.first/e.rows).toString()),this.configHttpParamsOrderBy(e.multiSortMeta),this.getDataLookup(this.endpoint,this.httpParams).pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(e){return t.searchGridData=e&&Y(e.contents)}))},e.prototype.getDataLookup=function(e,t){var o=this;return this.lookupService.getDataLookup(this.endpoint,this.httpParams).pipe(s.map((function(e){var t=e.totalElements,n=e.contents;return o.searchTotalRecords=t,o.concatFields&&o.concatFields.length&&n.map((function(e){o.convertGridFieldValue(e),e[o.lookupDisplayField]=o.generateDisplayFieldValue(B({},e))})),e})))},e.prototype.convertLookupFieldValue=function(e,t){if(e)switch(t.type){case h.FieldType.Date:e=vo(e).format("L");break;case h.FieldType.Enum:var o=t.options.filter((function(t){return t.value===e}))[0];e=o?o.label:e}return e},e.prototype.convertGridFieldValue=function(e){e&&this.searchGridFields.forEach((function(t){switch(t.type){case h.FieldType.Enum:var o=t.options.filter((function(o){return o.value===e[t.name]}))[0];e[t.name]=o?o.label:e[t.name]}}))},e.prototype.generateDisplayFieldValue=function(e){var t=this,o="";return this.concatFields.forEach((function(n){var r=t.convertLookupFieldValue(e[n.name],n);r&&(o?o+=" - "+r:o=r)})),o},e.prototype.generateLookupParameters=function(e){var t=this,o="";this.searchLookupFields.forEach((function(n){var r=t.searchFields.filter((function(e){return n===e.name}))[0];o?o+=" or "+t.getParameterByType(r.type,n,e):o=""+t.getParameterByType(r.type,n,e)})),this.parameters.forEach((function(e){o?o+=" and "+e.toString():o=""+e.toString()})),this.httpParams=(new v.HttpParams).set("filter",o)},e.prototype.generateGridParameters=function(e){var t=this,o="";Object.keys(e).forEach((function(n){if(e[n]){var r=t.searchFields.filter((function(e){return n===e.name}))[0];o+=o?" and "+t.getParameterByType(r.type,n,e[n]):t.getParameterByType(r.type,n,e[n])}})),this.parameters.forEach((function(e){o?o+=" and "+e.toString():o=""+e.toString()})),this.httpParams=(new v.HttpParams).set("filter",o)},e.prototype.getParameterByType=function(e,t,o){switch(e){case h.FieldType.Date:return t+" eq '"+vo(o).format("YYYY-MM-DD")+"'";case h.FieldType.Enum:return t+" eq '"+o+"'";case h.FieldType.Integer:return t+" eq "+o;case h.FieldType.Autocomplete:return t+" eq "+o.id;default:return"containing(lower("+t+"), lower('"+o+"'))"}},e.prototype.configHttpParamsPagination=function(e,t){this.httpParams=this.httpParams.set("size",e),this.httpParams=this.httpParams.set("offset",t)},e.prototype.configHttpParamsOrderBy=function(e){if(e&&e.length){var t="";e.map((function(e){t+=t?","+e.field+"+"+(1===e.order?"asc":"desc"):e.field+"+"+(1===e.order?"asc":"desc")})),this.httpParams=this.httpParams.set("orderby",t)}},Object.defineProperty(e.prototype,"httpParams",{get:function(){return this._httpParams},set:function(e){this._httpParams=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"model",{get:function(){return this._model},set:function(e){this._model=e,this.modelChange.emit(e)},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:bo}]},N([t.Input()],e.prototype,"id",void 0),N([t.Input()],e.prototype,"dataKey",void 0),N([t.Input()],e.prototype,"concatFields",void 0),N([t.Input()],e.prototype,"searchTitle",void 0),N([t.Input()],e.prototype,"formGroup",void 0),N([t.Input()],e.prototype,"controlName",void 0),N([t.Input()],e.prototype,"multiple",void 0),N([t.Input()],e.prototype,"endpoint",void 0),N([t.Input()],e.prototype,"lookupDisplayField",void 0),N([t.Input()],e.prototype,"searchTotalRecordsLabel",void 0),N([t.Input()],e.prototype,"filterLabel",void 0),N([t.Input()],e.prototype,"clearLabel",void 0),N([t.Input()],e.prototype,"cancelLabel",void 0),N([t.Input()],e.prototype,"selectLabel",void 0),N([t.Input()],e.prototype,"lookupEmptyMessage",void 0),N([t.Input()],e.prototype,"searchTotalRecords",void 0),N([t.Input()],e.prototype,"lookupSuggestions",void 0),N([t.Input()],e.prototype,"searchGridFields",void 0),N([t.Input()],e.prototype,"searchLookupFields",void 0),N([t.Input()],e.prototype,"searchGridData",void 0),N([t.Input()],e.prototype,"searchFields",void 0),N([t.Input()],e.prototype,"parameters",void 0),N([t.Output()],e.prototype,"onSelect",void 0),N([t.Output()],e.prototype,"onClear",void 0),N([t.Output()],e.prototype,"modelChange",void 0),N([t.Input()],e.prototype,"model",null),e=N([t.Component({selector:"c-lookup",template:'<div *ngIf="formGroup;else noForm" [formGroup]="formGroup">\n <s-lookup [id]="id" [dataKey]="dataKey" [formControlName]="controlName" (onLookupRequest)="lookupRequest($event)"\n (onSearchRequest)="searchRequest($event)" filterLabel="{{filterLabel|translate}}" clearLabel="{{clearLabel|translate}}"\n cancelLabel="{{cancelLabel|translate}}" selectLabel="{{selectLabel|translate}}" [lookupSuggestions]="lookupSuggestions"\n lookupEmptyMessage="{{lookupEmptyMessage|translate}}" [searchGridData]="searchGridData" [searchFields]="searchFields"\n [searchTotalRecords]="searchTotalRecords" searchTotalRecordsLabel="{{searchTotalRecords}} {{searchTotalRecordsLabel|translate}}"\n [searchGridFields]="searchGridFields" [searchTitle]="searchTitle" [lookupDisplayField]="lookupDisplayField"\n [multiple]="multiple" (onSelect)="onSelect.next($event)" appendTo="body" (onClear)="onClear.next($event)"></s-lookup>\n</div>\n\n<ng-template #noForm>\n <s-lookup [id]="id" [dataKey]="dataKey" [(ngModel)]="model" (onLookupRequest)="lookupRequest($event)"\n (onSearchRequest)="searchRequest($event)" filterLabel="{{filterLabel|translate}}" clearLabel="{{clearLabel|translate}}"\n cancelLabel="{{cancelLabel|translate}}" selectLabel="{{selectLabel|translate}}" [lookupSuggestions]="lookupSuggestions"\n lookupEmptyMessage="{{lookupEmptyMessage|translate}}" [searchGridData]="searchGridData" [searchFields]="searchFields"\n [searchTotalRecords]="searchTotalRecords" searchTotalRecordsLabel="{{searchTotalRecords}} {{searchTotalRecordsLabel|translate}}"\n [searchGridFields]="searchGridFields" [searchTitle]="searchTitle" [lookupDisplayField]="lookupDisplayField"\n [multiple]="multiple" (onSelect)="onSelect.next($event)" appendTo="body" (onClear)="onClear.next($event)"></s-lookup>\n</ng-template>\n'})],e)}(),ko=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,h.DynamicFormModule,o.ReactiveFormsModule,a.TranslateModule],declarations:[Io],exports:[Io],providers:[bo]})],e)}(),So=y,_o=function(){function o(e){this.httpClienteService=e}return o.prototype.getAutoComplete=function(e,t,o,n,r){var i=this.generateGridParameters(t,o,n);return this.httpClienteService.getAutoComplete(e,i,r).pipe(s.map((function(e){return e&&e.contents})))},o.prototype.getAutoCompleteQuery=function(e,t){return this.httpClienteService.query(e,t).pipe(s.map((function(e){return e&&e.result})))},o.prototype.generateGridParameters=function(t,o,n){var r=this,i="";return Object.keys(t).forEach((function(a){var s,l=o&&o.filter((function(e){return a===e.name}))[0],p="",c=l&&l.type;l||a==e.CoreFieldType.searchValue||(c=h.FieldType.String),l||a!==e.CoreFieldType.searchValue||(c=e.CoreFieldType.searchValue),i&&(p=" and "),(s=r.getParameterByType(c,a,t[a],n))&&(i+=" "+p+" "+s)})),i},o.prototype.getParameterByType=function(t,o,n,r){if(!n&&t!=e.CoreFieldType.searchValue)return o+" is null";if(n&&"not null"===n&&t!=e.CoreFieldType.searchValue)return o+" is not null";switch(t){case h.FieldType.Date:return o+" eq '"+So(n).format("YYYY-MM-DD")+"'";case h.FieldType.Enum:return o+" eq '"+n+"'";case h.FieldType.Integer:return o+" eq "+n;case h.FieldType.Autocomplete:return o+" eq '"+n.id+"'";case e.CoreFieldType.searchValue:return""+this.getParameterBySearchType(n,r);default:return this.getSearchFilterString(o,n)}},o.prototype.getParameterBySearchType=function(e,t){var o,n,r="";if(e){try{for(var i=V(Object.entries(e)),a=i.next();!a.done;a=i.next()){var s=U(a.value,2),l=s[0],p=s[1];if("code"===l&&Number(p)){var c=t?"'":"";r+=r?" or "+l+" eq "+c+p+c:l+" eq "+c+p+c}else"code"!=l&&(r+=r?" or "+this.getSearchFilterString(l,p):this.getSearchFilterString(l,p))}}catch(e){o={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}r=r?"("+r+")":""}return r},o.prototype.getSearchFilterString=function(e,t){return"containing(lower("+e+"), lower('"+t+"'))"},o.ctorParameters=function(){return[{type:Ne}]},o=N([t.Injectable()],o)}(),wo=y,Co=function(){function e(e,t,o){this.http=e,this.messageService=t,this.translateService=o}return e.prototype.lookupRequestPost=function(e,t,o,n){return void 0===o&&(o=null),this.httpPostParams=e,this.postConfigPageSize(e),this.lookupDisplayField=n,this.concatFields=o,this.postDataLookup(t)},e.prototype.postConfigPageSize=function(e){e&&(this.httpPostParams.page.size=e.page&&e.page.size?e.page.size:10,this.httpPostParams.page.current=e.page&&e.page.current?e.page.current:0)},e.prototype.postDataLookup=function(e){var t=this;return this.postUrlDataLookup(e,this.httpPostParams).pipe(s.map((function(e){var o=e.contents;return t.concatFields&&t.concatFields.length&&o.map((function(e){t.concatOtherFields&&t.convertGridFieldValue(e),e[t.lookupDisplayField]=t.generateDisplayFieldValue(B({},e))})),e})))},e.prototype.convertLookupFieldValue=function(e,t){if(e)switch(t.type){case h.FieldType.Date:e=wo(e).format("L");break;case h.FieldType.Enum:var o=t.options.filter((function(t){return t.value===e}))[0];e=o?o.label:e}return e},e.prototype.convertGridFieldValue=function(e){e&&this.concatOtherFields.forEach((function(t){switch(t.type){case h.FieldType.Enum:var o=t.options.filter((function(o){return o.value===e[t.name]}))[0];e[t.name]=o?o.label:e[t.name]}}))},e.prototype.generateDisplayFieldValue=function(e){var t=this,o="";return this.concatFields.forEach((function(n){var r=t.convertLookupFieldValue(e[n.name],n);r&&(o?o+=" - "+r:o=r)})),o},e.prototype.postUrlDataLookup=function(e,t){var o=this;return t?this.http.post(""+e,B({},t)).pipe(s.catchError((function(e){return 403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)}))):this.http.post(""+e,{}).pipe(s.catchError((function(e){return 403===e.status&&o.messageService.add({severity:"error",summary:o.translateService.instant("hcm.payroll.error"),detail:o.translateService.instant("hcm.payroll.permission_error_not_allowed"),sticky:!0}),f.throwError(e)})))},e.ctorParameters=function(){return[{type:v.HttpClient},{type:I.MessageService},{type:a.TranslateService}]},e=N([t.Injectable()],e)}(),Do=function(){function e(e,t){var o=e.filterData;this.name=o.name||null,this.code=o.code||null,this.searchText=o.searchText||null,this.companyId=o.headoffice||null,this.companyBranchId=o.branchoffice&&o.branchoffice.id||null,this.departmentId=o.department&&o.department.tableId||null,this.costcenterId=o.costcenter&&o.costcenter.id||null,this.jobpositionIds=o.jobposition||null,this.syndicateId=o.syndicate&&o.syndicate.id||null,this.shiftId=o.workshiftScale||null,this.workshiftId=o.workshiftId&&o.workshiftId.id||null,this.workshiftGroupId=o.workshiftGroupId&&o.workshiftGroupId.id||null,this.intervalGroupId=o.intervalGroupId&&o.intervalGroupId.is||null,this.scaleTeamId=o.scaleTeamId&&o.scaleTeamId.id||null,this.scaleCategoryId=o.scaleCategoryId&&o.scaleCategoryId.id||null,this.employmentRelationshipId=o.employmentRelationshipId&&o.employmentRelationshipId.id||null,this.contractType=o.contractType||null,this.expenseNatureId=o.expenseNatureId&&o.expenseNatureId.id||null,this.allowDeficient=o.allowDeficient||null,this.disabilityIds=o.disabilityIds||null,this.listExpired=!!o.hasOwnProperty("listExpired")&&o.listExpired,this.manager=o.manager?o.manager.tableId:null,this.referenceDate=t||null,this.page={current:e.first?e.first:0,size:e.rows?e.rows:10}||null}return e.prototype.getToFilter=function(){return this.jobpositionIds=this.convertListIds(this.jobpositionIds),this.disabilityIds=this.convertListIds(this.disabilityIds),this},e.prototype.convertListIds=function(e){if(e)return e.map((function(e){return e.tableId?e.tableId:e.id}))},e}(),To=y,Eo=function(){function o(o,n,r,i){var a=this;this.translate=o,this.cd=n,this.autocompleteParametersService=r,this.lookupParametersService=i,this.currentCompanyId=null,this.currentCompanyName=null,this.onSelect=new t.EventEmitter,this.onClear=new t.EventEmitter,this.onBlur=new t.EventEmitter,this.companyBranchId=null,this.lookupSuggestions=[],this.searchGridData=[],this.suggestionsObservable=new f.BehaviorSubject([]),this.totalRecords=0,this.valueEnumShift=[{label:this.translate.instant("hcm.payroll.enum_WorkshiftScale_FIRST_SHIFT"),value:"0",enum:"FIRST_SHIFT"},{label:this.translate.instant("hcm.payroll.enum_WorkshiftScale_SECOND_SHIFT"),value:"1",enum:"SECOND_SHIFT"},{label:this.translate.instant("hcm.payroll.enum_WorkshiftScale_THIRD_SHIFT"),value:"2",enum:"THIRD_SHIFT"},{label:this.translate.instant("hcm.payroll.enum_WorkshiftScale_FOURTH_SHIFT"),value:"3",enum:"FOURTH_SHIFT"},{label:this.translate.instant("hcm.payroll.enum_WorkshiftScale_MIXED"),value:"4",enum:"MIXED"},{label:this.translate.instant("hcm.payroll.enum_WorkshiftScale_GENERAL"),value:"5",enum:"GENERAL"}],this.concatFieldsName=[new h.FormField({name:"code",label:this.translate.instant("hcm.payroll.code"),type:h.FieldType.String}),new h.FormField({name:"name",label:this.translate.instant("hcm.payroll.employees_addition_workstation"),type:h.FieldType.String})],this.concatName=[new h.FormField({name:"code",label:this.translate.instant("hcm.payroll.code"),type:h.FieldType.String})],this.gridFields=[new h.FormField({name:"name",label:this.translate.instant("hcm.payroll.employees_addition_workstation"),type:h.FieldType.String}),new h.FormField({name:"manager",label:this.translate.instant("hcm.payroll.workstation_form_lookup_search_manager_label"),type:h.FieldType.String})],this.searchFields=Y(this.concatName,[{name:"name",label:this.translate.instant("hcm.payroll.movimentation_name"),type:h.FieldType.String},{name:"headoffice",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_company"),dataKey:"id",appendTo:"body",fullWidth:!0,suggestionsObservable:this.suggestionsObservable,displayField:"companyname"},{name:"branchoffice",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_branch"),dataKey:"id",appendTo:"body",fullWidth:!0,onRemove:function(){return a.companyBranchId=null},onSelect:function(e){var t=e.id;return a.companyBranchId=t},onSearch:function(e){a.getAutocomplete("company",e?{companyname:e,code:e}:null,"code","companyname",{headquarter:a.currentCompanyId?a.currentCompanyId:"not null"})},suggestionsObservable:this.suggestionsObservable,displayField:"companyname"},{name:"manager",type:h.FieldType.Autocomplete,multiple:!1,label:this.translate.instant("hcm.payroll.workstation_form_lookup_search_manager_label"),appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocompleteQuery("autocompleteManager",{valueSearch:e||"",companyId:{tableId:a.currentCompanyId},companyBranchId:{tableId:a.companyBranchId?a.companyBranchId:""}})},suggestionsObservable:this.suggestionsObservable,displayField:"manager"},{name:"department",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.movimentation_historical_department_tab"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocompleteQuery("autocompleteDepartmentQuery",{searchText:e||"",companyId:a.currentCompanyId,referenceDate:To(y.now()).format("YYYY-MM-DD")})},suggestionsObservable:this.suggestionsObservable,displayField:"name"},{name:"costcenter",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_cost_center"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(t){a.getAutocomplete("costcenter",t?{name:t,code:t}:null,"code","name",a.currentCompanyId?{company:a.currentCompanyId}:null,!0,e.ServiceType.ORGANIZATION_REGISTER)},suggestionsObservable:this.suggestionsObservable,displayField:"name"},{name:"jobposition",type:h.FieldType.Autocomplete,multiple:!0,label:this.translate.instant("hcm.payroll.movimentation_historical_job_position_tab"),dataKey:"tableId",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocompleteQuery("autocompleteJobpositionQuery",{searchText:e||"",companyId:a.currentCompanyId,creationDate:To().format("YYYY-MM-DD"),expirationDate:To().format("YYYY-MM-DD")})},suggestionsObservable:this.suggestionsObservable,displayField:"name"},{name:"syndicate",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_syndicate"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocomplete("syndicate",e?{name:e,code:e}:null,"code","name")},suggestionsObservable:this.suggestionsObservable,displayField:"name"},{name:"workshiftScale",type:h.FieldType.Enum,label:this.translate.instant("hcm.payroll.SHIFT"),showClear:!0,size:{md:12},onChange:function(){a.resetDependenciesOfShift(!0)},options:this.valueEnumShift},{name:"workshiftId",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_scale"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocomplete("workshift",e?{description:e,code:e}:null,"code","description",a.workstationFilterForm.get("workshiftScale").value?{workshiftScale:a.valueEnumShift[a.workstationFilterForm.get("workshiftScale").value].enum}:null)},onSelect:function(){a.resetDependenciesOfShift()},suggestionsObservable:this.suggestionsObservable,displayField:"description"},{name:"workshiftGroupId",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_workshift-group"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocomplete("workshiftGroup",e?{code:e}:null,"code","baseDate",a.workstationFilterForm.get("workshiftId").value?{workshift:a.workstationFilterForm.get("workshiftId").value.id}:null)},suggestionsObservable:this.suggestionsObservable,displayField:"baseDate"},{name:"intervalGroupId",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_class_interval"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocomplete("intervalGroup",e?{description:e,code:e}:null,"code","description",a.workstationFilterForm.get("workshiftId").value?{workshift:a.workstationFilterForm.get("workshiftId").value.id}:null)},suggestionsObservable:this.suggestionsObservable,displayField:"description"},{name:"scaleTeamId",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_scale_team"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocomplete("scaleTeam",e?{name:e,code:e}:null,"code","name")},suggestionsObservable:this.suggestionsObservable,displayField:"name"},{name:"scaleCategoryId",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_scale_category"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocomplete("scaleCategory",e?{name:e,code:e}:null,"code","name")},suggestionsObservable:this.suggestionsObservable,displayField:"name"},{name:"employmentRelationshipId",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_employment_relationship"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocomplete("employmentRelationship",e?{name:e,code:e}:null,"code","name")},suggestionsObservable:this.suggestionsObservable,displayField:"name"},{name:"contractType",type:h.FieldType.Enum,label:this.translate.instant("hcm.payroll.employees_temporary_contract_temporary_contract_type"),showClear:!0,size:{md:12},options:[{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_Employee"),value:"0"},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_Manager"),value:1},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_FarmWorker"),value:2},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_Retired"),value:3},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_Trainee"),value:4},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_Apprentice"),value:5},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_FixedDueDate"),value:6},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_RetiredManager"),value:7},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_PublicAgent"),value:8},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_Teacher"),value:9},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_CooperativeWorker"),value:10},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_DomesticWorker"),value:11},{label:this.translate.instant("hcm.payroll.enum_EmployeeContractType_TeacherFixedDueDate"),value:12}]},{name:"expenseNatureId",type:h.FieldType.Autocomplete,label:this.translate.instant("hcm.payroll.employees_addition_expense_nature"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocomplete("expenseNature",e?{name:e,code:e}:null,"code","name")},suggestionsObservable:this.suggestionsObservable,displayField:"name"},{name:"allowDeficient",type:h.FieldType.Enum,label:this.translate.instant("hcm.payroll.allow_deficient"),showClear:!0,size:{md:12},options:[{label:this.translate.instant("hcm.payroll.enum_DecisionPcD_No"),value:"0"},{label:this.translate.instant("hcm.payroll.enum_DecisionPcD_Also"),value:1},{label:this.translate.instant("hcm.payroll.enum_DecisionPcD_Only"),value:2}]},{name:"disabilityIds",type:h.FieldType.Autocomplete,multiple:!0,label:this.translate.instant("hcm.payroll.employees_addition_disability"),dataKey:"id",appendTo:"body",fullWidth:!0,onSearch:function(e){a.getAutocomplete("disability",e?{name:e,code:e}:null,"code","name")},suggestionsObservable:this.suggestionsObservable,displayField:"name"}]),this.ngUnsubscribe=new f.Subject}return o.prototype.ngOnInit=function(){},o.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},o.prototype.ngAfterViewInit=function(){this.cd.detectChanges();var e=this.workstationFilterForm.get("headoffice");e.setValue({id:this.currentCompanyId,companyname:this.currentCompanyName}),e.disable()},Object.defineProperty(o.prototype,"workstationFilterForm",{get:function(){return this.workstationgroupEl&&this.workstationgroupEl.formGroupDialog},enumerable:!0,configurable:!0}),o.prototype.selectOption=function(e){this.onSelect.emit(e)},o.prototype.onClearItem=function(e){return j(this,void 0,void 0,(function(){return q(this,(function(t){switch(t.label){case 0:return[4,this.onClear.emit(e)];case 1:return t.sent(),this.form.get(this.name).reset(),[2]}}))}))},o.prototype.resetDependenciesOfShift=function(e){void 0===e&&(e=!1),e&&this.workstationFilterForm.get("workshiftId").reset(),this.workstationFilterForm.get("workshiftGroupId").reset(),this.workstationFilterForm.get("intervalGroupId").reset()},o.prototype.searchRequest=function(e){var t=this,o=this.workstationFilterForm.get("headoffice"),n=e&&e.filterData;o.setValue({id:this.currentCompanyId,companyname:this.currentCompanyName}),e=B({},this.getValueEvent(e,n));var r=this.getHireDate().replace(/\'/g,""),i=new Do(e,r);this.lookupParametersService.lookupRequestPost(i.getToFilter(),"hcm/payroll/queries/workstationgroupFilterQuery",Y(this.concatFieldsName),"name").pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(e){n?t.searchGridData=e&&Y(e.contents):t.lookupSuggestions=e&&Y(e.contents),t.totalRecords=e&&e.totalPages}))},o.prototype.getValueEvent=function(e,t){return t?e.filterData.headoffice=this.currentCompanyId:e={filterData:{headoffice:this.currentCompanyId,searchText:e}},e},o.prototype.getAutocompleteQuery=function(e,t){var o=this;this.autocompleteParametersService.getAutoCompleteQuery(e,t).pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(t){"autocompleteDepartmentQuery"===e?t.filter((function(e){e.fields&&e.fields[0]&&(e.name=e.fields[1].value+" - "+e.fields[0].value)})):"autocompleteJobpositionQuery"===e?t.filter((function(e){e.fields&&e.fields[0]&&e.fields[1]&&(e.name=e.fields[0].value+" - "+e.fields[1].value)})):"autocompleteManager"===e&&t.map((function(e){e.manager=e.fields[0].value?e.fields[0].value:e.fields[3].value})),o.suggestionsObservable.next(t)}))},o.prototype.getAutocomplete=function(t,o,n,r,i,a,l){var p=this;void 0===i&&(i=null),void 0===a&&(a=!1),void 0===l&&(l=e.ServiceType.PAYROLL),this.autocompleteParametersService.getAutoComplete(t,B({},i,{searchValue:B({},o)}),this.searchFields,a,l).pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(e){"workshiftGroup"===t&&e.filter((function(e){if(e.baseDate){var t=To(e.baseDate,"YYYY-MM-DD");if(t.isValid())return e.baseDate=t.format(p.dateFormat)}})),p.suggestionsObservable.next(p.getConcatFields(e,n,r))}))},o.prototype.getConcatFields=function(e,t,o){return o&&t&&e.filter((function(e){e[o]=e[t]+" - "+e[o]})),e},o.prototype.getHireDate=function(){var e=To(this.hireDate).format(this.dateFormat);return e?"'"+tt(e,this.dateFormat)+"'":"'"+nt()+"'"},o.ctorParameters=function(){return[{type:a.TranslateService},{type:t.ChangeDetectorRef},{type:_o},{type:Co}]},N([t.ViewChild("workstationgroupEl",{static:!1})],o.prototype,"workstationgroupEl",void 0),N([t.Input()],o.prototype,"currentCompanyId",void 0),N([t.Input()],o.prototype,"currentCompanyName",void 0),N([t.Input()],o.prototype,"hireDate",void 0),N([t.Input()],o.prototype,"dateFormat",void 0),N([t.Input()],o.prototype,"required",void 0),N([t.Input()],o.prototype,"disabled",void 0),N([t.Input()],o.prototype,"form",void 0),N([t.Input()],o.prototype,"name",void 0),N([t.Output()],o.prototype,"onSelect",void 0),N([t.Output()],o.prototype,"onClear",void 0),N([t.Output()],o.prototype,"onBlur",void 0),o=N([t.Component({selector:"c-workstationgroup-lookup",template:'<div [formGroup]="form">\n <s-lookup\n #workstationgroupEl\n id="workstationGroup"\n dataKey="code"\n (onSelect)="selectOption($event)"\n (onClear)="onClearItem($event)"\n [formControlName]="name"\n (onLookupRequest)="searchRequest($event)"\n (onSearchRequest)="searchRequest($event)"\n filterTitle="{{ \'hcm.payroll.filters\' | translate }}"\n filterLabel="{{ \'hcm.payroll.filter\' | translate }}"\n clearLabel="{{ \'hcm.payroll.lookup_generic_clean_filter_label\' | translate }}"\n cancelLabel="{{ \'hcm.payroll.cancel\' | translate }}"\n selectLabel="{{ \'hcm.payroll.lookup_btn_select_label\' | translate }}"\n [disabled]="disabled"\n [lookupSuggestions]="lookupSuggestions"\n lookupEmptyMessage="{{ \'hcm.payroll.lookup_auto_complete_empty_message\' | translate }}"\n [searchGridData]="searchGridData"\n [searchFields]="searchFields"\n placeholder="{{\'hcm.payroll.suggestions\' | translate}}"\n [searchTotalRecords]="totalRecords"\n searchTotalRecordsLabel="{{ totalRecords }} {{\n \'hcm.payroll.admission_registers\' | translate\n }}"\n [searchGridFields]="gridFields"\n searchTitle="{{ \'hcm.payroll.employees_addition_workstation\' | translate }}"\n lookupDisplayField="name"\n ></s-lookup>\n\n</div>\n'})],o)}(),Fo=function(){function e(){}return e=N([t.NgModule({imports:[o.FormsModule,h.DynamicFormModule,o.ReactiveFormsModule,p.CommonModule,a.TranslateModule],declarations:[Eo],exports:[Eo],providers:[_o,Co]})],e)}(),Mo=function(){function n(o,n,r,i,a){var s=this;this.confirmationService=o,this.translateService=n,this.activatedRoute=r,this.cd=i,this.formBuilder=a,this.recordByRow=1,this.showDateWhen=!1,this.isEditMode=!1,this.isViewMode=!1,this.withSideBar=!0,this.visibleChange=new t.EventEmitter,this.ngUnsubscribe=new f.Subject,this.orderBy={field:"displayDateWhen",direction:e.DirectionEnumeration.DESC},this.bankAccountItemInput={},this.totalRecords=0,this.actionLabel=this.translateService.instant("hcm.payroll.entries_query_actions_total_title"),this.loading=!0,this.listData=[],this.listDataNoPage=[],this.cols=[{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_date_when"),field:"displayDateWhen"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_bank"),field:"bank"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_bank_branch"),field:"bankBranch"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_account_type"),field:"accountType"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_account"),field:"bankAccount"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_digit"),field:"digit"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_percentage"),field:"percentage"}],this.actions=function(e,t){return void 0===e&&(e={}),[{visible:s.isEditMode,label:s.translateService.instant("hcm.payroll.employees_image_cropper_view"),command:function(){e.index=t,s.bankAccountItemInput={currentItem:e,listData:s.listDataNoPage,isEditMode:!1},s.visible=!0}},{visible:!(s.isEditMode||!s.withSideBar),label:s.translateService.instant("hcm.payroll.edit"),command:function(){e.index=t,s.bankAccountItemInput={currentItem:e,listData:s.listDataNoPage,isEditMode:!0},s.visible=!0}},{visible:!s.isEditMode,label:s.translateService.instant("hcm.payroll.delete"),command:function(){s.loading=!0,s.deleteAnnuityItem(t)}}]},this.createFormGroup()}return n.prototype.ngOnInit=function(){this.formGroup.setControl(this.fieldFormGroup,this.historicalBankAccountList)},n.prototype.createFormGroup=function(){this.historicalBankAccountList=this.formBuilder.group({historicalBankAccountList:this.formBuilder.control(null)})},n.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},n.prototype.ngAfterViewInit=function(){this.cd.detectChanges()},n.prototype.onLazyLoad=function(t){var o=this,n=t&&t.first?t.first:0,r=t&&t.rows?t.rows:this.recordByRow,i=this.getHistoricalBankAccountList();this.listData=[],this.totalRecords=null,t&&t.multiSortMeta&&t.multiSortMeta.length&&t.multiSortMeta.map((function(t){o.orderBy.field=t.field,o.orderBy.direction=1===t.order?e.DirectionEnumeration.ASC:e.DirectionEnumeration.DESC})),i&&i.length?(this.totalRecords=i.length,this.listData=i,this.listDataNoPage=Y(i),this.listData.sort(mt(this.orderBy.field,this.orderBy.direction)),this.listData=this.listData.slice(n,n+r)):this.listDataNoPage=[],(this.isEditMode||i&&1===i.length)&&this.refreshCssInIE11(),this.loading=!1},n.prototype.refreshCssInIE11=function(){/msie\s|trident\/|edge\//i.test(window.navigator.userAgent)&&setTimeout((function(){var e=document.getElementsByClassName("row0");e&&e[0]&&(e[0].className="refresh")}),1)},n.prototype.add=function(){this.bankAccountItemInput={},this.visible=!0},n.prototype.deleteAnnuityItem=function(e){var t=Y(this.getHistoricalBankAccountList());t.sort(mt(this.orderBy.field,this.orderBy.direction)),delete t[e],t=t.filter((function(e){return e})),this.historicalBankAccountList.get("historicalBankAccountList").setValue(t),this.verifyTotalPercentage(),this.onLazyLoad()},n.prototype.getHistoricalBankAccountList=function(){return this.historicalBankAccountList.get("historicalBankAccountList")&&this.historicalBankAccountList.get("historicalBankAccountList").value&&this.historicalBankAccountList.get("historicalBankAccountList").value.length?this.historicalBankAccountList.get("historicalBankAccountList")&&this.historicalBankAccountList.get("historicalBankAccountList").value:[]},n.prototype.addItemInList=function(e){var t=e&&e.index>=0?e.index:null,o=this.getHistoricalBankAccountList()?this.getHistoricalBankAccountList():[];if(null!=t)o[t]=e,delete e.index;else{if(Je(e.customFields)&&Object.keys(e.customFields).length){var n=at(e.customFields);e.customFields=Y(n)}e.dateWhen=this.dateWhen,o.push(e)}this.historicalBankAccountList.get("historicalBankAccountList").setValue(o),this.verifyTotalPercentage(),this.onLazyLoad({first:this.getNumberPageByIndex(t,o)})},n.prototype.getNumberPageByIndex=function(e,t){if(e){var o=t.length,n=this.recordByRow-1;return Math.ceil(o/this.recordByRow)*this.recordByRow-n-1}return null},n.prototype.verifyTotalPercentage=function(){var e=this.getHistoricalBankAccountList()?this.getHistoricalBankAccountList():[],t=[];if(!e.length)return this.msgTotalLimitByPercentage=null;e.filter((function(e){return t.push(e&&e.percentage)}));var o=t.reduce((function(e,t){return e+t}),0);this.msgTotalLimitByPercentage=100===o?this.translateService.instant("hcm.payroll.historical_bank_account_msg_limit_total_by_percentage"):null},Object.defineProperty(n.prototype,"scopedActions",{get:function(){return this.actions.bind(this)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"recordsMessage",{get:function(){return(this.totalRecords||0)+" "+(1===this.totalRecords?this.translateService.instant("hcm.payroll.admission_register"):this.translateService.instant("hcm.payroll.admission_registers"))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"getTooltipAndDisableButtonAdd",{get:function(){return this.dateWhen?null:this.msgTooltipAdd},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"dateWhen",{get:function(){return this._dateWhen},set:function(e){var t=this;this._dateWhen=e,this._dateWhen&&this.listData.filter((function(e){return e.dateWhen=t._dateWhen}))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"displayDateWhen",{get:function(){return this._displayDateWhen},set:function(e){var t=this;this._displayDateWhen=e,this._displayDateWhen&&this.listData.filter((function(e){return e.displayDateWhen=t._displayDateWhen}))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"addListData",{set:function(e){this.loading=!0,this.historicalBankAccountList.get("historicalBankAccountList").patchValue(e),this.verifyTotalPercentage(),this.onLazyLoad()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"visible",{get:function(){return this._visible},set:function(e){this._visible=e,this.visibleChange.emit(this.visible)},enumerable:!0,configurable:!0}),n.prototype.close=function(){this.visible=!1},n.ctorParameters=function(){return[{type:I.ConfirmationService},{type:a.TranslateService},{type:i.ActivatedRoute},{type:t.ChangeDetectorRef},{type:o.FormBuilder}]},N([t.ViewChild(h.CustomFieldsComponent,{static:!1})],n.prototype,"customFields",void 0),N([t.Input()],n.prototype,"formGroup",void 0),N([t.Input()],n.prototype,"fieldFormGroup",void 0),N([t.Input()],n.prototype,"_dateWhen",void 0),N([t.Input()],n.prototype,"_displayDateWhen",void 0),N([t.Input()],n.prototype,"recordByRow",void 0),N([t.Input()],n.prototype,"showDateWhen",void 0),N([t.Input()],n.prototype,"msgTooltipAdd",void 0),N([t.Input()],n.prototype,"isEditMode",void 0),N([t.Input()],n.prototype,"isViewMode",void 0),N([t.Input()],n.prototype,"currency",void 0),N([t.Input()],n.prototype,"customEntity",void 0),N([t.Input()],n.prototype,"customService",void 0),N([t.Input()],n.prototype,"withSideBar",void 0),N([t.Input()],n.prototype,"dateWhen",null),N([t.Input()],n.prototype,"displayDateWhen",null),N([t.Input()],n.prototype,"addListData",null),N([t.Input()],n.prototype,"visible",null),n=N([t.Component({selector:"c-historical-bank-account",template:'<s-sidebar *ngIf="withSideBar" [visible]="visible" (visibleChange)="close()"\n header="{{\'hcm.payroll.historical_bank_account_title_form\'|translate}}">\n<bank-account [(visible)]="visible"\n [isEditAndViewValue]="bankAccountItemInput"\n [currency]="currency"\n [customEntity]="customEntity"\n [customService]="customService"\n [getListBankAccount]="listDataNoPage"\n (bankAccountItemToList)="addItemInList($event)"></bank-account>\n</s-sidebar>\n\n<div *ngIf="!withSideBar">\n <bank-account [(visible)]="visible"\n [isEditAndViewValue]="bankAccountItemInput"\n [currency]="currency"\n [customEntity]="customEntity"\n [customService]="customService"\n [getListBankAccount]="listDataNoPage"\n [withSideBar]="false"\n [isViewMode]="isViewMode"\n (bankAccountItemToList)="addItemInList($event)"></bank-account>\n</div>\n\n<div class="ui-g-1" *ngIf="withSideBar && !isEditMode">\n <div class="form-group ">\n <s-button id="ta-addPayAnnuity"\n [disabled]="getTooltipAndDisableButtonAdd || msgTotalLimitByPercentage"\n (onClick)="add()"\n [pTooltip]="getTooltipAndDisableButtonAdd || msgTotalLimitByPercentage"\n tooltipPosition="top"\n label="{{\'hcm.payroll.historical_bank_account_add\'|translate}}"></s-button>\n </div>\n</div>\n<div class="ui-g-12">\n <p-table\n id="table-annuity"\n [value]="listData"\n [columns]="cols"\n (onLazyLoad)="onLazyLoad($event)"\n [lazy]="true"\n [scrollable]="true"\n [paginator]="true"\n [totalRecords]="totalRecords"\n [sortMode]="\'multiple\'"\n *sLoadingState="loading"\n [rows]="recordByRow"\n dataKey="id">\n <ng-template pTemplate="colgroup" let-coumns>\n <colgroup>\n <col [ngClass]="\'col-default-s\'" *ngIf="showDateWhen">\n <col [ngClass]="\'col-default-l\'">\n <col [ngClass]="\'col-default-l\'">\n <col [ngClass]="\'col-default-m\'" *ngIf="withSideBar">\n <col [ngClass]="\'col-default-m\'">\n <col [ngClass]="\'col-default-s\'" *ngIf="withSideBar">\n <col [ngClass]="\'col-default-m\'">\n <col [ngClass]="\'col-action\'">\n </colgroup>\n </ng-template>\n <ng-template pTemplate="header" let-columns>\n \x3c!-- Cabeçalhos quando da table é permitido ordenar as colunas --\x3e\n <tr>\n \x3c!-- Cabeçalhos das colunas da tabela --\x3e\n <th\n *ngIf="showDateWhen"\n [pSortableColumn]="\'displayDateWhen\'"\n [pTooltip]="\'hcm.payroll.historical_bank_account_label_date_when\' | translate"\n tooltipPosition="top"\n showDelay="500"\n >\n <div class="senior-header" id="table-0">\n <span\n id="table-annuity-s-0">{{ \'hcm.payroll.historical_bank_account_label_date_when\' | translate }}</span>\n <p-sortIcon class="p-sorticon-status"\n [field]="\'hcm.payroll.historical_bank_account_label_date_when\' | translate"></p-sortIcon>\n </div>\n </th>\n\n <th\n [pSortableColumn]="\'bank\'"\n [pTooltip]="\'hcm.payroll.historical_bank_account_label_bank\' | translate"\n tooltipPosition="top"\n showDelay="500"\n >\n <div class="senior-header">\n <span>{{ \'hcm.payroll.historical_bank_account_label_bank\' | translate }}</span>\n <p-sortIcon class="p-sorticon-status"\n [field]="\'hcm.payroll.historical_bank_account_label_bank\' | translate"></p-sortIcon>\n </div>\n </th>\n\n <th\n [pSortableColumn]="\'bankBranch\'"\n [pTooltip]="\'hcm.payroll.historical_bank_account_label_bank_branch\' | translate"\n tooltipPosition="top"\n showDelay="500"\n >\n <div class="senior-header">\n <span>{{ \'hcm.payroll.historical_bank_account_label_bank_branch\' | translate }}</span>\n <p-sortIcon class="p-sorticon-status"\n [field]="\'hcm.payroll.historical_bank_account_label_bank_branch\' | translate"></p-sortIcon>\n </div>\n </th>\n\n <th *ngIf="withSideBar"\n [pSortableColumn]="\'accountType\'"\n [pTooltip]="\'hcm.payroll.historical_bank_account_label_account_type\' | translate"\n tooltipPosition="top"\n showDelay="500"\n >\n <div class="senior-header">\n <span>{{ \'hcm.payroll.historical_bank_account_label_account_type\' | translate }}</span>\n <p-sortIcon class="p-sorticon-status"\n [field]="\'hcm.payroll.historical_bank_account_label_account_type\' | translate"></p-sortIcon>\n </div>\n </th>\n\n <th\n [pSortableColumn]="\'bankAccount\'"\n [pTooltip]="\'hcm.payroll.historical_bank_account_label_account\' | translate"\n tooltipPosition="top"\n showDelay="500"\n >\n <div class="senior-header">\n <span>{{ \'hcm.payroll.historical_bank_account_label_account\' | translate }}</span>\n <p-sortIcon class="p-sorticon-status"\n [field]="\'hcm.payroll.historical_bank_account_label_account\' | translate"></p-sortIcon>\n </div>\n </th>\n\n <th *ngIf="withSideBar"\n [pSortableColumn]="\'digit\'"\n [pTooltip]="\'hcm.payroll.historical_bank_account_label_digit\' | translate"\n tooltipPosition="top"\n showDelay="500"\n >\n <div class="senior-header">\n <span>{{ \'hcm.payroll.historical_bank_account_label_digit\' | translate }}</span>\n <p-sortIcon class="p-sorticon-status"\n [field]="\'hcm.payroll.historical_bank_account_label_digit\' | translate"></p-sortIcon>\n </div>\n </th>\n\n <th\n [pSortableColumn]="\'percentage\'"\n [pTooltip]="\'hcm.payroll.historical_bank_account_label_percentage\' | translate"\n tooltipPosition="top"\n showDelay="500"\n >\n <div class="senior-header">\n <span>{{ \'hcm.payroll.historical_bank_account_label_percentage\' | translate }}</span>\n <p-sortIcon class="p-sorticon-status"\n [field]="\'hcm.payroll.historical_bank_account_label_percentage\' | translate"></p-sortIcon>\n </div>\n </th>\n \x3c!-- Cabeçalho da coluna de ações --\x3e\n <th id="col-actions"></th>\n </tr>\n </ng-template>\n <ng-template pTemplate="body" let-rowData let-key="rowIndex">\n\n <tr [ngClass]="\'row\'+key" [pSelectableRow]="rowData">\n <td *ngIf="showDateWhen" [pTooltip]="rowData?.displayDateWhen" tooltipPosition="top"\n showDelay="500">\n <span>{{ rowData?.displayDateWhen }}</span>\n </td>\n <td [pTooltip]="rowData?.bank?.name" tooltipPosition="top"\n showDelay="500">\n <span>{{ rowData?.bank?.name }}</span>\n </td>\n <td [pTooltip]="rowData?.bankBranch?.name" tooltipPosition="top"\n showDelay="500">\n <span>{{ rowData?.bankBranch?.name }}</span>\n </td>\n <td *ngIf="withSideBar" [pTooltip]="rowData?.accountType?.value" tooltipPosition="top"\n showDelay="500">\n <span>{{ rowData?.accountType?.value }}</span>\n </td>\n <td [pTooltip]="rowData?.bankAccount" tooltipPosition="top"\n showDelay="500">\n <span>{{ rowData?.bankAccount }}</span>\n </td>\n <td *ngIf="withSideBar" [pTooltip]="rowData?.digit" tooltipPosition="top"\n showDelay="500">\n <span>{{ rowData?.digit }}</span>\n </td>\n <td [pTooltip]="rowData?.percentage" tooltipPosition="top"\n showDelay="500">\n <span>{{ rowData?.percentage }}</span>\n </td>\n <td id="col-actions-{{key}}" class="col-actions "\n *ngIf="actions && actions(rowData, key)?.length">\n <s-button id="table-admission-btn-actions-{{key}}"\n *ngIf="actions(rowData, key).length > 1" [label]="actionLabel"\n priority="default" [model]="scopedActions(rowData, key)"\n [disabled]="false" [auxiliary]="true"></s-button>\n\n <s-button id="table-admission-btn-action-{{key}}"\n *ngIf="actions(rowData, key).length <= 1"\n [label]="scopedActions(rowData, key)[0].label"\n priority="default"\n (click)="scopedActions(rowData, key)[0].command()"\n [disabled]="false" [auxiliary]="true"></s-button>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate="emptymessage" let-columns>\n <tr>\n <td [attr.colspan]="columns.length +2">\n {{\'hcm.payroll.admission_empty_message\'|translate}}\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate="paginatorright">\n <span *ngIf="totalRecords">{{recordsMessage}}</span>\n </ng-template>\n </p-table>\n</div>\n',styles:[".refresh{width:100%!important}#table-annuity .col-default-s{width:10%}#table-annuity .col-default-m{width:12%}#table-annuity .col-default-l{width:16%}#table-annuity .col-action{width:10%}#table-annuity .icon-warning{text-align:center!important;color:#ff6d00c7!important}@media screen and (max-width:612px){#table-annuity .col-default-1,#table-annuity .col-default-2{width:16%}#table-annuity .col-default-3{width:26%}#table-annuity .col-icon{width:10%}#table-annuity .col-action{width:27%}}#main{display:-webkit-box;display:flex;height:100%;width:100%;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}#main form{height:100%}#main .footer{border-top:1px solid #ccc;padding-top:15px;margin-top:15px;flex-shrink:0;margin-bottom:-18px}#main .footer-s-border{padding-left:7px;flex-shrink:0;margin-bottom:-18px}"]})],n)}(),Po=function(){function e(e,n,r,i){this.translate=e,this.formBuilder=n,this.route=r,this.cd=i,this.withSideBar=!0,this.isEditMode=!1,this.visibleChange=new t.EventEmitter,this.bankAccountItemToList=new t.EventEmitter,this.ngUnsubscribe=new f.Subject,this.initialValidatorOfPercentage=[o.Validators.required,o.Validators.min(.01)],this.initialValidatorOfBankAccount=[o.Validators.required,o.Validators.maxLength(12)],this.labelBtnAdd="hcm.payroll.employees_add",this.maxValuePercentage=100,this.visibleBtnSave=!0,this.isView=!1,this.createFormGroup(),this.registerSubjects()}return e.prototype.validateDuplicateBankAccount=function(e,t,o,n){return function(r){var i=r&&r.value,a=!1;return e.filter((function(e,r){if(r!=e.index&&i&&e.bank&&e.bank.tableId===o&&e.bankBranch&&e.bankBranch.tableId===n&&e.accountType&&e.accountType.key===t&&Number(e.bankAccount)===Number(i))return a=!0})),a?{bankAccountDuplicate:!0}:null}},e.prototype.ngOnInit=function(){},e.prototype.ngAfterViewInit=function(){this.cd.detectChanges()},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(!0),this.ngUnsubscribe.unsubscribe()},e.prototype.registerSubjects=function(){},e.prototype.createFormGroup=function(){this.bankAccountFormGroup=this.formBuilder.group({id:this.formBuilder.control(null),index:this.formBuilder.control(null),employee:this.formBuilder.control({value:{tableId:null},disabled:!0}),dateWhen:this.formBuilder.control(null),displayDateWhen:this.formBuilder.control(null),bank:this.formBuilder.control(null,o.Validators.required),bankBranch:this.formBuilder.control(null,o.Validators.required),accountType:this.formBuilder.control(null,o.Validators.required),bankAccount:this.formBuilder.control(null,o.Validators.compose(Y(this.initialValidatorOfBankAccount))),digit:this.formBuilder.control(null,o.Validators.maxLength(3)),percentage:this.formBuilder.control(null,o.Validators.compose(Y(this.initialValidatorOfPercentage,[o.Validators.max(this.maxValuePercentage)]))),customFields:this.formBuilder.control(null)})},e.prototype.onSelectBank=function(){this.cleanBankInformation(),this.beforeSetBankAccountValidator()},e.prototype.onClearBank=function(){this.bankAccountFormGroup.get("bank").reset(),this.cleanBankInformation(),this.beforeSetBankAccountValidator()},e.prototype.cleanBankInformation=function(){ht(this.bankAccountFormGroup,["bankBranch"])},e.prototype.onClearBankBranch=function(){this.bankAccountFormGroup.get("bankBranch").reset(),this.beforeSetBankAccountValidator()},e.prototype.onClearAccountType=function(){this.bankAccountFormGroup.get("accountType").reset(),this.beforeSetBankAccountValidator()},Object.defineProperty(e.prototype,"visible",{get:function(){return this._visible},set:function(e){this._visible=e,this.visibleChange.emit(this.visible)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isEditAndViewValue",{set:function(e){this.resetForm(),this.visibleBtnSave=!0,e&&e.currentItem&&Object.keys(e.currentItem).length?(this.bankAccountFormGroup.patchValue(this.convertDTOToShowWithCustomFields(B({},e.currentItem))),this.labelBtnAdd="hcm.payroll.employees_update",this.setValidatorsAccordingList(e.listData,e.currentItem.index),this.isView||this.configEnableFields(e&&e.isEditMode)):this.labelBtnAdd="hcm.payroll.employees_add"},enumerable:!0,configurable:!0}),e.prototype.convertDTOToShowWithCustomFields=function(e){var t=B({},e);return t.customFields=st(t.customFields),t},e.prototype.configEnableFields=function(e){this.visibleBtnSave=e,ct(this.bankAccountFormGroup,e,["bank","bankBranch","accountType","bankAccount","digit","percentage","customFields"],[])},e.prototype.close=function(){this.resetForm(),this.visible=!1},e.prototype.addItem=function(){this.bankAccountFormGroup.updateValueAndValidity(),lt.call(this.bankAccountFormGroup),this.bankAccountFormGroup.valid&&(this.employeeId&&this.bankAccountFormGroup.get("employee").setValue({tableId:this.employeeId,name:""}),this.bankAccountItemToList.emit(this.bankAccountFormGroup.getRawValue()),this.visible=!1,this.resetForm())},e.prototype.resetForm=function(){this.bankAccountFormGroup.reset(),this.labelBtnAdd="hcm.payroll.employees_add",this.customFields&&this.customFields.formGroup&&this.customFields.formGroup.reset()},e.prototype.getBankTableId=function(){return this.bankAccountFormGroup.controls.bank.value?"'"+this.bankAccountFormGroup.controls.bank.value.tableId+"'":null},Object.defineProperty(e.prototype,"percentagePlaceholder",{get:function(){return"0"+(this.currency&&this.currency.decimalSeparator)+"00"},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"optionsPercentage",{get:function(){return B({},this.getOptions(),{precision:2})},enumerable:!0,configurable:!0}),e.prototype.getOptions=function(){return{prefix:"",thousands:this.currency.thousandsSeparator,decimal:this.currency.decimalSeparator}},Object.defineProperty(e.prototype,"getListBankAccount",{set:function(e){e?this.setValidatorsAccordingList(e):this.resetForm()},enumerable:!0,configurable:!0}),e.prototype.setValidatorsAccordingList=function(e,t){void 0===t&&(t=null),this.bankAccountList=e&&e.length?Y(e):[];var o=[];this.bankAccountList&&this.bankAccountList.length&&this.bankAccountList.filter((function(e,n){e.percentage&&n!=t&&o.push(e.percentage)})),this.beforeSetBankAccountValidator(),this.validatePercentageValid(o)},e.prototype.beforeSetBankAccountValidator=function(){var e=this.bankAccountFormGroup.get("bankAccount"),t=this.bankAccountFormGroup.get("accountType")&&this.bankAccountFormGroup.get("accountType").value&&this.bankAccountFormGroup.get("accountType").value.key,n=this.bankAccountFormGroup.get("bank")&&this.bankAccountFormGroup.get("bank").value&&this.bankAccountFormGroup.get("bank").value.tableId,r=this.bankAccountFormGroup.get("bankBranch")&&this.bankAccountFormGroup.get("bankBranch").value&&this.bankAccountFormGroup.get("bankBranch").value.tableId;n&&r&&t&&this.bankAccountList&&this.bankAccountList.length?(e.setValidators(o.Validators.compose(Y(this.initialValidatorOfBankAccount,[this.validateDuplicateBankAccount(this.bankAccountList,t,n,r)]))),e.updateValueAndValidity()):e.setValidators(o.Validators.compose(Y(this.initialValidatorOfBankAccount)))},e.prototype.validatePercentageValid=function(e){var t=this.bankAccountFormGroup.get("percentage");this.maxValuePercentage=e.reduce((function(e,t){return e-t}),100),t.setValidators(o.Validators.compose(Y(this.initialValidatorOfPercentage,[o.Validators.max(this.maxValuePercentage)]))),t.updateValueAndValidity()},Object.defineProperty(e.prototype,"isViewMode",{set:function(e){this.isView=!(!e||this.withSideBar),this.configEnableFields(!this.isView),this.isView||this.resetForm()},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:a.TranslateService},{type:o.FormBuilder},{type:i.ActivatedRoute},{type:t.ChangeDetectorRef}]},N([t.ViewChild(h.CustomFieldsComponent,{static:!0})],e.prototype,"customFields",void 0),N([t.Input()],e.prototype,"currency",void 0),N([t.Input()],e.prototype,"customEntity",void 0),N([t.Input()],e.prototype,"customService",void 0),N([t.Input()],e.prototype,"withSideBar",void 0),N([t.Input()],e.prototype,"isEditMode",void 0),N([t.Output()],e.prototype,"visibleChange",void 0),N([t.Output()],e.prototype,"bankAccountItemToList",void 0),N([t.Input()],e.prototype,"visible",null),N([t.Input()],e.prototype,"isEditAndViewValue",null),N([t.Input()],e.prototype,"getListBankAccount",null),N([t.Input()],e.prototype,"isViewMode",null),e=N([t.Component({selector:"bank-account",template:'<div id="main">\n <form [formGroup]="bankAccountFormGroup" autocomplete="off">\n <div class="ui-fluid">\n <div class="ui-g">\n \x3c!-- Banco --\x3e\n <div class="ui-md-6 ui-sm-12 required">\n <label>{{\'hcm.payroll.historical_bank_account_label_bank\' | translate}}</label>\n <input-rest-auto-complete [dropdown]="true" table="Bank"\n [order]="[\'BankCode\',\'BankNameI18n\']"\n [fields]="[\'BankCode\',\'BankNameI18n\']"\n placeholder="{{\'hcm.payroll.suggestions\' | translate}}"\n emptyMessage="{{\'hcm.payroll.not_suggestions\' | translate}}"\n keyCode="BankCode" keyName="BankNameI18n"\n itemSelect="bank" name="bank"\n [form]="bankAccountFormGroup"\n (onSelect)="onSelectBank()"\n (onClear)="onClearBank()"\n id="ta-bankName"></input-rest-auto-complete>\n <s-control-errors [control]="bankAccountFormGroup.get(\'bank\')"\n [errorMessages]="{ required: \'hcm.payroll.required\' | translate }">\n </s-control-errors>\n </div>\n \x3c!--Agência--\x3e\n <div class="ui-md-6 ui-sm-12 required">\n <label>{{\'hcm.payroll.historical_bank_account_label_bank_branch\'|translate}}</label>\n <input-rest-auto-complete [dropdown]="true" table="BankBranch"\n [order]="[\'BankBranchCode\']"\n [fields]="[\'BankBranchCode\',\'BankBranchNameI18n\']"\n placeholder="{{\'hcm.payroll.suggestions\' | translate}}"\n emptyMessage="{{\'hcm.payroll.not_suggestions\' | translate}}"\n keyCode="BankBranchCode" keyName="BankBranchNameI18n"\n itemSelect="bankBranch" name="bankBranch"\n [conditions]="[{ \'fields\': [\'BankBranchBank\'], \'expression\' : \'EQUAL\', \'value\': getBankTableId() }]"\n [form]="bankAccountFormGroup"\n (onSelect)="beforeSetBankAccountValidator()"\n (onClear)="onClearBankBranch()"\n id="ta-bankBranch">\n </input-rest-auto-complete>\n <s-control-errors [control]="bankAccountFormGroup.get(\'bankBranch\')"\n [errorMessages]="{ required: \'hcm.payroll.required\' | translate }">\n </s-control-errors>\n </div>\n \x3c!-- Tipo conta --\x3e\n <div class="ui-md-6 ui-sm-12 required">\n <label>{{\'hcm.payroll.employees_addition_account_type\'|translate}}</label>\n <input-rest-auto-complete-enum [dropdown]="true" server="payroll"\n enumeration="AccountType"\n placeholder="{{\'hcm.payroll.select\' | translate}}"\n name="accountType" [form]="bankAccountFormGroup"\n (onSelect)="beforeSetBankAccountValidator()"\n (onClear)="onClearBankBranch()"\n id="ta-accountType"></input-rest-auto-complete-enum>\n <s-control-errors [control]="bankAccountFormGroup.get(\'accountType\')"\n [errorMessages]="{ required: \'hcm.payroll.required\' | translate }">\n </s-control-errors>\n </div>\n \x3c!--Número conta--\x3e\n <div class="ui-md-6 ui-sm-12 required">\n <label>{{\'hcm.payroll.historical_bank_account_label_account_form\' |\n translate}}</label>\n <input pInputText id="ta-bankAccount" name="bankAccount" only-number\n formControlName="bankAccount"/>\n <s-control-errors [control]="bankAccountFormGroup.get(\'bankAccount\')"\n [errorMessages]="{\n required: \'hcm.payroll.required\' | translate,\n bankAccountDuplicate: \'hcm.payroll.historical_bank_account_label_bank_account_duplicate\' | translate,\n maxlength: \'hcm.payroll.error_max_length\' | translate: { value: \'12\' }\n }">\n </s-control-errors>\n </div>\n <div class="ui-md-6 ui-sm-12">\n <label>{{\'hcm.payroll.historical_bank_account_label_digit\'|translate}}</label>\n \x3c!--Dígito--\x3e\n <input pInputText id="ta-digit" name="digit" only-number formControlName="digit"/>\n <s-control-errors [control]="bankAccountFormGroup.get(\'digit\')"\n [errorMessages]="{ maxlength: \'hcm.payroll.error_max_length\' | translate: { value: \'3\' } }">\n </s-control-errors>\n </div>\n <div class="ui-md-6 ui-sm-12 required">\n <label id="lb-percentage"\n for="ff-percentage">{{ \'hcm.payroll.historical_bank_account_label_percentage\' | translate }}</label>\n <div class="ui-inputgroup">\n <span class="ui-inputgroup-addon">%</span>\n <input pInputText id="ff-percentage" name="percentage"\n formControlName="percentage"\n currencyMask\n [options]="optionsPercentage"\n [placeholder]="percentagePlaceholder"/>\n </div>\n <s-control-errors [control]="bankAccountFormGroup.get(\'percentage\')"\n [errorMessages]="{\n required: \'hcm.payroll.required\' | translate,\n maxlength: \'hcm.payroll.error_max_length\' | translate: { value: \'6\' },\n max: \'hcm.payroll.error_max_value_number\' | translate: { value: maxValuePercentage },\n min: \'hcm.payroll.error_min_value_number\' | translate: { value: \'0,01\' }\n }">\n </s-control-errors>\n </div>\n <div class="ui-g-12">\n <p-fieldset\n legend="{{ \'hcm.payroll.custom_fields\' | translate }}"\n [attr.data-hidden]="!customFields || !customFields.fields.length"\n >\n <s-custom-fields\n domain="hcm"\n service="{{customService}}"\n entity="{{customEntity}}"\n formControlName="customFields"\n [invalidErrorLabel]="\'hcm.payroll.employees_invalid_field\' | translate"\n >\n </s-custom-fields>\n </p-fieldset>\n </div>\n </div>\n </div>\n </form>\n\n <div [ngClass]="withSideBar ? \'footer\' : \'footer-s-border\'">\n <div class="form-group">\n <s-button id="btn-save" label="{{ labelBtnAdd | translate}}" priority="primary"\n (onClick)="addItem()" *ngIf="visibleBtnSave && !this.isView"></s-button>\n <s-button *ngIf="withSideBar" id="btn-close" label="{{\'hcm.payroll.cancel\'|translate}}" priority="secondary"\n priority="link" (onClick)="close()"></s-button>\n </div>\n </div>\n</div>\n',styles:[".refresh{width:100%!important}#table-annuity .col-default-s{width:10%}#table-annuity .col-default-m{width:12%}#table-annuity .col-default-l{width:16%}#table-annuity .col-action{width:10%}#table-annuity .icon-warning{text-align:center!important;color:#ff6d00c7!important}@media screen and (max-width:612px){#table-annuity .col-default-1,#table-annuity .col-default-2{width:16%}#table-annuity .col-default-3{width:26%}#table-annuity .col-icon{width:10%}#table-annuity .col-action{width:27%}}#main{display:-webkit-box;display:flex;height:100%;width:100%;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column}#main form{height:100%}#main .footer{border-top:1px solid #ccc;padding-top:15px;margin-top:15px;flex-shrink:0;margin-bottom:-18px}#main .footer-s-border{padding-left:7px;flex-shrink:0;margin-bottom:-18px}"]})],e)}(),Ao=function(){function o(e){this.http=e}return o.prototype.query=function(t,o,n){return void 0===n&&(n=e.ServiceType.PAYROLL),this.http.query(t,o,n)},o.ctorParameters=function(){return[{type:Ne}]},o=N([t.Injectable()],o)}(),Oo=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,v.HttpClientModule,E.AutoCompleteModule,ue,o.ReactiveFormsModule,b.TableModule,h.ButtonModule,g.TooltipModule,h.LoadingStateModule,h.SidebarModule,be,h.ControlErrorsModule,Et,O.CurrencyMaskModule,vt,d.InputTextModule,Se,L.FieldsetModule,h.CustomFieldsModule,R.PanelModule],declarations:[Mo,Po],providers:[Ao,I.ConfirmationService],exports:[Mo]})],e)}(),Lo=function(){function o(e,t){this.http=e,this.httpClient=t}return o.prototype.remove=function(t,o,n,r){return void 0===n&&(n=e.ServiceType.PAYROLL),n===e.ServiceType.DEPENDENT?this.httpClient.post("hcm/dependent/queries/historicalJudicialPensionBankAccountDelete",{dependentId:r,dateWhen:o}):this.http.post("actions/historicalEmployeeBankAccountDelete",{employeeId:t,dateWhen:o})},o.ctorParameters=function(){return[{type:Ne},{type:v.HttpClient}]},o=N([t.Injectable()],o)}(),Ro=y,xo=function(){function o(e,o,n,r,i,a,s){this.confirmationService=e,this.translateService=o,this.activatedRoute=n,this.cd=r,this.router=i,this.messageService=a,this.historicalBankAccountListService=s,this.endPoint="hcm/payroll/queries/historicalEmployeeBankAccountQuery",this.keyPayload="historicalEmployeeBankAccount",this.withSidebar=!0,this.enableView=new t.EventEmitter,this.ngUnsubscribe=new f.Subject,this.loading=!0,this.columns=[{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_date_when"),field:"dateWhen"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_bank"),field:"bank.name"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_bank_branch"),field:"bankBranch.name"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_account"),field:"bankAccount"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_percentage"),field:"percentage"},{label:this.translateService.instant("hcm.payroll.historical_bank_account_label_qtd_account"),field:"numberOfBankAccount"}]}return o.prototype.ngOnInit=function(){this.initParameters={employeeId:this.employeeId,dependentId:this.dependentId}},o.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()},o.prototype.ngAfterViewInit=function(){this.cd.detectChanges()},o.prototype.onLazyLoad=function(e){var t=this;e.forEach((function(e){e.dateWhen=Ro(e.dateWhen).format(t.dateFormat)})),this.onGridLoad(e),this.loading=!1},o.prototype.getMenuActions=function(e){var t=this;return[{label:this.translateService.instant("hcm.payroll.employees_image_cropper_view"),command:function(){var o=e&&e.dateWhen&&Ro(e.dateWhen,t.dateFormat).format("YYYY-MM-DD");t.withSidebar?t.router.navigate(["historical-bank-account/"+o],{relativeTo:t.activatedRoute}):t.enableView.emit(o)}},{label:this.translateService.instant("hcm.payroll.delete"),command:function(){t.isAllowToDeleteHistorical&&e?t.delete(e.id,e.dateWhen):t.messageService.add({severity:"error",summary:t.translateService.instant("hcm.payroll.error"),detail:t.translateService.instant("hcm.payroll.permission_error_not_allowed")})}}]},o.prototype.delete=function(t,o){var n=this;if(t===this.lastRecord.id){var r=Ro(o,this.dateFormat).format("YYYY-MM-DD");this.confirmationService.confirm({message:this.translateService.instant("hcm.payroll.employees_movimentation_historical_bank_account_question_confirm_delete")+"?",accept:function(){n.loading=!0;var t=n.withSidebar?e.ServiceType.PAYROLL:e.ServiceType.DEPENDENT;n.historicalBankAccountListService.remove(n.employeeId,r,t,n.dependentId).pipe(s.takeUntil(n.ngUnsubscribe)).subscribe((function(){n.messageService.add({severity:"success",summary:n.translateService.instant("hcm.payroll.success"),detail:n.translateService.instant("hcm.payroll.employees_movimentation_historical_bank_account_remove")}),n.parameters=n.parameters&&B({},n.parameters)||{}}),(function(){n.messageService.add({severity:"error",summary:n.translateService.instant("hcm.payroll.error"),detail:n.translateService.instant("hcm.payroll.employees_movimentation_historical_bank_account_error_remove")}),n.loading=!1}))}})}else this.messageService.add({severity:"error",summary:this.translateService.instant("hcm.payroll.error"),detail:this.translateService.instant("hcm.payroll.not_allowed_delete_last")})},o.prototype.add=function(){this.isAllowToAddHistorical?this.router.navigate(["historical-irrf-new"],{relativeTo:this.activatedRoute}):this.messageService.add({severity:"error",summary:this.translateService.instant("hcm.payroll.error"),detail:this.translateService.instant("hcm.payroll.permission_error_not_allowed")})},o.prototype.onGridLoad=function(e){e&&e.length&&(this.lastRecord=e[0])},Object.defineProperty(o.prototype,"isAllowToAddHistorical",{get:function(){return this.permission.incluir},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isAllowToDeleteHistorical",{get:function(){return this.permission.excluir},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"scopedActions",{get:function(){return this.getMenuActions.bind(this)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"reloadList",{set:function(e){e&&(this.loading=!0,this.parameters=this.parameters&&B({},this.parameters)||{})},enumerable:!0,configurable:!0}),o.ctorParameters=function(){return[{type:I.ConfirmationService},{type:a.TranslateService},{type:i.ActivatedRoute},{type:t.ChangeDetectorRef},{type:i.Router},{type:I.MessageService},{type:Lo}]},N([t.ViewChild(h.CustomFieldsComponent,{static:!1})],o.prototype,"customFields",void 0),N([t.Input()],o.prototype,"permission",void 0),N([t.Input()],o.prototype,"employeeId",void 0),N([t.Input()],o.prototype,"dependentId",void 0),N([t.Input()],o.prototype,"dateFormat",void 0),N([t.Input()],o.prototype,"endPoint",void 0),N([t.Input()],o.prototype,"keyPayload",void 0),N([t.Input()],o.prototype,"withSidebar",void 0),N([t.Output()],o.prototype,"enableView",void 0),N([t.Input()],o.prototype,"reloadList",null),o=N([t.Component({selector:"c-historical-bank-account-list",template:'<div class="ui-g">\n <div class="ui-g-12">\n <c-data-list-rest\n id="ta-irrf"\n [columns]="columns"\n actionLabel="{{ \'hcm.payroll.movimentation_generic_action\' | translate }}"\n emptyMessage="{{ \'hcm.payroll.admission_empty_message\' | translate }}"\n [endpoint]="endPoint"\n singularMessageRecords="{{\n \'hcm.payroll.admission_register\' | translate\n }}"\n [actions]="scopedActions"\n pluralMessageRecords="{{\n \'hcm.payroll.admission_registers\' | translate\n }}"\n [keyPayload]="keyPayload"\n [lazy]="true"\n (lazyLoad)="onLazyLoad($event)"\n [(loading)]="loading"\n [initParameters]="initParameters"\n [parameters]="parameters"\n [isSortable]="false"\n ></c-data-list-rest>\n </div>\n</div>\n\n',styles:[""]})],o)}(),Bo=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,o.FormsModule,v.HttpClientModule,E.AutoCompleteModule,ue,o.ReactiveFormsModule,b.TableModule,h.ButtonModule,g.TooltipModule,h.LoadingStateModule,Ce,x.ConfirmDialogModule],declarations:[xo],providers:[Lo],exports:[xo]})],e)}(),No=function(){function t(e){this.field=e.field,this.value=e.value,this.operation=e.operation}return Object.defineProperty(t.prototype,"field",{get:function(){return this._field},set:function(e){this._field=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"operation",{get:function(){return this._operation},set:function(e){this._operation=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(e){this._value=e},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return this.operation===e.Operators.CONTAINING?this.operation+"(lower("+this.field+"), lower("+this.value+"))":this.field+" "+(this.operation||"")+" "+this.value},t}(),jo=y,qo=jo("31/12/1900","DD/MM/YYYY"),Vo=jo("04/06/2080","DD/MM/YYYY"),Uo=function(){function t(){}return t.isValidDate=function(e,t){return function(o){var n=!t||!t.hasOwnProperty("useG5DateRange")||t.useG5DateRange,r=ft(o.value);if(e=ft(e),r&&e&&r.length===e.length&&!o.value.includes("_")){var i=jo(r,e),a=i.isValid(),s=!n||i.isBetween(qo,Vo,null,"[]");return a&&s?null:{invalidDate:!0}}return null}},t.isDateLower=function(t,o,n){void 0===n&&(n="day");var r={compareName:"lowerDate",granularity:n};return this.isValidDateCompare(t,o,e.CompareType.isBefore,r)},t.isValidDateCompare=function(e,t,o,n){var r=this;return function(i){var a=ft(i.value);if(t=ft(t),a&&t&&a.length===t.length&&!i.value.includes("_")){var s=jo(a,t),l=jo(e,t);return r.dateCompare(s,l,o,n)}return null}},t.getDateFormatFromLocale=function(e,t){var o=e&&e.dateFormat;if(o){var n=o.replace(/[y]/g,"YY").replace(/[^a-zA-Z]/g,"").toUpperCase();return t&&(n=n.replace("DD","")),n}return null},t.getDateTimeFormatFromLocale=function(e){if(e){var t=e.dateFormat.toString();return t=t.replace(/[y]/g,"YY").toUpperCase(),t+=" HH:mm:ss"}return null},t.getDateFormatFromCalendar=function(e){if(e&&e.dateFormat){var t=e.dateFormat.toString();return t=t.replace(/[y]/g,"YY").toUpperCase()}return null},t.dateCompare=function(t,o,n,r){var i=n===e.CompareType.isNotSame?e.CompareType.isSame:n,a=r&&r.granularity?r.granularity:"day",s=t[i](o,a);if(s=n===e.CompareType.isNotSame?!s:s){var l={};return l[r&&r.compareName?r.compareName:n]=!0,l}return null},t.getFormatDateWithBar=function(e){if(e&&e.dateFormat){var t=e.dateFormat.toString();return t=t.replace("dd","DD").replace("mm","MM").replace("yy","YYYY")}return null},t}(),Yo=function(){function e(){this._processVariables={},this._workflowPayload={},this.processInstanceId=new f.BehaviorSubject(null),this.resetActions()}return e.prototype.init=function(){var e=this;this.workflowCockpit=workflowCockpit({init:function(t,o){return j(e,void 0,void 0,(function(){var e,n,r;return q(this,(function(i){switch(i.label){case 0:return this._isRequestNew=o&&o.isRequestNew(),e=this,(n=o)?[4,o.getTaskData()]:[3,2];case 1:n=i.sent(),i.label=2;case 2:return e._taskData=n,this._isRequestNew?[3,4]:[4,o.getInfoFromProcessVariables()];case 3:r=i.sent(),this.addProcessVariable("processVariablesFromWorkflow",r),i.label=4;case 4:return this.processInstanceId.next(t.processInstanceId),[4,this._onLoadWorkflow(t,o)];case 5:return[2,i.sent()]}}))}))},onSubmit:function(t,o){return j(e,void 0,void 0,(function(){var e,n;return q(this,(function(r){switch(r.label){case 0:return e=this,(n=t)?[4,t.nextAction]:[3,2];case 1:n=r.sent(),r.label=2;case 2:return e._nextAction=n,this._isFinishing=this._nextAction.finish,this._nextActionName=this._nextAction.name,[4,this._onSubmitWorkflow(t,o)];case 3:return r.sent(),[2,this._workflowPayload]}}))}))},onError:function(t,o){return j(e,void 0,void 0,(function(){return q(this,(function(e){switch(e.label){case 0:return[4,this._onRollbackWorkflow(t,o)];case 1:return e.sent(),[2]}}))}))}})},e.prototype._onLoadWorkflow=function(e,t){return j(this,void 0,void 0,(function(){return q(this,(function(e){switch(e.label){case 0:return[4,this._runActions(this.onLoadActions)];case 1:return[2,e.sent()]}}))}))},e.prototype._onSubmitWorkflow=function(e,t){return j(this,void 0,void 0,(function(){return q(this,(function(e){switch(e.label){case 0:return[4,this._runActions(this.onSubmitActions)];case 1:return[2,e.sent()]}}))}))},e.prototype._onRollbackWorkflow=function(e,t){return j(this,void 0,void 0,(function(){return q(this,(function(e){switch(e.label){case 0:return[4,this._runActions(this.onRollbackActions)];case 1:return[2,e.sent()]}}))}))},e.prototype.resetActions=function(){this.onLoadActions={},this.onSubmitActions={},this.onRollbackActions={}},e.prototype._runActions=function(e){return j(this,void 0,void 0,(function(){var t,o=this;return q(this,(function(n){switch(n.label){case 0:return t={},[4,Promise.all(Object.entries(e).map((function(e){var n=U(e,2),r=n[0],i=n[1];return j(o,void 0,void 0,(function(){var e,o,n;return q(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),e=t,o=r,[4,i()];case 1:return e[o]=a.sent(),[2];case 2:throw n=a.sent(),Error(n);case 3:return[2]}}))}))})))];case 1:return n.sent(),[2,t]}}))}))},e.prototype.addOnLoadAction=function(e,t){this.onLoadActions[e]=t},e.prototype.addOnSubmitAction=function(e,t){this.onSubmitActions[e]=t},e.prototype.addOnRollbackAction=function(e,t){this.onRollbackActions[e]=t},e.prototype.addProcessVariable=function(e,t){try{this._processVariables[e]=t}catch(t){throw{erro:t,message:"Não foi possível adicionar a variável "+e+" às variáveis do processo."}}},e.prototype.setWorkflowPayload=function(e){this._workflowPayload=e},Object.defineProperty(e.prototype,"loadActions",{get:function(){return this.onLoadActions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"submitActions",{get:function(){return this.onSubmitActions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rollbackActions",{get:function(){return this.onRollbackActions},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isRequestNew",{get:function(){return this._isRequestNew},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isFinishing",{get:function(){return this._isFinishing},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nextActionName",{get:function(){return this._nextActionName},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"taskData",{get:function(){return this._taskData},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"processVariables",{get:function(){var e=this;return new Promise((function(t,o){e._processVariables?t(e._processVariables):o("Não foram encontradas variáveis para o processo")})).then((function(t){e._processVariables=t})).catch((function(e){throw e})),this._processVariables},enumerable:!0,configurable:!0}),e=N([t.Injectable()],e)}(),Go=function(){function e(e,t,o){this.router=e,this.activatedRoute=t,this.workflowDataService=o,this.ngUnsubscribe=new f.Subject}return e.prototype.ngOnInit=function(){this.registerSubscribers()},e.prototype.registerSubscribers=function(){var e=this;this.activatedRoute.data.pipe(s.takeUntil(this.ngUnsubscribe)).subscribe((function(t){e.useWorkflow=!(!t||!t.useWorkflow),e.routeEndpoint=t&&t.routeEndpoint,e.useWorkflow&&e.workflowDataService.setUseWorkflow(e.useWorkflow)}))},e.prototype.onSelectEmployee=function(){var e=this.employeeSelected.tableId;e&&this.navigate(e)},e.prototype.navigate=function(e){this.router.navigate(["workflow/"+e+"/"+this._routeEndpoint])},e.prototype.ngOnDestroy=function(){this.ngUnsubscribe.next(!0),this.ngUnsubscribe.complete()},Object.defineProperty(e.prototype,"useWorkflow",{get:function(){return this._useWorkflow},set:function(e){this._useWorkflow=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"routeEndpoint",{get:function(){return this._routeEndpoint},set:function(e){this._routeEndpoint=e},enumerable:!0,configurable:!0}),e.ctorParameters=function(){return[{type:i.Router},{type:i.ActivatedRoute},{type:lo}]},e=N([t.Component({selector:"lib-employee-selector",template:'<p-panel header="{{ \'hcm.payroll.employee_selector_panel_header\' | translate }}">\n <div class="ui-g ui-fluid">\n <div class="ui-md-6 ui-g-6">\n <label for="ff-employee" id="lb-employee">{{\n "hcm.payroll.employee" | translate\n }}</label>\n <input-rest-auto-complete-employee-model\n id="ff-employee"\n [dropdown]="true"\n placeholder="{{\n \'hcm.payroll.employees_company_placeholder\' | translate\n }}"\n name="employee"\n emptyMessage="{{ \'hcm.payroll.not_suggestions\'|translate }}"\n [(model)]="employeeSelected"\n (onSelect)="onSelectEmployee()"\n >\n </input-rest-auto-complete-employee-model>\n </div>\n </div>\n</p-panel>\n',styles:[""]})],e)}(),Ho=function(){function e(){}return e=N([t.NgModule({imports:[ue,R.PanelModule,Ct],declarations:[Go],exports:[Go]})],e)}(),Wo=function(){function e(){}return N([t.Input()],e.prototype,"divergentFormData",void 0),e=N([t.Component({selector:"from-to",template:'<div id="from-to" class="ui-g ui-fluid" *ngIf="divergentFormData">\n <div class="ui-g-12">\n \x3c!-- Painel Collapsable --\x3e\n <p-panel\n class="ui-g-12 ui-fluid form-group"\n header="{{ \'hcm.payroll.disagreements\' | translate }}"\n [toggleable]="true"\n [collapsed]="false"\n >\n <section id="from-to-content" class="ui-g ui-fluid form-group">\n \x3c!-- INICIO DE SEÇÃO: DE (ANTES): --\x3e\n <p-panel class="ui-g-6 ui-fluid form-group" header="{{ \'hcm.payroll.from\' | translate }}">\n <section id="from-content" class="ui-g ui-fluid">\n <ng-container *ngFor="let divergence of divergentFormData">\n <div class="ui-g-6">\n <label for="{{divergence.key}}-from">{{ divergence.key }}</label>\n <input\n pInputText\n type="text"\n name="{{divergence.key}}-from"\n id="{{divergence.key}}-from"\n value="{{ divergence.oldValue }}"\n />\n\n </div>\n </ng-container>\n </section>\n </p-panel>\n \x3c!-- FINAL DE SEÇÃO: DE (ANTES): --\x3e\n\n \x3c!-- INICIO DE SEÇÃO: PARA (DEPOIS): --\x3e\n <p-panel class="ui-g-6 ui-fluid form-group" header="{{ \'hcm.payroll.to\' | translate }}">\n <section id="to-content" class="ui-g ui-fluid">\n <ng-container *ngFor="let divergence of divergentFormData">\n <div class="ui-g-6">\n <label for="{{divergence.key}}-to">{{ divergence.key }}</label>\n <input\n pInputText\n type="text"\n name="{{divergence.key}}-to"\n id="{{divergence.key}}-to"\n value="{{ divergence.newValue }}"\n />\n </div>\n </ng-container>\n </section>\n </p-panel>\n \x3c!-- FINAL DE SEÇÃO: PARA (DEPOIS): --\x3e\n </section>\n </p-panel>\n </div>\n</div>\n'})],e)}(),zo=function(){function e(){}return e=N([t.NgModule({imports:[p.CommonModule,R.PanelModule,a.TranslateModule,o.ReactiveFormsModule,d.InputTextModule],declarations:[Wo],exports:[Wo]})],e)}();e.AdmissionDraftSummaryComponent=Pe,e.AdmissionDraftSummaryModule=Ae,e.AdmissionDraftSummaryService=Me,e.AutocompleteParametersService=eo,e.BlockUiComponent=le,e.BlockUiModule=pe,e.BreadcrumbComponent=ce,e.BreadcrumbSDSModule=de,e.CNPJValidator=re,e.CPFValidator=oe,e.CompanyIndicationsService=Qt,e.ControlMessagesErrorComponent=me,e.ControlMessagesErrorModule=he,e.CoreDirectives=Se,e.CustomFieldsComponent=ye,e.CustomFieldsModule=ve,e.DataListModule=go,e.DataListRestModule=Ce,e.DateValidator=Uo,e.EmployeeSelectorComponent=Go,e.EmployeeSelectorModule=Ho,e.EmployeeSummaryComponent=Ee,e.EmployeeSummaryModule=Fe,e.EmployeeSummaryService=De,e.EntityODataParameter=No,e.ErrorPageComponent=Oe,e.ErrorPageModule=Le,e.FieldValidatorComponent=Re,e.FieldValidatorModule=xe,e.FileUploadComponent=qe,e.FileUploadCoreModule=Ve,e.FormComparatorService=po,e.FromToComponent=Wo,e.FromToModule=zo,e.HistoricalBankAccountComponent=Mo,e.HistoricalBankAccountListComponent=xo,e.HistoricalBankAccountListModule=Bo,e.HistoricalBankAccountListService=Lo,e.HistoricalBankAccountModule=Oo,e.HistoricalBankAccountService=Ao,e.HttpClientService=Ne,e.ImageCropComponent=Ye,e.ImageCropModule=Ge,e.ImageCropService=Ue,e.InputDateComponent=ge,e.InputDateModelComponent=We,e.InputDateModelModule=ze,e.InputDateModule=be,e.InputRestAutoCompleteComponent=bt,e.InputRestAutoCompleteEmployeeModelModule=Ct,e.InputRestAutoCompleteEmployeeModelService=_t,e.InputRestAutoCompleteEmployeeModule=St,e.InputRestAutoCompleteEmployeeService=It,e.InputRestAutoCompleteEnumComponent=Tt,e.InputRestAutoCompleteEnumModule=Et,e.InputRestAutoCompleteEnumService=Dt,e.InputRestAutoCompleteJobpositionComponent=xt,e.InputRestAutoCompleteJobpositionModule=Bt,e.InputRestAutoCompleteJobpositionService=Rt,e.InputRestAutoCompleteModelEnumModule=Lt,e.InputRestAutoCompleteModelEnumService=At,e.InputRestAutoCompleteModelModule=Pt,e.InputRestAutoCompleteModelService=Ft,e.InputRestAutoCompleteModule=vt,e.InputRestAutoCompleteService=gt,e.IntegrationService=Kt,e.ListRestComponent=jt,e.ListRestModule=qt,e.LookupModule=ko,e.LookupParametersService=Xt,e.NameNotSpacesDirective=Ie,e.OnlyNumberDirective=ke,e.PermissionService=uo,e.ReportService=so,e.ServicesModule=co,e.SpinnerLoaderComponent=Vt,e.SpinnerLoaderModule=Ut,e.StringMethods=ae,e.ToastComponent=mo,e.ToastModule=ho,e.ToastService=Be,e.TypeAdmissionModule=Gt,e.TypeAdmissionServices=Yt,e.WorkflowDataService=lo,e.WorkflowIntegrator=Yo,e.WorkstationgroupLookupDto=Do,e.WorkstationgroupLookupModule=Fo,e._moment=it,e.assign=function e(t){for(var o=[],n=1;n<arguments.length;n++)o[n-1]=arguments[n];if(!o.length)return t;var r=o.shift();if(Qe(t)&&Qe(r)){var i=function(o){var n,i,a,s;Qe(r[o])?(t[o]||Object.assign(t,((n={})[o]={},n)),e(t[o],r[o])):Ke(r[o])?Object.assign(t,((i={})[o]=r[o],i)):(t[o]||Object.assign(t,((a={})[o]=[],a)),Object.assign(t,((s={})[o]=r[o].map((function(n,r){return e(t[o][r]||{},n)})),s)))};for(var a in r)i(a)}return e.apply(void 0,Y([t],o))},e.autoCompleteObjectForIdObject=function(e){return Qe(e)?(e.hasOwnProperty("tableId")&&console.error("Paramentro não é um objeto Auto Complete válido, falta tableId"),Je(e.tableId)||console.error("tableId esta vazio"),{id:e.tableId}):(console.error("Paramentro não é um objeto"),!1)},e.clearValues=ht,e.cnpjValidator=ie,e.compareValues=mt,e.configEnabledFields=ct,e.containsMoreThanOneConsecutiveAbbreviation=function(e){return!/(\b.\s)(.\s)(.\b)\1?/g.test(e)},e.containsMoreThanOneConsecutiveBlankSpace=function(e){return!/(\w[ ]{2,}\w)/.test(e)},e.containsMoreThanTwoRepeatedCharacters=function(e){return!/([a-zA-Z])\1{2}/g.test(e)},e.containsSpecialCharacters=function(e){return!/[[\]!@#$%&*_+=`´{}^~<>.,:;?|()\/\\-]/.test(e)},e.convertBooleanString=function(e){return"boolean"==typeof e?!0===e?"true":"false":e},e.convertStringToBoolean=function(e){return!0===e||"true"===e.toLowerCase()},e.cpfValidator=ne,e.firstNameIsValid=function(e){var t=e.split(" ");return t.length>=2&&t[1].length>=1},e.firstNameLengthIsValid=function(e){var t=e.split(" ");return!(t[0].trim().length>0)||t[0].trim().length>=2},e.formatMoney=function(e,t){switch(void 0===t&&(t="EN"),t){case"EN":return Je(e)?e.toString().replace(".","").replace(",","."):"";case"BR":return Je(e)?e.toString().replace(".",",").replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1."):"";default:return Je(e)?e.toString().replace(".","").replace(",","."):""}},e.fullNameLengthIsValid=function(e){return e.length<=70},e.getAddWeekDaysBusiness=function(e,t){return T.addWeekDays(rt(e),t).format("DD/MM/YYYY")},e.getFormat=yt,e.getFormatDate=ot,e.getMoment=rt,e.getNowDate=nt,e.getObjValids=function(e){var t=Object.assign({},e),o={};return Object.keys(t).map((function(e){Je(t[e])&&(o[e]=et(e,t[e]))})),o},e.getQueryParams=function(e){e=e.split("+").join(" ");for(var t,o={},n=/[?&]?([^=]+)=([^&]*)/g;t=n.exec(e);)o[decodeURIComponent(t[1])]=decodeURIComponent(t[2]);return o},e.getWeekDaysBusiness=function(e,t){var o=t?rt(t):rt(e).endOf("month");return T.weekDays(rt(e),o)},e.getYears=function(e){return $e().diff(e,"years",!1)},e.invertFieldDate=tt,e.isBirthDayValid=function(e,t){if(e&&t)return t.isSameOrAfter(e)},e.isDateCompare=function(e,t,o){return!(e&&e.isValid()&&t&&o)||e[o](t)},e.isDateExpirationBeforeExpeditionDate=function(e,t){if(e&&t)return t.isSameOrAfter(e)},e.isDateField=et,e.isDateSameOrAfterCurrentDate=function(e){if(e){var t=Ht();return e.isSameOrAfter(t)}},e.isFullDate=Ze,e.isMax=function(e,t){return e.length<=t},e.isNumber=Wt,e.isObject=Qe,e.isRequired=function(e){return null!=e&&e.length>0},e.isShallow=Ke,e.isValid=Je,e.isValidDate=Xe,e.isValidPIS=function(e){var t=0,o=0,n=e.replace(/[^\d]+/g,"");if(11!==n.length||"00000000000"===n||"11111111111"===n||"22222222222"===n||"33333333333"===n||"44444444444"===n||"55555555555"===n||"66666666666"===n||"77777777777"===n||"88888888888"===n||"99999999999"===n)return!1;for(var r=0;r<10;r++)t+=parseInt(n.substring(r,r+1))*parseInt("3298765432".substring(r,r+1));return(o=10===(o=11-t%11)||11===o?0:o)===parseInt(""+n.charAt(10))},e.mountCustomForSave=function(e,t,o){void 0===t&&(t=null),void 0===o&&(o=null);var n=[];return t&&e.length&&t.map((function(t,r){var i=Object.keys(e[r]).toString(),a=Je(e[r][i])?e[r][i]:null,s="date"===t.type&&o&&Je(a)?$e(a,yt(o)).format("YYYY-MM-DD"):a;n.push({field:i,value:s})})),n.length?n:null},e.mountCustomForShow=function(e){var t=[];return Object.keys(e||{}).forEach((function(o){"date"===e[o].type&&e[o].value&&(e[o].value=it(e[o].value).format("L")),t.push(e[o])})),t},e.mountCustomToSave=at,e.mountCustomToShow=st,e.mountGeneratedCustomToSave=function(e){return Object.entries(e).forEach((function(t){var o=U(t,2),n=o[0];o[1]||delete e[n]})),e},e.ngCalendarFormat=function(e,t){if(void 0===t&&(t="DD/MM/YYYY"),Xe(e))return"string"==typeof e?e:it(e).format(t)},e.notEmpty=zt,e.numberOrZero=$t,e.removeCharacteresSpecials=ft,e.removeEmpty=function e(t){return Object.keys(t).forEach((function(o){return t[o]&&"object"==typeof t[o]&&e(t[o])||!t[o]&&void 0!==t[o]&&delete t[o]})),t},e.removeWhiteSpaces=function(e){return e&&String(e)?String(e).replace(/\s/g,""):String(e)},e.setCustonFields=function(e){var t=this;return e.map((function(e){var n={},r=e.value||null;"boolean"==typeof r&&(r=r?"true":"false"),n[e.field]=new o.FormControl(r),t.push(new o.FormGroup(n))})),e},e.setDisableField=dt,e.setErrors=function(e,t,o){var n=this;setTimeout((function(){var r;o?((r=Object.assign({},n.get(e).errors))[t]=o,n.get(e).setErrors(r)):(r=n.get(e).errors)&&Object.keys(r).length&&(delete r[t],Object.keys(r).length||n.get(e).setErrors(null))}),0)},e.setRequired=pt,e.setRequiredFields=function(e,t,n){t?n.forEach((function(t){return pt(e,t,!0,[o.Validators.required])})):n.forEach((function(t){return pt(e,t,!1)}))},e.setValidator=ut,e.setValidatorsAndDisableFields=function(e,t){t.forEach((function(t){ut(e,t.field,t.validators),dt(e,t.disabled,t.field,t.clearValue)}))},e.setValueCustom=function(e,t){var o=t?Object.keys(t).length:0;return e.map((function(e){e.value=o>0?t[e.field]:null})),e},e.stringMethods=se,e.sun=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduce((function(e,t){return $t(t)+e}),0)},e.uiid=function(){return(new D).guid().replace(/[^a-zA-Z0-9.]/g,"").toUpperCase()},e.validateBirthDate=function(e,t){if(e&&t){var o=Ht("string"==typeof e?e.replace(/[^\d]+/g,""):e,"DDMMYYYY").format("YYYY-MM-DD").toString(),n=Ht(t.replace(/[^\d]+/g,""),"DDMMYYYY").format("YYYY-MM-DD").toString();return Ht(n).isSameOrAfter(o)}},e.verifyValidationsForm=lt,e.ɵa=ue,e.ɵb=we,e.ɵc=_e,e.ɵd=je,e.ɵe=kt,e.ɵf=wt,e.ɵg=Mt,e.ɵh=Ot,e.ɵi=Nt,e.ɵj=fo,e.ɵk=yo,e.ɵl=Io,e.ɵm=bo,e.ɵn=Eo,e.ɵo=_o,e.ɵp=Co,e.ɵq=Po,Object.defineProperty(e,"__esModule",{value:!0})}));
2
2
  //# sourceMappingURL=senior-gestao-pessoas-payroll-core.umd.min.js.map