@main-class/componentes 1.18.3 → 1.18.6

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.
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@angular/material/dialog"),require("@ngx-translate/core"),require("@angular/animations"),require("rxjs/index"),require("rxjs/internal/operators"),require("rxjs"),require("@angular/forms"),require("@angular/material/icon"),require("@angular/material/button"),require("@angular/material/progress-spinner"),require("@angular/flex-layout"),require("jsencrypt"),require("@angular/platform-browser"),require("rxjs/operators"),require("@angular/material/snack-bar"),require("@angular/cdk/layout"),require("ng2-pdf-viewer"),require("@jmcrommen/ngx-image-viewer"),require("@angular/material/table"),require("@angular/material/paginator"),require("@angular/material/form-field"),require("@angular/material/select"),require("@angular/material/tooltip"),require("@angular/material/core"),require("@angular/cdk/coercion"),require("@angular/material/input"),require("@mat-datetimepicker/core"),require("@mat-datetimepicker/moment"),require("moment"),require("@angular/material/datepicker"),require("@angular/material/chips"),require("@angular/material/checkbox"),require("@angular/material/autocomplete"),require("@angular/material/radio"),require("lac-mat-tel-input"),require("lodash-es")):"function"==typeof define&&define.amd?define("@main-class/componentes",["exports","@angular/core","@angular/common","@angular/material/dialog","@ngx-translate/core","@angular/animations","rxjs/index","rxjs/internal/operators","rxjs","@angular/forms","@angular/material/icon","@angular/material/button","@angular/material/progress-spinner","@angular/flex-layout","jsencrypt","@angular/platform-browser","rxjs/operators","@angular/material/snack-bar","@angular/cdk/layout","ng2-pdf-viewer","@jmcrommen/ngx-image-viewer","@angular/material/table","@angular/material/paginator","@angular/material/form-field","@angular/material/select","@angular/material/tooltip","@angular/material/core","@angular/cdk/coercion","@angular/material/input","@mat-datetimepicker/core","@mat-datetimepicker/moment","moment","@angular/material/datepicker","@angular/material/chips","@angular/material/checkbox","@angular/material/autocomplete","@angular/material/radio","lac-mat-tel-input","lodash-es"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self)["main-class"]=e["main-class"]||{},e["main-class"].componentes={}),e.ng.core,e.ng.common,e.ng.material.dialog,e.i3,e.ng.animations,e.rxjs.index,e.rxjs["internal/operators"],e.rxjs,e.ng.forms,e.ng.material.icon,e.ng.material.button,e.ng.material.progressSpinner,e.ng.flexLayout,e.JSEncrypt,e.ng.platformBrowser,e.rxjs.operators,e.ng.material.snackBar,e.ng.cdk.layout,e.ng2PdfViewer,e.ngxImageViewer,e.ng.material.table,e.ng.material.paginator,e.ng.material.formField,e.ng.material.select,e.ng.material.tooltip,e.ng.material.core,e.ng.cdk.coercion,e.ng.material.input,e.core$1,e.moment$2,e.moment$1,e.ng.material.datepicker,e.ng.material.chips,e.ng.material.checkbox,e.ng.material.autocomplete,e.ng.material.radio,e.lacMatTelInput,e.lodashEs)}(this,(function(e,t,n,r,o,i,a,s,l,u,c,p,d,h,m,f,g,y,v,b,C,x,M,w,I,P,D,O,k,S,j,V,A,T,E,_,F,L,$){"use strict";function q(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function N(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var B=q(m),R=N(V),z=function(e,t){return(z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function H(e,t){function n(){this.constructor=e}z(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function G(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?o(e.value):new n((function(t){t(e.value)})).then(a,s)}l((r=r.apply(e,t||[])).next())}))}function U(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[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(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function Y(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function Q(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function W(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Q(arguments[t]));return e}var J=function(){function e(e){this.parent=e,this.$shown=!1,this.labelLoading="Aguarde...",this.showOnInit=!1}return e.prototype.ngOnInit=function(){this.$shown=this.showOnInit},Object.defineProperty(e.prototype,"shown",{get:function(){return this.$shown},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"component",{get:function(){return this.$component},set:function(e){this.$component!==e&&("boolean"==typeof this.$component?this.parent&&this.$component&&this.parent.nativeElement.parentElement.classList.remove("component-loading"):this.$component&&this.$component.classList.remove("component-loading"),"boolean"==typeof e?this.parent&&e&&this.parent.nativeElement.parentElement.classList.add("component-loading"):e&&e.classList.add("component-loading"),this.$component=e)},enumerable:!1,configurable:!0}),e.prototype.listen=function(e){var t=this;return this.buscando&&this.buscando.unsubscribe(),new a.Observable((function(n){return t.show(),t.buscando=a.from(e).pipe(s.delay(300)).subscribe((function(e){t.buscando&&(t.hide(),t.buscando=void 0),n.next(e)}),(function(e){t.buscando&&(t.hide(),t.buscando=void 0),n.error(e)}),(function(){return n.complete()})),function(){t.buscando&&(t.buscando.unsubscribe(),t.hide(),t.buscando=void 0)}}))},Object.defineProperty(e.prototype,"visibility",{get:function(){return this.$shown?"shown":"hidden"},enumerable:!1,configurable:!0}),e.prototype.show=function(){this.$shown=!0},e.prototype.hide=function(){this.$shown=!1},e}();J.decorators=[{type:t.Component,args:[{selector:"mcl-loader",template:'<div #loader class="preloader" [ngClass]="{\'preloader-component\':component}" [@visibility]="visibility">\n <div class="cssload-speeding-wheel"></div>\n <p class="preloader-text">{{\'mcl.loader.aguarde\' | translate}}</p>\n</div>\n',animations:[i.trigger("visibility",[i.state("shown",i.style({opacity:.75,display:"block"})),i.state("hidden",i.style({opacity:0,display:"none"})),i.transition("* => *",i.animate(".3s"))])],exportAs:"loader",styles:[".preloader{left:0;bottom:0;top:0;right:0;opacity:1;width:100%;height:100%;background:hsla(0,0%,100%,.8)}.preloader:not(.preloader-component){position:fixed;z-index:99999}.preloader.preloader-component{position:absolute;z-index:99999}.preloader .cssload-speeding-wheel{position:absolute;top:calc(50% - 25px);left:calc(50% - 15px);width:30px;height:30px;margin:0 auto;border-radius:50%;border-color:currentcolor transparent;border-style:solid;border-width:2px;animation:cssload-spin 425ms linear infinite;-o-animation:cssload-spin 425ms infinite linear;-ms-animation:cssload-spin 425ms infinite linear;-webkit-animation:cssload-spin 425ms linear infinite;-moz-animation:cssload-spin 425ms infinite linear}@keyframes cssload-spin{to{transform:rotate(1turn)}}@-webkit-keyframes cssload-spin{to{transform:rotate(1turn)}}.preloader-text{display:block;text-align:center;width:100%;height:30px;color:#2b2b2b;position:relative;top:calc(50% + 15px)}"]}]}],J.ctorParameters=function(){return[{type:t.ElementRef,decorators:[{type:t.Host},{type:t.Optional}]}]},J.propDecorators={progresso:[{type:t.Input}],$shown:[{type:t.Input,args:["show"]}],loader:[{type:t.ViewChild,args:["loader"]}],labelLoading:[{type:t.Input}],showOnInit:[{type:t.Input}],component:[{type:t.Input}]};var X=function(){function e(){this.executando=!1,this.ajaxCount=[]}return e.prototype.init=function(e){this.loader||(this.loader=e)},e.prototype.incrementaAJAX=function(e){var t=this;void 0===e&&(e=!1),this.executando=this.executando||e;var n=String(1e10*Math.random());return this.ajaxCount.push(n),this.loader&&this.executando&&this.ajaxCount.length>0&&!this.loader.shown&&setTimeout((function(){t.executando&&t.ajaxCount.length>0&&!t.loader.shown&&t.loader.show()}),150),n},e.prototype.decrementaAJAX=function(e){var t=this,n=this.ajaxCount.indexOf(e);n>=0&&(this.ajaxCount.splice(n,1),setTimeout((function(){t.ajaxCount.length<=0&&t.loader&&t.loader.shown&&(t.loader.hide(),t.executando=!1)}),500))},e.prototype.listen=function(e){return this.executando=!0,this.doExecuta(l.from(e))},e.prototype.doExecuta=function(e){var t=this;return new l.Observable((function(n){var r=t.incrementaAJAX(),o=e.subscribe((function(e){n.next(e)}),(function(e){t.decrementaAJAX(r),n.error(e)}),(function(){t.decrementaAJAX(r),n.complete()}));return function(){t.decrementaAJAX(r),o.unsubscribe()}}))},e}();X.decorators=[{type:t.Injectable}],X.ctorParameters=function(){return[]};var K=function(){function e(e,t){this.data=e,this.dialogRef=t}return Object.defineProperty(e.prototype,"titulo",{get:function(){return this.data.titulo},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mensagem",{get:function(){return this.data.mensagem},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"okLabel",{get:function(){return this.data.okLabel},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cancelLabel",{get:function(){return this.data.cancelLabel},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){},e.prototype.confirma=function(e){e.valid&&this.dialogRef.close(!0)},e}();function Z(e,t){var n="";if(null!=e&&e.length)if(t)for(var r=0;r<e.length&&t.length>n.length;)"#"===t.charAt(n.length)?(e.charAt(r).match(/\d/)&&(n+=e.charAt(r)),r++):n+=t.charAt(n.length);else n=e;return n}function ee(e,t){if(null!=e){if(t){var n=e.toString().replace(/\D/g,""),r=t.replace(/[^#]/g,"");return n.length>r.length?n.substring(0,r.length):n}return e}}K.decorators=[{type:t.Component,args:[{selector:"mcl-dialog-confirmacao",template:'<div mat-dialog-title>\n {{titulo | translate}}\n</div>\n\n<form (ngSubmit)="confirma(form)" #form="ngForm">\n <mat-dialog-content>\n\n <p [innerHTML]="mensagem | translate"></p>\n\n </mat-dialog-content>\n\n <div mat-dialog-actions>\n <button mat-stroked-button color="accent">\n {{okLabel | translate}}\n </button>\n <button mat-flat-button color="warn" type="button" mat-dialog-close *ngIf="cancelLabel">\n {{cancelLabel | translate}}\n </button>\n </div>\n</form>\n',styles:[".mat-dialog-content{width:95vw;max-width:280px;min-width:auto;margin:10px 60px;text-align:center;min-height:120px;display:flex;flex-direction:column;justify-content:center}[mat-dialog-title]{text-align:center;margin:40px 60px 20px}[mat-dialog-actions]{justify-content:center;margin:20px 60px 40px;flex-direction:row}@media (max-width:750px){.mat-dialog-content{margin:10px 20px}}"]}]}],K.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[r.MAT_DIALOG_DATA]}]},{type:r.MatDialogRef}]};var te=function(){function e(e){this.ngControl=e,this.value=null,this.displayValue=null,this.mclModelChange=new t.EventEmitter}return e.prototype.delay=function(e){return void 0===e&&(e=0),new a.Observable((function(t){var n=setTimeout((function(){return t.next()}),e);return function(){return clearTimeout(n)}}))},e.prototype.processValue=function(e){return this.keepMask?e:this.removeMask(e)},Object.defineProperty(e.prototype,"mask",{get:function(){return this.$mask},set:function(e){e!==this.$mask&&(this.$mask=e,this.defineValue())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maskValue",{set:function(e){e!==this.value&&(this.value=e,this.defineValue())},enumerable:!1,configurable:!0}),e.prototype.onInput=function(e){var t=e.target.value;this.onValueChange(t)},e.prototype.updateValue=function(e){var t=this;this.value=e,this.mclModelChange.emit(e),this.delay().subscribe((function(){return t.ngControl.control.updateValueAndValidity()}))},e.prototype.defineValue=function(){var e=this,t=this.value,n=null;this.mask?null!=t&&(n=this.applyMask(t),t=this.processValue(n)):n=this.value,this.delay().subscribe((function(){e.displayValue!==n&&(e.displayValue=n,e.ngControl.control.setValue(n),e.delay().subscribe((function(){if(t!==e.value)return e.updateValue(t)})))}))},e.prototype.onValueChange=function(e){if(e!==this.displayValue){var t=e,n=e;null==e||""===e.trim()?n=null:this.mask&&(t=this.applyMask(e),n=this.processValue(t)),this.displayValue=t,e!==t&&this.ngControl.control.setValue(t),n!==this.value&&this.updateValue(n)}},e.prototype.removeMask=function(e){return ee(e,this.mask)},e.prototype.applyMask=function(e){return Z(e,this.mask)},e}();te.decorators=[{type:t.Directive,args:[{selector:"[mclModel][ngModel][mask]"}]}],te.ctorParameters=function(){return[{type:u.NgControl}]},te.propDecorators={keepMask:[{type:t.Input}],mclModelChange:[{type:t.Output}],mask:[{type:t.Input}],maskValue:[{type:t.Input,args:["mclModel"]}],onInput:[{type:t.HostListener,args:["input",["$event"]]}]};var ne=function(){function e(){}return e.prototype.isValidCpf=function(e){return 11===e.length&&!this.isRepeatedNumber(e)&&Number(e.charAt(9))===this.calculateDvMod11(e,9,2,11)&&Number(e.charAt(10))===this.calculateDvMod11(e,10,2,11)},e.prototype.isValidCgc=function(e){var t=Number(e.substring(9,12));return 14===e.length&&!this.isRepeatedNumber(e)&&Number(e.charAt(12))===this.calculateDvMod11(e,12,2,9)&&Number(e.charAt(13))===this.calculateDvMod11(e,13,2,9)&&t>0&&t<7100},e.prototype.isRepeatedNumber=function(e){for(var t=1,n=e.charAt(0);t<e.length;){if(n!==e.charAt(t))return!1;t++}return!0},e.prototype.calculateDvMod11=function(e,t,n,r){for(var o=n,i=0,a=0;a<t;a++)i+=Number(e.charAt(t-a-1))*o,++o>r&&(o=n);return(i%=11)<2?0:11-i},e}();ne.decorators=[{type:t.Injectable}];var re=function(){function e(){}return e.prototype.transform=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(e&&e.trim().indexOf(" ")>=0){var r=e.trim().split(" ");return r[0]+" "+r[r.length-1]}return e},e}();re.decorators=[{type:t.Pipe,args:[{name:"nomeResumido"}]}];var oe=function(){function e(){}return e.prototype.criptografa=function(e,t){var n=new B.default(void 0);return n.setPublicKey(e),n.encrypt(t)},e}();oe.decorators=[{type:t.Injectable}];var ie=function(){function e(e,t,n){this.dialogRef=t,this.titulo=e.titulo,this.url=n.bypassSecurityTrustResourceUrl(e.url)}return e.prototype.ngAfterViewInit=function(){var e,t=this;this.iframe.nativeElement,e=function(){return t.close()},window.addEventListener("dialogIframeClosed",(function(){return e()}))},e.prototype.returnValue=function(){var e,t=this.iframe.nativeElement.contentDocument||(null===(e=this.iframe.nativeElement.contentWindow)||void 0===e?void 0:e.document);if(t){var n=t.getElementById("returnValue");if(n){var r=n.innerText;if(r)return JSON.parse(r)}}},e.prototype.close=function(){this.dialogRef.close(this.returnValue())},e}();ie.decorators=[{type:t.Component,args:[{selector:"mcl-dialog-iframe",template:'<div mat-dialog-title >\n <h2>{{titulo}}</h2>\n <button mat-icon-button mat-dialog-close class="pull-right" tabindex="-1">\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<mat-dialog-content>\n <iframe #iframe width="560" height="315" [src]="url" (close)="close()" frameborder="0"\n ></iframe>\n</mat-dialog-content>\n',styles:["[mat-dialog-title]{display:flex}[mat-dialog-title] h2{font-size:25px;flex:1 1 auto;margin:0 0 20px}[mat-dialog-title] mat-icon{vertical-align:middle}mat-dialog-content{margin:-24px;width:calc(100% + 48px);padding:0}mat-dialog-content iframe{width:100%;height:60vh;border:0}"]}]}],ie.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[r.MAT_DIALOG_DATA]}]},{type:r.MatDialogRef},{type:f.DomSanitizer}]},ie.propDecorators={iframe:[{type:t.ViewChild,args:["iframe"]}]};var ae=function(){function e(e){this.dialog=e}return e.prototype.confirma=function(e,t){return void 0===t&&(t={}),this.dialog.open(K,{data:{titulo:t.titulo||"mcl.dialog.confirmacao",mensagem:e,okLabel:t.okLabel||"mcl.dialog.sim",cancelLabel:t.cancelLabel||"mcl.dialog.nao"}}).afterClosed().pipe(g.map((function(e){return!!e})))},e.prototype.informa=function(e,t){return void 0===t&&(t={}),this.dialog.open(K,{data:{titulo:t.titulo||"mcl.dialog.informacao",mensagem:e,okLabel:t.okLabel||"mcl.dialog.ok"}}).afterClosed().pipe(g.map((function(e){return!!e})))},e.prototype.iframe=function(e,t){if(!window.parent||window.parent===window)return this.dialog.open(ie,{data:{titulo:t,url:e},panelClass:"dialog-frame"}).afterClosed();window.location.href=e},e}();ae.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new ae(t.ɵɵinject(r.MatDialog))},token:ae,providedIn:"root"}),ae.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],ae.ctorParameters=function(){return[{type:r.MatDialog}]};var se=function(){function e(e,t){this.snackBar=e,this.translateService=t,this.defaultHorizontalPosition="right",this.defaultVerticalPosition="top",this.defaultDuration=2e3}return e.prototype.setDefaultComponent=function(e){this.$defaultComponent=e},e.prototype.addMensagemFromComponent=function(e,t){this.snackBar.openFromComponent(e,Object.assign({horizontalPosition:this.defaultHorizontalPosition,verticalPosition:this.defaultVerticalPosition,duration:this.defaultDuration},t))},e.prototype.addMensagem=function(e,t,n,r){void 0===t&&(t={}),void 0===n&&(n="OK");var o,i=Object.assign({horizontalPosition:this.defaultHorizontalPosition,verticalPosition:this.defaultVerticalPosition,duration:this.defaultDuration},r);(o=this.$defaultComponent?this.snackBar.openFromComponent(this.$defaultComponent,Object.assign(Object.assign({},i),{data:{message:this.translateService.instant(e,t),data:i.data}})):this.snackBar.open(this.translateService.instant(e,t),"OK",i)).onAction().subscribe((function(){o.dismiss()}))},e}();se.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new se(t.ɵɵinject(y.MatSnackBar),t.ɵɵinject(o.TranslateService))},token:se,providedIn:"root"}),se.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],se.ctorParameters=function(){return[{type:y.MatSnackBar},{type:o.TranslateService}]};var le=function(){function e(e){var t=this;this.listeners=[],this.mobileQuery=e.matchMedia("(max-width: 600px)"),this.tabletQuery=e.matchMedia("(max-width: 950px)"),this.mobileQueryListener=function(){t.listeners.forEach((function(e){try{e(t.mobile,t.tablet)}catch(e){console.error(e)}}))},this.mobileQuery.addEventListener("change",this.mobileQueryListener),this.tabletQuery.addEventListener("change",this.mobileQueryListener)}return e.prototype.addListener=function(e){this.listeners.push(e)},e.prototype.removeListener=function(e){this.listeners.splice(this.listeners.indexOf(e),1)},Object.defineProperty(e.prototype,"mobile",{get:function(){return this.mobileQuery.matches},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tablet",{get:function(){return this.tabletQuery.matches},enumerable:!1,configurable:!0}),e}();le.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new le(t.ɵɵinject(v.MediaMatcher))},token:le,providedIn:"root"}),le.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],le.ctorParameters=function(){return[{type:v.MediaMatcher}]};var ue=new t.InjectionToken("ARQUIVO_MANAGER_SERVICE"),ce=new t.InjectionToken("MCL_IMAGE_PADRAO"),pe=function(){function e(e,t,n){var r=this;this._padrao=e,this.element=t,this.arquivoManagerService=n,this.backgroundSetter=function(e){r.element.nativeElement.style.backgroundImage="url("+e+")"},this.srcSetter=function(e){r.element.nativeElement.src=e}}return Object.defineProperty(e.prototype,"imagemSrc",{set:function(e){this._setter=this.srcSetter,e?this._path!==e&&(this._path=e,this.setPath()):this._setter(this._padrao)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"imagemBackground",{set:function(e){this._setter=this.backgroundSetter,e?this._path!==e&&(this._path=e,this.setPath()):this._setter(this._padrao)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"padrao",{set:function(e){this._padrao=e,this._setter&&this._setter(this.padrao)},enumerable:!1,configurable:!0}),e.prototype.setPath=function(){return G(this,void 0,void 0,(function(){var e,t;return U(this,(function(n){switch(n.label){case 0:return(e="string"==typeof this._path?this._path:this._path.path)?(t=void 0,e.startsWith("http://")||this._path.startsWith("https://")?(t=e,[3,3]):[3,1]):[3,4];case 1:return[4,this.arquivoManagerService.downloadURL(e).toPromise()];case 2:t=n.sent(),n.label=3;case 3:this._setter(t),n.label=4;case 4:return[2]}}))}))},e.prototype.ngOnInit=function(){},e}();pe.decorators=[{type:t.Directive,args:[{selector:"[mclImagemSrc],[mclImagemBackground]"}]}],pe.ctorParameters=function(){return[{type:String,decorators:[{type:t.Inject,args:[ce]},{type:t.Optional}]},{type:t.ElementRef,decorators:[{type:t.Self}]},{type:void 0,decorators:[{type:t.Inject,args:[ue]}]}]},pe.propDecorators={imagemSrc:[{type:t.Input,args:["mclImagemSrc"]}],imagemBackground:[{type:t.Input,args:["mclImagemBackground"]}],padrao:[{type:t.Input}]};var de=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[X,ne,oe,ae,se,le]}},e}();de.decorators=[{type:t.NgModule,args:[{declarations:[J,K,te,re,ie,pe],exports:[J,te,re,pe],imports:[n.CommonModule,u.FormsModule,o.TranslateModule,r.MatDialogModule,c.MatIconModule,p.MatButtonModule,d.MatProgressSpinnerModule,h.FlexModule]}]}];var he=function(){function e(e,t){this.dadosPreview=e,this.arquivoService=t,this.loadingFile=!0}return e.prototype.ngOnInit=function(){"image"===this.type&&this.previewCarregado()},Object.defineProperty(e.prototype,"src",{get:function(){return this.dadosPreview.src},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this.dadosPreview.type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"group",{get:function(){return this.dadosPreview.group},enumerable:!1,configurable:!0}),e.prototype.handleEvent=function(e){"download"===e.name&&this.download()},e.prototype.previewCarregado=function(e){this.loadingFile=!1},e.prototype.download=function(){if("string"==typeof this.src){var e=document.createElement("a");e.href=this.src,e.target="_blank",document.body.appendChild(e),e.click(),document.body.removeChild(e)}},e}();he.decorators=[{type:t.Component,args:[{selector:"mcl-dialog-preview-arquivo",template:'<mat-dialog-content>\r\n <div class="spinner-wrapper" *ngIf="loadingFile">\r\n <mat-spinner style="margin: 0 auto" [diameter]="50" color="warn"></mat-spinner>\r\n </div>\r\n\r\n <pdf-viewer (page-rendered)="previewCarregado($event)" *ngIf="type === \'pdf\'"\r\n [src]="src" [original-size]="false"></pdf-viewer>\r\n\r\n <ngx-image-viewer [src]="group" [index]="group.indexOf(src)" *ngIf="type === \'image\' && group"\r\n [config]="{customBtns:[{name: \'download\', icon: \'fa fa-download\'}]}"\r\n (customEvent)="handleEvent($event)"></ngx-image-viewer>\r\n\r\n <ngx-image-viewer [src]="[src]" [index]="0" *ngIf="type === \'image\' && !group"\r\n [config]="{customBtns:[{name: \'download\', icon: \'fa fa-download\'}]}"\r\n (customEvent)="handleEvent($event)"></ngx-image-viewer>\r\n</mat-dialog-content>\r\n\r\n<div mat-dialog-actions>\r\n <button mat-button mat-dialog-close>\r\n <mat-icon>close</mat-icon>\r\n Fechar\r\n </button>\r\n\r\n <div class="spacer"></div>\r\n\r\n <button mat-stroked-button (click)="download()" *ngIf="!loadingFile">\r\n <mat-icon>cloud_download</mat-icon>\r\n Realizar o Download\r\n </button>\r\n</div>\r\n',styles:["pdf-viewer{width:100%;display:block}.spinner-wrapper{margin:30px auto;width:800px;height:400px}.dialog-title-text{margin-right:10px;line-height:38px}[mat-dialog-title]{display:flex;padding:8px 24px 7px}[mat-dialog-title] .spacer{flex:1 1 auto}[mat-dialog-actions]{text-align:right}[mat-dialog-actions] button{margin-left:auto}[mat-dialog-actions] button mat-icon{vertical-align:middle;margin-right:10px}"]}]}],he.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[r.MAT_DIALOG_DATA]}]},{type:void 0,decorators:[{type:t.Inject,args:[ue]}]}]};var me=function(){function e(e,t){this.arquivoManagerService=e,this.dialog=t,this.showLoading=!1,this.height="200px",this.width="200px"}return e.prototype.ngOnInit=function(){},Object.defineProperty(e.prototype,"arquivo",{get:function(){return this.$url},set:function(e){var t=this;this.$arquivo!==e&&(this.$arquivo=e,this.parseArquivo(e).subscribe((function(e){t.src=e.src,t.filename=e.filename,t.$url=e.url,t.type=e.type})))},enumerable:!1,configurable:!0}),e.prototype.parseArquivo=function(e){var t=this;return new l.Observable((function(n){if(e.loading){var r=t.parseType(e.file.name);n.next({type:r,filename:e.file.name}),t.carregaArrayBuffFile(e.file).then((function(t){n.next({src:t,type:r,filename:e.file.name}),n.complete()})).catch((function(e){return n.error(e)}))}else if("string"==typeof e){var o=t.parseType(e.split("?")[0]);n.next({type:o,url:e,src:e}),n.complete()}else{var i=t.parseType(e.nome);t.arquivoManagerService.downloadURL(e).subscribe((function(e){n.next({type:i,url:e,src:e}),n.complete()}),(function(e){return n.error(e)}))}}))},e.prototype.carregaArrayBuffFile=function(e){return new Promise((function(t,n){if("undefined"!=typeof FileReader){var r=new FileReader;r.onload=function(e){return t(e.target.result)},r.onerror=function(e){return n(e)},r.readAsArrayBuffer(e)}else n("FileReader not defined")}))},e.prototype.parseType=function(e){switch(e.substring(e.lastIndexOf(".")+1).toLowerCase()){case"jpeg":case"jpg":case"png":case"gif":return"image";case"pdf":return"pdf"}return"other"},e.prototype.abrePreview=function(){return G(this,void 0,void 0,(function(){var e,t,n=this;return U(this,(function(r){switch(r.label){case 0:return t=this.src,this.group?[4,Promise.all(this.group.map((function(e){return n.parseArquivo(e).toPromise()})))]:[3,2];case 1:e=r.sent(),t=e[this.group.indexOf(this.$arquivo)].src,e=e.filter((function(e){return!!e.src&&e.type===n.type})).map((function(e){return e.src})),r.label=2;case 2:return this.dialog.open(he,{data:{src:t,group:e,type:this.type}}),[2]}}))}))},e}();me.decorators=[{type:t.Component,args:[{selector:"mcl-preview-arquivo",template:'<img *ngIf="src && type===\'image\'" [src]="src"\r\n [ngStyle]="{width:width,height:height}"\r\n (click)="abrePreview()"/>\r\n\r\n<div class="other" *ngIf="!src || type === \'other\'"\r\n [ngStyle]="{width:width,height:height}"\r\n [mclDownloadArquivo]="arquivo">\r\n <mat-icon>insert_drive_file</mat-icon>\r\n <small>{{ filename }}</small>\r\n</div>\r\n\r\n<pdf-viewer [src]="src" *ngIf="src && type === \'pdf\'"\r\n [ngStyle]="{width:width,height:height}"\r\n [original-size]="false"\r\n [page]="1"\r\n [render-text]="false"\r\n (click)="abrePreview()"\r\n></pdf-viewer>\r\n',styles:[".other,img,pdf-viewer{overflow:hidden;display:block;border-radius:5px;background:#efefef;border:1px solid #a9a9a9}.other.other,img.other,pdf-viewer.other{display:flex;flex-direction:column;justify-items:center}.other.other mat-icon,img.other mat-icon,pdf-viewer.other mat-icon{margin:auto;text-align:center;font-size:75px;height:75px;width:75px;line-height:75px}.other:hover,img:hover,pdf-viewer:hover{cursor:pointer}"]}]}],me.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[ue]}]},{type:r.MatDialog}]},me.propDecorators={showLoading:[{type:t.Input}],height:[{type:t.Input}],width:[{type:t.Input}],group:[{type:t.Input}],arquivo:[{type:t.Input}]};var fe=function(){function e(e){this.arquivoService=e,this.target="_blank"}return e.prototype.getUrlArquivo=function(){return G(this,void 0,void 0,(function(){return U(this,(function(e){switch(e.label){case 0:return"string"==typeof this.attachment?[2,this.attachment]:[4,this.arquivoService.downloadURL(this.attachment).toPromise()];case 1:return[2,e.sent()]}}))}))},e.prototype.download=function(){return G(this,void 0,void 0,(function(){var e,t;return U(this,(function(n){switch(n.label){case 0:return this.attachment?(e=document.createElement("a"),t=e,[4,this.getUrlArquivo()]):[2];case 1:return t.href=n.sent(),e.target=this.target,document.body.appendChild(e),e.click(),document.body.removeChild(e),[2]}}))}))},e}();fe.decorators=[{type:t.Directive,args:[{selector:"[mclDownloadArquivo]"}]}],fe.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[ue]}]}]},fe.propDecorators={attachment:[{type:t.Input,args:["mclDownloadArquivo"]}],target:[{type:t.Input}],download:[{type:t.HostListener,args:["click"]}]};var ge=function(){};ge.decorators=[{type:t.NgModule,args:[{declarations:[me,fe,he],exports:[me,fe],imports:[n.CommonModule,c.MatIconModule,b.PdfViewerModule,r.MatDialogModule,d.MatProgressSpinnerModule,p.MatButtonModule,C.ImageViewerModule]}]}];var ye=function(e){this.template=e};ye.decorators=[{type:t.Directive,args:[{selector:"[mclColumnHeader]"}]}],ye.ctorParameters=function(){return[{type:t.TemplateRef}]};var ve=function(e){this.template=e};ve.decorators=[{type:t.Directive,args:[{selector:"[mclColumnCell]"}]}],ve.ctorParameters=function(){return[{type:t.TemplateRef}]};var be=function(e){this.template=e};be.decorators=[{type:t.Directive,args:[{selector:"[mclColumnFooter]"}]}],be.ctorParameters=function(){return[{type:t.TemplateRef}]};var Ce=function(){function e(){this.name="column_"+ ++e.lastId,this.viewType="both"}return Object.defineProperty(e.prototype,"columnDefName",{get:function(){return this.viewType+"-"+this.name},enumerable:!1,configurable:!0}),e}();Ce.lastId=0,Ce.decorators=[{type:t.Directive,args:[{selector:"mcl-column,[mclColumn]"}]}],Ce.ctorParameters=function(){return[]},Ce.propDecorators={name:[{type:t.Input}],viewType:[{type:t.Input}],header:[{type:t.ContentChild,args:[ye]}],cell:[{type:t.ContentChild,args:[ve]}],footer:[{type:t.ContentChild,args:[be]}]};var xe=function(){function e(e){var t=this;this.mobileService=e,this.itemsSubject=new l.BehaviorSubject([]),this.emptyStateMessage="mcl.table.nenhum_registro_encontrado",this.sticky=!1,this.currentColumns=[],this.$activeColumnNames=[],this.oldLength=0,this.mobileListener=function(e){return t.mergeColumnsDef(e)},this.mobileService.addListener(this.mobileListener)}return Object.defineProperty(e.prototype,"activeColumnNames",{get:function(){return this.$activeColumnNames},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasFooter",{get:function(){return!!this.currentColumns.find((function(e){return!!e.footerCell}))},enumerable:!1,configurable:!0}),e.prototype.mergeColumnsDef=function(e){var t=this;void 0===e&&(e=this.mobileService.mobile),clearTimeout(this.$loading),this.$loading=setTimeout((function(){for(var n,r=t.columnsDef.toArray().filter((function(t){return e&&"web"!==t.viewType||!e&&"mobile"!==t.viewType})),o=function(e){var o=t.currentColumns[e];r.find((function(e){return e.columnDefName===o.name}))?e++:(t.currentColumns.splice(e,1),t.removeColumnDef(o)),n=e},i=0;i<t.currentColumns.length;)o(i),i=n;r.forEach((function(e){if(!t.currentColumnsContains(e)){var n=t.mapColumnDef(e);t.currentColumns.push(n),t.addColumnDef(n)}})),t.items=t.getItems()||[],t.itemsSubject.next(t.items),t.$activeColumnNames=t.currentColumns.map((function(e){return e.name}))}),80)},e.prototype.ngAfterViewInit=function(){var e=this;this.columnsChangeSubscription=this.columnsDef.changes.subscribe((function(t){e.mergeColumnsDef()})),this.mergeColumnsDef()},e.prototype.ngDoCheck=function(){var e=this.getCurrentLength();this.oldLength!==e?(this.oldLength=e,this.items=this.getItems()||[],this.itemsSubject.next(this.items)):this.items!==this.getItems()&&(this.items=this.getItems()||[],this.itemsSubject.next(this.items))},e.prototype.getItems=function(){return this.outerItems},e.prototype.getCurrentLength=function(){return this.outerItems?this.outerItems.length:0},e.prototype.ngOnDestroy=function(){this.mobileService.removeListener(this.mobileListener),this.columnsChangeSubscription.unsubscribe(),this.itemsSubject.complete()},e.prototype.removeColumnDef=function(e){this.table.removeColumnDef(e)},e.prototype.addColumnDef=function(e){this.table.addColumnDef(e)},e.prototype.mapColumnDef=function(e){var t=new x.MatColumnDef;return t.name=e.viewType+"-"+e.name,t.cell=new x.MatCellDef(e.cell.template),t.headerCell=new x.MatHeaderCellDef(e.header.template),e.footer&&(t.footerCell=new x.MatFooterCellDef(e.footer.template)),t},e.prototype.currentColumnsContains=function(e){return!!this.currentColumns.find((function(t){return t.name===e.columnDefName}))},e}();xe.decorators=[{type:t.Component,args:[{selector:"mcl-table:not([page])",template:'<table mat-table [dataSource]="itemsSubject">\n\n <tr mat-header-row *matHeaderRowDef="activeColumnNames; sticky: sticky"></tr>\n <tr mat-row *matRowDef="let row; columns: activeColumnNames;"></tr>\n <ng-container *ngIf="hasFooter">\n <tr mat-footer-row *matFooterRowDef="activeColumnNames;"></tr>\n </ng-container>\n\n</table>\n\n<div *ngIf="!items?.length && !emptyStatePlaceholder" class="empty-state">\n {{emptyStateMessage | translate}}\n</div>\n<ng-container *ngIf="!items?.length && emptyStatePlaceholder">\n <ng-content select="[mclEmptyState]"></ng-content>\n</ng-container>\n',styles:["table{width:100%}table::ng-deep th:not(:last-child),table td:not(:last-child){padding-right:5px}table::ng-deep th.text-center,table td.text-center{text-align:center}table::ng-deep th.text-right,table td.text-right{text-align:right}table::ng-deep th.text-left,table td.text-left{text-align:left}.empty-state{padding:10px;text-align:center}table::ng-deep tbody tr{transition:.5s}table::ng-deep tbody tr:hover{background-color:rgba(0,0,0,.03)}table::ng-deep tbody td[routerLink]{cursor:pointer}"]}]}],xe.ctorParameters=function(){return[{type:le}]},xe.propDecorators={emptyStateMessage:[{type:t.Input}],table:[{type:t.ViewChild,args:[x.MatTable]}],emptyStatePlaceholder:[{type:t.ContentChild,args:["[mclEmptyState]",{read:t.ElementRef}]}],columnsDef:[{type:t.ContentChildren,args:[Ce]}],outerItems:[{type:t.Input,args:["items"]}],sticky:[{type:t.Input}]};var Me=function(){function e(e){e.nativeElement.classList.add("mat-header-cell")}return e.prototype.ngOnInit=function(){},e}();Me.decorators=[{type:t.Component,args:[{selector:"th,mcl-th",template:"<ng-content></ng-content>\n",styles:[""]}]}],Me.ctorParameters=function(){return[{type:t.ElementRef,decorators:[{type:t.Self}]}]};var we=function(){function e(e){e.nativeElement.classList.add("mat-cell")}return e.prototype.ngOnInit=function(){},e}();we.decorators=[{type:t.Component,args:[{selector:"td,mcl-td",template:"<ng-content></ng-content>\n",styles:[""]}]}],we.ctorParameters=function(){return[{type:t.ElementRef,decorators:[{type:t.Self}]}]};var Ie=new t.InjectionToken("PAGINATION_CONFIGURATION"),Pe=function(e){function n(n,r){var o=e.call(this,n)||this;return o.paginate=new t.EventEmitter,o.sizes=(null==r?void 0:r.sizes)||[10,25,50],o}return H(n,e),n.prototype.getCurrentLength=function(){return this.page&&this.page.itens?this.page.itens.length:0},n.prototype.getItems=function(){return this.page?this.page.itens:void 0},n.prototype.paginaEvent=function(e){this.paginate.emit({pagina:e.pageIndex+1,tamanhoPagina:e.pageSize,loader:this.loader})},n}(xe);Pe.decorators=[{type:t.Component,args:[{selector:"mcl-table[page]",template:'<div #div>\n <table mat-table #matTable [dataSource]="itemsSubject">\n\n <tr mat-header-row *matHeaderRowDef="activeColumnNames; sticky: page && !page.totalItens"></tr>\n <tr mat-row *matRowDef="let row; columns: activeColumnNames;"></tr>\n <ng-container *ngIf="hasFooter">\n <tr mat-footer-row *matFooterRowDef="activeColumnNames;"></tr>\n </ng-container>\n\n </table>\n\n <mcl-loader [showOnInit]="true" [component]="div"></mcl-loader>\n</div>\n\n<div *ngIf="!items?.length && !emptyStatePlaceholder" class="empty-state">\n {{emptyStateMessage | translate}}\n</div>\n<ng-container *ngIf="!items?.length && emptyStatePlaceholder">\n <ng-content select="[mclEmptyState]"></ng-content>\n</ng-container>\n\n<mcl-paginator [pageSize]="page?.tamanhoPagina"\n (page)="paginaEvent($event)"\n [length]="page?.totalItens"\n [pageSizeOptions]="sizes"\n [showFirstLastButtons]="true"\n *ngIf="page?.totalItens">\n</mcl-paginator>\n',styles:["","table{width:100%}table::ng-deep th:not(:last-child),table td:not(:last-child){padding-right:5px}table::ng-deep th.text-center,table td.text-center{text-align:center}table::ng-deep th.text-right,table td.text-right{text-align:right}table::ng-deep th.text-left,table td.text-left{text-align:left}.empty-state{padding:10px;text-align:center}table::ng-deep tbody tr{transition:.5s}table::ng-deep tbody tr:hover{background-color:rgba(0,0,0,.03)}table::ng-deep tbody td[routerLink]{cursor:pointer}"]}]}],Pe.ctorParameters=function(){return[{type:le},{type:void 0,decorators:[{type:t.Inject,args:[Ie]},{type:t.Optional}]}]},Pe.propDecorators={sizes:[{type:t.Input}],paginate:[{type:t.Output}],page:[{type:t.Input}],loader:[{type:t.ViewChild,args:[J]}]};var De=function(e){var t=/(auto|scroll)/,n=function(e,t){return null===e.parentNode||void 0===e.parentNode?t:n(e.parentNode,t.concat([e]))},r=function(e,t){return getComputedStyle(e,null).getPropertyValue(t)},o=function(e){return t.test(function(e){return r(e,"overflow")+r(e,"overflow-y")}(e))};return function(e){var t,r;if(e instanceof HTMLElement||e instanceof SVGElement){var i=n(e,[]);try{for(var a=Y(i),s=a.next();!s.done;s=a.next()){var l=s.value;if(o(l))return l}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}return document.scrollingElement||document.documentElement}}(e)},Oe=function(e){function n(n,r){var o=e.call(this,r)||this;return o.element=n,o.next=new t.EventEmitter,o.hasNext=!1,o.scrollHeight=200,o}return H(n,e),Object.defineProperty(n.prototype,"loading",{get:function(){return!this.loader||this.loader.shown},enumerable:!1,configurable:!0}),n.prototype.ngAfterViewInit=function(){var t=this;e.prototype.ngAfterViewInit.call(this),this.parent=De(this.element.nativeElement),this.parent.onscroll=function(){t.hasNext&&!t.loader.shown&&t.parent.scrollHeight-t.parent.clientHeight-t.parent.scrollTop<t.scrollHeight&&t.loadMore()},this.next.emit(this.loader)},n.prototype.ngDoCheck=function(){e.prototype.ngDoCheck.call(this),this.hasNext&&!this.loader.shown&&this.parent.scrollHeight===this.parent.clientHeight&&this.loadMore()},n.prototype.ngOnDestroy=function(){e.prototype.ngOnDestroy.call(this),this.parent.onscroll=void 0},n.prototype.loadMore=function(){this.hasNext&&this.next.emit(this.loader)},n}(xe);Oe.decorators=[{type:t.Component,args:[{selector:"mcl-infinite-table",template:'<table mat-table [dataSource]="itemsSubject">\n\n <tr mat-header-row *matHeaderRowDef="activeColumnNames; sticky: true"></tr>\n <tr mat-row *matRowDef="let row; columns: activeColumnNames;"></tr>\n <ng-container *ngIf="hasFooter">\n <tr mat-footer-row *matFooterRowDef="activeColumnNames;"></tr>\n </ng-container>\n\n</table>\n\n<ng-container *ngIf="!hasNext && !loading && !items?.length">\n <div *ngIf="!emptyStatePlaceholder" class="empty-state">\n {{emptyStateMessage | translate}}\n </div>\n <ng-container *ngIf="emptyStatePlaceholder">\n <ng-content select="[mclEmptyState]"></ng-content>\n </ng-container>\n</ng-container>\n\n<div #div class="loading" [ngClass]="{\'hidden\':!loading}">\n <mcl-loader #loader [showOnInit]="true" [component]="div"></mcl-loader>\n</div>\n',styles:[":host{justify-content:flex-start;display:flex;flex-direction:column}mcl-loader{flex-grow:0;flex-shrink:0;flex-basis:auto}.loading{height:100px;display:block}.loading.hidden{height:0;display:none}","table{width:100%}table::ng-deep th:not(:last-child),table td:not(:last-child){padding-right:5px}table::ng-deep th.text-center,table td.text-center{text-align:center}table::ng-deep th.text-right,table td.text-right{text-align:right}table::ng-deep th.text-left,table td.text-left{text-align:left}.empty-state{padding:10px;text-align:center}table::ng-deep tbody tr{transition:.5s}table::ng-deep tbody tr:hover{background-color:rgba(0,0,0,.03)}table::ng-deep tbody td[routerLink]{cursor:pointer}"]}]}],Oe.ctorParameters=function(){return[{type:t.ElementRef,decorators:[{type:t.Self}]},{type:le}]},Oe.propDecorators={next:[{type:t.Output}],hasNext:[{type:t.Input}],scrollHeight:[{type:t.Input}],loader:[{type:t.ViewChild,args:[J]}]};var ke=function(){function e(e){this.translate=e}return e.prototype.getPaginatorIntl=function(){var e=new M.MatPaginatorIntl;return e.itemsPerPageLabel=this.translate.instant("mcl.table.items_per_page"),e.nextPageLabel=this.translate.instant("mcl.table.next_page"),e.previousPageLabel=this.translate.instant("mcl.table.previous_page"),e.firstPageLabel=this.translate.instant("mcl.table.first_page"),e.lastPageLabel=this.translate.instant("mcl.table.last_page"),e.getRangeLabel=this.getRangeLabel.bind(this),e},e.prototype.getRangeLabel=function(e,t,n){var r=e*t,o=r<(n=Math.max(n,0))?Math.min(r+t,n):r+t;return this.translate.instant("mcl.table.range",{startIndex:r+1,endIndex:o,length:n})},e}(),Se=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return H(t,e),t}(M.MatPaginator);Se.decorators=[{type:t.Component,args:[{selector:"mcl-paginator",template:'<div class="mat-paginator-outer-container">\n <div class="mat-paginator-container">\n <div class="mat-paginator-page-size" *ngIf="!hidePageSize">\n <div class="mat-paginator-page-size-label">\n {{_intl.itemsPerPageLabel}}\n </div>\n\n <mat-form-field\n *ngIf="_displayedPageSizeOptions.length > 1"\n appearance="standard"\n [color]="color"\n class="mat-paginator-page-size-select">\n <mat-select\n [value]="pageSize"\n [disabled]="disabled"\n [aria-label]="_intl.itemsPerPageLabel"\n (selectionChange)="_changePageSize($event.value)">\n <mat-option *ngFor="let pageSizeOption of _displayedPageSizeOptions" [value]="pageSizeOption">\n {{\'mcl.table.option\' | translate:{option:pageSizeOption} }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <div\n class="mat-paginator-page-size-value"\n *ngIf="_displayedPageSizeOptions.length <= 1">{{pageSize}}</div>\n </div>\n\n <div class="mat-paginator-range-actions">\n\n <button mat-icon-button type="button"\n class="mat-paginator-navigation-first"\n (click)="firstPage()"\n [attr.aria-label]="_intl.firstPageLabel"\n [matTooltip]="_intl.firstPageLabel"\n [matTooltipDisabled]="_previousButtonsDisabled()"\n [matTooltipPosition]="\'above\'"\n [disabled]="_previousButtonsDisabled()"\n *ngIf="showFirstLastButtons">\n <svg class="mat-paginator-icon" viewBox="0 0 24 24" focusable="false">\n <path d="M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"/>\n </svg>\n </button>\n <button mat-icon-button type="button"\n class="mat-paginator-navigation-previous"\n (click)="previousPage()"\n [attr.aria-label]="_intl.previousPageLabel"\n [matTooltip]="_intl.previousPageLabel"\n [matTooltipDisabled]="_previousButtonsDisabled()"\n [matTooltipPosition]="\'above\'"\n [disabled]="_previousButtonsDisabled()">\n <svg class="mat-paginator-icon" viewBox="0 0 24 24" focusable="false">\n <path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/>\n </svg>\n </button>\n\n <div class="mat-paginator-range-label">\n {{_intl.getRangeLabel(pageIndex, pageSize, length)}}\n </div>\n\n <button mat-icon-button type="button"\n class="mat-paginator-navigation-next"\n (click)="nextPage()"\n [attr.aria-label]="_intl.nextPageLabel"\n [matTooltip]="_intl.nextPageLabel"\n [matTooltipDisabled]="_nextButtonsDisabled()"\n [matTooltipPosition]="\'above\'"\n [disabled]="_nextButtonsDisabled()">\n <svg class="mat-paginator-icon" viewBox="0 0 24 24" focusable="false">\n <path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/>\n </svg>\n </button>\n <button mat-icon-button type="button"\n class="mat-paginator-navigation-last"\n (click)="lastPage()"\n [attr.aria-label]="_intl.lastPageLabel"\n [matTooltip]="_intl.lastPageLabel"\n [matTooltipDisabled]="_nextButtonsDisabled()"\n [matTooltipPosition]="\'above\'"\n [disabled]="_nextButtonsDisabled()"\n *ngIf="showFirstLastButtons">\n <svg class="mat-paginator-icon" viewBox="0 0 24 24" focusable="false">\n <path d="M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"/>\n </svg>\n </button>\n </div>\n </div>\n</div>\n',styles:[".mat-paginator{display:block}.mat-paginator-outer-container{display:flex}.mat-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap-reverse;width:100%}.mat-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}[dir=rtl] .mat-paginator-page-size{margin-right:0;margin-left:8px}.mat-paginator-page-size-label{margin:0 4px}.mat-paginator-page-size-select{margin:6px 4px 0;width:81px}.mat-paginator-range-label{margin:0 32px 0 24px}.mat-paginator-range-actions{display:flex;align-items:center}.mat-paginator-icon{width:28px;fill:currentColor}[dir=rtl] .mat-paginator-icon{transform:rotate(180deg)}"]}]}];var je=function(){};function Ve(e){return new ke(e).getPaginatorIntl()}je.decorators=[{type:t.NgModule,args:[{exports:[xe,Ce,ye,ve,be,Me,we,Pe,Oe,Se],declarations:[xe,Ce,ye,ve,be,Me,we,Pe,Oe,Se],imports:[n.CommonModule,x.MatTableModule,M.MatPaginatorModule,p.MatButtonModule,c.MatIconModule,de,o.TranslateModule,w.MatFormFieldModule,I.MatSelectModule,P.MatTooltipModule],providers:[{provide:M.MatPaginatorIntl,deps:[o.TranslateService],useFactory:Ve}]}]}];var Ae=function(){function e(){this.filtro={},this.items=[]}return Object.defineProperty(e.prototype,"hasNext",{get:function(){return!!this.nextPage},enumerable:!1,configurable:!0}),e.prototype.ngAfterViewInit=function(){this.reset()},e.prototype.reset=function(e){return void 0===e&&(e=this.filtro),G(this,void 0,void 0,(function(){return U(this,(function(t){switch(t.label){case 0:return this.filtro=e,this.items=[],this.nextPage=void 0,[4,this.next()];case 1:return t.sent(),[2]}}))}))},e.prototype.next=function(e){return void 0===e&&(e=this.infiniteTable.loader),G(this,void 0,void 0,(function(){var t=this;return U(this,(function(n){return clearTimeout(this.timeoutConsulta),this.timeoutConsulta=setTimeout((function(){e.listen(t.consulta(e)).toPromise()}),800),[2]}))}))},e.prototype.consulta=function(e){return G(this,void 0,void 0,(function(){var e;return U(this,(function(t){switch(t.label){case 0:return[4,this.consultaEntidades(this.nextPage)];case 1:return e=t.sent(),this.items=W(this.items,e.itens||[]),this.nextPage=e.nextPage,[2]}}))}))},e.prototype.remove=function(e){return G(this,void 0,void 0,(function(){return U(this,(function(t){switch(t.label){case 0:return[4,this.dialogService.confirma("mcl.consulta.confirma-remocao").toPromise()];case 1:return t.sent()?[4,this.loaderService.listen(this.deleteEntidade(e)).toPromise()]:[3,3];case 2:t.sent(),this.reset(),t.label=3;case 3:return[2]}}))}))},e}();Ae.decorators=[{type:t.Component,args:[{template:""}]}],Ae.propDecorators={infiniteTable:[{type:t.ViewChild,args:[Oe]}]};var Te=function(){function e(){this.filtro={}}return e.prototype.ngAfterViewInit=function(){this.reset()},e.prototype.reset=function(e){return void 0===e&&(e=this.filtro),G(this,void 0,void 0,(function(){return U(this,(function(t){switch(t.label){case 0:return this.filtro=e,this.page=void 0,[4,this.busca()];case 1:return t.sent(),[2]}}))}))},e.prototype.busca=function(e){return void 0===e&&(e={pagina:1,tamanhoPagina:this.page&&this.page.tamanhoPagina||this.infiniteTable.sizes[0],loader:this.infiniteTable.loader}),G(this,void 0,void 0,(function(){var t=this;return U(this,(function(n){return clearTimeout(this.timeoutConsulta),this.timeoutConsulta=setTimeout((function(){return G(t,void 0,void 0,(function(){var t;return U(this,(function(n){switch(n.label){case 0:return t=this,[4,e.loader.listen(this.consultaEntidades(e.pagina,e.tamanhoPagina)).toPromise()];case 1:return t.page=n.sent(),[2]}}))}))}),300),[2]}))}))},e.prototype.remove=function(e){return G(this,void 0,void 0,(function(){return U(this,(function(t){switch(t.label){case 0:return[4,this.dialogService.confirma("mcl.consulta.confirma-remocao").toPromise()];case 1:return t.sent()?[4,this.loaderService.listen(this.deleteEntidade(e)).toPromise()]:[3,3];case 2:t.sent(),t.label=3;case 3:return[2]}}))}))},e}();Te.decorators=[{type:t.Component,args:[{template:""}]}],Te.propDecorators={infiniteTable:[{type:t.ViewChild,args:[Pe]}]};var Ee=function(){function e(){this.entidade={}}return e.prototype.ngOnInit=function(){var e=this;this.activatedRoute.params.subscribe((function(t){t.id&&e.loaderService.listen(e.detalhaEntidade(t.id)).subscribe((function(t){return e.entidade=t}))}))},e.prototype.salva=function(e){return G(this,void 0,void 0,(function(){return U(this,(function(t){switch(t.label){case 0:return e.valid?[4,this.loaderService.listen(this.salvaEntidade()).toPromise()]:[2];case 1:return t.sent(),this.mensageriaService.addMensagem("mcl.edicao.salvo-sucesso"),[2]}}))}))},e}();Ee.decorators=[{type:t.Component,args:[{template:""}]}];var _e=function(){function e(){}return e.prototype.salva=function(e){return G(this,void 0,void 0,(function(){var t;return U(this,(function(n){switch(n.label){case 0:return e.valid?[4,this.loaderService.listen(this.salvaEntidade()).toPromise()]:[2];case 1:return t=n.sent(),this.mensageriaService.addMensagem("mcl.edicao.salvo-sucesso"),this.dialogRef.close(t),[2]}}))}))},e.prototype.remove=function(e){return G(this,void 0,void 0,(function(){return U(this,(function(t){switch(t.label){case 0:return[4,this.dialogService.confirma("mcl.consulta.confirma-remocao").toPromise()];case 1:return t.sent()?[4,this.loaderService.listen(this.deleteEntidade(e)).toPromise()]:[3,3];case 2:t.sent(),this.dialogRef.close(!0),t.label=3;case 3:return[2]}}))}))},e}(),Fe=function(){};Fe.decorators=[{type:t.NgModule,args:[{declarations:[],exports:[],imports:[n.CommonModule]}]}];var Le=function(){function e(){}return e.prototype.validate=function(e){if(e.value&&e.value.getTime()<=(new Date).getTime())return{futuro:!0}},e}();Le.decorators=[{type:t.Directive,args:[{selector:"[mclFuturo]",providers:[{provide:u.NG_VALIDATORS,useExisting:Le,multi:!0}]}]}],Le.ctorParameters=function(){return[]};var $e=function(){function e(){this.datePipe=new n.DatePipe("pt-br"),this.permiteDataIgual=!0,this.onValidatorChange=function(){}}return e.prototype.registerOnValidatorChange=function(e){this.onValidatorChange=e},Object.defineProperty(e.prototype,"dataMaxima",{get:function(){var e=this.bgcDataMaxAtual||""===this.bgcDataMaxAtual?new Date:void 0;return e&&this._dataMaxima?moment(e).isBefore(this._dataMaxima,"day")?e:this._dataMaxima:e||this._dataMaxima},set:function(e){this._dataMaxima=moment(e).toDate(),this.onValidatorChange()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataMinima",{get:function(){var e=this.bgcDataMinAtual||""===this.bgcDataMinAtual?new Date:void 0;return e&&this._dataMinima?moment(e).isAfter(this._dataMinima,"day")?this._dataMinima:e:e||this._dataMinima},set:function(e){this._dataMinima=moment(e).toDate(),this.onValidatorChange()},enumerable:!1,configurable:!0}),e.prototype.validate=function(e){if(!e.value)return null;if("Invalid Date"===e.value.toString()||e.value.getUTCFullYear()<1900)return{date:!0};var t=this.dataMinima;if(t)if(this.permiteDataIgual){if(moment(e.value).isBefore(t,"day"))return{dataMinIgual:{data:this.datePipe.transform(t,"dd/MM/yyyy")}}}else if(!moment(e.value).isAfter(t,"day"))return{dataMin:{data:this.datePipe.transform(t,"dd/MM/yyyy")}};var n=this.dataMaxima;if(n)if(this.permiteDataIgual){if(moment(e.value).isAfter(n,"day"))return{dataMaxIgual:{data:this.datePipe.transform(n,"dd/MM/yyyy")}}}else if(!moment(e.value).isBefore(n,"day"))return{dataMax:{data:this.datePipe.transform(n,"dd/MM/yyyy")}};return null},e.prototype.isFDS=function(e){return 0===e.getDay()||6===e.getDay()},e}();$e.decorators=[{type:t.Directive,args:[{selector:"[mclDataMinAtual],[mclDataMaxAtual],[mclDataMax],[mclDataMin]",providers:[{provide:u.NG_VALIDATORS,useExisting:$e,multi:!0}]}]}],$e.ctorParameters=function(){return[]},$e.propDecorators={bgcDataMinAtual:[{type:t.Input}],bgcDataMaxAtual:[{type:t.Input}],permiteDataIgual:[{type:t.Input}],dataMaxima:[{type:t.Input,args:["bgcDataMax"]}],dataMinima:[{type:t.Input,args:["bgcDataMin"]}]};var qe=function(){};qe.decorators=[{type:t.NgModule,args:[{declarations:[Le,$e],exports:[Le,$e],imports:[n.CommonModule]}]}];var Ne=function(){function e(t,n,r,o){this.errorStateMatcher=t,this.ngControl=n,this.parentForm=r,this.parentFormGroup=o,this.$disabled=!1,this.$required=!1,this.focused=!1,this.stateChanges=new l.Subject,this.id="custom-input-"+e.nextId++,this.describedBy="",this.onChange=function(e){},this.onTouched=function(){},null!=this.ngControl&&(this.ngControl.valueAccessor=this)}return Object.defineProperty(e.prototype,"value",{get:function(){return this.$value},set:function(e){this.$value=e,this.onChange(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return!this.value},enumerable:!1,configurable:!0}),e.prototype.onContainerClick=function(e){},Object.defineProperty(e.prototype,"shouldLabelFloat",{get:function(){return!this.empty||this.input&&this.input.nativeElement.value||this.focused},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"placeholder",{get:function(){return this.$placeholder},set:function(e){this.$placeholder=e,this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return this.$required},set:function(e){this.$required=O.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this.$disabled},set:function(e){this.$disabled=O.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"errorState",{get:function(){return this.errorStateMatcher.isErrorState(this.ngControl.control,this.parentFormGroup||this.parentForm)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controlType",{get:function(){return"custom-input"},enumerable:!1,configurable:!0}),e.prototype.setDescribedByIds=function(e){this.describedBy=e.join(" ")},e.prototype.ngOnDestroy=function(){this.stateChanges.complete()},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.writeValue=function(e){this.$value=e},e}();Ne.nextId=0,Ne.decorators=[{type:t.Component,args:[{template:""}]}],Ne.ctorParameters=function(){return[{type:D.ErrorStateMatcher},{type:u.NgControl},{type:u.NgForm},{type:u.FormGroupDirective}]},Ne.propDecorators={input:[{type:t.ViewChild,args:["input"]}],id:[{type:t.HostBinding}],describedBy:[{type:t.HostBinding,args:["attr.aria-describedby"]}],shouldLabelFloat:[{type:t.HostBinding,args:["class.floating"]}],placeholder:[{type:t.Input}],required:[{type:t.Input}],disabled:[{type:t.Input}]};var Be=function(e){function t(t,n,r,o,i,a){var s=e.call(this,t,n,r,o)||this;return s.adapter=i,s.formats=a,s.type="date",s}return H(t,e),Object.defineProperty(t.prototype,"empty",{get:function(){return!this.$maskedValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maskedValue",{get:function(){return this.$maskedValue},set:function(e){this.$maskedValue!==e&&(this.onTouched(),this.$maskedValue=e,e&&e.match(new RegExp("^"+this.mask.replace(/#/g,"\\d")+"$"))?this.innerValue=this.adapter.parse(e,this.format).toDate():this.innerValue=void 0,this.onChange(this.innerValue),this.stateChanges.next())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mask",{get:function(){switch(this.type){case"date":return"##/##/####";case"time":return"##:##"}return"##/##/#### ##:##"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"format",{get:function(){switch(this.type){case"date":return this.formats.display.dateInput;case"time":return this.formats.display.timeInput}return this.formats.display.datetimeInput},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.innerValue},set:function(e){this.innerValue!==e&&(this.onTouched(),e?(this.innerValue=e instanceof Date?e:e.toDate(),this.$maskedValue=this.adapter.format(R(this.innerValue),this.format)):(this.innerValue=void 0,this.$maskedValue=""),this.onChange(this.innerValue),this.stateChanges.next())},enumerable:!1,configurable:!0}),t.prototype.writeValue=function(e){this.innerValue=e,this.$maskedValue=e?this.adapter.format(R(e),this.format):"",this.stateChanges.next()},t}(Ne);Be.decorators=[{type:t.Component,args:[{selector:"mcl-input-datetime",template:'<div class="dateinput">\n <input matInput autocomplete="false" [disabled]="disabled" ngModel\n [readonly]="readonly" [(mclModel)]="maskedValue" [mask]="mask"\n (focus)="focused = true" (blur)="focused = false" [keepMask]="true"\n />\n <mat-datetimepicker [disabled]="disabled || readonly"\n [type]="type" #pickerData></mat-datetimepicker>\n <mat-datetimepicker-toggle [for]="pickerData"></mat-datetimepicker-toggle>\n</div>\n<input class="hidden" [(ngModel)]="value" [matDatetimepicker]="pickerData" />\n',providers:[{provide:w.MatFormFieldControl,useExisting:Be}],styles:[".dateinput{display:flex}.dateinput input{flex:1 1 auto}.dateinput mat-datetimepicker-toggle{margin:-16px 0 -6px}.hidden{display:none}"]}]}],Be.ctorParameters=function(){return[{type:D.ErrorStateMatcher},{type:u.NgControl,decorators:[{type:t.Optional},{type:t.Self}]},{type:u.NgForm,decorators:[{type:t.Optional}]},{type:u.FormGroupDirective,decorators:[{type:t.Optional}]},{type:S.DatetimeAdapter,decorators:[{type:t.Inject,args:[S.DatetimeAdapter]}]},{type:void 0,decorators:[{type:t.Inject,args:[S.MAT_DATETIME_FORMATS]}]}]},Be.propDecorators={type:[{type:t.Input}],readonly:[{type:t.Input}],name:[{type:t.Input}],picker:[{type:t.ViewChild,args:["pickerData"]}]};var Re={parse:{dateInput:"L",monthInput:"MMMM",timeInput:"LT",datetimeInput:"L LT"},display:{dateInput:"L",monthInput:"MMMM",datetimeInput:"L LT",timeInput:"LT",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY",popupHeaderDateLabel:"ddd, DD MMM"}},ze=function(){};ze.decorators=[{type:t.NgModule,args:[{declarations:[Be],imports:[n.CommonModule,k.MatInputModule,u.FormsModule,A.MatDatepickerModule,S.MatDatetimepickerModule,j.MomentDatetimeModule,de],exports:[Be],providers:[{provide:D.MAT_DATE_LOCALE,useExisting:t.LOCALE_ID},{provide:S.DatetimeAdapter,useClass:j.MomentDatetimeAdapter},{provide:S.MAT_DATETIME_FORMATS,useValue:Re}]}]}];var He=function(){function e(n,r,o,i,s,l){this.errorStateMatcher=n,this.ngControl=r,this.parentForm=o,this.changeDetectorRef=i,this.parentFormGroup=s,this.arquivoService=l,this.$disabled=!1,this.$required=!1,this.template="preview",this.selectCancel=new t.EventEmitter,this.stateChanges=new a.Subject,this.change=new t.EventEmitter,this.id="input-fileupload-"+e.nextId++,this.describedBy="",this.onChange=function(e){},this.onTouched=function(){},null!=this.ngControl&&(this.ngControl.valueAccessor=this)}return Object.defineProperty(e.prototype,"focused",{get:function(){return this.value&&(this.multiple?this.value.find((function(e){return e.loading})):this.value.loading)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return!this.value},enumerable:!1,configurable:!0}),e.prototype.onContainerClick=function(e){},Object.defineProperty(e.prototype,"shouldLabelFloat",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"placeholder",{get:function(){return this.$placeholder},set:function(e){this.$placeholder=e,this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return this.$required},set:function(e){this.$required=O.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this.$disabled},set:function(e){this.$disabled=O.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"errorState",{get:function(){return this.errorStateMatcher.isErrorState(this.ngControl.control,this.parentFormGroup||this.parentForm)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controlType",{get:function(){return"input-fileupload"},enumerable:!1,configurable:!0}),e.prototype.setDescribedByIds=function(e){this.describedBy=e.join(" ")},e.prototype.ngOnDestroy=function(){this.stateChanges.complete()},e.prototype.upload=function(e){var t=this;return new a.Observable((function(n){if(!t.validaFormato(e.nome))return e.error={fileFormat:!0},n.error("Formato inválido"),t.onChange(t.value),t.change.emit(t.value),void t.stateChanges.next();if(t.limite){var r=t.parseLimite();if(e.length>r)return e.error={fileSize:{limite:t.limite}},n.error("Tamanho inválido"),t.onChange(t.value),t.change.emit(t.value),void t.stateChanges.next()}t.arquivoService.upload(e.file).subscribe((function(r){"conclusao"===r.type?(e.progresso=void 0,t.multiple?(t.value=W((t.value||[]).map((function(t){return t===e?r.attachment:t}))),t.onChange(t.value),t.change.emit(t.value),t.stateChanges.next()):(t.value=r.attachment,t.onChange(r.attachment),t.change.emit(r.attachment),t.stateChanges.next()),n.next(),n.complete()):"progresso"===r.type&&(e.progresso=r.progresso,t.stateChanges.next())}),(function(r){e.error={fileError:!0},t.onChange(t.value),t.change.emit(t.value),t.stateChanges.next(),n.error(r)}))}))},e.prototype.parseLimite=function(){var e=Number(this.limite.replace(/\D+/g,""));return this.limite.toUpperCase().indexOf("GB")>=0&&(e=1024*e*1024*1024),this.limite.toUpperCase().indexOf("MB")>=0&&(e=1024*e*1024),this.limite.toUpperCase().indexOf("KB")>=0&&(e*=1024),e},e.prototype.validaFormato=function(e){var t,n;if(this.accept){var r=[];r="string"==typeof this.accept?[this.accept]:this.accept;try{for(var o=Y(r),i=o.next();!i.done;i=o.next()){var a=i.value;if(e.toLowerCase().indexOf(a.toLowerCase())===e.length-a.length)return!0}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return!1}return!0},e.prototype.uploadNext=function(){var e,t,n=this;if(this.multiple){if(this.value)try{for(var r=Y(this.value),o=r.next();!o.done;o=r.next()){var i=o.value;if(i.loading&&!i.error){this.upload(i).subscribe((function(){return n.uploadNext()}),(function(e){return n.uploadNext()}));break}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}}else this.value&&this.value.loading&&!this.value.error&&this.upload(this.value).subscribe((function(){return n.uploadNext()}),(function(e){return n.uploadNext()}))},e.prototype.onFileChange=function(e){var t,n;if(this.onTouched(),e.target.files&&e.target.files.length){if(this.multiple){var r=[];try{for(var o=Y(e.target.files),i=o.next();!i.done;i=o.next()){var a=i.value;r.push({file:a,loading:!0,nome:a.name,length:a.size})}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}this.value=W(this.value||[],r),this.onChange(this.value),this.change.emit(this.value),this.stateChanges.next()}else this.value={file:e.target.files[0],length:e.target.files[0].size,loading:!0,nome:e.target.files[0].name},this.onChange(this.value),this.change.emit(this.value),this.stateChanges.next();this.uploadNext()}else this.selectCancel.emit();e.target.value=""},e.prototype.openFileChooser=function(){this.disabled||this.input.nativeElement.click()},e.prototype.remover=function(e){return G(this,void 0,void 0,(function(){return U(this,(function(t){return this.value&&(this.multiple?Array.isArray(this.value)&&(this.value.splice(this.value.indexOf(e),1),this.value.length?(this.value=W(this.value),this.onChange(this.value),this.change.emit(this.value),this.stateChanges.next()):(this.value=void 0,this.onChange(void 0),this.change.emit(void 0),this.stateChanges.next())):(this.value=void 0,this.onChange(void 0),this.change.emit(void 0),this.stateChanges.next())),[2]}))}))},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.writeValue=function(e){e?this.multiple?(this.value=e.map((function(e){return"string"==typeof e?{url:e}:e})),this.stateChanges.next()):"string"==typeof e?(this.value={url:e},this.stateChanges.next()):(this.value=e,this.stateChanges.next()):(this.value=e,this.stateChanges.next())},e}();He.nextId=0,He.decorators=[{type:t.Component,args:[{selector:"mcl-input-fileupload",template:'<div *ngIf="multiple && template == \'chips\'" class="chips">\r\n <mat-chip-list *ngIf="value?.length">\r\n <mat-chip [ngClass]="{\'error\':arquivo.loading && arquivo.error,\'success\':!arquivo.loading}"\r\n *ngFor="let arquivo of value">\r\n <mat-spinner *ngIf="arquivo.loading && !arquivo.error"\r\n [value]="arquivo.progresso" [diameter]="24"\r\n ></mat-spinner>\r\n <mat-icon *ngIf="arquivo.loading && arquivo.error" class="error">remove_circle_outline</mat-icon>\r\n <mat-icon *ngIf="!arquivo.loading" class="success">check_circle_outline</mat-icon>\r\n {{ arquivo.nome || arquivo.filename }}\r\n <a *ngIf="!disabled" (click)="remover(arquivo)" href="javascript:void(0)">\r\n <mat-icon>close</mat-icon>\r\n </a>\r\n </mat-chip>\r\n </mat-chip-list>\r\n\r\n <hr *ngIf="value?.length && !disabled"/>\r\n\r\n <input *ngIf="!disabled" type="file" (change)="onFileChange($event)" #input [multiple]="multiple"/>\r\n</div>\r\n\r\n<div *ngIf="multiple && template == \'preview\'" class="previews">\r\n <div *ngIf="value?.length" fxLayout="row wrap" fxLayoutGap="20px" fxFlexAlign="center">\r\n <div *ngFor="let arquivo of value">\r\n <div class="preview" [ngClass]="{\'error\':arquivo.loading && arquivo.error,\'success\':!arquivo.loading}">\r\n <mcl-preview-arquivo [group]="value" [arquivo]="arquivo"></mcl-preview-arquivo>\r\n\r\n <div class="footer" *ngIf="!disabled">\r\n <mat-spinner *ngIf="arquivo.loading && !arquivo.error"\r\n [value]="arquivo.progresso" [diameter]="24"\r\n ></mat-spinner>\r\n <mat-icon *ngIf="arquivo.loading && arquivo.error" class="error">remove_circle_outline</mat-icon>\r\n <mat-icon *ngIf="!arquivo.loading" class="success">check_circle_outline</mat-icon>\r\n <span>{{ arquivo.nome || arquivo.filename }}</span>\r\n <a *ngIf="!disabled" (click)="remover(arquivo)" href="javascript:void(0)">\r\n <mat-icon>close</mat-icon>\r\n </a>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n <hr *ngIf="value?.length && !disabled"/>\r\n\r\n <input *ngIf="!disabled" type="file" (change)="onFileChange($event)" #input [multiple]="multiple"/>\r\n</div>\r\n\r\n\r\n<div *ngIf="template == \'manual\'">\r\n <input type="file" [disabled]="disabled" (change)="onFileChange($event)" #input\r\n [multiple]="multiple" style="display: none"/>\r\n</div>\r\n\r\n<ng-container *ngIf="!multiple && template != \'manual\'">\r\n <input #input type="file" style="display: none"\r\n (change)="onFileChange($event)"/>\r\n\r\n <div class="input">\r\n <button mat-icon-button type="button"\r\n (click)="openFileChooser()"\r\n *ngIf="!value"\r\n matPrefix>\r\n <mat-icon>attach_file</mat-icon>\r\n </button>\r\n <button mat-icon-button type="button"\r\n [mclDownloadArquivo]="value"\r\n *ngIf="value && !value.loading && !value.error"\r\n matPrefix>\r\n <mat-icon>download</mat-icon>\r\n </button>\r\n <button mat-icon-button type="button" matPrefix\r\n *ngIf="value?.error" disabled>\r\n <mat-icon>warning</mat-icon>\r\n </button>\r\n <button mat-icon-button type="button" matPrefix\r\n *ngIf="value?.loading && !value?.error" disabled>\r\n <mat-spinner [value]="value.progresso"\r\n [diameter]="24"></mat-spinner>\r\n </button>\r\n <input matInput readonly (click)="openFileChooser()" [required]="required"\r\n *ngIf="!value" value="Selecione um arquivo..."/>\r\n <input matInput readonly [required]="required"\r\n *ngIf="value && value.loading && !value.error" value="Submetendo arquivo..."/>\r\n <input matInput readonly [required]="required"\r\n *ngIf="value && value.error" [value]="value?.nome || value?.filename"/>\r\n <input matInput readonly [mclDownloadArquivo]="value" [required]="required"\r\n *ngIf="value && !value.loading" [value]="value?.nome || value?.filename"/>\r\n <button mat-icon-button type="button" matSuffix\r\n matTooltip="Remover" (click)="remover(value)"\r\n *ngIf="value && (!value.loading || value?.error) && !disabled">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n</ng-container>\r\n',providers:[{provide:w.MatFormFieldControl,useExisting:He}],styles:["span{opacity:0;transition:opacity .2s}:host.floating span{opacity:1}.preview .footer>mat-icon,.preview .footer>mat-spinner,mat-chip>mat-icon,mat-chip>mat-spinner{margin-right:5px;vertical-align:middle}.preview .footer a,mat-chip a{padding:5px}.preview .footer a mat-icon,mat-chip a mat-icon{margin-left:10px;vertical-align:middle}.preview.error,mat-chip.error{color:red}.preview.success,mat-chip.success{color:green}.preview{text-align:center;width:200px;overflow:hidden;margin:0 auto 20px}.preview mcl-preview-arquivo{margin:auto;display:block}.preview .footer{display:flex;text-align:left}.preview .footer span{flex:1 1 auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.preview .footer a,.preview .footer mat-icon{flex:1}.input{display:flex}.input input{flex:1 1 auto}"]}]}],He.ctorParameters=function(){return[{type:D.ErrorStateMatcher},{type:u.NgControl,decorators:[{type:t.Optional},{type:t.Self}]},{type:u.NgForm,decorators:[{type:t.Optional}]},{type:t.ChangeDetectorRef},{type:u.FormGroupDirective,decorators:[{type:t.Optional}]},{type:void 0,decorators:[{type:t.Inject,args:[ue]}]}]},He.propDecorators={multiple:[{type:t.Input}],limite:[{type:t.Input}],accept:[{type:t.Input}],template:[{type:t.Input}],input:[{type:t.ViewChild,args:["input"]}],selectCancel:[{type:t.Output}],stateChanges:[{type:t.Output,args:["change"]}],change:[{type:t.Output}],id:[{type:t.HostBinding}],describedBy:[{type:t.HostBinding,args:["attr.aria-describedby"]}],shouldLabelFloat:[{type:t.HostBinding,args:["class.floating"]}],placeholder:[{type:t.Input}],required:[{type:t.Input}],disabled:[{type:t.Input}]};var Ge=function(){function e(){}return e.prototype.validate=function(e){if(e.value)if(this.multiple&&Array.isArray(e.value)){var t=e.value.find((function(e){return e.loading&&e.error}));if(t)return t.error;if(e.value.find((function(e){return e.loading})))return{fileUploading:!0}}else{if(e.value.loading&&e.value.error)return e.value.error;if(e.value.loading)return{fileUploading:!0}}},e}();Ge.decorators=[{type:t.Directive,args:[{selector:"mcl-input-fileupload,[mclFileupload]",providers:[{provide:u.NG_VALIDATORS,useExisting:Ge,multi:!0}]}]}],Ge.propDecorators={multiple:[{type:t.Input}]};var Ue=function(){};Ue.decorators=[{type:t.NgModule,args:[{declarations:[He,Ge],exports:[He,Ge],imports:[n.CommonModule,u.FormsModule,T.MatChipsModule,d.MatProgressSpinnerModule,c.MatIconModule,h.FlexLayoutModule,ge,p.MatButtonModule,k.MatInputModule,P.MatTooltipModule]}]}];var Ye=function(){function e(e,t,n){void 0===n&&(n=!1),this.pool=e,this.value=t,this.subject=new l.BehaviorSubject(n)}return Object.defineProperty(e.prototype,"model",{get:function(){return this.pool.model()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"observable",{get:function(){return this.subject},enumerable:!1,configurable:!0}),e.prototype.setSelected=function(e){this.subject.next(e)},e.prototype.dispose=function(){this.subject.complete()},e.prototype.touched=function(){this.pool.touched()},e}(),Qe=function(){function e(e){this.name=e,this._nodes=new l.BehaviorSubject([]),this._touch=new l.Subject,this._groups=[],this.lastValues=[]}return e.prototype.model=function(){return this._nodes.pipe(g.switchMap((function(e){return l.combineLatest(e.map((function(e){return e.observable.pipe(g.map((function(t){return{selected:t,value:e.value}})))})))}))).pipe(g.map((function(e){var t=e.filter((function(e){return e.selected})).map((function(e){return e.value}));return t.length?t:void 0})))},e.prototype.touch=function(){return this._touch},e.prototype.all=function(){return this._nodes.pipe(g.switchMap((function(e){return l.combineLatest(e.map((function(e){return e.observable})))}))).pipe(g.map((function(e){var t,n;if(e.length){var r=e[0];try{for(var o=Y(e),i=o.next();!i.done;i=o.next()){if(i.value!==r)return}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}return!1})))},Object.defineProperty(e.prototype,"empty",{get:function(){return!this._nodes.value.length&&!this._groups.length},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this._nodes.complete(),this._touch.complete()},e.prototype.touched=function(){this._touch.next()},e.prototype.register=function(e){var t=!!this.lastValues&&this.lastValues.indexOf(e)>=0,n=new Ye(this,e,t);return this._nodes.next(W(this._nodes.value,[n])),n},e.prototype.unregister=function(e){this._nodes.next(this._nodes.value.filter((function(t){return t!==e}))),e.dispose()},e.prototype.registerGroup=function(e){this._groups.push(e)},e.prototype.unregisterGroup=function(e){this._groups.splice(this._groups.indexOf(e),1)},e.prototype.writeValue=function(e){e!==this.lastValues&&(this.lastValues=e||[],e?this._nodes.value.forEach((function(t){t.setSelected(e.indexOf(t.value)>=0)})):this._nodes.value.forEach((function(e){e.setSelected(!1)})))},e.prototype.setAll=function(e){this._nodes.value.forEach((function(t){return t.setSelected(e)}))},e}(),We=function(){function e(){this.nodes={}}return e.prototype.getPool=function(e){return this.nodes[e]||(this.nodes[e]=new Qe(e)),this.nodes[e]},e.prototype.registerGroup=function(e,t){var n=this.getPool(e);return n.registerGroup(t),n},e.prototype.unregisterGroup=function(e,t){this.nodes[e]&&(this.nodes[e].unregisterGroup(t),this.nodes[e].empty&&(this.nodes[e].dispose(),this.nodes[e]=void 0))},e.prototype.unregister=function(e,t){this.nodes[e]&&(this.nodes[e].unregister(t),this.nodes[e].empty&&(this.nodes[e].dispose(),this.nodes[e]=void 0))},e.prototype.register=function(e,t){return this.getPool(e).register(t)},e.prototype.setAll=function(e,t){this.nodes[e]&&this.nodes[e].setAll(t)},e.prototype.writeValue=function(e,t){var n;null===(n=this.getPool(e))||void 0===n||n.writeValue(t)},e}();We.decorators=[{type:t.Injectable}];var Je=function(){function e(e){this.fotonOptionCheckboxService=e,this.change=new t.EventEmitter}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e,this.pool=this.fotonOptionCheckboxService.getPool(e),this.selected=this.pool.all()},enumerable:!1,configurable:!0}),e.prototype.setSelected=function(e){this.pool.touched(),this.fotonOptionCheckboxService.setAll(this.name,e),this.change.emit()},e}();Je.decorators=[{type:t.Component,args:[{selector:"mcl-option-checkbox[select-all-option]",template:'<mat-checkbox [disabled]="disabled"\n [ngModel]="selected | async"\n (ngModelChange)="setSelected($event)"\n [indeterminate]="(selected | async) === undefined" >\n <ng-content></ng-content>\n</mat-checkbox>\n'}]}],Je.ctorParameters=function(){return[{type:We}]},Je.propDecorators={disabled:[{type:t.Input}],change:[{type:t.Output}],name:[{type:t.Input}]};var Xe=function(){function e(e){this.fotonOptionCheckboxService=e,this.change=new t.EventEmitter}return e.prototype.setSelected=function(e){this.node&&(this.node.touched(),this.node.setSelected(e),this.change.emit())},Object.defineProperty(e.prototype,"value",{get:function(){return this.node?this.node.value:void 0},set:function(e){e!=this.value&&(this.node?this.node.value=e:this._value=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){e===this.name||this.node||(this.node=this.fotonOptionCheckboxService.register(e,this._value),this.selected=this.node.observable,this._name=e)},enumerable:!1,configurable:!0}),e.prototype.onBlur=function(){},e.prototype.ngOnDestroy=function(){this.fotonOptionCheckboxService.unregister(this.name,this.node)},e}();Xe.decorators=[{type:t.Component,args:[{selector:"mcl-option-checkbox:not([select-all-option])",template:'<mat-checkbox [disabled]="disabled"\n [ngModel]="selected | async"\n (ngModelChange)="setSelected($event)"\n [indeterminate]="(selected | async) === undefined" >\n <ng-content></ng-content>\n</mat-checkbox>\n'}]}],Xe.ctorParameters=function(){return[{type:We}]},Xe.propDecorators={disabled:[{type:t.Input}],change:[{type:t.Output}],value:[{type:t.Input}],name:[{type:t.Input}]};var Ke=function(){function e(e){this.optionCheckboxService=e,this.change=new t.EventEmitter,this.touched=new t.EventEmitter,this.onTouchedCallback=function(){},this.onChangeCallback=function(){}}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){var t=this;e===this.name||this.pool||(this.pool=this.optionCheckboxService.registerGroup(e,this),this.pool.touch().subscribe((function(){t.onTouchedCallback(),t.touched.emit()})),this.pool.model().subscribe((function(e){clearTimeout(t.callbackTimeout),t.callbackTimeout=setTimeout((function(){t.onChangeCallback(e),t.change.emit(e)}))})),this._name=e)},enumerable:!1,configurable:!0}),e.prototype.onBlur=function(){},e.prototype.ngOnDestroy=function(){this.optionCheckboxService.unregisterGroup(this.name,this)},e.prototype.writeValue=function(e){this.optionCheckboxService.writeValue(this.name,e)},e.prototype.registerOnChange=function(e){this.onChangeCallback=e},e.prototype.registerOnTouched=function(e){this.onTouchedCallback=e},e}();Ke.decorators=[{type:t.Component,args:[{selector:"mcl-option-checkbox-group",template:"",providers:[{provide:u.NG_VALUE_ACCESSOR,useExisting:Ke,multi:!0}]}]}],Ke.ctorParameters=function(){return[{type:We}]},Ke.propDecorators={disabled:[{type:t.Input}],change:[{type:t.Output}],touched:[{type:t.Output}],name:[{type:t.Input}]};var Ze=function(){};Ze.decorators=[{type:t.NgModule,args:[{declarations:[Xe,Je,Ke],exports:[Xe,Je,Ke],providers:[We],imports:[n.CommonModule,u.FormsModule,E.MatCheckboxModule]}]}];var et=function(){function e(){}return e.prototype.ngOnInit=function(){},e}();et.decorators=[{type:t.Component,args:[{selector:"mcl-select-item",template:"",styles:[""]}]}],et.ctorParameters=function(){return[]},et.propDecorators={label:[{type:t.Input}],value:[{type:t.Input}]};var tt=new RegExp("àáâãäçèéêëìíîïñòóôõöùúûüýÿÀÁÂÃÄÇÈÉÊËÌÍÎÏÑÒÓÔÕÖÙÚÛÜÝŸ","g"),nt=function(){function e(){}return e.normalize=function(e){return String(e).trim().toLowerCase().replace(tt,(function(e){return"aaaaaceeeeiiiinooooouuuuyyAAAAACEEEEIIIINOOOOOUUUUYY".charAt(tt.source.indexOf(e)-1)}))},e.like=function(t,n){return e.normalize(t).indexOf(e.normalize(n))>=0},e}(),rt=function(){function e(t,n,r,o){var i=this;this.errorStateMatcher=t,this.ngControl=n,this.parentForm=r,this.parentFormGroup=o,this.onChange=function(e){},this.onTouched=function(){},this.$disabled=!1,this.$required=!1,this.focused=!1,this.filterCtrl=new u.FormControl,this.stateChanges=new l.Subject,this.id="select-chips-"+e.nextId++,this.describedBy="",null!=this.ngControl&&(this.ngControl.valueAccessor=this),this.opcoesFiltradas=this.filterCtrl.valueChanges.pipe(g.startWith(null),g.map((function(e){return i._filter(e)})))}return Object.defineProperty(e.prototype,"value",{get:function(){return this.$value},set:function(e){this.$value=e,this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return!this.value},enumerable:!1,configurable:!0}),e.prototype.onContainerClick=function(e){},Object.defineProperty(e.prototype,"shouldLabelFloat",{get:function(){return!this.empty||this.input&&this.input.nativeElement.value||this.focused},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"placeholder",{get:function(){return this.$placeholder},set:function(e){this.$placeholder=e,this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return this.$required},set:function(e){this.$required=O.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this.$disabled},set:function(e){this.$disabled=O.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"errorState",{get:function(){return this.errorStateMatcher.isErrorState(this.ngControl.control,this.parentFormGroup||this.parentForm)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controlType",{get:function(){return"select-chips"},enumerable:!1,configurable:!0}),e.prototype.setDescribedByIds=function(e){this.describedBy=e.join(" ")},e.prototype.ngOnDestroy=function(){this.stateChanges.complete()},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.writeValue=function(e){this.value=e,this.filterCtrl.setValue(this.filterCtrl.value)},e.prototype.add=function(e){this.onTouched();var t=e.input,n=e.value,r=nt.normalize(n||""),o=this.opcoes.toArray().find((function(e){return nt.normalize(e.label)===r}));o&&(this.value&&this.value.find((function(e){return e===o.value}))||(this.value=W(this.value||[],[o.value]),this.onChange(this.value)),t&&(t.value=""),this.filterCtrl.setValue(null))},e.prototype.remove=function(e){if(this.onTouched(),this.value){var t=this.value.indexOf(e);t>=0&&this.value.splice(t,1),this.value.length||(this.value=void 0),this.onChange(this.value)}},e.prototype.selected=function(e){this.onTouched(),this.value&&this.value.find((function(t){return t===e.option.value}))||(this.value=W(this.value||[],[e.option.value]),this.onChange(this.value)),this.filterInput.nativeElement.value="",this.filterCtrl.setValue(null)},e.prototype._filter=function(e){var t=this,n=e&&nt.normalize(e);return this.opcoes.toArray().filter((function(e){return!t.value||t.value.indexOf(e.value)<0})).filter((function(e){return!n||nt.normalize(e.label).indexOf(n)>=0}))},e}();rt.nextId=0,rt.decorators=[{type:t.Component,args:[{selector:"mcl-select-chips",template:'<mat-chip-list #chipList >\n <mat-chip\n *ngFor="let item of value"\n [removable]="!disabled"\n (removed)="remove(item)">\n {{item}}\n <mat-icon matChipRemove *ngIf="!disabled" >cancel</mat-icon>\n </mat-chip>\n <input\n [placeholder]="placeholder"\n #filterInput required\n (focusin)="focused = true"\n (focusout)="focused = false"\n [formControl]="filterCtrl"\n [matAutocomplete]="filterAutocomplete"\n [matChipInputFor]="chipList"\n (matChipInputTokenEnd)="add($event)">\n</mat-chip-list>\n<mat-autocomplete #filterAutocomplete="matAutocomplete" (optionSelected)="selected($event)">\n <mat-option *ngFor="let opcao of opcoesFiltradas | async" [value]="opcao.value">\n {{opcao.label}}\n </mat-option>\n</mat-autocomplete>\n',providers:[{provide:w.MatFormFieldControl,useExisting:rt}],styles:[""]}]}],rt.ctorParameters=function(){return[{type:D.ErrorStateMatcher},{type:u.NgControl,decorators:[{type:t.Optional},{type:t.Self}]},{type:u.NgForm,decorators:[{type:t.Optional}]},{type:u.FormGroupDirective,decorators:[{type:t.Optional}]}]},rt.propDecorators={input:[{type:t.ViewChild,args:["input"]}],id:[{type:t.HostBinding}],describedBy:[{type:t.HostBinding,args:["attr.aria-describedby"]}],opcoes:[{type:t.ContentChildren,args:[et]}],filterInput:[{type:t.ViewChild,args:["filterInput"]}],filterAutocomplete:[{type:t.ViewChild,args:["filterAutocomplete"]}],shouldLabelFloat:[{type:t.HostBinding,args:["class.floating"]}],placeholder:[{type:t.Input}],required:[{type:t.Input}],disabled:[{type:t.Input}]};var ot=function(){};ot.decorators=[{type:t.NgModule,args:[{declarations:[et],exports:[et],imports:[n.CommonModule]}]}];var it=function(){};it.decorators=[{type:t.NgModule,args:[{declarations:[rt],exports:[rt,ot],imports:[n.CommonModule,T.MatChipsModule,c.MatIconModule,u.ReactiveFormsModule,_.MatAutocompleteModule,ot]}]}];var at=function(){function e(t,n,r,o){this.errorStateMatcher=t,this.ngControl=n,this.parentForm=r,this.parentFormGroup=o,this.onChange=function(e){},this.onTouched=function(){},this.$disabled=!1,this.$required=!1,this.layout="grid",this.layoutColumns=3,this.stateChanges=new l.Subject,this.id="select-radio-"+e.nextId++,this.describedBy="",null!=this.ngControl&&(this.ngControl.valueAccessor=this)}return e.prototype.ngAfterViewInit=function(){var e=this;this.opcoes.changes.subscribe((function(){e.updateOpcoes()}))},Object.defineProperty(e.prototype,"value",{get:function(){return this.$value},set:function(e){this.$value=e,this.onChange(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"focused",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return!this.value},enumerable:!1,configurable:!0}),e.prototype.onContainerClick=function(e){},Object.defineProperty(e.prototype,"shouldLabelFloat",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"placeholder",{get:function(){return this.$placeholder},set:function(e){this.$placeholder=e,this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return this.$required},set:function(e){this.$required=O.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this.$disabled},set:function(e){this.$disabled=O.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"errorState",{get:function(){return this.errorStateMatcher.isErrorState(this.ngControl.control,this.parentFormGroup||this.parentForm)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controlType",{get:function(){return"select-chips"},enumerable:!1,configurable:!0}),e.prototype.setDescribedByIds=function(e){this.describedBy=e.join(" ")},e.prototype.ngOnDestroy=function(){this.stateChanges.complete()},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.writeValue=function(e){this.updateOpcoes(e),this.$value=e},e.prototype.change=function(e,t){e._selected=t,this.value=this.opcoesToValue()},e.prototype.updateOpcoes=function(e){var t,n;void 0===e&&(e=this.value);try{for(var r=Y(this.opcoes),o=r.next();!o.done;o=r.next()){var i=o.value;i._selected=e&&e.indexOf(i.value)>=0}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.opcoesToValue=function(){var e,t,n=[];try{for(var r=Y(this.opcoes),o=r.next();!o.done;o=r.next()){var i=o.value;i._selected&&n.push(i.value)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return n.length?n:void 0},e}();at.nextId=0,at.decorators=[{type:t.Component,args:[{selector:"mcl-select-many-checkbox",template:"<div class=\"mat-checkbox-container\"\n [ngClass]=\"{'vertical':layout === 'vertical','horizontal':layout ==='horizontal','grid': layout === 'grid' }\"\n [ngStyle]=\"{'max-height': layout === 'grid' ? (((opcoes.length / layoutColumns) + 1) * 40) + 'px' : undefined}\">\n <mat-checkbox\n [required]=\"required\"\n [disabled]=\"disabled\"\n [checked]=\"opcao._selected\"\n (change)=\"change(opcao, $event.checked)\"\n *ngFor=\"let opcao of opcoes\">\n {{opcao.label}}\n </mat-checkbox>\n\n</div>\n",providers:[{provide:w.MatFormFieldControl,useExisting:at}],styles:[".mat-checkbox-container{display:flex;flex-wrap:wrap}.mat-checkbox-container.horizontal{flex-direction:row}.mat-checkbox-container.grid,.mat-checkbox-container.vertical{flex-direction:column}.mat-checkbox-container mat-checkbox{flex:1;padding:5px 5px 10px 0}@media (max-width:750px){.mat-checkbox-container{max-height:none!important}.mat-checkbox-container.grid,.mat-checkbox-container.horizontal,.mat-checkbox-container.vertical{flex-direction:column}}"]}]}],at.ctorParameters=function(){return[{type:D.ErrorStateMatcher},{type:u.NgControl,decorators:[{type:t.Optional},{type:t.Self}]},{type:u.NgForm,decorators:[{type:t.Optional}]},{type:u.FormGroupDirective,decorators:[{type:t.Optional}]}]},at.propDecorators={layout:[{type:t.Input}],layoutColumns:[{type:t.Input}],input:[{type:t.ViewChild,args:["input"]}],id:[{type:t.HostBinding}],describedBy:[{type:t.HostBinding,args:["attr.aria-describedby"]}],opcoes:[{type:t.ContentChildren,args:[et]}],shouldLabelFloat:[{type:t.HostBinding,args:["class.floating"]}],placeholder:[{type:t.Input}],required:[{type:t.Input}],disabled:[{type:t.Input}]};var st=function(){};st.decorators=[{type:t.NgModule,args:[{declarations:[at],exports:[at,ot],imports:[n.CommonModule,u.FormsModule,ot,E.MatCheckboxModule]}]}];var lt=function(){function e(t,n,r,o){this.errorStateMatcher=t,this.ngControl=n,this.parentForm=r,this.parentFormGroup=o,this.onChange=function(e){},this.onTouched=function(){},this.$disabled=!1,this.$required=!1,this.layout="vertical",this.stateChanges=new l.Subject,this.id="select-radio-"+e.nextId++,this.describedBy="",null!=this.ngControl&&(this.ngControl.valueAccessor=this)}return Object.defineProperty(e.prototype,"value",{get:function(){return this.$value},set:function(e){this.$value=e,this.onChange(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"focused",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return!this.value},enumerable:!1,configurable:!0}),e.prototype.onContainerClick=function(e){},Object.defineProperty(e.prototype,"shouldLabelFloat",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"placeholder",{get:function(){return this.$placeholder},set:function(e){this.$placeholder=e,this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return this.$required},set:function(e){this.$required=O.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this.$disabled},set:function(e){this.$disabled=O.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"errorState",{get:function(){return this.errorStateMatcher.isErrorState(this.ngControl.control,this.parentFormGroup||this.parentForm)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controlType",{get:function(){return"select-chips"},enumerable:!1,configurable:!0}),e.prototype.setDescribedByIds=function(e){this.describedBy=e.join(" ")},e.prototype.ngOnDestroy=function(){this.stateChanges.complete()},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.writeValue=function(e){this.value=e},e}();lt.nextId=0,lt.decorators=[{type:t.Component,args:[{selector:"mcl-select-radio",template:'<mat-radio-group\n [ngClass]="{\'vertical\':layout === \'vertical\',\'horizontal\':layout ===\'horizontal\'}"\n [required]="required"\n [disabled]="disabled"\n [(ngModel)]="value">\n <mat-radio-button *ngFor="let opcao of opcoes"\n [value]="opcao.value">{{opcao.label}}</mat-radio-button>\n</mat-radio-group>\n',providers:[{provide:w.MatFormFieldControl,useExisting:lt}],styles:["mat-radio-group{display:flex}mat-radio-group.horizontal{flex-direction:row}mat-radio-group.vertical{flex-direction:column}mat-radio-group mat-radio-button{flex:1}@media (max-width:750px){mat-radio-group.horizontal,mat-radio-group.vertical{flex-direction:column}mat-radio-group.horizontal mat-radio-button,mat-radio-group.vertical mat-radio-button{margin:10px 0}}"]}]}],lt.ctorParameters=function(){return[{type:D.ErrorStateMatcher},{type:u.NgControl,decorators:[{type:t.Optional},{type:t.Self}]},{type:u.NgForm,decorators:[{type:t.Optional}]},{type:u.FormGroupDirective,decorators:[{type:t.Optional}]}]},lt.propDecorators={layout:[{type:t.Input}],input:[{type:t.ViewChild,args:["input"]}],id:[{type:t.HostBinding}],describedBy:[{type:t.HostBinding,args:["attr.aria-describedby"]}],opcoes:[{type:t.ContentChildren,args:[et]}],shouldLabelFloat:[{type:t.HostBinding,args:["class.floating"]}],placeholder:[{type:t.Input}],required:[{type:t.Input}],disabled:[{type:t.Input}]};var ut=function(){};ut.decorators=[{type:t.NgModule,args:[{declarations:[lt],exports:[lt,ot],imports:[n.CommonModule,u.FormsModule,ot,F.MatRadioModule]}]}];var ct=function(e){function n(n,r,o,i){var a=e.call(this,n,r,o,i)||this;return a.preferredContries=["br"],a.blur=new t.EventEmitter,a.alwaysShowCountry=!1,a}return H(n,e),Object.defineProperty(n.prototype,"value",{get:function(){return this.$innerValue},set:function(e){this.$innerValue=e,this.stateChanges.next(),this.onChange(null==e?void 0:e.replace(/[^\d+]/g,""))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"shouldLabelFloat",{get:function(){return this.focused||!this.empty||this.alwaysShowCountry},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"empty",{get:function(){return!this.value},enumerable:!1,configurable:!0}),n.prototype.onFocus=function(){this.focused=!0,this.stateChanges.next()},n.prototype.onBlur=function(){this.focused=!1,this.stateChanges.next(),this.blur.emit()},n.prototype.writeValue=function(e){this.value=e},n}(Ne);ct.decorators=[{type:t.Component,args:[{selector:"mcl-input-telefone-intl",template:'<div class="input">\n <lac-mat-country-selector\n [ngClass]="{\'hidden\': !focused && !value && !alwaysShowCountry}"\n [preferredCountries]="preferredContries"\n [selectorFor]="input"\n searchPlaceholder="Filtrar paises..."></lac-mat-country-selector>\n <lac-mat-tel-input #input\n [(ngModel)]="value"\n (focusin)="onFocus()" (focusout)="onBlur()"></lac-mat-tel-input>\n</div>\n',providers:[{provide:w.MatFormFieldControl,useExisting:ct}],styles:[".input{display:flex;align-items:center;margin:-8px 0;gap:8px}.input lac-mat-country-selector{transition:.3s}.input lac-mat-country-selector.hidden{opacity:0}.input lac-mat-tel-input{flex:1 1 auto}"]}]}],ct.ctorParameters=function(){return[{type:D.ErrorStateMatcher},{type:u.NgControl,decorators:[{type:t.Optional},{type:t.Self}]},{type:u.NgForm,decorators:[{type:t.Optional}]},{type:u.FormGroupDirective,decorators:[{type:t.Optional}]}]},ct.propDecorators={preferredContries:[{type:t.Input}],readonly:[{type:t.Input}],blur:[{type:t.Output}],alwaysShowCountry:[{type:t.Input}],telInput:[{type:t.ViewChild,args:["input"]}]};var pt=function(){function e(){}return e.prototype.validate=function(e){return L.phoneNumberValidator(e)},e}();pt.decorators=[{type:t.Directive,args:[{selector:"mcl-input-telefone-intl,[mclInputTelefoneIntl]",providers:[{provide:u.NG_VALIDATORS,useExisting:pt,multi:!0}]}]}],pt.ctorParameters=function(){return[]};var dt=function(){};dt.decorators=[{type:t.NgModule,args:[{declarations:[ct,pt],exports:[ct,pt],imports:[n.CommonModule,u.FormsModule,L.LacMatTelInputModule]}]}];var ht=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return H(t,e),t.prototype.ngOnInit=function(){this.mask="##.###.###/####-##"},t}(te);ht.decorators=[{type:t.Directive,args:[{selector:"[mclModel][ngModel][cnpj]:not([mask])"}]}];var mt=function(){function e(e){this.modulo11Service=e}return e.prototype.validate=function(e){if(e.value){var t=e.value.replace(/\D+/g,"");if(14!==t.length||!this.modulo11Service.isValidCgc(t))return{cnpj:!0}}return null},e}();mt.decorators=[{type:t.Directive,args:[{selector:"[mclCnpj],[mclModel][cnpj]",providers:[{provide:u.NG_VALIDATORS,useExisting:mt,multi:!0}]}]}],mt.ctorParameters=function(){return[{type:ne}]};var ft=function(){function e(){}return e.prototype.transform=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(e)return Z(e,"##.###.###/####-##")},e}();ft.decorators=[{type:t.Pipe,args:[{name:"cnpj"}]}];var gt=function(){};gt.decorators=[{type:t.NgModule,args:[{declarations:[mt,ht,ft],exports:[mt,ht,ft],imports:[n.CommonModule,de]}]}];var yt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return H(t,e),t.prototype.ngOnInit=function(){this.mask="###.###.###-##"},t}(te);yt.decorators=[{type:t.Directive,args:[{selector:"[mclModel][ngModel][cpf]:not([mask])"}]}];var vt=function(){function e(e){this.modulo11Service=e}return e.prototype.validate=function(e){if(e.value){var t=e.value.replace(/\D+/g,"");if(11!==t.length||!this.modulo11Service.isValidCpf(t))return{cpf:!0}}return null},e}();vt.decorators=[{type:t.Directive,args:[{selector:"[mclCpf],[mclModel][cpf]",providers:[{provide:u.NG_VALIDATORS,useExisting:vt,multi:!0}]}]}],vt.ctorParameters=function(){return[{type:ne}]};var bt=function(){function e(){}return e.prototype.transform=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(e)return Z(e,"###.###.###-##")},e}();bt.decorators=[{type:t.Pipe,args:[{name:"cpf"}]}];var Ct=function(){};Ct.decorators=[{type:t.NgModule,args:[{declarations:[yt,vt,bt],exports:[yt,vt,bt],imports:[n.CommonModule]}]}];var xt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return H(t,e),t.prototype.ngOnInit=function(){this.mask="###.###.###-##"},t.prototype.applyMask=function(e){return e&&e.replace(/\D/g,"").length>11?Z(e,"##.###.###/####-##"):Z(e,"###.###.###-##")},t.prototype.removeMask=function(e){return e&&e.replace(/\D/g,"").length>11?ee(e,"##.###.###/####-##"):ee(e,"###.###.###-##")},t}(te);xt.decorators=[{type:t.Directive,args:[{selector:"[mclModel][ngModel][cpfCnpj]:not([mask])"}]}];var Mt=function(){function e(e){this.modulo11Service=e}return e.prototype.validate=function(e){if(e.value){var t=e.value.replace(/\D+/g,"");if(!(11===t.length&&this.modulo11Service.isValidCpf(t)||14===t.length&&this.modulo11Service.isValidCgc(t)))return{cpfCnpj:!0}}return null},e}();Mt.decorators=[{type:t.Directive,args:[{selector:"[mclCpfCnpj],[mclModel][cpfCnpj]",providers:[{provide:u.NG_VALIDATORS,useExisting:Mt,multi:!0}]}]}],Mt.ctorParameters=function(){return[{type:ne}]};var wt=function(){function e(){}return e.prototype.transform=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(e)return e.length>11?Z(e,"##.###.###/####-##"):Z(e,"###.###.###-##")},e}();wt.decorators=[{type:t.Pipe,args:[{name:"cpfCnpj"}]}];var It=function(){};It.decorators=[{type:t.NgModule,args:[{declarations:[xt,Mt,wt],exports:[xt,Mt,wt],imports:[n.CommonModule]}]}];var Pt=function(){function e(){this.tipo="info"}return e.prototype.ngOnInit=function(){},e}();Pt.decorators=[{type:t.Component,args:[{selector:"mcl-info",template:'<div class="info" [ngClass]="{\'alert\':tipo === \'alert\'}">\n <mat-icon *ngIf="tipo === \'info\'">info</mat-icon>\n <mat-icon *ngIf="tipo === \'alert\'">warning</mat-icon>\n <label>\n <ng-content select="[mcl-info-title]"></ng-content>\n </label>\n <ng-content></ng-content>\n</div>\n',styles:[".info{background-color:#f3f3f3;color:#666;border-radius:5px;border:1px solid #ddd;padding:18px 15px 18px 50px;margin-bottom:20px;position:relative}.info mat-icon{position:absolute;top:15px;left:15px}.info label{font-weight:700}.info.alert{background-color:#ffd4cd;color:#994141;border:1px solid #ffa29e}"]}]}],Pt.ctorParameters=function(){return[]},Pt.propDecorators={tipo:[{type:t.Input}]};var Dt=function(){};Dt.decorators=[{type:t.NgModule,args:[{declarations:[Pt],exports:[Pt],imports:[n.CommonModule,c.MatIconModule]}]}];var Ot=function(e,t,n,r,o){if(void 0===t&&(t="R$"),void 0===n&&(n="."),void 0===r&&(r=","),void 0===o&&(o="###.###.###.###.###,##"),e){for(var i="",a=e.replace(/\D/g,"").replace(/^0+/,"");a.length<o.length-o.indexOf(",");)a="0"+a;for(var s=o.length-1;s>=0&&a.length;s--)if("."!==o[s])if(","!==o[s]){var l=kt(a);a=l.restante,i=l.ultimo+i}else i=r+i;else i=n+i;return t+i}},kt=function(e){var t=e.length;return{ultimo:e.charAt(t-1),restante:e.substring(0,t-1)}},St=function(){function e(e){this.ngControl=e,this.$mascara="###.###.###.###.###,##",this.$symbol="R$",this.$thousandDivider=".",this.$fractionalDivider=",",this.value=null,this.displayValue=null,this.mclModelChange=new t.EventEmitter}return e.prototype.delay=function(e){return void 0===e&&(e=0),new l.Observable((function(t){var n=setTimeout((function(){return t.next()}),e);return function(){return clearTimeout(n)}}))},e.prototype.processValue=function(e){return this.keepMask?e:Ot(e,"","",".",this.$mascara)},Object.defineProperty(e.prototype,"symbol",{set:function(e){e!==this.$symbol&&(this.$symbol=e,this.defineValue())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thousandDivider",{set:function(e){e!==this.$thousandDivider&&(this.$thousandDivider=e,this.defineValue())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fractionalDivider",{set:function(e){e!==this.$fractionalDivider&&(this.$fractionalDivider=e,this.defineValue())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mascara",{set:function(e){e!==this.$mascara&&(this.$mascara=e,this.defineValue())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maskValue",{set:function(e){e!==this.value&&(this.value=e,this.defineValue())},enumerable:!1,configurable:!0}),e.prototype.onInput=function(e){var t=e.target.value;this.onValueChange(t)},e.prototype.updateValue=function(e){var t=this;this.value=e,this.mclModelChange.emit(e),this.delay().subscribe((function(){return t.ngControl.control.updateValueAndValidity()}))},e.prototype.defineValue=function(){var e=this,t=this.value,n=null;null!=t&&(n=Ot(t,this.$symbol,this.$thousandDivider,this.$fractionalDivider,this.$mascara),t=this.processValue(n)),this.delay().subscribe((function(){e.displayValue!==n&&(e.displayValue=n,e.ngControl.control.setValue(n),e.delay().subscribe((function(){if(t!==e.value)return e.updateValue(t)})))}))},e.prototype.onValueChange=function(e){if(e!==this.displayValue){var t=e,n=void 0;null==e||""===e.trim()?n=null:(t=Ot(e,this.$symbol,this.$thousandDivider,this.$fractionalDivider,this.$mascara),n=this.processValue(t)),this.displayValue=t,e!==t&&this.ngControl.control.setValue(t),n!==this.value&&this.updateValue(n)}},e}();St.decorators=[{type:t.Directive,args:[{selector:"[mclModel][ngModel][monetario]"}]}],St.ctorParameters=function(){return[{type:u.NgControl}]},St.propDecorators={keepMask:[{type:t.Input}],mclModelChange:[{type:t.Output}],symbol:[{type:t.Input}],thousandDivider:[{type:t.Input}],fractionalDivider:[{type:t.Input}],mascara:[{type:t.Input}],maskValue:[{type:t.Input,args:["mclModel"]}],onInput:[{type:t.HostListener,args:["input",["$event"]]}]};var jt=function(){function e(){}return e.prototype.transform=function(e,t,n,r,o){return void 0===t&&(t="R$"),void 0===n&&(n="."),void 0===r&&(r=","),void 0===o&&(o="###.###.###.###.###,##"),Ot(e,t,n,r,o)},e}();jt.decorators=[{type:t.Pipe,args:[{name:"mclMonetario"}]}];var Vt=function(){};Vt.decorators=[{type:t.NgModule,args:[{declarations:[St,jt],exports:[St,jt],imports:[n.CommonModule]}]}];var At=function(e,t,n,r,o){if(void 0===t&&(t="%"),void 0===n&&(n="."),void 0===r&&(r=","),void 0===o&&(o="###.###.###.###.###,##"),e){for(var i="",a=e.replace(/\D/g,"").replace(/^0+/,"");a.length<3;)a="0"+a;for(var s=o.length-1;s>=0&&a.length;s--)if("."!==o[s])if(","!==o[s]){var l=Tt(a);a=l.restante,i=l.ultimo+i}else i=r+i;else i=n+i;return i+t}},Tt=function(e){var t=e.length;return{ultimo:e.charAt(t-1),restante:e.substring(0,t-1)}},Et=function(){function e(e){this.ngControl=e,this.mascara="###.###.###.###.###,##",this.symbol="%",this.thousandDivider=".",this.fractionalDivider=",",this.value=null,this.displayValue=null,this.mclModelChange=new t.EventEmitter}return e.prototype.delay=function(e){return void 0===e&&(e=0),new l.Observable((function(t){var n=setTimeout((function(){return t.next()}),e);return function(){return clearTimeout(n)}}))},e.prototype.processValue=function(e){return this.keepMask?e:At(e,"","",".",this.mascara)},Object.defineProperty(e.prototype,"maskValue",{set:function(e){e!==this.value&&(this.value=e,this.defineValue())},enumerable:!1,configurable:!0}),e.prototype.onInput=function(e){var t=e.target.value;this.onValueChange(t)},e.prototype.updateValue=function(e){var t=this;this.value=e,this.mclModelChange.emit(e),this.delay().subscribe((function(){return t.ngControl.control.updateValueAndValidity()}))},e.prototype.defineValue=function(){var e=this,t=this.value,n=null;null!=t&&(n=At(t,this.symbol,this.thousandDivider,this.fractionalDivider,this.mascara),t=this.processValue(n)),this.delay().subscribe((function(){e.displayValue!==n&&(e.displayValue=n,e.ngControl.control.setValue(n),e.delay().subscribe((function(){if(t!==e.value)return e.updateValue(t)})))}))},e.prototype.onValueChange=function(e){if(e!==this.displayValue){var t=e,n=void 0;null==e||""===e.trim()?n=null:(t=At(e),n=this.processValue(t)),this.displayValue=t,e!==t&&this.ngControl.control.setValue(t),n!==this.value&&this.updateValue(n)}},e}();Et.decorators=[{type:t.Directive,args:[{selector:"[mclModel][ngModel][porcentagem]"}]}],Et.ctorParameters=function(){return[{type:u.NgControl}]},Et.propDecorators={mascara:[{type:t.Input}],symbol:[{type:t.Input}],thousandDivider:[{type:t.Input}],fractionalDivider:[{type:t.Input}],keepMask:[{type:t.Input}],mclModelChange:[{type:t.Output}],maskValue:[{type:t.Input,args:["mclModel"]}],onInput:[{type:t.HostListener,args:["input",["$event"]]}]};var _t=function(){function e(){}return e.prototype.transform=function(e,t,n,r,o){return void 0===t&&(t="%"),void 0===n&&(n="."),void 0===r&&(r=","),void 0===o&&(o="###.###.###.###.###,##"),At(e,t,n,r,o)},e}();_t.decorators=[{type:t.Pipe,args:[{name:"mclPorcentagem"}]}];var Ft=function(){};Ft.decorators=[{type:t.NgModule,args:[{declarations:[Et,_t],exports:[Et,_t],imports:[n.CommonModule]}]}];var Lt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return H(t,e),t.prototype.ngOnInit=function(){this.mask="(##) #### ####"},t.prototype.applyMask=function(e){return e.length>10?Z(e,"(##) ##### ####"):Z(e,"(##) #### ####")},t.prototype.removeMask=function(e){return e.length>10?ee(e,"(##) ##### ####"):ee(e,"(##) #### ####")},t}(te);Lt.decorators=[{type:t.Directive,args:[{selector:"[mclModel][ngModel][telefone]:not([mask])"}]}];var $t=function(){function e(){}return e.prototype.transform=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!e)return"-";if(!(e=e.replace(/\D/g,""))||e.length>11||"0"===e)return"-";switch(e.length){case 11:return"("+e.substring(0,2)+") "+e.substring(2,7)+"-"+e.substring(7);case 10:return"("+e.substring(0,2)+") "+e.substring(2,6)+"-"+e.substring(6);case 9:return e.substring(0,5)+"-"+e.substring(5);case 8:return e.substring(0,4)+"-"+e.substring(4);case 2:case 3:return"("+e+")";default:return e}},e}();$t.decorators=[{type:t.Pipe,args:[{name:"telefone"}]}];var qt=function(){};qt.decorators=[{type:t.NgModule,args:[{declarations:[$t,Lt],exports:[$t,Lt],imports:[n.CommonModule,de]}]}];var Nt=function(){function e(e,t){this.sanitizer=e,this.element=t}return Object.defineProperty(e.prototype,"unsafeInnerHtml",{set:function(e){this.element.nativeElement.innerHTML=e||""},enumerable:!1,configurable:!0}),e}();Nt.decorators=[{type:t.Directive,args:[{selector:"[mclUnsafeInnerHtml]"}]}],Nt.ctorParameters=function(){return[{type:t.Sanitizer},{type:t.ElementRef,decorators:[{type:t.Self}]}]},Nt.propDecorators={unsafeInnerHtml:[{type:t.Input,args:["mclUnsafeInnerHtml"]}]};var Bt,Rt,zt=function(){};zt.decorators=[{type:t.NgModule,args:[{declarations:[Nt],exports:[Nt],imports:[n.CommonModule]}]}],function(e){e.UP="up",e.DOWN="down"}(Bt||(Bt={})),function(e){e.HOST="scroll",e.WINDOW="window:scroll"}(Rt||(Rt={}));var Ht=function(){function e(e){var n=this;this.elRef=e,this.scrollTop=0,this.more=!0,this.scrollDelay=500,this.scrollOffset=200,this.scrolled=new t.EventEmitter,this.getListener=function(){return n.elRef.nativeElement.clientHeight===n.elRef.nativeElement.scrollHeight?Rt.WINDOW:Rt.HOST},this.roundTo=function(e,t){return void 0===t&&(t=n.scrollOffset),Math.floor(e/t)*t},this.getScrollDirection=function(e){return n.scrollTop<=e?Bt.DOWN:Bt.UP},this.handleScroll=function(){return n.getListener()===Rt.HOST?n.scrolled.emit(n.canScroll(n.$element)):n.scrolled.emit(n.canScroll(n.$window))},this.$element=this.elRef.nativeElement,this.$window=document.documentElement}return e.prototype.ngOnInit=function(){this.setThrottle()},e.prototype.ngOnChanges=function(e){e.scrollDelay&&this.setThrottle()},e.prototype.setThrottle=function(){this.$scroll=this.$windowScroll=$.throttle(this.handleScroll,this.scrollDelay)},e.prototype.canScroll=function(e){var t=this.more&&this.getScrollDirection(e.scrollTop)===Bt.DOWN&&this.roundTo(e.clientHeight)===this.roundTo(e.scrollHeight-e.scrollTop);return this.scrollTop=e.scrollTop,t},e}();Ht.decorators=[{type:t.Component,args:[{selector:"mcl-scroll-container",template:"<ng-content></ng-content>\n",styles:[":host{overflow-y:auto}"]}]}],Ht.ctorParameters=function(){return[{type:t.ElementRef}]},Ht.propDecorators={more:[{type:t.Input}],scrollDelay:[{type:t.Input}],scrollOffset:[{type:t.Input}],scrolled:[{type:t.Output}],$scroll:[{type:t.HostListener,args:["scroll"]}],$windowScroll:[{type:t.HostListener,args:["window:scroll"]}]};var Gt=function(){};Gt.decorators=[{type:t.NgModule,args:[{declarations:[Ht],exports:[Ht],imports:[n.CommonModule]}]}];var Ut=function(){function e(){this.submitted=new t.EventEmitter,this.throttleMillis=500,this.eventSubject=new l.Subject,this.currentModels=[]}return e.prototype.ngOnInit=function(){var e=this;this.subscription=this.eventSubject.pipe(g.throttleTime(this.throttleMillis)).subscribe((function(t){e.submitted.emit(t)}))},e.prototype.ngOnDestroy=function(){var e;this.eventSubject.complete(),null===(e=this.subscription)||void 0===e||e.unsubscribe(),this.submitted.unsubscribe()},e.prototype.ngAfterViewInit=function(){var e=this;this.models.changes.subscribe((function(){e.atualizaModels()})),this.atualizaModels()},e.prototype.atualizaModels=function(){for(var e=this,t=this.models.toArray(),n=0;n<this.currentModels.length;){var r=this.currentModels[n];t.indexOf(r)<0?(this.form.removeControl(r),r.control.setParent(void 0),this.currentModels.splice(n,1)):n++}t.forEach((function(t){e.currentModels.indexOf(t)<0&&(e.currentModels.push(t),e.form.addControl(t),t.control.setParent(e.form.form))}))},e.prototype.touched=function(){this.models.toArray().forEach((function(e){e.control.markAsTouched(),e.control.markAsDirty(),e.control.updateValueAndValidity()}))},e.prototype.untouched=function(){this.models.toArray().forEach((function(e){e.control.markAsPristine(),e.control.markAsUntouched(),e.control.updateValueAndValidity()}))},e.prototype.reset=function(){return this.form.resetForm(),this.form.control.markAsPending(),this.models.toArray().forEach((function(e){e.control.reset(),e.control.setErrors(null),e.control.updateValueAndValidity()})),new l.Observable((function(e){setTimeout((function(){e.next(),e.complete()}),300)}))},e.prototype.submit=function(e){e.valid?this.eventSubject.next(e):this.touched()},e}();Ut.decorators=[{type:t.Component,args:[{selector:"mcl-form",template:'<form #form="ngForm" (ngSubmit)="submit(form)">\n <ng-content></ng-content>\n</form>\n',styles:[""]}]}],Ut.ctorParameters=function(){return[]},Ut.propDecorators={submitted:[{type:t.Output}],throttleMillis:[{type:t.Input}],models:[{type:t.ContentChildren,args:[u.NgModel,{descendants:!0}]}],form:[{type:t.ViewChild,args:[u.NgForm]}]};var Yt=function(){function e(e){this.elementRef=e,this.throttleMillis=500,this.singleClick=new t.EventEmitter}return e.prototype.ngOnInit=function(){var e=this;this.subscription=l.fromEvent(this.elementRef.nativeElement,"click").pipe(g.throttleTime(this.throttleMillis)).subscribe((function(t){e.singleClick.emit(t)}))},e.prototype.ngOnDestroy=function(){var e;null===(e=this.subscription)||void 0===e||e.unsubscribe(),this.singleClick.unsubscribe()},e}();Yt.decorators=[{type:t.Directive,args:[{selector:"[mclSingleClick],[singleClick]"}]}],Yt.ctorParameters=function(){return[{type:t.ElementRef}]},Yt.propDecorators={throttleMillis:[{type:t.Input}],singleClick:[{type:t.Output}]};var Qt=function(){function e(e){this.form=e}return e.prototype.ngOnInit=function(){},Object.defineProperty(e.prototype,"errors",{get:function(){var e,t,n,r,o,i;if((null===(t=null===(e=this.form)||void 0===e?void 0:e.form)||void 0===t?void 0:t.controls)&&(null===(r=null===(n=this.form)||void 0===n?void 0:n.form)||void 0===r?void 0:r.controls[this.name])&&(null===(i=null===(o=this.form)||void 0===o?void 0:o.form)||void 0===i?void 0:i.controls[this.name].errors))return Object.keys(this.form.form.controls[this.name].errors)},enumerable:!1,configurable:!0}),e}();Qt.decorators=[{type:t.Component,args:[{selector:"mcl-mensagens-erro,mat-error[name],[mat-error][name]",template:"<span *ngFor=\"let error of errors\">\n {{'validation.' + error | translate:form.form.controls[name].errors[error]}}\n</span>\n",styles:[""]}]}],Qt.ctorParameters=function(){return[{type:Ut,decorators:[{type:t.Host},{type:t.Optional}]}]},Qt.propDecorators={name:[{type:t.Input}],form:[{type:t.Input}]};var Wt=function(){};Wt.decorators=[{type:t.NgModule,args:[{declarations:[Ut,Yt,Qt],exports:[Ut,Yt,Qt],imports:[n.CommonModule,u.FormsModule,o.TranslateModule]}]}],e.ARQUIVO_MANAGER_SERVICE=ue,e.AbstractConsultaComponent=Ae,e.AbstractConsultaPaginadaComponent=Te,e.AbstractEdicaoComponent=Ee,e.AbstractEdicaoModalComponent=_e,e.AbstractMatFormFieldControl=Ne,e.AllOptionCheckboxComponent=Je,e.ArquivoModule=ge,e.CnpjDirective=mt,e.CnpjModelDirective=ht,e.CnpjModule=gt,e.CnpjsPipe=ft,e.ColumnCellDirective=ve,e.ColumnDirective=Ce,e.ColumnFooterDirective=be,e.ColumnHeaderDirective=ye,e.ComponentesModule=de,e.CpfCnpjDirective=Mt,e.CpfCnpjModelDirective=xt,e.CpfCnpjModule=It,e.CpfCnpjPipe=wt,e.CpfDirective=vt,e.CpfModelDirective=yt,e.CpfModule=Ct,e.CpfPipe=bt,e.CriptografiaService=oe,e.CrudModule=Fe,e.DataValidadorDirective=$e,e.DateModule=qe,e.DialogConfirmacaoComponent=K,e.DialogIframeComponent=ie,e.DialogPreviewArquivoComponent=he,e.DialogService=ae,e.DownloadArquivoDirective=fe,e.FormComponent=Ut,e.FormModule=Wt,e.FuturoDirective=Le,e.ImagemDirective=pe,e.InfiniteTableComponent=Oe,e.InfoComponent=Pt,e.InfoModule=Dt,e.InputDatetimeComponent=Be,e.InputDatetimeModule=ze,e.InputFileUploadComponent=He,e.InputFileUploadValidatorDirective=Ge,e.InputFileuploadModule=Ue,e.InputTelefoneInternacionalComponent=ct,e.InputTelefoneInternacionalModule=dt,e.InputTelefoneInternacionalValidatorDirective=pt,e.LoaderComponent=J,e.LoaderService=X,e.MCL_IMAGE_PADRAO=ce,e.MaskedModelDirective=te,e.MensagensErroComponent=Qt,e.MensageriaService=se,e.MobileService=le,e.MonetarioModelDirective=St,e.MonetarioModule=Vt,e.MonetarioPipe=jt,e.NomeResumidoPipe=re,e.OptionCheckboxComponent=Xe,e.OptionCheckboxGroupComponent=Ke,e.OptionCheckboxModule=Ze,e.PAGINATION_CONFIGURATION=Ie,e.PaginatedTableComponent=Pe,e.PaginatorComponent=Se,e.PaginatorIntlFactory=Ve,e.PorcentagemModelDirective=Et,e.PorcentagemModule=Ft,e.PorcentagemPipe=_t,e.PreviewArquivoComponent=me,e.ScrollContainerComponent=Ht,e.ScrollModule=Gt,e.SelectChipsComponent=rt,e.SelectChipsModule=it,e.SelectItemComponent=et,e.SelectItemModule=ot,e.SelectManyCheckboxComponent=at,e.SelectManyCheckboxModule=st,e.SelectRadioComponent=lt,e.SelectRadioModule=ut,e.SingleClickDirective=Yt,e.StringUtil=nt,e.TableComponent=xe,e.TableModule=je,e.TdComponent=we,e.TelefoneModelDirective=Lt,e.TelefoneModule=qt,e.TelefonePipe=$t,e.ThComponent=Me,e.UnsafeInnerHtmlDirective=Nt,e.UnsafeInnerHtmlModule=zt,e.ValidaModulo11Service=ne,e.closeDialogIframe=function(e){if(e){var t=document.createElement("div");t.id="returnValue",t.innerText=JSON.stringify(e),t.style.display="none",document.body.appendChild(t)}window.parent.dispatchEvent(new Event("dialogIframeClosed"))},e.doApplyMask=Z,e.doRemoveMask=ee,e.monetarioMask=Ot,e.ɵ0=Re,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@angular/material/dialog"),require("@ngx-translate/core"),require("@angular/animations"),require("rxjs/index"),require("rxjs/internal/operators"),require("rxjs"),require("@angular/forms"),require("@angular/material/icon"),require("@angular/material/button"),require("@angular/material/progress-spinner"),require("@angular/flex-layout"),require("jsencrypt"),require("@angular/platform-browser"),require("rxjs/operators"),require("@angular/material/snack-bar"),require("@angular/cdk/layout"),require("ng2-pdf-viewer"),require("@jmcrommen/ngx-image-viewer"),require("@angular/material/table"),require("@angular/material/paginator"),require("@angular/material/form-field"),require("@angular/material/select"),require("@angular/material/tooltip"),require("@angular/material/core"),require("@angular/cdk/coercion"),require("@angular/material/input"),require("@mat-datetimepicker/core"),require("@mat-datetimepicker/moment"),require("moment"),require("@angular/material/datepicker"),require("@angular/material/chips"),require("@angular/material/checkbox"),require("@angular/material/autocomplete"),require("@angular/material/radio"),require("lac-mat-tel-input"),require("lodash-es")):"function"==typeof define&&define.amd?define("@main-class/componentes",["exports","@angular/core","@angular/common","@angular/material/dialog","@ngx-translate/core","@angular/animations","rxjs/index","rxjs/internal/operators","rxjs","@angular/forms","@angular/material/icon","@angular/material/button","@angular/material/progress-spinner","@angular/flex-layout","jsencrypt","@angular/platform-browser","rxjs/operators","@angular/material/snack-bar","@angular/cdk/layout","ng2-pdf-viewer","@jmcrommen/ngx-image-viewer","@angular/material/table","@angular/material/paginator","@angular/material/form-field","@angular/material/select","@angular/material/tooltip","@angular/material/core","@angular/cdk/coercion","@angular/material/input","@mat-datetimepicker/core","@mat-datetimepicker/moment","moment","@angular/material/datepicker","@angular/material/chips","@angular/material/checkbox","@angular/material/autocomplete","@angular/material/radio","lac-mat-tel-input","lodash-es"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self)["main-class"]=e["main-class"]||{},e["main-class"].componentes={}),e.ng.core,e.ng.common,e.ng.material.dialog,e.i3,e.ng.animations,e.rxjs.index,e.rxjs["internal/operators"],e.rxjs,e.ng.forms,e.ng.material.icon,e.ng.material.button,e.ng.material.progressSpinner,e.ng.flexLayout,e.JSEncrypt,e.ng.platformBrowser,e.rxjs.operators,e.ng.material.snackBar,e.ng.cdk.layout,e.ng2PdfViewer,e.ngxImageViewer,e.ng.material.table,e.ng.material.paginator,e.ng.material.formField,e.ng.material.select,e.ng.material.tooltip,e.ng.material.core,e.ng.cdk.coercion,e.ng.material.input,e.core$1,e.moment$2,e.moment$1,e.ng.material.datepicker,e.ng.material.chips,e.ng.material.checkbox,e.ng.material.autocomplete,e.ng.material.radio,e.lacMatTelInput,e.lodashEs)}(this,(function(e,t,n,r,o,i,a,s,l,u,c,p,d,h,m,f,g,y,v,b,C,x,M,w,I,P,D,O,k,S,j,V,A,T,E,_,F,L,$){"use strict";function q(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function N(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var B=q(m),R=N(V),z=function(e,t){return(z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function H(e,t){function n(){this.constructor=e}z(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function G(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){e.done?o(e.value):new n((function(t){t(e.value)})).then(a,s)}l((r=r.apply(e,t||[])).next())}))}function U(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[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(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function Y(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function Q(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function W(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Q(arguments[t]));return e}var J=function(){function e(e){this.parent=e,this.$shown=!1,this.labelLoading="Aguarde...",this.showOnInit=!1}return e.prototype.ngOnInit=function(){this.$shown=this.showOnInit},Object.defineProperty(e.prototype,"shown",{get:function(){return this.$shown},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"component",{get:function(){return this.$component},set:function(e){this.$component!==e&&("boolean"==typeof this.$component?this.parent&&this.$component&&this.parent.nativeElement.parentElement.classList.remove("component-loading"):this.$component&&this.$component.classList.remove("component-loading"),"boolean"==typeof e?this.parent&&e&&this.parent.nativeElement.parentElement.classList.add("component-loading"):e&&e.classList.add("component-loading"),this.$component=e)},enumerable:!1,configurable:!0}),e.prototype.listen=function(e){var t=this;return this.buscando&&this.buscando.unsubscribe(),new a.Observable((function(n){return t.show(),t.buscando=a.from(e).pipe(s.delay(300)).subscribe((function(e){t.buscando&&(t.hide(),t.buscando=void 0),n.next(e)}),(function(e){t.buscando&&(t.hide(),t.buscando=void 0),n.error(e)}),(function(){return n.complete()})),function(){t.buscando&&(t.buscando.unsubscribe(),t.hide(),t.buscando=void 0)}}))},Object.defineProperty(e.prototype,"visibility",{get:function(){return this.$shown?"shown":"hidden"},enumerable:!1,configurable:!0}),e.prototype.show=function(){this.$shown=!0},e.prototype.hide=function(){this.$shown=!1},e}();J.decorators=[{type:t.Component,args:[{selector:"mcl-loader",template:'<div #loader class="preloader" [ngClass]="{\'preloader-component\':component}" [@visibility]="visibility">\n <div class="cssload-speeding-wheel"></div>\n <p class="preloader-text">{{\'mcl.loader.aguarde\' | translate}}</p>\n</div>\n',animations:[i.trigger("visibility",[i.state("shown",i.style({opacity:.75,display:"block"})),i.state("hidden",i.style({opacity:0,display:"none"})),i.transition("* => *",i.animate(".3s"))])],exportAs:"loader",styles:[".preloader{left:0;bottom:0;top:0;right:0;opacity:1;width:100%;height:100%;background:hsla(0,0%,100%,.8)}.preloader:not(.preloader-component){position:fixed;z-index:99999}.preloader.preloader-component{position:absolute;z-index:99999}.preloader .cssload-speeding-wheel{position:absolute;top:calc(50% - 25px);left:calc(50% - 15px);width:30px;height:30px;margin:0 auto;border-radius:50%;border-color:currentcolor transparent;border-style:solid;border-width:2px;animation:cssload-spin 425ms linear infinite;-o-animation:cssload-spin 425ms infinite linear;-ms-animation:cssload-spin 425ms infinite linear;-webkit-animation:cssload-spin 425ms linear infinite;-moz-animation:cssload-spin 425ms infinite linear}@keyframes cssload-spin{to{transform:rotate(1turn)}}@-webkit-keyframes cssload-spin{to{transform:rotate(1turn)}}.preloader-text{display:block;text-align:center;width:100%;height:30px;color:#2b2b2b;position:relative;top:calc(50% + 15px)}"]}]}],J.ctorParameters=function(){return[{type:t.ElementRef,decorators:[{type:t.Host},{type:t.Optional}]}]},J.propDecorators={progresso:[{type:t.Input}],$shown:[{type:t.Input,args:["show"]}],loader:[{type:t.ViewChild,args:["loader"]}],labelLoading:[{type:t.Input}],showOnInit:[{type:t.Input}],component:[{type:t.Input}]};var X=function(){function e(){this.executando=!1,this.ajaxCount=[]}return e.prototype.init=function(e){this.loader||(this.loader=e)},e.prototype.incrementaAJAX=function(e){var t=this;void 0===e&&(e=!1),this.executando=this.executando||e;var n=String(1e10*Math.random());return this.ajaxCount.push(n),this.loader&&this.executando&&this.ajaxCount.length>0&&!this.loader.shown&&setTimeout((function(){t.executando&&t.ajaxCount.length>0&&!t.loader.shown&&t.loader.show()}),150),n},e.prototype.decrementaAJAX=function(e){var t=this,n=this.ajaxCount.indexOf(e);n>=0&&(this.ajaxCount.splice(n,1),setTimeout((function(){t.ajaxCount.length<=0&&t.loader&&t.loader.shown&&(t.loader.hide(),t.executando=!1)}),500))},e.prototype.listen=function(e){return this.executando=!0,this.doExecuta(l.from(e))},e.prototype.doExecuta=function(e){var t=this;return new l.Observable((function(n){var r=t.incrementaAJAX(),o=e.subscribe((function(e){n.next(e)}),(function(e){t.decrementaAJAX(r),n.error(e)}),(function(){t.decrementaAJAX(r),n.complete()}));return function(){t.decrementaAJAX(r),o.unsubscribe()}}))},e}();X.decorators=[{type:t.Injectable}],X.ctorParameters=function(){return[]};var K=function(){function e(e,t){this.data=e,this.dialogRef=t}return Object.defineProperty(e.prototype,"titulo",{get:function(){return this.data.titulo},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mensagem",{get:function(){return this.data.mensagem},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"okLabel",{get:function(){return this.data.okLabel},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cancelLabel",{get:function(){return this.data.cancelLabel},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){},e.prototype.confirma=function(e){e.valid&&this.dialogRef.close(!0)},e}();function Z(e,t){var n="";if(null!=e&&e.length)if(t)for(var r=0;r<e.length&&t.length>n.length;)"#"===t.charAt(n.length)?(e.charAt(r).match(/\d/)&&(n+=e.charAt(r)),r++):n+=t.charAt(n.length);else n=e;return n}function ee(e,t){if(null!=e){if(t){var n=e.toString().replace(/\D/g,""),r=t.replace(/[^#]/g,"");return n.length>r.length?n.substring(0,r.length):n}return e}}K.decorators=[{type:t.Component,args:[{selector:"mcl-dialog-confirmacao",template:'<div mat-dialog-title>\n {{titulo | translate}}\n</div>\n\n<form (ngSubmit)="confirma(form)" #form="ngForm">\n <mat-dialog-content>\n\n <p [innerHTML]="mensagem | translate"></p>\n\n </mat-dialog-content>\n\n <div mat-dialog-actions>\n <button mat-stroked-button color="accent">\n {{okLabel | translate}}\n </button>\n <button mat-flat-button color="warn" type="button" mat-dialog-close *ngIf="cancelLabel">\n {{cancelLabel | translate}}\n </button>\n </div>\n</form>\n',styles:[".mat-dialog-content{width:95vw;max-width:280px;min-width:auto;margin:10px 60px;text-align:center;min-height:120px;display:flex;flex-direction:column;justify-content:center}[mat-dialog-title]{text-align:center;margin:40px 60px 20px}[mat-dialog-actions]{justify-content:center;margin:20px 60px 40px;flex-direction:row}@media (max-width:750px){.mat-dialog-content{margin:10px 20px}}"]}]}],K.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[r.MAT_DIALOG_DATA]}]},{type:r.MatDialogRef}]};var te=function(){function e(e){this.ngControl=e,this.value=null,this.displayValue=null,this.mclModelChange=new t.EventEmitter}return e.prototype.delay=function(e){return void 0===e&&(e=0),new a.Observable((function(t){var n=setTimeout((function(){return t.next()}),e);return function(){return clearTimeout(n)}}))},e.prototype.processValue=function(e){return this.keepMask?e:this.removeMask(e)},Object.defineProperty(e.prototype,"mask",{get:function(){return this.$mask},set:function(e){e!==this.$mask&&(this.$mask=e,this.defineValue())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maskValue",{set:function(e){e!==this.value&&(this.value=e,this.defineValue())},enumerable:!1,configurable:!0}),e.prototype.onInput=function(e){var t=e.target.value;this.onValueChange(t)},e.prototype.updateValue=function(e){var t=this;this.value=e,this.mclModelChange.emit(e),this.delay().subscribe((function(){return t.ngControl.control.updateValueAndValidity()}))},e.prototype.defineValue=function(){var e=this,t=this.value,n=null;this.mask?null!=t&&(n=this.applyMask(t),t=this.processValue(n)):n=this.value,this.delay().subscribe((function(){e.displayValue!==n&&(e.displayValue=n,e.ngControl.control.setValue(n),e.delay().subscribe((function(){if(t!==e.value)return e.updateValue(t)})))}))},e.prototype.onValueChange=function(e){if(e!==this.displayValue){var t=e,n=e;null==e||""===e.trim()?n=null:this.mask&&(t=this.applyMask(e),n=this.processValue(t)),this.displayValue=t,e!==t&&this.ngControl.control.setValue(t),n!==this.value&&this.updateValue(n)}},e.prototype.removeMask=function(e){return ee(e,this.mask)},e.prototype.applyMask=function(e){return Z(e,this.mask)},e}();te.decorators=[{type:t.Directive,args:[{selector:"[mclModel][ngModel][mask]"}]}],te.ctorParameters=function(){return[{type:u.NgControl}]},te.propDecorators={keepMask:[{type:t.Input}],mclModelChange:[{type:t.Output}],mask:[{type:t.Input}],maskValue:[{type:t.Input,args:["mclModel"]}],onInput:[{type:t.HostListener,args:["input",["$event"]]}]};var ne=function(){function e(){}return e.prototype.isValidCpf=function(e){return 11===e.length&&!this.isRepeatedNumber(e)&&Number(e.charAt(9))===this.calculateDvMod11(e,9,2,11)&&Number(e.charAt(10))===this.calculateDvMod11(e,10,2,11)},e.prototype.isValidCgc=function(e){var t=Number(e.substring(9,12));return 14===e.length&&!this.isRepeatedNumber(e)&&Number(e.charAt(12))===this.calculateDvMod11(e,12,2,9)&&Number(e.charAt(13))===this.calculateDvMod11(e,13,2,9)&&t>0&&t<7100},e.prototype.isRepeatedNumber=function(e){for(var t=1,n=e.charAt(0);t<e.length;){if(n!==e.charAt(t))return!1;t++}return!0},e.prototype.calculateDvMod11=function(e,t,n,r){for(var o=n,i=0,a=0;a<t;a++)i+=Number(e.charAt(t-a-1))*o,++o>r&&(o=n);return(i%=11)<2?0:11-i},e}();ne.decorators=[{type:t.Injectable}];var re=function(){function e(){}return e.prototype.transform=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(e&&e.trim().indexOf(" ")>=0){var r=e.trim().split(" ");return r[0]+" "+r[r.length-1]}return e},e}();re.decorators=[{type:t.Pipe,args:[{name:"nomeResumido"}]}];var oe=function(){function e(){}return e.prototype.criptografa=function(e,t){var n=new B.default(void 0);return n.setPublicKey(e),n.encrypt(t)},e}();oe.decorators=[{type:t.Injectable}];var ie=function(){function e(e,t,n){this.dialogRef=t,this.titulo=e.titulo,this.url=n.bypassSecurityTrustResourceUrl(e.url)}return e.prototype.ngAfterViewInit=function(){var e,t=this;this.iframe.nativeElement,e=function(){return t.close()},window.addEventListener("dialogIframeClosed",(function(){return e()}))},e.prototype.returnValue=function(){var e,t=this.iframe.nativeElement.contentDocument||(null===(e=this.iframe.nativeElement.contentWindow)||void 0===e?void 0:e.document);if(t){var n=t.getElementById("returnValue");if(n){var r=n.innerText;if(r)return JSON.parse(r)}}},e.prototype.close=function(){this.dialogRef.close(this.returnValue())},e}();ie.decorators=[{type:t.Component,args:[{selector:"mcl-dialog-iframe",template:'<div mat-dialog-title >\n <h2>{{titulo}}</h2>\n <button mat-icon-button mat-dialog-close class="pull-right" tabindex="-1">\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<mat-dialog-content>\n <iframe #iframe width="560" height="315" [src]="url" (close)="close()" frameborder="0"\n ></iframe>\n</mat-dialog-content>\n',styles:["[mat-dialog-title]{display:flex}[mat-dialog-title] h2{font-size:25px;flex:1 1 auto;margin:0 0 20px}[mat-dialog-title] mat-icon{vertical-align:middle}mat-dialog-content{margin:-24px;width:calc(100% + 48px);padding:0}mat-dialog-content iframe{width:100%;height:60vh;border:0}"]}]}],ie.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[r.MAT_DIALOG_DATA]}]},{type:r.MatDialogRef},{type:f.DomSanitizer}]},ie.propDecorators={iframe:[{type:t.ViewChild,args:["iframe"]}]};var ae=function(){function e(e){this.dialog=e}return e.prototype.confirma=function(e,t){return void 0===t&&(t={}),this.dialog.open(K,{data:{titulo:t.titulo||"mcl.dialog.confirmacao",mensagem:e,okLabel:t.okLabel||"mcl.dialog.sim",cancelLabel:t.cancelLabel||"mcl.dialog.nao"}}).afterClosed().pipe(g.map((function(e){return!!e})))},e.prototype.informa=function(e,t){return void 0===t&&(t={}),this.dialog.open(K,{data:{titulo:t.titulo||"mcl.dialog.informacao",mensagem:e,okLabel:t.okLabel||"mcl.dialog.ok"}}).afterClosed().pipe(g.map((function(e){return!!e})))},e.prototype.iframe=function(e,t){if(!window.parent||window.parent===window)return this.dialog.open(ie,{data:{titulo:t,url:e},panelClass:"dialog-frame"}).afterClosed();window.location.href=e},e}();ae.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new ae(t.ɵɵinject(r.MatDialog))},token:ae,providedIn:"root"}),ae.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],ae.ctorParameters=function(){return[{type:r.MatDialog}]};var se=function(){function e(e,t){this.snackBar=e,this.translateService=t,this.defaultHorizontalPosition="right",this.defaultVerticalPosition="top",this.defaultDuration=2e3}return e.prototype.setDefaultComponent=function(e){this.$defaultComponent=e},e.prototype.addMensagemFromComponent=function(e,t){this.snackBar.openFromComponent(e,Object.assign({horizontalPosition:this.defaultHorizontalPosition,verticalPosition:this.defaultVerticalPosition,duration:this.defaultDuration},t))},e.prototype.addMensagem=function(e,t,n,r){void 0===t&&(t={}),void 0===n&&(n="OK");var o,i=Object.assign({horizontalPosition:this.defaultHorizontalPosition,verticalPosition:this.defaultVerticalPosition,duration:this.defaultDuration},r);(o=this.$defaultComponent?this.snackBar.openFromComponent(this.$defaultComponent,Object.assign(Object.assign({},i),{data:{message:this.translateService.instant(e,t),data:i.data}})):this.snackBar.open(this.translateService.instant(e,t),"OK",i)).onAction().subscribe((function(){o.dismiss()}))},e}();se.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new se(t.ɵɵinject(y.MatSnackBar),t.ɵɵinject(o.TranslateService))},token:se,providedIn:"root"}),se.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],se.ctorParameters=function(){return[{type:y.MatSnackBar},{type:o.TranslateService}]};var le=function(){function e(e){var t=this;this.listeners=[],this.mobileQuery=e.matchMedia("(max-width: 600px)"),this.tabletQuery=e.matchMedia("(max-width: 950px)"),this.mobileQueryListener=function(){t.listeners.forEach((function(e){try{e(t.mobile,t.tablet)}catch(e){console.error(e)}}))},this.mobileQuery.addEventListener("change",this.mobileQueryListener),this.tabletQuery.addEventListener("change",this.mobileQueryListener)}return e.prototype.addListener=function(e){this.listeners.push(e)},e.prototype.removeListener=function(e){this.listeners.splice(this.listeners.indexOf(e),1)},Object.defineProperty(e.prototype,"mobile",{get:function(){return this.mobileQuery.matches},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tablet",{get:function(){return this.tabletQuery.matches},enumerable:!1,configurable:!0}),e}();le.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new le(t.ɵɵinject(v.MediaMatcher))},token:le,providedIn:"root"}),le.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],le.ctorParameters=function(){return[{type:v.MediaMatcher}]};var ue=new t.InjectionToken("ARQUIVO_MANAGER_SERVICE"),ce=new t.InjectionToken("MCL_IMAGE_PADRAO"),pe=function(){function e(e,t,n){var r=this;this._padrao=e,this.element=t,this.arquivoManagerService=n,this.backgroundSetter=function(e){r.element.nativeElement.style.backgroundImage="url("+e+")"},this.srcSetter=function(e){r.element.nativeElement.src=e}}return Object.defineProperty(e.prototype,"imagemSrc",{set:function(e){this._setter=this.srcSetter,e?this._path!==e&&(this._path=e,this.setPath()):this._setter(this._padrao)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"imagemBackground",{set:function(e){this._setter=this.backgroundSetter,e?this._path!==e&&(this._path=e,this.setPath()):this._setter(this._padrao)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"padrao",{set:function(e){this._padrao=e,this._setter&&this._setter(this.padrao)},enumerable:!1,configurable:!0}),e.prototype.setPath=function(){return G(this,void 0,void 0,(function(){var e,t;return U(this,(function(n){switch(n.label){case 0:return(e="string"==typeof this._path?this._path:this._path.path)?(t=void 0,e.startsWith("http://")||this._path.startsWith("https://")?(t=e,[3,3]):[3,1]):[3,4];case 1:return[4,this.arquivoManagerService.downloadURL(e).toPromise()];case 2:t=n.sent(),n.label=3;case 3:this._setter(t),n.label=4;case 4:return[2]}}))}))},e.prototype.ngOnInit=function(){},e}();pe.decorators=[{type:t.Directive,args:[{selector:"[mclImagemSrc],[mclImagemBackground]"}]}],pe.ctorParameters=function(){return[{type:String,decorators:[{type:t.Inject,args:[ce]},{type:t.Optional}]},{type:t.ElementRef,decorators:[{type:t.Self}]},{type:void 0,decorators:[{type:t.Inject,args:[ue]}]}]},pe.propDecorators={imagemSrc:[{type:t.Input,args:["mclImagemSrc"]}],imagemBackground:[{type:t.Input,args:["mclImagemBackground"]}],padrao:[{type:t.Input}]};var de=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[X,ne,oe,ae,se,le]}},e}();de.decorators=[{type:t.NgModule,args:[{declarations:[J,K,te,re,ie,pe],exports:[J,te,re,pe],imports:[n.CommonModule,u.FormsModule,o.TranslateModule,r.MatDialogModule,c.MatIconModule,p.MatButtonModule,d.MatProgressSpinnerModule,h.FlexModule]}]}];var he=function(){function e(e,t){this.dadosPreview=e,this.arquivoService=t,this.loadingFile=!0}return e.prototype.ngOnInit=function(){"image"===this.type&&this.previewCarregado()},Object.defineProperty(e.prototype,"src",{get:function(){return this.dadosPreview.src},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this.dadosPreview.type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"group",{get:function(){return this.dadosPreview.group},enumerable:!1,configurable:!0}),e.prototype.handleEvent=function(e){"download"===e.name&&this.download()},e.prototype.previewCarregado=function(e){this.loadingFile=!1},e.prototype.download=function(){if("string"==typeof this.src){var e=document.createElement("a");e.href=this.src,e.target="_blank",document.body.appendChild(e),e.click(),document.body.removeChild(e)}},e}();he.decorators=[{type:t.Component,args:[{selector:"mcl-dialog-preview-arquivo",template:'<mat-dialog-content>\r\n <div class="spinner-wrapper" *ngIf="loadingFile">\r\n <mat-spinner style="margin: 0 auto" [diameter]="50" color="warn"></mat-spinner>\r\n </div>\r\n\r\n <pdf-viewer (page-rendered)="previewCarregado($event)" *ngIf="type === \'pdf\'"\r\n [src]="src" [original-size]="false"></pdf-viewer>\r\n\r\n <ngx-image-viewer [src]="group" [index]="group.indexOf(src)" *ngIf="type === \'image\' && group"\r\n [config]="{customBtns:[{name: \'download\', icon: \'fa fa-download\'}]}"\r\n (customEvent)="handleEvent($event)"></ngx-image-viewer>\r\n\r\n <ngx-image-viewer [src]="[src]" [index]="0" *ngIf="type === \'image\' && !group"\r\n [config]="{customBtns:[{name: \'download\', icon: \'fa fa-download\'}]}"\r\n (customEvent)="handleEvent($event)"></ngx-image-viewer>\r\n</mat-dialog-content>\r\n\r\n<div mat-dialog-actions>\r\n <button mat-button mat-dialog-close>\r\n <mat-icon>close</mat-icon>\r\n Fechar\r\n </button>\r\n\r\n <div class="spacer"></div>\r\n\r\n <button mat-stroked-button (click)="download()" *ngIf="!loadingFile">\r\n <mat-icon>cloud_download</mat-icon>\r\n Realizar o Download\r\n </button>\r\n</div>\r\n',styles:["pdf-viewer{width:100%;display:block}.spinner-wrapper{margin:30px auto;width:800px;height:400px}.dialog-title-text{margin-right:10px;line-height:38px}[mat-dialog-title]{display:flex;padding:8px 24px 7px}[mat-dialog-title] .spacer{flex:1 1 auto}[mat-dialog-actions]{text-align:right}[mat-dialog-actions] button{margin-left:auto}[mat-dialog-actions] button mat-icon{vertical-align:middle;margin-right:10px}"]}]}],he.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[r.MAT_DIALOG_DATA]}]},{type:void 0,decorators:[{type:t.Inject,args:[ue]}]}]};var me=function(){function e(e,t){this.arquivoManagerService=e,this.dialog=t,this.showLoading=!1,this.height="200px",this.width="200px"}return e.prototype.ngOnInit=function(){},Object.defineProperty(e.prototype,"arquivo",{get:function(){return this.$url},set:function(e){var t=this;this.$arquivo!==e&&(this.$arquivo=e,this.parseArquivo(e).subscribe((function(e){t.src=e.src,t.filename=e.filename,t.$url=e.url,t.type=e.type})))},enumerable:!1,configurable:!0}),e.prototype.parseArquivo=function(e){var t=this;return new l.Observable((function(n){if(e.loading){var r=t.parseType(e.file.name);n.next({type:r,filename:e.file.name}),t.carregaArrayBuffFile(e.file).then((function(t){n.next({src:t,type:r,filename:e.file.name}),n.complete()})).catch((function(e){return n.error(e)}))}else if("string"==typeof e){var o=t.parseType(e.split("?")[0]);n.next({type:o,url:e,src:e}),n.complete()}else{var i=t.parseType(e.nome);t.arquivoManagerService.downloadURL(e).subscribe((function(e){n.next({type:i,url:e,src:e}),n.complete()}),(function(e){return n.error(e)}))}}))},e.prototype.carregaArrayBuffFile=function(e){return new Promise((function(t,n){if("undefined"!=typeof FileReader){var r=new FileReader;r.onload=function(e){return t(e.target.result)},r.onerror=function(e){return n(e)},r.readAsArrayBuffer(e)}else n("FileReader not defined")}))},e.prototype.parseType=function(e){switch(e.substring(e.lastIndexOf(".")+1).toLowerCase()){case"jpeg":case"jpg":case"png":case"gif":return"image";case"pdf":return"pdf"}return"other"},e.prototype.abrePreview=function(){return G(this,void 0,void 0,(function(){var e,t,n=this;return U(this,(function(r){switch(r.label){case 0:return t=this.src,this.group?[4,Promise.all(this.group.map((function(e){return n.parseArquivo(e).toPromise()})))]:[3,2];case 1:e=r.sent(),t=e[this.group.indexOf(this.$arquivo)].src,e=e.filter((function(e){return!!e.src&&e.type===n.type})).map((function(e){return e.src})),r.label=2;case 2:return this.dialog.open(he,{data:{src:t,group:e,type:this.type}}),[2]}}))}))},e}();me.decorators=[{type:t.Component,args:[{selector:"mcl-preview-arquivo",template:'<img *ngIf="src && type===\'image\'" [src]="src"\r\n [ngStyle]="{width:width,height:height}"\r\n (click)="abrePreview()"/>\r\n\r\n<div class="other" *ngIf="!src || type === \'other\'"\r\n [ngStyle]="{width:width,height:height}"\r\n [mclDownloadArquivo]="arquivo">\r\n <mat-icon>insert_drive_file</mat-icon>\r\n <small>{{ filename }}</small>\r\n</div>\r\n\r\n<pdf-viewer [src]="src" *ngIf="src && type === \'pdf\'"\r\n [ngStyle]="{width:width,height:height}"\r\n [original-size]="false"\r\n [page]="1"\r\n [render-text]="false"\r\n (click)="abrePreview()"\r\n></pdf-viewer>\r\n',styles:[".other,img,pdf-viewer{overflow:hidden;display:block;border-radius:5px;background:#efefef;border:1px solid #a9a9a9}.other.other,img.other,pdf-viewer.other{display:flex;flex-direction:column;justify-items:center}.other.other mat-icon,img.other mat-icon,pdf-viewer.other mat-icon{margin:auto;text-align:center;font-size:75px;height:75px;width:75px;line-height:75px}.other:hover,img:hover,pdf-viewer:hover{cursor:pointer}"]}]}],me.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[ue]}]},{type:r.MatDialog}]},me.propDecorators={showLoading:[{type:t.Input}],height:[{type:t.Input}],width:[{type:t.Input}],group:[{type:t.Input}],arquivo:[{type:t.Input}]};var fe=function(){function e(e){this.arquivoService=e,this.target="_blank"}return e.prototype.getUrlArquivo=function(){return G(this,void 0,void 0,(function(){return U(this,(function(e){switch(e.label){case 0:return"string"==typeof this.attachment?[2,this.attachment]:[4,this.arquivoService.downloadURL(this.attachment).toPromise()];case 1:return[2,e.sent()]}}))}))},e.prototype.download=function(){return G(this,void 0,void 0,(function(){var e,t;return U(this,(function(n){switch(n.label){case 0:return this.attachment?(e=document.createElement("a"),t=e,[4,this.getUrlArquivo()]):[2];case 1:return t.href=n.sent(),e.target=this.target,document.body.appendChild(e),e.click(),document.body.removeChild(e),[2]}}))}))},e}();fe.decorators=[{type:t.Directive,args:[{selector:"[mclDownloadArquivo]"}]}],fe.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[ue]}]}]},fe.propDecorators={attachment:[{type:t.Input,args:["mclDownloadArquivo"]}],target:[{type:t.Input}],download:[{type:t.HostListener,args:["click"]}]};var ge=function(){};ge.decorators=[{type:t.NgModule,args:[{declarations:[me,fe,he],exports:[me,fe],imports:[n.CommonModule,c.MatIconModule,b.PdfViewerModule,r.MatDialogModule,d.MatProgressSpinnerModule,p.MatButtonModule,C.ImageViewerModule]}]}];var ye=function(e){this.template=e};ye.decorators=[{type:t.Directive,args:[{selector:"[mclColumnHeader]"}]}],ye.ctorParameters=function(){return[{type:t.TemplateRef}]};var ve=function(e){this.template=e};ve.decorators=[{type:t.Directive,args:[{selector:"[mclColumnCell]"}]}],ve.ctorParameters=function(){return[{type:t.TemplateRef}]};var be=function(e){this.template=e};be.decorators=[{type:t.Directive,args:[{selector:"[mclColumnFooter]"}]}],be.ctorParameters=function(){return[{type:t.TemplateRef}]};var Ce=function(){function e(){this.name="column_"+ ++e.lastId,this.viewType="both"}return Object.defineProperty(e.prototype,"columnDefName",{get:function(){return this.viewType+"-"+this.name},enumerable:!1,configurable:!0}),e}();Ce.lastId=0,Ce.decorators=[{type:t.Directive,args:[{selector:"mcl-column,[mclColumn]"}]}],Ce.ctorParameters=function(){return[]},Ce.propDecorators={name:[{type:t.Input}],viewType:[{type:t.Input}],header:[{type:t.ContentChild,args:[ye]}],cell:[{type:t.ContentChild,args:[ve]}],footer:[{type:t.ContentChild,args:[be]}]};var xe=function(){function e(e){var t=this;this.mobileService=e,this.itemsSubject=new l.BehaviorSubject([]),this.emptyStateMessage="mcl.table.nenhum_registro_encontrado",this.sticky=!1,this.currentColumns=[],this.$activeColumnNames=[],this.oldLength=0,this.mobileListener=function(e){return t.mergeColumnsDef(e)},this.mobileService.addListener(this.mobileListener)}return Object.defineProperty(e.prototype,"activeColumnNames",{get:function(){return this.$activeColumnNames},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasFooter",{get:function(){return!!this.currentColumns.find((function(e){return!!e.footerCell}))},enumerable:!1,configurable:!0}),e.prototype.mergeColumnsDef=function(e){var t=this;void 0===e&&(e=this.mobileService.mobile),clearTimeout(this.$loading),this.$loading=setTimeout((function(){for(var n,r=t.columnsDef.toArray().filter((function(t){return e&&"web"!==t.viewType||!e&&"mobile"!==t.viewType})),o=function(e){var o=t.currentColumns[e];r.find((function(e){return e.columnDefName===o.name}))?e++:(t.currentColumns.splice(e,1),t.removeColumnDef(o)),n=e},i=0;i<t.currentColumns.length;)o(i),i=n;r.forEach((function(e){if(!t.currentColumnsContains(e)){var n=t.mapColumnDef(e);t.currentColumns.push(n),t.addColumnDef(n)}})),t.items=t.getItems()||[],t.itemsSubject.next(t.items),t.$activeColumnNames=t.currentColumns.map((function(e){return e.name}))}),80)},e.prototype.ngAfterViewInit=function(){var e=this;this.columnsChangeSubscription=this.columnsDef.changes.subscribe((function(t){e.mergeColumnsDef()})),this.mergeColumnsDef()},e.prototype.ngDoCheck=function(){var e=this.getCurrentLength();this.oldLength!==e?(this.oldLength=e,this.items=this.getItems()||[],this.itemsSubject.next(this.items)):this.items!==this.getItems()&&(this.items=this.getItems()||[],this.itemsSubject.next(this.items))},e.prototype.getItems=function(){return this.outerItems},e.prototype.getCurrentLength=function(){return this.outerItems?this.outerItems.length:0},e.prototype.ngOnDestroy=function(){this.mobileService.removeListener(this.mobileListener),this.columnsChangeSubscription.unsubscribe(),this.itemsSubject.complete()},e.prototype.removeColumnDef=function(e){this.table.removeColumnDef(e)},e.prototype.addColumnDef=function(e){this.table.addColumnDef(e)},e.prototype.mapColumnDef=function(e){var t=new x.MatColumnDef;return t.name=e.viewType+"-"+e.name,t.cell=new x.MatCellDef(e.cell.template),t.headerCell=new x.MatHeaderCellDef(e.header.template),e.footer&&(t.footerCell=new x.MatFooterCellDef(e.footer.template)),t},e.prototype.currentColumnsContains=function(e){return!!this.currentColumns.find((function(t){return t.name===e.columnDefName}))},e}();xe.decorators=[{type:t.Component,args:[{selector:"mcl-table:not([page])",template:'<table mat-table [dataSource]="itemsSubject">\n\n <tr mat-header-row *matHeaderRowDef="activeColumnNames; sticky: sticky"></tr>\n <tr mat-row *matRowDef="let row; columns: activeColumnNames;"></tr>\n <ng-container *ngIf="hasFooter">\n <tr mat-footer-row *matFooterRowDef="activeColumnNames;"></tr>\n </ng-container>\n\n</table>\n\n<div *ngIf="!items?.length && !emptyStatePlaceholder" class="empty-state">\n {{emptyStateMessage | translate}}\n</div>\n<ng-container *ngIf="!items?.length && emptyStatePlaceholder">\n <ng-content select="[mclEmptyState]"></ng-content>\n</ng-container>\n',styles:["table{width:100%}table::ng-deep th:not(:last-child),table td:not(:last-child){padding-right:5px}table::ng-deep th.text-center,table td.text-center{text-align:center}table::ng-deep th.text-right,table td.text-right{text-align:right}table::ng-deep th.text-left,table td.text-left{text-align:left}.empty-state{padding:10px;text-align:center}table::ng-deep tbody tr{transition:.5s}table::ng-deep tbody tr:hover{background-color:rgba(0,0,0,.03)}table::ng-deep tbody td[routerLink]{cursor:pointer}"]}]}],xe.ctorParameters=function(){return[{type:le}]},xe.propDecorators={emptyStateMessage:[{type:t.Input}],table:[{type:t.ViewChild,args:[x.MatTable]}],emptyStatePlaceholder:[{type:t.ContentChild,args:["[mclEmptyState]",{read:t.ElementRef}]}],columnsDef:[{type:t.ContentChildren,args:[Ce]}],outerItems:[{type:t.Input,args:["items"]}],sticky:[{type:t.Input}]};var Me=function(){function e(e){e.nativeElement.classList.add("mat-header-cell")}return e.prototype.ngOnInit=function(){},e}();Me.decorators=[{type:t.Component,args:[{selector:"th,mcl-th",template:"<ng-content></ng-content>\n",styles:[""]}]}],Me.ctorParameters=function(){return[{type:t.ElementRef,decorators:[{type:t.Self}]}]};var we=function(){function e(e){e.nativeElement.classList.add("mat-cell")}return e.prototype.ngOnInit=function(){},e}();we.decorators=[{type:t.Component,args:[{selector:"td,mcl-td",template:"<ng-content></ng-content>\n",styles:[""]}]}],we.ctorParameters=function(){return[{type:t.ElementRef,decorators:[{type:t.Self}]}]};var Ie=new t.InjectionToken("PAGINATION_CONFIGURATION"),Pe=function(e){function n(n,r){var o=e.call(this,n)||this;return o.paginate=new t.EventEmitter,o.sizes=(null==r?void 0:r.sizes)||[10,25,50],o}return H(n,e),n.prototype.getCurrentLength=function(){return this.page&&this.page.itens?this.page.itens.length:0},n.prototype.getItems=function(){return this.page?this.page.itens:void 0},n.prototype.paginaEvent=function(e){this.paginate.emit({pagina:e.pageIndex+1,tamanhoPagina:e.pageSize,loader:this.loader})},n}(xe);Pe.decorators=[{type:t.Component,args:[{selector:"mcl-table[page]",template:'<div #div>\n <table mat-table #matTable [dataSource]="itemsSubject">\n\n <tr mat-header-row *matHeaderRowDef="activeColumnNames; sticky: page && !page.totalItens"></tr>\n <tr mat-row *matRowDef="let row; columns: activeColumnNames;"></tr>\n <ng-container *ngIf="hasFooter">\n <tr mat-footer-row *matFooterRowDef="activeColumnNames;"></tr>\n </ng-container>\n\n </table>\n\n <mcl-loader [showOnInit]="true" [component]="div"></mcl-loader>\n</div>\n\n<div *ngIf="!items?.length && !emptyStatePlaceholder" class="empty-state">\n {{emptyStateMessage | translate}}\n</div>\n<ng-container *ngIf="!items?.length && emptyStatePlaceholder">\n <ng-content select="[mclEmptyState]"></ng-content>\n</ng-container>\n\n<mcl-paginator [pageSize]="page?.tamanhoPagina"\n (page)="paginaEvent($event)"\n [pageIndex]="(page?.paginaAtual || 1) - 1"\n [length]="page?.totalItens"\n [pageSizeOptions]="sizes"\n [showFirstLastButtons]="true"\n *ngIf="page?.totalItens">\n</mcl-paginator>\n',styles:["","table{width:100%}table::ng-deep th:not(:last-child),table td:not(:last-child){padding-right:5px}table::ng-deep th.text-center,table td.text-center{text-align:center}table::ng-deep th.text-right,table td.text-right{text-align:right}table::ng-deep th.text-left,table td.text-left{text-align:left}.empty-state{padding:10px;text-align:center}table::ng-deep tbody tr{transition:.5s}table::ng-deep tbody tr:hover{background-color:rgba(0,0,0,.03)}table::ng-deep tbody td[routerLink]{cursor:pointer}"]}]}],Pe.ctorParameters=function(){return[{type:le},{type:void 0,decorators:[{type:t.Inject,args:[Ie]},{type:t.Optional}]}]},Pe.propDecorators={sizes:[{type:t.Input}],paginate:[{type:t.Output}],page:[{type:t.Input}],loader:[{type:t.ViewChild,args:[J]}]};var De=function(e){var t=/(auto|scroll)/,n=function(e,t){return null===e.parentNode||void 0===e.parentNode?t:n(e.parentNode,t.concat([e]))},r=function(e,t){return getComputedStyle(e,null).getPropertyValue(t)},o=function(e){return t.test(function(e){return r(e,"overflow")+r(e,"overflow-y")}(e))};return function(e){var t,r;if(e instanceof HTMLElement||e instanceof SVGElement){var i=n(e,[]);try{for(var a=Y(i),s=a.next();!s.done;s=a.next()){var l=s.value;if(o(l))return l}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}return document.scrollingElement||document.documentElement}}(e)},Oe=function(e){function n(n,r){var o=e.call(this,r)||this;return o.element=n,o.next=new t.EventEmitter,o.hasNext=!1,o.scrollHeight=200,o}return H(n,e),Object.defineProperty(n.prototype,"loading",{get:function(){return!this.loader||this.loader.shown},enumerable:!1,configurable:!0}),n.prototype.ngAfterViewInit=function(){var t=this;e.prototype.ngAfterViewInit.call(this),this.parent=De(this.element.nativeElement),this.parent.onscroll=function(){t.hasNext&&!t.loader.shown&&t.parent.scrollHeight-t.parent.clientHeight-t.parent.scrollTop<t.scrollHeight&&t.loadMore()},this.next.emit(this.loader)},n.prototype.ngDoCheck=function(){e.prototype.ngDoCheck.call(this),this.hasNext&&!this.loader.shown&&this.parent.scrollHeight===this.parent.clientHeight&&this.loadMore()},n.prototype.ngOnDestroy=function(){e.prototype.ngOnDestroy.call(this),this.parent.onscroll=void 0},n.prototype.loadMore=function(){this.hasNext&&this.next.emit(this.loader)},n}(xe);Oe.decorators=[{type:t.Component,args:[{selector:"mcl-infinite-table",template:'<table mat-table [dataSource]="itemsSubject">\n\n <tr mat-header-row *matHeaderRowDef="activeColumnNames; sticky: true"></tr>\n <tr mat-row *matRowDef="let row; columns: activeColumnNames;"></tr>\n <ng-container *ngIf="hasFooter">\n <tr mat-footer-row *matFooterRowDef="activeColumnNames;"></tr>\n </ng-container>\n\n</table>\n\n<ng-container *ngIf="!hasNext && !loading && !items?.length">\n <div *ngIf="!emptyStatePlaceholder" class="empty-state">\n {{emptyStateMessage | translate}}\n </div>\n <ng-container *ngIf="emptyStatePlaceholder">\n <ng-content select="[mclEmptyState]"></ng-content>\n </ng-container>\n</ng-container>\n\n<div #div class="loading" [ngClass]="{\'hidden\':!loading}">\n <mcl-loader #loader [showOnInit]="true" [component]="div"></mcl-loader>\n</div>\n',styles:[":host{justify-content:flex-start;display:flex;flex-direction:column}mcl-loader{flex-grow:0;flex-shrink:0;flex-basis:auto}.loading{height:100px;display:block}.loading.hidden{height:0;display:none}","table{width:100%}table::ng-deep th:not(:last-child),table td:not(:last-child){padding-right:5px}table::ng-deep th.text-center,table td.text-center{text-align:center}table::ng-deep th.text-right,table td.text-right{text-align:right}table::ng-deep th.text-left,table td.text-left{text-align:left}.empty-state{padding:10px;text-align:center}table::ng-deep tbody tr{transition:.5s}table::ng-deep tbody tr:hover{background-color:rgba(0,0,0,.03)}table::ng-deep tbody td[routerLink]{cursor:pointer}"]}]}],Oe.ctorParameters=function(){return[{type:t.ElementRef,decorators:[{type:t.Self}]},{type:le}]},Oe.propDecorators={next:[{type:t.Output}],hasNext:[{type:t.Input}],scrollHeight:[{type:t.Input}],loader:[{type:t.ViewChild,args:[J]}]};var ke=function(){function e(e){this.translate=e}return e.prototype.getPaginatorIntl=function(){var e=new M.MatPaginatorIntl;return e.itemsPerPageLabel=this.translate.instant("mcl.table.items_per_page"),e.nextPageLabel=this.translate.instant("mcl.table.next_page"),e.previousPageLabel=this.translate.instant("mcl.table.previous_page"),e.firstPageLabel=this.translate.instant("mcl.table.first_page"),e.lastPageLabel=this.translate.instant("mcl.table.last_page"),e.getRangeLabel=this.getRangeLabel.bind(this),e},e.prototype.getRangeLabel=function(e,t,n){var r=e*t,o=r<(n=Math.max(n,0))?Math.min(r+t,n):r+t;return this.translate.instant("mcl.table.range",{startIndex:r+1,endIndex:o,length:n})},e}(),Se=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return H(t,e),t}(M.MatPaginator);Se.decorators=[{type:t.Component,args:[{selector:"mcl-paginator",template:'<div class="mat-paginator-outer-container">\n <div class="mat-paginator-container">\n <div class="mat-paginator-page-size" *ngIf="!hidePageSize">\n <div class="mat-paginator-page-size-label">\n {{_intl.itemsPerPageLabel}}\n </div>\n\n <mat-form-field\n *ngIf="_displayedPageSizeOptions.length > 1"\n appearance="standard"\n [color]="color"\n class="mat-paginator-page-size-select">\n <mat-select\n [value]="pageSize"\n [disabled]="disabled"\n [aria-label]="_intl.itemsPerPageLabel"\n (selectionChange)="_changePageSize($event.value)">\n <mat-option *ngFor="let pageSizeOption of _displayedPageSizeOptions" [value]="pageSizeOption">\n {{\'mcl.table.option\' | translate:{option:pageSizeOption} }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <div\n class="mat-paginator-page-size-value"\n *ngIf="_displayedPageSizeOptions.length <= 1">{{pageSize}}</div>\n </div>\n\n <div class="mat-paginator-range-actions">\n\n <button mat-icon-button type="button"\n class="mat-paginator-navigation-first"\n (click)="firstPage()"\n [attr.aria-label]="_intl.firstPageLabel"\n [matTooltip]="_intl.firstPageLabel"\n [matTooltipDisabled]="_previousButtonsDisabled()"\n [matTooltipPosition]="\'above\'"\n [disabled]="_previousButtonsDisabled()"\n *ngIf="showFirstLastButtons">\n <svg class="mat-paginator-icon" viewBox="0 0 24 24" focusable="false">\n <path d="M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"/>\n </svg>\n </button>\n <button mat-icon-button type="button"\n class="mat-paginator-navigation-previous"\n (click)="previousPage()"\n [attr.aria-label]="_intl.previousPageLabel"\n [matTooltip]="_intl.previousPageLabel"\n [matTooltipDisabled]="_previousButtonsDisabled()"\n [matTooltipPosition]="\'above\'"\n [disabled]="_previousButtonsDisabled()">\n <svg class="mat-paginator-icon" viewBox="0 0 24 24" focusable="false">\n <path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/>\n </svg>\n </button>\n\n <div class="mat-paginator-range-label">\n {{_intl.getRangeLabel(pageIndex, pageSize, length)}}\n </div>\n\n <button mat-icon-button type="button"\n class="mat-paginator-navigation-next"\n (click)="nextPage()"\n [attr.aria-label]="_intl.nextPageLabel"\n [matTooltip]="_intl.nextPageLabel"\n [matTooltipDisabled]="_nextButtonsDisabled()"\n [matTooltipPosition]="\'above\'"\n [disabled]="_nextButtonsDisabled()">\n <svg class="mat-paginator-icon" viewBox="0 0 24 24" focusable="false">\n <path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/>\n </svg>\n </button>\n <button mat-icon-button type="button"\n class="mat-paginator-navigation-last"\n (click)="lastPage()"\n [attr.aria-label]="_intl.lastPageLabel"\n [matTooltip]="_intl.lastPageLabel"\n [matTooltipDisabled]="_nextButtonsDisabled()"\n [matTooltipPosition]="\'above\'"\n [disabled]="_nextButtonsDisabled()"\n *ngIf="showFirstLastButtons">\n <svg class="mat-paginator-icon" viewBox="0 0 24 24" focusable="false">\n <path d="M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"/>\n </svg>\n </button>\n </div>\n </div>\n</div>\n',styles:[".mat-paginator{display:block}.mat-paginator-outer-container{display:flex}.mat-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap-reverse;width:100%}.mat-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}[dir=rtl] .mat-paginator-page-size{margin-right:0;margin-left:8px}.mat-paginator-page-size-label{margin:0 4px}.mat-paginator-page-size-select{margin:6px 4px 0;width:81px}.mat-paginator-range-label{margin:0 32px 0 24px}.mat-paginator-range-actions{display:flex;align-items:center}.mat-paginator-icon{width:28px;fill:currentColor}[dir=rtl] .mat-paginator-icon{transform:rotate(180deg)}"]}]}];var je=function(){};function Ve(e){return new ke(e).getPaginatorIntl()}je.decorators=[{type:t.NgModule,args:[{exports:[xe,Ce,ye,ve,be,Me,we,Pe,Oe,Se],declarations:[xe,Ce,ye,ve,be,Me,we,Pe,Oe,Se],imports:[n.CommonModule,x.MatTableModule,M.MatPaginatorModule,p.MatButtonModule,c.MatIconModule,de,o.TranslateModule,w.MatFormFieldModule,I.MatSelectModule,P.MatTooltipModule],providers:[{provide:M.MatPaginatorIntl,deps:[o.TranslateService],useFactory:Ve}]}]}];var Ae=function(){function e(){this.filtro={},this.items=[]}return Object.defineProperty(e.prototype,"hasNext",{get:function(){return!!this.nextPage},enumerable:!1,configurable:!0}),e.prototype.ngAfterViewInit=function(){this.reset()},e.prototype.reset=function(e){return void 0===e&&(e=this.filtro),G(this,void 0,void 0,(function(){return U(this,(function(t){switch(t.label){case 0:return this.filtro=e,this.items=[],this.nextPage=void 0,[4,this.next()];case 1:return t.sent(),[2]}}))}))},e.prototype.next=function(e){return void 0===e&&(e=this.infiniteTable.loader),G(this,void 0,void 0,(function(){var t=this;return U(this,(function(n){return clearTimeout(this.timeoutConsulta),this.timeoutConsulta=setTimeout((function(){e.listen(t.consulta(e)).toPromise()}),800),[2]}))}))},e.prototype.consulta=function(e){return G(this,void 0,void 0,(function(){var e;return U(this,(function(t){switch(t.label){case 0:return[4,this.consultaEntidades(this.nextPage)];case 1:return e=t.sent(),this.items=W(this.items,e.itens||[]),this.nextPage=e.nextPage,[2]}}))}))},e.prototype.remove=function(e){return G(this,void 0,void 0,(function(){return U(this,(function(t){switch(t.label){case 0:return[4,this.dialogService.confirma("mcl.consulta.confirma-remocao").toPromise()];case 1:return t.sent()?[4,this.loaderService.listen(this.deleteEntidade(e)).toPromise()]:[3,3];case 2:t.sent(),this.reset(),t.label=3;case 3:return[2]}}))}))},e}();Ae.decorators=[{type:t.Component,args:[{template:""}]}],Ae.propDecorators={infiniteTable:[{type:t.ViewChild,args:[Oe]}]};var Te=function(){function e(){this.filtro={}}return e.prototype.ngAfterViewInit=function(){this.reset()},e.prototype.reset=function(e){return void 0===e&&(e=this.filtro),G(this,void 0,void 0,(function(){return U(this,(function(t){switch(t.label){case 0:return this.filtro=e,this.page=void 0,[4,this.busca()];case 1:return t.sent(),[2]}}))}))},e.prototype.busca=function(e){return void 0===e&&(e={pagina:1,tamanhoPagina:this.page&&this.page.tamanhoPagina||this.infiniteTable.sizes[0],loader:this.infiniteTable.loader}),G(this,void 0,void 0,(function(){var t=this;return U(this,(function(n){return clearTimeout(this.timeoutConsulta),this.timeoutConsulta=setTimeout((function(){return G(t,void 0,void 0,(function(){var t;return U(this,(function(n){switch(n.label){case 0:return t=this,[4,e.loader.listen(this.consultaEntidades(e.pagina,e.tamanhoPagina)).toPromise()];case 1:return t.page=n.sent(),[2]}}))}))}),300),[2]}))}))},e.prototype.remove=function(e){return G(this,void 0,void 0,(function(){return U(this,(function(t){switch(t.label){case 0:return[4,this.dialogService.confirma("mcl.consulta.confirma-remocao").toPromise()];case 1:return t.sent()?[4,this.loaderService.listen(this.deleteEntidade(e)).toPromise()]:[3,3];case 2:t.sent(),t.label=3;case 3:return[2]}}))}))},e}();Te.decorators=[{type:t.Component,args:[{template:""}]}],Te.propDecorators={infiniteTable:[{type:t.ViewChild,args:[Pe]}]};var Ee=function(){function e(){this.entidade={}}return e.prototype.ngOnInit=function(){var e=this;this.activatedRoute.params.subscribe((function(t){t.id&&e.loaderService.listen(e.detalhaEntidade(t.id)).subscribe((function(t){return e.entidade=t}))}))},e.prototype.salva=function(e){return G(this,void 0,void 0,(function(){return U(this,(function(t){switch(t.label){case 0:return e.valid?[4,this.loaderService.listen(this.salvaEntidade()).toPromise()]:[2];case 1:return t.sent(),this.mensageriaService.addMensagem("mcl.edicao.salvo-sucesso"),[2]}}))}))},e}();Ee.decorators=[{type:t.Component,args:[{template:""}]}];var _e=function(){function e(){}return e.prototype.salva=function(e){return G(this,void 0,void 0,(function(){var t;return U(this,(function(n){switch(n.label){case 0:return e.valid?[4,this.loaderService.listen(this.salvaEntidade()).toPromise()]:[2];case 1:return t=n.sent(),this.mensageriaService.addMensagem("mcl.edicao.salvo-sucesso"),this.dialogRef.close(t),[2]}}))}))},e.prototype.remove=function(e){return G(this,void 0,void 0,(function(){return U(this,(function(t){switch(t.label){case 0:return[4,this.dialogService.confirma("mcl.consulta.confirma-remocao").toPromise()];case 1:return t.sent()?[4,this.loaderService.listen(this.deleteEntidade(e)).toPromise()]:[3,3];case 2:t.sent(),this.dialogRef.close(!0),t.label=3;case 3:return[2]}}))}))},e}(),Fe=function(){};Fe.decorators=[{type:t.NgModule,args:[{declarations:[],exports:[],imports:[n.CommonModule]}]}];var Le=function(){function e(){}return e.prototype.validate=function(e){if(e.value&&e.value.getTime()<=(new Date).getTime())return{futuro:!0}},e}();Le.decorators=[{type:t.Directive,args:[{selector:"[mclFuturo]",providers:[{provide:u.NG_VALIDATORS,useExisting:Le,multi:!0}]}]}],Le.ctorParameters=function(){return[]};var $e=function(){function e(){this.datePipe=new n.DatePipe("pt-br"),this.permiteDataIgual=!0,this.onValidatorChange=function(){}}return e.prototype.registerOnValidatorChange=function(e){this.onValidatorChange=e},Object.defineProperty(e.prototype,"dataMaxima",{get:function(){var e=this.bgcDataMaxAtual||""===this.bgcDataMaxAtual?new Date:void 0;return e&&this._dataMaxima?moment(e).isBefore(this._dataMaxima,"day")?e:this._dataMaxima:e||this._dataMaxima},set:function(e){this._dataMaxima=moment(e).toDate(),this.onValidatorChange()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataMinima",{get:function(){var e=this.bgcDataMinAtual||""===this.bgcDataMinAtual?new Date:void 0;return e&&this._dataMinima?moment(e).isAfter(this._dataMinima,"day")?this._dataMinima:e:e||this._dataMinima},set:function(e){this._dataMinima=moment(e).toDate(),this.onValidatorChange()},enumerable:!1,configurable:!0}),e.prototype.validate=function(e){if(!e.value)return null;if("Invalid Date"===e.value.toString()||e.value.getUTCFullYear()<1900)return{date:!0};var t=this.dataMinima;if(t)if(this.permiteDataIgual){if(moment(e.value).isBefore(t,"day"))return{dataMinIgual:{data:this.datePipe.transform(t,"dd/MM/yyyy")}}}else if(!moment(e.value).isAfter(t,"day"))return{dataMin:{data:this.datePipe.transform(t,"dd/MM/yyyy")}};var n=this.dataMaxima;if(n)if(this.permiteDataIgual){if(moment(e.value).isAfter(n,"day"))return{dataMaxIgual:{data:this.datePipe.transform(n,"dd/MM/yyyy")}}}else if(!moment(e.value).isBefore(n,"day"))return{dataMax:{data:this.datePipe.transform(n,"dd/MM/yyyy")}};return null},e.prototype.isFDS=function(e){return 0===e.getDay()||6===e.getDay()},e}();$e.decorators=[{type:t.Directive,args:[{selector:"[mclDataMinAtual],[mclDataMaxAtual],[mclDataMax],[mclDataMin]",providers:[{provide:u.NG_VALIDATORS,useExisting:$e,multi:!0}]}]}],$e.ctorParameters=function(){return[]},$e.propDecorators={bgcDataMinAtual:[{type:t.Input}],bgcDataMaxAtual:[{type:t.Input}],permiteDataIgual:[{type:t.Input}],dataMaxima:[{type:t.Input,args:["bgcDataMax"]}],dataMinima:[{type:t.Input,args:["bgcDataMin"]}]};var qe=function(){};qe.decorators=[{type:t.NgModule,args:[{declarations:[Le,$e],exports:[Le,$e],imports:[n.CommonModule]}]}];var Ne=function(){function e(t,n,r,o){this.errorStateMatcher=t,this.ngControl=n,this.parentForm=r,this.parentFormGroup=o,this.$disabled=!1,this.$required=!1,this.focused=!1,this.stateChanges=new l.Subject,this.id="custom-input-"+e.nextId++,this.describedBy="",this.onChange=function(e){},this.onTouched=function(){},null!=this.ngControl&&(this.ngControl.valueAccessor=this)}return Object.defineProperty(e.prototype,"value",{get:function(){return this.$value},set:function(e){this.$value=e,this.onChange(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return!this.value},enumerable:!1,configurable:!0}),e.prototype.onContainerClick=function(e){},Object.defineProperty(e.prototype,"shouldLabelFloat",{get:function(){return!this.empty||this.input&&this.input.nativeElement.value||this.focused},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"placeholder",{get:function(){return this.$placeholder},set:function(e){this.$placeholder=e,this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return this.$required},set:function(e){this.$required=O.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this.$disabled},set:function(e){this.$disabled=O.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"errorState",{get:function(){return this.errorStateMatcher.isErrorState(this.ngControl.control,this.parentFormGroup||this.parentForm)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controlType",{get:function(){return"custom-input"},enumerable:!1,configurable:!0}),e.prototype.setDescribedByIds=function(e){this.describedBy=e.join(" ")},e.prototype.ngOnDestroy=function(){this.stateChanges.complete()},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.writeValue=function(e){this.$value=e},e}();Ne.nextId=0,Ne.decorators=[{type:t.Component,args:[{template:""}]}],Ne.ctorParameters=function(){return[{type:D.ErrorStateMatcher},{type:u.NgControl},{type:u.NgForm},{type:u.FormGroupDirective}]},Ne.propDecorators={input:[{type:t.ViewChild,args:["input"]}],id:[{type:t.HostBinding}],describedBy:[{type:t.HostBinding,args:["attr.aria-describedby"]}],shouldLabelFloat:[{type:t.HostBinding,args:["class.floating"]}],placeholder:[{type:t.Input}],required:[{type:t.Input}],disabled:[{type:t.Input}]};var Be=function(e){function t(t,n,r,o,i,a){var s=e.call(this,t,n,r,o)||this;return s.adapter=i,s.formats=a,s.type="date",s}return H(t,e),Object.defineProperty(t.prototype,"empty",{get:function(){return!this.$maskedValue},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maskedValue",{get:function(){return this.$maskedValue},set:function(e){this.$maskedValue!==e&&(this.onTouched(),this.$maskedValue=e,e&&e.match(new RegExp("^"+this.mask.replace(/#/g,"\\d")+"$"))?this.innerValue=this.adapter.parse(e,this.format).toDate():this.innerValue=void 0,this.onChange(this.innerValue),this.stateChanges.next())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mask",{get:function(){switch(this.type){case"date":return"##/##/####";case"time":return"##:##"}return"##/##/#### ##:##"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"format",{get:function(){switch(this.type){case"date":return this.formats.display.dateInput;case"time":return this.formats.display.timeInput}return this.formats.display.datetimeInput},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.innerValue},set:function(e){this.innerValue!==e&&(this.onTouched(),e?(this.innerValue=e instanceof Date?e:e.toDate(),this.$maskedValue=this.adapter.format(R(this.innerValue),this.format)):(this.innerValue=void 0,this.$maskedValue=""),this.onChange(this.innerValue),this.stateChanges.next())},enumerable:!1,configurable:!0}),t.prototype.writeValue=function(e){this.innerValue=e,this.$maskedValue=e?this.adapter.format(R(e),this.format):"",this.stateChanges.next()},t}(Ne);Be.decorators=[{type:t.Component,args:[{selector:"mcl-input-datetime",template:'<div class="dateinput">\n <input matInput autocomplete="false" [disabled]="disabled" ngModel\n [readonly]="readonly" [(mclModel)]="maskedValue" [mask]="mask"\n (focus)="focused = true" (blur)="focused = false" [keepMask]="true"\n />\n <mat-datetimepicker [disabled]="disabled || readonly"\n [type]="type" #pickerData></mat-datetimepicker>\n <mat-datetimepicker-toggle [for]="pickerData"></mat-datetimepicker-toggle>\n</div>\n<input class="hidden" [(ngModel)]="value" [matDatetimepicker]="pickerData" />\n',providers:[{provide:w.MatFormFieldControl,useExisting:Be}],styles:[".dateinput{display:flex}.dateinput input{flex:1 1 auto}.dateinput mat-datetimepicker-toggle{margin:-16px 0 -6px}.hidden{display:none}"]}]}],Be.ctorParameters=function(){return[{type:D.ErrorStateMatcher},{type:u.NgControl,decorators:[{type:t.Optional},{type:t.Self}]},{type:u.NgForm,decorators:[{type:t.Optional}]},{type:u.FormGroupDirective,decorators:[{type:t.Optional}]},{type:S.DatetimeAdapter,decorators:[{type:t.Inject,args:[S.DatetimeAdapter]}]},{type:void 0,decorators:[{type:t.Inject,args:[S.MAT_DATETIME_FORMATS]}]}]},Be.propDecorators={type:[{type:t.Input}],readonly:[{type:t.Input}],name:[{type:t.Input}],picker:[{type:t.ViewChild,args:["pickerData"]}]};var Re={parse:{dateInput:"L",monthInput:"MMMM",timeInput:"LT",datetimeInput:"L LT"},display:{dateInput:"L",monthInput:"MMMM",datetimeInput:"L LT",timeInput:"LT",monthYearLabel:"MMM YYYY",dateA11yLabel:"LL",monthYearA11yLabel:"MMMM YYYY",popupHeaderDateLabel:"ddd, DD MMM"}},ze=function(){};ze.decorators=[{type:t.NgModule,args:[{declarations:[Be],imports:[n.CommonModule,k.MatInputModule,u.FormsModule,A.MatDatepickerModule,S.MatDatetimepickerModule,j.MomentDatetimeModule,de],exports:[Be],providers:[{provide:D.MAT_DATE_LOCALE,useExisting:t.LOCALE_ID},{provide:S.DatetimeAdapter,useClass:j.MomentDatetimeAdapter},{provide:S.MAT_DATETIME_FORMATS,useValue:Re}]}]}];var He=function(){function e(n,r,o,i,s,l){this.errorStateMatcher=n,this.ngControl=r,this.parentForm=o,this.changeDetectorRef=i,this.parentFormGroup=s,this.arquivoService=l,this.$disabled=!1,this.$required=!1,this.template="preview",this.selectCancel=new t.EventEmitter,this.stateChanges=new a.Subject,this.change=new t.EventEmitter,this.id="input-fileupload-"+e.nextId++,this.describedBy="",this.onChange=function(e){},this.onTouched=function(){},null!=this.ngControl&&(this.ngControl.valueAccessor=this)}return Object.defineProperty(e.prototype,"focused",{get:function(){return this.value&&(this.multiple?this.value.find((function(e){return e.loading})):this.value.loading)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return!this.value},enumerable:!1,configurable:!0}),e.prototype.onContainerClick=function(e){},Object.defineProperty(e.prototype,"shouldLabelFloat",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"placeholder",{get:function(){return this.$placeholder},set:function(e){this.$placeholder=e,this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return this.$required},set:function(e){this.$required=O.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this.$disabled},set:function(e){this.$disabled=O.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"errorState",{get:function(){return this.errorStateMatcher.isErrorState(this.ngControl.control,this.parentFormGroup||this.parentForm)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controlType",{get:function(){return"input-fileupload"},enumerable:!1,configurable:!0}),e.prototype.setDescribedByIds=function(e){this.describedBy=e.join(" ")},e.prototype.ngOnDestroy=function(){this.stateChanges.complete()},e.prototype.upload=function(e){var t=this;return new a.Observable((function(n){if(!t.validaFormato(e.nome))return e.error={fileFormat:!0},n.error("Formato inválido"),t.onChange(t.value),t.change.emit(t.value),void t.stateChanges.next();if(t.limite){var r=t.parseLimite();if(e.length>r)return e.error={fileSize:{limite:t.limite}},n.error("Tamanho inválido"),t.onChange(t.value),t.change.emit(t.value),void t.stateChanges.next()}t.arquivoService.upload(e.file).subscribe((function(r){"conclusao"===r.type?(e.progresso=void 0,t.multiple?(t.value=W((t.value||[]).map((function(t){return t===e?r.attachment:t}))),t.onChange(t.value),t.change.emit(t.value),t.stateChanges.next()):(t.value=r.attachment,t.onChange(r.attachment),t.change.emit(r.attachment),t.stateChanges.next()),n.next(),n.complete()):"progresso"===r.type&&(e.progresso=r.progresso,t.stateChanges.next())}),(function(r){e.error={fileError:!0},t.onChange(t.value),t.change.emit(t.value),t.stateChanges.next(),n.error(r)}))}))},e.prototype.parseLimite=function(){var e=Number(this.limite.replace(/\D+/g,""));return this.limite.toUpperCase().indexOf("GB")>=0&&(e=1024*e*1024*1024),this.limite.toUpperCase().indexOf("MB")>=0&&(e=1024*e*1024),this.limite.toUpperCase().indexOf("KB")>=0&&(e*=1024),e},e.prototype.validaFormato=function(e){var t,n;if(this.accept){var r=[];r="string"==typeof this.accept?[this.accept]:this.accept;try{for(var o=Y(r),i=o.next();!i.done;i=o.next()){var a=i.value;if(e.toLowerCase().indexOf(a.toLowerCase())===e.length-a.length)return!0}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return!1}return!0},e.prototype.uploadNext=function(){var e,t,n=this;if(this.multiple){if(this.value)try{for(var r=Y(this.value),o=r.next();!o.done;o=r.next()){var i=o.value;if(i.loading&&!i.error){this.upload(i).subscribe((function(){return n.uploadNext()}),(function(e){return n.uploadNext()}));break}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}}else this.value&&this.value.loading&&!this.value.error&&this.upload(this.value).subscribe((function(){return n.uploadNext()}),(function(e){return n.uploadNext()}))},e.prototype.onFileChange=function(e){var t,n;if(this.onTouched(),e.target.files&&e.target.files.length){if(this.multiple){var r=[];try{for(var o=Y(e.target.files),i=o.next();!i.done;i=o.next()){var a=i.value;r.push({file:a,loading:!0,nome:a.name,length:a.size})}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}this.value=W(this.value||[],r),this.onChange(this.value),this.change.emit(this.value),this.stateChanges.next()}else this.value={file:e.target.files[0],length:e.target.files[0].size,loading:!0,nome:e.target.files[0].name},this.onChange(this.value),this.change.emit(this.value),this.stateChanges.next();this.uploadNext()}else this.selectCancel.emit();e.target.value=""},e.prototype.openFileChooser=function(){this.disabled||this.input.nativeElement.click()},e.prototype.remover=function(e){return G(this,void 0,void 0,(function(){return U(this,(function(t){return this.value&&(this.multiple?Array.isArray(this.value)&&(this.value.splice(this.value.indexOf(e),1),this.value.length?(this.value=W(this.value),this.onChange(this.value),this.change.emit(this.value),this.stateChanges.next()):(this.value=void 0,this.onChange(void 0),this.change.emit(void 0),this.stateChanges.next())):(this.value=void 0,this.onChange(void 0),this.change.emit(void 0),this.stateChanges.next())),[2]}))}))},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.writeValue=function(e){e?this.multiple?(this.value=e.map((function(e){return"string"==typeof e?{url:e}:e})),this.stateChanges.next()):"string"==typeof e?(this.value={url:e},this.stateChanges.next()):(this.value=e,this.stateChanges.next()):(this.value=e,this.stateChanges.next())},e}();He.nextId=0,He.decorators=[{type:t.Component,args:[{selector:"mcl-input-fileupload",template:'<div *ngIf="multiple && template == \'chips\'" class="chips">\r\n <mat-chip-list *ngIf="value?.length">\r\n <mat-chip [ngClass]="{\'error\':arquivo.loading && arquivo.error,\'success\':!arquivo.loading}"\r\n *ngFor="let arquivo of value">\r\n <mat-spinner *ngIf="arquivo.loading && !arquivo.error"\r\n [value]="arquivo.progresso" [diameter]="24"\r\n ></mat-spinner>\r\n <mat-icon *ngIf="arquivo.loading && arquivo.error" class="error">remove_circle_outline</mat-icon>\r\n <mat-icon *ngIf="!arquivo.loading" class="success">check_circle_outline</mat-icon>\r\n {{ arquivo.nome || arquivo.filename }}\r\n <a *ngIf="!disabled" (click)="remover(arquivo)" href="javascript:void(0)">\r\n <mat-icon>close</mat-icon>\r\n </a>\r\n </mat-chip>\r\n </mat-chip-list>\r\n\r\n <hr *ngIf="value?.length && !disabled"/>\r\n\r\n <input *ngIf="!disabled" type="file" (change)="onFileChange($event)" #input [multiple]="multiple"/>\r\n</div>\r\n\r\n<div *ngIf="multiple && template == \'preview\'" class="previews">\r\n <div *ngIf="value?.length" fxLayout="row wrap" fxLayoutGap="20px" fxFlexAlign="center">\r\n <div *ngFor="let arquivo of value">\r\n <div class="preview" [ngClass]="{\'error\':arquivo.loading && arquivo.error,\'success\':!arquivo.loading}">\r\n <mcl-preview-arquivo [group]="value" [arquivo]="arquivo"></mcl-preview-arquivo>\r\n\r\n <div class="footer" *ngIf="!disabled">\r\n <mat-spinner *ngIf="arquivo.loading && !arquivo.error"\r\n [value]="arquivo.progresso" [diameter]="24"\r\n ></mat-spinner>\r\n <mat-icon *ngIf="arquivo.loading && arquivo.error" class="error">remove_circle_outline</mat-icon>\r\n <mat-icon *ngIf="!arquivo.loading" class="success">check_circle_outline</mat-icon>\r\n <span>{{ arquivo.nome || arquivo.filename }}</span>\r\n <a *ngIf="!disabled" (click)="remover(arquivo)" href="javascript:void(0)">\r\n <mat-icon>close</mat-icon>\r\n </a>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n <hr *ngIf="value?.length && !disabled"/>\r\n\r\n <input *ngIf="!disabled" type="file" (change)="onFileChange($event)" #input [multiple]="multiple"/>\r\n</div>\r\n\r\n\r\n<div *ngIf="template == \'manual\'">\r\n <input type="file" [disabled]="disabled" (change)="onFileChange($event)" #input\r\n [multiple]="multiple" style="display: none"/>\r\n</div>\r\n\r\n<ng-container *ngIf="!multiple && template != \'manual\'">\r\n <input #input type="file" style="display: none"\r\n (change)="onFileChange($event)"/>\r\n\r\n <div class="input">\r\n <button mat-icon-button type="button"\r\n (click)="openFileChooser()"\r\n *ngIf="!value"\r\n matPrefix>\r\n <mat-icon>attach_file</mat-icon>\r\n </button>\r\n <button mat-icon-button type="button"\r\n [mclDownloadArquivo]="value"\r\n *ngIf="value && !value.loading && !value.error"\r\n matPrefix>\r\n <mat-icon>download</mat-icon>\r\n </button>\r\n <button mat-icon-button type="button" matPrefix\r\n *ngIf="value?.error" disabled>\r\n <mat-icon>warning</mat-icon>\r\n </button>\r\n <button mat-icon-button type="button" matPrefix\r\n *ngIf="value?.loading && !value?.error" disabled>\r\n <mat-spinner [value]="value.progresso"\r\n [diameter]="24"></mat-spinner>\r\n </button>\r\n <input matInput readonly (click)="openFileChooser()" [required]="required"\r\n *ngIf="!value" value="Selecione um arquivo..."/>\r\n <input matInput readonly [required]="required"\r\n *ngIf="value && value.loading && !value.error" value="Submetendo arquivo..."/>\r\n <input matInput readonly [required]="required"\r\n *ngIf="value && value.error" [value]="value?.nome || value?.filename"/>\r\n <input matInput readonly [mclDownloadArquivo]="value" [required]="required"\r\n *ngIf="value && !value.loading" [value]="value?.nome || value?.filename"/>\r\n <button mat-icon-button type="button" matSuffix\r\n matTooltip="Remover" (click)="remover(value)"\r\n *ngIf="value && (!value.loading || value?.error) && !disabled">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n</ng-container>\r\n',providers:[{provide:w.MatFormFieldControl,useExisting:He}],styles:["span{opacity:0;transition:opacity .2s}:host.floating span{opacity:1}.preview .footer>mat-icon,.preview .footer>mat-spinner,mat-chip>mat-icon,mat-chip>mat-spinner{margin-right:5px;vertical-align:middle}.preview .footer a,mat-chip a{padding:5px}.preview .footer a mat-icon,mat-chip a mat-icon{margin-left:10px;vertical-align:middle}.preview.error,mat-chip.error{color:red}.preview.success,mat-chip.success{color:green}.preview{text-align:center;width:200px;overflow:hidden;margin:0 auto 20px}.preview mcl-preview-arquivo{margin:auto;display:block}.preview .footer{display:flex;text-align:left}.preview .footer span{flex:1 1 auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.preview .footer a,.preview .footer mat-icon{flex:1}.input{display:flex}.input input{flex:1 1 auto}"]}]}],He.ctorParameters=function(){return[{type:D.ErrorStateMatcher},{type:u.NgControl,decorators:[{type:t.Optional},{type:t.Self}]},{type:u.NgForm,decorators:[{type:t.Optional}]},{type:t.ChangeDetectorRef},{type:u.FormGroupDirective,decorators:[{type:t.Optional}]},{type:void 0,decorators:[{type:t.Inject,args:[ue]}]}]},He.propDecorators={multiple:[{type:t.Input}],limite:[{type:t.Input}],accept:[{type:t.Input}],template:[{type:t.Input}],input:[{type:t.ViewChild,args:["input"]}],selectCancel:[{type:t.Output}],stateChanges:[{type:t.Output,args:["change"]}],change:[{type:t.Output}],id:[{type:t.HostBinding}],describedBy:[{type:t.HostBinding,args:["attr.aria-describedby"]}],shouldLabelFloat:[{type:t.HostBinding,args:["class.floating"]}],placeholder:[{type:t.Input}],required:[{type:t.Input}],disabled:[{type:t.Input}]};var Ge=function(){function e(){}return e.prototype.validate=function(e){if(e.value)if(this.multiple&&Array.isArray(e.value)){var t=e.value.find((function(e){return e.loading&&e.error}));if(t)return t.error;if(e.value.find((function(e){return e.loading})))return{fileUploading:!0}}else{if(e.value.loading&&e.value.error)return e.value.error;if(e.value.loading)return{fileUploading:!0}}},e}();Ge.decorators=[{type:t.Directive,args:[{selector:"mcl-input-fileupload,[mclFileupload]",providers:[{provide:u.NG_VALIDATORS,useExisting:Ge,multi:!0}]}]}],Ge.propDecorators={multiple:[{type:t.Input}]};var Ue=function(){};Ue.decorators=[{type:t.NgModule,args:[{declarations:[He,Ge],exports:[He,Ge],imports:[n.CommonModule,u.FormsModule,T.MatChipsModule,d.MatProgressSpinnerModule,c.MatIconModule,h.FlexLayoutModule,ge,p.MatButtonModule,k.MatInputModule,P.MatTooltipModule]}]}];var Ye=function(){function e(e,t,n){void 0===n&&(n=!1),this.pool=e,this.value=t,this.subject=new l.BehaviorSubject(n)}return Object.defineProperty(e.prototype,"model",{get:function(){return this.pool.model()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"observable",{get:function(){return this.subject},enumerable:!1,configurable:!0}),e.prototype.setSelected=function(e){this.subject.next(e)},e.prototype.dispose=function(){this.subject.complete()},e.prototype.touched=function(){this.pool.touched()},e}(),Qe=function(){function e(e){this.name=e,this._nodes=new l.BehaviorSubject([]),this._touch=new l.Subject,this._groups=[],this.lastValues=[]}return e.prototype.model=function(){return this._nodes.pipe(g.switchMap((function(e){return l.combineLatest(e.map((function(e){return e.observable.pipe(g.map((function(t){return{selected:t,value:e.value}})))})))}))).pipe(g.map((function(e){var t=e.filter((function(e){return e.selected})).map((function(e){return e.value}));return t.length?t:void 0})))},e.prototype.touch=function(){return this._touch},e.prototype.all=function(){return this._nodes.pipe(g.switchMap((function(e){return l.combineLatest(e.map((function(e){return e.observable})))}))).pipe(g.map((function(e){var t,n;if(e.length){var r=e[0];try{for(var o=Y(e),i=o.next();!i.done;i=o.next()){if(i.value!==r)return}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}return!1})))},Object.defineProperty(e.prototype,"empty",{get:function(){return!this._nodes.value.length&&!this._groups.length},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this._nodes.complete(),this._touch.complete()},e.prototype.touched=function(){this._touch.next()},e.prototype.register=function(e){var t=!!this.lastValues&&this.lastValues.indexOf(e)>=0,n=new Ye(this,e,t);return this._nodes.next(W(this._nodes.value,[n])),n},e.prototype.unregister=function(e){this._nodes.next(this._nodes.value.filter((function(t){return t!==e}))),e.dispose()},e.prototype.registerGroup=function(e){this._groups.push(e)},e.prototype.unregisterGroup=function(e){this._groups.splice(this._groups.indexOf(e),1)},e.prototype.writeValue=function(e){e!==this.lastValues&&(this.lastValues=e||[],e?this._nodes.value.forEach((function(t){t.setSelected(e.indexOf(t.value)>=0)})):this._nodes.value.forEach((function(e){e.setSelected(!1)})))},e.prototype.setAll=function(e){this._nodes.value.forEach((function(t){return t.setSelected(e)}))},e}(),We=function(){function e(){this.nodes={}}return e.prototype.getPool=function(e){return this.nodes[e]||(this.nodes[e]=new Qe(e)),this.nodes[e]},e.prototype.registerGroup=function(e,t){var n=this.getPool(e);return n.registerGroup(t),n},e.prototype.unregisterGroup=function(e,t){this.nodes[e]&&(this.nodes[e].unregisterGroup(t),this.nodes[e].empty&&(this.nodes[e].dispose(),this.nodes[e]=void 0))},e.prototype.unregister=function(e,t){this.nodes[e]&&(this.nodes[e].unregister(t),this.nodes[e].empty&&(this.nodes[e].dispose(),this.nodes[e]=void 0))},e.prototype.register=function(e,t){return this.getPool(e).register(t)},e.prototype.setAll=function(e,t){this.nodes[e]&&this.nodes[e].setAll(t)},e.prototype.writeValue=function(e,t){var n;null===(n=this.getPool(e))||void 0===n||n.writeValue(t)},e}();We.decorators=[{type:t.Injectable}];var Je=function(){function e(e){this.fotonOptionCheckboxService=e,this.change=new t.EventEmitter}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e,this.pool=this.fotonOptionCheckboxService.getPool(e),this.selected=this.pool.all()},enumerable:!1,configurable:!0}),e.prototype.setSelected=function(e){this.pool.touched(),this.fotonOptionCheckboxService.setAll(this.name,e),this.change.emit()},e}();Je.decorators=[{type:t.Component,args:[{selector:"mcl-option-checkbox[select-all-option]",template:'<mat-checkbox [disabled]="disabled"\n [ngModel]="selected | async"\n (ngModelChange)="setSelected($event)"\n [indeterminate]="(selected | async) === undefined" >\n <ng-content></ng-content>\n</mat-checkbox>\n'}]}],Je.ctorParameters=function(){return[{type:We}]},Je.propDecorators={disabled:[{type:t.Input}],change:[{type:t.Output}],name:[{type:t.Input}]};var Xe=function(){function e(e){this.fotonOptionCheckboxService=e,this.change=new t.EventEmitter}return e.prototype.setSelected=function(e){this.node&&(this.node.touched(),this.node.setSelected(e),this.change.emit())},Object.defineProperty(e.prototype,"value",{get:function(){return this.node?this.node.value:void 0},set:function(e){e!=this.value&&(this.node?this.node.value=e:this._value=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){e===this.name||this.node||(this.node=this.fotonOptionCheckboxService.register(e,this._value),this.selected=this.node.observable,this._name=e)},enumerable:!1,configurable:!0}),e.prototype.onBlur=function(){},e.prototype.ngOnDestroy=function(){this.fotonOptionCheckboxService.unregister(this.name,this.node)},e}();Xe.decorators=[{type:t.Component,args:[{selector:"mcl-option-checkbox:not([select-all-option])",template:'<mat-checkbox [disabled]="disabled"\n [ngModel]="selected | async"\n (ngModelChange)="setSelected($event)"\n [indeterminate]="(selected | async) === undefined" >\n <ng-content></ng-content>\n</mat-checkbox>\n'}]}],Xe.ctorParameters=function(){return[{type:We}]},Xe.propDecorators={disabled:[{type:t.Input}],change:[{type:t.Output}],value:[{type:t.Input}],name:[{type:t.Input}]};var Ke=function(){function e(e){this.optionCheckboxService=e,this.change=new t.EventEmitter,this.touched=new t.EventEmitter,this.onTouchedCallback=function(){},this.onChangeCallback=function(){}}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){var t=this;e===this.name||this.pool||(this.pool=this.optionCheckboxService.registerGroup(e,this),this.pool.touch().subscribe((function(){t.onTouchedCallback(),t.touched.emit()})),this.pool.model().subscribe((function(e){clearTimeout(t.callbackTimeout),t.callbackTimeout=setTimeout((function(){t.onChangeCallback(e),t.change.emit(e)}))})),this._name=e)},enumerable:!1,configurable:!0}),e.prototype.onBlur=function(){},e.prototype.ngOnDestroy=function(){this.optionCheckboxService.unregisterGroup(this.name,this)},e.prototype.writeValue=function(e){this.optionCheckboxService.writeValue(this.name,e)},e.prototype.registerOnChange=function(e){this.onChangeCallback=e},e.prototype.registerOnTouched=function(e){this.onTouchedCallback=e},e}();Ke.decorators=[{type:t.Component,args:[{selector:"mcl-option-checkbox-group",template:"",providers:[{provide:u.NG_VALUE_ACCESSOR,useExisting:Ke,multi:!0}]}]}],Ke.ctorParameters=function(){return[{type:We}]},Ke.propDecorators={disabled:[{type:t.Input}],change:[{type:t.Output}],touched:[{type:t.Output}],name:[{type:t.Input}]};var Ze=function(){};Ze.decorators=[{type:t.NgModule,args:[{declarations:[Xe,Je,Ke],exports:[Xe,Je,Ke],providers:[We],imports:[n.CommonModule,u.FormsModule,E.MatCheckboxModule]}]}];var et=function(){function e(){}return e.prototype.ngOnInit=function(){},e}();et.decorators=[{type:t.Component,args:[{selector:"mcl-select-item",template:"",styles:[""]}]}],et.ctorParameters=function(){return[]},et.propDecorators={label:[{type:t.Input}],value:[{type:t.Input}]};var tt=new RegExp("àáâãäçèéêëìíîïñòóôõöùúûüýÿÀÁÂÃÄÇÈÉÊËÌÍÎÏÑÒÓÔÕÖÙÚÛÜÝŸ","g"),nt=function(){function e(){}return e.normalize=function(e){return String(e).trim().toLowerCase().replace(tt,(function(e){return"aaaaaceeeeiiiinooooouuuuyyAAAAACEEEEIIIINOOOOOUUUUYY".charAt(tt.source.indexOf(e)-1)}))},e.like=function(t,n){return e.normalize(t).indexOf(e.normalize(n))>=0},e}(),rt=function(){function e(t,n,r,o){var i=this;this.errorStateMatcher=t,this.ngControl=n,this.parentForm=r,this.parentFormGroup=o,this.onChange=function(e){},this.onTouched=function(){},this.$disabled=!1,this.$required=!1,this.focused=!1,this.filterCtrl=new u.FormControl,this.stateChanges=new l.Subject,this.id="select-chips-"+e.nextId++,this.describedBy="",null!=this.ngControl&&(this.ngControl.valueAccessor=this),this.opcoesFiltradas=this.filterCtrl.valueChanges.pipe(g.startWith(null),g.map((function(e){return i._filter(e)})))}return Object.defineProperty(e.prototype,"value",{get:function(){return this.$value},set:function(e){this.$value=e,this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return!this.value},enumerable:!1,configurable:!0}),e.prototype.onContainerClick=function(e){},Object.defineProperty(e.prototype,"shouldLabelFloat",{get:function(){return!this.empty||this.input&&this.input.nativeElement.value||this.focused},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"placeholder",{get:function(){return this.$placeholder},set:function(e){this.$placeholder=e,this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return this.$required},set:function(e){this.$required=O.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this.$disabled},set:function(e){this.$disabled=O.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"errorState",{get:function(){return this.errorStateMatcher.isErrorState(this.ngControl.control,this.parentFormGroup||this.parentForm)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controlType",{get:function(){return"select-chips"},enumerable:!1,configurable:!0}),e.prototype.setDescribedByIds=function(e){this.describedBy=e.join(" ")},e.prototype.ngOnDestroy=function(){this.stateChanges.complete()},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.writeValue=function(e){this.value=e,this.filterCtrl.setValue(this.filterCtrl.value)},e.prototype.add=function(e){this.onTouched();var t=e.input,n=e.value,r=nt.normalize(n||""),o=this.opcoes.toArray().find((function(e){return nt.normalize(e.label)===r}));o&&(this.value&&this.value.find((function(e){return e===o.value}))||(this.value=W(this.value||[],[o.value]),this.onChange(this.value)),t&&(t.value=""),this.filterCtrl.setValue(null))},e.prototype.remove=function(e){if(this.onTouched(),this.value){var t=this.value.indexOf(e);t>=0&&this.value.splice(t,1),this.value.length||(this.value=void 0),this.onChange(this.value)}},e.prototype.selected=function(e){this.onTouched(),this.value&&this.value.find((function(t){return t===e.option.value}))||(this.value=W(this.value||[],[e.option.value]),this.onChange(this.value)),this.filterInput.nativeElement.value="",this.filterCtrl.setValue(null)},e.prototype._filter=function(e){var t=this,n=e&&nt.normalize(e);return this.opcoes.toArray().filter((function(e){return!t.value||t.value.indexOf(e.value)<0})).filter((function(e){return!n||nt.normalize(e.label).indexOf(n)>=0}))},e}();rt.nextId=0,rt.decorators=[{type:t.Component,args:[{selector:"mcl-select-chips",template:'<mat-chip-list #chipList >\n <mat-chip\n *ngFor="let item of value"\n [removable]="!disabled"\n (removed)="remove(item)">\n {{item}}\n <mat-icon matChipRemove *ngIf="!disabled" >cancel</mat-icon>\n </mat-chip>\n <input\n [placeholder]="placeholder"\n #filterInput required\n (focusin)="focused = true"\n (focusout)="focused = false"\n [formControl]="filterCtrl"\n [matAutocomplete]="filterAutocomplete"\n [matChipInputFor]="chipList"\n (matChipInputTokenEnd)="add($event)">\n</mat-chip-list>\n<mat-autocomplete #filterAutocomplete="matAutocomplete" (optionSelected)="selected($event)">\n <mat-option *ngFor="let opcao of opcoesFiltradas | async" [value]="opcao.value">\n {{opcao.label}}\n </mat-option>\n</mat-autocomplete>\n',providers:[{provide:w.MatFormFieldControl,useExisting:rt}],styles:[""]}]}],rt.ctorParameters=function(){return[{type:D.ErrorStateMatcher},{type:u.NgControl,decorators:[{type:t.Optional},{type:t.Self}]},{type:u.NgForm,decorators:[{type:t.Optional}]},{type:u.FormGroupDirective,decorators:[{type:t.Optional}]}]},rt.propDecorators={input:[{type:t.ViewChild,args:["input"]}],id:[{type:t.HostBinding}],describedBy:[{type:t.HostBinding,args:["attr.aria-describedby"]}],opcoes:[{type:t.ContentChildren,args:[et]}],filterInput:[{type:t.ViewChild,args:["filterInput"]}],filterAutocomplete:[{type:t.ViewChild,args:["filterAutocomplete"]}],shouldLabelFloat:[{type:t.HostBinding,args:["class.floating"]}],placeholder:[{type:t.Input}],required:[{type:t.Input}],disabled:[{type:t.Input}]};var ot=function(){};ot.decorators=[{type:t.NgModule,args:[{declarations:[et],exports:[et],imports:[n.CommonModule]}]}];var it=function(){};it.decorators=[{type:t.NgModule,args:[{declarations:[rt],exports:[rt,ot],imports:[n.CommonModule,T.MatChipsModule,c.MatIconModule,u.ReactiveFormsModule,_.MatAutocompleteModule,ot]}]}];var at=function(){function e(t,n,r,o){this.errorStateMatcher=t,this.ngControl=n,this.parentForm=r,this.parentFormGroup=o,this.onChange=function(e){},this.onTouched=function(){},this.$disabled=!1,this.$required=!1,this.layout="grid",this.layoutColumns=3,this.stateChanges=new l.Subject,this.id="select-radio-"+e.nextId++,this.describedBy="",null!=this.ngControl&&(this.ngControl.valueAccessor=this)}return e.prototype.ngAfterViewInit=function(){var e=this;this.opcoes.changes.subscribe((function(){e.updateOpcoes()}))},Object.defineProperty(e.prototype,"value",{get:function(){return this.$value},set:function(e){this.$value=e,this.onChange(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"focused",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return!this.value},enumerable:!1,configurable:!0}),e.prototype.onContainerClick=function(e){},Object.defineProperty(e.prototype,"shouldLabelFloat",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"placeholder",{get:function(){return this.$placeholder},set:function(e){this.$placeholder=e,this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return this.$required},set:function(e){this.$required=O.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this.$disabled},set:function(e){this.$disabled=O.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"errorState",{get:function(){return this.errorStateMatcher.isErrorState(this.ngControl.control,this.parentFormGroup||this.parentForm)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controlType",{get:function(){return"select-chips"},enumerable:!1,configurable:!0}),e.prototype.setDescribedByIds=function(e){this.describedBy=e.join(" ")},e.prototype.ngOnDestroy=function(){this.stateChanges.complete()},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.writeValue=function(e){this.updateOpcoes(e),this.$value=e},e.prototype.change=function(e,t){e._selected=t,this.value=this.opcoesToValue()},e.prototype.updateOpcoes=function(e){var t,n;void 0===e&&(e=this.value);try{for(var r=Y(this.opcoes),o=r.next();!o.done;o=r.next()){var i=o.value;i._selected=e&&e.indexOf(i.value)>=0}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.opcoesToValue=function(){var e,t,n=[];try{for(var r=Y(this.opcoes),o=r.next();!o.done;o=r.next()){var i=o.value;i._selected&&n.push(i.value)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return n.length?n:void 0},e}();at.nextId=0,at.decorators=[{type:t.Component,args:[{selector:"mcl-select-many-checkbox",template:"<div class=\"mat-checkbox-container\"\n [ngClass]=\"{'vertical':layout === 'vertical','horizontal':layout ==='horizontal','grid': layout === 'grid' }\"\n [ngStyle]=\"{'max-height': layout === 'grid' ? (((opcoes.length / layoutColumns) + 1) * 40) + 'px' : undefined}\">\n <mat-checkbox\n [required]=\"required\"\n [disabled]=\"disabled\"\n [checked]=\"opcao._selected\"\n (change)=\"change(opcao, $event.checked)\"\n *ngFor=\"let opcao of opcoes\">\n {{opcao.label}}\n </mat-checkbox>\n\n</div>\n",providers:[{provide:w.MatFormFieldControl,useExisting:at}],styles:[".mat-checkbox-container{display:flex;flex-wrap:wrap}.mat-checkbox-container.horizontal{flex-direction:row}.mat-checkbox-container.grid,.mat-checkbox-container.vertical{flex-direction:column}.mat-checkbox-container mat-checkbox{flex:1;padding:5px 5px 10px 0}@media (max-width:750px){.mat-checkbox-container{max-height:none!important}.mat-checkbox-container.grid,.mat-checkbox-container.horizontal,.mat-checkbox-container.vertical{flex-direction:column}}"]}]}],at.ctorParameters=function(){return[{type:D.ErrorStateMatcher},{type:u.NgControl,decorators:[{type:t.Optional},{type:t.Self}]},{type:u.NgForm,decorators:[{type:t.Optional}]},{type:u.FormGroupDirective,decorators:[{type:t.Optional}]}]},at.propDecorators={layout:[{type:t.Input}],layoutColumns:[{type:t.Input}],input:[{type:t.ViewChild,args:["input"]}],id:[{type:t.HostBinding}],describedBy:[{type:t.HostBinding,args:["attr.aria-describedby"]}],opcoes:[{type:t.ContentChildren,args:[et]}],shouldLabelFloat:[{type:t.HostBinding,args:["class.floating"]}],placeholder:[{type:t.Input}],required:[{type:t.Input}],disabled:[{type:t.Input}]};var st=function(){};st.decorators=[{type:t.NgModule,args:[{declarations:[at],exports:[at,ot],imports:[n.CommonModule,u.FormsModule,ot,E.MatCheckboxModule]}]}];var lt=function(){function e(t,n,r,o){this.errorStateMatcher=t,this.ngControl=n,this.parentForm=r,this.parentFormGroup=o,this.onChange=function(e){},this.onTouched=function(){},this.$disabled=!1,this.$required=!1,this.layout="vertical",this.stateChanges=new l.Subject,this.id="select-radio-"+e.nextId++,this.describedBy="",null!=this.ngControl&&(this.ngControl.valueAccessor=this)}return Object.defineProperty(e.prototype,"value",{get:function(){return this.$value},set:function(e){this.$value=e,this.onChange(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"focused",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"empty",{get:function(){return!this.value},enumerable:!1,configurable:!0}),e.prototype.onContainerClick=function(e){},Object.defineProperty(e.prototype,"shouldLabelFloat",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"placeholder",{get:function(){return this.$placeholder},set:function(e){this.$placeholder=e,this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"required",{get:function(){return this.$required},set:function(e){this.$required=O.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disabled",{get:function(){return this.$disabled},set:function(e){this.$disabled=O.coerceBooleanProperty(e),this.stateChanges.next()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"errorState",{get:function(){return this.errorStateMatcher.isErrorState(this.ngControl.control,this.parentFormGroup||this.parentForm)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controlType",{get:function(){return"select-chips"},enumerable:!1,configurable:!0}),e.prototype.setDescribedByIds=function(e){this.describedBy=e.join(" ")},e.prototype.ngOnDestroy=function(){this.stateChanges.complete()},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.writeValue=function(e){this.value=e},e}();lt.nextId=0,lt.decorators=[{type:t.Component,args:[{selector:"mcl-select-radio",template:'<mat-radio-group\n [ngClass]="{\'vertical\':layout === \'vertical\',\'horizontal\':layout ===\'horizontal\'}"\n [required]="required"\n [disabled]="disabled"\n [(ngModel)]="value">\n <mat-radio-button *ngFor="let opcao of opcoes"\n [value]="opcao.value">{{opcao.label}}</mat-radio-button>\n</mat-radio-group>\n',providers:[{provide:w.MatFormFieldControl,useExisting:lt}],styles:["mat-radio-group{display:flex}mat-radio-group.horizontal{flex-direction:row}mat-radio-group.vertical{flex-direction:column}mat-radio-group mat-radio-button{flex:1}@media (max-width:750px){mat-radio-group.horizontal,mat-radio-group.vertical{flex-direction:column}mat-radio-group.horizontal mat-radio-button,mat-radio-group.vertical mat-radio-button{margin:10px 0}}"]}]}],lt.ctorParameters=function(){return[{type:D.ErrorStateMatcher},{type:u.NgControl,decorators:[{type:t.Optional},{type:t.Self}]},{type:u.NgForm,decorators:[{type:t.Optional}]},{type:u.FormGroupDirective,decorators:[{type:t.Optional}]}]},lt.propDecorators={layout:[{type:t.Input}],input:[{type:t.ViewChild,args:["input"]}],id:[{type:t.HostBinding}],describedBy:[{type:t.HostBinding,args:["attr.aria-describedby"]}],opcoes:[{type:t.ContentChildren,args:[et]}],shouldLabelFloat:[{type:t.HostBinding,args:["class.floating"]}],placeholder:[{type:t.Input}],required:[{type:t.Input}],disabled:[{type:t.Input}]};var ut=function(){};ut.decorators=[{type:t.NgModule,args:[{declarations:[lt],exports:[lt,ot],imports:[n.CommonModule,u.FormsModule,ot,F.MatRadioModule]}]}];var ct=function(e){function n(n,r,o,i){var a=e.call(this,n,r,o,i)||this;return a.preferredContries=["br"],a.blur=new t.EventEmitter,a.alwaysShowCountry=!1,a}return H(n,e),Object.defineProperty(n.prototype,"value",{get:function(){return this.$innerValue},set:function(e){this.$innerValue=e,this.stateChanges.next(),this.onChange(null==e?void 0:e.replace(/[^\d+]/g,""))},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"shouldLabelFloat",{get:function(){return this.focused||!this.empty||this.alwaysShowCountry},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"empty",{get:function(){return!this.value},enumerable:!1,configurable:!0}),n.prototype.onFocus=function(){this.focused=!0,this.stateChanges.next()},n.prototype.onBlur=function(){this.focused=!1,this.stateChanges.next(),this.blur.emit()},n.prototype.writeValue=function(e){this.value=e},n}(Ne);ct.decorators=[{type:t.Component,args:[{selector:"mcl-input-telefone-intl",template:'<div class="input">\n <lac-mat-country-selector\n [ngClass]="{\'hidden\': !focused && !value && !alwaysShowCountry}"\n [preferredCountries]="preferredContries"\n [selectorFor]="input"\n searchPlaceholder="Filtrar paises..."></lac-mat-country-selector>\n <lac-mat-tel-input #input\n [(ngModel)]="value"\n (focusin)="onFocus()" (focusout)="onBlur()"></lac-mat-tel-input>\n</div>\n',providers:[{provide:w.MatFormFieldControl,useExisting:ct}],styles:[".input{display:flex;align-items:center;margin:-8px 0;gap:8px}.input lac-mat-country-selector{transition:.3s}.input lac-mat-country-selector.hidden{opacity:0}.input lac-mat-tel-input{flex:1 1 auto}"]}]}],ct.ctorParameters=function(){return[{type:D.ErrorStateMatcher},{type:u.NgControl,decorators:[{type:t.Optional},{type:t.Self}]},{type:u.NgForm,decorators:[{type:t.Optional}]},{type:u.FormGroupDirective,decorators:[{type:t.Optional}]}]},ct.propDecorators={preferredContries:[{type:t.Input}],readonly:[{type:t.Input}],blur:[{type:t.Output}],alwaysShowCountry:[{type:t.Input}],telInput:[{type:t.ViewChild,args:["input"]}]};var pt=function(){function e(){}return e.prototype.validate=function(e){return L.phoneNumberValidator(e)},e}();pt.decorators=[{type:t.Directive,args:[{selector:"mcl-input-telefone-intl,[mclInputTelefoneIntl]",providers:[{provide:u.NG_VALIDATORS,useExisting:pt,multi:!0}]}]}],pt.ctorParameters=function(){return[]};var dt=function(){};dt.decorators=[{type:t.NgModule,args:[{declarations:[ct,pt],exports:[ct,pt],imports:[n.CommonModule,u.FormsModule,L.LacMatTelInputModule]}]}];var ht=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return H(t,e),t.prototype.ngOnInit=function(){this.mask="##.###.###/####-##"},t}(te);ht.decorators=[{type:t.Directive,args:[{selector:"[mclModel][ngModel][cnpj]:not([mask])"}]}];var mt=function(){function e(e){this.modulo11Service=e}return e.prototype.validate=function(e){if(e.value){var t=e.value.replace(/\D+/g,"");if(14!==t.length||!this.modulo11Service.isValidCgc(t))return{cnpj:!0}}return null},e}();mt.decorators=[{type:t.Directive,args:[{selector:"[mclCnpj],[mclModel][cnpj]",providers:[{provide:u.NG_VALIDATORS,useExisting:mt,multi:!0}]}]}],mt.ctorParameters=function(){return[{type:ne}]};var ft=function(){function e(){}return e.prototype.transform=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(e)return Z(e,"##.###.###/####-##")},e}();ft.decorators=[{type:t.Pipe,args:[{name:"cnpj"}]}];var gt=function(){};gt.decorators=[{type:t.NgModule,args:[{declarations:[mt,ht,ft],exports:[mt,ht,ft],imports:[n.CommonModule,de]}]}];var yt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return H(t,e),t.prototype.ngOnInit=function(){this.mask="###.###.###-##"},t}(te);yt.decorators=[{type:t.Directive,args:[{selector:"[mclModel][ngModel][cpf]:not([mask])"}]}];var vt=function(){function e(e){this.modulo11Service=e}return e.prototype.validate=function(e){if(e.value){var t=e.value.replace(/\D+/g,"");if(11!==t.length||!this.modulo11Service.isValidCpf(t))return{cpf:!0}}return null},e}();vt.decorators=[{type:t.Directive,args:[{selector:"[mclCpf],[mclModel][cpf]",providers:[{provide:u.NG_VALIDATORS,useExisting:vt,multi:!0}]}]}],vt.ctorParameters=function(){return[{type:ne}]};var bt=function(){function e(){}return e.prototype.transform=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(e)return Z(e,"###.###.###-##")},e}();bt.decorators=[{type:t.Pipe,args:[{name:"cpf"}]}];var Ct=function(){};Ct.decorators=[{type:t.NgModule,args:[{declarations:[yt,vt,bt],exports:[yt,vt,bt],imports:[n.CommonModule]}]}];var xt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return H(t,e),t.prototype.ngOnInit=function(){this.mask="###.###.###-##"},t.prototype.applyMask=function(e){return e&&e.replace(/\D/g,"").length>11?Z(e,"##.###.###/####-##"):Z(e,"###.###.###-##")},t.prototype.removeMask=function(e){return e&&e.replace(/\D/g,"").length>11?ee(e,"##.###.###/####-##"):ee(e,"###.###.###-##")},t}(te);xt.decorators=[{type:t.Directive,args:[{selector:"[mclModel][ngModel][cpfCnpj]:not([mask])"}]}];var Mt=function(){function e(e){this.modulo11Service=e}return e.prototype.validate=function(e){if(e.value){var t=e.value.replace(/\D+/g,"");if(!(11===t.length&&this.modulo11Service.isValidCpf(t)||14===t.length&&this.modulo11Service.isValidCgc(t)))return{cpfCnpj:!0}}return null},e}();Mt.decorators=[{type:t.Directive,args:[{selector:"[mclCpfCnpj],[mclModel][cpfCnpj]",providers:[{provide:u.NG_VALIDATORS,useExisting:Mt,multi:!0}]}]}],Mt.ctorParameters=function(){return[{type:ne}]};var wt=function(){function e(){}return e.prototype.transform=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(e)return e.length>11?Z(e,"##.###.###/####-##"):Z(e,"###.###.###-##")},e}();wt.decorators=[{type:t.Pipe,args:[{name:"cpfCnpj"}]}];var It=function(){};It.decorators=[{type:t.NgModule,args:[{declarations:[xt,Mt,wt],exports:[xt,Mt,wt],imports:[n.CommonModule]}]}];var Pt=function(){function e(){this.tipo="info"}return e.prototype.ngOnInit=function(){},e}();Pt.decorators=[{type:t.Component,args:[{selector:"mcl-info",template:'<div class="info" [ngClass]="{\'alert\':tipo === \'alert\'}">\n <mat-icon *ngIf="tipo === \'info\'">info</mat-icon>\n <mat-icon *ngIf="tipo === \'alert\'">warning</mat-icon>\n <label>\n <ng-content select="[mcl-info-title]"></ng-content>\n </label>\n <ng-content></ng-content>\n</div>\n',styles:[".info{background-color:#f3f3f3;color:#666;border-radius:5px;border:1px solid #ddd;padding:18px 15px 18px 50px;margin-bottom:20px;position:relative}.info mat-icon{position:absolute;top:15px;left:15px}.info label{font-weight:700}.info.alert{background-color:#ffd4cd;color:#994141;border:1px solid #ffa29e}"]}]}],Pt.ctorParameters=function(){return[]},Pt.propDecorators={tipo:[{type:t.Input}]};var Dt=function(){};Dt.decorators=[{type:t.NgModule,args:[{declarations:[Pt],exports:[Pt],imports:[n.CommonModule,c.MatIconModule]}]}];var Ot=function(e,t,n,r,o){if(void 0===t&&(t="R$"),void 0===n&&(n="."),void 0===r&&(r=","),void 0===o&&(o="###.###.###.###.###,##"),e){for(var i="",a=e.replace(/\D/g,"").replace(/^0+/,"");a.length<o.length-o.indexOf(",");)a="0"+a;for(var s=o.length-1;s>=0&&a.length;s--)if("."!==o[s])if(","!==o[s]){var l=kt(a);a=l.restante,i=l.ultimo+i}else i=r+i;else i=n+i;return t+i}},kt=function(e){var t=e.length;return{ultimo:e.charAt(t-1),restante:e.substring(0,t-1)}},St=function(){function e(e){this.ngControl=e,this.$mascara="###.###.###.###.###,##",this.$symbol="R$",this.$thousandDivider=".",this.$fractionalDivider=",",this.value=null,this.displayValue=null,this.mclModelChange=new t.EventEmitter}return e.prototype.delay=function(e){return void 0===e&&(e=0),new l.Observable((function(t){var n=setTimeout((function(){return t.next()}),e);return function(){return clearTimeout(n)}}))},e.prototype.processValue=function(e){return this.keepMask?e:Ot(e,"","",".",this.$mascara)},Object.defineProperty(e.prototype,"symbol",{set:function(e){e!==this.$symbol&&(this.$symbol=e,this.defineValue())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thousandDivider",{set:function(e){e!==this.$thousandDivider&&(this.$thousandDivider=e,this.defineValue())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fractionalDivider",{set:function(e){e!==this.$fractionalDivider&&(this.$fractionalDivider=e,this.defineValue())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mascara",{set:function(e){e!==this.$mascara&&(this.$mascara=e,this.defineValue())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maskValue",{set:function(e){e!==this.value&&(this.value=e,this.defineValue())},enumerable:!1,configurable:!0}),e.prototype.onInput=function(e){var t=e.target.value;this.onValueChange(t)},e.prototype.updateValue=function(e){var t=this;this.value=e,this.mclModelChange.emit(e),this.delay().subscribe((function(){return t.ngControl.control.updateValueAndValidity()}))},e.prototype.defineValue=function(){var e=this,t=this.value,n=null;null!=t&&(n=Ot(t,this.$symbol,this.$thousandDivider,this.$fractionalDivider,this.$mascara),t=this.processValue(n)),this.delay().subscribe((function(){e.displayValue!==n&&(e.displayValue=n,e.ngControl.control.setValue(n),e.delay().subscribe((function(){if(t!==e.value)return e.updateValue(t)})))}))},e.prototype.onValueChange=function(e){if(e!==this.displayValue){var t=e,n=void 0;null==e||""===e.trim()?n=null:(t=Ot(e,this.$symbol,this.$thousandDivider,this.$fractionalDivider,this.$mascara),n=this.processValue(t)),this.displayValue=t,e!==t&&this.ngControl.control.setValue(t),n!==this.value&&this.updateValue(n)}},e}();St.decorators=[{type:t.Directive,args:[{selector:"[mclModel][ngModel][monetario]"}]}],St.ctorParameters=function(){return[{type:u.NgControl}]},St.propDecorators={keepMask:[{type:t.Input}],mclModelChange:[{type:t.Output}],symbol:[{type:t.Input}],thousandDivider:[{type:t.Input}],fractionalDivider:[{type:t.Input}],mascara:[{type:t.Input}],maskValue:[{type:t.Input,args:["mclModel"]}],onInput:[{type:t.HostListener,args:["input",["$event"]]}]};var jt=function(){function e(){}return e.prototype.transform=function(e,t,n,r,o){return void 0===t&&(t="R$"),void 0===n&&(n="."),void 0===r&&(r=","),void 0===o&&(o="###.###.###.###.###,##"),Ot(e,t,n,r,o)},e}();jt.decorators=[{type:t.Pipe,args:[{name:"mclMonetario"}]}];var Vt=function(){};Vt.decorators=[{type:t.NgModule,args:[{declarations:[St,jt],exports:[St,jt],imports:[n.CommonModule]}]}];var At=function(e,t,n,r,o){if(void 0===t&&(t="%"),void 0===n&&(n="."),void 0===r&&(r=","),void 0===o&&(o="###.###.###.###.###,##"),e){for(var i="",a=e.replace(/\D/g,"").replace(/^0+/,"");a.length<3;)a="0"+a;for(var s=o.length-1;s>=0&&a.length;s--)if("."!==o[s])if(","!==o[s]){var l=Tt(a);a=l.restante,i=l.ultimo+i}else i=r+i;else i=n+i;return i+t}},Tt=function(e){var t=e.length;return{ultimo:e.charAt(t-1),restante:e.substring(0,t-1)}},Et=function(){function e(e){this.ngControl=e,this.mascara="###.###.###.###.###,##",this.symbol="%",this.thousandDivider=".",this.fractionalDivider=",",this.value=null,this.displayValue=null,this.mclModelChange=new t.EventEmitter}return e.prototype.delay=function(e){return void 0===e&&(e=0),new l.Observable((function(t){var n=setTimeout((function(){return t.next()}),e);return function(){return clearTimeout(n)}}))},e.prototype.processValue=function(e){return this.keepMask?e:At(e,"","",".",this.mascara)},Object.defineProperty(e.prototype,"maskValue",{set:function(e){e!==this.value&&(this.value=e,this.defineValue())},enumerable:!1,configurable:!0}),e.prototype.onInput=function(e){var t=e.target.value;this.onValueChange(t)},e.prototype.updateValue=function(e){var t=this;this.value=e,this.mclModelChange.emit(e),this.delay().subscribe((function(){return t.ngControl.control.updateValueAndValidity()}))},e.prototype.defineValue=function(){var e=this,t=this.value,n=null;null!=t&&(n=At(t,this.symbol,this.thousandDivider,this.fractionalDivider,this.mascara),t=this.processValue(n)),this.delay().subscribe((function(){e.displayValue!==n&&(e.displayValue=n,e.ngControl.control.setValue(n),e.delay().subscribe((function(){if(t!==e.value)return e.updateValue(t)})))}))},e.prototype.onValueChange=function(e){if(e!==this.displayValue){var t=e,n=void 0;null==e||""===e.trim()?n=null:(t=At(e),n=this.processValue(t)),this.displayValue=t,e!==t&&this.ngControl.control.setValue(t),n!==this.value&&this.updateValue(n)}},e}();Et.decorators=[{type:t.Directive,args:[{selector:"[mclModel][ngModel][porcentagem]"}]}],Et.ctorParameters=function(){return[{type:u.NgControl}]},Et.propDecorators={mascara:[{type:t.Input}],symbol:[{type:t.Input}],thousandDivider:[{type:t.Input}],fractionalDivider:[{type:t.Input}],keepMask:[{type:t.Input}],mclModelChange:[{type:t.Output}],maskValue:[{type:t.Input,args:["mclModel"]}],onInput:[{type:t.HostListener,args:["input",["$event"]]}]};var _t=function(){function e(){}return e.prototype.transform=function(e,t,n,r,o){return void 0===t&&(t="%"),void 0===n&&(n="."),void 0===r&&(r=","),void 0===o&&(o="###.###.###.###.###,##"),At(e,t,n,r,o)},e}();_t.decorators=[{type:t.Pipe,args:[{name:"mclPorcentagem"}]}];var Ft=function(){};Ft.decorators=[{type:t.NgModule,args:[{declarations:[Et,_t],exports:[Et,_t],imports:[n.CommonModule]}]}];var Lt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return H(t,e),t.prototype.ngOnInit=function(){this.mask="(##) #### ####"},t.prototype.applyMask=function(e){return e.length>10?Z(e,"(##) ##### ####"):Z(e,"(##) #### ####")},t.prototype.removeMask=function(e){return e.length>10?ee(e,"(##) ##### ####"):ee(e,"(##) #### ####")},t}(te);Lt.decorators=[{type:t.Directive,args:[{selector:"[mclModel][ngModel][telefone]:not([mask])"}]}];var $t=function(){function e(){}return e.prototype.transform=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!e)return"-";if(!(e=e.replace(/\D/g,""))||e.length>11||"0"===e)return"-";switch(e.length){case 11:return"("+e.substring(0,2)+") "+e.substring(2,7)+"-"+e.substring(7);case 10:return"("+e.substring(0,2)+") "+e.substring(2,6)+"-"+e.substring(6);case 9:return e.substring(0,5)+"-"+e.substring(5);case 8:return e.substring(0,4)+"-"+e.substring(4);case 2:case 3:return"("+e+")";default:return e}},e}();$t.decorators=[{type:t.Pipe,args:[{name:"telefone"}]}];var qt=function(){};qt.decorators=[{type:t.NgModule,args:[{declarations:[$t,Lt],exports:[$t,Lt],imports:[n.CommonModule,de]}]}];var Nt=function(){function e(e,t){this.sanitizer=e,this.element=t}return Object.defineProperty(e.prototype,"unsafeInnerHtml",{set:function(e){this.element.nativeElement.innerHTML=e||""},enumerable:!1,configurable:!0}),e}();Nt.decorators=[{type:t.Directive,args:[{selector:"[mclUnsafeInnerHtml]"}]}],Nt.ctorParameters=function(){return[{type:t.Sanitizer},{type:t.ElementRef,decorators:[{type:t.Self}]}]},Nt.propDecorators={unsafeInnerHtml:[{type:t.Input,args:["mclUnsafeInnerHtml"]}]};var Bt,Rt,zt=function(){};zt.decorators=[{type:t.NgModule,args:[{declarations:[Nt],exports:[Nt],imports:[n.CommonModule]}]}],function(e){e.UP="up",e.DOWN="down"}(Bt||(Bt={})),function(e){e.HOST="scroll",e.WINDOW="window:scroll"}(Rt||(Rt={}));var Ht=function(){function e(e){var n=this;this.elRef=e,this.scrollTop=0,this.more=!0,this.scrollDelay=500,this.scrollOffset=200,this.scrolled=new t.EventEmitter,this.getListener=function(){return n.elRef.nativeElement.clientHeight===n.elRef.nativeElement.scrollHeight?Rt.WINDOW:Rt.HOST},this.roundTo=function(e,t){return void 0===t&&(t=n.scrollOffset),Math.floor(e/t)*t},this.getScrollDirection=function(e){return n.scrollTop<=e?Bt.DOWN:Bt.UP},this.handleScroll=function(){return n.getListener()===Rt.HOST?n.scrolled.emit(n.canScroll(n.$element)):n.scrolled.emit(n.canScroll(n.$window))},this.$element=this.elRef.nativeElement,this.$window=document.documentElement}return e.prototype.ngOnInit=function(){this.setThrottle()},e.prototype.ngOnChanges=function(e){e.scrollDelay&&this.setThrottle()},e.prototype.setThrottle=function(){this.$scroll=this.$windowScroll=$.throttle(this.handleScroll,this.scrollDelay)},e.prototype.canScroll=function(e){var t=this.more&&this.getScrollDirection(e.scrollTop)===Bt.DOWN&&this.roundTo(e.clientHeight)===this.roundTo(e.scrollHeight-e.scrollTop);return this.scrollTop=e.scrollTop,t},e}();Ht.decorators=[{type:t.Component,args:[{selector:"mcl-scroll-container",template:"<ng-content></ng-content>\n",styles:[":host{overflow-y:auto}"]}]}],Ht.ctorParameters=function(){return[{type:t.ElementRef}]},Ht.propDecorators={more:[{type:t.Input}],scrollDelay:[{type:t.Input}],scrollOffset:[{type:t.Input}],scrolled:[{type:t.Output}],$scroll:[{type:t.HostListener,args:["scroll"]}],$windowScroll:[{type:t.HostListener,args:["window:scroll"]}]};var Gt=function(){};Gt.decorators=[{type:t.NgModule,args:[{declarations:[Ht],exports:[Ht],imports:[n.CommonModule]}]}];var Ut=function(){function e(){this.submitted=new t.EventEmitter,this.throttleMillis=500,this.eventSubject=new l.Subject,this.currentModels=[]}return e.prototype.ngOnInit=function(){var e=this;this.subscription=this.eventSubject.pipe(g.throttleTime(this.throttleMillis)).subscribe((function(t){e.submitted.emit(t)}))},e.prototype.ngOnDestroy=function(){var e;this.eventSubject.complete(),null===(e=this.subscription)||void 0===e||e.unsubscribe(),this.submitted.unsubscribe()},e.prototype.ngAfterViewInit=function(){var e=this;this.models.changes.subscribe((function(){e.atualizaModels()})),this.atualizaModels()},e.prototype.atualizaModels=function(){for(var e=this,t=this.models.toArray(),n=0;n<this.currentModels.length;){var r=this.currentModels[n];t.indexOf(r)<0?(this.form.removeControl(r),r.control.setParent(void 0),this.currentModels.splice(n,1)):n++}t.forEach((function(t){e.currentModels.indexOf(t)<0&&(e.currentModels.push(t),e.form.addControl(t),t.control.setParent(e.form.form))}))},e.prototype.touched=function(){this.models.toArray().forEach((function(e){e.control.markAsTouched(),e.control.markAsDirty(),e.control.updateValueAndValidity()}))},e.prototype.untouched=function(){this.models.toArray().forEach((function(e){e.control.markAsPristine(),e.control.markAsUntouched(),e.control.updateValueAndValidity()}))},e.prototype.reset=function(){return this.form.resetForm(),this.form.control.markAsPending(),this.models.toArray().forEach((function(e){e.control.reset(),e.control.setErrors(null),e.control.updateValueAndValidity()})),new l.Observable((function(e){setTimeout((function(){e.next(),e.complete()}),300)}))},e.prototype.submit=function(e){e.valid?this.eventSubject.next(e):this.touched()},e}();Ut.decorators=[{type:t.Component,args:[{selector:"mcl-form",template:'<form #form="ngForm" (ngSubmit)="submit(form)">\n <ng-content></ng-content>\n</form>\n',styles:[""]}]}],Ut.ctorParameters=function(){return[]},Ut.propDecorators={submitted:[{type:t.Output}],throttleMillis:[{type:t.Input}],models:[{type:t.ContentChildren,args:[u.NgModel,{descendants:!0}]}],form:[{type:t.ViewChild,args:[u.NgForm]}]};var Yt=function(){function e(e){this.elementRef=e,this.throttleMillis=500,this.singleClick=new t.EventEmitter}return e.prototype.ngOnInit=function(){var e=this;this.subscription=l.fromEvent(this.elementRef.nativeElement,"click").pipe(g.throttleTime(this.throttleMillis)).subscribe((function(t){e.singleClick.emit(t)}))},e.prototype.ngOnDestroy=function(){var e;null===(e=this.subscription)||void 0===e||e.unsubscribe(),this.singleClick.unsubscribe()},e}();Yt.decorators=[{type:t.Directive,args:[{selector:"[mclSingleClick],[singleClick]"}]}],Yt.ctorParameters=function(){return[{type:t.ElementRef}]},Yt.propDecorators={throttleMillis:[{type:t.Input}],singleClick:[{type:t.Output}]};var Qt=function(){function e(e){this.form=e}return e.prototype.ngOnInit=function(){},Object.defineProperty(e.prototype,"errors",{get:function(){var e,t,n,r,o,i;if((null===(t=null===(e=this.form)||void 0===e?void 0:e.form)||void 0===t?void 0:t.controls)&&(null===(r=null===(n=this.form)||void 0===n?void 0:n.form)||void 0===r?void 0:r.controls[this.name])&&(null===(i=null===(o=this.form)||void 0===o?void 0:o.form)||void 0===i?void 0:i.controls[this.name].errors))return Object.keys(this.form.form.controls[this.name].errors)},enumerable:!1,configurable:!0}),e}();Qt.decorators=[{type:t.Component,args:[{selector:"mcl-mensagens-erro,mat-error[name],[mat-error][name]",template:"<span *ngFor=\"let error of errors\">\n {{'validation.' + error | translate:form.form.controls[name].errors[error]}}\n</span>\n",styles:[""]}]}],Qt.ctorParameters=function(){return[{type:Ut,decorators:[{type:t.Host},{type:t.Optional}]}]},Qt.propDecorators={name:[{type:t.Input}],form:[{type:t.Input}]};var Wt=function(){};Wt.decorators=[{type:t.NgModule,args:[{declarations:[Ut,Yt,Qt],exports:[Ut,Yt,Qt],imports:[n.CommonModule,u.FormsModule,o.TranslateModule]}]}],e.ARQUIVO_MANAGER_SERVICE=ue,e.AbstractConsultaComponent=Ae,e.AbstractConsultaPaginadaComponent=Te,e.AbstractEdicaoComponent=Ee,e.AbstractEdicaoModalComponent=_e,e.AbstractMatFormFieldControl=Ne,e.AllOptionCheckboxComponent=Je,e.ArquivoModule=ge,e.CnpjDirective=mt,e.CnpjModelDirective=ht,e.CnpjModule=gt,e.CnpjsPipe=ft,e.ColumnCellDirective=ve,e.ColumnDirective=Ce,e.ColumnFooterDirective=be,e.ColumnHeaderDirective=ye,e.ComponentesModule=de,e.CpfCnpjDirective=Mt,e.CpfCnpjModelDirective=xt,e.CpfCnpjModule=It,e.CpfCnpjPipe=wt,e.CpfDirective=vt,e.CpfModelDirective=yt,e.CpfModule=Ct,e.CpfPipe=bt,e.CriptografiaService=oe,e.CrudModule=Fe,e.DataValidadorDirective=$e,e.DateModule=qe,e.DialogConfirmacaoComponent=K,e.DialogIframeComponent=ie,e.DialogPreviewArquivoComponent=he,e.DialogService=ae,e.DownloadArquivoDirective=fe,e.FormComponent=Ut,e.FormModule=Wt,e.FuturoDirective=Le,e.ImagemDirective=pe,e.InfiniteTableComponent=Oe,e.InfoComponent=Pt,e.InfoModule=Dt,e.InputDatetimeComponent=Be,e.InputDatetimeModule=ze,e.InputFileUploadComponent=He,e.InputFileUploadValidatorDirective=Ge,e.InputFileuploadModule=Ue,e.InputTelefoneInternacionalComponent=ct,e.InputTelefoneInternacionalModule=dt,e.InputTelefoneInternacionalValidatorDirective=pt,e.LoaderComponent=J,e.LoaderService=X,e.MCL_IMAGE_PADRAO=ce,e.MaskedModelDirective=te,e.MensagensErroComponent=Qt,e.MensageriaService=se,e.MobileService=le,e.MonetarioModelDirective=St,e.MonetarioModule=Vt,e.MonetarioPipe=jt,e.NomeResumidoPipe=re,e.OptionCheckboxComponent=Xe,e.OptionCheckboxGroupComponent=Ke,e.OptionCheckboxModule=Ze,e.PAGINATION_CONFIGURATION=Ie,e.PaginatedTableComponent=Pe,e.PaginatorComponent=Se,e.PaginatorIntlFactory=Ve,e.PorcentagemModelDirective=Et,e.PorcentagemModule=Ft,e.PorcentagemPipe=_t,e.PreviewArquivoComponent=me,e.ScrollContainerComponent=Ht,e.ScrollModule=Gt,e.SelectChipsComponent=rt,e.SelectChipsModule=it,e.SelectItemComponent=et,e.SelectItemModule=ot,e.SelectManyCheckboxComponent=at,e.SelectManyCheckboxModule=st,e.SelectRadioComponent=lt,e.SelectRadioModule=ut,e.SingleClickDirective=Yt,e.StringUtil=nt,e.TableComponent=xe,e.TableModule=je,e.TdComponent=we,e.TelefoneModelDirective=Lt,e.TelefoneModule=qt,e.TelefonePipe=$t,e.ThComponent=Me,e.UnsafeInnerHtmlDirective=Nt,e.UnsafeInnerHtmlModule=zt,e.ValidaModulo11Service=ne,e.closeDialogIframe=function(e){if(e){var t=document.createElement("div");t.id="returnValue",t.innerText=JSON.stringify(e),t.style.display="none",document.body.appendChild(t)}window.parent.dispatchEvent(new Event("dialogIframeClosed"))},e.doApplyMask=Z,e.doRemoveMask=ee,e.monetarioMask=Ot,e.ɵ0=Re,Object.defineProperty(e,"__esModule",{value:!0})}));
2
2
  //# sourceMappingURL=main-class-componentes.umd.min.js.map